@fluentui/react-input 9.4.4 → 9.4.6

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.
Files changed (63) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +85 -1
  3. package/CHANGELOG.md +29 -2
  4. package/lib/Input.js.map +1 -1
  5. package/lib/InputField.js.map +1 -1
  6. package/lib/components/Input/Input.js.map +1 -1
  7. package/lib/components/Input/Input.types.js +1 -1
  8. package/lib/components/Input/Input.types.js.map +1 -1
  9. package/lib/components/Input/index.js.map +1 -1
  10. package/lib/components/Input/renderInput.js +1 -9
  11. package/lib/components/Input/renderInput.js.map +1 -1
  12. package/lib/components/Input/useInput.js +3 -2
  13. package/lib/components/Input/useInput.js.map +1 -1
  14. package/lib/components/Input/useInputStyles.js.map +1 -1
  15. package/lib/components/InputField/InputField.js +1 -2
  16. package/lib/components/InputField/InputField.js.map +1 -1
  17. package/lib/components/InputField/index.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/Input.js +5 -4
  20. package/lib-commonjs/Input.js.map +1 -1
  21. package/lib-commonjs/InputField.js +5 -4
  22. package/lib-commonjs/InputField.js.map +1 -1
  23. package/lib-commonjs/components/Input/Input.js +19 -20
  24. package/lib-commonjs/components/Input/Input.js.map +1 -1
  25. package/lib-commonjs/components/Input/Input.types.js +5 -2
  26. package/lib-commonjs/components/Input/Input.types.js.map +1 -1
  27. package/lib-commonjs/components/Input/index.js +9 -8
  28. package/lib-commonjs/components/Input/index.js.map +1 -1
  29. package/lib-commonjs/components/Input/renderInput.js +13 -24
  30. package/lib-commonjs/components/Input/renderInput.js.map +1 -1
  31. package/lib-commonjs/components/Input/useInput.js +66 -70
  32. package/lib-commonjs/components/Input/useInput.js.map +1 -1
  33. package/lib-commonjs/components/Input/useInputStyles.js +394 -178
  34. package/lib-commonjs/components/Input/useInputStyles.js.map +1 -1
  35. package/lib-commonjs/components/InputField/InputField.js +17 -11
  36. package/lib-commonjs/components/InputField/InputField.js.map +1 -1
  37. package/lib-commonjs/components/InputField/index.js +5 -4
  38. package/lib-commonjs/components/InputField/index.js.map +1 -1
  39. package/lib-commonjs/index.js +21 -49
  40. package/lib-commonjs/index.js.map +1 -1
  41. package/package.json +10 -9
  42. package/lib-amd/Input.js +0 -6
  43. package/lib-amd/Input.js.map +0 -1
  44. package/lib-amd/InputField.js +0 -6
  45. package/lib-amd/InputField.js.map +0 -1
  46. package/lib-amd/components/Input/Input.js +0 -17
  47. package/lib-amd/components/Input/Input.js.map +0 -1
  48. package/lib-amd/components/Input/Input.types.js +0 -5
  49. package/lib-amd/components/Input/Input.types.js.map +0 -1
  50. package/lib-amd/components/Input/index.js +0 -10
  51. package/lib-amd/components/Input/index.js.map +0 -1
  52. package/lib-amd/components/Input/renderInput.js +0 -17
  53. package/lib-amd/components/Input/renderInput.js.map +0 -1
  54. package/lib-amd/components/Input/useInput.js +0 -64
  55. package/lib-amd/components/Input/useInput.js.map +0 -1
  56. package/lib-amd/components/Input/useInputStyles.js +0 -214
  57. package/lib-amd/components/Input/useInputStyles.js.map +0 -1
  58. package/lib-amd/components/InputField/InputField.js +0 -10
  59. package/lib-amd/components/InputField/InputField.js.map +0 -1
  60. package/lib-amd/components/InputField/index.js +0 -6
  61. package/lib-amd/components/InputField/index.js.map +0 -1
  62. package/lib-amd/index.js +0 -13
  63. package/lib-amd/index.js.map +0 -1
@@ -1,28 +1,17 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderInput_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderInput_unstable
5
8
  });
6
- exports.renderInput_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- /**
10
- * Render the final JSX of Input
11
- */
12
- const renderInput_unstable = state => {
13
- const {
14
- slots,
15
- slotProps
16
- } = react_utilities_1.getSlots(state);
17
- return React.createElement(slots.root, {
18
- ...slotProps.root
19
- }, slots.contentBefore && React.createElement(slots.contentBefore, {
20
- ...slotProps.contentBefore
21
- }), React.createElement(slots.input, {
22
- ...slotProps.input
23
- }), slots.contentAfter && React.createElement(slots.contentAfter, {
24
- ...slotProps.contentAfter
25
- }));
26
- };
27
- exports.renderInput_unstable = renderInput_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const renderInput_unstable = (state)=>{
13
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
+ return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, slots.contentBefore && /*#__PURE__*/ _react.createElement(slots.contentBefore, slotProps.contentBefore), /*#__PURE__*/ _react.createElement(slots.input, slotProps.input), slots.contentAfter && /*#__PURE__*/ _react.createElement(slots.contentAfter, slotProps.contentAfter));
15
+ }; //# sourceMappingURL=renderInput.js.map
16
+
28
17
  //# sourceMappingURL=renderInput.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","renderInput_unstable","state","slots","slotProps","getSlots","createElement","root","contentBefore","input","contentAfter","exports"],"sources":["../src/packages/react-components/react-input/src/components/Input/renderInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { InputSlots, InputState } from './Input.types';\n\n/**\n * Render the final JSX of Input\n */\nexport const renderInput_unstable = (state: InputState) => {\n const { slots, slotProps } = getSlots<InputSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n {slots.contentBefore && <slots.contentBefore {...slotProps.contentBefore} />}\n <slots.input {...slotProps.input} />\n {slots.contentAfter && <slots.contentAfter {...slotProps.contentAfter} />}\n </slots.root>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAaH,KAAK,CAAC;EACxD,OACEJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BJ,KAAK,CAACK,aAAa,IAAIV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,aAAa;IAAA,GAAKJ,SAAS,CAACI;EAAa,EAAI,EAC5EV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACM,KAAK;IAAA,GAAKL,SAAS,CAACK;EAAK,EAAI,EACnCN,KAAK,CAACO,YAAY,IAAIZ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACO,YAAY;IAAA,GAAKN,SAAS,CAACM;EAAY,EAAI,CAC9D;AAEjB,CAAC;AATYC,OAAA,CAAAV,oBAAoB,GAAAA,oBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Input/renderInput.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Input\n */\nexport const renderInput_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.contentBefore && /*#__PURE__*/React.createElement(slots.contentBefore, slotProps.contentBefore), /*#__PURE__*/React.createElement(slots.input, slotProps.input), slots.contentAfter && /*#__PURE__*/React.createElement(slots.contentAfter, slotProps.contentAfter));\n};\n//# sourceMappingURL=renderInput.js.map"],"names":["renderInput_unstable","state","slots","slotProps","getSlots","React","createElement","root","contentBefore","input","contentAfter"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,uBAAuBC,CAAAA,QAAS;IAC3C,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEL,MAAMM,aAAa,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,aAAa,EAAEL,UAAUK,aAAa,GAAG,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMO,KAAK,EAAEN,UAAUM,KAAK,GAAGP,MAAMQ,YAAY,IAAI,WAAW,GAAEL,OAAMC,aAAa,CAACJ,MAAMQ,YAAY,EAAEP,UAAUO,YAAY;AAC9U,GACA,uCAAuC"}
@@ -1,75 +1,71 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useInput_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useInput_unstable
5
8
  });
6
- exports.useInput_unstable = void 0;
7
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
9
- /**
10
- * Create the state required to render Input.
11
- *
12
- * The returned state can be modified with hooks such as useInputStyles_unstable,
13
- * before being passed to renderInput_unstable.
14
- *
15
- * @param props - props from this instance of Input
16
- * @param ref - reference to `<input>` element of Input
17
- */
18
- const useInput_unstable = (props, ref) => {
19
- var _a;
20
- const overrides = react_shared_contexts_1.useOverrides_unstable();
21
- const {
22
- size = 'medium',
23
- appearance = (_a = overrides.inputDefaultAppearance) !== null && _a !== void 0 ? _a : 'outline',
24
- onChange
25
- } = props;
26
- if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {
27
- // eslint-disable-next-line no-console
28
- console.error("The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the" + ' future.');
29
- }
30
- const [value, setValue] = react_utilities_1.useControllableState({
31
- state: props.value,
32
- defaultState: props.defaultValue,
33
- initialState: ''
34
- });
35
- const nativeProps = react_utilities_1.getPartitionedNativeProps({
36
- props,
37
- primarySlotTagName: 'input',
38
- excludedPropNames: ['size', 'onChange', 'value', 'defaultValue']
39
- });
40
- const state = {
41
- size,
42
- appearance,
43
- components: {
44
- root: 'span',
45
- input: 'input',
46
- contentBefore: 'span',
47
- contentAfter: 'span'
48
- },
49
- input: react_utilities_1.resolveShorthand(props.input, {
50
- required: true,
51
- defaultProps: {
52
- type: 'text',
53
- ref,
54
- ...nativeProps.primary
55
- }
56
- }),
57
- contentAfter: react_utilities_1.resolveShorthand(props.contentAfter),
58
- contentBefore: react_utilities_1.resolveShorthand(props.contentBefore),
59
- root: react_utilities_1.resolveShorthand(props.root, {
60
- required: true,
61
- defaultProps: nativeProps.root
62
- })
63
- };
64
- state.input.value = value;
65
- state.input.onChange = react_utilities_1.useEventCallback(ev => {
66
- const newValue = ev.target.value;
67
- onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
68
- value: newValue
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
13
+ const useInput_unstable = (props, ref)=>{
14
+ const overrides = (0, _reactSharedContexts.useOverrides_unstable)();
15
+ var _overrides_inputDefaultAppearance;
16
+ const { size ='medium' , appearance =(_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline' , onChange } = props;
17
+ if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {
18
+ // eslint-disable-next-line no-console
19
+ console.error("The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the" + ' future.');
20
+ }
21
+ const [value, setValue] = (0, _reactUtilities.useControllableState)({
22
+ state: props.value,
23
+ defaultState: props.defaultValue,
24
+ initialState: ''
25
+ });
26
+ const nativeProps = (0, _reactUtilities.getPartitionedNativeProps)({
27
+ props,
28
+ primarySlotTagName: 'input',
29
+ excludedPropNames: [
30
+ 'size',
31
+ 'onChange',
32
+ 'value',
33
+ 'defaultValue'
34
+ ]
69
35
  });
70
- setValue(newValue);
71
- });
72
- return state;
73
- };
74
- exports.useInput_unstable = useInput_unstable;
36
+ const state = {
37
+ size,
38
+ appearance,
39
+ components: {
40
+ root: 'span',
41
+ input: 'input',
42
+ contentBefore: 'span',
43
+ contentAfter: 'span'
44
+ },
45
+ input: (0, _reactUtilities.resolveShorthand)(props.input, {
46
+ required: true,
47
+ defaultProps: {
48
+ type: 'text',
49
+ ref,
50
+ ...nativeProps.primary
51
+ }
52
+ }),
53
+ contentAfter: (0, _reactUtilities.resolveShorthand)(props.contentAfter),
54
+ contentBefore: (0, _reactUtilities.resolveShorthand)(props.contentBefore),
55
+ root: (0, _reactUtilities.resolveShorthand)(props.root, {
56
+ required: true,
57
+ defaultProps: nativeProps.root
58
+ })
59
+ };
60
+ state.input.value = value;
61
+ state.input.onChange = (0, _reactUtilities.useEventCallback)((ev)=>{
62
+ const newValue = ev.target.value;
63
+ onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
64
+ value: newValue
65
+ });
66
+ setValue(newValue);
67
+ });
68
+ return state;
69
+ }; //# sourceMappingURL=useInput.js.map
70
+
75
71
  //# sourceMappingURL=useInput.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_utilities_1","require","react_shared_contexts_1","useInput_unstable","props","ref","overrides","useOverrides_unstable","size","appearance","_a","inputDefaultAppearance","onChange","process","env","NODE_ENV","console","error","value","setValue","useControllableState","state","defaultState","defaultValue","initialState","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","components","root","input","contentBefore","contentAfter","resolveShorthand","required","defaultProps","type","primary","useEventCallback","ev","newValue","target","exports"],"sources":["../src/packages/react-components/react-input/src/components/Input/useInput.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { InputProps, InputState } from './Input.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_unstable = (props: InputProps, ref: React.Ref<HTMLInputElement>): InputState => {\n const overrides = useOverrides();\n\n const { size = 'medium', appearance = overrides.inputDefaultAppearance ?? 'outline', onChange } = props;\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')\n ) {\n // eslint-disable-next-line no-console\n console.error(\n \"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" +\n ' future.',\n );\n }\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: '',\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue'],\n });\n\n const state: InputState = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span',\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary,\n },\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\n }),\n };\n\n state.input.value = value;\n state.input.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange?.(ev, { value: newValue });\n setValue(newValue);\n });\n\n return state;\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAOA,MAAAC,uBAAA,gBAAAD,OAAA;AAEA;;;;;;;;;AASO,MAAME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AAA,CAAAkC,gBAAgB,CAAC9B,KAAK,CAAC6B,YAAY,CAAC;IAClDD,aAAa,EAAEhC,iBAAA,CAAAkC,gBAAgB,CAAC9B,KAAK,CAAC4B,aAAa,CAAC;IACpDF,IAAI,EAAE9B,iBAAA,CAAAkC,gBAAgB,CAAC9B,KAAK,CAAC0B,IAAI,EAAE;MACjCK,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAEX,WAAW,CAACK;KAC3B;GACF;EAEDT,KAAK,CAACU,KAAK,CAACb,KAAK,GAAGA,KAAK;EACzBG,KAAK,CAACU,KAAK,CAACnB,QAAQ,GAAGZ,iBAAA,CAAAuC,gBAAgB,CAACC,EAAE,IAAG;IAC3C,MAAMC,QAAQ,GAAGD,EAAE,CAACE,MAAM,CAACxB,KAAK;IAChCN,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAG4B,EAAE,EAAE;MAAEtB,KAAK,EAAEuB;IAAQ,CAAE,CAAC;IACnCtB,QAAQ,CAACsB,QAAQ,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOpB,KAAK;AACd,CAAC;AA7DYsB,OAAA,CAAAxC,iBAAiB,GAAAA,iBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Input/useInput.js"],"sourcesContent":["import * as React from 'react';\nimport { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_unstable = (props, ref) => {\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const {\n size = 'medium',\n appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline',\n onChange\n } = props;\n if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {\n // eslint-disable-next-line no-console\n console.error(\"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" + ' future.');\n }\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: ''\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue']\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span'\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary\n }\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root\n })\n };\n state.input.value = value;\n state.input.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n value: newValue\n });\n setValue(newValue);\n });\n return state;\n};\n//# sourceMappingURL=useInput.js.map"],"names":["useInput_unstable","props","ref","overrides","useOverrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","onChange","process","env","NODE_ENV","console","error","value","setValue","useControllableState","state","defaultState","defaultValue","initialState","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","components","root","input","contentBefore","contentAfter","resolveShorthand","required","defaultProps","type","primary","useEventCallback","ev","newValue","target"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;gCAC6E;qCAC9C;AAU/C,MAAMA,oBAAoB,CAACC,OAAOC,MAAQ;IAC/C,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EACJC,MAAO,SAAQ,EACfC,YAAa,AAACF,CAAAA,oCAAoCF,UAAUK,sBAAsB,AAAD,MAAO,IAAI,IAAIH,sCAAsC,KAA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