@feedmepos/mf-settings 0.0.59-beta.1 → 0.0.60
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/{App-adfff27f.js → App-48215cac.js} +1 -1
- package/dist/{Business-24c55416.js → Business-a9258021.js} +744 -728
- package/dist/{CreateBusiness-fbcba71f.js → CreateBusiness-2662327f.js} +2 -2
- package/dist/{FoodCourt-677797ed.js → FoodCourt-3d6ab131.js} +1 -1
- package/dist/{LicenseOrder-86aa7996.js → LicenseOrder-bd3d3012.js} +8 -8
- package/dist/{ReasonTemplate-0e99fb52.js → ReasonTemplate-4270229d.js} +1 -1
- package/dist/{Tagging-78440d2f.js → Tagging-d8e2293e.js} +3 -3
- package/dist/{app-14f51ab7.js → app-0dbb5982.js} +8 -8
- package/dist/app.js +1 -1
- package/dist/apps/mf-settings/src/store/attributeSettings.d.ts +2 -2
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{business-a1966413.js → business-49b1df80.js} +1 -1
- package/dist/{index-d43d45c9.js → index-b5909a1d.js} +1380 -1384
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var Or = Object.defineProperty;
|
|
2
2
|
var Sr = (t, e, r) => e in t ? Or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as re, ref as ae, resolveComponent as q, openBlock as
|
|
3
|
+
var Xe = (t, e, r) => (Sr(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import { defineComponent as re, ref as ae, resolveComponent as q, openBlock as j, createBlock as te, withCtx as K, withModifiers as ot, createCommentVNode as ce, renderSlot as de, createElementVNode as $, nextTick as Pr, createElementBlock as B, normalizeClass as ee, createTextVNode as je, toDisplayString as G, computed as Y, normalizeStyle as Me, createVNode as L, reactive as ft, Fragment as oe, unref as _, renderList as he, h as At, Teleport as Tr, Transition as Lr, withKeys as Nr, watch as Ot, onMounted as Cr, onUnmounted as xr, toRaw as St, normalizeProps as kr, guardReactiveProps as Vr, getCurrentInstance as Fr, isRef as Pt } from "vue";
|
|
5
5
|
import { useCoreStore as pe, useI18n as ve, CustomAttributesForm as jr } from "@feedmepos/mf-common";
|
|
6
|
-
import { useSnackbar as
|
|
6
|
+
import { useSnackbar as mt, components as Mr, useDialog as pt, useDialogChild as Ur, useBreakpoints as ur } from "@feedmepos/ui-library";
|
|
7
7
|
import { a as Dr, _ as Gr } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-08a69f88.js";
|
|
8
|
-
import { _ as Br, c as
|
|
9
|
-
import { D as
|
|
8
|
+
import { _ as Br, c as Ye } from "./createForm-d3b97d2e.js";
|
|
9
|
+
import { D as ht, u as cr } from "./dayjs.min-2edeb0fb.js";
|
|
10
10
|
import { _ as Re, c as Kr } from "./FormSection.vue_vue_type_script_setup_true_lang-6aab82f2.js";
|
|
11
|
-
import { e as
|
|
12
|
-
import { u as fr, b as Pe, a as
|
|
11
|
+
import { e as vt, g as dr, c as qr } from "./index-cc4114ab.js";
|
|
12
|
+
import { u as fr, b as Pe, a as We, g as Ue } from "./index-b5909a1d.js";
|
|
13
13
|
import { c as $e } from "./object-27ce045b.js";
|
|
14
|
-
import { b as Hr } from "./business-
|
|
15
|
-
import { t as
|
|
14
|
+
import { b as Hr } from "./business-49b1df80.js";
|
|
15
|
+
import { t as Je, w as Ze, x as zr, y as Xr, z as Yr, A as Wr, B as De, u as be, D as Jr, G as Zr } from "./map-695afd6f.js";
|
|
16
16
|
import { _ as mr } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
|
-
import { u as Qr } from "./app-
|
|
17
|
+
import { u as Qr } from "./app-0dbb5982.js";
|
|
18
18
|
import { r as fe } from "./rules-2bee6632.js";
|
|
19
19
|
import "pinia";
|
|
20
20
|
import "@feedmepos/mf-mdm";
|
|
@@ -63,7 +63,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
63
63
|
}
|
|
64
64
|
return (n, s) => {
|
|
65
65
|
const o = q("FmButton"), i = q("FmBottomSheet");
|
|
66
|
-
return
|
|
66
|
+
return j(), te(i, {
|
|
67
67
|
modelValue: e.value,
|
|
68
68
|
"onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
|
|
69
69
|
"dismiss-away": "",
|
|
@@ -71,11 +71,11 @@ const tn = /* @__PURE__ */ re({
|
|
|
71
71
|
"z-index": 110
|
|
72
72
|
}, {
|
|
73
73
|
"bottom-sheet-button": K(() => [
|
|
74
|
-
n.$slots.button ? ce("", !0) : (
|
|
74
|
+
n.$slots.button ? ce("", !0) : (j(), te(o, {
|
|
75
75
|
key: 0,
|
|
76
76
|
icon: "more_vert",
|
|
77
77
|
variant: "tertiary",
|
|
78
|
-
onClick:
|
|
78
|
+
onClick: ot(r, ["stop"])
|
|
79
79
|
})),
|
|
80
80
|
de(n.$slots, "button")
|
|
81
81
|
]),
|
|
@@ -102,8 +102,8 @@ const tn = /* @__PURE__ */ re({
|
|
|
102
102
|
const e = t;
|
|
103
103
|
return (r, n) => {
|
|
104
104
|
const s = q("FmIcon");
|
|
105
|
-
return
|
|
106
|
-
r.$slots.content ? ce("", !0) : (
|
|
105
|
+
return j(), B("div", rn, [
|
|
106
|
+
r.$slots.content ? ce("", !0) : (j(), B("div", {
|
|
107
107
|
key: 0,
|
|
108
108
|
class: ee(["flex items-center", {
|
|
109
109
|
"text-fm-color-typo-disabled": e.disabled,
|
|
@@ -112,11 +112,11 @@ const tn = /* @__PURE__ */ re({
|
|
|
112
112
|
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
113
113
|
}])
|
|
114
114
|
}, [
|
|
115
|
-
r.icon ? (
|
|
115
|
+
r.icon ? (j(), te(s, {
|
|
116
116
|
key: 0,
|
|
117
117
|
name: r.icon
|
|
118
118
|
}, null, 8, ["name"])) : ce("", !0),
|
|
119
|
-
|
|
119
|
+
je(" " + G(r.label), 1)
|
|
120
120
|
], 2)),
|
|
121
121
|
de(r.$slots, "content")
|
|
122
122
|
]);
|
|
@@ -145,14 +145,14 @@ const tn = /* @__PURE__ */ re({
|
|
|
145
145
|
const r = t, n = e, s = Y(() => r.modelValue ? URL.createObjectURL(r.modelValue) : r.previousUrl);
|
|
146
146
|
return (o, i) => {
|
|
147
147
|
const f = q("fm-icon"), d = q("fm-drop-field");
|
|
148
|
-
return s.value ? (
|
|
148
|
+
return s.value ? (j(), B("div", sn, [
|
|
149
149
|
$("p", an, [
|
|
150
|
-
|
|
150
|
+
je(G(r.label) + " ", 1),
|
|
151
151
|
$("span", on, G(o.subLabel), 1)
|
|
152
152
|
]),
|
|
153
153
|
$("div", {
|
|
154
154
|
class: ee(["relative", "border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"]),
|
|
155
|
-
style:
|
|
155
|
+
style: Me({ width: `${r.width}px`, height: `${r.height}px` })
|
|
156
156
|
}, [
|
|
157
157
|
$("div", ln, [
|
|
158
158
|
$("div", un, [
|
|
@@ -163,7 +163,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
163
163
|
}, null, 8, cn)
|
|
164
164
|
])
|
|
165
165
|
]),
|
|
166
|
-
o.canDelete ? (
|
|
166
|
+
o.canDelete ? (j(), B("button", {
|
|
167
167
|
key: 0,
|
|
168
168
|
class: ee([
|
|
169
169
|
"absolute top-12 right-12 z-10",
|
|
@@ -171,20 +171,20 @@ const tn = /* @__PURE__ */ re({
|
|
|
171
171
|
"bg-fm-color-neutral-white"
|
|
172
172
|
]),
|
|
173
173
|
type: "button",
|
|
174
|
-
onClick: i[0] || (i[0] = (
|
|
174
|
+
onClick: i[0] || (i[0] = (b) => n("reset:model-value"))
|
|
175
175
|
}, [
|
|
176
|
-
|
|
176
|
+
L(f, { name: "close" })
|
|
177
177
|
])) : ce("", !0)
|
|
178
178
|
], 4)
|
|
179
|
-
])) : (
|
|
179
|
+
])) : (j(), te(d, {
|
|
180
180
|
key: 1,
|
|
181
181
|
accept: ".jpg, .jpeg, .png, .gif",
|
|
182
|
-
style:
|
|
183
|
-
onFileUpload: i[1] || (i[1] = (
|
|
182
|
+
style: Me({ width: `${r.width}px`, height: `${r.height}px` }),
|
|
183
|
+
onFileUpload: i[1] || (i[1] = (b) => n("update:model-value", b))
|
|
184
184
|
}, {
|
|
185
185
|
label: K(() => [
|
|
186
186
|
$("p", dn, [
|
|
187
|
-
|
|
187
|
+
je(G(r.label) + " ", 1),
|
|
188
188
|
$("span", fn, G(r.subLabel), 1)
|
|
189
189
|
])
|
|
190
190
|
]),
|
|
@@ -692,28 +692,28 @@ const tn = /* @__PURE__ */ re({
|
|
|
692
692
|
"za",
|
|
693
693
|
"zm",
|
|
694
694
|
"zw"
|
|
695
|
-
],
|
|
695
|
+
], Qe = {
|
|
696
696
|
async get(t, e) {
|
|
697
|
-
const r =
|
|
697
|
+
const r = Je(void 0, e), n = Ze(r, t);
|
|
698
698
|
return await (await zr(n)).text();
|
|
699
699
|
},
|
|
700
700
|
async update(t, e, r) {
|
|
701
|
-
const n =
|
|
701
|
+
const n = Je(void 0, r), s = Ze(n, t);
|
|
702
702
|
return await Xr(s, e), await Yr(s);
|
|
703
703
|
},
|
|
704
704
|
async delete(t, e) {
|
|
705
|
-
const r =
|
|
705
|
+
const r = Je(void 0, e), n = Ze(r, t);
|
|
706
706
|
await Wr(n);
|
|
707
707
|
}
|
|
708
708
|
}, me = {
|
|
709
709
|
async get(t) {
|
|
710
|
-
return await
|
|
710
|
+
return await Qe.get(t);
|
|
711
711
|
},
|
|
712
712
|
async update(t, e, r) {
|
|
713
|
-
return await
|
|
713
|
+
return await Qe.update(t, e);
|
|
714
714
|
},
|
|
715
715
|
async delete(t) {
|
|
716
|
-
await
|
|
716
|
+
await Qe.delete(t);
|
|
717
717
|
}
|
|
718
718
|
}, mn = { class: "fm-typo-en-title-md-600" }, pn = { class: "pt-8 space-y-24" }, hn = { class: "flex gap-8 items-center justify-start" }, vn = /* @__PURE__ */ re({
|
|
719
719
|
__name: "BusinessForm",
|
|
@@ -728,7 +728,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
728
728
|
}
|
|
729
729
|
},
|
|
730
730
|
setup(t, { expose: e }) {
|
|
731
|
-
const r = t, n =
|
|
731
|
+
const r = t, n = mt(), s = fr(n), o = "https://feedmedev.cc", i = ft(
|
|
732
732
|
r.initialValue ? $e(r.initialValue) : {
|
|
733
733
|
thumbnail: void 0,
|
|
734
734
|
name: "",
|
|
@@ -737,44 +737,44 @@ const tn = /* @__PURE__ */ re({
|
|
|
737
737
|
}
|
|
738
738
|
);
|
|
739
739
|
Y(() => i.newThumbnail ? URL.createObjectURL(i.newThumbnail) : i.thumbnail);
|
|
740
|
-
const f = Y(() => pe().currentCountry.value), d = ae(!1),
|
|
741
|
-
|
|
740
|
+
const f = Y(() => pe().currentCountry.value), d = ae(!1), b = ae(!1), l = (x) => {
|
|
741
|
+
b.value = !b.value;
|
|
742
742
|
};
|
|
743
743
|
function g() {
|
|
744
744
|
i.thumbnail = void 0, i.newThumbnail = void 0;
|
|
745
745
|
}
|
|
746
|
-
const
|
|
747
|
-
const
|
|
746
|
+
const O = async () => {
|
|
747
|
+
const x = i;
|
|
748
748
|
await s.minor(async () => {
|
|
749
|
-
var k, V,
|
|
750
|
-
if (
|
|
751
|
-
const
|
|
752
|
-
`business/${r.businessId}/thumbnail/${
|
|
753
|
-
|
|
749
|
+
var k, V, A;
|
|
750
|
+
if (x.newThumbnail) {
|
|
751
|
+
const F = await me.update(
|
|
752
|
+
`business/${r.businessId}/thumbnail/${ht().toISOString()}.png`,
|
|
753
|
+
x.newThumbnail
|
|
754
754
|
);
|
|
755
|
-
|
|
755
|
+
x.thumbnail = F, (k = r.initialValue) != null && k.thumbnail && await me.delete(r.initialValue.thumbnail);
|
|
756
756
|
} else
|
|
757
|
-
(V = r.initialValue) != null && V.thumbnail && !
|
|
758
|
-
const
|
|
759
|
-
y.value = { ...y.value, ...
|
|
757
|
+
(V = r.initialValue) != null && V.thumbnail && !x.thumbnail && await me.delete((A = r.initialValue) == null ? void 0 : A.thumbnail);
|
|
758
|
+
const v = await Hr.updateBusinessProfile(r.businessId, x), y = pe().currentBusiness;
|
|
759
|
+
y.value = { ...y.value, ...v }, l();
|
|
760
760
|
});
|
|
761
761
|
};
|
|
762
762
|
e({
|
|
763
|
-
show:
|
|
764
|
-
trigger:
|
|
763
|
+
show: b,
|
|
764
|
+
trigger: l
|
|
765
765
|
});
|
|
766
766
|
const { t: c } = ve();
|
|
767
|
-
return (
|
|
767
|
+
return (x, v) => {
|
|
768
768
|
const y = q("FmTextField"), k = q("fm-button"), V = q("fm-side-sheet");
|
|
769
|
-
return
|
|
770
|
-
de(
|
|
771
|
-
|
|
769
|
+
return j(), B(oe, null, [
|
|
770
|
+
de(x.$slots, "default", { trigger: l }),
|
|
771
|
+
L(V, {
|
|
772
772
|
id: "unit-form",
|
|
773
|
-
modelValue:
|
|
774
|
-
"onUpdate:modelValue":
|
|
773
|
+
modelValue: b.value,
|
|
774
|
+
"onUpdate:modelValue": v[4] || (v[4] = (A) => b.value = A),
|
|
775
775
|
"is-container": _(Mr).FmForm,
|
|
776
776
|
"is-container-props": {
|
|
777
|
-
onValidationSuccess:
|
|
777
|
+
onValidationSuccess: O,
|
|
778
778
|
blameFormChildOnValidationFailed: !0
|
|
779
779
|
},
|
|
780
780
|
"max-width": 560,
|
|
@@ -785,53 +785,53 @@ const tn = /* @__PURE__ */ re({
|
|
|
785
785
|
]),
|
|
786
786
|
"side-sheet-footer": K(() => [
|
|
787
787
|
$("div", hn, [
|
|
788
|
-
|
|
788
|
+
L(k, {
|
|
789
789
|
label: _(c)("common.update"),
|
|
790
790
|
loading: d.value,
|
|
791
791
|
size: "lg",
|
|
792
792
|
type: "submit",
|
|
793
793
|
variant: "primary"
|
|
794
794
|
}, null, 8, ["label", "loading"]),
|
|
795
|
-
|
|
795
|
+
L(k, {
|
|
796
796
|
label: _(c)("common.cancel"),
|
|
797
797
|
size: "lg",
|
|
798
798
|
variant: "tertiary",
|
|
799
|
-
onClick:
|
|
799
|
+
onClick: v[3] || (v[3] = () => b.value = !1)
|
|
800
800
|
}, null, 8, ["label"])
|
|
801
801
|
])
|
|
802
802
|
]),
|
|
803
803
|
default: K(() => [
|
|
804
804
|
$("div", pn, [
|
|
805
805
|
$("div", null, [
|
|
806
|
-
|
|
806
|
+
L(ye, {
|
|
807
807
|
label: _(c)("settings.business.form.cover_photo.label"),
|
|
808
808
|
"sub-label": _(c)("settings.business.form.cover_photo.optional"),
|
|
809
809
|
"previous-url": i.thumbnail,
|
|
810
810
|
modelValue: i.newThumbnail,
|
|
811
|
-
"onUpdate:modelValue":
|
|
811
|
+
"onUpdate:modelValue": v[0] || (v[0] = (A) => i.newThumbnail = A),
|
|
812
812
|
"onReset:modelValue": g
|
|
813
813
|
}, null, 8, ["label", "sub-label", "previous-url", "modelValue"])
|
|
814
814
|
]),
|
|
815
815
|
$("div", null, [
|
|
816
|
-
|
|
816
|
+
L(y, {
|
|
817
817
|
label: _(c)("settings.business.form.name"),
|
|
818
818
|
modelValue: i.name,
|
|
819
|
-
"onUpdate:modelValue":
|
|
819
|
+
"onUpdate:modelValue": v[1] || (v[1] = (A) => i.name = A)
|
|
820
820
|
}, null, 8, ["label", "modelValue"])
|
|
821
821
|
]),
|
|
822
822
|
$("div", null, [
|
|
823
|
-
|
|
823
|
+
L(y, {
|
|
824
824
|
label: _(c)("settings.business.form.url.label"),
|
|
825
825
|
"model-value": i.url || "",
|
|
826
|
-
"onUpdate:modelValue":
|
|
826
|
+
"onUpdate:modelValue": v[2] || (v[2] = (A) => i.url = A),
|
|
827
827
|
placeholder: t.businessId,
|
|
828
828
|
rules: [
|
|
829
|
-
(
|
|
830
|
-
var
|
|
831
|
-
return !
|
|
829
|
+
(A) => {
|
|
830
|
+
var F;
|
|
831
|
+
return !A || ((F = t.initialValue) == null ? void 0 : F.url) == i.url || f.value == _(vt.F_COUNTRY).enum.MY || _(c)("settings.business.form.url.errors.disabled");
|
|
832
832
|
},
|
|
833
|
-
(
|
|
834
|
-
(
|
|
833
|
+
(A) => !A || _(pr).test(A) || _(c)("settings.business.form.url.errors.format"),
|
|
834
|
+
(A) => !A || !_(hr).includes(A) || _(c)("settings.business.form.url.errors.reserved")
|
|
835
835
|
]
|
|
836
836
|
}, {
|
|
837
837
|
prepend: K(() => [
|
|
@@ -847,7 +847,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
847
847
|
], 64);
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
|
-
}), gn = { class: "fm-typo-en-body-lg-600" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" },
|
|
850
|
+
}), gn = { class: "fm-typo-en-body-lg-600" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Tt = /* @__PURE__ */ re({
|
|
851
851
|
__name: "FormLabel",
|
|
852
852
|
props: {
|
|
853
853
|
label: {},
|
|
@@ -856,12 +856,12 @@ const tn = /* @__PURE__ */ re({
|
|
|
856
856
|
},
|
|
857
857
|
setup(t) {
|
|
858
858
|
const e = t, r = Y(() => e.optional && !e.subLabel ? "(optional)" : e.subLabel);
|
|
859
|
-
return (n, s) => (
|
|
860
|
-
|
|
859
|
+
return (n, s) => (j(), B("p", gn, [
|
|
860
|
+
je(G(n.label) + " ", 1),
|
|
861
861
|
$("span", bn, G(r.value), 1)
|
|
862
862
|
]));
|
|
863
863
|
}
|
|
864
|
-
}), yn = { class: "space-y-4" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _n = { class: "fm-typo-en-body-lg-600" },
|
|
864
|
+
}), yn = { class: "space-y-4" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _n = { class: "fm-typo-en-body-lg-600" }, Lt = /* @__PURE__ */ re({
|
|
865
865
|
__name: "InfoBasic",
|
|
866
866
|
props: {
|
|
867
867
|
name: {
|
|
@@ -874,21 +874,21 @@ const tn = /* @__PURE__ */ re({
|
|
|
874
874
|
}
|
|
875
875
|
},
|
|
876
876
|
setup(t) {
|
|
877
|
-
return (e, r) => (
|
|
877
|
+
return (e, r) => (j(), B("div", yn, [
|
|
878
878
|
$("div", $n, G(t.name), 1),
|
|
879
879
|
$("div", _n, G(t.value), 1)
|
|
880
880
|
]));
|
|
881
881
|
}
|
|
882
882
|
}), En = {};
|
|
883
883
|
function wn(t, e) {
|
|
884
|
-
return
|
|
884
|
+
return j(), B("div", null, e[0] || (e[0] = [
|
|
885
885
|
$("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
886
886
|
]));
|
|
887
887
|
}
|
|
888
888
|
const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
889
889
|
key: 0,
|
|
890
890
|
class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
|
|
891
|
-
}, An = { class: "fm-typo-en-title-sm-600" },
|
|
891
|
+
}, An = { class: "fm-typo-en-title-sm-600" }, Nt = /* @__PURE__ */ re({
|
|
892
892
|
__name: "Summary",
|
|
893
893
|
props: {
|
|
894
894
|
title: {},
|
|
@@ -896,13 +896,13 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
896
896
|
items: {}
|
|
897
897
|
},
|
|
898
898
|
setup(t) {
|
|
899
|
-
const e = t, r =
|
|
899
|
+
const e = t, r = pt();
|
|
900
900
|
function n() {
|
|
901
901
|
r.open({
|
|
902
902
|
title: e.title,
|
|
903
|
-
contentComponent:
|
|
903
|
+
contentComponent: At("div", { class: "space-y-4" }, [
|
|
904
904
|
...e.items.map(
|
|
905
|
-
(s) =>
|
|
905
|
+
(s) => At(Lt, {
|
|
906
906
|
name: s.name,
|
|
907
907
|
value: s.value || "--"
|
|
908
908
|
})
|
|
@@ -912,15 +912,15 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
912
912
|
}
|
|
913
913
|
return (s, o) => {
|
|
914
914
|
const i = q("FmButton");
|
|
915
|
-
return e.variant === "full" ? (
|
|
915
|
+
return e.variant === "full" ? (j(), B("div", In, [
|
|
916
916
|
$("div", An, G(s.title), 1),
|
|
917
|
-
|
|
918
|
-
(
|
|
917
|
+
L(Rn),
|
|
918
|
+
(j(!0), B(oe, null, he(s.items, (f) => (j(), te(Lt, {
|
|
919
919
|
key: f.name,
|
|
920
920
|
name: f.name,
|
|
921
921
|
value: f.value || "--"
|
|
922
922
|
}, null, 8, ["name", "value"]))), 128))
|
|
923
|
-
])) : (
|
|
923
|
+
])) : (j(), te(i, {
|
|
924
924
|
key: 1,
|
|
925
925
|
icon: "info",
|
|
926
926
|
variant: "tertiary",
|
|
@@ -955,14 +955,14 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
955
955
|
};
|
|
956
956
|
return (o, i) => {
|
|
957
957
|
const f = q("fm-button"), d = q("fm-form");
|
|
958
|
-
return
|
|
959
|
-
|
|
958
|
+
return j(), te(Tr, { to: "body" }, [
|
|
959
|
+
L(Lr, { name: "fade" }, {
|
|
960
960
|
default: K(() => [
|
|
961
|
-
o.show ? (
|
|
961
|
+
o.show ? (j(), te(d, {
|
|
962
962
|
key: 0,
|
|
963
963
|
"blame-form-child-on-validation-failed": "",
|
|
964
964
|
class: ee(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
|
|
965
|
-
style:
|
|
965
|
+
style: Me({ zIndex: o.zIndex }),
|
|
966
966
|
tabindex: "-1",
|
|
967
967
|
onValidationSuccess: n,
|
|
968
968
|
onKeyup: Nr(s, ["esc"])
|
|
@@ -971,12 +971,12 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
971
971
|
$("div", On, [
|
|
972
972
|
$("p", Sn, G(o.title), 1),
|
|
973
973
|
de(o.$slots, "append-title", {}, void 0, !0),
|
|
974
|
-
(
|
|
975
|
-
label:
|
|
974
|
+
(j(!0), B(oe, null, he(o.secondaryActions, (b) => (j(), te(f, {
|
|
975
|
+
label: b.label,
|
|
976
976
|
variant: "tertiary",
|
|
977
|
-
onClick:
|
|
977
|
+
onClick: b.click
|
|
978
978
|
}, null, 8, ["label", "onClick"]))), 256)),
|
|
979
|
-
|
|
979
|
+
L(f, {
|
|
980
980
|
label: o.primaryAction.label,
|
|
981
981
|
type: "submit",
|
|
982
982
|
variant: "primary"
|
|
@@ -996,7 +996,7 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
996
996
|
}
|
|
997
997
|
});
|
|
998
998
|
const Ln = /* @__PURE__ */ mr(Tn, [["__scopeId", "data-v-5b5c7179"]]);
|
|
999
|
-
var
|
|
999
|
+
var it = { exports: {} };
|
|
1000
1000
|
const Nn = "2.0.0", vr = 256, Cn = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
1001
1001
|
9007199254740991, xn = 16, kn = vr - 6, Vn = [
|
|
1002
1002
|
"major",
|
|
@@ -1007,7 +1007,7 @@ const Nn = "2.0.0", vr = 256, Cn = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
1007
1007
|
"prepatch",
|
|
1008
1008
|
"prerelease"
|
|
1009
1009
|
];
|
|
1010
|
-
var
|
|
1010
|
+
var Be = {
|
|
1011
1011
|
MAX_LENGTH: vr,
|
|
1012
1012
|
MAX_SAFE_COMPONENT_LENGTH: xn,
|
|
1013
1013
|
MAX_SAFE_BUILD_LENGTH: kn,
|
|
@@ -1019,42 +1019,42 @@ var De = {
|
|
|
1019
1019
|
};
|
|
1020
1020
|
const Fn = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
|
|
1021
1021
|
};
|
|
1022
|
-
var
|
|
1022
|
+
var Ke = Fn;
|
|
1023
1023
|
(function(t, e) {
|
|
1024
1024
|
const {
|
|
1025
1025
|
MAX_SAFE_COMPONENT_LENGTH: r,
|
|
1026
1026
|
MAX_SAFE_BUILD_LENGTH: n,
|
|
1027
1027
|
MAX_LENGTH: s
|
|
1028
|
-
} =
|
|
1028
|
+
} = Be, o = Ke;
|
|
1029
1029
|
e = t.exports = {};
|
|
1030
|
-
const i = e.re = [], f = e.safeRe = [], d = e.src = [],
|
|
1031
|
-
let
|
|
1032
|
-
const
|
|
1030
|
+
const i = e.re = [], f = e.safeRe = [], d = e.src = [], b = e.safeSrc = [], l = e.t = {};
|
|
1031
|
+
let g = 0;
|
|
1032
|
+
const O = "[a-zA-Z0-9-]", c = [
|
|
1033
1033
|
["\\s", 1],
|
|
1034
1034
|
["\\d", s],
|
|
1035
|
-
[
|
|
1036
|
-
],
|
|
1037
|
-
for (const [
|
|
1038
|
-
|
|
1039
|
-
return
|
|
1040
|
-
},
|
|
1041
|
-
const
|
|
1042
|
-
o(
|
|
1035
|
+
[O, n]
|
|
1036
|
+
], x = (y) => {
|
|
1037
|
+
for (const [k, V] of c)
|
|
1038
|
+
y = y.split(`${k}*`).join(`${k}{0,${V}}`).split(`${k}+`).join(`${k}{1,${V}}`);
|
|
1039
|
+
return y;
|
|
1040
|
+
}, v = (y, k, V) => {
|
|
1041
|
+
const A = x(k), F = g++;
|
|
1042
|
+
o(y, F, k), l[y] = F, d[F] = k, b[F] = A, i[F] = new RegExp(k, V ? "g" : void 0), f[F] = new RegExp(A, V ? "g" : void 0);
|
|
1043
1043
|
};
|
|
1044
|
-
|
|
1045
|
-
})(
|
|
1046
|
-
var Se =
|
|
1044
|
+
v("NUMERICIDENTIFIER", "0|[1-9]\\d*"), v("NUMERICIDENTIFIERLOOSE", "\\d+"), v("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${O}*`), v("MAINVERSION", `(${d[l.NUMERICIDENTIFIER]})\\.(${d[l.NUMERICIDENTIFIER]})\\.(${d[l.NUMERICIDENTIFIER]})`), v("MAINVERSIONLOOSE", `(${d[l.NUMERICIDENTIFIERLOOSE]})\\.(${d[l.NUMERICIDENTIFIERLOOSE]})\\.(${d[l.NUMERICIDENTIFIERLOOSE]})`), v("PRERELEASEIDENTIFIER", `(?:${d[l.NONNUMERICIDENTIFIER]}|${d[l.NUMERICIDENTIFIER]})`), v("PRERELEASEIDENTIFIERLOOSE", `(?:${d[l.NONNUMERICIDENTIFIER]}|${d[l.NUMERICIDENTIFIERLOOSE]})`), v("PRERELEASE", `(?:-(${d[l.PRERELEASEIDENTIFIER]}(?:\\.${d[l.PRERELEASEIDENTIFIER]})*))`), v("PRERELEASELOOSE", `(?:-?(${d[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[l.PRERELEASEIDENTIFIERLOOSE]})*))`), v("BUILDIDENTIFIER", `${O}+`), v("BUILD", `(?:\\+(${d[l.BUILDIDENTIFIER]}(?:\\.${d[l.BUILDIDENTIFIER]})*))`), v("FULLPLAIN", `v?${d[l.MAINVERSION]}${d[l.PRERELEASE]}?${d[l.BUILD]}?`), v("FULL", `^${d[l.FULLPLAIN]}$`), v("LOOSEPLAIN", `[v=\\s]*${d[l.MAINVERSIONLOOSE]}${d[l.PRERELEASELOOSE]}?${d[l.BUILD]}?`), v("LOOSE", `^${d[l.LOOSEPLAIN]}$`), v("GTLT", "((?:<|>)?=?)"), v("XRANGEIDENTIFIERLOOSE", `${d[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), v("XRANGEIDENTIFIER", `${d[l.NUMERICIDENTIFIER]}|x|X|\\*`), v("XRANGEPLAIN", `[v=\\s]*(${d[l.XRANGEIDENTIFIER]})(?:\\.(${d[l.XRANGEIDENTIFIER]})(?:\\.(${d[l.XRANGEIDENTIFIER]})(?:${d[l.PRERELEASE]})?${d[l.BUILD]}?)?)?`), v("XRANGEPLAINLOOSE", `[v=\\s]*(${d[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[l.XRANGEIDENTIFIERLOOSE]})(?:${d[l.PRERELEASELOOSE]})?${d[l.BUILD]}?)?)?`), v("XRANGE", `^${d[l.GTLT]}\\s*${d[l.XRANGEPLAIN]}$`), v("XRANGELOOSE", `^${d[l.GTLT]}\\s*${d[l.XRANGEPLAINLOOSE]}$`), v("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), v("COERCE", `${d[l.COERCEPLAIN]}(?:$|[^\\d])`), v("COERCEFULL", d[l.COERCEPLAIN] + `(?:${d[l.PRERELEASE]})?(?:${d[l.BUILD]})?(?:$|[^\\d])`), v("COERCERTL", d[l.COERCE], !0), v("COERCERTLFULL", d[l.COERCEFULL], !0), v("LONETILDE", "(?:~>?)"), v("TILDETRIM", `(\\s*)${d[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", v("TILDE", `^${d[l.LONETILDE]}${d[l.XRANGEPLAIN]}$`), v("TILDELOOSE", `^${d[l.LONETILDE]}${d[l.XRANGEPLAINLOOSE]}$`), v("LONECARET", "(?:\\^)"), v("CARETTRIM", `(\\s*)${d[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", v("CARET", `^${d[l.LONECARET]}${d[l.XRANGEPLAIN]}$`), v("CARETLOOSE", `^${d[l.LONECARET]}${d[l.XRANGEPLAINLOOSE]}$`), v("COMPARATORLOOSE", `^${d[l.GTLT]}\\s*(${d[l.LOOSEPLAIN]})$|^$`), v("COMPARATOR", `^${d[l.GTLT]}\\s*(${d[l.FULLPLAIN]})$|^$`), v("COMPARATORTRIM", `(\\s*)${d[l.GTLT]}\\s*(${d[l.LOOSEPLAIN]}|${d[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", v("HYPHENRANGE", `^\\s*(${d[l.XRANGEPLAIN]})\\s+-\\s+(${d[l.XRANGEPLAIN]})\\s*$`), v("HYPHENRANGELOOSE", `^\\s*(${d[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[l.XRANGEPLAINLOOSE]})\\s*$`), v("STAR", "(<|>)?=?\\s*\\*"), v("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), v("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
1045
|
+
})(it, it.exports);
|
|
1046
|
+
var Se = it.exports;
|
|
1047
1047
|
const jn = Object.freeze({ loose: !0 }), Mn = Object.freeze({}), Un = (t) => t ? typeof t != "object" ? jn : t : Mn;
|
|
1048
|
-
var
|
|
1049
|
-
const
|
|
1050
|
-
const r =
|
|
1048
|
+
var gt = Un;
|
|
1049
|
+
const Ct = /^[0-9]+$/, gr = (t, e) => {
|
|
1050
|
+
const r = Ct.test(t), n = Ct.test(e);
|
|
1051
1051
|
return r && n && (t = +t, e = +e), t === e ? 0 : r && !n ? -1 : n && !r ? 1 : t < e ? -1 : 1;
|
|
1052
1052
|
}, Dn = (t, e) => gr(e, t);
|
|
1053
1053
|
var br = {
|
|
1054
1054
|
compareIdentifiers: gr,
|
|
1055
1055
|
rcompareIdentifiers: Dn
|
|
1056
1056
|
};
|
|
1057
|
-
const Te =
|
|
1057
|
+
const Te = Ke, { MAX_LENGTH: xt, MAX_SAFE_INTEGER: Le } = Be, { safeRe: Ne, t: Ce } = Se, Gn = gt, { compareIdentifiers: ge } = br;
|
|
1058
1058
|
let Bn = class ue {
|
|
1059
1059
|
constructor(e, r) {
|
|
1060
1060
|
if (r = Gn(r), e instanceof ue) {
|
|
@@ -1063,12 +1063,12 @@ let Bn = class ue {
|
|
|
1063
1063
|
e = e.version;
|
|
1064
1064
|
} else if (typeof e != "string")
|
|
1065
1065
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
1066
|
-
if (e.length >
|
|
1066
|
+
if (e.length > xt)
|
|
1067
1067
|
throw new TypeError(
|
|
1068
|
-
`version is longer than ${
|
|
1068
|
+
`version is longer than ${xt} characters`
|
|
1069
1069
|
);
|
|
1070
1070
|
Te("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
|
|
1071
|
-
const n = e.trim().match(r.loose ?
|
|
1071
|
+
const n = e.trim().match(r.loose ? Ne[Ce.LOOSE] : Ne[Ce.FULL]);
|
|
1072
1072
|
if (!n)
|
|
1073
1073
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
1074
1074
|
if (this.raw = e, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > Le || this.major < 0)
|
|
@@ -1143,6 +1143,15 @@ let Bn = class ue {
|
|
|
1143
1143
|
// preminor will bump the version up to the next minor release, and immediately
|
|
1144
1144
|
// down to pre-release. premajor and prepatch work the same way.
|
|
1145
1145
|
inc(e, r, n) {
|
|
1146
|
+
if (e.startsWith("pre")) {
|
|
1147
|
+
if (!r && n === !1)
|
|
1148
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
1149
|
+
if (r) {
|
|
1150
|
+
const s = `-${r}`.match(this.options.loose ? Ne[Ce.PRERELEASELOOSE] : Ne[Ce.PRERELEASE]);
|
|
1151
|
+
if (!s || s[1] !== r)
|
|
1152
|
+
throw new Error(`invalid identifier: ${r}`);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1146
1155
|
switch (e) {
|
|
1147
1156
|
case "premajor":
|
|
1148
1157
|
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, n);
|
|
@@ -1156,6 +1165,11 @@ let Bn = class ue {
|
|
|
1156
1165
|
case "prerelease":
|
|
1157
1166
|
this.prerelease.length === 0 && this.inc("patch", r, n), this.inc("pre", r, n);
|
|
1158
1167
|
break;
|
|
1168
|
+
case "release":
|
|
1169
|
+
if (this.prerelease.length === 0)
|
|
1170
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1171
|
+
this.prerelease.length = 0;
|
|
1172
|
+
break;
|
|
1159
1173
|
case "major":
|
|
1160
1174
|
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
|
|
1161
1175
|
break;
|
|
@@ -1167,8 +1181,6 @@ let Bn = class ue {
|
|
|
1167
1181
|
break;
|
|
1168
1182
|
case "pre": {
|
|
1169
1183
|
const s = Number(n) ? 1 : 0;
|
|
1170
|
-
if (!r && n === !1)
|
|
1171
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
1172
1184
|
if (this.prerelease.length === 0)
|
|
1173
1185
|
this.prerelease = [s];
|
|
1174
1186
|
else {
|
|
@@ -1233,10 +1245,14 @@ const Ft = Ee, Qn = (t, e) => {
|
|
|
1233
1245
|
if (s === 0)
|
|
1234
1246
|
return null;
|
|
1235
1247
|
const o = s > 0, i = o ? r : n, f = o ? n : r, d = !!i.prerelease.length;
|
|
1236
|
-
if (!!f.prerelease.length && !d)
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1248
|
+
if (!!f.prerelease.length && !d) {
|
|
1249
|
+
if (!f.patch && !f.minor)
|
|
1250
|
+
return "major";
|
|
1251
|
+
if (f.compareMain(i) === 0)
|
|
1252
|
+
return f.minor && !f.patch ? "minor" : "patch";
|
|
1253
|
+
}
|
|
1254
|
+
const l = d ? "pre" : "";
|
|
1255
|
+
return r.major !== n.major ? l + "major" : r.minor !== n.minor ? l + "minor" : r.patch !== n.patch ? l + "patch" : "prerelease";
|
|
1240
1256
|
};
|
|
1241
1257
|
var es = Qn;
|
|
1242
1258
|
const ts = ne, rs = (t, e) => new ts(t, e).major;
|
|
@@ -1260,24 +1276,24 @@ const Mt = ne, $s = (t, e, r) => {
|
|
|
1260
1276
|
const n = new Mt(t, r), s = new Mt(e, r);
|
|
1261
1277
|
return n.compare(s) || n.compareBuild(s);
|
|
1262
1278
|
};
|
|
1263
|
-
var
|
|
1264
|
-
const _s =
|
|
1279
|
+
var bt = $s;
|
|
1280
|
+
const _s = bt, Es = (t, e) => t.sort((r, n) => _s(r, n, e));
|
|
1265
1281
|
var ws = Es;
|
|
1266
|
-
const Rs =
|
|
1282
|
+
const Rs = bt, Is = (t, e) => t.sort((r, n) => Rs(n, r, e));
|
|
1267
1283
|
var As = Is;
|
|
1268
1284
|
const Os = ie, Ss = (t, e, r) => Os(t, e, r) > 0;
|
|
1269
|
-
var
|
|
1285
|
+
var qe = Ss;
|
|
1270
1286
|
const Ps = ie, Ts = (t, e, r) => Ps(t, e, r) < 0;
|
|
1271
|
-
var
|
|
1287
|
+
var yt = Ts;
|
|
1272
1288
|
const Ls = ie, Ns = (t, e, r) => Ls(t, e, r) === 0;
|
|
1273
1289
|
var yr = Ns;
|
|
1274
1290
|
const Cs = ie, xs = (t, e, r) => Cs(t, e, r) !== 0;
|
|
1275
1291
|
var $r = xs;
|
|
1276
1292
|
const ks = ie, Vs = (t, e, r) => ks(t, e, r) >= 0;
|
|
1277
|
-
var
|
|
1293
|
+
var $t = Vs;
|
|
1278
1294
|
const Fs = ie, js = (t, e, r) => Fs(t, e, r) <= 0;
|
|
1279
|
-
var
|
|
1280
|
-
const Ms = yr, Us = $r, Ds =
|
|
1295
|
+
var _t = js;
|
|
1296
|
+
const Ms = yr, Us = $r, Ds = qe, Gs = $t, Bs = yt, Ks = _t, qs = (t, e, r, n) => {
|
|
1281
1297
|
switch (e) {
|
|
1282
1298
|
case "===":
|
|
1283
1299
|
return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t === r;
|
|
@@ -1302,7 +1318,7 @@ const Ms = yr, Us = $r, Ds = Be, Gs = bt, Bs = gt, Ks = yt, qs = (t, e, r, n) =>
|
|
|
1302
1318
|
}
|
|
1303
1319
|
};
|
|
1304
1320
|
var _r = qs;
|
|
1305
|
-
const Hs = ne, zs = Ee, { safeRe:
|
|
1321
|
+
const Hs = ne, zs = Ee, { safeRe: xe, t: ke } = Se, Xs = (t, e) => {
|
|
1306
1322
|
if (t instanceof Hs)
|
|
1307
1323
|
return t;
|
|
1308
1324
|
if (typeof t == "number" && (t = String(t)), typeof t != "string")
|
|
@@ -1310,12 +1326,12 @@ const Hs = ne, zs = Ee, { safeRe: Ne, t: Ce } = Se, Xs = (t, e) => {
|
|
|
1310
1326
|
e = e || {};
|
|
1311
1327
|
let r = null;
|
|
1312
1328
|
if (!e.rtl)
|
|
1313
|
-
r = t.match(e.includePrerelease ?
|
|
1329
|
+
r = t.match(e.includePrerelease ? xe[ke.COERCEFULL] : xe[ke.COERCE]);
|
|
1314
1330
|
else {
|
|
1315
|
-
const d = e.includePrerelease ?
|
|
1316
|
-
let
|
|
1317
|
-
for (; (
|
|
1318
|
-
(!r ||
|
|
1331
|
+
const d = e.includePrerelease ? xe[ke.COERCERTLFULL] : xe[ke.COERCERTL];
|
|
1332
|
+
let b;
|
|
1333
|
+
for (; (b = d.exec(t)) && (!r || r.index + r[0].length !== t.length); )
|
|
1334
|
+
(!r || b.index + b[0].length !== r.index + r[0].length) && (r = b), d.lastIndex = b.index + b[1].length + b[2].length;
|
|
1319
1335
|
d.lastIndex = -1;
|
|
1320
1336
|
}
|
|
1321
1337
|
if (r === null)
|
|
@@ -1347,10 +1363,10 @@ class Ws {
|
|
|
1347
1363
|
return this;
|
|
1348
1364
|
}
|
|
1349
1365
|
}
|
|
1350
|
-
var Js = Ws,
|
|
1366
|
+
var Js = Ws, et, Ut;
|
|
1351
1367
|
function le() {
|
|
1352
1368
|
if (Ut)
|
|
1353
|
-
return
|
|
1369
|
+
return et;
|
|
1354
1370
|
Ut = 1;
|
|
1355
1371
|
const t = /\s+/g;
|
|
1356
1372
|
class e {
|
|
@@ -1359,16 +1375,16 @@ function le() {
|
|
|
1359
1375
|
return p.loose === !!E.loose && p.includePrerelease === !!E.includePrerelease ? p : new e(p.raw, E);
|
|
1360
1376
|
if (p instanceof o)
|
|
1361
1377
|
return this.raw = p.value, this.set = [[p]], this.formatted = void 0, this;
|
|
1362
|
-
if (this.options = E, this.loose = !!E.loose, this.includePrerelease = !!E.includePrerelease, this.raw = p.trim().replace(t, " "), this.set = this.raw.split("||").map((
|
|
1378
|
+
if (this.options = E, this.loose = !!E.loose, this.includePrerelease = !!E.includePrerelease, this.raw = p.trim().replace(t, " "), this.set = this.raw.split("||").map((I) => this.parseRange(I.trim())).filter((I) => I.length), !this.set.length)
|
|
1363
1379
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
1364
1380
|
if (this.set.length > 1) {
|
|
1365
|
-
const
|
|
1366
|
-
if (this.set = this.set.filter((
|
|
1367
|
-
this.set = [
|
|
1381
|
+
const I = this.set[0];
|
|
1382
|
+
if (this.set = this.set.filter((N) => !v(N[0])), this.set.length === 0)
|
|
1383
|
+
this.set = [I];
|
|
1368
1384
|
else if (this.set.length > 1) {
|
|
1369
|
-
for (const
|
|
1370
|
-
if (
|
|
1371
|
-
this.set = [
|
|
1385
|
+
for (const N of this.set)
|
|
1386
|
+
if (N.length === 1 && y(N[0])) {
|
|
1387
|
+
this.set = [N];
|
|
1372
1388
|
break;
|
|
1373
1389
|
}
|
|
1374
1390
|
}
|
|
@@ -1381,8 +1397,8 @@ function le() {
|
|
|
1381
1397
|
for (let p = 0; p < this.set.length; p++) {
|
|
1382
1398
|
p > 0 && (this.formatted += "||");
|
|
1383
1399
|
const E = this.set[p];
|
|
1384
|
-
for (let
|
|
1385
|
-
|
|
1400
|
+
for (let I = 0; I < E.length; I++)
|
|
1401
|
+
I > 0 && (this.formatted += " "), this.formatted += E[I].toString().trim();
|
|
1386
1402
|
}
|
|
1387
1403
|
}
|
|
1388
1404
|
return this.formatted;
|
|
@@ -1394,27 +1410,27 @@ function le() {
|
|
|
1394
1410
|
return this.range;
|
|
1395
1411
|
}
|
|
1396
1412
|
parseRange(p) {
|
|
1397
|
-
const
|
|
1398
|
-
if (
|
|
1399
|
-
return
|
|
1400
|
-
const P = this.options.loose,
|
|
1401
|
-
p = p.replace(
|
|
1413
|
+
const I = ((this.options.includePrerelease && c) | (this.options.loose && x)) + ":" + p, N = n.get(I);
|
|
1414
|
+
if (N)
|
|
1415
|
+
return N;
|
|
1416
|
+
const P = this.options.loose, C = P ? d[b.HYPHENRANGELOOSE] : d[b.HYPHENRANGE];
|
|
1417
|
+
p = p.replace(C, R(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(d[b.COMPARATORTRIM], l), i("comparator trim", p), p = p.replace(d[b.TILDETRIM], g), i("tilde trim", p), p = p.replace(d[b.CARETTRIM], O), i("caret trim", p);
|
|
1402
1418
|
let w = p.split(" ").map((H) => V(H, this.options)).join(" ").split(/\s+/).map((H) => h(H, this.options));
|
|
1403
|
-
P && (w = w.filter((H) => (i("loose invalid filter", H, this.options), !!H.match(d[
|
|
1404
|
-
const
|
|
1419
|
+
P && (w = w.filter((H) => (i("loose invalid filter", H, this.options), !!H.match(d[b.COMPARATORLOOSE])))), i("range list", w);
|
|
1420
|
+
const T = /* @__PURE__ */ new Map(), U = w.map((H) => new o(H, this.options));
|
|
1405
1421
|
for (const H of U) {
|
|
1406
|
-
if (
|
|
1422
|
+
if (v(H))
|
|
1407
1423
|
return [H];
|
|
1408
|
-
|
|
1424
|
+
T.set(H.value, H);
|
|
1409
1425
|
}
|
|
1410
|
-
|
|
1411
|
-
const X = [...
|
|
1412
|
-
return n.set(
|
|
1426
|
+
T.size > 1 && T.has("") && T.delete("");
|
|
1427
|
+
const X = [...T.values()];
|
|
1428
|
+
return n.set(I, X), X;
|
|
1413
1429
|
}
|
|
1414
1430
|
intersects(p, E) {
|
|
1415
1431
|
if (!(p instanceof e))
|
|
1416
1432
|
throw new TypeError("a Range is required");
|
|
1417
|
-
return this.set.some((
|
|
1433
|
+
return this.set.some((I) => k(I, E) && p.set.some((N) => k(N, E) && I.every((P) => N.every((C) => P.intersects(C, E)))));
|
|
1418
1434
|
}
|
|
1419
1435
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
1420
1436
|
test(p) {
|
|
@@ -1432,107 +1448,107 @@ function le() {
|
|
|
1432
1448
|
return !1;
|
|
1433
1449
|
}
|
|
1434
1450
|
}
|
|
1435
|
-
|
|
1436
|
-
const r = Js, n = new r(), s =
|
|
1451
|
+
et = e;
|
|
1452
|
+
const r = Js, n = new r(), s = gt, o = He(), i = Ke, f = ne, {
|
|
1437
1453
|
safeRe: d,
|
|
1438
|
-
t:
|
|
1439
|
-
comparatorTrimReplace:
|
|
1454
|
+
t: b,
|
|
1455
|
+
comparatorTrimReplace: l,
|
|
1440
1456
|
tildeTrimReplace: g,
|
|
1441
|
-
caretTrimReplace:
|
|
1442
|
-
} = Se, { FLAG_INCLUDE_PRERELEASE: c, FLAG_LOOSE:
|
|
1457
|
+
caretTrimReplace: O
|
|
1458
|
+
} = Se, { FLAG_INCLUDE_PRERELEASE: c, FLAG_LOOSE: x } = Be, v = (m) => m.value === "<0.0.0-0", y = (m) => m.value === "", k = (m, p) => {
|
|
1443
1459
|
let E = !0;
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1446
|
-
for (; E &&
|
|
1447
|
-
E =
|
|
1460
|
+
const I = m.slice();
|
|
1461
|
+
let N = I.pop();
|
|
1462
|
+
for (; E && I.length; )
|
|
1463
|
+
E = I.every((P) => N.intersects(P, p)), N = I.pop();
|
|
1448
1464
|
return E;
|
|
1449
|
-
}, V = (m, p) => (i("comp", m, p), m = Z(m, p), i("caret", m), m =
|
|
1450
|
-
const E = p.loose ? d[
|
|
1451
|
-
return m.replace(E, (
|
|
1452
|
-
i("tilde", m,
|
|
1453
|
-
let
|
|
1454
|
-
return
|
|
1465
|
+
}, V = (m, p) => (i("comp", m, p), m = Z(m, p), i("caret", m), m = F(m, p), i("tildes", m), m = W(m, p), i("xrange", m), m = u(m, p), i("stars", m), m), A = (m) => !m || m.toLowerCase() === "x" || m === "*", F = (m, p) => m.trim().split(/\s+/).map((E) => J(E, p)).join(" "), J = (m, p) => {
|
|
1466
|
+
const E = p.loose ? d[b.TILDELOOSE] : d[b.TILDE];
|
|
1467
|
+
return m.replace(E, (I, N, P, C, w) => {
|
|
1468
|
+
i("tilde", m, I, N, P, C, w);
|
|
1469
|
+
let T;
|
|
1470
|
+
return A(N) ? T = "" : A(P) ? T = `>=${N}.0.0 <${+N + 1}.0.0-0` : A(C) ? T = `>=${N}.${P}.0 <${N}.${+P + 1}.0-0` : w ? (i("replaceTilde pr", w), T = `>=${N}.${P}.${C}-${w} <${N}.${+P + 1}.0-0`) : T = `>=${N}.${P}.${C} <${N}.${+P + 1}.0-0`, i("tilde return", T), T;
|
|
1455
1471
|
});
|
|
1456
1472
|
}, Z = (m, p) => m.trim().split(/\s+/).map((E) => D(E, p)).join(" "), D = (m, p) => {
|
|
1457
1473
|
i("caret", m, p);
|
|
1458
|
-
const E = p.loose ? d[
|
|
1459
|
-
return m.replace(E, (
|
|
1460
|
-
i("caret", m,
|
|
1474
|
+
const E = p.loose ? d[b.CARETLOOSE] : d[b.CARET], I = p.includePrerelease ? "-0" : "";
|
|
1475
|
+
return m.replace(E, (N, P, C, w, T) => {
|
|
1476
|
+
i("caret", m, N, P, C, w, T);
|
|
1461
1477
|
let U;
|
|
1462
|
-
return
|
|
1478
|
+
return A(P) ? U = "" : A(C) ? U = `>=${P}.0.0${I} <${+P + 1}.0.0-0` : A(w) ? P === "0" ? U = `>=${P}.${C}.0${I} <${P}.${+C + 1}.0-0` : U = `>=${P}.${C}.0${I} <${+P + 1}.0.0-0` : T ? (i("replaceCaret pr", T), P === "0" ? C === "0" ? U = `>=${P}.${C}.${w}-${T} <${P}.${C}.${+w + 1}-0` : U = `>=${P}.${C}.${w}-${T} <${P}.${+C + 1}.0-0` : U = `>=${P}.${C}.${w}-${T} <${+P + 1}.0.0-0`) : (i("no pr"), P === "0" ? C === "0" ? U = `>=${P}.${C}.${w}${I} <${P}.${C}.${+w + 1}-0` : U = `>=${P}.${C}.${w}${I} <${P}.${+C + 1}.0-0` : U = `>=${P}.${C}.${w} <${+P + 1}.0.0-0`), i("caret return", U), U;
|
|
1463
1479
|
});
|
|
1464
1480
|
}, W = (m, p) => (i("replaceXRanges", m, p), m.split(/\s+/).map((E) => a(E, p)).join(" ")), a = (m, p) => {
|
|
1465
1481
|
m = m.trim();
|
|
1466
|
-
const E = p.loose ? d[
|
|
1467
|
-
return m.replace(E, (
|
|
1468
|
-
i("xRange", m,
|
|
1469
|
-
const U =
|
|
1470
|
-
return
|
|
1482
|
+
const E = p.loose ? d[b.XRANGELOOSE] : d[b.XRANGE];
|
|
1483
|
+
return m.replace(E, (I, N, P, C, w, T) => {
|
|
1484
|
+
i("xRange", m, I, N, P, C, w, T);
|
|
1485
|
+
const U = A(P), X = U || A(C), H = X || A(w), M = H;
|
|
1486
|
+
return N === "=" && M && (N = ""), T = p.includePrerelease ? "-0" : "", U ? N === ">" || N === "<" ? I = "<0.0.0-0" : I = "*" : N && M ? (X && (C = 0), w = 0, N === ">" ? (N = ">=", X ? (P = +P + 1, C = 0, w = 0) : (C = +C + 1, w = 0)) : N === "<=" && (N = "<", X ? P = +P + 1 : C = +C + 1), N === "<" && (T = "-0"), I = `${N + P}.${C}.${w}${T}`) : X ? I = `>=${P}.0.0${T} <${+P + 1}.0.0-0` : H && (I = `>=${P}.${C}.0${T} <${P}.${+C + 1}.0-0`), i("xRange return", I), I;
|
|
1471
1487
|
});
|
|
1472
|
-
},
|
|
1473
|
-
for (let
|
|
1474
|
-
if (!m[
|
|
1488
|
+
}, u = (m, p) => (i("replaceStars", m, p), m.trim().replace(d[b.STAR], "")), h = (m, p) => (i("replaceGTE0", m, p), m.trim().replace(d[p.includePrerelease ? b.GTE0PRE : b.GTE0], "")), R = (m) => (p, E, I, N, P, C, w, T, U, X, H, M) => (A(I) ? E = "" : A(N) ? E = `>=${I}.0.0${m ? "-0" : ""}` : A(P) ? E = `>=${I}.${N}.0${m ? "-0" : ""}` : C ? E = `>=${E}` : E = `>=${E}${m ? "-0" : ""}`, A(U) ? T = "" : A(X) ? T = `<${+U + 1}.0.0-0` : A(H) ? T = `<${U}.${+X + 1}.0-0` : M ? T = `<=${U}.${X}.${H}-${M}` : m ? T = `<${U}.${X}.${+H + 1}-0` : T = `<=${T}`, `${E} ${T}`.trim()), S = (m, p, E) => {
|
|
1489
|
+
for (let I = 0; I < m.length; I++)
|
|
1490
|
+
if (!m[I].test(p))
|
|
1475
1491
|
return !1;
|
|
1476
1492
|
if (p.prerelease.length && !E.includePrerelease) {
|
|
1477
|
-
for (let
|
|
1478
|
-
if (i(m[
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1493
|
+
for (let I = 0; I < m.length; I++)
|
|
1494
|
+
if (i(m[I].semver), m[I].semver !== o.ANY && m[I].semver.prerelease.length > 0) {
|
|
1495
|
+
const N = m[I].semver;
|
|
1496
|
+
if (N.major === p.major && N.minor === p.minor && N.patch === p.patch)
|
|
1481
1497
|
return !0;
|
|
1482
1498
|
}
|
|
1483
1499
|
return !1;
|
|
1484
1500
|
}
|
|
1485
1501
|
return !0;
|
|
1486
1502
|
};
|
|
1487
|
-
return
|
|
1503
|
+
return et;
|
|
1488
1504
|
}
|
|
1489
|
-
var
|
|
1490
|
-
function
|
|
1505
|
+
var tt, Dt;
|
|
1506
|
+
function He() {
|
|
1491
1507
|
if (Dt)
|
|
1492
|
-
return
|
|
1508
|
+
return tt;
|
|
1493
1509
|
Dt = 1;
|
|
1494
1510
|
const t = Symbol("SemVer ANY");
|
|
1495
1511
|
class e {
|
|
1496
1512
|
static get ANY() {
|
|
1497
1513
|
return t;
|
|
1498
1514
|
}
|
|
1499
|
-
constructor(
|
|
1500
|
-
if (g = r(g),
|
|
1501
|
-
if (
|
|
1502
|
-
return
|
|
1503
|
-
|
|
1515
|
+
constructor(l, g) {
|
|
1516
|
+
if (g = r(g), l instanceof e) {
|
|
1517
|
+
if (l.loose === !!g.loose)
|
|
1518
|
+
return l;
|
|
1519
|
+
l = l.value;
|
|
1504
1520
|
}
|
|
1505
|
-
|
|
1521
|
+
l = l.trim().split(/\s+/).join(" "), i("comparator", l, g), this.options = g, this.loose = !!g.loose, this.parse(l), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, i("comp", this);
|
|
1506
1522
|
}
|
|
1507
|
-
parse(
|
|
1508
|
-
const g = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR],
|
|
1509
|
-
if (!
|
|
1510
|
-
throw new TypeError(`Invalid comparator: ${
|
|
1511
|
-
this.operator =
|
|
1523
|
+
parse(l) {
|
|
1524
|
+
const g = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR], O = l.match(g);
|
|
1525
|
+
if (!O)
|
|
1526
|
+
throw new TypeError(`Invalid comparator: ${l}`);
|
|
1527
|
+
this.operator = O[1] !== void 0 ? O[1] : "", this.operator === "=" && (this.operator = ""), O[2] ? this.semver = new f(O[2], this.options.loose) : this.semver = t;
|
|
1512
1528
|
}
|
|
1513
1529
|
toString() {
|
|
1514
1530
|
return this.value;
|
|
1515
1531
|
}
|
|
1516
|
-
test(
|
|
1517
|
-
if (i("Comparator.test",
|
|
1532
|
+
test(l) {
|
|
1533
|
+
if (i("Comparator.test", l, this.options.loose), this.semver === t || l === t)
|
|
1518
1534
|
return !0;
|
|
1519
|
-
if (typeof
|
|
1535
|
+
if (typeof l == "string")
|
|
1520
1536
|
try {
|
|
1521
|
-
|
|
1537
|
+
l = new f(l, this.options);
|
|
1522
1538
|
} catch {
|
|
1523
1539
|
return !1;
|
|
1524
1540
|
}
|
|
1525
|
-
return o(
|
|
1541
|
+
return o(l, this.operator, this.semver, this.options);
|
|
1526
1542
|
}
|
|
1527
|
-
intersects(
|
|
1528
|
-
if (!(
|
|
1543
|
+
intersects(l, g) {
|
|
1544
|
+
if (!(l instanceof e))
|
|
1529
1545
|
throw new TypeError("a Comparator is required");
|
|
1530
|
-
return this.operator === "" ? this.value === "" ? !0 : new d(
|
|
1546
|
+
return this.operator === "" ? this.value === "" ? !0 : new d(l.value, g).test(this.value) : l.operator === "" ? l.value === "" ? !0 : new d(this.value, g).test(l.semver) : (g = r(g), g.includePrerelease && (this.value === "<0.0.0-0" || l.value === "<0.0.0-0") || !g.includePrerelease && (this.value.startsWith("<0.0.0") || l.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && l.operator.startsWith(">") || this.operator.startsWith("<") && l.operator.startsWith("<") || this.semver.version === l.semver.version && this.operator.includes("=") && l.operator.includes("=") || o(this.semver, "<", l.semver, g) && this.operator.startsWith(">") && l.operator.startsWith("<") || o(this.semver, ">", l.semver, g) && this.operator.startsWith("<") && l.operator.startsWith(">")));
|
|
1531
1547
|
}
|
|
1532
1548
|
}
|
|
1533
|
-
|
|
1534
|
-
const r =
|
|
1535
|
-
return
|
|
1549
|
+
tt = e;
|
|
1550
|
+
const r = gt, { safeRe: n, t: s } = Se, o = _r, i = Ke, f = ne, d = le();
|
|
1551
|
+
return tt;
|
|
1536
1552
|
}
|
|
1537
1553
|
const Zs = le(), Qs = (t, e, r) => {
|
|
1538
1554
|
try {
|
|
@@ -1542,7 +1558,7 @@ const Zs = le(), Qs = (t, e, r) => {
|
|
|
1542
1558
|
}
|
|
1543
1559
|
return e.test(t);
|
|
1544
1560
|
};
|
|
1545
|
-
var
|
|
1561
|
+
var ze = Qs;
|
|
1546
1562
|
const ea = le(), ta = (t, e) => new ea(t, e).set.map((r) => r.map((n) => n.value).join(" ").trim().split(" "));
|
|
1547
1563
|
var ra = ta;
|
|
1548
1564
|
const na = ne, sa = le(), aa = (t, e, r) => {
|
|
@@ -1569,17 +1585,17 @@ const ia = ne, la = le(), ua = (t, e, r) => {
|
|
|
1569
1585
|
}), n;
|
|
1570
1586
|
};
|
|
1571
1587
|
var ca = ua;
|
|
1572
|
-
const
|
|
1588
|
+
const rt = ne, da = le(), Gt = qe, fa = (t, e) => {
|
|
1573
1589
|
t = new da(t, e);
|
|
1574
|
-
let r = new
|
|
1575
|
-
if (t.test(r) || (r = new
|
|
1590
|
+
let r = new rt("0.0.0");
|
|
1591
|
+
if (t.test(r) || (r = new rt("0.0.0-0"), t.test(r)))
|
|
1576
1592
|
return r;
|
|
1577
1593
|
r = null;
|
|
1578
1594
|
for (let n = 0; n < t.set.length; ++n) {
|
|
1579
1595
|
const s = t.set[n];
|
|
1580
1596
|
let o = null;
|
|
1581
1597
|
s.forEach((i) => {
|
|
1582
|
-
const f = new
|
|
1598
|
+
const f = new rt(i.semver.version);
|
|
1583
1599
|
switch (i.operator) {
|
|
1584
1600
|
case ">":
|
|
1585
1601
|
f.prerelease.length === 0 ? f.patch++ : f.prerelease.push(0), f.raw = f.format();
|
|
@@ -1606,7 +1622,7 @@ const pa = le(), ha = (t, e) => {
|
|
|
1606
1622
|
}
|
|
1607
1623
|
};
|
|
1608
1624
|
var va = ha;
|
|
1609
|
-
const ga = ne, Er =
|
|
1625
|
+
const ga = ne, Er = He(), { ANY: ba } = Er, ya = le(), $a = ze, Bt = qe, Kt = yt, _a = _t, Ea = $t, wa = (t, e, r, n) => {
|
|
1610
1626
|
t = new ga(t, n), e = new ya(e, n);
|
|
1611
1627
|
let s, o, i, f, d;
|
|
1612
1628
|
switch (r) {
|
|
@@ -1621,40 +1637,40 @@ const ga = ne, Er = Ke(), { ANY: ba } = Er, ya = le(), $a = qe, Bt = Be, Kt = gt
|
|
|
1621
1637
|
}
|
|
1622
1638
|
if ($a(t, e, n))
|
|
1623
1639
|
return !1;
|
|
1624
|
-
for (let
|
|
1625
|
-
const
|
|
1626
|
-
let g = null,
|
|
1627
|
-
if (
|
|
1628
|
-
c.semver === ba && (c = new Er(">=0.0.0")), g = g || c,
|
|
1629
|
-
}), g.operator === f || g.operator === d || (!
|
|
1640
|
+
for (let b = 0; b < e.set.length; ++b) {
|
|
1641
|
+
const l = e.set[b];
|
|
1642
|
+
let g = null, O = null;
|
|
1643
|
+
if (l.forEach((c) => {
|
|
1644
|
+
c.semver === ba && (c = new Er(">=0.0.0")), g = g || c, O = O || c, s(c.semver, g.semver, n) ? g = c : i(c.semver, O.semver, n) && (O = c);
|
|
1645
|
+
}), g.operator === f || g.operator === d || (!O.operator || O.operator === f) && o(t, O.semver))
|
|
1630
1646
|
return !1;
|
|
1631
|
-
if (
|
|
1647
|
+
if (O.operator === d && i(t, O.semver))
|
|
1632
1648
|
return !1;
|
|
1633
1649
|
}
|
|
1634
1650
|
return !0;
|
|
1635
1651
|
};
|
|
1636
|
-
var
|
|
1637
|
-
const Ra =
|
|
1652
|
+
var Et = wa;
|
|
1653
|
+
const Ra = Et, Ia = (t, e, r) => Ra(t, e, ">", r);
|
|
1638
1654
|
var Aa = Ia;
|
|
1639
|
-
const Oa =
|
|
1655
|
+
const Oa = Et, Sa = (t, e, r) => Oa(t, e, "<", r);
|
|
1640
1656
|
var Pa = Sa;
|
|
1641
1657
|
const qt = le(), Ta = (t, e, r) => (t = new qt(t, r), e = new qt(e, r), t.intersects(e, r));
|
|
1642
1658
|
var La = Ta;
|
|
1643
|
-
const Na =
|
|
1659
|
+
const Na = ze, Ca = ie;
|
|
1644
1660
|
var xa = (t, e, r) => {
|
|
1645
1661
|
const n = [];
|
|
1646
1662
|
let s = null, o = null;
|
|
1647
|
-
const i = t.sort((
|
|
1648
|
-
for (const
|
|
1649
|
-
Na(
|
|
1663
|
+
const i = t.sort((l, g) => Ca(l, g, r));
|
|
1664
|
+
for (const l of i)
|
|
1665
|
+
Na(l, e, r) ? (o = l, s || (s = l)) : (o && n.push([s, o]), o = null, s = null);
|
|
1650
1666
|
s && n.push([s, null]);
|
|
1651
1667
|
const f = [];
|
|
1652
|
-
for (const [
|
|
1653
|
-
|
|
1654
|
-
const d = f.join(" || "),
|
|
1655
|
-
return d.length <
|
|
1668
|
+
for (const [l, g] of n)
|
|
1669
|
+
l === g ? f.push(l) : !g && l === i[0] ? f.push("*") : g ? l === i[0] ? f.push(`<=${g}`) : f.push(`${l} - ${g}`) : f.push(`>=${l}`);
|
|
1670
|
+
const d = f.join(" || "), b = typeof e.raw == "string" ? e.raw : String(e);
|
|
1671
|
+
return d.length < b.length ? d : e;
|
|
1656
1672
|
};
|
|
1657
|
-
const Ht = le(),
|
|
1673
|
+
const Ht = le(), wt = He(), { ANY: nt } = wt, Ie = ze, Rt = ie, ka = (t, e, r = {}) => {
|
|
1658
1674
|
if (t === e)
|
|
1659
1675
|
return !0;
|
|
1660
1676
|
t = new Ht(t, r), e = new Ht(e, r);
|
|
@@ -1670,15 +1686,15 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1670
1686
|
return !1;
|
|
1671
1687
|
}
|
|
1672
1688
|
return !0;
|
|
1673
|
-
}, Va = [new
|
|
1689
|
+
}, Va = [new wt(">=0.0.0-0")], zt = [new wt(">=0.0.0")], Fa = (t, e, r) => {
|
|
1674
1690
|
if (t === e)
|
|
1675
1691
|
return !0;
|
|
1676
|
-
if (t.length === 1 && t[0].semver ===
|
|
1677
|
-
if (e.length === 1 && e[0].semver ===
|
|
1692
|
+
if (t.length === 1 && t[0].semver === nt) {
|
|
1693
|
+
if (e.length === 1 && e[0].semver === nt)
|
|
1678
1694
|
return !0;
|
|
1679
1695
|
r.includePrerelease ? t = Va : t = zt;
|
|
1680
1696
|
}
|
|
1681
|
-
if (e.length === 1 && e[0].semver ===
|
|
1697
|
+
if (e.length === 1 && e[0].semver === nt) {
|
|
1682
1698
|
if (r.includePrerelease)
|
|
1683
1699
|
return !0;
|
|
1684
1700
|
e = zt;
|
|
@@ -1691,7 +1707,7 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1691
1707
|
return null;
|
|
1692
1708
|
let i;
|
|
1693
1709
|
if (s && o) {
|
|
1694
|
-
if (i =
|
|
1710
|
+
if (i = Rt(s.semver, o.semver, r), i > 0)
|
|
1695
1711
|
return null;
|
|
1696
1712
|
if (i === 0 && (s.operator !== ">=" || o.operator !== "<="))
|
|
1697
1713
|
return null;
|
|
@@ -1699,16 +1715,16 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1699
1715
|
for (const c of n) {
|
|
1700
1716
|
if (s && !Ie(c, String(s), r) || o && !Ie(c, String(o), r))
|
|
1701
1717
|
return null;
|
|
1702
|
-
for (const
|
|
1703
|
-
if (!Ie(c, String(
|
|
1718
|
+
for (const x of e)
|
|
1719
|
+
if (!Ie(c, String(x), r))
|
|
1704
1720
|
return !1;
|
|
1705
1721
|
return !0;
|
|
1706
1722
|
}
|
|
1707
|
-
let f, d,
|
|
1723
|
+
let f, d, b, l, g = o && !r.includePrerelease && o.semver.prerelease.length ? o.semver : !1, O = s && !r.includePrerelease && s.semver.prerelease.length ? s.semver : !1;
|
|
1708
1724
|
g && g.prerelease.length === 1 && o.operator === "<" && g.prerelease[0] === 0 && (g = !1);
|
|
1709
1725
|
for (const c of e) {
|
|
1710
|
-
if (
|
|
1711
|
-
if (
|
|
1726
|
+
if (l = l || c.operator === ">" || c.operator === ">=", b = b || c.operator === "<" || c.operator === "<=", s) {
|
|
1727
|
+
if (O && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === O.major && c.semver.minor === O.minor && c.semver.patch === O.patch && (O = !1), c.operator === ">" || c.operator === ">=") {
|
|
1712
1728
|
if (f = Xt(s, c, r), f === c && f !== s)
|
|
1713
1729
|
return !1;
|
|
1714
1730
|
} else if (s.operator === ">=" && !Ie(s.semver, String(c), r))
|
|
@@ -1724,20 +1740,20 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1724
1740
|
if (!c.operator && (o || s) && i !== 0)
|
|
1725
1741
|
return !1;
|
|
1726
1742
|
}
|
|
1727
|
-
return !(s &&
|
|
1743
|
+
return !(s && b && !o && i !== 0 || o && l && !s && i !== 0 || O || g);
|
|
1728
1744
|
}, Xt = (t, e, r) => {
|
|
1729
1745
|
if (!t)
|
|
1730
1746
|
return e;
|
|
1731
|
-
const n =
|
|
1747
|
+
const n = Rt(t.semver, e.semver, r);
|
|
1732
1748
|
return n > 0 ? t : n < 0 || e.operator === ">" && t.operator === ">=" ? e : t;
|
|
1733
1749
|
}, Yt = (t, e, r) => {
|
|
1734
1750
|
if (!t)
|
|
1735
1751
|
return e;
|
|
1736
|
-
const n =
|
|
1752
|
+
const n = Rt(t.semver, e.semver, r);
|
|
1737
1753
|
return n < 0 ? t : n > 0 || e.operator === "<" && t.operator === "<=" ? e : t;
|
|
1738
1754
|
};
|
|
1739
1755
|
var ja = ka;
|
|
1740
|
-
const
|
|
1756
|
+
const st = Se, Wt = Be, Ma = ne, Jt = br, Ua = Ee, Da = zn, Ga = Wn, Ba = Zn, Ka = es, qa = ns, Ha = os, za = us, Xa = fs, Ya = ie, Wa = vs, Ja = ys, Za = bt, Qa = ws, eo = As, to = qe, ro = yt, no = yr, so = $r, ao = $t, oo = _t, io = _r, lo = Ys, uo = He(), co = le(), fo = ze, mo = ra, po = oa, ho = ca, vo = ma, go = va, bo = Et, yo = Aa, $o = Pa, _o = La, Eo = xa, wo = ja;
|
|
1741
1757
|
var Ro = {
|
|
1742
1758
|
parse: Ua,
|
|
1743
1759
|
valid: Da,
|
|
@@ -1777,16 +1793,16 @@ var Ro = {
|
|
|
1777
1793
|
simplifyRange: Eo,
|
|
1778
1794
|
subset: wo,
|
|
1779
1795
|
SemVer: Ma,
|
|
1780
|
-
re:
|
|
1781
|
-
src:
|
|
1782
|
-
tokens:
|
|
1796
|
+
re: st.re,
|
|
1797
|
+
src: st.src,
|
|
1798
|
+
tokens: st.t,
|
|
1783
1799
|
SEMVER_SPEC_VERSION: Wt.SEMVER_SPEC_VERSION,
|
|
1784
1800
|
RELEASE_TYPES: Wt.RELEASE_TYPES,
|
|
1785
1801
|
compareIdentifiers: Jt.compareIdentifiers,
|
|
1786
1802
|
rcompareIdentifiers: Jt.rcompareIdentifiers
|
|
1787
1803
|
};
|
|
1788
1804
|
const Zt = /* @__PURE__ */ dr(Ro);
|
|
1789
|
-
var
|
|
1805
|
+
var lt = /* @__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))(lt || {});
|
|
1790
1806
|
const wr = {
|
|
1791
1807
|
0: "3.0.0-alpha",
|
|
1792
1808
|
1: "3.5.0-alpha",
|
|
@@ -1858,7 +1874,7 @@ function Oe(t) {
|
|
|
1858
1874
|
};
|
|
1859
1875
|
}
|
|
1860
1876
|
function Oo({ posVersion: t, payoutAccount: e }) {
|
|
1861
|
-
return !!t && Io(
|
|
1877
|
+
return !!t && Io(lt.qrEPayment, t) ? !e || !e.enable ? "Payout account is required" : e.status !== vt.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? "Payout account under review" : !0 : `For POS ${Ao(lt.qrEPayment)} or above`;
|
|
1862
1878
|
}
|
|
1863
1879
|
function Rr(t) {
|
|
1864
1880
|
return {
|
|
@@ -1871,42 +1887,42 @@ function Rr(t) {
|
|
|
1871
1887
|
allowEPayment: Oo(t)
|
|
1872
1888
|
};
|
|
1873
1889
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return Rr(
|
|
1890
|
+
function at(t) {
|
|
1891
|
+
return Rr(Ue(t));
|
|
1876
1892
|
}
|
|
1877
1893
|
async function tr(t) {
|
|
1878
|
-
const e =
|
|
1894
|
+
const e = Ue(t), r = [];
|
|
1879
1895
|
for (const n of e)
|
|
1880
1896
|
r.push(await Rr(n));
|
|
1881
1897
|
return r;
|
|
1882
1898
|
}
|
|
1883
1899
|
const Ae = {
|
|
1884
1900
|
async readRestaurant(t) {
|
|
1885
|
-
return await
|
|
1901
|
+
return await at(await Pe().get(`/restaurants/${t}`));
|
|
1886
1902
|
},
|
|
1887
1903
|
async readRestaurants() {
|
|
1888
|
-
return await tr(await
|
|
1904
|
+
return await tr(await We().get("/restaurants"));
|
|
1889
1905
|
},
|
|
1890
1906
|
async readRestaurantsByBusiness() {
|
|
1891
|
-
return await tr(await
|
|
1907
|
+
return await tr(await We().get("/restaurant-list"));
|
|
1892
1908
|
},
|
|
1893
1909
|
async createRestaurant(t) {
|
|
1894
|
-
return await
|
|
1910
|
+
return await at(await We().post("/restaurants", t));
|
|
1895
1911
|
},
|
|
1896
1912
|
async updateRestaurantProfile(t, e) {
|
|
1897
|
-
return await
|
|
1913
|
+
return await at(
|
|
1898
1914
|
await Pe().put(`/restaurants/${t}/profile`, e)
|
|
1899
1915
|
);
|
|
1900
1916
|
},
|
|
1901
1917
|
async updateRestaurantAttributes(t, e) {
|
|
1902
|
-
return
|
|
1918
|
+
return Ue(
|
|
1903
1919
|
await Pe().put(`/restaurants/${t}/attributes`, {
|
|
1904
1920
|
attributes: e
|
|
1905
1921
|
})
|
|
1906
1922
|
);
|
|
1907
1923
|
},
|
|
1908
1924
|
async createRestaurantFeature(t) {
|
|
1909
|
-
return
|
|
1925
|
+
return Ue(await Pe().post(`/license/restaurant/${t}`));
|
|
1910
1926
|
}
|
|
1911
1927
|
}, So = /* @__PURE__ */ re({
|
|
1912
1928
|
__name: "GoogleMap",
|
|
@@ -1929,7 +1945,7 @@ const Ae = {
|
|
|
1929
1945
|
},
|
|
1930
1946
|
center: {
|
|
1931
1947
|
type: Object,
|
|
1932
|
-
default:
|
|
1948
|
+
default: De.jb
|
|
1933
1949
|
}
|
|
1934
1950
|
},
|
|
1935
1951
|
emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
|
|
@@ -1937,8 +1953,8 @@ const Ae = {
|
|
|
1937
1953
|
const n = t, s = r;
|
|
1938
1954
|
e({
|
|
1939
1955
|
setCenter: (a) => {
|
|
1940
|
-
var
|
|
1941
|
-
(
|
|
1956
|
+
var u;
|
|
1957
|
+
(u = i.value) == null || u.setCenter(a);
|
|
1942
1958
|
}
|
|
1943
1959
|
});
|
|
1944
1960
|
const o = ae(), i = ae(null), f = [];
|
|
@@ -1948,18 +1964,18 @@ const Ae = {
|
|
|
1948
1964
|
lng: a.latLng.lng()
|
|
1949
1965
|
};
|
|
1950
1966
|
}
|
|
1951
|
-
function
|
|
1952
|
-
const R = be().maps.event.addListener(a,
|
|
1967
|
+
function b(a, u, h) {
|
|
1968
|
+
const R = be().maps.event.addListener(a, u, h);
|
|
1953
1969
|
f.push(R);
|
|
1954
1970
|
}
|
|
1955
|
-
const
|
|
1956
|
-
function g(a,
|
|
1957
|
-
|
|
1971
|
+
const l = ae([]);
|
|
1972
|
+
function g(a, u, h) {
|
|
1973
|
+
b(a, u, h);
|
|
1958
1974
|
}
|
|
1959
|
-
function
|
|
1960
|
-
c(null),
|
|
1975
|
+
function O(a) {
|
|
1976
|
+
c(null), l.value = a.map((u, h) => {
|
|
1961
1977
|
const R = be(), S = new R.maps.Marker({
|
|
1962
|
-
position:
|
|
1978
|
+
position: u,
|
|
1963
1979
|
draggable: !0
|
|
1964
1980
|
});
|
|
1965
1981
|
return g(S, "dragend", (m) => {
|
|
@@ -1968,51 +1984,51 @@ const Ae = {
|
|
|
1968
1984
|
}), c(i.value);
|
|
1969
1985
|
}
|
|
1970
1986
|
function c(a) {
|
|
1971
|
-
|
|
1987
|
+
l.value.map((u) => St(u).setMap(a));
|
|
1972
1988
|
}
|
|
1973
|
-
const
|
|
1974
|
-
function
|
|
1975
|
-
|
|
1989
|
+
const x = ae([]);
|
|
1990
|
+
function v(a, u, h) {
|
|
1991
|
+
b(a, u, h);
|
|
1976
1992
|
}
|
|
1977
|
-
function y(a,
|
|
1978
|
-
|
|
1993
|
+
function y(a, u, h) {
|
|
1994
|
+
b(a, u, h);
|
|
1979
1995
|
}
|
|
1980
1996
|
function k(a) {
|
|
1981
|
-
return
|
|
1997
|
+
return x.value[a].getPath().getArray().map(({ lat: h, lng: R }) => ({
|
|
1982
1998
|
lat: h(),
|
|
1983
1999
|
lng: R()
|
|
1984
2000
|
}));
|
|
1985
2001
|
}
|
|
1986
2002
|
function V(a) {
|
|
1987
|
-
const
|
|
1988
|
-
s("polygon-change", { index: a, path:
|
|
2003
|
+
const u = k(a);
|
|
2004
|
+
s("polygon-change", { index: a, path: u });
|
|
1989
2005
|
}
|
|
1990
|
-
function
|
|
1991
|
-
const R = k(a).filter((S, m) => m !==
|
|
2006
|
+
function A(a, u) {
|
|
2007
|
+
const R = k(a).filter((S, m) => m !== u);
|
|
1992
2008
|
s("polygon-change", { index: a, path: R });
|
|
1993
2009
|
}
|
|
1994
|
-
function
|
|
1995
|
-
|
|
2010
|
+
function F(a, u) {
|
|
2011
|
+
u.vertex !== void 0 ? A(a, u.vertex) : s("polygon-right-click", a);
|
|
1996
2012
|
}
|
|
1997
2013
|
function J(a) {
|
|
1998
|
-
Z(null),
|
|
2014
|
+
Z(null), x.value = a.map((u, h) => {
|
|
1999
2015
|
const R = be(), S = new R.maps.Polygon({
|
|
2000
|
-
paths:
|
|
2001
|
-
strokeColor:
|
|
2002
|
-
fillColor:
|
|
2016
|
+
paths: u.paths,
|
|
2017
|
+
strokeColor: u.strokeColor,
|
|
2018
|
+
fillColor: u.fillColor,
|
|
2003
2019
|
fillOpacity: 0.5,
|
|
2004
2020
|
editable: n.editable
|
|
2005
2021
|
});
|
|
2006
|
-
return
|
|
2022
|
+
return v(S, "contextmenu", (m) => F(h, m)), S.getPaths().forEach((m) => {
|
|
2007
2023
|
y(m, "insert_at", () => V(h)), y(m, "set_at", () => V(h));
|
|
2008
2024
|
}), S;
|
|
2009
2025
|
}), Z(i.value);
|
|
2010
2026
|
}
|
|
2011
2027
|
function Z(a) {
|
|
2012
|
-
|
|
2028
|
+
x.value.map((u) => St(u).setMap(a));
|
|
2013
2029
|
}
|
|
2014
|
-
function D(a,
|
|
2015
|
-
|
|
2030
|
+
function D(a, u, h) {
|
|
2031
|
+
b(a, u, h);
|
|
2016
2032
|
}
|
|
2017
2033
|
function W() {
|
|
2018
2034
|
const a = be().maps.Map;
|
|
@@ -2023,13 +2039,13 @@ const Ae = {
|
|
|
2023
2039
|
streetViewControl: !1,
|
|
2024
2040
|
draggable: !0,
|
|
2025
2041
|
scrollwheel: !0
|
|
2026
|
-
}), D(i.value, "click", (
|
|
2042
|
+
}), D(i.value, "click", (u) => s("map-click", d(u)));
|
|
2027
2043
|
}
|
|
2028
|
-
return
|
|
2029
|
-
!o.value || !be() || (W(),
|
|
2044
|
+
return Ot(() => n.markers, O, { deep: !0 }), Ot(() => n.polygons, J, { deep: !0 }), Cr(() => {
|
|
2045
|
+
!o.value || !be() || (W(), O(n.markers), J(n.polygons));
|
|
2030
2046
|
}), xr(() => {
|
|
2031
2047
|
f.forEach((a) => a.remove());
|
|
2032
|
-
}), (a,
|
|
2048
|
+
}), (a, u) => (j(), B("div", {
|
|
2033
2049
|
ref_key: "mapRef",
|
|
2034
2050
|
ref: o,
|
|
2035
2051
|
class: "map app-map"
|
|
@@ -2048,13 +2064,13 @@ const Ae = {
|
|
|
2048
2064
|
}
|
|
2049
2065
|
},
|
|
2050
2066
|
setup(t) {
|
|
2051
|
-
const { t: e } = ve(), r = t, { emitData: n } = Ur(), s =
|
|
2052
|
-
$e(r.coordinate ? r.coordinate :
|
|
2067
|
+
const { t: e } = ve(), r = t, { emitData: n } = Ur(), s = ft(
|
|
2068
|
+
$e(r.coordinate ? r.coordinate : De.jb)
|
|
2053
2069
|
);
|
|
2054
2070
|
function o({ position: i }) {
|
|
2055
2071
|
s.lat = i.lat, s.lng = i.lng, n(s);
|
|
2056
2072
|
}
|
|
2057
|
-
return n(s), (i, f) => (
|
|
2073
|
+
return n(s), (i, f) => (j(), B("div", Po, [
|
|
2058
2074
|
$("div", null, [
|
|
2059
2075
|
$("div", To, [
|
|
2060
2076
|
$("div", null, G(_(e)("settings.coordinate_dialog.address")) + ":", 1),
|
|
@@ -2069,7 +2085,7 @@ const Ae = {
|
|
|
2069
2085
|
$("div", null, G(s.lng), 1)
|
|
2070
2086
|
])
|
|
2071
2087
|
]),
|
|
2072
|
-
|
|
2088
|
+
L(So, {
|
|
2073
2089
|
class: "w-full",
|
|
2074
2090
|
style: { height: "300px" },
|
|
2075
2091
|
editable: "",
|
|
@@ -2098,19 +2114,19 @@ const Ae = {
|
|
|
2098
2114
|
},
|
|
2099
2115
|
emits: ["update:model-value"],
|
|
2100
2116
|
setup(t, { emit: e }) {
|
|
2101
|
-
const { t: r } = ve(), n = t, s = e, o =
|
|
2117
|
+
const { t: r } = ve(), n = t, s = e, o = pt(), i = Y(() => {
|
|
2102
2118
|
const g = n.modelValue || [];
|
|
2103
2119
|
return g.length < 2 ? null : Jr(g);
|
|
2104
2120
|
}), f = Y(() => i.value ? `${i.value.lat}, ${i.value.lng}` : "");
|
|
2105
2121
|
async function d() {
|
|
2106
|
-
const g = be().maps.Geocoder,
|
|
2122
|
+
const g = be().maps.Geocoder, O = new g();
|
|
2107
2123
|
let c = i.value;
|
|
2108
|
-
c || await new Promise((
|
|
2109
|
-
n.address.formatted ?
|
|
2124
|
+
c || await new Promise((x) => {
|
|
2125
|
+
n.address.formatted ? O.geocode({ address: n.address.formatted }, (v) => {
|
|
2110
2126
|
var k;
|
|
2111
|
-
const y = (k =
|
|
2112
|
-
c = y ? { lng: y.location.lng(), lat: y.location.lat() } :
|
|
2113
|
-
}) : (c =
|
|
2127
|
+
const y = (k = v == null ? void 0 : v[0]) == null ? void 0 : k.geometry;
|
|
2128
|
+
c = y ? { lng: y.location.lng(), lat: y.location.lat() } : De.jb, x(!0);
|
|
2129
|
+
}) : (c = De.jb, x(!0));
|
|
2114
2130
|
}), o.open({
|
|
2115
2131
|
contentComponent: Co,
|
|
2116
2132
|
contentComponentProps: {
|
|
@@ -2128,26 +2144,26 @@ const Ae = {
|
|
|
2128
2144
|
variant: "destructive",
|
|
2129
2145
|
close: !0
|
|
2130
2146
|
}
|
|
2131
|
-
}).onPrimary(async (
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2147
|
+
}).onPrimary(async (x) => {
|
|
2148
|
+
const v = x ? Zr(x) : [];
|
|
2149
|
+
l(), s("update:model-value", v);
|
|
2134
2150
|
}).onSecondary(() => {
|
|
2135
|
-
|
|
2151
|
+
l(), s("update:model-value", []);
|
|
2136
2152
|
});
|
|
2137
2153
|
}
|
|
2138
|
-
const
|
|
2139
|
-
function
|
|
2140
|
-
|
|
2154
|
+
const b = ae(!1);
|
|
2155
|
+
function l() {
|
|
2156
|
+
b.value = !1;
|
|
2141
2157
|
}
|
|
2142
|
-
return (g,
|
|
2143
|
-
const c = q("FmIcon"),
|
|
2144
|
-
return
|
|
2158
|
+
return (g, O) => {
|
|
2159
|
+
const c = q("FmIcon"), x = q("FmField"), v = q("FmFormGroup");
|
|
2160
|
+
return j(), te(v, {
|
|
2145
2161
|
modelValue: i.value,
|
|
2146
|
-
"onUpdate:modelValue":
|
|
2162
|
+
"onUpdate:modelValue": O[0] || (O[0] = (y) => i.value = y),
|
|
2147
2163
|
label: _(r)("settings.coordinate_input.title")
|
|
2148
2164
|
}, {
|
|
2149
2165
|
default: K(() => [
|
|
2150
|
-
|
|
2166
|
+
L(x, {
|
|
2151
2167
|
class: "cursor-pointer",
|
|
2152
2168
|
onClick: d
|
|
2153
2169
|
}, {
|
|
@@ -2155,7 +2171,7 @@ const Ae = {
|
|
|
2155
2171
|
de(g.$slots, "prepend")
|
|
2156
2172
|
]),
|
|
2157
2173
|
append: K(() => [
|
|
2158
|
-
|
|
2174
|
+
L(c, {
|
|
2159
2175
|
class: "text-fm-color-neutral-gray-400",
|
|
2160
2176
|
name: "location_on",
|
|
2161
2177
|
outline: "",
|
|
@@ -2193,8 +2209,8 @@ const Ae = {
|
|
|
2193
2209
|
},
|
|
2194
2210
|
emits: ["update:model-value"],
|
|
2195
2211
|
setup(t, { emit: e }) {
|
|
2196
|
-
const r = t, n = e, s =
|
|
2197
|
-
|
|
2212
|
+
const r = t, n = e, s = mt(), { t: o } = ve();
|
|
2213
|
+
ht().startOf("week");
|
|
2198
2214
|
const i = Y(
|
|
2199
2215
|
() => [
|
|
2200
2216
|
o("settings.operation_hours.mon"),
|
|
@@ -2216,33 +2232,33 @@ const Ae = {
|
|
|
2216
2232
|
enable: !1,
|
|
2217
2233
|
hours: []
|
|
2218
2234
|
}))
|
|
2219
|
-
), d = Y(() => Object.values(f.value).map((k) => k.hours)),
|
|
2220
|
-
function
|
|
2235
|
+
), d = Y(() => Object.values(f.value).map((k) => k.hours)), b = Y(() => f.value.reduce((k, V, A) => (V.hours.length > 0 && k.push(A), k), []));
|
|
2236
|
+
function l() {
|
|
2221
2237
|
return { start: "00:00", end: "23:59" };
|
|
2222
2238
|
}
|
|
2223
2239
|
function g(k) {
|
|
2224
|
-
const V =
|
|
2240
|
+
const V = b.value.find((F) => !k.includes(F));
|
|
2225
2241
|
if (V !== void 0) {
|
|
2226
|
-
y((
|
|
2242
|
+
y((F) => (F[V].enable = !1, F[V].hours = [], F));
|
|
2227
2243
|
return;
|
|
2228
2244
|
}
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2245
|
+
const A = k.find((F) => !b.value.includes(F));
|
|
2246
|
+
A !== void 0 && f.value[A].hours.length === 0 && y((F) => (F[A].enable = !0, F[A].hours = [l()], F));
|
|
2231
2247
|
}
|
|
2232
|
-
function
|
|
2233
|
-
y((V) => (V[k].hours.push(
|
|
2248
|
+
function O(k) {
|
|
2249
|
+
y((V) => (V[k].hours.push(l()), V));
|
|
2234
2250
|
}
|
|
2235
2251
|
function c(k, V) {
|
|
2236
|
-
d.value[k].length > 1 ? y((
|
|
2252
|
+
d.value[k].length > 1 ? y((A) => (A[k].hours.splice(V, 1), A)) : s.open({ title: o("settings.operation_hours.cannot_remove_last"), type: "error" });
|
|
2237
2253
|
}
|
|
2238
|
-
function
|
|
2239
|
-
|
|
2254
|
+
function x(k, V, A) {
|
|
2255
|
+
A && y((F) => (F[k].hours[V].start = A, F));
|
|
2240
2256
|
}
|
|
2241
|
-
function
|
|
2242
|
-
|
|
2257
|
+
function v(k, V, A) {
|
|
2258
|
+
A && y((F) => (F[k].hours[V].end = A, F));
|
|
2243
2259
|
}
|
|
2244
2260
|
function y(k) {
|
|
2245
|
-
const V = k($e(f.value)),
|
|
2261
|
+
const V = k($e(f.value)), A = {
|
|
2246
2262
|
0: V[0],
|
|
2247
2263
|
1: V[1],
|
|
2248
2264
|
2: V[2],
|
|
@@ -2251,18 +2267,18 @@ const Ae = {
|
|
|
2251
2267
|
5: V[5],
|
|
2252
2268
|
6: V[6]
|
|
2253
2269
|
};
|
|
2254
|
-
n("update:model-value",
|
|
2270
|
+
n("update:model-value", A);
|
|
2255
2271
|
}
|
|
2256
2272
|
return (k, V) => {
|
|
2257
|
-
const
|
|
2258
|
-
return
|
|
2259
|
-
(
|
|
2273
|
+
const A = q("FmCheckbox"), F = q("FmTimePicker"), J = q("FmButton"), Z = q("FmField");
|
|
2274
|
+
return j(), B("div", null, [
|
|
2275
|
+
(j(!0), B(oe, null, he(i.value, (D) => (j(), B("div", {
|
|
2260
2276
|
key: D.value,
|
|
2261
2277
|
class: "flex flex-col items-start"
|
|
2262
2278
|
}, [
|
|
2263
2279
|
$("div", ko, [
|
|
2264
|
-
|
|
2265
|
-
"model-value":
|
|
2280
|
+
L(A, {
|
|
2281
|
+
"model-value": b.value,
|
|
2266
2282
|
label: D.label,
|
|
2267
2283
|
value: D.value,
|
|
2268
2284
|
"onUpdate:modelValue": g
|
|
@@ -2270,35 +2286,35 @@ const Ae = {
|
|
|
2270
2286
|
]),
|
|
2271
2287
|
$("div", Vo, [
|
|
2272
2288
|
$("div", null, [
|
|
2273
|
-
|
|
2289
|
+
b.value.includes(D.value) ? (j(!0), B(oe, { key: 0 }, he(d.value[D.value], (W, a) => (j(), B("div", {
|
|
2274
2290
|
key: a,
|
|
2275
2291
|
class: "flex items-center gap-8"
|
|
2276
2292
|
}, [
|
|
2277
|
-
|
|
2293
|
+
L(F, {
|
|
2278
2294
|
"model-value": W.start,
|
|
2279
|
-
"onUpdate:modelValue": (
|
|
2295
|
+
"onUpdate:modelValue": (u) => x(D.value, a, u)
|
|
2280
2296
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2281
2297
|
$("span", {
|
|
2282
2298
|
class: ee([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
2283
2299
|
}, G(_(o)("settings.operation_hours.to")), 1),
|
|
2284
|
-
|
|
2300
|
+
L(F, {
|
|
2285
2301
|
"model-value": W.end,
|
|
2286
|
-
"onUpdate:modelValue": (
|
|
2302
|
+
"onUpdate:modelValue": (u) => v(D.value, a, u)
|
|
2287
2303
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2288
|
-
|
|
2304
|
+
L(J, {
|
|
2289
2305
|
icon: "close",
|
|
2290
2306
|
variant: "tertiary",
|
|
2291
|
-
onClick: (
|
|
2307
|
+
onClick: (u) => c(D.value, a)
|
|
2292
2308
|
}, null, 8, ["onClick"]),
|
|
2293
|
-
|
|
2309
|
+
L(J, {
|
|
2294
2310
|
class: ee(a === 0 ? "" : "invisible"),
|
|
2295
2311
|
icon: "add",
|
|
2296
2312
|
color: "primary",
|
|
2297
2313
|
variant: "secondary",
|
|
2298
|
-
onClick: (
|
|
2314
|
+
onClick: (u) => O(D.value)
|
|
2299
2315
|
}, null, 8, ["class", "onClick"])
|
|
2300
|
-
]))), 128)) : (
|
|
2301
|
-
|
|
2316
|
+
]))), 128)) : (j(), B("div", Fo, [
|
|
2317
|
+
L(Z, null, {
|
|
2302
2318
|
default: K(() => [
|
|
2303
2319
|
$("div", {
|
|
2304
2320
|
class: ee([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
@@ -2309,7 +2325,7 @@ const Ae = {
|
|
|
2309
2325
|
$("span", {
|
|
2310
2326
|
class: ee([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
2311
2327
|
}, G(_(o)("settings.operation_hours.to")), 1),
|
|
2312
|
-
|
|
2328
|
+
L(Z, null, {
|
|
2313
2329
|
default: K(() => [
|
|
2314
2330
|
$("div", {
|
|
2315
2331
|
class: ee([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
@@ -2343,64 +2359,64 @@ const Ae = {
|
|
|
2343
2359
|
function f(d) {
|
|
2344
2360
|
s("update:model-value", d(o.value));
|
|
2345
2361
|
}
|
|
2346
|
-
return (d,
|
|
2347
|
-
const
|
|
2348
|
-
return
|
|
2362
|
+
return (d, b) => {
|
|
2363
|
+
const l = q("FmTextField");
|
|
2364
|
+
return j(), B("div", Mo, [
|
|
2349
2365
|
$("div", Uo, [
|
|
2350
2366
|
$("div", Do, [
|
|
2351
|
-
|
|
2367
|
+
L(l, {
|
|
2352
2368
|
"model-value": o.value.line1,
|
|
2353
2369
|
label: _(r)("settings.address.line1"),
|
|
2354
2370
|
"label-mark": "required",
|
|
2355
2371
|
rules: [_(fe)],
|
|
2356
|
-
"onUpdate:modelValue":
|
|
2372
|
+
"onUpdate:modelValue": b[0] || (b[0] = (g) => f((O) => ({ ...O, line1: i(g) })))
|
|
2357
2373
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2358
2374
|
]),
|
|
2359
2375
|
$("div", Go, [
|
|
2360
|
-
|
|
2376
|
+
L(l, {
|
|
2361
2377
|
"model-value": o.value.line2,
|
|
2362
2378
|
label: _(r)("settings.address.line2"),
|
|
2363
|
-
"onUpdate:modelValue":
|
|
2379
|
+
"onUpdate:modelValue": b[1] || (b[1] = (g) => f((O) => ({ ...O, line2: i(g) })))
|
|
2364
2380
|
}, null, 8, ["model-value", "label"])
|
|
2365
2381
|
])
|
|
2366
2382
|
]),
|
|
2367
2383
|
$("div", Bo, [
|
|
2368
2384
|
$("div", Ko, [
|
|
2369
|
-
|
|
2385
|
+
L(l, {
|
|
2370
2386
|
"model-value": o.value.city,
|
|
2371
2387
|
rules: [_(fe)],
|
|
2372
2388
|
label: _(r)("settings.address.city"),
|
|
2373
2389
|
"label-mark": "required",
|
|
2374
|
-
"onUpdate:modelValue":
|
|
2390
|
+
"onUpdate:modelValue": b[2] || (b[2] = (g) => f((O) => ({ ...O, city: i(g) })))
|
|
2375
2391
|
}, null, 8, ["model-value", "rules", "label"])
|
|
2376
2392
|
]),
|
|
2377
2393
|
$("div", qo, [
|
|
2378
|
-
|
|
2394
|
+
L(l, {
|
|
2379
2395
|
"model-value": o.value.postcode,
|
|
2380
2396
|
label: _(r)("settings.address.postal_code"),
|
|
2381
2397
|
"label-mark": "required",
|
|
2382
2398
|
rules: [_(fe)],
|
|
2383
|
-
"onUpdate:modelValue":
|
|
2399
|
+
"onUpdate:modelValue": b[3] || (b[3] = (g) => f((O) => ({ ...O, postcode: i(g) })))
|
|
2384
2400
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2385
2401
|
])
|
|
2386
2402
|
]),
|
|
2387
2403
|
$("div", Ho, [
|
|
2388
2404
|
$("div", zo, [
|
|
2389
|
-
|
|
2405
|
+
L(l, {
|
|
2390
2406
|
"model-value": o.value.state,
|
|
2391
2407
|
label: _(r)("settings.address.state"),
|
|
2392
2408
|
"label-mark": "required",
|
|
2393
2409
|
rules: [_(fe)],
|
|
2394
|
-
"onUpdate:modelValue":
|
|
2410
|
+
"onUpdate:modelValue": b[4] || (b[4] = (g) => f((O) => ({ ...O, state: i(g) })))
|
|
2395
2411
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2396
2412
|
]),
|
|
2397
2413
|
$("div", Xo, [
|
|
2398
|
-
|
|
2414
|
+
L(l, {
|
|
2399
2415
|
"model-value": o.value.country,
|
|
2400
2416
|
label: _(r)("settings.address.country"),
|
|
2401
2417
|
"label-mark": "required",
|
|
2402
2418
|
rules: [_(fe)],
|
|
2403
|
-
"onUpdate:modelValue":
|
|
2419
|
+
"onUpdate:modelValue": b[5] || (b[5] = (g) => f((O) => ({ ...O, country: i(g) })))
|
|
2404
2420
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2405
2421
|
])
|
|
2406
2422
|
])
|
|
@@ -2413,12 +2429,12 @@ function rr(t) {
|
|
|
2413
2429
|
}
|
|
2414
2430
|
class Wo {
|
|
2415
2431
|
constructor(e, r) {
|
|
2416
|
-
|
|
2417
|
-
|
|
2432
|
+
Xe(this, "restaurant");
|
|
2433
|
+
Xe(this, "data");
|
|
2418
2434
|
this.restaurant = e, this.data = r;
|
|
2419
2435
|
}
|
|
2420
2436
|
generateUrl(e) {
|
|
2421
|
-
const r = e === "normal" ?
|
|
2437
|
+
const r = e === "normal" ? ht().toISOString() : "photo";
|
|
2422
2438
|
return `restaurant/${this.restaurant.id}/${e}/${r}`;
|
|
2423
2439
|
}
|
|
2424
2440
|
async manageThumbnail() {
|
|
@@ -2496,13 +2512,13 @@ const Jo = () => {
|
|
|
2496
2512
|
},
|
|
2497
2513
|
setup(t, { expose: e }) {
|
|
2498
2514
|
var P;
|
|
2499
|
-
const r = t, { restaurants: n, currentBusiness: s, restaurantAttributeSettings: o, enabledCountries: i } = pe(), f =
|
|
2500
|
-
|
|
2501
|
-
},
|
|
2502
|
-
var
|
|
2503
|
-
return (
|
|
2504
|
-
}), c =
|
|
2505
|
-
|
|
2515
|
+
const r = t, { restaurants: n, currentBusiness: s, restaurantAttributeSettings: o, enabledCountries: i } = pe(), f = mt(), d = fr(f), { copyTextToClipboard: b } = cr(), l = ae(!1), g = (C, w) => {
|
|
2516
|
+
l.value = !l.value;
|
|
2517
|
+
}, O = Y(() => {
|
|
2518
|
+
var C;
|
|
2519
|
+
return (C = r.restaurant) == null ? void 0 : C.profile;
|
|
2520
|
+
}), c = ft(
|
|
2521
|
+
O.value ? $e(O.value) : {
|
|
2506
2522
|
...Qt(),
|
|
2507
2523
|
address: Oe(Qt().address),
|
|
2508
2524
|
legalName: "",
|
|
@@ -2545,26 +2561,26 @@ const Jo = () => {
|
|
|
2545
2561
|
}
|
|
2546
2562
|
}
|
|
2547
2563
|
}
|
|
2548
|
-
),
|
|
2564
|
+
), x = "https://feedmedev.cc/", v = Y(() => pe().currentCountry.value), { t: y } = ve(), k = ae(
|
|
2549
2565
|
r.restaurantId ? y("settings.business.restaurant.form.title.update") : y("settings.business.restaurant.form.title.add")
|
|
2550
2566
|
), V = ae(((P = r.restaurant) == null ? void 0 : P.customAttributes) || {});
|
|
2551
|
-
async function
|
|
2552
|
-
Object.values(V.value).length !== 0 && await Ae.updateRestaurantAttributes(
|
|
2567
|
+
async function A(C) {
|
|
2568
|
+
Object.values(V.value).length !== 0 && await Ae.updateRestaurantAttributes(C, V.value);
|
|
2553
2569
|
}
|
|
2554
|
-
const
|
|
2555
|
-
function Z(
|
|
2570
|
+
const F = Y(() => Oe(c.address)), J = Y(() => F.value.formatted);
|
|
2571
|
+
function Z(C) {
|
|
2556
2572
|
var w;
|
|
2557
|
-
if (typeof
|
|
2558
|
-
const
|
|
2559
|
-
|
|
2573
|
+
if (typeof C == "string") {
|
|
2574
|
+
const T = (w = n.value.find((U) => U._id === C)) == null ? void 0 : w.profile.operatingHours;
|
|
2575
|
+
T ? c.operatingHours = $e(T) : f.open({
|
|
2560
2576
|
title: y("settings.business.restaurant.form.sections.operation_hours.invalid"),
|
|
2561
2577
|
type: "error"
|
|
2562
2578
|
});
|
|
2563
2579
|
}
|
|
2564
2580
|
}
|
|
2565
2581
|
function D() {
|
|
2566
|
-
const
|
|
2567
|
-
|
|
2582
|
+
const C = x + (c.url || r.restaurantId);
|
|
2583
|
+
b(C);
|
|
2568
2584
|
}
|
|
2569
2585
|
function W() {
|
|
2570
2586
|
c.thumbnailPhoto = void 0, c.newThumbnailPhoto = void 0;
|
|
@@ -2572,13 +2588,13 @@ const Jo = () => {
|
|
|
2572
2588
|
function a() {
|
|
2573
2589
|
c.coverPhoto = void 0, c.newCoverPhoto = void 0;
|
|
2574
2590
|
}
|
|
2575
|
-
function
|
|
2576
|
-
c.newPhotos = c.newPhotos || [], c.newPhotos.push(
|
|
2591
|
+
function u(C) {
|
|
2592
|
+
c.newPhotos = c.newPhotos || [], c.newPhotos.push(C);
|
|
2577
2593
|
}
|
|
2578
|
-
const h = Jo(), R =
|
|
2594
|
+
const h = Jo(), R = pt();
|
|
2579
2595
|
function S() {
|
|
2580
|
-
var w,
|
|
2581
|
-
!((w =
|
|
2596
|
+
var w, T;
|
|
2597
|
+
!((w = O.value) != null && w.code) && ((T = c.code) == null ? void 0 : T.trim()) ? R.open({
|
|
2582
2598
|
title: y("settings.business.restaurant.codeConfirmation.title"),
|
|
2583
2599
|
message: y("settings.business.restaurant.codeConfirmation.message", {
|
|
2584
2600
|
name: c.name,
|
|
@@ -2598,15 +2614,15 @@ const Jo = () => {
|
|
|
2598
2614
|
}) : m();
|
|
2599
2615
|
}
|
|
2600
2616
|
function m() {
|
|
2601
|
-
var
|
|
2617
|
+
var C, w;
|
|
2602
2618
|
if (g(), r.restaurantId) {
|
|
2603
|
-
if (!((
|
|
2619
|
+
if (!((C = s.value) != null && C.id))
|
|
2604
2620
|
return;
|
|
2605
2621
|
d.minor(async () => {
|
|
2606
|
-
var
|
|
2607
|
-
r.restaurant && (await
|
|
2622
|
+
var T, U;
|
|
2623
|
+
r.restaurant && (await A(r.restaurantId), await h.updateRestaurantProfile(r.restaurant, {
|
|
2608
2624
|
...c,
|
|
2609
|
-
url: ((
|
|
2625
|
+
url: ((T = c.url) == null ? void 0 : T.trim()) || null,
|
|
2610
2626
|
code: ((U = c.code) == null ? void 0 : U.trim()) || null,
|
|
2611
2627
|
phoneNo: rr(c.phoneNo)
|
|
2612
2628
|
}), y("settings.business.restaurant.form.message.updated"));
|
|
@@ -2615,12 +2631,12 @@ const Jo = () => {
|
|
|
2615
2631
|
if (!((w = s.value) != null && w.id))
|
|
2616
2632
|
return;
|
|
2617
2633
|
d.minor(async () => {
|
|
2618
|
-
var
|
|
2634
|
+
var T, U;
|
|
2619
2635
|
await h.createRestaurant(
|
|
2620
2636
|
s.value.id,
|
|
2621
2637
|
{
|
|
2622
2638
|
...c,
|
|
2623
|
-
url: ((
|
|
2639
|
+
url: ((T = c.url) == null ? void 0 : T.trim()) || null,
|
|
2624
2640
|
code: ((U = c.code) == null ? void 0 : U.trim()) || null,
|
|
2625
2641
|
phoneNo: rr(c.phoneNo)
|
|
2626
2642
|
},
|
|
@@ -2651,25 +2667,25 @@ const Jo = () => {
|
|
|
2651
2667
|
]
|
|
2652
2668
|
})), { isAtMost: E } = ur();
|
|
2653
2669
|
Y(() => E("sm"));
|
|
2654
|
-
const
|
|
2655
|
-
return e({ trigger: g }), (
|
|
2656
|
-
const
|
|
2657
|
-
return
|
|
2658
|
-
de(
|
|
2670
|
+
const I = ae(null), N = Qr(I);
|
|
2671
|
+
return e({ trigger: g }), (C, w) => {
|
|
2672
|
+
const T = q("FmTextField"), U = q("FmPhoneNumber"), X = q("FmTextarea"), H = q("FmButton");
|
|
2673
|
+
return j(), B(oe, null, [
|
|
2674
|
+
de(C.$slots, "trigger", kr(Vr({
|
|
2659
2675
|
trigger: g
|
|
2660
2676
|
}))),
|
|
2661
|
-
|
|
2677
|
+
L(Ln, {
|
|
2662
2678
|
title: k.value,
|
|
2663
|
-
show:
|
|
2679
|
+
show: l.value,
|
|
2664
2680
|
"primary-action": { label: _(y)("common.save") },
|
|
2665
2681
|
"secondary-actions": [
|
|
2666
|
-
{ label: _(y)("settings.business.restaurant.actions.discard"), click: () =>
|
|
2682
|
+
{ label: _(y)("settings.business.restaurant.actions.discard"), click: () => l.value = !1 }
|
|
2667
2683
|
],
|
|
2668
2684
|
onOnPrimary: S,
|
|
2669
|
-
onOnCancel: w[17] || (w[17] = (
|
|
2685
|
+
onOnCancel: w[17] || (w[17] = (M) => l.value = !1)
|
|
2670
2686
|
}, {
|
|
2671
2687
|
"append-title": K(() => [
|
|
2672
|
-
_(E)("sm") ? (
|
|
2688
|
+
_(E)("sm") ? (j(), te(Nt, {
|
|
2673
2689
|
key: 0,
|
|
2674
2690
|
variant: "dialog",
|
|
2675
2691
|
title: p.value.title,
|
|
@@ -2680,40 +2696,40 @@ const Jo = () => {
|
|
|
2680
2696
|
$("div", Zo, [
|
|
2681
2697
|
$("div", {
|
|
2682
2698
|
ref_key: "formWrapper",
|
|
2683
|
-
ref:
|
|
2699
|
+
ref: I,
|
|
2684
2700
|
class: "py-24 pr-[400px] w-[1150px] xs:pr-0 sm:pr-0 xs:w-full"
|
|
2685
2701
|
}, [
|
|
2686
|
-
_(E)("sm") ? ce("", !0) : (
|
|
2702
|
+
_(E)("sm") ? ce("", !0) : (j(), te(Nt, {
|
|
2687
2703
|
key: 0,
|
|
2688
2704
|
class: "fixed",
|
|
2689
|
-
style:
|
|
2705
|
+
style: Me({
|
|
2690
2706
|
top: "85px",
|
|
2691
|
-
left: _(
|
|
2707
|
+
left: _(N).right - 400 + "px"
|
|
2692
2708
|
}),
|
|
2693
2709
|
variant: "full",
|
|
2694
2710
|
title: p.value.title,
|
|
2695
2711
|
items: p.value.items
|
|
2696
2712
|
}, null, 8, ["style", "title", "items"])),
|
|
2697
2713
|
$("div", Qo, [
|
|
2698
|
-
|
|
2714
|
+
L(Re, {
|
|
2699
2715
|
title: _(y)("settings.business.restaurant.form.sections.basic_info.title")
|
|
2700
2716
|
}, {
|
|
2701
2717
|
default: K(() => {
|
|
2702
|
-
var
|
|
2718
|
+
var M, Q;
|
|
2703
2719
|
return [
|
|
2704
2720
|
$("div", ei, [
|
|
2705
2721
|
$("div", null, [
|
|
2706
|
-
|
|
2722
|
+
L(T, {
|
|
2707
2723
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.code.label"),
|
|
2708
2724
|
modelValue: c.code,
|
|
2709
2725
|
"onUpdate:modelValue": w[0] || (w[0] = (z) => c.code = z),
|
|
2710
2726
|
"label-mark": "optional",
|
|
2711
2727
|
"helper-text": _(y)("settings.business.restaurant.form.sections.basic_info.code.helper"),
|
|
2712
|
-
disabled: ((
|
|
2728
|
+
disabled: ((M = O.value) == null ? void 0 : M.code) !== void 0 && ((Q = O.value) == null ? void 0 : Q.code) !== null
|
|
2713
2729
|
}, null, 8, ["label", "modelValue", "helper-text", "disabled"])
|
|
2714
2730
|
]),
|
|
2715
2731
|
$("div", null, [
|
|
2716
|
-
|
|
2732
|
+
L(T, {
|
|
2717
2733
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.name.label"),
|
|
2718
2734
|
modelValue: c.name,
|
|
2719
2735
|
"onUpdate:modelValue": w[1] || (w[1] = (z) => c.name = z),
|
|
@@ -2722,7 +2738,7 @@ const Jo = () => {
|
|
|
2722
2738
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
2723
2739
|
]),
|
|
2724
2740
|
$("div", null, [
|
|
2725
|
-
|
|
2741
|
+
L(T, {
|
|
2726
2742
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.legal_name.label"),
|
|
2727
2743
|
modelValue: c.legalName,
|
|
2728
2744
|
"onUpdate:modelValue": w[2] || (w[2] = (z) => c.legalName = z),
|
|
@@ -2731,7 +2747,7 @@ const Jo = () => {
|
|
|
2731
2747
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
2732
2748
|
]),
|
|
2733
2749
|
$("div", null, [
|
|
2734
|
-
|
|
2750
|
+
L(T, {
|
|
2735
2751
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.reg_no.label"),
|
|
2736
2752
|
modelValue: c.regNo,
|
|
2737
2753
|
"onUpdate:modelValue": w[3] || (w[3] = (z) => c.regNo = z),
|
|
@@ -2740,7 +2756,7 @@ const Jo = () => {
|
|
|
2740
2756
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
2741
2757
|
]),
|
|
2742
2758
|
$("div", null, [
|
|
2743
|
-
|
|
2759
|
+
L(T, {
|
|
2744
2760
|
modelValue: c.sstRegNo,
|
|
2745
2761
|
"onUpdate:modelValue": w[4] || (w[4] = (z) => c.sstRegNo = z),
|
|
2746
2762
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.tax_no.label"),
|
|
@@ -2749,7 +2765,7 @@ const Jo = () => {
|
|
|
2749
2765
|
]),
|
|
2750
2766
|
$("div", ti, [
|
|
2751
2767
|
$("div", ri, [
|
|
2752
|
-
|
|
2768
|
+
L(U, {
|
|
2753
2769
|
class: "w-full",
|
|
2754
2770
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.contact.label"),
|
|
2755
2771
|
modelValue: c.phoneNo,
|
|
@@ -2759,7 +2775,7 @@ const Jo = () => {
|
|
|
2759
2775
|
}, null, 8, ["label", "modelValue", "extra-country-codes"])
|
|
2760
2776
|
]),
|
|
2761
2777
|
$("div", ni, [
|
|
2762
|
-
|
|
2778
|
+
L(T, {
|
|
2763
2779
|
class: "w-full",
|
|
2764
2780
|
modelValue: c.email,
|
|
2765
2781
|
"onUpdate:modelValue": w[6] || (w[6] = (z) => c.email = z),
|
|
@@ -2769,7 +2785,7 @@ const Jo = () => {
|
|
|
2769
2785
|
])
|
|
2770
2786
|
]),
|
|
2771
2787
|
$("div", null, [
|
|
2772
|
-
|
|
2788
|
+
L(ye, {
|
|
2773
2789
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.image.label"),
|
|
2774
2790
|
"sub-label": _(y)("settings.business.restaurant.form.sections.basic_info.image.optional"),
|
|
2775
2791
|
"previous-url": c.thumbnailPhoto,
|
|
@@ -2783,61 +2799,61 @@ const Jo = () => {
|
|
|
2783
2799
|
}),
|
|
2784
2800
|
_: 1
|
|
2785
2801
|
}, 8, ["title"]),
|
|
2786
|
-
_(o).length > 0 ? (
|
|
2802
|
+
_(o).length > 0 ? (j(), B(oe, { key: 0 }, [
|
|
2787
2803
|
w[18] || (w[18] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2788
|
-
|
|
2804
|
+
L(Re, {
|
|
2789
2805
|
title: _(y)("settings.restaurantTagging.title"),
|
|
2790
2806
|
"sub-title": _(y)("settings.restaurantTagging.subtitle")
|
|
2791
2807
|
}, {
|
|
2792
2808
|
default: K(() => [
|
|
2793
|
-
|
|
2809
|
+
L(_(jr), {
|
|
2794
2810
|
entity: "restaurant",
|
|
2795
2811
|
modelValue: V.value,
|
|
2796
|
-
"onUpdate:modelValue": w[8] || (w[8] = (
|
|
2812
|
+
"onUpdate:modelValue": w[8] || (w[8] = (M) => V.value = M)
|
|
2797
2813
|
}, null, 8, ["modelValue"])
|
|
2798
2814
|
]),
|
|
2799
2815
|
_: 1
|
|
2800
2816
|
}, 8, ["title", "sub-title"])
|
|
2801
2817
|
], 64)) : ce("", !0),
|
|
2802
2818
|
w[19] || (w[19] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2803
|
-
|
|
2819
|
+
L(Re, {
|
|
2804
2820
|
title: _(y)("settings.business.restaurant.form.sections.address.title")
|
|
2805
2821
|
}, {
|
|
2806
2822
|
default: K(() => [
|
|
2807
2823
|
$("div", si, [
|
|
2808
|
-
|
|
2824
|
+
L(Yo, {
|
|
2809
2825
|
modelValue: c.address,
|
|
2810
|
-
"onUpdate:modelValue": w[9] || (w[9] = (
|
|
2826
|
+
"onUpdate:modelValue": w[9] || (w[9] = (M) => c.address = M)
|
|
2811
2827
|
}, null, 8, ["modelValue"]),
|
|
2812
|
-
|
|
2813
|
-
address:
|
|
2828
|
+
L(xo, {
|
|
2829
|
+
address: F.value,
|
|
2814
2830
|
modelValue: c.address.coordinates,
|
|
2815
|
-
"onUpdate:modelValue": w[10] || (w[10] = (
|
|
2831
|
+
"onUpdate:modelValue": w[10] || (w[10] = (M) => c.address.coordinates = M)
|
|
2816
2832
|
}, null, 8, ["address", "modelValue"])
|
|
2817
2833
|
])
|
|
2818
2834
|
]),
|
|
2819
2835
|
_: 1
|
|
2820
2836
|
}, 8, ["title"]),
|
|
2821
2837
|
w[20] || (w[20] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2822
|
-
|
|
2838
|
+
L(Re, {
|
|
2823
2839
|
title: _(y)("settings.business.restaurant.form.sections.operation_hours.title")
|
|
2824
2840
|
}, {
|
|
2825
2841
|
default: K(() => [
|
|
2826
2842
|
$("div", ai, [
|
|
2827
2843
|
$("div", oi, [
|
|
2828
|
-
|
|
2844
|
+
L(Tt, {
|
|
2829
2845
|
label: _(y)("settings.business.restaurant.form.sections.operation_hours.copy_with"),
|
|
2830
2846
|
optional: !1
|
|
2831
2847
|
}, null, 8, ["label"]),
|
|
2832
|
-
|
|
2848
|
+
L(Dr, {
|
|
2833
2849
|
class: "w-[320px]",
|
|
2834
2850
|
"exclude-restaurants": t.restaurantId ? [t.restaurantId] : [],
|
|
2835
2851
|
"model-value": "",
|
|
2836
|
-
"onUpdate:modelValue": w[11] || (w[11] = (
|
|
2852
|
+
"onUpdate:modelValue": w[11] || (w[11] = (M) => Z(M))
|
|
2837
2853
|
}, null, 8, ["exclude-restaurants"]),
|
|
2838
|
-
|
|
2854
|
+
L(jo, {
|
|
2839
2855
|
modelValue: c.operatingHours,
|
|
2840
|
-
"onUpdate:modelValue": w[12] || (w[12] = (
|
|
2856
|
+
"onUpdate:modelValue": w[12] || (w[12] = (M) => c.operatingHours = M)
|
|
2841
2857
|
}, null, 8, ["modelValue"])
|
|
2842
2858
|
])
|
|
2843
2859
|
])
|
|
@@ -2845,35 +2861,35 @@ const Jo = () => {
|
|
|
2845
2861
|
_: 1
|
|
2846
2862
|
}, 8, ["title"]),
|
|
2847
2863
|
w[21] || (w[21] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2848
|
-
|
|
2864
|
+
L(Re, {
|
|
2849
2865
|
title: _(y)("settings.business.restaurant.form.sections.branding.title")
|
|
2850
2866
|
}, {
|
|
2851
2867
|
default: K(() => [
|
|
2852
2868
|
$("div", ii, [
|
|
2853
|
-
|
|
2869
|
+
L(X, {
|
|
2854
2870
|
label: _(y)("settings.business.restaurant.form.sections.branding.description"),
|
|
2855
2871
|
"model-value": c.description ?? "",
|
|
2856
|
-
"onUpdate:modelValue": w[13] || (w[13] = (
|
|
2872
|
+
"onUpdate:modelValue": w[13] || (w[13] = (M) => c.description = M)
|
|
2857
2873
|
}, null, 8, ["label", "model-value"]),
|
|
2858
|
-
|
|
2874
|
+
L(T, {
|
|
2859
2875
|
label: _(y)("settings.business.restaurant.form.sections.branding.url.label"),
|
|
2860
2876
|
placeholder: t.restaurantId,
|
|
2861
2877
|
"model-value": c.url,
|
|
2862
|
-
"onUpdate:modelValue": w[14] || (w[14] = (
|
|
2878
|
+
"onUpdate:modelValue": w[14] || (w[14] = (M) => c.url = M),
|
|
2863
2879
|
rules: [
|
|
2864
|
-
(
|
|
2880
|
+
(M) => {
|
|
2865
2881
|
var Q;
|
|
2866
|
-
return !
|
|
2882
|
+
return !M || ((Q = O.value) == null ? void 0 : Q.url) == c.url || v.value == _(vt.F_COUNTRY).enum.MY || _(y)("settings.business.restaurant.form.sections.branding.url.errors.disabled");
|
|
2867
2883
|
},
|
|
2868
|
-
(
|
|
2869
|
-
(
|
|
2884
|
+
(M) => !M || _(pr).test(M) || _(y)("settings.business.restaurant.form.sections.branding.url.errors.invalid"),
|
|
2885
|
+
(M) => !M || !_(hr).includes(M) || _(y)("settings.business.restaurant.form.sections.branding.url.errors.reserved")
|
|
2870
2886
|
]
|
|
2871
2887
|
}, {
|
|
2872
2888
|
prepend: K(() => [
|
|
2873
|
-
$("span", null, G(
|
|
2889
|
+
$("span", null, G(x))
|
|
2874
2890
|
]),
|
|
2875
2891
|
append: K(() => [
|
|
2876
|
-
|
|
2892
|
+
L(H, {
|
|
2877
2893
|
variant: "tertiary",
|
|
2878
2894
|
icon: "file_copy",
|
|
2879
2895
|
"text-color": "neutral-gray-400",
|
|
@@ -2883,43 +2899,43 @@ const Jo = () => {
|
|
|
2883
2899
|
_: 1
|
|
2884
2900
|
}, 8, ["label", "placeholder", "model-value", "rules"]),
|
|
2885
2901
|
$("div", null, [
|
|
2886
|
-
|
|
2902
|
+
L(ye, {
|
|
2887
2903
|
label: _(y)("settings.business.form.cover_photo.label"),
|
|
2888
2904
|
"previous-url": c.coverPhoto,
|
|
2889
2905
|
modelValue: c.newCoverPhoto,
|
|
2890
|
-
"onUpdate:modelValue": w[15] || (w[15] = (
|
|
2906
|
+
"onUpdate:modelValue": w[15] || (w[15] = (M) => c.newCoverPhoto = M),
|
|
2891
2907
|
"onReset:modelValue": a
|
|
2892
2908
|
}, null, 8, ["label", "previous-url", "modelValue"])
|
|
2893
2909
|
]),
|
|
2894
2910
|
$("div", null, [
|
|
2895
|
-
|
|
2911
|
+
L(Tt, {
|
|
2896
2912
|
label: _(y)("settings.business.restaurant.form.sections.branding.carousel_photos.label")
|
|
2897
2913
|
}, null, 8, ["label"]),
|
|
2898
|
-
(
|
|
2914
|
+
(j(!0), B(oe, null, he(c.photos || [], (M, Q) => (j(), te(ye, {
|
|
2899
2915
|
key: Q,
|
|
2900
|
-
"previous-url":
|
|
2916
|
+
"previous-url": M,
|
|
2901
2917
|
"model-value": void 0,
|
|
2902
2918
|
"onReset:modelValue": (z) => {
|
|
2903
2919
|
var we;
|
|
2904
2920
|
return (we = c.photos) == null ? void 0 : we.splice(Q, 1);
|
|
2905
2921
|
}
|
|
2906
2922
|
}, null, 8, ["previous-url", "onReset:modelValue"]))), 128)),
|
|
2907
|
-
(
|
|
2923
|
+
(j(!0), B(oe, null, he(c.newPhotos || [], (M, Q) => {
|
|
2908
2924
|
var z;
|
|
2909
|
-
return
|
|
2925
|
+
return j(), te(ye, {
|
|
2910
2926
|
key: Q,
|
|
2911
2927
|
"model-value": ((z = c.newPhotos) == null ? void 0 : z[Q]) || void 0,
|
|
2912
2928
|
"previous-url": void 0,
|
|
2913
2929
|
"onReset:modelValue": (we) => {
|
|
2914
|
-
var
|
|
2915
|
-
return (
|
|
2930
|
+
var It;
|
|
2931
|
+
return (It = c.photos) == null ? void 0 : It.splice(Q, 1);
|
|
2916
2932
|
}
|
|
2917
2933
|
}, null, 8, ["model-value", "onReset:modelValue"]);
|
|
2918
2934
|
}), 128)),
|
|
2919
|
-
|
|
2935
|
+
L(ye, {
|
|
2920
2936
|
"model-value": void 0,
|
|
2921
2937
|
"previous-url": void 0,
|
|
2922
|
-
"onUpdate:modelValue": w[16] || (w[16] = (
|
|
2938
|
+
"onUpdate:modelValue": w[16] || (w[16] = (M) => u(M))
|
|
2923
2939
|
})
|
|
2924
2940
|
])
|
|
2925
2941
|
])
|
|
@@ -2972,8 +2988,8 @@ var Ir = { exports: {} };
|
|
|
2972
2988
|
s.d(
|
|
2973
2989
|
f,
|
|
2974
2990
|
d,
|
|
2975
|
-
(function(
|
|
2976
|
-
return o[
|
|
2991
|
+
(function(b) {
|
|
2992
|
+
return o[b];
|
|
2977
2993
|
}).bind(null, d)
|
|
2978
2994
|
);
|
|
2979
2995
|
return f;
|
|
@@ -2993,16 +3009,16 @@ var Ir = { exports: {} };
|
|
|
2993
3009
|
},
|
|
2994
3010
|
function(r, n, s) {
|
|
2995
3011
|
function o(a) {
|
|
2996
|
-
return (o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
2997
|
-
return typeof
|
|
2998
|
-
} : function(
|
|
2999
|
-
return
|
|
3012
|
+
return (o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(u) {
|
|
3013
|
+
return typeof u;
|
|
3014
|
+
} : function(u) {
|
|
3015
|
+
return u && typeof Symbol == "function" && u.constructor === Symbol && u !== Symbol.prototype ? "symbol" : typeof u;
|
|
3000
3016
|
})(a);
|
|
3001
3017
|
}
|
|
3002
3018
|
function i(a) {
|
|
3003
|
-
var
|
|
3019
|
+
var u = "[object " + a + "]";
|
|
3004
3020
|
return function(h) {
|
|
3005
|
-
return Object.prototype.toString.call(h) ===
|
|
3021
|
+
return Object.prototype.toString.call(h) === u;
|
|
3006
3022
|
};
|
|
3007
3023
|
}
|
|
3008
3024
|
s.r(n), s.d(n, "default", function() {
|
|
@@ -3012,107 +3028,107 @@ var Ir = { exports: {} };
|
|
|
3012
3028
|
}), s.d(n, "comparable", function() {
|
|
3013
3029
|
return W;
|
|
3014
3030
|
});
|
|
3015
|
-
var f = i("Array"), d = i("Object"),
|
|
3016
|
-
function
|
|
3017
|
-
return
|
|
3031
|
+
var f = i("Array"), d = i("Object"), b = i("Function");
|
|
3032
|
+
function l(a, u) {
|
|
3033
|
+
return b(a.get) ? a.get(u) : a[u];
|
|
3018
3034
|
}
|
|
3019
3035
|
function g(a) {
|
|
3020
|
-
return function(
|
|
3036
|
+
return function(u, h) {
|
|
3021
3037
|
if (!f(h) || !h.length)
|
|
3022
|
-
return a(
|
|
3038
|
+
return a(u, h);
|
|
3023
3039
|
for (var R = 0, S = h.length; R < S; R++)
|
|
3024
|
-
if (a(
|
|
3040
|
+
if (a(u, l(h, R)))
|
|
3025
3041
|
return !0;
|
|
3026
3042
|
return !1;
|
|
3027
3043
|
};
|
|
3028
3044
|
}
|
|
3029
|
-
function
|
|
3030
|
-
return function(
|
|
3045
|
+
function O(a) {
|
|
3046
|
+
return function(u, h) {
|
|
3031
3047
|
if (!f(h) || !h.length)
|
|
3032
|
-
return a(
|
|
3048
|
+
return a(u, h);
|
|
3033
3049
|
for (var R = 0, S = h.length; R < S; R++)
|
|
3034
|
-
if (!a(
|
|
3050
|
+
if (!a(u, l(h, R)))
|
|
3035
3051
|
return !1;
|
|
3036
3052
|
return !0;
|
|
3037
3053
|
};
|
|
3038
3054
|
}
|
|
3039
|
-
function c(a,
|
|
3040
|
-
return a.validate(a.options,
|
|
3055
|
+
function c(a, u, h, R) {
|
|
3056
|
+
return a.validate(a.options, u, h, R);
|
|
3041
3057
|
}
|
|
3042
|
-
var
|
|
3043
|
-
$eq: g(function(a,
|
|
3044
|
-
return a(
|
|
3058
|
+
var x = {
|
|
3059
|
+
$eq: g(function(a, u) {
|
|
3060
|
+
return a(u);
|
|
3045
3061
|
}),
|
|
3046
|
-
$ne:
|
|
3047
|
-
return a(
|
|
3062
|
+
$ne: O(function(a, u) {
|
|
3063
|
+
return a(u);
|
|
3048
3064
|
}),
|
|
3049
|
-
$gt: g(function(a,
|
|
3050
|
-
return a(
|
|
3065
|
+
$gt: g(function(a, u) {
|
|
3066
|
+
return a(u);
|
|
3051
3067
|
}),
|
|
3052
|
-
$gte: g(function(a,
|
|
3053
|
-
return a(
|
|
3068
|
+
$gte: g(function(a, u) {
|
|
3069
|
+
return a(u);
|
|
3054
3070
|
}),
|
|
3055
|
-
$lt: g(function(a,
|
|
3056
|
-
return a(
|
|
3071
|
+
$lt: g(function(a, u) {
|
|
3072
|
+
return a(u);
|
|
3057
3073
|
}),
|
|
3058
|
-
$lte: g(function(a,
|
|
3059
|
-
return a(
|
|
3074
|
+
$lte: g(function(a, u) {
|
|
3075
|
+
return a(u);
|
|
3060
3076
|
}),
|
|
3061
|
-
$mod: g(function(a,
|
|
3062
|
-
return a(
|
|
3077
|
+
$mod: g(function(a, u) {
|
|
3078
|
+
return a(u);
|
|
3063
3079
|
}),
|
|
3064
|
-
$in: function(a,
|
|
3065
|
-
return a(
|
|
3080
|
+
$in: function(a, u) {
|
|
3081
|
+
return a(u);
|
|
3066
3082
|
},
|
|
3067
|
-
$nin: function(a,
|
|
3068
|
-
return a(
|
|
3083
|
+
$nin: function(a, u) {
|
|
3084
|
+
return a(u);
|
|
3069
3085
|
},
|
|
3070
|
-
$not: function(a,
|
|
3071
|
-
return a(
|
|
3086
|
+
$not: function(a, u, h, R) {
|
|
3087
|
+
return a(u, h, R);
|
|
3072
3088
|
},
|
|
3073
|
-
$type: function(a,
|
|
3074
|
-
return a(
|
|
3089
|
+
$type: function(a, u) {
|
|
3090
|
+
return a(u);
|
|
3075
3091
|
},
|
|
3076
|
-
$all: function(a,
|
|
3077
|
-
return
|
|
3092
|
+
$all: function(a, u, h, R) {
|
|
3093
|
+
return x.$and(a, u, h, R);
|
|
3078
3094
|
},
|
|
3079
|
-
$size: function(a,
|
|
3080
|
-
return !!
|
|
3095
|
+
$size: function(a, u) {
|
|
3096
|
+
return !!u && a === u.length;
|
|
3081
3097
|
},
|
|
3082
|
-
$or: function(a,
|
|
3098
|
+
$or: function(a, u, h, R) {
|
|
3083
3099
|
for (var S = 0, m = a.length; S < m; S++)
|
|
3084
|
-
if (c(
|
|
3100
|
+
if (c(l(a, S), u, h, R))
|
|
3085
3101
|
return !0;
|
|
3086
3102
|
return !1;
|
|
3087
3103
|
},
|
|
3088
|
-
$nor: function(a,
|
|
3089
|
-
return !
|
|
3104
|
+
$nor: function(a, u, h, R) {
|
|
3105
|
+
return !x.$or(a, u, h, R);
|
|
3090
3106
|
},
|
|
3091
|
-
$and: function(a,
|
|
3107
|
+
$and: function(a, u, h, R) {
|
|
3092
3108
|
for (var S = 0, m = a.length; S < m; S++)
|
|
3093
|
-
if (!c(
|
|
3109
|
+
if (!c(l(a, S), u, h, R))
|
|
3094
3110
|
return !1;
|
|
3095
3111
|
return !0;
|
|
3096
3112
|
},
|
|
3097
|
-
$regex: g(function(a,
|
|
3098
|
-
return typeof
|
|
3113
|
+
$regex: g(function(a, u) {
|
|
3114
|
+
return typeof u == "string" && a.test(u);
|
|
3099
3115
|
}),
|
|
3100
|
-
$where: function(a,
|
|
3101
|
-
return a.call(
|
|
3116
|
+
$where: function(a, u, h, R) {
|
|
3117
|
+
return a.call(u, u, h, R);
|
|
3102
3118
|
},
|
|
3103
|
-
$elemMatch: function(a,
|
|
3104
|
-
return f(
|
|
3119
|
+
$elemMatch: function(a, u, h, R) {
|
|
3120
|
+
return f(u) ? !!~function(S, m) {
|
|
3105
3121
|
for (var p = 0; p < S.length; p++)
|
|
3106
|
-
if (
|
|
3122
|
+
if (l(S, p), c(m, l(S, p)))
|
|
3107
3123
|
return p;
|
|
3108
3124
|
return -1;
|
|
3109
|
-
}(
|
|
3125
|
+
}(u, a) : c(a, u, h, R);
|
|
3110
3126
|
},
|
|
3111
|
-
$exists: function(a,
|
|
3127
|
+
$exists: function(a, u, h, R) {
|
|
3112
3128
|
return R.hasOwnProperty(h) === a;
|
|
3113
3129
|
}
|
|
3114
|
-
},
|
|
3115
|
-
$eq: function(a,
|
|
3130
|
+
}, v = {
|
|
3131
|
+
$eq: function(a, u, h) {
|
|
3116
3132
|
var R = h.comparable, S = h.compare;
|
|
3117
3133
|
return a instanceof RegExp ? g(function(m) {
|
|
3118
3134
|
return typeof m == "string" && a.test(m);
|
|
@@ -3126,31 +3142,31 @@ var Ir = { exports: {} };
|
|
|
3126
3142
|
}
|
|
3127
3143
|
);
|
|
3128
3144
|
},
|
|
3129
|
-
$gt: function(a,
|
|
3145
|
+
$gt: function(a, u, h) {
|
|
3130
3146
|
var R = h.comparable, S = h.compare;
|
|
3131
3147
|
return function(m) {
|
|
3132
3148
|
return S(R(m), R(a)) > 0;
|
|
3133
3149
|
};
|
|
3134
3150
|
},
|
|
3135
|
-
$gte: function(a,
|
|
3151
|
+
$gte: function(a, u, h) {
|
|
3136
3152
|
var R = h.comparable, S = h.compare;
|
|
3137
3153
|
return function(m) {
|
|
3138
3154
|
return S(R(m), R(a)) >= 0;
|
|
3139
3155
|
};
|
|
3140
3156
|
},
|
|
3141
|
-
$lt: function(a,
|
|
3157
|
+
$lt: function(a, u, h) {
|
|
3142
3158
|
var R = h.comparable, S = h.compare;
|
|
3143
3159
|
return function(m) {
|
|
3144
3160
|
return S(R(m), R(a)) < 0;
|
|
3145
3161
|
};
|
|
3146
3162
|
},
|
|
3147
|
-
$lte: function(a,
|
|
3163
|
+
$lte: function(a, u, h) {
|
|
3148
3164
|
var R = h.comparable, S = h.compare;
|
|
3149
3165
|
return function(m) {
|
|
3150
3166
|
return S(R(m), R(a)) <= 0;
|
|
3151
3167
|
};
|
|
3152
3168
|
},
|
|
3153
|
-
$in: function(a,
|
|
3169
|
+
$in: function(a, u, h) {
|
|
3154
3170
|
var R = h.comparable;
|
|
3155
3171
|
return function(S) {
|
|
3156
3172
|
if (!(S instanceof Array)) {
|
|
@@ -3166,60 +3182,60 @@ var Ir = { exports: {} };
|
|
|
3166
3182
|
return !0;
|
|
3167
3183
|
}
|
|
3168
3184
|
for (E = a.length; E--; ) {
|
|
3169
|
-
var p = c(J(
|
|
3185
|
+
var p = c(J(l(a, E), h), m, E, a);
|
|
3170
3186
|
if (p && String(p) !== "[object Object]" && String(m) !== "[object Object]")
|
|
3171
3187
|
return !0;
|
|
3172
3188
|
}
|
|
3173
3189
|
return !!~a.indexOf(m);
|
|
3174
3190
|
}
|
|
3175
3191
|
for (var E = S.length; E--; )
|
|
3176
|
-
if (~a.indexOf(R(
|
|
3192
|
+
if (~a.indexOf(R(l(S, E))))
|
|
3177
3193
|
return !0;
|
|
3178
3194
|
return !1;
|
|
3179
3195
|
};
|
|
3180
3196
|
},
|
|
3181
|
-
$nin: function(a,
|
|
3182
|
-
var R =
|
|
3197
|
+
$nin: function(a, u, h) {
|
|
3198
|
+
var R = v.$in(a, u, h);
|
|
3183
3199
|
return function(S, m, p, E) {
|
|
3184
3200
|
return !R(S, m, p, E);
|
|
3185
3201
|
};
|
|
3186
3202
|
},
|
|
3187
3203
|
$mod: function(a) {
|
|
3188
|
-
return function(
|
|
3189
|
-
return
|
|
3204
|
+
return function(u) {
|
|
3205
|
+
return u % a[0] == a[1];
|
|
3190
3206
|
};
|
|
3191
3207
|
},
|
|
3192
|
-
$ne: function(a,
|
|
3193
|
-
var R =
|
|
3194
|
-
return
|
|
3208
|
+
$ne: function(a, u, h) {
|
|
3209
|
+
var R = v.$eq(a, u, h);
|
|
3210
|
+
return O(function(S, m, p, E) {
|
|
3195
3211
|
return !R(S, m, p, E);
|
|
3196
3212
|
});
|
|
3197
3213
|
},
|
|
3198
|
-
$and: function(a,
|
|
3199
|
-
return a.map(
|
|
3214
|
+
$and: function(a, u, h) {
|
|
3215
|
+
return a.map(A(h));
|
|
3200
3216
|
},
|
|
3201
|
-
$all: function(a,
|
|
3202
|
-
return
|
|
3217
|
+
$all: function(a, u, h) {
|
|
3218
|
+
return v.$and(a, u, h);
|
|
3203
3219
|
},
|
|
3204
|
-
$or: function(a,
|
|
3205
|
-
return a.map(
|
|
3220
|
+
$or: function(a, u, h) {
|
|
3221
|
+
return a.map(A(h));
|
|
3206
3222
|
},
|
|
3207
|
-
$nor: function(a,
|
|
3208
|
-
return a.map(
|
|
3223
|
+
$nor: function(a, u, h) {
|
|
3224
|
+
return a.map(A(h));
|
|
3209
3225
|
},
|
|
3210
|
-
$not: function(a,
|
|
3211
|
-
var R =
|
|
3226
|
+
$not: function(a, u, h) {
|
|
3227
|
+
var R = A(h)(a);
|
|
3212
3228
|
return function(S, m, p) {
|
|
3213
3229
|
return !c(R, S, m, p);
|
|
3214
3230
|
};
|
|
3215
3231
|
},
|
|
3216
3232
|
$type: function(a) {
|
|
3217
|
-
return function(
|
|
3218
|
-
return
|
|
3233
|
+
return function(u, h, R) {
|
|
3234
|
+
return u != null && (u instanceof a || u.constructor == a);
|
|
3219
3235
|
};
|
|
3220
3236
|
},
|
|
3221
|
-
$regex: function(a,
|
|
3222
|
-
return new RegExp(a,
|
|
3237
|
+
$regex: function(a, u) {
|
|
3238
|
+
return new RegExp(a, u.$options);
|
|
3223
3239
|
},
|
|
3224
3240
|
$where: function(a) {
|
|
3225
3241
|
if (typeof a == "function")
|
|
@@ -3228,118 +3244,118 @@ var Ir = { exports: {} };
|
|
|
3228
3244
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
3229
3245
|
);
|
|
3230
3246
|
},
|
|
3231
|
-
$elemMatch: function(a,
|
|
3232
|
-
return
|
|
3247
|
+
$elemMatch: function(a, u, h) {
|
|
3248
|
+
return A(h)(a);
|
|
3233
3249
|
},
|
|
3234
3250
|
$exists: function(a) {
|
|
3235
3251
|
return !!a;
|
|
3236
3252
|
}
|
|
3237
3253
|
};
|
|
3238
|
-
function y(a,
|
|
3239
|
-
return { options: a, validate:
|
|
3254
|
+
function y(a, u) {
|
|
3255
|
+
return { options: a, validate: u };
|
|
3240
3256
|
}
|
|
3241
|
-
function k(a,
|
|
3257
|
+
function k(a, u) {
|
|
3242
3258
|
var h = a.keyPath, R = a.child, S = a.query, m = [];
|
|
3243
|
-
if (function w(
|
|
3244
|
-
if (X === U.length ||
|
|
3245
|
-
return void
|
|
3246
|
-
var Q =
|
|
3247
|
-
if (f(
|
|
3248
|
-
for (var z = 0, we =
|
|
3249
|
-
w(
|
|
3259
|
+
if (function w(T, U, X, H, M) {
|
|
3260
|
+
if (X === U.length || T == null)
|
|
3261
|
+
return void M.push([T, U[X - 1], H]);
|
|
3262
|
+
var Q = l(U, X);
|
|
3263
|
+
if (f(T) && isNaN(Number(Q)))
|
|
3264
|
+
for (var z = 0, we = T.length; z < we; z++)
|
|
3265
|
+
w(l(T, z), U, X, T, M);
|
|
3250
3266
|
else
|
|
3251
|
-
w(
|
|
3252
|
-
}(
|
|
3267
|
+
w(l(T, Q), U, X + 1, T, M);
|
|
3268
|
+
}(u, h, 0, u, m), m.length === 1) {
|
|
3253
3269
|
var p = m[0];
|
|
3254
3270
|
return c(R, p[0], p[1], p[2]);
|
|
3255
3271
|
}
|
|
3256
|
-
for (var E = S && S.$ne !== void 0,
|
|
3257
|
-
var P = m[
|
|
3258
|
-
E ?
|
|
3272
|
+
for (var E = S && S.$ne !== void 0, I = E, N = 0; N < m.length; N++) {
|
|
3273
|
+
var P = m[N], C = c(R, P[0], P[1], P[2]);
|
|
3274
|
+
E ? I &= C : I |= C;
|
|
3259
3275
|
}
|
|
3260
|
-
return
|
|
3276
|
+
return I;
|
|
3261
3277
|
}
|
|
3262
|
-
function V(a,
|
|
3263
|
-
return y({ keyPath: a, child:
|
|
3278
|
+
function V(a, u, h) {
|
|
3279
|
+
return y({ keyPath: a, child: u, query: h }, k);
|
|
3264
3280
|
}
|
|
3265
|
-
function
|
|
3266
|
-
var
|
|
3281
|
+
function A(a) {
|
|
3282
|
+
var u = a.comparable, h = a.expressions, R = function(p) {
|
|
3267
3283
|
var E;
|
|
3268
3284
|
return (!p || !(E = p) || E.constructor !== Object && E.constructor !== Array && E.constructor.toString() !== "function Object() { [native code] }" && E.constructor.toString() !== "function Array() { [native code] }" || E.toJSON) && (p = { $eq: p }), p;
|
|
3269
3285
|
}, S = function(p) {
|
|
3270
|
-
p =
|
|
3286
|
+
p = u(p);
|
|
3271
3287
|
var E = [];
|
|
3272
|
-
for (var
|
|
3273
|
-
var
|
|
3274
|
-
if (
|
|
3275
|
-
var P =
|
|
3288
|
+
for (var I in p) {
|
|
3289
|
+
var N = p[I];
|
|
3290
|
+
if (I !== "$options") {
|
|
3291
|
+
var P = x[I] || a && h && h[I];
|
|
3276
3292
|
if (P)
|
|
3277
|
-
|
|
3293
|
+
v[I] && (N = v[I](N, p, a)), E.push(y(u(N), P));
|
|
3278
3294
|
else {
|
|
3279
|
-
if (
|
|
3280
|
-
throw new Error("Unknown operation " +
|
|
3281
|
-
var
|
|
3282
|
-
E.push(V(
|
|
3295
|
+
if (I.charCodeAt(0) === 36)
|
|
3296
|
+
throw new Error("Unknown operation " + I);
|
|
3297
|
+
var C = I.split(".");
|
|
3298
|
+
E.push(V(C, m(N), N));
|
|
3283
3299
|
}
|
|
3284
3300
|
}
|
|
3285
3301
|
}
|
|
3286
|
-
return E.length === 1 ? E[0] : y(E,
|
|
3302
|
+
return E.length === 1 ? E[0] : y(E, x.$and);
|
|
3287
3303
|
}, m = function(p) {
|
|
3288
|
-
return p = R(p), function E(
|
|
3289
|
-
if (!d(
|
|
3290
|
-
return
|
|
3291
|
-
for (var P in
|
|
3292
|
-
|
|
3293
|
-
return
|
|
3294
|
-
}(p, []).join(",").search(/[$.]/) === -1 ? y(p,
|
|
3304
|
+
return p = R(p), function E(I, N) {
|
|
3305
|
+
if (!d(I))
|
|
3306
|
+
return N;
|
|
3307
|
+
for (var P in I)
|
|
3308
|
+
N.push(P), E(I[P], N);
|
|
3309
|
+
return N;
|
|
3310
|
+
}(p, []).join(",").search(/[$.]/) === -1 ? y(p, F) : S(p);
|
|
3295
3311
|
};
|
|
3296
3312
|
return function(p) {
|
|
3297
3313
|
return S(R(p));
|
|
3298
3314
|
};
|
|
3299
3315
|
}
|
|
3300
|
-
function
|
|
3301
|
-
if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(
|
|
3316
|
+
function F(a, u) {
|
|
3317
|
+
if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(u))
|
|
3302
3318
|
return !1;
|
|
3303
3319
|
if (d(a)) {
|
|
3304
|
-
if (Object.keys(a).length !== Object.keys(
|
|
3320
|
+
if (Object.keys(a).length !== Object.keys(u).length)
|
|
3305
3321
|
return !1;
|
|
3306
3322
|
for (var h in a)
|
|
3307
|
-
if (!
|
|
3323
|
+
if (!F(a[h], u[h]))
|
|
3308
3324
|
return !1;
|
|
3309
3325
|
return !0;
|
|
3310
3326
|
}
|
|
3311
3327
|
if (f(a)) {
|
|
3312
|
-
if (a.length !==
|
|
3328
|
+
if (a.length !== u.length)
|
|
3313
3329
|
return !1;
|
|
3314
3330
|
for (var R = 0, S = a.length; R < S; R++)
|
|
3315
|
-
if (!
|
|
3331
|
+
if (!F(a[R], u[R]))
|
|
3316
3332
|
return !1;
|
|
3317
3333
|
return !0;
|
|
3318
3334
|
}
|
|
3319
|
-
return a ===
|
|
3335
|
+
return a === u;
|
|
3320
3336
|
}
|
|
3321
|
-
function J(a,
|
|
3322
|
-
var h =
|
|
3323
|
-
return
|
|
3337
|
+
function J(a, u) {
|
|
3338
|
+
var h = A(u)(a);
|
|
3339
|
+
return u && u.select && (h = {
|
|
3324
3340
|
options: h,
|
|
3325
3341
|
validate: function(R, S, m, p) {
|
|
3326
|
-
return c(R, S &&
|
|
3342
|
+
return c(R, S && u.select(S), m, p);
|
|
3327
3343
|
}
|
|
3328
3344
|
}), h;
|
|
3329
3345
|
}
|
|
3330
|
-
function Z(a,
|
|
3331
|
-
var h = J(a,
|
|
3346
|
+
function Z(a, u) {
|
|
3347
|
+
var h = J(a, u = Object.assign({ compare: D, comparable: W }, u));
|
|
3332
3348
|
return function(R, S, m) {
|
|
3333
3349
|
return c(h, R, S, m);
|
|
3334
3350
|
};
|
|
3335
3351
|
}
|
|
3336
|
-
function D(a,
|
|
3337
|
-
if (
|
|
3352
|
+
function D(a, u) {
|
|
3353
|
+
if (F(a, u))
|
|
3338
3354
|
return 0;
|
|
3339
|
-
if (o(a) === o(
|
|
3340
|
-
if (a >
|
|
3355
|
+
if (o(a) === o(u)) {
|
|
3356
|
+
if (a > u)
|
|
3341
3357
|
return 1;
|
|
3342
|
-
if (a <
|
|
3358
|
+
if (a < u)
|
|
3343
3359
|
return -1;
|
|
3344
3360
|
}
|
|
3345
3361
|
}
|
|
@@ -3364,15 +3380,15 @@ function di(t, e, r) {
|
|
|
3364
3380
|
function fi(t, e) {
|
|
3365
3381
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
|
|
3366
3382
|
}
|
|
3367
|
-
function
|
|
3368
|
-
return
|
|
3383
|
+
function ut(t) {
|
|
3384
|
+
return ut = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
|
|
3369
3385
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
3370
|
-
},
|
|
3386
|
+
}, ut(t);
|
|
3371
3387
|
}
|
|
3372
|
-
function
|
|
3373
|
-
return
|
|
3388
|
+
function Ge(t, e) {
|
|
3389
|
+
return Ge = Object.setPrototypeOf || function(n, s) {
|
|
3374
3390
|
return n.__proto__ = s, n;
|
|
3375
|
-
},
|
|
3391
|
+
}, Ge(t, e);
|
|
3376
3392
|
}
|
|
3377
3393
|
function mi() {
|
|
3378
3394
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
@@ -3386,20 +3402,20 @@ function mi() {
|
|
|
3386
3402
|
return !1;
|
|
3387
3403
|
}
|
|
3388
3404
|
}
|
|
3389
|
-
function
|
|
3390
|
-
return mi() ?
|
|
3405
|
+
function Fe(t, e, r) {
|
|
3406
|
+
return mi() ? Fe = Reflect.construct : Fe = function(s, o, i) {
|
|
3391
3407
|
var f = [null];
|
|
3392
3408
|
f.push.apply(f, o);
|
|
3393
|
-
var d = Function.bind.apply(s, f),
|
|
3394
|
-
return i &&
|
|
3395
|
-
},
|
|
3409
|
+
var d = Function.bind.apply(s, f), b = new d();
|
|
3410
|
+
return i && Ge(b, i.prototype), b;
|
|
3411
|
+
}, Fe.apply(null, arguments);
|
|
3396
3412
|
}
|
|
3397
3413
|
function pi(t) {
|
|
3398
3414
|
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
3399
3415
|
}
|
|
3400
|
-
function
|
|
3416
|
+
function ct(t) {
|
|
3401
3417
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
3402
|
-
return
|
|
3418
|
+
return ct = function(n) {
|
|
3403
3419
|
if (n === null || !pi(n))
|
|
3404
3420
|
return n;
|
|
3405
3421
|
if (typeof n != "function")
|
|
@@ -3410,7 +3426,7 @@ function lt(t) {
|
|
|
3410
3426
|
e.set(n, s);
|
|
3411
3427
|
}
|
|
3412
3428
|
function s() {
|
|
3413
|
-
return
|
|
3429
|
+
return Fe(n, arguments, ut(this).constructor);
|
|
3414
3430
|
}
|
|
3415
3431
|
return s.prototype = Object.create(n.prototype, {
|
|
3416
3432
|
constructor: {
|
|
@@ -3419,8 +3435,8 @@ function lt(t) {
|
|
|
3419
3435
|
writable: !0,
|
|
3420
3436
|
configurable: !0
|
|
3421
3437
|
}
|
|
3422
|
-
}),
|
|
3423
|
-
},
|
|
3438
|
+
}), Ge(s, n);
|
|
3439
|
+
}, ct(t);
|
|
3424
3440
|
}
|
|
3425
3441
|
function or(t) {
|
|
3426
3442
|
if (t === void 0)
|
|
@@ -3429,9 +3445,9 @@ function or(t) {
|
|
|
3429
3445
|
}
|
|
3430
3446
|
var Ar = function(e) {
|
|
3431
3447
|
return 'Cannot execute "' + e.action + '" on "' + e.subjectName + '"';
|
|
3432
|
-
},
|
|
3448
|
+
}, Ve = Ar, hi = /* @__PURE__ */ function(t) {
|
|
3433
3449
|
fi(e, t), e.setDefaultMessage = function(s) {
|
|
3434
|
-
s === null ?
|
|
3450
|
+
s === null ? Ve = Ar : Ve = typeof s == "string" ? function() {
|
|
3435
3451
|
return s;
|
|
3436
3452
|
} : s;
|
|
3437
3453
|
}, e.from = function(s) {
|
|
@@ -3442,7 +3458,7 @@ var Ar = function(e) {
|
|
|
3442
3458
|
};
|
|
3443
3459
|
function e(n, s) {
|
|
3444
3460
|
var o;
|
|
3445
|
-
return s === void 0 && (s = {}), o = t.call(this, n) || this, o._setMetadata(s), o.message = n ||
|
|
3461
|
+
return s === void 0 && (s = {}), o = t.call(this, n) || this, o._setMetadata(s), o.message = n || Ve(or(o)), o._customMessage = null, typeof Error.captureStackTrace == "function" && (o.name = o.constructor.name, Error.captureStackTrace(or(o), o.constructor)), o;
|
|
3446
3462
|
}
|
|
3447
3463
|
var r = e.prototype;
|
|
3448
3464
|
return r.setMessage = function(s) {
|
|
@@ -3459,13 +3475,13 @@ var Ar = function(e) {
|
|
|
3459
3475
|
subjectName: this.ability.subjectName(o)
|
|
3460
3476
|
});
|
|
3461
3477
|
var d = f ? f.reason : "";
|
|
3462
|
-
throw this.message = this._customMessage || d ||
|
|
3478
|
+
throw this.message = this._customMessage || d || Ve(this), this;
|
|
3463
3479
|
}
|
|
3464
3480
|
}, r._setMetadata = function(s) {
|
|
3465
3481
|
this.subject = s.subject, this.subjectName = s.subjectName, this.action = s.action, this.field = s.field;
|
|
3466
3482
|
}, e;
|
|
3467
|
-
}(
|
|
3468
|
-
function
|
|
3483
|
+
}(ct(Error));
|
|
3484
|
+
function dt(t) {
|
|
3469
3485
|
return Array.isArray(t) ? t : [t];
|
|
3470
3486
|
}
|
|
3471
3487
|
function vi(t) {
|
|
@@ -3493,7 +3509,7 @@ function Ri(t) {
|
|
|
3493
3509
|
}
|
|
3494
3510
|
var Ii = /* @__PURE__ */ function() {
|
|
3495
3511
|
function t(r) {
|
|
3496
|
-
this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 :
|
|
3512
|
+
this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 : dt(r.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
3497
3513
|
writable: !0
|
|
3498
3514
|
}), this.inverted = !!r.inverted, this.conditions = r.conditions, Object.defineProperty(this, "_matches", {
|
|
3499
3515
|
writable: !0,
|
|
@@ -3548,14 +3564,14 @@ var Ai = /* @__PURE__ */ function() {
|
|
|
3548
3564
|
return process.env.NODE_ENV !== "production" && o.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[se].indexedRules = o.rules, this[se].hasPerFieldRules = o.hasPerFieldRules, this.emit("updated", s), this;
|
|
3549
3565
|
}, e.buildIndexFor = function(n) {
|
|
3550
3566
|
for (var s = /* @__PURE__ */ Object.create(null), o = this[se].RuleType, i = !0, f = !1, d = 0; d < n.length; d++) {
|
|
3551
|
-
var
|
|
3552
|
-
i = !!(i &&
|
|
3567
|
+
var b = new o(n[d]), l = this.expandActions(b.actions), g = dt(b.subject), O = n.length - d - 1;
|
|
3568
|
+
i = !!(i && b.inverted), !f && b.fields && (f = !0);
|
|
3553
3569
|
for (var c = 0; c < g.length; c++) {
|
|
3554
|
-
var
|
|
3555
|
-
s[
|
|
3556
|
-
for (var
|
|
3557
|
-
var y = v
|
|
3558
|
-
s[
|
|
3570
|
+
var x = g[c];
|
|
3571
|
+
s[x] = s[x] || /* @__PURE__ */ Object.create(null);
|
|
3572
|
+
for (var v = 0; v < l.length; v++) {
|
|
3573
|
+
var y = l[v];
|
|
3574
|
+
s[x][y] = s[x][y] || /* @__PURE__ */ Object.create(null), s[x][y][O] = b;
|
|
3559
3575
|
}
|
|
3560
3576
|
}
|
|
3561
3577
|
}
|
|
@@ -3565,7 +3581,7 @@ var Ai = /* @__PURE__ */ function() {
|
|
|
3565
3581
|
rules: s
|
|
3566
3582
|
};
|
|
3567
3583
|
}, e.expandActions = function(n) {
|
|
3568
|
-
for (var s = this[se].aliases, o =
|
|
3584
|
+
for (var s = this[se].aliases, o = dt(n), i = 0; i < o.length; ) {
|
|
3569
3585
|
var f = o[i++];
|
|
3570
3586
|
s.hasOwnProperty(f) && (o = o.concat(s[f]));
|
|
3571
3587
|
}
|
|
@@ -3585,8 +3601,8 @@ var Ai = /* @__PURE__ */ function() {
|
|
|
3585
3601
|
return i[f] || (i[f] = this.mergeRulesFor(n, o)), i[f];
|
|
3586
3602
|
}, e.mergeRulesFor = function(n, s) {
|
|
3587
3603
|
var o = this[se].indexedRules, i = [s, "all"].reduce(function(f, d) {
|
|
3588
|
-
var
|
|
3589
|
-
return
|
|
3604
|
+
var b = o[d];
|
|
3605
|
+
return b ? Object.assign(f, b[n], b.manage) : f;
|
|
3590
3606
|
}, []);
|
|
3591
3607
|
return i.filter(Boolean);
|
|
3592
3608
|
}, e.rulesFor = function(n, s, o) {
|
|
@@ -3665,19 +3681,19 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3665
3681
|
__name: "Business",
|
|
3666
3682
|
setup(t) {
|
|
3667
3683
|
const { searchKey: e, filter: r } = li(), { copyTextToClipboard: n } = cr(), s = ur(), o = Y(() => s.breakpoints.value.xs), { t: i } = ve(), f = Y(() => {
|
|
3668
|
-
const { currentBusiness:
|
|
3684
|
+
const { currentBusiness: x, restaurants: v } = pe(), y = x.value;
|
|
3669
3685
|
if (!y)
|
|
3670
3686
|
return null;
|
|
3671
|
-
const { id: k, name: V, thumbnail:
|
|
3687
|
+
const { id: k, name: V, thumbnail: A, url: F } = y, J = v.value.filter((D) => D.managable).map((D) => {
|
|
3672
3688
|
var p;
|
|
3673
|
-
const { _id: W, profile: a } = D, { name:
|
|
3689
|
+
const { _id: W, profile: a } = D, { name: u, email: h, phoneNo: R, address: S, sstRegNo: m } = {
|
|
3674
3690
|
...a,
|
|
3675
3691
|
address: Oe(a.address)
|
|
3676
3692
|
};
|
|
3677
3693
|
return {
|
|
3678
3694
|
id: W,
|
|
3679
3695
|
code: ((p = D.profile) == null ? void 0 : p.code) || "--",
|
|
3680
|
-
name:
|
|
3696
|
+
name: u,
|
|
3681
3697
|
email: h,
|
|
3682
3698
|
phone: R,
|
|
3683
3699
|
address: S.formatted,
|
|
@@ -3688,12 +3704,12 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3688
3704
|
return {
|
|
3689
3705
|
id: k,
|
|
3690
3706
|
name: V,
|
|
3691
|
-
thumbnail:
|
|
3692
|
-
url: `https://feedmedev.cc/${
|
|
3707
|
+
thumbnail: A,
|
|
3708
|
+
url: `https://feedmedev.cc/${F || k}`,
|
|
3693
3709
|
doc: y,
|
|
3694
|
-
canCreateRestaurant: Oi(y,
|
|
3710
|
+
canCreateRestaurant: Oi(y, v.value),
|
|
3695
3711
|
restaurants: J.filter(
|
|
3696
|
-
({ code: D, name: W, address: a, phone:
|
|
3712
|
+
({ code: D, name: W, address: a, phone: u, email: h }) => r([D, W, a, u, h])
|
|
3697
3713
|
)
|
|
3698
3714
|
};
|
|
3699
3715
|
}), d = Y(() => [
|
|
@@ -3726,68 +3742,68 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3726
3742
|
{
|
|
3727
3743
|
header: i("settings.business.restaurant.tax.title"),
|
|
3728
3744
|
enableSorting: !1,
|
|
3729
|
-
cell: (
|
|
3745
|
+
cell: (x) => {
|
|
3730
3746
|
var y;
|
|
3731
|
-
const
|
|
3732
|
-
return (y =
|
|
3747
|
+
const v = x.row.original;
|
|
3748
|
+
return (y = v.doc.profile.sstRegNo) != null && y.length ? v.doc.profile.sstRegNo : i("settings.business.restaurant.tax.not_set");
|
|
3733
3749
|
}
|
|
3734
3750
|
},
|
|
3735
3751
|
{
|
|
3736
3752
|
id: "action",
|
|
3737
3753
|
header: "",
|
|
3738
3754
|
size: 80,
|
|
3739
|
-
cell: (
|
|
3740
|
-
const
|
|
3755
|
+
cell: (x) => {
|
|
3756
|
+
const v = x.row.original;
|
|
3741
3757
|
return Kr([
|
|
3742
3758
|
{
|
|
3743
3759
|
name: "edit",
|
|
3744
|
-
onClick: () => c(
|
|
3760
|
+
onClick: () => c(v)
|
|
3745
3761
|
},
|
|
3746
3762
|
{
|
|
3747
3763
|
name: "file_copy",
|
|
3748
3764
|
onClick: () => {
|
|
3749
|
-
n(
|
|
3765
|
+
n(v.id);
|
|
3750
3766
|
}
|
|
3751
3767
|
}
|
|
3752
3768
|
]);
|
|
3753
3769
|
}
|
|
3754
3770
|
}
|
|
3755
3771
|
]);
|
|
3756
|
-
function
|
|
3757
|
-
var
|
|
3758
|
-
n(((
|
|
3772
|
+
function b() {
|
|
3773
|
+
var x;
|
|
3774
|
+
n(((x = f.value) == null ? void 0 : x.url) || "");
|
|
3759
3775
|
}
|
|
3760
|
-
function
|
|
3776
|
+
function l() {
|
|
3761
3777
|
if (!f.value)
|
|
3762
3778
|
return;
|
|
3763
|
-
const { name:
|
|
3764
|
-
|
|
3779
|
+
const { name: x, url: v, thumbnail: y } = f.value.doc;
|
|
3780
|
+
Ye(g, vn, {
|
|
3765
3781
|
businessId: f.value.id,
|
|
3766
3782
|
initialValue: {
|
|
3767
|
-
name:
|
|
3768
|
-
url:
|
|
3783
|
+
name: x,
|
|
3784
|
+
url: v,
|
|
3769
3785
|
thumbnail: y
|
|
3770
3786
|
}
|
|
3771
3787
|
});
|
|
3772
3788
|
}
|
|
3773
3789
|
const g = Fr();
|
|
3774
|
-
function
|
|
3775
|
-
|
|
3790
|
+
function O() {
|
|
3791
|
+
Ye(g, sr, {
|
|
3776
3792
|
enableFeedmeExpress: !1
|
|
3777
3793
|
});
|
|
3778
3794
|
}
|
|
3779
|
-
function c(
|
|
3780
|
-
var
|
|
3781
|
-
|
|
3782
|
-
restaurantId:
|
|
3783
|
-
restaurant:
|
|
3784
|
-
enableFeedmeExpress: ((
|
|
3795
|
+
function c(x) {
|
|
3796
|
+
var v;
|
|
3797
|
+
Ye(g, sr, {
|
|
3798
|
+
restaurantId: x.id,
|
|
3799
|
+
restaurant: x.doc,
|
|
3800
|
+
enableFeedmeExpress: ((v = x.doc.feedmeDelivery) == null ? void 0 : v.enable) || !1
|
|
3785
3801
|
});
|
|
3786
3802
|
}
|
|
3787
|
-
return (
|
|
3803
|
+
return (x, v) => {
|
|
3788
3804
|
var Z;
|
|
3789
|
-
const y = q("FmSpacer"), k = q("FmButton"), V = q("FmTooltip"),
|
|
3790
|
-
return
|
|
3805
|
+
const y = q("FmSpacer"), k = q("FmButton"), V = q("FmTooltip"), A = q("FmSearch"), F = q("FmTable"), J = q("FmCircularProgress");
|
|
3806
|
+
return j(), te(Br, {
|
|
3791
3807
|
heading: ((Z = f.value) == null ? void 0 : Z.name) || "--"
|
|
3792
3808
|
}, {
|
|
3793
3809
|
"sub-heading": K(() => {
|
|
@@ -3797,36 +3813,36 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3797
3813
|
$("span", null, G(_(i)("settings.business.url")) + ": ", 1),
|
|
3798
3814
|
$("span", {
|
|
3799
3815
|
class: "cursor-pointer xs:w-max-[200px] truncate",
|
|
3800
|
-
onClick:
|
|
3816
|
+
onClick: b
|
|
3801
3817
|
}, G((D = f.value) == null ? void 0 : D.url), 1)
|
|
3802
3818
|
])
|
|
3803
3819
|
];
|
|
3804
3820
|
}),
|
|
3805
3821
|
"append-heading": K(() => [
|
|
3806
3822
|
$("div", Pi, [
|
|
3807
|
-
|
|
3808
|
-
o.value ? (
|
|
3809
|
-
|
|
3810
|
-
onClick:
|
|
3823
|
+
L(y),
|
|
3824
|
+
o.value ? (j(), B(oe, { key: 1 }, [
|
|
3825
|
+
L(Gr, {
|
|
3826
|
+
onClick: O,
|
|
3811
3827
|
label: _(i)("settings.business.add_restaurant"),
|
|
3812
3828
|
"prepend-icon": "add"
|
|
3813
3829
|
}, null, 8, ["label"]),
|
|
3814
|
-
|
|
3830
|
+
L(tn, null, {
|
|
3815
3831
|
default: K(() => [
|
|
3816
|
-
|
|
3832
|
+
L(nn, {
|
|
3817
3833
|
label: _(i)("common.edit"),
|
|
3818
|
-
onClick:
|
|
3834
|
+
onClick: l
|
|
3819
3835
|
}, null, 8, ["label"])
|
|
3820
3836
|
]),
|
|
3821
3837
|
_: 1
|
|
3822
3838
|
})
|
|
3823
|
-
], 64)) : (
|
|
3824
|
-
|
|
3825
|
-
onClick:
|
|
3839
|
+
], 64)) : (j(), B("div", Ti, [
|
|
3840
|
+
L(k, {
|
|
3841
|
+
onClick: l,
|
|
3826
3842
|
variant: "secondary",
|
|
3827
3843
|
label: _(i)("common.edit")
|
|
3828
3844
|
}, null, 8, ["label"]),
|
|
3829
|
-
|
|
3845
|
+
L(V, {
|
|
3830
3846
|
variant: "rich",
|
|
3831
3847
|
placement: "left",
|
|
3832
3848
|
"z-index": 100
|
|
@@ -3834,7 +3850,7 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3834
3850
|
content: K(() => {
|
|
3835
3851
|
var D;
|
|
3836
3852
|
return [
|
|
3837
|
-
(D = f.value) != null && D.canCreateRestaurant ? ce("", !0) : (
|
|
3853
|
+
(D = f.value) != null && D.canCreateRestaurant ? ce("", !0) : (j(), B("div", Li, [
|
|
3838
3854
|
$("p", Ni, G(_(i)("settings.business.quota.limit_title")), 1),
|
|
3839
3855
|
$("p", null, G(_(i)("settings.business.quota.limit_message")), 1)
|
|
3840
3856
|
]))
|
|
@@ -3843,8 +3859,8 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3843
3859
|
default: K(() => {
|
|
3844
3860
|
var D;
|
|
3845
3861
|
return [
|
|
3846
|
-
|
|
3847
|
-
onClick:
|
|
3862
|
+
L(k, {
|
|
3863
|
+
onClick: O,
|
|
3848
3864
|
label: _(i)("settings.business.add_restaurant"),
|
|
3849
3865
|
disabled: !((D = f.value) != null && D.canCreateRestaurant),
|
|
3850
3866
|
"prepend-icon": "add"
|
|
@@ -3859,17 +3875,17 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3859
3875
|
default: K(() => {
|
|
3860
3876
|
var D, W;
|
|
3861
3877
|
return [
|
|
3862
|
-
o.value ? (
|
|
3863
|
-
|
|
3878
|
+
o.value ? (j(), B(oe, { key: 1 }, [
|
|
3879
|
+
L(A, {
|
|
3864
3880
|
class: "my-8 mx-16",
|
|
3865
3881
|
modelValue: _(e),
|
|
3866
|
-
"onUpdate:modelValue":
|
|
3882
|
+
"onUpdate:modelValue": v[2] || (v[2] = (a) => Pt(e) ? e.value = a : null),
|
|
3867
3883
|
placeholder: _(i)("settings.business.search_restaurants")
|
|
3868
3884
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
3869
3885
|
$("div", ki, [
|
|
3870
|
-
f.value ? (
|
|
3871
|
-
var
|
|
3872
|
-
return
|
|
3886
|
+
f.value ? (j(!0), B(oe, { key: 1 }, he((W = f.value) == null ? void 0 : W.restaurants, (a) => {
|
|
3887
|
+
var u;
|
|
3888
|
+
return j(), B("div", {
|
|
3873
3889
|
key: a.id,
|
|
3874
3890
|
class: "py-12 px-16 space-y-4",
|
|
3875
3891
|
onClick: (h) => c(a)
|
|
@@ -3877,43 +3893,43 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3877
3893
|
$("div", ji, [
|
|
3878
3894
|
$("div", Mi, G(a.name), 1),
|
|
3879
3895
|
$("div", Ui, [
|
|
3880
|
-
|
|
3896
|
+
L(k, {
|
|
3881
3897
|
icon: "edit",
|
|
3882
3898
|
"text-color": "neutral-gray-400",
|
|
3883
3899
|
variant: "tertiary",
|
|
3884
|
-
onClick:
|
|
3900
|
+
onClick: ot((h) => c(a), ["stop"])
|
|
3885
3901
|
}, null, 8, ["onClick"]),
|
|
3886
|
-
|
|
3902
|
+
L(k, {
|
|
3887
3903
|
icon: "file_copy",
|
|
3888
3904
|
"text-color": "neutral-gray-400",
|
|
3889
3905
|
variant: "tertiary",
|
|
3890
|
-
onClick:
|
|
3906
|
+
onClick: ot((h) => _(n)(a.id), ["stop"])
|
|
3891
3907
|
}, null, 8, ["onClick"])
|
|
3892
3908
|
])
|
|
3893
3909
|
]),
|
|
3894
3910
|
$("div", Di, G(_(i)("settings.business.restaurant.contact")) + ": " + G(a.phone), 1),
|
|
3895
3911
|
$("div", Gi, G(_(i)("settings.business.restaurant.email")) + ": " + G(a.email), 1),
|
|
3896
|
-
$("div", Bi, G(_(i)("settings.business.restaurant.tax.title")) + ": " + G((
|
|
3912
|
+
$("div", Bi, G(_(i)("settings.business.restaurant.tax.title")) + ": " + G((u = a.doc.profile.sstRegNo) != null && u.length ? a.doc.profile.sstRegNo : _(i)("settings.business.restaurant.tax.not_set")), 1)
|
|
3897
3913
|
], 8, Fi);
|
|
3898
|
-
}), 128)) : (
|
|
3899
|
-
|
|
3914
|
+
}), 128)) : (j(), B("div", Vi, [
|
|
3915
|
+
L(J, { size: "lg" })
|
|
3900
3916
|
]))
|
|
3901
3917
|
])
|
|
3902
|
-
], 64)) : (
|
|
3918
|
+
], 64)) : (j(), B("div", Ci, [
|
|
3903
3919
|
$("div", xi, [
|
|
3904
|
-
|
|
3920
|
+
L(A, {
|
|
3905
3921
|
class: "w-[320px]",
|
|
3906
3922
|
modelValue: _(e),
|
|
3907
|
-
"onUpdate:modelValue":
|
|
3923
|
+
"onUpdate:modelValue": v[0] || (v[0] = (a) => Pt(e) ? e.value = a : null),
|
|
3908
3924
|
placeholder: _(i)("settings.business.search_restaurants")
|
|
3909
3925
|
}, null, 8, ["modelValue", "placeholder"])
|
|
3910
3926
|
]),
|
|
3911
|
-
|
|
3927
|
+
L(F, {
|
|
3912
3928
|
"column-defs": d.value,
|
|
3913
3929
|
"row-data": ((D = f.value) == null ? void 0 : D.restaurants) || [],
|
|
3914
3930
|
"shrink-at": !1,
|
|
3915
3931
|
loading: !f.value,
|
|
3916
|
-
onRowClick:
|
|
3932
|
+
onRowClick: v[1] || (v[1] = (a) => c(a.original))
|
|
3917
3933
|
}, null, 8, ["column-defs", "row-data", "loading"])
|
|
3918
3934
|
]))
|
|
3919
3935
|
];
|