@feedmepos/mf-payment 1.9.13-dev → 1.9.15
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/{Actions.vue_vue_type_script_setup_true_lang-BSVr75X6.js → Actions.vue_vue_type_script_setup_true_lang-BXgHGNC-.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DepXoTFK.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CVX7jsCL.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-T7WuGpcv.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DyyOEAlS.js} +2 -2
- package/dist/{Chargeback-BGGrIqC1.js → Chargeback-CzGb2qrj.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-LFfqIXzg.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BL_91vvu.js} +1 -1
- package/dist/{ExternalTerminal-Bgil7e9q.js → ExternalTerminal-DqxMSE0K.js} +6 -6
- package/dist/{OnboardForm-Bi55-0QC.js → OnboardForm-Mdi-W6G_.js} +6 -6
- package/dist/{OnboardForm-GY9iFm_0.js → OnboardForm-xqybdqSJ.js} +6 -6
- package/dist/{OnboardSubmission-BjxoLtdy.js → OnboardSubmission-C3rTFoVo.js} +3 -3
- package/dist/{OnboardSubmission-XtXfACsT.js → OnboardSubmission-COfHEeQD.js} +6 -6
- package/dist/{PayoutAccount-Cf9KDVaS.js → PayoutAccount-6BtrDGLI.js} +7 -7
- package/dist/{PayoutAccount-DRJkFbb7.js → PayoutAccount-DIUT5yBj.js} +5 -5
- package/dist/{PayoutAccountSetting-jo5pD78A.js → PayoutAccountSetting-yY-uwUjp.js} +303 -298
- package/dist/{Restaurant-T23GXyN4.js → Restaurant-BAoDUO78.js} +4 -4
- package/dist/{RestaurantSetting-Dt_43sff.js → RestaurantSetting-DlP5Tenc.js} +133 -127
- package/dist/{Settlement-DYIC_qx5.js → Settlement-CcCDXA-0.js} +4 -4
- package/dist/{Settlement-iQawCsTk.js → Settlement-CjXaV58A.js} +3 -3
- package/dist/{SettlementTransactions-DxtVwsGQ.js → SettlementTransactions-BlPvG-4Y.js} +5 -5
- package/dist/{SettlementTransactions-D6e2Jfz8.js → SettlementTransactions-Cmo7AUZD.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-RMf0UvJO.js → Status.vue_vue_type_script_setup_true_lang-Bhgfjh5T.js} +1 -1
- package/dist/{Terminal-B-MDewvq.js → Terminal-BIkz19PG.js} +6 -6
- package/dist/{TerminalSetting-CpDVVqna.js → TerminalSetting-CjCN7uyo.js} +1164 -1038
- package/dist/{Transaction-BdoEqUsK.js → Transaction-BDum2QDI.js} +11 -11
- package/dist/{Transaction-DQJOm0M1.js → Transaction-CA8w8syf.js} +10 -10
- package/dist/{TransactionOld-Cv-ldfgv.js → TransactionOld-C6QjHM9R.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-DgXB350L.js → TransactionStatus.vue_vue_type_script_setup_true_lang-DpnCDoAu.js} +1 -1
- package/dist/{app-BV0gwDWT.js → app-DSMJE8lZ.js} +353 -362
- package/dist/app.js +1 -1
- package/dist/{assets-B3BMwzbu.js → assets-tw3UIJp-.js} +35 -34
- package/dist/{grafana-BnniZglw.js → grafana-_2snxoSk.js} +1 -1
- package/dist/{index-D-aQKndH.js → index-BQdV_OnA.js} +1 -1
- package/dist/{index-2OskxiaA.js → index-Ccc_rvgC.js} +1 -1
- package/dist/{index-Bahs0LXz.js → index-CjjoPVnQ.js} +1 -1
- package/dist/{index-CHb_FpXY.js → index-Ck6E6roO.js} +8582 -8289
- package/dist/{index-DVY0KmHF.js → index-D0Ui2BhX.js} +1 -1
- package/dist/{index-GluKZYof.js → index-DZWnrh1w.js} +1 -1
- package/dist/{index-JjM7nnLl.js → index-Z4Uo8sdb.js} +1 -1
- package/dist/{index-jy0qmXan.js → index-fLgg0fDG.js} +1 -1
- package/dist/{index-afhcVzt-.js → index-fMLDkmGA.js} +1 -1
- package/dist/{index-BANsbSLN.js → index-k-8f2BQB.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-CQyJ-QxJ.js → index.vue_vue_type_script_setup_true_lang-DB7kUcYX.js} +1 -1
- package/dist/model/payout-account.d.ts +2 -2
- package/dist/{onboard-submission-yLxQsG7y.js → onboard-submission-BKnZXNdc.js} +1 -1
- package/dist/package.json +3 -3
- package/dist/{payout-account-C86XmNO4.js → payout-account-DylXcFZf.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +28 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +8 -8
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +8 -8
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +28 -26
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +32 -30
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +32 -30
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +28 -26
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +28 -26
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +32 -30
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -2
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +24 -24
- package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +196 -0
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -12
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +56 -52
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +24 -24
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +12 -12
- package/dist/views/settlement/SettlementTable.vue.d.ts +24 -24
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as X, openBlock as y, createElementBlock as
|
|
2
|
-
import { u as je, p as Ba, e as
|
|
1
|
+
import { defineComponent as X, openBlock as y, createElementBlock as E, Fragment as re, createElementVNode as x, createTextVNode as Ue, toDisplayString as pe, ref as T, resolveComponent as h, createVNode as b, createCommentVNode as R, unref as A, computed as K, isRef as Ae, createBlock as F, resolveDynamicComponent as bt, normalizeProps as ht, mergeProps as _t, watch as ne, onBeforeUnmount as Da, toRef as ue, onMounted as ie, withCtx as ae, renderList as ge, toRefs as Oa, reactive as Pa, h as Ua, getCurrentInstance as Gt, nextTick as ca, onUnmounted as Aa, normalizeClass as Ht, withModifiers as Ma, withKeys as Ra } from "vue";
|
|
2
|
+
import { u as je, p as Ba, e as Q } from "./index-Ck6E6roO.js";
|
|
3
3
|
import { useRouter as qa } from "vue-router";
|
|
4
|
-
import { t as
|
|
4
|
+
import { t as Me } from "./index-fMLDkmGA.js";
|
|
5
5
|
import { _ as Ga } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
-
import { u as wt } from "./index-
|
|
7
|
-
import { useSnackbar as
|
|
6
|
+
import { u as wt } from "./index-D0Ui2BhX.js";
|
|
7
|
+
import { useSnackbar as $t, useDialog as $a } from "@feedmepos/ui-library";
|
|
8
8
|
import { u as rt } from "./error-K1CakhA9.js";
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { o as
|
|
9
|
+
import { useI18n as La, useCoreStore as xt } from "@feedmepos/mf-common";
|
|
10
|
+
import { o as Ya } from "./index-k-8f2BQB.js";
|
|
11
11
|
import { c as ja } from "./index-MdV54cWO.js";
|
|
12
12
|
import { z as Tt, a as It } from "./validator-CTlVogBQ.js";
|
|
13
|
-
import { e as da } from "./index-
|
|
14
|
-
import { g as Ha } from "./assets-
|
|
13
|
+
import { e as da } from "./index-CjjoPVnQ.js";
|
|
14
|
+
import { g as Ha } from "./assets-tw3UIJp-.js";
|
|
15
15
|
import { w as Ka } from "./Modal-DB8M9o1T.js";
|
|
16
16
|
import { _ as Xa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Wa = /* @__PURE__ */ X({
|
|
@@ -23,7 +23,7 @@ const Wa = /* @__PURE__ */ X({
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
|
-
return (a, t) => (y(),
|
|
26
|
+
return (a, t) => (y(), E(re, null, [
|
|
27
27
|
t[0] || (t[0] = x("b", null, "Name", -1)),
|
|
28
28
|
Ue(": " + pe(e.terminal.name), 1),
|
|
29
29
|
t[1] || (t[1] = x("br", null, null, -1)),
|
|
@@ -47,7 +47,7 @@ const Wa = /* @__PURE__ */ X({
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
setup(e) {
|
|
50
|
-
const { isLoading: a, startAsyncCall: t } = je(!1), l =
|
|
50
|
+
const { isLoading: a, startAsyncCall: t } = je(!1), l = $t(), o = T({
|
|
51
51
|
enable: !1,
|
|
52
52
|
password: []
|
|
53
53
|
}), r = e;
|
|
@@ -60,7 +60,7 @@ const Wa = /* @__PURE__ */ X({
|
|
|
60
60
|
c.enable && Object.assign(c, {
|
|
61
61
|
password: o.value.password.join("")
|
|
62
62
|
});
|
|
63
|
-
const s = await
|
|
63
|
+
const s = await Me.kioskModeRequest(r.terminal._id, c);
|
|
64
64
|
if (s === "OK")
|
|
65
65
|
return l.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
66
66
|
let v = s;
|
|
@@ -71,26 +71,26 @@ const Wa = /* @__PURE__ */ X({
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
return (c, s) => {
|
|
74
|
-
const v =
|
|
75
|
-
return y(),
|
|
74
|
+
const v = h("FmSwitch"), f = h("FmPinField"), p = h("FmButton");
|
|
75
|
+
return y(), E(re, null, [
|
|
76
76
|
b(v, {
|
|
77
77
|
modelValue: o.value.enable,
|
|
78
78
|
"onUpdate:modelValue": s[0] || (s[0] = (i) => o.value.enable = i),
|
|
79
79
|
label: "Enable Kiosk Mode?"
|
|
80
80
|
}, null, 8, ["modelValue"]),
|
|
81
|
-
o.value.enable ? (y(),
|
|
81
|
+
o.value.enable ? (y(), E("div", za, [
|
|
82
82
|
s[2] || (s[2] = x("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
83
|
-
b(
|
|
83
|
+
b(f, {
|
|
84
84
|
modelValue: o.value.password,
|
|
85
85
|
"onUpdate:modelValue": s[1] || (s[1] = (i) => o.value.password = i)
|
|
86
86
|
}, null, 8, ["modelValue"])
|
|
87
87
|
])) : R("", !0),
|
|
88
88
|
x("div", Qa, [
|
|
89
|
-
b(
|
|
89
|
+
b(p, {
|
|
90
90
|
variant: "primary",
|
|
91
91
|
label: "Send",
|
|
92
92
|
icon: "send",
|
|
93
|
-
loading:
|
|
93
|
+
loading: A(a),
|
|
94
94
|
onclick: n
|
|
95
95
|
}, null, 8, ["loading"])
|
|
96
96
|
])
|
|
@@ -117,68 +117,68 @@ const Wa = /* @__PURE__ */ X({
|
|
|
117
117
|
], l = e, o = K(() => t.find((r) => r.value === a.value));
|
|
118
118
|
return (r, n) => {
|
|
119
119
|
var s;
|
|
120
|
-
const c =
|
|
121
|
-
return y(),
|
|
120
|
+
const c = h("FmTabs");
|
|
121
|
+
return y(), E(re, null, [
|
|
122
122
|
n[1] || (n[1] = x("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
123
123
|
x("b", null, "Note: "),
|
|
124
124
|
Ue(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
125
125
|
], -1)),
|
|
126
126
|
b(c, {
|
|
127
|
-
"model-value":
|
|
128
|
-
"onUpdate:modelValue": n[0] || (n[0] = (v) =>
|
|
127
|
+
"model-value": A(a),
|
|
128
|
+
"onUpdate:modelValue": n[0] || (n[0] = (v) => Ae(a) ? a.value = v : null),
|
|
129
129
|
class: "mb-6",
|
|
130
130
|
items: t
|
|
131
131
|
}, null, 8, ["model-value"]),
|
|
132
|
-
|
|
132
|
+
A(a) ? (y(), F(bt((s = o.value) == null ? void 0 : s.render), ht(_t({ key: 0 }, { terminal: l.terminal })), null, 16)) : R("", !0)
|
|
133
133
|
], 64);
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
}), en = 2e3, tn = 12e4, an = "Timed out waiting for the Tyro reader to sync. Please try again.";
|
|
137
137
|
function nn(e) {
|
|
138
|
-
const { isLoading: a, startLoading: t, stopLoading: l } = je(!1), { t: o } =
|
|
139
|
-
var
|
|
140
|
-
const
|
|
138
|
+
const { isLoading: a, startLoading: t, stopLoading: l } = je(!1), { t: o } = La(), r = $t(), n = T(null), c = K(() => {
|
|
139
|
+
var $, Z;
|
|
140
|
+
const M = ($ = e.value.gateways) == null ? void 0 : $.find(
|
|
141
141
|
(j) => j.gateway === "Tyro"
|
|
142
142
|
);
|
|
143
|
-
return ((Z =
|
|
143
|
+
return ((Z = M == null ? void 0 : M.config) == null ? void 0 : Z.uniqueId) || "";
|
|
144
144
|
}), s = K(() => !!c.value), v = K(() => {
|
|
145
|
-
var
|
|
146
|
-
return ((
|
|
147
|
-
}),
|
|
148
|
-
var
|
|
149
|
-
return v.value && !!((
|
|
150
|
-
}),
|
|
145
|
+
var M;
|
|
146
|
+
return ((M = n.value) == null ? void 0 : M.status) === "ready";
|
|
147
|
+
}), f = K(() => {
|
|
148
|
+
var M, $;
|
|
149
|
+
return v.value && !!(($ = (M = n.value) == null ? void 0 : M.fields) != null && $.tyroLocationId) && !!e.value.deviceId && !s.value;
|
|
150
|
+
}), p = K(() => !v.value && !s.value), i = K(
|
|
151
151
|
() => o("payment.onboard-submission.tyro.syncDisabledHint")
|
|
152
152
|
), u = K(() => s.value ? "Synced" : "Sync");
|
|
153
|
-
async function
|
|
153
|
+
async function m() {
|
|
154
154
|
if (!e.value.referenceId) {
|
|
155
155
|
n.value = null;
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
try {
|
|
159
|
-
const
|
|
159
|
+
const M = await Ya.getByRestaurant(
|
|
160
160
|
e.value.referenceId
|
|
161
161
|
);
|
|
162
|
-
n.value =
|
|
163
|
-
(
|
|
162
|
+
n.value = M.find(
|
|
163
|
+
($) => $.type === Ba.FdoOnboardType.enum.tyro
|
|
164
164
|
) ?? null;
|
|
165
|
-
} catch (
|
|
165
|
+
} catch (M) {
|
|
166
166
|
n.value = null, r.open({
|
|
167
167
|
type: "error",
|
|
168
|
-
message: rt(
|
|
168
|
+
message: rt(M)
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
const g = ja({
|
|
173
173
|
intervalMs: en,
|
|
174
174
|
timeoutMs: tn,
|
|
175
|
-
onTick: async ({ isCurrentRun:
|
|
175
|
+
onTick: async ({ isCurrentRun: M, stop: $ }) => {
|
|
176
176
|
var me, ee;
|
|
177
|
-
const Z = await
|
|
178
|
-
if (!
|
|
177
|
+
const Z = await Me.readById(e.value._id);
|
|
178
|
+
if (!M())
|
|
179
179
|
return;
|
|
180
180
|
const j = (me = Z.gateways) == null ? void 0 : me.find((N) => N.gateway === "Tyro");
|
|
181
|
-
(j == null ? void 0 : j.gateway) === "Tyro" && ((ee = j == null ? void 0 : j.config) != null && ee.uniqueId) && (
|
|
181
|
+
(j == null ? void 0 : j.gateway) === "Tyro" && ((ee = j == null ? void 0 : j.config) != null && ee.uniqueId) && ($({ invalidate: !1 }), l(), Object.assign(e.value, Z), r.open({
|
|
182
182
|
type: "success",
|
|
183
183
|
message: "Tyro reader created successfully"
|
|
184
184
|
}));
|
|
@@ -189,21 +189,21 @@ function nn(e) {
|
|
|
189
189
|
message: an
|
|
190
190
|
});
|
|
191
191
|
},
|
|
192
|
-
onError: (
|
|
192
|
+
onError: (M) => {
|
|
193
193
|
l(), r.open({
|
|
194
194
|
type: "error",
|
|
195
|
-
message: rt(
|
|
195
|
+
message: rt(M)
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
}), k = g.isPolling;
|
|
199
|
-
function
|
|
199
|
+
function d() {
|
|
200
200
|
g.stop(), l();
|
|
201
201
|
}
|
|
202
202
|
function C() {
|
|
203
|
-
|
|
203
|
+
d(), t(), g.start();
|
|
204
204
|
}
|
|
205
205
|
async function B() {
|
|
206
|
-
if (!
|
|
206
|
+
if (!f.value) {
|
|
207
207
|
r.open({
|
|
208
208
|
type: "error",
|
|
209
209
|
message: "Tyro reader sync is not available"
|
|
@@ -211,28 +211,28 @@ function nn(e) {
|
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
213
|
try {
|
|
214
|
-
t(), await
|
|
215
|
-
} catch (
|
|
216
|
-
|
|
214
|
+
t(), await Me.syncTyroReader(e.value._id), C();
|
|
215
|
+
} catch (M) {
|
|
216
|
+
d(), r.open({
|
|
217
217
|
type: "error",
|
|
218
|
-
message: rt(
|
|
218
|
+
message: rt(M)
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
return
|
|
222
|
+
return ne(
|
|
223
223
|
() => e.value.referenceId,
|
|
224
224
|
async () => {
|
|
225
|
-
await
|
|
225
|
+
await m();
|
|
226
226
|
},
|
|
227
227
|
{ immediate: !0 }
|
|
228
228
|
), Da(() => {
|
|
229
|
-
|
|
229
|
+
d();
|
|
230
230
|
}), {
|
|
231
231
|
isLoading: a,
|
|
232
232
|
isPollingTyroReader: k,
|
|
233
233
|
uniqueId: c,
|
|
234
|
-
canSyncTyroReader:
|
|
235
|
-
showTyroSyncPopover:
|
|
234
|
+
canSyncTyroReader: f,
|
|
235
|
+
showTyroSyncPopover: p,
|
|
236
236
|
tyroSyncPopoverMessage: i,
|
|
237
237
|
tyroSyncButtonLabel: u,
|
|
238
238
|
syncTyroReader: B
|
|
@@ -258,7 +258,7 @@ const ln = {
|
|
|
258
258
|
{
|
|
259
259
|
label: "Fiuu Malaysia",
|
|
260
260
|
value: "cc.feedme.payment.rms",
|
|
261
|
-
region:
|
|
261
|
+
region: Q.F_COUNTRY.enum.MY,
|
|
262
262
|
gateway: "Fiuu",
|
|
263
263
|
isLegacy: !0,
|
|
264
264
|
isOutdated: !0
|
|
@@ -266,14 +266,14 @@ const ln = {
|
|
|
266
266
|
{
|
|
267
267
|
label: "Fiuu Malaysia V2",
|
|
268
268
|
value: "cc.feedme.payment.fiuu_my",
|
|
269
|
-
region:
|
|
269
|
+
region: Q.F_COUNTRY.enum.MY,
|
|
270
270
|
gateway: "Fiuu",
|
|
271
271
|
isLegacy: !0
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
label: "Fiuu Singapore",
|
|
275
275
|
value: "cc.feedme.payment.fiuu_sg",
|
|
276
|
-
region:
|
|
276
|
+
region: Q.F_COUNTRY.enum.SG,
|
|
277
277
|
gateway: "Fiuu",
|
|
278
278
|
isLegacy: !0
|
|
279
279
|
},
|
|
@@ -281,72 +281,72 @@ const ln = {
|
|
|
281
281
|
label: "Softspace Malaysia",
|
|
282
282
|
value: "cc.feedme.payment.softspace_my",
|
|
283
283
|
gateway: "Softspace",
|
|
284
|
-
region:
|
|
284
|
+
region: Q.F_COUNTRY.enum.MY
|
|
285
285
|
},
|
|
286
286
|
{
|
|
287
287
|
label: "Digio Thailand",
|
|
288
288
|
value: "cc.feedme.payment.digio_th",
|
|
289
289
|
gateway: "Digio",
|
|
290
|
-
region:
|
|
290
|
+
region: Q.F_COUNTRY.enum.TH
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
label: "Tyro Australia",
|
|
294
294
|
value: "cc.feedme.payment.tyro_au",
|
|
295
295
|
gateway: "Tyro",
|
|
296
|
-
region:
|
|
296
|
+
region: Q.F_COUNTRY.enum.AU
|
|
297
297
|
}
|
|
298
|
-
], o =
|
|
298
|
+
], o = ue(() => a.terminal), r = T(), n = T({
|
|
299
299
|
packageId: "",
|
|
300
300
|
uniqueId: "",
|
|
301
301
|
developerId: "",
|
|
302
302
|
isUat: !1
|
|
303
303
|
}), c = () => {
|
|
304
304
|
n.value.uniqueId = "", n.value.packageId = "", n.value.developerId = "", n.value.isUat = !1;
|
|
305
|
-
}, s = K(() => l.filter((
|
|
306
|
-
(
|
|
307
|
-
)),
|
|
305
|
+
}, s = K(() => l.filter((S) => S.region === t.value)), v = K(() => s.value.find(
|
|
306
|
+
(S) => S.value === n.value.packageId
|
|
307
|
+
)), f = K(
|
|
308
308
|
() => {
|
|
309
|
-
var
|
|
310
|
-
return ((
|
|
309
|
+
var S;
|
|
310
|
+
return ((S = v.value) == null ? void 0 : S.gateway) === "Tyro";
|
|
311
311
|
}
|
|
312
312
|
), {
|
|
313
|
-
isLoading:
|
|
313
|
+
isLoading: p,
|
|
314
314
|
isPollingTyroReader: i,
|
|
315
315
|
uniqueId: u,
|
|
316
|
-
canSyncTyroReader:
|
|
316
|
+
canSyncTyroReader: m,
|
|
317
317
|
showTyroSyncPopover: g,
|
|
318
318
|
tyroSyncPopoverMessage: k,
|
|
319
|
-
tyroSyncButtonLabel:
|
|
319
|
+
tyroSyncButtonLabel: d,
|
|
320
320
|
syncTyroReader: C
|
|
321
|
-
} = nn(o), B = K(() =>
|
|
321
|
+
} = nn(o), B = K(() => f.value ? "button" : "submit"), M = K(() => f.value ? d.value : "Save"), $ = K(() => f.value ? p.value : !1), Z = K(() => f.value ? !m.value || i.value : !1), j = () => {
|
|
322
322
|
if (!o.value.gateways || o.value.gateways.length === 0)
|
|
323
323
|
return c();
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const S = o.value.gateways[0];
|
|
325
|
+
if (!S.config)
|
|
326
326
|
return c();
|
|
327
|
-
if (
|
|
327
|
+
if (S.gateway === "Tyro") {
|
|
328
328
|
n.value = {
|
|
329
|
-
packageId:
|
|
330
|
-
uniqueId:
|
|
329
|
+
packageId: S.config.packageId,
|
|
330
|
+
uniqueId: S.config.uniqueId,
|
|
331
331
|
developerId: "",
|
|
332
332
|
isUat: !1
|
|
333
333
|
};
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
|
-
switch (
|
|
336
|
+
switch (S.gateway) {
|
|
337
337
|
case "Fiuu":
|
|
338
338
|
n.value = {
|
|
339
|
-
packageId:
|
|
340
|
-
uniqueId:
|
|
339
|
+
packageId: S.config.packageId,
|
|
340
|
+
uniqueId: S.config.uniqueId,
|
|
341
341
|
developerId: "",
|
|
342
342
|
isUat: !1
|
|
343
343
|
};
|
|
344
344
|
break;
|
|
345
345
|
case "Softspace":
|
|
346
346
|
case "Digio":
|
|
347
|
-
const w = JSON.parse(
|
|
347
|
+
const w = JSON.parse(S.config.uniqueId);
|
|
348
348
|
n.value = {
|
|
349
|
-
packageId:
|
|
349
|
+
packageId: S.config.packageId,
|
|
350
350
|
uniqueId: w.uniqueId,
|
|
351
351
|
developerId: w.developerId,
|
|
352
352
|
isUat: w.isUat
|
|
@@ -354,61 +354,61 @@ const ln = {
|
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
|
|
357
|
+
ne(o, j), ie(j);
|
|
358
358
|
async function me() {
|
|
359
|
-
const
|
|
360
|
-
if (!
|
|
359
|
+
const S = v.value;
|
|
360
|
+
if (!S)
|
|
361
361
|
return;
|
|
362
362
|
let w = n.value.uniqueId;
|
|
363
|
-
|
|
363
|
+
S.isLegacy || (w = JSON.stringify({
|
|
364
364
|
uniqueId: n.value.uniqueId,
|
|
365
365
|
developerId: n.value.developerId,
|
|
366
366
|
isUat: n.value.isUat
|
|
367
367
|
}));
|
|
368
|
-
const
|
|
369
|
-
gateway:
|
|
368
|
+
const V = {
|
|
369
|
+
gateway: S.gateway,
|
|
370
370
|
config: {
|
|
371
|
-
packageId:
|
|
371
|
+
packageId: S.value,
|
|
372
372
|
uniqueId: w
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
|
-
(!o.value.gateways || o.value.gateways.length > 1) && (o.value.gateways = []), o.value.gateways[0] =
|
|
375
|
+
(!o.value.gateways || o.value.gateways.length > 1) && (o.value.gateways = []), o.value.gateways[0] = V, await a.onUpdate(o.value);
|
|
376
376
|
}
|
|
377
|
-
async function ee(
|
|
377
|
+
async function ee(S) {
|
|
378
378
|
var w;
|
|
379
|
-
(w = o.value.gateways) == null || w.splice(
|
|
379
|
+
(w = o.value.gateways) == null || w.splice(S, 1), a.onUpdate(o.value);
|
|
380
380
|
}
|
|
381
381
|
function N() {
|
|
382
|
-
|
|
382
|
+
f.value && C();
|
|
383
383
|
}
|
|
384
|
-
return (
|
|
385
|
-
const
|
|
386
|
-
return y(),
|
|
384
|
+
return (S, w) => {
|
|
385
|
+
const V = h("FmSelect"), U = h("FmTextField"), L = h("FmCheckbox"), W = h("FmButton"), Y = h("FmTooltip"), _e = h("FmForm");
|
|
386
|
+
return y(), F(_e, {
|
|
387
387
|
ref: r.value,
|
|
388
388
|
class: "flex flex-col gap-16 w-[500px]",
|
|
389
389
|
onValidationSuccess: me
|
|
390
390
|
}, {
|
|
391
391
|
default: ae(() => [
|
|
392
|
-
b(
|
|
392
|
+
b(V, {
|
|
393
393
|
modelValue: n.value.packageId,
|
|
394
394
|
"onUpdate:modelValue": w[0] || (w[0] = (se) => n.value.packageId = se),
|
|
395
395
|
label: "Package ID",
|
|
396
396
|
items: s.value
|
|
397
397
|
}, null, 8, ["modelValue", "items"]),
|
|
398
|
-
v.value ? (y(),
|
|
399
|
-
|
|
398
|
+
v.value ? (y(), E(re, { key: 0 }, [
|
|
399
|
+
f.value ? (y(), F(U, {
|
|
400
400
|
key: 0,
|
|
401
|
-
"model-value":
|
|
401
|
+
"model-value": A(u),
|
|
402
402
|
label: "Unique ID (Reader ID)",
|
|
403
403
|
disabled: ""
|
|
404
|
-
}, null, 8, ["model-value"])) : v.value && v.value.isLegacy ? (y(),
|
|
404
|
+
}, null, 8, ["model-value"])) : v.value && v.value.isLegacy ? (y(), E(re, { key: 1 }, [
|
|
405
405
|
b(U, {
|
|
406
406
|
modelValue: n.value.uniqueId,
|
|
407
407
|
"onUpdate:modelValue": w[1] || (w[1] = (se) => n.value.uniqueId = se),
|
|
408
408
|
label: "Unique ID (TID)"
|
|
409
409
|
}, null, 8, ["modelValue"]),
|
|
410
|
-
v.value.isOutdated ? (y(),
|
|
411
|
-
], 64)) : (y(),
|
|
410
|
+
v.value.isOutdated ? (y(), E("span", ln, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : R("", !0)
|
|
411
|
+
], 64)) : (y(), E(re, { key: 2 }, [
|
|
412
412
|
b(U, {
|
|
413
413
|
modelValue: n.value.developerId,
|
|
414
414
|
"onUpdate:modelValue": w[2] || (w[2] = (se) => n.value.developerId = se),
|
|
@@ -419,7 +419,7 @@ const ln = {
|
|
|
419
419
|
"onUpdate:modelValue": w[3] || (w[3] = (se) => n.value.uniqueId = se),
|
|
420
420
|
label: "Unique ID (TID)"
|
|
421
421
|
}, null, 8, ["modelValue"]),
|
|
422
|
-
b(
|
|
422
|
+
b(L, {
|
|
423
423
|
modelValue: n.value.isUat,
|
|
424
424
|
"onUpdate:modelValue": w[4] || (w[4] = (se) => n.value.isUat = se),
|
|
425
425
|
label: "Is UAT (Test)",
|
|
@@ -427,19 +427,19 @@ const ln = {
|
|
|
427
427
|
}, null, 8, ["modelValue"])
|
|
428
428
|
], 64)),
|
|
429
429
|
x("div", on, [
|
|
430
|
-
o.value.gateways && o.value.gateways.length > 0 ? (y(),
|
|
430
|
+
o.value.gateways && o.value.gateways.length > 0 ? (y(), F(W, {
|
|
431
431
|
key: 0,
|
|
432
432
|
class: "flex-1",
|
|
433
433
|
variant: "secondary",
|
|
434
434
|
label: "Delete",
|
|
435
435
|
onclick: () => ee(0)
|
|
436
436
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
437
|
-
|
|
437
|
+
f.value && A(g) && Z.value ? (y(), F(Y, {
|
|
438
438
|
key: 1,
|
|
439
439
|
class: "flex-1",
|
|
440
440
|
variant: "plain",
|
|
441
441
|
placement: "top",
|
|
442
|
-
content:
|
|
442
|
+
content: A(k)
|
|
443
443
|
}, {
|
|
444
444
|
default: ae(() => [
|
|
445
445
|
x("div", rn, [
|
|
@@ -447,22 +447,22 @@ const ln = {
|
|
|
447
447
|
type: B.value,
|
|
448
448
|
class: "w-full",
|
|
449
449
|
variant: "primary",
|
|
450
|
-
loading:
|
|
450
|
+
loading: $.value,
|
|
451
451
|
disabled: Z.value,
|
|
452
|
-
label:
|
|
452
|
+
label: M.value,
|
|
453
453
|
onClick: N
|
|
454
454
|
}, null, 8, ["type", "loading", "disabled", "label"])
|
|
455
455
|
])
|
|
456
456
|
]),
|
|
457
457
|
_: 1
|
|
458
|
-
}, 8, ["content"])) : (y(),
|
|
458
|
+
}, 8, ["content"])) : (y(), F(W, {
|
|
459
459
|
key: 2,
|
|
460
460
|
type: B.value,
|
|
461
461
|
class: "flex-1",
|
|
462
462
|
variant: "primary",
|
|
463
|
-
loading:
|
|
463
|
+
loading: $.value,
|
|
464
464
|
disabled: Z.value,
|
|
465
|
-
label:
|
|
465
|
+
label: M.value,
|
|
466
466
|
onClick: N
|
|
467
467
|
}, null, 8, ["type", "loading", "disabled", "label"]))
|
|
468
468
|
])
|
|
@@ -488,62 +488,62 @@ const ln = {
|
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
490
|
setup(e) {
|
|
491
|
-
const { isLoading: a, startAsyncCall: t } = je(), l = e, o =
|
|
491
|
+
const { isLoading: a, startAsyncCall: t } = je(), l = e, o = ue(() => l.terminal), r = T(), n = T(), c = T(-1), s = T({
|
|
492
492
|
terminalId: ""
|
|
493
493
|
}), v = () => {
|
|
494
494
|
s.value.terminalId = "", c.value = -1;
|
|
495
|
-
},
|
|
495
|
+
}, f = () => {
|
|
496
496
|
if (t(async () => {
|
|
497
|
-
r.value = await
|
|
497
|
+
r.value = await Me.getRestaurantTerminals(l.terminal.referenceId);
|
|
498
498
|
}), !l.terminal.ecrs)
|
|
499
499
|
return v();
|
|
500
500
|
const u = l.terminal.ecrs.findIndex((g) => g && g.gateway && g.gateway === "FeedMe");
|
|
501
501
|
if (u === -1)
|
|
502
502
|
return v();
|
|
503
503
|
c.value = u;
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
terminalId:
|
|
504
|
+
const m = l.terminal.ecrs.at(u);
|
|
505
|
+
m.gateway === "FeedMe" && m.config && (s.value = {
|
|
506
|
+
terminalId: m.config.terminalId
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
|
-
|
|
510
|
-
const
|
|
509
|
+
ne(o, f), ie(f);
|
|
510
|
+
const p = K(() => (r.value ?? []).map((u) => ({
|
|
511
511
|
label: u.name ?? u._id,
|
|
512
512
|
value: u._id
|
|
513
513
|
})));
|
|
514
514
|
async function i(u) {
|
|
515
|
-
var
|
|
516
|
-
(
|
|
515
|
+
var m;
|
|
516
|
+
(m = l.terminal.ecrs) == null || m.splice(u, 1), l.onUpdate(l.terminal);
|
|
517
517
|
}
|
|
518
|
-
return (u,
|
|
519
|
-
const g =
|
|
520
|
-
return
|
|
518
|
+
return (u, m) => {
|
|
519
|
+
const g = h("FmCircularProgress"), k = h("FmSelect"), d = h("FmButton"), C = h("FmForm");
|
|
520
|
+
return A(a) ? (y(), E("div", un, [
|
|
521
521
|
b(g, { size: "xxl" })
|
|
522
|
-
])) : (y(),
|
|
522
|
+
])) : (y(), F(C, {
|
|
523
523
|
key: 1,
|
|
524
524
|
ref: n.value,
|
|
525
525
|
class: "flex flex-col gap-16 w-[500px]",
|
|
526
|
-
onValidationSuccess:
|
|
526
|
+
onValidationSuccess: m[1] || (m[1] = () => {
|
|
527
527
|
c.value > -1 ? o.value.ecrs[c.value] = { gateway: "FeedMe", config: s.value } : (o.value.ecrs || (o.value.ecrs = []), o.value.ecrs.push({ gateway: "FeedMe", config: s.value })), l.onUpdate(o.value);
|
|
528
528
|
})
|
|
529
529
|
}, {
|
|
530
530
|
default: ae(() => [
|
|
531
531
|
b(k, {
|
|
532
532
|
modelValue: s.value.terminalId,
|
|
533
|
-
"onUpdate:modelValue":
|
|
533
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => s.value.terminalId = B),
|
|
534
534
|
label: "Terminal ID",
|
|
535
|
-
items:
|
|
536
|
-
rules:
|
|
535
|
+
items: p.value,
|
|
536
|
+
rules: A(Tt)(A(It).string())
|
|
537
537
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
538
538
|
x("div", cn, [
|
|
539
|
-
c.value > -1 ? (y(),
|
|
539
|
+
c.value > -1 ? (y(), F(d, {
|
|
540
540
|
key: 0,
|
|
541
541
|
class: "flex-1",
|
|
542
542
|
variant: "secondary",
|
|
543
543
|
label: "Delete",
|
|
544
544
|
onclick: () => i(c.value)
|
|
545
545
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
546
|
-
b(
|
|
546
|
+
b(d, {
|
|
547
547
|
type: "submit",
|
|
548
548
|
class: "flex-1",
|
|
549
549
|
variant: "primary",
|
|
@@ -568,7 +568,7 @@ const ln = {
|
|
|
568
568
|
}
|
|
569
569
|
},
|
|
570
570
|
setup(e) {
|
|
571
|
-
const a = e, t =
|
|
571
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T({
|
|
572
572
|
merchantId: "",
|
|
573
573
|
terminalId: "",
|
|
574
574
|
privateKey: ""
|
|
@@ -577,51 +577,51 @@ const ln = {
|
|
|
577
577
|
}, c = () => {
|
|
578
578
|
if (!t.value.ecrs)
|
|
579
579
|
return n();
|
|
580
|
-
const v = t.value.ecrs.findIndex((
|
|
580
|
+
const v = t.value.ecrs.findIndex((p) => p && p.gateway && p.gateway === "Ghl");
|
|
581
581
|
if (v === -1)
|
|
582
582
|
return n();
|
|
583
583
|
o.value = v;
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
merchantId:
|
|
587
|
-
terminalId:
|
|
588
|
-
privateKey:
|
|
584
|
+
const f = t.value.ecrs.at(v);
|
|
585
|
+
f.gateway === "Ghl" && f.config && (r.value = {
|
|
586
|
+
merchantId: f.config.merchantId,
|
|
587
|
+
terminalId: f.config.terminalId,
|
|
588
|
+
privateKey: f.config.privateKey || ""
|
|
589
589
|
});
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
ne(t, c), ie(c);
|
|
592
592
|
async function s(v) {
|
|
593
|
-
var
|
|
594
|
-
(
|
|
593
|
+
var f;
|
|
594
|
+
(f = t.value.ecrs) == null || f.splice(v, 1), a.onUpdate(t.value);
|
|
595
595
|
}
|
|
596
|
-
return (v,
|
|
597
|
-
const
|
|
598
|
-
return y(),
|
|
596
|
+
return (v, f) => {
|
|
597
|
+
const p = h("FmTextField"), i = h("FmTextarea"), u = h("FmButton"), m = h("FmForm");
|
|
598
|
+
return y(), F(m, {
|
|
599
599
|
ref: l.value,
|
|
600
600
|
class: "flex flex-col gap-16 w-[500px]",
|
|
601
|
-
onValidationSuccess:
|
|
601
|
+
onValidationSuccess: f[3] || (f[3] = () => {
|
|
602
602
|
o.value > -1 ? t.value.ecrs[o.value] = { gateway: "Ghl", config: r.value } : (t.value.ecrs || (t.value.ecrs = []), t.value.ecrs.push({ gateway: "Ghl", config: r.value })), a.onUpdate(t.value);
|
|
603
603
|
})
|
|
604
604
|
}, {
|
|
605
605
|
default: ae(() => [
|
|
606
|
-
b(
|
|
606
|
+
b(p, {
|
|
607
607
|
modelValue: r.value.merchantId,
|
|
608
|
-
"onUpdate:modelValue":
|
|
608
|
+
"onUpdate:modelValue": f[0] || (f[0] = (g) => r.value.merchantId = g),
|
|
609
609
|
label: "Merchant ID"
|
|
610
610
|
}, null, 8, ["modelValue"]),
|
|
611
|
-
b(
|
|
611
|
+
b(p, {
|
|
612
612
|
modelValue: r.value.terminalId,
|
|
613
|
-
"onUpdate:modelValue":
|
|
613
|
+
"onUpdate:modelValue": f[1] || (f[1] = (g) => r.value.terminalId = g),
|
|
614
614
|
label: "Terminal ID"
|
|
615
615
|
}, null, 8, ["modelValue"]),
|
|
616
616
|
b(i, {
|
|
617
617
|
modelValue: r.value.privateKey,
|
|
618
|
-
"onUpdate:modelValue":
|
|
618
|
+
"onUpdate:modelValue": f[2] || (f[2] = (g) => r.value.privateKey = g),
|
|
619
619
|
label: "Private Key",
|
|
620
620
|
"label-mark": "optional",
|
|
621
621
|
"label-info": "Default will use FeedMe Private Key"
|
|
622
622
|
}, null, 8, ["modelValue"]),
|
|
623
623
|
x("div", pn, [
|
|
624
|
-
o.value > -1 ? (y(),
|
|
624
|
+
o.value > -1 ? (y(), F(u, {
|
|
625
625
|
key: 0,
|
|
626
626
|
class: "flex-1",
|
|
627
627
|
variant: "secondary",
|
|
@@ -653,48 +653,48 @@ const ln = {
|
|
|
653
653
|
}
|
|
654
654
|
},
|
|
655
655
|
setup(e) {
|
|
656
|
-
const a = e, t =
|
|
656
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
657
657
|
ip: "",
|
|
658
658
|
receiptName: "",
|
|
659
659
|
cardTypes: []
|
|
660
660
|
}), c = () => {
|
|
661
661
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
662
662
|
}, s = () => {
|
|
663
|
-
var
|
|
663
|
+
var m;
|
|
664
664
|
if (!t.value.ecrIntegrations)
|
|
665
665
|
return c();
|
|
666
|
-
const
|
|
666
|
+
const p = t.value.ecrIntegrations, i = p.findIndex((g) => g && g.gateway && g.gateway === "Maybank");
|
|
667
667
|
if (i === -1)
|
|
668
668
|
return c();
|
|
669
669
|
o.value = i;
|
|
670
|
-
const u =
|
|
670
|
+
const u = p.at(i);
|
|
671
671
|
u.gateway === "Maybank" && u.config && (n.value = {
|
|
672
672
|
ip: u.config.ip ?? "",
|
|
673
673
|
receiptName: u.receiptName ?? "",
|
|
674
|
-
cardTypes: ((
|
|
674
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
675
675
|
});
|
|
676
676
|
};
|
|
677
|
-
|
|
678
|
-
async function v(
|
|
677
|
+
ne(t, s), ie(s);
|
|
678
|
+
async function v(p) {
|
|
679
679
|
var i;
|
|
680
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
680
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
681
681
|
}
|
|
682
|
-
async function
|
|
682
|
+
async function f() {
|
|
683
683
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
684
684
|
}
|
|
685
|
-
return (
|
|
686
|
-
const u =
|
|
687
|
-
return y(),
|
|
685
|
+
return (p, i) => {
|
|
686
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
687
|
+
return y(), F(k, {
|
|
688
688
|
ref: l.value,
|
|
689
689
|
class: "flex flex-col gap-16 w-[500px]",
|
|
690
690
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
691
|
-
var
|
|
691
|
+
var d, C;
|
|
692
692
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
693
693
|
gateway: "Maybank",
|
|
694
694
|
config: { ip: n.value.ip },
|
|
695
695
|
receiptName: n.value.receiptName,
|
|
696
696
|
dialogConfig: {
|
|
697
|
-
...(C = (
|
|
697
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
698
698
|
cardTypes: n.value.cardTypes
|
|
699
699
|
}
|
|
700
700
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -710,45 +710,45 @@ const ln = {
|
|
|
710
710
|
default: ae(() => [
|
|
711
711
|
b(u, {
|
|
712
712
|
modelValue: n.value.ip,
|
|
713
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
713
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.ip = d),
|
|
714
714
|
label: "IP Address"
|
|
715
715
|
}, null, 8, ["modelValue"]),
|
|
716
716
|
b(u, {
|
|
717
717
|
modelValue: n.value.receiptName,
|
|
718
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
718
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => n.value.receiptName = d),
|
|
719
719
|
label: "Receipt Payment Name",
|
|
720
720
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
721
721
|
}, null, 8, ["modelValue"]),
|
|
722
722
|
x("div", fn, [
|
|
723
723
|
b(u, {
|
|
724
724
|
modelValue: r.value,
|
|
725
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
725
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => r.value = d),
|
|
726
726
|
label: "Fallback Card Types",
|
|
727
727
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
728
728
|
}, null, 8, ["modelValue"]),
|
|
729
|
-
b(
|
|
729
|
+
b(m, {
|
|
730
730
|
class: "ml-4",
|
|
731
731
|
icon: "add",
|
|
732
|
-
onClick:
|
|
732
|
+
onClick: f
|
|
733
733
|
})
|
|
734
734
|
]),
|
|
735
735
|
x("div", vn, [
|
|
736
|
-
(y(!0),
|
|
737
|
-
key:
|
|
738
|
-
label:
|
|
736
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
737
|
+
key: d,
|
|
738
|
+
label: d,
|
|
739
739
|
removable: !0,
|
|
740
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
740
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
741
741
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
742
742
|
]),
|
|
743
743
|
x("div", gn, [
|
|
744
|
-
o.value > -1 ? (y(),
|
|
744
|
+
o.value > -1 ? (y(), F(m, {
|
|
745
745
|
key: 0,
|
|
746
746
|
class: "flex-1",
|
|
747
747
|
variant: "secondary",
|
|
748
748
|
label: "Delete",
|
|
749
749
|
onclick: () => v(o.value)
|
|
750
750
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
751
|
-
b(
|
|
751
|
+
b(m, {
|
|
752
752
|
type: "submit",
|
|
753
753
|
class: "flex-1",
|
|
754
754
|
variant: "primary",
|
|
@@ -773,48 +773,48 @@ const ln = {
|
|
|
773
773
|
}
|
|
774
774
|
},
|
|
775
775
|
setup(e) {
|
|
776
|
-
const a = e, t =
|
|
776
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
777
777
|
ip: "",
|
|
778
778
|
receiptName: "",
|
|
779
779
|
cardTypes: []
|
|
780
780
|
}), c = () => {
|
|
781
781
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
782
782
|
}, s = () => {
|
|
783
|
-
var
|
|
783
|
+
var m;
|
|
784
784
|
if (!t.value.ecrIntegrations)
|
|
785
785
|
return c();
|
|
786
|
-
const
|
|
786
|
+
const p = t.value.ecrIntegrations, i = p.findIndex((g) => g && g.gateway && g.gateway === "Maybank2");
|
|
787
787
|
if (i === -1)
|
|
788
788
|
return c();
|
|
789
789
|
o.value = i;
|
|
790
|
-
const u =
|
|
790
|
+
const u = p.at(i);
|
|
791
791
|
u.gateway === "Maybank2" && u.config && (n.value = {
|
|
792
792
|
ip: u.config.ip ?? "",
|
|
793
793
|
receiptName: u.receiptName ?? "",
|
|
794
|
-
cardTypes: ((
|
|
794
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
795
795
|
});
|
|
796
796
|
};
|
|
797
|
-
|
|
798
|
-
async function v(
|
|
797
|
+
ne(t, s), ie(s);
|
|
798
|
+
async function v(p) {
|
|
799
799
|
var i;
|
|
800
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
800
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
801
801
|
}
|
|
802
|
-
async function
|
|
802
|
+
async function f() {
|
|
803
803
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
804
804
|
}
|
|
805
|
-
return (
|
|
806
|
-
const u =
|
|
807
|
-
return y(),
|
|
805
|
+
return (p, i) => {
|
|
806
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
807
|
+
return y(), F(k, {
|
|
808
808
|
ref: l.value,
|
|
809
809
|
class: "flex flex-col gap-16 w-[500px]",
|
|
810
810
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
811
|
-
var
|
|
811
|
+
var d, C;
|
|
812
812
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
813
813
|
gateway: "Maybank2",
|
|
814
814
|
config: { ip: n.value.ip },
|
|
815
815
|
receiptName: n.value.receiptName,
|
|
816
816
|
dialogConfig: {
|
|
817
|
-
...(C = (
|
|
817
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
818
818
|
cardTypes: n.value.cardTypes
|
|
819
819
|
}
|
|
820
820
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -830,45 +830,45 @@ const ln = {
|
|
|
830
830
|
default: ae(() => [
|
|
831
831
|
b(u, {
|
|
832
832
|
modelValue: n.value.ip,
|
|
833
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
833
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.ip = d),
|
|
834
834
|
label: "IP Address"
|
|
835
835
|
}, null, 8, ["modelValue"]),
|
|
836
836
|
b(u, {
|
|
837
837
|
modelValue: n.value.receiptName,
|
|
838
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
838
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => n.value.receiptName = d),
|
|
839
839
|
label: "Receipt Payment Name",
|
|
840
840
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
841
841
|
}, null, 8, ["modelValue"]),
|
|
842
842
|
x("div", bn, [
|
|
843
843
|
b(u, {
|
|
844
844
|
modelValue: r.value,
|
|
845
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
845
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => r.value = d),
|
|
846
846
|
label: "Fallback Card Types",
|
|
847
847
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
848
848
|
}, null, 8, ["modelValue"]),
|
|
849
|
-
b(
|
|
849
|
+
b(m, {
|
|
850
850
|
class: "ml-4",
|
|
851
851
|
icon: "add",
|
|
852
|
-
onClick:
|
|
852
|
+
onClick: f
|
|
853
853
|
})
|
|
854
854
|
]),
|
|
855
855
|
x("div", hn, [
|
|
856
|
-
(y(!0),
|
|
857
|
-
key:
|
|
858
|
-
label:
|
|
856
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
857
|
+
key: d,
|
|
858
|
+
label: d,
|
|
859
859
|
removable: !0,
|
|
860
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
860
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
861
861
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
862
862
|
]),
|
|
863
863
|
x("div", _n, [
|
|
864
|
-
o.value > -1 ? (y(),
|
|
864
|
+
o.value > -1 ? (y(), F(m, {
|
|
865
865
|
key: 0,
|
|
866
866
|
class: "flex-1",
|
|
867
867
|
variant: "secondary",
|
|
868
868
|
label: "Delete",
|
|
869
869
|
onclick: () => v(o.value)
|
|
870
870
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
871
|
-
b(
|
|
871
|
+
b(m, {
|
|
872
872
|
type: "submit",
|
|
873
873
|
class: "flex-1",
|
|
874
874
|
variant: "primary",
|
|
@@ -893,48 +893,48 @@ const ln = {
|
|
|
893
893
|
}
|
|
894
894
|
},
|
|
895
895
|
setup(e) {
|
|
896
|
-
const a = e, t =
|
|
896
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
897
897
|
receiptName: "",
|
|
898
898
|
config: {},
|
|
899
899
|
cardTypes: []
|
|
900
900
|
}), c = () => {
|
|
901
901
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
902
902
|
}, s = () => {
|
|
903
|
-
var
|
|
903
|
+
var m;
|
|
904
904
|
if (!t.value.ecrIntegrations)
|
|
905
905
|
return c();
|
|
906
|
-
const
|
|
906
|
+
const p = t.value.ecrIntegrations, i = p.findIndex((g) => g && g.gateway && g.gateway === "Maybank3");
|
|
907
907
|
if (i === -1)
|
|
908
908
|
return c();
|
|
909
909
|
o.value = i;
|
|
910
|
-
const u =
|
|
910
|
+
const u = p.at(i);
|
|
911
911
|
u.gateway === "Maybank3" && u.config && (n.value = {
|
|
912
912
|
config: u.config,
|
|
913
913
|
receiptName: u.receiptName ?? "",
|
|
914
|
-
cardTypes: ((
|
|
914
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
915
915
|
});
|
|
916
916
|
};
|
|
917
|
-
|
|
918
|
-
async function v(
|
|
917
|
+
ne(t, s), ie(s);
|
|
918
|
+
async function v(p) {
|
|
919
919
|
var i;
|
|
920
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
920
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
921
921
|
}
|
|
922
|
-
async function
|
|
922
|
+
async function f() {
|
|
923
923
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
924
924
|
}
|
|
925
|
-
return (
|
|
926
|
-
const u =
|
|
927
|
-
return y(),
|
|
925
|
+
return (p, i) => {
|
|
926
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
927
|
+
return y(), F(k, {
|
|
928
928
|
ref: l.value,
|
|
929
929
|
class: "flex flex-col gap-16 w-[500px]",
|
|
930
930
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
931
|
-
var
|
|
931
|
+
var d, C;
|
|
932
932
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
933
933
|
gateway: "Maybank3",
|
|
934
934
|
config: n.value.config,
|
|
935
935
|
receiptName: n.value.receiptName,
|
|
936
936
|
dialogConfig: {
|
|
937
|
-
...(C = (
|
|
937
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
938
938
|
cardTypes: n.value.cardTypes
|
|
939
939
|
}
|
|
940
940
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -950,40 +950,40 @@ const ln = {
|
|
|
950
950
|
default: ae(() => [
|
|
951
951
|
b(u, {
|
|
952
952
|
modelValue: n.value.receiptName,
|
|
953
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
953
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.receiptName = d),
|
|
954
954
|
label: "Receipt Payment Name",
|
|
955
955
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
956
956
|
}, null, 8, ["modelValue"]),
|
|
957
957
|
x("div", xn, [
|
|
958
958
|
b(u, {
|
|
959
959
|
modelValue: r.value,
|
|
960
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
960
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d),
|
|
961
961
|
label: "Fallback Card Types",
|
|
962
962
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
963
963
|
}, null, 8, ["modelValue"]),
|
|
964
|
-
b(
|
|
964
|
+
b(m, {
|
|
965
965
|
class: "ml-4",
|
|
966
966
|
icon: "add",
|
|
967
|
-
onClick:
|
|
967
|
+
onClick: f
|
|
968
968
|
})
|
|
969
969
|
]),
|
|
970
970
|
x("div", Tn, [
|
|
971
|
-
(y(!0),
|
|
972
|
-
key:
|
|
973
|
-
label:
|
|
971
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
972
|
+
key: d,
|
|
973
|
+
label: d,
|
|
974
974
|
removable: !0,
|
|
975
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
975
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
976
976
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
977
977
|
]),
|
|
978
978
|
x("div", In, [
|
|
979
|
-
o.value > -1 ? (y(),
|
|
979
|
+
o.value > -1 ? (y(), F(m, {
|
|
980
980
|
key: 0,
|
|
981
981
|
class: "flex-1",
|
|
982
982
|
variant: "secondary",
|
|
983
983
|
label: "Delete",
|
|
984
984
|
onclick: () => v(o.value)
|
|
985
985
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
986
|
-
b(
|
|
986
|
+
b(m, {
|
|
987
987
|
type: "submit",
|
|
988
988
|
class: "flex-1",
|
|
989
989
|
variant: "primary",
|
|
@@ -1008,48 +1008,48 @@ const ln = {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
},
|
|
1010
1010
|
setup(e) {
|
|
1011
|
-
const a = e, t =
|
|
1011
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1012
1012
|
ip: "",
|
|
1013
1013
|
receiptName: "",
|
|
1014
1014
|
cardTypes: []
|
|
1015
1015
|
}), c = () => {
|
|
1016
1016
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1017
1017
|
}, s = () => {
|
|
1018
|
-
var
|
|
1018
|
+
var m;
|
|
1019
1019
|
if (!t.value.ecrIntegrations)
|
|
1020
1020
|
return c();
|
|
1021
|
-
const
|
|
1021
|
+
const p = t.value.ecrIntegrations, i = p.findIndex((g) => g && g.gateway && g.gateway === "Nets");
|
|
1022
1022
|
if (i === -1)
|
|
1023
1023
|
return c();
|
|
1024
1024
|
o.value = i;
|
|
1025
|
-
const u =
|
|
1025
|
+
const u = p.at(i);
|
|
1026
1026
|
u.gateway === "Nets" && u.config && (n.value = {
|
|
1027
1027
|
ip: u.config.ip ?? "",
|
|
1028
1028
|
receiptName: u.receiptName ?? "",
|
|
1029
|
-
cardTypes: ((
|
|
1029
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1030
1030
|
});
|
|
1031
1031
|
};
|
|
1032
|
-
|
|
1033
|
-
async function v(
|
|
1032
|
+
ne(t, s), ie(s);
|
|
1033
|
+
async function v(p) {
|
|
1034
1034
|
var i;
|
|
1035
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1035
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1036
1036
|
}
|
|
1037
|
-
async function
|
|
1037
|
+
async function f() {
|
|
1038
1038
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1039
1039
|
}
|
|
1040
|
-
return (
|
|
1041
|
-
const u =
|
|
1042
|
-
return y(),
|
|
1040
|
+
return (p, i) => {
|
|
1041
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1042
|
+
return y(), F(k, {
|
|
1043
1043
|
ref: l.value,
|
|
1044
1044
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1045
1045
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
1046
|
-
var
|
|
1046
|
+
var d, C;
|
|
1047
1047
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1048
1048
|
gateway: "Nets",
|
|
1049
1049
|
config: { ip: n.value.ip },
|
|
1050
1050
|
receiptName: n.value.receiptName,
|
|
1051
1051
|
dialogConfig: {
|
|
1052
|
-
...(C = (
|
|
1052
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
1053
1053
|
cardTypes: n.value.cardTypes
|
|
1054
1054
|
}
|
|
1055
1055
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1065,45 +1065,45 @@ const ln = {
|
|
|
1065
1065
|
default: ae(() => [
|
|
1066
1066
|
b(u, {
|
|
1067
1067
|
modelValue: n.value.ip,
|
|
1068
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1068
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.ip = d),
|
|
1069
1069
|
label: "IP Address"
|
|
1070
1070
|
}, null, 8, ["modelValue"]),
|
|
1071
1071
|
b(u, {
|
|
1072
1072
|
modelValue: n.value.receiptName,
|
|
1073
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1073
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => n.value.receiptName = d),
|
|
1074
1074
|
label: "Receipt Payment Name",
|
|
1075
1075
|
"label-info": "Default receipt display will be 'TERMINAL_NETS'"
|
|
1076
1076
|
}, null, 8, ["modelValue"]),
|
|
1077
1077
|
x("div", Fn, [
|
|
1078
1078
|
b(u, {
|
|
1079
1079
|
modelValue: r.value,
|
|
1080
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1080
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => r.value = d),
|
|
1081
1081
|
label: "Fallback Card Types",
|
|
1082
1082
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1083
1083
|
}, null, 8, ["modelValue"]),
|
|
1084
|
-
b(
|
|
1084
|
+
b(m, {
|
|
1085
1085
|
class: "ml-4",
|
|
1086
1086
|
icon: "add",
|
|
1087
|
-
onClick:
|
|
1087
|
+
onClick: f
|
|
1088
1088
|
})
|
|
1089
1089
|
]),
|
|
1090
1090
|
x("div", Sn, [
|
|
1091
|
-
(y(!0),
|
|
1092
|
-
key:
|
|
1093
|
-
label:
|
|
1091
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1092
|
+
key: d,
|
|
1093
|
+
label: d,
|
|
1094
1094
|
removable: !0,
|
|
1095
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1095
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1096
1096
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1097
1097
|
]),
|
|
1098
1098
|
x("div", kn, [
|
|
1099
|
-
o.value > -1 ? (y(),
|
|
1099
|
+
o.value > -1 ? (y(), F(m, {
|
|
1100
1100
|
key: 0,
|
|
1101
1101
|
class: "flex-1",
|
|
1102
1102
|
variant: "secondary",
|
|
1103
1103
|
label: "Delete",
|
|
1104
1104
|
onclick: () => v(o.value)
|
|
1105
1105
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1106
|
-
b(
|
|
1106
|
+
b(m, {
|
|
1107
1107
|
type: "submit",
|
|
1108
1108
|
class: "flex-1",
|
|
1109
1109
|
variant: "primary",
|
|
@@ -1115,7 +1115,7 @@ const ln = {
|
|
|
1115
1115
|
}, 512);
|
|
1116
1116
|
};
|
|
1117
1117
|
}
|
|
1118
|
-
}),
|
|
1118
|
+
}), Vn = { class: "flex items-end" }, En = { class: "flex flex-wrap gap-8 items-center mt-4" }, Dn = { class: "flex mt-6 space-x-6" }, On = /* @__PURE__ */ X({
|
|
1119
1119
|
__name: "KBankGateway",
|
|
1120
1120
|
props: {
|
|
1121
1121
|
terminal: {
|
|
@@ -1128,46 +1128,46 @@ const ln = {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
},
|
|
1130
1130
|
setup(e) {
|
|
1131
|
-
const a = e, t =
|
|
1131
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1132
1132
|
receiptName: "",
|
|
1133
1133
|
cardTypes: []
|
|
1134
1134
|
}), c = () => {
|
|
1135
1135
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1136
1136
|
}, s = () => {
|
|
1137
|
-
var
|
|
1137
|
+
var m;
|
|
1138
1138
|
if (!t.value.ecrIntegrations)
|
|
1139
1139
|
return c();
|
|
1140
|
-
const
|
|
1140
|
+
const p = t.value.ecrIntegrations, i = p.findIndex((g) => g && g.gateway && g.gateway === "Kbank");
|
|
1141
1141
|
if (i === -1)
|
|
1142
1142
|
return c();
|
|
1143
1143
|
o.value = i;
|
|
1144
|
-
const u =
|
|
1144
|
+
const u = p.at(i);
|
|
1145
1145
|
u.gateway === "Kbank" && u.config && (n.value = {
|
|
1146
1146
|
receiptName: u.receiptName ?? "",
|
|
1147
|
-
cardTypes: ((
|
|
1147
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1148
1148
|
});
|
|
1149
1149
|
};
|
|
1150
|
-
|
|
1151
|
-
async function v(
|
|
1150
|
+
ne(t, s), ie(s);
|
|
1151
|
+
async function v(p) {
|
|
1152
1152
|
var i;
|
|
1153
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1153
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1154
1154
|
}
|
|
1155
|
-
async function
|
|
1155
|
+
async function f() {
|
|
1156
1156
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1157
1157
|
}
|
|
1158
|
-
return (
|
|
1159
|
-
const u =
|
|
1160
|
-
return y(),
|
|
1158
|
+
return (p, i) => {
|
|
1159
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1160
|
+
return y(), F(k, {
|
|
1161
1161
|
ref: l.value,
|
|
1162
1162
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1163
1163
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1164
|
-
var
|
|
1164
|
+
var d, C;
|
|
1165
1165
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1166
1166
|
gateway: "Kbank",
|
|
1167
1167
|
config: {},
|
|
1168
1168
|
receiptName: n.value.receiptName,
|
|
1169
1169
|
dialogConfig: {
|
|
1170
|
-
...(C = (
|
|
1170
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
1171
1171
|
cardTypes: n.value.cardTypes
|
|
1172
1172
|
}
|
|
1173
1173
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1183,40 +1183,40 @@ const ln = {
|
|
|
1183
1183
|
default: ae(() => [
|
|
1184
1184
|
b(u, {
|
|
1185
1185
|
modelValue: n.value.receiptName,
|
|
1186
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1186
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.receiptName = d),
|
|
1187
1187
|
label: "Receipt Payment Name",
|
|
1188
1188
|
"label-info": "Default receipt display will be 'TERMINAL_KBANK'"
|
|
1189
1189
|
}, null, 8, ["modelValue"]),
|
|
1190
|
-
x("div",
|
|
1190
|
+
x("div", Vn, [
|
|
1191
1191
|
b(u, {
|
|
1192
1192
|
modelValue: r.value,
|
|
1193
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1193
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d),
|
|
1194
1194
|
label: "Fallback Card Types",
|
|
1195
1195
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1196
1196
|
}, null, 8, ["modelValue"]),
|
|
1197
|
-
b(
|
|
1197
|
+
b(m, {
|
|
1198
1198
|
class: "ml-4",
|
|
1199
1199
|
icon: "add",
|
|
1200
|
-
onClick:
|
|
1200
|
+
onClick: f
|
|
1201
1201
|
})
|
|
1202
1202
|
]),
|
|
1203
|
-
x("div",
|
|
1204
|
-
(y(!0),
|
|
1205
|
-
key:
|
|
1206
|
-
label:
|
|
1203
|
+
x("div", En, [
|
|
1204
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1205
|
+
key: d,
|
|
1206
|
+
label: d,
|
|
1207
1207
|
removable: !0,
|
|
1208
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1208
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1209
1209
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1210
1210
|
]),
|
|
1211
1211
|
x("div", Dn, [
|
|
1212
|
-
o.value > -1 ? (y(),
|
|
1212
|
+
o.value > -1 ? (y(), F(m, {
|
|
1213
1213
|
key: 0,
|
|
1214
1214
|
class: "flex-1",
|
|
1215
1215
|
variant: "secondary",
|
|
1216
1216
|
label: "Delete",
|
|
1217
1217
|
onclick: () => v(o.value)
|
|
1218
1218
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1219
|
-
b(
|
|
1219
|
+
b(m, {
|
|
1220
1220
|
type: "submit",
|
|
1221
1221
|
class: "flex-1",
|
|
1222
1222
|
variant: "primary",
|
|
@@ -1241,7 +1241,7 @@ const ln = {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
},
|
|
1243
1243
|
setup(e) {
|
|
1244
|
-
const a = e, t =
|
|
1244
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T({
|
|
1245
1245
|
ip: "",
|
|
1246
1246
|
receiptName: ""
|
|
1247
1247
|
}), n = () => {
|
|
@@ -1249,27 +1249,27 @@ const ln = {
|
|
|
1249
1249
|
}, c = () => {
|
|
1250
1250
|
if (!t.value.ecrIntegrations)
|
|
1251
1251
|
return n();
|
|
1252
|
-
const v = t.value.ecrIntegrations,
|
|
1253
|
-
if (
|
|
1252
|
+
const v = t.value.ecrIntegrations, f = v.findIndex((i) => i && i.gateway && i.gateway === "Ghl2");
|
|
1253
|
+
if (f === -1)
|
|
1254
1254
|
return n();
|
|
1255
|
-
o.value =
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
ip:
|
|
1259
|
-
receiptName:
|
|
1255
|
+
o.value = f;
|
|
1256
|
+
const p = v.at(f);
|
|
1257
|
+
p.gateway === "Ghl2" && p.config && (r.value = {
|
|
1258
|
+
ip: p.config.ip ?? "",
|
|
1259
|
+
receiptName: p.receiptName ?? ""
|
|
1260
1260
|
});
|
|
1261
1261
|
};
|
|
1262
|
-
|
|
1262
|
+
ne(t, c), ie(c);
|
|
1263
1263
|
async function s(v) {
|
|
1264
|
-
var
|
|
1265
|
-
(
|
|
1264
|
+
var f;
|
|
1265
|
+
(f = t.value.ecrIntegrations) == null || f.splice(v, 1), a.onUpdate(t.value);
|
|
1266
1266
|
}
|
|
1267
|
-
return (v,
|
|
1268
|
-
const
|
|
1269
|
-
return y(),
|
|
1267
|
+
return (v, f) => {
|
|
1268
|
+
const p = h("FmTextField"), i = h("FmButton"), u = h("FmForm");
|
|
1269
|
+
return y(), F(u, {
|
|
1270
1270
|
ref: l.value,
|
|
1271
1271
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1272
|
-
onValidationSuccess:
|
|
1272
|
+
onValidationSuccess: f[2] || (f[2] = () => {
|
|
1273
1273
|
t.value.ecrIntegrations || (t.value.ecrIntegrations = []), o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1274
1274
|
gateway: "Ghl2",
|
|
1275
1275
|
config: { ip: r.value.ip },
|
|
@@ -1282,19 +1282,19 @@ const ln = {
|
|
|
1282
1282
|
})
|
|
1283
1283
|
}, {
|
|
1284
1284
|
default: ae(() => [
|
|
1285
|
-
b(
|
|
1285
|
+
b(p, {
|
|
1286
1286
|
modelValue: r.value.ip,
|
|
1287
|
-
"onUpdate:modelValue":
|
|
1287
|
+
"onUpdate:modelValue": f[0] || (f[0] = (m) => r.value.ip = m),
|
|
1288
1288
|
label: "IP Address"
|
|
1289
1289
|
}, null, 8, ["modelValue"]),
|
|
1290
|
-
b(
|
|
1290
|
+
b(p, {
|
|
1291
1291
|
modelValue: r.value.receiptName,
|
|
1292
|
-
"onUpdate:modelValue":
|
|
1292
|
+
"onUpdate:modelValue": f[1] || (f[1] = (m) => r.value.receiptName = m),
|
|
1293
1293
|
label: "Receipt Payment Name",
|
|
1294
1294
|
"label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
|
|
1295
1295
|
}, null, 8, ["modelValue"]),
|
|
1296
1296
|
x("div", Pn, [
|
|
1297
|
-
o.value > -1 ? (y(),
|
|
1297
|
+
o.value > -1 ? (y(), F(i, {
|
|
1298
1298
|
key: 0,
|
|
1299
1299
|
class: "flex-1",
|
|
1300
1300
|
variant: "secondary",
|
|
@@ -1313,7 +1313,7 @@ const ln = {
|
|
|
1313
1313
|
}, 512);
|
|
1314
1314
|
};
|
|
1315
1315
|
}
|
|
1316
|
-
}),
|
|
1316
|
+
}), An = { class: "flex items-end" }, Mn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Rn = { class: "flex mt-6 space-x-6" }, Bn = /* @__PURE__ */ X({
|
|
1317
1317
|
__name: "Ghl3Gateway",
|
|
1318
1318
|
props: {
|
|
1319
1319
|
terminal: {
|
|
@@ -1326,50 +1326,50 @@ const ln = {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
},
|
|
1328
1328
|
setup(e) {
|
|
1329
|
-
const a = e, t =
|
|
1329
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1330
1330
|
receiptName: "",
|
|
1331
1331
|
config: {},
|
|
1332
1332
|
cardTypes: []
|
|
1333
1333
|
}), c = () => {
|
|
1334
1334
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1335
1335
|
}, s = () => {
|
|
1336
|
-
var
|
|
1336
|
+
var m;
|
|
1337
1337
|
if (!t.value.ecrIntegrations)
|
|
1338
1338
|
return c();
|
|
1339
|
-
const
|
|
1339
|
+
const p = t.value.ecrIntegrations, i = p.findIndex(
|
|
1340
1340
|
(g) => g && g.gateway && g.gateway === "Ghl3"
|
|
1341
1341
|
);
|
|
1342
1342
|
if (i === -1)
|
|
1343
1343
|
return c();
|
|
1344
1344
|
o.value = i;
|
|
1345
|
-
const u =
|
|
1345
|
+
const u = p.at(i);
|
|
1346
1346
|
u.gateway === "Ghl3" && u.config && (n.value = {
|
|
1347
1347
|
config: u.config,
|
|
1348
1348
|
receiptName: u.receiptName ?? "",
|
|
1349
|
-
cardTypes: ((
|
|
1349
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1350
1350
|
});
|
|
1351
1351
|
};
|
|
1352
|
-
|
|
1353
|
-
async function v(
|
|
1352
|
+
ne(t, s), ie(s);
|
|
1353
|
+
async function v(p) {
|
|
1354
1354
|
var i;
|
|
1355
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1355
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1356
1356
|
}
|
|
1357
|
-
async function
|
|
1357
|
+
async function f() {
|
|
1358
1358
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1359
1359
|
}
|
|
1360
|
-
return (
|
|
1361
|
-
const u =
|
|
1362
|
-
return y(),
|
|
1360
|
+
return (p, i) => {
|
|
1361
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1362
|
+
return y(), F(k, {
|
|
1363
1363
|
ref: l.value,
|
|
1364
1364
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1365
1365
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1366
|
-
var
|
|
1366
|
+
var d, C;
|
|
1367
1367
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1368
1368
|
gateway: "Ghl3",
|
|
1369
1369
|
config: n.value.config,
|
|
1370
1370
|
receiptName: n.value.receiptName,
|
|
1371
1371
|
dialogConfig: {
|
|
1372
|
-
...(C = (
|
|
1372
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
1373
1373
|
cardTypes: n.value.cardTypes
|
|
1374
1374
|
}
|
|
1375
1375
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1385,40 +1385,40 @@ const ln = {
|
|
|
1385
1385
|
default: ae(() => [
|
|
1386
1386
|
b(u, {
|
|
1387
1387
|
modelValue: n.value.receiptName,
|
|
1388
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1388
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.receiptName = d),
|
|
1389
1389
|
label: "Receipt Payment Name",
|
|
1390
1390
|
"label-info": "Default receipt display will be 'TERMINAL_GHL'"
|
|
1391
1391
|
}, null, 8, ["modelValue"]),
|
|
1392
|
-
x("div",
|
|
1392
|
+
x("div", An, [
|
|
1393
1393
|
b(u, {
|
|
1394
1394
|
modelValue: r.value,
|
|
1395
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1395
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d),
|
|
1396
1396
|
label: "Fallback Card Types",
|
|
1397
1397
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1398
1398
|
}, null, 8, ["modelValue"]),
|
|
1399
|
-
b(
|
|
1399
|
+
b(m, {
|
|
1400
1400
|
class: "ml-4",
|
|
1401
1401
|
icon: "add",
|
|
1402
|
-
onClick:
|
|
1402
|
+
onClick: f
|
|
1403
1403
|
})
|
|
1404
1404
|
]),
|
|
1405
|
-
x("div",
|
|
1406
|
-
(y(!0),
|
|
1407
|
-
key:
|
|
1408
|
-
label:
|
|
1405
|
+
x("div", Mn, [
|
|
1406
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1407
|
+
key: d,
|
|
1408
|
+
label: d,
|
|
1409
1409
|
removable: !0,
|
|
1410
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1410
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1411
1411
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1412
1412
|
]),
|
|
1413
1413
|
x("div", Rn, [
|
|
1414
|
-
o.value > -1 ? (y(),
|
|
1414
|
+
o.value > -1 ? (y(), F(m, {
|
|
1415
1415
|
key: 0,
|
|
1416
1416
|
class: "flex-1",
|
|
1417
1417
|
variant: "secondary",
|
|
1418
1418
|
label: "Delete",
|
|
1419
1419
|
onclick: () => v(o.value)
|
|
1420
1420
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1421
|
-
b(
|
|
1421
|
+
b(m, {
|
|
1422
1422
|
type: "submit",
|
|
1423
1423
|
class: "flex-1",
|
|
1424
1424
|
variant: "primary",
|
|
@@ -1430,7 +1430,7 @@ const ln = {
|
|
|
1430
1430
|
}, 512);
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
|
-
}), qn = { class: "flex items-end" }, Gn = { class: "flex flex-wrap gap-8 items-center mt-4" },
|
|
1433
|
+
}), qn = { class: "flex items-end" }, Gn = { class: "flex flex-wrap gap-8 items-center mt-4" }, $n = { class: "flex mt-6 space-x-6" }, Ln = /* @__PURE__ */ X({
|
|
1434
1434
|
__name: "HlbbGateway",
|
|
1435
1435
|
props: {
|
|
1436
1436
|
terminal: {
|
|
@@ -1443,50 +1443,50 @@ const ln = {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
},
|
|
1445
1445
|
setup(e) {
|
|
1446
|
-
const a = e, t =
|
|
1446
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1447
1447
|
receiptName: "",
|
|
1448
1448
|
config: {},
|
|
1449
1449
|
cardTypes: []
|
|
1450
1450
|
}), c = () => {
|
|
1451
1451
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1452
1452
|
}, s = () => {
|
|
1453
|
-
var
|
|
1453
|
+
var m;
|
|
1454
1454
|
if (!t.value.ecrIntegrations)
|
|
1455
1455
|
return c();
|
|
1456
|
-
const
|
|
1456
|
+
const p = t.value.ecrIntegrations, i = p.findIndex(
|
|
1457
1457
|
(g) => g && g.gateway && g.gateway === "Hlbb"
|
|
1458
1458
|
);
|
|
1459
1459
|
if (i === -1)
|
|
1460
1460
|
return c();
|
|
1461
1461
|
o.value = i;
|
|
1462
|
-
const u =
|
|
1462
|
+
const u = p.at(i);
|
|
1463
1463
|
u.gateway === "Hlbb" && u.config && (n.value = {
|
|
1464
1464
|
config: u.config,
|
|
1465
1465
|
receiptName: u.receiptName ?? "",
|
|
1466
|
-
cardTypes: ((
|
|
1466
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1467
1467
|
});
|
|
1468
1468
|
};
|
|
1469
|
-
|
|
1470
|
-
async function v(
|
|
1469
|
+
ne(t, s), ie(s);
|
|
1470
|
+
async function v(p) {
|
|
1471
1471
|
var i;
|
|
1472
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1472
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1473
1473
|
}
|
|
1474
|
-
async function
|
|
1474
|
+
async function f() {
|
|
1475
1475
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1476
1476
|
}
|
|
1477
|
-
return (
|
|
1478
|
-
const u =
|
|
1479
|
-
return y(),
|
|
1477
|
+
return (p, i) => {
|
|
1478
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1479
|
+
return y(), F(k, {
|
|
1480
1480
|
ref: l.value,
|
|
1481
1481
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1482
1482
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1483
|
-
var
|
|
1483
|
+
var d, C;
|
|
1484
1484
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1485
1485
|
gateway: "Hlbb",
|
|
1486
1486
|
config: n.value.config,
|
|
1487
1487
|
receiptName: n.value.receiptName,
|
|
1488
1488
|
dialogConfig: {
|
|
1489
|
-
...(C = (
|
|
1489
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
1490
1490
|
cardTypes: n.value.cardTypes
|
|
1491
1491
|
}
|
|
1492
1492
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1502,40 +1502,40 @@ const ln = {
|
|
|
1502
1502
|
default: ae(() => [
|
|
1503
1503
|
b(u, {
|
|
1504
1504
|
modelValue: n.value.receiptName,
|
|
1505
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1505
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.receiptName = d),
|
|
1506
1506
|
label: "Receipt Payment Name",
|
|
1507
1507
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1508
1508
|
}, null, 8, ["modelValue"]),
|
|
1509
1509
|
x("div", qn, [
|
|
1510
1510
|
b(u, {
|
|
1511
1511
|
modelValue: r.value,
|
|
1512
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1512
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d),
|
|
1513
1513
|
label: "Fallback Card Types",
|
|
1514
1514
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1515
1515
|
}, null, 8, ["modelValue"]),
|
|
1516
|
-
b(
|
|
1516
|
+
b(m, {
|
|
1517
1517
|
class: "ml-4",
|
|
1518
1518
|
icon: "add",
|
|
1519
|
-
onClick:
|
|
1519
|
+
onClick: f
|
|
1520
1520
|
})
|
|
1521
1521
|
]),
|
|
1522
1522
|
x("div", Gn, [
|
|
1523
|
-
(y(!0),
|
|
1524
|
-
key:
|
|
1525
|
-
label:
|
|
1523
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1524
|
+
key: d,
|
|
1525
|
+
label: d,
|
|
1526
1526
|
removable: !0,
|
|
1527
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1527
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1528
1528
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1529
1529
|
]),
|
|
1530
|
-
x("div",
|
|
1531
|
-
o.value > -1 ? (y(),
|
|
1530
|
+
x("div", $n, [
|
|
1531
|
+
o.value > -1 ? (y(), F(m, {
|
|
1532
1532
|
key: 0,
|
|
1533
1533
|
class: "flex-1",
|
|
1534
1534
|
variant: "secondary",
|
|
1535
1535
|
label: "Delete",
|
|
1536
1536
|
onclick: () => v(o.value)
|
|
1537
1537
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1538
|
-
b(
|
|
1538
|
+
b(m, {
|
|
1539
1539
|
type: "submit",
|
|
1540
1540
|
class: "flex-1",
|
|
1541
1541
|
variant: "primary",
|
|
@@ -1547,7 +1547,7 @@ const ln = {
|
|
|
1547
1547
|
}, 512);
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
}),
|
|
1550
|
+
}), Yn = { class: "flex items-end" }, jn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Hn = { class: "flex mt-6 space-x-6" }, Kn = /* @__PURE__ */ X({
|
|
1551
1551
|
__name: "GlobalPaymentsGateway",
|
|
1552
1552
|
props: {
|
|
1553
1553
|
terminal: {
|
|
@@ -1560,50 +1560,50 @@ const ln = {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
},
|
|
1562
1562
|
setup(e) {
|
|
1563
|
-
const a = e, t =
|
|
1563
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1564
1564
|
ip: "",
|
|
1565
1565
|
receiptName: "",
|
|
1566
1566
|
cardTypes: []
|
|
1567
1567
|
}), c = () => {
|
|
1568
1568
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1569
1569
|
}, s = () => {
|
|
1570
|
-
var
|
|
1570
|
+
var m;
|
|
1571
1571
|
if (!t.value.ecrIntegrations)
|
|
1572
1572
|
return c();
|
|
1573
|
-
const
|
|
1573
|
+
const p = t.value.ecrIntegrations, i = p.findIndex(
|
|
1574
1574
|
(g) => g && g.gateway && g.gateway === "GlobalPayments"
|
|
1575
1575
|
);
|
|
1576
1576
|
if (i === -1)
|
|
1577
1577
|
return c();
|
|
1578
1578
|
o.value = i;
|
|
1579
|
-
const u =
|
|
1579
|
+
const u = p.at(i);
|
|
1580
1580
|
u.gateway === "GlobalPayments" && u.config && (n.value = {
|
|
1581
1581
|
ip: u.config.ip ?? "",
|
|
1582
1582
|
receiptName: u.receiptName ?? "",
|
|
1583
|
-
cardTypes: ((
|
|
1583
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1584
1584
|
});
|
|
1585
1585
|
};
|
|
1586
|
-
|
|
1587
|
-
async function v(
|
|
1586
|
+
ne(t, s), ie(s);
|
|
1587
|
+
async function v(p) {
|
|
1588
1588
|
var i;
|
|
1589
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1589
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1590
1590
|
}
|
|
1591
|
-
async function
|
|
1591
|
+
async function f() {
|
|
1592
1592
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1593
1593
|
}
|
|
1594
|
-
return (
|
|
1595
|
-
const u =
|
|
1596
|
-
return y(),
|
|
1594
|
+
return (p, i) => {
|
|
1595
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1596
|
+
return y(), F(k, {
|
|
1597
1597
|
ref: l.value,
|
|
1598
1598
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1599
1599
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
1600
|
-
var
|
|
1600
|
+
var d, C;
|
|
1601
1601
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1602
1602
|
gateway: "GlobalPayments",
|
|
1603
1603
|
config: { ip: n.value.ip },
|
|
1604
1604
|
receiptName: n.value.receiptName,
|
|
1605
1605
|
dialogConfig: {
|
|
1606
|
-
...(C = (
|
|
1606
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
1607
1607
|
cardTypes: n.value.cardTypes
|
|
1608
1608
|
}
|
|
1609
1609
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1619,45 +1619,45 @@ const ln = {
|
|
|
1619
1619
|
default: ae(() => [
|
|
1620
1620
|
b(u, {
|
|
1621
1621
|
modelValue: n.value.ip,
|
|
1622
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1622
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.ip = d),
|
|
1623
1623
|
label: "IP Address"
|
|
1624
1624
|
}, null, 8, ["modelValue"]),
|
|
1625
1625
|
b(u, {
|
|
1626
1626
|
modelValue: n.value.receiptName,
|
|
1627
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1627
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => n.value.receiptName = d),
|
|
1628
1628
|
label: "Receipt Payment Name",
|
|
1629
1629
|
"label-info": "Default receipt display will be 'TERMINAL_GP'"
|
|
1630
1630
|
}, null, 8, ["modelValue"]),
|
|
1631
|
-
x("div",
|
|
1631
|
+
x("div", Yn, [
|
|
1632
1632
|
b(u, {
|
|
1633
1633
|
modelValue: r.value,
|
|
1634
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1634
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => r.value = d),
|
|
1635
1635
|
label: "Fallback Card Types",
|
|
1636
1636
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1637
1637
|
}, null, 8, ["modelValue"]),
|
|
1638
|
-
b(
|
|
1638
|
+
b(m, {
|
|
1639
1639
|
class: "ml-4",
|
|
1640
1640
|
icon: "add",
|
|
1641
|
-
onClick:
|
|
1641
|
+
onClick: f
|
|
1642
1642
|
})
|
|
1643
1643
|
]),
|
|
1644
1644
|
x("div", jn, [
|
|
1645
|
-
(y(!0),
|
|
1646
|
-
key:
|
|
1647
|
-
label:
|
|
1645
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1646
|
+
key: d,
|
|
1647
|
+
label: d,
|
|
1648
1648
|
removable: !0,
|
|
1649
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1649
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1650
1650
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1651
1651
|
]),
|
|
1652
1652
|
x("div", Hn, [
|
|
1653
|
-
o.value > -1 ? (y(),
|
|
1653
|
+
o.value > -1 ? (y(), F(m, {
|
|
1654
1654
|
key: 0,
|
|
1655
1655
|
class: "flex-1",
|
|
1656
1656
|
variant: "secondary",
|
|
1657
1657
|
label: "Delete",
|
|
1658
1658
|
onclick: () => v(o.value)
|
|
1659
1659
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1660
|
-
b(
|
|
1660
|
+
b(m, {
|
|
1661
1661
|
type: "submit",
|
|
1662
1662
|
class: "flex-1",
|
|
1663
1663
|
variant: "primary",
|
|
@@ -1682,48 +1682,48 @@ const ln = {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
},
|
|
1684
1684
|
setup(e) {
|
|
1685
|
-
const a = e, t =
|
|
1685
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1686
1686
|
receiptName: "",
|
|
1687
1687
|
cardTypes: []
|
|
1688
1688
|
}), c = () => {
|
|
1689
1689
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1690
1690
|
}, s = () => {
|
|
1691
|
-
var
|
|
1691
|
+
var m;
|
|
1692
1692
|
if (!t.value.ecrIntegrations)
|
|
1693
1693
|
return c();
|
|
1694
|
-
const
|
|
1694
|
+
const p = t.value.ecrIntegrations, i = p.findIndex(
|
|
1695
1695
|
(g) => g && g.gateway && g.gateway === "Oma"
|
|
1696
1696
|
);
|
|
1697
1697
|
if (i === -1)
|
|
1698
1698
|
return c();
|
|
1699
1699
|
o.value = i;
|
|
1700
|
-
const u =
|
|
1700
|
+
const u = p.at(i);
|
|
1701
1701
|
u.gateway === "Oma" && u.config && (n.value = {
|
|
1702
1702
|
receiptName: u.receiptName ?? "",
|
|
1703
|
-
cardTypes: ((
|
|
1703
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1704
1704
|
});
|
|
1705
1705
|
};
|
|
1706
|
-
|
|
1707
|
-
async function v(
|
|
1706
|
+
ne(t, s), ie(s);
|
|
1707
|
+
async function v(p) {
|
|
1708
1708
|
var i;
|
|
1709
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1709
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1710
1710
|
}
|
|
1711
|
-
async function
|
|
1711
|
+
async function f() {
|
|
1712
1712
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1713
1713
|
}
|
|
1714
|
-
return (
|
|
1715
|
-
const u =
|
|
1716
|
-
return y(),
|
|
1714
|
+
return (p, i) => {
|
|
1715
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1716
|
+
return y(), F(k, {
|
|
1717
1717
|
ref: l.value,
|
|
1718
1718
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1719
1719
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1720
|
-
var
|
|
1720
|
+
var d, C;
|
|
1721
1721
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1722
1722
|
gateway: "Oma",
|
|
1723
1723
|
config: {},
|
|
1724
1724
|
receiptName: n.value.receiptName,
|
|
1725
1725
|
dialogConfig: {
|
|
1726
|
-
...(C = (
|
|
1726
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
1727
1727
|
cardTypes: n.value.cardTypes
|
|
1728
1728
|
}
|
|
1729
1729
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1739,40 +1739,40 @@ const ln = {
|
|
|
1739
1739
|
default: ae(() => [
|
|
1740
1740
|
b(u, {
|
|
1741
1741
|
modelValue: n.value.receiptName,
|
|
1742
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1742
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.receiptName = d),
|
|
1743
1743
|
label: "Receipt Payment Name",
|
|
1744
1744
|
"label-info": "Default receipt display will be 'TERMINAL_OMA'"
|
|
1745
1745
|
}, null, 8, ["modelValue"]),
|
|
1746
1746
|
x("div", Xn, [
|
|
1747
1747
|
b(u, {
|
|
1748
1748
|
modelValue: r.value,
|
|
1749
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1749
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d),
|
|
1750
1750
|
label: "Fallback Card Types",
|
|
1751
1751
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1752
1752
|
}, null, 8, ["modelValue"]),
|
|
1753
|
-
b(
|
|
1753
|
+
b(m, {
|
|
1754
1754
|
class: "ml-4",
|
|
1755
1755
|
icon: "add",
|
|
1756
|
-
onClick:
|
|
1756
|
+
onClick: f
|
|
1757
1757
|
})
|
|
1758
1758
|
]),
|
|
1759
1759
|
x("div", Wn, [
|
|
1760
|
-
(y(!0),
|
|
1761
|
-
key:
|
|
1762
|
-
label:
|
|
1760
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1761
|
+
key: d,
|
|
1762
|
+
label: d,
|
|
1763
1763
|
removable: !0,
|
|
1764
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1764
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1765
1765
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1766
1766
|
]),
|
|
1767
1767
|
x("div", zn, [
|
|
1768
|
-
o.value > -1 ? (y(),
|
|
1768
|
+
o.value > -1 ? (y(), F(m, {
|
|
1769
1769
|
key: 0,
|
|
1770
1770
|
class: "flex-1",
|
|
1771
1771
|
variant: "secondary",
|
|
1772
1772
|
label: "Delete",
|
|
1773
1773
|
onclick: () => v(o.value)
|
|
1774
1774
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1775
|
-
b(
|
|
1775
|
+
b(m, {
|
|
1776
1776
|
type: "submit",
|
|
1777
1777
|
class: "flex-1",
|
|
1778
1778
|
variant: "primary",
|
|
@@ -1797,51 +1797,51 @@ const ln = {
|
|
|
1797
1797
|
}
|
|
1798
1798
|
},
|
|
1799
1799
|
setup(e) {
|
|
1800
|
-
const a = e, t =
|
|
1800
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
1801
1801
|
receiptName: "",
|
|
1802
1802
|
ip: "",
|
|
1803
1803
|
cardTypes: []
|
|
1804
1804
|
}), c = () => {
|
|
1805
1805
|
n.value.receiptName = "", n.value.ip = "", n.value.cardTypes = [], o.value = -1;
|
|
1806
1806
|
}, s = () => {
|
|
1807
|
-
var
|
|
1807
|
+
var m;
|
|
1808
1808
|
if (!t.value.ecrIntegrations)
|
|
1809
1809
|
return c();
|
|
1810
|
-
const
|
|
1810
|
+
const p = t.value.ecrIntegrations, i = p.findIndex(
|
|
1811
1811
|
(g) => g && g.gateway && g.gateway === "Revenue"
|
|
1812
1812
|
);
|
|
1813
1813
|
if (i === -1)
|
|
1814
1814
|
return c();
|
|
1815
1815
|
o.value = i;
|
|
1816
|
-
const u =
|
|
1816
|
+
const u = p.at(i);
|
|
1817
1817
|
u.gateway === "Revenue" && u.config && (n.value = {
|
|
1818
1818
|
receiptName: u.receiptName ?? "",
|
|
1819
1819
|
ip: u.config.ip ?? "",
|
|
1820
|
-
cardTypes: ((
|
|
1820
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
1821
1821
|
});
|
|
1822
1822
|
};
|
|
1823
|
-
|
|
1824
|
-
async function v(
|
|
1823
|
+
ne(t, s), ie(s);
|
|
1824
|
+
async function v(p) {
|
|
1825
1825
|
var i;
|
|
1826
|
-
(i = t.value.ecrIntegrations) == null || i.splice(
|
|
1826
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
1827
1827
|
}
|
|
1828
|
-
async function
|
|
1828
|
+
async function f() {
|
|
1829
1829
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1830
1830
|
}
|
|
1831
|
-
return (
|
|
1832
|
-
const u =
|
|
1833
|
-
return y(),
|
|
1831
|
+
return (p, i) => {
|
|
1832
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
1833
|
+
return y(), F(k, {
|
|
1834
1834
|
ref: l.value,
|
|
1835
1835
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1836
1836
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
1837
1837
|
var C, B;
|
|
1838
|
-
const
|
|
1838
|
+
const d = {
|
|
1839
1839
|
type: "tcp",
|
|
1840
1840
|
ip: n.value.ip
|
|
1841
1841
|
};
|
|
1842
1842
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1843
1843
|
gateway: "Revenue",
|
|
1844
|
-
config:
|
|
1844
|
+
config: d,
|
|
1845
1845
|
receiptName: n.value.receiptName,
|
|
1846
1846
|
dialogConfig: {
|
|
1847
1847
|
...(B = (C = t.value.ecrIntegrations) == null ? void 0 : C[o.value]) == null ? void 0 : B.dialogConfig,
|
|
@@ -1849,7 +1849,7 @@ const ln = {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
1851
1851
|
gateway: "Revenue",
|
|
1852
|
-
config:
|
|
1852
|
+
config: d,
|
|
1853
1853
|
receiptName: n.value.receiptName,
|
|
1854
1854
|
dialogConfig: {
|
|
1855
1855
|
cardTypes: n.value.cardTypes
|
|
@@ -1860,47 +1860,47 @@ const ln = {
|
|
|
1860
1860
|
default: ae(() => [
|
|
1861
1861
|
b(u, {
|
|
1862
1862
|
modelValue: n.value.ip,
|
|
1863
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1863
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.ip = d),
|
|
1864
1864
|
label: "Terminal IP Address",
|
|
1865
1865
|
"label-info": "Terminal WiFi IP with optional port, e.g. 192.168.1.50:8080 (defaults to port 8080)",
|
|
1866
|
-
rules:
|
|
1866
|
+
rules: A(Tt)(A(It).string().min(1))
|
|
1867
1867
|
}, null, 8, ["modelValue", "rules"]),
|
|
1868
1868
|
b(u, {
|
|
1869
1869
|
modelValue: n.value.receiptName,
|
|
1870
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1870
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => n.value.receiptName = d),
|
|
1871
1871
|
label: "Receipt Payment Name",
|
|
1872
1872
|
"label-info": "Default receipt display will be 'TERMINAL_REVENUE'"
|
|
1873
1873
|
}, null, 8, ["modelValue"]),
|
|
1874
1874
|
x("div", Jn, [
|
|
1875
1875
|
b(u, {
|
|
1876
1876
|
modelValue: r.value,
|
|
1877
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1877
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => r.value = d),
|
|
1878
1878
|
label: "Fallback Card Types",
|
|
1879
1879
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1880
1880
|
}, null, 8, ["modelValue"]),
|
|
1881
|
-
b(
|
|
1881
|
+
b(m, {
|
|
1882
1882
|
class: "ml-4",
|
|
1883
1883
|
icon: "add",
|
|
1884
|
-
onClick:
|
|
1884
|
+
onClick: f
|
|
1885
1885
|
})
|
|
1886
1886
|
]),
|
|
1887
1887
|
x("div", Zn, [
|
|
1888
|
-
(y(!0),
|
|
1889
|
-
key:
|
|
1890
|
-
label:
|
|
1888
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
1889
|
+
key: d,
|
|
1890
|
+
label: d,
|
|
1891
1891
|
removable: !0,
|
|
1892
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1892
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
1893
1893
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1894
1894
|
]),
|
|
1895
1895
|
x("div", el, [
|
|
1896
|
-
o.value > -1 ? (y(),
|
|
1896
|
+
o.value > -1 ? (y(), F(m, {
|
|
1897
1897
|
key: 0,
|
|
1898
1898
|
class: "flex-1",
|
|
1899
1899
|
variant: "secondary",
|
|
1900
1900
|
label: "Delete",
|
|
1901
1901
|
onclick: () => v(o.value)
|
|
1902
1902
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1903
|
-
b(
|
|
1903
|
+
b(m, {
|
|
1904
1904
|
type: "submit",
|
|
1905
1905
|
class: "flex-1",
|
|
1906
1906
|
variant: "primary",
|
|
@@ -1928,11 +1928,11 @@ const ln = {
|
|
|
1928
1928
|
}
|
|
1929
1929
|
},
|
|
1930
1930
|
setup(e) {
|
|
1931
|
-
const { isLoading: a, startAsyncCall: t } = je(), l = e, o =
|
|
1931
|
+
const { isLoading: a, startAsyncCall: t } = je(), l = e, o = ue(() => l.terminal), r = T(), n = T(), c = T(-1), s = T({
|
|
1932
1932
|
externalTerminalId: ""
|
|
1933
1933
|
}), v = () => {
|
|
1934
1934
|
s.value.externalTerminalId = "", c.value = -1;
|
|
1935
|
-
},
|
|
1935
|
+
}, f = () => {
|
|
1936
1936
|
if (t(async () => {
|
|
1937
1937
|
r.value = await da.getRestaurantExternalTerminals(
|
|
1938
1938
|
l.terminal.referenceId,
|
|
@@ -1944,49 +1944,49 @@ const ln = {
|
|
|
1944
1944
|
if (u === -1)
|
|
1945
1945
|
return v();
|
|
1946
1946
|
c.value = u;
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
externalTerminalId:
|
|
1947
|
+
const m = l.terminal.ecrs.at(u);
|
|
1948
|
+
m.gateway === "Beam" && m.config && (s.value = {
|
|
1949
|
+
externalTerminalId: m.config.externalTerminalId
|
|
1950
1950
|
});
|
|
1951
1951
|
};
|
|
1952
|
-
|
|
1953
|
-
const
|
|
1952
|
+
ne(o, f), ie(f);
|
|
1953
|
+
const p = K(() => (r.value ?? []).map((u) => ({
|
|
1954
1954
|
label: u.status === "READY" ? u.name : `${u.name} (unpaired)`,
|
|
1955
1955
|
value: u._id
|
|
1956
1956
|
})));
|
|
1957
1957
|
async function i(u) {
|
|
1958
|
-
var
|
|
1959
|
-
(
|
|
1958
|
+
var m;
|
|
1959
|
+
(m = l.terminal.ecrs) == null || m.splice(u, 1), l.onUpdate(l.terminal);
|
|
1960
1960
|
}
|
|
1961
|
-
return (u,
|
|
1962
|
-
const g =
|
|
1963
|
-
return
|
|
1961
|
+
return (u, m) => {
|
|
1962
|
+
const g = h("FmCircularProgress"), k = h("FmSelect"), d = h("FmButton"), C = h("FmForm");
|
|
1963
|
+
return A(a) ? (y(), E("div", al, [
|
|
1964
1964
|
b(g, { size: "xxl" })
|
|
1965
|
-
])) : (y(),
|
|
1965
|
+
])) : (y(), F(C, {
|
|
1966
1966
|
key: 1,
|
|
1967
1967
|
ref: n.value,
|
|
1968
1968
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1969
|
-
onValidationSuccess:
|
|
1969
|
+
onValidationSuccess: m[1] || (m[1] = () => {
|
|
1970
1970
|
c.value > -1 ? o.value.ecrs[c.value] = { gateway: "Beam", config: s.value } : (o.value.ecrs || (o.value.ecrs = []), o.value.ecrs.push({ gateway: "Beam", config: s.value })), l.onUpdate(o.value);
|
|
1971
1971
|
})
|
|
1972
1972
|
}, {
|
|
1973
1973
|
default: ae(() => [
|
|
1974
1974
|
b(k, {
|
|
1975
1975
|
modelValue: s.value.externalTerminalId,
|
|
1976
|
-
"onUpdate:modelValue":
|
|
1976
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => s.value.externalTerminalId = B),
|
|
1977
1977
|
label: "External Terminal",
|
|
1978
|
-
items:
|
|
1979
|
-
rules:
|
|
1978
|
+
items: p.value,
|
|
1979
|
+
rules: A(Tt)(A(It).string().min(1, "External terminal is required"))
|
|
1980
1980
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1981
1981
|
x("div", nl, [
|
|
1982
|
-
c.value > -1 ? (y(),
|
|
1982
|
+
c.value > -1 ? (y(), F(d, {
|
|
1983
1983
|
key: 0,
|
|
1984
1984
|
class: "flex-1",
|
|
1985
1985
|
variant: "secondary",
|
|
1986
1986
|
label: "Delete",
|
|
1987
1987
|
onclick: () => i(c.value)
|
|
1988
1988
|
}, null, 8, ["onclick"])) : R("", !0),
|
|
1989
|
-
b(
|
|
1989
|
+
b(d, {
|
|
1990
1990
|
type: "submit",
|
|
1991
1991
|
class: "flex-1",
|
|
1992
1992
|
variant: "primary",
|
|
@@ -2014,11 +2014,11 @@ const ln = {
|
|
|
2014
2014
|
}
|
|
2015
2015
|
},
|
|
2016
2016
|
setup(e) {
|
|
2017
|
-
const { isLoading: a, startAsyncCall: t } = je(), l = e, o =
|
|
2017
|
+
const { isLoading: a, startAsyncCall: t } = je(), l = e, o = ue(() => l.terminal), r = T(), n = T(), c = T(-1), s = T({
|
|
2018
2018
|
externalTerminalId: ""
|
|
2019
2019
|
}), v = () => {
|
|
2020
2020
|
s.value.externalTerminalId = "", c.value = -1;
|
|
2021
|
-
},
|
|
2021
|
+
}, f = () => {
|
|
2022
2022
|
if (t(async () => {
|
|
2023
2023
|
r.value = await da.getRestaurantExternalTerminals(
|
|
2024
2024
|
l.terminal.referenceId,
|
|
@@ -2026,29 +2026,29 @@ const ln = {
|
|
|
2026
2026
|
);
|
|
2027
2027
|
}), !l.terminal.ecrs)
|
|
2028
2028
|
return v();
|
|
2029
|
-
const
|
|
2030
|
-
if (
|
|
2029
|
+
const m = l.terminal.ecrs.findIndex((k) => k && k.gateway && k.gateway === "Bri");
|
|
2030
|
+
if (m === -1)
|
|
2031
2031
|
return v();
|
|
2032
|
-
c.value =
|
|
2033
|
-
const g = l.terminal.ecrs.at(
|
|
2032
|
+
c.value = m;
|
|
2033
|
+
const g = l.terminal.ecrs.at(m);
|
|
2034
2034
|
g.gateway === "Bri" && g.config && (s.value = {
|
|
2035
2035
|
externalTerminalId: g.config.externalTerminalId
|
|
2036
2036
|
});
|
|
2037
2037
|
};
|
|
2038
|
-
|
|
2039
|
-
const
|
|
2040
|
-
if (
|
|
2038
|
+
ne(o, f), ie(f);
|
|
2039
|
+
const p = K(() => (r.value ?? []).filter((m) => m.status === "READY").map((m) => ({ label: m.name, value: m._id }))), i = K(() => {
|
|
2040
|
+
if (p.value.length === 0)
|
|
2041
2041
|
return "Please pair one BRI terminal under External Terminals before applying here.";
|
|
2042
2042
|
});
|
|
2043
|
-
async function u(
|
|
2043
|
+
async function u(m) {
|
|
2044
2044
|
var g;
|
|
2045
|
-
(g = l.terminal.ecrs) == null || g.splice(
|
|
2045
|
+
(g = l.terminal.ecrs) == null || g.splice(m, 1), l.onUpdate(l.terminal);
|
|
2046
2046
|
}
|
|
2047
|
-
return (
|
|
2048
|
-
const k =
|
|
2049
|
-
return
|
|
2047
|
+
return (m, g) => {
|
|
2048
|
+
const k = h("FmCircularProgress"), d = h("FmSelect"), C = h("FmButton"), B = h("FmForm");
|
|
2049
|
+
return A(a) ? (y(), E("div", ol, [
|
|
2050
2050
|
b(k, { size: "xxl" })
|
|
2051
|
-
])) : (y(),
|
|
2051
|
+
])) : (y(), F(B, {
|
|
2052
2052
|
key: 1,
|
|
2053
2053
|
ref: n.value,
|
|
2054
2054
|
class: "flex flex-col gap-16 w-[500px]",
|
|
@@ -2057,16 +2057,16 @@ const ln = {
|
|
|
2057
2057
|
})
|
|
2058
2058
|
}, {
|
|
2059
2059
|
default: ae(() => [
|
|
2060
|
-
b(
|
|
2060
|
+
b(d, {
|
|
2061
2061
|
modelValue: s.value.externalTerminalId,
|
|
2062
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
2062
|
+
"onUpdate:modelValue": g[0] || (g[0] = (M) => s.value.externalTerminalId = M),
|
|
2063
2063
|
label: "External Terminal",
|
|
2064
|
-
items:
|
|
2064
|
+
items: p.value,
|
|
2065
2065
|
"helper-text": i.value,
|
|
2066
|
-
rules:
|
|
2066
|
+
rules: A(Tt)(A(It).string().min(1, "External terminal is required"))
|
|
2067
2067
|
}, null, 8, ["modelValue", "items", "helper-text", "rules"]),
|
|
2068
2068
|
x("div", rl, [
|
|
2069
|
-
c.value > -1 ? (y(),
|
|
2069
|
+
c.value > -1 ? (y(), F(C, {
|
|
2070
2070
|
key: 0,
|
|
2071
2071
|
class: "flex-1",
|
|
2072
2072
|
variant: "secondary",
|
|
@@ -2085,7 +2085,127 @@ const ln = {
|
|
|
2085
2085
|
}, 512));
|
|
2086
2086
|
};
|
|
2087
2087
|
}
|
|
2088
|
-
}), sl = { class: "flex items-
|
|
2088
|
+
}), sl = { class: "flex items-end" }, ul = { class: "flex flex-wrap gap-8 items-center mt-4" }, cl = { class: "flex mt-6 space-x-6" }, dl = /* @__PURE__ */ X({
|
|
2089
|
+
__name: "PbbGateway",
|
|
2090
|
+
props: {
|
|
2091
|
+
terminal: {
|
|
2092
|
+
type: Object,
|
|
2093
|
+
required: !0
|
|
2094
|
+
},
|
|
2095
|
+
onUpdate: {
|
|
2096
|
+
type: Function,
|
|
2097
|
+
required: !0
|
|
2098
|
+
}
|
|
2099
|
+
},
|
|
2100
|
+
setup(e) {
|
|
2101
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T(), n = T({
|
|
2102
|
+
ip: "",
|
|
2103
|
+
receiptName: "",
|
|
2104
|
+
cardTypes: []
|
|
2105
|
+
}), c = () => {
|
|
2106
|
+
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
2107
|
+
}, s = () => {
|
|
2108
|
+
var m;
|
|
2109
|
+
if (!t.value.ecrIntegrations)
|
|
2110
|
+
return c();
|
|
2111
|
+
const p = t.value.ecrIntegrations, i = p.findIndex((g) => g && g.gateway && g.gateway === "Pbb");
|
|
2112
|
+
if (i === -1)
|
|
2113
|
+
return c();
|
|
2114
|
+
o.value = i;
|
|
2115
|
+
const u = p.at(i);
|
|
2116
|
+
u.gateway === "Pbb" && u.config && (n.value = {
|
|
2117
|
+
ip: u.config.ip ?? "",
|
|
2118
|
+
receiptName: u.receiptName ?? "",
|
|
2119
|
+
cardTypes: ((m = u.dialogConfig) == null ? void 0 : m.cardTypes) ?? []
|
|
2120
|
+
});
|
|
2121
|
+
};
|
|
2122
|
+
ne(t, s), ie(s);
|
|
2123
|
+
async function v(p) {
|
|
2124
|
+
var i;
|
|
2125
|
+
(i = t.value.ecrIntegrations) == null || i.splice(p, 1), a.onUpdate(t.value);
|
|
2126
|
+
}
|
|
2127
|
+
async function f() {
|
|
2128
|
+
n.value.cardTypes.push(r.value), r.value = "";
|
|
2129
|
+
}
|
|
2130
|
+
return (p, i) => {
|
|
2131
|
+
const u = h("FmTextField"), m = h("FmButton"), g = h("FmChip"), k = h("FmForm");
|
|
2132
|
+
return y(), F(k, {
|
|
2133
|
+
ref: l.value,
|
|
2134
|
+
class: "flex flex-col gap-16 w-[500px]",
|
|
2135
|
+
onValidationSuccess: i[3] || (i[3] = () => {
|
|
2136
|
+
var d, C;
|
|
2137
|
+
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
2138
|
+
gateway: "Pbb",
|
|
2139
|
+
config: { ip: n.value.ip },
|
|
2140
|
+
receiptName: n.value.receiptName,
|
|
2141
|
+
dialogConfig: {
|
|
2142
|
+
...(C = (d = t.value.ecrIntegrations) == null ? void 0 : d[o.value]) == null ? void 0 : C.dialogConfig,
|
|
2143
|
+
cardTypes: n.value.cardTypes
|
|
2144
|
+
}
|
|
2145
|
+
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
2146
|
+
gateway: "Pbb",
|
|
2147
|
+
config: { ip: n.value.ip },
|
|
2148
|
+
receiptName: n.value.receiptName,
|
|
2149
|
+
dialogConfig: {
|
|
2150
|
+
cardTypes: n.value.cardTypes
|
|
2151
|
+
}
|
|
2152
|
+
})), a.onUpdate(t.value);
|
|
2153
|
+
})
|
|
2154
|
+
}, {
|
|
2155
|
+
default: ae(() => [
|
|
2156
|
+
b(u, {
|
|
2157
|
+
modelValue: n.value.ip,
|
|
2158
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value.ip = d),
|
|
2159
|
+
label: "IP Address"
|
|
2160
|
+
}, null, 8, ["modelValue"]),
|
|
2161
|
+
b(u, {
|
|
2162
|
+
modelValue: n.value.receiptName,
|
|
2163
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => n.value.receiptName = d),
|
|
2164
|
+
label: "Receipt Payment Name",
|
|
2165
|
+
"label-info": "Default receipt display will be 'TERMINAL_PBB'"
|
|
2166
|
+
}, null, 8, ["modelValue"]),
|
|
2167
|
+
x("div", sl, [
|
|
2168
|
+
b(u, {
|
|
2169
|
+
modelValue: r.value,
|
|
2170
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => r.value = d),
|
|
2171
|
+
label: "Fallback Card Types",
|
|
2172
|
+
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
2173
|
+
}, null, 8, ["modelValue"]),
|
|
2174
|
+
b(m, {
|
|
2175
|
+
class: "ml-4",
|
|
2176
|
+
icon: "add",
|
|
2177
|
+
onClick: f
|
|
2178
|
+
})
|
|
2179
|
+
]),
|
|
2180
|
+
x("div", ul, [
|
|
2181
|
+
(y(!0), E(re, null, ge(n.value.cardTypes, (d) => (y(), F(g, {
|
|
2182
|
+
key: d,
|
|
2183
|
+
label: d,
|
|
2184
|
+
removable: !0,
|
|
2185
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(d), 1)
|
|
2186
|
+
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
2187
|
+
]),
|
|
2188
|
+
x("div", cl, [
|
|
2189
|
+
o.value > -1 ? (y(), F(m, {
|
|
2190
|
+
key: 0,
|
|
2191
|
+
class: "flex-1",
|
|
2192
|
+
variant: "secondary",
|
|
2193
|
+
label: "Delete",
|
|
2194
|
+
onclick: () => v(o.value)
|
|
2195
|
+
}, null, 8, ["onclick"])) : R("", !0),
|
|
2196
|
+
b(m, {
|
|
2197
|
+
type: "submit",
|
|
2198
|
+
class: "flex-1",
|
|
2199
|
+
variant: "primary",
|
|
2200
|
+
label: "Save"
|
|
2201
|
+
})
|
|
2202
|
+
])
|
|
2203
|
+
]),
|
|
2204
|
+
_: 1
|
|
2205
|
+
}, 512);
|
|
2206
|
+
};
|
|
2207
|
+
}
|
|
2208
|
+
}), pl = { class: "flex items-center" }, ml = { class: "w-[260px] self-start" }, fl = { class: "flex-1" }, vl = /* @__PURE__ */ X({
|
|
2089
2209
|
__name: "EcrGateway",
|
|
2090
2210
|
props: {
|
|
2091
2211
|
terminal: {
|
|
@@ -2109,107 +2229,113 @@ const ln = {
|
|
|
2109
2229
|
label: "GHL Terminal",
|
|
2110
2230
|
value: "ghl",
|
|
2111
2231
|
render: mn,
|
|
2112
|
-
region: [
|
|
2232
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2113
2233
|
},
|
|
2114
2234
|
{
|
|
2115
2235
|
label: "GHL2 Terminal",
|
|
2116
2236
|
value: "ghl2",
|
|
2117
2237
|
render: Un,
|
|
2118
|
-
region: [
|
|
2238
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2119
2239
|
},
|
|
2120
2240
|
{
|
|
2121
2241
|
label: "ITB Maybank Terminal",
|
|
2122
2242
|
value: "mb-itb",
|
|
2123
2243
|
render: yn,
|
|
2124
|
-
region: [
|
|
2244
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2125
2245
|
},
|
|
2126
2246
|
{
|
|
2127
2247
|
label: "PMA Maybank Terminal",
|
|
2128
2248
|
value: "mb-pma",
|
|
2129
2249
|
render: wn,
|
|
2130
|
-
region: [
|
|
2250
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2131
2251
|
},
|
|
2132
2252
|
{
|
|
2133
2253
|
label: "Paysys Maybank Terminal",
|
|
2134
2254
|
value: "mb-paysys",
|
|
2135
2255
|
render: Cn,
|
|
2136
|
-
region: [
|
|
2256
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2137
2257
|
},
|
|
2138
2258
|
{
|
|
2139
2259
|
label: "Nets Terminal",
|
|
2140
2260
|
value: "nets",
|
|
2141
2261
|
render: Nn,
|
|
2142
|
-
region: [
|
|
2262
|
+
region: [Q.F_COUNTRY.enum.SG]
|
|
2143
2263
|
},
|
|
2144
2264
|
{
|
|
2145
2265
|
label: "KBank Terminal",
|
|
2146
2266
|
value: "kbank",
|
|
2147
2267
|
render: On,
|
|
2148
|
-
region: [
|
|
2268
|
+
region: [Q.F_COUNTRY.enum.TH]
|
|
2149
2269
|
},
|
|
2150
2270
|
{
|
|
2151
2271
|
label: "GHL Terminal",
|
|
2152
2272
|
value: "ghl3",
|
|
2153
2273
|
render: Bn,
|
|
2154
|
-
region: [
|
|
2274
|
+
region: [Q.F_COUNTRY.enum.TH]
|
|
2155
2275
|
},
|
|
2156
2276
|
{
|
|
2157
2277
|
label: "Paysys HLBB Terminal",
|
|
2158
2278
|
value: "hlbb",
|
|
2159
|
-
render:
|
|
2160
|
-
region: [
|
|
2279
|
+
render: Ln,
|
|
2280
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2161
2281
|
},
|
|
2162
2282
|
{
|
|
2163
2283
|
label: "GPAP Terminal",
|
|
2164
2284
|
value: "globalpayments",
|
|
2165
2285
|
render: Kn,
|
|
2166
|
-
region: [
|
|
2286
|
+
region: [Q.F_COUNTRY.enum.SG]
|
|
2167
2287
|
},
|
|
2168
2288
|
{
|
|
2169
2289
|
label: "OMA Terminal",
|
|
2170
2290
|
value: "oma",
|
|
2171
2291
|
render: Qn,
|
|
2172
|
-
region: [
|
|
2292
|
+
region: [Q.F_COUNTRY.enum.PK]
|
|
2173
2293
|
},
|
|
2174
2294
|
{
|
|
2175
2295
|
label: "Revenue PBB Terminal",
|
|
2176
2296
|
value: "revenue",
|
|
2177
2297
|
render: tl,
|
|
2178
|
-
region: [
|
|
2298
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
label: "PBB Terminal",
|
|
2302
|
+
value: "pbb",
|
|
2303
|
+
render: dl,
|
|
2304
|
+
region: [Q.F_COUNTRY.enum.MY]
|
|
2179
2305
|
},
|
|
2180
2306
|
{
|
|
2181
2307
|
label: "Beam Terminal",
|
|
2182
2308
|
value: "beam",
|
|
2183
2309
|
render: ll,
|
|
2184
|
-
region: [
|
|
2310
|
+
region: [Q.F_COUNTRY.enum.TH]
|
|
2185
2311
|
},
|
|
2186
2312
|
{
|
|
2187
2313
|
label: "BRI Terminal",
|
|
2188
2314
|
value: "bri",
|
|
2189
2315
|
render: il,
|
|
2190
|
-
region: [
|
|
2316
|
+
region: [Q.F_COUNTRY.enum.ID]
|
|
2191
2317
|
}
|
|
2192
2318
|
], l = K(() => t.find((s) => s.value === n.value)), o = xt().currentCountry, r = K(() => t.filter(
|
|
2193
|
-
(s) => !s.region || s.region.includes(o.value ??
|
|
2319
|
+
(s) => !s.region || s.region.includes(o.value ?? Q.F_COUNTRY.enum.MY)
|
|
2194
2320
|
)), { gatewayTab: n } = wt({
|
|
2195
2321
|
gatewayTab: (c = r.value[0]) == null ? void 0 : c.value
|
|
2196
2322
|
});
|
|
2197
2323
|
return (s, v) => {
|
|
2198
|
-
var
|
|
2199
|
-
const
|
|
2200
|
-
return y(),
|
|
2201
|
-
x("div",
|
|
2202
|
-
b(
|
|
2203
|
-
"model-value":
|
|
2204
|
-
"onUpdate:modelValue": v[0] || (v[0] = (i) =>
|
|
2324
|
+
var p;
|
|
2325
|
+
const f = h("FmTabs");
|
|
2326
|
+
return y(), E("div", pl, [
|
|
2327
|
+
x("div", ml, [
|
|
2328
|
+
b(f, {
|
|
2329
|
+
"model-value": A(n),
|
|
2330
|
+
"onUpdate:modelValue": v[0] || (v[0] = (i) => Ae(n) ? n.value = i : null),
|
|
2205
2331
|
class: "mb-6",
|
|
2206
2332
|
vertical: !0,
|
|
2207
2333
|
items: r.value,
|
|
2208
2334
|
"show-more-at": Number.POSITIVE_INFINITY
|
|
2209
2335
|
}, null, 8, ["model-value", "items", "show-more-at"])
|
|
2210
2336
|
]),
|
|
2211
|
-
x("div",
|
|
2212
|
-
|
|
2337
|
+
x("div", fl, [
|
|
2338
|
+
A(n) ? (y(), F(bt((p = l.value) == null ? void 0 : p.render), ht(_t({ key: 0 }, {
|
|
2213
2339
|
terminal: a.terminal,
|
|
2214
2340
|
onUpdate: a.onUpdate
|
|
2215
2341
|
})), null, 16)) : R("", !0)
|
|
@@ -2217,7 +2343,7 @@ const ln = {
|
|
|
2217
2343
|
]);
|
|
2218
2344
|
};
|
|
2219
2345
|
}
|
|
2220
|
-
}),
|
|
2346
|
+
}), gl = { class: "flex mt-6 space-x-6" }, yl = /* @__PURE__ */ X({
|
|
2221
2347
|
__name: "PromptPayGateway",
|
|
2222
2348
|
props: {
|
|
2223
2349
|
terminal: {
|
|
@@ -2230,7 +2356,7 @@ const ln = {
|
|
|
2230
2356
|
}
|
|
2231
2357
|
},
|
|
2232
2358
|
setup(e) {
|
|
2233
|
-
const a = e, t =
|
|
2359
|
+
const a = e, t = ue(() => a.terminal), l = T(), o = T(-1), r = T({
|
|
2234
2360
|
account: "",
|
|
2235
2361
|
receiptName: ""
|
|
2236
2362
|
}), n = () => {
|
|
@@ -2238,45 +2364,45 @@ const ln = {
|
|
|
2238
2364
|
}, c = () => {
|
|
2239
2365
|
if (!t.value.qrIntegrations)
|
|
2240
2366
|
return n();
|
|
2241
|
-
const v = t.value.qrIntegrations,
|
|
2242
|
-
if (
|
|
2367
|
+
const v = t.value.qrIntegrations, f = v.findIndex((i) => i && i.gateway && i.gateway === "PROMPTPAY");
|
|
2368
|
+
if (f === -1)
|
|
2243
2369
|
return n();
|
|
2244
|
-
o.value =
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2247
|
-
account:
|
|
2248
|
-
receiptName:
|
|
2370
|
+
o.value = f;
|
|
2371
|
+
const p = v.at(f);
|
|
2372
|
+
p.gateway === "PROMPTPAY" && p.config && (r.value = {
|
|
2373
|
+
account: p.config.account ?? "",
|
|
2374
|
+
receiptName: p.receiptName ?? ""
|
|
2249
2375
|
});
|
|
2250
2376
|
};
|
|
2251
|
-
|
|
2377
|
+
ne(t, c), ie(c);
|
|
2252
2378
|
async function s(v) {
|
|
2253
|
-
var
|
|
2254
|
-
(
|
|
2379
|
+
var f;
|
|
2380
|
+
(f = t.value.qrIntegrations) == null || f.splice(v, 1), a.onUpdate(t.value);
|
|
2255
2381
|
}
|
|
2256
|
-
return (v,
|
|
2257
|
-
const
|
|
2258
|
-
return y(),
|
|
2382
|
+
return (v, f) => {
|
|
2383
|
+
const p = h("FmTextField"), i = h("FmButton"), u = h("FmForm");
|
|
2384
|
+
return y(), F(u, {
|
|
2259
2385
|
ref: l.value,
|
|
2260
2386
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2261
|
-
onValidationSuccess:
|
|
2387
|
+
onValidationSuccess: f[2] || (f[2] = () => {
|
|
2262
2388
|
o.value > -1 ? t.value.qrIntegrations[o.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (t.value.qrIntegrations || (t.value.qrIntegrations = []), t.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })), a.onUpdate(t.value);
|
|
2263
2389
|
})
|
|
2264
2390
|
}, {
|
|
2265
2391
|
default: ae(() => [
|
|
2266
|
-
b(
|
|
2392
|
+
b(p, {
|
|
2267
2393
|
modelValue: r.value.account,
|
|
2268
|
-
"onUpdate:modelValue":
|
|
2394
|
+
"onUpdate:modelValue": f[0] || (f[0] = (m) => r.value.account = m),
|
|
2269
2395
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
2270
2396
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
2271
2397
|
}, null, 8, ["modelValue"]),
|
|
2272
|
-
b(
|
|
2398
|
+
b(p, {
|
|
2273
2399
|
modelValue: r.value.receiptName,
|
|
2274
|
-
"onUpdate:modelValue":
|
|
2400
|
+
"onUpdate:modelValue": f[1] || (f[1] = (m) => r.value.receiptName = m),
|
|
2275
2401
|
label: "Receipt Payment Name",
|
|
2276
2402
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
2277
2403
|
}, null, 8, ["modelValue"]),
|
|
2278
|
-
x("div",
|
|
2279
|
-
o.value > -1 ? (y(),
|
|
2404
|
+
x("div", gl, [
|
|
2405
|
+
o.value > -1 ? (y(), F(i, {
|
|
2280
2406
|
key: 0,
|
|
2281
2407
|
class: "flex-1",
|
|
2282
2408
|
variant: "secondary",
|
|
@@ -2295,7 +2421,7 @@ const ln = {
|
|
|
2295
2421
|
}, 512);
|
|
2296
2422
|
};
|
|
2297
2423
|
}
|
|
2298
|
-
}),
|
|
2424
|
+
}), bl = { class: "flex items-center" }, hl = { class: "w-[260px] self-start" }, _l = { class: "flex-1" }, wl = /* @__PURE__ */ X({
|
|
2299
2425
|
__name: "QrGateway",
|
|
2300
2426
|
props: {
|
|
2301
2427
|
terminal: {
|
|
@@ -2313,27 +2439,27 @@ const ln = {
|
|
|
2313
2439
|
{
|
|
2314
2440
|
label: "PromptPay",
|
|
2315
2441
|
value: "promptpay",
|
|
2316
|
-
render:
|
|
2317
|
-
region: [
|
|
2442
|
+
render: yl,
|
|
2443
|
+
region: [Q.F_COUNTRY.enum.TH]
|
|
2318
2444
|
}
|
|
2319
|
-
], l = K(() => t.find((s) => s.value === n.value)), o = xt().currentCountry, r = K(() => t.filter((s) => !s.region || s.region.includes(o.value ??
|
|
2445
|
+
], l = K(() => t.find((s) => s.value === n.value)), o = xt().currentCountry, r = K(() => t.filter((s) => !s.region || s.region.includes(o.value ?? Q.F_COUNTRY.enum.MY))), { gatewayTab: n } = wt({
|
|
2320
2446
|
gatewayTab: (c = r.value[0]) == null ? void 0 : c.value
|
|
2321
2447
|
});
|
|
2322
2448
|
return (s, v) => {
|
|
2323
|
-
var
|
|
2324
|
-
const
|
|
2325
|
-
return y(),
|
|
2326
|
-
x("div",
|
|
2327
|
-
b(
|
|
2328
|
-
"model-value":
|
|
2329
|
-
"onUpdate:modelValue": v[0] || (v[0] = (i) =>
|
|
2449
|
+
var p;
|
|
2450
|
+
const f = h("FmTabs");
|
|
2451
|
+
return y(), E("div", bl, [
|
|
2452
|
+
x("div", hl, [
|
|
2453
|
+
b(f, {
|
|
2454
|
+
"model-value": A(n),
|
|
2455
|
+
"onUpdate:modelValue": v[0] || (v[0] = (i) => Ae(n) ? n.value = i : null),
|
|
2330
2456
|
class: "mb-6",
|
|
2331
2457
|
vertical: !0,
|
|
2332
2458
|
items: r.value
|
|
2333
2459
|
}, null, 8, ["model-value", "items"])
|
|
2334
2460
|
]),
|
|
2335
|
-
x("div",
|
|
2336
|
-
|
|
2461
|
+
x("div", _l, [
|
|
2462
|
+
A(n) ? (y(), F(bt((p = l.value) == null ? void 0 : p.render), ht(_t({ key: 0 }, {
|
|
2337
2463
|
terminal: a.terminal,
|
|
2338
2464
|
onUpdate: a.onUpdate
|
|
2339
2465
|
})), null, 16)) : R("", !0)
|
|
@@ -2342,7 +2468,7 @@ const ln = {
|
|
|
2342
2468
|
};
|
|
2343
2469
|
}
|
|
2344
2470
|
});
|
|
2345
|
-
var
|
|
2471
|
+
var xl = Object.defineProperty, pt = Object.getOwnPropertySymbols, pa = Object.prototype.hasOwnProperty, ma = Object.prototype.propertyIsEnumerable, Kt = (e, a, t) => a in e ? xl(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Ge = (e, a) => {
|
|
2346
2472
|
for (var t in a || (a = {}))
|
|
2347
2473
|
pa.call(a, t) && Kt(e, t, a[t]);
|
|
2348
2474
|
if (pt)
|
|
@@ -2359,20 +2485,20 @@ var bl = Object.defineProperty, pt = Object.getOwnPropertySymbols, pa = Object.p
|
|
|
2359
2485
|
return t;
|
|
2360
2486
|
};
|
|
2361
2487
|
const va = "[vue-draggable-plus]: ";
|
|
2362
|
-
function
|
|
2488
|
+
function Tl(e) {
|
|
2363
2489
|
console.warn(va + e);
|
|
2364
2490
|
}
|
|
2365
|
-
function
|
|
2491
|
+
function Il(e) {
|
|
2366
2492
|
console.error(va + e);
|
|
2367
2493
|
}
|
|
2368
2494
|
function Xt(e, a, t) {
|
|
2369
2495
|
return t >= 0 && t < e.length && e.splice(t, 0, e.splice(a, 1)[0]), e;
|
|
2370
2496
|
}
|
|
2371
|
-
function
|
|
2497
|
+
function Cl(e) {
|
|
2372
2498
|
return e.replace(/-(\w)/g, (a, t) => t ? t.toUpperCase() : "");
|
|
2373
2499
|
}
|
|
2374
|
-
function
|
|
2375
|
-
return Object.keys(e).reduce((a, t) => (typeof e[t] < "u" && (a[
|
|
2500
|
+
function Fl(e) {
|
|
2501
|
+
return Object.keys(e).reduce((a, t) => (typeof e[t] < "u" && (a[Cl(t)] = e[t]), a), {});
|
|
2376
2502
|
}
|
|
2377
2503
|
function Wt(e, a) {
|
|
2378
2504
|
return Array.isArray(e) && e.splice(a, 1), e;
|
|
@@ -2380,10 +2506,10 @@ function Wt(e, a) {
|
|
|
2380
2506
|
function zt(e, a, t) {
|
|
2381
2507
|
return Array.isArray(e) && e.splice(a, 0, t), e;
|
|
2382
2508
|
}
|
|
2383
|
-
function
|
|
2509
|
+
function Sl(e) {
|
|
2384
2510
|
return typeof e > "u";
|
|
2385
2511
|
}
|
|
2386
|
-
function
|
|
2512
|
+
function kl(e) {
|
|
2387
2513
|
return typeof e == "string";
|
|
2388
2514
|
}
|
|
2389
2515
|
function Qt(e, a, t) {
|
|
@@ -2393,23 +2519,23 @@ function Qt(e, a, t) {
|
|
|
2393
2519
|
function Ft(e) {
|
|
2394
2520
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2395
2521
|
}
|
|
2396
|
-
function
|
|
2522
|
+
function Nl(e, a = document) {
|
|
2397
2523
|
var t;
|
|
2398
2524
|
let l = null;
|
|
2399
|
-
return typeof (a == null ? void 0 : a.querySelector) == "function" ? l = (t = a == null ? void 0 : a.querySelector) == null ? void 0 : t.call(a, e) : l = document.querySelector(e), l ||
|
|
2525
|
+
return typeof (a == null ? void 0 : a.querySelector) == "function" ? l = (t = a == null ? void 0 : a.querySelector) == null ? void 0 : t.call(a, e) : l = document.querySelector(e), l || Tl(`Element not found: ${e}`), l;
|
|
2400
2526
|
}
|
|
2401
|
-
function
|
|
2527
|
+
function Vl(e, a, t = null) {
|
|
2402
2528
|
return function(...l) {
|
|
2403
2529
|
return e.apply(t, l), a.apply(t, l);
|
|
2404
2530
|
};
|
|
2405
2531
|
}
|
|
2406
|
-
function
|
|
2532
|
+
function El(e, a) {
|
|
2407
2533
|
const t = Ge({}, e);
|
|
2408
2534
|
return Object.keys(a).forEach((l) => {
|
|
2409
|
-
t[l] ? t[l] =
|
|
2535
|
+
t[l] ? t[l] = Vl(e[l], a[l]) : t[l] = a[l];
|
|
2410
2536
|
}), t;
|
|
2411
2537
|
}
|
|
2412
|
-
function
|
|
2538
|
+
function Dl(e) {
|
|
2413
2539
|
return e instanceof HTMLElement;
|
|
2414
2540
|
}
|
|
2415
2541
|
function Jt(e, a) {
|
|
@@ -2417,10 +2543,10 @@ function Jt(e, a) {
|
|
|
2417
2543
|
a(t, e[t]);
|
|
2418
2544
|
});
|
|
2419
2545
|
}
|
|
2420
|
-
function
|
|
2546
|
+
function Ol(e) {
|
|
2421
2547
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2422
2548
|
}
|
|
2423
|
-
const
|
|
2549
|
+
const Pl = Object.assign;
|
|
2424
2550
|
/**!
|
|
2425
2551
|
* Sortable 1.15.2
|
|
2426
2552
|
* @author RubaXa <trash@rubaxa.org>
|
|
@@ -2441,7 +2567,7 @@ function Ce(e) {
|
|
|
2441
2567
|
for (var a = 1; a < arguments.length; a++) {
|
|
2442
2568
|
var t = arguments[a] != null ? arguments[a] : {};
|
|
2443
2569
|
a % 2 ? Zt(Object(t), !0).forEach(function(l) {
|
|
2444
|
-
|
|
2570
|
+
Ul(e, l, t[l]);
|
|
2445
2571
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Zt(Object(t)).forEach(function(l) {
|
|
2446
2572
|
Object.defineProperty(e, l, Object.getOwnPropertyDescriptor(t, l));
|
|
2447
2573
|
});
|
|
@@ -2456,7 +2582,7 @@ function it(e) {
|
|
|
2456
2582
|
return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
|
|
2457
2583
|
}, it(e);
|
|
2458
2584
|
}
|
|
2459
|
-
function
|
|
2585
|
+
function Ul(e, a, t) {
|
|
2460
2586
|
return a in e ? Object.defineProperty(e, a, {
|
|
2461
2587
|
value: t,
|
|
2462
2588
|
enumerable: !0,
|
|
@@ -2474,7 +2600,7 @@ function Se() {
|
|
|
2474
2600
|
return e;
|
|
2475
2601
|
}, Se.apply(this, arguments);
|
|
2476
2602
|
}
|
|
2477
|
-
function
|
|
2603
|
+
function Al(e, a) {
|
|
2478
2604
|
if (e == null)
|
|
2479
2605
|
return {};
|
|
2480
2606
|
var t = {}, l = Object.keys(e), o, r;
|
|
@@ -2482,10 +2608,10 @@ function Dl(e, a) {
|
|
|
2482
2608
|
o = l[r], !(a.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
2483
2609
|
return t;
|
|
2484
2610
|
}
|
|
2485
|
-
function
|
|
2611
|
+
function Ml(e, a) {
|
|
2486
2612
|
if (e == null)
|
|
2487
2613
|
return {};
|
|
2488
|
-
var t =
|
|
2614
|
+
var t = Al(e, a), l, o;
|
|
2489
2615
|
if (Object.getOwnPropertySymbols) {
|
|
2490
2616
|
var r = Object.getOwnPropertySymbols(e);
|
|
2491
2617
|
for (o = 0; o < r.length; o++)
|
|
@@ -2493,7 +2619,7 @@ function Ol(e, a) {
|
|
|
2493
2619
|
}
|
|
2494
2620
|
return t;
|
|
2495
2621
|
}
|
|
2496
|
-
var
|
|
2622
|
+
var Rl = "1.15.2";
|
|
2497
2623
|
function Fe(e) {
|
|
2498
2624
|
if (typeof window < "u" && window.navigator)
|
|
2499
2625
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
@@ -2524,7 +2650,7 @@ function mt(e, a) {
|
|
|
2524
2650
|
return !1;
|
|
2525
2651
|
}
|
|
2526
2652
|
}
|
|
2527
|
-
function
|
|
2653
|
+
function Bl(e) {
|
|
2528
2654
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2529
2655
|
}
|
|
2530
2656
|
function Te(e, a, t, l) {
|
|
@@ -2535,12 +2661,12 @@ function Te(e, a, t, l) {
|
|
|
2535
2661
|
return e;
|
|
2536
2662
|
if (e === t)
|
|
2537
2663
|
break;
|
|
2538
|
-
} while (e =
|
|
2664
|
+
} while (e = Bl(e));
|
|
2539
2665
|
}
|
|
2540
2666
|
return null;
|
|
2541
2667
|
}
|
|
2542
2668
|
var ta = /\s+/g;
|
|
2543
|
-
function
|
|
2669
|
+
function ye(e, a, t) {
|
|
2544
2670
|
if (e && a)
|
|
2545
2671
|
if (e.classList)
|
|
2546
2672
|
e.classList[t ? "add" : "remove"](a);
|
|
@@ -2549,7 +2675,7 @@ function ge(e, a, t) {
|
|
|
2549
2675
|
e.className = (l + (t ? " " + a : "")).replace(ta, " ");
|
|
2550
2676
|
}
|
|
2551
2677
|
}
|
|
2552
|
-
function
|
|
2678
|
+
function D(e, a, t) {
|
|
2553
2679
|
var l = e && e.style;
|
|
2554
2680
|
if (l) {
|
|
2555
2681
|
if (t === void 0)
|
|
@@ -2557,13 +2683,13 @@ function V(e, a, t) {
|
|
|
2557
2683
|
!(a in l) && a.indexOf("webkit") === -1 && (a = "-webkit-" + a), l[a] = t + (typeof t == "string" ? "" : "px");
|
|
2558
2684
|
}
|
|
2559
2685
|
}
|
|
2560
|
-
function
|
|
2686
|
+
function Le(e, a) {
|
|
2561
2687
|
var t = "";
|
|
2562
2688
|
if (typeof e == "string")
|
|
2563
2689
|
t = e;
|
|
2564
2690
|
else
|
|
2565
2691
|
do {
|
|
2566
|
-
var l =
|
|
2692
|
+
var l = D(e, "transform");
|
|
2567
2693
|
l && l !== "none" && (t = l + " " + t);
|
|
2568
2694
|
} while (!a && (e = e.parentNode));
|
|
2569
2695
|
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -2583,45 +2709,45 @@ function Ie() {
|
|
|
2583
2709
|
var e = document.scrollingElement;
|
|
2584
2710
|
return e || document.documentElement;
|
|
2585
2711
|
}
|
|
2586
|
-
function
|
|
2712
|
+
function oe(e, a, t, l, o) {
|
|
2587
2713
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2588
|
-
var r, n, c, s, v,
|
|
2589
|
-
if (e !== window && e.parentNode && e !== Ie() ? (r = e.getBoundingClientRect(), n = r.top, c = r.left, s = r.bottom, v = r.right,
|
|
2714
|
+
var r, n, c, s, v, f, p;
|
|
2715
|
+
if (e !== window && e.parentNode && e !== Ie() ? (r = e.getBoundingClientRect(), n = r.top, c = r.left, s = r.bottom, v = r.right, f = r.height, p = r.width) : (n = 0, c = 0, s = window.innerHeight, v = window.innerWidth, f = window.innerHeight, p = window.innerWidth), (a || t) && e !== window && (o = o || e.parentNode, !ke))
|
|
2590
2716
|
do
|
|
2591
|
-
if (o && o.getBoundingClientRect && (
|
|
2717
|
+
if (o && o.getBoundingClientRect && (D(o, "transform") !== "none" || t && D(o, "position") !== "static")) {
|
|
2592
2718
|
var i = o.getBoundingClientRect();
|
|
2593
|
-
n -= i.top + parseInt(
|
|
2719
|
+
n -= i.top + parseInt(D(o, "border-top-width")), c -= i.left + parseInt(D(o, "border-left-width")), s = n + r.height, v = c + r.width;
|
|
2594
2720
|
break;
|
|
2595
2721
|
}
|
|
2596
2722
|
while (o = o.parentNode);
|
|
2597
2723
|
if (l && e !== window) {
|
|
2598
|
-
var u =
|
|
2599
|
-
u && (n /= g, c /=
|
|
2724
|
+
var u = Le(o || e), m = u && u.a, g = u && u.d;
|
|
2725
|
+
u && (n /= g, c /= m, p /= m, f /= g, s = n + f, v = c + p);
|
|
2600
2726
|
}
|
|
2601
2727
|
return {
|
|
2602
2728
|
top: n,
|
|
2603
2729
|
left: c,
|
|
2604
2730
|
bottom: s,
|
|
2605
2731
|
right: v,
|
|
2606
|
-
width:
|
|
2607
|
-
height:
|
|
2732
|
+
width: p,
|
|
2733
|
+
height: f
|
|
2608
2734
|
};
|
|
2609
2735
|
}
|
|
2610
2736
|
}
|
|
2611
2737
|
function aa(e, a, t) {
|
|
2612
|
-
for (var l =
|
|
2613
|
-
var r =
|
|
2738
|
+
for (var l = Ee(e, !0), o = oe(e)[a]; l; ) {
|
|
2739
|
+
var r = oe(l)[t], n = void 0;
|
|
2614
2740
|
if (n = o >= r, !n)
|
|
2615
2741
|
return l;
|
|
2616
2742
|
if (l === Ie())
|
|
2617
2743
|
break;
|
|
2618
|
-
l =
|
|
2744
|
+
l = Ee(l, !1);
|
|
2619
2745
|
}
|
|
2620
2746
|
return !1;
|
|
2621
2747
|
}
|
|
2622
|
-
function
|
|
2748
|
+
function Ye(e, a, t, l) {
|
|
2623
2749
|
for (var o = 0, r = 0, n = e.children; r < n.length; ) {
|
|
2624
|
-
if (n[r].style.display !== "none" && n[r] !==
|
|
2750
|
+
if (n[r].style.display !== "none" && n[r] !== O.ghost && (l || n[r] !== O.dragged) && Te(n[r], t.draggable, e, !1)) {
|
|
2625
2751
|
if (o === a)
|
|
2626
2752
|
return n[r];
|
|
2627
2753
|
o++;
|
|
@@ -2630,8 +2756,8 @@ function $e(e, a, t, l) {
|
|
|
2630
2756
|
}
|
|
2631
2757
|
return null;
|
|
2632
2758
|
}
|
|
2633
|
-
function
|
|
2634
|
-
for (var t = e.lastElementChild; t && (t ===
|
|
2759
|
+
function Lt(e, a) {
|
|
2760
|
+
for (var t = e.lastElementChild; t && (t === O.ghost || D(t, "display") === "none" || a && !mt(t, a)); )
|
|
2635
2761
|
t = t.previousElementSibling;
|
|
2636
2762
|
return t || null;
|
|
2637
2763
|
}
|
|
@@ -2640,19 +2766,19 @@ function we(e, a) {
|
|
|
2640
2766
|
if (!e || !e.parentNode)
|
|
2641
2767
|
return -1;
|
|
2642
2768
|
for (; e = e.previousElementSibling; )
|
|
2643
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
2769
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== O.clone && (!a || mt(e, a)) && t++;
|
|
2644
2770
|
return t;
|
|
2645
2771
|
}
|
|
2646
2772
|
function na(e) {
|
|
2647
2773
|
var a = 0, t = 0, l = Ie();
|
|
2648
2774
|
if (e)
|
|
2649
2775
|
do {
|
|
2650
|
-
var o =
|
|
2776
|
+
var o = Le(e), r = o.a, n = o.d;
|
|
2651
2777
|
a += e.scrollLeft * r, t += e.scrollTop * n;
|
|
2652
2778
|
} while (e !== l && (e = e.parentNode));
|
|
2653
2779
|
return [a, t];
|
|
2654
2780
|
}
|
|
2655
|
-
function
|
|
2781
|
+
function ql(e, a) {
|
|
2656
2782
|
for (var t in e)
|
|
2657
2783
|
if (e.hasOwnProperty(t)) {
|
|
2658
2784
|
for (var l in a)
|
|
@@ -2661,13 +2787,13 @@ function Ml(e, a) {
|
|
|
2661
2787
|
}
|
|
2662
2788
|
return -1;
|
|
2663
2789
|
}
|
|
2664
|
-
function
|
|
2790
|
+
function Ee(e, a) {
|
|
2665
2791
|
if (!e || !e.getBoundingClientRect)
|
|
2666
2792
|
return Ie();
|
|
2667
2793
|
var t = e, l = !1;
|
|
2668
2794
|
do
|
|
2669
2795
|
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
2670
|
-
var o =
|
|
2796
|
+
var o = D(t);
|
|
2671
2797
|
if (t.clientWidth < t.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
2672
2798
|
if (!t.getBoundingClientRect || t === document.body)
|
|
2673
2799
|
return Ie();
|
|
@@ -2679,7 +2805,7 @@ function Ve(e, a) {
|
|
|
2679
2805
|
while (t = t.parentNode);
|
|
2680
2806
|
return Ie();
|
|
2681
2807
|
}
|
|
2682
|
-
function
|
|
2808
|
+
function Gl(e, a) {
|
|
2683
2809
|
if (e && a)
|
|
2684
2810
|
for (var t in a)
|
|
2685
2811
|
a.hasOwnProperty(t) && (e[t] = a[t]);
|
|
@@ -2699,7 +2825,7 @@ function _a(e, a) {
|
|
|
2699
2825
|
}
|
|
2700
2826
|
};
|
|
2701
2827
|
}
|
|
2702
|
-
function
|
|
2828
|
+
function $l() {
|
|
2703
2829
|
clearTimeout(ze), ze = void 0;
|
|
2704
2830
|
}
|
|
2705
2831
|
function wa(e, a, t) {
|
|
@@ -2714,27 +2840,27 @@ function Ta(e, a, t) {
|
|
|
2714
2840
|
return Array.from(e.children).forEach(function(o) {
|
|
2715
2841
|
var r, n, c, s;
|
|
2716
2842
|
if (!(!Te(o, a.draggable, e, !1) || o.animated || o === t)) {
|
|
2717
|
-
var v =
|
|
2843
|
+
var v = oe(o);
|
|
2718
2844
|
l.left = Math.min((r = l.left) !== null && r !== void 0 ? r : 1 / 0, v.left), l.top = Math.min((n = l.top) !== null && n !== void 0 ? n : 1 / 0, v.top), l.right = Math.max((c = l.right) !== null && c !== void 0 ? c : -1 / 0, v.right), l.bottom = Math.max((s = l.bottom) !== null && s !== void 0 ? s : -1 / 0, v.bottom);
|
|
2719
2845
|
}
|
|
2720
2846
|
}), l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
|
|
2721
2847
|
}
|
|
2722
|
-
var
|
|
2723
|
-
function
|
|
2848
|
+
var he = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2849
|
+
function Ll() {
|
|
2724
2850
|
var e = [], a;
|
|
2725
2851
|
return {
|
|
2726
2852
|
captureAnimationState: function() {
|
|
2727
2853
|
if (e = [], !!this.options.animation) {
|
|
2728
2854
|
var t = [].slice.call(this.el.children);
|
|
2729
2855
|
t.forEach(function(l) {
|
|
2730
|
-
if (!(
|
|
2856
|
+
if (!(D(l, "display") === "none" || l === O.ghost)) {
|
|
2731
2857
|
e.push({
|
|
2732
2858
|
target: l,
|
|
2733
|
-
rect:
|
|
2859
|
+
rect: oe(l)
|
|
2734
2860
|
});
|
|
2735
2861
|
var o = Ce({}, e[e.length - 1].rect);
|
|
2736
2862
|
if (l.thisAnimationDuration) {
|
|
2737
|
-
var r =
|
|
2863
|
+
var r = Le(l, !0);
|
|
2738
2864
|
r && (o.top -= r.f, o.left -= r.e);
|
|
2739
2865
|
}
|
|
2740
2866
|
l.fromRect = o;
|
|
@@ -2746,7 +2872,7 @@ function Bl() {
|
|
|
2746
2872
|
e.push(t);
|
|
2747
2873
|
},
|
|
2748
2874
|
removeAnimationState: function(t) {
|
|
2749
|
-
e.splice(
|
|
2875
|
+
e.splice(ql(e, {
|
|
2750
2876
|
target: t
|
|
2751
2877
|
}), 1);
|
|
2752
2878
|
},
|
|
@@ -2758,9 +2884,9 @@ function Bl() {
|
|
|
2758
2884
|
}
|
|
2759
2885
|
var o = !1, r = 0;
|
|
2760
2886
|
e.forEach(function(n) {
|
|
2761
|
-
var c = 0, s = n.target, v = s.fromRect,
|
|
2762
|
-
|
|
2763
|
-
(u.top -
|
|
2887
|
+
var c = 0, s = n.target, v = s.fromRect, f = oe(s), p = s.prevFromRect, i = s.prevToRect, u = n.rect, m = Le(s, !0);
|
|
2888
|
+
m && (f.top -= m.f, f.left -= m.e), s.toRect = f, s.thisAnimationDuration && St(p, f) && !St(v, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
2889
|
+
(u.top - f.top) / (u.left - f.left) === (v.top - f.top) / (v.left - f.left) && (c = jl(u, p, i, l.options)), St(f, v) || (s.prevFromRect = v, s.prevToRect = f, c || (c = l.options.animation), l.animate(s, u, f, c)), c && (o = !0, r = Math.max(r, c), clearTimeout(s.animationResetTimer), s.animationResetTimer = setTimeout(function() {
|
|
2764
2890
|
s.animationTime = 0, s.prevFromRect = null, s.fromRect = null, s.prevToRect = null, s.thisAnimationDuration = null;
|
|
2765
2891
|
}, c), s.thisAnimationDuration = c);
|
|
2766
2892
|
}), clearTimeout(a), o ? a = setTimeout(function() {
|
|
@@ -2769,19 +2895,19 @@ function Bl() {
|
|
|
2769
2895
|
},
|
|
2770
2896
|
animate: function(t, l, o, r) {
|
|
2771
2897
|
if (r) {
|
|
2772
|
-
|
|
2773
|
-
var n =
|
|
2774
|
-
t.animatingX = !!v, t.animatingY = !!
|
|
2775
|
-
|
|
2898
|
+
D(t, "transition", ""), D(t, "transform", "");
|
|
2899
|
+
var n = Le(this.el), c = n && n.a, s = n && n.d, v = (l.left - o.left) / (c || 1), f = (l.top - o.top) / (s || 1);
|
|
2900
|
+
t.animatingX = !!v, t.animatingY = !!f, D(t, "transform", "translate3d(" + v + "px," + f + "px,0)"), this.forRepaintDummy = Yl(t), D(t, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), D(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
2901
|
+
D(t, "transition", ""), D(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
2776
2902
|
}, r);
|
|
2777
2903
|
}
|
|
2778
2904
|
}
|
|
2779
2905
|
};
|
|
2780
2906
|
}
|
|
2781
|
-
function
|
|
2907
|
+
function Yl(e) {
|
|
2782
2908
|
return e.offsetWidth;
|
|
2783
2909
|
}
|
|
2784
|
-
function
|
|
2910
|
+
function jl(e, a, t, l) {
|
|
2785
2911
|
return Math.sqrt(Math.pow(a.top - e.top, 2) + Math.pow(a.left - e.left, 2)) / Math.sqrt(Math.pow(a.top - t.top, 2) + Math.pow(a.left - t.left, 2)) * l.animation;
|
|
2786
2912
|
}
|
|
2787
2913
|
var Re = [], kt = {
|
|
@@ -2836,46 +2962,46 @@ var Re = [], kt = {
|
|
|
2836
2962
|
}), l;
|
|
2837
2963
|
}
|
|
2838
2964
|
};
|
|
2839
|
-
function
|
|
2840
|
-
var a = e.sortable, t = e.rootEl, l = e.name, o = e.targetEl, r = e.cloneEl, n = e.toEl, c = e.fromEl, s = e.oldIndex, v = e.newIndex,
|
|
2841
|
-
if (a = a || t && t[
|
|
2842
|
-
var g, k = a.options,
|
|
2965
|
+
function Hl(e) {
|
|
2966
|
+
var a = e.sortable, t = e.rootEl, l = e.name, o = e.targetEl, r = e.cloneEl, n = e.toEl, c = e.fromEl, s = e.oldIndex, v = e.newIndex, f = e.oldDraggableIndex, p = e.newDraggableIndex, i = e.originalEvent, u = e.putSortable, m = e.extraEventProperties;
|
|
2967
|
+
if (a = a || t && t[he], !!a) {
|
|
2968
|
+
var g, k = a.options, d = "on" + l.charAt(0).toUpperCase() + l.substr(1);
|
|
2843
2969
|
window.CustomEvent && !ke && !et ? g = new CustomEvent(l, {
|
|
2844
2970
|
bubbles: !0,
|
|
2845
2971
|
cancelable: !0
|
|
2846
|
-
}) : (g = document.createEvent("Event"), g.initEvent(l, !0, !0)), g.to = n || t, g.from = c || t, g.item = o || t, g.clone = r, g.oldIndex = s, g.newIndex = v, g.oldDraggableIndex =
|
|
2847
|
-
var C = Ce(Ce({},
|
|
2972
|
+
}) : (g = document.createEvent("Event"), g.initEvent(l, !0, !0)), g.to = n || t, g.from = c || t, g.item = o || t, g.clone = r, g.oldIndex = s, g.newIndex = v, g.oldDraggableIndex = f, g.newDraggableIndex = p, g.originalEvent = i, g.pullMode = u ? u.lastPutMode : void 0;
|
|
2973
|
+
var C = Ce(Ce({}, m), tt.getEventProperties(l, a));
|
|
2848
2974
|
for (var B in C)
|
|
2849
2975
|
g[B] = C[B];
|
|
2850
|
-
t && t.dispatchEvent(g), k[
|
|
2976
|
+
t && t.dispatchEvent(g), k[d] && k[d].call(a, g);
|
|
2851
2977
|
}
|
|
2852
2978
|
}
|
|
2853
|
-
var
|
|
2854
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = t.evt, o =
|
|
2855
|
-
tt.pluginEvent.bind(
|
|
2856
|
-
dragEl:
|
|
2979
|
+
var Kl = ["evt"], ve = function(e, a) {
|
|
2980
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = t.evt, o = Ml(t, Kl);
|
|
2981
|
+
tt.pluginEvent.bind(O)(e, a, Ce({
|
|
2982
|
+
dragEl: _,
|
|
2857
2983
|
parentEl: te,
|
|
2858
2984
|
ghostEl: P,
|
|
2859
2985
|
rootEl: z,
|
|
2860
2986
|
nextEl: Pe,
|
|
2861
2987
|
lastDownEl: st,
|
|
2862
|
-
cloneEl:
|
|
2863
|
-
cloneHidden:
|
|
2988
|
+
cloneEl: J,
|
|
2989
|
+
cloneHidden: Ve,
|
|
2864
2990
|
dragStarted: He,
|
|
2865
|
-
putSortable:
|
|
2866
|
-
activeSortable:
|
|
2991
|
+
putSortable: ce,
|
|
2992
|
+
activeSortable: O.active,
|
|
2867
2993
|
originalEvent: l,
|
|
2868
|
-
oldIndex:
|
|
2994
|
+
oldIndex: $e,
|
|
2869
2995
|
oldDraggableIndex: Qe,
|
|
2870
|
-
newIndex:
|
|
2996
|
+
newIndex: be,
|
|
2871
2997
|
newDraggableIndex: Ne,
|
|
2872
2998
|
hideGhostForTarget: Sa,
|
|
2873
2999
|
unhideGhostForTarget: ka,
|
|
2874
3000
|
cloneNowHidden: function() {
|
|
2875
|
-
|
|
3001
|
+
Ve = !0;
|
|
2876
3002
|
},
|
|
2877
3003
|
cloneNowShown: function() {
|
|
2878
|
-
|
|
3004
|
+
Ve = !1;
|
|
2879
3005
|
},
|
|
2880
3006
|
dispatchSortableEvent: function(r) {
|
|
2881
3007
|
fe({
|
|
@@ -2887,18 +3013,18 @@ var Yl = ["evt"], ve = function(e, a) {
|
|
|
2887
3013
|
}, o));
|
|
2888
3014
|
};
|
|
2889
3015
|
function fe(e) {
|
|
2890
|
-
|
|
2891
|
-
putSortable:
|
|
2892
|
-
cloneEl:
|
|
2893
|
-
targetEl:
|
|
3016
|
+
Hl(Ce({
|
|
3017
|
+
putSortable: ce,
|
|
3018
|
+
cloneEl: J,
|
|
3019
|
+
targetEl: _,
|
|
2894
3020
|
rootEl: z,
|
|
2895
|
-
oldIndex:
|
|
3021
|
+
oldIndex: $e,
|
|
2896
3022
|
oldDraggableIndex: Qe,
|
|
2897
|
-
newIndex:
|
|
3023
|
+
newIndex: be,
|
|
2898
3024
|
newDraggableIndex: Ne
|
|
2899
3025
|
}, e));
|
|
2900
3026
|
}
|
|
2901
|
-
var
|
|
3027
|
+
var _, te, P, z, Pe, st, J, Ve, $e, be, Qe, Ne, at, ce, qe = !1, ft = !1, vt = [], De, xe, Nt, Vt, la, oa, He, Be, Je, Ze = !1, nt = !1, ut, de, Et = [], At = !1, gt = [], Ct = typeof document < "u", lt = ga, ra = et || ke ? "cssFloat" : "float", Xl = Ct && !ya && !ga && "draggable" in document.createElement("div"), Ia = function() {
|
|
2902
3028
|
if (Ct) {
|
|
2903
3029
|
if (ke)
|
|
2904
3030
|
return !1;
|
|
@@ -2906,25 +3032,25 @@ var h, te, P, z, Pe, st, Q, Ee, Le, ye, Qe, Ne, at, ue, qe = !1, ft = !1, vt = [
|
|
|
2906
3032
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2907
3033
|
}
|
|
2908
3034
|
}(), Ca = function(e, a) {
|
|
2909
|
-
var t =
|
|
3035
|
+
var t = D(e), l = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), o = Ye(e, 0, a), r = Ye(e, 1, a), n = o && D(o), c = r && D(r), s = n && parseInt(n.marginLeft) + parseInt(n.marginRight) + oe(o).width, v = c && parseInt(c.marginLeft) + parseInt(c.marginRight) + oe(r).width;
|
|
2910
3036
|
if (t.display === "flex")
|
|
2911
3037
|
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2912
3038
|
if (t.display === "grid")
|
|
2913
3039
|
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2914
3040
|
if (o && n.float && n.float !== "none") {
|
|
2915
|
-
var
|
|
2916
|
-
return r && (c.clear === "both" || c.clear ===
|
|
3041
|
+
var f = n.float === "left" ? "left" : "right";
|
|
3042
|
+
return r && (c.clear === "both" || c.clear === f) ? "vertical" : "horizontal";
|
|
2917
3043
|
}
|
|
2918
3044
|
return o && (n.display === "block" || n.display === "flex" || n.display === "table" || n.display === "grid" || s >= l && t[ra] === "none" || r && t[ra] === "none" && s + v > l) ? "vertical" : "horizontal";
|
|
2919
|
-
},
|
|
3045
|
+
}, Wl = function(e, a, t) {
|
|
2920
3046
|
var l = t ? e.left : e.top, o = t ? e.right : e.bottom, r = t ? e.width : e.height, n = t ? a.left : a.top, c = t ? a.right : a.bottom, s = t ? a.width : a.height;
|
|
2921
3047
|
return l === n || o === c || l + r / 2 === n + s / 2;
|
|
2922
|
-
},
|
|
3048
|
+
}, zl = function(e, a) {
|
|
2923
3049
|
var t;
|
|
2924
3050
|
return vt.some(function(l) {
|
|
2925
|
-
var o = l[
|
|
2926
|
-
if (!(!o ||
|
|
2927
|
-
var r =
|
|
3051
|
+
var o = l[he].options.emptyInsertThreshold;
|
|
3052
|
+
if (!(!o || Lt(l))) {
|
|
3053
|
+
var r = oe(l), n = e >= r.left - o && e <= r.right + o, c = a >= r.top - o && a <= r.bottom + o;
|
|
2928
3054
|
if (n && c)
|
|
2929
3055
|
return t = l;
|
|
2930
3056
|
}
|
|
@@ -2932,8 +3058,8 @@ var h, te, P, z, Pe, st, Q, Ee, Le, ye, Qe, Ne, at, ue, qe = !1, ft = !1, vt = [
|
|
|
2932
3058
|
}, Fa = function(e) {
|
|
2933
3059
|
function a(o, r) {
|
|
2934
3060
|
return function(n, c, s, v) {
|
|
2935
|
-
var
|
|
2936
|
-
if (o == null && (r ||
|
|
3061
|
+
var f = n.options.group.name && c.options.group.name && n.options.group.name === c.options.group.name;
|
|
3062
|
+
if (o == null && (r || f))
|
|
2937
3063
|
return !0;
|
|
2938
3064
|
if (o == null || o === !1)
|
|
2939
3065
|
return !1;
|
|
@@ -2941,8 +3067,8 @@ var h, te, P, z, Pe, st, Q, Ee, Le, ye, Qe, Ne, at, ue, qe = !1, ft = !1, vt = [
|
|
|
2941
3067
|
return o;
|
|
2942
3068
|
if (typeof o == "function")
|
|
2943
3069
|
return a(o(n, c, s, v), r)(n, c, s, v);
|
|
2944
|
-
var
|
|
2945
|
-
return o === !0 || typeof o == "string" && o ===
|
|
3070
|
+
var p = (r ? n : c).options.group.name;
|
|
3071
|
+
return o === !0 || typeof o == "string" && o === p || o.join && o.indexOf(p) > -1;
|
|
2946
3072
|
};
|
|
2947
3073
|
}
|
|
2948
3074
|
var t = {}, l = e.group;
|
|
@@ -2950,32 +3076,32 @@ var h, te, P, z, Pe, st, Q, Ee, Le, ye, Qe, Ne, at, ue, qe = !1, ft = !1, vt = [
|
|
|
2950
3076
|
name: l
|
|
2951
3077
|
}), t.name = l.name, t.checkPull = a(l.pull, !0), t.checkPut = a(l.put), t.revertClone = l.revertClone, e.group = t;
|
|
2952
3078
|
}, Sa = function() {
|
|
2953
|
-
!Ia && P &&
|
|
3079
|
+
!Ia && P && D(P, "display", "none");
|
|
2954
3080
|
}, ka = function() {
|
|
2955
|
-
!Ia && P &&
|
|
3081
|
+
!Ia && P && D(P, "display", "");
|
|
2956
3082
|
};
|
|
2957
3083
|
Ct && !ya && document.addEventListener("click", function(e) {
|
|
2958
3084
|
if (ft)
|
|
2959
3085
|
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), ft = !1, !1;
|
|
2960
3086
|
}, !0);
|
|
2961
3087
|
var Oe = function(e) {
|
|
2962
|
-
if (
|
|
3088
|
+
if (_) {
|
|
2963
3089
|
e = e.touches ? e.touches[0] : e;
|
|
2964
|
-
var a =
|
|
3090
|
+
var a = zl(e.clientX, e.clientY);
|
|
2965
3091
|
if (a) {
|
|
2966
3092
|
var t = {};
|
|
2967
3093
|
for (var l in e)
|
|
2968
3094
|
e.hasOwnProperty(l) && (t[l] = e[l]);
|
|
2969
|
-
t.target = t.rootEl = a, t.preventDefault = void 0, t.stopPropagation = void 0, a[
|
|
3095
|
+
t.target = t.rootEl = a, t.preventDefault = void 0, t.stopPropagation = void 0, a[he]._onDragOver(t);
|
|
2970
3096
|
}
|
|
2971
3097
|
}
|
|
2972
|
-
},
|
|
2973
|
-
|
|
3098
|
+
}, Ql = function(e) {
|
|
3099
|
+
_ && _.parentNode[he]._isOutsideThisEl(e.target);
|
|
2974
3100
|
};
|
|
2975
|
-
function
|
|
3101
|
+
function O(e, a) {
|
|
2976
3102
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
2977
3103
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
2978
|
-
this.el = e, this.options = a = Se({}, a), e[
|
|
3104
|
+
this.el = e, this.options = a = Se({}, a), e[he] = this;
|
|
2979
3105
|
var t = {
|
|
2980
3106
|
group: null,
|
|
2981
3107
|
sort: !0,
|
|
@@ -3018,7 +3144,7 @@ function D(e, a) {
|
|
|
3018
3144
|
x: 0,
|
|
3019
3145
|
y: 0
|
|
3020
3146
|
},
|
|
3021
|
-
supportPointer:
|
|
3147
|
+
supportPointer: O.supportPointer !== !1 && "PointerEvent" in window && !We,
|
|
3022
3148
|
emptyInsertThreshold: 5
|
|
3023
3149
|
};
|
|
3024
3150
|
tt.initializePlugins(this, e, t);
|
|
@@ -3027,22 +3153,22 @@ function D(e, a) {
|
|
|
3027
3153
|
Fa(a);
|
|
3028
3154
|
for (var o in this)
|
|
3029
3155
|
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
3030
|
-
this.nativeDraggable = a.forceFallback ? !1 :
|
|
3156
|
+
this.nativeDraggable = a.forceFallback ? !1 : Xl, this.nativeDraggable && (this.options.touchStartThreshold = 1), a.supportPointer ? G(e, "pointerdown", this._onTapStart) : (G(e, "mousedown", this._onTapStart), G(e, "touchstart", this._onTapStart)), this.nativeDraggable && (G(e, "dragover", this), G(e, "dragenter", this)), vt.push(this.el), a.store && a.store.get && this.sort(a.store.get(this) || []), Se(this, Ll());
|
|
3031
3157
|
}
|
|
3032
|
-
|
|
3158
|
+
O.prototype = /** @lends Sortable.prototype */
|
|
3033
3159
|
{
|
|
3034
|
-
constructor:
|
|
3160
|
+
constructor: O,
|
|
3035
3161
|
_isOutsideThisEl: function(e) {
|
|
3036
3162
|
!this.el.contains(e) && e !== this.el && (Be = null);
|
|
3037
3163
|
},
|
|
3038
3164
|
_getDirection: function(e, a) {
|
|
3039
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, a,
|
|
3165
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, a, _) : this.options.direction;
|
|
3040
3166
|
},
|
|
3041
3167
|
_onTapStart: function(e) {
|
|
3042
3168
|
if (e.cancelable) {
|
|
3043
3169
|
var a = this, t = this.el, l = this.options, o = l.preventOnFilter, r = e.type, n = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, c = (n || e).target, s = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || c, v = l.filter;
|
|
3044
|
-
if (
|
|
3045
|
-
if (
|
|
3170
|
+
if (oo(t), !_ && !(/mousedown|pointerdown/.test(r) && e.button !== 0 || l.disabled) && !s.isContentEditable && !(!this.nativeDraggable && We && c && c.tagName.toUpperCase() === "SELECT") && (c = Te(c, l.draggable, t, !1), !(c && c.animated) && st !== c)) {
|
|
3171
|
+
if ($e = we(c), Qe = we(c, l.draggable), typeof v == "function") {
|
|
3046
3172
|
if (v.call(this, e, c, this)) {
|
|
3047
3173
|
fe({
|
|
3048
3174
|
sortable: a,
|
|
@@ -3056,11 +3182,11 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3056
3182
|
}), o && e.cancelable && e.preventDefault();
|
|
3057
3183
|
return;
|
|
3058
3184
|
}
|
|
3059
|
-
} else if (v && (v = v.split(",").some(function(
|
|
3060
|
-
if (
|
|
3185
|
+
} else if (v && (v = v.split(",").some(function(f) {
|
|
3186
|
+
if (f = Te(s, f.trim(), t, !1), f)
|
|
3061
3187
|
return fe({
|
|
3062
3188
|
sortable: a,
|
|
3063
|
-
rootEl:
|
|
3189
|
+
rootEl: f,
|
|
3064
3190
|
name: "filter",
|
|
3065
3191
|
targetEl: c,
|
|
3066
3192
|
fromEl: t,
|
|
@@ -3078,30 +3204,30 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3078
3204
|
},
|
|
3079
3205
|
_prepareDragStart: function(e, a, t) {
|
|
3080
3206
|
var l = this, o = l.el, r = l.options, n = o.ownerDocument, c;
|
|
3081
|
-
if (t && !
|
|
3082
|
-
var s =
|
|
3083
|
-
if (z = o,
|
|
3084
|
-
target:
|
|
3207
|
+
if (t && !_ && t.parentNode === o) {
|
|
3208
|
+
var s = oe(t);
|
|
3209
|
+
if (z = o, _ = t, te = _.parentNode, Pe = _.nextSibling, st = t, at = r.group, O.dragged = _, De = {
|
|
3210
|
+
target: _,
|
|
3085
3211
|
clientX: (a || e).clientX,
|
|
3086
3212
|
clientY: (a || e).clientY
|
|
3087
|
-
}, la = De.clientX - s.left, oa = De.clientY - s.top, this._lastX = (a || e).clientX, this._lastY = (a || e).clientY,
|
|
3213
|
+
}, la = De.clientX - s.left, oa = De.clientY - s.top, this._lastX = (a || e).clientX, this._lastY = (a || e).clientY, _.style["will-change"] = "all", c = function() {
|
|
3088
3214
|
if (ve("delayEnded", l, {
|
|
3089
3215
|
evt: e
|
|
3090
|
-
}),
|
|
3216
|
+
}), O.eventCanceled) {
|
|
3091
3217
|
l._onDrop();
|
|
3092
3218
|
return;
|
|
3093
3219
|
}
|
|
3094
|
-
l._disableDelayedDragEvents(), !ea && l.nativeDraggable && (
|
|
3220
|
+
l._disableDelayedDragEvents(), !ea && l.nativeDraggable && (_.draggable = !0), l._triggerDragStart(e, a), fe({
|
|
3095
3221
|
sortable: l,
|
|
3096
3222
|
name: "choose",
|
|
3097
3223
|
originalEvent: e
|
|
3098
|
-
}),
|
|
3224
|
+
}), ye(_, r.chosenClass, !0);
|
|
3099
3225
|
}, r.ignore.split(",").forEach(function(v) {
|
|
3100
|
-
ha(
|
|
3101
|
-
}), G(n, "dragover", Oe), G(n, "mousemove", Oe), G(n, "touchmove", Oe), G(n, "mouseup", l._onDrop), G(n, "touchend", l._onDrop), G(n, "touchcancel", l._onDrop), ea && this.nativeDraggable && (this.options.touchStartThreshold = 4,
|
|
3226
|
+
ha(_, v.trim(), Dt);
|
|
3227
|
+
}), G(n, "dragover", Oe), G(n, "mousemove", Oe), G(n, "touchmove", Oe), G(n, "mouseup", l._onDrop), G(n, "touchend", l._onDrop), G(n, "touchcancel", l._onDrop), ea && this.nativeDraggable && (this.options.touchStartThreshold = 4, _.draggable = !0), ve("delayStart", this, {
|
|
3102
3228
|
evt: e
|
|
3103
3229
|
}), r.delay && (!r.delayOnTouchOnly || a) && (!this.nativeDraggable || !(et || ke))) {
|
|
3104
|
-
if (
|
|
3230
|
+
if (O.eventCanceled) {
|
|
3105
3231
|
this._onDrop();
|
|
3106
3232
|
return;
|
|
3107
3233
|
}
|
|
@@ -3115,14 +3241,14 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3115
3241
|
Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
3116
3242
|
},
|
|
3117
3243
|
_disableDelayedDrag: function() {
|
|
3118
|
-
|
|
3244
|
+
_ && Dt(_), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3119
3245
|
},
|
|
3120
3246
|
_disableDelayedDragEvents: function() {
|
|
3121
3247
|
var e = this.el.ownerDocument;
|
|
3122
3248
|
q(e, "mouseup", this._disableDelayedDrag), q(e, "touchend", this._disableDelayedDrag), q(e, "touchcancel", this._disableDelayedDrag), q(e, "mousemove", this._delayedDragTouchMoveHandler), q(e, "touchmove", this._delayedDragTouchMoveHandler), q(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3123
3249
|
},
|
|
3124
3250
|
_triggerDragStart: function(e, a) {
|
|
3125
|
-
a = a || e.pointerType == "touch" && e, !this.nativeDraggable || a ? this.options.supportPointer ? G(document, "pointermove", this._onTouchMove) : a ? G(document, "touchmove", this._onTouchMove) : G(document, "mousemove", this._onTouchMove) : (G(
|
|
3251
|
+
a = a || e.pointerType == "touch" && e, !this.nativeDraggable || a ? this.options.supportPointer ? G(document, "pointermove", this._onTouchMove) : a ? G(document, "touchmove", this._onTouchMove) : G(document, "mousemove", this._onTouchMove) : (G(_, "dragend", this), G(z, "dragstart", this._onDragStart));
|
|
3126
3252
|
try {
|
|
3127
3253
|
document.selection ? ct(function() {
|
|
3128
3254
|
document.selection.empty();
|
|
@@ -3131,12 +3257,12 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3131
3257
|
}
|
|
3132
3258
|
},
|
|
3133
3259
|
_dragStarted: function(e, a) {
|
|
3134
|
-
if (qe = !1, z &&
|
|
3260
|
+
if (qe = !1, z && _) {
|
|
3135
3261
|
ve("dragStarted", this, {
|
|
3136
3262
|
evt: a
|
|
3137
|
-
}), this.nativeDraggable && G(document, "dragover",
|
|
3263
|
+
}), this.nativeDraggable && G(document, "dragover", Ql);
|
|
3138
3264
|
var t = this.options;
|
|
3139
|
-
!e &&
|
|
3265
|
+
!e && ye(_, t.dragClass, !1), ye(_, t.ghostClass, !0), O.active = this, e && this._appendGhost(), fe({
|
|
3140
3266
|
sortable: this,
|
|
3141
3267
|
name: "start",
|
|
3142
3268
|
originalEvent: a
|
|
@@ -3149,11 +3275,11 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3149
3275
|
this._lastX = xe.clientX, this._lastY = xe.clientY, Sa();
|
|
3150
3276
|
for (var e = document.elementFromPoint(xe.clientX, xe.clientY), a = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(xe.clientX, xe.clientY), e !== a); )
|
|
3151
3277
|
a = e;
|
|
3152
|
-
if (
|
|
3278
|
+
if (_.parentNode[he]._isOutsideThisEl(e), a)
|
|
3153
3279
|
do {
|
|
3154
|
-
if (a[
|
|
3280
|
+
if (a[he]) {
|
|
3155
3281
|
var t = void 0;
|
|
3156
|
-
if (t = a[
|
|
3282
|
+
if (t = a[he]._onDragOver({
|
|
3157
3283
|
clientX: xe.clientX,
|
|
3158
3284
|
clientY: xe.clientY,
|
|
3159
3285
|
target: e,
|
|
@@ -3168,139 +3294,139 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3168
3294
|
},
|
|
3169
3295
|
_onTouchMove: function(e) {
|
|
3170
3296
|
if (De) {
|
|
3171
|
-
var a = this.options, t = a.fallbackTolerance, l = a.fallbackOffset, o = e.touches ? e.touches[0] : e, r = P &&
|
|
3172
|
-
if (!
|
|
3297
|
+
var a = this.options, t = a.fallbackTolerance, l = a.fallbackOffset, o = e.touches ? e.touches[0] : e, r = P && Le(P, !0), n = P && r && r.a, c = P && r && r.d, s = lt && de && na(de), v = (o.clientX - De.clientX + l.x) / (n || 1) + (s ? s[0] - Et[0] : 0) / (n || 1), f = (o.clientY - De.clientY + l.y) / (c || 1) + (s ? s[1] - Et[1] : 0) / (c || 1);
|
|
3298
|
+
if (!O.active && !qe) {
|
|
3173
3299
|
if (t && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < t)
|
|
3174
3300
|
return;
|
|
3175
3301
|
this._onDragStart(e, !0);
|
|
3176
3302
|
}
|
|
3177
3303
|
if (P) {
|
|
3178
|
-
r ? (r.e += v - (Nt || 0), r.f +=
|
|
3304
|
+
r ? (r.e += v - (Nt || 0), r.f += f - (Vt || 0)) : r = {
|
|
3179
3305
|
a: 1,
|
|
3180
3306
|
b: 0,
|
|
3181
3307
|
c: 0,
|
|
3182
3308
|
d: 1,
|
|
3183
3309
|
e: v,
|
|
3184
|
-
f
|
|
3310
|
+
f
|
|
3185
3311
|
};
|
|
3186
|
-
var
|
|
3187
|
-
|
|
3312
|
+
var p = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
3313
|
+
D(P, "webkitTransform", p), D(P, "mozTransform", p), D(P, "msTransform", p), D(P, "transform", p), Nt = v, Vt = f, xe = o;
|
|
3188
3314
|
}
|
|
3189
3315
|
e.cancelable && e.preventDefault();
|
|
3190
3316
|
}
|
|
3191
3317
|
},
|
|
3192
3318
|
_appendGhost: function() {
|
|
3193
3319
|
if (!P) {
|
|
3194
|
-
var e = this.options.fallbackOnBody ? document.body : z, a =
|
|
3320
|
+
var e = this.options.fallbackOnBody ? document.body : z, a = oe(_, !0, lt, !0, e), t = this.options;
|
|
3195
3321
|
if (lt) {
|
|
3196
|
-
for (de = e;
|
|
3322
|
+
for (de = e; D(de, "position") === "static" && D(de, "transform") === "none" && de !== document; )
|
|
3197
3323
|
de = de.parentNode;
|
|
3198
|
-
de !== document.body && de !== document.documentElement ? (de === document && (de = Ie()), a.top += de.scrollTop, a.left += de.scrollLeft) : de = Ie(),
|
|
3324
|
+
de !== document.body && de !== document.documentElement ? (de === document && (de = Ie()), a.top += de.scrollTop, a.left += de.scrollLeft) : de = Ie(), Et = na(de);
|
|
3199
3325
|
}
|
|
3200
|
-
P =
|
|
3326
|
+
P = _.cloneNode(!0), ye(P, t.ghostClass, !1), ye(P, t.fallbackClass, !0), ye(P, t.dragClass, !0), D(P, "transition", ""), D(P, "transform", ""), D(P, "box-sizing", "border-box"), D(P, "margin", 0), D(P, "top", a.top), D(P, "left", a.left), D(P, "width", a.width), D(P, "height", a.height), D(P, "opacity", "0.8"), D(P, "position", lt ? "absolute" : "fixed"), D(P, "zIndex", "100000"), D(P, "pointerEvents", "none"), O.ghost = P, e.appendChild(P), D(P, "transform-origin", la / parseInt(P.style.width) * 100 + "% " + oa / parseInt(P.style.height) * 100 + "%");
|
|
3201
3327
|
}
|
|
3202
3328
|
},
|
|
3203
3329
|
_onDragStart: function(e, a) {
|
|
3204
3330
|
var t = this, l = e.dataTransfer, o = t.options;
|
|
3205
3331
|
if (ve("dragStart", this, {
|
|
3206
3332
|
evt: e
|
|
3207
|
-
}),
|
|
3333
|
+
}), O.eventCanceled) {
|
|
3208
3334
|
this._onDrop();
|
|
3209
3335
|
return;
|
|
3210
3336
|
}
|
|
3211
|
-
ve("setupClone", this),
|
|
3212
|
-
ve("clone", t), !
|
|
3337
|
+
ve("setupClone", this), O.eventCanceled || (J = xa(_), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), ye(J, this.options.chosenClass, !1), O.clone = J), t.cloneId = ct(function() {
|
|
3338
|
+
ve("clone", t), !O.eventCanceled && (t.options.removeCloneOnHide || z.insertBefore(J, _), t._hideClone(), fe({
|
|
3213
3339
|
sortable: t,
|
|
3214
3340
|
name: "clone"
|
|
3215
3341
|
}));
|
|
3216
|
-
}), !a &&
|
|
3342
|
+
}), !a && ye(_, o.dragClass, !0), a ? (ft = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (q(document, "mouseup", t._onDrop), q(document, "touchend", t._onDrop), q(document, "touchcancel", t._onDrop), l && (l.effectAllowed = "move", o.setData && o.setData.call(t, l, _)), G(document, "drop", t), D(_, "transform", "translateZ(0)")), qe = !0, t._dragStartId = ct(t._dragStarted.bind(t, a, e)), G(document, "selectstart", t), He = !0, We && D(document.body, "user-select", "none");
|
|
3217
3343
|
},
|
|
3218
3344
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
3219
3345
|
_onDragOver: function(e) {
|
|
3220
|
-
var a = this.el, t = e.target, l, o, r, n = this.options, c = n.group, s =
|
|
3221
|
-
if (
|
|
3346
|
+
var a = this.el, t = e.target, l, o, r, n = this.options, c = n.group, s = O.active, v = at === c, f = n.sort, p = ce || s, i, u = this, m = !1;
|
|
3347
|
+
if (At)
|
|
3222
3348
|
return;
|
|
3223
|
-
function g(
|
|
3224
|
-
ve(
|
|
3349
|
+
function g(Y, _e) {
|
|
3350
|
+
ve(Y, u, Ce({
|
|
3225
3351
|
evt: e,
|
|
3226
3352
|
isOwner: v,
|
|
3227
3353
|
axis: i ? "vertical" : "horizontal",
|
|
3228
3354
|
revert: r,
|
|
3229
3355
|
dragRect: l,
|
|
3230
3356
|
targetRect: o,
|
|
3231
|
-
canSort:
|
|
3232
|
-
fromSortable:
|
|
3357
|
+
canSort: f,
|
|
3358
|
+
fromSortable: p,
|
|
3233
3359
|
target: t,
|
|
3234
|
-
completed:
|
|
3360
|
+
completed: d,
|
|
3235
3361
|
onMove: function(se, I) {
|
|
3236
|
-
return ot(z, a,
|
|
3362
|
+
return ot(z, a, _, l, se, oe(se), e, I);
|
|
3237
3363
|
},
|
|
3238
3364
|
changed: C
|
|
3239
3365
|
}, _e));
|
|
3240
3366
|
}
|
|
3241
3367
|
function k() {
|
|
3242
|
-
g("dragOverAnimationCapture"), u.captureAnimationState(), u !==
|
|
3368
|
+
g("dragOverAnimationCapture"), u.captureAnimationState(), u !== p && p.captureAnimationState();
|
|
3243
3369
|
}
|
|
3244
|
-
function
|
|
3370
|
+
function d(Y) {
|
|
3245
3371
|
return g("dragOverCompleted", {
|
|
3246
|
-
insertion:
|
|
3247
|
-
}),
|
|
3372
|
+
insertion: Y
|
|
3373
|
+
}), Y && (v ? s._hideClone() : s._showClone(u), u !== p && (ye(_, ce ? ce.options.ghostClass : s.options.ghostClass, !1), ye(_, n.ghostClass, !0)), ce !== u && u !== O.active ? ce = u : u === O.active && ce && (ce = null), p === u && (u._ignoreWhileAnimating = t), u.animateAll(function() {
|
|
3248
3374
|
g("dragOverAnimationComplete"), u._ignoreWhileAnimating = null;
|
|
3249
|
-
}), u !==
|
|
3375
|
+
}), u !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (t === _ && !_.animated || t === a && !t.animated) && (Be = null), !n.dragoverBubble && !e.rootEl && t !== document && (_.parentNode[he]._isOutsideThisEl(e.target), !Y && Oe(e)), !n.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3250
3376
|
}
|
|
3251
3377
|
function C() {
|
|
3252
|
-
|
|
3378
|
+
be = we(_), Ne = we(_, n.draggable), fe({
|
|
3253
3379
|
sortable: u,
|
|
3254
3380
|
name: "change",
|
|
3255
3381
|
toEl: a,
|
|
3256
|
-
newIndex:
|
|
3382
|
+
newIndex: be,
|
|
3257
3383
|
newDraggableIndex: Ne,
|
|
3258
3384
|
originalEvent: e
|
|
3259
3385
|
});
|
|
3260
3386
|
}
|
|
3261
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = Te(t, n.draggable, a, !0), g("dragOver"),
|
|
3262
|
-
return
|
|
3263
|
-
if (
|
|
3264
|
-
return
|
|
3265
|
-
if (ft = !1, s && !n.disabled && (v ?
|
|
3266
|
-
if (i = this._getDirection(e, t) === "vertical", l =
|
|
3267
|
-
return
|
|
3387
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = Te(t, n.draggable, a, !0), g("dragOver"), O.eventCanceled)
|
|
3388
|
+
return m;
|
|
3389
|
+
if (_.contains(e.target) || t.animated && t.animatingX && t.animatingY || u._ignoreWhileAnimating === t)
|
|
3390
|
+
return d(!1);
|
|
3391
|
+
if (ft = !1, s && !n.disabled && (v ? f || (r = te !== z) : ce === this || (this.lastPutMode = at.checkPull(this, s, _, e)) && c.checkPut(this, s, _, e))) {
|
|
3392
|
+
if (i = this._getDirection(e, t) === "vertical", l = oe(_), g("dragOverValid"), O.eventCanceled)
|
|
3393
|
+
return m;
|
|
3268
3394
|
if (r)
|
|
3269
|
-
return te = z, k(), this._hideClone(), g("revert"),
|
|
3270
|
-
var B =
|
|
3271
|
-
if (!B ||
|
|
3272
|
-
if (B ===
|
|
3273
|
-
return
|
|
3274
|
-
if (B && a === e.target && (t = B), t && (o =
|
|
3275
|
-
return k(), B && B.nextSibling ? a.insertBefore(
|
|
3276
|
-
} else if (B &&
|
|
3277
|
-
var
|
|
3278
|
-
if (
|
|
3279
|
-
return
|
|
3280
|
-
if (t =
|
|
3281
|
-
return k(), a.insertBefore(
|
|
3395
|
+
return te = z, k(), this._hideClone(), g("revert"), O.eventCanceled || (Pe ? z.insertBefore(_, Pe) : z.appendChild(_)), d(!0);
|
|
3396
|
+
var B = Lt(a, n.draggable);
|
|
3397
|
+
if (!B || to(e, i, this) && !B.animated) {
|
|
3398
|
+
if (B === _)
|
|
3399
|
+
return d(!1);
|
|
3400
|
+
if (B && a === e.target && (t = B), t && (o = oe(t)), ot(z, a, _, l, t, o, e, !!t) !== !1)
|
|
3401
|
+
return k(), B && B.nextSibling ? a.insertBefore(_, B.nextSibling) : a.appendChild(_), te = a, C(), d(!0);
|
|
3402
|
+
} else if (B && eo(e, i, this)) {
|
|
3403
|
+
var M = Ye(a, 0, n, !0);
|
|
3404
|
+
if (M === _)
|
|
3405
|
+
return d(!1);
|
|
3406
|
+
if (t = M, o = oe(t), ot(z, a, _, l, t, o, e, !1) !== !1)
|
|
3407
|
+
return k(), a.insertBefore(_, M), te = a, C(), d(!0);
|
|
3282
3408
|
} else if (t.parentNode === a) {
|
|
3283
|
-
o =
|
|
3284
|
-
var
|
|
3285
|
-
Be !== t && (Z = o[ee], Ze = !1, nt = !me && n.invertSwap || j),
|
|
3409
|
+
o = oe(t);
|
|
3410
|
+
var $ = 0, Z, j = _.parentNode !== a, me = !Wl(_.animated && _.toRect || l, t.animated && t.toRect || o, i), ee = i ? "top" : "left", N = aa(t, "top", "top") || aa(_, "top", "top"), S = N ? N.scrollTop : void 0;
|
|
3411
|
+
Be !== t && (Z = o[ee], Ze = !1, nt = !me && n.invertSwap || j), $ = ao(e, t, o, i, me ? 1 : n.swapThreshold, n.invertedSwapThreshold == null ? n.swapThreshold : n.invertedSwapThreshold, nt, Be === t);
|
|
3286
3412
|
var w;
|
|
3287
|
-
if (
|
|
3288
|
-
var
|
|
3413
|
+
if ($ !== 0) {
|
|
3414
|
+
var V = we(_);
|
|
3289
3415
|
do
|
|
3290
|
-
|
|
3291
|
-
while (w && (
|
|
3416
|
+
V -= $, w = te.children[V];
|
|
3417
|
+
while (w && (D(w, "display") === "none" || w === P));
|
|
3292
3418
|
}
|
|
3293
|
-
if (
|
|
3294
|
-
return
|
|
3295
|
-
Be = t, Je =
|
|
3296
|
-
var U = t.nextElementSibling,
|
|
3297
|
-
|
|
3298
|
-
var W = ot(z, a,
|
|
3419
|
+
if ($ === 0 || w === t)
|
|
3420
|
+
return d(!1);
|
|
3421
|
+
Be = t, Je = $;
|
|
3422
|
+
var U = t.nextElementSibling, L = !1;
|
|
3423
|
+
L = $ === 1;
|
|
3424
|
+
var W = ot(z, a, _, l, t, o, e, L);
|
|
3299
3425
|
if (W !== !1)
|
|
3300
|
-
return (W === 1 || W === -1) && (
|
|
3426
|
+
return (W === 1 || W === -1) && (L = W === 1), At = !0, setTimeout(Zl, 30), k(), L && !U ? a.appendChild(_) : t.parentNode.insertBefore(_, L ? U : t), N && wa(N, 0, S - N.scrollTop), te = _.parentNode, Z !== void 0 && !nt && (ut = Math.abs(Z - oe(t)[ee])), C(), d(!0);
|
|
3301
3427
|
}
|
|
3302
|
-
if (a.contains(
|
|
3303
|
-
return
|
|
3428
|
+
if (a.contains(_))
|
|
3429
|
+
return d(!1);
|
|
3304
3430
|
}
|
|
3305
3431
|
return !1;
|
|
3306
3432
|
},
|
|
@@ -3314,20 +3440,20 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3314
3440
|
},
|
|
3315
3441
|
_onDrop: function(e) {
|
|
3316
3442
|
var a = this.el, t = this.options;
|
|
3317
|
-
if (
|
|
3443
|
+
if (be = we(_), Ne = we(_, t.draggable), ve("drop", this, {
|
|
3318
3444
|
evt: e
|
|
3319
|
-
}), te =
|
|
3445
|
+
}), te = _ && _.parentNode, be = we(_), Ne = we(_, t.draggable), O.eventCanceled) {
|
|
3320
3446
|
this._nulling();
|
|
3321
3447
|
return;
|
|
3322
3448
|
}
|
|
3323
|
-
qe = !1, nt = !1, Ze = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer),
|
|
3449
|
+
qe = !1, nt = !1, Ze = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Mt(this.cloneId), Mt(this._dragStartId), this.nativeDraggable && (q(document, "drop", this), q(a, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), We && D(document.body, "user-select", ""), D(_, "transform", ""), e && (He && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), P && P.parentNode && P.parentNode.removeChild(P), (z === te || ce && ce.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), _ && (this.nativeDraggable && q(_, "dragend", this), Dt(_), _.style["will-change"] = "", He && !qe && ye(_, ce ? ce.options.ghostClass : this.options.ghostClass, !1), ye(_, this.options.chosenClass, !1), fe({
|
|
3324
3450
|
sortable: this,
|
|
3325
3451
|
name: "unchoose",
|
|
3326
3452
|
toEl: te,
|
|
3327
3453
|
newIndex: null,
|
|
3328
3454
|
newDraggableIndex: null,
|
|
3329
3455
|
originalEvent: e
|
|
3330
|
-
}), z !== te ? (
|
|
3456
|
+
}), z !== te ? (be >= 0 && (fe({
|
|
3331
3457
|
rootEl: te,
|
|
3332
3458
|
name: "add",
|
|
3333
3459
|
toEl: te,
|
|
@@ -3349,7 +3475,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3349
3475
|
name: "sort",
|
|
3350
3476
|
toEl: te,
|
|
3351
3477
|
originalEvent: e
|
|
3352
|
-
})),
|
|
3478
|
+
})), ce && ce.save()) : be !== $e && be >= 0 && (fe({
|
|
3353
3479
|
sortable: this,
|
|
3354
3480
|
name: "update",
|
|
3355
3481
|
toEl: te,
|
|
@@ -3359,7 +3485,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3359
3485
|
name: "sort",
|
|
3360
3486
|
toEl: te,
|
|
3361
3487
|
originalEvent: e
|
|
3362
|
-
})),
|
|
3488
|
+
})), O.active && ((be == null || be === -1) && (be = $e, Ne = Qe), fe({
|
|
3363
3489
|
sortable: this,
|
|
3364
3490
|
name: "end",
|
|
3365
3491
|
toEl: te,
|
|
@@ -3367,9 +3493,9 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3367
3493
|
}), this.save()))), this._nulling();
|
|
3368
3494
|
},
|
|
3369
3495
|
_nulling: function() {
|
|
3370
|
-
ve("nulling", this), z =
|
|
3496
|
+
ve("nulling", this), z = _ = te = P = Pe = J = st = Ve = De = xe = He = be = Ne = $e = Qe = Be = Je = ce = at = O.dragged = O.ghost = O.clone = O.active = null, gt.forEach(function(e) {
|
|
3371
3497
|
e.checked = !0;
|
|
3372
|
-
}), gt.length = Nt =
|
|
3498
|
+
}), gt.length = Nt = Vt = 0;
|
|
3373
3499
|
},
|
|
3374
3500
|
handleEvent: function(e) {
|
|
3375
3501
|
switch (e.type) {
|
|
@@ -3379,7 +3505,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3379
3505
|
break;
|
|
3380
3506
|
case "dragenter":
|
|
3381
3507
|
case "dragover":
|
|
3382
|
-
|
|
3508
|
+
_ && (this._onDragOver(e), Jl(e));
|
|
3383
3509
|
break;
|
|
3384
3510
|
case "selectstart":
|
|
3385
3511
|
e.preventDefault();
|
|
@@ -3392,7 +3518,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3392
3518
|
*/
|
|
3393
3519
|
toArray: function() {
|
|
3394
3520
|
for (var e = [], a, t = this.el.children, l = 0, o = t.length, r = this.options; l < o; l++)
|
|
3395
|
-
a = t[l], Te(a, r.draggable, this.el, !1) && e.push(a.getAttribute(r.dataIdAttr) ||
|
|
3521
|
+
a = t[l], Te(a, r.draggable, this.el, !1) && e.push(a.getAttribute(r.dataIdAttr) || lo(a));
|
|
3396
3522
|
return e;
|
|
3397
3523
|
},
|
|
3398
3524
|
/**
|
|
@@ -3443,15 +3569,15 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3443
3569
|
destroy: function() {
|
|
3444
3570
|
ve("destroy", this);
|
|
3445
3571
|
var e = this.el;
|
|
3446
|
-
e[
|
|
3572
|
+
e[he] = null, q(e, "mousedown", this._onTapStart), q(e, "touchstart", this._onTapStart), q(e, "pointerdown", this._onTapStart), this.nativeDraggable && (q(e, "dragover", this), q(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(a) {
|
|
3447
3573
|
a.removeAttribute("draggable");
|
|
3448
3574
|
}), this._onDrop(), this._disableDelayedDragEvents(), vt.splice(vt.indexOf(this.el), 1), this.el = e = null;
|
|
3449
3575
|
},
|
|
3450
3576
|
_hideClone: function() {
|
|
3451
|
-
if (!
|
|
3452
|
-
if (ve("hideClone", this),
|
|
3577
|
+
if (!Ve) {
|
|
3578
|
+
if (ve("hideClone", this), O.eventCanceled)
|
|
3453
3579
|
return;
|
|
3454
|
-
|
|
3580
|
+
D(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ve = !0;
|
|
3455
3581
|
}
|
|
3456
3582
|
},
|
|
3457
3583
|
_showClone: function(e) {
|
|
@@ -3459,59 +3585,59 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3459
3585
|
this._hideClone();
|
|
3460
3586
|
return;
|
|
3461
3587
|
}
|
|
3462
|
-
if (
|
|
3463
|
-
if (ve("showClone", this),
|
|
3588
|
+
if (Ve) {
|
|
3589
|
+
if (ve("showClone", this), O.eventCanceled)
|
|
3464
3590
|
return;
|
|
3465
|
-
|
|
3591
|
+
_.parentNode == z && !this.options.group.revertClone ? z.insertBefore(J, _) : Pe ? z.insertBefore(J, Pe) : z.appendChild(J), this.options.group.revertClone && this.animate(_, J), D(J, "display", ""), Ve = !1;
|
|
3466
3592
|
}
|
|
3467
3593
|
}
|
|
3468
3594
|
};
|
|
3469
|
-
function
|
|
3595
|
+
function Jl(e) {
|
|
3470
3596
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3471
3597
|
}
|
|
3472
3598
|
function ot(e, a, t, l, o, r, n, c) {
|
|
3473
|
-
var s, v = e[
|
|
3599
|
+
var s, v = e[he], f = v.options.onMove, p;
|
|
3474
3600
|
return window.CustomEvent && !ke && !et ? s = new CustomEvent("move", {
|
|
3475
3601
|
bubbles: !0,
|
|
3476
3602
|
cancelable: !0
|
|
3477
|
-
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = a, s.from = e, s.dragged = t, s.draggedRect = l, s.related = o || a, s.relatedRect = r ||
|
|
3603
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = a, s.from = e, s.dragged = t, s.draggedRect = l, s.related = o || a, s.relatedRect = r || oe(a), s.willInsertAfter = c, s.originalEvent = n, e.dispatchEvent(s), f && (p = f.call(v, s, n)), p;
|
|
3478
3604
|
}
|
|
3479
3605
|
function Dt(e) {
|
|
3480
3606
|
e.draggable = !1;
|
|
3481
3607
|
}
|
|
3482
|
-
function
|
|
3483
|
-
|
|
3608
|
+
function Zl() {
|
|
3609
|
+
At = !1;
|
|
3484
3610
|
}
|
|
3485
|
-
function
|
|
3486
|
-
var l =
|
|
3611
|
+
function eo(e, a, t) {
|
|
3612
|
+
var l = oe(Ye(t.el, 0, t.options, !0)), o = Ta(t.el, t.options, P), r = 10;
|
|
3487
3613
|
return a ? e.clientX < o.left - r || e.clientY < l.top && e.clientX < l.right : e.clientY < o.top - r || e.clientY < l.bottom && e.clientX < l.left;
|
|
3488
3614
|
}
|
|
3489
|
-
function
|
|
3490
|
-
var l =
|
|
3615
|
+
function to(e, a, t) {
|
|
3616
|
+
var l = oe(Lt(t.el, t.options.draggable)), o = Ta(t.el, t.options, P), r = 10;
|
|
3491
3617
|
return a ? e.clientX > o.right + r || e.clientY > l.bottom && e.clientX > l.left : e.clientY > o.bottom + r || e.clientX > l.right && e.clientY > l.top;
|
|
3492
3618
|
}
|
|
3493
|
-
function
|
|
3494
|
-
var s = l ? e.clientY : e.clientX, v = l ? t.height : t.width,
|
|
3619
|
+
function ao(e, a, t, l, o, r, n, c) {
|
|
3620
|
+
var s = l ? e.clientY : e.clientX, v = l ? t.height : t.width, f = l ? t.top : t.left, p = l ? t.bottom : t.right, i = !1;
|
|
3495
3621
|
if (!n) {
|
|
3496
3622
|
if (c && ut < v * o) {
|
|
3497
|
-
if (!Ze && (Je === 1 ? s >
|
|
3623
|
+
if (!Ze && (Je === 1 ? s > f + v * r / 2 : s < p - v * r / 2) && (Ze = !0), Ze)
|
|
3498
3624
|
i = !0;
|
|
3499
|
-
else if (Je === 1 ? s <
|
|
3625
|
+
else if (Je === 1 ? s < f + ut : s > p - ut)
|
|
3500
3626
|
return -Je;
|
|
3501
|
-
} else if (s >
|
|
3502
|
-
return
|
|
3627
|
+
} else if (s > f + v * (1 - o) / 2 && s < p - v * (1 - o) / 2)
|
|
3628
|
+
return no(a);
|
|
3503
3629
|
}
|
|
3504
|
-
return i = i || n, i && (s <
|
|
3630
|
+
return i = i || n, i && (s < f + v * r / 2 || s > p - v * r / 2) ? s > f + v / 2 ? 1 : -1 : 0;
|
|
3505
3631
|
}
|
|
3506
|
-
function
|
|
3507
|
-
return we(
|
|
3632
|
+
function no(e) {
|
|
3633
|
+
return we(_) < we(e) ? 1 : -1;
|
|
3508
3634
|
}
|
|
3509
|
-
function
|
|
3635
|
+
function lo(e) {
|
|
3510
3636
|
for (var a = e.tagName + e.className + e.src + e.href + e.textContent, t = a.length, l = 0; t--; )
|
|
3511
3637
|
l += a.charCodeAt(t);
|
|
3512
3638
|
return l.toString(36);
|
|
3513
3639
|
}
|
|
3514
|
-
function
|
|
3640
|
+
function oo(e) {
|
|
3515
3641
|
gt.length = 0;
|
|
3516
3642
|
for (var a = e.getElementsByTagName("input"), t = a.length; t--; ) {
|
|
3517
3643
|
var l = a[t];
|
|
@@ -3521,49 +3647,49 @@ function to(e) {
|
|
|
3521
3647
|
function ct(e) {
|
|
3522
3648
|
return setTimeout(e, 0);
|
|
3523
3649
|
}
|
|
3524
|
-
function
|
|
3650
|
+
function Mt(e) {
|
|
3525
3651
|
return clearTimeout(e);
|
|
3526
3652
|
}
|
|
3527
3653
|
Ct && G(document, "touchmove", function(e) {
|
|
3528
|
-
(
|
|
3654
|
+
(O.active || qe) && e.cancelable && e.preventDefault();
|
|
3529
3655
|
});
|
|
3530
|
-
|
|
3656
|
+
O.utils = {
|
|
3531
3657
|
on: G,
|
|
3532
3658
|
off: q,
|
|
3533
|
-
css:
|
|
3659
|
+
css: D,
|
|
3534
3660
|
find: ha,
|
|
3535
3661
|
is: function(e, a) {
|
|
3536
3662
|
return !!Te(e, a, e, !1);
|
|
3537
3663
|
},
|
|
3538
|
-
extend:
|
|
3664
|
+
extend: Gl,
|
|
3539
3665
|
throttle: _a,
|
|
3540
3666
|
closest: Te,
|
|
3541
|
-
toggleClass:
|
|
3667
|
+
toggleClass: ye,
|
|
3542
3668
|
clone: xa,
|
|
3543
3669
|
index: we,
|
|
3544
3670
|
nextTick: ct,
|
|
3545
|
-
cancelNextTick:
|
|
3671
|
+
cancelNextTick: Mt,
|
|
3546
3672
|
detectDirection: Ca,
|
|
3547
|
-
getChild:
|
|
3673
|
+
getChild: Ye
|
|
3548
3674
|
};
|
|
3549
|
-
|
|
3550
|
-
return e[
|
|
3675
|
+
O.get = function(e) {
|
|
3676
|
+
return e[he];
|
|
3551
3677
|
};
|
|
3552
|
-
|
|
3678
|
+
O.mount = function() {
|
|
3553
3679
|
for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
|
|
3554
3680
|
a[t] = arguments[t];
|
|
3555
3681
|
a[0].constructor === Array && (a = a[0]), a.forEach(function(l) {
|
|
3556
3682
|
if (!l.prototype || !l.prototype.constructor)
|
|
3557
3683
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));
|
|
3558
|
-
l.utils && (
|
|
3684
|
+
l.utils && (O.utils = Ce(Ce({}, O.utils), l.utils)), tt.mount(l);
|
|
3559
3685
|
});
|
|
3560
3686
|
};
|
|
3561
|
-
|
|
3562
|
-
return new
|
|
3687
|
+
O.create = function(e, a) {
|
|
3688
|
+
return new O(e, a);
|
|
3563
3689
|
};
|
|
3564
|
-
|
|
3565
|
-
var
|
|
3566
|
-
function
|
|
3690
|
+
O.version = Rl;
|
|
3691
|
+
var le = [], Ke, Rt, Bt = !1, Ot, Pt, yt, Xe;
|
|
3692
|
+
function ro() {
|
|
3567
3693
|
function e() {
|
|
3568
3694
|
this.defaults = {
|
|
3569
3695
|
scroll: !0,
|
|
@@ -3585,10 +3711,10 @@ function ao() {
|
|
|
3585
3711
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3586
3712
|
},
|
|
3587
3713
|
drop: function() {
|
|
3588
|
-
this.sortable.nativeDraggable ? q(document, "dragover", this._handleAutoScroll) : (q(document, "pointermove", this._handleFallbackAutoScroll), q(document, "touchmove", this._handleFallbackAutoScroll), q(document, "mousemove", this._handleFallbackAutoScroll)), ia(), dt(),
|
|
3714
|
+
this.sortable.nativeDraggable ? q(document, "dragover", this._handleAutoScroll) : (q(document, "pointermove", this._handleFallbackAutoScroll), q(document, "touchmove", this._handleFallbackAutoScroll), q(document, "mousemove", this._handleFallbackAutoScroll)), ia(), dt(), $l();
|
|
3589
3715
|
},
|
|
3590
3716
|
nulling: function() {
|
|
3591
|
-
yt = Rt = Ke = Bt = Xe = Ot = Pt = null,
|
|
3717
|
+
yt = Rt = Ke = Bt = Xe = Ot = Pt = null, le.length = 0;
|
|
3592
3718
|
},
|
|
3593
3719
|
_handleFallbackAutoScroll: function(a) {
|
|
3594
3720
|
this._handleAutoScroll(a, !0);
|
|
@@ -3597,17 +3723,17 @@ function ao() {
|
|
|
3597
3723
|
var l = this, o = (a.touches ? a.touches[0] : a).clientX, r = (a.touches ? a.touches[0] : a).clientY, n = document.elementFromPoint(o, r);
|
|
3598
3724
|
if (yt = a, t || this.options.forceAutoScrollFallback || et || ke || We) {
|
|
3599
3725
|
Ut(a, this.options, n, t);
|
|
3600
|
-
var c =
|
|
3726
|
+
var c = Ee(n, !0);
|
|
3601
3727
|
Bt && (!Xe || o !== Ot || r !== Pt) && (Xe && ia(), Xe = setInterval(function() {
|
|
3602
|
-
var s =
|
|
3728
|
+
var s = Ee(document.elementFromPoint(o, r), !0);
|
|
3603
3729
|
s !== c && (c = s, dt()), Ut(a, l.options, s, t);
|
|
3604
3730
|
}, 10), Ot = o, Pt = r);
|
|
3605
3731
|
} else {
|
|
3606
|
-
if (!this.options.bubbleScroll ||
|
|
3732
|
+
if (!this.options.bubbleScroll || Ee(n, !0) === Ie()) {
|
|
3607
3733
|
dt();
|
|
3608
3734
|
return;
|
|
3609
3735
|
}
|
|
3610
|
-
Ut(a, this.options,
|
|
3736
|
+
Ut(a, this.options, Ee(n, !1), !1);
|
|
3611
3737
|
}
|
|
3612
3738
|
}
|
|
3613
3739
|
}, Se(e, {
|
|
@@ -3616,33 +3742,33 @@ function ao() {
|
|
|
3616
3742
|
});
|
|
3617
3743
|
}
|
|
3618
3744
|
function dt() {
|
|
3619
|
-
|
|
3745
|
+
le.forEach(function(e) {
|
|
3620
3746
|
clearInterval(e.pid);
|
|
3621
|
-
}),
|
|
3747
|
+
}), le = [];
|
|
3622
3748
|
}
|
|
3623
3749
|
function ia() {
|
|
3624
3750
|
clearInterval(Xe);
|
|
3625
3751
|
}
|
|
3626
3752
|
var Ut = _a(function(e, a, t, l) {
|
|
3627
3753
|
if (a.scroll) {
|
|
3628
|
-
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, n = a.scrollSensitivity, c = a.scrollSpeed, s = Ie(), v = !1,
|
|
3629
|
-
Rt !== t && (Rt = t, dt(), Ke = a.scroll,
|
|
3630
|
-
var
|
|
3754
|
+
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, n = a.scrollSensitivity, c = a.scrollSpeed, s = Ie(), v = !1, f;
|
|
3755
|
+
Rt !== t && (Rt = t, dt(), Ke = a.scroll, f = a.scrollFn, Ke === !0 && (Ke = Ee(t, !0)));
|
|
3756
|
+
var p = 0, i = Ke;
|
|
3631
3757
|
do {
|
|
3632
|
-
var u = i,
|
|
3633
|
-
u === s ? (
|
|
3634
|
-
var w =
|
|
3635
|
-
if (!
|
|
3636
|
-
for (var U = 0; U <=
|
|
3637
|
-
|
|
3638
|
-
(
|
|
3639
|
-
l && this.layer === 0 &&
|
|
3640
|
-
var
|
|
3641
|
-
typeof
|
|
3758
|
+
var u = i, m = oe(u), g = m.top, k = m.bottom, d = m.left, C = m.right, B = m.width, M = m.height, $ = void 0, Z = void 0, j = u.scrollWidth, me = u.scrollHeight, ee = D(u), N = u.scrollLeft, S = u.scrollTop;
|
|
3759
|
+
u === s ? ($ = B < j && (ee.overflowX === "auto" || ee.overflowX === "scroll" || ee.overflowX === "visible"), Z = M < me && (ee.overflowY === "auto" || ee.overflowY === "scroll" || ee.overflowY === "visible")) : ($ = B < j && (ee.overflowX === "auto" || ee.overflowX === "scroll"), Z = M < me && (ee.overflowY === "auto" || ee.overflowY === "scroll"));
|
|
3760
|
+
var w = $ && (Math.abs(C - o) <= n && N + B < j) - (Math.abs(d - o) <= n && !!N), V = Z && (Math.abs(k - r) <= n && S + M < me) - (Math.abs(g - r) <= n && !!S);
|
|
3761
|
+
if (!le[p])
|
|
3762
|
+
for (var U = 0; U <= p; U++)
|
|
3763
|
+
le[U] || (le[U] = {});
|
|
3764
|
+
(le[p].vx != w || le[p].vy != V || le[p].el !== u) && (le[p].el = u, le[p].vx = w, le[p].vy = V, clearInterval(le[p].pid), (w != 0 || V != 0) && (v = !0, le[p].pid = setInterval((function() {
|
|
3765
|
+
l && this.layer === 0 && O.active._onTouchMove(yt);
|
|
3766
|
+
var L = le[this.layer].vy ? le[this.layer].vy * c : 0, W = le[this.layer].vx ? le[this.layer].vx * c : 0;
|
|
3767
|
+
typeof f == "function" && f.call(O.dragged.parentNode[he], W, L, e, yt, le[this.layer].el) !== "continue" || wa(le[this.layer].el, W, L);
|
|
3642
3768
|
}).bind({
|
|
3643
|
-
layer:
|
|
3644
|
-
}), 24))),
|
|
3645
|
-
} while (a.bubbleScroll && i !== s && (i =
|
|
3769
|
+
layer: p
|
|
3770
|
+
}), 24))), p++;
|
|
3771
|
+
} while (a.bubbleScroll && i !== s && (i = Ee(i, !1)));
|
|
3646
3772
|
Bt = v;
|
|
3647
3773
|
}
|
|
3648
3774
|
}, 30), Na = function(e) {
|
|
@@ -3650,16 +3776,16 @@ var Ut = _a(function(e, a, t, l) {
|
|
|
3650
3776
|
if (a) {
|
|
3651
3777
|
var s = t || o;
|
|
3652
3778
|
n();
|
|
3653
|
-
var v = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a,
|
|
3654
|
-
c(), s && !s.el.contains(
|
|
3779
|
+
var v = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, f = document.elementFromPoint(v.clientX, v.clientY);
|
|
3780
|
+
c(), s && !s.el.contains(f) && (r("spill"), this.onSpill({
|
|
3655
3781
|
dragEl: l,
|
|
3656
3782
|
putSortable: t
|
|
3657
3783
|
}));
|
|
3658
3784
|
}
|
|
3659
3785
|
};
|
|
3660
|
-
function
|
|
3786
|
+
function Yt() {
|
|
3661
3787
|
}
|
|
3662
|
-
|
|
3788
|
+
Yt.prototype = {
|
|
3663
3789
|
startIndex: null,
|
|
3664
3790
|
dragStart: function(e) {
|
|
3665
3791
|
var a = e.oldDraggableIndex;
|
|
@@ -3668,12 +3794,12 @@ $t.prototype = {
|
|
|
3668
3794
|
onSpill: function(e) {
|
|
3669
3795
|
var a = e.dragEl, t = e.putSortable;
|
|
3670
3796
|
this.sortable.captureAnimationState(), t && t.captureAnimationState();
|
|
3671
|
-
var l =
|
|
3797
|
+
var l = Ye(this.sortable.el, this.startIndex, this.options);
|
|
3672
3798
|
l ? this.sortable.el.insertBefore(a, l) : this.sortable.el.appendChild(a), this.sortable.animateAll(), t && t.animateAll();
|
|
3673
3799
|
},
|
|
3674
3800
|
drop: Na
|
|
3675
3801
|
};
|
|
3676
|
-
Se(
|
|
3802
|
+
Se(Yt, {
|
|
3677
3803
|
pluginName: "revertOnSpill"
|
|
3678
3804
|
});
|
|
3679
3805
|
function jt() {
|
|
@@ -3688,153 +3814,153 @@ jt.prototype = {
|
|
|
3688
3814
|
Se(jt, {
|
|
3689
3815
|
pluginName: "removeOnSpill"
|
|
3690
3816
|
});
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
function
|
|
3817
|
+
O.mount(new ro());
|
|
3818
|
+
O.mount(jt, Yt);
|
|
3819
|
+
function io(e) {
|
|
3694
3820
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3695
3821
|
}
|
|
3696
|
-
function
|
|
3697
|
-
Gt() &&
|
|
3822
|
+
function so(e) {
|
|
3823
|
+
Gt() && Aa(e);
|
|
3698
3824
|
}
|
|
3699
|
-
function
|
|
3825
|
+
function uo(e) {
|
|
3700
3826
|
Gt() ? ie(e) : ca(e);
|
|
3701
3827
|
}
|
|
3702
|
-
let
|
|
3828
|
+
let Va = null, Ea = null;
|
|
3703
3829
|
function sa(e = null, a = null) {
|
|
3704
|
-
|
|
3830
|
+
Va = e, Ea = a;
|
|
3705
3831
|
}
|
|
3706
|
-
function
|
|
3832
|
+
function co() {
|
|
3707
3833
|
return {
|
|
3708
|
-
data:
|
|
3709
|
-
clonedData:
|
|
3834
|
+
data: Va,
|
|
3835
|
+
clonedData: Ea
|
|
3710
3836
|
};
|
|
3711
3837
|
}
|
|
3712
3838
|
const ua = Symbol("cloneElement");
|
|
3713
|
-
function
|
|
3839
|
+
function po(...e) {
|
|
3714
3840
|
var a, t;
|
|
3715
3841
|
const l = (a = Gt()) == null ? void 0 : a.proxy;
|
|
3716
3842
|
let o = null;
|
|
3717
3843
|
const r = e[0];
|
|
3718
3844
|
let [, n, c] = e;
|
|
3719
|
-
Array.isArray(
|
|
3845
|
+
Array.isArray(A(n)) || (c = n, n = null);
|
|
3720
3846
|
let s = null;
|
|
3721
3847
|
const {
|
|
3722
3848
|
immediate: v = !0,
|
|
3723
|
-
clone:
|
|
3724
|
-
forceFallback:
|
|
3849
|
+
clone: f = io,
|
|
3850
|
+
forceFallback: p,
|
|
3725
3851
|
fallbackOnBody: i,
|
|
3726
3852
|
customUpdate: u
|
|
3727
|
-
} = (t =
|
|
3728
|
-
function
|
|
3729
|
-
var
|
|
3730
|
-
const { from: w, oldIndex:
|
|
3731
|
-
o =
|
|
3732
|
-
const W =
|
|
3733
|
-
sa(W,
|
|
3853
|
+
} = (t = A(c)) != null ? t : {};
|
|
3854
|
+
function m(N) {
|
|
3855
|
+
var S;
|
|
3856
|
+
const { from: w, oldIndex: V, item: U } = N, L = Array.from(w.childNodes);
|
|
3857
|
+
o = p && !i ? L.slice(0, -1) : L;
|
|
3858
|
+
const W = A((S = A(n)) == null ? void 0 : S[V]), Y = f(W);
|
|
3859
|
+
sa(W, Y), U[ua] = Y;
|
|
3734
3860
|
}
|
|
3735
3861
|
function g(N) {
|
|
3736
|
-
const
|
|
3737
|
-
if (!
|
|
3738
|
-
if (Ft(N.item),
|
|
3739
|
-
const w = [...
|
|
3740
|
-
n.value = zt(w, N.newDraggableIndex,
|
|
3862
|
+
const S = N.item[ua];
|
|
3863
|
+
if (!Sl(S)) {
|
|
3864
|
+
if (Ft(N.item), Ae(n)) {
|
|
3865
|
+
const w = [...A(n)];
|
|
3866
|
+
n.value = zt(w, N.newDraggableIndex, S);
|
|
3741
3867
|
return;
|
|
3742
3868
|
}
|
|
3743
|
-
zt(
|
|
3869
|
+
zt(A(n), N.newDraggableIndex, S);
|
|
3744
3870
|
}
|
|
3745
3871
|
}
|
|
3746
3872
|
function k(N) {
|
|
3747
|
-
const { from:
|
|
3748
|
-
if (Qt(
|
|
3873
|
+
const { from: S, item: w, oldIndex: V, oldDraggableIndex: U, pullMode: L, clone: W } = N;
|
|
3874
|
+
if (Qt(S, w, V), L === "clone") {
|
|
3749
3875
|
Ft(W);
|
|
3750
3876
|
return;
|
|
3751
3877
|
}
|
|
3752
|
-
if (
|
|
3753
|
-
const
|
|
3754
|
-
n.value = Wt(
|
|
3878
|
+
if (Ae(n)) {
|
|
3879
|
+
const Y = [...A(n)];
|
|
3880
|
+
n.value = Wt(Y, U);
|
|
3755
3881
|
return;
|
|
3756
3882
|
}
|
|
3757
|
-
Wt(
|
|
3883
|
+
Wt(A(n), U);
|
|
3758
3884
|
}
|
|
3759
|
-
function
|
|
3885
|
+
function d(N) {
|
|
3760
3886
|
if (u) {
|
|
3761
3887
|
u(N);
|
|
3762
3888
|
return;
|
|
3763
3889
|
}
|
|
3764
|
-
const { from:
|
|
3765
|
-
if (Ft(w), Qt(
|
|
3766
|
-
const W = [...
|
|
3890
|
+
const { from: S, item: w, oldIndex: V, oldDraggableIndex: U, newDraggableIndex: L } = N;
|
|
3891
|
+
if (Ft(w), Qt(S, w, V), Ae(n)) {
|
|
3892
|
+
const W = [...A(n)];
|
|
3767
3893
|
n.value = Xt(
|
|
3768
3894
|
W,
|
|
3769
3895
|
U,
|
|
3770
|
-
|
|
3896
|
+
L
|
|
3771
3897
|
);
|
|
3772
3898
|
return;
|
|
3773
3899
|
}
|
|
3774
|
-
Xt(
|
|
3900
|
+
Xt(A(n), U, L);
|
|
3775
3901
|
}
|
|
3776
3902
|
function C(N) {
|
|
3777
|
-
const { newIndex:
|
|
3778
|
-
let
|
|
3779
|
-
const W =
|
|
3903
|
+
const { newIndex: S, oldIndex: w, from: V, to: U } = N;
|
|
3904
|
+
let L = null;
|
|
3905
|
+
const W = S === w && V === U;
|
|
3780
3906
|
try {
|
|
3781
3907
|
if (W) {
|
|
3782
|
-
let
|
|
3908
|
+
let Y = null;
|
|
3783
3909
|
o == null || o.some((_e, se) => {
|
|
3784
|
-
if (
|
|
3785
|
-
return
|
|
3910
|
+
if (Y && (o == null ? void 0 : o.length) !== U.childNodes.length)
|
|
3911
|
+
return V.insertBefore(Y, _e.nextSibling), !0;
|
|
3786
3912
|
const I = U.childNodes[se];
|
|
3787
|
-
|
|
3913
|
+
Y = U == null ? void 0 : U.replaceChild(_e, I);
|
|
3788
3914
|
});
|
|
3789
3915
|
}
|
|
3790
|
-
} catch (
|
|
3791
|
-
|
|
3916
|
+
} catch (Y) {
|
|
3917
|
+
L = Y;
|
|
3792
3918
|
} finally {
|
|
3793
3919
|
o = null;
|
|
3794
3920
|
}
|
|
3795
3921
|
ca(() => {
|
|
3796
|
-
if (sa(),
|
|
3797
|
-
throw
|
|
3922
|
+
if (sa(), L)
|
|
3923
|
+
throw L;
|
|
3798
3924
|
});
|
|
3799
3925
|
}
|
|
3800
3926
|
const B = {
|
|
3801
|
-
onUpdate:
|
|
3802
|
-
onStart:
|
|
3927
|
+
onUpdate: d,
|
|
3928
|
+
onStart: m,
|
|
3803
3929
|
onAdd: g,
|
|
3804
3930
|
onRemove: k,
|
|
3805
3931
|
onEnd: C
|
|
3806
3932
|
};
|
|
3807
|
-
function
|
|
3808
|
-
const
|
|
3809
|
-
return N || (N =
|
|
3933
|
+
function M(N) {
|
|
3934
|
+
const S = A(r);
|
|
3935
|
+
return N || (N = kl(S) ? Nl(S, l == null ? void 0 : l.$el) : S), N && !Dl(N) && (N = N.$el), N || Il("Root element not found"), N;
|
|
3810
3936
|
}
|
|
3811
|
-
function
|
|
3937
|
+
function $() {
|
|
3812
3938
|
var N;
|
|
3813
|
-
const
|
|
3814
|
-
return Jt(U, (
|
|
3815
|
-
|
|
3816
|
-
const se =
|
|
3817
|
-
return
|
|
3939
|
+
const S = (N = A(c)) != null ? N : {}, { immediate: w, clone: V } = S, U = fa(S, ["immediate", "clone"]);
|
|
3940
|
+
return Jt(U, (L, W) => {
|
|
3941
|
+
Ol(L) && (U[L] = (Y, ..._e) => {
|
|
3942
|
+
const se = co();
|
|
3943
|
+
return Pl(Y, se), W(Y, ..._e);
|
|
3818
3944
|
});
|
|
3819
|
-
}),
|
|
3945
|
+
}), El(
|
|
3820
3946
|
n === null ? {} : B,
|
|
3821
3947
|
U
|
|
3822
3948
|
);
|
|
3823
3949
|
}
|
|
3824
3950
|
const Z = (N) => {
|
|
3825
|
-
N =
|
|
3951
|
+
N = M(N), s && j.destroy(), s = new O(N, $());
|
|
3826
3952
|
};
|
|
3827
|
-
|
|
3953
|
+
ne(
|
|
3828
3954
|
() => c,
|
|
3829
3955
|
() => {
|
|
3830
|
-
s && Jt(
|
|
3831
|
-
s == null || s.option(N,
|
|
3956
|
+
s && Jt($(), (N, S) => {
|
|
3957
|
+
s == null || s.option(N, S);
|
|
3832
3958
|
});
|
|
3833
3959
|
},
|
|
3834
3960
|
{ deep: !0 }
|
|
3835
3961
|
);
|
|
3836
3962
|
const j = {
|
|
3837
|
-
option: (N,
|
|
3963
|
+
option: (N, S) => s == null ? void 0 : s.option(N, S),
|
|
3838
3964
|
destroy: () => {
|
|
3839
3965
|
s == null || s.destroy(), s = null;
|
|
3840
3966
|
},
|
|
@@ -3842,9 +3968,9 @@ function io(...e) {
|
|
|
3842
3968
|
toArray: () => s == null ? void 0 : s.toArray(),
|
|
3843
3969
|
closest: (...N) => s == null ? void 0 : s.closest(...N)
|
|
3844
3970
|
}, me = () => j == null ? void 0 : j.option("disabled", !0), ee = () => j == null ? void 0 : j.option("disabled", !1);
|
|
3845
|
-
return
|
|
3971
|
+
return uo(() => {
|
|
3846
3972
|
v && Z();
|
|
3847
|
-
}),
|
|
3973
|
+
}), so(j.destroy), Ge({ start: Z, pause: me, resume: ee }, j);
|
|
3848
3974
|
}
|
|
3849
3975
|
const qt = [
|
|
3850
3976
|
"update",
|
|
@@ -3859,7 +3985,7 @@ const qt = [
|
|
|
3859
3985
|
"clone",
|
|
3860
3986
|
"move",
|
|
3861
3987
|
"change"
|
|
3862
|
-
],
|
|
3988
|
+
], mo = [
|
|
3863
3989
|
"clone",
|
|
3864
3990
|
"animation",
|
|
3865
3991
|
"ghostClass",
|
|
@@ -3904,84 +4030,84 @@ const qt = [
|
|
|
3904
4030
|
"target",
|
|
3905
4031
|
"customUpdate",
|
|
3906
4032
|
...qt.map((e) => `on${e.replace(/^\S/, (a) => a.toUpperCase())}`)
|
|
3907
|
-
],
|
|
4033
|
+
], fo = X({
|
|
3908
4034
|
name: "VueDraggable",
|
|
3909
4035
|
model: {
|
|
3910
4036
|
prop: "modelValue",
|
|
3911
4037
|
event: "update:modelValue"
|
|
3912
4038
|
},
|
|
3913
|
-
props:
|
|
4039
|
+
props: mo,
|
|
3914
4040
|
emits: ["update:modelValue", ...qt],
|
|
3915
4041
|
setup(e, { slots: a, emit: t, expose: l, attrs: o }) {
|
|
3916
|
-
const r = qt.reduce((
|
|
3917
|
-
const i = `on${
|
|
3918
|
-
return
|
|
4042
|
+
const r = qt.reduce((f, p) => {
|
|
4043
|
+
const i = `on${p.replace(/^\S/, (u) => u.toUpperCase())}`;
|
|
4044
|
+
return f[i] = (...u) => t(p, ...u), f;
|
|
3919
4045
|
}, {}), n = K(() => {
|
|
3920
|
-
const
|
|
3921
|
-
const
|
|
3922
|
-
return
|
|
4046
|
+
const f = Oa(e), { modelValue: p } = f, i = fa(f, ["modelValue"]), u = Object.entries(i).reduce((m, [g, k]) => {
|
|
4047
|
+
const d = A(k);
|
|
4048
|
+
return d !== void 0 && (m[g] = d), m;
|
|
3923
4049
|
}, {});
|
|
3924
|
-
return Ge(Ge({}, r),
|
|
4050
|
+
return Ge(Ge({}, r), Fl(Ge(Ge({}, o), u)));
|
|
3925
4051
|
}), c = K({
|
|
3926
4052
|
get: () => e.modelValue,
|
|
3927
|
-
set: (
|
|
4053
|
+
set: (f) => t("update:modelValue", f)
|
|
3928
4054
|
}), s = T(), v = Pa(
|
|
3929
|
-
|
|
4055
|
+
po(e.target || s, c, n)
|
|
3930
4056
|
);
|
|
3931
4057
|
return l(v), () => {
|
|
3932
|
-
var
|
|
3933
|
-
return Ua(e.tag || "div", { ref: s }, (
|
|
4058
|
+
var f;
|
|
4059
|
+
return Ua(e.tag || "div", { ref: s }, (f = a == null ? void 0 : a.default) == null ? void 0 : f.call(a, v));
|
|
3934
4060
|
};
|
|
3935
4061
|
}
|
|
3936
|
-
}),
|
|
4062
|
+
}), vo = { class: "flex flex-col gap-6" }, go = {
|
|
3937
4063
|
key: 0,
|
|
3938
4064
|
class: "text-sm text-gray-500 flex items-center gap-1.5 -mb-2"
|
|
3939
|
-
},
|
|
4065
|
+
}, yo = { class: "flex items-center justify-between" }, bo = ["onClick"], ho = ["src"], _o = { class: "text-xs font-semibold uppercase bg-gray-100 rounded px-2 py-1" }, wo = { class: "font-medium" }, xo = {
|
|
3940
4066
|
key: 0,
|
|
3941
4067
|
class: "flex gap-8 my-6"
|
|
3942
|
-
},
|
|
4068
|
+
}, To = { class: "flex-1 min-w-0 flex flex-col gap-6" }, Io = { class: "grid grid-cols-2 gap-6" }, Co = {
|
|
3943
4069
|
key: 0,
|
|
3944
4070
|
class: "flex flex-col gap-2"
|
|
3945
|
-
},
|
|
4071
|
+
}, Fo = { class: "flex items-end gap-3" }, So = {
|
|
3946
4072
|
key: 0,
|
|
3947
4073
|
class: "flex flex-wrap gap-2"
|
|
3948
|
-
},
|
|
4074
|
+
}, ko = { class: "w-[300px] flex-shrink-0 flex flex-col gap-4" }, No = {
|
|
3949
4075
|
key: 0,
|
|
3950
4076
|
class: "flex flex-col gap-2"
|
|
3951
|
-
},
|
|
4077
|
+
}, Vo = { class: "flex gap-1.5" }, Eo = ["onClick"], Do = { class: "bg-gray-50 rounded-lg flex items-center justify-center py-10 px-6 min-h-[160px]" }, Oo = {
|
|
3952
4078
|
key: 0,
|
|
3953
4079
|
class: "bg-white rounded-lg shadow-sm px-5 py-2.5 max-w-full"
|
|
3954
|
-
},
|
|
4080
|
+
}, Po = { class: "text-sm font-semibold text-indigo-500 text-center break-words block" }, Uo = {
|
|
3955
4081
|
key: 0,
|
|
3956
4082
|
class: "text-xs text-gray-400 text-center break-words block mt-0.5"
|
|
3957
|
-
},
|
|
4083
|
+
}, Ao = {
|
|
3958
4084
|
key: 1,
|
|
3959
4085
|
class: "bg-white rounded-2xl shadow-sm px-5 py-4 flex flex-col items-start gap-2 min-w-[140px] max-w-[200px]"
|
|
3960
|
-
},
|
|
4086
|
+
}, Mo = ["src"], Ro = { class: "text-sm font-medium text-gray-800 text-left break-words" }, Bo = {
|
|
3961
4087
|
key: 2,
|
|
3962
4088
|
class: "text-xs text-gray-400 text-left break-words"
|
|
3963
|
-
},
|
|
4089
|
+
}, qo = {
|
|
3964
4090
|
key: 2,
|
|
3965
4091
|
class: "bg-white rounded-2xl shadow-md px-6 py-5 flex flex-col items-center gap-2 min-w-[140px] max-w-[200px]"
|
|
3966
|
-
},
|
|
4092
|
+
}, Go = ["src"], $o = { class: "text-base font-bold text-orange-500 text-center break-words" }, Lo = {
|
|
3967
4093
|
key: 2,
|
|
3968
4094
|
class: "text-xs text-gray-400 text-center break-words"
|
|
3969
|
-
},
|
|
4095
|
+
}, Yo = {
|
|
3970
4096
|
key: 1,
|
|
3971
4097
|
class: "flex flex-col gap-2"
|
|
3972
|
-
},
|
|
4098
|
+
}, jo = { class: "bg-gray-50 border rounded-lg flex flex-col items-center gap-3 py-6 px-4" }, Ho = ["src"], Ko = {
|
|
3973
4099
|
key: 1,
|
|
3974
4100
|
class: "text-xs font-medium text-gray-400"
|
|
3975
|
-
},
|
|
4101
|
+
}, Xo = { class: "border-4 border-red-500 rounded-lg p-3 flex items-center justify-center bg-white" }, Wo = { class: "text-center text-sm font-bold text-gray-900" }, zo = {
|
|
3976
4102
|
key: 2,
|
|
3977
4103
|
class: "text-center text-xs text-gray-500"
|
|
3978
|
-
},
|
|
4104
|
+
}, Qo = {
|
|
3979
4105
|
key: 1,
|
|
3980
4106
|
class: "text-gray-500"
|
|
3981
|
-
},
|
|
4107
|
+
}, Jo = {
|
|
3982
4108
|
key: 2,
|
|
3983
4109
|
class: "mt-2 flex gap-3"
|
|
3984
|
-
},
|
|
4110
|
+
}, Zo = /* @__PURE__ */ X({
|
|
3985
4111
|
__name: "PaymentCheckout",
|
|
3986
4112
|
props: {
|
|
3987
4113
|
terminal: {
|
|
@@ -3994,44 +4120,44 @@ const qt = [
|
|
|
3994
4120
|
}
|
|
3995
4121
|
},
|
|
3996
4122
|
setup(e) {
|
|
3997
|
-
const a = e, t = () => (a.terminal.paymentCheckouts ?? []).map((w) => ({ ...w })).sort((w,
|
|
3998
|
-
|
|
4123
|
+
const a = e, t = () => (a.terminal.paymentCheckouts ?? []).map((w) => ({ ...w })).sort((w, V) => (w.sortOrder ?? 0) - (V.sortOrder ?? 0)), l = T(t());
|
|
4124
|
+
ne(
|
|
3999
4125
|
() => a.terminal.paymentCheckouts,
|
|
4000
4126
|
() => {
|
|
4001
|
-
l.value = t(),
|
|
4127
|
+
l.value = t(), d.value = /* @__PURE__ */ new Set();
|
|
4002
4128
|
}
|
|
4003
4129
|
);
|
|
4004
4130
|
function o() {
|
|
4005
|
-
l.value.forEach((w,
|
|
4006
|
-
w.sortOrder =
|
|
4131
|
+
l.value.forEach((w, V) => {
|
|
4132
|
+
w.sortOrder = V;
|
|
4007
4133
|
});
|
|
4008
4134
|
}
|
|
4009
4135
|
const r = (w) => w.type === "ecr" || w.type === "ecr_qr", n = /* @__PURE__ */ new Set(["qr", "ecr_qr"]), c = (w) => n.has(w.type), s = {
|
|
4010
4136
|
card: "credit_card",
|
|
4011
4137
|
ecr: "credit_card"
|
|
4012
|
-
}, v = (w) => s[w.type] ?? null,
|
|
4138
|
+
}, v = (w) => s[w.type] ?? null, f = [
|
|
4013
4139
|
{ value: "pos_v7", label: "POS V7" },
|
|
4014
4140
|
{ value: "pos_v8", label: "POS V8" }
|
|
4015
|
-
],
|
|
4141
|
+
], p = [
|
|
4016
4142
|
{ value: "kiosk_v2", label: "KIOSK V2" }
|
|
4017
|
-
], i = a.terminal.deviceType === "KIOSK" ?
|
|
4018
|
-
function k(w,
|
|
4019
|
-
|
|
4143
|
+
], i = a.terminal.deviceType === "KIOSK" ? p : f, u = i[0].value, m = T({}), g = (w) => m.value[w.id] ?? u;
|
|
4144
|
+
function k(w, V) {
|
|
4145
|
+
m.value = { ...m.value, [w.id]: V };
|
|
4020
4146
|
}
|
|
4021
|
-
const
|
|
4147
|
+
const d = T(/* @__PURE__ */ new Set()), C = (w) => d.value.has(w.id);
|
|
4022
4148
|
function B(w) {
|
|
4023
|
-
const
|
|
4024
|
-
|
|
4149
|
+
const V = new Set(d.value);
|
|
4150
|
+
V.has(w.id) ? V.delete(w.id) : V.add(w.id), d.value = V;
|
|
4025
4151
|
}
|
|
4026
|
-
const
|
|
4027
|
-
function
|
|
4028
|
-
const
|
|
4029
|
-
if (!
|
|
4152
|
+
const M = T({});
|
|
4153
|
+
function $(w) {
|
|
4154
|
+
const V = (M.value[w.id] ?? "").trim().toUpperCase();
|
|
4155
|
+
if (!V) return;
|
|
4030
4156
|
const U = w.fallbackCardTypes ?? [];
|
|
4031
|
-
U.includes(
|
|
4157
|
+
U.includes(V) || (w.fallbackCardTypes = [...U, V]), M.value[w.id] = "";
|
|
4032
4158
|
}
|
|
4033
|
-
function Z(w,
|
|
4034
|
-
const U = (w.fallbackCardTypes ?? []).filter((
|
|
4159
|
+
function Z(w, V) {
|
|
4160
|
+
const U = (w.fallbackCardTypes ?? []).filter((L) => L !== V);
|
|
4035
4161
|
w.fallbackCardTypes = U.length > 0 ? U : null;
|
|
4036
4162
|
}
|
|
4037
4163
|
const j = {
|
|
@@ -4044,8 +4170,8 @@ const qt = [
|
|
|
4044
4170
|
async function ee() {
|
|
4045
4171
|
await a.onUpdate(a.terminal, l.value);
|
|
4046
4172
|
}
|
|
4047
|
-
const N =
|
|
4048
|
-
function
|
|
4173
|
+
const N = $a();
|
|
4174
|
+
function S() {
|
|
4049
4175
|
Ka(
|
|
4050
4176
|
N,
|
|
4051
4177
|
"Reset Payment Checkout",
|
|
@@ -4055,20 +4181,20 @@ const qt = [
|
|
|
4055
4181
|
}
|
|
4056
4182
|
);
|
|
4057
4183
|
}
|
|
4058
|
-
return (w,
|
|
4059
|
-
const U =
|
|
4060
|
-
return y(),
|
|
4061
|
-
l.value.length > 0 ? (y(),
|
|
4062
|
-
|
|
4184
|
+
return (w, V) => {
|
|
4185
|
+
const U = h("FmIcon"), L = h("FmTooltip"), W = h("FmSwitch"), Y = h("FmTextField"), _e = h("FmButton"), se = h("FmChip");
|
|
4186
|
+
return y(), E("div", vo, [
|
|
4187
|
+
l.value.length > 0 ? (y(), E("p", go, [
|
|
4188
|
+
V[2] || (V[2] = Ue(" Drag the ", -1)),
|
|
4063
4189
|
b(U, {
|
|
4064
4190
|
class: "text-gray-400 mx-0.5",
|
|
4065
4191
|
name: "drag_indicator"
|
|
4066
4192
|
}),
|
|
4067
|
-
|
|
4193
|
+
V[3] || (V[3] = Ue(" handle to reorder payment checkouts ", -1))
|
|
4068
4194
|
])) : R("", !0),
|
|
4069
|
-
b(
|
|
4195
|
+
b(A(fo), {
|
|
4070
4196
|
modelValue: l.value,
|
|
4071
|
-
"onUpdate:modelValue":
|
|
4197
|
+
"onUpdate:modelValue": V[1] || (V[1] = (I) => l.value = I),
|
|
4072
4198
|
handle: ".checkout-drag-handle",
|
|
4073
4199
|
class: "flex flex-col gap-6",
|
|
4074
4200
|
"drag-class": "dragging-card",
|
|
@@ -4076,11 +4202,11 @@ const qt = [
|
|
|
4076
4202
|
onEnd: o
|
|
4077
4203
|
}, {
|
|
4078
4204
|
default: ae(() => [
|
|
4079
|
-
(y(!0),
|
|
4205
|
+
(y(!0), E(re, null, ge(l.value, (I) => (y(), E("div", {
|
|
4080
4206
|
key: I.id,
|
|
4081
4207
|
class: Ht(["border rounded-lg px-6 flex flex-col gap-4", C(I) ? "py-6" : "py-3"])
|
|
4082
4208
|
}, [
|
|
4083
|
-
x("div",
|
|
4209
|
+
x("div", yo, [
|
|
4084
4210
|
x("div", {
|
|
4085
4211
|
class: "flex items-center gap-3 flex-1 cursor-pointer select-none",
|
|
4086
4212
|
onClick: (H) => B(I)
|
|
@@ -4088,14 +4214,14 @@ const qt = [
|
|
|
4088
4214
|
b(U, {
|
|
4089
4215
|
class: "checkout-drag-handle cursor-grab text-gray-400",
|
|
4090
4216
|
name: "drag_indicator",
|
|
4091
|
-
onClick:
|
|
4217
|
+
onClick: V[0] || (V[0] = Ma(() => {
|
|
4092
4218
|
}, ["stop"]))
|
|
4093
4219
|
}),
|
|
4094
4220
|
b(U, {
|
|
4095
4221
|
class: "text-gray-400",
|
|
4096
4222
|
name: C(I) ? "expand_less" : "expand_more"
|
|
4097
4223
|
}, null, 8, ["name"]),
|
|
4098
|
-
b(
|
|
4224
|
+
b(L, {
|
|
4099
4225
|
variant: "plain",
|
|
4100
4226
|
placement: "top",
|
|
4101
4227
|
content: I.gateway,
|
|
@@ -4104,53 +4230,53 @@ const qt = [
|
|
|
4104
4230
|
default: ae(() => [
|
|
4105
4231
|
x("img", {
|
|
4106
4232
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
4107
|
-
src:
|
|
4108
|
-
}, null, 8,
|
|
4233
|
+
src: A(Ha)(I.gateway.toUpperCase())
|
|
4234
|
+
}, null, 8, ho)
|
|
4109
4235
|
]),
|
|
4110
4236
|
_: 2
|
|
4111
4237
|
}, 1032, ["content"]),
|
|
4112
|
-
x("span",
|
|
4113
|
-
x("span",
|
|
4114
|
-
], 8,
|
|
4238
|
+
x("span", _o, pe(j[I.type] ?? I.type), 1),
|
|
4239
|
+
x("span", wo, pe(me(I)), 1)
|
|
4240
|
+
], 8, bo),
|
|
4115
4241
|
b(W, {
|
|
4116
4242
|
modelValue: I.enabled,
|
|
4117
4243
|
"onUpdate:modelValue": (H) => I.enabled = H,
|
|
4118
4244
|
label: "Enabled"
|
|
4119
4245
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4120
4246
|
]),
|
|
4121
|
-
C(I) ? (y(),
|
|
4122
|
-
x("div",
|
|
4123
|
-
x("div",
|
|
4124
|
-
b(
|
|
4247
|
+
C(I) ? (y(), E("div", xo, [
|
|
4248
|
+
x("div", To, [
|
|
4249
|
+
x("div", Io, [
|
|
4250
|
+
b(Y, {
|
|
4125
4251
|
modelValue: I.displayName,
|
|
4126
4252
|
"onUpdate:modelValue": (H) => I.displayName = H,
|
|
4127
4253
|
label: "Display Name"
|
|
4128
4254
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
4129
|
-
b(
|
|
4255
|
+
b(Y, {
|
|
4130
4256
|
modelValue: I.subtitle,
|
|
4131
4257
|
"onUpdate:modelValue": (H) => I.subtitle = H,
|
|
4132
4258
|
label: "Subtitle",
|
|
4133
4259
|
"label-mark": "optional"
|
|
4134
4260
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
4135
|
-
b(
|
|
4261
|
+
b(Y, {
|
|
4136
4262
|
modelValue: I.icon,
|
|
4137
4263
|
"onUpdate:modelValue": (H) => I.icon = H,
|
|
4138
4264
|
label: "Icon URL",
|
|
4139
4265
|
"label-mark": "optional"
|
|
4140
4266
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
4141
|
-
b(
|
|
4267
|
+
b(Y, {
|
|
4142
4268
|
modelValue: I.paymentDescription,
|
|
4143
4269
|
"onUpdate:modelValue": (H) => I.paymentDescription = H,
|
|
4144
4270
|
label: "Payment Description",
|
|
4145
4271
|
"label-mark": "optional"
|
|
4146
4272
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
4147
|
-
b(
|
|
4273
|
+
b(Y, {
|
|
4148
4274
|
modelValue: I.paymentTagline,
|
|
4149
4275
|
"onUpdate:modelValue": (H) => I.paymentTagline = H,
|
|
4150
4276
|
label: "Payment Tagline",
|
|
4151
4277
|
"label-mark": "optional"
|
|
4152
4278
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
4153
|
-
b(
|
|
4279
|
+
b(Y, {
|
|
4154
4280
|
modelValue: I.receiptPaymentName,
|
|
4155
4281
|
"onUpdate:modelValue": (H) => I.receiptPaymentName = H,
|
|
4156
4282
|
label: "Receipt Payment Name",
|
|
@@ -4158,24 +4284,24 @@ const qt = [
|
|
|
4158
4284
|
"label-mark": "optional"
|
|
4159
4285
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4160
4286
|
]),
|
|
4161
|
-
r(I) ? (y(),
|
|
4162
|
-
x("div",
|
|
4163
|
-
b(
|
|
4164
|
-
modelValue:
|
|
4165
|
-
"onUpdate:modelValue": (H) =>
|
|
4287
|
+
r(I) ? (y(), E("div", Co, [
|
|
4288
|
+
x("div", Fo, [
|
|
4289
|
+
b(Y, {
|
|
4290
|
+
modelValue: M.value[I.id],
|
|
4291
|
+
"onUpdate:modelValue": (H) => M.value[I.id] = H,
|
|
4166
4292
|
class: "flex-1",
|
|
4167
4293
|
label: "Fallback Card Types",
|
|
4168
4294
|
"label-info": "Cards offered when a transaction falls back to the reconcile dialog. Default VISA, MASTERCARD.",
|
|
4169
4295
|
"label-mark": "optional",
|
|
4170
|
-
onKeyup: Ra((H) =>
|
|
4296
|
+
onKeyup: Ra((H) => $(I), ["enter"])
|
|
4171
4297
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]),
|
|
4172
4298
|
b(_e, {
|
|
4173
4299
|
icon: "add",
|
|
4174
|
-
onClick: (H) =>
|
|
4300
|
+
onClick: (H) => $(I)
|
|
4175
4301
|
}, null, 8, ["onClick"])
|
|
4176
4302
|
]),
|
|
4177
|
-
(I.fallbackCardTypes ?? []).length > 0 ? (y(),
|
|
4178
|
-
(y(!0),
|
|
4303
|
+
(I.fallbackCardTypes ?? []).length > 0 ? (y(), E("div", So, [
|
|
4304
|
+
(y(!0), E(re, null, ge(I.fallbackCardTypes ?? [], (H) => (y(), F(se, {
|
|
4179
4305
|
key: H,
|
|
4180
4306
|
label: H,
|
|
4181
4307
|
removable: !0,
|
|
@@ -4184,67 +4310,67 @@ const qt = [
|
|
|
4184
4310
|
])) : R("", !0)
|
|
4185
4311
|
])) : R("", !0)
|
|
4186
4312
|
]),
|
|
4187
|
-
x("div",
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
x("div",
|
|
4191
|
-
(y(!0),
|
|
4313
|
+
x("div", ko, [
|
|
4314
|
+
A(i).length > 1 ? (y(), E("div", No, [
|
|
4315
|
+
V[4] || (V[4] = x("span", { class: "text-xs font-medium text-gray-500" }, "Preview on", -1)),
|
|
4316
|
+
x("div", Vo, [
|
|
4317
|
+
(y(!0), E(re, null, ge(A(i), (H) => (y(), E("button", {
|
|
4192
4318
|
key: H.value,
|
|
4193
4319
|
type: "button",
|
|
4194
4320
|
class: Ht([
|
|
4195
4321
|
"rounded-md px-2.5 py-1 text-xs font-medium transition-colors mb-2",
|
|
4196
4322
|
g(I) === H.value ? "bg-orange-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"
|
|
4197
4323
|
]),
|
|
4198
|
-
onClick: (
|
|
4199
|
-
}, pe(H.label), 11,
|
|
4324
|
+
onClick: (tr) => k(I, H.value)
|
|
4325
|
+
}, pe(H.label), 11, Eo))), 128))
|
|
4200
4326
|
])
|
|
4201
4327
|
])) : R("", !0),
|
|
4202
|
-
x("div",
|
|
4203
|
-
g(I) === "pos_v7" ? (y(),
|
|
4204
|
-
x("span",
|
|
4205
|
-
I.subtitle ? (y(),
|
|
4206
|
-
])) : g(I) === "pos_v8" ? (y(),
|
|
4207
|
-
I.icon ? (y(),
|
|
4328
|
+
x("div", Do, [
|
|
4329
|
+
g(I) === "pos_v7" ? (y(), E("div", Oo, [
|
|
4330
|
+
x("span", Po, pe(I.displayName || "Payment Method"), 1),
|
|
4331
|
+
I.subtitle ? (y(), E("span", Uo, pe(I.subtitle), 1)) : R("", !0)
|
|
4332
|
+
])) : g(I) === "pos_v8" ? (y(), E("div", Ao, [
|
|
4333
|
+
I.icon ? (y(), E("img", {
|
|
4208
4334
|
key: 0,
|
|
4209
4335
|
src: I.icon,
|
|
4210
4336
|
class: "w-9 h-9 object-contain"
|
|
4211
|
-
}, null, 8,
|
|
4337
|
+
}, null, 8, Mo)) : v(I) ? (y(), F(U, {
|
|
4212
4338
|
key: 1,
|
|
4213
4339
|
class: "text-gray-700 text-2xl",
|
|
4214
4340
|
name: v(I)
|
|
4215
4341
|
}, null, 8, ["name"])) : R("", !0),
|
|
4216
|
-
x("span",
|
|
4217
|
-
I.subtitle ? (y(),
|
|
4218
|
-
])) : (y(),
|
|
4219
|
-
I.icon ? (y(),
|
|
4342
|
+
x("span", Ro, pe(I.displayName || "Payment Method"), 1),
|
|
4343
|
+
I.subtitle ? (y(), E("span", Bo, pe(I.subtitle), 1)) : R("", !0)
|
|
4344
|
+
])) : (y(), E("div", qo, [
|
|
4345
|
+
I.icon ? (y(), E("img", {
|
|
4220
4346
|
key: 0,
|
|
4221
4347
|
src: I.icon,
|
|
4222
4348
|
class: "w-9 h-9 object-contain"
|
|
4223
|
-
}, null, 8,
|
|
4349
|
+
}, null, 8, Go)) : v(I) ? (y(), F(U, {
|
|
4224
4350
|
key: 1,
|
|
4225
4351
|
class: "text-orange-500 text-3xl",
|
|
4226
4352
|
name: v(I)
|
|
4227
4353
|
}, null, 8, ["name"])) : R("", !0),
|
|
4228
|
-
x("span",
|
|
4229
|
-
I.subtitle ? (y(),
|
|
4354
|
+
x("span", $o, pe(I.displayName || "Payment Method"), 1),
|
|
4355
|
+
I.subtitle ? (y(), E("span", Lo, pe(I.subtitle), 1)) : R("", !0)
|
|
4230
4356
|
]))
|
|
4231
4357
|
]),
|
|
4232
|
-
c(I) ? (y(),
|
|
4233
|
-
|
|
4234
|
-
x("div",
|
|
4235
|
-
I.icon ? (y(),
|
|
4358
|
+
c(I) ? (y(), E("div", Yo, [
|
|
4359
|
+
V[5] || (V[5] = x("span", { class: "mt-2 text-xs font-medium text-gray-500" }, "Payment QR Screen", -1)),
|
|
4360
|
+
x("div", jo, [
|
|
4361
|
+
I.icon ? (y(), E("img", {
|
|
4236
4362
|
key: 0,
|
|
4237
4363
|
src: I.icon,
|
|
4238
4364
|
class: "h-6 object-contain"
|
|
4239
|
-
}, null, 8,
|
|
4240
|
-
x("div",
|
|
4365
|
+
}, null, 8, Ho)) : (y(), E("span", Ko, pe(I.gateway), 1)),
|
|
4366
|
+
x("div", Xo, [
|
|
4241
4367
|
b(U, {
|
|
4242
4368
|
name: "qr_code_2",
|
|
4243
4369
|
class: "text-6xl text-gray-800"
|
|
4244
4370
|
})
|
|
4245
4371
|
]),
|
|
4246
|
-
x("p",
|
|
4247
|
-
I.paymentTagline ? (y(),
|
|
4372
|
+
x("p", Wo, pe(I.paymentDescription || "Payment description"), 1),
|
|
4373
|
+
I.paymentTagline ? (y(), E("p", zo, pe(I.paymentTagline), 1)) : R("", !0)
|
|
4248
4374
|
])
|
|
4249
4375
|
])) : R("", !0)
|
|
4250
4376
|
])
|
|
@@ -4253,13 +4379,13 @@ const qt = [
|
|
|
4253
4379
|
]),
|
|
4254
4380
|
_: 1
|
|
4255
4381
|
}, 8, ["modelValue"]),
|
|
4256
|
-
l.value.length === 0 ? (y(),
|
|
4257
|
-
l.value.length > 0 ? (y(),
|
|
4382
|
+
l.value.length === 0 ? (y(), E("div", Qo, " No payment methods configured for this terminal. ")) : R("", !0),
|
|
4383
|
+
l.value.length > 0 ? (y(), E("div", Jo, [
|
|
4258
4384
|
b(_e, {
|
|
4259
4385
|
variant: "secondary",
|
|
4260
4386
|
label: "Reset",
|
|
4261
4387
|
icon: "restart_alt",
|
|
4262
|
-
onclick:
|
|
4388
|
+
onclick: S
|
|
4263
4389
|
}),
|
|
4264
4390
|
b(_e, {
|
|
4265
4391
|
variant: "primary",
|
|
@@ -4271,7 +4397,7 @@ const qt = [
|
|
|
4271
4397
|
]);
|
|
4272
4398
|
};
|
|
4273
4399
|
}
|
|
4274
|
-
}),
|
|
4400
|
+
}), er = /* @__PURE__ */ Xa(Zo, [["__scopeId", "data-v-936ac426"]]), br = /* @__PURE__ */ X({
|
|
4275
4401
|
__name: "TerminalSetting",
|
|
4276
4402
|
props: {
|
|
4277
4403
|
terminalId: {
|
|
@@ -4282,19 +4408,19 @@ const qt = [
|
|
|
4282
4408
|
setup(e) {
|
|
4283
4409
|
const a = e, { tab: t } = wt({
|
|
4284
4410
|
tab: "information"
|
|
4285
|
-
}), { isLoading: l, startAsyncCall: o } = je(!0), r = qa(), n =
|
|
4286
|
-
async function s(u,
|
|
4411
|
+
}), { isLoading: l, startAsyncCall: o } = je(!0), r = qa(), n = $t(), c = T();
|
|
4412
|
+
async function s(u, m) {
|
|
4287
4413
|
o(async () => {
|
|
4288
4414
|
try {
|
|
4289
|
-
await
|
|
4415
|
+
await Me.updateById(a.terminalId, {
|
|
4290
4416
|
name: u.name,
|
|
4291
4417
|
status: u.status,
|
|
4292
4418
|
ecrs: u.ecrs ?? [],
|
|
4293
4419
|
gateways: u.gateways ?? [],
|
|
4294
4420
|
ecrIntegrations: u.ecrIntegrations ?? [],
|
|
4295
4421
|
qrIntegrations: u.qrIntegrations ?? [],
|
|
4296
|
-
...
|
|
4297
|
-
}), c.value = await
|
|
4422
|
+
...m ? { paymentCheckouts: m } : {}
|
|
4423
|
+
}), c.value = await Me.readById(a.terminalId), n.open({
|
|
4298
4424
|
type: "success",
|
|
4299
4425
|
message: "Terminal updated successfully"
|
|
4300
4426
|
});
|
|
@@ -4331,56 +4457,56 @@ const qt = [
|
|
|
4331
4457
|
label: "ECR Gateway",
|
|
4332
4458
|
value: "ecr",
|
|
4333
4459
|
icon: "point_of_sale",
|
|
4334
|
-
render:
|
|
4460
|
+
render: vl,
|
|
4335
4461
|
onlyFor: ["POS", "KIOSK"]
|
|
4336
4462
|
},
|
|
4337
4463
|
{
|
|
4338
4464
|
label: "QR Gateway",
|
|
4339
4465
|
value: "qr",
|
|
4340
4466
|
icon: "qr_code",
|
|
4341
|
-
render:
|
|
4467
|
+
render: wl,
|
|
4342
4468
|
onlyFor: ["POS", "KIOSK"]
|
|
4343
4469
|
},
|
|
4344
4470
|
{
|
|
4345
4471
|
label: "Payment Checkout",
|
|
4346
4472
|
value: "payment-checkout",
|
|
4347
4473
|
icon: "tune",
|
|
4348
|
-
render:
|
|
4474
|
+
render: er,
|
|
4349
4475
|
onlyFor: ["KIOSK", "POS"]
|
|
4350
4476
|
}
|
|
4351
4477
|
];
|
|
4352
4478
|
xt().currentCountry;
|
|
4353
|
-
const
|
|
4479
|
+
const f = K(() => {
|
|
4354
4480
|
var u;
|
|
4355
|
-
return (u = v.find((
|
|
4481
|
+
return (u = v.find((m) => m.value === t.value)) == null ? void 0 : u.render;
|
|
4356
4482
|
});
|
|
4357
|
-
async function
|
|
4483
|
+
async function p() {
|
|
4358
4484
|
o(async () => {
|
|
4359
|
-
c.value = await
|
|
4485
|
+
c.value = await Me.readById(a.terminalId);
|
|
4360
4486
|
});
|
|
4361
4487
|
}
|
|
4362
4488
|
const i = K(() => v.filter(
|
|
4363
4489
|
(u) => {
|
|
4364
|
-
var
|
|
4365
|
-
return !u.onlyFor || u.onlyFor.includes(((
|
|
4490
|
+
var m;
|
|
4491
|
+
return !u.onlyFor || u.onlyFor.includes(((m = c.value) == null ? void 0 : m.deviceType) ?? "");
|
|
4366
4492
|
}
|
|
4367
4493
|
));
|
|
4368
|
-
return ie(
|
|
4369
|
-
var k,
|
|
4370
|
-
const g =
|
|
4371
|
-
return y(),
|
|
4372
|
-
title: `${(k = c.value) == null ? void 0 : k.deviceType} (${(
|
|
4373
|
-
loading:
|
|
4374
|
-
onBack:
|
|
4494
|
+
return ie(p), (u, m) => {
|
|
4495
|
+
var k, d;
|
|
4496
|
+
const g = h("FmTabs");
|
|
4497
|
+
return y(), F(Ga, {
|
|
4498
|
+
title: `${(k = c.value) == null ? void 0 : k.deviceType} (${(d = c.value) == null ? void 0 : d._id})`,
|
|
4499
|
+
loading: A(l),
|
|
4500
|
+
onBack: A(r).back
|
|
4375
4501
|
}, {
|
|
4376
4502
|
default: ae(() => [
|
|
4377
4503
|
b(g, {
|
|
4378
|
-
"model-value":
|
|
4379
|
-
"onUpdate:modelValue":
|
|
4504
|
+
"model-value": A(t),
|
|
4505
|
+
"onUpdate:modelValue": m[0] || (m[0] = (C) => Ae(t) ? t.value = C : null),
|
|
4380
4506
|
class: "mb-6",
|
|
4381
4507
|
items: i.value
|
|
4382
4508
|
}, null, 8, ["model-value", "items"]),
|
|
4383
|
-
|
|
4509
|
+
A(t) ? (y(), F(bt(f.value), ht(_t({ key: 0 }, {
|
|
4384
4510
|
terminal: c.value,
|
|
4385
4511
|
onUpdate: s
|
|
4386
4512
|
})), null, 16)) : R("", !0)
|
|
@@ -4391,5 +4517,5 @@ const qt = [
|
|
|
4391
4517
|
}
|
|
4392
4518
|
});
|
|
4393
4519
|
export {
|
|
4394
|
-
|
|
4520
|
+
br as default
|
|
4395
4521
|
};
|