@one-payments/web-components 1.1.30 → 1.1.32
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/index.js +83 -121
- package/dist/one-payment.browser.iife.js +4 -42
- package/dist/one-payment.browser.iife.js.map +1 -1
- package/dist/one-payment.d.ts.map +1 -1
- package/dist/one-payment.js +1 -39
- package/dist/one-payment.js.map +1 -1
- package/docs/shopify-checkout-integration-analysis.md +496 -0
- package/docs/wix-checkout-integration-analysis.md +695 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const ye = globalThis, Ve = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
6
|
+
const ye = globalThis, Ve = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ze = Symbol(), Ge = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let ut = class {
|
|
8
8
|
constructor(e, r, n) {
|
|
9
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== Ze) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = r;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
@@ -22,13 +22,13 @@ let ut = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Bt = (t) => new ut(typeof t == "string" ? t : t + "", void 0,
|
|
25
|
+
const Bt = (t) => new ut(typeof t == "string" ? t : t + "", void 0, Ze), Ut = (t, ...e) => {
|
|
26
26
|
const r = t.length === 1 ? t[0] : e.reduce((n, i, o) => n + ((s) => {
|
|
27
27
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
28
28
|
if (typeof s == "number") return s;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(i) + t[o + 1], t[0]);
|
|
31
|
-
return new ut(r, t,
|
|
31
|
+
return new ut(r, t, Ze);
|
|
32
32
|
}, zt = (t, e) => {
|
|
33
33
|
if (Ve) t.adoptedStyleSheets = e.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
|
|
34
34
|
else for (const r of e) {
|
|
@@ -45,7 +45,7 @@ const Bt = (t) => new ut(typeof t == "string" ? t : t + "", void 0, Ye), Ut = (t
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: qt, defineProperty: Ot, getOwnPropertyDescriptor: jt, getOwnPropertyNames: Vt, getOwnPropertySymbols:
|
|
48
|
+
const { is: qt, defineProperty: Ot, getOwnPropertyDescriptor: jt, getOwnPropertyNames: Vt, getOwnPropertySymbols: Zt, getPrototypeOf: Yt } = Object, O = globalThis, $e = O.trustedTypes, Ht = $e ? $e.emptyScript : "", Ie = O.reactiveElementPolyfillSupport, ie = (t, e) => t, be = { toAttribute(t, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
t = t ? Ht : null;
|
|
@@ -73,7 +73,7 @@ const { is: qt, defineProperty: Ot, getOwnPropertyDescriptor: jt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return r;
|
|
76
|
-
} },
|
|
76
|
+
} }, Ye = (t, e) => !qt(t, e), et = { attribute: !0, type: String, converter: be, reflect: !1, useDefault: !1, hasChanged: Ye };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), O.litPropertyMetadata ?? (O.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let Q = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
@@ -104,13 +104,13 @@ let Q = class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(ie("elementProperties"))) return;
|
|
107
|
-
const e =
|
|
107
|
+
const e = Yt(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
111
|
if (this.hasOwnProperty(ie("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ie("properties"))) {
|
|
113
|
-
const r = this.properties, n = [...Vt(r), ...
|
|
113
|
+
const r = this.properties, n = [...Vt(r), ...Zt(r)];
|
|
114
114
|
for (const i of n) this.createProperty(i, r[i]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
@@ -202,7 +202,7 @@ let Q = class extends HTMLElement {
|
|
|
202
202
|
var i;
|
|
203
203
|
if (e !== void 0) {
|
|
204
204
|
const o = this.constructor, s = this[e];
|
|
205
|
-
if (n ?? (n = o.getPropertyOptions(e)), !((n.hasChanged ??
|
|
205
|
+
if (n ?? (n = o.getPropertyOptions(e)), !((n.hasChanged ?? Ye)(s, r) || n.useDefault && n.reflect && s === ((i = this._$Ej) == null ? void 0 : i.get(e)) && !this.hasAttribute(o._$Eu(e, n)))) return;
|
|
206
206
|
this.C(e, r, n);
|
|
207
207
|
}
|
|
208
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -286,7 +286,7 @@ Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[ie("elementPrope
|
|
|
286
286
|
*/
|
|
287
287
|
const oe = globalThis, we = oe.trustedTypes, tt = we ? we.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ft = "$lit$", z = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + z, Wt = `<${mt}>`, K = document, le = () => K.createComment(""), de = (t) => t === null || typeof t != "object" && typeof t != "function", He = Array.isArray, Kt = (t) => He(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", Me = `[
|
|
288
288
|
\f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, nt = />/g, V = RegExp(`>|${Me}(?:([^\\s"'>=/]+)(${Me}*=${Me}*(?:[^
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Qt = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), P = Qt(1), J = Symbol.for("lit-noChange"), I = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(),
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Qt = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), P = Qt(1), J = Symbol.for("lit-noChange"), I = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), Y = K.createTreeWalker(K, 129);
|
|
290
290
|
function gt(t, e) {
|
|
291
291
|
if (!He(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
292
|
return tt !== void 0 ? tt.createHTML(e) : e;
|
|
@@ -309,11 +309,11 @@ class ce {
|
|
|
309
309
|
this.parts = [];
|
|
310
310
|
let o = 0, s = 0;
|
|
311
311
|
const l = e.length - 1, a = this.parts, [d, c] = Xt(e, r);
|
|
312
|
-
if (this.el = ce.createElement(d, n),
|
|
312
|
+
if (this.el = ce.createElement(d, n), Y.currentNode = this.el.content, r === 2 || r === 3) {
|
|
313
313
|
const u = this.el.content.firstChild;
|
|
314
314
|
u.replaceWith(...u.childNodes);
|
|
315
315
|
}
|
|
316
|
-
for (; (i =
|
|
316
|
+
for (; (i = Y.nextNode()) !== null && a.length < l; ) {
|
|
317
317
|
if (i.nodeType === 1) {
|
|
318
318
|
if (i.hasAttributes()) for (const u of i.getAttributeNames()) if (u.endsWith(ft)) {
|
|
319
319
|
const f = c[s++], h = i.getAttribute(u).split(z), m = /([.?@])?(.*)/.exec(f);
|
|
@@ -323,7 +323,7 @@ class ce {
|
|
|
323
323
|
const u = i.textContent.split(z), f = u.length - 1;
|
|
324
324
|
if (f > 0) {
|
|
325
325
|
i.textContent = we ? we.emptyScript : "";
|
|
326
|
-
for (let h = 0; h < f; h++) i.append(u[h], le()),
|
|
326
|
+
for (let h = 0; h < f; h++) i.append(u[h], le()), Y.nextNode(), a.push({ type: 2, index: ++o });
|
|
327
327
|
i.append(u[f], le());
|
|
328
328
|
}
|
|
329
329
|
}
|
|
@@ -359,16 +359,16 @@ class Jt {
|
|
|
359
359
|
}
|
|
360
360
|
u(e) {
|
|
361
361
|
const { el: { content: r }, parts: n } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? K).importNode(r, !0);
|
|
362
|
-
|
|
363
|
-
let o =
|
|
362
|
+
Y.currentNode = i;
|
|
363
|
+
let o = Y.nextNode(), s = 0, l = 0, a = n[0];
|
|
364
364
|
for (; a !== void 0; ) {
|
|
365
365
|
if (s === a.index) {
|
|
366
366
|
let d;
|
|
367
367
|
a.type === 2 ? d = new ue(o, o.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (d = new er(o, this, e)), this._$AV.push(d), a = n[++l];
|
|
368
368
|
}
|
|
369
|
-
s !== (a == null ? void 0 : a.index) && (o =
|
|
369
|
+
s !== (a == null ? void 0 : a.index) && (o = Y.nextNode(), s++);
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return Y.currentNode = K, i;
|
|
372
372
|
}
|
|
373
373
|
p(e) {
|
|
374
374
|
let r = 0;
|
|
@@ -566,7 +566,7 @@ const rr = (t) => (e, r) => {
|
|
|
566
566
|
* Copyright 2017 Google LLC
|
|
567
567
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
568
568
|
*/
|
|
569
|
-
const nr = { attribute: !0, type: String, converter: be, reflect: !1, hasChanged:
|
|
569
|
+
const nr = { attribute: !0, type: String, converter: be, reflect: !1, hasChanged: Ye }, ir = (t = nr, e, r) => {
|
|
570
570
|
const { kind: n, metadata: i } = r;
|
|
571
571
|
let o = globalThis.litPropertyMetadata.get(i);
|
|
572
572
|
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), n === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(r.name, t), n === "accessor") {
|
|
@@ -604,7 +604,7 @@ function M(t) {
|
|
|
604
604
|
function or(t) {
|
|
605
605
|
return t instanceof Error && ("response" in t && typeof t.response == "object" && t.response !== null || "data" in t && typeof t.data == "object" && t.data !== null);
|
|
606
606
|
}
|
|
607
|
-
var
|
|
607
|
+
var Z = {
|
|
608
608
|
CARD: "card",
|
|
609
609
|
PAYNOW: "paynow"
|
|
610
610
|
}, T = {
|
|
@@ -742,7 +742,7 @@ var ar = class {
|
|
|
742
742
|
function lr(t) {
|
|
743
743
|
switch (t) {
|
|
744
744
|
case "prod":
|
|
745
|
-
return "https://public.one.ooo";
|
|
745
|
+
return "https://public.prod.one.ooo";
|
|
746
746
|
case "demo":
|
|
747
747
|
return "https://public.demo.one.ooo";
|
|
748
748
|
case "dev":
|
|
@@ -1409,21 +1409,21 @@ yt.prototype = {
|
|
|
1409
1409
|
},
|
|
1410
1410
|
getFixedDateString: function(t) {
|
|
1411
1411
|
var e = this, r = e.datePattern, n = [], i = 0, o = 0, s = 0, l = 0, a = 0, d = 0, c, u, f, h = !1;
|
|
1412
|
-
t.length === 4 && r[0].toLowerCase() !== "y" && r[1].toLowerCase() !== "y" && (l = r[0] === "d" ? 0 : 2, a = 2 - l, c = parseInt(t.slice(l, l + 2), 10), u = parseInt(t.slice(a, a + 2), 10), n = this.getFixedDate(c, u, 0)), t.length === 8 && (r.forEach(function(p,
|
|
1412
|
+
t.length === 4 && r[0].toLowerCase() !== "y" && r[1].toLowerCase() !== "y" && (l = r[0] === "d" ? 0 : 2, a = 2 - l, c = parseInt(t.slice(l, l + 2), 10), u = parseInt(t.slice(a, a + 2), 10), n = this.getFixedDate(c, u, 0)), t.length === 8 && (r.forEach(function(p, k) {
|
|
1413
1413
|
switch (p) {
|
|
1414
1414
|
case "d":
|
|
1415
|
-
i =
|
|
1415
|
+
i = k;
|
|
1416
1416
|
break;
|
|
1417
1417
|
case "m":
|
|
1418
|
-
o =
|
|
1418
|
+
o = k;
|
|
1419
1419
|
break;
|
|
1420
1420
|
default:
|
|
1421
|
-
s =
|
|
1421
|
+
s = k;
|
|
1422
1422
|
break;
|
|
1423
1423
|
}
|
|
1424
1424
|
}), d = s * 2, l = i <= s ? i * 2 : i * 2 + 2, a = o <= s ? o * 2 : o * 2 + 2, c = parseInt(t.slice(l, l + 2), 10), u = parseInt(t.slice(a, a + 2), 10), f = parseInt(t.slice(d, d + 4), 10), h = t.slice(d, d + 4).length === 4, n = this.getFixedDate(c, u, f)), t.length === 4 && (r[0] === "y" || r[1] === "y") && (a = r[0] === "m" ? 0 : 2, d = 2 - a, u = parseInt(t.slice(a, a + 2), 10), f = parseInt(t.slice(d, d + 2), 10), h = t.slice(d, d + 2).length === 2, n = [0, u, f]), t.length === 6 && (r[0] === "Y" || r[1] === "Y") && (a = r[0] === "m" ? 0 : 4, d = 2 - 0.5 * a, u = parseInt(t.slice(a, a + 2), 10), f = parseInt(t.slice(d, d + 4), 10), h = t.slice(d, d + 4).length === 4, n = [0, u, f]), n = e.getRangeFixedDate(n), e.date = n;
|
|
1425
|
-
var m = n.length === 0 ? t : r.reduce(function(p,
|
|
1426
|
-
switch (
|
|
1425
|
+
var m = n.length === 0 ? t : r.reduce(function(p, k) {
|
|
1426
|
+
switch (k) {
|
|
1427
1427
|
case "d":
|
|
1428
1428
|
return p + (n[0] === 0 ? "" : e.addLeadingZero(n[0]));
|
|
1429
1429
|
case "m":
|
|
@@ -2020,7 +2020,7 @@ D.isKanjiModeEnabled = function() {
|
|
|
2020
2020
|
D.toSJIS = function(e) {
|
|
2021
2021
|
return We(e);
|
|
2022
2022
|
};
|
|
2023
|
-
var
|
|
2023
|
+
var Ce = {};
|
|
2024
2024
|
(function(t) {
|
|
2025
2025
|
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
2026
2026
|
function e(r) {
|
|
@@ -2054,7 +2054,7 @@ var ke = {};
|
|
|
2054
2054
|
return i;
|
|
2055
2055
|
}
|
|
2056
2056
|
};
|
|
2057
|
-
})(
|
|
2057
|
+
})(Ce);
|
|
2058
2058
|
function xt() {
|
|
2059
2059
|
this.buffer = [], this.length = 0;
|
|
2060
2060
|
}
|
|
@@ -2094,7 +2094,7 @@ me.prototype.xor = function(t, e, r) {
|
|
|
2094
2094
|
me.prototype.isReserved = function(t, e) {
|
|
2095
2095
|
return this.reservedBit[t * this.size + e];
|
|
2096
2096
|
};
|
|
2097
|
-
var
|
|
2097
|
+
var Cr = me, St = {};
|
|
2098
2098
|
(function(t) {
|
|
2099
2099
|
const e = D.getSymbolSize;
|
|
2100
2100
|
t.getRowColCoords = function(n) {
|
|
@@ -2113,10 +2113,10 @@ var kr = me, St = {};
|
|
|
2113
2113
|
return i;
|
|
2114
2114
|
};
|
|
2115
2115
|
})(St);
|
|
2116
|
-
var
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
const r =
|
|
2116
|
+
var Ct = {};
|
|
2117
|
+
const kr = D.getSymbolSize, lt = 7;
|
|
2118
|
+
Ct.getPositions = function(e) {
|
|
2119
|
+
const r = kr(e);
|
|
2120
2120
|
return [
|
|
2121
2121
|
// top-left
|
|
2122
2122
|
[0, 0],
|
|
@@ -2126,7 +2126,7 @@ kt.getPositions = function(e) {
|
|
|
2126
2126
|
[0, r - lt]
|
|
2127
2127
|
];
|
|
2128
2128
|
};
|
|
2129
|
-
var
|
|
2129
|
+
var kt = {};
|
|
2130
2130
|
(function(t) {
|
|
2131
2131
|
t.Patterns = {
|
|
2132
2132
|
PATTERN000: 0,
|
|
@@ -2221,9 +2221,9 @@ var Ct = {};
|
|
|
2221
2221
|
}
|
|
2222
2222
|
return l;
|
|
2223
2223
|
};
|
|
2224
|
-
})(
|
|
2225
|
-
var
|
|
2226
|
-
const q =
|
|
2224
|
+
})(kt);
|
|
2225
|
+
var ke = {};
|
|
2226
|
+
const q = Ce, pe = [
|
|
2227
2227
|
// L M Q H
|
|
2228
2228
|
1,
|
|
2229
2229
|
1,
|
|
@@ -2548,7 +2548,7 @@ const q = ke, pe = [
|
|
|
2548
2548
|
2040,
|
|
2549
2549
|
2430
|
|
2550
2550
|
];
|
|
2551
|
-
|
|
2551
|
+
ke.getBlocksCount = function(e, r) {
|
|
2552
2552
|
switch (r) {
|
|
2553
2553
|
case q.L:
|
|
2554
2554
|
return pe[(e - 1) * 4 + 0];
|
|
@@ -2562,7 +2562,7 @@ Ce.getBlocksCount = function(e, r) {
|
|
|
2562
2562
|
return;
|
|
2563
2563
|
}
|
|
2564
2564
|
};
|
|
2565
|
-
|
|
2565
|
+
ke.getTotalCodewordsCount = function(e, r) {
|
|
2566
2566
|
switch (r) {
|
|
2567
2567
|
case q.L:
|
|
2568
2568
|
return ge[(e - 1) * 4 + 0];
|
|
@@ -2725,7 +2725,7 @@ L.testAlphanumeric = function(e) {
|
|
|
2725
2725
|
};
|
|
2726
2726
|
})(j);
|
|
2727
2727
|
(function(t) {
|
|
2728
|
-
const e = D, r =
|
|
2728
|
+
const e = D, r = ke, n = Ce, i = j, o = Qe, s = 7973, l = e.getBCHDigit(s);
|
|
2729
2729
|
function a(f, h, m) {
|
|
2730
2730
|
for (let p = 1; p <= 40; p++)
|
|
2731
2731
|
if (h <= t.getCapacity(p, m, f))
|
|
@@ -2737,8 +2737,8 @@ L.testAlphanumeric = function(e) {
|
|
|
2737
2737
|
function c(f, h) {
|
|
2738
2738
|
let m = 0;
|
|
2739
2739
|
return f.forEach(function(p) {
|
|
2740
|
-
const
|
|
2741
|
-
m +=
|
|
2740
|
+
const k = d(p.mode, h);
|
|
2741
|
+
m += k + p.getBitsLength();
|
|
2742
2742
|
}), m;
|
|
2743
2743
|
}
|
|
2744
2744
|
function u(f, h) {
|
|
@@ -2752,7 +2752,7 @@ L.testAlphanumeric = function(e) {
|
|
|
2752
2752
|
if (!o.isValid(h))
|
|
2753
2753
|
throw new Error("Invalid QR Code version");
|
|
2754
2754
|
typeof p > "u" && (p = i.BYTE);
|
|
2755
|
-
const
|
|
2755
|
+
const k = e.getSymbolTotalCodewords(h), b = r.getTotalCodewordsCount(h, m), w = (k - b) * 8;
|
|
2756
2756
|
if (p === i.MIXED) return w;
|
|
2757
2757
|
const y = w - d(p, h);
|
|
2758
2758
|
switch (p) {
|
|
@@ -2768,16 +2768,16 @@ L.testAlphanumeric = function(e) {
|
|
|
2768
2768
|
}
|
|
2769
2769
|
}, t.getBestVersionForData = function(h, m) {
|
|
2770
2770
|
let p;
|
|
2771
|
-
const
|
|
2771
|
+
const k = n.from(m, n.M);
|
|
2772
2772
|
if (Array.isArray(h)) {
|
|
2773
2773
|
if (h.length > 1)
|
|
2774
|
-
return u(h,
|
|
2774
|
+
return u(h, k);
|
|
2775
2775
|
if (h.length === 0)
|
|
2776
2776
|
return 1;
|
|
2777
2777
|
p = h[0];
|
|
2778
2778
|
} else
|
|
2779
2779
|
p = h;
|
|
2780
|
-
return a(p.mode, p.getLength(),
|
|
2780
|
+
return a(p.mode, p.getLength(), k);
|
|
2781
2781
|
}, t.getEncodedBits = function(h) {
|
|
2782
2782
|
if (!o.isValid(h) || h < 7)
|
|
2783
2783
|
throw new Error("Invalid QR Code version");
|
|
@@ -2941,10 +2941,10 @@ var Or = te, Nt = { exports: {} };
|
|
|
2941
2941
|
s[n] = 0;
|
|
2942
2942
|
var l = e.PriorityQueue.make();
|
|
2943
2943
|
l.push(n, 0);
|
|
2944
|
-
for (var a, d, c, u, f, h, m, p,
|
|
2944
|
+
for (var a, d, c, u, f, h, m, p, k; !l.empty(); ) {
|
|
2945
2945
|
a = l.pop(), d = a.value, u = a.cost, f = r[d] || {};
|
|
2946
2946
|
for (c in f)
|
|
2947
|
-
f.hasOwnProperty(c) && (h = f[c], m = u + h, p = s[c],
|
|
2947
|
+
f.hasOwnProperty(c) && (h = f[c], m = u + h, p = s[c], k = typeof s[c] > "u", (k || p > m) && (s[c] = m, l.push(c, m), o[c] = d));
|
|
2948
2948
|
}
|
|
2949
2949
|
if (typeof i < "u" && typeof s[i] > "u") {
|
|
2950
2950
|
var b = ["Could not find a path from ", n, " to ", i, "."].join("");
|
|
@@ -3007,20 +3007,20 @@ var jr = Nt.exports;
|
|
|
3007
3007
|
}
|
|
3008
3008
|
function c(b, w, y) {
|
|
3009
3009
|
const g = [];
|
|
3010
|
-
let
|
|
3011
|
-
for (; (
|
|
3010
|
+
let C;
|
|
3011
|
+
for (; (C = b.exec(y)) !== null; )
|
|
3012
3012
|
g.push({
|
|
3013
|
-
data:
|
|
3014
|
-
index:
|
|
3013
|
+
data: C[0],
|
|
3014
|
+
index: C.index,
|
|
3015
3015
|
mode: w,
|
|
3016
|
-
length:
|
|
3016
|
+
length: C[0].length
|
|
3017
3017
|
});
|
|
3018
3018
|
return g;
|
|
3019
3019
|
}
|
|
3020
3020
|
function u(b) {
|
|
3021
3021
|
const w = c(s.NUMERIC, e.NUMERIC, b), y = c(s.ALPHANUMERIC, e.ALPHANUMERIC, b);
|
|
3022
|
-
let g,
|
|
3023
|
-
return l.isKanjiModeEnabled() ? (g = c(s.BYTE, e.BYTE, b),
|
|
3022
|
+
let g, C;
|
|
3023
|
+
return l.isKanjiModeEnabled() ? (g = c(s.BYTE, e.BYTE, b), C = c(s.KANJI, e.KANJI, b)) : (g = c(s.BYTE_KANJI, e.BYTE, b), C = []), w.concat(y, g, C).sort(function(A, F) {
|
|
3024
3024
|
return A.index - F.index;
|
|
3025
3025
|
}).map(function(A) {
|
|
3026
3026
|
return {
|
|
@@ -3082,24 +3082,24 @@ var jr = Nt.exports;
|
|
|
3082
3082
|
}
|
|
3083
3083
|
function p(b, w) {
|
|
3084
3084
|
const y = {}, g = { start: {} };
|
|
3085
|
-
let
|
|
3085
|
+
let C = ["start"];
|
|
3086
3086
|
for (let E = 0; E < b.length; E++) {
|
|
3087
3087
|
const A = b[E], F = [];
|
|
3088
3088
|
for (let U = 0; U < A.length; U++) {
|
|
3089
3089
|
const R = A[U], re = "" + E + U;
|
|
3090
3090
|
F.push(re), y[re] = { node: R, lastCount: 0 }, g[re] = {};
|
|
3091
|
-
for (let Ae = 0; Ae <
|
|
3092
|
-
const B =
|
|
3091
|
+
for (let Ae = 0; Ae < C.length; Ae++) {
|
|
3092
|
+
const B = C[Ae];
|
|
3093
3093
|
y[B] && y[B].node.mode === R.mode ? (g[B][re] = f(y[B].lastCount + R.length, R.mode) - f(y[B].lastCount, R.mode), y[B].lastCount += R.length) : (y[B] && (y[B].lastCount = R.length), g[B][re] = f(R.length, R.mode) + 4 + e.getCharCountIndicator(R.mode, w));
|
|
3094
3094
|
}
|
|
3095
3095
|
}
|
|
3096
|
-
|
|
3096
|
+
C = F;
|
|
3097
3097
|
}
|
|
3098
|
-
for (let E = 0; E <
|
|
3099
|
-
g[
|
|
3098
|
+
for (let E = 0; E < C.length; E++)
|
|
3099
|
+
g[C[E]].end = 0;
|
|
3100
3100
|
return { map: g, table: y };
|
|
3101
3101
|
}
|
|
3102
|
-
function
|
|
3102
|
+
function k(b, w) {
|
|
3103
3103
|
let y;
|
|
3104
3104
|
const g = e.getBestModeForData(b);
|
|
3105
3105
|
if (y = e.from(w, g), y !== e.BYTE && y.bit < g.bit)
|
|
@@ -3118,10 +3118,10 @@ var jr = Nt.exports;
|
|
|
3118
3118
|
}
|
|
3119
3119
|
t.fromArray = function(w) {
|
|
3120
3120
|
return w.reduce(function(y, g) {
|
|
3121
|
-
return typeof g == "string" ? y.push(
|
|
3121
|
+
return typeof g == "string" ? y.push(k(g, null)) : g.data && y.push(k(g.data, g.mode)), y;
|
|
3122
3122
|
}, []);
|
|
3123
3123
|
}, t.fromString = function(w, y) {
|
|
3124
|
-
const g = u(w, l.isKanjiModeEnabled()),
|
|
3124
|
+
const g = u(w, l.isKanjiModeEnabled()), C = m(g), E = p(C, y), A = a.find_path(E.map, "start", "end"), F = [];
|
|
3125
3125
|
for (let U = 1; U < A.length - 1; U++)
|
|
3126
3126
|
F.push(E.table[A[U]].node);
|
|
3127
3127
|
return t.fromArray(h(F));
|
|
@@ -3131,7 +3131,7 @@ var jr = Nt.exports;
|
|
|
3131
3131
|
);
|
|
3132
3132
|
};
|
|
3133
3133
|
})(Tt);
|
|
3134
|
-
const Pe = D, Fe =
|
|
3134
|
+
const Pe = D, Fe = Ce, Vr = Sr, Zr = Cr, Yr = St, Hr = Ct, qe = kt, Oe = ke, Wr = Er, xe = At, Kr = Mt, Qr = j, Re = Tt;
|
|
3135
3135
|
function Xr(t, e) {
|
|
3136
3136
|
const r = t.size, n = Hr.getPositions(e);
|
|
3137
3137
|
for (let i = 0; i < n.length; i++) {
|
|
@@ -3150,7 +3150,7 @@ function Jr(t) {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
}
|
|
3152
3152
|
function Gr(t, e) {
|
|
3153
|
-
const r =
|
|
3153
|
+
const r = Yr.getPositions(e);
|
|
3154
3154
|
for (let n = 0; n < r.length; n++) {
|
|
3155
3155
|
const i = r[n][0], o = r[n][1];
|
|
3156
3156
|
for (let s = -2; s <= 2; s++)
|
|
@@ -3203,21 +3203,21 @@ function en(t, e, r) {
|
|
|
3203
3203
|
function tn(t, e, r) {
|
|
3204
3204
|
const n = Pe.getSymbolTotalCodewords(e), i = Oe.getTotalCodewordsCount(e, r), o = n - i, s = Oe.getBlocksCount(e, r), l = n % s, a = s - l, d = Math.floor(n / s), c = Math.floor(o / s), u = c + 1, f = d - c, h = new Wr(f);
|
|
3205
3205
|
let m = 0;
|
|
3206
|
-
const p = new Array(s),
|
|
3206
|
+
const p = new Array(s), k = new Array(s);
|
|
3207
3207
|
let b = 0;
|
|
3208
3208
|
const w = new Uint8Array(t.buffer);
|
|
3209
3209
|
for (let A = 0; A < s; A++) {
|
|
3210
3210
|
const F = A < a ? c : u;
|
|
3211
|
-
p[A] = w.slice(m, m + F),
|
|
3211
|
+
p[A] = w.slice(m, m + F), k[A] = h.encode(p[A]), m += F, b = Math.max(b, F);
|
|
3212
3212
|
}
|
|
3213
3213
|
const y = new Uint8Array(n);
|
|
3214
|
-
let g = 0,
|
|
3215
|
-
for (
|
|
3214
|
+
let g = 0, C, E;
|
|
3215
|
+
for (C = 0; C < b; C++)
|
|
3216
3216
|
for (E = 0; E < s; E++)
|
|
3217
|
-
|
|
3218
|
-
for (
|
|
3217
|
+
C < p[E].length && (y[g++] = p[E][C]);
|
|
3218
|
+
for (C = 0; C < f; C++)
|
|
3219
3219
|
for (E = 0; E < s; E++)
|
|
3220
|
-
y[g++] =
|
|
3220
|
+
y[g++] = k[E][C];
|
|
3221
3221
|
return y;
|
|
3222
3222
|
}
|
|
3223
3223
|
function rn(t, e, r, n) {
|
|
@@ -3245,7 +3245,7 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
3245
3245
|
Minimum version required to store current data is: ` + o + `.
|
|
3246
3246
|
`
|
|
3247
3247
|
);
|
|
3248
|
-
const s = en(e, r, i), l = Pe.getSymbolSize(e), a = new
|
|
3248
|
+
const s = en(e, r, i), l = Pe.getSymbolSize(e), a = new Zr(l);
|
|
3249
3249
|
return Xr(a, e), Jr(a), Gr(a, e), Le(a, r, 0), e >= 7 && _r(a, e), $r(a, s), isNaN(n) && (n = qe.getBestMask(
|
|
3250
3250
|
a,
|
|
3251
3251
|
Le.bind(null, a, r)
|
|
@@ -3308,8 +3308,8 @@ var Ft = {}, Xe = {};
|
|
|
3308
3308
|
for (let h = 0; h < d; h++) {
|
|
3309
3309
|
let m = (f * d + h) * 4, p = o.color.light;
|
|
3310
3310
|
if (f >= c && h >= c && f < d - c && h < d - c) {
|
|
3311
|
-
const
|
|
3312
|
-
p = u[l[
|
|
3311
|
+
const k = Math.floor((f - c) / a), b = Math.floor((h - c) / a);
|
|
3312
|
+
p = u[l[k * s + b] ? 1 : 0];
|
|
3313
3313
|
}
|
|
3314
3314
|
n[m++] = p.r, n[m++] = p.g, n[m++] = p.b, n[m] = p.a;
|
|
3315
3315
|
}
|
|
@@ -3488,7 +3488,7 @@ let v = class extends se {
|
|
|
3488
3488
|
return t.length === 0 ? [] : t.filter((e) => {
|
|
3489
3489
|
var r;
|
|
3490
3490
|
return !((r = this.excludePaymentMethods) != null && r.includes(e.id));
|
|
3491
|
-
}).map((e) => e.id ===
|
|
3491
|
+
}).map((e) => e.id === Z.PAYNOW && this.getTransactionData().currency !== "SGD" ? {
|
|
3492
3492
|
id: e.id,
|
|
3493
3493
|
enabled: !1,
|
|
3494
3494
|
disabledReason: "PayNow is only available for SGD currency"
|
|
@@ -3651,7 +3651,7 @@ let v = class extends se {
|
|
|
3651
3651
|
return;
|
|
3652
3652
|
this.paymentLocked = !0;
|
|
3653
3653
|
const t = this.cardFormData.expiry.split("/"), e = (t[0] || "").trim(), n = `20${(t[1] || "").trim().substring(0, 2)}`;
|
|
3654
|
-
this.sdk.submitPayment(
|
|
3654
|
+
this.sdk.submitPayment(Z.CARD, {
|
|
3655
3655
|
cardNumber: this.cardFormData.cardNumber.replace(/\s/g, ""),
|
|
3656
3656
|
expiryMonth: e,
|
|
3657
3657
|
expiryYear: n,
|
|
@@ -3662,7 +3662,7 @@ let v = class extends se {
|
|
|
3662
3662
|
});
|
|
3663
3663
|
}
|
|
3664
3664
|
handlePayNowPayment() {
|
|
3665
|
-
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(
|
|
3665
|
+
!this.sdk || this.currentState.status !== "ready" || (this.paymentLocked = !0, this.sdk.submitPayment(Z.PAYNOW, {
|
|
3666
3666
|
firstName: this.firstName,
|
|
3667
3667
|
lastName: this.lastName,
|
|
3668
3668
|
email: this.email
|
|
@@ -3989,7 +3989,6 @@ let v = class extends se {
|
|
|
3989
3989
|
</div>
|
|
3990
3990
|
<h2 class="result-title">Payment Failed</h2>
|
|
3991
3991
|
<p class="result-message">${t}</p>
|
|
3992
|
-
<button class="retry-button" @click=${() => window.location.reload()}>Try Again</button>
|
|
3993
3992
|
</div>
|
|
3994
3993
|
`;
|
|
3995
3994
|
}
|
|
@@ -4009,14 +4008,9 @@ let v = class extends se {
|
|
|
4009
4008
|
l && this.selectedMethod !== l.id && (this.selectedMethod = l.id);
|
|
4010
4009
|
}
|
|
4011
4010
|
}
|
|
4012
|
-
const n = (s) => s ===
|
|
4011
|
+
const n = (s) => s === Z.CARD ? "Card" : "PayNow", i = (s) => s === Z.CARD ? P`
|
|
4013
4012
|
<div class="method-icon-right">
|
|
4014
|
-
<svg
|
|
4015
|
-
width="24"
|
|
4016
|
-
height="24"
|
|
4017
|
-
viewBox="0 0 24 24"
|
|
4018
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4019
|
-
>
|
|
4013
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
4020
4014
|
<path
|
|
4021
4015
|
fill="none"
|
|
4022
4016
|
d="M22 10H2M11 14H6M2 8.2L2 15.8C2 16.9201 2 17.4802 2.21799 17.908C2.40973 18.2843 2.71569 18.5903 3.09202 18.782C3.51984 19 4.07989 19 5.2 19L18.8 19C19.9201 19 20.4802 19 20.908 18.782C21.2843 18.5903 21.5903 18.2843 21.782 17.908C22 17.4802 22 16.9201 22 15.8V8.2C22 7.0799 22 6.51984 21.782 6.09202C21.5903 5.7157 21.2843 5.40974 20.908 5.21799C20.4802 5 19.9201 5 18.8 5L5.2 5C4.0799 5 3.51984 5 3.09202 5.21799C2.7157 5.40973 2.40973 5.71569 2.21799 6.09202C2 6.51984 2 7.07989 2 8.2Z"
|
|
@@ -4027,7 +4021,7 @@ let v = class extends se {
|
|
|
4027
4021
|
/>
|
|
4028
4022
|
</svg>
|
|
4029
4023
|
</div>
|
|
4030
|
-
` : s ===
|
|
4024
|
+
` : s === Z.PAYNOW ? P`
|
|
4031
4025
|
<div class="method-icon-right">
|
|
4032
4026
|
<img src="${cr}" alt="PayNow" />
|
|
4033
4027
|
</div>
|
|
@@ -4064,7 +4058,7 @@ let v = class extends se {
|
|
|
4064
4058
|
${i(s.id)}
|
|
4065
4059
|
</div>
|
|
4066
4060
|
${l ? P`<div class="method-content">
|
|
4067
|
-
${s.id ===
|
|
4061
|
+
${s.id === Z.CARD ? this.renderCardForm() : this.renderPayNowContent()}
|
|
4068
4062
|
</div>` : ""}
|
|
4069
4063
|
</div>
|
|
4070
4064
|
`;
|
|
@@ -4669,38 +4663,6 @@ v.styles = Ut`
|
|
|
4669
4663
|
line-height: 1.5;
|
|
4670
4664
|
}
|
|
4671
4665
|
|
|
4672
|
-
.retry-button {
|
|
4673
|
-
display: inline-block;
|
|
4674
|
-
min-width: 162px;
|
|
4675
|
-
height: 52px;
|
|
4676
|
-
padding: 10px 24px;
|
|
4677
|
-
font-size: 18px;
|
|
4678
|
-
font-weight: 650;
|
|
4679
|
-
color: #ffbe32;
|
|
4680
|
-
line-height: normal;
|
|
4681
|
-
border: 0;
|
|
4682
|
-
border-radius: 40px;
|
|
4683
|
-
text-decoration: none;
|
|
4684
|
-
transition:
|
|
4685
|
-
background-color 0.2s ease,
|
|
4686
|
-
transform 0.05s ease;
|
|
4687
|
-
overflow: hidden;
|
|
4688
|
-
user-select: none;
|
|
4689
|
-
position: relative;
|
|
4690
|
-
cursor: pointer;
|
|
4691
|
-
background-color: #2a2327;
|
|
4692
|
-
white-space: nowrap;
|
|
4693
|
-
letter-spacing: 0;
|
|
4694
|
-
}
|
|
4695
|
-
|
|
4696
|
-
.retry-button:hover {
|
|
4697
|
-
background: #000;
|
|
4698
|
-
}
|
|
4699
|
-
|
|
4700
|
-
.retry-button:active {
|
|
4701
|
-
transform: translateY(1px);
|
|
4702
|
-
}
|
|
4703
|
-
|
|
4704
4666
|
/* Mobile responsiveness */
|
|
4705
4667
|
@media (max-width: 640px) {
|
|
4706
4668
|
.header {
|