@optifye/dashboard-core 6.12.26 → 6.12.28

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
@@ -14291,9 +14291,11 @@ var useLeaderboardMetrics = (date, shiftId, limit = 10, filter2 = "all") => {
14291
14291
  `/api/dashboard/leaderboard?${params.toString()}`
14292
14292
  );
14293
14293
  let entries = (data.entries || []).slice();
14294
- entries.sort(
14295
- (a, b) => (b.leaderboard_value ?? b.efficiency ?? 0) - (a.leaderboard_value ?? a.efficiency ?? 0)
14296
- );
14294
+ entries.sort((a, b) => {
14295
+ const valueA = a.leaderboard_metric_kind === "cycle_time" ? a.leaderboard_value : a.efficiency;
14296
+ const valueB = b.leaderboard_metric_kind === "cycle_time" ? b.leaderboard_value : b.efficiency;
14297
+ return (valueB ?? -1) - (valueA ?? -1);
14298
+ });
14297
14299
  if (filter2 === "top") {
14298
14300
  entries = entries.slice(0, limit);
14299
14301
  } else if (filter2 === "bottom") {
@@ -22046,14 +22048,87 @@ var toNumber = (value) => {
22046
22048
  }
22047
22049
  return 0;
22048
22050
  };
22051
+ var toOptionalNumber = (value) => {
22052
+ if (typeof value === "number" && Number.isFinite(value)) return value;
22053
+ if (typeof value === "string" && value.trim() !== "") {
22054
+ const parsed = Number(value);
22055
+ return Number.isFinite(parsed) ? parsed : null;
22056
+ }
22057
+ return null;
22058
+ };
22049
22059
  var EFFICIENCY_ON_TRACK_THRESHOLD = 100;
22050
22060
  var isEfficiencyOnTrack = (efficiency) => toNumber(efficiency) >= EFFICIENCY_ON_TRACK_THRESHOLD;
22061
+ var KPI_SIGNAL_LABELS = {
22062
+ stable: "Stable",
22063
+ warning: "Warning",
22064
+ attention: "Attention"
22065
+ };
22066
+ var normalizeLineSignalSource = (source) => source === "recent_flow" ? "recent_flow" : "efficiency";
22067
+ var normalizeLineSignal = (lineSignal, fallbackEfficiency, fallbackWeight) => {
22068
+ if (lineSignal && typeof lineSignal === "object") {
22069
+ const raw = lineSignal;
22070
+ return {
22071
+ source: normalizeLineSignalSource(raw.source),
22072
+ percent: toOptionalNumber(raw.percent),
22073
+ weight: toOptionalNumber(raw.weight),
22074
+ mode: raw.mode === "unavailable" ? "unavailable" : "computed",
22075
+ reason: typeof raw.reason === "string" ? raw.reason : raw.reason ?? null,
22076
+ effectiveEndAt: raw.effective_end_at ?? raw.effectiveEndAt ?? null,
22077
+ computedAt: raw.computed_at ?? raw.computedAt ?? null
22078
+ };
22079
+ }
22080
+ const percent2 = toOptionalNumber(fallbackEfficiency);
22081
+ if (percent2 === null) return null;
22082
+ return {
22083
+ source: "efficiency",
22084
+ percent: percent2,
22085
+ weight: toOptionalNumber(fallbackWeight),
22086
+ mode: "computed",
22087
+ reason: "fallback_efficiency",
22088
+ effectiveEndAt: null,
22089
+ computedAt: null
22090
+ };
22091
+ };
22092
+ var getKpiSignalStatus = (signal, legend = DEFAULT_EFFICIENCY_LEGEND) => {
22093
+ const percent2 = toOptionalNumber(signal?.percent);
22094
+ if (percent2 === null) return null;
22095
+ const color2 = getEfficiencyColor(percent2, legend);
22096
+ if (color2 === "green") return "stable";
22097
+ if (color2 === "yellow") return "warning";
22098
+ return "attention";
22099
+ };
22100
+ var getKpiSignalLabel = (signal, legend = DEFAULT_EFFICIENCY_LEGEND) => {
22101
+ const status = getKpiSignalStatus(signal, legend);
22102
+ return status ? KPI_SIGNAL_LABELS[status] : null;
22103
+ };
22104
+ var aggregateLineSignals = (signals) => {
22105
+ const numericSignals = signals.filter(
22106
+ (signal) => signal !== null && signal !== void 0 && toOptionalNumber(signal.percent) !== null
22107
+ );
22108
+ if (numericSignals.length === 0) return null;
22109
+ const percent2 = numericSignals.reduce(
22110
+ (sum, signal) => sum + (toOptionalNumber(signal.percent) ?? 0),
22111
+ 0
22112
+ ) / numericSignals.length;
22113
+ const signalSources = new Set(numericSignals.map((signal) => signal.source));
22114
+ const source = signalSources.size === 1 ? numericSignals[0].source : "mixed";
22115
+ return {
22116
+ source,
22117
+ percent: percent2,
22118
+ weight: null,
22119
+ mode: "computed",
22120
+ reason: "average",
22121
+ effectiveEndAt: null,
22122
+ computedAt: null
22123
+ };
22124
+ };
22051
22125
  var createDefaultKPIs = () => ({
22052
22126
  underperformingWorkers: { current: 0, total: 0, change: 0 },
22053
22127
  efficiency: { value: 0, change: 0 },
22054
22128
  outputProgress: { current: 0, target: 0, idealOutput: 0, change: 0 },
22055
22129
  avgCycleTime: { value: 0, change: 0 },
22056
- qualityCompliance: { value: 95, change: 0 }
22130
+ qualityCompliance: { value: 95, change: 0 },
22131
+ lineSignal: null
22057
22132
  });
22058
22133
  var buildKPIsFromLineMetricsRow = (row) => {
22059
22134
  if (!row) return createDefaultKPIs();
@@ -22087,15 +22162,28 @@ var buildKPIsFromLineMetricsRow = (row) => {
22087
22162
  qualityCompliance: {
22088
22163
  value: 95,
22089
22164
  change: 0
22090
- }
22165
+ },
22166
+ lineSignal: normalizeLineSignal(row.line_signal, avgEfficiency, idealOutput || lineThreshold)
22091
22167
  };
22092
22168
  };
22093
22169
  var aggregateKPIsFromLineMetricsRows = (rows) => {
22094
22170
  if (!rows || rows.length === 0) return createDefaultKPIs();
22171
+ const lineSignal = aggregateLineSignals(
22172
+ rows.map((row) => normalizeLineSignal(
22173
+ row?.line_signal,
22174
+ row?.avg_efficiency,
22175
+ row?.ideal_output ?? row?.line_threshold
22176
+ ))
22177
+ );
22095
22178
  const eligibleRows = rows.filter(
22096
22179
  (row) => isValidAggregateEfficiency(row?.monitoring_mode ?? row?.monitoringMode, row?.avg_efficiency)
22097
22180
  );
22098
- if (eligibleRows.length === 0) return createDefaultKPIs();
22181
+ if (eligibleRows.length === 0) {
22182
+ return {
22183
+ ...createDefaultKPIs(),
22184
+ lineSignal
22185
+ };
22186
+ }
22099
22187
  const currentOutputSum = eligibleRows.reduce((sum, row) => sum + toNumber(row.current_output), 0);
22100
22188
  const lineThresholdSum = eligibleRows.reduce(
22101
22189
  (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 +22230,8 @@ var aggregateKPIsFromLineMetricsRows = (rows) => {
22142
22230
  qualityCompliance: {
22143
22231
  value: 95,
22144
22232
  change: 0
22145
- }
22233
+ },
22234
+ lineSignal
22146
22235
  };
22147
22236
  };
22148
22237
 
@@ -34696,19 +34785,19 @@ var SkuRow = ({ sku, isSelected, isLive, onSelect }) => {
34696
34785
  onClick: () => onSelect?.(isSelected ? null : sku.sku_id),
34697
34786
  "data-testid": `sku-progress-row-${sku.sku_id}`,
34698
34787
  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: [
34788
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
34789
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 flex-1 min-w-0", children: [
34701
34790
  /* @__PURE__ */ jsx(
34702
34791
  "span",
34703
34792
  {
34704
- className: "text-sm font-semibold text-gray-800 truncate",
34793
+ className: "text-xs sm:text-sm font-semibold text-gray-800 break-words line-clamp-2",
34705
34794
  title: skuLabel,
34706
34795
  children: skuLabel
34707
34796
  }
34708
34797
  ),
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" })
34798
+ 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
34799
  ] }),
34711
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 font-medium tabular-nums shrink-0", children: [
34800
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 font-medium tabular-nums shrink-0 pt-0.5", children: [
34712
34801
  Math.round(current),
34713
34802
  " / ",
34714
34803
  Math.round(target)
@@ -45046,7 +45135,7 @@ var FileManagerFilters = ({
45046
45135
  onClick: () => {
45047
45136
  onIdleClipSortChange?.(idleClipSort === "latest" ? "idle_duration_desc" : "latest");
45048
45137
  },
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"}`,
45138
+ 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
45139
  title: idleClipSort === "idle_duration_desc" ? "Sort by newest first" : "Sort by longest idle first",
45051
45140
  "aria-label": idleClipSort === "idle_duration_desc" ? "Sort idle clips by newest first" : "Sort idle clips by longest idle first",
45052
45141
  children: /* @__PURE__ */ jsx(ArrowDownWideNarrow, { className: "h-5 w-5" })
@@ -45113,7 +45202,7 @@ var FileManagerFilters = ({
45113
45202
  }
45114
45203
  )
45115
45204
  ] }),
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: [
45205
+ 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
45206
  /* @__PURE__ */ jsx(ArrowDownWideNarrow, { className: "h-3.5 w-3.5" }),
45118
45207
  /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Longest idle first" }),
45119
45208
  /* @__PURE__ */ jsx(
@@ -45123,7 +45212,7 @@ var FileManagerFilters = ({
45123
45212
  e.stopPropagation();
45124
45213
  onIdleClipSortChange?.("latest");
45125
45214
  },
45126
- className: "rounded-full p-0.5 transition-colors hover:bg-orange-100",
45215
+ className: "rounded-full p-0.5 transition-colors hover:bg-blue-100",
45127
45216
  title: "Clear idle sort",
45128
45217
  children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
45129
45218
  }
@@ -57978,118 +58067,114 @@ var SideNavBar = memo$1(({
57978
58067
  children: /* @__PURE__ */ jsx(Logo, { className: "w-12 h-12 object-contain cursor-pointer" })
57979
58068
  }
57980
58069
  ) }),
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
- ] }),
58070
+ /* @__PURE__ */ jsx("div", { className: "flex-1 w-full py-6 px-4 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
58071
+ canAccessPath("/") && /* @__PURE__ */ jsxs(
58072
+ "button",
58073
+ {
58074
+ onClick: handleHomeClick,
58075
+ className: homeButtonClasses,
58076
+ "aria-label": "Home",
58077
+ tabIndex: 0,
58078
+ role: "tab",
58079
+ "aria-selected": isPathActive("/"),
58080
+ children: [
58081
+ /* @__PURE__ */ jsx(HomeIcon, { className: "w-5 h-5 mb-1" }),
58082
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Home" })
58083
+ ]
58084
+ }
58085
+ ),
58086
+ showLiveMonitorLink && canAccessPath("/live-monitor") && /* @__PURE__ */ jsxs(
58087
+ "button",
58088
+ {
58089
+ onClick: handleLiveClick,
58090
+ className: liveButtonClasses,
58091
+ "aria-label": "Monitor",
58092
+ tabIndex: 0,
58093
+ role: "tab",
58094
+ "aria-selected": isPathActive("/live-monitor"),
58095
+ children: [
58096
+ /* @__PURE__ */ jsx(VideoCameraIcon, { className: "w-5 h-5 mb-1" }),
58097
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Monitor" })
58098
+ ]
58099
+ }
58100
+ ),
58101
+ canAccessPath("/leaderboard") && /* @__PURE__ */ jsxs(
58102
+ "button",
58103
+ {
58104
+ onClick: handleLeaderboardClick,
58105
+ className: leaderboardButtonClasses,
58106
+ "aria-label": "Leaderboard",
58107
+ tabIndex: 0,
58108
+ role: "tab",
58109
+ "aria-selected": isPathActive("/leaderboard"),
58110
+ children: [
58111
+ /* @__PURE__ */ jsx(TrophyIcon, { className: "w-5 h-5 mb-1" }),
58112
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Leaders" })
58113
+ ]
58114
+ }
58115
+ ),
58116
+ canAccessPath("/kpis") && /* @__PURE__ */ jsxs(
58117
+ "button",
58118
+ {
58119
+ onClick: handleKPIsClick,
58120
+ className: kpisButtonClasses,
58121
+ "aria-label": "Lines",
58122
+ tabIndex: 0,
58123
+ role: "tab",
58124
+ "aria-selected": isPathActive("/kpis"),
58125
+ children: [
58126
+ /* @__PURE__ */ jsx(ChartBarIcon, { className: "w-5 h-5 mb-1" }),
58127
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Lines" })
58128
+ ]
58129
+ }
58130
+ ),
58131
+ canAccessPath("/improvement-center") && /* @__PURE__ */ jsxs(
58132
+ "button",
58133
+ {
58134
+ onClick: handleImprovementClick,
58135
+ className: improvementButtonClasses,
58136
+ "aria-label": "Improvement Center",
58137
+ tabIndex: 0,
58138
+ role: "tab",
58139
+ "aria-selected": isPathActive("/improvement-center"),
58140
+ children: [
58141
+ /* @__PURE__ */ jsx(LightBulbIcon, { className: "w-5 h-5 mb-1" }),
58142
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight text-center", children: "Improve" })
58143
+ ]
58144
+ }
58145
+ ),
58146
+ showSupervisorManagement,
58147
+ skuEnabled && canAccessPath("/skus") && /* @__PURE__ */ jsxs(
58148
+ "button",
58149
+ {
58150
+ onClick: handleSKUsClick,
58151
+ className: skusButtonClasses,
58152
+ "aria-label": "SKU Management",
58153
+ tabIndex: 0,
58154
+ role: "tab",
58155
+ "aria-selected": isPathActive("/skus"),
58156
+ children: [
58157
+ /* @__PURE__ */ jsx(CubeIcon, { className: "w-5 h-5 mb-1" }),
58158
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "SKUs" })
58159
+ ]
58160
+ }
58161
+ ),
58162
+ canAccessPath("/health") && /* @__PURE__ */ jsxs(
58163
+ "button",
58164
+ {
58165
+ onClick: handleHealthClick,
58166
+ className: healthButtonClasses,
58167
+ "aria-label": "System Health",
58168
+ tabIndex: 0,
58169
+ role: "tab",
58170
+ "aria-selected": isPathActive("/health"),
58171
+ children: [
58172
+ /* @__PURE__ */ jsx(HeartIcon, { className: "w-5 h-5 mb-1" }),
58173
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Health" })
58174
+ ]
58175
+ }
58176
+ )
58177
+ ] }) }),
58093
58178
  /* @__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
58179
  "button",
58095
58180
  {
@@ -58142,7 +58227,7 @@ var SideNavBar = memo$1(({
58142
58227
  "button",
58143
58228
  {
58144
58229
  onClick: handleMobileNavClick(handleLiveClick),
58145
- className: `${getMobileButtonClass("/live-monitor")} mt-2`,
58230
+ className: getMobileButtonClass("/live-monitor"),
58146
58231
  "aria-label": "Monitor",
58147
58232
  children: [
58148
58233
  /* @__PURE__ */ jsx(VideoCameraIcon, { className: getIconClass("/live-monitor") }),
@@ -69708,6 +69793,19 @@ var formatDateKey2 = (dateKey, timezone, options) => {
69708
69793
  return dateKey;
69709
69794
  }
69710
69795
  };
69796
+ var getFirstName = (displayName) => {
69797
+ const trimmedName = displayName.trim();
69798
+ if (!trimmedName) return "";
69799
+ return trimmedName.split(/\s+/)[0];
69800
+ };
69801
+ var formatSupervisorFirstNames = (supervisors, fallbackSupervisorNames) => {
69802
+ const firstNames = supervisors.map((supervisor) => getFirstName(supervisor.displayName)).filter((name) => name.length > 0);
69803
+ if (firstNames.length > 0) {
69804
+ return Array.from(new Set(firstNames)).join(", ");
69805
+ }
69806
+ const fallbackFirstNames = fallbackSupervisorNames.flatMap((names) => names.split(",")).map(getFirstName).filter((name) => name.length > 0);
69807
+ return fallbackFirstNames.length > 0 ? Array.from(new Set(fallbackFirstNames)).join(", ") : "Unassigned";
69808
+ };
69711
69809
  var LeaderboardCountdown = ({ targetDate, format: format10, finishedLabel = "Finished", placeholder = "--", onFinished }) => {
69712
69810
  const [time2, setTime] = useState("");
69713
69811
  const hasFinishedRef = useRef(false);
@@ -69833,7 +69931,7 @@ var LinesLeaderboard = ({
69833
69931
  });
69834
69932
  const supervisors = Array.from(supervisorByUserId.values());
69835
69933
  const primarySupervisor = supervisors[0];
69836
- const supervisorName = supervisors.length > 1 ? `${supervisors.length} supervisors` : primarySupervisor?.displayName || fallbackSupervisorNames[0] || "Unassigned";
69934
+ const supervisorName = formatSupervisorFirstNames(supervisors, fallbackSupervisorNames);
69837
69935
  const supervisorImage = primarySupervisor?.profilePhotoUrl || null;
69838
69936
  return {
69839
69937
  ...row,
@@ -70093,21 +70191,49 @@ var LinesLeaderboard = ({
70093
70191
  ] }) }) }) })
70094
70192
  ] });
70095
70193
  };
70194
+ var SIGNAL_PILL_STYLES = {
70195
+ stable: {
70196
+ container: "bg-emerald-100 text-emerald-700 border border-emerald-200",
70197
+ dot: "bg-emerald-500"
70198
+ },
70199
+ warning: {
70200
+ container: "bg-amber-100 text-amber-700 border border-amber-200",
70201
+ dot: "bg-amber-500"
70202
+ },
70203
+ attention: {
70204
+ container: "bg-red-100 text-red-700 border border-red-200",
70205
+ dot: "bg-red-500"
70206
+ }
70207
+ };
70208
+ var KpiSignalPill = ({ signal, efficiencyLegend }) => {
70209
+ const status = getKpiSignalStatus(signal, efficiencyLegend);
70210
+ const label = getKpiSignalLabel(signal, efficiencyLegend);
70211
+ if (!status || !label) return null;
70212
+ const styles2 = SIGNAL_PILL_STYLES[status];
70213
+ return /* @__PURE__ */ jsxs(
70214
+ "div",
70215
+ {
70216
+ 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}`,
70217
+ style: { minWidth: "fit-content" },
70218
+ children: [
70219
+ /* @__PURE__ */ jsx("div", { className: `w-2 h-2 rounded-full ${styles2.dot} animate-pulse` }),
70220
+ /* @__PURE__ */ jsx("span", { children: label })
70221
+ ]
70222
+ }
70223
+ );
70224
+ };
70096
70225
  var LineCard = ({
70097
70226
  line,
70098
70227
  kpis,
70099
70228
  isLoading,
70100
70229
  error,
70101
70230
  onClick,
70231
+ efficiencyLegend,
70102
70232
  supervisorEnabled = false,
70103
70233
  supervisorName,
70104
70234
  supervisors
70105
70235
  }) => {
70106
70236
  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
70237
  return /* @__PURE__ */ jsxs(
70112
70238
  motion.div,
70113
70239
  {
@@ -70179,10 +70305,7 @@ var LineCard = ({
70179
70305
  ] })
70180
70306
  ] })
70181
70307
  ] }),
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
- ] })
70308
+ !isUptimeLine && kpis && /* @__PURE__ */ jsx(KpiSignalPill, { signal: kpis.lineSignal, efficiencyLegend })
70186
70309
  ] }) }),
70187
70310
  isLoading && !kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
70188
70311
  /* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
@@ -70250,12 +70373,9 @@ var KpiGroupCard = ({
70250
70373
  isLoading,
70251
70374
  error,
70252
70375
  isUptimeMode,
70376
+ efficiencyLegend,
70253
70377
  onClick
70254
70378
  }) => {
70255
- const isOnTrack = React144__default.useMemo(() => {
70256
- if (!kpis) return null;
70257
- return isEfficiencyOnTrack(kpis.efficiency.value);
70258
- }, [kpis]);
70259
70379
  const outputTarget = Number(kpis?.outputProgress?.target ?? 0);
70260
70380
  const outputCurrent = Number(kpis?.outputProgress?.current ?? 0);
70261
70381
  const progressPercent = outputTarget > 0 ? Math.min(outputCurrent / outputTarget * 100, 100) : 0;
@@ -70279,10 +70399,7 @@ var KpiGroupCard = ({
70279
70399
  ),
70280
70400
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs font-medium text-gray-500", children: subtitle })
70281
70401
  ] }),
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
- ] })
70402
+ !isUptimeMode && kpis && /* @__PURE__ */ jsx(KpiSignalPill, { signal: kpis.lineSignal, efficiencyLegend })
70286
70403
  ] }) }),
70287
70404
  isLoading && !kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
70288
70405
  /* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
@@ -70407,12 +70524,16 @@ var KPIsOverviewView = ({
70407
70524
  () => new Set(resolvedAssignedLineIds),
70408
70525
  [resolvedAssignedLineIds]
70409
70526
  );
70527
+ const loadedLineIds = React144__default.useMemo(
70528
+ () => lines.map((line) => line.id).filter(Boolean),
70529
+ [lines]
70530
+ );
70410
70531
  const metricsLineIds = React144__default.useMemo(() => {
70411
70532
  if (isSuperAdmin) {
70412
- return lineIds ?? [];
70533
+ return loadedLineIds.length > 0 ? loadedLineIds : lineIds ?? [];
70413
70534
  }
70414
70535
  return resolvedAssignedLineIds;
70415
- }, [isSuperAdmin, lineIds, resolvedAssignedLineIds]);
70536
+ }, [isSuperAdmin, loadedLineIds, lineIds, resolvedAssignedLineIds]);
70416
70537
  const assignedLineIdsForLeaderboard = isSuperAdmin ? void 0 : resolvedAssignedLineIds;
70417
70538
  const leaderboardLinesForView = React144__default.useMemo(() => {
70418
70539
  const targetMode = viewType === "machine" ? "uptime" : "output";
@@ -70599,7 +70720,8 @@ var KPIsOverviewView = ({
70599
70720
  const {
70600
70721
  lineMetrics,
70601
70722
  isLoading: metricsLoading,
70602
- error: metricsError
70723
+ error: metricsError,
70724
+ efficiencyLegend
70603
70725
  } = useDashboardMetrics({
70604
70726
  lineId: factoryViewId,
70605
70727
  userAccessibleLineIds: metricsLineIds
@@ -70943,7 +71065,11 @@ var KPIsOverviewView = ({
70943
71065
  trackProps.output_current = kpis.outputProgress?.current;
70944
71066
  trackProps.output_target = kpis.outputProgress?.target;
70945
71067
  trackProps.underperforming_workers = kpis.underperformingWorkers?.current;
70946
- trackProps.status = isEfficiencyOnTrack(kpis.efficiency?.value) ? "On Track" : "Behind";
71068
+ const signalLabel = getKpiSignalLabel(kpis.lineSignal, efficiencyLegend);
71069
+ if (signalLabel) {
71070
+ trackProps.status = signalLabel;
71071
+ trackProps.signal_source = kpis.lineSignal?.source ?? null;
71072
+ }
70947
71073
  }
70948
71074
  trackCoreEvent("Line Card Clicked", trackProps);
70949
71075
  if (activeTab === "leaderboard" && timeRange === "today" && isHistoricalLeaderboardDaily) {
@@ -71029,6 +71155,7 @@ var KPIsOverviewView = ({
71029
71155
  isLoading: metricsLoading,
71030
71156
  error: metricsError,
71031
71157
  onClick: (kpis) => handleLineClick(line, kpis),
71158
+ efficiencyLegend,
71032
71159
  supervisorEnabled,
71033
71160
  supervisorName: supervisorNamesByLineId.get(line.id) || null,
71034
71161
  supervisors: supervisorsByLineId?.get(line.id)
@@ -71050,6 +71177,7 @@ var KPIsOverviewView = ({
71050
71177
  isLoading: metricsLoading,
71051
71178
  error: metricsError,
71052
71179
  isUptimeMode: viewType === "machine",
71180
+ efficiencyLegend,
71053
71181
  onClick
71054
71182
  },
71055
71183
  key
@@ -71459,16 +71587,16 @@ var AnimatedEfficiency = memo$1(({ value }) => {
71459
71587
  });
71460
71588
  AnimatedEfficiency.displayName = "AnimatedEfficiency";
71461
71589
  var getWorkspaceLeaderboardMetricValue = (workspace) => {
71462
- if (workspace.leaderboard_metric_kind === "recent_flow_shift_average") {
71590
+ if (workspace.leaderboard_metric_kind === "cycle_time") {
71463
71591
  const cycleRatio = getCycleRatio(workspace);
71464
- return cycleRatio === null ? null : cycleRatio * 100;
71592
+ return toFiniteNumber(workspace.leaderboard_value) ?? (cycleRatio === null ? null : cycleRatio * 100);
71465
71593
  }
71466
- return toFiniteNumber(workspace.leaderboard_value) ?? toFiniteNumber(workspace.efficiency);
71594
+ return toFiniteNumber(workspace.efficiency);
71467
71595
  };
71468
71596
  var getWorkspaceDisplayedMetricValue = (workspace) => getWorkspaceLeaderboardMetricValue(workspace);
71469
- var getWorkspaceLeaderboardMetricLabel = (workspace, defaultLabel) => workspace.leaderboard_metric_kind === "recent_flow_shift_average" ? "Actual CT / Standard CT" : defaultLabel;
71597
+ var getWorkspaceLeaderboardMetricLabel = (workspace, defaultLabel) => workspace.leaderboard_metric_kind === "cycle_time" ? "Actual CT / Standard CT" : defaultLabel;
71470
71598
  var renderWorkspaceLeaderboardMetric = (workspace) => {
71471
- if (workspace.leaderboard_metric_kind === "recent_flow_shift_average") {
71599
+ if (workspace.leaderboard_metric_kind === "cycle_time") {
71472
71600
  const actualCT = formatCycleTimeValue(workspace.avg_cycle_time);
71473
71601
  const standardCT = formatCycleTimeValue(workspace.ideal_cycle_time);
71474
71602
  return /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
@@ -72437,13 +72565,13 @@ var LeaderboardDetailView = memo$1(({
72437
72565
  error.message
72438
72566
  ] }) });
72439
72567
  }
72440
- const hasRecentFlowLeaderboardRows = sortedWorkspaces.some(
72441
- (workspace) => workspace.leaderboard_metric_kind === "recent_flow_shift_average"
72568
+ const hasCycleTimeLeaderboardRows = sortedWorkspaces.some(
72569
+ (workspace) => workspace.leaderboard_metric_kind === "cycle_time"
72442
72570
  );
72443
72571
  const hasEfficiencyLeaderboardRows = sortedWorkspaces.some(
72444
- (workspace) => workspace.leaderboard_metric_kind !== "recent_flow_shift_average"
72572
+ (workspace) => workspace.leaderboard_metric_kind !== "cycle_time"
72445
72573
  );
72446
- const metricLabel = viewType === "machine" ? "Utilization" : hasRecentFlowLeaderboardRows && !hasEfficiencyLeaderboardRows ? "Actual CT / Standard CT" : hasRecentFlowLeaderboardRows && hasEfficiencyLeaderboardRows ? "Performance" : "Efficiency";
72574
+ const metricLabel = viewType === "machine" ? "Utilization" : hasCycleTimeLeaderboardRows && !hasEfficiencyLeaderboardRows ? "Actual CT / Standard CT" : hasCycleTimeLeaderboardRows && hasEfficiencyLeaderboardRows ? "Performance" : "Efficiency";
72447
72575
  const descendingSortLabel = "Highest to Lowest";
72448
72576
  const ascendingSortLabel = "Lowest to Highest";
72449
72577
  return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, style: { willChange: "contents" }, children: [
@@ -87128,4 +87256,4 @@ var RecentFlowSnapshotGrid = ({
87128
87256
  );
87129
87257
  };
87130
87258
 
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 };
87259
+ 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 };