@instructure/ui-tree-browser 8.14.1-snapshot.7 → 8.15.1-snapshot.2
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/CHANGELOG.md +4 -0
- package/es/TreeBrowser/TreeBrowserLocator.js +2 -1
- package/es/TreeBrowser/TreeButton/index.js +14 -15
- package/es/TreeBrowser/TreeCollection/index.js +18 -31
- package/es/TreeBrowser/TreeCollection/props.js +1 -9
- package/es/TreeBrowser/TreeNode/index.js +10 -13
- package/es/TreeBrowser/TreeNode/props.js +0 -8
- package/es/TreeBrowser/index.js +36 -32
- package/es/TreeBrowser/props.js +0 -55
- package/lib/TreeBrowser/TreeBrowserLocator.js +2 -1
- package/lib/TreeBrowser/TreeButton/index.js +14 -14
- package/lib/TreeBrowser/TreeCollection/index.js +17 -30
- package/lib/TreeBrowser/TreeCollection/props.js +1 -9
- package/lib/TreeBrowser/TreeNode/index.js +10 -12
- package/lib/TreeBrowser/TreeNode/props.js +0 -8
- package/lib/TreeBrowser/index.js +37 -33
- package/lib/TreeBrowser/props.js +0 -55
- package/package.json +15 -15
- package/src/TreeBrowser/TreeButton/index.tsx +21 -36
- package/src/TreeBrowser/TreeButton/props.ts +11 -10
- package/src/TreeBrowser/TreeCollection/index.tsx +57 -108
- package/src/TreeBrowser/TreeCollection/props.ts +17 -32
- package/src/TreeBrowser/TreeNode/index.tsx +10 -21
- package/src/TreeBrowser/TreeNode/props.ts +5 -7
- package/src/TreeBrowser/index.tsx +81 -108
- package/src/TreeBrowser/props.ts +133 -59
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TreeBrowser/TreeBrowserLocator.d.ts +14 -14
- package/types/TreeBrowser/TreeButton/index.d.ts +5 -51
- package/types/TreeBrowser/TreeButton/index.d.ts.map +1 -1
- package/types/TreeBrowser/TreeButton/props.d.ts +11 -10
- package/types/TreeBrowser/TreeButton/props.d.ts.map +1 -1
- package/types/TreeBrowser/TreeCollection/index.d.ts +33 -85
- package/types/TreeBrowser/TreeCollection/index.d.ts.map +1 -1
- package/types/TreeBrowser/TreeCollection/props.d.ts +11 -25
- package/types/TreeBrowser/TreeCollection/props.d.ts.map +1 -1
- package/types/TreeBrowser/TreeNode/index.d.ts +4 -12
- package/types/TreeBrowser/TreeNode/index.d.ts.map +1 -1
- package/types/TreeBrowser/TreeNode/props.d.ts +5 -1
- package/types/TreeBrowser/TreeNode/props.d.ts.map +1 -1
- package/types/TreeBrowser/index.d.ts +35 -73
- package/types/TreeBrowser/index.d.ts.map +1 -1
- package/types/TreeBrowser/props.d.ts +113 -16
- package/types/TreeBrowser/props.d.ts.map +1 -1
|
@@ -1,62 +1,21 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
2
|
+
import { Component, SyntheticEvent } from 'react';
|
|
3
3
|
import { IconFolderLine, IconDocumentLine } from '@instructure/ui-icons';
|
|
4
4
|
import { jsx } from '@instructure/emotion';
|
|
5
5
|
import { TreeCollection } from './TreeCollection';
|
|
6
6
|
import { TreeButton } from './TreeButton';
|
|
7
7
|
import { TreeNode } from './TreeNode';
|
|
8
|
-
import type { TreeBrowserProps } from './props';
|
|
8
|
+
import type { Collection, CollectionData, CollectionProps, TreeBrowserProps, TreeBrowserState } from './props';
|
|
9
9
|
/**
|
|
10
10
|
---
|
|
11
11
|
category: components
|
|
12
12
|
---
|
|
13
|
+
@tsProps
|
|
13
14
|
**/
|
|
14
|
-
declare class TreeBrowser extends Component<TreeBrowserProps> {
|
|
15
|
+
declare class TreeBrowser extends Component<TreeBrowserProps, TreeBrowserState> {
|
|
15
16
|
static readonly componentId = "TreeBrowser";
|
|
16
|
-
static allowedProps: readonly (keyof
|
|
17
|
-
|
|
18
|
-
items: any;
|
|
19
|
-
rootId?: string | number | undefined;
|
|
20
|
-
expanded?: any;
|
|
21
|
-
defaultExpanded?: (string | number)[] | undefined;
|
|
22
|
-
selectionType?: "none" | "single" | undefined;
|
|
23
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
24
|
-
variant?: "folderTree" | "indent" | undefined;
|
|
25
|
-
collectionIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
26
|
-
collectionIconExpanded?: import("react").ReactNode | ((...args: any[]) => any);
|
|
27
|
-
itemIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
28
|
-
getItemProps?: ((...args: any[]) => any) | undefined;
|
|
29
|
-
getCollectionProps?: ((...args: any[]) => any) | undefined;
|
|
30
|
-
showRootCollection?: boolean | undefined;
|
|
31
|
-
onCollectionClick?: ((...args: any[]) => any) | undefined;
|
|
32
|
-
onCollectionToggle?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
onItemClick?: ((...args: any[]) => any) | undefined;
|
|
34
|
-
treeLabel?: string | undefined;
|
|
35
|
-
renderContent?: ((...args: any[]) => any) | undefined;
|
|
36
|
-
sortOrder?: ((obj1: any, obj2: any) => number) | undefined;
|
|
37
|
-
})[];
|
|
38
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
39
|
-
collections: any;
|
|
40
|
-
items: any;
|
|
41
|
-
rootId?: string | number | undefined;
|
|
42
|
-
expanded?: any;
|
|
43
|
-
defaultExpanded?: (string | number)[] | undefined;
|
|
44
|
-
selectionType?: "none" | "single" | undefined;
|
|
45
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
46
|
-
variant?: "folderTree" | "indent" | undefined;
|
|
47
|
-
collectionIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
48
|
-
collectionIconExpanded?: import("react").ReactNode | ((...args: any[]) => any);
|
|
49
|
-
itemIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
50
|
-
getItemProps?: ((...args: any[]) => any) | undefined;
|
|
51
|
-
getCollectionProps?: ((...args: any[]) => any) | undefined;
|
|
52
|
-
showRootCollection?: boolean | undefined;
|
|
53
|
-
onCollectionClick?: ((...args: any[]) => any) | undefined;
|
|
54
|
-
onCollectionToggle?: ((...args: any[]) => any) | undefined;
|
|
55
|
-
onItemClick?: ((...args: any[]) => any) | undefined;
|
|
56
|
-
treeLabel?: string | undefined;
|
|
57
|
-
renderContent?: ((...args: any[]) => any) | undefined;
|
|
58
|
-
sortOrder?: ((obj1: any, obj2: any) => number) | undefined;
|
|
59
|
-
}>;
|
|
17
|
+
static allowedProps: readonly ("collections" | "items" | "rootId" | "expanded" | "defaultExpanded" | "selectionType" | "onCollectionToggle" | "onItemClick" | "showRootCollection" | "treeLabel" | "sortOrder" | "getItemProps" | "getCollectionProps" | "onCollectionClick" | keyof import("./props").TreeBrowserCommonProps)[];
|
|
18
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"collections" | "items" | "rootId" | "expanded" | "defaultExpanded" | "selectionType" | "onCollectionToggle" | "onItemClick" | "showRootCollection" | "treeLabel" | "sortOrder" | "getItemProps" | "getCollectionProps" | "onCollectionClick" | keyof import("./props").TreeBrowserCommonProps>;
|
|
60
19
|
static defaultProps: {
|
|
61
20
|
size: string;
|
|
62
21
|
variant: string;
|
|
@@ -64,43 +23,46 @@ declare class TreeBrowser extends Component<TreeBrowserProps> {
|
|
|
64
23
|
collectionIcon: typeof IconFolderLine;
|
|
65
24
|
collectionIconExpanded: typeof IconFolderLine;
|
|
66
25
|
itemIcon: typeof IconDocumentLine;
|
|
67
|
-
getItemProps: (props:
|
|
68
|
-
getCollectionProps: (props:
|
|
26
|
+
getItemProps: (props: unknown) => unknown;
|
|
27
|
+
getCollectionProps: (props: unknown) => unknown;
|
|
69
28
|
defaultExpanded: never[];
|
|
70
29
|
selectionType: string;
|
|
71
|
-
|
|
72
|
-
onCollectionClick: (id: any, collection: any) => void;
|
|
73
|
-
onCollectionToggle: (collection: any) => void;
|
|
74
|
-
sortOrder: (obj1: any, obj2: any) => number;
|
|
30
|
+
sortOrder: () => number;
|
|
75
31
|
};
|
|
76
32
|
static Node: typeof TreeNode;
|
|
77
33
|
static Collection: typeof TreeCollection;
|
|
78
34
|
static Button: typeof TreeButton;
|
|
79
35
|
ref: Element | null;
|
|
80
|
-
constructor(props:
|
|
36
|
+
constructor(props: TreeBrowserProps);
|
|
81
37
|
componentDidMount(): void;
|
|
82
38
|
componentDidUpdate(): void;
|
|
83
39
|
get _root(): Element | null;
|
|
84
|
-
handleCollectionClick: (e:
|
|
85
|
-
handleItemClick: (e:
|
|
86
|
-
handleKeyDown: (event:
|
|
87
|
-
get collections():
|
|
88
|
-
get expanded():
|
|
89
|
-
getExpanded(state:
|
|
90
|
-
expandOrCollapseNode(collection:
|
|
91
|
-
handleSelection(id:
|
|
40
|
+
handleCollectionClick: (e: SyntheticEvent, collection: CollectionData, expand?: boolean) => void;
|
|
41
|
+
handleItemClick: (e: SyntheticEvent, item: CollectionData) => void;
|
|
42
|
+
handleKeyDown: (event: React.KeyboardEvent, node?: CollectionData | undefined) => void;
|
|
43
|
+
get collections(): Collection[];
|
|
44
|
+
get expanded(): (string | number | undefined)[];
|
|
45
|
+
getExpanded(state: TreeBrowserState, props: TreeBrowserProps): (string | number | undefined)[];
|
|
46
|
+
expandOrCollapseNode(collection: CollectionData): void;
|
|
47
|
+
handleSelection(id: string | number | undefined, type: string): void;
|
|
92
48
|
getNavigableNodes(): Element[];
|
|
93
|
-
moveFocus(delta:
|
|
94
|
-
homeOrEnd(keyCode:
|
|
95
|
-
handleLeftOrRightArrow(keyCode:
|
|
96
|
-
handleOpenOrNext(node
|
|
97
|
-
handleCloseOrPrevious(node
|
|
98
|
-
handleActivation(event:
|
|
99
|
-
getSubCollections(collection:
|
|
100
|
-
getItems(collection:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
49
|
+
moveFocus(delta: number): void;
|
|
50
|
+
homeOrEnd(keyCode: number): void;
|
|
51
|
+
handleLeftOrRightArrow(keyCode: number, node?: CollectionData): void;
|
|
52
|
+
handleOpenOrNext(node?: CollectionData): void;
|
|
53
|
+
handleCloseOrPrevious(node?: CollectionData): void;
|
|
54
|
+
handleActivation(event: React.KeyboardEvent, node?: CollectionData): void;
|
|
55
|
+
getSubCollections(collection: Collection): CollectionProps[];
|
|
56
|
+
getItems(collection: Collection): {
|
|
57
|
+
[x: string]: unknown;
|
|
58
|
+
id: string | number;
|
|
59
|
+
name: string;
|
|
60
|
+
descriptor?: string | undefined;
|
|
61
|
+
thumbnail?: string | undefined;
|
|
62
|
+
}[];
|
|
63
|
+
getIsFlattened: (collection: Collection) => boolean;
|
|
64
|
+
getCollectionProps(collection: Collection): CollectionProps;
|
|
65
|
+
getExpandedIndex(expanded: (string | number | undefined)[], id?: string | number): number;
|
|
104
66
|
renderRoot(): jsx.JSX.Element[];
|
|
105
67
|
render(): jsx.JSX.Element;
|
|
106
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TreeBrowser/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TreeBrowser/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGjD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAIxE,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAGhB;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACrE,MAAM,CAAC,QA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AG,eAAe;IAe3D,gBAAgB,CACd,QAAQ,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,EACzC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAKtB,UAAU;IAoBV,MAAM;CAkBP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,34 +1,131 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { PropValidators, TreeBrowserTheme } from '@instructure/shared-types';
|
|
3
2
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import React, { ReactElement } from 'react';
|
|
4
|
+
import type { TreeBrowserButtonProps } from './TreeButton/props';
|
|
4
5
|
declare type TreeBrowserOwnProps = {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* a normalized hash of collections, keyed by id, that contains an
|
|
8
|
+
* :id, :name, :items (an array of item ids), :collections (an array of
|
|
9
|
+
* collection ids), optional :descriptor text, optional :containerRef function,
|
|
10
|
+
* an optional :renderBeforeItems TreeNode, and an optional :renderAfterItems TreeNode.
|
|
11
|
+
* Each collection must have a unique id.
|
|
12
|
+
*/
|
|
13
|
+
collections: Record<number | string, Collection>;
|
|
14
|
+
/**
|
|
15
|
+
* a hash of items, keyed by id, that contain an :id, :name,
|
|
16
|
+
* optional :descriptor text, and optional :thumbnail url
|
|
17
|
+
*/
|
|
18
|
+
items: Record<number, CollectionItem>;
|
|
19
|
+
/**
|
|
20
|
+
* specifies the id of the root level collection, if present.
|
|
21
|
+
* if no root is specified, all collections will be rendered
|
|
22
|
+
* at the top level
|
|
23
|
+
**/
|
|
7
24
|
rootId?: string | number;
|
|
8
|
-
|
|
25
|
+
/**
|
|
26
|
+
* an array of expanded collection ids, must be accompanied by an 'onCollectionToggle' prop
|
|
27
|
+
*/
|
|
28
|
+
expanded?: (string | number | undefined)[];
|
|
29
|
+
/**
|
|
30
|
+
* an array of collection ids to expand by default
|
|
31
|
+
*/
|
|
9
32
|
defaultExpanded?: (string | number)[];
|
|
33
|
+
/**
|
|
34
|
+
* There are 2 types of tree selection: single and multi.
|
|
35
|
+
* This is set up to allow for "multi" in the future without having to deprecate the old API.
|
|
36
|
+
*/
|
|
10
37
|
selectionType?: 'none' | 'single';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
getCollectionProps?: (...args: any[]) => any;
|
|
38
|
+
onCollectionToggle?: (collection: CollectionData) => void;
|
|
39
|
+
onItemClick?: (data: CollectionData) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Whether or not to show the root collection specified in rootId prop or
|
|
42
|
+
* to begin with its immediate subcollections and items instead
|
|
43
|
+
*/
|
|
18
44
|
showRootCollection?: boolean;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
45
|
+
/**
|
|
46
|
+
* An optional label to assist visually impaired users
|
|
47
|
+
*/
|
|
22
48
|
treeLabel?: string;
|
|
23
|
-
|
|
49
|
+
/**
|
|
50
|
+
* An optional compare function to specify order of the collections and the items
|
|
51
|
+
*/
|
|
24
52
|
sortOrder?: (obj1: any, obj2: any) => number;
|
|
53
|
+
} & TreeBrowserBaseProps;
|
|
54
|
+
declare type TreeBrowserBaseProps = {
|
|
55
|
+
/**
|
|
56
|
+
* A function called with each item's props as an argument. The return value of this function is a
|
|
57
|
+
* props object which will be passed to the item when it is rendered. This is useful for situations where
|
|
58
|
+
* you need to render the item differently depending on it's props. For example, if you would like to
|
|
59
|
+
* display a different icon for items with a certain name.
|
|
60
|
+
*/
|
|
61
|
+
getItemProps?: (props: Record<string, any>) => Record<string, any>;
|
|
62
|
+
/**
|
|
63
|
+
* A function called with each collection's props as an argument. The return value of this function is a
|
|
64
|
+
* props object which will be passed to the collection when it is rendered. This is useful for situations where
|
|
65
|
+
* you need to render the collection differently depending on it's props. For example, if you would like to
|
|
66
|
+
* display a different icon for collections with a certain name.
|
|
67
|
+
*/
|
|
68
|
+
getCollectionProps?: (props: Record<string, any>) => TreeBrowserButtonProps;
|
|
69
|
+
onCollectionClick?: (e: React.MouseEvent, data: CollectionData) => void;
|
|
70
|
+
} & TreeBrowserCommonProps;
|
|
71
|
+
declare type TreeBrowserCommonProps = {
|
|
72
|
+
size?: 'small' | 'medium' | 'large';
|
|
73
|
+
variant?: 'folderTree' | 'indent';
|
|
74
|
+
collectionIcon?: React.ReactNode | ((props: unknown) => React.ReactNode);
|
|
75
|
+
collectionIconExpanded?: React.ReactNode | ((props: unknown) => React.ReactNode);
|
|
76
|
+
itemIcon?: React.ReactNode | ((props: unknown) => React.ReactNode);
|
|
77
|
+
renderContent?: (props: TreeBrowserButtonProps) => JSX.Element;
|
|
25
78
|
};
|
|
26
79
|
declare type PropKeys = keyof TreeBrowserOwnProps;
|
|
27
80
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
28
81
|
declare type TreeBrowserProps = TreeBrowserOwnProps & WithStyleProps<TreeBrowserTheme, TreeBrowserStyle>;
|
|
29
82
|
declare type TreeBrowserStyle = ComponentStyle<'treeBrowser'>;
|
|
83
|
+
declare type CollectionBase = {
|
|
84
|
+
id: number | string;
|
|
85
|
+
name: string;
|
|
86
|
+
descriptor?: string;
|
|
87
|
+
/**
|
|
88
|
+
* A function that returns a reference to the underlying HTML container
|
|
89
|
+
* @param el The DOM HTMLElement
|
|
90
|
+
*/
|
|
91
|
+
containerRef?: (el: HTMLElement | null) => void;
|
|
92
|
+
/**
|
|
93
|
+
* children of type TreeNode
|
|
94
|
+
*/
|
|
95
|
+
renderBeforeItems?: ReactElement;
|
|
96
|
+
/**
|
|
97
|
+
* children of type TreeNode
|
|
98
|
+
*/
|
|
99
|
+
renderAfterItems?: ReactElement;
|
|
100
|
+
};
|
|
101
|
+
declare type Collection = CollectionBase & {
|
|
102
|
+
items?: number[];
|
|
103
|
+
collections?: (number | string)[];
|
|
104
|
+
};
|
|
105
|
+
declare type CollectionItem = {
|
|
106
|
+
id: number | string;
|
|
107
|
+
name: string;
|
|
108
|
+
descriptor?: string;
|
|
109
|
+
thumbnail?: string;
|
|
110
|
+
[key: string]: unknown;
|
|
111
|
+
};
|
|
112
|
+
declare type CollectionProps = {
|
|
113
|
+
collections?: CollectionProps[];
|
|
114
|
+
items?: CollectionItem[];
|
|
115
|
+
expanded?: boolean;
|
|
116
|
+
isCollectionFlattened?: boolean;
|
|
117
|
+
} & CollectionBase;
|
|
118
|
+
declare type CollectionData = {
|
|
119
|
+
id?: number | string;
|
|
120
|
+
expanded?: boolean;
|
|
121
|
+
type: 'child' | 'collection' | 'item';
|
|
122
|
+
};
|
|
30
123
|
declare const propTypes: PropValidators<PropKeys>;
|
|
31
124
|
declare const allowedProps: AllowedPropKeys;
|
|
32
|
-
|
|
125
|
+
declare type TreeBrowserState = {
|
|
126
|
+
selection: string;
|
|
127
|
+
expanded?: (string | number | undefined)[];
|
|
128
|
+
};
|
|
129
|
+
export type { TreeBrowserProps, TreeBrowserState, TreeBrowserStyle, CollectionData, Collection, CollectionItem, CollectionProps, TreeBrowserBaseProps, TreeBrowserCommonProps };
|
|
33
130
|
export { propTypes, allowedProps };
|
|
34
131
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/TreeBrowser/props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/TreeBrowser/props.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE,aAAK,m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