@pie-element/graphing-solution-set 6.1.2-next.5 → 6.1.2-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/player-events/dist/index.js","../../../src/delivery/utils.ts","../../../../../lib-react/icons/dist/correct-response-icon.js","../../../../../lib-react/correct-answer-toggle/dist/expander.js","../../../../../lib-react/correct-answer-toggle/dist/index.js","../../../src/delivery/main.tsx","../../../src/delivery/index.ts"],"sourcesContent":["//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { e as ModelSetEvent, t as SessionChangedEvent };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing-solution-set/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\n/*\n * Check if a line is complete\n * @param {Object} item - mark object\n * */\nconst completeFromTo = (item) => item && completeMark.point(item.from) && completeMark.point(item.to);\n\n/*\n * Check if a point is correct and complete\n * @param {Object} point - point object\n * */\nconst completePoint = (point) => point && Number.isFinite(point.x) && Number.isFinite(point.y);\n\n/*\n * Complete mark object for line and point\n * */\nconst completeMark = {\n line: completeFromTo,\n point: completePoint,\n};\n\n//////////////////////////////////////////////////////////////////////////////////\n// BELOW FUNCTIONS ARE USED IN configure/src/utils as well\n//////////////////////////////////////////////////////////////////////////////////\n\n/*\n * Function to calculate the distance between two points\n * @param {Object} a - point a\n * @param {Object} b - point b\n * */\nconst distance = (a, b) => {\n return Number(Math.sqrt((a.x - b.x) ** 2 + (a.y - b.y) ** 2).toFixed(3));\n};\n\n/*\n * Function to check if a point lies on edges of a polygon\n * @param {Object} point - point object\n * @param {Array} polygon - polygon points array\n * */\nconst pointInPolygon = (point, polygon) => {\n let c = point;\n let inside = false;\n let clonePolygon = [...polygon];\n clonePolygon.push(polygon[0]);\n for (let i = 0; i < clonePolygon.length - 1; i++) {\n let a = clonePolygon[i];\n let b = clonePolygon[i + 1];\n // check if point is on the edge\n if (distance(a, c) + distance(c, b) === distance(a, b)) {\n inside = true;\n break;\n }\n }\n return inside;\n};\n\n/*\n * Function to get the intersection point of two lines\n * @param {Number} x1 - x coordinate of point 1 of line 1\n * @param {Number} y1 - y coordinate of point 1 of line 1\n * @param {Number} x2 - x coordinate of point 2 of line 1\n * @param {Number} y2 - y coordinate of point 2 of line 1\n * @param {Number} x3 - x coordinate of point 1 of line 2\n * @param {Number} y3 - y coordinate of point 1 of line 2\n * @param {Number} x4 - x coordinate of point 2 of line 2\n * @param {Number} y4 - y coordinate of point 2 of line 2\n * */\nconst lineIntersect = (x1, y1, x2, y2, x3, y3, x4, y4) => {\n let ua,\n denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\n if (denominator === 0) {\n return null;\n }\n ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;\n return {\n x: Number((x1 + ua * (x2 - x1)).toFixed(3)),\n y: Number((y1 + ua * (y2 - y1)).toFixed(3)),\n };\n};\n\n/*\n * Check if a point is inside the graph\n * @param {Object} point - point object\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst isPointInsideGraph = (point, domain, range) => {\n return point.x > domain.min && point.x < domain.max && point.y > range.min && point.y < range.max;\n};\n\n/*\n * Check if a point is on or inside the graph\n * @param {Object} point - point object\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst isPointOnOrInsideGraph = (point, domain, range) => {\n return point.x >= domain.min && point.x <= domain.max && point.y >= range.min && point.y <= range.max;\n};\n\n/*\n * Find the intersection point of a mark with the graph\n * @param {Object} mark - mark object\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst findIntersectionPointForMark = (mark, domain, range) => {\n let intersectionPoint = [];\n let tempData = [\n [domain.max, range.max, domain.max, range.min],\n [domain.min, range.max, domain.min, range.min],\n [domain.min, range.max, domain.max, range.max],\n [domain.min, range.min, domain.max, range.min],\n ];\n for (let i = 0; i < tempData.length; i++) {\n let intersection = lineIntersect(\n mark.from.x,\n mark.from.y,\n mark.to.x,\n mark.to.y,\n tempData[i][0],\n tempData[i][1],\n tempData[i][2],\n tempData[i][3],\n );\n if (intersection && isPointOnOrInsideGraph(intersection, domain, range)) {\n intersectionPoint.push(intersection);\n }\n }\n return intersectionPoint;\n};\n\n/*\n * Sort points in clockwise direction for a polygon\n * @param {Array} points - points array\n * */\nconst sortPointsClockWise = (points) => {\n // Find min max to get center and Sort from top to bottom\n points.sort((a, b) => a.y - b.y);\n // Get center y\n const cy = (points[0].y + points[points.length - 1].y) / 2;\n // Sort from right to left\n points.sort((a, b) => b.x - a.x);\n // Get center x\n const cx = (points[0].x + points[points.length - 1].x) / 2;\n // Center point\n const center = { x: cx, y: cy };\n // As the points are sorted from right to left the first point is the rightmost Starting angle used to reference other angles\n let startAng;\n points.forEach((point) => {\n let ang = Math.atan2(point.y - center.y, point.x - center.x);\n if (!startAng) {\n startAng = ang;\n } else {\n if (ang < startAng) {\n // ensure that all points are clockwise of the start point\n ang += Math.PI * 2;\n }\n }\n point.angle = ang; // add the angle to the point\n });\n // first sort clockwise\n points.sort((a, b) => a.angle - b.angle);\n // then reverse the order\n const ccwPoints = points.reverse();\n // move the last point back to the start\n ccwPoints.unshift(ccwPoints.pop());\n return ccwPoints.map(({ angle, ...attr }) => attr);\n};\n\n/*\n * Function to calculate the dot product of two vectors\n * @param {Object} v1 - point 1\n * @param {Object} v2 - point 2\n * */\nconst dotProduct = (v1, v2) => {\n return v1.x * v2.x + v1.y * v2.y;\n};\n\n/*\n * Function to calculate the magnitude of a vector\n * @param {Object} v - point object\n * */\nconst magnitude = (v) => {\n return Math.sqrt(v.x * v.x + v.y * v.y);\n};\n\n/*\n * Function to calculate the angle between two vectors in radians\n * @param {Object} v1 - point 1\n * @param {Object} v2 - point 2\n * */\nconst angleBetweenVectors = (v1, v2) => {\n const dot = dotProduct(v1, v2);\n const magV1 = magnitude(v1);\n const magV2 = magnitude(v2);\n // Ensure the dot product is within the domain of the acos function\n return Math.acos(dot / (magV1 * magV2));\n};\n\n/*\n * Function to check if a point lies between the angle formed by two lines\n * @param {Object} commonPoint - common point of the two lines\n * @param {Object} point1 - point 1 of cone\n * @param {Object} point2 - point 2 of cone\n * @param {Object} testPoint - point to be tested\n * */\nconst pointInAngle = (commonPoint, point1, point2, testPoint) => {\n const vector1 = { x: point1.x - commonPoint.x, y: point1.y - commonPoint.y };\n const vector2 = { x: point2.x - commonPoint.x, y: point2.y - commonPoint.y };\n const testVector = { x: testPoint.x - commonPoint.x, y: testPoint.y - commonPoint.y };\n const angle1 = angleBetweenVectors(vector1, testVector);\n const angle2 = angleBetweenVectors(vector2, testVector);\n const angleSum = angle1 + angle2;\n // Check if the sum of angles is approximately equal to the angle between the two lines\n // You may need to adjust the tolerance (e.g., 0.0001) based on your specific requirements\n const tolerance = 0.0001;\n return Math.abs(angleSum - angleBetweenVectors(vector1, vector2)) < tolerance;\n};\n\n/*\n * Function to remove duplicate points from an array\n * @param {Array} array - array of points\n * */\nconst removeDuplicatesFromArray = (array) => {\n return array.filter((obj, index) => {\n return index === array.findIndex((o) => obj.x === o.x && obj.y === o.y);\n });\n};\n\n/*\n * Function to remove duplicate points and filter sections\n * @param {Array} sections - array of sections\n * */\nconst removeDuplicateAndFilterSections = (sections) => {\n //removing duplicate points.\n for (let i = 0; i < sections.length; i++) {\n sections[i] = sections[i].filter((obj, index) => {\n return index === sections[i].findIndex((o) => obj.x === o.x && obj.y === o.y);\n });\n }\n //removing arrays with two points\n sections = sections.filter((section) => section.length > 2);\n //sorting the points in clockwise direction\n for (let i = 0; i < sections.length; i++) {\n sections[i] = sortPointsClockWise(sections[i]);\n }\n return sections;\n};\n\n/*\n * Function to find sections in solution set for one line\n * @param {Array} intersectionPoint - intersection point\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst findSectionsInSolutionSetForOneLine = (intersectionPoint, domain, range) => {\n let sections = [];\n sections.push([].concat(intersectionPoint));\n sections.push([].concat(intersectionPoint));\n if (\n (intersectionPoint[0].x === domain.max && intersectionPoint[1].y === range.max) ||\n (intersectionPoint[1].x === domain.max && intersectionPoint[0].y === range.max)\n ) {\n sections[0].push({ x: domain.max, y: range.max });\n sections[1].push({ x: domain.min, y: range.max }, { x: domain.min, y: range.min }, { x: domain.max, y: range.min });\n } else if (\n (intersectionPoint[0].x === domain.min && intersectionPoint[1].y === range.max) ||\n (intersectionPoint[1].x === domain.min && intersectionPoint[0].y === range.max)\n ) {\n sections[0].push({ x: domain.min, y: range.max });\n sections[1].push({ x: domain.max, y: range.max }, { x: domain.max, y: range.min }, { x: domain.min, y: range.min });\n } else if (\n (intersectionPoint[0].x === domain.min && intersectionPoint[1].y === range.min) ||\n (intersectionPoint[1].x === domain.min && intersectionPoint[0].y === range.min)\n ) {\n sections[0].push({ x: domain.min, y: range.min });\n sections[1].push({ x: domain.max, y: range.min }, { x: domain.max, y: range.max }, { x: domain.min, y: range.max });\n } else if (\n (intersectionPoint[0].x === domain.max && intersectionPoint[1].y === range.min) ||\n (intersectionPoint[1].x === domain.max && intersectionPoint[0].y === range.min)\n ) {\n sections[0].push({ x: domain.max, y: range.min });\n sections[1].push({ x: domain.min, y: range.min }, { x: domain.min, y: range.max }, { x: domain.max, y: range.max });\n } else if (\n (intersectionPoint[0].x === domain.min && intersectionPoint[1].x === domain.max) ||\n (intersectionPoint[0].x === domain.max && intersectionPoint[1].x === domain.min)\n ) {\n sections[0].push({ x: domain.min, y: range.max }, { x: domain.max, y: range.max });\n sections[1].push({ x: domain.min, y: range.min }, { x: domain.max, y: range.min });\n } else if (\n (intersectionPoint[0].y === range.min && intersectionPoint[1].y === range.max) ||\n (intersectionPoint[0].y === range.max && intersectionPoint[1].y === range.min)\n ) {\n sections[0].push({ x: domain.min, y: range.min }, { x: domain.min, y: range.max });\n sections[1].push({ x: domain.max, y: range.min }, { x: domain.max, y: range.max });\n }\n return removeDuplicateAndFilterSections(sections);\n};\n\n/*\n * Function to find sections in solution set for two lines\n * @param {Object} gssLineData - graphing solution set line data\n * @param {Array} answers - answers array\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst findSectionsInSolutionSetForTwoLines = (gssLineData, answers, domain, range) => {\n let mark1 = answers[0];\n let mark2 = answers[1];\n let cornerPoints = [\n { x: domain.min, y: range.min },\n { x: domain.min, y: range.max },\n { x: domain.max, y: range.min },\n { x: domain.max, y: range.max },\n ];\n let intersectPoint = lineIntersect(\n mark1.from.x,\n mark1.from.y,\n mark1.to.x,\n mark1.to.y,\n mark2.from.x,\n mark2.from.y,\n mark2.to.x,\n mark2.to.y,\n );\n let sections = [];\n let intersectionPoint1 = findIntersectionPointForMark(mark1, domain, range);\n intersectionPoint1 = removeDuplicatesFromArray(intersectionPoint1);\n let intersectionPoint2 = findIntersectionPointForMark(mark2, domain, range);\n intersectionPoint2 = removeDuplicatesFromArray(intersectionPoint2);\n if (intersectPoint && isPointInsideGraph(intersectPoint, domain, range)) {\n for (let i = 0; i < intersectionPoint1.length; i++) {\n for (let j = 0; j < intersectionPoint2.length; j++) {\n let bucket = [];\n let newCornerPoints = [];\n bucket.push(intersectPoint);\n bucket.push(intersectionPoint1[i]);\n bucket.push(intersectionPoint2[j]);\n for (let k = 0; k < cornerPoints.length; k++) {\n if (pointInAngle(intersectPoint, intersectionPoint1[i], intersectionPoint2[j], cornerPoints[k])) {\n bucket.push(cornerPoints[k]);\n } else {\n newCornerPoints.push(cornerPoints[k]);\n }\n }\n cornerPoints = newCornerPoints;\n sections.push(bucket);\n }\n }\n } else {\n let sections1 = findSectionsInSolutionSetForOneLine(intersectionPoint1, domain, range);\n let sections2 = findSectionsInSolutionSetForOneLine(intersectionPoint2, domain, range);\n for (let i = 0; i < sections1.length; i++) {\n if (\n !(pointInPolygon(intersectionPoint2[0], sections1[i]) && pointInPolygon(intersectionPoint2[1], sections1[i]))\n ) {\n sections.push(sections1[i]);\n }\n }\n for (let i = 0; i < sections2.length; i++) {\n if (\n !(pointInPolygon(intersectionPoint1[0], sections2[i]) && pointInPolygon(intersectionPoint1[1], sections2[i]))\n ) {\n sections.push(sections2[i]);\n }\n }\n for (let i = 0; i < sections.length; i++) {\n cornerPoints = cornerPoints.filter(function (o1) {\n return !sections[i].some(function (o2) {\n return o1.x === o2.x && o1.y === o2.y;\n });\n });\n }\n let sections3 = cornerPoints.concat(intersectionPoint1, intersectionPoint2);\n sections.push(sections3);\n }\n return removeDuplicateAndFilterSections(sections);\n};\n\n/*\n * Function to find sections in solution set\n * @param {Object} gssLineData - graphing solution set line data\n * @param {Array} answers - answers array\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nexport const findSectionsInSolutionSet = (gssLineData, answers, domain, range) => {\n if (gssLineData.numberOfLines === 1) {\n const intersectionPoint = findIntersectionPointForMark(answers[0], domain, range);\n gssLineData.sections = findSectionsInSolutionSetForOneLine(intersectionPoint, domain, range);\n } else {\n gssLineData.sections = findSectionsInSolutionSetForTwoLines(gssLineData, answers, domain, range);\n }\n return gssLineData;\n};\n\n/*\n * Function to check if a point is inside a polygon\n * @param {Object} point - point to be checked\n * @param {Array} polygon - polygon points array\n * */\nexport const pointInsidePolygon = (point, polygon) => {\n const num_vertices = polygon.length;\n const x = point.x;\n const y = point.y;\n let inside = false;\n let p1 = polygon[0];\n let p2;\n for (let i = 1; i <= num_vertices; i++) {\n p2 = polygon[i % num_vertices];\n if (y > Math.min(p1.y, p2.y)) {\n if (y <= Math.max(p1.y, p2.y)) {\n if (x <= Math.max(p1.x, p2.x)) {\n const x_intersection = ((y - p1.y) * (p2.x - p1.x)) / (p2.y - p1.y) + p1.x;\n if (p1.x === p2.x || x <= x_intersection) {\n inside = !inside;\n }\n }\n }\n }\n p1 = p2;\n }\n return inside;\n};\n\n/*\n * Function to check if lines are added in the graph\n * @param {Object} gssLineData - graphing solution set line data\n * @param {Array} answer - answer array\n * */\nexport const checkIfLinesAreAdded = (gssLineData, answer) => {\n if (answer.length === 0) {\n return false;\n }\n if (gssLineData.numberOfLines === 1) {\n if (answer.length === 1) {\n return !answer[0].building;\n }\n } else {\n if (answer.length !== 2) {\n return false;\n } else {\n return !answer[1].building;\n }\n }\n};\n\n/*\n * Function to remove invalid answers\n * @param {Array} answers - answers array\n * */\nexport const removeInvalidAnswers = (answers) =>\n answers\n ? (answers || []).filter(({ type, ...answer }) => (completeMark[type] ? completeMark[type](answer) : false))\n : [];\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\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\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 { 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 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(\"div\")(() => ({\n\tmargin: \"0 auto\",\n\ttextAlign: \"center\",\n\tdisplay: \"flex\"\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\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/**\n * @synced-from pie-elements/packages/graphing-solution-set/src/main.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GraphContainer } from '@pie-lib/graphing-solution-set';\nimport { color, Collapsible as CollapsibleImport, 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 Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\nimport { findSectionsInSolutionSet, pointInsidePolygon, checkIfLinesAreAdded } from './utils.js';\nimport { AlertDialog } from '@pie-lib/config-ui';\n\nconst MainContainer: any = styled(UiLayout)({\n color: color.text(),\n backgroundColor: color.background(),\n});\n\nconst TeacherInstructions: any = styled(Collapsible)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst Graph: any = styled(GraphContainer)(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n session: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n };\n\n state = {\n showingCorrect: false,\n dialog: {\n open: false,\n },\n };\n\n /*\n * Function to handle the AlertDialog\n * @param {boolean} open - open state of the dialog\n * @param {function} callback - callback function to be called after setting the state\n * */\n handleAlertDialog = (open, callback) =>\n this.setState(\n {\n dialog: { open },\n },\n callback,\n );\n\n /*\n * Function to toggle the correct answer\n * @param {boolean} showingCorrect - state of the correct answer\n * */\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n /*\n * Reset the graph to original state\n * */\n onResetClick: any = () => {\n const { model, session, setGssData } = this.props;\n let { gssData } = model;\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `This will remove all the elements added on the graph and reset graph to original state. Are you sure you want to continue?`,\n onConfirm: () => {\n // Reset the graph to original state\n session.answer = [];\n gssData.selectedTool = 'lineA';\n gssData.lineA.lineType = 'Solid';\n if (gssData.lineB) gssData.lineB.lineType = 'Solid';\n // Set the gssData and session\n setGssData(gssData, session);\n this.handleAlertDialog(false);\n },\n onClose: () => this.handleAlertDialog(false),\n },\n });\n };\n\n /*\n * Function to handle the event of solution set selected\n * @param {object} point - point selected on the graph\n * */\n onSolutionSetSelected: any = (point) => {\n const { model, session, setGssData } = this.props;\n const { gssData, disabled } = model;\n if (disabled) {\n return;\n }\n for (const section of gssData.sections) {\n if (pointInsidePolygon(point, section)) {\n let polygon = {\n points: section,\n building: false,\n type: 'polygon',\n closed: true,\n isSolution: true,\n };\n session.answer = session.answer.filter((mark) => mark.type !== 'polygon');\n session.answer.push(polygon);\n break;\n }\n }\n setGssData(gssData, session);\n };\n\n /*\n * Function to handle the event of change in GSS Line Data\n * @param {object} gssData - GSS Line Data\n * @param {string} oldSelectedTool - old selected tool\n * */\n onChangeGssLineData: any = (gssData, oldSelectedTool) => {\n const { model, session } = this.props;\n const { domain, range, disabled } = model;\n if (disabled) {\n return;\n }\n if (gssData.selectedTool === 'solutionSet') {\n let lines = session.answer.filter((mark) => mark.type !== 'polygon');\n if (!checkIfLinesAreAdded(gssData, lines)) {\n gssData.selectedTool = oldSelectedTool;\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Please define the line(s) and then select a solution set for the item.',\n onConfirm: () => this.handleAlertDialog(false),\n },\n });\n } else {\n let lines = session.answer.filter((mark) => mark.type !== 'polygon');\n gssData = findSectionsInSolutionSet(gssData, lines, domain, range);\n }\n this.handleGssDataChange(gssData, session);\n } else {\n let polygons = session.answer.filter((mark) => mark.type === 'polygon');\n if (oldSelectedTool === 'solutionSet' && polygons.length > 0) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Changing a line after adding a solution set will clear your selected solution set. Click \\'Clear Solution Set\\' to change the line. Otherwise, click \\'Cancel\\'.',\n onConfirm: () => {\n session.answer = session.answer.filter((mark) => mark.type !== 'polygon');\n this.handleGssDataChange(gssData, session);\n this.handleAlertDialog(false);\n },\n onConfirmText: 'CLEAR SOLUTION SET',\n onClose: () => {\n gssData.selectedTool = oldSelectedTool;\n this.handleGssDataChange(gssData, session);\n this.handleAlertDialog(false);\n },\n },\n });\n } else {\n this.handleGssDataChange(gssData, session);\n }\n }\n };\n\n /*\n * Function to handle the event of change in GSS Data\n * @param {object} gssData - GSS Data\n * @param {object} session - session data\n * */\n handleGssDataChange: any = (gssData, session) => {\n const { setGssData } = this.props;\n if (session.answer && session.answer.length > 0 && session.answer[0] && gssData.lineA) {\n session.answer[0].fill = gssData.lineA.lineType;\n }\n if (session.answer && session.answer.length > 1 && session.answer[1] && gssData.lineB) {\n session.answer[1].fill = gssData.lineB.lineType;\n }\n if (\n (gssData.selectedTool === 'lineB' && session.answer.length === 0) ||\n (gssData.selectedTool === 'lineB' && session.answer[0].building)\n ) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Please add Line A to the graph before adding Line B',\n onConfirm: () => this.handleAlertDialog(false),\n },\n });\n gssData.selectedTool = 'lineA';\n }\n if (gssData.selectedTool === 'lineA' && session.answer.length > 1 && session.answer[1].building) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Please add Line B to the graph before switching to Line A',\n onConfirm: () => this.handleAlertDialog(false),\n },\n });\n gssData.selectedTool = 'lineB';\n }\n setGssData(gssData, session);\n };\n\n /*\n * Render the component\n * */\n render() {\n const { model, onAnswersChange, session } = this.props;\n const { showingCorrect, dialog } = this.state;\n const { answer } = session || {};\n const {\n answersCorrected,\n arrows,\n coordinatesOnHover,\n correctResponse,\n defaultTool,\n disabled,\n domain,\n extraCSSRules,\n labels,\n labelsEnabled,\n prompt,\n range,\n rationale,\n size,\n showToggle,\n title,\n titleEnabled,\n teacherInstructions,\n language,\n gssLineData,\n gssData,\n } = model || {};\n const marks = answersCorrected || answer || [];\n const showRationale = model.rationale && (hasText(model.rationale) || hasMedia(model.rationale));\n const showTeacherInstructions =\n model.teacherInstructions && (hasText(model.teacherInstructions) || hasMedia(model.teacherInstructions));\n return (\n <MainContainer extraCSSRules={extraCSSRules}>\n {showTeacherInstructions && (\n <TeacherInstructions\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </TeacherInstructions>\n )}\n {prompt && <PreviewPrompt className=\"prompt\" prompt={prompt} />}\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n language={language}\n />\n {showingCorrect && showToggle ? (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n coordinatesOnHover={coordinatesOnHover}\n disabled={true}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={correctResponse.map((i) => ({ ...i, correctness: 'correct' }))}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n language={language}\n gssLineData={gssLineData}\n onChangeGssLineData={this.onChangeGssLineData}\n onSolutionSetSelected={this.onSolutionSetSelected}\n toolbarTools={['line', 'polygon']}\n />\n ) : (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n coordinatesOnHover={coordinatesOnHover}\n defaultTool={defaultTool}\n disabled={disabled}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n onCustomReset={this.onResetClick}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n language={language}\n gssLineData={gssData}\n onChangeGssLineData={this.onChangeGssLineData}\n onSolutionSetSelected={this.onSolutionSetSelected}\n toolbarTools={['line', 'polygon']}\n />\n )}\n {showRationale && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n <AlertDialog\n open={dialog.open}\n title={dialog.title}\n text={dialog.text}\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n onConfirmText={dialog.onConfirmText ? dialog.onConfirmText : 'OK'}\n />\n </MainContainer>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing-solution-set/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport { findSectionsInSolutionSet, removeInvalidAnswers } from './utils.js';\nimport Main from './main.js';\n\nexport { Main as Component };\n\nexport default class Graphing extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n }\n\n /*\n * Function to set model\n * @param {object} m - Model object\n * */\n set model(m) {\n this._model = m;\n this._render();\n }\n\n /*\n * Function to set session\n * @param {object} s - Session object\n * */\n set session(s) {\n this._session = s;\n if (!this._session.answer) {\n this._session.answer = [];\n }\n const { answer } = this._session || {};\n const { gssLineData, domain, range } = this._model;\n let section = answer && answer.filter((mark) => mark.type === 'polygon').length > 0;\n if (gssLineData.numberOfLines === 1) {\n this._model.gssData = {\n numberOfLines: 1,\n selectedTool: section ? 'solutionSet' : 'lineA',\n sections: [],\n lineA: {\n lineType: answer && answer.length > 0 ? answer[0].fill : 'Solid',\n },\n };\n } else {\n this._model.gssData = {\n numberOfLines: 2,\n selectedTool: section ? 'solutionSet' : 'lineA',\n sections: [],\n lineA: {\n lineType: answer && answer.length > 0 ? answer[0].fill : 'Solid',\n },\n lineB: {\n lineType: answer && answer.length > 1 ? answer[1].fill : 'Solid',\n },\n };\n }\n if (section) {\n this._model.gssData = findSectionsInSolutionSet(this._model.gssData, answer, domain, range);\n }\n this._render();\n }\n\n /*\n * Function to get session\n * */\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._render();\n }\n\n /*\n * Is complete function\n * @param {object} answer - Answer object\n * */\n isComplete = (answer) => Array.isArray(answer) && answer.length > 0;\n\n /*\n * Callback function to change answers\n * @param {object} answer - Answer object\n * @param {boolean} isUndoOperation - Boolean value to check if undo operation is performed\n * */\n changeAnswers: any = (answer, isUndoOperation) => {\n // avoid removeInvalidObjects when undo or redo operations are executed\n // in order to preserve the logic of undo and redo\n const { gssData } = this._model;\n if (gssData.selectedTool === 'lineA' && answer.length > 0) {\n answer[0].fill = gssData['lineA'].lineType;\n }\n if (gssData.selectedTool === 'lineB' && answer.length > 1) {\n answer[1].fill = gssData['lineB'].lineType;\n }\n if (answer.length === 0) {\n gssData.selectedTool = 'lineA';\n this._model.gssData = gssData;\n }\n if (!isUndoOperation) {\n this._session.answer = removeInvalidAnswers(answer);\n } else {\n this._session.answer = answer;\n }\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n this._render();\n };\n\n /*\n * Function to set gssData object and session object\n * @param {object} gssData - GSS Data object\n * @param {object} session - Session object\n * */\n setGssData: any = (gssData, session) => {\n this._model.gssData = gssData;\n this._session = session;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n this._render();\n };\n\n /*\n * Render function\n * */\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers,\n setGssData: this.setGssData,\n });\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;CACQ,MAAM,UAAU,YAAY;CACnC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG,GAAG;EACpB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;IACX,UAAU;GACX;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD;;AAfA,IAeG,IAAI,MAAM,UAAU,YAAY;CAClC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG;EACjB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;GACZ;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD,GCLM,IAAe;CACnB,OAZsB,MAAS,KAAQ,EAAa,MAAM,EAAK,IAAI,KAAK,EAAa,MAAM,EAAK,EAAE;CAalG,QAPqB,MAAU,KAAS,OAAO,SAAS,EAAM,CAAC,KAAK,OAAO,SAAS,EAAM,CAAC;AAQ7F,GAWM,KAAY,GAAG,MACZ,OAAO,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC,GAQnE,KAAkB,GAAO,MAAY;CACzC,IAAI,IAA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,QAAQ;CACf;CAMA,cAAc,MAAW,MAAM,QAAQ,CAAM,KAAK,EAAO,SAAS;CAOlE,iBAAsB,GAAQ,MAAoB;EAGhD,IAAM,EAAE,eAAY,KAAK;EAiBzB,AAhBI,EAAQ,iBAAiB,WAAW,EAAO,SAAS,MACtD,EAAO,GAAG,OAAO,EAAQ,MAAS,WAEhC,EAAQ,iBAAiB,WAAW,EAAO,SAAS,MACtD,EAAO,GAAG,OAAO,EAAQ,MAAS,WAEhC,EAAO,WAAW,MACpB,EAAQ,eAAe,SACvB,KAAK,OAAO,UAAU,IAEnB,IAGH,KAAK,SAAS,SAAS,IAFvB,KAAK,SAAS,SAAS,GAAqB,CAAM,GAIpD,KAAK,cAAc,IAAI,EAAoB,KAAK,QAAQ,YAAY,GAAG,KAAK,WAAW,KAAK,SAAS,MAAM,CAAC,CAAC,GAC7G,KAAK,QAAQ;CACf;CAOA,cAAmB,GAAS,MAAY;EAItC,AAHA,KAAK,OAAO,UAAU,GACtB,KAAK,WAAW,GAChB,KAAK,cAAc,IAAI,EAAoB,KAAK,QAAQ,YAAY,GAAG,KAAK,WAAW,KAAK,SAAS,MAAM,CAAC,CAAC,GAC7G,KAAK,QAAQ;CACf;CAKA,UAAU;EACR,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,UACxB;EAEF,IAAM,IAAK,EAAM,cAAc,GAAM;GACnC,OAAO,KAAK;GACZ,SAAS,KAAK;GACd,iBAAiB,KAAK;GACtB,YAAY,KAAK;EACnB,CAAC;EAKD,AAJA,AACE,KAAK,UAAQ,EAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAE,GACpB,qBAAqB;GACnB,EAAW,IAAI;EACjB,CAAC;CACH;CAEA,uBAAuB;EACrB,AAAI,KAAK,SACP,KAAK,MAAM,QAAQ;CAEvB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/player-events/dist/index.js","../../../src/delivery/utils.ts","../../../../../lib-react/icons/dist/correct-response-icon.js","../../../../../lib-react/correct-answer-toggle/dist/expander.js","../../../../../lib-react/correct-answer-toggle/dist/index.js","../../../src/delivery/main.tsx","../../../src/delivery/index.ts"],"sourcesContent":["//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { e as ModelSetEvent, t as SessionChangedEvent };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing-solution-set/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\n/*\n * Check if a line is complete\n * @param {Object} item - mark object\n * */\nconst completeFromTo = (item) => item && completeMark.point(item.from) && completeMark.point(item.to);\n\n/*\n * Check if a point is correct and complete\n * @param {Object} point - point object\n * */\nconst completePoint = (point) => point && Number.isFinite(point.x) && Number.isFinite(point.y);\n\n/*\n * Complete mark object for line and point\n * */\nconst completeMark = {\n line: completeFromTo,\n point: completePoint,\n};\n\n//////////////////////////////////////////////////////////////////////////////////\n// BELOW FUNCTIONS ARE USED IN configure/src/utils as well\n//////////////////////////////////////////////////////////////////////////////////\n\n/*\n * Function to calculate the distance between two points\n * @param {Object} a - point a\n * @param {Object} b - point b\n * */\nconst distance = (a, b) => {\n return Number(Math.sqrt((a.x - b.x) ** 2 + (a.y - b.y) ** 2).toFixed(3));\n};\n\n/*\n * Function to check if a point lies on edges of a polygon\n * @param {Object} point - point object\n * @param {Array} polygon - polygon points array\n * */\nconst pointInPolygon = (point, polygon) => {\n let c = point;\n let inside = false;\n let clonePolygon = [...polygon];\n clonePolygon.push(polygon[0]);\n for (let i = 0; i < clonePolygon.length - 1; i++) {\n let a = clonePolygon[i];\n let b = clonePolygon[i + 1];\n // check if point is on the edge\n if (distance(a, c) + distance(c, b) === distance(a, b)) {\n inside = true;\n break;\n }\n }\n return inside;\n};\n\n/*\n * Function to get the intersection point of two lines\n * @param {Number} x1 - x coordinate of point 1 of line 1\n * @param {Number} y1 - y coordinate of point 1 of line 1\n * @param {Number} x2 - x coordinate of point 2 of line 1\n * @param {Number} y2 - y coordinate of point 2 of line 1\n * @param {Number} x3 - x coordinate of point 1 of line 2\n * @param {Number} y3 - y coordinate of point 1 of line 2\n * @param {Number} x4 - x coordinate of point 2 of line 2\n * @param {Number} y4 - y coordinate of point 2 of line 2\n * */\nconst lineIntersect = (x1, y1, x2, y2, x3, y3, x4, y4) => {\n let ua,\n denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\n if (denominator === 0) {\n return null;\n }\n ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;\n return {\n x: Number((x1 + ua * (x2 - x1)).toFixed(3)),\n y: Number((y1 + ua * (y2 - y1)).toFixed(3)),\n };\n};\n\n/*\n * Check if a point is inside the graph\n * @param {Object} point - point object\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst isPointInsideGraph = (point, domain, range) => {\n return point.x > domain.min && point.x < domain.max && point.y > range.min && point.y < range.max;\n};\n\n/*\n * Check if a point is on or inside the graph\n * @param {Object} point - point object\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst isPointOnOrInsideGraph = (point, domain, range) => {\n return point.x >= domain.min && point.x <= domain.max && point.y >= range.min && point.y <= range.max;\n};\n\n/*\n * Find the intersection point of a mark with the graph\n * @param {Object} mark - mark object\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst findIntersectionPointForMark = (mark, domain, range) => {\n let intersectionPoint = [];\n let tempData = [\n [domain.max, range.max, domain.max, range.min],\n [domain.min, range.max, domain.min, range.min],\n [domain.min, range.max, domain.max, range.max],\n [domain.min, range.min, domain.max, range.min],\n ];\n for (let i = 0; i < tempData.length; i++) {\n let intersection = lineIntersect(\n mark.from.x,\n mark.from.y,\n mark.to.x,\n mark.to.y,\n tempData[i][0],\n tempData[i][1],\n tempData[i][2],\n tempData[i][3],\n );\n if (intersection && isPointOnOrInsideGraph(intersection, domain, range)) {\n intersectionPoint.push(intersection);\n }\n }\n return intersectionPoint;\n};\n\n/*\n * Sort points in clockwise direction for a polygon\n * @param {Array} points - points array\n * */\nconst sortPointsClockWise = (points) => {\n // Find min max to get center and Sort from top to bottom\n points.sort((a, b) => a.y - b.y);\n // Get center y\n const cy = (points[0].y + points[points.length - 1].y) / 2;\n // Sort from right to left\n points.sort((a, b) => b.x - a.x);\n // Get center x\n const cx = (points[0].x + points[points.length - 1].x) / 2;\n // Center point\n const center = { x: cx, y: cy };\n // As the points are sorted from right to left the first point is the rightmost Starting angle used to reference other angles\n let startAng;\n points.forEach((point) => {\n let ang = Math.atan2(point.y - center.y, point.x - center.x);\n if (!startAng) {\n startAng = ang;\n } else {\n if (ang < startAng) {\n // ensure that all points are clockwise of the start point\n ang += Math.PI * 2;\n }\n }\n point.angle = ang; // add the angle to the point\n });\n // first sort clockwise\n points.sort((a, b) => a.angle - b.angle);\n // then reverse the order\n const ccwPoints = points.reverse();\n // move the last point back to the start\n ccwPoints.unshift(ccwPoints.pop());\n return ccwPoints.map(({ angle, ...attr }) => attr);\n};\n\n/*\n * Function to calculate the dot product of two vectors\n * @param {Object} v1 - point 1\n * @param {Object} v2 - point 2\n * */\nconst dotProduct = (v1, v2) => {\n return v1.x * v2.x + v1.y * v2.y;\n};\n\n/*\n * Function to calculate the magnitude of a vector\n * @param {Object} v - point object\n * */\nconst magnitude = (v) => {\n return Math.sqrt(v.x * v.x + v.y * v.y);\n};\n\n/*\n * Function to calculate the angle between two vectors in radians\n * @param {Object} v1 - point 1\n * @param {Object} v2 - point 2\n * */\nconst angleBetweenVectors = (v1, v2) => {\n const dot = dotProduct(v1, v2);\n const magV1 = magnitude(v1);\n const magV2 = magnitude(v2);\n // Ensure the dot product is within the domain of the acos function\n return Math.acos(dot / (magV1 * magV2));\n};\n\n/*\n * Function to check if a point lies between the angle formed by two lines\n * @param {Object} commonPoint - common point of the two lines\n * @param {Object} point1 - point 1 of cone\n * @param {Object} point2 - point 2 of cone\n * @param {Object} testPoint - point to be tested\n * */\nconst pointInAngle = (commonPoint, point1, point2, testPoint) => {\n const vector1 = { x: point1.x - commonPoint.x, y: point1.y - commonPoint.y };\n const vector2 = { x: point2.x - commonPoint.x, y: point2.y - commonPoint.y };\n const testVector = { x: testPoint.x - commonPoint.x, y: testPoint.y - commonPoint.y };\n const angle1 = angleBetweenVectors(vector1, testVector);\n const angle2 = angleBetweenVectors(vector2, testVector);\n const angleSum = angle1 + angle2;\n // Check if the sum of angles is approximately equal to the angle between the two lines\n // You may need to adjust the tolerance (e.g., 0.0001) based on your specific requirements\n const tolerance = 0.0001;\n return Math.abs(angleSum - angleBetweenVectors(vector1, vector2)) < tolerance;\n};\n\n/*\n * Function to remove duplicate points from an array\n * @param {Array} array - array of points\n * */\nconst removeDuplicatesFromArray = (array) => {\n return array.filter((obj, index) => {\n return index === array.findIndex((o) => obj.x === o.x && obj.y === o.y);\n });\n};\n\n/*\n * Function to remove duplicate points and filter sections\n * @param {Array} sections - array of sections\n * */\nconst removeDuplicateAndFilterSections = (sections) => {\n //removing duplicate points.\n for (let i = 0; i < sections.length; i++) {\n sections[i] = sections[i].filter((obj, index) => {\n return index === sections[i].findIndex((o) => obj.x === o.x && obj.y === o.y);\n });\n }\n //removing arrays with two points\n sections = sections.filter((section) => section.length > 2);\n //sorting the points in clockwise direction\n for (let i = 0; i < sections.length; i++) {\n sections[i] = sortPointsClockWise(sections[i]);\n }\n return sections;\n};\n\n/*\n * Function to find sections in solution set for one line\n * @param {Array} intersectionPoint - intersection point\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst findSectionsInSolutionSetForOneLine = (intersectionPoint, domain, range) => {\n let sections = [];\n sections.push([].concat(intersectionPoint));\n sections.push([].concat(intersectionPoint));\n if (\n (intersectionPoint[0].x === domain.max && intersectionPoint[1].y === range.max) ||\n (intersectionPoint[1].x === domain.max && intersectionPoint[0].y === range.max)\n ) {\n sections[0].push({ x: domain.max, y: range.max });\n sections[1].push({ x: domain.min, y: range.max }, { x: domain.min, y: range.min }, { x: domain.max, y: range.min });\n } else if (\n (intersectionPoint[0].x === domain.min && intersectionPoint[1].y === range.max) ||\n (intersectionPoint[1].x === domain.min && intersectionPoint[0].y === range.max)\n ) {\n sections[0].push({ x: domain.min, y: range.max });\n sections[1].push({ x: domain.max, y: range.max }, { x: domain.max, y: range.min }, { x: domain.min, y: range.min });\n } else if (\n (intersectionPoint[0].x === domain.min && intersectionPoint[1].y === range.min) ||\n (intersectionPoint[1].x === domain.min && intersectionPoint[0].y === range.min)\n ) {\n sections[0].push({ x: domain.min, y: range.min });\n sections[1].push({ x: domain.max, y: range.min }, { x: domain.max, y: range.max }, { x: domain.min, y: range.max });\n } else if (\n (intersectionPoint[0].x === domain.max && intersectionPoint[1].y === range.min) ||\n (intersectionPoint[1].x === domain.max && intersectionPoint[0].y === range.min)\n ) {\n sections[0].push({ x: domain.max, y: range.min });\n sections[1].push({ x: domain.min, y: range.min }, { x: domain.min, y: range.max }, { x: domain.max, y: range.max });\n } else if (\n (intersectionPoint[0].x === domain.min && intersectionPoint[1].x === domain.max) ||\n (intersectionPoint[0].x === domain.max && intersectionPoint[1].x === domain.min)\n ) {\n sections[0].push({ x: domain.min, y: range.max }, { x: domain.max, y: range.max });\n sections[1].push({ x: domain.min, y: range.min }, { x: domain.max, y: range.min });\n } else if (\n (intersectionPoint[0].y === range.min && intersectionPoint[1].y === range.max) ||\n (intersectionPoint[0].y === range.max && intersectionPoint[1].y === range.min)\n ) {\n sections[0].push({ x: domain.min, y: range.min }, { x: domain.min, y: range.max });\n sections[1].push({ x: domain.max, y: range.min }, { x: domain.max, y: range.max });\n }\n return removeDuplicateAndFilterSections(sections);\n};\n\n/*\n * Function to find sections in solution set for two lines\n * @param {Object} gssLineData - graphing solution set line data\n * @param {Array} answers - answers array\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nconst findSectionsInSolutionSetForTwoLines = (gssLineData, answers, domain, range) => {\n let mark1 = answers[0];\n let mark2 = answers[1];\n let cornerPoints = [\n { x: domain.min, y: range.min },\n { x: domain.min, y: range.max },\n { x: domain.max, y: range.min },\n { x: domain.max, y: range.max },\n ];\n let intersectPoint = lineIntersect(\n mark1.from.x,\n mark1.from.y,\n mark1.to.x,\n mark1.to.y,\n mark2.from.x,\n mark2.from.y,\n mark2.to.x,\n mark2.to.y,\n );\n let sections = [];\n let intersectionPoint1 = findIntersectionPointForMark(mark1, domain, range);\n intersectionPoint1 = removeDuplicatesFromArray(intersectionPoint1);\n let intersectionPoint2 = findIntersectionPointForMark(mark2, domain, range);\n intersectionPoint2 = removeDuplicatesFromArray(intersectionPoint2);\n if (intersectPoint && isPointInsideGraph(intersectPoint, domain, range)) {\n for (let i = 0; i < intersectionPoint1.length; i++) {\n for (let j = 0; j < intersectionPoint2.length; j++) {\n let bucket = [];\n let newCornerPoints = [];\n bucket.push(intersectPoint);\n bucket.push(intersectionPoint1[i]);\n bucket.push(intersectionPoint2[j]);\n for (let k = 0; k < cornerPoints.length; k++) {\n if (pointInAngle(intersectPoint, intersectionPoint1[i], intersectionPoint2[j], cornerPoints[k])) {\n bucket.push(cornerPoints[k]);\n } else {\n newCornerPoints.push(cornerPoints[k]);\n }\n }\n cornerPoints = newCornerPoints;\n sections.push(bucket);\n }\n }\n } else {\n let sections1 = findSectionsInSolutionSetForOneLine(intersectionPoint1, domain, range);\n let sections2 = findSectionsInSolutionSetForOneLine(intersectionPoint2, domain, range);\n for (let i = 0; i < sections1.length; i++) {\n if (\n !(pointInPolygon(intersectionPoint2[0], sections1[i]) && pointInPolygon(intersectionPoint2[1], sections1[i]))\n ) {\n sections.push(sections1[i]);\n }\n }\n for (let i = 0; i < sections2.length; i++) {\n if (\n !(pointInPolygon(intersectionPoint1[0], sections2[i]) && pointInPolygon(intersectionPoint1[1], sections2[i]))\n ) {\n sections.push(sections2[i]);\n }\n }\n for (let i = 0; i < sections.length; i++) {\n cornerPoints = cornerPoints.filter(function (o1) {\n return !sections[i].some(function (o2) {\n return o1.x === o2.x && o1.y === o2.y;\n });\n });\n }\n let sections3 = cornerPoints.concat(intersectionPoint1, intersectionPoint2);\n sections.push(sections3);\n }\n return removeDuplicateAndFilterSections(sections);\n};\n\n/*\n * Function to find sections in solution set\n * @param {Object} gssLineData - graphing solution set line data\n * @param {Array} answers - answers array\n * @param {Object} domain - domain object\n * @param {Object} range - range object\n * */\nexport const findSectionsInSolutionSet = (gssLineData, answers, domain, range) => {\n if (gssLineData.numberOfLines === 1) {\n const intersectionPoint = findIntersectionPointForMark(answers[0], domain, range);\n gssLineData.sections = findSectionsInSolutionSetForOneLine(intersectionPoint, domain, range);\n } else {\n gssLineData.sections = findSectionsInSolutionSetForTwoLines(gssLineData, answers, domain, range);\n }\n return gssLineData;\n};\n\n/*\n * Function to check if a point is inside a polygon\n * @param {Object} point - point to be checked\n * @param {Array} polygon - polygon points array\n * */\nexport const pointInsidePolygon = (point, polygon) => {\n const num_vertices = polygon.length;\n const x = point.x;\n const y = point.y;\n let inside = false;\n let p1 = polygon[0];\n let p2;\n for (let i = 1; i <= num_vertices; i++) {\n p2 = polygon[i % num_vertices];\n if (y > Math.min(p1.y, p2.y)) {\n if (y <= Math.max(p1.y, p2.y)) {\n if (x <= Math.max(p1.x, p2.x)) {\n const x_intersection = ((y - p1.y) * (p2.x - p1.x)) / (p2.y - p1.y) + p1.x;\n if (p1.x === p2.x || x <= x_intersection) {\n inside = !inside;\n }\n }\n }\n }\n p1 = p2;\n }\n return inside;\n};\n\n/*\n * Function to check if lines are added in the graph\n * @param {Object} gssLineData - graphing solution set line data\n * @param {Array} answer - answer array\n * */\nexport const checkIfLinesAreAdded = (gssLineData, answer) => {\n if (answer.length === 0) {\n return false;\n }\n if (gssLineData.numberOfLines === 1) {\n if (answer.length === 1) {\n return !answer[0].building;\n }\n } else {\n if (answer.length !== 2) {\n return false;\n } else {\n return !answer[1].building;\n }\n }\n};\n\n/*\n * Function to remove invalid answers\n * @param {Array} answers - answers array\n * */\nexport const removeInvalidAnswers = (answers) =>\n answers\n ? (answers || []).filter(({ type, ...answer }) => (completeMark[type] ? completeMark[type](answer) : false))\n : [];\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\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\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 { 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 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(\"div\")(() => ({\n\tmargin: \"0 auto\",\n\ttextAlign: \"center\",\n\tdisplay: \"flex\"\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\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/**\n * @synced-from pie-elements/packages/graphing-solution-set/src/main.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GraphContainer } from '@pie-lib/graphing-solution-set';\nimport { color, Collapsible as CollapsibleImport, 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 Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\nimport { findSectionsInSolutionSet, pointInsidePolygon, checkIfLinesAreAdded } from './utils.js';\nimport { AlertDialog } from '@pie-lib/config-ui';\n\nconst MainContainer: any = styled(UiLayout)({\n color: color.text(),\n backgroundColor: color.background(),\n});\n\nconst TeacherInstructions: any = styled(Collapsible)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst Graph: any = styled(GraphContainer)(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n session: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n };\n\n state = {\n showingCorrect: false,\n dialog: {\n open: false,\n },\n };\n\n /*\n * Function to handle the AlertDialog\n * @param {boolean} open - open state of the dialog\n * @param {function} callback - callback function to be called after setting the state\n * */\n handleAlertDialog = (open, callback) =>\n this.setState(\n {\n dialog: { open },\n },\n callback,\n );\n\n /*\n * Function to toggle the correct answer\n * @param {boolean} showingCorrect - state of the correct answer\n * */\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n /*\n * Reset the graph to original state\n * */\n onResetClick: any = () => {\n const { model, session, setGssData } = this.props;\n let { gssData } = model;\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `This will remove all the elements added on the graph and reset graph to original state. Are you sure you want to continue?`,\n onConfirm: () => {\n // Reset the graph to original state\n session.answer = [];\n gssData.selectedTool = 'lineA';\n gssData.lineA.lineType = 'Solid';\n if (gssData.lineB) gssData.lineB.lineType = 'Solid';\n // Set the gssData and session\n setGssData(gssData, session);\n this.handleAlertDialog(false);\n },\n onClose: () => this.handleAlertDialog(false),\n },\n });\n };\n\n /*\n * Function to handle the event of solution set selected\n * @param {object} point - point selected on the graph\n * */\n onSolutionSetSelected: any = (point) => {\n const { model, session, setGssData } = this.props;\n const { gssData, disabled } = model;\n if (disabled) {\n return;\n }\n for (const section of gssData.sections) {\n if (pointInsidePolygon(point, section)) {\n let polygon = {\n points: section,\n building: false,\n type: 'polygon',\n closed: true,\n isSolution: true,\n };\n session.answer = session.answer.filter((mark) => mark.type !== 'polygon');\n session.answer.push(polygon);\n break;\n }\n }\n setGssData(gssData, session);\n };\n\n /*\n * Function to handle the event of change in GSS Line Data\n * @param {object} gssData - GSS Line Data\n * @param {string} oldSelectedTool - old selected tool\n * */\n onChangeGssLineData: any = (gssData, oldSelectedTool) => {\n const { model, session } = this.props;\n const { domain, range, disabled } = model;\n if (disabled) {\n return;\n }\n if (gssData.selectedTool === 'solutionSet') {\n let lines = session.answer.filter((mark) => mark.type !== 'polygon');\n if (!checkIfLinesAreAdded(gssData, lines)) {\n gssData.selectedTool = oldSelectedTool;\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Please define the line(s) and then select a solution set for the item.',\n onConfirm: () => this.handleAlertDialog(false),\n },\n });\n } else {\n let lines = session.answer.filter((mark) => mark.type !== 'polygon');\n gssData = findSectionsInSolutionSet(gssData, lines, domain, range);\n }\n this.handleGssDataChange(gssData, session);\n } else {\n let polygons = session.answer.filter((mark) => mark.type === 'polygon');\n if (oldSelectedTool === 'solutionSet' && polygons.length > 0) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Changing a line after adding a solution set will clear your selected solution set. Click \\'Clear Solution Set\\' to change the line. Otherwise, click \\'Cancel\\'.',\n onConfirm: () => {\n session.answer = session.answer.filter((mark) => mark.type !== 'polygon');\n this.handleGssDataChange(gssData, session);\n this.handleAlertDialog(false);\n },\n onConfirmText: 'CLEAR SOLUTION SET',\n onClose: () => {\n gssData.selectedTool = oldSelectedTool;\n this.handleGssDataChange(gssData, session);\n this.handleAlertDialog(false);\n },\n },\n });\n } else {\n this.handleGssDataChange(gssData, session);\n }\n }\n };\n\n /*\n * Function to handle the event of change in GSS Data\n * @param {object} gssData - GSS Data\n * @param {object} session - session data\n * */\n handleGssDataChange: any = (gssData, session) => {\n const { setGssData } = this.props;\n if (session.answer && session.answer.length > 0 && session.answer[0] && gssData.lineA) {\n session.answer[0].fill = gssData.lineA.lineType;\n }\n if (session.answer && session.answer.length > 1 && session.answer[1] && gssData.lineB) {\n session.answer[1].fill = gssData.lineB.lineType;\n }\n if (\n (gssData.selectedTool === 'lineB' && session.answer.length === 0) ||\n (gssData.selectedTool === 'lineB' && session.answer[0].building)\n ) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Please add Line A to the graph before adding Line B',\n onConfirm: () => this.handleAlertDialog(false),\n },\n });\n gssData.selectedTool = 'lineA';\n }\n if (gssData.selectedTool === 'lineA' && session.answer.length > 1 && session.answer[1].building) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: 'Please add Line B to the graph before switching to Line A',\n onConfirm: () => this.handleAlertDialog(false),\n },\n });\n gssData.selectedTool = 'lineB';\n }\n setGssData(gssData, session);\n };\n\n /*\n * Render the component\n * */\n render() {\n const { model, onAnswersChange, session } = this.props;\n const { showingCorrect, dialog } = this.state;\n const { answer } = session || {};\n const {\n answersCorrected,\n arrows,\n coordinatesOnHover,\n correctResponse,\n defaultTool,\n disabled,\n domain,\n extraCSSRules,\n labels,\n labelsEnabled,\n prompt,\n range,\n rationale,\n size,\n showToggle,\n title,\n titleEnabled,\n teacherInstructions,\n language,\n gssLineData,\n gssData,\n } = model || {};\n const marks = answersCorrected || answer || [];\n const showRationale = model.rationale && (hasText(model.rationale) || hasMedia(model.rationale));\n const showTeacherInstructions =\n model.teacherInstructions && (hasText(model.teacherInstructions) || hasMedia(model.teacherInstructions));\n return (\n <MainContainer extraCSSRules={extraCSSRules}>\n {showTeacherInstructions && (\n <TeacherInstructions\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </TeacherInstructions>\n )}\n {prompt && <PreviewPrompt className=\"prompt\" prompt={prompt} />}\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n language={language}\n />\n {showingCorrect && showToggle ? (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n coordinatesOnHover={coordinatesOnHover}\n disabled={true}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={correctResponse.map((i) => ({ ...i, correctness: 'correct' }))}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n language={language}\n gssLineData={gssLineData}\n onChangeGssLineData={this.onChangeGssLineData}\n onSolutionSetSelected={this.onSolutionSetSelected}\n toolbarTools={['line', 'polygon']}\n />\n ) : (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n coordinatesOnHover={coordinatesOnHover}\n defaultTool={defaultTool}\n disabled={disabled}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n onCustomReset={this.onResetClick}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n language={language}\n gssLineData={gssData}\n onChangeGssLineData={this.onChangeGssLineData}\n onSolutionSetSelected={this.onSolutionSetSelected}\n toolbarTools={['line', 'polygon']}\n />\n )}\n {showRationale && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n <AlertDialog\n open={dialog.open}\n title={dialog.title}\n text={dialog.text}\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n onConfirmText={dialog.onConfirmText ? dialog.onConfirmText : 'OK'}\n />\n </MainContainer>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing-solution-set/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport { findSectionsInSolutionSet, removeInvalidAnswers } from './utils.js';\nimport Main from './main.js';\n\nexport { Main as Component };\n\nexport default class Graphing extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n }\n\n /*\n * Function to set model\n * @param {object} m - Model object\n * */\n set model(m) {\n this._model = m;\n this._render();\n }\n\n /*\n * Function to set session\n * @param {object} s - Session object\n * */\n set session(s) {\n this._session = s;\n if (!this._session.answer) {\n this._session.answer = [];\n }\n const { answer } = this._session || {};\n const { gssLineData, domain, range } = this._model;\n let section = answer && answer.filter((mark) => mark.type === 'polygon').length > 0;\n if (gssLineData.numberOfLines === 1) {\n this._model.gssData = {\n numberOfLines: 1,\n selectedTool: section ? 'solutionSet' : 'lineA',\n sections: [],\n lineA: {\n lineType: answer && answer.length > 0 ? answer[0].fill : 'Solid',\n },\n };\n } else {\n this._model.gssData = {\n numberOfLines: 2,\n selectedTool: section ? 'solutionSet' : 'lineA',\n sections: [],\n lineA: {\n lineType: answer && answer.length > 0 ? answer[0].fill : 'Solid',\n },\n lineB: {\n lineType: answer && answer.length > 1 ? answer[1].fill : 'Solid',\n },\n };\n }\n if (section) {\n this._model.gssData = findSectionsInSolutionSet(this._model.gssData, answer, domain, range);\n }\n this._render();\n }\n\n /*\n * Function to get session\n * */\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._render();\n }\n\n /*\n * Is complete function\n * @param {object} answer - Answer object\n * */\n isComplete = (answer) => Array.isArray(answer) && answer.length > 0;\n\n /*\n * Callback function to change answers\n * @param {object} answer - Answer object\n * @param {boolean} isUndoOperation - Boolean value to check if undo operation is performed\n * */\n changeAnswers: any = (answer, isUndoOperation) => {\n // avoid removeInvalidObjects when undo or redo operations are executed\n // in order to preserve the logic of undo and redo\n const { gssData } = this._model;\n if (gssData.selectedTool === 'lineA' && answer.length > 0) {\n answer[0].fill = gssData['lineA'].lineType;\n }\n if (gssData.selectedTool === 'lineB' && answer.length > 1) {\n answer[1].fill = gssData['lineB'].lineType;\n }\n if (answer.length === 0) {\n gssData.selectedTool = 'lineA';\n this._model.gssData = gssData;\n }\n if (!isUndoOperation) {\n this._session.answer = removeInvalidAnswers(answer);\n } else {\n this._session.answer = answer;\n }\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n this._render();\n };\n\n /*\n * Function to set gssData object and session object\n * @param {object} gssData - GSS Data object\n * @param {object} session - Session object\n * */\n setGssData: any = (gssData, session) => {\n this._model.gssData = gssData;\n this._session = session;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n this._render();\n };\n\n /*\n * Render function\n * */\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers,\n setGssData: this.setGssData,\n });\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }\n}\n"],"mappings":";;;;;CACQ,MAAM,UAAU,YAAY;CACnC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG,GAAG;EACpB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;IACX,UAAU;GACX;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD;IAAG,IAAI,MAAM,UAAU,YAAY;CAClC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG;EACjB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;GACZ;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD,GCLM,IAAe;CACnB,OAZsB,MAAS,KAAQ,EAAa,MAAM,EAAK,IAAI,KAAK,EAAa,MAAM,EAAK,EAAE;CAalG,QAPqB,MAAU,KAAS,OAAO,SAAS,EAAM,CAAC,KAAK,OAAO,SAAS,EAAM,CAAC;AAQ7F,GAWM,KAAY,GAAG,MACZ,OAAO,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAQnE,KAAkB,GAAO,MAAY;CACzC,IAAI,IAAI,GACJ,IAAS,IACT,IAAe,CAAC,GAAG,CAAO;CAC9B,EAAa,KAAK,EAAQ,EAAE;CAC5B,KAAK,IAAI,IAAI,GAAG,IAAI,EAAa,SAAS,GAAG,KAAK;EAChD,IAAI,IAAI,EAAa,IACjB,IAAI,EAAa,IAAI;EAEzB,IAAI,EAAS,GAAG,CAAC,IAAI,EAAS,GAAG,CAAC,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,MAAM,OAAO,CAAE,GACpB,qBAAqB;GACnB,EAAW,IAAI;EACjB,CAAC;CACH;CAEA,uBAAuB;EACrB,AAEE,KAAK,WADL,KAAK,MAAM,QAAQ,GACN;CAEjB;AACF"}
@@ -36,4 +36,4 @@ var i = (e, n) => t(e.from, n.from) && t(e.to, n.to) || t(e.to, n.from) && t(e.f
36
36
  polygon: (e) => e && e.points && e.points.length && (e.points.filter((e) => m(e)) || []).length === e.points.length
37
37
  }, g = (e) => e ? (e || []).filter(({ type: e, ...t }) => h[e] ? h[e](t) : !1) : [];
38
38
  //#endregion
39
- export { p as equalMarks, g as removeInvalidAnswers, a as sortedAnswers };
39
+ export { l as constructSegmentsFromPoints, c as equalLine, p as equalMarks, f as equalPolygon, i as equalSegment, u as removeDuplicateSegments, g as removeInvalidAnswers, d as removeInvalidSegments, a as sortedAnswers };
@@ -1,5 +1,5 @@
1
1
  import { findSectionsInSolutionSet as e, removeInvalidAnswers as t } from "./utils.js";
2
- import n from "./main.js";
2
+ import { Main as n } from "./main.js";
3
3
  import r from "react";
4
4
  import { createRoot as i } from "react-dom/client";
5
5
  import { SessionChangedEvent as a } from "@pie-element/shared-player-events";
@@ -55,7 +55,7 @@ var s = class extends HTMLElement {
55
55
  });
56
56
  }
57
57
  disconnectedCallback() {
58
- this._root && this._root.unmount();
58
+ this._root &&= (this._root.unmount(), null);
59
59
  }
60
60
  };
61
61
  //#endregion
@@ -195,4 +195,4 @@ var b = y(u, "UiLayout") || y(T.UiLayout, "UiLayout"), x = y(l, "PreviewPrompt")
195
195
  }
196
196
  };
197
197
  //#endregion
198
- export { k as default };
198
+ export { k as Main, k as default };