@feedmepos/mf-payment 1.2.27 → 1.2.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/OnboardForm-BwHRuUJ2.js +709 -0
  2. package/dist/OnboardForm-DtdgTAfM.js +671 -0
  3. package/dist/OnboardSubmission-Cuzay_2u.js +148 -0
  4. package/dist/OnboardSubmission-TvoVrbT8.js +146 -0
  5. package/dist/{PDFViewer-xrBtzrlR.js → PDFViewer-DlSCBBxr.js} +14 -12
  6. package/dist/{PayoutAccount-mlaDc7_i.js → PayoutAccount-DM-Uh5AW.js} +8 -7
  7. package/dist/{PayoutAccount-DI5YpzGm.js → PayoutAccount-D_oz3IN_.js} +5 -5
  8. package/dist/{PayoutAccountSetting-IgBRFN0A.js → PayoutAccountSetting-CUlmHkw3.js} +4 -4
  9. package/dist/{Restaurant-CIGhOFvk.js → Restaurant-DDebeSrf.js} +4 -4
  10. package/dist/{RestaurantSetting-0CbusLcz.js → RestaurantSetting-Cf63FkWQ.js} +291 -222
  11. package/dist/{Settlement-DmG5-VSP.js → Settlement-C_V-iTDy.js} +3 -3
  12. package/dist/{Settlement-CUmpNHMN.js → Settlement-CctMzPsZ.js} +3 -3
  13. package/dist/{SettlementTransactions-DhjGSAg4.js → SettlementTransactions-9p3tYV0n.js} +3 -3
  14. package/dist/{SettlementTransactions-CcMUINyi.js → SettlementTransactions-DYvhz0Yh.js} +3 -3
  15. package/dist/Status.vue_vue_type_script_setup_true_lang-wrcEbNj3.js +29 -0
  16. package/dist/{Terminal-KE_9M2jr.js → Terminal-D3QDgPY6.js} +5 -5
  17. package/dist/{TerminalSetting-DdJl_9JJ.js → TerminalSetting-ehm_sRqf.js} +3 -3
  18. package/dist/{Transaction-E9_hSpx4.js → Transaction-DIz_ArbY.js} +6 -6
  19. package/dist/{Transaction-CA9RQ8qT.js → Transaction-DzIzAIbO.js} +5 -5
  20. package/dist/{TransactionOld-lPUiTl8n.js → TransactionOld-CagUKhjR.js} +4 -4
  21. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-B03g8Jum.js → TransactionTable.vue_vue_type_script_setup_true_lang-ChuhuUKc.js} +3 -3
  22. package/dist/api/index.d.ts +1 -0
  23. package/dist/api/onboard-submission/index.d.ts +17 -0
  24. package/dist/api/payment-gateway/index.d.ts +3 -1
  25. package/dist/api/payout/index.d.ts +1 -0
  26. package/dist/{app-BohCgZld.js → app-DB_fctP1.js} +212 -131
  27. package/dist/app.d.ts +46 -0
  28. package/dist/app.js +1 -1
  29. package/dist/{assets-Dttfej_E.js → assets-ha4XB2PU.js} +1 -1
  30. package/dist/{grafana-DCGA3gMb.js → grafana-DRZOKr8c.js} +1 -1
  31. package/dist/{index-BQtW6X1l.js → index-8Xu0hCTB.js} +1 -1
  32. package/dist/{index-CZKvrBM7.js → index-B6GVzj7l.js} +1 -1
  33. package/dist/{index-tCobqIDD.js → index-BasdAonL.js} +4930 -4857
  34. package/dist/{index-BOwfUR6x.js → index-DGF3hKwg.js} +1 -1
  35. package/dist/{index-BYLzp2JB.js → index-Dg_mEOso.js} +1 -1
  36. package/dist/{index-JCMXdVSJ.js → index-DoD23lHB.js} +8 -1
  37. package/dist/index-MqVn-IaA.js +68 -0
  38. package/dist/{index.vue_vue_type_script_setup_true_lang-DpAWcXVU.js → index.vue_vue_type_script_setup_true_lang-D4bLM6th.js} +1 -1
  39. package/dist/modules.d.ts +1 -0
  40. package/dist/package.json +9 -8
  41. package/dist/payout-account-6yMkxM2O.js +458 -0
  42. package/dist/plugins-BLG_oAxW.js +1366 -0
  43. package/dist/stores/payoutAccount.d.ts +16 -16
  44. package/dist/style.css +1 -1
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/views/admin/onboard-submission/OnboardForm.vue.d.ts +12 -0
  47. package/dist/views/admin/onboard-submission/OnboardSubmission.vue.d.ts +2 -0
  48. package/dist/views/admin/onboard-submission/cell/SignatureBoard.vue.d.ts +10 -0
  49. package/dist/views/admin/onboard-submission/cell/Status.vue.d.ts +5 -0
  50. package/dist/views/admin/onboard-submission/cell/UploadButton.vue.d.ts +11 -0
  51. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +81 -0
  52. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +16 -16
  53. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +20 -20
  54. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +20 -20
  55. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +16 -16
  56. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +16 -16
  57. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +20 -20
  58. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  59. package/dist/views/admin/restaurant/tabs/LocalIntegration.vue.d.ts +803 -0
  60. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
  61. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  62. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  63. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  64. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
  65. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +8 -8
  66. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  67. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
  68. package/dist/views/onboard-submission/OnboardForm.vue.d.ts +14 -0
  69. package/dist/views/onboard-submission/OnboardSubmission.vue.d.ts +2 -0
  70. package/dist/views/onboard-submission/cell/SignatureBoard.vue.d.ts +10 -0
  71. package/dist/views/onboard-submission/cell/UploadButton.vue.d.ts +11 -0
  72. package/dist/views/onboard-submission/form/SoftSpaceSubmission.vue.d.ts +5 -0
  73. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +32 -32
  74. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +48 -48
  75. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +24 -24
  76. package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
  77. package/package.json +9 -8
  78. package/dist/payout-account-rJmG1Gi5.js +0 -1819
@@ -1,6 +1,6 @@
1
1
  import { ref as b, watch as w } from "vue";
2
2
  import { useRoute as A, useRouter as m } from "vue-router";
3
- import { a as y } from "./index-tCobqIDD.js";
3
+ import { a as y } from "./index-BasdAonL.js";
4
4
  var d = {};
5
5
  (function(s) {
6
6
  (function(c) {
@@ -1,4 +1,4 @@
1
- import { g as r, b as i, i as c, l as d, j as y, h as l, r as m } from "./index-tCobqIDD.js";
1
+ import { g as r, b as i, i as c, l as d, j as y, h as l, r as m } from "./index-BasdAonL.js";
2
2
  import { h as o } from "./moment-h96o7c8I.js";
3
3
  import { d as f } from "./dinero-CIVmXLL-.js";
4
4
  function* p(t, n) {
@@ -1,4 +1,4 @@
1
- import { d as e, b as n, g as s, f as u } from "./index-tCobqIDD.js";
1
+ import { d as e, b as n, g as s, f as u } from "./index-BasdAonL.js";
2
2
  const o = {
3
3
  async read(a) {
4
4
  return e(
@@ -65,6 +65,13 @@ const o = {
65
65
  `/payout-accounts/${a}/channels`
66
66
  )
67
67
  );
68
+ },
69
+ async readByRestaurantId(a) {
70
+ return s(
71
+ await n().get(
72
+ `/restaurants/${a}/payout-account`
73
+ )
74
+ );
68
75
  }
69
76
  };
70
77
  export {
@@ -0,0 +1,68 @@
1
+ import { d as o, b as t, g as n, o as i } from "./index-BasdAonL.js";
2
+ import { f as u } from "./plugins-BLG_oAxW.js";
3
+ import { h as d } from "./moment-h96o7c8I.js";
4
+ const c = {
5
+ async read(s) {
6
+ return o(
7
+ await t().get("/payments/onboard-submissions", {
8
+ params: { ...s }
9
+ })
10
+ );
11
+ },
12
+ async readById(s) {
13
+ return n(
14
+ await t().get(`/payments/onboard-submissions/${s}`)
15
+ );
16
+ },
17
+ async reviewById(s, a) {
18
+ return n(
19
+ await t().put(`/payments/onboard-submissions/${s}`, a)
20
+ );
21
+ },
22
+ async getById(s, a) {
23
+ return n(
24
+ await t().get(
25
+ `restaurants/${a}/onboard-submissions/${s}`
26
+ )
27
+ );
28
+ },
29
+ async getByRestaurant(s) {
30
+ return n(
31
+ await t().get(
32
+ `restaurants/${s}/onboard-submissions`
33
+ )
34
+ );
35
+ },
36
+ async uploadDocument(s, a, e) {
37
+ const r = d().toISOString();
38
+ return u.update(
39
+ `restaurant/${s}/documents/${a}/${r}.pdf`,
40
+ e
41
+ );
42
+ },
43
+ async updateSubmission(s) {
44
+ return n(
45
+ await t().put(
46
+ `restaurants/${s.restaurantId}/onboard-submissions`,
47
+ s
48
+ )
49
+ );
50
+ },
51
+ async previewDocument(s, a) {
52
+ const e = await t().get(
53
+ `restaurants/${s}/onboard-submissions/${a}/document`,
54
+ { responseType: "blob" }
55
+ );
56
+ i(e.data);
57
+ },
58
+ async sendDocument(s, a) {
59
+ return n(
60
+ await t().post(
61
+ `restaurants/${s}/onboard-submissions/${a}/send`
62
+ )
63
+ );
64
+ }
65
+ };
66
+ export {
67
+ c as o
68
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as U, ref as r, resolveComponent as p, openBlock as f, createBlock as S, withCtx as z, createVNode as m, createElementVNode as s, normalizeStyle as j, createElementBlock as M, Fragment as N, renderList as E, computed as k, watch as I, onMounted as O, unref as D, toDisplayString as B, createCommentVNode as R, normalizeClass as G, nextTick as H } from "vue";
2
- import { u as J } from "./index-tCobqIDD.js";
2
+ import { u as J } from "./index-BasdAonL.js";
3
3
  import "@feedmepos/ui-library";
4
4
  const K = ["id"], L = /* @__PURE__ */ U({
5
5
  __name: "FmTableSelection",
@@ -0,0 +1 @@
1
+ declare module "vue-signature-pad";
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -33,8 +33,7 @@
33
33
  "@casl/ability": "^3.2.0",
34
34
  "@feedmepos/core": "^2.6.0",
35
35
  "@feedmepos/mf-common": "^1.26.8",
36
- "vue-i18n": "10.0.5",
37
- "@feedmepos/payment-entity": "^0.1.15",
36
+ "@feedmepos/payment-entity": "^0.1.22",
38
37
  "@feedmepos/ui-library": "^1.6.8",
39
38
  "axios": "^0.27.2",
40
39
  "buffer": "^6.0.3",
@@ -44,6 +43,10 @@
44
43
  "file-saver": "^2.0.5",
45
44
  "firebase": "^10.14.0",
46
45
  "google-maps": "^4.3.3",
46
+ "i18next": "^21.8.8",
47
+ "i18next-browser-languagedetector": "^6.1.4",
48
+ "i18next-http-backend": "^1.4.1",
49
+ "i18next-vue": "^2.0.0-beta.0",
47
50
  "jspdf": "^2.5.1",
48
51
  "jsurl": "^0.1.5",
49
52
  "jszip": "^3.10.1",
@@ -56,16 +59,14 @@
56
59
  "vue": "^3.2.25",
57
60
  "vue-advanced-cropper": "^2.8.6",
58
61
  "vue-country-flag-next": "^2.3.2",
62
+ "vue-i18n": "10.0.5",
59
63
  "vue-pdf-embed": "^2.1.0",
60
64
  "vue-router": "^4.2.5",
65
+ "vue-signature-pad": "^3.0.2",
61
66
  "vue3-lottie": "^2.2.3",
62
67
  "vuedraggable": "^4.1.0",
63
68
  "xlsx": "^0.18.5",
64
- "zod": "^3.23.8",
65
- "i18next": "^21.8.8",
66
- "i18next-browser-languagedetector": "^6.1.4",
67
- "i18next-http-backend": "^1.4.1",
68
- "i18next-vue": "^2.0.0-beta.0"
69
+ "zod": "^3.23.8"
69
70
  },
70
71
  "devDependencies": {
71
72
  "@babel/preset-env": "^7.22.10",
@@ -0,0 +1,458 @@
1
+ import { f as j } from "./plugins-BLG_oAxW.js";
2
+ import { c as st, a as it, B as at, p as E } from "./index-BasdAonL.js";
3
+ import { useCoreStore as ut } from "@feedmepos/mf-common";
4
+ import { _ as ot } from "./app-DB_fctP1.js";
5
+ var Q = { exports: {} };
6
+ (function(i, a) {
7
+ (function(t, m) {
8
+ i.exports = m();
9
+ })(st, function() {
10
+ var t = 1e3, m = 6e4, b = 36e5, O = "millisecond", v = "second", k = "minute", M = "hour", _ = "day", w = "week", p = "month", C = "quarter", T = "year", A = "date", V = "Invalid Date", tt = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, et = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, rt = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
11
+ var n = ["th", "st", "nd", "rd"], e = u % 100;
12
+ return "[" + u + (n[(e - 20) % 10] || n[e] || n[0]) + "]";
13
+ } }, B = function(u, n, e) {
14
+ var s = String(u);
15
+ return !s || s.length >= n ? u : "" + Array(n + 1 - s.length).join(e) + u;
16
+ }, nt = { s: B, z: function(u) {
17
+ var n = -u.utcOffset(), e = Math.abs(n), s = Math.floor(e / 60), r = e % 60;
18
+ return (n <= 0 ? "+" : "-") + B(s, 2, "0") + ":" + B(r, 2, "0");
19
+ }, m: function u(n, e) {
20
+ if (n.date() < e.date()) return -u(e, n);
21
+ var s = 12 * (e.year() - n.year()) + (e.month() - n.month()), r = n.clone().add(s, p), o = e - r < 0, f = n.clone().add(s + (o ? -1 : 1), p);
22
+ return +(-(s + (e - r) / (o ? r - f : f - r)) || 0);
23
+ }, a: function(u) {
24
+ return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
25
+ }, p: function(u) {
26
+ return { M: p, y: T, w, d: _, D: A, h: M, m: k, s: v, ms: O, Q: C }[u] || String(u || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(u) {
28
+ return u === void 0;
29
+ } }, I = "en", P = {};
30
+ P[I] = rt;
31
+ var z = "$isDayjsObject", Z = function(u) {
32
+ return u instanceof R || !(!u || !u[z]);
33
+ }, L = function u(n, e, s) {
34
+ var r;
35
+ if (!n) return I;
36
+ if (typeof n == "string") {
37
+ var o = n.toLowerCase();
38
+ P[o] && (r = o), e && (P[o] = e, r = o);
39
+ var f = n.split("-");
40
+ if (!r && f.length > 1) return u(f[0]);
41
+ } else {
42
+ var h = n.name;
43
+ P[h] = n, r = h;
44
+ }
45
+ return !s && r && (I = r), r || !s && I;
46
+ }, l = function(u, n) {
47
+ if (Z(u)) return u.clone();
48
+ var e = typeof n == "object" ? n : {};
49
+ return e.date = u, e.args = arguments, new R(e);
50
+ }, c = nt;
51
+ c.l = L, c.i = Z, c.w = function(u, n) {
52
+ return l(u, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
53
+ };
54
+ var R = function() {
55
+ function u(e) {
56
+ this.$L = L(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[z] = !0;
57
+ }
58
+ var n = u.prototype;
59
+ return n.parse = function(e) {
60
+ this.$d = function(s) {
61
+ var r = s.date, o = s.utc;
62
+ if (r === null) return /* @__PURE__ */ new Date(NaN);
63
+ if (c.u(r)) return /* @__PURE__ */ new Date();
64
+ if (r instanceof Date) return new Date(r);
65
+ if (typeof r == "string" && !/Z$/i.test(r)) {
66
+ var f = r.match(tt);
67
+ if (f) {
68
+ var h = f[2] - 1 || 0, d = (f[7] || "0").substring(0, 3);
69
+ return o ? new Date(Date.UTC(f[1], h, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, d)) : new Date(f[1], h, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, d);
70
+ }
71
+ }
72
+ return new Date(r);
73
+ }(e), this.init();
74
+ }, n.init = function() {
75
+ var e = this.$d;
76
+ this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
77
+ }, n.$utils = function() {
78
+ return c;
79
+ }, n.isValid = function() {
80
+ return this.$d.toString() !== V;
81
+ }, n.isSame = function(e, s) {
82
+ var r = l(e);
83
+ return this.startOf(s) <= r && r <= this.endOf(s);
84
+ }, n.isAfter = function(e, s) {
85
+ return l(e) < this.startOf(s);
86
+ }, n.isBefore = function(e, s) {
87
+ return this.endOf(s) < l(e);
88
+ }, n.$g = function(e, s, r) {
89
+ return c.u(e) ? this[s] : this.set(r, e);
90
+ }, n.unix = function() {
91
+ return Math.floor(this.valueOf() / 1e3);
92
+ }, n.valueOf = function() {
93
+ return this.$d.getTime();
94
+ }, n.startOf = function(e, s) {
95
+ var r = this, o = !!c.u(s) || s, f = c.p(e), h = function(N, g) {
96
+ var D = c.w(r.$u ? Date.UTC(r.$y, g, N) : new Date(r.$y, g, N), r);
97
+ return o ? D : D.endOf(_);
98
+ }, d = function(N, g) {
99
+ return c.w(r.toDate()[N].apply(r.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(g)), r);
100
+ }, $ = this.$W, S = this.$M, y = this.$D, U = "set" + (this.$u ? "UTC" : "");
101
+ switch (f) {
102
+ case T:
103
+ return o ? h(1, 0) : h(31, 11);
104
+ case p:
105
+ return o ? h(1, S) : h(0, S + 1);
106
+ case w:
107
+ var x = this.$locale().weekStart || 0, Y = ($ < x ? $ + 7 : $) - x;
108
+ return h(o ? y - Y : y + (6 - Y), S);
109
+ case _:
110
+ case A:
111
+ return d(U + "Hours", 0);
112
+ case M:
113
+ return d(U + "Minutes", 1);
114
+ case k:
115
+ return d(U + "Seconds", 2);
116
+ case v:
117
+ return d(U + "Milliseconds", 3);
118
+ default:
119
+ return this.clone();
120
+ }
121
+ }, n.endOf = function(e) {
122
+ return this.startOf(e, !1);
123
+ }, n.$set = function(e, s) {
124
+ var r, o = c.p(e), f = "set" + (this.$u ? "UTC" : ""), h = (r = {}, r[_] = f + "Date", r[A] = f + "Date", r[p] = f + "Month", r[T] = f + "FullYear", r[M] = f + "Hours", r[k] = f + "Minutes", r[v] = f + "Seconds", r[O] = f + "Milliseconds", r)[o], d = o === _ ? this.$D + (s - this.$W) : s;
125
+ if (o === p || o === T) {
126
+ var $ = this.clone().set(A, 1);
127
+ $.$d[h](d), $.init(), this.$d = $.set(A, Math.min(this.$D, $.daysInMonth())).$d;
128
+ } else h && this.$d[h](d);
129
+ return this.init(), this;
130
+ }, n.set = function(e, s) {
131
+ return this.clone().$set(e, s);
132
+ }, n.get = function(e) {
133
+ return this[c.p(e)]();
134
+ }, n.add = function(e, s) {
135
+ var r, o = this;
136
+ e = Number(e);
137
+ var f = c.p(s), h = function(S) {
138
+ var y = l(o);
139
+ return c.w(y.date(y.date() + Math.round(S * e)), o);
140
+ };
141
+ if (f === p) return this.set(p, this.$M + e);
142
+ if (f === T) return this.set(T, this.$y + e);
143
+ if (f === _) return h(1);
144
+ if (f === w) return h(7);
145
+ var d = (r = {}, r[k] = m, r[M] = b, r[v] = t, r)[f] || 1, $ = this.$d.getTime() + e * d;
146
+ return c.w($, this);
147
+ }, n.subtract = function(e, s) {
148
+ return this.add(-1 * e, s);
149
+ }, n.format = function(e) {
150
+ var s = this, r = this.$locale();
151
+ if (!this.isValid()) return r.invalidDate || V;
152
+ var o = e || "YYYY-MM-DDTHH:mm:ssZ", f = c.z(this), h = this.$H, d = this.$m, $ = this.$M, S = r.weekdays, y = r.months, U = r.meridiem, x = function(g, D, F, W) {
153
+ return g && (g[D] || g(s, o)) || F[D].slice(0, W);
154
+ }, Y = function(g) {
155
+ return c.s(h % 12 || 12, g, "0");
156
+ }, N = U || function(g, D, F) {
157
+ var W = g < 12 ? "AM" : "PM";
158
+ return F ? W.toLowerCase() : W;
159
+ };
160
+ return o.replace(et, function(g, D) {
161
+ return D || function(F) {
162
+ switch (F) {
163
+ case "YY":
164
+ return String(s.$y).slice(-2);
165
+ case "YYYY":
166
+ return c.s(s.$y, 4, "0");
167
+ case "M":
168
+ return $ + 1;
169
+ case "MM":
170
+ return c.s($ + 1, 2, "0");
171
+ case "MMM":
172
+ return x(r.monthsShort, $, y, 3);
173
+ case "MMMM":
174
+ return x(y, $);
175
+ case "D":
176
+ return s.$D;
177
+ case "DD":
178
+ return c.s(s.$D, 2, "0");
179
+ case "d":
180
+ return String(s.$W);
181
+ case "dd":
182
+ return x(r.weekdaysMin, s.$W, S, 2);
183
+ case "ddd":
184
+ return x(r.weekdaysShort, s.$W, S, 3);
185
+ case "dddd":
186
+ return S[s.$W];
187
+ case "H":
188
+ return String(h);
189
+ case "HH":
190
+ return c.s(h, 2, "0");
191
+ case "h":
192
+ return Y(1);
193
+ case "hh":
194
+ return Y(2);
195
+ case "a":
196
+ return N(h, d, !0);
197
+ case "A":
198
+ return N(h, d, !1);
199
+ case "m":
200
+ return String(d);
201
+ case "mm":
202
+ return c.s(d, 2, "0");
203
+ case "s":
204
+ return String(s.$s);
205
+ case "ss":
206
+ return c.s(s.$s, 2, "0");
207
+ case "SSS":
208
+ return c.s(s.$ms, 3, "0");
209
+ case "Z":
210
+ return f;
211
+ }
212
+ return null;
213
+ }(g) || f.replace(":", "");
214
+ });
215
+ }, n.utcOffset = function() {
216
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
+ }, n.diff = function(e, s, r) {
218
+ var o, f = this, h = c.p(s), d = l(e), $ = (d.utcOffset() - this.utcOffset()) * m, S = this - d, y = function() {
219
+ return c.m(f, d);
220
+ };
221
+ switch (h) {
222
+ case T:
223
+ o = y() / 12;
224
+ break;
225
+ case p:
226
+ o = y();
227
+ break;
228
+ case C:
229
+ o = y() / 3;
230
+ break;
231
+ case w:
232
+ o = (S - $) / 6048e5;
233
+ break;
234
+ case _:
235
+ o = (S - $) / 864e5;
236
+ break;
237
+ case M:
238
+ o = S / b;
239
+ break;
240
+ case k:
241
+ o = S / m;
242
+ break;
243
+ case v:
244
+ o = S / t;
245
+ break;
246
+ default:
247
+ o = S;
248
+ }
249
+ return r ? o : c.a(o);
250
+ }, n.daysInMonth = function() {
251
+ return this.endOf(p).$D;
252
+ }, n.$locale = function() {
253
+ return P[this.$L];
254
+ }, n.locale = function(e, s) {
255
+ if (!e) return this.$L;
256
+ var r = this.clone(), o = L(e, s, !0);
257
+ return o && (r.$L = o), r;
258
+ }, n.clone = function() {
259
+ return c.w(this.$d, this);
260
+ }, n.toDate = function() {
261
+ return new Date(this.valueOf());
262
+ }, n.toJSON = function() {
263
+ return this.isValid() ? this.toISOString() : null;
264
+ }, n.toISOString = function() {
265
+ return this.$d.toISOString();
266
+ }, n.toString = function() {
267
+ return this.$d.toUTCString();
268
+ }, u;
269
+ }(), X = R.prototype;
270
+ return l.prototype = X, [["$ms", O], ["$s", v], ["$m", k], ["$H", M], ["$W", _], ["$M", p], ["$y", T], ["$D", A]].forEach(function(u) {
271
+ X[u[1]] = function(n) {
272
+ return this.$g(n, u[0], u[1]);
273
+ };
274
+ }), l.extend = function(u, n) {
275
+ return u.$i || (u(n, R, l), u.$i = !0), l;
276
+ }, l.locale = L, l.isDayjs = Z, l.unix = function(u) {
277
+ return l(1e3 * u);
278
+ }, l.en = P[I], l.Ls = P, l.p = {}, l;
279
+ });
280
+ })(Q);
281
+ var ft = Q.exports;
282
+ const ct = /* @__PURE__ */ it(ft);
283
+ function ht(i) {
284
+ return i.toLowerCase();
285
+ }
286
+ var mt = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], dt = /[^A-Z0-9]+/gi;
287
+ function lt(i, a) {
288
+ a === void 0 && (a = {});
289
+ for (var t = a.splitRegexp, m = t === void 0 ? mt : t, b = a.stripRegexp, O = b === void 0 ? dt : b, v = a.transform, k = v === void 0 ? ht : v, M = a.delimiter, _ = M === void 0 ? " " : M, w = K(K(i, m, "$1\0$2"), O, "\0"), p = 0, C = w.length; w.charAt(p) === "\0"; )
290
+ p++;
291
+ for (; w.charAt(C - 1) === "\0"; )
292
+ C--;
293
+ return w.slice(p, C).split("\0").map(k).join(_);
294
+ }
295
+ function K(i, a, t) {
296
+ return a instanceof RegExp ? i.replace(a, t) : a.reduce(function(m, b) {
297
+ return m.replace(b, t);
298
+ }, i);
299
+ }
300
+ function $t(i) {
301
+ return i.charAt(0).toUpperCase() + i.substr(1);
302
+ }
303
+ function St(i, a) {
304
+ var t = i.toLowerCase();
305
+ return a === 0 ? $t(t) : t;
306
+ }
307
+ function H(i, a) {
308
+ return a === void 0 && (a = {}), lt(i, ot({ delimiter: " ", transform: St }, a));
309
+ }
310
+ function vt(i, a = []) {
311
+ const t = JSON.parse(JSON.stringify(i));
312
+ return a.length > 0 && a.forEach((m) => {
313
+ t[m] !== void 0 && delete t[m];
314
+ }), t;
315
+ }
316
+ function pt(i, a) {
317
+ var m, b, O, v, k, M, _;
318
+ const t = a ? vt(a) : void 0;
319
+ return {
320
+ _id: (t == null ? void 0 : t._id) ?? "",
321
+ notifyUrl: (t == null ? void 0 : t.notifyUrl) ?? "",
322
+ store: {
323
+ id: (t == null ? void 0 : t.store.id) ?? "",
324
+ event: (t == null ? void 0 : t.store.event) ?? E.F_PAYOUT_FOR.Enum.ORDERING,
325
+ bank: {
326
+ name: ((m = t == null ? void 0 : t.store.bank) == null ? void 0 : m.name) ?? J.bankNameOptions()[0].value,
327
+ type: ((b = t == null ? void 0 : t.store.bank) == null ? void 0 : b.type) ?? J.bankTypeOptions()[0].value,
328
+ holderName: ((O = t == null ? void 0 : t.store.bank) == null ? void 0 : O.holderName) ?? "",
329
+ accountNumber: ((v = t == null ? void 0 : t.store.bank) == null ? void 0 : v.accountNumber) ?? ""
330
+ },
331
+ keyPerson: {
332
+ name: ((k = t == null ? void 0 : t.store.keyPerson) == null ? void 0 : k.name) ?? "",
333
+ phone: ((M = t == null ? void 0 : t.store.keyPerson) == null ? void 0 : M.phone) ?? "",
334
+ email: ((_ = t == null ? void 0 : t.store.keyPerson) == null ? void 0 : _.email) ?? ""
335
+ },
336
+ ssm: (t == null ? void 0 : t.store.ssm) ?? "",
337
+ bankStatement: (t == null ? void 0 : t.store.bankStatement) ?? "",
338
+ exteriorPhoto: (t == null ? void 0 : t.store.exteriorPhoto) ?? ""
339
+ },
340
+ enable: (t == null ? void 0 : t.enable) ?? !1,
341
+ methods: (t == null ? void 0 : t.methods) ?? [],
342
+ status: (t == null ? void 0 : t.status) ?? E.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW,
343
+ businessId: i
344
+ };
345
+ }
346
+ function gt(i) {
347
+ return i.reduce(
348
+ (a, t) => ([E.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW].some((m) => m == t.status) ? a.NEW.push({
349
+ ...t
350
+ }) : a.EXISTED.push({
351
+ ...t
352
+ }), a),
353
+ {
354
+ NEW: [],
355
+ EXISTED: []
356
+ }
357
+ );
358
+ }
359
+ async function G(i) {
360
+ await j.delete(i);
361
+ }
362
+ async function q(i, a, t) {
363
+ const m = ct().toISOString();
364
+ if (i.restaurantId)
365
+ return await j.update(
366
+ `restaurant/${i.restaurantId}/documents/${a}/${m}.pdf`,
367
+ t
368
+ );
369
+ if (i.businessId)
370
+ return await j.update(
371
+ `business/${i.businessId}/documents/${a}/${m}.pdf`,
372
+ t
373
+ );
374
+ throw "Not implemented";
375
+ }
376
+ async function bt(i, a) {
377
+ if (i.restaurantId)
378
+ return await j.update(
379
+ `restaurant/${i.restaurantId}/exterior/photo`,
380
+ a
381
+ );
382
+ if (i.businessId)
383
+ return await j.update(
384
+ `business/${i.businessId}/exterior/photo`,
385
+ a
386
+ );
387
+ throw "Not implemented";
388
+ }
389
+ async function _t(i, a, t) {
390
+ a.store.ssm && t.newSSM && await G(a.store.ssm), a.store.bankStatement && t.newBankStatement && await G(a.store.bankStatement), a.store.exteriorPhoto && t.newExteriorPhoto && await G(a.store.exteriorPhoto);
391
+ let m = a.methods;
392
+ t.payoutSetting.methods.length > 0 && (m = t.payoutSetting.methods);
393
+ let b = a.store.ssm || "";
394
+ t.newSSM && (b = await q(i, "ssm", t.newSSM));
395
+ let O = a.store.bankStatement || "";
396
+ t.newBankStatement && (O = await q(
397
+ i,
398
+ "bankStatement",
399
+ t.newBankStatement
400
+ ));
401
+ let v = a.store.exteriorPhoto || "";
402
+ return t.newExteriorPhoto && (v = await bt(
403
+ i,
404
+ t.newExteriorPhoto
405
+ )), {
406
+ ...a,
407
+ methods: m,
408
+ store: {
409
+ ...a.store,
410
+ id: t.payoutSetting.store.id,
411
+ keyPerson: t.payoutSetting.store.keyPerson,
412
+ bank: t.payoutSetting.store.bank,
413
+ ssm: b,
414
+ bankStatement: O,
415
+ exteriorPhoto: v,
416
+ event: t.payoutSetting.store.event
417
+ },
418
+ status: E.F_PAYOUT_ACCOUNT_STATUS.Enum.PENDING,
419
+ notifyUrl: t.payoutSetting.store.event === E.F_PAYOUT_FOR.Enum.MARKETING ? "http://marketing-api-service:3000/customer/callback/store" : "http://order-backend:3000/backend/payment"
420
+ };
421
+ }
422
+ const J = {
423
+ bankNameOptions() {
424
+ const i = ut().currentCountry.value, a = at(i).F_BANK_NAME;
425
+ return Object.values(a).map((t) => ({
426
+ label: H(t),
427
+ value: t
428
+ }));
429
+ },
430
+ bankTypeOptions() {
431
+ return Object.values(E.F_BANK_TYPE.Values).map((i) => ({
432
+ label: H(i),
433
+ value: i
434
+ }));
435
+ },
436
+ storeEventOptions() {
437
+ return Object.values(E.F_PAYOUT_FOR.Values).map((i) => ({
438
+ label: H(i),
439
+ value: i
440
+ }));
441
+ },
442
+ statusOptions() {
443
+ return Object.values(E.F_PAYOUT_ACCOUNT_STATUS.Values).map((i) => ({
444
+ label: H(i),
445
+ value: i
446
+ }));
447
+ }
448
+ }, wt = {
449
+ mergeData: _t,
450
+ initPayoutAccount: pt,
451
+ groupByStatus: gt,
452
+ PayoutConfig: J
453
+ };
454
+ export {
455
+ J as P,
456
+ wt as a,
457
+ vt as c
458
+ };