@fluentui/react-utilities 9.7.1 → 9.7.3

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 (216) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +49 -1
  3. package/CHANGELOG.md +23 -2
  4. package/dist/index.d.ts +16 -4
  5. package/lib/compose/getSlots.js +3 -3
  6. package/lib/compose/getSlots.js.map +1 -1
  7. package/lib/compose/index.js.map +1 -1
  8. package/lib/compose/isResolvedShorthand.js.map +1 -1
  9. package/lib/compose/resolveShorthand.js.map +1 -1
  10. package/lib/compose/types.js +1 -1
  11. package/lib/compose/types.js.map +1 -1
  12. package/lib/events/index.js.map +1 -1
  13. package/lib/events/mouseTouchHelpers.js +1 -0
  14. package/lib/events/mouseTouchHelpers.js.map +1 -1
  15. package/lib/hooks/index.js.map +1 -1
  16. package/lib/hooks/useControllableState.js.map +1 -1
  17. package/lib/hooks/useEventCallback.js.map +1 -1
  18. package/lib/hooks/useFirstMount.js.map +1 -1
  19. package/lib/hooks/useForceUpdate.js.map +1 -1
  20. package/lib/hooks/useId.js.map +1 -1
  21. package/lib/hooks/useIsomorphicLayoutEffect.js +1 -2
  22. package/lib/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  23. package/lib/hooks/useMergedRefs.js.map +1 -1
  24. package/lib/hooks/useOnClickOutside.js +16 -9
  25. package/lib/hooks/useOnClickOutside.js.map +1 -1
  26. package/lib/hooks/useOnScrollOutside.js +3 -1
  27. package/lib/hooks/useOnScrollOutside.js.map +1 -1
  28. package/lib/hooks/usePrevious.js.map +1 -1
  29. package/lib/hooks/useScrollbarWidth.js.map +1 -1
  30. package/lib/hooks/useTimeout.js.map +1 -1
  31. package/lib/index.js.map +1 -1
  32. package/lib/ssr/SSRContext.js +2 -2
  33. package/lib/ssr/SSRContext.js.map +1 -1
  34. package/lib/ssr/canUseDOM.js +1 -2
  35. package/lib/ssr/canUseDOM.js.map +1 -1
  36. package/lib/ssr/index.js.map +1 -1
  37. package/lib/trigger/applyTriggerPropsToChildren.js.map +1 -1
  38. package/lib/trigger/getTriggerChild.js.map +1 -1
  39. package/lib/trigger/index.js.map +1 -1
  40. package/lib/trigger/isFluentTrigger.js +1 -0
  41. package/lib/trigger/isFluentTrigger.js.map +1 -1
  42. package/lib/trigger/types.js +1 -1
  43. package/lib/trigger/types.js.map +1 -1
  44. package/lib/utils/clamp.js +1 -2
  45. package/lib/utils/clamp.js.map +1 -1
  46. package/lib/utils/getNativeElementProps.js +2 -2
  47. package/lib/utils/getNativeElementProps.js.map +1 -1
  48. package/lib/utils/getRTLSafeKey.js +1 -2
  49. package/lib/utils/getRTLSafeKey.js.map +1 -1
  50. package/lib/utils/getReactCallbackName.js +1 -0
  51. package/lib/utils/getReactCallbackName.js.map +1 -1
  52. package/lib/utils/index.js.map +1 -1
  53. package/lib/utils/isHTMLElement.js +12 -7
  54. package/lib/utils/isHTMLElement.js.map +1 -1
  55. package/lib/utils/isInteractiveHTMLElement.js.map +1 -1
  56. package/lib/utils/mergeCallbacks.js +1 -2
  57. package/lib/utils/mergeCallbacks.js.map +1 -1
  58. package/lib/utils/omit.js +1 -2
  59. package/lib/utils/omit.js.map +1 -1
  60. package/lib/utils/properties.js +24 -51
  61. package/lib/utils/properties.js.map +1 -1
  62. package/lib-commonjs/compose/getSlots.js +48 -55
  63. package/lib-commonjs/compose/getSlots.js.map +1 -1
  64. package/lib-commonjs/compose/index.js +8 -7
  65. package/lib-commonjs/compose/index.js.map +1 -1
  66. package/lib-commonjs/compose/isResolvedShorthand.js +9 -37
  67. package/lib-commonjs/compose/isResolvedShorthand.js.map +1 -1
  68. package/lib-commonjs/compose/resolveShorthand.js +25 -32
  69. package/lib-commonjs/compose/resolveShorthand.js.map +1 -1
  70. package/lib-commonjs/compose/types.js +5 -2
  71. package/lib-commonjs/compose/types.js.map +1 -1
  72. package/lib-commonjs/events/index.js +5 -4
  73. package/lib-commonjs/events/index.js.map +1 -1
  74. package/lib-commonjs/events/mouseTouchHelpers.js +40 -37
  75. package/lib-commonjs/events/mouseTouchHelpers.js.map +1 -1
  76. package/lib-commonjs/hooks/index.js +16 -15
  77. package/lib-commonjs/hooks/index.js.map +1 -1
  78. package/lib-commonjs/hooks/useControllableState.js +63 -64
  79. package/lib-commonjs/hooks/useControllableState.js.map +1 -1
  80. package/lib-commonjs/hooks/useEventCallback.js +25 -31
  81. package/lib-commonjs/hooks/useEventCallback.js.map +1 -1
  82. package/lib-commonjs/hooks/useFirstMount.js +15 -23
  83. package/lib-commonjs/hooks/useFirstMount.js.map +1 -1
  84. package/lib-commonjs/hooks/useForceUpdate.js +9 -11
  85. package/lib-commonjs/hooks/useForceUpdate.js.map +1 -1
  86. package/lib-commonjs/hooks/useId.js +47 -46
  87. package/lib-commonjs/hooks/useId.js.map +1 -1
  88. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js +10 -16
  89. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  90. package/lib-commonjs/hooks/useMergedRefs.js +25 -27
  91. package/lib-commonjs/hooks/useMergedRefs.js.map +1 -1
  92. package/lib-commonjs/hooks/useOnClickOutside.js +118 -114
  93. package/lib-commonjs/hooks/useOnClickOutside.js.map +1 -1
  94. package/lib-commonjs/hooks/useOnScrollOutside.js +35 -36
  95. package/lib-commonjs/hooks/useOnScrollOutside.js.map +1 -1
  96. package/lib-commonjs/hooks/usePrevious.js +17 -15
  97. package/lib-commonjs/hooks/usePrevious.js.map +1 -1
  98. package/lib-commonjs/hooks/useScrollbarWidth.js +32 -32
  99. package/lib-commonjs/hooks/useScrollbarWidth.js.map +1 -1
  100. package/lib-commonjs/hooks/useTimeout.js +30 -30
  101. package/lib-commonjs/hooks/useTimeout.js.map +1 -1
  102. package/lib-commonjs/index.js +52 -214
  103. package/lib-commonjs/index.js.map +1 -1
  104. package/lib-commonjs/ssr/SSRContext.js +57 -59
  105. package/lib-commonjs/ssr/SSRContext.js.map +1 -1
  106. package/lib-commonjs/ssr/canUseDOM.js +12 -12
  107. package/lib-commonjs/ssr/canUseDOM.js.map +1 -1
  108. package/lib-commonjs/ssr/index.js +6 -5
  109. package/lib-commonjs/ssr/index.js.map +1 -1
  110. package/lib-commonjs/trigger/applyTriggerPropsToChildren.js +29 -31
  111. package/lib-commonjs/trigger/applyTriggerPropsToChildren.js.map +1 -1
  112. package/lib-commonjs/trigger/getTriggerChild.js +16 -36
  113. package/lib-commonjs/trigger/getTriggerChild.js.map +1 -1
  114. package/lib-commonjs/trigger/index.js +8 -7
  115. package/lib-commonjs/trigger/index.js.map +1 -1
  116. package/lib-commonjs/trigger/isFluentTrigger.js +10 -11
  117. package/lib-commonjs/trigger/isFluentTrigger.js.map +1 -1
  118. package/lib-commonjs/trigger/types.js +5 -2
  119. package/lib-commonjs/trigger/types.js.map +1 -1
  120. package/lib-commonjs/utils/clamp.js +10 -9
  121. package/lib-commonjs/utils/clamp.js.map +1 -1
  122. package/lib-commonjs/utils/getNativeElementProps.js +54 -61
  123. package/lib-commonjs/utils/getNativeElementProps.js.map +1 -1
  124. package/lib-commonjs/utils/getRTLSafeKey.js +22 -21
  125. package/lib-commonjs/utils/getRTLSafeKey.js.map +1 -1
  126. package/lib-commonjs/utils/getReactCallbackName.js +24 -24
  127. package/lib-commonjs/utils/getReactCallbackName.js.map +1 -1
  128. package/lib-commonjs/utils/index.js +12 -11
  129. package/lib-commonjs/utils/index.js.map +1 -1
  130. package/lib-commonjs/utils/isHTMLElement.js +22 -15
  131. package/lib-commonjs/utils/isHTMLElement.js.map +1 -1
  132. package/lib-commonjs/utils/isInteractiveHTMLElement.js +20 -24
  133. package/lib-commonjs/utils/isInteractiveHTMLElement.js.map +1 -1
  134. package/lib-commonjs/utils/mergeCallbacks.js +14 -13
  135. package/lib-commonjs/utils/mergeCallbacks.js.map +1 -1
  136. package/lib-commonjs/utils/omit.js +18 -17
  137. package/lib-commonjs/utils/omit.js.map +1 -1
  138. package/lib-commonjs/utils/properties.js +327 -223
  139. package/lib-commonjs/utils/properties.js.map +1 -1
  140. package/package.json +5 -4
  141. package/lib-amd/compose/getSlots.js +0 -58
  142. package/lib-amd/compose/getSlots.js.map +0 -1
  143. package/lib-amd/compose/index.js +0 -9
  144. package/lib-amd/compose/index.js.map +0 -1
  145. package/lib-amd/compose/isResolvedShorthand.js +0 -40
  146. package/lib-amd/compose/isResolvedShorthand.js.map +0 -1
  147. package/lib-amd/compose/resolveShorthand.js +0 -27
  148. package/lib-amd/compose/resolveShorthand.js.map +0 -1
  149. package/lib-amd/compose/types.js +0 -5
  150. package/lib-amd/compose/types.js.map +0 -1
  151. package/lib-amd/events/index.js +0 -6
  152. package/lib-amd/events/index.js.map +0 -1
  153. package/lib-amd/events/mouseTouchHelpers.js +0 -39
  154. package/lib-amd/events/mouseTouchHelpers.js.map +0 -1
  155. package/lib-amd/hooks/index.js +0 -17
  156. package/lib-amd/hooks/index.js.map +0 -1
  157. package/lib-amd/hooks/useControllableState.js +0 -81
  158. package/lib-amd/hooks/useControllableState.js.map +0 -1
  159. package/lib-amd/hooks/useEventCallback.js +0 -36
  160. package/lib-amd/hooks/useEventCallback.js.map +0 -1
  161. package/lib-amd/hooks/useFirstMount.js +0 -26
  162. package/lib-amd/hooks/useFirstMount.js.map +0 -1
  163. package/lib-amd/hooks/useForceUpdate.js +0 -14
  164. package/lib-amd/hooks/useForceUpdate.js.map +0 -1
  165. package/lib-amd/hooks/useId.js +0 -54
  166. package/lib-amd/hooks/useId.js.map +0 -1
  167. package/lib-amd/hooks/useIsomorphicLayoutEffect.js +0 -17
  168. package/lib-amd/hooks/useIsomorphicLayoutEffect.js.map +0 -1
  169. package/lib-amd/hooks/useMergedRefs.js +0 -34
  170. package/lib-amd/hooks/useMergedRefs.js.map +0 -1
  171. package/lib-amd/hooks/useOnClickOutside.js +0 -114
  172. package/lib-amd/hooks/useOnClickOutside.js.map +0 -1
  173. package/lib-amd/hooks/useOnScrollOutside.js +0 -31
  174. package/lib-amd/hooks/useOnScrollOutside.js.map +0 -1
  175. package/lib-amd/hooks/usePrevious.js +0 -17
  176. package/lib-amd/hooks/usePrevious.js.map +0 -1
  177. package/lib-amd/hooks/useScrollbarWidth.js +0 -32
  178. package/lib-amd/hooks/useScrollbarWidth.js.map +0 -1
  179. package/lib-amd/hooks/useTimeout.js +0 -33
  180. package/lib-amd/hooks/useTimeout.js.map +0 -1
  181. package/lib-amd/index.js +0 -40
  182. package/lib-amd/index.js.map +0 -1
  183. package/lib-amd/ssr/SSRContext.js +0 -69
  184. package/lib-amd/ssr/SSRContext.js.map +0 -1
  185. package/lib-amd/ssr/canUseDOM.js +0 -16
  186. package/lib-amd/ssr/canUseDOM.js.map +0 -1
  187. package/lib-amd/ssr/index.js +0 -7
  188. package/lib-amd/ssr/index.js.map +0 -1
  189. package/lib-amd/trigger/applyTriggerPropsToChildren.js +0 -40
  190. package/lib-amd/trigger/applyTriggerPropsToChildren.js.map +0 -1
  191. package/lib-amd/trigger/getTriggerChild.js +0 -40
  192. package/lib-amd/trigger/getTriggerChild.js.map +0 -1
  193. package/lib-amd/trigger/index.js +0 -9
  194. package/lib-amd/trigger/index.js.map +0 -1
  195. package/lib-amd/trigger/isFluentTrigger.js +0 -15
  196. package/lib-amd/trigger/isFluentTrigger.js.map +0 -1
  197. package/lib-amd/trigger/types.js +0 -5
  198. package/lib-amd/trigger/types.js.map +0 -1
  199. package/lib-amd/utils/clamp.js +0 -16
  200. package/lib-amd/utils/clamp.js.map +0 -1
  201. package/lib-amd/utils/getNativeElementProps.js +0 -64
  202. package/lib-amd/utils/getNativeElementProps.js.map +0 -1
  203. package/lib-amd/utils/getRTLSafeKey.js +0 -24
  204. package/lib-amd/utils/getRTLSafeKey.js.map +0 -1
  205. package/lib-amd/utils/index.js +0 -13
  206. package/lib-amd/utils/index.js.map +0 -1
  207. package/lib-amd/utils/isHTMLElement.js +0 -22
  208. package/lib-amd/utils/isHTMLElement.js.map +0 -1
  209. package/lib-amd/utils/isInteractiveHTMLElement.js +0 -25
  210. package/lib-amd/utils/isInteractiveHTMLElement.js.map +0 -1
  211. package/lib-amd/utils/mergeCallbacks.js +0 -40
  212. package/lib-amd/utils/mergeCallbacks.js.map +0 -1
  213. package/lib-amd/utils/omit.js +0 -31
  214. package/lib-amd/utils/omit.js.map +0 -1
  215. package/lib-amd/utils/properties.js +0 -450
  216. package/lib-amd/utils/properties.js.map +0 -1
@@ -1,69 +1,62 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
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
+ getNativeElementProps: ()=>getNativeElementProps,
13
+ getPartitionedNativeProps: ()=>getPartitionedNativeProps
5
14
  });
6
- exports.getPartitionedNativeProps = exports.getNativeElementProps = void 0;
7
- const properties_1 = /*#__PURE__*/require("./properties");
15
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
16
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
17
+ const _properties = require("./properties");
8
18
  const nativeElementMap = {
9
- label: properties_1.labelProperties,
10
- audio: properties_1.audioProperties,
11
- video: properties_1.videoProperties,
12
- ol: properties_1.olProperties,
13
- li: properties_1.liProperties,
14
- a: properties_1.anchorProperties,
15
- button: properties_1.buttonProperties,
16
- input: properties_1.inputProperties,
17
- textarea: properties_1.textAreaProperties,
18
- select: properties_1.selectProperties,
19
- option: properties_1.optionProperties,
20
- table: properties_1.tableProperties,
21
- tr: properties_1.trProperties,
22
- th: properties_1.thProperties,
23
- td: properties_1.tdProperties,
24
- colGroup: properties_1.colGroupProperties,
25
- col: properties_1.colProperties,
26
- fieldset: properties_1.fieldsetProperties,
27
- form: properties_1.formProperties,
28
- iframe: properties_1.iframeProperties,
29
- img: properties_1.imgProperties,
30
- time: properties_1.timeProperties,
31
- dialog: properties_1.dialogProperties
19
+ label: _properties.labelProperties,
20
+ audio: _properties.audioProperties,
21
+ video: _properties.videoProperties,
22
+ ol: _properties.olProperties,
23
+ li: _properties.liProperties,
24
+ a: _properties.anchorProperties,
25
+ button: _properties.buttonProperties,
26
+ input: _properties.inputProperties,
27
+ textarea: _properties.textAreaProperties,
28
+ select: _properties.selectProperties,
29
+ option: _properties.optionProperties,
30
+ table: _properties.tableProperties,
31
+ tr: _properties.trProperties,
32
+ th: _properties.thProperties,
33
+ td: _properties.tdProperties,
34
+ colGroup: _properties.colGroupProperties,
35
+ col: _properties.colProperties,
36
+ fieldset: _properties.fieldsetProperties,
37
+ form: _properties.formProperties,
38
+ iframe: _properties.iframeProperties,
39
+ img: _properties.imgProperties,
40
+ time: _properties.timeProperties,
41
+ dialog: _properties.dialogProperties
32
42
  };
33
- /**
34
- * Given an element tagname and user props, filters the props to only allowed props for the given
35
- * element type.
36
- * @param tagName - Tag name (e.g. "div")
37
- * @param props - Props object
38
- * @param excludedPropNames - List of props to disallow
39
- */
40
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
43
  function getNativeElementProps(tagName, props, excludedPropNames) {
42
- const allowedPropNames = tagName && nativeElementMap[tagName] || properties_1.htmlElementProperties;
43
- allowedPropNames.as = 1;
44
- return properties_1.getNativeProps(props, allowedPropNames, excludedPropNames);
44
+ const allowedPropNames = tagName && nativeElementMap[tagName] || _properties.htmlElementProperties;
45
+ allowedPropNames.as = 1;
46
+ return (0, _properties.getNativeProps)(props, allowedPropNames, excludedPropNames);
45
47
  }
46
- exports.getNativeElementProps = getNativeElementProps;
47
- /**
48
- * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.
49
- *
50
- * This function is only for use with components that have a primary slot other than `root`.
51
- * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.
52
- *
53
- * @returns An object containing the native props for the `root` and primary slots.
54
- */
55
- const getPartitionedNativeProps = ({
56
- primarySlotTagName,
57
- props,
58
- excludedPropNames
59
- }) => {
60
- return {
61
- root: {
62
- style: props.style,
63
- className: props.className
64
- },
65
- primary: getNativeElementProps(primarySlotTagName, props, [...(excludedPropNames || []), 'style', 'className'])
66
- };
67
- };
68
- exports.getPartitionedNativeProps = getPartitionedNativeProps;
48
+ const getPartitionedNativeProps = ({ primarySlotTagName , props , excludedPropNames })=>{
49
+ return {
50
+ root: {
51
+ style: props.style,
52
+ className: props.className
53
+ },
54
+ primary: getNativeElementProps(primarySlotTagName, props, [
55
+ ...excludedPropNames || [],
56
+ 'style',
57
+ 'className'
58
+ ])
59
+ };
60
+ }; //# sourceMappingURL=getNativeElementProps.js.map
61
+
69
62
  //# sourceMappingURL=getNativeElementProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["properties_1","require","nativeElementMap","label","labelProperties","audio","audioProperties","video","videoProperties","ol","olProperties","li","liProperties","a","anchorProperties","button","buttonProperties","input","inputProperties","textarea","textAreaProperties","select","selectProperties","option","optionProperties","table","tableProperties","tr","trProperties","th","thProperties","td","tdProperties","colGroup","colGroupProperties","col","colProperties","fieldset","fieldsetProperties","form","formProperties","iframe","iframeProperties","img","imgProperties","time","timeProperties","dialog","dialogProperties","getNativeElementProps","tagName","props","excludedPropNames","allowedPropNames","htmlElementProperties","as","getNativeProps","exports","getPartitionedNativeProps","primarySlotTagName","root","style","className","primary"],"sources":["../src/packages/react-components/react-utilities/src/utils/getNativeElementProps.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n labelProperties,\n audioProperties,\n videoProperties,\n olProperties,\n liProperties,\n anchorProperties,\n buttonProperties,\n inputProperties,\n textAreaProperties,\n selectProperties,\n optionProperties,\n tableProperties,\n trProperties,\n thProperties,\n tdProperties,\n colGroupProperties,\n colProperties,\n fieldsetProperties,\n formProperties,\n iframeProperties,\n imgProperties,\n htmlElementProperties,\n getNativeProps,\n timeProperties,\n dialogProperties,\n} from './properties';\n\nconst nativeElementMap: Record<string, Record<string, number>> = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n dialog: dialogProperties,\n};\n\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps<TAttributes extends React.HTMLAttributes<any>>(\n tagName: string,\n props: {},\n excludedPropNames?: string[],\n): TAttributes {\n const allowedPropNames = (tagName && nativeElementMap[tagName]) || htmlElementProperties;\n allowedPropNames.as = 1;\n\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */\nexport const getPartitionedNativeProps = <\n Props extends Pick<React.HTMLAttributes<HTMLElement>, 'style' | 'className'>,\n ExcludedPropKeys extends Extract<keyof Props, string> = never,\n>({\n primarySlotTagName,\n props,\n excludedPropNames,\n}: {\n /** The primary slot's element type (e.g. 'div') */\n primarySlotTagName: keyof JSX.IntrinsicElements;\n\n /** The component's props object */\n props: Props;\n\n /** List of native props to exclude from the returned value */\n excludedPropNames?: ExcludedPropKeys[];\n}) => {\n return {\n root: { style: props.style, className: props.className },\n primary: getNativeElementProps<Omit<Props, ExcludedPropKeys>>(primarySlotTagName, props, [\n ...(excludedPropNames || []),\n 'style',\n 'className',\n ]),\n };\n};\n"],"mappings":";;;;;;AACA,MAAAA,YAAA,gBAAAC,OAAA;AA4BA,MAAMC,gBAAgB,GAA2C;EAC/DC,KAAK,EAAEH,YAAA,CAAAI,eAAe;EACtBC,KAAK,EAAEL,YAAA,CAAAM,eAAe;EACtBC,KAAK,EAAEP,YAAA,CAAAQ,eAAe;EACtBC,EAAE,EAAET,YAAA,CAAAU,YAAY;EAChBC,EAAE,EAAEX,YAAA,CAAAY,YAAY;EAChBC,CAAC,EAAEb,YAAA,CAAAc,gBAAgB;EACnBC,MAAM,EAAEf,YAAA,CAAAgB,gBAAgB;EACxBC,KAAK,EAAEjB,YAAA,CAAAkB,eAAe;EACtBC,QAAQ,EAAEnB,YAAA,CAAAoB,kBAAkB;EAC5BC,MAAM,EAAErB,YAAA,CAAAsB,gBAAgB;EACxBC,MAAM,EAAEvB,YAAA,CAAAwB,gBAAgB;EACxBC,KAAK,EAAEzB,YAAA,CAAA0B,eAAe;EACtBC,EAAE,EAAE3B,YAAA,CAAA4B,YAAY;EAChBC,EAAE,EAAE7B,YAAA,CAAA8B,YAAY;EAChBC,EAAE,EAAE/B,YAAA,CAAAgC,YAAY;EAChBC,QAAQ,EAAEjC,YAAA,CAAAkC,kBAAkB;EAC5BC,GAAG,EAAEnC,YAAA,CAAAoC,aAAa;EAClBC,QAAQ,EAAErC,YAAA,CAAAsC,kBAAkB;EAC5BC,IAAI,EAAEvC,YAAA,CAAAwC,cAAc;EACpBC,MAAM,EAAEzC,YAAA,CAAA0C,gBAAgB;EACxBC,GAAG,EAAE3C,YAAA,CAAA4C,aAAa;EAClBC,IAAI,EAAE7C,YAAA,CAAA8C,cAAc;EACpBC,MAAM,EAAE/C,YAAA,CAAAgD;CACT;AAED;;;;;;;AAOA;AACA,SAAgBC,qBAAqBA,CACnCC,OAAe,EACfC,KAAS,EACTC,iBAA4B;EAE5B,MAAMC,gBAAgB,GAAIH,OAAO,IAAIhD,gBAAgB,CAACgD,OAAO,CAAC,IAAKlD,YAAA,CAAAsD,qBAAqB;EACxFD,gBAAgB,CAACE,EAAE,GAAG,CAAC;EAEvB,OAAOvD,YAAA,CAAAwD,cAAc,CAACL,KAAK,EAAEE,gBAAgB,EAAED,iBAAiB,CAAC;AACnE;AATAK,OAAA,CAAAR,qBAAA,GAAAA,qBAAA;AAWA;;;;;;;;AAQO,MAAMS,yBAAyB,GAAGA,CAGvC;EACAC,kBAAkB;EAClBR,KAAK;EACLC;AAAiB,CAUlB,KAAI;EACH,OAAO;IACLQ,IAAI,EAAE;MAAEC,KAAK,EAAEV,KAAK,CAACU,KAAK;MAAEC,SAAS,EAAEX,KAAK,CAACW;IAAS,CAAE;IACxDC,OAAO,EAAEd,qBAAqB,CAAgCU,kBAAkB,EAAER,KAAK,EAAE,CACvF,IAAIC,iBAAiB,IAAI,EAAE,CAAC,EAC5B,OAAO,EACP,WAAW,CACZ;GACF;AACH,CAAC;AAzBYK,OAAA,CAAAC,yBAAyB,GAAAA,yBAAA"}
1
+ {"version":3,"sources":["../../lib/utils/getNativeElementProps.js"],"sourcesContent":["import * as React from 'react';\nimport { labelProperties, audioProperties, videoProperties, olProperties, liProperties, anchorProperties, buttonProperties, inputProperties, textAreaProperties, selectProperties, optionProperties, tableProperties, trProperties, thProperties, tdProperties, colGroupProperties, colProperties, fieldsetProperties, formProperties, iframeProperties, imgProperties, htmlElementProperties, getNativeProps, timeProperties, dialogProperties } from './properties';\nconst nativeElementMap = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n dialog: dialogProperties\n};\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps(tagName, props, excludedPropNames) {\n const allowedPropNames = tagName && nativeElementMap[tagName] || htmlElementProperties;\n allowedPropNames.as = 1;\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */\nexport const getPartitionedNativeProps = ({\n primarySlotTagName,\n props,\n excludedPropNames\n}) => {\n return {\n root: {\n style: props.style,\n className: props.className\n },\n primary: getNativeElementProps(primarySlotTagName, props, [...(excludedPropNames || []), 'style', 'className'])\n };\n};\n//# sourceMappingURL=getNativeElementProps.js.map"],"names":["getNativeElementProps","getPartitionedNativeProps","nativeElementMap","label","labelProperties","audio","audioProperties","video","videoProperties","ol","olProperties","li","liProperties","a","anchorProperties","button","buttonProperties","input","inputProperties","textarea","textAreaProperties","select","selectProperties","option","optionProperties","table","tableProperties","tr","trProperties","th","thProperties","td","tdProperties","colGroup","colGroupProperties","col","colProperties","fieldset","fieldsetProperties","form","formProperties","iframe","iframeProperties","img","imgProperties","time","timeProperties","dialog","dialogProperties","tagName","props","excludedPropNames","allowedPropNames","htmlElementProperties","as","getNativeProps","primarySlotTagName","root","style","className","primary"],"mappings":";;;;;;;;;;;IAkCgBA,qBAAqB,MAArBA;IAaHC,yBAAyB,MAAzBA;;;6DA/CU;4BACga;AACvb,MAAMC,mBAAmB;IACvBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,GAAGC,4BAAgB;IACnBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,UAAUC,8BAAkB;IAC5BC,QAAQC,4BAAgB;IACxBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,UAAUC,8BAAkB;IAC5BC,KAAKC,yBAAa;IAClBC,UAAUC,8BAAkB;IAC5BC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;IACxBC,KAAKC,yBAAa;IAClBC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;AAC1B;AAQO,SAAShD,sBAAsBiD,OAAO,EAAEC,KAAK,EAAEC,iBAAiB,EAAE;IACvE,MAAMC,mBAAmBH,WAAW/C,gBAAgB,CAAC+C,QAAQ,IAAII,iCAAqB;IACtFD,iBAAiBE,EAAE,GAAG;IACtB,OAAOC,IAAAA,0BAAc,EAACL,OAAOE,kBAAkBD;AACjD;AASO,MAAMlD,4BAA4B,CAAC,EACxCuD,mBAAkB,EAClBN,MAAK,EACLC,kBAAiB,EAClB,GAAK;IACJ,OAAO;QACLM,MAAM;YACJC,OAAOR,MAAMQ,KAAK;YAClBC,WAAWT,MAAMS,SAAS;QAC5B;QACAC,SAAS5D,sBAAsBwD,oBAAoBN,OAAO;eAAKC,qBAAqB,EAAE;YAAG;YAAS;SAAY;IAChH;AACF,GACA,iDAAiD"}
@@ -1,27 +1,28 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getRTLSafeKey = void 0;
7
1
  /**
8
2
  * @internal
9
3
  * Finds and swaps a provided key for it's right to left format.
10
- */
11
- const getRTLSafeKey = (key, dir) => {
12
- if (dir === 'rtl') {
13
- switch (key) {
14
- case 'ArrowLeft':
15
- {
16
- return 'ArrowRight';
17
- }
18
- case 'ArrowRight':
19
- {
20
- return 'ArrowLeft';
4
+ */ "use strict";
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ Object.defineProperty(exports, "getRTLSafeKey", {
9
+ enumerable: true,
10
+ get: ()=>getRTLSafeKey
11
+ });
12
+ const getRTLSafeKey = (key, dir)=>{
13
+ if (dir === 'rtl') {
14
+ switch(key){
15
+ case 'ArrowLeft':
16
+ {
17
+ return 'ArrowRight';
18
+ }
19
+ case 'ArrowRight':
20
+ {
21
+ return 'ArrowLeft';
22
+ }
21
23
  }
22
24
  }
23
- }
24
- return key;
25
- };
26
- exports.getRTLSafeKey = getRTLSafeKey;
25
+ return key;
26
+ }; //# sourceMappingURL=getRTLSafeKey.js.map
27
+
27
28
  //# sourceMappingURL=getRTLSafeKey.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getRTLSafeKey","key","dir","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/getRTLSafeKey.ts"],"sourcesContent":["/**\n * @internal\n * Finds and swaps a provided key for it's right to left format.\n */\nexport const getRTLSafeKey = (key: string, dir: 'ltr' | 'rtl') => {\n if (dir === 'rtl') {\n switch (key) {\n case 'ArrowLeft': {\n return 'ArrowRight';\n }\n\n case 'ArrowRight': {\n return 'ArrowLeft';\n }\n }\n }\n\n return key;\n};\n"],"mappings":";;;;;;AAAA;;;;AAIO,MAAMA,aAAa,GAAGA,CAACC,GAAW,EAAEC,GAAkB,KAAI;EAC/D,IAAIA,GAAG,KAAK,KAAK,EAAE;IACjB,QAAQD,GAAG;MACT,KAAK,WAAW;QAAE;UAChB,OAAO,YAAY;;MAGrB,KAAK,YAAY;QAAE;UACjB,OAAO,WAAW;;IACnB;;EAIL,OAAOA,GAAG;AACZ,CAAC;AAdYE,OAAA,CAAAH,aAAa,GAAAA,aAAA"}
1
+ {"version":3,"sources":["../../lib/utils/getRTLSafeKey.js"],"sourcesContent":["/**\n * @internal\n * Finds and swaps a provided key for it's right to left format.\n */export const getRTLSafeKey = (key, dir) => {\n if (dir === 'rtl') {\n switch (key) {\n case 'ArrowLeft':\n {\n return 'ArrowRight';\n }\n case 'ArrowRight':\n {\n return 'ArrowLeft';\n }\n }\n }\n return key;\n};\n//# sourceMappingURL=getRTLSafeKey.js.map"],"names":["getRTLSafeKey","key","dir"],"mappings":"AAAA;;;CAGC;;;;+BAAeA;;aAAAA;;AAAN,MAAMA,gBAAgB,CAACC,KAAKC,MAAQ;IAC5C,IAAIA,QAAQ,OAAO;QACjB,OAAQD;YACN,KAAK;gBACH;oBACE,OAAO;gBACT;YACF,KAAK;gBACH;oBACE,OAAO;gBACT;QACJ;IACF,CAAC;IACD,OAAOA;AACT,GACA,yCAAyC"}
@@ -1,30 +1,30 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "getReactCallbackName", {
6
+ enumerable: true,
7
+ get: ()=>getReactCallbackName
5
8
  });
6
- exports.getReactCallbackName = void 0;
7
- /**
8
- * React.SyntheticEvent contains name of a callback that should be fired, this function returns it.
9
- *
10
- * Ideally, it should also distinguish regular and "capture" callbacks, but it's possible only with React 17 as
11
- * ".eventPhase" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events
12
- * are handled in bubble phase.
13
- */
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
14
11
  function getReactCallbackName(event) {
15
- if (event._reactName) {
16
- return event._reactName;
17
- }
18
- if (event.dispatchConfig) {
19
- if (event.dispatchConfig.registrationName) {
20
- return event.dispatchConfig.registrationName;
12
+ if (event._reactName) {
13
+ return event._reactName;
14
+ }
15
+ if (event.dispatchConfig) {
16
+ if (event.dispatchConfig.registrationName) {
17
+ return event.dispatchConfig.registrationName;
18
+ }
19
+ return event.dispatchConfig.phasedRegistrationNames.bubbled;
21
20
  }
22
- return event.dispatchConfig.phasedRegistrationNames.bubbled;
23
- }
24
- if (process.env.NODE_ENV !== 'production') {
25
- // eslint-disable-next-line no-console
26
- console.error(['Passed React.SyntheticEvent does not contain ".dispatchConfig" or "._reactName".', 'This should not happen, please report it to https://github.com/microsoft/fluentui']);
27
- }
28
- }
29
- exports.getReactCallbackName = getReactCallbackName;
21
+ if (process.env.NODE_ENV !== 'production') {
22
+ // eslint-disable-next-line no-console
23
+ console.error([
24
+ 'Passed React.SyntheticEvent does not contain ".dispatchConfig" or "._reactName".',
25
+ 'This should not happen, please report it to https://github.com/microsoft/fluentui'
26
+ ]);
27
+ }
28
+ } //# sourceMappingURL=getReactCallbackName.js.map
29
+
30
30
  //# sourceMappingURL=getReactCallbackName.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getReactCallbackName","event","_reactName","dispatchConfig","registrationName","phasedRegistrationNames","bubbled","process","env","NODE_ENV","console","error","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/getReactCallbackName.ts"],"sourcesContent":["import * as React from 'react';\n\ninterface ReactSyntheticEvent extends React.SyntheticEvent<unknown> {\n // React 17/18\n // See https://github.com/facebook/react/pull/19236\n _reactName?: string;\n\n // React 16\n dispatchConfig?: {\n registrationName: string;\n phasedRegistrationNames: {\n bubbled: string;\n captured: string;\n };\n };\n}\n\ntype NonUndefined<A> = A extends undefined ? never : A;\ntype FunctionKeys<T extends object> = {\n [K in keyof T]-?: NonUndefined<T[K]> extends Function ? K : never;\n}[keyof T];\n\nexport type ReactCallbackName = FunctionKeys<React.DOMAttributes<unknown>>;\n\n/**\n * React.SyntheticEvent contains name of a callback that should be fired, this function returns it.\n *\n * Ideally, it should also distinguish regular and \"capture\" callbacks, but it's possible only with React 17 as\n * \".eventPhase\" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events\n * are handled in bubble phase.\n */\nexport function getReactCallbackName(event: ReactSyntheticEvent): ReactCallbackName | undefined {\n if (event._reactName) {\n return event._reactName as ReactCallbackName;\n }\n\n if (event.dispatchConfig) {\n if (event.dispatchConfig.registrationName) {\n return event.dispatchConfig.registrationName as ReactCallbackName;\n }\n\n return event.dispatchConfig.phasedRegistrationNames.bubbled as ReactCallbackName;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error([\n 'Passed React.SyntheticEvent does not contain \".dispatchConfig\" or \"._reactName\".',\n 'This should not happen, please report it to https://github.com/microsoft/fluentui',\n ]);\n }\n}\n"],"mappings":";;;;;;AAwBA;;;;;;;AAOA,SAAgBA,oBAAoBA,CAACC,KAA0B;EAC7D,IAAIA,KAAK,CAACC,UAAU,EAAE;IACpB,OAAOD,KAAK,CAACC,UAA+B;;EAG9C,IAAID,KAAK,CAACE,cAAc,EAAE;IACxB,IAAIF,KAAK,CAACE,cAAc,CAACC,gBAAgB,EAAE;MACzC,OAAOH,KAAK,CAACE,cAAc,CAACC,gBAAqC;;IAGnE,OAAOH,KAAK,CAACE,cAAc,CAACE,uBAAuB,CAACC,OAA4B;;EAGlF,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC;IACAC,OAAO,CAACC,KAAK,CAAC,CACZ,kFAAkF,EAClF,mFAAmF,CACpF,CAAC;;AAEN;AApBAC,OAAA,CAAAZ,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"sources":["../../lib/utils/getReactCallbackName.js"],"sourcesContent":["import * as React from 'react';\n/**\n * React.SyntheticEvent contains name of a callback that should be fired, this function returns it.\n *\n * Ideally, it should also distinguish regular and \"capture\" callbacks, but it's possible only with React 17 as\n * \".eventPhase\" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events\n * are handled in bubble phase.\n */\nexport function getReactCallbackName(event) {\n if (event._reactName) {\n return event._reactName;\n }\n if (event.dispatchConfig) {\n if (event.dispatchConfig.registrationName) {\n return event.dispatchConfig.registrationName;\n }\n return event.dispatchConfig.phasedRegistrationNames.bubbled;\n }\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(['Passed React.SyntheticEvent does not contain \".dispatchConfig\" or \"._reactName\".', 'This should not happen, please report it to https://github.com/microsoft/fluentui']);\n }\n}\n//# sourceMappingURL=getReactCallbackName.js.map"],"names":["getReactCallbackName","event","_reactName","dispatchConfig","registrationName","phasedRegistrationNames","bubbled","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAQgBA;;aAAAA;;;6DARO;AAQhB,SAASA,qBAAqBC,KAAK,EAAE;IAC1C,IAAIA,MAAMC,UAAU,EAAE;QACpB,OAAOD,MAAMC,UAAU;IACzB,CAAC;IACD,IAAID,MAAME,cAAc,EAAE;QACxB,IAAIF,MAAME,cAAc,CAACC,gBAAgB,EAAE;YACzC,OAAOH,MAAME,cAAc,CAACC,gBAAgB;QAC9C,CAAC;QACD,OAAOH,MAAME,cAAc,CAACE,uBAAuB,CAACC,OAAO;IAC7D,CAAC;IACD,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;YAAC;YAAoF;SAAoF;IACzL,CAAC;AACH,EACA,gDAAgD"}
@@ -1,15 +1,16 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./clamp"), exports);
8
- tslib_1.__exportStar(require("./getNativeElementProps"), exports);
9
- tslib_1.__exportStar(require("./getRTLSafeKey"), exports);
10
- tslib_1.__exportStar(require("./mergeCallbacks"), exports);
11
- tslib_1.__exportStar(require("./omit"), exports);
12
- tslib_1.__exportStar(require("./properties"), exports);
13
- tslib_1.__exportStar(require("./isHTMLElement"), exports);
14
- tslib_1.__exportStar(require("./isInteractiveHTMLElement"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./clamp"), exports);
7
+ _exportStar(require("./getNativeElementProps"), exports);
8
+ _exportStar(require("./getRTLSafeKey"), exports);
9
+ _exportStar(require("./mergeCallbacks"), exports);
10
+ _exportStar(require("./omit"), exports);
11
+ _exportStar(require("./properties"), exports);
12
+ _exportStar(require("./isHTMLElement"), exports);
13
+ _exportStar(require("./isInteractiveHTMLElement"), exports);
14
+ //# sourceMappingURL=index.js.map
15
+
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/index.ts"],"sourcesContent":["export * from './clamp';\nexport * from './getNativeElementProps';\nexport * from './getRTLSafeKey';\nexport * from './mergeCallbacks';\nexport * from './omit';\nexport * from './properties';\nexport * from './isHTMLElement';\nexport * from './isInteractiveHTMLElement';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,aAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,6BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,YAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,gCAAAC,OAAA"}
1
+ {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './clamp';\nexport * from './getNativeElementProps';\nexport * from './getRTLSafeKey';\nexport * from './mergeCallbacks';\nexport * from './omit';\nexport * from './properties';\nexport * from './isHTMLElement';\nexport * from './isInteractiveHTMLElement';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,22 +1,29 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isHTMLElement = void 0;
7
1
  /**
8
- * @internal
9
2
  * Verifies if a given node is an HTMLElement,
10
3
  * this method works seamlessly with frames and elements from different documents
11
4
  *
12
- * This is required as simply using `instanceof`
13
- * might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)
5
+ * This is preferred over simply using `instanceof`.
6
+ * Since `instanceof` might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * isHTMLElement(event.target) && event.target.focus()
11
+ * isHTMLElement(event.target, {constructorName: 'HTMLInputElement'}) && event.target.value // some value
12
+ * ```
14
13
  *
15
- */
14
+ */ "use strict";
15
+ Object.defineProperty(exports, "__esModule", {
16
+ value: true
17
+ });
18
+ Object.defineProperty(exports, "isHTMLElement", {
19
+ enumerable: true,
20
+ get: ()=>isHTMLElement
21
+ });
16
22
  function isHTMLElement(element, options) {
17
- var _a, _b;
18
- const typedElement = element;
19
- return Boolean(((_a = typedElement === null || typedElement === void 0 ? void 0 : typedElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_b = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _b !== void 0 ? _b : 'HTMLElement']);
20
- }
21
- exports.isHTMLElement = isHTMLElement;
23
+ var _typedElement_ownerDocument;
24
+ const typedElement = element;
25
+ var _options_constructorName;
26
+ return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);
27
+ } //# sourceMappingURL=isHTMLElement.js.map
28
+
22
29
  //# sourceMappingURL=isHTMLElement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isHTMLElement","element","options","typedElement","Boolean","_a","ownerDocument","defaultView","_b","constructorName","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/isHTMLElement.ts"],"sourcesContent":["/**\n * @internal\n * Verifies if a given node is an HTMLElement,\n * this method works seamlessly with frames and elements from different documents\n *\n * This is required as simply using `instanceof`\n * might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)\n *\n */\nexport function isHTMLElement<ConstructorName extends HTMLElementConstructorName = 'HTMLElement'>(\n element?: unknown,\n options?: { constructorName?: ConstructorName },\n): element is InstanceType<(typeof globalThis)[ConstructorName]> {\n const typedElement = element as Node | null | undefined;\n return Boolean(\n typedElement?.ownerDocument?.defaultView &&\n typedElement instanceof typedElement.ownerDocument.defaultView[options?.constructorName ?? 'HTMLElement'],\n );\n}\n\ntype HTMLElementConstructorName =\n | 'HTMLElement'\n | 'HTMLAnchorElement'\n | 'HTMLAreaElement'\n | 'HTMLAudioElement'\n | 'HTMLBaseElement'\n | 'HTMLBodyElement'\n | 'HTMLBRElement'\n | 'HTMLButtonElement'\n | 'HTMLCanvasElement'\n | 'HTMLDataElement'\n | 'HTMLDataListElement'\n | 'HTMLDetailsElement'\n | 'HTMLDialogElement'\n | 'HTMLDivElement'\n | 'HTMLDListElement'\n | 'HTMLEmbedElement'\n | 'HTMLFieldSetElement'\n | 'HTMLFormElement'\n | 'HTMLHeadingElement'\n | 'HTMLHeadElement'\n | 'HTMLHRElement'\n | 'HTMLHtmlElement'\n | 'HTMLIFrameElement'\n | 'HTMLImageElement'\n | 'HTMLInputElement'\n | 'HTMLModElement'\n | 'HTMLLabelElement'\n | 'HTMLLegendElement'\n | 'HTMLLIElement'\n | 'HTMLLinkElement'\n | 'HTMLMapElement'\n | 'HTMLMetaElement'\n | 'HTMLMeterElement'\n | 'HTMLObjectElement'\n | 'HTMLOListElement'\n | 'HTMLOptGroupElement'\n | 'HTMLOptionElement'\n | 'HTMLOutputElement'\n | 'HTMLParagraphElement'\n | 'HTMLParamElement'\n | 'HTMLPreElement'\n | 'HTMLProgressElement'\n | 'HTMLQuoteElement'\n | 'HTMLSlotElement'\n | 'HTMLScriptElement'\n | 'HTMLSelectElement'\n | 'HTMLSourceElement'\n | 'HTMLSpanElement'\n | 'HTMLStyleElement'\n | 'HTMLTableElement'\n | 'HTMLTableColElement'\n | 'HTMLTableRowElement'\n | 'HTMLTableSectionElement'\n | 'HTMLTemplateElement'\n | 'HTMLTextAreaElement'\n | 'HTMLTimeElement'\n | 'HTMLTitleElement'\n | 'HTMLTrackElement'\n | 'HTMLUListElement'\n | 'HTMLVideoElement';\n"],"mappings":";;;;;;AAAA;;;;;;;;;AASA,SAAgBA,aAAaA,CAC3BC,OAAiB,EACjBC,OAA+C;;EAE/C,MAAMC,YAAY,GAAGF,OAAkC;EACvD,OAAOG,OAAO,CACZ,EAAAC,EAAA,GAAAF,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEG,aAAa,cAAAD,EAAA,uBAAAA,EAAA,CAAEE,WAAW,KACtCJ,YAAY,YAAYA,YAAY,CAACG,aAAa,CAACC,WAAW,CAAC,CAAAC,EAAA,GAAAN,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEO,eAAe,cAAAD,EAAA,cAAAA,EAAA,GAAI,aAAa,CAAC,CAC5G;AACH;AATAE,OAAA,CAAAV,aAAA,GAAAA,aAAA"}
1
+ {"version":3,"sources":["../../lib/utils/isHTMLElement.js"],"sourcesContent":["/**\n * Verifies if a given node is an HTMLElement,\n * this method works seamlessly with frames and elements from different documents\n *\n * This is preferred over simply using `instanceof`.\n * Since `instanceof` might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)\n *\n * @example\n * ```ts\n * isHTMLElement(event.target) && event.target.focus()\n * isHTMLElement(event.target, {constructorName: 'HTMLInputElement'}) && event.target.value // some value\n * ```\n *\n */export function isHTMLElement(element, options) {\n var _typedElement_ownerDocument;\n const typedElement = element;\n var _options_constructorName;\n return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);\n}\n//# sourceMappingURL=isHTMLElement.js.map"],"names":["isHTMLElement","element","options","_typedElement_ownerDocument","typedElement","_options_constructorName","Boolean","ownerDocument","defaultView","constructorName"],"mappings":"AAAA;;;;;;;;;;;;;CAaC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,cAAcC,OAAO,EAAEC,OAAO,EAAE;IACjD,IAAIC;IACJ,MAAMC,eAAeH;IACrB,IAAII;IACJ,OAAOC,QAAQ,AAACF,CAAAA,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAI,AAACD,CAAAA,8BAA8BC,aAAaG,aAAa,AAAD,MAAO,IAAI,IAAIJ,gCAAgC,KAAK,IAAI,KAAK,IAAIA,4BAA4BK,WAAW,AAAD,KAAMJ,wBAAwBA,aAAaG,aAAa,CAACC,WAAW,CAAC,AAACH,CAAAA,2BAA2BH,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQO,eAAe,AAAD,MAAO,IAAI,IAAIJ,6BAA6B,KAAK,IAAIA,2BAA2B,aAAa,CAAC;AACpf,EACA,yCAAyC"}
@@ -1,29 +1,25 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "isInteractiveHTMLElement", {
6
+ enumerable: true,
7
+ get: ()=>isInteractiveHTMLElement
5
8
  });
6
- exports.isInteractiveHTMLElement = void 0;
7
- const isHTMLElement_1 = /*#__PURE__*/require("./isHTMLElement");
8
- /**
9
- * @internal
10
- * Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys
11
- */
9
+ const _isHTMLElement = require("./isHTMLElement");
12
10
  function isInteractiveHTMLElement(element) {
13
- if (!isHTMLElement_1.isHTMLElement(element)) {
14
- return false;
15
- }
16
- const {
17
- tagName
18
- } = element;
19
- switch (tagName) {
20
- case 'BUTTON':
21
- case 'A':
22
- case 'INPUT':
23
- case 'TEXTAREA':
24
- return true;
25
- }
26
- return element.isContentEditable;
27
- }
28
- exports.isInteractiveHTMLElement = isInteractiveHTMLElement;
11
+ if (!(0, _isHTMLElement.isHTMLElement)(element)) {
12
+ return false;
13
+ }
14
+ const { tagName } = element;
15
+ switch(tagName){
16
+ case 'BUTTON':
17
+ case 'A':
18
+ case 'INPUT':
19
+ case 'TEXTAREA':
20
+ return true;
21
+ }
22
+ return element.isContentEditable;
23
+ } //# sourceMappingURL=isInteractiveHTMLElement.js.map
24
+
29
25
  //# sourceMappingURL=isInteractiveHTMLElement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isHTMLElement_1","require","isInteractiveHTMLElement","element","isHTMLElement","tagName","isContentEditable","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/isInteractiveHTMLElement.ts"],"sourcesContent":["import { isHTMLElement } from './isHTMLElement';\n\n/**\n * @internal\n * Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys\n */\nexport function isInteractiveHTMLElement(element: unknown) {\n if (!isHTMLElement(element)) {\n return false;\n }\n\n const { tagName } = element;\n switch (tagName) {\n case 'BUTTON':\n case 'A':\n case 'INPUT':\n case 'TEXTAREA':\n return true;\n }\n\n return element.isContentEditable;\n}\n"],"mappings":";;;;;;AAAA,MAAAA,eAAA,gBAAAC,OAAA;AAEA;;;;AAIA,SAAgBC,wBAAwBA,CAACC,OAAgB;EACvD,IAAI,CAACH,eAAA,CAAAI,aAAa,CAACD,OAAO,CAAC,EAAE;IAC3B,OAAO,KAAK;;EAGd,MAAM;IAAEE;EAAO,CAAE,GAAGF,OAAO;EAC3B,QAAQE,OAAO;IACb,KAAK,QAAQ;IACb,KAAK,GAAG;IACR,KAAK,OAAO;IACZ,KAAK,UAAU;MACb,OAAO,IAAI;EAAC;EAGhB,OAAOF,OAAO,CAACG,iBAAiB;AAClC;AAfAC,OAAA,CAAAL,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"sources":["../../lib/utils/isInteractiveHTMLElement.js"],"sourcesContent":["import { isHTMLElement } from './isHTMLElement';\n/**\n * @internal\n * Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys\n */\nexport function isInteractiveHTMLElement(element) {\n if (!isHTMLElement(element)) {\n return false;\n }\n const {\n tagName\n } = element;\n switch (tagName) {\n case 'BUTTON':\n case 'A':\n case 'INPUT':\n case 'TEXTAREA':\n return true;\n }\n return element.isContentEditable;\n}\n//# sourceMappingURL=isInteractiveHTMLElement.js.map"],"names":["isInteractiveHTMLElement","element","isHTMLElement","tagName","isContentEditable"],"mappings":";;;;+BAKgBA;;aAAAA;;+BALc;AAKvB,SAASA,yBAAyBC,OAAO,EAAE;IAChD,IAAI,CAACC,IAAAA,4BAAa,EAACD,UAAU;QAC3B,OAAO,KAAK;IACd,CAAC;IACD,MAAM,EACJE,QAAO,EACR,GAAGF;IACJ,OAAQE;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO,IAAI;IACf;IACA,OAAOF,QAAQG,iBAAiB;AAClC,EACA,oDAAoD"}
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mergeCallbacks = void 0;
7
1
  /**
8
2
  * @internal
9
3
  * Combine two event callbacks into a single callback function that calls each one in order.
@@ -26,12 +20,19 @@ exports.mergeCallbacks = void 0;
26
20
  * @param callback2 - The second callback to be called, or undefined
27
21
  *
28
22
  * @returns A function that that calls the provided functions in order
29
- */
23
+ */ "use strict";
24
+ Object.defineProperty(exports, "__esModule", {
25
+ value: true
26
+ });
27
+ Object.defineProperty(exports, "mergeCallbacks", {
28
+ enumerable: true,
29
+ get: ()=>mergeCallbacks
30
+ });
30
31
  function mergeCallbacks(callback1, callback2) {
31
- return (...args) => {
32
- callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);
33
- callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);
34
- };
35
- }
36
- exports.mergeCallbacks = mergeCallbacks;
32
+ return (...args)=>{
33
+ callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);
34
+ callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);
35
+ };
36
+ } //# sourceMappingURL=mergeCallbacks.js.map
37
+
37
38
  //# sourceMappingURL=mergeCallbacks.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["mergeCallbacks","callback1","callback2","args","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/mergeCallbacks.ts"],"sourcesContent":["/**\n * @internal\n * Combine two event callbacks into a single callback function that calls each one in order.\n *\n * Usage example:\n * ```ts\n * state.slot.onChange = mergeCallbacks(state.slot.onChange, ev => {\n * // Handle onChange\n * });\n * ```\n *\n * The primary use is to avoid the need to capture an existing callback (`state.slot.onChange` in the example) to a\n * local variable before replacing with a new listener that calls the existing one. This helps avoid bugs like:\n * * Infinite recursion by calling the re-assigned state.slot.onChange if it's not captured to a local variable.\n * * Missing a call to the original onChange due to an early return or other conditional.\n *\n * If you need a callback that is stable between renders, wrap the result in {@link useEventCallback}.\n *\n * @param callback1 - The first callback to be called, or undefined\n * @param callback2 - The second callback to be called, or undefined\n *\n * @returns A function that that calls the provided functions in order\n */\nexport function mergeCallbacks<Args extends unknown[]>(\n callback1: ((...args: Args) => void) | undefined,\n callback2: ((...args: Args) => void) | undefined,\n) {\n return (...args: Args) => {\n callback1?.(...args);\n callback2?.(...args);\n };\n}\n"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgBA,cAAcA,CAC5BC,SAAgD,EAChDC,SAAgD;EAEhD,OAAO,CAAC,GAAGC,IAAU,KAAI;IACvBF,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAG,GAAGE,IAAI,CAAC;IACpBD,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAG,GAAGC,IAAI,CAAC;EACtB,CAAC;AACH;AARAC,OAAA,CAAAJ,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"sources":["../../lib/utils/mergeCallbacks.js"],"sourcesContent":["/**\n * @internal\n * Combine two event callbacks into a single callback function that calls each one in order.\n *\n * Usage example:\n * ```ts\n * state.slot.onChange = mergeCallbacks(state.slot.onChange, ev => {\n * // Handle onChange\n * });\n * ```\n *\n * The primary use is to avoid the need to capture an existing callback (`state.slot.onChange` in the example) to a\n * local variable before replacing with a new listener that calls the existing one. This helps avoid bugs like:\n * * Infinite recursion by calling the re-assigned state.slot.onChange if it's not captured to a local variable.\n * * Missing a call to the original onChange due to an early return or other conditional.\n *\n * If you need a callback that is stable between renders, wrap the result in {@link useEventCallback}.\n *\n * @param callback1 - The first callback to be called, or undefined\n * @param callback2 - The second callback to be called, or undefined\n *\n * @returns A function that that calls the provided functions in order\n */export function mergeCallbacks(callback1, callback2) {\n return (...args) => {\n callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);\n callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);\n };\n}\n//# sourceMappingURL=mergeCallbacks.js.map"],"names":["mergeCallbacks","callback1","callback2","args"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;CAsBC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,eAAeC,SAAS,EAAEC,SAAS,EAAE;IACtD,OAAO,CAAC,GAAGC,OAAS;QAClBF,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaE,KAAK;QACxED,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaC,KAAK;IAC1E;AACF,EACA,0CAA0C"}
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.omit = void 0;
7
1
  /**
8
2
  * Tiny helper to do the minimal amount of work in duplicating an object but omitting some
9
3
  * props. This ends up faster than using object ...rest or reduce to filter.
@@ -16,17 +10,24 @@ exports.omit = void 0;
16
10
  *
17
11
  * @param obj - The object to clone
18
12
  * @param exclusions - The array of keys to exclude
19
- */
20
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ */ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ "use strict";
15
+ Object.defineProperty(exports, "__esModule", {
16
+ value: true
17
+ });
18
+ Object.defineProperty(exports, "omit", {
19
+ enumerable: true,
20
+ get: ()=>omit
21
+ });
21
22
  function omit(obj, exclusions) {
22
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
- const result = {};
24
- for (const key in obj) {
25
- if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {
26
- result[key] = obj[key];
23
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
+ const result = {};
25
+ for(const key in obj){
26
+ if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {
27
+ result[key] = obj[key];
28
+ }
27
29
  }
28
- }
29
- return result;
30
- }
31
- exports.omit = omit;
30
+ return result;
31
+ } //# sourceMappingURL=omit.js.map
32
+
32
33
  //# sourceMappingURL=omit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["omit","obj","exclusions","result","key","indexOf","hasOwnProperty","exports"],"sources":["../src/packages/react-components/react-utilities/src/utils/omit.ts"],"sourcesContent":["/**\n * Tiny helper to do the minimal amount of work in duplicating an object but omitting some\n * props. This ends up faster than using object ...rest or reduce to filter.\n *\n * This behaves very much like filteredAssign, but does not merge many objects together,\n * uses an exclusion object map, and avoids spreads all for optimal performance.\n *\n * See perf test for background:\n * https://jsperf.com/omit-vs-rest-vs-reduce/1\n *\n * @param obj - The object to clone\n * @param exclusions - The array of keys to exclude\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function omit<TObj extends Record<string, any>, Exclusions extends (keyof TObj)[]>(\n obj: TObj,\n exclusions: Exclusions,\n): Omit<TObj, Exclusions[number]> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n\n for (const key in obj) {\n if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n\n return result as TObj;\n}\n"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;AAaA;AACA,SAAgBA,IAAIA,CAClBC,GAAS,EACTC,UAAsB;EAEtB;EACA,MAAMC,MAAM,GAAwB,EAAE;EAEtC,KAAK,MAAMC,GAAG,IAAIH,GAAG,EAAE;IACrB,IAAIC,UAAU,CAACG,OAAO,CAACD,GAAG,CAAC,KAAK,CAAC,CAAC,IAAIH,GAAG,CAACK,cAAc,CAACF,GAAG,CAAC,EAAE;MAC7DD,MAAM,CAACC,GAAG,CAAC,GAAGH,GAAG,CAACG,GAAG,CAAC;;;EAI1B,OAAOD,MAAc;AACvB;AAdAI,OAAA,CAAAP,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"sources":["../../lib/utils/omit.js"],"sourcesContent":["/**\n * Tiny helper to do the minimal amount of work in duplicating an object but omitting some\n * props. This ends up faster than using object ...rest or reduce to filter.\n *\n * This behaves very much like filteredAssign, but does not merge many objects together,\n * uses an exclusion object map, and avoids spreads all for optimal performance.\n *\n * See perf test for background:\n * https://jsperf.com/omit-vs-rest-vs-reduce/1\n *\n * @param obj - The object to clone\n * @param exclusions - The array of keys to exclude\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function omit(obj, exclusions) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n for (const key in obj) {\n if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n//# sourceMappingURL=omit.js.map"],"names":["omit","obj","exclusions","result","key","indexOf","hasOwnProperty"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAAG,8DAA8D;;;;;+BAClDA;;aAAAA;;AAAT,SAASA,KAAKC,GAAG,EAAEC,UAAU,EAAE;IACpC,8DAA8D;IAC9D,MAAMC,SAAS,CAAC;IAChB,IAAK,MAAMC,OAAOH,IAAK;QACrB,IAAIC,WAAWG,OAAO,CAACD,SAAS,CAAC,KAAKH,IAAIK,cAAc,CAACF,MAAM;YAC7DD,MAAM,CAACC,IAAI,GAAGH,GAAG,CAACG,IAAI;QACxB,CAAC;IACH;IACA,OAAOD;AACT,EACA,gCAAgC"}