@feedmepos/mf-connect 0.1.0-beta.57 → 0.1.0-beta.59
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-mHTzFNHW.js → Analytic-CrOuRFyi.js} +11 -11
- package/dist/{App-B-n7gj-z.js → App-sulVtRMh.js} +6 -6
- package/dist/{AuditLogs-Di1OPM6G.js → AuditLogs-1Izy_WCg.js} +8 -8
- package/dist/{Bin-CBJKzI4I.js → Bin-Dv3Nu3lE.js} +8 -8
- package/dist/{Broadcast-DoVzVYx-.js → Broadcast-QIhJK1wY.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BN-5MxsE.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D6v-jaU6.js} +6 -6
- package/dist/{Card-HBCIAI-U.js → Card-DzC-YGZd.js} +15 -15
- package/dist/{Collections-DWloTjsx.js → Collections-Bumm2YDv.js} +5 -5
- package/dist/{Credit-C-5hcB5H.js → Credit-C6mpKlvN.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-ftBpJf1R.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cw0RukeL.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DGqAXodh.js → EffectSheet.vue_vue_type_style_index_0_lang-Dc-C10Me.js} +6 -6
- package/dist/{Experience-DZE4TMWE.js → Experience-r8ObOgLV.js} +9 -9
- package/dist/{Game-DJckXyQ6.js → Game-BEs_KOal.js} +9 -9
- package/dist/{Index-BEAEWA0o.js → Index-DTRshBBT.js} +10 -10
- package/dist/{Marketing-DM1Qjmdm.js → Marketing-hv7sJhb2.js} +6 -6
- package/dist/{Member-qY_urkAf.js → Member-D4bQeDzb.js} +5 -5
- package/dist/{MemberList-C74d3JAX.js → MemberList-B7IYU4ZE.js} +24 -24
- package/dist/{MemberTransactions-Dl-69nP5.js → MemberTransactions-DGGE-qvZ.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DG3WvoHC.js → MessageInput.vue_vue_type_script_setup_true_lang-BDvZfmUw.js} +83 -71
- package/dist/{Mission-Cm7eApQW.js → Mission-BVAqOB4W.js} +9 -9
- package/dist/{Overview-WqUb9hAa.js → Overview-BiI6nXgx.js} +17 -17
- package/dist/{Point-BMW8BwzH.js → Point-XSz6Kkfg.js} +9 -9
- package/dist/{Promotion-DjuP4CAc.js → Promotion-B_nQH-c6.js} +10 -10
- package/dist/{Queue-DrESkLPX.js → Queue-zTo4-UPI.js} +9 -9
- package/dist/{Record-BIKLrtWr.js → Record-Dnjtz3Qx.js} +7 -7
- package/dist/{Reward-BV7nO_mw.js → Reward-BnwzROIM.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B0JugGkD.js → RewardGroup.vue_vue_type_script_setup_true_lang-DrIckf85.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BwyCrb_x.js → RuleGroup.vue_vue_type_script_setup_true_lang-Z9NlAkoQ.js} +12 -12
- package/dist/{Segment-CHdJoQTg.js → Segment-BgviXkch.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CLCcOwbk.js → SelectItems.vue_vue_type_script_setup_true_lang-D9gGDM92.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-TWAs3J7e.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B16t3qf-.js} +3 -3
- package/dist/{Setting-BSJSJMno.js → Setting-C3BTRFTb.js} +602 -596
- package/dist/{Store-D2OA8XZk.js → Store-4t8u7XO9.js} +18 -18
- package/dist/{StoreRewards-DETV2SRy.js → StoreRewards-BDCmOQAL.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Cc8VsYdg.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B6tzsN4S.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CrWWsihk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DgaOIEAd.js} +1 -1
- package/dist/{Tier-BeiF6xa7.js → Tier-5hcTd8BH.js} +19 -19
- package/dist/{Title-DaCFmUD0.js → Title-DF2iDQqn.js} +19 -19
- package/dist/{Transaction-CjBKc8_i.js → Transaction-DoNYVoJ3.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-_fdqP9xi.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C8QXY8eq.js} +6 -6
- package/dist/{Voucher-D8bHiDqg.js → Voucher-Cr6K_jL-.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DgdkvRuw.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dtugqvz6.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Z8cDMGgp.js → ZodTextField.vue_vue_type_script_setup_true_lang-Da0g45vD.js} +1 -1
- package/dist/{app-D41nOKkw.js → app-BH_D35I9.js} +1 -1
- package/dist/{app-DczYW17m.js → app-Dq8M1HSf.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-BlDzgr53.js → business-BLrpJW1K.js} +1 -1
- package/dist/{campaign-Bp_b8I_K.js → campaign-Cq8i-aJp.js} +9 -9
- package/dist/{campaign-ftVdVrd1.js → campaign-DBs5w5mz.js} +2 -2
- package/dist/{campaign.enum-DnbmYyee.js → campaign.enum-0CQ4qJaf.js} +1 -1
- package/dist/{campaign.fn-Bgxh7S1z.js → campaign.fn-BZ88iF1D.js} +33 -33
- package/dist/{collectible.enum-DfcYJIHZ.js → collectible.enum-WsfARC-4.js} +1 -1
- package/dist/{collection.fn-DpBqLV3g.js → collection.fn-Cy0F62x1.js} +2 -2
- package/dist/{dto-C-jQ79kK.js → dto-BNCqoeZK.js} +4 -4
- package/dist/{effect-CDCUUhXo.js → effect-AjfF-F0e.js} +1 -1
- package/dist/{email-addresses-nVDPeXOc.js → email-addresses-DMOOnn4Y.js} +1 -1
- package/dist/{export-4PB9yE3-.js → export-CLQViTxr.js} +3 -3
- package/dist/{helper-CFok4jlL.js → helper-C-Oy7SPo.js} +1 -1
- package/dist/{index-Xp1i5VhW.js → index-3hW0i8hD.js} +1 -1
- package/dist/{index-Bxm_edLl.js → index-BDPSqOec.js} +3 -3
- package/dist/{index-bgb8zcpU.js → index-BO9eQBys.js} +1 -1
- package/dist/{index-BWtnqOVa.js → index-BPFXKJ9C.js} +1 -1
- package/dist/{index-uSQ0M4fs.js → index-BuxxjQT9.js} +1 -1
- package/dist/{index-B2GyUMVm.js → index-C9L5zYNv.js} +2 -2
- package/dist/{index-DJNr7htV.js → index-CD8ZnwlW.js} +1 -1
- package/dist/{index-CSwf6VAv.js → index-CJmaCvR7.js} +3 -3
- package/dist/{index-CUDC28cx.js → index-TQTOGwQ8.js} +1 -1
- package/dist/{index-7zAQK4xv.js → index-e_yYWqMG.js} +6 -6
- package/dist/{index-BkQYicEa.js → index-hbQGWA-A.js} +158 -150
- package/dist/{index-BEG5fVd3.js → index-ykVO83Ws.js} +1 -1
- package/dist/{index.esm2017-CJhzpx3I.js → index.esm2017-D-bCBUYA.js} +1 -1
- package/dist/{loading-BjzXEEK2.js → loading-2mL6IDmC.js} +1 -1
- package/dist/{membership-DZKfe6Vy.js → membership-BuKkThJO.js} +3 -3
- package/dist/{money-Dvua-v2f.js → money-DPsfIPFX.js} +1 -1
- package/dist/{number-uXRc7Y7r.js → number-BESPH7ZF.js} +1 -1
- package/dist/{objectid-BPyDQW4Y.js → objectid-BNtC-yHf.js} +7 -7
- package/dist/{plugins-Dx-cXeq6.js → plugins-D2u2AhY8.js} +1189 -1189
- package/dist/{reward-RIT7Qg25.js → reward-v3FvC9Z6.js} +1 -1
- package/dist/{rule-BZDa5mkt.js → rule-CDqvH0_w.js} +3 -3
- package/dist/{rule-builder-_0m-WeYX.js → rule-builder-CWjPMaRr.js} +1 -1
- package/dist/{template-DZ-PHn-5.js → template-Cby-iQOV.js} +4 -4
- package/dist/{trigger-BS3mVrKO.js → trigger-OWU8DcBY.js} +4 -4
- package/dist/{user-CxNfeTcF.js → user-D2kGQHRe.js} +1 -1
- package/dist/{vue-i18n-BTt_OqCX.js → vue-i18n-CqfLX5K2.js} +242 -242
- package/dist/{xlsx-CDpcgoTa.js → xlsx-8N1gdYuk.js} +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { h as
|
|
3
|
-
import { Z as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { a as
|
|
10
|
-
import { q as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
1
|
+
import { defineComponent as Xe, ref as H, computed as me, onMounted as Ze, resolveComponent as R, openBlock as x, createBlock as fe, withCtx as ne, createElementVNode as w, createVNode as I, unref as c, isRef as We, createElementBlock as q, Fragment as ae, toDisplayString as k, createTextVNode as te, renderList as Ke, createCommentVNode as ce } from "vue";
|
|
2
|
+
import { h as Et } from "./moment-BWErdI6_.js";
|
|
3
|
+
import { Z as Oe } from "./zod-Bg2FbC-D.js";
|
|
4
|
+
import { useDialog as et } from "@feedmepos/ui-library";
|
|
5
|
+
import { u as At } from "./loading-2mL6IDmC.js";
|
|
6
|
+
import { u as Bt } from "./app-wDQR6dpb.js";
|
|
7
|
+
import { u as Se, l as tt } from "./business-BLrpJW1K.js";
|
|
8
|
+
import { u as nt } from "./membership-BuKkThJO.js";
|
|
9
|
+
import { a as ot, p as Mt, f as G } from "./plugins-D2u2AhY8.js";
|
|
10
|
+
import { q as St, h as _t } from "./index-hbQGWA-A.js";
|
|
11
|
+
import { _ as Ye } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
12
|
+
import { _ as It } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DgaOIEAd.js";
|
|
13
|
+
import { M as Pt, _ as Tt } from "./MessageInput.vue_vue_type_script_setup_true_lang-BDvZfmUw.js";
|
|
14
|
+
import { u as Nt } from "./vue-i18n-CqfLX5K2.js";
|
|
15
|
+
import { useCoreStore as Ut } from "@feedmepos/mf-common";
|
|
16
|
+
import { m as je } from "./index-3hW0i8hD.js";
|
|
17
|
+
import { S as Lt } from "./index-CJmaCvR7.js";
|
|
18
|
+
import { o as Ft } from "./objectId-dwaoBfJX.js";
|
|
19
|
+
import { a as Rt } from "./object-qECH92oz.js";
|
|
20
|
+
var ie = {}, Dt = function() {
|
|
20
21
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
21
|
-
},
|
|
22
|
-
let
|
|
23
|
-
const
|
|
22
|
+
}, rt = {}, L = {};
|
|
23
|
+
let Ne;
|
|
24
|
+
const kt = [
|
|
24
25
|
0,
|
|
25
26
|
// Not used
|
|
26
27
|
26,
|
|
@@ -64,32 +65,32 @@ const Ut = [
|
|
|
64
65
|
3532,
|
|
65
66
|
3706
|
|
66
67
|
];
|
|
67
|
-
|
|
68
|
+
L.getSymbolSize = function(e) {
|
|
68
69
|
if (!e) throw new Error('"version" cannot be null or undefined');
|
|
69
70
|
if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
70
71
|
return e * 4 + 17;
|
|
71
72
|
};
|
|
72
|
-
|
|
73
|
-
return
|
|
73
|
+
L.getSymbolTotalCodewords = function(e) {
|
|
74
|
+
return kt[e];
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
L.getBCHDigit = function(t) {
|
|
76
77
|
let e = 0;
|
|
77
78
|
for (; t !== 0; )
|
|
78
79
|
e++, t >>>= 1;
|
|
79
80
|
return e;
|
|
80
81
|
};
|
|
81
|
-
|
|
82
|
+
L.setToSJISFunction = function(e) {
|
|
82
83
|
if (typeof e != "function")
|
|
83
84
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
84
|
-
|
|
85
|
+
Ne = e;
|
|
85
86
|
};
|
|
86
|
-
|
|
87
|
-
return typeof
|
|
87
|
+
L.isKanjiModeEnabled = function() {
|
|
88
|
+
return typeof Ne < "u";
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
-
return
|
|
90
|
+
L.toSJIS = function(e) {
|
|
91
|
+
return Ne(e);
|
|
91
92
|
};
|
|
92
|
-
var
|
|
93
|
+
var pe = {};
|
|
93
94
|
(function(t) {
|
|
94
95
|
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
95
96
|
function e(i) {
|
|
@@ -123,11 +124,11 @@ var me = {};
|
|
|
123
124
|
return o;
|
|
124
125
|
}
|
|
125
126
|
};
|
|
126
|
-
})(
|
|
127
|
-
function
|
|
127
|
+
})(pe);
|
|
128
|
+
function it() {
|
|
128
129
|
this.buffer = [], this.length = 0;
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
+
it.prototype = {
|
|
131
132
|
get: function(t) {
|
|
132
133
|
const e = Math.floor(t / 8);
|
|
133
134
|
return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
|
|
@@ -144,58 +145,58 @@ nt.prototype = {
|
|
|
144
145
|
this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
|
|
145
146
|
}
|
|
146
147
|
};
|
|
147
|
-
var
|
|
148
|
-
function
|
|
148
|
+
var Vt = it;
|
|
149
|
+
function se(t) {
|
|
149
150
|
if (!t || t < 1)
|
|
150
151
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
151
152
|
this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
|
|
152
153
|
}
|
|
153
|
-
|
|
154
|
+
se.prototype.set = function(t, e, i, r) {
|
|
154
155
|
const o = t * this.size + e;
|
|
155
156
|
this.data[o] = i, r && (this.reservedBit[o] = !0);
|
|
156
157
|
};
|
|
157
|
-
|
|
158
|
+
se.prototype.get = function(t, e) {
|
|
158
159
|
return this.data[t * this.size + e];
|
|
159
160
|
};
|
|
160
|
-
|
|
161
|
+
se.prototype.xor = function(t, e, i) {
|
|
161
162
|
this.data[t * this.size + e] ^= i;
|
|
162
163
|
};
|
|
163
|
-
|
|
164
|
+
se.prototype.isReserved = function(t, e) {
|
|
164
165
|
return this.reservedBit[t * this.size + e];
|
|
165
166
|
};
|
|
166
|
-
var
|
|
167
|
+
var xt = se, st = {};
|
|
167
168
|
(function(t) {
|
|
168
|
-
const e =
|
|
169
|
+
const e = L.getSymbolSize;
|
|
169
170
|
t.getRowColCoords = function(r) {
|
|
170
171
|
if (r === 1) return [];
|
|
171
|
-
const o = Math.floor(r / 7) + 2, n = e(r), l = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2,
|
|
172
|
-
for (let
|
|
173
|
-
s
|
|
174
|
-
return
|
|
172
|
+
const o = Math.floor(r / 7) + 2, n = e(r), l = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, a = [n - 7];
|
|
173
|
+
for (let s = 1; s < o - 1; s++)
|
|
174
|
+
a[s] = a[s - 1] - l;
|
|
175
|
+
return a.push(6), a.reverse();
|
|
175
176
|
}, t.getPositions = function(r) {
|
|
176
177
|
const o = [], n = t.getRowColCoords(r), l = n.length;
|
|
177
|
-
for (let
|
|
178
|
-
for (let
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
for (let a = 0; a < l; a++)
|
|
179
|
+
for (let s = 0; s < l; s++)
|
|
180
|
+
a === 0 && s === 0 || // top-left
|
|
181
|
+
a === 0 && s === l - 1 || // bottom-left
|
|
182
|
+
a === l - 1 && s === 0 || o.push([n[a], n[s]]);
|
|
182
183
|
return o;
|
|
183
184
|
};
|
|
184
|
-
})(
|
|
185
|
-
var
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
const i =
|
|
185
|
+
})(st);
|
|
186
|
+
var lt = {};
|
|
187
|
+
const $t = L.getSymbolSize, Je = 7;
|
|
188
|
+
lt.getPositions = function(e) {
|
|
189
|
+
const i = $t(e);
|
|
189
190
|
return [
|
|
190
191
|
// top-left
|
|
191
192
|
[0, 0],
|
|
192
193
|
// top-right
|
|
193
|
-
[i -
|
|
194
|
+
[i - Je, 0],
|
|
194
195
|
// bottom-left
|
|
195
|
-
[0, i -
|
|
196
|
+
[0, i - Je]
|
|
196
197
|
];
|
|
197
198
|
};
|
|
198
|
-
var
|
|
199
|
+
var at = {};
|
|
199
200
|
(function(t) {
|
|
200
201
|
t.Patterns = {
|
|
201
202
|
PATTERN000: 0,
|
|
@@ -219,38 +220,38 @@ var it = {};
|
|
|
219
220
|
return t.isValid(o) ? parseInt(o, 10) : void 0;
|
|
220
221
|
}, t.getPenaltyN1 = function(o) {
|
|
221
222
|
const n = o.size;
|
|
222
|
-
let l = 0,
|
|
223
|
+
let l = 0, a = 0, s = 0, f = null, m = null;
|
|
223
224
|
for (let B = 0; B < n; B++) {
|
|
224
|
-
|
|
225
|
+
a = s = 0, f = m = null;
|
|
225
226
|
for (let g = 0; g < n; g++) {
|
|
226
227
|
let d = o.get(B, g);
|
|
227
|
-
d === f ?
|
|
228
|
+
d === f ? a++ : (a >= 5 && (l += e.N1 + (a - 5)), f = d, a = 1), d = o.get(g, B), d === m ? s++ : (s >= 5 && (l += e.N1 + (s - 5)), m = d, s = 1);
|
|
228
229
|
}
|
|
229
|
-
|
|
230
|
+
a >= 5 && (l += e.N1 + (a - 5)), s >= 5 && (l += e.N1 + (s - 5));
|
|
230
231
|
}
|
|
231
232
|
return l;
|
|
232
233
|
}, t.getPenaltyN2 = function(o) {
|
|
233
234
|
const n = o.size;
|
|
234
235
|
let l = 0;
|
|
235
|
-
for (let
|
|
236
|
-
for (let
|
|
237
|
-
const f = o.get(
|
|
236
|
+
for (let a = 0; a < n - 1; a++)
|
|
237
|
+
for (let s = 0; s < n - 1; s++) {
|
|
238
|
+
const f = o.get(a, s) + o.get(a, s + 1) + o.get(a + 1, s) + o.get(a + 1, s + 1);
|
|
238
239
|
(f === 4 || f === 0) && l++;
|
|
239
240
|
}
|
|
240
241
|
return l * e.N2;
|
|
241
242
|
}, t.getPenaltyN3 = function(o) {
|
|
242
243
|
const n = o.size;
|
|
243
|
-
let l = 0,
|
|
244
|
+
let l = 0, a = 0, s = 0;
|
|
244
245
|
for (let f = 0; f < n; f++) {
|
|
245
|
-
|
|
246
|
+
a = s = 0;
|
|
246
247
|
for (let m = 0; m < n; m++)
|
|
247
|
-
|
|
248
|
+
a = a << 1 & 2047 | o.get(f, m), m >= 10 && (a === 1488 || a === 93) && l++, s = s << 1 & 2047 | o.get(m, f), m >= 10 && (s === 1488 || s === 93) && l++;
|
|
248
249
|
}
|
|
249
250
|
return l * e.N3;
|
|
250
251
|
}, t.getPenaltyN4 = function(o) {
|
|
251
252
|
let n = 0;
|
|
252
253
|
const l = o.data.length;
|
|
253
|
-
for (let
|
|
254
|
+
for (let s = 0; s < l; s++) n += o.data[s];
|
|
254
255
|
return Math.abs(Math.ceil(n * 100 / l / 5) - 10) * e.N4;
|
|
255
256
|
};
|
|
256
257
|
function i(r, o, n) {
|
|
@@ -277,22 +278,22 @@ var it = {};
|
|
|
277
278
|
}
|
|
278
279
|
t.applyMask = function(o, n) {
|
|
279
280
|
const l = n.size;
|
|
280
|
-
for (let
|
|
281
|
-
for (let
|
|
282
|
-
n.isReserved(
|
|
281
|
+
for (let a = 0; a < l; a++)
|
|
282
|
+
for (let s = 0; s < l; s++)
|
|
283
|
+
n.isReserved(s, a) || n.xor(s, a, i(o, s, a));
|
|
283
284
|
}, t.getBestMask = function(o, n) {
|
|
284
285
|
const l = Object.keys(t.Patterns).length;
|
|
285
|
-
let
|
|
286
|
+
let a = 0, s = 1 / 0;
|
|
286
287
|
for (let f = 0; f < l; f++) {
|
|
287
288
|
n(f), t.applyMask(f, o);
|
|
288
289
|
const m = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
|
|
289
|
-
t.applyMask(f, o), m <
|
|
290
|
+
t.applyMask(f, o), m < s && (s = m, a = f);
|
|
290
291
|
}
|
|
291
|
-
return
|
|
292
|
+
return a;
|
|
292
293
|
};
|
|
293
|
-
})(
|
|
294
|
-
var
|
|
295
|
-
const
|
|
294
|
+
})(at);
|
|
295
|
+
var ye = {};
|
|
296
|
+
const O = pe, ue = [
|
|
296
297
|
// L M Q H
|
|
297
298
|
1,
|
|
298
299
|
1,
|
|
@@ -454,7 +455,7 @@ const H = me, le = [
|
|
|
454
455
|
49,
|
|
455
456
|
68,
|
|
456
457
|
81
|
|
457
|
-
],
|
|
458
|
+
], de = [
|
|
458
459
|
// L M Q H
|
|
459
460
|
7,
|
|
460
461
|
10,
|
|
@@ -617,70 +618,70 @@ const H = me, le = [
|
|
|
617
618
|
2040,
|
|
618
619
|
2430
|
|
619
620
|
];
|
|
620
|
-
|
|
621
|
+
ye.getBlocksCount = function(e, i) {
|
|
621
622
|
switch (i) {
|
|
622
|
-
case
|
|
623
|
-
return
|
|
624
|
-
case
|
|
625
|
-
return
|
|
626
|
-
case
|
|
627
|
-
return
|
|
628
|
-
case
|
|
629
|
-
return
|
|
623
|
+
case O.L:
|
|
624
|
+
return ue[(e - 1) * 4 + 0];
|
|
625
|
+
case O.M:
|
|
626
|
+
return ue[(e - 1) * 4 + 1];
|
|
627
|
+
case O.Q:
|
|
628
|
+
return ue[(e - 1) * 4 + 2];
|
|
629
|
+
case O.H:
|
|
630
|
+
return ue[(e - 1) * 4 + 3];
|
|
630
631
|
default:
|
|
631
632
|
return;
|
|
632
633
|
}
|
|
633
634
|
};
|
|
634
|
-
|
|
635
|
+
ye.getTotalCodewordsCount = function(e, i) {
|
|
635
636
|
switch (i) {
|
|
636
|
-
case
|
|
637
|
-
return
|
|
638
|
-
case
|
|
639
|
-
return
|
|
640
|
-
case
|
|
641
|
-
return
|
|
642
|
-
case
|
|
643
|
-
return
|
|
637
|
+
case O.L:
|
|
638
|
+
return de[(e - 1) * 4 + 0];
|
|
639
|
+
case O.M:
|
|
640
|
+
return de[(e - 1) * 4 + 1];
|
|
641
|
+
case O.Q:
|
|
642
|
+
return de[(e - 1) * 4 + 2];
|
|
643
|
+
case O.H:
|
|
644
|
+
return de[(e - 1) * 4 + 3];
|
|
644
645
|
default:
|
|
645
646
|
return;
|
|
646
647
|
}
|
|
647
648
|
};
|
|
648
|
-
var
|
|
649
|
-
const
|
|
649
|
+
var ct = {}, we = {};
|
|
650
|
+
const oe = new Uint8Array(512), ge = new Uint8Array(256);
|
|
650
651
|
(function() {
|
|
651
652
|
let e = 1;
|
|
652
653
|
for (let i = 0; i < 255; i++)
|
|
653
|
-
|
|
654
|
+
oe[i] = e, ge[e] = i, e <<= 1, e & 256 && (e ^= 285);
|
|
654
655
|
for (let i = 255; i < 512; i++)
|
|
655
|
-
|
|
656
|
+
oe[i] = oe[i - 255];
|
|
656
657
|
})();
|
|
657
|
-
|
|
658
|
+
we.log = function(e) {
|
|
658
659
|
if (e < 1) throw new Error("log(" + e + ")");
|
|
659
|
-
return
|
|
660
|
+
return ge[e];
|
|
660
661
|
};
|
|
661
|
-
|
|
662
|
-
return
|
|
662
|
+
we.exp = function(e) {
|
|
663
|
+
return oe[e];
|
|
663
664
|
};
|
|
664
|
-
|
|
665
|
-
return e === 0 || i === 0 ? 0 :
|
|
665
|
+
we.mul = function(e, i) {
|
|
666
|
+
return e === 0 || i === 0 ? 0 : oe[ge[e] + ge[i]];
|
|
666
667
|
};
|
|
667
668
|
(function(t) {
|
|
668
|
-
const e =
|
|
669
|
+
const e = we;
|
|
669
670
|
t.mul = function(r, o) {
|
|
670
671
|
const n = new Uint8Array(r.length + o.length - 1);
|
|
671
672
|
for (let l = 0; l < r.length; l++)
|
|
672
|
-
for (let
|
|
673
|
-
n[l +
|
|
673
|
+
for (let a = 0; a < o.length; a++)
|
|
674
|
+
n[l + a] ^= e.mul(r[l], o[a]);
|
|
674
675
|
return n;
|
|
675
676
|
}, t.mod = function(r, o) {
|
|
676
677
|
let n = new Uint8Array(r);
|
|
677
678
|
for (; n.length - o.length >= 0; ) {
|
|
678
679
|
const l = n[0];
|
|
679
|
-
for (let
|
|
680
|
-
n[
|
|
681
|
-
let
|
|
682
|
-
for (;
|
|
683
|
-
n = n.slice(
|
|
680
|
+
for (let s = 0; s < o.length; s++)
|
|
681
|
+
n[s] ^= e.mul(o[s], l);
|
|
682
|
+
let a = 0;
|
|
683
|
+
for (; a < n.length && n[a] === 0; ) a++;
|
|
684
|
+
n = n.slice(a);
|
|
684
685
|
}
|
|
685
686
|
return n;
|
|
686
687
|
}, t.generateECPolynomial = function(r) {
|
|
@@ -689,53 +690,53 @@ he.mul = function(e, i) {
|
|
|
689
690
|
o = t.mul(o, new Uint8Array([1, e.exp(n)]));
|
|
690
691
|
return o;
|
|
691
692
|
};
|
|
692
|
-
})(
|
|
693
|
-
const
|
|
694
|
-
function
|
|
693
|
+
})(ct);
|
|
694
|
+
const ut = ct;
|
|
695
|
+
function Ue(t) {
|
|
695
696
|
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
696
697
|
}
|
|
697
|
-
|
|
698
|
-
this.degree = e, this.genPoly =
|
|
698
|
+
Ue.prototype.initialize = function(e) {
|
|
699
|
+
this.degree = e, this.genPoly = ut.generateECPolynomial(this.degree);
|
|
699
700
|
};
|
|
700
|
-
|
|
701
|
+
Ue.prototype.encode = function(e) {
|
|
701
702
|
if (!this.genPoly)
|
|
702
703
|
throw new Error("Encoder not initialized");
|
|
703
704
|
const i = new Uint8Array(e.length + this.degree);
|
|
704
705
|
i.set(e);
|
|
705
|
-
const r =
|
|
706
|
+
const r = ut.mod(i, this.genPoly), o = this.degree - r.length;
|
|
706
707
|
if (o > 0) {
|
|
707
708
|
const n = new Uint8Array(this.degree);
|
|
708
709
|
return n.set(r, o), n;
|
|
709
710
|
}
|
|
710
711
|
return r;
|
|
711
712
|
};
|
|
712
|
-
var
|
|
713
|
-
|
|
713
|
+
var zt = Ue, dt = {}, Y = {}, Le = {};
|
|
714
|
+
Le.isValid = function(e) {
|
|
714
715
|
return !isNaN(e) && e >= 1 && e <= 40;
|
|
715
716
|
};
|
|
716
717
|
var $ = {};
|
|
717
|
-
const
|
|
718
|
-
let
|
|
719
|
-
|
|
720
|
-
const
|
|
718
|
+
const ft = "[0-9]+", Ht = "[A-Z $%*+\\-./:]+";
|
|
719
|
+
let re = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
720
|
+
re = re.replace(/u/g, "\\u");
|
|
721
|
+
const Kt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + re + `)(?:.|[\r
|
|
721
722
|
]))+`;
|
|
722
|
-
$.KANJI = new RegExp(
|
|
723
|
+
$.KANJI = new RegExp(re, "g");
|
|
723
724
|
$.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
724
|
-
$.BYTE = new RegExp(
|
|
725
|
-
$.NUMERIC = new RegExp(
|
|
726
|
-
$.ALPHANUMERIC = new RegExp(
|
|
727
|
-
const
|
|
725
|
+
$.BYTE = new RegExp(Kt, "g");
|
|
726
|
+
$.NUMERIC = new RegExp(ft, "g");
|
|
727
|
+
$.ALPHANUMERIC = new RegExp(Ht, "g");
|
|
728
|
+
const Ot = new RegExp("^" + re + "$"), Yt = new RegExp("^" + ft + "$"), jt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
728
729
|
$.testKanji = function(e) {
|
|
729
|
-
return
|
|
730
|
+
return Ot.test(e);
|
|
730
731
|
};
|
|
731
732
|
$.testNumeric = function(e) {
|
|
732
|
-
return
|
|
733
|
+
return Yt.test(e);
|
|
733
734
|
};
|
|
734
735
|
$.testAlphanumeric = function(e) {
|
|
735
|
-
return
|
|
736
|
+
return jt.test(e);
|
|
736
737
|
};
|
|
737
738
|
(function(t) {
|
|
738
|
-
const e =
|
|
739
|
+
const e = Le, i = $;
|
|
739
740
|
t.NUMERIC = {
|
|
740
741
|
id: "Numeric",
|
|
741
742
|
bit: 1,
|
|
@@ -792,10 +793,10 @@ $.testAlphanumeric = function(e) {
|
|
|
792
793
|
return l;
|
|
793
794
|
}
|
|
794
795
|
};
|
|
795
|
-
})(
|
|
796
|
+
})(Y);
|
|
796
797
|
(function(t) {
|
|
797
|
-
const e =
|
|
798
|
-
function
|
|
798
|
+
const e = L, i = ye, r = pe, o = Y, n = Le, l = 7973, a = e.getBCHDigit(l);
|
|
799
|
+
function s(g, d, v) {
|
|
799
800
|
for (let C = 1; C <= 40; C++)
|
|
800
801
|
if (d <= t.getCapacity(C, v, g))
|
|
801
802
|
return C;
|
|
@@ -806,8 +807,8 @@ $.testAlphanumeric = function(e) {
|
|
|
806
807
|
function m(g, d) {
|
|
807
808
|
let v = 0;
|
|
808
809
|
return g.forEach(function(C) {
|
|
809
|
-
const
|
|
810
|
-
v +=
|
|
810
|
+
const S = f(C.mode, d);
|
|
811
|
+
v += S + C.getBitsLength();
|
|
811
812
|
}), v;
|
|
812
813
|
}
|
|
813
814
|
function B(g, d) {
|
|
@@ -821,73 +822,73 @@ $.testAlphanumeric = function(e) {
|
|
|
821
822
|
if (!n.isValid(d))
|
|
822
823
|
throw new Error("Invalid QR Code version");
|
|
823
824
|
typeof C > "u" && (C = o.BYTE);
|
|
824
|
-
const
|
|
825
|
-
if (C === o.MIXED) return
|
|
826
|
-
const
|
|
825
|
+
const S = e.getSymbolTotalCodewords(d), p = i.getTotalCodewordsCount(d, v), b = (S - p) * 8;
|
|
826
|
+
if (C === o.MIXED) return b;
|
|
827
|
+
const h = b - f(C, d);
|
|
827
828
|
switch (C) {
|
|
828
829
|
case o.NUMERIC:
|
|
829
|
-
return Math.floor(
|
|
830
|
+
return Math.floor(h / 10 * 3);
|
|
830
831
|
case o.ALPHANUMERIC:
|
|
831
|
-
return Math.floor(
|
|
832
|
+
return Math.floor(h / 11 * 2);
|
|
832
833
|
case o.KANJI:
|
|
833
|
-
return Math.floor(
|
|
834
|
+
return Math.floor(h / 13);
|
|
834
835
|
case o.BYTE:
|
|
835
836
|
default:
|
|
836
|
-
return Math.floor(
|
|
837
|
+
return Math.floor(h / 8);
|
|
837
838
|
}
|
|
838
839
|
}, t.getBestVersionForData = function(d, v) {
|
|
839
840
|
let C;
|
|
840
|
-
const
|
|
841
|
+
const S = r.from(v, r.M);
|
|
841
842
|
if (Array.isArray(d)) {
|
|
842
843
|
if (d.length > 1)
|
|
843
|
-
return B(d,
|
|
844
|
+
return B(d, S);
|
|
844
845
|
if (d.length === 0)
|
|
845
846
|
return 1;
|
|
846
847
|
C = d[0];
|
|
847
848
|
} else
|
|
848
849
|
C = d;
|
|
849
|
-
return
|
|
850
|
+
return s(C.mode, C.getLength(), S);
|
|
850
851
|
}, t.getEncodedBits = function(d) {
|
|
851
852
|
if (!n.isValid(d) || d < 7)
|
|
852
853
|
throw new Error("Invalid QR Code version");
|
|
853
854
|
let v = d << 12;
|
|
854
|
-
for (; e.getBCHDigit(v) -
|
|
855
|
-
v ^= l << e.getBCHDigit(v) -
|
|
855
|
+
for (; e.getBCHDigit(v) - a >= 0; )
|
|
856
|
+
v ^= l << e.getBCHDigit(v) - a;
|
|
856
857
|
return d << 12 | v;
|
|
857
858
|
};
|
|
858
|
-
})(
|
|
859
|
-
var
|
|
860
|
-
const
|
|
861
|
-
|
|
859
|
+
})(dt);
|
|
860
|
+
var mt = {};
|
|
861
|
+
const _e = L, gt = 1335, Jt = 21522, qe = _e.getBCHDigit(gt);
|
|
862
|
+
mt.getEncodedBits = function(e, i) {
|
|
862
863
|
const r = e.bit << 3 | i;
|
|
863
864
|
let o = r << 10;
|
|
864
|
-
for (;
|
|
865
|
-
o ^=
|
|
866
|
-
return (r << 10 | o) ^
|
|
865
|
+
for (; _e.getBCHDigit(o) - qe >= 0; )
|
|
866
|
+
o ^= gt << _e.getBCHDigit(o) - qe;
|
|
867
|
+
return (r << 10 | o) ^ Jt;
|
|
867
868
|
};
|
|
868
|
-
var
|
|
869
|
-
const
|
|
870
|
-
function
|
|
871
|
-
this.mode =
|
|
869
|
+
var ht = {};
|
|
870
|
+
const qt = Y;
|
|
871
|
+
function Q(t) {
|
|
872
|
+
this.mode = qt.NUMERIC, this.data = t.toString();
|
|
872
873
|
}
|
|
873
|
-
|
|
874
|
+
Q.getBitsLength = function(e) {
|
|
874
875
|
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
875
876
|
};
|
|
876
|
-
|
|
877
|
+
Q.prototype.getLength = function() {
|
|
877
878
|
return this.data.length;
|
|
878
879
|
};
|
|
879
|
-
|
|
880
|
-
return
|
|
880
|
+
Q.prototype.getBitsLength = function() {
|
|
881
|
+
return Q.getBitsLength(this.data.length);
|
|
881
882
|
};
|
|
882
|
-
|
|
883
|
+
Q.prototype.write = function(e) {
|
|
883
884
|
let i, r, o;
|
|
884
885
|
for (i = 0; i + 3 <= this.data.length; i += 3)
|
|
885
886
|
r = this.data.substr(i, 3), o = parseInt(r, 10), e.put(o, 10);
|
|
886
887
|
const n = this.data.length - i;
|
|
887
888
|
n > 0 && (r = this.data.substr(i), o = parseInt(r, 10), e.put(o, n * 3 + 1));
|
|
888
889
|
};
|
|
889
|
-
var
|
|
890
|
-
const
|
|
890
|
+
var Gt = Q;
|
|
891
|
+
const Qt = Y, Ce = [
|
|
891
892
|
"0",
|
|
892
893
|
"1",
|
|
893
894
|
"2",
|
|
@@ -934,27 +935,27 @@ const Yt = K, we = [
|
|
|
934
935
|
"/",
|
|
935
936
|
":"
|
|
936
937
|
];
|
|
937
|
-
function
|
|
938
|
-
this.mode =
|
|
938
|
+
function X(t) {
|
|
939
|
+
this.mode = Qt.ALPHANUMERIC, this.data = t;
|
|
939
940
|
}
|
|
940
|
-
|
|
941
|
+
X.getBitsLength = function(e) {
|
|
941
942
|
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
942
943
|
};
|
|
943
|
-
|
|
944
|
+
X.prototype.getLength = function() {
|
|
944
945
|
return this.data.length;
|
|
945
946
|
};
|
|
946
|
-
|
|
947
|
-
return
|
|
947
|
+
X.prototype.getBitsLength = function() {
|
|
948
|
+
return X.getBitsLength(this.data.length);
|
|
948
949
|
};
|
|
949
|
-
|
|
950
|
+
X.prototype.write = function(e) {
|
|
950
951
|
let i;
|
|
951
952
|
for (i = 0; i + 2 <= this.data.length; i += 2) {
|
|
952
|
-
let r =
|
|
953
|
-
r +=
|
|
953
|
+
let r = Ce.indexOf(this.data[i]) * 45;
|
|
954
|
+
r += Ce.indexOf(this.data[i + 1]), e.put(r, 11);
|
|
954
955
|
}
|
|
955
|
-
this.data.length % 2 && e.put(
|
|
956
|
+
this.data.length % 2 && e.put(Ce.indexOf(this.data[i]), 6);
|
|
956
957
|
};
|
|
957
|
-
var
|
|
958
|
+
var Xt = X, Zt = function(e) {
|
|
958
959
|
for (var i = [], r = e.length, o = 0; o < r; o++) {
|
|
959
960
|
var n = e.charCodeAt(o);
|
|
960
961
|
if (n >= 55296 && n <= 56319 && r > o + 1) {
|
|
@@ -981,41 +982,41 @@ var jt = q, Jt = function(e) {
|
|
|
981
982
|
}
|
|
982
983
|
return new Uint8Array(i).buffer;
|
|
983
984
|
};
|
|
984
|
-
const
|
|
985
|
-
function
|
|
986
|
-
this.mode =
|
|
985
|
+
const Wt = Zt, en = Y;
|
|
986
|
+
function Z(t) {
|
|
987
|
+
this.mode = en.BYTE, typeof t == "string" && (t = Wt(t)), this.data = new Uint8Array(t);
|
|
987
988
|
}
|
|
988
|
-
|
|
989
|
+
Z.getBitsLength = function(e) {
|
|
989
990
|
return e * 8;
|
|
990
991
|
};
|
|
991
|
-
|
|
992
|
+
Z.prototype.getLength = function() {
|
|
992
993
|
return this.data.length;
|
|
993
994
|
};
|
|
994
|
-
|
|
995
|
-
return
|
|
995
|
+
Z.prototype.getBitsLength = function() {
|
|
996
|
+
return Z.getBitsLength(this.data.length);
|
|
996
997
|
};
|
|
997
|
-
|
|
998
|
+
Z.prototype.write = function(t) {
|
|
998
999
|
for (let e = 0, i = this.data.length; e < i; e++)
|
|
999
1000
|
t.put(this.data[e], 8);
|
|
1000
1001
|
};
|
|
1001
|
-
var
|
|
1002
|
-
const
|
|
1003
|
-
function
|
|
1004
|
-
this.mode =
|
|
1002
|
+
var tn = Z;
|
|
1003
|
+
const nn = Y, on = L;
|
|
1004
|
+
function W(t) {
|
|
1005
|
+
this.mode = nn.KANJI, this.data = t;
|
|
1005
1006
|
}
|
|
1006
|
-
|
|
1007
|
+
W.getBitsLength = function(e) {
|
|
1007
1008
|
return e * 13;
|
|
1008
1009
|
};
|
|
1009
|
-
|
|
1010
|
+
W.prototype.getLength = function() {
|
|
1010
1011
|
return this.data.length;
|
|
1011
1012
|
};
|
|
1012
|
-
|
|
1013
|
-
return
|
|
1013
|
+
W.prototype.getBitsLength = function() {
|
|
1014
|
+
return W.getBitsLength(this.data.length);
|
|
1014
1015
|
};
|
|
1015
|
-
|
|
1016
|
+
W.prototype.write = function(t) {
|
|
1016
1017
|
let e;
|
|
1017
1018
|
for (e = 0; e < this.data.length; e++) {
|
|
1018
|
-
let i =
|
|
1019
|
+
let i = on.toSJIS(this.data[e]);
|
|
1019
1020
|
if (i >= 33088 && i <= 40956)
|
|
1020
1021
|
i -= 33088;
|
|
1021
1022
|
else if (i >= 57408 && i <= 60351)
|
|
@@ -1028,18 +1029,18 @@ Make sure your charset is UTF-8`
|
|
|
1028
1029
|
i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
|
|
1029
1030
|
}
|
|
1030
1031
|
};
|
|
1031
|
-
var
|
|
1032
|
+
var rn = W, pt = { exports: {} };
|
|
1032
1033
|
(function(t) {
|
|
1033
1034
|
var e = {
|
|
1034
1035
|
single_source_shortest_paths: function(i, r, o) {
|
|
1035
1036
|
var n = {}, l = {};
|
|
1036
1037
|
l[r] = 0;
|
|
1037
|
-
var
|
|
1038
|
-
|
|
1039
|
-
for (var
|
|
1040
|
-
|
|
1038
|
+
var a = e.PriorityQueue.make();
|
|
1039
|
+
a.push(r, 0);
|
|
1040
|
+
for (var s, f, m, B, g, d, v, C, S; !a.empty(); ) {
|
|
1041
|
+
s = a.pop(), f = s.value, B = s.cost, g = i[f] || {};
|
|
1041
1042
|
for (m in g)
|
|
1042
|
-
g.hasOwnProperty(m) && (d = g[m], v = B + d, C = l[m],
|
|
1043
|
+
g.hasOwnProperty(m) && (d = g[m], v = B + d, C = l[m], S = typeof l[m] > "u", (S || C > v) && (l[m] = v, a.push(m, v), n[m] = f));
|
|
1043
1044
|
}
|
|
1044
1045
|
if (typeof o < "u" && typeof l[o] > "u") {
|
|
1045
1046
|
var p = ["Could not find a path from ", r, " to ", o, "."].join("");
|
|
@@ -1093,30 +1094,30 @@ var Wt = Q, mt = { exports: {} };
|
|
|
1093
1094
|
}
|
|
1094
1095
|
};
|
|
1095
1096
|
t.exports = e;
|
|
1096
|
-
})(
|
|
1097
|
-
var
|
|
1097
|
+
})(pt);
|
|
1098
|
+
var sn = pt.exports;
|
|
1098
1099
|
(function(t) {
|
|
1099
|
-
const e =
|
|
1100
|
+
const e = Y, i = Gt, r = Xt, o = tn, n = rn, l = $, a = L, s = sn;
|
|
1100
1101
|
function f(p) {
|
|
1101
1102
|
return unescape(encodeURIComponent(p)).length;
|
|
1102
1103
|
}
|
|
1103
|
-
function m(p,
|
|
1104
|
+
function m(p, b, h) {
|
|
1104
1105
|
const y = [];
|
|
1105
|
-
let
|
|
1106
|
-
for (; (
|
|
1106
|
+
let M;
|
|
1107
|
+
for (; (M = p.exec(h)) !== null; )
|
|
1107
1108
|
y.push({
|
|
1108
|
-
data:
|
|
1109
|
-
index:
|
|
1110
|
-
mode:
|
|
1111
|
-
length:
|
|
1109
|
+
data: M[0],
|
|
1110
|
+
index: M.index,
|
|
1111
|
+
mode: b,
|
|
1112
|
+
length: M[0].length
|
|
1112
1113
|
});
|
|
1113
1114
|
return y;
|
|
1114
1115
|
}
|
|
1115
1116
|
function B(p) {
|
|
1116
|
-
const
|
|
1117
|
-
let y,
|
|
1118
|
-
return
|
|
1119
|
-
return P.index -
|
|
1117
|
+
const b = m(l.NUMERIC, e.NUMERIC, p), h = m(l.ALPHANUMERIC, e.ALPHANUMERIC, p);
|
|
1118
|
+
let y, M;
|
|
1119
|
+
return a.isKanjiModeEnabled() ? (y = m(l.BYTE, e.BYTE, p), M = m(l.KANJI, e.KANJI, p)) : (y = m(l.BYTE_KANJI, e.BYTE, p), M = []), b.concat(h, y, M).sort(function(P, U) {
|
|
1120
|
+
return P.index - U.index;
|
|
1120
1121
|
}).map(function(P) {
|
|
1121
1122
|
return {
|
|
1122
1123
|
data: P.data,
|
|
@@ -1125,8 +1126,8 @@ var en = mt.exports;
|
|
|
1125
1126
|
};
|
|
1126
1127
|
});
|
|
1127
1128
|
}
|
|
1128
|
-
function g(p,
|
|
1129
|
-
switch (
|
|
1129
|
+
function g(p, b) {
|
|
1130
|
+
switch (b) {
|
|
1130
1131
|
case e.NUMERIC:
|
|
1131
1132
|
return i.getBitsLength(p);
|
|
1132
1133
|
case e.ALPHANUMERIC:
|
|
@@ -1138,69 +1139,69 @@ var en = mt.exports;
|
|
|
1138
1139
|
}
|
|
1139
1140
|
}
|
|
1140
1141
|
function d(p) {
|
|
1141
|
-
return p.reduce(function(
|
|
1142
|
-
const y =
|
|
1143
|
-
return y && y.mode ===
|
|
1142
|
+
return p.reduce(function(b, h) {
|
|
1143
|
+
const y = b.length - 1 >= 0 ? b[b.length - 1] : null;
|
|
1144
|
+
return y && y.mode === h.mode ? (b[b.length - 1].data += h.data, b) : (b.push(h), b);
|
|
1144
1145
|
}, []);
|
|
1145
1146
|
}
|
|
1146
1147
|
function v(p) {
|
|
1147
|
-
const
|
|
1148
|
-
for (let
|
|
1149
|
-
const y = p[
|
|
1148
|
+
const b = [];
|
|
1149
|
+
for (let h = 0; h < p.length; h++) {
|
|
1150
|
+
const y = p[h];
|
|
1150
1151
|
switch (y.mode) {
|
|
1151
1152
|
case e.NUMERIC:
|
|
1152
|
-
|
|
1153
|
+
b.push([
|
|
1153
1154
|
y,
|
|
1154
1155
|
{ data: y.data, mode: e.ALPHANUMERIC, length: y.length },
|
|
1155
1156
|
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1156
1157
|
]);
|
|
1157
1158
|
break;
|
|
1158
1159
|
case e.ALPHANUMERIC:
|
|
1159
|
-
|
|
1160
|
+
b.push([
|
|
1160
1161
|
y,
|
|
1161
1162
|
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1162
1163
|
]);
|
|
1163
1164
|
break;
|
|
1164
1165
|
case e.KANJI:
|
|
1165
|
-
|
|
1166
|
+
b.push([
|
|
1166
1167
|
y,
|
|
1167
1168
|
{ data: y.data, mode: e.BYTE, length: f(y.data) }
|
|
1168
1169
|
]);
|
|
1169
1170
|
break;
|
|
1170
1171
|
case e.BYTE:
|
|
1171
|
-
|
|
1172
|
+
b.push([
|
|
1172
1173
|
{ data: y.data, mode: e.BYTE, length: f(y.data) }
|
|
1173
1174
|
]);
|
|
1174
1175
|
}
|
|
1175
1176
|
}
|
|
1176
|
-
return
|
|
1177
|
+
return b;
|
|
1177
1178
|
}
|
|
1178
|
-
function C(p,
|
|
1179
|
-
const
|
|
1180
|
-
let
|
|
1181
|
-
for (let
|
|
1182
|
-
const P = p[
|
|
1183
|
-
for (let
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1186
|
-
for (let
|
|
1187
|
-
const N =
|
|
1188
|
-
|
|
1179
|
+
function C(p, b) {
|
|
1180
|
+
const h = {}, y = { start: {} };
|
|
1181
|
+
let M = ["start"];
|
|
1182
|
+
for (let _ = 0; _ < p.length; _++) {
|
|
1183
|
+
const P = p[_], U = [];
|
|
1184
|
+
for (let V = 0; V < P.length; V++) {
|
|
1185
|
+
const F = P[V], A = "" + _ + V;
|
|
1186
|
+
U.push(A), h[A] = { node: F, lastCount: 0 }, y[A] = {};
|
|
1187
|
+
for (let u = 0; u < M.length; u++) {
|
|
1188
|
+
const N = M[u];
|
|
1189
|
+
h[N] && h[N].node.mode === F.mode ? (y[N][A] = g(h[N].lastCount + F.length, F.mode) - g(h[N].lastCount, F.mode), h[N].lastCount += F.length) : (h[N] && (h[N].lastCount = F.length), y[N][A] = g(F.length, F.mode) + 4 + e.getCharCountIndicator(F.mode, b));
|
|
1189
1190
|
}
|
|
1190
1191
|
}
|
|
1191
|
-
|
|
1192
|
+
M = U;
|
|
1192
1193
|
}
|
|
1193
|
-
for (let
|
|
1194
|
-
y[_
|
|
1195
|
-
return { map: y, table:
|
|
1194
|
+
for (let _ = 0; _ < M.length; _++)
|
|
1195
|
+
y[M[_]].end = 0;
|
|
1196
|
+
return { map: y, table: h };
|
|
1196
1197
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let
|
|
1198
|
+
function S(p, b) {
|
|
1199
|
+
let h;
|
|
1199
1200
|
const y = e.getBestModeForData(p);
|
|
1200
|
-
if (
|
|
1201
|
-
throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(
|
|
1201
|
+
if (h = e.from(b, y), h !== e.BYTE && h.bit < y.bit)
|
|
1202
|
+
throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(h) + `.
|
|
1202
1203
|
Suggested mode is: ` + e.toString(y));
|
|
1203
|
-
switch (
|
|
1204
|
+
switch (h === e.KANJI && !a.isKanjiModeEnabled() && (h = e.BYTE), h) {
|
|
1204
1205
|
case e.NUMERIC:
|
|
1205
1206
|
return new i(p);
|
|
1206
1207
|
case e.ALPHANUMERIC:
|
|
@@ -1211,70 +1212,70 @@ var en = mt.exports;
|
|
|
1211
1212
|
return new o(p);
|
|
1212
1213
|
}
|
|
1213
1214
|
}
|
|
1214
|
-
t.fromArray = function(
|
|
1215
|
-
return
|
|
1216
|
-
return typeof y == "string" ?
|
|
1215
|
+
t.fromArray = function(b) {
|
|
1216
|
+
return b.reduce(function(h, y) {
|
|
1217
|
+
return typeof y == "string" ? h.push(S(y, null)) : y.data && h.push(S(y.data, y.mode)), h;
|
|
1217
1218
|
}, []);
|
|
1218
|
-
}, t.fromString = function(
|
|
1219
|
-
const y = B(
|
|
1220
|
-
for (let
|
|
1221
|
-
|
|
1222
|
-
return t.fromArray(d(
|
|
1223
|
-
}, t.rawSplit = function(
|
|
1219
|
+
}, t.fromString = function(b, h) {
|
|
1220
|
+
const y = B(b, a.isKanjiModeEnabled()), M = v(y), _ = C(M, h), P = s.find_path(_.map, "start", "end"), U = [];
|
|
1221
|
+
for (let V = 1; V < P.length - 1; V++)
|
|
1222
|
+
U.push(_.table[P[V]].node);
|
|
1223
|
+
return t.fromArray(d(U));
|
|
1224
|
+
}, t.rawSplit = function(b) {
|
|
1224
1225
|
return t.fromArray(
|
|
1225
|
-
B(
|
|
1226
|
+
B(b, a.isKanjiModeEnabled())
|
|
1226
1227
|
);
|
|
1227
1228
|
};
|
|
1228
|
-
})(
|
|
1229
|
-
const
|
|
1230
|
-
function
|
|
1231
|
-
const i = t.size, r =
|
|
1229
|
+
})(ht);
|
|
1230
|
+
const be = L, Ee = pe, ln = Vt, an = xt, cn = st, un = lt, Ie = at, Pe = ye, dn = zt, he = dt, fn = mt, mn = Y, Ae = ht;
|
|
1231
|
+
function gn(t, e) {
|
|
1232
|
+
const i = t.size, r = un.getPositions(e);
|
|
1232
1233
|
for (let o = 0; o < r.length; o++) {
|
|
1233
1234
|
const n = r[o][0], l = r[o][1];
|
|
1234
|
-
for (let
|
|
1235
|
-
if (!(n +
|
|
1236
|
-
for (let
|
|
1237
|
-
l +
|
|
1235
|
+
for (let a = -1; a <= 7; a++)
|
|
1236
|
+
if (!(n + a <= -1 || i <= n + a))
|
|
1237
|
+
for (let s = -1; s <= 7; s++)
|
|
1238
|
+
l + s <= -1 || i <= l + s || (a >= 0 && a <= 6 && (s === 0 || s === 6) || s >= 0 && s <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && s >= 2 && s <= 4 ? t.set(n + a, l + s, !0, !0) : t.set(n + a, l + s, !1, !0));
|
|
1238
1239
|
}
|
|
1239
1240
|
}
|
|
1240
|
-
function
|
|
1241
|
+
function hn(t) {
|
|
1241
1242
|
const e = t.size;
|
|
1242
1243
|
for (let i = 8; i < e - 8; i++) {
|
|
1243
1244
|
const r = i % 2 === 0;
|
|
1244
1245
|
t.set(i, 6, r, !0), t.set(6, i, r, !0);
|
|
1245
1246
|
}
|
|
1246
1247
|
}
|
|
1247
|
-
function
|
|
1248
|
-
const i =
|
|
1248
|
+
function pn(t, e) {
|
|
1249
|
+
const i = cn.getPositions(e);
|
|
1249
1250
|
for (let r = 0; r < i.length; r++) {
|
|
1250
1251
|
const o = i[r][0], n = i[r][1];
|
|
1251
1252
|
for (let l = -2; l <= 2; l++)
|
|
1252
|
-
for (let
|
|
1253
|
-
l === -2 || l === 2 ||
|
|
1253
|
+
for (let a = -2; a <= 2; a++)
|
|
1254
|
+
l === -2 || l === 2 || a === -2 || a === 2 || l === 0 && a === 0 ? t.set(o + l, n + a, !0, !0) : t.set(o + l, n + a, !1, !0);
|
|
1254
1255
|
}
|
|
1255
1256
|
}
|
|
1256
|
-
function
|
|
1257
|
-
const i = t.size, r =
|
|
1257
|
+
function yn(t, e) {
|
|
1258
|
+
const i = t.size, r = he.getEncodedBits(e);
|
|
1258
1259
|
let o, n, l;
|
|
1259
|
-
for (let
|
|
1260
|
-
o = Math.floor(
|
|
1260
|
+
for (let a = 0; a < 18; a++)
|
|
1261
|
+
o = Math.floor(a / 3), n = a % 3 + i - 8 - 3, l = (r >> a & 1) === 1, t.set(o, n, l, !0), t.set(n, o, l, !0);
|
|
1261
1262
|
}
|
|
1262
|
-
function
|
|
1263
|
-
const r = t.size, o =
|
|
1263
|
+
function Be(t, e, i) {
|
|
1264
|
+
const r = t.size, o = fn.getEncodedBits(e, i);
|
|
1264
1265
|
let n, l;
|
|
1265
1266
|
for (n = 0; n < 15; n++)
|
|
1266
1267
|
l = (o >> n & 1) === 1, n < 6 ? t.set(n, 8, l, !0) : n < 8 ? t.set(n + 1, 8, l, !0) : t.set(r - 15 + n, 8, l, !0), n < 8 ? t.set(8, r - n - 1, l, !0) : n < 9 ? t.set(8, 15 - n - 1 + 1, l, !0) : t.set(8, 15 - n - 1, l, !0);
|
|
1267
1268
|
t.set(r - 8, 8, 1, !0);
|
|
1268
1269
|
}
|
|
1269
|
-
function
|
|
1270
|
+
function wn(t, e) {
|
|
1270
1271
|
const i = t.size;
|
|
1271
1272
|
let r = -1, o = i - 1, n = 7, l = 0;
|
|
1272
|
-
for (let
|
|
1273
|
-
for (
|
|
1274
|
-
for (let
|
|
1275
|
-
if (!t.isReserved(o,
|
|
1273
|
+
for (let a = i - 1; a > 0; a -= 2)
|
|
1274
|
+
for (a === 6 && a--; ; ) {
|
|
1275
|
+
for (let s = 0; s < 2; s++)
|
|
1276
|
+
if (!t.isReserved(o, a - s)) {
|
|
1276
1277
|
let f = !1;
|
|
1277
|
-
l < e.length && (f = (e[l] >>> n & 1) === 1), t.set(o,
|
|
1278
|
+
l < e.length && (f = (e[l] >>> n & 1) === 1), t.set(o, a - s, f), n--, n === -1 && (l++, n = 7);
|
|
1278
1279
|
}
|
|
1279
1280
|
if (o += r, o < 0 || i <= o) {
|
|
1280
1281
|
o -= r, r = -r;
|
|
@@ -1282,53 +1283,53 @@ function mn(t, e) {
|
|
|
1282
1283
|
}
|
|
1283
1284
|
}
|
|
1284
1285
|
}
|
|
1285
|
-
function
|
|
1286
|
-
const r = new
|
|
1287
|
-
i.forEach(function(
|
|
1288
|
-
r.put(
|
|
1286
|
+
function bn(t, e, i) {
|
|
1287
|
+
const r = new ln();
|
|
1288
|
+
i.forEach(function(s) {
|
|
1289
|
+
r.put(s.mode.bit, 4), r.put(s.getLength(), mn.getCharCountIndicator(s.mode, t)), s.write(r);
|
|
1289
1290
|
});
|
|
1290
|
-
const o =
|
|
1291
|
+
const o = be.getSymbolTotalCodewords(t), n = Pe.getTotalCodewordsCount(t, e), l = (o - n) * 8;
|
|
1291
1292
|
for (r.getLengthInBits() + 4 <= l && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
|
|
1292
1293
|
r.putBit(0);
|
|
1293
|
-
const
|
|
1294
|
-
for (let
|
|
1295
|
-
r.put(
|
|
1296
|
-
return
|
|
1294
|
+
const a = (l - r.getLengthInBits()) / 8;
|
|
1295
|
+
for (let s = 0; s < a; s++)
|
|
1296
|
+
r.put(s % 2 ? 17 : 236, 8);
|
|
1297
|
+
return vn(r, t, e);
|
|
1297
1298
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const r =
|
|
1299
|
+
function vn(t, e, i) {
|
|
1300
|
+
const r = be.getSymbolTotalCodewords(e), o = Pe.getTotalCodewordsCount(e, i), n = r - o, l = Pe.getBlocksCount(e, i), a = r % l, s = l - a, f = Math.floor(r / l), m = Math.floor(n / l), B = m + 1, g = f - m, d = new dn(g);
|
|
1300
1301
|
let v = 0;
|
|
1301
|
-
const C = new Array(l),
|
|
1302
|
+
const C = new Array(l), S = new Array(l);
|
|
1302
1303
|
let p = 0;
|
|
1303
|
-
const
|
|
1304
|
+
const b = new Uint8Array(t.buffer);
|
|
1304
1305
|
for (let P = 0; P < l; P++) {
|
|
1305
|
-
const
|
|
1306
|
-
C[P] =
|
|
1306
|
+
const U = P < s ? m : B;
|
|
1307
|
+
C[P] = b.slice(v, v + U), S[P] = d.encode(C[P]), v += U, p = Math.max(p, U);
|
|
1307
1308
|
}
|
|
1308
|
-
const
|
|
1309
|
-
let y = 0,
|
|
1310
|
-
for (
|
|
1311
|
-
for (
|
|
1312
|
-
|
|
1313
|
-
for (
|
|
1314
|
-
for (
|
|
1315
|
-
|
|
1316
|
-
return
|
|
1309
|
+
const h = new Uint8Array(r);
|
|
1310
|
+
let y = 0, M, _;
|
|
1311
|
+
for (M = 0; M < p; M++)
|
|
1312
|
+
for (_ = 0; _ < l; _++)
|
|
1313
|
+
M < C[_].length && (h[y++] = C[_][M]);
|
|
1314
|
+
for (M = 0; M < g; M++)
|
|
1315
|
+
for (_ = 0; _ < l; _++)
|
|
1316
|
+
h[y++] = S[_][M];
|
|
1317
|
+
return h;
|
|
1317
1318
|
}
|
|
1318
|
-
function
|
|
1319
|
+
function Cn(t, e, i, r) {
|
|
1319
1320
|
let o;
|
|
1320
1321
|
if (Array.isArray(t))
|
|
1321
|
-
o =
|
|
1322
|
+
o = Ae.fromArray(t);
|
|
1322
1323
|
else if (typeof t == "string") {
|
|
1323
1324
|
let f = e;
|
|
1324
1325
|
if (!f) {
|
|
1325
|
-
const m =
|
|
1326
|
-
f =
|
|
1326
|
+
const m = Ae.rawSplit(t);
|
|
1327
|
+
f = he.getBestVersionForData(m, i);
|
|
1327
1328
|
}
|
|
1328
|
-
o =
|
|
1329
|
+
o = Ae.fromString(t, f || 40);
|
|
1329
1330
|
} else
|
|
1330
1331
|
throw new Error("Invalid data");
|
|
1331
|
-
const n =
|
|
1332
|
+
const n = he.getBestVersionForData(o, i);
|
|
1332
1333
|
if (!n)
|
|
1333
1334
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1334
1335
|
if (!e)
|
|
@@ -1340,25 +1341,25 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1340
1341
|
Minimum version required to store current data is: ` + n + `.
|
|
1341
1342
|
`
|
|
1342
1343
|
);
|
|
1343
|
-
const l =
|
|
1344
|
-
return
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
)),
|
|
1348
|
-
modules:
|
|
1344
|
+
const l = bn(e, i, o), a = be.getSymbolSize(e), s = new an(a);
|
|
1345
|
+
return gn(s, e), hn(s), pn(s, e), Be(s, i, 0), e >= 7 && yn(s, e), wn(s, l), isNaN(r) && (r = Ie.getBestMask(
|
|
1346
|
+
s,
|
|
1347
|
+
Be.bind(null, s, i)
|
|
1348
|
+
)), Ie.applyMask(r, s), Be(s, i, r), {
|
|
1349
|
+
modules: s,
|
|
1349
1350
|
version: e,
|
|
1350
1351
|
errorCorrectionLevel: i,
|
|
1351
1352
|
maskPattern: r,
|
|
1352
1353
|
segments: o
|
|
1353
1354
|
};
|
|
1354
1355
|
}
|
|
1355
|
-
|
|
1356
|
+
rt.create = function(e, i) {
|
|
1356
1357
|
if (typeof e > "u" || e === "")
|
|
1357
1358
|
throw new Error("No input text");
|
|
1358
|
-
let r =
|
|
1359
|
-
return typeof i < "u" && (r =
|
|
1359
|
+
let r = Ee.M, o, n;
|
|
1360
|
+
return typeof i < "u" && (r = Ee.from(i.errorCorrectionLevel, Ee.M), o = he.from(i.version), n = Ie.from(i.maskPattern), i.toSJISFunc && be.setToSJISFunction(i.toSJISFunc)), Cn(e, o, r, n);
|
|
1360
1361
|
};
|
|
1361
|
-
var
|
|
1362
|
+
var yt = {}, Fe = {};
|
|
1362
1363
|
(function(t) {
|
|
1363
1364
|
function e(i) {
|
|
1364
1365
|
if (typeof i == "number" && (i = i.toString()), typeof i != "string")
|
|
@@ -1398,20 +1399,20 @@ var gt = {}, Ne = {};
|
|
|
1398
1399
|
const n = t.getScale(r, o);
|
|
1399
1400
|
return Math.floor((r + o.margin * 2) * n);
|
|
1400
1401
|
}, t.qrToImageData = function(r, o, n) {
|
|
1401
|
-
const l = o.modules.size,
|
|
1402
|
+
const l = o.modules.size, a = o.modules.data, s = t.getScale(l, n), f = Math.floor((l + n.margin * 2) * s), m = n.margin * s, B = [n.color.light, n.color.dark];
|
|
1402
1403
|
for (let g = 0; g < f; g++)
|
|
1403
1404
|
for (let d = 0; d < f; d++) {
|
|
1404
1405
|
let v = (g * f + d) * 4, C = n.color.light;
|
|
1405
1406
|
if (g >= m && d >= m && g < f - m && d < f - m) {
|
|
1406
|
-
const
|
|
1407
|
-
C = B[
|
|
1407
|
+
const S = Math.floor((g - m) / s), p = Math.floor((d - m) / s);
|
|
1408
|
+
C = B[a[S * l + p] ? 1 : 0];
|
|
1408
1409
|
}
|
|
1409
1410
|
r[v++] = C.r, r[v++] = C.g, r[v++] = C.b, r[v] = C.a;
|
|
1410
1411
|
}
|
|
1411
1412
|
};
|
|
1412
|
-
})(
|
|
1413
|
+
})(Fe);
|
|
1413
1414
|
(function(t) {
|
|
1414
|
-
const e =
|
|
1415
|
+
const e = Fe;
|
|
1415
1416
|
function i(o, n, l) {
|
|
1416
1417
|
o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = l, n.width = l, n.style.height = l + "px", n.style.width = l + "px";
|
|
1417
1418
|
}
|
|
@@ -1422,78 +1423,78 @@ var gt = {}, Ne = {};
|
|
|
1422
1423
|
throw new Error("You need to specify a canvas element");
|
|
1423
1424
|
}
|
|
1424
1425
|
}
|
|
1425
|
-
t.render = function(n, l,
|
|
1426
|
-
let
|
|
1427
|
-
typeof
|
|
1428
|
-
const m = e.getImageWidth(n.modules.size,
|
|
1429
|
-
return e.qrToImageData(g.data, n,
|
|
1430
|
-
}, t.renderToDataURL = function(n, l,
|
|
1431
|
-
let
|
|
1432
|
-
typeof
|
|
1433
|
-
const f = t.render(n, l,
|
|
1426
|
+
t.render = function(n, l, a) {
|
|
1427
|
+
let s = a, f = l;
|
|
1428
|
+
typeof s > "u" && (!l || !l.getContext) && (s = l, l = void 0), l || (f = r()), s = e.getOptions(s);
|
|
1429
|
+
const m = e.getImageWidth(n.modules.size, s), B = f.getContext("2d"), g = B.createImageData(m, m);
|
|
1430
|
+
return e.qrToImageData(g.data, n, s), i(B, f, m), B.putImageData(g, 0, 0), f;
|
|
1431
|
+
}, t.renderToDataURL = function(n, l, a) {
|
|
1432
|
+
let s = a;
|
|
1433
|
+
typeof s > "u" && (!l || !l.getContext) && (s = l, l = void 0), s || (s = {});
|
|
1434
|
+
const f = t.render(n, l, s), m = s.type || "image/png", B = s.rendererOpts || {};
|
|
1434
1435
|
return f.toDataURL(m, B.quality);
|
|
1435
1436
|
};
|
|
1436
|
-
})(
|
|
1437
|
-
var
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1437
|
+
})(yt);
|
|
1438
|
+
var wt = {};
|
|
1439
|
+
const En = Fe;
|
|
1440
|
+
function Ge(t, e) {
|
|
1440
1441
|
const i = t.a / 255, r = e + '="' + t.hex + '"';
|
|
1441
1442
|
return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
|
|
1442
1443
|
}
|
|
1443
|
-
function
|
|
1444
|
+
function Me(t, e, i) {
|
|
1444
1445
|
let r = t + e;
|
|
1445
1446
|
return typeof i < "u" && (r += " " + i), r;
|
|
1446
1447
|
}
|
|
1447
|
-
function
|
|
1448
|
+
function An(t, e, i) {
|
|
1448
1449
|
let r = "", o = 0, n = !1, l = 0;
|
|
1449
|
-
for (let
|
|
1450
|
-
const
|
|
1451
|
-
!
|
|
1450
|
+
for (let a = 0; a < t.length; a++) {
|
|
1451
|
+
const s = Math.floor(a % e), f = Math.floor(a / e);
|
|
1452
|
+
!s && !n && (n = !0), t[a] ? (l++, a > 0 && s > 0 && t[a - 1] || (r += n ? Me("M", s + i, 0.5 + f + i) : Me("m", o, 0), o = 0, n = !1), s + 1 < e && t[a + 1] || (r += Me("h", l), l = 0)) : o++;
|
|
1452
1453
|
}
|
|
1453
1454
|
return r;
|
|
1454
1455
|
}
|
|
1455
|
-
|
|
1456
|
-
const o =
|
|
1456
|
+
wt.render = function(e, i, r) {
|
|
1457
|
+
const o = En.getOptions(i), n = e.modules.size, l = e.modules.data, a = n + o.margin * 2, s = o.color.light.a ? "<path " + Ge(o.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", f = "<path " + Ge(o.color.dark, "stroke") + ' d="' + An(l, n, o.margin) + '"/>', m = 'viewBox="0 0 ' + a + " " + a + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + m + ' shape-rendering="crispEdges">' + s + f + `</svg>
|
|
1457
1458
|
`;
|
|
1458
1459
|
return typeof r == "function" && r(null, g), g;
|
|
1459
1460
|
};
|
|
1460
|
-
const
|
|
1461
|
-
function
|
|
1462
|
-
const n = [].slice.call(arguments, 1), l = n.length,
|
|
1463
|
-
if (!
|
|
1461
|
+
const Bn = Dt, Te = rt, bt = yt, Mn = wt;
|
|
1462
|
+
function Re(t, e, i, r, o) {
|
|
1463
|
+
const n = [].slice.call(arguments, 1), l = n.length, a = typeof n[l - 1] == "function";
|
|
1464
|
+
if (!a && !Bn())
|
|
1464
1465
|
throw new Error("Callback required as last argument");
|
|
1465
|
-
if (
|
|
1466
|
+
if (a) {
|
|
1466
1467
|
if (l < 2)
|
|
1467
1468
|
throw new Error("Too few arguments provided");
|
|
1468
1469
|
l === 2 ? (o = i, i = e, e = r = void 0) : l === 3 && (e.getContext && typeof o > "u" ? (o = r, r = void 0) : (o = r, r = i, i = e, e = void 0));
|
|
1469
1470
|
} else {
|
|
1470
1471
|
if (l < 1)
|
|
1471
1472
|
throw new Error("Too few arguments provided");
|
|
1472
|
-
return l === 1 ? (i = e, e = r = void 0) : l === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(
|
|
1473
|
+
return l === 1 ? (i = e, e = r = void 0) : l === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(s, f) {
|
|
1473
1474
|
try {
|
|
1474
|
-
const m =
|
|
1475
|
-
|
|
1475
|
+
const m = Te.create(i, r);
|
|
1476
|
+
s(t(m, e, r));
|
|
1476
1477
|
} catch (m) {
|
|
1477
1478
|
f(m);
|
|
1478
1479
|
}
|
|
1479
1480
|
});
|
|
1480
1481
|
}
|
|
1481
1482
|
try {
|
|
1482
|
-
const
|
|
1483
|
-
o(null, t(
|
|
1484
|
-
} catch (
|
|
1485
|
-
o(
|
|
1483
|
+
const s = Te.create(i, r);
|
|
1484
|
+
o(null, t(s, e, r));
|
|
1485
|
+
} catch (s) {
|
|
1486
|
+
o(s);
|
|
1486
1487
|
}
|
|
1487
1488
|
}
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
return
|
|
1489
|
+
ie.create = Te.create;
|
|
1490
|
+
ie.toCanvas = Re.bind(null, bt.render);
|
|
1491
|
+
ie.toDataURL = Re.bind(null, bt.renderToDataURL);
|
|
1492
|
+
ie.toString = Re.bind(null, function(t, e, i) {
|
|
1493
|
+
return Mn.render(t, i);
|
|
1493
1494
|
});
|
|
1494
|
-
async function
|
|
1495
|
+
async function Sn(t, e = 350) {
|
|
1495
1496
|
try {
|
|
1496
|
-
return await
|
|
1497
|
+
return await ie.toDataURL(t, {
|
|
1497
1498
|
width: e,
|
|
1498
1499
|
margin: 0
|
|
1499
1500
|
});
|
|
@@ -1501,23 +1502,23 @@ async function Cn(t, e = 350) {
|
|
|
1501
1502
|
console.error(i);
|
|
1502
1503
|
}
|
|
1503
1504
|
}
|
|
1504
|
-
var
|
|
1505
|
-
const
|
|
1505
|
+
var _n = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
1506
|
+
const In = { class: "flex items-start" }, Pn = { class: "flex flex-col gap-16 mt-16" }, Tn = ["src"], Nn = /* @__PURE__ */ Xe({
|
|
1506
1507
|
__name: "LinkDeviceDialog",
|
|
1507
1508
|
setup(t) {
|
|
1508
|
-
const e =
|
|
1509
|
+
const e = Se(), i = nt(), r = et(), o = H(), n = H(), l = _n.crmUrl, a = H(), s = me(() => i.membership), f = me(() => {
|
|
1509
1510
|
var g, d;
|
|
1510
|
-
return `https://${(g =
|
|
1511
|
+
return `https://${(g = s.value) != null && g.url ? s.value.url : (d = s.value) == null ? void 0 : d.business}.${l}`;
|
|
1511
1512
|
});
|
|
1512
1513
|
async function m(g) {
|
|
1513
|
-
const d = await
|
|
1514
|
+
const d = await tt.getOtp(g);
|
|
1514
1515
|
return `${f.value}?link-device=${d.otp}`;
|
|
1515
1516
|
}
|
|
1516
1517
|
async function B(g) {
|
|
1517
1518
|
const d = await m(g);
|
|
1518
|
-
|
|
1519
|
+
a.value = d, o.value = await Sn(d);
|
|
1519
1520
|
}
|
|
1520
|
-
return
|
|
1521
|
+
return Ze(async () => {
|
|
1521
1522
|
if (await e.readLocations(), !e.locations.length) {
|
|
1522
1523
|
r.close();
|
|
1523
1524
|
return;
|
|
@@ -1525,39 +1526,39 @@ const An = { class: "flex items-start" }, Bn = { class: "flex flex-col gap-16 mt
|
|
|
1525
1526
|
const g = e.locations[0]._id;
|
|
1526
1527
|
n.value = g, await B(g);
|
|
1527
1528
|
}), (g, d) => {
|
|
1528
|
-
const v =
|
|
1529
|
-
return x(),
|
|
1530
|
-
default:
|
|
1531
|
-
|
|
1532
|
-
d[3] || (d[3] =
|
|
1533
|
-
|
|
1534
|
-
|
|
1529
|
+
const v = R("FmIcon"), C = R("FmSelect"), S = R("FmButton"), p = R("FmCard");
|
|
1530
|
+
return x(), fe(p, { class: "p-24 max-w-[350px]" }, {
|
|
1531
|
+
default: ne(() => [
|
|
1532
|
+
w("div", In, [
|
|
1533
|
+
d[3] || (d[3] = w("div", null, [
|
|
1534
|
+
w("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
1535
|
+
w("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
1535
1536
|
], -1)),
|
|
1536
1537
|
I(v, {
|
|
1537
1538
|
name: "close",
|
|
1538
|
-
onClick: d[0] || (d[0] = (
|
|
1539
|
+
onClick: d[0] || (d[0] = (b) => c(r).close()),
|
|
1539
1540
|
class: "cursor-pointer"
|
|
1540
1541
|
})
|
|
1541
1542
|
]),
|
|
1542
|
-
|
|
1543
|
+
w("div", Pn, [
|
|
1543
1544
|
I(C, {
|
|
1544
|
-
modelValue:
|
|
1545
|
+
modelValue: c(n),
|
|
1545
1546
|
"onUpdate:modelValue": [
|
|
1546
|
-
d[1] || (d[1] = (
|
|
1547
|
+
d[1] || (d[1] = (b) => We(n) ? n.value = b : null),
|
|
1547
1548
|
B
|
|
1548
1549
|
],
|
|
1549
1550
|
label: "Select Location",
|
|
1550
|
-
items:
|
|
1551
|
+
items: c(e).locationItems.filter((b) => !!b.value)
|
|
1551
1552
|
}, null, 8, ["modelValue", "items"]),
|
|
1552
|
-
|
|
1553
|
-
src:
|
|
1553
|
+
w("img", {
|
|
1554
|
+
src: c(o),
|
|
1554
1555
|
class: "aspect-square w-full"
|
|
1555
|
-
}, null, 8,
|
|
1556
|
-
I(
|
|
1556
|
+
}, null, 8, Tn),
|
|
1557
|
+
I(S, {
|
|
1557
1558
|
class: "mx-auto",
|
|
1558
1559
|
variant: "plain",
|
|
1559
1560
|
icon: "content_copy",
|
|
1560
|
-
onClick: d[2] || (d[2] = (
|
|
1561
|
+
onClick: d[2] || (d[2] = (b) => c(ot)(c(a)))
|
|
1561
1562
|
})
|
|
1562
1563
|
])
|
|
1563
1564
|
]),
|
|
@@ -1566,38 +1567,49 @@ const An = { class: "flex items-start" }, Bn = { class: "flex flex-col gap-16 mt
|
|
|
1566
1567
|
};
|
|
1567
1568
|
}
|
|
1568
1569
|
});
|
|
1569
|
-
var
|
|
1570
|
-
const
|
|
1570
|
+
var Qe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
1571
|
+
const Un = { class: "hidden xs:flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Ln = { class: "fm-typo-en-title-md-800" }, Fn = {
|
|
1571
1572
|
key: 0,
|
|
1572
1573
|
class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
|
|
1573
|
-
},
|
|
1574
|
+
}, Rn = { class: "col-span-2 flex flex-col xs:col-span-3" }, Dn = { class: "fm-typo-en-title-sm-800" }, kn = { class: "space-y-24" }, Vn = { class: "space-y-8" }, xn = { class: "fm-typo-en-title-sm-800" }, $n = { class: "fm-typo-body-lg-400" }, zn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Hn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Kn = { class: "space-y-8" }, On = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Yn = { class: "space-y-8" }, jn = { class: "space-y-8" }, Jn = { class: "space-y-8" }, qn = { class: "space-y-8" }, Gn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Qn = { class: "space-y-8" }, Xn = { class: "flex justify-end pb-24" }, Zn = { class: "col-span-1 space-y-8 xs:hidden" }, Wn = { class: "fm-typo-en-body-lg-600" }, eo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-lg-600" }, no = { class: "fm-typo-en-body-lg-600" }, Ao = /* @__PURE__ */ Xe({
|
|
1574
1575
|
__name: "Setting",
|
|
1575
1576
|
setup(t) {
|
|
1576
|
-
const e =
|
|
1577
|
+
const e = Bt(), i = Ut(), r = Se(), o = nt(), { global: n, minor: l } = At, a = et(), s = H(), f = H(!1), m = H([]), B = H(null), g = St, d = [
|
|
1577
1578
|
(A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
|
|
1578
1579
|
(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"
|
|
1579
|
-
],
|
|
1580
|
+
], v = Qe.appUrl, C = me(() => {
|
|
1580
1581
|
var A;
|
|
1581
|
-
return `https://${(A = s.value) == null ? void 0 : A.business}.${
|
|
1582
|
-
}),
|
|
1583
|
-
var A,
|
|
1584
|
-
return Math.min((((
|
|
1585
|
-
}), { t: h } =
|
|
1586
|
-
|
|
1587
|
-
|
|
1582
|
+
return `https://${(A = s.value) == null ? void 0 : A.business}.${v}`;
|
|
1583
|
+
}), S = H(), p = H([]), b = me(() => {
|
|
1584
|
+
var A, u;
|
|
1585
|
+
return Math.min((((u = (A = s.value) == null ? void 0 : A.advertisements) == null ? void 0 : u.length) ?? 0) + 1, 5);
|
|
1586
|
+
}), { t: h } = Nt(), y = i.currentCountry.value || "MY", M = [
|
|
1587
|
+
"user.name",
|
|
1588
|
+
"user.gender",
|
|
1589
|
+
"user.birthday",
|
|
1590
|
+
"user.phoneNumber",
|
|
1591
|
+
"membership.url"
|
|
1592
|
+
].filter(
|
|
1593
|
+
(A) => {
|
|
1594
|
+
var u;
|
|
1595
|
+
return !((u = Pt[y]) != null && u.includes(A));
|
|
1596
|
+
}
|
|
1597
|
+
);
|
|
1598
|
+
async function _() {
|
|
1599
|
+
a.open({
|
|
1588
1600
|
title: "",
|
|
1589
|
-
dialogComponent:
|
|
1601
|
+
dialogComponent: Nn,
|
|
1590
1602
|
closeButton: !1
|
|
1591
1603
|
});
|
|
1592
1604
|
}
|
|
1593
|
-
async function
|
|
1594
|
-
await
|
|
1605
|
+
async function P(A) {
|
|
1606
|
+
await Mt.remove(
|
|
1595
1607
|
"Are you sure you want to unlink this device?",
|
|
1596
1608
|
"Unlink device",
|
|
1597
1609
|
"Unlink"
|
|
1598
|
-
) && await
|
|
1610
|
+
) && await l(
|
|
1599
1611
|
async () => {
|
|
1600
|
-
await
|
|
1612
|
+
await tt.unregisterDevice(A), await r.readLocationDevices();
|
|
1601
1613
|
},
|
|
1602
1614
|
{
|
|
1603
1615
|
message: "Unlinking device",
|
|
@@ -1605,26 +1617,26 @@ const Sn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1605
1617
|
}
|
|
1606
1618
|
);
|
|
1607
1619
|
}
|
|
1608
|
-
async function
|
|
1609
|
-
await
|
|
1620
|
+
async function U() {
|
|
1621
|
+
await l(
|
|
1610
1622
|
async () => {
|
|
1611
|
-
var
|
|
1612
|
-
const A =
|
|
1613
|
-
A.welcomeMessage && !((
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
)),
|
|
1619
|
-
new Array(
|
|
1620
|
-
var
|
|
1621
|
-
const
|
|
1622
|
-
return
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
) : (
|
|
1623
|
+
var N;
|
|
1624
|
+
const A = Rt(s.value);
|
|
1625
|
+
A.welcomeMessage && !((N = A.welcomeMessage) != null && N.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership");
|
|
1626
|
+
const u = _t.parse(A);
|
|
1627
|
+
S.value === null && u.image ? await G.delete(G.coverImagePath()) : S.value && (u.image = await G.update(
|
|
1628
|
+
G.coverImagePath(),
|
|
1629
|
+
S.value
|
|
1630
|
+
)), f.value ? u.advertisements = (await Promise.all(
|
|
1631
|
+
new Array(b.value - 1).fill(null).map(async (z, K) => {
|
|
1632
|
+
var ee;
|
|
1633
|
+
const j = p.value[K];
|
|
1634
|
+
return j ? await G.update(
|
|
1635
|
+
G.advertisementPath(K, j),
|
|
1636
|
+
j
|
|
1637
|
+
) : (ee = u.advertisements) == null ? void 0 : ee[K];
|
|
1626
1638
|
})
|
|
1627
|
-
)).filter((
|
|
1639
|
+
)).filter((z) => z) : u.advertisements = [], await je.update(u), await o.readMembership(), s.value = o.membership;
|
|
1628
1640
|
},
|
|
1629
1641
|
{
|
|
1630
1642
|
message: "Updating membership",
|
|
@@ -1632,282 +1644,276 @@ const Sn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1632
1644
|
}
|
|
1633
1645
|
);
|
|
1634
1646
|
}
|
|
1635
|
-
async function
|
|
1636
|
-
const A = await
|
|
1637
|
-
console.log(A),
|
|
1647
|
+
async function V() {
|
|
1648
|
+
const A = await je.getEmailAddresses();
|
|
1649
|
+
console.log(A), m.value = A, B.value = A.find((u) => u.default.includes("Marketing"));
|
|
1638
1650
|
}
|
|
1639
|
-
async function
|
|
1651
|
+
async function F() {
|
|
1640
1652
|
window.open(
|
|
1641
|
-
`${
|
|
1653
|
+
`${Qe.licensePortalUrl}business/${Lt.businessId}/settings`,
|
|
1642
1654
|
"_blank"
|
|
1643
1655
|
);
|
|
1644
1656
|
}
|
|
1645
|
-
return
|
|
1646
|
-
await
|
|
1647
|
-
var A,
|
|
1648
|
-
await
|
|
1657
|
+
return Ze(async () => {
|
|
1658
|
+
await n(async () => {
|
|
1659
|
+
var A, u;
|
|
1660
|
+
await r.readPremium(), await r.readLocations(), await r.readLocationDevices(), await o.readMembership(), await V(), s.value = o.membership, f.value = (((A = s.value.advertisements) == null ? void 0 : A.length) ?? 0) > 0, p.value = ((u = s.value.advertisements) == null ? void 0 : u.map(() => null)) ?? [];
|
|
1649
1661
|
});
|
|
1650
|
-
}), (A,
|
|
1651
|
-
var
|
|
1652
|
-
const
|
|
1653
|
-
return x(),
|
|
1654
|
-
I(
|
|
1655
|
-
title:
|
|
1662
|
+
}), (A, u) => {
|
|
1663
|
+
var De, ke, Ve, xe, $e, ze, He;
|
|
1664
|
+
const N = R("FmPageHead"), z = R("FmButton"), K = R("FmTextField"), j = R("FmCard"), ee = R("FmPill"), ve = R("FmSwitch"), vt = R("FmSelect"), Ct = R("FmMenuDivider");
|
|
1665
|
+
return x(), q(ae, null, [
|
|
1666
|
+
I(N, {
|
|
1667
|
+
title: c(h)("connect.setting.title"),
|
|
1656
1668
|
class: "xs:hidden"
|
|
1657
1669
|
}, null, 8, ["title"]),
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
I(
|
|
1670
|
+
w("div", Un, [
|
|
1671
|
+
w("div", Ln, k(c(h)("connect.setting.basicInfo.title")), 1),
|
|
1672
|
+
I(z, {
|
|
1661
1673
|
icon: "info",
|
|
1662
1674
|
variant: "tertiary"
|
|
1663
1675
|
})
|
|
1664
1676
|
]),
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
I(
|
|
1670
|
-
label:
|
|
1671
|
-
modelValue:
|
|
1672
|
-
"onUpdate:modelValue":
|
|
1677
|
+
c(s) ? (x(), q("div", Fn, [
|
|
1678
|
+
w("div", Rn, [
|
|
1679
|
+
w("div", Dn, k(c(h)("connect.setting.basicInfo.title")), 1),
|
|
1680
|
+
w("div", kn, [
|
|
1681
|
+
I(K, {
|
|
1682
|
+
label: c(h)("connect.setting.basicInfo.membershipTitle"),
|
|
1683
|
+
modelValue: c(s).name,
|
|
1684
|
+
"onUpdate:modelValue": u[0] || (u[0] = (E) => c(s).name = E)
|
|
1673
1685
|
}, null, 8, ["label", "modelValue"]),
|
|
1674
|
-
I(
|
|
1686
|
+
I(K, {
|
|
1675
1687
|
disabled: !0,
|
|
1676
|
-
"model-value":
|
|
1677
|
-
rules:
|
|
1688
|
+
"model-value": c(s).business,
|
|
1689
|
+
rules: d,
|
|
1678
1690
|
required: !0,
|
|
1679
|
-
label:
|
|
1680
|
-
"helper-text":
|
|
1681
|
-
placeholder:
|
|
1682
|
-
"onUpdate:modelValue":
|
|
1691
|
+
label: c(h)("connect.setting.basicInfo.memberAppUrl"),
|
|
1692
|
+
"helper-text": c(C),
|
|
1693
|
+
placeholder: c(s).business.toString(),
|
|
1694
|
+
"onUpdate:modelValue": u[2] || (u[2] = (E) => c(s).url = E)
|
|
1683
1695
|
}, {
|
|
1684
|
-
prepend:
|
|
1685
|
-
|
|
1696
|
+
prepend: ne(() => u[12] || (u[12] = [
|
|
1697
|
+
te(" https:// ")
|
|
1686
1698
|
])),
|
|
1687
|
-
append:
|
|
1688
|
-
|
|
1689
|
-
I(
|
|
1699
|
+
append: ne(() => [
|
|
1700
|
+
te(" ." + k(c(v)) + " ", 1),
|
|
1701
|
+
I(z, {
|
|
1690
1702
|
icon: "content_copy",
|
|
1691
1703
|
variant: "tertiary",
|
|
1692
|
-
onClick:
|
|
1704
|
+
onClick: u[1] || (u[1] = (E) => c(ot)(c(C)))
|
|
1693
1705
|
})
|
|
1694
1706
|
]),
|
|
1695
1707
|
_: 1
|
|
1696
1708
|
}, 8, ["model-value", "label", "helper-text", "placeholder"]),
|
|
1697
|
-
I(
|
|
1709
|
+
I(Ye, {
|
|
1698
1710
|
label: "Cover image",
|
|
1699
1711
|
class: "w-2/3 xs:w-full",
|
|
1700
1712
|
"image-fit": "cover",
|
|
1701
1713
|
"aspect-ratio": "3/1",
|
|
1702
|
-
thumbnail:
|
|
1703
|
-
"onUpdate:file":
|
|
1704
|
-
|
|
1714
|
+
thumbnail: c(s).image || void 0,
|
|
1715
|
+
"onUpdate:file": u[3] || (u[3] = async (E) => {
|
|
1716
|
+
S.value = E, E || (c(s).image = null);
|
|
1705
1717
|
})
|
|
1706
1718
|
}, null, 8, ["thumbnail"]),
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
I(
|
|
1719
|
+
w("div", Vn, [
|
|
1720
|
+
w("div", xn, k(c(h)("connect.setting.counterApp.title")), 1),
|
|
1721
|
+
I(z, {
|
|
1710
1722
|
variant: "plain",
|
|
1711
1723
|
icon: "link",
|
|
1712
|
-
label:
|
|
1713
|
-
onClick:
|
|
1724
|
+
label: c(h)("connect.setting.counterApp.linkDevice"),
|
|
1725
|
+
onClick: _
|
|
1714
1726
|
}, null, 8, ["label"]),
|
|
1715
|
-
(x(!0),
|
|
1727
|
+
(x(!0), q(ae, null, Ke(c(r).locationDevices, (E, T) => (x(), fe(j, {
|
|
1716
1728
|
key: T,
|
|
1717
1729
|
variant: "outlined",
|
|
1718
1730
|
class: "flex items-center justify-between px-16 py-12"
|
|
1719
1731
|
}, {
|
|
1720
|
-
default:
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1732
|
+
default: ne(() => [
|
|
1733
|
+
w("div", null, [
|
|
1734
|
+
w("p", $n, k(E.name || `Device ${E._id}`), 1),
|
|
1735
|
+
w("p", zn, " Activation date: " + k(c(Et)(c(Ft)(E._id.toString())).format(
|
|
1724
1736
|
"D MMM YYYY"
|
|
1725
1737
|
)), 1),
|
|
1726
|
-
|
|
1738
|
+
w("p", Hn, " Linked location: " + k(c(r).locations.find((D) => D._id == E.location).name), 1)
|
|
1727
1739
|
]),
|
|
1728
|
-
I(
|
|
1740
|
+
I(z, {
|
|
1729
1741
|
icon: "link_off",
|
|
1730
1742
|
variant: "tertiary",
|
|
1731
|
-
onClick: (
|
|
1743
|
+
onClick: (D) => P(E._id)
|
|
1732
1744
|
}, null, 8, ["onClick"])
|
|
1733
1745
|
]),
|
|
1734
1746
|
_: 2
|
|
1735
1747
|
}, 1024))), 128))
|
|
1736
1748
|
]),
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
I(
|
|
1749
|
+
w("div", Kn, [
|
|
1750
|
+
w("div", On, [
|
|
1751
|
+
u[13] || (u[13] = te(" Advertisement ")),
|
|
1752
|
+
I(ee, { variant: "premium" })
|
|
1741
1753
|
]),
|
|
1742
|
-
I(
|
|
1743
|
-
modelValue:
|
|
1744
|
-
"onUpdate:modelValue":
|
|
1754
|
+
I(ve, {
|
|
1755
|
+
modelValue: c(f),
|
|
1756
|
+
"onUpdate:modelValue": u[4] || (u[4] = (E) => We(f) ? f.value = E : null),
|
|
1745
1757
|
label: "Advertisement",
|
|
1746
1758
|
sublabel: "This will be show on FeedMe ordering app",
|
|
1747
1759
|
"label-placement": "right",
|
|
1748
|
-
disabled: !
|
|
1760
|
+
disabled: !c(r).isPremium,
|
|
1749
1761
|
value: ""
|
|
1750
1762
|
}, null, 8, ["modelValue", "disabled"]),
|
|
1751
|
-
|
|
1763
|
+
c(f) ? (x(), q("div", {
|
|
1752
1764
|
class: "flex items-center gap-8 flex-wrap xs:grid xs:grid-cols-2 xs:overflow-x-scroll xs:w-full",
|
|
1753
|
-
key:
|
|
1765
|
+
key: c(b)
|
|
1754
1766
|
}, [
|
|
1755
|
-
(x(!0),
|
|
1756
|
-
var
|
|
1757
|
-
return x(),
|
|
1767
|
+
(x(!0), q(ae, null, Ke(c(b), (E, T) => {
|
|
1768
|
+
var D, J;
|
|
1769
|
+
return x(), fe(Ye, {
|
|
1758
1770
|
class: "w-[200px]",
|
|
1759
1771
|
"image-fit": "cover",
|
|
1760
1772
|
label: "",
|
|
1761
1773
|
"aspect-ratio": "2/3",
|
|
1762
|
-
thumbnail: (
|
|
1774
|
+
thumbnail: (J = (D = c(s)) == null ? void 0 : D.advertisements) == null ? void 0 : J[T],
|
|
1763
1775
|
accept: ".png, .jpg, .jpeg, .mp4, .gif",
|
|
1764
1776
|
"recommended-size": "Recommended 4:5 ratio / 1080px x 1350px",
|
|
1765
|
-
file:
|
|
1766
|
-
"onUpdate:file": (
|
|
1767
|
-
|
|
1777
|
+
file: c(p)[T] ?? void 0,
|
|
1778
|
+
"onUpdate:file": (le) => {
|
|
1779
|
+
c(s).advertisements || (c(s).advertisements = []), le ? (c(s).advertisements[T] = "", c(p)[T] = le) : (c(s).advertisements.splice(T, 1), c(p).splice(T, 1));
|
|
1768
1780
|
}
|
|
1769
1781
|
}, null, 8, ["thumbnail", "file", "onUpdate:file"]);
|
|
1770
1782
|
}), 256))
|
|
1771
|
-
])) :
|
|
1783
|
+
])) : ce("", !0)
|
|
1772
1784
|
]),
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
I(
|
|
1776
|
-
"model-value": ((
|
|
1785
|
+
w("div", Yn, [
|
|
1786
|
+
u[14] || (u[14] = w("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
|
|
1787
|
+
I(K, {
|
|
1788
|
+
"model-value": ((De = c(s)) == null ? void 0 : De.brand) || "",
|
|
1777
1789
|
"max-length": 15,
|
|
1778
1790
|
label: "Brand Name",
|
|
1779
1791
|
"show-word-count": "",
|
|
1780
|
-
"helper-text": `RM 0 ${((
|
|
1781
|
-
"onUpdate:modelValue":
|
|
1792
|
+
"helper-text": `RM 0 ${((ke = c(s)) == null ? void 0 : ke.brand) || ""}: YOUR CUSTOMER MESSAGE`,
|
|
1793
|
+
"onUpdate:modelValue": u[5] || (u[5] = (E) => c(s).brand = E)
|
|
1782
1794
|
}, null, 8, ["model-value", "helper-text"]),
|
|
1783
|
-
I(
|
|
1784
|
-
modelValue:
|
|
1785
|
-
"onUpdate:modelValue":
|
|
1786
|
-
variables:
|
|
1787
|
-
"user.name",
|
|
1788
|
-
"user.gender",
|
|
1789
|
-
"user.birthday",
|
|
1790
|
-
"user.phoneNumber",
|
|
1791
|
-
"membership.url"
|
|
1792
|
-
],
|
|
1795
|
+
I(Tt, {
|
|
1796
|
+
modelValue: c(s).welcomeMessage,
|
|
1797
|
+
"onUpdate:modelValue": u[6] || (u[6] = (E) => c(s).welcomeMessage = E),
|
|
1798
|
+
variables: c(M),
|
|
1793
1799
|
placeholder: "Hi there, you have been invited to join membership"
|
|
1794
|
-
}, null, 8, ["modelValue"])
|
|
1800
|
+
}, null, 8, ["modelValue", "variables"])
|
|
1795
1801
|
]),
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1802
|
+
w("div", jn, [
|
|
1803
|
+
u[15] || (u[15] = w("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
|
|
1804
|
+
u[16] || (u[16] = w("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Email address that will be used to send email broadcast ", -1)),
|
|
1805
|
+
c(m).length ? ce("", !0) : (x(), fe(z, {
|
|
1800
1806
|
key: 0,
|
|
1801
|
-
onClick:
|
|
1807
|
+
onClick: F,
|
|
1802
1808
|
label: "Add new email address"
|
|
1803
1809
|
})),
|
|
1804
|
-
|
|
1805
|
-
I(
|
|
1806
|
-
"model-value": ((
|
|
1810
|
+
c(m).length ? (x(), q(ae, { key: 1 }, [
|
|
1811
|
+
I(vt, {
|
|
1812
|
+
"model-value": ((xe = (Ve = c(s)) == null ? void 0 : Ve.email) == null ? void 0 : xe.from) || null,
|
|
1807
1813
|
label: "From Address",
|
|
1808
|
-
items:
|
|
1814
|
+
items: c(m).map((E) => ({
|
|
1809
1815
|
label: E.emailAddress,
|
|
1810
1816
|
value: E.emailAddress
|
|
1811
1817
|
})),
|
|
1812
|
-
placeholder:
|
|
1813
|
-
"onUpdate:modelValue":
|
|
1814
|
-
var T,
|
|
1815
|
-
(T =
|
|
1818
|
+
placeholder: c(B) ? c(B).emailAddress : "No email address available",
|
|
1819
|
+
"onUpdate:modelValue": u[7] || (u[7] = (E) => {
|
|
1820
|
+
var T, D;
|
|
1821
|
+
(T = c(s)) != null && T.email || (c(s).email = {
|
|
1816
1822
|
from: E,
|
|
1817
|
-
name: (
|
|
1818
|
-
}),
|
|
1823
|
+
name: (D = c(m).find((J) => J.emailAddress == E)) == null ? void 0 : D.name
|
|
1824
|
+
}), c(s).email.from = E || null;
|
|
1819
1825
|
}),
|
|
1820
|
-
rules: [
|
|
1826
|
+
rules: [c(Oe).ruleAtPath(c(g), "email.from")]
|
|
1821
1827
|
}, null, 8, ["model-value", "items", "placeholder", "rules"]),
|
|
1822
|
-
I(
|
|
1823
|
-
"model-value": ((
|
|
1828
|
+
I(K, {
|
|
1829
|
+
"model-value": ((ze = ($e = c(s)) == null ? void 0 : $e.email) == null ? void 0 : ze.name) || null,
|
|
1824
1830
|
label: "Sender name",
|
|
1825
1831
|
disabled: "",
|
|
1826
|
-
placeholder: ((
|
|
1827
|
-
"onUpdate:modelValue":
|
|
1832
|
+
placeholder: ((He = c(B)) == null ? void 0 : He.name) || null,
|
|
1833
|
+
"onUpdate:modelValue": u[8] || (u[8] = (E) => {
|
|
1828
1834
|
var T;
|
|
1829
|
-
(T =
|
|
1835
|
+
(T = c(s)) != null && T.email || (c(s).email = {
|
|
1830
1836
|
name: E
|
|
1831
|
-
}),
|
|
1837
|
+
}), c(s).email.name = E || null;
|
|
1832
1838
|
}),
|
|
1833
|
-
rules: [
|
|
1839
|
+
rules: [c(Oe).ruleAtPath(c(g), "email.name")]
|
|
1834
1840
|
}, null, 8, ["model-value", "placeholder", "rules"])
|
|
1835
|
-
], 64)) :
|
|
1841
|
+
], 64)) : ce("", !0)
|
|
1836
1842
|
]),
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1843
|
+
w("div", Jn, [
|
|
1844
|
+
u[17] || (u[17] = w("div", { class: "fm-typo-en-title-sm-800" }, [
|
|
1845
|
+
te(" Free Credit as Discount "),
|
|
1846
|
+
w("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
|
|
1841
1847
|
], -1)),
|
|
1842
|
-
I(
|
|
1843
|
-
"model-value":
|
|
1844
|
-
"onUpdate:modelValue":
|
|
1848
|
+
I(ve, {
|
|
1849
|
+
"model-value": c(s).freeCreditAsDiscount ?? !1,
|
|
1850
|
+
"onUpdate:modelValue": u[9] || (u[9] = (E) => c(s).freeCreditAsDiscount = E),
|
|
1845
1851
|
label: "Free Credit as Discount",
|
|
1846
1852
|
sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
|
|
1847
1853
|
"label-placement": "right",
|
|
1848
1854
|
value: ""
|
|
1849
1855
|
}, null, 8, ["model-value"])
|
|
1850
1856
|
]),
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
I(
|
|
1857
|
+
w("div", qn, [
|
|
1858
|
+
w("div", Gn, [
|
|
1859
|
+
u[18] || (u[18] = te(" Member Card ")),
|
|
1860
|
+
I(ee, { variant: "premium" })
|
|
1855
1861
|
]),
|
|
1856
|
-
I(
|
|
1857
|
-
"model-value":
|
|
1858
|
-
"onUpdate:modelValue":
|
|
1862
|
+
I(ve, {
|
|
1863
|
+
"model-value": c(s).cardEnable ?? !1,
|
|
1864
|
+
"onUpdate:modelValue": u[10] || (u[10] = (E) => c(s).cardEnable = E),
|
|
1859
1865
|
label: "",
|
|
1860
1866
|
sublabel: "Allow member to bind card via member app",
|
|
1861
1867
|
"label-placement": "right",
|
|
1862
1868
|
value: "",
|
|
1863
|
-
disabled: !
|
|
1869
|
+
disabled: !c(r).isPremium
|
|
1864
1870
|
}, null, 8, ["model-value", "disabled"])
|
|
1865
1871
|
]),
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
I(
|
|
1872
|
+
w("div", Qn, [
|
|
1873
|
+
u[19] || (u[19] = w("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
|
|
1874
|
+
I(It, {
|
|
1869
1875
|
label: "Select restaurant",
|
|
1870
|
-
"model-value":
|
|
1871
|
-
"onUpdate:modelValue":
|
|
1876
|
+
"model-value": c(s).targetLocation ?? null,
|
|
1877
|
+
"onUpdate:modelValue": u[11] || (u[11] = (E) => c(s).targetLocation = E)
|
|
1872
1878
|
}, null, 8, ["model-value"])
|
|
1873
1879
|
]),
|
|
1874
|
-
|
|
1875
|
-
I(
|
|
1880
|
+
w("div", Xn, [
|
|
1881
|
+
I(z, {
|
|
1876
1882
|
label: "Update",
|
|
1877
1883
|
type: "button",
|
|
1878
|
-
onClick:
|
|
1879
|
-
disabled: !!
|
|
1880
|
-
loading: !!
|
|
1884
|
+
onClick: U,
|
|
1885
|
+
disabled: !!c(e).loadingQueue.length,
|
|
1886
|
+
loading: !!c(e).loadingQueue.length
|
|
1881
1887
|
}, null, 8, ["disabled", "loading"])
|
|
1882
1888
|
])
|
|
1883
1889
|
])
|
|
1884
1890
|
]),
|
|
1885
|
-
|
|
1886
|
-
I(
|
|
1891
|
+
w("div", Zn, [
|
|
1892
|
+
I(j, {
|
|
1887
1893
|
variant: "outlined",
|
|
1888
1894
|
class: "flex flex-col p-24 gap-8"
|
|
1889
1895
|
}, {
|
|
1890
|
-
default:
|
|
1891
|
-
var E, T,
|
|
1896
|
+
default: ne(() => {
|
|
1897
|
+
var E, T, D;
|
|
1892
1898
|
return [
|
|
1893
|
-
|
|
1894
|
-
I(
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1899
|
+
u[24] || (u[24] = w("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
|
|
1900
|
+
I(Ct, { class: "my-4" }),
|
|
1901
|
+
w("div", null, [
|
|
1902
|
+
u[20] || (u[20] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
|
|
1903
|
+
w("div", Wn, k(c(s).name), 1)
|
|
1898
1904
|
]),
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1905
|
+
w("div", null, [
|
|
1906
|
+
u[21] || (u[21] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
|
|
1907
|
+
w("div", eo, k((((E = c(s).advertisements) == null ? void 0 : E.length) ?? 0) || "No advertisments"), 1)
|
|
1902
1908
|
]),
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1909
|
+
w("div", null, [
|
|
1910
|
+
u[22] || (u[22] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
|
|
1911
|
+
w("div", to, k(c(s).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
|
|
1906
1912
|
]),
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
(
|
|
1913
|
+
w("div", null, [
|
|
1914
|
+
u[23] || (u[23] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
|
|
1915
|
+
w("div", no, k(!c(s).targetLocation || c(s).targetLocation.length == c(Se)().locations.length ? "All locations" : (D = (T = c(s)) == null ? void 0 : T.targetLocation) == null ? void 0 : D.map(
|
|
1916
|
+
(J) => c(r).locations.find((le) => le._id == J).name
|
|
1911
1917
|
).join(", ")), 1)
|
|
1912
1918
|
])
|
|
1913
1919
|
];
|
|
@@ -1915,11 +1921,11 @@ const Sn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1915
1921
|
_: 1
|
|
1916
1922
|
})
|
|
1917
1923
|
])
|
|
1918
|
-
])) :
|
|
1924
|
+
])) : ce("", !0)
|
|
1919
1925
|
], 64);
|
|
1920
1926
|
};
|
|
1921
1927
|
}
|
|
1922
1928
|
});
|
|
1923
1929
|
export {
|
|
1924
|
-
|
|
1930
|
+
Ao as default
|
|
1925
1931
|
};
|