@eodash/eodash 5.0.0-alpha.2.15 → 5.0.0-alpha.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/core/client/composables/EodashMap.js +296 -0
  3. package/core/client/composables/index.js +15 -4
  4. package/core/client/eodash.js +7 -2
  5. package/core/client/plugins/axios.js +8 -0
  6. package/core/client/store/Actions.js +32 -11
  7. package/core/client/store/States.js +8 -1
  8. package/core/client/store/stac.js +59 -6
  9. package/core/client/types.d.ts +6 -2
  10. package/core/client/utils/createLayers.js +187 -49
  11. package/core/client/utils/eodashSTAC.js +147 -31
  12. package/core/client/utils/helpers.js +259 -13
  13. package/core/client/utils/states.js +17 -0
  14. package/dist/client/{DashboardLayout-DQE4aB6e.js → DashboardLayout-BR1lU9ER.js} +2 -2
  15. package/dist/client/{DynamicWebComponent-TrDsJuF8.js → DynamicWebComponent-7z8VFsrZ.js} +1 -1
  16. package/dist/client/EodashDatePicker-o7ZOYIHL.js +259 -0
  17. package/dist/client/EodashItemFilter-lNjVkidr.js +7651 -0
  18. package/dist/client/EodashLayerControl-B0N8_XmX.js +24485 -0
  19. package/dist/client/{EodashMap--2y6XErO.js → EodashMap-DFT2R2Rk.js} +22298 -24006
  20. package/dist/client/{EodashMapBtns-BSf3iUAb.js → EodashMapBtns-CoGjVl8Y.js} +2 -2
  21. package/dist/client/{ExportState-BTONkMIz.js → ExportState-Dwv37MRw.js} +171 -158
  22. package/dist/client/{Footer-B7JDXdxT.js → Footer-DuScuHSx.js} +59 -57
  23. package/dist/client/{Header-Dlumetq0.js → Header-C4Y0u0E5.js} +70 -70
  24. package/dist/client/{IframeWrapper-DRjSqhFx.js → IframeWrapper-D1TfK4xH.js} +1 -1
  25. package/dist/client/{MobileLayout-9z2X_rmU.js → MobileLayout-C-b8DIFO.js} +43 -41
  26. package/dist/client/{PopUp-CXbMBYGh.js → PopUp-DBMZX3l3.js} +5 -5
  27. package/dist/client/{VImg-Dgk5tryv.js → VImg-bAMQHnMM.js} +33 -31
  28. package/dist/client/VMain-Df5VMG9r.js +38 -0
  29. package/dist/client/VOverlay-D5GzAYRY.js +973 -0
  30. package/dist/client/{WidgetsContainer-CHK_3dlD.js → WidgetsContainer-yZDmY6_u.js} +1 -1
  31. package/dist/client/asWebComponent-DhR2_xlP.js +24492 -0
  32. package/dist/client/eo-dash.js +1 -1
  33. package/dist/client/{forwardRefs-OX_5lLJW.js → forwardRefs-C0MQxvur.js} +1 -1
  34. package/dist/client/{index-B_KfD-iF.js → index-qNWeBhRh.js} +23 -23
  35. package/dist/client/{lerc-B4lXefGh-CplqAh1B.js → lerc-B4lXefGh-CsL-d8wY.js} +1 -1
  36. package/dist/client/{ssrBoot-BZTPJZkq.js → ssrBoot-Xmkz8T49.js} +1 -1
  37. package/dist/client/style.css +2 -2
  38. package/dist/client/{transition-Dq8XIV_D.js → transition-DRzZPWIN.js} +1 -1
  39. package/dist/client/{webfontloader-qotgY98I.js → webfontloader-CqD-lAx-.js} +1 -1
  40. package/dist/node/cli.js +1 -1
  41. package/package.json +27 -22
  42. package/widgets/EodashDatePicker.vue +104 -100
  43. package/widgets/EodashItemFilter.vue +2 -0
  44. package/widgets/EodashLayerControl.vue +69 -2
  45. package/widgets/EodashMap.vue +31 -214
  46. package/widgets/ExportState.vue +12 -9
  47. package/dist/client/EodashDatePicker-CkA9rHp6.js +0 -252
  48. package/dist/client/EodashItemFilter-Bp0lcvbI.js +0 -10121
  49. package/dist/client/EodashLayerControl-lfLYqyeU.js +0 -20963
  50. package/dist/client/VMain-Ubv9jyyL.js +0 -39
  51. package/dist/client/VOverlay-CqZC2CbA.js +0 -972
  52. package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
  53. package/dist/client/asWebComponent-Ddg71BJk.js +0 -20451
  54. package/dist/client/helpers-BCawTwFg.js +0 -1390
@@ -0,0 +1,973 @@
1
+ import { br as Ce, bs as Pe, p as X, r as I, L as W, ap as se, w as B, bt as _, bu as Ie, bv as me, bw as te, bx as ne, by as ye, c as P, D as ce, bz as Ve, bA as ge, C as F, al as he, aq as ue, bB as Ae, bC as We, bm as fe, x as pe, bD as be, d as V, bE as qe, s as G, H as $e, Z as je, aB as Te, q as ze, as as Ye, bF as Ue, bG as Ge, e as Xe, ac as Ze, h as Je, g as Ke, y as Qe, i as et, j as tt, Q as nt, R as ot, ad as at, an as rt, bH as it, a as lt, b as D, bI as st, t as ct, B as ut, v as ft, F as vt, ab as dt, bJ as mt } from "./asWebComponent-DhR2_xlP.js";
2
+ import { g as yt, B as oe, e as we, n as gt, m as ht, u as bt, b as wt, a as Et, s as St } from "./forwardRefs-C0MQxvur.js";
3
+ import { m as xt, M as Ot } from "./transition-DRzZPWIN.js";
4
+ const J = /* @__PURE__ */ new WeakMap();
5
+ function kt(e, t) {
6
+ Object.keys(t).forEach((n) => {
7
+ if (Ce(n)) {
8
+ const o = Pe(n), a = J.get(e);
9
+ if (t[n] == null)
10
+ a?.forEach((l) => {
11
+ const [r, c] = l;
12
+ r === o && (e.removeEventListener(o, c), a.delete(l));
13
+ });
14
+ else if (!a || ![...a].some((l) => l[0] === o && l[1] === t[n])) {
15
+ e.addEventListener(o, t[n]);
16
+ const l = a || /* @__PURE__ */ new Set();
17
+ l.add([o, t[n]]), J.has(e) || J.set(e, l);
18
+ }
19
+ } else
20
+ t[n] == null ? e.removeAttribute(n) : e.setAttribute(n, t[n]);
21
+ });
22
+ }
23
+ function Ct(e, t) {
24
+ Object.keys(t).forEach((n) => {
25
+ if (Ce(n)) {
26
+ const o = Pe(n), a = J.get(e);
27
+ a?.forEach((l) => {
28
+ const [r, c] = l;
29
+ r === o && (e.removeEventListener(o, c), a.delete(l));
30
+ });
31
+ } else
32
+ e.removeAttribute(n);
33
+ });
34
+ }
35
+ function Le(e) {
36
+ if (typeof e.getRootNode != "function") {
37
+ for (; e.parentNode; ) e = e.parentNode;
38
+ return e !== document ? null : document;
39
+ }
40
+ const t = e.getRootNode();
41
+ return t !== document && t.getRootNode({
42
+ composed: !0
43
+ }) !== document ? null : t;
44
+ }
45
+ function Pt(e) {
46
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
47
+ for (; e; ) {
48
+ if (t ? At(e) : ve(e)) return e;
49
+ e = e.parentElement;
50
+ }
51
+ return document.scrollingElement;
52
+ }
53
+ function K(e, t) {
54
+ const n = [];
55
+ if (t && e && !t.contains(e)) return n;
56
+ for (; e && (ve(e) && n.push(e), e !== t); )
57
+ e = e.parentElement;
58
+ return n;
59
+ }
60
+ function ve(e) {
61
+ if (!e || e.nodeType !== Node.ELEMENT_NODE) return !1;
62
+ const t = window.getComputedStyle(e);
63
+ return t.overflowY === "scroll" || t.overflowY === "auto" && e.scrollHeight > e.clientHeight;
64
+ }
65
+ function At(e) {
66
+ if (!e || e.nodeType !== Node.ELEMENT_NODE) return !1;
67
+ const t = window.getComputedStyle(e);
68
+ return ["scroll", "auto"].includes(t.overflowY);
69
+ }
70
+ function pt(e) {
71
+ for (; e; ) {
72
+ if (window.getComputedStyle(e).position === "fixed")
73
+ return !0;
74
+ e = e.offsetParent;
75
+ }
76
+ return !1;
77
+ }
78
+ function Tt() {
79
+ return !0;
80
+ }
81
+ function Be(e, t, n) {
82
+ if (!e || Re(e, n) === !1) return !1;
83
+ const o = Le(t);
84
+ if (typeof ShadowRoot < "u" && o instanceof ShadowRoot && o.host === e.target) return !1;
85
+ const a = (typeof n.value == "object" && n.value.include || (() => []))();
86
+ return a.push(t), !a.some((l) => l?.contains(e.target));
87
+ }
88
+ function Re(e, t) {
89
+ return (typeof t.value == "object" && t.value.closeConditional || Tt)(e);
90
+ }
91
+ function Lt(e, t, n) {
92
+ const o = typeof n.value == "function" ? n.value : n.value.handler;
93
+ e.shadowTarget = e.target, t._clickOutside.lastMousedownWasOutside && Be(e, t, n) && setTimeout(() => {
94
+ Re(e, n) && o && o(e);
95
+ }, 0);
96
+ }
97
+ function Ee(e, t) {
98
+ const n = Le(e);
99
+ t(document), typeof ShadowRoot < "u" && n instanceof ShadowRoot && t(n);
100
+ }
101
+ const Bt = {
102
+ // [data-app] may not be found
103
+ // if using bind, inserted makes
104
+ // sure that the root element is
105
+ // available, iOS does not support
106
+ // clicks on body
107
+ mounted(e, t) {
108
+ const n = (a) => Lt(a, e, t), o = (a) => {
109
+ e._clickOutside.lastMousedownWasOutside = Be(a, e, t);
110
+ };
111
+ Ee(e, (a) => {
112
+ a.addEventListener("click", n, !0), a.addEventListener("mousedown", o, !0);
113
+ }), e._clickOutside || (e._clickOutside = {
114
+ lastMousedownWasOutside: !1
115
+ }), e._clickOutside[t.instance.$.uid] = {
116
+ onClick: n,
117
+ onMousedown: o
118
+ };
119
+ },
120
+ beforeUnmount(e, t) {
121
+ e._clickOutside && (Ee(e, (n) => {
122
+ if (!n || !e._clickOutside?.[t.instance.$.uid]) return;
123
+ const {
124
+ onClick: o,
125
+ onMousedown: a
126
+ } = e._clickOutside[t.instance.$.uid];
127
+ n.removeEventListener("click", o, !0), n.removeEventListener("mousedown", a, !0);
128
+ }), delete e._clickOutside[t.instance.$.uid]);
129
+ }
130
+ };
131
+ function ae(e, t) {
132
+ return {
133
+ x: e.x + t.x,
134
+ y: e.y + t.y
135
+ };
136
+ }
137
+ function Rt(e, t) {
138
+ return {
139
+ x: e.x - t.x,
140
+ y: e.y - t.y
141
+ };
142
+ }
143
+ function Se(e, t) {
144
+ if (e.side === "top" || e.side === "bottom") {
145
+ const {
146
+ side: n,
147
+ align: o
148
+ } = e, a = o === "left" ? 0 : o === "center" ? t.width / 2 : o === "right" ? t.width : o, l = n === "top" ? 0 : n === "bottom" ? t.height : n;
149
+ return ae({
150
+ x: a,
151
+ y: l
152
+ }, t);
153
+ } else if (e.side === "left" || e.side === "right") {
154
+ const {
155
+ side: n,
156
+ align: o
157
+ } = e, a = n === "left" ? 0 : n === "right" ? t.width : n, l = o === "top" ? 0 : o === "center" ? t.height / 2 : o === "bottom" ? t.height : o;
158
+ return ae({
159
+ x: a,
160
+ y: l
161
+ }, t);
162
+ }
163
+ return ae({
164
+ x: t.width / 2,
165
+ y: t.height / 2
166
+ }, t);
167
+ }
168
+ const Me = {
169
+ static: Nt,
170
+ // specific viewport position, usually centered
171
+ connected: Ht
172
+ // connected to a certain element
173
+ }, Mt = X({
174
+ locationStrategy: {
175
+ type: [String, Function],
176
+ default: "static",
177
+ validator: (e) => typeof e == "function" || e in Me
178
+ },
179
+ location: {
180
+ type: String,
181
+ default: "bottom"
182
+ },
183
+ origin: {
184
+ type: String,
185
+ default: "auto"
186
+ },
187
+ offset: [Number, String, Array]
188
+ }, "VOverlay-location-strategies");
189
+ function Ft(e, t) {
190
+ const n = I({}), o = I();
191
+ W && se(() => !!(t.isActive.value && e.locationStrategy), (l) => {
192
+ B(() => e.locationStrategy, l), _(() => {
193
+ window.removeEventListener("resize", a), o.value = void 0;
194
+ }), window.addEventListener("resize", a, {
195
+ passive: !0
196
+ }), typeof e.locationStrategy == "function" ? o.value = e.locationStrategy(t, e, n)?.updateLocation : o.value = Me[e.locationStrategy](t, e, n)?.updateLocation;
197
+ });
198
+ function a(l) {
199
+ o.value?.(l);
200
+ }
201
+ return {
202
+ contentStyles: n,
203
+ updateLocation: o
204
+ };
205
+ }
206
+ function Nt() {
207
+ }
208
+ function _t(e, t) {
209
+ const n = gt(e);
210
+ return t ? n.x += parseFloat(e.style.right || 0) : n.x -= parseFloat(e.style.left || 0), n.y -= parseFloat(e.style.top || 0), n;
211
+ }
212
+ function Ht(e, t, n) {
213
+ (Array.isArray(e.target.value) || pt(e.target.value)) && Object.assign(n.value, {
214
+ position: "fixed",
215
+ top: 0,
216
+ [e.isRtl.value ? "right" : "left"]: 0
217
+ });
218
+ const {
219
+ preferredAnchor: a,
220
+ preferredOrigin: l
221
+ } = Ie(() => {
222
+ const v = me(t.location, e.isRtl.value), f = t.origin === "overlap" ? v : t.origin === "auto" ? te(v) : me(t.origin, e.isRtl.value);
223
+ return v.side === f.side && v.align === ne(f).align ? {
224
+ preferredAnchor: ye(v),
225
+ preferredOrigin: ye(f)
226
+ } : {
227
+ preferredAnchor: v,
228
+ preferredOrigin: f
229
+ };
230
+ }), [r, c, u, m] = ["minWidth", "minHeight", "maxWidth", "maxHeight"].map((v) => P(() => {
231
+ const f = parseFloat(t[v]);
232
+ return isNaN(f) ? 1 / 0 : f;
233
+ })), s = P(() => {
234
+ if (Array.isArray(t.offset))
235
+ return t.offset;
236
+ if (typeof t.offset == "string") {
237
+ const v = t.offset.split(" ").map(parseFloat);
238
+ return v.length < 2 && v.push(0), v;
239
+ }
240
+ return typeof t.offset == "number" ? [t.offset, 0] : [0, 0];
241
+ });
242
+ let N = !1;
243
+ const S = new ResizeObserver(() => {
244
+ N && x();
245
+ });
246
+ B([e.target, e.contentEl], (v, f) => {
247
+ let [O, k] = v, [w, b] = f;
248
+ w && !Array.isArray(w) && S.unobserve(w), O && !Array.isArray(O) && S.observe(O), b && S.unobserve(b), k && S.observe(k);
249
+ }, {
250
+ immediate: !0
251
+ }), _(() => {
252
+ S.disconnect();
253
+ });
254
+ function x() {
255
+ if (N = !1, requestAnimationFrame(() => N = !0), !e.target.value || !e.contentEl.value) return;
256
+ const v = yt(e.target.value), f = _t(e.contentEl.value, e.isRtl.value), O = K(e.contentEl.value), k = 12;
257
+ O.length || (O.push(document.documentElement), e.contentEl.value.style.top && e.contentEl.value.style.left || (f.x -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x") || 0), f.y -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y") || 0)));
258
+ const w = O.reduce((E, h) => {
259
+ const d = h.getBoundingClientRect(), y = new oe({
260
+ x: h === document.documentElement ? 0 : d.x,
261
+ y: h === document.documentElement ? 0 : d.y,
262
+ width: h.clientWidth,
263
+ height: h.clientHeight
264
+ });
265
+ return E ? new oe({
266
+ x: Math.max(E.left, y.left),
267
+ y: Math.max(E.top, y.top),
268
+ width: Math.min(E.right, y.right) - Math.max(E.left, y.left),
269
+ height: Math.min(E.bottom, y.bottom) - Math.max(E.top, y.top)
270
+ }) : y;
271
+ }, void 0);
272
+ w.x += k, w.y += k, w.width -= k * 2, w.height -= k * 2;
273
+ let b = {
274
+ anchor: a.value,
275
+ origin: l.value
276
+ };
277
+ function T(E) {
278
+ const h = new oe(f), d = Se(E.anchor, v), y = Se(E.origin, h);
279
+ let {
280
+ x: R,
281
+ y: M
282
+ } = Rt(d, y);
283
+ switch (E.anchor.side) {
284
+ case "top":
285
+ M -= s.value[0];
286
+ break;
287
+ case "bottom":
288
+ M += s.value[0];
289
+ break;
290
+ case "left":
291
+ R -= s.value[0];
292
+ break;
293
+ case "right":
294
+ R += s.value[0];
295
+ break;
296
+ }
297
+ switch (E.anchor.align) {
298
+ case "top":
299
+ M -= s.value[1];
300
+ break;
301
+ case "bottom":
302
+ M += s.value[1];
303
+ break;
304
+ case "left":
305
+ R -= s.value[1];
306
+ break;
307
+ case "right":
308
+ R += s.value[1];
309
+ break;
310
+ }
311
+ return h.x += R, h.y += M, h.width = Math.min(h.width, u.value), h.height = Math.min(h.height, m.value), {
312
+ overflows: we(h, w),
313
+ x: R,
314
+ y: M
315
+ };
316
+ }
317
+ let p = 0, L = 0;
318
+ const A = {
319
+ x: 0,
320
+ y: 0
321
+ }, i = {
322
+ x: !1,
323
+ y: !1
324
+ };
325
+ let Y = -1;
326
+ for (; ; ) {
327
+ if (Y++ > 10) {
328
+ Ve("Infinite loop detected in connectedLocationStrategy");
329
+ break;
330
+ }
331
+ const {
332
+ x: E,
333
+ y: h,
334
+ overflows: d
335
+ } = T(b);
336
+ p += E, L += h, f.x += E, f.y += h;
337
+ {
338
+ const y = ge(b.anchor), R = d.x.before || d.x.after, M = d.y.before || d.y.after;
339
+ let q = !1;
340
+ if (["x", "y"].forEach((C) => {
341
+ if (C === "x" && R && !i.x || C === "y" && M && !i.y) {
342
+ const H = {
343
+ anchor: {
344
+ ...b.anchor
345
+ },
346
+ origin: {
347
+ ...b.origin
348
+ }
349
+ }, $ = C === "x" ? y === "y" ? ne : te : y === "y" ? te : ne;
350
+ H.anchor = $(H.anchor), H.origin = $(H.origin);
351
+ const {
352
+ overflows: j
353
+ } = T(H);
354
+ (j[C].before <= d[C].before && j[C].after <= d[C].after || j[C].before + j[C].after < (d[C].before + d[C].after) / 2) && (b = H, q = i[C] = !0);
355
+ }
356
+ }), q) continue;
357
+ }
358
+ d.x.before && (p += d.x.before, f.x += d.x.before), d.x.after && (p -= d.x.after, f.x -= d.x.after), d.y.before && (L += d.y.before, f.y += d.y.before), d.y.after && (L -= d.y.after, f.y -= d.y.after);
359
+ {
360
+ const y = we(f, w);
361
+ A.x = w.width - y.x.before - y.x.after, A.y = w.height - y.y.before - y.y.after, p += y.x.before, f.x += y.x.before, L += y.y.before, f.y += y.y.before;
362
+ }
363
+ break;
364
+ }
365
+ const ee = ge(b.anchor);
366
+ return Object.assign(n.value, {
367
+ "--v-overlay-anchor-origin": `${b.anchor.side} ${b.anchor.align}`,
368
+ transformOrigin: `${b.origin.side} ${b.origin.align}`,
369
+ // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,
370
+ top: F(re(L)),
371
+ left: e.isRtl.value ? void 0 : F(re(p)),
372
+ right: e.isRtl.value ? F(re(-p)) : void 0,
373
+ minWidth: F(ee === "y" ? Math.min(r.value, v.width) : r.value),
374
+ maxWidth: F(xe(he(A.x, r.value === 1 / 0 ? 0 : r.value, u.value))),
375
+ maxHeight: F(xe(he(A.y, c.value === 1 / 0 ? 0 : c.value, m.value)))
376
+ }), {
377
+ available: A,
378
+ contentBox: f
379
+ };
380
+ }
381
+ return B(() => [a.value, l.value, t.offset, t.minWidth, t.minHeight, t.maxWidth, t.maxHeight], () => x()), ce(() => {
382
+ const v = x();
383
+ if (!v) return;
384
+ const {
385
+ available: f,
386
+ contentBox: O
387
+ } = v;
388
+ O.height > f.y && requestAnimationFrame(() => {
389
+ x(), requestAnimationFrame(() => {
390
+ x();
391
+ });
392
+ });
393
+ }), {
394
+ updateLocation: x
395
+ };
396
+ }
397
+ function re(e) {
398
+ return Math.round(e * devicePixelRatio) / devicePixelRatio;
399
+ }
400
+ function xe(e) {
401
+ return Math.ceil(e * devicePixelRatio) / devicePixelRatio;
402
+ }
403
+ let ie = !0;
404
+ const Q = [];
405
+ function Dt(e) {
406
+ !ie || Q.length ? (Q.push(e), le()) : (ie = !1, e(), le());
407
+ }
408
+ let Oe = -1;
409
+ function le() {
410
+ cancelAnimationFrame(Oe), Oe = requestAnimationFrame(() => {
411
+ const e = Q.shift();
412
+ e && e(), Q.length ? le() : ie = !0;
413
+ });
414
+ }
415
+ const Fe = {
416
+ none: null,
417
+ close: Wt,
418
+ block: qt,
419
+ reposition: $t
420
+ }, It = X({
421
+ scrollStrategy: {
422
+ type: [String, Function],
423
+ default: "block",
424
+ validator: (e) => typeof e == "function" || e in Fe
425
+ }
426
+ }, "VOverlay-scroll-strategies");
427
+ function Vt(e, t) {
428
+ if (!W) return;
429
+ let n;
430
+ ue(async () => {
431
+ n?.stop(), t.isActive.value && e.scrollStrategy && (n = Ae(), await new Promise((o) => setTimeout(o)), n.active && n.run(() => {
432
+ typeof e.scrollStrategy == "function" ? e.scrollStrategy(t, e, n) : Fe[e.scrollStrategy]?.(t, e, n);
433
+ }));
434
+ }), _(() => {
435
+ n?.stop();
436
+ });
437
+ }
438
+ function Wt(e) {
439
+ function t(n) {
440
+ e.isActive.value = !1;
441
+ }
442
+ Ne(e.targetEl.value ?? e.contentEl.value, t);
443
+ }
444
+ function qt(e, t) {
445
+ const n = e.root.value?.offsetParent, o = [.../* @__PURE__ */ new Set([...K(e.targetEl.value, t.contained ? n : void 0), ...K(e.contentEl.value, t.contained ? n : void 0)])].filter((r) => !r.classList.contains("v-overlay-scroll-blocked")), a = window.innerWidth - document.documentElement.offsetWidth, l = ((r) => ve(r) && r)(n || document.documentElement);
446
+ l && e.root.value.classList.add("v-overlay--scroll-blocked"), o.forEach((r, c) => {
447
+ r.style.setProperty("--v-body-scroll-x", F(-r.scrollLeft)), r.style.setProperty("--v-body-scroll-y", F(-r.scrollTop)), r !== document.documentElement && r.style.setProperty("--v-scrollbar-offset", F(a)), r.classList.add("v-overlay-scroll-blocked");
448
+ }), _(() => {
449
+ o.forEach((r, c) => {
450
+ const u = parseFloat(r.style.getPropertyValue("--v-body-scroll-x")), m = parseFloat(r.style.getPropertyValue("--v-body-scroll-y")), s = r.style.scrollBehavior;
451
+ r.style.scrollBehavior = "auto", r.style.removeProperty("--v-body-scroll-x"), r.style.removeProperty("--v-body-scroll-y"), r.style.removeProperty("--v-scrollbar-offset"), r.classList.remove("v-overlay-scroll-blocked"), r.scrollLeft = -u, r.scrollTop = -m, r.style.scrollBehavior = s;
452
+ }), l && e.root.value.classList.remove("v-overlay--scroll-blocked");
453
+ });
454
+ }
455
+ function $t(e, t, n) {
456
+ let o = !1, a = -1, l = -1;
457
+ function r(c) {
458
+ Dt(() => {
459
+ const u = performance.now();
460
+ e.updateLocation.value?.(c), o = (performance.now() - u) / (1e3 / 60) > 2;
461
+ });
462
+ }
463
+ l = (typeof requestIdleCallback > "u" ? (c) => c() : requestIdleCallback)(() => {
464
+ n.run(() => {
465
+ Ne(e.targetEl.value ?? e.contentEl.value, (c) => {
466
+ o ? (cancelAnimationFrame(a), a = requestAnimationFrame(() => {
467
+ a = requestAnimationFrame(() => {
468
+ r(c);
469
+ });
470
+ })) : r(c);
471
+ });
472
+ });
473
+ }), _(() => {
474
+ typeof cancelIdleCallback < "u" && cancelIdleCallback(l), cancelAnimationFrame(a);
475
+ });
476
+ }
477
+ function Ne(e, t) {
478
+ const n = [document, ...K(e)];
479
+ n.forEach((o) => {
480
+ o.addEventListener("scroll", t, {
481
+ passive: !0
482
+ });
483
+ }), _(() => {
484
+ n.forEach((o) => {
485
+ o.removeEventListener("scroll", t);
486
+ });
487
+ });
488
+ }
489
+ const jt = Symbol.for("vuetify:v-menu"), zt = X({
490
+ closeDelay: [Number, String],
491
+ openDelay: [Number, String]
492
+ }, "delay");
493
+ function Yt(e, t) {
494
+ let n = () => {
495
+ };
496
+ function o(r) {
497
+ n?.();
498
+ const c = Number(r ? e.openDelay : e.closeDelay);
499
+ return new Promise((u) => {
500
+ n = We(c, () => {
501
+ t?.(r), u(r);
502
+ });
503
+ });
504
+ }
505
+ function a() {
506
+ return o(!0);
507
+ }
508
+ function l() {
509
+ return o(!1);
510
+ }
511
+ return {
512
+ clearDelay: n,
513
+ runOpenDelay: a,
514
+ runCloseDelay: l
515
+ };
516
+ }
517
+ const Ut = X({
518
+ target: [String, Object],
519
+ activator: [String, Object],
520
+ activatorProps: {
521
+ type: Object,
522
+ default: () => ({})
523
+ },
524
+ openOnClick: {
525
+ type: Boolean,
526
+ default: void 0
527
+ },
528
+ openOnHover: Boolean,
529
+ openOnFocus: {
530
+ type: Boolean,
531
+ default: void 0
532
+ },
533
+ closeOnContentClick: Boolean,
534
+ ...zt()
535
+ }, "VOverlay-activator");
536
+ function Gt(e, t) {
537
+ let {
538
+ isActive: n,
539
+ isTop: o,
540
+ contentEl: a
541
+ } = t;
542
+ const l = fe("useActivator"), r = I();
543
+ let c = !1, u = !1, m = !0;
544
+ const s = P(() => e.openOnFocus || e.openOnFocus == null && e.openOnHover), N = P(() => e.openOnClick || e.openOnClick == null && !e.openOnHover && !s.value), {
545
+ runOpenDelay: S,
546
+ runCloseDelay: x
547
+ } = Yt(e, (i) => {
548
+ i === (e.openOnHover && c || s.value && u) && !(e.openOnHover && n.value && !o.value) && (n.value !== i && (m = !0), n.value = i);
549
+ }), v = I(), f = {
550
+ onClick: (i) => {
551
+ i.stopPropagation(), r.value = i.currentTarget || i.target, n.value || (v.value = [i.clientX, i.clientY]), n.value = !n.value;
552
+ },
553
+ onMouseenter: (i) => {
554
+ i.sourceCapabilities?.firesTouchEvents || (c = !0, r.value = i.currentTarget || i.target, S());
555
+ },
556
+ onMouseleave: (i) => {
557
+ c = !1, x();
558
+ },
559
+ onFocus: (i) => {
560
+ qe(i.target, ":focus-visible") !== !1 && (u = !0, i.stopPropagation(), r.value = i.currentTarget || i.target, S());
561
+ },
562
+ onBlur: (i) => {
563
+ u = !1, i.stopPropagation(), x();
564
+ }
565
+ }, O = P(() => {
566
+ const i = {};
567
+ return N.value && (i.onClick = f.onClick), e.openOnHover && (i.onMouseenter = f.onMouseenter, i.onMouseleave = f.onMouseleave), s.value && (i.onFocus = f.onFocus, i.onBlur = f.onBlur), i;
568
+ }), k = P(() => {
569
+ const i = {};
570
+ if (e.openOnHover && (i.onMouseenter = () => {
571
+ c = !0, S();
572
+ }, i.onMouseleave = () => {
573
+ c = !1, x();
574
+ }), s.value && (i.onFocusin = () => {
575
+ u = !0, S();
576
+ }, i.onFocusout = () => {
577
+ u = !1, x();
578
+ }), e.closeOnContentClick) {
579
+ const Y = pe(jt, null);
580
+ i.onClick = () => {
581
+ n.value = !1, Y?.closeParents();
582
+ };
583
+ }
584
+ return i;
585
+ }), w = P(() => {
586
+ const i = {};
587
+ return e.openOnHover && (i.onMouseenter = () => {
588
+ m && (c = !0, m = !1, S());
589
+ }, i.onMouseleave = () => {
590
+ c = !1, x();
591
+ }), i;
592
+ });
593
+ B(o, (i) => {
594
+ i && (e.openOnHover && !c && (!s.value || !u) || s.value && !u && (!e.openOnHover || !c)) && !a.value?.contains(document.activeElement) && (n.value = !1);
595
+ }), B(n, (i) => {
596
+ i || setTimeout(() => {
597
+ v.value = void 0;
598
+ });
599
+ }, {
600
+ flush: "post"
601
+ });
602
+ const b = be();
603
+ ue(() => {
604
+ b.value && ce(() => {
605
+ r.value = b.el;
606
+ });
607
+ });
608
+ const T = be(), p = P(() => e.target === "cursor" && v.value ? v.value : T.value ? T.el : _e(e.target, l) || r.value), L = P(() => Array.isArray(p.value) ? void 0 : p.value);
609
+ let A;
610
+ return B(() => !!e.activator, (i) => {
611
+ i && W ? (A = Ae(), A.run(() => {
612
+ Xt(e, l, {
613
+ activatorEl: r,
614
+ activatorEvents: O
615
+ });
616
+ })) : A && A.stop();
617
+ }, {
618
+ flush: "post",
619
+ immediate: !0
620
+ }), _(() => {
621
+ A?.stop();
622
+ }), {
623
+ activatorEl: r,
624
+ activatorRef: b,
625
+ target: p,
626
+ targetEl: L,
627
+ targetRef: T,
628
+ activatorEvents: O,
629
+ contentEvents: k,
630
+ scrimEvents: w
631
+ };
632
+ }
633
+ function Xt(e, t, n) {
634
+ let {
635
+ activatorEl: o,
636
+ activatorEvents: a
637
+ } = n;
638
+ B(() => e.activator, (u, m) => {
639
+ if (m && u !== m) {
640
+ const s = c(m);
641
+ s && r(s);
642
+ }
643
+ u && ce(() => l());
644
+ }, {
645
+ immediate: !0
646
+ }), B(() => e.activatorProps, () => {
647
+ l();
648
+ }), _(() => {
649
+ r();
650
+ });
651
+ function l() {
652
+ let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : c(), m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.activatorProps;
653
+ u && kt(u, V(a.value, m));
654
+ }
655
+ function r() {
656
+ let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : c(), m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.activatorProps;
657
+ u && Ct(u, V(a.value, m));
658
+ }
659
+ function c() {
660
+ let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activator;
661
+ const m = _e(u, t);
662
+ return o.value = m?.nodeType === Node.ELEMENT_NODE ? m : void 0, o.value;
663
+ }
664
+ }
665
+ function _e(e, t) {
666
+ if (!e) return;
667
+ let n;
668
+ if (e === "parent") {
669
+ let o = t?.proxy?.$el?.parentNode;
670
+ for (; o?.hasAttribute("data-no-activator"); )
671
+ o = o.parentNode;
672
+ n = o;
673
+ } else typeof e == "string" ? n = document.querySelector(e) : "$el" in e ? n = e.$el : n = e;
674
+ return n;
675
+ }
676
+ function Zt() {
677
+ if (!W) return G(!1);
678
+ const {
679
+ ssr: e
680
+ } = $e();
681
+ if (e) {
682
+ const t = G(!1);
683
+ return je(() => {
684
+ t.value = !0;
685
+ }), t;
686
+ } else
687
+ return G(!0);
688
+ }
689
+ const ke = Symbol.for("vuetify:stack"), U = Te([]);
690
+ function Jt(e, t, n) {
691
+ const o = fe("useStack"), a = !n, l = pe(ke, void 0), r = Te({
692
+ activeChildren: /* @__PURE__ */ new Set()
693
+ });
694
+ ze(ke, r);
695
+ const c = G(+t.value);
696
+ se(e, () => {
697
+ const s = U.at(-1)?.[1];
698
+ c.value = s ? s + 10 : +t.value, a && U.push([o.uid, c.value]), l?.activeChildren.add(o.uid), _(() => {
699
+ if (a) {
700
+ const N = Ue(U).findIndex((S) => S[0] === o.uid);
701
+ U.splice(N, 1);
702
+ }
703
+ l?.activeChildren.delete(o.uid);
704
+ });
705
+ });
706
+ const u = G(!0);
707
+ a && ue(() => {
708
+ const s = U.at(-1)?.[0] === o.uid;
709
+ setTimeout(() => u.value = s);
710
+ });
711
+ const m = P(() => !r.activeChildren.size);
712
+ return {
713
+ globalTop: Ye(u),
714
+ localTop: m,
715
+ stackStyles: P(() => ({
716
+ zIndex: c.value
717
+ }))
718
+ };
719
+ }
720
+ function Kt(e) {
721
+ return {
722
+ teleportTarget: P(() => {
723
+ const n = e();
724
+ if (n === !0 || !W) return;
725
+ const o = n === !1 ? document.body : typeof n == "string" ? document.querySelector(n) : n;
726
+ if (o == null) {
727
+ Ge(`Unable to locate target ${n}`);
728
+ return;
729
+ }
730
+ let a = [...o.children].find((l) => l.matches(".v-overlay-container"));
731
+ return a || (a = document.createElement("div"), a.className = "v-overlay-container", o.appendChild(a)), a;
732
+ })
733
+ };
734
+ }
735
+ function Qt(e) {
736
+ const {
737
+ modelValue: t,
738
+ color: n,
739
+ ...o
740
+ } = e;
741
+ return D(dt, {
742
+ name: "fade-transition",
743
+ appear: !0
744
+ }, {
745
+ default: () => [e.modelValue && D("div", V({
746
+ class: ["v-overlay__scrim", e.color.backgroundColorClasses.value],
747
+ style: e.color.backgroundColorStyles.value
748
+ }, o), null)]
749
+ });
750
+ }
751
+ const en = X({
752
+ absolute: Boolean,
753
+ attach: [Boolean, String, Object],
754
+ closeOnBack: {
755
+ type: Boolean,
756
+ default: !0
757
+ },
758
+ contained: Boolean,
759
+ contentClass: null,
760
+ contentProps: null,
761
+ disabled: Boolean,
762
+ opacity: [Number, String],
763
+ noClickAnimation: Boolean,
764
+ modelValue: Boolean,
765
+ persistent: Boolean,
766
+ scrim: {
767
+ type: [Boolean, String],
768
+ default: !0
769
+ },
770
+ zIndex: {
771
+ type: [Number, String],
772
+ default: 2e3
773
+ },
774
+ ...Ut(),
775
+ ...Xe(),
776
+ ...Ze(),
777
+ ...ht(),
778
+ ...Mt(),
779
+ ...It(),
780
+ ...Je(),
781
+ ...xt()
782
+ }, "VOverlay"), an = Ke()({
783
+ name: "VOverlay",
784
+ directives: {
785
+ ClickOutside: Bt
786
+ },
787
+ inheritAttrs: !1,
788
+ props: {
789
+ _disableGlobalStack: Boolean,
790
+ ...en()
791
+ },
792
+ emits: {
793
+ "click:outside": (e) => !0,
794
+ "update:modelValue": (e) => !0,
795
+ afterEnter: () => !0,
796
+ afterLeave: () => !0
797
+ },
798
+ setup(e, t) {
799
+ let {
800
+ slots: n,
801
+ attrs: o,
802
+ emit: a
803
+ } = t;
804
+ const l = fe("VOverlay"), r = I(), c = I(), u = I(), m = Qe(e, "modelValue"), s = P({
805
+ get: () => m.value,
806
+ set: (g) => {
807
+ g && e.disabled || (m.value = g);
808
+ }
809
+ }), {
810
+ themeClasses: N
811
+ } = et(e), {
812
+ rtlClasses: S,
813
+ isRtl: x
814
+ } = tt(), {
815
+ hasContent: v,
816
+ onAfterLeave: f
817
+ } = bt(e, s), O = nt(P(() => typeof e.scrim == "string" ? e.scrim : null)), {
818
+ globalTop: k,
819
+ localTop: w,
820
+ stackStyles: b
821
+ } = Jt(s, ot(e, "zIndex"), e._disableGlobalStack), {
822
+ activatorEl: T,
823
+ activatorRef: p,
824
+ target: L,
825
+ targetEl: A,
826
+ targetRef: i,
827
+ activatorEvents: Y,
828
+ contentEvents: ee,
829
+ scrimEvents: E
830
+ } = Gt(e, {
831
+ isActive: s,
832
+ isTop: w,
833
+ contentEl: u
834
+ }), {
835
+ teleportTarget: h
836
+ } = Kt(() => {
837
+ const g = e.attach || e.contained;
838
+ if (g) return g;
839
+ const z = T?.value?.getRootNode() || l.proxy?.$el?.getRootNode();
840
+ return z instanceof ShadowRoot ? z : !1;
841
+ }), {
842
+ dimensionStyles: d
843
+ } = at(e), y = Zt(), {
844
+ scopeId: R
845
+ } = wt();
846
+ B(() => e.disabled, (g) => {
847
+ g && (s.value = !1);
848
+ });
849
+ const {
850
+ contentStyles: M,
851
+ updateLocation: q
852
+ } = Ft(e, {
853
+ isRtl: x,
854
+ contentEl: u,
855
+ target: L,
856
+ isActive: s
857
+ });
858
+ Vt(e, {
859
+ root: r,
860
+ contentEl: u,
861
+ targetEl: A,
862
+ isActive: s,
863
+ updateLocation: q
864
+ });
865
+ function C(g) {
866
+ a("click:outside", g), e.persistent ? Z() : s.value = !1;
867
+ }
868
+ function H(g) {
869
+ return s.value && k.value && // If using scrim, only close if clicking on it rather than anything opened on top
870
+ (!e.scrim || g.target === c.value || g instanceof MouseEvent && g.shadowTarget === c.value);
871
+ }
872
+ W && B(s, (g) => {
873
+ g ? window.addEventListener("keydown", $) : window.removeEventListener("keydown", $);
874
+ }, {
875
+ immediate: !0
876
+ }), rt(() => {
877
+ W && window.removeEventListener("keydown", $);
878
+ });
879
+ function $(g) {
880
+ g.key === "Escape" && k.value && (e.persistent ? Z() : (s.value = !1, u.value?.contains(document.activeElement) && T.value?.focus()));
881
+ }
882
+ const j = it();
883
+ se(() => e.closeOnBack, () => {
884
+ mt(j, (g) => {
885
+ k.value && s.value ? (g(!1), e.persistent ? Z() : s.value = !1) : g();
886
+ });
887
+ });
888
+ const de = I();
889
+ B(() => s.value && (e.absolute || e.contained) && h.value == null, (g) => {
890
+ if (g) {
891
+ const z = Pt(r.value);
892
+ z && z !== document.scrollingElement && (de.value = z.scrollTop);
893
+ }
894
+ });
895
+ function Z() {
896
+ e.noClickAnimation || u.value && Et(u.value, [{
897
+ transformOrigin: "center"
898
+ }, {
899
+ transform: "scale(1.03)"
900
+ }, {
901
+ transformOrigin: "center"
902
+ }], {
903
+ duration: 150,
904
+ easing: St
905
+ });
906
+ }
907
+ function He() {
908
+ a("afterEnter");
909
+ }
910
+ function De() {
911
+ f(), a("afterLeave");
912
+ }
913
+ return lt(() => D(vt, null, [n.activator?.({
914
+ isActive: s.value,
915
+ targetRef: i,
916
+ props: V({
917
+ ref: p
918
+ }, Y.value, e.activatorProps)
919
+ }), y.value && v.value && D(st, {
920
+ disabled: !h.value,
921
+ to: h.value
922
+ }, {
923
+ default: () => [D("div", V({
924
+ class: ["v-overlay", {
925
+ "v-overlay--absolute": e.absolute || e.contained,
926
+ "v-overlay--active": s.value,
927
+ "v-overlay--contained": e.contained
928
+ }, N.value, S.value, e.class],
929
+ style: [b.value, {
930
+ "--v-overlay-opacity": e.opacity,
931
+ top: F(de.value)
932
+ }, e.style],
933
+ ref: r
934
+ }, R, o), [D(Qt, V({
935
+ color: O,
936
+ modelValue: s.value && !!e.scrim,
937
+ ref: c
938
+ }, E.value), null), D(Ot, {
939
+ appear: !0,
940
+ persisted: !0,
941
+ transition: e.transition,
942
+ target: L.value,
943
+ onAfterEnter: He,
944
+ onAfterLeave: De
945
+ }, {
946
+ default: () => [ct(D("div", V({
947
+ ref: u,
948
+ class: ["v-overlay__content", e.contentClass],
949
+ style: [d.value, M.value]
950
+ }, ee.value, e.contentProps), [n.default?.({
951
+ isActive: s
952
+ })]), [[ut, s.value], [ft("click-outside"), {
953
+ handler: C,
954
+ closeConditional: H,
955
+ include: () => [T.value]
956
+ }]])]
957
+ })])]
958
+ })])), {
959
+ activatorEl: T,
960
+ scrimEl: c,
961
+ target: L,
962
+ animateClick: Z,
963
+ contentEl: u,
964
+ globalTop: k,
965
+ localTop: w,
966
+ updateLocation: q
967
+ };
968
+ }
969
+ });
970
+ export {
971
+ an as V,
972
+ en as m
973
+ };