@fluentui-copilot/react-prompt-starter 0.0.0-nightly-20250708-1433-52f2b6b1.1 → 0.0.0-nightly-20250709-0404-150e065c.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.
- package/CHANGELOG.json +3 -3
- package/CHANGELOG.md +4 -4
- package/lib/PromptStarter.js +1 -0
- package/lib/PromptStarterList.js +1 -0
- package/lib/PromptStarterV2.js +1 -0
- package/lib/components/PromptStarter/PromptStarter.js +6 -5
- package/lib/components/PromptStarter/PromptStarter.types.js +2 -1
- package/lib/components/PromptStarter/index.js +1 -0
- package/lib/components/PromptStarter/renderPromptStarter.js +9 -16
- package/lib/components/PromptStarter/usePromptStarter.js +44 -42
- package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js +6 -5
- package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +2 -1
- package/lib/components/PromptStarterV2/PromptStarter/index.js +1 -0
- package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +50 -61
- package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +9 -15
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +51 -49
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +6 -5
- package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +2 -1
- package/lib/components/PromptStarterV2/PromptStarterList/index.js +1 -0
- package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +14 -15
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +97 -97
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +7 -4
- package/lib/contexts/PromptStarterListContext.js +3 -2
- package/lib/index.js +1 -0
- package/lib-commonjs/PromptStarter.js +1 -0
- package/lib-commonjs/PromptStarterList.js +1 -0
- package/lib-commonjs/PromptStarterV2.js +1 -0
- package/lib-commonjs/components/PromptStarter/PromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +1 -0
- package/lib-commonjs/components/PromptStarter/index.js +1 -0
- package/lib-commonjs/components/PromptStarter/renderPromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +1 -0
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +1 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -1
- package/lib-commonjs/contexts/PromptStarterListContext.js +1 -1
- package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/package.json +3 -3
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -94
- package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -119
- package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +0 -61
- package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -112
- package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +0 -137
- package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +0 -77
- package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n primaryAction: 'fai-PromptStarter__primaryAction',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n reasonMarker: 'fai-PromptStarter__reasonMarker',\n actions: 'fai-PromptStarter__actions',\n};\n\nconst useRootResetStyles = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'max-content auto',\n minWidth: '214px',\n\n // Apply styles to the primary action on hover / active states\n '&:hover': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n '&:active': {\n [`& .${promptStarterClassNames.primaryAction}`]: {\n boxShadow: tokens.shadow8,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n },\n\n // Hide actions when not focused or hovered\n ':not(:focus-within):not(:hover)': {\n [`& .${promptStarterClassNames.actions}`]: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n opacity: 0,\n },\n },\n});\n\nconst useStyles = makeStyles({\n primaryAction: {\n gridRow: '1 / 3',\n gridColumn: '1 / 3',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius: '28px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground2,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n rowGap: tokens.spacingHorizontalS,\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}`,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n ...createFocusOutlineStyle({ style: { outlineRadius: '28px' } }),\n },\n\n primaryActionHovered: {\n boxShadow: tokens.shadow16,\n transform: 'scale(1.03)',\n transition: `transform ${tokens.durationNormal} ${tokens.curveDecelerateMin}`,\n },\n\n icon: {\n display: 'flex',\n alignItems: 'center',\n minHeight: tokens.spacingVerticalXXL,\n },\n actions: {\n margin: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalL}\n ${tokens.spacingVerticalNone} ${tokens.spacingHorizontalNone}`,\n position: 'relative',\n gridRow: '1 / 2',\n gridColumn: '2 / 3',\n\n opacity: 1,\n transition: `opacity ${tokens.durationFast} ${tokens.curveLinear}`,\n },\n prompt: {\n ...typographyStyles.body1Strong,\n\n // Truncate text after two lines.\n display: '-webkit-box',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n overflowY: 'hidden',\n },\n reasonMarker: {\n ...typographyStyles.caption2,\n },\n\n // Hide icon, actions, and reason marker in single column appearance\n singleColumnStyles: {\n display: 'none',\n },\n});\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { isSingleColumn } = state;\n\n const styles = useStyles();\n const rootResetStyles = useRootResetStyles();\n state.root.className = mergeClasses(promptStarterClassNames.root, rootResetStyles, state.root.className);\n state.primaryAction.className = mergeClasses(\n promptStarterClassNames.primaryAction,\n styles.primaryAction,\n state.primaryAction.className,\n );\n state.icon.className = mergeClasses(\n promptStarterClassNames.icon,\n styles.icon,\n isSingleColumn && styles.singleColumnStyles,\n state.icon.className,\n );\n state.prompt.className = mergeClasses(promptStarterClassNames.prompt, styles.prompt, state.prompt.className);\n if (state.reasonMarker) {\n state.reasonMarker.className = mergeClasses(\n promptStarterClassNames.reasonMarker,\n styles.reasonMarker,\n isSingleColumn && styles.singleColumnStyles,\n state.reasonMarker.className,\n );\n }\n if (state.actions) {\n state.actions.className = mergeClasses(\n promptStarterClassNames.actions,\n styles.actions,\n isSingleColumn && styles.singleColumnStyles,\n state.actions.className,\n );\n }\n\n return state;\n};\n"],"names":["promptStarterClassNames","usePromptStarterStyles_unstable","root","primaryAction","icon","prompt","reasonMarker","actions","useRootResetStyles","makeResetStyles","display","gridTemplateColumns","gridTemplateRows","minWidth","boxShadow","tokens","shadow16","transform","transition","durationNormal","curveDecelerateMin","shadow8","clip","height","margin","overflow","padding","width","position","opacity","useStyles","makeStyles","gridRow","gridColumn","flexDirection","borderRadius","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground2","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","rowGap","spacingHorizontalS","spacingVerticalL","spacingHorizontalL","shorthands","border","strokeWidthThin","colorNeutralStroke2","createFocusOutlineStyle","style","outlineRadius","primaryActionHovered","alignItems","minHeight","spacingVerticalXXL","spacingVerticalNone","spacingHorizontalNone","durationFast","curveLinear","typographyStyles","body1Strong","overflowY","caption2","singleColumnStyles","state","isSingleColumn","styles","rootResetStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;IA0GAC,+BAAAA;eAAAA;;;iCA/GN;wBACgB;AAIhB,MAAMD,0BAA8D;IACzEE,MAAM;IACNC,eAAe;IACfC,MAAM;IACNC,QAAQ;IACRC,cAAc;IACdC,SAAS;AACX;AAEA,MAAMC,qBAAqBC,IAAAA,gCAAAA,EAAgB;IACzCC,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,UAAU;IAEV,8DAA8D;IAC9D,WAAW;QACT,CAAC,CAAC,GAAG,EAAEb,wBAAwBG,aAAa,CAAC,CAAC,CAAC,EAAE;YAC/CW,WAAWC,cAAAA,CAAOC,QAAQ;YAC1BC,WAAW;YACXC,YAAY,CAAC,UAAU,EAAEH,cAAAA,CAAOI,cAAc,CAAC,CAAC,EAAEJ,cAAAA,CA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6BAAAA,EACrB1E,wBAAwBI,IAAI,EAC5BmE,OAAOnE,IAAI,EACXkE,kBAAkBC,OAAOH,kBAAkB,EAC3CC,MAAMjE,IAAI,CAACqE,SAAS;IAEtBJ,MAAMhE,MAAM,CAACoE,SAAS,GAAGC,IAAAA,6BAAAA,EAAa1E,wBAAwBK,MAAM,EAAEkE,OAAOlE,MAAM,EAAEgE,MAAMhE,MAAM,CAACoE,SAAS;IAC3G,IAAIJ,MAAM/D,YAAY,EAAE;QACtB+D,MAAM/D,YAAY,CAACmE,SAAS,GAAGC,IAAAA,6BAAAA,EAC7B1E,wBAAwBM,YAAY,EACpCiE,OAAOjE,YAAY,EACnBgE,kBAAkBC,OAAOH,kBAAkB,EAC3CC,MAAM/D,YAAY,CAACmE,SAAS;IAEhC;IACA,IAAIJ,MAAM9D,OAAO,EAAE;QACjB8D,MAAM9D,OAAO,CAACkE,SAAS,GAAGC,IAAAA,6BAAAA,EACxB1E,wBAAwBO,OAAO,EAC/BgE,OAAOhE,OAAO,EACd+D,kBAAkBC,OAAOH,kBAAkB,EAC3CC,MAAM9D,OAAO,CAACkE,SAAS;IAE3B;IAEA,OAAOJ;AACT"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
promptStarterListClassNames: function() {
|
|
13
|
-
return promptStarterListClassNames;
|
|
14
|
-
},
|
|
15
|
-
usePromptStarterListStyles_unstable: function() {
|
|
16
|
-
return usePromptStarterListStyles_unstable;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
-
const promptStarterListClassNames = {
|
|
22
|
-
root: 'fai-PromptStarterList',
|
|
23
|
-
gridWrapper: 'fai-PromptStarterList__gridWrapper',
|
|
24
|
-
expandButton: 'fai-PromptStarterList__expandButton'
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Styles for the root slot
|
|
28
|
-
*/ const useRootClassName = (0, _reactcomponents.makeResetStyles)({
|
|
29
|
-
display: 'flex',
|
|
30
|
-
flexDirection: 'column',
|
|
31
|
-
maxWidth: '772px',
|
|
32
|
-
gap: _tokens.tokens.spacingHorizontalXL
|
|
33
|
-
});
|
|
34
|
-
const useStyles = (0, _reactcomponents.makeStyles)({
|
|
35
|
-
gridWrapper: {
|
|
36
|
-
display: 'grid',
|
|
37
|
-
gap: _tokens.tokens.spacingHorizontalL,
|
|
38
|
-
gridAutoColumns: 'max-content',
|
|
39
|
-
gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,
|
|
40
|
-
gridAutoFlow: 'unset'
|
|
41
|
-
},
|
|
42
|
-
expandButton: {
|
|
43
|
-
alignSelf: 'end',
|
|
44
|
-
[`& .${_reactcomponents.buttonClassNames.icon}`]: {
|
|
45
|
-
fontSize: '12px',
|
|
46
|
-
height: '12px',
|
|
47
|
-
width: '12px'
|
|
48
|
-
},
|
|
49
|
-
':hover': {
|
|
50
|
-
[`& .${_reactcomponents.buttonClassNames.icon}`]: {
|
|
51
|
-
color: _tokens.tokens.colorNeutralForeground2Hover
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
':hover:active': {
|
|
55
|
-
[`& .${_reactcomponents.buttonClassNames.icon}`]: {
|
|
56
|
-
color: _tokens.tokens.colorNeutralForeground2Pressed
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
expandButtonExpanded: {
|
|
61
|
-
[`& > .${_reactcomponents.buttonClassNames.icon}`]: {
|
|
62
|
-
transform: 'rotate(180deg)'
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
const usePromptStarterListStyles_unstable = (state)=>{
|
|
67
|
-
'use no memo';
|
|
68
|
-
const { isExpanded } = state;
|
|
69
|
-
const rootClassName = useRootClassName();
|
|
70
|
-
const styles = useStyles();
|
|
71
|
-
state.root.className = (0, _reactcomponents.mergeClasses)(promptStarterListClassNames.root, rootClassName, state.root.className);
|
|
72
|
-
state.gridWrapper.className = (0, _reactcomponents.mergeClasses)(promptStarterListClassNames.gridWrapper, styles.gridWrapper, state.gridWrapper.className);
|
|
73
|
-
if (state.expandButton) {
|
|
74
|
-
state.expandButton.className = (0, _reactcomponents.mergeClasses)(promptStarterListClassNames.expandButton, styles.expandButton, isExpanded && styles.expandButtonExpanded, state.expandButton.className);
|
|
75
|
-
}
|
|
76
|
-
return state;
|
|
77
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["usePromptStarterListStyles.styles.ts"],"sourcesContent":["import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { PromptStarterListSlots, PromptStarterListState } from './PromptStarterList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const promptStarterListClassNames: SlotClassNames<PromptStarterListSlots> = {\n root: 'fai-PromptStarterList',\n gridWrapper: 'fai-PromptStarterList__gridWrapper',\n expandButton: 'fai-PromptStarterList__expandButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'flex',\n flexDirection: 'column',\n maxWidth: '772px',\n gap: tokens.spacingHorizontalXL,\n});\n\nconst useStyles = makeStyles({\n gridWrapper: {\n display: 'grid',\n gap: tokens.spacingHorizontalL,\n gridAutoColumns: 'max-content',\n\n gridTemplateColumns: `repeat(auto-fit, minmax(214px, 1fr))`,\n gridAutoFlow: 'unset',\n },\n\n expandButton: {\n alignSelf: 'end',\n [`& .${buttonClassNames.icon}`]: {\n fontSize: '12px',\n height: '12px',\n width: '12px',\n },\n ':hover': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n ':hover:active': {\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n expandButtonExpanded: {\n [`& > .${buttonClassNames.icon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n});\n\n/**\n * Apply styling to the PromptStarterList slots based on the state\n */\nexport const usePromptStarterListStyles_unstable = (state: PromptStarterListState): PromptStarterListState => {\n 'use no memo';\n\n const { isExpanded } = state;\n\n const rootClassName = useRootClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(promptStarterListClassNames.root, rootClassName, state.root.className);\n state.gridWrapper.className = mergeClasses(\n promptStarterListClassNames.gridWrapper,\n styles.gridWrapper,\n state.gridWrapper.className,\n );\n if (state.expandButton) {\n state.expandButton.className = mergeClasses(\n promptStarterListClassNames.expandButton,\n styles.expandButton,\n isExpanded && styles.expandButtonExpanded,\n state.expandButton.className,\n );\n }\n\n return state;\n};\n"],"names":["promptStarterListClassNames","usePromptStarterListStyles_unstable","root","gridWrapper","expandButton","useRootClassName","makeResetStyles","display","flexDirection","maxWidth","gap","tokens","spacingHorizontalXL","useStyles","makeStyles","spacingHorizontalL","gridAutoColumns","gridTemplateColumns","gridAutoFlow","alignSelf","buttonClassNames","icon","fontSize","height","width","color","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","expandButtonExpanded","transform","state","isExpanded","rootClassName","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,2BAAAA;eAAAA;;IAuDAC,mCAAAA;eAAAA;;;iCA5D+D;wBAGrD;AAEhB,MAAMD,8BAAsE;IACjFE,MAAM;IACNC,aAAa;IACbC,cAAc;AAChB;AAEA;;CAEC,GACD,MAAMC,m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