@pie-element/math-inline 13.0.3-next.20261007181944 → 13.0.3-next.20261007184841
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.
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/{dist-CgDAeXp9.js → dist-LPvTQqRx.js} +2655 -2423
- package/dist/browser/dist-LPvTQqRx.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{dist-CZIjT7aL.js → dist-C-gN9Y6a.js} +2655 -2423
- package/dist/browser/editor-runtime/dist-C-gN9Y6a.js.map +1 -0
- package/dist/browser/editor-runtime/{main-CrmpBTh7.js → main-S1lX6mNl.js} +2 -2
- package/dist/browser/editor-runtime/{main-CrmpBTh7.js.map → main-S1lX6mNl.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{main-BWFOX6Ix.js → main-ZcSHMm0i.js} +2 -2
- package/dist/browser/{main-BWFOX6Ix.js.map → main-ZcSHMm0i.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/index.iife.js +49 -49
- package/module/print.js +3076 -2844
- package/module/print.js.map +1 -1
- package/package.json +8 -8
- package/dist/browser/dist-CgDAeXp9.js.map +0 -1
- package/dist/browser/editor-runtime/dist-CZIjT7aL.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as e } from "./rolldown-runtime-DgMJErsw.js";
|
|
2
2
|
import { d as t, p as n, t as r } from "./dist-w6lPOmAs.js";
|
|
3
|
-
import { C as i, H as a, L as o, M as s, R as c, S as l, T as u, _ as d, _t as f, f as ee, ft as p, g as m, h, ht as g, jt as _, m as v, mt as y, n as b, pt as x, u as te, v as S, w as C } from "./dist-
|
|
3
|
+
import { C as i, H as a, L as o, M as s, R as c, S as l, T as u, _ as d, _t as f, f as ee, ft as p, g as m, h, ht as g, jt as _, m as v, mt as y, n as b, pt as x, u as te, v as S, w as C } from "./dist-C-gN9Y6a.js";
|
|
4
4
|
import w, { useRef as T } from "react";
|
|
5
5
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
6
6
|
import ne from "react-dom";
|
|
@@ -992,4 +992,4 @@ var De = f(de)(() => ({
|
|
|
992
992
|
//#endregion
|
|
993
993
|
export { Te as t };
|
|
994
994
|
|
|
995
|
-
//# sourceMappingURL=main-
|
|
995
|
+
//# sourceMappingURL=main-S1lX6mNl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-CrmpBTh7.js","names":[],"sources":["../../../../../lib-react/correct-answer-toggle/dist/expander.js","../../../../../lib-react/icons/dist/correct-response-icon.js","../../../../../lib-react/correct-answer-toggle/dist/index.js","../../../src/delivery/utils.ts","../../../src/delivery/simple-question-block.tsx","../../../src/delivery/main.tsx"],"sourcesContent":["import { styled as e } from \"@mui/material/styles\";\nimport { CSSTransition as t } from \"react-transition-group\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { useRef as r } from \"react\";\nimport i from \"prop-types\";\n//#region src/expander.tsx\nvar a = \"height ease-in 300ms, opacity ease-in 300ms\", o = e(\"div\")(() => ({\n\tposition: \"relative\",\n\theight: 0,\n\toverflow: \"hidden\",\n\tdisplay: \"flex\",\n\tvisibility: \"hidden\",\n\twidth: 0,\n\t\"&.enter\": {\n\t\ttransition: a,\n\t\topacity: 1,\n\t\theight: \"auto\",\n\t\twidth: \"auto\",\n\t\tvisibility: \"visible\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.enter-done\": {\n\t\theight: \"auto\",\n\t\tvisibility: \"visible\",\n\t\twidth: \"auto\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.exit\": {\n\t\ttransition: a,\n\t\topacity: 0,\n\t\theight: 0,\n\t\tvisibility: \"visible\",\n\t\twidth: 0\n\t},\n\t\"&.exit-done\": {\n\t\topacity: 0,\n\t\tvisibility: \"hidden\",\n\t\theight: 0,\n\t\twidth: 0\n\t}\n})), s = (e) => {\n\tlet { show: i, children: a, className: s } = e, c = r(null);\n\treturn /* @__PURE__ */ n(t, {\n\t\tnodeRef: c,\n\t\tin: i,\n\t\tappear: !0,\n\t\tmountOnEnter: !1,\n\t\ttimeout: 300,\n\t\tclassNames: {\n\t\t\tenter: \"enter\",\n\t\t\tenterDone: \"enter-done\",\n\t\t\texit: \"exit\",\n\t\t\texitDone: \"exit-done\"\n\t\t},\n\t\tchildren: /* @__PURE__ */ n(o, {\n\t\t\tref: c,\n\t\t\tclassName: s,\n\t\t\tchildren: a\n\t\t})\n\t});\n};\ns.propTypes = {\n\tshow: i.bool.isRequired,\n\tclassName: i.string,\n\tchildren: i.oneOfType([i.arrayOf(i.node), i.node]).isRequired\n};\n//#endregion\nexport { s as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { jsx as t, jsxs as n } from \"react/jsx-runtime\";\nimport { styled as r } from \"@mui/material/styles\";\n//#region src/correct-response-icon.tsx\nvar i = ({ bgFill: e, fgFill: r }) => /* @__PURE__ */ n(\"svg\", {\n\t\"aria-hidden\": \"true\",\n\tfocusable: \"false\",\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-283 359 34 35\",\n\tstyle: { enableBackground: \"new -283 359 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-266\",\n\t\t\tcy: \"375.9\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\ni.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired\n};\nvar a = ({ bgFill: e, fgFill: r, borderFill: i }) => /* @__PURE__ */ n(\"svg\", {\n\t\"aria-hidden\": \"true\",\n\tfocusable: \"false\",\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-129.5 127 34 35\",\n\tstyle: { enableBackground: \"new -129.5 127 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#D0CAC5\",\n\t\t\t\tstroke: \"#E6E3E0\",\n\t\t\t\tstrokeWidth: .75,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\\n C-97.4,153.5-104.3,160.4-112.9,160.4z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#B3ABA4\",\n\t\t\t\tstroke: \"#CDC7C2\",\n\t\t\t\tstrokeWidth: .5,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-114.2\",\n\t\t\tcy: \"143.5\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\",\n\t\t\tfill: i\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\na.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired,\n\tborderFill: e.string.isRequired\n};\nvar o = r(\"div\")(({ size: e }) => ({\n\twidth: e || \"25px\",\n\theight: e || \"25px\"\n})), s = ({ open: e, size: n }) => /* @__PURE__ */ t(o, {\n\tsize: n,\n\tchildren: e ? /* @__PURE__ */ t(i, {\n\t\tbgFill: \"#bce2ff\",\n\t\tfgFill: \"#1a9cff\"\n\t}) : /* @__PURE__ */ t(a, {\n\t\tbgFill: \"white\",\n\t\tfgFill: \"#1a9cff\",\n\t\tborderFill: \"#bce2ff\"\n\t})\n});\ns.propTypes = {\n\topen: e.bool,\n\tsize: e.string\n}, s.defaultProps = { open: !1 };\n//#endregion\nexport { s as default };\n","import e from \"./expander.js\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { CSSTransition as n } from \"react-transition-group\";\nimport { CorrectResponse as r } from \"@pie-lib/icons\";\nimport * as i from \"@pie-lib/render-ui\";\nimport { Readable as a, color as o } from \"@pie-lib/render-ui\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\nimport l from \"react\";\nimport u from \"prop-types\";\nimport d from \"@pie-lib/translator\";\n//#region src/index.tsx\nfunction f(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction p(e, t) {\n\treturn !e || f(e) ? e : f(e.default) ? e.default : t && f(e[t]) ? e[t] : t && f(e[t]?.default) ? e[t].default : e;\n}\nvar m = p(a, \"Readable\") || p(_.Readable, \"Readable\"), h = i, g = h.default, _ = g && typeof g == \"object\" ? g : h, { translator: v } = d, y = {\n\tWebkitTouchCallout: \"none\",\n\tWebkitUserSelect: \"none\",\n\tKhtmlUserSelect: \"none\",\n\tMozUserSelect: \"none\",\n\tmsUserSelect: \"none\",\n\tuserSelect: \"none\"\n}, b = t(\"div\")(() => ({\n\twidth: \"100%\",\n\tcursor: \"pointer\"\n})), x = t(\"button\")(() => ({\n\tmargin: \"0 auto\",\n\ttextAlign: \"center\",\n\tdisplay: \"flex\",\n\tminWidth: \"24px\",\n\tminHeight: \"24px\",\n\tpadding: 0,\n\tborder: 0,\n\tbackground: \"none\",\n\tcolor: \"inherit\",\n\tfont: \"inherit\",\n\tcursor: \"pointer\",\n\t\"&:focus-visible\": {\n\t\toutline: `2px solid ${o.buttonFocusOutline()}`,\n\t\toutlineOffset: \"-2px\"\n\t}\n})), S = t(\"div\")(() => ({\n\twidth: \"fit-content\",\n\tminWidth: \"140px\",\n\talignSelf: \"center\",\n\tverticalAlign: \"middle\",\n\tcolor: `var(--correct-answer-toggle-label-color, ${o.text()})`,\n\tfontWeight: \"normal\",\n\t...y\n})), C = t(\"div\")(() => ({\n\tposition: \"absolute\",\n\twidth: \"25px\",\n\t\"&.enter\": { opacity: \"0\" },\n\t\"&.enter-active\": {\n\t\topacity: \"1\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t},\n\t\"&.exit\": { opacity: \"1\" },\n\t\"&.exit-active\": {\n\t\topacity: \"0\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t}\n})), w = t(\"div\")(() => ({\n\twidth: \"25px\",\n\tmarginRight: \"5px\",\n\tdisplay: \"flex\",\n\talignItems: \"center\"\n})), T = class t extends l.Component {\n\tstatic propTypes = {\n\t\tonToggle: u.func,\n\t\ttoggled: u.bool,\n\t\tshow: u.bool,\n\t\thideMessage: u.string,\n\t\tshowMessage: u.string,\n\t\tclassName: u.string,\n\t\tlanguage: u.string\n\t};\n\tstatic defaultProps = {\n\t\tshowMessage: \"Show correct answer\",\n\t\thideMessage: \"Hide correct answer\",\n\t\tshow: !1,\n\t\ttoggled: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.state = { show: e.show }, this.openIconRef = l.createRef(), this.closedIconRef = l.createRef(), t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t};\n\t}\n\tonClick() {\n\t\tthis.props.onToggle(!this.props.toggled);\n\t}\n\tonTouch(e) {\n\t\te.preventDefault(), this.props.onToggle(!this.props.toggled);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tthis.setState({ show: e.show }), e.language !== this.props?.language && (t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t});\n\t}\n\trender() {\n\t\tlet { className: t, toggled: i, hideMessage: a, showMessage: o } = this.props;\n\t\treturn /* @__PURE__ */ s(b, {\n\t\t\tclassName: t,\n\t\t\tchildren: /* @__PURE__ */ s(e, {\n\t\t\t\tshow: this.state.show,\n\t\t\t\tchildren: /* @__PURE__ */ c(x, {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\"aria-pressed\": !!i,\n\t\t\t\t\tonClick: this.onClick.bind(this),\n\t\t\t\t\tonTouchEnd: this.onTouch.bind(this),\n\t\t\t\t\tchildren: [/* @__PURE__ */ c(w, { children: [/* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.openIconRef,\n\t\t\t\t\t\ttimeout: 400,\n\t\t\t\t\t\tin: i,\n\t\t\t\t\t\texit: !i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.openIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-open\")\n\t\t\t\t\t\t})\n\t\t\t\t\t}), /* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.closedIconRef,\n\t\t\t\t\t\ttimeout: 5e3,\n\t\t\t\t\t\tin: !i,\n\t\t\t\t\t\texit: i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.closedIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-closed\")\n\t\t\t\t\t\t})\n\t\t\t\t\t})] }), /* @__PURE__ */ s(m, {\n\t\t\t\t\t\tfalse: !0,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(S, {\n\t\t\t\t\t\t\t\"aria-hidden\": !this.state.show,\n\t\t\t\t\t\t\tchildren: i ? a : o\n\t\t\t\t\t\t})\n\t\t\t\t\t})]\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n};\n//#endregion\nexport { T as CorrectAnswerToggle, T as default };\n","// @ts-nocheck\n\nexport const ResponseTypes = {\n advanced: 'Advanced Multi',\n simple: 'Simple',\n};\n","// @ts-nocheck\n\nimport React from 'react';\nimport { MathToolbar } from '@pie-lib/math-toolbar';\nimport { mq } from '@pie-lib/math-input';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport { color, createUniqueId } from '@pie-lib/render-ui';\n\nconst Expression: any = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n padding: theme.spacing(1),\n}));\n\nconst Static: any = styled('div', {\n shouldForwardProp: (prop) => !['isCorrect', 'isIncorrect'].includes(prop),\n})(({ theme, isCorrect, isIncorrect }) => ({\n color: color.text(),\n background: color.background(),\n border: isCorrect\n ? `2px solid ${color.correct()} !important`\n : isIncorrect\n ? `2px solid ${color.incorrect()} !important`\n : `1px solid ${color.primaryLight()}`,\n width: 'fit-content',\n fontSize: '1rem',\n padding: isCorrect || isIncorrect ? theme.spacing(1) : theme.spacing(0.5),\n letterSpacing: (isCorrect || isIncorrect) ? '0.5px' : 'normal',\n '& > .mq-math-mode': {\n '& > .mq-hasCursor': {\n '& > .mq-cursor': {\n display: 'none',\n },\n },\n },\n}));\n\n// CSS for MathToolbar classNames (used as strings)\nif (typeof document !== 'undefined') {\n const styleId = 'math-inline-simple-question-styles';\n if (!document.getElementById(styleId)) {\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n .response-editor {\n display: flex;\n justify-content: center;\n width: auto;\n max-width: fit-content;\n height: auto;\n text-align: left;\n padding: 8px;\n }\n .response-editor.mq-math-mode {\n border: 1px solid ${color.primaryLight()};\n }\n `;\n document.head.appendChild(style);\n }\n}\n\nexport class SimpleQuestionBlock extends React.Component {\n static propTypes = {\n onSimpleResponseChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n emptyResponse: PropTypes.bool,\n session: PropTypes.object.isRequired,\n showCorrect: PropTypes.bool,\n onSubFieldFocus: PropTypes.func.isRequired,\n showKeypad: PropTypes.bool.isRequired,\n };\n\n constructor(props) {\n super(props);\n\n // A timestamp repeats when two items construct in the same millisecond, and the toolbar is\n // looked up in the whole document.\n this.mathToolBarId = createUniqueId('math-toolbar');\n }\n\n mathToolBarContainsTarget = (e) => document.getElementById(this.mathToolBarId).contains(e.target);\n\n handleClick: any = (e) => {\n try {\n if (!this.mathToolBarContainsTarget(e)) {\n this.setState({ showKeypad: false });\n }\n } catch (e) {\n // console.log(e.toString());\n }\n };\n\n onFocus: any = () => {\n const { onSubFieldFocus } = this.props;\n\n onSubFieldFocus(this.mathToolBarId);\n };\n\n render() {\n const { model, showCorrect, session, emptyResponse,onSimpleResponseChange, showKeypad } = this.props;\n const { config, disabled, correctness } = model || {};\n\n if (!config) {\n return;\n }\n\n const correct = correctness && correctness.correct;\n const { responses, equationEditor } = config;\n\n return (\n <Expression data-keypad={true}>\n {showCorrect || disabled ? (\n <Static\n isIncorrect={!emptyResponse && !correct && !showCorrect}\n isCorrect={!emptyResponse && (correct || showCorrect)}\n >\n <mq.Static\n latex={showCorrect ? responses && responses.length && responses[0].answer : session.response || ''}\n />\n </Static>\n ) : (\n <div id={this.mathToolBarId}>\n <MathToolbar\n classNames={{ editor: 'response-editor' }}\n latex={session.response}\n keypadMode={equationEditor}\n onChange={onSimpleResponseChange}\n onDone={() => {}}\n onFocus={this.onFocus}\n controlledKeypad={true}\n showKeypad={showKeypad}\n hideDoneButton={true}\n />\n </div>\n )}\n </Expression>\n );\n }\n}\n\nexport default SimpleQuestionBlock;\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\nimport { mq, HorizontalKeypad, updateSpans, registerEmbed, applyStaticMath } from '@pie-lib/math-input';\nimport { Feedback as FeedbackImport, Collapsible as CollapsibleImport, Readable as ReadableImport, hasText, hasMedia, PreviewPrompt as PreviewPromptImport, UiLayout as UiLayoutImport } 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 PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Readable = unwrapReactInteropSymbol(ReadableImport, 'Readable') || unwrapReactInteropSymbol(renderUi.Readable, 'Readable');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nconst Feedback = unwrapReactInteropSymbol(FeedbackImport, 'Feedback') || unwrapReactInteropSymbol(renderUi.Feedback, 'Feedback');\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;\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport { styled } from '@mui/material/styles';\nimport Tooltip from '@mui/material/Tooltip';\nimport { ResponseTypes } from './utils.js';\nimport { isEmpty, isEqual } from '@pie-element/shared-lodash';\nimport SimpleQuestionBlock from './simple-question-block.js';\nimport { color, createUniqueId } from '@pie-lib/render-ui';\nimport Translator from '@pie-lib/translator';\nimport ReactDOM from 'react-dom';\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nconst { translator } = Translator;\nlet registered = false;\n\nconst NEWLINE_LATEX = /\\\\newline/g;\nconst REGEX = /{{response}}/gm;\nconst DEFAULT_KEYPAD_VARIANT = 6;\n\n// !!! If you're using Chrome but have selected the \"iPad\" device in Chrome Developer Tools, the navigator.userAgent string may still report as\n// Safari because Chrome on iOS actually uses the Safari rendering engine under the hood due to Apple's restrictions on third-party browser engines.\n// When you select the \"iPad\" device in Chrome Developer Tools, you're essentially emulating the behavior of Safari on an iPad, including the user agent string.\n// Therefore, even though you're using Chrome, the user agent string will resemble that of Safari on an iPad.\n// Since the regular expression /^((?!chrome|android).)*safari/i checks for the presence of \"safari\" in the user agent string while excluding \"chrome\" and \"android\",\n// it will return true in this case because \"safari\" is present in the user agent string emulated by Chrome when in iPad mode.\nconst IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nfunction generateAdditionalKeys(keyData = []) {\n return keyData.map((key) => ({\n name: key,\n latex: key,\n write: key,\n label: key,\n }));\n}\n\nfunction isChildOfCurrentPieElement(child, parent) {\n let node = child;\n while (node !== null) {\n if (parent && node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\nfunction getKeyPadWidth(additionalKeys = [], equationEditor) {\n return Math.floor(additionalKeys.length / 5) * 30 + (equationEditor === 'miscellaneous' ? 600 : 500);\n}\n\nfunction prepareForStatic(model, state) {\n const { config, disabled } = model || {};\n const { expression, responses, printMode, alwaysShowCorrect } = config || {};\n\n if (config && expression) {\n const modelExpression = expression;\n\n if (state.showCorrect) {\n return responses && responses.length && responses[0].answer;\n }\n\n let answerBlocks = 1; // assume one at least\n // build out local state model using responses declared in expression\n\n return (modelExpression || '')\n .replace(REGEX, function () {\n const answer = state.session.answers[`r${answerBlocks}`];\n\n if (printMode && !alwaysShowCorrect) {\n const blankSpace = '\\\\ \\\\ '.repeat(30) + '\\\\newline ';\n\n return `\\\\MathQuillMathField[r${answerBlocks++}]{${blankSpace.repeat(3)}}`;\n }\n\n if (disabled) {\n return `\\\\embed{answerBlock}[r${answerBlocks++}]`;\n }\n\n return `\\\\MathQuillMathField[r${answerBlocks++}]{${(answer && answer.value) || ''}}`;\n })\n .replace(NEWLINE_LATEX, '\\\\embed{newLine}[]');\n }\n}\n\nfunction parseAnswers(session, model) {\n const answers = {};\n\n if (model.config && model.config.expression) {\n let answerBlocks = 1; // assume one at least\n // build out local state model using responses declared in expression\n\n (model.config.expression || '').replace(REGEX, () => {\n answers[`r${answerBlocks}`] = {\n value:\n (session &&\n session.answers &&\n session.answers[`r${answerBlocks}`] &&\n session.answers[`r${answerBlocks}`].value) ||\n '',\n };\n\n answerBlocks += 1;\n });\n }\n return answers;\n}\n\nexport class Main extends React.Component {\n static propTypes = {\n session: PropTypes.object.isRequired,\n onSessionChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n const { model, session } = props;\n const answers = parseAnswers(session, model);\n\n this.state = {\n session: { ...props.session, answers },\n activeAnswerBlock: '',\n showCorrect: this.props.model.config.alwaysShowCorrect || false,\n tooltipContainerRef: React.createRef(),\n };\n this.instructionsIdPrefix = createUniqueId('math-inline-instructions');\n }\n\n UNSAFE_componentWillMount() {\n if (typeof window !== 'undefined') {\n if (!registered) {\n // The embed is registered once for every item on the page, so it marks each block by its\n // response id rather than taking it as a DOM id, which a second item would repeat.\n registerEmbed('answerBlock', (data) => {\n const classNames = getBlockClassNames();\n return {\n htmlString: `<div class=\"${classNames.blockContainer}\">\n <div class=\"${classNames.blockResponse}\" data-answer-block-index=\"${data}\">R</div>\n <div class=\"${classNames.blockMath}\">\n <span data-answer-block=\"${data}\"></span>\n </div>\n </div>`,\n text: () => 'text',\n latex: () => `\\\\embed{answerBlock}[${data}]`,\n };\n });\n\n registered = true;\n }\n }\n }\n\n handleAnswerBlockDomUpdate: any = () => {\n const { model } = this.props;\n const { session, showCorrect } = this.state;\n const answers = session.answers;\n\n if (this.root && model.disabled && !showCorrect) {\n Object.keys(answers).forEach((answerId) => {\n const el = this.root.querySelector(`[data-answer-block=\"${answerId}\"]`);\n const indexEl = this.root.querySelector(`[data-answer-block-index=\"${answerId}\"]`);\n // const correct = model.correctness && model.correctness.correct;\n\n if (el) {\n const answer = answers[answerId];\n\n applyStaticMath(el, (answer && answer.value) || '');\n\n if (!model.view) {\n // for now, we're not going to be showing individual response correctness\n // TODO re-attach the classes once we are\n // el.parentElement.parentElement.classList.add(\n // correct ? 'correct' : 'incorrect'\n // );\n } else {\n el.parentElement.parentElement.classList.remove('correct');\n el.parentElement.parentElement.classList.remove('incorrect');\n }\n\n // For now, we're not going to be indexing response blocks\n // TODO go back to indexing once we support individual response correctness\n // indexEl.textContent = `R${idx + 1}`;\n indexEl.textContent = 'R';\n }\n });\n }\n\n renderMath(this.root);\n };\n\n countResponseOccurrences(expression) {\n const pattern = /\\{\\{response\\}\\}/g;\n const matches = expression?.match(pattern);\n\n return matches ? matches.length : 0;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { config } = this.props.model;\n const { config: nextConfig = {} } = nextProps.model || {};\n\n const { session } = this.props;\n const { session: nextSession = {} } = nextProps || {};\n\n // in case session props changed in parent, we need to catch this and update local state\n // example: when env is changing in pieoneer\n if (session && nextSession && !isEqual(session.answers, nextSession.answers)) {\n this.setState({\n session: { ...nextSession, answers: parseAnswers(nextSession, this.props.model) },\n });\n }\n\n // check if the note is the default one for prev language and change to the default one for new language\n // this check is necessary in order to diferanciate between default and authour defined note\n // and only change between languages for default ones\n if (\n config.note &&\n config.language &&\n config.language !== nextConfig.language &&\n config.note === translator.t('mathInline.primaryCorrectWithAlternates', { lng: config.language })\n ) {\n config.note = translator.t('mathInline.primaryCorrectWithAlternates', { lng: nextConfig.language });\n }\n\n if ((config.env && config.env.mode !== 'evaluate') || (nextConfig.env && nextConfig.env.mode !== 'evaluate')) {\n this.setState({ ...this.state.session, showCorrect: false });\n }\n\n if (nextConfig.alwaysShowCorrect) {\n this.setState({ showCorrect: true });\n }\n\n if (this.countResponseOccurrences(config.expression) < this.countResponseOccurrences(nextConfig.expression)) {\n setTimeout(() => this.updateAria(), 100);\n }\n\n if (\n (config && config.responses && config.responses.length !== nextConfig.responses.length) ||\n (!config && nextConfig && nextConfig.responses) ||\n (config && nextConfig && config.expression !== nextConfig.expression)\n ) {\n const newAnswers = {};\n const answers = this.state.session.answers;\n\n let answerBlocks = 1; // assume one at least\n\n // build out local state model using responses declared in expression\n (nextConfig.expression || '').replace(REGEX, () => {\n newAnswers[`r${answerBlocks}`] = {\n value: (answers && answers[`r${answerBlocks}`] && answers[`r${answerBlocks}`].value) || '',\n };\n answerBlocks++;\n });\n\n this.setState(\n (state) => ({\n session: {\n ...state.session,\n completeAnswer: this.mqStatic && this.mqStatic.mathField.latex(),\n answers: newAnswers,\n },\n }),\n this.handleAnswerBlockDomUpdate,\n );\n }\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n const sameModel = isEqual(this.props.model, nextProps.model);\n const sameState = isEqual(this.state, nextState);\n\n return !sameModel || !sameState;\n }\n\n componentDidMount() {\n this.handleAnswerBlockDomUpdate();\n this.updateAria();\n setTimeout(() => renderMath(this.root), 100);\n }\n\n componentDidUpdate(prevProps, prevState) {\n this.handleAnswerBlockDomUpdate();\n\n const prevResponseType = prevProps.model?.config?.responseType;\n const currentResponseType = this.props.model?.config?.responseType;\n\n if (prevResponseType !== currentResponseType || prevProps.model?.language !== this.props.model?.language) {\n this.updateAria();\n }\n }\n\n updateAria: any = () => {\n if (this.root) {\n // Update aria-hidden for .mq-selectable elements\n const selectableElements = this.root.querySelectorAll('.mq-selectable');\n selectableElements.forEach((elem) => elem.setAttribute('aria-hidden', 'true'));\n\n // Describe the keypad shortcuts on each textarea; @pie-lib/math-input names it\n const instructions = translator.t('mathInline.keypadInstructions', { lng: this.props.model?.language });\n const textareaElements = this.root.querySelectorAll('textarea');\n textareaElements.forEach((elem, index) => {\n const instructionsId = `${this.instructionsIdPrefix}-${index}`;\n\n // Find the parent element that contains the textarea\n const parent = elem.closest('.mq-textarea');\n\n if (parent) {\n // Create or find the instructions element within the parent\n let instructionsElement = parent.querySelector(`#${instructionsId}`);\n\n if (!instructionsElement) {\n instructionsElement = document.createElement('span');\n instructionsElement.id = instructionsId;\n instructionsElement.className = 'sr-only';\n parent.insertBefore(instructionsElement, elem);\n }\n\n instructionsElement.textContent = instructions;\n elem.setAttribute('aria-describedby', instructionsId);\n }\n });\n }\n };\n\n focusFirstKeypadElement: any = () => {\n setTimeout(() => {\n const keypadElement = document.querySelector('[data-keypad]');\n\n if (keypadElement) {\n const firstButton = keypadElement.querySelector(\"button, [role='button']\");\n\n if (firstButton) {\n firstButton.focus();\n }\n }\n }, 0);\n };\n\n handleKeyDown: any = (event, id) => {\n const isTrigerredFromActualPieElement = isChildOfCurrentPieElement(event.target, this.root);\n const isAnswerInputFocused =\n this.mqStatic && this.mqStatic.inputRef?.current\n ? this.mqStatic.inputRef?.current.contains(document.activeElement)\n : !!document.activeElement?.closest('.mq-editable-field');\n const { key, type } = event;\n const isClickOrTouchEvent = type === 'click' || type === 'touchstart';\n\n if (isAnswerInputFocused && (key === 'ArrowDown' || isClickOrTouchEvent)) {\n if (this.state.activeAnswerBlock !== id && isTrigerredFromActualPieElement) {\n this.cleanupKeyDownListener();\n this.setState({ activeAnswerBlock: id }, () => {\n this.onSubFieldFocus(id);\n if (key === 'ArrowDown') {\n this.focusFirstKeypadElement();\n }\n });\n }\n } else if (event.key === 'Escape') {\n this.setState({ activeAnswerBlock: '' });\n }\n };\n\n onSubFieldFocus: any = (id) => {\n if (!this.handleEvent) {\n this.handleEvent = (event) => {\n this.handleKeyDown(event, id);\n };\n\n document.addEventListener('keydown', this.handleEvent);\n document.addEventListener('click', this.handleEvent);\n document.addEventListener('touchstart', this.handleEvent);\n }\n };\n\n cleanupKeyDownListener: any = () => {\n if (this.handleEvent) {\n document.removeEventListener('keydown', this.handleEvent);\n document.removeEventListener('click', this.handleEvent);\n document.removeEventListener('touchstart', this.handleEvent);\n this.handleEvent = null;\n }\n };\n\n componentWillUnmount() {\n if (this.cleanupKeyDownListener) {\n this.cleanupKeyDownListener();\n }\n }\n\n onDone: any = () => {};\n\n onSimpleResponseChange: any = (response) => {\n this.setState((state) => ({ session: { ...state.session, response } }), this.callOnSessionChange);\n };\n\n toNodeData: any = (data) => {\n if (!data) {\n return;\n }\n\n const { type, value } = data;\n\n if (type === 'command' || type === 'cursor') {\n return data;\n } else if (type === 'answer') {\n return { type: 'answer', ...data };\n } else if (value === 'clear') {\n return { type: 'clear' };\n } else {\n return { type: 'write', value };\n }\n };\n\n setInput: any = (input) => {\n this.input = input;\n };\n\n onClick: any = (data) => {\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n const c = this.toNodeData(data);\n\n if (c.type === 'clear') {\n this.input.clear();\n } else if (c.type === 'command') {\n if (Array.isArray(c.value)) {\n c.value.forEach((vv) => {\n this.input.cmd(vv);\n });\n } else {\n this.input.cmd(c.value);\n }\n } else if (c.type === 'cursor') {\n this.input.keystroke(c.value);\n } else {\n this.input.write(c.value);\n }\n\n this.input.focus();\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n requestAnimationFrame(() => window.scrollTo(scrollX, scrollY));\n });\n };\n\n callOnSessionChange: any = () => {\n const { onSessionChange } = this.props;\n\n if (onSessionChange) {\n onSessionChange(this.state.session);\n }\n };\n\n toggleShowCorrect: any = (show) => {\n this.setState({ showCorrect: show }, this.handleAnswerBlockDomUpdate);\n };\n\n subFieldChanged: any = (name, subfieldValue) => {\n updateSpans();\n\n if (name) {\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n this.setState(\n (state) => ({\n session: {\n ...state.session,\n completeAnswer: this.mqStatic && this.mqStatic.mathField.latex(),\n answers: {\n ...state.session.answers,\n [name]: { value: subfieldValue },\n },\n },\n }),\n () => {\n this.callOnSessionChange();\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n },\n );\n }\n };\n\n getFieldName: any = (changeField, fields) => {\n const { answers } = this.state.session;\n\n if (Object.keys(answers || {}).length) {\n const keys = Object.keys(answers);\n\n return keys.find((k) => {\n const tf = fields[k];\n\n return tf && tf.id == changeField.id;\n });\n }\n };\n\n onBlur: any = (e) => {\n const { relatedTarget, currentTarget } = e || {};\n\n // our keypad is in tooltip\n // in this way we see if event was triggered from the keypad\n const isKeypadOpen = currentTarget && currentTarget.closest('[role=tooltip]');\n\n function getParentWithRoleTooltip(element, depth = 0) {\n // only run this max 16 times\n if (!element || depth >= 16) return null;\n\n const parent = element.offsetParent;\n\n if (!parent) return null;\n\n if (parent.getAttribute('role') === 'tooltip') {\n return parent;\n }\n\n return getParentWithRoleTooltip(parent, depth + 1);\n }\n\n function getDeepChildDataKeypad(element, depth = 0) {\n // only run this max 4 times\n if (!element || depth >= 4) return null;\n\n const child = element?.children?.[0];\n\n if (!child) return null;\n\n if (child.attributes && child.attributes['data-keypad']) {\n return child;\n }\n\n return getDeepChildDataKeypad(child, depth + 1);\n }\n\n const parentWithTooltipRole = getParentWithRoleTooltip(relatedTarget);\n const childWithDataKeypad = parentWithTooltipRole ? getDeepChildDataKeypad(parentWithTooltipRole) : null;\n\n if (!relatedTarget || !currentTarget || !childWithDataKeypad?.attributes['data-keypad']) {\n // if event was trigered from the keypad, avoid closing the keypad\n if (!isKeypadOpen) {\n this.setState({ activeAnswerBlock: '' });\n }\n }\n // else {\n // // Just for debugging purpose:\n // console.log('\\n\\nNew childWithDataKeypad', childWithDataKeypad);\n //\n // if (IS_SAFARI) {\n // // (IS_SAFARI && !relatedTarget?.offsetParent?.children[0]?.children[0]?.attributes?.['data-keypad'])\n // console.log('What was being used', relatedTarget?.offsetParent?.children[0]?.children[0]);\n // } else {\n // // (!IS_SAFARI && !relatedTarget?.offsetParent?.children[0]?.attributes?.['data-keypad']) ||\n // console.log('What was being used', relatedTarget?.offsetParent?.children[0]);\n // }\n // }\n };\n\n setTooltipRef(ref) {\n // Safari Hack: https://stackoverflow.com/a/42764495/5757635\n setTimeout(() => {\n if (ref && IS_SAFARI) {\n const div = document.querySelector(\"[role='tooltip']\");\n\n if (div) {\n const el = div.firstChild;\n el.setAttribute('tabindex', '-1');\n }\n }\n }, 1);\n }\n\n render() {\n const { model } = this.props;\n const { activeAnswerBlock, showCorrect, session, tooltipContainerRef } = this.state;\n const {\n config,\n correctness,\n disabled,\n extraCSSRules,\n view,\n teacherInstructions,\n rationale,\n feedback,\n animationsDisabled,\n printMode,\n alwaysShowCorrect,\n language,\n } = model || {};\n\n if (!config) {\n return null;\n }\n\n const {\n showNote,\n note,\n prompt,\n responses,\n responseType,\n equationEditor,\n customKeys,\n env: { mode, role } = {},\n } = config || {};\n const displayNote = (showCorrect || (mode === 'view' && role === 'instructor')) && showNote && note;\n const emptyResponse = isEmpty(responses);\n const showCorrectAnswerToggle = !emptyResponse && correctness && correctness.correctness !== 'correct';\n const tooltipModeEnabled = disabled && correctness;\n const additionalKeys = generateAdditionalKeys(customKeys);\n const correct = correctness && correctness.correct;\n const staticLatex = prepareForStatic(model, this.state) || '';\n const viewMode = disabled && !correctness;\n const studentPrintMode = printMode && !alwaysShowCorrect;\n const showRationale = rationale && (hasText(rationale) || hasMedia(rationale));\n const showTeacherInstructions =\n teacherInstructions && (hasText(teacherInstructions) || hasMedia(teacherInstructions));\n\n const printView = (\n <PrintContainer>\n <mq.Static\n className=\"static-math\"\n ref={(mqStatic) => {\n if (mqStatic) this.mqStatic = mqStatic;\n }}\n latex={staticLatex}\n language={language}\n onSubFieldChange={this.subFieldChanged}\n getFieldName={this.getFieldName}\n setInput={this.setInput}\n onSubFieldFocus={this.onSubFieldFocus}\n onBlur={this.onBlur}\n />\n </PrintContainer>\n );\n\n const midContent = (\n <MainContent>\n {mode === 'gather' && (\n <SrOnly>{translator.t('mathInline.mathEquationResponseQuestion', { lng: language })}</SrOnly>\n )}\n\n {viewMode &&\n showTeacherInstructions &&\n (!animationsDisabled ? (\n <StyledCollapsible labels={{ hidden: translator.t('common:showTeacherInstructions', { lng: language }), visible: translator.t('common:hideTeacherInstructions', { lng: language }) }}>\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(teacherInstructions) }} />\n </StyledCollapsible>\n ) : (\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(teacherInstructions) }} />\n ))}\n\n {prompt && (\n <PromptContainer>\n <PreviewPrompt prompt={prompt} />\n </PromptContainer>\n )}\n\n {studentPrintMode ? (\n printView\n ) : (\n <Readable false>\n <InputAndKeypadContainer tabIndex={0}>\n {responseType === ResponseTypes.simple && (\n <SimpleQuestionBlock\n onSimpleResponseChange={this.onSimpleResponseChange}\n showCorrect={showCorrect}\n emptyResponse={emptyResponse}\n model={model}\n session={session}\n onSubFieldFocus={this.onSubFieldFocus}\n showKeypad={!!activeAnswerBlock}\n />\n )}\n\n {responseType === ResponseTypes.advanced && (\n <Expression\n ref={tooltipContainerRef}\n isIncorrect={!emptyResponse && !correct && !showCorrect}\n isCorrect={!emptyResponse && (correct || showCorrect)}\n showCorrectness={!emptyResponse && disabled && correctness && !view}\n correctAnswerShown={showCorrect}\n printCorrect={printMode && alwaysShowCorrect}\n >\n <Tooltip\n ref={(ref) => this.setTooltipRef(ref)}\n enterTouchDelay={0}\n interactive\n open={!!activeAnswerBlock}\n slotProps={{\n popper: {\n container: tooltipContainerRef?.current || undefined,\n placement: 'bottom-start',\n sx: {\n backgroundColor: 'transparent',\n width: '650px',\n opacity: 1,\n '& .MuiTooltip-arrow': {\n display: 'none',\n },\n },\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: {\n boundary: 'viewport',\n padding: 8,\n },\n },\n {\n name: 'computeStyles',\n options: {\n adaptive: true,\n gpuAcceleration: true,\n },\n },\n {\n name: 'flip',\n enabled: false,\n },\n ],\n },\n tooltip: {\n sx: {\n fontSize: 'initial',\n backgroundColor: 'transparent',\n width: '600px',\n marginTop: 0,\n paddingTop: 0,\n boxShadow: 'none',\n },\n },\n }}\n title={Object.keys(session.answers).map(\n (answerId) =>\n (answerId === activeAnswerBlock && !(showCorrect || disabled) && (\n <ResponseContainer\n data-keypad={true}\n key={answerId}\n style={{\n // marginTop: this.mqStatic && this.mqStatic.input.offsetHeight - 20,\n width: getKeyPadWidth(additionalKeys, equationEditor),\n }}\n >\n <HorizontalKeypad\n additionalKeys={additionalKeys}\n mode={equationEditor || DEFAULT_KEYPAD_VARIANT}\n onClick={this.onClick}\n />\n </ResponseContainer>\n )) ||\n null,\n )}\n >\n <div>\n <mq.Static\n className=\"static-math\"\n ref={(mqStatic) => {\n if (mqStatic) this.mqStatic = mqStatic;\n }}\n latex={staticLatex}\n language={language}\n onSubFieldChange={this.subFieldChanged}\n getFieldName={this.getFieldName}\n setInput={this.setInput}\n onSubFieldFocus={this.onSubFieldFocus}\n onBlur={this.onBlur}\n />\n </div>\n </Tooltip>\n </Expression>\n )}\n </InputAndKeypadContainer>\n </Readable>\n )}\n\n {viewMode && displayNote && <Note dangerouslySetInnerHTML={{ __html: `<strong>Note:</strong> ${sanitizeModelHtml(note)}` }} />}\n\n {viewMode &&\n showRationale &&\n (!animationsDisabled ? (\n <Collapsible labels={{ hidden: translator.t('common:showRationale', { lng: language }), visible: translator.t('common:hideRationale', { lng: language }) }}>\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(rationale) }} />\n </Collapsible>\n ) : (\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(rationale) }} />\n ))}\n </MainContent>\n );\n\n if (tooltipModeEnabled && (showCorrectAnswerToggle || showTeacherInstructions || showRationale || feedback)) {\n return (\n <StyledUiLayout\n extraCSSRules={extraCSSRules}\n ref={(r) => {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(r);\n\n this.root = domNode || this.root;\n }}\n >\n <StyledTooltip\n interactive\n enterTouchDelay={0}\n placement=\"bottom-start\"\n slotProps={{\n tooltip: {\n sx: (theme) => ({\n background: `${color.primaryLight()} !important`,\n color: color.text(),\n padding: theme.spacing(2),\n border: `1px solid ${color.secondary()}`,\n fontSize: '16px',\n '& :not(.MathJax) > table tr': {\n '&:nth-child(2n)': {\n backgroundColor: 'unset !important',\n },\n },\n }),\n },\n popper: {\n sx: {\n opacity: 1,\n },\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 2],\n },\n },\n ],\n },\n }}\n title={\n <div>\n <MainContent>\n {showCorrectAnswerToggle && (\n <StyledCorrectAnswerToggle\n language={language}\n show\n toggled={showCorrect}\n onToggle={this.toggleShowCorrect}\n />\n )}\n </MainContent>\n\n {showTeacherInstructions && (\n <StyledCollapsible\n key=\"collapsible-teacher-instructions\"\n labels={{\n hidden: translator.t('common:showTeacherInstructions', { lng: language }),\n visible: translator.t('common:hideTeacherInstructions', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </StyledCollapsible>\n )}\n {displayNote && hasText(note) && (\n <StyledCollapsible\n key=\"collapsible-note\"\n labels={{\n hidden: translator.t('common:showNote', { lng: language }),\n visible: translator.t('common:hideNote', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={note} />\n </StyledCollapsible>\n )}\n\n {showRationale && (\n <StyledCollapsible\n key=\"collapsible-rationale\"\n labels={{\n hidden: translator.t('common:showRationale', { lng: language }),\n visible: translator.t('common:hideRationale', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={rationale} />\n </StyledCollapsible>\n )}\n\n {feedback && <Feedback correctness={correctness.correctness} feedback={feedback} />}\n </div>\n }\n >\n {midContent}\n </StyledTooltip>\n </StyledUiLayout>\n );\n }\n\n return (\n <StyledUiLayout\n extraCSSRules={extraCSSRules}\n ref={(r) => {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(r);\n\n this.root = domNode || this.root;\n }}\n >\n {midContent}\n </StyledUiLayout>\n );\n }\n}\n\n// Helper function to get class names for HTML string generation\nconst getBlockClassNames = () => {\n return {\n blockContainer: 'block-container',\n blockResponse: 'block-response',\n blockMath: 'block-math',\n };\n};\n\n// CSS for block classes used in HTML string generation\nif (typeof document !== 'undefined') {\n const styleId = 'math-inline-block-styles';\n if (!document.getElementById(styleId)) {\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n .block-container {\n margin: 8px !important;\n display: inline-flex;\n border: 2px solid grey !important;\n }\n .block-response {\n color: grey;\n background: #f5f5f5;\n font-size: 0.8rem !important;\n padding: 4px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 2px solid #bdbdbd !important;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n }\n .block-math {\n color: ${color.text()};\n background-color: ${color.background()};\n padding: 4px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n }\n .block-math > .mq-math-mode > .mq-hasCursor > .mq-cursor {\n display: none;\n }\n .sr-only {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n }\n .static-math > .mq-root-block > .mq-editable-field {\n border-color: ${color.text()};\n }\n `;\n document.head.appendChild(style);\n }\n}\n\nconst StyledUiLayout: any = styled(UiLayout)(() => ({\n color: color.text(),\n backgroundColor: color.background(),\n display: 'inline-block',\n}));\n\nconst StyledTooltip: any = styled(Tooltip)({\n // Styles applied via slotProps.sx below\n});\n\nconst PromptContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst MainContent: any = styled('div')({\n width: '100%',\n position: 'relative',\n backgroundColor: color.background(),\n color: color.text(),\n});\n\nconst Note: any = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n}));\n\nconst StyledCollapsible: any = styled(Collapsible)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst ResponseContainer: any = styled('div')(({ theme }) => ({\n zIndex: 10,\n minWidth: '400px',\n marginTop: theme.spacing(2),\n}));\n\nconst Expression: any = styled('div', {\n shouldForwardProp: (prop) =>\n !['isIncorrect', 'isCorrect', 'showCorrectness', 'correctAnswerShown', 'printCorrect'].includes(prop),\n})(({ theme, isIncorrect, isCorrect, showCorrectness, correctAnswerShown, printCorrect }) => {\n const borderColor = isIncorrect ? color.incorrect() : isCorrect ? color.correct() : undefined;\n\n return {\n maxWidth: 'fit-content',\n padding: theme.spacing(0.25),\n ...(showCorrectness && {\n border: borderColor ? `2px solid ${borderColor} !important` : '2px solid',\n }),\n ...(!showCorrectness &&\n borderColor && {\n borderColor: `${borderColor} !important`,\n }),\n ...(correctAnswerShown && {\n padding: theme.spacing(1),\n letterSpacing: '0.5px',\n }),\n ...(printCorrect && {\n border: `2px solid ${color.correct()} !important`,\n }),\n '& .mq-math-mode': {\n '& .mq-root-block': {\n paddingRight: '0 !important',\n paddingLeft: '0 !important',\n '& .mq-editable-field': {\n minWidth: '10px',\n padding: theme.spacing(0.4),\n },\n },\n '& sup': {\n top: 0,\n },\n },\n };\n});\n\nconst InputAndKeypadContainer: any = styled('div')({\n position: 'relative',\n '& .mq-overarrow-inner': {\n border: 'none !important',\n padding: '0 !important',\n },\n '& .mq-overarrow-inner-right': {\n display: 'none !important',\n },\n '& .mq-overarrow-inner-left': {\n display: 'none !important',\n },\n '& .mq-overarrow.mq-arrow-both': {\n minWidth: '1.23em',\n '& *': {\n lineHeight: '1 !important',\n },\n '&:before': {\n top: '-0.4em',\n left: '-1px',\n },\n '&:after': {\n top: '-2.4em',\n right: '-1px',\n },\n '&.mq-empty:after': {\n top: '-0.45em',\n },\n },\n '& .mq-overarrow.mq-arrow-right': {\n '&:before': {\n top: '-0.4em',\n right: '-1px',\n },\n },\n '& .mq-longdiv-inner': {\n borderTop: '1px solid !important',\n paddingTop: '1.5px !important',\n },\n '& .mq-parallelogram': {\n lineHeight: 0.85,\n },\n});\n\nconst PrintContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(1),\n pointerEvents: 'none',\n}));\n\nconst SrOnly: any = styled('h2')({\n position: 'absolute',\n left: '-10000px',\n top: 'auto',\n width: '1px',\n height: '1px',\n overflow: 'hidden',\n});\n\nconst StyledCorrectAnswerToggle: any = styled(CorrectAnswerToggle)(({ theme }) => ({\n color: color.text(),\n marginBottom: theme.spacing(2),\n}));\n\nexport default Main;\n"],"mappings":";;;;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,CAAC,CAAC;CAC/B,UAAU;CACV,MAAM;CACN,KAAK;CACL,OAAO;CACP,QAAQ;CACR,UAAU;AACZ,CAAC,GAEK,KAAiC,EAAO,EAAmB,CAAC,EAAE,EAAE,gBAAa;CACjF,OAAO,EAAM,KAAK;CAClB,cAAc,EAAM,QAAQ,CAAC;AAC/B,EAAE"}
|
|
1
|
+
{"version":3,"file":"main-S1lX6mNl.js","names":[],"sources":["../../../../../lib-react/correct-answer-toggle/dist/expander.js","../../../../../lib-react/icons/dist/correct-response-icon.js","../../../../../lib-react/correct-answer-toggle/dist/index.js","../../../src/delivery/utils.ts","../../../src/delivery/simple-question-block.tsx","../../../src/delivery/main.tsx"],"sourcesContent":["import { styled as e } from \"@mui/material/styles\";\nimport { CSSTransition as t } from \"react-transition-group\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { useRef as r } from \"react\";\nimport i from \"prop-types\";\n//#region src/expander.tsx\nvar a = \"height ease-in 300ms, opacity ease-in 300ms\", o = e(\"div\")(() => ({\n\tposition: \"relative\",\n\theight: 0,\n\toverflow: \"hidden\",\n\tdisplay: \"flex\",\n\tvisibility: \"hidden\",\n\twidth: 0,\n\t\"&.enter\": {\n\t\ttransition: a,\n\t\topacity: 1,\n\t\theight: \"auto\",\n\t\twidth: \"auto\",\n\t\tvisibility: \"visible\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.enter-done\": {\n\t\theight: \"auto\",\n\t\tvisibility: \"visible\",\n\t\twidth: \"auto\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.exit\": {\n\t\ttransition: a,\n\t\topacity: 0,\n\t\theight: 0,\n\t\tvisibility: \"visible\",\n\t\twidth: 0\n\t},\n\t\"&.exit-done\": {\n\t\topacity: 0,\n\t\tvisibility: \"hidden\",\n\t\theight: 0,\n\t\twidth: 0\n\t}\n})), s = (e) => {\n\tlet { show: i, children: a, className: s } = e, c = r(null);\n\treturn /* @__PURE__ */ n(t, {\n\t\tnodeRef: c,\n\t\tin: i,\n\t\tappear: !0,\n\t\tmountOnEnter: !1,\n\t\ttimeout: 300,\n\t\tclassNames: {\n\t\t\tenter: \"enter\",\n\t\t\tenterDone: \"enter-done\",\n\t\t\texit: \"exit\",\n\t\t\texitDone: \"exit-done\"\n\t\t},\n\t\tchildren: /* @__PURE__ */ n(o, {\n\t\t\tref: c,\n\t\t\tclassName: s,\n\t\t\tchildren: a\n\t\t})\n\t});\n};\ns.propTypes = {\n\tshow: i.bool.isRequired,\n\tclassName: i.string,\n\tchildren: i.oneOfType([i.arrayOf(i.node), i.node]).isRequired\n};\n//#endregion\nexport { s as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { jsx as t, jsxs as n } from \"react/jsx-runtime\";\nimport { styled as r } from \"@mui/material/styles\";\n//#region src/correct-response-icon.tsx\nvar i = ({ bgFill: e, fgFill: r }) => /* @__PURE__ */ n(\"svg\", {\n\t\"aria-hidden\": \"true\",\n\tfocusable: \"false\",\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-283 359 34 35\",\n\tstyle: { enableBackground: \"new -283 359 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-266\",\n\t\t\tcy: \"375.9\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\ni.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired\n};\nvar a = ({ bgFill: e, fgFill: r, borderFill: i }) => /* @__PURE__ */ n(\"svg\", {\n\t\"aria-hidden\": \"true\",\n\tfocusable: \"false\",\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-129.5 127 34 35\",\n\tstyle: { enableBackground: \"new -129.5 127 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#D0CAC5\",\n\t\t\t\tstroke: \"#E6E3E0\",\n\t\t\t\tstrokeWidth: .75,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\\n C-97.4,153.5-104.3,160.4-112.9,160.4z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#B3ABA4\",\n\t\t\t\tstroke: \"#CDC7C2\",\n\t\t\t\tstrokeWidth: .5,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-114.2\",\n\t\t\tcy: \"143.5\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\",\n\t\t\tfill: i\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\na.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired,\n\tborderFill: e.string.isRequired\n};\nvar o = r(\"div\")(({ size: e }) => ({\n\twidth: e || \"25px\",\n\theight: e || \"25px\"\n})), s = ({ open: e, size: n }) => /* @__PURE__ */ t(o, {\n\tsize: n,\n\tchildren: e ? /* @__PURE__ */ t(i, {\n\t\tbgFill: \"#bce2ff\",\n\t\tfgFill: \"#1a9cff\"\n\t}) : /* @__PURE__ */ t(a, {\n\t\tbgFill: \"white\",\n\t\tfgFill: \"#1a9cff\",\n\t\tborderFill: \"#bce2ff\"\n\t})\n});\ns.propTypes = {\n\topen: e.bool,\n\tsize: e.string\n}, s.defaultProps = { open: !1 };\n//#endregion\nexport { s as default };\n","import e from \"./expander.js\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { CSSTransition as n } from \"react-transition-group\";\nimport { CorrectResponse as r } from \"@pie-lib/icons\";\nimport * as i from \"@pie-lib/render-ui\";\nimport { Readable as a, color as o } from \"@pie-lib/render-ui\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\nimport l from \"react\";\nimport u from \"prop-types\";\nimport d from \"@pie-lib/translator\";\n//#region src/index.tsx\nfunction f(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction p(e, t) {\n\treturn !e || f(e) ? e : f(e.default) ? e.default : t && f(e[t]) ? e[t] : t && f(e[t]?.default) ? e[t].default : e;\n}\nvar m = p(a, \"Readable\") || p(_.Readable, \"Readable\"), h = i, g = h.default, _ = g && typeof g == \"object\" ? g : h, { translator: v } = d, y = {\n\tWebkitTouchCallout: \"none\",\n\tWebkitUserSelect: \"none\",\n\tKhtmlUserSelect: \"none\",\n\tMozUserSelect: \"none\",\n\tmsUserSelect: \"none\",\n\tuserSelect: \"none\"\n}, b = t(\"div\")(() => ({\n\twidth: \"100%\",\n\tcursor: \"pointer\"\n})), x = t(\"button\")(() => ({\n\tmargin: \"0 auto\",\n\ttextAlign: \"center\",\n\tdisplay: \"flex\",\n\tminWidth: \"24px\",\n\tminHeight: \"24px\",\n\tpadding: 0,\n\tborder: 0,\n\tbackground: \"none\",\n\tcolor: \"inherit\",\n\tfont: \"inherit\",\n\tcursor: \"pointer\",\n\t\"&:focus-visible\": {\n\t\toutline: `2px solid ${o.buttonFocusOutline()}`,\n\t\toutlineOffset: \"-2px\"\n\t}\n})), S = t(\"div\")(() => ({\n\twidth: \"fit-content\",\n\tminWidth: \"140px\",\n\talignSelf: \"center\",\n\tverticalAlign: \"middle\",\n\tcolor: `var(--correct-answer-toggle-label-color, ${o.text()})`,\n\tfontWeight: \"normal\",\n\t...y\n})), C = t(\"div\")(() => ({\n\tposition: \"absolute\",\n\twidth: \"25px\",\n\t\"&.enter\": { opacity: \"0\" },\n\t\"&.enter-active\": {\n\t\topacity: \"1\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t},\n\t\"&.exit\": { opacity: \"1\" },\n\t\"&.exit-active\": {\n\t\topacity: \"0\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t}\n})), w = t(\"div\")(() => ({\n\twidth: \"25px\",\n\tmarginRight: \"5px\",\n\tdisplay: \"flex\",\n\talignItems: \"center\"\n})), T = class t extends l.Component {\n\tstatic propTypes = {\n\t\tonToggle: u.func,\n\t\ttoggled: u.bool,\n\t\tshow: u.bool,\n\t\thideMessage: u.string,\n\t\tshowMessage: u.string,\n\t\tclassName: u.string,\n\t\tlanguage: u.string\n\t};\n\tstatic defaultProps = {\n\t\tshowMessage: \"Show correct answer\",\n\t\thideMessage: \"Hide correct answer\",\n\t\tshow: !1,\n\t\ttoggled: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.state = { show: e.show }, this.openIconRef = l.createRef(), this.closedIconRef = l.createRef(), t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t};\n\t}\n\tonClick() {\n\t\tthis.props.onToggle(!this.props.toggled);\n\t}\n\tonTouch(e) {\n\t\te.preventDefault(), this.props.onToggle(!this.props.toggled);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tthis.setState({ show: e.show }), e.language !== this.props?.language && (t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t});\n\t}\n\trender() {\n\t\tlet { className: t, toggled: i, hideMessage: a, showMessage: o } = this.props;\n\t\treturn /* @__PURE__ */ s(b, {\n\t\t\tclassName: t,\n\t\t\tchildren: /* @__PURE__ */ s(e, {\n\t\t\t\tshow: this.state.show,\n\t\t\t\tchildren: /* @__PURE__ */ c(x, {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\"aria-pressed\": !!i,\n\t\t\t\t\tonClick: this.onClick.bind(this),\n\t\t\t\t\tonTouchEnd: this.onTouch.bind(this),\n\t\t\t\t\tchildren: [/* @__PURE__ */ c(w, { children: [/* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.openIconRef,\n\t\t\t\t\t\ttimeout: 400,\n\t\t\t\t\t\tin: i,\n\t\t\t\t\t\texit: !i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.openIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-open\")\n\t\t\t\t\t\t})\n\t\t\t\t\t}), /* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.closedIconRef,\n\t\t\t\t\t\ttimeout: 5e3,\n\t\t\t\t\t\tin: !i,\n\t\t\t\t\t\texit: i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.closedIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-closed\")\n\t\t\t\t\t\t})\n\t\t\t\t\t})] }), /* @__PURE__ */ s(m, {\n\t\t\t\t\t\tfalse: !0,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(S, {\n\t\t\t\t\t\t\t\"aria-hidden\": !this.state.show,\n\t\t\t\t\t\t\tchildren: i ? a : o\n\t\t\t\t\t\t})\n\t\t\t\t\t})]\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n};\n//#endregion\nexport { T as CorrectAnswerToggle, T as default };\n","// @ts-nocheck\n\nexport const ResponseTypes = {\n advanced: 'Advanced Multi',\n simple: 'Simple',\n};\n","// @ts-nocheck\n\nimport React from 'react';\nimport { MathToolbar } from '@pie-lib/math-toolbar';\nimport { mq } from '@pie-lib/math-input';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport { color, createUniqueId } from '@pie-lib/render-ui';\n\nconst Expression: any = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n padding: theme.spacing(1),\n}));\n\nconst Static: any = styled('div', {\n shouldForwardProp: (prop) => !['isCorrect', 'isIncorrect'].includes(prop),\n})(({ theme, isCorrect, isIncorrect }) => ({\n color: color.text(),\n background: color.background(),\n border: isCorrect\n ? `2px solid ${color.correct()} !important`\n : isIncorrect\n ? `2px solid ${color.incorrect()} !important`\n : `1px solid ${color.primaryLight()}`,\n width: 'fit-content',\n fontSize: '1rem',\n padding: isCorrect || isIncorrect ? theme.spacing(1) : theme.spacing(0.5),\n letterSpacing: (isCorrect || isIncorrect) ? '0.5px' : 'normal',\n '& > .mq-math-mode': {\n '& > .mq-hasCursor': {\n '& > .mq-cursor': {\n display: 'none',\n },\n },\n },\n}));\n\n// CSS for MathToolbar classNames (used as strings)\nif (typeof document !== 'undefined') {\n const styleId = 'math-inline-simple-question-styles';\n if (!document.getElementById(styleId)) {\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n .response-editor {\n display: flex;\n justify-content: center;\n width: auto;\n max-width: fit-content;\n height: auto;\n text-align: left;\n padding: 8px;\n }\n .response-editor.mq-math-mode {\n border: 1px solid ${color.primaryLight()};\n }\n `;\n document.head.appendChild(style);\n }\n}\n\nexport class SimpleQuestionBlock extends React.Component {\n static propTypes = {\n onSimpleResponseChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n emptyResponse: PropTypes.bool,\n session: PropTypes.object.isRequired,\n showCorrect: PropTypes.bool,\n onSubFieldFocus: PropTypes.func.isRequired,\n showKeypad: PropTypes.bool.isRequired,\n };\n\n constructor(props) {\n super(props);\n\n // A timestamp repeats when two items construct in the same millisecond, and the toolbar is\n // looked up in the whole document.\n this.mathToolBarId = createUniqueId('math-toolbar');\n }\n\n mathToolBarContainsTarget = (e) => document.getElementById(this.mathToolBarId).contains(e.target);\n\n handleClick: any = (e) => {\n try {\n if (!this.mathToolBarContainsTarget(e)) {\n this.setState({ showKeypad: false });\n }\n } catch (e) {\n // console.log(e.toString());\n }\n };\n\n onFocus: any = () => {\n const { onSubFieldFocus } = this.props;\n\n onSubFieldFocus(this.mathToolBarId);\n };\n\n render() {\n const { model, showCorrect, session, emptyResponse,onSimpleResponseChange, showKeypad } = this.props;\n const { config, disabled, correctness } = model || {};\n\n if (!config) {\n return;\n }\n\n const correct = correctness && correctness.correct;\n const { responses, equationEditor } = config;\n\n return (\n <Expression data-keypad={true}>\n {showCorrect || disabled ? (\n <Static\n isIncorrect={!emptyResponse && !correct && !showCorrect}\n isCorrect={!emptyResponse && (correct || showCorrect)}\n >\n <mq.Static\n latex={showCorrect ? responses && responses.length && responses[0].answer : session.response || ''}\n />\n </Static>\n ) : (\n <div id={this.mathToolBarId}>\n <MathToolbar\n classNames={{ editor: 'response-editor' }}\n latex={session.response}\n keypadMode={equationEditor}\n onChange={onSimpleResponseChange}\n onDone={() => {}}\n onFocus={this.onFocus}\n controlledKeypad={true}\n showKeypad={showKeypad}\n hideDoneButton={true}\n />\n </div>\n )}\n </Expression>\n );\n }\n}\n\nexport default SimpleQuestionBlock;\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\nimport { mq, HorizontalKeypad, updateSpans, registerEmbed, applyStaticMath } from '@pie-lib/math-input';\nimport { Feedback as FeedbackImport, Collapsible as CollapsibleImport, Readable as ReadableImport, hasText, hasMedia, PreviewPrompt as PreviewPromptImport, UiLayout as UiLayoutImport } 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 PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Readable = unwrapReactInteropSymbol(ReadableImport, 'Readable') || unwrapReactInteropSymbol(renderUi.Readable, 'Readable');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nconst Feedback = unwrapReactInteropSymbol(FeedbackImport, 'Feedback') || unwrapReactInteropSymbol(renderUi.Feedback, 'Feedback');\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;\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport { styled } from '@mui/material/styles';\nimport Tooltip from '@mui/material/Tooltip';\nimport { ResponseTypes } from './utils.js';\nimport { isEmpty, isEqual } from '@pie-element/shared-lodash';\nimport SimpleQuestionBlock from './simple-question-block.js';\nimport { color, createUniqueId } from '@pie-lib/render-ui';\nimport Translator from '@pie-lib/translator';\nimport ReactDOM from 'react-dom';\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nconst { translator } = Translator;\nlet registered = false;\n\nconst NEWLINE_LATEX = /\\\\newline/g;\nconst REGEX = /{{response}}/gm;\nconst DEFAULT_KEYPAD_VARIANT = 6;\n\n// !!! If you're using Chrome but have selected the \"iPad\" device in Chrome Developer Tools, the navigator.userAgent string may still report as\n// Safari because Chrome on iOS actually uses the Safari rendering engine under the hood due to Apple's restrictions on third-party browser engines.\n// When you select the \"iPad\" device in Chrome Developer Tools, you're essentially emulating the behavior of Safari on an iPad, including the user agent string.\n// Therefore, even though you're using Chrome, the user agent string will resemble that of Safari on an iPad.\n// Since the regular expression /^((?!chrome|android).)*safari/i checks for the presence of \"safari\" in the user agent string while excluding \"chrome\" and \"android\",\n// it will return true in this case because \"safari\" is present in the user agent string emulated by Chrome when in iPad mode.\nconst IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nfunction generateAdditionalKeys(keyData = []) {\n return keyData.map((key) => ({\n name: key,\n latex: key,\n write: key,\n label: key,\n }));\n}\n\nfunction isChildOfCurrentPieElement(child, parent) {\n let node = child;\n while (node !== null) {\n if (parent && node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\nfunction getKeyPadWidth(additionalKeys = [], equationEditor) {\n return Math.floor(additionalKeys.length / 5) * 30 + (equationEditor === 'miscellaneous' ? 600 : 500);\n}\n\nfunction prepareForStatic(model, state) {\n const { config, disabled } = model || {};\n const { expression, responses, printMode, alwaysShowCorrect } = config || {};\n\n if (config && expression) {\n const modelExpression = expression;\n\n if (state.showCorrect) {\n return responses && responses.length && responses[0].answer;\n }\n\n let answerBlocks = 1; // assume one at least\n // build out local state model using responses declared in expression\n\n return (modelExpression || '')\n .replace(REGEX, function () {\n const answer = state.session.answers[`r${answerBlocks}`];\n\n if (printMode && !alwaysShowCorrect) {\n const blankSpace = '\\\\ \\\\ '.repeat(30) + '\\\\newline ';\n\n return `\\\\MathQuillMathField[r${answerBlocks++}]{${blankSpace.repeat(3)}}`;\n }\n\n if (disabled) {\n return `\\\\embed{answerBlock}[r${answerBlocks++}]`;\n }\n\n return `\\\\MathQuillMathField[r${answerBlocks++}]{${(answer && answer.value) || ''}}`;\n })\n .replace(NEWLINE_LATEX, '\\\\embed{newLine}[]');\n }\n}\n\nfunction parseAnswers(session, model) {\n const answers = {};\n\n if (model.config && model.config.expression) {\n let answerBlocks = 1; // assume one at least\n // build out local state model using responses declared in expression\n\n (model.config.expression || '').replace(REGEX, () => {\n answers[`r${answerBlocks}`] = {\n value:\n (session &&\n session.answers &&\n session.answers[`r${answerBlocks}`] &&\n session.answers[`r${answerBlocks}`].value) ||\n '',\n };\n\n answerBlocks += 1;\n });\n }\n return answers;\n}\n\nexport class Main extends React.Component {\n static propTypes = {\n session: PropTypes.object.isRequired,\n onSessionChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n const { model, session } = props;\n const answers = parseAnswers(session, model);\n\n this.state = {\n session: { ...props.session, answers },\n activeAnswerBlock: '',\n showCorrect: this.props.model.config.alwaysShowCorrect || false,\n tooltipContainerRef: React.createRef(),\n };\n this.instructionsIdPrefix = createUniqueId('math-inline-instructions');\n }\n\n UNSAFE_componentWillMount() {\n if (typeof window !== 'undefined') {\n if (!registered) {\n // The embed is registered once for every item on the page, so it marks each block by its\n // response id rather than taking it as a DOM id, which a second item would repeat.\n registerEmbed('answerBlock', (data) => {\n const classNames = getBlockClassNames();\n return {\n htmlString: `<div class=\"${classNames.blockContainer}\">\n <div class=\"${classNames.blockResponse}\" data-answer-block-index=\"${data}\">R</div>\n <div class=\"${classNames.blockMath}\">\n <span data-answer-block=\"${data}\"></span>\n </div>\n </div>`,\n text: () => 'text',\n latex: () => `\\\\embed{answerBlock}[${data}]`,\n };\n });\n\n registered = true;\n }\n }\n }\n\n handleAnswerBlockDomUpdate: any = () => {\n const { model } = this.props;\n const { session, showCorrect } = this.state;\n const answers = session.answers;\n\n if (this.root && model.disabled && !showCorrect) {\n Object.keys(answers).forEach((answerId) => {\n const el = this.root.querySelector(`[data-answer-block=\"${answerId}\"]`);\n const indexEl = this.root.querySelector(`[data-answer-block-index=\"${answerId}\"]`);\n // const correct = model.correctness && model.correctness.correct;\n\n if (el) {\n const answer = answers[answerId];\n\n applyStaticMath(el, (answer && answer.value) || '');\n\n if (!model.view) {\n // for now, we're not going to be showing individual response correctness\n // TODO re-attach the classes once we are\n // el.parentElement.parentElement.classList.add(\n // correct ? 'correct' : 'incorrect'\n // );\n } else {\n el.parentElement.parentElement.classList.remove('correct');\n el.parentElement.parentElement.classList.remove('incorrect');\n }\n\n // For now, we're not going to be indexing response blocks\n // TODO go back to indexing once we support individual response correctness\n // indexEl.textContent = `R${idx + 1}`;\n indexEl.textContent = 'R';\n }\n });\n }\n\n renderMath(this.root);\n };\n\n countResponseOccurrences(expression) {\n const pattern = /\\{\\{response\\}\\}/g;\n const matches = expression?.match(pattern);\n\n return matches ? matches.length : 0;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { config } = this.props.model;\n const { config: nextConfig = {} } = nextProps.model || {};\n\n const { session } = this.props;\n const { session: nextSession = {} } = nextProps || {};\n\n // in case session props changed in parent, we need to catch this and update local state\n // example: when env is changing in pieoneer\n if (session && nextSession && !isEqual(session.answers, nextSession.answers)) {\n this.setState({\n session: { ...nextSession, answers: parseAnswers(nextSession, this.props.model) },\n });\n }\n\n // check if the note is the default one for prev language and change to the default one for new language\n // this check is necessary in order to diferanciate between default and authour defined note\n // and only change between languages for default ones\n if (\n config.note &&\n config.language &&\n config.language !== nextConfig.language &&\n config.note === translator.t('mathInline.primaryCorrectWithAlternates', { lng: config.language })\n ) {\n config.note = translator.t('mathInline.primaryCorrectWithAlternates', { lng: nextConfig.language });\n }\n\n if ((config.env && config.env.mode !== 'evaluate') || (nextConfig.env && nextConfig.env.mode !== 'evaluate')) {\n this.setState({ ...this.state.session, showCorrect: false });\n }\n\n if (nextConfig.alwaysShowCorrect) {\n this.setState({ showCorrect: true });\n }\n\n if (this.countResponseOccurrences(config.expression) < this.countResponseOccurrences(nextConfig.expression)) {\n setTimeout(() => this.updateAria(), 100);\n }\n\n if (\n (config && config.responses && config.responses.length !== nextConfig.responses.length) ||\n (!config && nextConfig && nextConfig.responses) ||\n (config && nextConfig && config.expression !== nextConfig.expression)\n ) {\n const newAnswers = {};\n const answers = this.state.session.answers;\n\n let answerBlocks = 1; // assume one at least\n\n // build out local state model using responses declared in expression\n (nextConfig.expression || '').replace(REGEX, () => {\n newAnswers[`r${answerBlocks}`] = {\n value: (answers && answers[`r${answerBlocks}`] && answers[`r${answerBlocks}`].value) || '',\n };\n answerBlocks++;\n });\n\n this.setState(\n (state) => ({\n session: {\n ...state.session,\n completeAnswer: this.mqStatic && this.mqStatic.mathField.latex(),\n answers: newAnswers,\n },\n }),\n this.handleAnswerBlockDomUpdate,\n );\n }\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n const sameModel = isEqual(this.props.model, nextProps.model);\n const sameState = isEqual(this.state, nextState);\n\n return !sameModel || !sameState;\n }\n\n componentDidMount() {\n this.handleAnswerBlockDomUpdate();\n this.updateAria();\n setTimeout(() => renderMath(this.root), 100);\n }\n\n componentDidUpdate(prevProps, prevState) {\n this.handleAnswerBlockDomUpdate();\n\n const prevResponseType = prevProps.model?.config?.responseType;\n const currentResponseType = this.props.model?.config?.responseType;\n\n if (prevResponseType !== currentResponseType || prevProps.model?.language !== this.props.model?.language) {\n this.updateAria();\n }\n }\n\n updateAria: any = () => {\n if (this.root) {\n // Update aria-hidden for .mq-selectable elements\n const selectableElements = this.root.querySelectorAll('.mq-selectable');\n selectableElements.forEach((elem) => elem.setAttribute('aria-hidden', 'true'));\n\n // Describe the keypad shortcuts on each textarea; @pie-lib/math-input names it\n const instructions = translator.t('mathInline.keypadInstructions', { lng: this.props.model?.language });\n const textareaElements = this.root.querySelectorAll('textarea');\n textareaElements.forEach((elem, index) => {\n const instructionsId = `${this.instructionsIdPrefix}-${index}`;\n\n // Find the parent element that contains the textarea\n const parent = elem.closest('.mq-textarea');\n\n if (parent) {\n // Create or find the instructions element within the parent\n let instructionsElement = parent.querySelector(`#${instructionsId}`);\n\n if (!instructionsElement) {\n instructionsElement = document.createElement('span');\n instructionsElement.id = instructionsId;\n instructionsElement.className = 'sr-only';\n parent.insertBefore(instructionsElement, elem);\n }\n\n instructionsElement.textContent = instructions;\n elem.setAttribute('aria-describedby', instructionsId);\n }\n });\n }\n };\n\n focusFirstKeypadElement: any = () => {\n setTimeout(() => {\n const keypadElement = document.querySelector('[data-keypad]');\n\n if (keypadElement) {\n const firstButton = keypadElement.querySelector(\"button, [role='button']\");\n\n if (firstButton) {\n firstButton.focus();\n }\n }\n }, 0);\n };\n\n handleKeyDown: any = (event, id) => {\n const isTrigerredFromActualPieElement = isChildOfCurrentPieElement(event.target, this.root);\n const isAnswerInputFocused =\n this.mqStatic && this.mqStatic.inputRef?.current\n ? this.mqStatic.inputRef?.current.contains(document.activeElement)\n : !!document.activeElement?.closest('.mq-editable-field');\n const { key, type } = event;\n const isClickOrTouchEvent = type === 'click' || type === 'touchstart';\n\n if (isAnswerInputFocused && (key === 'ArrowDown' || isClickOrTouchEvent)) {\n if (this.state.activeAnswerBlock !== id && isTrigerredFromActualPieElement) {\n this.cleanupKeyDownListener();\n this.setState({ activeAnswerBlock: id }, () => {\n this.onSubFieldFocus(id);\n if (key === 'ArrowDown') {\n this.focusFirstKeypadElement();\n }\n });\n }\n } else if (event.key === 'Escape') {\n this.setState({ activeAnswerBlock: '' });\n }\n };\n\n onSubFieldFocus: any = (id) => {\n if (!this.handleEvent) {\n this.handleEvent = (event) => {\n this.handleKeyDown(event, id);\n };\n\n document.addEventListener('keydown', this.handleEvent);\n document.addEventListener('click', this.handleEvent);\n document.addEventListener('touchstart', this.handleEvent);\n }\n };\n\n cleanupKeyDownListener: any = () => {\n if (this.handleEvent) {\n document.removeEventListener('keydown', this.handleEvent);\n document.removeEventListener('click', this.handleEvent);\n document.removeEventListener('touchstart', this.handleEvent);\n this.handleEvent = null;\n }\n };\n\n componentWillUnmount() {\n if (this.cleanupKeyDownListener) {\n this.cleanupKeyDownListener();\n }\n }\n\n onDone: any = () => {};\n\n onSimpleResponseChange: any = (response) => {\n this.setState((state) => ({ session: { ...state.session, response } }), this.callOnSessionChange);\n };\n\n toNodeData: any = (data) => {\n if (!data) {\n return;\n }\n\n const { type, value } = data;\n\n if (type === 'command' || type === 'cursor') {\n return data;\n } else if (type === 'answer') {\n return { type: 'answer', ...data };\n } else if (value === 'clear') {\n return { type: 'clear' };\n } else {\n return { type: 'write', value };\n }\n };\n\n setInput: any = (input) => {\n this.input = input;\n };\n\n onClick: any = (data) => {\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n const c = this.toNodeData(data);\n\n if (c.type === 'clear') {\n this.input.clear();\n } else if (c.type === 'command') {\n if (Array.isArray(c.value)) {\n c.value.forEach((vv) => {\n this.input.cmd(vv);\n });\n } else {\n this.input.cmd(c.value);\n }\n } else if (c.type === 'cursor') {\n this.input.keystroke(c.value);\n } else {\n this.input.write(c.value);\n }\n\n this.input.focus();\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n requestAnimationFrame(() => window.scrollTo(scrollX, scrollY));\n });\n };\n\n callOnSessionChange: any = () => {\n const { onSessionChange } = this.props;\n\n if (onSessionChange) {\n onSessionChange(this.state.session);\n }\n };\n\n toggleShowCorrect: any = (show) => {\n this.setState({ showCorrect: show }, this.handleAnswerBlockDomUpdate);\n };\n\n subFieldChanged: any = (name, subfieldValue) => {\n updateSpans();\n\n if (name) {\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n this.setState(\n (state) => ({\n session: {\n ...state.session,\n completeAnswer: this.mqStatic && this.mqStatic.mathField.latex(),\n answers: {\n ...state.session.answers,\n [name]: { value: subfieldValue },\n },\n },\n }),\n () => {\n this.callOnSessionChange();\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n },\n );\n }\n };\n\n getFieldName: any = (changeField, fields) => {\n const { answers } = this.state.session;\n\n if (Object.keys(answers || {}).length) {\n const keys = Object.keys(answers);\n\n return keys.find((k) => {\n const tf = fields[k];\n\n return tf && tf.id == changeField.id;\n });\n }\n };\n\n onBlur: any = (e) => {\n const { relatedTarget, currentTarget } = e || {};\n\n // our keypad is in tooltip\n // in this way we see if event was triggered from the keypad\n const isKeypadOpen = currentTarget && currentTarget.closest('[role=tooltip]');\n\n function getParentWithRoleTooltip(element, depth = 0) {\n // only run this max 16 times\n if (!element || depth >= 16) return null;\n\n const parent = element.offsetParent;\n\n if (!parent) return null;\n\n if (parent.getAttribute('role') === 'tooltip') {\n return parent;\n }\n\n return getParentWithRoleTooltip(parent, depth + 1);\n }\n\n function getDeepChildDataKeypad(element, depth = 0) {\n // only run this max 4 times\n if (!element || depth >= 4) return null;\n\n const child = element?.children?.[0];\n\n if (!child) return null;\n\n if (child.attributes && child.attributes['data-keypad']) {\n return child;\n }\n\n return getDeepChildDataKeypad(child, depth + 1);\n }\n\n const parentWithTooltipRole = getParentWithRoleTooltip(relatedTarget);\n const childWithDataKeypad = parentWithTooltipRole ? getDeepChildDataKeypad(parentWithTooltipRole) : null;\n\n if (!relatedTarget || !currentTarget || !childWithDataKeypad?.attributes['data-keypad']) {\n // if event was trigered from the keypad, avoid closing the keypad\n if (!isKeypadOpen) {\n this.setState({ activeAnswerBlock: '' });\n }\n }\n // else {\n // // Just for debugging purpose:\n // console.log('\\n\\nNew childWithDataKeypad', childWithDataKeypad);\n //\n // if (IS_SAFARI) {\n // // (IS_SAFARI && !relatedTarget?.offsetParent?.children[0]?.children[0]?.attributes?.['data-keypad'])\n // console.log('What was being used', relatedTarget?.offsetParent?.children[0]?.children[0]);\n // } else {\n // // (!IS_SAFARI && !relatedTarget?.offsetParent?.children[0]?.attributes?.['data-keypad']) ||\n // console.log('What was being used', relatedTarget?.offsetParent?.children[0]);\n // }\n // }\n };\n\n setTooltipRef(ref) {\n // Safari Hack: https://stackoverflow.com/a/42764495/5757635\n setTimeout(() => {\n if (ref && IS_SAFARI) {\n const div = document.querySelector(\"[role='tooltip']\");\n\n if (div) {\n const el = div.firstChild;\n el.setAttribute('tabindex', '-1');\n }\n }\n }, 1);\n }\n\n render() {\n const { model } = this.props;\n const { activeAnswerBlock, showCorrect, session, tooltipContainerRef } = this.state;\n const {\n config,\n correctness,\n disabled,\n extraCSSRules,\n view,\n teacherInstructions,\n rationale,\n feedback,\n animationsDisabled,\n printMode,\n alwaysShowCorrect,\n language,\n } = model || {};\n\n if (!config) {\n return null;\n }\n\n const {\n showNote,\n note,\n prompt,\n responses,\n responseType,\n equationEditor,\n customKeys,\n env: { mode, role } = {},\n } = config || {};\n const displayNote = (showCorrect || (mode === 'view' && role === 'instructor')) && showNote && note;\n const emptyResponse = isEmpty(responses);\n const showCorrectAnswerToggle = !emptyResponse && correctness && correctness.correctness !== 'correct';\n const tooltipModeEnabled = disabled && correctness;\n const additionalKeys = generateAdditionalKeys(customKeys);\n const correct = correctness && correctness.correct;\n const staticLatex = prepareForStatic(model, this.state) || '';\n const viewMode = disabled && !correctness;\n const studentPrintMode = printMode && !alwaysShowCorrect;\n const showRationale = rationale && (hasText(rationale) || hasMedia(rationale));\n const showTeacherInstructions =\n teacherInstructions && (hasText(teacherInstructions) || hasMedia(teacherInstructions));\n\n const printView = (\n <PrintContainer>\n <mq.Static\n className=\"static-math\"\n ref={(mqStatic) => {\n if (mqStatic) this.mqStatic = mqStatic;\n }}\n latex={staticLatex}\n language={language}\n onSubFieldChange={this.subFieldChanged}\n getFieldName={this.getFieldName}\n setInput={this.setInput}\n onSubFieldFocus={this.onSubFieldFocus}\n onBlur={this.onBlur}\n />\n </PrintContainer>\n );\n\n const midContent = (\n <MainContent>\n {mode === 'gather' && (\n <SrOnly>{translator.t('mathInline.mathEquationResponseQuestion', { lng: language })}</SrOnly>\n )}\n\n {viewMode &&\n showTeacherInstructions &&\n (!animationsDisabled ? (\n <StyledCollapsible labels={{ hidden: translator.t('common:showTeacherInstructions', { lng: language }), visible: translator.t('common:hideTeacherInstructions', { lng: language }) }}>\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(teacherInstructions) }} />\n </StyledCollapsible>\n ) : (\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(teacherInstructions) }} />\n ))}\n\n {prompt && (\n <PromptContainer>\n <PreviewPrompt prompt={prompt} />\n </PromptContainer>\n )}\n\n {studentPrintMode ? (\n printView\n ) : (\n <Readable false>\n <InputAndKeypadContainer tabIndex={0}>\n {responseType === ResponseTypes.simple && (\n <SimpleQuestionBlock\n onSimpleResponseChange={this.onSimpleResponseChange}\n showCorrect={showCorrect}\n emptyResponse={emptyResponse}\n model={model}\n session={session}\n onSubFieldFocus={this.onSubFieldFocus}\n showKeypad={!!activeAnswerBlock}\n />\n )}\n\n {responseType === ResponseTypes.advanced && (\n <Expression\n ref={tooltipContainerRef}\n isIncorrect={!emptyResponse && !correct && !showCorrect}\n isCorrect={!emptyResponse && (correct || showCorrect)}\n showCorrectness={!emptyResponse && disabled && correctness && !view}\n correctAnswerShown={showCorrect}\n printCorrect={printMode && alwaysShowCorrect}\n >\n <Tooltip\n ref={(ref) => this.setTooltipRef(ref)}\n enterTouchDelay={0}\n interactive\n open={!!activeAnswerBlock}\n slotProps={{\n popper: {\n container: tooltipContainerRef?.current || undefined,\n placement: 'bottom-start',\n sx: {\n backgroundColor: 'transparent',\n width: '650px',\n opacity: 1,\n '& .MuiTooltip-arrow': {\n display: 'none',\n },\n },\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: {\n boundary: 'viewport',\n padding: 8,\n },\n },\n {\n name: 'computeStyles',\n options: {\n adaptive: true,\n gpuAcceleration: true,\n },\n },\n {\n name: 'flip',\n enabled: false,\n },\n ],\n },\n tooltip: {\n sx: {\n fontSize: 'initial',\n backgroundColor: 'transparent',\n width: '600px',\n marginTop: 0,\n paddingTop: 0,\n boxShadow: 'none',\n },\n },\n }}\n title={Object.keys(session.answers).map(\n (answerId) =>\n (answerId === activeAnswerBlock && !(showCorrect || disabled) && (\n <ResponseContainer\n data-keypad={true}\n key={answerId}\n style={{\n // marginTop: this.mqStatic && this.mqStatic.input.offsetHeight - 20,\n width: getKeyPadWidth(additionalKeys, equationEditor),\n }}\n >\n <HorizontalKeypad\n additionalKeys={additionalKeys}\n mode={equationEditor || DEFAULT_KEYPAD_VARIANT}\n onClick={this.onClick}\n />\n </ResponseContainer>\n )) ||\n null,\n )}\n >\n <div>\n <mq.Static\n className=\"static-math\"\n ref={(mqStatic) => {\n if (mqStatic) this.mqStatic = mqStatic;\n }}\n latex={staticLatex}\n language={language}\n onSubFieldChange={this.subFieldChanged}\n getFieldName={this.getFieldName}\n setInput={this.setInput}\n onSubFieldFocus={this.onSubFieldFocus}\n onBlur={this.onBlur}\n />\n </div>\n </Tooltip>\n </Expression>\n )}\n </InputAndKeypadContainer>\n </Readable>\n )}\n\n {viewMode && displayNote && <Note dangerouslySetInnerHTML={{ __html: `<strong>Note:</strong> ${sanitizeModelHtml(note)}` }} />}\n\n {viewMode &&\n showRationale &&\n (!animationsDisabled ? (\n <Collapsible labels={{ hidden: translator.t('common:showRationale', { lng: language }), visible: translator.t('common:hideRationale', { lng: language }) }}>\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(rationale) }} />\n </Collapsible>\n ) : (\n <div dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(rationale) }} />\n ))}\n </MainContent>\n );\n\n if (tooltipModeEnabled && (showCorrectAnswerToggle || showTeacherInstructions || showRationale || feedback)) {\n return (\n <StyledUiLayout\n extraCSSRules={extraCSSRules}\n ref={(r) => {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(r);\n\n this.root = domNode || this.root;\n }}\n >\n <StyledTooltip\n interactive\n enterTouchDelay={0}\n placement=\"bottom-start\"\n slotProps={{\n tooltip: {\n sx: (theme) => ({\n background: `${color.primaryLight()} !important`,\n color: color.text(),\n padding: theme.spacing(2),\n border: `1px solid ${color.secondary()}`,\n fontSize: '16px',\n '& :not(.MathJax) > table tr': {\n '&:nth-child(2n)': {\n backgroundColor: 'unset !important',\n },\n },\n }),\n },\n popper: {\n sx: {\n opacity: 1,\n },\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 2],\n },\n },\n ],\n },\n }}\n title={\n <div>\n <MainContent>\n {showCorrectAnswerToggle && (\n <StyledCorrectAnswerToggle\n language={language}\n show\n toggled={showCorrect}\n onToggle={this.toggleShowCorrect}\n />\n )}\n </MainContent>\n\n {showTeacherInstructions && (\n <StyledCollapsible\n key=\"collapsible-teacher-instructions\"\n labels={{\n hidden: translator.t('common:showTeacherInstructions', { lng: language }),\n visible: translator.t('common:hideTeacherInstructions', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </StyledCollapsible>\n )}\n {displayNote && hasText(note) && (\n <StyledCollapsible\n key=\"collapsible-note\"\n labels={{\n hidden: translator.t('common:showNote', { lng: language }),\n visible: translator.t('common:hideNote', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={note} />\n </StyledCollapsible>\n )}\n\n {showRationale && (\n <StyledCollapsible\n key=\"collapsible-rationale\"\n labels={{\n hidden: translator.t('common:showRationale', { lng: language }),\n visible: translator.t('common:hideRationale', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={rationale} />\n </StyledCollapsible>\n )}\n\n {feedback && <Feedback correctness={correctness.correctness} feedback={feedback} />}\n </div>\n }\n >\n {midContent}\n </StyledTooltip>\n </StyledUiLayout>\n );\n }\n\n return (\n <StyledUiLayout\n extraCSSRules={extraCSSRules}\n ref={(r) => {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(r);\n\n this.root = domNode || this.root;\n }}\n >\n {midContent}\n </StyledUiLayout>\n );\n }\n}\n\n// Helper function to get class names for HTML string generation\nconst getBlockClassNames = () => {\n return {\n blockContainer: 'block-container',\n blockResponse: 'block-response',\n blockMath: 'block-math',\n };\n};\n\n// CSS for block classes used in HTML string generation\nif (typeof document !== 'undefined') {\n const styleId = 'math-inline-block-styles';\n if (!document.getElementById(styleId)) {\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n .block-container {\n margin: 8px !important;\n display: inline-flex;\n border: 2px solid grey !important;\n }\n .block-response {\n color: grey;\n background: #f5f5f5;\n font-size: 0.8rem !important;\n padding: 4px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 2px solid #bdbdbd !important;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n }\n .block-math {\n color: ${color.text()};\n background-color: ${color.background()};\n padding: 4px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n }\n .block-math > .mq-math-mode > .mq-hasCursor > .mq-cursor {\n display: none;\n }\n .sr-only {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n }\n .static-math > .mq-root-block > .mq-editable-field {\n border-color: ${color.text()};\n }\n `;\n document.head.appendChild(style);\n }\n}\n\nconst StyledUiLayout: any = styled(UiLayout)(() => ({\n color: color.text(),\n backgroundColor: color.background(),\n display: 'inline-block',\n}));\n\nconst StyledTooltip: any = styled(Tooltip)({\n // Styles applied via slotProps.sx below\n});\n\nconst PromptContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst MainContent: any = styled('div')({\n width: '100%',\n position: 'relative',\n backgroundColor: color.background(),\n color: color.text(),\n});\n\nconst Note: any = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n}));\n\nconst StyledCollapsible: any = styled(Collapsible)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst ResponseContainer: any = styled('div')(({ theme }) => ({\n zIndex: 10,\n minWidth: '400px',\n marginTop: theme.spacing(2),\n}));\n\nconst Expression: any = styled('div', {\n shouldForwardProp: (prop) =>\n !['isIncorrect', 'isCorrect', 'showCorrectness', 'correctAnswerShown', 'printCorrect'].includes(prop),\n})(({ theme, isIncorrect, isCorrect, showCorrectness, correctAnswerShown, printCorrect }) => {\n const borderColor = isIncorrect ? color.incorrect() : isCorrect ? color.correct() : undefined;\n\n return {\n maxWidth: 'fit-content',\n padding: theme.spacing(0.25),\n ...(showCorrectness && {\n border: borderColor ? `2px solid ${borderColor} !important` : '2px solid',\n }),\n ...(!showCorrectness &&\n borderColor && {\n borderColor: `${borderColor} !important`,\n }),\n ...(correctAnswerShown && {\n padding: theme.spacing(1),\n letterSpacing: '0.5px',\n }),\n ...(printCorrect && {\n border: `2px solid ${color.correct()} !important`,\n }),\n '& .mq-math-mode': {\n '& .mq-root-block': {\n paddingRight: '0 !important',\n paddingLeft: '0 !important',\n '& .mq-editable-field': {\n minWidth: '10px',\n padding: theme.spacing(0.4),\n },\n },\n '& sup': {\n top: 0,\n },\n },\n };\n});\n\nconst InputAndKeypadContainer: any = styled('div')({\n position: 'relative',\n '& .mq-overarrow-inner': {\n border: 'none !important',\n padding: '0 !important',\n },\n '& .mq-overarrow-inner-right': {\n display: 'none !important',\n },\n '& .mq-overarrow-inner-left': {\n display: 'none !important',\n },\n '& .mq-overarrow.mq-arrow-both': {\n minWidth: '1.23em',\n '& *': {\n lineHeight: '1 !important',\n },\n '&:before': {\n top: '-0.4em',\n left: '-1px',\n },\n '&:after': {\n top: '-2.4em',\n right: '-1px',\n },\n '&.mq-empty:after': {\n top: '-0.45em',\n },\n },\n '& .mq-overarrow.mq-arrow-right': {\n '&:before': {\n top: '-0.4em',\n right: '-1px',\n },\n },\n '& .mq-longdiv-inner': {\n borderTop: '1px solid !important',\n paddingTop: '1.5px !important',\n },\n '& .mq-parallelogram': {\n lineHeight: 0.85,\n },\n});\n\nconst PrintContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(1),\n pointerEvents: 'none',\n}));\n\nconst SrOnly: any = styled('h2')({\n position: 'absolute',\n left: '-10000px',\n top: 'auto',\n width: '1px',\n height: '1px',\n overflow: 'hidden',\n});\n\nconst StyledCorrectAnswerToggle: any = styled(CorrectAnswerToggle)(({ theme }) => ({\n color: color.text(),\n marginBottom: theme.spacing(2),\n}));\n\nexport default Main;\n"],"mappings":";;;;;;;mCAMI,IAAI,+CAA+C,IAAI,EAAE,KAAK,CAAC,QAAQ;CAC1E,UAAU;CACV,QAAQ;CACR,UAAU;CACV,SAAS;CACT,YAAY;CACZ,OAAO;CACP,WAAW;EACV,YAAY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ACjF,OAAO,EAAM,KAAK;CAClB,cAAc,EAAM,QAAQ,CAAC;AAC/B,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as e } from "../rolldown-runtime-DgMJErsw.js";
|
|
2
2
|
import { a as t, m as n } from "../dist-w6lPOmAs.js";
|
|
3
|
-
import { R as r } from "../dist-
|
|
4
|
-
import { t as i } from "../main-
|
|
3
|
+
import { R as r } from "../dist-C-gN9Y6a.js";
|
|
4
|
+
import { t as i } from "../main-S1lX6mNl.js";
|
|
5
5
|
import a from "react";
|
|
6
6
|
import { createRoot as o } from "react-dom/client";
|
|
7
7
|
var s = (0, (/* @__PURE__ */ e(n(), 1)).default)("pie-element:math-inline:print"), c = (e, t) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DY7j01NX.js";
|
|
2
2
|
import { d as t, p as n, t as r } from "./dist-Fa1nzZ4V.js";
|
|
3
|
-
import { C as i, H as a, L as o, M as s, R as c, S as l, T as u, _ as d, _t as f, f as ee, ft as p, g as m, h, ht as g, jt as _, m as v, mt as y, n as b, pt as x, u as te, v as S, w as C } from "./dist-
|
|
3
|
+
import { C as i, H as a, L as o, M as s, R as c, S as l, T as u, _ as d, _t as f, f as ee, ft as p, g as m, h, ht as g, jt as _, m as v, mt as y, n as b, pt as x, u as te, v as S, w as C } from "./dist-LPvTQqRx.js";
|
|
4
4
|
import w, { useRef as T } from "react";
|
|
5
5
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
6
6
|
import ne from "react-dom";
|
|
@@ -992,4 +992,4 @@ var De = f(de)(() => ({
|
|
|
992
992
|
//#endregion
|
|
993
993
|
export { Te as t };
|
|
994
994
|
|
|
995
|
-
//# sourceMappingURL=main-
|
|
995
|
+
//# sourceMappingURL=main-ZcSHMm0i.js.map
|