@aiquants/menu-bar 1.14.0 → 1.15.1
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/README.md +20 -10
- package/dist/MenuBar.d.ts +3 -0
- package/dist/contents/MenuContent.d.ts +2 -0
- package/dist/contents/MenuList.d.ts +2 -0
- package/dist/index.es.js +338 -280
- package/dist/index.umd.js +2 -2
- package/dist/menu-bar.css +1 -1
- package/dist/styles/menu-bar.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { useLocation as ke, Link as
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
import pe, { useMemo as ee, useState as D, useRef as T, useEffect as Y, useCallback as w, useLayoutEffect as he } from "react";
|
|
2
|
+
import { Pin as ie, PinOff as ce, Link as xe, Lock as be, Download as ge, BarChart as ve, Table as ye, FileText as ne } from "lucide-react";
|
|
3
|
+
import { useLocation as ke, Link as ue } from "react-router-dom";
|
|
4
|
+
var q = { exports: {} }, I = {};
|
|
5
|
+
var re;
|
|
6
6
|
function we() {
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
function
|
|
7
|
+
if (re) return I;
|
|
8
|
+
re = 1;
|
|
9
|
+
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
+
function a(l, c, i) {
|
|
11
11
|
var u = null;
|
|
12
|
-
if (
|
|
13
|
-
|
|
12
|
+
if (i !== void 0 && (u = "" + i), c.key !== void 0 && (u = "" + c.key), "key" in c) {
|
|
13
|
+
i = {};
|
|
14
14
|
for (var h in c)
|
|
15
|
-
h !== "key" && (
|
|
16
|
-
} else
|
|
17
|
-
return c =
|
|
18
|
-
$$typeof:
|
|
15
|
+
h !== "key" && (i[h] = c[h]);
|
|
16
|
+
} else i = c;
|
|
17
|
+
return c = i.ref, {
|
|
18
|
+
$$typeof: r,
|
|
19
19
|
type: l,
|
|
20
20
|
key: u,
|
|
21
21
|
ref: c !== void 0 ? c : null,
|
|
22
|
-
props:
|
|
22
|
+
props: i
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return I.Fragment = t, I.jsx = a, I.jsxs = a, I;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
27
|
+
var M = {};
|
|
28
|
+
var te;
|
|
29
29
|
function je() {
|
|
30
|
-
return
|
|
31
|
-
function
|
|
30
|
+
return te || (te = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
+
function r(e) {
|
|
32
32
|
if (e == null) return null;
|
|
33
33
|
if (typeof e == "function")
|
|
34
|
-
return e.$$typeof ===
|
|
34
|
+
return e.$$typeof === _ ? null : e.displayName || e.name || null;
|
|
35
35
|
if (typeof e == "string") return e;
|
|
36
36
|
switch (e) {
|
|
37
|
-
case
|
|
37
|
+
case S:
|
|
38
38
|
return "Fragment";
|
|
39
|
-
case b:
|
|
40
|
-
return "Profiler";
|
|
41
39
|
case j:
|
|
40
|
+
return "Profiler";
|
|
41
|
+
case O:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case F:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case W:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case E:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
50
|
if (typeof e == "object")
|
|
51
51
|
switch (typeof e.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
53
|
), e.$$typeof) {
|
|
54
|
-
case
|
|
54
|
+
case N:
|
|
55
55
|
return "Portal";
|
|
56
|
-
case
|
|
56
|
+
case z:
|
|
57
57
|
return e.displayName || "Context";
|
|
58
|
-
case
|
|
58
|
+
case $:
|
|
59
59
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
60
|
+
case R:
|
|
61
61
|
var o = e.render;
|
|
62
62
|
return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
63
|
-
case
|
|
64
|
-
return o = e.displayName || null, o !== null ? o :
|
|
65
|
-
case
|
|
63
|
+
case P:
|
|
64
|
+
return o = e.displayName || null, o !== null ? o : r(e.type) || "Memo";
|
|
65
|
+
case y:
|
|
66
66
|
o = e._payload, e = e._init;
|
|
67
67
|
try {
|
|
68
|
-
return
|
|
68
|
+
return r(e(o));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function t(e) {
|
|
75
75
|
return "" + e;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function a(e) {
|
|
78
78
|
try {
|
|
79
|
-
|
|
79
|
+
t(e);
|
|
80
80
|
var o = !1;
|
|
81
81
|
} catch {
|
|
82
82
|
o = !0;
|
|
83
83
|
}
|
|
84
84
|
if (o) {
|
|
85
85
|
o = console;
|
|
86
|
-
var
|
|
87
|
-
return
|
|
86
|
+
var p = o.error, x = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
87
|
+
return p.call(
|
|
88
88
|
o,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
91
|
-
),
|
|
90
|
+
x
|
|
91
|
+
), t(e);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function l(e) {
|
|
95
|
-
if (e ===
|
|
96
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
95
|
+
if (e === S) return "<>";
|
|
96
|
+
if (typeof e == "object" && e !== null && e.$$typeof === y)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var o =
|
|
99
|
+
var o = r(e);
|
|
100
100
|
return o ? "<" + o + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function c() {
|
|
106
|
-
var e =
|
|
106
|
+
var e = A.A;
|
|
107
107
|
return e === null ? null : e.getOwner();
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function i() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
112
|
function u(e) {
|
|
113
|
-
if (
|
|
113
|
+
if (Z.call(e, "key")) {
|
|
114
114
|
var o = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
115
115
|
if (o && o.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
117
|
return e.key !== void 0;
|
|
118
118
|
}
|
|
119
119
|
function h(e, o) {
|
|
120
|
-
function
|
|
121
|
-
|
|
120
|
+
function p() {
|
|
121
|
+
G || (G = !0, console.error(
|
|
122
122
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
123
|
o
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
126
|
+
p.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
127
|
+
get: p,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
var e =
|
|
133
|
-
return
|
|
131
|
+
function g() {
|
|
132
|
+
var e = r(this.type);
|
|
133
|
+
return B[e] || (B[e] = !0, console.error(
|
|
134
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
135
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
137
|
+
function d(e, o, p, x, L, H) {
|
|
138
|
+
var b = p.ref;
|
|
139
139
|
return e = {
|
|
140
|
-
$$typeof:
|
|
140
|
+
$$typeof: m,
|
|
141
141
|
type: e,
|
|
142
142
|
key: o,
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
145
|
-
}, (
|
|
143
|
+
props: p,
|
|
144
|
+
_owner: x
|
|
145
|
+
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
|
-
get:
|
|
147
|
+
get: g
|
|
148
148
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
@@ -159,324 +159,367 @@ function je() {
|
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
162
|
+
value: L
|
|
163
163
|
}), Object.defineProperty(e, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: H
|
|
168
168
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
170
|
+
function f(e, o, p, x, L, H) {
|
|
171
|
+
var b = o.children;
|
|
172
|
+
if (b !== void 0)
|
|
173
|
+
if (x)
|
|
174
|
+
if (fe(b)) {
|
|
175
|
+
for (x = 0; x < b.length; x++)
|
|
176
|
+
k(b[x]);
|
|
177
|
+
Object.freeze && Object.freeze(b);
|
|
178
178
|
} else
|
|
179
179
|
console.error(
|
|
180
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
181
|
);
|
|
182
|
-
else
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
182
|
+
else k(b);
|
|
183
|
+
if (Z.call(o, "key")) {
|
|
184
|
+
b = r(e);
|
|
185
|
+
var C = Object.keys(o).filter(function(me) {
|
|
186
|
+
return me !== "key";
|
|
187
187
|
});
|
|
188
|
-
|
|
188
|
+
x = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", K[b + x] || (C = 0 < C.length ? "{" + C.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
192
192
|
React keys must be passed directly to JSX without using spread:
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
),
|
|
195
|
+
x,
|
|
196
|
+
b,
|
|
197
|
+
C,
|
|
198
|
+
b
|
|
199
|
+
), K[b + x] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
201
|
+
if (b = null, p !== void 0 && (a(p), b = "" + p), u(o) && (a(o.key), b = "" + o.key), "key" in o) {
|
|
202
|
+
p = {};
|
|
203
|
+
for (var J in o)
|
|
204
|
+
J !== "key" && (p[J] = o[J]);
|
|
205
|
+
} else p = o;
|
|
206
|
+
return b && h(
|
|
207
|
+
p,
|
|
208
208
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
|
-
),
|
|
209
|
+
), d(
|
|
210
210
|
e,
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
b,
|
|
212
|
+
p,
|
|
213
213
|
c(),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
L,
|
|
215
|
+
H
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
218
|
+
function k(e) {
|
|
219
|
+
v(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === y && (e._payload.status === "fulfilled" ? v(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
221
|
+
function v(e) {
|
|
222
|
+
return typeof e == "object" && e !== null && e.$$typeof === m;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var s = pe, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), N = /* @__PURE__ */ Symbol.for("react.portal"), S = /* @__PURE__ */ Symbol.for("react.fragment"), O = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), $ = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), R = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), W = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), E = /* @__PURE__ */ Symbol.for("react.activity"), _ = /* @__PURE__ */ Symbol.for("react.client.reference"), A = s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, fe = Array.isArray, U = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
s = {
|
|
228
228
|
react_stack_bottom_frame: function(e) {
|
|
229
229
|
return e();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
return
|
|
232
|
+
var G, B = {}, Q = s.react_stack_bottom_frame.bind(
|
|
233
|
+
s,
|
|
234
|
+
i
|
|
235
|
+
)(), X = U(l(i)), K = {};
|
|
236
|
+
M.Fragment = S, M.jsx = function(e, o, p) {
|
|
237
|
+
var x = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return f(
|
|
239
239
|
e,
|
|
240
240
|
o,
|
|
241
|
-
|
|
241
|
+
p,
|
|
242
242
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
x ? Error("react-stack-top-frame") : Q,
|
|
244
|
+
x ? U(l(e)) : X
|
|
245
245
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
248
|
-
return
|
|
246
|
+
}, M.jsxs = function(e, o, p) {
|
|
247
|
+
var x = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return f(
|
|
249
249
|
e,
|
|
250
250
|
o,
|
|
251
|
-
|
|
251
|
+
p,
|
|
252
252
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
x ? Error("react-stack-top-frame") : Q,
|
|
254
|
+
x ? U(l(e)) : X
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), M;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var se;
|
|
260
260
|
function Ee() {
|
|
261
|
-
return
|
|
261
|
+
return se || (se = 1, process.env.NODE_ENV === "production" ? q.exports = we() : q.exports = je()), q.exports;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==",
|
|
265
|
-
const { user:
|
|
266
|
-
return /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
263
|
+
var n = Ee();
|
|
264
|
+
const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", Se = ({ to: r, className: t, children: a }) => /* @__PURE__ */ n.jsx("a", { href: r, className: t, children: a }), qe = (r) => {
|
|
265
|
+
const { user: t, LinkComponent: a = Se } = r;
|
|
266
|
+
return /* @__PURE__ */ n.jsx("div", { className: "max-h-20 max-w-52", children: /* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
267
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-row", children: [
|
|
268
|
+
/* @__PURE__ */ n.jsx("div", { className: "aiquants-session-photo m-1 h-14 w-14 p-0.5", children: /* @__PURE__ */ n.jsx("img", { className: "object-contain", src: t.photo || Ne, "aria-label": "profile photo" }) }),
|
|
269
|
+
/* @__PURE__ */ n.jsxs("div", { className: "mx-1 flex flex-col", children: [
|
|
270
|
+
/* @__PURE__ */ n.jsx(a, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィールを編集" }),
|
|
271
|
+
/* @__PURE__ */ n.jsx(a, { className: "aiquants-session-link rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィール" }),
|
|
272
|
+
/* @__PURE__ */ n.jsx(a, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "https://myaccount.google.com/", children: "Google Account" })
|
|
273
273
|
] })
|
|
274
274
|
] }),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
] }) : /* @__PURE__ */
|
|
277
|
-
},
|
|
278
|
-
report:
|
|
279
|
-
slip:
|
|
280
|
-
table:
|
|
281
|
-
chart:
|
|
282
|
-
download:
|
|
283
|
-
lock:
|
|
284
|
-
href:
|
|
285
|
-
},
|
|
286
|
-
const
|
|
287
|
-
return
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
] }) : /* @__PURE__ */
|
|
291
|
-
},
|
|
275
|
+
/* @__PURE__ */ n.jsx("div", { className: "aiquants-session-info mb-1 min-h-[1em] w-full rounded-r-lg px-2 py-0.5 text-xs", children: t.displayName })
|
|
276
|
+
] }) : /* @__PURE__ */ n.jsx("div", { className: "aiquants-session-info mb-1 min-h-[1em] w-9/12 rounded-r-lg py-0.5 pl-1 text-xs", children: "ログインはこちら" }) }) });
|
|
277
|
+
}, de = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), Te = {
|
|
278
|
+
report: ne,
|
|
279
|
+
slip: ne,
|
|
280
|
+
table: ye,
|
|
281
|
+
chart: ve,
|
|
282
|
+
download: ge,
|
|
283
|
+
lock: be,
|
|
284
|
+
href: xe
|
|
285
|
+
}, _e = ({ mark: r, children: t }) => {
|
|
286
|
+
const a = r ? Te[r] : void 0;
|
|
287
|
+
return a ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-nowrap items-center", children: [
|
|
288
|
+
/* @__PURE__ */ n.jsx(a, { className: "h-4 w-4" }),
|
|
289
|
+
/* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: t })
|
|
290
|
+
] }) : /* @__PURE__ */ n.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: t });
|
|
291
|
+
}, V = (r, t) => t ? {
|
|
292
292
|
menu: {
|
|
293
|
-
id:
|
|
294
|
-
title:
|
|
295
|
-
href:
|
|
293
|
+
id: r.id,
|
|
294
|
+
title: r.title,
|
|
295
|
+
href: r.href
|
|
296
296
|
},
|
|
297
297
|
submenu: {
|
|
298
|
-
subid:
|
|
299
|
-
title:
|
|
300
|
-
href:
|
|
301
|
-
mark:
|
|
302
|
-
new:
|
|
298
|
+
subid: t.subid,
|
|
299
|
+
title: t.title,
|
|
300
|
+
href: t.href,
|
|
301
|
+
mark: t.mark,
|
|
302
|
+
new: t.new
|
|
303
303
|
}
|
|
304
304
|
} : {
|
|
305
305
|
menu: {
|
|
306
|
-
id:
|
|
307
|
-
title:
|
|
308
|
-
href:
|
|
306
|
+
id: r.id,
|
|
307
|
+
title: r.title,
|
|
308
|
+
href: r.href
|
|
309
309
|
}
|
|
310
|
-
},
|
|
311
|
-
if (
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
const l = /* @__PURE__ */
|
|
310
|
+
}, Re = ({ item: r, parentMenu: t, onMenuSelected: a }) => {
|
|
311
|
+
if (r.href === "separator")
|
|
312
|
+
return /* @__PURE__ */ n.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
313
|
+
const l = /* @__PURE__ */ n.jsx(_e, { mark: r.mark, children: r.title }), c = {
|
|
314
314
|
onClick: () => {
|
|
315
|
-
|
|
315
|
+
a && a(V(t, r));
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
const
|
|
321
|
-
for (const l of
|
|
322
|
-
if (
|
|
318
|
+
return r.new ? /* @__PURE__ */ n.jsx("a", { href: r.href, rel: "noopener noreferrer", target: "_blank", ...c, children: l }) : de.test(r.href) ? /* @__PURE__ */ n.jsx("a", { href: r.href, ...c, children: l }) : /* @__PURE__ */ n.jsx(ue, { to: r.href, ...c, children: l });
|
|
319
|
+
}, oe = (r) => r ? r.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", ae = (r, t) => {
|
|
320
|
+
const a = t !== "/" && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
321
|
+
for (const l of r) {
|
|
322
|
+
if (oe(l.href) === a)
|
|
323
323
|
return l.id;
|
|
324
324
|
if (l.submenu) {
|
|
325
325
|
for (const c of l.submenu)
|
|
326
|
-
if (
|
|
326
|
+
if (oe(c.href) === a)
|
|
327
327
|
return l.id;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
return null;
|
|
331
|
-
},
|
|
332
|
-
const { menuList:
|
|
333
|
-
let
|
|
331
|
+
}, Pe = (r) => {
|
|
332
|
+
const { menuList: t, onMenuSelected: a, pinnedSubmenuIds: l = [], onToggleSubmenuPin: c } = r;
|
|
333
|
+
let i = "";
|
|
334
334
|
try {
|
|
335
|
-
|
|
335
|
+
i = ke().pathname;
|
|
336
336
|
} catch {
|
|
337
|
-
typeof window < "u" && (
|
|
337
|
+
typeof window < "u" && (i = window.location.pathname);
|
|
338
338
|
}
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
if (
|
|
342
|
-
const
|
|
343
|
-
|
|
339
|
+
const u = ee(() => ae(t, i), [t, i]), [h, g] = D(u), d = T(i), f = T(u !== null);
|
|
340
|
+
Y(() => {
|
|
341
|
+
if (d.current !== i && (d.current = i, f.current = !1), !f.current) {
|
|
342
|
+
const s = ae(t, i);
|
|
343
|
+
s !== null && (g(s), f.current = !0);
|
|
344
344
|
}
|
|
345
|
-
}, [
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
345
|
+
}, [i, t]);
|
|
346
|
+
const k = w(
|
|
347
|
+
(s) => {
|
|
348
|
+
l.includes(s) || g((N) => N === s ? null : s);
|
|
349
|
+
},
|
|
350
|
+
[l]
|
|
351
|
+
), v = ee(() => /* @__PURE__ */ n.jsx(n.Fragment, { children: t.map((s) => /* @__PURE__ */ n.jsx("div", { children: s.href ? /* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-list-item relative mb-1 ml-1 h-full rounded-l-2xl p-2 align-middle text-sm before:-mt-1 before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:align-middle before:content-['']", children: de.test(s.href) ? /* @__PURE__ */ n.jsx(
|
|
349
352
|
"a",
|
|
350
353
|
{
|
|
351
|
-
href:
|
|
354
|
+
href: s.href,
|
|
352
355
|
onClick: () => {
|
|
353
|
-
|
|
356
|
+
a && a(V(s));
|
|
354
357
|
},
|
|
355
|
-
children: /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ n.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
|
|
356
359
|
}
|
|
357
|
-
) : /* @__PURE__ */
|
|
358
|
-
|
|
360
|
+
) : /* @__PURE__ */ n.jsx(
|
|
361
|
+
ue,
|
|
359
362
|
{
|
|
360
|
-
to:
|
|
363
|
+
to: s.href,
|
|
361
364
|
onClick: () => {
|
|
362
|
-
|
|
365
|
+
a && a(V(s));
|
|
363
366
|
},
|
|
364
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ n.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
|
|
365
368
|
}
|
|
366
|
-
) }) : /* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
369
|
+
) }) : /* @__PURE__ */ n.jsxs("details", { className: "aiquants-menu-accordion-details", open: s.id === h || l.includes(s.id), children: [
|
|
370
|
+
/* @__PURE__ */ n.jsxs(
|
|
368
371
|
"summary",
|
|
369
372
|
{
|
|
370
|
-
className: "aiquants-menu-list-item menu-accordion-summary relative mb-1 ml-1 h-full list-none rounded-l-2xl p-2
|
|
371
|
-
onClick: (
|
|
372
|
-
|
|
373
|
+
className: "aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-1 ml-1 h-full list-none rounded-l-2xl p-2 text-sm outline-none before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:content-['']",
|
|
374
|
+
onClick: (m) => {
|
|
375
|
+
m.preventDefault(), k(s.id);
|
|
373
376
|
},
|
|
374
|
-
onKeyDown: (
|
|
375
|
-
(
|
|
377
|
+
onKeyDown: (m) => {
|
|
378
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), k(s.id));
|
|
376
379
|
},
|
|
377
|
-
children:
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ n.jsx("span", { children: s.title }),
|
|
382
|
+
/* @__PURE__ */ n.jsx(
|
|
383
|
+
"button",
|
|
384
|
+
{
|
|
385
|
+
type: "button",
|
|
386
|
+
onClick: (m) => {
|
|
387
|
+
m.stopPropagation(), m.preventDefault(), c && c(s.id);
|
|
388
|
+
},
|
|
389
|
+
className: `aiquants-submenu-pin-button ${l.includes(s.id) ? "pinned" : ""}`,
|
|
390
|
+
title: l.includes(s.id) ? "ピン留め解除" : "ピン留め",
|
|
391
|
+
children: l.includes(s.id) ? /* @__PURE__ */ n.jsx(ie, { size: 14 }) : /* @__PURE__ */ n.jsx(ce, { size: 14 })
|
|
392
|
+
}
|
|
393
|
+
)
|
|
394
|
+
]
|
|
378
395
|
}
|
|
379
396
|
),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
] }) },
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
-
},
|
|
384
|
-
const { menuList:
|
|
385
|
-
return /* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-1 mr-1 ml-4 rounded p-2 shadow-md", children: s.submenu.map((m) => /* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap text-sm", children: /* @__PURE__ */ n.jsx(Re, { item: m, parentMenu: s, onMenuSelected: a }) }, m.subid)) })
|
|
398
|
+
] }) }, s.id)) }), [t, a, h, k, l]);
|
|
399
|
+
return /* @__PURE__ */ n.jsx("div", { className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: v });
|
|
400
|
+
}, Ce = (r) => {
|
|
401
|
+
const { menuList: t, menuHeader: a, open: l, onMenuSelected: c, onClickSignout: i, theme: u, toggleTheme: h, isPinned: g, onTogglePin: d, pinnedSubmenuIds: f, onToggleSubmenuPin: k } = r;
|
|
402
|
+
return /* @__PURE__ */ n.jsxs("div", { className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[250px] select-none flex-col transition-transform duration-500 ${l ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`, children: [
|
|
403
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex h-[100px] flex-col", children: a }),
|
|
404
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: /* @__PURE__ */ n.jsx(Pe, { menuList: t, onMenuSelected: c, pinnedSubmenuIds: f, onToggleSubmenuPin: k }) }),
|
|
405
|
+
/* @__PURE__ */ n.jsx("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
406
|
+
/* @__PURE__ */ n.jsx(
|
|
390
407
|
"button",
|
|
391
408
|
{
|
|
392
409
|
type: "button",
|
|
393
|
-
onClick:
|
|
394
|
-
className: `flex items-center justify-center rounded-md px-3 py-2 text-white text-xs shadow-sm transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${
|
|
395
|
-
title:
|
|
396
|
-
children:
|
|
410
|
+
onClick: d,
|
|
411
|
+
className: `flex items-center justify-center rounded-md px-3 py-2 text-white text-xs shadow-sm transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${g ? "bg-amber-500/90 hover:bg-amber-600" : "border border-white/15 bg-white/10 hover:bg-white/20"}`,
|
|
412
|
+
title: g ? "ピン留め解除" : "ピン留め",
|
|
413
|
+
children: g ? /* @__PURE__ */ n.jsx(ie, { size: 14 }) : /* @__PURE__ */ n.jsx(ce, { size: 14 })
|
|
397
414
|
}
|
|
398
415
|
),
|
|
399
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ n.jsxs(
|
|
400
417
|
"button",
|
|
401
418
|
{
|
|
402
419
|
type: "button",
|
|
403
420
|
onClick: h,
|
|
404
421
|
className: "group relative flex flex-1 items-center gap-2 rounded-lg border border-white/15 bg-white/10 px-3 py-2 font-medium text-white text-xs shadow-sm backdrop-blur-sm transition-all duration-300 hover:border-white/25 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 focus-visible:ring-offset-0 dark:border-gray-600/40 dark:bg-gray-800/80 dark:hover:border-gray-500/60 dark:hover:bg-gray-700",
|
|
405
422
|
children: [
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-white/20 backdrop-blur-sm transition-all duration-300 group-hover:scale-110 group-hover:bg-white/30 dark:bg-gray-600/60 dark:group-hover:bg-gray-500/70", children: /* @__PURE__ */ n.jsx("span", { className: "text-sm transition-transform duration-300 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" }) }),
|
|
424
|
+
/* @__PURE__ */ n.jsx("span", { className: "text-white transition-colors duration-300 group-hover:text-white/90 dark:text-gray-200 dark:group-hover:text-white", children: u === "dark" ? "Light" : "Dark" }),
|
|
425
|
+
/* @__PURE__ */ n.jsx("div", { className: "absolute inset-0 rounded-lg bg-gradient-to-r from-transparent via-white/5 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100 dark:via-gray-400/10" })
|
|
409
426
|
]
|
|
410
427
|
}
|
|
411
428
|
),
|
|
412
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ n.jsx(
|
|
413
430
|
"button",
|
|
414
431
|
{
|
|
415
432
|
type: "button",
|
|
416
433
|
className: "aiquants-signout-button flex items-center justify-center rounded-md bg-red-500/90 px-3 py-2 font-medium text-white text-xs shadow-sm transition-colors duration-300 hover:bg-red-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60",
|
|
417
|
-
onClick:
|
|
434
|
+
onClick: i,
|
|
418
435
|
children: "サインアウト"
|
|
419
436
|
}
|
|
420
437
|
)
|
|
421
438
|
] }) })
|
|
422
439
|
] });
|
|
423
|
-
},
|
|
424
|
-
const { isOverlay:
|
|
425
|
-
return /* @__PURE__ */
|
|
426
|
-
}, Ae = (
|
|
427
|
-
const { open:
|
|
428
|
-
if (u.current && h.current &&
|
|
429
|
-
const
|
|
430
|
-
u.current.style.backgroundColor =
|
|
440
|
+
}, Oe = (r) => {
|
|
441
|
+
const { isOverlay: t, onOverlayClick: a } = r;
|
|
442
|
+
return /* @__PURE__ */ n.jsx("button", { type: "button", className: `fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${t ? "opacity-100" : "pointer-events-none opacity-0"}`, onClick: a });
|
|
443
|
+
}, Ae = (r) => {
|
|
444
|
+
const { open: t, onMenuOpen: a, onMenuClose: l, theme: c } = r, i = T(t), u = T(null), h = T(null), g = T(null), d = T(null), f = T(null), k = w(() => {
|
|
445
|
+
if (u.current && h.current && g.current && d.current && f.current) {
|
|
446
|
+
const j = c === "dark" ? "#fff" : "#000";
|
|
447
|
+
u.current.style.backgroundColor = j, u.current.style.width = "100%", u.current.style.height = "3px", u.current.style.transform = "", h.current.style.opacity = "1", h.current.style.backgroundColor = j, g.current.style.opacity = "1", g.current.style.backgroundColor = j, d.current.style.backgroundColor = j, d.current.style.width = "100%", d.current.style.height = "3px", d.current.style.transform = "", f.current.style.color = j, f.current.classList.remove("after:content-['close']"), f.current.classList.remove("after:ml-0.5"), f.current.classList.add("after:content-['menu']"), f.current.classList.add("after:-ml-0.5"), i.current = !0;
|
|
431
448
|
}
|
|
432
|
-
}, [c]),
|
|
433
|
-
u.current && h.current &&
|
|
434
|
-
}, []),
|
|
435
|
-
|
|
436
|
-
}, [
|
|
437
|
-
|
|
438
|
-
}, [
|
|
439
|
-
|
|
440
|
-
}, [
|
|
441
|
-
|
|
442
|
-
}, []),
|
|
443
|
-
|
|
449
|
+
}, [c]), v = w(() => {
|
|
450
|
+
u.current && h.current && g.current && d.current && f.current && (u.current.style.backgroundColor = "#fff", u.current.style.width = "32px", u.current.style.height = "4px", u.current.style.transform = "translateY(9px) rotate(-45deg)", h.current.style.opacity = "0", g.current.style.opacity = "0", d.current.style.backgroundColor = "#fff", d.current.style.width = "32px", d.current.style.height = "4px", d.current.style.transform = "translateY(-9px) rotate(45deg)", f.current.style.color = "#fff", f.current.classList.remove("after:content-['menu']"), f.current.classList.remove("after:-ml-0.5"), f.current.classList.add("after:content-['close']"), f.current.classList.add("after:ml-0.5"), i.current = !1);
|
|
451
|
+
}, []), s = w(() => {
|
|
452
|
+
k(), l && l();
|
|
453
|
+
}, [k, l]), m = w(() => {
|
|
454
|
+
v(), a && a();
|
|
455
|
+
}, [v, a]), N = w(() => {
|
|
456
|
+
i.current ? m() : s();
|
|
457
|
+
}, [s, m]), S = w((j) => {
|
|
458
|
+
j.currentTarget.blur();
|
|
459
|
+
}, []), O = w((j) => {
|
|
460
|
+
j.preventDefault();
|
|
444
461
|
}, []);
|
|
445
|
-
return
|
|
446
|
-
|
|
447
|
-
}, [
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
462
|
+
return Y(() => {
|
|
463
|
+
t ? k() : v();
|
|
464
|
+
}, [t, k, v]), /* @__PURE__ */ n.jsxs("button", { type: "button", className: "aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden", onClick: N, onFocus: S, onMouseDown: O, tabIndex: -1, children: [
|
|
465
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none", ref: u }),
|
|
466
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none", ref: h }),
|
|
467
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref: g }),
|
|
468
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none", ref: d }),
|
|
469
|
+
/* @__PURE__ */ n.jsx("div", { className: "absolute w-full text-xs after:mt-2 after:block", ref: f })
|
|
453
470
|
] });
|
|
454
|
-
},
|
|
455
|
-
const { menuList:
|
|
471
|
+
}, le = typeof window < "u" ? he : Y, De = (r) => {
|
|
472
|
+
const { menuList: t, menuHeader: a, onClickSignout: l, isMenuhide: c, theme: i, toggleTheme: u, onMenuNavigate: h, onPinChange: g, pinnedSubmenuIds: d, initialPinnedSubmenuIds: f, onSubmenuPinChange: k } = r, [v, s] = D(() => {
|
|
456
473
|
try {
|
|
457
474
|
return localStorage.getItem("aiquants-menu-pinned") === "true";
|
|
458
475
|
} catch {
|
|
459
476
|
return !1;
|
|
460
477
|
}
|
|
461
|
-
}), [
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
478
|
+
}), [m, N] = D(v), [S, O] = D(() => {
|
|
479
|
+
if (f)
|
|
480
|
+
return f;
|
|
481
|
+
try {
|
|
482
|
+
const y = localStorage.getItem("aiquants-submenu-pinned");
|
|
483
|
+
if (y) {
|
|
484
|
+
const E = JSON.parse(y);
|
|
485
|
+
if (Array.isArray(E))
|
|
486
|
+
return E.filter((_) => typeof _ == "number");
|
|
487
|
+
}
|
|
488
|
+
} catch {
|
|
489
|
+
}
|
|
490
|
+
return [];
|
|
491
|
+
}), j = d !== void 0 ? d : S, $ = w(
|
|
492
|
+
(y) => {
|
|
493
|
+
const E = d !== void 0 ? d : S, _ = E.includes(y) ? E.filter((A) => A !== y) : [...E, y];
|
|
494
|
+
if (d === void 0) {
|
|
495
|
+
O(_);
|
|
496
|
+
try {
|
|
497
|
+
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(_));
|
|
498
|
+
} catch {
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
k && k(_);
|
|
502
|
+
},
|
|
503
|
+
[d, S, k]
|
|
504
|
+
);
|
|
505
|
+
le(() => {
|
|
506
|
+
const y = v ? "250px" : "0px";
|
|
507
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", y), g?.(v);
|
|
508
|
+
}, [v, g]), le(() => () => {
|
|
466
509
|
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px");
|
|
467
510
|
}, []);
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
}, []),
|
|
471
|
-
|
|
511
|
+
const z = w(() => {
|
|
512
|
+
N(!0);
|
|
513
|
+
}, []), R = w(() => {
|
|
514
|
+
N(!1), s(!1);
|
|
472
515
|
try {
|
|
473
516
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
474
517
|
} catch {
|
|
475
518
|
}
|
|
476
|
-
}, []),
|
|
477
|
-
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
519
|
+
}, []), F = w(() => {
|
|
520
|
+
s((y) => {
|
|
521
|
+
const E = !y;
|
|
522
|
+
if (E)
|
|
480
523
|
try {
|
|
481
524
|
localStorage.setItem("aiquants-menu-pinned", "true");
|
|
482
525
|
} catch {
|
|
@@ -486,30 +529,45 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
486
529
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
487
530
|
} catch {
|
|
488
531
|
}
|
|
489
|
-
return
|
|
532
|
+
return E;
|
|
490
533
|
});
|
|
491
|
-
}, []),
|
|
492
|
-
(
|
|
493
|
-
h && h(
|
|
534
|
+
}, []), W = w(
|
|
535
|
+
(y) => {
|
|
536
|
+
h && h(y), v || N(!1);
|
|
494
537
|
},
|
|
495
|
-
[h,
|
|
496
|
-
),
|
|
497
|
-
(
|
|
498
|
-
if (
|
|
499
|
-
return
|
|
538
|
+
[h, v]
|
|
539
|
+
), P = w(
|
|
540
|
+
(y) => {
|
|
541
|
+
if (y.key === "Escape")
|
|
542
|
+
return R(), !1;
|
|
500
543
|
},
|
|
501
|
-
[
|
|
544
|
+
[R]
|
|
502
545
|
);
|
|
503
|
-
return
|
|
504
|
-
window.removeEventListener("keydown",
|
|
505
|
-
}), [
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
|
|
546
|
+
return Y(() => (m ? window.addEventListener("keydown", P, { passive: !0 }) : window.removeEventListener("keydown", P), () => {
|
|
547
|
+
window.removeEventListener("keydown", P);
|
|
548
|
+
}), [m, P]), c ? null : /* @__PURE__ */ n.jsxs("div", { className: `aiquants-menu-bar ${i}`, children: [
|
|
549
|
+
/* @__PURE__ */ n.jsx(Ae, { onMenuClose: R, onMenuOpen: z, open: !m, theme: i }),
|
|
550
|
+
/* @__PURE__ */ n.jsx(
|
|
551
|
+
Ce,
|
|
552
|
+
{
|
|
553
|
+
menuList: t,
|
|
554
|
+
menuHeader: a,
|
|
555
|
+
onClickSignout: l,
|
|
556
|
+
onMenuSelected: W,
|
|
557
|
+
open: m,
|
|
558
|
+
theme: i,
|
|
559
|
+
toggleTheme: u,
|
|
560
|
+
isPinned: v,
|
|
561
|
+
onTogglePin: F,
|
|
562
|
+
pinnedSubmenuIds: j,
|
|
563
|
+
onToggleSubmenuPin: $
|
|
564
|
+
}
|
|
565
|
+
),
|
|
566
|
+
/* @__PURE__ */ n.jsx(Oe, { isOverlay: m && !v, onOverlayClick: R })
|
|
509
567
|
] });
|
|
510
568
|
};
|
|
511
569
|
export {
|
|
512
|
-
|
|
570
|
+
Se as DefaultLink,
|
|
513
571
|
De as MenuBar,
|
|
514
572
|
qe as SessionInfo
|
|
515
573
|
};
|