"use strict";exports.id=5094,exports.ids=[5094],exports.modules={55094:(e,n,a)=>{a.r(n),a.d(n,{default:()=>c});var t=a(60687),s=a(77295);a(36141);var i=a(15964),r=a(43210),l=a(42918);let o=(0,r.forwardRef)(function({equation:e,setEquation:n,inline:a},s){let i=e=>{n(e.target.value)};return a&&s instanceof HTMLInputElement?(0,t.jsxs)("span",{className:"EquationEditor_inputBackground",children:[(0,t.jsx)("span",{className:"EquationEditor_dollarSign",children:"$"}),(0,t.jsx)("input",{className:"EquationEditor_inlineEditor",value:e,onChange:i,autoFocus:!0,ref:s}),(0,t.jsx)("span",{className:"EquationEditor_dollarSign",children:"$"})]}):(0,t.jsxs)("div",{className:"EquationEditor_inputBackground",children:[(0,t.jsx)("span",{className:"EquationEditor_dollarSign",children:"$$\n"}),(0,t.jsx)("textarea",{className:"EquationEditor_blockEditor",value:e,onChange:i,ref:s}),(0,t.jsx)("span",{className:"EquationEditor_dollarSign",children:"\n$$"})]})});var u=a(68591),d=a(18782);function c({equation:e,inline:n,nodeKey:a}){let[c]=(0,s.DF)(),[E,x]=(0,r.useState)(e),[p,f]=(0,r.useState)(!1),j=(0,r.useRef)(null);return(0,r.useCallback)(e=>{f(!1),c.update(()=>{let n=(0,i.nsf)(a);(0,d.R_)(n)&&(n.setEquation(E),e&&n.selectNext(0,0))})},[c,E,a]),(0,t.jsx)(t.Fragment,{children:p?(0,t.jsx)(o,{equation:E,setEquation:x,inline:n,ref:j}):(0,t.jsx)(l.tH,{onError:e=>c._onError(e),fallback:null,children:(0,t.jsx)(u.A,{equation:E,inline:n,onDoubleClick:()=>f(!0)})})})}}};