@optifye/dashboard-core 6.12.26 → 6.12.27

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/index.mjs CHANGED
@@ -16,7 +16,7 @@ import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, ReferenceLine, Too
16
16
  import { Slot } from '@radix-ui/react-slot';
17
17
  import * as SelectPrimitive from '@radix-ui/react-select';
18
18
  import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
19
- import { AdjustmentsHorizontalIcon, ClockIcon, UsersIcon, UserCircleIcon, TicketIcon, CurrencyDollarIcon, QuestionMarkCircleIcon, XMarkIcon, ArrowRightIcon, Bars3Icon, HomeIcon, VideoCameraIcon, TrophyIcon, ChartBarIcon, LightBulbIcon, CubeIcon, HeartIcon, Cog6ToothIcon, ChevronRightIcon, ArrowRightStartOnRectangleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, CalendarIcon, ChevronDownIcon, ChevronLeftIcon, EnvelopeIcon, DocumentTextIcon, ChevronUpIcon, ArrowDownTrayIcon, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, FunnelIcon, EyeIcon, InformationCircleIcon, ArrowLeftIcon, PlayCircleIcon } from '@heroicons/react/24/outline';
19
+ import { AdjustmentsHorizontalIcon, ClockIcon, UsersIcon, UserCircleIcon, TicketIcon, CurrencyDollarIcon, QuestionMarkCircleIcon, XMarkIcon, ArrowRightIcon, Bars3Icon, VideoCameraIcon, TrophyIcon, ChartBarIcon, LightBulbIcon, CubeIcon, HeartIcon, Cog6ToothIcon, ChevronRightIcon, ArrowRightStartOnRectangleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, CalendarIcon, ChevronDownIcon, ChevronLeftIcon, EnvelopeIcon, DocumentTextIcon, ChevronUpIcon, ArrowDownTrayIcon, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, FunnelIcon, EyeIcon, InformationCircleIcon, ArrowLeftIcon, PlayCircleIcon } from '@heroicons/react/24/outline';
20
20
  import { CheckIcon } from '@heroicons/react/24/solid';
21
21
  import html2canvas from 'html2canvas';
22
22
  import jsPDF, { jsPDF as jsPDF$1 } from 'jspdf';
@@ -22046,14 +22046,87 @@ var toNumber = (value) => {
22046
22046
  }
22047
22047
  return 0;
22048
22048
  };
22049
+ var toOptionalNumber = (value) => {
22050
+ if (typeof value === "number" && Number.isFinite(value)) return value;
22051
+ if (typeof value === "string" && value.trim() !== "") {
22052
+ const parsed = Number(value);
22053
+ return Number.isFinite(parsed) ? parsed : null;
22054
+ }
22055
+ return null;
22056
+ };
22049
22057
  var EFFICIENCY_ON_TRACK_THRESHOLD = 100;
22050
22058
  var isEfficiencyOnTrack = (efficiency) => toNumber(efficiency) >= EFFICIENCY_ON_TRACK_THRESHOLD;
22059
+ var KPI_SIGNAL_LABELS = {
22060
+ stable: "Stable",
22061
+ warning: "Warning",
22062
+ attention: "Attention"
22063
+ };
22064
+ var normalizeLineSignalSource = (source) => source === "recent_flow" ? "recent_flow" : "efficiency";
22065
+ var normalizeLineSignal = (lineSignal, fallbackEfficiency, fallbackWeight) => {
22066
+ if (lineSignal && typeof lineSignal === "object") {
22067
+ const raw = lineSignal;
22068
+ return {
22069
+ source: normalizeLineSignalSource(raw.source),
22070
+ percent: toOptionalNumber(raw.percent),
22071
+ weight: toOptionalNumber(raw.weight),
22072
+ mode: raw.mode === "unavailable" ? "unavailable" : "computed",
22073
+ reason: typeof raw.reason === "string" ? raw.reason : raw.reason ?? null,
22074
+ effectiveEndAt: raw.effective_end_at ?? raw.effectiveEndAt ?? null,
22075
+ computedAt: raw.computed_at ?? raw.computedAt ?? null
22076
+ };
22077
+ }
22078
+ const percent2 = toOptionalNumber(fallbackEfficiency);
22079
+ if (percent2 === null) return null;
22080
+ return {
22081
+ source: "efficiency",
22082
+ percent: percent2,
22083
+ weight: toOptionalNumber(fallbackWeight),
22084
+ mode: "computed",
22085
+ reason: "fallback_efficiency",
22086
+ effectiveEndAt: null,
22087
+ computedAt: null
22088
+ };
22089
+ };
22090
+ var getKpiSignalStatus = (signal, legend = DEFAULT_EFFICIENCY_LEGEND) => {
22091
+ const percent2 = toOptionalNumber(signal?.percent);
22092
+ if (percent2 === null) return null;
22093
+ const color2 = getEfficiencyColor(percent2, legend);
22094
+ if (color2 === "green") return "stable";
22095
+ if (color2 === "yellow") return "warning";
22096
+ return "attention";
22097
+ };
22098
+ var getKpiSignalLabel = (signal, legend = DEFAULT_EFFICIENCY_LEGEND) => {
22099
+ const status = getKpiSignalStatus(signal, legend);
22100
+ return status ? KPI_SIGNAL_LABELS[status] : null;
22101
+ };
22102
+ var aggregateLineSignals = (signals) => {
22103
+ const numericSignals = signals.filter(
22104
+ (signal) => signal !== null && signal !== void 0 && toOptionalNumber(signal.percent) !== null
22105
+ );
22106
+ if (numericSignals.length === 0) return null;
22107
+ const percent2 = numericSignals.reduce(
22108
+ (sum, signal) => sum + (toOptionalNumber(signal.percent) ?? 0),
22109
+ 0
22110
+ ) / numericSignals.length;
22111
+ const signalSources = new Set(numericSignals.map((signal) => signal.source));
22112
+ const source = signalSources.size === 1 ? numericSignals[0].source : "mixed";
22113
+ return {
22114
+ source,
22115
+ percent: percent2,
22116
+ weight: null,
22117
+ mode: "computed",
22118
+ reason: "average",
22119
+ effectiveEndAt: null,
22120
+ computedAt: null
22121
+ };
22122
+ };
22051
22123
  var createDefaultKPIs = () => ({
22052
22124
  underperformingWorkers: { current: 0, total: 0, change: 0 },
22053
22125
  efficiency: { value: 0, change: 0 },
22054
22126
  outputProgress: { current: 0, target: 0, idealOutput: 0, change: 0 },
22055
22127
  avgCycleTime: { value: 0, change: 0 },
22056
- qualityCompliance: { value: 95, change: 0 }
22128
+ qualityCompliance: { value: 95, change: 0 },
22129
+ lineSignal: null
22057
22130
  });
22058
22131
  var buildKPIsFromLineMetricsRow = (row) => {
22059
22132
  if (!row) return createDefaultKPIs();
@@ -22087,15 +22160,28 @@ var buildKPIsFromLineMetricsRow = (row) => {
22087
22160
  qualityCompliance: {
22088
22161
  value: 95,
22089
22162
  change: 0
22090
- }
22163
+ },
22164
+ lineSignal: normalizeLineSignal(row.line_signal, avgEfficiency, idealOutput || lineThreshold)
22091
22165
  };
22092
22166
  };
22093
22167
  var aggregateKPIsFromLineMetricsRows = (rows) => {
22094
22168
  if (!rows || rows.length === 0) return createDefaultKPIs();
22169
+ const lineSignal = aggregateLineSignals(
22170
+ rows.map((row) => normalizeLineSignal(
22171
+ row?.line_signal,
22172
+ row?.avg_efficiency,
22173
+ row?.ideal_output ?? row?.line_threshold
22174
+ ))
22175
+ );
22095
22176
  const eligibleRows = rows.filter(
22096
22177
  (row) => isValidAggregateEfficiency(row?.monitoring_mode ?? row?.monitoringMode, row?.avg_efficiency)
22097
22178
  );
22098
- if (eligibleRows.length === 0) return createDefaultKPIs();
22179
+ if (eligibleRows.length === 0) {
22180
+ return {
22181
+ ...createDefaultKPIs(),
22182
+ lineSignal
22183
+ };
22184
+ }
22099
22185
  const currentOutputSum = eligibleRows.reduce((sum, row) => sum + toNumber(row.current_output), 0);
22100
22186
  const lineThresholdSum = eligibleRows.reduce(
22101
22187
  (sum, row) => sum + (row?.output_target_recalculated !== void 0 && row?.output_target_recalculated !== null ? toNumber(row.output_target_recalculated) : toNumber(row.line_threshold)),
@@ -22142,7 +22228,8 @@ var aggregateKPIsFromLineMetricsRows = (rows) => {
22142
22228
  qualityCompliance: {
22143
22229
  value: 95,
22144
22230
  change: 0
22145
- }
22231
+ },
22232
+ lineSignal
22146
22233
  };
22147
22234
  };
22148
22235
 
@@ -34696,19 +34783,19 @@ var SkuRow = ({ sku, isSelected, isLive, onSelect }) => {
34696
34783
  onClick: () => onSelect?.(isSelected ? null : sku.sku_id),
34697
34784
  "data-testid": `sku-progress-row-${sku.sku_id}`,
34698
34785
  children: [
34699
- /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [
34700
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 truncate", children: [
34786
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
34787
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 flex-1 min-w-0", children: [
34701
34788
  /* @__PURE__ */ jsx(
34702
34789
  "span",
34703
34790
  {
34704
- className: "text-sm font-semibold text-gray-800 truncate",
34791
+ className: "text-xs sm:text-sm font-semibold text-gray-800 break-words line-clamp-2",
34705
34792
  title: skuLabel,
34706
34793
  children: skuLabel
34707
34794
  }
34708
34795
  ),
34709
- isLive && /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-green-500 shrink-0 shadow-[0_0_4px_rgba(34,197,94,0.6)]", title: "Currently running" })
34796
+ isLive && /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-green-500 shrink-0 shadow-[0_0_4px_rgba(34,197,94,0.6)] mt-1.5", title: "Currently running" })
34710
34797
  ] }),
34711
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 font-medium tabular-nums shrink-0", children: [
34798
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 font-medium tabular-nums shrink-0 pt-0.5", children: [
34712
34799
  Math.round(current),
34713
34800
  " / ",
34714
34801
  Math.round(target)
@@ -45046,7 +45133,7 @@ var FileManagerFilters = ({
45046
45133
  onClick: () => {
45047
45134
  onIdleClipSortChange?.(idleClipSort === "latest" ? "idle_duration_desc" : "latest");
45048
45135
  },
45049
- className: `p-2 rounded-xl transition-all duration-200 ${idleClipSort === "idle_duration_desc" ? "bg-orange-100 text-orange-600 hover:bg-orange-200 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-slate-200"}`,
45136
+ className: `p-2 rounded-xl transition-all duration-200 ${idleClipSort === "idle_duration_desc" ? "bg-blue-100 text-blue-600 hover:bg-blue-200 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-slate-200"}`,
45050
45137
  title: idleClipSort === "idle_duration_desc" ? "Sort by newest first" : "Sort by longest idle first",
45051
45138
  "aria-label": idleClipSort === "idle_duration_desc" ? "Sort idle clips by newest first" : "Sort idle clips by longest idle first",
45052
45139
  children: /* @__PURE__ */ jsx(ArrowDownWideNarrow, { className: "h-5 w-5" })
@@ -45113,7 +45200,7 @@ var FileManagerFilters = ({
45113
45200
  }
45114
45201
  )
45115
45202
  ] }),
45116
- activeFilter === "idle_time" && idleClipSort === "idle_duration_desc" && /* @__PURE__ */ jsxs("div", { className: "inline-flex w-fit items-center gap-2 rounded-full border border-orange-100 bg-orange-50/70 px-2.5 py-1 text-xs text-orange-700 shadow-sm", children: [
45203
+ activeFilter === "idle_time" && idleClipSort === "idle_duration_desc" && /* @__PURE__ */ jsxs("div", { className: "inline-flex w-fit items-center gap-2 rounded-full border border-blue-100 bg-blue-50/70 px-2.5 py-1 text-xs text-blue-700 shadow-sm", children: [
45117
45204
  /* @__PURE__ */ jsx(ArrowDownWideNarrow, { className: "h-3.5 w-3.5" }),
45118
45205
  /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Longest idle first" }),
45119
45206
  /* @__PURE__ */ jsx(
@@ -45123,7 +45210,7 @@ var FileManagerFilters = ({
45123
45210
  e.stopPropagation();
45124
45211
  onIdleClipSortChange?.("latest");
45125
45212
  },
45126
- className: "rounded-full p-0.5 transition-colors hover:bg-orange-100",
45213
+ className: "rounded-full p-0.5 transition-colors hover:bg-blue-100",
45127
45214
  title: "Clear idle sort",
45128
45215
  children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
45129
45216
  }
@@ -57585,7 +57672,7 @@ var SideNavBar = memo$1(({
57585
57672
  const role = user?.role_level;
57586
57673
  const roleNavPaths = useMemo(() => getRoleNavPaths(role), [role]);
57587
57674
  const showLiveMonitorLink = roleNavPaths.includes("/live-monitor");
57588
- const rootDashboardSurface = useMemo(() => role === "owner" || role === "plant_head" || role === "optifye" ? "operations_overview" : "monitor", [role]);
57675
+ const rootDashboardSurface = useMemo(() => "monitor", []);
57589
57676
  const getBasePath = useCallback((path) => {
57590
57677
  const firstSegment = path.split("?")[0].split("/").filter(Boolean)[0];
57591
57678
  return firstSegment ? `/${firstSegment}` : "/";
@@ -57636,12 +57723,6 @@ var SideNavBar = memo$1(({
57636
57723
  dashboard_surface: dashboardSurface
57637
57724
  }
57638
57725
  }), []);
57639
- const handleHomeClick = useCallback(() => {
57640
- navigate("/", {
57641
- trackingEvent: buildDashboardSurfaceTrackingEvent("side_nav", "/", rootDashboardSurface)
57642
- });
57643
- onMobileMenuClose?.();
57644
- }, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent, rootDashboardSurface]);
57645
57726
  const handleLeaderboardClick = useCallback(() => {
57646
57727
  navigate(`/leaderboard`, {
57647
57728
  trackingEvent: {
@@ -57947,7 +58028,6 @@ var SideNavBar = memo$1(({
57947
58028
  });
57948
58029
  onMobileMenuClose?.();
57949
58030
  }, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent, rootDashboardSurface]);
57950
- const homeButtonClasses = useMemo(() => getButtonClasses("/"), [getButtonClasses]);
57951
58031
  const liveButtonClasses = useMemo(() => getButtonClasses("/live-monitor"), [getButtonClasses]);
57952
58032
  const leaderboardButtonClasses = useMemo(() => getButtonClasses("/leaderboard"), [getButtonClasses]);
57953
58033
  const kpisButtonClasses = useMemo(() => getButtonClasses("/kpis"), [getButtonClasses]);
@@ -57978,118 +58058,99 @@ var SideNavBar = memo$1(({
57978
58058
  children: /* @__PURE__ */ jsx(Logo, { className: "w-12 h-12 object-contain cursor-pointer" })
57979
58059
  }
57980
58060
  ) }),
57981
- /* @__PURE__ */ jsxs("div", { className: "flex-1 w-full py-6 px-4 overflow-y-auto", children: [
57982
- /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
57983
- canAccessPath("/") && /* @__PURE__ */ jsxs(
57984
- "button",
57985
- {
57986
- onClick: handleHomeClick,
57987
- className: homeButtonClasses,
57988
- "aria-label": "Home",
57989
- tabIndex: 0,
57990
- role: "tab",
57991
- "aria-selected": isPathActive("/"),
57992
- children: [
57993
- /* @__PURE__ */ jsx(HomeIcon, { className: "w-5 h-5 mb-1" }),
57994
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Home" })
57995
- ]
57996
- }
57997
- ),
57998
- showLiveMonitorLink && canAccessPath("/live-monitor") && /* @__PURE__ */ jsxs(
57999
- "button",
58000
- {
58001
- onClick: handleLiveClick,
58002
- className: `${liveButtonClasses} mt-3`,
58003
- "aria-label": "Monitor",
58004
- tabIndex: 0,
58005
- role: "tab",
58006
- "aria-selected": isPathActive("/live-monitor"),
58007
- children: [
58008
- /* @__PURE__ */ jsx(VideoCameraIcon, { className: "w-5 h-5 mb-1" }),
58009
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Monitor" })
58010
- ]
58011
- }
58012
- )
58013
- ] }),
58014
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
58015
- canAccessPath("/leaderboard") && /* @__PURE__ */ jsxs(
58016
- "button",
58017
- {
58018
- onClick: handleLeaderboardClick,
58019
- className: leaderboardButtonClasses,
58020
- "aria-label": "Leaderboard",
58021
- tabIndex: 0,
58022
- role: "tab",
58023
- "aria-selected": isPathActive("/leaderboard"),
58024
- children: [
58025
- /* @__PURE__ */ jsx(TrophyIcon, { className: "w-5 h-5 mb-1" }),
58026
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Leaders" })
58027
- ]
58028
- }
58029
- ),
58030
- canAccessPath("/kpis") && /* @__PURE__ */ jsxs(
58031
- "button",
58032
- {
58033
- onClick: handleKPIsClick,
58034
- className: kpisButtonClasses,
58035
- "aria-label": "Lines",
58036
- tabIndex: 0,
58037
- role: "tab",
58038
- "aria-selected": isPathActive("/kpis"),
58039
- children: [
58040
- /* @__PURE__ */ jsx(ChartBarIcon, { className: "w-5 h-5 mb-1" }),
58041
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Lines" })
58042
- ]
58043
- }
58044
- ),
58045
- canAccessPath("/improvement-center") && /* @__PURE__ */ jsxs(
58046
- "button",
58047
- {
58048
- onClick: handleImprovementClick,
58049
- className: improvementButtonClasses,
58050
- "aria-label": "Improvement Center",
58051
- tabIndex: 0,
58052
- role: "tab",
58053
- "aria-selected": isPathActive("/improvement-center"),
58054
- children: [
58055
- /* @__PURE__ */ jsx(LightBulbIcon, { className: "w-5 h-5 mb-1" }),
58056
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight text-center", children: "Improve" })
58057
- ]
58058
- }
58059
- ),
58060
- showSupervisorManagement,
58061
- skuEnabled && canAccessPath("/skus") && /* @__PURE__ */ jsxs(
58062
- "button",
58063
- {
58064
- onClick: handleSKUsClick,
58065
- className: skusButtonClasses,
58066
- "aria-label": "SKU Management",
58067
- tabIndex: 0,
58068
- role: "tab",
58069
- "aria-selected": isPathActive("/skus"),
58070
- children: [
58071
- /* @__PURE__ */ jsx(CubeIcon, { className: "w-5 h-5 mb-1" }),
58072
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "SKUs" })
58073
- ]
58074
- }
58075
- ),
58076
- canAccessPath("/health") && /* @__PURE__ */ jsxs(
58077
- "button",
58078
- {
58079
- onClick: handleHealthClick,
58080
- className: healthButtonClasses,
58081
- "aria-label": "System Health",
58082
- tabIndex: 0,
58083
- role: "tab",
58084
- "aria-selected": isPathActive("/health"),
58085
- children: [
58086
- /* @__PURE__ */ jsx(HeartIcon, { className: "w-5 h-5 mb-1" }),
58087
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Health" })
58088
- ]
58089
- }
58090
- )
58091
- ] })
58092
- ] }),
58061
+ /* @__PURE__ */ jsx("div", { className: "flex-1 w-full py-6 px-4 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
58062
+ showLiveMonitorLink && canAccessPath("/live-monitor") && /* @__PURE__ */ jsxs(
58063
+ "button",
58064
+ {
58065
+ onClick: handleLiveClick,
58066
+ className: liveButtonClasses,
58067
+ "aria-label": "Monitor",
58068
+ tabIndex: 0,
58069
+ role: "tab",
58070
+ "aria-selected": isPathActive("/live-monitor"),
58071
+ children: [
58072
+ /* @__PURE__ */ jsx(VideoCameraIcon, { className: "w-5 h-5 mb-1" }),
58073
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Monitor" })
58074
+ ]
58075
+ }
58076
+ ),
58077
+ canAccessPath("/leaderboard") && /* @__PURE__ */ jsxs(
58078
+ "button",
58079
+ {
58080
+ onClick: handleLeaderboardClick,
58081
+ className: leaderboardButtonClasses,
58082
+ "aria-label": "Leaderboard",
58083
+ tabIndex: 0,
58084
+ role: "tab",
58085
+ "aria-selected": isPathActive("/leaderboard"),
58086
+ children: [
58087
+ /* @__PURE__ */ jsx(TrophyIcon, { className: "w-5 h-5 mb-1" }),
58088
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Leaders" })
58089
+ ]
58090
+ }
58091
+ ),
58092
+ canAccessPath("/kpis") && /* @__PURE__ */ jsxs(
58093
+ "button",
58094
+ {
58095
+ onClick: handleKPIsClick,
58096
+ className: kpisButtonClasses,
58097
+ "aria-label": "Lines",
58098
+ tabIndex: 0,
58099
+ role: "tab",
58100
+ "aria-selected": isPathActive("/kpis"),
58101
+ children: [
58102
+ /* @__PURE__ */ jsx(ChartBarIcon, { className: "w-5 h-5 mb-1" }),
58103
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Lines" })
58104
+ ]
58105
+ }
58106
+ ),
58107
+ canAccessPath("/improvement-center") && /* @__PURE__ */ jsxs(
58108
+ "button",
58109
+ {
58110
+ onClick: handleImprovementClick,
58111
+ className: improvementButtonClasses,
58112
+ "aria-label": "Improvement Center",
58113
+ tabIndex: 0,
58114
+ role: "tab",
58115
+ "aria-selected": isPathActive("/improvement-center"),
58116
+ children: [
58117
+ /* @__PURE__ */ jsx(LightBulbIcon, { className: "w-5 h-5 mb-1" }),
58118
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight text-center", children: "Improve" })
58119
+ ]
58120
+ }
58121
+ ),
58122
+ showSupervisorManagement,
58123
+ skuEnabled && canAccessPath("/skus") && /* @__PURE__ */ jsxs(
58124
+ "button",
58125
+ {
58126
+ onClick: handleSKUsClick,
58127
+ className: skusButtonClasses,
58128
+ "aria-label": "SKU Management",
58129
+ tabIndex: 0,
58130
+ role: "tab",
58131
+ "aria-selected": isPathActive("/skus"),
58132
+ children: [
58133
+ /* @__PURE__ */ jsx(CubeIcon, { className: "w-5 h-5 mb-1" }),
58134
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "SKUs" })
58135
+ ]
58136
+ }
58137
+ ),
58138
+ canAccessPath("/health") && /* @__PURE__ */ jsxs(
58139
+ "button",
58140
+ {
58141
+ onClick: handleHealthClick,
58142
+ className: healthButtonClasses,
58143
+ "aria-label": "System Health",
58144
+ tabIndex: 0,
58145
+ role: "tab",
58146
+ "aria-selected": isPathActive("/health"),
58147
+ children: [
58148
+ /* @__PURE__ */ jsx(HeartIcon, { className: "w-5 h-5 mb-1" }),
58149
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Health" })
58150
+ ]
58151
+ }
58152
+ )
58153
+ ] }) }),
58093
58154
  /* @__PURE__ */ jsx("div", { className: "w-full py-4 px-4 border-t border-gray-100 flex-shrink-0 flex flex-col gap-2", children: settingsItems.length > 0 && /* @__PURE__ */ jsxs(
58094
58155
  "button",
58095
58156
  {
@@ -58126,23 +58187,11 @@ var SideNavBar = memo$1(({
58126
58187
  };
58127
58188
  };
58128
58189
  return /* @__PURE__ */ jsxs("nav", { className: "px-5 py-6", children: [
58129
- canAccessPath("/") && /* @__PURE__ */ jsxs(
58130
- "button",
58131
- {
58132
- onClick: handleMobileNavClick(handleHomeClick),
58133
- className: getMobileButtonClass("/"),
58134
- "aria-label": "Home",
58135
- children: [
58136
- /* @__PURE__ */ jsx(HomeIcon, { className: getIconClass("/") }),
58137
- /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Home" })
58138
- ]
58139
- }
58140
- ),
58141
58190
  showLiveMonitorLink && canAccessPath("/live-monitor") && /* @__PURE__ */ jsxs(
58142
58191
  "button",
58143
58192
  {
58144
58193
  onClick: handleMobileNavClick(handleLiveClick),
58145
- className: `${getMobileButtonClass("/live-monitor")} mt-2`,
58194
+ className: getMobileButtonClass("/live-monitor"),
58146
58195
  "aria-label": "Monitor",
58147
58196
  children: [
58148
58197
  /* @__PURE__ */ jsx(VideoCameraIcon, { className: getIconClass("/live-monitor") }),
@@ -69708,6 +69757,19 @@ var formatDateKey2 = (dateKey, timezone, options) => {
69708
69757
  return dateKey;
69709
69758
  }
69710
69759
  };
69760
+ var getFirstName = (displayName) => {
69761
+ const trimmedName = displayName.trim();
69762
+ if (!trimmedName) return "";
69763
+ return trimmedName.split(/\s+/)[0];
69764
+ };
69765
+ var formatSupervisorFirstNames = (supervisors, fallbackSupervisorNames) => {
69766
+ const firstNames = supervisors.map((supervisor) => getFirstName(supervisor.displayName)).filter((name) => name.length > 0);
69767
+ if (firstNames.length > 0) {
69768
+ return Array.from(new Set(firstNames)).join(", ");
69769
+ }
69770
+ const fallbackFirstNames = fallbackSupervisorNames.flatMap((names) => names.split(",")).map(getFirstName).filter((name) => name.length > 0);
69771
+ return fallbackFirstNames.length > 0 ? Array.from(new Set(fallbackFirstNames)).join(", ") : "Unassigned";
69772
+ };
69711
69773
  var LeaderboardCountdown = ({ targetDate, format: format10, finishedLabel = "Finished", placeholder = "--", onFinished }) => {
69712
69774
  const [time2, setTime] = useState("");
69713
69775
  const hasFinishedRef = useRef(false);
@@ -69833,7 +69895,7 @@ var LinesLeaderboard = ({
69833
69895
  });
69834
69896
  const supervisors = Array.from(supervisorByUserId.values());
69835
69897
  const primarySupervisor = supervisors[0];
69836
- const supervisorName = supervisors.length > 1 ? `${supervisors.length} supervisors` : primarySupervisor?.displayName || fallbackSupervisorNames[0] || "Unassigned";
69898
+ const supervisorName = formatSupervisorFirstNames(supervisors, fallbackSupervisorNames);
69837
69899
  const supervisorImage = primarySupervisor?.profilePhotoUrl || null;
69838
69900
  return {
69839
69901
  ...row,
@@ -70093,21 +70155,49 @@ var LinesLeaderboard = ({
70093
70155
  ] }) }) }) })
70094
70156
  ] });
70095
70157
  };
70158
+ var SIGNAL_PILL_STYLES = {
70159
+ stable: {
70160
+ container: "bg-emerald-100 text-emerald-700 border border-emerald-200",
70161
+ dot: "bg-emerald-500"
70162
+ },
70163
+ warning: {
70164
+ container: "bg-amber-100 text-amber-700 border border-amber-200",
70165
+ dot: "bg-amber-500"
70166
+ },
70167
+ attention: {
70168
+ container: "bg-red-100 text-red-700 border border-red-200",
70169
+ dot: "bg-red-500"
70170
+ }
70171
+ };
70172
+ var KpiSignalPill = ({ signal, efficiencyLegend }) => {
70173
+ const status = getKpiSignalStatus(signal, efficiencyLegend);
70174
+ const label = getKpiSignalLabel(signal, efficiencyLegend);
70175
+ if (!status || !label) return null;
70176
+ const styles2 = SIGNAL_PILL_STYLES[status];
70177
+ return /* @__PURE__ */ jsxs(
70178
+ "div",
70179
+ {
70180
+ className: `flex items-center gap-1.5 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs font-medium flex-shrink-0 ${styles2.container}`,
70181
+ style: { minWidth: "fit-content" },
70182
+ children: [
70183
+ /* @__PURE__ */ jsx("div", { className: `w-2 h-2 rounded-full ${styles2.dot} animate-pulse` }),
70184
+ /* @__PURE__ */ jsx("span", { children: label })
70185
+ ]
70186
+ }
70187
+ );
70188
+ };
70096
70189
  var LineCard = ({
70097
70190
  line,
70098
70191
  kpis,
70099
70192
  isLoading,
70100
70193
  error,
70101
70194
  onClick,
70195
+ efficiencyLegend,
70102
70196
  supervisorEnabled = false,
70103
70197
  supervisorName,
70104
70198
  supervisors
70105
70199
  }) => {
70106
70200
  const isUptimeLine = (line.monitoring_mode ?? "output") === "uptime";
70107
- const isOnTrack = React144__default.useMemo(() => {
70108
- if (!kpis) return null;
70109
- return isEfficiencyOnTrack(kpis.efficiency.value);
70110
- }, [kpis]);
70111
70201
  return /* @__PURE__ */ jsxs(
70112
70202
  motion.div,
70113
70203
  {
@@ -70179,10 +70269,7 @@ var LineCard = ({
70179
70269
  ] })
70180
70270
  ] })
70181
70271
  ] }),
70182
- !isUptimeLine && kpis && isOnTrack !== null && /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1.5 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs font-medium flex-shrink-0 ${isOnTrack ? "bg-emerald-100 text-emerald-700 border border-emerald-200" : "bg-red-100 text-red-700 border border-red-200"}`, style: { minWidth: "fit-content" }, children: [
70183
- /* @__PURE__ */ jsx("div", { className: `w-2 h-2 rounded-full ${isOnTrack ? "bg-emerald-500" : "bg-red-500"} animate-pulse` }),
70184
- /* @__PURE__ */ jsx("span", { children: isOnTrack ? "On Track" : "Behind" })
70185
- ] })
70272
+ !isUptimeLine && kpis && /* @__PURE__ */ jsx(KpiSignalPill, { signal: kpis.lineSignal, efficiencyLegend })
70186
70273
  ] }) }),
70187
70274
  isLoading && !kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
70188
70275
  /* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
@@ -70250,12 +70337,9 @@ var KpiGroupCard = ({
70250
70337
  isLoading,
70251
70338
  error,
70252
70339
  isUptimeMode,
70340
+ efficiencyLegend,
70253
70341
  onClick
70254
70342
  }) => {
70255
- const isOnTrack = React144__default.useMemo(() => {
70256
- if (!kpis) return null;
70257
- return isEfficiencyOnTrack(kpis.efficiency.value);
70258
- }, [kpis]);
70259
70343
  const outputTarget = Number(kpis?.outputProgress?.target ?? 0);
70260
70344
  const outputCurrent = Number(kpis?.outputProgress?.current ?? 0);
70261
70345
  const progressPercent = outputTarget > 0 ? Math.min(outputCurrent / outputTarget * 100, 100) : 0;
@@ -70279,10 +70363,7 @@ var KpiGroupCard = ({
70279
70363
  ),
70280
70364
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs font-medium text-gray-500", children: subtitle })
70281
70365
  ] }),
70282
- !isUptimeMode && kpis && isOnTrack !== null && /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1.5 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs font-medium flex-shrink-0 ${isOnTrack ? "bg-emerald-100 text-emerald-700 border border-emerald-200" : "bg-red-100 text-red-700 border border-red-200"}`, style: { minWidth: "fit-content" }, children: [
70283
- /* @__PURE__ */ jsx("div", { className: `w-2 h-2 rounded-full ${isOnTrack ? "bg-emerald-500" : "bg-red-500"} animate-pulse` }),
70284
- /* @__PURE__ */ jsx("span", { children: isOnTrack ? "On Track" : "Behind" })
70285
- ] })
70366
+ !isUptimeMode && kpis && /* @__PURE__ */ jsx(KpiSignalPill, { signal: kpis.lineSignal, efficiencyLegend })
70286
70367
  ] }) }),
70287
70368
  isLoading && !kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
70288
70369
  /* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
@@ -70599,7 +70680,8 @@ var KPIsOverviewView = ({
70599
70680
  const {
70600
70681
  lineMetrics,
70601
70682
  isLoading: metricsLoading,
70602
- error: metricsError
70683
+ error: metricsError,
70684
+ efficiencyLegend
70603
70685
  } = useDashboardMetrics({
70604
70686
  lineId: factoryViewId,
70605
70687
  userAccessibleLineIds: metricsLineIds
@@ -70943,7 +71025,11 @@ var KPIsOverviewView = ({
70943
71025
  trackProps.output_current = kpis.outputProgress?.current;
70944
71026
  trackProps.output_target = kpis.outputProgress?.target;
70945
71027
  trackProps.underperforming_workers = kpis.underperformingWorkers?.current;
70946
- trackProps.status = isEfficiencyOnTrack(kpis.efficiency?.value) ? "On Track" : "Behind";
71028
+ const signalLabel = getKpiSignalLabel(kpis.lineSignal, efficiencyLegend);
71029
+ if (signalLabel) {
71030
+ trackProps.status = signalLabel;
71031
+ trackProps.signal_source = kpis.lineSignal?.source ?? null;
71032
+ }
70947
71033
  }
70948
71034
  trackCoreEvent("Line Card Clicked", trackProps);
70949
71035
  if (activeTab === "leaderboard" && timeRange === "today" && isHistoricalLeaderboardDaily) {
@@ -71029,6 +71115,7 @@ var KPIsOverviewView = ({
71029
71115
  isLoading: metricsLoading,
71030
71116
  error: metricsError,
71031
71117
  onClick: (kpis) => handleLineClick(line, kpis),
71118
+ efficiencyLegend,
71032
71119
  supervisorEnabled,
71033
71120
  supervisorName: supervisorNamesByLineId.get(line.id) || null,
71034
71121
  supervisors: supervisorsByLineId?.get(line.id)
@@ -71050,6 +71137,7 @@ var KPIsOverviewView = ({
71050
71137
  isLoading: metricsLoading,
71051
71138
  error: metricsError,
71052
71139
  isUptimeMode: viewType === "machine",
71140
+ efficiencyLegend,
71053
71141
  onClick
71054
71142
  },
71055
71143
  key
@@ -87128,4 +87216,4 @@ var RecentFlowSnapshotGrid = ({
87128
87216
  );
87129
87217
  };
87130
87218
 
87131
- export { ACTION_FAMILIES, ACTION_NAMES, AIAgentView_default as AIAgentView, AcceptInvite, AcceptInviteView_default as AcceptInviteView, AdvancedFilterDialog, AdvancedFilterPanel, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthService, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AvatarUpload, AxelNotificationPopup, AxelOrb, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottleneckClipsModal, BottleneckClipsView_default as BottleneckClipsView, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, ChangeRoleDialog, ClipFilterProvider, ClipsCostView_default as ClipsCostView, CompactWorkspaceHealthCard, ConfirmRemoveUserDialog, CongratulationsOverlay, CroppedHlsVideoPlayer, CroppedVideoPlayer, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_HOME_VIEW_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_SHIFT_DATA, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, DetailedHealthStatus, DiagnosisVideoModal, EFFICIENCY_ON_TRACK_THRESHOLD, EmptyStateMessage, EncouragementOverlay, FactoryAssignmentDropdown, FactoryView_default as FactoryView, FileManagerFilters, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, FittingTitle, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HealthDateShiftSelector, HealthStatusGrid, HealthStatusIndicator, HelpView_default as HelpView, HlsVideoPlayer, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, HourlyUptimeChart, ISTTimer_default as ISTTimer, IdleTimeVlmConfigProvider, ImprovementCenterView_default as ImprovementCenterView, InlineEditableText, InteractiveOnboardingTour, InvitationService, InvitationsTable, InviteUserDialog, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend5 as Legend, LineAssignmentDropdown, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LinesService, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, Logo, MainLayout, MapGridView, MetricCard_default as MetricCard, MinimalOnboardingPopup, MobileMenuProvider, NewClipsNotification, NoWorkspaceData, OnboardingDemo, OnboardingTour, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PlantHeadView_default as PlantHeadView, PlayPauseIndicator, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, ROOT_DASHBOARD_EVENT_NAMES, RecentFlowSnapshotGrid, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SENTRY_HANDLED_EVENT_SESSION_LIMIT, SENTRY_HANDLED_EVENT_WINDOW_MS, SENTRY_QUOTA_STORAGE_KEY, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionTracker, SessionTrackingContext, SessionTrackingProvider, SettingsPopup, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SignupWithInvitation, SilentErrorBoundary, SimpleOnboardingPopup, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, SupervisorDropdown_default as SupervisorDropdown, SupervisorManagementView_default as SupervisorManagementView, SupervisorService, TargetWorkspaceGrid, TargetsView_default as TargetsView, TeamManagementView_default as TeamManagementView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TicketsView_default as TicketsView, TimeDisplay_default as TimeDisplay, TimePickerDropdown, Timer_default as Timer, TimezoneProvider, TimezoneService, UptimeDonutChart, UptimeLineChart, UptimeMetricCards, UserAvatar, UserManagementService, UserManagementTable, UserService, UserUsageDetailModal, UserUsageStats, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceCycleTimeMetricCards, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, addSentryBreadcrumb, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildKpiLineHierarchy, buildLineLeaderboardRows, buildLineSkuBreakdown, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureHandledFrontendException, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, combineLineMetricsRows, countRealSkus, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, fetchLineDummySkuId, fetchLineSkuCatalog, filterDataByDateKeyRange, filterRealSkuBreakdown, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getActionDisplayName, getActiveShift, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekFullRange, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDateKeyFromValue, getDayDateKey, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getMonthlyTrendComparisonLabel, getNextUpdateInterval, getOperationalDate, getRoleAssignmentKind, getRoleDescription, getRoleLabel, getRoleMetadata, getRoleNavPaths, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getVisibleRolesForCurrentUser, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFactoryScopedRole, isFullMonthRange, isIgnorableFrontendError, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRealSku, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeDateKeyRangeUnbounded, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, pickPreferredLineMetricsRow, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSentryQuotaForTests, resetSubscriptionManager, resolveDefaultSkuId, resolveLiveSkuId, s3VideoPreloader, selectPreferredLineMetricsRow, setSentryUserContext, setSentryWorkspaceContext, shouldEnableLocalDevTestLogin, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, subscribeWorkspaceDisplayNames, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, transformToChartData, updateThreadTitle, upsertWorkspaceDisplayNameInCache, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useClipsInit, useCompanyClipsCost, useCompanyFastSlowClipFiltersEnabled, useCompanyHasVlmEnabledLine, useCompanyUsersUsage, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHideMobileHeader, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useIdleTimeClipClassifications, useIdleTimeReasons, useIdleTimeVlmConfig, useKpiTrends, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useLines, useMessages, useMetrics, useMobileMenu, useMonthlyTrend, useMultiLineShiftConfigs, useNavigation, useOperationalShiftKey, useOptionalSupabase, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useSessionTracking, useSessionTrackingContext, useShiftConfig, useShiftGroups, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useSupervisorsByLineIds, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useUserUsage, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthLastSeen, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, useWorkspaceUptimeTimeline, useWorkspaceVideoStreams, userService, videoPrefetchManager, videoPreloader, weeklyTopPerformerService, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };
87219
+ export { ACTION_FAMILIES, ACTION_NAMES, AIAgentView_default as AIAgentView, AcceptInvite, AcceptInviteView_default as AcceptInviteView, AdvancedFilterDialog, AdvancedFilterPanel, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthService, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AvatarUpload, AxelNotificationPopup, AxelOrb, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottleneckClipsModal, BottleneckClipsView_default as BottleneckClipsView, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, ChangeRoleDialog, ClipFilterProvider, ClipsCostView_default as ClipsCostView, CompactWorkspaceHealthCard, ConfirmRemoveUserDialog, CongratulationsOverlay, CroppedHlsVideoPlayer, CroppedVideoPlayer, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_HOME_VIEW_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_SHIFT_DATA, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, DetailedHealthStatus, DiagnosisVideoModal, EFFICIENCY_ON_TRACK_THRESHOLD, EmptyStateMessage, EncouragementOverlay, FactoryAssignmentDropdown, FactoryView_default as FactoryView, FileManagerFilters, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, FittingTitle, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HealthDateShiftSelector, HealthStatusGrid, HealthStatusIndicator, HelpView_default as HelpView, HlsVideoPlayer, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, HourlyUptimeChart, ISTTimer_default as ISTTimer, IdleTimeVlmConfigProvider, ImprovementCenterView_default as ImprovementCenterView, InlineEditableText, InteractiveOnboardingTour, InvitationService, InvitationsTable, InviteUserDialog, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPI_SIGNAL_LABELS, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend5 as Legend, LineAssignmentDropdown, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LinesService, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, Logo, MainLayout, MapGridView, MetricCard_default as MetricCard, MinimalOnboardingPopup, MobileMenuProvider, NewClipsNotification, NoWorkspaceData, OnboardingDemo, OnboardingTour, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PlantHeadView_default as PlantHeadView, PlayPauseIndicator, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, ROOT_DASHBOARD_EVENT_NAMES, RecentFlowSnapshotGrid, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, SENTRY_HANDLED_EVENT_SESSION_LIMIT, SENTRY_HANDLED_EVENT_WINDOW_MS, SENTRY_QUOTA_STORAGE_KEY, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SessionTracker, SessionTrackingContext, SessionTrackingProvider, SettingsPopup, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SignupWithInvitation, SilentErrorBoundary, SimpleOnboardingPopup, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, SupervisorDropdown_default as SupervisorDropdown, SupervisorManagementView_default as SupervisorManagementView, SupervisorService, TargetWorkspaceGrid, TargetsView_default as TargetsView, TeamManagementView_default as TeamManagementView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TicketsView_default as TicketsView, TimeDisplay_default as TimeDisplay, TimePickerDropdown, Timer_default as Timer, TimezoneProvider, TimezoneService, UptimeDonutChart, UptimeLineChart, UptimeMetricCards, UserAvatar, UserManagementService, UserManagementTable, UserService, UserUsageDetailModal, UserUsageStats, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceCycleTimeMetricCards, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, addSentryBreadcrumb, aggregateKPIsFromLineMetricsRows, aggregateLineSignals, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildKpiLineHierarchy, buildLineLeaderboardRows, buildLineSkuBreakdown, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureHandledFrontendException, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, combineLineMetricsRows, countRealSkus, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, fetchLineDummySkuId, fetchLineSkuCatalog, filterDataByDateKeyRange, filterRealSkuBreakdown, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getActionDisplayName, getActiveShift, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekFullRange, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDateKeyFromValue, getDayDateKey, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getKpiSignalLabel, getKpiSignalStatus, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getMonthlyTrendComparisonLabel, getNextUpdateInterval, getOperationalDate, getRoleAssignmentKind, getRoleDescription, getRoleLabel, getRoleMetadata, getRoleNavPaths, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getVisibleRolesForCurrentUser, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFactoryScopedRole, isFullMonthRange, isIgnorableFrontendError, isLegacyConfiguration, isLoopbackHostname, isPrefetchError, isRealSku, isRecentFlowVideoGridMetricMode, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWipGatedVideoGridMetricMode, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeActionFamily, normalizeDateKeyRange, normalizeDateKeyRangeUnbounded, normalizeRoleLevel, normalizeVideoGridMetricMode, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, pickPreferredLineMetricsRow, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSentryQuotaForTests, resetSubscriptionManager, resolveDefaultSkuId, resolveLiveSkuId, s3VideoPreloader, selectPreferredLineMetricsRow, setSentryUserContext, setSentryWorkspaceContext, shouldEnableLocalDevTestLogin, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, subscribeWorkspaceDisplayNames, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, transformToChartData, updateThreadTitle, upsertWorkspaceDisplayNameInCache, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useClipsInit, useCompanyClipsCost, useCompanyFastSlowClipFiltersEnabled, useCompanyHasVlmEnabledLine, useCompanyUsersUsage, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHideMobileHeader, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useIdleTimeClipClassifications, useIdleTimeReasons, useIdleTimeVlmConfig, useKpiTrends, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useLines, useMessages, useMetrics, useMobileMenu, useMonthlyTrend, useMultiLineShiftConfigs, useNavigation, useOperationalShiftKey, useOptionalSupabase, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useSessionTracking, useSessionTrackingContext, useShiftConfig, useShiftGroups, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useSupervisorsByLineIds, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useUserUsage, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthLastSeen, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, useWorkspaceUptimeTimeline, useWorkspaceVideoStreams, userService, videoPrefetchManager, videoPreloader, weeklyTopPerformerService, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };