@aiquants/menu-bar 1.17.7 → 1.18.0
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/dist/MenuBar.d.ts +27 -22
- package/dist/__tests__/pinEvent.test.d.ts +1 -0
- package/dist/contents/MenuContent.d.ts +0 -9
- package/dist/events/pinEvent.d.ts +44 -0
- package/dist/hooks/useMenuPinState.d.ts +21 -0
- package/dist/index.d.ts +19 -4
- package/dist/index.es.js +619 -370
- package/dist/index.umd.js +2 -2
- package/dist/styles/menu-bar.css +1 -1
- package/dist/styles/menu-bar.standalone.css +1 -1
- package/dist/types.d.ts +20 -0
- package/package.json +1 -1
- package/src/MenuBar.tsx +101 -55
- package/src/__tests__/pinEvent.test.tsx +68 -0
- package/src/components/SessionInfo.tsx +39 -23
- package/src/contents/MenuContent.tsx +14 -20
- package/src/contents/MenuList.tsx +14 -7
- package/src/elements/MenuSwitch.tsx +1 -1
- package/src/events/pinEvent.ts +129 -0
- package/src/hooks/useMenuPinState.ts +58 -0
- package/src/index.ts +27 -4
- package/src/lucide-icons.d.ts +6 -0
- package/src/styles/menu-bar.css +22 -29
- package/src/types.ts +23 -0
package/dist/index.es.js
CHANGED
|
@@ -1,150 +1,149 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
props: i
|
|
1
|
+
import Ee, { forwardRef as be, createElement as re, useCallback as k, useSyncExternalStore as _e, useMemo as oe, useState as J, useRef as T, useEffect as $, useLayoutEffect as xe } from "react";
|
|
2
|
+
import { useLocation as Se, Link as ge } from "react-router-dom";
|
|
3
|
+
var Z = { exports: {} }, V = {};
|
|
4
|
+
var ie;
|
|
5
|
+
function Ce() {
|
|
6
|
+
if (ie) return V;
|
|
7
|
+
ie = 1;
|
|
8
|
+
var n = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
+
function s(a, l, o) {
|
|
10
|
+
var c = null;
|
|
11
|
+
if (o !== void 0 && (c = "" + o), l.key !== void 0 && (c = "" + l.key), "key" in l) {
|
|
12
|
+
o = {};
|
|
13
|
+
for (var h in l)
|
|
14
|
+
h !== "key" && (o[h] = l[h]);
|
|
15
|
+
} else o = l;
|
|
16
|
+
return l = o.ref, {
|
|
17
|
+
$$typeof: n,
|
|
18
|
+
type: a,
|
|
19
|
+
key: c,
|
|
20
|
+
ref: l !== void 0 ? l : null,
|
|
21
|
+
props: o
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return V.Fragment = t, V.jsx = s, V.jsxs = s, V;
|
|
26
25
|
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
function
|
|
26
|
+
var W = {};
|
|
27
|
+
var le;
|
|
28
|
+
function Pe() {
|
|
29
|
+
return le || (le = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function n(e) {
|
|
32
31
|
if (e == null) return null;
|
|
33
32
|
if (typeof e == "function")
|
|
34
|
-
return e.$$typeof ===
|
|
33
|
+
return e.$$typeof === X ? null : e.displayName || e.name || null;
|
|
35
34
|
if (typeof e == "string") return e;
|
|
36
35
|
switch (e) {
|
|
37
36
|
case m:
|
|
38
37
|
return "Fragment";
|
|
39
|
-
case E:
|
|
40
|
-
return "Profiler";
|
|
41
38
|
case N:
|
|
39
|
+
return "Profiler";
|
|
40
|
+
case M:
|
|
42
41
|
return "StrictMode";
|
|
43
|
-
case
|
|
42
|
+
case z:
|
|
44
43
|
return "Suspense";
|
|
45
|
-
case
|
|
44
|
+
case B:
|
|
46
45
|
return "SuspenseList";
|
|
47
|
-
case
|
|
46
|
+
case Y:
|
|
48
47
|
return "Activity";
|
|
49
48
|
}
|
|
50
49
|
if (typeof e == "object")
|
|
51
50
|
switch (typeof e.tag == "number" && console.error(
|
|
52
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
52
|
), e.$$typeof) {
|
|
54
|
-
case
|
|
53
|
+
case i:
|
|
55
54
|
return "Portal";
|
|
56
|
-
case
|
|
55
|
+
case I:
|
|
57
56
|
return e.displayName || "Context";
|
|
58
|
-
case
|
|
57
|
+
case j:
|
|
59
58
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return e = e.displayName, e || (e =
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
|
|
59
|
+
case L:
|
|
60
|
+
var u = e.render;
|
|
61
|
+
return e = e.displayName, e || (e = u.displayName || u.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
|
+
case Q:
|
|
63
|
+
return u = e.displayName || null, u !== null ? u : n(e.type) || "Memo";
|
|
64
|
+
case D:
|
|
65
|
+
u = e._payload, e = e._init;
|
|
67
66
|
try {
|
|
68
|
-
return
|
|
67
|
+
return n(e(u));
|
|
69
68
|
} catch {
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
return null;
|
|
73
72
|
}
|
|
74
|
-
function
|
|
73
|
+
function t(e) {
|
|
75
74
|
return "" + e;
|
|
76
75
|
}
|
|
77
|
-
function
|
|
76
|
+
function s(e) {
|
|
78
77
|
try {
|
|
79
|
-
|
|
80
|
-
var
|
|
78
|
+
t(e);
|
|
79
|
+
var u = !1;
|
|
81
80
|
} catch {
|
|
82
|
-
|
|
81
|
+
u = !0;
|
|
83
82
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
83
|
+
if (u) {
|
|
84
|
+
u = console;
|
|
85
|
+
var b = u.error, g = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
86
|
+
return b.call(
|
|
87
|
+
u,
|
|
89
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
89
|
g
|
|
91
|
-
),
|
|
90
|
+
), t(e);
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
function
|
|
93
|
+
function a(e) {
|
|
95
94
|
if (e === m) return "<>";
|
|
96
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
95
|
+
if (typeof e == "object" && e !== null && e.$$typeof === D)
|
|
97
96
|
return "<...>";
|
|
98
97
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
98
|
+
var u = n(e);
|
|
99
|
+
return u ? "<" + u + ">" : "<...>";
|
|
101
100
|
} catch {
|
|
102
101
|
return "<...>";
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
|
-
function
|
|
106
|
-
var e =
|
|
104
|
+
function l() {
|
|
105
|
+
var e = R.A;
|
|
107
106
|
return e === null ? null : e.getOwner();
|
|
108
107
|
}
|
|
109
|
-
function
|
|
108
|
+
function o() {
|
|
110
109
|
return Error("react-stack-top-frame");
|
|
111
110
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
111
|
+
function c(e) {
|
|
112
|
+
if (F.call(e, "key")) {
|
|
113
|
+
var u = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
|
+
if (u && u.isReactWarning) return !1;
|
|
116
115
|
}
|
|
117
116
|
return e.key !== void 0;
|
|
118
117
|
}
|
|
119
|
-
function h(e,
|
|
120
|
-
function
|
|
121
|
-
|
|
118
|
+
function h(e, u) {
|
|
119
|
+
function b() {
|
|
120
|
+
H || (H = !0, console.error(
|
|
122
121
|
"%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
|
-
|
|
122
|
+
u
|
|
124
123
|
));
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
125
|
+
b.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
126
|
+
get: b,
|
|
128
127
|
configurable: !0
|
|
129
128
|
});
|
|
130
129
|
}
|
|
131
|
-
function
|
|
132
|
-
var e =
|
|
133
|
-
return
|
|
130
|
+
function p() {
|
|
131
|
+
var e = n(this.type);
|
|
132
|
+
return x[e] || (x[e] = !0, console.error(
|
|
134
133
|
"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
134
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
135
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
136
|
+
function f(e, u, b, g, G, ee) {
|
|
137
|
+
var y = b.ref;
|
|
139
138
|
return e = {
|
|
140
|
-
$$typeof:
|
|
139
|
+
$$typeof: C,
|
|
141
140
|
type: e,
|
|
142
|
-
key:
|
|
143
|
-
props:
|
|
141
|
+
key: u,
|
|
142
|
+
props: b,
|
|
144
143
|
_owner: g
|
|
145
|
-
}, (
|
|
144
|
+
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
145
|
enumerable: !1,
|
|
147
|
-
get:
|
|
146
|
+
get: p
|
|
148
147
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
149
148
|
configurable: !1,
|
|
150
149
|
enumerable: !1,
|
|
@@ -159,33 +158,33 @@ function Ee() {
|
|
|
159
158
|
configurable: !1,
|
|
160
159
|
enumerable: !1,
|
|
161
160
|
writable: !0,
|
|
162
|
-
value:
|
|
161
|
+
value: G
|
|
163
162
|
}), Object.defineProperty(e, "_debugTask", {
|
|
164
163
|
configurable: !1,
|
|
165
164
|
enumerable: !1,
|
|
166
165
|
writable: !0,
|
|
167
|
-
value:
|
|
166
|
+
value: ee
|
|
168
167
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
168
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
169
|
+
function d(e, u, b, g, G, ee) {
|
|
170
|
+
var y = u.children;
|
|
171
|
+
if (y !== void 0)
|
|
173
172
|
if (g)
|
|
174
|
-
if (
|
|
175
|
-
for (g = 0; g <
|
|
176
|
-
y
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
173
|
+
if (K(y)) {
|
|
174
|
+
for (g = 0; g < y.length; g++)
|
|
175
|
+
w(y[g]);
|
|
176
|
+
Object.freeze && Object.freeze(y);
|
|
178
177
|
} else
|
|
179
178
|
console.error(
|
|
180
179
|
"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
180
|
);
|
|
182
|
-
else y
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
181
|
+
else w(y);
|
|
182
|
+
if (F.call(u, "key")) {
|
|
183
|
+
y = n(e);
|
|
184
|
+
var q = Object.keys(u).filter(function(Ne) {
|
|
185
|
+
return Ne !== "key";
|
|
187
186
|
});
|
|
188
|
-
g = 0 <
|
|
187
|
+
g = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", U[y + g] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
189
|
let props = %s;
|
|
191
190
|
<%s {...props} />
|
|
@@ -193,402 +192,652 @@ React keys must be passed directly to JSX without using spread:
|
|
|
193
192
|
let props = %s;
|
|
194
193
|
<%s key={someKey} {...props} />`,
|
|
195
194
|
g,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
),
|
|
195
|
+
y,
|
|
196
|
+
q,
|
|
197
|
+
y
|
|
198
|
+
), U[y + g] = !0);
|
|
200
199
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
200
|
+
if (y = null, b !== void 0 && (s(b), y = "" + b), c(u) && (s(u.key), y = "" + u.key), "key" in u) {
|
|
201
|
+
b = {};
|
|
202
|
+
for (var te in u)
|
|
203
|
+
te !== "key" && (b[te] = u[te]);
|
|
204
|
+
} else b = u;
|
|
205
|
+
return y && h(
|
|
206
|
+
b,
|
|
208
207
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
|
-
),
|
|
208
|
+
), f(
|
|
210
209
|
e,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
y,
|
|
211
|
+
b,
|
|
212
|
+
l(),
|
|
213
|
+
G,
|
|
214
|
+
ee
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
217
|
+
function w(e) {
|
|
218
|
+
v(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === D && (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
219
|
}
|
|
221
|
-
function
|
|
222
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
220
|
+
function v(e) {
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === C;
|
|
223
222
|
}
|
|
224
|
-
var
|
|
223
|
+
var S = Ee, C = /* @__PURE__ */ Symbol.for("react.transitional.element"), i = /* @__PURE__ */ Symbol.for("react.portal"), m = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), N = /* @__PURE__ */ Symbol.for("react.profiler"), j = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), z = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), Q = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), Y = /* @__PURE__ */ Symbol.for("react.activity"), X = /* @__PURE__ */ Symbol.for("react.client.reference"), R = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, K = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
225
224
|
return null;
|
|
226
225
|
};
|
|
227
|
-
|
|
226
|
+
S = {
|
|
228
227
|
react_stack_bottom_frame: function(e) {
|
|
229
228
|
return e();
|
|
230
229
|
}
|
|
231
230
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var g = 1e4 >
|
|
238
|
-
return
|
|
231
|
+
var H, x = {}, E = S.react_stack_bottom_frame.bind(
|
|
232
|
+
S,
|
|
233
|
+
o
|
|
234
|
+
)(), A = O(a(o)), U = {};
|
|
235
|
+
W.Fragment = m, W.jsx = function(e, u, b) {
|
|
236
|
+
var g = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return d(
|
|
239
238
|
e,
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
u,
|
|
240
|
+
b,
|
|
242
241
|
!1,
|
|
243
|
-
g ? Error("react-stack-top-frame") :
|
|
244
|
-
g ?
|
|
242
|
+
g ? Error("react-stack-top-frame") : E,
|
|
243
|
+
g ? O(a(e)) : A
|
|
245
244
|
);
|
|
246
|
-
},
|
|
247
|
-
var g = 1e4 >
|
|
248
|
-
return
|
|
245
|
+
}, W.jsxs = function(e, u, b) {
|
|
246
|
+
var g = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return d(
|
|
249
248
|
e,
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
u,
|
|
250
|
+
b,
|
|
252
251
|
!0,
|
|
253
|
-
g ? Error("react-stack-top-frame") :
|
|
254
|
-
g ?
|
|
252
|
+
g ? Error("react-stack-top-frame") : E,
|
|
253
|
+
g ? O(a(e)) : A
|
|
255
254
|
);
|
|
256
255
|
};
|
|
257
|
-
})()),
|
|
256
|
+
})()), W;
|
|
258
257
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
258
|
+
var ce;
|
|
259
|
+
function Me() {
|
|
260
|
+
return ce || (ce = 1, process.env.NODE_ENV === "production" ? Z.exports = Ce() : Z.exports = Pe()), Z.exports;
|
|
262
261
|
}
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
262
|
+
var r = Me();
|
|
263
|
+
const Te = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Re = (n) => n.replace(
|
|
264
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
265
|
+
(t, s, a) => a ? a.toUpperCase() : s.toLowerCase()
|
|
266
|
+
), ue = (n) => {
|
|
267
|
+
const t = Re(n);
|
|
268
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
269
|
+
}, ye = (...n) => n.filter((t, s, a) => !!t && t.trim() !== "" && a.indexOf(t) === s).join(" ").trim(), Oe = (n) => {
|
|
270
|
+
for (const t in n)
|
|
271
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
272
|
+
return !0;
|
|
273
|
+
};
|
|
274
|
+
var Ae = {
|
|
275
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
276
|
+
width: 24,
|
|
277
|
+
height: 24,
|
|
278
|
+
viewBox: "0 0 24 24",
|
|
279
|
+
fill: "none",
|
|
280
|
+
stroke: "currentColor",
|
|
281
|
+
strokeWidth: 2,
|
|
282
|
+
strokeLinecap: "round",
|
|
283
|
+
strokeLinejoin: "round"
|
|
284
|
+
};
|
|
285
|
+
const Ie = be(
|
|
286
|
+
({
|
|
287
|
+
color: n = "currentColor",
|
|
288
|
+
size: t = 24,
|
|
289
|
+
strokeWidth: s = 2,
|
|
290
|
+
absoluteStrokeWidth: a,
|
|
291
|
+
className: l = "",
|
|
292
|
+
children: o,
|
|
293
|
+
iconNode: c,
|
|
294
|
+
...h
|
|
295
|
+
}, p) => re(
|
|
296
|
+
"svg",
|
|
297
|
+
{
|
|
298
|
+
ref: p,
|
|
299
|
+
...Ae,
|
|
300
|
+
width: t,
|
|
301
|
+
height: t,
|
|
302
|
+
stroke: n,
|
|
303
|
+
strokeWidth: a ? Number(s) * 24 / Number(t) : s,
|
|
304
|
+
className: ye("lucide", l),
|
|
305
|
+
...!o && !Oe(h) && { "aria-hidden": "true" },
|
|
306
|
+
...h
|
|
307
|
+
},
|
|
308
|
+
[
|
|
309
|
+
...c.map(([f, d]) => re(f, d)),
|
|
310
|
+
...Array.isArray(o) ? o : [o]
|
|
311
|
+
]
|
|
312
|
+
)
|
|
313
|
+
);
|
|
314
|
+
const P = (n, t) => {
|
|
315
|
+
const s = be(
|
|
316
|
+
({ className: a, ...l }, o) => re(Ie, {
|
|
317
|
+
ref: o,
|
|
318
|
+
iconNode: t,
|
|
319
|
+
className: ye(
|
|
320
|
+
`lucide-${Te(ue(n))}`,
|
|
321
|
+
`lucide-${n}`,
|
|
322
|
+
a
|
|
323
|
+
),
|
|
324
|
+
...l
|
|
325
|
+
})
|
|
326
|
+
);
|
|
327
|
+
return s.displayName = ue(n), s;
|
|
328
|
+
};
|
|
329
|
+
const Le = [
|
|
330
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
331
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
332
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
333
|
+
], qe = P("external-link", Le);
|
|
334
|
+
const $e = [
|
|
335
|
+
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
336
|
+
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
337
|
+
], ze = P("user", $e), De = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", Ye = ({ to: n, className: t, children: s }) => /* @__PURE__ */ r.jsx("a", { href: n, className: t, children: s }), mt = (n) => {
|
|
338
|
+
const { user: t, LinkComponent: s = Ye } = n;
|
|
339
|
+
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children: t ? /* @__PURE__ */ r.jsxs("div", { className: "aiquants-session-card group relative flex flex-col gap-1.5 rounded-lg border border-white/20 bg-white/10 p-2 shadow-sm transition-all duration-200 hover:border-white/30 hover:bg-white/15 dark:border-slate-700/60 dark:bg-slate-800/60 dark:hover:border-slate-600/80 dark:hover:bg-slate-800/90", children: [
|
|
340
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
341
|
+
/* @__PURE__ */ r.jsxs("div", { className: "relative shrink-0", children: [
|
|
342
|
+
/* @__PURE__ */ r.jsx("div", { className: "h-7 w-7 overflow-hidden rounded-full border border-white/40 shadow-xs dark:border-slate-500", children: /* @__PURE__ */ r.jsx("img", { className: "h-full w-full rounded-full object-cover", src: t.photo || De, alt: t.displayName || "user profile" }) }),
|
|
343
|
+
/* @__PURE__ */ r.jsx("span", { className: "absolute -right-0.5 -bottom-0.5 h-2 w-2 rounded-full border border-slate-900 bg-emerald-400", title: "Online" })
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1 leading-tight", children: [
|
|
346
|
+
/* @__PURE__ */ r.jsx("div", { className: "truncate font-semibold text-[11px] text-white tracking-tight dark:text-slate-100", title: t.displayName, children: t.displayName }),
|
|
347
|
+
/* @__PURE__ */ r.jsx("div", { className: "mt-0.5 text-[9px] text-white/70 tracking-tight dark:text-slate-400", children: "Google Account" })
|
|
273
348
|
] })
|
|
274
349
|
] }),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
350
|
+
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-2 gap-1 border-white/15 border-t pt-1 dark:border-slate-700/50", children: [
|
|
351
|
+
/* @__PURE__ */ r.jsxs(
|
|
352
|
+
s,
|
|
353
|
+
{
|
|
354
|
+
className: "flex items-center justify-center gap-1 rounded border border-white/15 bg-white/10 px-1.5 py-0.5 font-medium text-[10px] text-white transition-all duration-150 hover:bg-white/25 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-600/80",
|
|
355
|
+
to: "/",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ r.jsx(ze, { size: 10, className: "shrink-0 opacity-80" }),
|
|
358
|
+
/* @__PURE__ */ r.jsx("span", { className: "truncate", children: "プロフィール" })
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
),
|
|
362
|
+
/* @__PURE__ */ r.jsxs(
|
|
363
|
+
s,
|
|
364
|
+
{
|
|
365
|
+
className: "flex items-center justify-center gap-1 rounded border border-white/15 bg-white/10 px-1.5 py-0.5 font-medium text-[10px] text-white transition-all duration-150 hover:bg-white/25 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-600/80",
|
|
366
|
+
to: "https://myaccount.google.com/",
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ r.jsx(qe, { size: 10, className: "shrink-0 opacity-80" }),
|
|
369
|
+
/* @__PURE__ */ r.jsx("span", { className: "truncate", children: "Google" })
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
] })
|
|
374
|
+
] }) : /* @__PURE__ */ r.jsx("div", { className: "aiquants-session-card flex items-center justify-between rounded-lg border border-white/20 bg-white/10 p-2 shadow-xs dark:border-slate-700/60 dark:bg-slate-800/60", children: /* @__PURE__ */ r.jsx("span", { className: "font-medium text-white/90 text-xs dark:text-slate-200", children: "ログインしてください" }) }) });
|
|
375
|
+
}, se = "aiquants-menu-pin-change";
|
|
376
|
+
let _ = { pinned: !1, width: 0 };
|
|
377
|
+
const ve = (n = 240) => {
|
|
378
|
+
if (typeof window > "u" || typeof document > "u")
|
|
379
|
+
return { pinned: !1, width: 0 };
|
|
380
|
+
try {
|
|
381
|
+
const t = getComputedStyle(document.documentElement).getPropertyValue("--aiquants-menu-pinned-width").trim();
|
|
382
|
+
if (t) {
|
|
383
|
+
const o = Number.parseInt(t, 10);
|
|
384
|
+
if (!Number.isNaN(o)) {
|
|
385
|
+
const c = o > 0, h = c ? o || n : 0;
|
|
386
|
+
return _.pinned === c && _.width === h || (_ = { pinned: c, width: h }), _;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
const a = localStorage.getItem("aiquants-menu-pinned") === "true", l = a ? n : 0;
|
|
390
|
+
return _.pinned === a && _.width === l || (_ = { pinned: a, width: l }), _;
|
|
391
|
+
} catch {
|
|
392
|
+
return { pinned: !1, width: 0 };
|
|
393
|
+
}
|
|
394
|
+
}, de = (n, t) => {
|
|
395
|
+
if (typeof window > "u") return;
|
|
396
|
+
const s = { pinned: n, width: t };
|
|
397
|
+
(_.pinned !== n || _.width !== t) && (_ = s);
|
|
398
|
+
const a = new CustomEvent(se, {
|
|
399
|
+
detail: s,
|
|
400
|
+
bubbles: !0,
|
|
401
|
+
cancelable: !1
|
|
402
|
+
});
|
|
403
|
+
window.dispatchEvent(a);
|
|
404
|
+
}, He = (n, t) => {
|
|
405
|
+
if (typeof window > "u")
|
|
406
|
+
return () => {
|
|
407
|
+
};
|
|
408
|
+
const { immediate: s = !0, defaultPinnedWidth: a = 240 } = t ?? {};
|
|
409
|
+
if (s) {
|
|
410
|
+
const o = ve(a);
|
|
411
|
+
n(o);
|
|
412
|
+
}
|
|
413
|
+
const l = (o) => {
|
|
414
|
+
const c = o;
|
|
415
|
+
c.detail && n(c.detail);
|
|
416
|
+
};
|
|
417
|
+
return window.addEventListener(se, l, { passive: !0 }), () => {
|
|
418
|
+
window.removeEventListener(se, l);
|
|
419
|
+
};
|
|
420
|
+
}, pt = (n) => {
|
|
421
|
+
const t = n?.defaultPinnedWidth ?? 240, s = n?.initialPinned ?? !1, a = k(
|
|
422
|
+
(c) => He(
|
|
423
|
+
() => {
|
|
424
|
+
c();
|
|
425
|
+
},
|
|
426
|
+
{ immediate: !1, defaultPinnedWidth: t }
|
|
427
|
+
),
|
|
428
|
+
[t]
|
|
429
|
+
), l = k(() => ve(t), [t]), o = k(() => ({
|
|
430
|
+
pinned: s,
|
|
431
|
+
width: s ? t : 0
|
|
432
|
+
}), [s, t]);
|
|
433
|
+
return _e(a, l, o);
|
|
434
|
+
};
|
|
435
|
+
const Ve = [
|
|
436
|
+
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
437
|
+
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
438
|
+
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
439
|
+
], We = P("log-out", Ve);
|
|
440
|
+
const Fe = [
|
|
441
|
+
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
442
|
+
[
|
|
443
|
+
"path",
|
|
444
|
+
{
|
|
445
|
+
d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
|
|
446
|
+
key: "1nkz8b"
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
], ke = P("pin", Fe);
|
|
450
|
+
const Ue = [
|
|
451
|
+
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
452
|
+
["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
|
|
453
|
+
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
454
|
+
[
|
|
455
|
+
"path",
|
|
456
|
+
{
|
|
457
|
+
d: "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",
|
|
458
|
+
key: "c9qhm2"
|
|
459
|
+
}
|
|
460
|
+
]
|
|
461
|
+
], we = P("pin-off", Ue);
|
|
462
|
+
const Ge = [
|
|
463
|
+
["path", { d: "M5 21v-6", key: "1hz6c0" }],
|
|
464
|
+
["path", { d: "M12 21V9", key: "uvy0l4" }],
|
|
465
|
+
["path", { d: "M19 21V3", key: "11j9sm" }]
|
|
466
|
+
], Ze = P("chart-no-axes-column-increasing", Ge);
|
|
467
|
+
const Je = [
|
|
468
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
469
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
470
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
471
|
+
], Be = P("download", Je);
|
|
472
|
+
const Qe = [
|
|
473
|
+
[
|
|
474
|
+
"path",
|
|
475
|
+
{
|
|
476
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
477
|
+
key: "1oefj6"
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
481
|
+
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
482
|
+
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
483
|
+
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
484
|
+
], fe = P("file-text", Qe);
|
|
485
|
+
const Xe = [
|
|
486
|
+
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
487
|
+
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
488
|
+
], Ke = P("link", Xe);
|
|
489
|
+
const et = [
|
|
490
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
491
|
+
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
492
|
+
], tt = P("lock", et);
|
|
493
|
+
const nt = [
|
|
494
|
+
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
495
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
496
|
+
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
497
|
+
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
498
|
+
], rt = P("table", nt), st = typeof window < "u" ? xe : $, he = "aiquants-menu-scroll", je = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), at = {
|
|
499
|
+
report: fe,
|
|
500
|
+
slip: fe,
|
|
501
|
+
table: rt,
|
|
502
|
+
chart: Ze,
|
|
503
|
+
download: Be,
|
|
504
|
+
lock: tt,
|
|
505
|
+
href: Ke
|
|
506
|
+
}, ot = ({ mark: n, children: t }) => {
|
|
507
|
+
const s = n ? at[n] : void 0;
|
|
508
|
+
return s ? /* @__PURE__ */ r.jsxs("div", { className: "flex flex-nowrap items-center", children: [
|
|
509
|
+
/* @__PURE__ */ r.jsx(s, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
510
|
+
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: t })
|
|
511
|
+
] }) : /* @__PURE__ */ r.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: t });
|
|
512
|
+
}, ae = (n, t) => t ? {
|
|
292
513
|
menu: {
|
|
293
|
-
id:
|
|
294
|
-
title:
|
|
295
|
-
href:
|
|
514
|
+
id: n.id,
|
|
515
|
+
title: n.title,
|
|
516
|
+
href: n.href
|
|
296
517
|
},
|
|
297
518
|
submenu: {
|
|
298
|
-
subid:
|
|
299
|
-
title:
|
|
300
|
-
href:
|
|
301
|
-
mark:
|
|
302
|
-
new:
|
|
519
|
+
subid: t.subid,
|
|
520
|
+
title: t.title,
|
|
521
|
+
href: t.href,
|
|
522
|
+
mark: t.mark,
|
|
523
|
+
new: t.new
|
|
303
524
|
}
|
|
304
525
|
} : {
|
|
305
526
|
menu: {
|
|
306
|
-
id:
|
|
307
|
-
title:
|
|
308
|
-
href:
|
|
527
|
+
id: n.id,
|
|
528
|
+
title: n.title,
|
|
529
|
+
href: n.href
|
|
309
530
|
}
|
|
310
|
-
},
|
|
311
|
-
if (
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
const
|
|
531
|
+
}, it = ({ item: n, parentMenu: t, onMenuSelected: s }) => {
|
|
532
|
+
if (n.href === "separator")
|
|
533
|
+
return /* @__PURE__ */ r.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
534
|
+
const a = /* @__PURE__ */ r.jsx(ot, { mark: n.mark, children: n.title }), l = {
|
|
314
535
|
onClick: () => {
|
|
315
|
-
|
|
536
|
+
s && s(ae(t, n));
|
|
316
537
|
}
|
|
317
538
|
};
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
const
|
|
321
|
-
for (const
|
|
322
|
-
if (
|
|
323
|
-
return
|
|
324
|
-
if (
|
|
325
|
-
for (const
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
539
|
+
return n.new ? /* @__PURE__ */ r.jsx("a", { href: n.href, rel: "noopener noreferrer", target: "_blank", ...l, children: a }) : je.test(n.href) ? /* @__PURE__ */ r.jsx("a", { href: n.href, ...l, children: a }) : /* @__PURE__ */ r.jsx(ge, { to: n.href, ...l, children: a });
|
|
540
|
+
}, me = (n) => n ? n.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", pe = (n, t) => {
|
|
541
|
+
const s = t !== "/" && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
542
|
+
for (const a of n) {
|
|
543
|
+
if (me(a.href) === s)
|
|
544
|
+
return a.id;
|
|
545
|
+
if (a.submenu) {
|
|
546
|
+
for (const l of a.submenu)
|
|
547
|
+
if (me(l.href) === s)
|
|
548
|
+
return a.id;
|
|
328
549
|
}
|
|
329
550
|
}
|
|
330
551
|
return null;
|
|
331
|
-
},
|
|
332
|
-
const { menuList:
|
|
333
|
-
let
|
|
552
|
+
}, lt = (n) => {
|
|
553
|
+
const { menuList: t, onMenuSelected: s, pinnedSubmenuIds: a = [], onToggleSubmenuPin: l } = n;
|
|
554
|
+
let o = "";
|
|
334
555
|
try {
|
|
335
|
-
|
|
556
|
+
o = Se().pathname;
|
|
336
557
|
} catch {
|
|
337
|
-
typeof window < "u" && (
|
|
558
|
+
typeof window < "u" && (o = window.location.pathname);
|
|
338
559
|
}
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
if (
|
|
342
|
-
const
|
|
343
|
-
|
|
560
|
+
const c = oe(() => pe(t, o), [t, o]), [h, p] = J(c), f = T(o), d = T(c !== null);
|
|
561
|
+
$(() => {
|
|
562
|
+
if (f.current !== o && (f.current = o, d.current = !1), !d.current) {
|
|
563
|
+
const i = pe(t, o);
|
|
564
|
+
i !== null && (p(i), d.current = !0);
|
|
344
565
|
}
|
|
345
|
-
}, [
|
|
346
|
-
const
|
|
347
|
-
(
|
|
348
|
-
|
|
566
|
+
}, [o, t]);
|
|
567
|
+
const w = k(
|
|
568
|
+
(i) => {
|
|
569
|
+
a.includes(i) || p((M) => M === i ? null : i);
|
|
349
570
|
},
|
|
350
|
-
[
|
|
351
|
-
),
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
if (
|
|
571
|
+
[a]
|
|
572
|
+
), v = T(null);
|
|
573
|
+
st(() => {
|
|
574
|
+
const i = v.current;
|
|
575
|
+
if (i)
|
|
355
576
|
try {
|
|
356
|
-
const m = sessionStorage.getItem(
|
|
577
|
+
const m = sessionStorage.getItem(he);
|
|
357
578
|
if (m !== null) {
|
|
358
|
-
const
|
|
359
|
-
Number.isNaN(
|
|
579
|
+
const M = Number.parseFloat(m);
|
|
580
|
+
Number.isNaN(M) || (i.scrollTop = M);
|
|
360
581
|
}
|
|
361
582
|
} catch {
|
|
362
583
|
}
|
|
363
584
|
}, []);
|
|
364
|
-
const
|
|
365
|
-
const
|
|
366
|
-
if (
|
|
585
|
+
const S = k(() => {
|
|
586
|
+
const i = v.current;
|
|
587
|
+
if (i)
|
|
367
588
|
try {
|
|
368
|
-
sessionStorage.setItem(
|
|
589
|
+
sessionStorage.setItem(he, String(i.scrollTop));
|
|
369
590
|
} catch {
|
|
370
591
|
}
|
|
371
|
-
}, []),
|
|
592
|
+
}, []), C = oe(() => /* @__PURE__ */ r.jsx(r.Fragment, { children: t.map((i) => /* @__PURE__ */ r.jsx("div", { children: i.href ? /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-list-item relative mb-0.5 ml-1 flex items-center rounded-l-xl px-2.5 py-1 text-xs before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] sm:text-sm", children: je.test(i.href) ? /* @__PURE__ */ r.jsx(
|
|
372
593
|
"a",
|
|
373
594
|
{
|
|
374
|
-
href:
|
|
595
|
+
href: i.href,
|
|
375
596
|
onClick: () => {
|
|
376
|
-
|
|
597
|
+
s && s(ae(i));
|
|
377
598
|
},
|
|
378
|
-
children: /* @__PURE__ */
|
|
599
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: i.title })
|
|
379
600
|
}
|
|
380
|
-
) : /* @__PURE__ */
|
|
381
|
-
|
|
601
|
+
) : /* @__PURE__ */ r.jsx(
|
|
602
|
+
ge,
|
|
382
603
|
{
|
|
383
|
-
to:
|
|
604
|
+
to: i.href,
|
|
384
605
|
onClick: () => {
|
|
385
|
-
|
|
606
|
+
s && s(ae(i));
|
|
386
607
|
},
|
|
387
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: i.title })
|
|
388
609
|
}
|
|
389
|
-
) }) : /* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
610
|
+
) }) : /* @__PURE__ */ r.jsxs("details", { className: "aiquants-menu-accordion-details", open: i.id === h || a.includes(i.id), children: [
|
|
611
|
+
/* @__PURE__ */ r.jsxs(
|
|
391
612
|
"summary",
|
|
392
613
|
{
|
|
393
|
-
className: "aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-
|
|
614
|
+
className: "aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-0.5 ml-1 list-none rounded-l-xl px-2.5 py-1 text-xs outline-none before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] sm:text-sm",
|
|
394
615
|
onClick: (m) => {
|
|
395
|
-
m.preventDefault(),
|
|
616
|
+
m.preventDefault(), w(i.id);
|
|
396
617
|
},
|
|
397
618
|
onKeyDown: (m) => {
|
|
398
|
-
(m.key === "Enter" || m.key === " ") && (m.preventDefault(),
|
|
619
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), w(i.id));
|
|
399
620
|
},
|
|
400
621
|
children: [
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ r.jsx("span", { children: i.title }),
|
|
623
|
+
/* @__PURE__ */ r.jsx(
|
|
403
624
|
"button",
|
|
404
625
|
{
|
|
405
626
|
type: "button",
|
|
406
627
|
onClick: (m) => {
|
|
407
|
-
m.stopPropagation(), m.preventDefault(),
|
|
628
|
+
m.stopPropagation(), m.preventDefault(), l && l(i.id);
|
|
408
629
|
},
|
|
409
|
-
className: `aiquants-submenu-pin-button ${
|
|
410
|
-
title:
|
|
411
|
-
children:
|
|
630
|
+
className: `aiquants-submenu-pin-button ${a.includes(i.id) ? "pinned" : ""}`,
|
|
631
|
+
title: a.includes(i.id) ? "ピン留め解除" : "ピン留め",
|
|
632
|
+
children: a.includes(i.id) ? /* @__PURE__ */ r.jsx(ke, { size: 13 }) : /* @__PURE__ */ r.jsx(we, { size: 13 })
|
|
412
633
|
}
|
|
413
634
|
)
|
|
414
635
|
]
|
|
415
636
|
}
|
|
416
637
|
),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
] }) },
|
|
419
|
-
return /* @__PURE__ */
|
|
420
|
-
},
|
|
421
|
-
const { menuList:
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-0.5 mr-1 ml-3.5 rounded-lg px-2 py-1 shadow-sm", children: i.submenu.map((m) => /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap py-0.5 text-xs", children: /* @__PURE__ */ r.jsx(it, { item: m, parentMenu: i, onMenuSelected: s }) }, m.subid)) })
|
|
639
|
+
] }) }, i.id)) }), [t, s, h, w, a]);
|
|
640
|
+
return /* @__PURE__ */ r.jsx("div", { ref: v, onScroll: S, className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: C });
|
|
641
|
+
}, ct = (n) => {
|
|
642
|
+
const { menuList: t, menuHeader: s, open: a, onMenuSelected: l, onClickSignout: o, theme: c, toggleTheme: h, isPinned: p, onTogglePin: f, pinnedSubmenuIds: d, onToggleSubmenuPin: w } = n;
|
|
643
|
+
return /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[240px] select-none flex-col transition-transform duration-500 ${a ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`, children: [
|
|
644
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex shrink-0 flex-col justify-center border-white/15 border-b px-2.5 py-2 dark:border-slate-700/60", children: s }),
|
|
645
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col overflow-y-auto", children: /* @__PURE__ */ r.jsx(lt, { menuList: t, onMenuSelected: l, pinnedSubmenuIds: d, onToggleSubmenuPin: w }) }),
|
|
646
|
+
/* @__PURE__ */ r.jsx("div", { className: "border-white/15 border-t px-2.5 py-1.5 dark:border-slate-700/60", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between gap-1.5", children: [
|
|
647
|
+
/* @__PURE__ */ r.jsx(
|
|
427
648
|
"button",
|
|
428
649
|
{
|
|
429
650
|
type: "button",
|
|
430
|
-
onClick:
|
|
651
|
+
onClick: f,
|
|
431
652
|
"data-aqmb-pin-button": !0,
|
|
432
|
-
className: `flex items-center justify-center rounded-md px-
|
|
433
|
-
title:
|
|
434
|
-
"aria-label":
|
|
435
|
-
children:
|
|
653
|
+
className: `flex h-7 items-center justify-center rounded-md px-2 text-[11px] text-white shadow-2xs transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${p ? "bg-amber-500 hover:bg-amber-600 dark:bg-amber-600 dark:hover:bg-amber-500" : "border border-white/20 bg-white/10 hover:bg-white/20 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600"}`,
|
|
654
|
+
title: p ? "ピン留め解除" : "ピン留め",
|
|
655
|
+
"aria-label": p ? "ピン留め解除" : "ピン留め",
|
|
656
|
+
children: p ? /* @__PURE__ */ r.jsx(ke, { size: 12 }) : /* @__PURE__ */ r.jsx(we, { size: 12 })
|
|
436
657
|
}
|
|
437
658
|
),
|
|
438
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ r.jsx(
|
|
439
660
|
"button",
|
|
440
661
|
{
|
|
441
662
|
type: "button",
|
|
442
663
|
onClick: h,
|
|
443
664
|
"data-aqmb-theme-button": !0,
|
|
444
|
-
className: "group relative flex items-center justify-center rounded-md border border-white/
|
|
445
|
-
title:
|
|
446
|
-
"aria-label":
|
|
447
|
-
children: /* @__PURE__ */
|
|
665
|
+
className: "group relative flex h-7 items-center justify-center rounded-md border border-white/20 bg-white/10 px-2 text-[11px] text-white shadow-2xs backdrop-blur-xs transition-all duration-200 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600",
|
|
666
|
+
title: c === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
667
|
+
"aria-label": c === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
668
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "text-xs transition-transform duration-200 group-hover:scale-110", children: c === "dark" ? "🌞" : "🌙" })
|
|
448
669
|
}
|
|
449
670
|
),
|
|
450
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ r.jsxs(
|
|
451
672
|
"button",
|
|
452
673
|
{
|
|
453
674
|
type: "button",
|
|
454
675
|
"data-aqmb-signout-button": !0,
|
|
455
|
-
className: "aiquants-signout-button flex flex-1 items-center justify-center whitespace-nowrap rounded-md bg-red-500/90 px-
|
|
456
|
-
onClick:
|
|
457
|
-
children:
|
|
676
|
+
className: "aiquants-signout-button flex h-7 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-red-500/90 px-2.5 font-medium text-[11px] text-white shadow-2xs transition-colors duration-200 hover:bg-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60 dark:bg-red-600/90 dark:hover:bg-red-500",
|
|
677
|
+
onClick: o,
|
|
678
|
+
children: [
|
|
679
|
+
/* @__PURE__ */ r.jsx(We, { size: 11, className: "shrink-0" }),
|
|
680
|
+
/* @__PURE__ */ r.jsx("span", { children: "サインアウト" })
|
|
681
|
+
]
|
|
458
682
|
}
|
|
459
683
|
)
|
|
460
684
|
] }) })
|
|
461
685
|
] });
|
|
462
|
-
},
|
|
463
|
-
const { isOverlay:
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
},
|
|
466
|
-
const { open:
|
|
467
|
-
if (
|
|
468
|
-
const
|
|
469
|
-
|
|
686
|
+
}, ut = (n) => {
|
|
687
|
+
const { isOverlay: t, onOverlayClick: s } = n;
|
|
688
|
+
return /* @__PURE__ */ r.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: s });
|
|
689
|
+
}, dt = (n) => {
|
|
690
|
+
const { open: t, onMenuOpen: s, onMenuClose: a, theme: l } = n, o = T(t), c = T(null), h = T(null), p = T(null), f = T(null), d = T(null), w = k(() => {
|
|
691
|
+
if (c.current && h.current && p.current && f.current && d.current) {
|
|
692
|
+
const N = l === "dark" ? "#fff" : "#000";
|
|
693
|
+
c.current.style.backgroundColor = N, c.current.style.width = "100%", c.current.style.height = "3px", c.current.style.transform = "", h.current.style.opacity = "1", h.current.style.backgroundColor = N, p.current.style.opacity = "1", p.current.style.backgroundColor = N, f.current.style.backgroundColor = N, f.current.style.width = "100%", f.current.style.height = "3px", f.current.style.transform = "", d.current.style.color = N, d.current.classList.remove("after:content-['close']"), d.current.classList.remove("after:ml-0.5"), d.current.classList.add("after:content-['menu']"), d.current.classList.add("after:-ml-0.5"), o.current = !0;
|
|
470
694
|
}
|
|
471
|
-
}, [
|
|
472
|
-
|
|
473
|
-
}, []),
|
|
474
|
-
|
|
475
|
-
}, [
|
|
476
|
-
|
|
477
|
-
}, [
|
|
478
|
-
|
|
479
|
-
}, [
|
|
480
|
-
|
|
481
|
-
}, []),
|
|
482
|
-
|
|
695
|
+
}, [l]), v = k(() => {
|
|
696
|
+
c.current && h.current && p.current && f.current && d.current && (c.current.style.backgroundColor = "#fff", c.current.style.width = "32px", c.current.style.height = "4px", c.current.style.transform = "translateY(9px) rotate(-45deg)", h.current.style.opacity = "0", p.current.style.opacity = "0", f.current.style.backgroundColor = "#fff", f.current.style.width = "32px", f.current.style.height = "4px", f.current.style.transform = "translateY(-9px) rotate(45deg)", d.current.style.color = "#fff", d.current.classList.remove("after:content-['menu']"), d.current.classList.remove("after:-ml-0.5"), d.current.classList.add("after:content-['close']"), d.current.classList.add("after:ml-0.5"), o.current = !1);
|
|
697
|
+
}, []), S = k(() => {
|
|
698
|
+
w(), a && a();
|
|
699
|
+
}, [w, a]), C = k(() => {
|
|
700
|
+
v(), s && s();
|
|
701
|
+
}, [v, s]), i = k(() => {
|
|
702
|
+
o.current ? C() : S();
|
|
703
|
+
}, [S, C]), m = k((N) => {
|
|
704
|
+
N.currentTarget.blur();
|
|
705
|
+
}, []), M = k((N) => {
|
|
706
|
+
N.preventDefault();
|
|
483
707
|
}, []);
|
|
484
|
-
return
|
|
485
|
-
|
|
486
|
-
}, [
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
708
|
+
return $(() => {
|
|
709
|
+
t ? w() : v();
|
|
710
|
+
}, [t, w, v]), /* @__PURE__ */ r.jsxs("button", { type: "button", "data-aqmb-menu-switch": !0, className: "aiquants-menu-switch inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden", onClick: i, onFocus: m, onMouseDown: M, tabIndex: -1, children: [
|
|
711
|
+
/* @__PURE__ */ r.jsx("span", { className: "absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none", ref: c }),
|
|
712
|
+
/* @__PURE__ */ r.jsx("span", { className: "absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none", ref: h }),
|
|
713
|
+
/* @__PURE__ */ r.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref: p }),
|
|
714
|
+
/* @__PURE__ */ r.jsx("span", { className: "absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none", ref: f }),
|
|
715
|
+
/* @__PURE__ */ r.jsx("div", { className: "absolute w-full text-xs after:mt-2 after:block", ref: d })
|
|
492
716
|
] });
|
|
493
|
-
},
|
|
494
|
-
const {
|
|
717
|
+
}, ne = typeof window < "u" ? xe : $, bt = (n) => {
|
|
718
|
+
const {
|
|
719
|
+
menuList: t,
|
|
720
|
+
menuHeader: s,
|
|
721
|
+
onClickSignout: a,
|
|
722
|
+
isMenuhide: l,
|
|
723
|
+
isMenuHide: o,
|
|
724
|
+
theme: c,
|
|
725
|
+
toggleTheme: h,
|
|
726
|
+
onMenuNavigate: p,
|
|
727
|
+
isPinned: f,
|
|
728
|
+
pinnedWidth: d = 240,
|
|
729
|
+
onPinChange: w,
|
|
730
|
+
pinnedSubmenuIds: v,
|
|
731
|
+
initialPinnedSubmenuIds: S,
|
|
732
|
+
onSubmenuPinChange: C,
|
|
733
|
+
closeOnEscape: i = "auto"
|
|
734
|
+
} = n, m = o ?? l ?? !1, [M, N] = J(() => {
|
|
495
735
|
try {
|
|
496
736
|
return localStorage.getItem("aiquants-menu-pinned") === "true";
|
|
497
737
|
} catch {
|
|
498
738
|
return !1;
|
|
499
739
|
}
|
|
500
|
-
}),
|
|
501
|
-
|
|
502
|
-
|
|
740
|
+
}), j = f !== void 0 ? f : M, [I, L] = J(j);
|
|
741
|
+
$(() => {
|
|
742
|
+
j && L(!0);
|
|
743
|
+
}, [j]);
|
|
744
|
+
const [z, B] = J(() => {
|
|
745
|
+
if (S)
|
|
746
|
+
return S;
|
|
503
747
|
try {
|
|
504
|
-
const
|
|
505
|
-
if (
|
|
506
|
-
const
|
|
507
|
-
if (Array.isArray(
|
|
508
|
-
return
|
|
748
|
+
const x = localStorage.getItem("aiquants-submenu-pinned");
|
|
749
|
+
if (x) {
|
|
750
|
+
const E = JSON.parse(x);
|
|
751
|
+
if (Array.isArray(E))
|
|
752
|
+
return E.filter((A) => typeof A == "number");
|
|
509
753
|
}
|
|
510
754
|
} catch {
|
|
511
755
|
}
|
|
512
756
|
return [];
|
|
513
|
-
}),
|
|
514
|
-
(
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
|
|
757
|
+
}), Q = v !== void 0 ? v : z, D = k(
|
|
758
|
+
(x) => {
|
|
759
|
+
const E = v !== void 0 ? v : z, A = E.includes(x) ? E.filter((U) => U !== x) : [...E, x];
|
|
760
|
+
if (v === void 0) {
|
|
761
|
+
B(A);
|
|
518
762
|
try {
|
|
519
|
-
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(
|
|
763
|
+
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(A));
|
|
520
764
|
} catch {
|
|
521
765
|
}
|
|
522
766
|
}
|
|
523
|
-
|
|
767
|
+
C && C(A);
|
|
524
768
|
},
|
|
525
|
-
[
|
|
526
|
-
);
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width",
|
|
769
|
+
[v, z, C]
|
|
770
|
+
), Y = T(w);
|
|
771
|
+
ne(() => {
|
|
772
|
+
Y.current = w;
|
|
773
|
+
}, [w]), ne(() => {
|
|
774
|
+
const x = j ? d : 0, E = `${x}px`;
|
|
775
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", E), de(j, x);
|
|
776
|
+
}, [j, d]), ne(() => () => {
|
|
777
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"), de(!1, 0);
|
|
532
778
|
}, []);
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
}, []),
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
779
|
+
const X = k(() => {
|
|
780
|
+
L(!0);
|
|
781
|
+
}, []), R = k(() => {
|
|
782
|
+
if (L(!1), f === void 0) {
|
|
783
|
+
N(!1);
|
|
784
|
+
try {
|
|
785
|
+
localStorage.removeItem("aiquants-menu-pinned");
|
|
786
|
+
} catch {
|
|
787
|
+
}
|
|
540
788
|
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
});
|
|
556
|
-
}, []), U = w(
|
|
557
|
-
(k) => {
|
|
558
|
-
h && h(k), x || m(!1);
|
|
789
|
+
Y.current?.(!1, 0);
|
|
790
|
+
}, [f]), F = k(() => {
|
|
791
|
+
const x = !j, E = x ? d : 0;
|
|
792
|
+
if (f === void 0) {
|
|
793
|
+
N(x);
|
|
794
|
+
try {
|
|
795
|
+
x ? localStorage.setItem("aiquants-menu-pinned", "true") : localStorage.removeItem("aiquants-menu-pinned");
|
|
796
|
+
} catch {
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
Y.current?.(x, E);
|
|
800
|
+
}, [j, f, d]), K = k(
|
|
801
|
+
(x) => {
|
|
802
|
+
p && p(x), j || L(!1);
|
|
559
803
|
},
|
|
560
|
-
[
|
|
561
|
-
),
|
|
562
|
-
(
|
|
563
|
-
|
|
804
|
+
[p, j]
|
|
805
|
+
), O = k(
|
|
806
|
+
(x) => {
|
|
807
|
+
x.key === "Escape" && R();
|
|
564
808
|
},
|
|
565
|
-
[
|
|
566
|
-
),
|
|
567
|
-
return
|
|
568
|
-
window.removeEventListener("keydown",
|
|
569
|
-
}), [
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
|
|
809
|
+
[R]
|
|
810
|
+
), H = i === !0 || i === "auto" && !j;
|
|
811
|
+
return $(() => (I && H ? window.addEventListener("keydown", O) : window.removeEventListener("keydown", O), () => {
|
|
812
|
+
window.removeEventListener("keydown", O);
|
|
813
|
+
}), [I, H, O]), m ? null : /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-bar ${c}`, children: [
|
|
814
|
+
/* @__PURE__ */ r.jsx(dt, { onMenuClose: R, onMenuOpen: X, open: !I, theme: c }),
|
|
815
|
+
/* @__PURE__ */ r.jsx(
|
|
816
|
+
ct,
|
|
573
817
|
{
|
|
574
|
-
menuList:
|
|
575
|
-
menuHeader:
|
|
576
|
-
onClickSignout:
|
|
577
|
-
onMenuSelected:
|
|
578
|
-
open:
|
|
579
|
-
theme:
|
|
580
|
-
toggleTheme:
|
|
581
|
-
isPinned:
|
|
582
|
-
onTogglePin:
|
|
583
|
-
pinnedSubmenuIds:
|
|
584
|
-
onToggleSubmenuPin:
|
|
818
|
+
menuList: t,
|
|
819
|
+
menuHeader: s,
|
|
820
|
+
onClickSignout: a,
|
|
821
|
+
onMenuSelected: K,
|
|
822
|
+
open: I,
|
|
823
|
+
theme: c,
|
|
824
|
+
toggleTheme: h,
|
|
825
|
+
isPinned: j,
|
|
826
|
+
onTogglePin: F,
|
|
827
|
+
pinnedSubmenuIds: Q,
|
|
828
|
+
onToggleSubmenuPin: D
|
|
585
829
|
}
|
|
586
830
|
),
|
|
587
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ r.jsx(ut, { isOverlay: I && !j, onOverlayClick: R })
|
|
588
832
|
] });
|
|
589
833
|
};
|
|
590
834
|
export {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
835
|
+
Ye as DefaultLink,
|
|
836
|
+
se as MENU_PIN_CHANGE_EVENT,
|
|
837
|
+
bt as MenuBar,
|
|
838
|
+
mt as SessionInfo,
|
|
839
|
+
de as dispatchMenuPinChange,
|
|
840
|
+
ve as getInitialPinState,
|
|
841
|
+
He as subscribeMenuPinChange,
|
|
842
|
+
pt as useMenuPinState
|
|
594
843
|
};
|