@ozdao/prometheus-framework 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/BackofficeGallery-7ae8fbba.mjs +307 -0
  2. package/dist/BackofficeGallery-fe39cff3.js +1 -0
  3. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-8660f9cb.js +1 -0
  4. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-bd3889ee.mjs +1945 -0
  5. package/dist/ButtonFollow-81508d85.mjs +132 -0
  6. package/dist/ButtonFollow-df6317f0.js +1 -0
  7. package/dist/CardOrganization-d8f209ee.js +1 -0
  8. package/dist/CardOrganization-de8ec36e.mjs +230 -0
  9. package/dist/Feed-a75d053e.js +1 -0
  10. package/dist/Feed-c4084664.mjs +368 -0
  11. package/dist/Feed-fea84ce7.mjs +439 -0
  12. package/dist/Feed-ff3b96b2.js +1 -0
  13. package/dist/Image-1281bc48.mjs +477 -0
  14. package/dist/Image-8e67dd2d.js +9 -0
  15. package/dist/Popup-b7609baa.js +1 -0
  16. package/dist/Popup-d5c4cb46.mjs +76 -0
  17. package/dist/Product-3c7b2921.mjs +841 -0
  18. package/dist/Product-6df77924.js +7 -0
  19. package/dist/ProductEdit-737e2a5a.mjs +302 -0
  20. package/dist/ProductEdit-c99ab559.js +1 -0
  21. package/dist/ProfileBlogposts-4293a1e3.js +1 -0
  22. package/dist/ProfileBlogposts-4c326fed.mjs +65 -0
  23. package/dist/ProfileComments-03f88b54.mjs +44 -0
  24. package/dist/ProfileComments-761ce00e.js +1 -0
  25. package/dist/ProfileEvents-0bdd36e4.mjs +57 -0
  26. package/dist/ProfileEvents-a9b96fec.js +1 -0
  27. package/dist/ProfileLikes-3edf6fb8.mjs +44 -0
  28. package/dist/ProfileLikes-51729962.js +1 -0
  29. package/dist/ProfileOrganizations-8961aaee.mjs +213 -0
  30. package/dist/ProfileOrganizations-f52e62e1.js +1 -0
  31. package/dist/Publics-70a0ca9c.mjs +45 -0
  32. package/dist/Publics-bbab7a79.js +1 -0
  33. package/dist/Select-90d4b7c8.mjs +81 -0
  34. package/dist/Select-b9299fb6.js +1 -0
  35. package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js +1 -0
  36. package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs +1 -0
  37. package/dist/UploadImage-c9711af2.js +1 -0
  38. package/dist/UploadImage-ec3714e8.mjs +83 -0
  39. package/dist/UploadImageMultiple-b4c8d627.js +1 -0
  40. package/dist/UploadImageMultiple-ebcc51e6.mjs +58 -0
  41. package/dist/auth-78d9392a.mjs +612 -0
  42. package/dist/auth-96449d96.js +7 -0
  43. package/dist/auth.client.cjs +8 -8
  44. package/dist/auth.client.js +8 -8
  45. package/dist/auth.validation-9e493d2f.mjs +20 -0
  46. package/dist/auth.validation-d4795c25.js +1 -0
  47. package/dist/backoffice.client.cjs +1 -1
  48. package/dist/backoffice.client.js +43 -48
  49. package/dist/community.client.cjs +1 -1
  50. package/dist/community.client.js +44 -42
  51. package/dist/events.client.cjs +2 -2
  52. package/dist/events.client.js +25 -24
  53. package/dist/index-2a0269fc.js +2 -0
  54. package/dist/index-9128ade5.mjs +1228 -0
  55. package/dist/landing.client.cjs +1 -1
  56. package/dist/organizations-0fb56927.mjs +122 -0
  57. package/dist/organizations-195ec134.js +1 -0
  58. package/dist/organizations.client-b39db194.js +3 -0
  59. package/dist/organizations.client-df5e8a6f.mjs +3020 -0
  60. package/dist/organizations.client.cjs +1 -1
  61. package/dist/organizations.client.js +46 -44
  62. package/dist/style.css +1 -1
  63. package/dist/users.client.cjs +1 -1
  64. package/dist/users.client.js +23 -23
  65. package/package.json +1 -1
  66. package/src/modules/backoffice/components/layouts/Backoffice.vue +0 -11
  67. package/src/modules/gallery/components/sections/BackofficeGallery.vue +3 -1
@@ -0,0 +1,307 @@
1
+ import { reactive as X, ref as p, watchEffect as H, openBlock as r, createElementBlock as c, createVNode as _, unref as A, withCtx as b, Fragment as G, renderList as R, createElementVNode as e, computed as J, onMounted as K, createCommentVNode as $, Transition as U, createTextVNode as M, toDisplayString as S, withDirectives as Q, vShow as W, pushScopeId as Y, popScopeId as Z } from "vue";
2
+ import { a as L, F as ee, _ as te } from "./index-9128ade5.mjs";
3
+ import { S as ae } from "./Select-90d4b7c8.mjs";
4
+ import { V as se } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
5
+ import { _ as le } from "./UploadImageMultiple-ebcc51e6.mjs";
6
+ import { useRoute as oe } from "vue-router";
7
+ import { _ as ie } from "./_plugin-vue_export-helper-dad06003.mjs";
8
+ import "./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs";
9
+ const ne = process.env.API_URL, V = L.create({ baseURL: ne, withCredentials: !0 }), g = X({
10
+ gallery: []
11
+ }), y = {
12
+ async fetchGallery(s, t) {
13
+ const n = [];
14
+ s && n.push(`page=${s}`), t && n.push(`limit=${t}`);
15
+ const l = `/api/gallery${n.length ? `?${n.join("&")}` : ""}`;
16
+ try {
17
+ const o = await V.get(l);
18
+ if (console.log(o), o && o.data)
19
+ return g.gallery = [...g.gallery, ...o.data], o.data;
20
+ } catch (o) {
21
+ throw console.error("Error fetching gallery:", o), o;
22
+ }
23
+ },
24
+ async createPhoto(s) {
25
+ try {
26
+ const t = await V.post("/api/gallery/create", s);
27
+ console.log(t.data), g.gallery = [...t.data, ...g.gallery];
28
+ } catch (t) {
29
+ console.error(t);
30
+ }
31
+ },
32
+ async updatePhoto(s) {
33
+ try {
34
+ const t = {
35
+ ...s,
36
+ categories: typeof s.categories == "string" ? s.categories.split(",").map((o) => o.trim()) : s.categories
37
+ }, n = await L.post("/api/gallery/update", t), l = g.gallery.findIndex((o) => o._id === s._id);
38
+ l !== -1 && (g.gallery[l] = n.data);
39
+ } catch (t) {
40
+ console.error(t);
41
+ }
42
+ },
43
+ async deletePhoto(s) {
44
+ try {
45
+ const t = await V.post(`/api/gallery/delete/${s}`), n = g.gallery.findIndex((l) => l._id === s);
46
+ n !== -1 && g.gallery.splice(n, 1);
47
+ } catch (t) {
48
+ console.error(t);
49
+ }
50
+ }
51
+ };
52
+ const re = { class: "pos-relative" }, ce = ["src"], de = ["onClick"], ue = {
53
+ __name: "EditImages",
54
+ props: {
55
+ images: Array
56
+ },
57
+ emits: ["update"],
58
+ setup(s, { emit: t }) {
59
+ const n = s, l = p([...n.images]);
60
+ H(() => {
61
+ l.value = [...n.images];
62
+ });
63
+ const o = () => {
64
+ t("update:images", l.value);
65
+ }, w = (u) => {
66
+ l.value = [...l.value, ...u], o();
67
+ }, k = (u) => {
68
+ l.value.splice(u, 1), o();
69
+ };
70
+ return (u, x) => (r(), c("div", null, [
71
+ _(le, {
72
+ "onUpdate:images": w,
73
+ uploadPath: "photos",
74
+ class: "mn-semi pd-small w-100 button bg-black t-white"
75
+ }),
76
+ _(A(se), {
77
+ class: "gap-small flex dragArea list-group w-full",
78
+ modelValue: l.value,
79
+ "onUpdate:modelValue": x[0] || (x[0] = (v) => l.value = v),
80
+ onChange: o
81
+ }, {
82
+ default: b(() => [
83
+ (r(!0), c(G, null, R(l.value, (v, P) => (r(), c("div", re, [
84
+ e("img", {
85
+ class: "i-extra radius-small o-hidden mn-thin",
86
+ src: (u.FILE_SERVER_URL || "") + v
87
+ }, null, 8, ce),
88
+ e("a", {
89
+ onClick: (h) => k(P),
90
+ class: "pos-absolute t-center radius-extra i-medium bg-red pos-t-0 pos-r-0"
91
+ }, "X", 8, de)
92
+ ]))), 256))
93
+ ]),
94
+ _: 1
95
+ }, 8, ["modelValue"])
96
+ ]));
97
+ }
98
+ };
99
+ const E = (s) => (Y("data-v-e82aa4af"), s = s(), Z(), s), me = { class: "pos-relative w-100" }, pe = { class: "w-100 o-hidden" }, ge = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" }, _e = ["data-id"], ve = ["src", "onClick"], he = {
100
+ key: 1,
101
+ class: "pd-small radius-small bg-white"
102
+ }, fe = ["src", "onClick"], ye = { class: "t-black p-small mn-small" }, be = /* @__PURE__ */ E(() => /* @__PURE__ */ e("span", { class: "uppercase t-transp" }, "Size", -1)), we = /* @__PURE__ */ E(() => /* @__PURE__ */ e("br", null, null, -1)), ke = { class: "pd-2px radius-big d-inline-block bg-grey" }, xe = { class: "t-black p-small mn-small uppe" }, Ce = /* @__PURE__ */ E(() => /* @__PURE__ */ e("span", { class: "uppercase t-transp" }, "Categories", -1)), Ie = /* @__PURE__ */ E(() => /* @__PURE__ */ e("br", null, null, -1)), $e = { class: "pd-2px radius-big d-inline-block bg-grey t-semi" }, Se = { class: "flex-nowrap flex" }, Ee = ["onClick"], Pe = { class: "modal pd-thin" }, ze = { class: "modal-content radius-big" }, Ue = { class: "" }, Ve = ["src"], Ge = {
103
+ key: 0,
104
+ class: "flex-v-center flex m modal pd-big"
105
+ }, Re = { class: "modal-content radius-small pd-medium bg-white" }, je = ["src"], Be = ["src"], Me = {
106
+ __name: "BackofficeGallery",
107
+ setup(s) {
108
+ oe();
109
+ const t = p(!0), n = p(null);
110
+ let l = 1;
111
+ const o = 10;
112
+ let w = p(null), k = p(!1);
113
+ const u = p([]), x = (d) => {
114
+ u.value = d;
115
+ }, v = J(() => B.value === "all" ? g.gallery : g.gallery.filter((d) => d.categories.includes(B.value))), P = async () => {
116
+ k.value = !0, await y.fetchGallery(l, o), k.value = !1;
117
+ }, h = p(null), a = p({
118
+ categories: "",
119
+ size: "",
120
+ image: !1
121
+ }), C = p(null), z = (d) => {
122
+ console.log(t.value), t.value ? N(d) : (h.value = "modal", a.value.image = d, j());
123
+ }, N = (d) => {
124
+ h.value = "edit-modal", a.value = d || {
125
+ categories: "",
126
+ size: "",
127
+ image: null
128
+ }, j();
129
+ }, f = () => {
130
+ a.value = {
131
+ categories: "",
132
+ size: "",
133
+ image: !1
134
+ }, C.value = null, D();
135
+ }, j = () => {
136
+ document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden";
137
+ }, D = () => {
138
+ document.body.style.overflow = "", document.documentElement.style.overflow = "";
139
+ }, F = [
140
+ { name: "Small", value: "" },
141
+ { name: "Regular", value: "grid-item--width1 grid-item--height1" },
142
+ { name: "Medium", value: "grid-item--width2 grid-item--height2" },
143
+ { name: "Big", value: "grid-item--width3 grid-item--height3" }
144
+ ], O = async (d) => {
145
+ await y.deletePhoto(d);
146
+ }, T = async () => {
147
+ await y.updatePhoto(a.value), f();
148
+ }, q = async (d) => {
149
+ if (u.length < 1 || !a.value.categories || !a.value.size) {
150
+ console.error("All fields are required.");
151
+ return;
152
+ }
153
+ await y.createPhoto({
154
+ images: u.value,
155
+ size: a.value.size,
156
+ categories: typeof a.value.categories == "string" ? a.value.categories.split(",").map((m) => m.trim()) : a.value.categories
157
+ }), f();
158
+ };
159
+ let B = p("all");
160
+ return K(async () => {
161
+ await y.fetchGallery(l, o), typeof window < "u" && new IntersectionObserver((m) => {
162
+ m.some((i) => i.isIntersecting) && (l += 1, P());
163
+ }).observe(w.value);
164
+ }), (d, m) => (r(), c("div", me, [
165
+ e("div", pe, [
166
+ e("div", ge, [
167
+ t.value ? (r(), c("button", {
168
+ key: 0,
169
+ onClick: m[0] || (m[0] = (i) => z(null)),
170
+ class: "mn-r-small t-white t-black bg-second button-small button"
171
+ }, "Add photos +")) : $("", !0)
172
+ ])
173
+ ]),
174
+ e("div", {
175
+ ref_key: "grid",
176
+ ref: n,
177
+ class: "pd-medium cols-4 gap-thin"
178
+ }, [
179
+ (r(!0), c(G, null, R(A(v), (i, Ae) => (r(), c("div", {
180
+ key: i.id,
181
+ "data-id": i.id
182
+ }, [
183
+ _(U, {
184
+ name: "scaleIn",
185
+ mode: "in-out"
186
+ }, {
187
+ default: b(() => [
188
+ !t.value && n.value ? (r(), c("img", {
189
+ key: 0,
190
+ src: "https://thecommunephuket.com/photos/" + i.cover,
191
+ class: "w-100 h-100 o-hidden radius-medium object-fit-cover",
192
+ onClick: (I) => z(i.image)
193
+ }, null, 8, ve)) : (r(), c("div", he, [
194
+ M(S(i._id) + " ", 1),
195
+ e("img", {
196
+ src: "https://thecommunephuket.com/photos/" + i.cover,
197
+ class: "w-100 radius-small mn-small h-10r object-fit-cover",
198
+ onClick: (I) => z(i)
199
+ }, null, 8, fe),
200
+ e("p", ye, [
201
+ be,
202
+ we,
203
+ e("span", ke, S(i.size.name), 1)
204
+ ]),
205
+ e("p", xe, [
206
+ Ce,
207
+ Ie,
208
+ (r(!0), c(G, null, R(i.categories, (I) => (r(), c("span", $e, S(I), 1))), 256))
209
+ ]),
210
+ e("div", Se, [
211
+ e("button", {
212
+ class: "button-small w-100 button",
213
+ onClick: (I) => O(i._id)
214
+ }, "Delete", 8, Ee)
215
+ ])
216
+ ]))
217
+ ]),
218
+ _: 2
219
+ }, 1024)
220
+ ], 8, _e))), 128)),
221
+ e("div", {
222
+ ref_key: "sentinel",
223
+ ref: w,
224
+ class: "sentinel"
225
+ }, null, 512),
226
+ _(U, { name: "modal" }, {
227
+ default: b(() => [
228
+ Q(e("div", Pe, [
229
+ e("div", ze, [
230
+ e("div", Ue, [
231
+ e("span", {
232
+ class: "close",
233
+ onClick: f
234
+ }, "×"),
235
+ e("img", {
236
+ src: "https://thecommunephuket.com/photos/" + a.value.image
237
+ }, null, 8, Ve)
238
+ ])
239
+ ])
240
+ ], 512), [
241
+ [W, a.value.image !== !1 && h.value === "modal"]
242
+ ])
243
+ ]),
244
+ _: 1
245
+ }),
246
+ _(U, { name: "modal" }, {
247
+ default: b(() => [
248
+ a.value.image !== !1 && h.value === "edit-modal" ? (r(), c("div", Ge, [
249
+ e("div", Re, [
250
+ e("span", {
251
+ class: "close",
252
+ onClick: f
253
+ }, "×"),
254
+ typeof C.value == "string" ? (r(), c("img", {
255
+ key: 0,
256
+ src: C.value,
257
+ class: "radius-small w-100 mn-small h-20r object-fit-cover"
258
+ }, null, 8, je)) : $("", !0),
259
+ typeof C.value == "object" && a.value.image !== null ? (r(), c("img", {
260
+ key: 1,
261
+ class: "radius-small w-100 mn-small h-20r object-fit-cover",
262
+ src: "/photos/" + a.value.cover
263
+ }, null, 8, Be)) : $("", !0),
264
+ _(ae, {
265
+ options: F,
266
+ label: "Size",
267
+ select: a.value.size,
268
+ "onUpdate:select": m[1] || (m[1] = (i) => a.value.size = i),
269
+ placeholder: "Select Size",
270
+ class: "bg-grey pd-thin radius-small mn-thin t-black"
271
+ }, null, 8, ["select"]),
272
+ _(ee, {
273
+ field: a.value.categories,
274
+ "onUpdate:field": m[2] || (m[2] = (i) => a.value.categories = i),
275
+ type: "text",
276
+ label: "Categories",
277
+ placeholder: "Enter categories for image (comma separated)",
278
+ class: "bg-grey pd-thin radius-small mn-medium t-black"
279
+ }, null, 8, ["field"]),
280
+ _(ue, {
281
+ images: u.value,
282
+ "onUpdate:images": x,
283
+ uploadPath: "photos",
284
+ class: "mn-semi"
285
+ }, null, 8, ["images"]),
286
+ _(te, {
287
+ submit: a.value._id ? T : q,
288
+ callback: f,
289
+ class: "mn-thin"
290
+ }, {
291
+ default: b(() => [
292
+ M(S(a.value._id ? "Update" : "Create"), 1)
293
+ ]),
294
+ _: 1
295
+ }, 8, ["submit"])
296
+ ])
297
+ ])) : $("", !0)
298
+ ]),
299
+ _: 1
300
+ })
301
+ ], 512)
302
+ ]));
303
+ }
304
+ }, He = /* @__PURE__ */ ie(Me, [["__scopeId", "data-v-e82aa4af"]]);
305
+ export {
306
+ He as default
307
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./index-2a0269fc.js"),U=require("./Select-b9299fb6.js"),q=require("./vue-draggable-next.esm-bundler-80731ae0.js"),D=require("./UploadImageMultiple-b4c8d627.js"),M=require("vue-router"),R=require("./_plugin-vue_export-helper-f246444f.js");require("./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js");const j=process.env.API_URL,N=b.axios.create({baseURL:j,withCredentials:!0}),u=e.reactive({gallery:[]}),v={async fetchGallery(a,t){const c=[];a&&c.push(`page=${a}`),t&&c.push(`limit=${t}`);const o=`/api/gallery${c.length?`?${c.join("&")}`:""}`;try{const s=await N.get(o);if(console.log(s),s&&s.data)return u.gallery=[...u.gallery,...s.data],s.data}catch(s){throw console.error("Error fetching gallery:",s),s}},async createPhoto(a){try{const t=await N.post("/api/gallery/create",a);console.log(t.data),u.gallery=[...t.data,...u.gallery]}catch(t){console.error(t)}},async updatePhoto(a){try{const t={...a,categories:typeof a.categories=="string"?a.categories.split(",").map(s=>s.trim()):a.categories},c=await b.axios.post("/api/gallery/update",t),o=u.gallery.findIndex(s=>s._id===a._id);o!==-1&&(u.gallery[o]=c.data)}catch(t){console.error(t)}},async deletePhoto(a){try{const t=await N.post(`/api/gallery/delete/${a}`),c=u.gallery.findIndex(o=>o._id===a);c!==-1&&u.gallery.splice(c,1)}catch(t){console.error(t)}}};const G={class:"pos-relative"},L=["src"],T=["onClick"],A={__name:"EditImages",props:{images:Array},emits:["update"],setup(a,{emit:t}){const c=a,o=e.ref([...c.images]);e.watchEffect(()=>{o.value=[...c.images]});const s=()=>{t("update:images",o.value)},_=i=>{o.value=[...o.value,...i],s()},h=i=>{o.value.splice(i,1),s()};return(i,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(D._sfc_main,{"onUpdate:images":_,uploadPath:"photos",class:"mn-semi pd-small w-100 button bg-black t-white"}),e.createVNode(e.unref(q.VueDraggableNext),{class:"gap-small flex dragArea list-group w-full",modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value=m),onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(m,w)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("img",{class:"i-extra radius-small o-hidden mn-thin",src:(i.FILE_SERVER_URL||"")+m},null,8,L),e.createElementVNode("a",{onClick:p=>h(w),class:"pos-absolute t-center radius-extra i-medium bg-red pos-t-0 pos-r-0"},"X",8,T)]))),256))]),_:1},8,["modelValue"])]))}};const E=a=>(e.pushScopeId("data-v-e82aa4af"),a=a(),e.popScopeId(),a),F={class:"pos-relative w-100"},O={class:"w-100 o-hidden"},H={class:"pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},X=["data-id"],J=["src","onClick"],K={key:1,class:"pd-small radius-small bg-white"},Q=["src","onClick"],W={class:"t-black p-small mn-small"},Y=E(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),Z=E(()=>e.createElementVNode("br",null,null,-1)),ee={class:"pd-2px radius-big d-inline-block bg-grey"},te={class:"t-black p-small mn-small uppe"},le=E(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),ae=E(()=>e.createElementVNode("br",null,null,-1)),oe={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},se={class:"flex-nowrap flex"},ne=["onClick"],ce={class:"modal pd-thin"},re={class:"modal-content radius-big"},ie={class:""},de=["src"],ue={key:0,class:"flex-v-center flex m modal pd-big"},me={class:"modal-content radius-small pd-medium bg-white"},pe=["src"],ge=["src"],ve={__name:"BackofficeGallery",setup(a){M.useRoute();const t=e.ref(!0),c=e.ref(null);let o=1;const s=10;let _=e.ref(null),h=e.ref(!1);const i=e.ref([]),f=r=>{i.value=r},m=e.computed(()=>B.value==="all"?u.gallery:u.gallery.filter(r=>r.categories.includes(B.value))),w=async()=>{h.value=!0,await v.fetchGallery(o,s),h.value=!1},p=e.ref(null),l=e.ref({categories:"",size:"",image:!1}),y=e.ref(null),V=r=>{console.log(t.value),t.value?C(r):(p.value="modal",l.value.image=r,x())},C=r=>{p.value="edit-modal",l.value=r||{categories:"",size:"",image:null},x()},g=()=>{l.value={categories:"",size:"",image:!1},y.value=null,I()},x=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},I=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},S=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],$=async r=>{await v.deletePhoto(r)},P=async()=>{await v.updatePhoto(l.value),g()},z=async r=>{if(i.length<1||!l.value.categories||!l.value.size){console.error("All fields are required.");return}await v.createPhoto({images:i.value,size:l.value.size,categories:typeof l.value.categories=="string"?l.value.categories.split(",").map(d=>d.trim()):l.value.categories}),g()};let B=e.ref("all");return e.onMounted(async()=>{await v.fetchGallery(o,s),typeof window<"u"&&new IntersectionObserver(d=>{d.some(n=>n.isIntersecting)&&(o+=1,w())}).observe(_.value)}),(r,d)=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",O,[e.createElementVNode("div",H,[t.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d[0]||(d[0]=n=>V(null)),class:"mn-r-small t-white t-black bg-second button-small button"},"Add photos +")):e.createCommentVNode("",!0)])]),e.createElementVNode("div",{ref_key:"grid",ref:c,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(n,he)=>(e.openBlock(),e.createElementBlock("div",{key:n.id,"data-id":n.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!t.value&&c.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+n.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:k=>V(n.image)},null,8,J)):(e.openBlock(),e.createElementBlock("div",K,[e.createTextVNode(e.toDisplayString(n._id)+" ",1),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+n.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:k=>V(n)},null,8,Q),e.createElementVNode("p",W,[Y,Z,e.createElementVNode("span",ee,e.toDisplayString(n.size.name),1)]),e.createElementVNode("p",te,[le,ae,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.categories,k=>(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(k),1))),256))]),e.createElementVNode("div",se,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:k=>$(n._id)},"Delete",8,ne)])]))]),_:2},1024)],8,X))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:_,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",ce,[e.createElementVNode("div",re,[e.createElementVNode("div",ie,[e.createElementVNode("span",{class:"close",onClick:g},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.value.image},null,8,de)])])],512),[[e.vShow,l.value.image!==!1&&p.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[l.value.image!==!1&&p.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",me,[e.createElementVNode("span",{class:"close",onClick:g},"×"),typeof y.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:y.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,pe)):e.createCommentVNode("",!0),typeof y.value=="object"&&l.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+l.value.cover},null,8,ge)):e.createCommentVNode("",!0),e.createVNode(U.Select,{options:S,label:"Size",select:l.value.size,"onUpdate:select":d[1]||(d[1]=n=>l.value.size=n),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(b.Field,{field:l.value.categories,"onUpdate:field":d[2]||(d[2]=n=>l.value.categories=n),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(A,{images:i.value,"onUpdate:images":f,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(b._sfc_main,{submit:l.value._id?P:z,callback:g,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},_e=R._export_sfc(ve,[["__scopeId","data-v-e82aa4af"]]);exports.default=_e;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),V=require("./index-2a0269fc.js"),g=require("./_plugin-vue_export-helper-f246444f.js");var $=function e(i,s){if(i===s)return!0;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return!1;var n,r,o;if(Array.isArray(i)){if(n=i.length,n!=s.length)return!1;for(r=n;r--!==0;)if(!e(i[r],s[r]))return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===s.toString();if(o=Object.keys(i),n=o.length,n!==Object.keys(s).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(s,o[r]))return!1;for(r=n;r--!==0;){var l=o[r];if(!e(i[l],s[l]))return!1}return!0}return i!==i&&s!==s};const O=V.getDefaultExportFromCjs($),B=(e,i)=>i.filter(s=>{const{text:n}=e;if(typeof s.rule=="string")return!new RegExp(s.rule).test(n);if(s.rule instanceof RegExp)return!s.rule.test(n);if({}.toString.call(s.rule)==="[object Function]")return s.rule(e)}).map(s=>s.classes),c=e=>JSON.parse(JSON.stringify(e)),C=(e,i)=>{let s=0;for(;s<e.length;){if(i(e[s],s,e))return s;s++}return-1},k=(e,i,s=[],n)=>{e.text===void 0&&(e={text:e});const r=B(e,s),o=C(i,d=>d===e),l=c(i),a=o!==-1?l.splice(o,1)[0]:c(e);return(n?n(l,a):l.map(d=>d.text).indexOf(a.text)!==-1)&&r.push("ti-duplicate"),r.length===0?r.push("ti-valid"):r.push("ti-invalid"),r},m=(e,...i)=>{e.text===void 0&&(e={text:e});const s=c(e);return s.tiClasses=k(e,...i),s},D=(e,...i)=>e.map(s=>m(s,e,...i));const L={name:"TagInput",props:{scope:{type:Object}}},A=["maxlength"];function N(e,i,s,n,r,o){return s.scope.edit?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,"onUpdate:modelValue":i[0]||(i[0]=l=>s.scope.tag.text=l),maxlength:s.scope.maxlength,type:"text",class:"ti-tag-input",size:"1",onInput:i[1]||(i[1]=l=>s.scope.validateTag(s.scope.index,l)),onBlur:i[2]||(i[2]=l=>s.scope.performCancelEdit(s.scope.index)),onKeydown:i[3]||(i[3]=l=>s.scope.performSaveEdit(s.scope.index,l))},null,40,A)),[[t.vModelText,s.scope.tag.text]]):t.createCommentVNode("",!0)}const M=g._export_sfc(L,[["render",N],["__scopeId","data-v-a1f1c345"]]),b=e=>!e.some(i=>{const s=!i.text;s&&console.warn('Missing property "text"',i);let n=!1;return i.classes&&(n=typeof i.classes!="string"),n&&console.warn('Property "classes" must be type of string',i),s||n}),w=e=>!e.some(i=>{if(typeof i=="number"){const s=isFinite(i)&&Math.floor(i)===i;return s||console.warn("Only numerics are allowed for this prop. Found:",i),!s}else if(typeof i=="string"){const s=/\W|[a-z]|!\d/i.test(i);return s||console.warn("Only alpha strings are allowed for this prop. Found:",i),!s}else return console.warn("Only numeric and string values are allowed. Found:",i),!1}),F={modelValue:{type:String,default:"",required:!0},tags:{type:Array,default:()=>[],validator:b},autocompleteItems:{type:Array,default:()=>[],validator:b},allowEditTags:{type:Boolean,default:!1},autocompleteFilterDuplicates:{default:!0,type:Boolean},addOnlyFromAutocomplete:{type:Boolean,default:!1},autocompleteMinLength:{type:Number,default:1},autocompleteAlwaysOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"Add Tag"},addOnKey:{type:Array,default:()=>[13],validator:w},saveOnKey:{type:Array,default:()=>[13],validator:w},maxTags:{type:Number},maxlength:{type:Number},validation:{type:Array,default:()=>[],validator(e){return!e.some(i=>{const s=!i.rule;s&&console.warn('Property "rule" is missing',i);const n=i.rule&&(typeof i.rule=="string"||i.rule instanceof RegExp||{}.toString.call(i.rule)==="[object Function]");n||console.warn("A rule must be type of string, RegExp or function. Found:",JSON.stringify(i.rule));const r=!i.classes;r&&console.warn('Property "classes" is missing',i);const o=i.type&&typeof i.type!="string";return o&&console.warn('Property "type" must be type of string. Found:',i),!n||s||r||o})}},separators:{type:Array,default:()=>[";"],validator(e){return!e.some(i=>{const s=typeof i!="string";return s&&console.warn("Separators must be type of string. Found:",i),s})}},avoidAddingDuplicates:{type:Boolean,default:!0},addOnBlur:{type:Boolean,default:!0},isDuplicate:{type:Function,default:null},addFromPaste:{type:Boolean,default:!0},deleteOnBackspace:{default:!0,type:Boolean},onBeforeAddingTag:Function,onBeforeDeletingTag:Function,onBeforeEditingTag:Function,onBeforeSavingTag:Function},I={name:"VueTagsInput",components:{TagInput:M},props:F,emits:["adding-duplicate","before-adding-tag","before-deleting-tag","before-editing-tag","before-saving-tag","max-tags-reached","saving-duplicate","tags-changed","tag-clicked","update:modelValue","update:tags"],inheritAttrs:!1,data(){return{tagCenter:[],newTag:null,tagsCopy:[],tagsEditStatus:null,deletionMark:null,deletionMarkTime:null,selectedItem:null,focused:null}},computed:{autocompleteOpen(){return this.autocompleteAlwaysOpen?!0:this.newTag!==null&&this.newTag.length>=this.autocompleteMinLength&&this.filteredAutocompleteItems.length>0&&this.focused},filteredAutocompleteItems(){const e=this.autocompleteItems.map(i=>m(i,this.tags,this.validation,this.isDuplicate));return this.autocompleteFilterDuplicates?e.filter(this.duplicateFilter):e}},methods:{createClasses:k,getSelectedIndex(e){const i=this.filteredAutocompleteItems,s=this.selectedItem,n=i.length-1;if(i.length!==0)return s===null?0:e==="before"&&s===0?n:e==="after"&&s===n?0:e==="after"?s+1:s-1},selectDefaultItem(){this.addOnlyFromAutocomplete&&this.filteredAutocompleteItems.length>0?this.selectedItem=0:this.selectedItem=null},selectItem(e,i){e.preventDefault(),this.selectedItem=this.getSelectedIndex(i)},isSelected(e){return this.selectedItem===e},isMarked(e){return this.deletionMark===e},setTagCenter(e){e&&this.tagCenter.push(e)},invokeDelete(){if(!this.deleteOnBackspace||this.newTag.length>0)return;const e=this.tagsCopy.length-1;this.deletionMark===null?(this.deletionMarkTime=setTimeout(()=>this.deletionMark=null,1e3),this.deletionMark=e):this.performDeleteTag(e)},addTagsFromPaste(){this.addFromPaste&&setTimeout(()=>this.performAddTags(this.newTag),10)},performEditTag(e){this.allowEditTags&&(this.onBeforeAddingTag||this.editTag(e),this.$emit("before-editing-tag",{index:e,tag:this.tagsCopy[e],editTag:()=>this.editTag(e)}))},editTag(e){this.allowEditTags&&(this.toggleEditMode(e),this.focus(e))},toggleEditMode(e){!this.allowEditTags||this.disabled||(this.tagsEditStatus[e]=!this.tagsEditStatus[e])},createChangedTag(e,i){const s=this.tagsCopy[e];s.text=i?i.target.value:this.tagsCopy[e].text,this.tagsCopy[e]=m(s,this.tagsCopy,this.validation,this.isDuplicate)},focus(e){this.$nextTick(()=>{const i=this.tagCenter[e].querySelector("input.ti-tag-input");i&&i.focus()})},quote(e){return e.replace(/([()[{*+.$^\\|?])/g,"\\$1")},cancelEdit(e){this.tags[e]&&(this.tagsCopy[e]=c(m(this.tags[e],this.tags,this.validation,this.isDuplicate)),this.tagsEditStatus[e]=!1)},hasForbiddingAddRule(e){return e.some(i=>{const s=this.validation.find(n=>i===n.classes);return s?s.disableAdd:!1})},createTagTexts(e){const i=new RegExp(this.separators.map(s=>this.quote(s)).join("|"));return e.split(i).map(s=>({text:s}))},performDeleteTag(e){this.onBeforeDeletingTag||this.deleteTag(e),this.$emit("before-deleting-tag",{index:e,tag:this.tagsCopy[e],deleteTag:()=>this.deleteTag(e)})},deleteTag(e){this.disabled||(this.deletionMark=null,clearTimeout(this.deletionMarkTime),this.tagsCopy.splice(e,1),this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},noTriggerKey(e,i){const s=this[i].indexOf(e.keyCode)!==-1||this[i].indexOf(e.key)!==-1;return s&&e.preventDefault(),!s},performAddTags(e,i,s){if(this.disabled||i&&this.noTriggerKey(i,"addOnKey"))return;let n=[];typeof e=="object"&&(n=[e]),typeof e=="string"&&(n=this.createTagTexts(e)),n=n.filter(r=>r.text.trim().length>0),n.forEach(r=>{r=m(r,this.tags,this.validation,this.isDuplicate),this.onBeforeAddingTag||this.addTag(r,s),this.$emit("before-adding-tag",{tag:r,addTag:()=>this.addTag(r,s)})})},duplicateFilter(e){return this.isDuplicate?!this.isDuplicate(this.tagsCopy,e):!this.tagsCopy.find(i=>i.text===e.text)},addTag(e,i="new-tag-input"){const s=this.filteredAutocompleteItems.map(n=>n.text);this.addOnlyFromAutocomplete&&s.indexOf(e.text)===-1||this.$nextTick(()=>{if(this.maxTags&&this.maxTags<=this.tagsCopy.length)return this.$emit("max-tags-reached",e);if(this.avoidAddingDuplicates&&!this.duplicateFilter(e))return this.$emit("adding-duplicate",e);this.hasForbiddingAddRule(e.tiClasses)||(this.newTag="",this.tagsCopy.push(e),this.$emit("update:tags",this.tagsCopy),i==="autocomplete"&&this.$refs.newTagInput.focus(),this.$emit("tags-changed",this.tagsCopy))})},performSaveTag(e,i){const s=this.tagsCopy[e];this.disabled||i&&this.noTriggerKey(i,"addOnKey")||s.text.trim().length!==0&&(this["on-before-saving-tag"]||this.saveTag(e,s),this.$emit("before-saving-tag",{index:e,tag:s,saveTag:()=>this.saveTag(e,s)}))},saveTag(e,i){if(this.avoidAddingDuplicates){const s=c(this.tagsCopy),n=s.splice(e,1)[0];if(this.isDuplicate?this.isDuplicate(s,n):s.map(o=>o.text).indexOf(n.text)!==-1)return this.$emit("saving-duplicate",i)}this.hasForbiddingAddRule(i.tiClasses)||(this.tagsCopy[e]=i,this.toggleEditMode(e),this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},tagsEqual(){return!this.tagsCopy.some((e,i)=>!O(e,this.tags[i]))},updateNewTag(e){const i=e.target.value;this.newTag=i,this.$emit("update:modelValue",i)},initTags(){this.tagsCopy=D(this.tags,this.validation,this.isDuplicate),this.tagsEditStatus=c(this.tags).map(()=>!1),this.tagsEqual()||this.$emit("update:tags",this.tagsCopy)},blurredOnClick(e){this.$el.contains(e.target)||this.$el.contains(document.activeElement)||this.performBlur(e)},performBlur(){this.addOnBlur&&this.focused&&this.performAddTags(this.newTag),this.focused=!1}},watch:{modelValue(e){this.addOnlyFromAutocomplete||(this.selectedItem=null),this.newTag=e},tags:{handler(){this.initTags()},deep:!0},autocompleteOpen:"selectDefaultItem"},created(){this.newTag=this.modelValue,this.initTags()},mounted(){this.selectDefaultItem(),document.addEventListener("click",this.blurredOnClick)},beforeUpdate(){this.tagCenter=[]},unmounted(){document.removeEventListener("click",this.blurredOnClick)}};const K={class:"ti-input"},P={key:0,class:"ti-tags"},z=["onClick"],R={class:"ti-content"},H={key:0,class:"ti-tag-left"},G=["onClick"],j={key:1,class:"ti-tag-right"},q={class:"ti-actions"},U=["onClick"],J=["onClick"],W={class:"ti-new-tag-input-wrapper"},Y=["placeholder","value","maxlength","disabled"],Q=["onMouseover"],X=["onClick"];function Z(e,i,s,n,r,o){const l=t.resolveComponent("tag-input");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vue-tags-input",[{"ti-disabled":e.disabled},{"ti-focus":e.focused},e.$attrs.class]]),style:t.normalizeStyle(e.$attrs.style)},[t.createElementVNode("div",K,[e.tagsCopy?(t.openBlock(),t.createElementBlock("ul",P,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tagsCopy,(a,u)=>(t.openBlock(),t.createElementBlock("li",{key:u,style:t.normalizeStyle(a.style),class:t.normalizeClass([[{"ti-editing":e.tagsEditStatus[u]},a.tiClasses,a.classes,{"ti-deletion-mark":e.isMarked(u)}],"ti-tag"]),tabindex:"0",onClick:d=>e.$emit("tag-clicked",{tag:a,index:u})},[t.createElementVNode("div",R,[e.$slots["tag-left"]?(t.openBlock(),t.createElementBlock("div",H,[t.renderSlot(e.$slots,"tag-left",{tag:a,index:u,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_for:!0,ref:e.setTagCenter,class:"ti-tag-center"},[e.$slots["tag-center"]?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass({"ti-hidden":e.tagsEditStatus[u]}),onClick:d=>e.performEditTag(u)},t.toDisplayString(a.text),11,G)),e.$slots["tag-center"]?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(l,{key:1,scope:{edit:e.tagsEditStatus[u],maxlength:e.maxlength,tag:a,index:u,validateTag:e.createChangedTag,performCancelEdit:e.cancelEdit,performSaveEdit:e.performSaveTag}},null,8,["scope"])),t.renderSlot(e.$slots,"tag-center",{tag:a,index:u,maxlength:e.maxlength,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,validateTag:e.createChangedTag,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0)],512),e.$slots["tag-right"]?(t.openBlock(),t.createElementBlock("div",j,[t.renderSlot(e.$slots,"tag-right",{tag:a,index:u,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",q,[e.$slots["tag-actions"]?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("i",{key:0,class:"ti-icon-undo",onClick:d=>e.cancelEdit(u)},null,8,U)),[[t.vShow,e.tagsEditStatus[u]]]),e.$slots["tag-actions"]?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("i",{key:1,class:"ti-icon-close",onClick:d=>e.performDeleteTag(u)},null,8,J)),[[t.vShow,!e.tagsEditStatus[u]]]),e.$slots["tag-actions"]?t.renderSlot(e.$slots,"tag-actions",{key:2,tag:a,index:u,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0):t.createCommentVNode("",!0)])],14,z))),128)),t.createElementVNode("li",W,[t.createElementVNode("input",t.mergeProps({ref:"newTagInput"},e.$attrs,{class:[[e.createClasses(e.newTag,e.tags,e.validation,e.isDuplicate)],"ti-new-tag-input"],placeholder:e.placeholder,value:e.newTag,maxlength:e.maxlength,disabled:e.disabled,type:"text",size:"1",onKeydown:[i[0]||(i[0]=a=>e.performAddTags(e.filteredAutocompleteItems[e.selectedItem]||e.newTag,a)),i[2]||(i[2]=t.withKeys((...a)=>e.invokeDelete&&e.invokeDelete(...a),["delete"])),i[3]||(i[3]=t.withKeys((...a)=>e.performBlur&&e.performBlur(...a),["tab"])),i[4]||(i[4]=t.withKeys(a=>e.selectItem(a,"before"),["up"])),i[5]||(i[5]=t.withKeys(a=>e.selectItem(a,"after"),["down"]))],onPaste:i[1]||(i[1]=(...a)=>e.addTagsFromPaste&&e.addTagsFromPaste(...a)),onInput:i[6]||(i[6]=(...a)=>e.updateNewTag&&e.updateNewTag(...a)),onFocus:i[7]||(i[7]=a=>e.focused=!0),onClick:i[8]||(i[8]=a=>e.addOnlyFromAutocomplete?!1:e.selectedItem=null)}),null,16,Y)])])):t.createCommentVNode("",!0)]),t.renderSlot(e.$slots,"between-elements",{},void 0,!0),e.autocompleteOpen?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["ti-autocomplete",e.$attrs.class]),onMouseout:i[9]||(i[9]=a=>e.selectedItem=null)},[t.renderSlot(e.$slots,"autocomplete-header",{},void 0,!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredAutocompleteItems,(a,u)=>(t.openBlock(),t.createElementBlock("li",{key:u,style:t.normalizeStyle(a.style),class:t.normalizeClass([[a.tiClasses,a.classes,{"ti-selected-item":e.isSelected(u)}],"ti-item"]),onMouseover:d=>e.disabled?!1:e.selectedItem=u},[e.$slots["autocomplete-item"]?t.renderSlot(e.$slots,"autocomplete-item",{key:1,item:a,index:u,performAdd:d=>e.performAddTags(d,void 0,"autocomplete"),selected:e.isSelected(u)},void 0,!0):(t.openBlock(),t.createElementBlock("div",{key:0,onClick:d=>e.performAddTags(a,void 0,"autocomplete")},t.toDisplayString(a.text),9,X))],46,Q))),128))]),t.renderSlot(e.$slots,"autocomplete-footer",{},void 0,!0)],34)):t.createCommentVNode("",!0)],6)}const x=g._export_sfc(I,[["render",Z],["__scopeId","data-v-d14eec25"]]);const _=t.createElementVNode("h5",{class:"mn-thin"},"Tags (maximum 20):",-1),ee={class:"mn-medium"},te=t.createElementVNode("p",{class:"p-small mn-thin"},"Suggested:",-1),ie=["onClick"],se={key:1},le={__name:"BlockTags",props:["tags"],emits:["tags-changed"],setup(e,{emit:i}){const s=e,n=t.ref(""),r=t.ref([]),o=t.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);s.tags&&(r.value=s.tags.map(h=>({text:h})));const l=t.computed(()=>o.value.filter(h=>h.text.toLowerCase().includes(n.value.toLowerCase()))),a=t.computed(()=>o.value.filter(h=>!r.value.some(p=>p.text===h.text)));function u(h){r.value.push(h),i("tags-changed",r.value.map(p=>p.text))}function d(h){r.value=h,i("tags-changed",r.value.map(p=>p.text))}return(h,p)=>(t.openBlock(),t.createElementBlock("div",null,[_,t.createVNode(x,{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=f=>n.value=f),tags:r.value,"autocomplete-items":t.unref(l),"add-on-key":[13,":",";",","],"save-on-key":[13,":",";",","],separators:[";",","],"max-tags":20,maxlength:20,placeholder:"Please add tags","add-from-paste":!0,"allow-edit-tags":!0,onTagsChanged:d,class:"mn-thin bg-grey radius-medium pd-small"},null,8,["modelValue","tags","autocomplete-items"]),t.createElementVNode("p",ee,[te,t.unref(a).length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(a),(f,E)=>(t.openBlock(),t.createElementBlock("span",{onClick:Fe=>u(f),class:t.normalizeClass(["cursor-pointer ti-tag-toDefactor",{"mn-r-micro":E!==t.unref(a).length-1}])},t.toDisplayString(f.text),11,ie))),256)):(t.openBlock(),t.createElementBlock("span",se,"You added all suggested tags"))])]))}};const ne={class:"flex-v-center flex-nowrap flex"},re={key:0,class:"mn-r-auto t-transp mn-r-small"},ae=["name","value","checked"],oe={__name:"Checkbox",props:{label:String,name:String,value:String,radio:{type:[Array,Boolean,Object],default:()=>[]}},emits:["update:radio"],setup(e,{emit:i}){const s=e,n=r=>{if(Array.isArray(s.radio)){let o=[...s.radio];if(r.target.checked)o.push(s.value);else{const l=o.indexOf(s.value);l!==-1&&o.splice(l,1)}i("update:radio",o)}else typeof s.radio=="boolean"&&i("update:radio",r.target.checked)};return(r,o)=>(t.openBlock(),t.createElementBlock("label",ne,[e.label?(t.openBlock(),t.createElementBlock("div",re,[t.createElementVNode("span",null,t.toDisplayString(e.label),1)])):t.createCommentVNode("",!0),t.createElementVNode("input",{onChange:n,class:"round radiobutton",type:"checkbox",name:e.name,value:e.value,checked:Array.isArray(e.radio)?e.radio.includes(e.value):e.radio},null,40,ae),t.createElementVNode("div",{class:t.normalizeClass(["transition-elastic pd-thin h-2r w-4r radius-extra",{"bg-grey":!(Array.isArray(e.radio)?e.radio.includes(e.value):e.radio),"bg-main":Array.isArray(e.radio)?e.radio.includes(e.value):e.radio}])},[t.createElementVNode("div",{class:t.normalizeClass(["transition-linear w-1r h-1r radius-extra h-100 bg-white",{"mn-r-auto":!(Array.isArray(e.radio)?e.radio.includes(e.value):e.radio),"mn-l-auto":Array.isArray(e.radio)?e.radio.includes(e.value):e.radio}])},null,2)],2)]))}},ue=g._export_sfc(oe,[["__scopeId","data-v-f641f618"]]);function y(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function de(e){return(...i)=>!e(...i)}function he(e,i){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(i.trim())!==-1}function T(e,i,s,n){return i?e.filter(r=>he(n(r,s),i)).sort((r,o)=>n(r,s).length-n(o,s).length):e}function pe(e){return e.filter(i=>!i.$isLabel)}function v(e,i){return s=>s.reduce((n,r)=>r[e]&&r[e].length?(n.push({$groupLabel:r[i],$isLabel:!0}),n.concat(r[e])):n,[])}function ce(e,i,s,n,r){return o=>o.map(l=>{if(!l[s])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const a=T(l[s],e,i,r);return a.length?{[n]:l[n],[s]:a}:[]})}const S=(...e)=>i=>e.reduce((s,n)=>n(s),i),me={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,i){return y(e)?"":i?e[i]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",i=e.toLowerCase().trim();let s=this.options.concat();return this.internalSearch?s=this.groupValues?this.filterAndFlat(s,i,this.label):T(s,i,this.label,this.customLabel):s=this.groupValues?v(this.groupValues,this.groupLabel)(s):s,s=this.hideSelected?s.filter(de(this.isSelected)):s,this.taggable&&i.length&&!this.isExistingOption(i)&&(this.tagPosition==="bottom"?s.push({isTag:!0,label:e}):s.unshift({isTag:!0,label:e})),s.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(i=>this.customLabel(i,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,i,s){return S(ce(i,s,this.groupValues,this.groupLabel,this.customLabel),v(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return S(v(this.groupValues,this.groupLabel),pe)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const i=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(i)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(y(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const i=this.customLabel(e,this.label);return y(i)?"":i},select(e,i){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(i)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(i==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){i!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const i=this.options.find(s=>s[this.groupLabel]===e.$groupLabel);if(i){if(this.wholeGroupSelected(i)){this.$emit("remove",i[this.groupValues],this.id);const s=this.internalValue.filter(n=>i[this.groupValues].indexOf(n)===-1);this.$emit("update:modelValue",s)}else{let s=i[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&s.splice(this.max-this.internalValue.length),this.$emit("select",s,this.id),this.$emit("update:modelValue",this.internalValue.concat(s))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(i=>this.isSelected(i)||this.isOptionDisabled(i))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,i=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const s=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const n=this.internalValue.slice(0,s).concat(this.internalValue.slice(s+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&i&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,i=window.innerHeight-this.$el.getBoundingClientRect().bottom;i>this.maxHeight||i>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(i-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},fe={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,i){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(i)}},groupHighlight(e,i){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":i.$isLabel}];const s=this.options.find(n=>n[this.groupLabel]===i.$groupLabel);return s&&!this.wholeGroupDisabled(s)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(s)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}};const ge={name:"vue-multiselect",mixins:[me,fe],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}},ye=["tabindex","aria-owns"],ve={ref:"tags",class:"multiselect__tags"},be={class:"multiselect__tags-wrap"},we=["textContent"],Se=["onKeypress","onMousedown"],ke=["textContent"],Te={class:"multiselect__spinner"},Ee=["name","id","placeholder","value","disabled","tabindex","aria-controls"],Ve=["id"],$e={key:0},Oe={class:"multiselect__option"},Be=["id","role"],Ce=["onClick","onMouseenter","data-select","data-selected","data-deselect"],De=["data-select","data-deselect","onMouseenter","onMousedown"],Le={class:"multiselect__option"},Ae={class:"multiselect__option"};function Ne(e,i,s,n,r,o){return t.openBlock(),t.createElementBlock("div",{tabindex:e.searchable?-1:s.tabindex,class:t.normalizeClass([{"multiselect--active":e.isOpen,"multiselect--disabled":s.disabled,"multiselect--above":o.isAbove,"multiselect--has-options-group":o.hasOptionGroup},"multiselect"]),onFocus:i[13]||(i[13]=l=>e.activate()),onBlur:i[14]||(i[14]=l=>e.searchable?!1:e.deactivate()),onKeydown:[i[15]||(i[15]=t.withKeys(t.withModifiers(l=>e.pointerForward(),["self","prevent"]),["down"])),i[16]||(i[16]=t.withKeys(t.withModifiers(l=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:i[17]||(i[17]=t.withKeys(t.withModifiers(l=>e.addPointerElement(l),["stop","self"]),["enter","tab"])),onKeyup:i[18]||(i[18]=t.withKeys(l=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[t.renderSlot(e.$slots,"caret",{toggle:e.toggle},()=>[t.createElementVNode("div",{onMousedown:i[0]||(i[0]=t.withModifiers(l=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t.renderSlot(e.$slots,"clear",{search:e.search}),t.createElementVNode("div",ve,[t.renderSlot(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:o.visibleValues,isOpen:e.isOpen},()=>[t.withDirectives(t.createElementVNode("div",be,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.visibleValues,(l,a)=>t.renderSlot(e.$slots,"tag",{option:l,search:e.search,remove:e.removeElement},()=>[(t.openBlock(),t.createElementBlock("span",{class:"multiselect__tag",key:a},[t.createElementVNode("span",{textContent:t.toDisplayString(e.getOptionLabel(l))},null,8,we),t.createElementVNode("i",{tabindex:"1",onKeypress:t.withKeys(t.withModifiers(u=>e.removeElement(l),["prevent"]),["enter"]),onMousedown:t.withModifiers(u=>e.removeElement(l),["prevent"]),class:"multiselect__tag-icon"},null,40,Se)]))])),256))],512),[[t.vShow,o.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>s.limit?t.renderSlot(e.$slots,"limit",{key:0},()=>[t.createElementVNode("strong",{class:"multiselect__strong",textContent:t.toDisplayString(s.limitText(e.internalValue.length-s.limit))},null,8,ke)]):t.createCommentVNode("",!0)]),t.createVNode(t.Transition,{name:"multiselect__loading"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"loading",{},()=>[t.withDirectives(t.createElementVNode("div",Te,null,512),[[t.vShow,s.loading]])])]),_:3}),e.searchable?(t.openBlock(),t.createElementBlock("input",{key:0,ref:"search",name:s.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:t.normalizeStyle(o.inputStyle),value:e.search,disabled:s.disabled,tabindex:s.tabindex,onInput:i[1]||(i[1]=l=>e.updateSearch(l.target.value)),onFocus:i[2]||(i[2]=t.withModifiers(l=>e.activate(),["prevent"])),onBlur:i[3]||(i[3]=t.withModifiers(l=>e.deactivate(),["prevent"])),onKeyup:i[4]||(i[4]=t.withKeys(l=>e.deactivate(),["esc"])),onKeydown:[i[5]||(i[5]=t.withKeys(t.withModifiers(l=>e.pointerForward(),["prevent"]),["down"])),i[6]||(i[6]=t.withKeys(t.withModifiers(l=>e.pointerBackward(),["prevent"]),["up"])),i[8]||(i[8]=t.withKeys(t.withModifiers(l=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:i[7]||(i[7]=t.withKeys(t.withModifiers(l=>e.addPointerElement(l),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,Ee)):t.createCommentVNode("",!0),o.isSingleLabelVisible?(t.openBlock(),t.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:i[9]||(i[9]=t.withModifiers((...l)=>e.toggle&&e.toggle(...l),["prevent"]))},[t.renderSlot(e.$slots,"singleLabel",{option:o.singleValue},()=>[t.createTextVNode(t.toDisplayString(e.currentOptionLabel),1)])],32)):t.createCommentVNode("",!0),o.isPlaceholderVisible?(t.openBlock(),t.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:i[10]||(i[10]=t.withModifiers((...l)=>e.toggle&&e.toggle(...l),["prevent"]))},[t.renderSlot(e.$slots,"placeholder",{},()=>[t.createTextVNode(t.toDisplayString(e.placeholder),1)])],32)):t.createCommentVNode("",!0)],512),t.createVNode(t.Transition,{name:"multiselect"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(["multiselect__content-wrapper",e.$attrs.class]),onFocus:i[11]||(i[11]=(...l)=>e.activate&&e.activate(...l)),tabindex:"-1",onMousedown:i[12]||(i[12]=t.withModifiers(()=>{},["prevent"])),style:t.normalizeStyle({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[t.createElementVNode("ul",{class:"multiselect__content",style:t.normalizeStyle(o.contentStyle),role:"listbox",id:"listbox-"+e.id},[t.renderSlot(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(t.openBlock(),t.createElementBlock("li",$e,[t.createElementVNode("span",Oe,[t.renderSlot(e.$slots,"maxElements",{},()=>[t.createTextVNode("Maximum of "+t.toDisplayString(e.max)+" options selected. First remove a selected option to select another.",1)])])])):t.createCommentVNode("",!0),!e.max||e.internalValue.length<e.max?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.filteredOptions,(l,a)=>(t.openBlock(),t.createElementBlock("li",{class:"multiselect__element",key:a,id:e.id+"-"+a,role:l&&(l.$isLabel||l.$isDisabled)?null:"option"},[l&&(l.$isLabel||l.$isDisabled)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass([e.optionHighlight(a,l),"multiselect__option"]),onClick:t.withModifiers(u=>e.select(l),["stop"]),onMouseenter:t.withModifiers(u=>e.pointerSet(a),["self"]),"data-select":l&&l.isTag?e.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[t.renderSlot(e.$slots,"option",{option:l,search:e.search,index:a},()=>[t.createElementVNode("span",null,t.toDisplayString(e.getOptionLabel(l)),1)])],42,Ce)),l&&(l.$isLabel||l.$isDisabled)?(t.openBlock(),t.createElementBlock("span",{key:1,"data-select":e.groupSelect&&o.selectGroupLabelText,"data-deselect":e.groupSelect&&o.deselectGroupLabelText,class:t.normalizeClass([e.groupHighlight(a,l),"multiselect__option"]),onMouseenter:t.withModifiers(u=>e.groupSelect&&e.pointerSet(a),["self"]),onMousedown:t.withModifiers(u=>e.selectGroup(l),["prevent"])},[t.renderSlot(e.$slots,"option",{option:l,search:e.search,index:a},()=>[t.createElementVNode("span",null,t.toDisplayString(e.getOptionLabel(l)),1)])],42,De)):t.createCommentVNode("",!0)],8,Be))),128)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("li",null,[t.createElementVNode("span",Le,[t.renderSlot(e.$slots,"noResult",{search:e.search},()=>[t.createTextVNode("No elements found. Consider changing the search query.")])])],512),[[t.vShow,s.showNoResults&&e.filteredOptions.length===0&&e.search&&!s.loading]]),t.withDirectives(t.createElementVNode("li",null,[t.createElementVNode("span",Ae,[t.renderSlot(e.$slots,"noOptions",{},()=>[t.createTextVNode("List is empty.")])])],512),[[t.vShow,s.showNoOptions&&(e.options.length===0||o.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!s.loading]]),t.renderSlot(e.$slots,"afterList")],12,Ve)],38),[[t.vShow,e.isOpen]])]),_:3})],42,ye)}const Me=g._export_sfc(ge,[["render",Ne]]);exports.Checkbox=ue;exports.SelectMulti=Me;exports._sfc_main=le;