@khanacademy/perseus 39.0.0 → 40.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.js CHANGED
@@ -6,9 +6,9 @@ import { View, RenderStateRoot, UniqueIDProvider, useOnMountEffect, useLatestRef
6
6
  import Tooltip$1 from '@khanacademy/wonder-blocks-tooltip';
7
7
  import { HeadingMedium, LabelSmall, Body, LabelMedium } from '@khanacademy/wonder-blocks-typography';
8
8
  import { StyleSheet, css } from 'aphrodite';
9
- import classNames from 'classnames';
9
+ import classNames$1 from 'classnames';
10
10
  import * as React from 'react';
11
- import React__default, { useContext, useState, useEffect, useRef, createContext, forwardRef, useImperativeHandle } from 'react';
11
+ import React__default, { useContext, useState, useEffect, useRef, createContext, forwardRef, useLayoutEffect, useImperativeHandle } from 'react';
12
12
  import * as ReactDOM from 'react-dom';
13
13
  import ReactDOM__default from 'react-dom';
14
14
  import _, { debounce as debounce$1 } from 'underscore';
@@ -479,7 +479,7 @@ class InnerMathInput extends React.Component {
479
479
  });
480
480
  }
481
481
  render() {
482
- let className = classNames({
482
+ let className = classNames$1({
483
483
  "perseus-math-input": true,
484
484
  // mathquill usually adds these itself but react removes them when
485
485
  // updating the component.
@@ -2437,7 +2437,7 @@ class Expression extends React.Component {
2437
2437
  onBlur: this._handleBlur
2438
2438
  }));
2439
2439
  }
2440
- const className = classNames({
2440
+ const className = classNames$1({
2441
2441
  "perseus-widget-expression": true,
2442
2442
  "show-error-tooltip": this.state.showErrorTooltip
2443
2443
  });
@@ -3886,12 +3886,12 @@ Zoom.prototype.dispose = function () {
3886
3886
  const ZoomService = new ZoomServiceClass();
3887
3887
 
3888
3888
  // @baseFontFamily: "Lato", sans-serif;
3889
- const baseFontFamily$1 = "'Lato', sans-serif";
3889
+ const baseFontFamily = "'Lato', sans-serif";
3890
3890
  // @boldFontFamily: "Lato-Bold", "Lato", sans-serif;
3891
3891
  const boldFontFamily = "'Lato-Bold', 'Lato', sans-serif";
3892
3892
  // @kaGreen: #71b307;
3893
- const kaGreen$1 = "#71B307";
3894
- const white$1 = "#FFFFFF";
3893
+ const kaGreen = "#71B307";
3894
+ const white = "#FFFFFF";
3895
3895
  const gray97 = "#F6F7F7";
3896
3896
  const gray85 = "#D6D8DA";
3897
3897
  const gray76 = "#BABEC2";
@@ -3899,23 +3899,23 @@ const gray68 = "#888D93";
3899
3899
  const gray17 = "#21242c";
3900
3900
 
3901
3901
  // @pure-sm-min: 568px;
3902
- const pureSmMin$2 = "568px";
3902
+ const pureSmMin$1 = "568px";
3903
3903
  // @pure-md-min: 768px;
3904
- const pureMdMin$2 = "768px";
3904
+ const pureMdMin$1 = "768px";
3905
3905
  // @pure-lg-min: 1024px;
3906
- const pureLgMin$2 = "1024px";
3906
+ const pureLgMin$1 = "1024px";
3907
3907
  // @pure-xl-min: 1280px;
3908
- const pureXlMin$2 = "1280px";
3908
+ const pureXlMin$1 = "1280px";
3909
3909
  // @pure-xs-max: (@pure-sm-min - 1);
3910
- const pureXsMax$2 = "567px";
3910
+ const pureXsMax$1 = "567px";
3911
3911
  // @pure-sm-max: (@pure-md-min - 1);
3912
- const pureSmMax$2 = "767px";
3912
+ const pureSmMax$1 = "767px";
3913
3913
  // @pure-md-max: (@pure-lg-min - 1);
3914
- const pureMdMax$2 = "1023px";
3914
+ const pureMdMax$1 = "1023px";
3915
3915
  // @pure-lg-max: (@pure-xl-min - 1);
3916
- const pureLgMax$2 = "1279px";
3916
+ const pureLgMax$1 = "1279px";
3917
3917
  // @tableBackgroundAccent: #f9f9f9; // for striping
3918
- const tableBackgroundAccent$1 = "#F9F9F9";
3918
+ const tableBackgroundAccent = "#F9F9F9";
3919
3919
  // @zIndexAboveScratchpad: @zIndexScratchPad + 1;
3920
3920
  const zIndexAboveScratchpad$1 = 2;
3921
3921
  // @zIndexInteractiveComponent: @zIndexAboveScratchpad + 1;
@@ -3943,26 +3943,26 @@ const checkedColor$1 = "#71B307";
3943
3943
  const articleMaxWidthInPx = 688;
3944
3944
  const articleMaxWidthTableInPx = 512;
3945
3945
 
3946
- var constants$1 = /*#__PURE__*/Object.freeze({
3946
+ var constants = /*#__PURE__*/Object.freeze({
3947
3947
  __proto__: null,
3948
- baseFontFamily: baseFontFamily$1,
3948
+ baseFontFamily: baseFontFamily,
3949
3949
  boldFontFamily: boldFontFamily,
3950
- kaGreen: kaGreen$1,
3951
- white: white$1,
3950
+ kaGreen: kaGreen,
3951
+ white: white,
3952
3952
  gray97: gray97,
3953
3953
  gray85: gray85,
3954
3954
  gray76: gray76,
3955
3955
  gray68: gray68,
3956
3956
  gray17: gray17,
3957
- pureSmMin: pureSmMin$2,
3958
- pureMdMin: pureMdMin$2,
3959
- pureLgMin: pureLgMin$2,
3960
- pureXlMin: pureXlMin$2,
3961
- pureXsMax: pureXsMax$2,
3962
- pureSmMax: pureSmMax$2,
3963
- pureMdMax: pureMdMax$2,
3964
- pureLgMax: pureLgMax$2,
3965
- tableBackgroundAccent: tableBackgroundAccent$1,
3957
+ pureSmMin: pureSmMin$1,
3958
+ pureMdMin: pureMdMin$1,
3959
+ pureLgMin: pureLgMin$1,
3960
+ pureXlMin: pureXlMin$1,
3961
+ pureXsMax: pureXsMax$1,
3962
+ pureSmMax: pureSmMax$1,
3963
+ pureMdMax: pureMdMax$1,
3964
+ pureLgMax: pureLgMax$1,
3965
+ tableBackgroundAccent: tableBackgroundAccent,
3966
3966
  zIndexAboveScratchpad: zIndexAboveScratchpad$1,
3967
3967
  zIndexInteractiveComponent: zIndexInteractiveComponent$1,
3968
3968
  phoneMargin: phoneMargin,
@@ -4080,7 +4080,7 @@ class FixedToResponsive extends React.Component {
4080
4080
  };
4081
4081
 
4082
4082
  // NOTE(jeremy): This depends on styles defined in perseus-renderer.less
4083
- const className = classNames("fixed-to-responsive", this.props.className);
4083
+ const className = classNames$1("fixed-to-responsive", this.props.className);
4084
4084
  const container = /*#__PURE__*/React.createElement("div", {
4085
4085
  className: className,
4086
4086
  style: style
@@ -14853,77 +14853,26 @@ const iconCheck = {
14853
14853
  width: 24,
14854
14854
  height: 24
14855
14855
  };
14856
- const iconCheckMedium = {
14857
- path: "M6.072 10.4l6.175-7.058a1 1 0 1 1 1.506 1.317L6.769 12.64a1 1 0 0 1-1.55-.054L2.203 8.604a1 1 0 1 1 1.594-1.208L6.072 10.4z",
14858
- width: 16,
14859
- height: 16
14860
- };
14861
14856
  const iconChevronDown = {
14862
14857
  path: "M99.669 13.048q0 3.36-2.352 5.712l-41.664 41.664q-2.408 2.408-5.88 2.408t-5.712-2.408l-41.664-41.664q-2.408-2.24-2.408-5.712t2.408-5.88l4.76-4.816q2.52-2.352 5.88-2.352t5.656 2.352l31.136 31.136 31.08-31.136q2.352-2.352 5.712-2.352t5.88 2.352l4.816 4.816q2.352 2.52 2.352 5.88z",
14863
14858
  width: 100,
14864
14859
  height: 63.034
14865
14860
  };
14866
- const iconChevronRight = {
14867
- path: "M62.808 49.728q0 3.36-2.352 5.88l-41.72 41.664q-2.352 2.408-5.768 2.408t-5.768-2.408l-4.872-4.76q-2.352-2.52-2.352-5.88t2.352-5.712l31.08-31.136-31.08-31.024q-2.352-2.52-2.352-5.88t2.352-5.712l4.872-4.76q2.296-2.408 5.768-2.408t5.768 2.408l41.72 41.664q2.352 2.296 2.352 5.656z",
14868
- width: 63.034,
14869
- height: 100
14870
- };
14871
14861
  const iconCircle = {
14872
14862
  path: "M100.035 50.046q.057 13.623-6.669 25.137t-18.24 18.183-25.08 6.669-25.137-6.726q-11.514-6.726-18.183-18.183-6.726-11.571-6.726-25.137t6.726-25.08 18.24-18.24 25.08-6.669q13.566 0 25.08 6.726 11.514 6.669 18.24 18.183t6.669 25.137z",
14873
14863
  width: 100,
14874
14864
  height: 100
14875
14865
  };
14876
- const iconCircleArrowDown = {
14877
- path: "M50.046 83.676q1.767 0 2.907-1.14l29.526-29.526q1.197-1.197 1.197-2.907t-1.197-2.964l-5.928-5.928q-1.197-1.14-2.964-1.14t-2.907 1.14l-12.312 12.312l0-32.661q0-1.71-1.254-2.964t-2.907-1.254l-8.322 0q-1.71 0-2.964 1.254t-1.254 2.964l0 32.661l-12.312-12.312q-1.197-1.254-2.907-1.254t-2.907 1.254l-5.928 5.928q-1.197 1.197-1.197 2.964t1.197 2.907l29.469 29.526q1.197 1.14 2.964 1.14zm49.989-33.63q.057 13.623-6.669 25.137t-18.24 18.183-25.08 6.669-25.137-6.726q-11.514-6.726-18.183-18.183-6.726-11.571-6.726-25.137t6.726-25.08 18.24-18.24 25.08-6.669q13.566 0 25.08 6.726 11.514 6.669 18.24 18.183t6.669 25.137z",
14878
- width: 100,
14879
- height: 100
14880
- };
14881
- const iconCircleArrowUp = {
14882
- path: "M54.207 83.391q1.653 0 2.907-1.254t1.254-2.907l0-32.718l12.312 12.312q1.254 1.254 2.964 1.254t2.907-1.254l5.928-5.928q1.197-1.197 1.14-2.964 0-1.767-1.14-2.907l-29.526-29.526q-1.197-1.14-2.907-1.14t-2.964 1.14l-29.469 29.526q-1.197 1.254-1.197 2.964t1.197 2.907l5.928 5.928q1.197 1.197 2.907 1.197t2.907-1.197l12.312-12.312l0 32.718q0 1.653 1.254 2.907t2.964 1.254l8.322 0zm45.828-33.345q.057 13.623-6.669 25.137t-18.24 18.183-25.08 6.669-25.137-6.726q-11.514-6.726-18.183-18.183-6.726-11.571-6.726-25.137t6.726-25.08 18.24-18.24 25.08-6.669q13.566 0 25.08 6.726 11.514 6.669 18.24 18.183t6.669 25.137z",
14883
- width: 100,
14884
- height: 100
14885
- };
14886
14866
  const iconCircleThin = {
14887
14867
  path: "M50.046 8.322q-8.493 0-16.188 3.306-15.561 6.669-22.173 22.23-3.363 7.695-3.363 16.188t3.306 16.188 8.949 13.281q5.586 5.586 13.281 8.892t16.188 3.306 16.188-3.306 13.281-8.892 8.892-13.281 3.306-16.188-3.306-16.188-8.892-13.281-13.281-8.949q-7.695-3.306-16.188-3.306zm0 91.713q-13.623 0-25.137-6.726t-18.183-18.183q-6.726-11.571-6.726-25.137t6.726-25.08 18.24-18.24 25.08-6.669q13.566 0 25.08 6.726 11.514 6.669 18.24 18.183t6.726 25.137-6.726 25.137-18.24 18.126q-11.514 6.726-25.08 6.726z",
14888
14868
  width: 100,
14889
14869
  height: 99.944
14890
14870
  };
14891
- const iconDesktop = {
14892
- path: "M94.208 52.119l0-43.746q0-.69-.506-1.15t-1.196-.506l-84.088 0q-.69 0-1.196.506t-.506 1.15l0 43.746q0 .69.506 1.196t1.196.506l84.088 0q.69 0 1.196-.506t.506-1.196zm6.716-43.746l0 57.224q0 3.45-2.484 5.934t-5.934 2.484l-28.566 0q0 3.128 2.53 7.774.828 1.61.828 2.622t-1.012 2.07q-1.012 1.012-2.346.966l-26.91 0q-1.38 0-2.392-1.012t-1.012-2.024q0-1.058 1.656-4.14t1.748-6.256l-28.612 0q-3.45 0-5.934-2.484t-2.484-5.934l0-57.224q0-3.45 2.484-5.934t5.934-2.438l84.088 0q3.45 0 5.98 2.438 2.438 2.484 2.438 5.934z",
14893
- width: 100,
14894
- height: 86.648
14895
- };
14896
- const iconDropdownArrow = {
14897
- path: "M9 9.8c0 .5.7 1.7 1.5 2.8 1.5 1.9 1.5 1.9 3 0C15.7 9.7 15.4 9 12 9c-1.6 0-3 .4-3 .8z",
14898
- width: 24,
14899
- height: 24
14900
- };
14901
- const iconExclamationSign = {
14902
- path: "M58.368 81.225l0-12.369q0-.912-.57-1.539t-1.425-.627l-12.54 0q-.855-.057-1.482.627t-.684 1.539l0 12.369q-.057.855.627 1.482t1.539.684l12.54 0q.855 0 1.425-.627t.57-1.539zm1.026-62.871q0-1.596-2.223-1.71l-14.307 0q-2.109 0-2.223 1.71l1.14 40.47q0 .627.627 1.14t1.539.456l12.084 0q.912-.057 1.539-.513t.684-1.083zm-9.348-18.354q13.566 0 25.08 6.726 11.514 6.669 18.24 18.183t6.726 25.137-6.726 25.137-18.24 18.183-25.08 6.669-25.137-6.726q-11.514-6.726-18.183-18.183-6.726-11.571-6.726-25.137t6.726-25.08 18.24-18.24 25.08-6.669z",
14903
- width: 100,
14904
- height: 99.944
14905
- };
14906
- // Grabbed from https://github.com/encharm/Font-Awesome-SVG-PNG
14907
- const iconGear = {
14908
- path: "M1152 896q0-106-75-181t-181-75-181 75-75 181 75 181 181 75 181-75 75-181zm512-109v222q0 12-8 23t-20 13l-185 28q-19 54-39 91 35 50 107 138 10 12 10 25t-9 23q-27 37-99 108t-94 71q-12 0-26-9l-138-108q-44 23-91 38-16 136-29 186-7 28-36 28h-222q-14 0-24.5-8.5t-11.5-21.5l-28-184q-49-16-90-37l-141 107q-10 9-25 9-14 0-25-11-126-114-165-168-7-10-7-23 0-12 8-23 15-21 51-66.5t54-70.5q-27-50-41-99l-183-27q-13-2-21-12.5t-8-23.5v-222q0-12 8-23t19-13l186-28q14-46 39-92-40-57-107-138-10-12-10-24 0-10 9-23 26-36 98.5-107.5t94.5-71.5q13 0 26 10l138 107q44-23 91-38 16-136 29-186 7-28 36-28h222q14 0 24.5 8.5t11.5 21.5l28 184q49 16 90 37l142-107q9-9 24-9 13 0 25 10 129 119 165 170 7 8 7 22 0 12-8 23-15 21-51 66.5t-54 70.5q26 50 41 98l183 28q13 2 21 12.5t8 23.5z",
14909
- width: 1792,
14910
- height: 1792
14911
- };
14912
- const iconMobilePhone = {
14913
- path: "M36.04 89.557q0-2.584-1.836-4.42t-4.42-1.836-4.352 1.836q-1.836 1.836-1.836 4.42t1.836 4.352 4.42 1.836q2.652-.068 4.42-1.836t1.768-4.352zm16.184-12.444l0-54.74q0-1.088-.748-1.768t-1.768-.68l-39.78 0q-1.088 0-1.768.748t-.68 1.7l0 54.74q0 1.02.748 1.768t1.7.68l39.78 0q1.02-.068 1.768-.748t.748-1.7zm-14.892-65.892q0-1.224-1.292-1.292l-12.444 0q-1.224.068-1.224 1.292t1.224 1.224l12.444 0q1.292 0 1.292-1.224zm22.372-1.292l0 79.628q0 3.944-2.992 6.936t-7.004 2.992l-39.78 0q-4.012 0-7.004-2.924-2.924-2.924-2.924-7.004l0-79.628q0-4.012 2.924-6.936t7.004-2.992l39.78 0q4.012-.068 7.004 2.924t2.992 7.004z",
14914
- width: 60.013,
14915
- height: 100
14916
- };
14917
14871
  const iconOk = {
14918
14872
  path: "M37.964 76.048q-2.576 0-4.368-1.792l-31.864-31.864q-1.792-1.792-1.792-4.368t1.792-4.368l8.736-8.68q1.792-1.792 4.368-1.792t4.312 1.792l18.816 18.872 42-42.056q1.792-1.792 4.368-1.792t4.312 1.792l8.736 8.736q1.792 1.792 1.792 4.368t-1.792 4.312l-55.048 55.048q-1.792 1.792-4.368 1.792z",
14919
14873
  width: 100,
14920
14874
  height: 76.637
14921
14875
  };
14922
- const iconPlus = {
14923
- path: "M99.758 43.09l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-29.45 0l0 29.45q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-29.45l-29.45 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l29.45 0l0-29.45q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836l0 29.45l29.45 0q2.852 0 4.836 1.984t1.984 4.836z",
14924
- width: 100,
14925
- height: 100
14926
- };
14927
14876
  const iconRemove = {
14928
14877
  path: "M100.464 80.808q0 3.404-2.368 5.772l-11.47 11.544q-2.368 2.368-5.772 2.368t-5.698-2.368l-24.864-24.864-24.864 24.864q-2.368 2.368-5.772 2.368t-5.772-2.368l-11.47-11.544q-2.368-2.368-2.368-5.772t2.368-5.698l24.864-24.864-24.864-24.864q-2.368-2.368-2.368-5.772t2.368-5.772l11.47-11.47q2.368-2.368 5.772-2.368t5.772 2.368l24.864 24.864 24.864-24.864q2.294-2.368 5.698-2.368t5.772 2.368l11.47 11.47q2.368 2.368 2.368 5.772t-2.368 5.772l-24.864 24.864 24.864 24.864q2.368 2.294 2.368 5.698z",
14929
14878
  width: 100,
@@ -14939,53 +14888,17 @@ const iconTryAgain = {
14939
14888
  width: 23,
14940
14889
  height: 23
14941
14890
  };
14942
- const iconTablet = {
14943
- path: "M45.322 90.706q0-1.86-1.302-3.224-1.364-1.364-3.224-1.364t-3.224 1.364-1.302 3.224q0 1.86 1.364 3.224 1.302 1.364 3.162 1.302 1.86.062 3.224-1.302t1.302-3.224zm27.218-11.346l0-68.014q0-.93-.682-1.612t-1.55-.682l-58.962 0q-.93 0-1.612.682t-.682 1.612l0 68.014q0 .93.682 1.612t1.612.62l58.962 0q.992-.062 1.612-.682t.62-1.55zm9.114-68.014l0 77.066q0 4.65-3.348 7.998t-7.998 3.348l-58.962 0q-4.65 0-7.998-3.348t-3.348-7.998l0-77.066q0-4.65 3.348-7.998t7.998-3.348l58.962 0q4.65 0 7.998 3.348t3.348 7.998z",
14944
- width: 81.852,
14945
- height: 100
14946
- };
14947
14891
  const iconTrash = {
14948
14892
  path: "M31.293 37.506q2.052 0 2.052 2.109l0 37.506q0 1.995-2.052 2.109l-4.218 0q-.912-.057-1.482-.627t-.57-1.482l0-37.506q0-2.109 2.052-2.109l4.218 0zm18.753 2.109l0 37.506q0 .912-.57 1.482t-1.539.627l-4.161 0q-1.995 0-2.109-2.109l0-37.506q.057-.912.627-1.482t1.482-.627l4.161 0q.969.057 1.539.627t.57 1.482zm14.592-2.109q2.052 0 2.052 2.109l0 37.506q0 1.995-2.052 2.109l-4.161 0q-.969-.057-1.539-.627t-.57-1.482l0-37.506q0-2.109 2.109-2.109l4.161 0zm10.431 49.248l0-61.731l-58.368 0l0 61.731q.057 2.679.969 3.819t1.083 1.14l54.207 0q.171 0 1.14-1.083t.969-3.876zm-43.776-70.11l29.184 0l-3.135-7.581q-.456-.57-1.14-.741l-20.634 0q-.627.114-1.083.741zm-31.293 2.109q0-1.995 2.109-2.109l20.121 0l4.56-10.83q.969-2.394 3.477-4.104 2.565-1.71 5.187-1.71l20.805 0q2.622 0 5.187 1.71t3.477 4.104l4.56 10.83l20.178 0q.912.057 1.482.627t.57 1.482l0 4.161q0 1.995-2.052 2.109l-6.27 0l0 61.731q0 5.415-3.078 9.348t-7.353 3.933l-54.207 0q-4.275 0-7.353-3.819t-3.078-9.177l0-62.016l-6.213 0q-.969 0-1.539-.57t-.57-1.539l0-4.161z",
14949
14893
  width: 91.681,
14950
14894
  height: 100
14951
14895
  };
14952
- const iconUndo = {
14953
- path: "M10,6.6C10,7.2,9.8,8,9.3,9.1c0,0,0,0.1-0.1,0.1S9.2,9.3,9.2,9.4c0,0,0,0.1-0.1,0.1C9,9.6,9,9.6,8.9,9.6 c-0.1,0-0.1,0-0.1-0.1c0,0,0-0.1,0-0.1c0,0,0-0.1,0-0.1s0-0.1,0-0.1c0-0.3,0-0.5,0-0.7c0-0.4,0-0.7-0.1-1C8.6,7.1,8.5,6.9,8.4,6.7S8.2,6.3,8,6.1C7.8,5.9,7.6,5.8,7.4,5.7S6.9,5.5,6.7,5.5S6.1,5.4,5.8,5.4c-0.3,0-0.6,0-1,0H3.6v1.4c0,0.1,0,0.2-0.1,0.3C3.4,7.1,3.3,7.1,3.2,7.1C3.1,7.1,3,7.1,3,7L0.1,4.1C0,4.1,0,4,0,3.9s0-0.2,0.1-0.3L3,0.8C3,0.7,3.1,0.7,3.2,0.7c0.1,0,0.2,0,0.3,0.1C3.5,0.9,3.6,0.9,3.6,1v1.4h1.2c2.6,0,4.3,0.7,4.9,2.2C9.9,5.2,10,5.8,10,6.6z",
14954
- width: 10,
14955
- height: 10
14956
- };
14957
14896
  const iconMinus = {
14958
14897
  path: `M8,13 L16,13 C16.5522847,13 17,12.5522847 17,12 C17,11.4477153 16.5522847,11 16,11 L8,11 C7.44771525,11 7,11.4477153 7,12 C7,12.5522847 7.44771525,13 8,13 Z`,
14959
14898
  width: 24,
14960
14899
  height: 24
14961
14900
  };
14962
14901
 
14963
- var iconPaths = /*#__PURE__*/Object.freeze({
14964
- __proto__: null,
14965
- iconCheck: iconCheck,
14966
- iconCheckMedium: iconCheckMedium,
14967
- iconChevronDown: iconChevronDown,
14968
- iconChevronRight: iconChevronRight,
14969
- iconCircle: iconCircle,
14970
- iconCircleArrowDown: iconCircleArrowDown,
14971
- iconCircleArrowUp: iconCircleArrowUp,
14972
- iconCircleThin: iconCircleThin,
14973
- iconDesktop: iconDesktop,
14974
- iconDropdownArrow: iconDropdownArrow,
14975
- iconExclamationSign: iconExclamationSign,
14976
- iconGear: iconGear,
14977
- iconMobilePhone: iconMobilePhone,
14978
- iconOk: iconOk,
14979
- iconPlus: iconPlus,
14980
- iconRemove: iconRemove,
14981
- iconStar: iconStar,
14982
- iconTryAgain: iconTryAgain,
14983
- iconTablet: iconTablet,
14984
- iconTrash: iconTrash,
14985
- iconUndo: iconUndo,
14986
- iconMinus: iconMinus
14987
- });
14988
-
14989
14902
  /* eslint-disable @babel/no-invalid-this */
14990
14903
  const add$1 = {
14991
14904
  constrain: function () {
@@ -17432,7 +17345,7 @@ class SvgImage extends React.Component {
17432
17345
  // Just use a normal image if a normal image is provided
17433
17346
  if (!Util.isLabeledSVG(imageSrc)) {
17434
17347
  if (responsive) {
17435
- const wrapperClasses = classNames({
17348
+ const wrapperClasses = classNames$1({
17436
17349
  zoomable: (width || 0) > ZOOMABLE_THRESHOLD,
17437
17350
  "svg-image": true
17438
17351
  });
@@ -18222,7 +18135,7 @@ const styles$C = StyleSheet.create({
18222
18135
  },
18223
18136
  ":hover ~ div span[data-lint-inside-table]": {
18224
18137
  backgroundColor: warningColor,
18225
- color: white$1
18138
+ color: white
18226
18139
  }
18227
18140
  },
18228
18141
  // This is how we position the hover target for inline lint.
@@ -18258,7 +18171,7 @@ const styles$C = StyleSheet.create({
18258
18171
  // draw attention to the linty content.
18259
18172
  ":hover ~ span": {
18260
18173
  backgroundColor: warningColor,
18261
- color: white$1
18174
+ color: white
18262
18175
  }
18263
18176
  },
18264
18177
  radioWidgetHoverTarget: {
@@ -18300,7 +18213,7 @@ const styles$C = StyleSheet.create({
18300
18213
  // draw attention to the linty content.
18301
18214
  ":hover ~ span": {
18302
18215
  backgroundColor: warningColor,
18303
- color: white$1
18216
+ color: white
18304
18217
  }
18305
18218
  },
18306
18219
  // This is the class for the lint indicator in the margin.
@@ -18337,10 +18250,10 @@ const styles$C = StyleSheet.create({
18337
18250
  // When it is displayed, it goes on top!
18338
18251
  zIndex: 1000,
18339
18252
  // These styles control what the tooltip looks like
18340
- color: white$1,
18253
+ color: white,
18341
18254
  backgroundColor: gray17,
18342
18255
  opacity: 0.9,
18343
- fontFamily: baseFontFamily$1,
18256
+ fontFamily: baseFontFamily,
18344
18257
  fontSize: "12px",
18345
18258
  lineHeight: "15px",
18346
18259
  width: "320px",
@@ -19342,7 +19255,7 @@ var preprocessTex = (texCode => texCode
19342
19255
 
19343
19256
  const {
19344
19257
  interactiveSizes
19345
- } = constants$1;
19258
+ } = constants;
19346
19259
 
19347
19260
  // Note: these size cutoffs represent content-width cutoffs as specified in
19348
19261
  // http://zpl.io/1mVmvU (broken link - we no longer use Zeplin)
@@ -19375,13 +19288,6 @@ const getInteractiveBoxFromSizeClass = sizeClass => {
19375
19288
  return [interactiveSizes.defaultBoxSize, interactiveSizes.defaultBoxSize];
19376
19289
  };
19377
19290
 
19378
- var sizingUtils = /*#__PURE__*/Object.freeze({
19379
- __proto__: null,
19380
- containerSizeClass: containerSizeClass,
19381
- getClassFromWidth: getClassFromWidth,
19382
- getInteractiveBoxFromSizeClass: getInteractiveBoxFromSizeClass
19383
- });
19384
-
19385
19291
  class WidgetContainer extends React.Component {
19386
19292
  constructor(...args) {
19387
19293
  super(...args);
@@ -19432,7 +19338,7 @@ class WidgetContainer extends React.Component {
19432
19338
  return this.props.shouldHighlight !== nextProps.shouldHighlight || this.props.type !== nextProps.type || this.state.widgetProps !== nextState.widgetProps || this.state.sizeClass !== nextState.sizeClass;
19433
19339
  }
19434
19340
  render() {
19435
- let className = classNames({
19341
+ let className = classNames$1({
19436
19342
  "perseus-widget-container": true,
19437
19343
  "widget-highlight": this.props.shouldHighlight,
19438
19344
  "widget-nohighlight": !this.props.shouldHighlight,
@@ -20025,7 +19931,7 @@ class Renderer extends React.Component {
20025
19931
  if (this.translationIndex != null) {
20026
19932
  className = null;
20027
19933
  } else {
20028
- className = classNames({
19934
+ className = classNames$1({
20029
19935
  "perseus-paragraph-centered": !this._foundTextNodes,
20030
19936
  // There is only one node being rendered,
20031
19937
  // and it's a full-width widget.
@@ -20841,7 +20747,7 @@ class Renderer extends React.Component {
20841
20747
  const markdownContents = this.outputMarkdown(parsedMarkdown, {
20842
20748
  baseElements: apiOptions.baseElements
20843
20749
  });
20844
- const className = classNames({
20750
+ const className = classNames$1({
20845
20751
  [ClassNames.RENDERER]: true,
20846
20752
  [ClassNames.RESPONSIVE_RENDERER]: true,
20847
20753
  [ClassNames.TWO_COLUMN_RENDERER]: this._isTwoColumn
@@ -20968,7 +20874,17 @@ TextInput.defaultProps = {
20968
20874
  disabled: false
20969
20875
  };
20970
20876
 
20971
- /* eslint-disable react/no-unsafe */
20877
+ function _objectWithoutPropertiesLoose(r, e) {
20878
+ if (null == r) return {};
20879
+ var t = {};
20880
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
20881
+ if (e.includes(n)) continue;
20882
+ t[n] = r[n];
20883
+ }
20884
+ return t;
20885
+ }
20886
+
20887
+ const _excluded$5 = ["position", "visibility", "left", "top"];
20972
20888
  const zIndex = 10;
20973
20889
  let HorizontalDirection = /*#__PURE__*/function (HorizontalDirection) {
20974
20890
  HorizontalDirection["Left"] = "left";
@@ -21012,7 +20928,14 @@ const Triangle = props => {
21012
20928
  }
21013
20929
  });
21014
20930
  };
21015
- const TooltipArrow = props => {
20931
+ const TooltipArrow = _ref => {
20932
+ let {
20933
+ position = "relative",
20934
+ visibility = "visible",
20935
+ left = 100,
20936
+ top = 0
20937
+ } = _ref,
20938
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
21016
20939
  // TODO(aria): Think about adding a box-shadow to the triangle here
21017
20940
  // See http://css-tricks.com/triangle-with-shadow/
21018
20941
 
@@ -21023,10 +20946,10 @@ const TooltipArrow = props => {
21023
20946
  return /*#__PURE__*/React.createElement("div", {
21024
20947
  style: {
21025
20948
  display: "block",
21026
- position: props.position,
21027
- visibility: props.visibility,
21028
- left: props.left,
21029
- top: props["top"],
20949
+ position: position,
20950
+ visibility: visibility,
20951
+ left: left,
20952
+ top: top,
21030
20953
  width: props.width + 2,
21031
20954
  height: props.height + 1,
21032
20955
  marginTop: -1,
@@ -21052,12 +20975,6 @@ const TooltipArrow = props => {
21052
20975
  height: props.height
21053
20976
  }));
21054
20977
  };
21055
- TooltipArrow.defaultProps = {
21056
- position: "relative",
21057
- visibility: "visible",
21058
- left: 0,
21059
- top: 0
21060
- };
21061
20978
  const VERTICAL_CORNERS = {
21062
20979
  top: {
21063
20980
  top: "-100%"
@@ -21340,16 +21257,6 @@ InputWithExamples.defaultProps = {
21340
21257
  className: ""
21341
21258
  };
21342
21259
 
21343
- function _objectWithoutPropertiesLoose(r, e) {
21344
- if (null == r) return {};
21345
- var t = {};
21346
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
21347
- if (e.includes(n)) continue;
21348
- t[n] = r[n];
21349
- }
21350
- return t;
21351
- }
21352
-
21353
21260
  const _excluded$4 = ["keypadElement", "onFocus", "value"];
21354
21261
  class SimpleKeypadInput extends React.Component {
21355
21262
  constructor(...args) {
@@ -21927,6 +21834,7 @@ function maybeParsePercentInput(inputValue, normalizedAnswerExpected) {
21927
21834
  return value;
21928
21835
  }
21929
21836
  function numericInputValidator(userInput, rubric, strings) {
21837
+ var _matchedAnswer$messag;
21930
21838
  const defaultAnswerForms = answerFormButtons.map(e => e["value"])
21931
21839
  // Don't default to validating the answer as a pi answer
21932
21840
  // if answerForm isn't set on the answer
@@ -21959,48 +21867,34 @@ function numericInputValidator(userInput, rubric, strings) {
21959
21867
  // We may have received TeX; try to parse it before grading.
21960
21868
  // If `currentValue` is not TeX, this should be a no-op.
21961
21869
  const currentValue = ParseTex(userInput.currentValue);
21962
- const correctAnswers = rubric.answers.filter(answer => answer.status === "correct");
21963
- const normalizedAnswerExpected = correctAnswers.every(answer => Math.abs(answer.value) <= 1);
21964
-
21965
- // Look through all correct answers for one that matches either
21966
- // precisely or approximately and return the appropriate message:
21967
- // - if precise, return the message that the answer came with
21968
- // - if it needs to be simplified, etc., show that message
21969
- let result = correctAnswers.map(answer => {
21970
- // The coefficient is an attribute of the widget
21971
- let localValue = currentValue;
21972
- if (rubric.coefficient) {
21973
- if (!localValue) {
21974
- localValue = 1;
21975
- } else if (localValue === "-") {
21976
- localValue = -1;
21977
- }
21978
- }
21979
- const validate = createValidator(answer);
21980
- return validate(maybeParsePercentInput(localValue, normalizedAnswerExpected));
21981
- }).find(match => match.correct || match.empty);
21982
- if (!result) {
21983
- // Otherwise, if the guess is not correct
21984
- const otherAnswers = [].concat(
21985
- // @ts-expect-error - TS2769 - No overload matches this call.
21986
- rubric.answers.filter(answer => answer.status === "ungraded"), rubric.answers.filter(answer => answer.status === "wrong"));
21987
-
21988
- // Look through all other answers and if one matches either
21989
- // precisely or approximately return the answer's message
21990
- const match = otherAnswers.find(answer => {
21991
- const validate = createValidator(answer);
21992
- return validate(maybeParsePercentInput(currentValue, normalizedAnswerExpected)).correct;
21870
+ const normalizedAnswerExpected = rubric.answers.filter(answer => answer.status === "correct").every(answer => Math.abs(answer.value) <= 1);
21871
+
21872
+ // The coefficient is an attribute of the widget
21873
+ let localValue = currentValue;
21874
+ if (rubric.coefficient) {
21875
+ if (!localValue) {
21876
+ localValue = 1;
21877
+ } else if (localValue === "-") {
21878
+ localValue = -1;
21879
+ }
21880
+ }
21881
+ const matchedAnswer = rubric.answers.map(answer => {
21882
+ const validateFn = createValidator(answer);
21883
+ const score = validateFn(maybeParsePercentInput(localValue, normalizedAnswerExpected));
21884
+ return _extends({}, answer, {
21885
+ score
21993
21886
  });
21994
- result = {
21995
- // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'never'.
21996
- empty: match ? match.status === "ungraded" : false,
21997
- // @ts-expect-error - TS2339 - Property 'status' does not exist on type 'never'.
21998
- correct: match ? match.status === "correct" : false,
21999
- // @ts-expect-error - TS2339 - Property 'message' does not exist on type 'never'.
22000
- message: match ? match.message : null,
22001
- guess: currentValue
22002
- };
22003
- }
21887
+ }).find(answer => {
21888
+ // NOTE: "answer.score.correct" indicates a match via the validate function.
21889
+ // It does NOT indicate that the answer itself is correct.
21890
+ return answer.score.correct || answer.status === "correct" && answer.score.empty;
21891
+ });
21892
+ const result = (matchedAnswer == null ? void 0 : matchedAnswer.status) === "correct" ? matchedAnswer.score : {
21893
+ empty: (matchedAnswer == null ? void 0 : matchedAnswer.status) === "ungraded",
21894
+ correct: (matchedAnswer == null ? void 0 : matchedAnswer.status) === "correct",
21895
+ message: (_matchedAnswer$messag = matchedAnswer == null ? void 0 : matchedAnswer.message) != null ? _matchedAnswer$messag : null,
21896
+ guess: localValue
21897
+ };
22004
21898
 
22005
21899
  // TODO(eater): Seems silly to translate result to this
22006
21900
  // invalid/points thing and immediately translate it
@@ -24589,29 +24483,29 @@ var PassageRef$1 = {
24589
24483
  * });
24590
24484
  */
24591
24485
  const {
24592
- pureXsMax: pureXsMax$1,
24593
- pureSmMin: pureSmMin$1,
24594
- pureSmMax: pureSmMax$1,
24595
- pureMdMin: pureMdMin$1,
24596
- pureMdMax: pureMdMax$1,
24597
- pureLgMin: pureLgMin$1,
24598
- pureLgMax: pureLgMax$1,
24599
- pureXlMin: pureXlMin$1
24600
- } = constants$1;
24486
+ pureXsMax,
24487
+ pureSmMin,
24488
+ pureSmMax,
24489
+ pureMdMin,
24490
+ pureMdMax,
24491
+ pureLgMin,
24492
+ pureLgMax,
24493
+ pureXlMin
24494
+ } = constants;
24601
24495
  var mediaQueries = {
24602
- xs: `@media screen and (max-width: ${pureXsMax$1})`,
24603
- sm: `@media screen and (min-width: ${pureSmMin$1}) and ` + `(max-width: ${pureSmMax$1})`,
24604
- md: `@media screen and (min-width: ${pureMdMin$1}) and ` + `(max-width: ${pureMdMax$1})`,
24605
- lg: `@media screen and (min-width: ${pureLgMin$1}) and ` + `(max-width: ${pureLgMax$1})`,
24606
- xl: `@media screen and (min-width: ${pureXlMin$1})`,
24607
- xsOrSmaller: `@media screen and (max-width: ${pureXsMax$1})`,
24608
- smOrSmaller: `@media screen and (max-width: ${pureSmMax$1})`,
24609
- mdOrSmaller: `@media screen and (max-width: ${pureMdMax$1})`,
24610
- lgOrSmaller: `@media screen and (max-width: ${pureLgMax$1})`,
24611
- smOrLarger: `@media screen and (min-width: ${pureSmMin$1})`,
24612
- mdOrLarger: `@media screen and (min-width: ${pureMdMin$1})`,
24613
- lgOrLarger: `@media screen and (min-width: ${pureLgMin$1})`,
24614
- xlOrLarger: `@media screen and (min-width: ${pureXlMin$1})`
24496
+ xs: `@media screen and (max-width: ${pureXsMax})`,
24497
+ sm: `@media screen and (min-width: ${pureSmMin}) and ` + `(max-width: ${pureSmMax})`,
24498
+ md: `@media screen and (min-width: ${pureMdMin}) and ` + `(max-width: ${pureMdMax})`,
24499
+ lg: `@media screen and (min-width: ${pureLgMin}) and ` + `(max-width: ${pureLgMax})`,
24500
+ xl: `@media screen and (min-width: ${pureXlMin})`,
24501
+ xsOrSmaller: `@media screen and (max-width: ${pureXsMax})`,
24502
+ smOrSmaller: `@media screen and (max-width: ${pureSmMax})`,
24503
+ mdOrSmaller: `@media screen and (max-width: ${pureMdMax})`,
24504
+ lgOrSmaller: `@media screen and (max-width: ${pureLgMax})`,
24505
+ smOrLarger: `@media screen and (min-width: ${pureSmMin})`,
24506
+ mdOrLarger: `@media screen and (min-width: ${pureMdMin})`,
24507
+ lgOrLarger: `@media screen and (min-width: ${pureLgMin})`,
24508
+ xlOrLarger: `@media screen and (min-width: ${pureXlMin})`
24615
24509
  };
24616
24510
 
24617
24511
  const {
@@ -24621,7 +24515,7 @@ const {
24621
24515
  checkedColor,
24622
24516
  circleSize,
24623
24517
  radioMarginWidth
24624
- } = constants$1;
24518
+ } = constants;
24625
24519
  var sharedStyles = StyleSheet.create({
24626
24520
  perseusInteractive: {
24627
24521
  zIndex: zIndexInteractiveComponent,
@@ -24972,13 +24866,12 @@ function getA11yText(letter, checked, correct, crossedOut, showCorrectness, stri
24972
24866
  /**
24973
24867
  * Renders a circular selection ring around the child.
24974
24868
  */
24975
- const FocusRing = function FocusRing(props) {
24976
- const {
24977
- visible,
24978
- color,
24979
- children,
24980
- multipleSelect
24981
- } = props;
24869
+ const FocusRing = function FocusRing({
24870
+ visible = true,
24871
+ color = kaGreen,
24872
+ multipleSelect = false,
24873
+ children
24874
+ }) {
24982
24875
  const borderColor = visible ? color : "transparent";
24983
24876
  const borderRadius = multipleSelect ? 5 : "50%";
24984
24877
  const style = {
@@ -24991,11 +24884,6 @@ const FocusRing = function FocusRing(props) {
24991
24884
  style: style
24992
24885
  }, children);
24993
24886
  };
24994
- FocusRing.defaultProps = {
24995
- visible: true,
24996
- color: kaGreen$1,
24997
- multipleSelect: false
24998
- };
24999
24887
  const styles$v = StyleSheet.create({
25000
24888
  ring: {
25001
24889
  margin: "auto",
@@ -25108,7 +24996,7 @@ function getDynamicStyles(checked, showCorrectness, pressed, multipleSelect, cor
25108
24996
  backgroundColor = "transparent";
25109
24997
  } else if (checked) {
25110
24998
  const bg = showCorrectness && correct ? color.green : color.blue;
25111
- color$1 = white$1;
24999
+ color$1 = white;
25112
25000
  backgroundColor = bg;
25113
25001
  borderColor = bg;
25114
25002
  } else {
@@ -25186,7 +25074,7 @@ const styles$s = StyleSheet.create({
25186
25074
  borderStyle: "solid",
25187
25075
  borderWidth: 2,
25188
25076
  // The default icons have letters in them. Style those letters.
25189
- fontFamily: baseFontFamily$1,
25077
+ fontFamily: baseFontFamily,
25190
25078
  // NOTE(emily): We explicitly set the font weight instead of using the
25191
25079
  // "bold font family" so that characters which fall back to the default
25192
25080
  // font get bolded too.
@@ -25346,8 +25234,8 @@ const Choice = function Choice(props) {
25346
25234
  crossedOut: updatedCrossedOut
25347
25235
  });
25348
25236
  }
25349
- const descriptionClassName = classNames("description", css(styles$q.description));
25350
- const rationaleClassName = classNames("perseus-radio-rationale-content", css(styles$q.rationale));
25237
+ const descriptionClassName = classNames$1("description", css(styles$q.description));
25238
+ const rationaleClassName = classNames$1("perseus-radio-rationale-content", css(styles$q.rationale));
25351
25239
 
25352
25240
  // We want to show the choices as dimmed out when the choices are disabled.
25353
25241
  // However, we don't want to do this when we're in review mode in the
@@ -25528,14 +25416,14 @@ var Choice$1 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.
25528
25416
  forwardedRef: ref
25529
25417
  })));
25530
25418
 
25531
- const _excluded$3 = ["showContent", "content", "forwardedRef"];
25532
- const ChoiceNoneAbove = function ChoiceNoneAbove(props) {
25533
- const {
25534
- showContent,
25419
+ const _excluded$3 = ["content", "forwardedRef", "showContent"];
25420
+ const ChoiceNoneAbove = function ChoiceNoneAbove(_ref) {
25421
+ let {
25535
25422
  content,
25536
- forwardedRef
25537
- } = props,
25538
- rest = _objectWithoutPropertiesLoose(props, _excluded$3);
25423
+ forwardedRef,
25424
+ showContent = true
25425
+ } = _ref,
25426
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
25539
25427
  const {
25540
25428
  strings
25541
25429
  } = usePerseusI18n();
@@ -25562,9 +25450,6 @@ const ChoiceNoneAbove = function ChoiceNoneAbove(props) {
25562
25450
  ref: forwardedRef
25563
25451
  }));
25564
25452
  };
25565
- ChoiceNoneAbove.defaultProps = {
25566
- showContent: true
25567
- };
25568
25453
  var ChoiceNoneAbove$1 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(ChoiceNoneAbove, _extends({}, props, {
25569
25454
  forwardedRef: ref
25570
25455
  })));
@@ -25586,20 +25471,20 @@ function getInstructionsText(multipleSelect, countChoices, numCorrect, strings)
25586
25471
  }
25587
25472
  return strings.chooseOneAnswer;
25588
25473
  }
25589
- const BaseRadio = function BaseRadio(props) {
25590
- const {
25591
- apiOptions,
25592
- reviewModeRubric,
25593
- reviewMode,
25594
- choices,
25595
- editMode,
25596
- multipleSelect,
25597
- labelWrap,
25598
- countChoices,
25599
- numCorrect,
25600
- isLastUsedWidget,
25601
- registerFocusFunction
25602
- } = props;
25474
+ const BaseRadio = function BaseRadio({
25475
+ apiOptions,
25476
+ reviewModeRubric,
25477
+ reviewMode,
25478
+ choices,
25479
+ editMode = false,
25480
+ multipleSelect = false,
25481
+ labelWrap,
25482
+ countChoices,
25483
+ numCorrect,
25484
+ isLastUsedWidget,
25485
+ onChange,
25486
+ registerFocusFunction
25487
+ }) {
25603
25488
  const {
25604
25489
  strings
25605
25490
  } = usePerseusI18n();
@@ -25656,12 +25541,6 @@ const BaseRadio = function BaseRadio(props) {
25656
25541
  // contains a boolean value specifying the new checked and crossed-out
25657
25542
  // value of this choice.
25658
25543
  function updateChoice(choiceIndex, newValues) {
25659
- const {
25660
- multipleSelect,
25661
- choices,
25662
- onChange
25663
- } = props;
25664
-
25665
25544
  // Get the baseline `checked` values. If we're checking a new answer
25666
25545
  // and multiple-select is not on, we should clear all choices to be
25667
25546
  // unchecked. Otherwise, we should copy the old checked values.
@@ -25706,8 +25585,8 @@ const BaseRadio = function BaseRadio(props) {
25706
25585
  const isMobile = apiOptions.isMobile;
25707
25586
  const firstChoiceHighlighted = choices[0].highlighted;
25708
25587
  const lastChoiceHighlighted = choices[choices.length - 1].highlighted;
25709
- const className = classNames("perseus-widget-radio", !editMode && "perseus-rendered-radio", css(styles$p.radio, styles$p.responsiveRadioContainer, firstChoiceHighlighted && isMobile && styles$p.radioContainerFirstHighlighted, lastChoiceHighlighted && isMobile && styles$p.radioContainerLastHighlighted));
25710
- const instructionsClassName = classNames("instructions", css(styles$p.instructions, isMobile && styles$p.instructionsMobile));
25588
+ const className = classNames$1("perseus-widget-radio", !editMode && "perseus-rendered-radio", css(styles$p.radio, styles$p.responsiveRadioContainer, firstChoiceHighlighted && isMobile && styles$p.radioContainerFirstHighlighted, lastChoiceHighlighted && isMobile && styles$p.radioContainerLastHighlighted));
25589
+ const instructionsClassName = classNames$1("instructions", css(styles$p.instructions, isMobile && styles$p.instructionsMobile));
25711
25590
  const instructions = getInstructionsText(multipleSelect, countChoices, numCorrect, strings);
25712
25591
  const responsiveClassName = css(styles$p.responsiveFieldset);
25713
25592
  const fieldset = /*#__PURE__*/React.createElement("fieldset", {
@@ -25773,7 +25652,7 @@ const BaseRadio = function BaseRadio(props) {
25773
25652
  if (reviewMode && reviewModeRubric) {
25774
25653
  correctnessClass = reviewModeRubric.choices[i].correct ? ClassNames.CORRECT : ClassNames.INCORRECT;
25775
25654
  }
25776
- const className = classNames(aphroditeClassName(choice.checked),
25655
+ const className = classNames$1(aphroditeClassName(choice.checked),
25777
25656
  // TODO(aria): Make test case for these API
25778
25657
  // classNames
25779
25658
  ClassNames.RADIO.OPTION, choice.checked && ClassNames.RADIO.SELECTED, correctnessClass);
@@ -25828,10 +25707,6 @@ const BaseRadio = function BaseRadio(props) {
25828
25707
  className: css(styles$p.responsiveContainer)
25829
25708
  }, fieldset);
25830
25709
  };
25831
- BaseRadio.defaultProps = {
25832
- editMode: false,
25833
- multipleSelect: false
25834
- };
25835
25710
  const styles$p = StyleSheet.create({
25836
25711
  instructions: {
25837
25712
  display: "block",
@@ -25930,7 +25805,7 @@ function radioValidator(userInput, rubric, strings) {
25930
25805
  };
25931
25806
  }
25932
25807
 
25933
- // TODO: should numCorrect actually be on the rubric
25808
+ // TODO(LEMS-2541): should numCorrect actually be on the rubric
25934
25809
  // instead of the userInput?
25935
25810
  if (userInput.numCorrect && userInput.numCorrect > 1 && numSelected !== userInput.numCorrect) {
25936
25811
  return {
@@ -25940,7 +25815,7 @@ function radioValidator(userInput, rubric, strings) {
25940
25815
  // If NOTA and some other answer are checked, ...
25941
25816
  }
25942
25817
 
25943
- // TODO: should noneOfTheAboveSelected be replaced with a
25818
+ // TODO(LEMS-2541): should noneOfTheAboveSelected be replaced with a
25944
25819
  // combination of choicesSelected and noneOfTheAboveIndex?
25945
25820
  if (userInput.noneOfTheAboveSelected && numSelected > 1) {
25946
25821
  return {
@@ -25950,7 +25825,7 @@ function radioValidator(userInput, rubric, strings) {
25950
25825
  }
25951
25826
  const correct = userInput.choicesSelected.every((selected, i) => {
25952
25827
  let isCorrect;
25953
- // TODO: should noneOfTheAboveIndex actually be on the rubric
25828
+ // TODO(LEMS-2541): should noneOfTheAboveIndex actually be on the rubric
25954
25829
  // instead of the userInput?
25955
25830
  if (userInput.noneOfTheAboveIndex === i) {
25956
25831
  isCorrect = rubric.choices.every((choice, j) => {
@@ -26131,7 +26006,6 @@ class Radio$1 extends React.Component {
26131
26006
  let noneOfTheAboveSelected = false;
26132
26007
  const choiceStates = props.choiceStates;
26133
26008
  const choicesSelected = choiceStates.map(() => false);
26134
- const countChoices = props.countChoices;
26135
26009
  const numCorrect = props.numCorrect;
26136
26010
  for (let i = 0; i < choicesSelected.length; i++) {
26137
26011
  const index = props.choices[i].originalIndex;
@@ -26145,7 +26019,6 @@ class Radio$1 extends React.Component {
26145
26019
  }
26146
26020
  }
26147
26021
  return {
26148
- countChoices,
26149
26022
  choicesSelected,
26150
26023
  numCorrect,
26151
26024
  noneOfTheAboveIndex,
@@ -26161,7 +26034,6 @@ class Radio$1 extends React.Component {
26161
26034
  let noneOfTheAboveIndex = null;
26162
26035
  let noneOfTheAboveSelected = false;
26163
26036
  const choicesSelected = [...values];
26164
- const countChoices = props.countChoices;
26165
26037
  const numCorrect = props.numCorrect;
26166
26038
  const valuesLength = values.length;
26167
26039
  for (let i = 0; i < valuesLength; i++) {
@@ -26179,7 +26051,6 @@ class Radio$1 extends React.Component {
26179
26051
  choicesSelected,
26180
26052
  noneOfTheAboveIndex,
26181
26053
  noneOfTheAboveSelected,
26182
- countChoices,
26183
26054
  numCorrect
26184
26055
  };
26185
26056
  }
@@ -26574,7 +26445,7 @@ class Categorizer extends React.Component {
26574
26445
 
26575
26446
  // TODO(benkomalo): kill CSS-based styling and move everything to
26576
26447
  // aphrodite.
26577
- const extraClassNames = classNames({
26448
+ const extraClassNames = classNames$1({
26578
26449
  "categorizer-container": true,
26579
26450
  "static-mode": this.props.static
26580
26451
  });
@@ -27468,7 +27339,7 @@ class GradedGroup extends React.Component {
27468
27339
  gradeStatus = this.context.strings.incorrect;
27469
27340
  }
27470
27341
  const mobileClass = this.props.inGradedGroupSet ? css(styles$j.gradedGroupInSet) : css(styles$j.gradedGroup);
27471
- const classes = classNames({
27342
+ const classes = classNames$1({
27472
27343
  [mobileClass]: apiOptions.isMobile,
27473
27344
  "perseus-graded-group": true,
27474
27345
  "answer-correct": apiOptions.isMobile ? false : this.state.status === GRADING_STATUSES.correct,
@@ -27583,7 +27454,7 @@ const styles$j = StyleSheet.create({
27583
27454
  gradedGroup: {
27584
27455
  borderTop: `1px solid ${gray76}`,
27585
27456
  borderBottom: `1px solid ${gray76}`,
27586
- backgroundColor: tableBackgroundAccent$1,
27457
+ backgroundColor: tableBackgroundAccent,
27587
27458
  marginLeft: negativePhoneMargin,
27588
27459
  marginRight: negativePhoneMargin,
27589
27460
  paddingBottom: phoneMargin,
@@ -27647,7 +27518,7 @@ class Indicators extends React.Component {
27647
27518
  return /*#__PURE__*/React.createElement("ul", {
27648
27519
  // reduntantly add class name for use in .less files--
27649
27520
  // the styles object key gets hashed
27650
- className: classNames(css(styles$i.indicatorContainer), "indicatorContainer")
27521
+ className: classNames$1(css(styles$i.indicatorContainer), "indicatorContainer")
27651
27522
  }, this.props.gradedGroups.map(({
27652
27523
  title
27653
27524
  }, i) => /*#__PURE__*/React.createElement("li", {
@@ -27862,7 +27733,7 @@ const styles$i = StyleSheet.create({
27862
27733
  container: {
27863
27734
  borderTop: `1px solid ${gray76}`,
27864
27735
  borderBottom: `1px solid ${gray76}`,
27865
- backgroundColor: tableBackgroundAccent$1,
27736
+ backgroundColor: tableBackgroundAccent,
27866
27737
  marginLeft: negativePhoneMargin,
27867
27738
  marginRight: negativePhoneMargin,
27868
27739
  paddingBottom: phoneMargin,
@@ -28470,21 +28341,6 @@ const typeToButton = type => {
28470
28341
  };
28471
28342
  };
28472
28343
 
28473
- var util = /*#__PURE__*/Object.freeze({
28474
- __proto__: null,
28475
- DEFAULT_BACKGROUND_IMAGE: DEFAULT_BACKGROUND_IMAGE,
28476
- allTypes: allTypes,
28477
- functionForType: functionForType,
28478
- getEquationString: getEquationString,
28479
- pointsFromNormalized: pointsFromNormalized,
28480
- maybePointsFromNormalized: maybePointsFromNormalized,
28481
- defaultPlotProps: defaultPlotProps,
28482
- chooseType: chooseType,
28483
- getGridAndSnapSteps: getGridAndSnapSteps,
28484
- DEFAULT_GRAPHER_PROPS: DEFAULT_GRAPHER_PROPS,
28485
- typeToButton: typeToButton
28486
- });
28487
-
28488
28344
  function getCoefficientsByType(data) {
28489
28345
  if (data.type === "exponential" || data.type === "logarithm") {
28490
28346
  const grader = functionForType(data.type);
@@ -29041,7 +28897,7 @@ class Group extends React.Component {
29041
28897
  // TODO(mdr): Widgets inside this Renderer are not discoverable through
29042
28898
  // the parent Renderer's `findWidgets` function.
29043
28899
  return /*#__PURE__*/React.createElement("div", {
29044
- className: classNames({
28900
+ className: classNames$1({
29045
28901
  "perseus-group": true,
29046
28902
  "perseus-group-valid-answer": isValid,
29047
28903
  "perseus-group-invalid-answer": isInvalid
@@ -29084,23 +28940,23 @@ var Group$1 = {
29084
28940
  isLintable: true
29085
28941
  };
29086
28942
 
29087
- function iframeValidator(state) {
28943
+ function iframeValidator(userInput) {
29088
28944
  // The iframe can tell us whether it's correct or incorrect,
29089
28945
  // and pass an optional message
29090
- if (state.status === "correct") {
28946
+ if (userInput.status === "correct") {
29091
28947
  return {
29092
28948
  type: "points",
29093
28949
  earned: 1,
29094
28950
  total: 1,
29095
- message: state.message || null
28951
+ message: userInput.message || null
29096
28952
  };
29097
28953
  }
29098
- if (state.status === "incorrect") {
28954
+ if (userInput.status === "incorrect") {
29099
28955
  return {
29100
28956
  type: "points",
29101
28957
  earned: 0,
29102
28958
  total: 1,
29103
- message: state.message || null
28959
+ message: userInput.message || null
29104
28960
  };
29105
28961
  }
29106
28962
  return {
@@ -29309,7 +29165,7 @@ class ImageWidget extends React.Component {
29309
29165
  }
29310
29166
  _title = `**${_title}** `;
29311
29167
  }
29312
- const className = classNames({
29168
+ const className = classNames$1({
29313
29169
  "perseus-image-caption": true,
29314
29170
  "has-title": !!_title
29315
29171
  });
@@ -31048,7 +30904,7 @@ const styles$g = StyleSheet.create({
31048
30904
  fontFamily: boldFontFamily,
31049
30905
  fontSize: "15px",
31050
30906
  lineHeight: "18px",
31051
- color: white$1,
30907
+ color: white,
31052
30908
  userSelect: "none",
31053
30909
  borderWidth: 0 // <button> gives us a border by default
31054
30910
  },
@@ -31370,7 +31226,7 @@ class NumberInput extends React.Component {
31370
31226
  }
31371
31227
  }
31372
31228
  render() {
31373
- let classes = classNames({
31229
+ let classes = classNames$1({
31374
31230
  "number-input": true,
31375
31231
  "invalid-input": !this._checkValidity(this.props.value),
31376
31232
  mini: this.props.size === "mini",
@@ -32129,7 +31985,12 @@ const actions = {
32129
31985
  },
32130
31986
  polygon: {
32131
31987
  movePoint,
32132
- moveAll
31988
+ moveAll,
31989
+ addPoint,
31990
+ removePoint,
31991
+ focusPoint,
31992
+ blurPoint,
31993
+ clickPoint
32133
31994
  },
32134
31995
  quadratic: {
32135
31996
  movePoint
@@ -32273,6 +32134,7 @@ function reinitialize(params) {
32273
32134
  * https://www.w3.org/WAI/WCAG21/Understanding/target-size.html
32274
32135
  */
32275
32136
  const TARGET_SIZE = 44;
32137
+ const REMOVE_BUTTON_ID = "perseus_mafs_remove_button";
32276
32138
 
32277
32139
  // same as pointsFromNormalized in interactive-graph.tsx
32278
32140
  const normalizePoints = (range, step, coordsList, noSnap) => coordsList.map(coords =>
@@ -32303,6 +32165,9 @@ function bound$1({
32303
32165
  const boundingBox = inset(snapStep, range);
32304
32166
  return clampToBox(boundingBox, point);
32305
32167
  }
32168
+ function isUnlimitedGraphState(state) {
32169
+ return state.type === "point" && state.numPoints === "unlimited" || state.type === "polygon" && state.numSides === "unlimited";
32170
+ }
32306
32171
 
32307
32172
  var isProduction = process.env.NODE_ENV === 'production';
32308
32173
  var prefix = 'Invariant failed';
@@ -32476,33 +32341,26 @@ const hitboxSizePx = 48;
32476
32341
  // MovablePointView is a purely presentational component (i.e. it is a pure
32477
32342
  // function with no state or effects) that renders the SVG for a movable point
32478
32343
  // on an interactive graph.
32479
- //
32480
- // It has two modes for managing tabbing / focus: "controlled" (where the caller
32481
- // manages the display of the focus ring, and the point itself cannot be
32482
- // focused) and "uncontrolled" (where the point is focusable, and the browser
32483
- // manages the focus state and styling). For context on why we did this, see
32484
- // the description of https://github.com/Khan/perseus/pull/1240
32485
32344
  const MovablePointView = /*#__PURE__*/forwardRef((props, hitboxRef) => {
32486
32345
  var _Object$entries$find$, _Object$entries$find;
32487
32346
  const {
32488
32347
  range,
32489
32348
  markings,
32490
- showTooltips,
32491
- disableKeyboardInteraction
32349
+ showTooltips
32492
32350
  } = useGraphConfig();
32493
32351
  const {
32494
32352
  point,
32495
32353
  color: color$1 = color.blue,
32496
32354
  dragging,
32497
- focusBehavior,
32498
32355
  cursor,
32356
+ showFocusRing,
32499
32357
  onClick = () => {}
32500
32358
  } = props;
32501
32359
 
32502
32360
  // WB Tooltip requires a color name for the background color.
32503
32361
  // Since the color in props is a hex value, a reverse lookup is needed.
32504
32362
  const wbColorName = (_Object$entries$find$ = (_Object$entries$find = Object.entries(color).find(([_, value]) => value === color$1)) == null ? void 0 : _Object$entries$find[0]) != null ? _Object$entries$find$ : "blue";
32505
- const pointClasses = `movable-point ${dragging ? "movable-point--dragging" : ""} ${focusClass(focusBehavior)}`;
32363
+ const pointClasses = classNames("movable-point", dragging && "movable-point--dragging", showFocusRing && "movable-point--focus");
32506
32364
  const [[x, y]] = useTransformVectorsToPixels(point);
32507
32365
  const [[xMin, xMax], [yMin, yMax]] = range;
32508
32366
  const [[verticalStartX]] = useTransformVectorsToPixels([xMin, 0]);
@@ -32531,15 +32389,6 @@ const MovablePointView = /*#__PURE__*/forwardRef((props, hitboxRef) => {
32531
32389
  cursor
32532
32390
  },
32533
32391
  "data-testid": "movable-point",
32534
- tabIndex: disableKeyboardInteraction ? -1 : tabIndex(focusBehavior),
32535
- onFocus: event => {
32536
- const callback = getOnFocusChangeCallback(focusBehavior);
32537
- callback && callback(event, true);
32538
- },
32539
- onBlur: event => {
32540
- const callback = getOnFocusChangeCallback(focusBehavior);
32541
- callback && callback(event, false);
32542
- },
32543
32392
  onClick: onClick
32544
32393
  }, /*#__PURE__*/React.createElement("circle", {
32545
32394
  className: "movable-point-hitbox",
@@ -32576,25 +32425,100 @@ const MovablePointView = /*#__PURE__*/forwardRef((props, hitboxRef) => {
32576
32425
  }
32577
32426
  }, svgForPoint) : svgForPoint);
32578
32427
  });
32579
- function focusClass(config) {
32580
- if (config.type === "controlled" && config.showFocusRing) {
32581
- return "movable-point--focus";
32582
- }
32583
- return "";
32428
+
32429
+ // TODO(benchristel): Move this to a more central location if it's reused.
32430
+ // Or install the library.
32431
+ function classNames(...names) {
32432
+ return names.filter(Boolean).join(" ");
32584
32433
  }
32585
- function tabIndex(config) {
32586
- if (config.type === "uncontrolled") {
32587
- return config.tabIndex;
32588
- }
32589
- return undefined;
32434
+
32435
+ function useControlPoint(params) {
32436
+ const {
32437
+ snapStep,
32438
+ disableKeyboardInteraction
32439
+ } = useGraphConfig();
32440
+ const {
32441
+ point,
32442
+ color,
32443
+ cursor,
32444
+ constrain = p => snap(snapStep, p),
32445
+ onMove = noop$1,
32446
+ onClick = noop$1,
32447
+ onFocus = noop$1,
32448
+ onBlur = noop$1,
32449
+ forwardedRef = noop$1
32450
+ } = params;
32451
+ const [focused, setFocused] = useState(false);
32452
+ const focusableHandleRef = useRef(null);
32453
+ useDraggable({
32454
+ gestureTarget: focusableHandleRef,
32455
+ point,
32456
+ onMove,
32457
+ constrainKeyboardMovement: constrain
32458
+ });
32459
+ const visiblePointRef = useRef(null);
32460
+ const {
32461
+ dragging
32462
+ } = useDraggable({
32463
+ gestureTarget: visiblePointRef,
32464
+ point,
32465
+ onMove,
32466
+ constrainKeyboardMovement: constrain
32467
+ });
32468
+ useLayoutEffect(() => {
32469
+ setForwardedRef(forwardedRef, focusableHandleRef.current);
32470
+ }, [forwardedRef]);
32471
+ const focusableHandle = /*#__PURE__*/React.createElement("g", {
32472
+ "data-testid": "movable-point__focusable-handle",
32473
+ className: "movable-point__focusable-handle",
32474
+ tabIndex: disableKeyboardInteraction ? -1 : 0,
32475
+ ref: focusableHandleRef,
32476
+ onFocus: event => {
32477
+ onFocus(event);
32478
+ setFocused(true);
32479
+ },
32480
+ onBlur: event => {
32481
+ onBlur(event);
32482
+ setFocused(false);
32483
+ }
32484
+ });
32485
+ const visiblePoint = /*#__PURE__*/React.createElement(MovablePointView, {
32486
+ cursor: cursor,
32487
+ onClick: () => {
32488
+ var _focusableHandleRef$c;
32489
+ onClick();
32490
+ (_focusableHandleRef$c = focusableHandleRef.current) == null || _focusableHandleRef$c.focus();
32491
+ },
32492
+ point: point,
32493
+ dragging: dragging,
32494
+ color: color,
32495
+ ref: visiblePointRef,
32496
+ showFocusRing: focused
32497
+ });
32498
+ return {
32499
+ focusableHandle,
32500
+ visiblePoint,
32501
+ focusableHandleRef,
32502
+ visiblePointRef
32503
+ };
32590
32504
  }
32591
- function getOnFocusChangeCallback(config) {
32592
- if (config.type === "uncontrolled") {
32593
- return config.onFocusChange;
32505
+
32506
+ // TODO(benchristel): move this to a more central place if we want to reuse it.
32507
+ function setForwardedRef(ref, value) {
32508
+ if (typeof ref === "function") {
32509
+ ref(value);
32510
+ } else if (ref !== null) {
32511
+ ref.current = value;
32594
32512
  }
32595
- return () => {};
32596
32513
  }
32597
32514
 
32515
+ // This `noop` const is an optimization. Above, we use the forwardedRef
32516
+ // variable, which defaults to `noop`, in a useEffect deps array. Using `noop`
32517
+ // as the default value instead of `() => {}` ensures that the forwardedRef
32518
+ // variable will have the same value on repeated renders, preventing the
32519
+ // useEffect callback from re-running needlessly.
32520
+ const noop$1 = () => {};
32521
+
32598
32522
  const MovableLine = props => {
32599
32523
  const {
32600
32524
  onMoveLine = () => {},
@@ -32618,11 +32542,19 @@ const MovableLine = props => {
32618
32542
  const {
32619
32543
  visiblePoint: visiblePoint1,
32620
32544
  focusableHandle: focusableHandle1
32621
- } = useControlPoint(start, color, p => onMovePoint(0, p));
32545
+ } = useControlPoint({
32546
+ point: start,
32547
+ color,
32548
+ onMove: p => onMovePoint(0, p)
32549
+ });
32622
32550
  const {
32623
32551
  visiblePoint: visiblePoint2,
32624
32552
  focusableHandle: focusableHandle2
32625
- } = useControlPoint(end, color, p => onMovePoint(1, p));
32553
+ } = useControlPoint({
32554
+ point: end,
32555
+ color,
32556
+ onMove: p => onMovePoint(1, p)
32557
+ });
32626
32558
  const line = /*#__PURE__*/React.createElement(Line$1, {
32627
32559
  start: start,
32628
32560
  end: end,
@@ -32632,51 +32564,6 @@ const MovableLine = props => {
32632
32564
  });
32633
32565
  return /*#__PURE__*/React.createElement(React.Fragment, null, focusableHandle1, line, focusableHandle2, visiblePoint1, visiblePoint2);
32634
32566
  };
32635
- function useControlPoint(point, color, onMovePoint) {
32636
- const {
32637
- snapStep,
32638
- disableKeyboardInteraction
32639
- } = useGraphConfig();
32640
- const [focused, setFocused] = useState(false);
32641
- const keyboardHandleRef = useRef(null);
32642
- useDraggable({
32643
- gestureTarget: keyboardHandleRef,
32644
- point,
32645
- onMove: onMovePoint,
32646
- constrainKeyboardMovement: p => snap(snapStep, p)
32647
- });
32648
- const visiblePointRef = useRef(null);
32649
- const {
32650
- dragging
32651
- } = useDraggable({
32652
- gestureTarget: visiblePointRef,
32653
- point,
32654
- onMove: onMovePoint,
32655
- constrainKeyboardMovement: p => snap(snapStep, p)
32656
- });
32657
- const focusableHandle = /*#__PURE__*/React.createElement("g", {
32658
- "data-testid": "movable-point__focusable-handle",
32659
- className: "movable-point__focusable-handle",
32660
- tabIndex: disableKeyboardInteraction ? -1 : 0,
32661
- ref: keyboardHandleRef,
32662
- onFocus: () => setFocused(true),
32663
- onBlur: () => setFocused(false)
32664
- });
32665
- const visiblePoint = /*#__PURE__*/React.createElement(MovablePointView, {
32666
- point: point,
32667
- dragging: dragging,
32668
- color: color,
32669
- ref: visiblePointRef,
32670
- focusBehavior: {
32671
- type: "controlled",
32672
- showFocusRing: focused
32673
- }
32674
- });
32675
- return {
32676
- focusableHandle,
32677
- visiblePoint
32678
- };
32679
- }
32680
32567
  const defaultStroke = "var(--movable-line-stroke-color)";
32681
32568
  const Line$1 = props => {
32682
32569
  const {
@@ -33178,60 +33065,15 @@ function calculateBisectorPoint(point1, point2, vertex, isReflex, allowReflex, a
33178
33065
 
33179
33066
  const MovablePoint$1 = /*#__PURE__*/React.forwardRef((props, pointRef) => {
33180
33067
  const {
33181
- snapStep
33182
- } = useGraphConfig();
33183
- const elementRef = useRef(null);
33184
- const {
33185
- point,
33186
- onMove = () => {},
33187
- onFocusChange = () => {},
33188
- onClick = () => {},
33189
- cursor,
33190
- color: color$1 = color.blue,
33191
- constrain = p => snap(snapStep, p)
33192
- } = props;
33193
- const {
33194
- dragging
33195
- } = useDraggable({
33196
- gestureTarget: elementRef,
33197
- point,
33198
- onMove,
33199
- constrainKeyboardMovement: constrain
33200
- });
33201
- return /*#__PURE__*/React.createElement(MovablePointView, {
33202
- ref: ref => {
33203
- // Note: This handles the case where pointRef is either a
33204
- // function or a MutableRefObject. Mostly this is to satisfy
33205
- // the type system, the function branch seems to be the only
33206
- // one that occurs
33207
- if (typeof pointRef === "function") {
33208
- pointRef(ref);
33209
- } else if (pointRef !== null) {
33210
- pointRef.current = ref;
33211
- }
33212
-
33213
- // This ref is for the useDraggable and is not passed up the
33214
- // chain
33215
- elementRef.current = ref;
33216
- },
33217
- point: point,
33218
- color: color$1,
33219
- dragging: dragging,
33220
- focusBehavior: {
33221
- type: "uncontrolled",
33222
- tabIndex: 0,
33223
- onFocusChange
33224
- },
33225
- onClick: () => {
33226
- var _elementRef$current;
33227
- onClick && onClick();
33228
- (_elementRef$current = elementRef.current) == null || _elementRef$current.focus();
33229
- },
33230
- cursor: cursor
33231
- });
33068
+ visiblePoint,
33069
+ focusableHandle
33070
+ } = useControlPoint(_extends({}, props, {
33071
+ forwardedRef: pointRef
33072
+ }));
33073
+ return /*#__PURE__*/React.createElement(React.Fragment, null, focusableHandle, visiblePoint);
33232
33074
  });
33233
33075
 
33234
- const PolygonGraph = props => {
33076
+ const LimitedPolygonGraph = props => {
33235
33077
  const [hovered, setHovered] = React.useState(false);
33236
33078
  // This is more so required for the re-rendering that occurs when state
33237
33079
  // updates; specifically with regard to line weighting and polygon focus.
@@ -33342,6 +33184,153 @@ const PolygonGraph = props => {
33342
33184
  }
33343
33185
  })));
33344
33186
  };
33187
+
33188
+ // TODO(catjohnson): reduce redundancy between LimitedPolygonGraph and UnlimitedPolygonGraph
33189
+ // both components are vary similar, however more implementation is needed to be added before
33190
+ // it is clear what can and can't be shared between components.
33191
+ const UnlimitedPolygonGraph = props => {
33192
+ const [hovered, setHovered] = React.useState(false);
33193
+ // This is more so required for the re-rendering that occurs when state
33194
+ // updates; specifically with regard to line weighting and polygon focus.
33195
+ const [focusVisible, setFocusVisible] = React.useState(false);
33196
+ const {
33197
+ dispatch
33198
+ } = props;
33199
+ const {
33200
+ coords,
33201
+ showAngles,
33202
+ showSides,
33203
+ range,
33204
+ snapStep,
33205
+ snapTo = "grid"
33206
+ } = props.graphState;
33207
+ const graphConfig = useGraphConfig();
33208
+
33209
+ // TODO(catjohnson): Explore abstracting this code as it is similar to point.tsx
33210
+ // and hopefully we can cut down ont the unlimited graph redundancy.
33211
+ const {
33212
+ range: [x, y],
33213
+ disableKeyboardInteraction,
33214
+ graphDimensionsInPixels
33215
+ } = graphConfig;
33216
+ const widthPx = graphDimensionsInPixels[0];
33217
+ const heightPx = graphDimensionsInPixels[1];
33218
+ const [[left, top]] = useTransformVectorsToPixels([x[0], y[1]]);
33219
+ const pointRef = React.useRef([]);
33220
+
33221
+ // TODO(benchristel): can the default set of points be removed here? I don't
33222
+ // think coords can be null.
33223
+ const points = coords != null ? coords : [[0, 0]];
33224
+ const polygonRef = React.useRef(null);
33225
+ const dragReferencePoint = points[0];
33226
+ const constrain = ["angles", "sides"].includes(snapTo) ? p => p : p => snap(snapStep, p);
33227
+ const {
33228
+ dragging
33229
+ } = useDraggable({
33230
+ gestureTarget: polygonRef,
33231
+ point: dragReferencePoint,
33232
+ onMove: newPoint => {
33233
+ const delta = vec.sub(newPoint, dragReferencePoint);
33234
+ dispatch(actions.polygon.moveAll(delta));
33235
+ },
33236
+ constrainKeyboardMovement: constrain
33237
+ });
33238
+ const lines = getLines(points);
33239
+ React.useEffect(() => {
33240
+ const focusedIndex = props.graphState.focusedPointIndex;
33241
+ if (focusedIndex != null) {
33242
+ var _pointRef$current$foc;
33243
+ (_pointRef$current$foc = pointRef.current[focusedIndex]) == null || _pointRef$current$foc.focus();
33244
+ }
33245
+ }, [props.graphState.focusedPointIndex, pointRef]);
33246
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("rect", {
33247
+ style: {
33248
+ fill: "rgba(0,0,0,0)",
33249
+ cursor: "crosshair"
33250
+ },
33251
+ width: widthPx,
33252
+ height: heightPx,
33253
+ x: left,
33254
+ y: top,
33255
+ onClick: event => {
33256
+ const elementRect = event.currentTarget.getBoundingClientRect();
33257
+ const x = event.clientX - elementRect.x;
33258
+ const y = event.clientY - elementRect.y;
33259
+ const graphCoordinates = pixelsToVectors([[x, y]], graphConfig);
33260
+ dispatch(actions.polygon.addPoint(graphCoordinates[0]));
33261
+ }
33262
+ }), /*#__PURE__*/React.createElement(Polygon, {
33263
+ points: [...points],
33264
+ color: "var(--movable-line-stroke-color)",
33265
+ svgPolygonProps: {
33266
+ strokeWidth: focusVisible ? "var(--movable-line-stroke-weight-active)" : "var(--movable-line-stroke-weight)",
33267
+ style: {
33268
+ fill: "transparent"
33269
+ }
33270
+ }
33271
+ }), props.graphState.coords.map((point, i) => {
33272
+ const pt1 = points.at(i - 1);
33273
+ const pt2 = points[(i + 1) % points.length];
33274
+ if (!pt1 || !pt2) {
33275
+ return null;
33276
+ }
33277
+ return /*#__PURE__*/React.createElement(PolygonAngle, {
33278
+ key: "angle-" + i,
33279
+ centerPoint: point,
33280
+ endPoints: [pt1, pt2],
33281
+ range: range,
33282
+ polygonLines: lines,
33283
+ showAngles: !!showAngles,
33284
+ snapTo: snapTo
33285
+ });
33286
+ }), showSides && lines.map(([start, end], i) => {
33287
+ const [x, y] = vec.midpoint(start, end);
33288
+ const length = parseFloat(vec.dist(start, end).toFixed(snapTo === "sides" ? 0 : 1));
33289
+ return /*#__PURE__*/React.createElement(TextLabel, {
33290
+ key: "side-" + i,
33291
+ x: x,
33292
+ y: y
33293
+ }, !Number.isInteger(length) && "≈ ", length);
33294
+ }), /*#__PURE__*/React.createElement(Polygon, {
33295
+ points: [...points],
33296
+ color: "transparent",
33297
+ svgPolygonProps: {
33298
+ ref: polygonRef,
33299
+ tabIndex: disableKeyboardInteraction ? -1 : 0,
33300
+ strokeWidth: TARGET_SIZE,
33301
+ style: {
33302
+ cursor: dragging ? "grabbing" : "grab",
33303
+ fill: hovered ? "var(--mafs-blue)" : "transparent"
33304
+ },
33305
+ onMouseEnter: () => setHovered(true),
33306
+ onMouseLeave: () => setHovered(false),
33307
+ // Required to remove line weighting when user clicks away
33308
+ // from the focused polygon
33309
+ onKeyDownCapture: () => {
33310
+ setFocusVisible(hasFocusVisible(polygonRef.current));
33311
+ },
33312
+ // Required for lines to darken on focus
33313
+ onFocus: () => setFocusVisible(hasFocusVisible(polygonRef.current)),
33314
+ // Required for line weighting to update on blur. Without this,
33315
+ // the user has to hover over the shape for it to update
33316
+ onBlur: () => setFocusVisible(hasFocusVisible(polygonRef.current)),
33317
+ className: "movable-polygon"
33318
+ }
33319
+ }), props.graphState.coords.map((point, i) => /*#__PURE__*/React.createElement(MovablePoint$1, {
33320
+ key: i,
33321
+ point: point,
33322
+ onMove: destination => dispatch(actions.pointGraph.movePoint(i, destination)),
33323
+ ref: ref => {
33324
+ pointRef.current[i] = ref;
33325
+ },
33326
+ onFocus: () => {
33327
+ dispatch(actions.pointGraph.focusPoint(i));
33328
+ },
33329
+ onClick: () => {
33330
+ dispatch(actions.pointGraph.clickPoint(i));
33331
+ }
33332
+ })));
33333
+ };
33345
33334
  function getLines(points) {
33346
33335
  return points.map((point, i) => {
33347
33336
  const next = points[(i + 1) % points.length];
@@ -33362,6 +33351,10 @@ const hasFocusVisible = element => {
33362
33351
  return matches(":focus");
33363
33352
  }
33364
33353
  };
33354
+ const PolygonGraph = props => {
33355
+ const numSides = props.graphState.numSides;
33356
+ return numSides === "unlimited" ? UnlimitedPolygonGraph(props) : LimitedPolygonGraph(props);
33357
+ };
33365
33358
 
33366
33359
  function getGradableGraph(state, initialGraph) {
33367
33360
  if (!state.hasBeenInteractedWith) {
@@ -33801,10 +33794,10 @@ function UnlimitedPointGraph(props) {
33801
33794
  const {
33802
33795
  dispatch
33803
33796
  } = props;
33804
- const graphState = useGraphConfig();
33797
+ const graphConfig = useGraphConfig();
33805
33798
  const {
33806
33799
  range: [[minX, maxX], [minY, maxY]]
33807
- } = graphState;
33800
+ } = graphConfig;
33808
33801
  const width = maxX - minX;
33809
33802
  const height = maxY - minY;
33810
33803
  const [[widthPx, heightPx]] = useTransformDimensionsToPixels([width, height]);
@@ -33830,7 +33823,7 @@ function UnlimitedPointGraph(props) {
33830
33823
  const elementRect = event.currentTarget.getBoundingClientRect();
33831
33824
  const x = event.clientX - elementRect.x;
33832
33825
  const y = event.clientY - elementRect.y;
33833
- const graphCoordinates = pixelsToVectors([[x, y]], graphState);
33826
+ const graphCoordinates = pixelsToVectors([[x, y]], graphConfig);
33834
33827
  dispatch(actions.pointGraph.addPoint(graphCoordinates[0]));
33835
33828
  }
33836
33829
  }), props.graphState.coords.map((point, i) => /*#__PURE__*/React.createElement(MovablePoint$1, {
@@ -33840,24 +33833,8 @@ function UnlimitedPointGraph(props) {
33840
33833
  ref: ref => {
33841
33834
  itemsRef.current[i] = ref;
33842
33835
  },
33843
- onFocusChange: (event, isFocused) => {
33844
- if (isFocused) {
33845
- dispatch(actions.pointGraph.focusPoint(i));
33846
- } else {
33847
- var _event$relatedTarget, _event$relatedTarget2;
33848
- if (((_event$relatedTarget = event.relatedTarget) == null ? void 0 : _event$relatedTarget.id) === REMOVE_BUTTON_ID) {
33849
- return;
33850
- // This is an optimization: If the next target
33851
- // is a point then don't blur because it casues
33852
- // the remove button to get taken off the page
33853
- // and then put back on The new point will
33854
- // receive focus and set the correct state in
33855
- // the reducer
33856
- } else if ((_event$relatedTarget2 = event.relatedTarget) != null && _event$relatedTarget2.classList.contains("movable-point")) {
33857
- return;
33858
- }
33859
- dispatch(actions.pointGraph.blurPoint());
33860
- }
33836
+ onFocus: () => {
33837
+ dispatch(actions.pointGraph.focusPoint(i));
33861
33838
  },
33862
33839
  onClick: () => {
33863
33840
  dispatch(actions.pointGraph.clickPoint(i));
@@ -34019,7 +33996,6 @@ function useDraggablePx(args) {
34019
33996
  * - Protractor
34020
33997
  * - Interactive Graph Elements
34021
33998
  */
34022
- const REMOVE_BUTTON_ID = "perseus_mafs_remove_button";
34023
33999
  const MafsGraph = props => {
34024
34000
  var _props$flags;
34025
34001
  const {
@@ -34060,6 +34036,7 @@ const MafsGraph = props => {
34060
34036
  const {
34061
34037
  strings
34062
34038
  } = usePerseusI18n();
34039
+ const interactionPrompt = isUnlimitedGraphState(state) && state.showKeyboardInteractionInvitation;
34063
34040
  useOnMountEffect(() => {
34064
34041
  analytics.onAnalyticsEvent({
34065
34042
  type: "perseus:interactive-graph-widget:rendered",
@@ -34172,7 +34149,7 @@ const MafsGraph = props => {
34172
34149
  }, /*#__PURE__*/React.createElement("svg", nestedSVGAttributes, props.showProtractor && /*#__PURE__*/React.createElement(Protractor, null), renderGraph({
34173
34150
  state,
34174
34151
  dispatch
34175
- }))))), state.type === "point" && state.showKeyboardInteractionInvitation && /*#__PURE__*/React.createElement(View, {
34152
+ }))))), interactionPrompt && /*#__PURE__*/React.createElement(View, {
34176
34153
  style: {
34177
34154
  textAlign: "center",
34178
34155
  backgroundColor: "white",
@@ -34189,7 +34166,7 @@ const MafsGraph = props => {
34189
34166
  state,
34190
34167
  dispatch,
34191
34168
  width,
34192
- strings
34169
+ perseusStrings: strings
34193
34170
  })));
34194
34171
  };
34195
34172
  const renderPointGraphControls = props => {
@@ -34199,7 +34176,7 @@ const renderPointGraphControls = props => {
34199
34176
  focusedPointIndex
34200
34177
  } = props.state;
34201
34178
  const {
34202
- strings
34179
+ perseusStrings
34203
34180
  } = props;
34204
34181
  const shouldShowRemoveButton = showRemovePointButton && focusedPointIndex !== null;
34205
34182
  return /*#__PURE__*/React.createElement(View, {
@@ -34217,7 +34194,7 @@ const renderPointGraphControls = props => {
34217
34194
  onClick: () => {
34218
34195
  props.dispatch(actions.pointGraph.addPoint([0, 0]));
34219
34196
  }
34220
- }, strings.addPoint), interactionMode === "mouse" && /*#__PURE__*/React.createElement(Button, {
34197
+ }, perseusStrings.addPoint), interactionMode === "mouse" && /*#__PURE__*/React.createElement(Button, {
34221
34198
  id: REMOVE_BUTTON_ID,
34222
34199
  kind: "secondary",
34223
34200
  color: "destructive"
@@ -34230,17 +34207,66 @@ const renderPointGraphControls = props => {
34230
34207
  marginLeft: "20px",
34231
34208
  visibility: shouldShowRemoveButton ? "visible" : "hidden"
34232
34209
  },
34233
- onClick: event => {
34210
+ onClick: _event => {
34234
34211
  props.dispatch(actions.pointGraph.removePoint(props.state.focusedPointIndex));
34235
34212
  }
34236
- }, strings.removePoint));
34213
+ }, perseusStrings.removePoint));
34214
+ };
34215
+
34216
+ /**
34217
+ * TODO(catjohnson): The polygon controls will be vastly different from the point controls.
34218
+ * Will be keeping this function as is for the time being, even if it's a copy of the point graph
34219
+ * controls.
34220
+ */
34221
+ const renderPolygonGraphControls = props => {
34222
+ const {
34223
+ interactionMode,
34224
+ showRemovePointButton,
34225
+ focusedPointIndex
34226
+ } = props.state;
34227
+ const {
34228
+ perseusStrings
34229
+ } = props;
34230
+ const shouldShowRemoveButton = showRemovePointButton && focusedPointIndex !== null;
34231
+ return /*#__PURE__*/React.createElement(View, {
34232
+ style: {
34233
+ flexDirection: "row",
34234
+ width: props.width
34235
+ }
34236
+ }, interactionMode === "keyboard" && /*#__PURE__*/React.createElement(Button, {
34237
+ kind: "secondary",
34238
+ style: {
34239
+ width: "100%",
34240
+ marginLeft: "20px"
34241
+ },
34242
+ tabIndex: 0,
34243
+ onClick: () => {
34244
+ props.dispatch(actions.polygon.addPoint([0, 0]));
34245
+ }
34246
+ }, perseusStrings.addPoint), interactionMode === "mouse" && /*#__PURE__*/React.createElement(Button, {
34247
+ id: REMOVE_BUTTON_ID,
34248
+ kind: "secondary",
34249
+ color: "destructive"
34250
+ // This button is meant to be interacted with by the mouse only
34251
+ // Never allow learners to tab to this button
34252
+ ,
34253
+ tabIndex: -1,
34254
+ style: {
34255
+ width: "100%",
34256
+ marginLeft: "20px",
34257
+ visibility: shouldShowRemoveButton ? "visible" : "hidden"
34258
+ },
34259
+ onClick: _event => {
34260
+ props.dispatch(actions.polygon.removePoint(props.state.focusedPointIndex));
34261
+ }
34262
+ }, perseusStrings.removePoint));
34237
34263
  };
34238
34264
  const renderGraphControls = props => {
34239
34265
  const {
34240
34266
  state,
34241
34267
  dispatch,
34242
34268
  width,
34243
- strings
34269
+ perseusStrings
34244
34270
  } = props;
34245
34271
  const {
34246
34272
  type
@@ -34252,7 +34278,17 @@ const renderGraphControls = props => {
34252
34278
  state,
34253
34279
  dispatch,
34254
34280
  width,
34255
- strings
34281
+ perseusStrings
34282
+ });
34283
+ }
34284
+ return null;
34285
+ case "polygon":
34286
+ if (state.numSides === "unlimited") {
34287
+ return renderPolygonGraphControls({
34288
+ state,
34289
+ dispatch,
34290
+ width,
34291
+ perseusStrings
34256
34292
  });
34257
34293
  }
34258
34294
  return null;
@@ -34261,21 +34297,29 @@ const renderGraphControls = props => {
34261
34297
  }
34262
34298
  };
34263
34299
  function handleFocusEvent(event, state, dispatch) {
34264
- if (state.type === "point" && state.numPoints === "unlimited") {
34300
+ if (isUnlimitedGraphState(state)) {
34265
34301
  if (event.target.classList.contains("mafs-graph") && state.interactionMode === "mouse") {
34266
34302
  dispatch(actions.global.changeKeyboardInvitationVisibility(true));
34267
34303
  }
34268
34304
  }
34269
34305
  }
34270
- function handleBlurEvent(event, state, dispatch) {
34271
- if (state.type === "point" && state.numPoints === "unlimited") {
34306
+ function handleBlurEvent(_event, state, dispatch) {
34307
+ if (isUnlimitedGraphState(state)) {
34272
34308
  dispatch(actions.global.changeKeyboardInvitationVisibility(false));
34273
34309
  }
34274
34310
  }
34275
34311
  function handleKeyboardEvent(event, state, dispatch) {
34276
- if (state.type === "point" && state.numPoints === "unlimited") {
34312
+ if (isUnlimitedGraphState(state)) {
34277
34313
  if (event.key === "Backspace") {
34278
- dispatch(actions.global.deleteIntent());
34314
+ var _document$activeEleme;
34315
+ // TODO(benchristel): Checking classList here is a hack to prevent
34316
+ // points from being deleted if the user presses the backspace key
34317
+ // while the whole graph is focused. Instead of doing this, we
34318
+ // should move the keyboard event handler to the movable point
34319
+ // handle element.
34320
+ if ((_document$activeEleme = document.activeElement) != null && _document$activeEleme.classList.contains("movable-point__focusable-handle")) {
34321
+ dispatch(actions.global.deleteIntent());
34322
+ }
34279
34323
 
34280
34324
  // After removing a point blur
34281
34325
  // It would be nice if this could focus on the graph but doing so
@@ -34518,10 +34562,15 @@ function initializeGraphState(params) {
34518
34562
  case "polygon":
34519
34563
  return _extends({}, shared, {
34520
34564
  type: "polygon",
34565
+ numSides: graph.numSides || 0,
34521
34566
  showAngles: Boolean(graph.showAngles),
34522
34567
  showSides: Boolean(graph.showSides),
34523
34568
  coords: getPolygonCoords(graph, range, step),
34524
- snapTo: (_graph$snapTo = graph.snapTo) != null ? _graph$snapTo : "grid"
34569
+ snapTo: (_graph$snapTo = graph.snapTo) != null ? _graph$snapTo : "grid",
34570
+ focusedPointIndex: null,
34571
+ showRemovePointButton: false,
34572
+ interactionMode: "mouse",
34573
+ showKeyboardInteractionInvitation: false
34525
34574
  });
34526
34575
  case "point":
34527
34576
  return _extends({}, shared, {
@@ -34811,10 +34860,9 @@ function interactiveGraphReducer(state, action) {
34811
34860
  }
34812
34861
  function doDeleteIntent(state, action) {
34813
34862
  // For unlimited point graphs
34814
- if (state.type === "point" && state.numPoints === "unlimited") {
34815
- // if there's a focused point
34863
+ if (isUnlimitedGraphState(state)) {
34864
+ // Remove the last point that was focused, if any
34816
34865
  if (state.focusedPointIndex !== null) {
34817
- // Remove the focused focus
34818
34866
  return doRemovePoint(state, actions.pointGraph.removePoint(state.focusedPointIndex));
34819
34867
  }
34820
34868
  }
@@ -34822,6 +34870,7 @@ function doDeleteIntent(state, action) {
34822
34870
  }
34823
34871
  function doFocusPoint(state, action) {
34824
34872
  switch (state.type) {
34873
+ case "polygon":
34825
34874
  case "point":
34826
34875
  return _extends({}, state, {
34827
34876
  focusedPointIndex: action.index
@@ -34832,6 +34881,7 @@ function doFocusPoint(state, action) {
34832
34881
  }
34833
34882
  function doBlurPoint(state, action) {
34834
34883
  switch (state.type) {
34884
+ case "polygon":
34835
34885
  case "point":
34836
34886
  const nextState = _extends({}, state, {
34837
34887
  showRemovePointButton: false
@@ -34845,10 +34895,7 @@ function doBlurPoint(state, action) {
34845
34895
  }
34846
34896
  }
34847
34897
  function doClickPoint(state, action) {
34848
- if (state.type !== "point") {
34849
- return state;
34850
- }
34851
- if (state.numPoints === "unlimited") {
34898
+ if (isUnlimitedGraphState(state)) {
34852
34899
  return _extends({}, state, {
34853
34900
  focusedPointIndex: action.index,
34854
34901
  showRemovePointButton: true
@@ -34857,10 +34904,7 @@ function doClickPoint(state, action) {
34857
34904
  return state;
34858
34905
  }
34859
34906
  function doChangeInteractionMode(state, action) {
34860
- if (state.type !== "point") {
34861
- return state;
34862
- }
34863
- if (state.numPoints === "unlimited") {
34907
+ if (isUnlimitedGraphState(state)) {
34864
34908
  const nextKeyboardInvitation = action.mode === "keyboard" ? false : state.showKeyboardInteractionInvitation;
34865
34909
  return _extends({}, state, {
34866
34910
  interactionMode: action.mode,
@@ -34870,10 +34914,7 @@ function doChangeInteractionMode(state, action) {
34870
34914
  return state;
34871
34915
  }
34872
34916
  function doChangeKeyboardInvitationVisibility(state, action) {
34873
- if (state.type !== "point") {
34874
- return state;
34875
- }
34876
- if (state.numPoints === "unlimited") {
34917
+ if (isUnlimitedGraphState(state)) {
34877
34918
  return _extends({}, state, {
34878
34919
  showKeyboardInteractionInvitation: action.shouldShow,
34879
34920
  hasBeenInteractedWith: true
@@ -35204,7 +35245,7 @@ function doChangeRange(state, action) {
35204
35245
  });
35205
35246
  }
35206
35247
  function doAddPoint(state, action) {
35207
- if (state.type !== "point") {
35248
+ if (!isUnlimitedGraphState(state)) {
35208
35249
  return state;
35209
35250
  }
35210
35251
  const {
@@ -35228,7 +35269,7 @@ function doAddPoint(state, action) {
35228
35269
  });
35229
35270
  }
35230
35271
  function doRemovePoint(state, action) {
35231
- if (state.type !== "point") {
35272
+ if (!isUnlimitedGraphState(state)) {
35232
35273
  return state;
35233
35274
  }
35234
35275
  let nextFocusedPointIndex;
@@ -37534,9 +37575,6 @@ function shouldUseMafs(mafsFlags, graph) {
37534
37575
  return Boolean(mafsFlags["point"]);
37535
37576
  case "polygon":
37536
37577
  if (graph.numSides === UNLIMITED) {
37537
- // TODO(benchristel): add a feature flag for the "unlimited"
37538
- // case once we've implemented polygon graphs with unlimited
37539
- // sides
37540
37578
  return Boolean(mafsFlags["unlimited-polygon"]);
37541
37579
  }
37542
37580
  return Boolean(mafsFlags["polygon"]);
@@ -37554,974 +37592,15 @@ var InteractiveGraph$1 = {
37554
37592
  validator: interactiveGraphValidator
37555
37593
  };
37556
37594
 
37557
- const black = "#000000";
37558
- const grayDarker = "#333333";
37559
- const grayDark = "#555555";
37560
- const gray = "#999999";
37561
- const grayLight = "#AAAAAA";
37562
- const grayLighter = "#DDDDDD";
37563
- const white = "#FFFFFF";
37564
- const blue = "#005A88";
37565
- const blueDark = "#2C3747";
37566
- const green = "#76A005";
37567
- const red = "#CF5044";
37568
- const yellow = "#FFC40D";
37569
- const orange = "#BF4F04";
37570
- const pink = "#C3325F";
37571
- const purple = "#7A43B6";
37572
- const bodyBackground = "#FFFFFF";
37573
- const textColor = "#444444";
37574
- const linkColor = "#005987";
37575
- const linkColorHover = "#678D00";
37576
- const sansFontFamily = "'Helvetica Neue',Helvetica,Arial,sans-serif";
37577
- const serifFontFamily = "Georgia,'Times New Roman',Times,serif";
37578
- const monoFontFamily = "Monaco,Menlo,Consolas,'Courier New',monospace";
37579
- const baseFontSize = "14px";
37580
- const baseFontFamily = "inherit";
37581
- const baseLineHeight = "20px";
37582
- const altFontFamily = "Georgia,'Times New Roman',Times,serif";
37583
- const headingsFontFamily = "inherit";
37584
- const headingsFontWeight = "bold";
37585
- const headingsColor = "inherit";
37586
- const fontSizeLarge = "18px";
37587
- const fontSizeSmall = "12px";
37588
- const fontSizeMini = "10.5px";
37589
- const paddingLarge = "11px 19px";
37590
- const paddingSmall = "2px 10px";
37591
- const paddingMini = "0 6px";
37592
- const baseBorderRadius = "4px";
37593
- const borderRadiusLarge = "6px";
37594
- const borderRadiusSmall = "3px";
37595
- const tableBackground = "#000000";
37596
- const tableBackgroundAccent = "#F9F9F9";
37597
- const tableBackgroundHover = "#F5F5F5";
37598
- const tableBorder = "#DDDDDD";
37599
- const btnBackground = "#FFFFFF";
37600
- const btnBackgroundHighlight = "rgb(230, 230, 230)";
37601
- const btnBorder = "#CCCCCC";
37602
- const btnPrimaryBackground = "#0088CC";
37603
- const btnPrimaryBackgroundHighlight = "rgb(0, 68, 204)";
37604
- const btnInfoBackground = "#5BC0DE";
37605
- const btnInfoBackgroundHighlight = "#2F96B4";
37606
- const btnSuccessBackground = "#62C462";
37607
- const btnSuccessBackgroundHighlight = "#51A351";
37608
- const btnWarningBackground = "rgb(251, 180, 81)";
37609
- const btnWarningBackgroundHighlight = "#F89406";
37610
- const btnDangerBackground = "#EE5F5B";
37611
- const btnDangerBackgroundHighlight = "#BD362F";
37612
- const btnInverseBackground = "#444444";
37613
- const btnInverseBackgroundHighlight = "#222222";
37614
- const inputBackground = "#FFFFFF";
37615
- const inputBorder = "#CCCCCC";
37616
- const inputBorderRadius = "4px";
37617
- const inputDisabledBackground = "#EEEEEE";
37618
- const formActionsBackground = "#F5F5F5";
37619
- const inputHeight = "30px";
37620
- const dropdownBackground = "#FFFFFF";
37621
- const dropdownBorder = "rgba(0, 0, 0, 0.2)";
37622
- const dropdownDividerTop = "#E5E5E5";
37623
- const dropdownDividerBottom = "#FFFFFF";
37624
- const dropdownLinkColor = "#333333";
37625
- const dropdownLinkColorHover = "#FFFFFF";
37626
- const dropdownLinkColorActive = "#FFFFFF";
37627
- const dropdownLinkBackgroundActive = "#0088CC";
37628
- const dropdownLinkBackgroundHover = "#0088CC";
37629
- const zindexDropdown = 1000;
37630
- const zindexPopover = 1010;
37631
- const zindexTooltip = 1030;
37632
- const zindexFixedNavbar = 1030;
37633
- const zindexHeader = 1060;
37634
- const zindexModalBackdrop = 1070;
37635
- const zindexModal = 1080;
37636
- const zindexAboveModal = 1090;
37637
- const iconSpritePath = "../img/glyphicons-halflings.png";
37638
- const iconWhiteSpritePath = "../img/glyphicons-halflings-white.png";
37639
- const placeholderText = "#999999";
37640
- const hrBorder = "#EEEEEE";
37641
- const horizontalComponentOffset = "180px";
37642
- const wellBackground = "#F5F5F5";
37643
- const navbarCollapseWidth = "979px";
37644
- const navbarCollapseDesktopWidth = "980px";
37645
- const navbarHeight = "40px";
37646
- const navbarBackgroundHighlight = "#FFFFFF";
37647
- const navbarBackground = "rgb(242, 242, 242)";
37648
- const navbarBorder = "rgb(212, 212, 212)";
37649
- const navbarText = "#777777";
37650
- const navbarLinkColor = "#777777";
37651
- const navbarLinkColorHover = "#333333";
37652
- const navbarLinkColorActive = "#555555";
37653
- const navbarLinkBackgroundHover = "#000000";
37654
- const navbarLinkBackgroundActive = "rgb(230, 230, 230)";
37655
- const navbarBrandColor = "#777777";
37656
- const navbarInverseBackground = "#111111";
37657
- const navbarInverseBackgroundHighlight = "#222222";
37658
- const navbarInverseBorder = "#252525";
37659
- const navbarInverseText = "#999999";
37660
- const navbarInverseLinkColor = "#999999";
37661
- const navbarInverseLinkColorHover = "#FFFFFF";
37662
- const navbarInverseLinkColorActive = "#FFFFFF";
37663
- const navbarInverseLinkBackgroundHover = "#000000";
37664
- const navbarInverseLinkBackgroundActive = "#111111";
37665
- const navbarInverseSearchBackground = "rgb(82, 82, 82)";
37666
- const navbarInverseSearchBackgroundFocus = "#FFFFFF";
37667
- const navbarInverseSearchBorder = "#111111";
37668
- const navbarInverseSearchPlaceholderColor = "#CCCCCC";
37669
- const navbarInverseBrandColor = "#999999";
37670
- const paginationBackground = "#FFFFFF";
37671
- const paginationBorder = "#DDDDDD";
37672
- const paginationActiveBackground = "#F5F5F5";
37673
- const heroUnitBackground = "#EEEEEE";
37674
- const heroUnitHeadingColor = "inherit";
37675
- const heroUnitLeadColor = "inherit";
37676
- const warningText = "#C09853";
37677
- const warningBackground = "#FCF8E3";
37678
- const warningBorder = "rgb(251, 239, 213)";
37679
- const errorText = "#B94A48";
37680
- const errorBackground = "#F2DEDE";
37681
- const errorBorder = "rgb(238, 211, 215)";
37682
- const successText = "#468847";
37683
- const successBackground = "#DFF0D8";
37684
- const successBorder = "rgb(212, 232, 197)";
37685
- const infoText = "#4A7C17";
37686
- const infoBackground = "#EDF2DF";
37687
- const infoBorder = "rgb(228, 232, 197)";
37688
- const tooltipColor = "#FFFFFF";
37689
- const tooltipBackground = "#000000";
37690
- const tooltipArrowWidth = "5px";
37691
- const tooltipArrowColor = "#000000";
37692
- const popoverBackground = "#FFFFFF";
37693
- const popoverArrowWidth = "10px";
37694
- const popoverArrowColor = "#FFFFFF";
37695
- const popoverTitleBackground = "rgb(247, 247, 247)";
37696
- const popoverArrowOuterWidth = "11px";
37697
- const popoverArrowOuterColor = "rgba(0, 0, 0, 0.25)";
37698
- const gridColumns = "12";
37699
- const gridColumnWidth = "60px";
37700
- const gridGutterWidth = "20px";
37701
- const gridRowWidth = "940px";
37702
- const gridColumnWidth1200 = "70px";
37703
- const gridGutterWidth1200 = "30px";
37704
- const gridRowWidth1200 = "1170px";
37705
- const gridColumnWidth768 = "42px";
37706
- const gridGutterWidth768 = "20px";
37707
- const gridRowWidth768 = "724px";
37708
- const fluidGridColumnWidth = "6.382978723404255%";
37709
- const fluidGridGutterWidth = "2.127659574468085%";
37710
- const fluidGridColumnWidth1200 = "5.982905982905983%";
37711
- const fluidGridGutterWidth1200 = "2.564102564102564%";
37712
- const fluidGridColumnWidth768 = "5.801104972375691%";
37713
- const fluidGridGutterWidth768 = "2.7624309392265194%";
37714
- const kaGreen = "#71B307";
37715
- const kaGreenLight = "#BED47A";
37716
- const kaBlue = "#314453";
37717
- const kaBlueLight = "#4D6779";
37718
- const grayExtraDark = "#111111";
37719
- const grayExtraLight = "#EEEEEE";
37720
- const graySuperLight = "#F7F7F7";
37721
- const whiteDark = "#FDFDFD";
37722
- const dark = "#21242C";
37723
- const blueDarkUnsaturated = "#3B414E";
37724
- const blueDarkSaturated = "#1F3043";
37725
- const blueLight = "#A9C0D1";
37726
- const greenLight = "#C6D1AD";
37727
- const greenDark = "#356700";
37728
- const yellowGreen = "#9DB63B";
37729
- const okGreen = "#A7CF5B";
37730
- const alertRed = "#C42420";
37731
- const coral = "#EE6666";
37732
- const grayBlue = "#9AB3B9";
37733
- const lightPageBackground = "#FDFDFD";
37734
- const yclaBlue = "#49BAD5";
37735
- const yclaTeal = "#56D0B3";
37736
- const yclaTealDark = "#50C1A7";
37737
- const yclaGreenDark = "#3D9A82";
37738
- const yclaGreen = "#81C262";
37739
- const learnstormBlue = "#4898FC";
37740
- const homepageBlue = "#46A8BF";
37741
- const backgroundBlue = "#00294A";
37742
- const teacherSignupBlue = "#335d7d";
37743
- const homepageGreen = "#2B8E7B";
37744
- const streakColor = "#F79734";
37745
- const facebookColor = "#1A60A2";
37746
- const blueGoogleColor = "#2CAFE2";
37747
- const redGoogleColor = "#BF4434";
37748
- const homepageColor = "#2D585E";
37749
- const lightTextColor = "#898989";
37750
- const fontSizeTiny = "11px";
37751
- const fontSizeNormal = "14px";
37752
- const fontSizeMedium = "16px";
37753
- const fontSizeExtraLarge = "24px";
37754
- const fontSizeHuge = "36px";
37755
- const fontSizeBakana = "48px";
37756
- const fontSizeBananas = "60px";
37757
- const fixedWidthFontFamily = "'Helvetica Neue',Helvetica,Arial,sans-serif";
37758
- const contentPadding = "20px";
37759
- const primaryButtonBackground = "#89B908";
37760
- const primaryButtonBorder = "#76A005";
37761
- const buttonTextColor = "rgb(122, 122, 122)";
37762
- const buttonBorderRadius = "3px";
37763
- const basicBorderColor = "#CCCCCC";
37764
- const minContainerWidth = "1000px";
37765
- const maxContainerWidth = "1200px";
37766
- const formHintColor = "#999999";
37767
- const guidelineExampleText = "#606060";
37768
- const hoverCardWidth = "450px";
37769
- const menuHighlightColor = "#96AB4F";
37770
- const menuHighlightBorderColor = "#76A005";
37771
- const menuActiveTextColor = "#FFFFFF";
37772
- const menuInactiveTextColor = "#444444";
37773
- const menuSubheaderTextColor = "rgb(120, 120, 120)";
37774
- const menuBorderColor = "#94A170";
37775
- const unreadBackgroundColor = "#ECEEF4";
37776
- const menuLineHeight = "18px";
37777
- const menuSubheaderLineHeight = "17px";
37778
- const menuSubheaderFontSize = "9px";
37779
- const notificationBarColor = "#4858A4";
37780
- const modalBodyTopPadding = "20px";
37781
- const modalDialogPadding = "15px";
37782
- const modalSectionPadding = "9px";
37783
- const mathDomain1 = "#11ACCD";
37784
- const mathDomain2 = "#63D9EA";
37785
- const mathDomain3 = "#027d97";
37786
- const mathDomain4 = "#085566";
37787
- const partnerContentDomain1 = "#01A995";
37788
- const partnerContentDomain2 = "#01D1C1";
37789
- const partnerContentDomain3 = "#208170";
37790
- const partnerContentDomain4 = "#144F44";
37791
- const csDomain1 = "#1FAB54";
37792
- const csDomain2 = "#74CF70";
37793
- const csDomain3 = "#0D923F";
37794
- const csDomain4 = "#085E29";
37795
- const economicsDomain1 = "#E07D10";
37796
- const economicsDomain2 = "#FFBE26";
37797
- const economicsDomain3 = "#A75A05";
37798
- const economicsDomain4 = "#953C02";
37799
- const collegeCareersMoreDomain1 = "#01A995";
37800
- const collegeCareersMoreDomain2 = "#01D1C1";
37801
- const collegeCareersMoreDomain3 = "#208170";
37802
- const collegeCareersMoreDomain4 = "#144F44";
37803
- const humanitiesDomain1 = "#E84D39";
37804
- const humanitiesDomain2 = "#FF8482";
37805
- const humanitiesDomain3 = "#BE2612";
37806
- const humanitiesDomain4 = "#8C1C0D";
37807
- const gtpDomain1 = "#1865F2";
37808
- const gtpDomain2 = "#1865F2";
37809
- const gtpDomain3 = "#1865F2";
37810
- const gtpDomain4 = "#1865F2";
37811
- const scienceDomain1 = "#CA337C";
37812
- const scienceDomain2 = "#FF92C6";
37813
- const scienceDomain3 = "#9E034E";
37814
- const scienceDomain4 = "#6B0235";
37815
- const testPrepDomain1 = "#1865F2";
37816
- const testPrepDomain2 = "#1865F2";
37817
- const testPrepDomain3 = "#1865F2";
37818
- const testPrepDomain4 = "#1865F2";
37819
- const defaultDomain1 = "#1865F2";
37820
- const defaultDomain2 = "#66afe9";
37821
- const defaultDomain3 = "#1152b0";
37822
- const defaultDomain4 = "#0d3d82";
37823
- const defaultDomainColor = "#314453";
37824
- const defaultSubjectColor = "#4D6779";
37825
- const defaultTopicColor = "#6A8DA6";
37826
- const defaultHoverColor = "#314453";
37827
- const defaultLinkColor = "#314453";
37828
- const defaultLinkHoverColor = "#6A8DA6";
37829
- const scienceDomainColor = "#94424F";
37830
- const scienceSubjectColor = "#9D4A5A";
37831
- const scienceTopicColor = "#C55F73";
37832
- const scienceHoverColor = "#94424F";
37833
- const scienceLinkColor = "#94424F";
37834
- const scienceLinkHoverColor = "#C55F73";
37835
- const humanitiesDomainColor = "#AD3434";
37836
- const humanitiesSubjectColor = "#C13B31";
37837
- const humanitiesTopicColor = "#D24A45";
37838
- const humanitiesHoverColor = "#AD3434";
37839
- const humanitiesLinkColor = "#AD3434";
37840
- const humanitiesLinkHoverColor = "#D24A45";
37841
- const economicsDomainColor = "#B77033";
37842
- const economicsSubjectColor = "#BF7B34";
37843
- const economicsTopicColor = "#D1933B";
37844
- const economicsHoverColor = "#B77033";
37845
- const economicsLinkColor = "#B77033";
37846
- const economicsLinkHoverColor = "#D1933B";
37847
- const csDomainColor = "#437A39";
37848
- const csSubjectColor = "#53893E";
37849
- const csTopicColor = "#689B51";
37850
- const csHoverColor = "#437A39";
37851
- const csLinkColor = "#437A39";
37852
- const csLinkHoverColor = "#689B51";
37853
- const partnerContentDomainColor = "#218270";
37854
- const partnerContentSubjectColor = "#2C8D7B";
37855
- const partnerContentTopicColor = "#329A86";
37856
- const partnerContentHoverColor = "#218270";
37857
- const partnerContentLinkColor = "#218270";
37858
- const partnerContentLinkHoverColor = "#329A86";
37859
- const essayDomainColor = "#0071B3";
37860
- const mathDomainColor = "#1C758A";
37861
- const mathSubjectColor = "#46A8BF";
37862
- const mathTopicColor = "#4FBAD4";
37863
- const mathHoverColor = "#1C758A";
37864
- const mathLinkColor = "#1C758A";
37865
- const mathLinkHoverColor = "#4FBAD4";
37866
- const testPrepDomainColor = "#644172";
37867
- const testPrepSubjectColor = "#7E5F8E";
37868
- const testPrepTopicColor = "#9A72AC";
37869
- const testPrepHoverColor = "#644172";
37870
- const testPrepLinkColor = "#644172";
37871
- const testPrepLinkHoverColor = "#9A72AC";
37872
- const collegeCareersMoreDomainColor = "#218270";
37873
- const collegeCareersMoreSubjectColor = "#2C8D7B";
37874
- const collegeCareersMoreTopicColor = "#329A86";
37875
- const collegeCareersMoreHoverColor = "#218270";
37876
- const collegeCareersMoreLinkColor = "#218270";
37877
- const collegeCareersMoreLinkHoverColor = "#329A86";
37878
- const colorProficient = "#1C758A";
37879
- const colorPracticed = "rgb(158, 221, 235)";
37880
- const colorMastery1 = "rgb(90, 197, 221)";
37881
- const colorMastery2 = "rgb(42, 174, 203)";
37882
- const colorMastery3 = "#1C758A";
37883
- const colorSuggested = "#73982C";
37884
- const colorReview = "#E35D04";
37885
- const colorNotStarted = "#CCCCCC";
37886
- const colorStarted = "#C7E5F7";
37887
- const colorStruggling = "#C30202";
37888
- const colorPersonal = "#00809C";
37889
- const colorPractice = "#96D9FF";
37890
- const colorEnergyPoints = "#005987";
37891
- const pureSmMin = "568px";
37892
- const pureMdMin = "768px";
37893
- const pureLgMin = "1024px";
37894
- const pureXlMin = "1200px";
37895
- const pureXsMax = "567px";
37896
- const pureSmMax = "767px";
37897
- const pureMdMax = "1023px";
37898
- const pureLgMax = "1199px";
37899
-
37900
- var globalConstants = /*#__PURE__*/Object.freeze({
37901
- __proto__: null,
37902
- black: black,
37903
- grayDarker: grayDarker,
37904
- grayDark: grayDark,
37905
- gray: gray,
37906
- grayLight: grayLight,
37907
- grayLighter: grayLighter,
37908
- white: white,
37909
- blue: blue,
37910
- blueDark: blueDark,
37911
- green: green,
37912
- red: red,
37913
- yellow: yellow,
37914
- orange: orange,
37915
- pink: pink,
37916
- purple: purple,
37917
- bodyBackground: bodyBackground,
37918
- textColor: textColor,
37919
- linkColor: linkColor,
37920
- linkColorHover: linkColorHover,
37921
- sansFontFamily: sansFontFamily,
37922
- serifFontFamily: serifFontFamily,
37923
- monoFontFamily: monoFontFamily,
37924
- baseFontSize: baseFontSize,
37925
- baseFontFamily: baseFontFamily,
37926
- baseLineHeight: baseLineHeight,
37927
- altFontFamily: altFontFamily,
37928
- headingsFontFamily: headingsFontFamily,
37929
- headingsFontWeight: headingsFontWeight,
37930
- headingsColor: headingsColor,
37931
- fontSizeLarge: fontSizeLarge,
37932
- fontSizeSmall: fontSizeSmall,
37933
- fontSizeMini: fontSizeMini,
37934
- paddingLarge: paddingLarge,
37935
- paddingSmall: paddingSmall,
37936
- paddingMini: paddingMini,
37937
- baseBorderRadius: baseBorderRadius,
37938
- borderRadiusLarge: borderRadiusLarge,
37939
- borderRadiusSmall: borderRadiusSmall,
37940
- tableBackground: tableBackground,
37941
- tableBackgroundAccent: tableBackgroundAccent,
37942
- tableBackgroundHover: tableBackgroundHover,
37943
- tableBorder: tableBorder,
37944
- btnBackground: btnBackground,
37945
- btnBackgroundHighlight: btnBackgroundHighlight,
37946
- btnBorder: btnBorder,
37947
- btnPrimaryBackground: btnPrimaryBackground,
37948
- btnPrimaryBackgroundHighlight: btnPrimaryBackgroundHighlight,
37949
- btnInfoBackground: btnInfoBackground,
37950
- btnInfoBackgroundHighlight: btnInfoBackgroundHighlight,
37951
- btnSuccessBackground: btnSuccessBackground,
37952
- btnSuccessBackgroundHighlight: btnSuccessBackgroundHighlight,
37953
- btnWarningBackground: btnWarningBackground,
37954
- btnWarningBackgroundHighlight: btnWarningBackgroundHighlight,
37955
- btnDangerBackground: btnDangerBackground,
37956
- btnDangerBackgroundHighlight: btnDangerBackgroundHighlight,
37957
- btnInverseBackground: btnInverseBackground,
37958
- btnInverseBackgroundHighlight: btnInverseBackgroundHighlight,
37959
- inputBackground: inputBackground,
37960
- inputBorder: inputBorder,
37961
- inputBorderRadius: inputBorderRadius,
37962
- inputDisabledBackground: inputDisabledBackground,
37963
- formActionsBackground: formActionsBackground,
37964
- inputHeight: inputHeight,
37965
- dropdownBackground: dropdownBackground,
37966
- dropdownBorder: dropdownBorder,
37967
- dropdownDividerTop: dropdownDividerTop,
37968
- dropdownDividerBottom: dropdownDividerBottom,
37969
- dropdownLinkColor: dropdownLinkColor,
37970
- dropdownLinkColorHover: dropdownLinkColorHover,
37971
- dropdownLinkColorActive: dropdownLinkColorActive,
37972
- dropdownLinkBackgroundActive: dropdownLinkBackgroundActive,
37973
- dropdownLinkBackgroundHover: dropdownLinkBackgroundHover,
37974
- zindexDropdown: zindexDropdown,
37975
- zindexPopover: zindexPopover,
37976
- zindexTooltip: zindexTooltip,
37977
- zindexFixedNavbar: zindexFixedNavbar,
37978
- zindexHeader: zindexHeader,
37979
- zindexModalBackdrop: zindexModalBackdrop,
37980
- zindexModal: zindexModal,
37981
- zindexAboveModal: zindexAboveModal,
37982
- iconSpritePath: iconSpritePath,
37983
- iconWhiteSpritePath: iconWhiteSpritePath,
37984
- placeholderText: placeholderText,
37985
- hrBorder: hrBorder,
37986
- horizontalComponentOffset: horizontalComponentOffset,
37987
- wellBackground: wellBackground,
37988
- navbarCollapseWidth: navbarCollapseWidth,
37989
- navbarCollapseDesktopWidth: navbarCollapseDesktopWidth,
37990
- navbarHeight: navbarHeight,
37991
- navbarBackgroundHighlight: navbarBackgroundHighlight,
37992
- navbarBackground: navbarBackground,
37993
- navbarBorder: navbarBorder,
37994
- navbarText: navbarText,
37995
- navbarLinkColor: navbarLinkColor,
37996
- navbarLinkColorHover: navbarLinkColorHover,
37997
- navbarLinkColorActive: navbarLinkColorActive,
37998
- navbarLinkBackgroundHover: navbarLinkBackgroundHover,
37999
- navbarLinkBackgroundActive: navbarLinkBackgroundActive,
38000
- navbarBrandColor: navbarBrandColor,
38001
- navbarInverseBackground: navbarInverseBackground,
38002
- navbarInverseBackgroundHighlight: navbarInverseBackgroundHighlight,
38003
- navbarInverseBorder: navbarInverseBorder,
38004
- navbarInverseText: navbarInverseText,
38005
- navbarInverseLinkColor: navbarInverseLinkColor,
38006
- navbarInverseLinkColorHover: navbarInverseLinkColorHover,
38007
- navbarInverseLinkColorActive: navbarInverseLinkColorActive,
38008
- navbarInverseLinkBackgroundHover: navbarInverseLinkBackgroundHover,
38009
- navbarInverseLinkBackgroundActive: navbarInverseLinkBackgroundActive,
38010
- navbarInverseSearchBackground: navbarInverseSearchBackground,
38011
- navbarInverseSearchBackgroundFocus: navbarInverseSearchBackgroundFocus,
38012
- navbarInverseSearchBorder: navbarInverseSearchBorder,
38013
- navbarInverseSearchPlaceholderColor: navbarInverseSearchPlaceholderColor,
38014
- navbarInverseBrandColor: navbarInverseBrandColor,
38015
- paginationBackground: paginationBackground,
38016
- paginationBorder: paginationBorder,
38017
- paginationActiveBackground: paginationActiveBackground,
38018
- heroUnitBackground: heroUnitBackground,
38019
- heroUnitHeadingColor: heroUnitHeadingColor,
38020
- heroUnitLeadColor: heroUnitLeadColor,
38021
- warningText: warningText,
38022
- warningBackground: warningBackground,
38023
- warningBorder: warningBorder,
38024
- errorText: errorText,
38025
- errorBackground: errorBackground,
38026
- errorBorder: errorBorder,
38027
- successText: successText,
38028
- successBackground: successBackground,
38029
- successBorder: successBorder,
38030
- infoText: infoText,
38031
- infoBackground: infoBackground,
38032
- infoBorder: infoBorder,
38033
- tooltipColor: tooltipColor,
38034
- tooltipBackground: tooltipBackground,
38035
- tooltipArrowWidth: tooltipArrowWidth,
38036
- tooltipArrowColor: tooltipArrowColor,
38037
- popoverBackground: popoverBackground,
38038
- popoverArrowWidth: popoverArrowWidth,
38039
- popoverArrowColor: popoverArrowColor,
38040
- popoverTitleBackground: popoverTitleBackground,
38041
- popoverArrowOuterWidth: popoverArrowOuterWidth,
38042
- popoverArrowOuterColor: popoverArrowOuterColor,
38043
- gridColumns: gridColumns,
38044
- gridColumnWidth: gridColumnWidth,
38045
- gridGutterWidth: gridGutterWidth,
38046
- gridRowWidth: gridRowWidth,
38047
- gridColumnWidth1200: gridColumnWidth1200,
38048
- gridGutterWidth1200: gridGutterWidth1200,
38049
- gridRowWidth1200: gridRowWidth1200,
38050
- gridColumnWidth768: gridColumnWidth768,
38051
- gridGutterWidth768: gridGutterWidth768,
38052
- gridRowWidth768: gridRowWidth768,
38053
- fluidGridColumnWidth: fluidGridColumnWidth,
38054
- fluidGridGutterWidth: fluidGridGutterWidth,
38055
- fluidGridColumnWidth1200: fluidGridColumnWidth1200,
38056
- fluidGridGutterWidth1200: fluidGridGutterWidth1200,
38057
- fluidGridColumnWidth768: fluidGridColumnWidth768,
38058
- fluidGridGutterWidth768: fluidGridGutterWidth768,
38059
- kaGreen: kaGreen,
38060
- kaGreenLight: kaGreenLight,
38061
- kaBlue: kaBlue,
38062
- kaBlueLight: kaBlueLight,
38063
- grayExtraDark: grayExtraDark,
38064
- grayExtraLight: grayExtraLight,
38065
- graySuperLight: graySuperLight,
38066
- whiteDark: whiteDark,
38067
- dark: dark,
38068
- blueDarkUnsaturated: blueDarkUnsaturated,
38069
- blueDarkSaturated: blueDarkSaturated,
38070
- blueLight: blueLight,
38071
- greenLight: greenLight,
38072
- greenDark: greenDark,
38073
- yellowGreen: yellowGreen,
38074
- okGreen: okGreen,
38075
- alertRed: alertRed,
38076
- coral: coral,
38077
- grayBlue: grayBlue,
38078
- lightPageBackground: lightPageBackground,
38079
- yclaBlue: yclaBlue,
38080
- yclaTeal: yclaTeal,
38081
- yclaTealDark: yclaTealDark,
38082
- yclaGreenDark: yclaGreenDark,
38083
- yclaGreen: yclaGreen,
38084
- learnstormBlue: learnstormBlue,
38085
- homepageBlue: homepageBlue,
38086
- backgroundBlue: backgroundBlue,
38087
- teacherSignupBlue: teacherSignupBlue,
38088
- homepageGreen: homepageGreen,
38089
- streakColor: streakColor,
38090
- facebookColor: facebookColor,
38091
- blueGoogleColor: blueGoogleColor,
38092
- redGoogleColor: redGoogleColor,
38093
- homepageColor: homepageColor,
38094
- lightTextColor: lightTextColor,
38095
- fontSizeTiny: fontSizeTiny,
38096
- fontSizeNormal: fontSizeNormal,
38097
- fontSizeMedium: fontSizeMedium,
38098
- fontSizeExtraLarge: fontSizeExtraLarge,
38099
- fontSizeHuge: fontSizeHuge,
38100
- fontSizeBakana: fontSizeBakana,
38101
- fontSizeBananas: fontSizeBananas,
38102
- fixedWidthFontFamily: fixedWidthFontFamily,
38103
- contentPadding: contentPadding,
38104
- primaryButtonBackground: primaryButtonBackground,
38105
- primaryButtonBorder: primaryButtonBorder,
38106
- buttonTextColor: buttonTextColor,
38107
- buttonBorderRadius: buttonBorderRadius,
38108
- basicBorderColor: basicBorderColor,
38109
- minContainerWidth: minContainerWidth,
38110
- maxContainerWidth: maxContainerWidth,
38111
- formHintColor: formHintColor,
38112
- guidelineExampleText: guidelineExampleText,
38113
- hoverCardWidth: hoverCardWidth,
38114
- menuHighlightColor: menuHighlightColor,
38115
- menuHighlightBorderColor: menuHighlightBorderColor,
38116
- menuActiveTextColor: menuActiveTextColor,
38117
- menuInactiveTextColor: menuInactiveTextColor,
38118
- menuSubheaderTextColor: menuSubheaderTextColor,
38119
- menuBorderColor: menuBorderColor,
38120
- unreadBackgroundColor: unreadBackgroundColor,
38121
- menuLineHeight: menuLineHeight,
38122
- menuSubheaderLineHeight: menuSubheaderLineHeight,
38123
- menuSubheaderFontSize: menuSubheaderFontSize,
38124
- notificationBarColor: notificationBarColor,
38125
- modalBodyTopPadding: modalBodyTopPadding,
38126
- modalDialogPadding: modalDialogPadding,
38127
- modalSectionPadding: modalSectionPadding,
38128
- mathDomain1: mathDomain1,
38129
- mathDomain2: mathDomain2,
38130
- mathDomain3: mathDomain3,
38131
- mathDomain4: mathDomain4,
38132
- partnerContentDomain1: partnerContentDomain1,
38133
- partnerContentDomain2: partnerContentDomain2,
38134
- partnerContentDomain3: partnerContentDomain3,
38135
- partnerContentDomain4: partnerContentDomain4,
38136
- csDomain1: csDomain1,
38137
- csDomain2: csDomain2,
38138
- csDomain3: csDomain3,
38139
- csDomain4: csDomain4,
38140
- economicsDomain1: economicsDomain1,
38141
- economicsDomain2: economicsDomain2,
38142
- economicsDomain3: economicsDomain3,
38143
- economicsDomain4: economicsDomain4,
38144
- collegeCareersMoreDomain1: collegeCareersMoreDomain1,
38145
- collegeCareersMoreDomain2: collegeCareersMoreDomain2,
38146
- collegeCareersMoreDomain3: collegeCareersMoreDomain3,
38147
- collegeCareersMoreDomain4: collegeCareersMoreDomain4,
38148
- humanitiesDomain1: humanitiesDomain1,
38149
- humanitiesDomain2: humanitiesDomain2,
38150
- humanitiesDomain3: humanitiesDomain3,
38151
- humanitiesDomain4: humanitiesDomain4,
38152
- gtpDomain1: gtpDomain1,
38153
- gtpDomain2: gtpDomain2,
38154
- gtpDomain3: gtpDomain3,
38155
- gtpDomain4: gtpDomain4,
38156
- scienceDomain1: scienceDomain1,
38157
- scienceDomain2: scienceDomain2,
38158
- scienceDomain3: scienceDomain3,
38159
- scienceDomain4: scienceDomain4,
38160
- testPrepDomain1: testPrepDomain1,
38161
- testPrepDomain2: testPrepDomain2,
38162
- testPrepDomain3: testPrepDomain3,
38163
- testPrepDomain4: testPrepDomain4,
38164
- defaultDomain1: defaultDomain1,
38165
- defaultDomain2: defaultDomain2,
38166
- defaultDomain3: defaultDomain3,
38167
- defaultDomain4: defaultDomain4,
38168
- defaultDomainColor: defaultDomainColor,
38169
- defaultSubjectColor: defaultSubjectColor,
38170
- defaultTopicColor: defaultTopicColor,
38171
- defaultHoverColor: defaultHoverColor,
38172
- defaultLinkColor: defaultLinkColor,
38173
- defaultLinkHoverColor: defaultLinkHoverColor,
38174
- scienceDomainColor: scienceDomainColor,
38175
- scienceSubjectColor: scienceSubjectColor,
38176
- scienceTopicColor: scienceTopicColor,
38177
- scienceHoverColor: scienceHoverColor,
38178
- scienceLinkColor: scienceLinkColor,
38179
- scienceLinkHoverColor: scienceLinkHoverColor,
38180
- humanitiesDomainColor: humanitiesDomainColor,
38181
- humanitiesSubjectColor: humanitiesSubjectColor,
38182
- humanitiesTopicColor: humanitiesTopicColor,
38183
- humanitiesHoverColor: humanitiesHoverColor,
38184
- humanitiesLinkColor: humanitiesLinkColor,
38185
- humanitiesLinkHoverColor: humanitiesLinkHoverColor,
38186
- economicsDomainColor: economicsDomainColor,
38187
- economicsSubjectColor: economicsSubjectColor,
38188
- economicsTopicColor: economicsTopicColor,
38189
- economicsHoverColor: economicsHoverColor,
38190
- economicsLinkColor: economicsLinkColor,
38191
- economicsLinkHoverColor: economicsLinkHoverColor,
38192
- csDomainColor: csDomainColor,
38193
- csSubjectColor: csSubjectColor,
38194
- csTopicColor: csTopicColor,
38195
- csHoverColor: csHoverColor,
38196
- csLinkColor: csLinkColor,
38197
- csLinkHoverColor: csLinkHoverColor,
38198
- partnerContentDomainColor: partnerContentDomainColor,
38199
- partnerContentSubjectColor: partnerContentSubjectColor,
38200
- partnerContentTopicColor: partnerContentTopicColor,
38201
- partnerContentHoverColor: partnerContentHoverColor,
38202
- partnerContentLinkColor: partnerContentLinkColor,
38203
- partnerContentLinkHoverColor: partnerContentLinkHoverColor,
38204
- essayDomainColor: essayDomainColor,
38205
- mathDomainColor: mathDomainColor,
38206
- mathSubjectColor: mathSubjectColor,
38207
- mathTopicColor: mathTopicColor,
38208
- mathHoverColor: mathHoverColor,
38209
- mathLinkColor: mathLinkColor,
38210
- mathLinkHoverColor: mathLinkHoverColor,
38211
- testPrepDomainColor: testPrepDomainColor,
38212
- testPrepSubjectColor: testPrepSubjectColor,
38213
- testPrepTopicColor: testPrepTopicColor,
38214
- testPrepHoverColor: testPrepHoverColor,
38215
- testPrepLinkColor: testPrepLinkColor,
38216
- testPrepLinkHoverColor: testPrepLinkHoverColor,
38217
- collegeCareersMoreDomainColor: collegeCareersMoreDomainColor,
38218
- collegeCareersMoreSubjectColor: collegeCareersMoreSubjectColor,
38219
- collegeCareersMoreTopicColor: collegeCareersMoreTopicColor,
38220
- collegeCareersMoreHoverColor: collegeCareersMoreHoverColor,
38221
- collegeCareersMoreLinkColor: collegeCareersMoreLinkColor,
38222
- collegeCareersMoreLinkHoverColor: collegeCareersMoreLinkHoverColor,
38223
- colorProficient: colorProficient,
38224
- colorPracticed: colorPracticed,
38225
- colorMastery1: colorMastery1,
38226
- colorMastery2: colorMastery2,
38227
- colorMastery3: colorMastery3,
38228
- colorSuggested: colorSuggested,
38229
- colorReview: colorReview,
38230
- colorNotStarted: colorNotStarted,
38231
- colorStarted: colorStarted,
38232
- colorStruggling: colorStruggling,
38233
- colorPersonal: colorPersonal,
38234
- colorPractice: colorPractice,
38235
- colorEnergyPoints: colorEnergyPoints,
38236
- pureSmMin: pureSmMin,
38237
- pureMdMin: pureMdMin,
38238
- pureLgMin: pureLgMin,
38239
- pureXlMin: pureXlMin,
38240
- pureXsMax: pureXsMax,
38241
- pureSmMax: pureSmMax,
38242
- pureMdMax: pureMdMax,
38243
- pureLgMax: pureLgMax
38244
- });
38245
-
38246
- const colors = {
38247
- white: "#FFFFFF",
38248
- gray98: "#FAFAFA",
38249
- gray97: "#F6F7F7",
38250
- gray95: "#F0F1F2",
38251
- gray90: "#E3E5E6",
38252
- gray85: "#D6D8DA",
38253
- gray76: "#BABEC2",
38254
- gray72: "#999A9D",
38255
- gray68: "#888D93",
38256
- gray55: "#707378",
38257
- gray41: "#626569",
38258
- gray25: "#3B3E40",
38259
- gray17: "#21242C",
38260
- gray10: "#1499af",
38261
- black: "#000000",
38262
- // These colors are pulled out from constants.js, which is itself generated
38263
- // from variables.less. We should probably avoid duplicating these here.
38264
- alertRed,
38265
- homepageBlue,
38266
- kaBlue,
38267
- kaBlueLight,
38268
- kaGreen,
38269
- kaGreenLight,
38270
- learnstormBlue,
38271
- backgroundBlue,
38272
- adminGreen: "#78C008",
38273
- kaBlueExtraLight: "#39c2db",
38274
- kaBlueHover: "#0c7f99",
38275
- kaGreenHover: "#518005",
38276
- // Domain-agnostic colors related to the study guide experience in the
38277
- // content library.
38278
- skyDark: "#001f4d",
38279
- recommendationGold: "#ffbe26",
38280
- starAced: "#ff9c39",
38281
- // We interploate the domain colors into this colors object for
38282
- // historical reasons, but everyone using domain-specific colors
38283
- // should switch to using the domainColors() function to look up
38284
- // colors instead.
38285
- //
38286
- // TODO(davidflanagan): remove this line once everything is
38287
- // working correctly with the domainColors() accessor.
38288
- // ...domainToColorsMap,
38289
- // mission: missionColors,
38290
-
38291
- // Colors for various OAuth providers
38292
- google: "#C1432f",
38293
- modernGoogle: "#be2612",
38294
- modernGoogleHover: "#8c1c0d",
38295
- facebook: "#4267B2",
38296
- modernFacebook: "#4267B2",
38297
- modernFacebookHover: "#00294a",
38298
- wonderBlocksGold: "#FFB100",
38299
- wonderBlocksLightBlue: "#37C5FD",
38300
- // We're using rgba instead of opacity to avoid affecting the focus outline
38301
- // when we just want to make the color transparent.
38302
- breadcrumbs: "rgba(255, 255, 255, 0.7)"
38303
- };
38304
- const borderRadius = 4;
38305
- const breadcrumbStyles = {
38306
- color: colors.breadcrumbs,
37595
+ // TODO: can we use WB typography?
37596
+ const bodyXsmallBold = {
37597
+ // For emphasized metadata, descriptions, etc
38307
37598
  fontFamily: "inherit",
38308
37599
  fontSize: 15,
38309
37600
  fontWeight: "bold",
38310
- letterSpacing: 0.8,
38311
- lineHeight: "19px",
38312
- textTransform: "uppercase",
38313
- // Disable subpixel antialiasing for OSX (improves light on dark text)
38314
- MozOsxFontSmoothing: "grayscale",
38315
- WebkitFontSmoothing: "antialiased"
38316
- };
38317
- const fonts = {
38318
- // The body of the page is setup to use 'Helvetica' by default and
38319
- // 'Lato' if/once it downloads. For your elements to follow this
38320
- // pattern, all you need is to make the text in your element
38321
- // inherit from the body using the "inherit" value.
38322
- regular: "inherit"
38323
- };
38324
- const typography = {
38325
- // For subject names
38326
- subjectHeadingDesktop: {
38327
- fontFamily: "inherit",
38328
- fontSize: 50,
38329
- fontWeight: "bold",
38330
- lineHeight: "61px"
38331
- },
38332
- subjectHeadingMobile: {
38333
- fontFamily: "inherit",
38334
- fontSize: 35,
38335
- fontWeight: "bold",
38336
- lineHeight: "37px"
38337
- },
38338
- // For the most important thing on the page
38339
- conceptHeadingDesktop: {
38340
- fontFamily: "inherit",
38341
- fontSize: 35,
38342
- fontWeight: "bold",
38343
- lineHeight: "37px"
38344
- },
38345
- conceptHeadingMobile: {
38346
- fontFamily: "inherit",
38347
- fontSize: 23,
38348
- fontWeight: "bold",
38349
- lineHeight: "27px"
38350
- },
38351
- // For sections or modules
38352
- subheadingDesktop: {
38353
- fontFamily: "inherit",
38354
- fontSize: 23,
38355
- fontWeight: "bold",
38356
- lineHeight: "27px"
38357
- },
38358
- subheadingMobile: {
38359
- fontFamily: "inherit",
38360
- fontSize: 20,
38361
- fontWeight: "bold",
38362
- lineHeight: "24px"
38363
- },
38364
- smallSubheadingDesktop: {
38365
- fontFamily: "inherit",
38366
- fontSize: 20,
38367
- lineHeight: 1.25
38368
- },
38369
- smallSubheadingMobile: {
38370
- fontFamily: "inherit",
38371
- fontSize: 15,
38372
- lineHeight: 1.25
38373
- },
38374
- // For callouts
38375
- smallHeading: {
38376
- color: colors.gray25,
38377
- fontFamily: "inherit",
38378
- fontSize: 17,
38379
- fontWeight: "bold",
38380
- lineHeight: "23px"
38381
- },
38382
- smallHeadingMobile: {
38383
- color: colors.gray25,
38384
- fontFamily: "inherit",
38385
- fontSize: 15,
38386
- fontWeight: "bold",
38387
- lineHeight: "18px"
38388
- },
38389
- // Accent headings
38390
- accentHeading: {
38391
- color: colors.gray68,
38392
- fontFamily: "inherit",
38393
- fontSize: 15,
38394
- fontWeight: "bold",
38395
- letterSpacing: 0.8,
38396
- lineHeight: "19px",
38397
- textTransform: "uppercase"
38398
- },
38399
- bodyLarge: {
38400
- // For articles with multiple paragraphs
38401
- fontFamily: fonts.regular,
38402
- fontSize: 20,
38403
- lineHeight: "30px"
38404
- },
38405
- bodySmall: {
38406
- // For small blocks of copy
38407
- fontFamily: fonts.regular,
38408
- fontSize: 17,
38409
- fontWeight: "normal",
38410
- lineHeight: "23px"
38411
- },
38412
- bodySmallBold: {
38413
- // For small blocks of copy
38414
- fontFamily: fonts.regular,
38415
- fontSize: 17,
38416
- fontWeight: "bold",
38417
- lineHeight: "23px"
38418
- },
38419
- bodyXsmall: {
38420
- // For metadata, descriptions, etc
38421
- fontFamily: fonts.regular,
38422
- fontSize: 15,
38423
- lineHeight: "22px"
38424
- },
38425
- bodyXsmallBold: {
38426
- // For emphasized metadata, descriptions, etc
38427
- fontFamily: "inherit",
38428
- fontSize: 15,
38429
- fontWeight: "bold",
38430
- lineHeight: "22px"
38431
- },
38432
- breadcrumb: breadcrumbStyles,
38433
- // For in-page tabs, breadcrumbs
38434
- breadcrumbSmall: _extends({}, breadcrumbStyles, {
38435
- fontSize: 12,
38436
- lineHeight: "13px"
38437
- }),
38438
- labelLarge: {
38439
- // For chiclets and thumbnail titles
38440
- fontFamily: "inherit",
38441
- fontSize: 23,
38442
- fontWeight: "bold",
38443
- lineHeight: "27px"
38444
- },
38445
- labelMedium: {
38446
- // For chiclets and thumbnail titles
38447
- fontFamily: "inherit",
38448
- fontSize: 15,
38449
- fontWeight: "bold",
38450
- lineHeight: "18px"
38451
- },
38452
- labelSmall: {
38453
- // Generally used with labelLarge, for breadcrumbs in thumbnails
38454
- fontFamily: fonts.regular,
38455
- fontSize: 12,
38456
- lineHeight: "14px"
38457
- },
38458
- caption: {
38459
- // For image captions
38460
- fontFamily: fonts.regular,
38461
- fontSize: 14,
38462
- fontStyle: "italic",
38463
- lineHeight: "17px"
38464
- },
38465
- desktopScalingOnMobile: {
38466
- // For when you need Mobile Safari and friends to stick to desktop
38467
- // sizes
38468
- MozTextSizeAdjust: "100%",
38469
- MsTextSizeAdjust: "100%",
38470
- WebkitTextSizeAdjust: "100%"
38471
- },
38472
- // TODO (josh): This should move to within <ModalHeader>
38473
- modalSubtitle: {
38474
- fontSize: 12,
38475
- lineHeight: 1.65,
38476
- // NOTE (josh): Font smoothing used here to create a 'medium' weight
38477
- // font, between normal and bold, on webkit browsers.
38478
- // This prop is an a11y risk when used on non-bold text, since it
38479
- // makes text very thin, but it's fine on bold text.
38480
- WebkitFontSmoothing: "antialiased",
38481
- fontWeight: "bold"
38482
- },
38483
- // HACK(kevinb): temporary wonder blocks styles for header only
38484
- // TODO(kevinb): use components from wonder-blocks-typography instead
38485
- wonderBlocksHeader: {
38486
- paddingLeft: 16,
38487
- paddingRight: 16,
38488
- paddingBottom: 24,
38489
- paddingTop: 34,
38490
- [mediaQueries.mdOrLarger]: {
38491
- paddingBottom: 32
38492
- }
38493
- },
38494
- // HACK(kevinb): temporary wonder blocks styles for header only
38495
- // TODO(kevinb): use components from wonder-blocks-typography instead
38496
- wonderBlocksTitle: {
38497
- color: colors.white,
38498
- fontWeight: 900,
38499
- // "Black" weight
38500
- fontSize: 28,
38501
- lineHeight: "32px",
38502
- margin: 0,
38503
- [mediaQueries.mdOrLarger]: {
38504
- fontSize: 36,
38505
- lineHeight: "40px"
38506
- }
38507
- },
38508
- // HACK(kevinb): temporary wonder blocks styles for header only
38509
- // TODO(kevinb): use components from wonder-blocks-typography instead
38510
- wonderBlocksLabelLarge: {
38511
- fontSize: 16,
38512
- lineHeight: "20px",
38513
- fontWeight: 700 // Bold
38514
- }
37601
+ lineHeight: "22px"
38515
37602
  };
38516
37603
 
38517
- var globalStyles = /*#__PURE__*/Object.freeze({
38518
- __proto__: null,
38519
- colors: colors,
38520
- borderRadius: borderRadius,
38521
- fonts: fonts,
38522
- typography: typography
38523
- });
38524
-
38525
37604
  const AnswerChoices = props => {
38526
37605
  const {
38527
37606
  strings
@@ -39357,7 +38436,7 @@ class LabelImage extends React.Component {
39357
38436
  const promptString = isMobile ? multipleAnswers ? strings.tapMultiple : strings.tapSingle : multipleAnswers ? strings.clickMultiple : strings.clickSingle;
39358
38437
  const choicesString = strings.choices;
39359
38438
  return /*#__PURE__*/React.createElement("div", {
39360
- className: classNames("perseus-label-image-widget-instructions", css(styles$a.instructions))
38439
+ className: classNames$1("perseus-label-image-widget-instructions", css(styles$a.instructions))
39361
38440
  }, /*#__PURE__*/React.createElement("div", {
39362
38441
  className: css(styles$a.instructionsCaption)
39363
38442
  }, promptString, " ", !hideChoices && choicesString), !hideChoices && /*#__PURE__*/React.createElement("div", {
@@ -39423,7 +38502,7 @@ const styles$a = StyleSheet.create({
39423
38502
  instructions: {
39424
38503
  paddingBottom: 16
39425
38504
  },
39426
- instructionsCaption: _extends({}, typography.bodyXsmallBold, {
38505
+ instructionsCaption: _extends({}, bodyXsmallBold, {
39427
38506
  paddingBottom: 16
39428
38507
  }),
39429
38508
  instructionsChoices: {
@@ -40400,9 +39479,9 @@ var Matcher$1 = {
40400
39479
  validator: matcherValidator
40401
39480
  };
40402
39481
 
40403
- function matrixValidator(state, rubric, strings) {
39482
+ function matrixValidator(userInput, rubric, strings) {
40404
39483
  const solution = rubric.answers;
40405
- const supplied = state.answers;
39484
+ const supplied = userInput.answers;
40406
39485
  const solutionSize = getMatrixSize(solution);
40407
39486
  const suppliedSize = getMatrixSize(supplied);
40408
39487
  const incorrectSize = solutionSize[0] !== suppliedSize[0] || solutionSize[1] !== suppliedSize[1];
@@ -40694,7 +39773,7 @@ class Matrix extends React.Component {
40694
39773
  const highlightedCol = Math.max(cursorCol, matrixSize[1] - 1);
40695
39774
  const bracketHeight = (highlightedRow + 1) * (INPUT_HEIGHT + 2 * INPUT_MARGIN);
40696
39775
  const bracketOffset = (highlightedCol + 1) * (INPUT_WIDTH + 2 * INPUT_MARGIN);
40697
- const className = classNames({
39776
+ const className = classNames$1({
40698
39777
  "perseus-matrix": true,
40699
39778
  "static-mode": this.props.static,
40700
39779
  "the-matrix": this.state.enterTheMatrix >= 5
@@ -43259,9 +42338,9 @@ const makeSafeUrl = (urlString, locale) => {
43259
42338
  };
43260
42339
  const styles$6 = StyleSheet.create({
43261
42340
  widgetContainer: {
43262
- borderRadius: borderRadiusLarge,
42341
+ borderRadius: 6,
43263
42342
  borderWidth: 1,
43264
- borderColor: basicBorderColor,
42343
+ borderColor: "#CCC",
43265
42344
  padding: spacing.medium_16,
43266
42345
  paddingBottom: 0
43267
42346
  },
@@ -44752,7 +43831,7 @@ const init = function init(options) {
44752
43831
 
44753
43832
  // This file is processed by a Rollup plugin (replace) to inject the production
44754
43833
  const libName = "@khanacademy/perseus";
44755
- const libVersion = "39.0.0";
43834
+ const libVersion = "40.0.0";
44756
43835
  addLibraryVersionToPerseusDebug(libName, libVersion);
44757
43836
 
44758
43837
  const apiVersion = {
@@ -44884,7 +43963,7 @@ class ArticleRenderer extends React.Component {
44884
43963
  const apiOptions = _extends({}, ApiOptions.defaults, this.props.apiOptions, {
44885
43964
  isArticle: true
44886
43965
  });
44887
- const classes = classNames({
43966
+ const classes = classNames$1({
44888
43967
  "framework-perseus": true,
44889
43968
  "perseus-article": true,
44890
43969
  // NOTE(charlie): For exercises, this is applied outside of Perseus
@@ -44964,7 +44043,7 @@ class HintRenderer extends React.Component {
44964
44043
  const {
44965
44044
  isMobile
44966
44045
  } = apiOptions;
44967
- const classNames$1 = classNames("hint", !isMobile && "perseus-hint-renderer", isMobile && css(styles$3.newHint), isMobile && lastRendered && css(styles$3.lastRenderedNewHint), lastHint && "last-hint", lastRendered && "last-rendered", className);
44046
+ const classNames = classNames$1("hint", !isMobile && "perseus-hint-renderer", isMobile && css(styles$3.newHint), isMobile && lastRendered && css(styles$3.lastRenderedNewHint), lastHint && "last-hint", lastRendered && "last-rendered", className);
44968
44047
 
44969
44048
  // TODO(charlie): Allowing `customKeypad` would require that we
44970
44049
  // extend `ItemRenderer` to support nested inputs in the `HintsRenderer`.
@@ -44978,7 +44057,7 @@ class HintRenderer extends React.Component {
44978
44057
  /*#__PURE__*/
44979
44058
  // @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'number | undefined'.
44980
44059
  React.createElement("div", {
44981
- className: classNames$1,
44060
+ className: classNames,
44982
44061
  tabIndex: "-1"
44983
44062
  }, !apiOptions.isMobile && /*#__PURE__*/React.createElement("span", {
44984
44063
  className: "perseus-sr-only"
@@ -45031,7 +44110,7 @@ const styles$3 = StyleSheet.create({
45031
44110
  },
45032
44111
  lastRenderedNewHint: {
45033
44112
  marginBottom: 0,
45034
- borderLeftColor: kaGreen$1
44113
+ borderLeftColor: kaGreen
45035
44114
  }
45036
44115
  });
45037
44116
 
@@ -45182,9 +44261,9 @@ class HintsRenderer extends React.Component {
45182
44261
  } = apiOptions;
45183
44262
  const showGetAnotherHint = getAnotherHint && hintsVisible > 0 && hintsVisible < this.props.hints.length;
45184
44263
  const hintRatioCopy = `(${hintsVisible}/${this.props.hints.length})`;
45185
- const classNames$1 = classNames(this.props.className, apiOptions.isMobile && hintsVisible > 0 && css(styles$2.mobileHintStylesHintsRenderer));
44264
+ const classNames = classNames$1(this.props.className, apiOptions.isMobile && hintsVisible > 0 && css(styles$2.mobileHintStylesHintsRenderer));
45186
44265
  return /*#__PURE__*/React.createElement("div", {
45187
- className: classNames$1
44266
+ className: classNames
45188
44267
  }, apiOptions.isMobile && hintsVisible > 0 && /*#__PURE__*/React.createElement("div", {
45189
44268
  className: css(styles$2.mobileHintStylesHintTitle, sharedStyles.responsiveLabel)
45190
44269
  }, this.context.strings.hints), hints, showGetAnotherHint && /*#__PURE__*/React.createElement("button", {
@@ -45221,7 +44300,7 @@ const styles$2 = StyleSheet.create({
45221
44300
  fontSize: "100%",
45222
44301
  fontFamily: "inherit",
45223
44302
  fontWeight: "bold",
45224
- color: kaGreen$1,
44303
+ color: kaGreen,
45225
44304
  padding: 0,
45226
44305
  position: "relative"
45227
44306
  },
@@ -45616,28 +44695,6 @@ const ref = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.cre
45616
44695
  ref: ref
45617
44696
  }))));
45618
44697
 
45619
- const devices = {
45620
- PHONE: "phone",
45621
- TABLET: "tablet",
45622
- DESKTOP: "desktop"
45623
- };
45624
-
45625
- // How many pixels do we reserve on the right-hand side of a preview
45626
- // for displaying lint indicators? This space needs to be reserved
45627
- // in DeviceFramer, but it is actually allocated in PerseusFrame
45628
- const lintGutterWidth = 36;
45629
-
45630
- // How wide a border does PerseusFrame draw? We need to allocate enough
45631
- // space for it in DeviceFramer.
45632
- const perseusFrameBorderWidth = 1;
45633
-
45634
- var constants = /*#__PURE__*/Object.freeze({
45635
- __proto__: null,
45636
- devices: devices,
45637
- lintGutterWidth: lintGutterWidth,
45638
- perseusFrameBorderWidth: perseusFrameBorderWidth
45639
- });
45640
-
45641
44698
  /**
45642
44699
  * Traverses a {content, widgets, images} renderer props object,
45643
44700
  * such as `itemData.question`
@@ -48324,5 +47381,17 @@ const EditorJsonify = {
48324
47381
  }
48325
47382
  };
48326
47383
 
48327
- export { ApiOptions, ArticleRenderer, BaseRadio, Categorizer$1 as Categorizer, changeable as Changeable, ClassNames, dependencies as Dependencies, EditorJsonify, Expression, util as GrapherUtil, Grapher$1 as GrapherWidget, HintRenderer, HintsRenderer, InputNumber$1 as InputNumber, InteractiveGraph$1 as InteractiveGraphWidget, ItemExtras, JiptParagraphs, KhanColors, KhanMath, context as LoadingContext, Log, Matrix$1 as MatrixWidget, MultiItems, NumericInput$1 as NumericInput, PerseusExpressionAnswerFormConsidered, PerseusI18nContext, PerseusI18nContextProvider, PerseusMarkdown, Plotter$1 as PlotterWidget, QUESTION_WIDGETS, Radio, Renderer, ref as ServerItemRenderer, sizingUtils as SizingUtils, Table$1 as TableWidget, Util, denylist as WIDGET_PROP_DENYLIST, widgets$1 as Widgets, addWidget, apiVersion, buildEmptyItemTreeForShape, buildMapper, components, constants, contentHasWidgetType, convertWidgetNameToEnum, displaySigFigs, generateTestCategorizerWidget, generateTestExpressionWidget, generateTestInteractiveGraphWidget, generateTestNumericInputWidget, generateTestPerseusItem, generateTestRadioWidget, genericPerseusItemData, getAngleCoords, getAnswerFromUserInput, getAnswersFromWidgets, getCircleCoords, getClockwiseAngle, getCorrectAnswerForWidgetId, getImagesWithoutAltData, getLineCoords, getLinearSystemCoords, getPointCoords, getPolygonCoords, getQuadraticCoords, getSegmentCoords, getSinusoidCoords, getValidWidgetIds, getWidgetFromWidgetMap, getWidgetIdsFromContent, getWidgetIdsFromContentByType, getWidgetTypeByWidgetId, getWidgetsFromWidgetMap, getWidgetsMapFromItemData, globalConstants, globalStyles, iconPaths as icons, init, injectWidgets, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, isWidgetIdInContent, isWrongAnswerSupported, itemDataVersion, itemToTree, ItemVersion as itemVersion, libVersion, lockedFigureColors, lockedFigureFillStyles, makeSafeUrl, mediaQueries, parsePerseusItem, plotterPlotTypes, preprocessTex, registerAllWidgetsForTesting, shapes, shouldHaveIndividualAnswer, traverse, usePerseusI18n, violatingWidgets, allWidgets as widgets };
47384
+ /**
47385
+ * Main entry point
47386
+ */
47387
+ const GrapherUtil = {
47388
+ allTypes,
47389
+ DEFAULT_GRAPHER_PROPS,
47390
+ chooseType,
47391
+ defaultPlotProps,
47392
+ getEquationString,
47393
+ typeToButton
47394
+ };
47395
+
47396
+ export { ApiOptions, ArticleRenderer, BaseRadio, Categorizer$1 as Categorizer, changeable as Changeable, ClassNames, dependencies as Dependencies, EditorJsonify, Expression, GrapherUtil, Grapher$1 as GrapherWidget, HintRenderer, HintsRenderer, InputNumber$1 as InputNumber, InteractiveGraph$1 as InteractiveGraphWidget, ItemExtras, JiptParagraphs, KhanColors, KhanMath, context as LoadingContext, Log, Matrix$1 as MatrixWidget, MultiItems, NumericInput$1 as NumericInput, PerseusExpressionAnswerFormConsidered, PerseusI18nContext, PerseusI18nContextProvider, PerseusMarkdown, Plotter$1 as PlotterWidget, QUESTION_WIDGETS, Radio, Renderer, ref as ServerItemRenderer, Table$1 as TableWidget, Util, denylist as WIDGET_PROP_DENYLIST, widgets$1 as Widgets, addWidget, apiVersion, bodyXsmallBold, buildEmptyItemTreeForShape, buildMapper, components, containerSizeClass, contentHasWidgetType, convertWidgetNameToEnum, displaySigFigs, generateTestCategorizerWidget, generateTestExpressionWidget, generateTestInteractiveGraphWidget, generateTestNumericInputWidget, generateTestPerseusItem, generateTestRadioWidget, genericPerseusItemData, getAngleCoords, getAnswerFromUserInput, getAnswersFromWidgets, getCircleCoords, getClockwiseAngle, getCorrectAnswerForWidgetId, getImagesWithoutAltData, getInteractiveBoxFromSizeClass, getLineCoords, getLinearSystemCoords, getPointCoords, getPolygonCoords, getQuadraticCoords, getSegmentCoords, getSinusoidCoords, getValidWidgetIds, getWidgetFromWidgetMap, getWidgetIdsFromContent, getWidgetIdsFromContentByType, getWidgetTypeByWidgetId, getWidgetsFromWidgetMap, getWidgetsMapFromItemData, iconChevronDown, iconTrash, init, injectWidgets, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, isWidgetIdInContent, isWrongAnswerSupported, itemDataVersion, itemToTree, ItemVersion as itemVersion, libVersion, lockedFigureColors, lockedFigureFillStyles, makeSafeUrl, mediaQueries, parsePerseusItem, plotterPlotTypes, preprocessTex, registerAllWidgetsForTesting, shapes, shouldHaveIndividualAnswer, traverse, usePerseusI18n, violatingWidgets, allWidgets as widgets };
48328
47397
  //# sourceMappingURL=index.js.map