@sirsluginston/sharedui 2.0.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/README.md +130 -0
- package/dist/index.d.ts +444 -0
- package/dist/sharedui.js +2895 -0
- package/dist/sharedui.umd.cjs +76 -0
- package/dist/style.css +1 -0
- package/package.json +60 -0
package/dist/sharedui.js
ADDED
|
@@ -0,0 +1,2895 @@
|
|
|
1
|
+
import ue, { useState as P, useEffect as N, useCallback as Sr, useRef as Ae } from "react";
|
|
2
|
+
function Rr(o) {
|
|
3
|
+
const [t, s] = P(() => {
|
|
4
|
+
if (typeof window > "u") return !1;
|
|
5
|
+
const n = localStorage.getItem("theme-mode");
|
|
6
|
+
return n ? n === "dark" : o.theme.defaultTheme === "dark" ? !0 : o.theme.defaultTheme === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !1;
|
|
7
|
+
});
|
|
8
|
+
N(() => {
|
|
9
|
+
Tr(o.theme);
|
|
10
|
+
}, [o.theme]), N(() => {
|
|
11
|
+
document.body.classList.toggle("dark-mode", t), localStorage.setItem("theme-mode", t ? "dark" : "light");
|
|
12
|
+
}, [t]);
|
|
13
|
+
const i = Sr(() => {
|
|
14
|
+
s((n) => !n);
|
|
15
|
+
}, []);
|
|
16
|
+
return { darkMode: t, toggleDarkMode: i };
|
|
17
|
+
}
|
|
18
|
+
function Tr(o) {
|
|
19
|
+
const t = document.documentElement;
|
|
20
|
+
t.style.setProperty("--primary-color", o.primaryColor), t.style.setProperty("--secondary-color", o.secondaryColor), t.style.setProperty("--accent-color", o.accentColor), o.surfaceLight && t.style.setProperty("--surface-light", o.surfaceLight), o.surfaceDark && t.style.setProperty("--surface-dark", o.surfaceDark), o.textLight && t.style.setProperty("--text-light", o.textLight), o.textDark && t.style.setProperty("--text-dark", o.textDark);
|
|
21
|
+
}
|
|
22
|
+
var de = { exports: {} }, $ = {};
|
|
23
|
+
/**
|
|
24
|
+
* @license React
|
|
25
|
+
* react-jsx-runtime.production.min.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/
|
|
32
|
+
var Le;
|
|
33
|
+
function Er() {
|
|
34
|
+
if (Le) return $;
|
|
35
|
+
Le = 1;
|
|
36
|
+
var o = ue, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
37
|
+
function c(u, f, j) {
|
|
38
|
+
var p, h = {}, b = null, _ = null;
|
|
39
|
+
j !== void 0 && (b = "" + j), f.key !== void 0 && (b = "" + f.key), f.ref !== void 0 && (_ = f.ref);
|
|
40
|
+
for (p in f) i.call(f, p) && !l.hasOwnProperty(p) && (h[p] = f[p]);
|
|
41
|
+
if (u && u.defaultProps) for (p in f = u.defaultProps, f) h[p] === void 0 && (h[p] = f[p]);
|
|
42
|
+
return { $$typeof: t, type: u, key: b, ref: _, props: h, _owner: n.current };
|
|
43
|
+
}
|
|
44
|
+
return $.Fragment = s, $.jsx = c, $.jsxs = c, $;
|
|
45
|
+
}
|
|
46
|
+
var Y = {};
|
|
47
|
+
/**
|
|
48
|
+
* @license React
|
|
49
|
+
* react-jsx-runtime.development.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/
|
|
56
|
+
var Be;
|
|
57
|
+
function Fr() {
|
|
58
|
+
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
59
|
+
var o = ue, t = Symbol.for("react.element"), s = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), u = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), C = Symbol.iterator, F = "@@iterator";
|
|
60
|
+
function Ne(r) {
|
|
61
|
+
if (r === null || typeof r != "object")
|
|
62
|
+
return null;
|
|
63
|
+
var a = C && r[C] || r[F];
|
|
64
|
+
return typeof a == "function" ? a : null;
|
|
65
|
+
}
|
|
66
|
+
var W = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
67
|
+
function S(r) {
|
|
68
|
+
{
|
|
69
|
+
for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
|
|
70
|
+
d[v - 1] = arguments[v];
|
|
71
|
+
Ue("error", r, d);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function Ue(r, a, d) {
|
|
75
|
+
{
|
|
76
|
+
var v = W.ReactDebugCurrentFrame, x = v.getStackAddendum();
|
|
77
|
+
x !== "" && (a += "%s", d = d.concat([x]));
|
|
78
|
+
var y = d.map(function(m) {
|
|
79
|
+
return String(m);
|
|
80
|
+
});
|
|
81
|
+
y.unshift("Warning: " + a), Function.prototype.apply.call(console[r], console, y);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var Ve = !1, He = !1, Xe = !1, qe = !1, Je = !1, fe;
|
|
85
|
+
fe = Symbol.for("react.module.reference");
|
|
86
|
+
function Ke(r) {
|
|
87
|
+
return !!(typeof r == "string" || typeof r == "function" || r === i || r === l || Je || r === n || r === j || r === p || qe || r === _ || Ve || He || Xe || typeof r == "object" && r !== null && (r.$$typeof === b || r.$$typeof === h || r.$$typeof === c || r.$$typeof === u || r.$$typeof === f || // This needs to include all possible module reference object
|
|
88
|
+
// types supported by any Flight configuration anywhere since
|
|
89
|
+
// we don't know which Flight build this will end up being used
|
|
90
|
+
// with.
|
|
91
|
+
r.$$typeof === fe || r.getModuleId !== void 0));
|
|
92
|
+
}
|
|
93
|
+
function Ge(r, a, d) {
|
|
94
|
+
var v = r.displayName;
|
|
95
|
+
if (v)
|
|
96
|
+
return v;
|
|
97
|
+
var x = a.displayName || a.name || "";
|
|
98
|
+
return x !== "" ? d + "(" + x + ")" : d;
|
|
99
|
+
}
|
|
100
|
+
function ve(r) {
|
|
101
|
+
return r.displayName || "Context";
|
|
102
|
+
}
|
|
103
|
+
function I(r) {
|
|
104
|
+
if (r == null)
|
|
105
|
+
return null;
|
|
106
|
+
if (typeof r.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
107
|
+
return r.displayName || r.name || null;
|
|
108
|
+
if (typeof r == "string")
|
|
109
|
+
return r;
|
|
110
|
+
switch (r) {
|
|
111
|
+
case i:
|
|
112
|
+
return "Fragment";
|
|
113
|
+
case s:
|
|
114
|
+
return "Portal";
|
|
115
|
+
case l:
|
|
116
|
+
return "Profiler";
|
|
117
|
+
case n:
|
|
118
|
+
return "StrictMode";
|
|
119
|
+
case j:
|
|
120
|
+
return "Suspense";
|
|
121
|
+
case p:
|
|
122
|
+
return "SuspenseList";
|
|
123
|
+
}
|
|
124
|
+
if (typeof r == "object")
|
|
125
|
+
switch (r.$$typeof) {
|
|
126
|
+
case u:
|
|
127
|
+
var a = r;
|
|
128
|
+
return ve(a) + ".Consumer";
|
|
129
|
+
case c:
|
|
130
|
+
var d = r;
|
|
131
|
+
return ve(d._context) + ".Provider";
|
|
132
|
+
case f:
|
|
133
|
+
return Ge(r, r.render, "ForwardRef");
|
|
134
|
+
case h:
|
|
135
|
+
var v = r.displayName || null;
|
|
136
|
+
return v !== null ? v : I(r.type) || "Memo";
|
|
137
|
+
case b: {
|
|
138
|
+
var x = r, y = x._payload, m = x._init;
|
|
139
|
+
try {
|
|
140
|
+
return I(m(y));
|
|
141
|
+
} catch {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
var M = Object.assign, B = 0, pe, ge, me, xe, ye, he, be;
|
|
149
|
+
function je() {
|
|
150
|
+
}
|
|
151
|
+
je.__reactDisabledLog = !0;
|
|
152
|
+
function Qe() {
|
|
153
|
+
{
|
|
154
|
+
if (B === 0) {
|
|
155
|
+
pe = console.log, ge = console.info, me = console.warn, xe = console.error, ye = console.group, he = console.groupCollapsed, be = console.groupEnd;
|
|
156
|
+
var r = {
|
|
157
|
+
configurable: !0,
|
|
158
|
+
enumerable: !0,
|
|
159
|
+
value: je,
|
|
160
|
+
writable: !0
|
|
161
|
+
};
|
|
162
|
+
Object.defineProperties(console, {
|
|
163
|
+
info: r,
|
|
164
|
+
log: r,
|
|
165
|
+
warn: r,
|
|
166
|
+
error: r,
|
|
167
|
+
group: r,
|
|
168
|
+
groupCollapsed: r,
|
|
169
|
+
groupEnd: r
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
B++;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function Ze() {
|
|
176
|
+
{
|
|
177
|
+
if (B--, B === 0) {
|
|
178
|
+
var r = {
|
|
179
|
+
configurable: !0,
|
|
180
|
+
enumerable: !0,
|
|
181
|
+
writable: !0
|
|
182
|
+
};
|
|
183
|
+
Object.defineProperties(console, {
|
|
184
|
+
log: M({}, r, {
|
|
185
|
+
value: pe
|
|
186
|
+
}),
|
|
187
|
+
info: M({}, r, {
|
|
188
|
+
value: ge
|
|
189
|
+
}),
|
|
190
|
+
warn: M({}, r, {
|
|
191
|
+
value: me
|
|
192
|
+
}),
|
|
193
|
+
error: M({}, r, {
|
|
194
|
+
value: xe
|
|
195
|
+
}),
|
|
196
|
+
group: M({}, r, {
|
|
197
|
+
value: ye
|
|
198
|
+
}),
|
|
199
|
+
groupCollapsed: M({}, r, {
|
|
200
|
+
value: he
|
|
201
|
+
}),
|
|
202
|
+
groupEnd: M({}, r, {
|
|
203
|
+
value: be
|
|
204
|
+
})
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
B < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
var oe = W.ReactCurrentDispatcher, te;
|
|
211
|
+
function J(r, a, d) {
|
|
212
|
+
{
|
|
213
|
+
if (te === void 0)
|
|
214
|
+
try {
|
|
215
|
+
throw Error();
|
|
216
|
+
} catch (x) {
|
|
217
|
+
var v = x.stack.trim().match(/\n( *(at )?)/);
|
|
218
|
+
te = v && v[1] || "";
|
|
219
|
+
}
|
|
220
|
+
return `
|
|
221
|
+
` + te + r;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
var ae = !1, K;
|
|
225
|
+
{
|
|
226
|
+
var er = typeof WeakMap == "function" ? WeakMap : Map;
|
|
227
|
+
K = new er();
|
|
228
|
+
}
|
|
229
|
+
function ke(r, a) {
|
|
230
|
+
if (!r || ae)
|
|
231
|
+
return "";
|
|
232
|
+
{
|
|
233
|
+
var d = K.get(r);
|
|
234
|
+
if (d !== void 0)
|
|
235
|
+
return d;
|
|
236
|
+
}
|
|
237
|
+
var v;
|
|
238
|
+
ae = !0;
|
|
239
|
+
var x = Error.prepareStackTrace;
|
|
240
|
+
Error.prepareStackTrace = void 0;
|
|
241
|
+
var y;
|
|
242
|
+
y = oe.current, oe.current = null, Qe();
|
|
243
|
+
try {
|
|
244
|
+
if (a) {
|
|
245
|
+
var m = function() {
|
|
246
|
+
throw Error();
|
|
247
|
+
};
|
|
248
|
+
if (Object.defineProperty(m.prototype, "props", {
|
|
249
|
+
set: function() {
|
|
250
|
+
throw Error();
|
|
251
|
+
}
|
|
252
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
253
|
+
try {
|
|
254
|
+
Reflect.construct(m, []);
|
|
255
|
+
} catch (T) {
|
|
256
|
+
v = T;
|
|
257
|
+
}
|
|
258
|
+
Reflect.construct(r, [], m);
|
|
259
|
+
} else {
|
|
260
|
+
try {
|
|
261
|
+
m.call();
|
|
262
|
+
} catch (T) {
|
|
263
|
+
v = T;
|
|
264
|
+
}
|
|
265
|
+
r.call(m.prototype);
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
try {
|
|
269
|
+
throw Error();
|
|
270
|
+
} catch (T) {
|
|
271
|
+
v = T;
|
|
272
|
+
}
|
|
273
|
+
r();
|
|
274
|
+
}
|
|
275
|
+
} catch (T) {
|
|
276
|
+
if (T && v && typeof T.stack == "string") {
|
|
277
|
+
for (var g = T.stack.split(`
|
|
278
|
+
`), R = v.stack.split(`
|
|
279
|
+
`), k = g.length - 1, w = R.length - 1; k >= 1 && w >= 0 && g[k] !== R[w]; )
|
|
280
|
+
w--;
|
|
281
|
+
for (; k >= 1 && w >= 0; k--, w--)
|
|
282
|
+
if (g[k] !== R[w]) {
|
|
283
|
+
if (k !== 1 || w !== 1)
|
|
284
|
+
do
|
|
285
|
+
if (k--, w--, w < 0 || g[k] !== R[w]) {
|
|
286
|
+
var E = `
|
|
287
|
+
` + g[k].replace(" at new ", " at ");
|
|
288
|
+
return r.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", r.displayName)), typeof r == "function" && K.set(r, E), E;
|
|
289
|
+
}
|
|
290
|
+
while (k >= 1 && w >= 0);
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
} finally {
|
|
295
|
+
ae = !1, oe.current = y, Ze(), Error.prepareStackTrace = x;
|
|
296
|
+
}
|
|
297
|
+
var L = r ? r.displayName || r.name : "", D = L ? J(L) : "";
|
|
298
|
+
return typeof r == "function" && K.set(r, D), D;
|
|
299
|
+
}
|
|
300
|
+
function rr(r, a, d) {
|
|
301
|
+
return ke(r, !1);
|
|
302
|
+
}
|
|
303
|
+
function or(r) {
|
|
304
|
+
var a = r.prototype;
|
|
305
|
+
return !!(a && a.isReactComponent);
|
|
306
|
+
}
|
|
307
|
+
function G(r, a, d) {
|
|
308
|
+
if (r == null)
|
|
309
|
+
return "";
|
|
310
|
+
if (typeof r == "function")
|
|
311
|
+
return ke(r, or(r));
|
|
312
|
+
if (typeof r == "string")
|
|
313
|
+
return J(r);
|
|
314
|
+
switch (r) {
|
|
315
|
+
case j:
|
|
316
|
+
return J("Suspense");
|
|
317
|
+
case p:
|
|
318
|
+
return J("SuspenseList");
|
|
319
|
+
}
|
|
320
|
+
if (typeof r == "object")
|
|
321
|
+
switch (r.$$typeof) {
|
|
322
|
+
case f:
|
|
323
|
+
return rr(r.render);
|
|
324
|
+
case h:
|
|
325
|
+
return G(r.type, a, d);
|
|
326
|
+
case b: {
|
|
327
|
+
var v = r, x = v._payload, y = v._init;
|
|
328
|
+
try {
|
|
329
|
+
return G(y(x), a, d);
|
|
330
|
+
} catch {
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return "";
|
|
335
|
+
}
|
|
336
|
+
var O = Object.prototype.hasOwnProperty, we = {}, Ce = W.ReactDebugCurrentFrame;
|
|
337
|
+
function Q(r) {
|
|
338
|
+
if (r) {
|
|
339
|
+
var a = r._owner, d = G(r.type, r._source, a ? a.type : null);
|
|
340
|
+
Ce.setExtraStackFrame(d);
|
|
341
|
+
} else
|
|
342
|
+
Ce.setExtraStackFrame(null);
|
|
343
|
+
}
|
|
344
|
+
function tr(r, a, d, v, x) {
|
|
345
|
+
{
|
|
346
|
+
var y = Function.call.bind(O);
|
|
347
|
+
for (var m in r)
|
|
348
|
+
if (y(r, m)) {
|
|
349
|
+
var g = void 0;
|
|
350
|
+
try {
|
|
351
|
+
if (typeof r[m] != "function") {
|
|
352
|
+
var R = Error((v || "React class") + ": " + d + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
353
|
+
throw R.name = "Invariant Violation", R;
|
|
354
|
+
}
|
|
355
|
+
g = r[m](a, m, v, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
356
|
+
} catch (k) {
|
|
357
|
+
g = k;
|
|
358
|
+
}
|
|
359
|
+
g && !(g instanceof Error) && (Q(x), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", d, m, typeof g), Q(null)), g instanceof Error && !(g.message in we) && (we[g.message] = !0, Q(x), S("Failed %s type: %s", d, g.message), Q(null));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
var ar = Array.isArray;
|
|
364
|
+
function ne(r) {
|
|
365
|
+
return ar(r);
|
|
366
|
+
}
|
|
367
|
+
function nr(r) {
|
|
368
|
+
{
|
|
369
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, d = a && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
370
|
+
return d;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
function sr(r) {
|
|
374
|
+
try {
|
|
375
|
+
return Se(r), !1;
|
|
376
|
+
} catch {
|
|
377
|
+
return !0;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function Se(r) {
|
|
381
|
+
return "" + r;
|
|
382
|
+
}
|
|
383
|
+
function Re(r) {
|
|
384
|
+
if (sr(r))
|
|
385
|
+
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(r)), Se(r);
|
|
386
|
+
}
|
|
387
|
+
var Te = W.ReactCurrentOwner, ir = {
|
|
388
|
+
key: !0,
|
|
389
|
+
ref: !0,
|
|
390
|
+
__self: !0,
|
|
391
|
+
__source: !0
|
|
392
|
+
}, Ee, Fe;
|
|
393
|
+
function lr(r) {
|
|
394
|
+
if (O.call(r, "ref")) {
|
|
395
|
+
var a = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
396
|
+
if (a && a.isReactWarning)
|
|
397
|
+
return !1;
|
|
398
|
+
}
|
|
399
|
+
return r.ref !== void 0;
|
|
400
|
+
}
|
|
401
|
+
function cr(r) {
|
|
402
|
+
if (O.call(r, "key")) {
|
|
403
|
+
var a = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
404
|
+
if (a && a.isReactWarning)
|
|
405
|
+
return !1;
|
|
406
|
+
}
|
|
407
|
+
return r.key !== void 0;
|
|
408
|
+
}
|
|
409
|
+
function dr(r, a) {
|
|
410
|
+
typeof r.ref == "string" && Te.current;
|
|
411
|
+
}
|
|
412
|
+
function ur(r, a) {
|
|
413
|
+
{
|
|
414
|
+
var d = function() {
|
|
415
|
+
Ee || (Ee = !0, S("%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://reactjs.org/link/special-props)", a));
|
|
416
|
+
};
|
|
417
|
+
d.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
418
|
+
get: d,
|
|
419
|
+
configurable: !0
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
function fr(r, a) {
|
|
424
|
+
{
|
|
425
|
+
var d = function() {
|
|
426
|
+
Fe || (Fe = !0, S("%s: `ref` 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://reactjs.org/link/special-props)", a));
|
|
427
|
+
};
|
|
428
|
+
d.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
429
|
+
get: d,
|
|
430
|
+
configurable: !0
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
var vr = function(r, a, d, v, x, y, m) {
|
|
435
|
+
var g = {
|
|
436
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
437
|
+
$$typeof: t,
|
|
438
|
+
// Built-in properties that belong on the element
|
|
439
|
+
type: r,
|
|
440
|
+
key: a,
|
|
441
|
+
ref: d,
|
|
442
|
+
props: m,
|
|
443
|
+
// Record the component responsible for creating this element.
|
|
444
|
+
_owner: y
|
|
445
|
+
};
|
|
446
|
+
return g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
447
|
+
configurable: !1,
|
|
448
|
+
enumerable: !1,
|
|
449
|
+
writable: !0,
|
|
450
|
+
value: !1
|
|
451
|
+
}), Object.defineProperty(g, "_self", {
|
|
452
|
+
configurable: !1,
|
|
453
|
+
enumerable: !1,
|
|
454
|
+
writable: !1,
|
|
455
|
+
value: v
|
|
456
|
+
}), Object.defineProperty(g, "_source", {
|
|
457
|
+
configurable: !1,
|
|
458
|
+
enumerable: !1,
|
|
459
|
+
writable: !1,
|
|
460
|
+
value: x
|
|
461
|
+
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
462
|
+
};
|
|
463
|
+
function pr(r, a, d, v, x) {
|
|
464
|
+
{
|
|
465
|
+
var y, m = {}, g = null, R = null;
|
|
466
|
+
d !== void 0 && (Re(d), g = "" + d), cr(a) && (Re(a.key), g = "" + a.key), lr(a) && (R = a.ref, dr(a, x));
|
|
467
|
+
for (y in a)
|
|
468
|
+
O.call(a, y) && !ir.hasOwnProperty(y) && (m[y] = a[y]);
|
|
469
|
+
if (r && r.defaultProps) {
|
|
470
|
+
var k = r.defaultProps;
|
|
471
|
+
for (y in k)
|
|
472
|
+
m[y] === void 0 && (m[y] = k[y]);
|
|
473
|
+
}
|
|
474
|
+
if (g || R) {
|
|
475
|
+
var w = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
476
|
+
g && ur(m, w), R && fr(m, w);
|
|
477
|
+
}
|
|
478
|
+
return vr(r, g, R, x, v, Te.current, m);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
var se = W.ReactCurrentOwner, _e = W.ReactDebugCurrentFrame;
|
|
482
|
+
function A(r) {
|
|
483
|
+
if (r) {
|
|
484
|
+
var a = r._owner, d = G(r.type, r._source, a ? a.type : null);
|
|
485
|
+
_e.setExtraStackFrame(d);
|
|
486
|
+
} else
|
|
487
|
+
_e.setExtraStackFrame(null);
|
|
488
|
+
}
|
|
489
|
+
var ie;
|
|
490
|
+
ie = !1;
|
|
491
|
+
function le(r) {
|
|
492
|
+
return typeof r == "object" && r !== null && r.$$typeof === t;
|
|
493
|
+
}
|
|
494
|
+
function Ie() {
|
|
495
|
+
{
|
|
496
|
+
if (se.current) {
|
|
497
|
+
var r = I(se.current.type);
|
|
498
|
+
if (r)
|
|
499
|
+
return `
|
|
500
|
+
|
|
501
|
+
Check the render method of \`` + r + "`.";
|
|
502
|
+
}
|
|
503
|
+
return "";
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function gr(r) {
|
|
507
|
+
return "";
|
|
508
|
+
}
|
|
509
|
+
var Me = {};
|
|
510
|
+
function mr(r) {
|
|
511
|
+
{
|
|
512
|
+
var a = Ie();
|
|
513
|
+
if (!a) {
|
|
514
|
+
var d = typeof r == "string" ? r : r.displayName || r.name;
|
|
515
|
+
d && (a = `
|
|
516
|
+
|
|
517
|
+
Check the top-level render call using <` + d + ">.");
|
|
518
|
+
}
|
|
519
|
+
return a;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function De(r, a) {
|
|
523
|
+
{
|
|
524
|
+
if (!r._store || r._store.validated || r.key != null)
|
|
525
|
+
return;
|
|
526
|
+
r._store.validated = !0;
|
|
527
|
+
var d = mr(a);
|
|
528
|
+
if (Me[d])
|
|
529
|
+
return;
|
|
530
|
+
Me[d] = !0;
|
|
531
|
+
var v = "";
|
|
532
|
+
r && r._owner && r._owner !== se.current && (v = " It was passed a child from " + I(r._owner.type) + "."), A(r), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, v), A(null);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
function ze(r, a) {
|
|
536
|
+
{
|
|
537
|
+
if (typeof r != "object")
|
|
538
|
+
return;
|
|
539
|
+
if (ne(r))
|
|
540
|
+
for (var d = 0; d < r.length; d++) {
|
|
541
|
+
var v = r[d];
|
|
542
|
+
le(v) && De(v, a);
|
|
543
|
+
}
|
|
544
|
+
else if (le(r))
|
|
545
|
+
r._store && (r._store.validated = !0);
|
|
546
|
+
else if (r) {
|
|
547
|
+
var x = Ne(r);
|
|
548
|
+
if (typeof x == "function" && x !== r.entries)
|
|
549
|
+
for (var y = x.call(r), m; !(m = y.next()).done; )
|
|
550
|
+
le(m.value) && De(m.value, a);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
function xr(r) {
|
|
555
|
+
{
|
|
556
|
+
var a = r.type;
|
|
557
|
+
if (a == null || typeof a == "string")
|
|
558
|
+
return;
|
|
559
|
+
var d;
|
|
560
|
+
if (typeof a == "function")
|
|
561
|
+
d = a.propTypes;
|
|
562
|
+
else if (typeof a == "object" && (a.$$typeof === f || // Note: Memo only checks outer props here.
|
|
563
|
+
// Inner props are checked in the reconciler.
|
|
564
|
+
a.$$typeof === h))
|
|
565
|
+
d = a.propTypes;
|
|
566
|
+
else
|
|
567
|
+
return;
|
|
568
|
+
if (d) {
|
|
569
|
+
var v = I(a);
|
|
570
|
+
tr(d, r.props, "prop", v, r);
|
|
571
|
+
} else if (a.PropTypes !== void 0 && !ie) {
|
|
572
|
+
ie = !0;
|
|
573
|
+
var x = I(a);
|
|
574
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", x || "Unknown");
|
|
575
|
+
}
|
|
576
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
function yr(r) {
|
|
580
|
+
{
|
|
581
|
+
for (var a = Object.keys(r.props), d = 0; d < a.length; d++) {
|
|
582
|
+
var v = a[d];
|
|
583
|
+
if (v !== "children" && v !== "key") {
|
|
584
|
+
A(r), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), A(null);
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
r.ref !== null && (A(r), S("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
var Pe = {};
|
|
592
|
+
function We(r, a, d, v, x, y) {
|
|
593
|
+
{
|
|
594
|
+
var m = Ke(r);
|
|
595
|
+
if (!m) {
|
|
596
|
+
var g = "";
|
|
597
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
598
|
+
var R = gr();
|
|
599
|
+
R ? g += R : g += Ie();
|
|
600
|
+
var k;
|
|
601
|
+
r === null ? k = "null" : ne(r) ? k = "array" : r !== void 0 && r.$$typeof === t ? (k = "<" + (I(r.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : k = typeof r, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, g);
|
|
602
|
+
}
|
|
603
|
+
var w = pr(r, a, d, x, y);
|
|
604
|
+
if (w == null)
|
|
605
|
+
return w;
|
|
606
|
+
if (m) {
|
|
607
|
+
var E = a.children;
|
|
608
|
+
if (E !== void 0)
|
|
609
|
+
if (v)
|
|
610
|
+
if (ne(E)) {
|
|
611
|
+
for (var L = 0; L < E.length; L++)
|
|
612
|
+
ze(E[L], r);
|
|
613
|
+
Object.freeze && Object.freeze(E);
|
|
614
|
+
} else
|
|
615
|
+
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
616
|
+
else
|
|
617
|
+
ze(E, r);
|
|
618
|
+
}
|
|
619
|
+
if (O.call(a, "key")) {
|
|
620
|
+
var D = I(r), T = Object.keys(a).filter(function(Cr) {
|
|
621
|
+
return Cr !== "key";
|
|
622
|
+
}), ce = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
623
|
+
if (!Pe[D + ce]) {
|
|
624
|
+
var wr = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
|
|
625
|
+
S(`A props object containing a "key" prop is being spread into JSX:
|
|
626
|
+
let props = %s;
|
|
627
|
+
<%s {...props} />
|
|
628
|
+
React keys must be passed directly to JSX without using spread:
|
|
629
|
+
let props = %s;
|
|
630
|
+
<%s key={someKey} {...props} />`, ce, D, wr, D), Pe[D + ce] = !0;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return r === i ? yr(w) : xr(w), w;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
function hr(r, a, d) {
|
|
637
|
+
return We(r, a, d, !0);
|
|
638
|
+
}
|
|
639
|
+
function br(r, a, d) {
|
|
640
|
+
return We(r, a, d, !1);
|
|
641
|
+
}
|
|
642
|
+
var jr = br, kr = hr;
|
|
643
|
+
Y.Fragment = i, Y.jsx = jr, Y.jsxs = kr;
|
|
644
|
+
}()), Y;
|
|
645
|
+
}
|
|
646
|
+
process.env.NODE_ENV === "production" ? de.exports = Er() : de.exports = Fr();
|
|
647
|
+
var e = de.exports;
|
|
648
|
+
const Xr = ({
|
|
649
|
+
variant: o = "primary",
|
|
650
|
+
size: t = "md",
|
|
651
|
+
loading: s = !1,
|
|
652
|
+
icon: i,
|
|
653
|
+
children: n,
|
|
654
|
+
disabled: l,
|
|
655
|
+
...c
|
|
656
|
+
}) => {
|
|
657
|
+
const u = {
|
|
658
|
+
sm: { padding: "var(--space-xs) var(--space-sm)", fontSize: "0.85rem" },
|
|
659
|
+
md: { padding: "var(--space-sm) var(--space-md)", fontSize: "1rem" },
|
|
660
|
+
lg: { padding: "var(--space-md) var(--space-lg)", fontSize: "1.1rem" }
|
|
661
|
+
}, f = {
|
|
662
|
+
primary: {
|
|
663
|
+
backgroundColor: "var(--primary-color)",
|
|
664
|
+
color: "var(--surface-light)",
|
|
665
|
+
border: "2px solid var(--primary-color)",
|
|
666
|
+
boxShadow: "2px 2px 0 var(--secondary-color)"
|
|
667
|
+
},
|
|
668
|
+
secondary: {
|
|
669
|
+
backgroundColor: "var(--secondary-color)",
|
|
670
|
+
color: "var(--surface-light)",
|
|
671
|
+
border: "2px solid var(--secondary-color)",
|
|
672
|
+
boxShadow: "2px 2px 0 var(--primary-color)"
|
|
673
|
+
},
|
|
674
|
+
outline: {
|
|
675
|
+
backgroundColor: "transparent",
|
|
676
|
+
color: "var(--primary-color)",
|
|
677
|
+
border: "2px solid var(--primary-color)",
|
|
678
|
+
boxShadow: "none"
|
|
679
|
+
},
|
|
680
|
+
ghost: {
|
|
681
|
+
backgroundColor: "transparent",
|
|
682
|
+
color: "var(--text-color)",
|
|
683
|
+
border: "2px solid transparent",
|
|
684
|
+
boxShadow: "none"
|
|
685
|
+
},
|
|
686
|
+
danger: {
|
|
687
|
+
backgroundColor: "var(--danger-color)",
|
|
688
|
+
color: "var(--surface-light)",
|
|
689
|
+
border: "2px solid var(--danger-color)",
|
|
690
|
+
boxShadow: "2px 2px 0 rgba(0,0,0,0.2)"
|
|
691
|
+
}
|
|
692
|
+
}, j = {
|
|
693
|
+
...u[t],
|
|
694
|
+
...f[o],
|
|
695
|
+
borderRadius: "var(--radius-md)",
|
|
696
|
+
fontFamily: "var(--font-sans)",
|
|
697
|
+
fontWeight: 600,
|
|
698
|
+
cursor: l || s ? "not-allowed" : "pointer",
|
|
699
|
+
opacity: l ? 0.5 : 1,
|
|
700
|
+
display: "inline-flex",
|
|
701
|
+
alignItems: "center",
|
|
702
|
+
justifyContent: "center",
|
|
703
|
+
gap: "var(--space-sm)",
|
|
704
|
+
transition: "transform var(--transition-fast), box-shadow var(--transition-fast)",
|
|
705
|
+
outline: "none"
|
|
706
|
+
};
|
|
707
|
+
return /* @__PURE__ */ e.jsxs(
|
|
708
|
+
"button",
|
|
709
|
+
{
|
|
710
|
+
...c,
|
|
711
|
+
disabled: l || s,
|
|
712
|
+
style: { ...j, ...c.style },
|
|
713
|
+
onMouseDown: (p) => {
|
|
714
|
+
var h;
|
|
715
|
+
!l && !s && (p.currentTarget.style.transform = "translate(2px, 2px)", p.currentTarget.style.boxShadow = "none"), (h = c.onMouseDown) == null || h.call(c, p);
|
|
716
|
+
},
|
|
717
|
+
onMouseUp: (p) => {
|
|
718
|
+
var h;
|
|
719
|
+
p.currentTarget.style.transform = "translate(0, 0)", p.currentTarget.style.boxShadow = f[o].boxShadow || "none", (h = c.onMouseUp) == null || h.call(c, p);
|
|
720
|
+
},
|
|
721
|
+
onMouseLeave: (p) => {
|
|
722
|
+
var h;
|
|
723
|
+
p.currentTarget.style.transform = "translate(0, 0)", p.currentTarget.style.boxShadow = f[o].boxShadow || "none", (h = c.onMouseLeave) == null || h.call(c, p);
|
|
724
|
+
},
|
|
725
|
+
children: [
|
|
726
|
+
s ? /* @__PURE__ */ e.jsx(_r, { size: 16 }) : i,
|
|
727
|
+
n
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
}, _r = ({ size: o }) => /* @__PURE__ */ e.jsxs("svg", { width: o, height: o, viewBox: "0 0 24 24", style: { animation: "spin 0.8s linear infinite" }, children: [
|
|
732
|
+
/* @__PURE__ */ e.jsx(
|
|
733
|
+
"circle",
|
|
734
|
+
{
|
|
735
|
+
cx: "12",
|
|
736
|
+
cy: "12",
|
|
737
|
+
r: "10",
|
|
738
|
+
fill: "none",
|
|
739
|
+
stroke: "currentColor",
|
|
740
|
+
strokeWidth: "3",
|
|
741
|
+
strokeDasharray: "31.4 31.4",
|
|
742
|
+
strokeLinecap: "round"
|
|
743
|
+
}
|
|
744
|
+
),
|
|
745
|
+
/* @__PURE__ */ e.jsx("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
|
|
746
|
+
] }), qr = ({
|
|
747
|
+
title: o,
|
|
748
|
+
subtitle: t,
|
|
749
|
+
children: s,
|
|
750
|
+
hoverable: i = !1,
|
|
751
|
+
padding: n = "lg",
|
|
752
|
+
className: l,
|
|
753
|
+
style: c,
|
|
754
|
+
onClick: u
|
|
755
|
+
}) => {
|
|
756
|
+
const f = {
|
|
757
|
+
none: "0",
|
|
758
|
+
sm: "var(--space-sm)",
|
|
759
|
+
md: "var(--space-md)",
|
|
760
|
+
lg: "var(--space-lg)"
|
|
761
|
+
};
|
|
762
|
+
return /* @__PURE__ */ e.jsxs(
|
|
763
|
+
"div",
|
|
764
|
+
{
|
|
765
|
+
className: l,
|
|
766
|
+
onClick: u,
|
|
767
|
+
style: {
|
|
768
|
+
backgroundColor: "var(--bg-color)",
|
|
769
|
+
borderRadius: "var(--radius-md)",
|
|
770
|
+
padding: f[n],
|
|
771
|
+
border: "2px solid var(--border-color)",
|
|
772
|
+
display: "flex",
|
|
773
|
+
flexDirection: "column",
|
|
774
|
+
gap: "var(--space-md)",
|
|
775
|
+
transition: "transform var(--transition-fast), box-shadow var(--transition-fast)",
|
|
776
|
+
cursor: u ? "pointer" : "default",
|
|
777
|
+
...c
|
|
778
|
+
},
|
|
779
|
+
onMouseEnter: (j) => {
|
|
780
|
+
i && (j.currentTarget.style.transform = "translateY(-4px)", j.currentTarget.style.boxShadow = "var(--shadow-lg)");
|
|
781
|
+
},
|
|
782
|
+
onMouseLeave: (j) => {
|
|
783
|
+
i && (j.currentTarget.style.transform = "translateY(0)", j.currentTarget.style.boxShadow = "none");
|
|
784
|
+
},
|
|
785
|
+
children: [
|
|
786
|
+
(o || t) && /* @__PURE__ */ e.jsxs("div", { style: { borderBottom: "1px solid var(--border-color)", paddingBottom: "var(--space-sm)" }, children: [
|
|
787
|
+
o && /* @__PURE__ */ e.jsx("h3", { style: {
|
|
788
|
+
margin: 0,
|
|
789
|
+
fontFamily: "var(--font-serif)",
|
|
790
|
+
fontSize: "1.25rem",
|
|
791
|
+
fontWeight: 700,
|
|
792
|
+
color: "var(--primary-color)"
|
|
793
|
+
}, children: o }),
|
|
794
|
+
t && /* @__PURE__ */ e.jsx("p", { style: {
|
|
795
|
+
margin: "var(--space-xs) 0 0",
|
|
796
|
+
fontFamily: "var(--font-sans)",
|
|
797
|
+
fontSize: "0.9rem",
|
|
798
|
+
color: "var(--text-color)",
|
|
799
|
+
opacity: 0.7
|
|
800
|
+
}, children: t })
|
|
801
|
+
] }),
|
|
802
|
+
/* @__PURE__ */ e.jsx("div", { style: { fontFamily: "var(--font-sans)", lineHeight: 1.6 }, children: s })
|
|
803
|
+
]
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
}, Jr = ({
|
|
807
|
+
children: o,
|
|
808
|
+
variant: t = "default",
|
|
809
|
+
size: s = "md"
|
|
810
|
+
}) => {
|
|
811
|
+
const i = {
|
|
812
|
+
sm: { padding: "2px var(--space-xs)", fontSize: "0.7rem" },
|
|
813
|
+
md: { padding: "var(--space-xs) var(--space-sm)", fontSize: "0.8rem" }
|
|
814
|
+
}, n = {
|
|
815
|
+
default: {
|
|
816
|
+
backgroundColor: "var(--secondary-color)",
|
|
817
|
+
color: "var(--surface-light)"
|
|
818
|
+
},
|
|
819
|
+
primary: {
|
|
820
|
+
backgroundColor: "var(--primary-color)",
|
|
821
|
+
color: "var(--surface-light)"
|
|
822
|
+
},
|
|
823
|
+
secondary: {
|
|
824
|
+
backgroundColor: "var(--accent-color)",
|
|
825
|
+
color: "var(--primary-color)"
|
|
826
|
+
},
|
|
827
|
+
success: {
|
|
828
|
+
backgroundColor: "var(--success-color)",
|
|
829
|
+
color: "var(--surface-light)"
|
|
830
|
+
},
|
|
831
|
+
warning: {
|
|
832
|
+
backgroundColor: "var(--warning-color)",
|
|
833
|
+
color: "var(--surface-dark)"
|
|
834
|
+
},
|
|
835
|
+
danger: {
|
|
836
|
+
backgroundColor: "var(--danger-color)",
|
|
837
|
+
color: "var(--surface-light)"
|
|
838
|
+
},
|
|
839
|
+
outline: {
|
|
840
|
+
backgroundColor: "transparent",
|
|
841
|
+
color: "var(--primary-color)",
|
|
842
|
+
border: "1px solid var(--primary-color)"
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
return /* @__PURE__ */ e.jsx(
|
|
846
|
+
"span",
|
|
847
|
+
{
|
|
848
|
+
style: {
|
|
849
|
+
...i[s],
|
|
850
|
+
...n[t],
|
|
851
|
+
borderRadius: "var(--radius-full)",
|
|
852
|
+
fontFamily: "var(--font-sans)",
|
|
853
|
+
fontWeight: 600,
|
|
854
|
+
display: "inline-flex",
|
|
855
|
+
alignItems: "center",
|
|
856
|
+
justifyContent: "center",
|
|
857
|
+
whiteSpace: "nowrap",
|
|
858
|
+
lineHeight: 1,
|
|
859
|
+
textTransform: "uppercase",
|
|
860
|
+
letterSpacing: "0.03em"
|
|
861
|
+
},
|
|
862
|
+
children: o
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
}, Kr = ({
|
|
866
|
+
label: o,
|
|
867
|
+
error: t,
|
|
868
|
+
hint: s,
|
|
869
|
+
icon: i,
|
|
870
|
+
...n
|
|
871
|
+
}) => {
|
|
872
|
+
const l = !!t;
|
|
873
|
+
return /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: "var(--space-md)", width: "100%" }, children: [
|
|
874
|
+
o && /* @__PURE__ */ e.jsx("label", { style: {
|
|
875
|
+
display: "block",
|
|
876
|
+
marginBottom: "var(--space-xs)",
|
|
877
|
+
fontFamily: "var(--font-sans)",
|
|
878
|
+
fontSize: "0.9rem",
|
|
879
|
+
fontWeight: 600,
|
|
880
|
+
color: "var(--text-color)"
|
|
881
|
+
}, children: o }),
|
|
882
|
+
/* @__PURE__ */ e.jsxs("div", { style: { position: "relative" }, children: [
|
|
883
|
+
i && /* @__PURE__ */ e.jsx("span", { style: {
|
|
884
|
+
position: "absolute",
|
|
885
|
+
left: "var(--space-sm)",
|
|
886
|
+
top: "50%",
|
|
887
|
+
transform: "translateY(-50%)",
|
|
888
|
+
color: "var(--text-color)",
|
|
889
|
+
opacity: 0.5
|
|
890
|
+
}, children: i }),
|
|
891
|
+
/* @__PURE__ */ e.jsx(
|
|
892
|
+
"input",
|
|
893
|
+
{
|
|
894
|
+
...n,
|
|
895
|
+
style: {
|
|
896
|
+
width: "100%",
|
|
897
|
+
padding: i ? "var(--space-sm) var(--space-sm) var(--space-sm) var(--space-xl)" : "var(--space-sm) var(--space-md)",
|
|
898
|
+
borderRadius: "var(--radius-md)",
|
|
899
|
+
border: `2px solid ${l ? "var(--danger-color)" : "var(--border-color)"}`,
|
|
900
|
+
fontFamily: "var(--font-sans)",
|
|
901
|
+
fontSize: "1rem",
|
|
902
|
+
backgroundColor: "var(--bg-color)",
|
|
903
|
+
color: "var(--text-color)",
|
|
904
|
+
boxSizing: "border-box",
|
|
905
|
+
transition: "border-color var(--transition-fast), box-shadow var(--transition-fast)",
|
|
906
|
+
outline: "none",
|
|
907
|
+
...n.style
|
|
908
|
+
},
|
|
909
|
+
onFocus: (c) => {
|
|
910
|
+
var u;
|
|
911
|
+
c.currentTarget.style.borderColor = l ? "var(--danger-color)" : "var(--primary-color)", c.currentTarget.style.boxShadow = `0 0 0 3px ${l ? "rgba(229, 62, 62, 0.2)" : "rgba(26, 54, 93, 0.2)"}`, (u = n.onFocus) == null || u.call(n, c);
|
|
912
|
+
},
|
|
913
|
+
onBlur: (c) => {
|
|
914
|
+
var u;
|
|
915
|
+
c.currentTarget.style.borderColor = l ? "var(--danger-color)" : "var(--border-color)", c.currentTarget.style.boxShadow = "none", (u = n.onBlur) == null || u.call(n, c);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
)
|
|
919
|
+
] }),
|
|
920
|
+
(t || s) && /* @__PURE__ */ e.jsx("p", { style: {
|
|
921
|
+
margin: "var(--space-xs) 0 0",
|
|
922
|
+
fontFamily: "var(--font-sans)",
|
|
923
|
+
fontSize: "0.8rem",
|
|
924
|
+
color: t ? "var(--danger-color)" : "var(--text-color)",
|
|
925
|
+
opacity: t ? 1 : 0.6
|
|
926
|
+
}, children: t || s })
|
|
927
|
+
] });
|
|
928
|
+
};
|
|
929
|
+
function Gr({
|
|
930
|
+
columns: o,
|
|
931
|
+
data: t,
|
|
932
|
+
keyExtractor: s,
|
|
933
|
+
onRowClick: i,
|
|
934
|
+
emptyMessage: n = "No data available",
|
|
935
|
+
striped: l = !0
|
|
936
|
+
}) {
|
|
937
|
+
return /* @__PURE__ */ e.jsx("div", { style: {
|
|
938
|
+
overflowX: "auto",
|
|
939
|
+
border: "2px solid var(--border-color)",
|
|
940
|
+
borderRadius: "var(--radius-md)"
|
|
941
|
+
}, children: /* @__PURE__ */ e.jsxs("table", { style: {
|
|
942
|
+
width: "100%",
|
|
943
|
+
borderCollapse: "collapse",
|
|
944
|
+
fontFamily: "var(--font-sans)"
|
|
945
|
+
}, children: [
|
|
946
|
+
/* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsx("tr", { style: { backgroundColor: "var(--secondary-color)" }, children: o.map((c) => /* @__PURE__ */ e.jsx(
|
|
947
|
+
"th",
|
|
948
|
+
{
|
|
949
|
+
style: {
|
|
950
|
+
padding: "var(--space-md)",
|
|
951
|
+
textAlign: c.align || "left",
|
|
952
|
+
fontWeight: 600,
|
|
953
|
+
fontSize: "0.9rem",
|
|
954
|
+
color: "var(--surface-light)",
|
|
955
|
+
width: c.width,
|
|
956
|
+
whiteSpace: "nowrap"
|
|
957
|
+
},
|
|
958
|
+
children: c.header
|
|
959
|
+
},
|
|
960
|
+
String(c.key)
|
|
961
|
+
)) }) }),
|
|
962
|
+
/* @__PURE__ */ e.jsx("tbody", { children: t.length === 0 ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx(
|
|
963
|
+
"td",
|
|
964
|
+
{
|
|
965
|
+
colSpan: o.length,
|
|
966
|
+
style: {
|
|
967
|
+
padding: "var(--space-xl)",
|
|
968
|
+
textAlign: "center",
|
|
969
|
+
color: "var(--text-color)",
|
|
970
|
+
opacity: 0.6
|
|
971
|
+
},
|
|
972
|
+
children: n
|
|
973
|
+
}
|
|
974
|
+
) }) : t.map((c, u) => /* @__PURE__ */ e.jsx(
|
|
975
|
+
"tr",
|
|
976
|
+
{
|
|
977
|
+
onClick: () => i == null ? void 0 : i(c),
|
|
978
|
+
style: {
|
|
979
|
+
backgroundColor: l && u % 2 === 1 ? "var(--secondary-color)" : "transparent",
|
|
980
|
+
cursor: i ? "pointer" : "default",
|
|
981
|
+
transition: "background-color var(--transition-fast)"
|
|
982
|
+
},
|
|
983
|
+
onMouseEnter: (f) => {
|
|
984
|
+
i && (f.currentTarget.style.backgroundColor = "var(--accent-color)");
|
|
985
|
+
},
|
|
986
|
+
onMouseLeave: (f) => {
|
|
987
|
+
f.currentTarget.style.backgroundColor = l && u % 2 === 1 ? "var(--secondary-color)" : "transparent";
|
|
988
|
+
},
|
|
989
|
+
children: o.map((f) => /* @__PURE__ */ e.jsx(
|
|
990
|
+
"td",
|
|
991
|
+
{
|
|
992
|
+
style: {
|
|
993
|
+
padding: "var(--space-md)",
|
|
994
|
+
textAlign: f.align || "left",
|
|
995
|
+
color: "var(--text-color)",
|
|
996
|
+
borderBottom: "1px solid var(--border-color)"
|
|
997
|
+
},
|
|
998
|
+
children: f.render ? f.render(c) : String(c[f.key] ?? "")
|
|
999
|
+
},
|
|
1000
|
+
String(f.key)
|
|
1001
|
+
))
|
|
1002
|
+
},
|
|
1003
|
+
s(c)
|
|
1004
|
+
)) })
|
|
1005
|
+
] }) });
|
|
1006
|
+
}
|
|
1007
|
+
const Qr = ({
|
|
1008
|
+
open: o,
|
|
1009
|
+
onClose: t,
|
|
1010
|
+
title: s,
|
|
1011
|
+
children: i,
|
|
1012
|
+
size: n = "md",
|
|
1013
|
+
showCloseButton: l = !0
|
|
1014
|
+
}) => {
|
|
1015
|
+
if (N(() => {
|
|
1016
|
+
const u = (f) => {
|
|
1017
|
+
f.key === "Escape" && t();
|
|
1018
|
+
};
|
|
1019
|
+
return o && (document.addEventListener("keydown", u), document.body.style.overflow = "hidden"), () => {
|
|
1020
|
+
document.removeEventListener("keydown", u), document.body.style.overflow = "";
|
|
1021
|
+
};
|
|
1022
|
+
}, [o, t]), !o) return null;
|
|
1023
|
+
const c = {
|
|
1024
|
+
sm: "400px",
|
|
1025
|
+
md: "560px",
|
|
1026
|
+
lg: "800px"
|
|
1027
|
+
};
|
|
1028
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1029
|
+
"div",
|
|
1030
|
+
{
|
|
1031
|
+
role: "dialog",
|
|
1032
|
+
"aria-modal": "true",
|
|
1033
|
+
"aria-labelledby": s ? "modal-title" : void 0,
|
|
1034
|
+
style: {
|
|
1035
|
+
position: "fixed",
|
|
1036
|
+
top: 0,
|
|
1037
|
+
left: 0,
|
|
1038
|
+
right: 0,
|
|
1039
|
+
bottom: 0,
|
|
1040
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1041
|
+
display: "flex",
|
|
1042
|
+
alignItems: "center",
|
|
1043
|
+
justifyContent: "center",
|
|
1044
|
+
zIndex: 1e3,
|
|
1045
|
+
padding: "var(--space-md)",
|
|
1046
|
+
animation: "fadeIn 0.2s ease"
|
|
1047
|
+
},
|
|
1048
|
+
onClick: t,
|
|
1049
|
+
children: [
|
|
1050
|
+
/* @__PURE__ */ e.jsxs(
|
|
1051
|
+
"div",
|
|
1052
|
+
{
|
|
1053
|
+
style: {
|
|
1054
|
+
backgroundColor: "var(--bg-color)",
|
|
1055
|
+
borderRadius: "var(--radius-lg)",
|
|
1056
|
+
border: "2px solid var(--border-color)",
|
|
1057
|
+
boxShadow: "var(--shadow-lg)",
|
|
1058
|
+
width: "100%",
|
|
1059
|
+
maxWidth: c[n],
|
|
1060
|
+
maxHeight: "90vh",
|
|
1061
|
+
overflow: "hidden",
|
|
1062
|
+
display: "flex",
|
|
1063
|
+
flexDirection: "column",
|
|
1064
|
+
animation: "slideUp 0.2s ease"
|
|
1065
|
+
},
|
|
1066
|
+
onClick: (u) => u.stopPropagation(),
|
|
1067
|
+
children: [
|
|
1068
|
+
(s || l) && /* @__PURE__ */ e.jsxs("div", { style: {
|
|
1069
|
+
display: "flex",
|
|
1070
|
+
alignItems: "center",
|
|
1071
|
+
justifyContent: "space-between",
|
|
1072
|
+
padding: "var(--space-md) var(--space-lg)",
|
|
1073
|
+
borderBottom: "1px solid var(--border-color)"
|
|
1074
|
+
}, children: [
|
|
1075
|
+
s && /* @__PURE__ */ e.jsx(
|
|
1076
|
+
"h2",
|
|
1077
|
+
{
|
|
1078
|
+
id: "modal-title",
|
|
1079
|
+
style: {
|
|
1080
|
+
margin: 0,
|
|
1081
|
+
fontFamily: "var(--font-serif)",
|
|
1082
|
+
fontSize: "1.25rem",
|
|
1083
|
+
fontWeight: 700,
|
|
1084
|
+
color: "var(--text-color)"
|
|
1085
|
+
},
|
|
1086
|
+
children: s
|
|
1087
|
+
}
|
|
1088
|
+
),
|
|
1089
|
+
l && /* @__PURE__ */ e.jsx(
|
|
1090
|
+
"button",
|
|
1091
|
+
{
|
|
1092
|
+
onClick: t,
|
|
1093
|
+
"aria-label": "Close modal",
|
|
1094
|
+
style: {
|
|
1095
|
+
background: "none",
|
|
1096
|
+
border: "none",
|
|
1097
|
+
cursor: "pointer",
|
|
1098
|
+
padding: "var(--space-xs)",
|
|
1099
|
+
borderRadius: "var(--radius-sm)",
|
|
1100
|
+
color: "var(--text-color)",
|
|
1101
|
+
opacity: 0.7,
|
|
1102
|
+
transition: "opacity var(--transition-fast)"
|
|
1103
|
+
},
|
|
1104
|
+
onMouseEnter: (u) => u.currentTarget.style.opacity = "1",
|
|
1105
|
+
onMouseLeave: (u) => u.currentTarget.style.opacity = "0.7",
|
|
1106
|
+
children: /* @__PURE__ */ e.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
|
|
1107
|
+
}
|
|
1108
|
+
)
|
|
1109
|
+
] }),
|
|
1110
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
1111
|
+
padding: "var(--space-lg)",
|
|
1112
|
+
overflowY: "auto",
|
|
1113
|
+
flex: 1
|
|
1114
|
+
}, children: i })
|
|
1115
|
+
]
|
|
1116
|
+
}
|
|
1117
|
+
),
|
|
1118
|
+
/* @__PURE__ */ e.jsx("style", { children: `
|
|
1119
|
+
@keyframes fadeIn {
|
|
1120
|
+
from { opacity: 0; }
|
|
1121
|
+
to { opacity: 1; }
|
|
1122
|
+
}
|
|
1123
|
+
@keyframes slideUp {
|
|
1124
|
+
from { opacity: 0; transform: translateY(20px); }
|
|
1125
|
+
to { opacity: 1; transform: translateY(0); }
|
|
1126
|
+
}
|
|
1127
|
+
` })
|
|
1128
|
+
]
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1131
|
+
}, Zr = ({
|
|
1132
|
+
children: o,
|
|
1133
|
+
variant: t = "info",
|
|
1134
|
+
title: s,
|
|
1135
|
+
dismissible: i = !1,
|
|
1136
|
+
onDismiss: n
|
|
1137
|
+
}) => {
|
|
1138
|
+
const c = {
|
|
1139
|
+
info: {
|
|
1140
|
+
backgroundColor: "rgba(49, 130, 206, 0.1)",
|
|
1141
|
+
borderColor: "var(--info-color)",
|
|
1142
|
+
iconColor: "var(--info-color)",
|
|
1143
|
+
icon: "ℹ️"
|
|
1144
|
+
},
|
|
1145
|
+
success: {
|
|
1146
|
+
backgroundColor: "rgba(56, 161, 105, 0.1)",
|
|
1147
|
+
borderColor: "var(--success-color)",
|
|
1148
|
+
iconColor: "var(--success-color)",
|
|
1149
|
+
icon: "✓"
|
|
1150
|
+
},
|
|
1151
|
+
warning: {
|
|
1152
|
+
backgroundColor: "rgba(214, 158, 46, 0.1)",
|
|
1153
|
+
borderColor: "var(--warning-color)",
|
|
1154
|
+
iconColor: "var(--warning-color)",
|
|
1155
|
+
icon: "⚠"
|
|
1156
|
+
},
|
|
1157
|
+
danger: {
|
|
1158
|
+
backgroundColor: "rgba(229, 62, 62, 0.1)",
|
|
1159
|
+
borderColor: "var(--danger-color)",
|
|
1160
|
+
iconColor: "var(--danger-color)",
|
|
1161
|
+
icon: "✕"
|
|
1162
|
+
}
|
|
1163
|
+
}[t];
|
|
1164
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1165
|
+
"div",
|
|
1166
|
+
{
|
|
1167
|
+
role: "alert",
|
|
1168
|
+
style: {
|
|
1169
|
+
backgroundColor: c.backgroundColor,
|
|
1170
|
+
borderLeft: `4px solid ${c.borderColor}`,
|
|
1171
|
+
borderRadius: "var(--radius-md)",
|
|
1172
|
+
padding: "var(--space-md) var(--space-lg)",
|
|
1173
|
+
display: "flex",
|
|
1174
|
+
alignItems: "flex-start",
|
|
1175
|
+
gap: "var(--space-md)",
|
|
1176
|
+
margin: "var(--space-md) 0"
|
|
1177
|
+
},
|
|
1178
|
+
children: [
|
|
1179
|
+
/* @__PURE__ */ e.jsx("span", { style: {
|
|
1180
|
+
fontSize: "1.2rem",
|
|
1181
|
+
lineHeight: 1,
|
|
1182
|
+
flexShrink: 0
|
|
1183
|
+
}, children: c.icon }),
|
|
1184
|
+
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
|
|
1185
|
+
s && /* @__PURE__ */ e.jsx("h4", { style: {
|
|
1186
|
+
margin: "0 0 var(--space-xs)",
|
|
1187
|
+
fontFamily: "var(--font-sans)",
|
|
1188
|
+
fontWeight: 600,
|
|
1189
|
+
fontSize: "1rem",
|
|
1190
|
+
color: "var(--text-color)"
|
|
1191
|
+
}, children: s }),
|
|
1192
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
1193
|
+
fontFamily: "var(--font-sans)",
|
|
1194
|
+
fontSize: "0.95rem",
|
|
1195
|
+
color: "var(--text-color)",
|
|
1196
|
+
lineHeight: 1.5
|
|
1197
|
+
}, children: o })
|
|
1198
|
+
] }),
|
|
1199
|
+
i && /* @__PURE__ */ e.jsx(
|
|
1200
|
+
"button",
|
|
1201
|
+
{
|
|
1202
|
+
onClick: n,
|
|
1203
|
+
"aria-label": "Dismiss",
|
|
1204
|
+
style: {
|
|
1205
|
+
background: "none",
|
|
1206
|
+
border: "none",
|
|
1207
|
+
cursor: "pointer",
|
|
1208
|
+
padding: "var(--space-xs)",
|
|
1209
|
+
color: "var(--text-color)",
|
|
1210
|
+
opacity: 0.5,
|
|
1211
|
+
transition: "opacity var(--transition-fast)",
|
|
1212
|
+
flexShrink: 0
|
|
1213
|
+
},
|
|
1214
|
+
onMouseEnter: (u) => u.currentTarget.style.opacity = "1",
|
|
1215
|
+
onMouseLeave: (u) => u.currentTarget.style.opacity = "0.5",
|
|
1216
|
+
children: "✕"
|
|
1217
|
+
}
|
|
1218
|
+
)
|
|
1219
|
+
]
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
}, eo = ({
|
|
1223
|
+
tabs: o,
|
|
1224
|
+
activeTab: t,
|
|
1225
|
+
onTabChange: s,
|
|
1226
|
+
variant: i = "underline"
|
|
1227
|
+
}) => {
|
|
1228
|
+
const n = i === "underline";
|
|
1229
|
+
return /* @__PURE__ */ e.jsxs("div", { style: { width: "100%" }, children: [
|
|
1230
|
+
/* @__PURE__ */ e.jsx(
|
|
1231
|
+
"div",
|
|
1232
|
+
{
|
|
1233
|
+
role: "tablist",
|
|
1234
|
+
style: {
|
|
1235
|
+
display: "flex",
|
|
1236
|
+
gap: n ? "var(--space-md)" : "var(--space-xs)",
|
|
1237
|
+
borderBottom: n ? "2px solid var(--border-color)" : "none",
|
|
1238
|
+
padding: n ? "0" : "var(--space-xs)",
|
|
1239
|
+
backgroundColor: n ? "transparent" : "var(--secondary-color)",
|
|
1240
|
+
borderRadius: n ? "0" : "var(--radius-md)"
|
|
1241
|
+
},
|
|
1242
|
+
children: o.map((l) => {
|
|
1243
|
+
const c = l.id === t;
|
|
1244
|
+
return /* @__PURE__ */ e.jsx(
|
|
1245
|
+
"button",
|
|
1246
|
+
{
|
|
1247
|
+
role: "tab",
|
|
1248
|
+
"aria-selected": c,
|
|
1249
|
+
"aria-controls": `panel-${l.id}`,
|
|
1250
|
+
disabled: l.disabled,
|
|
1251
|
+
onClick: () => !l.disabled && s(l.id),
|
|
1252
|
+
style: {
|
|
1253
|
+
background: n ? "none" : c ? "var(--primary-color)" : "transparent",
|
|
1254
|
+
border: "none",
|
|
1255
|
+
borderBottom: n && c ? "3px solid var(--primary-color)" : "none",
|
|
1256
|
+
marginBottom: n ? "-2px" : "0",
|
|
1257
|
+
padding: "var(--space-sm) var(--space-md)",
|
|
1258
|
+
borderRadius: n ? "0" : "var(--radius-sm)",
|
|
1259
|
+
fontFamily: "var(--font-sans)",
|
|
1260
|
+
fontWeight: 600,
|
|
1261
|
+
fontSize: "0.95rem",
|
|
1262
|
+
color: c ? n ? "var(--primary-color)" : "var(--surface-light)" : "var(--text-color)",
|
|
1263
|
+
opacity: l.disabled ? 0.5 : 1,
|
|
1264
|
+
cursor: l.disabled ? "not-allowed" : "pointer",
|
|
1265
|
+
transition: "all var(--transition-fast)"
|
|
1266
|
+
},
|
|
1267
|
+
onMouseEnter: (u) => {
|
|
1268
|
+
!l.disabled && !c && (u.currentTarget.style.backgroundColor = n ? "rgba(0,0,0,0.05)" : "var(--accent-color)");
|
|
1269
|
+
},
|
|
1270
|
+
onMouseLeave: (u) => {
|
|
1271
|
+
!l.disabled && !c && (u.currentTarget.style.backgroundColor = "transparent");
|
|
1272
|
+
},
|
|
1273
|
+
children: l.label
|
|
1274
|
+
},
|
|
1275
|
+
l.id
|
|
1276
|
+
);
|
|
1277
|
+
})
|
|
1278
|
+
}
|
|
1279
|
+
),
|
|
1280
|
+
/* @__PURE__ */ e.jsx("div", { style: { marginTop: "var(--space-lg)" }, children: o.map((l) => /* @__PURE__ */ e.jsx(
|
|
1281
|
+
"div",
|
|
1282
|
+
{
|
|
1283
|
+
id: `panel-${l.id}`,
|
|
1284
|
+
role: "tabpanel",
|
|
1285
|
+
hidden: l.id !== t,
|
|
1286
|
+
style: {
|
|
1287
|
+
display: l.id === t ? "block" : "none"
|
|
1288
|
+
},
|
|
1289
|
+
children: l.content
|
|
1290
|
+
},
|
|
1291
|
+
l.id
|
|
1292
|
+
)) })
|
|
1293
|
+
] });
|
|
1294
|
+
}, ro = ({
|
|
1295
|
+
content: o,
|
|
1296
|
+
children: t,
|
|
1297
|
+
position: s = "top",
|
|
1298
|
+
delay: i = 200
|
|
1299
|
+
}) => {
|
|
1300
|
+
const [n, l] = P(!1), c = Ae(null), u = Ae(), f = () => {
|
|
1301
|
+
u.current = window.setTimeout(() => {
|
|
1302
|
+
l(!0);
|
|
1303
|
+
}, i);
|
|
1304
|
+
}, j = () => {
|
|
1305
|
+
u.current && clearTimeout(u.current), l(!1);
|
|
1306
|
+
};
|
|
1307
|
+
N(() => () => {
|
|
1308
|
+
u.current && clearTimeout(u.current);
|
|
1309
|
+
}, []);
|
|
1310
|
+
const p = {
|
|
1311
|
+
top: { bottom: "100%", left: "50%", transform: "translateX(-50%) translateY(-8px)" },
|
|
1312
|
+
bottom: { top: "100%", left: "50%", transform: "translateX(-50%) translateY(8px)" },
|
|
1313
|
+
left: { right: "100%", top: "50%", transform: "translateY(-50%) translateX(-8px)" },
|
|
1314
|
+
right: { left: "100%", top: "50%", transform: "translateY(-50%) translateX(8px)" }
|
|
1315
|
+
};
|
|
1316
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1317
|
+
"span",
|
|
1318
|
+
{
|
|
1319
|
+
ref: c,
|
|
1320
|
+
style: { position: "relative", display: "inline-block" },
|
|
1321
|
+
onMouseEnter: f,
|
|
1322
|
+
onMouseLeave: j,
|
|
1323
|
+
onFocus: f,
|
|
1324
|
+
onBlur: j,
|
|
1325
|
+
children: [
|
|
1326
|
+
t,
|
|
1327
|
+
n && /* @__PURE__ */ e.jsxs(
|
|
1328
|
+
"span",
|
|
1329
|
+
{
|
|
1330
|
+
role: "tooltip",
|
|
1331
|
+
style: {
|
|
1332
|
+
position: "absolute",
|
|
1333
|
+
...p[s],
|
|
1334
|
+
backgroundColor: "var(--secondary-color)",
|
|
1335
|
+
color: "var(--surface-light)",
|
|
1336
|
+
padding: "var(--space-xs) var(--space-sm)",
|
|
1337
|
+
borderRadius: "var(--radius-sm)",
|
|
1338
|
+
fontFamily: "var(--font-sans)",
|
|
1339
|
+
fontSize: "0.85rem",
|
|
1340
|
+
whiteSpace: "nowrap",
|
|
1341
|
+
zIndex: 1e3,
|
|
1342
|
+
boxShadow: "var(--shadow-md)",
|
|
1343
|
+
pointerEvents: "none",
|
|
1344
|
+
animation: "tooltipFadeIn 0.15s ease"
|
|
1345
|
+
},
|
|
1346
|
+
children: [
|
|
1347
|
+
o,
|
|
1348
|
+
/* @__PURE__ */ e.jsx("style", { children: `
|
|
1349
|
+
@keyframes tooltipFadeIn {
|
|
1350
|
+
from { opacity: 0; }
|
|
1351
|
+
to { opacity: 1; }
|
|
1352
|
+
}
|
|
1353
|
+
` })
|
|
1354
|
+
]
|
|
1355
|
+
}
|
|
1356
|
+
)
|
|
1357
|
+
]
|
|
1358
|
+
}
|
|
1359
|
+
);
|
|
1360
|
+
}, Ir = ({
|
|
1361
|
+
size: o = "md",
|
|
1362
|
+
color: t = "var(--primary-color)"
|
|
1363
|
+
}) => {
|
|
1364
|
+
const i = {
|
|
1365
|
+
sm: 20,
|
|
1366
|
+
md: 32,
|
|
1367
|
+
lg: 48
|
|
1368
|
+
}[o];
|
|
1369
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1370
|
+
"svg",
|
|
1371
|
+
{
|
|
1372
|
+
width: i,
|
|
1373
|
+
height: i,
|
|
1374
|
+
viewBox: "0 0 50 50",
|
|
1375
|
+
style: { animation: "spinnerRotate 0.8s linear infinite" },
|
|
1376
|
+
children: [
|
|
1377
|
+
/* @__PURE__ */ e.jsx(
|
|
1378
|
+
"circle",
|
|
1379
|
+
{
|
|
1380
|
+
cx: "25",
|
|
1381
|
+
cy: "25",
|
|
1382
|
+
r: "20",
|
|
1383
|
+
fill: "none",
|
|
1384
|
+
stroke: t,
|
|
1385
|
+
strokeWidth: "4",
|
|
1386
|
+
strokeDasharray: "80 40",
|
|
1387
|
+
strokeLinecap: "round"
|
|
1388
|
+
}
|
|
1389
|
+
),
|
|
1390
|
+
/* @__PURE__ */ e.jsx("style", { children: `
|
|
1391
|
+
@keyframes spinnerRotate {
|
|
1392
|
+
from { transform: rotate(0deg); }
|
|
1393
|
+
to { transform: rotate(360deg); }
|
|
1394
|
+
}
|
|
1395
|
+
` })
|
|
1396
|
+
]
|
|
1397
|
+
}
|
|
1398
|
+
);
|
|
1399
|
+
}, oo = ({
|
|
1400
|
+
message: o = "Loading..."
|
|
1401
|
+
}) => /* @__PURE__ */ e.jsxs("div", { style: {
|
|
1402
|
+
position: "fixed",
|
|
1403
|
+
top: 0,
|
|
1404
|
+
left: 0,
|
|
1405
|
+
right: 0,
|
|
1406
|
+
bottom: 0,
|
|
1407
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1408
|
+
display: "flex",
|
|
1409
|
+
flexDirection: "column",
|
|
1410
|
+
alignItems: "center",
|
|
1411
|
+
justifyContent: "center",
|
|
1412
|
+
gap: "var(--space-md)",
|
|
1413
|
+
zIndex: 1e3
|
|
1414
|
+
}, children: [
|
|
1415
|
+
/* @__PURE__ */ e.jsx(Ir, { size: "lg", color: "var(--surface-light)" }),
|
|
1416
|
+
/* @__PURE__ */ e.jsx("span", { style: {
|
|
1417
|
+
fontFamily: "var(--font-sans)",
|
|
1418
|
+
fontSize: "1rem",
|
|
1419
|
+
color: "var(--surface-light)"
|
|
1420
|
+
}, children: o })
|
|
1421
|
+
] }), $e = ({
|
|
1422
|
+
width: o = "100%",
|
|
1423
|
+
height: t = 20,
|
|
1424
|
+
variant: s = "text",
|
|
1425
|
+
animation: i = "wave"
|
|
1426
|
+
}) => {
|
|
1427
|
+
const n = {
|
|
1428
|
+
text: { borderRadius: "var(--radius-sm)" },
|
|
1429
|
+
rect: { borderRadius: "var(--radius-md)" },
|
|
1430
|
+
circle: { borderRadius: "50%" }
|
|
1431
|
+
}, l = {
|
|
1432
|
+
pulse: {
|
|
1433
|
+
animation: "skeletonPulse 1.5s ease-in-out infinite"
|
|
1434
|
+
},
|
|
1435
|
+
wave: {
|
|
1436
|
+
backgroundImage: "linear-gradient(90deg, var(--secondary-color) 0%, var(--bg-color) 50%, var(--secondary-color) 100%)",
|
|
1437
|
+
backgroundSize: "200% 100%",
|
|
1438
|
+
animation: "skeletonWave 1.5s ease-in-out infinite"
|
|
1439
|
+
},
|
|
1440
|
+
none: {}
|
|
1441
|
+
};
|
|
1442
|
+
return /* @__PURE__ */ e.jsx(
|
|
1443
|
+
"div",
|
|
1444
|
+
{
|
|
1445
|
+
style: {
|
|
1446
|
+
width: o,
|
|
1447
|
+
height: t,
|
|
1448
|
+
backgroundColor: i === "wave" ? void 0 : "var(--secondary-color)",
|
|
1449
|
+
...n[s],
|
|
1450
|
+
...l[i]
|
|
1451
|
+
},
|
|
1452
|
+
children: /* @__PURE__ */ e.jsx("style", { children: `
|
|
1453
|
+
@keyframes skeletonPulse {
|
|
1454
|
+
0%, 100% { opacity: 1; }
|
|
1455
|
+
50% { opacity: 0.5; }
|
|
1456
|
+
}
|
|
1457
|
+
@keyframes skeletonWave {
|
|
1458
|
+
0% { background-position: 200% 0; }
|
|
1459
|
+
100% { background-position: -200% 0; }
|
|
1460
|
+
}
|
|
1461
|
+
` })
|
|
1462
|
+
}
|
|
1463
|
+
);
|
|
1464
|
+
}, Mr = ({ lines: o = 3 }) => /* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "var(--space-sm)" }, children: Array.from({ length: o }).map((t, s) => /* @__PURE__ */ e.jsx(
|
|
1465
|
+
$e,
|
|
1466
|
+
{
|
|
1467
|
+
width: s === o - 1 ? "60%" : "100%",
|
|
1468
|
+
height: 16
|
|
1469
|
+
},
|
|
1470
|
+
s
|
|
1471
|
+
)) }), to = () => /* @__PURE__ */ e.jsxs("div", { style: {
|
|
1472
|
+
padding: "var(--space-lg)",
|
|
1473
|
+
border: "2px solid var(--border-color)",
|
|
1474
|
+
borderRadius: "var(--radius-md)",
|
|
1475
|
+
display: "flex",
|
|
1476
|
+
flexDirection: "column",
|
|
1477
|
+
gap: "var(--space-md)"
|
|
1478
|
+
}, children: [
|
|
1479
|
+
/* @__PURE__ */ e.jsx($e, { height: 24, width: "50%" }),
|
|
1480
|
+
/* @__PURE__ */ e.jsx(Mr, { lines: 3 })
|
|
1481
|
+
] }), Dr = ({
|
|
1482
|
+
brand: o,
|
|
1483
|
+
darkMode: t,
|
|
1484
|
+
onThemeToggle: s,
|
|
1485
|
+
onAccountClick: i,
|
|
1486
|
+
onNotificationClick: n
|
|
1487
|
+
}) => {
|
|
1488
|
+
const [l, c] = P(!1), [u, f] = P(!1), [j, p] = P(null);
|
|
1489
|
+
N(() => {
|
|
1490
|
+
const b = () => c(window.innerWidth < 768);
|
|
1491
|
+
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
1492
|
+
}, []);
|
|
1493
|
+
const h = o.navItems.filter((b) => b.inNavbar !== !1);
|
|
1494
|
+
return /* @__PURE__ */ e.jsxs("header", { style: {
|
|
1495
|
+
backgroundColor: "var(--primary-color)",
|
|
1496
|
+
borderBottom: "4px solid var(--accent-color)",
|
|
1497
|
+
position: "sticky",
|
|
1498
|
+
top: 0,
|
|
1499
|
+
zIndex: 100
|
|
1500
|
+
}, children: [
|
|
1501
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
1502
|
+
display: "flex",
|
|
1503
|
+
alignItems: "center",
|
|
1504
|
+
padding: "var(--space-sm) var(--space-lg)",
|
|
1505
|
+
gap: "var(--space-md)",
|
|
1506
|
+
maxWidth: 1400,
|
|
1507
|
+
margin: "0 auto"
|
|
1508
|
+
}, children: [
|
|
1509
|
+
o.logoUrl && /* @__PURE__ */ e.jsx("div", { style: {
|
|
1510
|
+
width: 40,
|
|
1511
|
+
height: 40,
|
|
1512
|
+
borderRadius: "var(--radius-md)",
|
|
1513
|
+
overflow: "hidden",
|
|
1514
|
+
backgroundColor: "var(--bg-color)",
|
|
1515
|
+
border: "2px solid var(--accent-color)",
|
|
1516
|
+
flexShrink: 0
|
|
1517
|
+
}, children: /* @__PURE__ */ e.jsx(
|
|
1518
|
+
"img",
|
|
1519
|
+
{
|
|
1520
|
+
src: o.logoUrl,
|
|
1521
|
+
alt: o.name,
|
|
1522
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
1523
|
+
}
|
|
1524
|
+
) }),
|
|
1525
|
+
/* @__PURE__ */ e.jsx("h1", { style: {
|
|
1526
|
+
margin: 0,
|
|
1527
|
+
fontFamily: "var(--font-serif)",
|
|
1528
|
+
fontSize: l ? "1.1rem" : "1.4rem",
|
|
1529
|
+
fontWeight: 700,
|
|
1530
|
+
color: "var(--surface-light)",
|
|
1531
|
+
whiteSpace: "nowrap",
|
|
1532
|
+
flexShrink: 0
|
|
1533
|
+
}, children: o.name }),
|
|
1534
|
+
!l && /* @__PURE__ */ e.jsx("nav", { style: {
|
|
1535
|
+
display: "flex",
|
|
1536
|
+
alignItems: "center",
|
|
1537
|
+
gap: "var(--space-sm)",
|
|
1538
|
+
flex: 1,
|
|
1539
|
+
justifyContent: "center"
|
|
1540
|
+
}, children: h.map((b) => /* @__PURE__ */ e.jsx(
|
|
1541
|
+
zr,
|
|
1542
|
+
{
|
|
1543
|
+
item: b,
|
|
1544
|
+
isActive: j === b.label,
|
|
1545
|
+
onHover: (_) => p(_),
|
|
1546
|
+
onLeave: () => p(null)
|
|
1547
|
+
},
|
|
1548
|
+
b.label
|
|
1549
|
+
)) }),
|
|
1550
|
+
l && /* @__PURE__ */ e.jsx("div", { style: { flex: 1 } }),
|
|
1551
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
1552
|
+
display: "flex",
|
|
1553
|
+
alignItems: "center",
|
|
1554
|
+
gap: "var(--space-xs)",
|
|
1555
|
+
flexShrink: 0
|
|
1556
|
+
}, children: [
|
|
1557
|
+
l && /* @__PURE__ */ e.jsx(Z, { onClick: () => f(!u), label: "Menu", size: 36, children: /* @__PURE__ */ e.jsx(Or, {}) }),
|
|
1558
|
+
/* @__PURE__ */ e.jsx(Z, { onClick: s, label: "Toggle theme", size: 36, children: t ? /* @__PURE__ */ e.jsx(Ar, {}) : /* @__PURE__ */ e.jsx(Wr, {}) }),
|
|
1559
|
+
!l && n && /* @__PURE__ */ e.jsx(Z, { onClick: n, label: "Notifications", size: 36, children: /* @__PURE__ */ e.jsx(Lr, {}) }),
|
|
1560
|
+
/* @__PURE__ */ e.jsx(Z, { onClick: i, label: "Account", size: 40, children: /* @__PURE__ */ e.jsx(Br, {}) })
|
|
1561
|
+
] })
|
|
1562
|
+
] }),
|
|
1563
|
+
l && u && /* @__PURE__ */ e.jsx("div", { style: {
|
|
1564
|
+
backgroundColor: "var(--bg-color)",
|
|
1565
|
+
borderTop: "1px solid var(--border-color)",
|
|
1566
|
+
padding: "var(--space-sm)"
|
|
1567
|
+
}, children: h.map((b) => /* @__PURE__ */ e.jsx(Pr, { item: b, onClose: () => f(!1) }, b.label)) })
|
|
1568
|
+
] });
|
|
1569
|
+
}, Z = ({ onClick: o, label: t, size: s = 36, children: i }) => /* @__PURE__ */ e.jsx(
|
|
1570
|
+
"button",
|
|
1571
|
+
{
|
|
1572
|
+
onClick: o,
|
|
1573
|
+
"aria-label": t,
|
|
1574
|
+
style: {
|
|
1575
|
+
width: s,
|
|
1576
|
+
height: s,
|
|
1577
|
+
borderRadius: "var(--radius-full)",
|
|
1578
|
+
backgroundColor: "rgba(255,255,255,0.1)",
|
|
1579
|
+
border: "none",
|
|
1580
|
+
cursor: "pointer",
|
|
1581
|
+
display: "flex",
|
|
1582
|
+
alignItems: "center",
|
|
1583
|
+
justifyContent: "center",
|
|
1584
|
+
transition: "background var(--transition-fast)",
|
|
1585
|
+
color: "var(--surface-light)"
|
|
1586
|
+
},
|
|
1587
|
+
onMouseEnter: (n) => n.currentTarget.style.backgroundColor = "rgba(255,255,255,0.2)",
|
|
1588
|
+
onMouseLeave: (n) => n.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)",
|
|
1589
|
+
children: i
|
|
1590
|
+
}
|
|
1591
|
+
), zr = ({ item: o, isActive: t, onHover: s, onLeave: i }) => /* @__PURE__ */ e.jsxs(
|
|
1592
|
+
"div",
|
|
1593
|
+
{
|
|
1594
|
+
onMouseEnter: () => o.children && s(o.label),
|
|
1595
|
+
onMouseLeave: i,
|
|
1596
|
+
style: { position: "relative" },
|
|
1597
|
+
children: [
|
|
1598
|
+
/* @__PURE__ */ e.jsxs(
|
|
1599
|
+
"button",
|
|
1600
|
+
{
|
|
1601
|
+
onClick: o.onClick,
|
|
1602
|
+
style: {
|
|
1603
|
+
background: "none",
|
|
1604
|
+
border: "none",
|
|
1605
|
+
color: "var(--surface-light)",
|
|
1606
|
+
cursor: "pointer",
|
|
1607
|
+
fontFamily: "var(--font-sans)",
|
|
1608
|
+
fontWeight: 500,
|
|
1609
|
+
fontSize: "0.9rem",
|
|
1610
|
+
padding: "var(--space-xs) var(--space-sm)",
|
|
1611
|
+
borderRadius: "var(--radius-sm)",
|
|
1612
|
+
transition: "background var(--transition-fast)"
|
|
1613
|
+
},
|
|
1614
|
+
onMouseEnter: (n) => n.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)",
|
|
1615
|
+
onMouseLeave: (n) => n.currentTarget.style.backgroundColor = "transparent",
|
|
1616
|
+
children: [
|
|
1617
|
+
o.label,
|
|
1618
|
+
" ",
|
|
1619
|
+
o.children && "▾"
|
|
1620
|
+
]
|
|
1621
|
+
}
|
|
1622
|
+
),
|
|
1623
|
+
o.children && t && /* @__PURE__ */ e.jsx("div", { style: {
|
|
1624
|
+
position: "absolute",
|
|
1625
|
+
top: "100%",
|
|
1626
|
+
left: "50%",
|
|
1627
|
+
transform: "translateX(-50%)",
|
|
1628
|
+
backgroundColor: "var(--bg-color)",
|
|
1629
|
+
minWidth: 160,
|
|
1630
|
+
boxShadow: "var(--shadow-lg)",
|
|
1631
|
+
borderRadius: "var(--radius-md)",
|
|
1632
|
+
padding: "var(--space-xs) 0",
|
|
1633
|
+
zIndex: 200,
|
|
1634
|
+
marginTop: 4
|
|
1635
|
+
}, children: o.children.map((n) => /* @__PURE__ */ e.jsx(
|
|
1636
|
+
"button",
|
|
1637
|
+
{
|
|
1638
|
+
onClick: n.onClick,
|
|
1639
|
+
style: {
|
|
1640
|
+
display: "block",
|
|
1641
|
+
width: "100%",
|
|
1642
|
+
padding: "var(--space-sm) var(--space-md)",
|
|
1643
|
+
border: "none",
|
|
1644
|
+
background: "none",
|
|
1645
|
+
textAlign: "left",
|
|
1646
|
+
cursor: "pointer",
|
|
1647
|
+
fontFamily: "var(--font-sans)",
|
|
1648
|
+
fontSize: "0.9rem",
|
|
1649
|
+
color: "var(--text-color)",
|
|
1650
|
+
transition: "background var(--transition-fast)"
|
|
1651
|
+
},
|
|
1652
|
+
onMouseEnter: (l) => l.currentTarget.style.backgroundColor = "var(--secondary-color)",
|
|
1653
|
+
onMouseLeave: (l) => l.currentTarget.style.backgroundColor = "transparent",
|
|
1654
|
+
children: n.label
|
|
1655
|
+
},
|
|
1656
|
+
n.label
|
|
1657
|
+
)) })
|
|
1658
|
+
]
|
|
1659
|
+
}
|
|
1660
|
+
), Pr = ({ item: o, onClose: t }) => /* @__PURE__ */ e.jsx(
|
|
1661
|
+
"button",
|
|
1662
|
+
{
|
|
1663
|
+
onClick: () => {
|
|
1664
|
+
var s;
|
|
1665
|
+
(s = o.onClick) == null || s.call(o), t();
|
|
1666
|
+
},
|
|
1667
|
+
style: {
|
|
1668
|
+
display: "block",
|
|
1669
|
+
width: "100%",
|
|
1670
|
+
padding: "var(--space-sm) var(--space-md)",
|
|
1671
|
+
border: "none",
|
|
1672
|
+
background: "none",
|
|
1673
|
+
textAlign: "left",
|
|
1674
|
+
cursor: "pointer",
|
|
1675
|
+
fontFamily: "var(--font-sans)",
|
|
1676
|
+
fontWeight: 500,
|
|
1677
|
+
fontSize: "0.95rem",
|
|
1678
|
+
color: "var(--text-color)",
|
|
1679
|
+
borderRadius: "var(--radius-sm)"
|
|
1680
|
+
},
|
|
1681
|
+
children: o.label
|
|
1682
|
+
}
|
|
1683
|
+
), Wr = () => /* @__PURE__ */ e.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1684
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "5" }),
|
|
1685
|
+
/* @__PURE__ */ e.jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
|
|
1686
|
+
] }), Ar = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }), Lr = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0" }) }), Br = () => /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1687
|
+
/* @__PURE__ */ e.jsx("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
|
|
1688
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "7", r: "4" })
|
|
1689
|
+
] }), Or = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M3 12h18M3 6h18M3 18h18" }) }), $r = ({
|
|
1690
|
+
copyrightBrand: o,
|
|
1691
|
+
yearCreated: t,
|
|
1692
|
+
poweredBy: s,
|
|
1693
|
+
links: i
|
|
1694
|
+
}) => {
|
|
1695
|
+
const n = (/* @__PURE__ */ new Date()).getFullYear(), l = t === n ? n.toString() : `${t}-${n}`;
|
|
1696
|
+
return /* @__PURE__ */ e.jsx("footer", { style: {
|
|
1697
|
+
backgroundColor: "var(--primary-color)",
|
|
1698
|
+
color: "var(--bg-color)",
|
|
1699
|
+
padding: "var(--space-lg) var(--space-xl)",
|
|
1700
|
+
borderTop: "4px solid var(--accent-color)"
|
|
1701
|
+
}, children: /* @__PURE__ */ e.jsxs("div", { style: {
|
|
1702
|
+
maxWidth: 1200,
|
|
1703
|
+
margin: "0 auto",
|
|
1704
|
+
display: "flex",
|
|
1705
|
+
flexDirection: "column",
|
|
1706
|
+
gap: "var(--space-md)",
|
|
1707
|
+
alignItems: "center",
|
|
1708
|
+
textAlign: "center"
|
|
1709
|
+
}, children: [
|
|
1710
|
+
i && i.length > 0 && /* @__PURE__ */ e.jsx("nav", { style: {
|
|
1711
|
+
display: "flex",
|
|
1712
|
+
flexWrap: "wrap",
|
|
1713
|
+
gap: "var(--space-md)",
|
|
1714
|
+
justifyContent: "center"
|
|
1715
|
+
}, children: i.map((c) => /* @__PURE__ */ e.jsx(
|
|
1716
|
+
"a",
|
|
1717
|
+
{
|
|
1718
|
+
href: c.url,
|
|
1719
|
+
style: {
|
|
1720
|
+
color: "var(--bg-color)",
|
|
1721
|
+
textDecoration: "none",
|
|
1722
|
+
fontFamily: "var(--font-sans)",
|
|
1723
|
+
fontSize: "0.9rem",
|
|
1724
|
+
opacity: 0.9,
|
|
1725
|
+
transition: "opacity var(--transition-fast)"
|
|
1726
|
+
},
|
|
1727
|
+
onMouseEnter: (u) => u.currentTarget.style.opacity = "1",
|
|
1728
|
+
onMouseLeave: (u) => u.currentTarget.style.opacity = "0.9",
|
|
1729
|
+
children: c.label
|
|
1730
|
+
},
|
|
1731
|
+
c.label
|
|
1732
|
+
)) }),
|
|
1733
|
+
/* @__PURE__ */ e.jsxs("p", { style: {
|
|
1734
|
+
margin: 0,
|
|
1735
|
+
fontFamily: "var(--font-sans)",
|
|
1736
|
+
fontSize: "0.85rem",
|
|
1737
|
+
opacity: 0.8
|
|
1738
|
+
}, children: [
|
|
1739
|
+
"© ",
|
|
1740
|
+
l,
|
|
1741
|
+
" ",
|
|
1742
|
+
o,
|
|
1743
|
+
". All rights reserved."
|
|
1744
|
+
] }),
|
|
1745
|
+
s && /* @__PURE__ */ e.jsxs("p", { style: {
|
|
1746
|
+
margin: 0,
|
|
1747
|
+
fontFamily: "var(--font-sans)",
|
|
1748
|
+
fontSize: "0.75rem",
|
|
1749
|
+
opacity: 0.6
|
|
1750
|
+
}, children: [
|
|
1751
|
+
"Powered by",
|
|
1752
|
+
" ",
|
|
1753
|
+
/* @__PURE__ */ e.jsx("span", { style: { color: "var(--org-color)", fontWeight: 600 }, children: s })
|
|
1754
|
+
] })
|
|
1755
|
+
] }) });
|
|
1756
|
+
}, Yr = () => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1757
|
+
/* @__PURE__ */ e.jsx("style", { children: `
|
|
1758
|
+
.mobile-ad-banner {
|
|
1759
|
+
display: none;
|
|
1760
|
+
}
|
|
1761
|
+
@media (max-width: 1200px) {
|
|
1762
|
+
.mobile-ad-banner {
|
|
1763
|
+
display: block;
|
|
1764
|
+
position: sticky;
|
|
1765
|
+
bottom: 0;
|
|
1766
|
+
left: 0;
|
|
1767
|
+
right: 0;
|
|
1768
|
+
padding: 8px;
|
|
1769
|
+
background-color: var(--bg-color);
|
|
1770
|
+
border-top: 2px solid var(--border-color);
|
|
1771
|
+
text-align: center;
|
|
1772
|
+
margin-top: auto;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
` }),
|
|
1776
|
+
/* @__PURE__ */ e.jsx("div", { className: "mobile-ad-banner", children: /* @__PURE__ */ e.jsx(
|
|
1777
|
+
"div",
|
|
1778
|
+
{
|
|
1779
|
+
"data-ad-slot": "mobile-banner",
|
|
1780
|
+
style: {
|
|
1781
|
+
width: "100%",
|
|
1782
|
+
maxWidth: 468,
|
|
1783
|
+
height: 60,
|
|
1784
|
+
margin: "0 auto",
|
|
1785
|
+
backgroundColor: "var(--secondary-color)",
|
|
1786
|
+
border: "2px dashed var(--border-color)",
|
|
1787
|
+
borderRadius: "4px",
|
|
1788
|
+
display: "flex",
|
|
1789
|
+
alignItems: "center",
|
|
1790
|
+
justifyContent: "center",
|
|
1791
|
+
fontFamily: "var(--font-sans)",
|
|
1792
|
+
fontSize: "0.8rem",
|
|
1793
|
+
color: "var(--text-color)",
|
|
1794
|
+
opacity: 0.6
|
|
1795
|
+
},
|
|
1796
|
+
children: "Ad (468×60)"
|
|
1797
|
+
}
|
|
1798
|
+
) })
|
|
1799
|
+
] }), U = ({
|
|
1800
|
+
brand: o,
|
|
1801
|
+
children: t,
|
|
1802
|
+
onAccountClick: s,
|
|
1803
|
+
onNotificationClick: i
|
|
1804
|
+
}) => {
|
|
1805
|
+
const { darkMode: n, toggleDarkMode: l } = Rr(o);
|
|
1806
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "shell", style: { display: "flex", flexDirection: "column", minHeight: "100vh" }, children: [
|
|
1807
|
+
/* @__PURE__ */ e.jsx(
|
|
1808
|
+
Dr,
|
|
1809
|
+
{
|
|
1810
|
+
brand: o,
|
|
1811
|
+
darkMode: n,
|
|
1812
|
+
onThemeToggle: l,
|
|
1813
|
+
onAccountClick: s,
|
|
1814
|
+
onNotificationClick: i
|
|
1815
|
+
}
|
|
1816
|
+
),
|
|
1817
|
+
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
|
|
1818
|
+
/* @__PURE__ */ e.jsx("main", { style: {
|
|
1819
|
+
flex: 1,
|
|
1820
|
+
backgroundColor: "var(--bg-color)"
|
|
1821
|
+
}, children: t }),
|
|
1822
|
+
/* @__PURE__ */ e.jsx(Yr, {})
|
|
1823
|
+
] }),
|
|
1824
|
+
/* @__PURE__ */ e.jsx(
|
|
1825
|
+
$r,
|
|
1826
|
+
{
|
|
1827
|
+
copyrightBrand: o.footer.copyrightBrand,
|
|
1828
|
+
yearCreated: o.footer.yearCreated,
|
|
1829
|
+
poweredBy: o.footer.poweredBy,
|
|
1830
|
+
links: o.footer.links
|
|
1831
|
+
}
|
|
1832
|
+
)
|
|
1833
|
+
] });
|
|
1834
|
+
}, V = ({
|
|
1835
|
+
title: o,
|
|
1836
|
+
subtitle: t,
|
|
1837
|
+
breadcrumbs: s,
|
|
1838
|
+
score: i
|
|
1839
|
+
}) => /* @__PURE__ */ e.jsxs("section", { style: {
|
|
1840
|
+
backgroundColor: "var(--secondary-color)",
|
|
1841
|
+
padding: "var(--space-lg) var(--space-lg)",
|
|
1842
|
+
textAlign: "center",
|
|
1843
|
+
borderBottom: "4px solid var(--accent-color)"
|
|
1844
|
+
}, children: [
|
|
1845
|
+
s && s.length > 0 && /* @__PURE__ */ e.jsx("nav", { style: {
|
|
1846
|
+
marginBottom: "var(--space-md)",
|
|
1847
|
+
display: "flex",
|
|
1848
|
+
justifyContent: "center",
|
|
1849
|
+
gap: "var(--space-sm)",
|
|
1850
|
+
fontFamily: "var(--font-sans)",
|
|
1851
|
+
fontSize: "0.9rem",
|
|
1852
|
+
fontWeight: 600
|
|
1853
|
+
}, children: s.map((n, l) => /* @__PURE__ */ e.jsxs(ue.Fragment, { children: [
|
|
1854
|
+
l > 0 && /* @__PURE__ */ e.jsx("span", { style: { color: "var(--surface-light)", opacity: 0.4 }, children: "/" }),
|
|
1855
|
+
n.path ? /* @__PURE__ */ e.jsx(
|
|
1856
|
+
"a",
|
|
1857
|
+
{
|
|
1858
|
+
href: n.path,
|
|
1859
|
+
style: {
|
|
1860
|
+
color: "var(--accent-color)",
|
|
1861
|
+
textDecoration: "none"
|
|
1862
|
+
},
|
|
1863
|
+
children: n.label
|
|
1864
|
+
}
|
|
1865
|
+
) : /* @__PURE__ */ e.jsx("span", { style: { color: "var(--surface-light)", opacity: 0.8 }, children: n.label })
|
|
1866
|
+
] }, n.label)) }),
|
|
1867
|
+
/* @__PURE__ */ e.jsx("h1", { style: {
|
|
1868
|
+
margin: 0,
|
|
1869
|
+
fontFamily: "var(--font-serif)",
|
|
1870
|
+
fontSize: "clamp(2rem, 5vw, 3.5rem)",
|
|
1871
|
+
fontWeight: 700,
|
|
1872
|
+
color: "var(--text-dark)",
|
|
1873
|
+
letterSpacing: "0.02em"
|
|
1874
|
+
}, children: o }),
|
|
1875
|
+
t && /* @__PURE__ */ e.jsx("p", { style: {
|
|
1876
|
+
margin: "var(--space-sm) 0 0",
|
|
1877
|
+
fontFamily: "var(--font-sans)",
|
|
1878
|
+
fontSize: "1.1rem",
|
|
1879
|
+
color: "var(--text-dark)",
|
|
1880
|
+
opacity: 0.8
|
|
1881
|
+
}, children: t }),
|
|
1882
|
+
i && /* @__PURE__ */ e.jsxs("div", { style: {
|
|
1883
|
+
marginTop: "var(--space-md)",
|
|
1884
|
+
display: "inline-flex",
|
|
1885
|
+
flexDirection: "column",
|
|
1886
|
+
alignItems: "center",
|
|
1887
|
+
gap: "var(--space-xs)"
|
|
1888
|
+
}, children: [
|
|
1889
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
1890
|
+
backgroundColor: "var(--accent-color)",
|
|
1891
|
+
color: "white",
|
|
1892
|
+
padding: "var(--space-sm) var(--space-lg)",
|
|
1893
|
+
borderRadius: "var(--radius-full)",
|
|
1894
|
+
fontFamily: "var(--font-sans)",
|
|
1895
|
+
fontWeight: 700,
|
|
1896
|
+
fontSize: "1.5rem",
|
|
1897
|
+
display: "flex",
|
|
1898
|
+
alignItems: "center",
|
|
1899
|
+
gap: "var(--space-sm)",
|
|
1900
|
+
boxShadow: "var(--shadow-md)"
|
|
1901
|
+
}, children: [
|
|
1902
|
+
/* @__PURE__ */ e.jsx("span", { children: i.value }),
|
|
1903
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: "0.9rem", fontWeight: 500 }, children: i.label })
|
|
1904
|
+
] }),
|
|
1905
|
+
i.betaDisclaimer && /* @__PURE__ */ e.jsx("span", { style: {
|
|
1906
|
+
fontFamily: "var(--font-sans)",
|
|
1907
|
+
fontSize: "0.75rem",
|
|
1908
|
+
color: "var(--text-dark)",
|
|
1909
|
+
opacity: 0.6,
|
|
1910
|
+
fontStyle: "italic"
|
|
1911
|
+
}, children: "Score algorithm is a work in progress" })
|
|
1912
|
+
] })
|
|
1913
|
+
] }), z = {
|
|
1914
|
+
violations: /* @__PURE__ */ e.jsxs("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--warning-color)", strokeWidth: "2", children: [
|
|
1915
|
+
/* @__PURE__ */ e.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
1916
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
1917
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
1918
|
+
] }),
|
|
1919
|
+
injuries: /* @__PURE__ */ e.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--info-color)", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M22 12h-4l-3 9L9 3l-3 9H2" }) }),
|
|
1920
|
+
fatalities: /* @__PURE__ */ e.jsxs("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--danger-color)", strokeWidth: "2", children: [
|
|
1921
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1922
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
1923
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
1924
|
+
] }),
|
|
1925
|
+
fines: /* @__PURE__ */ e.jsxs("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--success-color)", strokeWidth: "2", children: [
|
|
1926
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "23" }),
|
|
1927
|
+
/* @__PURE__ */ e.jsx("path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" })
|
|
1928
|
+
] }),
|
|
1929
|
+
avgFine: /* @__PURE__ */ e.jsxs("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--secondary-color)", strokeWidth: "2", children: [
|
|
1930
|
+
/* @__PURE__ */ e.jsx("line", { x1: "18", y1: "20", x2: "18", y2: "10" }),
|
|
1931
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "20", x2: "12", y2: "4" }),
|
|
1932
|
+
/* @__PURE__ */ e.jsx("line", { x1: "6", y1: "20", x2: "6", y2: "14" })
|
|
1933
|
+
] }),
|
|
1934
|
+
trendUp: /* @__PURE__ */ e.jsxs("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--danger-color)", strokeWidth: "2", children: [
|
|
1935
|
+
/* @__PURE__ */ e.jsx("polyline", { points: "23 6 13.5 15.5 8.5 10.5 1 18" }),
|
|
1936
|
+
/* @__PURE__ */ e.jsx("polyline", { points: "17 6 23 6 23 12" })
|
|
1937
|
+
] }),
|
|
1938
|
+
trendDown: /* @__PURE__ */ e.jsxs("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "var(--success-color)", strokeWidth: "2", children: [
|
|
1939
|
+
/* @__PURE__ */ e.jsx("polyline", { points: "23 18 13.5 8.5 8.5 13.5 1 6" }),
|
|
1940
|
+
/* @__PURE__ */ e.jsx("polyline", { points: "17 18 23 18 23 12" })
|
|
1941
|
+
] })
|
|
1942
|
+
}, H = ({
|
|
1943
|
+
stats: o,
|
|
1944
|
+
columns: t = 4
|
|
1945
|
+
}) => {
|
|
1946
|
+
const s = [
|
|
1947
|
+
{ label: "Total Incidents", value: o.totalViolations, icon: z.violations },
|
|
1948
|
+
o.totalInjuries !== void 0 && { label: "Injuries", value: o.totalInjuries, icon: z.injuries },
|
|
1949
|
+
o.totalFatalities !== void 0 && { label: "Fatalities", value: o.totalFatalities, icon: z.fatalities },
|
|
1950
|
+
o.totalFines !== void 0 && { label: "Total Fines", value: Oe(o.totalFines), icon: z.fines },
|
|
1951
|
+
o.avgFines !== void 0 && { label: "Avg Fine", value: Oe(o.avgFines), icon: z.avgFine },
|
|
1952
|
+
o.trend && {
|
|
1953
|
+
label: "YoY Change",
|
|
1954
|
+
value: `${o.trend.direction === "up" ? "↑" : o.trend.direction === "down" ? "↓" : "→"} ${o.trend.percentage}%`,
|
|
1955
|
+
icon: o.trend.direction === "down" ? z.trendDown : z.trendUp
|
|
1956
|
+
}
|
|
1957
|
+
].filter(Boolean);
|
|
1958
|
+
return /* @__PURE__ */ e.jsx("section", { style: { marginBottom: "var(--space-lg)" }, children: /* @__PURE__ */ e.jsx(
|
|
1959
|
+
"div",
|
|
1960
|
+
{
|
|
1961
|
+
className: "stat-grid",
|
|
1962
|
+
style: {
|
|
1963
|
+
display: "grid",
|
|
1964
|
+
gridTemplateColumns: `repeat(${t}, 1fr)`,
|
|
1965
|
+
gap: "var(--space-md)"
|
|
1966
|
+
},
|
|
1967
|
+
children: s.map((i) => /* @__PURE__ */ e.jsx(Nr, { ...i }, i.label))
|
|
1968
|
+
}
|
|
1969
|
+
) });
|
|
1970
|
+
}, Nr = ({
|
|
1971
|
+
label: o,
|
|
1972
|
+
value: t,
|
|
1973
|
+
icon: s
|
|
1974
|
+
}) => /* @__PURE__ */ e.jsxs(
|
|
1975
|
+
"div",
|
|
1976
|
+
{
|
|
1977
|
+
style: {
|
|
1978
|
+
padding: "var(--space-lg)",
|
|
1979
|
+
borderRadius: "var(--radius-md)",
|
|
1980
|
+
backgroundColor: "var(--bg-color)",
|
|
1981
|
+
border: "2px solid var(--border-color)",
|
|
1982
|
+
display: "flex",
|
|
1983
|
+
alignItems: "center",
|
|
1984
|
+
gap: "var(--space-md)",
|
|
1985
|
+
transition: "transform var(--transition-fast), box-shadow var(--transition-fast)",
|
|
1986
|
+
cursor: "default"
|
|
1987
|
+
},
|
|
1988
|
+
onMouseEnter: (i) => {
|
|
1989
|
+
i.currentTarget.style.transform = "translateY(-2px)", i.currentTarget.style.boxShadow = "var(--shadow-md)";
|
|
1990
|
+
},
|
|
1991
|
+
onMouseLeave: (i) => {
|
|
1992
|
+
i.currentTarget.style.transform = "translateY(0)", i.currentTarget.style.boxShadow = "none";
|
|
1993
|
+
},
|
|
1994
|
+
children: [
|
|
1995
|
+
/* @__PURE__ */ e.jsx("span", { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: s }),
|
|
1996
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1997
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
1998
|
+
fontFamily: "var(--font-sans)",
|
|
1999
|
+
fontWeight: 700,
|
|
2000
|
+
fontSize: "1.5rem",
|
|
2001
|
+
color: "var(--primary-color)"
|
|
2002
|
+
}, children: typeof t == "number" ? t.toLocaleString() : t }),
|
|
2003
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
2004
|
+
fontFamily: "var(--font-sans)",
|
|
2005
|
+
fontSize: "0.9rem",
|
|
2006
|
+
color: "var(--text-color)",
|
|
2007
|
+
opacity: 0.8
|
|
2008
|
+
}, children: o })
|
|
2009
|
+
] })
|
|
2010
|
+
]
|
|
2011
|
+
}
|
|
2012
|
+
);
|
|
2013
|
+
function Oe(o) {
|
|
2014
|
+
return o >= 1e6 ? `$${(o / 1e6).toFixed(1)}M` : o >= 1e3 ? `$${(o / 1e3).toFixed(0)}K` : `$${o.toLocaleString()}`;
|
|
2015
|
+
}
|
|
2016
|
+
const ee = ({
|
|
2017
|
+
title: o,
|
|
2018
|
+
items: t,
|
|
2019
|
+
basePath: s,
|
|
2020
|
+
emptyMessage: i = "No items found",
|
|
2021
|
+
showSearch: n = !0,
|
|
2022
|
+
initialLimit: l = 30
|
|
2023
|
+
}) => {
|
|
2024
|
+
const [c, u] = P(""), [f, j] = P(!1), p = t.filter(
|
|
2025
|
+
(C) => C.name.toLowerCase().includes(c.toLowerCase())
|
|
2026
|
+
), h = f || c.length > 0, b = h ? p : p.slice(0, l), _ = p.length > l && !h;
|
|
2027
|
+
return /* @__PURE__ */ e.jsx("section", { style: {
|
|
2028
|
+
marginBottom: "var(--space-lg)"
|
|
2029
|
+
}, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2030
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
2031
|
+
display: "flex",
|
|
2032
|
+
justifyContent: "space-between",
|
|
2033
|
+
alignItems: "center",
|
|
2034
|
+
marginBottom: "var(--space-md)",
|
|
2035
|
+
flexWrap: "wrap",
|
|
2036
|
+
gap: "var(--space-sm)"
|
|
2037
|
+
}, children: [
|
|
2038
|
+
/* @__PURE__ */ e.jsxs("h2", { style: {
|
|
2039
|
+
margin: 0,
|
|
2040
|
+
fontFamily: "var(--font-serif)",
|
|
2041
|
+
fontSize: "1.5rem",
|
|
2042
|
+
color: "var(--text-color)"
|
|
2043
|
+
}, children: [
|
|
2044
|
+
o,
|
|
2045
|
+
/* @__PURE__ */ e.jsxs("span", { style: {
|
|
2046
|
+
marginLeft: "var(--space-sm)",
|
|
2047
|
+
fontSize: "1rem",
|
|
2048
|
+
opacity: 0.6
|
|
2049
|
+
}, children: [
|
|
2050
|
+
"(",
|
|
2051
|
+
t.length,
|
|
2052
|
+
")"
|
|
2053
|
+
] })
|
|
2054
|
+
] }),
|
|
2055
|
+
n && t.length > 10 && /* @__PURE__ */ e.jsx(
|
|
2056
|
+
"input",
|
|
2057
|
+
{
|
|
2058
|
+
type: "text",
|
|
2059
|
+
placeholder: "Search...",
|
|
2060
|
+
value: c,
|
|
2061
|
+
onChange: (C) => u(C.target.value),
|
|
2062
|
+
style: {
|
|
2063
|
+
padding: "var(--space-sm) var(--space-md)",
|
|
2064
|
+
borderRadius: "var(--radius-md)",
|
|
2065
|
+
border: "2px solid var(--border-color)",
|
|
2066
|
+
fontFamily: "var(--font-sans)",
|
|
2067
|
+
fontSize: "0.9rem",
|
|
2068
|
+
backgroundColor: "var(--bg-color)",
|
|
2069
|
+
color: "var(--text-color)",
|
|
2070
|
+
width: 200
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
)
|
|
2074
|
+
] }),
|
|
2075
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
2076
|
+
display: "flex",
|
|
2077
|
+
flexWrap: "wrap",
|
|
2078
|
+
gap: "var(--space-sm)",
|
|
2079
|
+
padding: "var(--space-md)",
|
|
2080
|
+
border: "2px solid var(--border-color)",
|
|
2081
|
+
borderRadius: "var(--radius-md)"
|
|
2082
|
+
}, children: p.length === 0 ? /* @__PURE__ */ e.jsx("p", { style: {
|
|
2083
|
+
width: "100%",
|
|
2084
|
+
textAlign: "center",
|
|
2085
|
+
color: "var(--text-color)",
|
|
2086
|
+
opacity: 0.6,
|
|
2087
|
+
margin: 0,
|
|
2088
|
+
padding: "var(--space-lg)"
|
|
2089
|
+
}, children: i }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2090
|
+
b.map((C) => /* @__PURE__ */ e.jsxs(
|
|
2091
|
+
"a",
|
|
2092
|
+
{
|
|
2093
|
+
href: `${s}/${C.slug}`,
|
|
2094
|
+
style: {
|
|
2095
|
+
display: "inline-flex",
|
|
2096
|
+
alignItems: "center",
|
|
2097
|
+
gap: "var(--space-xs)",
|
|
2098
|
+
padding: "var(--space-xs) var(--space-sm)",
|
|
2099
|
+
backgroundColor: "var(--bg-color)",
|
|
2100
|
+
border: "1px solid var(--border-color)",
|
|
2101
|
+
borderRadius: "var(--radius-sm)",
|
|
2102
|
+
textDecoration: "none",
|
|
2103
|
+
color: "var(--text-color)",
|
|
2104
|
+
fontFamily: "var(--font-sans)",
|
|
2105
|
+
fontSize: "0.85rem",
|
|
2106
|
+
transition: "all var(--transition-fast)",
|
|
2107
|
+
whiteSpace: "nowrap"
|
|
2108
|
+
},
|
|
2109
|
+
onMouseEnter: (F) => {
|
|
2110
|
+
F.currentTarget.style.backgroundColor = "var(--primary-color)", F.currentTarget.style.color = "var(--surface-light)", F.currentTarget.style.borderColor = "var(--primary-color)";
|
|
2111
|
+
},
|
|
2112
|
+
onMouseLeave: (F) => {
|
|
2113
|
+
F.currentTarget.style.backgroundColor = "var(--bg-color)", F.currentTarget.style.color = "var(--text-color)", F.currentTarget.style.borderColor = "var(--border-color)";
|
|
2114
|
+
},
|
|
2115
|
+
children: [
|
|
2116
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontWeight: 500 }, children: C.name }),
|
|
2117
|
+
/* @__PURE__ */ e.jsx(
|
|
2118
|
+
"span",
|
|
2119
|
+
{
|
|
2120
|
+
title: `${C.count.toLocaleString()} incidents`,
|
|
2121
|
+
style: {
|
|
2122
|
+
backgroundColor: "var(--secondary-color)",
|
|
2123
|
+
color: "var(--surface-light)",
|
|
2124
|
+
padding: "2px 6px",
|
|
2125
|
+
borderRadius: "var(--radius-full)",
|
|
2126
|
+
fontSize: "0.75rem",
|
|
2127
|
+
fontWeight: 600
|
|
2128
|
+
},
|
|
2129
|
+
children: C.count.toLocaleString()
|
|
2130
|
+
}
|
|
2131
|
+
)
|
|
2132
|
+
]
|
|
2133
|
+
},
|
|
2134
|
+
C.slug
|
|
2135
|
+
)),
|
|
2136
|
+
(_ || f) && /* @__PURE__ */ e.jsx(
|
|
2137
|
+
"button",
|
|
2138
|
+
{
|
|
2139
|
+
onClick: () => j(!f),
|
|
2140
|
+
style: {
|
|
2141
|
+
display: "inline-flex",
|
|
2142
|
+
alignItems: "center",
|
|
2143
|
+
gap: "var(--space-xs)",
|
|
2144
|
+
padding: "var(--space-xs) var(--space-sm)",
|
|
2145
|
+
backgroundColor: "var(--accent-color)",
|
|
2146
|
+
border: "none",
|
|
2147
|
+
borderRadius: "var(--radius-sm)",
|
|
2148
|
+
color: "var(--surface-light)",
|
|
2149
|
+
fontFamily: "var(--font-sans)",
|
|
2150
|
+
fontSize: "0.85rem",
|
|
2151
|
+
fontWeight: 500,
|
|
2152
|
+
cursor: "pointer",
|
|
2153
|
+
transition: "all var(--transition-fast)"
|
|
2154
|
+
},
|
|
2155
|
+
onMouseEnter: (C) => {
|
|
2156
|
+
C.currentTarget.style.opacity = "0.8";
|
|
2157
|
+
},
|
|
2158
|
+
onMouseLeave: (C) => {
|
|
2159
|
+
C.currentTarget.style.opacity = "1";
|
|
2160
|
+
},
|
|
2161
|
+
children: f ? "Show less" : `+${p.length - l} more`
|
|
2162
|
+
}
|
|
2163
|
+
)
|
|
2164
|
+
] }) })
|
|
2165
|
+
] }) });
|
|
2166
|
+
}, re = ({
|
|
2167
|
+
title: o,
|
|
2168
|
+
events: t,
|
|
2169
|
+
viewMorePath: s,
|
|
2170
|
+
showAgencyBadge: i = !1
|
|
2171
|
+
}) => t.length === 0 ? null : /* @__PURE__ */ e.jsx("section", { style: {
|
|
2172
|
+
marginBottom: "var(--space-lg)"
|
|
2173
|
+
}, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2174
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
2175
|
+
display: "flex",
|
|
2176
|
+
justifyContent: "space-between",
|
|
2177
|
+
alignItems: "center",
|
|
2178
|
+
marginBottom: "var(--space-md)"
|
|
2179
|
+
}, children: [
|
|
2180
|
+
/* @__PURE__ */ e.jsx("h2", { style: {
|
|
2181
|
+
margin: 0,
|
|
2182
|
+
fontFamily: "var(--font-serif)",
|
|
2183
|
+
fontSize: "1.5rem",
|
|
2184
|
+
color: "var(--text-color)"
|
|
2185
|
+
}, children: o }),
|
|
2186
|
+
s && /* @__PURE__ */ e.jsx(
|
|
2187
|
+
"a",
|
|
2188
|
+
{
|
|
2189
|
+
href: s,
|
|
2190
|
+
style: {
|
|
2191
|
+
color: "var(--accent-color)",
|
|
2192
|
+
textDecoration: "none",
|
|
2193
|
+
fontFamily: "var(--font-sans)",
|
|
2194
|
+
fontWeight: 600,
|
|
2195
|
+
fontSize: "0.9rem"
|
|
2196
|
+
},
|
|
2197
|
+
children: "View More →"
|
|
2198
|
+
}
|
|
2199
|
+
)
|
|
2200
|
+
] }),
|
|
2201
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
2202
|
+
display: "flex",
|
|
2203
|
+
flexDirection: "column",
|
|
2204
|
+
gap: "var(--space-sm)"
|
|
2205
|
+
}, children: t.map((n) => /* @__PURE__ */ e.jsx(
|
|
2206
|
+
Ur,
|
|
2207
|
+
{
|
|
2208
|
+
event: n,
|
|
2209
|
+
showAgencyBadge: i
|
|
2210
|
+
},
|
|
2211
|
+
n.eventId
|
|
2212
|
+
)) })
|
|
2213
|
+
] }) }), Ur = ({
|
|
2214
|
+
event: o,
|
|
2215
|
+
showAgencyBadge: t
|
|
2216
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
2217
|
+
"div",
|
|
2218
|
+
{
|
|
2219
|
+
style: {
|
|
2220
|
+
padding: "var(--space-md) var(--space-lg)",
|
|
2221
|
+
border: "2px solid var(--border-color)",
|
|
2222
|
+
borderRadius: "var(--radius-md)",
|
|
2223
|
+
backgroundColor: "var(--bg-color)"
|
|
2224
|
+
},
|
|
2225
|
+
children: /* @__PURE__ */ e.jsxs("div", { style: {
|
|
2226
|
+
display: "flex",
|
|
2227
|
+
justifyContent: "space-between",
|
|
2228
|
+
alignItems: "flex-start",
|
|
2229
|
+
gap: "var(--space-md)",
|
|
2230
|
+
flexWrap: "wrap"
|
|
2231
|
+
}, children: [
|
|
2232
|
+
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, minWidth: 200 }, children: [
|
|
2233
|
+
/* @__PURE__ */ e.jsx("h3", { style: {
|
|
2234
|
+
margin: 0,
|
|
2235
|
+
fontFamily: "var(--font-sans)",
|
|
2236
|
+
fontWeight: 600,
|
|
2237
|
+
fontSize: "1rem",
|
|
2238
|
+
color: "var(--text-color)"
|
|
2239
|
+
}, children: o.eventTitle }),
|
|
2240
|
+
o.eventDescription && /* @__PURE__ */ e.jsx("p", { style: {
|
|
2241
|
+
margin: "var(--space-xs) 0 0",
|
|
2242
|
+
fontFamily: "var(--font-sans)",
|
|
2243
|
+
fontSize: "0.9rem",
|
|
2244
|
+
color: "var(--text-color)",
|
|
2245
|
+
opacity: 0.7,
|
|
2246
|
+
display: "-webkit-box",
|
|
2247
|
+
WebkitLineClamp: 2,
|
|
2248
|
+
WebkitBoxOrient: "vertical",
|
|
2249
|
+
overflow: "hidden"
|
|
2250
|
+
}, children: o.eventDescription })
|
|
2251
|
+
] }),
|
|
2252
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
2253
|
+
display: "flex",
|
|
2254
|
+
flexDirection: "column",
|
|
2255
|
+
alignItems: "flex-end",
|
|
2256
|
+
gap: "var(--space-xs)"
|
|
2257
|
+
}, children: [
|
|
2258
|
+
t && /* @__PURE__ */ e.jsx("span", { style: {
|
|
2259
|
+
backgroundColor: "var(--primary-color)",
|
|
2260
|
+
color: "var(--bg-color)",
|
|
2261
|
+
padding: "var(--space-xs) var(--space-sm)",
|
|
2262
|
+
borderRadius: "var(--radius-sm)",
|
|
2263
|
+
fontFamily: "var(--font-sans)",
|
|
2264
|
+
fontWeight: 600,
|
|
2265
|
+
fontSize: "0.75rem",
|
|
2266
|
+
textTransform: "uppercase"
|
|
2267
|
+
}, children: o.agency }),
|
|
2268
|
+
o.eventDate && /* @__PURE__ */ e.jsx("span", { style: {
|
|
2269
|
+
fontFamily: "var(--font-sans)",
|
|
2270
|
+
fontSize: "0.85rem",
|
|
2271
|
+
color: "var(--text-color)",
|
|
2272
|
+
opacity: 0.6
|
|
2273
|
+
}, children: Vr(o.eventDate) }),
|
|
2274
|
+
(o.city || o.state) && /* @__PURE__ */ e.jsx("span", { style: {
|
|
2275
|
+
fontFamily: "var(--font-sans)",
|
|
2276
|
+
fontSize: "0.85rem",
|
|
2277
|
+
color: "var(--text-color)",
|
|
2278
|
+
opacity: 0.6
|
|
2279
|
+
}, children: [o.city, o.state].filter(Boolean).join(", ") }),
|
|
2280
|
+
o.companyName && /* @__PURE__ */ e.jsxs(
|
|
2281
|
+
"a",
|
|
2282
|
+
{
|
|
2283
|
+
href: `/company/${o.companySlug}`,
|
|
2284
|
+
style: {
|
|
2285
|
+
fontFamily: "var(--font-sans)",
|
|
2286
|
+
fontSize: "0.85rem",
|
|
2287
|
+
color: "var(--primary-color)",
|
|
2288
|
+
textDecoration: "none",
|
|
2289
|
+
fontWeight: 600,
|
|
2290
|
+
transition: "color var(--transition-fast)"
|
|
2291
|
+
},
|
|
2292
|
+
onMouseEnter: (s) => s.currentTarget.style.color = "var(--accent-color)",
|
|
2293
|
+
onMouseLeave: (s) => s.currentTarget.style.color = "var(--primary-color)",
|
|
2294
|
+
children: [
|
|
2295
|
+
o.companyName,
|
|
2296
|
+
" →"
|
|
2297
|
+
]
|
|
2298
|
+
}
|
|
2299
|
+
)
|
|
2300
|
+
] })
|
|
2301
|
+
] })
|
|
2302
|
+
}
|
|
2303
|
+
);
|
|
2304
|
+
function Vr(o) {
|
|
2305
|
+
try {
|
|
2306
|
+
return new Date(o).toLocaleDateString("en-US", {
|
|
2307
|
+
year: "numeric",
|
|
2308
|
+
month: "short",
|
|
2309
|
+
day: "numeric"
|
|
2310
|
+
});
|
|
2311
|
+
} catch {
|
|
2312
|
+
return o;
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
const Ye = ({
|
|
2316
|
+
position: o,
|
|
2317
|
+
width: t,
|
|
2318
|
+
height: s
|
|
2319
|
+
}) => {
|
|
2320
|
+
const i = {
|
|
2321
|
+
sidebar: { width: t ?? 280, height: s ?? 250 },
|
|
2322
|
+
"left-sidebar": { width: t ?? "100%", height: s ?? 200 },
|
|
2323
|
+
banner: { width: t ?? "100%", height: s ?? 90 },
|
|
2324
|
+
inline: { width: t ?? "100%", height: s ?? 120 }
|
|
2325
|
+
}, { width: n, height: l } = i[o];
|
|
2326
|
+
return /* @__PURE__ */ e.jsxs(
|
|
2327
|
+
"div",
|
|
2328
|
+
{
|
|
2329
|
+
"data-ad-slot": o,
|
|
2330
|
+
style: {
|
|
2331
|
+
width: n,
|
|
2332
|
+
height: l,
|
|
2333
|
+
backgroundColor: "var(--secondary-color)",
|
|
2334
|
+
border: "2px dashed var(--border-color)",
|
|
2335
|
+
borderRadius: "var(--radius-md)",
|
|
2336
|
+
display: "flex",
|
|
2337
|
+
alignItems: "center",
|
|
2338
|
+
justifyContent: "center",
|
|
2339
|
+
fontFamily: "var(--font-sans)",
|
|
2340
|
+
fontSize: "0.85rem",
|
|
2341
|
+
color: "var(--text-color)",
|
|
2342
|
+
opacity: 0.5
|
|
2343
|
+
},
|
|
2344
|
+
children: [
|
|
2345
|
+
"Ad Placeholder (",
|
|
2346
|
+
o,
|
|
2347
|
+
")"
|
|
2348
|
+
]
|
|
2349
|
+
}
|
|
2350
|
+
);
|
|
2351
|
+
}, X = ({
|
|
2352
|
+
meta: o,
|
|
2353
|
+
showAd: t = !0
|
|
2354
|
+
}) => {
|
|
2355
|
+
if (!o && !t) return null;
|
|
2356
|
+
const s = o ? [
|
|
2357
|
+
o.population && { label: "Population", value: o.population.toLocaleString() },
|
|
2358
|
+
o.industry && { label: "Industry", value: o.industry },
|
|
2359
|
+
o.founded && { label: "Founded", value: o.founded },
|
|
2360
|
+
o.headquarters && { label: "HQ", value: o.headquarters }
|
|
2361
|
+
].filter(Boolean) : [];
|
|
2362
|
+
return /* @__PURE__ */ e.jsxs("aside", { className: "page-sidebar", style: {
|
|
2363
|
+
display: "flex",
|
|
2364
|
+
flexDirection: "column",
|
|
2365
|
+
gap: "var(--space-md)"
|
|
2366
|
+
}, children: [
|
|
2367
|
+
s.length > 0 && /* @__PURE__ */ e.jsxs("div", { style: {
|
|
2368
|
+
padding: "var(--space-lg)",
|
|
2369
|
+
backgroundColor: "var(--bg-color)",
|
|
2370
|
+
border: "2px solid var(--border-color)",
|
|
2371
|
+
borderRadius: "var(--radius-md)"
|
|
2372
|
+
}, children: [
|
|
2373
|
+
(o == null ? void 0 : o.logoUrl) && /* @__PURE__ */ e.jsx("div", { style: {
|
|
2374
|
+
width: 80,
|
|
2375
|
+
height: 80,
|
|
2376
|
+
margin: "0 auto var(--space-md)",
|
|
2377
|
+
borderRadius: "var(--radius-md)",
|
|
2378
|
+
overflow: "hidden",
|
|
2379
|
+
backgroundColor: "white",
|
|
2380
|
+
display: "flex",
|
|
2381
|
+
alignItems: "center",
|
|
2382
|
+
justifyContent: "center"
|
|
2383
|
+
}, children: /* @__PURE__ */ e.jsx(
|
|
2384
|
+
"img",
|
|
2385
|
+
{
|
|
2386
|
+
src: o.logoUrl,
|
|
2387
|
+
alt: "",
|
|
2388
|
+
style: { maxWidth: "100%", maxHeight: "100%" }
|
|
2389
|
+
}
|
|
2390
|
+
) }),
|
|
2391
|
+
(o == null ? void 0 : o.flagUrl) && /* @__PURE__ */ e.jsx("div", { style: {
|
|
2392
|
+
width: "100%",
|
|
2393
|
+
margin: "0 auto var(--space-md)",
|
|
2394
|
+
borderRadius: "var(--radius-sm)",
|
|
2395
|
+
overflow: "hidden",
|
|
2396
|
+
display: "flex",
|
|
2397
|
+
alignItems: "center",
|
|
2398
|
+
justifyContent: "center",
|
|
2399
|
+
border: "1px solid var(--border-color)"
|
|
2400
|
+
}, children: /* @__PURE__ */ e.jsx(
|
|
2401
|
+
"img",
|
|
2402
|
+
{
|
|
2403
|
+
src: o.flagUrl,
|
|
2404
|
+
alt: "",
|
|
2405
|
+
style: { width: "100%", height: "auto", display: "block" }
|
|
2406
|
+
}
|
|
2407
|
+
) }),
|
|
2408
|
+
/* @__PURE__ */ e.jsx("dl", { style: { margin: 0 }, children: s.map(({ label: i, value: n }) => /* @__PURE__ */ e.jsxs(
|
|
2409
|
+
"div",
|
|
2410
|
+
{
|
|
2411
|
+
style: {
|
|
2412
|
+
padding: "var(--space-sm) 0",
|
|
2413
|
+
borderBottom: "1px solid var(--border-color)"
|
|
2414
|
+
},
|
|
2415
|
+
children: [
|
|
2416
|
+
/* @__PURE__ */ e.jsx("dt", { style: {
|
|
2417
|
+
fontFamily: "var(--font-sans)",
|
|
2418
|
+
fontSize: "0.75rem",
|
|
2419
|
+
color: "var(--text-color)",
|
|
2420
|
+
opacity: 0.6,
|
|
2421
|
+
textTransform: "uppercase",
|
|
2422
|
+
letterSpacing: "0.5px",
|
|
2423
|
+
marginBottom: "2px"
|
|
2424
|
+
}, children: i }),
|
|
2425
|
+
/* @__PURE__ */ e.jsx("dd", { style: {
|
|
2426
|
+
margin: 0,
|
|
2427
|
+
fontFamily: "var(--font-sans)",
|
|
2428
|
+
fontSize: "0.9rem",
|
|
2429
|
+
fontWeight: 600,
|
|
2430
|
+
color: "var(--text-color)"
|
|
2431
|
+
}, children: n })
|
|
2432
|
+
]
|
|
2433
|
+
},
|
|
2434
|
+
i
|
|
2435
|
+
)) })
|
|
2436
|
+
] }),
|
|
2437
|
+
t && /* @__PURE__ */ e.jsx(Ye, { position: "sidebar" })
|
|
2438
|
+
] });
|
|
2439
|
+
}, q = ({
|
|
2440
|
+
showAd: o = !0
|
|
2441
|
+
}) => /* @__PURE__ */ e.jsxs("aside", { className: "page-filters", style: {
|
|
2442
|
+
display: "flex",
|
|
2443
|
+
flexDirection: "column",
|
|
2444
|
+
gap: "var(--space-md)"
|
|
2445
|
+
}, children: [
|
|
2446
|
+
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
2447
|
+
padding: "var(--space-md)",
|
|
2448
|
+
backgroundColor: "var(--bg-color)",
|
|
2449
|
+
border: "2px solid var(--border-color)",
|
|
2450
|
+
borderRadius: "var(--radius-md)"
|
|
2451
|
+
}, children: [
|
|
2452
|
+
/* @__PURE__ */ e.jsx("h3", { style: {
|
|
2453
|
+
margin: "0 0 var(--space-md)",
|
|
2454
|
+
fontFamily: "var(--font-serif)",
|
|
2455
|
+
fontSize: "1.1rem",
|
|
2456
|
+
color: "var(--text-color)"
|
|
2457
|
+
}, children: "Filters" }),
|
|
2458
|
+
/* @__PURE__ */ e.jsxs("div", { style: { marginBottom: "var(--space-md)" }, children: [
|
|
2459
|
+
/* @__PURE__ */ e.jsx("label", { style: {
|
|
2460
|
+
display: "block",
|
|
2461
|
+
fontSize: "0.85rem",
|
|
2462
|
+
fontWeight: 500,
|
|
2463
|
+
marginBottom: "var(--space-xs)",
|
|
2464
|
+
color: "var(--text-color)"
|
|
2465
|
+
}, children: "Date Range" }),
|
|
2466
|
+
/* @__PURE__ */ e.jsxs("select", { style: {
|
|
2467
|
+
width: "100%",
|
|
2468
|
+
padding: "var(--space-sm)",
|
|
2469
|
+
borderRadius: "var(--radius-sm)",
|
|
2470
|
+
border: "1px solid var(--border-color)",
|
|
2471
|
+
backgroundColor: "var(--bg-color)",
|
|
2472
|
+
color: "var(--text-color)",
|
|
2473
|
+
fontSize: "0.9rem"
|
|
2474
|
+
}, children: [
|
|
2475
|
+
/* @__PURE__ */ e.jsx("option", { children: "All Time" }),
|
|
2476
|
+
/* @__PURE__ */ e.jsx("option", { children: "Last Year" }),
|
|
2477
|
+
/* @__PURE__ */ e.jsx("option", { children: "Last 5 Years" }),
|
|
2478
|
+
/* @__PURE__ */ e.jsx("option", { children: "Last 10 Years" })
|
|
2479
|
+
] })
|
|
2480
|
+
] }),
|
|
2481
|
+
/* @__PURE__ */ e.jsxs("div", { style: { marginBottom: "var(--space-md)" }, children: [
|
|
2482
|
+
/* @__PURE__ */ e.jsx("label", { style: {
|
|
2483
|
+
display: "block",
|
|
2484
|
+
fontSize: "0.85rem",
|
|
2485
|
+
fontWeight: 500,
|
|
2486
|
+
marginBottom: "var(--space-xs)",
|
|
2487
|
+
color: "var(--text-color)"
|
|
2488
|
+
}, children: "Severity" }),
|
|
2489
|
+
/* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "var(--space-xs)" }, children: ["All", "Fatalities", "Hospitalizations", "Amputations"].map((t) => /* @__PURE__ */ e.jsxs("label", { style: {
|
|
2490
|
+
display: "flex",
|
|
2491
|
+
alignItems: "center",
|
|
2492
|
+
gap: "var(--space-xs)",
|
|
2493
|
+
fontSize: "0.85rem",
|
|
2494
|
+
cursor: "pointer"
|
|
2495
|
+
}, children: [
|
|
2496
|
+
/* @__PURE__ */ e.jsx(
|
|
2497
|
+
"input",
|
|
2498
|
+
{
|
|
2499
|
+
type: "checkbox",
|
|
2500
|
+
defaultChecked: t === "All",
|
|
2501
|
+
style: { accentColor: "var(--primary-color)" }
|
|
2502
|
+
}
|
|
2503
|
+
),
|
|
2504
|
+
t
|
|
2505
|
+
] }, t)) })
|
|
2506
|
+
] }),
|
|
2507
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2508
|
+
/* @__PURE__ */ e.jsx("label", { style: {
|
|
2509
|
+
display: "block",
|
|
2510
|
+
fontSize: "0.85rem",
|
|
2511
|
+
fontWeight: 500,
|
|
2512
|
+
marginBottom: "var(--space-xs)",
|
|
2513
|
+
color: "var(--text-color)"
|
|
2514
|
+
}, children: "Sort By" }),
|
|
2515
|
+
/* @__PURE__ */ e.jsxs("select", { style: {
|
|
2516
|
+
width: "100%",
|
|
2517
|
+
padding: "var(--space-sm)",
|
|
2518
|
+
borderRadius: "var(--radius-sm)",
|
|
2519
|
+
border: "1px solid var(--border-color)",
|
|
2520
|
+
backgroundColor: "var(--bg-color)",
|
|
2521
|
+
color: "var(--text-color)",
|
|
2522
|
+
fontSize: "0.9rem"
|
|
2523
|
+
}, children: [
|
|
2524
|
+
/* @__PURE__ */ e.jsx("option", { children: "Most Incidents" }),
|
|
2525
|
+
/* @__PURE__ */ e.jsx("option", { children: "Most Recent" }),
|
|
2526
|
+
/* @__PURE__ */ e.jsx("option", { children: "Highest Fines" }),
|
|
2527
|
+
/* @__PURE__ */ e.jsx("option", { children: "Alphabetical" })
|
|
2528
|
+
] })
|
|
2529
|
+
] })
|
|
2530
|
+
] }),
|
|
2531
|
+
o && /* @__PURE__ */ e.jsx(Ye, { position: "left-sidebar" })
|
|
2532
|
+
] }), ao = ({
|
|
2533
|
+
brand: o,
|
|
2534
|
+
data: t,
|
|
2535
|
+
onAccountClick: s,
|
|
2536
|
+
onNotificationClick: i
|
|
2537
|
+
}) => {
|
|
2538
|
+
const n = [
|
|
2539
|
+
{ label: "Explore", path: "/explore" },
|
|
2540
|
+
{ label: t.name }
|
|
2541
|
+
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2542
|
+
value: t.stats.score,
|
|
2543
|
+
label: o.scoreConfig.name,
|
|
2544
|
+
betaDisclaimer: o.scoreConfig.betaDisclaimer
|
|
2545
|
+
} : void 0;
|
|
2546
|
+
return /* @__PURE__ */ e.jsxs(
|
|
2547
|
+
U,
|
|
2548
|
+
{
|
|
2549
|
+
brand: o,
|
|
2550
|
+
onAccountClick: s,
|
|
2551
|
+
onNotificationClick: i,
|
|
2552
|
+
children: [
|
|
2553
|
+
/* @__PURE__ */ e.jsx(
|
|
2554
|
+
V,
|
|
2555
|
+
{
|
|
2556
|
+
title: t.name,
|
|
2557
|
+
subtitle: o.tagline || "Explore worker safety data across the nation",
|
|
2558
|
+
breadcrumbs: n,
|
|
2559
|
+
score: l
|
|
2560
|
+
}
|
|
2561
|
+
),
|
|
2562
|
+
/* @__PURE__ */ e.jsxs("div", { className: "page-layout", children: [
|
|
2563
|
+
/* @__PURE__ */ e.jsx(q, { showAd: !0 }),
|
|
2564
|
+
/* @__PURE__ */ e.jsxs("main", { className: "page-main", children: [
|
|
2565
|
+
/* @__PURE__ */ e.jsx(H, { stats: t.stats, columns: 4 }),
|
|
2566
|
+
/* @__PURE__ */ e.jsx(
|
|
2567
|
+
ee,
|
|
2568
|
+
{
|
|
2569
|
+
title: "States & Territories",
|
|
2570
|
+
items: t.directory,
|
|
2571
|
+
basePath: "",
|
|
2572
|
+
initialLimit: 60
|
|
2573
|
+
}
|
|
2574
|
+
)
|
|
2575
|
+
] }),
|
|
2576
|
+
/* @__PURE__ */ e.jsx(X, { meta: t.meta, showAd: !0 })
|
|
2577
|
+
] })
|
|
2578
|
+
]
|
|
2579
|
+
}
|
|
2580
|
+
);
|
|
2581
|
+
}, no = ({
|
|
2582
|
+
brand: o,
|
|
2583
|
+
data: t,
|
|
2584
|
+
onAccountClick: s,
|
|
2585
|
+
onNotificationClick: i
|
|
2586
|
+
}) => {
|
|
2587
|
+
const n = [
|
|
2588
|
+
{ label: "USA", path: "/explore" },
|
|
2589
|
+
{ label: t.name }
|
|
2590
|
+
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2591
|
+
value: t.stats.score,
|
|
2592
|
+
label: o.scoreConfig.name,
|
|
2593
|
+
betaDisclaimer: o.scoreConfig.betaDisclaimer
|
|
2594
|
+
} : void 0, c = Object.keys(t.recentByAgency);
|
|
2595
|
+
return /* @__PURE__ */ e.jsxs(
|
|
2596
|
+
U,
|
|
2597
|
+
{
|
|
2598
|
+
brand: o,
|
|
2599
|
+
onAccountClick: s,
|
|
2600
|
+
onNotificationClick: i,
|
|
2601
|
+
children: [
|
|
2602
|
+
/* @__PURE__ */ e.jsx(
|
|
2603
|
+
V,
|
|
2604
|
+
{
|
|
2605
|
+
title: t.name,
|
|
2606
|
+
subtitle: `Worker safety data for ${t.name}`,
|
|
2607
|
+
breadcrumbs: n,
|
|
2608
|
+
score: l
|
|
2609
|
+
}
|
|
2610
|
+
),
|
|
2611
|
+
/* @__PURE__ */ e.jsxs("div", { className: "page-layout", children: [
|
|
2612
|
+
/* @__PURE__ */ e.jsx(q, { showAd: !0 }),
|
|
2613
|
+
/* @__PURE__ */ e.jsxs("main", { className: "page-main", children: [
|
|
2614
|
+
/* @__PURE__ */ e.jsx(H, { stats: t.stats }),
|
|
2615
|
+
/* @__PURE__ */ e.jsx(
|
|
2616
|
+
ee,
|
|
2617
|
+
{
|
|
2618
|
+
title: "Cities",
|
|
2619
|
+
items: t.directory,
|
|
2620
|
+
basePath: `/${t.slug.toLowerCase()}`
|
|
2621
|
+
}
|
|
2622
|
+
),
|
|
2623
|
+
c.map((u) => /* @__PURE__ */ e.jsx(
|
|
2624
|
+
re,
|
|
2625
|
+
{
|
|
2626
|
+
title: `Recent ${u} Incidents`,
|
|
2627
|
+
events: t.recentByAgency[u],
|
|
2628
|
+
viewMorePath: `/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,
|
|
2629
|
+
showAgencyBadge: !1
|
|
2630
|
+
},
|
|
2631
|
+
u
|
|
2632
|
+
))
|
|
2633
|
+
] }),
|
|
2634
|
+
/* @__PURE__ */ e.jsx(X, { meta: t.meta, showAd: !0 })
|
|
2635
|
+
] })
|
|
2636
|
+
]
|
|
2637
|
+
}
|
|
2638
|
+
);
|
|
2639
|
+
}, so = ({
|
|
2640
|
+
brand: o,
|
|
2641
|
+
data: t,
|
|
2642
|
+
onAccountClick: s,
|
|
2643
|
+
onNotificationClick: i
|
|
2644
|
+
}) => {
|
|
2645
|
+
const n = [
|
|
2646
|
+
{ label: "USA", path: "/explore" },
|
|
2647
|
+
{ label: t.stateName, path: `/${t.state.toLowerCase()}` },
|
|
2648
|
+
{ label: t.name }
|
|
2649
|
+
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2650
|
+
value: t.stats.score,
|
|
2651
|
+
label: o.scoreConfig.name,
|
|
2652
|
+
betaDisclaimer: o.scoreConfig.betaDisclaimer
|
|
2653
|
+
} : void 0, c = Object.keys(t.recentByAgency), u = `/${t.state.toLowerCase()}/${t.slug}`;
|
|
2654
|
+
return /* @__PURE__ */ e.jsxs(
|
|
2655
|
+
U,
|
|
2656
|
+
{
|
|
2657
|
+
brand: o,
|
|
2658
|
+
onAccountClick: s,
|
|
2659
|
+
onNotificationClick: i,
|
|
2660
|
+
children: [
|
|
2661
|
+
/* @__PURE__ */ e.jsx(
|
|
2662
|
+
V,
|
|
2663
|
+
{
|
|
2664
|
+
title: `${t.name}, ${t.state}`,
|
|
2665
|
+
subtitle: `Worker safety data for ${t.name}`,
|
|
2666
|
+
breadcrumbs: n,
|
|
2667
|
+
score: l
|
|
2668
|
+
}
|
|
2669
|
+
),
|
|
2670
|
+
/* @__PURE__ */ e.jsxs("div", { className: "page-layout", children: [
|
|
2671
|
+
/* @__PURE__ */ e.jsx(q, { showAd: !0 }),
|
|
2672
|
+
/* @__PURE__ */ e.jsxs("main", { className: "page-main", children: [
|
|
2673
|
+
/* @__PURE__ */ e.jsx(H, { stats: t.stats }),
|
|
2674
|
+
/* @__PURE__ */ e.jsx(
|
|
2675
|
+
ee,
|
|
2676
|
+
{
|
|
2677
|
+
title: "Companies",
|
|
2678
|
+
items: t.directory,
|
|
2679
|
+
basePath: "/company"
|
|
2680
|
+
}
|
|
2681
|
+
),
|
|
2682
|
+
c.map((f) => /* @__PURE__ */ e.jsx(
|
|
2683
|
+
re,
|
|
2684
|
+
{
|
|
2685
|
+
title: `Recent ${f} Incidents`,
|
|
2686
|
+
events: t.recentByAgency[f],
|
|
2687
|
+
viewMorePath: `${u}/events/${f.toLowerCase()}`,
|
|
2688
|
+
showAgencyBadge: !1
|
|
2689
|
+
},
|
|
2690
|
+
f
|
|
2691
|
+
))
|
|
2692
|
+
] }),
|
|
2693
|
+
/* @__PURE__ */ e.jsx(X, { meta: t.meta, showAd: !0 })
|
|
2694
|
+
] })
|
|
2695
|
+
]
|
|
2696
|
+
}
|
|
2697
|
+
);
|
|
2698
|
+
}, io = ({
|
|
2699
|
+
brand: o,
|
|
2700
|
+
data: t,
|
|
2701
|
+
onAccountClick: s,
|
|
2702
|
+
onNotificationClick: i
|
|
2703
|
+
}) => {
|
|
2704
|
+
var u;
|
|
2705
|
+
const n = [
|
|
2706
|
+
{ label: "USA", path: "/explore" },
|
|
2707
|
+
{ label: "Companies", path: "/companies" },
|
|
2708
|
+
{ label: t.name }
|
|
2709
|
+
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2710
|
+
value: t.stats.score,
|
|
2711
|
+
label: o.scoreConfig.name,
|
|
2712
|
+
betaDisclaimer: o.scoreConfig.betaDisclaimer
|
|
2713
|
+
} : void 0, c = t.sites && t.sites.length > 0;
|
|
2714
|
+
return /* @__PURE__ */ e.jsxs(
|
|
2715
|
+
U,
|
|
2716
|
+
{
|
|
2717
|
+
brand: o,
|
|
2718
|
+
onAccountClick: s,
|
|
2719
|
+
onNotificationClick: i,
|
|
2720
|
+
children: [
|
|
2721
|
+
/* @__PURE__ */ e.jsx(
|
|
2722
|
+
V,
|
|
2723
|
+
{
|
|
2724
|
+
title: t.name,
|
|
2725
|
+
subtitle: (u = t.meta) != null && u.industry ? `${t.meta.industry}` : void 0,
|
|
2726
|
+
breadcrumbs: n,
|
|
2727
|
+
score: l
|
|
2728
|
+
}
|
|
2729
|
+
),
|
|
2730
|
+
/* @__PURE__ */ e.jsxs("div", { className: "page-layout", children: [
|
|
2731
|
+
/* @__PURE__ */ e.jsx(q, { showAd: !0 }),
|
|
2732
|
+
/* @__PURE__ */ e.jsxs("main", { className: "page-main", children: [
|
|
2733
|
+
/* @__PURE__ */ e.jsx(H, { stats: t.stats }),
|
|
2734
|
+
c && /* @__PURE__ */ e.jsx(
|
|
2735
|
+
ee,
|
|
2736
|
+
{
|
|
2737
|
+
title: "Locations",
|
|
2738
|
+
items: t.sites,
|
|
2739
|
+
basePath: `/company/${t.slug}/site`
|
|
2740
|
+
}
|
|
2741
|
+
),
|
|
2742
|
+
/* @__PURE__ */ e.jsx(
|
|
2743
|
+
re,
|
|
2744
|
+
{
|
|
2745
|
+
title: "Recent Incidents",
|
|
2746
|
+
events: t.recentEvents.slice(0, c ? 5 : 10),
|
|
2747
|
+
viewMorePath: `/company/${t.slug}/events`,
|
|
2748
|
+
showAgencyBadge: !0
|
|
2749
|
+
}
|
|
2750
|
+
)
|
|
2751
|
+
] }),
|
|
2752
|
+
/* @__PURE__ */ e.jsx(X, { meta: t.meta, showAd: !0 })
|
|
2753
|
+
] })
|
|
2754
|
+
]
|
|
2755
|
+
}
|
|
2756
|
+
);
|
|
2757
|
+
}, lo = ({
|
|
2758
|
+
brand: o,
|
|
2759
|
+
data: t,
|
|
2760
|
+
onAccountClick: s,
|
|
2761
|
+
onNotificationClick: i
|
|
2762
|
+
}) => {
|
|
2763
|
+
const n = [
|
|
2764
|
+
{ label: "USA", path: "/explore" },
|
|
2765
|
+
{ label: "Companies", path: "/companies" },
|
|
2766
|
+
{ label: t.companyName, path: `/company/${t.companySlug}` },
|
|
2767
|
+
{ label: `#${t.siteId}` }
|
|
2768
|
+
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2769
|
+
value: t.stats.score,
|
|
2770
|
+
label: o.scoreConfig.name,
|
|
2771
|
+
betaDisclaimer: o.scoreConfig.betaDisclaimer
|
|
2772
|
+
} : void 0;
|
|
2773
|
+
return /* @__PURE__ */ e.jsxs(
|
|
2774
|
+
U,
|
|
2775
|
+
{
|
|
2776
|
+
brand: o,
|
|
2777
|
+
onAccountClick: s,
|
|
2778
|
+
onNotificationClick: i,
|
|
2779
|
+
children: [
|
|
2780
|
+
/* @__PURE__ */ e.jsx(
|
|
2781
|
+
V,
|
|
2782
|
+
{
|
|
2783
|
+
title: t.name,
|
|
2784
|
+
subtitle: `Location #${t.siteId} of ${t.companyName}`,
|
|
2785
|
+
breadcrumbs: n,
|
|
2786
|
+
score: l
|
|
2787
|
+
}
|
|
2788
|
+
),
|
|
2789
|
+
/* @__PURE__ */ e.jsxs("div", { className: "page-layout", children: [
|
|
2790
|
+
/* @__PURE__ */ e.jsx(q, { showAd: !0 }),
|
|
2791
|
+
/* @__PURE__ */ e.jsxs("main", { className: "page-main", children: [
|
|
2792
|
+
/* @__PURE__ */ e.jsx(H, { stats: t.stats }),
|
|
2793
|
+
t.siblings && t.siblings.length > 0 && /* @__PURE__ */ e.jsxs("section", { style: {
|
|
2794
|
+
padding: "var(--space-lg)",
|
|
2795
|
+
backgroundColor: "var(--bg-color)",
|
|
2796
|
+
marginBottom: "var(--space-lg)",
|
|
2797
|
+
borderRadius: "var(--radius-md)",
|
|
2798
|
+
border: "1px solid var(--border-color)"
|
|
2799
|
+
}, children: [
|
|
2800
|
+
/* @__PURE__ */ e.jsx("h2", { style: {
|
|
2801
|
+
margin: "0 0 var(--space-md)",
|
|
2802
|
+
fontFamily: "var(--font-serif)",
|
|
2803
|
+
fontSize: "1.5rem",
|
|
2804
|
+
color: "var(--text-color)"
|
|
2805
|
+
}, children: "Compare to Other Locations" }),
|
|
2806
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
2807
|
+
display: "flex",
|
|
2808
|
+
flexWrap: "wrap",
|
|
2809
|
+
gap: "var(--space-sm)"
|
|
2810
|
+
}, children: t.siblings.slice(0, 10).map((c) => /* @__PURE__ */ e.jsxs(
|
|
2811
|
+
"a",
|
|
2812
|
+
{
|
|
2813
|
+
href: `/company/${t.companySlug}/site/${c.slug}`,
|
|
2814
|
+
style: {
|
|
2815
|
+
padding: "var(--space-sm) var(--space-md)",
|
|
2816
|
+
backgroundColor: "var(--secondary-color)",
|
|
2817
|
+
borderRadius: "var(--radius-md)",
|
|
2818
|
+
textDecoration: "none",
|
|
2819
|
+
color: "var(--text-dark)",
|
|
2820
|
+
fontFamily: "var(--font-sans)",
|
|
2821
|
+
fontSize: "0.9rem",
|
|
2822
|
+
display: "flex",
|
|
2823
|
+
alignItems: "center",
|
|
2824
|
+
gap: "var(--space-xs)",
|
|
2825
|
+
transition: "background var(--transition-fast)"
|
|
2826
|
+
},
|
|
2827
|
+
onMouseEnter: (u) => u.currentTarget.style.backgroundColor = "var(--accent-color)",
|
|
2828
|
+
onMouseLeave: (u) => u.currentTarget.style.backgroundColor = "var(--secondary-color)",
|
|
2829
|
+
children: [
|
|
2830
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
2831
|
+
"#",
|
|
2832
|
+
c.name
|
|
2833
|
+
] }),
|
|
2834
|
+
/* @__PURE__ */ e.jsx("span", { style: {
|
|
2835
|
+
backgroundColor: "var(--primary-color)",
|
|
2836
|
+
color: "var(--text-dark)",
|
|
2837
|
+
padding: "2px 6px",
|
|
2838
|
+
borderRadius: "var(--radius-sm)",
|
|
2839
|
+
fontSize: "0.75rem"
|
|
2840
|
+
}, children: c.count })
|
|
2841
|
+
]
|
|
2842
|
+
},
|
|
2843
|
+
c.slug
|
|
2844
|
+
)) })
|
|
2845
|
+
] }),
|
|
2846
|
+
/* @__PURE__ */ e.jsx(
|
|
2847
|
+
re,
|
|
2848
|
+
{
|
|
2849
|
+
title: "Recent Incidents",
|
|
2850
|
+
events: t.recentEvents,
|
|
2851
|
+
viewMorePath: `/company/${t.companySlug}/site/${t.siteId}/events`,
|
|
2852
|
+
showAgencyBadge: !0
|
|
2853
|
+
}
|
|
2854
|
+
)
|
|
2855
|
+
] }),
|
|
2856
|
+
/* @__PURE__ */ e.jsx(X, { meta: t.meta, showAd: !0 })
|
|
2857
|
+
] })
|
|
2858
|
+
]
|
|
2859
|
+
}
|
|
2860
|
+
);
|
|
2861
|
+
};
|
|
2862
|
+
export {
|
|
2863
|
+
Ye as AdSlot,
|
|
2864
|
+
Zr as Alert,
|
|
2865
|
+
Jr as Badge,
|
|
2866
|
+
Xr as Button,
|
|
2867
|
+
qr as Card,
|
|
2868
|
+
so as CityPage,
|
|
2869
|
+
io as CompanyPage,
|
|
2870
|
+
ee as Directory,
|
|
2871
|
+
q as FilterSidebar,
|
|
2872
|
+
$r as Footer,
|
|
2873
|
+
Dr as Header,
|
|
2874
|
+
V as Hero,
|
|
2875
|
+
X as InfoSidebar,
|
|
2876
|
+
Kr as Input,
|
|
2877
|
+
oo as LoadingOverlay,
|
|
2878
|
+
Yr as MobileAdBanner,
|
|
2879
|
+
Qr as Modal,
|
|
2880
|
+
ao as NationPage,
|
|
2881
|
+
re as RecentEvents,
|
|
2882
|
+
U as Shell,
|
|
2883
|
+
lo as SitePage,
|
|
2884
|
+
$e as Skeleton,
|
|
2885
|
+
to as SkeletonCard,
|
|
2886
|
+
Mr as SkeletonText,
|
|
2887
|
+
Ir as Spinner,
|
|
2888
|
+
H as StatGrid,
|
|
2889
|
+
no as StatePage,
|
|
2890
|
+
Gr as Table,
|
|
2891
|
+
eo as Tabs,
|
|
2892
|
+
ro as Tooltip,
|
|
2893
|
+
Tr as applyTheme,
|
|
2894
|
+
Rr as useTheme
|
|
2895
|
+
};
|