@helsenorge/designsystem-react 10.0.2 → 10.2.0

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 (181) hide show
  1. package/AnchorLink.js +2 -2
  2. package/AnchorLink.js.map +1 -1
  3. package/Avatar.js +2 -2
  4. package/Avatar.js.map +1 -1
  5. package/Badge.js +3 -3
  6. package/Badge.js.map +1 -1
  7. package/Button.js +4 -4
  8. package/Button.js.map +1 -1
  9. package/CHANGELOG.md +38 -0
  10. package/Checkbox.js +2 -2
  11. package/Checkbox.js.map +1 -1
  12. package/Close.js +2 -2
  13. package/Close.js.map +1 -1
  14. package/ErrorBoundary.js +2 -2
  15. package/ErrorBoundary.js.map +1 -1
  16. package/Expander.js +2 -2
  17. package/Expander.js.map +1 -1
  18. package/FormGroup.js +12 -12
  19. package/FormGroup.js.map +1 -1
  20. package/FormLayout.js +3 -3
  21. package/FormLayout.js.map +1 -1
  22. package/HelpBubble.js +2 -2
  23. package/HelpBubble.js.map +1 -1
  24. package/HighlightPanel.js +2 -2
  25. package/HighlightPanel.js.map +1 -1
  26. package/Icon.js +3 -3
  27. package/Icon.js.map +1 -1
  28. package/Illustration.js +3 -3
  29. package/Illustration.js.map +1 -1
  30. package/Input.js +2 -2
  31. package/Input.js.map +1 -1
  32. package/Label.js +8 -8
  33. package/Label.js.map +1 -1
  34. package/LazyIcon.js +1 -1
  35. package/LazyIllustration.js +3 -3
  36. package/LazyIllustration.js.map +1 -1
  37. package/LinkList.js +6 -6
  38. package/LinkList.js.map +1 -1
  39. package/ListHeader.js +7 -7
  40. package/ListHeader.js.map +1 -1
  41. package/Panel.js +2 -2
  42. package/Panel.js.map +1 -1
  43. package/PopOver.js +2 -2
  44. package/PopOver.js.map +1 -1
  45. package/RadioButton.js +2 -2
  46. package/RadioButton.js.map +1 -1
  47. package/Select.js +2 -2
  48. package/Select.js.map +1 -1
  49. package/Slider.js +3 -3
  50. package/Slider.js.map +1 -1
  51. package/Spacer.js +2 -2
  52. package/Spacer.js.map +1 -1
  53. package/StatusDot.js +1 -1
  54. package/StepButtons.js +4 -4
  55. package/StepButtons.js.map +1 -1
  56. package/TabList.js +4 -4
  57. package/TabList.js.map +1 -1
  58. package/Table.js +2 -2
  59. package/Table.js.map +1 -1
  60. package/TableBody.js +2 -2
  61. package/TableBody.js.map +1 -1
  62. package/TableExpandedRow.js +2 -2
  63. package/TableExpandedRow.js.map +1 -1
  64. package/TableHead.js +2 -2
  65. package/TableHead.js.map +1 -1
  66. package/TableRow.js +2 -2
  67. package/TableRow.js.map +1 -1
  68. package/Textarea.js +2 -2
  69. package/Textarea.js.map +1 -1
  70. package/Title.js +2 -2
  71. package/Title.js.map +1 -1
  72. package/TooltipWord.js +2 -2
  73. package/TooltipWord.js.map +1 -1
  74. package/Trigger.js +3 -3
  75. package/Trigger.js.map +1 -1
  76. package/components/Button/styles.module.scss +5 -0
  77. package/components/DictionaryTrigger/index.js +2 -2
  78. package/components/DictionaryTrigger/index.js.map +1 -1
  79. package/components/Drawer/Drawer.d.ts +41 -0
  80. package/components/Drawer/Drawer.test.d.ts +1 -0
  81. package/components/Drawer/index.d.ts +3 -0
  82. package/components/Drawer/index.js +350 -0
  83. package/components/Drawer/index.js.map +1 -0
  84. package/components/Drawer/styles.module.scss +127 -0
  85. package/components/Drawer/styles.module.scss.d.ts +16 -0
  86. package/components/Dropdown/index.js +3 -3
  87. package/components/Dropdown/index.js.map +1 -1
  88. package/components/Duolist/index.js +4 -4
  89. package/components/Duolist/index.js.map +1 -1
  90. package/components/ExpanderHierarchy/index.js +5 -5
  91. package/components/ExpanderHierarchy/index.js.map +1 -1
  92. package/components/ExpanderList/index.js +8 -8
  93. package/components/ExpanderList/index.js.map +1 -1
  94. package/components/HelpQuestion/index.js +2 -2
  95. package/components/HelpQuestion/index.js.map +1 -1
  96. package/components/HighlightPanel/styles.module.scss +4 -36
  97. package/components/HighlightPanel/styles.module.scss.d.ts +1 -2
  98. package/components/Icons/EuropeanHealthCard.js +1 -1
  99. package/components/Icons/GroupTwins.js +1 -1
  100. package/components/Icons/Inbox.js +1 -1
  101. package/components/Icons/LawBook.js +1 -1
  102. package/components/Icons/PersonCancel.js +1 -1
  103. package/components/Icons/PersonWithBrain.js +1 -1
  104. package/components/Icons/Puzzle.js +1 -1
  105. package/components/Icons/Snapchat.js +1 -1
  106. package/components/Illustrations/IllustrationNames.d.ts +1 -1
  107. package/components/Illustrations/IllustrationNames.js +4 -2
  108. package/components/Illustrations/IllustrationNames.js.map +1 -1
  109. package/components/Illustrations/ReadLetters.d.ts +9 -0
  110. package/components/Illustrations/ReadLetters.js +11 -0
  111. package/components/Illustrations/ReadLetters.js.map +1 -0
  112. package/components/Illustrations/ReadLettersMedium.d.ts +4 -0
  113. package/components/Illustrations/ReadLettersMedium.js +110 -0
  114. package/components/Illustrations/ReadLettersMedium.js.map +1 -0
  115. package/components/Illustrations/Support2.d.ts +9 -0
  116. package/components/Illustrations/Support2.js +11 -0
  117. package/components/Illustrations/Support2.js.map +1 -0
  118. package/components/Illustrations/Support2Medium.d.ts +4 -0
  119. package/components/Illustrations/Support2Medium.js +232 -0
  120. package/components/Illustrations/Support2Medium.js.map +1 -0
  121. package/components/Label/styles.module.scss +16 -12
  122. package/components/Label/styles.module.scss.d.ts +3 -1
  123. package/components/List/styles.module.scss +7 -7
  124. package/components/Modal/index.js +71 -82
  125. package/components/Modal/index.js.map +1 -1
  126. package/components/Modal/styles.module.scss +12 -6
  127. package/components/NotificationPanel/index.js +3 -3
  128. package/components/NotificationPanel/index.js.map +1 -1
  129. package/components/PanelList/index.js +5 -5
  130. package/components/PanelList/index.js.map +1 -1
  131. package/components/PopMenu/index.js +5 -5
  132. package/components/PopMenu/index.js.map +1 -1
  133. package/components/Portal/index.js +3 -3
  134. package/components/Portal/index.js.map +1 -1
  135. package/components/PromoPanel/index.js +2 -2
  136. package/components/PromoPanel/index.js.map +1 -1
  137. package/components/StickyNote/index.js +12 -6
  138. package/components/StickyNote/index.js.map +1 -1
  139. package/components/Tabs/Tabs.d.ts +2 -0
  140. package/components/Tabs/index.js +8 -4
  141. package/components/Tabs/index.js.map +1 -1
  142. package/components/TagList/index.js +2 -2
  143. package/components/TagList/index.js.map +1 -1
  144. package/components/Tile/index.js +6 -6
  145. package/components/Tile/index.js.map +1 -1
  146. package/components/Toggle/index.js +3 -3910
  147. package/components/Toggle/index.js.map +1 -1
  148. package/components/Tooltip/index.js +2 -2
  149. package/components/Tooltip/index.js.map +1 -1
  150. package/components/Validation/index.js +6 -6
  151. package/components/Validation/index.js.map +1 -1
  152. package/constants.d.ts +1 -0
  153. package/constants.js +1 -0
  154. package/constants.js.map +1 -1
  155. package/hoc/withBreakpoint/withBreakpoint.js +2 -2
  156. package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
  157. package/hooks/useBreakpoint.d.ts +0 -4
  158. package/hooks/useBreakpoint.js +23 -18
  159. package/hooks/useBreakpoint.js.map +1 -1
  160. package/hooks/useEventListenerState.js +3 -3
  161. package/hooks/useEventListenerState.js.map +1 -1
  162. package/hooks/useOutsideEvent.d.ts +4 -4
  163. package/hooks/useOutsideEvent.js +5 -4
  164. package/hooks/useOutsideEvent.js.map +1 -1
  165. package/hooks/useReturnFocusOnUnmount.d.ts +5 -0
  166. package/hooks/useReturnFocusOnUnmount.js +20 -0
  167. package/hooks/useReturnFocusOnUnmount.js.map +1 -0
  168. package/package.json +1 -1
  169. package/scss/_breakpoints.scss +6 -0
  170. package/scss/_font-mixins.scss +55 -0
  171. package/scss/typography.module.scss +24 -0
  172. package/scss/typography.module.scss.d.ts +6 -0
  173. package/scss/typography.stories.tsx +24 -0
  174. package/theme/index.js +2 -2
  175. package/use-animate.js +3952 -0
  176. package/use-animate.js.map +1 -0
  177. package/utils/accessibility.d.ts +1 -0
  178. package/utils/accessibility.js +6 -1
  179. package/utils/accessibility.js.map +1 -1
  180. package/utils/component.js +4 -4
  181. package/utils/component.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/TagList/TagList.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface TagListPropsProps {\n children?: React.ReactNode;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n}\n\nconst TagList: React.FC<TagListPropsProps> = ({ children, testId }) => {\n return (\n <ul className={styles['tag-list']} data-testid={testId} data-analyticsid={AnalyticsId.TagList}>\n {React.Children.map(children, child => (\n <li className={styles['tag-list__item']}>{child}</li>\n ))}\n </ul>\n );\n};\n\nexport default TagList;\n"],"names":[],"mappings":";;;;AAYA,MAAM,UAAuC,CAAC,EAAE,UAAU,aAAa;AAEnE,SAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,UAAU,GAAG,eAAa,QAAQ,oBAAkB,YAAY,SACnF,UAAA,MAAM,SAAS,IAAI,UAAU,CAC5B,UAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,gBAAgB,GAAI,UAAM,MAAA,CAAA,CACjD,EACH,CAAA;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TagList/TagList.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface TagListPropsProps {\n children?: React.ReactNode;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n}\n\nconst TagList: React.FC<TagListPropsProps> = ({ children, testId }) => {\n return (\n <ul className={styles['tag-list']} data-testid={testId} data-analyticsid={AnalyticsId.TagList}>\n {React.Children.map(children, child => (\n <li className={styles['tag-list__item']}>{child}</li>\n ))}\n </ul>\n );\n};\n\nexport default TagList;\n"],"names":["React"],"mappings":";;;;AAYA,MAAM,UAAuC,CAAC,EAAE,UAAU,aAAa;AAEnE,SAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,UAAU,GAAG,eAAa,QAAQ,oBAAkB,YAAY,SACnF,UAAAA,eAAM,SAAS,IAAI,UAAU,CAC5B,UAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,gBAAgB,GAAI,UAAM,MAAA,CAAA,CACjD,EACH,CAAA;AAEJ;"}
@@ -1,12 +1,12 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import React from "react";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
3
  import classNames from "classnames";
4
4
  import { AnalyticsId, IconSize } from "../../constants.js";
5
5
  import { useBreakpoint, Breakpoint } from "../../hooks/useBreakpoint.js";
6
6
  import { useHover } from "../../hooks/useHover.js";
7
7
  import { mergeRefs } from "../../utils/refs.js";
8
8
  import tileStyles from "./styles.module.scss";
9
- const Title = React.forwardRef((props, ref) => {
9
+ const Title = React__default.forwardRef((props, ref) => {
10
10
  const { compact, children, className, htmlMarkup = "span", highlighted } = props;
11
11
  const titleClasses = classNames(
12
12
  tileStyles["tile__title"],
@@ -20,7 +20,7 @@ const Title = React.forwardRef((props, ref) => {
20
20
  return /* @__PURE__ */ jsx(CustomTag, { className: titleClasses, ref, children });
21
21
  });
22
22
  Title.displayName = "Title";
23
- const Tile = React.forwardRef((props, ref) => {
23
+ const Tile = React__default.forwardRef((props, ref) => {
24
24
  const {
25
25
  children,
26
26
  icon,
@@ -65,8 +65,8 @@ const Tile = React.forwardRef((props, ref) => {
65
65
  onClick,
66
66
  children: [
67
67
  /* @__PURE__ */ jsxs("div", { className: tileTitleWrapperClasses, children: [
68
- React.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? "white" : "black" }),
69
- React.cloneElement(title, { highlighted, compact })
68
+ React__default.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? "white" : "black" }),
69
+ React__default.cloneElement(title, { highlighted, compact })
70
70
  ] }),
71
71
  !compact && !mobile && /* @__PURE__ */ jsx("p", { className: tileStyles.tile__description, children: description }),
72
72
  children && /* @__PURE__ */ jsx("div", { className: tileStyles.tile__children, children })
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Tile/Tile.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { TitleTags } from './../Title/Title';\nimport { useBreakpoint, Breakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { mergeRefs } from '../../utils/refs';\nimport { IconSize } from '../Icon';\n\nimport tileStyles from './styles.module.scss';\n\nexport type TileVariants = 'normal' | 'compact';\n\ninterface TileProps extends Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick' | 'rel'> {\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /**\tSets the icon to be displayed inside the tile. */\n icon: React.ReactElement;\n /**\tSets the title to be displayed inside the tile. */\n title: React.ReactElement;\n /** Toggles the highlighted style of the tile. */\n highlighted?: boolean;\n /** Sets the description to be displayed inside the tile. */\n description?: string;\n /** Sets a fixed max and min width for the tile. */\n fixed?: boolean;\n /** Sets the visual variant of the component */\n variant?: TileVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface TileTitleProps {\n children: React.ReactNode;\n className?: string;\n htmlMarkup?: TitleTags;\n highlighted?: boolean;\n compact?: boolean;\n}\n\nexport interface TileCompound extends React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLAnchorElement>> {\n Title: React.ForwardRefExoticComponent<TileTitleProps & React.RefAttributes<HTMLHeadingElement>>;\n}\n\nconst Title = React.forwardRef<HTMLHeadingElement, TileTitleProps>((props, ref) => {\n const { compact, children, className, htmlMarkup = 'span', highlighted } = props;\n const titleClasses = classNames(\n tileStyles['tile__title'],\n {\n [tileStyles['tile__title--highlighted']]: highlighted,\n [tileStyles['tile__title--compact']]: compact,\n },\n className\n );\n const CustomTag = htmlMarkup;\n\n return (\n <CustomTag className={titleClasses} ref={ref}>\n {children}\n </CustomTag>\n );\n});\n\nTitle.displayName = 'Title';\n\nexport const Tile = React.forwardRef<HTMLAnchorElement, TileProps>((props, ref) => {\n const {\n children,\n icon,\n title,\n className = '',\n description,\n fixed = false,\n highlighted = false,\n testId,\n target,\n rel,\n variant = 'normal',\n href,\n onClick,\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLAnchorElement>();\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < Breakpoint.md;\n const compact = variant === 'compact';\n const tileClasses = classNames(\n tileStyles.tile,\n {\n [tileStyles['tile--fixed']]: fixed,\n [tileStyles['tile--compact']]: compact,\n [tileStyles['tile--highlighted']]: highlighted,\n },\n className\n );\n const tileTitleWrapperClasses = classNames(tileStyles['title-wrapper'], {\n [tileStyles['title-wrapper--compact']]: compact,\n });\n\n return (\n <a\n ref={mergeRefs([ref, hoverRef])}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : rel}\n className={tileClasses}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Tile}\n onClick={onClick}\n >\n <div className={tileTitleWrapperClasses}>\n {React.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? 'white' : 'black' })}\n {React.cloneElement(title, { highlighted: highlighted, compact: compact })}\n </div>\n {!compact && !mobile && <p className={tileStyles.tile__description}>{description}</p>}\n {children && <div className={tileStyles.tile__children}>{children}</div>}\n </a>\n );\n}) as TileCompound;\n\nTile.displayName = 'Tile';\nTile.Title = Title;\n\nexport default Tile;\n"],"names":[],"mappings":";;;;;;;;AA+CA,MAAM,QAAQ,MAAM,WAA+C,CAAC,OAAO,QAAQ;AACjF,QAAM,EAAE,SAAS,UAAU,WAAW,aAAa,QAAQ,gBAAgB;AAC3E,QAAM,eAAe;AAAA,IACnB,WAAW,aAAa;AAAA,IACxB;AAAA,MACE,CAAC,WAAW,0BAA0B,CAAC,GAAG;AAAA,MAC1C,CAAC,WAAW,sBAAsB,CAAC,GAAG;AAAA,IACxC;AAAA,IACA;AAAA,EACF;AACA,QAAM,YAAY;AAElB,SACG,oBAAA,WAAA,EAAU,W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,CAAC,8BAAW,KAAE,EAAA,WAAW,WAAW,mBAAoB,UAAY,YAAA,CAAA;AAAA,QAChF,YAAa,oBAAA,OAAA,EAAI,WAAW,WAAW,gBAAiB,SAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpE;AAEJ,CAAC;AAED,KAAK,cAAc;AACnB,KAAK,QAAQ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Tile/Tile.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { TitleTags } from './../Title/Title';\nimport { useBreakpoint, Breakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { mergeRefs } from '../../utils/refs';\nimport { IconSize } from '../Icon';\n\nimport tileStyles from './styles.module.scss';\n\nexport type TileVariants = 'normal' | 'compact';\n\ninterface TileProps extends Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick' | 'rel'> {\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /**\tSets the icon to be displayed inside the tile. */\n icon: React.ReactElement;\n /**\tSets the title to be displayed inside the tile. */\n title: React.ReactElement;\n /** Toggles the highlighted style of the tile. */\n highlighted?: boolean;\n /** Sets the description to be displayed inside the tile. */\n description?: string;\n /** Sets a fixed max and min width for the tile. */\n fixed?: boolean;\n /** Sets the visual variant of the component */\n variant?: TileVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface TileTitleProps {\n children: React.ReactNode;\n className?: string;\n htmlMarkup?: TitleTags;\n highlighted?: boolean;\n compact?: boolean;\n}\n\nexport interface TileCompound extends React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLAnchorElement>> {\n Title: React.ForwardRefExoticComponent<TileTitleProps & React.RefAttributes<HTMLHeadingElement>>;\n}\n\nconst Title = React.forwardRef<HTMLHeadingElement, TileTitleProps>((props, ref) => {\n const { compact, children, className, htmlMarkup = 'span', highlighted } = props;\n const titleClasses = classNames(\n tileStyles['tile__title'],\n {\n [tileStyles['tile__title--highlighted']]: highlighted,\n [tileStyles['tile__title--compact']]: compact,\n },\n className\n );\n const CustomTag = htmlMarkup;\n\n return (\n <CustomTag className={titleClasses} ref={ref}>\n {children}\n </CustomTag>\n );\n});\n\nTitle.displayName = 'Title';\n\nexport const Tile = React.forwardRef<HTMLAnchorElement, TileProps>((props, ref) => {\n const {\n children,\n icon,\n title,\n className = '',\n description,\n fixed = false,\n highlighted = false,\n testId,\n target,\n rel,\n variant = 'normal',\n href,\n onClick,\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLAnchorElement>();\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < Breakpoint.md;\n const compact = variant === 'compact';\n const tileClasses = classNames(\n tileStyles.tile,\n {\n [tileStyles['tile--fixed']]: fixed,\n [tileStyles['tile--compact']]: compact,\n [tileStyles['tile--highlighted']]: highlighted,\n },\n className\n );\n const tileTitleWrapperClasses = classNames(tileStyles['title-wrapper'], {\n [tileStyles['title-wrapper--compact']]: compact,\n });\n\n return (\n <a\n ref={mergeRefs([ref, hoverRef])}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : rel}\n className={tileClasses}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Tile}\n onClick={onClick}\n >\n <div className={tileTitleWrapperClasses}>\n {React.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? 'white' : 'black' })}\n {React.cloneElement(title, { highlighted: highlighted, compact: compact })}\n </div>\n {!compact && !mobile && <p className={tileStyles.tile__description}>{description}</p>}\n {children && <div className={tileStyles.tile__children}>{children}</div>}\n </a>\n );\n}) as TileCompound;\n\nTile.displayName = 'Tile';\nTile.Title = Title;\n\nexport default Tile;\n"],"names":["React"],"mappings":";;;;;;;;AA+CA,MAAM,QAAQA,eAAM,WAA+C,CAAC,OAAO,QAAQ;AACjF,QAAM,EAAE,SAAS,UAAU,WAAW,aAAa,QAAQ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