@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.js
CHANGED
|
@@ -54,12 +54,1550 @@ var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive)
|
|
|
54
54
|
var html2canvas__default = /*#__PURE__*/_interopDefault(html2canvas);
|
|
55
55
|
var jsPDF__default = /*#__PURE__*/_interopDefault(jsPDF);
|
|
56
56
|
|
|
57
|
+
var __create = Object.create;
|
|
58
|
+
var __defProp = Object.defineProperty;
|
|
59
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
60
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
61
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
62
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
57
63
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
58
64
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
59
65
|
}) : x)(function(x) {
|
|
60
66
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
61
67
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
62
68
|
});
|
|
69
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
70
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
71
|
+
};
|
|
72
|
+
var __copyProps = (to, from, except, desc) => {
|
|
73
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
74
|
+
for (let key of __getOwnPropNames(from))
|
|
75
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
76
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
77
|
+
}
|
|
78
|
+
return to;
|
|
79
|
+
};
|
|
80
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
81
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
82
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
83
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
84
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
85
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
86
|
+
mod
|
|
87
|
+
));
|
|
88
|
+
|
|
89
|
+
// ../../node_modules/lodash/_listCacheClear.js
|
|
90
|
+
var require_listCacheClear = __commonJS({
|
|
91
|
+
"../../node_modules/lodash/_listCacheClear.js"(exports, module) {
|
|
92
|
+
function listCacheClear() {
|
|
93
|
+
this.__data__ = [];
|
|
94
|
+
this.size = 0;
|
|
95
|
+
}
|
|
96
|
+
module.exports = listCacheClear;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// ../../node_modules/lodash/eq.js
|
|
101
|
+
var require_eq = __commonJS({
|
|
102
|
+
"../../node_modules/lodash/eq.js"(exports, module) {
|
|
103
|
+
function eq(value, other) {
|
|
104
|
+
return value === other || value !== value && other !== other;
|
|
105
|
+
}
|
|
106
|
+
module.exports = eq;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// ../../node_modules/lodash/_assocIndexOf.js
|
|
111
|
+
var require_assocIndexOf = __commonJS({
|
|
112
|
+
"../../node_modules/lodash/_assocIndexOf.js"(exports, module) {
|
|
113
|
+
var eq = require_eq();
|
|
114
|
+
function assocIndexOf(array, key) {
|
|
115
|
+
var length = array.length;
|
|
116
|
+
while (length--) {
|
|
117
|
+
if (eq(array[length][0], key)) {
|
|
118
|
+
return length;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return -1;
|
|
122
|
+
}
|
|
123
|
+
module.exports = assocIndexOf;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// ../../node_modules/lodash/_listCacheDelete.js
|
|
128
|
+
var require_listCacheDelete = __commonJS({
|
|
129
|
+
"../../node_modules/lodash/_listCacheDelete.js"(exports, module) {
|
|
130
|
+
var assocIndexOf = require_assocIndexOf();
|
|
131
|
+
var arrayProto = Array.prototype;
|
|
132
|
+
var splice = arrayProto.splice;
|
|
133
|
+
function listCacheDelete(key) {
|
|
134
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
135
|
+
if (index < 0) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
var lastIndex = data.length - 1;
|
|
139
|
+
if (index == lastIndex) {
|
|
140
|
+
data.pop();
|
|
141
|
+
} else {
|
|
142
|
+
splice.call(data, index, 1);
|
|
143
|
+
}
|
|
144
|
+
--this.size;
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
module.exports = listCacheDelete;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// ../../node_modules/lodash/_listCacheGet.js
|
|
152
|
+
var require_listCacheGet = __commonJS({
|
|
153
|
+
"../../node_modules/lodash/_listCacheGet.js"(exports, module) {
|
|
154
|
+
var assocIndexOf = require_assocIndexOf();
|
|
155
|
+
function listCacheGet(key) {
|
|
156
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
157
|
+
return index < 0 ? void 0 : data[index][1];
|
|
158
|
+
}
|
|
159
|
+
module.exports = listCacheGet;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// ../../node_modules/lodash/_listCacheHas.js
|
|
164
|
+
var require_listCacheHas = __commonJS({
|
|
165
|
+
"../../node_modules/lodash/_listCacheHas.js"(exports, module) {
|
|
166
|
+
var assocIndexOf = require_assocIndexOf();
|
|
167
|
+
function listCacheHas(key) {
|
|
168
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
169
|
+
}
|
|
170
|
+
module.exports = listCacheHas;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// ../../node_modules/lodash/_listCacheSet.js
|
|
175
|
+
var require_listCacheSet = __commonJS({
|
|
176
|
+
"../../node_modules/lodash/_listCacheSet.js"(exports, module) {
|
|
177
|
+
var assocIndexOf = require_assocIndexOf();
|
|
178
|
+
function listCacheSet(key, value) {
|
|
179
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
180
|
+
if (index < 0) {
|
|
181
|
+
++this.size;
|
|
182
|
+
data.push([key, value]);
|
|
183
|
+
} else {
|
|
184
|
+
data[index][1] = value;
|
|
185
|
+
}
|
|
186
|
+
return this;
|
|
187
|
+
}
|
|
188
|
+
module.exports = listCacheSet;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// ../../node_modules/lodash/_ListCache.js
|
|
193
|
+
var require_ListCache = __commonJS({
|
|
194
|
+
"../../node_modules/lodash/_ListCache.js"(exports, module) {
|
|
195
|
+
var listCacheClear = require_listCacheClear();
|
|
196
|
+
var listCacheDelete = require_listCacheDelete();
|
|
197
|
+
var listCacheGet = require_listCacheGet();
|
|
198
|
+
var listCacheHas = require_listCacheHas();
|
|
199
|
+
var listCacheSet = require_listCacheSet();
|
|
200
|
+
function ListCache(entries) {
|
|
201
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
202
|
+
this.clear();
|
|
203
|
+
while (++index < length) {
|
|
204
|
+
var entry = entries[index];
|
|
205
|
+
this.set(entry[0], entry[1]);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
ListCache.prototype.clear = listCacheClear;
|
|
209
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
210
|
+
ListCache.prototype.get = listCacheGet;
|
|
211
|
+
ListCache.prototype.has = listCacheHas;
|
|
212
|
+
ListCache.prototype.set = listCacheSet;
|
|
213
|
+
module.exports = ListCache;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
// ../../node_modules/lodash/_stackClear.js
|
|
218
|
+
var require_stackClear = __commonJS({
|
|
219
|
+
"../../node_modules/lodash/_stackClear.js"(exports, module) {
|
|
220
|
+
var ListCache = require_ListCache();
|
|
221
|
+
function stackClear() {
|
|
222
|
+
this.__data__ = new ListCache();
|
|
223
|
+
this.size = 0;
|
|
224
|
+
}
|
|
225
|
+
module.exports = stackClear;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// ../../node_modules/lodash/_stackDelete.js
|
|
230
|
+
var require_stackDelete = __commonJS({
|
|
231
|
+
"../../node_modules/lodash/_stackDelete.js"(exports, module) {
|
|
232
|
+
function stackDelete(key) {
|
|
233
|
+
var data = this.__data__, result = data["delete"](key);
|
|
234
|
+
this.size = data.size;
|
|
235
|
+
return result;
|
|
236
|
+
}
|
|
237
|
+
module.exports = stackDelete;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
// ../../node_modules/lodash/_stackGet.js
|
|
242
|
+
var require_stackGet = __commonJS({
|
|
243
|
+
"../../node_modules/lodash/_stackGet.js"(exports, module) {
|
|
244
|
+
function stackGet(key) {
|
|
245
|
+
return this.__data__.get(key);
|
|
246
|
+
}
|
|
247
|
+
module.exports = stackGet;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// ../../node_modules/lodash/_stackHas.js
|
|
252
|
+
var require_stackHas = __commonJS({
|
|
253
|
+
"../../node_modules/lodash/_stackHas.js"(exports, module) {
|
|
254
|
+
function stackHas(key) {
|
|
255
|
+
return this.__data__.has(key);
|
|
256
|
+
}
|
|
257
|
+
module.exports = stackHas;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// ../../node_modules/lodash/_freeGlobal.js
|
|
262
|
+
var require_freeGlobal = __commonJS({
|
|
263
|
+
"../../node_modules/lodash/_freeGlobal.js"(exports, module) {
|
|
264
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
265
|
+
module.exports = freeGlobal;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// ../../node_modules/lodash/_root.js
|
|
270
|
+
var require_root = __commonJS({
|
|
271
|
+
"../../node_modules/lodash/_root.js"(exports, module) {
|
|
272
|
+
var freeGlobal = require_freeGlobal();
|
|
273
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
274
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
275
|
+
module.exports = root;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// ../../node_modules/lodash/_Symbol.js
|
|
280
|
+
var require_Symbol = __commonJS({
|
|
281
|
+
"../../node_modules/lodash/_Symbol.js"(exports, module) {
|
|
282
|
+
var root = require_root();
|
|
283
|
+
var Symbol2 = root.Symbol;
|
|
284
|
+
module.exports = Symbol2;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// ../../node_modules/lodash/_getRawTag.js
|
|
289
|
+
var require_getRawTag = __commonJS({
|
|
290
|
+
"../../node_modules/lodash/_getRawTag.js"(exports, module) {
|
|
291
|
+
var Symbol2 = require_Symbol();
|
|
292
|
+
var objectProto = Object.prototype;
|
|
293
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
294
|
+
var nativeObjectToString = objectProto.toString;
|
|
295
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
296
|
+
function getRawTag(value) {
|
|
297
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
298
|
+
try {
|
|
299
|
+
value[symToStringTag] = void 0;
|
|
300
|
+
var unmasked = true;
|
|
301
|
+
} catch (e) {
|
|
302
|
+
}
|
|
303
|
+
var result = nativeObjectToString.call(value);
|
|
304
|
+
if (unmasked) {
|
|
305
|
+
if (isOwn) {
|
|
306
|
+
value[symToStringTag] = tag;
|
|
307
|
+
} else {
|
|
308
|
+
delete value[symToStringTag];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return result;
|
|
312
|
+
}
|
|
313
|
+
module.exports = getRawTag;
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
// ../../node_modules/lodash/_objectToString.js
|
|
318
|
+
var require_objectToString = __commonJS({
|
|
319
|
+
"../../node_modules/lodash/_objectToString.js"(exports, module) {
|
|
320
|
+
var objectProto = Object.prototype;
|
|
321
|
+
var nativeObjectToString = objectProto.toString;
|
|
322
|
+
function objectToString(value) {
|
|
323
|
+
return nativeObjectToString.call(value);
|
|
324
|
+
}
|
|
325
|
+
module.exports = objectToString;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
// ../../node_modules/lodash/_baseGetTag.js
|
|
330
|
+
var require_baseGetTag = __commonJS({
|
|
331
|
+
"../../node_modules/lodash/_baseGetTag.js"(exports, module) {
|
|
332
|
+
var Symbol2 = require_Symbol();
|
|
333
|
+
var getRawTag = require_getRawTag();
|
|
334
|
+
var objectToString = require_objectToString();
|
|
335
|
+
var nullTag = "[object Null]";
|
|
336
|
+
var undefinedTag = "[object Undefined]";
|
|
337
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
338
|
+
function baseGetTag(value) {
|
|
339
|
+
if (value == null) {
|
|
340
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
341
|
+
}
|
|
342
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
343
|
+
}
|
|
344
|
+
module.exports = baseGetTag;
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
// ../../node_modules/lodash/isObject.js
|
|
349
|
+
var require_isObject = __commonJS({
|
|
350
|
+
"../../node_modules/lodash/isObject.js"(exports, module) {
|
|
351
|
+
function isObject2(value) {
|
|
352
|
+
var type = typeof value;
|
|
353
|
+
return value != null && (type == "object" || type == "function");
|
|
354
|
+
}
|
|
355
|
+
module.exports = isObject2;
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
// ../../node_modules/lodash/isFunction.js
|
|
360
|
+
var require_isFunction = __commonJS({
|
|
361
|
+
"../../node_modules/lodash/isFunction.js"(exports, module) {
|
|
362
|
+
var baseGetTag = require_baseGetTag();
|
|
363
|
+
var isObject2 = require_isObject();
|
|
364
|
+
var asyncTag = "[object AsyncFunction]";
|
|
365
|
+
var funcTag = "[object Function]";
|
|
366
|
+
var genTag = "[object GeneratorFunction]";
|
|
367
|
+
var proxyTag = "[object Proxy]";
|
|
368
|
+
function isFunction(value) {
|
|
369
|
+
if (!isObject2(value)) {
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
var tag = baseGetTag(value);
|
|
373
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
374
|
+
}
|
|
375
|
+
module.exports = isFunction;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// ../../node_modules/lodash/_coreJsData.js
|
|
380
|
+
var require_coreJsData = __commonJS({
|
|
381
|
+
"../../node_modules/lodash/_coreJsData.js"(exports, module) {
|
|
382
|
+
var root = require_root();
|
|
383
|
+
var coreJsData = root["__core-js_shared__"];
|
|
384
|
+
module.exports = coreJsData;
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
// ../../node_modules/lodash/_isMasked.js
|
|
389
|
+
var require_isMasked = __commonJS({
|
|
390
|
+
"../../node_modules/lodash/_isMasked.js"(exports, module) {
|
|
391
|
+
var coreJsData = require_coreJsData();
|
|
392
|
+
var maskSrcKey = function() {
|
|
393
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
394
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
395
|
+
}();
|
|
396
|
+
function isMasked(func) {
|
|
397
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
398
|
+
}
|
|
399
|
+
module.exports = isMasked;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// ../../node_modules/lodash/_toSource.js
|
|
404
|
+
var require_toSource = __commonJS({
|
|
405
|
+
"../../node_modules/lodash/_toSource.js"(exports, module) {
|
|
406
|
+
var funcProto = Function.prototype;
|
|
407
|
+
var funcToString = funcProto.toString;
|
|
408
|
+
function toSource(func) {
|
|
409
|
+
if (func != null) {
|
|
410
|
+
try {
|
|
411
|
+
return funcToString.call(func);
|
|
412
|
+
} catch (e) {
|
|
413
|
+
}
|
|
414
|
+
try {
|
|
415
|
+
return func + "";
|
|
416
|
+
} catch (e) {
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return "";
|
|
420
|
+
}
|
|
421
|
+
module.exports = toSource;
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
// ../../node_modules/lodash/_baseIsNative.js
|
|
426
|
+
var require_baseIsNative = __commonJS({
|
|
427
|
+
"../../node_modules/lodash/_baseIsNative.js"(exports, module) {
|
|
428
|
+
var isFunction = require_isFunction();
|
|
429
|
+
var isMasked = require_isMasked();
|
|
430
|
+
var isObject2 = require_isObject();
|
|
431
|
+
var toSource = require_toSource();
|
|
432
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
433
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
434
|
+
var funcProto = Function.prototype;
|
|
435
|
+
var objectProto = Object.prototype;
|
|
436
|
+
var funcToString = funcProto.toString;
|
|
437
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
438
|
+
var reIsNative = RegExp(
|
|
439
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
440
|
+
);
|
|
441
|
+
function baseIsNative(value) {
|
|
442
|
+
if (!isObject2(value) || isMasked(value)) {
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
446
|
+
return pattern.test(toSource(value));
|
|
447
|
+
}
|
|
448
|
+
module.exports = baseIsNative;
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
// ../../node_modules/lodash/_getValue.js
|
|
453
|
+
var require_getValue = __commonJS({
|
|
454
|
+
"../../node_modules/lodash/_getValue.js"(exports, module) {
|
|
455
|
+
function getValue(object, key) {
|
|
456
|
+
return object == null ? void 0 : object[key];
|
|
457
|
+
}
|
|
458
|
+
module.exports = getValue;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
// ../../node_modules/lodash/_getNative.js
|
|
463
|
+
var require_getNative = __commonJS({
|
|
464
|
+
"../../node_modules/lodash/_getNative.js"(exports, module) {
|
|
465
|
+
var baseIsNative = require_baseIsNative();
|
|
466
|
+
var getValue = require_getValue();
|
|
467
|
+
function getNative(object, key) {
|
|
468
|
+
var value = getValue(object, key);
|
|
469
|
+
return baseIsNative(value) ? value : void 0;
|
|
470
|
+
}
|
|
471
|
+
module.exports = getNative;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
// ../../node_modules/lodash/_Map.js
|
|
476
|
+
var require_Map = __commonJS({
|
|
477
|
+
"../../node_modules/lodash/_Map.js"(exports, module) {
|
|
478
|
+
var getNative = require_getNative();
|
|
479
|
+
var root = require_root();
|
|
480
|
+
var Map2 = getNative(root, "Map");
|
|
481
|
+
module.exports = Map2;
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
// ../../node_modules/lodash/_nativeCreate.js
|
|
486
|
+
var require_nativeCreate = __commonJS({
|
|
487
|
+
"../../node_modules/lodash/_nativeCreate.js"(exports, module) {
|
|
488
|
+
var getNative = require_getNative();
|
|
489
|
+
var nativeCreate = getNative(Object, "create");
|
|
490
|
+
module.exports = nativeCreate;
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
// ../../node_modules/lodash/_hashClear.js
|
|
495
|
+
var require_hashClear = __commonJS({
|
|
496
|
+
"../../node_modules/lodash/_hashClear.js"(exports, module) {
|
|
497
|
+
var nativeCreate = require_nativeCreate();
|
|
498
|
+
function hashClear() {
|
|
499
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
500
|
+
this.size = 0;
|
|
501
|
+
}
|
|
502
|
+
module.exports = hashClear;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// ../../node_modules/lodash/_hashDelete.js
|
|
507
|
+
var require_hashDelete = __commonJS({
|
|
508
|
+
"../../node_modules/lodash/_hashDelete.js"(exports, module) {
|
|
509
|
+
function hashDelete(key) {
|
|
510
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
511
|
+
this.size -= result ? 1 : 0;
|
|
512
|
+
return result;
|
|
513
|
+
}
|
|
514
|
+
module.exports = hashDelete;
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
// ../../node_modules/lodash/_hashGet.js
|
|
519
|
+
var require_hashGet = __commonJS({
|
|
520
|
+
"../../node_modules/lodash/_hashGet.js"(exports, module) {
|
|
521
|
+
var nativeCreate = require_nativeCreate();
|
|
522
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
523
|
+
var objectProto = Object.prototype;
|
|
524
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
525
|
+
function hashGet(key) {
|
|
526
|
+
var data = this.__data__;
|
|
527
|
+
if (nativeCreate) {
|
|
528
|
+
var result = data[key];
|
|
529
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
530
|
+
}
|
|
531
|
+
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
532
|
+
}
|
|
533
|
+
module.exports = hashGet;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// ../../node_modules/lodash/_hashHas.js
|
|
538
|
+
var require_hashHas = __commonJS({
|
|
539
|
+
"../../node_modules/lodash/_hashHas.js"(exports, module) {
|
|
540
|
+
var nativeCreate = require_nativeCreate();
|
|
541
|
+
var objectProto = Object.prototype;
|
|
542
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
543
|
+
function hashHas(key) {
|
|
544
|
+
var data = this.__data__;
|
|
545
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
546
|
+
}
|
|
547
|
+
module.exports = hashHas;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
// ../../node_modules/lodash/_hashSet.js
|
|
552
|
+
var require_hashSet = __commonJS({
|
|
553
|
+
"../../node_modules/lodash/_hashSet.js"(exports, module) {
|
|
554
|
+
var nativeCreate = require_nativeCreate();
|
|
555
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
556
|
+
function hashSet(key, value) {
|
|
557
|
+
var data = this.__data__;
|
|
558
|
+
this.size += this.has(key) ? 0 : 1;
|
|
559
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
560
|
+
return this;
|
|
561
|
+
}
|
|
562
|
+
module.exports = hashSet;
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
|
|
566
|
+
// ../../node_modules/lodash/_Hash.js
|
|
567
|
+
var require_Hash = __commonJS({
|
|
568
|
+
"../../node_modules/lodash/_Hash.js"(exports, module) {
|
|
569
|
+
var hashClear = require_hashClear();
|
|
570
|
+
var hashDelete = require_hashDelete();
|
|
571
|
+
var hashGet = require_hashGet();
|
|
572
|
+
var hashHas = require_hashHas();
|
|
573
|
+
var hashSet = require_hashSet();
|
|
574
|
+
function Hash(entries) {
|
|
575
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
576
|
+
this.clear();
|
|
577
|
+
while (++index < length) {
|
|
578
|
+
var entry = entries[index];
|
|
579
|
+
this.set(entry[0], entry[1]);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
Hash.prototype.clear = hashClear;
|
|
583
|
+
Hash.prototype["delete"] = hashDelete;
|
|
584
|
+
Hash.prototype.get = hashGet;
|
|
585
|
+
Hash.prototype.has = hashHas;
|
|
586
|
+
Hash.prototype.set = hashSet;
|
|
587
|
+
module.exports = Hash;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
// ../../node_modules/lodash/_mapCacheClear.js
|
|
592
|
+
var require_mapCacheClear = __commonJS({
|
|
593
|
+
"../../node_modules/lodash/_mapCacheClear.js"(exports, module) {
|
|
594
|
+
var Hash = require_Hash();
|
|
595
|
+
var ListCache = require_ListCache();
|
|
596
|
+
var Map2 = require_Map();
|
|
597
|
+
function mapCacheClear() {
|
|
598
|
+
this.size = 0;
|
|
599
|
+
this.__data__ = {
|
|
600
|
+
"hash": new Hash(),
|
|
601
|
+
"map": new (Map2 || ListCache)(),
|
|
602
|
+
"string": new Hash()
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
module.exports = mapCacheClear;
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
// ../../node_modules/lodash/_isKeyable.js
|
|
610
|
+
var require_isKeyable = __commonJS({
|
|
611
|
+
"../../node_modules/lodash/_isKeyable.js"(exports, module) {
|
|
612
|
+
function isKeyable(value) {
|
|
613
|
+
var type = typeof value;
|
|
614
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
615
|
+
}
|
|
616
|
+
module.exports = isKeyable;
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
// ../../node_modules/lodash/_getMapData.js
|
|
621
|
+
var require_getMapData = __commonJS({
|
|
622
|
+
"../../node_modules/lodash/_getMapData.js"(exports, module) {
|
|
623
|
+
var isKeyable = require_isKeyable();
|
|
624
|
+
function getMapData(map, key) {
|
|
625
|
+
var data = map.__data__;
|
|
626
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
627
|
+
}
|
|
628
|
+
module.exports = getMapData;
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
// ../../node_modules/lodash/_mapCacheDelete.js
|
|
633
|
+
var require_mapCacheDelete = __commonJS({
|
|
634
|
+
"../../node_modules/lodash/_mapCacheDelete.js"(exports, module) {
|
|
635
|
+
var getMapData = require_getMapData();
|
|
636
|
+
function mapCacheDelete(key) {
|
|
637
|
+
var result = getMapData(this, key)["delete"](key);
|
|
638
|
+
this.size -= result ? 1 : 0;
|
|
639
|
+
return result;
|
|
640
|
+
}
|
|
641
|
+
module.exports = mapCacheDelete;
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
// ../../node_modules/lodash/_mapCacheGet.js
|
|
646
|
+
var require_mapCacheGet = __commonJS({
|
|
647
|
+
"../../node_modules/lodash/_mapCacheGet.js"(exports, module) {
|
|
648
|
+
var getMapData = require_getMapData();
|
|
649
|
+
function mapCacheGet(key) {
|
|
650
|
+
return getMapData(this, key).get(key);
|
|
651
|
+
}
|
|
652
|
+
module.exports = mapCacheGet;
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
// ../../node_modules/lodash/_mapCacheHas.js
|
|
657
|
+
var require_mapCacheHas = __commonJS({
|
|
658
|
+
"../../node_modules/lodash/_mapCacheHas.js"(exports, module) {
|
|
659
|
+
var getMapData = require_getMapData();
|
|
660
|
+
function mapCacheHas(key) {
|
|
661
|
+
return getMapData(this, key).has(key);
|
|
662
|
+
}
|
|
663
|
+
module.exports = mapCacheHas;
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
// ../../node_modules/lodash/_mapCacheSet.js
|
|
668
|
+
var require_mapCacheSet = __commonJS({
|
|
669
|
+
"../../node_modules/lodash/_mapCacheSet.js"(exports, module) {
|
|
670
|
+
var getMapData = require_getMapData();
|
|
671
|
+
function mapCacheSet(key, value) {
|
|
672
|
+
var data = getMapData(this, key), size = data.size;
|
|
673
|
+
data.set(key, value);
|
|
674
|
+
this.size += data.size == size ? 0 : 1;
|
|
675
|
+
return this;
|
|
676
|
+
}
|
|
677
|
+
module.exports = mapCacheSet;
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
// ../../node_modules/lodash/_MapCache.js
|
|
682
|
+
var require_MapCache = __commonJS({
|
|
683
|
+
"../../node_modules/lodash/_MapCache.js"(exports, module) {
|
|
684
|
+
var mapCacheClear = require_mapCacheClear();
|
|
685
|
+
var mapCacheDelete = require_mapCacheDelete();
|
|
686
|
+
var mapCacheGet = require_mapCacheGet();
|
|
687
|
+
var mapCacheHas = require_mapCacheHas();
|
|
688
|
+
var mapCacheSet = require_mapCacheSet();
|
|
689
|
+
function MapCache(entries) {
|
|
690
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
691
|
+
this.clear();
|
|
692
|
+
while (++index < length) {
|
|
693
|
+
var entry = entries[index];
|
|
694
|
+
this.set(entry[0], entry[1]);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
698
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
699
|
+
MapCache.prototype.get = mapCacheGet;
|
|
700
|
+
MapCache.prototype.has = mapCacheHas;
|
|
701
|
+
MapCache.prototype.set = mapCacheSet;
|
|
702
|
+
module.exports = MapCache;
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
// ../../node_modules/lodash/_stackSet.js
|
|
707
|
+
var require_stackSet = __commonJS({
|
|
708
|
+
"../../node_modules/lodash/_stackSet.js"(exports, module) {
|
|
709
|
+
var ListCache = require_ListCache();
|
|
710
|
+
var Map2 = require_Map();
|
|
711
|
+
var MapCache = require_MapCache();
|
|
712
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
713
|
+
function stackSet(key, value) {
|
|
714
|
+
var data = this.__data__;
|
|
715
|
+
if (data instanceof ListCache) {
|
|
716
|
+
var pairs = data.__data__;
|
|
717
|
+
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
718
|
+
pairs.push([key, value]);
|
|
719
|
+
this.size = ++data.size;
|
|
720
|
+
return this;
|
|
721
|
+
}
|
|
722
|
+
data = this.__data__ = new MapCache(pairs);
|
|
723
|
+
}
|
|
724
|
+
data.set(key, value);
|
|
725
|
+
this.size = data.size;
|
|
726
|
+
return this;
|
|
727
|
+
}
|
|
728
|
+
module.exports = stackSet;
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
|
|
732
|
+
// ../../node_modules/lodash/_Stack.js
|
|
733
|
+
var require_Stack = __commonJS({
|
|
734
|
+
"../../node_modules/lodash/_Stack.js"(exports, module) {
|
|
735
|
+
var ListCache = require_ListCache();
|
|
736
|
+
var stackClear = require_stackClear();
|
|
737
|
+
var stackDelete = require_stackDelete();
|
|
738
|
+
var stackGet = require_stackGet();
|
|
739
|
+
var stackHas = require_stackHas();
|
|
740
|
+
var stackSet = require_stackSet();
|
|
741
|
+
function Stack(entries) {
|
|
742
|
+
var data = this.__data__ = new ListCache(entries);
|
|
743
|
+
this.size = data.size;
|
|
744
|
+
}
|
|
745
|
+
Stack.prototype.clear = stackClear;
|
|
746
|
+
Stack.prototype["delete"] = stackDelete;
|
|
747
|
+
Stack.prototype.get = stackGet;
|
|
748
|
+
Stack.prototype.has = stackHas;
|
|
749
|
+
Stack.prototype.set = stackSet;
|
|
750
|
+
module.exports = Stack;
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
// ../../node_modules/lodash/_setCacheAdd.js
|
|
755
|
+
var require_setCacheAdd = __commonJS({
|
|
756
|
+
"../../node_modules/lodash/_setCacheAdd.js"(exports, module) {
|
|
757
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
758
|
+
function setCacheAdd(value) {
|
|
759
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
760
|
+
return this;
|
|
761
|
+
}
|
|
762
|
+
module.exports = setCacheAdd;
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
|
|
766
|
+
// ../../node_modules/lodash/_setCacheHas.js
|
|
767
|
+
var require_setCacheHas = __commonJS({
|
|
768
|
+
"../../node_modules/lodash/_setCacheHas.js"(exports, module) {
|
|
769
|
+
function setCacheHas(value) {
|
|
770
|
+
return this.__data__.has(value);
|
|
771
|
+
}
|
|
772
|
+
module.exports = setCacheHas;
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
// ../../node_modules/lodash/_SetCache.js
|
|
777
|
+
var require_SetCache = __commonJS({
|
|
778
|
+
"../../node_modules/lodash/_SetCache.js"(exports, module) {
|
|
779
|
+
var MapCache = require_MapCache();
|
|
780
|
+
var setCacheAdd = require_setCacheAdd();
|
|
781
|
+
var setCacheHas = require_setCacheHas();
|
|
782
|
+
function SetCache(values) {
|
|
783
|
+
var index = -1, length = values == null ? 0 : values.length;
|
|
784
|
+
this.__data__ = new MapCache();
|
|
785
|
+
while (++index < length) {
|
|
786
|
+
this.add(values[index]);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
790
|
+
SetCache.prototype.has = setCacheHas;
|
|
791
|
+
module.exports = SetCache;
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
// ../../node_modules/lodash/_arraySome.js
|
|
796
|
+
var require_arraySome = __commonJS({
|
|
797
|
+
"../../node_modules/lodash/_arraySome.js"(exports, module) {
|
|
798
|
+
function arraySome(array, predicate) {
|
|
799
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
800
|
+
while (++index < length) {
|
|
801
|
+
if (predicate(array[index], index, array)) {
|
|
802
|
+
return true;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
return false;
|
|
806
|
+
}
|
|
807
|
+
module.exports = arraySome;
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
// ../../node_modules/lodash/_cacheHas.js
|
|
812
|
+
var require_cacheHas = __commonJS({
|
|
813
|
+
"../../node_modules/lodash/_cacheHas.js"(exports, module) {
|
|
814
|
+
function cacheHas(cache, key) {
|
|
815
|
+
return cache.has(key);
|
|
816
|
+
}
|
|
817
|
+
module.exports = cacheHas;
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
// ../../node_modules/lodash/_equalArrays.js
|
|
822
|
+
var require_equalArrays = __commonJS({
|
|
823
|
+
"../../node_modules/lodash/_equalArrays.js"(exports, module) {
|
|
824
|
+
var SetCache = require_SetCache();
|
|
825
|
+
var arraySome = require_arraySome();
|
|
826
|
+
var cacheHas = require_cacheHas();
|
|
827
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
828
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
829
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
830
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
831
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
832
|
+
return false;
|
|
833
|
+
}
|
|
834
|
+
var arrStacked = stack.get(array);
|
|
835
|
+
var othStacked = stack.get(other);
|
|
836
|
+
if (arrStacked && othStacked) {
|
|
837
|
+
return arrStacked == other && othStacked == array;
|
|
838
|
+
}
|
|
839
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
|
|
840
|
+
stack.set(array, other);
|
|
841
|
+
stack.set(other, array);
|
|
842
|
+
while (++index < arrLength) {
|
|
843
|
+
var arrValue = array[index], othValue = other[index];
|
|
844
|
+
if (customizer) {
|
|
845
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
846
|
+
}
|
|
847
|
+
if (compared !== void 0) {
|
|
848
|
+
if (compared) {
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
result = false;
|
|
852
|
+
break;
|
|
853
|
+
}
|
|
854
|
+
if (seen) {
|
|
855
|
+
if (!arraySome(other, function(othValue2, othIndex) {
|
|
856
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
857
|
+
return seen.push(othIndex);
|
|
858
|
+
}
|
|
859
|
+
})) {
|
|
860
|
+
result = false;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
864
|
+
result = false;
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
stack["delete"](array);
|
|
869
|
+
stack["delete"](other);
|
|
870
|
+
return result;
|
|
871
|
+
}
|
|
872
|
+
module.exports = equalArrays;
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
// ../../node_modules/lodash/_Uint8Array.js
|
|
877
|
+
var require_Uint8Array = __commonJS({
|
|
878
|
+
"../../node_modules/lodash/_Uint8Array.js"(exports, module) {
|
|
879
|
+
var root = require_root();
|
|
880
|
+
var Uint8Array2 = root.Uint8Array;
|
|
881
|
+
module.exports = Uint8Array2;
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
|
|
885
|
+
// ../../node_modules/lodash/_mapToArray.js
|
|
886
|
+
var require_mapToArray = __commonJS({
|
|
887
|
+
"../../node_modules/lodash/_mapToArray.js"(exports, module) {
|
|
888
|
+
function mapToArray(map) {
|
|
889
|
+
var index = -1, result = Array(map.size);
|
|
890
|
+
map.forEach(function(value, key) {
|
|
891
|
+
result[++index] = [key, value];
|
|
892
|
+
});
|
|
893
|
+
return result;
|
|
894
|
+
}
|
|
895
|
+
module.exports = mapToArray;
|
|
896
|
+
}
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
// ../../node_modules/lodash/_setToArray.js
|
|
900
|
+
var require_setToArray = __commonJS({
|
|
901
|
+
"../../node_modules/lodash/_setToArray.js"(exports, module) {
|
|
902
|
+
function setToArray(set) {
|
|
903
|
+
var index = -1, result = Array(set.size);
|
|
904
|
+
set.forEach(function(value) {
|
|
905
|
+
result[++index] = value;
|
|
906
|
+
});
|
|
907
|
+
return result;
|
|
908
|
+
}
|
|
909
|
+
module.exports = setToArray;
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
|
|
913
|
+
// ../../node_modules/lodash/_equalByTag.js
|
|
914
|
+
var require_equalByTag = __commonJS({
|
|
915
|
+
"../../node_modules/lodash/_equalByTag.js"(exports, module) {
|
|
916
|
+
var Symbol2 = require_Symbol();
|
|
917
|
+
var Uint8Array2 = require_Uint8Array();
|
|
918
|
+
var eq = require_eq();
|
|
919
|
+
var equalArrays = require_equalArrays();
|
|
920
|
+
var mapToArray = require_mapToArray();
|
|
921
|
+
var setToArray = require_setToArray();
|
|
922
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
923
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
924
|
+
var boolTag = "[object Boolean]";
|
|
925
|
+
var dateTag = "[object Date]";
|
|
926
|
+
var errorTag = "[object Error]";
|
|
927
|
+
var mapTag = "[object Map]";
|
|
928
|
+
var numberTag = "[object Number]";
|
|
929
|
+
var regexpTag = "[object RegExp]";
|
|
930
|
+
var setTag = "[object Set]";
|
|
931
|
+
var stringTag = "[object String]";
|
|
932
|
+
var symbolTag = "[object Symbol]";
|
|
933
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
934
|
+
var dataViewTag = "[object DataView]";
|
|
935
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
|
|
936
|
+
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
937
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
938
|
+
switch (tag) {
|
|
939
|
+
case dataViewTag:
|
|
940
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
941
|
+
return false;
|
|
942
|
+
}
|
|
943
|
+
object = object.buffer;
|
|
944
|
+
other = other.buffer;
|
|
945
|
+
case arrayBufferTag:
|
|
946
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
|
|
947
|
+
return false;
|
|
948
|
+
}
|
|
949
|
+
return true;
|
|
950
|
+
case boolTag:
|
|
951
|
+
case dateTag:
|
|
952
|
+
case numberTag:
|
|
953
|
+
return eq(+object, +other);
|
|
954
|
+
case errorTag:
|
|
955
|
+
return object.name == other.name && object.message == other.message;
|
|
956
|
+
case regexpTag:
|
|
957
|
+
case stringTag:
|
|
958
|
+
return object == other + "";
|
|
959
|
+
case mapTag:
|
|
960
|
+
var convert = mapToArray;
|
|
961
|
+
case setTag:
|
|
962
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
|
963
|
+
convert || (convert = setToArray);
|
|
964
|
+
if (object.size != other.size && !isPartial) {
|
|
965
|
+
return false;
|
|
966
|
+
}
|
|
967
|
+
var stacked = stack.get(object);
|
|
968
|
+
if (stacked) {
|
|
969
|
+
return stacked == other;
|
|
970
|
+
}
|
|
971
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
972
|
+
stack.set(object, other);
|
|
973
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
974
|
+
stack["delete"](object);
|
|
975
|
+
return result;
|
|
976
|
+
case symbolTag:
|
|
977
|
+
if (symbolValueOf) {
|
|
978
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
module.exports = equalByTag;
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
|
|
987
|
+
// ../../node_modules/lodash/_arrayPush.js
|
|
988
|
+
var require_arrayPush = __commonJS({
|
|
989
|
+
"../../node_modules/lodash/_arrayPush.js"(exports, module) {
|
|
990
|
+
function arrayPush(array, values) {
|
|
991
|
+
var index = -1, length = values.length, offset = array.length;
|
|
992
|
+
while (++index < length) {
|
|
993
|
+
array[offset + index] = values[index];
|
|
994
|
+
}
|
|
995
|
+
return array;
|
|
996
|
+
}
|
|
997
|
+
module.exports = arrayPush;
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
|
|
1001
|
+
// ../../node_modules/lodash/isArray.js
|
|
1002
|
+
var require_isArray = __commonJS({
|
|
1003
|
+
"../../node_modules/lodash/isArray.js"(exports, module) {
|
|
1004
|
+
var isArray = Array.isArray;
|
|
1005
|
+
module.exports = isArray;
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
|
|
1009
|
+
// ../../node_modules/lodash/_baseGetAllKeys.js
|
|
1010
|
+
var require_baseGetAllKeys = __commonJS({
|
|
1011
|
+
"../../node_modules/lodash/_baseGetAllKeys.js"(exports, module) {
|
|
1012
|
+
var arrayPush = require_arrayPush();
|
|
1013
|
+
var isArray = require_isArray();
|
|
1014
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1015
|
+
var result = keysFunc(object);
|
|
1016
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1017
|
+
}
|
|
1018
|
+
module.exports = baseGetAllKeys;
|
|
1019
|
+
}
|
|
1020
|
+
});
|
|
1021
|
+
|
|
1022
|
+
// ../../node_modules/lodash/_arrayFilter.js
|
|
1023
|
+
var require_arrayFilter = __commonJS({
|
|
1024
|
+
"../../node_modules/lodash/_arrayFilter.js"(exports, module) {
|
|
1025
|
+
function arrayFilter(array, predicate) {
|
|
1026
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
1027
|
+
while (++index < length) {
|
|
1028
|
+
var value = array[index];
|
|
1029
|
+
if (predicate(value, index, array)) {
|
|
1030
|
+
result[resIndex++] = value;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
return result;
|
|
1034
|
+
}
|
|
1035
|
+
module.exports = arrayFilter;
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
// ../../node_modules/lodash/stubArray.js
|
|
1040
|
+
var require_stubArray = __commonJS({
|
|
1041
|
+
"../../node_modules/lodash/stubArray.js"(exports, module) {
|
|
1042
|
+
function stubArray() {
|
|
1043
|
+
return [];
|
|
1044
|
+
}
|
|
1045
|
+
module.exports = stubArray;
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
|
|
1049
|
+
// ../../node_modules/lodash/_getSymbols.js
|
|
1050
|
+
var require_getSymbols = __commonJS({
|
|
1051
|
+
"../../node_modules/lodash/_getSymbols.js"(exports, module) {
|
|
1052
|
+
var arrayFilter = require_arrayFilter();
|
|
1053
|
+
var stubArray = require_stubArray();
|
|
1054
|
+
var objectProto = Object.prototype;
|
|
1055
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1056
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1057
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
1058
|
+
if (object == null) {
|
|
1059
|
+
return [];
|
|
1060
|
+
}
|
|
1061
|
+
object = Object(object);
|
|
1062
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1063
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
1064
|
+
});
|
|
1065
|
+
};
|
|
1066
|
+
module.exports = getSymbols;
|
|
1067
|
+
}
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1070
|
+
// ../../node_modules/lodash/_baseTimes.js
|
|
1071
|
+
var require_baseTimes = __commonJS({
|
|
1072
|
+
"../../node_modules/lodash/_baseTimes.js"(exports, module) {
|
|
1073
|
+
function baseTimes(n, iteratee) {
|
|
1074
|
+
var index = -1, result = Array(n);
|
|
1075
|
+
while (++index < n) {
|
|
1076
|
+
result[index] = iteratee(index);
|
|
1077
|
+
}
|
|
1078
|
+
return result;
|
|
1079
|
+
}
|
|
1080
|
+
module.exports = baseTimes;
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
|
|
1084
|
+
// ../../node_modules/lodash/isObjectLike.js
|
|
1085
|
+
var require_isObjectLike = __commonJS({
|
|
1086
|
+
"../../node_modules/lodash/isObjectLike.js"(exports, module) {
|
|
1087
|
+
function isObjectLike(value) {
|
|
1088
|
+
return value != null && typeof value == "object";
|
|
1089
|
+
}
|
|
1090
|
+
module.exports = isObjectLike;
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
// ../../node_modules/lodash/_baseIsArguments.js
|
|
1095
|
+
var require_baseIsArguments = __commonJS({
|
|
1096
|
+
"../../node_modules/lodash/_baseIsArguments.js"(exports, module) {
|
|
1097
|
+
var baseGetTag = require_baseGetTag();
|
|
1098
|
+
var isObjectLike = require_isObjectLike();
|
|
1099
|
+
var argsTag = "[object Arguments]";
|
|
1100
|
+
function baseIsArguments(value) {
|
|
1101
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
1102
|
+
}
|
|
1103
|
+
module.exports = baseIsArguments;
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
|
|
1107
|
+
// ../../node_modules/lodash/isArguments.js
|
|
1108
|
+
var require_isArguments = __commonJS({
|
|
1109
|
+
"../../node_modules/lodash/isArguments.js"(exports, module) {
|
|
1110
|
+
var baseIsArguments = require_baseIsArguments();
|
|
1111
|
+
var isObjectLike = require_isObjectLike();
|
|
1112
|
+
var objectProto = Object.prototype;
|
|
1113
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1114
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1115
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
1116
|
+
return arguments;
|
|
1117
|
+
}()) ? baseIsArguments : function(value) {
|
|
1118
|
+
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
1119
|
+
};
|
|
1120
|
+
module.exports = isArguments;
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
|
|
1124
|
+
// ../../node_modules/lodash/stubFalse.js
|
|
1125
|
+
var require_stubFalse = __commonJS({
|
|
1126
|
+
"../../node_modules/lodash/stubFalse.js"(exports, module) {
|
|
1127
|
+
function stubFalse() {
|
|
1128
|
+
return false;
|
|
1129
|
+
}
|
|
1130
|
+
module.exports = stubFalse;
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1134
|
+
// ../../node_modules/lodash/isBuffer.js
|
|
1135
|
+
var require_isBuffer = __commonJS({
|
|
1136
|
+
"../../node_modules/lodash/isBuffer.js"(exports, module) {
|
|
1137
|
+
var root = require_root();
|
|
1138
|
+
var stubFalse = require_stubFalse();
|
|
1139
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1140
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1141
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1142
|
+
var Buffer2 = moduleExports ? root.Buffer : void 0;
|
|
1143
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
1144
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1145
|
+
module.exports = isBuffer;
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1148
|
+
|
|
1149
|
+
// ../../node_modules/lodash/_isIndex.js
|
|
1150
|
+
var require_isIndex = __commonJS({
|
|
1151
|
+
"../../node_modules/lodash/_isIndex.js"(exports, module) {
|
|
1152
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1153
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1154
|
+
function isIndex(value, length) {
|
|
1155
|
+
var type = typeof value;
|
|
1156
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
1157
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
1158
|
+
}
|
|
1159
|
+
module.exports = isIndex;
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
|
|
1163
|
+
// ../../node_modules/lodash/isLength.js
|
|
1164
|
+
var require_isLength = __commonJS({
|
|
1165
|
+
"../../node_modules/lodash/isLength.js"(exports, module) {
|
|
1166
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1167
|
+
function isLength2(value) {
|
|
1168
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1169
|
+
}
|
|
1170
|
+
module.exports = isLength2;
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
|
|
1174
|
+
// ../../node_modules/lodash/_baseIsTypedArray.js
|
|
1175
|
+
var require_baseIsTypedArray = __commonJS({
|
|
1176
|
+
"../../node_modules/lodash/_baseIsTypedArray.js"(exports, module) {
|
|
1177
|
+
var baseGetTag = require_baseGetTag();
|
|
1178
|
+
var isLength2 = require_isLength();
|
|
1179
|
+
var isObjectLike = require_isObjectLike();
|
|
1180
|
+
var argsTag = "[object Arguments]";
|
|
1181
|
+
var arrayTag = "[object Array]";
|
|
1182
|
+
var boolTag = "[object Boolean]";
|
|
1183
|
+
var dateTag = "[object Date]";
|
|
1184
|
+
var errorTag = "[object Error]";
|
|
1185
|
+
var funcTag = "[object Function]";
|
|
1186
|
+
var mapTag = "[object Map]";
|
|
1187
|
+
var numberTag = "[object Number]";
|
|
1188
|
+
var objectTag = "[object Object]";
|
|
1189
|
+
var regexpTag = "[object RegExp]";
|
|
1190
|
+
var setTag = "[object Set]";
|
|
1191
|
+
var stringTag = "[object String]";
|
|
1192
|
+
var weakMapTag = "[object WeakMap]";
|
|
1193
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
1194
|
+
var dataViewTag = "[object DataView]";
|
|
1195
|
+
var float32Tag = "[object Float32Array]";
|
|
1196
|
+
var float64Tag = "[object Float64Array]";
|
|
1197
|
+
var int8Tag = "[object Int8Array]";
|
|
1198
|
+
var int16Tag = "[object Int16Array]";
|
|
1199
|
+
var int32Tag = "[object Int32Array]";
|
|
1200
|
+
var uint8Tag = "[object Uint8Array]";
|
|
1201
|
+
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
1202
|
+
var uint16Tag = "[object Uint16Array]";
|
|
1203
|
+
var uint32Tag = "[object Uint32Array]";
|
|
1204
|
+
var typedArrayTags = {};
|
|
1205
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
1206
|
+
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;
|
|
1207
|
+
function baseIsTypedArray(value) {
|
|
1208
|
+
return isObjectLike(value) && isLength2(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
1209
|
+
}
|
|
1210
|
+
module.exports = baseIsTypedArray;
|
|
1211
|
+
}
|
|
1212
|
+
});
|
|
1213
|
+
|
|
1214
|
+
// ../../node_modules/lodash/_baseUnary.js
|
|
1215
|
+
var require_baseUnary = __commonJS({
|
|
1216
|
+
"../../node_modules/lodash/_baseUnary.js"(exports, module) {
|
|
1217
|
+
function baseUnary(func) {
|
|
1218
|
+
return function(value) {
|
|
1219
|
+
return func(value);
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
module.exports = baseUnary;
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
|
|
1226
|
+
// ../../node_modules/lodash/_nodeUtil.js
|
|
1227
|
+
var require_nodeUtil = __commonJS({
|
|
1228
|
+
"../../node_modules/lodash/_nodeUtil.js"(exports, module) {
|
|
1229
|
+
var freeGlobal = require_freeGlobal();
|
|
1230
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1231
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1232
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1233
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
1234
|
+
var nodeUtil = function() {
|
|
1235
|
+
try {
|
|
1236
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
1237
|
+
if (types) {
|
|
1238
|
+
return types;
|
|
1239
|
+
}
|
|
1240
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
1241
|
+
} catch (e) {
|
|
1242
|
+
}
|
|
1243
|
+
}();
|
|
1244
|
+
module.exports = nodeUtil;
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
|
|
1248
|
+
// ../../node_modules/lodash/isTypedArray.js
|
|
1249
|
+
var require_isTypedArray = __commonJS({
|
|
1250
|
+
"../../node_modules/lodash/isTypedArray.js"(exports, module) {
|
|
1251
|
+
var baseIsTypedArray = require_baseIsTypedArray();
|
|
1252
|
+
var baseUnary = require_baseUnary();
|
|
1253
|
+
var nodeUtil = require_nodeUtil();
|
|
1254
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
1255
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1256
|
+
module.exports = isTypedArray;
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1259
|
+
|
|
1260
|
+
// ../../node_modules/lodash/_arrayLikeKeys.js
|
|
1261
|
+
var require_arrayLikeKeys = __commonJS({
|
|
1262
|
+
"../../node_modules/lodash/_arrayLikeKeys.js"(exports, module) {
|
|
1263
|
+
var baseTimes = require_baseTimes();
|
|
1264
|
+
var isArguments = require_isArguments();
|
|
1265
|
+
var isArray = require_isArray();
|
|
1266
|
+
var isBuffer = require_isBuffer();
|
|
1267
|
+
var isIndex = require_isIndex();
|
|
1268
|
+
var isTypedArray = require_isTypedArray();
|
|
1269
|
+
var objectProto = Object.prototype;
|
|
1270
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1271
|
+
function arrayLikeKeys(value, inherited) {
|
|
1272
|
+
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;
|
|
1273
|
+
for (var key in value) {
|
|
1274
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1275
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1276
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1277
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
1278
|
+
isIndex(key, length)))) {
|
|
1279
|
+
result.push(key);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
return result;
|
|
1283
|
+
}
|
|
1284
|
+
module.exports = arrayLikeKeys;
|
|
1285
|
+
}
|
|
1286
|
+
});
|
|
1287
|
+
|
|
1288
|
+
// ../../node_modules/lodash/_isPrototype.js
|
|
1289
|
+
var require_isPrototype = __commonJS({
|
|
1290
|
+
"../../node_modules/lodash/_isPrototype.js"(exports, module) {
|
|
1291
|
+
var objectProto = Object.prototype;
|
|
1292
|
+
function isPrototype(value) {
|
|
1293
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
1294
|
+
return value === proto;
|
|
1295
|
+
}
|
|
1296
|
+
module.exports = isPrototype;
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
// ../../node_modules/lodash/_overArg.js
|
|
1301
|
+
var require_overArg = __commonJS({
|
|
1302
|
+
"../../node_modules/lodash/_overArg.js"(exports, module) {
|
|
1303
|
+
function overArg(func, transform) {
|
|
1304
|
+
return function(arg) {
|
|
1305
|
+
return func(transform(arg));
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
module.exports = overArg;
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
|
|
1312
|
+
// ../../node_modules/lodash/_nativeKeys.js
|
|
1313
|
+
var require_nativeKeys = __commonJS({
|
|
1314
|
+
"../../node_modules/lodash/_nativeKeys.js"(exports, module) {
|
|
1315
|
+
var overArg = require_overArg();
|
|
1316
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
1317
|
+
module.exports = nativeKeys;
|
|
1318
|
+
}
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
// ../../node_modules/lodash/_baseKeys.js
|
|
1322
|
+
var require_baseKeys = __commonJS({
|
|
1323
|
+
"../../node_modules/lodash/_baseKeys.js"(exports, module) {
|
|
1324
|
+
var isPrototype = require_isPrototype();
|
|
1325
|
+
var nativeKeys = require_nativeKeys();
|
|
1326
|
+
var objectProto = Object.prototype;
|
|
1327
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1328
|
+
function baseKeys(object) {
|
|
1329
|
+
if (!isPrototype(object)) {
|
|
1330
|
+
return nativeKeys(object);
|
|
1331
|
+
}
|
|
1332
|
+
var result = [];
|
|
1333
|
+
for (var key in Object(object)) {
|
|
1334
|
+
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
|
1335
|
+
result.push(key);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
return result;
|
|
1339
|
+
}
|
|
1340
|
+
module.exports = baseKeys;
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
|
|
1344
|
+
// ../../node_modules/lodash/isArrayLike.js
|
|
1345
|
+
var require_isArrayLike = __commonJS({
|
|
1346
|
+
"../../node_modules/lodash/isArrayLike.js"(exports, module) {
|
|
1347
|
+
var isFunction = require_isFunction();
|
|
1348
|
+
var isLength2 = require_isLength();
|
|
1349
|
+
function isArrayLike(value) {
|
|
1350
|
+
return value != null && isLength2(value.length) && !isFunction(value);
|
|
1351
|
+
}
|
|
1352
|
+
module.exports = isArrayLike;
|
|
1353
|
+
}
|
|
1354
|
+
});
|
|
1355
|
+
|
|
1356
|
+
// ../../node_modules/lodash/keys.js
|
|
1357
|
+
var require_keys = __commonJS({
|
|
1358
|
+
"../../node_modules/lodash/keys.js"(exports, module) {
|
|
1359
|
+
var arrayLikeKeys = require_arrayLikeKeys();
|
|
1360
|
+
var baseKeys = require_baseKeys();
|
|
1361
|
+
var isArrayLike = require_isArrayLike();
|
|
1362
|
+
function keys(object) {
|
|
1363
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
1364
|
+
}
|
|
1365
|
+
module.exports = keys;
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
|
|
1369
|
+
// ../../node_modules/lodash/_getAllKeys.js
|
|
1370
|
+
var require_getAllKeys = __commonJS({
|
|
1371
|
+
"../../node_modules/lodash/_getAllKeys.js"(exports, module) {
|
|
1372
|
+
var baseGetAllKeys = require_baseGetAllKeys();
|
|
1373
|
+
var getSymbols = require_getSymbols();
|
|
1374
|
+
var keys = require_keys();
|
|
1375
|
+
function getAllKeys(object) {
|
|
1376
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
1377
|
+
}
|
|
1378
|
+
module.exports = getAllKeys;
|
|
1379
|
+
}
|
|
1380
|
+
});
|
|
1381
|
+
|
|
1382
|
+
// ../../node_modules/lodash/_equalObjects.js
|
|
1383
|
+
var require_equalObjects = __commonJS({
|
|
1384
|
+
"../../node_modules/lodash/_equalObjects.js"(exports, module) {
|
|
1385
|
+
var getAllKeys = require_getAllKeys();
|
|
1386
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1387
|
+
var objectProto = Object.prototype;
|
|
1388
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1389
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1390
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
1391
|
+
if (objLength != othLength && !isPartial) {
|
|
1392
|
+
return false;
|
|
1393
|
+
}
|
|
1394
|
+
var index = objLength;
|
|
1395
|
+
while (index--) {
|
|
1396
|
+
var key = objProps[index];
|
|
1397
|
+
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
1398
|
+
return false;
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
var objStacked = stack.get(object);
|
|
1402
|
+
var othStacked = stack.get(other);
|
|
1403
|
+
if (objStacked && othStacked) {
|
|
1404
|
+
return objStacked == other && othStacked == object;
|
|
1405
|
+
}
|
|
1406
|
+
var result = true;
|
|
1407
|
+
stack.set(object, other);
|
|
1408
|
+
stack.set(other, object);
|
|
1409
|
+
var skipCtor = isPartial;
|
|
1410
|
+
while (++index < objLength) {
|
|
1411
|
+
key = objProps[index];
|
|
1412
|
+
var objValue = object[key], othValue = other[key];
|
|
1413
|
+
if (customizer) {
|
|
1414
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1415
|
+
}
|
|
1416
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1417
|
+
result = false;
|
|
1418
|
+
break;
|
|
1419
|
+
}
|
|
1420
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
1421
|
+
}
|
|
1422
|
+
if (result && !skipCtor) {
|
|
1423
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1424
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1425
|
+
result = false;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
stack["delete"](object);
|
|
1429
|
+
stack["delete"](other);
|
|
1430
|
+
return result;
|
|
1431
|
+
}
|
|
1432
|
+
module.exports = equalObjects;
|
|
1433
|
+
}
|
|
1434
|
+
});
|
|
1435
|
+
|
|
1436
|
+
// ../../node_modules/lodash/_DataView.js
|
|
1437
|
+
var require_DataView = __commonJS({
|
|
1438
|
+
"../../node_modules/lodash/_DataView.js"(exports, module) {
|
|
1439
|
+
var getNative = require_getNative();
|
|
1440
|
+
var root = require_root();
|
|
1441
|
+
var DataView = getNative(root, "DataView");
|
|
1442
|
+
module.exports = DataView;
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
|
|
1446
|
+
// ../../node_modules/lodash/_Promise.js
|
|
1447
|
+
var require_Promise = __commonJS({
|
|
1448
|
+
"../../node_modules/lodash/_Promise.js"(exports, module) {
|
|
1449
|
+
var getNative = require_getNative();
|
|
1450
|
+
var root = require_root();
|
|
1451
|
+
var Promise2 = getNative(root, "Promise");
|
|
1452
|
+
module.exports = Promise2;
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
|
|
1456
|
+
// ../../node_modules/lodash/_Set.js
|
|
1457
|
+
var require_Set = __commonJS({
|
|
1458
|
+
"../../node_modules/lodash/_Set.js"(exports, module) {
|
|
1459
|
+
var getNative = require_getNative();
|
|
1460
|
+
var root = require_root();
|
|
1461
|
+
var Set2 = getNative(root, "Set");
|
|
1462
|
+
module.exports = Set2;
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
|
|
1466
|
+
// ../../node_modules/lodash/_WeakMap.js
|
|
1467
|
+
var require_WeakMap = __commonJS({
|
|
1468
|
+
"../../node_modules/lodash/_WeakMap.js"(exports, module) {
|
|
1469
|
+
var getNative = require_getNative();
|
|
1470
|
+
var root = require_root();
|
|
1471
|
+
var WeakMap2 = getNative(root, "WeakMap");
|
|
1472
|
+
module.exports = WeakMap2;
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
|
|
1476
|
+
// ../../node_modules/lodash/_getTag.js
|
|
1477
|
+
var require_getTag = __commonJS({
|
|
1478
|
+
"../../node_modules/lodash/_getTag.js"(exports, module) {
|
|
1479
|
+
var DataView = require_DataView();
|
|
1480
|
+
var Map2 = require_Map();
|
|
1481
|
+
var Promise2 = require_Promise();
|
|
1482
|
+
var Set2 = require_Set();
|
|
1483
|
+
var WeakMap2 = require_WeakMap();
|
|
1484
|
+
var baseGetTag = require_baseGetTag();
|
|
1485
|
+
var toSource = require_toSource();
|
|
1486
|
+
var mapTag = "[object Map]";
|
|
1487
|
+
var objectTag = "[object Object]";
|
|
1488
|
+
var promiseTag = "[object Promise]";
|
|
1489
|
+
var setTag = "[object Set]";
|
|
1490
|
+
var weakMapTag = "[object WeakMap]";
|
|
1491
|
+
var dataViewTag = "[object DataView]";
|
|
1492
|
+
var dataViewCtorString = toSource(DataView);
|
|
1493
|
+
var mapCtorString = toSource(Map2);
|
|
1494
|
+
var promiseCtorString = toSource(Promise2);
|
|
1495
|
+
var setCtorString = toSource(Set2);
|
|
1496
|
+
var weakMapCtorString = toSource(WeakMap2);
|
|
1497
|
+
var getTag = baseGetTag;
|
|
1498
|
+
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) {
|
|
1499
|
+
getTag = function(value) {
|
|
1500
|
+
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1501
|
+
if (ctorString) {
|
|
1502
|
+
switch (ctorString) {
|
|
1503
|
+
case dataViewCtorString:
|
|
1504
|
+
return dataViewTag;
|
|
1505
|
+
case mapCtorString:
|
|
1506
|
+
return mapTag;
|
|
1507
|
+
case promiseCtorString:
|
|
1508
|
+
return promiseTag;
|
|
1509
|
+
case setCtorString:
|
|
1510
|
+
return setTag;
|
|
1511
|
+
case weakMapCtorString:
|
|
1512
|
+
return weakMapTag;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
return result;
|
|
1516
|
+
};
|
|
1517
|
+
}
|
|
1518
|
+
module.exports = getTag;
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
|
|
1522
|
+
// ../../node_modules/lodash/_baseIsEqualDeep.js
|
|
1523
|
+
var require_baseIsEqualDeep = __commonJS({
|
|
1524
|
+
"../../node_modules/lodash/_baseIsEqualDeep.js"(exports, module) {
|
|
1525
|
+
var Stack = require_Stack();
|
|
1526
|
+
var equalArrays = require_equalArrays();
|
|
1527
|
+
var equalByTag = require_equalByTag();
|
|
1528
|
+
var equalObjects = require_equalObjects();
|
|
1529
|
+
var getTag = require_getTag();
|
|
1530
|
+
var isArray = require_isArray();
|
|
1531
|
+
var isBuffer = require_isBuffer();
|
|
1532
|
+
var isTypedArray = require_isTypedArray();
|
|
1533
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1534
|
+
var argsTag = "[object Arguments]";
|
|
1535
|
+
var arrayTag = "[object Array]";
|
|
1536
|
+
var objectTag = "[object Object]";
|
|
1537
|
+
var objectProto = Object.prototype;
|
|
1538
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1539
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1540
|
+
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
1541
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1542
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1543
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1544
|
+
if (isSameTag && isBuffer(object)) {
|
|
1545
|
+
if (!isBuffer(other)) {
|
|
1546
|
+
return false;
|
|
1547
|
+
}
|
|
1548
|
+
objIsArr = true;
|
|
1549
|
+
objIsObj = false;
|
|
1550
|
+
}
|
|
1551
|
+
if (isSameTag && !objIsObj) {
|
|
1552
|
+
stack || (stack = new Stack());
|
|
1553
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1554
|
+
}
|
|
1555
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
1556
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
1557
|
+
if (objIsWrapped || othIsWrapped) {
|
|
1558
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1559
|
+
stack || (stack = new Stack());
|
|
1560
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
if (!isSameTag) {
|
|
1564
|
+
return false;
|
|
1565
|
+
}
|
|
1566
|
+
stack || (stack = new Stack());
|
|
1567
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1568
|
+
}
|
|
1569
|
+
module.exports = baseIsEqualDeep;
|
|
1570
|
+
}
|
|
1571
|
+
});
|
|
1572
|
+
|
|
1573
|
+
// ../../node_modules/lodash/_baseIsEqual.js
|
|
1574
|
+
var require_baseIsEqual = __commonJS({
|
|
1575
|
+
"../../node_modules/lodash/_baseIsEqual.js"(exports, module) {
|
|
1576
|
+
var baseIsEqualDeep = require_baseIsEqualDeep();
|
|
1577
|
+
var isObjectLike = require_isObjectLike();
|
|
1578
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1579
|
+
if (value === other) {
|
|
1580
|
+
return true;
|
|
1581
|
+
}
|
|
1582
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1583
|
+
return value !== value && other !== other;
|
|
1584
|
+
}
|
|
1585
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1586
|
+
}
|
|
1587
|
+
module.exports = baseIsEqual;
|
|
1588
|
+
}
|
|
1589
|
+
});
|
|
1590
|
+
|
|
1591
|
+
// ../../node_modules/lodash/isEqual.js
|
|
1592
|
+
var require_isEqual = __commonJS({
|
|
1593
|
+
"../../node_modules/lodash/isEqual.js"(exports, module) {
|
|
1594
|
+
var baseIsEqual = require_baseIsEqual();
|
|
1595
|
+
function isEqual2(value, other) {
|
|
1596
|
+
return baseIsEqual(value, other);
|
|
1597
|
+
}
|
|
1598
|
+
module.exports = isEqual2;
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
63
1601
|
|
|
64
1602
|
// src/lib/types/ISTDate.ts
|
|
65
1603
|
function formatISTDate(date, options) {
|
|
@@ -4055,11 +5593,18 @@ var getRoleLabel = (role) => {
|
|
|
4055
5593
|
var getRoleDescription = (role) => {
|
|
4056
5594
|
return getRoleMetadata(role)?.description || "";
|
|
4057
5595
|
};
|
|
5596
|
+
var getRoleAssignmentKind = (role) => {
|
|
5597
|
+
return getRoleMetadata(role)?.assignmentKind || null;
|
|
5598
|
+
};
|
|
4058
5599
|
var isFactoryScopedRole = (role) => {
|
|
4059
5600
|
const normalizedRole = normalizeRoleLevel(role);
|
|
4060
5601
|
return normalizedRole ? FACTORY_SCOPED_ROLE_SET.has(normalizedRole) : false;
|
|
4061
5602
|
};
|
|
4062
5603
|
var isSupervisorRole = (role) => normalizeRoleLevel(role) === "supervisor";
|
|
5604
|
+
var canRoleManageCompany = (role) => {
|
|
5605
|
+
const normalizedRole = normalizeRoleLevel(role);
|
|
5606
|
+
return normalizedRole === "owner" || normalizedRole === "it";
|
|
5607
|
+
};
|
|
4063
5608
|
var canRoleManageUsers = (role) => {
|
|
4064
5609
|
const normalizedRole = normalizeRoleLevel(role);
|
|
4065
5610
|
return normalizedRole === "optifye" || normalizedRole === "owner" || normalizedRole === "it" || isFactoryScopedRole(normalizedRole);
|
|
@@ -4072,12 +5617,23 @@ var canRoleViewUsageStats = (role) => {
|
|
|
4072
5617
|
const normalizedRole = normalizeRoleLevel(role);
|
|
4073
5618
|
return normalizedRole === "optifye" || normalizedRole === "owner" || normalizedRole === "it";
|
|
4074
5619
|
};
|
|
5620
|
+
var canRoleViewClipsCost = (role) => {
|
|
5621
|
+
const normalizedRole = normalizeRoleLevel(role);
|
|
5622
|
+
return normalizedRole === "optifye" || normalizedRole === "owner";
|
|
5623
|
+
};
|
|
4075
5624
|
var canRoleAccessTeamManagement = (role) => {
|
|
4076
5625
|
return canRoleManageUsers(role);
|
|
4077
5626
|
};
|
|
4078
5627
|
var getRoleNavPaths = (role) => {
|
|
4079
5628
|
return getRoleMetadata(role)?.navPaths || [];
|
|
4080
5629
|
};
|
|
5630
|
+
var canRoleAccessDashboardPath = (path, role) => {
|
|
5631
|
+
const basePath = `/${path.split("?")[0].split("/").filter(Boolean)[0] || ""}`.replace(/\/$/, "") || "/";
|
|
5632
|
+
if (basePath === "/clips-cost") {
|
|
5633
|
+
return canRoleViewClipsCost(role);
|
|
5634
|
+
}
|
|
5635
|
+
return getRoleNavPaths(role).includes(basePath);
|
|
5636
|
+
};
|
|
4081
5637
|
var getVisibleRolesForCurrentUser = (currentRole) => {
|
|
4082
5638
|
const normalizedRole = normalizeRoleLevel(currentRole);
|
|
4083
5639
|
const visibleRolesByCurrentRole = {
|
|
@@ -42826,10 +44382,15 @@ var IdleTimeReasonChartComponent = ({
|
|
|
42826
44382
|
data,
|
|
42827
44383
|
isLoading = false,
|
|
42828
44384
|
error = null,
|
|
42829
|
-
hideTotalDuration = false
|
|
44385
|
+
hideTotalDuration = false,
|
|
44386
|
+
updateAnimation = "replay"
|
|
42830
44387
|
}) => {
|
|
42831
44388
|
const [activeData, setActiveData] = React141__namespace.default.useState([]);
|
|
42832
44389
|
React141__namespace.default.useEffect(() => {
|
|
44390
|
+
if (updateAnimation === "smooth") {
|
|
44391
|
+
setActiveData(data && data.length > 0 ? data : []);
|
|
44392
|
+
return;
|
|
44393
|
+
}
|
|
42833
44394
|
if (activeData.length > 0) {
|
|
42834
44395
|
setActiveData([]);
|
|
42835
44396
|
}
|
|
@@ -42843,7 +44404,7 @@ var IdleTimeReasonChartComponent = ({
|
|
|
42843
44404
|
} else {
|
|
42844
44405
|
setActiveData([]);
|
|
42845
44406
|
}
|
|
42846
|
-
}, [data]);
|
|
44407
|
+
}, [data, updateAnimation]);
|
|
42847
44408
|
React141__namespace.default.useEffect(() => {
|
|
42848
44409
|
if (!data || data.length === 0) return;
|
|
42849
44410
|
data.forEach((entry, index) => {
|
|
@@ -42853,8 +44414,11 @@ var IdleTimeReasonChartComponent = ({
|
|
|
42853
44414
|
});
|
|
42854
44415
|
}, [data]);
|
|
42855
44416
|
const pieKey = React141__namespace.default.useMemo(() => {
|
|
44417
|
+
if (updateAnimation === "smooth") {
|
|
44418
|
+
return "smooth";
|
|
44419
|
+
}
|
|
42856
44420
|
return activeData.map((d) => `${d.name}-${d.value}`).join("|");
|
|
42857
|
-
}, [activeData]);
|
|
44421
|
+
}, [activeData, updateAnimation]);
|
|
42858
44422
|
if (isLoading) {
|
|
42859
44423
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full" });
|
|
42860
44424
|
}
|
|
@@ -49405,7 +50969,6 @@ var SettingsPopup = ({
|
|
|
49405
50969
|
document.body
|
|
49406
50970
|
);
|
|
49407
50971
|
};
|
|
49408
|
-
var formatPercent = (value) => typeof value === "number" && Number.isFinite(value) ? `${value.toFixed(1)}%` : "N/A";
|
|
49409
50972
|
var formatRelativeTime2 = (value) => {
|
|
49410
50973
|
const parsed = new Date(value);
|
|
49411
50974
|
if (Number.isNaN(parsed.getTime())) return "Just now";
|
|
@@ -49571,8 +51134,7 @@ var AlertsPopup = ({
|
|
|
49571
51134
|
!isLoading && error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-10 text-sm text-red-600", children: error }),
|
|
49572
51135
|
!isLoading && !error && alerts.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-10 text-sm text-gray-500", children: "No alerts right now." }),
|
|
49573
51136
|
!isLoading && !error && alerts.map((alert2, index) => {
|
|
49574
|
-
const isCritical =
|
|
49575
|
-
const description = `Now: ${formatPercent(alert2.current_efficiency)}. Usual for this shift: ${formatPercent(alert2.baseline_efficiency)}.`;
|
|
51137
|
+
const isCritical = alert2.alert_type === "recent_output_drop";
|
|
49576
51138
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
49577
51139
|
motion.div,
|
|
49578
51140
|
{
|
|
@@ -49594,8 +51156,8 @@ var AlertsPopup = ({
|
|
|
49594
51156
|
formatRelativeTime2(alert2.evaluated_at)
|
|
49595
51157
|
] })
|
|
49596
51158
|
] }),
|
|
49597
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] font-medium text-[#475569] uppercase tracking-wide", children: alert2.
|
|
49598
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13.5px] text-[#64748b] leading-[1.45] mt-1", children:
|
|
51159
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] font-medium text-[#475569] uppercase tracking-wide", children: alert2.title }),
|
|
51160
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13.5px] text-[#64748b] leading-[1.45] mt-1", children: alert2.message })
|
|
49599
51161
|
] })
|
|
49600
51162
|
] })
|
|
49601
51163
|
},
|
|
@@ -49629,6 +51191,7 @@ var SideNavBar = React141.memo(({
|
|
|
49629
51191
|
const role = user?.role_level;
|
|
49630
51192
|
const roleNavPaths = React141.useMemo(() => getRoleNavPaths(role), [role]);
|
|
49631
51193
|
const showLiveMonitorLink = roleNavPaths.includes("/live-monitor");
|
|
51194
|
+
const rootDashboardSurface = React141.useMemo(() => role === "owner" || role === "plant_head" || role === "optifye" ? "operations_overview" : "monitor", [role]);
|
|
49632
51195
|
const getBasePath = React141.useCallback((path) => {
|
|
49633
51196
|
const firstSegment = path.split("?")[0].split("/").filter(Boolean)[0];
|
|
49634
51197
|
return firstSegment ? `/${firstSegment}` : "/";
|
|
@@ -49639,12 +51202,11 @@ var SideNavBar = React141.memo(({
|
|
|
49639
51202
|
const basePath = getBasePath(path);
|
|
49640
51203
|
return roleNavPaths.includes(basePath);
|
|
49641
51204
|
}, [role, isSuperAdmin, getBasePath, roleNavPaths]);
|
|
49642
|
-
const lineId = entityConfig.defaultLineId || LINE_1_UUID;
|
|
49643
51205
|
const skuEnabled = dashboardConfig?.skuConfig?.enabled || false;
|
|
49644
51206
|
dashboardConfig?.supervisorConfig?.enabled || false;
|
|
49645
51207
|
const showSupervisorManagement = false;
|
|
49646
51208
|
const ticketsEnabled = dashboardConfig?.ticketsConfig?.enabled ?? true;
|
|
49647
|
-
const
|
|
51209
|
+
const showBillingLink = canRoleViewClipsCost(role);
|
|
49648
51210
|
console.log("\u{1F50D} [SideNavBar] dashboardConfig:", dashboardConfig);
|
|
49649
51211
|
console.log("\u{1F50D} [SideNavBar] ticketsConfig:", dashboardConfig?.ticketsConfig);
|
|
49650
51212
|
console.log("\u{1F50D} [SideNavBar] ticketsEnabled:", ticketsEnabled);
|
|
@@ -49655,19 +51217,20 @@ var SideNavBar = React141.memo(({
|
|
|
49655
51217
|
${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"}
|
|
49656
51218
|
transition-all duration-200 ease-out focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`;
|
|
49657
51219
|
}, [pathname]);
|
|
51220
|
+
const buildDashboardSurfaceTrackingEvent = React141.useCallback((source, destinationPath, dashboardSurface) => ({
|
|
51221
|
+
name: dashboardSurface === "operations_overview" ? "Operations Overview clicked" : "monitor page clicked",
|
|
51222
|
+
properties: {
|
|
51223
|
+
source,
|
|
51224
|
+
destination_path: destinationPath,
|
|
51225
|
+
dashboard_surface: dashboardSurface
|
|
51226
|
+
}
|
|
51227
|
+
}), []);
|
|
49658
51228
|
const handleHomeClick = React141.useCallback(() => {
|
|
49659
51229
|
navigate("/", {
|
|
49660
|
-
trackingEvent:
|
|
49661
|
-
name: "Operations Overview Page Clicked",
|
|
49662
|
-
properties: {
|
|
49663
|
-
source: "side_nav",
|
|
49664
|
-
line_id: lineId,
|
|
49665
|
-
line_name: "Line 1"
|
|
49666
|
-
}
|
|
49667
|
-
}
|
|
51230
|
+
trackingEvent: buildDashboardSurfaceTrackingEvent("side_nav", "/", rootDashboardSurface)
|
|
49668
51231
|
});
|
|
49669
51232
|
onMobileMenuClose?.();
|
|
49670
|
-
}, [navigate,
|
|
51233
|
+
}, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent, rootDashboardSurface]);
|
|
49671
51234
|
const handleLeaderboardClick = React141.useCallback(() => {
|
|
49672
51235
|
navigate(`/leaderboard`, {
|
|
49673
51236
|
trackingEvent: {
|
|
@@ -49681,15 +51244,10 @@ var SideNavBar = React141.memo(({
|
|
|
49681
51244
|
}, [navigate, onMobileMenuClose]);
|
|
49682
51245
|
const handleLiveClick = React141.useCallback(() => {
|
|
49683
51246
|
navigate("/live-monitor", {
|
|
49684
|
-
trackingEvent:
|
|
49685
|
-
name: "Live Monitor Clicked",
|
|
49686
|
-
properties: {
|
|
49687
|
-
source: "side_nav"
|
|
49688
|
-
}
|
|
49689
|
-
}
|
|
51247
|
+
trackingEvent: buildDashboardSurfaceTrackingEvent("side_nav", "/live-monitor", "monitor")
|
|
49690
51248
|
});
|
|
49691
51249
|
onMobileMenuClose?.();
|
|
49692
|
-
}, [navigate, onMobileMenuClose]);
|
|
51250
|
+
}, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent]);
|
|
49693
51251
|
const handleKPIsClick = React141.useCallback(() => {
|
|
49694
51252
|
navigate(`/kpis`, {
|
|
49695
51253
|
trackingEvent: {
|
|
@@ -49932,7 +51490,7 @@ var SideNavBar = React141.memo(({
|
|
|
49932
51490
|
isActive: pathname === "/tickets" || pathname.startsWith("/tickets/")
|
|
49933
51491
|
});
|
|
49934
51492
|
}
|
|
49935
|
-
if (
|
|
51493
|
+
if (showBillingLink) {
|
|
49936
51494
|
items.push({
|
|
49937
51495
|
key: "clips-analysis",
|
|
49938
51496
|
label: "Billing",
|
|
@@ -49957,7 +51515,7 @@ var SideNavBar = React141.memo(({
|
|
|
49957
51515
|
});
|
|
49958
51516
|
}
|
|
49959
51517
|
return items;
|
|
49960
|
-
}, [handleTargetsClick, handleShiftsClick, handleTeamManagementClick, handleProfileClick, handleTicketsClick, handleClipsCostClick, handleHelpClick, pathname, ticketsEnabled,
|
|
51518
|
+
}, [handleTargetsClick, handleShiftsClick, handleTeamManagementClick, handleProfileClick, handleTicketsClick, handleClipsCostClick, handleHelpClick, pathname, ticketsEnabled, showBillingLink, canAccessPath]);
|
|
49961
51519
|
const handleLogout = React141.useCallback(async () => {
|
|
49962
51520
|
setIsSettingsOpen(false);
|
|
49963
51521
|
try {
|
|
@@ -49967,10 +51525,11 @@ var SideNavBar = React141.memo(({
|
|
|
49967
51525
|
}
|
|
49968
51526
|
}, [signOut]);
|
|
49969
51527
|
const handleLogoClick = React141.useCallback(() => {
|
|
49970
|
-
|
|
49971
|
-
|
|
51528
|
+
navigate("/", {
|
|
51529
|
+
trackingEvent: buildDashboardSurfaceTrackingEvent("logo", "/", rootDashboardSurface)
|
|
51530
|
+
});
|
|
49972
51531
|
onMobileMenuClose?.();
|
|
49973
|
-
}, [navigate, onMobileMenuClose]);
|
|
51532
|
+
}, [navigate, onMobileMenuClose, buildDashboardSurfaceTrackingEvent, rootDashboardSurface]);
|
|
49974
51533
|
const homeButtonClasses = React141.useMemo(() => getButtonClasses("/"), [getButtonClasses, pathname]);
|
|
49975
51534
|
const liveButtonClasses = React141.useMemo(() => getButtonClasses("/live-monitor"), [getButtonClasses, pathname]);
|
|
49976
51535
|
const leaderboardButtonClasses = React141.useMemo(() => getButtonClasses("/leaderboard"), [getButtonClasses, pathname]);
|
|
@@ -50354,6 +51913,18 @@ var SideNavBar = React141.memo(({
|
|
|
50354
51913
|
]
|
|
50355
51914
|
}
|
|
50356
51915
|
),
|
|
51916
|
+
showBillingLink && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
51917
|
+
"button",
|
|
51918
|
+
{
|
|
51919
|
+
onClick: handleMobileNavClick(handleClipsCostClick),
|
|
51920
|
+
className: getMobileButtonClass("/clips-cost"),
|
|
51921
|
+
"aria-label": "Billing",
|
|
51922
|
+
children: [
|
|
51923
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.CurrencyDollarIcon, { className: getIconClass("/clips-cost") }),
|
|
51924
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Billing" })
|
|
51925
|
+
]
|
|
51926
|
+
}
|
|
51927
|
+
),
|
|
50357
51928
|
canAccessPath("/help") && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50358
51929
|
"button",
|
|
50359
51930
|
{
|
|
@@ -56811,6 +58382,11 @@ function HomeView({
|
|
|
56811
58382
|
React141.useEffect(() => {
|
|
56812
58383
|
setIsHydrated(true);
|
|
56813
58384
|
}, []);
|
|
58385
|
+
React141.useEffect(() => {
|
|
58386
|
+
trackCorePageView("Monitor", {
|
|
58387
|
+
dashboard_surface: "monitor"
|
|
58388
|
+
});
|
|
58389
|
+
}, []);
|
|
56814
58390
|
React141.useEffect(() => {
|
|
56815
58391
|
if (metricsError) {
|
|
56816
58392
|
setErrorMessage(metricsError.message);
|
|
@@ -56821,7 +58397,7 @@ function HomeView({
|
|
|
56821
58397
|
const handleLineChange = React141.useCallback((value) => {
|
|
56822
58398
|
setIsChangingFilter(true);
|
|
56823
58399
|
setSelectedLineId(value);
|
|
56824
|
-
trackCoreEvent("
|
|
58400
|
+
trackCoreEvent("monitor line filter changed", {
|
|
56825
58401
|
previous_line_id: selectedLineId,
|
|
56826
58402
|
new_line_id: value,
|
|
56827
58403
|
line_name: mergedLineNames[value] || (value === factoryViewId ? "All Lines" : `Line ${value.substring(0, 4)}`)
|
|
@@ -56842,10 +58418,11 @@ function HomeView({
|
|
|
56842
58418
|
React141.useEffect(() => {
|
|
56843
58419
|
if (!metricsLoading && !hasInitialDataLoaded) {
|
|
56844
58420
|
setHasInitialDataLoaded(true);
|
|
56845
|
-
trackCoreEvent("
|
|
58421
|
+
trackCoreEvent("monitor page loaded", {
|
|
56846
58422
|
default_line_id: defaultLineId,
|
|
56847
58423
|
factory_view_id: factoryViewId,
|
|
56848
|
-
is_supervisor: isSupervisor
|
|
58424
|
+
is_supervisor: isSupervisor,
|
|
58425
|
+
dashboard_surface: "monitor"
|
|
56849
58426
|
});
|
|
56850
58427
|
}
|
|
56851
58428
|
}, [metricsLoading, hasInitialDataLoaded, defaultLineId, factoryViewId, isSupervisor]);
|
|
@@ -57521,6 +59098,7 @@ var MonthlyRangeFilter = ({
|
|
|
57521
59098
|
const [rangeEnd, setRangeEnd] = React141.useState(parseDateKeyToDate(normalizedRange.endKey));
|
|
57522
59099
|
const [selecting, setSelecting] = React141.useState(false);
|
|
57523
59100
|
const [activePreset, setActivePreset] = React141.useState(null);
|
|
59101
|
+
const [pendingChangeMeta, setPendingChangeMeta] = React141.useState(null);
|
|
57524
59102
|
const today = React141.useMemo(() => dateFns.endOfDay(todayDate), [todayDate]);
|
|
57525
59103
|
React141.useEffect(() => {
|
|
57526
59104
|
setCalendarMonth(month);
|
|
@@ -57540,6 +59118,7 @@ var MonthlyRangeFilter = ({
|
|
|
57540
59118
|
return val.startKey === value.startKey && val.endKey === value.endKey;
|
|
57541
59119
|
});
|
|
57542
59120
|
setActivePreset(match ? match.label : "Custom");
|
|
59121
|
+
setPendingChangeMeta(null);
|
|
57543
59122
|
}
|
|
57544
59123
|
}, [isOpen, month, presets, value.endKey, value.startKey, year]);
|
|
57545
59124
|
React141.useEffect(() => {
|
|
@@ -57556,6 +59135,7 @@ var MonthlyRangeFilter = ({
|
|
|
57556
59135
|
return;
|
|
57557
59136
|
}
|
|
57558
59137
|
setActivePreset("Custom");
|
|
59138
|
+
setPendingChangeMeta({ source: "custom" });
|
|
57559
59139
|
if (!selecting || !rangeStart) {
|
|
57560
59140
|
setRangeStart(day);
|
|
57561
59141
|
setRangeEnd(null);
|
|
@@ -57578,6 +59158,7 @@ var MonthlyRangeFilter = ({
|
|
|
57578
59158
|
setRangeEnd(end);
|
|
57579
59159
|
setSelecting(false);
|
|
57580
59160
|
setActivePreset(preset.label);
|
|
59161
|
+
setPendingChangeMeta({ source: "preset", presetLabel: preset.label });
|
|
57581
59162
|
setCalendarMonth(start.getMonth());
|
|
57582
59163
|
setCalendarYear(start.getFullYear());
|
|
57583
59164
|
};
|
|
@@ -57596,7 +59177,7 @@ var MonthlyRangeFilter = ({
|
|
|
57596
59177
|
const end = boundedStart <= boundedEnd ? boundedEnd : boundedStart;
|
|
57597
59178
|
const startKey = dateFns.format(start, "yyyy-MM-dd");
|
|
57598
59179
|
const endKey = dateFns.format(end, "yyyy-MM-dd");
|
|
57599
|
-
onChange({ startKey, endKey });
|
|
59180
|
+
onChange({ startKey, endKey }, pendingChangeMeta || void 0);
|
|
57600
59181
|
setIsOpen(false);
|
|
57601
59182
|
}
|
|
57602
59183
|
};
|
|
@@ -67534,13 +69115,7 @@ var WorkspaceHealthView = ({
|
|
|
67534
69115
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx("text-3xl font-bold", getUptimeColor(summary.uptimePercentage)), children: summary.uptimePercentage === null ? "No data" : `${summary.uptimePercentage.toFixed(1)}%` }),
|
|
67535
69116
|
summary.uptimePercentage === null ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "h-5 w-5 text-gray-400" }) : summary.uptimePercentage >= 97 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-5 w-5 text-green-500" }) : summary.uptimePercentage >= 90 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "h-5 w-5 text-yellow-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-5 w-5 text-red-500" })
|
|
67536
69117
|
] }),
|
|
67537
|
-
/* @__PURE__ */ jsxRuntime.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" })
|
|
67538
|
-
summary.workspacesWithoutUptimeData > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-amber-600 mt-1", children: [
|
|
67539
|
-
summary.workspacesWithoutUptimeData,
|
|
67540
|
-
" workspace",
|
|
67541
|
-
summary.workspacesWithoutUptimeData === 1 ? "" : "s",
|
|
67542
|
-
" missing uptime data"
|
|
67543
|
-
] })
|
|
69118
|
+
/* @__PURE__ */ jsxRuntime.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" })
|
|
67544
69119
|
] })
|
|
67545
69120
|
] }),
|
|
67546
69121
|
/* @__PURE__ */ jsxRuntime.jsxs(Card2, { className: "bg-white", children: [
|
|
@@ -69235,6 +70810,12 @@ var getPositiveImprovementGain = ({
|
|
|
69235
70810
|
pcsGain: issueGain !== null && issueGain > 0 ? issueGain : null
|
|
69236
70811
|
};
|
|
69237
70812
|
};
|
|
70813
|
+
var getImprovementPcsGainSortValue = (input) => {
|
|
70814
|
+
const { pcsGain } = getPositiveImprovementGain(input);
|
|
70815
|
+
if (pcsGain !== null) return pcsGain;
|
|
70816
|
+
const raw = toFiniteNumber(input.estimated_gain_pieces);
|
|
70817
|
+
return raw ?? null;
|
|
70818
|
+
};
|
|
69238
70819
|
var getImprovementDisplayMetadata = ({
|
|
69239
70820
|
location,
|
|
69240
70821
|
line,
|
|
@@ -69298,26 +70879,21 @@ var compareImprovementRecommendationPriority = (left, right) => {
|
|
|
69298
70879
|
};
|
|
69299
70880
|
var ImprovementRecommendationSignals = ({
|
|
69300
70881
|
recommendation,
|
|
69301
|
-
className
|
|
70882
|
+
className,
|
|
70883
|
+
hideTargetsReadjustment = false
|
|
69302
70884
|
}) => {
|
|
69303
70885
|
const gainSummary = getImprovementGainSummary(recommendation);
|
|
69304
|
-
const showTargetReadjustment = needsTargetReadjustment(recommendation);
|
|
70886
|
+
const showTargetReadjustment = !hideTargetsReadjustment && needsTargetReadjustment(recommendation);
|
|
69305
70887
|
if (!gainSummary && !showTargetReadjustment) {
|
|
69306
70888
|
return null;
|
|
69307
70889
|
}
|
|
69308
70890
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: className || "flex flex-wrap items-center gap-x-4 gap-y-3", children: [
|
|
69309
|
-
gainSummary && /* @__PURE__ */ jsxRuntime.
|
|
70891
|
+
gainSummary && /* @__PURE__ */ jsxRuntime.jsx(
|
|
69310
70892
|
"span",
|
|
69311
70893
|
{
|
|
69312
70894
|
"data-testid": "improvement-gain-chip",
|
|
69313
|
-
className: "inline-flex items-center
|
|
69314
|
-
children:
|
|
69315
|
-
/* @__PURE__ */ jsxRuntime.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: [
|
|
69316
|
-
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }),
|
|
69317
|
-
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 7 22 7 22 13" })
|
|
69318
|
-
] }),
|
|
69319
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: gainSummary.primary })
|
|
69320
|
-
]
|
|
70895
|
+
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",
|
|
70896
|
+
children: gainSummary.primary
|
|
69321
70897
|
}
|
|
69322
70898
|
),
|
|
69323
70899
|
showTargetReadjustment && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -70118,6 +71694,7 @@ var ImprovementCenterView = () => {
|
|
|
70118
71694
|
});
|
|
70119
71695
|
}, [supervisorsByLineId]);
|
|
70120
71696
|
const filteredRecommendations = React141.useMemo(() => {
|
|
71697
|
+
const hasActiveFilters = selectedLineId !== "all" || selectedStatus !== "all" || selectedShift !== "all" || selectedWeeksRange !== "all" || selectedMemberId !== "all" || selectedSortBy !== "all";
|
|
70121
71698
|
const sortedRecommendations = recommendations.filter((rec) => {
|
|
70122
71699
|
if (selectedLineId !== "all" && rec.line_id !== selectedLineId) return false;
|
|
70123
71700
|
if (selectedStatus === "resolved" && rec.ticket_status !== "solved") return false;
|
|
@@ -70132,22 +71709,22 @@ var ImprovementCenterView = () => {
|
|
|
70132
71709
|
if (selectedMemberId !== "all" && !(rec.assigned_user_ids?.includes(selectedMemberId) || rec.assigned_to_user_id === selectedMemberId)) return false;
|
|
70133
71710
|
return true;
|
|
70134
71711
|
}).sort((a, b) => {
|
|
70135
|
-
if (selectedSortBy === "highest_to_lowest") {
|
|
70136
|
-
const gainA =
|
|
70137
|
-
const gainB =
|
|
70138
|
-
|
|
70139
|
-
|
|
70140
|
-
|
|
70141
|
-
|
|
70142
|
-
|
|
70143
|
-
|
|
70144
|
-
if (gainA !== gainB) {
|
|
70145
|
-
return gainA - gainB;
|
|
71712
|
+
if (selectedSortBy === "highest_to_lowest" || selectedSortBy === "lowest_to_highest") {
|
|
71713
|
+
const gainA = getImprovementPcsGainSortValue(a);
|
|
71714
|
+
const gainB = getImprovementPcsGainSortValue(b);
|
|
71715
|
+
const aMissing = gainA === null;
|
|
71716
|
+
const bMissing = gainB === null;
|
|
71717
|
+
if (aMissing && bMissing) ; else if (aMissing) {
|
|
71718
|
+
return 1;
|
|
71719
|
+
} else if (bMissing) {
|
|
71720
|
+
return -1;
|
|
71721
|
+
} else if (gainA !== gainB) {
|
|
71722
|
+
return selectedSortBy === "highest_to_lowest" ? gainB - gainA : gainA - gainB;
|
|
70146
71723
|
}
|
|
70147
71724
|
}
|
|
70148
71725
|
return compareImprovementRecommendationPriority(a, b);
|
|
70149
71726
|
});
|
|
70150
|
-
if (!focusIssueId) {
|
|
71727
|
+
if (!focusIssueId || hasActiveFilters) {
|
|
70151
71728
|
return sortedRecommendations;
|
|
70152
71729
|
}
|
|
70153
71730
|
const focusedIndex = sortedRecommendations.findIndex((rec) => rec.issue_id === focusIssueId);
|
|
@@ -70481,7 +72058,7 @@ var ImprovementCenterView = () => {
|
|
|
70481
72058
|
/* @__PURE__ */ jsxRuntime.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))" } })
|
|
70482
72059
|
] })
|
|
70483
72060
|
] }),
|
|
70484
|
-
/* @__PURE__ */ jsxRuntime.jsx(ImprovementRecommendationSignals_default, { recommendation: rec })
|
|
72061
|
+
/* @__PURE__ */ jsxRuntime.jsx(ImprovementRecommendationSignals_default, { recommendation: rec, hideTargetsReadjustment: true })
|
|
70485
72062
|
] })
|
|
70486
72063
|
] }),
|
|
70487
72064
|
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
@@ -72568,20 +74145,410 @@ var AIAgentView = () => {
|
|
|
72568
74145
|
] });
|
|
72569
74146
|
};
|
|
72570
74147
|
var AIAgentView_default = AIAgentView;
|
|
72571
|
-
|
|
72572
|
-
|
|
72573
|
-
|
|
72574
|
-
|
|
72575
|
-
|
|
74148
|
+
|
|
74149
|
+
// src/views/operations-overview/store.ts
|
|
74150
|
+
var import_isEqual = __toESM(require_isEqual());
|
|
74151
|
+
|
|
74152
|
+
// src/views/operations-overview/types.ts
|
|
74153
|
+
var EMPTY_OVERVIEW_SCOPE = {
|
|
74154
|
+
current_range: { day_count: null },
|
|
74155
|
+
previous_range: { day_count: null },
|
|
74156
|
+
available_line_modes: { has_output: false, has_uptime: false },
|
|
74157
|
+
idle_time_vlm_enabled_line_count: null,
|
|
74158
|
+
idle_time_vlm_disabled_line_count: null
|
|
74159
|
+
};
|
|
74160
|
+
var EMPTY_OVERVIEW_SUMMARY = {
|
|
74161
|
+
plant_efficiency: { current: null, previous: null, delta_pp: null },
|
|
74162
|
+
avg_idle_per_workstation: {
|
|
74163
|
+
current_seconds: null,
|
|
74164
|
+
previous_seconds: null,
|
|
74165
|
+
delta_seconds: null,
|
|
74166
|
+
top_contributors: []
|
|
74167
|
+
}
|
|
74168
|
+
};
|
|
74169
|
+
var EMPTY_OVERVIEW_POOREST_LINES = {
|
|
74170
|
+
output: [],
|
|
74171
|
+
uptime: []
|
|
74172
|
+
};
|
|
74173
|
+
var EMPTY_OVERVIEW_TREND = {
|
|
74174
|
+
shift_mode: "all",
|
|
74175
|
+
points: []
|
|
74176
|
+
};
|
|
74177
|
+
var EMPTY_IDLE_BREAKDOWN = [];
|
|
74178
|
+
var EMPTY_IMPROVEMENTS = [];
|
|
74179
|
+
var LIVE_REFRESH_INTERVAL_MS = 6e4;
|
|
74180
|
+
|
|
74181
|
+
// src/views/operations-overview/store.ts
|
|
74182
|
+
var normalizeNumber = (value) => {
|
|
74183
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
74184
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
74185
|
+
const parsed = Number(value);
|
|
74186
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
74187
|
+
}
|
|
74188
|
+
return null;
|
|
74189
|
+
};
|
|
74190
|
+
var normalizeScope = (value) => ({
|
|
74191
|
+
company_id: value?.company_id,
|
|
74192
|
+
line_ids: Array.isArray(value?.line_ids) ? value.line_ids.filter((lineId) => typeof lineId === "string" && lineId.length > 0) : [],
|
|
74193
|
+
line_count: typeof value?.line_count === "number" ? value.line_count : value?.line_count ?? null,
|
|
74194
|
+
shift_mode: value?.shift_mode,
|
|
74195
|
+
comparison_strategy: value?.comparison_strategy,
|
|
74196
|
+
current_range: {
|
|
74197
|
+
start_date: value?.current_range?.start_date,
|
|
74198
|
+
end_date: value?.current_range?.end_date,
|
|
74199
|
+
day_count: value?.current_range?.day_count ?? null
|
|
74200
|
+
},
|
|
74201
|
+
previous_range: {
|
|
74202
|
+
start_date: value?.previous_range?.start_date,
|
|
74203
|
+
end_date: value?.previous_range?.end_date,
|
|
74204
|
+
day_count: value?.previous_range?.day_count ?? null
|
|
74205
|
+
},
|
|
74206
|
+
available_line_modes: {
|
|
74207
|
+
has_output: !!value?.available_line_modes?.has_output,
|
|
74208
|
+
has_uptime: !!value?.available_line_modes?.has_uptime
|
|
74209
|
+
},
|
|
74210
|
+
idle_time_vlm_enabled_line_count: value?.idle_time_vlm_enabled_line_count ?? null,
|
|
74211
|
+
idle_time_vlm_disabled_line_count: value?.idle_time_vlm_disabled_line_count ?? null
|
|
74212
|
+
});
|
|
74213
|
+
var normalizeTopContributor = (value) => ({
|
|
74214
|
+
workspace_id: value?.workspace_id,
|
|
74215
|
+
workspace_name: value?.workspace_name?.trim() || value?.workspace_id || "",
|
|
74216
|
+
line_id: value?.line_id,
|
|
74217
|
+
line_name: value?.line_name?.trim() || "",
|
|
74218
|
+
avg_idle_seconds: normalizeNumber(value?.avg_idle_seconds)
|
|
74219
|
+
});
|
|
74220
|
+
var normalizeIdleMetric = (value) => ({
|
|
74221
|
+
current_seconds: normalizeNumber(value?.current_seconds),
|
|
74222
|
+
previous_seconds: normalizeNumber(value?.previous_seconds),
|
|
74223
|
+
delta_seconds: normalizeNumber(value?.delta_seconds),
|
|
74224
|
+
top_contributors: (value?.top_contributors || []).map((item) => normalizeTopContributor(item))
|
|
74225
|
+
});
|
|
74226
|
+
var normalizeSummary = (value) => ({
|
|
74227
|
+
plant_efficiency: {
|
|
74228
|
+
current: normalizeNumber(value?.plant_efficiency?.current),
|
|
74229
|
+
previous: normalizeNumber(value?.plant_efficiency?.previous),
|
|
74230
|
+
delta_pp: normalizeNumber(value?.plant_efficiency?.delta_pp)
|
|
72576
74231
|
},
|
|
72577
|
-
|
|
72578
|
-
|
|
72579
|
-
|
|
74232
|
+
avg_idle_per_workstation: normalizeIdleMetric(value?.avg_idle_per_workstation)
|
|
74233
|
+
});
|
|
74234
|
+
var normalizeLineRow = (value) => ({
|
|
74235
|
+
line_id: value?.line_id,
|
|
74236
|
+
line_name: value?.line_name?.trim() || value?.line_id || "",
|
|
74237
|
+
avg_efficiency: normalizeNumber(value?.avg_efficiency),
|
|
74238
|
+
previous_avg_efficiency: normalizeNumber(value?.previous_avg_efficiency),
|
|
74239
|
+
delta_pp: normalizeNumber(value?.delta_pp)
|
|
74240
|
+
});
|
|
74241
|
+
var normalizePoorestLines = (value) => ({
|
|
74242
|
+
output: (value?.output || []).map((item) => normalizeLineRow(item)),
|
|
74243
|
+
uptime: (value?.uptime || []).map((item) => normalizeLineRow(item))
|
|
74244
|
+
});
|
|
74245
|
+
var normalizeTrend = (value) => ({
|
|
74246
|
+
shift_mode: value?.shift_mode || "all",
|
|
74247
|
+
points: (value?.points || []).map((point) => ({
|
|
74248
|
+
date: point?.date,
|
|
74249
|
+
avg_efficiency: normalizeNumber(point?.avg_efficiency)
|
|
74250
|
+
}))
|
|
74251
|
+
});
|
|
74252
|
+
var normalizeIdleBreakdown = (value) => (value || []).map((item) => ({
|
|
74253
|
+
reason: item?.reason?.trim() || "Unknown",
|
|
74254
|
+
percentage: normalizeNumber(item?.percentage),
|
|
74255
|
+
total_duration_seconds: normalizeNumber(item?.total_duration_seconds),
|
|
74256
|
+
efficiency_loss_percentage: normalizeNumber(item?.efficiency_loss_percentage),
|
|
74257
|
+
contributors: (item?.contributors || []).map((contributor) => ({
|
|
74258
|
+
workspace_id: contributor?.workspace_id,
|
|
74259
|
+
workspace_name: contributor?.workspace_name?.trim() || contributor?.workspace_id || "",
|
|
74260
|
+
total_duration_seconds: normalizeNumber(contributor?.total_duration_seconds),
|
|
74261
|
+
percentage_within_reason: normalizeNumber(contributor?.percentage_within_reason)
|
|
74262
|
+
}))
|
|
74263
|
+
}));
|
|
74264
|
+
var normalizeImprovements = (rows) => rows.map((row) => ({
|
|
74265
|
+
id: row.id,
|
|
74266
|
+
issueId: row.issueId,
|
|
74267
|
+
issueNumber: row.issueNumber,
|
|
74268
|
+
title: row.title,
|
|
74269
|
+
metric: row.metric,
|
|
74270
|
+
location: row.location,
|
|
74271
|
+
line: row.line,
|
|
74272
|
+
lineId: row.lineId,
|
|
74273
|
+
workspaceId: row.workspaceId
|
|
74274
|
+
}));
|
|
74275
|
+
var reuseIfEqual = (previous, next) => (0, import_isEqual.default)(previous, next) ? previous : next;
|
|
74276
|
+
var createInitialState = () => ({
|
|
74277
|
+
scope: EMPTY_OVERVIEW_SCOPE,
|
|
74278
|
+
snapshot: {
|
|
74279
|
+
data: {
|
|
74280
|
+
summary: EMPTY_OVERVIEW_SUMMARY,
|
|
74281
|
+
poorest_lines: EMPTY_OVERVIEW_POOREST_LINES
|
|
74282
|
+
},
|
|
74283
|
+
loading: false,
|
|
74284
|
+
error: null,
|
|
74285
|
+
hasLoadedOnce: false,
|
|
74286
|
+
lastUpdated: null
|
|
72580
74287
|
},
|
|
72581
|
-
|
|
72582
|
-
|
|
72583
|
-
|
|
74288
|
+
trend: {
|
|
74289
|
+
data: EMPTY_OVERVIEW_TREND,
|
|
74290
|
+
loading: false,
|
|
74291
|
+
error: null,
|
|
74292
|
+
lastUpdated: null
|
|
74293
|
+
},
|
|
74294
|
+
idle: {
|
|
74295
|
+
scope: EMPTY_OVERVIEW_SCOPE,
|
|
74296
|
+
data: EMPTY_IDLE_BREAKDOWN,
|
|
74297
|
+
loading: false,
|
|
74298
|
+
error: null,
|
|
74299
|
+
lastUpdated: null
|
|
74300
|
+
},
|
|
74301
|
+
improvements: {
|
|
74302
|
+
data: EMPTY_IMPROVEMENTS,
|
|
74303
|
+
loading: false,
|
|
74304
|
+
error: null,
|
|
74305
|
+
lastUpdated: null
|
|
74306
|
+
}
|
|
74307
|
+
});
|
|
74308
|
+
var hasSnapshotPayload = (state) => state.snapshot.hasLoadedOnce;
|
|
74309
|
+
var hasTrendPayload = (state) => state.trend.lastUpdated !== null;
|
|
74310
|
+
var hasIdlePayload = (state) => state.idle.lastUpdated !== null;
|
|
74311
|
+
var hasImprovementsPayload = (state) => state.improvements.lastUpdated !== null;
|
|
74312
|
+
var createOperationsOverviewStore = () => {
|
|
74313
|
+
let state = createInitialState();
|
|
74314
|
+
const listeners2 = /* @__PURE__ */ new Set();
|
|
74315
|
+
const emit = () => {
|
|
74316
|
+
listeners2.forEach((listener) => listener());
|
|
74317
|
+
};
|
|
74318
|
+
const setState = (updater, mode = "default") => {
|
|
74319
|
+
const next = updater(state);
|
|
74320
|
+
if (next === state) return;
|
|
74321
|
+
const commit = () => {
|
|
74322
|
+
state = next;
|
|
74323
|
+
emit();
|
|
74324
|
+
};
|
|
74325
|
+
if (mode === "transition") {
|
|
74326
|
+
React141.startTransition(commit);
|
|
74327
|
+
return;
|
|
74328
|
+
}
|
|
74329
|
+
commit();
|
|
74330
|
+
};
|
|
74331
|
+
const subscribe = (listener) => {
|
|
74332
|
+
listeners2.add(listener);
|
|
74333
|
+
return () => {
|
|
74334
|
+
listeners2.delete(listener);
|
|
74335
|
+
};
|
|
74336
|
+
};
|
|
74337
|
+
const reset = () => {
|
|
74338
|
+
setState(() => createInitialState());
|
|
74339
|
+
};
|
|
74340
|
+
const beginSectionLoad = (section) => {
|
|
74341
|
+
setState((previous) => {
|
|
74342
|
+
if (section === "snapshot") {
|
|
74343
|
+
const showLoading2 = !hasSnapshotPayload(previous);
|
|
74344
|
+
if (previous.snapshot.loading === showLoading2 && previous.snapshot.error === null) {
|
|
74345
|
+
return previous;
|
|
74346
|
+
}
|
|
74347
|
+
return {
|
|
74348
|
+
...previous,
|
|
74349
|
+
snapshot: {
|
|
74350
|
+
...previous.snapshot,
|
|
74351
|
+
loading: showLoading2,
|
|
74352
|
+
error: null
|
|
74353
|
+
}
|
|
74354
|
+
};
|
|
74355
|
+
}
|
|
74356
|
+
if (section === "trend") {
|
|
74357
|
+
const showLoading2 = !hasTrendPayload(previous);
|
|
74358
|
+
if (previous.trend.loading === showLoading2 && previous.trend.error === null) {
|
|
74359
|
+
return previous;
|
|
74360
|
+
}
|
|
74361
|
+
return {
|
|
74362
|
+
...previous,
|
|
74363
|
+
trend: {
|
|
74364
|
+
...previous.trend,
|
|
74365
|
+
loading: showLoading2,
|
|
74366
|
+
error: null
|
|
74367
|
+
}
|
|
74368
|
+
};
|
|
74369
|
+
}
|
|
74370
|
+
if (section === "idle") {
|
|
74371
|
+
const showLoading2 = !hasIdlePayload(previous);
|
|
74372
|
+
if (previous.idle.loading === showLoading2 && previous.idle.error === null) {
|
|
74373
|
+
return previous;
|
|
74374
|
+
}
|
|
74375
|
+
return {
|
|
74376
|
+
...previous,
|
|
74377
|
+
idle: {
|
|
74378
|
+
...previous.idle,
|
|
74379
|
+
loading: showLoading2,
|
|
74380
|
+
error: null
|
|
74381
|
+
}
|
|
74382
|
+
};
|
|
74383
|
+
}
|
|
74384
|
+
const showLoading = !hasImprovementsPayload(previous);
|
|
74385
|
+
if (previous.improvements.loading === showLoading && previous.improvements.error === null) {
|
|
74386
|
+
return previous;
|
|
74387
|
+
}
|
|
74388
|
+
return {
|
|
74389
|
+
...previous,
|
|
74390
|
+
improvements: {
|
|
74391
|
+
...previous.improvements,
|
|
74392
|
+
loading: showLoading,
|
|
74393
|
+
error: null
|
|
74394
|
+
}
|
|
74395
|
+
};
|
|
74396
|
+
});
|
|
74397
|
+
};
|
|
74398
|
+
const failSectionLoad = (section, error) => {
|
|
74399
|
+
setState((previous) => {
|
|
74400
|
+
if (section === "snapshot") {
|
|
74401
|
+
if (hasSnapshotPayload(previous)) return previous;
|
|
74402
|
+
return {
|
|
74403
|
+
...previous,
|
|
74404
|
+
snapshot: {
|
|
74405
|
+
...previous.snapshot,
|
|
74406
|
+
loading: false,
|
|
74407
|
+
error
|
|
74408
|
+
}
|
|
74409
|
+
};
|
|
74410
|
+
}
|
|
74411
|
+
if (section === "trend") {
|
|
74412
|
+
if (hasTrendPayload(previous)) return previous;
|
|
74413
|
+
return {
|
|
74414
|
+
...previous,
|
|
74415
|
+
trend: {
|
|
74416
|
+
...previous.trend,
|
|
74417
|
+
loading: false,
|
|
74418
|
+
error
|
|
74419
|
+
}
|
|
74420
|
+
};
|
|
74421
|
+
}
|
|
74422
|
+
if (section === "idle") {
|
|
74423
|
+
if (hasIdlePayload(previous)) return previous;
|
|
74424
|
+
return {
|
|
74425
|
+
...previous,
|
|
74426
|
+
idle: {
|
|
74427
|
+
...previous.idle,
|
|
74428
|
+
loading: false,
|
|
74429
|
+
error
|
|
74430
|
+
}
|
|
74431
|
+
};
|
|
74432
|
+
}
|
|
74433
|
+
if (hasImprovementsPayload(previous)) return previous;
|
|
74434
|
+
return {
|
|
74435
|
+
...previous,
|
|
74436
|
+
improvements: {
|
|
74437
|
+
...previous.improvements,
|
|
74438
|
+
loading: false,
|
|
74439
|
+
error
|
|
74440
|
+
}
|
|
74441
|
+
};
|
|
74442
|
+
});
|
|
74443
|
+
};
|
|
74444
|
+
return {
|
|
74445
|
+
getState: () => state,
|
|
74446
|
+
subscribe,
|
|
74447
|
+
reset,
|
|
74448
|
+
beginSnapshotLoad: () => beginSectionLoad("snapshot"),
|
|
74449
|
+
applySnapshotResponse: (response, updatedAt, mode = "default") => {
|
|
74450
|
+
setState((previous) => {
|
|
74451
|
+
const nextScope = reuseIfEqual(previous.scope, normalizeScope(response.scope));
|
|
74452
|
+
const nextSummary = reuseIfEqual(previous.snapshot.data.summary, normalizeSummary(response.summary));
|
|
74453
|
+
const nextPoorestLines = reuseIfEqual(previous.snapshot.data.poorest_lines, normalizePoorestLines(response.poorest_lines));
|
|
74454
|
+
const nextData = nextSummary === previous.snapshot.data.summary && nextPoorestLines === previous.snapshot.data.poorest_lines ? previous.snapshot.data : {
|
|
74455
|
+
summary: nextSummary,
|
|
74456
|
+
poorest_lines: nextPoorestLines
|
|
74457
|
+
};
|
|
74458
|
+
const nextLastUpdated = nextData !== previous.snapshot.data || previous.snapshot.lastUpdated === null ? updatedAt : previous.snapshot.lastUpdated;
|
|
74459
|
+
if (nextScope === previous.scope && nextData === previous.snapshot.data && previous.snapshot.loading === false && previous.snapshot.error === null && previous.snapshot.hasLoadedOnce && nextLastUpdated === previous.snapshot.lastUpdated) {
|
|
74460
|
+
return previous;
|
|
74461
|
+
}
|
|
74462
|
+
return {
|
|
74463
|
+
...previous,
|
|
74464
|
+
scope: nextScope,
|
|
74465
|
+
snapshot: {
|
|
74466
|
+
data: nextData,
|
|
74467
|
+
loading: false,
|
|
74468
|
+
error: null,
|
|
74469
|
+
hasLoadedOnce: true,
|
|
74470
|
+
lastUpdated: nextLastUpdated
|
|
74471
|
+
}
|
|
74472
|
+
};
|
|
74473
|
+
}, mode);
|
|
74474
|
+
},
|
|
74475
|
+
failSnapshotLoad: (error) => failSectionLoad("snapshot", error),
|
|
74476
|
+
beginTrendLoad: () => beginSectionLoad("trend"),
|
|
74477
|
+
applyTrendResponse: (response, updatedAt, mode = "default") => {
|
|
74478
|
+
setState((previous) => {
|
|
74479
|
+
const nextData = reuseIfEqual(previous.trend.data, normalizeTrend(response.trend));
|
|
74480
|
+
const nextLastUpdated = nextData !== previous.trend.data || previous.trend.lastUpdated === null ? updatedAt : previous.trend.lastUpdated;
|
|
74481
|
+
if (nextData === previous.trend.data && previous.trend.loading === false && previous.trend.error === null && nextLastUpdated === previous.trend.lastUpdated) {
|
|
74482
|
+
return previous;
|
|
74483
|
+
}
|
|
74484
|
+
return {
|
|
74485
|
+
...previous,
|
|
74486
|
+
trend: {
|
|
74487
|
+
data: nextData,
|
|
74488
|
+
loading: false,
|
|
74489
|
+
error: null,
|
|
74490
|
+
lastUpdated: nextLastUpdated
|
|
74491
|
+
}
|
|
74492
|
+
};
|
|
74493
|
+
}, mode);
|
|
74494
|
+
},
|
|
74495
|
+
failTrendLoad: (error) => failSectionLoad("trend", error),
|
|
74496
|
+
beginIdleLoad: () => beginSectionLoad("idle"),
|
|
74497
|
+
applyIdleResponse: (response, updatedAt, mode = "default") => {
|
|
74498
|
+
setState((previous) => {
|
|
74499
|
+
const nextScope = reuseIfEqual(previous.idle.scope, normalizeScope(response.scope));
|
|
74500
|
+
const nextData = reuseIfEqual(previous.idle.data, normalizeIdleBreakdown(response.idle_reason_breakdown));
|
|
74501
|
+
const nextLastUpdated = nextData !== previous.idle.data || nextScope !== previous.idle.scope || previous.idle.lastUpdated === null ? updatedAt : previous.idle.lastUpdated;
|
|
74502
|
+
if (nextData === previous.idle.data && nextScope === previous.idle.scope && previous.idle.loading === false && previous.idle.error === null && nextLastUpdated === previous.idle.lastUpdated) {
|
|
74503
|
+
return previous;
|
|
74504
|
+
}
|
|
74505
|
+
return {
|
|
74506
|
+
...previous,
|
|
74507
|
+
idle: {
|
|
74508
|
+
scope: nextScope,
|
|
74509
|
+
data: nextData,
|
|
74510
|
+
loading: false,
|
|
74511
|
+
error: null,
|
|
74512
|
+
lastUpdated: nextLastUpdated
|
|
74513
|
+
}
|
|
74514
|
+
};
|
|
74515
|
+
}, mode);
|
|
74516
|
+
},
|
|
74517
|
+
failIdleLoad: (error) => failSectionLoad("idle", error),
|
|
74518
|
+
beginImprovementsLoad: () => beginSectionLoad("improvements"),
|
|
74519
|
+
applyImprovements: (rows, updatedAt, mode = "default") => {
|
|
74520
|
+
setState((previous) => {
|
|
74521
|
+
const nextData = reuseIfEqual(previous.improvements.data, normalizeImprovements(rows));
|
|
74522
|
+
const nextLastUpdated = nextData !== previous.improvements.data || previous.improvements.lastUpdated === null ? updatedAt : previous.improvements.lastUpdated;
|
|
74523
|
+
if (nextData === previous.improvements.data && previous.improvements.loading === false && previous.improvements.error === null && nextLastUpdated === previous.improvements.lastUpdated) {
|
|
74524
|
+
return previous;
|
|
74525
|
+
}
|
|
74526
|
+
return {
|
|
74527
|
+
...previous,
|
|
74528
|
+
improvements: {
|
|
74529
|
+
data: nextData,
|
|
74530
|
+
loading: false,
|
|
74531
|
+
error: null,
|
|
74532
|
+
lastUpdated: nextLastUpdated
|
|
74533
|
+
}
|
|
74534
|
+
};
|
|
74535
|
+
}, mode);
|
|
74536
|
+
},
|
|
74537
|
+
failImprovementsLoad: (error) => failSectionLoad("improvements", error)
|
|
74538
|
+
};
|
|
72584
74539
|
};
|
|
74540
|
+
var useOperationsOverviewSelector = (store, selector) => {
|
|
74541
|
+
return React141.useSyncExternalStore(
|
|
74542
|
+
store.subscribe,
|
|
74543
|
+
() => selector(store.getState()),
|
|
74544
|
+
() => selector(store.getState())
|
|
74545
|
+
);
|
|
74546
|
+
};
|
|
74547
|
+
var useOperationsOverviewScope = (store) => useOperationsOverviewSelector(store, (state) => state.scope);
|
|
74548
|
+
var useOperationsOverviewSnapshot = (store) => useOperationsOverviewSelector(store, (state) => state.snapshot);
|
|
74549
|
+
var useOperationsOverviewTrend = (store) => useOperationsOverviewSelector(store, (state) => state.trend);
|
|
74550
|
+
var useOperationsOverviewIdle = (store) => useOperationsOverviewSelector(store, (state) => state.idle);
|
|
74551
|
+
var useOperationsOverviewImprovements = (store) => useOperationsOverviewSelector(store, (state) => state.improvements);
|
|
72585
74552
|
var efficiencyLineConfig = [
|
|
72586
74553
|
{
|
|
72587
74554
|
dataKey: "efficiency",
|
|
@@ -72593,6 +74560,9 @@ var efficiencyLineConfig = [
|
|
|
72593
74560
|
activeDot: { r: 6, strokeWidth: 0, fill: "#00AB45" }
|
|
72594
74561
|
}
|
|
72595
74562
|
];
|
|
74563
|
+
var bumpRenderCounter = (key) => {
|
|
74564
|
+
if (process.env.NODE_ENV === "test") ;
|
|
74565
|
+
};
|
|
72596
74566
|
var toNumber3 = (value) => {
|
|
72597
74567
|
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
72598
74568
|
if (typeof value === "string" && value.trim().length > 0) {
|
|
@@ -72612,26 +74582,11 @@ var formatSignedIdleDuration = (seconds) => {
|
|
|
72612
74582
|
const sign = seconds > 0 ? "+" : "-";
|
|
72613
74583
|
return `${sign}${formatIdleDuration(Math.abs(seconds))}`;
|
|
72614
74584
|
};
|
|
72615
|
-
var formatComparisonWindow = (dayCount) => {
|
|
74585
|
+
var formatComparisonWindow = (dayCount, comparisonStrategy) => {
|
|
74586
|
+
if (comparisonStrategy === "previous_full_week") return "last week";
|
|
72616
74587
|
if (!dayCount || !Number.isFinite(dayCount)) return "previous range";
|
|
72617
74588
|
return `previous ${dayCount} ${dayCount === 1 ? "day" : "days"}`;
|
|
72618
74589
|
};
|
|
72619
|
-
var buildImprovementMetric = (recommendation) => {
|
|
72620
|
-
const { pcsGain } = getPositiveImprovementGain(recommendation);
|
|
72621
|
-
const metrics2 = recommendation.metrics || {};
|
|
72622
|
-
if (pcsGain !== null) {
|
|
72623
|
-
return formatImprovementPieceGain(pcsGain);
|
|
72624
|
-
}
|
|
72625
|
-
const idleMinutes = toNumber3(metrics2.idle_minutes);
|
|
72626
|
-
if (idleMinutes !== null) {
|
|
72627
|
-
return `-${Math.round(idleMinutes)}m Idle`;
|
|
72628
|
-
}
|
|
72629
|
-
const impactText = recommendation.impact?.trim();
|
|
72630
|
-
if (impactText) {
|
|
72631
|
-
return impactText.length > 22 ? `${impactText.slice(0, 22).trim()}...` : impactText;
|
|
72632
|
-
}
|
|
72633
|
-
return "Review Issue";
|
|
72634
|
-
};
|
|
72635
74590
|
var buildDeltaBadge = (delta, options) => {
|
|
72636
74591
|
if (delta === null || delta === void 0 || !Number.isFinite(delta)) {
|
|
72637
74592
|
return {
|
|
@@ -72699,368 +74654,224 @@ var OverviewImprovementsSkeleton = () => /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
|
72699
74654
|
] }),
|
|
72700
74655
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end flex-shrink-0 ml-4", children: /* @__PURE__ */ jsxRuntime.jsx(SectionPulse, { className: "h-6 w-20 rounded-full" }) })
|
|
72701
74656
|
] }, index)) });
|
|
72702
|
-
var
|
|
72703
|
-
|
|
72704
|
-
|
|
72705
|
-
|
|
72706
|
-
|
|
72707
|
-
|
|
72708
|
-
|
|
72709
|
-
|
|
72710
|
-
|
|
72711
|
-
const [trendMode, setTrendMode] = React141__namespace.default.useState("all");
|
|
72712
|
-
const [poorestLineMode, setPoorestLineMode] = React141__namespace.default.useState("output");
|
|
72713
|
-
const [overview, setOverview] = React141__namespace.default.useState(EMPTY_OVERVIEW);
|
|
72714
|
-
const [isSnapshotLoading, setIsSnapshotLoading] = React141__namespace.default.useState(false);
|
|
72715
|
-
const [isTrendLoading, setIsTrendLoading] = React141__namespace.default.useState(false);
|
|
72716
|
-
const [trendFetchNonce, setTrendFetchNonce] = React141__namespace.default.useState(0);
|
|
72717
|
-
const [trendViewOpenNonce] = React141__namespace.default.useState(() => Date.now());
|
|
72718
|
-
const [idleReasonBreakdown, setIdleReasonBreakdown] = React141__namespace.default.useState([]);
|
|
72719
|
-
const [idleReasonScope, setIdleReasonScope] = React141__namespace.default.useState(null);
|
|
72720
|
-
const [isIdleReasonBreakdownLoading, setIsIdleReasonBreakdownLoading] = React141__namespace.default.useState(false);
|
|
72721
|
-
const [improvements, setImprovements] = React141__namespace.default.useState([]);
|
|
72722
|
-
const [isImprovementsLoading, setIsImprovementsLoading] = React141__namespace.default.useState(false);
|
|
74657
|
+
var OperationsOverviewHeader = React141__namespace.default.memo(({
|
|
74658
|
+
dateRange,
|
|
74659
|
+
trendMode,
|
|
74660
|
+
appTimezone,
|
|
74661
|
+
mobileMenuContext,
|
|
74662
|
+
onDateRangeChange,
|
|
74663
|
+
onTrendModeChange
|
|
74664
|
+
}) => {
|
|
74665
|
+
bumpRenderCounter();
|
|
72723
74666
|
const [isFilterOpen, setIsFilterOpen] = React141__namespace.default.useState(false);
|
|
72724
|
-
const [isIdleContributorsOpen, setIsIdleContributorsOpen] = React141__namespace.default.useState(false);
|
|
72725
|
-
const [isIdleContributorsPinned, setIsIdleContributorsPinned] = React141__namespace.default.useState(false);
|
|
72726
74667
|
const filterRef = React141__namespace.default.useRef(null);
|
|
72727
74668
|
const filterButtonRef = React141__namespace.default.useRef(null);
|
|
72728
74669
|
const mobileFilterButtonRef = React141__namespace.default.useRef(null);
|
|
72729
|
-
const
|
|
72730
|
-
|
|
72731
|
-
|
|
72732
|
-
|
|
72733
|
-
const
|
|
72734
|
-
|
|
72735
|
-
|
|
72736
|
-
|
|
72737
|
-
}
|
|
72738
|
-
|
|
72739
|
-
}, []);
|
|
74670
|
+
const currentWeekRange = React141__namespace.default.useMemo(
|
|
74671
|
+
() => getCurrentWeekToDateRange(appTimezone),
|
|
74672
|
+
[appTimezone]
|
|
74673
|
+
);
|
|
74674
|
+
const isCurrentWeekToDateRange = dateRange.startKey === currentWeekRange.startKey && dateRange.endKey === currentWeekRange.endKey;
|
|
74675
|
+
const mobileSubtitle = React141__namespace.default.useMemo(() => {
|
|
74676
|
+
if (isCurrentWeekToDateRange) {
|
|
74677
|
+
return `Week of ${dateFns.format(parseDateKeyToDate(dateRange.startKey), "do MMM")}`;
|
|
74678
|
+
}
|
|
74679
|
+
return `${dateFns.format(parseDateKeyToDate(dateRange.startKey), "do MMM")} - ${dateFns.format(parseDateKeyToDate(dateRange.endKey), "do MMM, yyyy")}`;
|
|
74680
|
+
}, [dateRange.endKey, dateRange.startKey, isCurrentWeekToDateRange]);
|
|
74681
|
+
const desktopSubtitle = React141__namespace.default.useMemo(() => {
|
|
74682
|
+
if (isCurrentWeekToDateRange) {
|
|
74683
|
+
return `Week of ${dateFns.format(parseDateKeyToDate(dateRange.startKey), "do MMMM, yyyy")}`;
|
|
74684
|
+
}
|
|
74685
|
+
return `${dateFns.format(parseDateKeyToDate(dateRange.startKey), "do MMMM, yyyy")} - ${dateFns.format(parseDateKeyToDate(dateRange.endKey), "do MMMM, yyyy")}`;
|
|
74686
|
+
}, [dateRange.endKey, dateRange.startKey, isCurrentWeekToDateRange]);
|
|
72740
74687
|
const handleFilterToggle = React141__namespace.default.useCallback(() => {
|
|
72741
74688
|
trackCoreEvent("Operations Overview Filter Toggled", {
|
|
72742
74689
|
action: !isFilterOpen ? "open" : "close"
|
|
72743
74690
|
});
|
|
72744
|
-
setIsFilterOpen(!
|
|
74691
|
+
setIsFilterOpen((previous) => !previous);
|
|
72745
74692
|
}, [isFilterOpen]);
|
|
72746
|
-
const handleTrendModeChange = React141__namespace.default.useCallback((
|
|
72747
|
-
const
|
|
74693
|
+
const handleTrendModeChange = React141__namespace.default.useCallback((event) => {
|
|
74694
|
+
const nextMode = event.target.value;
|
|
72748
74695
|
trackCoreEvent("Operations Overview Shift Filter Changed", {
|
|
72749
|
-
shift_mode:
|
|
74696
|
+
shift_mode: nextMode
|
|
72750
74697
|
});
|
|
72751
|
-
|
|
72752
|
-
}, []);
|
|
72753
|
-
const handlePoorestLineModeChange = React141__namespace.default.useCallback((mode) => {
|
|
72754
|
-
trackCoreEvent("Operations Overview Poorest Line Mode Changed", {
|
|
72755
|
-
mode
|
|
72756
|
-
});
|
|
72757
|
-
setPoorestLineMode(mode);
|
|
72758
|
-
}, []);
|
|
74698
|
+
onTrendModeChange(nextMode);
|
|
74699
|
+
}, [onTrendModeChange]);
|
|
72759
74700
|
React141__namespace.default.useEffect(() => {
|
|
72760
|
-
|
|
74701
|
+
const handleClickOutside = (event) => {
|
|
72761
74702
|
if (filterRef.current && !filterRef.current.contains(event.target) && filterButtonRef.current && !filterButtonRef.current.contains(event.target) && mobileFilterButtonRef.current && !mobileFilterButtonRef.current.contains(event.target)) {
|
|
72762
74703
|
setIsFilterOpen(false);
|
|
72763
74704
|
}
|
|
72764
|
-
}
|
|
74705
|
+
};
|
|
72765
74706
|
document.addEventListener("mousedown", handleClickOutside);
|
|
72766
74707
|
return () => {
|
|
72767
74708
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
72768
74709
|
};
|
|
72769
74710
|
}, []);
|
|
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
|
-
|
|
72870
|
-
|
|
72871
|
-
|
|
72872
|
-
|
|
72873
|
-
|
|
72874
|
-
|
|
72875
|
-
|
|
72876
|
-
|
|
72877
|
-
|
|
72878
|
-
|
|
72879
|
-
|
|
72880
|
-
|
|
72881
|
-
|
|
72882
|
-
|
|
72883
|
-
|
|
72884
|
-
|
|
72885
|
-
|
|
72886
|
-
|
|
72887
|
-
|
|
72888
|
-
|
|
72889
|
-
|
|
72890
|
-
|
|
72891
|
-
|
|
72892
|
-
|
|
72893
|
-
|
|
72894
|
-
|
|
72895
|
-
|
|
72896
|
-
|
|
72897
|
-
|
|
72898
|
-
cancelled = true;
|
|
72899
|
-
};
|
|
72900
|
-
}, [
|
|
72901
|
-
companyId,
|
|
72902
|
-
dateRange.endKey,
|
|
72903
|
-
dateRange.startKey,
|
|
72904
|
-
lineIdsKey,
|
|
72905
|
-
scopedLineIds,
|
|
72906
|
-
supabase,
|
|
72907
|
-
trendMode
|
|
72908
|
-
]);
|
|
72909
|
-
React141__namespace.default.useEffect(() => {
|
|
72910
|
-
if (!supabase || !companyId) return void 0;
|
|
72911
|
-
if (scopedLineIds.length === 0) {
|
|
72912
|
-
setIdleReasonScope(null);
|
|
72913
|
-
setIdleReasonBreakdown([]);
|
|
72914
|
-
setIsIdleReasonBreakdownLoading(false);
|
|
72915
|
-
return void 0;
|
|
72916
|
-
}
|
|
72917
|
-
let cancelled = false;
|
|
72918
|
-
setIdleReasonScope(null);
|
|
72919
|
-
setIdleReasonBreakdown([]);
|
|
72920
|
-
setIsIdleReasonBreakdownLoading(true);
|
|
72921
|
-
const fetchIdleReasonBreakdown = async () => {
|
|
72922
|
-
const params = new URLSearchParams({
|
|
72923
|
-
company_id: companyId,
|
|
72924
|
-
start_date: dateRange.startKey,
|
|
72925
|
-
end_date: dateRange.endKey,
|
|
72926
|
-
trend_shift_mode: trendMode,
|
|
72927
|
-
line_ids: scopedLineIds.join(",")
|
|
72928
|
-
});
|
|
72929
|
-
const response = await fetchBackendJson(
|
|
72930
|
-
supabase,
|
|
72931
|
-
`/api/dashboard/operations-overview/idle-reason-breakdown?${params.toString()}`
|
|
72932
|
-
);
|
|
72933
|
-
if (!cancelled) {
|
|
72934
|
-
setIdleReasonScope(response.scope || null);
|
|
72935
|
-
setIdleReasonBreakdown(response.idle_reason_breakdown || []);
|
|
72936
|
-
}
|
|
72937
|
-
};
|
|
72938
|
-
fetchIdleReasonBreakdown().catch((error) => {
|
|
72939
|
-
console.error("[PlantHeadView] Failed to fetch idle reason breakdown", error);
|
|
72940
|
-
if (!cancelled) {
|
|
72941
|
-
setIdleReasonScope(null);
|
|
72942
|
-
setIdleReasonBreakdown([]);
|
|
72943
|
-
}
|
|
72944
|
-
}).finally(() => {
|
|
72945
|
-
if (!cancelled) {
|
|
72946
|
-
setIsIdleReasonBreakdownLoading(false);
|
|
72947
|
-
}
|
|
72948
|
-
});
|
|
72949
|
-
return () => {
|
|
72950
|
-
cancelled = true;
|
|
72951
|
-
};
|
|
72952
|
-
}, [
|
|
72953
|
-
companyId,
|
|
72954
|
-
dateRange.endKey,
|
|
72955
|
-
dateRange.startKey,
|
|
72956
|
-
lineIdsKey,
|
|
72957
|
-
scopedLineIds,
|
|
72958
|
-
supabase,
|
|
72959
|
-
trendMode
|
|
72960
|
-
]);
|
|
72961
|
-
React141__namespace.default.useEffect(() => {
|
|
72962
|
-
if (!supabase || !companyId) return void 0;
|
|
72963
|
-
if (scopedLineIds.length === 0) {
|
|
72964
|
-
setImprovements([]);
|
|
72965
|
-
setIsImprovementsLoading(false);
|
|
72966
|
-
return void 0;
|
|
72967
|
-
}
|
|
72968
|
-
let cancelled = false;
|
|
72969
|
-
setIsImprovementsLoading(true);
|
|
72970
|
-
const fetchImprovements = async () => {
|
|
72971
|
-
const params = new URLSearchParams({
|
|
72972
|
-
company_id: companyId,
|
|
72973
|
-
status: "open",
|
|
72974
|
-
limit: "200",
|
|
72975
|
-
line_ids: scopedLineIds.join(",")
|
|
72976
|
-
});
|
|
72977
|
-
const response = await fetchBackendJson(
|
|
72978
|
-
supabase,
|
|
72979
|
-
`/api/improvement-center/recommendations?${params.toString()}`
|
|
72980
|
-
);
|
|
72981
|
-
if (cancelled) return;
|
|
72982
|
-
const allowedLineIds = new Set(scopedLineIds);
|
|
72983
|
-
const scopedRecommendations = (response.recommendations || []).filter((recommendation) => {
|
|
72984
|
-
return !recommendation.line_id || allowedLineIds.has(recommendation.line_id);
|
|
72985
|
-
});
|
|
72986
|
-
const nextImprovements = [...scopedRecommendations].sort(compareImprovementRecommendationPriority).slice(0, 3).map((recommendation) => ({
|
|
72987
|
-
id: recommendation.issue_id || recommendation.id,
|
|
72988
|
-
issueId: recommendation.issue_id || recommendation.id,
|
|
72989
|
-
issueNumber: recommendation.issue_number,
|
|
72990
|
-
title: recommendation.title?.trim() || "Untitled issue",
|
|
72991
|
-
metric: buildImprovementMetric(recommendation),
|
|
72992
|
-
location: recommendation.location,
|
|
72993
|
-
line: recommendation.line,
|
|
72994
|
-
lineId: recommendation.line_id,
|
|
72995
|
-
workspaceId: recommendation.workspace_id
|
|
72996
|
-
}));
|
|
72997
|
-
setImprovements(nextImprovements);
|
|
72998
|
-
};
|
|
72999
|
-
fetchImprovements().catch((error) => {
|
|
73000
|
-
console.error("[PlantHeadView] Failed to fetch improvements", error);
|
|
73001
|
-
if (!cancelled) {
|
|
73002
|
-
setImprovements([]);
|
|
73003
|
-
}
|
|
73004
|
-
}).finally(() => {
|
|
73005
|
-
if (!cancelled) {
|
|
73006
|
-
setIsImprovementsLoading(false);
|
|
73007
|
-
}
|
|
73008
|
-
});
|
|
73009
|
-
return () => {
|
|
73010
|
-
cancelled = true;
|
|
73011
|
-
};
|
|
73012
|
-
}, [companyId, lineIdsKey, scopedLineIds, supabase]);
|
|
73013
|
-
const availableLineModes = overview.scope?.available_line_modes;
|
|
73014
|
-
React141__namespace.default.useEffect(() => {
|
|
73015
|
-
const hasOutput = !!availableLineModes?.has_output;
|
|
73016
|
-
const hasUptime = !!availableLineModes?.has_uptime;
|
|
73017
|
-
if (hasOutput && !hasUptime && poorestLineMode !== "output") {
|
|
73018
|
-
setPoorestLineMode("output");
|
|
73019
|
-
} else if (hasUptime && !hasOutput && poorestLineMode !== "uptime") {
|
|
73020
|
-
setPoorestLineMode("uptime");
|
|
73021
|
-
}
|
|
73022
|
-
}, [availableLineModes?.has_output, availableLineModes?.has_uptime, poorestLineMode]);
|
|
73023
|
-
const comparisonLabel = React141__namespace.default.useMemo(
|
|
73024
|
-
() => formatComparisonWindow(overview.scope?.current_range?.day_count ?? null),
|
|
73025
|
-
[overview.scope?.current_range?.day_count]
|
|
73026
|
-
);
|
|
74711
|
+
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3 relative", children: [
|
|
74712
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
74713
|
+
mobileMenuContext ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
74714
|
+
HamburgerButton,
|
|
74715
|
+
{
|
|
74716
|
+
onClick: mobileMenuContext.onMobileMenuOpen,
|
|
74717
|
+
className: "flex-shrink-0 -ml-1"
|
|
74718
|
+
}
|
|
74719
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 flex-shrink-0" }),
|
|
74720
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center", children: [
|
|
74721
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg font-semibold text-gray-900 text-center px-1 truncate max-w-[200px]", children: "Operations Overview" }),
|
|
74722
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-slate-500 text-center mt-0.5", children: mobileSubtitle })
|
|
74723
|
+
] }),
|
|
74724
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0 flex items-center gap-1.5", children: [
|
|
74725
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
74726
|
+
MonthlyRangeFilter_default,
|
|
74727
|
+
{
|
|
74728
|
+
month: parseDateKeyToDate(dateRange.startKey).getMonth(),
|
|
74729
|
+
year: parseDateKeyToDate(dateRange.startKey).getFullYear(),
|
|
74730
|
+
timezone: appTimezone,
|
|
74731
|
+
value: dateRange,
|
|
74732
|
+
onChange: onDateRangeChange,
|
|
74733
|
+
showLabel: false
|
|
74734
|
+
}
|
|
74735
|
+
),
|
|
74736
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
74737
|
+
"button",
|
|
74738
|
+
{
|
|
74739
|
+
ref: mobileFilterButtonRef,
|
|
74740
|
+
onClick: handleFilterToggle,
|
|
74741
|
+
className: `p-2 rounded-full transition-colors relative ${isFilterOpen || trendMode !== "all" ? "bg-blue-50" : "active:bg-gray-100"}`,
|
|
74742
|
+
"aria-label": "Open filters",
|
|
74743
|
+
children: [
|
|
74744
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: `w-5 h-5 ${trendMode !== "all" ? "text-blue-600" : "text-gray-700"}` }),
|
|
74745
|
+
trendMode !== "all" ? /* @__PURE__ */ jsxRuntime.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
|
|
74746
|
+
]
|
|
74747
|
+
}
|
|
74748
|
+
)
|
|
74749
|
+
] })
|
|
74750
|
+
] }) }),
|
|
74751
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center relative min-h-[56px]", children: [
|
|
74752
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute left-1/2 -translate-x-1/2 flex flex-col items-center pointer-events-none", children: [
|
|
74753
|
+
/* @__PURE__ */ jsxRuntime.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" }),
|
|
74754
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium text-slate-500 text-center pointer-events-auto", children: desktopSubtitle })
|
|
74755
|
+
] }),
|
|
74756
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-0 flex items-center gap-3", children: [
|
|
74757
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
74758
|
+
MonthlyRangeFilter_default,
|
|
74759
|
+
{
|
|
74760
|
+
month: parseDateKeyToDate(dateRange.startKey).getMonth(),
|
|
74761
|
+
year: parseDateKeyToDate(dateRange.startKey).getFullYear(),
|
|
74762
|
+
timezone: appTimezone,
|
|
74763
|
+
value: dateRange,
|
|
74764
|
+
onChange: onDateRangeChange,
|
|
74765
|
+
showLabel: false
|
|
74766
|
+
}
|
|
74767
|
+
) }),
|
|
74768
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
74769
|
+
"button",
|
|
74770
|
+
{
|
|
74771
|
+
ref: filterButtonRef,
|
|
74772
|
+
onClick: handleFilterToggle,
|
|
74773
|
+
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"}`,
|
|
74774
|
+
"aria-label": "Open filters",
|
|
74775
|
+
children: [
|
|
74776
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: `w-[18px] h-[18px] ${trendMode !== "all" ? "text-blue-600" : "text-slate-500"}` }),
|
|
74777
|
+
"Filters",
|
|
74778
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: `w-4 h-4 ml-0.5 transition-transform duration-200 ${isFilterOpen ? "rotate-180" : ""}` })
|
|
74779
|
+
]
|
|
74780
|
+
}
|
|
74781
|
+
)
|
|
74782
|
+
] })
|
|
74783
|
+
] }) }),
|
|
74784
|
+
isFilterOpen ? /* @__PURE__ */ jsxRuntime.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: [
|
|
74785
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
74786
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-gray-900", children: "Filter View" }),
|
|
74787
|
+
trendMode !== "all" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
74788
|
+
"button",
|
|
74789
|
+
{
|
|
74790
|
+
onClick: () => {
|
|
74791
|
+
onTrendModeChange("all");
|
|
74792
|
+
setIsFilterOpen(false);
|
|
74793
|
+
},
|
|
74794
|
+
className: "text-xs text-red-600 hover:text-red-700 font-medium",
|
|
74795
|
+
children: "Clear all"
|
|
74796
|
+
}
|
|
74797
|
+
) : null
|
|
74798
|
+
] }),
|
|
74799
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
74800
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide ml-1", children: "Shift" }),
|
|
74801
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
74802
|
+
"select",
|
|
74803
|
+
{
|
|
74804
|
+
value: trendMode,
|
|
74805
|
+
onChange: handleTrendModeChange,
|
|
74806
|
+
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",
|
|
74807
|
+
style: {
|
|
74808
|
+
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")`,
|
|
74809
|
+
backgroundPosition: "right 0.75rem center",
|
|
74810
|
+
backgroundRepeat: "no-repeat",
|
|
74811
|
+
backgroundSize: "1.2em 1.2em"
|
|
74812
|
+
},
|
|
74813
|
+
children: [
|
|
74814
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: "All Shifts" }),
|
|
74815
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "day", children: "Day Shift" }),
|
|
74816
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "night", children: "Night Shift" })
|
|
74817
|
+
]
|
|
74818
|
+
}
|
|
74819
|
+
) })
|
|
74820
|
+
] }) })
|
|
74821
|
+
] }) : null
|
|
74822
|
+
] }) });
|
|
74823
|
+
});
|
|
74824
|
+
OperationsOverviewHeader.displayName = "OperationsOverviewHeader";
|
|
74825
|
+
var OverviewSummaryCards = React141__namespace.default.memo(({ store }) => {
|
|
74826
|
+
bumpRenderCounter();
|
|
74827
|
+
const scope = useOperationsOverviewScope(store);
|
|
74828
|
+
const snapshot = useOperationsOverviewSnapshot(store);
|
|
74829
|
+
const showSnapshotSkeleton = snapshot.loading && !snapshot.hasLoadedOnce;
|
|
74830
|
+
const comparisonLabel = React141__namespace.default.useMemo(() => {
|
|
74831
|
+
return formatComparisonWindow(
|
|
74832
|
+
scope.previous_range?.day_count ?? null,
|
|
74833
|
+
scope.comparison_strategy
|
|
74834
|
+
);
|
|
74835
|
+
}, [scope.comparison_strategy, scope.previous_range?.day_count]);
|
|
74836
|
+
const [isIdleContributorsOpen, setIsIdleContributorsOpen] = React141__namespace.default.useState(false);
|
|
74837
|
+
const [isIdleContributorsPinned, setIsIdleContributorsPinned] = React141__namespace.default.useState(false);
|
|
74838
|
+
const idleContributorsRef = React141__namespace.default.useRef(null);
|
|
73027
74839
|
const plantEfficiencyBadge = React141__namespace.default.useMemo(() => {
|
|
73028
|
-
return buildDeltaBadge(
|
|
74840
|
+
return buildDeltaBadge(snapshot.data.summary.plant_efficiency?.delta_pp, {
|
|
73029
74841
|
positiveIsGood: true,
|
|
73030
74842
|
formatter: (value) => `${value >= 0 ? "+" : ""}${roundOne(value)}%`,
|
|
73031
74843
|
comparisonLabel
|
|
73032
74844
|
});
|
|
73033
|
-
}, [comparisonLabel,
|
|
74845
|
+
}, [comparisonLabel, snapshot.data.summary.plant_efficiency?.delta_pp]);
|
|
73034
74846
|
const idleBadge = React141__namespace.default.useMemo(() => {
|
|
73035
|
-
return buildDeltaBadge(
|
|
74847
|
+
return buildDeltaBadge(snapshot.data.summary.avg_idle_per_workstation?.delta_seconds, {
|
|
73036
74848
|
positiveIsGood: false,
|
|
73037
74849
|
formatter: (value) => formatSignedIdleDuration(value),
|
|
73038
74850
|
comparisonLabel
|
|
73039
74851
|
});
|
|
73040
|
-
}, [comparisonLabel,
|
|
74852
|
+
}, [comparisonLabel, snapshot.data.summary.avg_idle_per_workstation?.delta_seconds]);
|
|
73041
74853
|
const canInspectIdleContributors = React141__namespace.default.useMemo(() => {
|
|
73042
|
-
return !
|
|
73043
|
-
}, [
|
|
74854
|
+
return !showSnapshotSkeleton && snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== null && snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== void 0;
|
|
74855
|
+
}, [showSnapshotSkeleton, snapshot.data.summary.avg_idle_per_workstation?.current_seconds]);
|
|
73044
74856
|
const idleTopContributors = React141__namespace.default.useMemo(() => {
|
|
73045
|
-
return (
|
|
74857
|
+
return (snapshot.data.summary.avg_idle_per_workstation?.top_contributors || []).map((item) => ({
|
|
73046
74858
|
workspaceId: item.workspace_id || "",
|
|
73047
74859
|
workspaceName: item.workspace_name?.trim() || item.workspace_id || "Unknown",
|
|
73048
|
-
lineId: item.line_id || "",
|
|
73049
74860
|
lineName: item.line_name?.trim() || "Unknown Line",
|
|
73050
74861
|
avgIdleSeconds: toNumber3(item.avg_idle_seconds)
|
|
73051
74862
|
})).slice(0, 5);
|
|
73052
|
-
}, [
|
|
74863
|
+
}, [snapshot.data.summary.avg_idle_per_workstation?.top_contributors]);
|
|
73053
74864
|
const showIdleContributorLineNames = React141__namespace.default.useMemo(() => {
|
|
73054
|
-
return (
|
|
73055
|
-
}, [
|
|
74865
|
+
return (scope.line_count ?? 0) > 1;
|
|
74866
|
+
}, [scope.line_count]);
|
|
73056
74867
|
const closeIdleContributors = React141__namespace.default.useCallback(() => {
|
|
73057
74868
|
setIsIdleContributorsOpen(false);
|
|
73058
74869
|
setIsIdleContributorsPinned(false);
|
|
73059
74870
|
}, []);
|
|
73060
74871
|
const handleIdleContributorsToggle = React141__namespace.default.useCallback(() => {
|
|
73061
74872
|
if (!canInspectIdleContributors) return;
|
|
73062
|
-
setIsIdleContributorsPinned((
|
|
73063
|
-
const next = !
|
|
74873
|
+
setIsIdleContributorsPinned((previous) => {
|
|
74874
|
+
const next = !previous;
|
|
73064
74875
|
setIsIdleContributorsOpen(next);
|
|
73065
74876
|
return next;
|
|
73066
74877
|
});
|
|
@@ -73077,6 +74888,10 @@ var PlantHeadView = () => {
|
|
|
73077
74888
|
closeIdleContributors();
|
|
73078
74889
|
}
|
|
73079
74890
|
}, [canInspectIdleContributors, closeIdleContributors, handleIdleContributorsToggle]);
|
|
74891
|
+
React141__namespace.default.useEffect(() => {
|
|
74892
|
+
setIsIdleContributorsOpen(false);
|
|
74893
|
+
setIsIdleContributorsPinned(false);
|
|
74894
|
+
}, [scope.comparison_strategy, scope.current_range?.start_date, scope.current_range?.end_date, scope.line_count, scope.shift_mode]);
|
|
73080
74895
|
React141__namespace.default.useEffect(() => {
|
|
73081
74896
|
if (!isIdleContributorsOpen) return void 0;
|
|
73082
74897
|
const handleClickOutside = (event) => {
|
|
@@ -73099,14 +74914,298 @@ var PlantHeadView = () => {
|
|
|
73099
74914
|
document.removeEventListener("keydown", handleEscape);
|
|
73100
74915
|
};
|
|
73101
74916
|
}, [closeIdleContributors, isIdleContributorsOpen, isIdleContributorsPinned]);
|
|
74917
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [
|
|
74918
|
+
/* @__PURE__ */ jsxRuntime.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: [
|
|
74919
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-between items-center mb-1", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Overall Efficiency" }) }),
|
|
74920
|
+
showSnapshotSkeleton ? /* @__PURE__ */ jsxRuntime.jsx(OverviewMetricCardSkeleton, {}) : snapshot.data.summary.plant_efficiency?.current !== null && snapshot.data.summary.plant_efficiency?.current !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
74921
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-2xl sm:text-3xl font-bold text-slate-800 tracking-tight", children: [
|
|
74922
|
+
roundOne(snapshot.data.summary.plant_efficiency.current),
|
|
74923
|
+
"%"
|
|
74924
|
+
] }),
|
|
74925
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${plantEfficiencyBadge.className}`, children: [
|
|
74926
|
+
plantEfficiencyBadge.icon === "up" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : plantEfficiencyBadge.icon === "down" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
74927
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium", children: plantEfficiencyBadge.text })
|
|
74928
|
+
] })
|
|
74929
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No efficiency data available" })
|
|
74930
|
+
] }),
|
|
74931
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
74932
|
+
"div",
|
|
74933
|
+
{
|
|
74934
|
+
ref: idleContributorsRef,
|
|
74935
|
+
"data-testid": "idle-kpi-card-region",
|
|
74936
|
+
className: "relative",
|
|
74937
|
+
onMouseEnter: () => {
|
|
74938
|
+
if (canInspectIdleContributors) {
|
|
74939
|
+
setIsIdleContributorsOpen(true);
|
|
74940
|
+
}
|
|
74941
|
+
},
|
|
74942
|
+
onMouseLeave: () => {
|
|
74943
|
+
if (!isIdleContributorsPinned) {
|
|
74944
|
+
setIsIdleContributorsOpen(false);
|
|
74945
|
+
}
|
|
74946
|
+
},
|
|
74947
|
+
onFocus: () => {
|
|
74948
|
+
if (canInspectIdleContributors) {
|
|
74949
|
+
setIsIdleContributorsOpen(true);
|
|
74950
|
+
}
|
|
74951
|
+
},
|
|
74952
|
+
onBlur: (event) => {
|
|
74953
|
+
if (isIdleContributorsPinned) return;
|
|
74954
|
+
const nextTarget = event.relatedTarget;
|
|
74955
|
+
if (nextTarget && idleContributorsRef.current?.contains(nextTarget)) return;
|
|
74956
|
+
setIsIdleContributorsOpen(false);
|
|
74957
|
+
},
|
|
74958
|
+
children: [
|
|
74959
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
74960
|
+
"div",
|
|
74961
|
+
{
|
|
74962
|
+
"data-testid": "idle-kpi-card",
|
|
74963
|
+
role: canInspectIdleContributors ? "button" : void 0,
|
|
74964
|
+
tabIndex: canInspectIdleContributors ? 0 : -1,
|
|
74965
|
+
"aria-controls": canInspectIdleContributors ? "idle-kpi-popover" : void 0,
|
|
74966
|
+
"aria-expanded": canInspectIdleContributors ? isIdleContributorsOpen : void 0,
|
|
74967
|
+
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"}`,
|
|
74968
|
+
onClick: handleIdleContributorsToggle,
|
|
74969
|
+
onKeyDown: handleIdleContributorsKeyDown,
|
|
74970
|
+
children: [
|
|
74971
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Idle Time per Workstation" }) }),
|
|
74972
|
+
showSnapshotSkeleton ? /* @__PURE__ */ jsxRuntime.jsx(OverviewMetricCardSkeleton, {}) : snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== null && snapshot.data.summary.avg_idle_per_workstation?.current_seconds !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
74973
|
+
/* @__PURE__ */ jsxRuntime.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) }),
|
|
74974
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${idleBadge.className}`, children: [
|
|
74975
|
+
idleBadge.icon === "up" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : idleBadge.icon === "down" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
74976
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium", children: idleBadge.text })
|
|
74977
|
+
] })
|
|
74978
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No idle time data available" })
|
|
74979
|
+
]
|
|
74980
|
+
}
|
|
74981
|
+
),
|
|
74982
|
+
canInspectIdleContributors && isIdleContributorsOpen ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
74983
|
+
"div",
|
|
74984
|
+
{
|
|
74985
|
+
id: "idle-kpi-popover",
|
|
74986
|
+
"data-testid": "idle-kpi-popover",
|
|
74987
|
+
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]",
|
|
74988
|
+
children: [
|
|
74989
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pb-3 mb-3 border-b border-slate-100", children: [
|
|
74990
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5 rounded-full flex-shrink-0 bg-red-500" }),
|
|
74991
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-slate-800 text-[15px]", children: "Idle Time per Workstation" })
|
|
74992
|
+
] }),
|
|
74993
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
74994
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3", children: "TOP CONTRIBUTORS" }),
|
|
74995
|
+
idleTopContributors.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2.5", children: idleTopContributors.map((contributor, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
74996
|
+
"div",
|
|
74997
|
+
{
|
|
74998
|
+
className: "flex items-start justify-between gap-3",
|
|
74999
|
+
children: [
|
|
75000
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
75001
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-slate-600 text-[13px] truncate", title: contributor.workspaceName, children: contributor.workspaceName }),
|
|
75002
|
+
showIdleContributorLineNames && contributor.lineName ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium text-slate-400 truncate", title: contributor.lineName, children: contributor.lineName }) : null
|
|
75003
|
+
] }),
|
|
75004
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-slate-500 text-[13px] text-right whitespace-nowrap", children: formatIdleDuration(contributor.avgIdleSeconds) })
|
|
75005
|
+
]
|
|
75006
|
+
},
|
|
75007
|
+
`${contributor.workspaceId || contributor.workspaceName}-${index}`
|
|
75008
|
+
)) }) : /* @__PURE__ */ jsxRuntime.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." })
|
|
75009
|
+
] })
|
|
75010
|
+
]
|
|
75011
|
+
}
|
|
75012
|
+
) : null
|
|
75013
|
+
]
|
|
75014
|
+
}
|
|
75015
|
+
)
|
|
75016
|
+
] });
|
|
75017
|
+
});
|
|
75018
|
+
OverviewSummaryCards.displayName = "OverviewSummaryCards";
|
|
75019
|
+
var PoorestPerformersCard = React141__namespace.default.memo(({
|
|
75020
|
+
store,
|
|
75021
|
+
supervisorsByLineId,
|
|
75022
|
+
onViewAll,
|
|
75023
|
+
onLineClick
|
|
75024
|
+
}) => {
|
|
75025
|
+
bumpRenderCounter();
|
|
75026
|
+
const scope = useOperationsOverviewScope(store);
|
|
75027
|
+
const snapshot = useOperationsOverviewSnapshot(store);
|
|
75028
|
+
const [poorestLineMode, setPoorestLineMode] = React141__namespace.default.useState("output");
|
|
75029
|
+
const availableLineModes = scope.available_line_modes;
|
|
75030
|
+
React141__namespace.default.useEffect(() => {
|
|
75031
|
+
const hasOutput = !!availableLineModes?.has_output;
|
|
75032
|
+
const hasUptime = !!availableLineModes?.has_uptime;
|
|
75033
|
+
if (hasOutput && !hasUptime && poorestLineMode !== "output") {
|
|
75034
|
+
setPoorestLineMode("output");
|
|
75035
|
+
} else if (hasUptime && !hasOutput && poorestLineMode !== "uptime") {
|
|
75036
|
+
setPoorestLineMode("uptime");
|
|
75037
|
+
}
|
|
75038
|
+
}, [availableLineModes?.has_output, availableLineModes?.has_uptime, poorestLineMode]);
|
|
75039
|
+
const comparisonLabel = React141__namespace.default.useMemo(() => {
|
|
75040
|
+
return formatComparisonWindow(
|
|
75041
|
+
scope.previous_range?.day_count ?? null,
|
|
75042
|
+
scope.comparison_strategy
|
|
75043
|
+
);
|
|
75044
|
+
}, [scope.comparison_strategy, scope.previous_range?.day_count]);
|
|
75045
|
+
const showSnapshotSkeleton = snapshot.loading && !snapshot.hasLoadedOnce;
|
|
75046
|
+
const mergedPoorestLines = React141__namespace.default.useMemo(() => {
|
|
75047
|
+
const rows = snapshot.data.poorest_lines?.[poorestLineMode] || [];
|
|
75048
|
+
return rows.slice(0, 3).map((line) => {
|
|
75049
|
+
const lineId = line.line_id || "";
|
|
75050
|
+
const supervisors = supervisorsByLineId.get(lineId) || [];
|
|
75051
|
+
const supervisor = supervisors[0];
|
|
75052
|
+
return {
|
|
75053
|
+
id: lineId,
|
|
75054
|
+
name: line.line_name?.trim() || "Unknown Line",
|
|
75055
|
+
efficiency: roundOne(toNumber3(line.avg_efficiency) || 0),
|
|
75056
|
+
previousEfficiency: toNumber3(line.previous_avg_efficiency),
|
|
75057
|
+
delta: toNumber3(line.delta_pp),
|
|
75058
|
+
supervisor: supervisor?.displayName || "Unassigned",
|
|
75059
|
+
supervisorImage: supervisor?.profilePhotoUrl ?? null
|
|
75060
|
+
};
|
|
75061
|
+
});
|
|
75062
|
+
}, [poorestLineMode, snapshot.data.poorest_lines, supervisorsByLineId]);
|
|
75063
|
+
const showPoorestModeToggle = !!availableLineModes?.has_output && !!availableLineModes?.has_uptime;
|
|
75064
|
+
const poorestMetricLabel = poorestLineMode === "uptime" ? "Uptime" : "Efficiency";
|
|
75065
|
+
const handlePoorestLineModeChange = React141__namespace.default.useCallback((mode) => {
|
|
75066
|
+
trackCoreEvent("Operations Overview Poorest Line Mode Changed", { mode });
|
|
75067
|
+
setPoorestLineMode(mode);
|
|
75068
|
+
}, []);
|
|
75069
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 flex flex-col overflow-hidden", children: [
|
|
75070
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-5 py-4 border-b border-slate-50 flex justify-between items-center gap-3 flex-wrap", children: [
|
|
75071
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
75072
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Poorest Performers" }),
|
|
75073
|
+
showPoorestModeToggle ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex bg-slate-100 p-0.5 rounded-lg", children: [
|
|
75074
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75075
|
+
"button",
|
|
75076
|
+
{
|
|
75077
|
+
type: "button",
|
|
75078
|
+
onClick: () => handlePoorestLineModeChange("output"),
|
|
75079
|
+
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"}`,
|
|
75080
|
+
children: "Output"
|
|
75081
|
+
}
|
|
75082
|
+
),
|
|
75083
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75084
|
+
"button",
|
|
75085
|
+
{
|
|
75086
|
+
type: "button",
|
|
75087
|
+
onClick: () => handlePoorestLineModeChange("uptime"),
|
|
75088
|
+
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"}`,
|
|
75089
|
+
children: "Uptime"
|
|
75090
|
+
}
|
|
75091
|
+
)
|
|
75092
|
+
] }) : null
|
|
75093
|
+
] }),
|
|
75094
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75095
|
+
"button",
|
|
75096
|
+
{
|
|
75097
|
+
type: "button",
|
|
75098
|
+
"aria-label": "View all",
|
|
75099
|
+
onClick: onViewAll,
|
|
75100
|
+
className: "inline-flex items-center justify-center rounded-md p-1 text-slate-500 hover:text-slate-800 transition-colors",
|
|
75101
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-4 w-4 shrink-0", strokeWidth: 2.5, "aria-hidden": true })
|
|
75102
|
+
}
|
|
75103
|
+
)
|
|
75104
|
+
] }),
|
|
75105
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex flex-col p-0 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y divide-slate-50 flex-1 px-5", children: [
|
|
75106
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
75107
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-slate-400 text-[10px] uppercase tracking-wider min-w-[120px]", children: "Line" }),
|
|
75108
|
+
/* @__PURE__ */ jsxRuntime.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 })
|
|
75109
|
+
] }),
|
|
75110
|
+
showSnapshotSkeleton ? /* @__PURE__ */ jsxRuntime.jsx(OverviewListSkeleton, {}) : mergedPoorestLines.length > 0 ? mergedPoorestLines.map((line) => {
|
|
75111
|
+
const lineDelta = buildLineDeltaTone(line.delta, comparisonLabel);
|
|
75112
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
75113
|
+
"div",
|
|
75114
|
+
{
|
|
75115
|
+
onClick: () => onLineClick(line.id, line.name),
|
|
75116
|
+
className: "block py-3 hover:bg-slate-50/50 transition-colors cursor-pointer group relative",
|
|
75117
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
75118
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
75119
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
75120
|
+
"img",
|
|
75121
|
+
{
|
|
75122
|
+
src: line.supervisorImage,
|
|
75123
|
+
alt: line.supervisor,
|
|
75124
|
+
className: "w-full h-full object-cover"
|
|
75125
|
+
}
|
|
75126
|
+
) : /* @__PURE__ */ jsxRuntime.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) }) }),
|
|
75127
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
75128
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }) }),
|
|
75129
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-slate-400 font-medium", children: line.supervisor }) })
|
|
75130
|
+
] })
|
|
75131
|
+
] }),
|
|
75132
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between shrink-0 w-[110px]", children: [
|
|
75133
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[15px] leading-none font-bold text-slate-800", children: [
|
|
75134
|
+
line.efficiency,
|
|
75135
|
+
"%"
|
|
75136
|
+
] }),
|
|
75137
|
+
line.delta !== null && line.delta !== void 0 && Number.isFinite(line.delta) ? /* @__PURE__ */ jsxRuntime.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: [
|
|
75138
|
+
line.delta >= 0 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3 h-3", strokeWidth: 2.5 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3 h-3", strokeWidth: 2.5 }),
|
|
75139
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] leading-none font-bold", children: lineDelta.text.split(" vs ")[0].replace("+", "") })
|
|
75140
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-slate-50 text-slate-400", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] leading-none font-bold", children: "\u2014" }) })
|
|
75141
|
+
] })
|
|
75142
|
+
] })
|
|
75143
|
+
},
|
|
75144
|
+
line.id
|
|
75145
|
+
);
|
|
75146
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: `No ${poorestLineMode} line data available` })
|
|
75147
|
+
] }) })
|
|
75148
|
+
] });
|
|
75149
|
+
});
|
|
75150
|
+
PoorestPerformersCard.displayName = "PoorestPerformersCard";
|
|
75151
|
+
var IdleBreakdownCard = React141__namespace.default.memo(({
|
|
75152
|
+
store,
|
|
75153
|
+
scopedLineCount
|
|
75154
|
+
}) => {
|
|
75155
|
+
bumpRenderCounter();
|
|
75156
|
+
const idle = useOperationsOverviewIdle(store);
|
|
75157
|
+
const showInitialSkeleton = idle.loading && idle.lastUpdated === null;
|
|
75158
|
+
const idleBreakdown = React141__namespace.default.useMemo(() => {
|
|
75159
|
+
return idle.data.map((item) => ({
|
|
75160
|
+
name: item.reason?.trim() || "Unknown",
|
|
75161
|
+
value: toNumber3(item.percentage) || 0,
|
|
75162
|
+
totalDurationSeconds: toNumber3(item.total_duration_seconds),
|
|
75163
|
+
efficiencyLossPercentage: toNumber3(item.efficiency_loss_percentage),
|
|
75164
|
+
contributors: (item.contributors || []).map((contributor) => ({
|
|
75165
|
+
workspaceId: contributor.workspace_id || "",
|
|
75166
|
+
workspaceName: contributor.workspace_name?.trim() || "Unknown",
|
|
75167
|
+
totalDurationSeconds: toNumber3(contributor.total_duration_seconds),
|
|
75168
|
+
percentageWithinReason: toNumber3(contributor.percentage_within_reason)
|
|
75169
|
+
}))
|
|
75170
|
+
})).filter((item) => item.value > 0);
|
|
75171
|
+
}, [idle.data]);
|
|
75172
|
+
const showIdleModuleNotEnabledState = React141__namespace.default.useMemo(() => {
|
|
75173
|
+
const enabledLineCount = idle.scope.idle_time_vlm_enabled_line_count;
|
|
75174
|
+
return !showInitialSkeleton && scopedLineCount > 0 && typeof enabledLineCount === "number" && enabledLineCount === 0;
|
|
75175
|
+
}, [idle.scope.idle_time_vlm_enabled_line_count, scopedLineCount, showInitialSkeleton]);
|
|
75176
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 flex flex-col overflow-hidden text-left", children: [
|
|
75177
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-4 flex-none flex justify-between items-center border-b border-slate-50/50 relative", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Idle Time Breakdown" }) }),
|
|
75178
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 p-4 pt-2 relative", children: showInitialSkeleton ? /* @__PURE__ */ jsxRuntime.jsx(OverviewIdleBreakdownSkeleton, {}) : showIdleModuleNotEnabledState ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { children: [
|
|
75179
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-slate-700", children: "Module not enabled" }),
|
|
75180
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500", children: "Enable idle-time classification on at least one line to view this breakdown." })
|
|
75181
|
+
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
75182
|
+
IdleTimeReasonChart,
|
|
75183
|
+
{
|
|
75184
|
+
data: idleBreakdown,
|
|
75185
|
+
isLoading: false,
|
|
75186
|
+
hideTotalDuration: true,
|
|
75187
|
+
updateAnimation: "smooth"
|
|
75188
|
+
}
|
|
75189
|
+
) })
|
|
75190
|
+
] });
|
|
75191
|
+
});
|
|
75192
|
+
IdleBreakdownCard.displayName = "IdleBreakdownCard";
|
|
75193
|
+
var EfficiencyTrendCard = React141__namespace.default.memo(({
|
|
75194
|
+
store,
|
|
75195
|
+
dateRange,
|
|
75196
|
+
appTimezone
|
|
75197
|
+
}) => {
|
|
75198
|
+
bumpRenderCounter();
|
|
75199
|
+
const trend = useOperationsOverviewTrend(store);
|
|
73102
75200
|
const currentWeekRange = React141__namespace.default.useMemo(
|
|
73103
75201
|
() => getCurrentWeekToDateRange(appTimezone),
|
|
73104
75202
|
[appTimezone]
|
|
73105
75203
|
);
|
|
73106
75204
|
const isCurrentWeekToDateRange = dateRange.startKey === currentWeekRange.startKey && dateRange.endKey === currentWeekRange.endKey;
|
|
75205
|
+
const showInitialSkeleton = trend.loading && trend.lastUpdated === null;
|
|
73107
75206
|
const trendData = React141__namespace.default.useMemo(() => {
|
|
73108
75207
|
const pointsByDate = new Map(
|
|
73109
|
-
(
|
|
75208
|
+
(trend.data.points || []).flatMap((point) => {
|
|
73110
75209
|
if (!point.date) return [];
|
|
73111
75210
|
const pointDate = parseDateKeyToDate(point.date);
|
|
73112
75211
|
return [[point.date, {
|
|
@@ -73131,7 +75230,7 @@ var PlantHeadView = () => {
|
|
|
73131
75230
|
};
|
|
73132
75231
|
});
|
|
73133
75232
|
}
|
|
73134
|
-
return (
|
|
75233
|
+
return (trend.data.points || []).map((point) => {
|
|
73135
75234
|
const pointDate = point.date ? parseDateKeyToDate(point.date) : null;
|
|
73136
75235
|
return {
|
|
73137
75236
|
name: pointDate ? dateFns.format(pointDate, "MMM d") : "",
|
|
@@ -73142,55 +75241,42 @@ var PlantHeadView = () => {
|
|
|
73142
75241
|
})()
|
|
73143
75242
|
};
|
|
73144
75243
|
});
|
|
73145
|
-
}, [currentWeekRange.startKey, isCurrentWeekToDateRange,
|
|
73146
|
-
const trendPlayKey = React141__namespace.default.useMemo(() => {
|
|
73147
|
-
return `${trendViewOpenNonce}:${trendFetchNonce}`;
|
|
73148
|
-
}, [trendFetchNonce, trendViewOpenNonce]);
|
|
73149
|
-
const idleBreakdown = React141__namespace.default.useMemo(() => {
|
|
73150
|
-
return idleReasonBreakdown.map((item) => ({
|
|
73151
|
-
name: item.reason?.trim() || "Unknown",
|
|
73152
|
-
value: toNumber3(item.percentage) || 0,
|
|
73153
|
-
totalDurationSeconds: toNumber3(item.total_duration_seconds),
|
|
73154
|
-
efficiencyLossPercentage: toNumber3(item.efficiency_loss_percentage),
|
|
73155
|
-
contributors: (item.contributors || []).map((contributor) => ({
|
|
73156
|
-
workspaceId: contributor.workspace_id || "",
|
|
73157
|
-
workspaceName: contributor.workspace_name?.trim() || "Unknown",
|
|
73158
|
-
totalDurationSeconds: toNumber3(contributor.total_duration_seconds),
|
|
73159
|
-
percentageWithinReason: toNumber3(contributor.percentage_within_reason)
|
|
73160
|
-
}))
|
|
73161
|
-
})).filter((item) => item.value > 0);
|
|
73162
|
-
}, [idleReasonBreakdown]);
|
|
73163
|
-
const showIdleModuleNotEnabledState = React141__namespace.default.useMemo(() => {
|
|
73164
|
-
const enabledLineCount = idleReasonScope?.idle_time_vlm_enabled_line_count;
|
|
73165
|
-
return !isIdleReasonBreakdownLoading && scopedLineIds.length > 0 && typeof enabledLineCount === "number" && enabledLineCount === 0;
|
|
73166
|
-
}, [idleReasonScope?.idle_time_vlm_enabled_line_count, isIdleReasonBreakdownLoading, scopedLineIds.length]);
|
|
73167
|
-
const mergedPoorestLines = React141__namespace.default.useMemo(() => {
|
|
73168
|
-
const rows = overview.poorest_lines?.[poorestLineMode] || [];
|
|
73169
|
-
return rows.slice(0, 3).map((line) => {
|
|
73170
|
-
const lineId = line.line_id || "";
|
|
73171
|
-
const supervisors = supervisorsByLineId.get(lineId) || [];
|
|
73172
|
-
const supervisor = supervisors[0];
|
|
73173
|
-
return {
|
|
73174
|
-
id: lineId,
|
|
73175
|
-
name: line.line_name?.trim() || "Unknown Line",
|
|
73176
|
-
efficiency: roundOne(toNumber3(line.avg_efficiency) || 0),
|
|
73177
|
-
previousEfficiency: toNumber3(line.previous_avg_efficiency),
|
|
73178
|
-
delta: toNumber3(line.delta_pp),
|
|
73179
|
-
supervisor: supervisor?.displayName || "Unassigned",
|
|
73180
|
-
supervisorImage: supervisor?.profilePhotoUrl ?? null
|
|
73181
|
-
};
|
|
73182
|
-
});
|
|
73183
|
-
}, [overview.poorest_lines, poorestLineMode, supervisorsByLineId]);
|
|
73184
|
-
const showPoorestModeToggle = !!availableLineModes?.has_output && !!availableLineModes?.has_uptime;
|
|
73185
|
-
availableLineModes?.has_uptime && !availableLineModes?.has_output ? "Uptime" : "Output";
|
|
73186
|
-
const poorestMetricLabel = poorestLineMode === "uptime" ? "Uptime" : "Efficiency";
|
|
75244
|
+
}, [currentWeekRange.startKey, isCurrentWeekToDateRange, trend.data.points]);
|
|
73187
75245
|
const trendTooltipLabelFormatter = React141__namespace.default.useCallback((label, payload) => {
|
|
73188
75246
|
const dayOfWeek = payload?.[0]?.payload?.dayOfWeek;
|
|
73189
75247
|
if (!dayOfWeek || typeof label !== "string") return label;
|
|
73190
75248
|
return `${label} (${dayOfWeek})`;
|
|
73191
75249
|
}, []);
|
|
75250
|
+
return /* @__PURE__ */ jsxRuntime.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: [
|
|
75251
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-5 flex-none flex justify-between items-center border-b border-slate-50/50", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Efficiency Trend" }) }),
|
|
75252
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 w-full p-4 pt-4 relative", children: showInitialSkeleton ? /* @__PURE__ */ jsxRuntime.jsx(OverviewChartSkeleton, {}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pb-2 pr-4 pl-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
75253
|
+
LineChart,
|
|
75254
|
+
{
|
|
75255
|
+
data: trendData,
|
|
75256
|
+
lines: efficiencyLineConfig,
|
|
75257
|
+
xAxisDataKey: "name",
|
|
75258
|
+
yAxisUnit: "%",
|
|
75259
|
+
yAxisDomain: [0, 100],
|
|
75260
|
+
showLegend: false,
|
|
75261
|
+
showGrid: true,
|
|
75262
|
+
fillContainer: true,
|
|
75263
|
+
tooltipLabelFormatter: trendTooltipLabelFormatter
|
|
75264
|
+
}
|
|
75265
|
+
) }) })
|
|
75266
|
+
] });
|
|
75267
|
+
});
|
|
75268
|
+
EfficiencyTrendCard.displayName = "EfficiencyTrendCard";
|
|
75269
|
+
var TopImprovementsCard = React141__namespace.default.memo(({
|
|
75270
|
+
store,
|
|
75271
|
+
supervisorsByLineId,
|
|
75272
|
+
onViewAll,
|
|
75273
|
+
onItemClick
|
|
75274
|
+
}) => {
|
|
75275
|
+
bumpRenderCounter();
|
|
75276
|
+
const improvements = useOperationsOverviewImprovements(store);
|
|
75277
|
+
const showInitialSkeleton = improvements.loading && improvements.lastUpdated === null;
|
|
73192
75278
|
const displayImprovements = React141__namespace.default.useMemo(() => {
|
|
73193
|
-
return improvements.map((item) => {
|
|
75279
|
+
return improvements.data.map((item) => {
|
|
73194
75280
|
const supervisors = item.lineId ? supervisorsByLineId.get(item.lineId) || [] : [];
|
|
73195
75281
|
return {
|
|
73196
75282
|
...item,
|
|
@@ -73203,436 +75289,592 @@ var PlantHeadView = () => {
|
|
|
73203
75289
|
})
|
|
73204
75290
|
};
|
|
73205
75291
|
});
|
|
73206
|
-
}, [improvements, supervisorsByLineId]);
|
|
73207
|
-
|
|
73208
|
-
|
|
73209
|
-
|
|
75292
|
+
}, [improvements.data, supervisorsByLineId]);
|
|
75293
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-slate-100 flex flex-col overflow-hidden", children: [
|
|
75294
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-5 py-4 flex-none flex justify-between items-center border-b border-slate-50/50", children: [
|
|
75295
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Top improvements" }),
|
|
75296
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75297
|
+
"button",
|
|
75298
|
+
{
|
|
75299
|
+
type: "button",
|
|
75300
|
+
"aria-label": "View all",
|
|
75301
|
+
onClick: onViewAll,
|
|
75302
|
+
className: "inline-flex items-center justify-center rounded-md p-1 text-slate-500 hover:text-slate-800 transition-colors",
|
|
75303
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-4 w-4 shrink-0", strokeWidth: 2.5, "aria-hidden": true })
|
|
75304
|
+
}
|
|
75305
|
+
)
|
|
75306
|
+
] }),
|
|
75307
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-0 flex flex-col px-5 py-2 justify-start overflow-auto", children: showInitialSkeleton ? /* @__PURE__ */ jsxRuntime.jsx(OverviewImprovementsSkeleton, {}) : displayImprovements.length > 0 ? displayImprovements.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
75308
|
+
"div",
|
|
75309
|
+
{
|
|
75310
|
+
"data-testid": `plant-head-improvement-${item.issueId}`,
|
|
75311
|
+
onClick: () => onItemClick(item),
|
|
75312
|
+
className: "flex items-center justify-between py-3 border-b border-slate-50 last:border-0 group cursor-pointer",
|
|
75313
|
+
children: [
|
|
75314
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0 pr-4", children: [
|
|
75315
|
+
item.ticketLabel ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.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,
|
|
75316
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
75317
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 min-w-0 mb-0.5", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-[13px] font-semibold text-slate-800 truncate transition-colors group-hover:text-indigo-600", children: item.title }) }),
|
|
75318
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75319
|
+
"p",
|
|
75320
|
+
{
|
|
75321
|
+
className: "text-[10px] font-medium text-slate-400 truncate",
|
|
75322
|
+
title: item.metadataLabel,
|
|
75323
|
+
children: item.metadataLabel
|
|
75324
|
+
}
|
|
75325
|
+
)
|
|
75326
|
+
] })
|
|
75327
|
+
] }),
|
|
75328
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end flex-shrink-0 ml-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
75329
|
+
"span",
|
|
75330
|
+
{
|
|
75331
|
+
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"}`,
|
|
75332
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: item.metric })
|
|
75333
|
+
}
|
|
75334
|
+
) })
|
|
75335
|
+
]
|
|
75336
|
+
},
|
|
75337
|
+
item.id
|
|
75338
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: "No open improvement issues" }) })
|
|
75339
|
+
] });
|
|
75340
|
+
});
|
|
75341
|
+
TopImprovementsCard.displayName = "TopImprovementsCard";
|
|
75342
|
+
var DEBUG_DASHBOARD_LOGS4 = process.env.NEXT_PUBLIC_DEBUG_DASHBOARD === "true";
|
|
75343
|
+
var debugRefreshLog = (message, payload) => {
|
|
75344
|
+
if (!DEBUG_DASHBOARD_LOGS4) return;
|
|
75345
|
+
if (payload) {
|
|
75346
|
+
console.log(`[OperationsOverviewRefresh] ${message}`, payload);
|
|
75347
|
+
return;
|
|
75348
|
+
}
|
|
75349
|
+
console.log(`[OperationsOverviewRefresh] ${message}`);
|
|
75350
|
+
};
|
|
75351
|
+
var isAbortError = (error) => {
|
|
75352
|
+
return error instanceof DOMException && error.name === "AbortError";
|
|
75353
|
+
};
|
|
75354
|
+
var toNumber4 = (value) => {
|
|
75355
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
75356
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
75357
|
+
const parsed = Number(value);
|
|
75358
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
75359
|
+
}
|
|
75360
|
+
return null;
|
|
75361
|
+
};
|
|
75362
|
+
var formatImprovementMetric = (recommendation) => {
|
|
75363
|
+
const estimatedGain = toNumber4(recommendation.estimated_gain_pieces);
|
|
75364
|
+
if (estimatedGain !== null && estimatedGain > 0) {
|
|
75365
|
+
return `+${Math.round(estimatedGain).toLocaleString()} pcs / day`;
|
|
75366
|
+
}
|
|
75367
|
+
const idleMinutes = toNumber4(recommendation.metrics?.idle_minutes);
|
|
75368
|
+
if (idleMinutes !== null) {
|
|
75369
|
+
return `-${Math.round(idleMinutes)}m Idle`;
|
|
75370
|
+
}
|
|
75371
|
+
const impactText = recommendation.impact?.trim();
|
|
75372
|
+
if (impactText) {
|
|
75373
|
+
return impactText.length > 22 ? `${impactText.slice(0, 22).trim()}...` : impactText;
|
|
75374
|
+
}
|
|
75375
|
+
return "Review Issue";
|
|
75376
|
+
};
|
|
75377
|
+
var normalizeImprovements2 = (recommendations, lineIds) => {
|
|
75378
|
+
const allowedLineIds = new Set(lineIds);
|
|
75379
|
+
const scopedRecommendations = (recommendations || []).filter((recommendation) => {
|
|
75380
|
+
return !recommendation.line_id || allowedLineIds.has(recommendation.line_id);
|
|
75381
|
+
});
|
|
75382
|
+
return [...scopedRecommendations].sort(compareImprovementRecommendationPriority).slice(0, 3).map((recommendation) => ({
|
|
75383
|
+
id: recommendation.issue_id || recommendation.id,
|
|
75384
|
+
issueId: recommendation.issue_id || recommendation.id,
|
|
75385
|
+
issueNumber: recommendation.issue_number,
|
|
75386
|
+
title: recommendation.title?.trim() || "Untitled issue",
|
|
75387
|
+
metric: formatImprovementMetric(recommendation),
|
|
75388
|
+
location: recommendation.location,
|
|
75389
|
+
line: recommendation.line,
|
|
75390
|
+
lineId: recommendation.line_id,
|
|
75391
|
+
workspaceId: recommendation.workspace_id
|
|
75392
|
+
}));
|
|
75393
|
+
};
|
|
75394
|
+
var useOperationsOverviewRefresh = ({
|
|
75395
|
+
store,
|
|
75396
|
+
supabase,
|
|
75397
|
+
companyId,
|
|
75398
|
+
lineIds,
|
|
75399
|
+
startKey,
|
|
75400
|
+
endKey,
|
|
75401
|
+
trendMode,
|
|
75402
|
+
comparisonStrategy,
|
|
75403
|
+
isLiveScope
|
|
75404
|
+
}) => {
|
|
75405
|
+
const lineIdsKey = React141__namespace.default.useMemo(() => lineIds.join(","), [lineIds]);
|
|
75406
|
+
const scopeSignature = React141__namespace.default.useMemo(
|
|
75407
|
+
() => [companyId || "", startKey, endKey, trendMode, comparisonStrategy || "", lineIdsKey].join("::"),
|
|
75408
|
+
[companyId, comparisonStrategy, endKey, lineIdsKey, startKey, trendMode]
|
|
75409
|
+
);
|
|
75410
|
+
const controllersRef = React141__namespace.default.useRef({});
|
|
75411
|
+
const requestIdsRef = React141__namespace.default.useRef({
|
|
75412
|
+
snapshot: 0,
|
|
75413
|
+
trend: 0,
|
|
75414
|
+
idle: 0,
|
|
75415
|
+
improvements: 0
|
|
75416
|
+
});
|
|
75417
|
+
const intervalRef = React141__namespace.default.useRef(null);
|
|
75418
|
+
const isPageActiveRef = React141__namespace.default.useRef(true);
|
|
75419
|
+
const lastResumeRefreshAtRef = React141__namespace.default.useRef(0);
|
|
75420
|
+
const abortAll = React141__namespace.default.useCallback(() => {
|
|
75421
|
+
Object.values(controllersRef.current).forEach((controller) => {
|
|
75422
|
+
controller?.abort();
|
|
75423
|
+
});
|
|
75424
|
+
controllersRef.current = {};
|
|
75425
|
+
}, []);
|
|
75426
|
+
React141__namespace.default.useEffect(() => {
|
|
75427
|
+
return () => {
|
|
75428
|
+
abortAll();
|
|
75429
|
+
};
|
|
75430
|
+
}, [abortAll]);
|
|
75431
|
+
const getIsPageActive = React141__namespace.default.useCallback(() => {
|
|
75432
|
+
if (typeof document === "undefined") {
|
|
75433
|
+
return true;
|
|
73210
75434
|
}
|
|
73211
|
-
|
|
73212
|
-
|
|
73213
|
-
|
|
73214
|
-
|
|
73215
|
-
|
|
75435
|
+
const isVisible = document.visibilityState === "visible";
|
|
75436
|
+
const hasFocus = typeof document.hasFocus === "function" ? document.hasFocus() : true;
|
|
75437
|
+
return isVisible && hasFocus;
|
|
75438
|
+
}, []);
|
|
75439
|
+
const stopPolling = React141__namespace.default.useCallback((reason) => {
|
|
75440
|
+
if (intervalRef.current === null) {
|
|
75441
|
+
return;
|
|
73216
75442
|
}
|
|
73217
|
-
|
|
73218
|
-
|
|
73219
|
-
|
|
73220
|
-
|
|
73221
|
-
|
|
73222
|
-
|
|
73223
|
-
|
|
73224
|
-
|
|
73225
|
-
|
|
73226
|
-
|
|
75443
|
+
window.clearInterval(intervalRef.current);
|
|
75444
|
+
intervalRef.current = null;
|
|
75445
|
+
debugRefreshLog("poll stopped", { reason });
|
|
75446
|
+
}, []);
|
|
75447
|
+
const runRefresh = React141__namespace.default.useCallback(
|
|
75448
|
+
async (section, begin, onSuccess, onError, request, reason) => {
|
|
75449
|
+
if (!supabase || !companyId || lineIds.length === 0) return;
|
|
75450
|
+
const requestId = requestIdsRef.current[section] + 1;
|
|
75451
|
+
requestIdsRef.current[section] = requestId;
|
|
75452
|
+
controllersRef.current[section]?.abort();
|
|
75453
|
+
const controller = new AbortController();
|
|
75454
|
+
controllersRef.current[section] = controller;
|
|
75455
|
+
begin();
|
|
75456
|
+
try {
|
|
75457
|
+
const response = await request(controller.signal, requestId);
|
|
75458
|
+
if (controller.signal.aborted || requestIdsRef.current[section] !== requestId) {
|
|
75459
|
+
return;
|
|
75460
|
+
}
|
|
75461
|
+
onSuccess(response, Date.now(), reason === "live_refresh" ? "transition" : "default");
|
|
75462
|
+
} catch (error) {
|
|
75463
|
+
if (controller.signal.aborted || requestIdsRef.current[section] !== requestId || isAbortError(error)) {
|
|
75464
|
+
return;
|
|
75465
|
+
}
|
|
75466
|
+
onError(error instanceof Error ? error.message : `Failed to refresh ${section}`);
|
|
75467
|
+
}
|
|
75468
|
+
},
|
|
75469
|
+
[companyId, lineIds.length, supabase]
|
|
75470
|
+
);
|
|
75471
|
+
const refreshSnapshot = React141__namespace.default.useCallback(
|
|
75472
|
+
async (reason) => {
|
|
75473
|
+
await runRefresh(
|
|
75474
|
+
"snapshot",
|
|
75475
|
+
store.beginSnapshotLoad,
|
|
75476
|
+
store.applySnapshotResponse,
|
|
75477
|
+
store.failSnapshotLoad,
|
|
75478
|
+
(signal, requestId) => {
|
|
75479
|
+
const params = new URLSearchParams({
|
|
75480
|
+
company_id: companyId || "",
|
|
75481
|
+
start_date: startKey,
|
|
75482
|
+
end_date: endKey,
|
|
75483
|
+
trend_shift_mode: trendMode,
|
|
75484
|
+
line_ids: lineIdsKey
|
|
75485
|
+
});
|
|
75486
|
+
if (comparisonStrategy) {
|
|
75487
|
+
params.set("comparison_strategy", comparisonStrategy);
|
|
73227
75488
|
}
|
|
73228
|
-
|
|
73229
|
-
|
|
73230
|
-
|
|
73231
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-slate-500 text-center mt-0.5", children: mobileSubtitle })
|
|
73232
|
-
] }),
|
|
73233
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0 flex items-center gap-1.5", children: [
|
|
73234
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73235
|
-
MonthlyRangeFilter_default,
|
|
75489
|
+
return fetchBackendJson(
|
|
75490
|
+
supabase,
|
|
75491
|
+
`/api/dashboard/operations-overview/snapshot?${params.toString()}`,
|
|
73236
75492
|
{
|
|
73237
|
-
|
|
73238
|
-
|
|
73239
|
-
timezone: appTimezone,
|
|
73240
|
-
value: dateRange,
|
|
73241
|
-
onChange: handleDateRangeChange,
|
|
73242
|
-
showLabel: false
|
|
75493
|
+
signal,
|
|
75494
|
+
dedupeKey: `operations-overview:snapshot:${scopeSignature}:${requestId}`
|
|
73243
75495
|
}
|
|
73244
|
-
)
|
|
73245
|
-
|
|
73246
|
-
|
|
73247
|
-
|
|
73248
|
-
|
|
73249
|
-
|
|
73250
|
-
|
|
73251
|
-
|
|
73252
|
-
|
|
73253
|
-
|
|
73254
|
-
|
|
73255
|
-
|
|
73256
|
-
|
|
73257
|
-
|
|
73258
|
-
|
|
73259
|
-
|
|
73260
|
-
|
|
73261
|
-
|
|
73262
|
-
|
|
73263
|
-
|
|
73264
|
-
|
|
73265
|
-
|
|
73266
|
-
|
|
73267
|
-
|
|
73268
|
-
{
|
|
73269
|
-
month: parseDateKeyToDate(dateRange.startKey).getMonth(),
|
|
73270
|
-
year: parseDateKeyToDate(dateRange.startKey).getFullYear(),
|
|
73271
|
-
timezone: appTimezone,
|
|
73272
|
-
value: dateRange,
|
|
73273
|
-
onChange: handleDateRangeChange,
|
|
73274
|
-
showLabel: false
|
|
73275
|
-
}
|
|
73276
|
-
) }),
|
|
73277
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
73278
|
-
"button",
|
|
75496
|
+
);
|
|
75497
|
+
},
|
|
75498
|
+
reason
|
|
75499
|
+
);
|
|
75500
|
+
},
|
|
75501
|
+
[companyId, comparisonStrategy, endKey, lineIdsKey, runRefresh, scopeSignature, startKey, store, supabase, trendMode]
|
|
75502
|
+
);
|
|
75503
|
+
const refreshTrend = React141__namespace.default.useCallback(
|
|
75504
|
+
async (reason) => {
|
|
75505
|
+
await runRefresh(
|
|
75506
|
+
"trend",
|
|
75507
|
+
store.beginTrendLoad,
|
|
75508
|
+
store.applyTrendResponse,
|
|
75509
|
+
store.failTrendLoad,
|
|
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/trend?${params.toString()}`,
|
|
73279
75521
|
{
|
|
73280
|
-
|
|
73281
|
-
|
|
73282
|
-
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"}`,
|
|
73283
|
-
"aria-label": "Open filters",
|
|
73284
|
-
children: [
|
|
73285
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: `w-[18px] h-[18px] ${trendMode !== "all" ? "text-blue-600" : "text-slate-500"}` }),
|
|
73286
|
-
"Filters",
|
|
73287
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: `w-4 h-4 ml-0.5 transition-transform duration-200 ${isFilterOpen ? "rotate-180" : ""}` })
|
|
73288
|
-
]
|
|
75522
|
+
signal,
|
|
75523
|
+
dedupeKey: `operations-overview:trend:${scopeSignature}:${requestId}`
|
|
73289
75524
|
}
|
|
73290
|
-
)
|
|
73291
|
-
|
|
73292
|
-
|
|
73293
|
-
|
|
73294
|
-
|
|
73295
|
-
|
|
73296
|
-
|
|
73297
|
-
|
|
75525
|
+
);
|
|
75526
|
+
},
|
|
75527
|
+
reason
|
|
75528
|
+
);
|
|
75529
|
+
},
|
|
75530
|
+
[companyId, endKey, lineIdsKey, runRefresh, scopeSignature, startKey, store, supabase, trendMode]
|
|
75531
|
+
);
|
|
75532
|
+
const refreshIdle = React141__namespace.default.useCallback(
|
|
75533
|
+
async (reason) => {
|
|
75534
|
+
await runRefresh(
|
|
75535
|
+
"idle",
|
|
75536
|
+
store.beginIdleLoad,
|
|
75537
|
+
store.applyIdleResponse,
|
|
75538
|
+
store.failIdleLoad,
|
|
75539
|
+
(signal, requestId) => {
|
|
75540
|
+
const params = new URLSearchParams({
|
|
75541
|
+
company_id: companyId || "",
|
|
75542
|
+
start_date: startKey,
|
|
75543
|
+
end_date: endKey,
|
|
75544
|
+
trend_shift_mode: trendMode,
|
|
75545
|
+
line_ids: lineIdsKey
|
|
75546
|
+
});
|
|
75547
|
+
return fetchBackendJson(
|
|
75548
|
+
supabase,
|
|
75549
|
+
`/api/dashboard/operations-overview/idle-reason-breakdown?${params.toString()}`,
|
|
73298
75550
|
{
|
|
73299
|
-
|
|
73300
|
-
|
|
73301
|
-
setIsFilterOpen(false);
|
|
73302
|
-
},
|
|
73303
|
-
className: "text-xs text-red-600 hover:text-red-700 font-medium",
|
|
73304
|
-
children: "Clear all"
|
|
75551
|
+
signal,
|
|
75552
|
+
dedupeKey: `operations-overview:idle:${scopeSignature}:${requestId}`
|
|
73305
75553
|
}
|
|
73306
|
-
)
|
|
73307
|
-
|
|
73308
|
-
|
|
73309
|
-
|
|
73310
|
-
|
|
73311
|
-
|
|
75554
|
+
);
|
|
75555
|
+
},
|
|
75556
|
+
reason
|
|
75557
|
+
);
|
|
75558
|
+
},
|
|
75559
|
+
[companyId, endKey, lineIdsKey, runRefresh, scopeSignature, startKey, store, supabase, trendMode]
|
|
75560
|
+
);
|
|
75561
|
+
const refreshImprovements = React141__namespace.default.useCallback(
|
|
75562
|
+
async (reason) => {
|
|
75563
|
+
await runRefresh(
|
|
75564
|
+
"improvements",
|
|
75565
|
+
store.beginImprovementsLoad,
|
|
75566
|
+
(response, updatedAt, mode) => {
|
|
75567
|
+
store.applyImprovements(normalizeImprovements2(response.recommendations, lineIds), updatedAt, mode);
|
|
75568
|
+
},
|
|
75569
|
+
store.failImprovementsLoad,
|
|
75570
|
+
(signal, requestId) => {
|
|
75571
|
+
const params = new URLSearchParams({
|
|
75572
|
+
company_id: companyId || "",
|
|
75573
|
+
status: "open",
|
|
75574
|
+
limit: "200",
|
|
75575
|
+
line_ids: lineIdsKey
|
|
75576
|
+
});
|
|
75577
|
+
return fetchBackendJson(
|
|
75578
|
+
supabase,
|
|
75579
|
+
`/api/improvement-center/recommendations?${params.toString()}`,
|
|
73312
75580
|
{
|
|
73313
|
-
|
|
73314
|
-
|
|
73315
|
-
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",
|
|
73316
|
-
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` },
|
|
73317
|
-
children: [
|
|
73318
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: "All Shifts" }),
|
|
73319
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "day", children: "Day Shift" }),
|
|
73320
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "night", children: "Night Shift" })
|
|
73321
|
-
]
|
|
75581
|
+
signal,
|
|
75582
|
+
dedupeKey: `operations-overview:improvements:${scopeSignature}:${requestId}`
|
|
73322
75583
|
}
|
|
73323
|
-
)
|
|
73324
|
-
|
|
73325
|
-
|
|
73326
|
-
|
|
75584
|
+
);
|
|
75585
|
+
},
|
|
75586
|
+
reason
|
|
75587
|
+
);
|
|
75588
|
+
},
|
|
75589
|
+
[companyId, lineIds, lineIdsKey, runRefresh, scopeSignature, store, supabase]
|
|
75590
|
+
);
|
|
75591
|
+
const refreshAll = React141__namespace.default.useCallback(
|
|
75592
|
+
async (reason) => {
|
|
75593
|
+
await Promise.allSettled([
|
|
75594
|
+
refreshSnapshot(reason),
|
|
75595
|
+
refreshTrend(reason),
|
|
75596
|
+
refreshIdle(reason),
|
|
75597
|
+
refreshImprovements(reason)
|
|
75598
|
+
]);
|
|
75599
|
+
},
|
|
75600
|
+
[refreshIdle, refreshImprovements, refreshSnapshot, refreshTrend]
|
|
75601
|
+
);
|
|
75602
|
+
const startPolling = React141__namespace.default.useCallback((reason) => {
|
|
75603
|
+
if (!isLiveScope || !supabase || !companyId || lineIds.length === 0) {
|
|
75604
|
+
return;
|
|
75605
|
+
}
|
|
75606
|
+
if (intervalRef.current !== null) {
|
|
75607
|
+
return;
|
|
75608
|
+
}
|
|
75609
|
+
intervalRef.current = window.setInterval(() => {
|
|
75610
|
+
if (!isPageActiveRef.current) {
|
|
75611
|
+
debugRefreshLog("poll skipped because hidden/unfocused", {
|
|
75612
|
+
reason: "interval_tick",
|
|
75613
|
+
visibilityState: typeof document !== "undefined" ? document.visibilityState : "unknown",
|
|
75614
|
+
hasFocus: typeof document !== "undefined" && typeof document.hasFocus === "function" ? document.hasFocus() : true
|
|
75615
|
+
});
|
|
75616
|
+
stopPolling("inactive_during_tick");
|
|
75617
|
+
return;
|
|
75618
|
+
}
|
|
75619
|
+
void refreshAll("live_refresh");
|
|
75620
|
+
}, LIVE_REFRESH_INTERVAL_MS);
|
|
75621
|
+
debugRefreshLog("poll started", { reason, intervalMs: LIVE_REFRESH_INTERVAL_MS });
|
|
75622
|
+
}, [companyId, isLiveScope, lineIds.length, refreshAll, stopPolling, supabase]);
|
|
75623
|
+
const refreshFromResume = React141__namespace.default.useCallback((reason) => {
|
|
75624
|
+
const now4 = Date.now();
|
|
75625
|
+
if (now4 - lastResumeRefreshAtRef.current < 1e3) {
|
|
75626
|
+
debugRefreshLog("resume refresh suppressed", { reason });
|
|
75627
|
+
return;
|
|
75628
|
+
}
|
|
75629
|
+
lastResumeRefreshAtRef.current = now4;
|
|
75630
|
+
stopPolling("resume_refresh");
|
|
75631
|
+
debugRefreshLog("resume refresh fired", { reason });
|
|
75632
|
+
void refreshAll("live_refresh").finally(() => {
|
|
75633
|
+
if (isPageActiveRef.current) {
|
|
75634
|
+
startPolling("resume");
|
|
75635
|
+
}
|
|
75636
|
+
});
|
|
75637
|
+
}, [refreshAll, startPolling, stopPolling]);
|
|
75638
|
+
React141__namespace.default.useEffect(() => {
|
|
75639
|
+
if (!supabase || !companyId || lineIds.length === 0) {
|
|
75640
|
+
stopPolling("scope_invalid");
|
|
75641
|
+
abortAll();
|
|
75642
|
+
store.reset();
|
|
75643
|
+
return;
|
|
75644
|
+
}
|
|
75645
|
+
void refreshAll("scope_change");
|
|
75646
|
+
}, [abortAll, companyId, lineIds.length, refreshAll, scopeSignature, stopPolling, store, supabase]);
|
|
75647
|
+
React141__namespace.default.useEffect(() => {
|
|
75648
|
+
if (!isLiveScope || !supabase || !companyId || lineIds.length === 0) {
|
|
75649
|
+
isPageActiveRef.current = false;
|
|
75650
|
+
stopPolling("live_scope_disabled");
|
|
75651
|
+
return;
|
|
75652
|
+
}
|
|
75653
|
+
const logInactive = (reason) => {
|
|
75654
|
+
debugRefreshLog("poll skipped because hidden/unfocused", {
|
|
75655
|
+
reason,
|
|
75656
|
+
visibilityState: typeof document !== "undefined" ? document.visibilityState : "unknown",
|
|
75657
|
+
hasFocus: typeof document !== "undefined" && typeof document.hasFocus === "function" ? document.hasFocus() : true
|
|
75658
|
+
});
|
|
75659
|
+
};
|
|
75660
|
+
const markInactive = (reason) => {
|
|
75661
|
+
isPageActiveRef.current = false;
|
|
75662
|
+
logInactive(reason);
|
|
75663
|
+
stopPolling(reason);
|
|
75664
|
+
};
|
|
75665
|
+
const syncActivity = (reason) => {
|
|
75666
|
+
const nextIsActive = getIsPageActive();
|
|
75667
|
+
const wasActive = isPageActiveRef.current;
|
|
75668
|
+
isPageActiveRef.current = nextIsActive;
|
|
75669
|
+
if (!nextIsActive) {
|
|
75670
|
+
logInactive(reason);
|
|
75671
|
+
stopPolling(reason);
|
|
75672
|
+
return;
|
|
75673
|
+
}
|
|
75674
|
+
if (!wasActive) {
|
|
75675
|
+
refreshFromResume(reason);
|
|
75676
|
+
return;
|
|
75677
|
+
}
|
|
75678
|
+
startPolling(reason);
|
|
75679
|
+
};
|
|
75680
|
+
isPageActiveRef.current = getIsPageActive();
|
|
75681
|
+
if (isPageActiveRef.current) {
|
|
75682
|
+
startPolling("effect_mount");
|
|
75683
|
+
} else {
|
|
75684
|
+
logInactive("effect_mount");
|
|
75685
|
+
}
|
|
75686
|
+
const handleVisibilityChange = () => syncActivity("visibilitychange");
|
|
75687
|
+
const handleFocus = () => syncActivity("focus");
|
|
75688
|
+
const handleBlur = () => markInactive("blur");
|
|
75689
|
+
const handlePageShow = () => syncActivity("pageshow");
|
|
75690
|
+
const handlePageHide = () => markInactive("pagehide");
|
|
75691
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
75692
|
+
window.addEventListener("focus", handleFocus);
|
|
75693
|
+
window.addEventListener("blur", handleBlur);
|
|
75694
|
+
window.addEventListener("pageshow", handlePageShow);
|
|
75695
|
+
window.addEventListener("pagehide", handlePageHide);
|
|
75696
|
+
return () => {
|
|
75697
|
+
stopPolling("cleanup");
|
|
75698
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
75699
|
+
window.removeEventListener("focus", handleFocus);
|
|
75700
|
+
window.removeEventListener("blur", handleBlur);
|
|
75701
|
+
window.removeEventListener("pageshow", handlePageShow);
|
|
75702
|
+
window.removeEventListener("pagehide", handlePageHide);
|
|
75703
|
+
};
|
|
75704
|
+
}, [companyId, getIsPageActive, isLiveScope, lineIds.length, refreshFromResume, startPolling, stopPolling, supabase]);
|
|
75705
|
+
};
|
|
75706
|
+
var PlantHeadView = () => {
|
|
75707
|
+
const supabase = useSupabase();
|
|
75708
|
+
const entityConfig = useEntityConfig();
|
|
75709
|
+
const appTimezone = useAppTimezone() || "UTC";
|
|
75710
|
+
const { navigate } = useNavigation();
|
|
75711
|
+
const { accessibleLineIds } = useUserLineAccess();
|
|
75712
|
+
const mobileMenuContext = useMobileMenu();
|
|
75713
|
+
useHideMobileHeader(!!mobileMenuContext);
|
|
75714
|
+
const storeRef = React141__namespace.default.useRef(createOperationsOverviewStore());
|
|
75715
|
+
const store = storeRef.current;
|
|
75716
|
+
const [dateRange, setDateRange] = React141__namespace.default.useState(() => getCurrentWeekToDateRange(appTimezone));
|
|
75717
|
+
const [usesThisWeekComparison, setUsesThisWeekComparison] = React141__namespace.default.useState(true);
|
|
75718
|
+
const [trendMode, setTrendMode] = React141__namespace.default.useState("all");
|
|
75719
|
+
React141__namespace.default.useEffect(() => {
|
|
75720
|
+
trackCorePageView("Operations Overview", {
|
|
75721
|
+
dashboard_surface: "operations_overview"
|
|
75722
|
+
});
|
|
75723
|
+
}, []);
|
|
75724
|
+
const currentWeekRange = React141__namespace.default.useMemo(
|
|
75725
|
+
() => getCurrentWeekToDateRange(appTimezone),
|
|
75726
|
+
[appTimezone]
|
|
75727
|
+
);
|
|
75728
|
+
const isCurrentWeekToDateRange = dateRange.startKey === currentWeekRange.startKey && dateRange.endKey === currentWeekRange.endKey;
|
|
75729
|
+
const normalizedLineIds = React141__namespace.default.useMemo(
|
|
75730
|
+
() => Array.from(new Set((accessibleLineIds || []).filter(Boolean))).sort(),
|
|
75731
|
+
[accessibleLineIds]
|
|
75732
|
+
);
|
|
75733
|
+
const lineIdsKey = React141__namespace.default.useMemo(
|
|
75734
|
+
() => normalizedLineIds.join(","),
|
|
75735
|
+
[normalizedLineIds]
|
|
75736
|
+
);
|
|
75737
|
+
const scopedLineIds = React141__namespace.default.useMemo(
|
|
75738
|
+
() => lineIdsKey ? lineIdsKey.split(",") : [],
|
|
75739
|
+
[lineIdsKey]
|
|
75740
|
+
);
|
|
75741
|
+
const initializedTimezoneRef = React141__namespace.default.useRef(appTimezone);
|
|
75742
|
+
React141__namespace.default.useEffect(() => {
|
|
75743
|
+
if (initializedTimezoneRef.current === appTimezone) return;
|
|
75744
|
+
setDateRange(getCurrentWeekToDateRange(appTimezone));
|
|
75745
|
+
setUsesThisWeekComparison(true);
|
|
75746
|
+
initializedTimezoneRef.current = appTimezone;
|
|
75747
|
+
}, [appTimezone]);
|
|
75748
|
+
const handleDateRangeChange = React141__namespace.default.useCallback((range, meta) => {
|
|
75749
|
+
trackCoreEvent("Operations Overview Date Range Changed", {
|
|
75750
|
+
start_date: range.startKey,
|
|
75751
|
+
end_date: range.endKey
|
|
75752
|
+
});
|
|
75753
|
+
setDateRange(range);
|
|
75754
|
+
setUsesThisWeekComparison((previous) => {
|
|
75755
|
+
if (meta?.source === "preset") {
|
|
75756
|
+
return meta.presetLabel === "This Week";
|
|
75757
|
+
}
|
|
75758
|
+
if (meta?.source === "custom") {
|
|
75759
|
+
return false;
|
|
75760
|
+
}
|
|
75761
|
+
return previous;
|
|
75762
|
+
});
|
|
75763
|
+
}, []);
|
|
75764
|
+
const handleTrendModeChange = React141__namespace.default.useCallback((mode) => {
|
|
75765
|
+
setTrendMode(mode);
|
|
75766
|
+
}, []);
|
|
75767
|
+
const buildLineMonthlyHistoryUrl = React141__namespace.default.useCallback((lineId) => {
|
|
75768
|
+
const rangeStartDate = parseDateKeyToDate(dateRange.startKey);
|
|
75769
|
+
const params = new URLSearchParams();
|
|
75770
|
+
params.set("tab", "monthly_history");
|
|
75771
|
+
params.set("month", rangeStartDate.getMonth().toString());
|
|
75772
|
+
params.set("year", rangeStartDate.getFullYear().toString());
|
|
75773
|
+
params.set("rangeStart", dateRange.startKey);
|
|
75774
|
+
params.set("rangeEnd", dateRange.endKey);
|
|
75775
|
+
return `/kpis/${lineId}?${params.toString()}`;
|
|
75776
|
+
}, [dateRange.endKey, dateRange.startKey]);
|
|
75777
|
+
const handleOpenLineMonthlyHistory = React141__namespace.default.useCallback((lineId, lineName) => {
|
|
75778
|
+
trackCoreEvent("Operations Overview Line Clicked", {
|
|
75779
|
+
line_id: lineId,
|
|
75780
|
+
line_name: lineName,
|
|
75781
|
+
range_start: dateRange.startKey,
|
|
75782
|
+
range_end: dateRange.endKey
|
|
75783
|
+
});
|
|
75784
|
+
navigate(buildLineMonthlyHistoryUrl(lineId));
|
|
75785
|
+
}, [buildLineMonthlyHistoryUrl, dateRange.endKey, dateRange.startKey, navigate]);
|
|
75786
|
+
const handleViewAllPoorestPerformers = React141__namespace.default.useCallback(() => {
|
|
75787
|
+
trackCoreEvent("Operations Overview View All Clicked", { section: "poorest_performers" });
|
|
75788
|
+
navigate("/kpis?tab=leaderboard");
|
|
75789
|
+
}, [navigate]);
|
|
75790
|
+
const handleViewAllImprovements = React141__namespace.default.useCallback(() => {
|
|
75791
|
+
trackCoreEvent("Operations Overview View All Clicked", { section: "improvements" });
|
|
75792
|
+
navigate("/improvement-center");
|
|
75793
|
+
}, [navigate]);
|
|
75794
|
+
const handleOpenImprovement = React141__namespace.default.useCallback((item) => {
|
|
75795
|
+
trackCoreEvent("Operations Overview Improvement Clicked", {
|
|
75796
|
+
issue_id: item.issueId,
|
|
75797
|
+
issue_number: item.issueNumber,
|
|
75798
|
+
title: item.title
|
|
75799
|
+
});
|
|
75800
|
+
const params = new URLSearchParams({
|
|
75801
|
+
focusIssueId: item.issueId
|
|
75802
|
+
});
|
|
75803
|
+
navigate(`/improvement-center?${params.toString()}`);
|
|
75804
|
+
}, [navigate]);
|
|
75805
|
+
const comparisonStrategy = React141__namespace.default.useMemo(() => {
|
|
75806
|
+
if (usesThisWeekComparison && isCurrentWeekToDateRange) {
|
|
75807
|
+
return "previous_full_week";
|
|
75808
|
+
}
|
|
75809
|
+
return void 0;
|
|
75810
|
+
}, [isCurrentWeekToDateRange, usesThisWeekComparison]);
|
|
75811
|
+
useOperationsOverviewRefresh({
|
|
75812
|
+
store,
|
|
75813
|
+
supabase,
|
|
75814
|
+
companyId: entityConfig.companyId,
|
|
75815
|
+
lineIds: scopedLineIds,
|
|
75816
|
+
startKey: dateRange.startKey,
|
|
75817
|
+
endKey: dateRange.endKey,
|
|
75818
|
+
trendMode,
|
|
75819
|
+
comparisonStrategy,
|
|
75820
|
+
isLiveScope: isCurrentWeekToDateRange
|
|
75821
|
+
});
|
|
75822
|
+
const { supervisorsByLineId } = useSupervisorsByLineIds(scopedLineIds, {
|
|
75823
|
+
enabled: !!entityConfig.companyId && scopedLineIds.length > 0,
|
|
75824
|
+
companyId: entityConfig.companyId,
|
|
75825
|
+
useBackend: true
|
|
75826
|
+
});
|
|
75827
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-h-screen bg-slate-50 w-full font-sans", children: [
|
|
75828
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75829
|
+
OperationsOverviewHeader,
|
|
75830
|
+
{
|
|
75831
|
+
dateRange,
|
|
75832
|
+
trendMode,
|
|
75833
|
+
appTimezone,
|
|
75834
|
+
mobileMenuContext,
|
|
75835
|
+
onDateRangeChange: handleDateRangeChange,
|
|
75836
|
+
onTrendModeChange: handleTrendModeChange
|
|
75837
|
+
}
|
|
75838
|
+
),
|
|
73327
75839
|
/* @__PURE__ */ jsxRuntime.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: [
|
|
73328
|
-
/* @__PURE__ */ jsxRuntime.
|
|
73329
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
73330
|
-
"div",
|
|
73331
|
-
{
|
|
73332
|
-
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",
|
|
73333
|
-
children: [
|
|
73334
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-between items-center mb-1", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Overall Efficiency" }) }),
|
|
73335
|
-
isSnapshotLoading ? /* @__PURE__ */ jsxRuntime.jsx(OverviewMetricCardSkeleton, {}) : overview.summary?.plant_efficiency?.current !== null && overview.summary?.plant_efficiency?.current !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
73336
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-2xl sm:text-3xl font-bold text-slate-800 tracking-tight", children: [
|
|
73337
|
-
roundOne(overview.summary.plant_efficiency.current),
|
|
73338
|
-
"%"
|
|
73339
|
-
] }),
|
|
73340
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${plantEfficiencyBadge.className}`, children: [
|
|
73341
|
-
plantEfficiencyBadge.icon === "up" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : plantEfficiencyBadge.icon === "down" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
73342
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium", children: plantEfficiencyBadge.text })
|
|
73343
|
-
] })
|
|
73344
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No efficiency data available" })
|
|
73345
|
-
]
|
|
73346
|
-
}
|
|
73347
|
-
),
|
|
73348
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
73349
|
-
"div",
|
|
73350
|
-
{
|
|
73351
|
-
ref: idleContributorsRef,
|
|
73352
|
-
"data-testid": "idle-kpi-card-region",
|
|
73353
|
-
className: "relative",
|
|
73354
|
-
onMouseEnter: () => {
|
|
73355
|
-
if (canInspectIdleContributors) {
|
|
73356
|
-
setIsIdleContributorsOpen(true);
|
|
73357
|
-
}
|
|
73358
|
-
},
|
|
73359
|
-
onMouseLeave: () => {
|
|
73360
|
-
if (!isIdleContributorsPinned) {
|
|
73361
|
-
setIsIdleContributorsOpen(false);
|
|
73362
|
-
}
|
|
73363
|
-
},
|
|
73364
|
-
onFocus: () => {
|
|
73365
|
-
if (canInspectIdleContributors) {
|
|
73366
|
-
setIsIdleContributorsOpen(true);
|
|
73367
|
-
}
|
|
73368
|
-
},
|
|
73369
|
-
onBlur: (event) => {
|
|
73370
|
-
if (isIdleContributorsPinned) return;
|
|
73371
|
-
const nextTarget = event.relatedTarget;
|
|
73372
|
-
if (nextTarget && idleContributorsRef.current?.contains(nextTarget)) return;
|
|
73373
|
-
setIsIdleContributorsOpen(false);
|
|
73374
|
-
},
|
|
73375
|
-
children: [
|
|
73376
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
73377
|
-
"div",
|
|
73378
|
-
{
|
|
73379
|
-
"data-testid": "idle-kpi-card",
|
|
73380
|
-
role: canInspectIdleContributors ? "button" : void 0,
|
|
73381
|
-
tabIndex: canInspectIdleContributors ? 0 : -1,
|
|
73382
|
-
"aria-controls": canInspectIdleContributors ? "idle-kpi-popover" : void 0,
|
|
73383
|
-
"aria-expanded": canInspectIdleContributors ? isIdleContributorsOpen : void 0,
|
|
73384
|
-
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"}`,
|
|
73385
|
-
onClick: handleIdleContributorsToggle,
|
|
73386
|
-
onKeyDown: handleIdleContributorsKeyDown,
|
|
73387
|
-
children: [
|
|
73388
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Idle Time per Workstation" }) }),
|
|
73389
|
-
isSnapshotLoading ? /* @__PURE__ */ jsxRuntime.jsx(OverviewMetricCardSkeleton, {}) : overview.summary?.avg_idle_per_workstation?.current_seconds !== null && overview.summary?.avg_idle_per_workstation?.current_seconds !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-3 mt-1", children: [
|
|
73390
|
-
/* @__PURE__ */ jsxRuntime.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) }),
|
|
73391
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1 px-2.5 py-1 rounded-full ${idleBadge.className}`, children: [
|
|
73392
|
-
idleBadge.icon === "up" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : idleBadge.icon === "down" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3.5 h-3.5", strokeWidth: 2.5 }) : null,
|
|
73393
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium", children: idleBadge.text })
|
|
73394
|
-
] })
|
|
73395
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-sm text-slate-400", children: "No idle time data available" })
|
|
73396
|
-
]
|
|
73397
|
-
}
|
|
73398
|
-
),
|
|
73399
|
-
canInspectIdleContributors && isIdleContributorsOpen ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
73400
|
-
"div",
|
|
73401
|
-
{
|
|
73402
|
-
id: "idle-kpi-popover",
|
|
73403
|
-
"data-testid": "idle-kpi-popover",
|
|
73404
|
-
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]",
|
|
73405
|
-
children: [
|
|
73406
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pb-3 mb-3 border-b border-slate-100", children: [
|
|
73407
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5 rounded-full flex-shrink-0 bg-red-500" }),
|
|
73408
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-slate-800 text-[15px]", children: "Idle Time per Workstation" })
|
|
73409
|
-
] }),
|
|
73410
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
73411
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3", children: "TOP CONTRIBUTORS" }),
|
|
73412
|
-
idleTopContributors.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2.5", children: idleTopContributors.map((contributor, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
73413
|
-
"div",
|
|
73414
|
-
{
|
|
73415
|
-
className: "flex items-start justify-between gap-3",
|
|
73416
|
-
children: [
|
|
73417
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
73418
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73419
|
-
"div",
|
|
73420
|
-
{
|
|
73421
|
-
className: "text-slate-600 text-[13px] truncate",
|
|
73422
|
-
title: contributor.workspaceName,
|
|
73423
|
-
children: contributor.workspaceName
|
|
73424
|
-
}
|
|
73425
|
-
),
|
|
73426
|
-
showIdleContributorLineNames && contributor.lineName ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] font-medium text-slate-400 truncate", title: contributor.lineName, children: contributor.lineName }) : null
|
|
73427
|
-
] }),
|
|
73428
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-slate-500 text-[13px] text-right whitespace-nowrap", children: formatIdleDuration(contributor.avgIdleSeconds) })
|
|
73429
|
-
]
|
|
73430
|
-
},
|
|
73431
|
-
`${contributor.workspaceId || contributor.workspaceName}-${index}`
|
|
73432
|
-
)) }) : /* @__PURE__ */ jsxRuntime.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." })
|
|
73433
|
-
] })
|
|
73434
|
-
]
|
|
73435
|
-
}
|
|
73436
|
-
) : null
|
|
73437
|
-
]
|
|
73438
|
-
}
|
|
73439
|
-
)
|
|
73440
|
-
] }),
|
|
75840
|
+
/* @__PURE__ */ jsxRuntime.jsx(OverviewSummaryCards, { store }),
|
|
73441
75841
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-h-0 grid grid-cols-1 xl:grid-cols-2 gap-5 auto-rows-fr", children: [
|
|
73442
75842
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-rows-1 xl:grid-rows-2 gap-5 min-h-0", children: [
|
|
73443
|
-
/* @__PURE__ */ jsxRuntime.
|
|
73444
|
-
|
|
73445
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
73446
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700", children: "Poorest Performers" }),
|
|
73447
|
-
showPoorestModeToggle && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex bg-slate-100 p-0.5 rounded-lg", children: [
|
|
73448
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73449
|
-
"button",
|
|
73450
|
-
{
|
|
73451
|
-
type: "button",
|
|
73452
|
-
onClick: () => handlePoorestLineModeChange("output"),
|
|
73453
|
-
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"}`,
|
|
73454
|
-
children: "Output"
|
|
73455
|
-
}
|
|
73456
|
-
),
|
|
73457
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73458
|
-
"button",
|
|
73459
|
-
{
|
|
73460
|
-
type: "button",
|
|
73461
|
-
onClick: () => handlePoorestLineModeChange("uptime"),
|
|
73462
|
-
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"}`,
|
|
73463
|
-
children: "Uptime"
|
|
73464
|
-
}
|
|
73465
|
-
)
|
|
73466
|
-
] })
|
|
73467
|
-
] }),
|
|
73468
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73469
|
-
"button",
|
|
73470
|
-
{
|
|
73471
|
-
type: "button",
|
|
73472
|
-
onClick: () => {
|
|
73473
|
-
trackCoreEvent("Operations Overview View All Clicked", { section: "poorest_performers" });
|
|
73474
|
-
navigate("/kpis?tab=leaderboard");
|
|
73475
|
-
},
|
|
73476
|
-
className: "text-[11px] font-bold text-slate-500 hover:text-slate-800 transition-colors",
|
|
73477
|
-
children: "View All"
|
|
73478
|
-
}
|
|
73479
|
-
)
|
|
73480
|
-
] }),
|
|
73481
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex flex-col p-0 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y divide-slate-50 flex-1 px-5", children: [
|
|
73482
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
73483
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold text-slate-400 text-[10px] uppercase tracking-wider min-w-[120px]", children: "Line" }),
|
|
73484
|
-
/* @__PURE__ */ jsxRuntime.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 })
|
|
73485
|
-
] }),
|
|
73486
|
-
isSnapshotLoading ? /* @__PURE__ */ jsxRuntime.jsx(OverviewListSkeleton, {}) : mergedPoorestLines.length > 0 ? mergedPoorestLines.map((line) => {
|
|
73487
|
-
const lineDelta = buildLineDeltaTone(line.delta, comparisonLabel);
|
|
73488
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
73489
|
-
"div",
|
|
73490
|
-
{
|
|
73491
|
-
onClick: () => {
|
|
73492
|
-
trackCoreEvent("Operations Overview Line Clicked", { line_id: line.id, line_name: line.name });
|
|
73493
|
-
navigate(`/kpis/${line.id}`);
|
|
73494
|
-
},
|
|
73495
|
-
className: "block py-3 hover:bg-slate-50/50 transition-colors cursor-pointer group relative",
|
|
73496
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
73497
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
73498
|
-
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
73499
|
-
"img",
|
|
73500
|
-
{
|
|
73501
|
-
src: line.supervisorImage,
|
|
73502
|
-
alt: line.supervisor,
|
|
73503
|
-
className: "w-full h-full object-cover"
|
|
73504
|
-
}
|
|
73505
|
-
) : /* @__PURE__ */ jsxRuntime.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) }) }),
|
|
73506
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
73507
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }) }),
|
|
73508
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-slate-400 font-medium", children: line.supervisor }) })
|
|
73509
|
-
] })
|
|
73510
|
-
] }),
|
|
73511
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 shrink-0 justify-start min-w-[110px]", children: [
|
|
73512
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[15px] font-bold text-slate-800", children: [
|
|
73513
|
-
line.efficiency,
|
|
73514
|
-
"%"
|
|
73515
|
-
] }),
|
|
73516
|
-
line.delta !== null && line.delta !== void 0 && Number.isFinite(line.delta) ? /* @__PURE__ */ jsxRuntime.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: [
|
|
73517
|
-
line.delta >= 0 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3 h-3", strokeWidth: 2.5 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3 h-3", strokeWidth: 2.5 }),
|
|
73518
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-bold", children: lineDelta.text.split(" vs ")[0].replace("+", "") })
|
|
73519
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-slate-50 text-slate-400", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-bold", children: "\u2014" }) })
|
|
73520
|
-
] })
|
|
73521
|
-
] })
|
|
73522
|
-
},
|
|
73523
|
-
line.id
|
|
73524
|
-
);
|
|
73525
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: `No ${poorestLineMode} line data available` })
|
|
73526
|
-
] }) })
|
|
73527
|
-
] }),
|
|
73528
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
73529
|
-
"div",
|
|
75843
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75844
|
+
PoorestPerformersCard,
|
|
73530
75845
|
{
|
|
73531
|
-
|
|
73532
|
-
|
|
73533
|
-
|
|
73534
|
-
|
|
73535
|
-
|
|
73536
|
-
|
|
73537
|
-
|
|
73538
|
-
|
|
73539
|
-
|
|
73540
|
-
|
|
73541
|
-
|
|
73542
|
-
hideTotalDuration: true
|
|
73543
|
-
}
|
|
73544
|
-
) })
|
|
73545
|
-
]
|
|
75846
|
+
store,
|
|
75847
|
+
supervisorsByLineId,
|
|
75848
|
+
onViewAll: handleViewAllPoorestPerformers,
|
|
75849
|
+
onLineClick: handleOpenLineMonthlyHistory
|
|
75850
|
+
}
|
|
75851
|
+
),
|
|
75852
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75853
|
+
IdleBreakdownCard,
|
|
75854
|
+
{
|
|
75855
|
+
store,
|
|
75856
|
+
scopedLineCount: scopedLineIds.length
|
|
73546
75857
|
}
|
|
73547
75858
|
)
|
|
73548
75859
|
] }),
|
|
73549
75860
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-rows-1 xl:grid-rows-2 gap-5 min-h-0", children: [
|
|
73550
|
-
/* @__PURE__ */ jsxRuntime.
|
|
73551
|
-
|
|
75861
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75862
|
+
EfficiencyTrendCard,
|
|
73552
75863
|
{
|
|
73553
|
-
|
|
73554
|
-
|
|
73555
|
-
|
|
73556
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 w-full p-4 pt-4 relative", children: isTrendLoading ? /* @__PURE__ */ jsxRuntime.jsx(OverviewChartSkeleton, {}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pb-2 pr-4 pl-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
73557
|
-
LineChart,
|
|
73558
|
-
{
|
|
73559
|
-
data: trendData,
|
|
73560
|
-
lines: efficiencyLineConfig,
|
|
73561
|
-
xAxisDataKey: "name",
|
|
73562
|
-
yAxisUnit: "%",
|
|
73563
|
-
yAxisDomain: [0, 100],
|
|
73564
|
-
showLegend: false,
|
|
73565
|
-
showGrid: true,
|
|
73566
|
-
fillContainer: true,
|
|
73567
|
-
tooltipLabelFormatter: trendTooltipLabelFormatter
|
|
73568
|
-
},
|
|
73569
|
-
trendPlayKey
|
|
73570
|
-
) }) })
|
|
73571
|
-
]
|
|
75864
|
+
store,
|
|
75865
|
+
dateRange,
|
|
75866
|
+
appTimezone
|
|
73572
75867
|
}
|
|
73573
75868
|
),
|
|
73574
|
-
/* @__PURE__ */ jsxRuntime.
|
|
73575
|
-
|
|
73576
|
-
|
|
73577
|
-
|
|
73578
|
-
|
|
73579
|
-
|
|
73580
|
-
|
|
73581
|
-
|
|
73582
|
-
|
|
73583
|
-
navigate("/improvement-center");
|
|
73584
|
-
},
|
|
73585
|
-
className: "text-[11px] font-bold text-slate-500 hover:text-slate-800 transition-colors",
|
|
73586
|
-
children: "View All"
|
|
73587
|
-
}
|
|
73588
|
-
)
|
|
73589
|
-
] }),
|
|
73590
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-0 flex flex-col px-5 py-2 justify-start overflow-auto", children: isImprovementsLoading ? /* @__PURE__ */ jsxRuntime.jsx(OverviewImprovementsSkeleton, {}) : displayImprovements.length > 0 ? displayImprovements.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
73591
|
-
"div",
|
|
73592
|
-
{
|
|
73593
|
-
"data-testid": `plant-head-improvement-${item.issueId}`,
|
|
73594
|
-
onClick: () => {
|
|
73595
|
-
trackCoreEvent("Operations Overview Improvement Clicked", {
|
|
73596
|
-
issue_id: item.issueId,
|
|
73597
|
-
issue_number: item.issueNumber,
|
|
73598
|
-
title: item.title
|
|
73599
|
-
});
|
|
73600
|
-
const params = new URLSearchParams({
|
|
73601
|
-
focusIssueId: item.issueId
|
|
73602
|
-
});
|
|
73603
|
-
navigate(`/improvement-center?${params.toString()}`);
|
|
73604
|
-
},
|
|
73605
|
-
className: "flex items-center justify-between py-3 border-b border-slate-50 last:border-0 group cursor-pointer",
|
|
73606
|
-
children: [
|
|
73607
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0 pr-4", children: [
|
|
73608
|
-
item.ticketLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.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 }) }),
|
|
73609
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
73610
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 min-w-0 mb-0.5", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-[13px] font-semibold text-slate-800 truncate transition-colors group-hover:text-indigo-600", children: item.title }) }),
|
|
73611
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
73612
|
-
"p",
|
|
73613
|
-
{
|
|
73614
|
-
className: "text-[10px] font-medium text-slate-400 truncate",
|
|
73615
|
-
title: item.metadataLabel,
|
|
73616
|
-
children: item.metadataLabel
|
|
73617
|
-
}
|
|
73618
|
-
)
|
|
73619
|
-
] })
|
|
73620
|
-
] }),
|
|
73621
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end flex-shrink-0 ml-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
73622
|
-
"span",
|
|
73623
|
-
{
|
|
73624
|
-
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"}`,
|
|
73625
|
-
children: [
|
|
73626
|
-
(item.metric.includes("pcs / day") || item.metric.includes("gain")) && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-3 w-3" }),
|
|
73627
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: item.metric })
|
|
73628
|
-
]
|
|
73629
|
-
}
|
|
73630
|
-
) })
|
|
73631
|
-
]
|
|
73632
|
-
},
|
|
73633
|
-
item.id
|
|
73634
|
-
)) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-8 text-center text-sm text-slate-400", children: "No open improvement issues" }) })
|
|
73635
|
-
] })
|
|
75869
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75870
|
+
TopImprovementsCard,
|
|
75871
|
+
{
|
|
75872
|
+
store,
|
|
75873
|
+
supervisorsByLineId,
|
|
75874
|
+
onViewAll: handleViewAllImprovements,
|
|
75875
|
+
onItemClick: handleOpenImprovement
|
|
75876
|
+
}
|
|
75877
|
+
)
|
|
73636
75878
|
] })
|
|
73637
75879
|
] })
|
|
73638
75880
|
] })
|
|
@@ -74358,6 +76600,18 @@ exports.awardsService = awardsService;
|
|
|
74358
76600
|
exports.buildDateKey = buildDateKey;
|
|
74359
76601
|
exports.buildKPIsFromLineMetricsRow = buildKPIsFromLineMetricsRow;
|
|
74360
76602
|
exports.buildShiftGroupsKey = buildShiftGroupsKey;
|
|
76603
|
+
exports.canRoleAccessDashboardPath = canRoleAccessDashboardPath;
|
|
76604
|
+
exports.canRoleAccessTeamManagement = canRoleAccessTeamManagement;
|
|
76605
|
+
exports.canRoleAssignFactories = canRoleAssignFactories;
|
|
76606
|
+
exports.canRoleAssignLines = canRoleAssignLines;
|
|
76607
|
+
exports.canRoleChangeRole = canRoleChangeRole;
|
|
76608
|
+
exports.canRoleInviteRole = canRoleInviteRole;
|
|
76609
|
+
exports.canRoleManageCompany = canRoleManageCompany;
|
|
76610
|
+
exports.canRoleManageTargets = canRoleManageTargets;
|
|
76611
|
+
exports.canRoleManageUsers = canRoleManageUsers;
|
|
76612
|
+
exports.canRoleRemoveUser = canRoleRemoveUser;
|
|
76613
|
+
exports.canRoleViewClipsCost = canRoleViewClipsCost;
|
|
76614
|
+
exports.canRoleViewUsageStats = canRoleViewUsageStats;
|
|
74361
76615
|
exports.captureSentryException = captureSentryException;
|
|
74362
76616
|
exports.captureSentryMessage = captureSentryMessage;
|
|
74363
76617
|
exports.checkRateLimit = checkRateLimit2;
|
|
@@ -74401,6 +76655,8 @@ exports.getAllThreadMessages = getAllThreadMessages;
|
|
|
74401
76655
|
exports.getAllWorkspaceDisplayNamesAsync = getAllWorkspaceDisplayNamesAsync;
|
|
74402
76656
|
exports.getAllWorkspaceDisplayNamesSnapshot = getAllWorkspaceDisplayNamesSnapshot;
|
|
74403
76657
|
exports.getAnonClient = getAnonClient;
|
|
76658
|
+
exports.getAssignableRoles = getAssignableRoles;
|
|
76659
|
+
exports.getAssignmentColumnLabel = getAssignmentColumnLabel;
|
|
74404
76660
|
exports.getAvailableShiftIds = getAvailableShiftIds;
|
|
74405
76661
|
exports.getAwardBadgeType = getAwardBadgeType;
|
|
74406
76662
|
exports.getAwardDescription = getAwardDescription;
|
|
@@ -74432,6 +76688,11 @@ exports.getMonthWeekRanges = getMonthWeekRanges;
|
|
|
74432
76688
|
exports.getNextUpdateInterval = getNextUpdateInterval;
|
|
74433
76689
|
exports.getOperationalDate = getOperationalDate;
|
|
74434
76690
|
exports.getReasonColor = getReasonColor;
|
|
76691
|
+
exports.getRoleAssignmentKind = getRoleAssignmentKind;
|
|
76692
|
+
exports.getRoleDescription = getRoleDescription;
|
|
76693
|
+
exports.getRoleLabel = getRoleLabel;
|
|
76694
|
+
exports.getRoleMetadata = getRoleMetadata;
|
|
76695
|
+
exports.getRoleNavPaths = getRoleNavPaths;
|
|
74435
76696
|
exports.getS3SignedUrl = getS3SignedUrl;
|
|
74436
76697
|
exports.getS3VideoSrc = getS3VideoSrc;
|
|
74437
76698
|
exports.getShiftData = getShiftData;
|
|
@@ -74446,6 +76707,7 @@ exports.getThreadMessages = getThreadMessages;
|
|
|
74446
76707
|
exports.getUniformShiftGroup = getUniformShiftGroup;
|
|
74447
76708
|
exports.getUserThreads = getUserThreads;
|
|
74448
76709
|
exports.getUserThreadsPaginated = getUserThreadsPaginated;
|
|
76710
|
+
exports.getVisibleRolesForCurrentUser = getVisibleRolesForCurrentUser;
|
|
74449
76711
|
exports.getWorkspaceDisplayName = getWorkspaceDisplayName;
|
|
74450
76712
|
exports.getWorkspaceDisplayNameAsync = getWorkspaceDisplayNameAsync;
|
|
74451
76713
|
exports.getWorkspaceDisplayNamesMap = getWorkspaceDisplayNamesMap;
|
|
@@ -74456,10 +76718,12 @@ exports.hasAnyShiftData = hasAnyShiftData;
|
|
|
74456
76718
|
exports.identifyCoreUser = identifyCoreUser;
|
|
74457
76719
|
exports.initializeCoreMixpanel = initializeCoreMixpanel;
|
|
74458
76720
|
exports.isEfficiencyOnTrack = isEfficiencyOnTrack;
|
|
76721
|
+
exports.isFactoryScopedRole = isFactoryScopedRole;
|
|
74459
76722
|
exports.isFullMonthRange = isFullMonthRange;
|
|
74460
76723
|
exports.isLegacyConfiguration = isLegacyConfiguration;
|
|
74461
76724
|
exports.isPrefetchError = isPrefetchError;
|
|
74462
76725
|
exports.isSafari = isSafari;
|
|
76726
|
+
exports.isSupervisorRole = isSupervisorRole;
|
|
74463
76727
|
exports.isTransitionPeriod = isTransitionPeriod;
|
|
74464
76728
|
exports.isUrlPermanentlyFailed = isUrlPermanentlyFailed;
|
|
74465
76729
|
exports.isValidFactoryViewConfiguration = isValidFactoryViewConfiguration;
|
|
@@ -74475,6 +76739,7 @@ exports.linesService = linesService;
|
|
|
74475
76739
|
exports.mergeWithDefaultConfig = mergeWithDefaultConfig;
|
|
74476
76740
|
exports.migrateLegacyConfiguration = migrateLegacyConfiguration;
|
|
74477
76741
|
exports.normalizeDateKeyRange = normalizeDateKeyRange;
|
|
76742
|
+
exports.normalizeRoleLevel = normalizeRoleLevel;
|
|
74478
76743
|
exports.optifyeAgentClient = optifyeAgentClient;
|
|
74479
76744
|
exports.parseDateKeyToDate = parseDateKeyToDate;
|
|
74480
76745
|
exports.parseS3Uri = parseS3Uri;
|