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