@luxonis/visualizer-protobuf 2.68.9 → 2.68.11
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/{FoxgloveServer-h5m-pXp3.js → FoxgloveServer-VUfAN9DL.js} +1 -1
- package/dist/{communicator-Ch92rcoU.js → communicator-CuoUie5N.js} +1 -1
- package/dist/{depth-CFY2W_Vf.js → depth-BEHWbtlK.js} +100 -100
- package/dist/{deserialization.worker-DAmdYYfb.js → deserialization.worker-D008oVyM.js} +69 -5
- package/dist/{foxglove-protocol-BSYuI-q2.js → foxglove-protocol-DuBdoM6O.js} +1 -1
- package/dist/{index-DDDjobHa.js → index-BArQYoU9.js} +5 -5
- package/dist/{index-BNBWBozz.js → index-BLTVlMYq.js} +87 -66
- package/dist/{index-Cdlw1aEs.js → index-BMFcDdUF.js} +5 -5
- package/dist/{index-CYJDY0hm.js → index-BNURNYen.js} +2 -2
- package/dist/{index-zByIDaZX.js → index-BSk15OjZ.js} +5 -5
- package/dist/{index-DIURVs0D.js → index-BZVFtqfI.js} +5 -5
- package/dist/{index-BsdHlfPa.js → index-BwKQxvNs.js} +5 -5
- package/dist/{index-nKZICw68.js → index-C2eC_Z31.js} +5 -5
- package/dist/{index-D9015yOi.js → index-C6LkfXti.js} +5 -5
- package/dist/{index-DRAiJ5eq.js → index-CaDtC7cf.js} +5 -5
- package/dist/{index-CmXHlFr5.js → index-DAbjHYTG.js} +5 -5
- package/dist/{index-G6SeoqDQ.js → index-DDSbdCDA.js} +5 -5
- package/dist/{index-s9z7OIka.js → index-DFrPDKFQ.js} +5 -5
- package/dist/{index-Dbjyr-nz.js → index-DLslize8.js} +5 -5
- package/dist/{index-DPh189Gb.js → index-DansK6hP.js} +7 -7
- package/dist/{index-B6CSn3bW.js → index-Decu1Mne.js} +5 -5
- package/dist/{index-DTsPOb8D.js → index-TsjtsSmF.js} +5 -5
- package/dist/{index-Bi1G4sZj.js → index-cih1vOnj.js} +5 -5
- package/dist/{index-AY6RFcAW.js → index-wxnOzmSh.js} +314 -118
- package/dist/{index-CN1AoOwZ.js → index-zc95naqv.js} +5 -5
- package/dist/index.js +5 -5
- package/dist/lib/src/components/PanelToolbar.d.ts.map +1 -1
- package/dist/lib/src/components/PanelToolbar.js.map +1 -1
- package/dist/lib/src/messaging/deserialization/video/h264.d.ts.map +1 -1
- package/dist/lib/src/messaging/deserialization/video/h264.js +58 -2
- package/dist/lib/src/messaging/deserialization/video/h264.js.map +1 -1
- package/dist/lib/src/protobuf.generated/EncodedFrame.js +1 -1
- package/dist/lib/src/protobuf.generated/EncodedFrame.js.map +1 -1
- package/dist/lib/src/protobuf.generated/Event.js +1 -1
- package/dist/lib/src/protobuf.generated/Event.js.map +1 -1
- package/dist/lib/src/protobuf.generated/IMUData.js +1 -1
- package/dist/lib/src/protobuf.generated/IMUData.js.map +1 -1
- package/dist/lib/src/protobuf.generated/ImageAnnotations.js +1 -1
- package/dist/lib/src/protobuf.generated/ImageAnnotations.js.map +1 -1
- package/dist/lib/src/protobuf.generated/ImgDetections.js +1 -1
- package/dist/lib/src/protobuf.generated/ImgDetections.js.map +1 -1
- package/dist/lib/src/protobuf.generated/ImgFrame.js +1 -1
- package/dist/lib/src/protobuf.generated/ImgFrame.js.map +1 -1
- package/dist/lib/src/protobuf.generated/PointCloudData.js +1 -1
- package/dist/lib/src/protobuf.generated/PointCloudData.js.map +1 -1
- package/dist/lib/src/protobuf.generated/SpatialImgDetections.js +1 -1
- package/dist/lib/src/protobuf.generated/SpatialImgDetections.js.map +1 -1
- package/dist/lib/src/protobuf.generated/common.js +1 -1
- package/dist/lib/src/protobuf.generated/common.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/RendererOverlay.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/RendererOverlay.js +9 -14
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/RendererOverlay.js.map +1 -1
- package/dist/{protobuf-BFCtaU7c.js → protobuf-CUXoOgMk.js} +8 -8
- package/dist/{worker-BaUgfqvr.js → worker-B98aztFc.js} +4 -4
- package/dist/{worker-BpVhgPF8.js → worker-BKBqfM0E.js} +3 -3
- package/package.json +1 -1
- package/dist/packages/studio-base/src/hooks/usePanelMousePresence.d.ts +0 -9
- package/dist/packages/studio-base/src/hooks/usePanelMousePresence.d.ts.map +0 -1
- package/dist/packages/studio-base/src/hooks/usePanelMousePresence.js +0 -40
- package/dist/packages/studio-base/src/hooks/usePanelMousePresence.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as protobufsBySchema } from './protobuf-
|
|
1
|
+
import { p as protobufsBySchema } from './protobuf-CUXoOgMk.js';
|
|
2
2
|
import { r as recordToDataView } from './encoding-DqlhpFR2.js';
|
|
3
3
|
|
|
4
4
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -2,7 +2,7 @@ import { w as wrap, t as transfer } from './comlink-CsH1ih07.js';
|
|
|
2
2
|
import { useContext, useRef, useLayoutEffect, createContext, useReducer, useState, useCallback } from 'react';
|
|
3
3
|
import 'zustand';
|
|
4
4
|
import { isParent, getLeaves, createRemoveUpdate, updateTree, getNodeAtPath } from 'react-mosaic-component';
|
|
5
|
-
import { c as commonjsGlobal, g as getDefaultExportFromCjs, T as Type } from './protobuf-
|
|
5
|
+
import { c as commonjsGlobal, g as getDefaultExportFromCjs, T as Type } from './protobuf-CUXoOgMk.js';
|
|
6
6
|
import { useTheme } from '@mui/material';
|
|
7
7
|
import { k as isObjectLike, l as baseGetTag, S as Symbol$1, i as isArray, m as getNative, r as root, n as overArg, g as isPrototype, c as isArrayLike, p as arrayLikeKeys, M as MapCache, f as isArguments, t as toSource, q as Map$1, u as eq, U as Uint8Array, d as isBuffer, v as Stack, e as isTypedArray, h as isObject, w as isLength, j as isIndex, x as identity, y as baseFor, b as baseRest, a as isArrayLikeObject } from './isArrayLikeObject-Bytw9p-q.js';
|
|
8
8
|
|
|
@@ -540,90 +540,6 @@ var Logger$1 = Logger.default;
|
|
|
540
540
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
541
541
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
542
542
|
|
|
543
|
-
const log$6 = Logger$1.getLogger("src/index.ts");
|
|
544
|
-
/**
|
|
545
|
-
* Values of the contants below are a (more or less) informed guesses and not guaranteed to be accurate.
|
|
546
|
-
*/
|
|
547
|
-
const COMPRESSED_POINTER_SIZE = 4; // Pointers use 4 bytes (also on 64-bit systems) due to pointer compression
|
|
548
|
-
const OBJECT_BASE_SIZE = 3 * COMPRESSED_POINTER_SIZE; // 3 compressed pointers
|
|
549
|
-
// Arrays have an additional length property (1 pointer) and a backing store header (2 pointers)
|
|
550
|
-
// See https://stackoverflow.com/a/70550693.
|
|
551
|
-
const ARRAY_BASE_SIZE = OBJECT_BASE_SIZE + 3 * COMPRESSED_POINTER_SIZE;
|
|
552
|
-
const TYPED_ARRAY_BASE_SIZE = 25 * COMPRESSED_POINTER_SIZE; // byteLength, byteOffset, ..., see https://stackoverflow.com/a/45808835
|
|
553
|
-
const SMALL_INTEGER_SIZE = COMPRESSED_POINTER_SIZE; // Small integers (up to 31 bits), pointer tagging
|
|
554
|
-
const HEAP_NUMBER_SIZE = 8 + 2 * COMPRESSED_POINTER_SIZE; // 4-byte map pointer + 8-byte payload + property pointer
|
|
555
|
-
const MAX_NUM_FAST_PROPERTIES = 1020;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Estimate the size in bytes of an arbitrary object or primitive.
|
|
559
|
-
* @param obj Object or primitive to estimate the size for
|
|
560
|
-
* @returns Estimated size in bytes
|
|
561
|
-
*/
|
|
562
|
-
function estimateObjectSize(obj) {
|
|
563
|
-
// catches null and undefined
|
|
564
|
-
// typeof null == "object"
|
|
565
|
-
if (obj == undefined) {
|
|
566
|
-
return SMALL_INTEGER_SIZE;
|
|
567
|
-
}
|
|
568
|
-
switch (typeof obj) {
|
|
569
|
-
case "undefined":
|
|
570
|
-
case "boolean":
|
|
571
|
-
{
|
|
572
|
-
return SMALL_INTEGER_SIZE;
|
|
573
|
-
}
|
|
574
|
-
case "number":
|
|
575
|
-
{
|
|
576
|
-
return Number.isInteger(obj) ? SMALL_INTEGER_SIZE : HEAP_NUMBER_SIZE;
|
|
577
|
-
}
|
|
578
|
-
case "bigint":
|
|
579
|
-
{
|
|
580
|
-
return HEAP_NUMBER_SIZE;
|
|
581
|
-
}
|
|
582
|
-
case "string":
|
|
583
|
-
{
|
|
584
|
-
// The string length is rounded up to the next multiple of 4.
|
|
585
|
-
return COMPRESSED_POINTER_SIZE + OBJECT_BASE_SIZE + Math.ceil(obj.length / 4) * 4;
|
|
586
|
-
}
|
|
587
|
-
case "object":
|
|
588
|
-
{
|
|
589
|
-
if (Array.isArray(obj)) {
|
|
590
|
-
return COMPRESSED_POINTER_SIZE + ARRAY_BASE_SIZE + Object.values(obj).reduce((acc, val) => acc + estimateObjectSize(val), 0);
|
|
591
|
-
} else if (ArrayBuffer.isView(obj)) {
|
|
592
|
-
return TYPED_ARRAY_BASE_SIZE + obj.byteLength;
|
|
593
|
-
} else if (obj instanceof Set) {
|
|
594
|
-
return COMPRESSED_POINTER_SIZE + OBJECT_BASE_SIZE + Array.from(obj.values()).reduce((acc, val) => acc + estimateObjectSize(val), 0);
|
|
595
|
-
} else if (obj instanceof Map) {
|
|
596
|
-
return COMPRESSED_POINTER_SIZE + OBJECT_BASE_SIZE + Array.from(obj.entries()).reduce((acc, [key, val]) => acc + estimateObjectSize(key) + estimateObjectSize(val), 0);
|
|
597
|
-
}
|
|
598
|
-
let propertiesSize = 0;
|
|
599
|
-
const numProps = Object.keys(obj).length;
|
|
600
|
-
if (numProps > MAX_NUM_FAST_PROPERTIES) {
|
|
601
|
-
// If there are too many properties, V8 stores Objects in dictionary mode (slow properties)
|
|
602
|
-
// with each object having a self-contained dictionary. This dictionary contains the key, value
|
|
603
|
-
// and details of properties. Below we estimate the size of this additional dictionary. Formula
|
|
604
|
-
// adapted from
|
|
605
|
-
// medium.com/@bpmxmqd/v8-engine-jsobject-structure-analysis-and-memory-optimization-ideas-be30cfcdcd16
|
|
606
|
-
const propertiesDictSize = 16 + 5 * 8 + 2 ** Math.ceil(Math.log2((numProps + 2) * 1.5)) * 3 * 4;
|
|
607
|
-
// In return, properties are no longer stored in the properties array, so we subtract that.
|
|
608
|
-
propertiesSize = propertiesDictSize - numProps * COMPRESSED_POINTER_SIZE;
|
|
609
|
-
}
|
|
610
|
-
const valuesSize = Object.values(obj).reduce((acc, val) => acc + estimateObjectSize(val), 0);
|
|
611
|
-
return OBJECT_BASE_SIZE + propertiesSize + valuesSize;
|
|
612
|
-
}
|
|
613
|
-
case "symbol":
|
|
614
|
-
case "function":
|
|
615
|
-
{
|
|
616
|
-
throw new Error(`Can't estimate size of type '${typeof obj}'`);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
log$6.error(`Can't estimate size of type '${typeof obj}'`);
|
|
620
|
-
return SMALL_INTEGER_SIZE;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
624
|
-
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
625
|
-
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
626
|
-
|
|
627
543
|
const globalWithHandler = global;
|
|
628
544
|
|
|
629
545
|
/**
|
|
@@ -2645,11 +2561,11 @@ function useGuaranteedContext(contextType, debugContextName) {
|
|
|
2645
2561
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
2646
2562
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
2647
2563
|
|
|
2648
|
-
const log$
|
|
2564
|
+
const log$6 = Logger$1.getLogger("src/index.ts");
|
|
2649
2565
|
const useMustNotChangeImpl = value => {
|
|
2650
2566
|
const valueRef = useRef(value);
|
|
2651
2567
|
if (valueRef.current !== value) {
|
|
2652
|
-
log$
|
|
2568
|
+
log$6.error("Value must not change", valueRef.current);
|
|
2653
2569
|
}
|
|
2654
2570
|
valueRef.current = value;
|
|
2655
2571
|
};
|
|
@@ -2681,12 +2597,12 @@ function useShallowMemo(value) {
|
|
|
2681
2597
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
2682
2598
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
2683
2599
|
|
|
2684
|
-
const log$
|
|
2600
|
+
const log$5 = Logger$1.getLogger("src/index.ts");
|
|
2685
2601
|
const noOpImpl = () => {};
|
|
2686
2602
|
function useValueChangedDebugLogImpl(value, msg) {
|
|
2687
2603
|
const prevValue = useRef(value);
|
|
2688
2604
|
if (prevValue.current !== value) {
|
|
2689
|
-
log$
|
|
2605
|
+
log$5.debug(`value changed: ${msg}`);
|
|
2690
2606
|
}
|
|
2691
2607
|
useLayoutEffect(() => {
|
|
2692
2608
|
prevValue.current = value;
|
|
@@ -2703,7 +2619,7 @@ const useValueChangedDebugLog = process.env.NODE_ENV !== "development" && proces
|
|
|
2703
2619
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2704
2620
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
2705
2621
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
2706
|
-
const log$
|
|
2622
|
+
const log$4 = Logger$1.getLogger("src/index.ts");
|
|
2707
2623
|
|
|
2708
2624
|
// useWarnImmediateReRender will warn if the component re-renders before the next animation frame
|
|
2709
2625
|
// This typically indicates that the component state is changing in rapid succession and more
|
|
@@ -2715,7 +2631,7 @@ process.env.NODE_ENV !== "development" ? () => {} : () => {
|
|
|
2715
2631
|
const renderedRef = useRef(false);
|
|
2716
2632
|
useLayoutEffect(() => {
|
|
2717
2633
|
if (renderedRef.current) {
|
|
2718
|
-
log$
|
|
2634
|
+
log$4.warn("Component re-rendered immediately");
|
|
2719
2635
|
}
|
|
2720
2636
|
renderedRef.current = true;
|
|
2721
2637
|
const raf = requestAnimationFrame(() => {
|
|
@@ -2736,13 +2652,13 @@ Logger$1.getLogger("src/index.ts");
|
|
|
2736
2652
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2737
2653
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
2738
2654
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
2739
|
-
const log$
|
|
2655
|
+
const log$3 = Logger$1.getLogger("src/index.ts");
|
|
2740
2656
|
function selectWithUnstableIdentityWarning(value, selector) {
|
|
2741
2657
|
const result = selector(value);
|
|
2742
2658
|
if (process.env.NODE_ENV === "development") {
|
|
2743
2659
|
const secondResult = selector(value);
|
|
2744
2660
|
if (result !== secondResult) {
|
|
2745
|
-
log$
|
|
2661
|
+
log$3.warn(`Selector ${selector.toString()} produced different values for the same input.
|
|
2746
2662
|
This will cause unecesessery re-renders of your component.`);
|
|
2747
2663
|
}
|
|
2748
2664
|
return secondResult;
|
|
@@ -2878,7 +2794,7 @@ const TAB_PANEL_TYPE = "Tab";
|
|
|
2878
2794
|
// This source code is licensed under the Apache License, Version 2.0,
|
|
2879
2795
|
// found at http://www.apache.org/licenses/LICENSE-2.0
|
|
2880
2796
|
// You may not use this file except in compliance with the License.
|
|
2881
|
-
const log$
|
|
2797
|
+
const log$2 = Logger$1.getLogger("src/index.ts");
|
|
2882
2798
|
|
|
2883
2799
|
/** Key injected into panel configs for user-selected title (overrides setDefaultPanelTitle) */
|
|
2884
2800
|
const PANEL_TITLE_CONFIG_KEY = "foxglovePanelTitle";
|
|
@@ -3096,13 +3012,13 @@ const validateTabPanelConfig = config => {
|
|
|
3096
3012
|
}
|
|
3097
3013
|
if (!Array.isArray(config.tabs) || typeof config.activeTabIdx !== "number") {
|
|
3098
3014
|
const error = new Error("A non-Tab panel config is being operated on as if it were a Tab panel.");
|
|
3099
|
-
log$
|
|
3015
|
+
log$2.info(`Invalid Tab panel config: ${error.message}`, config);
|
|
3100
3016
|
reportError(error);
|
|
3101
3017
|
return false;
|
|
3102
3018
|
}
|
|
3103
3019
|
if (config.activeTabIdx >= config.tabs.length) {
|
|
3104
3020
|
const error = new Error("A Tab panel has an activeTabIdx for a nonexistent tab.");
|
|
3105
|
-
log$
|
|
3021
|
+
log$2.info(`Invalid Tab panel config: ${error.message}`, config);
|
|
3106
3022
|
reportError(error);
|
|
3107
3023
|
return false;
|
|
3108
3024
|
}
|
|
@@ -3370,7 +3286,7 @@ function toggleSelectedPanel(panelId, containingTabId, configById, selectedPanel
|
|
|
3370
3286
|
* part of a saved "layout") used by the current workspace.
|
|
3371
3287
|
*/
|
|
3372
3288
|
|
|
3373
|
-
const log = Logger$1.getLogger("src/index.ts");
|
|
3289
|
+
const log$1 = Logger$1.getLogger("src/index.ts");
|
|
3374
3290
|
const CurrentLayoutContext = /*#__PURE__*/createContext(undefined);
|
|
3375
3291
|
CurrentLayoutContext.displayName = "CurrentLayoutContext";
|
|
3376
3292
|
function usePanelMosaicId() {
|
|
@@ -3385,7 +3301,7 @@ function useCurrentLayoutSelector(selector) {
|
|
|
3385
3301
|
|
|
3386
3302
|
// Catch locations using unstable function selectors
|
|
3387
3303
|
useShouldNotChangeOften(selector, () => {
|
|
3388
|
-
log.warn("useCurrentLayoutSelector is changing frequently. Rewrite your selector as a stable function.");
|
|
3304
|
+
log$1.warn("useCurrentLayoutSelector is changing frequently. Rewrite your selector as a stable function.");
|
|
3389
3305
|
});
|
|
3390
3306
|
const state = useRef(undefined);
|
|
3391
3307
|
if (!state.current || selector !== state.current.selector) {
|
|
@@ -4085,6 +4001,91 @@ var tslib_es6$1 = /*#__PURE__*/Object.freeze({
|
|
|
4085
4001
|
default: tslib_es6
|
|
4086
4002
|
});
|
|
4087
4003
|
|
|
4004
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
4005
|
+
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
4006
|
+
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
4007
|
+
const log = Logger$1.getLogger("src/index.ts");
|
|
4008
|
+
/**
|
|
4009
|
+
* Values of the contants below are a (more or less) informed guesses and not guaranteed to be accurate.
|
|
4010
|
+
*/
|
|
4011
|
+
const COMPRESSED_POINTER_SIZE = 4; // Pointers use 4 bytes (also on 64-bit systems) due to pointer compression
|
|
4012
|
+
const OBJECT_BASE_SIZE = 3 * COMPRESSED_POINTER_SIZE; // 3 compressed pointers
|
|
4013
|
+
// Arrays have an additional length property (1 pointer) and a backing store header (2 pointers)
|
|
4014
|
+
// See https://stackoverflow.com/a/70550693.
|
|
4015
|
+
const ARRAY_BASE_SIZE = OBJECT_BASE_SIZE + 3 * COMPRESSED_POINTER_SIZE;
|
|
4016
|
+
const TYPED_ARRAY_BASE_SIZE = 25 * COMPRESSED_POINTER_SIZE; // byteLength, byteOffset, ..., see https://stackoverflow.com/a/45808835
|
|
4017
|
+
const SMALL_INTEGER_SIZE = COMPRESSED_POINTER_SIZE; // Small integers (up to 31 bits), pointer tagging
|
|
4018
|
+
const HEAP_NUMBER_SIZE = 8 + 2 * COMPRESSED_POINTER_SIZE; // 4-byte map pointer + 8-byte payload + property pointer
|
|
4019
|
+
const MAX_NUM_FAST_PROPERTIES = 1020;
|
|
4020
|
+
/**
|
|
4021
|
+
* Estimate the size in bytes of an arbitrary object or primitive.
|
|
4022
|
+
* @param obj Object or primitive to estimate the size for
|
|
4023
|
+
* @returns Estimated size in bytes
|
|
4024
|
+
*/
|
|
4025
|
+
function estimateObjectSize(obj) {
|
|
4026
|
+
// catches null and undefined
|
|
4027
|
+
// typeof null == "object"
|
|
4028
|
+
if (obj == undefined) {
|
|
4029
|
+
return SMALL_INTEGER_SIZE;
|
|
4030
|
+
}
|
|
4031
|
+
switch (typeof obj) {
|
|
4032
|
+
case "undefined":
|
|
4033
|
+
case "boolean": {
|
|
4034
|
+
return SMALL_INTEGER_SIZE;
|
|
4035
|
+
}
|
|
4036
|
+
case "number": {
|
|
4037
|
+
return Number.isInteger(obj) ? SMALL_INTEGER_SIZE : HEAP_NUMBER_SIZE;
|
|
4038
|
+
}
|
|
4039
|
+
case "bigint": {
|
|
4040
|
+
return HEAP_NUMBER_SIZE;
|
|
4041
|
+
}
|
|
4042
|
+
case "string": {
|
|
4043
|
+
// The string length is rounded up to the next multiple of 4.
|
|
4044
|
+
return COMPRESSED_POINTER_SIZE + OBJECT_BASE_SIZE + Math.ceil(obj.length / 4) * 4;
|
|
4045
|
+
}
|
|
4046
|
+
case "object": {
|
|
4047
|
+
if (Array.isArray(obj)) {
|
|
4048
|
+
return (COMPRESSED_POINTER_SIZE +
|
|
4049
|
+
ARRAY_BASE_SIZE +
|
|
4050
|
+
Object.values(obj).reduce((acc, val) => acc + estimateObjectSize(val), 0));
|
|
4051
|
+
}
|
|
4052
|
+
else if (ArrayBuffer.isView(obj)) {
|
|
4053
|
+
return TYPED_ARRAY_BASE_SIZE + obj.byteLength;
|
|
4054
|
+
}
|
|
4055
|
+
else if (obj instanceof Set) {
|
|
4056
|
+
return (COMPRESSED_POINTER_SIZE +
|
|
4057
|
+
OBJECT_BASE_SIZE +
|
|
4058
|
+
Array.from(obj.values()).reduce((acc, val) => acc + estimateObjectSize(val), 0));
|
|
4059
|
+
}
|
|
4060
|
+
else if (obj instanceof Map) {
|
|
4061
|
+
return (COMPRESSED_POINTER_SIZE +
|
|
4062
|
+
OBJECT_BASE_SIZE +
|
|
4063
|
+
Array.from(obj.entries()).reduce((acc, [key, val]) => acc + estimateObjectSize(key) + estimateObjectSize(val), 0));
|
|
4064
|
+
}
|
|
4065
|
+
let propertiesSize = 0;
|
|
4066
|
+
const numProps = Object.keys(obj).length;
|
|
4067
|
+
if (numProps > MAX_NUM_FAST_PROPERTIES) {
|
|
4068
|
+
// If there are too many properties, V8 stores Objects in dictionary mode (slow properties)
|
|
4069
|
+
// with each object having a self-contained dictionary. This dictionary contains the key, value
|
|
4070
|
+
// and details of properties. Below we estimate the size of this additional dictionary. Formula
|
|
4071
|
+
// adapted from
|
|
4072
|
+
// medium.com/@bpmxmqd/v8-engine-jsobject-structure-analysis-and-memory-optimization-ideas-be30cfcdcd16
|
|
4073
|
+
const propertiesDictSize = 16 + 5 * 8 + 2 ** Math.ceil(Math.log2((numProps + 2) * 1.5)) * 3 * 4;
|
|
4074
|
+
// In return, properties are no longer stored in the properties array, so we subtract that.
|
|
4075
|
+
propertiesSize = propertiesDictSize - numProps * COMPRESSED_POINTER_SIZE;
|
|
4076
|
+
}
|
|
4077
|
+
const valuesSize = Object.values(obj).reduce((acc, val) => acc + estimateObjectSize(val), 0);
|
|
4078
|
+
return OBJECT_BASE_SIZE + propertiesSize + valuesSize;
|
|
4079
|
+
}
|
|
4080
|
+
case "symbol":
|
|
4081
|
+
case "function": {
|
|
4082
|
+
throw new Error(`Can't estimate size of type '${typeof obj}'`);
|
|
4083
|
+
}
|
|
4084
|
+
}
|
|
4085
|
+
log.error(`Can't estimate size of type '${typeof obj}'`);
|
|
4086
|
+
return SMALL_INTEGER_SIZE;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4088
4089
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
4089
4090
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
4090
4091
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
@@ -4097,7 +4098,6 @@ var tslib_es6$1 = /*#__PURE__*/Object.freeze({
|
|
|
4097
4098
|
// This source code is licensed under the Apache License, Version 2.0,
|
|
4098
4099
|
// found at http://www.apache.org/licenses/LICENSE-2.0
|
|
4099
4100
|
// You may not use this file except in compliance with the License.
|
|
4100
|
-
|
|
4101
4101
|
Logger$1.getLogger("src/index.ts");
|
|
4102
4102
|
|
|
4103
4103
|
function fromMillis(value) {
|
|
@@ -4303,4 +4303,4 @@ function getDistanceFromDepthDataForOffset(depthData, width, height, xOffset, yO
|
|
|
4303
4303
|
return sum / count;
|
|
4304
4304
|
}
|
|
4305
4305
|
|
|
4306
|
-
export { keys as $, AppError as A,
|
|
4306
|
+
export { keys as $, AppError as A, getConfigsForNestedPanelsInsideTab as B, reorderTabWithinTabPanel as C, moveTabBetweenTabPanels as D, isTabPanelConfig as E, DEFAULT_TAB_PANEL_CONFIG as F, addPanelToTab as G, createAddUpdates as H, filterMap as I, uniq as J, useShallowMemo as K, Logger$1 as L, CurrentLayoutContext as M, MessageOrderTracker as N, AppConfigurationContext as O, __rest as P, __spreadArray as Q, getDistanceFromDepthDataForOffset as R, parseMessage as S, TAB_PANEL_TYPE as T, estimateObjectSize as U, fromMillis as V, parsePixelFormat as W, deserializeDepthFrame as X, isSymbol as Y, toString as Z, __assign as _, baseEach as a, getSymbols as a0, stubArray as a1, arrayPush as a2, baseGetAllKeys as a3, getAllKeys as a4, arrayMap as a5, baseUniq as a6, useMustNotChange as a7, useCurrentLayoutActions as a8, useCurrentLayoutSelector as a9, usePanelMosaicId as aa, useSelectedPanels as ab, PANEL_TITLE_CONFIG_KEY as ac, noop as ad, useAppConfiguration as ae, useValueChangedDebugLog as af, useJsonTreeTheme as ag, tslib_es6$1 as ah, baseFlatten as b, baseIteratee as c, dist as d, baseDifference as e, baseKeys as f, getTag as g, baseIsEqual as h, castPath as i, baseGet as j, hasIn as k, shallowequal$1 as l, getPanelIdsInsideTabPanels as m, getPanelTypeFromId as n, removePanelFromTabPanel as o, getPanelIdForType as p, getPathFromNode as q, reportError as r, sendNotification as s, toKey as t, useGuaranteedContext as u, updateTabPanelLayout as v, getSaveConfigsPayloadForAddedPanel as w, replaceAndRemovePanels as x, inlineTabPanelLayouts as y, getAllPanelIds as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { e as expose } from './comlink-CsH1ih07.js';
|
|
2
|
-
import { t as typescript } from './index-
|
|
3
|
-
import {
|
|
4
|
-
import { P as PointsAnnotationType, p as protobufsBySchema, T as Type, b as Profile } from './protobuf-
|
|
2
|
+
import { t as typescript } from './index-BNURNYen.js';
|
|
3
|
+
import { S as parseMessage, U as estimateObjectSize, V as fromMillis, d as dist, W as parsePixelFormat, X as deserializeDepthFrame } from './depth-BEHWbtlK.js';
|
|
4
|
+
import { P as PointsAnnotationType, p as protobufsBySchema, T as Type, b as Profile } from './protobuf-CUXoOgMk.js';
|
|
5
5
|
import { i as isCapableOfEncodedStream } from './encoding-DqlhpFR2.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'zustand';
|
|
@@ -816,6 +816,63 @@ function bgrxToI420(bgrx, width, height) {
|
|
|
816
816
|
}
|
|
817
817
|
return out;
|
|
818
818
|
}
|
|
819
|
+
function bgraToI420(bgra, width, height) {
|
|
820
|
+
if ((width & 1) !== 0 || (height & 1) !== 0) {
|
|
821
|
+
throw new Error("I420 requires even width and height.");
|
|
822
|
+
}
|
|
823
|
+
const ySize = width * height;
|
|
824
|
+
const uvSize = width * height >> 2;
|
|
825
|
+
const out = new Uint8Array(ySize + uvSize + uvSize);
|
|
826
|
+
const Y = out.subarray(0, ySize);
|
|
827
|
+
const U = out.subarray(ySize, ySize + uvSize);
|
|
828
|
+
const V = out.subarray(ySize + uvSize);
|
|
829
|
+
const stride = width * 4;
|
|
830
|
+
const clamp8 = x => x < 0 ? 0 : x > 255 ? 255 : x | 0;
|
|
831
|
+
for (let y = 0; y < height; y += 2) {
|
|
832
|
+
const row0 = y * stride;
|
|
833
|
+
const row1 = (y + 1) * stride;
|
|
834
|
+
for (let x = 0; x < width; x += 2) {
|
|
835
|
+
const p00 = row0 + x * 4;
|
|
836
|
+
const p01 = row0 + (x + 1) * 4;
|
|
837
|
+
const p10 = row1 + x * 4;
|
|
838
|
+
const p11 = row1 + (x + 1) * 4;
|
|
839
|
+
const B00 = bgra[p00 + 0],
|
|
840
|
+
G00 = bgra[p00 + 1],
|
|
841
|
+
R00 = bgra[p00 + 2];
|
|
842
|
+
const B01 = bgra[p01 + 0],
|
|
843
|
+
G01 = bgra[p01 + 1],
|
|
844
|
+
R01 = bgra[p01 + 2];
|
|
845
|
+
const B10 = bgra[p10 + 0],
|
|
846
|
+
G10 = bgra[p10 + 1],
|
|
847
|
+
R10 = bgra[p10 + 2];
|
|
848
|
+
const B11 = bgra[p11 + 0],
|
|
849
|
+
G11 = bgra[p11 + 1],
|
|
850
|
+
R11 = bgra[p11 + 2];
|
|
851
|
+
const Y00 = 77 * R00 + 150 * G00 + 29 * B00 + 128 >> 8;
|
|
852
|
+
const Y01 = 77 * R01 + 150 * G01 + 29 * B01 + 128 >> 8;
|
|
853
|
+
const Y10 = 77 * R10 + 150 * G10 + 29 * B10 + 128 >> 8;
|
|
854
|
+
const Y11 = 77 * R11 + 150 * G11 + 29 * B11 + 128 >> 8;
|
|
855
|
+
const yRow0 = y * width + x;
|
|
856
|
+
const yRow1 = (y + 1) * width + x;
|
|
857
|
+
Y[yRow0 + 0] = Y00;
|
|
858
|
+
Y[yRow0 + 1] = Y01;
|
|
859
|
+
Y[yRow1 + 0] = Y10;
|
|
860
|
+
Y[yRow1 + 1] = Y11;
|
|
861
|
+
const Ravg = R00 + R01 + R10 + R11 >> 2;
|
|
862
|
+
const Gavg = G00 + G01 + G10 + G11 >> 2;
|
|
863
|
+
const Bavg = B00 + B01 + B10 + B11 >> 2;
|
|
864
|
+
const Uval = clamp8((-43 * Ravg - 85 * Gavg + 128 * Bavg >> 8) + 128);
|
|
865
|
+
const Vval = clamp8((128 * Ravg - 107 * Gavg - 21 * Bavg >> 8) + 128);
|
|
866
|
+
const uvCol = x >> 1;
|
|
867
|
+
const uvRow = y >> 1;
|
|
868
|
+
const uvW = width >> 1;
|
|
869
|
+
const uvPos = uvRow * uvW + uvCol;
|
|
870
|
+
U[uvPos] = Uval;
|
|
871
|
+
V[uvPos] = Vval;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
return out;
|
|
875
|
+
}
|
|
819
876
|
function convertNv12ToI420(nv12Buffer, width, height, stride) {
|
|
820
877
|
const actualStride = stride ?? width;
|
|
821
878
|
const ySize = width * height;
|
|
@@ -875,9 +932,16 @@ function createVideoDecoder$1({
|
|
|
875
932
|
finalBuffer = bgrxToI420(bgrxBuffer, frame.codedWidth, frame.codedHeight);
|
|
876
933
|
break;
|
|
877
934
|
}
|
|
935
|
+
case "BGRA":
|
|
936
|
+
{
|
|
937
|
+
const bgraBuffer = new Uint8Array(frame.allocationSize());
|
|
938
|
+
await frame.copyTo(bgraBuffer);
|
|
939
|
+
finalBuffer = bgraToI420(bgraBuffer, frame.codedWidth, frame.codedHeight);
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
878
942
|
}
|
|
879
|
-
if (frame.format !== "I420" && frame.format !== "NV12" && frame.format !== "RGBX" && frame.format !== "BGRX") {
|
|
880
|
-
console.warn("
|
|
943
|
+
if (frame.format !== "I420" && frame.format !== "NV12" && frame.format !== "RGBX" && frame.format !== "BGRX" && frame.format !== "BGRA") {
|
|
944
|
+
console.warn("H264 decoder received unexpected frame format:", frame.format);
|
|
881
945
|
}
|
|
882
946
|
const receiveTime = topicDecoders.get(topic)?.timing.get(frame.timestamp) ?? dist.fromMicros(frame.timestamp);
|
|
883
947
|
const foxgloveMessage = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClientBinaryOpcode, B as BinaryOpcode } from './FoxgloveServer-
|
|
1
|
+
import { C as ClientBinaryOpcode, B as BinaryOpcode } from './FoxgloveServer-VUfAN9DL.js';
|
|
2
2
|
|
|
3
3
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
4
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './depth-
|
|
1
|
+
import { $ as ExternalTokenizer, V as styleTags, X as tags, a0 as LRParser, Y as LRLanguage, Q as indentNodeProp, T as continuedIndent, U as foldNodeProp, a6 as foldInside, Z as LanguageSupport } from './index-wxnOzmSh.js';
|
|
2
|
+
import './depth-BEHWbtlK.js';
|
|
3
3
|
import './comlink-CsH1ih07.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'zustand';
|
|
6
6
|
import 'react-mosaic-component';
|
|
7
|
-
import './protobuf-
|
|
7
|
+
import './protobuf-CUXoOgMk.js';
|
|
8
8
|
import 'protobufjs/minimal';
|
|
9
9
|
import '@mui/material';
|
|
10
10
|
import './isArrayLikeObject-Bytw9p-q.js';
|
|
11
11
|
import './utils-Hzt3wxhG.js';
|
|
12
|
-
import './FoxgloveServer-
|
|
12
|
+
import './FoxgloveServer-VUfAN9DL.js';
|
|
13
13
|
import 'ms';
|
|
14
|
-
import './foxglove-protocol-
|
|
14
|
+
import './foxglove-protocol-DuBdoM6O.js';
|
|
15
15
|
import 'react-dnd';
|
|
16
16
|
import 'react-dnd-html5-backend';
|
|
17
17
|
import './i18next-IYI3-Nuv.js';
|