(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[19],{"20a2":function(e,t,a){e.exports=a("nOHt")},"2qu3":function(e,t,a){"use strict";var n=a("lSNA"),r=a("lwsE"),o=a("W8MJ");function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==a.return||a.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var a=function(){return m=!0,t()};O(f,e).then(a,a)}))},window.__NEXT_PRELOADREADY=_.preloadReady;var w=_;t.default=w},"5bSv":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("mrSG"),r=a("Ja2s"),o=a("wo21"),i={root:"ms-ProgressIndicator",itemName:"ms-ProgressIndicator-itemName",itemDescription:"ms-ProgressIndicator-itemDescription",itemProgress:"ms-ProgressIndicator-itemProgress",progressTrack:"ms-ProgressIndicator-progressTrack",progressBar:"ms-ProgressIndicator-progressBar"},s=o.memoizeFunction((function(){return r.keyframes({"0%":{left:"-30%"},"100%":{left:"100%"}})})),l=o.memoizeFunction((function(){return r.keyframes({"100%":{right:"-30%"},"0%":{right:"100%"}})}));t.getStyles=function(e){var t,a,c,u=o.getRTL(e.theme),d=e.className,p=e.indeterminate,y=e.theme,h=e.barHeight,f=void 0===h?2:h,m=y.palette,b=y.semanticColors,g=y.fonts,v=r.getGlobalClassNames(i,y),K=m.neutralLight;return{root:[v.root,g.medium,d],itemName:[v.itemName,r.noWrap,{color:b.bodyText,paddingTop:4,lineHeight:20}],itemDescription:[v.itemDescription,{color:b.bodySubtext,fontSize:g.small.fontSize,lineHeight:18}],itemProgress:[v.itemProgress,{position:"relative",overflow:"hidden",height:f,padding:"8px 0"}],progressTrack:[v.progressTrack,{position:"absolute",width:"100%",height:f,backgroundColor:K,selectors:(t={},t[r.HighContrastSelector]={borderBottom:"1px solid WindowText"},t)}],progressBar:[{backgroundColor:m.themePrimary,height:f,position:"absolute",transition:"width .3s ease",width:0,selectors:(a={},a[r.HighContrastSelector]=n.__assign({backgroundColor:"highlight"},r.getHighContrastNoAdjustStyle()),a)},p?{position:"absolute",minWidth:"33%",background:"linear-gradient(to right, "+K+" 0%, "+m.themePrimary+" 50%, "+K+" 100%)",animation:(u?l():s())+" 3s infinite",selectors:(c={},c[r.HighContrastSelector]={background:"highlight"},c)}:{transition:"width .15s linear"},v.progressBar]}}},JcwL:function(e,t,a){e.exports={gf:"MathInputField_gf__2Qvar",focused:"MathInputField_focused__BdtFy",gfc:"MathInputField_gfc__hnWs9",gfcSpacer:"MathInputField_gfcSpacer__1kIzG",t:"MathInputField_t__31l6o",k:"MathInputField_k__PnFRD",sp:"MathInputField_sp__2pJoa"}},P7uI:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}));var n=function(e){try{return decodeURIComponent(e).replace(/`/g,"\\")}catch(t){}return""},r=function(e){try{return encodeURIComponent(e.replace(/\\/g,"`"))}catch(t){}return""}},T6vF:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("mrSG"),r=a("q1tI"),o=a("wo21").classNamesFunction(),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onRenderProgress=function(e){var a=t.props,n=a.ariaValueText,i=a.barHeight,s=a.className,l=a.styles,c=a.theme,u="number"===typeof t.props.percentComplete?Math.min(100,Math.max(0,100*t.props.percentComplete)):void 0,d=o(l,{theme:c,className:s,barHeight:i,indeterminate:void 0===u}),p={width:void 0!==u?u+"%":void 0,transition:void 0!==u&&u<.01?"none":void 0},y=void 0!==u?0:void 0,h=void 0!==u?100:void 0,f=void 0!==u?Math.floor(u):void 0;return r.createElement("div",{className:d.itemProgress},r.createElement("div",{className:d.progressTrack}),r.createElement("div",{className:d.progressBar,style:p,role:"progressbar","aria-valuemin":y,"aria-valuemax":h,"aria-valuenow":f,"aria-valuetext":n}))},t}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.barHeight,a=e.className,i=e.label,s=void 0===i?this.props.title:i,l=e.description,c=e.styles,u=e.theme,d=e.progressHidden,p=e.onRenderProgress,y=void 0===p?this._onRenderProgress:p,h="number"===typeof this.props.percentComplete?Math.min(100,Math.max(0,100*this.props.percentComplete)):void 0,f=o(c,{theme:u,className:a,barHeight:t,indeterminate:void 0===h});return r.createElement("div",{className:f.root},s?r.createElement("div",{className:f.itemName},s):null,d?null:y(n.__assign(n.__assign({},this.props),{percentComplete:h}),this._onRenderProgress),l?r.createElement("div",{className:f.itemDescription},l):null)},t.defaultProps={label:"",description:"",width:180},t}(r.Component);t.ProgressIndicatorBase=i},VgLo:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,r,o=a("o0o1"),i=a.n(o),s=a("HaE+"),l=a("q1tI"),c=a.n(l),u=a("baAy"),d=a("JcwL"),p=a.n(d),y=a("pLT7"),h=a("hBjZ"),f=a("eF4C"),m=a("VaKt"),b=a("O0Jb"),g=a("Vvt1"),v=a.n(g),K=a("V4iQ"),k=a("JBGY"),_=a("DnYU"),O=a("9/5/"),w=a.n(O),x=a("tTo/"),S=a("trw0"),P=a("n0Ds"),j=a("biZS"),I=c.a.createElement,E=v()((function(){return Promise.all([a.e(28),a.e(96)]).then(a.bind(null,"Chw/"))}),{ssr:!1,loadableGenerated:{webpack:function(){return["Chw/"]},modules:["../input/sketch2/AppSketchComponent"]}});!function(e){e[e.Closed=0]="Closed",e[e.DesktopOpen=1]="DesktopOpen",e[e.MobileOpen=2]="MobileOpen",e[e.BothOpen=3]="BothOpen"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Keyboard=1]="Keyboard",e[e.Sketch=2]="Sketch"}(r||(r={}));var C={};C[n.Closed]=r.None,C[n.DesktopOpen]=r.Keyboard,C[n.MobileOpen]=r.Keyboard,C[n.BothOpen]=r.Keyboard;var M=c.a.forwardRef((function(e,t){var a=Object(l.useState)(null),o=a[0],d=a[1],g=Object(l.useState)(e.initialExpression||""),v=g[0],O=g[1],C=Object(l.useState)(""),M=C[0],N=C[1],D=Object(l.useState)(f.e.Unknown),T=D[0],R=D[1],F=Object(l.useContext)(b.a),q=Object(l.useState)(!1),A=q[0],B=q[1],H=Object(l.useState)(e.keyboardInitialState===n.Closed?r.None:r.Keyboard),L=H[0],G=H[1],V=Object(l.useRef)();Object(l.useImperativeHandle)(t,(function(){return{focus:function(){V.current&&V.current.focus()}}}));var J=function(){var t=Object(s.a)(i.a.mark((function t(a){var n,r,o,s,l;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(a&&a.length>0)){t.next=22;break}return n=a.replace("data:image/png;base64,",""),t.prev=2,B(!0),t.next=6,y.a.GetExpressionFromImageBase64(n,"Sketch");case 6:r=t.sent,o=r.latex,s=r.solution,l=r.keyboardLatexInput,O(l||o),e.isInstantAnswerEnabled&&N(Object(x.a)(s)||""),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(2),k.a.LogEvent(_.a.SketchInputPage_RecognizeError,{Source:"MathInputField",Error:t.t0});case 17:return t.prev=17,B(!1),t.finish(17);case 20:t.next=24;break;case 22:O(""),e.isInstantAnswerEnabled&&N("");case 24:case"end":return t.stop()}}),t,null,[[2,14,17,20]])})));return function(e){return t.apply(this,arguments)}}(),U=function(){var e=Object(s.a)(i.a.mark((function e(t){var a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.a.SolveSimpleLatex(t);case 2:a=e.sent,N(Object(x.a)(a)||"");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W=Object(l.useRef)(w()(U,300)).current,z=function(t){G(r.None),e.onExpressionSubmit&&e.onExpressionSubmit(t)},Y=function(){e.preventClosedState?G(r.Sketch):G(L===r.Sketch?r.None:r.Sketch),e.onInputModalityChanged&&e.onInputModalityChanged()},Q=Object(l.useCallback)((function(){z(v)}),[v]);Object(l.useEffect)((function(){R(Object(f.c)())}),[]),Object(l.useEffect)((function(){O(e.initialExpression||"")}),[e.initialExpression]),Object(l.useEffect)((function(){e.onExpressionUpdated&&e.onExpressionUpdated(v)}),[v]);var X=[];return e.isSketchEnabled&&X.push(Object(f.d)(T)?I(m.IconButton,{key:"sketch","aria-label":F.MathHeadItem_Draw,styles:{root:{height:38,width:32}},iconProps:{iconName:"SketchMode",style:{height:20,width:20,color:L===r.Sketch?"#147F8F":"#767676"}},onClick:Y}):I(m.IconButton,{key:"draw","aria-label":F.MathHeadItem_Draw,styles:{root:{height:38,width:32}},iconProps:{iconName:"DrawMode",style:{height:20,width:20,color:L===r.Sketch?"#147F8F":"#767676"}},onClick:Y})),X.push(I(m.IconButton,{key:"keyboard","aria-label":F.MathHeadItem_Type,"aria-expanded":L===r.Keyboard,styles:{root:{height:38,width:32}},iconProps:{iconName:"KeyboardMode",style:{height:25,width:25,color:L===r.Keyboard?"#147F8F":"#767676"}},onClick:function(){e.preventClosedState?G(r.Keyboard):G(L===r.Keyboard?r.None:r.Keyboard),e.onInputModalityChanged&&e.onInputModalityChanged()}})),X.push(I("div",{key:"space",style:{width:10}})),I(c.a.Fragment,null,I("div",{className:e.className},I("div",{className:p.a.gfc},I(h.a,{id:e.id,className:p.a.gf,focusedClassName:p.a.focused,onGuppyLoaded:d,onSubmit:z,onChange:function(t){O(t),e.isInstantAnswerEnabled&&(t?W(t):N(""))},expression:v,instantAnswer:M,placeholderTextOverride:L===r.Sketch?F.SketchInput_Info:void 0,iconButtons:X}),!e.hideSubmit&&I("div",{className:p.a.gfcSpacer}),!e.hideSubmit&&I(m.PrimaryButton,{styles:{root:{height:40,borderRadius:3}},onClick:Q,text:F.KeyboardInput_Solve})),I("div",{style:{height:12}}),I(P.a,{isExpanded:L===r.Keyboard},I(K.a,{className:p.a.k,onSubmitButtonClicked:Q,activeGuppy:o,initialPageIndex:e.initialPageIndex,keyPages:Object(f.d)(T)?S.a:j.a}))),A?I(u.ProgressIndicator,{styles:{itemProgress:{padding:0,height:3,opacity:1}}}):I("div",{style:{height:3}}),L===r.Sketch&&I("div",{className:p.a.sp,style:{height:e.sketchHeight}},I(E,{onImageUpdate:J})))}));t.b=M},Vvt1:function(e,t,a){e.exports=a("a6RD")},a6RD:function(e,t,a){"use strict";var n=a("lSNA");function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t