@shapediver/viewer.features.drawing-tools 3.12.12 → 3.12.13

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 (53) hide show
  1. package/dist/business/implementation/managers/interaction/InteractionManagerAdapter.d.ts +36 -0
  2. package/dist/business/implementation/managers/interaction/InteractionManagerAdapter.d.ts.map +1 -0
  3. package/dist/business/implementation/managers/interaction/InteractionManagerAdapter.js +77 -0
  4. package/dist/business/implementation/managers/interaction/InteractionManagerAdapter.js.map +1 -0
  5. package/dist/business/implementation/managers/interaction/InteractionManagerRefactored.d.ts +82 -0
  6. package/dist/business/implementation/managers/interaction/InteractionManagerRefactored.d.ts.map +1 -0
  7. package/dist/business/implementation/managers/interaction/InteractionManagerRefactored.js +406 -0
  8. package/dist/business/implementation/managers/interaction/InteractionManagerRefactored.js.map +1 -0
  9. package/dist/business/implementation/managers/interaction/actions/InteractionActions.d.ts +107 -0
  10. package/dist/business/implementation/managers/interaction/actions/InteractionActions.d.ts.map +1 -0
  11. package/dist/business/implementation/managers/interaction/actions/InteractionActions.js +191 -0
  12. package/dist/business/implementation/managers/interaction/actions/InteractionActions.js.map +1 -0
  13. package/dist/business/implementation/managers/interaction/config/InteractionConfig.d.ts +134 -0
  14. package/dist/business/implementation/managers/interaction/config/InteractionConfig.d.ts.map +1 -0
  15. package/dist/business/implementation/managers/interaction/config/InteractionConfig.js +218 -0
  16. package/dist/business/implementation/managers/interaction/config/InteractionConfig.js.map +1 -0
  17. package/dist/business/implementation/managers/interaction/gestures/GestureRecognition.d.ts +118 -0
  18. package/dist/business/implementation/managers/interaction/gestures/GestureRecognition.d.ts.map +1 -0
  19. package/dist/business/implementation/managers/interaction/gestures/GestureRecognition.js +352 -0
  20. package/dist/business/implementation/managers/interaction/gestures/GestureRecognition.js.map +1 -0
  21. package/dist/business/implementation/managers/interaction/index.d.ts +13 -0
  22. package/dist/business/implementation/managers/interaction/index.d.ts.map +1 -0
  23. package/dist/business/implementation/managers/interaction/index.js +49 -0
  24. package/dist/business/implementation/managers/interaction/index.js.map +1 -0
  25. package/dist/business/implementation/managers/interaction/interfaces/IInteractionManagerForStrategy.d.ts +24 -0
  26. package/dist/business/implementation/managers/interaction/interfaces/IInteractionManagerForStrategy.d.ts.map +1 -0
  27. package/dist/business/implementation/managers/interaction/interfaces/IInteractionManagerForStrategy.js +3 -0
  28. package/dist/business/implementation/managers/interaction/interfaces/IInteractionManagerForStrategy.js.map +1 -0
  29. package/dist/business/implementation/managers/interaction/mobile-detection-example.d.ts +24 -0
  30. package/dist/business/implementation/managers/interaction/mobile-detection-example.d.ts.map +1 -0
  31. package/dist/business/implementation/managers/interaction/mobile-detection-example.js +112 -0
  32. package/dist/business/implementation/managers/interaction/mobile-detection-example.js.map +1 -0
  33. package/dist/business/implementation/managers/interaction/strategies/DesktopInteractionStrategy.d.ts +37 -0
  34. package/dist/business/implementation/managers/interaction/strategies/DesktopInteractionStrategy.d.ts.map +1 -0
  35. package/dist/business/implementation/managers/interaction/strategies/DesktopInteractionStrategy.js +290 -0
  36. package/dist/business/implementation/managers/interaction/strategies/DesktopInteractionStrategy.js.map +1 -0
  37. package/dist/business/implementation/managers/interaction/strategies/IInteractionStrategy.d.ts +52 -0
  38. package/dist/business/implementation/managers/interaction/strategies/IInteractionStrategy.d.ts.map +1 -0
  39. package/dist/business/implementation/managers/interaction/strategies/IInteractionStrategy.js +21 -0
  40. package/dist/business/implementation/managers/interaction/strategies/IInteractionStrategy.js.map +1 -0
  41. package/dist/business/implementation/managers/interaction/strategies/MobileInteractionStrategy.d.ts +72 -0
  42. package/dist/business/implementation/managers/interaction/strategies/MobileInteractionStrategy.d.ts.map +1 -0
  43. package/dist/business/implementation/managers/interaction/strategies/MobileInteractionStrategy.js +442 -0
  44. package/dist/business/implementation/managers/interaction/strategies/MobileInteractionStrategy.js.map +1 -0
  45. package/dist/business/implementation/managers/interaction/test-mobile-detection.d.ts +24 -0
  46. package/dist/business/implementation/managers/interaction/test-mobile-detection.d.ts.map +1 -0
  47. package/dist/business/implementation/managers/interaction/test-mobile-detection.js +136 -0
  48. package/dist/business/implementation/managers/interaction/test-mobile-detection.js.map +1 -0
  49. package/dist/business/implementation/managers/interaction/test-refactored.d.ts +9 -0
  50. package/dist/business/implementation/managers/interaction/test-refactored.d.ts.map +1 -0
  51. package/dist/business/implementation/managers/interaction/test-refactored.js +57 -0
  52. package/dist/business/implementation/managers/interaction/test-refactored.js.map +1 -0
  53. package/package.json +10 -10
@@ -0,0 +1,36 @@
1
+ import { IRay } from "@shapediver/viewer.features.interaction";
2
+ import { IRestrictionManager } from "@shapediver/viewer.rendering-engine.intersection-restriction-engine";
3
+ import { vec3 } from "gl-matrix";
4
+ import { DrawingToolsManager } from "../../DrawingToolsManager";
5
+ import { InteractionConfig } from "./config/InteractionConfig";
6
+ import { DeletionInteractionHandler } from "./handlers/DeletionInteractionHandler";
7
+ import { InsertionInteractionHandler } from "./handlers/InsertionInteractionHandler";
8
+ import { MidPointInteractionHandler } from "./handlers/MidPointInteractionHandler";
9
+ /**
10
+ * Adapter to maintain backward compatibility with the original InteractionManager interface
11
+ * while using the new refactored implementation internally
12
+ */
13
+ export declare class InteractionManagerAdapter {
14
+ private readonly refactoredManager;
15
+ constructor(drawingToolsManager: DrawingToolsManager, config?: InteractionConfig);
16
+ get deletionInteractionHandler(): DeletionInteractionHandler;
17
+ get insertionInteractionHandler(): InsertionInteractionHandler;
18
+ get midPointInteractionHandler(): MidPointInteractionHandler;
19
+ get restrictionManager(): IRestrictionManager;
20
+ addPoint(insertionIndex: number): void;
21
+ close(): void;
22
+ deleteSelection(): void;
23
+ onDown(event: PointerEvent, ray: IRay): void;
24
+ onMove(event: PointerEvent, ray: IRay): void;
25
+ onOut(): void;
26
+ onUp(): void;
27
+ removePoint(index: number): void;
28
+ startInsertion(): vec3 | undefined;
29
+ stopInsertion(): void;
30
+ undoLastAction(): boolean;
31
+ getAvailableInteractionModes(): string[];
32
+ setInteractionStrategy(strategyType: "desktop" | "mobile"): void;
33
+ updateConfig(config: Partial<InteractionConfig>): void;
34
+ getConfig(): InteractionConfig;
35
+ }
36
+ //# sourceMappingURL=InteractionManagerAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionManagerAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/InteractionManagerAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,yCAAyC,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,qEAAqE,CAAC;AACxG,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAC,0BAA0B,EAAC,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAC,2BAA2B,EAAC,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAC,0BAA0B,EAAC,MAAM,uCAAuC,CAAC;AAGjF;;;GAGG;AACH,qBAAa,yBAAyB;IACrC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA+B;gBAGhE,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,CAAC,EAAE,iBAAiB;IAS3B,IAAW,0BAA0B,IAAI,0BAA0B,CAElE;IAED,IAAW,2BAA2B,IAAI,2BAA2B,CAEpE;IAED,IAAW,0BAA0B,IAAI,0BAA0B,CAElE;IAED,IAAW,kBAAkB,IAAI,mBAAmB,CAEnD;IAEM,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAItC,KAAK,IAAI,IAAI;IAIb,eAAe,IAAI,IAAI;IAIvB,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI;IAI5C,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI;IAI5C,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAMZ,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIhC,cAAc,IAAI,IAAI,GAAG,SAAS;IAIlC,aAAa,IAAI,IAAI;IAKrB,cAAc,IAAI,OAAO;IAIzB,4BAA4B,IAAI,MAAM,EAAE;IAIxC,sBAAsB,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,IAAI;IAKhE,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAItD,SAAS,IAAI,iBAAiB;CAGrC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteractionManagerAdapter = void 0;
4
+ const InteractionManagerRefactored_1 = require("./InteractionManagerRefactored");
5
+ /**
6
+ * Adapter to maintain backward compatibility with the original InteractionManager interface
7
+ * while using the new refactored implementation internally
8
+ */
9
+ class InteractionManagerAdapter {
10
+ constructor(drawingToolsManager, config) {
11
+ this.refactoredManager = new InteractionManagerRefactored_1.InteractionManagerRefactored(drawingToolsManager, config);
12
+ }
13
+ // Delegate all public methods to the refactored manager
14
+ get deletionInteractionHandler() {
15
+ return this.refactoredManager.deletionInteractionHandler;
16
+ }
17
+ get insertionInteractionHandler() {
18
+ return this.refactoredManager.insertionInteractionHandler;
19
+ }
20
+ get midPointInteractionHandler() {
21
+ return this.refactoredManager.midPointInteractionHandler;
22
+ }
23
+ get restrictionManager() {
24
+ return this.refactoredManager.restrictionManager;
25
+ }
26
+ addPoint(insertionIndex) {
27
+ this.refactoredManager.addPoint(insertionIndex);
28
+ }
29
+ close() {
30
+ this.refactoredManager.close();
31
+ }
32
+ deleteSelection() {
33
+ this.refactoredManager.deleteSelection();
34
+ }
35
+ onDown(event, ray) {
36
+ this.refactoredManager.onDown(event, ray);
37
+ }
38
+ onMove(event, ray) {
39
+ this.refactoredManager.onMove(event, ray);
40
+ }
41
+ onOut() {
42
+ this.refactoredManager.onOut();
43
+ }
44
+ onUp() {
45
+ // The refactored manager expects ray parameter, but original doesn't provide it
46
+ // We'll need to handle this discrepancy
47
+ this.refactoredManager.onUp({}, {});
48
+ }
49
+ removePoint(index) {
50
+ this.refactoredManager.removePoint(index);
51
+ }
52
+ startInsertion() {
53
+ return this.refactoredManager.startInsertion();
54
+ }
55
+ stopInsertion() {
56
+ this.refactoredManager.stopInsertion();
57
+ }
58
+ // Additional methods from the refactored manager
59
+ undoLastAction() {
60
+ return this.refactoredManager.undoLastAction();
61
+ }
62
+ getAvailableInteractionModes() {
63
+ return this.refactoredManager.getAvailableInteractionModes();
64
+ }
65
+ setInteractionStrategy(strategyType) {
66
+ this.refactoredManager.setInteractionStrategy(strategyType);
67
+ }
68
+ // Additional configuration methods
69
+ updateConfig(config) {
70
+ this.refactoredManager.updateConfig(config);
71
+ }
72
+ getConfig() {
73
+ return this.refactoredManager.getConfig();
74
+ }
75
+ }
76
+ exports.InteractionManagerAdapter = InteractionManagerAdapter;
77
+ //# sourceMappingURL=InteractionManagerAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionManagerAdapter.js","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/InteractionManagerAdapter.ts"],"names":[],"mappings":";;;AAQA,iFAA4E;AAE5E;;;GAGG;AACH,MAAa,yBAAyB;IAGrC,YACC,mBAAwC,EACxC,MAA0B;QAE1B,IAAI,CAAC,iBAAiB,GAAG,IAAI,2DAA4B,CACxD,mBAAmB,EACnB,MAAM,CACN,CAAC;IACH,CAAC;IAED,wDAAwD;IACxD,IAAW,0BAA0B;QACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,0BAA0B,CAAC;IAC1D,CAAC;IAED,IAAW,2BAA2B;QACrC,OAAO,IAAI,CAAC,iBAAiB,CAAC,2BAA2B,CAAC;IAC3D,CAAC;IAED,IAAW,0BAA0B;QACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,0BAA0B,CAAC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AC9D,CAAC;IAEM,sBAAsB,CAAC,YAAkC;QAC/D,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAC7D,CAAC;IAED,mCAAmC;IAC5B,YAAY,CAAC,MAAkC;QACrD,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;IAC3C,CAAC;CACD;AA7FD,8DA6FC"}
@@ -0,0 +1,82 @@
1
+ import { IRay } from "@shapediver/viewer.features.interaction";
2
+ import { IRestrictionManager } from "@shapediver/viewer.rendering-engine.intersection-restriction-engine";
3
+ import { vec3 } from "gl-matrix";
4
+ import { DrawingToolsManager } from "../../DrawingToolsManager";
5
+ import { DeletionInteractionHandler } from "./handlers/DeletionInteractionHandler";
6
+ import { InsertionInteractionHandler } from "./handlers/InsertionInteractionHandler";
7
+ import { MidPointInteractionHandler } from "./handlers/MidPointInteractionHandler";
8
+ import { InteractionManagerHelper } from "./helpers/InteractionManagerHelper";
9
+ import { InteractionConfig } from "./config/InteractionConfig";
10
+ import { IInteractionManagerForStrategy } from "./interfaces/IInteractionManagerForStrategy";
11
+ /**
12
+ * Refactored InteractionManager with strategy pattern for desktop/mobile separation
13
+ */
14
+ export declare class InteractionManagerRefactored implements IInteractionManagerForStrategy {
15
+ #private;
16
+ constructor(drawingToolsManager: DrawingToolsManager, config?: InteractionConfig);
17
+ get deletionInteractionHandler(): DeletionInteractionHandler;
18
+ get insertionInteractionHandler(): InsertionInteractionHandler;
19
+ get midPointInteractionHandler(): MidPointInteractionHandler;
20
+ get restrictionManager(): IRestrictionManager;
21
+ get interactionManagerHelper(): InteractionManagerHelper;
22
+ /**
23
+ * Main pointer event handler - delegates to appropriate strategy
24
+ */
25
+ onDown(event: PointerEvent, ray: IRay): void;
26
+ onMove(event: PointerEvent, ray: IRay): void;
27
+ onUp(event?: PointerEvent, ray?: IRay): void;
28
+ onOut(): void;
29
+ addPoint(insertionIndex: number): void;
30
+ removePoint(index: number): void;
31
+ deleteSelection(): void;
32
+ startInsertion(): vec3 | undefined;
33
+ stopInsertion(): void;
34
+ getCameraFreezeFlag(): string;
35
+ setCameraFreezeFlag(): void;
36
+ setLastEvent(event: PointerEvent): void;
37
+ close(): void;
38
+ /**
39
+ * Undo the last action (useful for mobile where mistakes are more common)
40
+ */
41
+ undoLastAction(): boolean;
42
+ /**
43
+ * Get available interaction modes for UI (useful for mobile mode switching)
44
+ */
45
+ getAvailableInteractionModes(): string[];
46
+ /**
47
+ * Force a specific interaction strategy (useful for testing or mode switching)
48
+ */
49
+ setInteractionStrategy(strategyType: "desktop" | "mobile"): void;
50
+ /**
51
+ * Update configuration
52
+ */
53
+ updateConfig(config: Partial<InteractionConfig>): void;
54
+ /**
55
+ * Get current configuration
56
+ */
57
+ getConfig(): InteractionConfig;
58
+ /**
59
+ * Update strategies when configuration changes
60
+ */
61
+ private updateStrategiesConfig;
62
+ /**
63
+ * Select appropriate interaction strategy based on platform detection
64
+ */
65
+ private selectStrategy; /**
66
+ * Process the result of an interaction and perform appropriate actions
67
+ */
68
+ private processInteractionResult;
69
+ /**
70
+ * Execute appropriate action based on interaction result
71
+ */
72
+ private executeActionForResult;
73
+ /**
74
+ * Create interaction context for actions
75
+ */
76
+ private createInteractionContext;
77
+ /**
78
+ * Reset interaction state
79
+ */
80
+ private reset;
81
+ }
82
+ //# sourceMappingURL=InteractionManagerRefactored.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionManagerRefactored.d.ts","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/InteractionManagerRefactored.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,yCAAyC,CAAC;AAC7D,OAAO,EAEN,mBAAmB,EAGnB,MAAM,qEAAqE,CAAC;AAM7E,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B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AAI;IAIvC,KAAK,IAAI,IAAI;IAYpB;;OAEG;IACI,cAAc,IAAI,OAAO;IAShC;;OAEG;IACI,4BAA4B,IAAI,MAAM,EAAE;IAQ/C;;OAEG;IACI,sBAAsB,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,IAAI;IAWvE;;OAEG;IACI,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAI7D;;OAEG;IACI,SAAS,IAAI,iBAAiB;IAQrC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;OAEG;IACH,OAAO,CAAC,cAAc,EAepB;;OAEC;IACH,OAAO,CAAC,wBAAwB;IAiChC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAqC9B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAchC;;OAEG;IACH,OAAO,CAAC,KAAK;CAUb"}
@@ -0,0 +1,406 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _InteractionManagerRefactored_deletionInteractionHandler, _InteractionManagerRefactored_drawingToolsManager, _InteractionManagerRefactored_geometryMathManager, _InteractionManagerRefactored_insertionInteractionHandler, _InteractionManagerRefactored_interactionManagerHelper, _InteractionManagerRefactored_midPointInteractionHandler, _InteractionManagerRefactored_restrictionManager, _InteractionManagerRefactored_viewport, _InteractionManagerRefactored_strategies, _InteractionManagerRefactored_gestureManager, _InteractionManagerRefactored_configManager, _InteractionManagerRefactored_cameraFreezeFlag, _InteractionManagerRefactored_currentStrategy, _InteractionManagerRefactored_actionHistory, _InteractionManagerRefactored_lastEvent;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.InteractionManagerRefactored = void 0;
16
+ const viewer_1 = require("@shapediver/viewer");
17
+ const viewer_rendering_engine_intersection_restriction_engine_1 = require("@shapediver/viewer.rendering-engine.intersection-restriction-engine");
18
+ const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
19
+ const DeletionInteractionHandler_1 = require("./handlers/DeletionInteractionHandler");
20
+ const InsertionInteractionHandler_1 = require("./handlers/InsertionInteractionHandler");
21
+ const MidPointInteractionHandler_1 = require("./handlers/MidPointInteractionHandler");
22
+ const InteractionManagerHelper_1 = require("./helpers/InteractionManagerHelper");
23
+ // Import new strategy system
24
+ const InteractionActions_1 = require("./actions/InteractionActions");
25
+ const InteractionConfig_1 = require("./config/InteractionConfig");
26
+ const GestureRecognition_1 = require("./gestures/GestureRecognition");
27
+ const DesktopInteractionStrategy_1 = require("./strategies/DesktopInteractionStrategy");
28
+ const IInteractionStrategy_1 = require("./strategies/IInteractionStrategy");
29
+ const MobileInteractionStrategy_1 = require("./strategies/MobileInteractionStrategy");
30
+ /**
31
+ * Refactored InteractionManager with strategy pattern for desktop/mobile separation
32
+ */
33
+ class InteractionManagerRefactored {
34
+ // #endregion Properties
35
+ // #region Constructors
36
+ constructor(drawingToolsManager, config) {
37
+ // #region Properties
38
+ _InteractionManagerRefactored_deletionInteractionHandler.set(this, void 0);
39
+ _InteractionManagerRefactored_drawingToolsManager.set(this, void 0);
40
+ _InteractionManagerRefactored_geometryMathManager.set(this, void 0);
41
+ _InteractionManagerRefactored_insertionInteractionHandler.set(this, void 0);
42
+ _InteractionManagerRefactored_interactionManagerHelper.set(this, void 0);
43
+ _InteractionManagerRefactored_midPointInteractionHandler.set(this, void 0);
44
+ _InteractionManagerRefactored_restrictionManager.set(this, void 0);
45
+ _InteractionManagerRefactored_viewport.set(this, void 0);
46
+ // Strategy pattern components
47
+ _InteractionManagerRefactored_strategies.set(this, void 0);
48
+ _InteractionManagerRefactored_gestureManager.set(this, void 0);
49
+ _InteractionManagerRefactored_configManager.set(this, void 0);
50
+ // State management
51
+ _InteractionManagerRefactored_cameraFreezeFlag.set(this, "");
52
+ _InteractionManagerRefactored_currentStrategy.set(this, void 0);
53
+ _InteractionManagerRefactored_actionHistory.set(this, []);
54
+ _InteractionManagerRefactored_lastEvent.set(this, void 0);
55
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_drawingToolsManager, drawingToolsManager, "f");
56
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_viewport, drawingToolsManager.viewport, "f");
57
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_geometryMathManager, __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").geometryMathManager, "f");
58
+ // Initialize configuration manager
59
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_configManager, new InteractionConfig_1.InteractionConfigManager(config), "f");
60
+ // Initialize restriction manager
61
+ const restrictionsArray = [];
62
+ for (const restrictionId in __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").settings
63
+ .restrictions) {
64
+ const restriction = __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").settings.restrictions[restrictionId];
65
+ if (!restriction.id)
66
+ restriction.id = restrictionId;
67
+ restrictionsArray.push(restriction);
68
+ }
69
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_restrictionManager, new viewer_rendering_engine_intersection_restriction_engine_1.RestrictionManager(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").viewport, __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").parentNode, restrictionsArray, __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").settings.visualization), "f");
70
+ // Initialize handlers
71
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_deletionInteractionHandler, new DeletionInteractionHandler_1.DeletionInteractionHandler(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this), "f");
72
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_insertionInteractionHandler, new InsertionInteractionHandler_1.InsertionInteractionHandler(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this), "f");
73
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_midPointInteractionHandler, new MidPointInteractionHandler_1.MidPointInteractionHandler(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this), "f");
74
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_interactionManagerHelper, new InteractionManagerHelper_1.InteractionManagerHelper(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this), "f");
75
+ // Initialize interaction strategies with configuration
76
+ const currentConfig = __classPrivateFieldGet(this, _InteractionManagerRefactored_configManager, "f").getConfig();
77
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_strategies, [
78
+ new DesktopInteractionStrategy_1.DesktopInteractionStrategy(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this, currentConfig),
79
+ new MobileInteractionStrategy_1.MobileInteractionStrategy(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this, currentConfig),
80
+ ], "f");
81
+ // Initialize gesture recognition
82
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_gestureManager, new GestureRecognition_1.GestureManager(), "f");
83
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").addRecognizer(new GestureRecognition_1.TapGestureRecognizer());
84
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").addRecognizer(new GestureRecognition_1.LongPressGestureRecognizer());
85
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").addRecognizer(new GestureRecognition_1.DragGestureRecognizer());
86
+ // Listen for config changes to update strategies
87
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_configManager, "f").addListener((newConfig) => {
88
+ this.updateStrategiesConfig(newConfig);
89
+ });
90
+ // Event listeners
91
+ (0, viewer_1.addListener)(viewer_shared_services_1.EVENTTYPE_DRAWING_TOOLS.ADDED, (e) => {
92
+ const event = e;
93
+ this.addPoint(event.index);
94
+ });
95
+ (0, viewer_1.addListener)(viewer_shared_services_1.EVENTTYPE_DRAWING_TOOLS.REMOVED, (e) => {
96
+ const event = e;
97
+ this.removePoint(event.index);
98
+ });
99
+ }
100
+ // #endregion Constructors
101
+ // #region Public Getters And Setters
102
+ get deletionInteractionHandler() {
103
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_deletionInteractionHandler, "f");
104
+ }
105
+ get insertionInteractionHandler() {
106
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_insertionInteractionHandler, "f");
107
+ }
108
+ get midPointInteractionHandler() {
109
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_midPointInteractionHandler, "f");
110
+ }
111
+ get restrictionManager() {
112
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_restrictionManager, "f");
113
+ }
114
+ get interactionManagerHelper() {
115
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f");
116
+ }
117
+ // #endregion Public Getters And Setters
118
+ // #region Public Methods
119
+ /**
120
+ * Main pointer event handler - delegates to appropriate strategy
121
+ */
122
+ onDown(event, ray) {
123
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").closed)
124
+ return;
125
+ // Store the last event for use in onUp if called without parameters
126
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_lastEvent, event, "f");
127
+ // Select appropriate strategy based on event
128
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_currentStrategy, this.selectStrategy(event), "f");
129
+ if (!__classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f"))
130
+ return;
131
+ // Process with gesture recognition
132
+ const gestureResults = __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").processEvent(event);
133
+ // Handle the interaction
134
+ const result = __classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f").onPointerDown(event, ray);
135
+ this.processInteractionResult(result, event, ray);
136
+ }
137
+ onMove(event, ray) {
138
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").closed)
139
+ return;
140
+ // Use current strategy or select new one
141
+ const strategy = __classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f") || this.selectStrategy(event);
142
+ if (!strategy)
143
+ return;
144
+ // Process with gesture recognition
145
+ const gestureResults = __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").processEvent(event);
146
+ // Handle the interaction
147
+ const result = strategy.onPointerMove(event, ray);
148
+ this.processInteractionResult(result, event, ray);
149
+ }
150
+ onUp(event, ray) {
151
+ var _a, _b;
152
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").closed)
153
+ return;
154
+ // If called with parameters, use strategy pattern
155
+ if (event && ray) {
156
+ // Use current strategy
157
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f")) {
158
+ // Process with gesture recognition
159
+ const gestureResults = __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").processEvent(event);
160
+ // Handle the interaction
161
+ const result = __classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f").onPointerUp(event, ray);
162
+ this.processInteractionResult(result, event, ray);
163
+ // Clear current strategy
164
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_currentStrategy, undefined, "f");
165
+ }
166
+ }
167
+ else if (__classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f")) {
168
+ // Handle case where onUp() called without parameters but we have a strategy
169
+ // This happens when the application doesn't pass event/ray to onUp()
170
+ // Use the last stored event coordinates if available
171
+ const lastEventCoords = __classPrivateFieldGet(this, _InteractionManagerRefactored_lastEvent, "f")
172
+ ? {
173
+ x: __classPrivateFieldGet(this, _InteractionManagerRefactored_lastEvent, "f").clientX,
174
+ y: __classPrivateFieldGet(this, _InteractionManagerRefactored_lastEvent, "f").clientY,
175
+ }
176
+ : { x: 100, y: 100 };
177
+ // Create a synthetic pointer event for the strategy
178
+ const syntheticEvent = new PointerEvent("pointerup", {
179
+ pointerId: ((_a = __classPrivateFieldGet(this, _InteractionManagerRefactored_lastEvent, "f")) === null || _a === void 0 ? void 0 : _a.pointerId) || 1,
180
+ pointerType: ((_b = __classPrivateFieldGet(this, _InteractionManagerRefactored_lastEvent, "f")) === null || _b === void 0 ? void 0 : _b.pointerType) || "touch",
181
+ clientX: lastEventCoords.x,
182
+ clientY: lastEventCoords.y,
183
+ bubbles: true,
184
+ });
185
+ // Create a basic ray - for insertion, the exact ray may not be critical
186
+ // as the insertion handler should handle the coordinate conversion
187
+ const syntheticRay = {
188
+ origin: [0, 0, 0],
189
+ direction: [0, 0, -1],
190
+ };
191
+ const result = __classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f").onPointerUp(syntheticEvent, syntheticRay);
192
+ this.processInteractionResult(result, syntheticEvent, syntheticRay);
193
+ // Clear current strategy
194
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_currentStrategy, undefined, "f");
195
+ }
196
+ // Always call helper onUp and reset (important for original behavior)
197
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").onUp();
198
+ this.reset();
199
+ }
200
+ onOut() {
201
+ // Use current strategy if available
202
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f")) {
203
+ const result = __classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f").onPointerOut();
204
+ this.processInteractionResult(result);
205
+ }
206
+ // Fallback to original behavior
207
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_restrictionManager, "f").showRestrictionVisualization = false;
208
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_insertionInteractionHandler, "f").pauseInsertion();
209
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").onOut();
210
+ this.reset();
211
+ }
212
+ // Maintain compatibility with existing interface
213
+ addPoint(insertionIndex) {
214
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").addPoint(insertionIndex);
215
+ }
216
+ removePoint(index) {
217
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").removePoint(index);
218
+ }
219
+ deleteSelection() {
220
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_deletionInteractionHandler, "f").deleteSelection(__classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").selectedPointIndices);
221
+ }
222
+ startInsertion() {
223
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_restrictionManager, "f").showRestrictionVisualization = true;
224
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_midPointInteractionHandler, "f").stopMidPointInsertion();
225
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_insertionInteractionHandler, "f").startInsertion(__classPrivateFieldGet(this, _InteractionManagerRefactored_lastEvent, "f"));
226
+ }
227
+ stopInsertion() {
228
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_restrictionManager, "f").showRestrictionVisualization = false;
229
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_insertionInteractionHandler, "f").stopInsertion();
230
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_viewport, "f").removeFlag(__classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f"));
231
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_cameraFreezeFlag, "", "f");
232
+ }
233
+ getCameraFreezeFlag() {
234
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f");
235
+ }
236
+ setCameraFreezeFlag() {
237
+ if (!__classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f")) {
238
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_cameraFreezeFlag, __classPrivateFieldGet(this, _InteractionManagerRefactored_viewport, "f").addFlag(viewer_1.FLAG_TYPE.CAMERA_FREEZE), "f");
239
+ }
240
+ }
241
+ setLastEvent(event) {
242
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_lastEvent, event, "f");
243
+ }
244
+ close() {
245
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f")) {
246
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_viewport, "f").removeFlag(__classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f"));
247
+ }
248
+ document.body.style.cursor = "default";
249
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").close();
250
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_restrictionManager, "f").close();
251
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_gestureManager, "f").reset();
252
+ }
253
+ /**
254
+ * Undo the last action (useful for mobile where mistakes are more common)
255
+ */
256
+ undoLastAction() {
257
+ const lastAction = __classPrivateFieldGet(this, _InteractionManagerRefactored_actionHistory, "f").pop();
258
+ if (lastAction && lastAction.undo) {
259
+ lastAction.undo();
260
+ return true;
261
+ }
262
+ return false;
263
+ }
264
+ /**
265
+ * Get available interaction modes for UI (useful for mobile mode switching)
266
+ */
267
+ getAvailableInteractionModes() {
268
+ const modes = ["select", "insert", "delete"];
269
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_currentStrategy, "f") instanceof MobileInteractionStrategy_1.MobileInteractionStrategy) {
270
+ modes.push("gesture");
271
+ }
272
+ return modes;
273
+ }
274
+ /**
275
+ * Force a specific interaction strategy (useful for testing or mode switching)
276
+ */
277
+ setInteractionStrategy(strategyType) {
278
+ const strategy = __classPrivateFieldGet(this, _InteractionManagerRefactored_strategies, "f").find((s) => strategyType === "desktop"
279
+ ? s instanceof DesktopInteractionStrategy_1.DesktopInteractionStrategy
280
+ : s instanceof MobileInteractionStrategy_1.MobileInteractionStrategy);
281
+ if (strategy) {
282
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_currentStrategy, strategy, "f");
283
+ }
284
+ }
285
+ /**
286
+ * Update configuration
287
+ */
288
+ updateConfig(config) {
289
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_configManager, "f").updateConfig(config);
290
+ }
291
+ /**
292
+ * Get current configuration
293
+ */
294
+ getConfig() {
295
+ return __classPrivateFieldGet(this, _InteractionManagerRefactored_configManager, "f").getConfig();
296
+ }
297
+ // #endregion Public Methods
298
+ // #region Private Methods
299
+ /**
300
+ * Update strategies when configuration changes
301
+ */
302
+ updateStrategiesConfig(newConfig) {
303
+ // Recreate strategies with new configuration
304
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_strategies, "f").length = 0;
305
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_strategies, "f").push(new DesktopInteractionStrategy_1.DesktopInteractionStrategy(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this, newConfig), new MobileInteractionStrategy_1.MobileInteractionStrategy(__classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"), this, newConfig));
306
+ // Clear current strategy to force re-selection
307
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_currentStrategy, undefined, "f");
308
+ }
309
+ /**
310
+ * Select appropriate interaction strategy based on platform detection
311
+ */
312
+ selectStrategy(event) {
313
+ // Use SystemInfo to detect mobile platform
314
+ const isMobile = viewer_shared_services_1.SystemInfo.instance.isMobile;
315
+ const selectedStrategy = __classPrivateFieldGet(this, _InteractionManagerRefactored_strategies, "f").find((strategy) => {
316
+ if (isMobile) {
317
+ return strategy instanceof MobileInteractionStrategy_1.MobileInteractionStrategy;
318
+ }
319
+ else {
320
+ return strategy instanceof DesktopInteractionStrategy_1.DesktopInteractionStrategy;
321
+ }
322
+ });
323
+ return selectedStrategy;
324
+ } /**
325
+ * Process the result of an interaction and perform appropriate actions
326
+ */
327
+ processInteractionResult(result, event, ray) {
328
+ if (!result.handled)
329
+ return;
330
+ // Handle camera freeze for dragging
331
+ if (result.action === IInteractionStrategy_1.InteractionAction.DRAG_START &&
332
+ !__classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f")) {
333
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_cameraFreezeFlag, __classPrivateFieldGet(this, _InteractionManagerRefactored_viewport, "f").addFlag(viewer_1.FLAG_TYPE.CAMERA_FREEZE), "f");
334
+ }
335
+ // Prevent default browser behavior if requested
336
+ if (result.preventDefault && event) {
337
+ event.preventDefault();
338
+ }
339
+ // Stop event propagation if requested
340
+ if (result.stopPropagation && event) {
341
+ event.stopPropagation();
342
+ }
343
+ // Execute corresponding action if context is available
344
+ if (result.action && event && ray) {
345
+ this.executeActionForResult(result, event, ray);
346
+ }
347
+ }
348
+ /**
349
+ * Execute appropriate action based on interaction result
350
+ */
351
+ executeActionForResult(result, event, ray) {
352
+ const context = this.createInteractionContext(event, ray);
353
+ let action;
354
+ switch (result.action) {
355
+ case IInteractionStrategy_1.InteractionAction.SELECT:
356
+ // Create select action based on context
357
+ break;
358
+ case IInteractionStrategy_1.InteractionAction.INSERT_START:
359
+ action = InteractionActions_1.ActionFactory.createInsertionStartAction();
360
+ break;
361
+ case IInteractionStrategy_1.InteractionAction.INSERT_END:
362
+ action = InteractionActions_1.ActionFactory.createInsertionFinalizeAction();
363
+ break;
364
+ case IInteractionStrategy_1.InteractionAction.DELETE:
365
+ const selectedIndices = __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").selectedPointIndices;
366
+ action = InteractionActions_1.ActionFactory.createDeleteAction(selectedIndices);
367
+ break;
368
+ }
369
+ if (action && action.canExecute(context)) {
370
+ const actionResult = action.execute(context);
371
+ if (actionResult.success) {
372
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_actionHistory, "f").push(action);
373
+ if (actionResult.updateRequired) {
374
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f").update();
375
+ }
376
+ }
377
+ }
378
+ }
379
+ /**
380
+ * Create interaction context for actions
381
+ */
382
+ createInteractionContext(event, ray) {
383
+ return {
384
+ event: event,
385
+ ray: ray,
386
+ drawingToolsManager: __classPrivateFieldGet(this, _InteractionManagerRefactored_drawingToolsManager, "f"),
387
+ interactionManager: this,
388
+ selectedPoints: __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").selectedPointIndices,
389
+ hoveredPoint: __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").hoveredPoint,
390
+ };
391
+ }
392
+ /**
393
+ * Reset interaction state
394
+ */
395
+ reset() {
396
+ if (__classPrivateFieldGet(this, _InteractionManagerRefactored_insertionInteractionHandler, "f").insertionActive === false) {
397
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_restrictionManager, "f").showRestrictionVisualization = false;
398
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_viewport, "f").removeFlag(__classPrivateFieldGet(this, _InteractionManagerRefactored_cameraFreezeFlag, "f"));
399
+ __classPrivateFieldSet(this, _InteractionManagerRefactored_cameraFreezeFlag, "", "f");
400
+ }
401
+ __classPrivateFieldGet(this, _InteractionManagerRefactored_interactionManagerHelper, "f").reset();
402
+ }
403
+ }
404
+ exports.InteractionManagerRefactored = InteractionManagerRefactored;
405
+ _InteractionManagerRefactored_deletionInteractionHandler = new WeakMap(), _InteractionManagerRefactored_drawingToolsManager = new WeakMap(), _InteractionManagerRefactored_geometryMathManager = new WeakMap(), _InteractionManagerRefactored_insertionInteractionHandler = new WeakMap(), _InteractionManagerRefactored_interactionManagerHelper = new WeakMap(), _InteractionManagerRefactored_midPointInteractionHandler = new WeakMap(), _InteractionManagerRefactored_restrictionManager = new WeakMap(), _InteractionManagerRefactored_viewport = new WeakMap(), _InteractionManagerRefactored_strategies = new WeakMap(), _InteractionManagerRefactored_gestureManager = new WeakMap(), _InteractionManagerRefactored_configManager = new WeakMap(), _InteractionManagerRefactored_cameraFreezeFlag = new WeakMap(), _InteractionManagerRefactored_currentStrategy = new WeakMap(), _InteractionManagerRefactored_actionHistory = new WeakMap(), _InteractionManagerRefactored_lastEvent = new WeakMap();
406
+ //# sourceMappingURL=InteractionManagerRefactored.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionManagerRefactored.js","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/InteractionManagerRefactored.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAwE;AAExE,iJAK6E;AAC7E,+EAI4C;AAI5C,sFAAiF;AACjF,wFAAmF;AACnF,sFAAiF;AACjF,iFAA4E;AAE5E,6BAA6B;AAC7B,qEAIsC;AACtC,kEAGoC;AACpC,sEAKuC;AAEvC,wFAAmF;AACnF,4EAI2C;AAC3C,sFAAiF;AAEjF;;GAEG;AACH,MAAa,4BAA4B;IAyBxC,wBAAwB;IAExB,uBAAuB;IAEvB,YACC,mBAAwC,EACxC,MAA0B;QA5B3B,qBAAqB;QAErB,2EAAiE;QACjE,oEAAmD;QACnD,oEAAmD;QACnD,4EAAmE;QACnE,yEAA6D;QAC7D,2EAAiE;QACjE,mEAAkD;QAClD,yDAAiC;QAEjC,8BAA8B;QAC9B,2DAA6C;QAC7C,+DAAyC;QACzC,8DAAkD;QAElD,mBAAmB;QACnB,yDAA4B,EAAE,EAAC;QAC/B,gEAAwC;QACxC,sDAAuC,EAAE,EAAC;QAC1C,0DAA0B;QAUzB,uBAAA,IAAI,qDAAwB,mBAAmB,MAAA,CAAC;QAChD,uBAAA,IAAI,0CAAa,mBAAmB,CAAC,QAAQ,MAAA,CAAC;QAC9C,uBAAA,IAAI,qDACH,uBAAA,IAAI,yDAAqB,CAAC,mBAAmB,MAAA,CAAC;QAE/C,mCAAmC;QACnC,uBAAA,IAAI,+CAAkB,IAAI,4CAAwB,CAAC,MAAM,CAAC,MAAA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