@mirai/ui 1.0.126 → 1.0.127
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.
|
@@ -43,6 +43,7 @@ var Modal = function Modal(_ref) {
|
|
|
43
43
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
44
44
|
var _useDevice = (0, _hooks.useDevice)(),
|
|
45
45
|
isDesktop = _useDevice.isDesktop;
|
|
46
|
+
var ref = (0, _react.useRef)();
|
|
46
47
|
var _useState = (0, _react.useState)(),
|
|
47
48
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
49
|
dataset = _useState2[0],
|
|
@@ -59,16 +60,22 @@ var Modal = function Modal(_ref) {
|
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
}, [dataset, visible]);
|
|
63
|
+
var handleOverflow = function handleOverflow(event) {
|
|
64
|
+
var _ref$current;
|
|
65
|
+
var target = event.target;
|
|
66
|
+
onOverflow && !((_ref$current = ref.current) !== null && _ref$current !== void 0 && _ref$current.contains(target)) && onOverflow(event);
|
|
67
|
+
};
|
|
62
68
|
var renderer = _helpers.IS_JEST || !portal ? function (jsx) {
|
|
63
69
|
return jsx;
|
|
64
70
|
} : _reactDom.default.createPortal;
|
|
65
71
|
var testId = others['data-testid'];
|
|
66
72
|
return renderer( /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
67
73
|
className: (0, _helpers.styles)(_ModalModule.default.container, overflow && _ModalModule.default.overflow, overflow && blur && _ModalModule.default.blur, visible && _ModalModule.default.visible, onOverflow && _ModalModule.default.onOverflow),
|
|
68
|
-
onPress: visible && overflow ?
|
|
74
|
+
onPress: visible && overflow ? handleOverflow : undefined,
|
|
69
75
|
"data-testid": testId ? "".concat(testId, "-overflow") : undefined
|
|
70
76
|
}, /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
71
77
|
fit: true,
|
|
78
|
+
ref: ref,
|
|
72
79
|
className: (0, _helpers.styles)(_ModalModule.default.modal, !fit && _ModalModule.default.calcWidth, visible && _ModalModule.default.visible, others.className)
|
|
73
80
|
}), (title || onBack || onClose) && /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
74
81
|
forceRow: true,
|
|
@@ -100,6 +107,7 @@ Modal.propTypes = {
|
|
|
100
107
|
title: _propTypes.default.string,
|
|
101
108
|
visible: _propTypes.default.bool,
|
|
102
109
|
onBack: _propTypes.default.func,
|
|
103
|
-
onClose: _propTypes.default.func
|
|
110
|
+
onClose: _propTypes.default.func,
|
|
111
|
+
onOverflow: _propTypes.default.func
|
|
104
112
|
};
|
|
105
113
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["Modal","blur","children","fit","overflow","portal","title","visible","onBack","onClose","onOverflow","others","useDevice","isDesktop","useState","dataset","setDataset","useEffect","document","body","miraiModal","undefined","renderer","IS_JEST","jsx","ReactDOM","createPortal","testId","styles","style","container","modal","calcWidth","className","header","ICON","LEFT","icon","left","right","CLOSE","EXPAND_MORE","propTypes","PropTypes","bool","node","string","func"],"sources":["../../../src/components/Modal/Modal.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { IS_JEST, styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Modal.module.css';\n\nconst Modal = ({\n blur = false,\n children,\n fit = false,\n overflow = true,\n portal = false,\n title,\n visible,\n onBack,\n onClose,\n onOverflow,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n\n const [dataset, setDataset] = useState();\n\n useEffect(() => {\n if (visible && !dataset) {\n setDataset(true);\n document.body.dataset.miraiModal = true;\n }\n\n return () => {\n if (visible && dataset) {\n setDataset(undefined);\n delete document.body.dataset.miraiModal;\n }\n };\n }, [dataset, visible]);\n\n const renderer = IS_JEST || !portal ? (jsx) => jsx : ReactDOM.createPortal;\n\n const { ['data-testid']: testId } = others;\n\n return renderer(\n <Pressable\n className={styles(\n style.container,\n overflow && style.overflow,\n overflow && blur && style.blur,\n visible && style.visible,\n onOverflow && style.onOverflow,\n )}\n onPress={visible && overflow ?
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["Modal","blur","children","fit","overflow","portal","title","visible","onBack","onClose","onOverflow","others","useDevice","isDesktop","ref","useRef","useState","dataset","setDataset","useEffect","document","body","miraiModal","undefined","handleOverflow","event","target","current","contains","renderer","IS_JEST","jsx","ReactDOM","createPortal","testId","styles","style","container","modal","calcWidth","className","header","ICON","LEFT","icon","left","right","CLOSE","EXPAND_MORE","propTypes","PropTypes","bool","node","string","func"],"sources":["../../../src/components/Modal/Modal.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useRef, useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { IS_JEST, styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Modal.module.css';\n\nconst Modal = ({\n blur = false,\n children,\n fit = false,\n overflow = true,\n portal = false,\n title,\n visible,\n onBack,\n onClose,\n onOverflow,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n const ref = useRef();\n\n const [dataset, setDataset] = useState();\n\n useEffect(() => {\n if (visible && !dataset) {\n setDataset(true);\n document.body.dataset.miraiModal = true;\n }\n\n return () => {\n if (visible && dataset) {\n setDataset(undefined);\n delete document.body.dataset.miraiModal;\n }\n };\n }, [dataset, visible]);\n\n const handleOverflow = (event) => {\n const { target } = event;\n onOverflow && !ref.current?.contains(target) && onOverflow(event);\n };\n\n const renderer = IS_JEST || !portal ? (jsx) => jsx : ReactDOM.createPortal;\n\n const { ['data-testid']: testId } = others;\n\n return renderer(\n <Pressable\n className={styles(\n style.container,\n overflow && style.overflow,\n overflow && blur && style.blur,\n visible && style.visible,\n onOverflow && style.onOverflow,\n )}\n onPress={visible && overflow ? handleOverflow : undefined}\n data-testid={testId ? `${testId}-overflow` : undefined}\n >\n <View\n {...others}\n fit\n ref={ref}\n className={styles(style.modal, !fit && style.calcWidth, visible && style.visible, others.className)}\n >\n {(title || onBack || onClose) && (\n <View forceRow className={style.header}>\n {onBack && (\n <Pressable onPress={onBack} data-testid={testId ? `${testId}-button-back` : undefined}>\n <Icon value={ICON.LEFT} className={style.icon} />\n </Pressable>\n )}\n {title && (\n <Text headline className={styles(style.title, !onBack && style.left, !onClose && style.right)}>\n {title}\n </Text>\n )}\n {onClose && (\n <Pressable onPress={onClose} data-testid={testId ? `${testId}-button-close` : undefined}>\n <Icon value={isDesktop || title !== undefined ? ICON.CLOSE : ICON.EXPAND_MORE} className={style.icon} />\n </Pressable>\n )}\n </View>\n )}\n {children}\n </View>\n </Pressable>,\n document.body,\n );\n};\n\nModal.propTypes = {\n blur: PropTypes.bool,\n children: PropTypes.node,\n fit: PropTypes.bool,\n overflow: PropTypes.bool,\n portal: PropTypes.bool,\n title: PropTypes.string,\n visible: PropTypes.bool,\n onBack: PropTypes.func,\n onClose: PropTypes.func,\n onOverflow: PropTypes.func,\n};\n\nexport { Modal };\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEvC,IAAMA,KAAK,GAAG,SAARA,KAAK,OAYL;EAAA,qBAXJC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,QAAQ,QAARA,QAAQ;IAAA,gBACRC,GAAG;IAAHA,GAAG,yBAAG,KAAK;IAAA,qBACXC,QAAQ;IAARA,QAAQ,8BAAG,IAAI;IAAA,mBACfC,MAAM;IAANA,MAAM,4BAAG,KAAK;IACdC,KAAK,QAALA,KAAK;IACLC,OAAO,QAAPA,OAAO;IACPC,MAAM,QAANA,MAAM;IACNC,OAAO,QAAPA,OAAO;IACPC,UAAU,QAAVA,UAAU;IACPC,MAAM;E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AS,EAAEZ,oBAAK,CAACQ;EAAK,EAAG,CAE3G,CAEJ,EACA1C,QAAQ,CACJ,CACG,EACZkB,QAAQ,CAACC,IAAI,CACd;AACH,CAAC;AAAC;AAEFrB,KAAK,CAACiD,SAAS,GAAG;EAChBhD,IAAI,EAAEiD,kBAAS,CAACC,IAAI;EACpBjD,QAAQ,EAAEgD,kBAAS,CAACE,IAAI;EACxBjD,GAAG,EAAE+C,kBAAS,CAACC,IAAI;EACnB/C,QAAQ,EAAE8C,kBAAS,CAACC,IAAI;EACxB9C,MAAM,EAAE6C,kBAAS,CAACC,IAAI;EACtB7C,KAAK,EAAE4C,kBAAS,CAACG,MAAM;EACvB9C,OAAO,EAAE2C,kBAAS,CAACC,IAAI;EACvB3C,MAAM,EAAE0C,kBAAS,CAACI,IAAI;EACtB7C,OAAO,EAAEyC,kBAAS,CAACI,IAAI;EACvB5C,UAAU,EAAEwC,kBAAS,CAACI;AACxB,CAAC"}
|
|
@@ -55,7 +55,8 @@ var Story = function Story(props) {
|
|
|
55
55
|
for (var _len3 = arguments.length, others = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
56
56
|
others[_key3] = arguments[_key3];
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
(_console3 = console).log.apply(_console3, ['<Modal>::onOverflow'].concat(others));
|
|
59
|
+
handleClose(others);
|
|
59
60
|
};
|
|
60
61
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_.Text, {
|
|
61
62
|
bold: true,
|
|
@@ -69,6 +70,7 @@ var Story = function Story(props) {
|
|
|
69
70
|
headline: true
|
|
70
71
|
}, "Where does it come from?"), /*#__PURE__*/_react.default.createElement(_.Text, null, "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32."), /*#__PURE__*/_react.default.createElement(_Modal.Modal, _extends({}, props, {
|
|
71
72
|
onClose: handleClose,
|
|
73
|
+
onOverflow: handleOverflow,
|
|
72
74
|
visible: visible
|
|
73
75
|
}), /*#__PURE__*/_react.default.createElement(_.View, {
|
|
74
76
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","useState","visible","setVisible","visibleSecond","setVisibleSecond","handleBack","others","console","log","handleClose","handleOverflow","padding","storyName","args","blur","fit","overflow","portal","argTypes"],"sources":["../../../src/components/Modal/Modal.stories.jsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { Button, Text, View } from '../../';\nimport { Modal } from './Modal';\n\nexport default {\n title: 'Components',\n};\n\nexport const Story = (props) => {\n const [visible, setVisible] = useState(true);\n const [visibleSecond, setVisibleSecond] = useState(false);\n\n const handleBack = (...others) => {\n console.log('<Modal>::onBack', ...others);\n setVisibleSecond(false);\n };\n\n const handleClose = (...others) => {\n console.log('<Modal>::onClose', ...others);\n setVisible(false);\n };\n\n const handleOverflow = (...others) => console.log('<Modal>::onOverflow', ...others);\n\n return (\n <>\n <Text bold headline>\n What is Lorem Ipsum?\n </Text>\n <Text>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make\n a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,\n remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing\n Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions\n of Lorem Ipsum.\n </Text>\n\n <Button onPress={() => setVisible(true)}>Show modal</Button>\n\n <Text bold headline>\n Where does it come from?\n </Text>\n <Text>\n Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin\n literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney\n College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and\n going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum\n comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by\n Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance.\n The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n </Text>\n\n <Modal {...props} onClose={handleClose} visible={visible}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n <Button onPress={() => setVisibleSecond(true)}>Show another Modal</Button>\n </View>\n </Modal>\n\n <Modal {...props} onBack={handleBack} onOverflow={handleOverflow} visible={visibleSecond}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n </View>\n </Modal>\n </>\n );\n};\nStory.storyName = 'Modal';\n\nStory.args = {\n blur: false,\n fit: false,\n overflow: true,\n portal: false,\n title: 'title',\n // inherited properties\n ['data-testid']: 'test-story',\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAEjB;EACbA,KAAK,EAAE;AACT,CAAC;AAAA;AAEM,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK,EAAK;EAC9B,gBAA8B,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAAA;IAArCC,OAAO;IAAEC,UAAU;EAC1B,iBAA0C,IAAAF,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAlDG,aAAa;IAAEC,gBAAgB;EAEtC,IAAMC,UAAU,GAAG,SAAbA,UAAU,GAAkB;IAAA;IAAA,kCAAXC,MAAM;MAANA,MAAM;IAAA;IAC3B,YAAAC,OAAO,EAACC,GAAG,kBAAC,iBAAiB,SAAKF,MAAM,EAAC;IACzCF,gBAAgB,CAAC,KAAK,CAAC;EACzB,CAAC;EAED,IAAMK,WAAW,GAAG,SAAdA,WAAW,GAAkB;IAAA;IAAA,mCAAXH,MAAM;MAANA,MAAM;IAAA;IAC5B,aAAAC,OAAO,EAACC,GAAG,mBAAC,kBAAkB,SAAKF,MAAM,EAAC;IAC1CJ,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EAED,IAAMQ,cAAc,GAAG,SAAjBA,cAAc;IAAA;IAAA,
|
|
1
|
+
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","useState","visible","setVisible","visibleSecond","setVisibleSecond","handleBack","others","console","log","handleClose","handleOverflow","padding","storyName","args","blur","fit","overflow","portal","argTypes"],"sources":["../../../src/components/Modal/Modal.stories.jsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { Button, Text, View } from '../../';\nimport { Modal } from './Modal';\n\nexport default {\n title: 'Components',\n};\n\nexport const Story = (props) => {\n const [visible, setVisible] = useState(true);\n const [visibleSecond, setVisibleSecond] = useState(false);\n\n const handleBack = (...others) => {\n console.log('<Modal>::onBack', ...others);\n setVisibleSecond(false);\n };\n\n const handleClose = (...others) => {\n console.log('<Modal>::onClose', ...others);\n setVisible(false);\n };\n\n const handleOverflow = (...others) => {\n console.log('<Modal>::onOverflow', ...others);\n handleClose(others);\n };\n\n return (\n <>\n <Text bold headline>\n What is Lorem Ipsum?\n </Text>\n <Text>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make\n a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,\n remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing\n Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions\n of Lorem Ipsum.\n </Text>\n\n <Button onPress={() => setVisible(true)}>Show modal</Button>\n\n <Text bold headline>\n Where does it come from?\n </Text>\n <Text>\n Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin\n literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney\n College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and\n going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum\n comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by\n Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance.\n The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n </Text>\n\n <Modal {...props} onClose={handleClose} onOverflow={handleOverflow} visible={visible}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n <Button onPress={() => setVisibleSecond(true)}>Show another Modal</Button>\n </View>\n </Modal>\n\n <Modal {...props} onBack={handleBack} onOverflow={handleOverflow} visible={visibleSecond}>\n <View style={{ padding: 'var(--mirai-ui-space-L)' }}>\n <Text>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus\n dolore, facere facilis placeat nostrum unde cumque. Voluptas enim rerum voluptatum, deserunt fugiat\n aspernatur excepturi.\n </Text>\n </View>\n </Modal>\n </>\n );\n};\nStory.storyName = 'Modal';\n\nStory.args = {\n blur: false,\n fit: false,\n overflow: true,\n portal: false,\n title: 'title',\n // inherited properties\n ['data-testid']: 'test-story',\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAEjB;EACbA,KAAK,EAAE;AACT,CAAC;AAAA;AAEM,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK,EAAK;EAC9B,gBAA8B,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAAA;IAArCC,OAAO;IAAEC,UAAU;EAC1B,iBAA0C,IAAAF,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAlDG,aAAa;IAAEC,gBAAgB;EAEtC,IAAMC,UAAU,GAAG,SAAbA,UAAU,GAAkB;IAAA;IAAA,kCAAXC,MAAM;MAANA,MAAM;IAAA;IAC3B,YAAAC,OAAO,EAACC,GAAG,kBAAC,iBAAiB,SAAKF,MAAM,EAAC;IACzCF,gBAAgB,CAAC,KAAK,CAAC;EACzB,CAAC;EAED,IAAMK,WAAW,GAAG,SAAdA,WAAW,GAAkB;IAAA;IAAA,mCAAXH,MAAM;MAANA,MAAM;IAAA;IAC5B,aAAAC,OAAO,EAACC,GAAG,mBAAC,kBAAkB,SAAKF,MAAM,EAAC;IAC1CJ,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EAED,IAAMQ,cAAc,GAAG,SAAjBA,cAAc,GAAkB;IAAA;IAAA,mCAAXJ,MAAM;MAANA,MAAM;IAAA;IAC/B,aAAAC,OAAO,EAACC,GAAG,mBAAC,qBAAqB,SAAKF,MAAM,EAAC;IAC7CG,WAAW,CAACH,MAAM,CAAC;EAC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