@vokril/ui-solid 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{CommandPalette-BBDBVARB.cjs → CommandPalette-DToM9pUp.cjs} +1 -1
- package/dist/{CommandPalette-e6FePgys.js → CommandPalette-ZCFlLqrP.js} +1 -1
- package/dist/Popover-C24npAQ7.js +206 -0
- package/dist/Popover-hhGcYQ-a.cjs +1 -0
- package/dist/{StatusBarNotificationBell-B5knnCWK.js → StatusBarNotificationBell-CZmym2gV.js} +1 -1
- package/dist/{StatusBarNotificationBell-2bIRvg2s.cjs → StatusBarNotificationBell-DG8Pe6R-.cjs} +1 -1
- package/dist/{Stepper-B26aF0bA.js → Stepper-BxXwbDq4.js} +1 -1
- package/dist/{Stepper-Bl8P6HJx.cjs → Stepper-DoJFCfC7.cjs} +1 -1
- package/dist/{ToggleButton-DwvUV2en.js → ToggleButton-BfjXnp-P.js} +1 -1
- package/dist/{ToggleButton-DuKoI5PE.cjs → ToggleButton-Bjxv8KGH.cjs} +1 -1
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +2 -2
- package/dist/server/{CommandPalette-39UA8MVn.cjs → CommandPalette-C3Bw1teR.cjs} +1 -1
- package/dist/server/{CommandPalette-DIlbFrNy.js → CommandPalette-S7tfmFMb.js} +3 -3
- package/dist/server/{GuidedTour-bV_r4vSt.js → GuidedTour-BhJGkoPa.js} +2 -2
- package/dist/server/{GuidedTour-CMLjHh-y.cjs → GuidedTour-Dx0endYh.cjs} +1 -1
- package/dist/server/{IconPicker-B4wK1LxJ.js → IconPicker-B-d_Wcsj.js} +2 -2
- package/dist/server/{IconPicker-DoWUHbst.cjs → IconPicker-CSFowOa0.cjs} +1 -1
- package/dist/server/{Modal-Bt5zABLw.cjs → Modal-CAVr4DU6.cjs} +1 -1
- package/dist/server/{Modal-BJqeQWr2.js → Modal-usxkqDtK.js} +1 -1
- package/dist/server/Popover-AYYDbpLv.cjs +1 -0
- package/dist/server/{Popover-DOl2Wob7.js → Popover-BolicH3A.js} +123 -123
- package/dist/server/{StatusBarNotificationBell-BA53G1Rm.cjs → StatusBarNotificationBell-BJyGqDCX.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-5QIZhWif.js → StatusBarNotificationBell-C9MCuKT6.js} +2 -2
- package/dist/server/{Stepper-DPIaVHC2.js → Stepper-B8hDDujj.js} +1 -1
- package/dist/server/{Stepper-lTAo7tM9.cjs → Stepper-DvoJXLcM.cjs} +1 -1
- package/dist/server/{ToggleButton-Cd8Dmcuj.js → ToggleButton--G4HCOTD.js} +1 -1
- package/dist/server/{ToggleButton-BSOdOzjN.cjs → ToggleButton-DTI2HB97.cjs} +1 -1
- package/dist/server/{createResizableSidebar-94M9e5Oc.js → createResizableSidebar-D96TivmC.js} +1 -1
- package/dist/server/{createResizableSidebar-BriIvZzI.cjs → createResizableSidebar-SJ2NCIYW.cjs} +1 -1
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +2 -2
- package/dist/server/{index-BqIOYH6R.js → index-BZO0w8b6.js} +2 -2
- package/dist/server/{index-DwEHhkL-.cjs → index-DgIX9RIA.cjs} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +10 -10
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +2 -2
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +4 -4
- package/dist/solid/overlay/popover/Popover.jsx +6 -1
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/Popover-C3dFuObM.js +0 -206
- package/dist/Popover-Dbi7L860.cjs +0 -1
- package/dist/server/Popover-BSHOd_RH.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ssr as
|
|
2
|
-
import { c as
|
|
3
|
-
import { createSignal as
|
|
4
|
-
import { o as
|
|
1
|
+
import { ssr as I, createComponent as A, Portal as V, ssrAttribute as M, escape as H, ssrStyle as N, memo as F } from "solid-js/web";
|
|
2
|
+
import { c as D } from "./base-BLohC_tW.js";
|
|
3
|
+
import { createSignal as R, createEffect as T, onCleanup as P, Show as O } from "solid-js";
|
|
4
|
+
import { o as C } from "./ownerWindow-9mx_LD47.js";
|
|
5
5
|
import { u as $ } from "./overlayStack-DvGdPMdq.js";
|
|
6
6
|
import { O as z } from "./OverlayScrollArea-221dfKyz.js";
|
|
7
7
|
import { i as G } from "./keys-B2nlkpqc.js";
|
|
8
8
|
var U = '<path d="m7 9.5 5 5 5-5"></path>';
|
|
9
|
-
const gt = /* @__PURE__ */
|
|
9
|
+
const gt = /* @__PURE__ */ D({
|
|
10
10
|
name: "VpChevronDown",
|
|
11
11
|
a: {
|
|
12
12
|
fill: "none",
|
|
@@ -16,29 +16,29 @@ const gt = /* @__PURE__ */ N({
|
|
|
16
16
|
"stroke-width": "2",
|
|
17
17
|
viewBox: "0 0 24 24"
|
|
18
18
|
},
|
|
19
|
-
c: () =>
|
|
19
|
+
c: () => I(U)
|
|
20
20
|
});
|
|
21
21
|
function q(t, o) {
|
|
22
22
|
let r = !1, e = null;
|
|
23
23
|
const c = () => {
|
|
24
24
|
if (r) return;
|
|
25
|
-
const n =
|
|
25
|
+
const n = C(t);
|
|
26
26
|
if (n === null || !t.isConnected) return;
|
|
27
|
-
const
|
|
27
|
+
const g = n.requestAnimationFrame(() => {
|
|
28
28
|
r || o();
|
|
29
29
|
});
|
|
30
|
-
e = () => n.cancelAnimationFrame(
|
|
30
|
+
e = () => n.cancelAnimationFrame(g);
|
|
31
31
|
};
|
|
32
32
|
return t.isConnected ? c() : queueMicrotask(c), () => {
|
|
33
33
|
r = !0, e == null || e();
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
var K = /* @__PURE__ */ ((t) => (t[t.LEFT = 0] = "LEFT", t[t.RIGHT = 1] = "RIGHT", t))(K || {}), S = /* @__PURE__ */ ((t) => (t[t.BELOW = 0] = "BELOW", t[t.ABOVE = 1] = "ABOVE", t))(S || {}), j = /* @__PURE__ */ ((t) => (t[t.VERTICAL = 0] = "VERTICAL", t[t.HORIZONTAL = 1] = "HORIZONTAL", t))(j || {});
|
|
37
|
-
function
|
|
37
|
+
function B(t, o) {
|
|
38
38
|
const r = Math.max(t.start, o.start);
|
|
39
39
|
return Math.min(t.end, o.end) - r > 0;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function W(t, o, r) {
|
|
42
42
|
const e = r.mode === 1 ? r.offset : r.offset + r.size, c = r.mode === 1 ? r.offset + r.size : r.offset;
|
|
43
43
|
return r.position === 0 ? o <= t - e ? { position: e, result: "ok" } : o <= c ? {
|
|
44
44
|
position: c - o,
|
|
@@ -50,15 +50,15 @@ function L(t, o, r) {
|
|
|
50
50
|
}
|
|
51
51
|
function ut(t, o, r, e) {
|
|
52
52
|
let c = (e == null ? void 0 : e.anchorAlignment) ?? 0, n = (e == null ? void 0 : e.anchorPosition) ?? 0;
|
|
53
|
-
const
|
|
54
|
-
top: t.top +
|
|
55
|
-
left: t.left +
|
|
56
|
-
width: Math.max(0, t.width - 2 *
|
|
57
|
-
height: Math.max(0, t.height - 2 *
|
|
53
|
+
const g = (e == null ? void 0 : e.anchorAxisAlignment) ?? 0, w = (e == null ? void 0 : e.gap) ?? 0, u = (e == null ? void 0 : e.margin) ?? 0, l = u > 0 ? {
|
|
54
|
+
top: t.top + u,
|
|
55
|
+
left: t.left + u,
|
|
56
|
+
width: Math.max(0, t.width - 2 * u),
|
|
57
|
+
height: Math.max(0, t.height - 2 * u)
|
|
58
58
|
} : t;
|
|
59
59
|
let s, i;
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
60
|
+
if (g === 0) {
|
|
61
|
+
const f = {
|
|
62
62
|
offset: r.top - l.top - w,
|
|
63
63
|
size: r.height + 2 * w,
|
|
64
64
|
position: n === 0 ? 0 : 1
|
|
@@ -69,26 +69,26 @@ function ut(t, o, r, e) {
|
|
|
69
69
|
position: c === 0 ? 0 : 1,
|
|
70
70
|
mode: 1
|
|
71
71
|
/* ALIGN */
|
|
72
|
-
},
|
|
72
|
+
}, p = W(
|
|
73
73
|
l.height,
|
|
74
74
|
o.height,
|
|
75
|
-
|
|
75
|
+
f
|
|
76
76
|
);
|
|
77
|
-
s =
|
|
77
|
+
s = p.position + l.top, p.result === "flipped" && (n = n === 0 ? 1 : 0), B(
|
|
78
78
|
{ start: s, end: s + o.height },
|
|
79
79
|
{
|
|
80
|
-
start:
|
|
81
|
-
end:
|
|
80
|
+
start: f.offset + l.top,
|
|
81
|
+
end: f.offset + f.size + l.top
|
|
82
82
|
}
|
|
83
83
|
) && (v.mode = 0);
|
|
84
|
-
const a =
|
|
84
|
+
const a = W(
|
|
85
85
|
l.width,
|
|
86
86
|
o.width,
|
|
87
87
|
v
|
|
88
88
|
);
|
|
89
89
|
i = a.position + l.left, a.result === "flipped" && (c = c === 0 ? 1 : 0);
|
|
90
90
|
} else {
|
|
91
|
-
const
|
|
91
|
+
const f = {
|
|
92
92
|
offset: r.left - l.left - w,
|
|
93
93
|
size: r.width + 2 * w,
|
|
94
94
|
position: c === 0 ? 0 : 1
|
|
@@ -99,52 +99,52 @@ function ut(t, o, r, e) {
|
|
|
99
99
|
position: n === 0 ? 0 : 1,
|
|
100
100
|
mode: 1
|
|
101
101
|
/* ALIGN */
|
|
102
|
-
},
|
|
102
|
+
}, p = W(
|
|
103
103
|
l.width,
|
|
104
104
|
o.width,
|
|
105
|
-
|
|
105
|
+
f
|
|
106
106
|
);
|
|
107
|
-
i =
|
|
107
|
+
i = p.position + l.left, p.result === "flipped" && (c = c === 0 ? 1 : 0), B(
|
|
108
108
|
{ start: i, end: i + o.width },
|
|
109
109
|
{
|
|
110
|
-
start:
|
|
111
|
-
end:
|
|
110
|
+
start: f.offset + l.left,
|
|
111
|
+
end: f.offset + f.size + l.left
|
|
112
112
|
}
|
|
113
113
|
) && (v.mode = 0);
|
|
114
|
-
const a =
|
|
114
|
+
const a = W(
|
|
115
115
|
l.height,
|
|
116
116
|
o.height,
|
|
117
117
|
v
|
|
118
118
|
);
|
|
119
119
|
s = a.position + l.top, a.result === "flipped" && (n = n === 0 ? 1 : 0);
|
|
120
120
|
}
|
|
121
|
-
const m = t.width - (i + o.width),
|
|
122
|
-
return { top: s, left: i, bottom:
|
|
121
|
+
const m = t.width - (i + o.width), h = t.height - (s + o.height);
|
|
122
|
+
return { top: s, left: i, bottom: h, right: m, anchorAlignment: c, anchorPosition: n };
|
|
123
123
|
}
|
|
124
124
|
const b = 8, pt = 4, Y = 8, Z = 4;
|
|
125
125
|
function Q(t, o, r, e = 8) {
|
|
126
126
|
return t + o > r - e ? Math.max(e, r - e - o) : t;
|
|
127
127
|
}
|
|
128
128
|
function wt(t) {
|
|
129
|
-
const o = t.margin ?? 8, r = t.gap ?? 4, e = t.anchorRect, c = "bottom" in e && typeof e.bottom == "number" ? e.bottom : e.top + e.height, n = t.viewportHeight - c - o,
|
|
129
|
+
const o = t.margin ?? 8, r = t.gap ?? 4, e = t.anchorRect, c = "bottom" in e && typeof e.bottom == "number" ? e.bottom : e.top + e.height, n = t.viewportHeight - c - o, g = e.top - o, w = t.desiredHeight ?? t.measuredHeight ?? 240, u = n < Math.min(w, 200) && g > n, l = t.minMaxHeight ?? 120, s = Math.max(
|
|
130
130
|
l,
|
|
131
|
-
|
|
132
|
-
), i =
|
|
131
|
+
u ? g - r : n - r
|
|
132
|
+
), i = u ? Math.max(o, e.top - r - Math.min(w, s)) : c + r, m = t.measuredWidth ?? 0, h = Math.max(e.width, m), f = Q(
|
|
133
133
|
e.left,
|
|
134
|
-
|
|
134
|
+
h,
|
|
135
135
|
t.viewportWidth,
|
|
136
136
|
o
|
|
137
137
|
);
|
|
138
138
|
return {
|
|
139
139
|
top: i,
|
|
140
|
-
left:
|
|
140
|
+
left: f,
|
|
141
141
|
width: e.width,
|
|
142
142
|
maxHeight: s,
|
|
143
|
-
side:
|
|
144
|
-
preferAbove:
|
|
143
|
+
side: u ? "top" : "bottom",
|
|
144
|
+
preferAbove: u
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function L(t, o, r) {
|
|
148
148
|
return Math.max(o, Math.min(t, r));
|
|
149
149
|
}
|
|
150
150
|
function X(t) {
|
|
@@ -154,8 +154,8 @@ function J(t) {
|
|
|
154
154
|
const { placement: o, anchor: r, panelHeight: e, viewportHeight: c, gap: n } = t;
|
|
155
155
|
if (o.startsWith("top")) return "top";
|
|
156
156
|
if (o.startsWith("bottom")) return "bottom";
|
|
157
|
-
const
|
|
158
|
-
return (e > 0 ? e : 200) + n <=
|
|
157
|
+
const g = c - r.bottom - b, w = r.top - b;
|
|
158
|
+
return (e > 0 ? e : 200) + n <= g || g >= w ? "bottom" : "top";
|
|
159
159
|
}
|
|
160
160
|
function tt(t) {
|
|
161
161
|
const {
|
|
@@ -164,87 +164,87 @@ function tt(t) {
|
|
|
164
164
|
panelHeight: e,
|
|
165
165
|
viewportWidth: c,
|
|
166
166
|
viewportHeight: n,
|
|
167
|
-
gap:
|
|
168
|
-
} = t, w = X(t.placement) ? o.right - r : o.left,
|
|
167
|
+
gap: g
|
|
168
|
+
} = t, w = X(t.placement) ? o.right - r : o.left, u = L(
|
|
169
169
|
w,
|
|
170
170
|
b,
|
|
171
171
|
c - r - b
|
|
172
172
|
), l = J(t);
|
|
173
173
|
if (l === "top") {
|
|
174
|
-
const
|
|
174
|
+
const f = Math.max(
|
|
175
175
|
0,
|
|
176
|
-
o.top -
|
|
176
|
+
o.top - g - b
|
|
177
177
|
), v = Math.min(
|
|
178
178
|
n - 2 * b,
|
|
179
|
-
|
|
180
|
-
),
|
|
179
|
+
f
|
|
180
|
+
), p = e > 0 ? Math.min(e, v) : Math.min(200, v), a = o.top - g - p, d = L(
|
|
181
181
|
a,
|
|
182
182
|
b,
|
|
183
|
-
Math.max(b, o.top -
|
|
183
|
+
Math.max(b, o.top - g)
|
|
184
184
|
);
|
|
185
|
-
return { left:
|
|
185
|
+
return { left: u, top: d, anchorWidth: o.width, side: l, maxHeight: v };
|
|
186
186
|
}
|
|
187
|
-
const s = o.bottom +
|
|
187
|
+
const s = o.bottom + g, i = L(
|
|
188
188
|
s,
|
|
189
189
|
b,
|
|
190
190
|
n - e - b
|
|
191
191
|
), m = Math.max(
|
|
192
192
|
0,
|
|
193
193
|
n - i - b
|
|
194
|
-
),
|
|
194
|
+
), h = Math.min(
|
|
195
195
|
n - 2 * b,
|
|
196
196
|
m
|
|
197
197
|
);
|
|
198
|
-
return { left:
|
|
198
|
+
return { left: u, top: i, anchorWidth: o.width, side: l, maxHeight: h };
|
|
199
199
|
}
|
|
200
200
|
function vt(t) {
|
|
201
201
|
const o = t.margin ?? Y, r = t.gap ?? Z;
|
|
202
202
|
let e;
|
|
203
203
|
if ("x" in t.anchor) {
|
|
204
|
-
const a = "width" in t.anchor && typeof t.anchor.width == "number" ? t.anchor.width : 0,
|
|
204
|
+
const a = "width" in t.anchor && typeof t.anchor.width == "number" ? t.anchor.width : 0, d = "height" in t.anchor && typeof t.anchor.height == "number" ? t.anchor.height : 0;
|
|
205
205
|
e = {
|
|
206
206
|
left: t.anchor.x,
|
|
207
207
|
top: t.anchor.y,
|
|
208
208
|
width: a,
|
|
209
|
-
height:
|
|
209
|
+
height: d
|
|
210
210
|
};
|
|
211
211
|
} else {
|
|
212
|
-
const a = t.anchor.left,
|
|
213
|
-
e = { left: a, top:
|
|
212
|
+
const a = t.anchor.left, d = t.anchor.top, y = "right" in t.anchor && typeof t.anchor.right == "number" ? t.anchor.right : void 0, E = "bottom" in t.anchor && typeof t.anchor.bottom == "number" ? t.anchor.bottom : void 0, x = t.anchor.width ?? (y !== void 0 ? y - a : 0), k = t.anchor.height ?? (E !== void 0 ? E - d : 0);
|
|
213
|
+
e = { left: a, top: d, width: x, height: k };
|
|
214
214
|
}
|
|
215
|
-
const c = "left" in t.viewport ? t.viewport.left : 0, n = "top" in t.viewport ? t.viewport.top : 0,
|
|
215
|
+
const c = "left" in t.viewport ? t.viewport.left : 0, n = "top" in t.viewport ? t.viewport.top : 0, g = t.viewport.width, w = t.viewport.height, u = c + g, l = n + w, s = t.placement ?? "bottom-start";
|
|
216
216
|
let i, m;
|
|
217
217
|
if (s.startsWith("auto")) {
|
|
218
218
|
m = s === "auto-end" ? "end" : s === "auto-start" ? "start" : "center";
|
|
219
|
-
const a = l - (e.top + e.height) - o,
|
|
220
|
-
i = t.overlay.height + r <= a || a >=
|
|
219
|
+
const a = l - (e.top + e.height) - o, d = e.top - n - o;
|
|
220
|
+
i = t.overlay.height + r <= a || a >= d ? "bottom" : "top";
|
|
221
221
|
} else if (i = s.startsWith("bottom") ? "bottom" : s.startsWith("top") ? "top" : s.startsWith("left") ? "left" : "right", m = s.endsWith("-end") ? "end" : s.endsWith("-start") ? "start" : "center", i === "bottom") {
|
|
222
|
-
const a = l - (e.top + e.height) - o,
|
|
223
|
-
t.overlay.height + r > a &&
|
|
222
|
+
const a = l - (e.top + e.height) - o, d = e.top - n - o;
|
|
223
|
+
t.overlay.height + r > a && d > a && (i = "top");
|
|
224
224
|
} else if (i === "top") {
|
|
225
|
-
const a = e.top - n - o,
|
|
226
|
-
t.overlay.height + r > a &&
|
|
225
|
+
const a = e.top - n - o, d = l - (e.top + e.height) - o;
|
|
226
|
+
t.overlay.height + r > a && d > a && (i = "bottom");
|
|
227
227
|
} else if (i === "right") {
|
|
228
|
-
const a =
|
|
229
|
-
t.overlay.width + r > a &&
|
|
228
|
+
const a = u - (e.left + e.width) - o, d = e.left - c - o;
|
|
229
|
+
t.overlay.width + r > a && d > a && (i = "left");
|
|
230
230
|
} else if (i === "left") {
|
|
231
|
-
const a = e.left - c - o,
|
|
232
|
-
t.overlay.width + r > a &&
|
|
231
|
+
const a = e.left - c - o, d = u - (e.left + e.width) - o;
|
|
232
|
+
t.overlay.width + r > a && d > a && (i = "right");
|
|
233
233
|
}
|
|
234
|
-
let
|
|
235
|
-
i === "bottom" ?
|
|
236
|
-
const v =
|
|
237
|
-
d,
|
|
238
|
-
c + o,
|
|
239
|
-
p - t.overlay.width - o
|
|
240
|
-
), g = A(
|
|
234
|
+
let h = 0, f = 0;
|
|
235
|
+
i === "bottom" ? h = e.top + e.height + r : i === "top" ? h = e.top - t.overlay.height - r : i === "left" ? f = e.left - t.overlay.width - r : f = e.left + e.width + r, i === "bottom" || i === "top" ? m === "start" ? f = e.left : m === "end" ? f = e.left + e.width - t.overlay.width : f = e.left + (e.width - t.overlay.width) / 2 : m === "start" ? h = e.top : m === "end" ? h = e.top + e.height - t.overlay.height : h = e.top + (e.height - t.overlay.height) / 2;
|
|
236
|
+
const v = L(
|
|
241
237
|
f,
|
|
238
|
+
c + o,
|
|
239
|
+
u - t.overlay.width - o
|
|
240
|
+
), p = L(
|
|
241
|
+
h,
|
|
242
242
|
n + o,
|
|
243
243
|
l - t.overlay.height - o
|
|
244
244
|
);
|
|
245
245
|
return {
|
|
246
246
|
left: v,
|
|
247
|
-
top:
|
|
247
|
+
top: p,
|
|
248
248
|
anchorWidth: e.width,
|
|
249
249
|
anchorHeight: e.height,
|
|
250
250
|
side: i,
|
|
@@ -279,18 +279,18 @@ function yt(t, o, r) {
|
|
|
279
279
|
return o;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
const nt = "vk_popover_dzAQl vk_surface_3ZOnl", st = "vk_scrollArea_cBiT4",
|
|
282
|
+
const nt = "vk_popover_dzAQl vk_surface_3ZOnl", st = "vk_scrollArea_cBiT4", _ = {
|
|
283
283
|
popover: nt,
|
|
284
284
|
scrollArea: st
|
|
285
285
|
};
|
|
286
286
|
var it = ["<div", ' class="', '" style="', '">', "</div>"];
|
|
287
287
|
function xt(t) {
|
|
288
|
-
const [o, r] =
|
|
288
|
+
const [o, r] = R(null), [e, c] = R(null);
|
|
289
289
|
let n;
|
|
290
|
-
const
|
|
290
|
+
const g = () => typeof t.open == "function" ? t.open() : t.open, w = () => {
|
|
291
291
|
const s = t.anchor();
|
|
292
|
-
return (s ?
|
|
293
|
-
},
|
|
292
|
+
return (s ? C(s) : null) ?? t.ownerWindow ?? null;
|
|
293
|
+
}, u = $(() => g() && o() !== null, "popover", {
|
|
294
294
|
type: "popover",
|
|
295
295
|
element: () => e(),
|
|
296
296
|
document: () => {
|
|
@@ -300,11 +300,11 @@ function xt(t) {
|
|
|
300
300
|
}), l = () => {
|
|
301
301
|
const s = t.anchor(), i = w();
|
|
302
302
|
if (!s || i === null) return;
|
|
303
|
-
const m = s.getBoundingClientRect(),
|
|
304
|
-
left:
|
|
305
|
-
top:
|
|
306
|
-
anchorWidth:
|
|
307
|
-
maxHeight:
|
|
303
|
+
const m = s.getBoundingClientRect(), h = n == null ? void 0 : n.querySelector('[data-overlay-scroll-viewport], [class*="viewport"]'), f = h ? Number.parseFloat(i.getComputedStyle(h).maxHeight) : Number.NaN, v = h ? (Number.isFinite(f) ? Math.min(h.scrollHeight, f) : h.scrollHeight) + Math.max(0, n.offsetHeight - h.offsetHeight) : 0, p = h ? h.scrollWidth + Math.max(0, n.offsetWidth - h.offsetWidth) : 0, {
|
|
304
|
+
left: a,
|
|
305
|
+
top: d,
|
|
306
|
+
anchorWidth: y,
|
|
307
|
+
maxHeight: E
|
|
308
308
|
} = tt({
|
|
309
309
|
anchor: {
|
|
310
310
|
left: m.left,
|
|
@@ -313,22 +313,22 @@ function xt(t) {
|
|
|
313
313
|
bottom: m.bottom,
|
|
314
314
|
width: m.width
|
|
315
315
|
},
|
|
316
|
-
panelWidth: n ? Math.max(n.offsetWidth, n.scrollWidth,
|
|
317
|
-
panelHeight: n ? Math.max(n.offsetHeight, n.scrollHeight,
|
|
316
|
+
panelWidth: n ? Math.max(n.offsetWidth, n.scrollWidth, p) : 0,
|
|
317
|
+
panelHeight: n ? Math.max(n.offsetHeight, n.scrollHeight, v) : 0,
|
|
318
318
|
viewportWidth: i.innerWidth,
|
|
319
319
|
viewportHeight: i.innerHeight,
|
|
320
320
|
placement: t.placement ?? "bottom-start",
|
|
321
321
|
gap: t.gap ?? 4
|
|
322
322
|
}), x = o();
|
|
323
|
-
x && x.x ===
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
326
|
-
w:
|
|
327
|
-
maxHeight:
|
|
323
|
+
x && x.x === a && x.y === d && x.w === y && x.maxHeight === E || r({
|
|
324
|
+
x: a,
|
|
325
|
+
y: d,
|
|
326
|
+
w: y,
|
|
327
|
+
maxHeight: E
|
|
328
328
|
});
|
|
329
329
|
};
|
|
330
|
-
return
|
|
331
|
-
if (!
|
|
330
|
+
return T(() => {
|
|
331
|
+
if (!g()) {
|
|
332
332
|
r(null), c(null), n = void 0;
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
@@ -337,62 +337,62 @@ function xt(t) {
|
|
|
337
337
|
l();
|
|
338
338
|
const m = q(i, () => {
|
|
339
339
|
l();
|
|
340
|
-
const
|
|
341
|
-
if (
|
|
342
|
-
const a =
|
|
343
|
-
if (
|
|
344
|
-
const y =
|
|
345
|
-
(y ??
|
|
340
|
+
const p = t.role;
|
|
341
|
+
if (p === "menu" || p === "listbox") {
|
|
342
|
+
const a = p === "menu" ? et : ot, d = n;
|
|
343
|
+
if (d) {
|
|
344
|
+
const y = d.querySelector(a);
|
|
345
|
+
(y ?? d).focus({
|
|
346
346
|
preventScroll: !1
|
|
347
347
|
}), y == null || y.scrollIntoView({
|
|
348
348
|
block: "nearest"
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
}),
|
|
353
|
-
var
|
|
354
|
-
const a =
|
|
355
|
-
!a || !
|
|
356
|
-
},
|
|
357
|
-
!G(
|
|
352
|
+
}), h = (p) => {
|
|
353
|
+
var d;
|
|
354
|
+
const a = p.target;
|
|
355
|
+
!a || !u.isTopmostForPointer() || n != null && n.contains(a) || (d = t.anchor()) != null && d.contains(a) || a instanceof Element && a.closest('[role="listbox"], [role="menu"]') || t.onClose();
|
|
356
|
+
}, f = (p) => {
|
|
357
|
+
!G(p, "Escape") || !u.isTopmost() || (p.stopPropagation(), p.stopImmediatePropagation(), t.onClose());
|
|
358
358
|
}, v = () => l();
|
|
359
|
-
s.addEventListener("mousedown",
|
|
360
|
-
m(), s.removeEventListener("mousedown",
|
|
359
|
+
s.addEventListener("mousedown", h, !0), s.addEventListener("keydown", f, !0), s.addEventListener("resize", v), s.addEventListener("scroll", v, !0), P(() => {
|
|
360
|
+
m(), s.removeEventListener("mousedown", h, !0), s.removeEventListener("keydown", f, !0), s.removeEventListener("resize", v), s.removeEventListener("scroll", v, !0);
|
|
361
361
|
});
|
|
362
|
-
}),
|
|
362
|
+
}), T(() => {
|
|
363
363
|
const s = e(), i = w();
|
|
364
|
-
if (!s || !
|
|
364
|
+
if (!s || !g() || i === null) return;
|
|
365
365
|
const m = i.ResizeObserver;
|
|
366
366
|
if (!m) return;
|
|
367
|
-
const
|
|
367
|
+
const h = new m(() => {
|
|
368
368
|
l();
|
|
369
369
|
});
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
h.observe(s), P(() => {
|
|
371
|
+
h.disconnect();
|
|
372
372
|
});
|
|
373
373
|
}), // The window is read once the panel has a position — the anchor is attached by then; at
|
|
374
374
|
// render time it may still belong to the window-less template document.
|
|
375
|
-
|
|
375
|
+
A(O, {
|
|
376
376
|
get when() {
|
|
377
|
-
return
|
|
377
|
+
return F(() => !!(g() && o()))() ? w() : null;
|
|
378
378
|
},
|
|
379
|
-
children: (s) =>
|
|
379
|
+
children: (s) => A(O, {
|
|
380
380
|
get when() {
|
|
381
381
|
return o();
|
|
382
382
|
},
|
|
383
|
-
children: (i) =>
|
|
383
|
+
children: (i) => A(V, {
|
|
384
384
|
get mount() {
|
|
385
385
|
return s().document.body;
|
|
386
386
|
},
|
|
387
387
|
get children() {
|
|
388
|
-
return
|
|
388
|
+
return I(it, M("role", H(t.role ?? "dialog", !0), !1) + M("aria-label", H(t.ariaLabel, !0), !1) + M("tabindex", t.role === "menu" || t.role === "listbox" ? -1 : H(void 0, !0), !1), `${H(_.popover, !0)} ${H(t.class ?? "", !0)}`, N({
|
|
389
389
|
left: `${i().x}px`,
|
|
390
390
|
top: `${i().y}px`,
|
|
391
391
|
"max-height": `${i().maxHeight}px`,
|
|
392
392
|
...t.matchAnchorWidth ? {
|
|
393
393
|
"min-width": `${i().w}px`
|
|
394
394
|
} : {}
|
|
395
|
-
}),
|
|
395
|
+
}), H(A(O, {
|
|
396
396
|
get when() {
|
|
397
397
|
return t.scrollable;
|
|
398
398
|
},
|
|
@@ -400,9 +400,9 @@ function xt(t) {
|
|
|
400
400
|
return t.children;
|
|
401
401
|
},
|
|
402
402
|
get children() {
|
|
403
|
-
return
|
|
403
|
+
return A(z, {
|
|
404
404
|
get rootClass() {
|
|
405
|
-
return
|
|
405
|
+
return _.scrollArea;
|
|
406
406
|
},
|
|
407
407
|
get children() {
|
|
408
408
|
return t.children;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const p=require("./catalogNotify-BPPTINme.cjs"),P=require("./notification-CrxHMXsk.cjs"),q=require("./rendererLogging-B4XML4_G.cjs"),L=require("./notificationSuppressions-D7FZmJy8.cjs"),e=require("solid-js/web"),J=require("./mainRealmDom-BCL1p_q6.cjs"),r=require("solid-js"),le=require("./Input-CjvD8w18.cjs"),ue=require("./visibleBrowserRegistry-BTfWUlI1.cjs"),H=require("./GuidedTour-
|
|
1
|
+
"use strict";const p=require("./catalogNotify-BPPTINme.cjs"),P=require("./notification-CrxHMXsk.cjs"),q=require("./rendererLogging-B4XML4_G.cjs"),L=require("./notificationSuppressions-D7FZmJy8.cjs"),e=require("solid-js/web"),J=require("./mainRealmDom-BCL1p_q6.cjs"),r=require("solid-js"),le=require("./Input-CjvD8w18.cjs"),ue=require("./visibleBrowserRegistry-BTfWUlI1.cjs"),H=require("./GuidedTour-Dx0endYh.cjs"),o=require("./i18n-B9ccWgcR.cjs"),D=require("./pageTourState-D8Uapyft.cjs"),de=require("./useSettingsSubscription-vlMrNNH9.cjs"),Ae=require("./DesktopContextMenuContext-DMGNVjaR.cjs"),M=require("./Button-CFOM8pOv.cjs"),ee=require("./format-x-8syaS2.cjs"),ft=require("./DateRangePicker-sX2m4194.cjs"),Me=require("./OverlayScrollArea-D4e9D9Nd.cjs"),mt=require("./HostWindowContext-DqDeJmBP.cjs"),V=require("./VpTrash-CagiU2Uj.cjs"),ht=require("./VpDots-ZiJ27JK9.cjs"),bt=require("./VpCheck-CGTZXiSk.cjs"),St=require("./VpCopy-DsiWuj67.cjs"),Ct=require("./VpMinus-DUPk_dTT.cjs"),Ne=require("./Popover-AYYDbpLv.cjs"),vt=require("./isOneOf-9EXOSYJu.cjs"),Tt=require("./EmptyState-BnAHklc5.cjs"),W=require("./VpTerminal-C-U_dN_x.cjs"),yt=require("./VpClose-O8jHAcCB.cjs"),kt=require("./VpAlertTriangle-BqDp6ZRi.cjs"),wt="vk_bar_iSxMW",It="vk_barCompact_SCRfr",_t="vk_search_P2Oii",At="vk_dateBtn_v3RN1",te={bar:wt,barCompact:It,search:_t,dateBtn:At};var Mt=['<div class="','">',"","","</div>"];function Ee(t){return e.ssr(Mt,`${e.escape(te.bar,!0)} ${t.compact?e.escape(te.barCompact,!0):""} ${e.escape(t.class??"",!0)}`,e.escape(e.createComponent(le.Input,{type:"text",get class(){return te.search},get placeholder(){return t.searchPlaceholder??o.t("Search…")},get value(){return t.searchValue},onInput:i=>t.onSearchInput(i.currentTarget.value)})),e.escape(e.createComponent(r.Show,{get when(){return t.onDateRangeChange},get children(){return e.createComponent(ft.DateRangePicker,e.mergeProps({get value(){return t.dateRange??null},onChange:i=>{var s;return(s=t.onDateRangeChange)==null?void 0:s.call(t,i)},get triggerClass(){return te.dateBtn}},()=>t.dateRangeAlign?{align:t.dateRangeAlign}:{}))}})),e.escape(t.children))}const ge=["general","vendor-error","sql-execution","connection","ssh","schema","users","tablespaces","locking","monitoring","source-control","file-system","settings","rss","plugins","workspace","dev"];function De(t){return vt.isOneOf(ge,t)}function Oe(t,i){const s=t.trim();if(!s)return null;if(i)try{const a=new RegExp(s,"i");return{test:d=>a.test(d)}}catch{return Te(s)}return Te(s)}function Te(t){const i=t.toLowerCase();return{test:s=>s.toLowerCase().includes(i)}}function xe(t,i){const{tones:s,sources:a,priorities:d,dateBounds:m,searchMatcher:S}=i;return t.filter(c=>!(s.size>0&&!s.has(c.tone)||a.size>0&&!a.has(c.source)||d.size>0&&!d.has(c.priority)||m&&(c.createdAt<m.start||c.createdAt>m.end)||S&&!S.test(`${c.message} ${c.source}`)))}const Nt={general:{label:"General",description:"Uncategorized notifications. Default for callers that do not pass a source."},"vendor-error":{label:"Database errors",description:"Errors carrying a recognised vendor code (Oracle ORA-NNNNN, PG SQLSTATE, MSSQL Msg N, …). Treated as urgent when the matching setting is enabled."},"sql-execution":{label:"SQL execution",description:"Query completion / cancellation / failure notifications."},connection:{label:"Connection",description:"Connect, disconnect, test, vault credential events."},ssh:{label:"SSH & terminal",description:"SSH dock, tunnels, terminal lifecycle."},schema:{label:"Schema browser",description:"DDL extraction, copy-name, refresh."},users:{label:"Users",description:"User management — create, unlock, alter."},tablespaces:{label:"Tablespaces",description:"Tablespace creation, quota warnings."},locking:{label:"Locking",description:"Blocking sessions and deadlock alerts."},monitoring:{label:"Monitoring",description:"Threshold alerts — CPU, blocked sessions, long-running ops, invalid objects, failed logins."},"source-control":{label:"Source control",description:"Git commit / pull / push outcomes."},"file-system":{label:"File system",description:"Save, copy, paste, image clipboard."},settings:{label:"Settings",description:"Preference saves, layout reset, import/export."},rss:{label:"RSS feeds",description:"Feed refresh, post counts."},plugins:{label:"Plugins",description:"Plugin install, activation, marketplace and sandbox events."},workspace:{label:"Workspace",description:"Workspace tabs, session restore and layout events."},dev:{label:"Developer",description:"Dev test surface and internal diagnostics."}},re=ge.map(t=>({id:t,...Nt[t]})),ye=new Map(re.map(t=>[t.id,t]));function G(t){if(t){const i=ye.get(t);if(i)return i}return ye.get("general")??re[0]}function Et(){return re}function Pe(t,i){const s=[];let a=0;for(;a<t.length;){const d=t[a];if(!d)break;if(d.pinned===!0){s.push({type:"entry",id:d.id,entry:d}),a+=1;continue}const m=i==="source"?d.source:`${d.source}|${d.tone}`;let S=a+1;for(;S<t.length;){const w=t[S];if(!w||w.pinned===!0||(i==="source"?w.source:`${w.source}|${w.tone}`)!==m)break;S+=1}const c=S-a;c===1?s.push({type:"entry",id:d.id,entry:d}):s.push({type:"group",id:`group:${m}:${d.id}`,groupKey:m,groupCount:c,groupSource:d.source,groupTone:d.tone,groupItems:t.slice(a,S)}),a=S}return s}function Dt(t,i){return(t+i).indexOf(i)<t.length}const Ot=/^[=+\-@\t\r]/,xt=/^[+-]?\d[\d.,' \u00A0\u202F]*(?:[eE][+-]?\d+)?$/,Pt=/^[ \t]|[ \t]$/;function Be(t){return Ot.test(t)}function Bt(t,i){return Be(t)?i==="quotePrefix"?`'${t}`:` ${t}`:t}function Rt(t,i,s={}){if(t==null)return"";const a=String(t),d=s.numeric===!0&&xt.test(a),m=d?a:Bt(a,i.policy),S=s.forceQuote===!0,c=i.quoteChar,w=i.escape==="backslash";return i.alwaysQuote||S||Pt.test(a)||!d&&i.policy==="tabPrefix"&&Be(a)||Dt(m,i.delimiter)||m.includes(c)||m.includes(`
|
|
2
2
|
`)||m.includes("\r")||w&&m.includes("\\")?Ft(m,c,i.escape):m}function Ft(t,i,s){const a=s==="backslash"?t.replace(/\\/g,"\\\\").split(i).join(`\\${i}`):t.split(i).join(i+i);return`${i}${a}${i}`}const Vt=t=>t==="crlf"?`\r
|
|
3
3
|
`:`
|
|
4
4
|
`,Lt="\uFEFF",$t=Object.freeze({cell:Object.freeze({delimiter:",",quoteChar:'"',escape:"double",alwaysQuote:!1,policy:"quotePrefix"}),lineEnd:"crlf",byteOrderMark:!0});function zt(t,i){const s=t instanceof Date?t.toISOString():t;return Rt(s,i,{numeric:typeof t=="number"})}function qt(t,i,s){const a=Vt(s.lineEnd),d=m=>m.map(S=>zt(S,s.cell)).join(s.cell.delimiter)+a;return d(i.map(m=>m.header))+t.map(m=>d(i.map(S=>S.value(m)))).join("")}function Ut(t,i,s){return(s.byteOrderMark?Lt:"")+qt(t,i,s)}const Ht=[{header:"timestamp",value:t=>new Date(t.createdAt)},{header:"source",value:t=>t.source},{header:"tone",value:t=>t.tone},{header:"priority",value:t=>t.priority},{header:"pinned",value:t=>t.pinned===!0},{header:"message",value:t=>t.message}];function Re(t){return Ut(t,Ht,$t)}function Fe(t){return JSON.stringify(t,null,2)}let ke=!1;function Gt(){ke||typeof window>"u"||(ke=!0,p.startDigestScheduler())}let K=null;function Wt(){if(K)return K;if(typeof window>"u")return()=>{};const t=()=>{p.clearCompiledRuleRegexCache(),p.invalidateCustomSoundCache(),p.refreshOsBadge()};return window.addEventListener(P.notificationSettings.changeEvent,t),K=()=>{window.removeEventListener(P.notificationSettings.changeEvent,t),K=null},K}function Qt(t,i){return{update:(s,a)=>{t.update({title:s}),a!==void 0&&t.setProgress({value:Math.max(0,Math.min(1,a)),...i.onCancel?{onCancel:i.onCancel}:{}})},success:s=>t.update({title:s??i.message,severity:"success",sticky:!1,progress:{done:!0}}),fail:s=>t.update({title:s??i.message,severity:"error",sticky:!0,progress:{done:!0},durationMs:1/0}),dismiss:()=>t.close()}}function we(t){return{label:t.label,onClick:()=>{},...t.expireOnAction!==void 0?{expireOnAction:t.expireOnAction}:{}}}function Ie(t){const i=p.withErrorActionButtons(t);return{...i,...i.action?{action:we(i.action)}:{},...i.actions?{actions:i.actions.map(we)}:{},...i.onCancel?{onCancel:()=>{}}:{}}}function jt(t){return t.vendorError===void 0||!p.isVendorErrorSourceInstalled()?null:p.resolveVendorError(t.vendorError)}function Yt(){let t={...P.DEFAULT_NOTIFICATION_SETTINGS},i={dismissed:!1,remindSuppressed:!1,sourceMuted:!1,inQuietHours:!1};const s=[],a=L.createNativeNotificationEngine({getSettings:()=>t,recordAutoFade:()=>{},warn:()=>{}});let d=[];const m=a.subscribe(c=>{d=c});return{host:{notify(c,w){var E;const l=Ie(w),T=jt(l),I=c.severity==="error"?p.enrichErrorToast(l.message,{...l.title?{title:l.title}:{},...l.subtitle?{subtitle:l.subtitle}:{},...l.description?{description:l.description}:{},...l.action?{action:l.action}:{}},T,L.openExternal):null,B=c.severity==="error"&&c.source==="general"&&T!==null?"vendor-error":c.source,f=p.resolveCatalogPreviewPriority(c.severity,c.priority,T!==null,t.vendorCodesAreUrgent),h=p.applyNotificationRules({severity:c.severity,title:(I==null?void 0:I.displayText)??l.title??l.message,priority:f,source:B},t.notificationRules),b=h===null?{showToast:!1,recordTimeline:!1}:L.decideFilter({priority:h.priority,recordTimeline:l.recordTimeline},t,i),y=c.delivery==="os-only"?"mock-os":b.showToast?"shown":b.recordTimeline?"timeline-only":"suppressed",_={definition:c,payload:{...l,message:q.scrubSecrets(l.message),...l.title?{title:q.scrubSecrets(l.title)}:{},...l.description?{description:q.scrubSecrets(l.description)}:{}},channel:c.delivery,decision:b,outcome:y};if(c.delivery==="os-only"||h===null||!b.showToast)return s.push(_),"";const v=(I==null?void 0:I.bodyText)??l.subtitle??l.description,O=(I==null?void 0:I.primaryAction)??l.action,R=a.notify({severity:h.severity,title:q.scrubSecrets(h.title),...v?{body:q.scrubSecrets(v)}:{},source:h.source,priority:h.priority,...l.duration!==void 0?{durationMs:l.duration}:{},...l.id!==void 0?{id:String(l.id)}:{},...l.icon?{icon:l.icon}:{},...l.markdown?{markdown:!0}:{},...O||(E=l.actions)!=null&&E.length?{actions:[O,...l.actions??[]].filter(F=>F!==void 0).map((F,j)=>({label:F.label,primary:j===0,onClick:()=>{F.onClick()}}))}:{}});return s.push(R.id?_:{..._,outcome:"spam-dropped"}),R.id},progress(c,w){const l=Ie(w),T=L.decideFilter({priority:c.priority,recordTimeline:l.recordTimeline},t,i);if(s.push({definition:c,payload:l,channel:"in-app",decision:T,outcome:T.showToast?"shown":T.recordTimeline?"timeline-only":"suppressed"}),!T.showToast)return{update:()=>{},success:()=>{},fail:()=>{},dismiss:()=>{}};const I=a.notify({severity:c.severity,title:q.scrubSecrets(l.message),source:c.source,priority:c.priority,sticky:!0,progress:l.onCancel?{onCancel:l.onCancel}:{},...l.id!==void 0?{id:String(l.id)}:{}});return Qt(I,l)}},controller:a,deliveries:s,setBehavior:c=>{t={...P.DEFAULT_NOTIFICATION_SETTINGS},i={dismissed:c==="dismissed",remindSuppressed:c==="reminder",sourceMuted:c==="source-muted",inQuietHours:c==="quiet-hours"},c==="dnd"?t={...t,doNotDisturb:!0}:c==="rule-transform"?t={...t,notificationRules:[{id:"preview-transform",name:"Preview transform",enabled:!0,conditions:{source:"dev"},actions:{setSeverity:"warning",setPriority:"urgent",addPrefix:"[RULE]"}}]}:c==="rule-suppress"&&(t={...t,notificationRules:[{id:"preview-suppress",name:"Preview suppress",enabled:!0,conditions:{source:"dev"},actions:{suppress:!0}}]})},subscribe:c=>a.subscribe(c),clear:()=>{for(const c of d)a.close(c.id);s.splice(0,s.length)},dispose:()=>{m(),a.dispose()}}}const Jt=p.defineNotification({id:"onboarding.PageTourHost.info.1",source:"general",severity:"info",priority:"default",delivery:"in-app",kind:"message"},()=>({message:o.t("You can reopen this tour from Help → Page tours.")}));function ie(t){return t.getClientRects().length>0&&t.getBoundingClientRect().width>0&&t.getBoundingClientRect().height>0}function ne(t){return i=>i.matches(t)&&ie(i)?i:Array.from(i.querySelectorAll(t)).find(ie)??null}var Kt=["<span hidden","></span>"];function Xt(t){const i=r.useContext(ue.ToolWindowContext);let s;const[a,d]=r.createSignal(!1),[m,S]=r.createSignal(0),[c,w]=r.createSignal([]);let l=!1,T=!1,I=!1;const B={},f=()=>s.parentElement,h=()=>ie(f()),b=(v,O=!0)=>{var R;d(!1),D.releaseTour(B),D.setActiveTour(null),(R=t.onTourActiveChange)==null||R.call(t,!1);try{D.writeTourStatus(t.definition.pageId,v?"completed":"skipped")}catch(E){q.getLogger("PageTour").warn("Could not save tour progress",E)}l&&O&&p.notifyFromCatalog(Jt,{}),l=!1},y=()=>{D.setNeverShowToursAgain(!0),b(!1,!1)},_=(v=!1)=>{var R;if(!h()||!D.claimTour(B))return;T=!1;const O=t.definition.steps.filter(E=>{var F;return((F=E.available)==null?void 0:F.call(E))!==!1});if(!O.length){D.releaseTour(B);return}w(O),S(0),l=v;try{D.writeTourStatus(t.definition.pageId,"shown")}catch(E){q.getLogger("PageTour").warn("Could not save tour progress",E)}D.setActiveTour(t.definition.pageId),(R=t.onTourActiveChange)==null||R.call(t,!0),d(!0)};return r.onMount(()=>{const v=f(),O=v.hasAttribute("tabindex");O||(v.tabIndex=-1),r.onCleanup(()=>{O||v.removeAttribute("tabindex")});const E=s.ownerDocument.defaultView;if(!E)return;const F=()=>Array.from(s.ownerDocument.querySelectorAll('[role="dialog"], [role="alertdialog"]')).some(N=>ie(N)&&!N.contains(f()));let j=0;const U=()=>{var N;if(!h()){j=0,a()&&b(!1,!1);return}if(!(a()||F()||((N=i==null?void 0:i.isReady)==null?void 0:N.call(i))===!1)&&!(++j<2)){if(D.consumeTourRequest(t.definition.pageId)&&(T=!0),T){_();return}if(!I&&!D.shouldSkipWelcome())try{D.readTourStatus(t.definition.pageId)||_(!0)}catch(ae){I=!0,q.getLogger("PageTour").warn("Could not read tour progress",ae)}}},x=D.registerTourHost({page:t.definition.pageId,document:()=>s.ownerDocument,visible:h,start:()=>{T=!0,(a()||!F())&&_()},dismiss:()=>{a()&&b(!1,!1)}}),se=E.setInterval(U,250);r.onCleanup(()=>{var N;E.clearInterval(se),x(),D.releaseTour(B),D.getActiveTourPage()===t.definition.pageId&&(D.setActiveTour(null),(N=t.onTourActiveChange)==null||N.call(t,!1))})}),[e.ssr(Kt,e.ssrAttribute("data-page-tour-host",e.escape(t.definition.pageId,!0),!1)),e.createComponent(r.Show,{get when(){return a()},get children(){return e.createComponent(H.GuidedTour,{get document(){return s.ownerDocument},focusFallback:()=>h()?f():null,get steps(){return c()},get index(){return m()},target:()=>{var v;return((v=c()[m()])==null?void 0:v.target(f()))??null},onSelect:S,onClose:b,onNeverShowAgain:y})}})]}const Zt={id:"notifications",pageId:"notifications",version:1,steps:[{id:"panel",title:"Notification Center",description:"Stay informed on database events, completed exports, query execution errors, and background system alerts.",target:ne('[data-tour-target="notifications-panel"]')},{id:"actions",title:"Timeline Actions & Filter Options",description:"Search notifications, filter by priority or notification source, pin important entries, and export history to CSV or JSON.",target:ne('[data-tour-target="notifications-actions"]')},{id:"settings",title:"Notification Settings & DND",description:"Open the notification menu to configure do-not-disturb, quiet hours, and notification delivery preferences.",target:ne('[data-tour-target="notifications-settings"]')},{id:"timeline",title:"Interactive Timeline Cards",description:"Click notification entries to expand stack traces, inspect vendor error codes, or navigate directly to affected queries.",target:ne('[data-tour-target="notifications-timeline"]')}]};function en(t,i,s,a,d=2){return t<=0||t>s?0:Math.min(i,d+Math.floor((s-t)/a))}function X(t,i){t(s=>{const a=new Set(s);return a.has(i)?a.delete(i):a.add(i),a})}const tn="vk_rightRail_HtYMh",nn="vk_notificationPanel_nrSZl",on="vk_filterBar_WTQg3",rn="vk_notificationPanelHeader_aHtxT vk_headerRail_CLLzD",sn="vk_notificationPanelTitleWrap_cOfAP vk_titleWrapRail_b0Czp",an="vk_notificationPanelTitle_9iMrQ vk_titleSmMargin_PPvAx",cn="vk_notificationPanelActions_7fRj6 vk_actionsRail_QqUv8",ln="vk_notificationActionIcon_d5EzT",un="vk_notificationTimeline_K-mMI",dn="vk_notificationEmpty_IU6kY",gn="vk_notificationItem_tm8HP",pn="vk_notificationGroup_4hkdy",fn="vk_notificationGroupToggle_Opmmd",mn="vk_notificationGroupBody_nlrmq",hn="vk_notificationItemSelected_DspyF",bn="vk_notificationItemCheckbox_knWVX",Sn="vk_bulkActionBar_6MHEY",Cn="vk_bulkActionCount_Mb4tN",vn="vk_notificationItemTop_Mt0D7",Tn="vk_notificationToneDot_Z-LOj",yn="vk_notificationToneInfo_rxKOj",kn="vk_notificationToneSuccess_Bxc9E",wn="vk_notificationToneWarning_uBK0T",In="vk_notificationToneError_p9EYY",_n="vk_notificationItemTime_WT4cd",An="vk_notificationItemCopyDone_P39uT",Mn="vk_notificationItemMessage_G2mnV",Nn="vk_notificationItemMeta_xdFUH",En="vk_notificationSourceLabel_VvB0i",Dn="vk_priorityBadgeIcon_UaJX0",u={rightRail:tn,notificationPanel:nn,filterBar:on,notificationPanelHeader:rn,notificationPanelTitleWrap:sn,notificationPanelTitle:an,notificationPanelActions:cn,notificationActionIcon:ln,notificationTimeline:un,notificationEmpty:dn,notificationItem:gn,notificationGroup:pn,notificationGroupToggle:fn,notificationGroupBody:mn,notificationItemSelected:hn,notificationItemCheckbox:bn,bulkActionBar:Sn,bulkActionCount:Cn,notificationItemTop:vn,notificationToneDot:Tn,notificationToneInfo:yn,notificationToneSuccess:kn,notificationToneWarning:wn,notificationToneError:In,notificationItemTime:_n,notificationItemCopyDone:An,notificationItemMessage:Mn,notificationItemMeta:Nn,notificationSourceLabel:En,priorityBadgeIcon:Dn};var On=["<h3",">","</h3>"],xn=["<div",' data-tour-target="notifications-actions">',"</div>"],Pn=["<div",' role="toolbar"',"><span",">","</span>","","","","</div>"],Bn=["<span",">📌 ","</span>"],Rn=["<aside",' tabindex="-1"><section',' data-tour-target="notifications-panel">',"","","","","</section></aside>"],Fn=["<p",">","</p>"],Vn=['<span class="','"></span>'],Ln=["<span",">","</span>"],$n=['<article class="','"><div',">",'<span class="','"></span><time',">","</time>","","","","</div><p",">","</p><div","><span",">","</span>","","","</div></article>"];const zn=q.getLogger("NotificationPanel");function qn(t){return new Intl.DateTimeFormat(ee.systemFormatLocale(),{hour:"2-digit",minute:"2-digit"}).format(new Date(t))}function Un(t){return new Intl.DateTimeFormat(ee.systemFormatLocale(),{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(t))}function _e(t){switch(t){case"success":return u.notificationToneSuccess;case"error":return u.notificationToneError;case"warning":return u.notificationToneWarning;default:return u.notificationToneInfo}}const oe=["error","warning","info","success"],Hn=189,Gn=27;function Wn(t){const i=mt.useHostDocument(),[s,a]=r.createSignal(null),[d,m]=r.createSignal(0),[S,c]=r.createSignal(""),[w,l]=r.createSignal(null),[T,I]=r.createSignal(new Set),[B,f]=r.createSignal(!1),[h,b]=r.createSignal(new Set),[y,_]=r.createSignal(new Set),[v,O]=r.createSignal(new Set),[R,E]=r.createSignal(!1),[F,j]=r.createSignal(0);let U=null;const x=Ae.useDesktopContextMenu(),se=r.createMemo(()=>Oe(S(),R())),N=r.createMemo(()=>xe(t.notificationTimeline(),{tones:T(),sources:y(),priorities:v(),dateBounds:w(),searchMatcher:se()})),ae=r.createMemo(()=>{const n=new Set;for(const g of t.notificationTimeline())n.add(g.source);return Array.from(n).sort()}),pe=r.createMemo(()=>N().filter(n=>n.pinned===!0)),[Le,$e]=r.createSignal(0);de.useSettingsSubscription(P.notificationSettings,()=>{$e(n=>n+1)});const[ze,qe]=r.createSignal(new Set),Ue=r.createMemo(()=>{Le();const n=P.notificationSettings.get();return n.timelineGroupingEnabled?Pe(N(),n.timelineGroupBy):N().map(g=>({type:"entry",id:g.id,entry:g}))}),He=n=>{X(qe,n)},fe=()=>S().trim()!==""||w()!==null||T().size>0||y().size>0||v().size>0,Ge=()=>{c(""),l(null),I(new Set),_(new Set),O(new Set)},We=n=>{X(_,n)},Qe=n=>{X(O,n)},je=["urgent","acknowledgment-required","default","optional","silent"],Ye=n=>{if(n.preventDefault(),n.stopPropagation(),x.state()!==null){x.close();return}const C=n.currentTarget.getBoundingClientRect(),k=ae(),$={urgent:o.t("Urgent"),"acknowledgment-required":o.t("Acknowledgment required"),default:o.t("Default"),optional:o.t("Optional"),silent:o.t("Silent")};x.open(C.left,C.bottom+4,[{label:o.t("Use regex in search"),checked:()=>R(),keepOpenOnSelect:!0,onSelect:()=>{E(z=>!z)}},{type:"separator"},{label:o.t("Filter by priority"),submenu:je.map(z=>({label:$[z],checked:()=>v().has(z),keepOpenOnSelect:!0,onSelect:()=>Qe(z)}))},...k.length>0?[{label:o.t("Filter by source"),submenu:k.map(z=>({label:G(z).label,checked:()=>y().has(z),keepOpenOnSelect:!0,onSelect:()=>We(z)}))}]:[],{type:"separator"},{label:o.t("Clear advanced filters"),disabled:y().size===0&&v().size===0,onSelect:()=>{_(new Set),O(new Set)}}])},Je=n=>{X(I,n)},Ke=()=>{const n=T();return n.size===0||n.size===oe.length?o.t("All tones"):Array.from(n).join(", ")},Xe=n=>{if(n.preventDefault(),n.stopPropagation(),x.state()!==null){x.close();return}const C=n.currentTarget.getBoundingClientRect();x.open(C.left,C.bottom+4,[...oe.map(k=>({label:o.t(H.NOTIFICATION_SEVERITY_LABELS[k]),checked:()=>T().has(k),keepOpenOnSelect:!0,onSelect:()=>Je(k)})),{type:"separator"},...T().size===oe.length?[{label:o.t("Select none"),onSelect:()=>{I(new Set)}}]:[{label:o.t("Select all"),onSelect:()=>{I(new Set(oe))}}]])};r.onMount(()=>{const n=p.subscribeUnreadCount(m);r.onCleanup(n)});const Ze=n=>{const g=t.notificationTimeline().find(C=>C.id===n);g&&L.recordDismiss(g.source),p.dismissNotificationTimelineEntry(n)},et=n=>{const g={source:De(n.source)?n.source:"general",priority:"urgent",recordTimeline:!1},C=n.tone;C==="error"?p.notifyFromCatalog(p.notificationReplayError,{timelineMessage:n.message,options:g}):C==="warning"?p.notifyFromCatalog(p.notificationReplayWarning,{timelineMessage:n.message,options:g}):C==="success"?p.notifyFromCatalog(p.notificationReplaySuccess,{timelineMessage:n.message,options:g}):p.notifyFromCatalog(p.notificationReplayInfo,{timelineMessage:n.message,options:g})},tt=n=>{const g=p.entryVendorMatch(n);g&&L.openExternal(g.helpers.docsUrl(g.code))},nt=()=>{p.clearNotificationTimeline()},ot=n=>{X(b,n)},it=()=>{f(!0),b(new Set)},me=()=>{f(!1),b(new Set)},rt=()=>{b(new Set(N().map(n=>n.id)))},Y=()=>h().size,st=()=>{const n=h();return N().filter(g=>n.has(g.id)).map(g=>g.id)},at=()=>{const n=st();n.length!==0&&(p.dismissNotificationTimelineEntries(n),me())},he=n=>{const g=h(),C=t.notificationTimeline().filter(k=>g.has(k.id));for(const k of C)(k.pinned??!1)!==n&&p.toggleTimelineEntryPin(k.id)},be=async n=>{const g=N();if(g.length===0)return;const C=L.getFsService(),$=`notifications-${new Date().toISOString().replace(/[:T]/g,"-").slice(0,19)}.${n}`,z=n==="csv"?[{name:"CSV",extensions:["csv"]}]:[{name:"JSON",extensions:["json"]}];try{const Q=await C.showSaveDialog({title:o.t("Export notifications"),defaultPath:$,filters:z});if(!(Q!=null&&Q.filePath))return;const pt=n==="csv"?Re(g):Fe(g);await C.writeFile(Q.filePath,pt),p.notifyFromCatalog(p.notificationTimelineExported,{entryCount:g.length})}catch(Q){p.notifyFromCatalog(p.notificationTimelineExportFailed,{cause:Q})}},ct=()=>{ue.openSettingsModal("notification")},lt=n=>{if(n.preventDefault(),n.stopPropagation(),x.state()!==null){x.close();return}const C=n.currentTarget.getBoundingClientRect(),k=N().length===0;x.open(C.left,C.bottom+4,[{label:o.t("Export"),disabled:k,submenu:[{label:o.t("Export as CSV"),onSelect:()=>{be("csv")}},{label:o.t("Export as JSON"),onSelect:()=>{be("json")}}]},{type:"separator"},{label:o.t("Notification settings…"),onSelect:ct}])},ut=async n=>{var C;const g=n.message.trim();if(g)try{if((C=navigator.clipboard)!=null&&C.writeText)await navigator.clipboard.writeText(g);else{const k=i,$=J.createElement("textarea");$.value=g,$.setAttribute("readonly","true"),$.style.position="fixed",$.style.opacity="0",k.body.appendChild($),$.select(),k.execCommand("copy"),k.body.removeChild($)}a(n.id),U!==null&&window.clearTimeout(U),U=window.setTimeout(()=>{a(k=>k===n.id?null:k),U=null},1400)}catch(k){zn.warn("Timeline entry could not be copied:",k)}};r.onCleanup(()=>{U!==null&&window.clearTimeout(U)}),r.onMount(()=>{});const ce=r.createMemo(()=>[{id:"select",icon:()=>e.createComponent(V.VpSquareCheck,{get class(){return u.notificationActionIcon}}),label:()=>o.t("Select multiple notifications"),disabled:()=>N().length===0,onSelect:it},{id:"mark-read",icon:()=>e.createComponent(V.VpMailOpened,{get class(){return u.notificationActionIcon}}),label:()=>o.t("Mark all as read"),disabled:()=>d()===0,onSelect:()=>p.markTimelineSeen()},{id:"clear",icon:()=>e.createComponent(V.VpTrash,{get class(){return u.notificationActionIcon}}),label:()=>o.t("Clear all notifications"),disabled:()=>t.notificationTimeline().length===0,onSelect:nt}]),Se=r.createMemo(()=>en(F(),ce().length,Hn,Gn)),dt=r.createMemo(()=>{const n=ce();return n.slice(0,n.length-Se())}),Ce=r.createMemo(()=>{const n=ce();return n.slice(n.length-Se())}),gt=n=>{if(n.preventDefault(),n.stopPropagation(),x.state()!==null){x.close();return}x.openWithPlacement(H.placeMenuAtTrigger(n.currentTarget,{horizontal:"right"}),Ce().map(g=>({label:g.label(),icon:g.icon(),disabled:g.disabled(),onSelect:g.onSelect})))};return e.ssr(Rn,e.ssrAttribute("class",e.escape(u.rightRail,!0),!1),e.ssrAttribute("class",e.escape(u.notificationPanel,!0),!1),e.escape(e.createComponent(H.Panel.Header,{get class(){return u.notificationPanelHeader},get children(){return[e.createComponent(le.PressableSurface,{type:"button",get class(){return u.notificationPanelTitleWrap},"data-tour-target":"notifications-settings",onClick:lt,get title(){return o.t("Notification menu")},"aria-haspopup":"menu",get children(){return[e.ssr(On,e.ssrAttribute("class",e.escape(u.notificationPanelTitle,!0),!1),e.escape(o.t("Notifications"))),e.createComponent(r.Show,{get when(){return d()>0},get children(){return e.createComponent(J.Badge,{tone:"danger",size:"sm",get tooltip(){return o.t("{count} unread",{count:d()})},get children(){return d()>99?"99+":d()}})}})]}}),e.ssr(xn,e.ssrAttribute("class",e.escape(u.notificationPanelActions,!0),!1),e.escape(e.createComponent(r.Show,{get when(){return!B()},get fallback(){return e.createComponent(M.Button,{variant:"ghost",size:"sm",onClick:me,get title(){return o.t("Exit selection mode")},get children(){return o.t("Cancel")}})},get children(){return[e.createComponent(r.For,{get each(){return dt()},children:n=>e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,get onClick(){return n.onSelect},get disabled(){return n.disabled()},get title(){return n.label()},get"aria-label"(){return n.label()},get children(){return n.icon()}})}),e.createComponent(r.Show,{get when(){return Ce().length>0},get children(){return e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,onClick:gt,get title(){return o.t("More actions")},get"aria-label"(){return o.t("More actions")},get children(){return e.createComponent(ht.VpDots,{get class(){return u.notificationActionIcon}})}})}})]}})))]}})),e.escape(e.createComponent(r.Show,{get when(){return B()},get children(){return e.ssr(Pn,e.ssrAttribute("class",e.escape(u.bulkActionBar,!0),!1),e.ssrAttribute("aria-label",e.escape(o.t("Bulk actions"),!0),!1),e.ssrAttribute("class",e.escape(u.bulkActionCount,!0),!1),e.escape(o.t("{count} selected",{count:Y()})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",onClick:rt,get disabled(){return N().length===0||Y()===N().length},get title(){return o.t("Select all visible")},get children(){return o.t("Select all")}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",onClick:()=>he(!0),get disabled(){return Y()===0},get title(){return o.t("Pin selected")},get children(){return o.t("Pin")}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",onClick:()=>he(!1),get disabled(){return Y()===0},get title(){return o.t("Unpin selected")},get children(){return o.t("Unpin")}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",onClick:at,get disabled(){return Y()===0},get title(){return o.t("Delete selected")},get leadingIcon(){return e.createComponent(V.VpTrash,{get class(){return u.notificationActionIcon}})},get children(){return o.t("Delete")}})))}})),e.escape(e.createComponent(Ee,{get class(){return u.filterBar},get searchValue(){return S()},onSearchInput:c,get searchPlaceholder(){return o.t("Search notifications…")},get dateRange(){return w()},onDateRangeChange:l,dateRangeAlign:"end",get children(){return[e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,get active(){return T().size>0},onClick:Xe,get title(){return e.memo(()=>T().size===0)()?o.t("Filter by tone"):o.t("Tone filter: {tones}",{tones:Ke()})},get children(){return e.createComponent(V.VpFilter,{get class(){return u.notificationActionIcon}})}}),e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,get active(){return y().size>0||v().size>0||R()},onClick:Ye,get title(){return o.t("Advanced filters (source, priority, regex)")},get children(){return e.createComponent(V.VpAdjustments,{get class(){return u.notificationActionIcon}})}}),e.createComponent(r.Show,{get when(){return fe()},get children(){return e.createComponent(M.Button,{variant:"ghost",size:"sm",onClick:Ge,get title(){return o.t("Clear filters")},get children(){return o.t("Clear")}})}})]}})),e.escape(e.createComponent(Me.OverlayScrollArea,{get viewportClass(){return u.notificationTimeline},"data-tour-target":"notifications-timeline",get children(){return e.createComponent(r.Show,{get when(){return N().length>0},get fallback(){return e.ssr(Fn,e.ssrAttribute("class",e.escape(u.notificationEmpty,!0),!1),fe()?e.escape(o.t("No notifications match the current filter.")):e.escape(o.t("No notifications yet.")))},get children(){return[e.createComponent(r.Show,{get when(){return pe().length>0},get children(){return e.createComponent(H.Panel.Header,{get class(){return u.notificationItemTop},get children(){return e.ssr(Bn,e.ssrAttribute("class",e.escape(u.notificationSourceLabel,!0),!1),e.escape(o.t("Pinned ({count})",{count:pe().length})))}})}}),e.createComponent(r.For,{get each(){return Ue()},children:n=>{if(n.type==="group"&&n.groupItems){const g=()=>ze().has(n.id);return e.createComponent(H.Disclosure,{get class(){return u.notificationGroup},get toggleClass(){return u.notificationGroupToggle},get open(){return g()},onToggle:()=>He(n.id),get bodyClass(){return u.notificationGroupBody},get title(){return[e.ssr(Vn,`${e.escape(u.notificationToneDot,!0)} ${e.escape(_e(n.groupTone??"info"),!0)}`),e.ssr(Ln,e.ssrAttribute("class",e.escape(u.notificationItemMessage,!0),!1),e.escape(o.t('{count} from "{source}"',{count:n.groupCount??0,source:G(n.groupSource??"").label})))]},get children(){return e.createComponent(r.For,{get each(){return n.groupItems},children:C=>ve(C)})}})}return n.type==="entry"&&n.entry?ve(n.entry):null}})]}})}})),e.escape(e.createComponent(Xt,{definition:Zt})));function ve(n){const g=()=>p.entryVendorMatch(n);return e.ssr($n,`${e.escape(u.notificationItem,!0)} ${B()&&h().has(n.id)?e.escape(u.notificationItemSelected,!0):""}`,e.ssrAttribute("class",e.escape(u.notificationItemTop,!0),!1),e.escape(e.createComponent(r.Show,{get when(){return B()},get children(){return e.createComponent(ee.Checkbox,{get class(){return u.notificationItemCheckbox},get checked(){return h().has(n.id)},onChange:()=>ot(n.id),get ariaLabel(){return o.t("Select notification")}})}})),`${e.escape(u.notificationToneDot,!0)} ${e.escape(_e(n.tone),!0)}`,e.ssrAttribute("class",e.escape(u.notificationItemTime,!0),!1)+e.ssrAttribute("datetime",e.escape(new Date(n.createdAt).toISOString(),!0),!1)+e.ssrAttribute("title",e.escape(Un(n.createdAt),!0),!1),e.escape(qn(n.createdAt)),e.escape(e.createComponent(r.Show,{keyed:!0,get when(){return g()},children:C=>e.createComponent(M.Button,{variant:"ghost",size:"2xs",iconOnly:!0,onClick:()=>{tt(n)},get title(){return o.t("Open {vendor} ({code})",{vendor:C.helpers.docsLinkLabel,code:C.helpers.formatCode(C.code)})},get"aria-label"(){return o.t("Open {vendor} ({code})",{vendor:C.helpers.docsLinkLabel,code:C.helpers.formatCode(C.code)})},get leadingIcon(){return e.createComponent(V.VpBook,{get class(){return u.notificationActionIcon}})}})})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"2xs",iconOnly:!0,onClick:()=>et(n),get title(){return o.t("Show as toast again")},get"aria-label"(){return o.t("Show as toast again")},get leadingIcon(){return e.createComponent(V.VpBellRinging,{get class(){return u.notificationActionIcon}})}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"2xs",iconOnly:!0,get class(){return e.memo(()=>s()===n.id)()?u.notificationItemCopyDone:void 0},onClick:()=>{ut(n)},get title(){return e.memo(()=>s()===n.id)()?o.t("Copied"):o.t("Copy log message")},get"aria-label"(){return e.memo(()=>s()===n.id)()?o.t("Copied"):o.t("Copy log message")},get children(){return e.createComponent(r.Show,{get when(){return s()===n.id},get fallback(){return e.createComponent(St.VpCopy,{get class(){return u.notificationActionIcon}})},get children(){return e.createComponent(bt.VpCheck,{get class(){return u.notificationActionIcon}})}})}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"2xs",iconOnly:!0,onClick:()=>{Ze(n.id)},get title(){return o.t("Remove notification")},get"aria-label"(){return o.t("Remove notification")},get leadingIcon(){return e.createComponent(Ct.VpMinus,{get class(){return u.notificationActionIcon}})}})),e.ssrAttribute("class",e.escape(u.notificationItemMessage,!0),!1),e.escape(n.message),e.ssrAttribute("class",e.escape(u.notificationItemMeta,!0),!1),e.ssrAttribute("class",e.escape(u.notificationSourceLabel,!0),!1)+e.ssrAttribute("title",e.escape(G(n.source).description,!0),!1),e.escape(G(n.source).label),e.escape(e.createComponent(r.Show,{get when(){return n.priority==="urgent"},get children(){return e.createComponent(J.Badge,{tone:"danger",size:"sm",children:"urgent"})}})),e.escape(e.createComponent(r.Show,{get when(){return n.priority==="silent"},get children(){return e.createComponent(J.Badge,{tone:"neutral",size:"sm",get icon(){return e.createComponent(V.VpBellOff,{get class(){return u.priorityBadgeIcon}})},get tooltip(){return o.t("Silent — timeline only")},children:"silent"})}})),e.escape(e.createComponent(r.Show,{get when(){return L.isSourceMuted(n.source)},get children(){return e.createComponent(J.Badge,{tone:"warning",size:"sm",get tooltip(){return o.t("Source muted")},children:"muted"})}})))}}const Qn="vk_center_5Vlx7",jn="vk_header_vo883",Yn="vk_title_JpYEU",Jn="vk_actions_ErJgC",Kn="vk_actionIcon_-JWZ1",Xn="vk_list_YLy-l",Zn="vk_card_-fwSa",eo="vk_cardIcon_RBj-W",to="vk_cardBody_z8pxK",no="vk_cardMessage_aN-yw",oo="vk_cardMeta_XQ3my",io="vk_cardButtons_1PXZE",ro="vk_cardSource_Z8c0M",so="vk_cardTime_OXbCq",ao="vk_cardActions_QOc1i",A={center:Qn,header:jn,title:Yn,actions:Jn,actionIcon:Kn,list:Xn,card:Zn,cardIcon:eo,cardBody:to,cardMessage:no,cardMeta:oo,cardButtons:io,cardSource:ro,cardTime:so,cardActions:ao};var co=["<h3",">","","</h3>"],lo=["<div",">","","","","</div>"],uo=["<section"," data-notification-center>","","</section>"],go=["<div"," data-notification-card-actions>","</div>"],po=["<article","><span",' aria-hidden="true">',"</span><div","><p",">","</p><div","><span",">","</span><time",">","</time></div>","</div><div",">","","</div></article>"];const fo={info:W.VpInfoCircle,warning:kt.VpAlertTriangle,error:W.VpCircleX,success:W.VpCircleCheck};function mo(t){return new Intl.DateTimeFormat(ee.systemFormatLocale(),{hour:"2-digit",minute:"2-digit"}).format(new Date(t))}function ho(t){return new Intl.DateTimeFormat(ee.systemFormatLocale(),{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(t))}function Ve(t){const[i,s]=r.createSignal([]),[a,d]=r.createSignal(P.notificationSettings.get().doNotDisturb),m=Ae.useDesktopContextMenu();r.onMount(()=>{const f=p.subscribeNotificationTimeline(s);r.onCleanup(f)}),de.useSettingsSubscription(P.notificationSettings,()=>{d(P.notificationSettings.get().doNotDisturb)});const S=r.createMemo(()=>[...i()].sort((f,h)=>h.createdAt-f.createdAt)),c=f=>fo[f],w=()=>{const f=P.notificationSettings.get();P.notificationSettings.update({...f,doNotDisturb:!f.doNotDisturb}).catch(h=>{p.notifyFromCatalog(p.notificationSettingsUpdateFailed,{cause:h})})},l=()=>{ue.openSettingsModal("notification")},T=f=>{const h=[...f.actions??[]],b=p.entryVendorMatch(f);if(b){const y=b.helpers.docsUrl(b.code);if(y){const _=`${b.helpers.formatCode(b.code)} ${b.helpers.docsLinkLabel}`;h.some(v=>v.label===_)||h.push({label:_,onClick:()=>L.openExternal(y)})}}return h},I=f=>{var b;const h=f.message.trim();h&&((b=navigator.clipboard)==null||b.writeText(h).catch(()=>{}))},B=(f,h,b)=>{if(m.state()!==null){m.close();return}const y=G(b.source),_=L.isSourceMuted(y.id),v=p.entryVendorMatch(b);m.open(f,h,[{label:o.t("Copy log message"),onSelect:()=>I(b)},...v?[{label:o.t("Open {vendor} ({code})",{vendor:v.helpers.docsLinkLabel,code:v.helpers.formatCode(v.code)}),onSelect:()=>L.openExternal(v.helpers.docsUrl(v.code))}]:[],{type:"separator"},{label:_?o.t('Unmute "{source}"',{source:y.label}):o.t('Mute "{source}"',{source:y.label}),onSelect:()=>{L.setSourceMuted(y.id,!_)}},{type:"separator"},{label:o.t("Remove notification"),danger:!0,onSelect:()=>p.dismissNotificationTimelineEntry(b.id)},{label:o.t('Remove all from "{source}"',{source:y.label}),danger:!0,onSelect:()=>p.dismissNotificationTimelineEntriesBySource(y.id)}])};return e.ssr(uo,e.ssrAttribute("class",e.escape(A.center,!0),!1),e.escape(e.createComponent(H.Panel.Header,{get class(){return A.header},get children(){return[e.ssr(co,e.ssrAttribute("class",e.escape(A.title,!0),!1),e.escape(o.t("Notifications")),e.escape(e.createComponent(r.Show,{get when(){return S().length>0},get children(){return` (${S().length})`}}))),e.ssr(lo,e.ssrAttribute("class",e.escape(A.actions,!0),!1),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,onClick:()=>p.clearNotificationTimeline(),get disabled(){return S().length===0},get title(){return o.t("Clear all notifications")},get"aria-label"(){return o.t("Clear all notifications")},get children(){return e.createComponent(V.VpTrash,{get class(){return A.actionIcon}})}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,get active(){return a()},onClick:w,get title(){return e.memo(()=>!!a())()?o.t("Disable Do Not Disturb"):o.t("Enable Do Not Disturb")},get"aria-label"(){return e.memo(()=>!!a())()?o.t("Disable Do Not Disturb"):o.t("Enable Do Not Disturb")},get children(){return e.createComponent(r.Show,{get when(){return a()},get fallback(){return e.createComponent(W.VpBell,{get class(){return A.actionIcon}})},get children(){return e.createComponent(V.VpBellOff,{get class(){return A.actionIcon}})}})}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,onClick:l,get title(){return o.t("Notification settings")},get"aria-label"(){return o.t("Notification settings")},get children(){return e.createComponent(W.VpSettings,{get class(){return A.actionIcon}})}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,get onClick(){return t.onHide},get title(){return o.t("Hide notifications")},get"aria-label"(){return o.t("Hide notifications")},get children(){return e.createComponent(Ne.VpChevronDown,{get class(){return A.actionIcon}})}})))]}})),e.escape(e.createComponent(r.Show,{get when(){return S().length>0},get fallback(){return e.createComponent(Tt.EmptyState,{size:"sm",get title(){return o.t("No new notifications")}})},get children(){return e.createComponent(Me.OverlayScrollArea,{get viewportClass(){return A.list},get children(){return e.createComponent(r.For,{get each(){return S()},children:f=>{const h=G(f.source),b=T(f);return e.ssr(po,e.ssrAttribute("class",e.escape(A.card,!0),!1),e.ssrAttribute("class",e.escape(A.cardIcon,!0),!1)+e.ssrAttribute("data-tone",e.escape(f.tone,!0),!1),e.escape(e.createComponent(e.Dynamic,{get component(){return c(f.tone)}})),e.ssrAttribute("class",e.escape(A.cardBody,!0),!1),e.ssrAttribute("class",e.escape(A.cardMessage,!0),!1),e.escape(f.message),e.ssrAttribute("class",e.escape(A.cardMeta,!0),!1),e.ssrAttribute("class",e.escape(A.cardSource,!0),!1)+e.ssrAttribute("title",e.escape(h.description,!0),!1),e.escape(o.t("Source: {source}",{source:h.label})),e.ssrAttribute("class",e.escape(A.cardTime,!0),!1)+e.ssrAttribute("datetime",e.escape(new Date(f.createdAt).toISOString(),!0),!1)+e.ssrAttribute("title",e.escape(ho(f.createdAt),!0),!1),e.escape(mo(f.createdAt)),e.escape(e.createComponent(r.Show,{get when(){return b.length>0},get children(){return e.ssr(go,e.ssrAttribute("class",e.escape(A.cardButtons,!0),!1),e.escape(e.createComponent(r.For,{each:b,children:y=>e.createComponent(M.Button,{get variant(){return y.primary?"primary":"secondary"},size:"sm",onClick:()=>y.onClick(),get children(){return y.label}})})))}})),e.ssrAttribute("class",e.escape(A.cardActions,!0),!1),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,onClick:y=>{const _=y.currentTarget.getBoundingClientRect();B(_.left,_.bottom+4,f)},get title(){return o.t("More actions")},get"aria-label"(){return o.t("More actions")},get children(){return e.createComponent(W.VpSettings,{get class(){return A.actionIcon}})}})),e.escape(e.createComponent(M.Button,{variant:"ghost",size:"sm",iconOnly:!0,onClick:()=>p.dismissNotificationTimelineEntry(f.id),get title(){return o.t("Remove notification")},get"aria-label"(){return o.t("Remove notification")},get children(){return e.createComponent(yt.VpClose,{get class(){return A.actionIcon}})}})))}})}})}})))}const bo="vk_bell_tx9ag vk_buttonReset_3WpyU",So="vk_bellIcon_w6Lmy",Co="vk_badge_2L8Eg",vo="vk_centerPopover_48x5p",Z={bell:bo,bellIcon:So,badge:Co,centerPopover:vo};var To=["<span",">","</span>"];function yo(){const[t,i]=r.createSignal(!1),[s,a]=r.createSignal(0),[d,m]=r.createSignal(P.notificationSettings.get().doNotDisturb);let S;r.onMount(()=>{const l=p.subscribeUnreadCount(a);r.onCleanup(l)}),de.useSettingsSubscription(P.notificationSettings,()=>{m(P.notificationSettings.get().doNotDisturb)});const c=()=>{i(l=>{const T=!l;return T&&p.markTimelineSeen(),T})},w=()=>s()>99?"99+":String(s());return[e.createComponent(le.PressableSurface,{type:"button",get class(){return Z.bell},"data-status-bar-bell":!0,get"data-open"(){return t()?"true":"false"},onClick:c,get title(){return e.memo(()=>!!d())()?o.t("Notifications (Do Not Disturb on)"):o.t("Show notifications")},get"aria-label"(){return e.memo(()=>!!d())()?o.t("Notifications (Do Not Disturb on)"):o.t("Show notifications")},"aria-haspopup":"dialog",get"aria-expanded"(){return t()},get children(){return[e.createComponent(r.Show,{get when(){return d()},get fallback(){return e.createComponent(W.VpBell,{get class(){return Z.bellIcon}})},get children(){return e.createComponent(V.VpBellOff,{get class(){return Z.bellIcon}})}}),e.createComponent(r.Show,{get when(){return s()>0},get children(){return e.ssr(To,e.ssrAttribute("class",e.escape(Z.badge,!0),!1),e.escape(w()))}})]}}),e.createComponent(Ne.Popover,{get open(){return t()},onClose:()=>i(!1),anchor:()=>S,placement:"top-end",gap:6,role:"dialog",get ariaLabel(){return o.t("Notifications")},get class(){return Z.centerPopover},get children(){return e.createComponent(Ve,{onHide:()=>i(!1)})}})]}exports.LogFilterBar=Ee;exports.NOTIFICATION_SOURCES=re;exports.NOTIFICATION_SOURCE_IDS=ge;exports.NotificationPanel=Wn;exports.NotificationsCenter=Ve;exports.StatusBarNotificationBell=yo;exports.compileNotificationSearchMatcher=Oe;exports.createNotificationPreviewRuntime=Yt;exports.exportTimelineAsCsv=Re;exports.exportTimelineAsJson=Fe;exports.filterNotificationTimeline=xe;exports.groupTimelineEntries=Pe;exports.isNotificationSourceId=De;exports.listNotificationSources=Et;exports.resolveNotificationSource=G;exports.startNotificationSchedulers=Gt;exports.startNotificationSettingsReactions=Wt;
|