@instructure/ui-file-drop 8.25.0 → 8.25.1-snapshot-7
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 +8 -0
- package/es/FileDrop/index.js +61 -69
- package/es/FileDrop/props.js +0 -98
- package/es/FileDrop/utils/getEventFiles.js +8 -6
- package/lib/FileDrop/index.js +63 -70
- package/lib/FileDrop/props.js +0 -98
- package/lib/FileDrop/utils/getEventFiles.js +8 -6
- package/package.json +22 -22
- package/src/FileDrop/index.tsx +75 -106
- package/src/FileDrop/props.ts +91 -76
- package/src/FileDrop/utils/accepts.ts +4 -4
- package/src/FileDrop/utils/getEventFiles.ts +13 -8
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/FileDrop/index.d.ts +48 -43
- package/types/FileDrop/index.d.ts.map +1 -1
- package/types/FileDrop/props.d.ts +89 -8
- package/types/FileDrop/props.d.ts.map +1 -1
- package/types/FileDrop/utils/accepts.d.ts +2 -2
- package/types/FileDrop/utils/accepts.d.ts.map +1 -1
- package/types/FileDrop/utils/getEventFiles.d.ts +2 -1
- package/types/FileDrop/utils/getEventFiles.d.ts.map +1 -1
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
|
+
import type { FormMessage } from '@instructure/ui-form-field';
|
|
3
4
|
import { jsx } from '@instructure/emotion';
|
|
4
5
|
import type { FileDropProps, FileDropState, FileDropStyleProps } from './props';
|
|
5
6
|
/**
|
|
6
7
|
---
|
|
7
8
|
category: components
|
|
8
9
|
---
|
|
10
|
+
@tsProps
|
|
9
11
|
**/
|
|
10
12
|
declare class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
11
13
|
static readonly componentId = "FileDrop";
|
|
12
14
|
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
13
15
|
id?: string | undefined;
|
|
14
|
-
renderLabel:
|
|
16
|
+
renderLabel: React.ReactNode | ((props: {
|
|
17
|
+
isDragAccepted: boolean;
|
|
18
|
+
isDragRejected: boolean;
|
|
19
|
+
interaction: boolean;
|
|
20
|
+
}) => React.ReactNode);
|
|
15
21
|
accept?: string | string[] | undefined;
|
|
16
|
-
messages?:
|
|
17
|
-
onClick?: ((
|
|
18
|
-
onDrop?: ((
|
|
19
|
-
onDropAccepted?: ((
|
|
20
|
-
onDropRejected?: ((
|
|
21
|
-
onDragEnter?: ((
|
|
22
|
-
onDragOver?: ((
|
|
23
|
-
onDragLeave?: ((
|
|
22
|
+
messages?: FormMessage[] | undefined;
|
|
23
|
+
onClick?: ((e: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
24
|
+
onDrop?: ((accepted: ArrayLike<File | DataTransferItem>, rejected: ArrayLike<File | DataTransferItem>, e: React.DragEvent<Element>) => void) | undefined;
|
|
25
|
+
onDropAccepted?: ((accepted: ArrayLike<File | DataTransferItem>, e: React.DragEvent<Element> | React.ChangeEvent<Element>) => void) | undefined;
|
|
26
|
+
onDropRejected?: ((rejected: ArrayLike<File | DataTransferItem>, e: React.DragEvent<Element> | React.ChangeEvent<Element>) => void) | undefined;
|
|
27
|
+
onDragEnter?: ((e: React.DragEvent<Element>) => void) | undefined;
|
|
28
|
+
onDragOver?: ((e: React.DragEvent<Element>) => void) | undefined;
|
|
29
|
+
onDragLeave?: ((e: React.DragEvent<Element>) => void) | undefined;
|
|
24
30
|
shouldEnablePreview?: boolean | undefined;
|
|
25
31
|
shouldAllowMultiple?: boolean | undefined;
|
|
26
32
|
shouldAllowRepeats?: boolean | undefined;
|
|
@@ -36,16 +42,20 @@ declare class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
|
36
42
|
}>;
|
|
37
43
|
static allowedProps: readonly (keyof {
|
|
38
44
|
id?: string | undefined;
|
|
39
|
-
renderLabel:
|
|
45
|
+
renderLabel: React.ReactNode | ((props: {
|
|
46
|
+
isDragAccepted: boolean;
|
|
47
|
+
isDragRejected: boolean;
|
|
48
|
+
interaction: boolean;
|
|
49
|
+
}) => React.ReactNode);
|
|
40
50
|
accept?: string | string[] | undefined;
|
|
41
|
-
messages?:
|
|
42
|
-
onClick?: ((
|
|
43
|
-
onDrop?: ((
|
|
44
|
-
onDropAccepted?: ((
|
|
45
|
-
onDropRejected?: ((
|
|
46
|
-
onDragEnter?: ((
|
|
47
|
-
onDragOver?: ((
|
|
48
|
-
onDragLeave?: ((
|
|
51
|
+
messages?: FormMessage[] | undefined;
|
|
52
|
+
onClick?: ((e: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
53
|
+
onDrop?: ((accepted: ArrayLike<File | DataTransferItem>, rejected: ArrayLike<File | DataTransferItem>, e: React.DragEvent<Element>) => void) | undefined;
|
|
54
|
+
onDropAccepted?: ((accepted: ArrayLike<File | DataTransferItem>, e: React.DragEvent<Element> | React.ChangeEvent<Element>) => void) | undefined;
|
|
55
|
+
onDropRejected?: ((rejected: ArrayLike<File | DataTransferItem>, e: React.DragEvent<Element> | React.ChangeEvent<Element>) => void) | undefined;
|
|
56
|
+
onDragEnter?: ((e: React.DragEvent<Element>) => void) | undefined;
|
|
57
|
+
onDragOver?: ((e: React.DragEvent<Element>) => void) | undefined;
|
|
58
|
+
onDragLeave?: ((e: React.DragEvent<Element>) => void) | undefined;
|
|
49
59
|
shouldEnablePreview?: boolean | undefined;
|
|
50
60
|
shouldAllowMultiple?: boolean | undefined;
|
|
51
61
|
shouldAllowRepeats?: boolean | undefined;
|
|
@@ -60,13 +70,7 @@ declare class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
|
60
70
|
margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
|
|
61
71
|
})[];
|
|
62
72
|
static defaultProps: {
|
|
63
|
-
onClick: (
|
|
64
|
-
onDrop: (accepted: any, rejected: any, e: any) => void;
|
|
65
|
-
onDropAccepted: (accepted: any, e: any) => void;
|
|
66
|
-
onDropRejected: (rejected: any, e: any) => void;
|
|
67
|
-
onDragEnter: (e: any) => void;
|
|
68
|
-
onDragOver: (e: any) => void;
|
|
69
|
-
onDragLeave: (e: any) => void;
|
|
73
|
+
onClick: (_e: React.MouseEvent) => void;
|
|
70
74
|
shouldEnablePreview: boolean;
|
|
71
75
|
shouldAllowMultiple: boolean;
|
|
72
76
|
shouldAllowRepeats: boolean;
|
|
@@ -78,35 +82,36 @@ declare class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
|
78
82
|
constructor(props: FileDropProps);
|
|
79
83
|
componentDidMount(): void;
|
|
80
84
|
componentDidUpdate(): void;
|
|
85
|
+
convertToFile(fileLikeItem: DataTransferItem | File): File | null;
|
|
81
86
|
makeStyleProps: () => FileDropStyleProps;
|
|
82
87
|
state: FileDropState;
|
|
83
88
|
enterCounter: number;
|
|
84
|
-
fileInputEl: null;
|
|
89
|
+
fileInputEl: HTMLInputElement | null;
|
|
85
90
|
defaultId: string | null;
|
|
86
91
|
messagesId: string;
|
|
87
92
|
ref: Element | null;
|
|
88
93
|
handleElementRef: (el: Element | null) => void;
|
|
89
94
|
get functionallyDisabled(): boolean;
|
|
90
|
-
get hasMessages():
|
|
95
|
+
get hasMessages(): boolean | undefined;
|
|
91
96
|
get interaction(): import("@instructure/ui-react-utils").InteractionType;
|
|
92
|
-
get invalid():
|
|
93
|
-
getDataTransferItems(e:
|
|
94
|
-
handleDragEnter: (e:
|
|
95
|
-
handleDragOver: (e:
|
|
96
|
-
handleDragLeave: (e:
|
|
97
|
-
parseFiles(fileList:
|
|
98
|
-
handleChange: (e:
|
|
99
|
-
fileAccepted: (file:
|
|
100
|
-
fileMatchSize(file:
|
|
101
|
-
allFilesAccepted(files:
|
|
102
|
-
acceptStr():
|
|
97
|
+
get invalid(): boolean;
|
|
98
|
+
getDataTransferItems(e: React.ChangeEvent | React.DragEvent, shouldEnablePreview?: boolean): Array<File>;
|
|
99
|
+
handleDragEnter: (e: React.DragEvent) => void;
|
|
100
|
+
handleDragOver: (e: React.DragEvent) => boolean;
|
|
101
|
+
handleDragLeave: (e: React.DragEvent) => void;
|
|
102
|
+
parseFiles(fileList: Array<DataTransferItem | File>): (File | DataTransferItem)[][];
|
|
103
|
+
handleChange: (e: React.ChangeEvent | React.DragEvent) => void;
|
|
104
|
+
fileAccepted: (file: File) => boolean;
|
|
105
|
+
fileMatchSize(file: File): boolean;
|
|
106
|
+
allFilesAccepted(files: Array<File>): boolean;
|
|
107
|
+
acceptStr(): string | undefined;
|
|
103
108
|
renderLabel(): any;
|
|
104
|
-
handleRef: (el:
|
|
109
|
+
handleRef: (el: HTMLInputElement) => void;
|
|
105
110
|
handleBlur: () => void;
|
|
106
111
|
handleFocus: () => void;
|
|
107
|
-
handleClick: (e:
|
|
108
|
-
handleKeyDown: (e:
|
|
109
|
-
handleKeyUp: (e:
|
|
112
|
+
handleClick: (e: React.MouseEvent) => void;
|
|
113
|
+
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
114
|
+
handleKeyUp: (e: React.KeyboardEvent) => void;
|
|
110
115
|
render(): jsx.JSX.Element;
|
|
111
116
|
}
|
|
112
117
|
export default FileDrop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FileDrop/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FileDrop/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAa7D,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAM/E;;;;;GAKG;A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I,CAAC;IAInC,SAAS;IAKT,WAAW;IASX,SAAS,OAAQ,gBAAgB,UAEhC;IAED,UAAU,aAKT;IAED,WAAW,aAKV;IAED,WAAW,MAAO,gBAAgB,UAUjC;IAED,aAAa,MAAO,mBAAmB,UAMtC;IAED,WAAW,MAAO,mBAAmB,UAUpC;IAED,MAAM;CA8EP;AAED,eAAe,QAAQ,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -3,29 +3,110 @@ import type { FormMessage } from '@instructure/ui-form-field';
|
|
|
3
3
|
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
4
|
import type { PropValidators, FileDropTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
5
5
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils';
|
|
6
|
+
declare type RenderLabelProps = {
|
|
7
|
+
isDragAccepted: boolean;
|
|
8
|
+
isDragRejected: boolean;
|
|
9
|
+
interaction: boolean;
|
|
10
|
+
};
|
|
6
11
|
declare type FileDropOwnProps = {
|
|
12
|
+
/**
|
|
13
|
+
* The id of the input (to link it to its label for a11y)
|
|
14
|
+
*/
|
|
7
15
|
id?: string;
|
|
8
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The content of FileDrop; can be a component or React node.
|
|
18
|
+
* Components receive `isDragAccepted` and `isDragRejected` as props.
|
|
19
|
+
*/
|
|
20
|
+
renderLabel: ((props: RenderLabelProps) => React.ReactNode) | React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* The mime media type/s or file extension/s allowed to be dropped inside
|
|
23
|
+
*/
|
|
9
24
|
accept?: string | string[];
|
|
25
|
+
/**
|
|
26
|
+
* object with shape: `{
|
|
27
|
+
* text: PropTypes.node,
|
|
28
|
+
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
29
|
+
* }`
|
|
30
|
+
*/
|
|
10
31
|
messages?: FormMessage[];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Called when clicking on drop area to select files to upload
|
|
34
|
+
*/
|
|
35
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Called when dropping files or when file dialog window exits successfully
|
|
38
|
+
*/
|
|
39
|
+
onDrop?: (accepted: ArrayLike<DataTransferItem | File>, rejected: ArrayLike<DataTransferItem | File>, e: React.DragEvent) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Called when dropping allowed files
|
|
42
|
+
*/
|
|
43
|
+
onDropAccepted?: (accepted: ArrayLike<DataTransferItem | File>, e: React.DragEvent | React.ChangeEvent) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Called when dropping rejected files
|
|
46
|
+
*/
|
|
47
|
+
onDropRejected?: (rejected: ArrayLike<DataTransferItem | File>, e: React.DragEvent | React.ChangeEvent) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Called when dragging files
|
|
50
|
+
* and passing through FileDrop's content for the first time
|
|
51
|
+
*/
|
|
52
|
+
onDragEnter?: (e: React.DragEvent) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Called when dragging files and passing through FileDrop's content
|
|
55
|
+
*/
|
|
56
|
+
onDragOver?: (e: React.DragEvent) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Called when dragging files and leaving FileDrop's content
|
|
59
|
+
*/
|
|
60
|
+
onDragLeave?: (e: React.DragEvent) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Flag to use window.URL.createObjectURL for each dropped file and pass it through file.preview
|
|
63
|
+
*/
|
|
18
64
|
shouldEnablePreview?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Flag to allow multiple files to drop at once
|
|
67
|
+
*/
|
|
19
68
|
shouldAllowMultiple?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Flag to allow upload of the same file more than once
|
|
71
|
+
*/
|
|
20
72
|
shouldAllowRepeats?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* the maximum file size allowed
|
|
75
|
+
*/
|
|
21
76
|
maxSize?: number;
|
|
77
|
+
/**
|
|
78
|
+
* the minimum file size allowed
|
|
79
|
+
*/
|
|
22
80
|
minSize?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Specifies if interaction with the input is enabled, disabled, or readonly.
|
|
83
|
+
*/
|
|
23
84
|
interaction?: 'enabled' | 'disabled' | 'readonly';
|
|
85
|
+
/**
|
|
86
|
+
* Set the CSS `display` property on FileInput's outermost element
|
|
87
|
+
*/
|
|
24
88
|
display?: 'block' | 'inline-block';
|
|
89
|
+
/**
|
|
90
|
+
* Set the CSS `height` property on FileInput's outermost element
|
|
91
|
+
*/
|
|
25
92
|
height?: string | number;
|
|
93
|
+
/**
|
|
94
|
+
* Set the CSS `width` property on FileInput's outermost element
|
|
95
|
+
*/
|
|
26
96
|
width?: string | number;
|
|
97
|
+
/**
|
|
98
|
+
* Set the CSS `maxWidth` property on FileInput's outermost element
|
|
99
|
+
*/
|
|
27
100
|
maxWidth?: string | number;
|
|
101
|
+
/**
|
|
102
|
+
* Set the CSS `minWidth` property on FileInput's outermost element
|
|
103
|
+
*/
|
|
28
104
|
minWidth?: string | number;
|
|
105
|
+
/**
|
|
106
|
+
* Valid values are 0, none, auto, xxx-small, xx-small, x-small, small,
|
|
107
|
+
* medium, large, x-large, xx-large. Apply these values via familiar
|
|
108
|
+
* CSS-like shorthand. For example: margin="small auto large".
|
|
109
|
+
*/
|
|
29
110
|
margin?: Spacing;
|
|
30
111
|
};
|
|
31
112
|
declare type FileDropState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/FileDrop/props.ts"],"names":[],"mappings":";AA6BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAA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,MAAM,CAAA;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,aAAK,aAAa,GAAG;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,OAAO,CAAA;IAClB,sBAAsB,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,aAAK,kBAAkB,GAAG;IACxB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,gBAAgB,EAAE,OAAO,CAAA;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,gBAAgB,CAAA;AAEtC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,aAAa,GAAG,gBAAgB,GACnC,cAAc,CAAC,aAAa,EAAE,aAAa,CAAC,GAC5C,mBAAmB,CAAC,gBAAgB,CAAC,GACrC,wBAAwB,CAAA;AAE1B,aAAK,aAAa,GAAG,cAAc,CACjC,eAAe,GAAG,eAAe,GAAG,sBAAsB,GAAG,gBAAgB,CAC9E,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA2BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAwBnB,CAAA;AAED,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare function accepts(file:
|
|
2
|
-
declare function getAcceptList(accept:
|
|
1
|
+
declare function accepts(file: File, acceptProp: string | string[]): boolean;
|
|
2
|
+
declare function getAcceptList(accept: string | string[]): string[];
|
|
3
3
|
export default accepts;
|
|
4
4
|
export { accepts, getAcceptList };
|
|
5
5
|
//# sourceMappingURL=accepts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accepts.d.ts","sourceRoot":"","sources":["../../../src/FileDrop/utils/accepts.ts"],"names":[],"mappings":"AAwBA,iBAAS,OAAO,CAAC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"accepts.d.ts","sourceRoot":"","sources":["../../../src/FileDrop/utils/accepts.ts"],"names":[],"mappings":"AAwBA,iBAAS,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,WAqBzD;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,YAG/C;AAED,eAAe,OAAO,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare function getEventFiles(event: React.DragEvent | React.ChangeEvent, inputEl: HTMLInputElement | null): ArrayLike<DataTransferItem | File | never>;
|
|
2
3
|
export default getEventFiles;
|
|
3
4
|
export { getEventFiles };
|
|
4
5
|
//# sourceMappingURL=getEventFiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEventFiles.d.ts","sourceRoot":"","sources":["../../../src/FileDrop/utils/getEventFiles.ts"],"names":[],"mappings":"AAwBA,iBAAS,aAAa,
|
|
1
|
+
{"version":3,"file":"getEventFiles.d.ts","sourceRoot":"","sources":["../../../src/FileDrop/utils/getEventFiles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,iBAAS,aAAa,CACpB,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,WAAW,EAC1C,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAC/B,SAAS,CAAC,gBAAgB,GAAG,IAAI,GAAG,KAAK,CAAC,CAc5C;AAED,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,CAAA"}
|