@feedmepos/mf-settings 0.0.35 → 0.0.36
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/Business-9706bfba.js +3934 -0
- package/dist/CreateBusiness-ee9dfb37.js +221 -0
- package/dist/{FoodCourt-c236c0a2.js → FoodCourt-2c67838f.js} +6427 -6418
- package/dist/{app-a7eb5513.js → app-99c9cdb0.js} +1337 -763
- package/dist/app.js +4 -3
- package/dist/apps/mf-settings/src/app.d.ts +562 -0
- package/dist/apps/mf-settings/src/components/foodcourt/foodCourt.d.ts +3 -1
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/dist/Business-840c1d5e.js +0 -3907
- package/dist/CreateBusiness-ae9bee79.js +0 -219
|
@@ -1,3907 +0,0 @@
|
|
|
1
|
-
var Or = Object.defineProperty;
|
|
2
|
-
var Lr = (t, e, r) => e in t ? Or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var Ge = (t, e, r) => (Lr(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
-
import { ref as re, computed as X, defineComponent as Z, resolveComponent as G, openBlock as T, createBlock as Q, Teleport as Sr, createVNode as O, Transition as Pr, withCtx as M, normalizeClass as J, normalizeStyle as Te, withKeys as Tr, createElementVNode as E, toDisplayString as q, renderSlot as ne, createElementBlock as j, Fragment as se, renderList as pe, createCommentVNode as ie, createTextVNode as Ce, h as Ne, unref as z, watch as tt, onMounted as rr, onUnmounted as Cr, toRaw as $t, reactive as lt, nextTick as nr, onBeforeUnmount as Nr, normalizeProps as kr, guardReactiveProps as xr, withModifiers as ke, getCurrentInstance as Vr, isRef as Et } from "vue";
|
|
5
|
-
import { c as Fr, g as sr, b as Ke, a as qe, d as ar, e as it, u as or } from "./loading-810e6a97.js";
|
|
6
|
-
import { useCoreStore as fe } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as lr, useDialogChild as jr, useSnackbar as ut, useBreakpoints as ir, components as ur } from "@feedmepos/ui-library";
|
|
8
|
-
import { c as ge, D as ct, u as cr, _ as Ur, a as Mr, b as Dr, d as ze } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-62e1008f.js";
|
|
9
|
-
import { _ as dr, r as ce, b as Br } from "./business-b41c9d64.js";
|
|
10
|
-
import { c as xe, g as he, a as Gr, b as Kr, d as He, r as Xe, e as qr, u as zr, f as Hr, h as Xr } from "./app-a7eb5513.js";
|
|
11
|
-
import "pinia";
|
|
12
|
-
import "vue-router";
|
|
13
|
-
import "@feedmepos/mf-e-invoice";
|
|
14
|
-
import "@feedmepos/mf-mdm";
|
|
15
|
-
var Yr = {};
|
|
16
|
-
(function(t) {
|
|
17
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), function(e) {
|
|
18
|
-
e.SLOT_SALE = "SLOT_SALE";
|
|
19
|
-
}(t.ReportWidgetType || (t.ReportWidgetType = {})), function(e) {
|
|
20
|
-
e.v2 = "v2", e.v3 = "v3", e.v4 = "v4";
|
|
21
|
-
}(t.MENU_VERSION || (t.MENU_VERSION = {})), function(e) {
|
|
22
|
-
e.Polygon = "Polygon";
|
|
23
|
-
}(t.GeometryType || (t.GeometryType = {})), function(e) {
|
|
24
|
-
e.stock = "stock", e.discovery = "discovery", e.pickup = "pickup", e.delivery = "delivery", e.foodpanda = "foodpanda", e.deliveryIntegration = "deliveryIntegration", e.kds = "kds", e.ods = "ods";
|
|
25
|
-
}(t.RestaurantFeature || (t.RestaurantFeature = {})), function(e) {
|
|
26
|
-
e.alpha = "alpha", e.beta = "beta", e.latest = "latest";
|
|
27
|
-
}(t.RestaurantChannel || (t.RestaurantChannel = {})), function(e) {
|
|
28
|
-
e.pickup = "pickup", e.delivery = "delivery";
|
|
29
|
-
}(t.DiscoveryType || (t.DiscoveryType = {})), function(e) {
|
|
30
|
-
e.new = "NEW", e.pending = "PENDING", e.approved = "APPROVED";
|
|
31
|
-
}(t.PAYOUT_ACCOUNT_STATUS || (t.PAYOUT_ACCOUNT_STATUS = {})), function(e) {
|
|
32
|
-
e.maybank = "MAYBANK", e.cimbBank = "CIMB_BANK", e.rhbBank = "RHB_BANK", e.bankIslam = "BANK_ISLAM", e.bankMuamalat = "BANK_MUAMALAT", e.bankRakyat = "BANK_RAKYAT", e.bankSimpananNasional = "BANK_SIMPANAN_NASIONAL", e.citiBank = "CITIBANK", e.hongLeongBank = "HONG_LEONG_BANK", e.hsbcBank = "HSBC_BANK", e.ocbcBank = "OCBC_BANK", e.publicBank = "PUBLIC_BANK", e.affinBank = "AFFIN_BANK", e.amBank = "AMBANK", e.agroBank = "AGRO_BANK", e.allianceBank = "ALLIANCE_BANK", e.alRajhiBank = "AL_RAJHI_BANK", e.bankOfChina = "BANK_OF_CHINA", e.bankOfAmerica = "BANK_OF_AMERICA", e.bankOfTokyoMitsubishiUFJ = "BANK_OF_TOKYO_MITSUBISHI_UFJ", e.bnpParibas = "BNP_PARIBAS", e.deutscheBank = "DEUTSCHE_BANK", e.industrialCommercialBankOfChina = "INDUSTRIAL_COMMERCIAL_BANK_OF_CHINA", e.jpMorganChaseBank = "JP_MORGAN_CHASE_BANK", e.kuwaitFinanceHouse = "KUWAIT_FINANCE_HOUSE", e.mizuhoBank = "MIZUHO_BANK", e.standardCharteredBank = "STANDARD_CHARTERED_BANK", e.sumitomoMitsuiBankingCorporation = "SUMITOMO_MITSUI_BANKING_CORPORATION", e.theRoyalBankOfScotland = "THE_ROYAL_BANK_OF_SCOTLAND", e.unitedOverseasBank = "UNITED_OVERSEAS_BANK";
|
|
33
|
-
}(t.BankName || (t.BankName = {})), function(e) {
|
|
34
|
-
e.current = "CURRENT_ACCOUNT", e.saving = "SAVING_ACCOUNT";
|
|
35
|
-
}(t.BankType || (t.BankType = {})), function(e) {
|
|
36
|
-
e[e.maybank = 100002270] = "maybank", e[e.cimbBank = 100002050] = "cimbBank", e[e.rhbBank = 100002186] = "rhbBank", e[e.bankIslam = 100002458] = "bankIslam", e[e.bankMuamalat = 100002458] = "bankMuamalat", e[e.bankRakyat = 100016020] = "bankRakyat", e[e.bankSimpananNasional = 100016017] = "bankSimpananNasional", e[e.citiBank = 100002173] = "citiBank", e[e.hongLeongBank = 100002241] = "hongLeongBank", e[e.hsbcBank = 100002225] = "hsbcBank", e[e.ocbcBank = 100002296] = "ocbcBank", e[e.publicBank = 100002335] = "publicBank", e[e.affinBank = 100002322] = "affinBank", e[e.amBank = 100002089] = "amBank", e[e.agroBank = 100033061] = "agroBank", e[e.allianceBank = 100002128] = "allianceBank", e[e.alRajhiBank = 100003509] = "alRajhiBank", e[e.bankOfChina = 100002429] = "bankOfChina", e[e.bankOfAmerica = 100002076] = "bankOfAmerica", e[e.bankOfTokyoMitsubishiUFJ = 100002102] = "bankOfTokyoMitsubishiUFJ", e[e.bnpParibas = 100002636] = "bnpParibas", e[e.deutscheBank = 100002199] = "deutscheBank", e[e.industrialCommercialBankOfChina = 100002597] = "industrialCommercialBankOfChina", e[e.jpMorganChaseBank = 100002157] = "jpMorganChaseBank", e[e.kuwaitFinanceHouse = 100003460] = "kuwaitFinanceHouse", e[e.mizuhoBank = 100002610] = "mizuhoBank", e[e.standardCharteredBank = 100002144] = "standardCharteredBank", e[e.sumitomoMitsuiBankingCorporation = 100002623] = "sumitomoMitsuiBankingCorporation", e[e.unitedOverseasBank = 100002267] = "unitedOverseasBank";
|
|
37
|
-
}(t.BankRouting || (t.BankRouting = {})), function(e) {
|
|
38
|
-
e.maybank = "MBBEMYKL", e.cimbBank = "CIBBMYKL", e.rhbBank = "RHBBMYKL", e.bankIslam = "BIMBMYKL", e.bankMuamalat = "BMMBMYKL", e.bankRakyat = "BKRMMYKL", e.bankSimpananNasional = "BSNAMYK1", e.citiBank = "CITIMYKL", e.hongLeongBank = "HLBBMYKL", e.hsbcBank = "HBMBMYKL", e.ocbcBank = "OCBCMYKL", e.publicBank = "PBBEMYKL", e.affinBank = "PHBMMYKL", e.amBank = "ARBKMYKL", e.agroBank = "AGOBMYKL", e.allianceBank = "MFBBMYKL", e.alRajhiBank = "RJHIMYKL", e.bankOfChina = "BKCHMYKL", e.bankOfAmerica = "BOFAMY2X", e.bankOfTokyoMitsubishiUFJ = "BOTKMYKX", e.bnpParibas = "BNPAMYKL", e.deutscheBank = "DEUTMYKL", e.industrialCommercialBankOfChina = "ICBKMYKL", e.jpMorganChaseBank = "CHASMYKX", e.kuwaitFinanceHouse = "KFHOMYKL", e.mizuhoBank = "MHCBMYKA", e.standardCharteredBank = "SCBLMYKX", e.sumitomoMitsuiBankingCorporation = "SMBCMYKL", e.unitedOverseasBank = "UOVBMYKL";
|
|
39
|
-
}(t.BankSwiftCode || (t.BankSwiftCode = {})), function(e) {
|
|
40
|
-
e.grab = "Grab", e.merchant = "Merchant", e.partner = "Partner";
|
|
41
|
-
}(t.GF_CAMPAIGN_CREATED_BY || (t.GF_CAMPAIGN_CREATED_BY = {})), function(e) {
|
|
42
|
-
e.all = "all", e.new = "new";
|
|
43
|
-
}(t.GF_CAMPAIGN_EATER_TYPE || (t.GF_CAMPAIGN_EATER_TYPE = {})), function(e) {
|
|
44
|
-
e.net = "net", e.percentage = "percentage", e.delivery = "delivery", e.freeItem = "freeItem";
|
|
45
|
-
}(t.GF_CAMPAIGN_DISCOUNT_TYPE || (t.GF_CAMPAIGN_DISCOUNT_TYPE = {})), function(e) {
|
|
46
|
-
e.order = "order", e.items = "items";
|
|
47
|
-
}(t.GF_CAMPAIGN_SCOPE_TYPE || (t.GF_CAMPAIGN_SCOPE_TYPE = {}));
|
|
48
|
-
})(Yr);
|
|
49
|
-
var fr = { exports: {} };
|
|
50
|
-
(function(t, e) {
|
|
51
|
-
(function(r, n) {
|
|
52
|
-
t.exports = n();
|
|
53
|
-
})(Fr, function() {
|
|
54
|
-
return function(r) {
|
|
55
|
-
var n = {};
|
|
56
|
-
function s(a) {
|
|
57
|
-
if (n[a])
|
|
58
|
-
return n[a].exports;
|
|
59
|
-
var l = n[a] = { i: a, l: !1, exports: {} };
|
|
60
|
-
return r[a].call(l.exports, l, l.exports, s), l.l = !0, l.exports;
|
|
61
|
-
}
|
|
62
|
-
return s.m = r, s.c = n, s.d = function(a, l, m) {
|
|
63
|
-
s.o(a, l) || Object.defineProperty(a, l, { enumerable: !0, get: m });
|
|
64
|
-
}, s.r = function(a) {
|
|
65
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(a, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(a, "__esModule", { value: !0 });
|
|
66
|
-
}, s.t = function(a, l) {
|
|
67
|
-
if (1 & l && (a = s(a)), 8 & l || 4 & l && typeof a == "object" && a && a.__esModule)
|
|
68
|
-
return a;
|
|
69
|
-
var m = /* @__PURE__ */ Object.create(null);
|
|
70
|
-
if (s.r(m), Object.defineProperty(m, "default", { enumerable: !0, value: a }), 2 & l && typeof a != "string")
|
|
71
|
-
for (var c in a)
|
|
72
|
-
s.d(
|
|
73
|
-
m,
|
|
74
|
-
c,
|
|
75
|
-
(function(u) {
|
|
76
|
-
return a[u];
|
|
77
|
-
}).bind(null, c)
|
|
78
|
-
);
|
|
79
|
-
return m;
|
|
80
|
-
}, s.n = function(a) {
|
|
81
|
-
var l = a && a.__esModule ? function() {
|
|
82
|
-
return a.default;
|
|
83
|
-
} : function() {
|
|
84
|
-
return a;
|
|
85
|
-
};
|
|
86
|
-
return s.d(l, "a", l), l;
|
|
87
|
-
}, s.o = function(a, l) {
|
|
88
|
-
return Object.prototype.hasOwnProperty.call(a, l);
|
|
89
|
-
}, s.p = "", s(s.s = 0);
|
|
90
|
-
}([
|
|
91
|
-
function(r, n, s) {
|
|
92
|
-
r.exports = s(1);
|
|
93
|
-
},
|
|
94
|
-
function(r, n, s) {
|
|
95
|
-
function a(o) {
|
|
96
|
-
return (a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
|
97
|
-
return typeof i;
|
|
98
|
-
} : function(i) {
|
|
99
|
-
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
|
100
|
-
})(o);
|
|
101
|
-
}
|
|
102
|
-
function l(o) {
|
|
103
|
-
var i = "[object " + o + "]";
|
|
104
|
-
return function(h) {
|
|
105
|
-
return Object.prototype.toString.call(h) === i;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
s.r(n), s.d(n, "default", function() {
|
|
109
|
-
return D;
|
|
110
|
-
}), s.d(n, "compare", function() {
|
|
111
|
-
return K;
|
|
112
|
-
}), s.d(n, "comparable", function() {
|
|
113
|
-
return F;
|
|
114
|
-
});
|
|
115
|
-
var m = l("Array"), c = l("Object"), u = l("Function");
|
|
116
|
-
function v(o, i) {
|
|
117
|
-
return u(o.get) ? o.get(i) : o[i];
|
|
118
|
-
}
|
|
119
|
-
function d(o) {
|
|
120
|
-
return function(i, h) {
|
|
121
|
-
if (!m(h) || !h.length)
|
|
122
|
-
return o(i, h);
|
|
123
|
-
for (var f = 0, w = h.length; f < w; f++)
|
|
124
|
-
if (o(i, v(h, f)))
|
|
125
|
-
return !0;
|
|
126
|
-
return !1;
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function S(o) {
|
|
130
|
-
return function(i, h) {
|
|
131
|
-
if (!m(h) || !h.length)
|
|
132
|
-
return o(i, h);
|
|
133
|
-
for (var f = 0, w = h.length; f < w; f++)
|
|
134
|
-
if (!o(i, v(h, f)))
|
|
135
|
-
return !1;
|
|
136
|
-
return !0;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function b(o, i, h, f) {
|
|
140
|
-
return o.validate(o.options, i, h, f);
|
|
141
|
-
}
|
|
142
|
-
var y = {
|
|
143
|
-
$eq: d(function(o, i) {
|
|
144
|
-
return o(i);
|
|
145
|
-
}),
|
|
146
|
-
$ne: S(function(o, i) {
|
|
147
|
-
return o(i);
|
|
148
|
-
}),
|
|
149
|
-
$gt: d(function(o, i) {
|
|
150
|
-
return o(i);
|
|
151
|
-
}),
|
|
152
|
-
$gte: d(function(o, i) {
|
|
153
|
-
return o(i);
|
|
154
|
-
}),
|
|
155
|
-
$lt: d(function(o, i) {
|
|
156
|
-
return o(i);
|
|
157
|
-
}),
|
|
158
|
-
$lte: d(function(o, i) {
|
|
159
|
-
return o(i);
|
|
160
|
-
}),
|
|
161
|
-
$mod: d(function(o, i) {
|
|
162
|
-
return o(i);
|
|
163
|
-
}),
|
|
164
|
-
$in: function(o, i) {
|
|
165
|
-
return o(i);
|
|
166
|
-
},
|
|
167
|
-
$nin: function(o, i) {
|
|
168
|
-
return o(i);
|
|
169
|
-
},
|
|
170
|
-
$not: function(o, i, h, f) {
|
|
171
|
-
return o(i, h, f);
|
|
172
|
-
},
|
|
173
|
-
$type: function(o, i) {
|
|
174
|
-
return o(i);
|
|
175
|
-
},
|
|
176
|
-
$all: function(o, i, h, f) {
|
|
177
|
-
return y.$and(o, i, h, f);
|
|
178
|
-
},
|
|
179
|
-
$size: function(o, i) {
|
|
180
|
-
return !!i && o === i.length;
|
|
181
|
-
},
|
|
182
|
-
$or: function(o, i, h, f) {
|
|
183
|
-
for (var w = 0, p = o.length; w < p; w++)
|
|
184
|
-
if (b(v(o, w), i, h, f))
|
|
185
|
-
return !0;
|
|
186
|
-
return !1;
|
|
187
|
-
},
|
|
188
|
-
$nor: function(o, i, h, f) {
|
|
189
|
-
return !y.$or(o, i, h, f);
|
|
190
|
-
},
|
|
191
|
-
$and: function(o, i, h, f) {
|
|
192
|
-
for (var w = 0, p = o.length; w < p; w++)
|
|
193
|
-
if (!b(v(o, w), i, h, f))
|
|
194
|
-
return !1;
|
|
195
|
-
return !0;
|
|
196
|
-
},
|
|
197
|
-
$regex: d(function(o, i) {
|
|
198
|
-
return typeof i == "string" && o.test(i);
|
|
199
|
-
}),
|
|
200
|
-
$where: function(o, i, h, f) {
|
|
201
|
-
return o.call(i, i, h, f);
|
|
202
|
-
},
|
|
203
|
-
$elemMatch: function(o, i, h, f) {
|
|
204
|
-
return m(i) ? !!~function(w, p) {
|
|
205
|
-
for (var g = 0; g < w.length; g++)
|
|
206
|
-
if (v(w, g), b(p, v(w, g)))
|
|
207
|
-
return g;
|
|
208
|
-
return -1;
|
|
209
|
-
}(i, o) : b(o, i, h, f);
|
|
210
|
-
},
|
|
211
|
-
$exists: function(o, i, h, f) {
|
|
212
|
-
return f.hasOwnProperty(h) === o;
|
|
213
|
-
}
|
|
214
|
-
}, P = {
|
|
215
|
-
$eq: function(o, i, h) {
|
|
216
|
-
var f = h.comparable, w = h.compare;
|
|
217
|
-
return o instanceof RegExp ? d(function(p) {
|
|
218
|
-
return typeof p == "string" && o.test(p);
|
|
219
|
-
}) : o instanceof Function ? d(o) : m(o) && !o.length ? d(function(p) {
|
|
220
|
-
return m(p) && !p.length;
|
|
221
|
-
}) : d(
|
|
222
|
-
o === null ? function(p) {
|
|
223
|
-
return p == null;
|
|
224
|
-
} : function(p) {
|
|
225
|
-
return w(f(p), f(o)) === 0;
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
},
|
|
229
|
-
$gt: function(o, i, h) {
|
|
230
|
-
var f = h.comparable, w = h.compare;
|
|
231
|
-
return function(p) {
|
|
232
|
-
return w(f(p), f(o)) > 0;
|
|
233
|
-
};
|
|
234
|
-
},
|
|
235
|
-
$gte: function(o, i, h) {
|
|
236
|
-
var f = h.comparable, w = h.compare;
|
|
237
|
-
return function(p) {
|
|
238
|
-
return w(f(p), f(o)) >= 0;
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
$lt: function(o, i, h) {
|
|
242
|
-
var f = h.comparable, w = h.compare;
|
|
243
|
-
return function(p) {
|
|
244
|
-
return w(f(p), f(o)) < 0;
|
|
245
|
-
};
|
|
246
|
-
},
|
|
247
|
-
$lte: function(o, i, h) {
|
|
248
|
-
var f = h.comparable, w = h.compare;
|
|
249
|
-
return function(p) {
|
|
250
|
-
return w(f(p), f(o)) <= 0;
|
|
251
|
-
};
|
|
252
|
-
},
|
|
253
|
-
$in: function(o, i, h) {
|
|
254
|
-
var f = h.comparable;
|
|
255
|
-
return function(w) {
|
|
256
|
-
if (!(w instanceof Array)) {
|
|
257
|
-
var p = f(w);
|
|
258
|
-
if (p === w && a(w) === "object") {
|
|
259
|
-
for (_ = o.length; _--; )
|
|
260
|
-
if (String(o[_]) === String(w) && String(w) !== "[object Object]")
|
|
261
|
-
return !0;
|
|
262
|
-
}
|
|
263
|
-
if (p === void 0) {
|
|
264
|
-
for (_ = o.length; _--; )
|
|
265
|
-
if (o[_] == null)
|
|
266
|
-
return !0;
|
|
267
|
-
}
|
|
268
|
-
for (_ = o.length; _--; ) {
|
|
269
|
-
var g = b(W(v(o, _), h), p, _, o);
|
|
270
|
-
if (g && String(g) !== "[object Object]" && String(p) !== "[object Object]")
|
|
271
|
-
return !0;
|
|
272
|
-
}
|
|
273
|
-
return !!~o.indexOf(p);
|
|
274
|
-
}
|
|
275
|
-
for (var _ = w.length; _--; )
|
|
276
|
-
if (~o.indexOf(f(v(w, _))))
|
|
277
|
-
return !0;
|
|
278
|
-
return !1;
|
|
279
|
-
};
|
|
280
|
-
},
|
|
281
|
-
$nin: function(o, i, h) {
|
|
282
|
-
var f = P.$in(o, i, h);
|
|
283
|
-
return function(w, p, g, _) {
|
|
284
|
-
return !f(w, p, g, _);
|
|
285
|
-
};
|
|
286
|
-
},
|
|
287
|
-
$mod: function(o) {
|
|
288
|
-
return function(i) {
|
|
289
|
-
return i % o[0] == o[1];
|
|
290
|
-
};
|
|
291
|
-
},
|
|
292
|
-
$ne: function(o, i, h) {
|
|
293
|
-
var f = P.$eq(o, i, h);
|
|
294
|
-
return S(function(w, p, g, _) {
|
|
295
|
-
return !f(w, p, g, _);
|
|
296
|
-
});
|
|
297
|
-
},
|
|
298
|
-
$and: function(o, i, h) {
|
|
299
|
-
return o.map(L(h));
|
|
300
|
-
},
|
|
301
|
-
$all: function(o, i, h) {
|
|
302
|
-
return P.$and(o, i, h);
|
|
303
|
-
},
|
|
304
|
-
$or: function(o, i, h) {
|
|
305
|
-
return o.map(L(h));
|
|
306
|
-
},
|
|
307
|
-
$nor: function(o, i, h) {
|
|
308
|
-
return o.map(L(h));
|
|
309
|
-
},
|
|
310
|
-
$not: function(o, i, h) {
|
|
311
|
-
var f = L(h)(o);
|
|
312
|
-
return function(w, p, g) {
|
|
313
|
-
return !b(f, w, p, g);
|
|
314
|
-
};
|
|
315
|
-
},
|
|
316
|
-
$type: function(o) {
|
|
317
|
-
return function(i, h, f) {
|
|
318
|
-
return i != null && (i instanceof o || i.constructor == o);
|
|
319
|
-
};
|
|
320
|
-
},
|
|
321
|
-
$regex: function(o, i) {
|
|
322
|
-
return new RegExp(o, i.$options);
|
|
323
|
-
},
|
|
324
|
-
$where: function(o) {
|
|
325
|
-
if (typeof o == "function")
|
|
326
|
-
return o;
|
|
327
|
-
throw new Error(
|
|
328
|
-
'In CSP mode, sift does not support strings in "$where" condition'
|
|
329
|
-
);
|
|
330
|
-
},
|
|
331
|
-
$elemMatch: function(o, i, h) {
|
|
332
|
-
return L(h)(o);
|
|
333
|
-
},
|
|
334
|
-
$exists: function(o) {
|
|
335
|
-
return !!o;
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
function C(o, i) {
|
|
339
|
-
return { options: o, validate: i };
|
|
340
|
-
}
|
|
341
|
-
function k(o, i) {
|
|
342
|
-
var h = o.keyPath, f = o.child, w = o.query, p = [];
|
|
343
|
-
if (function U(x, B, Y, H, ue) {
|
|
344
|
-
if (Y === B.length || x == null)
|
|
345
|
-
return void ue.push([x, B[Y - 1], H]);
|
|
346
|
-
var bt = v(B, Y);
|
|
347
|
-
if (m(x) && isNaN(Number(bt)))
|
|
348
|
-
for (var Be = 0, Ar = x.length; Be < Ar; Be++)
|
|
349
|
-
U(v(x, Be), B, Y, x, ue);
|
|
350
|
-
else
|
|
351
|
-
U(v(x, bt), B, Y + 1, x, ue);
|
|
352
|
-
}(i, h, 0, i, p), p.length === 1) {
|
|
353
|
-
var g = p[0];
|
|
354
|
-
return b(f, g[0], g[1], g[2]);
|
|
355
|
-
}
|
|
356
|
-
for (var _ = w && w.$ne !== void 0, $ = _, I = 0; I < p.length; I++) {
|
|
357
|
-
var R = p[I], N = b(f, R[0], R[1], R[2]);
|
|
358
|
-
_ ? $ &= N : $ |= N;
|
|
359
|
-
}
|
|
360
|
-
return $;
|
|
361
|
-
}
|
|
362
|
-
function A(o, i, h) {
|
|
363
|
-
return C({ keyPath: o, child: i, query: h }, k);
|
|
364
|
-
}
|
|
365
|
-
function L(o) {
|
|
366
|
-
var i = o.comparable, h = o.expressions, f = function(g) {
|
|
367
|
-
var _;
|
|
368
|
-
return (!g || !(_ = g) || _.constructor !== Object && _.constructor !== Array && _.constructor.toString() !== "function Object() { [native code] }" && _.constructor.toString() !== "function Array() { [native code] }" || _.toJSON) && (g = { $eq: g }), g;
|
|
369
|
-
}, w = function(g) {
|
|
370
|
-
g = i(g);
|
|
371
|
-
var _ = [];
|
|
372
|
-
for (var $ in g) {
|
|
373
|
-
var I = g[$];
|
|
374
|
-
if ($ !== "$options") {
|
|
375
|
-
var R = y[$] || o && h && h[$];
|
|
376
|
-
if (R)
|
|
377
|
-
P[$] && (I = P[$](I, g, o)), _.push(C(i(I), R));
|
|
378
|
-
else {
|
|
379
|
-
if ($.charCodeAt(0) === 36)
|
|
380
|
-
throw new Error("Unknown operation " + $);
|
|
381
|
-
var N = $.split(".");
|
|
382
|
-
_.push(A(N, p(I), I));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return _.length === 1 ? _[0] : C(_, y.$and);
|
|
387
|
-
}, p = function(g) {
|
|
388
|
-
return g = f(g), function _($, I) {
|
|
389
|
-
if (!c($))
|
|
390
|
-
return I;
|
|
391
|
-
for (var R in $)
|
|
392
|
-
I.push(R), _($[R], I);
|
|
393
|
-
return I;
|
|
394
|
-
}(g, []).join(",").search(/[$.]/) === -1 ? C(g, V) : w(g);
|
|
395
|
-
};
|
|
396
|
-
return function(g) {
|
|
397
|
-
return w(f(g));
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
function V(o, i) {
|
|
401
|
-
if (Object.prototype.toString.call(o) !== Object.prototype.toString.call(i))
|
|
402
|
-
return !1;
|
|
403
|
-
if (c(o)) {
|
|
404
|
-
if (Object.keys(o).length !== Object.keys(i).length)
|
|
405
|
-
return !1;
|
|
406
|
-
for (var h in o)
|
|
407
|
-
if (!V(o[h], i[h]))
|
|
408
|
-
return !1;
|
|
409
|
-
return !0;
|
|
410
|
-
}
|
|
411
|
-
if (m(o)) {
|
|
412
|
-
if (o.length !== i.length)
|
|
413
|
-
return !1;
|
|
414
|
-
for (var f = 0, w = o.length; f < w; f++)
|
|
415
|
-
if (!V(o[f], i[f]))
|
|
416
|
-
return !1;
|
|
417
|
-
return !0;
|
|
418
|
-
}
|
|
419
|
-
return o === i;
|
|
420
|
-
}
|
|
421
|
-
function W(o, i) {
|
|
422
|
-
var h = L(i)(o);
|
|
423
|
-
return i && i.select && (h = {
|
|
424
|
-
options: h,
|
|
425
|
-
validate: function(f, w, p, g) {
|
|
426
|
-
return b(f, w && i.select(w), p, g);
|
|
427
|
-
}
|
|
428
|
-
}), h;
|
|
429
|
-
}
|
|
430
|
-
function D(o, i) {
|
|
431
|
-
var h = W(o, i = Object.assign({ compare: K, comparable: F }, i));
|
|
432
|
-
return function(f, w, p) {
|
|
433
|
-
return b(h, f, w, p);
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
function K(o, i) {
|
|
437
|
-
if (V(o, i))
|
|
438
|
-
return 0;
|
|
439
|
-
if (a(o) === a(i)) {
|
|
440
|
-
if (o > i)
|
|
441
|
-
return 1;
|
|
442
|
-
if (o < i)
|
|
443
|
-
return -1;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function F(o) {
|
|
447
|
-
return o instanceof Date ? o.getTime() : m(o) ? o.map(F) : o && typeof o.toJSON == "function" ? o.toJSON() : o;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
]);
|
|
451
|
-
});
|
|
452
|
-
})(fr);
|
|
453
|
-
var Wr = fr.exports;
|
|
454
|
-
const Jr = /* @__PURE__ */ sr(Wr);
|
|
455
|
-
function _t(t, e) {
|
|
456
|
-
for (var r = 0; r < e.length; r++) {
|
|
457
|
-
var n = e[r];
|
|
458
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
function Zr(t, e, r) {
|
|
462
|
-
return e && _t(t.prototype, e), r && _t(t, r), t;
|
|
463
|
-
}
|
|
464
|
-
function Qr(t, e) {
|
|
465
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
|
|
466
|
-
}
|
|
467
|
-
function rt(t) {
|
|
468
|
-
return rt = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
|
|
469
|
-
return r.__proto__ || Object.getPrototypeOf(r);
|
|
470
|
-
}, rt(t);
|
|
471
|
-
}
|
|
472
|
-
function Ve(t, e) {
|
|
473
|
-
return Ve = Object.setPrototypeOf || function(n, s) {
|
|
474
|
-
return n.__proto__ = s, n;
|
|
475
|
-
}, Ve(t, e);
|
|
476
|
-
}
|
|
477
|
-
function en() {
|
|
478
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
479
|
-
return !1;
|
|
480
|
-
if (typeof Proxy == "function")
|
|
481
|
-
return !0;
|
|
482
|
-
try {
|
|
483
|
-
return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
484
|
-
})), !0;
|
|
485
|
-
} catch {
|
|
486
|
-
return !1;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
function Pe(t, e, r) {
|
|
490
|
-
return en() ? Pe = Reflect.construct : Pe = function(s, a, l) {
|
|
491
|
-
var m = [null];
|
|
492
|
-
m.push.apply(m, a);
|
|
493
|
-
var c = Function.bind.apply(s, m), u = new c();
|
|
494
|
-
return l && Ve(u, l.prototype), u;
|
|
495
|
-
}, Pe.apply(null, arguments);
|
|
496
|
-
}
|
|
497
|
-
function tn(t) {
|
|
498
|
-
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
499
|
-
}
|
|
500
|
-
function nt(t) {
|
|
501
|
-
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
502
|
-
return nt = function(n) {
|
|
503
|
-
if (n === null || !tn(n))
|
|
504
|
-
return n;
|
|
505
|
-
if (typeof n != "function")
|
|
506
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
507
|
-
if (typeof e < "u") {
|
|
508
|
-
if (e.has(n))
|
|
509
|
-
return e.get(n);
|
|
510
|
-
e.set(n, s);
|
|
511
|
-
}
|
|
512
|
-
function s() {
|
|
513
|
-
return Pe(n, arguments, rt(this).constructor);
|
|
514
|
-
}
|
|
515
|
-
return s.prototype = Object.create(n.prototype, {
|
|
516
|
-
constructor: {
|
|
517
|
-
value: s,
|
|
518
|
-
enumerable: !1,
|
|
519
|
-
writable: !0,
|
|
520
|
-
configurable: !0
|
|
521
|
-
}
|
|
522
|
-
}), Ve(s, n);
|
|
523
|
-
}, nt(t);
|
|
524
|
-
}
|
|
525
|
-
function Rt(t) {
|
|
526
|
-
if (t === void 0)
|
|
527
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
528
|
-
return t;
|
|
529
|
-
}
|
|
530
|
-
var pr = function(e) {
|
|
531
|
-
return 'Cannot execute "' + e.action + '" on "' + e.subjectName + '"';
|
|
532
|
-
}, Re = pr, rn = /* @__PURE__ */ function(t) {
|
|
533
|
-
Qr(e, t), e.setDefaultMessage = function(s) {
|
|
534
|
-
s === null ? Re = pr : Re = typeof s == "string" ? function() {
|
|
535
|
-
return s;
|
|
536
|
-
} : s;
|
|
537
|
-
}, e.from = function(s) {
|
|
538
|
-
var a = new this("");
|
|
539
|
-
return Object.defineProperty(a, "ability", {
|
|
540
|
-
value: s
|
|
541
|
-
}), a;
|
|
542
|
-
};
|
|
543
|
-
function e(n, s) {
|
|
544
|
-
var a;
|
|
545
|
-
return s === void 0 && (s = {}), a = t.call(this, n) || this, a._setMetadata(s), a.message = n || Re(Rt(a)), a._customMessage = null, typeof Error.captureStackTrace == "function" && (a.name = a.constructor.name, Error.captureStackTrace(Rt(a), a.constructor)), a;
|
|
546
|
-
}
|
|
547
|
-
var r = e.prototype;
|
|
548
|
-
return r.setMessage = function(s) {
|
|
549
|
-
return this._customMessage = s, this;
|
|
550
|
-
}, r.throwUnlessCan = function(s, a, l) {
|
|
551
|
-
if (!this.ability)
|
|
552
|
-
throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
|
|
553
|
-
var m = this.ability.relevantRuleFor(s, a, l);
|
|
554
|
-
if (!(m && !m.inverted)) {
|
|
555
|
-
this._setMetadata({
|
|
556
|
-
action: s,
|
|
557
|
-
subject: a,
|
|
558
|
-
field: l,
|
|
559
|
-
subjectName: this.ability.subjectName(a)
|
|
560
|
-
});
|
|
561
|
-
var c = m ? m.reason : "";
|
|
562
|
-
throw this.message = this._customMessage || c || Re(this), this;
|
|
563
|
-
}
|
|
564
|
-
}, r._setMetadata = function(s) {
|
|
565
|
-
this.subject = s.subject, this.subjectName = s.subjectName, this.action = s.action, this.field = s.field;
|
|
566
|
-
}, e;
|
|
567
|
-
}(nt(Error));
|
|
568
|
-
function st(t) {
|
|
569
|
-
return Array.isArray(t) ? t : [t];
|
|
570
|
-
}
|
|
571
|
-
function nn(t) {
|
|
572
|
-
if (!t || typeof t == "string")
|
|
573
|
-
return t;
|
|
574
|
-
var e = typeof t == "object" ? t.constructor : t;
|
|
575
|
-
return e.modelName || e.name;
|
|
576
|
-
}
|
|
577
|
-
function sn(t) {
|
|
578
|
-
return JSON.parse(JSON.stringify(t));
|
|
579
|
-
}
|
|
580
|
-
var an = /[-/\\^$+?.()|[\]{}]/g, on = /\.?\*+\.?/g, ln = /\*+/, un = /\./g;
|
|
581
|
-
function cn(t, e, r) {
|
|
582
|
-
var n = r[0] === "*" || t[0] === "." && t[t.length - 1] === "." ? "+" : "*", s = t.indexOf("**") === -1 ? "[^.]" : ".", a = t.replace(un, "\\$&").replace(ln, s + n);
|
|
583
|
-
return e + t.length === r.length ? "(?:" + a + ")?" : a;
|
|
584
|
-
}
|
|
585
|
-
function dn(t, e, r) {
|
|
586
|
-
return t === "." && (r[e - 1] === "*" || r[e + 1] === "*") ? t : "\\" + t;
|
|
587
|
-
}
|
|
588
|
-
function fn(t) {
|
|
589
|
-
var e = t.map(function(n) {
|
|
590
|
-
return n.replace(an, dn).replace(on, cn);
|
|
591
|
-
}), r = e.length > 1 ? "(?:" + e.join("|") + ")" : e[0];
|
|
592
|
-
return new RegExp("^" + r + "$");
|
|
593
|
-
}
|
|
594
|
-
var pn = /* @__PURE__ */ function() {
|
|
595
|
-
function t(r) {
|
|
596
|
-
this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 : st(r.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
597
|
-
writable: !0
|
|
598
|
-
}), this.inverted = !!r.inverted, this.conditions = r.conditions, Object.defineProperty(this, "_matches", {
|
|
599
|
-
writable: !0,
|
|
600
|
-
value: this.conditions ? Jr(this.conditions) : void 0
|
|
601
|
-
}), this.reason = r.reason;
|
|
602
|
-
}
|
|
603
|
-
var e = t.prototype;
|
|
604
|
-
return e.matches = function(n) {
|
|
605
|
-
return this._matches ? typeof n == "string" ? !this.inverted : this._matches(n) : !0;
|
|
606
|
-
}, e.isRelevantFor = function(n, s) {
|
|
607
|
-
return this.fields ? s ? this.matchesField(s) : !this.inverted : !0;
|
|
608
|
-
}, e.matchesField = function(n) {
|
|
609
|
-
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : fn(this.fields)), this._fieldsPattern === null || n.indexOf("*") !== -1 ? this.fields.indexOf(n) !== -1 : this._fieldsPattern.test(n);
|
|
610
|
-
}, t;
|
|
611
|
-
}(), te = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), wt = {
|
|
612
|
-
crud: ["create", "read", "update", "delete"]
|
|
613
|
-
};
|
|
614
|
-
function It(t, e) {
|
|
615
|
-
return t === e || Array.isArray(e) && e.indexOf(t) !== -1;
|
|
616
|
-
}
|
|
617
|
-
var mn = /* @__PURE__ */ function() {
|
|
618
|
-
t.addAlias = function(n, s) {
|
|
619
|
-
if (n === "manage" || It("manage", s))
|
|
620
|
-
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
621
|
-
if (It(n, s))
|
|
622
|
-
throw new Error("Attempt to alias action to itself: " + n + " -> " + s.toString());
|
|
623
|
-
return wt[n] = s, this;
|
|
624
|
-
};
|
|
625
|
-
function t(r, n) {
|
|
626
|
-
n === void 0 && (n = {}), Object.defineProperty(this, "subjectName", {
|
|
627
|
-
value: n.subjectName || nn
|
|
628
|
-
}), this[te] = {
|
|
629
|
-
RuleType: n.RuleType || pn,
|
|
630
|
-
originalRules: r || [],
|
|
631
|
-
hasPerFieldRules: !1,
|
|
632
|
-
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
633
|
-
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
634
|
-
events: {},
|
|
635
|
-
aliases: sn(wt)
|
|
636
|
-
}, this.update(r);
|
|
637
|
-
}
|
|
638
|
-
var e = t.prototype;
|
|
639
|
-
return e.update = function(n) {
|
|
640
|
-
if (!Array.isArray(n))
|
|
641
|
-
return this;
|
|
642
|
-
var s = {
|
|
643
|
-
rules: n,
|
|
644
|
-
ability: this
|
|
645
|
-
};
|
|
646
|
-
this.emit("update", s), this[te].originalRules = n.slice(0), this[te].mergedRules = /* @__PURE__ */ Object.create(null);
|
|
647
|
-
var a = this.buildIndexFor(n);
|
|
648
|
-
return process.env.NODE_ENV !== "production" && a.isAllInverted && n.length && console.warn("[casl]: Ability contains only inverted rules. That means user will not be able to do any actions. This will be changed to Error throw in the next major version"), this[te].indexedRules = a.rules, this[te].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", s), this;
|
|
649
|
-
}, e.buildIndexFor = function(n) {
|
|
650
|
-
for (var s = /* @__PURE__ */ Object.create(null), a = this[te].RuleType, l = !0, m = !1, c = 0; c < n.length; c++) {
|
|
651
|
-
var u = new a(n[c]), v = this.expandActions(u.actions), d = st(u.subject), S = n.length - c - 1;
|
|
652
|
-
l = !!(l && u.inverted), !m && u.fields && (m = !0);
|
|
653
|
-
for (var b = 0; b < d.length; b++) {
|
|
654
|
-
var y = d[b];
|
|
655
|
-
s[y] = s[y] || /* @__PURE__ */ Object.create(null);
|
|
656
|
-
for (var P = 0; P < v.length; P++) {
|
|
657
|
-
var C = v[P];
|
|
658
|
-
s[y][C] = s[y][C] || /* @__PURE__ */ Object.create(null), s[y][C][S] = u;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
return {
|
|
663
|
-
isAllInverted: l,
|
|
664
|
-
hasPerFieldRules: m,
|
|
665
|
-
rules: s
|
|
666
|
-
};
|
|
667
|
-
}, e.expandActions = function(n) {
|
|
668
|
-
for (var s = this[te].aliases, a = st(n), l = 0; l < a.length; ) {
|
|
669
|
-
var m = a[l++];
|
|
670
|
-
s.hasOwnProperty(m) && (a = a.concat(s[m]));
|
|
671
|
-
}
|
|
672
|
-
return a;
|
|
673
|
-
}, e.can = function(n, s, a) {
|
|
674
|
-
if (a && typeof a != "string")
|
|
675
|
-
throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
|
|
676
|
-
var l = this.relevantRuleFor(n, s, a);
|
|
677
|
-
return !!l && !l.inverted;
|
|
678
|
-
}, e.relevantRuleFor = function(n, s, a) {
|
|
679
|
-
for (var l = this.rulesFor(n, s, a), m = 0; m < l.length; m++)
|
|
680
|
-
if (l[m].matches(s))
|
|
681
|
-
return l[m];
|
|
682
|
-
return null;
|
|
683
|
-
}, e.possibleRulesFor = function(n, s) {
|
|
684
|
-
var a = this.subjectName(s), l = this[te].mergedRules, m = a + "_" + n;
|
|
685
|
-
return l[m] || (l[m] = this.mergeRulesFor(n, a)), l[m];
|
|
686
|
-
}, e.mergeRulesFor = function(n, s) {
|
|
687
|
-
var a = this[te].indexedRules, l = [s, "all"].reduce(function(m, c) {
|
|
688
|
-
var u = a[c];
|
|
689
|
-
return u ? Object.assign(m, u[n], u.manage) : m;
|
|
690
|
-
}, []);
|
|
691
|
-
return l.filter(Boolean);
|
|
692
|
-
}, e.rulesFor = function(n, s, a) {
|
|
693
|
-
var l = this.possibleRulesFor(n, s);
|
|
694
|
-
return this[te].hasPerFieldRules ? l.filter(function(m) {
|
|
695
|
-
return m.isRelevantFor(s, a);
|
|
696
|
-
}) : l;
|
|
697
|
-
}, e.cannot = function() {
|
|
698
|
-
return !this.can.apply(this, arguments);
|
|
699
|
-
}, e.throwUnlessCan = function() {
|
|
700
|
-
var n;
|
|
701
|
-
console.warn(`
|
|
702
|
-
Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
|
|
703
|
-
Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
|
|
704
|
-
`.trim()), (n = rn.from(this)).throwUnlessCan.apply(n, arguments);
|
|
705
|
-
}, e.on = function(n, s) {
|
|
706
|
-
var a = this[te].events, l = !0;
|
|
707
|
-
return a[n] || (a[n] = []), a[n].push(s), function() {
|
|
708
|
-
if (l) {
|
|
709
|
-
var m = a[n].indexOf(s);
|
|
710
|
-
a[n].splice(m, 1), l = !1;
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
|
-
}, e.emit = function(n, s) {
|
|
714
|
-
var a = this[te].events[n];
|
|
715
|
-
a && a.slice(0).forEach(function(l) {
|
|
716
|
-
return l(s);
|
|
717
|
-
});
|
|
718
|
-
}, Zr(t, [{
|
|
719
|
-
key: "rules",
|
|
720
|
-
get: function() {
|
|
721
|
-
return this[te].originalRules;
|
|
722
|
-
}
|
|
723
|
-
}]), t;
|
|
724
|
-
}(), ye;
|
|
725
|
-
((t) => {
|
|
726
|
-
((e) => {
|
|
727
|
-
e[e.feedMe = 0] = "feedMe", e[e.business = 1] = "business", e[e.restaurant = 2] = "restaurant";
|
|
728
|
-
})(t.Level || (t.Level = {})), ((e) => {
|
|
729
|
-
e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete";
|
|
730
|
-
})(t.Action || (t.Action = {}));
|
|
731
|
-
})(ye || (ye = {}));
|
|
732
|
-
((t) => {
|
|
733
|
-
((e) => {
|
|
734
|
-
((r) => {
|
|
735
|
-
r.all = "all", r.restaurant = "restaurant", r.business = "business", r.delivery = "delivery", r.agent = "agent";
|
|
736
|
-
})(e.Feedme || (e.Feedme = {})), ((r) => {
|
|
737
|
-
r.quota = "quota", r.owner = "owner";
|
|
738
|
-
})(e.FeedmeBusinessField || (e.FeedmeBusinessField = {})), ((r) => {
|
|
739
|
-
r.profile = "business::profile", r.restaurant = "business::restaurant", r.menu = "business::menu", r.promotion = "business::promotion", r.voucher = "business::voucher", r.membership = "business::membership", r.stock = "business::stock", r.permission = "business::permission", r.role = "business::role";
|
|
740
|
-
})(e.Business || (e.Business = {})), ((r) => {
|
|
741
|
-
r.restaurant = "restaurant";
|
|
742
|
-
})(e.Restaurant || (e.Restaurant = {}));
|
|
743
|
-
})(t.Subject || (t.Subject = {}));
|
|
744
|
-
})(ye || (ye = {}));
|
|
745
|
-
function hn(t, e) {
|
|
746
|
-
const n = fe().sessionUser.value;
|
|
747
|
-
if (!n)
|
|
748
|
-
return;
|
|
749
|
-
const { isAdmin: s } = n.role, a = n.permissions, l = e.filter((m) => m.businessId === t._id).length;
|
|
750
|
-
return t.restaurantQuota > l && ((n == null ? void 0 : n.id) === t.ownerId || s) && new mn(a).can(
|
|
751
|
-
ye.Action.manage,
|
|
752
|
-
ye.Subject.Feedme.all
|
|
753
|
-
);
|
|
754
|
-
}
|
|
755
|
-
const vn = (t) => {
|
|
756
|
-
const e = re(t || "");
|
|
757
|
-
function r(a) {
|
|
758
|
-
return `${a}`.trim().toLowerCase();
|
|
759
|
-
}
|
|
760
|
-
const n = X(() => r(e.value));
|
|
761
|
-
function s(a) {
|
|
762
|
-
return n.value ? a.some((l) => r(l).includes(n.value)) : !0;
|
|
763
|
-
}
|
|
764
|
-
return { searchKey: e, filter: s };
|
|
765
|
-
};
|
|
766
|
-
function At(t = "no name") {
|
|
767
|
-
return {
|
|
768
|
-
name: t,
|
|
769
|
-
address: {
|
|
770
|
-
line1: "",
|
|
771
|
-
line2: "",
|
|
772
|
-
state: "",
|
|
773
|
-
city: "",
|
|
774
|
-
postcode: "",
|
|
775
|
-
country: "",
|
|
776
|
-
coordinates: []
|
|
777
|
-
},
|
|
778
|
-
phoneNo: "",
|
|
779
|
-
regNo: "",
|
|
780
|
-
email: ""
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
function Ot() {
|
|
784
|
-
return Ee({
|
|
785
|
-
line1: "",
|
|
786
|
-
line2: "",
|
|
787
|
-
city: "",
|
|
788
|
-
postcode: "",
|
|
789
|
-
state: "",
|
|
790
|
-
country: "",
|
|
791
|
-
coordinates: []
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
function Ee(t) {
|
|
795
|
-
return {
|
|
796
|
-
...t,
|
|
797
|
-
get formatted() {
|
|
798
|
-
const { line1: e, line2: r, postcode: n, city: s, state: a, country: l } = t;
|
|
799
|
-
return [e, r || "", n, s, a, l].map((m) => m.replace(/,\s*$/, "")).filter((m) => !!m.trim()).join(", ");
|
|
800
|
-
},
|
|
801
|
-
get isValidPostcode() {
|
|
802
|
-
const e = Number.parseInt(t.postcode);
|
|
803
|
-
return !isNaN(e);
|
|
804
|
-
},
|
|
805
|
-
get isValid() {
|
|
806
|
-
const e = ["line2"];
|
|
807
|
-
return Object.keys(t).filter((r) => !e.includes(r)).every((r) => !!t[r]);
|
|
808
|
-
},
|
|
809
|
-
get isValidCoordinate() {
|
|
810
|
-
return (t.coordinates || []).length === 2;
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
const gn = {
|
|
815
|
-
class: /* @__PURE__ */ J([
|
|
816
|
-
"flex items-center",
|
|
817
|
-
"px-24 pt-16 pb-8",
|
|
818
|
-
"border-b border-fm-color-neutral-gray-100",
|
|
819
|
-
"space-x-4"
|
|
820
|
-
])
|
|
821
|
-
}, yn = { class: "fm-typo-en-title-sm-600 mr-auto" }, bn = {
|
|
822
|
-
class: /* @__PURE__ */ J(["flex flex-col", "flex-1 overflow-scroll", "w-full", "px-24"])
|
|
823
|
-
}, $n = /* @__PURE__ */ Z({
|
|
824
|
-
__name: "FullScreenForm",
|
|
825
|
-
props: {
|
|
826
|
-
show: { type: Boolean },
|
|
827
|
-
title: {},
|
|
828
|
-
primaryAction: {},
|
|
829
|
-
secondaryActions: {},
|
|
830
|
-
zIndex: { default: 50 }
|
|
831
|
-
},
|
|
832
|
-
emits: ["onPrimary", "onCancel"],
|
|
833
|
-
setup(t, { emit: e }) {
|
|
834
|
-
const r = e, n = () => {
|
|
835
|
-
r("onPrimary");
|
|
836
|
-
}, s = () => {
|
|
837
|
-
r("onCancel");
|
|
838
|
-
};
|
|
839
|
-
return (a, l) => {
|
|
840
|
-
const m = G("fm-button"), c = G("fm-form");
|
|
841
|
-
return T(), Q(Sr, { to: "body" }, [
|
|
842
|
-
O(Pr, { name: "fade" }, {
|
|
843
|
-
default: M(() => [
|
|
844
|
-
a.show ? (T(), Q(c, {
|
|
845
|
-
key: 0,
|
|
846
|
-
"blame-form-child-on-validation-failed": "",
|
|
847
|
-
class: J(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
|
|
848
|
-
style: Te({ zIndex: a.zIndex }),
|
|
849
|
-
tabindex: "-1",
|
|
850
|
-
onValidationSuccess: n,
|
|
851
|
-
onKeyup: Tr(s, ["esc"])
|
|
852
|
-
}, {
|
|
853
|
-
default: M(() => [
|
|
854
|
-
E("div", gn, [
|
|
855
|
-
E("p", yn, q(a.title), 1),
|
|
856
|
-
ne(a.$slots, "append-title", {}, void 0, !0),
|
|
857
|
-
(T(!0), j(se, null, pe(a.secondaryActions, (u) => (T(), Q(m, {
|
|
858
|
-
label: u.label,
|
|
859
|
-
variant: "tertiary",
|
|
860
|
-
onClick: u.click
|
|
861
|
-
}, null, 8, ["label", "onClick"]))), 256)),
|
|
862
|
-
O(m, {
|
|
863
|
-
label: a.primaryAction.label,
|
|
864
|
-
type: "submit",
|
|
865
|
-
variant: "primary"
|
|
866
|
-
}, null, 8, ["label"])
|
|
867
|
-
]),
|
|
868
|
-
E("div", bn, [
|
|
869
|
-
ne(a.$slots, "default", {}, void 0, !0)
|
|
870
|
-
])
|
|
871
|
-
]),
|
|
872
|
-
_: 3
|
|
873
|
-
}, 8, ["style"])) : ie("", !0)
|
|
874
|
-
]),
|
|
875
|
-
_: 3
|
|
876
|
-
})
|
|
877
|
-
]);
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
const En = /* @__PURE__ */ dr($n, [["__scopeId", "data-v-5b5c7179"]]), _n = { class: "fm-typo-en-body-lg-600" }, Rn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Lt = /* @__PURE__ */ Z({
|
|
882
|
-
__name: "FormLabel",
|
|
883
|
-
props: {
|
|
884
|
-
label: {},
|
|
885
|
-
optional: { type: Boolean, default: !1 },
|
|
886
|
-
subLabel: {}
|
|
887
|
-
},
|
|
888
|
-
setup(t) {
|
|
889
|
-
const e = t, r = X(() => e.optional && !e.subLabel ? "(optional)" : e.subLabel);
|
|
890
|
-
return (n, s) => (T(), j("p", _n, [
|
|
891
|
-
Ce(q(n.label) + " ", 1),
|
|
892
|
-
E("span", Rn, q(r.value), 1)
|
|
893
|
-
]));
|
|
894
|
-
}
|
|
895
|
-
}), wn = { class: "space-y-4" }, In = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, An = { class: "fm-typo-en-body-lg-600" }, St = /* @__PURE__ */ Z({
|
|
896
|
-
__name: "InfoBasic",
|
|
897
|
-
props: {
|
|
898
|
-
name: {
|
|
899
|
-
type: String,
|
|
900
|
-
required: !0
|
|
901
|
-
},
|
|
902
|
-
value: {
|
|
903
|
-
type: String,
|
|
904
|
-
required: !0
|
|
905
|
-
}
|
|
906
|
-
},
|
|
907
|
-
setup(t) {
|
|
908
|
-
return (e, r) => (T(), j("div", wn, [
|
|
909
|
-
E("div", In, q(t.name), 1),
|
|
910
|
-
E("div", An, q(t.value), 1)
|
|
911
|
-
]));
|
|
912
|
-
}
|
|
913
|
-
}), On = {}, Ln = { class: "py-4" };
|
|
914
|
-
function Sn(t, e) {
|
|
915
|
-
return T(), j("div", Ln, e[0] || (e[0] = [
|
|
916
|
-
E("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
917
|
-
]));
|
|
918
|
-
}
|
|
919
|
-
const Pn = /* @__PURE__ */ dr(On, [["render", Sn]]), Tn = {
|
|
920
|
-
key: 0,
|
|
921
|
-
class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
|
|
922
|
-
}, Cn = { class: "fm-typo-en-title-sm-600" }, Pt = /* @__PURE__ */ Z({
|
|
923
|
-
__name: "Summary",
|
|
924
|
-
props: {
|
|
925
|
-
title: {},
|
|
926
|
-
variant: {},
|
|
927
|
-
items: {}
|
|
928
|
-
},
|
|
929
|
-
setup(t) {
|
|
930
|
-
const e = t, r = lr();
|
|
931
|
-
function n() {
|
|
932
|
-
r.open({
|
|
933
|
-
title: e.title,
|
|
934
|
-
contentComponent: Ne("div", { class: "space-y-4" }, [
|
|
935
|
-
...e.items.map(
|
|
936
|
-
(s) => Ne(St, {
|
|
937
|
-
name: s.name,
|
|
938
|
-
value: s.value || "--"
|
|
939
|
-
})
|
|
940
|
-
)
|
|
941
|
-
])
|
|
942
|
-
});
|
|
943
|
-
}
|
|
944
|
-
return (s, a) => {
|
|
945
|
-
const l = G("FmButton");
|
|
946
|
-
return e.variant === "full" ? (T(), j("div", Tn, [
|
|
947
|
-
E("div", Cn, q(s.title), 1),
|
|
948
|
-
O(Pn),
|
|
949
|
-
(T(!0), j(se, null, pe(s.items, (m) => (T(), Q(St, {
|
|
950
|
-
key: m.name,
|
|
951
|
-
name: m.name,
|
|
952
|
-
value: m.value || "--"
|
|
953
|
-
}, null, 8, ["name", "value"]))), 128))
|
|
954
|
-
])) : (T(), Q(l, {
|
|
955
|
-
key: 1,
|
|
956
|
-
icon: "info",
|
|
957
|
-
variant: "tertiary",
|
|
958
|
-
onClick: n
|
|
959
|
-
}));
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
}), Nn = {
|
|
963
|
-
key: 0,
|
|
964
|
-
class: "space-y-4"
|
|
965
|
-
}, kn = { class: "fm-typo-en-body-lg-600" }, xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Vn = {
|
|
966
|
-
class: /* @__PURE__ */ J(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
|
|
967
|
-
}, Fn = {
|
|
968
|
-
class: /* @__PURE__ */ J(["relative z-0", "w-full h-full", "overflow-hidden"])
|
|
969
|
-
}, jn = ["src"], Un = { class: "fm-typo-en-body-lg-600" }, Mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ve = /* @__PURE__ */ Z({
|
|
970
|
-
__name: "ImageDropField",
|
|
971
|
-
props: {
|
|
972
|
-
label: {},
|
|
973
|
-
subLabel: {},
|
|
974
|
-
modelValue: {},
|
|
975
|
-
previousUrl: {},
|
|
976
|
-
width: { default: 323 },
|
|
977
|
-
height: { default: 216 },
|
|
978
|
-
canDelete: { type: Boolean, default: !0 }
|
|
979
|
-
},
|
|
980
|
-
emits: ["update:model-value", "reset:model-value"],
|
|
981
|
-
setup(t, { emit: e }) {
|
|
982
|
-
const r = t, n = e, s = X(() => r.modelValue ? URL.createObjectURL(r.modelValue) : r.previousUrl);
|
|
983
|
-
return (a, l) => {
|
|
984
|
-
const m = G("fm-icon"), c = G("fm-drop-field");
|
|
985
|
-
return s.value ? (T(), j("div", Nn, [
|
|
986
|
-
E("p", kn, [
|
|
987
|
-
Ce(q(r.label) + " ", 1),
|
|
988
|
-
E("span", xn, q(a.subLabel), 1)
|
|
989
|
-
]),
|
|
990
|
-
E("div", {
|
|
991
|
-
class: J(["relative", "border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"]),
|
|
992
|
-
style: Te({ width: `${r.width}px`, height: `${r.height}px` })
|
|
993
|
-
}, [
|
|
994
|
-
E("div", Vn, [
|
|
995
|
-
E("div", Fn, [
|
|
996
|
-
E("img", {
|
|
997
|
-
class: J(["h-full w-full", "object-cover"]),
|
|
998
|
-
src: s.value,
|
|
999
|
-
alt: "product image"
|
|
1000
|
-
}, null, 8, jn)
|
|
1001
|
-
])
|
|
1002
|
-
]),
|
|
1003
|
-
a.canDelete ? (T(), j("button", {
|
|
1004
|
-
key: 0,
|
|
1005
|
-
class: J([
|
|
1006
|
-
"absolute top-12 right-12 z-10",
|
|
1007
|
-
"w-24 h-24 rounded-[50%]",
|
|
1008
|
-
"bg-fm-color-neutral-white"
|
|
1009
|
-
]),
|
|
1010
|
-
type: "button",
|
|
1011
|
-
onClick: l[0] || (l[0] = (u) => n("reset:model-value"))
|
|
1012
|
-
}, [
|
|
1013
|
-
O(m, { name: "close" })
|
|
1014
|
-
])) : ie("", !0)
|
|
1015
|
-
], 4)
|
|
1016
|
-
])) : (T(), Q(c, {
|
|
1017
|
-
key: 1,
|
|
1018
|
-
accept: ".jpg, .jpeg, .png, .gif",
|
|
1019
|
-
style: Te({ width: `${r.width}px`, height: `${r.height}px` }),
|
|
1020
|
-
onFileUpload: l[1] || (l[1] = (u) => n("update:model-value", u))
|
|
1021
|
-
}, {
|
|
1022
|
-
label: M(() => [
|
|
1023
|
-
E("p", Un, [
|
|
1024
|
-
Ce(q(r.label) + " ", 1),
|
|
1025
|
-
E("span", Mn, q(r.subLabel), 1)
|
|
1026
|
-
])
|
|
1027
|
-
]),
|
|
1028
|
-
"accept-text": M(() => l[2] || (l[2] = [
|
|
1029
|
-
E("p", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Accepts .jpg, .jpeg, .png, .gif ", -1)
|
|
1030
|
-
])),
|
|
1031
|
-
_: 1
|
|
1032
|
-
}, 8, ["style"]));
|
|
1033
|
-
};
|
|
1034
|
-
}
|
|
1035
|
-
}), Dn = { class: "space-y-24" }, Bn = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Gn = { class: "flex-1" }, Kn = { class: "flex-1" }, qn = { class: "flex gap-16 xs:flex-col xs:gap-24" }, zn = { class: "flex-1" }, Hn = { class: "flex-1" }, Xn = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Yn = { class: "flex-1" }, Wn = { class: "flex-1" }, Jn = /* @__PURE__ */ Z({
|
|
1036
|
-
__name: "RestaurantAddress",
|
|
1037
|
-
props: {
|
|
1038
|
-
modelValue: {
|
|
1039
|
-
type: Object,
|
|
1040
|
-
required: !0
|
|
1041
|
-
}
|
|
1042
|
-
},
|
|
1043
|
-
emits: ["update:model-value"],
|
|
1044
|
-
setup(t, { emit: e }) {
|
|
1045
|
-
Ot();
|
|
1046
|
-
const r = t, n = e, s = X(() => ge(r.modelValue || Ot()));
|
|
1047
|
-
function a(m) {
|
|
1048
|
-
return (m || "").toString();
|
|
1049
|
-
}
|
|
1050
|
-
function l(m) {
|
|
1051
|
-
n("update:model-value", m(s.value));
|
|
1052
|
-
}
|
|
1053
|
-
return (m, c) => {
|
|
1054
|
-
const u = G("FmTextField");
|
|
1055
|
-
return T(), j("div", Dn, [
|
|
1056
|
-
E("div", Bn, [
|
|
1057
|
-
E("div", Gn, [
|
|
1058
|
-
O(u, {
|
|
1059
|
-
"model-value": s.value.line1,
|
|
1060
|
-
label: "Line 1",
|
|
1061
|
-
"label-mark": "required",
|
|
1062
|
-
rules: [z(ce)],
|
|
1063
|
-
"onUpdate:modelValue": c[0] || (c[0] = (v) => l((d) => ({ ...d, line1: a(v) })))
|
|
1064
|
-
}, null, 8, ["model-value", "rules"])
|
|
1065
|
-
]),
|
|
1066
|
-
E("div", Kn, [
|
|
1067
|
-
O(u, {
|
|
1068
|
-
"model-value": s.value.line2,
|
|
1069
|
-
label: "Line 2",
|
|
1070
|
-
"onUpdate:modelValue": c[1] || (c[1] = (v) => l((d) => ({ ...d, line2: a(v) })))
|
|
1071
|
-
}, null, 8, ["model-value"])
|
|
1072
|
-
])
|
|
1073
|
-
]),
|
|
1074
|
-
E("div", qn, [
|
|
1075
|
-
E("div", zn, [
|
|
1076
|
-
O(u, {
|
|
1077
|
-
"model-value": s.value.city,
|
|
1078
|
-
rules: [z(ce)],
|
|
1079
|
-
label: "City",
|
|
1080
|
-
"label-mark": "required",
|
|
1081
|
-
"onUpdate:modelValue": c[2] || (c[2] = (v) => l((d) => ({ ...d, city: a(v) })))
|
|
1082
|
-
}, null, 8, ["model-value", "rules"])
|
|
1083
|
-
]),
|
|
1084
|
-
E("div", Hn, [
|
|
1085
|
-
O(u, {
|
|
1086
|
-
"model-value": s.value.postcode,
|
|
1087
|
-
label: "Postal code",
|
|
1088
|
-
"label-mark": "required",
|
|
1089
|
-
rules: [z(ce)],
|
|
1090
|
-
"onUpdate:modelValue": c[3] || (c[3] = (v) => l((d) => ({ ...d, postcode: a(v) })))
|
|
1091
|
-
}, null, 8, ["model-value", "rules"])
|
|
1092
|
-
])
|
|
1093
|
-
]),
|
|
1094
|
-
E("div", Xn, [
|
|
1095
|
-
E("div", Yn, [
|
|
1096
|
-
O(u, {
|
|
1097
|
-
"model-value": s.value.state,
|
|
1098
|
-
label: "State",
|
|
1099
|
-
"label-mark": "required",
|
|
1100
|
-
rules: [z(ce)],
|
|
1101
|
-
"onUpdate:modelValue": c[4] || (c[4] = (v) => l((d) => ({ ...d, state: a(v) })))
|
|
1102
|
-
}, null, 8, ["model-value", "rules"])
|
|
1103
|
-
]),
|
|
1104
|
-
E("div", Wn, [
|
|
1105
|
-
O(u, {
|
|
1106
|
-
"model-value": s.value.country,
|
|
1107
|
-
label: "Country",
|
|
1108
|
-
"label-mark": "required",
|
|
1109
|
-
rules: [z(ce)],
|
|
1110
|
-
"onUpdate:modelValue": c[5] || (c[5] = (v) => l((d) => ({ ...d, country: a(v) })))
|
|
1111
|
-
}, null, 8, ["model-value", "rules"])
|
|
1112
|
-
])
|
|
1113
|
-
])
|
|
1114
|
-
]);
|
|
1115
|
-
};
|
|
1116
|
-
}
|
|
1117
|
-
}), Zn = /* @__PURE__ */ Z({
|
|
1118
|
-
__name: "GoogleMap",
|
|
1119
|
-
props: {
|
|
1120
|
-
markers: {
|
|
1121
|
-
type: Array,
|
|
1122
|
-
default: () => []
|
|
1123
|
-
},
|
|
1124
|
-
polygons: {
|
|
1125
|
-
type: Array,
|
|
1126
|
-
default: () => []
|
|
1127
|
-
},
|
|
1128
|
-
zoom: {
|
|
1129
|
-
type: Number,
|
|
1130
|
-
default: 14
|
|
1131
|
-
},
|
|
1132
|
-
editable: {
|
|
1133
|
-
type: Boolean,
|
|
1134
|
-
default: !1
|
|
1135
|
-
},
|
|
1136
|
-
center: {
|
|
1137
|
-
type: Object,
|
|
1138
|
-
default: xe.jb
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
|
|
1142
|
-
setup(t, { expose: e, emit: r }) {
|
|
1143
|
-
const n = t, s = r;
|
|
1144
|
-
e({
|
|
1145
|
-
setCenter: (o) => {
|
|
1146
|
-
var i;
|
|
1147
|
-
(i = l.value) == null || i.setCenter(o);
|
|
1148
|
-
}
|
|
1149
|
-
});
|
|
1150
|
-
const a = re(), l = re(null), m = [];
|
|
1151
|
-
function c(o) {
|
|
1152
|
-
return {
|
|
1153
|
-
lat: o.latLng.lat(),
|
|
1154
|
-
lng: o.latLng.lng()
|
|
1155
|
-
};
|
|
1156
|
-
}
|
|
1157
|
-
function u(o, i, h) {
|
|
1158
|
-
const f = he().maps.event.addListener(o, i, h);
|
|
1159
|
-
m.push(f);
|
|
1160
|
-
}
|
|
1161
|
-
const v = re([]);
|
|
1162
|
-
function d(o, i, h) {
|
|
1163
|
-
u(o, i, h);
|
|
1164
|
-
}
|
|
1165
|
-
function S(o) {
|
|
1166
|
-
b(null), v.value = o.map((i, h) => {
|
|
1167
|
-
const f = he(), w = new f.maps.Marker({
|
|
1168
|
-
position: i,
|
|
1169
|
-
draggable: !0
|
|
1170
|
-
});
|
|
1171
|
-
return d(w, "dragend", (p) => {
|
|
1172
|
-
s("marker-change", { index: h, position: c(p) });
|
|
1173
|
-
}), w;
|
|
1174
|
-
}), b(l.value);
|
|
1175
|
-
}
|
|
1176
|
-
function b(o) {
|
|
1177
|
-
v.value.map((i) => $t(i).setMap(o));
|
|
1178
|
-
}
|
|
1179
|
-
const y = re([]);
|
|
1180
|
-
function P(o, i, h) {
|
|
1181
|
-
u(o, i, h);
|
|
1182
|
-
}
|
|
1183
|
-
function C(o, i, h) {
|
|
1184
|
-
u(o, i, h);
|
|
1185
|
-
}
|
|
1186
|
-
function k(o) {
|
|
1187
|
-
return y.value[o].getPath().getArray().map(({ lat: h, lng: f }) => ({
|
|
1188
|
-
lat: h(),
|
|
1189
|
-
lng: f()
|
|
1190
|
-
}));
|
|
1191
|
-
}
|
|
1192
|
-
function A(o) {
|
|
1193
|
-
const i = k(o);
|
|
1194
|
-
s("polygon-change", { index: o, path: i });
|
|
1195
|
-
}
|
|
1196
|
-
function L(o, i) {
|
|
1197
|
-
const f = k(o).filter((w, p) => p !== i);
|
|
1198
|
-
s("polygon-change", { index: o, path: f });
|
|
1199
|
-
}
|
|
1200
|
-
function V(o, i) {
|
|
1201
|
-
i.vertex !== void 0 ? L(o, i.vertex) : s("polygon-right-click", o);
|
|
1202
|
-
}
|
|
1203
|
-
function W(o) {
|
|
1204
|
-
D(null), y.value = o.map((i, h) => {
|
|
1205
|
-
const f = he(), w = new f.maps.Polygon({
|
|
1206
|
-
paths: i.paths,
|
|
1207
|
-
strokeColor: i.strokeColor,
|
|
1208
|
-
fillColor: i.fillColor,
|
|
1209
|
-
fillOpacity: 0.5,
|
|
1210
|
-
editable: n.editable
|
|
1211
|
-
});
|
|
1212
|
-
return P(w, "contextmenu", (p) => V(h, p)), w.getPaths().forEach((p) => {
|
|
1213
|
-
C(p, "insert_at", () => A(h)), C(p, "set_at", () => A(h));
|
|
1214
|
-
}), w;
|
|
1215
|
-
}), D(l.value);
|
|
1216
|
-
}
|
|
1217
|
-
function D(o) {
|
|
1218
|
-
y.value.map((i) => $t(i).setMap(o));
|
|
1219
|
-
}
|
|
1220
|
-
function K(o, i, h) {
|
|
1221
|
-
u(o, i, h);
|
|
1222
|
-
}
|
|
1223
|
-
function F() {
|
|
1224
|
-
const o = he().maps.Map;
|
|
1225
|
-
l.value = new o(a.value, {
|
|
1226
|
-
center: n.center,
|
|
1227
|
-
zoom: n.zoom,
|
|
1228
|
-
mapTypeControl: !1,
|
|
1229
|
-
streetViewControl: !1,
|
|
1230
|
-
draggable: !0,
|
|
1231
|
-
scrollwheel: !0
|
|
1232
|
-
}), K(l.value, "click", (i) => s("map-click", c(i)));
|
|
1233
|
-
}
|
|
1234
|
-
return tt(() => n.markers, S, { deep: !0 }), tt(() => n.polygons, W, { deep: !0 }), rr(() => {
|
|
1235
|
-
!a.value || !he() || (F(), S(n.markers), W(n.polygons));
|
|
1236
|
-
}), Cr(() => {
|
|
1237
|
-
m.forEach((o) => o.remove());
|
|
1238
|
-
}), (o, i) => (T(), j("div", {
|
|
1239
|
-
ref_key: "mapRef",
|
|
1240
|
-
ref: a,
|
|
1241
|
-
class: "map app-map"
|
|
1242
|
-
}, null, 512));
|
|
1243
|
-
}
|
|
1244
|
-
}), Qn = { class: "space-y-24" }, es = { class: "flex flex-row gap-8" }, ts = { class: "flex gap-8" }, rs = { class: "flex gap-8" }, ns = /* @__PURE__ */ Z({
|
|
1245
|
-
__name: "CoordinateDialog",
|
|
1246
|
-
props: {
|
|
1247
|
-
address: {
|
|
1248
|
-
type: String,
|
|
1249
|
-
required: !0
|
|
1250
|
-
},
|
|
1251
|
-
coordinate: {
|
|
1252
|
-
type: Object,
|
|
1253
|
-
default: void 0
|
|
1254
|
-
}
|
|
1255
|
-
},
|
|
1256
|
-
setup(t) {
|
|
1257
|
-
const e = t, { emitData: r } = jr(), n = lt(
|
|
1258
|
-
ge(e.coordinate ? e.coordinate : xe.jb)
|
|
1259
|
-
);
|
|
1260
|
-
function s({ position: a }) {
|
|
1261
|
-
n.lat = a.lat, n.lng = a.lng, r(n);
|
|
1262
|
-
}
|
|
1263
|
-
return r(n), (a, l) => (T(), j("div", Qn, [
|
|
1264
|
-
E("div", null, [
|
|
1265
|
-
E("div", es, [
|
|
1266
|
-
l[1] || (l[1] = E("div", null, "Address:", -1)),
|
|
1267
|
-
E("div", null, q(t.address || "--"), 1)
|
|
1268
|
-
]),
|
|
1269
|
-
E("div", ts, [
|
|
1270
|
-
l[2] || (l[2] = E("div", null, "Latitude:", -1)),
|
|
1271
|
-
E("div", null, q(n.lat), 1)
|
|
1272
|
-
]),
|
|
1273
|
-
E("div", rs, [
|
|
1274
|
-
l[3] || (l[3] = E("div", null, "Longitude:", -1)),
|
|
1275
|
-
E("div", null, q(n.lng), 1)
|
|
1276
|
-
])
|
|
1277
|
-
]),
|
|
1278
|
-
O(Zn, {
|
|
1279
|
-
class: "w-full",
|
|
1280
|
-
style: { height: "300px" },
|
|
1281
|
-
editable: "",
|
|
1282
|
-
center: n,
|
|
1283
|
-
markers: [n],
|
|
1284
|
-
onMarkerChange: s,
|
|
1285
|
-
onMapClick: l[0] || (l[0] = (m) => s({ position: m }))
|
|
1286
|
-
}, null, 8, ["center", "markers"])
|
|
1287
|
-
]));
|
|
1288
|
-
}
|
|
1289
|
-
}), ss = /* @__PURE__ */ Z({
|
|
1290
|
-
__name: "CoordinateInput",
|
|
1291
|
-
props: {
|
|
1292
|
-
modelValue: {
|
|
1293
|
-
type: Array,
|
|
1294
|
-
default: void 0
|
|
1295
|
-
},
|
|
1296
|
-
address: {
|
|
1297
|
-
type: Object,
|
|
1298
|
-
required: !0
|
|
1299
|
-
},
|
|
1300
|
-
required: {
|
|
1301
|
-
type: Boolean,
|
|
1302
|
-
default: !1
|
|
1303
|
-
}
|
|
1304
|
-
},
|
|
1305
|
-
emits: ["update:model-value"],
|
|
1306
|
-
setup(t, { emit: e }) {
|
|
1307
|
-
const r = t, n = e, s = lr(), a = X(() => {
|
|
1308
|
-
const v = r.modelValue || [];
|
|
1309
|
-
return v.length < 2 ? null : Gr(v);
|
|
1310
|
-
}), l = X(() => a.value ? `${a.value.lat}, ${a.value.lng}` : "");
|
|
1311
|
-
async function m() {
|
|
1312
|
-
const v = he().maps.Geocoder, d = new v();
|
|
1313
|
-
let S = a.value;
|
|
1314
|
-
S || await new Promise((b) => {
|
|
1315
|
-
r.address.formatted ? d.geocode({ address: r.address.formatted }, (y) => {
|
|
1316
|
-
var C;
|
|
1317
|
-
const P = (C = y == null ? void 0 : y[0]) == null ? void 0 : C.geometry;
|
|
1318
|
-
S = P ? { lng: P.location.lng(), lat: P.location.lat() } : xe.jb, b(!0);
|
|
1319
|
-
}) : (S = xe.jb, b(!0));
|
|
1320
|
-
}), s.open({
|
|
1321
|
-
contentComponent: ns,
|
|
1322
|
-
contentComponentProps: {
|
|
1323
|
-
address: r.address.formatted,
|
|
1324
|
-
coordinate: S
|
|
1325
|
-
},
|
|
1326
|
-
title: "Coordinate",
|
|
1327
|
-
primaryActions: {
|
|
1328
|
-
text: "Confirm",
|
|
1329
|
-
variant: "primary",
|
|
1330
|
-
close: !0
|
|
1331
|
-
},
|
|
1332
|
-
secondaryActions: {
|
|
1333
|
-
text: "Delete",
|
|
1334
|
-
variant: "destructive",
|
|
1335
|
-
close: !0
|
|
1336
|
-
}
|
|
1337
|
-
}).onPrimary(async (b) => {
|
|
1338
|
-
const y = b ? Kr(b) : [];
|
|
1339
|
-
u(), n("update:model-value", y);
|
|
1340
|
-
}).onSecondary(() => {
|
|
1341
|
-
u(), n("update:model-value", []);
|
|
1342
|
-
});
|
|
1343
|
-
}
|
|
1344
|
-
const c = re(!1);
|
|
1345
|
-
function u() {
|
|
1346
|
-
c.value = !1;
|
|
1347
|
-
}
|
|
1348
|
-
return (v, d) => {
|
|
1349
|
-
const S = G("FmIcon"), b = G("FmField"), y = G("FmFormGroup");
|
|
1350
|
-
return T(), Q(y, {
|
|
1351
|
-
modelValue: a.value,
|
|
1352
|
-
"onUpdate:modelValue": d[0] || (d[0] = (P) => a.value = P),
|
|
1353
|
-
label: "Coordinate"
|
|
1354
|
-
}, {
|
|
1355
|
-
default: M(() => [
|
|
1356
|
-
O(b, {
|
|
1357
|
-
class: "cursor-pointer",
|
|
1358
|
-
onClick: m
|
|
1359
|
-
}, {
|
|
1360
|
-
prepend: M(() => [
|
|
1361
|
-
ne(v.$slots, "prepend")
|
|
1362
|
-
]),
|
|
1363
|
-
append: M(() => [
|
|
1364
|
-
O(S, {
|
|
1365
|
-
class: "text-fm-color-neutral-gray-400",
|
|
1366
|
-
name: "location_on",
|
|
1367
|
-
outline: "",
|
|
1368
|
-
size: "md"
|
|
1369
|
-
})
|
|
1370
|
-
]),
|
|
1371
|
-
default: M(() => [
|
|
1372
|
-
ne(v.$slots, "default", {}, () => [
|
|
1373
|
-
E("div", {
|
|
1374
|
-
class: J([[a.value ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1375
|
-
}, q(a.value ? l.value : "Not set"), 3)
|
|
1376
|
-
])
|
|
1377
|
-
]),
|
|
1378
|
-
_: 3
|
|
1379
|
-
})
|
|
1380
|
-
]),
|
|
1381
|
-
_: 3
|
|
1382
|
-
}, 8, ["modelValue"]);
|
|
1383
|
-
};
|
|
1384
|
-
}
|
|
1385
|
-
}), as = { class: "w-[140px] pt-16" }, os = { class: "pl-32" }, ls = {
|
|
1386
|
-
key: 1,
|
|
1387
|
-
class: "flex gap-8 items-center my-8"
|
|
1388
|
-
}, is = /* @__PURE__ */ Z({
|
|
1389
|
-
__name: "OperationHoursInput",
|
|
1390
|
-
props: {
|
|
1391
|
-
modelValue: {
|
|
1392
|
-
type: Object,
|
|
1393
|
-
default: void 0
|
|
1394
|
-
},
|
|
1395
|
-
title: {
|
|
1396
|
-
type: String,
|
|
1397
|
-
required: !1
|
|
1398
|
-
}
|
|
1399
|
-
},
|
|
1400
|
-
emits: ["update:model-value"],
|
|
1401
|
-
setup(t, { emit: e }) {
|
|
1402
|
-
const r = t, n = e, s = ut(), a = ct().startOf("week"), l = X(
|
|
1403
|
-
() => Array.from(Array(7)).map((k, A) => ({
|
|
1404
|
-
key: A.toString(),
|
|
1405
|
-
label: a.add(A, "day").format("dddd"),
|
|
1406
|
-
value: A < 6 ? A + 1 : 0,
|
|
1407
|
-
// key of OperatingHours, since data start from sunday, UI start from monday
|
|
1408
|
-
slot: `checkbox-${A}-end`
|
|
1409
|
-
}))
|
|
1410
|
-
), m = X(
|
|
1411
|
-
() => r.modelValue ? Object.values(r.modelValue) : Array.from(Array(7)).map(() => ({
|
|
1412
|
-
enable: !1,
|
|
1413
|
-
hours: []
|
|
1414
|
-
}))
|
|
1415
|
-
), c = X(() => Object.values(m.value).map((k) => k.hours)), u = X(() => m.value.reduce((k, A, L) => (A.hours.length > 0 && k.push(L), k), []));
|
|
1416
|
-
function v() {
|
|
1417
|
-
return { start: "00:00", end: "23:59" };
|
|
1418
|
-
}
|
|
1419
|
-
function d(k) {
|
|
1420
|
-
const A = u.value.find((V) => !k.includes(V));
|
|
1421
|
-
if (A !== void 0) {
|
|
1422
|
-
C((V) => (V[A].enable = !1, V[A].hours = [], V));
|
|
1423
|
-
return;
|
|
1424
|
-
}
|
|
1425
|
-
const L = k.find((V) => !u.value.includes(V));
|
|
1426
|
-
L !== void 0 && m.value[L].hours.length === 0 && C((V) => (V[L].enable = !0, V[L].hours = [v()], V));
|
|
1427
|
-
}
|
|
1428
|
-
function S(k) {
|
|
1429
|
-
C((A) => (A[k].hours.push(v()), A));
|
|
1430
|
-
}
|
|
1431
|
-
function b(k, A) {
|
|
1432
|
-
c.value[k].length > 1 ? C((L) => (L[k].hours.splice(A, 1), L)) : s.open({ title: "Cannot remove last timeslot", type: "error" });
|
|
1433
|
-
}
|
|
1434
|
-
function y(k, A, L) {
|
|
1435
|
-
L && C((V) => (V[k].hours[A].start = L, V));
|
|
1436
|
-
}
|
|
1437
|
-
function P(k, A, L) {
|
|
1438
|
-
L && C((V) => (V[k].hours[A].end = L, V));
|
|
1439
|
-
}
|
|
1440
|
-
function C(k) {
|
|
1441
|
-
const A = k(ge(m.value)), L = {
|
|
1442
|
-
0: A[0],
|
|
1443
|
-
1: A[1],
|
|
1444
|
-
2: A[2],
|
|
1445
|
-
3: A[3],
|
|
1446
|
-
4: A[4],
|
|
1447
|
-
5: A[5],
|
|
1448
|
-
6: A[6]
|
|
1449
|
-
};
|
|
1450
|
-
n("update:model-value", L);
|
|
1451
|
-
}
|
|
1452
|
-
return (k, A) => {
|
|
1453
|
-
const L = G("FmCheckbox"), V = G("FmTimePicker"), W = G("FmButton"), D = G("FmField");
|
|
1454
|
-
return T(), j("div", null, [
|
|
1455
|
-
(T(!0), j(se, null, pe(l.value, (K) => (T(), j("div", {
|
|
1456
|
-
key: K.value,
|
|
1457
|
-
class: "flex flex-col items-start"
|
|
1458
|
-
}, [
|
|
1459
|
-
E("div", as, [
|
|
1460
|
-
O(L, {
|
|
1461
|
-
"model-value": u.value,
|
|
1462
|
-
label: K.label,
|
|
1463
|
-
value: K.value,
|
|
1464
|
-
"onUpdate:modelValue": d
|
|
1465
|
-
}, null, 8, ["model-value", "label", "value"])
|
|
1466
|
-
]),
|
|
1467
|
-
E("div", os, [
|
|
1468
|
-
E("div", null, [
|
|
1469
|
-
u.value.includes(K.value) ? (T(!0), j(se, { key: 0 }, pe(c.value[K.value], (F, o) => (T(), j("div", {
|
|
1470
|
-
key: o,
|
|
1471
|
-
class: "flex items-center gap-8"
|
|
1472
|
-
}, [
|
|
1473
|
-
O(V, {
|
|
1474
|
-
"model-value": F.start,
|
|
1475
|
-
"onUpdate:modelValue": (i) => y(K.value, o, i)
|
|
1476
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1477
|
-
E("span", {
|
|
1478
|
-
class: J([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
1479
|
-
}, " to "),
|
|
1480
|
-
O(V, {
|
|
1481
|
-
"model-value": F.end,
|
|
1482
|
-
"onUpdate:modelValue": (i) => P(K.value, o, i)
|
|
1483
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1484
|
-
O(W, {
|
|
1485
|
-
icon: "close",
|
|
1486
|
-
variant: "tertiary",
|
|
1487
|
-
onClick: (i) => b(K.value, o)
|
|
1488
|
-
}, null, 8, ["onClick"]),
|
|
1489
|
-
O(W, {
|
|
1490
|
-
class: J(o === 0 ? "" : "invisible"),
|
|
1491
|
-
icon: "add",
|
|
1492
|
-
color: "primary",
|
|
1493
|
-
variant: "secondary",
|
|
1494
|
-
onClick: (i) => S(K.value)
|
|
1495
|
-
}, null, 8, ["class", "onClick"])
|
|
1496
|
-
]))), 128)) : (T(), j("div", ls, [
|
|
1497
|
-
O(D, null, {
|
|
1498
|
-
default: M(() => [
|
|
1499
|
-
E("div", {
|
|
1500
|
-
class: J([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1501
|
-
}, " Close ")
|
|
1502
|
-
]),
|
|
1503
|
-
_: 1
|
|
1504
|
-
}),
|
|
1505
|
-
E("span", {
|
|
1506
|
-
class: J([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
1507
|
-
}, " to "),
|
|
1508
|
-
O(D, null, {
|
|
1509
|
-
default: M(() => [
|
|
1510
|
-
E("div", {
|
|
1511
|
-
class: J([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1512
|
-
}, " Close ")
|
|
1513
|
-
]),
|
|
1514
|
-
_: 1
|
|
1515
|
-
})
|
|
1516
|
-
]))
|
|
1517
|
-
])
|
|
1518
|
-
])
|
|
1519
|
-
]))), 128))
|
|
1520
|
-
]);
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
}), mr = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), hr = [
|
|
1524
|
-
"home",
|
|
1525
|
-
"app",
|
|
1526
|
-
"about",
|
|
1527
|
-
"tnc",
|
|
1528
|
-
"terms-and-conditions",
|
|
1529
|
-
"redirection",
|
|
1530
|
-
"redirect",
|
|
1531
|
-
"auth",
|
|
1532
|
-
"login",
|
|
1533
|
-
"logout",
|
|
1534
|
-
"register",
|
|
1535
|
-
"user",
|
|
1536
|
-
"discovery",
|
|
1537
|
-
"discover",
|
|
1538
|
-
"order",
|
|
1539
|
-
"orders",
|
|
1540
|
-
"membership",
|
|
1541
|
-
"memberships",
|
|
1542
|
-
"member",
|
|
1543
|
-
"members",
|
|
1544
|
-
"benefit",
|
|
1545
|
-
"benefits",
|
|
1546
|
-
"reward",
|
|
1547
|
-
"rewards",
|
|
1548
|
-
"voucher",
|
|
1549
|
-
"vouchers",
|
|
1550
|
-
"search",
|
|
1551
|
-
"restaurant",
|
|
1552
|
-
"restaurants",
|
|
1553
|
-
"business",
|
|
1554
|
-
"businesses",
|
|
1555
|
-
"dine",
|
|
1556
|
-
"profile",
|
|
1557
|
-
"scan",
|
|
1558
|
-
"scanner",
|
|
1559
|
-
"menu",
|
|
1560
|
-
"cart",
|
|
1561
|
-
"me",
|
|
1562
|
-
"v",
|
|
1563
|
-
"active-orders",
|
|
1564
|
-
"qr",
|
|
1565
|
-
"setting",
|
|
1566
|
-
"settings",
|
|
1567
|
-
"error",
|
|
1568
|
-
"supportdetails",
|
|
1569
|
-
"support-details",
|
|
1570
|
-
"stacks",
|
|
1571
|
-
"imulus",
|
|
1572
|
-
"github",
|
|
1573
|
-
"twitter",
|
|
1574
|
-
"facebook",
|
|
1575
|
-
"google",
|
|
1576
|
-
"apple",
|
|
1577
|
-
"about",
|
|
1578
|
-
"account",
|
|
1579
|
-
"activate",
|
|
1580
|
-
"add",
|
|
1581
|
-
"admin",
|
|
1582
|
-
"administrator",
|
|
1583
|
-
"api",
|
|
1584
|
-
"app",
|
|
1585
|
-
"apps",
|
|
1586
|
-
"archive",
|
|
1587
|
-
"archives",
|
|
1588
|
-
"auth",
|
|
1589
|
-
"blog",
|
|
1590
|
-
"cache",
|
|
1591
|
-
"cancel",
|
|
1592
|
-
"careers",
|
|
1593
|
-
"cart",
|
|
1594
|
-
"changelog",
|
|
1595
|
-
"checkout",
|
|
1596
|
-
"codereview",
|
|
1597
|
-
"compare",
|
|
1598
|
-
"config",
|
|
1599
|
-
"configuration",
|
|
1600
|
-
"connect",
|
|
1601
|
-
"contact",
|
|
1602
|
-
"create",
|
|
1603
|
-
"delete",
|
|
1604
|
-
"direct_messages",
|
|
1605
|
-
"documentation",
|
|
1606
|
-
"download",
|
|
1607
|
-
"downloads",
|
|
1608
|
-
"edit",
|
|
1609
|
-
"email",
|
|
1610
|
-
"employment",
|
|
1611
|
-
"enterprise",
|
|
1612
|
-
"faq",
|
|
1613
|
-
"favorites",
|
|
1614
|
-
"feed",
|
|
1615
|
-
"feedback",
|
|
1616
|
-
"feeds",
|
|
1617
|
-
"fleet",
|
|
1618
|
-
"fleets",
|
|
1619
|
-
"follow",
|
|
1620
|
-
"followers",
|
|
1621
|
-
"following",
|
|
1622
|
-
"friend",
|
|
1623
|
-
"friends",
|
|
1624
|
-
"gist",
|
|
1625
|
-
"group",
|
|
1626
|
-
"groups",
|
|
1627
|
-
"help",
|
|
1628
|
-
"home",
|
|
1629
|
-
"hosting",
|
|
1630
|
-
"hostmaster",
|
|
1631
|
-
"idea",
|
|
1632
|
-
"ideas",
|
|
1633
|
-
"index",
|
|
1634
|
-
"info",
|
|
1635
|
-
"invitations",
|
|
1636
|
-
"invite",
|
|
1637
|
-
"is",
|
|
1638
|
-
"it",
|
|
1639
|
-
"job",
|
|
1640
|
-
"jobs",
|
|
1641
|
-
"json",
|
|
1642
|
-
"language",
|
|
1643
|
-
"languages",
|
|
1644
|
-
"lists",
|
|
1645
|
-
"login",
|
|
1646
|
-
"logout",
|
|
1647
|
-
"logs",
|
|
1648
|
-
"mail",
|
|
1649
|
-
"map",
|
|
1650
|
-
"maps",
|
|
1651
|
-
"mine",
|
|
1652
|
-
"mis",
|
|
1653
|
-
"news",
|
|
1654
|
-
"oauth",
|
|
1655
|
-
"oauth_clients",
|
|
1656
|
-
"offers",
|
|
1657
|
-
"openid",
|
|
1658
|
-
"order",
|
|
1659
|
-
"orders",
|
|
1660
|
-
"organizations",
|
|
1661
|
-
"plans",
|
|
1662
|
-
"popular",
|
|
1663
|
-
"post",
|
|
1664
|
-
"postmaster",
|
|
1665
|
-
"privacy",
|
|
1666
|
-
"projects",
|
|
1667
|
-
"put",
|
|
1668
|
-
"recruitment",
|
|
1669
|
-
"register",
|
|
1670
|
-
"remove",
|
|
1671
|
-
"replies",
|
|
1672
|
-
"root",
|
|
1673
|
-
"rss",
|
|
1674
|
-
"sales",
|
|
1675
|
-
"save",
|
|
1676
|
-
"search",
|
|
1677
|
-
"security",
|
|
1678
|
-
"sessions",
|
|
1679
|
-
"settings",
|
|
1680
|
-
"shop",
|
|
1681
|
-
"signup",
|
|
1682
|
-
"sitemap",
|
|
1683
|
-
"ssl",
|
|
1684
|
-
"ssladmin",
|
|
1685
|
-
"ssladministrator",
|
|
1686
|
-
"sslwebmaster",
|
|
1687
|
-
"status",
|
|
1688
|
-
"stories",
|
|
1689
|
-
"styleguide",
|
|
1690
|
-
"subscribe",
|
|
1691
|
-
"subscriptions",
|
|
1692
|
-
"support",
|
|
1693
|
-
"sysadmin",
|
|
1694
|
-
"sysadministrator",
|
|
1695
|
-
"terms",
|
|
1696
|
-
"tour",
|
|
1697
|
-
"translations",
|
|
1698
|
-
"trends",
|
|
1699
|
-
"unfollow",
|
|
1700
|
-
"unsubscribe",
|
|
1701
|
-
"update",
|
|
1702
|
-
"url",
|
|
1703
|
-
"user",
|
|
1704
|
-
"weather",
|
|
1705
|
-
"webmaster",
|
|
1706
|
-
"widget",
|
|
1707
|
-
"widgets",
|
|
1708
|
-
"wiki",
|
|
1709
|
-
"ww",
|
|
1710
|
-
"www",
|
|
1711
|
-
"wwww",
|
|
1712
|
-
"xfn",
|
|
1713
|
-
"xml",
|
|
1714
|
-
"xmpp",
|
|
1715
|
-
"yaml",
|
|
1716
|
-
"yml",
|
|
1717
|
-
"chinese",
|
|
1718
|
-
"mandarin",
|
|
1719
|
-
"spanish",
|
|
1720
|
-
"english",
|
|
1721
|
-
"bengali",
|
|
1722
|
-
"hindi",
|
|
1723
|
-
"portuguese",
|
|
1724
|
-
"russian",
|
|
1725
|
-
"japanese",
|
|
1726
|
-
"german",
|
|
1727
|
-
"wu",
|
|
1728
|
-
"javanese",
|
|
1729
|
-
"korean",
|
|
1730
|
-
"french",
|
|
1731
|
-
"vietnamese",
|
|
1732
|
-
"telugu",
|
|
1733
|
-
"chinese",
|
|
1734
|
-
"marathi",
|
|
1735
|
-
"tamil",
|
|
1736
|
-
"turkish",
|
|
1737
|
-
"urdu",
|
|
1738
|
-
"min-nan",
|
|
1739
|
-
"jinyu",
|
|
1740
|
-
"gujarati",
|
|
1741
|
-
"polish",
|
|
1742
|
-
"arabic",
|
|
1743
|
-
"ukrainian",
|
|
1744
|
-
"italian",
|
|
1745
|
-
"xiang",
|
|
1746
|
-
"malayalam",
|
|
1747
|
-
"hakka",
|
|
1748
|
-
"kannada",
|
|
1749
|
-
"oriya",
|
|
1750
|
-
"panjabi",
|
|
1751
|
-
"sunda",
|
|
1752
|
-
"panjabi",
|
|
1753
|
-
"romanian",
|
|
1754
|
-
"bhojpuri",
|
|
1755
|
-
"azerbaijani",
|
|
1756
|
-
"farsi",
|
|
1757
|
-
"maithili",
|
|
1758
|
-
"hausa",
|
|
1759
|
-
"arabic",
|
|
1760
|
-
"burmese",
|
|
1761
|
-
"serbo-croatian",
|
|
1762
|
-
"gan",
|
|
1763
|
-
"awadhi",
|
|
1764
|
-
"thai",
|
|
1765
|
-
"dutch",
|
|
1766
|
-
"yoruba",
|
|
1767
|
-
"sindhi",
|
|
1768
|
-
"ac",
|
|
1769
|
-
"ad",
|
|
1770
|
-
"ae",
|
|
1771
|
-
"af",
|
|
1772
|
-
"ag",
|
|
1773
|
-
"ai",
|
|
1774
|
-
"al",
|
|
1775
|
-
"am",
|
|
1776
|
-
"an",
|
|
1777
|
-
"ao",
|
|
1778
|
-
"aq",
|
|
1779
|
-
"ar",
|
|
1780
|
-
"as",
|
|
1781
|
-
"at",
|
|
1782
|
-
"au",
|
|
1783
|
-
"aw",
|
|
1784
|
-
"ax",
|
|
1785
|
-
"az",
|
|
1786
|
-
"ba",
|
|
1787
|
-
"bb",
|
|
1788
|
-
"bd",
|
|
1789
|
-
"be",
|
|
1790
|
-
"bf",
|
|
1791
|
-
"bg",
|
|
1792
|
-
"bh",
|
|
1793
|
-
"bi",
|
|
1794
|
-
"bj",
|
|
1795
|
-
"bm",
|
|
1796
|
-
"bn",
|
|
1797
|
-
"bo",
|
|
1798
|
-
"br",
|
|
1799
|
-
"bs",
|
|
1800
|
-
"bt",
|
|
1801
|
-
"bv",
|
|
1802
|
-
"bw",
|
|
1803
|
-
"by",
|
|
1804
|
-
"bz",
|
|
1805
|
-
"ca",
|
|
1806
|
-
"cc",
|
|
1807
|
-
"cd",
|
|
1808
|
-
"cf",
|
|
1809
|
-
"cg",
|
|
1810
|
-
"ch",
|
|
1811
|
-
"ci",
|
|
1812
|
-
"ck",
|
|
1813
|
-
"cl",
|
|
1814
|
-
"cm",
|
|
1815
|
-
"cn",
|
|
1816
|
-
"co",
|
|
1817
|
-
"cr",
|
|
1818
|
-
"cs",
|
|
1819
|
-
"cu",
|
|
1820
|
-
"cv",
|
|
1821
|
-
"cx",
|
|
1822
|
-
"cy",
|
|
1823
|
-
"cz",
|
|
1824
|
-
"dd",
|
|
1825
|
-
"de",
|
|
1826
|
-
"dj",
|
|
1827
|
-
"dk",
|
|
1828
|
-
"dm",
|
|
1829
|
-
"do",
|
|
1830
|
-
"dz",
|
|
1831
|
-
"ec",
|
|
1832
|
-
"ee",
|
|
1833
|
-
"eg",
|
|
1834
|
-
"eh",
|
|
1835
|
-
"er",
|
|
1836
|
-
"es",
|
|
1837
|
-
"et",
|
|
1838
|
-
"eu",
|
|
1839
|
-
"fi",
|
|
1840
|
-
"fj",
|
|
1841
|
-
"fk",
|
|
1842
|
-
"fm",
|
|
1843
|
-
"fo",
|
|
1844
|
-
"fr",
|
|
1845
|
-
"ga",
|
|
1846
|
-
"gb",
|
|
1847
|
-
"gd",
|
|
1848
|
-
"ge",
|
|
1849
|
-
"gf",
|
|
1850
|
-
"gg",
|
|
1851
|
-
"gh",
|
|
1852
|
-
"gi",
|
|
1853
|
-
"gl",
|
|
1854
|
-
"gm",
|
|
1855
|
-
"gn",
|
|
1856
|
-
"gp",
|
|
1857
|
-
"gq",
|
|
1858
|
-
"gr",
|
|
1859
|
-
"gs",
|
|
1860
|
-
"gt",
|
|
1861
|
-
"gu",
|
|
1862
|
-
"gw",
|
|
1863
|
-
"gy",
|
|
1864
|
-
"hk",
|
|
1865
|
-
"hm",
|
|
1866
|
-
"hn",
|
|
1867
|
-
"hr",
|
|
1868
|
-
"ht",
|
|
1869
|
-
"hu",
|
|
1870
|
-
"id",
|
|
1871
|
-
"ie",
|
|
1872
|
-
"il",
|
|
1873
|
-
"im",
|
|
1874
|
-
"in",
|
|
1875
|
-
"io",
|
|
1876
|
-
"iq",
|
|
1877
|
-
"ir",
|
|
1878
|
-
"is",
|
|
1879
|
-
"it",
|
|
1880
|
-
"je",
|
|
1881
|
-
"jm",
|
|
1882
|
-
"jo",
|
|
1883
|
-
"jp",
|
|
1884
|
-
"ke",
|
|
1885
|
-
"kg",
|
|
1886
|
-
"kh",
|
|
1887
|
-
"ki",
|
|
1888
|
-
"km",
|
|
1889
|
-
"kn",
|
|
1890
|
-
"kp",
|
|
1891
|
-
"kr",
|
|
1892
|
-
"kw",
|
|
1893
|
-
"ky",
|
|
1894
|
-
"kz",
|
|
1895
|
-
"la",
|
|
1896
|
-
"lb",
|
|
1897
|
-
"lc",
|
|
1898
|
-
"li",
|
|
1899
|
-
"lk",
|
|
1900
|
-
"lr",
|
|
1901
|
-
"ls",
|
|
1902
|
-
"lt",
|
|
1903
|
-
"lu",
|
|
1904
|
-
"lv",
|
|
1905
|
-
"ly",
|
|
1906
|
-
"ma",
|
|
1907
|
-
"mc",
|
|
1908
|
-
"md",
|
|
1909
|
-
"me",
|
|
1910
|
-
"mg",
|
|
1911
|
-
"mh",
|
|
1912
|
-
"mk",
|
|
1913
|
-
"ml",
|
|
1914
|
-
"mm",
|
|
1915
|
-
"mn",
|
|
1916
|
-
"mo",
|
|
1917
|
-
"mp",
|
|
1918
|
-
"mq",
|
|
1919
|
-
"mr",
|
|
1920
|
-
"ms",
|
|
1921
|
-
"mt",
|
|
1922
|
-
"mu",
|
|
1923
|
-
"mv",
|
|
1924
|
-
"mw",
|
|
1925
|
-
"mx",
|
|
1926
|
-
"my",
|
|
1927
|
-
"mz",
|
|
1928
|
-
"na",
|
|
1929
|
-
"nc",
|
|
1930
|
-
"ne",
|
|
1931
|
-
"nf",
|
|
1932
|
-
"ng",
|
|
1933
|
-
"ni",
|
|
1934
|
-
"nl",
|
|
1935
|
-
"no",
|
|
1936
|
-
"np",
|
|
1937
|
-
"nr",
|
|
1938
|
-
"nu",
|
|
1939
|
-
"nz",
|
|
1940
|
-
"om",
|
|
1941
|
-
"pa",
|
|
1942
|
-
"pe",
|
|
1943
|
-
"pf",
|
|
1944
|
-
"pg",
|
|
1945
|
-
"ph",
|
|
1946
|
-
"pk",
|
|
1947
|
-
"pl",
|
|
1948
|
-
"pm",
|
|
1949
|
-
"pn",
|
|
1950
|
-
"pr",
|
|
1951
|
-
"ps",
|
|
1952
|
-
"pt",
|
|
1953
|
-
"pw",
|
|
1954
|
-
"py",
|
|
1955
|
-
"qa",
|
|
1956
|
-
"re",
|
|
1957
|
-
"ro",
|
|
1958
|
-
"rs",
|
|
1959
|
-
"ru",
|
|
1960
|
-
"rw",
|
|
1961
|
-
"sa",
|
|
1962
|
-
"sb",
|
|
1963
|
-
"sc",
|
|
1964
|
-
"sd",
|
|
1965
|
-
"se",
|
|
1966
|
-
"sg",
|
|
1967
|
-
"sh",
|
|
1968
|
-
"si",
|
|
1969
|
-
"sj",
|
|
1970
|
-
"sk",
|
|
1971
|
-
"sl",
|
|
1972
|
-
"sm",
|
|
1973
|
-
"sn",
|
|
1974
|
-
"so",
|
|
1975
|
-
"sr",
|
|
1976
|
-
"ss",
|
|
1977
|
-
"st",
|
|
1978
|
-
"su",
|
|
1979
|
-
"sv",
|
|
1980
|
-
"sy",
|
|
1981
|
-
"sz",
|
|
1982
|
-
"tc",
|
|
1983
|
-
"td",
|
|
1984
|
-
"tf",
|
|
1985
|
-
"tg",
|
|
1986
|
-
"th",
|
|
1987
|
-
"tj",
|
|
1988
|
-
"tk",
|
|
1989
|
-
"tl",
|
|
1990
|
-
"tm",
|
|
1991
|
-
"tn",
|
|
1992
|
-
"to",
|
|
1993
|
-
"tp",
|
|
1994
|
-
"tr",
|
|
1995
|
-
"tt",
|
|
1996
|
-
"tv",
|
|
1997
|
-
"tw",
|
|
1998
|
-
"tz",
|
|
1999
|
-
"ua",
|
|
2000
|
-
"ug",
|
|
2001
|
-
"uk",
|
|
2002
|
-
"us",
|
|
2003
|
-
"uy",
|
|
2004
|
-
"uz",
|
|
2005
|
-
"va",
|
|
2006
|
-
"vc",
|
|
2007
|
-
"ve",
|
|
2008
|
-
"vg",
|
|
2009
|
-
"vi",
|
|
2010
|
-
"vn",
|
|
2011
|
-
"vu",
|
|
2012
|
-
"wf",
|
|
2013
|
-
"ws",
|
|
2014
|
-
"ye",
|
|
2015
|
-
"yt",
|
|
2016
|
-
"yu",
|
|
2017
|
-
"za",
|
|
2018
|
-
"zm",
|
|
2019
|
-
"zw"
|
|
2020
|
-
];
|
|
2021
|
-
var at = { exports: {} };
|
|
2022
|
-
const us = "2.0.0", vr = 256, cs = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
2023
|
-
9007199254740991, ds = 16, fs = vr - 6, ps = [
|
|
2024
|
-
"major",
|
|
2025
|
-
"premajor",
|
|
2026
|
-
"minor",
|
|
2027
|
-
"preminor",
|
|
2028
|
-
"patch",
|
|
2029
|
-
"prepatch",
|
|
2030
|
-
"prerelease"
|
|
2031
|
-
];
|
|
2032
|
-
var Fe = {
|
|
2033
|
-
MAX_LENGTH: vr,
|
|
2034
|
-
MAX_SAFE_COMPONENT_LENGTH: ds,
|
|
2035
|
-
MAX_SAFE_BUILD_LENGTH: fs,
|
|
2036
|
-
MAX_SAFE_INTEGER: cs,
|
|
2037
|
-
RELEASE_TYPES: ps,
|
|
2038
|
-
SEMVER_SPEC_VERSION: us,
|
|
2039
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
2040
|
-
FLAG_LOOSE: 2
|
|
2041
|
-
};
|
|
2042
|
-
const ms = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
|
|
2043
|
-
};
|
|
2044
|
-
var je = ms;
|
|
2045
|
-
(function(t, e) {
|
|
2046
|
-
const {
|
|
2047
|
-
MAX_SAFE_COMPONENT_LENGTH: r,
|
|
2048
|
-
MAX_SAFE_BUILD_LENGTH: n,
|
|
2049
|
-
MAX_LENGTH: s
|
|
2050
|
-
} = Fe, a = je;
|
|
2051
|
-
e = t.exports = {};
|
|
2052
|
-
const l = e.re = [], m = e.safeRe = [], c = e.src = [], u = e.t = {};
|
|
2053
|
-
let v = 0;
|
|
2054
|
-
const d = "[a-zA-Z0-9-]", S = [
|
|
2055
|
-
["\\s", 1],
|
|
2056
|
-
["\\d", s],
|
|
2057
|
-
[d, n]
|
|
2058
|
-
], b = (P) => {
|
|
2059
|
-
for (const [C, k] of S)
|
|
2060
|
-
P = P.split(`${C}*`).join(`${C}{0,${k}}`).split(`${C}+`).join(`${C}{1,${k}}`);
|
|
2061
|
-
return P;
|
|
2062
|
-
}, y = (P, C, k) => {
|
|
2063
|
-
const A = b(C), L = v++;
|
|
2064
|
-
a(P, L, C), u[P] = L, c[L] = C, l[L] = new RegExp(C, k ? "g" : void 0), m[L] = new RegExp(A, k ? "g" : void 0);
|
|
2065
|
-
};
|
|
2066
|
-
y("NUMERICIDENTIFIER", "0|[1-9]\\d*"), y("NUMERICIDENTIFIERLOOSE", "\\d+"), y("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), y("MAINVERSION", `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), y("MAINVERSIONLOOSE", `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), y("PRERELEASEIDENTIFIER", `(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`), y("PRERELEASEIDENTIFIERLOOSE", `(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`), y("PRERELEASE", `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), y("PRERELEASELOOSE", `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), y("BUILDIDENTIFIER", `${d}+`), y("BUILD", `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), y("FULLPLAIN", `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), y("FULL", `^${c[u.FULLPLAIN]}$`), y("LOOSEPLAIN", `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), y("LOOSE", `^${c[u.LOOSEPLAIN]}$`), y("GTLT", "((?:<|>)?=?)"), y("XRANGEIDENTIFIERLOOSE", `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), y("XRANGEIDENTIFIER", `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), y("XRANGEPLAIN", `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), y("XRANGEPLAINLOOSE", `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), y("XRANGE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), y("XRANGELOOSE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), y("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), y("COERCE", `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), y("COERCEFULL", c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), y("COERCERTL", c[u.COERCE], !0), y("COERCERTLFULL", c[u.COERCEFULL], !0), y("LONETILDE", "(?:~>?)"), y("TILDETRIM", `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", y("TILDE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), y("TILDELOOSE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), y("LONECARET", "(?:\\^)"), y("CARETTRIM", `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", y("CARET", `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), y("CARETLOOSE", `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), y("COMPARATORLOOSE", `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), y("COMPARATOR", `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), y("COMPARATORTRIM", `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", y("HYPHENRANGE", `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), y("HYPHENRANGELOOSE", `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), y("STAR", "(<|>)?=?\\s*\\*"), y("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), y("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
2067
|
-
})(at, at.exports);
|
|
2068
|
-
var _e = at.exports;
|
|
2069
|
-
const hs = Object.freeze({ loose: !0 }), vs = Object.freeze({}), gs = (t) => t ? typeof t != "object" ? hs : t : vs;
|
|
2070
|
-
var dt = gs;
|
|
2071
|
-
const Tt = /^[0-9]+$/, gr = (t, e) => {
|
|
2072
|
-
const r = Tt.test(t), n = Tt.test(e);
|
|
2073
|
-
return r && n && (t = +t, e = +e), t === e ? 0 : r && !n ? -1 : n && !r ? 1 : t < e ? -1 : 1;
|
|
2074
|
-
}, ys = (t, e) => gr(e, t);
|
|
2075
|
-
var yr = {
|
|
2076
|
-
compareIdentifiers: gr,
|
|
2077
|
-
rcompareIdentifiers: ys
|
|
2078
|
-
};
|
|
2079
|
-
const we = je, { MAX_LENGTH: Ct, MAX_SAFE_INTEGER: Ie } = Fe, { safeRe: Nt, t: kt } = _e, bs = dt, { compareIdentifiers: me } = yr;
|
|
2080
|
-
let $s = class le {
|
|
2081
|
-
constructor(e, r) {
|
|
2082
|
-
if (r = bs(r), e instanceof le) {
|
|
2083
|
-
if (e.loose === !!r.loose && e.includePrerelease === !!r.includePrerelease)
|
|
2084
|
-
return e;
|
|
2085
|
-
e = e.version;
|
|
2086
|
-
} else if (typeof e != "string")
|
|
2087
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
2088
|
-
if (e.length > Ct)
|
|
2089
|
-
throw new TypeError(
|
|
2090
|
-
`version is longer than ${Ct} characters`
|
|
2091
|
-
);
|
|
2092
|
-
we("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
|
|
2093
|
-
const n = e.trim().match(r.loose ? Nt[kt.LOOSE] : Nt[kt.FULL]);
|
|
2094
|
-
if (!n)
|
|
2095
|
-
throw new TypeError(`Invalid Version: ${e}`);
|
|
2096
|
-
if (this.raw = e, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > Ie || this.major < 0)
|
|
2097
|
-
throw new TypeError("Invalid major version");
|
|
2098
|
-
if (this.minor > Ie || this.minor < 0)
|
|
2099
|
-
throw new TypeError("Invalid minor version");
|
|
2100
|
-
if (this.patch > Ie || this.patch < 0)
|
|
2101
|
-
throw new TypeError("Invalid patch version");
|
|
2102
|
-
n[4] ? this.prerelease = n[4].split(".").map((s) => {
|
|
2103
|
-
if (/^[0-9]+$/.test(s)) {
|
|
2104
|
-
const a = +s;
|
|
2105
|
-
if (a >= 0 && a < Ie)
|
|
2106
|
-
return a;
|
|
2107
|
-
}
|
|
2108
|
-
return s;
|
|
2109
|
-
}) : this.prerelease = [], this.build = n[5] ? n[5].split(".") : [], this.format();
|
|
2110
|
-
}
|
|
2111
|
-
format() {
|
|
2112
|
-
return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
|
|
2113
|
-
}
|
|
2114
|
-
toString() {
|
|
2115
|
-
return this.version;
|
|
2116
|
-
}
|
|
2117
|
-
compare(e) {
|
|
2118
|
-
if (we("SemVer.compare", this.version, this.options, e), !(e instanceof le)) {
|
|
2119
|
-
if (typeof e == "string" && e === this.version)
|
|
2120
|
-
return 0;
|
|
2121
|
-
e = new le(e, this.options);
|
|
2122
|
-
}
|
|
2123
|
-
return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
|
|
2124
|
-
}
|
|
2125
|
-
compareMain(e) {
|
|
2126
|
-
return e instanceof le || (e = new le(e, this.options)), me(this.major, e.major) || me(this.minor, e.minor) || me(this.patch, e.patch);
|
|
2127
|
-
}
|
|
2128
|
-
comparePre(e) {
|
|
2129
|
-
if (e instanceof le || (e = new le(e, this.options)), this.prerelease.length && !e.prerelease.length)
|
|
2130
|
-
return -1;
|
|
2131
|
-
if (!this.prerelease.length && e.prerelease.length)
|
|
2132
|
-
return 1;
|
|
2133
|
-
if (!this.prerelease.length && !e.prerelease.length)
|
|
2134
|
-
return 0;
|
|
2135
|
-
let r = 0;
|
|
2136
|
-
do {
|
|
2137
|
-
const n = this.prerelease[r], s = e.prerelease[r];
|
|
2138
|
-
if (we("prerelease compare", r, n, s), n === void 0 && s === void 0)
|
|
2139
|
-
return 0;
|
|
2140
|
-
if (s === void 0)
|
|
2141
|
-
return 1;
|
|
2142
|
-
if (n === void 0)
|
|
2143
|
-
return -1;
|
|
2144
|
-
if (n === s)
|
|
2145
|
-
continue;
|
|
2146
|
-
return me(n, s);
|
|
2147
|
-
} while (++r);
|
|
2148
|
-
}
|
|
2149
|
-
compareBuild(e) {
|
|
2150
|
-
e instanceof le || (e = new le(e, this.options));
|
|
2151
|
-
let r = 0;
|
|
2152
|
-
do {
|
|
2153
|
-
const n = this.build[r], s = e.build[r];
|
|
2154
|
-
if (we("build compare", r, n, s), n === void 0 && s === void 0)
|
|
2155
|
-
return 0;
|
|
2156
|
-
if (s === void 0)
|
|
2157
|
-
return 1;
|
|
2158
|
-
if (n === void 0)
|
|
2159
|
-
return -1;
|
|
2160
|
-
if (n === s)
|
|
2161
|
-
continue;
|
|
2162
|
-
return me(n, s);
|
|
2163
|
-
} while (++r);
|
|
2164
|
-
}
|
|
2165
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
2166
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
2167
|
-
inc(e, r, n) {
|
|
2168
|
-
switch (e) {
|
|
2169
|
-
case "premajor":
|
|
2170
|
-
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, n);
|
|
2171
|
-
break;
|
|
2172
|
-
case "preminor":
|
|
2173
|
-
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", r, n);
|
|
2174
|
-
break;
|
|
2175
|
-
case "prepatch":
|
|
2176
|
-
this.prerelease.length = 0, this.inc("patch", r, n), this.inc("pre", r, n);
|
|
2177
|
-
break;
|
|
2178
|
-
case "prerelease":
|
|
2179
|
-
this.prerelease.length === 0 && this.inc("patch", r, n), this.inc("pre", r, n);
|
|
2180
|
-
break;
|
|
2181
|
-
case "major":
|
|
2182
|
-
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
|
|
2183
|
-
break;
|
|
2184
|
-
case "minor":
|
|
2185
|
-
(this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
|
|
2186
|
-
break;
|
|
2187
|
-
case "patch":
|
|
2188
|
-
this.prerelease.length === 0 && this.patch++, this.prerelease = [];
|
|
2189
|
-
break;
|
|
2190
|
-
case "pre": {
|
|
2191
|
-
const s = Number(n) ? 1 : 0;
|
|
2192
|
-
if (!r && n === !1)
|
|
2193
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
2194
|
-
if (this.prerelease.length === 0)
|
|
2195
|
-
this.prerelease = [s];
|
|
2196
|
-
else {
|
|
2197
|
-
let a = this.prerelease.length;
|
|
2198
|
-
for (; --a >= 0; )
|
|
2199
|
-
typeof this.prerelease[a] == "number" && (this.prerelease[a]++, a = -2);
|
|
2200
|
-
if (a === -1) {
|
|
2201
|
-
if (r === this.prerelease.join(".") && n === !1)
|
|
2202
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
2203
|
-
this.prerelease.push(s);
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
if (r) {
|
|
2207
|
-
let a = [r, s];
|
|
2208
|
-
n === !1 && (a = [r]), me(this.prerelease[0], r) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = a) : this.prerelease = a;
|
|
2209
|
-
}
|
|
2210
|
-
break;
|
|
2211
|
-
}
|
|
2212
|
-
default:
|
|
2213
|
-
throw new Error(`invalid increment argument: ${e}`);
|
|
2214
|
-
}
|
|
2215
|
-
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
2216
|
-
}
|
|
2217
|
-
};
|
|
2218
|
-
var ee = $s;
|
|
2219
|
-
const xt = ee, Es = (t, e, r = !1) => {
|
|
2220
|
-
if (t instanceof xt)
|
|
2221
|
-
return t;
|
|
2222
|
-
try {
|
|
2223
|
-
return new xt(t, e);
|
|
2224
|
-
} catch (n) {
|
|
2225
|
-
if (!r)
|
|
2226
|
-
return null;
|
|
2227
|
-
throw n;
|
|
2228
|
-
}
|
|
2229
|
-
};
|
|
2230
|
-
var be = Es;
|
|
2231
|
-
const _s = be, Rs = (t, e) => {
|
|
2232
|
-
const r = _s(t, e);
|
|
2233
|
-
return r ? r.version : null;
|
|
2234
|
-
};
|
|
2235
|
-
var ws = Rs;
|
|
2236
|
-
const Is = be, As = (t, e) => {
|
|
2237
|
-
const r = Is(t.trim().replace(/^[=v]+/, ""), e);
|
|
2238
|
-
return r ? r.version : null;
|
|
2239
|
-
};
|
|
2240
|
-
var Os = As;
|
|
2241
|
-
const Vt = ee, Ls = (t, e, r, n, s) => {
|
|
2242
|
-
typeof r == "string" && (s = n, n = r, r = void 0);
|
|
2243
|
-
try {
|
|
2244
|
-
return new Vt(
|
|
2245
|
-
t instanceof Vt ? t.version : t,
|
|
2246
|
-
r
|
|
2247
|
-
).inc(e, n, s).version;
|
|
2248
|
-
} catch {
|
|
2249
|
-
return null;
|
|
2250
|
-
}
|
|
2251
|
-
};
|
|
2252
|
-
var Ss = Ls;
|
|
2253
|
-
const Ft = be, Ps = (t, e) => {
|
|
2254
|
-
const r = Ft(t, null, !0), n = Ft(e, null, !0), s = r.compare(n);
|
|
2255
|
-
if (s === 0)
|
|
2256
|
-
return null;
|
|
2257
|
-
const a = s > 0, l = a ? r : n, m = a ? n : r, c = !!l.prerelease.length;
|
|
2258
|
-
if (!!m.prerelease.length && !c)
|
|
2259
|
-
return !m.patch && !m.minor ? "major" : l.patch ? "patch" : l.minor ? "minor" : "major";
|
|
2260
|
-
const v = c ? "pre" : "";
|
|
2261
|
-
return r.major !== n.major ? v + "major" : r.minor !== n.minor ? v + "minor" : r.patch !== n.patch ? v + "patch" : "prerelease";
|
|
2262
|
-
};
|
|
2263
|
-
var Ts = Ps;
|
|
2264
|
-
const Cs = ee, Ns = (t, e) => new Cs(t, e).major;
|
|
2265
|
-
var ks = Ns;
|
|
2266
|
-
const xs = ee, Vs = (t, e) => new xs(t, e).minor;
|
|
2267
|
-
var Fs = Vs;
|
|
2268
|
-
const js = ee, Us = (t, e) => new js(t, e).patch;
|
|
2269
|
-
var Ms = Us;
|
|
2270
|
-
const Ds = be, Bs = (t, e) => {
|
|
2271
|
-
const r = Ds(t, e);
|
|
2272
|
-
return r && r.prerelease.length ? r.prerelease : null;
|
|
2273
|
-
};
|
|
2274
|
-
var Gs = Bs;
|
|
2275
|
-
const jt = ee, Ks = (t, e, r) => new jt(t, r).compare(new jt(e, r));
|
|
2276
|
-
var ae = Ks;
|
|
2277
|
-
const qs = ae, zs = (t, e, r) => qs(e, t, r);
|
|
2278
|
-
var Hs = zs;
|
|
2279
|
-
const Xs = ae, Ys = (t, e) => Xs(t, e, !0);
|
|
2280
|
-
var Ws = Ys;
|
|
2281
|
-
const Ut = ee, Js = (t, e, r) => {
|
|
2282
|
-
const n = new Ut(t, r), s = new Ut(e, r);
|
|
2283
|
-
return n.compare(s) || n.compareBuild(s);
|
|
2284
|
-
};
|
|
2285
|
-
var ft = Js;
|
|
2286
|
-
const Zs = ft, Qs = (t, e) => t.sort((r, n) => Zs(r, n, e));
|
|
2287
|
-
var ea = Qs;
|
|
2288
|
-
const ta = ft, ra = (t, e) => t.sort((r, n) => ta(n, r, e));
|
|
2289
|
-
var na = ra;
|
|
2290
|
-
const sa = ae, aa = (t, e, r) => sa(t, e, r) > 0;
|
|
2291
|
-
var Ue = aa;
|
|
2292
|
-
const oa = ae, la = (t, e, r) => oa(t, e, r) < 0;
|
|
2293
|
-
var pt = la;
|
|
2294
|
-
const ia = ae, ua = (t, e, r) => ia(t, e, r) === 0;
|
|
2295
|
-
var br = ua;
|
|
2296
|
-
const ca = ae, da = (t, e, r) => ca(t, e, r) !== 0;
|
|
2297
|
-
var $r = da;
|
|
2298
|
-
const fa = ae, pa = (t, e, r) => fa(t, e, r) >= 0;
|
|
2299
|
-
var mt = pa;
|
|
2300
|
-
const ma = ae, ha = (t, e, r) => ma(t, e, r) <= 0;
|
|
2301
|
-
var ht = ha;
|
|
2302
|
-
const va = br, ga = $r, ya = Ue, ba = mt, $a = pt, Ea = ht, _a = (t, e, r, n) => {
|
|
2303
|
-
switch (e) {
|
|
2304
|
-
case "===":
|
|
2305
|
-
return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t === r;
|
|
2306
|
-
case "!==":
|
|
2307
|
-
return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t !== r;
|
|
2308
|
-
case "":
|
|
2309
|
-
case "=":
|
|
2310
|
-
case "==":
|
|
2311
|
-
return va(t, r, n);
|
|
2312
|
-
case "!=":
|
|
2313
|
-
return ga(t, r, n);
|
|
2314
|
-
case ">":
|
|
2315
|
-
return ya(t, r, n);
|
|
2316
|
-
case ">=":
|
|
2317
|
-
return ba(t, r, n);
|
|
2318
|
-
case "<":
|
|
2319
|
-
return $a(t, r, n);
|
|
2320
|
-
case "<=":
|
|
2321
|
-
return Ea(t, r, n);
|
|
2322
|
-
default:
|
|
2323
|
-
throw new TypeError(`Invalid operator: ${e}`);
|
|
2324
|
-
}
|
|
2325
|
-
};
|
|
2326
|
-
var Er = _a;
|
|
2327
|
-
const Ra = ee, wa = be, { safeRe: Ae, t: Oe } = _e, Ia = (t, e) => {
|
|
2328
|
-
if (t instanceof Ra)
|
|
2329
|
-
return t;
|
|
2330
|
-
if (typeof t == "number" && (t = String(t)), typeof t != "string")
|
|
2331
|
-
return null;
|
|
2332
|
-
e = e || {};
|
|
2333
|
-
let r = null;
|
|
2334
|
-
if (!e.rtl)
|
|
2335
|
-
r = t.match(e.includePrerelease ? Ae[Oe.COERCEFULL] : Ae[Oe.COERCE]);
|
|
2336
|
-
else {
|
|
2337
|
-
const c = e.includePrerelease ? Ae[Oe.COERCERTLFULL] : Ae[Oe.COERCERTL];
|
|
2338
|
-
let u;
|
|
2339
|
-
for (; (u = c.exec(t)) && (!r || r.index + r[0].length !== t.length); )
|
|
2340
|
-
(!r || u.index + u[0].length !== r.index + r[0].length) && (r = u), c.lastIndex = u.index + u[1].length + u[2].length;
|
|
2341
|
-
c.lastIndex = -1;
|
|
2342
|
-
}
|
|
2343
|
-
if (r === null)
|
|
2344
|
-
return null;
|
|
2345
|
-
const n = r[2], s = r[3] || "0", a = r[4] || "0", l = e.includePrerelease && r[5] ? `-${r[5]}` : "", m = e.includePrerelease && r[6] ? `+${r[6]}` : "";
|
|
2346
|
-
return wa(`${n}.${s}.${a}${l}${m}`, e);
|
|
2347
|
-
};
|
|
2348
|
-
var Aa = Ia;
|
|
2349
|
-
class Oa {
|
|
2350
|
-
constructor() {
|
|
2351
|
-
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
2352
|
-
}
|
|
2353
|
-
get(e) {
|
|
2354
|
-
const r = this.map.get(e);
|
|
2355
|
-
if (r !== void 0)
|
|
2356
|
-
return this.map.delete(e), this.map.set(e, r), r;
|
|
2357
|
-
}
|
|
2358
|
-
delete(e) {
|
|
2359
|
-
return this.map.delete(e);
|
|
2360
|
-
}
|
|
2361
|
-
set(e, r) {
|
|
2362
|
-
if (!this.delete(e) && r !== void 0) {
|
|
2363
|
-
if (this.map.size >= this.max) {
|
|
2364
|
-
const s = this.map.keys().next().value;
|
|
2365
|
-
this.delete(s);
|
|
2366
|
-
}
|
|
2367
|
-
this.map.set(e, r);
|
|
2368
|
-
}
|
|
2369
|
-
return this;
|
|
2370
|
-
}
|
|
2371
|
-
}
|
|
2372
|
-
var La = Oa, Ye, Mt;
|
|
2373
|
-
function oe() {
|
|
2374
|
-
if (Mt)
|
|
2375
|
-
return Ye;
|
|
2376
|
-
Mt = 1;
|
|
2377
|
-
const t = /\s+/g;
|
|
2378
|
-
class e {
|
|
2379
|
-
constructor(g, _) {
|
|
2380
|
-
if (_ = s(_), g instanceof e)
|
|
2381
|
-
return g.loose === !!_.loose && g.includePrerelease === !!_.includePrerelease ? g : new e(g.raw, _);
|
|
2382
|
-
if (g instanceof a)
|
|
2383
|
-
return this.raw = g.value, this.set = [[g]], this.formatted = void 0, this;
|
|
2384
|
-
if (this.options = _, this.loose = !!_.loose, this.includePrerelease = !!_.includePrerelease, this.raw = g.trim().replace(t, " "), this.set = this.raw.split("||").map(($) => this.parseRange($.trim())).filter(($) => $.length), !this.set.length)
|
|
2385
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
2386
|
-
if (this.set.length > 1) {
|
|
2387
|
-
const $ = this.set[0];
|
|
2388
|
-
if (this.set = this.set.filter((I) => !P(I[0])), this.set.length === 0)
|
|
2389
|
-
this.set = [$];
|
|
2390
|
-
else if (this.set.length > 1) {
|
|
2391
|
-
for (const I of this.set)
|
|
2392
|
-
if (I.length === 1 && C(I[0])) {
|
|
2393
|
-
this.set = [I];
|
|
2394
|
-
break;
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
}
|
|
2398
|
-
this.formatted = void 0;
|
|
2399
|
-
}
|
|
2400
|
-
get range() {
|
|
2401
|
-
if (this.formatted === void 0) {
|
|
2402
|
-
this.formatted = "";
|
|
2403
|
-
for (let g = 0; g < this.set.length; g++) {
|
|
2404
|
-
g > 0 && (this.formatted += "||");
|
|
2405
|
-
const _ = this.set[g];
|
|
2406
|
-
for (let $ = 0; $ < _.length; $++)
|
|
2407
|
-
$ > 0 && (this.formatted += " "), this.formatted += _[$].toString().trim();
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
return this.formatted;
|
|
2411
|
-
}
|
|
2412
|
-
format() {
|
|
2413
|
-
return this.range;
|
|
2414
|
-
}
|
|
2415
|
-
toString() {
|
|
2416
|
-
return this.range;
|
|
2417
|
-
}
|
|
2418
|
-
parseRange(g) {
|
|
2419
|
-
const $ = ((this.options.includePrerelease && b) | (this.options.loose && y)) + ":" + g, I = n.get($);
|
|
2420
|
-
if (I)
|
|
2421
|
-
return I;
|
|
2422
|
-
const R = this.options.loose, N = R ? c[u.HYPHENRANGELOOSE] : c[u.HYPHENRANGE];
|
|
2423
|
-
g = g.replace(N, f(this.options.includePrerelease)), l("hyphen replace", g), g = g.replace(c[u.COMPARATORTRIM], v), l("comparator trim", g), g = g.replace(c[u.TILDETRIM], d), l("tilde trim", g), g = g.replace(c[u.CARETTRIM], S), l("caret trim", g);
|
|
2424
|
-
let U = g.split(" ").map((H) => A(H, this.options)).join(" ").split(/\s+/).map((H) => h(H, this.options));
|
|
2425
|
-
R && (U = U.filter((H) => (l("loose invalid filter", H, this.options), !!H.match(c[u.COMPARATORLOOSE])))), l("range list", U);
|
|
2426
|
-
const x = /* @__PURE__ */ new Map(), B = U.map((H) => new a(H, this.options));
|
|
2427
|
-
for (const H of B) {
|
|
2428
|
-
if (P(H))
|
|
2429
|
-
return [H];
|
|
2430
|
-
x.set(H.value, H);
|
|
2431
|
-
}
|
|
2432
|
-
x.size > 1 && x.has("") && x.delete("");
|
|
2433
|
-
const Y = [...x.values()];
|
|
2434
|
-
return n.set($, Y), Y;
|
|
2435
|
-
}
|
|
2436
|
-
intersects(g, _) {
|
|
2437
|
-
if (!(g instanceof e))
|
|
2438
|
-
throw new TypeError("a Range is required");
|
|
2439
|
-
return this.set.some(($) => k($, _) && g.set.some((I) => k(I, _) && $.every((R) => I.every((N) => R.intersects(N, _)))));
|
|
2440
|
-
}
|
|
2441
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
2442
|
-
test(g) {
|
|
2443
|
-
if (!g)
|
|
2444
|
-
return !1;
|
|
2445
|
-
if (typeof g == "string")
|
|
2446
|
-
try {
|
|
2447
|
-
g = new m(g, this.options);
|
|
2448
|
-
} catch {
|
|
2449
|
-
return !1;
|
|
2450
|
-
}
|
|
2451
|
-
for (let _ = 0; _ < this.set.length; _++)
|
|
2452
|
-
if (w(this.set[_], g, this.options))
|
|
2453
|
-
return !0;
|
|
2454
|
-
return !1;
|
|
2455
|
-
}
|
|
2456
|
-
}
|
|
2457
|
-
Ye = e;
|
|
2458
|
-
const r = La, n = new r(), s = dt, a = Me(), l = je, m = ee, {
|
|
2459
|
-
safeRe: c,
|
|
2460
|
-
t: u,
|
|
2461
|
-
comparatorTrimReplace: v,
|
|
2462
|
-
tildeTrimReplace: d,
|
|
2463
|
-
caretTrimReplace: S
|
|
2464
|
-
} = _e, { FLAG_INCLUDE_PRERELEASE: b, FLAG_LOOSE: y } = Fe, P = (p) => p.value === "<0.0.0-0", C = (p) => p.value === "", k = (p, g) => {
|
|
2465
|
-
let _ = !0;
|
|
2466
|
-
const $ = p.slice();
|
|
2467
|
-
let I = $.pop();
|
|
2468
|
-
for (; _ && $.length; )
|
|
2469
|
-
_ = $.every((R) => I.intersects(R, g)), I = $.pop();
|
|
2470
|
-
return _;
|
|
2471
|
-
}, A = (p, g) => (l("comp", p, g), p = D(p, g), l("caret", p), p = V(p, g), l("tildes", p), p = F(p, g), l("xrange", p), p = i(p, g), l("stars", p), p), L = (p) => !p || p.toLowerCase() === "x" || p === "*", V = (p, g) => p.trim().split(/\s+/).map((_) => W(_, g)).join(" "), W = (p, g) => {
|
|
2472
|
-
const _ = g.loose ? c[u.TILDELOOSE] : c[u.TILDE];
|
|
2473
|
-
return p.replace(_, ($, I, R, N, U) => {
|
|
2474
|
-
l("tilde", p, $, I, R, N, U);
|
|
2475
|
-
let x;
|
|
2476
|
-
return L(I) ? x = "" : L(R) ? x = `>=${I}.0.0 <${+I + 1}.0.0-0` : L(N) ? x = `>=${I}.${R}.0 <${I}.${+R + 1}.0-0` : U ? (l("replaceTilde pr", U), x = `>=${I}.${R}.${N}-${U} <${I}.${+R + 1}.0-0`) : x = `>=${I}.${R}.${N} <${I}.${+R + 1}.0-0`, l("tilde return", x), x;
|
|
2477
|
-
});
|
|
2478
|
-
}, D = (p, g) => p.trim().split(/\s+/).map((_) => K(_, g)).join(" "), K = (p, g) => {
|
|
2479
|
-
l("caret", p, g);
|
|
2480
|
-
const _ = g.loose ? c[u.CARETLOOSE] : c[u.CARET], $ = g.includePrerelease ? "-0" : "";
|
|
2481
|
-
return p.replace(_, (I, R, N, U, x) => {
|
|
2482
|
-
l("caret", p, I, R, N, U, x);
|
|
2483
|
-
let B;
|
|
2484
|
-
return L(R) ? B = "" : L(N) ? B = `>=${R}.0.0${$} <${+R + 1}.0.0-0` : L(U) ? R === "0" ? B = `>=${R}.${N}.0${$} <${R}.${+N + 1}.0-0` : B = `>=${R}.${N}.0${$} <${+R + 1}.0.0-0` : x ? (l("replaceCaret pr", x), R === "0" ? N === "0" ? B = `>=${R}.${N}.${U}-${x} <${R}.${N}.${+U + 1}-0` : B = `>=${R}.${N}.${U}-${x} <${R}.${+N + 1}.0-0` : B = `>=${R}.${N}.${U}-${x} <${+R + 1}.0.0-0`) : (l("no pr"), R === "0" ? N === "0" ? B = `>=${R}.${N}.${U}${$} <${R}.${N}.${+U + 1}-0` : B = `>=${R}.${N}.${U}${$} <${R}.${+N + 1}.0-0` : B = `>=${R}.${N}.${U} <${+R + 1}.0.0-0`), l("caret return", B), B;
|
|
2485
|
-
});
|
|
2486
|
-
}, F = (p, g) => (l("replaceXRanges", p, g), p.split(/\s+/).map((_) => o(_, g)).join(" ")), o = (p, g) => {
|
|
2487
|
-
p = p.trim();
|
|
2488
|
-
const _ = g.loose ? c[u.XRANGELOOSE] : c[u.XRANGE];
|
|
2489
|
-
return p.replace(_, ($, I, R, N, U, x) => {
|
|
2490
|
-
l("xRange", p, $, I, R, N, U, x);
|
|
2491
|
-
const B = L(R), Y = B || L(N), H = Y || L(U), ue = H;
|
|
2492
|
-
return I === "=" && ue && (I = ""), x = g.includePrerelease ? "-0" : "", B ? I === ">" || I === "<" ? $ = "<0.0.0-0" : $ = "*" : I && ue ? (Y && (N = 0), U = 0, I === ">" ? (I = ">=", Y ? (R = +R + 1, N = 0, U = 0) : (N = +N + 1, U = 0)) : I === "<=" && (I = "<", Y ? R = +R + 1 : N = +N + 1), I === "<" && (x = "-0"), $ = `${I + R}.${N}.${U}${x}`) : Y ? $ = `>=${R}.0.0${x} <${+R + 1}.0.0-0` : H && ($ = `>=${R}.${N}.0${x} <${R}.${+N + 1}.0-0`), l("xRange return", $), $;
|
|
2493
|
-
});
|
|
2494
|
-
}, i = (p, g) => (l("replaceStars", p, g), p.trim().replace(c[u.STAR], "")), h = (p, g) => (l("replaceGTE0", p, g), p.trim().replace(c[g.includePrerelease ? u.GTE0PRE : u.GTE0], "")), f = (p) => (g, _, $, I, R, N, U, x, B, Y, H, ue) => (L($) ? _ = "" : L(I) ? _ = `>=${$}.0.0${p ? "-0" : ""}` : L(R) ? _ = `>=${$}.${I}.0${p ? "-0" : ""}` : N ? _ = `>=${_}` : _ = `>=${_}${p ? "-0" : ""}`, L(B) ? x = "" : L(Y) ? x = `<${+B + 1}.0.0-0` : L(H) ? x = `<${B}.${+Y + 1}.0-0` : ue ? x = `<=${B}.${Y}.${H}-${ue}` : p ? x = `<${B}.${Y}.${+H + 1}-0` : x = `<=${x}`, `${_} ${x}`.trim()), w = (p, g, _) => {
|
|
2495
|
-
for (let $ = 0; $ < p.length; $++)
|
|
2496
|
-
if (!p[$].test(g))
|
|
2497
|
-
return !1;
|
|
2498
|
-
if (g.prerelease.length && !_.includePrerelease) {
|
|
2499
|
-
for (let $ = 0; $ < p.length; $++)
|
|
2500
|
-
if (l(p[$].semver), p[$].semver !== a.ANY && p[$].semver.prerelease.length > 0) {
|
|
2501
|
-
const I = p[$].semver;
|
|
2502
|
-
if (I.major === g.major && I.minor === g.minor && I.patch === g.patch)
|
|
2503
|
-
return !0;
|
|
2504
|
-
}
|
|
2505
|
-
return !1;
|
|
2506
|
-
}
|
|
2507
|
-
return !0;
|
|
2508
|
-
};
|
|
2509
|
-
return Ye;
|
|
2510
|
-
}
|
|
2511
|
-
var We, Dt;
|
|
2512
|
-
function Me() {
|
|
2513
|
-
if (Dt)
|
|
2514
|
-
return We;
|
|
2515
|
-
Dt = 1;
|
|
2516
|
-
const t = Symbol("SemVer ANY");
|
|
2517
|
-
class e {
|
|
2518
|
-
static get ANY() {
|
|
2519
|
-
return t;
|
|
2520
|
-
}
|
|
2521
|
-
constructor(v, d) {
|
|
2522
|
-
if (d = r(d), v instanceof e) {
|
|
2523
|
-
if (v.loose === !!d.loose)
|
|
2524
|
-
return v;
|
|
2525
|
-
v = v.value;
|
|
2526
|
-
}
|
|
2527
|
-
v = v.trim().split(/\s+/).join(" "), l("comparator", v, d), this.options = d, this.loose = !!d.loose, this.parse(v), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, l("comp", this);
|
|
2528
|
-
}
|
|
2529
|
-
parse(v) {
|
|
2530
|
-
const d = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR], S = v.match(d);
|
|
2531
|
-
if (!S)
|
|
2532
|
-
throw new TypeError(`Invalid comparator: ${v}`);
|
|
2533
|
-
this.operator = S[1] !== void 0 ? S[1] : "", this.operator === "=" && (this.operator = ""), S[2] ? this.semver = new m(S[2], this.options.loose) : this.semver = t;
|
|
2534
|
-
}
|
|
2535
|
-
toString() {
|
|
2536
|
-
return this.value;
|
|
2537
|
-
}
|
|
2538
|
-
test(v) {
|
|
2539
|
-
if (l("Comparator.test", v, this.options.loose), this.semver === t || v === t)
|
|
2540
|
-
return !0;
|
|
2541
|
-
if (typeof v == "string")
|
|
2542
|
-
try {
|
|
2543
|
-
v = new m(v, this.options);
|
|
2544
|
-
} catch {
|
|
2545
|
-
return !1;
|
|
2546
|
-
}
|
|
2547
|
-
return a(v, this.operator, this.semver, this.options);
|
|
2548
|
-
}
|
|
2549
|
-
intersects(v, d) {
|
|
2550
|
-
if (!(v instanceof e))
|
|
2551
|
-
throw new TypeError("a Comparator is required");
|
|
2552
|
-
return this.operator === "" ? this.value === "" ? !0 : new c(v.value, d).test(this.value) : v.operator === "" ? v.value === "" ? !0 : new c(this.value, d).test(v.semver) : (d = r(d), d.includePrerelease && (this.value === "<0.0.0-0" || v.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || v.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && v.operator.startsWith(">") || this.operator.startsWith("<") && v.operator.startsWith("<") || this.semver.version === v.semver.version && this.operator.includes("=") && v.operator.includes("=") || a(this.semver, "<", v.semver, d) && this.operator.startsWith(">") && v.operator.startsWith("<") || a(this.semver, ">", v.semver, d) && this.operator.startsWith("<") && v.operator.startsWith(">")));
|
|
2553
|
-
}
|
|
2554
|
-
}
|
|
2555
|
-
We = e;
|
|
2556
|
-
const r = dt, { safeRe: n, t: s } = _e, a = Er, l = je, m = ee, c = oe();
|
|
2557
|
-
return We;
|
|
2558
|
-
}
|
|
2559
|
-
const Sa = oe(), Pa = (t, e, r) => {
|
|
2560
|
-
try {
|
|
2561
|
-
e = new Sa(e, r);
|
|
2562
|
-
} catch {
|
|
2563
|
-
return !1;
|
|
2564
|
-
}
|
|
2565
|
-
return e.test(t);
|
|
2566
|
-
};
|
|
2567
|
-
var De = Pa;
|
|
2568
|
-
const Ta = oe(), Ca = (t, e) => new Ta(t, e).set.map((r) => r.map((n) => n.value).join(" ").trim().split(" "));
|
|
2569
|
-
var Na = Ca;
|
|
2570
|
-
const ka = ee, xa = oe(), Va = (t, e, r) => {
|
|
2571
|
-
let n = null, s = null, a = null;
|
|
2572
|
-
try {
|
|
2573
|
-
a = new xa(e, r);
|
|
2574
|
-
} catch {
|
|
2575
|
-
return null;
|
|
2576
|
-
}
|
|
2577
|
-
return t.forEach((l) => {
|
|
2578
|
-
a.test(l) && (!n || s.compare(l) === -1) && (n = l, s = new ka(n, r));
|
|
2579
|
-
}), n;
|
|
2580
|
-
};
|
|
2581
|
-
var Fa = Va;
|
|
2582
|
-
const ja = ee, Ua = oe(), Ma = (t, e, r) => {
|
|
2583
|
-
let n = null, s = null, a = null;
|
|
2584
|
-
try {
|
|
2585
|
-
a = new Ua(e, r);
|
|
2586
|
-
} catch {
|
|
2587
|
-
return null;
|
|
2588
|
-
}
|
|
2589
|
-
return t.forEach((l) => {
|
|
2590
|
-
a.test(l) && (!n || s.compare(l) === 1) && (n = l, s = new ja(n, r));
|
|
2591
|
-
}), n;
|
|
2592
|
-
};
|
|
2593
|
-
var Da = Ma;
|
|
2594
|
-
const Je = ee, Ba = oe(), Bt = Ue, Ga = (t, e) => {
|
|
2595
|
-
t = new Ba(t, e);
|
|
2596
|
-
let r = new Je("0.0.0");
|
|
2597
|
-
if (t.test(r) || (r = new Je("0.0.0-0"), t.test(r)))
|
|
2598
|
-
return r;
|
|
2599
|
-
r = null;
|
|
2600
|
-
for (let n = 0; n < t.set.length; ++n) {
|
|
2601
|
-
const s = t.set[n];
|
|
2602
|
-
let a = null;
|
|
2603
|
-
s.forEach((l) => {
|
|
2604
|
-
const m = new Je(l.semver.version);
|
|
2605
|
-
switch (l.operator) {
|
|
2606
|
-
case ">":
|
|
2607
|
-
m.prerelease.length === 0 ? m.patch++ : m.prerelease.push(0), m.raw = m.format();
|
|
2608
|
-
case "":
|
|
2609
|
-
case ">=":
|
|
2610
|
-
(!a || Bt(m, a)) && (a = m);
|
|
2611
|
-
break;
|
|
2612
|
-
case "<":
|
|
2613
|
-
case "<=":
|
|
2614
|
-
break;
|
|
2615
|
-
default:
|
|
2616
|
-
throw new Error(`Unexpected operation: ${l.operator}`);
|
|
2617
|
-
}
|
|
2618
|
-
}), a && (!r || Bt(r, a)) && (r = a);
|
|
2619
|
-
}
|
|
2620
|
-
return r && t.test(r) ? r : null;
|
|
2621
|
-
};
|
|
2622
|
-
var Ka = Ga;
|
|
2623
|
-
const qa = oe(), za = (t, e) => {
|
|
2624
|
-
try {
|
|
2625
|
-
return new qa(t, e).range || "*";
|
|
2626
|
-
} catch {
|
|
2627
|
-
return null;
|
|
2628
|
-
}
|
|
2629
|
-
};
|
|
2630
|
-
var Ha = za;
|
|
2631
|
-
const Xa = ee, _r = Me(), { ANY: Ya } = _r, Wa = oe(), Ja = De, Gt = Ue, Kt = pt, Za = ht, Qa = mt, eo = (t, e, r, n) => {
|
|
2632
|
-
t = new Xa(t, n), e = new Wa(e, n);
|
|
2633
|
-
let s, a, l, m, c;
|
|
2634
|
-
switch (r) {
|
|
2635
|
-
case ">":
|
|
2636
|
-
s = Gt, a = Za, l = Kt, m = ">", c = ">=";
|
|
2637
|
-
break;
|
|
2638
|
-
case "<":
|
|
2639
|
-
s = Kt, a = Qa, l = Gt, m = "<", c = "<=";
|
|
2640
|
-
break;
|
|
2641
|
-
default:
|
|
2642
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
2643
|
-
}
|
|
2644
|
-
if (Ja(t, e, n))
|
|
2645
|
-
return !1;
|
|
2646
|
-
for (let u = 0; u < e.set.length; ++u) {
|
|
2647
|
-
const v = e.set[u];
|
|
2648
|
-
let d = null, S = null;
|
|
2649
|
-
if (v.forEach((b) => {
|
|
2650
|
-
b.semver === Ya && (b = new _r(">=0.0.0")), d = d || b, S = S || b, s(b.semver, d.semver, n) ? d = b : l(b.semver, S.semver, n) && (S = b);
|
|
2651
|
-
}), d.operator === m || d.operator === c || (!S.operator || S.operator === m) && a(t, S.semver))
|
|
2652
|
-
return !1;
|
|
2653
|
-
if (S.operator === c && l(t, S.semver))
|
|
2654
|
-
return !1;
|
|
2655
|
-
}
|
|
2656
|
-
return !0;
|
|
2657
|
-
};
|
|
2658
|
-
var vt = eo;
|
|
2659
|
-
const to = vt, ro = (t, e, r) => to(t, e, ">", r);
|
|
2660
|
-
var no = ro;
|
|
2661
|
-
const so = vt, ao = (t, e, r) => so(t, e, "<", r);
|
|
2662
|
-
var oo = ao;
|
|
2663
|
-
const qt = oe(), lo = (t, e, r) => (t = new qt(t, r), e = new qt(e, r), t.intersects(e, r));
|
|
2664
|
-
var io = lo;
|
|
2665
|
-
const uo = De, co = ae;
|
|
2666
|
-
var fo = (t, e, r) => {
|
|
2667
|
-
const n = [];
|
|
2668
|
-
let s = null, a = null;
|
|
2669
|
-
const l = t.sort((v, d) => co(v, d, r));
|
|
2670
|
-
for (const v of l)
|
|
2671
|
-
uo(v, e, r) ? (a = v, s || (s = v)) : (a && n.push([s, a]), a = null, s = null);
|
|
2672
|
-
s && n.push([s, null]);
|
|
2673
|
-
const m = [];
|
|
2674
|
-
for (const [v, d] of n)
|
|
2675
|
-
v === d ? m.push(v) : !d && v === l[0] ? m.push("*") : d ? v === l[0] ? m.push(`<=${d}`) : m.push(`${v} - ${d}`) : m.push(`>=${v}`);
|
|
2676
|
-
const c = m.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e);
|
|
2677
|
-
return c.length < u.length ? c : e;
|
|
2678
|
-
};
|
|
2679
|
-
const zt = oe(), gt = Me(), { ANY: Ze } = gt, $e = De, yt = ae, po = (t, e, r = {}) => {
|
|
2680
|
-
if (t === e)
|
|
2681
|
-
return !0;
|
|
2682
|
-
t = new zt(t, r), e = new zt(e, r);
|
|
2683
|
-
let n = !1;
|
|
2684
|
-
e:
|
|
2685
|
-
for (const s of t.set) {
|
|
2686
|
-
for (const a of e.set) {
|
|
2687
|
-
const l = ho(s, a, r);
|
|
2688
|
-
if (n = n || l !== null, l)
|
|
2689
|
-
continue e;
|
|
2690
|
-
}
|
|
2691
|
-
if (n)
|
|
2692
|
-
return !1;
|
|
2693
|
-
}
|
|
2694
|
-
return !0;
|
|
2695
|
-
}, mo = [new gt(">=0.0.0-0")], Ht = [new gt(">=0.0.0")], ho = (t, e, r) => {
|
|
2696
|
-
if (t === e)
|
|
2697
|
-
return !0;
|
|
2698
|
-
if (t.length === 1 && t[0].semver === Ze) {
|
|
2699
|
-
if (e.length === 1 && e[0].semver === Ze)
|
|
2700
|
-
return !0;
|
|
2701
|
-
r.includePrerelease ? t = mo : t = Ht;
|
|
2702
|
-
}
|
|
2703
|
-
if (e.length === 1 && e[0].semver === Ze) {
|
|
2704
|
-
if (r.includePrerelease)
|
|
2705
|
-
return !0;
|
|
2706
|
-
e = Ht;
|
|
2707
|
-
}
|
|
2708
|
-
const n = /* @__PURE__ */ new Set();
|
|
2709
|
-
let s, a;
|
|
2710
|
-
for (const b of t)
|
|
2711
|
-
b.operator === ">" || b.operator === ">=" ? s = Xt(s, b, r) : b.operator === "<" || b.operator === "<=" ? a = Yt(a, b, r) : n.add(b.semver);
|
|
2712
|
-
if (n.size > 1)
|
|
2713
|
-
return null;
|
|
2714
|
-
let l;
|
|
2715
|
-
if (s && a) {
|
|
2716
|
-
if (l = yt(s.semver, a.semver, r), l > 0)
|
|
2717
|
-
return null;
|
|
2718
|
-
if (l === 0 && (s.operator !== ">=" || a.operator !== "<="))
|
|
2719
|
-
return null;
|
|
2720
|
-
}
|
|
2721
|
-
for (const b of n) {
|
|
2722
|
-
if (s && !$e(b, String(s), r) || a && !$e(b, String(a), r))
|
|
2723
|
-
return null;
|
|
2724
|
-
for (const y of e)
|
|
2725
|
-
if (!$e(b, String(y), r))
|
|
2726
|
-
return !1;
|
|
2727
|
-
return !0;
|
|
2728
|
-
}
|
|
2729
|
-
let m, c, u, v, d = a && !r.includePrerelease && a.semver.prerelease.length ? a.semver : !1, S = s && !r.includePrerelease && s.semver.prerelease.length ? s.semver : !1;
|
|
2730
|
-
d && d.prerelease.length === 1 && a.operator === "<" && d.prerelease[0] === 0 && (d = !1);
|
|
2731
|
-
for (const b of e) {
|
|
2732
|
-
if (v = v || b.operator === ">" || b.operator === ">=", u = u || b.operator === "<" || b.operator === "<=", s) {
|
|
2733
|
-
if (S && b.semver.prerelease && b.semver.prerelease.length && b.semver.major === S.major && b.semver.minor === S.minor && b.semver.patch === S.patch && (S = !1), b.operator === ">" || b.operator === ">=") {
|
|
2734
|
-
if (m = Xt(s, b, r), m === b && m !== s)
|
|
2735
|
-
return !1;
|
|
2736
|
-
} else if (s.operator === ">=" && !$e(s.semver, String(b), r))
|
|
2737
|
-
return !1;
|
|
2738
|
-
}
|
|
2739
|
-
if (a) {
|
|
2740
|
-
if (d && b.semver.prerelease && b.semver.prerelease.length && b.semver.major === d.major && b.semver.minor === d.minor && b.semver.patch === d.patch && (d = !1), b.operator === "<" || b.operator === "<=") {
|
|
2741
|
-
if (c = Yt(a, b, r), c === b && c !== a)
|
|
2742
|
-
return !1;
|
|
2743
|
-
} else if (a.operator === "<=" && !$e(a.semver, String(b), r))
|
|
2744
|
-
return !1;
|
|
2745
|
-
}
|
|
2746
|
-
if (!b.operator && (a || s) && l !== 0)
|
|
2747
|
-
return !1;
|
|
2748
|
-
}
|
|
2749
|
-
return !(s && u && !a && l !== 0 || a && v && !s && l !== 0 || S || d);
|
|
2750
|
-
}, Xt = (t, e, r) => {
|
|
2751
|
-
if (!t)
|
|
2752
|
-
return e;
|
|
2753
|
-
const n = yt(t.semver, e.semver, r);
|
|
2754
|
-
return n > 0 ? t : n < 0 || e.operator === ">" && t.operator === ">=" ? e : t;
|
|
2755
|
-
}, Yt = (t, e, r) => {
|
|
2756
|
-
if (!t)
|
|
2757
|
-
return e;
|
|
2758
|
-
const n = yt(t.semver, e.semver, r);
|
|
2759
|
-
return n < 0 ? t : n > 0 || e.operator === "<" && t.operator === "<=" ? e : t;
|
|
2760
|
-
};
|
|
2761
|
-
var vo = po;
|
|
2762
|
-
const Qe = _e, Wt = Fe, go = ee, Jt = yr, yo = be, bo = ws, $o = Os, Eo = Ss, _o = Ts, Ro = ks, wo = Fs, Io = Ms, Ao = Gs, Oo = ae, Lo = Hs, So = Ws, Po = ft, To = ea, Co = na, No = Ue, ko = pt, xo = br, Vo = $r, Fo = mt, jo = ht, Uo = Er, Mo = Aa, Do = Me(), Bo = oe(), Go = De, Ko = Na, qo = Fa, zo = Da, Ho = Ka, Xo = Ha, Yo = vt, Wo = no, Jo = oo, Zo = io, Qo = fo, el = vo;
|
|
2763
|
-
var tl = {
|
|
2764
|
-
parse: yo,
|
|
2765
|
-
valid: bo,
|
|
2766
|
-
clean: $o,
|
|
2767
|
-
inc: Eo,
|
|
2768
|
-
diff: _o,
|
|
2769
|
-
major: Ro,
|
|
2770
|
-
minor: wo,
|
|
2771
|
-
patch: Io,
|
|
2772
|
-
prerelease: Ao,
|
|
2773
|
-
compare: Oo,
|
|
2774
|
-
rcompare: Lo,
|
|
2775
|
-
compareLoose: So,
|
|
2776
|
-
compareBuild: Po,
|
|
2777
|
-
sort: To,
|
|
2778
|
-
rsort: Co,
|
|
2779
|
-
gt: No,
|
|
2780
|
-
lt: ko,
|
|
2781
|
-
eq: xo,
|
|
2782
|
-
neq: Vo,
|
|
2783
|
-
gte: Fo,
|
|
2784
|
-
lte: jo,
|
|
2785
|
-
cmp: Uo,
|
|
2786
|
-
coerce: Mo,
|
|
2787
|
-
Comparator: Do,
|
|
2788
|
-
Range: Bo,
|
|
2789
|
-
satisfies: Go,
|
|
2790
|
-
toComparators: Ko,
|
|
2791
|
-
maxSatisfying: qo,
|
|
2792
|
-
minSatisfying: zo,
|
|
2793
|
-
minVersion: Ho,
|
|
2794
|
-
validRange: Xo,
|
|
2795
|
-
outside: Yo,
|
|
2796
|
-
gtr: Wo,
|
|
2797
|
-
ltr: Jo,
|
|
2798
|
-
intersects: Zo,
|
|
2799
|
-
simplifyRange: Qo,
|
|
2800
|
-
subset: el,
|
|
2801
|
-
SemVer: go,
|
|
2802
|
-
re: Qe.re,
|
|
2803
|
-
src: Qe.src,
|
|
2804
|
-
tokens: Qe.t,
|
|
2805
|
-
SEMVER_SPEC_VERSION: Wt.SEMVER_SPEC_VERSION,
|
|
2806
|
-
RELEASE_TYPES: Wt.RELEASE_TYPES,
|
|
2807
|
-
compareIdentifiers: Jt.compareIdentifiers,
|
|
2808
|
-
rcompareIdentifiers: Jt.rcompareIdentifiers
|
|
2809
|
-
};
|
|
2810
|
-
const Zt = /* @__PURE__ */ sr(tl);
|
|
2811
|
-
var ot = /* @__PURE__ */ ((t) => (t[t.menuV3 = 0] = "menuV3", t[t.applyEffectOnOrder = 1] = "applyEffectOnOrder", t[t.nestedAddon = 2] = "nestedAddon", t[t.feedmeDelivery = 3] = "feedmeDelivery", t[t.taxAndServiceChargeV4 = 4] = "taxAndServiceChargeV4", t[t.itemCombo = 5] = "itemCombo", t[t.itemTakeaway = 6] = "itemTakeaway", t[t.transferInventory = 7] = "transferInventory", t[t.qrEPayment = 8] = "qrEPayment", t[t.deliveryIntegration = 9] = "deliveryIntegration", t[t.rmsPayment = 10] = "rmsPayment", t[t.queue = 11] = "queue", t[t.paymentVoucher = 12] = "paymentVoucher", t))(ot || {});
|
|
2812
|
-
const Rr = {
|
|
2813
|
-
0: "3.0.0-alpha",
|
|
2814
|
-
1: "3.5.0-alpha",
|
|
2815
|
-
2: "4.0.0-alpha",
|
|
2816
|
-
4: "4.0.0-alpha",
|
|
2817
|
-
5: "4.1.0-alpha",
|
|
2818
|
-
// TODO: #475 make sure current pos version
|
|
2819
|
-
6: "4.3.10-alpha",
|
|
2820
|
-
7: "4.5.0-alpha",
|
|
2821
|
-
8: "6.9.0-alpha",
|
|
2822
|
-
9: "6.11.0-alpha",
|
|
2823
|
-
3: "6.12.0-alpha",
|
|
2824
|
-
10: "6.21.0-alpha",
|
|
2825
|
-
11: "6.21.0-alpha",
|
|
2826
|
-
12: "6.31.0-alpha"
|
|
2827
|
-
};
|
|
2828
|
-
function rl(t, e) {
|
|
2829
|
-
return Zt.valid(e) && Zt.gte(e, Rr[t]);
|
|
2830
|
-
}
|
|
2831
|
-
function nl(t) {
|
|
2832
|
-
return Rr[t].replace("-alpha", "");
|
|
2833
|
-
}
|
|
2834
|
-
function sl({ posVersion: t, payoutAccount: e }) {
|
|
2835
|
-
return !!t && rl(ot.qrEPayment, t) ? !e || !e.enable ? "Payout account is required" : e.status !== it.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? "Payout account under review" : !0 : `For POS ${nl(ot.qrEPayment)} or above`;
|
|
2836
|
-
}
|
|
2837
|
-
function wr(t) {
|
|
2838
|
-
return {
|
|
2839
|
-
id: t._id,
|
|
2840
|
-
...t,
|
|
2841
|
-
profile: {
|
|
2842
|
-
...t.profile,
|
|
2843
|
-
address: Ee(t.profile.address)
|
|
2844
|
-
},
|
|
2845
|
-
allowEPayment: sl(t)
|
|
2846
|
-
};
|
|
2847
|
-
}
|
|
2848
|
-
function Le(t) {
|
|
2849
|
-
return wr(ar(t));
|
|
2850
|
-
}
|
|
2851
|
-
async function Qt(t) {
|
|
2852
|
-
const e = ar(t), r = [];
|
|
2853
|
-
for (const n of e)
|
|
2854
|
-
r.push(await wr(n));
|
|
2855
|
-
return r;
|
|
2856
|
-
}
|
|
2857
|
-
const Ir = {
|
|
2858
|
-
async readRestaurant(t) {
|
|
2859
|
-
return await Le(await Ke().get(`/restaurants/${t}`));
|
|
2860
|
-
},
|
|
2861
|
-
async readRestaurants() {
|
|
2862
|
-
return await Qt(await qe().get("/restaurants"));
|
|
2863
|
-
},
|
|
2864
|
-
async readRestaurantsByBusiness() {
|
|
2865
|
-
return await Qt(await qe().get("/restaurant-list"));
|
|
2866
|
-
},
|
|
2867
|
-
async createRestaurant(t) {
|
|
2868
|
-
return await Le(await qe().post("/restaurants", t));
|
|
2869
|
-
},
|
|
2870
|
-
async updateRestaurantProfile(t, e) {
|
|
2871
|
-
return await Le(
|
|
2872
|
-
await Ke().put(`/restaurants/${t}/profile`, e)
|
|
2873
|
-
);
|
|
2874
|
-
},
|
|
2875
|
-
async updatePayoutAccount(t, e) {
|
|
2876
|
-
return await Le(
|
|
2877
|
-
await Ke().put(`/restaurants/${t}/payout-account`, e)
|
|
2878
|
-
);
|
|
2879
|
-
}
|
|
2880
|
-
}, et = {
|
|
2881
|
-
async get(t, e) {
|
|
2882
|
-
const r = He(void 0, e), n = Xe(r, t);
|
|
2883
|
-
return await (await qr(n)).text();
|
|
2884
|
-
},
|
|
2885
|
-
async update(t, e, r) {
|
|
2886
|
-
const n = He(void 0, r), s = Xe(n, t);
|
|
2887
|
-
return await zr(s, e), await Hr(s);
|
|
2888
|
-
},
|
|
2889
|
-
async delete(t, e) {
|
|
2890
|
-
const r = He(void 0, e), n = Xe(r, t);
|
|
2891
|
-
await Xr(n);
|
|
2892
|
-
}
|
|
2893
|
-
}, de = {
|
|
2894
|
-
async get(t) {
|
|
2895
|
-
return await et.get(t);
|
|
2896
|
-
},
|
|
2897
|
-
async update(t, e, r) {
|
|
2898
|
-
return await et.update(t, e);
|
|
2899
|
-
},
|
|
2900
|
-
async delete(t) {
|
|
2901
|
-
await et.delete(t);
|
|
2902
|
-
}
|
|
2903
|
-
};
|
|
2904
|
-
class al {
|
|
2905
|
-
constructor(e, r) {
|
|
2906
|
-
Ge(this, "restaurant");
|
|
2907
|
-
Ge(this, "data");
|
|
2908
|
-
this.restaurant = e, this.data = r;
|
|
2909
|
-
}
|
|
2910
|
-
generateUrl(e) {
|
|
2911
|
-
const r = e === "normal" ? ct().toISOString() : "photo";
|
|
2912
|
-
return `restaurant/${this.restaurant.id}/${e}/${r}`;
|
|
2913
|
-
}
|
|
2914
|
-
async manageThumbnail() {
|
|
2915
|
-
const { newThumbnailPhoto: e, thumbnailPhoto: r } = this.data;
|
|
2916
|
-
if (e) {
|
|
2917
|
-
const s = await de.update(this.generateUrl("thumbnail"), e, {
|
|
2918
|
-
includedTime: !0
|
|
2919
|
-
});
|
|
2920
|
-
this.data.thumbnailPhoto = s;
|
|
2921
|
-
return;
|
|
2922
|
-
}
|
|
2923
|
-
const n = this.restaurant.profile.thumbnailPhoto;
|
|
2924
|
-
n && !r && (await de.delete(n), this.data.thumbnailPhoto = void 0);
|
|
2925
|
-
}
|
|
2926
|
-
async manageCover() {
|
|
2927
|
-
const { newCoverPhoto: e, coverPhoto: r } = this.data;
|
|
2928
|
-
if (e) {
|
|
2929
|
-
const s = await de.update(this.generateUrl("cover"), e, {
|
|
2930
|
-
includedTime: !0
|
|
2931
|
-
});
|
|
2932
|
-
this.data.coverPhoto = s;
|
|
2933
|
-
return;
|
|
2934
|
-
}
|
|
2935
|
-
const n = this.restaurant.profile.coverPhoto;
|
|
2936
|
-
n && !r && (await de.delete(n), this.data.coverPhoto = void 0);
|
|
2937
|
-
}
|
|
2938
|
-
async manageCarousels() {
|
|
2939
|
-
const e = this.data.newPhotos || [];
|
|
2940
|
-
for (const r of e) {
|
|
2941
|
-
const n = await de.update(this.generateUrl("normal"), r);
|
|
2942
|
-
this.data.photos = [...this.data.photos || [], n];
|
|
2943
|
-
}
|
|
2944
|
-
}
|
|
2945
|
-
async run() {
|
|
2946
|
-
return await this.manageThumbnail(), await this.manageCover(), await this.manageCarousels(), this.data;
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
async function er(t, e) {
|
|
2950
|
-
const r = new al(t, e);
|
|
2951
|
-
await r.run(), await Ir.updateRestaurantProfile(t.id, r.data), await fe().readRestaurants();
|
|
2952
|
-
}
|
|
2953
|
-
const ol = () => {
|
|
2954
|
-
const t = fe();
|
|
2955
|
-
return {
|
|
2956
|
-
async createRestaurant(e, r) {
|
|
2957
|
-
const n = await Ir.createRestaurant({
|
|
2958
|
-
businessId: e,
|
|
2959
|
-
features: [],
|
|
2960
|
-
profile: r
|
|
2961
|
-
});
|
|
2962
|
-
await er(n, r), await t.readRestaurants();
|
|
2963
|
-
},
|
|
2964
|
-
async updateRestaurantProfile(e, r) {
|
|
2965
|
-
await er(e, r);
|
|
2966
|
-
}
|
|
2967
|
-
};
|
|
2968
|
-
};
|
|
2969
|
-
function ll(t) {
|
|
2970
|
-
const e = re({ top: 0, bottom: 0, left: 0, right: 0 });
|
|
2971
|
-
function r() {
|
|
2972
|
-
if (t.value) {
|
|
2973
|
-
const n = t.value.getBoundingClientRect();
|
|
2974
|
-
e.value = {
|
|
2975
|
-
top: n.top,
|
|
2976
|
-
bottom: n.bottom,
|
|
2977
|
-
left: n.left,
|
|
2978
|
-
right: n.right
|
|
2979
|
-
};
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
return tt(t, async (n) => {
|
|
2983
|
-
n && (await nr(), r());
|
|
2984
|
-
}), rr(() => {
|
|
2985
|
-
window.addEventListener("resize", r);
|
|
2986
|
-
}), Nr(() => {
|
|
2987
|
-
window.removeEventListener("resize", r);
|
|
2988
|
-
}), e;
|
|
2989
|
-
}
|
|
2990
|
-
const il = /* @__PURE__ */ Z({
|
|
2991
|
-
__name: "FormColumn",
|
|
2992
|
-
props: {
|
|
2993
|
-
shrinkable: { type: Boolean }
|
|
2994
|
-
},
|
|
2995
|
-
setup(t) {
|
|
2996
|
-
return (e, r) => (T(), j("div", {
|
|
2997
|
-
class: J(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
|
|
2998
|
-
}, [
|
|
2999
|
-
ne(e.$slots, "default")
|
|
3000
|
-
], 2));
|
|
3001
|
-
}
|
|
3002
|
-
}), ul = {
|
|
3003
|
-
key: 0,
|
|
3004
|
-
class: "flex flex-row justify-between items-center"
|
|
3005
|
-
}, cl = { class: "space-y-4" }, dl = { class: "fm-typo-en-title-sm-600" }, fl = {
|
|
3006
|
-
key: 0,
|
|
3007
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
3008
|
-
}, Se = /* @__PURE__ */ Z({
|
|
3009
|
-
__name: "FormSection",
|
|
3010
|
-
props: {
|
|
3011
|
-
title: {},
|
|
3012
|
-
subTitle: {},
|
|
3013
|
-
shrinkable: { type: Boolean }
|
|
3014
|
-
},
|
|
3015
|
-
setup(t) {
|
|
3016
|
-
return (e, r) => (T(), j("div", {
|
|
3017
|
-
class: J(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
|
|
3018
|
-
}, [
|
|
3019
|
-
e.title ? (T(), j("div", ul, [
|
|
3020
|
-
E("div", cl, [
|
|
3021
|
-
E("p", dl, q(e.title), 1),
|
|
3022
|
-
e.subTitle ? (T(), j("p", fl, q(e.subTitle), 1)) : ie("", !0)
|
|
3023
|
-
]),
|
|
3024
|
-
ne(e.$slots, "append-title")
|
|
3025
|
-
])) : ie("", !0),
|
|
3026
|
-
O(il, { shrinkable: e.shrinkable }, {
|
|
3027
|
-
default: M(() => [
|
|
3028
|
-
ne(e.$slots, "default")
|
|
3029
|
-
]),
|
|
3030
|
-
_: 3
|
|
3031
|
-
}, 8, ["shrinkable"])
|
|
3032
|
-
], 2));
|
|
3033
|
-
}
|
|
3034
|
-
}), pl = { class: "flex justify-center" }, ml = { class: "space-y-24" }, hl = { class: "space-y-24" }, vl = { class: "flex gap-16 xs:flex-col xs:gap-24" }, gl = { class: "flex-1" }, yl = { class: "flex-1" }, bl = { class: "space-y-24" }, $l = { class: "space-y-24" }, El = { class: "space-y-8" }, _l = { class: "space-y-24" }, tr = /* @__PURE__ */ Z({
|
|
3035
|
-
__name: "RestaurantForm",
|
|
3036
|
-
props: {
|
|
3037
|
-
restaurantId: {
|
|
3038
|
-
type: String,
|
|
3039
|
-
default: void 0
|
|
3040
|
-
},
|
|
3041
|
-
restaurant: {
|
|
3042
|
-
type: Object
|
|
3043
|
-
},
|
|
3044
|
-
initialValue: {
|
|
3045
|
-
type: Object,
|
|
3046
|
-
default: void 0
|
|
3047
|
-
},
|
|
3048
|
-
enableFeedmeExpress: {
|
|
3049
|
-
type: Boolean,
|
|
3050
|
-
required: !0
|
|
3051
|
-
}
|
|
3052
|
-
},
|
|
3053
|
-
setup(t, { expose: e }) {
|
|
3054
|
-
const r = t, { restaurants: n, currentBusiness: s } = fe(), a = ut(), l = or(a), { copyTextToClipboard: m } = cr(), c = re(!1), u = (h, f) => {
|
|
3055
|
-
c.value = !c.value;
|
|
3056
|
-
}, v = X(() => {
|
|
3057
|
-
var h;
|
|
3058
|
-
return (h = r.restaurant) == null ? void 0 : h.profile;
|
|
3059
|
-
}), d = lt(
|
|
3060
|
-
v.value ? ge(v.value) : {
|
|
3061
|
-
...At(),
|
|
3062
|
-
address: Ee(At().address),
|
|
3063
|
-
legalName: "",
|
|
3064
|
-
sstRegNo: "",
|
|
3065
|
-
description: "",
|
|
3066
|
-
url: "",
|
|
3067
|
-
thumbnailPhoto: void 0,
|
|
3068
|
-
coverPhoto: void 0,
|
|
3069
|
-
newThumbnailPhoto: void 0,
|
|
3070
|
-
newCoverPhoto: void 0,
|
|
3071
|
-
newPhotos: [],
|
|
3072
|
-
operatingHours: {
|
|
3073
|
-
0: {
|
|
3074
|
-
enable: !1,
|
|
3075
|
-
hours: []
|
|
3076
|
-
},
|
|
3077
|
-
1: {
|
|
3078
|
-
enable: !1,
|
|
3079
|
-
hours: []
|
|
3080
|
-
},
|
|
3081
|
-
2: {
|
|
3082
|
-
enable: !1,
|
|
3083
|
-
hours: []
|
|
3084
|
-
},
|
|
3085
|
-
3: {
|
|
3086
|
-
enable: !1,
|
|
3087
|
-
hours: []
|
|
3088
|
-
},
|
|
3089
|
-
4: {
|
|
3090
|
-
enable: !1,
|
|
3091
|
-
hours: []
|
|
3092
|
-
},
|
|
3093
|
-
5: {
|
|
3094
|
-
enable: !1,
|
|
3095
|
-
hours: []
|
|
3096
|
-
},
|
|
3097
|
-
6: {
|
|
3098
|
-
enable: !1,
|
|
3099
|
-
hours: []
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
), S = "https://feedmedev.cc/", b = X(() => fe().currentCountry.value), y = re(r.restaurantId ? "Update restaurant" : "Add restaurant"), P = X(() => Ee(d.address)), C = X(() => P.value.formatted);
|
|
3104
|
-
function k(h) {
|
|
3105
|
-
var f;
|
|
3106
|
-
if (typeof h == "string") {
|
|
3107
|
-
const w = (f = n.value.find((p) => p._id === h)) == null ? void 0 : f.profile.operatingHours;
|
|
3108
|
-
w ? d.operatingHours = ge(w) : a.open({
|
|
3109
|
-
title: "Invalid operating hour",
|
|
3110
|
-
type: "error"
|
|
3111
|
-
});
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
function A() {
|
|
3115
|
-
d.thumbnailPhoto = void 0, d.newThumbnailPhoto = void 0;
|
|
3116
|
-
}
|
|
3117
|
-
function L() {
|
|
3118
|
-
d.coverPhoto = void 0, d.newCoverPhoto = void 0;
|
|
3119
|
-
}
|
|
3120
|
-
function V(h) {
|
|
3121
|
-
d.newPhotos = d.newPhotos || [], d.newPhotos.push(h);
|
|
3122
|
-
}
|
|
3123
|
-
const W = ol();
|
|
3124
|
-
function D() {
|
|
3125
|
-
var h, f;
|
|
3126
|
-
if (u(), r.restaurantId) {
|
|
3127
|
-
if (!((h = s.value) != null && h.id))
|
|
3128
|
-
return;
|
|
3129
|
-
l.minor(async () => {
|
|
3130
|
-
var w, p;
|
|
3131
|
-
r.restaurant && await W.updateRestaurantProfile(r.restaurant, {
|
|
3132
|
-
...d,
|
|
3133
|
-
url: ((w = d.url) == null ? void 0 : w.trim()) || null,
|
|
3134
|
-
code: ((p = d.code) == null ? void 0 : p.trim()) || null
|
|
3135
|
-
});
|
|
3136
|
-
});
|
|
3137
|
-
} else {
|
|
3138
|
-
if (!((f = s.value) != null && f.id))
|
|
3139
|
-
return;
|
|
3140
|
-
l.minor(async () => {
|
|
3141
|
-
var w, p;
|
|
3142
|
-
await W.createRestaurant(s.value.id, {
|
|
3143
|
-
...d,
|
|
3144
|
-
url: ((w = d.url) == null ? void 0 : w.trim()) || null,
|
|
3145
|
-
code: ((p = d.code) == null ? void 0 : p.trim()) || null
|
|
3146
|
-
});
|
|
3147
|
-
});
|
|
3148
|
-
}
|
|
3149
|
-
}
|
|
3150
|
-
const K = X(() => ({
|
|
3151
|
-
title: "Restaurant summary",
|
|
3152
|
-
items: [
|
|
3153
|
-
{
|
|
3154
|
-
name: "Restaurant name",
|
|
3155
|
-
value: d.name
|
|
3156
|
-
},
|
|
3157
|
-
{
|
|
3158
|
-
name: "Legal name",
|
|
3159
|
-
value: d.legalName
|
|
3160
|
-
},
|
|
3161
|
-
{
|
|
3162
|
-
name: "Contact no.",
|
|
3163
|
-
value: d.phoneNo
|
|
3164
|
-
},
|
|
3165
|
-
{
|
|
3166
|
-
name: "Address",
|
|
3167
|
-
value: C.value
|
|
3168
|
-
}
|
|
3169
|
-
]
|
|
3170
|
-
})), { isAtMost: F } = ir();
|
|
3171
|
-
X(() => F("sm"));
|
|
3172
|
-
const o = re(null), i = ll(o);
|
|
3173
|
-
return e({ trigger: u }), (h, f) => {
|
|
3174
|
-
const w = G("FmTextField"), p = G("FmPhoneNumber"), g = G("FmTextarea"), _ = G("FmButton");
|
|
3175
|
-
return T(), j(se, null, [
|
|
3176
|
-
ne(h.$slots, "trigger", kr(xr({
|
|
3177
|
-
trigger: u
|
|
3178
|
-
}))),
|
|
3179
|
-
O(En, {
|
|
3180
|
-
title: y.value,
|
|
3181
|
-
show: c.value,
|
|
3182
|
-
"primary-action": { label: "Save" },
|
|
3183
|
-
"secondary-actions": [{ label: "Discard", click: () => c.value = !1 }],
|
|
3184
|
-
onOnPrimary: D,
|
|
3185
|
-
onOnCancel: f[17] || (f[17] = ($) => c.value = !1)
|
|
3186
|
-
}, {
|
|
3187
|
-
"append-title": M(() => [
|
|
3188
|
-
z(F)("sm") ? (T(), Q(Pt, {
|
|
3189
|
-
key: 0,
|
|
3190
|
-
variant: "dialog",
|
|
3191
|
-
title: K.value.title,
|
|
3192
|
-
items: K.value.items
|
|
3193
|
-
}, null, 8, ["title", "items"])) : ie("", !0)
|
|
3194
|
-
]),
|
|
3195
|
-
default: M(() => [
|
|
3196
|
-
E("div", pl, [
|
|
3197
|
-
E("div", {
|
|
3198
|
-
ref_key: "formWrapper",
|
|
3199
|
-
ref: o,
|
|
3200
|
-
class: "py-24 pr-[400px] w-[1150px] xs:pr-0 sm:pr-0 xs:w-full"
|
|
3201
|
-
}, [
|
|
3202
|
-
z(F)("sm") ? ie("", !0) : (T(), Q(Pt, {
|
|
3203
|
-
key: 0,
|
|
3204
|
-
class: "fixed",
|
|
3205
|
-
style: Te({
|
|
3206
|
-
top: "85px",
|
|
3207
|
-
left: z(i).right - 400 + "px"
|
|
3208
|
-
}),
|
|
3209
|
-
variant: "full",
|
|
3210
|
-
title: K.value.title,
|
|
3211
|
-
items: K.value.items
|
|
3212
|
-
}, null, 8, ["style", "title", "items"])),
|
|
3213
|
-
E("div", ml, [
|
|
3214
|
-
O(Se, { title: "Basic info" }, {
|
|
3215
|
-
default: M(() => {
|
|
3216
|
-
var $, I;
|
|
3217
|
-
return [
|
|
3218
|
-
E("div", hl, [
|
|
3219
|
-
E("div", null, [
|
|
3220
|
-
O(w, {
|
|
3221
|
-
label: "Code",
|
|
3222
|
-
modelValue: d.code,
|
|
3223
|
-
"onUpdate:modelValue": f[0] || (f[0] = (R) => d.code = R),
|
|
3224
|
-
"label-mark": "optional",
|
|
3225
|
-
"helper-text": "Code can only set once",
|
|
3226
|
-
disabled: (($ = v.value) == null ? void 0 : $.code) !== void 0 && ((I = v.value) == null ? void 0 : I.code) !== null
|
|
3227
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
3228
|
-
]),
|
|
3229
|
-
E("div", null, [
|
|
3230
|
-
O(w, {
|
|
3231
|
-
label: "Restaurant name",
|
|
3232
|
-
modelValue: d.name,
|
|
3233
|
-
"onUpdate:modelValue": f[1] || (f[1] = (R) => d.name = R),
|
|
3234
|
-
"label-mark": "required",
|
|
3235
|
-
rules: [z(ce)]
|
|
3236
|
-
}, null, 8, ["modelValue", "rules"])
|
|
3237
|
-
]),
|
|
3238
|
-
E("div", null, [
|
|
3239
|
-
O(w, {
|
|
3240
|
-
label: "Legal name",
|
|
3241
|
-
modelValue: d.legalName,
|
|
3242
|
-
"onUpdate:modelValue": f[2] || (f[2] = (R) => d.legalName = R),
|
|
3243
|
-
"label-mark": "required",
|
|
3244
|
-
rules: [z(ce)]
|
|
3245
|
-
}, null, 8, ["modelValue", "rules"])
|
|
3246
|
-
]),
|
|
3247
|
-
E("div", null, [
|
|
3248
|
-
O(w, {
|
|
3249
|
-
label: "Registration no.",
|
|
3250
|
-
modelValue: d.regNo,
|
|
3251
|
-
"onUpdate:modelValue": f[3] || (f[3] = (R) => d.regNo = R),
|
|
3252
|
-
"label-mark": "required",
|
|
3253
|
-
rules: [z(ce)]
|
|
3254
|
-
}, null, 8, ["modelValue", "rules"])
|
|
3255
|
-
]),
|
|
3256
|
-
E("div", null, [
|
|
3257
|
-
O(w, {
|
|
3258
|
-
modelValue: d.sstRegNo,
|
|
3259
|
-
"onUpdate:modelValue": f[4] || (f[4] = (R) => d.sstRegNo = R),
|
|
3260
|
-
label: "Tax No",
|
|
3261
|
-
"label-mark": "optional"
|
|
3262
|
-
}, null, 8, ["modelValue"])
|
|
3263
|
-
]),
|
|
3264
|
-
E("div", vl, [
|
|
3265
|
-
E("div", gl, [
|
|
3266
|
-
O(p, {
|
|
3267
|
-
class: "w-full",
|
|
3268
|
-
label: "Concat no.",
|
|
3269
|
-
modelValue: d.phoneNo,
|
|
3270
|
-
"onUpdate:modelValue": f[5] || (f[5] = (R) => d.phoneNo = R),
|
|
3271
|
-
"label-mark": "optional"
|
|
3272
|
-
}, null, 8, ["modelValue"])
|
|
3273
|
-
]),
|
|
3274
|
-
E("div", yl, [
|
|
3275
|
-
O(w, {
|
|
3276
|
-
class: "w-full",
|
|
3277
|
-
modelValue: d.email,
|
|
3278
|
-
"onUpdate:modelValue": f[6] || (f[6] = (R) => d.email = R),
|
|
3279
|
-
label: "Email",
|
|
3280
|
-
"label-mark": "optional"
|
|
3281
|
-
}, null, 8, ["modelValue"])
|
|
3282
|
-
])
|
|
3283
|
-
]),
|
|
3284
|
-
E("div", null, [
|
|
3285
|
-
O(ve, {
|
|
3286
|
-
label: "Restaurant image",
|
|
3287
|
-
"sub-label": "(optional)",
|
|
3288
|
-
"previous-url": d.thumbnailPhoto,
|
|
3289
|
-
modelValue: d.newThumbnailPhoto,
|
|
3290
|
-
"onUpdate:modelValue": f[7] || (f[7] = (R) => d.newThumbnailPhoto = R),
|
|
3291
|
-
"onReset:modelValue": A
|
|
3292
|
-
}, null, 8, ["previous-url", "modelValue"])
|
|
3293
|
-
])
|
|
3294
|
-
])
|
|
3295
|
-
];
|
|
3296
|
-
}),
|
|
3297
|
-
_: 1
|
|
3298
|
-
}),
|
|
3299
|
-
f[18] || (f[18] = E("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3300
|
-
O(Se, { title: "Address" }, {
|
|
3301
|
-
default: M(() => [
|
|
3302
|
-
E("div", bl, [
|
|
3303
|
-
O(Jn, {
|
|
3304
|
-
modelValue: d.address,
|
|
3305
|
-
"onUpdate:modelValue": f[8] || (f[8] = ($) => d.address = $)
|
|
3306
|
-
}, null, 8, ["modelValue"]),
|
|
3307
|
-
O(ss, {
|
|
3308
|
-
address: P.value,
|
|
3309
|
-
modelValue: d.address.coordinates,
|
|
3310
|
-
"onUpdate:modelValue": f[9] || (f[9] = ($) => d.address.coordinates = $)
|
|
3311
|
-
}, null, 8, ["address", "modelValue"])
|
|
3312
|
-
])
|
|
3313
|
-
]),
|
|
3314
|
-
_: 1
|
|
3315
|
-
}),
|
|
3316
|
-
f[19] || (f[19] = E("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3317
|
-
O(Se, { title: "Operation hours" }, {
|
|
3318
|
-
default: M(() => [
|
|
3319
|
-
E("div", $l, [
|
|
3320
|
-
E("div", El, [
|
|
3321
|
-
O(Lt, {
|
|
3322
|
-
label: "Copy with",
|
|
3323
|
-
optional: !1
|
|
3324
|
-
}),
|
|
3325
|
-
O(Ur, {
|
|
3326
|
-
class: "w-[320px]",
|
|
3327
|
-
"exclude-restaurants": [t.restaurantId ?? ""],
|
|
3328
|
-
"model-value": "",
|
|
3329
|
-
"onUpdate:modelValue": f[10] || (f[10] = ($) => k($))
|
|
3330
|
-
}, null, 8, ["exclude-restaurants"]),
|
|
3331
|
-
O(is, {
|
|
3332
|
-
modelValue: d.operatingHours,
|
|
3333
|
-
"onUpdate:modelValue": f[11] || (f[11] = ($) => d.operatingHours = $)
|
|
3334
|
-
}, null, 8, ["modelValue"])
|
|
3335
|
-
])
|
|
3336
|
-
])
|
|
3337
|
-
]),
|
|
3338
|
-
_: 1
|
|
3339
|
-
}),
|
|
3340
|
-
f[20] || (f[20] = E("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3341
|
-
O(Se, { title: "Branding" }, {
|
|
3342
|
-
default: M(() => [
|
|
3343
|
-
E("div", _l, [
|
|
3344
|
-
O(g, {
|
|
3345
|
-
label: "Restaurant descriptions",
|
|
3346
|
-
"model-value": d.description ?? "",
|
|
3347
|
-
"onUpdate:modelValue": f[12] || (f[12] = ($) => d.description = $)
|
|
3348
|
-
}, null, 8, ["model-value"]),
|
|
3349
|
-
O(w, {
|
|
3350
|
-
label: "Restaurant URL",
|
|
3351
|
-
placeholder: t.restaurantId,
|
|
3352
|
-
"model-value": d.url,
|
|
3353
|
-
"onUpdate:modelValue": f[14] || (f[14] = ($) => d.url = $),
|
|
3354
|
-
rules: [
|
|
3355
|
-
($) => {
|
|
3356
|
-
var I;
|
|
3357
|
-
return !$ || ((I = v.value) == null ? void 0 : I.url) == d.url || b.value == z(it.F_COUNTRY).enum.MY || "Short URL temporary disabled for make sure unique URL for each restaurant";
|
|
3358
|
-
},
|
|
3359
|
-
($) => !$ || z(mr).test($) || "Invalid URL, should be more than 6 characters",
|
|
3360
|
-
($) => !$ || !z(hr).includes($) || "Reserved URL"
|
|
3361
|
-
]
|
|
3362
|
-
}, {
|
|
3363
|
-
prepend: M(() => [
|
|
3364
|
-
E("span", null, q(S))
|
|
3365
|
-
]),
|
|
3366
|
-
append: M(() => [
|
|
3367
|
-
O(_, {
|
|
3368
|
-
variant: "tertiary",
|
|
3369
|
-
icon: "file_copy",
|
|
3370
|
-
"text-color": "neutral-gray-400",
|
|
3371
|
-
onClick: f[13] || (f[13] = ($) => d.url && z(m)(d.url))
|
|
3372
|
-
})
|
|
3373
|
-
]),
|
|
3374
|
-
_: 1
|
|
3375
|
-
}, 8, ["placeholder", "model-value", "rules"]),
|
|
3376
|
-
E("div", null, [
|
|
3377
|
-
O(ve, {
|
|
3378
|
-
label: "Cover photo",
|
|
3379
|
-
"previous-url": d.coverPhoto,
|
|
3380
|
-
modelValue: d.newCoverPhoto,
|
|
3381
|
-
"onUpdate:modelValue": f[15] || (f[15] = ($) => d.newCoverPhoto = $),
|
|
3382
|
-
"onReset:modelValue": L
|
|
3383
|
-
}, null, 8, ["previous-url", "modelValue"])
|
|
3384
|
-
]),
|
|
3385
|
-
E("div", null, [
|
|
3386
|
-
O(Lt, { label: "Carousel photos" }),
|
|
3387
|
-
(T(!0), j(se, null, pe(d.photos || [], ($, I) => (T(), Q(ve, {
|
|
3388
|
-
key: I,
|
|
3389
|
-
"previous-url": $,
|
|
3390
|
-
"model-value": void 0,
|
|
3391
|
-
"onReset:modelValue": (R) => {
|
|
3392
|
-
var N;
|
|
3393
|
-
return (N = d.photos) == null ? void 0 : N.splice(I, 1);
|
|
3394
|
-
}
|
|
3395
|
-
}, null, 8, ["previous-url", "onReset:modelValue"]))), 128)),
|
|
3396
|
-
(T(!0), j(se, null, pe(d.newPhotos || [], ($, I) => {
|
|
3397
|
-
var R;
|
|
3398
|
-
return T(), Q(ve, {
|
|
3399
|
-
key: I,
|
|
3400
|
-
"model-value": ((R = d.newPhotos) == null ? void 0 : R[I]) || void 0,
|
|
3401
|
-
"previous-url": void 0,
|
|
3402
|
-
"onReset:modelValue": (N) => {
|
|
3403
|
-
var U;
|
|
3404
|
-
return (U = d.photos) == null ? void 0 : U.splice(I, 1);
|
|
3405
|
-
}
|
|
3406
|
-
}, null, 8, ["model-value", "onReset:modelValue"]);
|
|
3407
|
-
}), 128)),
|
|
3408
|
-
O(ve, {
|
|
3409
|
-
"model-value": void 0,
|
|
3410
|
-
"previous-url": void 0,
|
|
3411
|
-
"onUpdate:modelValue": f[16] || (f[16] = ($) => V($))
|
|
3412
|
-
})
|
|
3413
|
-
])
|
|
3414
|
-
])
|
|
3415
|
-
]),
|
|
3416
|
-
_: 1
|
|
3417
|
-
})
|
|
3418
|
-
])
|
|
3419
|
-
], 512)
|
|
3420
|
-
])
|
|
3421
|
-
]),
|
|
3422
|
-
_: 1
|
|
3423
|
-
}, 8, ["title", "show", "secondary-actions"])
|
|
3424
|
-
], 64);
|
|
3425
|
-
};
|
|
3426
|
-
}
|
|
3427
|
-
}), Rl = { class: "pt-8 space-y-24" }, wl = { class: "flex gap-8 items-center justify-start" }, Il = /* @__PURE__ */ Z({
|
|
3428
|
-
__name: "BusinessForm",
|
|
3429
|
-
props: {
|
|
3430
|
-
businessId: {
|
|
3431
|
-
type: String,
|
|
3432
|
-
required: !0
|
|
3433
|
-
},
|
|
3434
|
-
initialValue: {
|
|
3435
|
-
type: Object,
|
|
3436
|
-
default: void 0
|
|
3437
|
-
}
|
|
3438
|
-
},
|
|
3439
|
-
setup(t, { expose: e }) {
|
|
3440
|
-
const r = t, n = ut(), s = or(n), a = "https://feedmedev.cc", l = lt(
|
|
3441
|
-
r.initialValue ? ge(r.initialValue) : {
|
|
3442
|
-
thumbnail: void 0,
|
|
3443
|
-
name: "",
|
|
3444
|
-
url: void 0,
|
|
3445
|
-
newThumbnail: void 0
|
|
3446
|
-
}
|
|
3447
|
-
);
|
|
3448
|
-
X(() => l.newThumbnail ? URL.createObjectURL(l.newThumbnail) : l.thumbnail);
|
|
3449
|
-
const m = X(() => fe().currentCountry.value), c = re(!1), u = re(!1), v = (b) => {
|
|
3450
|
-
u.value = !u.value;
|
|
3451
|
-
};
|
|
3452
|
-
function d() {
|
|
3453
|
-
l.thumbnail = void 0, l.newThumbnail = void 0;
|
|
3454
|
-
}
|
|
3455
|
-
const S = async () => {
|
|
3456
|
-
const b = l;
|
|
3457
|
-
await s.minor(async () => {
|
|
3458
|
-
var C, k, A;
|
|
3459
|
-
if (b.newThumbnail) {
|
|
3460
|
-
const L = await de.update(
|
|
3461
|
-
`business/${r.businessId}/thumbnail/${ct().toISOString()}.png`,
|
|
3462
|
-
b.newThumbnail
|
|
3463
|
-
);
|
|
3464
|
-
b.thumbnail = L, (C = r.initialValue) != null && C.thumbnail && await de.delete(r.initialValue.thumbnail);
|
|
3465
|
-
} else
|
|
3466
|
-
(k = r.initialValue) != null && k.thumbnail && !b.thumbnail && await de.delete((A = r.initialValue) == null ? void 0 : A.thumbnail);
|
|
3467
|
-
const y = await Br.updateBusinessProfile(r.businessId, b), P = fe().currentBusiness;
|
|
3468
|
-
P.value = { ...P.value, ...y }, v();
|
|
3469
|
-
});
|
|
3470
|
-
};
|
|
3471
|
-
return e({
|
|
3472
|
-
show: u,
|
|
3473
|
-
trigger: v
|
|
3474
|
-
}), (b, y) => {
|
|
3475
|
-
const P = G("FmTextField"), C = G("fm-button"), k = G("fm-side-sheet");
|
|
3476
|
-
return T(), j(se, null, [
|
|
3477
|
-
ne(b.$slots, "default", { trigger: v }),
|
|
3478
|
-
O(k, {
|
|
3479
|
-
id: "unit-form",
|
|
3480
|
-
modelValue: u.value,
|
|
3481
|
-
"onUpdate:modelValue": y[4] || (y[4] = (A) => u.value = A),
|
|
3482
|
-
"is-container": z(ur).FmForm,
|
|
3483
|
-
"is-container-props": {
|
|
3484
|
-
onValidationSuccess: S,
|
|
3485
|
-
blameFormChildOnValidationFailed: !0
|
|
3486
|
-
},
|
|
3487
|
-
"max-width": 560,
|
|
3488
|
-
"z-index": 100
|
|
3489
|
-
}, {
|
|
3490
|
-
"side-sheet-header": M(() => y[5] || (y[5] = [
|
|
3491
|
-
E("p", { class: "fm-typo-en-title-md-600" }, "Update business", -1)
|
|
3492
|
-
])),
|
|
3493
|
-
"side-sheet-footer": M(() => [
|
|
3494
|
-
E("div", wl, [
|
|
3495
|
-
O(C, {
|
|
3496
|
-
label: "Update",
|
|
3497
|
-
loading: c.value,
|
|
3498
|
-
size: "lg",
|
|
3499
|
-
type: "submit",
|
|
3500
|
-
variant: "primary"
|
|
3501
|
-
}, null, 8, ["loading"]),
|
|
3502
|
-
O(C, {
|
|
3503
|
-
label: "Cancel",
|
|
3504
|
-
size: "lg",
|
|
3505
|
-
variant: "tertiary",
|
|
3506
|
-
onClick: y[3] || (y[3] = () => u.value = !1)
|
|
3507
|
-
})
|
|
3508
|
-
])
|
|
3509
|
-
]),
|
|
3510
|
-
default: M(() => [
|
|
3511
|
-
E("div", Rl, [
|
|
3512
|
-
E("div", null, [
|
|
3513
|
-
O(ve, {
|
|
3514
|
-
label: "Cover photo",
|
|
3515
|
-
"sub-label": "(optional)",
|
|
3516
|
-
"previous-url": l.thumbnail,
|
|
3517
|
-
modelValue: l.newThumbnail,
|
|
3518
|
-
"onUpdate:modelValue": y[0] || (y[0] = (A) => l.newThumbnail = A),
|
|
3519
|
-
"onReset:modelValue": d
|
|
3520
|
-
}, null, 8, ["previous-url", "modelValue"])
|
|
3521
|
-
]),
|
|
3522
|
-
E("div", null, [
|
|
3523
|
-
O(P, {
|
|
3524
|
-
label: "Name",
|
|
3525
|
-
modelValue: l.name,
|
|
3526
|
-
"onUpdate:modelValue": y[1] || (y[1] = (A) => l.name = A)
|
|
3527
|
-
}, null, 8, ["modelValue"])
|
|
3528
|
-
]),
|
|
3529
|
-
E("div", null, [
|
|
3530
|
-
O(P, {
|
|
3531
|
-
label: "URL",
|
|
3532
|
-
"model-value": l.url || "",
|
|
3533
|
-
"onUpdate:modelValu": y[2] || (y[2] = (A) => l.url = A),
|
|
3534
|
-
placeholder: t.businessId,
|
|
3535
|
-
rules: [
|
|
3536
|
-
(A) => {
|
|
3537
|
-
var L;
|
|
3538
|
-
return !A || ((L = t.initialValue) == null ? void 0 : L.url) == l.url || m.value == z(it.F_COUNTRY).enum.MY || "Short URL temporary disabled for make sure unique URL for each restaurant";
|
|
3539
|
-
},
|
|
3540
|
-
(A) => !A || z(mr).test(A) || "Min 6 characters, alphanumeric only",
|
|
3541
|
-
(A) => !A || !z(hr).includes(A) || "Business URL is reserved"
|
|
3542
|
-
]
|
|
3543
|
-
}, {
|
|
3544
|
-
prepend: M(() => [
|
|
3545
|
-
E("span", null, q(z(a) + "/"), 1)
|
|
3546
|
-
]),
|
|
3547
|
-
_: 1
|
|
3548
|
-
}, 8, ["model-value", "placeholder", "rules"])
|
|
3549
|
-
])
|
|
3550
|
-
])
|
|
3551
|
-
]),
|
|
3552
|
-
_: 1
|
|
3553
|
-
}, 8, ["modelValue", "is-container", "is-container-props"])
|
|
3554
|
-
], 64);
|
|
3555
|
-
};
|
|
3556
|
-
}
|
|
3557
|
-
});
|
|
3558
|
-
function Al(t) {
|
|
3559
|
-
return Ne(
|
|
3560
|
-
"div",
|
|
3561
|
-
{
|
|
3562
|
-
class: "flex justify-end"
|
|
3563
|
-
},
|
|
3564
|
-
t.map(({ name: e, onClick: r }) => Ne(ur.FmButton, {
|
|
3565
|
-
icon: e,
|
|
3566
|
-
outline: !0,
|
|
3567
|
-
variant: "tertiary",
|
|
3568
|
-
iconColor: "neutral-gray-400",
|
|
3569
|
-
onClick: ke(r, ["stop", "prevent"])
|
|
3570
|
-
}))
|
|
3571
|
-
);
|
|
3572
|
-
}
|
|
3573
|
-
const Ol = /* @__PURE__ */ Z({
|
|
3574
|
-
__name: "BottomSheetMenu",
|
|
3575
|
-
setup(t) {
|
|
3576
|
-
const e = re(!1);
|
|
3577
|
-
async function r() {
|
|
3578
|
-
await nr(), e.value = !e.value;
|
|
3579
|
-
}
|
|
3580
|
-
return (n, s) => {
|
|
3581
|
-
const a = G("FmButton"), l = G("FmBottomSheet");
|
|
3582
|
-
return T(), Q(l, {
|
|
3583
|
-
modelValue: e.value,
|
|
3584
|
-
"onUpdate:modelValue": s[1] || (s[1] = (m) => e.value = m),
|
|
3585
|
-
"dismiss-away": "",
|
|
3586
|
-
"no-header": "",
|
|
3587
|
-
"z-index": 110
|
|
3588
|
-
}, {
|
|
3589
|
-
"bottom-sheet-button": M(() => [
|
|
3590
|
-
n.$slots.button ? ie("", !0) : (T(), Q(a, {
|
|
3591
|
-
key: 0,
|
|
3592
|
-
icon: "more_vert",
|
|
3593
|
-
variant: "tertiary",
|
|
3594
|
-
onClick: ke(r, ["stop"])
|
|
3595
|
-
})),
|
|
3596
|
-
ne(n.$slots, "button")
|
|
3597
|
-
]),
|
|
3598
|
-
default: M(() => [
|
|
3599
|
-
E("div", {
|
|
3600
|
-
onClick: s[0] || (s[0] = (m) => e.value = !1)
|
|
3601
|
-
}, [
|
|
3602
|
-
ne(n.$slots, "default")
|
|
3603
|
-
])
|
|
3604
|
-
]),
|
|
3605
|
-
_: 3
|
|
3606
|
-
}, 8, ["modelValue"]);
|
|
3607
|
-
};
|
|
3608
|
-
}
|
|
3609
|
-
}), Ll = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, Sl = /* @__PURE__ */ Z({
|
|
3610
|
-
__name: "BottomSheetMenuItem",
|
|
3611
|
-
props: {
|
|
3612
|
-
label: {},
|
|
3613
|
-
icon: {},
|
|
3614
|
-
disabled: { type: Boolean },
|
|
3615
|
-
itemClass: {}
|
|
3616
|
-
},
|
|
3617
|
-
setup(t) {
|
|
3618
|
-
const e = t;
|
|
3619
|
-
return (r, n) => {
|
|
3620
|
-
const s = G("FmIcon");
|
|
3621
|
-
return T(), j("div", Ll, [
|
|
3622
|
-
r.$slots.content ? ie("", !0) : (T(), j("div", {
|
|
3623
|
-
key: 0,
|
|
3624
|
-
class: J(["flex items-center", {
|
|
3625
|
-
"text-fm-color-typo-disabled": e.disabled,
|
|
3626
|
-
"cursor-pointer": !e.disabled,
|
|
3627
|
-
"cursor-not-allowed": e.disabled,
|
|
3628
|
-
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
3629
|
-
}])
|
|
3630
|
-
}, [
|
|
3631
|
-
r.icon ? (T(), Q(s, {
|
|
3632
|
-
key: 0,
|
|
3633
|
-
name: r.icon
|
|
3634
|
-
}, null, 8, ["name"])) : ie("", !0),
|
|
3635
|
-
Ce(" " + q(r.label), 1)
|
|
3636
|
-
], 2)),
|
|
3637
|
-
ne(r.$slots, "content")
|
|
3638
|
-
]);
|
|
3639
|
-
};
|
|
3640
|
-
}
|
|
3641
|
-
}), Pl = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex xs:flex-col" }, Tl = { class: "flex flex-1" }, Cl = {
|
|
3642
|
-
key: 0,
|
|
3643
|
-
class: "flex gap-8"
|
|
3644
|
-
}, Nl = {
|
|
3645
|
-
key: 0,
|
|
3646
|
-
class: "space-y-4"
|
|
3647
|
-
}, kl = {
|
|
3648
|
-
key: 0,
|
|
3649
|
-
class: "space-y-8"
|
|
3650
|
-
}, xl = { class: "flex justify-end" }, Vl = { class: "flex-1 pb-64 overflow-auto divide-y divide-fm-color-neutral-gray-100" }, Fl = { key: 0 }, jl = ["onClick"], Ul = { class: "flex justify-between items-center" }, Ml = { class: "fm-typo-en-body-lg-600" }, Dl = { class: "flex gap-8" }, Bl = { class: "text-fm-color-typo-secondary" }, Gl = { class: "text-fm-color-typo-secondary" }, Kl = { class: "text-fm-color-typo-secondary" }, ni = /* @__PURE__ */ Z({
|
|
3651
|
-
__name: "Business",
|
|
3652
|
-
setup(t) {
|
|
3653
|
-
const { searchKey: e, filter: r } = vn(), { copyTextToClipboard: n } = cr(), s = ir(), a = X(() => s.breakpoints.value.xs), l = X(() => {
|
|
3654
|
-
const { currentBusiness: b, restaurants: y } = fe(), P = b.value;
|
|
3655
|
-
if (!P)
|
|
3656
|
-
return null;
|
|
3657
|
-
const { id: C, name: k, thumbnail: A, url: L } = P, V = y.value.filter((D) => D.managable).map((D) => {
|
|
3658
|
-
const { _id: K, profile: F } = D, { name: o, email: i, phoneNo: h, address: f, sstRegNo: w } = {
|
|
3659
|
-
...F,
|
|
3660
|
-
address: Ee(F.address)
|
|
3661
|
-
};
|
|
3662
|
-
return {
|
|
3663
|
-
id: K,
|
|
3664
|
-
name: o,
|
|
3665
|
-
email: i,
|
|
3666
|
-
phone: h,
|
|
3667
|
-
address: f.formatted,
|
|
3668
|
-
withSST: !!w,
|
|
3669
|
-
doc: D
|
|
3670
|
-
};
|
|
3671
|
-
});
|
|
3672
|
-
return {
|
|
3673
|
-
id: C,
|
|
3674
|
-
name: k,
|
|
3675
|
-
thumbnail: A,
|
|
3676
|
-
url: `https://feedmedev.cc/${L || C}`,
|
|
3677
|
-
doc: P,
|
|
3678
|
-
canCreateRestaurant: hn(P, y.value),
|
|
3679
|
-
restaurants: V.filter(
|
|
3680
|
-
({ name: D, address: K, phone: F, email: o }) => r([D, K, F, o])
|
|
3681
|
-
)
|
|
3682
|
-
};
|
|
3683
|
-
}), m = X(() => [
|
|
3684
|
-
{
|
|
3685
|
-
header: "Restaurant",
|
|
3686
|
-
accessorKey: "name",
|
|
3687
|
-
enableSorting: !1
|
|
3688
|
-
},
|
|
3689
|
-
{
|
|
3690
|
-
header: "Address",
|
|
3691
|
-
accessorKey: "address",
|
|
3692
|
-
size: 200,
|
|
3693
|
-
enableSorting: !1
|
|
3694
|
-
},
|
|
3695
|
-
{
|
|
3696
|
-
header: "Contact",
|
|
3697
|
-
accessorKey: "phone",
|
|
3698
|
-
enableSorting: !1
|
|
3699
|
-
},
|
|
3700
|
-
{
|
|
3701
|
-
header: "Email",
|
|
3702
|
-
accessorKey: "email",
|
|
3703
|
-
enableSorting: !1
|
|
3704
|
-
},
|
|
3705
|
-
{
|
|
3706
|
-
header: "Tax No",
|
|
3707
|
-
enableSorting: !1,
|
|
3708
|
-
cell: (b) => {
|
|
3709
|
-
var P;
|
|
3710
|
-
const y = b.row.original;
|
|
3711
|
-
return (P = y.doc.profile.sstRegNo) != null && P.length ? y.doc.profile.sstRegNo : "Not set";
|
|
3712
|
-
}
|
|
3713
|
-
},
|
|
3714
|
-
{
|
|
3715
|
-
id: "action",
|
|
3716
|
-
header: "",
|
|
3717
|
-
size: 80,
|
|
3718
|
-
cell: (b) => {
|
|
3719
|
-
const y = b.row.original;
|
|
3720
|
-
return Al([
|
|
3721
|
-
{
|
|
3722
|
-
name: "edit",
|
|
3723
|
-
onClick: () => S(y)
|
|
3724
|
-
},
|
|
3725
|
-
{
|
|
3726
|
-
name: "file_copy",
|
|
3727
|
-
onClick: () => {
|
|
3728
|
-
n(y.id);
|
|
3729
|
-
}
|
|
3730
|
-
}
|
|
3731
|
-
]);
|
|
3732
|
-
}
|
|
3733
|
-
}
|
|
3734
|
-
]);
|
|
3735
|
-
function c() {
|
|
3736
|
-
var b;
|
|
3737
|
-
n(((b = l.value) == null ? void 0 : b.url) || "");
|
|
3738
|
-
}
|
|
3739
|
-
function u() {
|
|
3740
|
-
if (!l.value)
|
|
3741
|
-
return;
|
|
3742
|
-
const { name: b, url: y, thumbnail: P } = l.value.doc;
|
|
3743
|
-
ze(v, Il, {
|
|
3744
|
-
businessId: l.value.id,
|
|
3745
|
-
initialValue: {
|
|
3746
|
-
name: b,
|
|
3747
|
-
url: y,
|
|
3748
|
-
thumbnail: P
|
|
3749
|
-
}
|
|
3750
|
-
});
|
|
3751
|
-
}
|
|
3752
|
-
const v = Vr();
|
|
3753
|
-
function d() {
|
|
3754
|
-
ze(v, tr, {
|
|
3755
|
-
enableFeedmeExpress: !1
|
|
3756
|
-
});
|
|
3757
|
-
}
|
|
3758
|
-
function S(b) {
|
|
3759
|
-
var y;
|
|
3760
|
-
ze(v, tr, {
|
|
3761
|
-
restaurantId: b.id,
|
|
3762
|
-
restaurant: b.doc,
|
|
3763
|
-
enableFeedmeExpress: ((y = b.doc.feedmeDelivery) == null ? void 0 : y.enable) || !1
|
|
3764
|
-
});
|
|
3765
|
-
}
|
|
3766
|
-
return (b, y) => {
|
|
3767
|
-
var W;
|
|
3768
|
-
const P = G("FmSpacer"), C = G("FmButton"), k = G("FmTooltip"), A = G("FmSearch"), L = G("FmTable"), V = G("FmCircularProgress");
|
|
3769
|
-
return T(), Q(Mr, {
|
|
3770
|
-
heading: ((W = l.value) == null ? void 0 : W.name) || "--"
|
|
3771
|
-
}, {
|
|
3772
|
-
"sub-heading": M(() => {
|
|
3773
|
-
var D;
|
|
3774
|
-
return [
|
|
3775
|
-
E("div", Pl, [
|
|
3776
|
-
y[3] || (y[3] = E("span", null, "Business url: ", -1)),
|
|
3777
|
-
E("span", {
|
|
3778
|
-
class: "cursor-pointer xs:w-max-[200px] truncate",
|
|
3779
|
-
onClick: c
|
|
3780
|
-
}, q((D = l.value) == null ? void 0 : D.url), 1)
|
|
3781
|
-
])
|
|
3782
|
-
];
|
|
3783
|
-
}),
|
|
3784
|
-
"append-heading": M(() => [
|
|
3785
|
-
E("div", Tl, [
|
|
3786
|
-
O(P),
|
|
3787
|
-
a.value ? (T(), j(se, { key: 1 }, [
|
|
3788
|
-
O(Dr, {
|
|
3789
|
-
onClick: d,
|
|
3790
|
-
label: "Add restaurant",
|
|
3791
|
-
"prepend-icon": "add"
|
|
3792
|
-
}),
|
|
3793
|
-
O(Ol, null, {
|
|
3794
|
-
default: M(() => [
|
|
3795
|
-
O(Sl, {
|
|
3796
|
-
label: "Edit",
|
|
3797
|
-
onClick: u
|
|
3798
|
-
})
|
|
3799
|
-
]),
|
|
3800
|
-
_: 1
|
|
3801
|
-
})
|
|
3802
|
-
], 64)) : (T(), j("div", Cl, [
|
|
3803
|
-
O(C, {
|
|
3804
|
-
onClick: u,
|
|
3805
|
-
variant: "secondary",
|
|
3806
|
-
label: "Edit"
|
|
3807
|
-
}),
|
|
3808
|
-
O(k, {
|
|
3809
|
-
variant: "rich",
|
|
3810
|
-
placement: "left",
|
|
3811
|
-
"z-index": 100
|
|
3812
|
-
}, {
|
|
3813
|
-
content: M(() => {
|
|
3814
|
-
var D;
|
|
3815
|
-
return [
|
|
3816
|
-
(D = l.value) != null && D.canCreateRestaurant ? ie("", !0) : (T(), j("div", Nl, y[4] || (y[4] = [
|
|
3817
|
-
E("p", { class: "fm-typo-en-body-md-600" }, "Quota limit reached", -1),
|
|
3818
|
-
E("p", null, " You have reach the quota limit allocated to your account. Contact your sales to perform quota update. ", -1)
|
|
3819
|
-
])))
|
|
3820
|
-
];
|
|
3821
|
-
}),
|
|
3822
|
-
default: M(() => {
|
|
3823
|
-
var D;
|
|
3824
|
-
return [
|
|
3825
|
-
O(C, {
|
|
3826
|
-
onClick: d,
|
|
3827
|
-
label: "Add restaurant",
|
|
3828
|
-
disabled: !((D = l.value) != null && D.canCreateRestaurant),
|
|
3829
|
-
"prepend-icon": "add"
|
|
3830
|
-
}, null, 8, ["disabled"])
|
|
3831
|
-
];
|
|
3832
|
-
}),
|
|
3833
|
-
_: 1
|
|
3834
|
-
})
|
|
3835
|
-
]))
|
|
3836
|
-
])
|
|
3837
|
-
]),
|
|
3838
|
-
default: M(() => {
|
|
3839
|
-
var D, K;
|
|
3840
|
-
return [
|
|
3841
|
-
a.value ? (T(), j(se, { key: 1 }, [
|
|
3842
|
-
O(A, {
|
|
3843
|
-
class: "my-8 mx-16",
|
|
3844
|
-
modelValue: z(e),
|
|
3845
|
-
"onUpdate:modelValue": y[2] || (y[2] = (F) => Et(e) ? e.value = F : null),
|
|
3846
|
-
placeholder: "Search restaurants"
|
|
3847
|
-
}, null, 8, ["modelValue"]),
|
|
3848
|
-
E("div", Vl, [
|
|
3849
|
-
l.value ? (T(!0), j(se, { key: 1 }, pe((K = l.value) == null ? void 0 : K.restaurants, (F) => {
|
|
3850
|
-
var o;
|
|
3851
|
-
return T(), j("div", {
|
|
3852
|
-
key: F.id,
|
|
3853
|
-
class: "py-12 px-16 space-y-4",
|
|
3854
|
-
onClick: (i) => S(F)
|
|
3855
|
-
}, [
|
|
3856
|
-
E("div", Ul, [
|
|
3857
|
-
E("div", Ml, q(F.name), 1),
|
|
3858
|
-
E("div", Dl, [
|
|
3859
|
-
O(C, {
|
|
3860
|
-
icon: "edit",
|
|
3861
|
-
"text-color": "neutral-gray-400",
|
|
3862
|
-
variant: "tertiary",
|
|
3863
|
-
onClick: ke((i) => S(F), ["stop"])
|
|
3864
|
-
}, null, 8, ["onClick"]),
|
|
3865
|
-
O(C, {
|
|
3866
|
-
icon: "file_copy",
|
|
3867
|
-
"text-color": "neutral-gray-400",
|
|
3868
|
-
variant: "tertiary",
|
|
3869
|
-
onClick: ke((i) => z(n)(F.id), ["stop"])
|
|
3870
|
-
}, null, 8, ["onClick"])
|
|
3871
|
-
])
|
|
3872
|
-
]),
|
|
3873
|
-
E("div", Bl, "Contact: " + q(F.phone), 1),
|
|
3874
|
-
E("div", Gl, "Email: " + q(F.email), 1),
|
|
3875
|
-
E("div", Kl, " Tax No: " + q((o = F.doc.profile.sstRegNo) != null && o.length ? F.doc.profile.sstRegNo : "Not set"), 1)
|
|
3876
|
-
], 8, jl);
|
|
3877
|
-
}), 128)) : (T(), j("div", Fl, [
|
|
3878
|
-
O(V, { size: "lg" })
|
|
3879
|
-
]))
|
|
3880
|
-
])
|
|
3881
|
-
], 64)) : (T(), j("div", kl, [
|
|
3882
|
-
E("div", xl, [
|
|
3883
|
-
O(A, {
|
|
3884
|
-
class: "w-[320px]",
|
|
3885
|
-
modelValue: z(e),
|
|
3886
|
-
"onUpdate:modelValue": y[0] || (y[0] = (F) => Et(e) ? e.value = F : null),
|
|
3887
|
-
placeholder: "Search restaurants"
|
|
3888
|
-
}, null, 8, ["modelValue"])
|
|
3889
|
-
]),
|
|
3890
|
-
O(L, {
|
|
3891
|
-
"column-defs": m.value,
|
|
3892
|
-
"row-data": ((D = l.value) == null ? void 0 : D.restaurants) || [],
|
|
3893
|
-
"shrink-at": !1,
|
|
3894
|
-
loading: !l.value,
|
|
3895
|
-
onRowClick: y[1] || (y[1] = (F) => S(F.original))
|
|
3896
|
-
}, null, 8, ["column-defs", "row-data", "loading"])
|
|
3897
|
-
]))
|
|
3898
|
-
];
|
|
3899
|
-
}),
|
|
3900
|
-
_: 1
|
|
3901
|
-
}, 8, ["heading"]);
|
|
3902
|
-
};
|
|
3903
|
-
}
|
|
3904
|
-
});
|
|
3905
|
-
export {
|
|
3906
|
-
ni as default
|
|
3907
|
-
};
|