@pie-element/passage 7.1.2-next.28 → 7.1.2-next.29

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.
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "../rolldown-runtime-CHQKHQ89.js";
2
- import { S as t } from "../dist-B7y7izDt.js";
3
- import { t as n } from "../stimulus-tabs-BHRmPAtK.js";
2
+ import { S as t } from "../dist-NUMfiKcA.js";
3
+ import { t as n } from "../stimulus-tabs-DtWmo8yQ.js";
4
4
  import { o as r } from "../dist-CiWlBjsz.js";
5
5
  import i from "react";
6
6
  import { createRoot as a } from "react-dom/client";
@@ -1,5 +1,5 @@
1
1
  import { a as e } from "./rolldown-runtime-CHQKHQ89.js";
2
- import { A as t, M as n, N as r, Q as i, a, b as o, h as s, o as c, s as l, t as u, wt as d } from "./dist-B7y7izDt.js";
2
+ import { A as t, M as n, N as r, Q as i, a, b as o, h as s, o as c, s as l, t as u, wt as d } from "./dist-NUMfiKcA.js";
3
3
  import f from "react";
4
4
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
5
5
  //#region src/delivery/stimulus-tabs.tsx
@@ -253,4 +253,4 @@ L.propTypes = {
253
253
  //#endregion
254
254
  export { L as t };
255
255
 
256
- //# sourceMappingURL=stimulus-tabs-BHRmPAtK.js.map
256
+ //# sourceMappingURL=stimulus-tabs-DtWmo8yQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stimulus-tabs-BHRmPAtK.js","names":[],"sources":["../../../src/delivery/stimulus-tabs.tsx"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/passage/src/stimulus-tabs.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport { styled } from '@mui/material/styles';\nimport { Collapsible as CollapsibleImport, color, PreviewPrompt as PreviewPromptImport, Purpose as PurposeImport, UiLayout as UiLayoutImport, transformDataHeadings } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nconst Purpose = unwrapReactInteropSymbol(PurposeImport, 'Purpose') || unwrapReactInteropSymbol(renderUi.Purpose, 'Purpose');\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\n// Must match the breakpoint Quiz Engine passes to the PIE section player for\n// switching from the side-by-side passage/question layout to the tabbed layout.\n// Below (and at) this width the passage tabs scroll with the passage content\n// instead of being locked to the top of the panel, so that they do not lock up\n// space needed for the passage text (WCAG 1.4.10 Reflow, 400% zoom / 320px).\nconst STICKY_TABS_BREAKPOINT = 840;\n\n/**\n * Zoom compensation for the passage selection tabs.\n *\n * The tabs scale naturally with browser zoom up to 200%. Beyond 200%,\n * we shrink their CSS size proportionally so their physical on-screen size\n * freezes at the 200% appearance, leaving more room for passage content\n * in high-zoom / small-window situations.\n * The factor is min(1, 2 / zoom): exactly 1 at zoom <= 200% (component\n * behavior unchanged), shrinking proportionally above that. A lower clamp\n * of 0.4 guards against inflated ratios (docked devtools, browser side\n * panels, window chrome) ever making the tabs unusably small.\n */\nconst MAX_TABS_ZOOM = 2;\nconst MIN_ZOOM_COMPENSATION = 0.4;\n\n// Per-tab horizontal-space floor in CSS pixels. When the passage container is\n// narrow enough that each tab would have at most this much room\n// (containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB), tab labels\n// fall back to \"Passage 1\", \"Passage 2\", ... so navigation stays usable instead\n// of being dominated by aggressively truncated titles.\nconst NUMERIC_LABEL_MIN_WIDTH_PER_TAB = 170;\n\nconst computeZoomCompensation = () => {\n if (typeof window === 'undefined') return 1;\n const ratio = window.outerWidth / window.innerWidth;\n const zoom = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n return Math.max(MIN_ZOOM_COMPENSATION, Math.min(1, MAX_TABS_ZOOM / zoom));\n};\n\nconst PassagesContainer: any = styled('div')({\n flexGrow: 1,\n backgroundColor: color.background(),\n color: color.text(),\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '.6em 1em',\n textAlign: 'left',\n },\n});\n\nconst Passage: any = styled('div')(({ theme }) => ({\n backgroundColor: color.background(),\n color: color.text(),\n padding: theme.spacing(2),\n '& blockquote': {\n background: '#f9f9f9',\n borderLeft: '5px solid #ccc',\n margin: '1.5em 10px',\n padding: '.5em 10px',\n },\n}));\n\nconst PassageTitle: any = styled('div')({\n fontSize: '1.75rem',\n});\n\nconst PassageSubtitle: any = styled('div')({\n fontSize: '1.5rem',\n});\n\nconst PassageAuthor: any = styled('div')({\n fontSize: '1.25rem',\n});\n\nconst TabStyled: any = styled(Tab)(({ theme }) => ({\n /*\n * The tab carries the colour of the panel it opens, which is what makes it read as a\n * tab rather than a button, and it has to be the themed panel colour: MUI's palette\n * does not follow `--pie-*`, so `common.white` here left the tab white on every color\n * scheme while the passage body beneath it went dark. The comment this replaces gated\n * the change on PD-2801, which is about OT's `color-contrast` class -- the mechanism\n * pie-theme superseded, and blocked since 2023.\n */\n background: color.background(),\n fontSize: 'inherit',\n fontFamily: 'Roboto, sans-serif',\n color: color.text(),\n borderRadius: `${theme.spacing(2)} ${theme.spacing(2)} 0 0`,\n /*\n * `--pie-border-gray` is stepped to the 3:1 non-text minimum in every scheme. The\n * literal it replaces measured about 1.2:1 against the dark schemes' surfaces, so the\n * tab outline -- the only thing separating an unselected tab from the strip -- was\n * invisible there.\n */\n border: `1px solid ${color.borderGray()}`,\n borderBottomWidth: 0,\n minHeight: '56px',\n padding: '8px 10px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: `0 ${theme.spacing(1)}`,\n textTransform: 'none',\n\n '.passage-label': {\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'normal',\n margin: 'auto 0',\n opacity: 0.7,\n },\n\n '&.Mui-selected': {\n color: color.text(),\n '.passage-label': {\n opacity: 1,\n },\n '.passage-label-underline': {\n backgroundColor: color.tertiary(),\n },\n },\n\n '&:hover': {\n '.passage-label-underline': {\n backgroundColor: color.tertiaryLight(),\n },\n },\n\n '& .MuiTouchRipple-root': {\n opacity: 0.7,\n },\n}));\n\n/*\n * The selection indicator, one per tab. Unselected it has to disappear into the tab, so it\n * paints the tab's own background rather than a fixed white; selected it becomes\n * `--pie-tertiary`, which every scheme sets.\n */\nconst Underline: any = styled('div')(() => ({\n height: '2px',\n width: '100%',\n marginTop: '6px',\n background: color.background(),\n}));\n\nclass StimulusTabs extends React.Component {\n state = {\n activeTab: 0,\n zoomCompensation: computeZoomCompensation(),\n containerWidth: 0,\n };\n\n containerRef = React.createRef();\n\n componentDidMount() {\n if (typeof window === 'undefined') return;\n window.addEventListener('resize', this.updateZoomCompensation);\n\n if (this.containerRef.current && typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(this.updateContainerWidth);\n this.resizeObserver.observe(this.containerRef.current);\n }\n\n this.updateContainerWidth();\n }\n\n componentWillUnmount() {\n if (typeof window === 'undefined') return;\n window.removeEventListener('resize', this.updateZoomCompensation);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n }\n\n updateZoomCompensation: any = () => {\n this.setState({ zoomCompensation: computeZoomCompensation() });\n };\n\n updateContainerWidth: any = () => {\n const node = this.containerRef.current;\n if (!node) return;\n const width = node.clientWidth;\n if (width !== this.state.containerWidth) {\n this.setState({ containerWidth: width });\n }\n };\n\n handleChange: any = (event, activeTab) => {\n this.setState(() => ({ activeTab }));\n\n setTimeout(() => {\n const tabChangeEvent = new CustomEvent('pie-ui-passage-tabChanged', {\n detail: { tab: activeTab },\n });\n\n window.dispatchEvent(tabChangeEvent);\n });\n };\n\n handleKeyDown: any = (event, currentTabId) => {\n const { key } = event;\n const { tabs } = this.props;\n\n let newTabIndex = -1;\n const currentIndex = tabs.findIndex((tab) => tab.id === currentTabId);\n\n switch (key) {\n case 'ArrowRight':\n // Move to the next tab\n newTabIndex = (currentIndex + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n // Move to the previous tab\n newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n break;\n // Commented out ArrowDown and ArrowUp for future vertical tab navigation\n // case 'ArrowDown':\n // // Move to the next tab (for vertical alignment)\n // newTabIndex = (currentIndex + 1) % tabs.length;\n // break;\n // case 'ArrowUp':\n // // Move to the previous tab (for vertical alignment)\n // newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n // break;\n case 'Home':\n // Move to the first tab\n newTabIndex = 0;\n break;\n case 'End':\n // Move to the last tab\n newTabIndex = tabs.length - 1;\n break;\n case 'Enter':\n case ' ':\n // Activate the current tab\n newTabIndex = currentIndex;\n break;\n default:\n break;\n }\n\n if (newTabIndex !== -1) {\n event.preventDefault();\n event.stopPropagation();\n this.handleChange(event, tabs[newTabIndex].id);\n document.getElementById(`button-${tabs[newTabIndex].id}`).focus();\n }\n };\n\n parsedText: any = (text = '') => {\n // fix imported audio content for Safari PD-1391\n const div = document.createElement('div');\n div.innerHTML = text.replace(/(<br\\/>\\n)/g, '<br/>');\n\n const audio = div.querySelector('audio');\n\n if (audio) {\n const source = document.createElement('source');\n\n source.setAttribute('type', 'audio/mp3');\n source.setAttribute('src', audio.getAttribute('src'));\n\n audio.removeAttribute('src');\n audio.appendChild(source);\n }\n\n return div.innerHTML;\n };\n\n renderInstructions(teacherInstructions, disabledTabs = false) {\n if (!teacherInstructions) {\n return;\n }\n\n const teacherInstructionsDiv = (\n <PreviewPrompt\n tagName=\"div\"\n className=\"prompt\"\n defaultClassName=\"teacher-instructions\"\n prompt={teacherInstructions}\n />\n );\n\n if (disabledTabs) {\n return teacherInstructionsDiv;\n }\n\n return (\n <Collapsible\n labels={{\n hidden: 'Show Teacher Instructions',\n visible: 'Hide Teacher Instructions',\n }}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n );\n }\n\n renderTab(tab, disabledTabs) {\n const { baseHeadingLevel } = this.props;\n const clampedLevel = baseHeadingLevel ? Math.min(6, Math.max(1, baseHeadingLevel)) : undefined;\n const TitleTag = baseHeadingLevel ? `h${clampedLevel}` : 'h2'; // default to h2 if no base level is provided - this was the previous behavior\n const textLevel = baseHeadingLevel ? Math.min(6, Math.max(1, clampedLevel + 1)) : undefined; // promote text headings one level above title\n\n return (\n <Passage key={tab.id} id={`tabpanel-${tab.id}`} role=\"tabpanel\" aria-labelledby={`button-${tab.id}`}>\n {this.renderInstructions(tab.teacherInstructions, disabledTabs)}\n\n {tab.title && (\n <Purpose purpose=\"passage-title\">\n <TitleTag>\n <PassageTitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }} />\n </TitleTag>\n </Purpose>\n )}\n\n {tab.subtitle && (\n <Purpose purpose=\"passage-subtitle\">\n <PassageSubtitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.subtitle) }} />\n </Purpose>\n )}\n\n {tab.author && (\n <Purpose purpose=\"passage-author\">\n <PassageAuthor className=\"author\" dangerouslySetInnerHTML={{ __html: this.parsedText(tab.author) }} />\n </Purpose>\n )}\n\n {tab.text && (\n <Purpose purpose=\"passage-text\">\n <div key={tab.id} className=\"text\" dangerouslySetInnerHTML={{ __html: baseHeadingLevel ? transformDataHeadings(tab.text, textLevel) : tab.text }} />\n </Purpose>\n )}\n </Passage>\n );\n }\n\n render() {\n const { model, tabs, disabledTabs } = this.props;\n const { activeTab, zoomCompensation, containerWidth } = this.state;\n\n if (!tabs?.length) {\n return;\n }\n\n const { extraCSSRules } = model || {};\n const selectedTab = (tabs || []).find((tab) => tab.id === activeTab);\n\n // cap each tab at 1/n of the passage container width so a single long\n // title can't push other tabs off-screen. Existing two-line wrap + ellipsis\n // on .passage-label still trims anything that doesn't fit.\n const tabMaxWidth = containerWidth > 0 ? containerWidth / tabs.length : null;\n // When per-tab horizontal space drops to NUMERIC_LABEL_MIN_WIDTH_PER_TAB or\n // less, titles become unreadably truncated; swap to \"Passage N\" so users\n // can still navigate. Container width is read once layout has settled\n // (>0), so initial render uses real labels.\n const useNumericLabels =\n containerWidth > 0 && containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB;\n\n return (\n <UiLayout extraCSSRules={extraCSSRules}>\n <PassagesContainer className=\"passages\" ref={this.containerRef}>\n {disabledTabs || tabs.length === 1 ? (\n tabs.map((tab) => this.renderTab(tab, disabledTabs))\n ) : (\n <>\n <Tabs\n sx={{\n // Below the breakpoint (e.g. WCAG 400% zoom, ~320px viewport)\n // the tabs are in normal flow and scroll with the passage text,\n // so they don't lock up space needed to display the passage.\n position: 'static',\n // Above the breakpoint there is adequate screen space, so the\n // tabs stay locked to the top of the panel while the passage\n // text scrolls beneath them.\n [`@media (min-width: ${STICKY_TABS_BREAKPOINT + 1}px)`]: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n },\n background: 'var(--pie-passage-header-background, rgba(255,255,255,0))',\n color: color.text(),\n fontFamily: 'Roboto, sans-serif',\n // Freeze the tabs' physical size at their 200%-zoom appearance\n // when browser zoom exceeds 200%. The factor is 1 at zoom <= 200%,\n // so behavior below that threshold is unchanged. Using `zoom`\n // (rather than transform: scale) shrinks the layout box itself,\n // so the reclaimed space flows to the passage content below.\n zoom: zoomCompensation,\n '& .MuiTabs-list': {\n /*\n * The strip behind the tabs. A host that has opted into\n * `--pie-passage-header-background` keeps its own colour on every\n * scheme -- Knowledge Checks' pale green-blue is deliberate and is not\n * a scheme's business to override. With no host colour the fallback has\n * to be a theme token rather than a white literal, or the strip stays\n * white over a dark passage body.\n */\n backgroundColor: `var(--pie-passage-header-background, ${color.backgroundDark()})`,\n borderBottom: `1px solid ${color.borderGray()}`,\n },\n '& .MuiTabs-indicator': {\n backgroundColor: color.white(),\n marginBottom: '-1px',\n },\n }}\n value={activeTab}\n onChange={this.handleChange}\n >\n {tabs.map((tab, index) => (\n <TabStyled\n key={tab.id}\n id={`button-${tab.id}`}\n sx={tabMaxWidth ? { maxWidth: `${tabMaxWidth}px` } : undefined}\n label={\n <>\n <Purpose purpose=\"passage-label\">\n {useNumericLabels ? (\n <span className=\"passage-label\">{`Passage ${index + 1}`}</span>\n ) : (\n <span\n className=\"passage-label\"\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.label) }}\n />\n )}\n </Purpose>\n <Underline className=\"passage-label-underline\" />\n </>\n }\n value={tab.id}\n tabIndex={activeTab === tab.id ? 0 : -1}\n aria-controls={`tabpanel-${tab.id}`}\n aria-selected={activeTab === tab.id}\n onKeyDown={(event) => this.handleKeyDown(event, tab.id)}\n />\n ))}\n </Tabs>\n {selectedTab ? this.renderTab(selectedTab, disabledTabs) : null}\n </>\n )}\n </PassagesContainer>\n </UiLayout>\n );\n }\n}\n\nStimulusTabs.propTypes = {\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n author: PropTypes.string,\n text: PropTypes.string.isRequired,\n teacherInstructions: PropTypes.string,\n }).isRequired,\n ).isRequired,\n disabledTabs: PropTypes.bool,\n model: PropTypes.object,\n baseHeadingLevel: PropTypes.number,\n};\n\nexport default StimulusTabs;\n"],"mappings":";;;;;;AAiBA,SAAS,EAA6B,GAAY;CAChD,OACE,OAAO,KAAU,cAChB,OAAO,KAAU,cAAY,KAAkB,OAAO,EAAM,YAAa;AAE9E;AAEA,SAAS,EAAyB,GAAkB,GAAsB;CAUxE,OATI,CAAC,KACD,EAA6B,CAAW,IAAU,IAClD,EAA6B,EAAY,OAAO,IAAU,EAAY,UACtE,KAAe,EAA6B,EAAY,EAAY,IAC/D,EAAY,KAEjB,KAAe,EAA6B,EAAY,EAAY,EAAE,OAAO,IACxE,EAAY,EAAY,CAAC,UAE3B;AACT;AACA,IAAM,IAAW,EAAyB,GAAgB,UAAU,KAAK,EAAyB,EAAS,UAAU,UAAU,GACzH,IAAU,EAAyB,GAAe,SAAS,KAAK,EAAyB,EAAS,SAAS,SAAS,GACpH,IAAgB,EAAyB,GAAqB,eAAe,KAAK,EAAyB,EAAS,eAAe,eAAe,GAClJ,IAAc,EAAyB,GAAmB,aAAa,KAAK,EAAyB,EAAS,aAAa,aAAa,GAExI,IAAuB,GACvB,IAAuB,EAAqB,SAC5C,IACJ,KAAwB,OAAO,KAAyB,WACpD,IACA,GAoBA,IAAgB,GAChB,IAAwB,IAOxB,IAAkC,KAElC,UAAgC;CACpC,IAAI,OAAO,SAA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e,YAAY,EAAI;MAC/B,iBAAe,MAAc,EAAI;MACjC,YAAY,MAAU,KAAK,cAAc,GAAO,EAAI,EAAE;KACvD,GAvBM,EAAI,EAuBV,CACF;IACG,CAAA,GACL,IAAc,KAAK,UAAU,GAAa,CAAY,IAAI,IAC3D,EAAA,CAAA;GAEa,CAAA;EACX,CAAA;CAEd;AACF;AAEA,EAAa,YAAY;CACvB,MAAM,EAAA,QAAU,QACd,EAAA,QAAU,MAAM;EACd,IAAI,EAAA,QAAU,OAAO;EACrB,OAAO,EAAA,QAAU,OAAO;EACxB,OAAO,EAAA,QAAU,OAAO;EACxB,UAAU,EAAA,QAAU;EACpB,QAAQ,EAAA,QAAU;EAClB,MAAM,EAAA,QAAU,OAAO;EACvB,qBAAqB,EAAA,QAAU;CACjC,CAAC,CAAC,CAAC,UACL,CAAC,CAAC;CACF,cAAc,EAAA,QAAU;CACxB,OAAO,EAAA,QAAU;CACjB,kBAAkB,EAAA,QAAU;AAC9B"}
1
+ {"version":3,"file":"stimulus-tabs-DtWmo8yQ.js","names":[],"sources":["../../../src/delivery/stimulus-tabs.tsx"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/passage/src/stimulus-tabs.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport { styled } from '@mui/material/styles';\nimport { Collapsible as CollapsibleImport, color, PreviewPrompt as PreviewPromptImport, Purpose as PurposeImport, UiLayout as UiLayoutImport, transformDataHeadings } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nconst Purpose = unwrapReactInteropSymbol(PurposeImport, 'Purpose') || unwrapReactInteropSymbol(renderUi.Purpose, 'Purpose');\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\n// Must match the breakpoint Quiz Engine passes to the PIE section player for\n// switching from the side-by-side passage/question layout to the tabbed layout.\n// Below (and at) this width the passage tabs scroll with the passage content\n// instead of being locked to the top of the panel, so that they do not lock up\n// space needed for the passage text (WCAG 1.4.10 Reflow, 400% zoom / 320px).\nconst STICKY_TABS_BREAKPOINT = 840;\n\n/**\n * Zoom compensation for the passage selection tabs.\n *\n * The tabs scale naturally with browser zoom up to 200%. Beyond 200%,\n * we shrink their CSS size proportionally so their physical on-screen size\n * freezes at the 200% appearance, leaving more room for passage content\n * in high-zoom / small-window situations.\n * The factor is min(1, 2 / zoom): exactly 1 at zoom <= 200% (component\n * behavior unchanged), shrinking proportionally above that. A lower clamp\n * of 0.4 guards against inflated ratios (docked devtools, browser side\n * panels, window chrome) ever making the tabs unusably small.\n */\nconst MAX_TABS_ZOOM = 2;\nconst MIN_ZOOM_COMPENSATION = 0.4;\n\n// Per-tab horizontal-space floor in CSS pixels. When the passage container is\n// narrow enough that each tab would have at most this much room\n// (containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB), tab labels\n// fall back to \"Passage 1\", \"Passage 2\", ... so navigation stays usable instead\n// of being dominated by aggressively truncated titles.\nconst NUMERIC_LABEL_MIN_WIDTH_PER_TAB = 170;\n\nconst computeZoomCompensation = () => {\n if (typeof window === 'undefined') return 1;\n const ratio = window.outerWidth / window.innerWidth;\n const zoom = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n return Math.max(MIN_ZOOM_COMPENSATION, Math.min(1, MAX_TABS_ZOOM / zoom));\n};\n\nconst PassagesContainer: any = styled('div')({\n flexGrow: 1,\n backgroundColor: color.background(),\n color: color.text(),\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '.6em 1em',\n textAlign: 'left',\n },\n});\n\nconst Passage: any = styled('div')(({ theme }) => ({\n backgroundColor: color.background(),\n color: color.text(),\n padding: theme.spacing(2),\n '& blockquote': {\n background: '#f9f9f9',\n borderLeft: '5px solid #ccc',\n margin: '1.5em 10px',\n padding: '.5em 10px',\n },\n}));\n\nconst PassageTitle: any = styled('div')({\n fontSize: '1.75rem',\n});\n\nconst PassageSubtitle: any = styled('div')({\n fontSize: '1.5rem',\n});\n\nconst PassageAuthor: any = styled('div')({\n fontSize: '1.25rem',\n});\n\nconst TabStyled: any = styled(Tab)(({ theme }) => ({\n /*\n * The tab carries the colour of the panel it opens, which is what makes it read as a\n * tab rather than a button, and it has to be the themed panel colour: MUI's palette\n * does not follow `--pie-*`, so `common.white` here left the tab white on every color\n * scheme while the passage body beneath it went dark. The comment this replaces gated\n * the change on PD-2801, which is about OT's `color-contrast` class -- the mechanism\n * pie-theme superseded, and blocked since 2023.\n */\n background: color.background(),\n fontSize: 'inherit',\n fontFamily: 'Roboto, sans-serif',\n color: color.text(),\n borderRadius: `${theme.spacing(2)} ${theme.spacing(2)} 0 0`,\n /*\n * `--pie-border-gray` is stepped to the 3:1 non-text minimum in every scheme. The\n * literal it replaces measured about 1.2:1 against the dark schemes' surfaces, so the\n * tab outline -- the only thing separating an unselected tab from the strip -- was\n * invisible there.\n */\n border: `1px solid ${color.borderGray()}`,\n borderBottomWidth: 0,\n minHeight: '56px',\n padding: '8px 10px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: `0 ${theme.spacing(1)}`,\n textTransform: 'none',\n\n '.passage-label': {\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'normal',\n margin: 'auto 0',\n opacity: 0.7,\n },\n\n '&.Mui-selected': {\n color: color.text(),\n '.passage-label': {\n opacity: 1,\n },\n '.passage-label-underline': {\n backgroundColor: color.tertiary(),\n },\n },\n\n '&:hover': {\n '.passage-label-underline': {\n backgroundColor: color.tertiaryLight(),\n },\n },\n\n '& .MuiTouchRipple-root': {\n opacity: 0.7,\n },\n}));\n\n/*\n * The selection indicator, one per tab. Unselected it has to disappear into the tab, so it\n * paints the tab's own background rather than a fixed white; selected it becomes\n * `--pie-tertiary`, which every scheme sets.\n */\nconst Underline: any = styled('div')(() => ({\n height: '2px',\n width: '100%',\n marginTop: '6px',\n background: color.background(),\n}));\n\nclass StimulusTabs extends React.Component {\n state = {\n activeTab: 0,\n zoomCompensation: computeZoomCompensation(),\n containerWidth: 0,\n };\n\n containerRef = React.createRef();\n\n componentDidMount() {\n if (typeof window === 'undefined') return;\n window.addEventListener('resize', this.updateZoomCompensation);\n\n if (this.containerRef.current && typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(this.updateContainerWidth);\n this.resizeObserver.observe(this.containerRef.current);\n }\n\n this.updateContainerWidth();\n }\n\n componentWillUnmount() {\n if (typeof window === 'undefined') return;\n window.removeEventListener('resize', this.updateZoomCompensation);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n }\n\n updateZoomCompensation: any = () => {\n this.setState({ zoomCompensation: computeZoomCompensation() });\n };\n\n updateContainerWidth: any = () => {\n const node = this.containerRef.current;\n if (!node) return;\n const width = node.clientWidth;\n if (width !== this.state.containerWidth) {\n this.setState({ containerWidth: width });\n }\n };\n\n handleChange: any = (event, activeTab) => {\n this.setState(() => ({ activeTab }));\n\n setTimeout(() => {\n const tabChangeEvent = new CustomEvent('pie-ui-passage-tabChanged', {\n detail: { tab: activeTab },\n });\n\n window.dispatchEvent(tabChangeEvent);\n });\n };\n\n handleKeyDown: any = (event, currentTabId) => {\n const { key } = event;\n const { tabs } = this.props;\n\n let newTabIndex = -1;\n const currentIndex = tabs.findIndex((tab) => tab.id === currentTabId);\n\n switch (key) {\n case 'ArrowRight':\n // Move to the next tab\n newTabIndex = (currentIndex + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n // Move to the previous tab\n newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n break;\n // Commented out ArrowDown and ArrowUp for future vertical tab navigation\n // case 'ArrowDown':\n // // Move to the next tab (for vertical alignment)\n // newTabIndex = (currentIndex + 1) % tabs.length;\n // break;\n // case 'ArrowUp':\n // // Move to the previous tab (for vertical alignment)\n // newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n // break;\n case 'Home':\n // Move to the first tab\n newTabIndex = 0;\n break;\n case 'End':\n // Move to the last tab\n newTabIndex = tabs.length - 1;\n break;\n case 'Enter':\n case ' ':\n // Activate the current tab\n newTabIndex = currentIndex;\n break;\n default:\n break;\n }\n\n if (newTabIndex !== -1) {\n event.preventDefault();\n event.stopPropagation();\n this.handleChange(event, tabs[newTabIndex].id);\n document.getElementById(`button-${tabs[newTabIndex].id}`).focus();\n }\n };\n\n parsedText: any = (text = '') => {\n // fix imported audio content for Safari PD-1391\n const div = document.createElement('div');\n div.innerHTML = text.replace(/(<br\\/>\\n)/g, '<br/>');\n\n const audio = div.querySelector('audio');\n\n if (audio) {\n const source = document.createElement('source');\n\n source.setAttribute('type', 'audio/mp3');\n source.setAttribute('src', audio.getAttribute('src'));\n\n audio.removeAttribute('src');\n audio.appendChild(source);\n }\n\n return div.innerHTML;\n };\n\n renderInstructions(teacherInstructions, disabledTabs = false) {\n if (!teacherInstructions) {\n return;\n }\n\n const teacherInstructionsDiv = (\n <PreviewPrompt\n tagName=\"div\"\n className=\"prompt\"\n defaultClassName=\"teacher-instructions\"\n prompt={teacherInstructions}\n />\n );\n\n if (disabledTabs) {\n return teacherInstructionsDiv;\n }\n\n return (\n <Collapsible\n labels={{\n hidden: 'Show Teacher Instructions',\n visible: 'Hide Teacher Instructions',\n }}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n );\n }\n\n renderTab(tab, disabledTabs) {\n const { baseHeadingLevel } = this.props;\n const clampedLevel = baseHeadingLevel ? Math.min(6, Math.max(1, baseHeadingLevel)) : undefined;\n const TitleTag = baseHeadingLevel ? `h${clampedLevel}` : 'h2'; // default to h2 if no base level is provided - this was the previous behavior\n const textLevel = baseHeadingLevel ? Math.min(6, Math.max(1, clampedLevel + 1)) : undefined; // promote text headings one level above title\n\n return (\n <Passage key={tab.id} id={`tabpanel-${tab.id}`} role=\"tabpanel\" aria-labelledby={`button-${tab.id}`}>\n {this.renderInstructions(tab.teacherInstructions, disabledTabs)}\n\n {tab.title && (\n <Purpose purpose=\"passage-title\">\n <TitleTag>\n <PassageTitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }} />\n </TitleTag>\n </Purpose>\n )}\n\n {tab.subtitle && (\n <Purpose purpose=\"passage-subtitle\">\n <PassageSubtitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.subtitle) }} />\n </Purpose>\n )}\n\n {tab.author && (\n <Purpose purpose=\"passage-author\">\n <PassageAuthor className=\"author\" dangerouslySetInnerHTML={{ __html: this.parsedText(tab.author) }} />\n </Purpose>\n )}\n\n {tab.text && (\n <Purpose purpose=\"passage-text\">\n <div key={tab.id} className=\"text\" dangerouslySetInnerHTML={{ __html: baseHeadingLevel ? transformDataHeadings(tab.text, textLevel) : tab.text }} />\n </Purpose>\n )}\n </Passage>\n );\n }\n\n render() {\n const { model, tabs, disabledTabs } = this.props;\n const { activeTab, zoomCompensation, containerWidth } = this.state;\n\n if (!tabs?.length) {\n return;\n }\n\n const { extraCSSRules } = model || {};\n const selectedTab = (tabs || []).find((tab) => tab.id === activeTab);\n\n // cap each tab at 1/n of the passage container width so a single long\n // title can't push other tabs off-screen. Existing two-line wrap + ellipsis\n // on .passage-label still trims anything that doesn't fit.\n const tabMaxWidth = containerWidth > 0 ? containerWidth / tabs.length : null;\n // When per-tab horizontal space drops to NUMERIC_LABEL_MIN_WIDTH_PER_TAB or\n // less, titles become unreadably truncated; swap to \"Passage N\" so users\n // can still navigate. Container width is read once layout has settled\n // (>0), so initial render uses real labels.\n const useNumericLabels =\n containerWidth > 0 && containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB;\n\n return (\n <UiLayout extraCSSRules={extraCSSRules}>\n <PassagesContainer className=\"passages\" ref={this.containerRef}>\n {disabledTabs || tabs.length === 1 ? (\n tabs.map((tab) => this.renderTab(tab, disabledTabs))\n ) : (\n <>\n <Tabs\n sx={{\n // Below the breakpoint (e.g. WCAG 400% zoom, ~320px viewport)\n // the tabs are in normal flow and scroll with the passage text,\n // so they don't lock up space needed to display the passage.\n position: 'static',\n // Above the breakpoint there is adequate screen space, so the\n // tabs stay locked to the top of the panel while the passage\n // text scrolls beneath them.\n [`@media (min-width: ${STICKY_TABS_BREAKPOINT + 1}px)`]: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n },\n background: 'var(--pie-passage-header-background, rgba(255,255,255,0))',\n color: color.text(),\n fontFamily: 'Roboto, sans-serif',\n // Freeze the tabs' physical size at their 200%-zoom appearance\n // when browser zoom exceeds 200%. The factor is 1 at zoom <= 200%,\n // so behavior below that threshold is unchanged. Using `zoom`\n // (rather than transform: scale) shrinks the layout box itself,\n // so the reclaimed space flows to the passage content below.\n zoom: zoomCompensation,\n '& .MuiTabs-list': {\n /*\n * The strip behind the tabs. A host that has opted into\n * `--pie-passage-header-background` keeps its own colour on every\n * scheme -- Knowledge Checks' pale green-blue is deliberate and is not\n * a scheme's business to override. With no host colour the fallback has\n * to be a theme token rather than a white literal, or the strip stays\n * white over a dark passage body.\n */\n backgroundColor: `var(--pie-passage-header-background, ${color.backgroundDark()})`,\n borderBottom: `1px solid ${color.borderGray()}`,\n },\n '& .MuiTabs-indicator': {\n backgroundColor: color.white(),\n marginBottom: '-1px',\n },\n }}\n value={activeTab}\n onChange={this.handleChange}\n >\n {tabs.map((tab, index) => (\n <TabStyled\n key={tab.id}\n id={`button-${tab.id}`}\n sx={tabMaxWidth ? { maxWidth: `${tabMaxWidth}px` } : undefined}\n label={\n <>\n <Purpose purpose=\"passage-label\">\n {useNumericLabels ? (\n <span className=\"passage-label\">{`Passage ${index + 1}`}</span>\n ) : (\n <span\n className=\"passage-label\"\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.label) }}\n />\n )}\n </Purpose>\n <Underline className=\"passage-label-underline\" />\n </>\n }\n value={tab.id}\n tabIndex={activeTab === tab.id ? 0 : -1}\n aria-controls={`tabpanel-${tab.id}`}\n aria-selected={activeTab === tab.id}\n onKeyDown={(event) => this.handleKeyDown(event, tab.id)}\n />\n ))}\n </Tabs>\n {selectedTab ? this.renderTab(selectedTab, disabledTabs) : null}\n </>\n )}\n </PassagesContainer>\n </UiLayout>\n );\n }\n}\n\nStimulusTabs.propTypes = {\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n author: PropTypes.string,\n text: PropTypes.string.isRequired,\n teacherInstructions: PropTypes.string,\n }).isRequired,\n ).isRequired,\n disabledTabs: PropTypes.bool,\n model: PropTypes.object,\n baseHeadingLevel: PropTypes.number,\n};\n\nexport default StimulusTabs;\n"],"mappings":";;;;;;AAiBA,SAAS,EAA6B,GAAY;CAChD,OACE,OAAO,KAAU,cAChB,OAAO,KAAU,cAAY,KAAkB,OAAO,EAAM,YAAa;AAE9E;AAEA,SAAS,EAAyB,GAAkB,GAAsB;CAUxE,OATI,CAAC,KACD,EAA6B,CAAW,IAAU,IAClD,EAA6B,EAAY,OAAO,IAAU,EAAY,UACtE,KAAe,EAA6B,EAAY,EAAY,IAC/D,EAAY,KAEjB,KAAe,EAA6B,EAAY,EAAY,EAAE,OAAO,IACxE,EAAY,EAAY,CAAC,UAE3B;AACT;AACA,IAAM,IAAW,EAAyB,GAAgB,UAAU,KAAK,EAAyB,EAAS,UAAU,UAAU,GACzH,IAAU,EAAyB,GAAe,SAAS,KAAK,EAAyB,EAAS,SAAS,SAAS,GACpH,IAAgB,EAAyB,GAAqB,eAAe,KAAK,EAAyB,EAAS,eAAe,eAAe,GAClJ,IAAc,EAAyB,GAAmB,aAAa,KAAK,EAAyB,EAAS,aAAa,aAAa,GAExI,IAAuB,GACvB,IAAuB,EAAqB,SAC5C,IACJ,KAAwB,OAAO,KAAyB,WACpD,IACA,GAoBA,IAAgB,GAChB,IAAwB,IAOxB,IAAkC,KAElC,UAAgC;CACpC,IAAI,OAAO,SAAW,KAAa,OAAO;CAC1C,IAAM,IAAQ,OAAO,aAAa,OAAO;CAEzC,OAAO,KAAK,IAAI,GAAuB,KAAK,IAAI,GAAG,KADtC,OAAO,SAAS,CAAK,KAAK,IAAQ,IAAI,IAAQ,EACY,CAAC;AAC1E,GAEM,IAAyB,EAAO,KAAK,CAAC,CAAC;CAC3C,UAAU;CACV,iBAAiB,EAAM,WAAW;CAClC,OAAO,EAAM,KAAK;CAClB,yBA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U,MAAM;EACd,IAAI,EAAA,QAAU,OAAO;EACrB,OAAO,EAAA,QAAU,OAAO;EACxB,OAAO,EAAA,QAAU,OAAO;EACxB,UAAU,EAAA,QAAU;EACpB,QAAQ,EAAA,QAAU;EAClB,MAAM,EAAA,QAAU,OAAO;EACvB,qBAAqB,EAAA,QAAU;CACjC,CAAC,CAAC,CAAC,UACL,CAAC,CAAC;CACF,cAAc,EAAA,QAAU;CACxB,OAAO,EAAA,QAAU;CACjB,kBAAkB,EAAA,QAAU;AAC9B"}
@@ -1,6 +1,6 @@
1
1
  import { i as e } from "../rolldown-runtime-CWhphoD1.js";
2
- import { S as t } from "../dist-Drjz4obN.js";
3
- import { t as n } from "../stimulus-tabs-6S6b-RxY.js";
2
+ import { S as t } from "../dist-COWZz0Ju.js";
3
+ import { t as n } from "../stimulus-tabs-Cq-TIu_V.js";
4
4
  import { o as r } from "../dist-CiWlBjsz.js";
5
5
  import i from "react";
6
6
  import { createRoot as a } from "react-dom/client";
@@ -1,5 +1,5 @@
1
1
  import { i as e } from "./rolldown-runtime-CWhphoD1.js";
2
- import { A as t, M as n, N as r, Q as i, a, b as o, h as s, o as c, s as l, t as u, wt as d } from "./dist-Drjz4obN.js";
2
+ import { A as t, M as n, N as r, Q as i, a, b as o, h as s, o as c, s as l, t as u, wt as d } from "./dist-COWZz0Ju.js";
3
3
  import f from "react";
4
4
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
5
5
  //#region src/delivery/stimulus-tabs.tsx
@@ -253,4 +253,4 @@ L.propTypes = {
253
253
  //#endregion
254
254
  export { L as t };
255
255
 
256
- //# sourceMappingURL=stimulus-tabs-6S6b-RxY.js.map
256
+ //# sourceMappingURL=stimulus-tabs-Cq-TIu_V.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stimulus-tabs-6S6b-RxY.js","names":[],"sources":["../../src/delivery/stimulus-tabs.tsx"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/passage/src/stimulus-tabs.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport { styled } from '@mui/material/styles';\nimport { Collapsible as CollapsibleImport, color, PreviewPrompt as PreviewPromptImport, Purpose as PurposeImport, UiLayout as UiLayoutImport, transformDataHeadings } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nconst Purpose = unwrapReactInteropSymbol(PurposeImport, 'Purpose') || unwrapReactInteropSymbol(renderUi.Purpose, 'Purpose');\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\n// Must match the breakpoint Quiz Engine passes to the PIE section player for\n// switching from the side-by-side passage/question layout to the tabbed layout.\n// Below (and at) this width the passage tabs scroll with the passage content\n// instead of being locked to the top of the panel, so that they do not lock up\n// space needed for the passage text (WCAG 1.4.10 Reflow, 400% zoom / 320px).\nconst STICKY_TABS_BREAKPOINT = 840;\n\n/**\n * Zoom compensation for the passage selection tabs.\n *\n * The tabs scale naturally with browser zoom up to 200%. Beyond 200%,\n * we shrink their CSS size proportionally so their physical on-screen size\n * freezes at the 200% appearance, leaving more room for passage content\n * in high-zoom / small-window situations.\n * The factor is min(1, 2 / zoom): exactly 1 at zoom <= 200% (component\n * behavior unchanged), shrinking proportionally above that. A lower clamp\n * of 0.4 guards against inflated ratios (docked devtools, browser side\n * panels, window chrome) ever making the tabs unusably small.\n */\nconst MAX_TABS_ZOOM = 2;\nconst MIN_ZOOM_COMPENSATION = 0.4;\n\n// Per-tab horizontal-space floor in CSS pixels. When the passage container is\n// narrow enough that each tab would have at most this much room\n// (containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB), tab labels\n// fall back to \"Passage 1\", \"Passage 2\", ... so navigation stays usable instead\n// of being dominated by aggressively truncated titles.\nconst NUMERIC_LABEL_MIN_WIDTH_PER_TAB = 170;\n\nconst computeZoomCompensation = () => {\n if (typeof window === 'undefined') return 1;\n const ratio = window.outerWidth / window.innerWidth;\n const zoom = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n return Math.max(MIN_ZOOM_COMPENSATION, Math.min(1, MAX_TABS_ZOOM / zoom));\n};\n\nconst PassagesContainer: any = styled('div')({\n flexGrow: 1,\n backgroundColor: color.background(),\n color: color.text(),\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '.6em 1em',\n textAlign: 'left',\n },\n});\n\nconst Passage: any = styled('div')(({ theme }) => ({\n backgroundColor: color.background(),\n color: color.text(),\n padding: theme.spacing(2),\n '& blockquote': {\n background: '#f9f9f9',\n borderLeft: '5px solid #ccc',\n margin: '1.5em 10px',\n padding: '.5em 10px',\n },\n}));\n\nconst PassageTitle: any = styled('div')({\n fontSize: '1.75rem',\n});\n\nconst PassageSubtitle: any = styled('div')({\n fontSize: '1.5rem',\n});\n\nconst PassageAuthor: any = styled('div')({\n fontSize: '1.25rem',\n});\n\nconst TabStyled: any = styled(Tab)(({ theme }) => ({\n /*\n * The tab carries the colour of the panel it opens, which is what makes it read as a\n * tab rather than a button, and it has to be the themed panel colour: MUI's palette\n * does not follow `--pie-*`, so `common.white` here left the tab white on every color\n * scheme while the passage body beneath it went dark. The comment this replaces gated\n * the change on PD-2801, which is about OT's `color-contrast` class -- the mechanism\n * pie-theme superseded, and blocked since 2023.\n */\n background: color.background(),\n fontSize: 'inherit',\n fontFamily: 'Roboto, sans-serif',\n color: color.text(),\n borderRadius: `${theme.spacing(2)} ${theme.spacing(2)} 0 0`,\n /*\n * `--pie-border-gray` is stepped to the 3:1 non-text minimum in every scheme. The\n * literal it replaces measured about 1.2:1 against the dark schemes' surfaces, so the\n * tab outline -- the only thing separating an unselected tab from the strip -- was\n * invisible there.\n */\n border: `1px solid ${color.borderGray()}`,\n borderBottomWidth: 0,\n minHeight: '56px',\n padding: '8px 10px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: `0 ${theme.spacing(1)}`,\n textTransform: 'none',\n\n '.passage-label': {\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'normal',\n margin: 'auto 0',\n opacity: 0.7,\n },\n\n '&.Mui-selected': {\n color: color.text(),\n '.passage-label': {\n opacity: 1,\n },\n '.passage-label-underline': {\n backgroundColor: color.tertiary(),\n },\n },\n\n '&:hover': {\n '.passage-label-underline': {\n backgroundColor: color.tertiaryLight(),\n },\n },\n\n '& .MuiTouchRipple-root': {\n opacity: 0.7,\n },\n}));\n\n/*\n * The selection indicator, one per tab. Unselected it has to disappear into the tab, so it\n * paints the tab's own background rather than a fixed white; selected it becomes\n * `--pie-tertiary`, which every scheme sets.\n */\nconst Underline: any = styled('div')(() => ({\n height: '2px',\n width: '100%',\n marginTop: '6px',\n background: color.background(),\n}));\n\nclass StimulusTabs extends React.Component {\n state = {\n activeTab: 0,\n zoomCompensation: computeZoomCompensation(),\n containerWidth: 0,\n };\n\n containerRef = React.createRef();\n\n componentDidMount() {\n if (typeof window === 'undefined') return;\n window.addEventListener('resize', this.updateZoomCompensation);\n\n if (this.containerRef.current && typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(this.updateContainerWidth);\n this.resizeObserver.observe(this.containerRef.current);\n }\n\n this.updateContainerWidth();\n }\n\n componentWillUnmount() {\n if (typeof window === 'undefined') return;\n window.removeEventListener('resize', this.updateZoomCompensation);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n }\n\n updateZoomCompensation: any = () => {\n this.setState({ zoomCompensation: computeZoomCompensation() });\n };\n\n updateContainerWidth: any = () => {\n const node = this.containerRef.current;\n if (!node) return;\n const width = node.clientWidth;\n if (width !== this.state.containerWidth) {\n this.setState({ containerWidth: width });\n }\n };\n\n handleChange: any = (event, activeTab) => {\n this.setState(() => ({ activeTab }));\n\n setTimeout(() => {\n const tabChangeEvent = new CustomEvent('pie-ui-passage-tabChanged', {\n detail: { tab: activeTab },\n });\n\n window.dispatchEvent(tabChangeEvent);\n });\n };\n\n handleKeyDown: any = (event, currentTabId) => {\n const { key } = event;\n const { tabs } = this.props;\n\n let newTabIndex = -1;\n const currentIndex = tabs.findIndex((tab) => tab.id === currentTabId);\n\n switch (key) {\n case 'ArrowRight':\n // Move to the next tab\n newTabIndex = (currentIndex + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n // Move to the previous tab\n newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n break;\n // Commented out ArrowDown and ArrowUp for future vertical tab navigation\n // case 'ArrowDown':\n // // Move to the next tab (for vertical alignment)\n // newTabIndex = (currentIndex + 1) % tabs.length;\n // break;\n // case 'ArrowUp':\n // // Move to the previous tab (for vertical alignment)\n // newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n // break;\n case 'Home':\n // Move to the first tab\n newTabIndex = 0;\n break;\n case 'End':\n // Move to the last tab\n newTabIndex = tabs.length - 1;\n break;\n case 'Enter':\n case ' ':\n // Activate the current tab\n newTabIndex = currentIndex;\n break;\n default:\n break;\n }\n\n if (newTabIndex !== -1) {\n event.preventDefault();\n event.stopPropagation();\n this.handleChange(event, tabs[newTabIndex].id);\n document.getElementById(`button-${tabs[newTabIndex].id}`).focus();\n }\n };\n\n parsedText: any = (text = '') => {\n // fix imported audio content for Safari PD-1391\n const div = document.createElement('div');\n div.innerHTML = text.replace(/(<br\\/>\\n)/g, '<br/>');\n\n const audio = div.querySelector('audio');\n\n if (audio) {\n const source = document.createElement('source');\n\n source.setAttribute('type', 'audio/mp3');\n source.setAttribute('src', audio.getAttribute('src'));\n\n audio.removeAttribute('src');\n audio.appendChild(source);\n }\n\n return div.innerHTML;\n };\n\n renderInstructions(teacherInstructions, disabledTabs = false) {\n if (!teacherInstructions) {\n return;\n }\n\n const teacherInstructionsDiv = (\n <PreviewPrompt\n tagName=\"div\"\n className=\"prompt\"\n defaultClassName=\"teacher-instructions\"\n prompt={teacherInstructions}\n />\n );\n\n if (disabledTabs) {\n return teacherInstructionsDiv;\n }\n\n return (\n <Collapsible\n labels={{\n hidden: 'Show Teacher Instructions',\n visible: 'Hide Teacher Instructions',\n }}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n );\n }\n\n renderTab(tab, disabledTabs) {\n const { baseHeadingLevel } = this.props;\n const clampedLevel = baseHeadingLevel ? Math.min(6, Math.max(1, baseHeadingLevel)) : undefined;\n const TitleTag = baseHeadingLevel ? `h${clampedLevel}` : 'h2'; // default to h2 if no base level is provided - this was the previous behavior\n const textLevel = baseHeadingLevel ? Math.min(6, Math.max(1, clampedLevel + 1)) : undefined; // promote text headings one level above title\n\n return (\n <Passage key={tab.id} id={`tabpanel-${tab.id}`} role=\"tabpanel\" aria-labelledby={`button-${tab.id}`}>\n {this.renderInstructions(tab.teacherInstructions, disabledTabs)}\n\n {tab.title && (\n <Purpose purpose=\"passage-title\">\n <TitleTag>\n <PassageTitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }} />\n </TitleTag>\n </Purpose>\n )}\n\n {tab.subtitle && (\n <Purpose purpose=\"passage-subtitle\">\n <PassageSubtitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.subtitle) }} />\n </Purpose>\n )}\n\n {tab.author && (\n <Purpose purpose=\"passage-author\">\n <PassageAuthor className=\"author\" dangerouslySetInnerHTML={{ __html: this.parsedText(tab.author) }} />\n </Purpose>\n )}\n\n {tab.text && (\n <Purpose purpose=\"passage-text\">\n <div key={tab.id} className=\"text\" dangerouslySetInnerHTML={{ __html: baseHeadingLevel ? transformDataHeadings(tab.text, textLevel) : tab.text }} />\n </Purpose>\n )}\n </Passage>\n );\n }\n\n render() {\n const { model, tabs, disabledTabs } = this.props;\n const { activeTab, zoomCompensation, containerWidth } = this.state;\n\n if (!tabs?.length) {\n return;\n }\n\n const { extraCSSRules } = model || {};\n const selectedTab = (tabs || []).find((tab) => tab.id === activeTab);\n\n // cap each tab at 1/n of the passage container width so a single long\n // title can't push other tabs off-screen. Existing two-line wrap + ellipsis\n // on .passage-label still trims anything that doesn't fit.\n const tabMaxWidth = containerWidth > 0 ? containerWidth / tabs.length : null;\n // When per-tab horizontal space drops to NUMERIC_LABEL_MIN_WIDTH_PER_TAB or\n // less, titles become unreadably truncated; swap to \"Passage N\" so users\n // can still navigate. Container width is read once layout has settled\n // (>0), so initial render uses real labels.\n const useNumericLabels =\n containerWidth > 0 && containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB;\n\n return (\n <UiLayout extraCSSRules={extraCSSRules}>\n <PassagesContainer className=\"passages\" ref={this.containerRef}>\n {disabledTabs || tabs.length === 1 ? (\n tabs.map((tab) => this.renderTab(tab, disabledTabs))\n ) : (\n <>\n <Tabs\n sx={{\n // Below the breakpoint (e.g. WCAG 400% zoom, ~320px viewport)\n // the tabs are in normal flow and scroll with the passage text,\n // so they don't lock up space needed to display the passage.\n position: 'static',\n // Above the breakpoint there is adequate screen space, so the\n // tabs stay locked to the top of the panel while the passage\n // text scrolls beneath them.\n [`@media (min-width: ${STICKY_TABS_BREAKPOINT + 1}px)`]: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n },\n background: 'var(--pie-passage-header-background, rgba(255,255,255,0))',\n color: color.text(),\n fontFamily: 'Roboto, sans-serif',\n // Freeze the tabs' physical size at their 200%-zoom appearance\n // when browser zoom exceeds 200%. The factor is 1 at zoom <= 200%,\n // so behavior below that threshold is unchanged. Using `zoom`\n // (rather than transform: scale) shrinks the layout box itself,\n // so the reclaimed space flows to the passage content below.\n zoom: zoomCompensation,\n '& .MuiTabs-list': {\n /*\n * The strip behind the tabs. A host that has opted into\n * `--pie-passage-header-background` keeps its own colour on every\n * scheme -- Knowledge Checks' pale green-blue is deliberate and is not\n * a scheme's business to override. With no host colour the fallback has\n * to be a theme token rather than a white literal, or the strip stays\n * white over a dark passage body.\n */\n backgroundColor: `var(--pie-passage-header-background, ${color.backgroundDark()})`,\n borderBottom: `1px solid ${color.borderGray()}`,\n },\n '& .MuiTabs-indicator': {\n backgroundColor: color.white(),\n marginBottom: '-1px',\n },\n }}\n value={activeTab}\n onChange={this.handleChange}\n >\n {tabs.map((tab, index) => (\n <TabStyled\n key={tab.id}\n id={`button-${tab.id}`}\n sx={tabMaxWidth ? { maxWidth: `${tabMaxWidth}px` } : undefined}\n label={\n <>\n <Purpose purpose=\"passage-label\">\n {useNumericLabels ? (\n <span className=\"passage-label\">{`Passage ${index + 1}`}</span>\n ) : (\n <span\n className=\"passage-label\"\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.label) }}\n />\n )}\n </Purpose>\n <Underline className=\"passage-label-underline\" />\n </>\n }\n value={tab.id}\n tabIndex={activeTab === tab.id ? 0 : -1}\n aria-controls={`tabpanel-${tab.id}`}\n aria-selected={activeTab === tab.id}\n onKeyDown={(event) => this.handleKeyDown(event, tab.id)}\n />\n ))}\n </Tabs>\n {selectedTab ? this.renderTab(selectedTab, disabledTabs) : null}\n </>\n )}\n </PassagesContainer>\n </UiLayout>\n );\n }\n}\n\nStimulusTabs.propTypes = {\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n author: PropTypes.string,\n text: PropTypes.string.isRequired,\n teacherInstructions: PropTypes.string,\n }).isRequired,\n ).isRequired,\n disabledTabs: PropTypes.bool,\n model: PropTypes.object,\n baseHeadingLevel: PropTypes.number,\n};\n\nexport default StimulusTabs;\n"],"mappings":";;;;;;AAiBA,SAAS,EAA6B,GAAY;CAChD,OACE,OAAO,KAAU,cAChB,OAAO,KAAU,cAAY,KAAkB,OAAO,EAAM,YAAa;AAE9E;AAEA,SAAS,EAAyB,GAAkB,GAAsB;CAUxE,OATI,CAAC,KACD,EAA6B,CAAW,IAAU,IAClD,EAA6B,EAAY,OAAO,IAAU,EAAY,UACtE,KAAe,EAA6B,EAAY,EAAY,IAC/D,EAAY,KAEjB,KAAe,EAA6B,EAAY,EAAY,EAAE,OAAO,IACxE,EAAY,EAAY,CAAC,UAE3B;AACT;AACA,IAAM,IAAW,EAAyB,GAAgB,UAAU,KAAK,EAAyB,EAAS,UAAU,UAAU,GACzH,IAAU,EAAyB,GAAe,SAAS,KAAK,EAAyB,EAAS,SAAS,SAAS,GACpH,IAAgB,EAAyB,GAAqB,eAAe,KAAK,EAAyB,EAAS,eAAe,eAAe,GAClJ,IAAc,EAA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BAAyB,EAAE,QAAQ,KAAK,WAAW,EAAI,KAAK,EAAE;OAC/D,CAAA;MAEI,CAAA,GACT,kBAAC,GAAD,EAAW,WAAU,0BAA2B,CAAA,CAChD,EAAA,CAAA;MAEJ,OAAO,EAAI;MACX,UAAU,MAAc,EAAI,KAAK,IAAI;MACrC,iBAAe,YAAY,EAAI;MAC/B,iBAAe,MAAc,EAAI;MACjC,YAAY,MAAU,KAAK,cAAc,GAAO,EAAI,EAAE;KACvD,GAvBM,EAAI,EAuBV,CACF;IACG,CAAA,GACL,IAAc,KAAK,UAAU,GAAa,CAAY,IAAI,IAC3D,EAAA,CAAA;GAEa,CAAA;EACX,CAAA;CAEd;AACF;AAEA,EAAa,YAAY;CACvB,MAAM,EAAA,QAAU,QACd,EAAA,QAAU,MAAM;EACd,IAAI,EAAA,QAAU,OAAO;EACrB,OAAO,EAAA,QAAU,OAAO;EACxB,OAAO,EAAA,QAAU,OAAO;EACxB,UAAU,EAAA,QAAU;EACpB,QAAQ,EAAA,QAAU;EAClB,MAAM,EAAA,QAAU,OAAO;EACvB,qBAAqB,EAAA,QAAU;CACjC,CAAC,CAAC,CAAC,UACL,CAAC,CAAC;CACF,cAAc,EAAA,QAAU;CACxB,OAAO,EAAA,QAAU;CACjB,kBAAkB,EAAA,QAAU;AAC9B"}
1
+ {"version":3,"file":"stimulus-tabs-Cq-TIu_V.js","names":[],"sources":["../../src/delivery/stimulus-tabs.tsx"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/passage/src/stimulus-tabs.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport { styled } from '@mui/material/styles';\nimport { Collapsible as CollapsibleImport, color, PreviewPrompt as PreviewPromptImport, Purpose as PurposeImport, UiLayout as UiLayoutImport, transformDataHeadings } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nconst Purpose = unwrapReactInteropSymbol(PurposeImport, 'Purpose') || unwrapReactInteropSymbol(renderUi.Purpose, 'Purpose');\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\n// Must match the breakpoint Quiz Engine passes to the PIE section player for\n// switching from the side-by-side passage/question layout to the tabbed layout.\n// Below (and at) this width the passage tabs scroll with the passage content\n// instead of being locked to the top of the panel, so that they do not lock up\n// space needed for the passage text (WCAG 1.4.10 Reflow, 400% zoom / 320px).\nconst STICKY_TABS_BREAKPOINT = 840;\n\n/**\n * Zoom compensation for the passage selection tabs.\n *\n * The tabs scale naturally with browser zoom up to 200%. Beyond 200%,\n * we shrink their CSS size proportionally so their physical on-screen size\n * freezes at the 200% appearance, leaving more room for passage content\n * in high-zoom / small-window situations.\n * The factor is min(1, 2 / zoom): exactly 1 at zoom <= 200% (component\n * behavior unchanged), shrinking proportionally above that. A lower clamp\n * of 0.4 guards against inflated ratios (docked devtools, browser side\n * panels, window chrome) ever making the tabs unusably small.\n */\nconst MAX_TABS_ZOOM = 2;\nconst MIN_ZOOM_COMPENSATION = 0.4;\n\n// Per-tab horizontal-space floor in CSS pixels. When the passage container is\n// narrow enough that each tab would have at most this much room\n// (containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB), tab labels\n// fall back to \"Passage 1\", \"Passage 2\", ... so navigation stays usable instead\n// of being dominated by aggressively truncated titles.\nconst NUMERIC_LABEL_MIN_WIDTH_PER_TAB = 170;\n\nconst computeZoomCompensation = () => {\n if (typeof window === 'undefined') return 1;\n const ratio = window.outerWidth / window.innerWidth;\n const zoom = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n return Math.max(MIN_ZOOM_COMPENSATION, Math.min(1, MAX_TABS_ZOOM / zoom));\n};\n\nconst PassagesContainer: any = styled('div')({\n flexGrow: 1,\n backgroundColor: color.background(),\n color: color.text(),\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '.6em 1em',\n textAlign: 'left',\n },\n});\n\nconst Passage: any = styled('div')(({ theme }) => ({\n backgroundColor: color.background(),\n color: color.text(),\n padding: theme.spacing(2),\n '& blockquote': {\n background: '#f9f9f9',\n borderLeft: '5px solid #ccc',\n margin: '1.5em 10px',\n padding: '.5em 10px',\n },\n}));\n\nconst PassageTitle: any = styled('div')({\n fontSize: '1.75rem',\n});\n\nconst PassageSubtitle: any = styled('div')({\n fontSize: '1.5rem',\n});\n\nconst PassageAuthor: any = styled('div')({\n fontSize: '1.25rem',\n});\n\nconst TabStyled: any = styled(Tab)(({ theme }) => ({\n /*\n * The tab carries the colour of the panel it opens, which is what makes it read as a\n * tab rather than a button, and it has to be the themed panel colour: MUI's palette\n * does not follow `--pie-*`, so `common.white` here left the tab white on every color\n * scheme while the passage body beneath it went dark. The comment this replaces gated\n * the change on PD-2801, which is about OT's `color-contrast` class -- the mechanism\n * pie-theme superseded, and blocked since 2023.\n */\n background: color.background(),\n fontSize: 'inherit',\n fontFamily: 'Roboto, sans-serif',\n color: color.text(),\n borderRadius: `${theme.spacing(2)} ${theme.spacing(2)} 0 0`,\n /*\n * `--pie-border-gray` is stepped to the 3:1 non-text minimum in every scheme. The\n * literal it replaces measured about 1.2:1 against the dark schemes' surfaces, so the\n * tab outline -- the only thing separating an unselected tab from the strip -- was\n * invisible there.\n */\n border: `1px solid ${color.borderGray()}`,\n borderBottomWidth: 0,\n minHeight: '56px',\n padding: '8px 10px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: `0 ${theme.spacing(1)}`,\n textTransform: 'none',\n\n '.passage-label': {\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'normal',\n margin: 'auto 0',\n opacity: 0.7,\n },\n\n '&.Mui-selected': {\n color: color.text(),\n '.passage-label': {\n opacity: 1,\n },\n '.passage-label-underline': {\n backgroundColor: color.tertiary(),\n },\n },\n\n '&:hover': {\n '.passage-label-underline': {\n backgroundColor: color.tertiaryLight(),\n },\n },\n\n '& .MuiTouchRipple-root': {\n opacity: 0.7,\n },\n}));\n\n/*\n * The selection indicator, one per tab. Unselected it has to disappear into the tab, so it\n * paints the tab's own background rather than a fixed white; selected it becomes\n * `--pie-tertiary`, which every scheme sets.\n */\nconst Underline: any = styled('div')(() => ({\n height: '2px',\n width: '100%',\n marginTop: '6px',\n background: color.background(),\n}));\n\nclass StimulusTabs extends React.Component {\n state = {\n activeTab: 0,\n zoomCompensation: computeZoomCompensation(),\n containerWidth: 0,\n };\n\n containerRef = React.createRef();\n\n componentDidMount() {\n if (typeof window === 'undefined') return;\n window.addEventListener('resize', this.updateZoomCompensation);\n\n if (this.containerRef.current && typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(this.updateContainerWidth);\n this.resizeObserver.observe(this.containerRef.current);\n }\n\n this.updateContainerWidth();\n }\n\n componentWillUnmount() {\n if (typeof window === 'undefined') return;\n window.removeEventListener('resize', this.updateZoomCompensation);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n }\n\n updateZoomCompensation: any = () => {\n this.setState({ zoomCompensation: computeZoomCompensation() });\n };\n\n updateContainerWidth: any = () => {\n const node = this.containerRef.current;\n if (!node) return;\n const width = node.clientWidth;\n if (width !== this.state.containerWidth) {\n this.setState({ containerWidth: width });\n }\n };\n\n handleChange: any = (event, activeTab) => {\n this.setState(() => ({ activeTab }));\n\n setTimeout(() => {\n const tabChangeEvent = new CustomEvent('pie-ui-passage-tabChanged', {\n detail: { tab: activeTab },\n });\n\n window.dispatchEvent(tabChangeEvent);\n });\n };\n\n handleKeyDown: any = (event, currentTabId) => {\n const { key } = event;\n const { tabs } = this.props;\n\n let newTabIndex = -1;\n const currentIndex = tabs.findIndex((tab) => tab.id === currentTabId);\n\n switch (key) {\n case 'ArrowRight':\n // Move to the next tab\n newTabIndex = (currentIndex + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n // Move to the previous tab\n newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n break;\n // Commented out ArrowDown and ArrowUp for future vertical tab navigation\n // case 'ArrowDown':\n // // Move to the next tab (for vertical alignment)\n // newTabIndex = (currentIndex + 1) % tabs.length;\n // break;\n // case 'ArrowUp':\n // // Move to the previous tab (for vertical alignment)\n // newTabIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n // break;\n case 'Home':\n // Move to the first tab\n newTabIndex = 0;\n break;\n case 'End':\n // Move to the last tab\n newTabIndex = tabs.length - 1;\n break;\n case 'Enter':\n case ' ':\n // Activate the current tab\n newTabIndex = currentIndex;\n break;\n default:\n break;\n }\n\n if (newTabIndex !== -1) {\n event.preventDefault();\n event.stopPropagation();\n this.handleChange(event, tabs[newTabIndex].id);\n document.getElementById(`button-${tabs[newTabIndex].id}`).focus();\n }\n };\n\n parsedText: any = (text = '') => {\n // fix imported audio content for Safari PD-1391\n const div = document.createElement('div');\n div.innerHTML = text.replace(/(<br\\/>\\n)/g, '<br/>');\n\n const audio = div.querySelector('audio');\n\n if (audio) {\n const source = document.createElement('source');\n\n source.setAttribute('type', 'audio/mp3');\n source.setAttribute('src', audio.getAttribute('src'));\n\n audio.removeAttribute('src');\n audio.appendChild(source);\n }\n\n return div.innerHTML;\n };\n\n renderInstructions(teacherInstructions, disabledTabs = false) {\n if (!teacherInstructions) {\n return;\n }\n\n const teacherInstructionsDiv = (\n <PreviewPrompt\n tagName=\"div\"\n className=\"prompt\"\n defaultClassName=\"teacher-instructions\"\n prompt={teacherInstructions}\n />\n );\n\n if (disabledTabs) {\n return teacherInstructionsDiv;\n }\n\n return (\n <Collapsible\n labels={{\n hidden: 'Show Teacher Instructions',\n visible: 'Hide Teacher Instructions',\n }}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n );\n }\n\n renderTab(tab, disabledTabs) {\n const { baseHeadingLevel } = this.props;\n const clampedLevel = baseHeadingLevel ? Math.min(6, Math.max(1, baseHeadingLevel)) : undefined;\n const TitleTag = baseHeadingLevel ? `h${clampedLevel}` : 'h2'; // default to h2 if no base level is provided - this was the previous behavior\n const textLevel = baseHeadingLevel ? Math.min(6, Math.max(1, clampedLevel + 1)) : undefined; // promote text headings one level above title\n\n return (\n <Passage key={tab.id} id={`tabpanel-${tab.id}`} role=\"tabpanel\" aria-labelledby={`button-${tab.id}`}>\n {this.renderInstructions(tab.teacherInstructions, disabledTabs)}\n\n {tab.title && (\n <Purpose purpose=\"passage-title\">\n <TitleTag>\n <PassageTitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }} />\n </TitleTag>\n </Purpose>\n )}\n\n {tab.subtitle && (\n <Purpose purpose=\"passage-subtitle\">\n <PassageSubtitle dangerouslySetInnerHTML={{ __html: this.parsedText(tab.subtitle) }} />\n </Purpose>\n )}\n\n {tab.author && (\n <Purpose purpose=\"passage-author\">\n <PassageAuthor className=\"author\" dangerouslySetInnerHTML={{ __html: this.parsedText(tab.author) }} />\n </Purpose>\n )}\n\n {tab.text && (\n <Purpose purpose=\"passage-text\">\n <div key={tab.id} className=\"text\" dangerouslySetInnerHTML={{ __html: baseHeadingLevel ? transformDataHeadings(tab.text, textLevel) : tab.text }} />\n </Purpose>\n )}\n </Passage>\n );\n }\n\n render() {\n const { model, tabs, disabledTabs } = this.props;\n const { activeTab, zoomCompensation, containerWidth } = this.state;\n\n if (!tabs?.length) {\n return;\n }\n\n const { extraCSSRules } = model || {};\n const selectedTab = (tabs || []).find((tab) => tab.id === activeTab);\n\n // cap each tab at 1/n of the passage container width so a single long\n // title can't push other tabs off-screen. Existing two-line wrap + ellipsis\n // on .passage-label still trims anything that doesn't fit.\n const tabMaxWidth = containerWidth > 0 ? containerWidth / tabs.length : null;\n // When per-tab horizontal space drops to NUMERIC_LABEL_MIN_WIDTH_PER_TAB or\n // less, titles become unreadably truncated; swap to \"Passage N\" so users\n // can still navigate. Container width is read once layout has settled\n // (>0), so initial render uses real labels.\n const useNumericLabels =\n containerWidth > 0 && containerWidth <= tabs.length * NUMERIC_LABEL_MIN_WIDTH_PER_TAB;\n\n return (\n <UiLayout extraCSSRules={extraCSSRules}>\n <PassagesContainer className=\"passages\" ref={this.containerRef}>\n {disabledTabs || tabs.length === 1 ? (\n tabs.map((tab) => this.renderTab(tab, disabledTabs))\n ) : (\n <>\n <Tabs\n sx={{\n // Below the breakpoint (e.g. WCAG 400% zoom, ~320px viewport)\n // the tabs are in normal flow and scroll with the passage text,\n // so they don't lock up space needed to display the passage.\n position: 'static',\n // Above the breakpoint there is adequate screen space, so the\n // tabs stay locked to the top of the panel while the passage\n // text scrolls beneath them.\n [`@media (min-width: ${STICKY_TABS_BREAKPOINT + 1}px)`]: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n },\n background: 'var(--pie-passage-header-background, rgba(255,255,255,0))',\n color: color.text(),\n fontFamily: 'Roboto, sans-serif',\n // Freeze the tabs' physical size at their 200%-zoom appearance\n // when browser zoom exceeds 200%. The factor is 1 at zoom <= 200%,\n // so behavior below that threshold is unchanged. Using `zoom`\n // (rather than transform: scale) shrinks the layout box itself,\n // so the reclaimed space flows to the passage content below.\n zoom: zoomCompensation,\n '& .MuiTabs-list': {\n /*\n * The strip behind the tabs. A host that has opted into\n * `--pie-passage-header-background` keeps its own colour on every\n * scheme -- Knowledge Checks' pale green-blue is deliberate and is not\n * a scheme's business to override. With no host colour the fallback has\n * to be a theme token rather than a white literal, or the strip stays\n * white over a dark passage body.\n */\n backgroundColor: `var(--pie-passage-header-background, ${color.backgroundDark()})`,\n borderBottom: `1px solid ${color.borderGray()}`,\n },\n '& .MuiTabs-indicator': {\n backgroundColor: color.white(),\n marginBottom: '-1px',\n },\n }}\n value={activeTab}\n onChange={this.handleChange}\n >\n {tabs.map((tab, index) => (\n <TabStyled\n key={tab.id}\n id={`button-${tab.id}`}\n sx={tabMaxWidth ? { maxWidth: `${tabMaxWidth}px` } : undefined}\n label={\n <>\n <Purpose purpose=\"passage-label\">\n {useNumericLabels ? (\n <span className=\"passage-label\">{`Passage ${index + 1}`}</span>\n ) : (\n <span\n className=\"passage-label\"\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.label) }}\n />\n )}\n </Purpose>\n <Underline className=\"passage-label-underline\" />\n </>\n }\n value={tab.id}\n tabIndex={activeTab === tab.id ? 0 : -1}\n aria-controls={`tabpanel-${tab.id}`}\n aria-selected={activeTab === tab.id}\n onKeyDown={(event) => this.handleKeyDown(event, tab.id)}\n />\n ))}\n </Tabs>\n {selectedTab ? this.renderTab(selectedTab, disabledTabs) : null}\n </>\n )}\n </PassagesContainer>\n </UiLayout>\n );\n }\n}\n\nStimulusTabs.propTypes = {\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n author: PropTypes.string,\n text: PropTypes.string.isRequired,\n teacherInstructions: PropTypes.string,\n }).isRequired,\n ).isRequired,\n disabledTabs: PropTypes.bool,\n model: PropTypes.object,\n baseHeadingLevel: PropTypes.number,\n};\n\nexport default StimulusTabs;\n"],"mappings":";;;;;;AAiBA,SAAS,EAA6B,GAAY;CAChD,OACE,OAAO,KAAU,cAChB,OAAO,KAAU,cAAY,KAAkB,OAAO,EAAM,YAAa;AAE9E;AAEA,SAAS,EAAyB,GAAkB,GAAsB;CAUxE,OATI,CAAC,KACD,EAA6B,CAAW,IAAU,IAClD,EAA6B,EAAY,OAAO,IAAU,EAAY,UACtE,KAAe,EAA6B,EAAY,EAAY,IAC/D,EAAY,KAEjB,KAAe,EAA6B,EAAY,EAAY,EAAE,OAAO,IACxE,EAAY,EAAY,CAAC,UAE3B;AACT;AACA,IAAM,IAAW,EAAyB,GAAgB,UAAU,KAAK,EAAyB,EAAS,UAAU,UAAU,GACzH,IAAU,EAAyB,GAAe,SAAS,KAAK,EAAyB,EAAS,SAAS,SAAS,GACpH,IAAgB,EAAyB,GAAqB,eAAe,KAAK,EAAyB,EAAS,eAAe,eAAe,GAClJ,IAAc,EAAyB,GAAmB,aAAa,KAAK,EAAyB,EAAS,aAAa,aAAa,GAExI,IAAuB,GACvB,IAAuB,EAAqB,SAC5C,IACJ,KAAwB,OAAO,KAAyB,WACpD,IACA,GAoBA,IAAgB,GAChB,IAAwB,IAOxB,IAAkC,KAElC,UAAgC;CACpC,IAAI,OAAO,SAAW,KAAa,OAAO;CAC1C,IAAM,IAAQ,OAAO,aAAa,OAAO;CAEzC,OAAO,KAAK,IAAI,G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AI,EAAE;KACvD,GAvBM,EAAI,EAuBV,CACF;IACG,CAAA,GACL,IAAc,KAAK,UAAU,GAAa,CAAY,IAAI,IAC3D,EAAA,CAAA;GAEa,CAAA;EACX,CAAA;CAEd;AACF;AAEA,EAAa,YAAY;CACvB,MAAM,EAAA,QAAU,QACd,EAAA,QAAU,MAAM;EACd,IAAI,EAAA,QAAU,OAAO;EACrB,OAAO,EAAA,QAAU,OAAO;EACxB,OAAO,EAAA,QAAU,OAAO;EACxB,UAAU,EAAA,QAAU;EACpB,QAAQ,EAAA,QAAU;EAClB,MAAM,EAAA,QAAU,OAAO;EACvB,qBAAqB,EAAA,QAAU;CACjC,CAAC,CAAC,CAAC,UACL,CAAC,CAAC;CACF,cAAc,EAAA,QAAU;CACxB,OAAO,EAAA,QAAU;CACjB,kBAAkB,EAAA,QAAU;AAC9B"}
@@ -115,7 +115,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
115
115
  }
116
116
  `,Mc=L.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=us({props:e,name:`MuiTouchRipple`}),[o,s]=L.useState([]),c=L.useRef(0),l=L.useRef(null);L.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=L.useRef(!1),d=Cc(),f=L.useRef(null),p=L.useRef(null),m=L.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,R.jsx)(jc,{classes:{ripple:I(r.ripple,Tc.ripple),rippleVisible:I(r.rippleVisible,Tc.rippleVisible),ripplePulsate:I(r.ripplePulsate,Tc.ripplePulsate),child:I(r.child,Tc.child),childLeaving:I(r.childLeaving,Tc.childLeaving),childPulsate:I(r.childPulsate,Tc.childPulsate)},timeout:Ec,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=L.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),g=L.useCallback(()=>{h({},{pulsate:!0})},[h]),_=L.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{_(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return L.useImperativeHandle(t,()=>({pulsate:g,start:h,stop:_}),[g,h,_]),(0,R.jsx)(Ac,{className:I(Tc.root,r.root,i),ref:p,...a,children:(0,R.jsx)(yc,{component:null,exit:!0,children:o})})});function Nc(e){return Mi(`MuiButtonBase`,e)}var Pc=Ni(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),Fc=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=Oe({root:[`root`,t&&`disabled`,n&&`focusVisible`]},Nc,i);return n&&r&&(a.root+=` ${r}`),a},Ic=Y(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${Pc.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),Lc=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:g,onDragLeave:_,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:x,onMouseDown:S,onMouseLeave:C,onMouseUp:w,onTouchEnd:T,onTouchMove:E,onTouchStart:D,tabIndex:O=0,TouchRippleProps:k,touchRippleRef:ee,type:A,...j}=n,te=L.useRef(null),M=Us(),ne=Ms(M.ref,ee),[N,P]=L.useState(!1);c&&N&&P(!1),L.useImperativeHandle(r,()=>({focusVisible:()=>{P(!0),te.current.focus()}}),[]);let re=M.shouldMount&&!l&&!c;L.useEffect(()=>{N&&d&&!l&&M.pulsate()},[l,d,N,M]);let ie=Rc(M,`start`,S,u),ae=Rc(M,`stop`,g,u),oe=Rc(M,`stop`,_,u),se=Rc(M,`stop`,w,u),ce=Rc(M,`stop`,e=>{N&&e.preventDefault(),C&&C(e)},u),le=Rc(M,`start`,D,u),ue=Rc(M,`stop`,T,u),de=Rc(M,`stop`,E,u),fe=Rc(M,`stop`,e=>{zs(e.target)||P(!1),m&&m(e)},!1),pe=js(e=>{te.current||=e.currentTarget,zs(e.target)&&(P(!0),y&&y(e)),v&&v(e)}),me=()=>{let e=te.current;return e?e.tagName!==`BUTTON`&&!(e.tagName===`A`&&e.href):s&&s!==`button`},he=js(e=>{d&&!e.repeat&&N&&e.key===` `&&M.stop(e,()=>{M.start(e)}),e.target===e.currentTarget&&me()&&e.key===` `&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&me()&&e.key===`Enter`&&!c&&(e.preventDefault(),h&&h(e))}),ge=js(e=>{d&&e.key===` `&&N&&!e.defaultPrevented&&M.stop(e,()=>{M.pulsate(e)}),x&&x(e),h&&e.target===e.currentTarget&&me()&&e.key===` `&&!e.defaultPrevented&&!c&&h(e)}),_e=s;_e===`button`&&(j.href||j.to)&&(_e=p);let ve={};if(_e===`button`){let e=!!j.formAction;ve.type=A===void 0&&!e?`button`:A,ve.disabled=c}else!j.href&&!j.to&&(ve.role=`button`),c&&(ve[`aria-disabled`]=c);let ye=Ms(t,te),be={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,tabIndex:O,focusVisible:N},xe=Fc(be);return(0,R.jsxs)(Ic,{as:_e,className:I(xe.root,o),ownerState:be,onBlur:fe,onClick:h,onContextMenu:ae,onFocus:pe,onKeyDown:he,onKeyUp:ge,onMouseDown:ie,onMouseLeave:ce,onMouseUp:se,onDragLeave:oe,onTouchEnd:ue,onTouchMove:de,onTouchStart:le,ref:ye,tabIndex:c?-1:O,type:A,...ve,...j,children:[a,re?(0,R.jsx)(Mc,{ref:ne,center:i,...k}):null]})});function Rc(e,t,n,r=!1){return js(i=>(n&&n(i),r||e[t](i),!0))}function zc(e){return Mi(`MuiTabScrollButton`,e)}var Bc=Ni(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),Vc=e=>{let{classes:t,orientation:n,disabled:r}=e;return Oe({root:[`root`,n,r&&`disabled`]},zc,t)},Hc=Y(Lc,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Bc.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Z=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Ne(),d={isRtl:u,...n},f=Vc(d),p=i.StartScrollButtonIcon??Ls,m=i.EndScrollButtonIcon??Rs,h=Ve({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=Ve({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,R.jsx)(Hc,{component:`div`,className:I(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...l,style:{...l.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:o===`left`?(0,R.jsx)(p,{...h}):(0,R.jsx)(m,{...g})})});function Uc(e){return Mi(`MuiTabs`,e)}var Wc=Ni(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]);function Gc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Kc=Gc;function qc(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Be(d[e],i),{props:{component:h,...g},internalRef:_}=ze({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Pe(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Ie(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var Jc=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Yc=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Xc=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||i.getAttribute(`aria-disabled`)===`true`;if(!i.hasAttribute(`tabindex`)||t)i=n(e,i);else{i.focus();return}}},Zc=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return Oe({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,`flexContainer`,t&&`flexContainerVertical`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Uc,c)},Qc=Y(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Wc.scrollButtons}`]:t.scrollButtons},{[`& .${Wc.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(ls(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Wc.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),$c=Y(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),el=Y(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),tl=Y(`span`,{name:`MuiTabs`,slot:`Indicator`})(ls(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,transition:e.transitions.create(),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),nl=Y(Is)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),rl={},il=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiTabs`}),r=os(),i=Ne(),{"aria-label":a,"aria-labelledby":o,action:s,centered:c=!1,children:l,className:u,component:d=`div`,allowScrollButtonsMobile:f=!1,indicatorColor:p=`primary`,onChange:m,orientation:h=`horizontal`,ScrollButtonComponent:g,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:S={},textColor:C=`primary`,value:w,variant:T=`standard`,visibleScrollbar:E=!1,...D}=n,O=T===`scrollable`,k=h===`vertical`,ee=k?`scrollTop`:`scrollLeft`,A=k?`top`:`left`,j=k?`bottom`:`right`,te=k?`clientHeight`:`clientWidth`,M=k?`height`:`width`,ne={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:k,scrollButtons:_,textColor:C,variant:T,visibleScrollbar:E,fixed:!O,hideScrollbar:O&&!E,scrollableX:O&&!k,scrollableY:O&&k,centered:c&&!O,scrollButtonsHideMobile:!f},N=Zc(ne),P=Ve({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:ne}),re=Ve({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:ne}),[ie,ae]=L.useState(!1),[oe,se]=L.useState(rl),[ce,le]=L.useState(!1),[ue,de]=L.useState(!1),[fe,pe]=L.useState(!1),[me,he]=L.useState({overflow:`hidden`,scrollbarWidth:0}),ge=new Map,_e=L.useRef(null),ve=L.useRef(null),ye={slots:y,slotProps:{indicator:x,scrollButtons:S,...b}},be=()=>{let e=_e.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&w!==!1){let e=ve.current.children;if(e.length>0){let t=e[ge.get(w)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},xe=js(()=>{let{tabsMeta:e,tabMeta:t}=be(),n=0,r;k?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[M]:t?t[M]:0};if(typeof oe[r]!=`number`||typeof oe[M]!=`number`)se(a);else{let e=Math.abs(oe[r]-a[r]),t=Math.abs(oe[M]-a[M]);(e>=1||t>=1)&&se(a)}}),Se=(e,{animation:t=!0}={})=>{t?ms(ee,_e.current,e,{duration:r.transitions.duration.standard}):_e.current[ee]=e},Ce=e=>{let t=_e.current[ee];k?t+=e:t+=e*(i?-1:1),Se(t)},we=()=>{let e=_e.current[te],t=0,n=Array.from(ve.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[te]>e){r===0&&(t=e);break}t+=i[te]}return t},F=()=>{Ce(-1*we())},Te=()=>{Ce(we())},[Ee,{onChange:De,...Oe}]=qc(`scrollbar`,{className:I(N.scrollableX,N.hideScrollbar),elementType:nl,shouldForwardComponentProp:!0,externalForwardedProps:ye,ownerState:ne}),ke=L.useCallback(e=>{De?.(e),he({overflow:null,scrollbarWidth:e})},[De]),[Ae,je]=qc(`scrollButtons`,{className:I(N.scrollButtons,S.className),elementType:Z,externalForwardedProps:ye,ownerState:ne,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:y.startScrollButtonIcon||y.StartScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon||y.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:P,endScrollButtonIcon:re}}}),Me=()=>{let e={};e.scrollbarSizeListener=O?(0,R.jsx)(Ee,{...Oe,onChange:ke}):null;let t=O&&(_===`auto`&&(ce||ue)||_===!0);return e.scrollButtonStart=t?(0,R.jsx)(Ae,{direction:i?`right`:`left`,onClick:F,disabled:!ce,...je}):null,e.scrollButtonEnd=t?(0,R.jsx)(Ae,{direction:i?`left`:`right`,onClick:Te,disabled:!ue,...je}):null,e},Pe=js(e=>{let{tabsMeta:t,tabMeta:n}=be();if(!(!n||!t)){if(n[A]<t[A]){let r=t[ee]+(n[A]-t[A]);Se(r,{animation:e})}else if(n[j]>t[j]){let r=t[ee]+(n[j]-t[j]);Se(r,{animation:e})}}}),Fe=js(()=>{O&&_!==!1&&pe(!fe)});L.useEffect(()=>{let e=fs(()=>{_e.current&&xe()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Fe()},r=Es(_e.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(ve.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(ve.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[xe,Fe]),L.useEffect(()=>{let e=Array.from(ve.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&O&&_!==!1){let n=e[0],r=e[t-1],i={root:_e.current,threshold:.99},a=new IntersectionObserver(e=>{le(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{de(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[O,_,fe,l?.length]),L.useEffect(()=>{ae(!0)},[]),L.useEffect(()=>{xe()}),L.useEffect(()=>{Pe(rl!==oe)},[Pe,oe]),L.useImperativeHandle(s,()=>({updateIndicator:xe,updateScrollButtons:Fe}),[xe,Fe]);let[Ie,Le]=qc(`indicator`,{className:I(N.indicator,x.className),elementType:tl,externalForwardedProps:ye,ownerState:ne,additionalProps:{style:oe}}),Re=(0,R.jsx)(Ie,{...Le}),ze=0,Be=L.Children.map(l,e=>{if(!L.isValidElement(e))return null;let t=e.props.value===void 0?ze:e.props.value;ge.set(t,ze);let n=t===w;return ze+=1,L.cloneElement(e,{fullWidth:T===`fullWidth`,indicator:n&&!ie&&Re,selected:n,selectionFollowsFocus:v,onChange:m,textColor:C,value:t,...ze===1&&w===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),He=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=ve.current,n=Kc(ws(t));if(n?.getAttribute(`role`)!==`tab`)return;let r=h===`horizontal`?`ArrowLeft`:`ArrowUp`,a=h===`horizontal`?`ArrowRight`:`ArrowDown`;switch(h===`horizontal`&&i&&(r=`ArrowRight`,a=`ArrowLeft`),e.key){case r:e.preventDefault(),Xc(t,n,Yc);break;case a:e.preventDefault(),Xc(t,n,Jc);break;case`Home`:e.preventDefault(),Xc(t,null,Jc);break;case`End`:e.preventDefault(),Xc(t,null,Yc);break;default:break}},Ue=Me(),[We,Ge]=qc(`root`,{ref:t,className:I(N.root,u),elementType:Qc,externalForwardedProps:{...ye,...D,component:d},ownerState:ne}),[Ke,qe]=qc(`scroller`,{ref:_e,className:N.scroller,elementType:$c,externalForwardedProps:ye,ownerState:ne,additionalProps:{style:{overflow:me.overflow,[k?`margin${i?`Left`:`Right`}`:`marginBottom`]:E?void 0:-me.scrollbarWidth}}}),[Je,Ye]=qc(`list`,{ref:ve,className:I(N.list,N.flexContainer),elementType:el,externalForwardedProps:ye,ownerState:ne,getSlotProps:e=>({...e,onKeyDown:t=>{He(t),e.onKeyDown?.(t)}})});return(0,R.jsxs)(We,{...Ge,children:[Ue.scrollButtonStart,Ue.scrollbarSizeListener,(0,R.jsxs)(Ke,{...qe,children:[(0,R.jsx)(Je,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Ye,children:Be}),ie&&Re]}),Ue.scrollButtonEnd]})});function al(e){return Mi(`MuiTab`,e)}var ol=Ni(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),sl=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return Oe({root:[`root`,a&&o&&`labelIcon`,`textColor${hs(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},al,t)},cl=Y(Lc,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${hs(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${ol.iconWrapper}`]:t.iconWrapper},{[`& .${ol.icon}`]:t.icon}]}})(ls(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${ol.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${ol.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${ol.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${ol.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${ol.selected}`]:{opacity:1},[`&.${ol.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${ol.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${ol.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${ol.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${ol.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),ll=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},x=sl(b),S=s&&u&&L.isValidElement(s)?L.cloneElement(s,{className:I(x.icon,s.props.className)}):s;return(0,R.jsxs)(cl,{focusRipple:!a,className:I(x.root,r),ref:t,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},ownerState:b,tabIndex:m?0:-1,...y,children:[c===`top`||c===`start`?(0,R.jsxs)(L.Fragment,{children:[S,u]}):(0,R.jsxs)(L.Fragment,{children:[u,S]}),l]})});function ul({theme:e,...t}){let n=`$$material`in e?e[as]:void 0;return(0,R.jsx)(Ta,{...t,themeId:n?as:void 0,theme:n||e})}var dl={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:fl,useColorScheme:pl,getInitColorSchemeScript:ml}=Ba({themeId:as,theme:()=>rs({cssVariables:!0}),colorSchemeStorageKey:dl.colorSchemeStorageKey,modeStorageKey:dl.modeStorageKey,defaultColorScheme:{light:dl.defaultLightColorScheme,dark:dl.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:Co(e.palette,e.typography)};return t.unstable_sx=function(e){return en({sx:e,theme:this})},t}}),hl=fl;function gl({theme:e,...t}){let n=L.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[as]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,R.jsx)(ul,{theme:n,...t}):(0,R.jsx)(hl,{theme:e,...t})}var _l=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,vl=({size:e,children:t})=>(e=_l(e),(0,R.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));vl.propTypes={size:F.number,children:F.oneOfType([F.arrayOf(F.node),F.node]).isRequired};var yl=({size:e,children:t,sx:n})=>(0,R.jsx)(vl,{size:e,children:(0,R.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});yl.propTypes={size:F.oneOfType([F.string,F.number]),children:F.oneOfType([F.arrayOf(F.node),F.node]).isRequired,sx:F.object};var bl=({fill:e})=>(0,R.jsx)(`polygon`,{points:`17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7`,fill:e});bl.propTypes={fill:F.string.isRequired};var xl=({fill:e})=>(0,R.jsx)(`polygon`,{transform:`translate(2, 0)`,points:`34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3`,fill:e});xl.propTypes={fill:F.string.isRequired};var Sl=({fill:e})=>(0,R.jsx)(`path`,{transform:`translate(1, 0)`,d:`M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z`,fill:e});Sl.propTypes={fill:F.string.isRequired};var Cl=({fill:e})=>(0,R.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});Cl.propTypes={fill:F.string.isRequired};var wl=({fill:e})=>(0,R.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});wl.propTypes={fill:F.string.isRequired};var Tl=(e,t)=>{class n extends L.Component{static propTypes={iconSet:F.oneOf([`emoji`,`check`]),shape:F.oneOf([`round`,`square`]),category:F.oneOf([`feedback`,void 0]),open:F.bool,size:F.oneOfType([F.number,F.string]),fg:F.string,bg:F.string};static defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,size:30,fg:`#4aaf46`,bg:`#f8ffe2`};render(){let{iconSet:n,shape:r,category:i,open:a,size:o,fg:s,bg:c}=this.props,l=n===`check`?(0,R.jsx)(e,{fill:s}):(0,R.jsx)(t,{fill:s}),u=n===`check`?(0,R.jsx)(e,{fill:c}):(0,R.jsx)(t,{fill:c});return a?(0,R.jsx)(yl,{size:o,children:u}):(0,R.jsxs)(yl,{size:o,children:[i===`feedback`?r===`round`?(0,R.jsx)(Sl,{fill:c}):(0,R.jsx)(xl,{fill:c}):r===`round`?(0,R.jsx)(Cl,{fill:c}):(0,R.jsx)(wl,{fill:c}),l]})}}return n},El=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,R.jsx)(`path`,{d:`M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2
117
117
  c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z`,fill:e}),(0,R.jsx)(`rect`,{x:`21.1`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e}),(0,R.jsx)(`rect`,{x:`12.7`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e})]});El.propTypes={fill:F.string.isRequired};var Dl=({fill:e,x:t=0,y:n=0})=>(0,R.jsx)(`polygon`,{transform:`translate(${t}, ${n})`,points:`19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4`,fill:e});Dl.propTypes={fill:F.string.isRequired,x:F.number,y:F.number};var Ol=Tl(Dl,El);Ol.propTypes={iconSet:F.oneOf([`emoji`,`check`]),shape:F.oneOf([`round`,`square`]),category:F.oneOf([`feedback`,void 0]),open:F.bool,fg:F.string,bg:F.string,size:F.oneOfType([F.string,F.number])},Ol.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#f8ffe2`,size:30};var kl=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,R.jsx)(`rect`,{x:`11`,y:`17.3`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)`,width:`16.6`,height:`3.7`,fill:e}),(0,R.jsx)(`rect`,{x:`17.4`,y:`10.7`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)`,width:`3.7`,height:`16.6`,fill:e})]});kl.propTypes={fill:F.string.isRequired};var Al=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,R.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,R.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,R.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});Al.propTypes={fill:F.string.isRequired};var jl=Tl(kl,Al);jl.propTypes={iconSet:F.oneOf([`emoji`,`check`]),shape:F.oneOf([`round`,`square`]),category:F.oneOf([`feedback`,void 0]),open:F.bool,fg:F.string,bg:F.string,size:F.oneOfType([F.string,F.number])},jl.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30};var Ml=({fill:e})=>(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,R.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});Ml.propTypes={fill:F.string.isRequired};var Nl=({fill:e})=>(0,R.jsx)(`polygon`,{points:`14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5`,fill:e});Nl.propTypes={fill:F.string.isRequired};var Pl=({fill:e})=>(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,R.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,R.jsx)(`path`,{d:`M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0
118
- C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});Pl.propTypes={fill:F.string.isRequired};var Fl=class extends L.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Ml,{fill:t})]}),emoji:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),feedback:{check:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),emoji:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),square:{check:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Ml,{fill:t})]}),emoji:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),open:{check:(0,R.jsx)(yl,{children:(0,R.jsx)(Ml,{fill:n})}),emoji:(0,R.jsx)(yl,{children:(0,R.jsx)(Pl,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};Fl.propTypes={iconSet:F.oneOf([`emoji`,`check`,void 0]),shape:F.oneOf([`square`,void 0]),category:F.oneOf([`feedback`,void 0]),open:F.bool,fg:F.string,bg:F.string},Fl.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var Il=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,R.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,R.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});Il.propTypes={fill:F.string.isRequired};var Ll=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,R.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,R.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,R.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});Ll.propTypes={fill:F.string.isRequired};var Rl=Tl(Il,Ll);Rl.propTypes={iconSet:F.oneOf([`emoji`,`check`]),shape:F.oneOf([`round`,`square`]),category:F.oneOf([`feedback`,void 0]),open:F.bool,fg:F.string,bg:F.string,size:F.oneOfType([F.string,F.number])},Rl.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function zl(e){return e?.ref||null}var Bl=e=>e.scrollTop;function Vl(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function Hl(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function Ul(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function Wl(e){return`scale(${e}, ${e**2})`}var Gl={entering:{opacity:1,transform:Wl(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:Wl(.75)},exited:{opacity:0,transform:Wl(.75)}},Kl={opacity:0,transform:Wl(.75),visibility:`hidden`},ql=L.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=Cc(),_=L.useRef(),v=os(),y=L.useRef(null),b=Ms(y,zl(i),t),x=Vl(y,l),S=Vl(y,(e,t)=>{Bl(e);let{duration:n,delay:r,easing:i}=Ul({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=Vl(y,c),w=Vl(y,f),T=Vl(y,e=>{let{duration:t,delay:n,easing:r}=Ul({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Wl(.75),u&&u(e)}),E=Vl(y,e=>{e.style.transition=``,d&&d(e)});return(0,R.jsx)(sc,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=Hl(e,o,Gl,Kl,p,i.props.style);return L.cloneElement(i,{style:r,ref:b,...n})}})});ql&&(ql.muiSupportAuto=!0);function Jl(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Yl(e){let t=Cs(e);return t.body===e?Ts(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Xl(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function Zl(e){return parseFloat(Ts(e).getComputedStyle(e).paddingRight)||0}function Ql(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function $l(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!Ql(e);t&&n&&Xl(e,i)})}function eu(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function tu(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(Yl(r)){let e=Jl(Ts(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${Zl(r)+e}px`;let t=Cs(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${Zl(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Cs(r).body;else{let t=r.parentElement,n=Ts(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function nu(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var ru=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Xl(e.modalRef,!1);let r=nu(t);$l(t,e.mount,e.modalRef,r,!0);let i=eu(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=eu(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=tu(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=eu(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Xl(e.modalRef,t),$l(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&Xl(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function iu(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var au=iu,ou=`data-mui-focusable`;function su(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${ou}]`):null}var cu=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function lu(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function uu(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function du(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||uu(e))}function fu(e){let t=[],n=[];return Array.from(e.querySelectorAll(cu)).forEach((e,r)=>{let i=lu(e);i===-1||!du(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function pu(){return!0}function mu(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=fu,isEnabled:o=pu,open:s}=e,c=L.useRef(!1),l=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=L.useRef(null),p=L.useRef(!1),m=L.useRef(null),h=Pe(zl(t),m),g=L.useRef(null);L.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),L.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=Kc(Cs(m.current)),t=su(m.current)??m.current;return au(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),L.useEffect(()=>{if(!s||!m.current)return;let e=Cs(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&Kc(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=Kc(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(au(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=Kc(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),L.cloneElement(t,{ref:h,onFocus:_}),(0,R.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function hu(e){return typeof e==`function`?e():e}var gu=L.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=L.useState(null),s=Pe(L.isValidElement(n)?zl(n):null,t);if(Ki(()=>{i||o(hu(r)||document.body)},[r,i]),Ki(()=>{if(a&&!i)return Ds(t,a),()=>{Ds(t,null)}},[t,a,i]),i){if(L.isValidElement(n)){let e={ref:s};return L.cloneElement(n,e)}return n}return a&&tc.createPortal(n,a)}),_u={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},vu={opacity:0,visibility:`hidden`},yu=L.forwardRef(function(e,t){let n=os(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=L.useRef(null),y=Ms(v,zl(o),t),b=Vl(v,d),x=Vl(v,(e,t)=>{Bl(e);let r=Ul({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=Vl(v,u),C=Vl(v,m),w=Vl(v,e=>{let t=Ul({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=Vl(v,e=>{e.style.transition=``,p&&p(e)});return(0,R.jsx)(sc,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=Hl(e,c,_u,vu,h,o.props.style);return L.cloneElement(o,{style:r,ref:y,...n})}})});function bu(e){return Mi(`MuiBackdrop`,e)}Ni(`MuiBackdrop`,[`root`,`invisible`]);var xu=e=>{let{classes:t,invisible:n}=e;return Oe({root:[`root`,n&&`invisible`]},bu,t)},Su=Y(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Cu=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=xu(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=qc(`root`,{elementType:Su,externalForwardedProps:_,className:I(g.root,i),ownerState:h}),[b,x]=qc(`transition`,{elementType:yu,externalForwardedProps:_,ownerState:h});return(0,R.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,R.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function wu(e){return typeof e==`function`?e():e}function Tu(e){return e?e.props.hasOwnProperty(`in`):!1}var Eu=()=>{},Du=new ru;function Ou(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=L.useRef({}),f=L.useRef(null),p=L.useRef(null),m=Pe(p,u),[h,g]=L.useState(!l),_=Tu(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>Cs(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Du.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=As(()=>{let e=wu(t)||y().body;Du.add(b(),e),p.current&&x()}),C=()=>Du.isTopModal(b()),w=As(e=>{f.current=e,e&&(l&&C()?x():p.current&&Xl(p.current,v))}),T=L.useCallback(()=>{Du.remove(b(),v)},[v]);L.useEffect(()=>()=>{T()},[T]),L.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Le(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:gs(()=>{g(!1),a&&a()},s?.props.onEnter??Eu),onExited:gs(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??Eu)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function ku(e){return Mi(`MuiModal`,e)}Ni(`MuiModal`,[`root`,`hidden`,`backdrop`]);var Au=e=>{let{open:t,exited:n,classes:r}=e;return Oe({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},ku,r)},ju=Y(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(ls(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),Mu=Y(Cu,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),Nu=L.forwardRef(function(e,t){let n=us({name:`MuiModal`,props:e}),{BackdropComponent:r=Mu,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:ee,getBackdropProps:A,getTransitionProps:j,portalRef:te,isTopModal:M,exited:ne,hasTransition:N}=Ou({...k,rootRef:t}),P={...k,exited:ne},re=Au(P),ie={};if(c.props.tabIndex===void 0&&(ie.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=j();ie.onEnter=e,ie.onExited=t}let ae={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[oe,se]=qc(`root`,{ref:t,elementType:ju,externalForwardedProps:{...ae,...O,component:u},getSlotProps:ee,ownerState:P,className:I(o,re?.root,!P.open&&P.exited&&re?.hidden)}),[ce,le]=qc(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ae,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>A({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:I(i?.className,re?.backdrop),ownerState:P});return!b&&!w&&(!N||ne)?null:(0,R.jsx)(gu,{ref:te,container:l,disablePortal:g,children:(0,R.jsxs)(oe,{...se,children:[!y&&r?(0,R.jsx)(ce,{...le}):null,(0,R.jsx)(mu,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:M,open:w,children:L.cloneElement(c,ie)})]})})});function Pu(e){return Mi(`MuiPaper`,e)}Ni(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var Fu=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return Oe({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},Pu,i)},Iu=Y(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(ls(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),Lu=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiPaper`}),r=os(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=Fu(u);return(0,R.jsx)(Iu,{as:a,ownerState:u,className:I(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${ra(`#fff`,Bo(o))}, ${ra(`#fff`,Bo(o))})`}},...l.style}})});function Ru(e){return Mi(`MuiPopover`,e)}Ni(`MuiPopover`,[`root`,`paper`]);function zu(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function Bu(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function Vu(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function Hu(e){return typeof e==`function`?e():e}var Uu=e=>{let{classes:t}=e;return Oe({root:[`root`],paper:[`paper`]},Ru,t)},Wu=Y(Nu,{name:`MuiPopover`,slot:`Root`})({}),Gu=Y(Lu,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),Ku=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=L.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=Uu(w),E=L.useCallback(()=>{if(s===`anchorPosition`)return o;let e=Hu(i),t=(e&&e.nodeType===1?e:ws(C.current).body).getBoundingClientRect();return{top:t.top+zu(t,a.vertical),left:t.left+Bu(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=L.useCallback(e=>({vertical:zu(e,_.vertical),horizontal:Bu(e,_.horizontal)}),[_.horizontal,_.vertical]),O=L.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:Vu(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Es(Hu(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:Vu(n)}},[i,s,E,D,f]),[k,ee]=L.useState(p),A=L.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ee(!0)},[O]);L.useEffect(()=>(x&&window.addEventListener(`scroll`,A),()=>window.removeEventListener(`scroll`,A)),[i,x,A]);let j=()=>{A()},te=()=>{ee(!1)};L.useEffect(()=>{p&&A()}),L.useImperativeHandle(r,()=>p?{updatePosition:()=>{A()}}:null,[p,A]),L.useEffect(()=>{if(!p)return;let e=fs(()=>{A()}),t=Es(Hu(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,A]);let M=y,ne={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[N,P]=qc(`transition`,{elementType:ql,externalForwardedProps:ne,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),j()},onExited:t=>{e.onExited?.(t),te()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!N.muiSupportAuto&&(M=void 0);let re=u||(i?ws(Hu(i)).body:void 0),[ie,{slots:ae,slotProps:oe,...se}]=qc(`root`,{ref:t,elementType:Wu,externalForwardedProps:{...ne,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Ps(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:re,open:p},ownerState:w,className:I(T.root,l)}),[ce,le]=qc(`paper`,{ref:C,className:T.paper,elementType:Gu,externalForwardedProps:ne,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:w});return(0,R.jsx)(ie,{...se,...!Fe(ie)&&{slots:ae,slotProps:oe,disableScrollLock:x},children:(0,R.jsx)(N,{...P,timeout:M,children:(0,R.jsx)(ce,{...le,children:c})})})}),qu={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},Ju={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},Yu=s({background:()=>yd,backgroundDark:()=>bd,black:()=>Nd,blueGrey100:()=>Vd,blueGrey300:()=>Hd,blueGrey600:()=>Ud,blueGrey900:()=>Wd,border:()=>Ed,borderDark:()=>Od,borderGray:()=>kd,borderLight:()=>Dd,buttonBorder:()=>Zd,buttonFocusOutline:()=>Bd,buttonHoverBg:()=>Qd,correct:()=>td,correctSecondary:()=>nd,correctTertiary:()=>rd,correctWithIcon:()=>id,defaults:()=>Q,disabled:()=>Qu,disabledSecondary:()=>$u,disabledText:()=>ed,dropdownBackground:()=>Sd,fadedPrimary:()=>md,focusChecked:()=>Id,focusCheckedBorder:()=>Ld,focusUnchecked:()=>Rd,focusUncheckedBorder:()=>zd,incorrect:()=>ad,incorrectSecondary:()=>sd,incorrectWithIcon:()=>od,keyBoardFocusIndicator:()=>Xd,keypadButton:()=>Gd,keypadButtonHover:()=>Jd,keypadButtonOperator:()=>Kd,keypadButtonOperatorHover:()=>Yd,keypadEmptyPlaceholder:()=>qd,missing:()=>cd,missingWithIcon:()=>ld,primary:()=>ud,primaryDark:()=>fd,primaryLight:()=>dd,primaryText:()=>pd,secondary:()=>hd,secondaryBackground:()=>xd,secondaryDark:()=>_d,secondaryLight:()=>gd,secondaryText:()=>vd,surface:()=>Cd,tableGrid:()=>Ad,tableGridLight:()=>jd,tableStripe:()=>Md,tertiary:()=>wd,tertiaryLight:()=>Td,text:()=>Zu,transparent:()=>Fd,v:()=>Xu,visualElementsColors:()=>$d,white:()=>Pd}),Q={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:no[500],CORRECT_SECONDARY:no[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:$a[500],INCORRECT_SECONDARY:Qa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:Qa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:Ju[500],PRIMARY_LIGHT:Ju[200],PRIMARY_DARK:Ju[800],SECONDARY:qu.A400,SECONDARY_LIGHT:qu[200],SECONDARY_DARK:qu[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#E0E1E6`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(Q);var Xu=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},$=Xu(`pie`),Zu=()=>$(`text`,Q.TEXT),Qu=()=>$(`disabled`,Q.DISABLED),$u=()=>$(`disabled-secondary`,Q.DISABLED_SECONDARY),ed=()=>$(`disabled-text`,`text`,Q.DISABLED_TEXT),td=()=>$(`correct`,Q.CORRECT),nd=()=>$(`correct-secondary`,Q.CORRECT_SECONDARY),rd=()=>$(`correct-tertiary`,Q.CORRECT_TERTIARY),id=()=>$(`correct-icon`,Q.CORRECT_WITH_ICON),ad=()=>$(`incorrect`,Q.INCORRECT),od=()=>$(`incorrect-icon`,Q.INCORRECT_WITH_ICON),sd=()=>$(`incorrect-secondary`,Q.INCORRECT_SECONDARY),cd=()=>$(`missing`,Q.MISSING),ld=()=>$(`missing-icon`,Q.MISSING_WITH_ICON),ud=()=>$(`primary`,Q.PRIMARY),dd=()=>$(`primary-light`,Q.PRIMARY_LIGHT),fd=()=>$(`primary-dark`,Q.PRIMARY_DARK),pd=()=>$(`primary-text`,`text`,Q.TEXT),md=()=>$(`faded-primary`,Q.FADED_PRIMARY),hd=()=>$(`secondary`,Q.SECONDARY),gd=()=>$(`secondary-light`,Q.SECONDARY_LIGHT),_d=()=>$(`secondary-dark`,Q.SECONDARY_DARK),vd=()=>$(`secondary-text`,`text`,Q.TEXT),yd=()=>$(`background`,Q.BACKGROUND),bd=()=>$(`background-dark`,Q.BACKGROUND_DARK),xd=()=>$(`secondary-background`,Q.SECONDARY_BACKGROUND),Sd=()=>$(`dropdown-background`,Q.DROPDOWN_BACKGROUND),Cd=()=>$(`surface`,Q.SURFACE),wd=()=>$(`tertiary`,Q.TERTIARY),Td=()=>$(`tertiary-light`,Q.TERTIARY_LIGHT),Ed=()=>$(`border`,Q.BORDER),Dd=()=>$(`border-light`,Q.BORDER_LIGHT),Od=()=>$(`border-dark`,Q.BORDER_DARK),kd=()=>$(`border-gray`,Q.BORDER_GRAY),Ad=()=>$(`table-grid`,`text`,Q.TABLE_GRID),jd=()=>$(`table-grid-light`,`border-light`,Q.TABLE_GRID_LIGHT),Md=()=>$(`table-stripe`,`background-dark`,Q.TABLE_STRIPE),Nd=()=>$(`black`,Q.BLACK),Pd=()=>$(`white`,Q.WHITE),Fd=()=>Q.TRANSPARENT,Id=()=>$(`focus-checked`,Q.FOCUS_CHECKED),Ld=()=>$(`focus-checked-border`,Q.FOCUS_CHECKED_BORDER),Rd=()=>$(`focus-unchecked`,Q.FOCUS_UNCHECKED),zd=()=>$(`focus-unchecked-border`,Q.FOCUS_UNCHECKED_BORDER),Bd=()=>$(`button-focus-outline`,Q.BUTTON_FOCUS_OUTLINE),Vd=()=>$(`blue-grey-100`,Q.BLUE_GREY100),Hd=()=>$(`blue-grey-300`,Q.BLUE_GREY300),Ud=()=>$(`blue-grey-600`,Q.BLUE_GREY600),Wd=()=>$(`blue-grey-900`,Q.BLUE_GREY900),Gd=()=>$(`keypad-button`,Q.KEYPAD_BUTTON),Kd=()=>$(`keypad-button-operator`,Q.KEYPAD_BUTTON_OPERATOR),qd=()=>$(`keypad-empty-placeholder`,Q.KEYPAD_EMPTY_PLACEHOLDER),Jd=()=>$(`keypad-button-hover`,Q.KEYPAD_BUTTON_HOVER),Yd=()=>$(`keypad-button-operator-hover`,Q.KEYPAD_BUTTON_OPERATOR_HOVER),Xd=()=>$(`keyboard-focus-indicator`,Q.KEY_BOARD_FOCUS_INDICATOR),Zd=()=>$(`button-border`,Q.BUTTON_BORDER),Qd=()=>$(`button-hover-bg`,Q.BUTTON_HOVER_BG),$d={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},ef=Y(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),tf=Y(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${Qu()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${td()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${ad()})`}}),nf=Y(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),rf=class extends L.Component{static propTypes={correctness:F.string,feedback:F.string};nodeRef=L.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,R.jsx)(dc,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,R.jsx)(nf,{ref:this.nodeRef,children:(0,R.jsx)(ef,{children:(0,R.jsx)(tf,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,R.jsx)(`div`,{children:(0,R.jsx)(yc,{children:this.renderFeedback()})})}},af=()=>{};function of(){let e=function(){};return e.enabled=!1,e.log=af,e.extend=()=>e,e.destroy=af,e}of.log=af,of.enable=af,of.disable=()=>``,of.enabled=()=>!1;var sf=s({Correct:()=>pf,Incorrect:()=>mf,NothingSubmitted:()=>gf,PartiallyCorrect:()=>hf}),cf=of(`pie-libs:render-ui:response-indicators`),lf=Y(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),uf=Y(Ku)({cursor:`pointer`}),df=Y(`div`)({padding:`0`,borderRadius:`4px`}),ff=(e,t)=>{class n extends L.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{cf(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,R.jsxs)(lf,{hasFeedback:!!n,children:[(0,R.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,R.jsx)(e,{})}),n&&(0,R.jsx)(uf,{PaperComponent:df,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,R.jsx)(rf,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:F.string},n},pf=ff(Ol,`correct`),mf=ff(jl,`incorrect`),hf=ff(Rl,`partially-correct`),gf=ff(Fl,`nothing-submitted`);function _f(e){return Mi(`MuiCollapse`,e)}Ni(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var vf=e=>{let{orientation:t,classes:n}=e;return Oe({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},_f,n)},yf=Y(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(ls(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),bf=Y(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),xf=Y(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Sf=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=ko.standard,TransitionComponent:x=sc,...S}=n,C={...n,orientation:g,collapsedSize:o},w=vf(C),T=os(),E=Cc(),D=L.useRef(null),O=L.useRef(),k=typeof o==`number`?`${o}px`:o,ee=g===`horizontal`,A=ee?`width`:`height`,j=L.useRef(null),te=Ms(t,j),M=()=>D.current?D.current[ee?`clientWidth`:`clientHeight`]:0,ne=Vl(j,(e,t)=>{D.current&&ee&&(D.current.style.position=`absolute`),e.style[A]=k,u&&u(e,t)}),N=Vl(j,(e,t)=>{let n=M();D.current&&ee&&(D.current.style.position=``);let{duration:r,easing:i}=Ul({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[A]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),P=Vl(j,(e,t)=>{e.style[A]=`auto`,d&&d(e,t)}),re=Vl(j,e=>{e.style[A]=`${M()}px`,p&&p(e)}),ie=Vl(j,m),ae=Vl(j,e=>{let t=M(),{duration:n,easing:r}=Ul({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[A]=k,e.style.transitionTimingFunction=r,h&&h(e)}),oe=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(j.current,e)},se={slots:_,slotProps:v,component:s},[ce,le]=qc(`root`,{ref:te,className:I(w.root,a),elementType:yf,externalForwardedProps:se,ownerState:C,additionalProps:{style:{[ee?`minWidth`:`minHeight`]:k,...y}}}),[ue,de]=qc(`wrapper`,{ref:D,className:w.wrapper,elementType:bf,externalForwardedProps:se,ownerState:C}),[fe,pe]=qc(`wrapperInner`,{className:w.wrapperInner,elementType:xf,externalForwardedProps:se,ownerState:C});return(0,R.jsx)(x,{in:l,onEnter:ne,onEntered:P,onEntering:N,onExit:re,onExited:ie,onExiting:ae,addEndListener:oe,nodeRef:j,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,R.jsx)(ce,{...le,className:I(le.className,{entered:w.entered,exited:!l&&k===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,R.jsx)(ue,{...de,ownerState:r,children:(0,R.jsx)(fe,{...pe,ownerState:r,children:i})})})}})});Sf&&(Sf.muiSupportAuto=!0);var Cf=Y(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),wf=Y(Sf)(({theme:e})=>({paddingTop:e.spacing(2)})),Tf=class extends L.Component{static propTypes={className:F.string,children:F.object,labels:F.shape({visible:F.string,hidden:F.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){he(this.root)}componentDidUpdate(){he(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,R.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,R.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,R.jsx)(Cf,{children:r})}),(0,R.jsx)(wf,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function Ef(e){return typeof e.main==`string`}function Df(e,t=[]){if(!Ef(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Of(e=[]){return([,t])=>t&&Df(t,e)}function kf(e){return Mi(`MuiCircularProgress`,e)}Ni(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]);var Af=44,jf=Xr`
118
+ C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});Pl.propTypes={fill:F.string.isRequired};var Fl=class extends L.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Ml,{fill:t})]}),emoji:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),feedback:{check:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),emoji:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),square:{check:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Ml,{fill:t})]}),emoji:(0,R.jsxs)(yl,{children:[(0,R.jsx)(Nl,{fill:n}),(0,R.jsx)(Pl,{fill:t})]}),open:{check:(0,R.jsx)(yl,{children:(0,R.jsx)(Ml,{fill:n})}),emoji:(0,R.jsx)(yl,{children:(0,R.jsx)(Pl,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};Fl.propTypes={iconSet:F.oneOf([`emoji`,`check`,void 0]),shape:F.oneOf([`square`,void 0]),category:F.oneOf([`feedback`,void 0]),open:F.bool,fg:F.string,bg:F.string},Fl.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var Il=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,R.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,R.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});Il.propTypes={fill:F.string.isRequired};var Ll=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,R.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,R.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,R.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});Ll.propTypes={fill:F.string.isRequired};var Rl=Tl(Il,Ll);Rl.propTypes={iconSet:F.oneOf([`emoji`,`check`]),shape:F.oneOf([`round`,`square`]),category:F.oneOf([`feedback`,void 0]),open:F.bool,fg:F.string,bg:F.string,size:F.oneOfType([F.string,F.number])},Rl.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function zl(e){return e?.ref||null}var Bl=e=>e.scrollTop;function Vl(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function Hl(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function Ul(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function Wl(e){return`scale(${e}, ${e**2})`}var Gl={entering:{opacity:1,transform:Wl(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:Wl(.75)},exited:{opacity:0,transform:Wl(.75)}},Kl={opacity:0,transform:Wl(.75),visibility:`hidden`},ql=L.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=Cc(),_=L.useRef(),v=os(),y=L.useRef(null),b=Ms(y,zl(i),t),x=Vl(y,l),S=Vl(y,(e,t)=>{Bl(e);let{duration:n,delay:r,easing:i}=Ul({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=Vl(y,c),w=Vl(y,f),T=Vl(y,e=>{let{duration:t,delay:n,easing:r}=Ul({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Wl(.75),u&&u(e)}),E=Vl(y,e=>{e.style.transition=``,d&&d(e)});return(0,R.jsx)(sc,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=Hl(e,o,Gl,Kl,p,i.props.style);return L.cloneElement(i,{style:r,ref:b,...n})}})});ql&&(ql.muiSupportAuto=!0);function Jl(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Yl(e){let t=Cs(e);return t.body===e?Ts(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Xl(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function Zl(e){return parseFloat(Ts(e).getComputedStyle(e).paddingRight)||0}function Ql(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function $l(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!Ql(e);t&&n&&Xl(e,i)})}function eu(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function tu(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(Yl(r)){let e=Jl(Ts(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${Zl(r)+e}px`;let t=Cs(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${Zl(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Cs(r).body;else{let t=r.parentElement,n=Ts(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function nu(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var ru=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Xl(e.modalRef,!1);let r=nu(t);$l(t,e.mount,e.modalRef,r,!0);let i=eu(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=eu(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=tu(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=eu(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Xl(e.modalRef,t),$l(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&Xl(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function iu(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var au=iu,ou=`data-mui-focusable`;function su(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${ou}]`):null}var cu=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function lu(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function uu(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function du(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||uu(e))}function fu(e){let t=[],n=[];return Array.from(e.querySelectorAll(cu)).forEach((e,r)=>{let i=lu(e);i===-1||!du(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function pu(){return!0}function mu(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=fu,isEnabled:o=pu,open:s}=e,c=L.useRef(!1),l=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=L.useRef(null),p=L.useRef(!1),m=L.useRef(null),h=Pe(zl(t),m),g=L.useRef(null);L.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),L.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=Kc(Cs(m.current)),t=su(m.current)??m.current;return au(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),L.useEffect(()=>{if(!s||!m.current)return;let e=Cs(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&Kc(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=Kc(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(au(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=Kc(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),L.cloneElement(t,{ref:h,onFocus:_}),(0,R.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function hu(e){return typeof e==`function`?e():e}var gu=L.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=L.useState(null),s=Pe(L.isValidElement(n)?zl(n):null,t);if(Ki(()=>{i||o(hu(r)||document.body)},[r,i]),Ki(()=>{if(a&&!i)return Ds(t,a),()=>{Ds(t,null)}},[t,a,i]),i){if(L.isValidElement(n)){let e={ref:s};return L.cloneElement(n,e)}return n}return a&&tc.createPortal(n,a)}),_u={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},vu={opacity:0,visibility:`hidden`},yu=L.forwardRef(function(e,t){let n=os(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=L.useRef(null),y=Ms(v,zl(o),t),b=Vl(v,d),x=Vl(v,(e,t)=>{Bl(e);let r=Ul({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=Vl(v,u),C=Vl(v,m),w=Vl(v,e=>{let t=Ul({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=Vl(v,e=>{e.style.transition=``,p&&p(e)});return(0,R.jsx)(sc,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=Hl(e,c,_u,vu,h,o.props.style);return L.cloneElement(o,{style:r,ref:y,...n})}})});function bu(e){return Mi(`MuiBackdrop`,e)}Ni(`MuiBackdrop`,[`root`,`invisible`]);var xu=e=>{let{classes:t,invisible:n}=e;return Oe({root:[`root`,n&&`invisible`]},bu,t)},Su=Y(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Cu=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=xu(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=qc(`root`,{elementType:Su,externalForwardedProps:_,className:I(g.root,i),ownerState:h}),[b,x]=qc(`transition`,{elementType:yu,externalForwardedProps:_,ownerState:h});return(0,R.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,R.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function wu(e){return typeof e==`function`?e():e}function Tu(e){return e?e.props.hasOwnProperty(`in`):!1}var Eu=()=>{},Du=new ru;function Ou(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=L.useRef({}),f=L.useRef(null),p=L.useRef(null),m=Pe(p,u),[h,g]=L.useState(!l),_=Tu(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>Cs(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Du.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=As(()=>{let e=wu(t)||y().body;Du.add(b(),e),p.current&&x()}),C=()=>Du.isTopModal(b()),w=As(e=>{f.current=e,e&&(l&&C()?x():p.current&&Xl(p.current,v))}),T=L.useCallback(()=>{Du.remove(b(),v)},[v]);L.useEffect(()=>()=>{T()},[T]),L.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Le(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:gs(()=>{g(!1),a&&a()},s?.props.onEnter??Eu),onExited:gs(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??Eu)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function ku(e){return Mi(`MuiModal`,e)}Ni(`MuiModal`,[`root`,`hidden`,`backdrop`]);var Au=e=>{let{open:t,exited:n,classes:r}=e;return Oe({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},ku,r)},ju=Y(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(ls(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),Mu=Y(Cu,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),Nu=L.forwardRef(function(e,t){let n=us({name:`MuiModal`,props:e}),{BackdropComponent:r=Mu,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:ee,getBackdropProps:A,getTransitionProps:j,portalRef:te,isTopModal:M,exited:ne,hasTransition:N}=Ou({...k,rootRef:t}),P={...k,exited:ne},re=Au(P),ie={};if(c.props.tabIndex===void 0&&(ie.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=j();ie.onEnter=e,ie.onExited=t}let ae={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[oe,se]=qc(`root`,{ref:t,elementType:ju,externalForwardedProps:{...ae,...O,component:u},getSlotProps:ee,ownerState:P,className:I(o,re?.root,!P.open&&P.exited&&re?.hidden)}),[ce,le]=qc(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ae,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>A({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:I(i?.className,re?.backdrop),ownerState:P});return!b&&!w&&(!N||ne)?null:(0,R.jsx)(gu,{ref:te,container:l,disablePortal:g,children:(0,R.jsxs)(oe,{...se,children:[!y&&r?(0,R.jsx)(ce,{...le}):null,(0,R.jsx)(mu,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:M,open:w,children:L.cloneElement(c,ie)})]})})});function Pu(e){return Mi(`MuiPaper`,e)}Ni(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var Fu=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return Oe({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},Pu,i)},Iu=Y(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(ls(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),Lu=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiPaper`}),r=os(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=Fu(u);return(0,R.jsx)(Iu,{as:a,ownerState:u,className:I(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${ra(`#fff`,Bo(o))}, ${ra(`#fff`,Bo(o))})`}},...l.style}})});function Ru(e){return Mi(`MuiPopover`,e)}Ni(`MuiPopover`,[`root`,`paper`]);function zu(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function Bu(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function Vu(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function Hu(e){return typeof e==`function`?e():e}var Uu=e=>{let{classes:t}=e;return Oe({root:[`root`],paper:[`paper`]},Ru,t)},Wu=Y(Nu,{name:`MuiPopover`,slot:`Root`})({}),Gu=Y(Lu,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),Ku=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=L.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=Uu(w),E=L.useCallback(()=>{if(s===`anchorPosition`)return o;let e=Hu(i),t=(e&&e.nodeType===1?e:ws(C.current).body).getBoundingClientRect();return{top:t.top+zu(t,a.vertical),left:t.left+Bu(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=L.useCallback(e=>({vertical:zu(e,_.vertical),horizontal:Bu(e,_.horizontal)}),[_.horizontal,_.vertical]),O=L.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:Vu(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Es(Hu(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:Vu(n)}},[i,s,E,D,f]),[k,ee]=L.useState(p),A=L.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ee(!0)},[O]);L.useEffect(()=>(x&&window.addEventListener(`scroll`,A),()=>window.removeEventListener(`scroll`,A)),[i,x,A]);let j=()=>{A()},te=()=>{ee(!1)};L.useEffect(()=>{p&&A()}),L.useImperativeHandle(r,()=>p?{updatePosition:()=>{A()}}:null,[p,A]),L.useEffect(()=>{if(!p)return;let e=fs(()=>{A()}),t=Es(Hu(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,A]);let M=y,ne={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[N,P]=qc(`transition`,{elementType:ql,externalForwardedProps:ne,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),j()},onExited:t=>{e.onExited?.(t),te()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!N.muiSupportAuto&&(M=void 0);let re=u||(i?ws(Hu(i)).body:void 0),[ie,{slots:ae,slotProps:oe,...se}]=qc(`root`,{ref:t,elementType:Wu,externalForwardedProps:{...ne,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Ps(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:re,open:p},ownerState:w,className:I(T.root,l)}),[ce,le]=qc(`paper`,{ref:C,className:T.paper,elementType:Gu,externalForwardedProps:ne,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:w});return(0,R.jsx)(ie,{...se,...!Fe(ie)&&{slots:ae,slotProps:oe,disableScrollLock:x},children:(0,R.jsx)(N,{...P,timeout:M,children:(0,R.jsx)(ce,{...le,children:c})})})}),qu={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},Ju={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},Yu=s({background:()=>yd,backgroundDark:()=>bd,black:()=>Nd,blueGrey100:()=>Vd,blueGrey300:()=>Hd,blueGrey600:()=>Ud,blueGrey900:()=>Wd,border:()=>Ed,borderDark:()=>Od,borderGray:()=>kd,borderLight:()=>Dd,buttonBorder:()=>Zd,buttonFocusOutline:()=>Bd,buttonHoverBg:()=>Qd,correct:()=>td,correctSecondary:()=>nd,correctTertiary:()=>rd,correctWithIcon:()=>id,defaults:()=>Q,disabled:()=>Qu,disabledSecondary:()=>$u,disabledText:()=>ed,dropdownBackground:()=>Sd,fadedPrimary:()=>md,focusChecked:()=>Id,focusCheckedBorder:()=>Ld,focusUnchecked:()=>Rd,focusUncheckedBorder:()=>zd,incorrect:()=>ad,incorrectSecondary:()=>sd,incorrectWithIcon:()=>od,keyBoardFocusIndicator:()=>Xd,keypadButton:()=>Gd,keypadButtonHover:()=>Jd,keypadButtonOperator:()=>Kd,keypadButtonOperatorHover:()=>Yd,keypadEmptyPlaceholder:()=>qd,missing:()=>cd,missingWithIcon:()=>ld,primary:()=>ud,primaryDark:()=>fd,primaryLight:()=>dd,primaryText:()=>pd,secondary:()=>hd,secondaryBackground:()=>xd,secondaryDark:()=>_d,secondaryLight:()=>gd,secondaryText:()=>vd,surface:()=>Cd,tableGrid:()=>Ad,tableGridLight:()=>jd,tableStripe:()=>Md,tertiary:()=>wd,tertiaryLight:()=>Td,text:()=>Zu,transparent:()=>Fd,v:()=>Xu,visualElementsColors:()=>$d,white:()=>Pd}),Q={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:no[500],CORRECT_SECONDARY:no[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:$a[500],INCORRECT_SECONDARY:Qa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:Qa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:Ju[500],PRIMARY_LIGHT:Ju[200],PRIMARY_DARK:Ju[800],SECONDARY:qu.A400,SECONDARY_LIGHT:qu[200],SECONDARY_DARK:qu[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#E0E1E6`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#81848F`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(Q);var Xu=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},$=Xu(`pie`),Zu=()=>$(`text`,Q.TEXT),Qu=()=>$(`disabled`,Q.DISABLED),$u=()=>$(`disabled-secondary`,Q.DISABLED_SECONDARY),ed=()=>$(`disabled-text`,`text`,Q.DISABLED_TEXT),td=()=>$(`correct`,Q.CORRECT),nd=()=>$(`correct-secondary`,Q.CORRECT_SECONDARY),rd=()=>$(`correct-tertiary`,Q.CORRECT_TERTIARY),id=()=>$(`correct-icon`,Q.CORRECT_WITH_ICON),ad=()=>$(`incorrect`,Q.INCORRECT),od=()=>$(`incorrect-icon`,Q.INCORRECT_WITH_ICON),sd=()=>$(`incorrect-secondary`,Q.INCORRECT_SECONDARY),cd=()=>$(`missing`,Q.MISSING),ld=()=>$(`missing-icon`,Q.MISSING_WITH_ICON),ud=()=>$(`primary`,Q.PRIMARY),dd=()=>$(`primary-light`,Q.PRIMARY_LIGHT),fd=()=>$(`primary-dark`,Q.PRIMARY_DARK),pd=()=>$(`primary-text`,`text`,Q.TEXT),md=()=>$(`faded-primary`,Q.FADED_PRIMARY),hd=()=>$(`secondary`,Q.SECONDARY),gd=()=>$(`secondary-light`,Q.SECONDARY_LIGHT),_d=()=>$(`secondary-dark`,Q.SECONDARY_DARK),vd=()=>$(`secondary-text`,`text`,Q.TEXT),yd=()=>$(`background`,Q.BACKGROUND),bd=()=>$(`background-dark`,Q.BACKGROUND_DARK),xd=()=>$(`secondary-background`,Q.SECONDARY_BACKGROUND),Sd=()=>$(`dropdown-background`,Q.DROPDOWN_BACKGROUND),Cd=()=>$(`surface`,Q.SURFACE),wd=()=>$(`tertiary`,Q.TERTIARY),Td=()=>$(`tertiary-light`,Q.TERTIARY_LIGHT),Ed=()=>$(`border`,Q.BORDER),Dd=()=>$(`border-light`,Q.BORDER_LIGHT),Od=()=>$(`border-dark`,Q.BORDER_DARK),kd=()=>$(`border-gray`,Q.BORDER_GRAY),Ad=()=>$(`table-grid`,`text`,Q.TABLE_GRID),jd=()=>$(`table-grid-light`,`border-light`,Q.TABLE_GRID_LIGHT),Md=()=>$(`table-stripe`,`background-dark`,Q.TABLE_STRIPE),Nd=()=>$(`black`,Q.BLACK),Pd=()=>$(`white`,Q.WHITE),Fd=()=>Q.TRANSPARENT,Id=()=>$(`focus-checked`,Q.FOCUS_CHECKED),Ld=()=>$(`focus-checked-border`,Q.FOCUS_CHECKED_BORDER),Rd=()=>$(`focus-unchecked`,Q.FOCUS_UNCHECKED),zd=()=>$(`focus-unchecked-border`,Q.FOCUS_UNCHECKED_BORDER),Bd=()=>$(`button-focus-outline`,Q.BUTTON_FOCUS_OUTLINE),Vd=()=>$(`blue-grey-100`,Q.BLUE_GREY100),Hd=()=>$(`blue-grey-300`,Q.BLUE_GREY300),Ud=()=>$(`blue-grey-600`,Q.BLUE_GREY600),Wd=()=>$(`blue-grey-900`,Q.BLUE_GREY900),Gd=()=>$(`keypad-button`,Q.KEYPAD_BUTTON),Kd=()=>$(`keypad-button-operator`,Q.KEYPAD_BUTTON_OPERATOR),qd=()=>$(`keypad-empty-placeholder`,Q.KEYPAD_EMPTY_PLACEHOLDER),Jd=()=>$(`keypad-button-hover`,Q.KEYPAD_BUTTON_HOVER),Yd=()=>$(`keypad-button-operator-hover`,Q.KEYPAD_BUTTON_OPERATOR_HOVER),Xd=()=>$(`keyboard-focus-indicator`,Q.KEY_BOARD_FOCUS_INDICATOR),Zd=()=>$(`button-border`,Q.BUTTON_BORDER),Qd=()=>$(`button-hover-bg`,Q.BUTTON_HOVER_BG),$d={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},ef=Y(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),tf=Y(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${Qu()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${td()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${ad()})`}}),nf=Y(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),rf=class extends L.Component{static propTypes={correctness:F.string,feedback:F.string};nodeRef=L.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,R.jsx)(dc,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,R.jsx)(nf,{ref:this.nodeRef,children:(0,R.jsx)(ef,{children:(0,R.jsx)(tf,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,R.jsx)(`div`,{children:(0,R.jsx)(yc,{children:this.renderFeedback()})})}},af=()=>{};function of(){let e=function(){};return e.enabled=!1,e.log=af,e.extend=()=>e,e.destroy=af,e}of.log=af,of.enable=af,of.disable=()=>``,of.enabled=()=>!1;var sf=s({Correct:()=>pf,Incorrect:()=>mf,NothingSubmitted:()=>gf,PartiallyCorrect:()=>hf}),cf=of(`pie-libs:render-ui:response-indicators`),lf=Y(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),uf=Y(Ku)({cursor:`pointer`}),df=Y(`div`)({padding:`0`,borderRadius:`4px`}),ff=(e,t)=>{class n extends L.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{cf(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,R.jsxs)(lf,{hasFeedback:!!n,children:[(0,R.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,R.jsx)(e,{})}),n&&(0,R.jsx)(uf,{PaperComponent:df,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,R.jsx)(rf,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:F.string},n},pf=ff(Ol,`correct`),mf=ff(jl,`incorrect`),hf=ff(Rl,`partially-correct`),gf=ff(Fl,`nothing-submitted`);function _f(e){return Mi(`MuiCollapse`,e)}Ni(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var vf=e=>{let{orientation:t,classes:n}=e;return Oe({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},_f,n)},yf=Y(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(ls(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),bf=Y(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),xf=Y(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Sf=L.forwardRef(function(e,t){let n=us({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=ko.standard,TransitionComponent:x=sc,...S}=n,C={...n,orientation:g,collapsedSize:o},w=vf(C),T=os(),E=Cc(),D=L.useRef(null),O=L.useRef(),k=typeof o==`number`?`${o}px`:o,ee=g===`horizontal`,A=ee?`width`:`height`,j=L.useRef(null),te=Ms(t,j),M=()=>D.current?D.current[ee?`clientWidth`:`clientHeight`]:0,ne=Vl(j,(e,t)=>{D.current&&ee&&(D.current.style.position=`absolute`),e.style[A]=k,u&&u(e,t)}),N=Vl(j,(e,t)=>{let n=M();D.current&&ee&&(D.current.style.position=``);let{duration:r,easing:i}=Ul({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[A]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),P=Vl(j,(e,t)=>{e.style[A]=`auto`,d&&d(e,t)}),re=Vl(j,e=>{e.style[A]=`${M()}px`,p&&p(e)}),ie=Vl(j,m),ae=Vl(j,e=>{let t=M(),{duration:n,easing:r}=Ul({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[A]=k,e.style.transitionTimingFunction=r,h&&h(e)}),oe=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(j.current,e)},se={slots:_,slotProps:v,component:s},[ce,le]=qc(`root`,{ref:te,className:I(w.root,a),elementType:yf,externalForwardedProps:se,ownerState:C,additionalProps:{style:{[ee?`minWidth`:`minHeight`]:k,...y}}}),[ue,de]=qc(`wrapper`,{ref:D,className:w.wrapper,elementType:bf,externalForwardedProps:se,ownerState:C}),[fe,pe]=qc(`wrapperInner`,{className:w.wrapperInner,elementType:xf,externalForwardedProps:se,ownerState:C});return(0,R.jsx)(x,{in:l,onEnter:ne,onEntered:P,onEntering:N,onExit:re,onExited:ie,onExiting:ae,addEndListener:oe,nodeRef:j,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,R.jsx)(ce,{...le,className:I(le.className,{entered:w.entered,exited:!l&&k===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,R.jsx)(ue,{...de,ownerState:r,children:(0,R.jsx)(fe,{...pe,ownerState:r,children:i})})})}})});Sf&&(Sf.muiSupportAuto=!0);var Cf=Y(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),wf=Y(Sf)(({theme:e})=>({paddingTop:e.spacing(2)})),Tf=class extends L.Component{static propTypes={className:F.string,children:F.object,labels:F.shape({visible:F.string,hidden:F.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){he(this.root)}componentDidUpdate(){he(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,R.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,R.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,R.jsx)(Cf,{children:r})}),(0,R.jsx)(wf,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function Ef(e){return typeof e.main==`string`}function Df(e,t=[]){if(!Ef(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Of(e=[]){return([,t])=>t&&Df(t,e)}function kf(e){return Mi(`MuiCircularProgress`,e)}Ni(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]);var Af=44,jf=Xr`
119
119
  0% {
120
120
  transform: rotate(0deg);
121
121
  }
package/module/print.js CHANGED
@@ -11789,7 +11789,7 @@ var Fc = /* @__PURE__ */ l(S(), 1), Ic = Object.defineProperty, Lc = (e, t) => {
11789
11789
  FOCUS_UNCHECKED_BORDER: "#757575",
11790
11790
  BUTTON_FOCUS_OUTLINE: "#3B82F6",
11791
11791
  BLUE_GREY100: "#F3F5F7",
11792
- BLUE_GREY300: "#C0C3CF",
11792
+ BLUE_GREY300: "#81848F",
11793
11793
  BLUE_GREY600: "#7E8494",
11794
11794
  BLUE_GREY900: "#152452",
11795
11795
  FADED_PRIMARY: "#DCDAFB",