@ozdao/prometheus-framework 0.1.27 → 0.1.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/dist/Chips-493042f7.js +1 -0
  2. package/dist/Chips-9cf6c0da.mjs +286 -0
  3. package/dist/Feed-27f62b1c.mjs +368 -0
  4. package/dist/Feed-7c8c901a.mjs +380 -0
  5. package/dist/Feed-aee74095.js +1 -0
  6. package/dist/Feed-bfd7d1d9.js +1 -0
  7. package/dist/Image-1f7252c0.mjs +477 -0
  8. package/dist/Image-448f9228.js +9 -0
  9. package/dist/Product-3c9c8197.js +7 -0
  10. package/dist/Product-748ec8b7.mjs +842 -0
  11. package/dist/Product-852f952c.js +7 -0
  12. package/dist/Product-bbdc8460.mjs +841 -0
  13. package/dist/ProductEdit-17f4e395.mjs +304 -0
  14. package/dist/ProductEdit-4af06681.js +1 -0
  15. package/dist/ProductEdit-4f9b6d56.js +1 -0
  16. package/dist/ProductEdit-a1050ab6.mjs +303 -0
  17. package/dist/ProfileBlogposts-03d04b92.mjs +66 -0
  18. package/dist/ProfileBlogposts-f9312adf.js +1 -0
  19. package/dist/ProfileComments-6d863cd3.mjs +45 -0
  20. package/dist/ProfileComments-e6970923.js +1 -0
  21. package/dist/ProfileEvents-917169c6.mjs +58 -0
  22. package/dist/ProfileEvents-996bce18.js +1 -0
  23. package/dist/ProfileLikes-0402d1fb.js +1 -0
  24. package/dist/ProfileLikes-92196922.mjs +45 -0
  25. package/dist/auth.client.cjs +8 -8
  26. package/dist/auth.client.js +581 -602
  27. package/dist/auth.validation-2cdd2231.mjs +17 -0
  28. package/dist/auth.validation-30bb0efd.js +1 -0
  29. package/dist/community.client.cjs +1 -1
  30. package/dist/community.client.js +65 -65
  31. package/dist/components/CardFooter/CardFooter.vue.d.ts +1 -1
  32. package/dist/components/CardHeader/CardHeader.vue.d.ts +1 -1
  33. package/dist/events.client.cjs +2 -2
  34. package/dist/events.client.js +6 -6
  35. package/dist/legal.client.cjs +1 -1
  36. package/dist/legal.client.js +2596 -2567
  37. package/dist/modules/community/components/blocks/FooterBlogpost.vue.d.ts +1 -1
  38. package/dist/modules/community/components/sections/Feed.vue.d.ts +1 -1
  39. package/dist/modules/events/components/blocks/CardEvent.vue.d.ts +3 -3
  40. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -1
  41. package/dist/modules/events/components/sections/List.vue.d.ts +1 -1
  42. package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
  43. package/dist/modules/organizations/components/sections/Organizations.vue.d.ts +1 -1
  44. package/dist/organizations.client-13fc2cbe.js +3 -0
  45. package/dist/organizations.client-39196bef.mjs +3041 -0
  46. package/dist/organizations.client-85a2ae66.js +3 -0
  47. package/dist/organizations.client-91e84d4f.mjs +3022 -0
  48. package/dist/organizations.client.cjs +1 -1
  49. package/dist/organizations.client.js +43 -42
  50. package/dist/states.validation-766a62a6.mjs +13 -0
  51. package/dist/states.validation-92231934.js +1 -0
  52. package/dist/style.css +1 -1
  53. package/dist/users.client.cjs +1 -1
  54. package/dist/users.client.js +199 -194
  55. package/package.json +1 -1
  56. package/src/components/CardFooter/CardFooter.vue +27 -30
  57. package/src/components/CardHeader/CardHeader.vue +56 -3
  58. package/src/modules/auth/components/pages/SignIn.vue +2 -2
  59. package/src/modules/community/components/layouts/Community.vue +5 -5
  60. package/src/modules/events/components/blocks/CardEvent.vue +3 -2
  61. package/src/modules/events/components/pages/EditEvent.vue +1 -1
  62. package/src/modules/events/router/events.js +1 -0
  63. package/src/modules/legal/components/pages/Legal.vue +33 -17
  64. package/src/modules/legal/router/legal.js +51 -21
  65. package/src/modules/organizations/router/organizations.js +19 -0
  66. package/src/modules/users/router/users.js +36 -31
@@ -0,0 +1,3022 @@
1
+ import { computed as Z, resolveComponent as ue, openBlock as o, createElementBlock as r, Fragment as O, renderList as L, unref as k, normalizeClass as te, createCommentVNode as g, createBlock as $, withCtx as x, createTextVNode as W, toDisplayString as f, createElementVNode as a, Transition as H, createVNode as h, renderSlot as z, ref as v, reactive as oe, watch as T, onMounted as pe, pushScopeId as me, popScopeId as he, withAsyncContext as Y, withModifiers as re, watchEffect as de, resolveDirective as Ie, normalizeProps as V, guardReactiveProps as U, resolveDynamicComponent as le, mergeProps as ve, toHandlers as Ue, withDirectives as ae, vShow as ye, toRefs as Be, vModelText as we } from "vue";
2
+ import { useRoute as F, useRouter as q } from "vue-router";
3
+ import { useI18n as Ee } from "vue-i18n";
4
+ import { s as C } from "./globals-96ba60e4.mjs";
5
+ import { S as je, _ as Te, C as J } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-19e23006.mjs";
6
+ import { _ as Pe } from "./Tab-a243605d.mjs";
7
+ import { a as ge, B as Fe, m as qe, s as Re } from "./ButtonFollow-00d85977.mjs";
8
+ import { _ as Ze } from "./Feed-27f62b1c.mjs";
9
+ import { _ as He } from "./Feed-7c8c901a.mjs";
10
+ import { _ as Ne } from "./Socials-8193477c.mjs";
11
+ import { a as Ke, _ as We } from "./CardOrganization-3f4a13d3.mjs";
12
+ import { I as Ye, P as Je } from "./IconEdit-eacf3856.mjs";
13
+ import { a as _e } from "./index-0ab9d59c.mjs";
14
+ import { s as S } from "./auth-b047fdc0.mjs";
15
+ import "./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs";
16
+ import { v as Qe, a as Xe } from "./inputs.validation-14e8e01f.mjs";
17
+ import { a as R, s as b } from "./organizations-aed4245d.mjs";
18
+ import { _ as A } from "./_plugin-vue_export-helper-dad06003.mjs";
19
+ import { F as D, _ as ce } from "./Button-d8e72ac0.mjs";
20
+ import { _ as ze } from "./UploadImage-f7b0335f.mjs";
21
+ import "./Chips-9cf6c0da.mjs";
22
+ import { S as Me } from "./Select-90d4b7c8.mjs";
23
+ import "./Publics-538180a8.mjs";
24
+ const Ge = {
25
+ class: "breadcrumbs flex-row flex-nowrap flex-left flex",
26
+ "aria-label": "breadcrumbs"
27
+ }, et = {
28
+ key: 0,
29
+ class: "i-small mn-r-thin",
30
+ viewBox: "0 0 10 9",
31
+ fill: "none",
32
+ xmlns: "http://www.w3.org/2000/svg"
33
+ }, tt = /* @__PURE__ */ a("path", {
34
+ fill: "black",
35
+ d: "M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"
36
+ }, null, -1), st = [
37
+ tt
38
+ ], at = { key: 2 }, nt = {
39
+ key: 3,
40
+ class: "i-small chevron",
41
+ viewBox: "0 0 4 8",
42
+ fill: "none",
43
+ xmlns: "http://www.w3.org/2000/svg"
44
+ }, ot = /* @__PURE__ */ a("path", {
45
+ d: "M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z",
46
+ fill: "black"
47
+ }, null, -1), it = [
48
+ ot
49
+ ], lt = {
50
+ __name: "Breadcrumbs",
51
+ setup(e) {
52
+ const t = F(), { t: s, locale: n } = Ee(), d = Z(() => t.matched.map((c) => {
53
+ var w, P, I;
54
+ const p = (w = c.meta) == null ? void 0 : w.title, l = n == null ? void 0 : n.value, u = p && l && p[l], i = c.path.replace(/:.+?\//g, (N) => ""), m = (I = (P = c.meta) == null ? void 0 : P.breadcrumbs) == null ? void 0 : I.hidden;
55
+ return { name: u, path: i, isHidden: m };
56
+ }).filter((c) => c.name && !c.isHidden));
57
+ return (c, p) => {
58
+ const l = ue("router-link");
59
+ return o(), r("ol", Ge, [
60
+ (o(!0), r(O, null, L(k(d), (u, i) => (o(), r("li", {
61
+ key: i,
62
+ class: te(["flex-v-center flex-nowrap flex", { "t-main": i === k(d).length - 1 }])
63
+ }, [
64
+ i === 0 ? (o(), r("svg", et, st)) : g("", !0),
65
+ i !== k(d).length - 1 ? (o(), $(l, {
66
+ key: 1,
67
+ to: i === 0 ? "/" : u.path
68
+ }, {
69
+ default: x(() => [
70
+ W(f(u.name), 1)
71
+ ]),
72
+ _: 2
73
+ }, 1032, ["to"])) : (o(), r("span", at, f(u.name), 1)),
74
+ i !== k(d).length - 1 ? (o(), r("svg", nt, it)) : g("", !0)
75
+ ], 2))), 128))
76
+ ]);
77
+ };
78
+ }
79
+ }, rt = { class: "mn-small w-100" }, dt = ["href"], ct = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Website", -1), ut = [
80
+ ct
81
+ ], pt = ["href"], mt = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Phone", -1), ht = [
82
+ mt
83
+ ], _t = ["href"], ft = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Email", -1), gt = [
84
+ ft
85
+ ], bt = ["href"], vt = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Address", -1), yt = [
86
+ vt
87
+ ], $i = {
88
+ __name: "Contacts",
89
+ props: {
90
+ website: String,
91
+ phone: String,
92
+ email: String,
93
+ address: String
94
+ },
95
+ setup(e) {
96
+ const t = e, s = Z(() => t.website ? !t.website.startsWith("http://") && !t.website.startsWith("https://") ? `http://${t.website}` : t.website : null), n = Z(() => t.address ? encodeURIComponent(t.address) : null);
97
+ return (d, c) => (o(), r("div", rt, [
98
+ k(s) ? (o(), r("a", {
99
+ key: 0,
100
+ href: k(s),
101
+ target: "_blank",
102
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
103
+ }, ut, 8, dt)) : g("", !0),
104
+ t.phone ? (o(), r("a", {
105
+ key: 1,
106
+ href: `tel:${t.phone}`,
107
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
108
+ }, ht, 8, pt)) : g("", !0),
109
+ t.email ? (o(), r("a", {
110
+ key: 2,
111
+ href: `mailto:${t.email}`,
112
+ target: "_blank",
113
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
114
+ }, gt, 8, _t)) : g("", !0),
115
+ k(n) ? (o(), r("a", {
116
+ key: 3,
117
+ href: `https://www.google.com/maps/search/?api=1&query=${k(n)}`,
118
+ target: "_blank",
119
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
120
+ }, yt, 8, bt)) : g("", !0)
121
+ ]));
122
+ }
123
+ }, wt = { class: "w-100 mn-small star-container flex-v-center flex" }, $t = { class: "p-big t-semi mn-r-small" }, Ct = /* @__PURE__ */ a("path", {
124
+ fill: "#00FF88",
125
+ d: "M62.2406 5.85971L75.413 32.6098L105.203 36.8654C110.472 37.676 112.498 44.3636 108.648 48.0113L87.1668 68.8844L92.2331 98.2689C93.2464 103.741 87.5721 107.591 82.9111 105.159L56.3637 91.3788L29.8163 105.159C25.1553 107.794 19.4811 103.741 20.4944 98.4716L25.5607 68.8844L4.07956 48.0113C0.22917 44.3636 2.25569 37.676 7.52464 36.8654L37.3145 32.6098L50.4868 5.85971C52.9186 0.996063 59.8088 0.996063 62.2406 5.85971Z"
126
+ }, null, -1), kt = [
127
+ Ct
128
+ ], xt = { class: "" }, Ci = {
129
+ __name: "Rating",
130
+ props: {
131
+ rating: {
132
+ type: Number,
133
+ required: !0
134
+ },
135
+ amount: {
136
+ type: Number,
137
+ required: !0
138
+ }
139
+ },
140
+ setup(e) {
141
+ return (t, s) => (o(), r("section", null, [
142
+ a("div", wt, [
143
+ a("span", $t, f(e.rating), 1),
144
+ (o(), r(O, null, L(5, (n) => a("svg", {
145
+ class: te(["i-semi mn-r-small", { "t-transp": n > e.rating }]),
146
+ width: "113",
147
+ height: "108",
148
+ viewBox: "0 0 113 108",
149
+ fill: "none",
150
+ xmlns: "http://www.w3.org/2000/svg"
151
+ }, kt, 2)), 64))
152
+ ]),
153
+ a("p", xt, "Based on " + f(e.amount) + " reviews", 1)
154
+ ]));
155
+ }
156
+ }, Ot = { class: "t-center flex-center flex-column flex pd-medium radius-big bg-grey" }, Lt = ["src"], St = { class: "mn-thin" }, Pt = { class: "mn-medium p-big" }, zt = { class: "flex-center flex-wrap gap-thin flex mn-semi" }, Mt = { class: "pd-thin radius-small t-semi uppercase t-black bg-main p-medium" }, Dt = {
157
+ key: 3,
158
+ class: "mn-t-small mn-thin"
159
+ }, At = {
160
+ __name: "DetailsTab",
161
+ props: {
162
+ organization: Object,
163
+ user: Object
164
+ },
165
+ setup(e) {
166
+ return (t, s) => (o(), $(H, { name: "slide-fade" }, {
167
+ default: x(() => [
168
+ a("section", Ot, [
169
+ e.user._id === e.organization.owner ? (o(), $(Ye, {
170
+ key: 0,
171
+ onClick: s[0] || (s[0] = (n) => t.$router.push({
172
+ name: "Organization Edit",
173
+ params: {
174
+ _id: e.organization._id
175
+ }
176
+ })),
177
+ class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
178
+ })) : g("", !0),
179
+ e.organization.profile.photo ? (o(), r("img", {
180
+ key: 1,
181
+ src: (t.FILE_SERVER_URL || "") + e.organization.profile.photo,
182
+ class: "radius-big bg-grey flex-center flex mn-small i-extra"
183
+ }, null, 8, Lt)) : (o(), $(Je, {
184
+ key: 2,
185
+ class: "radius-medium mn-small i-extra"
186
+ })),
187
+ a("h1", St, f(e.organization.profile.name), 1),
188
+ a("p", Pt, [
189
+ h(Ke, {
190
+ text: e.organization.profile.description ? e.organization.profile.description : "",
191
+ maxLen: 240
192
+ }, null, 8, ["text"])
193
+ ]),
194
+ a("div", zt, [
195
+ (o(!0), r(O, null, L(e.organization.profile.tags, (n) => (o(), r("span", Mt, f(n), 1))), 256))
196
+ ]),
197
+ z(t.$slots, "default"),
198
+ Object.values(e.organization.socials).some((n) => n) ? (o(), r("h4", Dt, " Find us in socials ")) : g("", !0),
199
+ h(Ne, {
200
+ telegram: e.organization.socials.telegram,
201
+ facebook: e.organization.socials.facebook,
202
+ instagram: e.organization.socials.instagram,
203
+ twitter: e.organization.socials.twitter
204
+ }, null, 8, ["telegram", "facebook", "instagram", "twitter"])
205
+ ])
206
+ ]),
207
+ _: 3
208
+ }));
209
+ }
210
+ };
211
+ const Vt = {
212
+ key: 0,
213
+ class: "spoiler"
214
+ }, $e = {
215
+ __name: "Spoiler",
216
+ props: {
217
+ status: {
218
+ type: Boolean,
219
+ default: !1
220
+ }
221
+ },
222
+ setup(e) {
223
+ const t = e, s = v(!1);
224
+ return t.status && (s.value = t.status), (n, d) => (o(), r("div", null, [
225
+ a("div", {
226
+ onClick: d[0] || (d[0] = (c) => s.value = !s.value),
227
+ class: "flex-v-center flex-nowrap flex"
228
+ }, [
229
+ z(n.$slots, "header")
230
+ ]),
231
+ h(H, { name: "collapse" }, {
232
+ default: x(() => [
233
+ s.value ? (o(), r("div", Vt, [
234
+ z(n.$slots, "content")
235
+ ])) : g("", !0)
236
+ ]),
237
+ _: 3
238
+ })
239
+ ]));
240
+ }
241
+ }, B = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 }), y = oe({
242
+ all: [],
243
+ current: {
244
+ recommendation: !1,
245
+ category: [],
246
+ status: "unpublished",
247
+ information: [],
248
+ coverImage: "",
249
+ images: [],
250
+ files: [],
251
+ image3d: !1,
252
+ name: "",
253
+ sale: 0,
254
+ price: 0,
255
+ localization: [],
256
+ modifications: [],
257
+ description: ""
258
+ }
259
+ }), ki = {
260
+ async create(e, t) {
261
+ const s = {
262
+ ...t,
263
+ organization: e
264
+ };
265
+ return await B.post("/products/create", s).then(
266
+ (n) => (It(n.data, "current"), Promise.resolve(n.data)),
267
+ (n) => (C(n), Promise.reject(n))
268
+ );
269
+ },
270
+ async read(e = {}) {
271
+ e._id && (e.params = { _id: e._id }), e.category && (e.params = e.params || {}, e.params.category = e.category), e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 10, e.organization && (e.params.organization = e.organization), e.params.sort = "createdAt";
272
+ try {
273
+ console.log("Request params:" + e.params);
274
+ const t = await B.get("/products/read", { params: e.params });
275
+ return e._id ? y.current = t.data[0] : y.all = t.data, Promise.resolve(t.data);
276
+ } catch (t) {
277
+ return C(t), Promise.reject(t);
278
+ }
279
+ },
280
+ async update(e, t) {
281
+ return await B.post("/products/" + e, t).then(
282
+ (s) => Promise.resolve(s.data),
283
+ (s) => (C(s), Promise.reject(s))
284
+ );
285
+ },
286
+ async deleteProduct(e) {
287
+ return await B.delete("/products/" + e).then(
288
+ (t) => Promise.resolve(t.data),
289
+ (t) => (C(t), Promise.reject(t))
290
+ );
291
+ },
292
+ async submitMood(e = null) {
293
+ return console.log(e), B.post("/product/recommended", { mood: e }).then(
294
+ (t) => (y.current = t.data.product, y.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
295
+ (t) => (console.log(t), C(t), Promise.reject(t))
296
+ );
297
+ },
298
+ async fetchProducts() {
299
+ return await B.get("/products").then(
300
+ (e) => (y.all = e.data, y.filtered = e.data.slice(), y.filteredPrice = y.filtered, y.filteredPrice.sort(function(t, s) {
301
+ return t[y.sort.current] > s[y.sort.current] ? y.sort.ascending ? 1 : -1 : t[y.sort.current] < s[y.sort.current] ? y.sort.ascending ? -1 : 1 : 0;
302
+ }), Promise.resolve(e.data)),
303
+ (e) => (C(e), Promise.reject(e))
304
+ );
305
+ },
306
+ async fetchProductsPopular() {
307
+ return await B.get("/products/popular").then(
308
+ (e) => (y.popular = e.data, Promise.resolve(e.data)),
309
+ (e) => (C(e), Promise.reject(e))
310
+ );
311
+ },
312
+ async fetchProductsPublished() {
313
+ return await B.get("/products").then(
314
+ (e) => {
315
+ let t = e.data.filter(function(s, n) {
316
+ return s.status !== "unpublished";
317
+ });
318
+ return y.all = t, y.filtered = t.slice(), y.filteredPrice = y.filtered, y.filteredPrice.sort(function(s, n) {
319
+ return s[y.sort.current] > n[y.sort.current] ? y.sort.ascending ? 1 : -1 : s[y.sort.current] < n[y.sort.current] ? y.sort.ascending ? -1 : 1 : 0;
320
+ }), Promise.resolve(e.data);
321
+ },
322
+ (e) => (C(e), Promise.reject(e))
323
+ );
324
+ },
325
+ async fetchProduct(e) {
326
+ return await B.get("/products/" + e).then(
327
+ (t) => (t.localization || (t.localization = []), y.current = t.data, Promise.resolve(t.data)),
328
+ (t) => (C(t), Promise.reject(t))
329
+ );
330
+ },
331
+ async fetchProductPopular() {
332
+ return await B.get("/products").then(
333
+ (e) => (y.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
334
+ (e) => (C(e), Promise.reject(e))
335
+ );
336
+ }
337
+ };
338
+ function It(e, t) {
339
+ y[t] = e;
340
+ }
341
+ T(y, (e, t) => {
342
+ });
343
+ const Ut = process.env.API_URL, Q = _e.create({ baseURL: Ut, withCredentials: !0 }), E = oe({
344
+ all: [],
345
+ current: {
346
+ order: "1",
347
+ name: "",
348
+ url: "",
349
+ subcategories: [],
350
+ filters: [],
351
+ localization: []
352
+ }
353
+ }), xi = {
354
+ async fetchCategories() {
355
+ return await Q.get("/categories").then(
356
+ (e) => (E.all = e.data, Promise.resolve(e.data)),
357
+ (e) => (C(e), Promise.reject(e))
358
+ );
359
+ },
360
+ updateCategories(e) {
361
+ return Q.post("/categories", e).then(
362
+ (t) => (E.all = e, Promise.resolve(e)),
363
+ (t) => (C(t), Promise.reject(t))
364
+ );
365
+ },
366
+ fetchCategory(e) {
367
+ return Q.get("/categories/" + e).then(
368
+ (t) => (E.current = t.data, Promise.resolve(t.data)),
369
+ (t) => (C(t), Promise.reject(t))
370
+ );
371
+ },
372
+ addCategory() {
373
+ return Q.post("/categories/add", E.current).then(
374
+ (e) => (E.all.push(e.data), Promise.resolve(e.data)),
375
+ (e) => (C(e), Promise.reject(e))
376
+ );
377
+ },
378
+ updateCategory(e) {
379
+ return Q.post("/categories/" + e, E.current).then(
380
+ (t) => (E.current = t.data, Promise.resolve(t.data)),
381
+ (t) => (C(t), Promise.reject(t))
382
+ );
383
+ },
384
+ deleteCategory(e) {
385
+ return Q.delete("/categories/" + e).then(
386
+ (t) => {
387
+ const s = E.all.findIndex((n) => n.url === e);
388
+ E.all.splice(s, 1);
389
+ },
390
+ (t) => {
391
+ C(t);
392
+ }
393
+ );
394
+ }
395
+ };
396
+ T(E, (e) => {
397
+ });
398
+ const Bt = { class: "mn-big radius-medium pd-big bg-white" }, Et = { class: "mn-regular" }, jt = { class: "mn-small t-transp p-medium" }, fe = {
399
+ __name: "EmptyState",
400
+ props: {
401
+ title: {
402
+ type: String,
403
+ default: "У вас еще нет организации"
404
+ },
405
+ description: {
406
+ type: String,
407
+ default: "Для использования сервиса, вам необходимо добавить вашу организацию."
408
+ },
409
+ action: {
410
+ type: String,
411
+ default: "Создать организацию"
412
+ },
413
+ callback: {
414
+ type: Function,
415
+ default: () => {
416
+ }
417
+ }
418
+ },
419
+ setup(e) {
420
+ return (t, s) => (o(), r("section", Bt, [
421
+ a("h3", Et, f(e.title), 1),
422
+ a("p", jt, f(e.description), 1),
423
+ a("button", {
424
+ onClick: s[0] || (s[0] = (...n) => e.callback && e.callback(...n)),
425
+ class: "t-white bg-second w-100 button"
426
+ }, f(e.action), 1)
427
+ ]));
428
+ }
429
+ };
430
+ const Tt = {
431
+ __name: "Map",
432
+ props: {
433
+ location: Object
434
+ },
435
+ setup(e) {
436
+ const t = e;
437
+ let s = v(null), n = null, d = null;
438
+ return pe(async () => {
439
+ n = new google.maps.Map(s.value, {
440
+ zoom: 13,
441
+ center: {
442
+ lat: t.location.lat,
443
+ lng: t.location.lng
444
+ }
445
+ }), d = new google.maps.Marker({
446
+ position: {
447
+ lat: t.location.lat,
448
+ lng: t.location.lng
449
+ },
450
+ map: n
451
+ });
452
+ }), T(() => t.location, () => {
453
+ n && d && (d.setPosition(new google.maps.LatLng(t.location.lat, t.location.lng)), n.setCenter(new google.maps.LatLng(t.location.lat, t.location.lng)));
454
+ }, { deep: !0 }), (c, p) => (o(), r("div", {
455
+ ref_key: "gmap",
456
+ ref: s,
457
+ class: "gmap"
458
+ }, null, 512));
459
+ }
460
+ }, Ft = /* @__PURE__ */ A(Tt, [["__scopeId", "data-v-c194b4a5"]]);
461
+ const qt = { class: "pd-small flex-nowrap flex" }, Rt = { class: "user-card__info" }, Zt = { class: "user-card__name" }, Ht = { class: "user-card__position" }, Nt = {
462
+ __name: "DepartmentSub",
463
+ props: {
464
+ department: {
465
+ type: Object,
466
+ required: !0
467
+ }
468
+ // Define other props here
469
+ },
470
+ setup(e) {
471
+ return (t, s) => (o(), r("div", qt, [
472
+ a("div", Rt, [
473
+ a("p", Zt, f(e.department.name ? e.department.name : "Безымянный"), 1),
474
+ a("p", Ht, f(e.department.members ? e.department.members.length : "0") + " человек", 1)
475
+ ])
476
+ ]));
477
+ }
478
+ }, De = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-d65b1483"]]);
479
+ const Kt = { class: "pd-small flex-nowrap flex" }, Wt = { class: "user-card__info" }, Yt = { class: "user-card__name" }, Jt = { class: "t-transp" }, Qt = {
480
+ __name: "User",
481
+ props: {
482
+ user: {
483
+ type: Object,
484
+ required: !0
485
+ },
486
+ position: {
487
+ type: String,
488
+ required: !0
489
+ }
490
+ // Define other props here
491
+ },
492
+ setup(e) {
493
+ return (t, s) => (o(), r("div", Kt, [
494
+ a("div", Wt, [
495
+ a("p", Yt, f(e.user.name ? e.user.name : "Безымянный"), 1),
496
+ a("p", Jt, f(e.position), 1)
497
+ ])
498
+ ]));
499
+ }
500
+ }, Ae = /* @__PURE__ */ A(Qt, [["__scopeId", "data-v-a27accf5"]]);
501
+ const ie = (e) => (me("data-v-1d33cf95"), e = e(), he(), e), Xt = { class: "radius-big o-hidden cols-2-1_3" }, Gt = { class: "pd-medium w-100" }, es = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("path", {
502
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
503
+ fill: "black"
504
+ }, null, -1)), ts = [
505
+ es
506
+ ], ss = ["innerHTML"], as = ["innerHTML"], ns = { class: "pd-small flex-v-center flex-nowrap flex" }, os = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("h5", { class: "w-100" }, "Contacts ", -1)), is = { class: "mn-r-small" }, ls = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("svg", {
507
+ width: "14",
508
+ height: "9",
509
+ viewBox: "0 0 14 9",
510
+ fill: "none",
511
+ xmlns: "http://www.w3.org/2000/svg"
512
+ }, [
513
+ /* @__PURE__ */ a("path", {
514
+ "fill-rule": "evenodd",
515
+ "clip-rule": "evenodd",
516
+ d: "M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",
517
+ fill: "#8A8A8A"
518
+ })
519
+ ], -1)), rs = { key: 0 }, ds = { class: "pd-small flex-v-center flex-nowrap flex" }, cs = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("h5", { class: "w-100" }, "Working Hours ", -1)), us = { class: "mn-r-small" }, ps = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("svg", {
520
+ width: "14",
521
+ height: "9",
522
+ viewBox: "0 0 14 9",
523
+ fill: "none",
524
+ xmlns: "http://www.w3.org/2000/svg"
525
+ }, [
526
+ /* @__PURE__ */ a("path", {
527
+ "fill-rule": "evenodd",
528
+ "clip-rule": "evenodd",
529
+ d: "M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",
530
+ fill: "#8A8A8A"
531
+ })
532
+ ], -1)), ms = { key: 0 }, hs = {
533
+ __name: "Department",
534
+ props: {
535
+ department: Object,
536
+ organization: Object
537
+ },
538
+ setup(e) {
539
+ const t = e;
540
+ return (s, n) => (o(), r("div", Xt, [
541
+ h(Ft, {
542
+ location: { lat: e.department.location.coordinates[1], lng: e.department.location.coordinates[0] },
543
+ class: ""
544
+ }, null, 8, ["location"]),
545
+ a("div", Gt, [
546
+ (o(), r("svg", {
547
+ onClick: n[0] || (n[0] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}/edit`)),
548
+ class: "i-regular pos-absolute pos-r-0 pos-t-0 t-transp",
549
+ width: "652",
550
+ height: "652",
551
+ viewBox: "0 0 652 652",
552
+ fill: "none",
553
+ xmlns: "http://www.w3.org/2000/svg"
554
+ }, ts)),
555
+ a("h3", {
556
+ onClick: n[1] || (n[1] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}`)),
557
+ class: "mn-small w-100",
558
+ innerHTML: e.department.profile.name
559
+ }, null, 8, ss),
560
+ a("p", {
561
+ onClick: n[2] || (n[2] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}`)),
562
+ class: "mn-small p-big w-100",
563
+ innerHTML: e.department.address
564
+ }, null, 8, as),
565
+ h($e, { class: "radius-small o-hidden br-1px br-solid br-grey mn-thin" }, {
566
+ header: x(() => [
567
+ a("div", ns, [
568
+ os,
569
+ a("p", is, f(e.department.members.length) + " человек", 1),
570
+ ls
571
+ ])
572
+ ]),
573
+ content: x(() => [
574
+ a("ul", null, [
575
+ e.department.members.length < 1 ? (o(), r("li", rs, "В отделе еще нет участников")) : g("", !0),
576
+ (o(!0), r(O, null, L(e.department.members, (d, c) => (o(), $(Ae, {
577
+ class: "br-b br-solid br-grey",
578
+ key: c,
579
+ user: d.user,
580
+ position: d.position,
581
+ onClick: (p) => s.$router.push(`/app/profile/${d.user._id}`)
582
+ }, null, 8, ["user", "position", "onClick"]))), 128))
583
+ ])
584
+ ]),
585
+ _: 1
586
+ }),
587
+ h($e, { class: "radius-small o-hidden br-1px br-solid br-grey mn-thin" }, {
588
+ header: x(() => [
589
+ a("div", ds, [
590
+ cs,
591
+ a("p", us, f(e.department.subdepartments ? e.department.subdepartments.length : 0) + " отделов", 1),
592
+ ps
593
+ ])
594
+ ]),
595
+ content: x(() => [
596
+ a("ul", null, [
597
+ e.department.subdepartments.length < 1 ? (o(), r("li", ms, "В отделе еще нет подотделов")) : g("", !0),
598
+ (o(!0), r(O, null, L(e.department.subdepartments, (d, c) => (o(), $(De, {
599
+ onClick: (p) => s.$router.push(`/app/organization/departments/${d._id}`),
600
+ key: c,
601
+ class: "br-b br-solid br-grey",
602
+ department: d
603
+ }, null, 8, ["onClick", "department"]))), 128))
604
+ ])
605
+ ]),
606
+ _: 1
607
+ })
608
+ ])
609
+ ]));
610
+ }
611
+ }, _s = /* @__PURE__ */ A(hs, [["__scopeId", "data-v-1d33cf95"]]), G = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 });
612
+ G.defaults.withCredentials = !0;
613
+ const _ = oe({
614
+ departments: [],
615
+ department: {
616
+ organization: "",
617
+ profile: {
618
+ photo: "",
619
+ name: "",
620
+ description: "",
621
+ categories: []
622
+ },
623
+ address: "",
624
+ location: {
625
+ lat: null,
626
+ lng: null
627
+ },
628
+ worktime: [],
629
+ delivery: [],
630
+ payment: [],
631
+ members: [],
632
+ subdepartments: []
633
+ },
634
+ error: null
635
+ }), K = {
636
+ async readOne(e) {
637
+ await G.get(`/api/departments/get/${e}`).then((t) => {
638
+ _.department = t.data, _.error = null;
639
+ }).catch((t) => {
640
+ C(t);
641
+ });
642
+ },
643
+ async read(e) {
644
+ await G.get(`/api/departments/${e}`).then((t) => {
645
+ console.log("Response:", t), _.departments = t.data, _.error = null;
646
+ }).catch((t) => {
647
+ C(t);
648
+ });
649
+ },
650
+ async create(e, t) {
651
+ await G.post(`/api/departments/${e}/create`, t).then((s) => {
652
+ _.error = null, _.department = s.data;
653
+ }).catch((s) => {
654
+ C(s);
655
+ });
656
+ },
657
+ async update(e, t) {
658
+ await G.post(`/api/departments/${e}/update`, t).then(() => {
659
+ _.error = null;
660
+ }).catch((s) => {
661
+ C(s);
662
+ });
663
+ },
664
+ async delete(e, t) {
665
+ await G.delete(`/api/departments/${e}/delete`, { data: { _id: t } }).then(() => {
666
+ _.error = null;
667
+ }).catch((s) => {
668
+ C(s);
669
+ });
670
+ }
671
+ };
672
+ T(_, (e, t) => {
673
+ });
674
+ const Oi = {
675
+ __name: "StructureTab",
676
+ props: {
677
+ organization: Object,
678
+ units: Array,
679
+ memberships: Array
680
+ },
681
+ async setup(e) {
682
+ let t, s;
683
+ const n = e;
684
+ v("departments"), [t, s] = Y(() => K.read(n.organization._id)), await t, s();
685
+ const d = Z(() => {
686
+ const c = _.departments, p = c.flatMap(
687
+ (l) => l.subdepartments.map((u) => u._id)
688
+ );
689
+ return c.filter(
690
+ (l) => !p.includes(l._id)
691
+ );
692
+ });
693
+ return (c, p) => (o(), $(H, { name: "slide-fade" }, {
694
+ default: x(() => [
695
+ a("div", null, [
696
+ k(d).length < 1 ? (o(), $(fe, {
697
+ key: 0,
698
+ title: "You don't have any spots yet.",
699
+ description: "Add spots to your hub.",
700
+ action: "Add spot",
701
+ callback: () => c.$router.push(`/app/organization/${n.organization._id}/departments/create`)
702
+ }, null, 8, ["callback"])) : g("", !0),
703
+ a("div", null, [
704
+ (o(!0), r(O, null, L(k(d), (l, u) => (o(), $(_s, {
705
+ key: u,
706
+ department: l,
707
+ organization: e.organization,
708
+ class: "radius-big bg-grey mn-thin"
709
+ }, null, 8, ["department", "organization"]))), 128)),
710
+ k(d).length > 0 && S.user._id === e.organization.owner ? (o(), r("button", {
711
+ key: 0,
712
+ onClick: p[0] || (p[0] = (l) => c.$router.push(`/app/organization/${n.organization._id}/departments/create`)),
713
+ class: "mn-thin button w-100"
714
+ }, " Add spot ")) : g("", !0)
715
+ ])
716
+ ])
717
+ ]),
718
+ _: 1
719
+ }));
720
+ }
721
+ }, ee = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 });
722
+ ee.defaults.withCredentials = !0;
723
+ const j = oe({
724
+ invites: [],
725
+ invite: null,
726
+ error: null
727
+ }), ne = {
728
+ async read(e) {
729
+ await ee.get(`/api/invites/${e}`).then((t) => {
730
+ j.invites = t.data, j.error = null;
731
+ }).catch((t) => {
732
+ C(t);
733
+ });
734
+ },
735
+ async readOne(e) {
736
+ await ee.get(`/api/invites/get/${e}`).then((t) => {
737
+ j.invite = t.data, S.user.phone = t.data.invitedPhone, S.user.email = t.data.invitedEmail;
738
+ }).catch((t) => {
739
+ C(t);
740
+ });
741
+ },
742
+ async create(e, t) {
743
+ await ee.post(`/api/invites/${e}/create`, t).then(() => {
744
+ j.error = null;
745
+ }).catch((s) => {
746
+ C(s);
747
+ });
748
+ },
749
+ async update(e, t) {
750
+ await ee.put(`/api/invites/${e}/update`, t).then(() => {
751
+ j.error = null;
752
+ }).catch((s) => {
753
+ C(s);
754
+ });
755
+ },
756
+ async delete(e) {
757
+ await ee.delete(`/api/invites/${e}/delete`).then(() => {
758
+ j.error = null;
759
+ }).catch((t) => {
760
+ C(t);
761
+ });
762
+ }
763
+ };
764
+ T(j, (e, t) => {
765
+ });
766
+ const Li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
767
+ __proto__: null,
768
+ actions: ne,
769
+ state: j
770
+ }, Symbol.toStringTag, { value: "Module" })), fs = { class: "mn-medium radius-medium pd-semi bg-white" }, gs = /* @__PURE__ */ a("h3", { class: "mn-medium" }, "Добавить участников", -1), bs = /* @__PURE__ */ a("p", { class: "mn-small t-transp p-medium" }, "Укажите email или телефон, чтобы отправить ссылку с приглашением:", -1), vs = { class: "w-100 flex-nowrap flex" }, ys = {
771
+ key: 0,
772
+ class: "mn-r-medium flex-v-center flex"
773
+ }, ws = ["onClick"], $s = /* @__PURE__ */ a("p", { class: "t-blue mn-r-small" }, "+ Добавить приглашение", -1), Cs = [
774
+ $s
775
+ ], ks = /* @__PURE__ */ a("span", null, "Отправить приглашения ", -1), xs = {
776
+ __name: "MembersAdd",
777
+ props: {
778
+ organization: Object
779
+ },
780
+ emits: ["send-invite"],
781
+ setup(e, { emit: t }) {
782
+ const s = e, n = v(null), d = v([{ contact: "", role: "" }]);
783
+ function c() {
784
+ d.value.push({ contact: "", role: "" });
785
+ }
786
+ function p(i) {
787
+ d.value.splice(i, 1);
788
+ }
789
+ async function l(i) {
790
+ await ne.create(s.organization._id, d.value);
791
+ }
792
+ function u() {
793
+ }
794
+ return (i, m) => (o(), r("div", null, [
795
+ a("section", fs, [
796
+ gs,
797
+ bs,
798
+ (o(!0), r(O, null, L(d.value, (w, P) => (o(), r("div", {
799
+ key: P,
800
+ class: "br-1px br-solid br-grey flex radius-small mn-thin"
801
+ }, [
802
+ a("div", vs, [
803
+ h(D, {
804
+ field: w.contact,
805
+ "onUpdate:field": (I) => w.contact = I,
806
+ placeholder: "Email или телефон",
807
+ class: "w-100 bg-white",
808
+ validation: n.value
809
+ }, null, 8, ["field", "onUpdate:field", "validation"]),
810
+ P > 0 ? (o(), r("div", ys, [
811
+ a("button", {
812
+ onClick: (I) => p(P),
813
+ class: "button-small button"
814
+ }, "×", 8, ws)
815
+ ])) : g("", !0)
816
+ ]),
817
+ h(Me, {
818
+ options: [
819
+ { name: "Директор", value: "director" },
820
+ { name: "Менеджер", value: "manager" },
821
+ { name: "Сотрудник", value: "member" }
822
+ ],
823
+ prop: w,
824
+ content: "role",
825
+ placeholder: "Роль",
826
+ size: "small",
827
+ class: "w-80"
828
+ }, null, 8, ["prop"])
829
+ ]))), 128)),
830
+ a("div", {
831
+ onClick: c,
832
+ class: "mn-small flex-v-center flex-nowrap flex"
833
+ }, Cs),
834
+ h(ce, {
835
+ submit: i.a = () => l(j.invites),
836
+ callback: u,
837
+ class: "mn-t-medium"
838
+ }, {
839
+ default: x(() => [
840
+ ks
841
+ ]),
842
+ _: 1
843
+ }, 8, ["submit"])
844
+ ])
845
+ ]));
846
+ }
847
+ }, Os = { class: "mn-big radius-medium bg-white" }, Ls = {
848
+ key: 0,
849
+ class: "pd-semi"
850
+ }, Ss = { class: "br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium" }, Ps = { class: "w-100 mn-r-small" }, zs = { class: "t-transp" }, Ms = {
851
+ key: 0,
852
+ class: "mn-l-medium flex-v-center flex"
853
+ }, Ds = ["onClick"], As = {
854
+ key: 1,
855
+ class: "pd-semi"
856
+ }, Vs = { key: 0 }, Is = { class: "br-grey br-1px br-solid radius-small mn-thin flex-nowrap flex-v-center flex pd-medium" }, Us = { class: "w-100 mn-r-small" }, Bs = { class: "t-transp" }, Es = { class: "mn-l-medium flex-v-center flex" }, js = ["onClick"], Ts = {
857
+ __name: "MembersList",
858
+ props: {
859
+ organization: Object,
860
+ memberships: Array,
861
+ invites: Array
862
+ },
863
+ emits: [["removeMember", "removeInvite"]],
864
+ setup(e, { emit: t }) {
865
+ const s = e, n = v("members");
866
+ function d(p, l) {
867
+ s.memberships.splice(p, 1), t("removeMember", l);
868
+ }
869
+ function c(p, l) {
870
+ s.invites.splice(p, 1), t("removeInvite", l);
871
+ }
872
+ return (p, l) => (o(), r("section", Os, [
873
+ h(Pe, {
874
+ selected: n.value,
875
+ "onUpdate:selected": l[0] || (l[0] = (u) => n.value = u),
876
+ class: "br-grey br-b br-solid radius-small",
877
+ tabs: [
878
+ { name: "Участники", value: "members" },
879
+ { name: "Приглашения", value: "invites" }
880
+ ]
881
+ }, null, 8, ["selected"]),
882
+ n.value === "members" ? (o(), r("div", Ls, [
883
+ (o(!0), r(O, null, L(e.memberships, (u, i) => (o(), r("div", Ss, [
884
+ a("span", Ps, f(u.user.email) + " " + f(u.user.phone), 1),
885
+ a("span", zs, f(u.position), 1),
886
+ u.position !== "Основатель" ? (o(), r("div", Ms, [
887
+ a("button", {
888
+ onClick: (m) => d(i, u),
889
+ class: "button-small button"
890
+ }, "×", 8, Ds)
891
+ ])) : g("", !0)
892
+ ]))), 256))
893
+ ])) : g("", !0),
894
+ n.value === "invites" ? (o(), r("div", As, [
895
+ e.invites.length < 1 ? (o(), r("span", Vs, "В организации нет приглашений")) : g("", !0),
896
+ (o(!0), r(O, null, L(e.invites, (u, i) => (o(), r("div", Is, [
897
+ a("span", Us, f(u.invitedEmail) + " " + f(u.invitedPhone), 1),
898
+ a("span", Bs, f(u.status), 1),
899
+ a("div", Es, [
900
+ a("button", {
901
+ onClick: (m) => c(i, u),
902
+ class: "button-small button"
903
+ }, "×", 8, js)
904
+ ])
905
+ ]))), 256))
906
+ ])) : g("", !0)
907
+ ]));
908
+ }
909
+ }, Fs = /* @__PURE__ */ a("section", { class: "mn-medium radius-medium pd-semi bg-white" }, [
910
+ /* @__PURE__ */ a("h2", { class: "mn-regular" }, "Участники"),
911
+ /* @__PURE__ */ a("p", { class: "t-transp p-big" }, "Добавляйте новых участников организации и настраивайте права доступа.")
912
+ ], -1), Si = {
913
+ __name: "MembersTab",
914
+ props: {
915
+ organization: Object,
916
+ memberships: Array
917
+ },
918
+ async setup(e) {
919
+ let t, s;
920
+ const n = e;
921
+ [t, s] = Y(() => ne.read(n.organization._id)), await t, s();
922
+ async function d(l) {
923
+ await ne.create(n.organization._id, l);
924
+ }
925
+ async function c(l) {
926
+ await ge.delete(l._id);
927
+ }
928
+ async function p(l) {
929
+ await ne.delete(l._id);
930
+ }
931
+ return (l, u) => (o(), $(H, { name: "slide-fade" }, {
932
+ default: x(() => [
933
+ a("div", null, [
934
+ Fs,
935
+ h(xs, {
936
+ organization: e.organization,
937
+ onSendInvite: d
938
+ }, null, 8, ["organization"]),
939
+ h(Ts, {
940
+ organization: e.organization,
941
+ memberships: e.memberships,
942
+ invites: j.invites,
943
+ onRemoveInvite: p,
944
+ onRemoveMember: c
945
+ }, null, 8, ["organization", "memberships", "invites"])
946
+ ])
947
+ ]),
948
+ _: 1
949
+ }));
950
+ }
951
+ };
952
+ const qs = {
953
+ key: 0,
954
+ class: "pd-thin for-transition w-100"
955
+ }, Rs = { class: "t-semi mn-small" }, Zs = {
956
+ __name: "Organization",
957
+ setup(e) {
958
+ const t = q(), s = F();
959
+ let n = s.query.tab ? s.query.tab : "events";
960
+ const d = v(null);
961
+ pe(async () => {
962
+ d.value = await R.read({ _id: s.params._id, user: S.user._id }), await ge.read(s.params._id);
963
+ });
964
+ const c = v(n);
965
+ s.query.tab = c.value, T(c, (l) => {
966
+ t.replace({ query: { ...s.query, tab: l } });
967
+ });
968
+ const p = ({ membership: l, isMember: u, targetId: i }) => {
969
+ qe.handleMembershipUpdate(b.current, l, u, i);
970
+ };
971
+ return (l, u) => d.value ? (o(), r("div", qs, [
972
+ h(At, {
973
+ organization: b.current,
974
+ user: S.user,
975
+ class: "mn-semi"
976
+ }, {
977
+ default: x(() => [
978
+ a("p", Rs, " 👨‍👨‍👧‍👧 " + f(b.current.numberOfMemberships) + " followers ", 1),
979
+ S.user._id && k(s).params._id && k(s).params._id !== S.user._id && b.current.owner !== S.user._id ? (o(), $(Fe, {
980
+ key: 0,
981
+ type: "organization",
982
+ isMember: b.current.isMember,
983
+ targetId: b.current._id,
984
+ userId: S.user._id,
985
+ class: "w-min mn-auto",
986
+ onUpdateMembership: p
987
+ }, null, 8, ["isMember", "targetId", "userId"])) : g("", !0)
988
+ ]),
989
+ _: 1
990
+ }, 8, ["organization", "user"]),
991
+ h(Pe, {
992
+ selected: c.value,
993
+ "onUpdate:selected": u[0] || (u[0] = (i) => c.value = i),
994
+ tabs: [
995
+ { name: "Events", value: "events" },
996
+ { name: "Community", value: "community" }
997
+ ],
998
+ class: "mn-small o-hidden h5 radius-big bg-grey"
999
+ }, null, 8, ["selected"]),
1000
+ h(H, { name: "slide-fade" }, {
1001
+ default: x(() => [
1002
+ c.value === "events" ? (o(), $(Ze, {
1003
+ key: 0,
1004
+ user: S.user._id,
1005
+ owner: k(s).params._id,
1006
+ sortOrder: "asc"
1007
+ }, null, 8, ["user", "owner"])) : g("", !0)
1008
+ ]),
1009
+ _: 1
1010
+ }),
1011
+ h(H, { name: "slide-fade" }, {
1012
+ default: x(() => [
1013
+ c.value === "community" ? (o(), $(He, {
1014
+ key: 0,
1015
+ user: S.user._id,
1016
+ owner: k(s).params._id
1017
+ }, null, 8, ["user", "owner"])) : g("", !0)
1018
+ ]),
1019
+ _: 1
1020
+ })
1021
+ ])) : g("", !0);
1022
+ }
1023
+ }, Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1024
+ __proto__: null,
1025
+ default: Zs
1026
+ }, Symbol.toStringTag, { value: "Module" })), Ns = { class: "for-transition w-100" }, Ks = {
1027
+ id: "dash",
1028
+ class: "pd-medium bg-grey"
1029
+ }, Ws = { class: "mn-medium radius-medium pd-semi bg-white" }, Ys = { class: "flex-nowrap flex mn-small" }, Js = { class: "w-100" }, Qs = /* @__PURE__ */ a("path", {
1030
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
1031
+ fill: "black"
1032
+ }, null, -1), Xs = [
1033
+ Qs
1034
+ ], Gs = ["innerHTML"], ea = { class: "mn-medium radius-medium pd-semi bg-white" }, ta = /* @__PURE__ */ a("h3", { class: "mn-regular" }, "Команда", -1), sa = { key: 0 }, aa = { class: "mn-medium radius-medium pd-semi bg-white" }, na = /* @__PURE__ */ a("h3", { class: "mn-regular" }, "Подотделы", -1), oa = { key: 0 }, ia = {
1035
+ __name: "Department",
1036
+ async setup(e) {
1037
+ let t, s;
1038
+ q();
1039
+ const n = F();
1040
+ return [t, s] = Y(() => K.readOne(n.params._id)), await t, s(), (d, c) => (o(), r("div", Ns, [
1041
+ a("div", Ks, [
1042
+ a("section", Ws, [
1043
+ a("div", Ys, [
1044
+ a("h2", Js, f(_.department.name), 1),
1045
+ (o(), r("svg", {
1046
+ onClick: c[0] || (c[0] = (p) => d.$router.push(`/app/organization/departments/${_.department._id}/edit`)),
1047
+ class: "i-regular t-transp",
1048
+ width: "652",
1049
+ height: "652",
1050
+ viewBox: "0 0 652 652",
1051
+ fill: "none",
1052
+ xmlns: "http://www.w3.org/2000/svg"
1053
+ }, Xs))
1054
+ ]),
1055
+ a("p", {
1056
+ class: "t-transp p-big",
1057
+ innerHTML: _.department.description
1058
+ }, null, 8, Gs)
1059
+ ]),
1060
+ a("section", ea, [
1061
+ ta,
1062
+ a("ul", null, [
1063
+ _.department.members.length < 1 ? (o(), r("li", sa, "В отделе еще нет участников")) : g("", !0),
1064
+ (o(!0), r(O, null, L(_.department.members, (p, l) => (o(), $(Ae, {
1065
+ class: "br-b br-solid br-grey",
1066
+ key: l,
1067
+ user: p.user,
1068
+ position: p.position,
1069
+ onClick: (u) => d.$router.push(`/app/profile/${p.user._id}`)
1070
+ }, null, 8, ["user", "position", "onClick"]))), 128))
1071
+ ])
1072
+ ]),
1073
+ a("section", aa, [
1074
+ na,
1075
+ a("ul", null, [
1076
+ _.department.subdepartments.length < 1 ? (o(), r("li", oa, "В отделе еще нет подотделов")) : g("", !0),
1077
+ (o(!0), r(O, null, L(_.department.subdepartments, (p, l) => (o(), $(De, {
1078
+ onClick: (u) => d.$router.push(`/app/organization/departments/${p._id}`),
1079
+ key: l,
1080
+ class: "br-b br-solid br-grey",
1081
+ department: p
1082
+ }, null, 8, ["onClick", "department"]))), 128))
1083
+ ])
1084
+ ])
1085
+ ])
1086
+ ]));
1087
+ }
1088
+ }, la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1089
+ __proto__: null,
1090
+ default: ia
1091
+ }, Symbol.toStringTag, { value: "Module" }));
1092
+ const ra = { class: "for-transition bg-white radius-big w-100" }, da = { class: "flex-v-center flex-nowrap flex pd-semi" }, ca = /* @__PURE__ */ a("h2", { class: "mn-r-medium" }, "Organizations", -1), ua = { class: "pd-semi" }, pa = {
1093
+ key: 1,
1094
+ class: "cols-3"
1095
+ }, ma = ["onClick"], ha = ["src"], _a = {
1096
+ key: 1,
1097
+ class: "radius-medium mn-small i-thin",
1098
+ width: "42",
1099
+ height: "42",
1100
+ viewBox: "0 0 42 42",
1101
+ fill: "none",
1102
+ xmlns: "http://www.w3.org/2000/svg"
1103
+ }, fa = /* @__PURE__ */ a("circle", {
1104
+ fill: "rgb(var(--main))",
1105
+ cx: "21",
1106
+ cy: "21",
1107
+ r: "21"
1108
+ }, null, -1), ga = /* @__PURE__ */ a("path", {
1109
+ fill: "#242424",
1110
+ "fill-opacity": "0.1",
1111
+ "fill-rule": "evenodd",
1112
+ "clip-rule": "evenodd",
1113
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
1114
+ }, null, -1), ba = [
1115
+ fa,
1116
+ ga
1117
+ ], va = { class: "h4 mn-r-semi mn-small" }, ya = ["onClick"], wa = /* @__PURE__ */ a("path", {
1118
+ fill: "black",
1119
+ d: "M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"
1120
+ }, null, -1), $a = [
1121
+ wa
1122
+ ], Ca = { class: "t-black p-small" }, Pi = {
1123
+ __name: "OrganizationsAccount",
1124
+ async setup(e) {
1125
+ let t, s;
1126
+ S.user._id && ([t, s] = Y(() => R.read({ owner: S.user._id })), await t, s());
1127
+ const n = q(), d = F();
1128
+ let c = d.query.tab ? d.query.tab : "details";
1129
+ const p = v(c);
1130
+ return d.query.tab = p.value, T(p, (l) => {
1131
+ n.replace({ query: { ...d.query, tab: l } });
1132
+ }), (l, u) => (o(), r("div", ra, [
1133
+ a("header", da, [
1134
+ ca,
1135
+ a("button", {
1136
+ onClick: u[0] || (u[0] = (i) => l.$router.push({ name: "Create Organization" })),
1137
+ class: "radius-100p i-semi hover-scale-1 cursor-pointer t-white bg-second"
1138
+ }, "+")
1139
+ ]),
1140
+ a("div", ua, [
1141
+ b.all.length < 1 ? (o(), $(fe, {
1142
+ key: 0,
1143
+ title: "You Haven't Joined Any Organization Yet",
1144
+ description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
1145
+ action: "Create organization",
1146
+ callback: l.a = () => l.$router.push("/app/organization/create/details")
1147
+ }, null, 8, ["callback"])) : (o(), r("div", pa, [
1148
+ (o(!0), r(O, null, L(b.all, (i) => (o(), r("div", {
1149
+ key: i._id,
1150
+ class: "mn-small radius-medium pd-medium br-2px br-solid br-grey",
1151
+ onClick: (m) => l.$router.push({ name: "Organization", params: { _id: i._id } })
1152
+ }, [
1153
+ i.profile.photo.length > 0 ? (o(), r("img", {
1154
+ key: 0,
1155
+ src: (l.FILE_SERVER_URL || "") + i.profile.photo,
1156
+ class: "radius-medium mn-small i-thin"
1157
+ }, null, 8, ha)) : (o(), r("svg", _a, ba)),
1158
+ a("p", va, f(i.profile.name), 1),
1159
+ (o(), r("svg", {
1160
+ onClick: re((m) => l.$router.push({ name: "Organization Edit", params: { _id: i._id } }), ["stop"]),
1161
+ class: "t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",
1162
+ width: "13",
1163
+ height: "12",
1164
+ viewBox: "0 0 13 12",
1165
+ xmlns: "http://www.w3.org/2000/svg"
1166
+ }, $a, 8, ya)),
1167
+ a("p", Ca, f(i.profile.description.slice(0, 120) + "..."), 1)
1168
+ ], 8, ma))), 128))
1169
+ ]))
1170
+ ])
1171
+ ]));
1172
+ }
1173
+ }, ka = { class: "for-transition pd-thin" }, xa = /* @__PURE__ */ a("h3", { class: "mn-small" }, "Type of group", -1), Oa = /* @__PURE__ */ a("p", { class: "mn-thin" }, "Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.", -1), La = /* @__PURE__ */ a("h3", { class: "mn-small" }, "Profile", -1), Sa = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, Pa = /* @__PURE__ */ a("h4", null, "Upload photo", -1), za = /* @__PURE__ */ a("h3", { class: "mn-small" }, "Socials", -1), Ma = /* @__PURE__ */ a("p", { class: "mn-thin" }, "Please provide only the username for social media profiles, without full links.", -1), Da = {
1174
+ __name: "OrganizationEdit",
1175
+ async setup(e) {
1176
+ let t, s;
1177
+ const n = F(), d = q();
1178
+ R.reset(), n.params._id && ([t, s] = Y(() => R.read({ _id: n.params._id })), await t, s());
1179
+ const c = Z(() => b.current);
1180
+ async function p() {
1181
+ n.params._id ? await R.update(n.params._id, c.value) : await R.create(b.current, S.user._id);
1182
+ }
1183
+ function l() {
1184
+ d.replace({ name: "Organization", params: { _id: b.current._id } });
1185
+ }
1186
+ return (u, i) => (o(), r("div", ka, [
1187
+ xa,
1188
+ Oa,
1189
+ h(je, {
1190
+ modelValue: b.current.types,
1191
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => b.current.types = m),
1192
+ options: ["public", "exclusive", "hidden"],
1193
+ multiple: !1,
1194
+ taggable: !1,
1195
+ placeholder: "Type to search or add type of organization",
1196
+ class: "mn-semi bg-grey pd-medium radius-small"
1197
+ }, null, 8, ["modelValue"]),
1198
+ La,
1199
+ a("div", Sa, [
1200
+ h(ze, {
1201
+ photo: b.current.profile.photo,
1202
+ "onUpdate:photo": i[1] || (i[1] = (m) => b.current.profile.photo = m),
1203
+ uploadPath: "organizations/" + b.current._id + "/avatars",
1204
+ class: "h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"
1205
+ }, null, 8, ["photo", "uploadPath"]),
1206
+ Pa
1207
+ ]),
1208
+ h(D, {
1209
+ field: b.current.profile.name,
1210
+ "onUpdate:field": i[2] || (i[2] = (m) => b.current.profile.name = m),
1211
+ placeholder: "Name of organization",
1212
+ class: "mn-thin bg-grey pd-medium radius-small"
1213
+ }, null, 8, ["field"]),
1214
+ h(D, {
1215
+ field: b.current.profile.description,
1216
+ "onUpdate:field": i[3] || (i[3] = (m) => b.current.profile.description = m),
1217
+ placeholder: "Brief description of your group",
1218
+ class: "mn-thin bg-grey pd-medium radius-small"
1219
+ }, null, 8, ["field"]),
1220
+ h(Te, {
1221
+ onTagsChanged: i[4] || (i[4] = (m) => b.current.profile.tags = m),
1222
+ tags: b.current.profile.tags
1223
+ }, null, 8, ["tags"]),
1224
+ za,
1225
+ Ma,
1226
+ h(D, {
1227
+ field: b.current.socials.instagram,
1228
+ "onUpdate:field": i[5] || (i[5] = (m) => b.current.socials.instagram = m),
1229
+ label: "Instagram",
1230
+ placeholder: "",
1231
+ class: "mn-thin bg-grey pd-medium radius-small"
1232
+ }, null, 8, ["field"]),
1233
+ h(D, {
1234
+ field: b.current.socials.twitter,
1235
+ "onUpdate:field": i[6] || (i[6] = (m) => b.current.socials.twitter = m),
1236
+ label: "Twitter",
1237
+ placeholder: "",
1238
+ class: "mn-thin bg-grey pd-medium radius-small"
1239
+ }, null, 8, ["field"]),
1240
+ h(D, {
1241
+ field: b.current.socials.facebook,
1242
+ "onUpdate:field": i[7] || (i[7] = (m) => b.current.socials.facebook = m),
1243
+ label: "Facebook",
1244
+ placeholder: "",
1245
+ class: "mn-thin bg-grey pd-medium radius-small"
1246
+ }, null, 8, ["field"]),
1247
+ h(D, {
1248
+ field: b.current.socials.telegram,
1249
+ "onUpdate:field": i[8] || (i[8] = (m) => b.current.socials.telegram = m),
1250
+ label: "Telegram",
1251
+ placeholder: "",
1252
+ class: "mn-thin bg-grey pd-medium radius-small"
1253
+ }, null, 8, ["field"]),
1254
+ h(ce, {
1255
+ submit: p,
1256
+ callback: l,
1257
+ class: "mn-thin"
1258
+ }, {
1259
+ default: x(() => [
1260
+ W("Save")
1261
+ ]),
1262
+ _: 1
1263
+ })
1264
+ ]));
1265
+ }
1266
+ }, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1267
+ __proto__: null,
1268
+ default: Da
1269
+ }, Symbol.toStringTag, { value: "Module" }));
1270
+ const Aa = { class: "for-transition bg-white radius-big w-100" }, Va = /* @__PURE__ */ a("header", { class: "flex-v-center flex-nowrap flex pd-semi" }, [
1271
+ /* @__PURE__ */ a("h2", { class: "mn-r-medium" }, "Weed dispensaries in Thailand")
1272
+ ], -1), Ia = { class: "pd-semi" }, Ua = {
1273
+ key: 1,
1274
+ class: "cols-3"
1275
+ }, Ba = ["onClick"], Ea = ["src"], ja = {
1276
+ key: 1,
1277
+ class: "radius-medium mn-small i-thin",
1278
+ width: "42",
1279
+ height: "42",
1280
+ viewBox: "0 0 42 42",
1281
+ fill: "none",
1282
+ xmlns: "http://www.w3.org/2000/svg"
1283
+ }, Ta = /* @__PURE__ */ a("circle", {
1284
+ fill: "rgb(var(--main))",
1285
+ cx: "21",
1286
+ cy: "21",
1287
+ r: "21"
1288
+ }, null, -1), Fa = /* @__PURE__ */ a("path", {
1289
+ fill: "#242424",
1290
+ "fill-opacity": "0.1",
1291
+ "fill-rule": "evenodd",
1292
+ "clip-rule": "evenodd",
1293
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
1294
+ }, null, -1), qa = [
1295
+ Ta,
1296
+ Fa
1297
+ ], Ra = { class: "h4 mn-r-semi mn-small" }, Za = ["onClick"], Ha = /* @__PURE__ */ a("path", {
1298
+ fill: "black",
1299
+ d: "M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"
1300
+ }, null, -1), Na = [
1301
+ Ha
1302
+ ], Ka = { class: "t-black p-small" }, zi = {
1303
+ __name: "Organizations",
1304
+ async setup(e) {
1305
+ let t, s;
1306
+ S.user._id && ([t, s] = Y(() => R.read({ owner: S.user._id })), await t, s());
1307
+ const n = q(), d = F();
1308
+ let c = d.query.tab ? d.query.tab : "details";
1309
+ const p = v(c);
1310
+ return d.query.tab = p.value, T(p, (l) => {
1311
+ n.replace({ query: { ...d.query, tab: l } });
1312
+ }), (l, u) => (o(), r("div", Aa, [
1313
+ Va,
1314
+ a("div", Ia, [
1315
+ b.all.length < 1 ? (o(), $(fe, {
1316
+ key: 0,
1317
+ title: "You Haven't Joined Any Organization Yet",
1318
+ description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
1319
+ action: "Create organization",
1320
+ callback: l.a = () => l.$router.push("/app/organization/create/details")
1321
+ }, null, 8, ["callback"])) : (o(), r("div", Ua, [
1322
+ (o(!0), r(O, null, L(b.all, (i) => (o(), r("div", {
1323
+ key: i._id,
1324
+ class: "mn-small radius-medium pd-medium br-2px br-solid br-grey",
1325
+ onClick: (m) => l.$router.push({ name: "Organization", params: { _id: i._id } })
1326
+ }, [
1327
+ i.profile.photo.length > 0 ? (o(), r("img", {
1328
+ key: 0,
1329
+ src: (l.FILE_SERVER_URL || "") + i.profile.photo,
1330
+ class: "radius-medium mn-small i-thin"
1331
+ }, null, 8, Ea)) : (o(), r("svg", ja, qa)),
1332
+ a("p", Ra, f(i.profile.name), 1),
1333
+ (o(), r("svg", {
1334
+ onClick: re((m) => l.$router.push({ name: "Organization Edit", params: { _id: i._id } }), ["stop"]),
1335
+ class: "t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",
1336
+ width: "13",
1337
+ height: "12",
1338
+ viewBox: "0 0 13 12",
1339
+ xmlns: "http://www.w3.org/2000/svg"
1340
+ }, Na, 8, Za)),
1341
+ a("p", Ka, f(i.profile.description.slice(0, 120) + "..."), 1)
1342
+ ], 8, Ba))), 128))
1343
+ ]))
1344
+ ])
1345
+ ]));
1346
+ }
1347
+ };
1348
+ const Wa = {
1349
+ key: 0,
1350
+ class: "t-transp mn-r-small"
1351
+ }, Ya = ["placeholder", "value"], Ja = {
1352
+ key: 0,
1353
+ class: "mn-t-thin invalid-feedback"
1354
+ }, Qa = {
1355
+ __name: "Address",
1356
+ props: {
1357
+ apiKey: {
1358
+ type: String,
1359
+ required: !0
1360
+ },
1361
+ label: null,
1362
+ placeholder: "Enter something here",
1363
+ field: null,
1364
+ location: {
1365
+ type: Object,
1366
+ default: { lat: 48.6900735, lng: 41.1620239 }
1367
+ },
1368
+ address: {
1369
+ type: String,
1370
+ default: ""
1371
+ }
1372
+ },
1373
+ emits: ["update:address", "update:location", "update:country", "update:state", "update:city"],
1374
+ setup(e, { emit: t }) {
1375
+ const s = e, n = v(null);
1376
+ let d;
1377
+ const c = () => {
1378
+ d = new google.maps.places.Autocomplete(n.value), d.addListener("place_changed", l);
1379
+ }, p = () => {
1380
+ d || c();
1381
+ }, l = () => {
1382
+ const u = d.getPlace();
1383
+ if (!u.geometry || !u.address_components)
1384
+ return;
1385
+ let i = "", m = "", w = "";
1386
+ for (let N = 0; N < u.address_components.length; N++) {
1387
+ console.log(u.address_components);
1388
+ let M = u.address_components[N];
1389
+ M.types.includes("country") && (i = M.long_name), M.types.includes("administrative_area_level_1") && (m = M.long_name), M.types.includes("locality") && (w = M.long_name);
1390
+ }
1391
+ const P = u.formatted_address, I = { lat: u.geometry.location.lat(), lng: u.geometry.location.lng() };
1392
+ t("update:address", P), t("update:location", I), t("update:country", i), t("update:state", m), t("update:city", w);
1393
+ };
1394
+ return de(() => {
1395
+ s.address !== n.value && (n.value = s.address);
1396
+ }), pe(() => {
1397
+ c();
1398
+ }), (u, i) => (o(), r("div", {
1399
+ class: te([u.$attrs.class, "flex-nowrap flex"])
1400
+ }, [
1401
+ e.label ? (o(), r("div", Wa, [
1402
+ a("span", null, f(e.label), 1)
1403
+ ])) : g("", !0),
1404
+ a("input", {
1405
+ ref_key: "addressInput",
1406
+ ref: n,
1407
+ class: "w-100",
1408
+ placeholder: e.placeholder,
1409
+ value: e.address,
1410
+ onInput: p
1411
+ }, null, 40, Ya),
1412
+ h(H, {
1413
+ mode: "out-in",
1414
+ name: "fade"
1415
+ }, {
1416
+ default: x(() => [
1417
+ u.validation ? (o(), r("div", Ja, " * " + f(u.validation.message), 1)) : g("", !0)
1418
+ ]),
1419
+ _: 1
1420
+ })
1421
+ ], 2));
1422
+ }
1423
+ }, Xa = /* @__PURE__ */ A(Qa, [["__scopeId", "data-v-faece1a6"]]);
1424
+ const Ga = (e) => (me("data-v-1c7971e5"), e = e(), he(), e), en = { class: "map-container" }, tn = /* @__PURE__ */ Ga(() => /* @__PURE__ */ a("svg", {
1425
+ class: "i-medium",
1426
+ width: "98",
1427
+ height: "98",
1428
+ viewBox: "0 0 98 98",
1429
+ fill: "none",
1430
+ xmlns: "http://www.w3.org/2000/svg"
1431
+ }, [
1432
+ /* @__PURE__ */ a("path", {
1433
+ d: "M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",
1434
+ fill: "white"
1435
+ }),
1436
+ /* @__PURE__ */ a("path", {
1437
+ d: "M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",
1438
+ fill: "white"
1439
+ })
1440
+ ], -1)), sn = [
1441
+ tn
1442
+ ], an = {
1443
+ __name: "LocationMarker",
1444
+ props: {
1445
+ location: {
1446
+ type: Object,
1447
+ default: { lat: 48.6900735, lng: 41.1620239 }
1448
+ },
1449
+ address: {
1450
+ type: String,
1451
+ default: ""
1452
+ },
1453
+ apiKey: String
1454
+ },
1455
+ emits: ["update:location", "update:address", "update:country", "update:state", "update:city"],
1456
+ setup(e, { emit: t }) {
1457
+ const s = e, n = v(null);
1458
+ let d, c;
1459
+ pe(() => {
1460
+ d = new google.maps.Map(n.value, {
1461
+ center: s.location,
1462
+ zoom: 15,
1463
+ mapTypeControl: !1,
1464
+ fullscreenControl: !1
1465
+ }), c = new google.maps.Marker({
1466
+ position: s.location,
1467
+ map: d,
1468
+ draggable: !0
1469
+ }), c.addListener("dragend", (u) => {
1470
+ const i = { lat: u.latLng.lat(), lng: u.latLng.lng() };
1471
+ t("update:location", i), p(i);
1472
+ });
1473
+ }), de(() => {
1474
+ s.location && c && c.setPosition(new google.maps.LatLng(s.location.lat, s.location.lng));
1475
+ }), de(() => {
1476
+ if (s.location && d) {
1477
+ const u = new google.maps.LatLng(s.location.lat, s.location.lng);
1478
+ d.setCenter(u);
1479
+ }
1480
+ });
1481
+ function p(u) {
1482
+ new google.maps.Geocoder().geocode({ location: u }, (m, w) => {
1483
+ if (w === "OK")
1484
+ if (m[0]) {
1485
+ t("update:address", m[0].formatted_address);
1486
+ let P = "", I = "", N = "";
1487
+ m[0].address_components.forEach((M) => {
1488
+ M.types.includes("country") && (P = M.long_name), M.types.includes("administrative_area_level_1") && (I = M.long_name), M.types.includes("locality") && (N = M.long_name);
1489
+ }), t("update:country", P), t("update:state", I), t("update:city", N);
1490
+ } else
1491
+ console.error("No results found");
1492
+ else
1493
+ console.error("Geocoder failed due to: " + w);
1494
+ });
1495
+ }
1496
+ async function l() {
1497
+ navigator.geolocation ? navigator.geolocation.getCurrentPosition((u) => {
1498
+ const i = { lat: u.coords.latitude, lng: u.coords.longitude };
1499
+ t("update:location", i), p(i);
1500
+ }, () => {
1501
+ console.error("Error getting location");
1502
+ }) : console.error("Geolocation is not supported by this browser.");
1503
+ }
1504
+ return (u, i) => (o(), r("div", en, [
1505
+ a("div", {
1506
+ ref_key: "mapContainer",
1507
+ ref: n,
1508
+ class: "w-100 h-100"
1509
+ }, null, 512),
1510
+ a("button", {
1511
+ class: "pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",
1512
+ onClick: l
1513
+ }, sn)
1514
+ ]));
1515
+ }
1516
+ }, nn = /* @__PURE__ */ A(an, [["__scopeId", "data-v-1c7971e5"]]);
1517
+ var on = Object.defineProperty, ln = Object.defineProperties, rn = Object.getOwnPropertyDescriptors, ke = Object.getOwnPropertySymbols, dn = Object.prototype.hasOwnProperty, cn = Object.prototype.propertyIsEnumerable, xe = (e, t, s) => t in e ? on(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, X = (e, t) => {
1518
+ for (var s in t || (t = {}))
1519
+ dn.call(t, s) && xe(e, s, t[s]);
1520
+ if (ke)
1521
+ for (var s of ke(t))
1522
+ cn.call(t, s) && xe(e, s, t[s]);
1523
+ return e;
1524
+ }, Oe = (e, t) => ln(e, rn(t));
1525
+ const un = {
1526
+ props: {
1527
+ autoscroll: {
1528
+ type: Boolean,
1529
+ default: !0
1530
+ }
1531
+ },
1532
+ watch: {
1533
+ typeAheadPointer() {
1534
+ this.autoscroll && this.maybeAdjustScroll();
1535
+ },
1536
+ open(e) {
1537
+ this.autoscroll && e && this.$nextTick(() => this.maybeAdjustScroll());
1538
+ }
1539
+ },
1540
+ methods: {
1541
+ maybeAdjustScroll() {
1542
+ var e;
1543
+ const t = ((e = this.$refs.dropdownMenu) == null ? void 0 : e.children[this.typeAheadPointer]) || !1;
1544
+ if (t) {
1545
+ const s = this.getDropdownViewport(), { top: n, bottom: d, height: c } = t.getBoundingClientRect();
1546
+ if (n < s.top)
1547
+ return this.$refs.dropdownMenu.scrollTop = t.offsetTop;
1548
+ if (d > s.bottom)
1549
+ return this.$refs.dropdownMenu.scrollTop = t.offsetTop - (s.height - c);
1550
+ }
1551
+ },
1552
+ getDropdownViewport() {
1553
+ return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.getBoundingClientRect() : {
1554
+ height: 0,
1555
+ top: 0,
1556
+ bottom: 0
1557
+ };
1558
+ }
1559
+ }
1560
+ }, pn = {
1561
+ data() {
1562
+ return {
1563
+ typeAheadPointer: -1
1564
+ };
1565
+ },
1566
+ watch: {
1567
+ filteredOptions() {
1568
+ for (let e = 0; e < this.filteredOptions.length; e++)
1569
+ if (this.selectable(this.filteredOptions[e])) {
1570
+ this.typeAheadPointer = e;
1571
+ break;
1572
+ }
1573
+ },
1574
+ open(e) {
1575
+ e && this.typeAheadToLastSelected();
1576
+ },
1577
+ selectedValue() {
1578
+ this.open && this.typeAheadToLastSelected();
1579
+ }
1580
+ },
1581
+ methods: {
1582
+ typeAheadUp() {
1583
+ for (let e = this.typeAheadPointer - 1; e >= 0; e--)
1584
+ if (this.selectable(this.filteredOptions[e])) {
1585
+ this.typeAheadPointer = e;
1586
+ break;
1587
+ }
1588
+ },
1589
+ typeAheadDown() {
1590
+ for (let e = this.typeAheadPointer + 1; e < this.filteredOptions.length; e++)
1591
+ if (this.selectable(this.filteredOptions[e])) {
1592
+ this.typeAheadPointer = e;
1593
+ break;
1594
+ }
1595
+ },
1596
+ typeAheadSelect() {
1597
+ const e = this.filteredOptions[this.typeAheadPointer];
1598
+ e && this.selectable(e) && this.select(e);
1599
+ },
1600
+ typeAheadToLastSelected() {
1601
+ this.typeAheadPointer = this.selectedValue.length !== 0 ? this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length - 1]) : -1;
1602
+ }
1603
+ }
1604
+ }, mn = {
1605
+ props: {
1606
+ loading: {
1607
+ type: Boolean,
1608
+ default: !1
1609
+ }
1610
+ },
1611
+ data() {
1612
+ return {
1613
+ mutableLoading: !1
1614
+ };
1615
+ },
1616
+ watch: {
1617
+ search() {
1618
+ this.$emit("search", this.search, this.toggleLoading);
1619
+ },
1620
+ loading(e) {
1621
+ this.mutableLoading = e;
1622
+ }
1623
+ },
1624
+ methods: {
1625
+ toggleLoading(e = null) {
1626
+ return e == null ? this.mutableLoading = !this.mutableLoading : this.mutableLoading = e;
1627
+ }
1628
+ }
1629
+ }, be = (e, t) => {
1630
+ const s = e.__vccOpts || e;
1631
+ for (const [n, d] of t)
1632
+ s[n] = d;
1633
+ return s;
1634
+ }, hn = {}, _n = {
1635
+ xmlns: "http://www.w3.org/2000/svg",
1636
+ width: "10",
1637
+ height: "10"
1638
+ }, fn = /* @__PURE__ */ a("path", { d: "M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z" }, null, -1), gn = [
1639
+ fn
1640
+ ];
1641
+ function bn(e, t) {
1642
+ return o(), r("svg", _n, gn);
1643
+ }
1644
+ const vn = /* @__PURE__ */ be(hn, [["render", bn]]), yn = {}, wn = {
1645
+ xmlns: "http://www.w3.org/2000/svg",
1646
+ width: "14",
1647
+ height: "10"
1648
+ }, $n = /* @__PURE__ */ a("path", { d: "M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z" }, null, -1), Cn = [
1649
+ $n
1650
+ ];
1651
+ function kn(e, t) {
1652
+ return o(), r("svg", wn, Cn);
1653
+ }
1654
+ const xn = /* @__PURE__ */ be(yn, [["render", kn]]), Le = {
1655
+ Deselect: vn,
1656
+ OpenIndicator: xn
1657
+ }, On = {
1658
+ mounted(e, { instance: t }) {
1659
+ if (t.appendToBody) {
1660
+ const {
1661
+ height: s,
1662
+ top: n,
1663
+ left: d,
1664
+ width: c
1665
+ } = t.$refs.toggle.getBoundingClientRect();
1666
+ let p = window.scrollX || window.pageXOffset, l = window.scrollY || window.pageYOffset;
1667
+ e.unbindPosition = t.calculatePosition(e, t, {
1668
+ width: c + "px",
1669
+ left: p + d + "px",
1670
+ top: l + n + s + "px"
1671
+ }), document.body.appendChild(e);
1672
+ }
1673
+ },
1674
+ unmounted(e, { instance: t }) {
1675
+ t.appendToBody && (e.unbindPosition && typeof e.unbindPosition == "function" && e.unbindPosition(), e.parentNode && e.parentNode.removeChild(e));
1676
+ }
1677
+ };
1678
+ function Ln(e) {
1679
+ const t = {};
1680
+ return Object.keys(e).sort().forEach((s) => {
1681
+ t[s] = e[s];
1682
+ }), JSON.stringify(t);
1683
+ }
1684
+ let Sn = 0;
1685
+ function Pn() {
1686
+ return ++Sn;
1687
+ }
1688
+ const zn = {
1689
+ components: X({}, Le),
1690
+ directives: { appendToBody: On },
1691
+ mixins: [un, pn, mn],
1692
+ compatConfig: {
1693
+ MODE: 3
1694
+ },
1695
+ emits: [
1696
+ "open",
1697
+ "close",
1698
+ "update:modelValue",
1699
+ "search",
1700
+ "search:compositionstart",
1701
+ "search:compositionend",
1702
+ "search:keydown",
1703
+ "search:blur",
1704
+ "search:focus",
1705
+ "search:input",
1706
+ "option:created",
1707
+ "option:selecting",
1708
+ "option:selected",
1709
+ "option:deselecting",
1710
+ "option:deselected"
1711
+ ],
1712
+ props: {
1713
+ modelValue: {},
1714
+ components: {
1715
+ type: Object,
1716
+ default: () => ({})
1717
+ },
1718
+ options: {
1719
+ type: Array,
1720
+ default() {
1721
+ return [];
1722
+ }
1723
+ },
1724
+ disabled: {
1725
+ type: Boolean,
1726
+ default: !1
1727
+ },
1728
+ clearable: {
1729
+ type: Boolean,
1730
+ default: !0
1731
+ },
1732
+ deselectFromDropdown: {
1733
+ type: Boolean,
1734
+ default: !1
1735
+ },
1736
+ searchable: {
1737
+ type: Boolean,
1738
+ default: !0
1739
+ },
1740
+ multiple: {
1741
+ type: Boolean,
1742
+ default: !1
1743
+ },
1744
+ placeholder: {
1745
+ type: String,
1746
+ default: ""
1747
+ },
1748
+ transition: {
1749
+ type: String,
1750
+ default: "vs__fade"
1751
+ },
1752
+ clearSearchOnSelect: {
1753
+ type: Boolean,
1754
+ default: !0
1755
+ },
1756
+ closeOnSelect: {
1757
+ type: Boolean,
1758
+ default: !0
1759
+ },
1760
+ label: {
1761
+ type: String,
1762
+ default: "label"
1763
+ },
1764
+ autocomplete: {
1765
+ type: String,
1766
+ default: "off"
1767
+ },
1768
+ reduce: {
1769
+ type: Function,
1770
+ default: (e) => e
1771
+ },
1772
+ selectable: {
1773
+ type: Function,
1774
+ default: (e) => !0
1775
+ },
1776
+ getOptionLabel: {
1777
+ type: Function,
1778
+ default(e) {
1779
+ return typeof e == "object" ? e.hasOwnProperty(this.label) ? e[this.label] : console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}.
1780
+ https://vue-select.org/api/props.html#getoptionlabel`) : e;
1781
+ }
1782
+ },
1783
+ getOptionKey: {
1784
+ type: Function,
1785
+ default(e) {
1786
+ if (typeof e != "object")
1787
+ return e;
1788
+ try {
1789
+ return e.hasOwnProperty("id") ? e.id : Ln(e);
1790
+ } catch (t) {
1791
+ return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
1792
+ https://vue-select.org/api/props.html#getoptionkey`, e, t);
1793
+ }
1794
+ }
1795
+ },
1796
+ onTab: {
1797
+ type: Function,
1798
+ default: function() {
1799
+ this.selectOnTab && !this.isComposing && this.typeAheadSelect();
1800
+ }
1801
+ },
1802
+ taggable: {
1803
+ type: Boolean,
1804
+ default: !1
1805
+ },
1806
+ tabindex: {
1807
+ type: Number,
1808
+ default: null
1809
+ },
1810
+ pushTags: {
1811
+ type: Boolean,
1812
+ default: !1
1813
+ },
1814
+ filterable: {
1815
+ type: Boolean,
1816
+ default: !0
1817
+ },
1818
+ filterBy: {
1819
+ type: Function,
1820
+ default(e, t, s) {
1821
+ return (t || "").toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1;
1822
+ }
1823
+ },
1824
+ filter: {
1825
+ type: Function,
1826
+ default(e, t) {
1827
+ return e.filter((s) => {
1828
+ let n = this.getOptionLabel(s);
1829
+ return typeof n == "number" && (n = n.toString()), this.filterBy(s, n, t);
1830
+ });
1831
+ }
1832
+ },
1833
+ createOption: {
1834
+ type: Function,
1835
+ default(e) {
1836
+ return typeof this.optionList[0] == "object" ? { [this.label]: e } : e;
1837
+ }
1838
+ },
1839
+ resetOnOptionsChange: {
1840
+ default: !1,
1841
+ validator: (e) => ["function", "boolean"].includes(typeof e)
1842
+ },
1843
+ clearSearchOnBlur: {
1844
+ type: Function,
1845
+ default: function({ clearSearchOnSelect: e, multiple: t }) {
1846
+ return e && !t;
1847
+ }
1848
+ },
1849
+ noDrop: {
1850
+ type: Boolean,
1851
+ default: !1
1852
+ },
1853
+ inputId: {
1854
+ type: String
1855
+ },
1856
+ dir: {
1857
+ type: String,
1858
+ default: "auto"
1859
+ },
1860
+ selectOnTab: {
1861
+ type: Boolean,
1862
+ default: !1
1863
+ },
1864
+ selectOnKeyCodes: {
1865
+ type: Array,
1866
+ default: () => [13]
1867
+ },
1868
+ searchInputQuerySelector: {
1869
+ type: String,
1870
+ default: "[type=search]"
1871
+ },
1872
+ mapKeydown: {
1873
+ type: Function,
1874
+ default: (e, t) => e
1875
+ },
1876
+ appendToBody: {
1877
+ type: Boolean,
1878
+ default: !1
1879
+ },
1880
+ calculatePosition: {
1881
+ type: Function,
1882
+ default(e, t, { width: s, top: n, left: d }) {
1883
+ e.style.top = n, e.style.left = d, e.style.width = s;
1884
+ }
1885
+ },
1886
+ dropdownShouldOpen: {
1887
+ type: Function,
1888
+ default({ noDrop: e, open: t, mutableLoading: s }) {
1889
+ return e ? !1 : t && !s;
1890
+ }
1891
+ },
1892
+ uid: {
1893
+ type: [String, Number],
1894
+ default: () => Pn()
1895
+ }
1896
+ },
1897
+ data() {
1898
+ return {
1899
+ search: "",
1900
+ open: !1,
1901
+ isComposing: !1,
1902
+ pushedTags: [],
1903
+ _value: [],
1904
+ deselectButtons: []
1905
+ };
1906
+ },
1907
+ computed: {
1908
+ isReducingValues() {
1909
+ return this.$props.reduce !== this.$options.props.reduce.default;
1910
+ },
1911
+ isTrackingValues() {
1912
+ return typeof this.modelValue > "u" || this.isReducingValues;
1913
+ },
1914
+ selectedValue() {
1915
+ let e = this.modelValue;
1916
+ return this.isTrackingValues && (e = this.$data._value), e != null && e !== "" ? [].concat(e) : [];
1917
+ },
1918
+ optionList() {
1919
+ return this.options.concat(this.pushTags ? this.pushedTags : []);
1920
+ },
1921
+ searchEl() {
1922
+ return this.$slots.search ? this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector) : this.$refs.search;
1923
+ },
1924
+ scope() {
1925
+ const e = {
1926
+ search: this.search,
1927
+ loading: this.loading,
1928
+ searching: this.searching,
1929
+ filteredOptions: this.filteredOptions
1930
+ };
1931
+ return {
1932
+ search: {
1933
+ attributes: X({
1934
+ disabled: this.disabled,
1935
+ placeholder: this.searchPlaceholder,
1936
+ tabindex: this.tabindex,
1937
+ readonly: !this.searchable,
1938
+ id: this.inputId,
1939
+ "aria-autocomplete": "list",
1940
+ "aria-labelledby": `vs${this.uid}__combobox`,
1941
+ "aria-controls": `vs${this.uid}__listbox`,
1942
+ ref: "search",
1943
+ type: "search",
1944
+ autocomplete: this.autocomplete,
1945
+ value: this.search
1946
+ }, this.dropdownOpen && this.filteredOptions[this.typeAheadPointer] ? {
1947
+ "aria-activedescendant": `vs${this.uid}__option-${this.typeAheadPointer}`
1948
+ } : {}),
1949
+ events: {
1950
+ compositionstart: () => this.isComposing = !0,
1951
+ compositionend: () => this.isComposing = !1,
1952
+ keydown: this.onSearchKeyDown,
1953
+ blur: this.onSearchBlur,
1954
+ focus: this.onSearchFocus,
1955
+ input: (t) => this.search = t.target.value
1956
+ }
1957
+ },
1958
+ spinner: {
1959
+ loading: this.mutableLoading
1960
+ },
1961
+ noOptions: {
1962
+ search: this.search,
1963
+ loading: this.mutableLoading,
1964
+ searching: this.searching
1965
+ },
1966
+ openIndicator: {
1967
+ attributes: {
1968
+ ref: "openIndicator",
1969
+ role: "presentation",
1970
+ class: "vs__open-indicator"
1971
+ }
1972
+ },
1973
+ listHeader: e,
1974
+ listFooter: e,
1975
+ header: Oe(X({}, e), { deselect: this.deselect }),
1976
+ footer: Oe(X({}, e), { deselect: this.deselect })
1977
+ };
1978
+ },
1979
+ childComponents() {
1980
+ return X(X({}, Le), this.components);
1981
+ },
1982
+ stateClasses() {
1983
+ return {
1984
+ "vs--open": this.dropdownOpen,
1985
+ "vs--single": !this.multiple,
1986
+ "vs--multiple": this.multiple,
1987
+ "vs--searching": this.searching && !this.noDrop,
1988
+ "vs--searchable": this.searchable && !this.noDrop,
1989
+ "vs--unsearchable": !this.searchable,
1990
+ "vs--loading": this.mutableLoading,
1991
+ "vs--disabled": this.disabled
1992
+ };
1993
+ },
1994
+ searching() {
1995
+ return !!this.search;
1996
+ },
1997
+ dropdownOpen() {
1998
+ return this.dropdownShouldOpen(this);
1999
+ },
2000
+ searchPlaceholder() {
2001
+ return this.isValueEmpty && this.placeholder ? this.placeholder : void 0;
2002
+ },
2003
+ filteredOptions() {
2004
+ const e = [].concat(this.optionList);
2005
+ if (!this.filterable && !this.taggable)
2006
+ return e;
2007
+ const t = this.search.length ? this.filter(e, this.search, this) : e;
2008
+ if (this.taggable && this.search.length) {
2009
+ const s = this.createOption(this.search);
2010
+ this.optionExists(s) || t.unshift(s);
2011
+ }
2012
+ return t;
2013
+ },
2014
+ isValueEmpty() {
2015
+ return this.selectedValue.length === 0;
2016
+ },
2017
+ showClearButton() {
2018
+ return !this.multiple && this.clearable && !this.open && !this.isValueEmpty;
2019
+ }
2020
+ },
2021
+ watch: {
2022
+ options(e, t) {
2023
+ const s = () => typeof this.resetOnOptionsChange == "function" ? this.resetOnOptionsChange(e, t, this.selectedValue) : this.resetOnOptionsChange;
2024
+ !this.taggable && s() && this.clearSelection(), this.modelValue && this.isTrackingValues && this.setInternalValueFromOptions(this.modelValue);
2025
+ },
2026
+ modelValue: {
2027
+ immediate: !0,
2028
+ handler(e) {
2029
+ this.isTrackingValues && this.setInternalValueFromOptions(e);
2030
+ }
2031
+ },
2032
+ multiple() {
2033
+ this.clearSelection();
2034
+ },
2035
+ open(e) {
2036
+ this.$emit(e ? "open" : "close");
2037
+ }
2038
+ },
2039
+ created() {
2040
+ this.mutableLoading = this.loading;
2041
+ },
2042
+ methods: {
2043
+ setInternalValueFromOptions(e) {
2044
+ Array.isArray(e) ? this.$data._value = e.map((t) => this.findOptionFromReducedValue(t)) : this.$data._value = this.findOptionFromReducedValue(e);
2045
+ },
2046
+ select(e) {
2047
+ this.$emit("option:selecting", e), this.isOptionSelected(e) ? this.deselectFromDropdown && (this.clearable || this.multiple && this.selectedValue.length > 1) && this.deselect(e) : (this.taggable && !this.optionExists(e) && (this.$emit("option:created", e), this.pushTag(e)), this.multiple && (e = this.selectedValue.concat(e)), this.updateValue(e), this.$emit("option:selected", e)), this.onAfterSelect(e);
2048
+ },
2049
+ deselect(e) {
2050
+ this.$emit("option:deselecting", e), this.updateValue(this.selectedValue.filter((t) => !this.optionComparator(t, e))), this.$emit("option:deselected", e);
2051
+ },
2052
+ clearSelection() {
2053
+ this.updateValue(this.multiple ? [] : null);
2054
+ },
2055
+ onAfterSelect(e) {
2056
+ this.closeOnSelect && (this.open = !this.open, this.searchEl.blur()), this.clearSearchOnSelect && (this.search = "");
2057
+ },
2058
+ updateValue(e) {
2059
+ typeof this.modelValue > "u" && (this.$data._value = e), e !== null && (Array.isArray(e) ? e = e.map((t) => this.reduce(t)) : e = this.reduce(e)), this.$emit("update:modelValue", e);
2060
+ },
2061
+ toggleDropdown(e) {
2062
+ const t = e.target !== this.searchEl;
2063
+ t && e.preventDefault();
2064
+ const s = [
2065
+ ...this.deselectButtons || [],
2066
+ this.$refs.clearButton
2067
+ ];
2068
+ if (this.searchEl === void 0 || s.filter(Boolean).some((n) => n.contains(e.target) || n === e.target)) {
2069
+ e.preventDefault();
2070
+ return;
2071
+ }
2072
+ this.open && t ? this.searchEl.blur() : this.disabled || (this.open = !0, this.searchEl.focus());
2073
+ },
2074
+ isOptionSelected(e) {
2075
+ return this.selectedValue.some((t) => this.optionComparator(t, e));
2076
+ },
2077
+ isOptionDeselectable(e) {
2078
+ return this.isOptionSelected(e) && this.deselectFromDropdown;
2079
+ },
2080
+ optionComparator(e, t) {
2081
+ return this.getOptionKey(e) === this.getOptionKey(t);
2082
+ },
2083
+ findOptionFromReducedValue(e) {
2084
+ const t = (n) => JSON.stringify(this.reduce(n)) === JSON.stringify(e), s = [...this.options, ...this.pushedTags].filter(t);
2085
+ return s.length === 1 ? s[0] : s.find((n) => this.optionComparator(n, this.$data._value)) || e;
2086
+ },
2087
+ closeSearchOptions() {
2088
+ this.open = !1, this.$emit("search:blur");
2089
+ },
2090
+ maybeDeleteValue() {
2091
+ if (!this.searchEl.value.length && this.selectedValue && this.selectedValue.length && this.clearable) {
2092
+ let e = null;
2093
+ this.multiple && (e = [
2094
+ ...this.selectedValue.slice(0, this.selectedValue.length - 1)
2095
+ ]), this.updateValue(e);
2096
+ }
2097
+ },
2098
+ optionExists(e) {
2099
+ return this.optionList.some((t) => this.optionComparator(t, e));
2100
+ },
2101
+ normalizeOptionForSlot(e) {
2102
+ return typeof e == "object" ? e : { [this.label]: e };
2103
+ },
2104
+ pushTag(e) {
2105
+ this.pushedTags.push(e);
2106
+ },
2107
+ onEscape() {
2108
+ this.search.length ? this.search = "" : this.searchEl.blur();
2109
+ },
2110
+ onSearchBlur() {
2111
+ if (this.mousedown && !this.searching)
2112
+ this.mousedown = !1;
2113
+ else {
2114
+ const { clearSearchOnSelect: e, multiple: t } = this;
2115
+ this.clearSearchOnBlur({ clearSearchOnSelect: e, multiple: t }) && (this.search = ""), this.closeSearchOptions();
2116
+ return;
2117
+ }
2118
+ if (this.search.length === 0 && this.options.length === 0) {
2119
+ this.closeSearchOptions();
2120
+ return;
2121
+ }
2122
+ },
2123
+ onSearchFocus() {
2124
+ this.open = !0, this.$emit("search:focus");
2125
+ },
2126
+ onMousedown() {
2127
+ this.mousedown = !0;
2128
+ },
2129
+ onMouseUp() {
2130
+ this.mousedown = !1;
2131
+ },
2132
+ onSearchKeyDown(e) {
2133
+ const t = (d) => (d.preventDefault(), !this.isComposing && this.typeAheadSelect()), s = {
2134
+ 8: (d) => this.maybeDeleteValue(),
2135
+ 9: (d) => this.onTab(),
2136
+ 27: (d) => this.onEscape(),
2137
+ 38: (d) => (d.preventDefault(), this.typeAheadUp()),
2138
+ 40: (d) => (d.preventDefault(), this.typeAheadDown())
2139
+ };
2140
+ this.selectOnKeyCodes.forEach((d) => s[d] = t);
2141
+ const n = this.mapKeydown(s, this);
2142
+ if (typeof n[e.keyCode] == "function")
2143
+ return n[e.keyCode](e);
2144
+ }
2145
+ }
2146
+ }, Mn = ["dir"], Dn = ["id", "aria-expanded", "aria-owns"], An = {
2147
+ ref: "selectedOptions",
2148
+ class: "vs__selected-options"
2149
+ }, Vn = ["disabled", "title", "aria-label", "onClick"], In = {
2150
+ ref: "actions",
2151
+ class: "vs__actions"
2152
+ }, Un = ["disabled"], Bn = { class: "vs__spinner" }, En = ["id"], jn = ["id", "aria-selected", "onMouseover", "onClick"], Tn = {
2153
+ key: 0,
2154
+ class: "vs__no-options"
2155
+ }, Fn = /* @__PURE__ */ W(" Sorry, no matching options. "), qn = ["id"];
2156
+ function Rn(e, t, s, n, d, c) {
2157
+ const p = Ie("append-to-body");
2158
+ return o(), r("div", {
2159
+ dir: s.dir,
2160
+ class: te(["v-select", c.stateClasses])
2161
+ }, [
2162
+ z(e.$slots, "header", V(U(c.scope.header))),
2163
+ a("div", {
2164
+ id: `vs${s.uid}__combobox`,
2165
+ ref: "toggle",
2166
+ class: "vs__dropdown-toggle",
2167
+ role: "combobox",
2168
+ "aria-expanded": c.dropdownOpen.toString(),
2169
+ "aria-owns": `vs${s.uid}__listbox`,
2170
+ "aria-label": "Search for option",
2171
+ onMousedown: t[1] || (t[1] = (l) => c.toggleDropdown(l))
2172
+ }, [
2173
+ a("div", An, [
2174
+ (o(!0), r(O, null, L(c.selectedValue, (l, u) => z(e.$slots, "selected-option-container", {
2175
+ option: c.normalizeOptionForSlot(l),
2176
+ deselect: c.deselect,
2177
+ multiple: s.multiple,
2178
+ disabled: s.disabled
2179
+ }, () => [
2180
+ (o(), r("span", {
2181
+ key: s.getOptionKey(l),
2182
+ class: "vs__selected"
2183
+ }, [
2184
+ z(e.$slots, "selected-option", V(U(c.normalizeOptionForSlot(l))), () => [
2185
+ W(f(s.getOptionLabel(l)), 1)
2186
+ ]),
2187
+ s.multiple ? (o(), r("button", {
2188
+ key: 0,
2189
+ ref_for: !0,
2190
+ ref: (i) => d.deselectButtons[u] = i,
2191
+ disabled: s.disabled,
2192
+ type: "button",
2193
+ class: "vs__deselect",
2194
+ title: `Deselect ${s.getOptionLabel(l)}`,
2195
+ "aria-label": `Deselect ${s.getOptionLabel(l)}`,
2196
+ onClick: (i) => c.deselect(l)
2197
+ }, [
2198
+ (o(), $(le(c.childComponents.Deselect)))
2199
+ ], 8, Vn)) : g("", !0)
2200
+ ]))
2201
+ ])), 256)),
2202
+ z(e.$slots, "search", V(U(c.scope.search)), () => [
2203
+ a("input", ve({ class: "vs__search" }, c.scope.search.attributes, Ue(c.scope.search.events)), null, 16)
2204
+ ])
2205
+ ], 512),
2206
+ a("div", In, [
2207
+ ae(a("button", {
2208
+ ref: "clearButton",
2209
+ disabled: s.disabled,
2210
+ type: "button",
2211
+ class: "vs__clear",
2212
+ title: "Clear Selected",
2213
+ "aria-label": "Clear Selected",
2214
+ onClick: t[0] || (t[0] = (...l) => c.clearSelection && c.clearSelection(...l))
2215
+ }, [
2216
+ (o(), $(le(c.childComponents.Deselect)))
2217
+ ], 8, Un), [
2218
+ [ye, c.showClearButton]
2219
+ ]),
2220
+ z(e.$slots, "open-indicator", V(U(c.scope.openIndicator)), () => [
2221
+ s.noDrop ? g("", !0) : (o(), $(le(c.childComponents.OpenIndicator), V(ve({ key: 0 }, c.scope.openIndicator.attributes)), null, 16))
2222
+ ]),
2223
+ z(e.$slots, "spinner", V(U(c.scope.spinner)), () => [
2224
+ ae(a("div", Bn, "Loading...", 512), [
2225
+ [ye, e.mutableLoading]
2226
+ ])
2227
+ ])
2228
+ ], 512)
2229
+ ], 40, Dn),
2230
+ h(H, { name: s.transition }, {
2231
+ default: x(() => [
2232
+ c.dropdownOpen ? ae((o(), r("ul", {
2233
+ id: `vs${s.uid}__listbox`,
2234
+ ref: "dropdownMenu",
2235
+ key: `vs${s.uid}__listbox`,
2236
+ class: "vs__dropdown-menu",
2237
+ role: "listbox",
2238
+ tabindex: "-1",
2239
+ onMousedown: t[2] || (t[2] = re((...l) => c.onMousedown && c.onMousedown(...l), ["prevent"])),
2240
+ onMouseup: t[3] || (t[3] = (...l) => c.onMouseUp && c.onMouseUp(...l))
2241
+ }, [
2242
+ z(e.$slots, "list-header", V(U(c.scope.listHeader))),
2243
+ (o(!0), r(O, null, L(c.filteredOptions, (l, u) => (o(), r("li", {
2244
+ id: `vs${s.uid}__option-${u}`,
2245
+ key: s.getOptionKey(l),
2246
+ role: "option",
2247
+ class: te(["vs__dropdown-option", {
2248
+ "vs__dropdown-option--deselect": c.isOptionDeselectable(l) && u === e.typeAheadPointer,
2249
+ "vs__dropdown-option--selected": c.isOptionSelected(l),
2250
+ "vs__dropdown-option--highlight": u === e.typeAheadPointer,
2251
+ "vs__dropdown-option--disabled": !s.selectable(l)
2252
+ }]),
2253
+ "aria-selected": u === e.typeAheadPointer ? !0 : null,
2254
+ onMouseover: (i) => s.selectable(l) ? e.typeAheadPointer = u : null,
2255
+ onClick: re((i) => s.selectable(l) ? c.select(l) : null, ["prevent", "stop"])
2256
+ }, [
2257
+ z(e.$slots, "option", V(U(c.normalizeOptionForSlot(l))), () => [
2258
+ W(f(s.getOptionLabel(l)), 1)
2259
+ ])
2260
+ ], 42, jn))), 128)),
2261
+ c.filteredOptions.length === 0 ? (o(), r("li", Tn, [
2262
+ z(e.$slots, "no-options", V(U(c.scope.noOptions)), () => [
2263
+ Fn
2264
+ ])
2265
+ ])) : g("", !0),
2266
+ z(e.$slots, "list-footer", V(U(c.scope.listFooter)))
2267
+ ], 40, En)), [
2268
+ [p]
2269
+ ]) : (o(), r("ul", {
2270
+ key: 1,
2271
+ id: `vs${s.uid}__listbox`,
2272
+ role: "listbox",
2273
+ style: { display: "none", visibility: "hidden" }
2274
+ }, null, 8, qn))
2275
+ ]),
2276
+ _: 3
2277
+ }, 8, ["name"]),
2278
+ z(e.$slots, "footer", V(U(c.scope.footer)))
2279
+ ], 10, Mn);
2280
+ }
2281
+ const Ve = /* @__PURE__ */ be(zn, [["render", Rn]]);
2282
+ const Zn = { class: "w-100" }, Hn = { class: "flex" }, Nn = { class: "mn-regular" }, Kn = { class: "flex-column flex-wrap block" }, Wn = {
2283
+ key: 0,
2284
+ class: "w-100"
2285
+ }, Yn = { class: "w-100 flex-center flex-nowrap flex" }, Jn = { class: "mn-r-regular w-100" }, Qn = ["onClick"], Xn = {
2286
+ key: 0,
2287
+ class: "mn-t-small mn-small w-100"
2288
+ }, Mi = {
2289
+ __name: "EditArray",
2290
+ props: {
2291
+ name: Object,
2292
+ items: Array
2293
+ },
2294
+ emits: ["add", "remove"],
2295
+ setup(e, { emit: t }) {
2296
+ q(), F();
2297
+ let s = oe([]);
2298
+ Be(s);
2299
+ const n = v(null), d = v(null), c = v(null);
2300
+ Z(() => {
2301
+ if (n.value === null || c.value === null || c.value === "")
2302
+ return !0;
2303
+ if (n.value.modifications.length > 0)
2304
+ return d.value === null;
2305
+ });
2306
+ function p(l) {
2307
+ store.commit("leftovers/deleteItemFromLeftover", l);
2308
+ }
2309
+ return (l, u) => (o(), r("div", Zn, [
2310
+ a("div", Hn, [
2311
+ a("h3", Nn, f(e.name), 1)
2312
+ ]),
2313
+ a("ul", Kn, [
2314
+ e.items.length < 1 ? (o(), r("span", Wn, "Вы еще не добавили позиции")) : g("", !0),
2315
+ (o(!0), r(O, null, L(e.items, (i, m) => (o(), r("li", {
2316
+ key: i._id,
2317
+ class: "w-100"
2318
+ }, [
2319
+ a("div", Yn, [
2320
+ a("span", Jn, f(i.name), 1),
2321
+ a("a", {
2322
+ class: "w-20 button",
2323
+ onClick: (w) => p(i)
2324
+ }, "Удалить", 8, Qn)
2325
+ ]),
2326
+ m != e.items.length - 1 ? (o(), r("hr", Xn)) : g("", !0)
2327
+ ]))), 128))
2328
+ ])
2329
+ ]));
2330
+ }
2331
+ };
2332
+ const Gn = { class: "br-grey radius-small mn-small" }, eo = {
2333
+ key: 1,
2334
+ class: "pd-small br-grey br-1px br-solid"
2335
+ }, to = ["disabled"], so = {
2336
+ __name: "DepartmentMemberModify",
2337
+ props: {
2338
+ isPopupOpen: Boolean,
2339
+ department: Number,
2340
+ departments: Array,
2341
+ maindepartment: Object,
2342
+ alldepartments: Array
2343
+ },
2344
+ emits: ["callback", "remove"],
2345
+ setup(e, { emit: t }) {
2346
+ const s = e, n = v({
2347
+ subdepartment: null
2348
+ });
2349
+ s.department !== null && (n.value = s.departments[s.department]);
2350
+ function d(u, i, m) {
2351
+ return u.filter((w) => !(i.some((P) => P._id === w._id) || m._id === w._id));
2352
+ }
2353
+ const c = Z(() => d(s.alldepartments, s.departments, s.maindepartment));
2354
+ async function p() {
2355
+ s.departments.push(n.value.subdepartment), t("callback");
2356
+ }
2357
+ async function l() {
2358
+ s.departments.splice(s.department, 1), t("callback");
2359
+ }
2360
+ return (u, i) => (o(), r("div", null, [
2361
+ a("div", Gn, [
2362
+ s.department === null ? (o(), $(k(Ve), {
2363
+ key: 0,
2364
+ modelValue: n.value.subdepartment,
2365
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => n.value.subdepartment = m),
2366
+ options: k(c),
2367
+ "get-option-label": (m) => m.name,
2368
+ class: "w-100 mn-small"
2369
+ }, null, 8, ["modelValue", "options", "get-option-label"])) : (o(), r("div", eo, f(n.value.name ? n.value.name : "Безымянный"), 1))
2370
+ ]),
2371
+ s.department === null ? (o(), r("button", {
2372
+ key: 0,
2373
+ disabled: !n.value.subdepartment,
2374
+ onClick: p,
2375
+ class: "w-100 button bg-second t-white"
2376
+ }, " Добавить отдел ", 8, to)) : g("", !0),
2377
+ s.department !== null ? (o(), r("button", {
2378
+ key: 1,
2379
+ onClick: l,
2380
+ class: "w-100 button bg-fourth t-white"
2381
+ }, " Удалить отдел ")) : g("", !0)
2382
+ ]));
2383
+ }
2384
+ }, Di = /* @__PURE__ */ A(so, [["__scopeId", "data-v-21f393e1"]]);
2385
+ const ao = { class: "br-grey radius-small mn-small" }, no = {
2386
+ key: 1,
2387
+ class: "pd-small br-grey br-1px br-solid"
2388
+ }, oo = ["disabled"], io = {
2389
+ __name: "DepartmentSubDepartmentModify",
2390
+ props: {
2391
+ isPopupOpen: Boolean,
2392
+ department: Number,
2393
+ departments: Array,
2394
+ maindepartment: Object,
2395
+ alldepartments: Array
2396
+ },
2397
+ emits: ["callback", "remove"],
2398
+ setup(e, { emit: t }) {
2399
+ const s = e, n = v({
2400
+ subdepartment: null
2401
+ });
2402
+ s.department !== null && (n.value = s.departments[s.department]);
2403
+ function d(u, i, m) {
2404
+ return u.filter((w) => !(i.some((P) => P._id === w._id) || m._id === w._id));
2405
+ }
2406
+ const c = Z(() => d(s.alldepartments, s.departments, s.maindepartment));
2407
+ async function p() {
2408
+ s.departments.push(n.value.subdepartment), t("callback");
2409
+ }
2410
+ async function l() {
2411
+ s.departments.splice(s.department, 1), t("callback");
2412
+ }
2413
+ return (u, i) => (o(), r("div", null, [
2414
+ a("div", ao, [
2415
+ s.department === null ? (o(), $(k(Ve), {
2416
+ key: 0,
2417
+ modelValue: n.value.subdepartment,
2418
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => n.value.subdepartment = m),
2419
+ options: k(c),
2420
+ "get-option-label": (m) => m.name,
2421
+ class: "w-100 mn-small"
2422
+ }, null, 8, ["modelValue", "options", "get-option-label"])) : (o(), r("div", no, f(n.value.name ? n.value.name : "Безымянный"), 1))
2423
+ ]),
2424
+ s.department === null ? (o(), r("button", {
2425
+ key: 0,
2426
+ disabled: !n.value.subdepartment,
2427
+ onClick: p,
2428
+ class: "w-100 button bg-second t-white"
2429
+ }, " Добавить отдел ", 8, oo)) : g("", !0),
2430
+ s.department !== null ? (o(), r("button", {
2431
+ key: 1,
2432
+ onClick: l,
2433
+ class: "w-100 button bg-fourth t-white"
2434
+ }, " Удалить отдел ")) : g("", !0)
2435
+ ]));
2436
+ }
2437
+ }, Ai = /* @__PURE__ */ A(io, [["__scopeId", "data-v-d3c6f191"]]);
2438
+ const se = (e) => (me("data-v-195322bd"), e = e(), he(), e), lo = { class: "for-transition w-100" }, ro = { class: "pd-b-zero pd-t-zero pd-thin" }, co = { class: "pd-thin" }, uo = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, po = {
2439
+ key: 0,
2440
+ class: "mn-r-auto"
2441
+ }, mo = {
2442
+ key: 1,
2443
+ class: "mn-r-auto"
2444
+ }, ho = { class: "flex-nowrap flex pd-thin" }, _o = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, fo = { class: "flex-stretch flex-column flex" }, go = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, bo = /* @__PURE__ */ se(() => /* @__PURE__ */ a("h3", { class: "mn-semi" }, "Profile", -1)), vo = { class: "radius-small flex-nowrap flex" }, yo = { class: "w-100 flex-child-grow-1 flex-child" }, wo = { class: "bg-grey pd-medium o-hidden radius-big" }, $o = /* @__PURE__ */ se(() => /* @__PURE__ */ a("h3", { class: "mn-semi" }, "Details", -1)), Co = /* @__PURE__ */ se(() => /* @__PURE__ */ a("p", { class: "p-medium mn-small" }, "Please the available delivery options:", -1)), ko = { class: "mn-medium flex-nowrap flex" }, xo = /* @__PURE__ */ se(() => /* @__PURE__ */ a("p", { class: "p-medium mn-small" }, "Please select the available payment methods:", -1)), Oo = { class: "flex-nowrap flex" }, Lo = { class: "bg-grey pd-medium o-hidden radius-big" }, So = /* @__PURE__ */ se(() => /* @__PURE__ */ a("h3", { class: "mn-semi" }, "Location", -1)), Po = /* @__PURE__ */ se(() => /* @__PURE__ */ a("p", { class: "mn-small p-medium" }, "Or choose on map:", -1)), zo = { class: "flex-nowrap flex pd-thin" }, Mo = {
2445
+ __name: "DepartmentEdit",
2446
+ setup(e) {
2447
+ const t = q(), s = F();
2448
+ v("details"), v(!1);
2449
+ async function n() {
2450
+ s.params.department && await ge.read(s.params.department), v(Re.memberships), await K.read(s.params._id), s.params.department && await K.readOne(s.params.department);
2451
+ }
2452
+ n(), v(_.department.members), v(!1), v(null), v(!1), v(null);
2453
+ async function d() {
2454
+ s.params.department && await K.update(
2455
+ s.params._id,
2456
+ _.department
2457
+ ), s.params.department || await K.create(
2458
+ s.params._id,
2459
+ _.department
2460
+ );
2461
+ }
2462
+ function c() {
2463
+ t.replace({ name: "Department", params: { _id: s.params._id, department: _.department._id } });
2464
+ }
2465
+ async function p() {
2466
+ await K.delete(
2467
+ s.params._id,
2468
+ _.department
2469
+ );
2470
+ }
2471
+ return (l, u) => (o(), r("div", lo, [
2472
+ a("div", ro, [
2473
+ h(lt, { class: "pd-medium bg-grey radius-big" })
2474
+ ]),
2475
+ a("div", co, [
2476
+ a("header", uo, [
2477
+ k(s).params.department ? (o(), r("h1", po, "Edit Spot")) : (o(), r("h1", mo, "Create Spot")),
2478
+ a("section", ho, [
2479
+ h(ce, {
2480
+ submit: d,
2481
+ callback: c
2482
+ }, {
2483
+ default: x(() => [
2484
+ W("Save Spot")
2485
+ ]),
2486
+ _: 1
2487
+ })
2488
+ ])
2489
+ ])
2490
+ ]),
2491
+ a("div", _o, [
2492
+ a("div", fo, [
2493
+ a("div", go, [
2494
+ bo,
2495
+ a("div", vo, [
2496
+ h(ze, {
2497
+ photo: _.department.profile.photo,
2498
+ "onUpdate:photo": u[0] || (u[0] = (i) => _.department.profile.photo = i),
2499
+ uploadPath: "organizations/" + _.department.name + "/avatars",
2500
+ class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
2501
+ }, null, 8, ["photo", "uploadPath"]),
2502
+ a("div", yo, [
2503
+ h(D, {
2504
+ field: _.department.profile.name,
2505
+ "onUpdate:field": u[1] || (u[1] = (i) => _.department.profile.name = i),
2506
+ label: "Name",
2507
+ placeholder: "Spot Name",
2508
+ class: "mn-small bg-white radius-small pd-medium",
2509
+ validation: l.organizationName
2510
+ }, null, 8, ["field", "validation"]),
2511
+ h(D, {
2512
+ field: _.department.profile.description,
2513
+ "onUpdate:field": u[2] || (u[2] = (i) => _.department.profile.description = i),
2514
+ label: "Description",
2515
+ placeholder: "Spot description (max 120 symbols)",
2516
+ class: "bg-white radius-small pd-medium",
2517
+ validation: l.organizationName
2518
+ }, null, 8, ["field", "validation"])
2519
+ ])
2520
+ ])
2521
+ ]),
2522
+ a("div", wo, [
2523
+ $o,
2524
+ Co,
2525
+ a("div", ko, [
2526
+ h(J, {
2527
+ label: "Pickup",
2528
+ name: "Delivery",
2529
+ value: "pickup",
2530
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2531
+ radio: _.department.delivery
2532
+ }, null, 8, ["radio"]),
2533
+ h(J, {
2534
+ label: "Delivery",
2535
+ name: "Delivery",
2536
+ value: "courier",
2537
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2538
+ radio: _.department.delivery
2539
+ }, null, 8, ["radio"]),
2540
+ h(J, {
2541
+ label: "Post",
2542
+ name: "Delivery",
2543
+ value: "post",
2544
+ class: "w-100 bg-white radius-small pd-small",
2545
+ radio: _.department.delivery
2546
+ }, null, 8, ["radio"])
2547
+ ]),
2548
+ xo,
2549
+ a("div", Oo, [
2550
+ h(J, {
2551
+ label: "Cash",
2552
+ name: "Payment",
2553
+ value: "cash",
2554
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2555
+ radio: _.department.payment
2556
+ }, null, 8, ["radio"]),
2557
+ h(J, {
2558
+ label: "Bank Transfer",
2559
+ name: "Payment",
2560
+ value: "bank",
2561
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2562
+ radio: _.department.payment
2563
+ }, null, 8, ["radio"]),
2564
+ h(J, {
2565
+ label: "Crypto",
2566
+ name: "Payment",
2567
+ value: "crypto",
2568
+ class: "w-100 bg-white radius-small pd-small",
2569
+ radio: _.department.payment
2570
+ }, null, 8, ["radio"])
2571
+ ])
2572
+ ])
2573
+ ]),
2574
+ a("div", Lo, [
2575
+ So,
2576
+ h(Xa, {
2577
+ apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
2578
+ address: _.department.address,
2579
+ location: _.department.location,
2580
+ label: "Address",
2581
+ placeholder: "Enter delivery address",
2582
+ class: "bg-white radius-small pd-small mn-small",
2583
+ "onUpdate:location": u[3] || (u[3] = (i) => {
2584
+ _.department.location = i;
2585
+ }),
2586
+ "onUpdate:address": u[4] || (u[4] = (i) => {
2587
+ _.department.address = i;
2588
+ })
2589
+ }, null, 8, ["address", "location"]),
2590
+ Po,
2591
+ h(nn, {
2592
+ address: _.department.address,
2593
+ location: _.department.location,
2594
+ apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
2595
+ class: "radius-big o-hidden",
2596
+ "onUpdate:location": u[5] || (u[5] = (i) => {
2597
+ _.department.location = i;
2598
+ }),
2599
+ "onUpdate:address": u[6] || (u[6] = (i) => {
2600
+ _.department.address = i;
2601
+ })
2602
+ }, null, 8, ["address", "location"])
2603
+ ])
2604
+ ]),
2605
+ a("section", zo, [
2606
+ h(ce, {
2607
+ submit: p,
2608
+ callback: l.redirectToDash,
2609
+ class: "bg-grey"
2610
+ }, {
2611
+ default: x(() => [
2612
+ W("Delete Spot")
2613
+ ]),
2614
+ _: 1
2615
+ }, 8, ["callback"])
2616
+ ])
2617
+ ]));
2618
+ }
2619
+ }, Do = /* @__PURE__ */ A(Mo, [["__scopeId", "data-v-195322bd"]]), Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2620
+ __proto__: null,
2621
+ default: Do
2622
+ }, Symbol.toStringTag, { value: "Module" })), Ao = { class: "unit" }, Vo = { class: "unit-details" }, Io = { key: 0 }, Uo = { class: "subunits" }, Vi = {
2623
+ __name: "Unit",
2624
+ props: {
2625
+ unit: {
2626
+ type: Object,
2627
+ required: !0
2628
+ },
2629
+ editMode: {
2630
+ type: Boolean,
2631
+ required: !0
2632
+ }
2633
+ },
2634
+ setup(e) {
2635
+ const t = e, s = v({ ...t.unit });
2636
+ T(t.unit, () => {
2637
+ s.value = { ...t.unit };
2638
+ });
2639
+ async function n() {
2640
+ emit("unit-updated", s.value);
2641
+ }
2642
+ async function d() {
2643
+ emit("subunit-added", t.unit._id);
2644
+ }
2645
+ return (c, p) => {
2646
+ const l = ue("unit-component");
2647
+ return o(), r("div", Ao, [
2648
+ a("div", Vo, [
2649
+ a("h3", null, f(e.unit.name), 1),
2650
+ a("p", null, f(e.unit.description), 1),
2651
+ e.editMode ? (o(), r("div", Io, [
2652
+ ae(a("input", {
2653
+ "onUpdate:modelValue": p[0] || (p[0] = (u) => s.value.name = u),
2654
+ placeholder: "Название отдела"
2655
+ }, null, 512), [
2656
+ [we, s.value.name]
2657
+ ]),
2658
+ ae(a("input", {
2659
+ "onUpdate:modelValue": p[1] || (p[1] = (u) => s.value.description = u),
2660
+ placeholder: "Описание отдела"
2661
+ }, null, 512), [
2662
+ [we, s.value.description]
2663
+ ]),
2664
+ a("button", { onClick: n }, "Сохранить"),
2665
+ a("button", { onClick: d }, "Добавить подотдел")
2666
+ ])) : g("", !0)
2667
+ ]),
2668
+ a("div", Uo, [
2669
+ (o(!0), r(O, null, L(e.unit.subunits, (u, i) => (o(), $(l, {
2670
+ key: i,
2671
+ unit: u,
2672
+ "edit-mode": e.editMode
2673
+ }, null, 8, ["unit", "edit-mode"]))), 128))
2674
+ ])
2675
+ ]);
2676
+ };
2677
+ }
2678
+ };
2679
+ const Bo = { class: "br-grey radius-small mn-small" }, Eo = {
2680
+ __name: "Places",
2681
+ props: {
2682
+ isPopupOpen: Boolean,
2683
+ place: Number,
2684
+ places: Array
2685
+ },
2686
+ emits: ["callback"],
2687
+ setup(e, { emit: t }) {
2688
+ const s = e, n = v({
2689
+ logo: "",
2690
+ name: "",
2691
+ address: ""
2692
+ });
2693
+ s.place !== null && (n.value = s.places[s.place]);
2694
+ const d = v(null);
2695
+ async function c() {
2696
+ try {
2697
+ await Qe(
2698
+ d,
2699
+ Xe,
2700
+ n.value.name,
2701
+ "Некорректное название"
2702
+ );
2703
+ } catch {
2704
+ throw new Error();
2705
+ }
2706
+ s.place !== null ? (s.places[s.place] = n.value, t("callback")) : (s.places.push(n.value), t("callback"));
2707
+ }
2708
+ return (p, l) => (o(), r("div", null, [
2709
+ a("div", Bo, [
2710
+ h(Me, {
2711
+ options: [
2712
+ { name: "Кафе", value: "cafe" },
2713
+ { name: "Бар", value: "bar" },
2714
+ { name: "Ресторан", value: "restaraunt" },
2715
+ { name: "Пиццерия", value: "pizzeria" },
2716
+ { name: "Ночной клуб", value: "night-club" },
2717
+ { name: "Шаверма", value: "shaverma" },
2718
+ { name: "Кофейня", value: "coffee" }
2719
+ ],
2720
+ prop: n.value,
2721
+ content: "type",
2722
+ label: "Тип",
2723
+ placeholder: "Тип заведения",
2724
+ size: "small"
2725
+ }, null, 8, ["prop"]),
2726
+ h(D, {
2727
+ field: n.value.name,
2728
+ "onUpdate:field": l[0] || (l[0] = (u) => n.value.name = u),
2729
+ label: "Название",
2730
+ validation: d.value,
2731
+ placeholder: "Введите название места"
2732
+ }, null, 8, ["field", "validation"]),
2733
+ h(D, {
2734
+ field: n.value.address,
2735
+ "onUpdate:field": l[1] || (l[1] = (u) => n.value.address = u),
2736
+ label: "Адрес",
2737
+ validation: d.value,
2738
+ placeholder: "Введите адрес места"
2739
+ }, null, 8, ["field", "validation"]),
2740
+ h(D, {
2741
+ field: n.value.phone,
2742
+ "onUpdate:field": l[2] || (l[2] = (u) => n.value.phone = u),
2743
+ label: "Телефон",
2744
+ validation: d.value,
2745
+ placeholder: "Введите телефон места"
2746
+ }, null, 8, ["field", "validation"])
2747
+ ]),
2748
+ a("button", {
2749
+ onClick: c,
2750
+ class: "w-100 button bg-second t-white"
2751
+ }, f(s.place !== null ? "Редактировать заведение" : "Добавить заведение"), 1)
2752
+ ]));
2753
+ }
2754
+ }, Ii = /* @__PURE__ */ A(Eo, [["__scopeId", "data-v-de5143c5"]]);
2755
+ const jo = (e) => (me("data-v-20739d92"), e = e(), he(), e), To = { class: "documents" }, Fo = /* @__PURE__ */ jo(() => /* @__PURE__ */ a("h3", { class: "mn-small" }, "Список документов", -1)), qo = { class: "mn-big cols-4" }, Ro = ["onClick"], Zo = { class: "mn-small" }, Ho = { class: "t-semi t-transp radius-small" }, No = {
2756
+ __name: "Documents",
2757
+ setup(e) {
2758
+ q(), F();
2759
+ let t = [{
2760
+ name: "Паспорт",
2761
+ status: "Не добавлен",
2762
+ inputs: [{
2763
+ type: "text",
2764
+ name: "Номер и серия"
2765
+ }, {
2766
+ type: "text",
2767
+ name: "Место выдачи"
2768
+ }, {
2769
+ type: "text",
2770
+ name: "Дата выдачи"
2771
+ }]
2772
+ }, {
2773
+ name: "ИНН",
2774
+ status: "Не добавлен",
2775
+ inputs: [{
2776
+ type: "text",
2777
+ name: "Дата регистрации"
2778
+ }]
2779
+ }, {
2780
+ name: "СНИЛС",
2781
+ status: "Не добавлен",
2782
+ inputs: [{
2783
+ type: "text",
2784
+ name: "Дата регистрации"
2785
+ }]
2786
+ }, {
2787
+ name: "Военный билет",
2788
+ status: "Не добавлен",
2789
+ inputs: [{
2790
+ type: "text",
2791
+ name: "Дата регистрации"
2792
+ }]
2793
+ }];
2794
+ const s = v(!1), n = v(null), d = (l) => {
2795
+ n.value = l, s.value = !0;
2796
+ }, c = () => {
2797
+ s.value = !1;
2798
+ }, p = () => {
2799
+ c();
2800
+ };
2801
+ return de(() => {
2802
+ }), (l, u) => {
2803
+ const i = ue("Popup");
2804
+ return o(), r("div", To, [
2805
+ Fo,
2806
+ a("div", qo, [
2807
+ (o(!0), r(O, null, L(k(t), (m, w) => (o(), r("div", {
2808
+ key: w,
2809
+ onClick: (P) => d(w),
2810
+ class: "h-100 pd-medium bg-white radius-small"
2811
+ }, [
2812
+ a("h3", Zo, f(m.name), 1),
2813
+ a("p", Ho, f(m.status), 1)
2814
+ ], 8, Ro))), 128))
2815
+ ]),
2816
+ h(i, {
2817
+ title: "Добавить документ",
2818
+ onClosePopup: c,
2819
+ isPopupOpen: s.value
2820
+ }, {
2821
+ default: x(() => [
2822
+ (o(!0), r(O, null, L(k(t)[n.value].inputs, (m) => (o(), r("div", {
2823
+ key: m.name
2824
+ }, [
2825
+ h(D, {
2826
+ field: m.value,
2827
+ "onUpdate:field": (w) => m.value = w,
2828
+ label: m.name,
2829
+ _id: m.name,
2830
+ placeholder: m.name,
2831
+ class: "w-100"
2832
+ }, null, 8, ["field", "onUpdate:field", "label", "_id", "placeholder"])
2833
+ ]))), 128)),
2834
+ a("button", {
2835
+ onClick: p,
2836
+ class: "w-100 mn-small button"
2837
+ }, "Отправить на верификацию")
2838
+ ]),
2839
+ _: 1
2840
+ }, 8, ["isPopupOpen"])
2841
+ ]);
2842
+ };
2843
+ }
2844
+ }, Ui = /* @__PURE__ */ A(No, [["__scopeId", "data-v-20739d92"]]);
2845
+ const Ko = { class: "for-transition bg-white radius-big w-100" }, Wo = { class: "" }, Yo = {
2846
+ key: 1,
2847
+ class: "cols-1"
2848
+ }, Bi = {
2849
+ __name: "Organizations",
2850
+ props: {
2851
+ owner: {
2852
+ type: String,
2853
+ default: null
2854
+ },
2855
+ user: {
2856
+ type: [String, Number],
2857
+ default: null
2858
+ },
2859
+ onlyuser: {
2860
+ type: [String, Number],
2861
+ default: null
2862
+ }
2863
+ },
2864
+ async setup(e) {
2865
+ let t, s;
2866
+ const n = e, d = v(null);
2867
+ d.value = ([t, s] = Y(() => R.read({ owner: n.owner, user: n.user, onlyuser: n.onlyuser })), t = await t, s(), t);
2868
+ const c = q(), p = F();
2869
+ let l = p.query.tab ? p.query.tab : "details";
2870
+ const u = v(l);
2871
+ return p.query.tab = u.value, T(u, (i) => {
2872
+ c.replace({ query: { ...p.query, tab: i } });
2873
+ }), (i, m) => (o(), r("div", Ko, [
2874
+ a("div", Wo, [
2875
+ d.value < 1 ? (o(), $(fe, {
2876
+ key: 0,
2877
+ title: "You Haven't Joined Any Organization Yet",
2878
+ description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
2879
+ action: "Create organization",
2880
+ callback: i.a = () => i.$router.push("/app/organization/create/details")
2881
+ }, null, 8, ["callback"])) : (o(), r("div", Yo, [
2882
+ (o(!0), r(O, null, L(d.value, (w) => (o(), $(We, {
2883
+ key: w._id,
2884
+ organization: w,
2885
+ user: S.user,
2886
+ onUpdateMembership: i.handleMembershipUpdate,
2887
+ class: te(["w-100", { "mn-r-small": i.index !== d.value.length - 1 }])
2888
+ }, null, 8, ["organization", "user", "onUpdateMembership", "class"]))), 128))
2889
+ ]))
2890
+ ])
2891
+ ]));
2892
+ }
2893
+ }, Jo = {};
2894
+ function Qo(e, t) {
2895
+ const s = ue("router-view");
2896
+ return o(), $(s, null, {
2897
+ default: x(({ Component: n, route: d }) => [
2898
+ (o(), $(le(n)))
2899
+ ]),
2900
+ _: 1
2901
+ });
2902
+ }
2903
+ const Xo = /* @__PURE__ */ A(Jo, [["render", Qo]]), Ei = [{
2904
+ path: "organizations",
2905
+ component: Xo,
2906
+ meta: {
2907
+ title: {
2908
+ en: "Organizations",
2909
+ ru: "Организации"
2910
+ }
2911
+ },
2912
+ children: [{
2913
+ path: ":_id",
2914
+ name: "Organization",
2915
+ meta: {
2916
+ title: {
2917
+ en: "Organization",
2918
+ ru: "Организация"
2919
+ }
2920
+ },
2921
+ component: () => Promise.resolve().then(() => Hs)
2922
+ }, {
2923
+ path: "create",
2924
+ name: "Create Organization",
2925
+ title: {
2926
+ en: "Create Organization",
2927
+ ru: "Создать Организацию"
2928
+ },
2929
+ component: () => Promise.resolve().then(() => Ce)
2930
+ }, {
2931
+ path: ":_id/edit",
2932
+ name: "Organization Edit",
2933
+ meta: {
2934
+ title: {
2935
+ en: "Edit Organization",
2936
+ ru: "Редактировать Организацию"
2937
+ }
2938
+ },
2939
+ component: () => Promise.resolve().then(() => Ce)
2940
+ }, {
2941
+ path: ":_id/departments/create",
2942
+ name: "Department Creation",
2943
+ meta: {
2944
+ title: "Создание отдела"
2945
+ },
2946
+ component: () => Promise.resolve().then(() => Se)
2947
+ }, {
2948
+ path: ":_id/departments/:deparment",
2949
+ name: "Department",
2950
+ meta: {
2951
+ title: "Отдел"
2952
+ },
2953
+ component: () => Promise.resolve().then(() => la)
2954
+ }, {
2955
+ path: ":_id/departments/:department/edit",
2956
+ name: "Department Edit",
2957
+ meta: {
2958
+ title: "Редактирование отдела"
2959
+ },
2960
+ component: () => Promise.resolve().then(() => Se)
2961
+ }, {
2962
+ path: ":_id/products/:product",
2963
+ name: "Product Organization",
2964
+ meta: {
2965
+ title: {
2966
+ en: "Product",
2967
+ ru: "Продукт"
2968
+ }
2969
+ },
2970
+ component: () => import(
2971
+ /* webpackChunkName: 'Product' */
2972
+ "./Product-bbdc8460.mjs"
2973
+ )
2974
+ }, {
2975
+ path: ":_id/products/:product/edit",
2976
+ name: "ProductEdit",
2977
+ component: () => import(
2978
+ /* webpackChunkName: 'ProductPageEdit' */
2979
+ "./ProductEdit-a1050ab6.mjs"
2980
+ )
2981
+ }, {
2982
+ path: ":_id/products/add",
2983
+ name: "AddProduct",
2984
+ component: () => import(
2985
+ /* webpackChunkName: 'ProductPageEdit' */
2986
+ "./ProductEdit-a1050ab6.mjs"
2987
+ )
2988
+ }]
2989
+ }];
2990
+ export {
2991
+ Ei as A,
2992
+ Do as D,
2993
+ Ii as P,
2994
+ Ae as U,
2995
+ lt as _,
2996
+ xi as a,
2997
+ ki as b,
2998
+ E as c,
2999
+ Zs as d,
3000
+ ia as e,
3001
+ Pi as f,
3002
+ Da as g,
3003
+ zi as h,
3004
+ Mi as i,
3005
+ Vi as j,
3006
+ De as k,
3007
+ Di as l,
3008
+ Ai as m,
3009
+ fe as n,
3010
+ $i as o,
3011
+ Ci as p,
3012
+ xs as q,
3013
+ Oi as r,
3014
+ y as s,
3015
+ At as t,
3016
+ Si as u,
3017
+ Ui as v,
3018
+ Ts as w,
3019
+ _s as x,
3020
+ Bi as y,
3021
+ Li as z
3022
+ };