@sirsluginston/sharedui 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sharedui.js CHANGED
@@ -1,24 +1,4 @@
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
- }
1
+ import ue, { useEffect as N, useState as P, useRef as Ae, useCallback as Sr } from "react";
22
2
  var de = { exports: {} }, $ = {};
23
3
  /**
24
4
  * @license React
@@ -30,7 +10,7 @@ var de = { exports: {} }, $ = {};
30
10
  * LICENSE file in the root directory of this source tree.
31
11
  */
32
12
  var Le;
33
- function Er() {
13
+ function Rr() {
34
14
  if (Le) return $;
35
15
  Le = 1;
36
16
  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 };
@@ -54,7 +34,7 @@ var Y = {};
54
34
  * LICENSE file in the root directory of this source tree.
55
35
  */
56
36
  var Be;
57
- function Fr() {
37
+ function Tr() {
58
38
  return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
59
39
  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
40
  function Ne(r) {
@@ -643,7 +623,7 @@ React keys must be passed directly to JSX without using spread:
643
623
  Y.Fragment = i, Y.jsx = jr, Y.jsxs = kr;
644
624
  }()), Y;
645
625
  }
646
- process.env.NODE_ENV === "production" ? de.exports = Er() : de.exports = Fr();
626
+ process.env.NODE_ENV === "production" ? de.exports = Rr() : de.exports = Tr();
647
627
  var e = de.exports;
648
628
  const Xr = ({
649
629
  variant: o = "primary",
@@ -723,12 +703,12 @@ const Xr = ({
723
703
  p.currentTarget.style.transform = "translate(0, 0)", p.currentTarget.style.boxShadow = f[o].boxShadow || "none", (h = c.onMouseLeave) == null || h.call(c, p);
724
704
  },
725
705
  children: [
726
- s ? /* @__PURE__ */ e.jsx(_r, { size: 16 }) : i,
706
+ s ? /* @__PURE__ */ e.jsx(Er, { size: 16 }) : i,
727
707
  n
728
708
  ]
729
709
  }
730
710
  );
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: [
711
+ }, Er = ({ size: o }) => /* @__PURE__ */ e.jsxs("svg", { width: o, height: o, viewBox: "0 0 24 24", style: { animation: "spin 0.8s linear infinite" }, children: [
732
712
  /* @__PURE__ */ e.jsx(
733
713
  "circle",
734
714
  {
@@ -1357,7 +1337,7 @@ const Qr = ({
1357
1337
  ]
1358
1338
  }
1359
1339
  );
1360
- }, Ir = ({
1340
+ }, Fr = ({
1361
1341
  size: o = "md",
1362
1342
  color: t = "var(--primary-color)"
1363
1343
  }) => {
@@ -1412,7 +1392,7 @@ const Qr = ({
1412
1392
  gap: "var(--space-md)",
1413
1393
  zIndex: 1e3
1414
1394
  }, children: [
1415
- /* @__PURE__ */ e.jsx(Ir, { size: "lg", color: "var(--surface-light)" }),
1395
+ /* @__PURE__ */ e.jsx(Fr, { size: "lg", color: "var(--surface-light)" }),
1416
1396
  /* @__PURE__ */ e.jsx("span", { style: {
1417
1397
  fontFamily: "var(--font-sans)",
1418
1398
  fontSize: "1rem",
@@ -1461,7 +1441,7 @@ const Qr = ({
1461
1441
  ` })
1462
1442
  }
1463
1443
  );
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(
1444
+ }, _r = ({ 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
1445
  $e,
1466
1446
  {
1467
1447
  width: s === o - 1 ? "60%" : "100%",
@@ -1477,8 +1457,8 @@ const Qr = ({
1477
1457
  gap: "var(--space-md)"
1478
1458
  }, children: [
1479
1459
  /* @__PURE__ */ e.jsx($e, { height: 24, width: "50%" }),
1480
- /* @__PURE__ */ e.jsx(Mr, { lines: 3 })
1481
- ] }), Dr = ({
1460
+ /* @__PURE__ */ e.jsx(_r, { lines: 3 })
1461
+ ] }), Ir = ({
1482
1462
  brand: o,
1483
1463
  darkMode: t,
1484
1464
  onThemeToggle: s,
@@ -1538,7 +1518,7 @@ const Qr = ({
1538
1518
  flex: 1,
1539
1519
  justifyContent: "center"
1540
1520
  }, children: h.map((b) => /* @__PURE__ */ e.jsx(
1541
- zr,
1521
+ Mr,
1542
1522
  {
1543
1523
  item: b,
1544
1524
  isActive: j === b.label,
@@ -1554,17 +1534,17 @@ const Qr = ({
1554
1534
  gap: "var(--space-xs)",
1555
1535
  flexShrink: 0
1556
1536
  }, 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, {}) })
1537
+ l && /* @__PURE__ */ e.jsx(Z, { onClick: () => f(!u), label: "Menu", size: 36, children: /* @__PURE__ */ e.jsx(Lr, {}) }),
1538
+ /* @__PURE__ */ e.jsx(Z, { onClick: s, label: "Toggle theme", size: 36, children: t ? /* @__PURE__ */ e.jsx(Pr, {}) : /* @__PURE__ */ e.jsx(zr, {}) }),
1539
+ !l && n && /* @__PURE__ */ e.jsx(Z, { onClick: n, label: "Notifications", size: 36, children: /* @__PURE__ */ e.jsx(Wr, {}) }),
1540
+ /* @__PURE__ */ e.jsx(Z, { onClick: i, label: "Account", size: 40, children: /* @__PURE__ */ e.jsx(Ar, {}) })
1561
1541
  ] })
1562
1542
  ] }),
1563
1543
  l && u && /* @__PURE__ */ e.jsx("div", { style: {
1564
1544
  backgroundColor: "var(--bg-color)",
1565
1545
  borderTop: "1px solid var(--border-color)",
1566
1546
  padding: "var(--space-sm)"
1567
- }, children: h.map((b) => /* @__PURE__ */ e.jsx(Pr, { item: b, onClose: () => f(!1) }, b.label)) })
1547
+ }, children: h.map((b) => /* @__PURE__ */ e.jsx(Dr, { item: b, onClose: () => f(!1) }, b.label)) })
1568
1548
  ] });
1569
1549
  }, Z = ({ onClick: o, label: t, size: s = 36, children: i }) => /* @__PURE__ */ e.jsx(
1570
1550
  "button",
@@ -1588,7 +1568,7 @@ const Qr = ({
1588
1568
  onMouseLeave: (n) => n.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)",
1589
1569
  children: i
1590
1570
  }
1591
- ), zr = ({ item: o, isActive: t, onHover: s, onLeave: i }) => /* @__PURE__ */ e.jsxs(
1571
+ ), Mr = ({ item: o, isActive: t, onHover: s, onLeave: i }) => /* @__PURE__ */ e.jsxs(
1592
1572
  "div",
1593
1573
  {
1594
1574
  onMouseEnter: () => o.children && s(o.label),
@@ -1657,7 +1637,7 @@ const Qr = ({
1657
1637
  )) })
1658
1638
  ]
1659
1639
  }
1660
- ), Pr = ({ item: o, onClose: t }) => /* @__PURE__ */ e.jsx(
1640
+ ), Dr = ({ item: o, onClose: t }) => /* @__PURE__ */ e.jsx(
1661
1641
  "button",
1662
1642
  {
1663
1643
  onClick: () => {
@@ -1680,13 +1660,13 @@ const Qr = ({
1680
1660
  },
1681
1661
  children: o.label
1682
1662
  }
1683
- ), Wr = () => /* @__PURE__ */ e.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1663
+ ), zr = () => /* @__PURE__ */ e.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1684
1664
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "5" }),
1685
1665
  /* @__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: [
1666
+ ] }), Pr = () => /* @__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" }) }), Wr = () => /* @__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" }) }), Ar = () => /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1687
1667
  /* @__PURE__ */ e.jsx("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
1688
1668
  /* @__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 = ({
1669
+ ] }), 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: "M3 12h18M3 6h18M3 18h18" }) }), Br = ({
1690
1670
  copyrightBrand: o,
1691
1671
  yearCreated: t,
1692
1672
  poweredBy: s,
@@ -1753,7 +1733,7 @@ const Qr = ({
1753
1733
  /* @__PURE__ */ e.jsx("span", { style: { color: "var(--org-color)", fontWeight: 600 }, children: s })
1754
1734
  ] })
1755
1735
  ] }) });
1756
- }, Yr = () => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1736
+ }, Or = () => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1757
1737
  /* @__PURE__ */ e.jsx("style", { children: `
1758
1738
  .mobile-ad-banner {
1759
1739
  display: none;
@@ -1796,16 +1776,37 @@ const Qr = ({
1796
1776
  children: "Ad (468×60)"
1797
1777
  }
1798
1778
  ) })
1799
- ] }), U = ({
1779
+ ] });
1780
+ function $r(o) {
1781
+ const [t, s] = P(() => {
1782
+ if (typeof window > "u") return !1;
1783
+ const n = localStorage.getItem("theme-mode");
1784
+ return n ? n === "dark" : o.theme.defaultTheme === "dark" ? !0 : o.theme.defaultTheme === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !1;
1785
+ });
1786
+ N(() => {
1787
+ Yr(o.theme);
1788
+ }, [o.theme]), N(() => {
1789
+ document.body.classList.toggle("dark-mode", t), localStorage.setItem("theme-mode", t ? "dark" : "light");
1790
+ }, [t]);
1791
+ const i = Sr(() => {
1792
+ s((n) => !n);
1793
+ }, []);
1794
+ return { darkMode: t, toggleDarkMode: i };
1795
+ }
1796
+ function Yr(o) {
1797
+ const t = document.documentElement;
1798
+ 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);
1799
+ }
1800
+ const U = ({
1800
1801
  brand: o,
1801
1802
  children: t,
1802
1803
  onAccountClick: s,
1803
1804
  onNotificationClick: i
1804
1805
  }) => {
1805
- const { darkMode: n, toggleDarkMode: l } = Rr(o);
1806
+ const { darkMode: n, toggleDarkMode: l } = $r(o);
1806
1807
  return /* @__PURE__ */ e.jsxs("div", { className: "shell", style: { display: "flex", flexDirection: "column", minHeight: "100vh" }, children: [
1807
1808
  /* @__PURE__ */ e.jsx(
1808
- Dr,
1809
+ Ir,
1809
1810
  {
1810
1811
  brand: o,
1811
1812
  darkMode: n,
@@ -1819,10 +1820,10 @@ const Qr = ({
1819
1820
  flex: 1,
1820
1821
  backgroundColor: "var(--bg-color)"
1821
1822
  }, children: t }),
1822
- /* @__PURE__ */ e.jsx(Yr, {})
1823
+ /* @__PURE__ */ e.jsx(Or, {})
1823
1824
  ] }),
1824
1825
  /* @__PURE__ */ e.jsx(
1825
- $r,
1826
+ Br,
1826
1827
  {
1827
1828
  copyrightBrand: o.footer.copyrightBrand,
1828
1829
  yearCreated: o.footer.yearCreated,
@@ -2869,13 +2870,13 @@ export {
2869
2870
  io as CompanyPage,
2870
2871
  ee as Directory,
2871
2872
  q as FilterSidebar,
2872
- $r as Footer,
2873
- Dr as Header,
2873
+ Br as Footer,
2874
+ Ir as Header,
2874
2875
  V as Hero,
2875
2876
  X as InfoSidebar,
2876
2877
  Kr as Input,
2877
2878
  oo as LoadingOverlay,
2878
- Yr as MobileAdBanner,
2879
+ Or as MobileAdBanner,
2879
2880
  Qr as Modal,
2880
2881
  ao as NationPage,
2881
2882
  re as RecentEvents,
@@ -2883,13 +2884,13 @@ export {
2883
2884
  lo as SitePage,
2884
2885
  $e as Skeleton,
2885
2886
  to as SkeletonCard,
2886
- Mr as SkeletonText,
2887
- Ir as Spinner,
2887
+ _r as SkeletonText,
2888
+ Fr as Spinner,
2888
2889
  H as StatGrid,
2889
2890
  no as StatePage,
2890
2891
  Gr as Table,
2891
2892
  eo as Tabs,
2892
2893
  ro as Tooltip,
2893
- Tr as applyTheme,
2894
- Rr as useTheme
2894
+ Yr as applyTheme,
2895
+ $r as useTheme
2895
2896
  };
@@ -1,4 +1,4 @@
1
- (function(p,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],j):(p=typeof globalThis<"u"?globalThis:p||self,j(p.SharedUI={},p.React))})(this,function(p,j){"use strict";function ve(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const n=localStorage.getItem("theme-mode");return n?n==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{pe(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const i=j.useCallback(()=>{s(n=>!n)},[]);return{darkMode:t,toggleDarkMode:i}}function pe(o){const t=document.documentElement;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)}var oe={exports:{}},H={};/**
1
+ (function(p,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],j):(p=typeof globalThis<"u"?globalThis:p||self,j(p.SharedUI={},p.React))})(this,function(p,j){"use strict";var oe={exports:{}},H={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ge;function Je(){if(ge)return H;ge=1;var o=j,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};function c(u,f,w){var g,b={},k=null,M=null;w!==void 0&&(k=""+w),f.key!==void 0&&(k=""+f.key),f.ref!==void 0&&(M=f.ref);for(g in f)i.call(f,g)&&!l.hasOwnProperty(g)&&(b[g]=f[g]);if(u&&u.defaultProps)for(g in f=u.defaultProps,f)b[g]===void 0&&(b[g]=f[g]);return{$$typeof:t,type:u,key:k,ref:M,props:b,_owner:n.current}}return H.Fragment=s,H.jsx=c,H.jsxs=c,H}var V={};/**
9
+ */var ve;function Je(){if(ve)return H;ve=1;var o=j,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};function c(u,f,w){var g,b={},k=null,M=null;w!==void 0&&(k=""+w),f.key!==void 0&&(k=""+f.key),f.ref!==void 0&&(M=f.ref);for(g in f)i.call(f,g)&&!l.hasOwnProperty(g)&&(b[g]=f[g]);if(u&&u.defaultProps)for(g in f=u.defaultProps,f)b[g]===void 0&&(b[g]=f[g]);return{$$typeof:t,type:u,key:k,ref:M,props:b,_owner:n.current}}return H.Fragment=s,H.jsx=c,H.jsxs=c,H}var V={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var me;function Ke(){return me||(me=1,process.env.NODE_ENV!=="production"&&function(){var o=j,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"),w=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),T=Symbol.iterator,_="@@iterator";function wr(r){if(r===null||typeof r!="object")return null;var a=T&&r[T]||r[_];return typeof a=="function"?a:null}var N=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(r){{for(var a=arguments.length,d=new Array(a>1?a-1:0),v=1;v<a;v++)d[v-1]=arguments[v];Sr("error",r,d)}}function Sr(r,a,d){{var v=N.ReactDebugCurrentFrame,h=v.getStackAddendum();h!==""&&(a+="%s",d=d.concat([h]));var x=d.map(function(y){return String(y)});x.unshift("Warning: "+a),Function.prototype.apply.call(console[r],console,x)}}var Cr=!1,Tr=!1,Rr=!1,Er=!1,Fr=!1,we;we=Symbol.for("react.module.reference");function Ir(r){return!!(typeof r=="string"||typeof r=="function"||r===i||r===l||Fr||r===n||r===w||r===g||Er||r===M||Cr||Tr||Rr||typeof r=="object"&&r!==null&&(r.$$typeof===k||r.$$typeof===b||r.$$typeof===c||r.$$typeof===u||r.$$typeof===f||r.$$typeof===we||r.getModuleId!==void 0))}function _r(r,a,d){var v=r.displayName;if(v)return v;var h=a.displayName||a.name||"";return h!==""?d+"("+h+")":d}function Se(r){return r.displayName||"Context"}function D(r){if(r==null)return null;if(typeof r.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case i:return"Fragment";case s:return"Portal";case l:return"Profiler";case n:return"StrictMode";case w:return"Suspense";case g:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case u:var a=r;return Se(a)+".Consumer";case c:var d=r;return Se(d._context)+".Provider";case f:return _r(r,r.render,"ForwardRef");case b:var v=r.displayName||null;return v!==null?v:D(r.type)||"Memo";case k:{var h=r,x=h._payload,y=h._init;try{return D(y(x))}catch{return null}}}return null}var z=Object.assign,K=0,Ce,Te,Re,Ee,Fe,Ie,_e;function Me(){}Me.__reactDisabledLog=!0;function Mr(){{if(K===0){Ce=console.log,Te=console.info,Re=console.warn,Ee=console.error,Fe=console.group,Ie=console.groupCollapsed,_e=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Me,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}K++}}function Dr(){{if(K--,K===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},r,{value:Ce}),info:z({},r,{value:Te}),warn:z({},r,{value:Re}),error:z({},r,{value:Ee}),group:z({},r,{value:Fe}),groupCollapsed:z({},r,{value:Ie}),groupEnd:z({},r,{value:_e})})}K<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=N.ReactCurrentDispatcher,se;function Z(r,a,d){{if(se===void 0)try{throw Error()}catch(h){var v=h.stack.trim().match(/\n( *(at )?)/);se=v&&v[1]||""}return`
17
+ */var pe;function Ke(){return pe||(pe=1,process.env.NODE_ENV!=="production"&&function(){var o=j,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"),w=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),T=Symbol.iterator,_="@@iterator";function wr(r){if(r===null||typeof r!="object")return null;var a=T&&r[T]||r[_];return typeof a=="function"?a:null}var N=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(r){{for(var a=arguments.length,d=new Array(a>1?a-1:0),v=1;v<a;v++)d[v-1]=arguments[v];Sr("error",r,d)}}function Sr(r,a,d){{var v=N.ReactDebugCurrentFrame,h=v.getStackAddendum();h!==""&&(a+="%s",d=d.concat([h]));var x=d.map(function(y){return String(y)});x.unshift("Warning: "+a),Function.prototype.apply.call(console[r],console,x)}}var Cr=!1,Tr=!1,Rr=!1,Er=!1,Fr=!1,we;we=Symbol.for("react.module.reference");function Ir(r){return!!(typeof r=="string"||typeof r=="function"||r===i||r===l||Fr||r===n||r===w||r===g||Er||r===M||Cr||Tr||Rr||typeof r=="object"&&r!==null&&(r.$$typeof===k||r.$$typeof===b||r.$$typeof===c||r.$$typeof===u||r.$$typeof===f||r.$$typeof===we||r.getModuleId!==void 0))}function _r(r,a,d){var v=r.displayName;if(v)return v;var h=a.displayName||a.name||"";return h!==""?d+"("+h+")":d}function Se(r){return r.displayName||"Context"}function D(r){if(r==null)return null;if(typeof r.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case i:return"Fragment";case s:return"Portal";case l:return"Profiler";case n:return"StrictMode";case w:return"Suspense";case g:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case u:var a=r;return Se(a)+".Consumer";case c:var d=r;return Se(d._context)+".Provider";case f:return _r(r,r.render,"ForwardRef");case b:var v=r.displayName||null;return v!==null?v:D(r.type)||"Memo";case k:{var h=r,x=h._payload,y=h._init;try{return D(y(x))}catch{return null}}}return null}var z=Object.assign,K=0,Ce,Te,Re,Ee,Fe,Ie,_e;function Me(){}Me.__reactDisabledLog=!0;function Mr(){{if(K===0){Ce=console.log,Te=console.info,Re=console.warn,Ee=console.error,Fe=console.group,Ie=console.groupCollapsed,_e=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Me,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}K++}}function Dr(){{if(K--,K===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},r,{value:Ce}),info:z({},r,{value:Te}),warn:z({},r,{value:Re}),error:z({},r,{value:Ee}),group:z({},r,{value:Fe}),groupCollapsed:z({},r,{value:Ie}),groupEnd:z({},r,{value:_e})})}K<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=N.ReactCurrentDispatcher,se;function Z(r,a,d){{if(se===void 0)try{throw Error()}catch(h){var v=h.stack.trim().match(/\n( *(at )?)/);se=v&&v[1]||""}return`
18
18
  `+se+r}}var ie=!1,q;{var Pr=typeof WeakMap=="function"?WeakMap:Map;q=new Pr}function De(r,a){if(!r||ie)return"";{var d=q.get(r);if(d!==void 0)return d}var v;ie=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=ne.current,ne.current=null,Mr();try{if(a){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(F){v=F}Reflect.construct(r,[],y)}else{try{y.call()}catch(F){v=F}r.call(y.prototype)}}else{try{throw Error()}catch(F){v=F}r()}}catch(F){if(F&&v&&typeof F.stack=="string"){for(var m=F.stack.split(`
19
19
  `),E=v.stack.split(`
20
20
  `),S=m.length-1,C=E.length-1;S>=1&&C>=0&&m[S]!==E[C];)C--;for(;S>=1&&C>=0;S--,C--)if(m[S]!==E[C]){if(S!==1||C!==1)do if(S--,C--,C<0||m[S]!==E[C]){var I=`
@@ -41,12 +41,12 @@ React keys must be passed directly to JSX without using spread:
41
41
  from { opacity: 0; }
42
42
  to { opacity: 1; }
43
43
  }
44
- `})]})]})},ye=({size:o="md",color:t="var(--primary-color)"})=>{const i={sm:20,md:32,lg:48}[o];return e.jsxs("svg",{width:i,height:i,viewBox:"0 0 50 50",style:{animation:"spinnerRotate 0.8s linear infinite"},children:[e.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:t,strokeWidth:"4",strokeDasharray:"80 40",strokeLinecap:"round"}),e.jsx("style",{children:`
44
+ `})]})]})},ge=({size:o="md",color:t="var(--primary-color)"})=>{const i={sm:20,md:32,lg:48}[o];return e.jsxs("svg",{width:i,height:i,viewBox:"0 0 50 50",style:{animation:"spinnerRotate 0.8s linear infinite"},children:[e.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:t,strokeWidth:"4",strokeDasharray:"80 40",strokeLinecap:"round"}),e.jsx("style",{children:`
45
45
  @keyframes spinnerRotate {
46
46
  from { transform: rotate(0deg); }
47
47
  to { transform: rotate(360deg); }
48
48
  }
49
- `})]})},sr=({message:o="Loading..."})=>e.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--space-md)",zIndex:1e3},children:[e.jsx(ye,{size:"lg",color:"var(--surface-light)"}),e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"1rem",color:"var(--surface-light)"},children:o})]}),te=({width:o="100%",height:t=20,variant:s="text",animation:i="wave"})=>{const n={text:{borderRadius:"var(--radius-sm)"},rect:{borderRadius:"var(--radius-md)"},circle:{borderRadius:"50%"}},l={pulse:{animation:"skeletonPulse 1.5s ease-in-out infinite"},wave:{backgroundImage:"linear-gradient(90deg, var(--secondary-color) 0%, var(--bg-color) 50%, var(--secondary-color) 100%)",backgroundSize:"200% 100%",animation:"skeletonWave 1.5s ease-in-out infinite"},none:{}};return e.jsx("div",{style:{width:o,height:t,backgroundColor:i==="wave"?void 0:"var(--secondary-color)",...n[s],...l[i]},children:e.jsx("style",{children:`
49
+ `})]})},sr=({message:o="Loading..."})=>e.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--space-md)",zIndex:1e3},children:[e.jsx(ge,{size:"lg",color:"var(--surface-light)"}),e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"1rem",color:"var(--surface-light)"},children:o})]}),te=({width:o="100%",height:t=20,variant:s="text",animation:i="wave"})=>{const n={text:{borderRadius:"var(--radius-sm)"},rect:{borderRadius:"var(--radius-md)"},circle:{borderRadius:"50%"}},l={pulse:{animation:"skeletonPulse 1.5s ease-in-out infinite"},wave:{backgroundImage:"linear-gradient(90deg, var(--secondary-color) 0%, var(--bg-color) 50%, var(--secondary-color) 100%)",backgroundSize:"200% 100%",animation:"skeletonWave 1.5s ease-in-out infinite"},none:{}};return e.jsx("div",{style:{width:o,height:t,backgroundColor:i==="wave"?void 0:"var(--secondary-color)",...n[s],...l[i]},children:e.jsx("style",{children:`
50
50
  @keyframes skeletonPulse {
51
51
  0%, 100% { opacity: 1; }
52
52
  50% { opacity: 0.5; }
@@ -55,7 +55,7 @@ React keys must be passed directly to JSX without using spread:
55
55
  0% { background-position: 200% 0; }
56
56
  100% { background-position: -200% 0; }
57
57
  }
58
- `})})},he=({lines:o=3})=>e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:Array.from({length:o}).map((t,s)=>e.jsx(te,{width:s===o-1?"60%":"100%",height:16},s))}),ir=()=>e.jsxs("div",{style:{padding:"var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsx(te,{height:24,width:"50%"}),e.jsx(he,{lines:3})]}),xe=({brand:o,darkMode:t,onThemeToggle:s,onAccountClick:i,onNotificationClick:n})=>{const[l,c]=j.useState(!1),[u,f]=j.useState(!1),[w,g]=j.useState(null);j.useEffect(()=>{const k=()=>c(window.innerWidth<768);return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);const b=o.navItems.filter(k=>k.inNavbar!==!1);return e.jsxs("header",{style:{backgroundColor:"var(--primary-color)",borderBottom:"4px solid var(--accent-color)",position:"sticky",top:0,zIndex:100},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"var(--space-sm) var(--space-lg)",gap:"var(--space-md)",maxWidth:1400,margin:"0 auto"},children:[o.logoUrl&&e.jsx("div",{style:{width:40,height:40,borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--bg-color)",border:"2px solid var(--accent-color)",flexShrink:0},children:e.jsx("img",{src:o.logoUrl,alt:o.name,style:{width:"100%",height:"100%",objectFit:"cover"}})}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:l?"1.1rem":"1.4rem",fontWeight:700,color:"var(--surface-light)",whiteSpace:"nowrap",flexShrink:0},children:o.name}),!l&&e.jsx("nav",{style:{display:"flex",alignItems:"center",gap:"var(--space-sm)",flex:1,justifyContent:"center"},children:b.map(k=>e.jsx(lr,{item:k,isActive:w===k.label,onHover:M=>g(M),onLeave:()=>g(null)},k.label))}),l&&e.jsx("div",{style:{flex:1}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",flexShrink:0},children:[l&&e.jsx(Q,{onClick:()=>f(!u),label:"Menu",size:36,children:e.jsx(pr,{})}),e.jsx(Q,{onClick:s,label:"Toggle theme",size:36,children:t?e.jsx(ur,{}):e.jsx(dr,{})}),!l&&n&&e.jsx(Q,{onClick:n,label:"Notifications",size:36,children:e.jsx(fr,{})}),e.jsx(Q,{onClick:i,label:"Account",size:40,children:e.jsx(vr,{})})]})]}),l&&u&&e.jsx("div",{style:{backgroundColor:"var(--bg-color)",borderTop:"1px solid var(--border-color)",padding:"var(--space-sm)"},children:b.map(k=>e.jsx(cr,{item:k,onClose:()=>f(!1)},k.label))})]})},Q=({onClick:o,label:t,size:s=36,children:i})=>e.jsx("button",{onClick:o,"aria-label":t,style:{width:s,height:s,borderRadius:"var(--radius-full)",backgroundColor:"rgba(255,255,255,0.1)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background var(--transition-fast)",color:"var(--surface-light)"},onMouseEnter:n=>n.currentTarget.style.backgroundColor="rgba(255,255,255,0.2)",onMouseLeave:n=>n.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",children:i}),lr=({item:o,isActive:t,onHover:s,onLeave:i})=>e.jsxs("div",{onMouseEnter:()=>o.children&&s(o.label),onMouseLeave:i,style:{position:"relative"},children:[e.jsxs("button",{onClick:o.onClick,style:{background:"none",border:"none",color:"var(--surface-light)",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.9rem",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",transition:"background var(--transition-fast)"},onMouseEnter:n=>n.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",onMouseLeave:n=>n.currentTarget.style.backgroundColor="transparent",children:[o.label," ",o.children&&"▾"]}),o.children&&t&&e.jsx("div",{style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"var(--bg-color)",minWidth:160,boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-md)",padding:"var(--space-xs) 0",zIndex:200,marginTop:4},children:o.children.map(n=>e.jsx("button",{onClick:n.onClick,style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",transition:"background var(--transition-fast)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="var(--secondary-color)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="transparent",children:n.label},n.label))})]}),cr=({item:o,onClose:t})=>e.jsx("button",{onClick:()=>{var s;(s=o.onClick)==null||s.call(o),t()},style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.95rem",color:"var(--text-color)",borderRadius:"var(--radius-sm)"},children:o.label}),dr=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),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"})]}),ur=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),fr=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children: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"})}),vr=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),pr=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M3 12h18M3 6h18M3 18h18"})}),be=({copyrightBrand:o,yearCreated:t,poweredBy:s,links:i})=>{const n=new Date().getFullYear(),l=t===n?n.toString():`${t}-${n}`;return e.jsx("footer",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-lg) var(--space-xl)",borderTop:"4px solid var(--accent-color)"},children:e.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",display:"flex",flexDirection:"column",gap:"var(--space-md)",alignItems:"center",textAlign:"center"},children:[i&&i.length>0&&e.jsx("nav",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-md)",justifyContent:"center"},children:i.map(c=>e.jsx("a",{href:c.url,style:{color:"var(--bg-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontSize:"0.9rem",opacity:.9,transition:"opacity var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.opacity="1",onMouseLeave:u=>u.currentTarget.style.opacity="0.9",children:c.label},c.label))}),e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.85rem",opacity:.8},children:["© ",l," ",o,". All rights reserved."]}),s&&e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.75rem",opacity:.6},children:["Powered by"," ",e.jsx("span",{style:{color:"var(--org-color)",fontWeight:600},children:s})]})]})})},je=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
58
+ `})})},me=({lines:o=3})=>e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:Array.from({length:o}).map((t,s)=>e.jsx(te,{width:s===o-1?"60%":"100%",height:16},s))}),ir=()=>e.jsxs("div",{style:{padding:"var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsx(te,{height:24,width:"50%"}),e.jsx(me,{lines:3})]}),ye=({brand:o,darkMode:t,onThemeToggle:s,onAccountClick:i,onNotificationClick:n})=>{const[l,c]=j.useState(!1),[u,f]=j.useState(!1),[w,g]=j.useState(null);j.useEffect(()=>{const k=()=>c(window.innerWidth<768);return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);const b=o.navItems.filter(k=>k.inNavbar!==!1);return e.jsxs("header",{style:{backgroundColor:"var(--primary-color)",borderBottom:"4px solid var(--accent-color)",position:"sticky",top:0,zIndex:100},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"var(--space-sm) var(--space-lg)",gap:"var(--space-md)",maxWidth:1400,margin:"0 auto"},children:[o.logoUrl&&e.jsx("div",{style:{width:40,height:40,borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--bg-color)",border:"2px solid var(--accent-color)",flexShrink:0},children:e.jsx("img",{src:o.logoUrl,alt:o.name,style:{width:"100%",height:"100%",objectFit:"cover"}})}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:l?"1.1rem":"1.4rem",fontWeight:700,color:"var(--surface-light)",whiteSpace:"nowrap",flexShrink:0},children:o.name}),!l&&e.jsx("nav",{style:{display:"flex",alignItems:"center",gap:"var(--space-sm)",flex:1,justifyContent:"center"},children:b.map(k=>e.jsx(lr,{item:k,isActive:w===k.label,onHover:M=>g(M),onLeave:()=>g(null)},k.label))}),l&&e.jsx("div",{style:{flex:1}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",flexShrink:0},children:[l&&e.jsx(Q,{onClick:()=>f(!u),label:"Menu",size:36,children:e.jsx(pr,{})}),e.jsx(Q,{onClick:s,label:"Toggle theme",size:36,children:t?e.jsx(ur,{}):e.jsx(dr,{})}),!l&&n&&e.jsx(Q,{onClick:n,label:"Notifications",size:36,children:e.jsx(fr,{})}),e.jsx(Q,{onClick:i,label:"Account",size:40,children:e.jsx(vr,{})})]})]}),l&&u&&e.jsx("div",{style:{backgroundColor:"var(--bg-color)",borderTop:"1px solid var(--border-color)",padding:"var(--space-sm)"},children:b.map(k=>e.jsx(cr,{item:k,onClose:()=>f(!1)},k.label))})]})},Q=({onClick:o,label:t,size:s=36,children:i})=>e.jsx("button",{onClick:o,"aria-label":t,style:{width:s,height:s,borderRadius:"var(--radius-full)",backgroundColor:"rgba(255,255,255,0.1)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background var(--transition-fast)",color:"var(--surface-light)"},onMouseEnter:n=>n.currentTarget.style.backgroundColor="rgba(255,255,255,0.2)",onMouseLeave:n=>n.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",children:i}),lr=({item:o,isActive:t,onHover:s,onLeave:i})=>e.jsxs("div",{onMouseEnter:()=>o.children&&s(o.label),onMouseLeave:i,style:{position:"relative"},children:[e.jsxs("button",{onClick:o.onClick,style:{background:"none",border:"none",color:"var(--surface-light)",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.9rem",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",transition:"background var(--transition-fast)"},onMouseEnter:n=>n.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",onMouseLeave:n=>n.currentTarget.style.backgroundColor="transparent",children:[o.label," ",o.children&&"▾"]}),o.children&&t&&e.jsx("div",{style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"var(--bg-color)",minWidth:160,boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-md)",padding:"var(--space-xs) 0",zIndex:200,marginTop:4},children:o.children.map(n=>e.jsx("button",{onClick:n.onClick,style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",transition:"background var(--transition-fast)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="var(--secondary-color)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="transparent",children:n.label},n.label))})]}),cr=({item:o,onClose:t})=>e.jsx("button",{onClick:()=>{var s;(s=o.onClick)==null||s.call(o),t()},style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.95rem",color:"var(--text-color)",borderRadius:"var(--radius-sm)"},children:o.label}),dr=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),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"})]}),ur=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),fr=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children: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"})}),vr=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),pr=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M3 12h18M3 6h18M3 18h18"})}),he=({copyrightBrand:o,yearCreated:t,poweredBy:s,links:i})=>{const n=new Date().getFullYear(),l=t===n?n.toString():`${t}-${n}`;return e.jsx("footer",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-lg) var(--space-xl)",borderTop:"4px solid var(--accent-color)"},children:e.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",display:"flex",flexDirection:"column",gap:"var(--space-md)",alignItems:"center",textAlign:"center"},children:[i&&i.length>0&&e.jsx("nav",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-md)",justifyContent:"center"},children:i.map(c=>e.jsx("a",{href:c.url,style:{color:"var(--bg-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontSize:"0.9rem",opacity:.9,transition:"opacity var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.opacity="1",onMouseLeave:u=>u.currentTarget.style.opacity="0.9",children:c.label},c.label))}),e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.85rem",opacity:.8},children:["© ",l," ",o,". All rights reserved."]}),s&&e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.75rem",opacity:.6},children:["Powered by"," ",e.jsx("span",{style:{color:"var(--org-color)",fontWeight:600},children:s})]})]})})},xe=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
59
59
  .mobile-ad-banner {
60
60
  display: none;
61
61
  }
@@ -73,4 +73,4 @@ React keys must be passed directly to JSX without using spread:
73
73
  margin-top: auto;
74
74
  }
75
75
  }
76
- `}),e.jsx("div",{className:"mobile-ad-banner",children:e.jsx("div",{"data-ad-slot":"mobile-banner",style:{width:"100%",maxWidth:468,height:60,margin:"0 auto",backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:"var(--text-color)",opacity:.6},children:"Ad (468×60)"})})]}),W=({brand:o,children:t,onAccountClick:s,onNotificationClick:i})=>{const{darkMode:n,toggleDarkMode:l}=ve(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(xe,{brand:o,darkMode:n,onThemeToggle:l,onAccountClick:s,onNotificationClick:i}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t}),e.jsx(je,{})]}),e.jsx(be,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy,links:o.footer.links})]})},B=({title:o,subtitle:t,breadcrumbs:s,score:i})=>e.jsxs("section",{style:{backgroundColor:"var(--secondary-color)",padding:"var(--space-lg) var(--space-lg)",textAlign:"center",borderBottom:"4px solid var(--accent-color)"},children:[s&&s.length>0&&e.jsx("nav",{style:{marginBottom:"var(--space-md)",display:"flex",justifyContent:"center",gap:"var(--space-sm)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600},children:s.map((n,l)=>e.jsxs(j.Fragment,{children:[l>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),n.path?e.jsx("a",{href:n.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:n.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:n.label})]},n.label))}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"clamp(2rem, 5vw, 3.5rem)",fontWeight:700,color:"var(--text-dark)",letterSpacing:"0.02em"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:t}),i&&e.jsxs("div",{style:{marginTop:"var(--space-md)",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"var(--space-xs)"},children:[e.jsxs("div",{style:{backgroundColor:"var(--accent-color)",color:"white",padding:"var(--space-sm) var(--space-lg)",borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",display:"flex",alignItems:"center",gap:"var(--space-sm)",boxShadow:"var(--shadow-md)"},children:[e.jsx("span",{children:i.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:i.label})]}),i.betaDisclaimer&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-dark)",opacity:.6,fontStyle:"italic"},children:"Score algorithm is a work in progress"})]})]}),P={violations:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--warning-color)",strokeWidth:"2",children:[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"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),injuries:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info-color)",strokeWidth:"2",children:e.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),fatalities:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),fines:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),e.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),avgFine:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--secondary-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),trendUp:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),e.jsx("polyline",{points:"17 6 23 6 23 12"})]}),trendDown:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),e.jsx("polyline",{points:"17 18 23 18 23 12"})]})},L=({stats:o,columns:t=4})=>{const s=[{label:"Total Incidents",value:o.totalViolations,icon:P.violations},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:P.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:P.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:ke(o.totalFines),icon:P.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:ke(o.avgFines),icon:P.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?P.trendDown:P.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"var(--space-md)"},children:s.map(i=>e.jsx(gr,{...i},i.label))})})},gr=({label:o,value:t,icon:s})=>e.jsxs("div",{style:{padding:"var(--space-lg)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",display:"flex",alignItems:"center",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:"default"},onMouseEnter:i=>{i.currentTarget.style.transform="translateY(-2px)",i.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:i=>{i.currentTarget.style.transform="translateY(0)",i.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:s}),e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",color:"var(--primary-color)"},children:typeof t=="number"?t.toLocaleString():t}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function ke(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const X=({title:o,items:t,basePath:s,emptyMessage:i="No items found",showSearch:n=!0,initialLimit:l=30})=>{const[c,u]=j.useState(""),[f,w]=j.useState(!1),g=t.filter(T=>T.name.toLowerCase().includes(c.toLowerCase())),b=f||c.length>0,k=b?g:g.slice(0,l),M=g.length>l&&!b;return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)",flexWrap:"wrap",gap:"var(--space-sm)"},children:[e.jsxs("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:[o,e.jsxs("span",{style:{marginLeft:"var(--space-sm)",fontSize:"1rem",opacity:.6},children:["(",t.length,")"]})]}),n&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:T=>u(T.target.value),style:{padding:"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:"2px solid var(--border-color)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",width:200}})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)",padding:"var(--space-md)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:g.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:i}):e.jsxs(e.Fragment,{children:[k.map(T=>e.jsxs("a",{href:`${s}/${T.slug}`,style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"var(--radius-sm)",textDecoration:"none",color:"var(--text-color)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",transition:"all var(--transition-fast)",whiteSpace:"nowrap"},onMouseEnter:_=>{_.currentTarget.style.backgroundColor="var(--primary-color)",_.currentTarget.style.color="var(--surface-light)",_.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:_=>{_.currentTarget.style.backgroundColor="var(--bg-color)",_.currentTarget.style.color="var(--text-color)",_.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:T.name}),e.jsx("span",{title:`${T.count.toLocaleString()} incidents`,style:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"2px 6px",borderRadius:"var(--radius-full)",fontSize:"0.75rem",fontWeight:600},children:T.count.toLocaleString()})]},T.slug)),(M||f)&&e.jsx("button",{onClick:()=>w(!f),style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--accent-color)",border:"none",borderRadius:"var(--radius-sm)",color:"var(--surface-light)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",fontWeight:500,cursor:"pointer",transition:"all var(--transition-fast)"},onMouseEnter:T=>{T.currentTarget.style.opacity="0.8"},onMouseLeave:T=>{T.currentTarget.style.opacity="1"},children:f?"Show less":`+${g.length-l} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:i=!1})=>t.length===0?null:e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)"},children:[e.jsx("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:o}),s&&e.jsx("a",{href:s,style:{color:"var(--accent-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.9rem"},children:"View More →"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:t.map(n=>e.jsx(mr,{event:n,showAgencyBadge:i},n.eventId))})]})}),mr=({event:o,showAgencyBadge:t})=>e.jsx("div",{style:{padding:"var(--space-md) var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"var(--space-md)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{flex:1,minWidth:200},children:[e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:o.eventTitle}),o.eventDescription&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.eventDescription})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"var(--space-xs)"},children:[t&&e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.75rem",textTransform:"uppercase"},children:o.agency}),o.eventDate&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:yr(o.eventDate)}),(o.city||o.state)&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:[o.city,o.state].filter(Boolean).join(", ")}),o.companyName&&e.jsxs("a",{href:`/company/${o.companySlug}`,style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--primary-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--accent-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--primary-color)",children:[o.companyName," →"]})]})]})});function yr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const ae=({position:o,width:t,height:s})=>{const i={sidebar:{width:t??280,height:s??250},"left-sidebar":{width:t??"100%",height:s??200},banner:{width:t??"100%",height:s??90},inline:{width:t??"100%",height:s??120}},{width:n,height:l}=i[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:n,height:l,backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.5},children:["Ad Placeholder (",o,")"]})},O=({meta:o,showAd:t=!0})=>{if(!o&&!t)return null;const s=o?[o.population&&{label:"Population",value:o.population.toLocaleString()},o.industry&&{label:"Industry",value:o.industry},o.founded&&{label:"Founded",value:o.founded},o.headquarters&&{label:"HQ",value:o.headquarters}].filter(Boolean):[];return e.jsxs("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[s.length>0&&e.jsxs("div",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[(o==null?void 0:o.logoUrl)&&e.jsx("div",{style:{width:80,height:80,margin:"0 auto var(--space-md)",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("img",{src:o.logoUrl,alt:"",style:{maxWidth:"100%",maxHeight:"100%"}})}),(o==null?void 0:o.flagUrl)&&e.jsx("div",{style:{width:"100%",margin:"0 auto var(--space-md)",borderRadius:"var(--radius-sm)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border-color)"},children:e.jsx("img",{src:o.flagUrl,alt:"",style:{width:"100%",height:"auto",display:"block"}})}),e.jsx("dl",{style:{margin:0},children:s.map(({label:i,value:n})=>e.jsxs("div",{style:{padding:"var(--space-sm) 0",borderBottom:"1px solid var(--border-color)"},children:[e.jsx("dt",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-color)",opacity:.6,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"2px"},children:i}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},i))})]}),t&&e.jsx(ae,{position:"sidebar"})]})},Y=({showAd:o=!0})=>e.jsxs("aside",{className:"page-filters",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsxs("div",{style:{padding:"var(--space-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[e.jsx("h3",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.1rem",color:"var(--text-color)"},children:"Filters"}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Date Range"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"All Time"}),e.jsx("option",{children:"Last Year"}),e.jsx("option",{children:"Last 5 Years"}),e.jsx("option",{children:"Last 10 Years"})]})]}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Severity"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-xs)"},children:["All","Fatalities","Hospitalizations","Amputations"].map(t=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:t==="All",style:{accentColor:"var(--primary-color)"}}),t]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Sort By"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"Most Incidents"}),e.jsx("option",{children:"Most Recent"}),e.jsx("option",{children:"Highest Fines"}),e.jsx("option",{children:"Alphabetical"})]})]})]}),o&&e.jsx(ae,{position:"left-sidebar"})]}),hr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Explore",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats,columns:4}),e.jsx(X,{title:"States & Territories",items:t.directory,basePath:"",initialLimit:60})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},xr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency);return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),e.jsx(X,{title:"Cities",items:t.directory,basePath:`/${t.slug.toLowerCase()}`}),c.map(u=>e.jsx(J,{title:`Recent ${u} Incidents`,events:t.recentByAgency[u],viewMorePath:`/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},br=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.stateName,path:`/${t.state.toLowerCase()}`},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency),u=`/${t.state.toLowerCase()}/${t.slug}`;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:`${t.name}, ${t.state}`,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),e.jsx(X,{title:"Companies",items:t.directory,basePath:"/company"}),c.map(f=>e.jsx(J,{title:`Recent ${f} Incidents`,events:t.recentByAgency[f],viewMorePath:`${u}/events/${f.toLowerCase()}`,showAgencyBadge:!1},f))]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},jr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{var u;const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=t.sites&&t.sites.length>0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:(u=t.meta)!=null&&u.industry?`${t.meta.industry}`:void 0,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),c&&e.jsx(X,{title:"Locations",items:t.sites,basePath:`/company/${t.slug}/site`}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents.slice(0,c?5:10),viewMorePath:`/company/${t.slug}/events`,showAgencyBadge:!0})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},kr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.companyName,path:`/company/${t.companySlug}`},{label:`#${t.siteId}`}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Location #${t.siteId} of ${t.companyName}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),t.siblings&&t.siblings.length>0&&e.jsxs("section",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",marginBottom:"var(--space-lg)",borderRadius:"var(--radius-md)",border:"1px solid var(--border-color)"},children:[e.jsx("h2",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:"Compare to Other Locations"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)"},children:t.siblings.slice(0,10).map(c=>e.jsxs("a",{href:`/company/${t.companySlug}/site/${c.slug}`,style:{padding:"var(--space-sm) var(--space-md)",backgroundColor:"var(--secondary-color)",borderRadius:"var(--radius-md)",textDecoration:"none",color:"var(--text-dark)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",display:"flex",alignItems:"center",gap:"var(--space-xs)",transition:"background var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:u=>u.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",c.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:c.count})]},c.slug))})]}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents,viewMorePath:`/company/${t.companySlug}/site/${t.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})};p.AdSlot=ae,p.Alert=tr,p.Badge=qe,p.Button=Ge,p.Card=Ze,p.CityPage=br,p.CompanyPage=jr,p.Directory=X,p.FilterSidebar=Y,p.Footer=be,p.Header=xe,p.Hero=B,p.InfoSidebar=O,p.Input=er,p.LoadingOverlay=sr,p.MobileAdBanner=je,p.Modal=or,p.NationPage=hr,p.RecentEvents=J,p.Shell=W,p.SitePage=kr,p.Skeleton=te,p.SkeletonCard=ir,p.SkeletonText=he,p.Spinner=ye,p.StatGrid=L,p.StatePage=xr,p.Table=rr,p.Tabs=ar,p.Tooltip=nr,p.applyTheme=pe,p.useTheme=ve,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
76
+ `}),e.jsx("div",{className:"mobile-ad-banner",children:e.jsx("div",{"data-ad-slot":"mobile-banner",style:{width:"100%",maxWidth:468,height:60,margin:"0 auto",backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:"var(--text-color)",opacity:.6},children:"Ad (468×60)"})})]});function be(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const n=localStorage.getItem("theme-mode");return n?n==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{je(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const i=j.useCallback(()=>{s(n=>!n)},[]);return{darkMode:t,toggleDarkMode:i}}function je(o){const t=document.documentElement;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)}const W=({brand:o,children:t,onAccountClick:s,onNotificationClick:i})=>{const{darkMode:n,toggleDarkMode:l}=be(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(ye,{brand:o,darkMode:n,onThemeToggle:l,onAccountClick:s,onNotificationClick:i}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t}),e.jsx(xe,{})]}),e.jsx(he,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy,links:o.footer.links})]})},B=({title:o,subtitle:t,breadcrumbs:s,score:i})=>e.jsxs("section",{style:{backgroundColor:"var(--secondary-color)",padding:"var(--space-lg) var(--space-lg)",textAlign:"center",borderBottom:"4px solid var(--accent-color)"},children:[s&&s.length>0&&e.jsx("nav",{style:{marginBottom:"var(--space-md)",display:"flex",justifyContent:"center",gap:"var(--space-sm)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600},children:s.map((n,l)=>e.jsxs(j.Fragment,{children:[l>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),n.path?e.jsx("a",{href:n.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:n.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:n.label})]},n.label))}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"clamp(2rem, 5vw, 3.5rem)",fontWeight:700,color:"var(--text-dark)",letterSpacing:"0.02em"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:t}),i&&e.jsxs("div",{style:{marginTop:"var(--space-md)",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"var(--space-xs)"},children:[e.jsxs("div",{style:{backgroundColor:"var(--accent-color)",color:"white",padding:"var(--space-sm) var(--space-lg)",borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",display:"flex",alignItems:"center",gap:"var(--space-sm)",boxShadow:"var(--shadow-md)"},children:[e.jsx("span",{children:i.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:i.label})]}),i.betaDisclaimer&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-dark)",opacity:.6,fontStyle:"italic"},children:"Score algorithm is a work in progress"})]})]}),P={violations:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--warning-color)",strokeWidth:"2",children:[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"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),injuries:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info-color)",strokeWidth:"2",children:e.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),fatalities:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),fines:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),e.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),avgFine:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--secondary-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),trendUp:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),e.jsx("polyline",{points:"17 6 23 6 23 12"})]}),trendDown:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),e.jsx("polyline",{points:"17 18 23 18 23 12"})]})},L=({stats:o,columns:t=4})=>{const s=[{label:"Total Incidents",value:o.totalViolations,icon:P.violations},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:P.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:P.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:ke(o.totalFines),icon:P.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:ke(o.avgFines),icon:P.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?P.trendDown:P.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"var(--space-md)"},children:s.map(i=>e.jsx(gr,{...i},i.label))})})},gr=({label:o,value:t,icon:s})=>e.jsxs("div",{style:{padding:"var(--space-lg)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",display:"flex",alignItems:"center",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:"default"},onMouseEnter:i=>{i.currentTarget.style.transform="translateY(-2px)",i.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:i=>{i.currentTarget.style.transform="translateY(0)",i.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:s}),e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",color:"var(--primary-color)"},children:typeof t=="number"?t.toLocaleString():t}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function ke(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const X=({title:o,items:t,basePath:s,emptyMessage:i="No items found",showSearch:n=!0,initialLimit:l=30})=>{const[c,u]=j.useState(""),[f,w]=j.useState(!1),g=t.filter(T=>T.name.toLowerCase().includes(c.toLowerCase())),b=f||c.length>0,k=b?g:g.slice(0,l),M=g.length>l&&!b;return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)",flexWrap:"wrap",gap:"var(--space-sm)"},children:[e.jsxs("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:[o,e.jsxs("span",{style:{marginLeft:"var(--space-sm)",fontSize:"1rem",opacity:.6},children:["(",t.length,")"]})]}),n&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:T=>u(T.target.value),style:{padding:"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:"2px solid var(--border-color)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",width:200}})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)",padding:"var(--space-md)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:g.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:i}):e.jsxs(e.Fragment,{children:[k.map(T=>e.jsxs("a",{href:`${s}/${T.slug}`,style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"var(--radius-sm)",textDecoration:"none",color:"var(--text-color)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",transition:"all var(--transition-fast)",whiteSpace:"nowrap"},onMouseEnter:_=>{_.currentTarget.style.backgroundColor="var(--primary-color)",_.currentTarget.style.color="var(--surface-light)",_.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:_=>{_.currentTarget.style.backgroundColor="var(--bg-color)",_.currentTarget.style.color="var(--text-color)",_.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:T.name}),e.jsx("span",{title:`${T.count.toLocaleString()} incidents`,style:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"2px 6px",borderRadius:"var(--radius-full)",fontSize:"0.75rem",fontWeight:600},children:T.count.toLocaleString()})]},T.slug)),(M||f)&&e.jsx("button",{onClick:()=>w(!f),style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--accent-color)",border:"none",borderRadius:"var(--radius-sm)",color:"var(--surface-light)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",fontWeight:500,cursor:"pointer",transition:"all var(--transition-fast)"},onMouseEnter:T=>{T.currentTarget.style.opacity="0.8"},onMouseLeave:T=>{T.currentTarget.style.opacity="1"},children:f?"Show less":`+${g.length-l} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:i=!1})=>t.length===0?null:e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)"},children:[e.jsx("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:o}),s&&e.jsx("a",{href:s,style:{color:"var(--accent-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.9rem"},children:"View More →"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:t.map(n=>e.jsx(mr,{event:n,showAgencyBadge:i},n.eventId))})]})}),mr=({event:o,showAgencyBadge:t})=>e.jsx("div",{style:{padding:"var(--space-md) var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"var(--space-md)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{flex:1,minWidth:200},children:[e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:o.eventTitle}),o.eventDescription&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.eventDescription})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"var(--space-xs)"},children:[t&&e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.75rem",textTransform:"uppercase"},children:o.agency}),o.eventDate&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:yr(o.eventDate)}),(o.city||o.state)&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:[o.city,o.state].filter(Boolean).join(", ")}),o.companyName&&e.jsxs("a",{href:`/company/${o.companySlug}`,style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--primary-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--accent-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--primary-color)",children:[o.companyName," →"]})]})]})});function yr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const ae=({position:o,width:t,height:s})=>{const i={sidebar:{width:t??280,height:s??250},"left-sidebar":{width:t??"100%",height:s??200},banner:{width:t??"100%",height:s??90},inline:{width:t??"100%",height:s??120}},{width:n,height:l}=i[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:n,height:l,backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.5},children:["Ad Placeholder (",o,")"]})},O=({meta:o,showAd:t=!0})=>{if(!o&&!t)return null;const s=o?[o.population&&{label:"Population",value:o.population.toLocaleString()},o.industry&&{label:"Industry",value:o.industry},o.founded&&{label:"Founded",value:o.founded},o.headquarters&&{label:"HQ",value:o.headquarters}].filter(Boolean):[];return e.jsxs("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[s.length>0&&e.jsxs("div",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[(o==null?void 0:o.logoUrl)&&e.jsx("div",{style:{width:80,height:80,margin:"0 auto var(--space-md)",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("img",{src:o.logoUrl,alt:"",style:{maxWidth:"100%",maxHeight:"100%"}})}),(o==null?void 0:o.flagUrl)&&e.jsx("div",{style:{width:"100%",margin:"0 auto var(--space-md)",borderRadius:"var(--radius-sm)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border-color)"},children:e.jsx("img",{src:o.flagUrl,alt:"",style:{width:"100%",height:"auto",display:"block"}})}),e.jsx("dl",{style:{margin:0},children:s.map(({label:i,value:n})=>e.jsxs("div",{style:{padding:"var(--space-sm) 0",borderBottom:"1px solid var(--border-color)"},children:[e.jsx("dt",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-color)",opacity:.6,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"2px"},children:i}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},i))})]}),t&&e.jsx(ae,{position:"sidebar"})]})},Y=({showAd:o=!0})=>e.jsxs("aside",{className:"page-filters",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsxs("div",{style:{padding:"var(--space-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[e.jsx("h3",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.1rem",color:"var(--text-color)"},children:"Filters"}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Date Range"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"All Time"}),e.jsx("option",{children:"Last Year"}),e.jsx("option",{children:"Last 5 Years"}),e.jsx("option",{children:"Last 10 Years"})]})]}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Severity"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-xs)"},children:["All","Fatalities","Hospitalizations","Amputations"].map(t=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:t==="All",style:{accentColor:"var(--primary-color)"}}),t]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Sort By"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"Most Incidents"}),e.jsx("option",{children:"Most Recent"}),e.jsx("option",{children:"Highest Fines"}),e.jsx("option",{children:"Alphabetical"})]})]})]}),o&&e.jsx(ae,{position:"left-sidebar"})]}),hr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Explore",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats,columns:4}),e.jsx(X,{title:"States & Territories",items:t.directory,basePath:"",initialLimit:60})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},xr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency);return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),e.jsx(X,{title:"Cities",items:t.directory,basePath:`/${t.slug.toLowerCase()}`}),c.map(u=>e.jsx(J,{title:`Recent ${u} Incidents`,events:t.recentByAgency[u],viewMorePath:`/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},br=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.stateName,path:`/${t.state.toLowerCase()}`},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency),u=`/${t.state.toLowerCase()}/${t.slug}`;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:`${t.name}, ${t.state}`,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),e.jsx(X,{title:"Companies",items:t.directory,basePath:"/company"}),c.map(f=>e.jsx(J,{title:`Recent ${f} Incidents`,events:t.recentByAgency[f],viewMorePath:`${u}/events/${f.toLowerCase()}`,showAgencyBadge:!1},f))]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},jr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{var u;const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=t.sites&&t.sites.length>0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:(u=t.meta)!=null&&u.industry?`${t.meta.industry}`:void 0,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),c&&e.jsx(X,{title:"Locations",items:t.sites,basePath:`/company/${t.slug}/site`}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents.slice(0,c?5:10),viewMorePath:`/company/${t.slug}/events`,showAgencyBadge:!0})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},kr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.companyName,path:`/company/${t.companySlug}`},{label:`#${t.siteId}`}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Location #${t.siteId} of ${t.companyName}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),t.siblings&&t.siblings.length>0&&e.jsxs("section",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",marginBottom:"var(--space-lg)",borderRadius:"var(--radius-md)",border:"1px solid var(--border-color)"},children:[e.jsx("h2",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:"Compare to Other Locations"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)"},children:t.siblings.slice(0,10).map(c=>e.jsxs("a",{href:`/company/${t.companySlug}/site/${c.slug}`,style:{padding:"var(--space-sm) var(--space-md)",backgroundColor:"var(--secondary-color)",borderRadius:"var(--radius-md)",textDecoration:"none",color:"var(--text-dark)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",display:"flex",alignItems:"center",gap:"var(--space-xs)",transition:"background var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:u=>u.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",c.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:c.count})]},c.slug))})]}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents,viewMorePath:`/company/${t.companySlug}/site/${t.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})};p.AdSlot=ae,p.Alert=tr,p.Badge=qe,p.Button=Ge,p.Card=Ze,p.CityPage=br,p.CompanyPage=jr,p.Directory=X,p.FilterSidebar=Y,p.Footer=he,p.Header=ye,p.Hero=B,p.InfoSidebar=O,p.Input=er,p.LoadingOverlay=sr,p.MobileAdBanner=xe,p.Modal=or,p.NationPage=hr,p.RecentEvents=J,p.Shell=W,p.SitePage=kr,p.Skeleton=te,p.SkeletonCard=ir,p.SkeletonText=me,p.Spinner=ge,p.StatGrid=L,p.StatePage=xr,p.Table=rr,p.Tabs=ar,p.Tooltip=nr,p.applyTheme=je,p.useTheme=be,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sirsluginston/sharedui",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Server-Driven UI component library for SirSluginston Co projects",
5
5
  "type": "module",
6
6
  "main": "dist/sharedui.js",
package/dist/style.css DELETED
@@ -1 +0,0 @@
1
- @import"https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Roboto:wght@300;400;500;700&display=swap";:root{--primary-color: #1a365d;--secondary-color: #2d3748;--accent-color: #319795;--surface-light: #fafafa;--surface-dark: #1a1a2e;--text-light: #1a1a1a;--text-dark: #f5f5f5;--org-color: #D2691E;--success-color: #38a169;--warning-color: #d69e2e;--danger-color: #e53e3e;--info-color: #3182ce;--bg-color: var(--surface-light);--text-color: var(--text-light);--border-color: var(--secondary-color);--font-sans: "Roboto", system-ui, sans-serif;--font-serif: "Lora", Georgia, serif;--font-mono: "Fira Code", monospace;--space-xs: 4px;--space-sm: 8px;--space-md: 16px;--space-lg: 32px;--space-xl: 64px;--radius-sm: 4px;--radius-md: 8px;--radius-lg: 16px;--radius-full: 9999px;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);--shadow-md: 0 4px 6px rgba(0, 0, 0, .1);--shadow-lg: 0 10px 15px rgba(0, 0, 0, .1);--transition-fast: .15s ease;--transition-normal: .25s ease;--transition-slow: .35s ease}.dark-mode{--bg-color: var(--surface-dark);--text-color: var(--text-dark);--border-color: var(--accent-color)}*,*:before,*:after{box-sizing:border-box}body{margin:0;font-family:var(--font-sans);background-color:var(--bg-color);color:var(--text-color);line-height:1.5;transition:background-color var(--transition-normal),color var(--transition-normal)}:focus-visible{outline:2px solid var(--accent-color);outline-offset:2px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--bg-color)}::-webkit-scrollbar-thumb{background:var(--secondary-color);border-radius:var(--radius-full)}::-webkit-scrollbar-thumb:hover{background:var(--primary-color)}.page-layout{display:grid;grid-template-columns:220px 1fr 280px;gap:var(--space-lg);padding:var(--space-lg);padding-top:var(--space-xl);max-width:1800px;margin:0 auto;align-items:start}.page-main{min-width:0}.page-filters{position:sticky;top:100px;max-height:calc(100vh - 120px);overflow-y:auto}.page-sidebar{position:sticky;top:100px;max-height:calc(100vh - 120px);overflow-y:auto;overflow-x:hidden}.page-sidebar::-webkit-scrollbar,.page-filters::-webkit-scrollbar{width:0;background:transparent}.page-content.with-filters{padding-left:260px}@media (max-width: 1400px){.page-layout{grid-template-columns:180px 1fr 260px}.stat-grid{grid-template-columns:repeat(3,1fr)!important}}@media (max-width: 1200px){.page-layout{grid-template-columns:1fr 240px}.page-filters{display:none!important}.stat-grid{grid-template-columns:repeat(3,1fr)!important}}@media (max-width: 992px){.page-layout{grid-template-columns:1fr;padding:var(--space-md)}.page-sidebar,.page-filters{display:none!important}.stat-grid{grid-template-columns:repeat(2,1fr)!important}}@media (max-width: 768px){.page-layout{padding:var(--space-sm);gap:var(--space-md)}.stat-grid{grid-template-columns:repeat(2,1fr)!important}}@media (max-width: 480px){.stat-grid{grid-template-columns:1fr!important}}.mobile-ad-banner{display:block;position:fixed;bottom:0;left:0;right:0;padding:var(--space-sm);background:var(--bg-color);border-top:2px solid var(--border-color);z-index:1000;text-align:center}@media (min-width: 1201px){.mobile-ad-banner{display:none}}@media (max-width: 1200px){.page-layout{padding-bottom:80px}}.mobile-info-bar{display:none}@media (max-width: 992px){.mobile-info-bar{display:flex;gap:var(--space-sm);padding:var(--space-sm);background:var(--secondary-color);border-radius:var(--radius-md);margin-bottom:var(--space-md);overflow-x:auto;white-space:nowrap}.mobile-info-bar>span{padding:var(--space-xs) var(--space-sm);background:var(--bg-color);border-radius:var(--radius-sm);font-size:.8rem;color:var(--text-color)}}