@optifye/dashboard-core 6.11.6 → 6.11.7
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.css +3 -3
- package/dist/index.d.mts +45 -6
- package/dist/index.d.ts +45 -6
- package/dist/index.js +3130 -865
- package/dist/index.mjs +3111 -869
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React141 from 'react';
|
|
2
|
-
import React141__default, { createContext, useRef, useCallback, useState, useMemo, useEffect, forwardRef, useImperativeHandle, useLayoutEffect, memo as memo$1, useContext, useId, Children, isValidElement, useInsertionEffect, Fragment as Fragment$1, createElement, Component } from 'react';
|
|
2
|
+
import React141__default, { createContext, useRef, useCallback, useState, useMemo, useEffect, forwardRef, useImperativeHandle, useLayoutEffect, memo as memo$1, useContext, useSyncExternalStore, useId, Children, isValidElement, useInsertionEffect, startTransition, Fragment as Fragment$1, createElement, Component } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { useRouter } from 'next/router';
|
|
5
5
|
import { fromZonedTime, formatInTimeZone, toZonedTime } from 'date-fns-tz';
|
|
6
|
-
import { format, subMonths, endOfMonth, startOfMonth, endOfDay, eachDayOfInterval, getDay, isSameDay, isWithinInterval, startOfDay,
|
|
6
|
+
import { format, addDays, subMonths, endOfMonth, startOfMonth, endOfDay, eachDayOfInterval, getDay, isSameDay, isWithinInterval, startOfDay, parseISO, subDays, differenceInMinutes, addMinutes, addMonths, isValid, formatDistanceToNow, isToday, isFuture, isBefore } from 'date-fns';
|
|
7
7
|
import mixpanel from 'mixpanel-browser';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
9
9
|
import { createClient, REALTIME_SUBSCRIBE_STATES } from '@supabase/supabase-js';
|
|
10
10
|
import Hls, { Events, ErrorTypes } from 'hls.js';
|
|
11
11
|
import useSWR from 'swr';
|
|
12
12
|
import { memo, noop, warning, invariant, progress, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';
|
|
13
|
-
import { Camera, AlertTriangle, ChevronDown, ChevronUp, Check, Map as Map$1, Video, ShieldCheck, Star, Award, Filter, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, AlertCircle, Loader2, Minus,
|
|
13
|
+
import { Camera, AlertTriangle, ChevronDown, ChevronUp, Check, Map as Map$1, Video, ShieldCheck, Star, Award, Filter, X, Coffee, Plus, ArrowUp, ArrowDown, ArrowRight, ArrowLeft, Clock, Calendar, Save, AlertCircle, Loader2, Minus, ChevronLeft, ChevronRight, TrendingUp, Sparkles, Pause, Play, Wrench, XCircle, Package, UserX, Zap, HelpCircle, Tag, Palette, CheckCircle2, RefreshCw, TrendingDown, FolderOpen, Folder, Sliders, Activity, Layers, Search, Edit2, CheckCircle, User, Users, Shield, Building2, Mail, Lock, Info, Share2, Trophy, Target, Download, Sun, Moon, MousePointer, UserPlus, UserCog, Trash2, Eye, MoreVertical, BarChart3, Pencil, UserCheck, LogOut, Film, MessageSquare, Menu, Send, Copy, Settings, LifeBuoy, EyeOff, Flame, Crown, Medal } from 'lucide-react';
|
|
14
14
|
import { toast } from 'sonner';
|
|
15
15
|
import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, ReferenceLine, Tooltip, Legend, Bar, LabelList, ResponsiveContainer, LineChart as LineChart$1, Line, PieChart, Pie, Cell, ComposedChart, Area, ScatterChart, Scatter } from 'recharts';
|
|
16
16
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -25,12 +25,1550 @@ import { S3Client, ListObjectsV2Command, GetObjectCommand } from '@aws-sdk/clien
|
|
|
25
25
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
|
26
26
|
import { Readable } from 'stream';
|
|
27
27
|
|
|
28
|
+
var __create = Object.create;
|
|
29
|
+
var __defProp = Object.defineProperty;
|
|
30
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
31
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
32
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
33
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
28
34
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
29
35
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
30
36
|
}) : x)(function(x) {
|
|
31
37
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
32
38
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
33
39
|
});
|
|
40
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
41
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
42
|
+
};
|
|
43
|
+
var __copyProps = (to, from, except, desc) => {
|
|
44
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
45
|
+
for (let key of __getOwnPropNames(from))
|
|
46
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
47
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
48
|
+
}
|
|
49
|
+
return to;
|
|
50
|
+
};
|
|
51
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
52
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
53
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
54
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
55
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
56
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
57
|
+
mod
|
|
58
|
+
));
|
|
59
|
+
|
|
60
|
+
// ../../node_modules/lodash/_listCacheClear.js
|
|
61
|
+
var require_listCacheClear = __commonJS({
|
|
62
|
+
"../../node_modules/lodash/_listCacheClear.js"(exports, module) {
|
|
63
|
+
function listCacheClear() {
|
|
64
|
+
this.__data__ = [];
|
|
65
|
+
this.size = 0;
|
|
66
|
+
}
|
|
67
|
+
module.exports = listCacheClear;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// ../../node_modules/lodash/eq.js
|
|
72
|
+
var require_eq = __commonJS({
|
|
73
|
+
"../../node_modules/lodash/eq.js"(exports, module) {
|
|
74
|
+
function eq(value, other) {
|
|
75
|
+
return value === other || value !== value && other !== other;
|
|
76
|
+
}
|
|
77
|
+
module.exports = eq;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// ../../node_modules/lodash/_assocIndexOf.js
|
|
82
|
+
var require_assocIndexOf = __commonJS({
|
|
83
|
+
"../../node_modules/lodash/_assocIndexOf.js"(exports, module) {
|
|
84
|
+
var eq = require_eq();
|
|
85
|
+
function assocIndexOf(array, key) {
|
|
86
|
+
var length = array.length;
|
|
87
|
+
while (length--) {
|
|
88
|
+
if (eq(array[length][0], key)) {
|
|
89
|
+
return length;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return -1;
|
|
93
|
+
}
|
|
94
|
+
module.exports = assocIndexOf;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// ../../node_modules/lodash/_listCacheDelete.js
|
|
99
|
+
var require_listCacheDelete = __commonJS({
|
|
100
|
+
"../../node_modules/lodash/_listCacheDelete.js"(exports, module) {
|
|
101
|
+
var assocIndexOf = require_assocIndexOf();
|
|
102
|
+
var arrayProto = Array.prototype;
|
|
103
|
+
var splice = arrayProto.splice;
|
|
104
|
+
function listCacheDelete(key) {
|
|
105
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
106
|
+
if (index < 0) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
var lastIndex = data.length - 1;
|
|
110
|
+
if (index == lastIndex) {
|
|
111
|
+
data.pop();
|
|
112
|
+
} else {
|
|
113
|
+
splice.call(data, index, 1);
|
|
114
|
+
}
|
|
115
|
+
--this.size;
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
module.exports = listCacheDelete;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// ../../node_modules/lodash/_listCacheGet.js
|
|
123
|
+
var require_listCacheGet = __commonJS({
|
|
124
|
+
"../../node_modules/lodash/_listCacheGet.js"(exports, module) {
|
|
125
|
+
var assocIndexOf = require_assocIndexOf();
|
|
126
|
+
function listCacheGet(key) {
|
|
127
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
128
|
+
return index < 0 ? void 0 : data[index][1];
|
|
129
|
+
}
|
|
130
|
+
module.exports = listCacheGet;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// ../../node_modules/lodash/_listCacheHas.js
|
|
135
|
+
var require_listCacheHas = __commonJS({
|
|
136
|
+
"../../node_modules/lodash/_listCacheHas.js"(exports, module) {
|
|
137
|
+
var assocIndexOf = require_assocIndexOf();
|
|
138
|
+
function listCacheHas(key) {
|
|
139
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
140
|
+
}
|
|
141
|
+
module.exports = listCacheHas;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// ../../node_modules/lodash/_listCacheSet.js
|
|
146
|
+
var require_listCacheSet = __commonJS({
|
|
147
|
+
"../../node_modules/lodash/_listCacheSet.js"(exports, module) {
|
|
148
|
+
var assocIndexOf = require_assocIndexOf();
|
|
149
|
+
function listCacheSet(key, value) {
|
|
150
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
151
|
+
if (index < 0) {
|
|
152
|
+
++this.size;
|
|
153
|
+
data.push([key, value]);
|
|
154
|
+
} else {
|
|
155
|
+
data[index][1] = value;
|
|
156
|
+
}
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
module.exports = listCacheSet;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// ../../node_modules/lodash/_ListCache.js
|
|
164
|
+
var require_ListCache = __commonJS({
|
|
165
|
+
"../../node_modules/lodash/_ListCache.js"(exports, module) {
|
|
166
|
+
var listCacheClear = require_listCacheClear();
|
|
167
|
+
var listCacheDelete = require_listCacheDelete();
|
|
168
|
+
var listCacheGet = require_listCacheGet();
|
|
169
|
+
var listCacheHas = require_listCacheHas();
|
|
170
|
+
var listCacheSet = require_listCacheSet();
|
|
171
|
+
function ListCache(entries) {
|
|
172
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
173
|
+
this.clear();
|
|
174
|
+
while (++index < length) {
|
|
175
|
+
var entry = entries[index];
|
|
176
|
+
this.set(entry[0], entry[1]);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
ListCache.prototype.clear = listCacheClear;
|
|
180
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
181
|
+
ListCache.prototype.get = listCacheGet;
|
|
182
|
+
ListCache.prototype.has = listCacheHas;
|
|
183
|
+
ListCache.prototype.set = listCacheSet;
|
|
184
|
+
module.exports = ListCache;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ../../node_modules/lodash/_stackClear.js
|
|
189
|
+
var require_stackClear = __commonJS({
|
|
190
|
+
"../../node_modules/lodash/_stackClear.js"(exports, module) {
|
|
191
|
+
var ListCache = require_ListCache();
|
|
192
|
+
function stackClear() {
|
|
193
|
+
this.__data__ = new ListCache();
|
|
194
|
+
this.size = 0;
|
|
195
|
+
}
|
|
196
|
+
module.exports = stackClear;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// ../../node_modules/lodash/_stackDelete.js
|
|
201
|
+
var require_stackDelete = __commonJS({
|
|
202
|
+
"../../node_modules/lodash/_stackDelete.js"(exports, module) {
|
|
203
|
+
function stackDelete(key) {
|
|
204
|
+
var data = this.__data__, result = data["delete"](key);
|
|
205
|
+
this.size = data.size;
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
module.exports = stackDelete;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// ../../node_modules/lodash/_stackGet.js
|
|
213
|
+
var require_stackGet = __commonJS({
|
|
214
|
+
"../../node_modules/lodash/_stackGet.js"(exports, module) {
|
|
215
|
+
function stackGet(key) {
|
|
216
|
+
return this.__data__.get(key);
|
|
217
|
+
}
|
|
218
|
+
module.exports = stackGet;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
// ../../node_modules/lodash/_stackHas.js
|
|
223
|
+
var require_stackHas = __commonJS({
|
|
224
|
+
"../../node_modules/lodash/_stackHas.js"(exports, module) {
|
|
225
|
+
function stackHas(key) {
|
|
226
|
+
return this.__data__.has(key);
|
|
227
|
+
}
|
|
228
|
+
module.exports = stackHas;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// ../../node_modules/lodash/_freeGlobal.js
|
|
233
|
+
var require_freeGlobal = __commonJS({
|
|
234
|
+
"../../node_modules/lodash/_freeGlobal.js"(exports, module) {
|
|
235
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
236
|
+
module.exports = freeGlobal;
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
// ../../node_modules/lodash/_root.js
|
|
241
|
+
var require_root = __commonJS({
|
|
242
|
+
"../../node_modules/lodash/_root.js"(exports, module) {
|
|
243
|
+
var freeGlobal = require_freeGlobal();
|
|
244
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
245
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
246
|
+
module.exports = root;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
// ../../node_modules/lodash/_Symbol.js
|
|
251
|
+
var require_Symbol = __commonJS({
|
|
252
|
+
"../../node_modules/lodash/_Symbol.js"(exports, module) {
|
|
253
|
+
var root = require_root();
|
|
254
|
+
var Symbol2 = root.Symbol;
|
|
255
|
+
module.exports = Symbol2;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// ../../node_modules/lodash/_getRawTag.js
|
|
260
|
+
var require_getRawTag = __commonJS({
|
|
261
|
+
"../../node_modules/lodash/_getRawTag.js"(exports, module) {
|
|
262
|
+
var Symbol2 = require_Symbol();
|
|
263
|
+
var objectProto = Object.prototype;
|
|
264
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
265
|
+
var nativeObjectToString = objectProto.toString;
|
|
266
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
267
|
+
function getRawTag(value) {
|
|
268
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
269
|
+
try {
|
|
270
|
+
value[symToStringTag] = void 0;
|
|
271
|
+
var unmasked = true;
|
|
272
|
+
} catch (e) {
|
|
273
|
+
}
|
|
274
|
+
var result = nativeObjectToString.call(value);
|
|
275
|
+
if (unmasked) {
|
|
276
|
+
if (isOwn) {
|
|
277
|
+
value[symToStringTag] = tag;
|
|
278
|
+
} else {
|
|
279
|
+
delete value[symToStringTag];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return result;
|
|
283
|
+
}
|
|
284
|
+
module.exports = getRawTag;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// ../../node_modules/lodash/_objectToString.js
|
|
289
|
+
var require_objectToString = __commonJS({
|
|
290
|
+
"../../node_modules/lodash/_objectToString.js"(exports, module) {
|
|
291
|
+
var objectProto = Object.prototype;
|
|
292
|
+
var nativeObjectToString = objectProto.toString;
|
|
293
|
+
function objectToString(value) {
|
|
294
|
+
return nativeObjectToString.call(value);
|
|
295
|
+
}
|
|
296
|
+
module.exports = objectToString;
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// ../../node_modules/lodash/_baseGetTag.js
|
|
301
|
+
var require_baseGetTag = __commonJS({
|
|
302
|
+
"../../node_modules/lodash/_baseGetTag.js"(exports, module) {
|
|
303
|
+
var Symbol2 = require_Symbol();
|
|
304
|
+
var getRawTag = require_getRawTag();
|
|
305
|
+
var objectToString = require_objectToString();
|
|
306
|
+
var nullTag = "[object Null]";
|
|
307
|
+
var undefinedTag = "[object Undefined]";
|
|
308
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
309
|
+
function baseGetTag(value) {
|
|
310
|
+
if (value == null) {
|
|
311
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
312
|
+
}
|
|
313
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
314
|
+
}
|
|
315
|
+
module.exports = baseGetTag;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
// ../../node_modules/lodash/isObject.js
|
|
320
|
+
var require_isObject = __commonJS({
|
|
321
|
+
"../../node_modules/lodash/isObject.js"(exports, module) {
|
|
322
|
+
function isObject2(value) {
|
|
323
|
+
var type = typeof value;
|
|
324
|
+
return value != null && (type == "object" || type == "function");
|
|
325
|
+
}
|
|
326
|
+
module.exports = isObject2;
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// ../../node_modules/lodash/isFunction.js
|
|
331
|
+
var require_isFunction = __commonJS({
|
|
332
|
+
"../../node_modules/lodash/isFunction.js"(exports, module) {
|
|
333
|
+
var baseGetTag = require_baseGetTag();
|
|
334
|
+
var isObject2 = require_isObject();
|
|
335
|
+
var asyncTag = "[object AsyncFunction]";
|
|
336
|
+
var funcTag = "[object Function]";
|
|
337
|
+
var genTag = "[object GeneratorFunction]";
|
|
338
|
+
var proxyTag = "[object Proxy]";
|
|
339
|
+
function isFunction(value) {
|
|
340
|
+
if (!isObject2(value)) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
var tag = baseGetTag(value);
|
|
344
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
345
|
+
}
|
|
346
|
+
module.exports = isFunction;
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
// ../../node_modules/lodash/_coreJsData.js
|
|
351
|
+
var require_coreJsData = __commonJS({
|
|
352
|
+
"../../node_modules/lodash/_coreJsData.js"(exports, module) {
|
|
353
|
+
var root = require_root();
|
|
354
|
+
var coreJsData = root["__core-js_shared__"];
|
|
355
|
+
module.exports = coreJsData;
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
// ../../node_modules/lodash/_isMasked.js
|
|
360
|
+
var require_isMasked = __commonJS({
|
|
361
|
+
"../../node_modules/lodash/_isMasked.js"(exports, module) {
|
|
362
|
+
var coreJsData = require_coreJsData();
|
|
363
|
+
var maskSrcKey = function() {
|
|
364
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
365
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
366
|
+
}();
|
|
367
|
+
function isMasked(func) {
|
|
368
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
369
|
+
}
|
|
370
|
+
module.exports = isMasked;
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
// ../../node_modules/lodash/_toSource.js
|
|
375
|
+
var require_toSource = __commonJS({
|
|
376
|
+
"../../node_modules/lodash/_toSource.js"(exports, module) {
|
|
377
|
+
var funcProto = Function.prototype;
|
|
378
|
+
var funcToString = funcProto.toString;
|
|
379
|
+
function toSource(func) {
|
|
380
|
+
if (func != null) {
|
|
381
|
+
try {
|
|
382
|
+
return funcToString.call(func);
|
|
383
|
+
} catch (e) {
|
|
384
|
+
}
|
|
385
|
+
try {
|
|
386
|
+
return func + "";
|
|
387
|
+
} catch (e) {
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return "";
|
|
391
|
+
}
|
|
392
|
+
module.exports = toSource;
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// ../../node_modules/lodash/_baseIsNative.js
|
|
397
|
+
var require_baseIsNative = __commonJS({
|
|
398
|
+
"../../node_modules/lodash/_baseIsNative.js"(exports, module) {
|
|
399
|
+
var isFunction = require_isFunction();
|
|
400
|
+
var isMasked = require_isMasked();
|
|
401
|
+
var isObject2 = require_isObject();
|
|
402
|
+
var toSource = require_toSource();
|
|
403
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
404
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
405
|
+
var funcProto = Function.prototype;
|
|
406
|
+
var objectProto = Object.prototype;
|
|
407
|
+
var funcToString = funcProto.toString;
|
|
408
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
409
|
+
var reIsNative = RegExp(
|
|
410
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
411
|
+
);
|
|
412
|
+
function baseIsNative(value) {
|
|
413
|
+
if (!isObject2(value) || isMasked(value)) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
417
|
+
return pattern.test(toSource(value));
|
|
418
|
+
}
|
|
419
|
+
module.exports = baseIsNative;
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// ../../node_modules/lodash/_getValue.js
|
|
424
|
+
var require_getValue = __commonJS({
|
|
425
|
+
"../../node_modules/lodash/_getValue.js"(exports, module) {
|
|
426
|
+
function getValue(object, key) {
|
|
427
|
+
return object == null ? void 0 : object[key];
|
|
428
|
+
}
|
|
429
|
+
module.exports = getValue;
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
// ../../node_modules/lodash/_getNative.js
|
|
434
|
+
var require_getNative = __commonJS({
|
|
435
|
+
"../../node_modules/lodash/_getNative.js"(exports, module) {
|
|
436
|
+
var baseIsNative = require_baseIsNative();
|
|
437
|
+
var getValue = require_getValue();
|
|
438
|
+
function getNative(object, key) {
|
|
439
|
+
var value = getValue(object, key);
|
|
440
|
+
return baseIsNative(value) ? value : void 0;
|
|
441
|
+
}
|
|
442
|
+
module.exports = getNative;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// ../../node_modules/lodash/_Map.js
|
|
447
|
+
var require_Map = __commonJS({
|
|
448
|
+
"../../node_modules/lodash/_Map.js"(exports, module) {
|
|
449
|
+
var getNative = require_getNative();
|
|
450
|
+
var root = require_root();
|
|
451
|
+
var Map2 = getNative(root, "Map");
|
|
452
|
+
module.exports = Map2;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
// ../../node_modules/lodash/_nativeCreate.js
|
|
457
|
+
var require_nativeCreate = __commonJS({
|
|
458
|
+
"../../node_modules/lodash/_nativeCreate.js"(exports, module) {
|
|
459
|
+
var getNative = require_getNative();
|
|
460
|
+
var nativeCreate = getNative(Object, "create");
|
|
461
|
+
module.exports = nativeCreate;
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
// ../../node_modules/lodash/_hashClear.js
|
|
466
|
+
var require_hashClear = __commonJS({
|
|
467
|
+
"../../node_modules/lodash/_hashClear.js"(exports, module) {
|
|
468
|
+
var nativeCreate = require_nativeCreate();
|
|
469
|
+
function hashClear() {
|
|
470
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
471
|
+
this.size = 0;
|
|
472
|
+
}
|
|
473
|
+
module.exports = hashClear;
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// ../../node_modules/lodash/_hashDelete.js
|
|
478
|
+
var require_hashDelete = __commonJS({
|
|
479
|
+
"../../node_modules/lodash/_hashDelete.js"(exports, module) {
|
|
480
|
+
function hashDelete(key) {
|
|
481
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
482
|
+
this.size -= result ? 1 : 0;
|
|
483
|
+
return result;
|
|
484
|
+
}
|
|
485
|
+
module.exports = hashDelete;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
// ../../node_modules/lodash/_hashGet.js
|
|
490
|
+
var require_hashGet = __commonJS({
|
|
491
|
+
"../../node_modules/lodash/_hashGet.js"(exports, module) {
|
|
492
|
+
var nativeCreate = require_nativeCreate();
|
|
493
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
494
|
+
var objectProto = Object.prototype;
|
|
495
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
496
|
+
function hashGet(key) {
|
|
497
|
+
var data = this.__data__;
|
|
498
|
+
if (nativeCreate) {
|
|
499
|
+
var result = data[key];
|
|
500
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
501
|
+
}
|
|
502
|
+
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
503
|
+
}
|
|
504
|
+
module.exports = hashGet;
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
// ../../node_modules/lodash/_hashHas.js
|
|
509
|
+
var require_hashHas = __commonJS({
|
|
510
|
+
"../../node_modules/lodash/_hashHas.js"(exports, module) {
|
|
511
|
+
var nativeCreate = require_nativeCreate();
|
|
512
|
+
var objectProto = Object.prototype;
|
|
513
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
514
|
+
function hashHas(key) {
|
|
515
|
+
var data = this.__data__;
|
|
516
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
517
|
+
}
|
|
518
|
+
module.exports = hashHas;
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// ../../node_modules/lodash/_hashSet.js
|
|
523
|
+
var require_hashSet = __commonJS({
|
|
524
|
+
"../../node_modules/lodash/_hashSet.js"(exports, module) {
|
|
525
|
+
var nativeCreate = require_nativeCreate();
|
|
526
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
527
|
+
function hashSet(key, value) {
|
|
528
|
+
var data = this.__data__;
|
|
529
|
+
this.size += this.has(key) ? 0 : 1;
|
|
530
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
531
|
+
return this;
|
|
532
|
+
}
|
|
533
|
+
module.exports = hashSet;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// ../../node_modules/lodash/_Hash.js
|
|
538
|
+
var require_Hash = __commonJS({
|
|
539
|
+
"../../node_modules/lodash/_Hash.js"(exports, module) {
|
|
540
|
+
var hashClear = require_hashClear();
|
|
541
|
+
var hashDelete = require_hashDelete();
|
|
542
|
+
var hashGet = require_hashGet();
|
|
543
|
+
var hashHas = require_hashHas();
|
|
544
|
+
var hashSet = require_hashSet();
|
|
545
|
+
function Hash(entries) {
|
|
546
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
547
|
+
this.clear();
|
|
548
|
+
while (++index < length) {
|
|
549
|
+
var entry = entries[index];
|
|
550
|
+
this.set(entry[0], entry[1]);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
Hash.prototype.clear = hashClear;
|
|
554
|
+
Hash.prototype["delete"] = hashDelete;
|
|
555
|
+
Hash.prototype.get = hashGet;
|
|
556
|
+
Hash.prototype.has = hashHas;
|
|
557
|
+
Hash.prototype.set = hashSet;
|
|
558
|
+
module.exports = Hash;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
// ../../node_modules/lodash/_mapCacheClear.js
|
|
563
|
+
var require_mapCacheClear = __commonJS({
|
|
564
|
+
"../../node_modules/lodash/_mapCacheClear.js"(exports, module) {
|
|
565
|
+
var Hash = require_Hash();
|
|
566
|
+
var ListCache = require_ListCache();
|
|
567
|
+
var Map2 = require_Map();
|
|
568
|
+
function mapCacheClear() {
|
|
569
|
+
this.size = 0;
|
|
570
|
+
this.__data__ = {
|
|
571
|
+
"hash": new Hash(),
|
|
572
|
+
"map": new (Map2 || ListCache)(),
|
|
573
|
+
"string": new Hash()
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
module.exports = mapCacheClear;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
// ../../node_modules/lodash/_isKeyable.js
|
|
581
|
+
var require_isKeyable = __commonJS({
|
|
582
|
+
"../../node_modules/lodash/_isKeyable.js"(exports, module) {
|
|
583
|
+
function isKeyable(value) {
|
|
584
|
+
var type = typeof value;
|
|
585
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
586
|
+
}
|
|
587
|
+
module.exports = isKeyable;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
// ../../node_modules/lodash/_getMapData.js
|
|
592
|
+
var require_getMapData = __commonJS({
|
|
593
|
+
"../../node_modules/lodash/_getMapData.js"(exports, module) {
|
|
594
|
+
var isKeyable = require_isKeyable();
|
|
595
|
+
function getMapData(map, key) {
|
|
596
|
+
var data = map.__data__;
|
|
597
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
598
|
+
}
|
|
599
|
+
module.exports = getMapData;
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
|
|
603
|
+
// ../../node_modules/lodash/_mapCacheDelete.js
|
|
604
|
+
var require_mapCacheDelete = __commonJS({
|
|
605
|
+
"../../node_modules/lodash/_mapCacheDelete.js"(exports, module) {
|
|
606
|
+
var getMapData = require_getMapData();
|
|
607
|
+
function mapCacheDelete(key) {
|
|
608
|
+
var result = getMapData(this, key)["delete"](key);
|
|
609
|
+
this.size -= result ? 1 : 0;
|
|
610
|
+
return result;
|
|
611
|
+
}
|
|
612
|
+
module.exports = mapCacheDelete;
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
// ../../node_modules/lodash/_mapCacheGet.js
|
|
617
|
+
var require_mapCacheGet = __commonJS({
|
|
618
|
+
"../../node_modules/lodash/_mapCacheGet.js"(exports, module) {
|
|
619
|
+
var getMapData = require_getMapData();
|
|
620
|
+
function mapCacheGet(key) {
|
|
621
|
+
return getMapData(this, key).get(key);
|
|
622
|
+
}
|
|
623
|
+
module.exports = mapCacheGet;
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
// ../../node_modules/lodash/_mapCacheHas.js
|
|
628
|
+
var require_mapCacheHas = __commonJS({
|
|
629
|
+
"../../node_modules/lodash/_mapCacheHas.js"(exports, module) {
|
|
630
|
+
var getMapData = require_getMapData();
|
|
631
|
+
function mapCacheHas(key) {
|
|
632
|
+
return getMapData(this, key).has(key);
|
|
633
|
+
}
|
|
634
|
+
module.exports = mapCacheHas;
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
// ../../node_modules/lodash/_mapCacheSet.js
|
|
639
|
+
var require_mapCacheSet = __commonJS({
|
|
640
|
+
"../../node_modules/lodash/_mapCacheSet.js"(exports, module) {
|
|
641
|
+
var getMapData = require_getMapData();
|
|
642
|
+
function mapCacheSet(key, value) {
|
|
643
|
+
var data = getMapData(this, key), size = data.size;
|
|
644
|
+
data.set(key, value);
|
|
645
|
+
this.size += data.size == size ? 0 : 1;
|
|
646
|
+
return this;
|
|
647
|
+
}
|
|
648
|
+
module.exports = mapCacheSet;
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
// ../../node_modules/lodash/_MapCache.js
|
|
653
|
+
var require_MapCache = __commonJS({
|
|
654
|
+
"../../node_modules/lodash/_MapCache.js"(exports, module) {
|
|
655
|
+
var mapCacheClear = require_mapCacheClear();
|
|
656
|
+
var mapCacheDelete = require_mapCacheDelete();
|
|
657
|
+
var mapCacheGet = require_mapCacheGet();
|
|
658
|
+
var mapCacheHas = require_mapCacheHas();
|
|
659
|
+
var mapCacheSet = require_mapCacheSet();
|
|
660
|
+
function MapCache(entries) {
|
|
661
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
662
|
+
this.clear();
|
|
663
|
+
while (++index < length) {
|
|
664
|
+
var entry = entries[index];
|
|
665
|
+
this.set(entry[0], entry[1]);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
669
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
670
|
+
MapCache.prototype.get = mapCacheGet;
|
|
671
|
+
MapCache.prototype.has = mapCacheHas;
|
|
672
|
+
MapCache.prototype.set = mapCacheSet;
|
|
673
|
+
module.exports = MapCache;
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// ../../node_modules/lodash/_stackSet.js
|
|
678
|
+
var require_stackSet = __commonJS({
|
|
679
|
+
"../../node_modules/lodash/_stackSet.js"(exports, module) {
|
|
680
|
+
var ListCache = require_ListCache();
|
|
681
|
+
var Map2 = require_Map();
|
|
682
|
+
var MapCache = require_MapCache();
|
|
683
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
684
|
+
function stackSet(key, value) {
|
|
685
|
+
var data = this.__data__;
|
|
686
|
+
if (data instanceof ListCache) {
|
|
687
|
+
var pairs = data.__data__;
|
|
688
|
+
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
689
|
+
pairs.push([key, value]);
|
|
690
|
+
this.size = ++data.size;
|
|
691
|
+
return this;
|
|
692
|
+
}
|
|
693
|
+
data = this.__data__ = new MapCache(pairs);
|
|
694
|
+
}
|
|
695
|
+
data.set(key, value);
|
|
696
|
+
this.size = data.size;
|
|
697
|
+
return this;
|
|
698
|
+
}
|
|
699
|
+
module.exports = stackSet;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
// ../../node_modules/lodash/_Stack.js
|
|
704
|
+
var require_Stack = __commonJS({
|
|
705
|
+
"../../node_modules/lodash/_Stack.js"(exports, module) {
|
|
706
|
+
var ListCache = require_ListCache();
|
|
707
|
+
var stackClear = require_stackClear();
|
|
708
|
+
var stackDelete = require_stackDelete();
|
|
709
|
+
var stackGet = require_stackGet();
|
|
710
|
+
var stackHas = require_stackHas();
|
|
711
|
+
var stackSet = require_stackSet();
|
|
712
|
+
function Stack(entries) {
|
|
713
|
+
var data = this.__data__ = new ListCache(entries);
|
|
714
|
+
this.size = data.size;
|
|
715
|
+
}
|
|
716
|
+
Stack.prototype.clear = stackClear;
|
|
717
|
+
Stack.prototype["delete"] = stackDelete;
|
|
718
|
+
Stack.prototype.get = stackGet;
|
|
719
|
+
Stack.prototype.has = stackHas;
|
|
720
|
+
Stack.prototype.set = stackSet;
|
|
721
|
+
module.exports = Stack;
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
// ../../node_modules/lodash/_setCacheAdd.js
|
|
726
|
+
var require_setCacheAdd = __commonJS({
|
|
727
|
+
"../../node_modules/lodash/_setCacheAdd.js"(exports, module) {
|
|
728
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
729
|
+
function setCacheAdd(value) {
|
|
730
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
731
|
+
return this;
|
|
732
|
+
}
|
|
733
|
+
module.exports = setCacheAdd;
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
// ../../node_modules/lodash/_setCacheHas.js
|
|
738
|
+
var require_setCacheHas = __commonJS({
|
|
739
|
+
"../../node_modules/lodash/_setCacheHas.js"(exports, module) {
|
|
740
|
+
function setCacheHas(value) {
|
|
741
|
+
return this.__data__.has(value);
|
|
742
|
+
}
|
|
743
|
+
module.exports = setCacheHas;
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
// ../../node_modules/lodash/_SetCache.js
|
|
748
|
+
var require_SetCache = __commonJS({
|
|
749
|
+
"../../node_modules/lodash/_SetCache.js"(exports, module) {
|
|
750
|
+
var MapCache = require_MapCache();
|
|
751
|
+
var setCacheAdd = require_setCacheAdd();
|
|
752
|
+
var setCacheHas = require_setCacheHas();
|
|
753
|
+
function SetCache(values) {
|
|
754
|
+
var index = -1, length = values == null ? 0 : values.length;
|
|
755
|
+
this.__data__ = new MapCache();
|
|
756
|
+
while (++index < length) {
|
|
757
|
+
this.add(values[index]);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
761
|
+
SetCache.prototype.has = setCacheHas;
|
|
762
|
+
module.exports = SetCache;
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
|
|
766
|
+
// ../../node_modules/lodash/_arraySome.js
|
|
767
|
+
var require_arraySome = __commonJS({
|
|
768
|
+
"../../node_modules/lodash/_arraySome.js"(exports, module) {
|
|
769
|
+
function arraySome(array, predicate) {
|
|
770
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
771
|
+
while (++index < length) {
|
|
772
|
+
if (predicate(array[index], index, array)) {
|
|
773
|
+
return true;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
return false;
|
|
777
|
+
}
|
|
778
|
+
module.exports = arraySome;
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
// ../../node_modules/lodash/_cacheHas.js
|
|
783
|
+
var require_cacheHas = __commonJS({
|
|
784
|
+
"../../node_modules/lodash/_cacheHas.js"(exports, module) {
|
|
785
|
+
function cacheHas(cache, key) {
|
|
786
|
+
return cache.has(key);
|
|
787
|
+
}
|
|
788
|
+
module.exports = cacheHas;
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
// ../../node_modules/lodash/_equalArrays.js
|
|
793
|
+
var require_equalArrays = __commonJS({
|
|
794
|
+
"../../node_modules/lodash/_equalArrays.js"(exports, module) {
|
|
795
|
+
var SetCache = require_SetCache();
|
|
796
|
+
var arraySome = require_arraySome();
|
|
797
|
+
var cacheHas = require_cacheHas();
|
|
798
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
799
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
800
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
801
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
802
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
803
|
+
return false;
|
|
804
|
+
}
|
|
805
|
+
var arrStacked = stack.get(array);
|
|
806
|
+
var othStacked = stack.get(other);
|
|
807
|
+
if (arrStacked && othStacked) {
|
|
808
|
+
return arrStacked == other && othStacked == array;
|
|
809
|
+
}
|
|
810
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
|
|
811
|
+
stack.set(array, other);
|
|
812
|
+
stack.set(other, array);
|
|
813
|
+
while (++index < arrLength) {
|
|
814
|
+
var arrValue = array[index], othValue = other[index];
|
|
815
|
+
if (customizer) {
|
|
816
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
817
|
+
}
|
|
818
|
+
if (compared !== void 0) {
|
|
819
|
+
if (compared) {
|
|
820
|
+
continue;
|
|
821
|
+
}
|
|
822
|
+
result = false;
|
|
823
|
+
break;
|
|
824
|
+
}
|
|
825
|
+
if (seen) {
|
|
826
|
+
if (!arraySome(other, function(othValue2, othIndex) {
|
|
827
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
828
|
+
return seen.push(othIndex);
|
|
829
|
+
}
|
|
830
|
+
})) {
|
|
831
|
+
result = false;
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
835
|
+
result = false;
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
stack["delete"](array);
|
|
840
|
+
stack["delete"](other);
|
|
841
|
+
return result;
|
|
842
|
+
}
|
|
843
|
+
module.exports = equalArrays;
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
// ../../node_modules/lodash/_Uint8Array.js
|
|
848
|
+
var require_Uint8Array = __commonJS({
|
|
849
|
+
"../../node_modules/lodash/_Uint8Array.js"(exports, module) {
|
|
850
|
+
var root = require_root();
|
|
851
|
+
var Uint8Array2 = root.Uint8Array;
|
|
852
|
+
module.exports = Uint8Array2;
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
// ../../node_modules/lodash/_mapToArray.js
|
|
857
|
+
var require_mapToArray = __commonJS({
|
|
858
|
+
"../../node_modules/lodash/_mapToArray.js"(exports, module) {
|
|
859
|
+
function mapToArray(map) {
|
|
860
|
+
var index = -1, result = Array(map.size);
|
|
861
|
+
map.forEach(function(value, key) {
|
|
862
|
+
result[++index] = [key, value];
|
|
863
|
+
});
|
|
864
|
+
return result;
|
|
865
|
+
}
|
|
866
|
+
module.exports = mapToArray;
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
// ../../node_modules/lodash/_setToArray.js
|
|
871
|
+
var require_setToArray = __commonJS({
|
|
872
|
+
"../../node_modules/lodash/_setToArray.js"(exports, module) {
|
|
873
|
+
function setToArray(set) {
|
|
874
|
+
var index = -1, result = Array(set.size);
|
|
875
|
+
set.forEach(function(value) {
|
|
876
|
+
result[++index] = value;
|
|
877
|
+
});
|
|
878
|
+
return result;
|
|
879
|
+
}
|
|
880
|
+
module.exports = setToArray;
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
// ../../node_modules/lodash/_equalByTag.js
|
|
885
|
+
var require_equalByTag = __commonJS({
|
|
886
|
+
"../../node_modules/lodash/_equalByTag.js"(exports, module) {
|
|
887
|
+
var Symbol2 = require_Symbol();
|
|
888
|
+
var Uint8Array2 = require_Uint8Array();
|
|
889
|
+
var eq = require_eq();
|
|
890
|
+
var equalArrays = require_equalArrays();
|
|
891
|
+
var mapToArray = require_mapToArray();
|
|
892
|
+
var setToArray = require_setToArray();
|
|
893
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
894
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
895
|
+
var boolTag = "[object Boolean]";
|
|
896
|
+
var dateTag = "[object Date]";
|
|
897
|
+
var errorTag = "[object Error]";
|
|
898
|
+
var mapTag = "[object Map]";
|
|
899
|
+
var numberTag = "[object Number]";
|
|
900
|
+
var regexpTag = "[object RegExp]";
|
|
901
|
+
var setTag = "[object Set]";
|
|
902
|
+
var stringTag = "[object String]";
|
|
903
|
+
var symbolTag = "[object Symbol]";
|
|
904
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
905
|
+
var dataViewTag = "[object DataView]";
|
|
906
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
|
|
907
|
+
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
908
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
909
|
+
switch (tag) {
|
|
910
|
+
case dataViewTag:
|
|
911
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
912
|
+
return false;
|
|
913
|
+
}
|
|
914
|
+
object = object.buffer;
|
|
915
|
+
other = other.buffer;
|
|
916
|
+
case arrayBufferTag:
|
|
917
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
|
|
918
|
+
return false;
|
|
919
|
+
}
|
|
920
|
+
return true;
|
|
921
|
+
case boolTag:
|
|
922
|
+
case dateTag:
|
|
923
|
+
case numberTag:
|
|
924
|
+
return eq(+object, +other);
|
|
925
|
+
case errorTag:
|
|
926
|
+
return object.name == other.name && object.message == other.message;
|
|
927
|
+
case regexpTag:
|
|
928
|
+
case stringTag:
|
|
929
|
+
return object == other + "";
|
|
930
|
+
case mapTag:
|
|
931
|
+
var convert = mapToArray;
|
|
932
|
+
case setTag:
|
|
933
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
|
934
|
+
convert || (convert = setToArray);
|
|
935
|
+
if (object.size != other.size && !isPartial) {
|
|
936
|
+
return false;
|
|
937
|
+
}
|
|
938
|
+
var stacked = stack.get(object);
|
|
939
|
+
if (stacked) {
|
|
940
|
+
return stacked == other;
|
|
941
|
+
}
|
|
942
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
943
|
+
stack.set(object, other);
|
|
944
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
945
|
+
stack["delete"](object);
|
|
946
|
+
return result;
|
|
947
|
+
case symbolTag:
|
|
948
|
+
if (symbolValueOf) {
|
|
949
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
954
|
+
module.exports = equalByTag;
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
// ../../node_modules/lodash/_arrayPush.js
|
|
959
|
+
var require_arrayPush = __commonJS({
|
|
960
|
+
"../../node_modules/lodash/_arrayPush.js"(exports, module) {
|
|
961
|
+
function arrayPush(array, values) {
|
|
962
|
+
var index = -1, length = values.length, offset = array.length;
|
|
963
|
+
while (++index < length) {
|
|
964
|
+
array[offset + index] = values[index];
|
|
965
|
+
}
|
|
966
|
+
return array;
|
|
967
|
+
}
|
|
968
|
+
module.exports = arrayPush;
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
// ../../node_modules/lodash/isArray.js
|
|
973
|
+
var require_isArray = __commonJS({
|
|
974
|
+
"../../node_modules/lodash/isArray.js"(exports, module) {
|
|
975
|
+
var isArray = Array.isArray;
|
|
976
|
+
module.exports = isArray;
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
// ../../node_modules/lodash/_baseGetAllKeys.js
|
|
981
|
+
var require_baseGetAllKeys = __commonJS({
|
|
982
|
+
"../../node_modules/lodash/_baseGetAllKeys.js"(exports, module) {
|
|
983
|
+
var arrayPush = require_arrayPush();
|
|
984
|
+
var isArray = require_isArray();
|
|
985
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
986
|
+
var result = keysFunc(object);
|
|
987
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
988
|
+
}
|
|
989
|
+
module.exports = baseGetAllKeys;
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
|
|
993
|
+
// ../../node_modules/lodash/_arrayFilter.js
|
|
994
|
+
var require_arrayFilter = __commonJS({
|
|
995
|
+
"../../node_modules/lodash/_arrayFilter.js"(exports, module) {
|
|
996
|
+
function arrayFilter(array, predicate) {
|
|
997
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
998
|
+
while (++index < length) {
|
|
999
|
+
var value = array[index];
|
|
1000
|
+
if (predicate(value, index, array)) {
|
|
1001
|
+
result[resIndex++] = value;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
return result;
|
|
1005
|
+
}
|
|
1006
|
+
module.exports = arrayFilter;
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
// ../../node_modules/lodash/stubArray.js
|
|
1011
|
+
var require_stubArray = __commonJS({
|
|
1012
|
+
"../../node_modules/lodash/stubArray.js"(exports, module) {
|
|
1013
|
+
function stubArray() {
|
|
1014
|
+
return [];
|
|
1015
|
+
}
|
|
1016
|
+
module.exports = stubArray;
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
|
|
1020
|
+
// ../../node_modules/lodash/_getSymbols.js
|
|
1021
|
+
var require_getSymbols = __commonJS({
|
|
1022
|
+
"../../node_modules/lodash/_getSymbols.js"(exports, module) {
|
|
1023
|
+
var arrayFilter = require_arrayFilter();
|
|
1024
|
+
var stubArray = require_stubArray();
|
|
1025
|
+
var objectProto = Object.prototype;
|
|
1026
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1027
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1028
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
1029
|
+
if (object == null) {
|
|
1030
|
+
return [];
|
|
1031
|
+
}
|
|
1032
|
+
object = Object(object);
|
|
1033
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1034
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
1035
|
+
});
|
|
1036
|
+
};
|
|
1037
|
+
module.exports = getSymbols;
|
|
1038
|
+
}
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
// ../../node_modules/lodash/_baseTimes.js
|
|
1042
|
+
var require_baseTimes = __commonJS({
|
|
1043
|
+
"../../node_modules/lodash/_baseTimes.js"(exports, module) {
|
|
1044
|
+
function baseTimes(n, iteratee) {
|
|
1045
|
+
var index = -1, result = Array(n);
|
|
1046
|
+
while (++index < n) {
|
|
1047
|
+
result[index] = iteratee(index);
|
|
1048
|
+
}
|
|
1049
|
+
return result;
|
|
1050
|
+
}
|
|
1051
|
+
module.exports = baseTimes;
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
// ../../node_modules/lodash/isObjectLike.js
|
|
1056
|
+
var require_isObjectLike = __commonJS({
|
|
1057
|
+
"../../node_modules/lodash/isObjectLike.js"(exports, module) {
|
|
1058
|
+
function isObjectLike(value) {
|
|
1059
|
+
return value != null && typeof value == "object";
|
|
1060
|
+
}
|
|
1061
|
+
module.exports = isObjectLike;
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
// ../../node_modules/lodash/_baseIsArguments.js
|
|
1066
|
+
var require_baseIsArguments = __commonJS({
|
|
1067
|
+
"../../node_modules/lodash/_baseIsArguments.js"(exports, module) {
|
|
1068
|
+
var baseGetTag = require_baseGetTag();
|
|
1069
|
+
var isObjectLike = require_isObjectLike();
|
|
1070
|
+
var argsTag = "[object Arguments]";
|
|
1071
|
+
function baseIsArguments(value) {
|
|
1072
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
1073
|
+
}
|
|
1074
|
+
module.exports = baseIsArguments;
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
// ../../node_modules/lodash/isArguments.js
|
|
1079
|
+
var require_isArguments = __commonJS({
|
|
1080
|
+
"../../node_modules/lodash/isArguments.js"(exports, module) {
|
|
1081
|
+
var baseIsArguments = require_baseIsArguments();
|
|
1082
|
+
var isObjectLike = require_isObjectLike();
|
|
1083
|
+
var objectProto = Object.prototype;
|
|
1084
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1085
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1086
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
1087
|
+
return arguments;
|
|
1088
|
+
}()) ? baseIsArguments : function(value) {
|
|
1089
|
+
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
1090
|
+
};
|
|
1091
|
+
module.exports = isArguments;
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
// ../../node_modules/lodash/stubFalse.js
|
|
1096
|
+
var require_stubFalse = __commonJS({
|
|
1097
|
+
"../../node_modules/lodash/stubFalse.js"(exports, module) {
|
|
1098
|
+
function stubFalse() {
|
|
1099
|
+
return false;
|
|
1100
|
+
}
|
|
1101
|
+
module.exports = stubFalse;
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
|
|
1105
|
+
// ../../node_modules/lodash/isBuffer.js
|
|
1106
|
+
var require_isBuffer = __commonJS({
|
|
1107
|
+
"../../node_modules/lodash/isBuffer.js"(exports, module) {
|
|
1108
|
+
var root = require_root();
|
|
1109
|
+
var stubFalse = require_stubFalse();
|
|
1110
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1111
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1112
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1113
|
+
var Buffer2 = moduleExports ? root.Buffer : void 0;
|
|
1114
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
1115
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1116
|
+
module.exports = isBuffer;
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1119
|
+
|
|
1120
|
+
// ../../node_modules/lodash/_isIndex.js
|
|
1121
|
+
var require_isIndex = __commonJS({
|
|
1122
|
+
"../../node_modules/lodash/_isIndex.js"(exports, module) {
|
|
1123
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1124
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1125
|
+
function isIndex(value, length) {
|
|
1126
|
+
var type = typeof value;
|
|
1127
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
1128
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
1129
|
+
}
|
|
1130
|
+
module.exports = isIndex;
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1134
|
+
// ../../node_modules/lodash/isLength.js
|
|
1135
|
+
var require_isLength = __commonJS({
|
|
1136
|
+
"../../node_modules/lodash/isLength.js"(exports, module) {
|
|
1137
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1138
|
+
function isLength2(value) {
|
|
1139
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1140
|
+
}
|
|
1141
|
+
module.exports = isLength2;
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
|
|
1145
|
+
// ../../node_modules/lodash/_baseIsTypedArray.js
|
|
1146
|
+
var require_baseIsTypedArray = __commonJS({
|
|
1147
|
+
"../../node_modules/lodash/_baseIsTypedArray.js"(exports, module) {
|
|
1148
|
+
var baseGetTag = require_baseGetTag();
|
|
1149
|
+
var isLength2 = require_isLength();
|
|
1150
|
+
var isObjectLike = require_isObjectLike();
|
|
1151
|
+
var argsTag = "[object Arguments]";
|
|
1152
|
+
var arrayTag = "[object Array]";
|
|
1153
|
+
var boolTag = "[object Boolean]";
|
|
1154
|
+
var dateTag = "[object Date]";
|
|
1155
|
+
var errorTag = "[object Error]";
|
|
1156
|
+
var funcTag = "[object Function]";
|
|
1157
|
+
var mapTag = "[object Map]";
|
|
1158
|
+
var numberTag = "[object Number]";
|
|
1159
|
+
var objectTag = "[object Object]";
|
|
1160
|
+
var regexpTag = "[object RegExp]";
|
|
1161
|
+
var setTag = "[object Set]";
|
|
1162
|
+
var stringTag = "[object String]";
|
|
1163
|
+
var weakMapTag = "[object WeakMap]";
|
|
1164
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
1165
|
+
var dataViewTag = "[object DataView]";
|
|
1166
|
+
var float32Tag = "[object Float32Array]";
|
|
1167
|
+
var float64Tag = "[object Float64Array]";
|
|
1168
|
+
var int8Tag = "[object Int8Array]";
|
|
1169
|
+
var int16Tag = "[object Int16Array]";
|
|
1170
|
+
var int32Tag = "[object Int32Array]";
|
|
1171
|
+
var uint8Tag = "[object Uint8Array]";
|
|
1172
|
+
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
1173
|
+
var uint16Tag = "[object Uint16Array]";
|
|
1174
|
+
var uint32Tag = "[object Uint32Array]";
|
|
1175
|
+
var typedArrayTags = {};
|
|
1176
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
1177
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
1178
|
+
function baseIsTypedArray(value) {
|
|
1179
|
+
return isObjectLike(value) && isLength2(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
1180
|
+
}
|
|
1181
|
+
module.exports = baseIsTypedArray;
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
|
|
1185
|
+
// ../../node_modules/lodash/_baseUnary.js
|
|
1186
|
+
var require_baseUnary = __commonJS({
|
|
1187
|
+
"../../node_modules/lodash/_baseUnary.js"(exports, module) {
|
|
1188
|
+
function baseUnary(func) {
|
|
1189
|
+
return function(value) {
|
|
1190
|
+
return func(value);
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
module.exports = baseUnary;
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
// ../../node_modules/lodash/_nodeUtil.js
|
|
1198
|
+
var require_nodeUtil = __commonJS({
|
|
1199
|
+
"../../node_modules/lodash/_nodeUtil.js"(exports, module) {
|
|
1200
|
+
var freeGlobal = require_freeGlobal();
|
|
1201
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1202
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1203
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1204
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
1205
|
+
var nodeUtil = function() {
|
|
1206
|
+
try {
|
|
1207
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
1208
|
+
if (types) {
|
|
1209
|
+
return types;
|
|
1210
|
+
}
|
|
1211
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
1212
|
+
} catch (e) {
|
|
1213
|
+
}
|
|
1214
|
+
}();
|
|
1215
|
+
module.exports = nodeUtil;
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
|
|
1219
|
+
// ../../node_modules/lodash/isTypedArray.js
|
|
1220
|
+
var require_isTypedArray = __commonJS({
|
|
1221
|
+
"../../node_modules/lodash/isTypedArray.js"(exports, module) {
|
|
1222
|
+
var baseIsTypedArray = require_baseIsTypedArray();
|
|
1223
|
+
var baseUnary = require_baseUnary();
|
|
1224
|
+
var nodeUtil = require_nodeUtil();
|
|
1225
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
1226
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1227
|
+
module.exports = isTypedArray;
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
|
|
1231
|
+
// ../../node_modules/lodash/_arrayLikeKeys.js
|
|
1232
|
+
var require_arrayLikeKeys = __commonJS({
|
|
1233
|
+
"../../node_modules/lodash/_arrayLikeKeys.js"(exports, module) {
|
|
1234
|
+
var baseTimes = require_baseTimes();
|
|
1235
|
+
var isArguments = require_isArguments();
|
|
1236
|
+
var isArray = require_isArray();
|
|
1237
|
+
var isBuffer = require_isBuffer();
|
|
1238
|
+
var isIndex = require_isIndex();
|
|
1239
|
+
var isTypedArray = require_isTypedArray();
|
|
1240
|
+
var objectProto = Object.prototype;
|
|
1241
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1242
|
+
function arrayLikeKeys(value, inherited) {
|
|
1243
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
1244
|
+
for (var key in value) {
|
|
1245
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1246
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1247
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1248
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
1249
|
+
isIndex(key, length)))) {
|
|
1250
|
+
result.push(key);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return result;
|
|
1254
|
+
}
|
|
1255
|
+
module.exports = arrayLikeKeys;
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
// ../../node_modules/lodash/_isPrototype.js
|
|
1260
|
+
var require_isPrototype = __commonJS({
|
|
1261
|
+
"../../node_modules/lodash/_isPrototype.js"(exports, module) {
|
|
1262
|
+
var objectProto = Object.prototype;
|
|
1263
|
+
function isPrototype(value) {
|
|
1264
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
1265
|
+
return value === proto;
|
|
1266
|
+
}
|
|
1267
|
+
module.exports = isPrototype;
|
|
1268
|
+
}
|
|
1269
|
+
});
|
|
1270
|
+
|
|
1271
|
+
// ../../node_modules/lodash/_overArg.js
|
|
1272
|
+
var require_overArg = __commonJS({
|
|
1273
|
+
"../../node_modules/lodash/_overArg.js"(exports, module) {
|
|
1274
|
+
function overArg(func, transform) {
|
|
1275
|
+
return function(arg) {
|
|
1276
|
+
return func(transform(arg));
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
module.exports = overArg;
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
|
|
1283
|
+
// ../../node_modules/lodash/_nativeKeys.js
|
|
1284
|
+
var require_nativeKeys = __commonJS({
|
|
1285
|
+
"../../node_modules/lodash/_nativeKeys.js"(exports, module) {
|
|
1286
|
+
var overArg = require_overArg();
|
|
1287
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
1288
|
+
module.exports = nativeKeys;
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
|
|
1292
|
+
// ../../node_modules/lodash/_baseKeys.js
|
|
1293
|
+
var require_baseKeys = __commonJS({
|
|
1294
|
+
"../../node_modules/lodash/_baseKeys.js"(exports, module) {
|
|
1295
|
+
var isPrototype = require_isPrototype();
|
|
1296
|
+
var nativeKeys = require_nativeKeys();
|
|
1297
|
+
var objectProto = Object.prototype;
|
|
1298
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1299
|
+
function baseKeys(object) {
|
|
1300
|
+
if (!isPrototype(object)) {
|
|
1301
|
+
return nativeKeys(object);
|
|
1302
|
+
}
|
|
1303
|
+
var result = [];
|
|
1304
|
+
for (var key in Object(object)) {
|
|
1305
|
+
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
|
1306
|
+
result.push(key);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
return result;
|
|
1310
|
+
}
|
|
1311
|
+
module.exports = baseKeys;
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
|
|
1315
|
+
// ../../node_modules/lodash/isArrayLike.js
|
|
1316
|
+
var require_isArrayLike = __commonJS({
|
|
1317
|
+
"../../node_modules/lodash/isArrayLike.js"(exports, module) {
|
|
1318
|
+
var isFunction = require_isFunction();
|
|
1319
|
+
var isLength2 = require_isLength();
|
|
1320
|
+
function isArrayLike(value) {
|
|
1321
|
+
return value != null && isLength2(value.length) && !isFunction(value);
|
|
1322
|
+
}
|
|
1323
|
+
module.exports = isArrayLike;
|
|
1324
|
+
}
|
|
1325
|
+
});
|
|
1326
|
+
|
|
1327
|
+
// ../../node_modules/lodash/keys.js
|
|
1328
|
+
var require_keys = __commonJS({
|
|
1329
|
+
"../../node_modules/lodash/keys.js"(exports, module) {
|
|
1330
|
+
var arrayLikeKeys = require_arrayLikeKeys();
|
|
1331
|
+
var baseKeys = require_baseKeys();
|
|
1332
|
+
var isArrayLike = require_isArrayLike();
|
|
1333
|
+
function keys(object) {
|
|
1334
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
1335
|
+
}
|
|
1336
|
+
module.exports = keys;
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// ../../node_modules/lodash/_getAllKeys.js
|
|
1341
|
+
var require_getAllKeys = __commonJS({
|
|
1342
|
+
"../../node_modules/lodash/_getAllKeys.js"(exports, module) {
|
|
1343
|
+
var baseGetAllKeys = require_baseGetAllKeys();
|
|
1344
|
+
var getSymbols = require_getSymbols();
|
|
1345
|
+
var keys = require_keys();
|
|
1346
|
+
function getAllKeys(object) {
|
|
1347
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
1348
|
+
}
|
|
1349
|
+
module.exports = getAllKeys;
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
|
|
1353
|
+
// ../../node_modules/lodash/_equalObjects.js
|
|
1354
|
+
var require_equalObjects = __commonJS({
|
|
1355
|
+
"../../node_modules/lodash/_equalObjects.js"(exports, module) {
|
|
1356
|
+
var getAllKeys = require_getAllKeys();
|
|
1357
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1358
|
+
var objectProto = Object.prototype;
|
|
1359
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1360
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1361
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
1362
|
+
if (objLength != othLength && !isPartial) {
|
|
1363
|
+
return false;
|
|
1364
|
+
}
|
|
1365
|
+
var index = objLength;
|
|
1366
|
+
while (index--) {
|
|
1367
|
+
var key = objProps[index];
|
|
1368
|
+
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
1369
|
+
return false;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
var objStacked = stack.get(object);
|
|
1373
|
+
var othStacked = stack.get(other);
|
|
1374
|
+
if (objStacked && othStacked) {
|
|
1375
|
+
return objStacked == other && othStacked == object;
|
|
1376
|
+
}
|
|
1377
|
+
var result = true;
|
|
1378
|
+
stack.set(object, other);
|
|
1379
|
+
stack.set(other, object);
|
|
1380
|
+
var skipCtor = isPartial;
|
|
1381
|
+
while (++index < objLength) {
|
|
1382
|
+
key = objProps[index];
|
|
1383
|
+
var objValue = object[key], othValue = other[key];
|
|
1384
|
+
if (customizer) {
|
|
1385
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1386
|
+
}
|
|
1387
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1388
|
+
result = false;
|
|
1389
|
+
break;
|
|
1390
|
+
}
|
|
1391
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
1392
|
+
}
|
|
1393
|
+
if (result && !skipCtor) {
|
|
1394
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1395
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1396
|
+
result = false;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
stack["delete"](object);
|
|
1400
|
+
stack["delete"](other);
|
|
1401
|
+
return result;
|
|
1402
|
+
}
|
|
1403
|
+
module.exports = equalObjects;
|
|
1404
|
+
}
|
|
1405
|
+
});
|
|
1406
|
+
|
|
1407
|
+
// ../../node_modules/lodash/_DataView.js
|
|
1408
|
+
var require_DataView = __commonJS({
|
|
1409
|
+
"../../node_modules/lodash/_DataView.js"(exports, module) {
|
|
1410
|
+
var getNative = require_getNative();
|
|
1411
|
+
var root = require_root();
|
|
1412
|
+
var DataView = getNative(root, "DataView");
|
|
1413
|
+
module.exports = DataView;
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
|
|
1417
|
+
// ../../node_modules/lodash/_Promise.js
|
|
1418
|
+
var require_Promise = __commonJS({
|
|
1419
|
+
"../../node_modules/lodash/_Promise.js"(exports, module) {
|
|
1420
|
+
var getNative = require_getNative();
|
|
1421
|
+
var root = require_root();
|
|
1422
|
+
var Promise2 = getNative(root, "Promise");
|
|
1423
|
+
module.exports = Promise2;
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1427
|
+
// ../../node_modules/lodash/_Set.js
|
|
1428
|
+
var require_Set = __commonJS({
|
|
1429
|
+
"../../node_modules/lodash/_Set.js"(exports, module) {
|
|
1430
|
+
var getNative = require_getNative();
|
|
1431
|
+
var root = require_root();
|
|
1432
|
+
var Set2 = getNative(root, "Set");
|
|
1433
|
+
module.exports = Set2;
|
|
1434
|
+
}
|
|
1435
|
+
});
|
|
1436
|
+
|
|
1437
|
+
// ../../node_modules/lodash/_WeakMap.js
|
|
1438
|
+
var require_WeakMap = __commonJS({
|
|
1439
|
+
"../../node_modules/lodash/_WeakMap.js"(exports, module) {
|
|
1440
|
+
var getNative = require_getNative();
|
|
1441
|
+
var root = require_root();
|
|
1442
|
+
var WeakMap2 = getNative(root, "WeakMap");
|
|
1443
|
+
module.exports = WeakMap2;
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
|
|
1447
|
+
// ../../node_modules/lodash/_getTag.js
|
|
1448
|
+
var require_getTag = __commonJS({
|
|
1449
|
+
"../../node_modules/lodash/_getTag.js"(exports, module) {
|
|
1450
|
+
var DataView = require_DataView();
|
|
1451
|
+
var Map2 = require_Map();
|
|
1452
|
+
var Promise2 = require_Promise();
|
|
1453
|
+
var Set2 = require_Set();
|
|
1454
|
+
var WeakMap2 = require_WeakMap();
|
|
1455
|
+
var baseGetTag = require_baseGetTag();
|
|
1456
|
+
var toSource = require_toSource();
|
|
1457
|
+
var mapTag = "[object Map]";
|
|
1458
|
+
var objectTag = "[object Object]";
|
|
1459
|
+
var promiseTag = "[object Promise]";
|
|
1460
|
+
var setTag = "[object Set]";
|
|
1461
|
+
var weakMapTag = "[object WeakMap]";
|
|
1462
|
+
var dataViewTag = "[object DataView]";
|
|
1463
|
+
var dataViewCtorString = toSource(DataView);
|
|
1464
|
+
var mapCtorString = toSource(Map2);
|
|
1465
|
+
var promiseCtorString = toSource(Promise2);
|
|
1466
|
+
var setCtorString = toSource(Set2);
|
|
1467
|
+
var weakMapCtorString = toSource(WeakMap2);
|
|
1468
|
+
var getTag = baseGetTag;
|
|
1469
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
|
|
1470
|
+
getTag = function(value) {
|
|
1471
|
+
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1472
|
+
if (ctorString) {
|
|
1473
|
+
switch (ctorString) {
|
|
1474
|
+
case dataViewCtorString:
|
|
1475
|
+
return dataViewTag;
|
|
1476
|
+
case mapCtorString:
|
|
1477
|
+
return mapTag;
|
|
1478
|
+
case promiseCtorString:
|
|
1479
|
+
return promiseTag;
|
|
1480
|
+
case setCtorString:
|
|
1481
|
+
return setTag;
|
|
1482
|
+
case weakMapCtorString:
|
|
1483
|
+
return weakMapTag;
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
return result;
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
module.exports = getTag;
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
|
|
1493
|
+
// ../../node_modules/lodash/_baseIsEqualDeep.js
|
|
1494
|
+
var require_baseIsEqualDeep = __commonJS({
|
|
1495
|
+
"../../node_modules/lodash/_baseIsEqualDeep.js"(exports, module) {
|
|
1496
|
+
var Stack = require_Stack();
|
|
1497
|
+
var equalArrays = require_equalArrays();
|
|
1498
|
+
var equalByTag = require_equalByTag();
|
|
1499
|
+
var equalObjects = require_equalObjects();
|
|
1500
|
+
var getTag = require_getTag();
|
|
1501
|
+
var isArray = require_isArray();
|
|
1502
|
+
var isBuffer = require_isBuffer();
|
|
1503
|
+
var isTypedArray = require_isTypedArray();
|
|
1504
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1505
|
+
var argsTag = "[object Arguments]";
|
|
1506
|
+
var arrayTag = "[object Array]";
|
|
1507
|
+
var objectTag = "[object Object]";
|
|
1508
|
+
var objectProto = Object.prototype;
|
|
1509
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1510
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1511
|
+
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
1512
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1513
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1514
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1515
|
+
if (isSameTag && isBuffer(object)) {
|
|
1516
|
+
if (!isBuffer(other)) {
|
|
1517
|
+
return false;
|
|
1518
|
+
}
|
|
1519
|
+
objIsArr = true;
|
|
1520
|
+
objIsObj = false;
|
|
1521
|
+
}
|
|
1522
|
+
if (isSameTag && !objIsObj) {
|
|
1523
|
+
stack || (stack = new Stack());
|
|
1524
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1525
|
+
}
|
|
1526
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
1527
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
1528
|
+
if (objIsWrapped || othIsWrapped) {
|
|
1529
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1530
|
+
stack || (stack = new Stack());
|
|
1531
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
if (!isSameTag) {
|
|
1535
|
+
return false;
|
|
1536
|
+
}
|
|
1537
|
+
stack || (stack = new Stack());
|
|
1538
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1539
|
+
}
|
|
1540
|
+
module.exports = baseIsEqualDeep;
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1544
|
+
// ../../node_modules/lodash/_baseIsEqual.js
|
|
1545
|
+
var require_baseIsEqual = __commonJS({
|
|
1546
|
+
"../../node_modules/lodash/_baseIsEqual.js"(exports, module) {
|
|
1547
|
+
var baseIsEqualDeep = require_baseIsEqualDeep();
|
|
1548
|
+
var isObjectLike = require_isObjectLike();
|
|
1549
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1550
|
+
if (value === other) {
|
|
1551
|
+
return true;
|
|
1552
|
+
}
|
|
1553
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1554
|
+
return value !== value && other !== other;
|
|
1555
|
+
}
|
|
1556
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1557
|
+
}
|
|
1558
|
+
module.exports = baseIsEqual;
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
|
|
1562
|
+
// ../../node_modules/lodash/isEqual.js
|
|
1563
|
+
var require_isEqual = __commonJS({
|
|
1564
|
+
"../../node_modules/lodash/isEqual.js"(exports, module) {
|
|
1565
|
+
var baseIsEqual = require_baseIsEqual();
|
|
1566
|
+
function isEqual2(value, other) {
|
|
1567
|
+
return baseIsEqual(value, other);
|
|
1568
|
+
}
|
|
1569
|
+
module.exports = isEqual2;
|
|
1570
|
+
}
|
|
1571
|
+
});
|
|
34
1572
|
|
|
35
1573
|
// src/lib/types/ISTDate.ts
|
|
36
1574
|
function formatISTDate(date, options) {
|
|
@@ -4026,11 +5564,18 @@ var getRoleLabel = (role) => {
|
|
|
4026
5564
|
var getRoleDescription = (role) => {
|
|
4027
5565
|
return getRoleMetadata(role)?.description || "";
|
|
4028
5566
|
};
|
|
5567
|
+
var getRoleAssignmentKind = (role) => {
|
|
5568
|
+
return getRoleMetadata(role)?.assignmentKind || null;
|
|
5569
|
+
};
|
|
4029
5570
|
var isFactoryScopedRole = (role) => {
|
|
4030
5571
|
const normalizedRole = normalizeRoleLevel(role);
|
|
4031
5572
|
return normalizedRole ? FACTORY_SCOPED_ROLE_SET.has(normalizedRole) : false;
|
|
4032
5573
|
};
|
|
4033
5574
|
var isSupervisorRole = (role) => normalizeRoleLevel(role) === "supervisor";
|
|
5575
|
+
var canRoleManageCompany = (role) => {
|
|
5576
|
+
const normalizedRole = normalizeRoleLevel(role);
|
|
5577
|
+
return normalizedRole === "owner" || normalizedRole === "it";
|
|
5578
|
+
};
|
|
4034
5579
|
var canRoleManageUsers = (role) => {
|
|
4035
5580
|
const normalizedRole = normalizeRoleLevel(role);
|
|
4036
5581
|
return normalizedRole === "optifye" || normalizedRole === "owner" || normalizedRole === "it" || isFactoryScopedRole(normalizedRole);
|
|
@@ -4043,12 +5588,23 @@ var canRoleViewUsageStats = (role) => {
|
|
|
4043
5588
|
const normalizedRole = normalizeRoleLevel(role);
|
|
4044
5589
|
return normalizedRole === "optifye" || normalizedRole === "owner" || normalizedRole === "it";
|
|
4045
5590
|
};
|
|
5591
|
+
var canRoleViewClipsCost = (role) => {
|
|
5592
|
+
const normalizedRole = normalizeRoleLevel(role);
|
|
5593
|
+
return normalizedRole === "optifye" || normalizedRole === "owner";
|
|
5594
|
+
};
|
|
4046
5595
|
var canRoleAccessTeamManagement = (role) => {
|
|
4047
5596
|
return canRoleManageUsers(role);
|
|
4048
5597
|
};
|
|
4049
5598
|
var getRoleNavPaths = (role) => {
|
|
4050
5599
|
return getRoleMetadata(role)?.navPaths || [];
|
|
4051
5600
|
};
|
|
5601
|
+
var canRoleAccessDashboardPath = (path, role) => {
|
|
5602
|
+
const basePath = `/${path.split("?")[0].split("/").filter(Boolean)[0] || ""}`.replace(/\/$/, "") || "/";
|
|
5603
|
+
if (basePath === "/clips-cost") {
|
|
5604
|
+
return canRoleViewClipsCost(role);
|
|
5605
|
+
}
|
|
5606
|
+
return getRoleNavPaths(role).includes(basePath);
|
|
5607
|
+
};
|
|
4052
5608
|
var getVisibleRolesForCurrentUser = (currentRole) => {
|
|
4053
5609
|
const normalizedRole = normalizeRoleLevel(currentRole);
|
|
4054
5610
|
const visibleRolesByCurrentRole = {
|
|
@@ -42797,10 +44353,15 @@ var IdleTimeReasonChartComponent = ({
|
|
|
42797
44353
|
data,
|
|
42798
44354
|
isLoading = false,
|
|
42799
44355
|
error = null,
|
|
42800
|
-
hideTotalDuration = false
|
|
44356
|
+
hideTotalDuration = false,
|
|
44357
|
+
updateAnimation = "replay"
|
|
42801
44358
|
}) => {
|
|
42802
44359
|
const [activeData, setActiveData] = React141__default.useState([]);
|
|
42803
44360
|
React141__default.useEffect(() => {
|
|
44361
|
+
if (updateAnimation === "smooth") {
|
|
44362
|
+
setActiveData(data && data.length > 0 ? data : []);
|
|
44363
|
+
return;
|
|
44364
|
+
}
|
|
42804
44365
|
if (activeData.length > 0) {
|
|
42805
44366
|
setActiveData([]);
|
|
42806
44367
|
}
|
|
@@ -42814,7 +44375,7 @@ var IdleTimeReasonChartComponent = ({
|
|
|
42814
44375
|
} else {
|
|
42815
44376
|
setActiveData([]);
|
|
42816
44377
|
}
|
|
42817
|
-
}, [data]);
|
|
44378
|
+
}, [data, updateAnimation]);
|
|
42818
44379
|
React141__default.useEffect(() => {
|
|
42819
44380
|
if (!data || data.length === 0) return;
|
|
42820
44381
|
data.forEach((entry, index) => {
|
|
@@ -42824,8 +44385,11 @@ var IdleTimeReasonChartComponent = ({
|
|
|
42824
44385
|
});
|
|
42825
44386
|
}, [data]);
|
|
42826
44387
|
const pieKey = React141__default.useMemo(() => {
|
|
44388
|
+
if (updateAnimation === "smooth") {
|
|
44389
|
+
return "smooth";
|
|
44390
|
+
}
|
|
42827
44391
|
return activeData.map((d) => `${d.name}-${d.value}`).join("|");
|
|
42828
|
-
}, [activeData]);
|
|
44392
|
+
}, [activeData, updateAnimation]);
|
|
42829
44393
|
if (isLoading) {
|
|
42830
44394
|
return /* @__PURE__ */ jsx("div", { className: "w-full h-full" });
|
|
42831
44395
|
}
|
|
@@ -49376,7 +50940,6 @@ var SettingsPopup = ({
|
|
|
49376
50940
|
document.body
|
|
49377
50941
|
);
|
|
49378
50942
|
};
|
|
49379
|
-
var formatPercent = (value) => typeof value === "number" && Number.isFinite(value) ? `${value.toFixed(1)}%` : "N/A";
|
|
49380
50943
|
var formatRelativeTime2 = (value) => {
|
|
49381
50944
|
const parsed = new Date(value);
|
|
49382
50945
|
if (Number.isNaN(parsed.getTime())) return "Just now";
|
|
@@ -49542,8 +51105,7 @@ var AlertsPopup = ({
|
|
|
49542
51105
|
!isLoading && error && /* @__PURE__ */ jsx("div", { className: "px-5 py-10 text-sm text-red-600", children: error }),
|
|
49543
51106
|
!isLoading && !error && alerts.length === 0 && /* @__PURE__ */ jsx("div", { className: "px-5 py-10 text-sm text-gray-500", children: "No alerts right now." }),
|
|
49544
51107
|
!isLoading && !error && alerts.map((alert2, index) => {
|
|
49545
|
-
const isCritical =
|
|
49546
|
-
const description = `Now: ${formatPercent(alert2.current_efficiency)}. Usual for this shift: ${formatPercent(alert2.baseline_efficiency)}.`;
|
|
51108
|
+
const isCritical = alert2.alert_type === "recent_output_drop";
|
|
49547
51109
|
return /* @__PURE__ */ jsx(
|
|
49548
51110
|
motion.div,
|
|
49549
51111
|
{
|
|
@@ -49565,8 +51127,8 @@ var AlertsPopup = ({
|
|
|
49565
51127
|
formatRelativeTime2(alert2.evaluated_at)
|
|
49566
51128
|
] })
|
|
49567
51129
|
] }),
|
|
49568
|
-
/* @__PURE__ */ jsx("p", { className: "text-[12px] font-medium text-[#475569] uppercase tracking-wide", children: alert2.
|
|
49569
|
-
/* @__PURE__ */ jsx("p", { className: "text-[13.5px] text-[#64748b] leading-[1.45] mt-1", children:
|
|
51130
|
+
/* @__PURE__ */ jsx("p", { className: "text-[12px] font-medium text-[#475569] uppercase tracking-wide", children: alert2.title }),
|
|
51131
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13.5px] text-[#64748b] leading-[1.45] mt-1", children: alert2.message })
|
|
49570
51132
|
] })
|
|
49571
51133
|
] })
|
|
49572
51134
|
},
|
|
@@ -49600,6 +51162,7 @@ var SideNavBar = memo$1(({
|
|
|
49600
51162
|
const role = user?.role_level;
|
|
49601
51163
|
const roleNavPaths = useMemo(() => getRoleNavPaths(role), [role]);
|
|
49602
51164
|
const showLiveMonitorLink = roleNavPaths.includes("/live-monitor");
|
|
51165
|
+
const rootDashboardSurface = useMemo(() => role === "owner" || role === "plant_head" || role === "optifye" ? "operations_overview" : "monitor", [role]);
|
|
49603
51166
|
const getBasePath = useCallback((path) => {
|
|
49604
51167
|
const firstSegment = path.split("?")[0].split("/").filter(Boolean)[0];
|
|
49605
51168
|
return firstSegment ? `/${firstSegment}` : "/";
|
|
@@ -49610,12 +51173,11 @@ var SideNavBar = memo$1(({
|
|
|
49610
51173
|
const basePath = getBasePath(path);
|
|
49611
51174
|
return roleNavPaths.includes(basePath);
|
|
49612
51175
|
}, [role, isSuperAdmin, getBasePath, roleNavPaths]);
|
|
49613
|
-
const lineId = entityConfig.defaultLineId || LINE_1_UUID;
|
|
49614
51176
|
const skuEnabled = dashboardConfig?.skuConfig?.enabled || false;
|
|
49615
51177
|
dashboardConfig?.supervisorConfig?.enabled || false;
|
|
49616
51178
|
const showSupervisorManagement = false;
|
|
49617
51179
|
const ticketsEnabled = dashboardConfig?.ticketsConfig?.enabled ?? true;
|
|
49618
|
-
const
|
|
51180
|
+
const showBillingLink = canRoleViewClipsCost(role);
|
|
49619
51181
|
console.log("\u{1F50D} [SideNavBar] dashboardConfig:", dashboardConfig);
|
|
49620
51182
|
console.log("\u{1F50D} [SideNavBar] ticketsConfig:", dashboardConfig?.ticketsConfig);
|
|
49621
51183
|
console.log("\u{1F50D} [SideNavBar] ticketsEnabled:", ticketsEnabled);
|
|
@@ -49626,19 +51188,20 @@ var SideNavBar = memo$1(({
|
|
|
49626
51188
|
${isActive ? "bg-blue-50/80 text-blue-600 font-medium" : "hover:bg-gray-50 text-gray-500 hover:text-gray-700 font-medium active:bg-gray-100"}
|
|
49627
51189
|
transition-all duration-200 ease-out focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`;
|
|
49628
51190
|
}, [pathname]);
|
|
51191
|
+
const buildDashboardSurfaceTrackingEvent = useCallback((source, destinationPath, dashboardSurface) => ({
|
|
51192
|
+
name: dashboardSurface === "operations_overview" ? "Operations Overview clicked" : "monitor page clicked",
|
|
51193
|
+
properties: {
|
|
51194
|
+
source,
|
|
51195
|
+
destination_path: destinationPath,
|
|
51196
|
+
dashboard_surface: dashboardSurface
|
|
51197
|
+
}
|
|
51198
|
+
}), []);
|
|
49629
51199
|
const handleHomeClick = useCallback(() => {
|
|
49630
51200
|
navigate("/", {
|
|
49631
|
-
trackingEvent:
|
|
49632
|
-
name: "Operations Overview Page Clicked",
|
|
49633
|
-
properties: {
|
|
49634
|
-
source: "side_nav",
|
|
49635
|
-
line_id: lineId,
|
|
49636
|
-
line_name: "Line 1"
|
|
49637
|
-
}
|
|
49638
|
-
}
|
|
51201
|
+
trackingEvent: buildDashboardSurfaceTrackingEvent("side_nav", "/", rootDashboardSurface)
|
|
49639
51202
|
});
|
|
49640
51203
|
onMobileMenuClose?.();
|
|
49641
|
-
}, [navigate,
|
|
51204
|
+
}, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent, rootDashboardSurface]);
|
|
49642
51205
|
const handleLeaderboardClick = useCallback(() => {
|
|
49643
51206
|
navigate(`/leaderboard`, {
|
|
49644
51207
|
trackingEvent: {
|
|
@@ -49652,15 +51215,10 @@ var SideNavBar = memo$1(({
|
|
|
49652
51215
|
}, [navigate, onMobileMenuClose]);
|
|
49653
51216
|
const handleLiveClick = useCallback(() => {
|
|
49654
51217
|
navigate("/live-monitor", {
|
|
49655
|
-
trackingEvent:
|
|
49656
|
-
name: "Live Monitor Clicked",
|
|
49657
|
-
properties: {
|
|
49658
|
-
source: "side_nav"
|
|
49659
|
-
}
|
|
49660
|
-
}
|
|
51218
|
+
trackingEvent: buildDashboardSurfaceTrackingEvent("side_nav", "/live-monitor", "monitor")
|
|
49661
51219
|
});
|
|
49662
51220
|
onMobileMenuClose?.();
|
|
49663
|
-
}, [navigate, onMobileMenuClose]);
|
|
51221
|
+
}, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent]);
|
|
49664
51222
|
const handleKPIsClick = useCallback(() => {
|
|
49665
51223
|
navigate(`/kpis`, {
|
|
49666
51224
|
trackingEvent: {
|
|
@@ -49903,7 +51461,7 @@ var SideNavBar = memo$1(({
|
|
|
49903
51461
|
isActive: pathname === "/tickets" || pathname.startsWith("/tickets/")
|
|
49904
51462
|
});
|
|
49905
51463
|
}
|
|
49906
|
-
if (
|
|
51464
|
+
if (showBillingLink) {
|
|
49907
51465
|
items.push({
|
|
49908
51466
|
key: "clips-analysis",
|
|
49909
51467
|
label: "Billing",
|
|
@@ -49928,7 +51486,7 @@ var SideNavBar = memo$1(({
|
|
|
49928
51486
|
});
|
|
49929
51487
|
}
|
|
49930
51488
|
return items;
|
|
49931
|
-
}, [handleTargetsClick, handleShiftsClick, handleTeamManagementClick, handleProfileClick, handleTicketsClick, handleClipsCostClick, handleHelpClick, pathname, ticketsEnabled,
|
|
51489
|
+
}, [handleTargetsClick, handleShiftsClick, handleTeamManagementClick, handleProfileClick, handleTicketsClick, handleClipsCostClick, handleHelpClick, pathname, ticketsEnabled, showBillingLink, canAccessPath]);
|
|
49932
51490
|
const handleLogout = useCallback(async () => {
|
|
49933
51491
|
setIsSettingsOpen(false);
|
|
49934
51492
|
try {
|
|
@@ -49938,10 +51496,11 @@ var SideNavBar = memo$1(({
|
|
|
49938
51496
|
}
|
|
49939
51497
|
}, [signOut]);
|
|
49940
51498
|
const handleLogoClick = useCallback(() => {
|
|
49941
|
-
|
|
49942
|
-
|
|
51499
|
+
navigate("/", {
|
|
51500
|
+
trackingEvent: buildDashboardSurfaceTrackingEvent("logo", "/", rootDashboardSurface)
|
|
51501
|
+
});
|
|
49943
51502
|
onMobileMenuClose?.();
|
|
49944
|
-
}, [navigate, onMobileMenuClose]);
|
|
51503
|
+
}, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent, rootDashboardSurface]);
|
|
49945
51504
|
const homeButtonClasses = useMemo(() => getButtonClasses("/"), [getButtonClasses, pathname]);
|
|
49946
51505
|
const liveButtonClasses = useMemo(() => getButtonClasses("/live-monitor"), [getButtonClasses, pathname]);
|
|
49947
51506
|
const leaderboardButtonClasses = useMemo(() => getButtonClasses("/leaderboard"), [getButtonClasses, pathname]);
|
|
@@ -50325,6 +51884,18 @@ var SideNavBar = memo$1(({
|
|
|
50325
51884
|
]
|
|
50326
51885
|
}
|
|
50327
51886
|
),
|
|
51887
|
+
showBillingLink && /* @__PURE__ */ jsxs(
|
|
51888
|
+
"button",
|
|
51889
|
+
{
|
|
51890
|
+
onClick: handleMobileNavClick(handleClipsCostClick),
|
|
51891
|
+
className: getMobileButtonClass("/clips-cost"),
|
|
51892
|
+
"aria-label": "Billing",
|
|
51893
|
+
children: [
|
|
51894
|
+
/* @__PURE__ */ jsx(CurrencyDollarIcon, { className: getIconClass("/clips-cost") }),
|
|
51895
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Billing" })
|
|
51896
|
+
]
|
|
51897
|
+
}
|
|
51898
|
+
),
|
|
50328
51899
|
canAccessPath("/help") && /* @__PURE__ */ jsxs(
|
|
50329
51900
|
"button",
|
|
50330
51901
|
{
|
|
@@ -56782,6 +58353,11 @@ function HomeView({
|
|
|
56782
58353
|
useEffect(() => {
|
|
56783
58354
|
setIsHydrated(true);
|
|
56784
58355
|
}, []);
|
|
58356
|
+
useEffect(() => {
|
|
58357
|
+
trackCorePageView("Monitor", {
|
|
58358
|
+
dashboard_surface: "monitor"
|
|
58359
|
+
});
|
|
58360
|
+
}, []);
|
|
56785
58361
|
useEffect(() => {
|
|
56786
58362
|
if (metricsError) {
|
|
56787
58363
|
setErrorMessage(metricsError.message);
|
|
@@ -56792,7 +58368,7 @@ function HomeView({
|
|
|
56792
58368
|
const handleLineChange = useCallback((value) => {
|
|
56793
58369
|
setIsChangingFilter(true);
|
|
56794
58370
|
setSelectedLineId(value);
|
|
56795
|
-
trackCoreEvent("
|
|
58371
|
+
trackCoreEvent("monitor line filter changed", {
|
|
56796
58372
|
previous_line_id: selectedLineId,
|
|
56797
58373
|
new_line_id: value,
|
|
56798
58374
|
line_name: mergedLineNames[value] || (value === factoryViewId ? "All Lines" : `Line ${value.substring(0, 4)}`)
|
|
@@ -56813,10 +58389,11 @@ function HomeView({
|
|
|
56813
58389
|
useEffect(() => {
|
|
56814
58390
|
if (!metricsLoading && !hasInitialDataLoaded) {
|
|
56815
58391
|
setHasInitialDataLoaded(true);
|
|
56816
|
-
trackCoreEvent("
|
|
58392
|
+
trackCoreEvent("monitor page loaded", {
|
|
56817
58393
|
default_line_id: defaultLineId,
|
|
56818
58394
|
factory_view_id: factoryViewId,
|
|
56819
|
-
is_supervisor: isSupervisor
|
|
58395
|
+
is_supervisor: isSupervisor,
|
|
58396
|
+
dashboard_surface: "monitor"
|
|
56820
58397
|
});
|
|
56821
58398
|
}
|
|
56822
58399
|
}, [metricsLoading, hasInitialDataLoaded, defaultLineId, factoryViewId, isSupervisor]);
|
|
@@ -57492,6 +59069,7 @@ var MonthlyRangeFilter = ({
|
|
|
57492
59069
|
const [rangeEnd, setRangeEnd] = useState(parseDateKeyToDate(normalizedRange.endKey));
|
|
57493
59070
|
const [selecting, setSelecting] = useState(false);
|
|
57494
59071
|
const [activePreset, setActivePreset] = useState(null);
|
|
59072
|
+
const [pendingChangeMeta, setPendingChangeMeta] = useState(null);
|
|
57495
59073
|
const today = useMemo(() => endOfDay(todayDate), [todayDate]);
|
|
57496
59074
|
useEffect(() => {
|
|
57497
59075
|
setCalendarMonth(month);
|
|
@@ -57511,6 +59089,7 @@ var MonthlyRangeFilter = ({
|
|
|
57511
59089
|
return val.startKey === value.startKey && val.endKey === value.endKey;
|
|
57512
59090
|
});
|
|
57513
59091
|
setActivePreset(match ? match.label : "Custom");
|
|
59092
|
+
setPendingChangeMeta(null);
|
|
57514
59093
|
}
|
|
57515
59094
|
}, [isOpen, month, presets, value.endKey, value.startKey, year]);
|
|
57516
59095
|
useEffect(() => {
|
|
@@ -57527,6 +59106,7 @@ var MonthlyRangeFilter = ({
|
|
|
57527
59106
|
return;
|
|
57528
59107
|
}
|
|
57529
59108
|
setActivePreset("Custom");
|
|
59109
|
+
setPendingChangeMeta({ source: "custom" });
|
|
57530
59110
|
if (!selecting || !rangeStart) {
|
|
57531
59111
|
setRangeStart(day);
|
|
57532
59112
|
setRangeEnd(null);
|
|
@@ -57549,6 +59129,7 @@ var MonthlyRangeFilter = ({
|
|
|
57549
59129
|
setRangeEnd(end);
|
|
57550
59130
|
setSelecting(false);
|
|
57551
59131
|
setActivePreset(preset.label);
|
|
59132
|
+
setPendingChangeMeta({ source: "preset", presetLabel: preset.label });
|
|
57552
59133
|
setCalendarMonth(start.getMonth());
|
|
57553
59134
|
setCalendarYear(start.getFullYear());
|
|
57554
59135
|
};
|
|
@@ -57567,7 +59148,7 @@ var MonthlyRangeFilter = ({
|
|
|
57567
59148
|
const end = boundedStart <= boundedEnd ? boundedEnd : boundedStart;
|
|
57568
59149
|
const startKey = format(start, "yyyy-MM-dd");
|
|
57569
59150
|
const endKey = format(end, "yyyy-MM-dd");
|
|
57570
|
-
onChange({ startKey, endKey });
|
|
59151
|
+
onChange({ startKey, endKey }, pendingChangeMeta || void 0);
|
|
57571
59152
|
setIsOpen(false);
|
|
57572
59153
|
}
|
|
57573
59154
|
};
|
|
@@ -67505,13 +69086,7 @@ var WorkspaceHealthView = ({
|
|
|
67505
69086
|
/* @__PURE__ */ jsx("span", { className: clsx("text-3xl font-bold", getUptimeColor(summary.uptimePercentage)), children: summary.uptimePercentage === null ? "No data" : `${summary.uptimePercentage.toFixed(1)}%` }),
|
|
67506
69087
|
summary.uptimePercentage === null ? /* @__PURE__ */ jsx(Activity, { className: "h-5 w-5 text-gray-400" }) : summary.uptimePercentage >= 97 ? /* @__PURE__ */ jsx(TrendingUp, { className: "h-5 w-5 text-green-500" }) : summary.uptimePercentage >= 90 ? /* @__PURE__ */ jsx(Activity, { className: "h-5 w-5 text-yellow-500" }) : /* @__PURE__ */ jsx(TrendingDown, { className: "h-5 w-5 text-red-500" })
|
|
67507
69088
|
] }),
|
|
67508
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: summary.uptimePercentage === null ? "Uptime metrics unavailable for visible workspaces" : "Overall system uptime today" })
|
|
67509
|
-
summary.workspacesWithoutUptimeData > 0 && /* @__PURE__ */ jsxs("p", { className: "text-xs text-amber-600 mt-1", children: [
|
|
67510
|
-
summary.workspacesWithoutUptimeData,
|
|
67511
|
-
" workspace",
|
|
67512
|
-
summary.workspacesWithoutUptimeData === 1 ? "" : "s",
|
|
67513
|
-
" missing uptime data"
|
|
67514
|
-
] })
|
|
69089
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: summary.uptimePercentage === null ? "Uptime metrics unavailable for visible workspaces" : "Overall system uptime today" })
|
|
67515
69090
|
] })
|
|
67516
69091
|
] }),
|
|
67517
69092
|
/* @__PURE__ */ jsxs(Card2, { className: "bg-white", children: [
|
|
@@ -69206,6 +70781,12 @@ var getPositiveImprovementGain = ({
|
|
|
69206
70781
|
pcsGain: issueGain !== null && issueGain > 0 ? issueGain : null
|
|
69207
70782
|
};
|
|
69208
70783
|
};
|
|
70784
|
+
var getImprovementPcsGainSortValue = (input) => {
|
|
70785
|
+
const { pcsGain } = getPositiveImprovementGain(input);
|
|
70786
|
+
if (pcsGain !== null) return pcsGain;
|
|
70787
|
+
const raw = toFiniteNumber(input.estimated_gain_pieces);
|
|
70788
|
+
return raw ?? null;
|
|
70789
|
+
};
|
|
69209
70790
|
var getImprovementDisplayMetadata = ({
|
|
69210
70791
|
location,
|
|
69211
70792
|
line,
|
|
@@ -69269,26 +70850,21 @@ var compareImprovementRecommendationPriority = (left, right) => {
|
|
|
69269
70850
|
};
|
|
69270
70851
|
var ImprovementRecommendationSignals = ({
|
|
69271
70852
|
recommendation,
|
|
69272
|
-
className
|
|
70853
|
+
className,
|
|
70854
|
+
hideTargetsReadjustment = false
|
|
69273
70855
|
}) => {
|
|
69274
70856
|
const gainSummary = getImprovementGainSummary(recommendation);
|
|
69275
|
-
const showTargetReadjustment = needsTargetReadjustment(recommendation);
|
|
70857
|
+
const showTargetReadjustment = !hideTargetsReadjustment && needsTargetReadjustment(recommendation);
|
|
69276
70858
|
if (!gainSummary && !showTargetReadjustment) {
|
|
69277
70859
|
return null;
|
|
69278
70860
|
}
|
|
69279
70861
|
return /* @__PURE__ */ jsxs("div", { className: className || "flex flex-wrap items-center gap-x-4 gap-y-3", children: [
|
|
69280
|
-
gainSummary && /* @__PURE__ */
|
|
70862
|
+
gainSummary && /* @__PURE__ */ jsx(
|
|
69281
70863
|
"span",
|
|
69282
70864
|
{
|
|
69283
70865
|
"data-testid": "improvement-gain-chip",
|
|
69284
|
-
className: "inline-flex items-center
|
|
69285
|
-
children:
|
|
69286
|
-
/* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-trending-up w-4 h-4", children: [
|
|
69287
|
-
/* @__PURE__ */ jsx("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }),
|
|
69288
|
-
/* @__PURE__ */ jsx("polyline", { points: "16 7 22 7 22 13" })
|
|
69289
|
-
] }),
|
|
69290
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: gainSummary.primary })
|
|
69291
|
-
]
|
|
70866
|
+
className: "inline-flex items-center rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1.5 text-sm font-semibold text-emerald-700 shadow-sm",
|
|
70867
|
+
children: gainSummary.primary
|
|
69292
70868
|
}
|
|
69293
70869
|
),
|
|
69294
70870
|
showTargetReadjustment && /* @__PURE__ */ jsxs(
|
|
@@ -70089,6 +71665,7 @@ var ImprovementCenterView = () => {
|
|
|
70089
71665
|
});
|
|
70090
71666
|
}, [supervisorsByLineId]);
|
|
70091
71667
|
const filteredRecommendations = useMemo(() => {
|
|
71668
|
+
const hasActiveFilters = selectedLineId !== "all" || selectedStatus !== "all" || selectedShift !== "all" || selectedWeeksRange !== "all" || selectedMemberId !== "all" || selectedSortBy !== "all";
|
|
70092
71669
|
const sortedRecommendations = recommendations.filter((rec) => {
|
|
70093
71670
|
if (selectedLineId !== "all" && rec.line_id !== selectedLineId) return false;
|
|
70094
71671
|
if (selectedStatus === "resolved" && rec.ticket_status !== "solved") return false;
|
|
@@ -70103,22 +71680,22 @@ var ImprovementCenterView = () => {
|
|
|
70103
71680
|
if (selectedMemberId !== "all" && !(rec.assigned_user_ids?.includes(selectedMemberId) || rec.assigned_to_user_id === selectedMemberId)) return false;
|
|
70104
71681
|
return true;
|
|
70105
71682
|
}).sort((a, b) => {
|
|
70106
|
-
if (selectedSortBy === "highest_to_lowest") {
|
|
70107
|
-
const gainA =
|
|
70108
|
-
const gainB =
|
|
70109
|
-
|
|
70110
|
-
|
|
70111
|
-
|
|
70112
|
-
|
|
70113
|
-
|
|
70114
|
-
|
|
70115
|
-
if (gainA !== gainB) {
|
|
70116
|
-
return gainA - gainB;
|
|
71683
|
+
if (selectedSortBy === "highest_to_lowest" || selectedSortBy === "lowest_to_highest") {
|
|
71684
|
+
const gainA = getImprovementPcsGainSortValue(a);
|
|
71685
|
+
const gainB = getImprovementPcsGainSortValue(b);
|
|
71686
|
+
const aMissing = gainA === null;
|
|
71687
|
+
const bMissing = gainB === null;
|
|
71688
|
+
if (aMissing && bMissing) ; else if (aMissing) {
|
|
71689
|
+
return 1;
|
|
71690
|
+
} else if (bMissing) {
|
|
71691
|
+
return -1;
|
|
71692
|
+
} else if (gainA !== gainB) {
|
|
71693
|
+
return selectedSortBy === "highest_to_lowest" ? gainB - gainA : gainA - gainB;
|
|
70117
71694
|
}
|
|
70118
71695
|
}
|
|
70119
71696
|
return compareImprovementRecommendationPriority(a, b);
|
|
70120
71697
|
});
|
|
70121
|
-
if (!focusIssueId) {
|
|
71698
|
+
if (!focusIssueId || hasActiveFilters) {
|
|
70122
71699
|
return sortedRecommendations;
|
|
70123
71700
|
}
|
|
70124
71701
|
const focusedIndex = sortedRecommendations.findIndex((rec) => rec.issue_id === focusIssueId);
|
|
@@ -70452,7 +72029,7 @@ var ImprovementCenterView = () => {
|
|
|
70452
72029
|
/* @__PURE__ */ jsx("div", { className: "absolute left-6 top-full w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-transparent border-t-white", style: { filter: "drop-shadow(0 1px 1px rgba(0,0,0,0.05))" } })
|
|
70453
72030
|
] })
|
|
70454
72031
|
] }),
|
|
70455
|
-
/* @__PURE__ */ jsx(ImprovementRecommendationSignals_default, { recommendation: rec })
|
|
72032
|
+
/* @__PURE__ */ jsx(ImprovementRecommendationSignals_default, { recommendation: rec, hideTargetsReadjustment: true })
|
|
70456
72033
|
] })
|
|
70457
72034
|
] }),
|
|
70458
72035
|
/* @__PURE__ */ jsx("div", { className: "w-full lg:w-5/12 bg-gray-50 rounded-lg p-4 border border-gray-100 flex-shrink-0", children: Array.isArray(rec.evidence) && rec.evidence.length > 0 ? /* @__PURE__ */ jsx(
|
|
@@ -72539,20 +74116,410 @@ var AIAgentView = () => {
|
|
|
72539
74116
|
] });
|
|
72540
74117
|
};
|
|
72541
74118
|
var AIAgentView_default = AIAgentView;
|
|
72542
|
-
|
|
72543
|
-
|
|
72544
|
-
|
|
72545
|
-
|
|
72546
|
-
|
|
74119
|
+
|
|
74120
|
+
// src/views/operations-overview/store.ts
|
|
74121
|
+
var import_isEqual = __toESM(require_isEqual());
|
|
74122
|
+
|
|
74123
|
+
// src/views/operations-overview/types.ts
|
|
74124
|
+
var EMPTY_OVERVIEW_SCOPE = {
|
|
74125
|
+
current_range: { day_count: null },
|
|
74126
|
+
previous_range: { day_count: null },
|
|
74127
|
+
available_line_modes: { has_output: false, has_uptime: false },
|
|
74128
|
+
idle_time_vlm_enabled_line_count: null,
|
|
74129
|
+
idle_time_vlm_disabled_line_count: null
|
|
74130
|
+
};
|
|
74131
|
+
var EMPTY_OVERVIEW_SUMMARY = {
|
|
74132
|
+
plant_efficiency: { current: null, previous: null, delta_pp: null },
|
|
74133
|
+
avg_idle_per_workstation: {
|
|
74134
|
+
current_seconds: null,
|
|
74135
|
+
previous_seconds: null,
|
|
74136
|
+
delta_seconds: null,
|
|
74137
|
+
top_contributors: []
|
|
74138
|
+
}
|
|
74139
|
+
};
|
|
74140
|
+
var EMPTY_OVERVIEW_POOREST_LINES = {
|
|
74141
|
+
output: [],
|
|
74142
|
+
uptime: []
|
|
74143
|
+
};
|
|
74144
|
+
var EMPTY_OVERVIEW_TREND = {
|
|
74145
|
+
shift_mode: "all",
|
|
74146
|
+
points: []
|
|
74147
|
+
};
|
|
74148
|
+
var EMPTY_IDLE_BREAKDOWN = [];
|
|
74149
|
+
var EMPTY_IMPROVEMENTS = [];
|
|
74150
|
+
var LIVE_REFRESH_INTERVAL_MS = 6e4;
|
|
74151
|
+
|
|
74152
|
+
// src/views/operations-overview/store.ts
|
|
74153
|
+
var normalizeNumber = (value) => {
|
|
74154
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
74155
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
74156
|
+
const parsed = Number(value);
|
|
74157
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
74158
|
+
}
|
|
74159
|
+
return null;
|
|
74160
|
+
};
|
|
74161
|
+
var normalizeScope = (value) => ({
|
|
74162
|
+
company_id: value?.company_id,
|
|
74163
|
+
line_ids: Array.isArray(value?.line_ids) ? value.line_ids.filter((lineId) => typeof lineId === "string" && lineId.length > 0) : [],
|
|
74164
|
+
line_count: typeof value?.line_count === "number" ? value.line_count : value?.line_count ?? null,
|
|
74165
|
+
shift_mode: value?.shift_mode,
|
|
74166
|
+
comparison_strategy: value?.comparison_strategy,
|
|
74167
|
+
current_range: {
|
|
74168
|
+
start_date: value?.current_range?.start_date,
|
|
74169
|
+
end_date: value?.current_range?.end_date,
|
|
74170
|
+
day_count: value?.current_range?.day_count ?? null
|
|
74171
|
+
},
|
|
74172
|
+
previous_range: {
|
|
74173
|
+
start_date: value?.previous_range?.start_date,
|
|
74174
|
+
end_date: value?.previous_range?.end_date,
|
|
74175
|
+
day_count: value?.previous_range?.day_count ?? null
|
|
74176
|
+
},
|
|
74177
|
+
available_line_modes: {
|
|
74178
|
+
has_output: !!value?.available_line_modes?.has_output,
|
|
74179
|
+
has_uptime: !!value?.available_line_modes?.has_uptime
|
|
74180
|
+
},
|
|
74181
|
+
idle_time_vlm_enabled_line_count: value?.idle_time_vlm_enabled_line_count ?? null,
|
|
74182
|
+
idle_time_vlm_disabled_line_count: value?.idle_time_vlm_disabled_line_count ?? null
|
|
74183
|
+
});
|
|
74184
|
+
var normalizeTopContributor = (value) => ({
|
|
74185
|
+
workspace_id: value?.workspace_id,
|
|
74186
|
+
workspace_name: value?.workspace_name?.trim() || value?.workspace_id || "",
|
|
74187
|
+
line_id: value?.line_id,
|
|
74188
|
+
line_name: value?.line_name?.trim() || "",
|
|
74189
|
+
avg_idle_seconds: normalizeNumber(value?.avg_idle_seconds)
|
|
74190
|
+
});
|
|
74191
|
+
var normalizeIdleMetric = (value) => ({
|
|
74192
|
+
current_seconds: normalizeNumber(value?.current_seconds),
|
|
74193
|
+
previous_seconds: normalizeNumber(value?.previous_seconds),
|
|
74194
|
+
delta_seconds: normalizeNumber(value?.delta_seconds),
|
|
74195
|
+
top_contributors: (value?.top_contributors || []).map((item) => normalizeTopContributor(item))
|
|
74196
|
+
});
|
|
74197
|
+
var normalizeSummary = (value) => ({
|
|
74198
|
+
plant_efficiency: {
|
|
74199
|
+
current: normalizeNumber(value?.plant_efficiency?.current),
|
|
74200
|
+
previous: normalizeNumber(value?.plant_efficiency?.previous),
|
|
74201
|
+
delta_pp: normalizeNumber(value?.plant_efficiency?.delta_pp)
|
|
72547
74202
|
},
|
|
72548
|
-
|
|
72549
|
-
|
|
72550
|
-
|
|
74203
|
+
avg_idle_per_workstation: normalizeIdleMetric(value?.avg_idle_per_workstation)
|
|
74204
|
+
});
|
|
74205
|
+
var normalizeLineRow = (value) => ({
|
|
74206
|
+
line_id: value?.line_id,
|
|
74207
|
+
line_name: value?.line_name?.trim() || value?.line_id || "",
|
|
74208
|
+
avg_efficiency: normalizeNumber(value?.avg_efficiency),
|
|
74209
|
+
previous_avg_efficiency: normalizeNumber(value?.previous_avg_efficiency),
|
|
74210
|
+
delta_pp: normalizeNumber(value?.delta_pp)
|
|
74211
|
+
});
|
|
74212
|
+
var normalizePoorestLines = (value) => ({
|
|
74213
|
+
output: (value?.output || []).map((item) => normalizeLineRow(item)),
|
|
74214
|
+
uptime: (value?.uptime || []).map((item) => normalizeLineRow(item))
|
|
74215
|
+
});
|
|
74216
|
+
var normalizeTrend = (value) => ({
|
|
74217
|
+
shift_mode: value?.shift_mode || "all",
|
|
74218
|
+
points: (value?.points || []).map((point) => ({
|
|
74219
|
+
date: point?.date,
|
|
74220
|
+
avg_efficiency: normalizeNumber(point?.avg_efficiency)
|
|
74221
|
+
}))
|
|
74222
|
+
});
|
|
74223
|
+
var normalizeIdleBreakdown = (value) => (value || []).map((item) => ({
|
|
74224
|
+
reason: item?.reason?.trim() || "Unknown",
|
|
74225
|
+
percentage: normalizeNumber(item?.percentage),
|
|
74226
|
+
total_duration_seconds: normalizeNumber(item?.total_duration_seconds),
|
|
74227
|
+
efficiency_loss_percentage: normalizeNumber(item?.efficiency_loss_percentage),
|
|
74228
|
+
contributors: (item?.contributors || []).map((contributor) => ({
|
|
74229
|
+
workspace_id: contributor?.workspace_id,
|
|
74230
|
+
workspace_name: contributor?.workspace_name?.trim() || contributor?.workspace_id || "",
|
|
74231
|
+
total_duration_seconds: normalizeNumber(contributor?.total_duration_seconds),
|
|
74232
|
+
percentage_within_reason: normalizeNumber(contributor?.percentage_within_reason)
|
|
74233
|
+
}))
|
|
74234
|
+
}));
|
|
74235
|
+
var normalizeImprovements = (rows) => rows.map((row) => ({
|
|
74236
|
+
id: row.id,
|
|
74237
|
+
issueId: row.issueId,
|
|
74238
|
+
issueNumber: row.issueNumber,
|
|
74239
|
+
title: row.title,
|
|
74240
|
+
metric: row.metric,
|
|
74241
|
+
location: row.location,
|
|
74242
|
+
line: row.line,
|
|
74243
|
+
lineId: row.lineId,
|
|
74244
|
+
workspaceId: row.workspaceId
|
|
74245
|
+
}));
|
|
74246
|
+
var reuseIfEqual = (previous, next) => (0, import_isEqual.default)(previous, next) ? previous : next;
|
|
74247
|
+
var createInitialState = () => ({
|
|
74248
|
+
scope: EMPTY_OVERVIEW_SCOPE,
|
|
74249
|
+
snapshot: {
|
|
74250
|
+
data: {
|
|
74251
|
+
summary: EMPTY_OVERVIEW_SUMMARY,
|
|
74252
|
+
poorest_lines: EMPTY_OVERVIEW_POOREST_LINES
|
|
74253
|
+
},
|
|
74254
|
+
loading: false,
|
|
74255
|
+
error: null,
|
|
74256
|
+
hasLoadedOnce: false,
|
|
74257
|
+
lastUpdated: null
|
|
72551
74258
|
},
|
|
72552
|
-
|
|
72553
|
-
|
|
72554
|
-
|
|
74259
|
+
trend: {
|
|
74260
|
+
data: EMPTY_OVERVIEW_TREND,
|
|
74261
|
+
loading: false,
|
|
74262
|
+
error: null,
|
|
74263
|
+
lastUpdated: null
|
|
74264
|
+
},
|
|
74265
|
+
idle: {
|
|
74266
|
+
scope: EMPTY_OVERVIEW_SCOPE,
|
|
74267
|
+
data: EMPTY_IDLE_BREAKDOWN,
|
|
74268
|
+
loading: false,
|
|
74269
|
+
error: null,
|
|
74270
|
+
lastUpdated: null
|
|
74271
|
+
},
|
|
74272
|
+
improvements: {
|
|
74273
|
+
data: EMPTY_IMPROVEMENTS,
|
|
74274
|
+
loading: false,
|
|
74275
|
+
error: null,
|
|
74276
|
+
lastUpdated: null
|
|
74277
|
+
}
|
|
74278
|
+
});
|
|
74279
|
+
var hasSnapshotPayload = (state) => state.snapshot.hasLoadedOnce;
|
|
74280
|
+
var hasTrendPayload = (state) => state.trend.lastUpdated !== null;
|
|
74281
|
+
var hasIdlePayload = (state) => state.idle.lastUpdated !== null;
|
|
74282
|
+
var hasImprovementsPayload = (state) => state.improvements.lastUpdated !== null;
|
|
74283
|
+
var createOperationsOverviewStore = () => {
|
|
74284
|
+
let state = createInitialState();
|
|
74285
|
+
const listeners2 = /* @__PURE__ */ new Set();
|
|
74286
|
+
const emit = () => {
|
|
74287
|
+
listeners2.forEach((listener) => listener());
|
|
74288
|
+
};
|
|
74289
|
+
const setState = (updater, mode = "default") => {
|
|
74290
|
+
const next = updater(state);
|
|
74291
|
+
if (next === state) return;
|
|
74292
|
+
const commit = () => {
|
|
74293
|
+
state = next;
|
|
74294
|
+
emit();
|
|
74295
|
+
};
|
|
74296
|
+
if (mode === "transition") {
|
|
74297
|
+
startTransition(commit);
|
|
74298
|
+
return;
|
|
74299
|
+
}
|
|
74300
|
+
commit();
|
|
74301
|
+
};
|
|
74302
|
+
const subscribe = (listener) => {
|
|
74303
|
+
listeners2.add(listener);
|
|
74304
|
+
return () => {
|
|
74305
|
+
listeners2.delete(listener);
|
|
74306
|
+
};
|
|
74307
|
+
};
|
|
74308
|
+
const reset = () => {
|
|
74309
|
+
setState(() => createInitialState());
|
|
74310
|
+
};
|
|
74311
|
+
const beginSectionLoad = (section) => {
|
|
74312
|
+
setState((previous) => {
|
|
74313
|
+
if (section === "snapshot") {
|
|
74314
|
+
const showLoading2 = !hasSnapshotPayload(previous);
|
|
74315
|
+
if (previous.snapshot.loading === showLoading2 && previous.snapshot.error === null) {
|
|
74316
|
+
return previous;
|
|
74317
|
+
}
|
|
74318
|
+
return {
|
|
74319
|
+
...previous,
|
|
74320
|
+
snapshot: {
|
|
74321
|
+
...previous.snapshot,
|
|
74322
|
+
loading: showLoading2,
|
|
74323
|
+
error: null
|
|
74324
|
+
}
|
|
74325
|
+
};
|
|
74326
|
+
}
|
|
74327
|
+
if (section === "trend") {
|
|
74328
|
+
const showLoading2 = !hasTrendPayload(previous);
|
|
74329
|
+
if (previous.trend.loading === showLoading2 && previous.trend.error === null) {
|
|
74330
|
+
return previous;
|
|
74331
|
+
}
|
|
74332
|
+
return {
|
|
74333
|
+
...previous,
|
|
74334
|
+
trend: {
|
|
74335
|
+
...previous.trend,
|
|
74336
|
+
loading: showLoading2,
|
|
74337
|
+
error: null
|
|
74338
|
+
}
|
|
74339
|
+
};
|
|
74340
|
+
}
|
|
74341
|
+
if (section === "idle") {
|
|
74342
|
+
const showLoading2 = !hasIdlePayload(previous);
|
|
74343
|
+
if (previous.idle.loading === showLoading2 && previous.idle.error === null) {
|
|
74344
|
+
return previous;
|
|
74345
|
+
}
|
|
74346
|
+
return {
|
|
74347
|
+
...previous,
|
|
74348
|
+
idle: {
|
|
74349
|
+
...previous.idle,
|
|
74350
|
+
loading: showLoading2,
|
|
74351
|
+
error: null
|
|
74352
|
+
}
|
|
74353
|
+
};
|
|
74354
|
+
}
|
|
74355
|
+
const showLoading = !hasImprovementsPayload(previous);
|
|
74356
|
+
if (previous.improvements.loading === showLoading && previous.improvements.error === null) {
|
|
74357
|
+
return previous;
|
|
74358
|
+
}
|
|
74359
|
+
return {
|
|
74360
|
+
...previous,
|
|
74361
|
+
improvements: {
|
|
74362
|
+
...previous.improvements,
|
|
74363
|
+
loading: showLoading,
|
|
74364
|
+
error: null
|
|
74365
|
+
}
|
|
74366
|
+
};
|
|
74367
|
+
});
|
|
74368
|
+
};
|
|
74369
|
+
const failSectionLoad = (section, error) => {
|
|
74370
|
+
setState((previous) => {
|
|
74371
|
+
if (section === "snapshot") {
|
|
74372
|
+
if (hasSnapshotPayload(previous)) return previous;
|
|
74373
|
+
return {
|
|
74374
|
+
...previous,
|
|
74375
|
+
snapshot: {
|
|
74376
|
+
...previous.snapshot,
|
|
74377
|
+
loading: false,
|
|
74378
|
+
error
|
|
74379
|
+
}
|
|
74380
|
+
};
|
|
74381
|
+
}
|
|
74382
|
+
if (section === "trend") {
|
|
74383
|
+
if (hasTrendPayload(previous)) return previous;
|
|
74384
|
+
return {
|
|
74385
|
+
...previous,
|
|
74386
|
+
trend: {
|
|
74387
|
+
...previous.trend,
|
|
74388
|
+
loading: false,
|
|
74389
|
+
error
|
|
74390
|
+
}
|
|
74391
|
+
};
|
|
74392
|
+
}
|
|
74393
|
+
if (section === "idle") {
|
|
74394
|
+
if (hasIdlePayload(previous)) return previous;
|
|
74395
|
+
return {
|
|
74396
|
+
...previous,
|
|
74397
|
+
idle: {
|
|
74398
|
+
...previous.idle,
|
|
74399
|
+
loading: false,
|
|
74400
|
+
error
|
|
74401
|
+
}
|
|
74402
|
+
};
|
|
74403
|
+
}
|
|
74404
|
+
if (hasImprovementsPayload(previous)) return previous;
|
|
74405
|
+
return {
|
|
74406
|
+
...previous,
|
|
74407
|
+
improvements: {
|
|
74408
|
+
...previous.improvements,
|
|
74409
|
+
loading: false,
|
|
74410
|
+
error
|
|
74411
|
+
}
|
|
74412
|
+
};
|
|
74413
|
+
});
|
|
74414
|
+
};
|
|
74415
|
+
return {
|
|
74416
|
+
getState: () => state,
|
|
74417
|
+
subscribe,
|
|
74418
|
+
reset,
|
|
74419
|
+
beginSnapshotLoad: () => beginSectionLoad("snapshot"),
|
|
74420
|
+
applySnapshotResponse: (response, updatedAt, mode = "default") => {
|
|
74421
|
+
setState((previous) => {
|
|
74422
|
+
const nextScope = reuseIfEqual(previous.scope, normalizeScope(response.scope));
|
|
74423
|
+
const nextSummary = reuseIfEqual(previous.snapshot.data.summary, normalizeSummary(response.summary));
|
|
74424
|
+
const nextPoorestLines = reuseIfEqual(previous.snapshot.data.poorest_lines, normalizePoorestLines(response.poorest_lines));
|
|
74425
|
+
const nextData = nextSummary === previous.snapshot.data.summary && nextPoorestLines === previous.snapshot.data.poorest_lines ? previous.snapshot.data : {
|
|
74426
|
+
summary: nextSummary,
|
|
74427
|
+
poorest_lines: nextPoorestLines
|
|
74428
|
+
};
|
|
74429
|
+
const nextLastUpdated = nextData !== previous.snapshot.data || previous.snapshot.lastUpdated === null ? updatedAt : previous.snapshot.lastUpdated;
|
|
74430
|
+
if (nextScope === previous.scope && nextData === previous.snapshot.data && previous.snapshot.loading === false && previous.snapshot.error === null && previous.snapshot.hasLoadedOnce && nextLastUpdated === previous.snapshot.lastUpdated) {
|
|
74431
|
+
return previous;
|
|
74432
|
+
}
|
|
74433
|
+
return {
|
|
74434
|
+
...previous,
|
|
74435
|
+
scope: nextScope,
|
|
74436
|
+
snapshot: {
|
|
74437
|
+
data: nextData,
|
|
74438
|
+
loading: false,
|
|
74439
|
+
error: null,
|
|
74440
|
+
hasLoadedOnce: true,
|
|
74441
|
+
lastUpdated: nextLastUpdated
|
|
74442
|
+
}
|
|
74443
|
+
};
|
|
74444
|
+
}, mode);
|
|
74445
|
+
},
|
|
74446
|
+
failSnapshotLoad: (error) => failSectionLoad("snapshot", error),
|
|
74447
|
+
beginTrendLoad: () => beginSectionLoad("trend"),
|
|
74448
|
+
applyTrendResponse: (response, updatedAt, mode = "default") => {
|
|
74449
|
+
setState((previous) => {
|
|
74450
|
+
const nextData = reuseIfEqual(previous.trend.data, normalizeTrend(response.trend));
|
|
74451
|
+
const nextLastUpdated = nextData !== previous.trend.data || previous.trend.lastUpdated === null ? updatedAt : previous.trend.lastUpdated;
|
|
74452
|
+
if (nextData === previous.trend.data && previous.trend.loading === false && previous.trend.error === null && nextLastUpdated === previous.trend.lastUpdated) {
|
|
74453
|
+
return previous;
|
|
74454
|
+
}
|
|
74455
|
+
return {
|
|
74456
|
+
...previous,
|
|
74457
|
+
trend: {
|
|
74458
|
+
data: nextData,
|
|
74459
|
+
loading: false,
|
|
74460
|
+
error: null,
|
|
74461
|
+
lastUpdated: nextLastUpdated
|
|
74462
|
+
}
|
|
74463
|
+
};
|
|
74464
|
+
}, mode);
|
|
74465
|
+
},
|
|
74466
|
+
failTrendLoad: (error) => failSectionLoad("trend", error),
|
|
74467
|
+
beginIdleLoad: () => beginSectionLoad("idle"),
|
|
74468
|
+
applyIdleResponse: (response, updatedAt, mode = "default") => {
|
|
74469
|
+
setState((previous) => {
|
|
74470
|
+
const nextScope = reuseIfEqual(previous.idle.scope, normalizeScope(response.scope));
|
|
74471
|
+
const nextData = reuseIfEqual(previous.idle.data, normalizeIdleBreakdown(response.idle_reason_breakdown));
|
|
74472
|
+
const nextLastUpdated = nextData !== previous.idle.data || nextScope !== previous.idle.scope || previous.idle.lastUpdated === null ? updatedAt : previous.idle.lastUpdated;
|
|
74473
|
+
if (nextData === previous.idle.data && nextScope === previous.idle.scope && previous.idle.loading === false && previous.idle.error === null && nextLastUpdated === previous.idle.lastUpdated) {
|
|
74474
|
+
return previous;
|
|
74475
|
+
}
|
|
74476
|
+
return {
|
|
74477
|
+
...previous,
|
|
74478
|
+
idle: {
|
|
74479
|
+
scope: nextScope,
|
|
74480
|
+
data: nextData,
|
|
74481
|
+
loading: false,
|
|
74482
|
+
error: null,
|
|
74483
|
+
lastUpdated: nextLastUpdated
|
|
74484
|
+
}
|
|
74485
|
+
};
|
|
74486
|
+
}, mode);
|
|
74487
|
+
},
|
|
74488
|
+
failIdleLoad: (error) => failSectionLoad("idle", error),
|
|
74489
|
+
beginImprovementsLoad: () => beginSectionLoad("improvements"),
|
|
74490
|
+
applyImprovements: (rows, updatedAt, mode = "default") => {
|
|
74491
|
+
setState((previous) => {
|
|
74492
|
+
const nextData = reuseIfEqual(previous.improvements.data, normalizeImprovements(rows));
|
|
74493
|
+
const nextLastUpdated = nextData !== previous.improvements.data || previous.improvements.lastUpdated === null ? updatedAt : previous.improvements.lastUpdated;
|
|
74494
|
+
if (nextData === previous.improvements.data && previous.improvements.loading === false && previous.improvements.error === null && nextLastUpdated === previous.improvements.lastUpdated) {
|
|
74495
|
+
return previous;
|
|
74496
|
+
}
|
|
74497
|
+
return {
|
|
74498
|
+
...previous,
|
|
74499
|
+
improvements: {
|
|
74500
|
+
data: nextData,
|
|
74501
|
+
loading: false,
|
|
74502
|
+
error: null,
|
|
74503
|
+
lastUpdated: nextLastUpdated
|
|
74504
|
+
}
|
|
74505
|
+
};
|
|
74506
|
+
}, mode);
|
|
74507
|
+
},
|
|
74508
|
+
failImprovementsLoad: (error) => failSectionLoad("improvements", error)
|
|
74509
|
+
};
|
|
72555
74510
|
};
|
|
74511
|
+
var useOperationsOverviewSelector = (store, selector) => {
|
|
74512
|
+
return useSyncExternalStore(
|
|
74513
|
+
store.subscribe,
|
|
74514
|
+
() => selector(store.getState()),
|
|
74515
|
+
() => selector(store.getState())
|
|
74516
|
+
);
|
|
74517
|
+
};
|
|
74518
|
+
var useOperationsOverviewScope = (store) => useOperationsOverviewSelector(store, (state) => state.scope);
|
|
74519
|
+
var useOperationsOverviewSnapshot = (store) => useOperationsOverviewSelector(store, (state) => state.snapshot);
|
|
74520
|
+
var useOperationsOverviewTrend = (store) => useOperationsOverviewSelector(store, (state) => state.trend);
|
|
74521
|
+
var useOperationsOverviewIdle = (store) => useOperationsOverviewSelector(store, (state) => state.idle);
|
|
74522
|
+
var useOperationsOverviewImprovements = (store) => useOperationsOverviewSelector(store, (state) => state.improvements);
|
|
72556
74523
|
var efficiencyLineConfig = [
|
|
72557
74524
|
{
|
|
72558
74525
|
dataKey: "efficiency",
|
|
@@ -72564,6 +74531,9 @@ var efficiencyLineConfig = [
|
|
|
72564
74531
|
activeDot: { r: 6, strokeWidth: 0, fill: "#00AB45" }
|
|
72565
74532
|
}
|
|
72566
74533
|
];
|
|
74534
|
+
var bumpRenderCounter = (key) => {
|
|
74535
|
+
if (process.env.NODE_ENV === "test") ;
|
|
74536
|
+
};
|
|
72567
74537
|
var toNumber3 = (value) => {
|
|
72568
74538
|
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
72569
74539
|
if (typeof value === "string" && value.trim().length > 0) {
|
|
@@ -72583,26 +74553,11 @@ var formatSignedIdleDuration = (seconds) => {
|
|
|
72583
74553
|
const sign = seconds > 0 ? "+" : "-";
|
|
72584
74554
|
return `${sign}${formatIdleDuration(Math.abs(seconds))}`;
|
|
72585
74555
|
};
|
|
72586
|
-
var formatComparisonWindow = (dayCount) => {
|
|
74556
|
+
var formatComparisonWindow = (dayCount, comparisonStrategy) => {
|
|
74557
|
+
if (comparisonStrategy === "previous_full_week") return "last week";
|
|
72587
74558
|
if (!dayCount || !Number.isFinite(dayCount)) return "previous range";
|
|
72588
74559
|
return `previous ${dayCount} ${dayCount === 1 ? "day" : "days"}`;
|
|
72589
74560
|
};
|
|
72590
|
-
var buildImprovementMetric = (recommendation) => {
|
|
72591
|
-
const { pcsGain } = getPositiveImprovementGain(recommendation);
|
|
72592
|
-
const metrics2 = recommendation.metrics || {};
|
|
72593
|
-
if (pcsGain !== null) {
|
|
72594
|
-
return formatImprovementPieceGain(pcsGain);
|
|
72595
|
-
}
|
|
72596
|
-
const idleMinutes = toNumber3(metrics2.idle_minutes);
|
|
72597
|
-
if (idleMinutes !== null) {
|
|
72598
|
-
return `-${Math.round(idleMinutes)}m Idle`;
|
|
72599
|
-
}
|
|
72600
|
-
const impactText = recommendation.impact?.trim();
|
|
72601
|
-
if (impactText) {
|
|
72602
|
-
return impactText.length > 22 ? `${impactText.slice(0, 22).trim()}...` : impactText;
|
|
72603
|
-
}
|
|
72604
|
-
return "Review Issue";
|
|
72605
|
-
};
|
|
72606
74561
|
var buildDeltaBadge = (delta, options) => {
|
|
72607
74562
|
if (delta === null || delta === void 0 || !Number.isFinite(delta)) {
|
|
72608
74563
|
return {
|
|
@@ -72670,368 +74625,224 @@ var OverviewImprovementsSkeleton = () => /* @__PURE__ */ jsx("div", { className:
|
|
|
72670
74625
|
] }),
|
|
72671
74626
|
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-end flex-shrink-0 ml-4", children: /* @__PURE__ */ jsx(SectionPulse, { className: "h-6 w-20 rounded-full" }) })
|
|
72672
74627
|
] }, index)) });
|
|
72673
|
-
var
|
|
72674
|
-
|
|
72675
|
-
|
|
72676
|
-
|
|
72677
|
-
|
|
72678
|
-
|
|
72679
|
-
|
|
72680
|
-
|
|
72681
|
-
|
|
72682
|
-
const [trendMode, setTrendMode] = React141__default.useState("all");
|
|
72683
|
-
const [poorestLineMode, setPoorestLineMode] = React141__default.useState("output");
|
|
72684
|
-
const [overview, setOverview] = React141__default.useState(EMPTY_OVERVIEW);
|
|
72685
|
-
const [isSnapshotLoading, setIsSnapshotLoading] = React141__default.useState(false);
|
|
72686
|
-
const [isTrendLoading, setIsTrendLoading] = React141__default.useState(false);
|
|
72687
|
-
const [trendFetchNonce, setTrendFetchNonce] = React141__default.useState(0);
|
|
72688
|
-
const [trendViewOpenNonce] = React141__default.useState(() => Date.now());
|
|
72689
|
-
const [idleReasonBreakdown, setIdleReasonBreakdown] = React141__default.useState([]);
|
|
72690
|
-
const [idleReasonScope, setIdleReasonScope] = React141__default.useState(null);
|
|
72691
|
-
const [isIdleReasonBreakdownLoading, setIsIdleReasonBreakdownLoading] = React141__default.useState(false);
|
|
72692
|
-
const [improvements, setImprovements] = React141__default.useState([]);
|
|
72693
|
-
const [isImprovementsLoading, setIsImprovementsLoading] = React141__default.useState(false);
|
|
74628
|
+
var OperationsOverviewHeader = React141__default.memo(({
|
|
74629
|
+
dateRange,
|
|
74630
|
+
trendMode,
|
|
74631
|
+
appTimezone,
|
|
74632
|
+
mobileMenuContext,
|
|
74633
|
+
onDateRangeChange,
|
|
74634
|
+
onTrendModeChange
|
|
74635
|
+
}) => {
|
|
74636
|
+
bumpRenderCounter();
|
|
72694
74637
|
const [isFilterOpen, setIsFilterOpen] = React141__default.useState(false);
|
|
72695
|
-
const [isIdleContributorsOpen, setIsIdleContributorsOpen] = React141__default.useState(false);
|
|
72696
|
-
const [isIdleContributorsPinned, setIsIdleContributorsPinned] = React141__default.useState(false);
|
|
72697
74638
|
const filterRef = React141__default.useRef(null);
|
|
72698
74639
|
const filterButtonRef = React141__default.useRef(null);
|
|
72699
74640
|
const mobileFilterButtonRef = React141__default.useRef(null);
|
|
72700
|
-
const
|
|
72701
|
-
|
|
72702
|
-
|
|
72703
|
-
|
|
72704
|
-
const
|
|
72705
|
-
|
|
72706
|
-
|
|
72707
|
-
|
|
72708
|
-
}
|
|
72709
|
-
|
|
72710
|
-
}, []);
|
|
74641
|
+
const currentWeekRange = React141__default.useMemo(
|
|
74642
|
+
() => getCurrentWeekToDateRange(appTimezone),
|
|
74643
|
+
[appTimezone]
|
|
74644
|
+
);
|
|
74645
|
+
const isCurrentWeekToDateRange = dateRange.startKey === currentWeekRange.startKey && dateRange.endKey === currentWeekRange.endKey;
|
|
74646
|
+
const mobileSubtitle = React141__default.useMemo(() => {
|
|
74647
|
+
if (isCurrentWeekToDateRange) {
|
|
74648
|
+
return `Week of ${format(parseDateKeyToDate(dateRange.startKey), "do MMM")}`;
|
|
74649
|
+
}
|
|
74650
|
+
return `${format(parseDateKeyToDate(dateRange.startKey), "do MMM")} - ${format(parseDateKeyToDate(dateRange.endKey), "do MMM, yyyy")}`;
|
|
74651
|
+
}, [dateRange.endKey, dateRange.startKey, isCurrentWeekToDateRange]);
|
|
74652
|
+
const desktopSubtitle = React141__default.useMemo(() => {
|
|
74653
|
+
if (isCurrentWeekToDateRange) {
|
|
74654
|
+
return `Week of ${format(parseDateKeyToDate(dateRange.startKey), "do MMMM, yyyy")}`;
|
|
74655
|
+
}
|
|
74656
|
+
return `${format(parseDateKeyToDate(dateRange.startKey), "do MMMM, yyyy")} - ${format(parseDateKeyToDate(dateRange.endKey), "do MMMM, yyyy")}`;
|
|
74657
|
+
}, [dateRange.endKey, dateRange.startKey, isCurrentWeekToDateRange]);
|
|
72711
74658
|
const handleFilterToggle = React141__default.useCallback(() => {
|
|
72712
74659
|
trackCoreEvent("Operations Overview Filter Toggled", {
|
|
72713
74660
|
action: !isFilterOpen ? "open" : "close"
|
|
72714
74661
|
});
|
|
72715
|
-
setIsFilterOpen(!
|
|
74662
|
+
setIsFilterOpen((previous) => !previous);
|
|
72716
74663
|
}, [isFilterOpen]);
|
|
72717
|
-
const handleTrendModeChange = React141__default.useCallback((
|
|
72718
|
-
const
|
|
74664
|
+
const handleTrendModeChange = React141__default.useCallback((event) => {
|
|
74665
|
+
const nextMode = event.target.value;
|
|
72719
74666
|
trackCoreEvent("Operations Overview Shift Filter Changed", {
|
|
72720
|
-
shift_mode:
|
|
74667
|
+
shift_mode: nextMode
|
|
72721
74668
|
});
|
|
72722
|
-
|
|
72723
|
-
}, []);
|
|
72724
|
-
const handlePoorestLineModeChange = React141__default.useCallback((mode) => {
|
|
72725
|
-
trackCoreEvent("Operations Overview Poorest Line Mode Changed", {
|
|
72726
|
-
mode
|
|
72727
|
-
});
|
|
72728
|
-
setPoorestLineMode(mode);
|
|
72729
|
-
}, []);
|
|
74669
|
+
onTrendModeChange(nextMode);
|
|
74670
|
+
}, [onTrendModeChange]);
|
|
72730
74671
|
React141__default.useEffect(() => {
|
|
72731
|
-
|
|
74672
|
+
const handleClickOutside = (event) => {
|
|
72732
74673
|
if (filterRef.current && !filterRef.current.contains(event.target) && filterButtonRef.current && !filterButtonRef.current.contains(event.target) && mobileFilterButtonRef.current && !mobileFilterButtonRef.current.contains(event.target)) {
|
|
72733
74674
|
setIsFilterOpen(false);
|
|
72734
74675
|
}
|
|
72735
|
-
}
|
|
74676
|
+
};
|
|
72736
74677
|
document.addEventListener("mousedown", handleClickOutside);
|
|
72737
74678
|
return () => {
|
|
72738
74679
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
72739
74680
|
};
|
|
72740
74681
|
}, []);
|
|
72741
|
-
|
|
72742
|
-
|
|
72743
|
-
|
|
72744
|
-
|
|
72745
|
-
|
|
72746
|
-
|
|
72747
|
-
|
|
72748
|
-
|
|
72749
|
-
|
|
72750
|
-
|
|
72751
|
-
|
|
72752
|
-
|
|
72753
|
-
|
|
72754
|
-
|
|
72755
|
-
|
|
72756
|
-
|
|
72757
|
-
|
|
72758
|
-
|
|
72759
|
-
|
|
72760
|
-
|
|
72761
|
-
|
|
72762
|
-
|
|
72763
|
-
|
|
72764
|
-
|
|
72765
|
-
|
|
72766
|
-
|
|
72767
|
-
|
|
72768
|
-
|
|
72769
|
-
|
|
72770
|
-
|
|
72771
|
-
|
|
72772
|
-
|
|
72773
|
-
|
|
72774
|
-
|
|
72775
|
-
|
|
72776
|
-
|
|
72777
|
-
|
|
72778
|
-
|
|
72779
|
-
|
|
72780
|
-
|
|
72781
|
-
|
|
72782
|
-
|
|
72783
|
-
|
|
72784
|
-
|
|
72785
|
-
|
|
72786
|
-
|
|
72787
|
-
|
|
72788
|
-
|
|
72789
|
-
|
|
72790
|
-
|
|
72791
|
-
|
|
72792
|
-
|
|
72793
|
-
|
|
72794
|
-
|
|
72795
|
-
|
|
72796
|
-
|
|
72797
|
-
|
|
72798
|
-
|
|
72799
|
-
|
|
72800
|
-
|
|
72801
|
-
|
|
72802
|
-
|
|
72803
|
-
|
|
72804
|
-
|
|
72805
|
-
|
|
72806
|
-
|
|
72807
|
-
|
|
72808
|
-
|
|
72809
|
-
|
|
72810
|
-
|
|
72811
|
-
|
|
72812
|
-
|
|
72813
|
-
|
|
72814
|
-
|
|
72815
|
-
|
|
72816
|
-
|
|
72817
|
-
|
|
72818
|
-
|
|
72819
|
-
|
|
72820
|
-
|
|
72821
|
-
|
|
72822
|
-
|
|
72823
|
-
|
|
72824
|
-
|
|
72825
|
-
|
|
72826
|
-
|
|
72827
|
-
|
|
72828
|
-
|
|
72829
|
-
|
|
72830
|
-
|
|
72831
|
-
|
|
72832
|
-
|
|
72833
|
-
|
|
72834
|
-
|
|
72835
|
-
|
|
72836
|
-
|
|
72837
|
-
|
|
72838
|
-
|
|
72839
|
-
|
|
72840
|
-
|
|
72841
|
-
|
|
72842
|
-
|
|
72843
|
-
|
|
72844
|
-
|
|
72845
|
-
|
|
72846
|
-
|
|
72847
|
-
|
|
72848
|
-
|
|
72849
|
-
|
|
72850
|
-
|
|
72851
|
-
|
|
72852
|
-
|
|
72853
|
-
|
|
72854
|
-
|
|
72855
|
-
|
|
72856
|
-
|
|
72857
|
-
|
|
72858
|
-
|
|
72859
|
-
|
|
72860
|
-
|
|
72861
|
-
|
|
72862
|
-
|
|
72863
|
-
|
|
72864
|
-
|
|
72865
|
-
|
|
72866
|
-
|
|
72867
|
-
|
|
72868
|
-
|
|
72869
|
-
cancelled = true;
|
|
72870
|
-
};
|
|
72871
|
-
}, [
|
|
72872
|
-
companyId,
|
|
72873
|
-
dateRange.endKey,
|
|
72874
|
-
dateRange.startKey,
|
|
72875
|
-
lineIdsKey,
|
|
72876
|
-
scopedLineIds,
|
|
72877
|
-
supabase,
|
|
72878
|
-
trendMode
|
|
72879
|
-
]);
|
|
72880
|
-
React141__default.useEffect(() => {
|
|
72881
|
-
if (!supabase || !companyId) return void 0;
|
|
72882
|
-
if (scopedLineIds.length === 0) {
|
|
72883
|
-
setIdleReasonScope(null);
|
|
72884
|
-
setIdleReasonBreakdown([]);
|
|
72885
|
-
setIsIdleReasonBreakdownLoading(false);
|
|
72886
|
-
return void 0;
|
|
72887
|
-
}
|
|
72888
|
-
let cancelled = false;
|
|
72889
|
-
setIdleReasonScope(null);
|
|
72890
|
-
setIdleReasonBreakdown([]);
|
|
72891
|
-
setIsIdleReasonBreakdownLoading(true);
|
|
72892
|
-
const fetchIdleReasonBreakdown = async () => {
|
|
72893
|
-
const params = new URLSearchParams({
|
|
72894
|
-
company_id: companyId,
|
|
72895
|
-
start_date: dateRange.startKey,
|
|
72896
|
-
end_date: dateRange.endKey,
|
|
72897
|
-
trend_shift_mode: trendMode,
|
|
72898
|
-
line_ids: scopedLineIds.join(",")
|
|
72899
|
-
});
|
|
72900
|
-
const response = await fetchBackendJson(
|
|
72901
|
-
supabase,
|
|
72902
|
-
`/api/dashboard/operations-overview/idle-reason-breakdown?${params.toString()}`
|
|
72903
|
-
);
|
|
72904
|
-
if (!cancelled) {
|
|
72905
|
-
setIdleReasonScope(response.scope || null);
|
|
72906
|
-
setIdleReasonBreakdown(response.idle_reason_breakdown || []);
|
|
72907
|
-
}
|
|
72908
|
-
};
|
|
72909
|
-
fetchIdleReasonBreakdown().catch((error) => {
|
|
72910
|
-
console.error("[PlantHeadView] Failed to fetch idle reason breakdown", error);
|
|
72911
|
-
if (!cancelled) {
|
|
72912
|
-
setIdleReasonScope(null);
|
|
72913
|
-
setIdleReasonBreakdown([]);
|
|
72914
|
-
}
|
|
72915
|
-
}).finally(() => {
|
|
72916
|
-
if (!cancelled) {
|
|
72917
|
-
setIsIdleReasonBreakdownLoading(false);
|
|
72918
|
-
}
|
|
72919
|
-
});
|
|
72920
|
-
return () => {
|
|
72921
|
-
cancelled = true;
|
|
72922
|
-
};
|
|
72923
|
-
}, [
|
|
72924
|
-
companyId,
|
|
72925
|
-
dateRange.endKey,
|
|
72926
|
-
dateRange.startKey,
|
|
72927
|
-
lineIdsKey,
|
|
72928
|
-
scopedLineIds,
|
|
72929
|
-
supabase,
|
|
72930
|
-
trendMode
|
|
72931
|
-
]);
|
|
72932
|
-
React141__default.useEffect(() => {
|
|
72933
|
-
if (!supabase || !companyId) return void 0;
|
|
72934
|
-
if (scopedLineIds.length === 0) {
|
|
72935
|
-
setImprovements([]);
|
|
72936
|
-
setIsImprovementsLoading(false);
|
|
72937
|
-
return void 0;
|
|
72938
|
-
}
|
|
72939
|
-
let cancelled = false;
|
|
72940
|
-
setIsImprovementsLoading(true);
|
|
72941
|
-
const fetchImprovements = async () => {
|
|
72942
|
-
const params = new URLSearchParams({
|
|
72943
|
-
company_id: companyId,
|
|
72944
|
-
status: "open",
|
|
72945
|
-
limit: "200",
|
|
72946
|
-
line_ids: scopedLineIds.join(",")
|
|
72947
|
-
});
|
|
72948
|
-
const response = await fetchBackendJson(
|
|
72949
|
-
supabase,
|
|
72950
|
-
`/api/improvement-center/recommendations?${params.toString()}`
|
|
72951
|
-
);
|
|
72952
|
-
if (cancelled) return;
|
|
72953
|
-
const allowedLineIds = new Set(scopedLineIds);
|
|
72954
|
-
const scopedRecommendations = (response.recommendations || []).filter((recommendation) => {
|
|
72955
|
-
return !recommendation.line_id || allowedLineIds.has(recommendation.line_id);
|
|
72956
|
-
});
|
|
72957
|
-
const nextImprovements = [...scopedRecommendations].sort(compareImprovementRecommendationPriority).slice(0, 3).map((recommendation) => ({
|
|
72958
|
-
id: recommendation.issue_id || recommendation.id,
|
|
72959
|
-
issueId: recommendation.issue_id || recommendation.id,
|
|
72960
|
-
issueNumber: recommendation.issue_number,
|
|
72961
|
-
title: recommendation.title?.trim() || "Untitled issue",
|
|
72962
|
-
metric: buildImprovementMetric(recommendation),
|
|
72963
|
-
location: recommendation.location,
|
|
72964
|
-
line: recommendation.line,
|
|
72965
|
-
lineId: recommendation.line_id,
|
|
72966
|
-
workspaceId: recommendation.workspace_id
|
|
72967
|
-
}));
|
|
72968
|
-
setImprovements(nextImprovements);
|
|
72969
|
-
};
|
|
72970
|
-
fetchImprovements().catch((error) => {
|
|
72971
|
-
console.error("[PlantHeadView] Failed to fetch improvements", error);
|
|
72972
|
-
if (!cancelled) {
|
|
72973
|
-
setImprovements([]);
|
|
72974
|
-
}
|
|
72975
|
-
}).finally(() => {
|
|
72976
|
-
if (!cancelled) {
|
|
72977
|
-
setIsImprovementsLoading(false);
|
|
72978
|
-
}
|
|
72979
|
-
});
|
|
72980
|
-
return () => {
|
|
72981
|
-
cancelled = true;
|
|
72982
|
-
};
|
|
72983
|
-
}, [companyId, lineIdsKey, scopedLineIds, supabase]);
|
|
72984
|
-
const availableLineModes = overview.scope?.available_line_modes;
|
|
72985
|
-
React141__default.useEffect(() => {
|
|
72986
|
-
const hasOutput = !!availableLineModes?.has_output;
|
|
72987
|
-
const hasUptime = !!availableLineModes?.has_uptime;
|
|
72988
|
-
if (hasOutput && !hasUptime && poorestLineMode !== "output") {
|
|
72989
|
-
setPoorestLineMode("output");
|
|
72990
|
-
} else if (hasUptime && !hasOutput && poorestLineMode !== "uptime") {
|
|
72991
|
-
setPoorestLineMode("uptime");
|
|
72992
|
-
}
|
|
72993
|
-
}, [availableLineModes?.has_output, availableLineModes?.has_uptime, poorestLineMode]);
|
|
72994
|
-
const comparisonLabel = React141__default.useMemo(
|
|
72995
|
-
() => formatComparisonWindow(overview.scope?.current_range?.day_count ?? null),
|
|
72996
|
-
[overview.scope?.current_range?.day_count]
|
|
72997
|
-
);
|
|
74682
|
+
return /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0 shadow-sm", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3 relative", children: [
|
|
74683
|
+
/* @__PURE__ */ jsx("div", { className: "sm:hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
74684
|
+
mobileMenuContext ? /* @__PURE__ */ jsx(
|
|
74685
|
+
HamburgerButton,
|
|
74686
|
+
{
|
|
74687
|
+
onClick: mobileMenuContext.onMobileMenuOpen,
|
|
74688
|
+
className: "flex-shrink-0 -ml-1"
|
|
74689
|
+
}
|
|
74690
|
+
) : /* @__PURE__ */ jsx("div", { className: "w-8 flex-shrink-0" }),
|
|
74691
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col items-center justify-center", children: [
|
|
74692
|
+
/* @__PURE__ */ jsx("h1", { className: "text-lg font-semibold text-gray-900 text-center px-1 truncate max-w-[200px]", children: "Operations Overview" }),
|
|
74693
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-slate-500 text-center mt-0.5", children: mobileSubtitle })
|
|
74694
|
+
] }),
|
|
74695
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 flex items-center gap-1.5", children: [
|
|
74696
|
+
/* @__PURE__ */ jsx(
|
|
74697
|
+
MonthlyRangeFilter_default,
|
|
74698
|
+
{
|
|
74699
|
+
month: parseDateKeyToDate(dateRange.startKey).getMonth(),
|
|
74700
|
+
year: parseDateKeyToDate(dateRange.startKey).getFullYear(),
|
|
74701
|
+
timezone: appTimezone,
|
|
74702
|
+
value: dateRange,
|
|
74703
|
+
onChange: onDateRangeChange,
|
|
74704
|
+
showLabel: false
|
|
74705
|
+
}
|
|
74706
|
+
),
|
|
74707
|
+
/* @__PURE__ */ jsxs(
|
|
74708
|
+
"button",
|
|
74709
|
+
{
|
|
74710
|
+
ref: mobileFilterButtonRef,
|
|
74711
|
+
onClick: handleFilterToggle,
|
|
74712
|
+
className: `p-2 rounded-full transition-colors relative ${isFilterOpen || trendMode !== "all" ? "bg-blue-50" : "active:bg-gray-100"}`,
|
|
74713
|
+
"aria-label": "Open filters",
|
|
74714
|
+
children: [
|
|
74715
|
+
/* @__PURE__ */ jsx(Filter, { className: `w-5 h-5 ${trendMode !== "all" ? "text-blue-600" : "text-gray-700"}` }),
|
|
74716
|
+
trendMode !== "all" ? /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 flex items-center justify-center w-4 h-4 bg-blue-600 text-white text-[10px] rounded-full font-bold", children: "1" }) : null
|
|
74717
|
+
]
|
|
74718
|
+
}
|
|
74719
|
+
)
|
|
74720
|
+
] })
|
|
74721
|
+
] }) }),
|
|
74722
|
+
/* @__PURE__ */ jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center relative min-h-[56px]", children: [
|
|
74723
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute left-1/2 -translate-x-1/2 flex flex-col items-center pointer-events-none", children: [
|
|
74724
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl md:text-3xl lg:text-4xl font-semibold text-gray-900 tracking-tight text-center pointer-events-auto leading-tight mb-0.5", children: "Operations Overview" }),
|
|
74725
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium text-slate-500 text-center pointer-events-auto", children: desktopSubtitle })
|
|
74726
|
+
] }),
|
|
74727
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute right-0 flex items-center gap-3", children: [
|
|
74728
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(
|
|
74729
|
+
MonthlyRangeFilter_default,
|
|
74730
|
+
{
|
|
74731
|
+
month: parseDateKeyToDate(dateRange.startKey).getMonth(),
|
|
74732
|
+
year: parseDateKeyToDate(dateRange.startKey).getFullYear(),
|
|
74733
|
+
timezone: appTimezone,
|
|
74734
|
+
value: dateRange,
|
|
74735
|
+
onChange: onDateRangeChange,
|
|
74736
|
+
showLabel: false
|
|
74737
|
+
}
|
|
74738
|
+
) }),
|
|
74739
|
+
/* @__PURE__ */ jsxs(
|
|
74740
|
+
"button",
|
|
74741
|
+
{
|
|
74742
|
+
ref: filterButtonRef,
|
|
74743
|
+
onClick: handleFilterToggle,
|
|
74744
|
+
className: `flex items-center gap-2 px-3 py-1.5 rounded-lg border text-sm font-medium transition-all shadow-sm ${isFilterOpen || trendMode !== "all" ? "border-blue-500 bg-blue-50 text-blue-700 ring-1 ring-blue-500" : "border-slate-200 bg-white text-slate-700 hover:bg-slate-50"}`,
|
|
74745
|
+
"aria-label": "Open filters",
|
|
74746
|
+
children: [
|
|
74747
|
+
/* @__PURE__ */ jsx(Filter, { className: `w-[18px] h-[18px] ${trendMode !== "all" ? "text-blue-600" : "text-slate-500"}` }),
|
|
74748
|
+
"Filters",
|
|
74749
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: `w-4 h-4 ml-0.5 transition-transform duration-200 ${isFilterOpen ? "rotate-180" : ""}` })
|
|
74750
|
+
]
|
|
74751
|
+
}
|
|
74752
|
+
)
|
|
74753
|
+
] })
|
|
74754
|
+
] }) }),
|
|
74755
|
+
isFilterOpen ? /* @__PURE__ */ jsxs("div", { ref: filterRef, className: "absolute right-3 sm:right-4 md:right-5 lg:right-6 top-full mt-2 w-72 bg-white rounded-xl shadow-xl border border-gray-100 p-4 z-50", children: [
|
|
74756
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
74757
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Filter View" }),
|
|
74758
|
+
trendMode !== "all" ? /* @__PURE__ */ jsx(
|
|
74759
|
+
"button",
|
|
74760
|
+
{
|
|
74761
|
+
onClick: () => {
|
|
74762
|
+
onTrendModeChange("all");
|
|
74763
|
+
setIsFilterOpen(false);
|
|
74764
|
+
},
|
|
74765
|
+
className: "text-xs text-red-600 hover:text-red-700 font-medium",
|
|
74766
|
+
children: "Clear all"
|
|
74767
|
+
}
|
|
74768
|
+
) : null
|
|
74769
|
+
] }),
|
|
74770
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
74771
|
+
/* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide ml-1", children: "Shift" }),
|
|
74772
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs(
|
|
74773
|
+
"select",
|
|
74774
|
+
{
|
|
74775
|
+
value: trendMode,
|
|
74776
|
+
onChange: handleTrendModeChange,
|
|
74777
|
+
className: "w-full appearance-none pl-3 pr-8 py-2 text-sm bg-gray-50 border border-gray-200 hover:border-gray-300 rounded-lg text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white transition-all cursor-pointer",
|
|
74778
|
+
style: {
|
|
74779
|
+
backgroundImage: `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,
|
|
74780
|
+
backgroundPosition: "right 0.75rem center",
|
|
74781
|
+
backgroundRepeat: "no-repeat",
|
|
74782
|
+
backgroundSize: "1.2em 1.2em"
|
|
74783
|
+
},
|
|
74784
|
+
children: [
|
|
74785
|
+
/* @__PURE__ */ jsx("option", { value: "all", children: "All Shifts" }),
|
|
74786
|
+
/* @__PURE__ */ jsx("option", { value: "day", children: "Day Shift" }),
|
|
74787
|
+
/* @__PURE__ */ jsx("option", { value: "night", children: "Night Shift" })
|
|
74788
|
+
]
|
|
74789
|
+
}
|
|
74790
|
+
) })
|
|
74791
|
+
] }) })
|
|
74792
|
+
] }) : null
|
|
74793
|
+
] }) });
|
|
74794
|
+
});
|
|
74795
|
+
OperationsOverviewHeader.displayName = "OperationsOverviewHeader";
|
|
74796
|
+
var OverviewSummaryCards = React141__default.memo(({ store }) => {
|
|
74797
|
+
bumpRenderCounter();
|
|
74798
|
+
const scope = useOperationsOverviewScope(store);
|
|
74799
|
+
const snapshot = useOperationsOverviewSnapshot(store);
|
|
74800
|
+
const showSnapshotSkeleton = snapshot.loading && !snapshot.hasLoadedOnce;
|
|
74801
|
+
const comparisonLabel = React141__default.useMemo(() => {
|
|
74802
|
+
return formatComparisonWindow(
|
|
74803
|
+
scope.previous_range?.day_count ?? null,
|
|
74804
|
+
scope.comparison_strategy
|
|
74805
|
+
);
|
|
74806
|
+
}, [scope.comparison_strategy, scope.previous_range?.day_count]);
|
|
74807
|
+
const [isIdleContributorsOpen, setIsIdleContributorsOpen] = React141__default.useState(false);
|
|
74808
|
+
const [isIdleContributorsPinned, setIsIdleContributorsPinned] = React141__default.useState(false);
|
|
74809
|
+
const idleContributorsRef = React141__default.useRef(null);
|
|
72998
74810
|
const plantEfficiencyBadge = React141__default.useMemo(() => {
|
|
72999
|
-
return buildDeltaBadge(
|
|
74811
|
+
return buildDeltaBadge(snapshot.data.summary.plant_efficiency?.delta_pp, {
|
|
73000
74812
|
positiveIsGood: true,
|
|
73001
74813
|
formatter: (value) => `${value >= 0 ? "+" : ""}${roundOne(value)}%`,
|
|
73002
74814
|
comparisonLabel
|
|
73003
74815
|
});
|
|
73004
|
-
}, [comparisonLabel,
|
|
74816
|
+
}, [comparisonLabel, snapshot.data.summary.plant_efficiency?.delta_pp]);
|
|
73005
74817
|
const idleBadge = React141__default.useMemo(() => {
|
|
73006
|
-
return buildDeltaBadge(
|
|
74818
|
+
return buildDeltaBadge(snapshot.data.summary.avg_idle_per_workstation?.delta_seconds, {
|
|
73007
74819
|
positiveIsGood: false,
|
|
73008
74820
|
formatter: (value) => formatSignedIdleDuration(value),
|
|
73009
74821
|
comparisonLabel
|
|
73010
74822
|
});
|
|
73011
|
-
}, [comparisonLabel,
|
|
74823
|
+
}, [comparisonLabel, snapshot.data.summary.avg_idle_per_workstation?.delta_seconds]);
|
|
73012
74824
|
const canInspectIdleContributors = React141__default.useMemo(() => {
|
|
73013
|
-
return !
|
|
73014
|
-
}, [
|
|
74825
|
+
return !showSnapshotSkeleton && snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== null && snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== void 0;
|
|
74826
|
+
}, [showSnapshotSkeleton, snapshot.data.summary.avg_idle_per_workstation?.current_seconds]);
|
|
73015
74827
|
const idleTopContributors = React141__default.useMemo(() => {
|
|
73016
|
-
return (
|
|
74828
|
+
return (snapshot.data.summary.avg_idle_per_workstation?.top_contributors || []).map((item) => ({
|
|
73017
74829
|
workspaceId: item.workspace_id || "",
|
|
73018
74830
|
workspaceName: item.workspace_name?.trim() || item.workspace_id || "Unknown",
|
|
73019
|
-
lineId: item.line_id || "",
|
|
73020
74831
|
lineName: item.line_name?.trim() || "Unknown Line",
|
|
73021
74832
|
avgIdleSeconds: toNumber3(item.avg_idle_seconds)
|
|
73022
74833
|
})).slice(0, 5);
|
|
73023
|
-
}, [
|
|
74834
|
+
}, [snapshot.data.summary.avg_idle_per_workstation?.top_contributors]);
|
|
73024
74835
|
const showIdleContributorLineNames = React141__default.useMemo(() => {
|
|
73025
|
-
return (
|
|
73026
|
-
}, [
|
|
74836
|
+
return (scope.line_count ?? 0) > 1;
|
|
74837
|
+
}, [scope.line_count]);
|
|
73027
74838
|
const closeIdleContributors = React141__default.useCallback(() => {
|
|
73028
74839
|
setIsIdleContributorsOpen(false);
|
|
73029
74840
|
setIsIdleContributorsPinned(false);
|
|
73030
74841
|
}, []);
|
|
73031
74842
|
const handleIdleContributorsToggle = React141__default.useCallback(() => {
|
|
73032
74843
|
if (!canInspectIdleContributors) return;
|
|
73033
|
-
setIsIdleContributorsPinned((
|
|
73034
|
-
const next = !
|
|
74844
|
+
setIsIdleContributorsPinned((previous) => {
|
|
74845
|
+
const next = !previous;
|
|
73035
74846
|
setIsIdleContributorsOpen(next);
|
|
73036
74847
|
return next;
|
|
73037
74848
|
});
|
|
@@ -73048,6 +74859,10 @@ var PlantHeadView = () => {
|
|
|
73048
74859
|
closeIdleContributors();
|
|
73049
74860
|
}
|
|
73050
74861
|
}, [canInspectIdleContributors, closeIdleContributors, handleIdleContributorsToggle]);
|
|
74862
|
+
React141__default.useEffect(() => {
|
|
74863
|
+
setIsIdleContributorsOpen(false);
|
|
74864
|
+
setIsIdleContributorsPinned(false);
|
|
74865
|
+
}, [scope.comparison_strategy, scope.current_range?.start_date, scope.current_range?.end_date, scope.line_count, scope.shift_mode]);
|
|
73051
74866
|
React141__default.useEffect(() => {
|
|
73052
74867
|
if (!isIdleContributorsOpen) return void 0;
|
|
73053
74868
|
const handleClickOutside = (event) => {
|
|
@@ -73070,14 +74885,298 @@ var PlantHeadView = () => {
|
|
|
73070
74885
|
document.removeEventListener("keydown", handleEscape);
|
|
73071
74886
|
};
|
|
73072
74887
|
}, [closeIdleContributors, isIdleContributorsOpen, isIdleContributorsPinned]);
|
|
74888
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [
|
|
74889
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 p-4 md:p-5 flex flex-col justify-center min-h-[100px] text-left", children: [
|
|
74890
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-between items-center mb-1", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Overall Efficiency" }) }),
|
|
74891
|
+
showSnapshotSkeleton ? /* @__PURE__ */ jsx(OverviewMetricCardSkeleton, {}) : snapshot.data.summary.plant_efficiency?.current !== null && snapshot.data.summary.plant_efficiency?.current !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
74892
|
+
/* @__PURE__ */ jsxs("span", { className: "text-2xl sm:text-3xl font-bold text-slate-800 tracking-tight", children: [
|
|
74893
|
+
roundOne(snapshot.data.summary.plant_efficiency.current),
|
|
74894
|
+
"%"
|
|
74895
|
+
] }),
|
|
74896
|
+
/* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${plantEfficiencyBadge.className}`, children: [
|
|
74897
|
+
plantEfficiencyBadge.icon === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : plantEfficiencyBadge.icon === "down" ? /* @__PURE__ */ jsx(ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
74898
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium", children: plantEfficiencyBadge.text })
|
|
74899
|
+
] })
|
|
74900
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No efficiency data available" })
|
|
74901
|
+
] }),
|
|
74902
|
+
/* @__PURE__ */ jsxs(
|
|
74903
|
+
"div",
|
|
74904
|
+
{
|
|
74905
|
+
ref: idleContributorsRef,
|
|
74906
|
+
"data-testid": "idle-kpi-card-region",
|
|
74907
|
+
className: "relative",
|
|
74908
|
+
onMouseEnter: () => {
|
|
74909
|
+
if (canInspectIdleContributors) {
|
|
74910
|
+
setIsIdleContributorsOpen(true);
|
|
74911
|
+
}
|
|
74912
|
+
},
|
|
74913
|
+
onMouseLeave: () => {
|
|
74914
|
+
if (!isIdleContributorsPinned) {
|
|
74915
|
+
setIsIdleContributorsOpen(false);
|
|
74916
|
+
}
|
|
74917
|
+
},
|
|
74918
|
+
onFocus: () => {
|
|
74919
|
+
if (canInspectIdleContributors) {
|
|
74920
|
+
setIsIdleContributorsOpen(true);
|
|
74921
|
+
}
|
|
74922
|
+
},
|
|
74923
|
+
onBlur: (event) => {
|
|
74924
|
+
if (isIdleContributorsPinned) return;
|
|
74925
|
+
const nextTarget = event.relatedTarget;
|
|
74926
|
+
if (nextTarget && idleContributorsRef.current?.contains(nextTarget)) return;
|
|
74927
|
+
setIsIdleContributorsOpen(false);
|
|
74928
|
+
},
|
|
74929
|
+
children: [
|
|
74930
|
+
/* @__PURE__ */ jsxs(
|
|
74931
|
+
"div",
|
|
74932
|
+
{
|
|
74933
|
+
"data-testid": "idle-kpi-card",
|
|
74934
|
+
role: canInspectIdleContributors ? "button" : void 0,
|
|
74935
|
+
tabIndex: canInspectIdleContributors ? 0 : -1,
|
|
74936
|
+
"aria-controls": canInspectIdleContributors ? "idle-kpi-popover" : void 0,
|
|
74937
|
+
"aria-expanded": canInspectIdleContributors ? isIdleContributorsOpen : void 0,
|
|
74938
|
+
className: `bg-white rounded-xl border p-4 md:p-5 flex flex-col justify-center min-h-[100px] text-left transition-all ${canInspectIdleContributors ? "cursor-pointer hover:shadow-md focus:outline-none focus:ring-2 focus:ring-indigo-200" : ""} ${isIdleContributorsOpen ? "shadow-md border-indigo-100" : "shadow-sm border-slate-100"}`,
|
|
74939
|
+
onClick: handleIdleContributorsToggle,
|
|
74940
|
+
onKeyDown: handleIdleContributorsKeyDown,
|
|
74941
|
+
children: [
|
|
74942
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Idle Time per Workstation" }) }),
|
|
74943
|
+
showSnapshotSkeleton ? /* @__PURE__ */ jsx(OverviewMetricCardSkeleton, {}) : snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== null && snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
74944
|
+
/* @__PURE__ */ jsx("span", { className: "text-2xl sm:text-3xl font-bold text-slate-800 tracking-tight", children: formatIdleDuration(snapshot.data.summary.avg_idle_per_workstation.current_seconds) }),
|
|
74945
|
+
/* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${idleBadge.className}`, children: [
|
|
74946
|
+
idleBadge.icon === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : idleBadge.icon === "down" ? /* @__PURE__ */ jsx(ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
74947
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium", children: idleBadge.text })
|
|
74948
|
+
] })
|
|
74949
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No idle time data available" })
|
|
74950
|
+
]
|
|
74951
|
+
}
|
|
74952
|
+
),
|
|
74953
|
+
canInspectIdleContributors && isIdleContributorsOpen ? /* @__PURE__ */ jsxs(
|
|
74954
|
+
"div",
|
|
74955
|
+
{
|
|
74956
|
+
id: "idle-kpi-popover",
|
|
74957
|
+
"data-testid": "idle-kpi-popover",
|
|
74958
|
+
className: "absolute left-0 right-0 top-full z-20 mt-2 bg-white p-4 border border-gray-100 shadow-xl rounded-xl sm:left-auto sm:right-0 sm:w-[320px] min-w-[280px]",
|
|
74959
|
+
children: [
|
|
74960
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pb-3 mb-3 border-b border-slate-100", children: [
|
|
74961
|
+
/* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full flex-shrink-0 bg-red-500" }),
|
|
74962
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-slate-800 text-[15px]", children: "Idle Time per Workstation" })
|
|
74963
|
+
] }),
|
|
74964
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
74965
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3", children: "TOP CONTRIBUTORS" }),
|
|
74966
|
+
idleTopContributors.length > 0 ? /* @__PURE__ */ jsx("div", { className: "space-y-2.5", children: idleTopContributors.map((contributor, index) => /* @__PURE__ */ jsxs(
|
|
74967
|
+
"div",
|
|
74968
|
+
{
|
|
74969
|
+
className: "flex items-start justify-between gap-3",
|
|
74970
|
+
children: [
|
|
74971
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
74972
|
+
/* @__PURE__ */ jsx("div", { className: "text-slate-600 text-[13px] truncate", title: contributor.workspaceName, children: contributor.workspaceName }),
|
|
74973
|
+
showIdleContributorLineNames && contributor.lineName ? /* @__PURE__ */ jsx("div", { className: "text-[11px] font-medium text-slate-400 truncate", title: contributor.lineName, children: contributor.lineName }) : null
|
|
74974
|
+
] }),
|
|
74975
|
+
/* @__PURE__ */ jsx("div", { className: "text-slate-500 text-[13px] text-right whitespace-nowrap", children: formatIdleDuration(contributor.avgIdleSeconds) })
|
|
74976
|
+
]
|
|
74977
|
+
},
|
|
74978
|
+
`${contributor.workspaceId || contributor.workspaceName}-${index}`
|
|
74979
|
+
)) }) : /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed border-slate-200 bg-slate-50 px-3 py-2 text-xs text-slate-500", children: "No workstation idle averages available for this range." })
|
|
74980
|
+
] })
|
|
74981
|
+
]
|
|
74982
|
+
}
|
|
74983
|
+
) : null
|
|
74984
|
+
]
|
|
74985
|
+
}
|
|
74986
|
+
)
|
|
74987
|
+
] });
|
|
74988
|
+
});
|
|
74989
|
+
OverviewSummaryCards.displayName = "OverviewSummaryCards";
|
|
74990
|
+
var PoorestPerformersCard = React141__default.memo(({
|
|
74991
|
+
store,
|
|
74992
|
+
supervisorsByLineId,
|
|
74993
|
+
onViewAll,
|
|
74994
|
+
onLineClick
|
|
74995
|
+
}) => {
|
|
74996
|
+
bumpRenderCounter();
|
|
74997
|
+
const scope = useOperationsOverviewScope(store);
|
|
74998
|
+
const snapshot = useOperationsOverviewSnapshot(store);
|
|
74999
|
+
const [poorestLineMode, setPoorestLineMode] = React141__default.useState("output");
|
|
75000
|
+
const availableLineModes = scope.available_line_modes;
|
|
75001
|
+
React141__default.useEffect(() => {
|
|
75002
|
+
const hasOutput = !!availableLineModes?.has_output;
|
|
75003
|
+
const hasUptime = !!availableLineModes?.has_uptime;
|
|
75004
|
+
if (hasOutput && !hasUptime && poorestLineMode !== "output") {
|
|
75005
|
+
setPoorestLineMode("output");
|
|
75006
|
+
} else if (hasUptime && !hasOutput && poorestLineMode !== "uptime") {
|
|
75007
|
+
setPoorestLineMode("uptime");
|
|
75008
|
+
}
|
|
75009
|
+
}, [availableLineModes?.has_output, availableLineModes?.has_uptime, poorestLineMode]);
|
|
75010
|
+
const comparisonLabel = React141__default.useMemo(() => {
|
|
75011
|
+
return formatComparisonWindow(
|
|
75012
|
+
scope.previous_range?.day_count ?? null,
|
|
75013
|
+
scope.comparison_strategy
|
|
75014
|
+
);
|
|
75015
|
+
}, [scope.comparison_strategy, scope.previous_range?.day_count]);
|
|
75016
|
+
const showSnapshotSkeleton = snapshot.loading && !snapshot.hasLoadedOnce;
|
|
75017
|
+
const mergedPoorestLines = React141__default.useMemo(() => {
|
|
75018
|
+
const rows = snapshot.data.poorest_lines?.[poorestLineMode] || [];
|
|
75019
|
+
return rows.slice(0, 3).map((line) => {
|
|
75020
|
+
const lineId = line.line_id || "";
|
|
75021
|
+
const supervisors = supervisorsByLineId.get(lineId) || [];
|
|
75022
|
+
const supervisor = supervisors[0];
|
|
75023
|
+
return {
|
|
75024
|
+
id: lineId,
|
|
75025
|
+
name: line.line_name?.trim() || "Unknown Line",
|
|
75026
|
+
efficiency: roundOne(toNumber3(line.avg_efficiency) || 0),
|
|
75027
|
+
previousEfficiency: toNumber3(line.previous_avg_efficiency),
|
|
75028
|
+
delta: toNumber3(line.delta_pp),
|
|
75029
|
+
supervisor: supervisor?.displayName || "Unassigned",
|
|
75030
|
+
supervisorImage: supervisor?.profilePhotoUrl ?? null
|
|
75031
|
+
};
|
|
75032
|
+
});
|
|
75033
|
+
}, [poorestLineMode, snapshot.data.poorest_lines, supervisorsByLineId]);
|
|
75034
|
+
const showPoorestModeToggle = !!availableLineModes?.has_output && !!availableLineModes?.has_uptime;
|
|
75035
|
+
const poorestMetricLabel = poorestLineMode === "uptime" ? "Uptime" : "Efficiency";
|
|
75036
|
+
const handlePoorestLineModeChange = React141__default.useCallback((mode) => {
|
|
75037
|
+
trackCoreEvent("Operations Overview Poorest Line Mode Changed", { mode });
|
|
75038
|
+
setPoorestLineMode(mode);
|
|
75039
|
+
}, []);
|
|
75040
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 flex flex-col overflow-hidden", children: [
|
|
75041
|
+
/* @__PURE__ */ jsxs("div", { className: "px-5 py-4 border-b border-slate-50 flex justify-between items-center gap-3 flex-wrap", children: [
|
|
75042
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
75043
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Poorest Performers" }),
|
|
75044
|
+
showPoorestModeToggle ? /* @__PURE__ */ jsxs("div", { className: "flex bg-slate-100 p-0.5 rounded-lg", children: [
|
|
75045
|
+
/* @__PURE__ */ jsx(
|
|
75046
|
+
"button",
|
|
75047
|
+
{
|
|
75048
|
+
type: "button",
|
|
75049
|
+
onClick: () => handlePoorestLineModeChange("output"),
|
|
75050
|
+
className: `px-3 py-1 text-[11px] font-bold rounded-md ${poorestLineMode === "output" ? "bg-white text-slate-800 shadow-sm" : "text-slate-500 hover:text-slate-800"}`,
|
|
75051
|
+
children: "Output"
|
|
75052
|
+
}
|
|
75053
|
+
),
|
|
75054
|
+
/* @__PURE__ */ jsx(
|
|
75055
|
+
"button",
|
|
75056
|
+
{
|
|
75057
|
+
type: "button",
|
|
75058
|
+
onClick: () => handlePoorestLineModeChange("uptime"),
|
|
75059
|
+
className: `px-3 py-1 text-[11px] font-bold rounded-md ${poorestLineMode === "uptime" ? "bg-white text-slate-800 shadow-sm" : "text-slate-500 hover:text-slate-800"}`,
|
|
75060
|
+
children: "Uptime"
|
|
75061
|
+
}
|
|
75062
|
+
)
|
|
75063
|
+
] }) : null
|
|
75064
|
+
] }),
|
|
75065
|
+
/* @__PURE__ */ jsx(
|
|
75066
|
+
"button",
|
|
75067
|
+
{
|
|
75068
|
+
type: "button",
|
|
75069
|
+
"aria-label": "View all",
|
|
75070
|
+
onClick: onViewAll,
|
|
75071
|
+
className: "inline-flex items-center justify-center rounded-md p-1 text-slate-500 hover:text-slate-800 transition-colors",
|
|
75072
|
+
children: /* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4 shrink-0", strokeWidth: 2.5, "aria-hidden": true })
|
|
75073
|
+
}
|
|
75074
|
+
)
|
|
75075
|
+
] }),
|
|
75076
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col p-0 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "divide-y divide-slate-50 flex-1 px-5", children: [
|
|
75077
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
75078
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold text-slate-400 text-[10px] uppercase tracking-wider min-w-[120px]", children: "Line" }),
|
|
75079
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold text-slate-400 text-[10px] uppercase tracking-wider text-left shrink-0 w-[110px] flex items-center justify-between", children: poorestMetricLabel })
|
|
75080
|
+
] }),
|
|
75081
|
+
showSnapshotSkeleton ? /* @__PURE__ */ jsx(OverviewListSkeleton, {}) : mergedPoorestLines.length > 0 ? mergedPoorestLines.map((line) => {
|
|
75082
|
+
const lineDelta = buildLineDeltaTone(line.delta, comparisonLabel);
|
|
75083
|
+
return /* @__PURE__ */ jsx(
|
|
75084
|
+
"div",
|
|
75085
|
+
{
|
|
75086
|
+
onClick: () => onLineClick(line.id, line.name),
|
|
75087
|
+
className: "block py-3 hover:bg-slate-50/50 transition-colors cursor-pointer group relative",
|
|
75088
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
75089
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
75090
|
+
/* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-full bg-slate-100 border border-slate-200 overflow-hidden flex-shrink-0", children: line.supervisorImage ? /* @__PURE__ */ jsx(
|
|
75091
|
+
"img",
|
|
75092
|
+
{
|
|
75093
|
+
src: line.supervisorImage,
|
|
75094
|
+
alt: line.supervisor,
|
|
75095
|
+
className: "w-full h-full object-cover"
|
|
75096
|
+
}
|
|
75097
|
+
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center text-[10px] font-bold text-slate-500", children: line.supervisor.split(" ").map((part) => part[0]).join("").slice(0, 2) }) }),
|
|
75098
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
75099
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }) }),
|
|
75100
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] text-slate-400 font-medium", children: line.supervisor }) })
|
|
75101
|
+
] })
|
|
75102
|
+
] }),
|
|
75103
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between shrink-0 w-[110px]", children: [
|
|
75104
|
+
/* @__PURE__ */ jsxs("div", { className: "text-[15px] leading-none font-bold text-slate-800", children: [
|
|
75105
|
+
line.efficiency,
|
|
75106
|
+
"%"
|
|
75107
|
+
] }),
|
|
75108
|
+
line.delta !== null && line.delta !== void 0 && Number.isFinite(line.delta) ? /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-0.5 px-2 py-0.5 rounded-full ${line.delta >= 0 ? "bg-[#ecfdf5] text-[#059669]" : "bg-[#FEF2F2] text-[#DC2626]"}`, children: [
|
|
75109
|
+
line.delta >= 0 ? /* @__PURE__ */ jsx(ArrowUp, { className: "w-3 h-3", strokeWidth: 2.5 }) : /* @__PURE__ */ jsx(ArrowDown, { className: "w-3 h-3", strokeWidth: 2.5 }),
|
|
75110
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] leading-none font-bold", children: lineDelta.text.split(" vs ")[0].replace("+", "") })
|
|
75111
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-slate-50 text-slate-400", children: /* @__PURE__ */ jsx("span", { className: "text-[11px] leading-none font-bold", children: "\u2014" }) })
|
|
75112
|
+
] })
|
|
75113
|
+
] })
|
|
75114
|
+
},
|
|
75115
|
+
line.id
|
|
75116
|
+
);
|
|
75117
|
+
}) : /* @__PURE__ */ jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: `No ${poorestLineMode} line data available` })
|
|
75118
|
+
] }) })
|
|
75119
|
+
] });
|
|
75120
|
+
});
|
|
75121
|
+
PoorestPerformersCard.displayName = "PoorestPerformersCard";
|
|
75122
|
+
var IdleBreakdownCard = React141__default.memo(({
|
|
75123
|
+
store,
|
|
75124
|
+
scopedLineCount
|
|
75125
|
+
}) => {
|
|
75126
|
+
bumpRenderCounter();
|
|
75127
|
+
const idle = useOperationsOverviewIdle(store);
|
|
75128
|
+
const showInitialSkeleton = idle.loading && idle.lastUpdated === null;
|
|
75129
|
+
const idleBreakdown = React141__default.useMemo(() => {
|
|
75130
|
+
return idle.data.map((item) => ({
|
|
75131
|
+
name: item.reason?.trim() || "Unknown",
|
|
75132
|
+
value: toNumber3(item.percentage) || 0,
|
|
75133
|
+
totalDurationSeconds: toNumber3(item.total_duration_seconds),
|
|
75134
|
+
efficiencyLossPercentage: toNumber3(item.efficiency_loss_percentage),
|
|
75135
|
+
contributors: (item.contributors || []).map((contributor) => ({
|
|
75136
|
+
workspaceId: contributor.workspace_id || "",
|
|
75137
|
+
workspaceName: contributor.workspace_name?.trim() || "Unknown",
|
|
75138
|
+
totalDurationSeconds: toNumber3(contributor.total_duration_seconds),
|
|
75139
|
+
percentageWithinReason: toNumber3(contributor.percentage_within_reason)
|
|
75140
|
+
}))
|
|
75141
|
+
})).filter((item) => item.value > 0);
|
|
75142
|
+
}, [idle.data]);
|
|
75143
|
+
const showIdleModuleNotEnabledState = React141__default.useMemo(() => {
|
|
75144
|
+
const enabledLineCount = idle.scope.idle_time_vlm_enabled_line_count;
|
|
75145
|
+
return !showInitialSkeleton && scopedLineCount > 0 && typeof enabledLineCount === "number" && enabledLineCount === 0;
|
|
75146
|
+
}, [idle.scope.idle_time_vlm_enabled_line_count, scopedLineCount, showInitialSkeleton]);
|
|
75147
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 flex flex-col overflow-hidden text-left", children: [
|
|
75148
|
+
/* @__PURE__ */ jsx("div", { className: "px-5 py-4 flex-none flex justify-between items-center border-b border-slate-50/50 relative", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Idle Time Breakdown" }) }),
|
|
75149
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 p-4 pt-2 relative", children: showInitialSkeleton ? /* @__PURE__ */ jsx(OverviewIdleBreakdownSkeleton, {}) : showIdleModuleNotEnabledState ? /* @__PURE__ */ jsx("div", { className: "h-full flex items-center justify-center rounded-xl border border-dashed border-slate-200 bg-slate-50/80 px-6 text-center", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
75150
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-slate-700", children: "Module not enabled" }),
|
|
75151
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-500", children: "Enable idle-time classification on at least one line to view this breakdown." })
|
|
75152
|
+
] }) }) : /* @__PURE__ */ jsx(
|
|
75153
|
+
IdleTimeReasonChart,
|
|
75154
|
+
{
|
|
75155
|
+
data: idleBreakdown,
|
|
75156
|
+
isLoading: false,
|
|
75157
|
+
hideTotalDuration: true,
|
|
75158
|
+
updateAnimation: "smooth"
|
|
75159
|
+
}
|
|
75160
|
+
) })
|
|
75161
|
+
] });
|
|
75162
|
+
});
|
|
75163
|
+
IdleBreakdownCard.displayName = "IdleBreakdownCard";
|
|
75164
|
+
var EfficiencyTrendCard = React141__default.memo(({
|
|
75165
|
+
store,
|
|
75166
|
+
dateRange,
|
|
75167
|
+
appTimezone
|
|
75168
|
+
}) => {
|
|
75169
|
+
bumpRenderCounter();
|
|
75170
|
+
const trend = useOperationsOverviewTrend(store);
|
|
73073
75171
|
const currentWeekRange = React141__default.useMemo(
|
|
73074
75172
|
() => getCurrentWeekToDateRange(appTimezone),
|
|
73075
75173
|
[appTimezone]
|
|
73076
75174
|
);
|
|
73077
75175
|
const isCurrentWeekToDateRange = dateRange.startKey === currentWeekRange.startKey && dateRange.endKey === currentWeekRange.endKey;
|
|
75176
|
+
const showInitialSkeleton = trend.loading && trend.lastUpdated === null;
|
|
73078
75177
|
const trendData = React141__default.useMemo(() => {
|
|
73079
75178
|
const pointsByDate = new Map(
|
|
73080
|
-
(
|
|
75179
|
+
(trend.data.points || []).flatMap((point) => {
|
|
73081
75180
|
if (!point.date) return [];
|
|
73082
75181
|
const pointDate = parseDateKeyToDate(point.date);
|
|
73083
75182
|
return [[point.date, {
|
|
@@ -73102,7 +75201,7 @@ var PlantHeadView = () => {
|
|
|
73102
75201
|
};
|
|
73103
75202
|
});
|
|
73104
75203
|
}
|
|
73105
|
-
return (
|
|
75204
|
+
return (trend.data.points || []).map((point) => {
|
|
73106
75205
|
const pointDate = point.date ? parseDateKeyToDate(point.date) : null;
|
|
73107
75206
|
return {
|
|
73108
75207
|
name: pointDate ? format(pointDate, "MMM d") : "",
|
|
@@ -73113,55 +75212,42 @@ var PlantHeadView = () => {
|
|
|
73113
75212
|
})()
|
|
73114
75213
|
};
|
|
73115
75214
|
});
|
|
73116
|
-
}, [currentWeekRange.startKey, isCurrentWeekToDateRange,
|
|
73117
|
-
const trendPlayKey = React141__default.useMemo(() => {
|
|
73118
|
-
return `${trendViewOpenNonce}:${trendFetchNonce}`;
|
|
73119
|
-
}, [trendFetchNonce, trendViewOpenNonce]);
|
|
73120
|
-
const idleBreakdown = React141__default.useMemo(() => {
|
|
73121
|
-
return idleReasonBreakdown.map((item) => ({
|
|
73122
|
-
name: item.reason?.trim() || "Unknown",
|
|
73123
|
-
value: toNumber3(item.percentage) || 0,
|
|
73124
|
-
totalDurationSeconds: toNumber3(item.total_duration_seconds),
|
|
73125
|
-
efficiencyLossPercentage: toNumber3(item.efficiency_loss_percentage),
|
|
73126
|
-
contributors: (item.contributors || []).map((contributor) => ({
|
|
73127
|
-
workspaceId: contributor.workspace_id || "",
|
|
73128
|
-
workspaceName: contributor.workspace_name?.trim() || "Unknown",
|
|
73129
|
-
totalDurationSeconds: toNumber3(contributor.total_duration_seconds),
|
|
73130
|
-
percentageWithinReason: toNumber3(contributor.percentage_within_reason)
|
|
73131
|
-
}))
|
|
73132
|
-
})).filter((item) => item.value > 0);
|
|
73133
|
-
}, [idleReasonBreakdown]);
|
|
73134
|
-
const showIdleModuleNotEnabledState = React141__default.useMemo(() => {
|
|
73135
|
-
const enabledLineCount = idleReasonScope?.idle_time_vlm_enabled_line_count;
|
|
73136
|
-
return !isIdleReasonBreakdownLoading && scopedLineIds.length > 0 && typeof enabledLineCount === "number" && enabledLineCount === 0;
|
|
73137
|
-
}, [idleReasonScope?.idle_time_vlm_enabled_line_count, isIdleReasonBreakdownLoading, scopedLineIds.length]);
|
|
73138
|
-
const mergedPoorestLines = React141__default.useMemo(() => {
|
|
73139
|
-
const rows = overview.poorest_lines?.[poorestLineMode] || [];
|
|
73140
|
-
return rows.slice(0, 3).map((line) => {
|
|
73141
|
-
const lineId = line.line_id || "";
|
|
73142
|
-
const supervisors = supervisorsByLineId.get(lineId) || [];
|
|
73143
|
-
const supervisor = supervisors[0];
|
|
73144
|
-
return {
|
|
73145
|
-
id: lineId,
|
|
73146
|
-
name: line.line_name?.trim() || "Unknown Line",
|
|
73147
|
-
efficiency: roundOne(toNumber3(line.avg_efficiency) || 0),
|
|
73148
|
-
previousEfficiency: toNumber3(line.previous_avg_efficiency),
|
|
73149
|
-
delta: toNumber3(line.delta_pp),
|
|
73150
|
-
supervisor: supervisor?.displayName || "Unassigned",
|
|
73151
|
-
supervisorImage: supervisor?.profilePhotoUrl ?? null
|
|
73152
|
-
};
|
|
73153
|
-
});
|
|
73154
|
-
}, [overview.poorest_lines, poorestLineMode, supervisorsByLineId]);
|
|
73155
|
-
const showPoorestModeToggle = !!availableLineModes?.has_output && !!availableLineModes?.has_uptime;
|
|
73156
|
-
availableLineModes?.has_uptime && !availableLineModes?.has_output ? "Uptime" : "Output";
|
|
73157
|
-
const poorestMetricLabel = poorestLineMode === "uptime" ? "Uptime" : "Efficiency";
|
|
75215
|
+
}, [currentWeekRange.startKey, isCurrentWeekToDateRange, trend.data.points]);
|
|
73158
75216
|
const trendTooltipLabelFormatter = React141__default.useCallback((label, payload) => {
|
|
73159
75217
|
const dayOfWeek = payload?.[0]?.payload?.dayOfWeek;
|
|
73160
75218
|
if (!dayOfWeek || typeof label !== "string") return label;
|
|
73161
75219
|
return `${label} (${dayOfWeek})`;
|
|
73162
75220
|
}, []);
|
|
75221
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-[0_2px_10px_-3px_rgba(6,81,237,0.1)] border border-slate-100 flex flex-col overflow-hidden text-left", children: [
|
|
75222
|
+
/* @__PURE__ */ jsx("div", { className: "px-6 py-5 flex-none flex justify-between items-center border-b border-slate-50/50", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Efficiency Trend" }) }),
|
|
75223
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 w-full p-4 pt-4 relative", children: showInitialSkeleton ? /* @__PURE__ */ jsx(OverviewChartSkeleton, {}) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pb-2 pr-4 pl-1", children: /* @__PURE__ */ jsx(
|
|
75224
|
+
LineChart,
|
|
75225
|
+
{
|
|
75226
|
+
data: trendData,
|
|
75227
|
+
lines: efficiencyLineConfig,
|
|
75228
|
+
xAxisDataKey: "name",
|
|
75229
|
+
yAxisUnit: "%",
|
|
75230
|
+
yAxisDomain: [0, 100],
|
|
75231
|
+
showLegend: false,
|
|
75232
|
+
showGrid: true,
|
|
75233
|
+
fillContainer: true,
|
|
75234
|
+
tooltipLabelFormatter: trendTooltipLabelFormatter
|
|
75235
|
+
}
|
|
75236
|
+
) }) })
|
|
75237
|
+
] });
|
|
75238
|
+
});
|
|
75239
|
+
EfficiencyTrendCard.displayName = "EfficiencyTrendCard";
|
|
75240
|
+
var TopImprovementsCard = React141__default.memo(({
|
|
75241
|
+
store,
|
|
75242
|
+
supervisorsByLineId,
|
|
75243
|
+
onViewAll,
|
|
75244
|
+
onItemClick
|
|
75245
|
+
}) => {
|
|
75246
|
+
bumpRenderCounter();
|
|
75247
|
+
const improvements = useOperationsOverviewImprovements(store);
|
|
75248
|
+
const showInitialSkeleton = improvements.loading && improvements.lastUpdated === null;
|
|
73163
75249
|
const displayImprovements = React141__default.useMemo(() => {
|
|
73164
|
-
return improvements.map((item) => {
|
|
75250
|
+
return improvements.data.map((item) => {
|
|
73165
75251
|
const supervisors = item.lineId ? supervisorsByLineId.get(item.lineId) || [] : [];
|
|
73166
75252
|
return {
|
|
73167
75253
|
...item,
|
|
@@ -73174,436 +75260,592 @@ var PlantHeadView = () => {
|
|
|
73174
75260
|
})
|
|
73175
75261
|
};
|
|
73176
75262
|
});
|
|
73177
|
-
}, [improvements, supervisorsByLineId]);
|
|
73178
|
-
|
|
73179
|
-
|
|
73180
|
-
|
|
75263
|
+
}, [improvements.data, supervisorsByLineId]);
|
|
75264
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 flex flex-col overflow-hidden", children: [
|
|
75265
|
+
/* @__PURE__ */ jsxs("div", { className: "px-5 py-4 flex-none flex justify-between items-center border-b border-slate-50/50", children: [
|
|
75266
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Top improvements" }),
|
|
75267
|
+
/* @__PURE__ */ jsx(
|
|
75268
|
+
"button",
|
|
75269
|
+
{
|
|
75270
|
+
type: "button",
|
|
75271
|
+
"aria-label": "View all",
|
|
75272
|
+
onClick: onViewAll,
|
|
75273
|
+
className: "inline-flex items-center justify-center rounded-md p-1 text-slate-500 hover:text-slate-800 transition-colors",
|
|
75274
|
+
children: /* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4 shrink-0", strokeWidth: 2.5, "aria-hidden": true })
|
|
75275
|
+
}
|
|
75276
|
+
)
|
|
75277
|
+
] }),
|
|
75278
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 p-0 flex flex-col px-5 py-2 justify-start overflow-auto", children: showInitialSkeleton ? /* @__PURE__ */ jsx(OverviewImprovementsSkeleton, {}) : displayImprovements.length > 0 ? displayImprovements.map((item) => /* @__PURE__ */ jsxs(
|
|
75279
|
+
"div",
|
|
75280
|
+
{
|
|
75281
|
+
"data-testid": `plant-head-improvement-${item.issueId}`,
|
|
75282
|
+
onClick: () => onItemClick(item),
|
|
75283
|
+
className: "flex items-center justify-between py-3 border-b border-slate-50 last:border-0 group cursor-pointer",
|
|
75284
|
+
children: [
|
|
75285
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0 pr-4", children: [
|
|
75286
|
+
item.ticketLabel ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full border border-indigo-100 bg-indigo-50 px-2 py-0.5 text-[10px] font-semibold text-indigo-600", children: item.ticketLabel }) }) : null,
|
|
75287
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
75288
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 min-w-0 mb-0.5", children: /* @__PURE__ */ jsx("h4", { className: "text-[13px] font-semibold text-slate-800 truncate transition-colors group-hover:text-indigo-600", children: item.title }) }),
|
|
75289
|
+
/* @__PURE__ */ jsx(
|
|
75290
|
+
"p",
|
|
75291
|
+
{
|
|
75292
|
+
className: "text-[10px] font-medium text-slate-400 truncate",
|
|
75293
|
+
title: item.metadataLabel,
|
|
75294
|
+
children: item.metadataLabel
|
|
75295
|
+
}
|
|
75296
|
+
)
|
|
75297
|
+
] })
|
|
75298
|
+
] }),
|
|
75299
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-end flex-shrink-0 ml-4", children: /* @__PURE__ */ jsx(
|
|
75300
|
+
"span",
|
|
75301
|
+
{
|
|
75302
|
+
className: `inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] ${item.metric.includes("pcs / day") || item.metric.includes("gain") ? "border-emerald-100 bg-emerald-50 text-emerald-700" : item.metric.includes("Idle") ? "border-amber-100 bg-amber-50 text-amber-700" : "border-slate-100 bg-slate-50 text-slate-600"}`,
|
|
75303
|
+
children: /* @__PURE__ */ jsx("span", { className: "font-semibold", children: item.metric })
|
|
75304
|
+
}
|
|
75305
|
+
) })
|
|
75306
|
+
]
|
|
75307
|
+
},
|
|
75308
|
+
item.id
|
|
75309
|
+
)) : /* @__PURE__ */ jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: "No open improvement issues" }) })
|
|
75310
|
+
] });
|
|
75311
|
+
});
|
|
75312
|
+
TopImprovementsCard.displayName = "TopImprovementsCard";
|
|
75313
|
+
var DEBUG_DASHBOARD_LOGS4 = process.env.NEXT_PUBLIC_DEBUG_DASHBOARD === "true";
|
|
75314
|
+
var debugRefreshLog = (message, payload) => {
|
|
75315
|
+
if (!DEBUG_DASHBOARD_LOGS4) return;
|
|
75316
|
+
if (payload) {
|
|
75317
|
+
console.log(`[OperationsOverviewRefresh] ${message}`, payload);
|
|
75318
|
+
return;
|
|
75319
|
+
}
|
|
75320
|
+
console.log(`[OperationsOverviewRefresh] ${message}`);
|
|
75321
|
+
};
|
|
75322
|
+
var isAbortError = (error) => {
|
|
75323
|
+
return error instanceof DOMException && error.name === "AbortError";
|
|
75324
|
+
};
|
|
75325
|
+
var toNumber4 = (value) => {
|
|
75326
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
75327
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
75328
|
+
const parsed = Number(value);
|
|
75329
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
75330
|
+
}
|
|
75331
|
+
return null;
|
|
75332
|
+
};
|
|
75333
|
+
var formatImprovementMetric = (recommendation) => {
|
|
75334
|
+
const estimatedGain = toNumber4(recommendation.estimated_gain_pieces);
|
|
75335
|
+
if (estimatedGain !== null && estimatedGain > 0) {
|
|
75336
|
+
return `+${Math.round(estimatedGain).toLocaleString()} pcs / day`;
|
|
75337
|
+
}
|
|
75338
|
+
const idleMinutes = toNumber4(recommendation.metrics?.idle_minutes);
|
|
75339
|
+
if (idleMinutes !== null) {
|
|
75340
|
+
return `-${Math.round(idleMinutes)}m Idle`;
|
|
75341
|
+
}
|
|
75342
|
+
const impactText = recommendation.impact?.trim();
|
|
75343
|
+
if (impactText) {
|
|
75344
|
+
return impactText.length > 22 ? `${impactText.slice(0, 22).trim()}...` : impactText;
|
|
75345
|
+
}
|
|
75346
|
+
return "Review Issue";
|
|
75347
|
+
};
|
|
75348
|
+
var normalizeImprovements2 = (recommendations, lineIds) => {
|
|
75349
|
+
const allowedLineIds = new Set(lineIds);
|
|
75350
|
+
const scopedRecommendations = (recommendations || []).filter((recommendation) => {
|
|
75351
|
+
return !recommendation.line_id || allowedLineIds.has(recommendation.line_id);
|
|
75352
|
+
});
|
|
75353
|
+
return [...scopedRecommendations].sort(compareImprovementRecommendationPriority).slice(0, 3).map((recommendation) => ({
|
|
75354
|
+
id: recommendation.issue_id || recommendation.id,
|
|
75355
|
+
issueId: recommendation.issue_id || recommendation.id,
|
|
75356
|
+
issueNumber: recommendation.issue_number,
|
|
75357
|
+
title: recommendation.title?.trim() || "Untitled issue",
|
|
75358
|
+
metric: formatImprovementMetric(recommendation),
|
|
75359
|
+
location: recommendation.location,
|
|
75360
|
+
line: recommendation.line,
|
|
75361
|
+
lineId: recommendation.line_id,
|
|
75362
|
+
workspaceId: recommendation.workspace_id
|
|
75363
|
+
}));
|
|
75364
|
+
};
|
|
75365
|
+
var useOperationsOverviewRefresh = ({
|
|
75366
|
+
store,
|
|
75367
|
+
supabase,
|
|
75368
|
+
companyId,
|
|
75369
|
+
lineIds,
|
|
75370
|
+
startKey,
|
|
75371
|
+
endKey,
|
|
75372
|
+
trendMode,
|
|
75373
|
+
comparisonStrategy,
|
|
75374
|
+
isLiveScope
|
|
75375
|
+
}) => {
|
|
75376
|
+
const lineIdsKey = React141__default.useMemo(() => lineIds.join(","), [lineIds]);
|
|
75377
|
+
const scopeSignature = React141__default.useMemo(
|
|
75378
|
+
() => [companyId || "", startKey, endKey, trendMode, comparisonStrategy || "", lineIdsKey].join("::"),
|
|
75379
|
+
[companyId, comparisonStrategy, endKey, lineIdsKey, startKey, trendMode]
|
|
75380
|
+
);
|
|
75381
|
+
const controllersRef = React141__default.useRef({});
|
|
75382
|
+
const requestIdsRef = React141__default.useRef({
|
|
75383
|
+
snapshot: 0,
|
|
75384
|
+
trend: 0,
|
|
75385
|
+
idle: 0,
|
|
75386
|
+
improvements: 0
|
|
75387
|
+
});
|
|
75388
|
+
const intervalRef = React141__default.useRef(null);
|
|
75389
|
+
const isPageActiveRef = React141__default.useRef(true);
|
|
75390
|
+
const lastResumeRefreshAtRef = React141__default.useRef(0);
|
|
75391
|
+
const abortAll = React141__default.useCallback(() => {
|
|
75392
|
+
Object.values(controllersRef.current).forEach((controller) => {
|
|
75393
|
+
controller?.abort();
|
|
75394
|
+
});
|
|
75395
|
+
controllersRef.current = {};
|
|
75396
|
+
}, []);
|
|
75397
|
+
React141__default.useEffect(() => {
|
|
75398
|
+
return () => {
|
|
75399
|
+
abortAll();
|
|
75400
|
+
};
|
|
75401
|
+
}, [abortAll]);
|
|
75402
|
+
const getIsPageActive = React141__default.useCallback(() => {
|
|
75403
|
+
if (typeof document === "undefined") {
|
|
75404
|
+
return true;
|
|
73181
75405
|
}
|
|
73182
|
-
|
|
73183
|
-
|
|
73184
|
-
|
|
73185
|
-
|
|
73186
|
-
|
|
75406
|
+
const isVisible = document.visibilityState === "visible";
|
|
75407
|
+
const hasFocus = typeof document.hasFocus === "function" ? document.hasFocus() : true;
|
|
75408
|
+
return isVisible && hasFocus;
|
|
75409
|
+
}, []);
|
|
75410
|
+
const stopPolling = React141__default.useCallback((reason) => {
|
|
75411
|
+
if (intervalRef.current === null) {
|
|
75412
|
+
return;
|
|
73187
75413
|
}
|
|
73188
|
-
|
|
73189
|
-
|
|
73190
|
-
|
|
73191
|
-
|
|
73192
|
-
|
|
73193
|
-
|
|
73194
|
-
|
|
73195
|
-
|
|
73196
|
-
|
|
73197
|
-
|
|
75414
|
+
window.clearInterval(intervalRef.current);
|
|
75415
|
+
intervalRef.current = null;
|
|
75416
|
+
debugRefreshLog("poll stopped", { reason });
|
|
75417
|
+
}, []);
|
|
75418
|
+
const runRefresh = React141__default.useCallback(
|
|
75419
|
+
async (section, begin, onSuccess, onError, request, reason) => {
|
|
75420
|
+
if (!supabase || !companyId || lineIds.length === 0) return;
|
|
75421
|
+
const requestId = requestIdsRef.current[section] + 1;
|
|
75422
|
+
requestIdsRef.current[section] = requestId;
|
|
75423
|
+
controllersRef.current[section]?.abort();
|
|
75424
|
+
const controller = new AbortController();
|
|
75425
|
+
controllersRef.current[section] = controller;
|
|
75426
|
+
begin();
|
|
75427
|
+
try {
|
|
75428
|
+
const response = await request(controller.signal, requestId);
|
|
75429
|
+
if (controller.signal.aborted || requestIdsRef.current[section] !== requestId) {
|
|
75430
|
+
return;
|
|
75431
|
+
}
|
|
75432
|
+
onSuccess(response, Date.now(), reason === "live_refresh" ? "transition" : "default");
|
|
75433
|
+
} catch (error) {
|
|
75434
|
+
if (controller.signal.aborted || requestIdsRef.current[section] !== requestId || isAbortError(error)) {
|
|
75435
|
+
return;
|
|
75436
|
+
}
|
|
75437
|
+
onError(error instanceof Error ? error.message : `Failed to refresh ${section}`);
|
|
75438
|
+
}
|
|
75439
|
+
},
|
|
75440
|
+
[companyId, lineIds.length, supabase]
|
|
75441
|
+
);
|
|
75442
|
+
const refreshSnapshot = React141__default.useCallback(
|
|
75443
|
+
async (reason) => {
|
|
75444
|
+
await runRefresh(
|
|
75445
|
+
"snapshot",
|
|
75446
|
+
store.beginSnapshotLoad,
|
|
75447
|
+
store.applySnapshotResponse,
|
|
75448
|
+
store.failSnapshotLoad,
|
|
75449
|
+
(signal, requestId) => {
|
|
75450
|
+
const params = new URLSearchParams({
|
|
75451
|
+
company_id: companyId || "",
|
|
75452
|
+
start_date: startKey,
|
|
75453
|
+
end_date: endKey,
|
|
75454
|
+
trend_shift_mode: trendMode,
|
|
75455
|
+
line_ids: lineIdsKey
|
|
75456
|
+
});
|
|
75457
|
+
if (comparisonStrategy) {
|
|
75458
|
+
params.set("comparison_strategy", comparisonStrategy);
|
|
73198
75459
|
}
|
|
73199
|
-
|
|
73200
|
-
|
|
73201
|
-
|
|
73202
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-slate-500 text-center mt-0.5", children: mobileSubtitle })
|
|
73203
|
-
] }),
|
|
73204
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 flex items-center gap-1.5", children: [
|
|
73205
|
-
/* @__PURE__ */ jsx(
|
|
73206
|
-
MonthlyRangeFilter_default,
|
|
75460
|
+
return fetchBackendJson(
|
|
75461
|
+
supabase,
|
|
75462
|
+
`/api/dashboard/operations-overview/snapshot?${params.toString()}`,
|
|
73207
75463
|
{
|
|
73208
|
-
|
|
73209
|
-
|
|
73210
|
-
timezone: appTimezone,
|
|
73211
|
-
value: dateRange,
|
|
73212
|
-
onChange: handleDateRangeChange,
|
|
73213
|
-
showLabel: false
|
|
75464
|
+
signal,
|
|
75465
|
+
dedupeKey: `operations-overview:snapshot:${scopeSignature}:${requestId}`
|
|
73214
75466
|
}
|
|
73215
|
-
)
|
|
73216
|
-
|
|
73217
|
-
|
|
73218
|
-
|
|
73219
|
-
|
|
73220
|
-
|
|
73221
|
-
|
|
73222
|
-
|
|
73223
|
-
|
|
73224
|
-
|
|
73225
|
-
|
|
73226
|
-
|
|
73227
|
-
|
|
73228
|
-
|
|
73229
|
-
|
|
73230
|
-
|
|
73231
|
-
|
|
73232
|
-
|
|
73233
|
-
|
|
73234
|
-
|
|
73235
|
-
|
|
73236
|
-
|
|
73237
|
-
|
|
73238
|
-
|
|
73239
|
-
{
|
|
73240
|
-
month: parseDateKeyToDate(dateRange.startKey).getMonth(),
|
|
73241
|
-
year: parseDateKeyToDate(dateRange.startKey).getFullYear(),
|
|
73242
|
-
timezone: appTimezone,
|
|
73243
|
-
value: dateRange,
|
|
73244
|
-
onChange: handleDateRangeChange,
|
|
73245
|
-
showLabel: false
|
|
73246
|
-
}
|
|
73247
|
-
) }),
|
|
73248
|
-
/* @__PURE__ */ jsxs(
|
|
73249
|
-
"button",
|
|
75467
|
+
);
|
|
75468
|
+
},
|
|
75469
|
+
reason
|
|
75470
|
+
);
|
|
75471
|
+
},
|
|
75472
|
+
[companyId, comparisonStrategy, endKey, lineIdsKey, runRefresh, scopeSignature, startKey, store, supabase, trendMode]
|
|
75473
|
+
);
|
|
75474
|
+
const refreshTrend = React141__default.useCallback(
|
|
75475
|
+
async (reason) => {
|
|
75476
|
+
await runRefresh(
|
|
75477
|
+
"trend",
|
|
75478
|
+
store.beginTrendLoad,
|
|
75479
|
+
store.applyTrendResponse,
|
|
75480
|
+
store.failTrendLoad,
|
|
75481
|
+
(signal, requestId) => {
|
|
75482
|
+
const params = new URLSearchParams({
|
|
75483
|
+
company_id: companyId || "",
|
|
75484
|
+
start_date: startKey,
|
|
75485
|
+
end_date: endKey,
|
|
75486
|
+
trend_shift_mode: trendMode,
|
|
75487
|
+
line_ids: lineIdsKey
|
|
75488
|
+
});
|
|
75489
|
+
return fetchBackendJson(
|
|
75490
|
+
supabase,
|
|
75491
|
+
`/api/dashboard/operations-overview/trend?${params.toString()}`,
|
|
73250
75492
|
{
|
|
73251
|
-
|
|
73252
|
-
|
|
73253
|
-
className: `flex items-center gap-2 px-3 py-1.5 rounded-lg border text-sm font-medium transition-all shadow-sm ${isFilterOpen || trendMode !== "all" ? "border-blue-500 bg-blue-50 text-blue-700 ring-1 ring-blue-500" : "border-slate-200 bg-white text-slate-700 hover:bg-slate-50"}`,
|
|
73254
|
-
"aria-label": "Open filters",
|
|
73255
|
-
children: [
|
|
73256
|
-
/* @__PURE__ */ jsx(Filter, { className: `w-[18px] h-[18px] ${trendMode !== "all" ? "text-blue-600" : "text-slate-500"}` }),
|
|
73257
|
-
"Filters",
|
|
73258
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: `w-4 h-4 ml-0.5 transition-transform duration-200 ${isFilterOpen ? "rotate-180" : ""}` })
|
|
73259
|
-
]
|
|
75493
|
+
signal,
|
|
75494
|
+
dedupeKey: `operations-overview:trend:${scopeSignature}:${requestId}`
|
|
73260
75495
|
}
|
|
73261
|
-
)
|
|
73262
|
-
|
|
73263
|
-
|
|
73264
|
-
|
|
73265
|
-
|
|
73266
|
-
|
|
73267
|
-
|
|
73268
|
-
|
|
75496
|
+
);
|
|
75497
|
+
},
|
|
75498
|
+
reason
|
|
75499
|
+
);
|
|
75500
|
+
},
|
|
75501
|
+
[companyId, endKey, lineIdsKey, runRefresh, scopeSignature, startKey, store, supabase, trendMode]
|
|
75502
|
+
);
|
|
75503
|
+
const refreshIdle = React141__default.useCallback(
|
|
75504
|
+
async (reason) => {
|
|
75505
|
+
await runRefresh(
|
|
75506
|
+
"idle",
|
|
75507
|
+
store.beginIdleLoad,
|
|
75508
|
+
store.applyIdleResponse,
|
|
75509
|
+
store.failIdleLoad,
|
|
75510
|
+
(signal, requestId) => {
|
|
75511
|
+
const params = new URLSearchParams({
|
|
75512
|
+
company_id: companyId || "",
|
|
75513
|
+
start_date: startKey,
|
|
75514
|
+
end_date: endKey,
|
|
75515
|
+
trend_shift_mode: trendMode,
|
|
75516
|
+
line_ids: lineIdsKey
|
|
75517
|
+
});
|
|
75518
|
+
return fetchBackendJson(
|
|
75519
|
+
supabase,
|
|
75520
|
+
`/api/dashboard/operations-overview/idle-reason-breakdown?${params.toString()}`,
|
|
73269
75521
|
{
|
|
73270
|
-
|
|
73271
|
-
|
|
73272
|
-
setIsFilterOpen(false);
|
|
73273
|
-
},
|
|
73274
|
-
className: "text-xs text-red-600 hover:text-red-700 font-medium",
|
|
73275
|
-
children: "Clear all"
|
|
75522
|
+
signal,
|
|
75523
|
+
dedupeKey: `operations-overview:idle:${scopeSignature}:${requestId}`
|
|
73276
75524
|
}
|
|
73277
|
-
)
|
|
73278
|
-
|
|
73279
|
-
|
|
73280
|
-
|
|
73281
|
-
|
|
73282
|
-
|
|
75525
|
+
);
|
|
75526
|
+
},
|
|
75527
|
+
reason
|
|
75528
|
+
);
|
|
75529
|
+
},
|
|
75530
|
+
[companyId, endKey, lineIdsKey, runRefresh, scopeSignature, startKey, store, supabase, trendMode]
|
|
75531
|
+
);
|
|
75532
|
+
const refreshImprovements = React141__default.useCallback(
|
|
75533
|
+
async (reason) => {
|
|
75534
|
+
await runRefresh(
|
|
75535
|
+
"improvements",
|
|
75536
|
+
store.beginImprovementsLoad,
|
|
75537
|
+
(response, updatedAt, mode) => {
|
|
75538
|
+
store.applyImprovements(normalizeImprovements2(response.recommendations, lineIds), updatedAt, mode);
|
|
75539
|
+
},
|
|
75540
|
+
store.failImprovementsLoad,
|
|
75541
|
+
(signal, requestId) => {
|
|
75542
|
+
const params = new URLSearchParams({
|
|
75543
|
+
company_id: companyId || "",
|
|
75544
|
+
status: "open",
|
|
75545
|
+
limit: "200",
|
|
75546
|
+
line_ids: lineIdsKey
|
|
75547
|
+
});
|
|
75548
|
+
return fetchBackendJson(
|
|
75549
|
+
supabase,
|
|
75550
|
+
`/api/improvement-center/recommendations?${params.toString()}`,
|
|
73283
75551
|
{
|
|
73284
|
-
|
|
73285
|
-
|
|
73286
|
-
className: "w-full appearance-none pl-3 pr-8 py-2 text-sm bg-gray-50 border border-gray-200 hover:border-gray-300 rounded-lg text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white transition-all cursor-pointer",
|
|
73287
|
-
style: { backgroundImage: `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`, backgroundPosition: `right 0.75rem center`, backgroundRepeat: `no-repeat`, backgroundSize: `1.2em 1.2em` },
|
|
73288
|
-
children: [
|
|
73289
|
-
/* @__PURE__ */ jsx("option", { value: "all", children: "All Shifts" }),
|
|
73290
|
-
/* @__PURE__ */ jsx("option", { value: "day", children: "Day Shift" }),
|
|
73291
|
-
/* @__PURE__ */ jsx("option", { value: "night", children: "Night Shift" })
|
|
73292
|
-
]
|
|
75552
|
+
signal,
|
|
75553
|
+
dedupeKey: `operations-overview:improvements:${scopeSignature}:${requestId}`
|
|
73293
75554
|
}
|
|
73294
|
-
)
|
|
73295
|
-
|
|
73296
|
-
|
|
73297
|
-
|
|
75555
|
+
);
|
|
75556
|
+
},
|
|
75557
|
+
reason
|
|
75558
|
+
);
|
|
75559
|
+
},
|
|
75560
|
+
[companyId, lineIds, lineIdsKey, runRefresh, scopeSignature, store, supabase]
|
|
75561
|
+
);
|
|
75562
|
+
const refreshAll = React141__default.useCallback(
|
|
75563
|
+
async (reason) => {
|
|
75564
|
+
await Promise.allSettled([
|
|
75565
|
+
refreshSnapshot(reason),
|
|
75566
|
+
refreshTrend(reason),
|
|
75567
|
+
refreshIdle(reason),
|
|
75568
|
+
refreshImprovements(reason)
|
|
75569
|
+
]);
|
|
75570
|
+
},
|
|
75571
|
+
[refreshIdle, refreshImprovements, refreshSnapshot, refreshTrend]
|
|
75572
|
+
);
|
|
75573
|
+
const startPolling = React141__default.useCallback((reason) => {
|
|
75574
|
+
if (!isLiveScope || !supabase || !companyId || lineIds.length === 0) {
|
|
75575
|
+
return;
|
|
75576
|
+
}
|
|
75577
|
+
if (intervalRef.current !== null) {
|
|
75578
|
+
return;
|
|
75579
|
+
}
|
|
75580
|
+
intervalRef.current = window.setInterval(() => {
|
|
75581
|
+
if (!isPageActiveRef.current) {
|
|
75582
|
+
debugRefreshLog("poll skipped because hidden/unfocused", {
|
|
75583
|
+
reason: "interval_tick",
|
|
75584
|
+
visibilityState: typeof document !== "undefined" ? document.visibilityState : "unknown",
|
|
75585
|
+
hasFocus: typeof document !== "undefined" && typeof document.hasFocus === "function" ? document.hasFocus() : true
|
|
75586
|
+
});
|
|
75587
|
+
stopPolling("inactive_during_tick");
|
|
75588
|
+
return;
|
|
75589
|
+
}
|
|
75590
|
+
void refreshAll("live_refresh");
|
|
75591
|
+
}, LIVE_REFRESH_INTERVAL_MS);
|
|
75592
|
+
debugRefreshLog("poll started", { reason, intervalMs: LIVE_REFRESH_INTERVAL_MS });
|
|
75593
|
+
}, [companyId, isLiveScope, lineIds.length, refreshAll, stopPolling, supabase]);
|
|
75594
|
+
const refreshFromResume = React141__default.useCallback((reason) => {
|
|
75595
|
+
const now4 = Date.now();
|
|
75596
|
+
if (now4 - lastResumeRefreshAtRef.current < 1e3) {
|
|
75597
|
+
debugRefreshLog("resume refresh suppressed", { reason });
|
|
75598
|
+
return;
|
|
75599
|
+
}
|
|
75600
|
+
lastResumeRefreshAtRef.current = now4;
|
|
75601
|
+
stopPolling("resume_refresh");
|
|
75602
|
+
debugRefreshLog("resume refresh fired", { reason });
|
|
75603
|
+
void refreshAll("live_refresh").finally(() => {
|
|
75604
|
+
if (isPageActiveRef.current) {
|
|
75605
|
+
startPolling("resume");
|
|
75606
|
+
}
|
|
75607
|
+
});
|
|
75608
|
+
}, [refreshAll, startPolling, stopPolling]);
|
|
75609
|
+
React141__default.useEffect(() => {
|
|
75610
|
+
if (!supabase || !companyId || lineIds.length === 0) {
|
|
75611
|
+
stopPolling("scope_invalid");
|
|
75612
|
+
abortAll();
|
|
75613
|
+
store.reset();
|
|
75614
|
+
return;
|
|
75615
|
+
}
|
|
75616
|
+
void refreshAll("scope_change");
|
|
75617
|
+
}, [abortAll, companyId, lineIds.length, refreshAll, scopeSignature, stopPolling, store, supabase]);
|
|
75618
|
+
React141__default.useEffect(() => {
|
|
75619
|
+
if (!isLiveScope || !supabase || !companyId || lineIds.length === 0) {
|
|
75620
|
+
isPageActiveRef.current = false;
|
|
75621
|
+
stopPolling("live_scope_disabled");
|
|
75622
|
+
return;
|
|
75623
|
+
}
|
|
75624
|
+
const logInactive = (reason) => {
|
|
75625
|
+
debugRefreshLog("poll skipped because hidden/unfocused", {
|
|
75626
|
+
reason,
|
|
75627
|
+
visibilityState: typeof document !== "undefined" ? document.visibilityState : "unknown",
|
|
75628
|
+
hasFocus: typeof document !== "undefined" && typeof document.hasFocus === "function" ? document.hasFocus() : true
|
|
75629
|
+
});
|
|
75630
|
+
};
|
|
75631
|
+
const markInactive = (reason) => {
|
|
75632
|
+
isPageActiveRef.current = false;
|
|
75633
|
+
logInactive(reason);
|
|
75634
|
+
stopPolling(reason);
|
|
75635
|
+
};
|
|
75636
|
+
const syncActivity = (reason) => {
|
|
75637
|
+
const nextIsActive = getIsPageActive();
|
|
75638
|
+
const wasActive = isPageActiveRef.current;
|
|
75639
|
+
isPageActiveRef.current = nextIsActive;
|
|
75640
|
+
if (!nextIsActive) {
|
|
75641
|
+
logInactive(reason);
|
|
75642
|
+
stopPolling(reason);
|
|
75643
|
+
return;
|
|
75644
|
+
}
|
|
75645
|
+
if (!wasActive) {
|
|
75646
|
+
refreshFromResume(reason);
|
|
75647
|
+
return;
|
|
75648
|
+
}
|
|
75649
|
+
startPolling(reason);
|
|
75650
|
+
};
|
|
75651
|
+
isPageActiveRef.current = getIsPageActive();
|
|
75652
|
+
if (isPageActiveRef.current) {
|
|
75653
|
+
startPolling("effect_mount");
|
|
75654
|
+
} else {
|
|
75655
|
+
logInactive("effect_mount");
|
|
75656
|
+
}
|
|
75657
|
+
const handleVisibilityChange = () => syncActivity("visibilitychange");
|
|
75658
|
+
const handleFocus = () => syncActivity("focus");
|
|
75659
|
+
const handleBlur = () => markInactive("blur");
|
|
75660
|
+
const handlePageShow = () => syncActivity("pageshow");
|
|
75661
|
+
const handlePageHide = () => markInactive("pagehide");
|
|
75662
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
75663
|
+
window.addEventListener("focus", handleFocus);
|
|
75664
|
+
window.addEventListener("blur", handleBlur);
|
|
75665
|
+
window.addEventListener("pageshow", handlePageShow);
|
|
75666
|
+
window.addEventListener("pagehide", handlePageHide);
|
|
75667
|
+
return () => {
|
|
75668
|
+
stopPolling("cleanup");
|
|
75669
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
75670
|
+
window.removeEventListener("focus", handleFocus);
|
|
75671
|
+
window.removeEventListener("blur", handleBlur);
|
|
75672
|
+
window.removeEventListener("pageshow", handlePageShow);
|
|
75673
|
+
window.removeEventListener("pagehide", handlePageHide);
|
|
75674
|
+
};
|
|
75675
|
+
}, [companyId, getIsPageActive, isLiveScope, lineIds.length, refreshFromResume, startPolling, stopPolling, supabase]);
|
|
75676
|
+
};
|
|
75677
|
+
var PlantHeadView = () => {
|
|
75678
|
+
const supabase = useSupabase();
|
|
75679
|
+
const entityConfig = useEntityConfig();
|
|
75680
|
+
const appTimezone = useAppTimezone() || "UTC";
|
|
75681
|
+
const { navigate } = useNavigation();
|
|
75682
|
+
const { accessibleLineIds } = useUserLineAccess();
|
|
75683
|
+
const mobileMenuContext = useMobileMenu();
|
|
75684
|
+
useHideMobileHeader(!!mobileMenuContext);
|
|
75685
|
+
const storeRef = React141__default.useRef(createOperationsOverviewStore());
|
|
75686
|
+
const store = storeRef.current;
|
|
75687
|
+
const [dateRange, setDateRange] = React141__default.useState(() => getCurrentWeekToDateRange(appTimezone));
|
|
75688
|
+
const [usesThisWeekComparison, setUsesThisWeekComparison] = React141__default.useState(true);
|
|
75689
|
+
const [trendMode, setTrendMode] = React141__default.useState("all");
|
|
75690
|
+
React141__default.useEffect(() => {
|
|
75691
|
+
trackCorePageView("Operations Overview", {
|
|
75692
|
+
dashboard_surface: "operations_overview"
|
|
75693
|
+
});
|
|
75694
|
+
}, []);
|
|
75695
|
+
const currentWeekRange = React141__default.useMemo(
|
|
75696
|
+
() => getCurrentWeekToDateRange(appTimezone),
|
|
75697
|
+
[appTimezone]
|
|
75698
|
+
);
|
|
75699
|
+
const isCurrentWeekToDateRange = dateRange.startKey === currentWeekRange.startKey && dateRange.endKey === currentWeekRange.endKey;
|
|
75700
|
+
const normalizedLineIds = React141__default.useMemo(
|
|
75701
|
+
() => Array.from(new Set((accessibleLineIds || []).filter(Boolean))).sort(),
|
|
75702
|
+
[accessibleLineIds]
|
|
75703
|
+
);
|
|
75704
|
+
const lineIdsKey = React141__default.useMemo(
|
|
75705
|
+
() => normalizedLineIds.join(","),
|
|
75706
|
+
[normalizedLineIds]
|
|
75707
|
+
);
|
|
75708
|
+
const scopedLineIds = React141__default.useMemo(
|
|
75709
|
+
() => lineIdsKey ? lineIdsKey.split(",") : [],
|
|
75710
|
+
[lineIdsKey]
|
|
75711
|
+
);
|
|
75712
|
+
const initializedTimezoneRef = React141__default.useRef(appTimezone);
|
|
75713
|
+
React141__default.useEffect(() => {
|
|
75714
|
+
if (initializedTimezoneRef.current === appTimezone) return;
|
|
75715
|
+
setDateRange(getCurrentWeekToDateRange(appTimezone));
|
|
75716
|
+
setUsesThisWeekComparison(true);
|
|
75717
|
+
initializedTimezoneRef.current = appTimezone;
|
|
75718
|
+
}, [appTimezone]);
|
|
75719
|
+
const handleDateRangeChange = React141__default.useCallback((range, meta) => {
|
|
75720
|
+
trackCoreEvent("Operations Overview Date Range Changed", {
|
|
75721
|
+
start_date: range.startKey,
|
|
75722
|
+
end_date: range.endKey
|
|
75723
|
+
});
|
|
75724
|
+
setDateRange(range);
|
|
75725
|
+
setUsesThisWeekComparison((previous) => {
|
|
75726
|
+
if (meta?.source === "preset") {
|
|
75727
|
+
return meta.presetLabel === "This Week";
|
|
75728
|
+
}
|
|
75729
|
+
if (meta?.source === "custom") {
|
|
75730
|
+
return false;
|
|
75731
|
+
}
|
|
75732
|
+
return previous;
|
|
75733
|
+
});
|
|
75734
|
+
}, []);
|
|
75735
|
+
const handleTrendModeChange = React141__default.useCallback((mode) => {
|
|
75736
|
+
setTrendMode(mode);
|
|
75737
|
+
}, []);
|
|
75738
|
+
const buildLineMonthlyHistoryUrl = React141__default.useCallback((lineId) => {
|
|
75739
|
+
const rangeStartDate = parseDateKeyToDate(dateRange.startKey);
|
|
75740
|
+
const params = new URLSearchParams();
|
|
75741
|
+
params.set("tab", "monthly_history");
|
|
75742
|
+
params.set("month", rangeStartDate.getMonth().toString());
|
|
75743
|
+
params.set("year", rangeStartDate.getFullYear().toString());
|
|
75744
|
+
params.set("rangeStart", dateRange.startKey);
|
|
75745
|
+
params.set("rangeEnd", dateRange.endKey);
|
|
75746
|
+
return `/kpis/${lineId}?${params.toString()}`;
|
|
75747
|
+
}, [dateRange.endKey, dateRange.startKey]);
|
|
75748
|
+
const handleOpenLineMonthlyHistory = React141__default.useCallback((lineId, lineName) => {
|
|
75749
|
+
trackCoreEvent("Operations Overview Line Clicked", {
|
|
75750
|
+
line_id: lineId,
|
|
75751
|
+
line_name: lineName,
|
|
75752
|
+
range_start: dateRange.startKey,
|
|
75753
|
+
range_end: dateRange.endKey
|
|
75754
|
+
});
|
|
75755
|
+
navigate(buildLineMonthlyHistoryUrl(lineId));
|
|
75756
|
+
}, [buildLineMonthlyHistoryUrl, dateRange.endKey, dateRange.startKey, navigate]);
|
|
75757
|
+
const handleViewAllPoorestPerformers = React141__default.useCallback(() => {
|
|
75758
|
+
trackCoreEvent("Operations Overview View All Clicked", { section: "poorest_performers" });
|
|
75759
|
+
navigate("/kpis?tab=leaderboard");
|
|
75760
|
+
}, [navigate]);
|
|
75761
|
+
const handleViewAllImprovements = React141__default.useCallback(() => {
|
|
75762
|
+
trackCoreEvent("Operations Overview View All Clicked", { section: "improvements" });
|
|
75763
|
+
navigate("/improvement-center");
|
|
75764
|
+
}, [navigate]);
|
|
75765
|
+
const handleOpenImprovement = React141__default.useCallback((item) => {
|
|
75766
|
+
trackCoreEvent("Operations Overview Improvement Clicked", {
|
|
75767
|
+
issue_id: item.issueId,
|
|
75768
|
+
issue_number: item.issueNumber,
|
|
75769
|
+
title: item.title
|
|
75770
|
+
});
|
|
75771
|
+
const params = new URLSearchParams({
|
|
75772
|
+
focusIssueId: item.issueId
|
|
75773
|
+
});
|
|
75774
|
+
navigate(`/improvement-center?${params.toString()}`);
|
|
75775
|
+
}, [navigate]);
|
|
75776
|
+
const comparisonStrategy = React141__default.useMemo(() => {
|
|
75777
|
+
if (usesThisWeekComparison && isCurrentWeekToDateRange) {
|
|
75778
|
+
return "previous_full_week";
|
|
75779
|
+
}
|
|
75780
|
+
return void 0;
|
|
75781
|
+
}, [isCurrentWeekToDateRange, usesThisWeekComparison]);
|
|
75782
|
+
useOperationsOverviewRefresh({
|
|
75783
|
+
store,
|
|
75784
|
+
supabase,
|
|
75785
|
+
companyId: entityConfig.companyId,
|
|
75786
|
+
lineIds: scopedLineIds,
|
|
75787
|
+
startKey: dateRange.startKey,
|
|
75788
|
+
endKey: dateRange.endKey,
|
|
75789
|
+
trendMode,
|
|
75790
|
+
comparisonStrategy,
|
|
75791
|
+
isLiveScope: isCurrentWeekToDateRange
|
|
75792
|
+
});
|
|
75793
|
+
const { supervisorsByLineId } = useSupervisorsByLineIds(scopedLineIds, {
|
|
75794
|
+
enabled: !!entityConfig.companyId && scopedLineIds.length > 0,
|
|
75795
|
+
companyId: entityConfig.companyId,
|
|
75796
|
+
useBackend: true
|
|
75797
|
+
});
|
|
75798
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-screen bg-slate-50 w-full font-sans", children: [
|
|
75799
|
+
/* @__PURE__ */ jsx(
|
|
75800
|
+
OperationsOverviewHeader,
|
|
75801
|
+
{
|
|
75802
|
+
dateRange,
|
|
75803
|
+
trendMode,
|
|
75804
|
+
appTimezone,
|
|
75805
|
+
mobileMenuContext,
|
|
75806
|
+
onDateRangeChange: handleDateRangeChange,
|
|
75807
|
+
onTrendModeChange: handleTrendModeChange
|
|
75808
|
+
}
|
|
75809
|
+
),
|
|
73298
75810
|
/* @__PURE__ */ jsxs("div", { className: "p-4 sm:p-6 pb-6 max-w-[1800px] mx-auto w-full flex-1 min-h-0 overflow-y-auto flex flex-col gap-5", children: [
|
|
73299
|
-
/* @__PURE__ */
|
|
73300
|
-
/* @__PURE__ */ jsxs(
|
|
73301
|
-
"div",
|
|
73302
|
-
{
|
|
73303
|
-
className: "bg-white rounded-xl shadow-sm border border-slate-100 p-4 md:p-5 flex flex-col justify-center min-h-[100px] text-left",
|
|
73304
|
-
children: [
|
|
73305
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-between items-center mb-1", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Overall Efficiency" }) }),
|
|
73306
|
-
isSnapshotLoading ? /* @__PURE__ */ jsx(OverviewMetricCardSkeleton, {}) : overview.summary?.plant_efficiency?.current !== null && overview.summary?.plant_efficiency?.current !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
73307
|
-
/* @__PURE__ */ jsxs("span", { className: "text-2xl sm:text-3xl font-bold text-slate-800 tracking-tight", children: [
|
|
73308
|
-
roundOne(overview.summary.plant_efficiency.current),
|
|
73309
|
-
"%"
|
|
73310
|
-
] }),
|
|
73311
|
-
/* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${plantEfficiencyBadge.className}`, children: [
|
|
73312
|
-
plantEfficiencyBadge.icon === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : plantEfficiencyBadge.icon === "down" ? /* @__PURE__ */ jsx(ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
73313
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium", children: plantEfficiencyBadge.text })
|
|
73314
|
-
] })
|
|
73315
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No efficiency data available" })
|
|
73316
|
-
]
|
|
73317
|
-
}
|
|
73318
|
-
),
|
|
73319
|
-
/* @__PURE__ */ jsxs(
|
|
73320
|
-
"div",
|
|
73321
|
-
{
|
|
73322
|
-
ref: idleContributorsRef,
|
|
73323
|
-
"data-testid": "idle-kpi-card-region",
|
|
73324
|
-
className: "relative",
|
|
73325
|
-
onMouseEnter: () => {
|
|
73326
|
-
if (canInspectIdleContributors) {
|
|
73327
|
-
setIsIdleContributorsOpen(true);
|
|
73328
|
-
}
|
|
73329
|
-
},
|
|
73330
|
-
onMouseLeave: () => {
|
|
73331
|
-
if (!isIdleContributorsPinned) {
|
|
73332
|
-
setIsIdleContributorsOpen(false);
|
|
73333
|
-
}
|
|
73334
|
-
},
|
|
73335
|
-
onFocus: () => {
|
|
73336
|
-
if (canInspectIdleContributors) {
|
|
73337
|
-
setIsIdleContributorsOpen(true);
|
|
73338
|
-
}
|
|
73339
|
-
},
|
|
73340
|
-
onBlur: (event) => {
|
|
73341
|
-
if (isIdleContributorsPinned) return;
|
|
73342
|
-
const nextTarget = event.relatedTarget;
|
|
73343
|
-
if (nextTarget && idleContributorsRef.current?.contains(nextTarget)) return;
|
|
73344
|
-
setIsIdleContributorsOpen(false);
|
|
73345
|
-
},
|
|
73346
|
-
children: [
|
|
73347
|
-
/* @__PURE__ */ jsxs(
|
|
73348
|
-
"div",
|
|
73349
|
-
{
|
|
73350
|
-
"data-testid": "idle-kpi-card",
|
|
73351
|
-
role: canInspectIdleContributors ? "button" : void 0,
|
|
73352
|
-
tabIndex: canInspectIdleContributors ? 0 : -1,
|
|
73353
|
-
"aria-controls": canInspectIdleContributors ? "idle-kpi-popover" : void 0,
|
|
73354
|
-
"aria-expanded": canInspectIdleContributors ? isIdleContributorsOpen : void 0,
|
|
73355
|
-
className: `bg-white rounded-xl border p-4 md:p-5 flex flex-col justify-center min-h-[100px] text-left transition-all ${canInspectIdleContributors ? "cursor-pointer hover:shadow-md focus:outline-none focus:ring-2 focus:ring-indigo-200" : ""} ${isIdleContributorsOpen ? "shadow-md border-indigo-100" : "shadow-sm border-slate-100"}`,
|
|
73356
|
-
onClick: handleIdleContributorsToggle,
|
|
73357
|
-
onKeyDown: handleIdleContributorsKeyDown,
|
|
73358
|
-
children: [
|
|
73359
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Idle Time per Workstation" }) }),
|
|
73360
|
-
isSnapshotLoading ? /* @__PURE__ */ jsx(OverviewMetricCardSkeleton, {}) : overview.summary?.avg_idle_per_workstation?.current_seconds !== null && overview.summary?.avg_idle_per_workstation?.current_seconds !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
73361
|
-
/* @__PURE__ */ jsx("span", { className: "text-2xl sm:text-3xl font-bold text-slate-800 tracking-tight", children: formatIdleDuration(overview.summary.avg_idle_per_workstation.current_seconds) }),
|
|
73362
|
-
/* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${idleBadge.className}`, children: [
|
|
73363
|
-
idleBadge.icon === "up" ? /* @__PURE__ */ jsx(ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : idleBadge.icon === "down" ? /* @__PURE__ */ jsx(ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
73364
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium", children: idleBadge.text })
|
|
73365
|
-
] })
|
|
73366
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No idle time data available" })
|
|
73367
|
-
]
|
|
73368
|
-
}
|
|
73369
|
-
),
|
|
73370
|
-
canInspectIdleContributors && isIdleContributorsOpen ? /* @__PURE__ */ jsxs(
|
|
73371
|
-
"div",
|
|
73372
|
-
{
|
|
73373
|
-
id: "idle-kpi-popover",
|
|
73374
|
-
"data-testid": "idle-kpi-popover",
|
|
73375
|
-
className: "absolute left-0 right-0 top-full z-20 mt-2 bg-white p-4 border border-gray-100 shadow-xl rounded-xl sm:left-auto sm:right-0 sm:w-[320px] min-w-[280px]",
|
|
73376
|
-
children: [
|
|
73377
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pb-3 mb-3 border-b border-slate-100", children: [
|
|
73378
|
-
/* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full flex-shrink-0 bg-red-500" }),
|
|
73379
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-slate-800 text-[15px]", children: "Idle Time per Workstation" })
|
|
73380
|
-
] }),
|
|
73381
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
73382
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3", children: "TOP CONTRIBUTORS" }),
|
|
73383
|
-
idleTopContributors.length > 0 ? /* @__PURE__ */ jsx("div", { className: "space-y-2.5", children: idleTopContributors.map((contributor, index) => /* @__PURE__ */ jsxs(
|
|
73384
|
-
"div",
|
|
73385
|
-
{
|
|
73386
|
-
className: "flex items-start justify-between gap-3",
|
|
73387
|
-
children: [
|
|
73388
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
73389
|
-
/* @__PURE__ */ jsx(
|
|
73390
|
-
"div",
|
|
73391
|
-
{
|
|
73392
|
-
className: "text-slate-600 text-[13px] truncate",
|
|
73393
|
-
title: contributor.workspaceName,
|
|
73394
|
-
children: contributor.workspaceName
|
|
73395
|
-
}
|
|
73396
|
-
),
|
|
73397
|
-
showIdleContributorLineNames && contributor.lineName ? /* @__PURE__ */ jsx("div", { className: "text-[11px] font-medium text-slate-400 truncate", title: contributor.lineName, children: contributor.lineName }) : null
|
|
73398
|
-
] }),
|
|
73399
|
-
/* @__PURE__ */ jsx("div", { className: "text-slate-500 text-[13px] text-right whitespace-nowrap", children: formatIdleDuration(contributor.avgIdleSeconds) })
|
|
73400
|
-
]
|
|
73401
|
-
},
|
|
73402
|
-
`${contributor.workspaceId || contributor.workspaceName}-${index}`
|
|
73403
|
-
)) }) : /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed border-slate-200 bg-slate-50 px-3 py-2 text-xs text-slate-500", children: "No workstation idle averages available for this range." })
|
|
73404
|
-
] })
|
|
73405
|
-
]
|
|
73406
|
-
}
|
|
73407
|
-
) : null
|
|
73408
|
-
]
|
|
73409
|
-
}
|
|
73410
|
-
)
|
|
73411
|
-
] }),
|
|
75811
|
+
/* @__PURE__ */ jsx(OverviewSummaryCards, { store }),
|
|
73412
75812
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-h-0 grid grid-cols-1 xl:grid-cols-2 gap-5 auto-rows-fr", children: [
|
|
73413
75813
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-rows-1 xl:grid-rows-2 gap-5 min-h-0", children: [
|
|
73414
|
-
/* @__PURE__ */
|
|
73415
|
-
|
|
73416
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
73417
|
-
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Poorest Performers" }),
|
|
73418
|
-
showPoorestModeToggle && /* @__PURE__ */ jsxs("div", { className: "flex bg-slate-100 p-0.5 rounded-lg", children: [
|
|
73419
|
-
/* @__PURE__ */ jsx(
|
|
73420
|
-
"button",
|
|
73421
|
-
{
|
|
73422
|
-
type: "button",
|
|
73423
|
-
onClick: () => handlePoorestLineModeChange("output"),
|
|
73424
|
-
className: `px-3 py-1 text-[11px] font-bold rounded-md ${poorestLineMode === "output" ? "bg-white text-slate-800 shadow-sm" : "text-slate-500 hover:text-slate-800"}`,
|
|
73425
|
-
children: "Output"
|
|
73426
|
-
}
|
|
73427
|
-
),
|
|
73428
|
-
/* @__PURE__ */ jsx(
|
|
73429
|
-
"button",
|
|
73430
|
-
{
|
|
73431
|
-
type: "button",
|
|
73432
|
-
onClick: () => handlePoorestLineModeChange("uptime"),
|
|
73433
|
-
className: `px-3 py-1 text-[11px] font-bold rounded-md ${poorestLineMode === "uptime" ? "bg-white text-slate-800 shadow-sm" : "text-slate-500 hover:text-slate-800"}`,
|
|
73434
|
-
children: "Uptime"
|
|
73435
|
-
}
|
|
73436
|
-
)
|
|
73437
|
-
] })
|
|
73438
|
-
] }),
|
|
73439
|
-
/* @__PURE__ */ jsx(
|
|
73440
|
-
"button",
|
|
73441
|
-
{
|
|
73442
|
-
type: "button",
|
|
73443
|
-
onClick: () => {
|
|
73444
|
-
trackCoreEvent("Operations Overview View All Clicked", { section: "poorest_performers" });
|
|
73445
|
-
navigate("/kpis?tab=leaderboard");
|
|
73446
|
-
},
|
|
73447
|
-
className: "text-[11px] font-bold text-slate-500 hover:text-slate-800 transition-colors",
|
|
73448
|
-
children: "View All"
|
|
73449
|
-
}
|
|
73450
|
-
)
|
|
73451
|
-
] }),
|
|
73452
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col p-0 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "divide-y divide-slate-50 flex-1 px-5", children: [
|
|
73453
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
73454
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-slate-400 text-[10px] uppercase tracking-wider min-w-[120px]", children: "Line" }),
|
|
73455
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-slate-400 text-[10px] uppercase tracking-wider text-left shrink-0 min-w-[110px] flex items-center gap-2", children: poorestMetricLabel })
|
|
73456
|
-
] }),
|
|
73457
|
-
isSnapshotLoading ? /* @__PURE__ */ jsx(OverviewListSkeleton, {}) : mergedPoorestLines.length > 0 ? mergedPoorestLines.map((line) => {
|
|
73458
|
-
const lineDelta = buildLineDeltaTone(line.delta, comparisonLabel);
|
|
73459
|
-
return /* @__PURE__ */ jsx(
|
|
73460
|
-
"div",
|
|
73461
|
-
{
|
|
73462
|
-
onClick: () => {
|
|
73463
|
-
trackCoreEvent("Operations Overview Line Clicked", { line_id: line.id, line_name: line.name });
|
|
73464
|
-
navigate(`/kpis/${line.id}`);
|
|
73465
|
-
},
|
|
73466
|
-
className: "block py-3 hover:bg-slate-50/50 transition-colors cursor-pointer group relative",
|
|
73467
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
73468
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
73469
|
-
/* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-full bg-slate-100 border border-slate-200 overflow-hidden flex-shrink-0", children: line.supervisorImage ? /* @__PURE__ */ jsx(
|
|
73470
|
-
"img",
|
|
73471
|
-
{
|
|
73472
|
-
src: line.supervisorImage,
|
|
73473
|
-
alt: line.supervisor,
|
|
73474
|
-
className: "w-full h-full object-cover"
|
|
73475
|
-
}
|
|
73476
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center text-[10px] font-bold text-slate-500", children: line.supervisor.split(" ").map((part) => part[0]).join("").slice(0, 2) }) }),
|
|
73477
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
73478
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }) }),
|
|
73479
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] text-slate-400 font-medium", children: line.supervisor }) })
|
|
73480
|
-
] })
|
|
73481
|
-
] }),
|
|
73482
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0 justify-start min-w-[110px]", children: [
|
|
73483
|
-
/* @__PURE__ */ jsxs("div", { className: "text-[15px] font-bold text-slate-800", children: [
|
|
73484
|
-
line.efficiency,
|
|
73485
|
-
"%"
|
|
73486
|
-
] }),
|
|
73487
|
-
line.delta !== null && line.delta !== void 0 && Number.isFinite(line.delta) ? /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-0.5 px-2 py-0.5 rounded-full ${line.delta >= 0 ? "bg-[#ecfdf5] text-[#059669]" : "bg-[#FEF2F2] text-[#DC2626]"}`, children: [
|
|
73488
|
-
line.delta >= 0 ? /* @__PURE__ */ jsx(ArrowUp, { className: "w-3 h-3", strokeWidth: 2.5 }) : /* @__PURE__ */ jsx(ArrowDown, { className: "w-3 h-3", strokeWidth: 2.5 }),
|
|
73489
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-bold", children: lineDelta.text.split(" vs ")[0].replace("+", "") })
|
|
73490
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-slate-50 text-slate-400", children: /* @__PURE__ */ jsx("span", { className: "text-[11px] font-bold", children: "\u2014" }) })
|
|
73491
|
-
] })
|
|
73492
|
-
] })
|
|
73493
|
-
},
|
|
73494
|
-
line.id
|
|
73495
|
-
);
|
|
73496
|
-
}) : /* @__PURE__ */ jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: `No ${poorestLineMode} line data available` })
|
|
73497
|
-
] }) })
|
|
73498
|
-
] }),
|
|
73499
|
-
/* @__PURE__ */ jsxs(
|
|
73500
|
-
"div",
|
|
75814
|
+
/* @__PURE__ */ jsx(
|
|
75815
|
+
PoorestPerformersCard,
|
|
73501
75816
|
{
|
|
73502
|
-
|
|
73503
|
-
|
|
73504
|
-
|
|
73505
|
-
|
|
73506
|
-
|
|
73507
|
-
|
|
73508
|
-
|
|
73509
|
-
|
|
73510
|
-
|
|
73511
|
-
|
|
73512
|
-
|
|
73513
|
-
hideTotalDuration: true
|
|
73514
|
-
}
|
|
73515
|
-
) })
|
|
73516
|
-
]
|
|
75817
|
+
store,
|
|
75818
|
+
supervisorsByLineId,
|
|
75819
|
+
onViewAll: handleViewAllPoorestPerformers,
|
|
75820
|
+
onLineClick: handleOpenLineMonthlyHistory
|
|
75821
|
+
}
|
|
75822
|
+
),
|
|
75823
|
+
/* @__PURE__ */ jsx(
|
|
75824
|
+
IdleBreakdownCard,
|
|
75825
|
+
{
|
|
75826
|
+
store,
|
|
75827
|
+
scopedLineCount: scopedLineIds.length
|
|
73517
75828
|
}
|
|
73518
75829
|
)
|
|
73519
75830
|
] }),
|
|
73520
75831
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-rows-1 xl:grid-rows-2 gap-5 min-h-0", children: [
|
|
73521
|
-
/* @__PURE__ */
|
|
73522
|
-
|
|
75832
|
+
/* @__PURE__ */ jsx(
|
|
75833
|
+
EfficiencyTrendCard,
|
|
73523
75834
|
{
|
|
73524
|
-
|
|
73525
|
-
|
|
73526
|
-
|
|
73527
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 w-full p-4 pt-4 relative", children: isTrendLoading ? /* @__PURE__ */ jsx(OverviewChartSkeleton, {}) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pb-2 pr-4 pl-1", children: /* @__PURE__ */ jsx(
|
|
73528
|
-
LineChart,
|
|
73529
|
-
{
|
|
73530
|
-
data: trendData,
|
|
73531
|
-
lines: efficiencyLineConfig,
|
|
73532
|
-
xAxisDataKey: "name",
|
|
73533
|
-
yAxisUnit: "%",
|
|
73534
|
-
yAxisDomain: [0, 100],
|
|
73535
|
-
showLegend: false,
|
|
73536
|
-
showGrid: true,
|
|
73537
|
-
fillContainer: true,
|
|
73538
|
-
tooltipLabelFormatter: trendTooltipLabelFormatter
|
|
73539
|
-
},
|
|
73540
|
-
trendPlayKey
|
|
73541
|
-
) }) })
|
|
73542
|
-
]
|
|
75835
|
+
store,
|
|
75836
|
+
dateRange,
|
|
75837
|
+
appTimezone
|
|
73543
75838
|
}
|
|
73544
75839
|
),
|
|
73545
|
-
/* @__PURE__ */
|
|
73546
|
-
|
|
73547
|
-
|
|
73548
|
-
|
|
73549
|
-
|
|
73550
|
-
|
|
73551
|
-
|
|
73552
|
-
|
|
73553
|
-
|
|
73554
|
-
navigate("/improvement-center");
|
|
73555
|
-
},
|
|
73556
|
-
className: "text-[11px] font-bold text-slate-500 hover:text-slate-800 transition-colors",
|
|
73557
|
-
children: "View All"
|
|
73558
|
-
}
|
|
73559
|
-
)
|
|
73560
|
-
] }),
|
|
73561
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 p-0 flex flex-col px-5 py-2 justify-start overflow-auto", children: isImprovementsLoading ? /* @__PURE__ */ jsx(OverviewImprovementsSkeleton, {}) : displayImprovements.length > 0 ? displayImprovements.map((item) => /* @__PURE__ */ jsxs(
|
|
73562
|
-
"div",
|
|
73563
|
-
{
|
|
73564
|
-
"data-testid": `plant-head-improvement-${item.issueId}`,
|
|
73565
|
-
onClick: () => {
|
|
73566
|
-
trackCoreEvent("Operations Overview Improvement Clicked", {
|
|
73567
|
-
issue_id: item.issueId,
|
|
73568
|
-
issue_number: item.issueNumber,
|
|
73569
|
-
title: item.title
|
|
73570
|
-
});
|
|
73571
|
-
const params = new URLSearchParams({
|
|
73572
|
-
focusIssueId: item.issueId
|
|
73573
|
-
});
|
|
73574
|
-
navigate(`/improvement-center?${params.toString()}`);
|
|
73575
|
-
},
|
|
73576
|
-
className: "flex items-center justify-between py-3 border-b border-slate-50 last:border-0 group cursor-pointer",
|
|
73577
|
-
children: [
|
|
73578
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0 pr-4", children: [
|
|
73579
|
-
item.ticketLabel && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full border border-indigo-100 bg-indigo-50 px-2 py-0.5 text-[10px] font-semibold text-indigo-600", children: item.ticketLabel }) }),
|
|
73580
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
73581
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 min-w-0 mb-0.5", children: /* @__PURE__ */ jsx("h4", { className: "text-[13px] font-semibold text-slate-800 truncate transition-colors group-hover:text-indigo-600", children: item.title }) }),
|
|
73582
|
-
/* @__PURE__ */ jsx(
|
|
73583
|
-
"p",
|
|
73584
|
-
{
|
|
73585
|
-
className: "text-[10px] font-medium text-slate-400 truncate",
|
|
73586
|
-
title: item.metadataLabel,
|
|
73587
|
-
children: item.metadataLabel
|
|
73588
|
-
}
|
|
73589
|
-
)
|
|
73590
|
-
] })
|
|
73591
|
-
] }),
|
|
73592
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-end flex-shrink-0 ml-4", children: /* @__PURE__ */ jsxs(
|
|
73593
|
-
"span",
|
|
73594
|
-
{
|
|
73595
|
-
className: `inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] ${item.metric.includes("pcs / day") || item.metric.includes("gain") ? "border-emerald-100 bg-emerald-50 text-emerald-700" : item.metric.includes("Idle") ? "border-amber-100 bg-amber-50 text-amber-700" : "border-slate-100 bg-slate-50 text-slate-600"}`,
|
|
73596
|
-
children: [
|
|
73597
|
-
(item.metric.includes("pcs / day") || item.metric.includes("gain")) && /* @__PURE__ */ jsx(TrendingUp, { className: "h-3 w-3" }),
|
|
73598
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: item.metric })
|
|
73599
|
-
]
|
|
73600
|
-
}
|
|
73601
|
-
) })
|
|
73602
|
-
]
|
|
73603
|
-
},
|
|
73604
|
-
item.id
|
|
73605
|
-
)) : /* @__PURE__ */ jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: "No open improvement issues" }) })
|
|
73606
|
-
] })
|
|
75840
|
+
/* @__PURE__ */ jsx(
|
|
75841
|
+
TopImprovementsCard,
|
|
75842
|
+
{
|
|
75843
|
+
store,
|
|
75844
|
+
supervisorsByLineId,
|
|
75845
|
+
onViewAll: handleViewAllImprovements,
|
|
75846
|
+
onItemClick: handleOpenImprovement
|
|
75847
|
+
}
|
|
75848
|
+
)
|
|
73607
75849
|
] })
|
|
73608
75850
|
] })
|
|
73609
75851
|
] })
|
|
@@ -74086,4 +76328,4 @@ var streamProxyConfig = {
|
|
|
74086
76328
|
}
|
|
74087
76329
|
};
|
|
74088
76330
|
|
|
74089
|
-
export { 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, Legend6 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, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, 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, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildShiftGroupsKey, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, filterDataByDateKeyRange, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getNextUpdateInterval, getOperationalDate, getReasonColor, getS3SignedUrl, getS3VideoSrc, getShiftData, getShiftNameById, getShiftWorkDurationSeconds, getShortShiftName, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUniformShiftGroup, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, groupLinesByShift, hasAnyShiftData, identifyCoreUser, initializeCoreMixpanel, isEfficiencyOnTrack, isFullMonthRange, isLegacyConfiguration, isPrefetchError, isSafari, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeDateKeyRange, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, setSentryUserContext, setSentryWorkspaceContext, 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, 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 };
|
|
76331
|
+
export { 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, Legend6 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, RegistryProvider, RoleBadge, S3ClipsSupabaseService as S3ClipsService, S3Service, 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, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHealthCard, WorkspaceHealthView_default as WorkspaceHealthView, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyHistory, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, aggregateKPIsFromLineMetricsRows, alertsService, apiUtils, areAllLinesOnSameShift, authCoreService, authOTPService, authRateLimitService, awardsService, buildDateKey, buildKPIsFromLineMetricsRow, buildShiftGroupsKey, canRoleAccessDashboardPath, canRoleAccessTeamManagement, canRoleAssignFactories, canRoleAssignLines, canRoleChangeRole, canRoleInviteRole, canRoleManageCompany, canRoleManageTargets, canRoleManageUsers, canRoleRemoveUser, canRoleViewClipsCost, canRoleViewUsageStats, captureSentryException, captureSentryMessage, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearSentryContext, clearWorkspaceDisplayNamesCache, cn, createDefaultKPIs, createInvitationService, createLinesService, createSessionTracker, createStorageService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, fetchIdleTimeReasons, filterDataByDateKeyRange, forceRefreshWorkspaceDisplayNames, formatAwardMonth, formatDateInZone, formatDateKeyForDisplay, formatDateTimeInZone, formatDuration2 as formatDuration, formatISTDate, formatIdleTime, formatRangeLabel, formatReasonLabel, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAllWorkspaceDisplayNamesSnapshot, getAnonClient, getAssignableRoles, getAssignmentColumnLabel, getAvailableShiftIds, getAwardBadgeType, getAwardDescription, getAwardTitle, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentShiftForLine, getCurrentTimeInZone, getCurrentWeekToDateRange, getDashboardHeaderTimeInZone, getDateKeyFromDate, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getInitials, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getMonthKeyBounds, getMonthWeekRanges, getNextUpdateInterval, getOperationalDate, getReasonColor, 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, isLegacyConfiguration, isPrefetchError, isSafari, isSupervisorRole, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, lineLeaderboardService, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, normalizeDateKeyRange, normalizeRoleLevel, optifyeAgentClient, parseDateKeyToDate, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, setSentryUserContext, setSentryWorkspaceContext, 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, 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 };
|