@luxonis/visualizer-protobuf 1.8.7 → 1.8.8

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.
Files changed (51) hide show
  1. package/dist/apps/depthai-visualizer/src/connection/BaseConnection.d.ts +7 -6
  2. package/dist/apps/depthai-visualizer/src/connection/BaseConnection.d.ts.map +1 -1
  3. package/dist/apps/depthai-visualizer/src/connection/BaseConnection.js.map +1 -1
  4. package/dist/apps/depthai-visualizer/src/connection/ws/Adapter.d.ts +1 -1
  5. package/dist/apps/depthai-visualizer/src/connection/ws/Adapter.d.ts.map +1 -1
  6. package/dist/apps/depthai-visualizer/src/connection/ws/Adapter.js +6 -3
  7. package/dist/apps/depthai-visualizer/src/connection/ws/Adapter.js.map +1 -1
  8. package/dist/apps/depthai-visualizer/src/connection/ws/Connection.d.ts +6 -6
  9. package/dist/apps/depthai-visualizer/src/connection/ws/Connection.d.ts.map +1 -1
  10. package/dist/apps/depthai-visualizer/src/connection/ws/Connection.js +4 -4
  11. package/dist/apps/depthai-visualizer/src/connection/ws/Connection.js.map +1 -1
  12. package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.d.ts +83 -0
  13. package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.d.ts.map +1 -0
  14. package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.js +184 -0
  15. package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.js.map +1 -0
  16. package/dist/apps/depthai-visualizer/src/connection/ws/worker.d.ts +1 -57
  17. package/dist/apps/depthai-visualizer/src/connection/ws/worker.d.ts.map +1 -1
  18. package/dist/apps/depthai-visualizer/src/connection/ws/worker.js +2 -171
  19. package/dist/apps/depthai-visualizer/src/connection/ws/worker.js.map +1 -1
  20. package/dist/apps/depthai-visualizer/src/index.d.ts +3 -4
  21. package/dist/apps/depthai-visualizer/src/index.d.ts.map +1 -1
  22. package/dist/apps/depthai-visualizer/src/index.js +1 -2
  23. package/dist/apps/depthai-visualizer/src/index.js.map +1 -1
  24. package/dist/{index-BuuOsI5x.js → index-0Q6EqxBW.js} +7 -4
  25. package/dist/{index-PRD8Vx5h.js → index-BBXW7Wxj.js} +33 -448
  26. package/dist/{index-ByXG8O46.js → index-Bpjac43y.js} +4 -2
  27. package/dist/{index-BKodwqoN.js → index-CF21cEJo.js} +4 -2
  28. package/dist/{index-DY872ZDo.js → index-CbLiW7lk.js} +4 -2
  29. package/dist/{index-BgXnyRS5.js → index-Cl5tDqdc.js} +4 -2
  30. package/dist/{index-BYKYHdD1.js → index-DAPJpbdc.js} +4 -2
  31. package/dist/{index-DbBAYYLN.js → index-DCbNqqQc.js} +4 -2
  32. package/dist/{index-BbjcxqKn.js → index-DUnP2Xma.js} +5 -4
  33. package/dist/{index-DTSS5_f7.js → index-DkQzCBNS.js} +4 -2
  34. package/dist/{index-CzFeKxPw.js → index-DlKZDt0v.js} +4 -2
  35. package/dist/{index-CxLTPANc.js → index-F8-9liAo.js} +4 -2
  36. package/dist/{index-Du_K2fSC.js → index-H6bxF3CN.js} +4 -2
  37. package/dist/{index-tsO6geQz.js → index-QEJn3K9v.js} +4 -2
  38. package/dist/{index-CeDdrD6U.js → index-W-M5T20d.js} +4 -2
  39. package/dist/{index-CVP9pfZS.js → index-lDSplInz.js} +4 -2
  40. package/dist/{index-DiuZWhZw.js → index-ovt0UKFi.js} +4 -2
  41. package/dist/{index-iE53L-9n.js → index-pNYe-U8V.js} +4 -2
  42. package/dist/{index-BOt4IOh5.js → index-zKmjws_7.js} +4 -2
  43. package/dist/index.js +5 -3
  44. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.d.ts.map +1 -1
  45. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.js +1 -1
  46. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.js.map +1 -1
  47. package/dist/worker-D2k1TTky.js +10 -0
  48. package/dist/{protobuf-CjDCjqx3.js → worker-utils-Jii8lIsy.js} +1406 -1
  49. package/package.json +1 -1
  50. package/dist/index-CcszYLTP.js +0 -346
  51. package/dist/worker-CHyNU_Ed.js +0 -1059
@@ -1,175 +1,6 @@
1
1
  // This Source Code Form is subject to the terms of the Mozilla Public
2
2
  // License, v2.0. If a copy of the MPL was not distributed with this
3
3
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
4
- import { Waterfall } from "hydrated-ws";
5
- import { FoxgloveClient } from "@foxglove/ws-protocol";
6
- import { recordToDataView } from "../../utils/encoding.js";
7
- import { protobufsBySchema } from "../../messaging/protobuf.js";
8
- class WsWorker {
9
- #ws;
10
- #client;
11
- subscriptions = new Map();
12
- services = new Map();
13
- createWs(url, onReconnect) {
14
- this.#ws = new Waterfall(url, FoxgloveClient.SUPPORTED_SUBPROTOCOL, {
15
- connectionTimeout: 2000,
16
- retryPolicy: (_attempt) => {
17
- onReconnect();
18
- return 1_000;
19
- },
20
- factory: (url) => {
21
- const rawWs = new WebSocket(url, FoxgloveClient.SUPPORTED_SUBPROTOCOL);
22
- rawWs.binaryType = "arraybuffer";
23
- return rawWs;
24
- }
25
- });
26
- }
27
- createClient() {
28
- this.#client = new FoxgloveClient({ ws: this.#ws });
29
- this.#client.on("open", () => send({ type: "open" }));
30
- this.#client.on("close", () => send({ type: "close" }));
31
- this.#client.on("error", (error) => send({ type: "error", error }));
32
- this.#client.on("message", ({ subscriptionId, data }) => {
33
- const subscription = this.subscriptions.get(subscriptionId);
34
- if (subscription) {
35
- sendWithTransfer({
36
- type: "message",
37
- data: { ...subscription, buffer: data }
38
- }, [data.buffer]);
39
- }
40
- });
41
- }
42
- getPublicChannels() {
43
- return [...this.subscriptions.values()].map(({ kind, topic }) => ({ kind, topic }));
44
- }
45
- getPublicServices() {
46
- return [...this.services.values()].map(service => service.name);
47
- }
48
- handleAdvertisements() {
49
- this.#client.on("advertise", (channels) => {
50
- const data = this.getPublicChannels();
51
- for (const channel of channels) {
52
- const subscriptionId = this.#client.subscribe(channel.id);
53
- const kind = protobufsBySchema[channel.schemaName]?.kind ?? 'annotations';
54
- this.subscriptions.set(subscriptionId, {
55
- topic: channel.topic,
56
- schema: channel.schemaName,
57
- kind
58
- });
59
- data.push({ topic: channel.topic, kind });
60
- }
61
- send({ type: "channels", data });
62
- });
63
- this.#client.on("unadvertise", (channels) => {
64
- for (const channel of channels) {
65
- this.subscriptions.delete(channel);
66
- }
67
- const data = this.getPublicChannels();
68
- send({ type: "channels", data });
69
- });
70
- this.#client.on("advertiseServices", (advertisedServices) => {
71
- const data = this.getPublicServices();
72
- for (const service of advertisedServices) {
73
- this.services.set(service.name, service);
74
- data.push(service.name);
75
- }
76
- send({ type: "services", data });
77
- });
78
- this.#client.on("unadvertiseServices", (unadvertisedServices) => {
79
- for (const unadvertisedService of unadvertisedServices) {
80
- for (const [name, service] of this.services) {
81
- if (service.id === unadvertisedService) {
82
- this.services.delete(name);
83
- }
84
- }
85
- }
86
- const data = this.getPublicServices();
87
- send({ type: "services", data });
88
- });
89
- }
90
- handleServiceResponses() {
91
- this.#client.on("serviceCallResponse", (event) => {
92
- sendWithTransfer({
93
- type: "service_response",
94
- data: {
95
- ok: true,
96
- serviceCallId: event.callId,
97
- buffer: event.data,
98
- error: null
99
- }
100
- }, [event.data.buffer]);
101
- });
102
- }
103
- constructor(wsUrl) {
104
- const onReconnect = () => {
105
- this.services.clear();
106
- this.subscriptions.clear();
107
- send({ type: "reconnect" });
108
- };
109
- try {
110
- this.createWs(wsUrl, onReconnect);
111
- this.createClient();
112
- this.handleAdvertisements();
113
- this.handleServiceResponses();
114
- }
115
- catch (error) {
116
- // try-catch is needed to catch `Mixed Content` errors in Chrome, where the client
117
- // attempts to load `ws://` from `https://`. (Safari would catch these in `ws.onerror`
118
- // but with `undefined` as an error.)
119
- send({
120
- type: "error",
121
- error: error ?? { message: "Insecure WebSocket connection" }
122
- });
123
- }
124
- }
125
- send(data) {
126
- if (this.#ws.readyState === this.#ws.OPEN) {
127
- this.#ws.send(data);
128
- }
129
- }
130
- close() {
131
- this.#client.close();
132
- }
133
- callService({ name, serviceCallId, body = {} }) {
134
- const service = this.services.get(name);
135
- if (!service) {
136
- send({
137
- type: "service_response",
138
- data: {
139
- serviceCallId,
140
- ok: false,
141
- error: "Service was not advertised",
142
- buffer: null
143
- }
144
- });
145
- return;
146
- }
147
- this.#client.sendServiceCallRequest({
148
- serviceId: service.id,
149
- callId: serviceCallId,
150
- encoding: "json",
151
- data: recordToDataView(body)
152
- });
153
- }
154
- }
155
- let wsWorker = null;
156
- const send = self.postMessage;
157
- const sendWithTransfer = self.postMessage;
158
- self.addEventListener("message", async (event) => {
159
- const { type, data } = event.data;
160
- switch (type) {
161
- case "open":
162
- wsWorker = new WsWorker(data.wsUrl);
163
- break;
164
- case "close":
165
- wsWorker?.close();
166
- break;
167
- case "send":
168
- wsWorker?.send(data);
169
- break;
170
- case "call_service":
171
- wsWorker?.callService(data);
172
- break;
173
- }
174
- });
4
+ import { createWsWorkerMessageListener } from "./worker-utils.js";
5
+ self.addEventListener("message", createWsWorkerMessageListener(self.postMessage.bind(self), self.postMessage.bind(self)));
175
6
  //# sourceMappingURL=worker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../../../../src/connection/ws/worker.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0DAA0D;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAW,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAgB,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AA+C9E,MAAM,QAAQ;IACZ,GAAG,CAAa;IAChB,OAAO,CAAkB;IAEjB,aAAa,GAAG,IAAI,GAAG,EAAyF,CAAC;IACjH,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAEtC,QAAQ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,KAAK,MAAM;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM;QACR,KAAK,OAAO;YACV,QAAQ,EAAE,KAAK,EAAE,CAAC;YAClB,MAAM;QACR,KAAK,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,MAAM;QACR,KAAK,cAAc;YACjB,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YAC5B,MAAM;IACV,CAAC;AACH,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../../../../src/connection/ws/worker.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0DAA0D;AAE1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAElE,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,6BAA6B,CAC5D,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAC3B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5B,CAAC,CAAA"}
@@ -1,10 +1,9 @@
1
1
  export { WebSocketConnection } from "./connection/ws/Connection";
2
- export { WebRtcConnection } from "./connection/webrtc/Connection";
3
- export type { WebRtcConfig } from "@luxonis/remote-connection";
2
+ export type { PublicChannelData } from "./connection/BaseConnection.js";
3
+ export type { FromWorkerMessage, ToWorkerMessage, WebSocketConnectionMessage } from './connection/ws/worker-utils.js';
4
+ export { createWsWorkerMessageListener } from './connection/ws/worker-utils.js';
4
5
  export { VisualizerContext } from "./context/VisualizerContext";
5
- export { VisualizerFlatContext } from "./context/VisualizerFlatContext";
6
6
  export { PanelLayout } from "./components/PanelLayout.js";
7
7
  export { ImagePanel } from "./panels/ImagePanel";
8
8
  export { PointCloudPanel } from "./panels/PointCloudPanel";
9
- export type { PublicChannelData } from "./connection/BaseConnection.js";
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AACrH,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
@@ -2,9 +2,8 @@
2
2
  // License, v2.0. If a copy of the MPL was not distributed with this
3
3
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
4
4
  export { WebSocketConnection } from "./connection/ws/Connection";
5
- export { WebRtcConnection } from "./connection/webrtc/Connection";
5
+ export { createWsWorkerMessageListener } from './connection/ws/worker-utils.js';
6
6
  export { VisualizerContext } from "./context/VisualizerContext";
7
- export { VisualizerFlatContext } from "./context/VisualizerFlatContext";
8
7
  export { PanelLayout } from "./components/PanelLayout.js";
9
8
  export { ImagePanel } from "./panels/ImagePanel";
10
9
  export { PointCloudPanel } from "./panels/PointCloudPanel";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0DAA0D;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0DAA0D;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useReducer, useRef, useCallback, useLayoutEffect, Component, useContext, useState, useEffect, createContext, forwardRef, createElement, cloneElement, useMemo, Profiler, StrictMode } from 'react';
3
3
  import ReactDOM__default from 'react-dom';
4
- import { i as isSymbol, t as toString, k as keys, g as getSymbols$1, s as stubArray, a as arrayPush, b as baseGetAllKeys, c as getTag, d as getAllKeys, e as createAggregator, f as baseGet, h as baseIteratee, j as castPath, l as toKey, m as flatRest, n as arrayMap$1, o as baseSet, p as baseUniq, q as baseFlatten, r as generateUtilityClass, A as AnalyticsContext, u as useMustNotChange, P as PropTypes, v as useCurrentLayoutActions, w as useCurrentLayoutSelector, x as reportError, y as AppError, E as ErrorDisplay, S as Stack$1, z as makeStyles$1, _ as _extends$1, L as Logger, B as useGuaranteedContext, W as WorkspaceContext, C as useAnalytics, D as AppEvent, F as LeftSidebarItemKeys, R as RightSidebarItemKeys, G as usePanelMosaicId, H as useTranslation, I as usePanelCatalog, J as EmptyState, K as isEmpty, M as PanelContext, N as PanelCatalogContext, O as useSelectedPanels, Q as usePanelStateStore, T as useDefaultPanelTitle, U as PANEL_TITLE_CONFIG_KEY, V as noop$4, X as getPanelTypeFromId, Y as useWorkspaceStore, Z as useShallowMemo, $ as TAB_PANEL_TYPE, a0 as WorkspaceStoreSelectors, a1 as difference, a2 as filterMap, a3 as dist$3, a4 as usePanelContext, a5 as useMessagePipeline, a6 as v4, a7 as useHoverValue, a8 as useSetHoverValue, a9 as useClearHoverValue, aa as useAppConfiguration, ab as useMessagePipelineGetter, ac as usePanelSettingsTreeUpdate, ad as PlayerCapabilities, ae as useValueChangedDebugLog, af as assertNever, ag as PlayerPresence, ah as typescript, ai as isEqual, aj as isDesktopApp, ak as createTheme, al as propTypesExports, am as useJsonTreeTheme } from './index-PRD8Vx5h.js';
4
+ import { i as isSymbol, t as toString, k as keys, g as getSymbols$1, s as stubArray, a as arrayPush, b as baseGetAllKeys, c as getTag, d as getAllKeys, e as createAggregator, f as baseGet, h as baseIteratee, j as castPath, l as toKey, m as flatRest, n as arrayMap$1, o as baseSet, p as baseUniq, q as baseFlatten, r as generateUtilityClass, A as AnalyticsContext, u as useMustNotChange, P as PropTypes, v as useCurrentLayoutActions, w as useCurrentLayoutSelector, x as reportError, y as AppError, E as ErrorDisplay, S as Stack$1, z as makeStyles$1, _ as _extends$1, L as Logger, B as useGuaranteedContext, W as WorkspaceContext, C as useAnalytics, D as AppEvent, F as LeftSidebarItemKeys, R as RightSidebarItemKeys, G as usePanelMosaicId, H as useTranslation, I as usePanelCatalog, J as EmptyState, K as isEmpty, M as PanelContext, N as PanelCatalogContext, O as useSelectedPanels, Q as usePanelStateStore, T as useDefaultPanelTitle, U as PANEL_TITLE_CONFIG_KEY, V as noop$4, X as getPanelTypeFromId, Y as useWorkspaceStore, Z as useShallowMemo, $ as TAB_PANEL_TYPE, a0 as WorkspaceStoreSelectors, a1 as difference, a2 as filterMap, a3 as dist$3, a4 as usePanelContext, a5 as useMessagePipeline, a6 as v4, a7 as useHoverValue, a8 as useSetHoverValue, a9 as useClearHoverValue, aa as useAppConfiguration, ab as useMessagePipelineGetter, ac as usePanelSettingsTreeUpdate, ad as PlayerCapabilities, ae as useValueChangedDebugLog, af as assertNever, ag as PlayerPresence, ah as typescript, ai as isEqual, aj as isDesktopApp, ak as createTheme, al as propTypesExports, am as useJsonTreeTheme } from './index-BBXW7Wxj.js';
5
5
  import { createStore, useStore } from 'zustand';
6
6
  import { MosaicDragType, MosaicContext, MosaicWindowContext, getOtherBranch, getNodeAtPath } from 'react-mosaic-component';
7
- import { a as getDefaultExportFromCjs, c as commonjsGlobal, g as getAugmentedNamespace } from './protobuf-CjDCjqx3.js';
7
+ import { a as getDefaultExportFromCjs, c as commonjsGlobal, g as getAugmentedNamespace, E as EventEmitter } from './worker-utils-Jii8lIsy.js';
8
8
  import { Link, Button, alpha, IconButton, Card, CardActionArea, CardMedia, CardContent, Typography, Container, Tooltip, Fade, ListItem, ListItemButton, ListItemText, List, TextField, InputAdornment, Popper, Grow, Paper, ClickAwayListener, Menu, MenuItem, Divider, buttonClasses, Backdrop, Chip, useTheme, alertClasses, darken, lighten, inputBaseClasses, autocompleteClasses, inputClasses, Checkbox, dialogActionsClasses, filledInputClasses, inputAdornmentClasses, listSubheaderClasses, selectClasses, tableCellClasses, ThemeProvider as ThemeProvider$1, SvgIcon, tabsClasses as tabsClasses$1, tabClasses, Tabs, Tab, ListItemIcon } from '@mui/material';
9
9
  import { p as isObject, r as root, E as copyObject, F as keysIn, G as getPrototype, H as cloneArrayBuffer, S as Symbol$1, I as cloneTypedArray, i as isObjectLike, J as nodeUtil, K as baseUnary, L as copyArray, l as isBuffer, N as cloneBuffer, O as initCloneObject, m as Stack, a as isArray, A as assignValue, z as baseAssignValue, x as baseRest, P as isPlainObject$1, y as isArrayLikeObject, B as tinycolor, Q as t$1, C as merge$1, D as instance } from './i18next-C5Qe4-E1.js';
10
10
  import FullscreenExitIcon from '@mui/icons-material/FullscreenExit';
@@ -17,7 +17,6 @@ import { useDrag, useDrop } from 'react-dnd';
17
17
  import { B as Box3, V as Vector3, I as InstancedBufferGeometry, F as Float32BufferAttribute, a as InstancedInterleavedBuffer, b as InterleavedBufferAttribute, W as WireframeGeometry, S as Sphere, U as UniformsLib, c as Vector2, f as ShaderLib, g as UniformsUtils, h as ShaderMaterial, i as Vector4, M as Matrix4, L as Line3, j as Mesh, k as MathUtils, O as Object3D, C as Color, r as rgbToThreeColor, s as stringToRgba, m as makeRgba, l as MeshStandardMaterial, R as ReplaceStencilOp, N as NotEqualStencilFunc, D as DoubleSide, P as PointsMaterial, n as rgbaToCssString, o as colorModeSettingsFields, p as autoSelectColorSettings, q as PlaneGeometry, u as DataTexture, v as UVMapping, w as ClampToEdgeWrapping, x as NearestFilter, y as LinearFilter, z as FS_SRGB_TO_LINEAR, A as SRGBColorSpace, E as LinearSRGBColorSpace, G as rgbaToLinear, H as RedFormat, J as RGBAFormat, K as getColorConverter, Q as FloatType, T as UnsignedByteType, X as NEEDS_MIN_MAX$1, Y as InstancedMesh, Z as CylinderGeometry, _ as ConeGeometry, $ as DataTextureLoader, a0 as LinearMipmapLinearFilter, a1 as Loader, a2 as LoaderUtils, a3 as FileLoader, a4 as MeshBasicMaterial, a5 as Scene, a6 as TextureLoader, a7 as AnimationClip, a8 as VectorKeyframeTrack, a9 as QuaternionKeyframeTrack, aa as MeshLambertMaterial, ab as MeshPhongMaterial, ac as FrontSide, ad as PerspectiveCamera, ae as OrthographicCamera, af as AmbientLight, ag as SpotLight, ah as PointLight, ai as DirectionalLight, aj as BufferGeometry, ak as Group, al as Quaternion, am as Bone, an as LineBasicMaterial, ao as SkinnedMesh, ap as Line, aq as LineSegments, ar as RepeatWrapping, as as Skeleton, at as BufferAttribute, au as TrianglesDrawMode, av as TriangleFanDrawMode, aw as TriangleStripDrawMode, ax as MeshPhysicalMaterial, ay as ImageBitmapLoader, az as InterleavedBuffer, aA as Material, aB as PropertyBinding, aC as LineLoop, aD as Points, aE as InterpolateLinear, aF as ColorManagement, aG as NearestMipmapNearestFilter, aH as LinearMipmapNearestFilter, aI as NearestMipmapLinearFilter, aJ as MirroredRepeatWrapping, aK as InterpolateDiscrete, aL as Texture, aM as NumberKeyframeTrack, aN as Interpolant, aO as EdgesGeometry, aP as LoadingManager, aQ as stringToRgb, aR as getLuminance, aS as Euler, aT as vec3TupleApproxEquals, aU as wrap, aV as releaseProxy, aW as decodeCompressedImageToBitmap, aX as CanvasTexture, aY as Shape, aZ as SRGBToLinear, a_ as ShapeGeometry, a$ as DynamicDrawUsage, b0 as ShaderChunk, b1 as IMAGE_DEFAULT_COLOR_MODE_SETTINGS, b2 as colorHasTransparency, b3 as StaticDrawUsage, b4 as RawShaderMaterial, b5 as GLSL3, b6 as colorFieldComputedPrefix, b7 as getRotationTo, b8 as SphereGeometry, b9 as rgbaGradient, ba as InstancedBufferAttribute, bb as BoxGeometry, bc as DARK_OUTLINE, bd as LIGHT_OUTLINE, be as CircleGeometry, bf as LineDashedMaterial, bg as GreaterDepth, bh as EventDispatcher, bi as Plane, bj as Raycaster, bk as WebGLRenderTarget, bl as Ray, bm as MOUSE, bn as TOUCH, bo as Spherical, bp as WebGLRenderer, bq as NoToneMapping, br as VSMShadowMap, bs as HemisphereLight } from './decodeImage-BBqnjJjE.js';
18
18
  import { CacheProvider } from '@emotion/react';
19
19
  import '@mui/material/styles/createTypography';
20
- import { E as EventEmitter } from './index-CcszYLTP.js';
21
20
  import require$$1$3 from 'color';
22
21
  import require$$2$1 from 'lodash.curry';
23
22
  import OpenInNewIcon from '@mui/icons-material/OpenInNew';
@@ -29,6 +28,8 @@ import 'react-syntax-highlighter';
29
28
  import 'extend';
30
29
  import 'react-icons';
31
30
  import '@pandacss/dev';
31
+ import 'hydrated-ws';
32
+ import 'ms';
32
33
  import 'protobufjs/minimal';
33
34
 
34
35
  /** Used to match a single whitespace character. */
@@ -31494,7 +31495,9 @@ class WorkerImageDecoder {
31494
31495
  const {
31495
31496
  remote,
31496
31497
  dispose
31497
- } = ComlinkWrap(new Worker(new URL("WorkerImageDecoder.worker-DjK2q36W.js", import.meta.url)));
31498
+ } = ComlinkWrap(new Worker(new URL("WorkerImageDecoder.worker-DjK2q36W.js", import.meta.url), {
31499
+ type: 'module'
31500
+ }));
31498
31501
  this.#remote = remote;
31499
31502
  this.#dispose = dispose;
31500
31503
  }