@memberjunction/ng-shared 2.121.0 → 2.122.1

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.
@@ -0,0 +1,65 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { CompositeKey } from '@memberjunction/core';
3
+ import { DashboardEntityExtended } from '@memberjunction/core-entities';
4
+ import * as i0 from "@angular/core";
5
+ export interface DashboardConfig {
6
+ dashboard: DashboardEntityExtended;
7
+ userState?: any;
8
+ }
9
+ /**
10
+ * Make the base class a directive so we can use Angular functionality and sub-classes can be @Component
11
+ */
12
+ export declare abstract class BaseDashboard implements OnInit, OnDestroy {
13
+ /**
14
+ * Set or change the dashboard configuration. Changing this property will NOT cause the dashboard to reload. Call Refresh() to do that.
15
+ */
16
+ set Config(value: DashboardConfig);
17
+ get Config(): DashboardConfig | null;
18
+ /**
19
+ * Subclasses should emit this event when they have completed loading.
20
+ */
21
+ LoadingComplete: EventEmitter<void>;
22
+ /**
23
+ * Subclasses can emit anytime an error occurs.
24
+ */
25
+ Error: EventEmitter<Error>;
26
+ /**
27
+ * Subclasses should emit this event anytime their internal state changes in a way that they'd like to persist.
28
+ */
29
+ UserStateChanged: EventEmitter<any>;
30
+ /**
31
+ * Subclasses can emit this event anytime they want to communicate with the container to let it know that something has happened of significance.
32
+ */
33
+ Interaction: EventEmitter<any>;
34
+ /**
35
+ * Subclasses can emit this event anytime they want to open a record within a particular entity. The container should handle this event and open the record.
36
+ */
37
+ OpenEntityRecord: EventEmitter<{
38
+ EntityName: string;
39
+ RecordPKey: CompositeKey;
40
+ }>;
41
+ protected _config: DashboardConfig | null;
42
+ constructor();
43
+ ngOnInit(): Promise<void>;
44
+ ngOnDestroy(): void;
45
+ /**
46
+ * This method will result in the dashboard being reloaded.
47
+ */
48
+ Refresh(): void;
49
+ private _visible;
50
+ /**
51
+ * This method can be used by a container to let the dashboard know that it is being opened/closed. Base class just sets a flag.
52
+ */
53
+ SetVisible(visible: boolean): void;
54
+ /**
55
+ * Subclasses can override this method to perform any initialization they need. This method only runs once when the dashboard is created.
56
+ */
57
+ protected abstract initDashboard(): void;
58
+ /**
59
+ * Subclasses should override this method to load their data. This method is called when the dashboard is created and when Refresh() is called.
60
+ */
61
+ protected abstract loadData(): void;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseDashboard, never>;
63
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseDashboard, never, never, { "Config": { "alias": "Config"; "required": false; }; }, { "LoadingComplete": "LoadingComplete"; "Error": "Error"; "UserStateChanged": "UserStateChanged"; "Interaction": "Interaction"; "OpenEntityRecord": "OpenEntityRecord"; }, never, never, false, never>;
64
+ }
65
+ //# sourceMappingURL=base-dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-dashboard.d.ts","sourceRoot":"","sources":["../../src/lib/base-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,SAAS,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;;AAExE,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,uBAAuB,CAAC;IACnC,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED;;GAEG;AACH,8BACsB,aAAc,YAAW,MAAM,EAAE,SAAS;IAC9D;;OAEG;IACH,IAAa,MAAM,CAAC,KAAK,EAAE,eAAe,EAEzC;IAED,IAAI,MAAM,IAAI,eAAe,GAAG,IAAI,CAEnC;IAED;;OAEG;IACO,eAAe,qBAA4B;IAErD;;OAEG;IACO,KAAK,sBAA6B;IAE5C;;OAEG;IACO,gBAAgB,oBAA2B;IAErD;;OAEG;IACO,WAAW,oBAA2B;IAEhD;;OAEG;IACO,gBAAgB;oBAAiC,MAAM;oBAAc,YAAY;OAAK;IAEhG,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAQ;;IAI3C,QAAQ;IAKd,WAAW,IAAI,IAAI;IAEnB;;OAEG;IACI,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,QAAQ,CAAkB;IAClC;;OAEG;IACI,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,IAAI;IAExC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;yCAvEf,aAAa;2CAAb,aAAa;CAwElC"}
@@ -0,0 +1,74 @@
1
+ import { Directive, EventEmitter, Input, Output } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Make the base class a directive so we can use Angular functionality and sub-classes can be @Component
5
+ */
6
+ export class BaseDashboard {
7
+ /**
8
+ * Set or change the dashboard configuration. Changing this property will NOT cause the dashboard to reload. Call Refresh() to do that.
9
+ */
10
+ set Config(value) {
11
+ this._config = value;
12
+ }
13
+ get Config() {
14
+ return this._config;
15
+ }
16
+ /**
17
+ * Subclasses should emit this event when they have completed loading.
18
+ */
19
+ LoadingComplete = new EventEmitter();
20
+ /**
21
+ * Subclasses can emit anytime an error occurs.
22
+ */
23
+ Error = new EventEmitter();
24
+ /**
25
+ * Subclasses should emit this event anytime their internal state changes in a way that they'd like to persist.
26
+ */
27
+ UserStateChanged = new EventEmitter();
28
+ /**
29
+ * Subclasses can emit this event anytime they want to communicate with the container to let it know that something has happened of significance.
30
+ */
31
+ Interaction = new EventEmitter();
32
+ /**
33
+ * Subclasses can emit this event anytime they want to open a record within a particular entity. The container should handle this event and open the record.
34
+ */
35
+ OpenEntityRecord = new EventEmitter();
36
+ _config = null;
37
+ constructor() { }
38
+ async ngOnInit() {
39
+ this.initDashboard();
40
+ await this.loadData();
41
+ }
42
+ ngOnDestroy() { }
43
+ /**
44
+ * This method will result in the dashboard being reloaded.
45
+ */
46
+ Refresh() {
47
+ this.loadData();
48
+ }
49
+ _visible = false;
50
+ /**
51
+ * This method can be used by a container to let the dashboard know that it is being opened/closed. Base class just sets a flag.
52
+ */
53
+ SetVisible(visible) {
54
+ this._visible = visible;
55
+ }
56
+ static ɵfac = function BaseDashboard_Factory(t) { return new (t || BaseDashboard)(); };
57
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: BaseDashboard, inputs: { Config: "Config" }, outputs: { LoadingComplete: "LoadingComplete", Error: "Error", UserStateChanged: "UserStateChanged", Interaction: "Interaction", OpenEntityRecord: "OpenEntityRecord" } });
58
+ }
59
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseDashboard, [{
60
+ type: Directive
61
+ }], () => [], { Config: [{
62
+ type: Input
63
+ }], LoadingComplete: [{
64
+ type: Output
65
+ }], Error: [{
66
+ type: Output
67
+ }], UserStateChanged: [{
68
+ type: Output
69
+ }], Interaction: [{
70
+ type: Output
71
+ }], OpenEntityRecord: [{
72
+ type: Output
73
+ }] }); })();
74
+ //# sourceMappingURL=base-dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-dashboard.js","sourceRoot":"","sources":["../../src/lib/base-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,EAAE,MAAM,eAAe,CAAC;;AAS1F;;GAEG;AAEH,MAAM,OAAgB,aAAa;IACjC;;OAEG;IACH,IAAa,MAAM,CAAC,KAAsB;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACO,eAAe,GAAG,IAAI,YAAY,EAAQ,CAAC;IAErD;;OAEG;IACO,KAAK,GAAG,IAAI,YAAY,EAAS,CAAC;IAE5C;;OAEG;IACO,gBAAgB,GAAG,IAAI,YAAY,EAAO,CAAC;IAErD;;OAEG;IACO,WAAW,GAAG,IAAI,YAAY,EAAO,CAAC;IAEhD;;OAEG;IACO,gBAAgB,GAAG,IAAI,YAAY,EAAkD,CAAC;IAEtF,OAAO,GAA2B,IAAI,CAAC;IAEjD,gBAAe,CAAC;IAEhB,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED,WAAW,KAAU,CAAC;IAEtB;;OAEG;IACI,OAAO;QACZ,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAEO,QAAQ,GAAY,KAAK,CAAC;IAClC;;OAEG;IACI,UAAU,CAAC,OAAgB;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;uEA7DmB,aAAa;6DAAb,aAAa;;iFAAb,aAAa;cADlC,SAAS;oBAKK,MAAM;kBAAlB,KAAK;YAWI,eAAe;kBAAxB,MAAM;YAKG,KAAK;kBAAd,MAAM;YAKG,gBAAgB;kBAAzB,MAAM;YAKG,WAAW;kBAApB,MAAM;YAKG,gBAAgB;kBAAzB,MAAM"}
@@ -2,7 +2,9 @@ import { BaseEntity } from "@memberjunction/core";
2
2
  import { BaseNavigationComponent } from "./base-navigation-component";
3
3
  import { ResourceData } from "@memberjunction/core-entities";
4
4
  export declare abstract class BaseResourceComponent extends BaseNavigationComponent {
5
- Data: ResourceData;
5
+ private _data;
6
+ get Data(): ResourceData;
7
+ set Data(value: ResourceData);
6
8
  private _loadComplete;
7
9
  get LoadComplete(): boolean;
8
10
  private _loadStarted;
@@ -1 +1 @@
1
- {"version":3,"file":"base-resource-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-resource-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BA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,KAAK,EAAE,YAAY,EAElC;IAED,OAAO,CAAC,aAAa,CAAkB;IACvC,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,OAAO,CAAC,YAAY,CAAkB;IACtC,IAAW,WAAW,IAAI,OAAO,CAEhC;IAGD,OAAO,CAAC,kBAAkB,CAAa;IACvC,IAAW,iBAAiB,IAAI,GAAG,CAElC;IACD,IAAW,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAEtC;IAED,OAAO,CAAC,iBAAiB,CAAa;IACtC,IAAW,gBAAgB,IAAI,GAAG,CAEjC;IACD,IAAW,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAErC;IAED,OAAO,CAAC,yBAAyB,CAAa;IAC9C,IAAW,wBAAwB,IAAI,GAAG,CAEzC;IACD,IAAW,wBAAwB,CAAC,KAAK,EAAE,GAAG,EAE7C;IAED,SAAS,CAAC,kBAAkB;IAO5B,SAAS,CAAC,iBAAiB;IAS3B,SAAS,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,UAAU;IAO9D,QAAQ,CAAC,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAEpE,QAAQ,CAAC,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;CACrE"}
@@ -1,7 +1,13 @@
1
1
  import { BaseNavigationComponent } from "./base-navigation-component";
2
2
  import { ResourceData } from "@memberjunction/core-entities";
3
3
  export class BaseResourceComponent extends BaseNavigationComponent {
4
- Data = new ResourceData();
4
+ _data = new ResourceData();
5
+ get Data() {
6
+ return this._data;
7
+ }
8
+ set Data(value) {
9
+ this._data = value;
10
+ }
5
11
  _loadComplete = false;
6
12
  get LoadComplete() {
7
13
  return this._loadComplete;
@@ -1 +1 @@
1
- {"version":3,"file":"base-resource-component.js","sourceRoot":"","sources":["../../src/lib/base-resource-component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;A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,GAAG,KAAK,CAAC;IACnC,CAAC;IAEO,yBAAyB,GAAQ,IAAI,CAAC;IAC9C,IAAW,wBAAwB;QAC/B,OAAO,IAAI,CAAC,yBAAyB,CAAA;IACzC,CAAC;IACD,IAAW,wBAAwB,CAAC,KAAU;QAC1C,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC;IAC3C,CAAC;IAES,kBAAkB;QACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC1B,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC9B,CAAC;IACL,CAAC;IAES,iBAAiB;QACvB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC7B,CAAC;IACL,CAAC;IAIS,mBAAmB,CAAC,oBAAgC;QAC1D,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxE,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;YACjC,IAAI,CAAC,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;QACzD,CAAC;IACL,CAAC;CAKJ"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Options for controlling navigation behavior
3
+ */
4
+ export interface NavigationOptions {
5
+ /**
6
+ * Force creation of a new tab instead of replacing temporary tabs
7
+ * If not specified, the NavigationService will use global shift-key detection
8
+ */
9
+ forceNewTab?: boolean;
10
+ /**
11
+ * Create the tab as a pinned (permanent) tab
12
+ */
13
+ pinTab?: boolean;
14
+ /**
15
+ * Focus the tab after creation (default: true)
16
+ */
17
+ focusTab?: boolean;
18
+ /**
19
+ * Replace the currently active tab instead of creating a new one
20
+ */
21
+ replaceActive?: boolean;
22
+ /**
23
+ * Initial values to populate when creating a new record.
24
+ * Should be a plain object with field names as keys.
25
+ */
26
+ newRecordValues?: Record<string, unknown>;
27
+ }
28
+ //# sourceMappingURL=navigation.interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.interfaces.d.ts","sourceRoot":"","sources":["../../src/lib/navigation.interfaces.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=navigation.interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.interfaces.js","sourceRoot":"","sources":["../../src/lib/navigation.interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,115 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { WorkspaceStateManager, NavItem, ApplicationManager } from '@memberjunction/ng-base-application';
3
+ import { NavigationOptions } from './navigation.interfaces';
4
+ import { CompositeKey } from '@memberjunction/core';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * System application ID for non-app-specific resources
8
+ * Uses double underscore prefix to indicate system-level resource
9
+ */
10
+ export declare const SYSTEM_APP_ID = "__explorer";
11
+ /**
12
+ * Centralized navigation service that handles all navigation operations
13
+ * with automatic shift-key detection for power user workflows
14
+ */
15
+ export declare class NavigationService implements OnDestroy {
16
+ private workspaceManager;
17
+ private appManager;
18
+ private shiftKeyPressed;
19
+ private subscriptions;
20
+ constructor(workspaceManager: WorkspaceStateManager, appManager: ApplicationManager);
21
+ /**
22
+ * Get the neutral color used for system-wide resources (entities, views, dashboards)
23
+ * Returns a light neutral gray
24
+ */
25
+ get ExplorerAppColor(): string;
26
+ ngOnDestroy(): void;
27
+ /**
28
+ * Set up global keyboard event listeners to track shift key state
29
+ */
30
+ private setupGlobalShiftKeyDetection;
31
+ /**
32
+ * Get current shift key state
33
+ */
34
+ private isShiftPressed;
35
+ /**
36
+ * Determine if a new tab should be forced based on options and shift key state
37
+ */
38
+ private shouldForceNewTab;
39
+ /**
40
+ * Handle temporary tab preservation when forcing new tabs
41
+ * Rule: Only ONE tab should be temporary at a time
42
+ * When shift+clicking to force a new tab, pin the current active tab if it's temporary
43
+ */
44
+ private handleSingleResourceModeTransition;
45
+ /**
46
+ * Check if a tab request matches an existing tab's resource
47
+ */
48
+ private isSameResource;
49
+ /**
50
+ * Open a navigation item within an app
51
+ */
52
+ OpenNavItem(appId: string, navItem: NavItem, appColor: string, options?: NavigationOptions): string;
53
+ /**
54
+ * Open an entity record view
55
+ * System-wide resource using __explorer app ID and neutral color
56
+ */
57
+ OpenEntityRecord(entityName: string, recordPkey: CompositeKey, options?: NavigationOptions): string;
58
+ /**
59
+ * Open a view (system-wide resource)
60
+ */
61
+ OpenView(viewId: string, viewName: string, options?: NavigationOptions): string;
62
+ /**
63
+ * Open a dashboard (system-wide resource)
64
+ */
65
+ OpenDashboard(dashboardId: string, dashboardName: string, options?: NavigationOptions): string;
66
+ /**
67
+ * Open a report (system-wide resource)
68
+ */
69
+ OpenReport(reportId: string, reportName: string, options?: NavigationOptions): string;
70
+ /**
71
+ * Open an artifact (system-wide resource)
72
+ * Artifacts are versioned content containers (reports, dashboards, UI components, etc.)
73
+ */
74
+ OpenArtifact(artifactId: string, artifactName?: string, options?: NavigationOptions): string;
75
+ /**
76
+ * Open a dynamic view (system-wide resource)
77
+ * Dynamic views are entity-based views with custom filters, not saved views
78
+ */
79
+ OpenDynamicView(entityName: string, extraFilter?: string, options?: NavigationOptions): string;
80
+ /**
81
+ * Open a query (system-wide resource)
82
+ */
83
+ OpenQuery(queryId: string, queryName: string, options?: NavigationOptions): string;
84
+ /**
85
+ * Open a new entity record creation form
86
+ * System-wide resource using __explorer app ID and neutral color
87
+ * @param entityName The name of the entity to create a new record for
88
+ * @param options Navigation options including optional newRecordValues for pre-populating fields
89
+ */
90
+ OpenNewEntityRecord(entityName: string, options?: NavigationOptions): string;
91
+ /**
92
+ * Navigate to a nav item by name within the current or specified application.
93
+ * Allows passing additional configuration parameters to merge with the nav item's config.
94
+ * This is useful for cross-resource navigation where a component needs to navigate
95
+ * to another nav item with specific parameters (e.g., navigate to Conversations with a specific conversationId).
96
+ *
97
+ * @param navItemName The label/name of the nav item to navigate to
98
+ * @param configuration Additional configuration to merge (e.g., conversationId, artifactId)
99
+ * @param appId Optional app ID (defaults to current active app)
100
+ * @param options Navigation options
101
+ * @returns The tab ID if successful, null if nav item not found
102
+ */
103
+ OpenNavItemByName(navItemName: string, configuration?: Record<string, unknown>, appId?: string, options?: NavigationOptions): string | null;
104
+ /**
105
+ * Switch to an application by ID.
106
+ * This sets the app as active and either opens a specific nav item or creates a default tab.
107
+ * If the requested nav item already has an open tab, switches to that tab instead of creating a new one.
108
+ * @param appId The application ID to switch to
109
+ * @param navItemName Optional name of a nav item to open within the app. If provided, opens that nav item.
110
+ */
111
+ SwitchToApp(appId: string, navItemName?: string): Promise<void>;
112
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
113
+ static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
114
+ }
115
+ //# sourceMappingURL=navigation.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.service.d.ts","sourceRoot":"","sources":["../../src/lib/navigation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAc,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACrH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CA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