@fluentui/react-menu 0.0.0-nightlyd3bf09bf8120211201.1 → 0.0.0-nightlyd514b3e0ee20220121.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. package/CHANGELOG.json +142 -26
  2. package/CHANGELOG.md +31 -16
  3. package/Spec.md +21 -16
  4. package/dist/react-menu.d.ts +54 -12
  5. package/lib/MenuSplitGroup.d.ts +1 -0
  6. package/lib/MenuSplitGroup.js +2 -0
  7. package/lib/MenuSplitGroup.js.map +1 -0
  8. package/lib/components/Menu/useMenu.js +29 -21
  9. package/lib/components/Menu/useMenu.js.map +1 -1
  10. package/lib/components/MenuDivider/renderMenuDivider.js +2 -1
  11. package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
  12. package/lib/components/MenuDivider/useMenuDivider.js +3 -0
  13. package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
  14. package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  15. package/lib/components/MenuDivider/useMenuDividerStyles.js +1 -0
  16. package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  17. package/lib/components/MenuGroup/renderMenuGroup.js +2 -1
  18. package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
  19. package/lib/components/MenuGroup/useMenuGroup.js +3 -0
  20. package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
  21. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
  22. package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  23. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +3 -0
  24. package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  25. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  26. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -0
  27. package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  28. package/lib/components/MenuItem/MenuItem.js +0 -2
  29. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  30. package/lib/components/MenuItem/MenuItem.types.d.ts +1 -1
  31. package/lib/components/MenuItem/renderMenuItem.js +8 -3
  32. package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
  33. package/lib/components/MenuItem/useMenuItem.d.ts +1 -5
  34. package/lib/components/MenuItem/useMenuItem.js +3 -8
  35. package/lib/components/MenuItem/useMenuItem.js.map +1 -1
  36. package/lib/components/MenuItem/useMenuItemStyles.js +19 -20
  37. package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
  38. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +7 -3
  39. package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  40. package/lib/components/MenuItemRadio/renderMenuItemRadio.js +7 -3
  41. package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  42. package/lib/components/MenuList/renderMenuList.js +2 -1
  43. package/lib/components/MenuList/renderMenuList.js.map +1 -1
  44. package/lib/components/MenuList/useMenuList.js +3 -0
  45. package/lib/components/MenuList/useMenuList.js.map +1 -1
  46. package/lib/components/MenuPopover/renderMenuPopover.js +4 -2
  47. package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
  48. package/lib/components/MenuPopover/useMenuPopover.js +3 -0
  49. package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
  50. package/lib/components/MenuPopover/useMenuPopoverStyles.js +1 -0
  51. package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  52. package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  53. package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
  54. package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  55. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  56. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
  57. package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  58. package/lib/components/MenuSplitGroup/index.d.ts +5 -0
  59. package/lib/components/MenuSplitGroup/index.js +6 -0
  60. package/lib/components/MenuSplitGroup/index.js.map +1 -0
  61. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  62. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +15 -0
  63. package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  64. package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  65. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +67 -0
  66. package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  67. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  68. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +35 -0
  69. package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  70. package/lib/components/MenuTrigger/MenuTrigger.d.ts +1 -1
  71. package/lib/components/MenuTrigger/MenuTrigger.js +4 -3
  72. package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
  73. package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +5 -2
  74. package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -1
  75. package/lib/components/MenuTrigger/useMenuTrigger.js +177 -5
  76. package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  77. package/lib/index.d.ts +11 -10
  78. package/lib/index.js +11 -10
  79. package/lib/index.js.map +1 -1
  80. package/lib/utils/useOnMenuEnter.js.map +1 -1
  81. package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
  82. package/lib-commonjs/MenuSplitGroup.js +10 -0
  83. package/lib-commonjs/MenuSplitGroup.js.map +1 -0
  84. package/lib-commonjs/components/Menu/useMenu.js +33 -26
  85. package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
  86. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +2 -1
  87. package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
  88. package/lib-commonjs/components/MenuDivider/useMenuDivider.js +3 -0
  89. package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
  90. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
  91. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +2 -0
  92. package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
  93. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +2 -1
  94. package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
  95. package/lib-commonjs/components/MenuGroup/useMenuGroup.js +3 -0
  96. package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
  97. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +2 -1
  98. package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
  99. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +3 -0
  100. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
  101. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
  102. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +2 -0
  103. package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
  104. package/lib-commonjs/components/MenuItem/MenuItem.js +0 -3
  105. package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
  106. package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +1 -1
  107. package/lib-commonjs/components/MenuItem/renderMenuItem.js +8 -4
  108. package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
  109. package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +1 -5
  110. package/lib-commonjs/components/MenuItem/useMenuItem.js +5 -10
  111. package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
  112. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +21 -20
  113. package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
  114. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +7 -4
  115. package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
  116. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +7 -4
  117. package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
  118. package/lib-commonjs/components/MenuList/renderMenuList.js +2 -1
  119. package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
  120. package/lib-commonjs/components/MenuList/useMenuList.js +3 -0
  121. package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
  122. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +4 -2
  123. package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
  124. package/lib-commonjs/components/MenuPopover/useMenuPopover.js +3 -0
  125. package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
  126. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +2 -0
  127. package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
  128. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
  129. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
  130. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
  131. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
  132. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
  133. package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
  134. package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
  135. package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
  136. package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
  137. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
  138. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +26 -0
  139. package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
  140. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +12 -0
  141. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +81 -0
  142. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
  143. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
  144. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +47 -0
  145. package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
  146. package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +1 -1
  147. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +5 -5
  148. package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
  149. package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +5 -2
  150. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -1
  151. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +184 -5
  152. package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
  153. package/lib-commonjs/index.d.ts +11 -10
  154. package/lib-commonjs/index.js +16 -14
  155. package/lib-commonjs/index.js.map +1 -1
  156. package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
  157. package/package.json +15 -15
  158. package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  159. package/lib/components/MenuTrigger/useTriggerElement.js +0 -165
  160. package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
  161. package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
  162. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -180
  163. package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -1,180 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useTriggerElement = void 0;
7
-
8
- const React = /*#__PURE__*/require("react");
9
-
10
- const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
11
-
12
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
-
14
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
15
-
16
- const menuContext_1 = /*#__PURE__*/require("../../contexts/menuContext");
17
-
18
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
19
-
20
- const useIsSubmenu_1 = /*#__PURE__*/require("../../utils/useIsSubmenu");
21
-
22
- const noop = () => null;
23
- /**
24
- * Adds the necessary props to the trigger element
25
- */
26
-
27
-
28
- const useTriggerElement = state => {
29
- var _a, _b;
30
-
31
- const triggerRef = menuContext_1.useMenuContext(context => context.triggerRef);
32
- const menuPopoverRef = menuContext_1.useMenuContext(context => context.menuPopoverRef);
33
- const setOpen = menuContext_1.useMenuContext(context => context.setOpen);
34
- const open = menuContext_1.useMenuContext(context => context.open);
35
- const triggerId = menuContext_1.useMenuContext(context => context.triggerId);
36
- const openOnHover = menuContext_1.useMenuContext(context => context.openOnHover);
37
- const openOnContext = menuContext_1.useMenuContext(context => context.openOnContext);
38
- const isSubmenu = useIsSubmenu_1.useIsSubmenu();
39
- const {
40
- findFirstFocusable
41
- } = react_tabster_1.useFocusFinders();
42
- const focusFirst = React.useCallback(() => {
43
- const firstFocusable = findFirstFocusable(menuPopoverRef.current);
44
- firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
45
- }, [findFirstFocusable, menuPopoverRef]);
46
- const openedWithKeyboardRef = React.useRef(false);
47
- const hasMouseMoved = React.useRef(false);
48
- const {
49
- dir
50
- } = react_shared_contexts_1.useFluent();
51
- const OpenArrowKey = dir === 'ltr' ? keyboard_keys_1.ArrowRight : keyboard_keys_1.ArrowLeft;
52
- const child = React.isValidElement(state.children) ? react_utilities_1.onlyChild(state.children) : undefined;
53
- const onContextMenu = react_utilities_1.useEventCallback(e => {
54
- var _a, _b;
55
-
56
- if (openOnContext) {
57
- e.preventDefault();
58
- setOpen(e, {
59
- open: true,
60
- keyboard: false
61
- });
62
- }
63
-
64
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onContextMenu) === null || _b === void 0 ? void 0 : _b.call(_a, e);
65
- });
66
- const onClick = react_utilities_1.useEventCallback(e => {
67
- var _a, _b;
68
-
69
- if (!openOnContext) {
70
- setOpen(e, {
71
- open: !open,
72
- keyboard: openedWithKeyboardRef.current
73
- });
74
- openedWithKeyboardRef.current = false;
75
- }
76
-
77
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
78
- });
79
- const onKeyDown = react_utilities_1.useEventCallback(e => {
80
- var _a, _b, _c;
81
-
82
- if (react_utilities_1.shouldPreventDefaultOnKeyDown(e)) {
83
- e.preventDefault();
84
- openedWithKeyboardRef.current = true;
85
- (_a = e.target) === null || _a === void 0 ? void 0 : _a.click();
86
- }
87
-
88
- const key = e.key;
89
-
90
- if (!openOnContext && (isSubmenu && key === OpenArrowKey || !isSubmenu && key === keyboard_keys_1.ArrowDown)) {
91
- setOpen(e, {
92
- open: true,
93
- keyboard: true
94
- });
95
- }
96
-
97
- if (key === keyboard_keys_1.Escape && !isSubmenu) {
98
- setOpen(e, {
99
- open: false,
100
- keyboard: true
101
- });
102
- } // if menu is already open, can't rely on effects to focus
103
-
104
-
105
- if (open && key === OpenArrowKey && isSubmenu) {
106
- focusFirst();
107
- }
108
-
109
- if (open && key === keyboard_keys_1.ArrowDown && !isSubmenu) {
110
- focusFirst();
111
- }
112
-
113
- (_c = (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, e);
114
- });
115
- const onMouseEnter = react_utilities_1.useEventCallback(e => {
116
- var _a, _b;
117
-
118
- if (openOnHover && hasMouseMoved.current) {
119
- setOpen(e, {
120
- open: true,
121
- keyboard: false
122
- });
123
- }
124
-
125
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseEnter) === null || _b === void 0 ? void 0 : _b.call(_a, e);
126
- }); // Opening a menu when a mouse hasn't moved and just entering the trigger is a bad a11y experience
127
- // First time open the mouse using mousemove and then continue with mouseenter
128
- // Only use once to determine that the user is using the mouse since it is an expensive event to handle
129
-
130
- const onMouseMove = react_utilities_1.useEventCallback(e => {
131
- if (openOnHover && !hasMouseMoved.current) {
132
- setOpen(e, {
133
- open: true,
134
- keyboard: false
135
- });
136
- hasMouseMoved.current = true;
137
- }
138
- });
139
- const onMouseLeave = react_utilities_1.useEventCallback(e => {
140
- var _a, _b;
141
-
142
- if (openOnHover) {
143
- setOpen(e, {
144
- open: false,
145
- keyboard: false
146
- });
147
- }
148
-
149
- (_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onMouseLeave) === null || _b === void 0 ? void 0 : _b.call(_a, e);
150
- });
151
- const disabled = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.disabled;
152
- const triggerProps = {
153
- 'aria-haspopup': true,
154
- 'aria-expanded': open,
155
- id: ((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.id) || triggerId,
156
- ...(!disabled ? {
157
- onClick,
158
- onMouseEnter,
159
- onMouseLeave,
160
- onContextMenu,
161
- onKeyDown,
162
- onMouseMove
163
- } : // Spread disabled event handlers to implement contract and avoid specific disabled logic in handlers
164
- {
165
- onClick: noop,
166
- onMouseEnter: noop,
167
- onMouseLeave: noop,
168
- onContextMenu: noop,
169
- onKeyDown: noop,
170
- onMouseMove: noop
171
- })
172
- };
173
- state.children = react_utilities_1.applyTriggerPropsToChildren(state.children, { ...triggerProps,
174
- ref: react_utilities_1.useMergedRefs(typeof state.children !== 'function' && state.children.ref || null, triggerRef)
175
- });
176
- return state;
177
- };
178
-
179
- exports.useTriggerElement = useTriggerElement;
180
- //# sourceMappingURL=useTriggerElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/MenuTrigger/useTriggerElement.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAGA,MAAM,IAAI,GAAG,MAAM,IAAnB;AAEA;;AAEG;;;AACI,MAAM,iBAAiB,GAAI,KAAD,IAA8C;;;AAC7E,QAAM,UAAU,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,UAAlC,CAAnB;AACA,QAAM,cAAc,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,cAAlC,CAAvB;AACA,QAAM,OAAO,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,OAAlC,CAAhB;AACA,QAAM,IAAI,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,IAAlC,CAAb;AACA,QAAM,SAAS,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,SAAlC,CAAlB;AACA,QAAM,WAAW,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,WAAlC,CAApB;AACA,QAAM,aAAa,GAAG,aAAA,CAAA,cAAA,CAAe,OAAO,IAAI,OAAO,CAAC,aAAlC,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