solid-ui 2.4.27-b8d76ce5 → 2.4.27-c6bf02ea
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/dist/670.solid-ui.min.js +1 -0
- package/dist/805.solid-ui.min.js +3 -0
- package/dist/805.solid-ui.min.js.LICENSE.txt +58 -0
- package/dist/805.solid-ui.min.js.map +1 -0
- package/dist/_2b19.solid-ui.js +14 -0
- package/dist/_2b19.solid-ui.js.map +1 -0
- package/dist/solid-ui.js +4929 -20456
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.LICENSE.txt +0 -67
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +12134 -0
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -0
- package/lib/acl/access-controller.d.ts +2 -3
- package/lib/acl/access-controller.d.ts.map +1 -1
- package/lib/acl/access-controller.js +17 -15
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.d.ts.map +1 -1
- package/lib/acl/access-groups.js +78 -8
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.d.ts.map +1 -1
- package/lib/acl/acl-control.js +10 -11
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.d.ts +1 -1
- package/lib/acl/acl.js +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.d.ts.map +1 -1
- package/lib/acl/add-agent-buttons.js +4 -3
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/chat/bookmarks.js +6 -7
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +250 -61
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +129 -126
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +633 -423
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +290 -160
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +463 -277
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +166 -144
- package/lib/chat/thread.js.map +1 -1
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js +5 -1
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.d.ts.map +1 -1
- package/lib/header/index.js +46 -20
- package/lib/header/index.js.map +1 -1
- package/lib/log.js +5 -5
- package/lib/log.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +63 -38
- package/lib/login/login.js.map +1 -1
- package/lib/pad.js +4 -1
- package/lib/pad.js.map +1 -1
- package/lib/participation.js +2 -1
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js +4 -0
- package/lib/preferences.js.map +1 -1
- package/lib/style.js +60 -2
- package/lib/style.js.map +1 -1
- package/lib/utils/headerFooterHelpers.d.ts +0 -4
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js +1 -26
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.js +5 -5
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.d.ts.map +1 -1
- package/lib/widgets/buttons.js +43 -51
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +8 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +8 -3
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +5 -0
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms.js +12 -5
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/peoplePicker.js +11 -0
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/package.json +8 -8
- package/lib/acl/styles.d.ts +0 -90
- package/lib/acl/styles.d.ts.map +0 -1
- package/lib/acl/styles.js +0 -98
- package/lib/acl/styles.js.map +0 -1
- package/lib/footer/styleMap.d.ts +0 -8
- package/lib/footer/styleMap.d.ts.map +0 -1
- package/lib/footer/styleMap.js +0 -15
- package/lib/footer/styleMap.js.map +0 -1
- package/lib/header/styleMap.d.ts +0 -117
- package/lib/header/styleMap.d.ts.map +0 -1
- package/lib/header/styleMap.js +0 -139
- package/lib/header/styleMap.js.map +0 -1
- package/lib/jss/index.d.ts +0 -20
- package/lib/jss/index.d.ts.map +0 -1
- package/lib/jss/index.js +0 -47
- package/lib/jss/index.js.map +0 -1
package/lib/header/styleMap.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.styleMap = void 0;
|
|
7
|
-
var styleMap = {
|
|
8
|
-
'header-user-menu': {},
|
|
9
|
-
'header-user-menu__link': {
|
|
10
|
-
background: 'none',
|
|
11
|
-
border: '0',
|
|
12
|
-
color: 'black',
|
|
13
|
-
cursor: 'pointer',
|
|
14
|
-
display: 'block',
|
|
15
|
-
fontFamily: 'Arial',
|
|
16
|
-
fontSize: '1em',
|
|
17
|
-
textAlign: 'left',
|
|
18
|
-
padding: '1em',
|
|
19
|
-
width: '100%',
|
|
20
|
-
'&:focus, &:hover': {
|
|
21
|
-
backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'
|
|
22
|
-
// backgroundColor: '#eee'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
a: {
|
|
26
|
-
textDecoration: 'none'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
'header-user-menu__trigger': {
|
|
30
|
-
background: 'none',
|
|
31
|
-
border: '0',
|
|
32
|
-
cursor: 'pointer',
|
|
33
|
-
width: '60px',
|
|
34
|
-
// defined in mashlib as a SASS variable $icon_size
|
|
35
|
-
height: '60px',
|
|
36
|
-
// defined in mashlib as a SASS variable $icon_size
|
|
37
|
-
img: {
|
|
38
|
-
borderRadius: '50%',
|
|
39
|
-
height: '56px',
|
|
40
|
-
// defined in mashlib as a SASS variable $icon_size - 4px
|
|
41
|
-
width: '56px'
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
'header-user-menu__button': {
|
|
45
|
-
background: 'none',
|
|
46
|
-
border: '0',
|
|
47
|
-
color: 'black',
|
|
48
|
-
cursor: 'pointer',
|
|
49
|
-
display: 'block',
|
|
50
|
-
fontFamily: 'Arial',
|
|
51
|
-
fontSize: '1em',
|
|
52
|
-
textAlign: 'left',
|
|
53
|
-
padding: '1em',
|
|
54
|
-
width: '100%',
|
|
55
|
-
'&:focus, &:hover': {
|
|
56
|
-
backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
'header-user-menu__list': {
|
|
60
|
-
listStyle: 'none',
|
|
61
|
-
margin: '0',
|
|
62
|
-
padding: '0'
|
|
63
|
-
},
|
|
64
|
-
'header-user-menu__navigation-menu': {
|
|
65
|
-
background: 'white',
|
|
66
|
-
border: 'solid 1px #000000',
|
|
67
|
-
// the color was defined in mashlib as a SASS variable $divider_color
|
|
68
|
-
borderRight: '0',
|
|
69
|
-
position: 'absolute',
|
|
70
|
-
right: '0',
|
|
71
|
-
top: '60px',
|
|
72
|
-
// defined in mashlib as a SASS variable $icon_size
|
|
73
|
-
width: '200px',
|
|
74
|
-
'z-index': '1',
|
|
75
|
-
'&[aria-hidden = true]': {
|
|
76
|
-
display: 'none'
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
'header-user-menu__list-item': {
|
|
80
|
-
borderBottom: 'solid 1px #000000',
|
|
81
|
-
// the color was defined in mashlib as a SASS variable $divider_color
|
|
82
|
-
'&:last-child': {
|
|
83
|
-
border: '0'
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
'header-user-menu__photo': {
|
|
87
|
-
borderRadius: '50%',
|
|
88
|
-
backgroundPosition: 'center',
|
|
89
|
-
backgroundRepeat: 'no-repeat',
|
|
90
|
-
backgroundSize: 'cover',
|
|
91
|
-
height: '50px',
|
|
92
|
-
// $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px
|
|
93
|
-
width: '50px'
|
|
94
|
-
},
|
|
95
|
-
'header-banner': {
|
|
96
|
-
boxShadow: '0px 1px 4px #000000',
|
|
97
|
-
// the color was defined in mashlib as a SASS variable $divider_color
|
|
98
|
-
display: 'flex',
|
|
99
|
-
justifyContent: 'space-between',
|
|
100
|
-
padding: '0 1.5em',
|
|
101
|
-
marginBottom: '4px'
|
|
102
|
-
},
|
|
103
|
-
'header-banner__link': {
|
|
104
|
-
display: 'block'
|
|
105
|
-
},
|
|
106
|
-
'header-banner__right-menu': {
|
|
107
|
-
display: 'flex'
|
|
108
|
-
},
|
|
109
|
-
'header-banner__login': {
|
|
110
|
-
marginLeft: 'auto',
|
|
111
|
-
input: {
|
|
112
|
-
// hacks to override the default style of login and signup button from solid-ui
|
|
113
|
-
margin: '0.75em 0 0.75em 0.5em !important',
|
|
114
|
-
padding: '0.5em !important'
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
'header-banner__user-menu': {
|
|
118
|
-
borderLeft: 'solid 1px #000000',
|
|
119
|
-
// the color was defined in mashlib as a SASS variable $divider_color
|
|
120
|
-
marginLeft: 'auto'
|
|
121
|
-
},
|
|
122
|
-
'header-banner__help-menu': {
|
|
123
|
-
borderLeft: 'solid 1px #000000',
|
|
124
|
-
// the color was defined in mashlib as a SASS variable $divider_color
|
|
125
|
-
marginLeft: 'auto'
|
|
126
|
-
},
|
|
127
|
-
'header-banner__icon': {
|
|
128
|
-
backgroundSize: '65px 60px',
|
|
129
|
-
height: '60px !important',
|
|
130
|
-
// this is the icon size
|
|
131
|
-
width: '65px !important' // may just be 65px round($icon-size * 352 / 322);
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
'header-banner__help-icon': {
|
|
135
|
-
width: '28px !important'
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
exports.styleMap = styleMap;
|
|
139
|
-
//# sourceMappingURL=styleMap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styleMap.js","names":["styleMap","background","border","color","cursor","display","fontFamily","fontSize","textAlign","padding","width","backgroundColor","a","textDecoration","height","img","borderRadius","listStyle","margin","borderRight","position","right","top","borderBottom","backgroundPosition","backgroundRepeat","backgroundSize","boxShadow","justifyContent","marginBottom","marginLeft","input","borderLeft","exports"],"sources":["../../src/header/styleMap.ts"],"sourcesContent":["export const styleMap = {\n 'header-user-menu': {\n },\n 'header-user-menu__link': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n // backgroundColor: '#eee'\n },\n a: {\n textDecoration: 'none'\n }\n },\n 'header-user-menu__trigger': {\n background: 'none',\n border: '0',\n cursor: 'pointer',\n width: '60px', // defined in mashlib as a SASS variable $icon_size\n height: '60px', // defined in mashlib as a SASS variable $icon_size\n img: {\n borderRadius: '50%',\n height: '56px', // defined in mashlib as a SASS variable $icon_size - 4px\n width: '56px'\n }\n },\n 'header-user-menu__button': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n }\n },\n 'header-user-menu__list': {\n listStyle: 'none',\n margin: '0',\n padding: '0'\n },\n 'header-user-menu__navigation-menu': {\n background: 'white',\n border: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n borderRight: '0',\n position: 'absolute',\n right: '0',\n top: '60px', // defined in mashlib as a SASS variable $icon_size\n width: '200px',\n 'z-index': '1',\n '&[aria-hidden = true]': {\n display: 'none'\n }\n },\n 'header-user-menu__list-item': {\n borderBottom: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n '&:last-child': {\n border: '0'\n }\n },\n 'header-user-menu__photo': {\n borderRadius: '50%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '50px', // $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px\n width: '50px'\n },\n 'header-banner': {\n boxShadow: '0px 1px 4px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n display: 'flex',\n justifyContent: 'space-between',\n padding: '0 1.5em',\n marginBottom: '4px'\n },\n 'header-banner__link': {\n display: 'block'\n },\n 'header-banner__right-menu': {\n display: 'flex'\n },\n 'header-banner__login': {\n marginLeft: 'auto',\n input: {\n // hacks to override the default style of login and signup button from solid-ui\n margin: '0.75em 0 0.75em 0.5em !important',\n padding: '0.5em !important'\n }\n },\n 'header-banner__user-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__help-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__icon': {\n backgroundSize: '65px 60px',\n height: '60px !important', // this is the icon size\n width: '65px !important' // may just be 65px round($icon-size * 352 / 322);\n },\n 'header-banner__help-icon': {\n width: '28px !important'\n }\n}\n"],"mappings":";;;;;;AAAO,IAAMA,QAAQ,GAAG;EACtB,kBAAkB,EAAE,CACpB,CAAC;EACD,wBAAwB,EAAE;IACxBC,UAAU,EAAE,MAAM;IAClBC,MAAM,EAAE,GAAG;IACXC,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE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
|
-
* usable as wrappers around JSS (A CSS authoring tool).
|
|
4
|
-
* See https://cssinjs.org/
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*/
|
|
7
|
-
import { Jss, Styles, StyleSheet } from 'jss';
|
|
8
|
-
/**
|
|
9
|
-
* returns a StyleSheet object.
|
|
10
|
-
* See https://cssinjs.org/ for more info about JSS.
|
|
11
|
-
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
12
|
-
*/
|
|
13
|
-
export declare function getClasses(insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet;
|
|
14
|
-
/**
|
|
15
|
-
* returns a JSS object.
|
|
16
|
-
* See https://cssinjs.org/ for more info about JSS.
|
|
17
|
-
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
18
|
-
*/
|
|
19
|
-
export declare function getStylesheet(insertionPoint: HTMLElement): Jss;
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/jss/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jss/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAKrD;;;;GAIG;AACH,wBAAgB,UAAU,CAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,CAG5F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAE,cAAc,EAAE,WAAW,GAAG,GAAG,CAW/D"}
|
package/lib/jss/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getClasses = getClasses;
|
|
8
|
-
exports.getStylesheet = getStylesheet;
|
|
9
|
-
var _jss = require("jss");
|
|
10
|
-
var _jssPresetDefault = _interopRequireDefault(require("jss-preset-default"));
|
|
11
|
-
/**
|
|
12
|
-
* Contains [[getClasses]] and [[getStylesheet]] functions,
|
|
13
|
-
* usable as wrappers around JSS (A CSS authoring tool).
|
|
14
|
-
* See https://cssinjs.org/
|
|
15
|
-
* @packageDocumentation
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var stylesheetsMap = new Map();
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* returns a StyleSheet object.
|
|
22
|
-
* See https://cssinjs.org/ for more info about JSS.
|
|
23
|
-
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
24
|
-
*/
|
|
25
|
-
function getClasses(insertionPoint, styles) {
|
|
26
|
-
var stylesheet = getStylesheet(insertionPoint);
|
|
27
|
-
return stylesheet.createStyleSheet(styles).attach();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* returns a JSS object.
|
|
32
|
-
* See https://cssinjs.org/ for more info about JSS.
|
|
33
|
-
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
34
|
-
*/
|
|
35
|
-
function getStylesheet(insertionPoint) {
|
|
36
|
-
var cachedStylesheet = stylesheetsMap.get(insertionPoint);
|
|
37
|
-
if (cachedStylesheet) {
|
|
38
|
-
return cachedStylesheet;
|
|
39
|
-
}
|
|
40
|
-
var stylesheet = (0, _jss.create)({
|
|
41
|
-
insertionPoint: insertionPoint,
|
|
42
|
-
plugins: (0, _jssPresetDefault["default"])().plugins
|
|
43
|
-
});
|
|
44
|
-
stylesheetsMap.set(insertionPoint, stylesheet);
|
|
45
|
-
return stylesheet;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=index.js.map
|
package/lib/jss/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_jss","require","_jssPresetDefault","_interopRequireDefault","stylesheetsMap","Map","getClasses","insertionPoint","styles","stylesheet","getStylesheet","createStyleSheet","attach","cachedStylesheet","get","create","plugins","preset","set"],"sources":["../../src/jss/index.ts"],"sourcesContent":["/**\n * Contains [[getClasses]] and [[getStylesheet]] functions,\n * usable as wrappers around JSS (A CSS authoring tool).\n * See https://cssinjs.org/\n * @packageDocumentation\n */\n\nimport { create, Jss, Styles, StyleSheet } from 'jss'\nimport preset from 'jss-preset-default'\n\nconst stylesheetsMap = new Map<HTMLElement, Jss>()\n\n/**\n * returns a StyleSheet object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getClasses (insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet {\n const stylesheet = getStylesheet(insertionPoint)\n return stylesheet.createStyleSheet(styles).attach()\n}\n\n/**\n * returns a JSS object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getStylesheet (insertionPoint: HTMLElement): Jss {\n const cachedStylesheet = stylesheetsMap.get(insertionPoint)\n if (cachedStylesheet) {\n return cachedStylesheet\n }\n const stylesheet = create({\n insertionPoint,\n plugins: preset().plugins\n })\n stylesheetsMap.set(insertionPoint, stylesheet)\n return stylesheet\n}\n"],"mappings":";;;;;;;;AAOA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAMG,cAAc,GAAG,IAAIC,GAAG,EAAoB;;AAElD;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,cAA2B,EAAEC,MAAuB,EAAc;EAC5F,IAAMC,UAAU,GAAGC,aAAa,CAACH,cAAc,CAAC;EAChD,OAAOE,UAAU,CAACE,gBAAgB,CAACH,MAAM,CAAC,CAACI,MAAM,EAAE;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASF,aAAaA,CAAEH,cAA2B,EAAO;EAC/D,IAAMM,gBAAgB,GAAGT,cAAc,CAACU,GAAG,CAACP,cAAc,CAAC;EAC3D,IAAIM,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB;EACzB;EACA,IAAMJ,UAAU,GAAG,IAAAM,WAAM,EAAC;IACxBR,cAAc,EAAdA,cAAc;IACdS,OAAO,EAAE,IAAAC,4BAAM,GAAE,CAACD;EACpB,CAAC,CAAC;EACFZ,cAAc,CAACc,GAAG,CAACX,cAAc,EAAEE,UAAU,CAAC;EAC9C,OAAOA,UAAU;AACnB"}
|