|
|
!(function(){var Sc=Math.pow;var Zc=(Ir,St,y)=>new Promise((x,J)=>{var ge=X=>{try{G(y.next(X))}catch(ee){J(ee)}},ce=X=>{try{G(y.throw(X))}catch(ee){J(ee)}},G=X=>X.done?x(X.value):Promise.resolve(X.value).then(ge,ce);G((y=y.apply(Ir,St)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[1581],{42922:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return ee}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ce=ge,G=y(74643),X=function(p,fe){return J.createElement(G.Z,(0,x.Z)({},p,{ref:fe,icon:ce}))},ee=J.forwardRef(X)},25877:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return ee}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ce=ge,G=y(74643),X=function(p,fe){return J.createElement(G.Z,(0,x.Z)({},p,{ref:fe,icon:ce}))},ee=J.forwardRef(X)},22751:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return ee}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ce=ge,G=y(74643),X=function(p,fe){return J.createElement(G.Z,(0,x.Z)({},p,{ref:fe,icon:ce}))},ee=J.forwardRef(X)},38308:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return ee}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},ce=ge,G=y(74643),X=function(p,fe){return J.createElement(G.Z,(0,x.Z)({},p,{ref:fe,icon:ce}))},ee=J.forwardRef(X)},91034:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return ee}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ce=ge,G=y(74643),X=function(p,fe){return J.createElement(G.Z,(0,x.Z)({},p,{ref:fe,icon:ce}))},ee=J.forwardRef(X)},53978:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return ee}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},ce=ge,G=y(74643),X=function(p,fe){return J.createElement(G.Z,(0,x.Z)({},p,{ref:fe,icon:ce}))},ee=J.forwardRef(X)},71736:function(Ir,St){"use strict";St.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},96670:function(Ir,St,y){"use strict";y.d(St,{t:function(){return T}});var x=y(67294),J=y(71577),ge={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},ce=y(94184),G=y.n(ce),X=Object.defineProperty,ee=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,fe=(Be,Ze,Mt)=>Ze in Be?X(Be,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Be[Ze]=Mt,Ke=(Be,Ze)=>{for(var Mt in Ze||(Ze={}))C.call(Ze,Mt)&&fe(Be,Mt,Ze[Mt]);if(ee)for(var Mt of ee(Ze))p.call(Ze,Mt)&&fe(Be,Mt,Ze[Mt]);return Be};const T=({cancelText:Be="\u53D6\u6D88",okText:Ze="\u786E\u5B9A",loading:Mt=!1,hasOkBtn:Ue=!0,hasCancelBtn:H=!0,okButtonProps:Re={},onCancel:xr=()=>{},onOk:Oe=()=>{},className:be=""})=>x.createElement("div",{className:G()(ge.buttonFixed,be)},x.createElement("div",{className:ge.buttonWrap},H&&x.createElement(J.ZP,{size:"middle",className:`${ge.button} mr20`,onClick:xr},Be),Ue&&x.createElement(J.ZP,Ke({size:"middle",type:"primary",className:`${ge.button} mr20`,loading:Mt,onClick:Oe},Re),Ze)))},35713:function(Ir,St,y){"use strict";var x=y(67294),J=y(71736),ge=y(84279),ce=y(36527),G=y(14446),X=y(67294);const ee=(0,x.forwardRef)(({callback:C,width:p,onChange:fe,disabled:Ke,readOnly:T,type:Be="",value:Ze="",style:Mt={}},Ue)=>{const H=(0,x.useRef)(),Re=(0,x.useRef)(),[xr,Oe]=(0,x.useState)(0),[be,O]=(0,x.useState)(0),[V,ue]=(0,x.useState)(!1),Y=()=>{var Lt=document.createElement("div");Lt.innerHTML=H.current.getValue();var Pe=Lt.innerText;return C&&C(Pe),Pe};(0,x.useImperativeHandle)(Ue,()=>({getData:Y}));const et=Lt=>{Lt.preventDefault();const Pe=Lt.clientX-xr,Ne=Lt.clientY-be;document.body.onmousemove=_t=>{let le=_t.clientX-Pe,tt=_t.clientY-Ne;const bt=document.getElementsByClassName("markdown-popup-form")[0],Ee=window.innerWidth-bt.offsetWidth,Fe=window.innerHeight-bt.offsetHeight;le=Math.max(0,Math.min(le,Ee)),tt=Math.max(0,Math.min(tt,Fe)),mt(_t.clientX,_t.clientY,Pe,Ne)&&(Oe(le),O(tt))},document.body.onmouseup=function(){document.body.onmousemove=null}},mt=(Lt,Pe,Ne,_t)=>{const le=document.body.clientHeight,tt=document.body.clientWidth;return Lt<20&&Ne>Lt||Lt>tt-20&&Ne<Lt||Pe<20&&_t>Pe||Pe>le-20&&_t<Pe?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,x.useEffect)(()=>{V&&setTimeout(()=>{const Lt=document.getElementsByClassName("markdown-popup-form")[0],Pe=window.innerWidth/2-Lt.offsetWidth/2,Ne=window.innerHeight/2-Lt.offsetHeight/2;Oe(Pe),O(Ne)},0)},[V]);const fr=()=>{Ke||T||ue(!0)};return X.createElement("div",{style:Mt},X.createElement("div",{style:{width:p||"100%",position:"relative"},className:`${J.Z.mathFillWrap} ${Ke||T?"cursorDefault":""}`,onClick:()=>fr()},X.createElement("math-field",{disabled:Ke,locale:"zh_cn",class:`${J.Z.mathField} ${Be}`,readOnly:T,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:H,style:{width:"100%",fontSize:Ze?18:14},value:Ze||""})),X.createElement(G.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:xr,top:be},title:X.createElement("div",{style:{cursor:"move"},onMouseDown:et},"\u8F93\u5165\u516C\u5F0F"),open:V,onOk:()=>{const Lt=Re.current.getData();H.current.setValue(Lt),fe(Lt),ue(!1)},onCancel:()=>{ue(!1)},destroyOnClose:!0,className:"markdown-popup-form"},X.createElement(ce.Z,{value:Ze,ref:Re,onChange:fe,showSaveButton:!1})))});St.Z=ee},36527:function(Ir,St,y){"use strict";var x=y(67294),J=y(71230),ge=y(15746),ce=y(66368),G=y(71577),X=y(85725),ee=y(71736),C=y(84279),p=y(67294);const fe=(0,x.forwardRef)(({callback:Ke,showSaveButton:T,value:Be=""},Ze)=>{const Mt=(0,x.useRef)(),Ue=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],H=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],Re=be=>{Mt.current.setValue(Mt.current.getValue()+" "+be.value+" ")},xr=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:p.createElement(J.Z,{className:ee.Z.lists,gutter:[10,10]},Ue.map((be,O)=>p.createElement(ge.Z,{flex:"110px",className:ee.Z.item},p.createElement("div",null,p.createElement(X.Z,{value:`$$${be.value}$$`}),be.name),p.createElement("div",{className:ee.Z.children},be.children.map((V,ue)=>p.createElement("div",{key:ue},p.createElement("h1",null,V.name),p.createElement(J.Z,{gutter:[10,10]},V.data.map((Y,et)=>p.createElement(ge.Z,{key:et,onClick:()=>Re(Y),className:ee.Z.diamond},p.createElement(X.Z,{value:"`$$"+Y.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:p.createElement(J.Z,{className:ee.Z.lists,gutter:[10,10]},H.map((be,O)=>p.createElement(ge.Z,{flex:"110px",className:ee.Z.item},p.createElement("div",null,p.createElement(X.Z,{value:"`$$"+be.value+"$$`"}),be.name),p.createElement("div",{className:ee.Z.children},be.children.map((V,ue)=>p.createElement("div",{key:ue},V.name&&p.createElement("h1",null,V.name),p.createElement(J.Z,{gutter:[10,10]},V.data.map((Y,et)=>p.createElement(ge.Z,{key:et,onClick:()=>Re(Y),className:ee.Z.diamond},p.createElement(X.Z,{value:"`$$"+Y.value+"$$`"}))))))))))}],Oe=()=>{var be=document.createElement("div");be.innerHTML=Mt.current.getValue();var O=be.innerText;return Ke&&Ke(O),O};return(0,x.useImperativeHandle)(Ze,()=>({getData:Oe})),p.createElement("div",{className:ee.Z.mathWrap},p.createElement(ce.default,{defaultActiveKey:"1",items:xr}),p.createElement("math-field",{locale:"zh_cn",className:ee.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Mt,style:{width:800,marginTop:30,fontSize:18}},Be||""),T&&p.createElement("div",{className:ee.Z.button},p.createElement(G.ZP,{size:"large",onClick:Oe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});St.Z=fe},89740:function(Ir,St,y){"use strict";y.r(St),y.d(St,{default:function(){return bt},formatTypeNameToDefaultScore:function(){return le}});var x=y(67294),J=y(35973),ge=y(14446),ce=y(31795),G=y(85673),X=y(66012),ee=y(78045),C=y(85725),p={flexRow:"flexRow____Sm4b",flexColumn:"flexColumn___mQNZs",action:"action___QUVEn",setScore:"setScore___yZ0Yb",delete:"delete___e4taL",content:"content___jR4Y6",titleWrap:"titleWrap___zsXYY",titleNumber:"titleNumber___p60vi",score:"score___DbCHw",titleHtml:"titleHtml___FALbj",answerWrap:"answerWrap___uPjYq",answer:"answer___pfiPk",answerText:"answerText___K3TNr"},fe=y(19575),Ke=y(35713),T=y(67294);const Be=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],Ze=[{type:"single",name:"\u5355\u9009\u9898"},{type:"multiple",name:"\u591A\u9009\u9898"},{type:"judgement",name:"\u5224\u65AD\u9898"},{type:"completion",name:"\u586B\u7A7A\u9898"},{type:"subjective",name:"\u7B80\u7B54\u9898"}];var Ue=({index:Ee,typeName:Fe,type:Le,data:me={},inMouseId:xt,isshow:ot,onSetScore:Xe=()=>{},onDelete:ke=()=>{},onMouseEnter:$t=()=>{},showAnswer:Tt=!1})=>{var wr;const[Ur,nn]=(0,x.useState)(!1),Qr=()=>{var xe;return T.createElement("div",{className:p.answerWrap},(xe=me==null?void 0:me.choices)==null?void 0:xe.map((we,At)=>T.createElement("div",{className:`${p.flexRow} mt15`,key:At},T.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},Be[At]),T.createElement("div",{className:`${p.answer} ml5`},T.createElement(C.Z,{value:we==null?void 0:we.choice_text})))),Tt&&T.createElement("div",{className:`mt10 ${p.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",me==null?void 0:me.standard_answer_show))},Or=()=>{var xe;return T.createElement("div",{className:p.answerWrap},T.createElement("div",{className:`${p.flexRow} mt15`},(xe=me==null?void 0:me.choices)==null?void 0:xe.map((we,At)=>T.createElement(ee.ZP,{disabled:!0,key:At},we==null?void 0:we.choice_text))),Tt&&T.createElement("div",{className:`mt10 ${p.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",me==null?void 0:me.standard_answer_show))},cn=()=>{var xe;return T.createElement("div",{className:p.answerWrap},T.createElement("div",{className:`${p.flexRow} mt15`},T.createElement(C.Z,{value:(xe=me==null?void 0:me.program_attr)==null?void 0:xe.description})),Tt&&T.createElement("div",{className:"mt15"},T.createElement("div",{className:p.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",!(me!=null&&me.answer_text)&&"\u6682\u65E0"),T.createElement(C.Z,{value:(me==null?void 0:me.answer_text)||""})))},Et=()=>{var xe;return T.createElement("div",{className:p.answerWrap},Tt&&T.createElement("div",{className:`${p.flexColumn} mt15`},(xe=me==null?void 0:me.standard_answer)==null?void 0:xe.map((we,At)=>T.createElement("div",null,(we==null?void 0:we.model)===1?T.createElement(C.Z,{key:At,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${we.position}\uFF09\uFF1A${we.answer_text.join("\u3001")}`,className:p.answerText}):T.createElement("span",{style:{display:"inline-flex",alignItems:"center",marginBottom:5}},"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A ",we.position,"\uFF09\uFF1A",T.createElement(Ke.Z,{disabled:!0,width:"180px",value:we.answer_text.join("\u3001")}))))))},Ae=()=>{var xe;return T.createElement("div",{className:p.answerWrap},Tt&&T.createElement("div",{className:"mt15"},T.createElement("div",{className:p.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),T.createElement(C.Z,{value:(xe=me==null?void 0:me.answer_texts)==null?void 0:xe[0],className:p.answerText})))},de=()=>{var xe,we;return T.createElement("div",{className:p.answerWrap,style:{marginTop:10}},T.createElement(C.Z,{showProgramFill:!0,disabledFill:!0,value:fe.Base64.decode((xe=me==null?void 0:me.program_attr)==null?void 0:xe.code)}),Tt&&T.createElement("div",{className:`${p.flexColumn} mt15`},(we=me==null?void 0:me.standard_answer)==null?void 0:we.map((At,gt)=>T.createElement(C.Z,{key:gt,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${At.position}\uFF09\uFF1A${At.answer_text}`}))))},te=()=>{var xe;return T.createElement("div",{className:p.answerWrap},T.createElement("div",{className:"mt10"},"\u9636\u6BB5\u6210\u7EE9"),(xe=me==null?void 0:me.shixun)==null?void 0:xe.map((we,At)=>{var gt,je;return T.createElement("div",null,T.createElement("div",{className:"mt10 font14",key:At},"\u7B2C",At+1,"\u5173 ",we==null?void 0:we.challenge_name," \uFF08",we.challenge_score,"\u5206\uFF09"),Tt&&T.createElement("div",null,T.createElement("div",{className:p.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",((gt=we.challenge_answers)==null?void 0:gt.length)===0?"\u6682\u65E0":""),(je=we.challenge_answers)==null?void 0:je.map((nr,lr)=>T.createElement("div",{className:"mt15"},T.createElement("div",null,"\u7EA7\u522B",lr+1,"\uFF1A",nr.name),T.createElement(C.Z,{value:(nr==null?void 0:nr.contents)||"",className:p.answerText})))))}))},Te=()=>{var xe;return T.createElement("div",{className:p.answerWrap,style:{display:Ur&&"none"}},(xe=me==null?void 0:me.sub_questions)==null?void 0:xe.map((we,At)=>{var gt,je,nr,lr,re;const jt=`<span style="margin-right: 10px">${Ee+1}.${At+1}</span><span>\uFF08${(gt=Ze.find(Rt=>Rt.type==we.item_type))==null?void 0:gt.name}\uFF09</span><span class="c-grey-999">\uFF08${we.score}\u5206\uFF09</span>`;return T.createElement(x.Fragment,{key:we==null?void 0:we.id},T.createElement("div",{className:p.titleWrap,style:{marginTop:16}},T.createElement(C.Z,{className:p.titleHtml,value:jt+we.name})),(we.item_type=="single"||we.item_type=="multiple")&&T.createElement(T.Fragment,null,(je=we==null?void 0:we.choices)==null?void 0:je.map((Rt,Dr)=>T.createElement("div",{className:`${p.flexRow} mt15`,key:Dr},T.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},Be[Dr]),T.createElement("div",{className:`${p.answer} ml5`},T.createElement(C.Z,{value:Rt==null?void 0:Rt.choice_text})))),Tt&&T.createElement("div",{className:`mt10 ${p.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",we==null?void 0:we.standard_answer_show)),we.item_type=="judgement"&&T.createElement("div",{className:p.answerWrap},T.createElement("div",{className:`${p.flexRow} mt15`},(nr=we==null?void 0:we.choices)==null?void 0:nr.map((Rt,Dr)=>T.createElement(ee.ZP,{disabled:!0,key:Dr},Rt==null?void 0:Rt.choice_text))),Tt&&T.createElement("div",{className:`mt10 ${p.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",we==null?void 0:we.standard_answer_show)),we.item_type=="completion"&&T.createElement("div",{className:p.answerWrap},Tt&&T.createElement("div",{className:`${p.flexColumn} mt15`},(lr=we==null?void 0:we.standard_answer)==null?void 0:lr.map((Rt,Dr)=>T.createElement("div",null,(Rt==null?void 0:Rt.model)===1?T.createElement(C.Z,{key:Dr,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${Rt.position}\uFF09\uFF1A${Rt.answer_text.join("\u3001")}`,className:p.answerText}):T.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A$",Rt.position,"\uFF09\uFF1A",T.createElement(Ke.Z,{value:Rt.answer_text.join("\u3001")})))))),we.item_type=="subjective"&&T.createElement("div",{className:p.answerWrap},Tt&&T.createElement("div",{className:"mt15"},T.createElement("div",{className:p.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),T.createElement(C.Z,{value:(re=we==null?void 0:we.answer_texts)==null?void 0:re[0],className:p.answerText}))))}))},Me=()=>{const xe={SINGLE:Qr,MULTIPLE:Qr,JUDGMENT:Or,PROGRAM:cn,COMPLETION:Et,SUBJECTIVE:Ae,PRACTICAL:te,COMBINATION:Te,BPROGRAM:de};return xe[Le]?xe[Le]():null},ct=(xe,we)=>{var At;return`<span style="margin-right: -10px">${we+1}\u3001</span><span class="c-grey-999">\uFF08${(xe==null?void 0:xe.item_type)==="combination"?`\u5171${(At=xe==null?void 0:xe.sub_questions)==null?void 0:At.length}\u5C0F\u9898\uFF0C`:""}${xe.score}\u5206\uFF09</span> `};return T.createElement("div",{onMouseEnter:()=>$t(me.id)},xt===me.id&&T.createElement("div",{className:p.action},T.createElement("div",{className:p.setScore,onClick:()=>Xe(me.id,Fe,me==null?void 0:me.shixun,me.score,me)},"\u8BBE\u7F6E\u5F97\u5206"),T.createElement("div",{className:p.delete,onClick:()=>ke(me.id)},"\u5220\u9664")),T.createElement("div",{className:p.content},T.createElement("div",{className:p.titleWrap,style:{justifyContent:"space-between"}},(me==null?void 0:me.item_type)==="bprogram"?T.createElement(C.Z,{className:p.titleHtml,value:ct(me,Ee)+((wr=me==null?void 0:me.program_attr)==null?void 0:wr.description)}):T.createElement(C.Z,{className:p.titleHtml,value:ct(me,Ee)+((me==null?void 0:me.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(me.name||(me==null?void 0:me.shixun_name))}),(me==null?void 0:me.item_type)==="combination"&&!ot&&T.createElement("span",{onClick:xe=>{nn(!Ur)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"}},Ur?"\u5C55\u5F00":"\u6536\u8D77")),Me()))},H={bg:"bg___uBTSf",wrap:"wrap___u47s7",flexRow:"flexRow___QK3mq",flexColumn:"flexColumn___IEH4c",flexJustifyBetween:"flexJustifyBetween___VROqY",relative:"relative___iGg_n",questionNumber:"questionNumber___CYWUo",score:"score___pHhZR",selectTopicButton:"selectTopicButton___aNhaw",line:"line___zzL1y",dragTip:"dragTip___eJpug",typeActive:"typeActive___cHbxQ",mouseTypeActive:"mouseTypeActive___THFkb",typeName:"typeName___PsYTO",typeNumber:"typeNumber___IW6t9",typeAction:"typeAction___gdIEg",setScore:"setScore___ftbgZ",delete:"delete___d1fFi",modal:"modal___COzbG",modalColumn:"modalColumn___Z8nDu",shixunModal:"shixunModal___xxSWV",shixunScore:"shixunScore___zrpkw"},Re=y(96670),xr=y(96486),Oe=y.n(xr),be=y(38244),O=Object.defineProperty,V=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,fr=(Ee,Fe,Le)=>Fe in Ee?O(Ee,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ee[Fe]=Le,Lt=(Ee,Fe)=>{for(var Le in Fe||(Fe={}))et.call(Fe,Le)&&fr(Ee,Le,Fe[Le]);if(Y)for(var Le of Y(Fe))mt.call(Fe,Le)&&fr(Ee,Le,Fe[Le]);return Ee},Pe=(Ee,Fe)=>V(Ee,ue(Fe)),Ne=(Ee,Fe)=>{var Le={};for(var me in Ee)et.call(Ee,me)&&Fe.indexOf(me)<0&&(Le[me]=Ee[me]);if(Ee!=null&&Y)for(var me of Y(Ee))Fe.indexOf(me)<0&&mt.call(Ee,me)&&(Le[me]=Ee[me]);return Le},_t=(Ee,Fe,Le)=>new Promise((me,xt)=>{var ot=$t=>{try{ke(Le.next($t))}catch(Tt){xt(Tt)}},Xe=$t=>{try{ke(Le.throw($t))}catch(Tt){xt(Tt)}},ke=$t=>$t.done?me($t.value):Promise.resolve($t.value).then(ot,Xe);ke((Le=Le.apply(Ee,Fe)).next())});const le=Ee=>({\u5355\u9009\u9898:2,\u591A\u9009\u9898:5,\u586B\u7A7A\u9898:2,\u5224\u65AD\u9898:2,\u7B80\u7B54\u9898:10,\u7F16\u7A0B\u9898:10,\u5B9E\u8BAD\u9898:5,\u7EC4\u5408\u9898:10})[Ee]||0,tt=Ee=>{var Fe=Ee,{problemsetPreview:Le,user:me,globalSetting:xt,loading:ot,dispatch:Xe}=Fe,ke=Ne(Fe,["problemsetPreview","user","globalSetting","loading","dispatch"]),$t,Tt,wr,Ur;const[nn,Qr]=(0,x.useState)(),[Or,cn]=(0,x.useState)(),Et=(0,x.useRef)();console.log(Le,"problemsetPreview"),(0,x.useEffect)(()=>(Xe({type:"globalSetting/footerToggle",payload:!1}),()=>{Xe({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{Ae()},[]);const Ae=()=>{Xe({type:"problemsetPreview/getPaperData"})},de=(xe,we,At=[],gt,je)=>{var nr;const lr=Oe().cloneDeep(je),re=Oe().cloneDeep(At).map(jt=>Pe(Lt({},jt),{challenge_score:jt.challenge_score||5}));if(Et.current=gt||le(we),we==="\u5B9E\u8BAD\u9898")return ge.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:x.createElement("div",{className:H.shixunModal},x.createElement("div",null,"\u5173\u5361\uFF1A"),re==null?void 0:re.map((jt,Rt)=>x.createElement("div",{className:H.shixunScore},Rt+1,"\u3001",jt.challenge_name,x.createElement("div",{style:{minWidth:"130px"}},x.createElement(ce.Z,{defaultValue:jt.challenge_score,min:1,onChange:Dr=>{jt.challenge_score=Dr}}),x.createElement("span",{className:"ml5"},"\u5206/\u9898"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>_t(void 0,null,function*(){yield(0,be.Cc)({id:xe,challenge_scores:re.map(jt=>({challenge_id:jt.challenge_id,score:jt.challenge_score}))}),Et.current=null,Ae()})});if(we==="\u7EC4\u5408\u9898")return ge.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:x.createElement("div",{className:H.shixunModal,style:{maxHeight:200,overflow:"auto"}},(nr=lr==null?void 0:lr.sub_questions)==null?void 0:nr.map((jt,Rt)=>x.createElement("div",{className:H.shixunScore},"\u7B2C",Rt+1,"\u5C0F\u9898",x.createElement("div",{style:{minWidth:"130px"}},x.createElement(ce.Z,{defaultValue:jt.score,min:1,onChange:Dr=>{jt.score=Dr}}),x.createElement("span",{className:"ml5"},"\u5206"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>_t(void 0,null,function*(){var jt;yield(0,be.Vl)({id:xe,subs:(jt=lr==null?void 0:lr.sub_questions)==null?void 0:jt.map(Rt=>({basket_id:Rt.basket_id,score:Rt.score}))}),Et.current=null,Ae()})});ge.default.confirm({centered:!0,title:"\u8BBE\u7F6E\u5206\u6570",content:x.createElement("div",{className:""},x.createElement("span",null,"\u672C\u9898\u5206\u503C\uFF1A"),x.createElement(ce.Z,{min:1,defaultValue:Et.current,onChange:jt=>{Et.current=jt}}),x.createElement("span",{className:"ml5"},"\u5206/\u9898"),x.createElement("br",null),we==="\u586B\u7A7A\u9898"&&x.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>_t(void 0,null,function*(){yield Xe({type:"problemsetPreview/setScore",payload:{id:xe,score:Et.current}}),Et.current=null,Ae()})})},te=xe=>{ge.default.confirm({centered:!0,title:"\u63D0\u793A",content:x.createElement("div",{className:H.modal},"\u786E\u8BA4\u5220\u9664\u8BE5\u8BD5\u9898\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>_t(void 0,null,function*(){yield Xe({type:"problemsetPreview/handleDelete",payload:{id:xe}}),Ae()})})},Te=(xe,we)=>{Et.current=le(we),ge.default.confirm({centered:!0,title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u6570",content:x.createElement("div",{className:""},x.createElement("span",null,we==="\u7EC4\u5408\u9898"?"\u7EC4\u5408\u9898\u4E2D\u7684\u6BCF\u5C0F\u9898":we,"\uFF1A"),x.createElement(ce.Z,{min:1,defaultValue:Et.current,onChange:At=>{Et.current=At}}),x.createElement("span",{className:"ml5"},"\u5206/\u9898"),x.createElement("br",null),we==="\u586B\u7A7A\u9898"&&x.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>_t(void 0,null,function*(){yield Xe({type:"problemsetPreview/batchSetScore",payload:{item_type:xe,score:Et.current}}),Et.current=null,Ae()})})},Me=xe=>{ge.default.confirm({centered:!0,title:"\u63D0\u793A",content:x.createElement("div",{className:H.modalColumn},x.createElement("p",null,"\u5220\u9664\u5927\u9898\uFF0C\u5C06\u5220\u9664\u8BE5\u5927\u9898\u4E0B\u6240\u6709\u5C0F\u9898"),x.createElement("p",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u5927\u9898\uFF1F")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>_t(void 0,null,function*(){yield Xe({type:"problemsetPreview/batchDelete",payload:{item_type:xe}}),Ae()})})},ct=(xe,we)=>_t(void 0,null,function*(){if(!xe.destination||!xe.source)return;const At=we.questions[xe.source.index].id,gt=xe.destination.index+1;(yield Xe({type:"problemsetPreview/adjustPosition",payload:{id:At,position:gt}})).status!==-1&&Ae()});return x.createElement("section",{className:H.bg},x.createElement(G.Z,{className:"mt30",separator:">"},x.createElement(G.Z.Item,null,"\u8BD5\u9898\u5E93"),x.createElement(G.Z.Item,{href:"/problemset"},"\u4EBA\u5DE5\u7EC4\u5377"),x.createElement(G.Z.Item,null,"\u8BD5\u5377\u9884\u89C8")),x.createElement("div",{className:H.wrap},x.createElement("div",{className:"pt20 pb20"},x.createElement("div",{className:`${H.flexRow} ${H.flexJustifyBetween}`},x.createElement("div",null,x.createElement("span",{className:H.questionNumber},"\u9898\u6570\uFF1A",($t=Le.paperData)==null?void 0:$t.all_questions_count),x.createElement("span",{className:H.score},"\u603B\u5206\uFF1A",(Tt=Le.paperData)==null?void 0:Tt.all_score)),x.createElement("div",{className:H.selectTopicButton,onClick:()=>J.history.push("/problemset/preview_select")},"\u7EE7\u7EED\u9009\u9898")),x.createElement("div",{className:H.line}),x.createElement("div",{className:H.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(Ur=(wr=Le.paperData)==null?void 0:wr.questionList)==null?void 0:Ur.map((xe,we)=>{const At=xe.type===Or;return console.log(xe,"paperItem"),x.createElement("div",{className:`${H.relative} mt20 mb20`,key:we},x.createElement("div",{className:`${H.typeActive} ${At?H.mouseTypeActive:""}`,onMouseEnter:()=>{cn(xe.type),Qr(null)}},x.createElement("span",{className:`${H.typeName} ${At?"ml20":""}`},xe.number,"\u3001",xe.name),x.createElement("span",{className:H.typeNumber},"\uFF08\u5171",xe.questions_count,"\u9898\uFF0C",(xe==null?void 0:xe.type)==="COMBINATION"?`\u5305\u542B${xe==null?void 0:xe.sub_questions_count}\u5C0F\u9898\uFF0C`:"","\u5171",xe.questions_score,"\u5206\uFF09")),At&&x.createElement("div",{className:`${H.typeAction} ${H.flexRow}`},xe.type!=="PRACTICAL"&&x.createElement("div",{className:H.setScore,onClick:()=>Te(xe.type,xe.name)},"\u6279\u91CF\u8BBE\u7F6E\u5F97\u5206"),x.createElement("div",{className:H.delete,onClick:()=>Me(xe.type)},"\u5220\u9664")),x.createElement(X.Z5,{onDragEnd:gt=>ct(gt,xe)},x.createElement(X.bK,{droppableId:we.toString()},(gt,je)=>{var nr;return x.createElement("div",Pe(Lt({className:"mt20",ref:gt.innerRef},gt.droppableProps),{onScroll:()=>{}}),(nr=xe.questions)==null?void 0:nr.map((lr,re)=>x.createElement(X._l,{draggableId:lr.id.toString(),index:re,key:lr.id},jt=>x.createElement("div",Lt(Lt({ref:jt.innerRef},jt.draggableProps),jt.dragHandleProps),x.createElement(Ue,{index:re,typeName:xe.name,type:xe.type,data:lr,inMouseId:nn,onSetScore:de,onDelete:te,onMouseEnter:Rt=>{Qr(Rt),cn(null)}})))))})))}))),x.createElement(Re.t,{okText:"\u4FDD\u5B58\u8BD5\u5377",onCancel:()=>J.history.replace("/problemset"),onOk:()=>J.history.push("/problemset/preview_new")}))};var bt=(0,J.connect)(({problemsetPreview:Ee,user:Fe,loading:Le,globalSetting:me})=>({problemsetPreview:Ee,user:Fe,globalSetting:me,loading:Le.effects}))(tt)},9708:function(Ir,St,y){"use strict";y.d(St,{F:function(){return G},Z:function(){return ce}});var x=y(94184),J=y.n(x);const ge=null;function ce(X,ee,C){return J()({[`${X}-status-success`]:ee==="success",[`${X}-status-warning`]:ee==="warning",[`${X}-status-error`]:ee==="error",[`${X}-status-validating`]:ee==="validating",[`${X}-has-feedback`]:C})}const G=(X,ee)=>ee||X},85673:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return _t}});var x=y(94184),J=y.n(x),ge=y(37419),ce=y(1337),G=y(67294),X=y(96159),ee=y(53124),C=y(42922),p=y(56153);const fe=le=>{let{children:tt}=le;const{getPrefixCls:bt}=G.useContext(ee.E_),Ee=bt("breadcrumb");return G.createElement("li",{className:`${Ee}-separator`,"aria-hidden":"true"},tt===""?tt:tt||"/")};fe.__ANT_BREADCRUMB_SEPARATOR=!0;var Ke=fe,T=function(le,tt){var bt={};for(var Ee in le)Object.prototype.hasOwnProperty.call(le,Ee)&&tt.indexOf(Ee)<0&&(bt[Ee]=le[Ee]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Ee=Object.getOwnPropertySymbols(le);Fe<Ee.length;Fe++)tt.indexOf(Ee[Fe])<0&&Object.prototype.propertyIsEnumerable.call(le,Ee[Fe])&&(bt[Ee[Fe]]=le[Ee[Fe]]);return bt};function Be(le,tt){if(le.title===void 0||le.title===null)return null;const bt=Object.keys(tt).join("|");return typeof le.title=="object"?le.title:String(le.title).replace(new RegExp(`:(${bt})`,"g"),(Ee,Fe)=>tt[Fe]||Ee)}function Ze(le,tt,bt,Ee){if(bt==null)return null;const{className:Fe,onClick:Le}=tt,me=T(tt,["className","onClick"]),xt=Object.assign(Object.assign({},(0,ce.Z)(me,{data:!0,aria:!0})),{onClick:Le});return Ee!==void 0?G.createElement("a",Object.assign({},xt,{className:J()(`${le}-link`,Fe),href:Ee}),bt):G.createElement("span",Object.assign({},xt,{className:J()(`${le}-link`,Fe)}),bt)}function Mt(le,tt){return(Ee,Fe,Le,me,xt)=>{if(tt)return tt(Ee,Fe,Le,me);const ot=Be(Ee,Fe);return Ze(le,Ee,ot,xt)}}var Ue=function(le,tt){var bt={};for(var Ee in le)Object.prototype.hasOwnProperty.call(le,Ee)&&tt.indexOf(Ee)<0&&(bt[Ee]=le[Ee]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Ee=Object.getOwnPropertySymbols(le);Fe<Ee.length;Fe++)tt.indexOf(Ee[Fe])<0&&Object.prototype.propertyIsEnumerable.call(le,Ee[Fe])&&(bt[Ee[Fe]]=le[Ee[Fe]]);return bt};const H=le=>{const{prefixCls:tt,separator:bt="/",children:Ee,menu:Fe,overlay:Le,dropdownProps:me,href:xt}=le,Xe=(ke=>{if(Fe||Le){const $t=Object.assign({},me);if(Fe){const Tt=Fe||{},{items:wr}=Tt,Ur=Ue(Tt,["items"]);$t.menu=Object.assign(Object.assign({},Ur),{items:wr==null?void 0:wr.map((nn,Qr)=>{var{key:Or,title:cn,label:Et,path:Ae}=nn,de=Ue(nn,["key","title","label","path"]);let te=Et!=null?Et:cn;return Ae&&(te=G.createElement("a",{href:`${xt}${Ae}`},te)),Object.assign(Object.assign({},de),{key:Or!=null?Or:Qr,label:te})})})}else Le&&($t.overlay=Le);return G.createElement(p.Z,Object.assign({placement:"bottom"},$t),G.createElement("span",{className:`${tt}-overlay-link`},ke,G.createElement(C.Z,null)))}return ke})(Ee);return Xe!=null?G.createElement(G.Fragment,null,G.createElement("li",null,Xe),bt&&G.createElement(Ke,null,bt)):null},Re=le=>{const{prefixCls:tt,children:bt,href:Ee}=le,Fe=Ue(le,["prefixCls","children","href"]),{getPrefixCls:Le}=G.useContext(ee.E_),me=Le("breadcrumb",tt);return G.createElement(H,Object.assign({},Fe,{prefixCls:me}),Ze(me,Fe,bt,Ee))};Re.__ANT_BREADCRUMB_ITEM=!0;var xr=Re,Oe=y(14747),be=y(67968),O=y(45503);const V=le=>{const{componentCls:tt,iconCls:bt}=le;return{[tt]:Object.assign(Object.assign({},(0,Oe.Wf)(le)),{color:le.itemColor,fontSize:le.fontSize,[bt]:{fontSize:le.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:le.linkColor,transition:`color ${le.motionDurationMid}`,padding:`0 ${le.paddingXXS}px`,borderRadius:le.borderRadiusSM,height:le.lineHeight*le.fontSize,display:"inline-block",marginInline:-le.marginXXS,"&:hover":{color:le.linkHoverColor,backgroundColor:le.colorBgTextHover}},(0,Oe.Qy)(le)),"li:last-child":{color:le.lastItemColor},[`${tt}-separator`]:{marginInline:le.separatorMargin,color:le.separatorColor},[`${tt}-link`]:{[`
|
|
|
> ${bt} + span,
|
|
|
> ${bt} + a
|
|
|
`]:{marginInlineStart:le.marginXXS}},[`${tt}-overlay-link`]:{borderRadius:le.borderRadiusSM,height:le.lineHeight*le.fontSize,display:"inline-block",padding:`0 ${le.paddingXXS}px`,marginInline:-le.marginXXS,[`> ${bt}`]:{marginInlineStart:le.marginXXS,fontSize:le.fontSizeIcon},"&:hover":{color:le.linkHoverColor,backgroundColor:le.colorBgTextHover,a:{color:le.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${le.componentCls}-rtl`]:{direction:"rtl"}})}};var ue=(0,be.Z)("Breadcrumb",le=>{const tt=(0,O.TS)(le,{});return[V(tt)]},le=>({itemColor:le.colorTextDescription,lastItemColor:le.colorText,iconFontSize:le.fontSize,linkColor:le.colorTextDescription,linkHoverColor:le.colorText,separatorColor:le.colorTextDescription,separatorMargin:le.marginXS})),Y=function(le,tt){var bt={};for(var Ee in le)Object.prototype.hasOwnProperty.call(le,Ee)&&tt.indexOf(Ee)<0&&(bt[Ee]=le[Ee]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Ee=Object.getOwnPropertySymbols(le);Fe<Ee.length;Fe++)tt.indexOf(Ee[Fe])<0&&Object.prototype.propertyIsEnumerable.call(le,Ee[Fe])&&(bt[Ee[Fe]]=le[Ee[Fe]]);return bt};function et(le){const{breadcrumbName:tt,children:bt}=le,Ee=Y(le,["breadcrumbName","children"]),Fe=Object.assign({title:tt},Ee);return bt&&(Fe.menu={items:bt.map(Le=>{var{breadcrumbName:me}=Le,xt=Y(Le,["breadcrumbName"]);return Object.assign(Object.assign({},xt),{title:me})})}),Fe}function mt(le,tt){return(0,G.useMemo)(()=>le||(tt?tt.map(et):null),[le,tt])}var fr=function(le,tt){var bt={};for(var Ee in le)Object.prototype.hasOwnProperty.call(le,Ee)&&tt.indexOf(Ee)<0&&(bt[Ee]=le[Ee]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Ee=Object.getOwnPropertySymbols(le);Fe<Ee.length;Fe++)tt.indexOf(Ee[Fe])<0&&Object.prototype.propertyIsEnumerable.call(le,Ee[Fe])&&(bt[Ee[Fe]]=le[Ee[Fe]]);return bt};const Lt=(le,tt)=>{if(tt===void 0)return tt;let bt=(tt||"").replace(/^\//,"");return Object.keys(le).forEach(Ee=>{bt=bt.replace(`:${Ee}`,le[Ee])}),bt},Pe=le=>{const{prefixCls:tt,separator:bt="/",style:Ee,className:Fe,rootClassName:Le,routes:me,items:xt,children:ot,itemRender:Xe,params:ke={}}=le,$t=fr(le,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Tt,direction:wr,breadcrumb:Ur}=G.useContext(ee.E_);let nn;const Qr=Tt("breadcrumb",tt),[Or,cn]=ue(Qr),Et=mt(xt,me),Ae=Mt(Qr,Xe);if(Et&&Et.length>0){const Te=[],Me=xt||me;nn=Et.map((ct,xe)=>{const{path:we,key:At,type:gt,menu:je,overlay:nr,onClick:lr,className:re,separator:jt,dropdownProps:Rt}=ct,Dr=Lt(ke,we);Dr!==void 0&&Te.push(Dr);const gn=At!=null?At:xe;if(gt==="separator")return G.createElement(Ke,{key:gn},jt);const un={},_i=xe===Et.length-1;je?un.menu=je:nr&&(un.overlay=nr);let{href:_r}=ct;return Te.length&&Dr!==void 0&&(_r=`#/${Te.join("/")}`),G.createElement(H,Object.assign({key:gn},un,(0,ce.Z)(ct,{data:!0,aria:!0}),{className:re,dropdownProps:Rt,href:_r,separator:_i?"":bt,onClick:lr,prefixCls:Qr}),Ae(ct,ke,Me,Te,_r))})}else if(ot){const Te=(0,ge.Z)(ot).length;nn=(0,ge.Z)(ot).map((Me,ct)=>{if(!Me)return Me;const xe=ct===Te-1;return(0,X.Tm)(Me,{separator:xe?"":bt,key:ct})})}const de=J()(Qr,Ur==null?void 0:Ur.className,{[`${Qr}-rtl`]:wr==="rtl"},Fe,Le,cn),te=Object.assign(Object.assign({},Ur==null?void 0:Ur.style),Ee);return Or(G.createElement("nav",Object.assign({className:de,style:te},$t),G.createElement("ol",null,nn)))};Pe.Item=xr,Pe.Separator=Ke;var Ne=Pe,_t=Ne},56153:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return tl}});var x=y(67294),J=y.t(x,2),ge=y(91034),ce=y(94184),G=y.n(ce),X=y(87462),ee=y(4942),C=y(97685),p=y(45987),fe=y(1413),Ke=y(73935);function T(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Be={};function Ze(_,B){}function Mt(_,B){}function Ue(){Be={}}function H(_,B,P){!B&&!Be[P]&&(_(!1,P),Be[P]=!0)}function Re(_,B){H(Ze,_,B)}function xr(_,B){H(Mt,_,B)}var Oe=null,be=y(71002),O=y(12060);function V(_,B,P){var j=x.useRef({});return(!("value"in j.current)||P(j.current.condition,B))&&(j.current.value=_(),j.current.condition=B),j.current.value}function ue(_,B){typeof _=="function"?_(B):(0,be.Z)(_)==="object"&&_&&"current"in _&&(_.current=B)}function Y(){for(var _=arguments.length,B=new Array(_),P=0;P<_;P++)B[P]=arguments[P];var j=B.filter(function(se){return se});return j.length<=1?j[0]:function(se){B.forEach(function(Ce){ue(Ce,se)})}}function et(){for(var _=arguments.length,B=new Array(_),P=0;P<_;P++)B[P]=arguments[P];return V(function(){return Y.apply(void 0,B)},B,function(j,se){return j.length===se.length&&j.every(function(Ce,ve){return Ce===se[ve]})})}function mt(_){var B,P,j=(0,O.isMemo)(_)?_.type.type:_.type;return!(typeof j=="function"&&!((B=j.prototype)!==null&&B!==void 0&&B.render)||typeof _=="function"&&!((P=_.prototype)!==null&&P!==void 0&&P.render))}var fr=x.createContext(null),Lt=fr,Pe=y(74902),Ne=T()?x.useLayoutEffect:x.useEffect,_t=Ne,le=function(B,P){var j=React.useRef(!0);Ne(function(){if(!j.current)return B()},P),Ne(function(){return j.current=!1,function(){j.current=!0}},[])},tt=[];function bt(_,B){var P=x.useState(function(){if(!T())return null;var Zt=document.createElement("div");return Zt}),j=(0,C.Z)(P,1),se=j[0],Ce=x.useRef(!1),ve=x.useContext(Lt),$e=x.useState(tt),ut=(0,C.Z)($e,2),rt=ut[0],Pt=ut[1],dt=ve||(Ce.current?void 0:function(Zt){Pt(function(fn){var zr=[Zt].concat((0,Pe.Z)(fn));return zr})});function tr(){se.parentElement||document.body.appendChild(se),Ce.current=!0}function qt(){var Zt;(Zt=se.parentElement)===null||Zt===void 0||Zt.removeChild(se),Ce.current=!1}return _t(function(){return _?ve?ve(tr):tr():qt(),qt},[_]),_t(function(){rt.length&&(rt.forEach(function(Zt){return Zt()}),Pt(tt))},[rt]),[se,dt]}function Ee(_,B){if(!_)return!1;if(_.contains)return _.contains(B);for(var P=B;P;){if(P===_)return!0;P=P.parentNode}return!1}var Fe="data-rc-order",Le="rc-util-key",me=new Map;function xt(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=_.mark;return B?B.startsWith("data-")?B:"data-".concat(B):Le}function ot(_){if(_.attachTo)return _.attachTo;var B=document.querySelector("head");return B||document.body}function Xe(_){return _==="queue"?"prependQueue":_?"prepend":"append"}function ke(_){return Array.from((me.get(_)||_).children).filter(function(B){return B.tagName==="STYLE"})}function $t(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!T())return null;var P=B.csp,j=B.prepend,se=document.createElement("style");se.setAttribute(Fe,Xe(j)),P!=null&&P.nonce&&(se.nonce=P==null?void 0:P.nonce),se.innerHTML=_;var Ce=ot(B),ve=Ce.firstChild;if(j){if(j==="queue"){var $e=ke(Ce).filter(function(ut){return["prepend","prependQueue"].includes(ut.getAttribute(Fe))});if($e.length)return Ce.insertBefore(se,$e[$e.length-1].nextSibling),se}Ce.insertBefore(se,ve)}else Ce.appendChild(se);return se}function Tt(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=ot(B);return ke(P).find(function(j){return j.getAttribute(xt(B))===_})}function wr(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=Tt(_,B);if(P){var j=ot(B);j.removeChild(P)}}function Ur(_,B){var P=me.get(_);if(!P||!Ee(document,P)){var j=$t("",B),se=j.parentNode;me.set(_,se),_.removeChild(j)}}function nn(){me.clear()}function Qr(_,B){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=ot(P);Ur(j,P);var se=Tt(B,P);if(se){var Ce,ve;if((Ce=P.csp)!==null&&Ce!==void 0&&Ce.nonce&&se.nonce!==((ve=P.csp)===null||ve===void 0?void 0:ve.nonce)){var $e;se.nonce=($e=P.csp)===null||$e===void 0?void 0:$e.nonce}return se.innerHTML!==_&&(se.innerHTML=_),se}var ut=$t(_,P);return ut.setAttribute(xt(P),B),ut}var Or;function cn(_){if(typeof document=="undefined")return 0;if(_||Or===void 0){var B=document.createElement("div");B.style.width="100%",B.style.height="200px";var P=document.createElement("div"),j=P.style;j.position="absolute",j.top="0",j.left="0",j.pointerEvents="none",j.visibility="hidden",j.width="200px",j.height="150px",j.overflow="hidden",P.appendChild(B),document.body.appendChild(P);var se=B.offsetWidth;P.style.overflow="scroll";var Ce=B.offsetWidth;se===Ce&&(Ce=P.clientWidth),document.body.removeChild(P),Or=se-Ce}return Or}function Et(_){var B=_.match(/^(.*)px$/),P=Number(B==null?void 0:B[1]);return Number.isNaN(P)?cn():P}function Ae(_){if(typeof document=="undefined"||!_||!(_ instanceof Element))return{width:0,height:0};var B=getComputedStyle(_,"::-webkit-scrollbar"),P=B.width,j=B.height;return{width:Et(P),height:Et(j)}}function de(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var te="rc-util-locker-".concat(Date.now()),Te=0;function Me(_){var B=!!_,P=x.useState(function(){return Te+=1,"".concat(te,"_").concat(Te)}),j=(0,C.Z)(P,1),se=j[0];_t(function(){if(B){var Ce=Ae(document.body).width,ve=de();Qr(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(ve?"width: calc(100% - ".concat(Ce,"px);"):"",`
|
|
|
}`),se)}else wr(se);return function(){wr(se)}},[B,se])}var ct=!1;function xe(_){return typeof _=="boolean"&&(ct=_),ct}var we=function(B){return B===!1?!1:!T()||!B?null:typeof B=="string"?document.querySelector(B):typeof B=="function"?B():B},At=x.forwardRef(function(_,B){var P=_.open,j=_.autoLock,se=_.getContainer,Ce=_.debug,ve=_.autoDestroy,$e=ve===void 0?!0:ve,ut=_.children,rt=x.useState(P),Pt=(0,C.Z)(rt,2),dt=Pt[0],tr=Pt[1],qt=dt||P;x.useEffect(function(){($e||P)&&tr(P)},[P,$e]);var Zt=x.useState(function(){return we(se)}),fn=(0,C.Z)(Zt,2),zr=fn[0],Sn=fn[1];x.useEffect(function(){var Aa=we(se);Sn(Aa!=null?Aa:null)});var Zr=bt(qt&&!zr,Ce),Mr=(0,C.Z)(Zr,2),Yt=Mr[0],ba=Mr[1],ia=zr!=null?zr:Yt;Me(j&&P&&T()&&(ia===Yt||ia===document.body));var ya=null;if(ut&&mt(ut)&&B){var Va=ut;ya=Va.ref}var on=et(ya,B);if(!qt||!T()||zr===void 0)return null;var hn=ia===!1||xe(),Nr=ut;return B&&(Nr=x.cloneElement(ut,{ref:on})),x.createElement(Lt.Provider,{value:ba},hn?Nr:(0,Ke.createPortal)(Nr,ia))}),gt=At,je=gt,nr=y(48555);function lr(_){return _ instanceof HTMLElement||_ instanceof SVGElement}function re(_){return lr(_)?_:_ instanceof React.Component?ReactDOM.findDOMNode(_):null}function jt(_){var B;return _==null||(B=_.getRootNode)===null||B===void 0?void 0:B.call(_)}function Rt(_){return jt(_)instanceof ShadowRoot}function Dr(_){return Rt(_)?jt(_):null}function gn(_){var B=x.useRef();B.current=_;var P=x.useCallback(function(){for(var j,se=arguments.length,Ce=new Array(se),ve=0;ve<se;ve++)Ce[ve]=arguments[ve];return(j=B.current)===null||j===void 0?void 0:j.call.apply(j,[B].concat(Ce))},[]);return P}function un(){var _=(0,fe.Z)({},J);return _.useId}var _i=0;function _r(){}var Bt=un(),Pi=Bt?function(B){var P=Bt();return B||P}:function(B){var P=x.useState("ssr-id"),j=(0,C.Z)(P,2),se=j[0],Ce=j[1];return x.useEffect(function(){var ve=_i;_i+=1,Ce("rc_unique_".concat(ve))},[]),B||se};function Wi(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ea=Wi()?x.useLayoutEffect:x.useEffect,wn=function(B,P){var j=x.useRef(!0);ea(function(){return B(j.current)},P),ea(function(){return j.current=!1,function(){j.current=!0}},[])},$i=function(B,P){wn(function(j){if(!j)return B()},P)},Jt=wn,Do=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var _=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(_)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(_==null?void 0:_.substr(0,4))},xo=x.createContext(null),co=xo;function Ka(_){return _?Array.isArray(_)?_:[_]:[]}function ta(_,B,P,j){return x.useMemo(function(){var se=Ka(P!=null?P:B),Ce=Ka(j!=null?j:B),ve=new Set(se),$e=new Set(Ce);return _&&(ve.has("hover")&&(ve.delete("hover"),ve.add("click")),$e.has("hover")&&($e.delete("hover"),$e.add("click"))),[ve,$e]},[_,B,P,j])}var cr=function(_){if(!_)return!1;if(_ instanceof Element){if(_.offsetParent)return!0;if(_.getBBox){var B=_.getBBox(),P=B.width,j=B.height;if(P||j)return!0}if(_.getBoundingClientRect){var se=_.getBoundingClientRect(),Ce=se.width,ve=se.height;if(Ce||ve)return!0}}return!1};function Ha(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],P=arguments.length>2?arguments[2]:void 0;return P?_[0]===B[0]:_[0]===B[0]&&_[1]===B[1]}function qs(_,B,P,j){for(var se=P.points,Ce=Object.keys(_),ve=0;ve<Ce.length;ve+=1){var $e,ut=Ce[ve];if(Ha(($e=_[ut])===null||$e===void 0?void 0:$e.points,se,j))return"".concat(B,"-placement-").concat(ut)}return""}function ms(_,B,P,j){return B||(P?{motionName:"".concat(_,"-").concat(P)}:j?{motionName:j}:null)}function Lo(_){return _.ownerDocument.defaultView}function Mi(_){for(var B=[],P=_==null?void 0:_.parentElement,j=["hidden","scroll","clip","auto"];P;){var se=Lo(P).getComputedStyle(P),Ce=se.overflowX,ve=se.overflowY,$e=se.overflow;[Ce,ve,$e].some(function(ut){return j.includes(ut)})&&B.push(P),P=P.parentElement}return B}function Fo(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(_)?B:_}function Ri(_){return Fo(parseFloat(_),0)}function U(_,B){var P=(0,fe.Z)({},_);return(B||[]).forEach(function(j){if(!(j instanceof HTMLBodyElement||j instanceof HTMLHtmlElement)){var se=Lo(j).getComputedStyle(j),Ce=se.overflow,ve=se.overflowClipMargin,$e=se.borderTopWidth,ut=se.borderBottomWidth,rt=se.borderLeftWidth,Pt=se.borderRightWidth,dt=j.getBoundingClientRect(),tr=j.offsetHeight,qt=j.clientHeight,Zt=j.offsetWidth,fn=j.clientWidth,zr=Ri($e),Sn=Ri(ut),Zr=Ri(rt),Mr=Ri(Pt),Yt=Fo(Math.round(dt.width/Zt*1e3)/1e3),ba=Fo(Math.round(dt.height/tr*1e3)/1e3),ia=(Zt-fn-Zr-Mr)*Yt,ya=(tr-qt-zr-Sn)*ba,Va=zr*ba,on=Sn*ba,hn=Zr*Yt,Nr=Mr*Yt,Aa=0,Ga=0;if(Ce==="clip"){var Xn=Ri(ve);Aa=Xn*Yt,Ga=Xn*ba}var sn=dt.x+hn-Aa,On=dt.y+Va-Ga,Vr=sn+dt.width+2*Aa-hn-Nr-ia,Ai=On+dt.height+2*Ga-Va-on-ya;P.left=Math.max(P.left,sn),P.top=Math.max(P.top,On),P.right=Math.min(P.right,Vr),P.bottom=Math.min(P.bottom,Ai)}}),P}function Q(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P="".concat(B),j=P.match(/^(.*)\%$/);return j?_*(parseFloat(j[1])/100):parseFloat(P)}function Se(_,B){var P=B||[],j=(0,C.Z)(P,2),se=j[0],Ce=j[1];return[Q(_.width,se),Q(_.height,Ce)]}function Ye(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[_[0],_[1]]}function Ct(_,B){var P=B[0],j=B[1],se,Ce;return P==="t"?Ce=_.y:P==="b"?Ce=_.y+_.height:Ce=_.y+_.height/2,j==="l"?se=_.x:j==="r"?se=_.x+_.width:se=_.x+_.width/2,{x:se,y:Ce}}function Nt(_,B){var P={t:"b",b:"t",l:"r",r:"l"};return _.map(function(j,se){return se===B?P[j]||"c":j}).join("")}function Cn(_,B,P,j,se,Ce,ve){var $e=x.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:se[j]||{}}),ut=(0,C.Z)($e,2),rt=ut[0],Pt=ut[1],dt=x.useRef(0),tr=x.useMemo(function(){return B?Mi(B):[]},[B]),qt=x.useRef({}),Zt=function(){qt.current={}};_||Zt();var fn=gn(function(){if(B&&P&&_){let Li=function(no,Ii){var $o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:st,Go=Fn.x+no,us=Fn.y+Ii,Ro=Go+R,xs=us+A,Zs=Math.max(Go,$o.left),zi=Math.max(us,$o.top),rl=Math.min(Ro,$o.right),rr=Math.min(xs,$o.bottom);return Math.max(0,(rl-Zs)*(rr-zi))},Fi=function(){Qn=Fn.y+$r,bi=Qn+A,Rr=Fn.x+Kr,Oi=Rr+R};var Zr,Mr,Yt=B,ba=Yt.ownerDocument,ia=Lo(Yt),ya=ia.getComputedStyle(Yt),Va=ya.width,on=ya.height,hn=ya.position,Nr=Yt.style.left,Aa=Yt.style.top,Ga=Yt.style.right,Xn=Yt.style.bottom,sn=(0,fe.Z)((0,fe.Z)({},se[j]),Ce),On=ba.createElement("div");(Zr=Yt.parentElement)===null||Zr===void 0||Zr.appendChild(On),On.style.left="".concat(Yt.offsetLeft,"px"),On.style.top="".concat(Yt.offsetTop,"px"),On.style.position=hn,On.style.height="".concat(Yt.offsetHeight,"px"),On.style.width="".concat(Yt.offsetWidth,"px"),Yt.style.left="0",Yt.style.top="0",Yt.style.right="auto",Yt.style.bottom="auto";var Vr;if(Array.isArray(P))Vr={x:P[0],y:P[1],width:0,height:0};else{var Ai=P.getBoundingClientRect();Vr={x:Ai.x,y:Ai.y,width:Ai.width,height:Ai.height}}var Fn=Yt.getBoundingClientRect(),oa=ba.documentElement,Co=oa.clientWidth,qa=oa.clientHeight,ci=oa.scrollWidth,Po=oa.scrollHeight,m=oa.scrollTop,M=oa.scrollLeft,A=Fn.height,R=Fn.width,K=Vr.height,ie=Vr.width,oe={left:0,top:0,right:Co,bottom:qa},Ge={left:-M,top:-m,right:ci-M,bottom:Po-m},qe=sn.htmlRegion,Qe="visible",Ot="visibleFirst";qe!=="scroll"&&qe!==Ot&&(qe=Qe);var kt=qe===Ot,Dt=U(Ge,tr),We=U(oe,tr),st=qe===Qe?We:Dt,Qt=kt?We:st;Yt.style.left="auto",Yt.style.top="auto",Yt.style.right="0",Yt.style.bottom="0";var Ft=Yt.getBoundingClientRect();Yt.style.left=Nr,Yt.style.top=Aa,Yt.style.right=Ga,Yt.style.bottom=Xn,(Mr=Yt.parentElement)===null||Mr===void 0||Mr.removeChild(On);var Sr=Fo(Math.round(R/parseFloat(Va)*1e3)/1e3),er=Fo(Math.round(A/parseFloat(on)*1e3)/1e3);if(Sr===0||er===0||lr(P)&&!cr(P))return;var Ut=sn.offset,ft=sn.targetOffset,sr=Se(Fn,Ut),Ar=(0,C.Z)(sr,2),Pr=Ar[0],Cr=Ar[1],ua=Se(Vr,ft),Lr=(0,C.Z)(ua,2),Jn=Lr[0],$n=Lr[1];Vr.x-=Jn,Vr.y-=$n;var mn=sn.points||[],rn=(0,C.Z)(mn,2),Tr=rn[0],ln=rn[1],vr=Ye(ln),vn=Ye(Tr),_n=Ct(Vr,vr),xa=Ct(Fn,vn),$a=(0,fe.Z)({},sn),Kr=_n.x-xa.x+Pr,$r=_n.y-xa.y+Cr,Da=Li(Kr,$r),da=Li(Kr,$r,We),Ra=Ct(Vr,["t","l"]),An=Ct(Fn,["t","l"]),Dn=Ct(Vr,["b","r"]),Yn=Ct(Fn,["b","r"]),Xa=sn.overflow||{},La=Xa.adjustX,Ln=Xa.adjustY,Na=Xa.shiftX,ai=Xa.shiftY,ui=function(Ii){return typeof Ii=="boolean"?Ii:Ii>=0},Qn,bi,Rr,Oi;Fi();var Ja=ui(Ln),di=vn[0]===vr[0];if(Ja&&vn[0]==="t"&&(bi>Qt.bottom||qt.current.bt)){var fi=$r;di?fi-=A-K:fi=Ra.y-Yn.y-Cr;var Ya=Li(Kr,fi),hi=Li(Kr,fi,We);Ya>Da||Ya===Da&&(!kt||hi>=da)?(qt.current.bt=!0,$r=fi,Cr=-Cr,$a.points=[Nt(vn,0),Nt(vr,0)]):qt.current.bt=!1}if(Ja&&vn[0]==="b"&&(Qn<Qt.top||qt.current.tb)){var yi=$r;di?yi+=A-K:yi=Dn.y-An.y-Cr;var Un=Li(Kr,yi),Eo=Li(Kr,yi,We);Un>Da||Un===Da&&(!kt||Eo>=da)?(qt.current.tb=!0,$r=yi,Cr=-Cr,$a.points=[Nt(vn,0),Nt(vr,0)]):qt.current.tb=!1}var Oa=ui(La),Ia=vn[1]===vr[1];if(Oa&&vn[1]==="l"&&(Oi>Qt.right||qt.current.rl)){var pi=Kr;Ia?pi-=R-ie:pi=Ra.x-Yn.x-Pr;var Fa=Li(pi,$r),Uo=Li(pi,$r,We);Fa>Da||Fa===Da&&(!kt||Uo>=da)?(qt.current.rl=!0,Kr=pi,Pr=-Pr,$a.points=[Nt(vn,1),Nt(vr,1)]):qt.current.rl=!1}if(Oa&&vn[1]==="r"&&(Rr<Qt.left||qt.current.lr)){var Ta=Kr;Ia?Ta+=R-ie:Ta=Dn.x-An.x-Pr;var Xi=Li(Ta,$r),xi=Li(Ta,$r,We);Xi>Da||Xi===Da&&(!kt||xi>=da)?(qt.current.lr=!0,Kr=Ta,Pr=-Pr,$a.points=[Nt(vn,1),Nt(vr,1)]):qt.current.lr=!1}Fi();var jn=Na===!0?0:Na;typeof jn=="number"&&(Rr<We.left&&(Kr-=Rr-We.left-Pr,Vr.x+ie<We.left+jn&&(Kr+=Vr.x-We.left+ie-jn)),Oi>We.right&&(Kr-=Oi-We.right-Pr,Vr.x>We.right-jn&&(Kr+=Vr.x-We.right+jn)));var nt=ai===!0?0:ai;typeof nt=="number"&&(Qn<We.top&&($r-=Qn-We.top-Cr,Vr.y+K<We.top+nt&&($r+=Vr.y-We.top+K-nt)),bi>We.bottom&&($r-=bi-We.bottom-Cr,Vr.y>We.bottom-nt&&($r+=Vr.y-We.bottom+nt)));var In=Fn.x+Kr,wa=In+R,ro=Fn.y+$r,fa=ro+A,Ua=Vr.x,sa=Ua+ie,zn=Vr.y,Sa=zn+K,Ji=Math.max(In,Ua),Ht=Math.min(wa,sa),Hr=(Ji+Ht)/2,Rn=Hr-In,Di=Math.max(ro,zn),za=Math.min(fa,Sa),cs=(Di+za)/2,Ts=cs-ro;ve==null||ve(B,$a);var jo=Ft.right-Fn.x-(Kr+Fn.width),ys=Ft.bottom-Fn.y-($r+Fn.height);Pt({ready:!0,offsetX:Kr/Sr,offsetY:$r/er,offsetR:jo/Sr,offsetB:ys/er,arrowX:Rn/Sr,arrowY:Ts/er,scaleX:Sr,scaleY:er,align:$a})}}),zr=function(){dt.current+=1;var Mr=dt.current;Promise.resolve().then(function(){dt.current===Mr&&fn()})},Sn=function(){Pt(function(Mr){return(0,fe.Z)((0,fe.Z)({},Mr),{},{ready:!1})})};return Jt(Sn,[j]),Jt(function(){_||Sn()},[_]),[rt.ready,rt.offsetX,rt.offsetY,rt.offsetR,rt.offsetB,rt.arrowX,rt.arrowY,rt.scaleX,rt.scaleY,rt.align,zr]}function jr(_,B,P,j,se){Jt(function(){if(_&&B&&P){let dt=function(){j(),se()};var Ce=B,ve=P,$e=Mi(Ce),ut=Mi(ve),rt=Lo(ve),Pt=new Set([rt].concat((0,Pe.Z)($e),(0,Pe.Z)(ut)));return Pt.forEach(function(tr){tr.addEventListener("scroll",dt,{passive:!0})}),rt.addEventListener("resize",dt,{passive:!0}),j(),function(){Pt.forEach(function(tr){tr.removeEventListener("scroll",dt),rt.removeEventListener("resize",dt)})}}},[_,B,P])}function ra(_){var B=React.useRef(!1),P=React.useState(_),j=_slicedToArray(P,2),se=j[0],Ce=j[1];React.useEffect(function(){return B.current=!1,function(){B.current=!0}},[]);function ve($e,ut){ut&&B.current||Ce($e)}return[se,ve]}function En(_){return _!==void 0}function Gr(_,B){var P=B||{},j=P.defaultValue,se=P.value,Ce=P.onChange,ve=P.postState,$e=useState(function(){return En(se)?se:En(j)?typeof j=="function"?j():j:typeof _=="function"?_():_}),ut=_slicedToArray($e,2),rt=ut[0],Pt=ut[1],dt=se!==void 0?se:rt,tr=ve?ve(dt):dt,qt=useEvent(Ce),Zt=useState([dt]),fn=_slicedToArray(Zt,2),zr=fn[0],Sn=fn[1];useLayoutUpdateEffect(function(){var Mr=zr[0];rt!==Mr&&qt(rt,Mr)},[zr]),useLayoutUpdateEffect(function(){En(se)||Pt(se)},[se]);var Zr=useEvent(function(Mr,Yt){Pt(Mr,Yt),Sn([dt],Yt)});return[tr,Zr]}var Ea=y(95845);function dn(_,B,P){var j=x.useRef({});return(!("value"in j.current)||P(j.current.condition,B))&&(j.current.value=_(),j.current.condition=B),j.current.value}function pn(_,B){typeof _=="function"?_(B):(0,be.Z)(_)==="object"&&_&&"current"in _&&(_.current=B)}function mi(){for(var _=arguments.length,B=new Array(_),P=0;P<_;P++)B[P]=arguments[P];var j=B.filter(function(se){return se});return j.length<=1?j[0]:function(se){B.forEach(function(Ce){pn(Ce,se)})}}function Hn(){for(var _=arguments.length,B=new Array(_),P=0;P<_;P++)B[P]=arguments[P];return dn(function(){return mi.apply(void 0,B)},B,function(j,se){return j.length!==se.length||j.every(function(Ce,ve){return Ce!==se[ve]})})}function Wn(_){var B,P,j=(0,Ea.isMemo)(_)?_.type.type:_.type;return!(typeof j=="function"&&!((B=j.prototype)!==null&&B!==void 0&&B.render)||typeof _=="function"&&!((P=_.prototype)!==null&&P!==void 0&&P.render))}function Ci(_){return!isValidElement(_)||isFragment(_)?!1:Wn(_)}function Br(_,B,P,j){if(!B.length)return P;var se=_toArray(B),Ce=se[0],ve=se.slice(1),$e;return!_&&typeof Ce=="number"?$e=[]:Array.isArray(_)?$e=_toConsumableArray(_):$e=_objectSpread({},_),j&&P===void 0&&ve.length===1?delete $e[Ce][ve[0]]:$e[Ce]=Br($e[Ce],ve,P,j),$e}function He(_,B,P){var j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return B.length&&j&&P===void 0&&!get(_,B.slice(0,-1))?_:Br(_,B,P,j)}function Zi(_){return _typeof(_)==="object"&&_!==null&&Object.getPrototypeOf(_)===Object.prototype}function wo(_){return Array.isArray(_)?[]:{}}var Ei=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function zo(){for(var _=arguments.length,B=new Array(_),P=0;P<_;P++)B[P]=arguments[P];var j=wo(B[0]);return B.forEach(function(se){function Ce(ve,$e){var ut=new Set($e),rt=get(se,ve),Pt=Array.isArray(rt);if(Pt||Zi(rt)){if(!ut.has(rt)){ut.add(rt);var dt=get(j,ve);Pt?j=He(j,ve,[]):(!dt||_typeof(dt)!=="object")&&(j=He(j,ve,wo(rt))),Ei(rt).forEach(function(tr){Ce([].concat(_toConsumableArray(ve),[tr]),ut)})}}else j=He(j,ve,rt)}Ce([])}),j}var uo={},Io=[],So=function(B){Io.push(B)};function ks(_,B){if(0)var P}function vs(_,B){if(0)var P}function Xo(){uo={}}function ka(_,B,P){!B&&!uo[P]&&(_(!1,P),uo[P]=!0)}function Bn(_,B){ka(ks,_,B)}function ti(_,B){ka(vs,_,B)}Bn.preMessage=So,Bn.resetWarned=Xo,Bn.noteOnce=ti;var fo=null,Ko=function(B){return+setTimeout(B,16)},To=function(B){return clearTimeout(B)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ko=function(B){return window.requestAnimationFrame(B)},To=function(B){return window.cancelAnimationFrame(B)});var Jo=0,Yi=new Map;function pa(_){Yi.delete(_)}var Rs=function(B){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Jo+=1;var j=Jo;function se(Ce){if(Ce===0)pa(j),B();else{var ve=Ko(function(){se(Ce-1)});Yi.set(j,ve)}}return se(P),j};Rs.cancel=function(_){var B=Yi.get(_);return pa(B),To(B)};var As=Rs;function Ds(_,B,P,j,se,Ce,ve,$e){var ut=x.useRef(_),rt=x.useRef(!1);ut.current!==_&&(rt.current=!0,ut.current=_),x.useEffect(function(){var Pt=As(function(){rt.current=!1});return function(){As.cancel(Pt)}},[_]),x.useEffect(function(){if(B&&j&&(!se||Ce)){var Pt=function(){var hn=!1,Nr=function(Xn){var sn=Xn.target;hn=ve(sn)},Aa=function(Xn){var sn=Xn.target;!rt.current&&ut.current&&!hn&&!ve(sn)&&$e(!1)};return[Nr,Aa]},dt=Pt(),tr=(0,C.Z)(dt,2),qt=tr[0],Zt=tr[1],fn=Pt(),zr=(0,C.Z)(fn,2),Sn=zr[0],Zr=zr[1],Mr=Lo(j);Mr.addEventListener("mousedown",qt,!0),Mr.addEventListener("click",Zt,!0),Mr.addEventListener("contextmenu",Zt,!0);var Yt=Dr(P);if(Yt&&(Yt.addEventListener("mousedown",Sn,!0),Yt.addEventListener("click",Zr,!0),Yt.addEventListener("contextmenu",Zr,!0)),0)var ba,ia,ya,Va;return function(){Mr.removeEventListener("mousedown",qt,!0),Mr.removeEventListener("click",Zt,!0),Mr.removeEventListener("contextmenu",Zt,!0),Yt&&(Yt.removeEventListener("mousedown",Sn,!0),Yt.removeEventListener("click",Zr,!0),Yt.removeEventListener("contextmenu",Zr,!0))}}},[B,P,j,se,Ce])}function Nn(_){return _ instanceof HTMLElement||_ instanceof SVGElement}function yl(_){return Nn(_)?_:_ instanceof x.Component?Ke.findDOMNode(_):null}function ri(_,B){var P={};return P[_.toLowerCase()]=B.toLowerCase(),P["Webkit".concat(_)]="webkit".concat(B),P["Moz".concat(_)]="moz".concat(B),P["ms".concat(_)]="MS".concat(B),P["O".concat(_)]="o".concat(B.toLowerCase()),P}function Ns(_,B){var P={animationend:ri("Animation","AnimationEnd"),transitionend:ri("Transition","TransitionEnd")};return _&&("AnimationEvent"in B||delete P.animationend.animation,"TransitionEvent"in B||delete P.transitionend.transition),P}var Yo=Ns(T(),typeof window!="undefined"?window:{}),li={};if(T()){var Ls=document.createElement("div");li=Ls.style}var Ho={};function Qo(_){if(Ho[_])return Ho[_];var B=Yo[_];if(B)for(var P=Object.keys(B),j=P.length,se=0;se<j;se+=1){var Ce=P[se];if(Object.prototype.hasOwnProperty.call(B,Ce)&&Ce in li)return Ho[_]=B[Ce],Ho[_]}return""}var Vi=Qo("animationend"),Wo=Qo("transitionend"),Bo=!!(Vi&&Wo),ho=Vi||"animationend",Qi=Wo||"transitionend";function sl(_,B){if(!_)return null;if((0,be.Z)(_)==="object"){var P=B.replace(/-\w/g,function(j){return j[1].toUpperCase()});return _[P]}return"".concat(_,"-").concat(B)}var eo="none",_o="appear",w="enter",D="leave",ne="none",ae="prepare",_e="start",Ie="active",at="end";function wt(_){var B=x.useRef(!1),P=x.useState(_),j=(0,C.Z)(P,2),se=j[0],Ce=j[1];x.useEffect(function(){return B.current=!1,function(){B.current=!0}},[]);function ve($e,ut){ut&&B.current||Ce($e)}return[se,ve]}var pr=function(B){return+setTimeout(B,16)},ur=function(B){return clearTimeout(B)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(pr=function(B){return window.requestAnimationFrame(B)},ur=function(B){return window.cancelAnimationFrame(B)});var qr=0,Wt=new Map;function kr(_){Wt.delete(_)}var Yr=function(B){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;qr+=1;var j=qr;function se(Ce){if(Ce===0)kr(j),B();else{var ve=pr(function(){se(Ce-1)});Wt.set(j,ve)}}return se(P),j};Yr.cancel=function(_){var B=Wt.get(_);return kr(B),ur(B)};var an=Yr,Zn=function(){var _=x.useRef(null);function B(){an.cancel(_.current)}function P(j){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;B();var Ce=an(function(){se<=1?j({isCanceled:function(){return Ce!==_.current}}):P(j,se-1)});_.current=Ce}return x.useEffect(function(){return function(){B()}},[]),[P,B]},qn=T()?x.useLayoutEffect:x.useEffect,Gt=qn,It=[ae,_e,Ie,at],Kt=!1,gr=!0;function en(_){return _===Ie||_===at}var Xr=function(_,B){var P=wt(ne),j=(0,C.Z)(P,2),se=j[0],Ce=j[1],ve=Zn(),$e=(0,C.Z)(ve,2),ut=$e[0],rt=$e[1];function Pt(){Ce(ae,!0)}return Gt(function(){if(se!==ne&&se!==at){var dt=It.indexOf(se),tr=It[dt+1],qt=B(se);qt===Kt?Ce(tr,!0):ut(function(Zt){function fn(){Zt.isCanceled()||Ce(tr,!0)}qt===!0?fn():Promise.resolve(qt).then(fn)})}},[_,se]),x.useEffect(function(){return function(){rt()}},[]),[Pt,se]},Vn=function(_){var B=(0,x.useRef)(),P=(0,x.useRef)(_);P.current=_;var j=x.useCallback(function(ve){P.current(ve)},[]);function se(ve){ve&&(ve.removeEventListener(Qi,j),ve.removeEventListener(ho,j))}function Ce(ve){B.current&&B.current!==ve&&se(B.current),ve&&ve!==B.current&&(ve.addEventListener(Qi,j),ve.addEventListener(ho,j),B.current=ve)}return x.useEffect(function(){return function(){se(B.current)}},[]),[Ce,se]};function na(_,B,P,j){var se=j.motionEnter,Ce=se===void 0?!0:se,ve=j.motionAppear,$e=ve===void 0?!0:ve,ut=j.motionLeave,rt=ut===void 0?!0:ut,Pt=j.motionDeadline,dt=j.motionLeaveImmediately,tr=j.onAppearPrepare,qt=j.onEnterPrepare,Zt=j.onLeavePrepare,fn=j.onAppearStart,zr=j.onEnterStart,Sn=j.onLeaveStart,Zr=j.onAppearActive,Mr=j.onEnterActive,Yt=j.onLeaveActive,ba=j.onAppearEnd,ia=j.onEnterEnd,ya=j.onLeaveEnd,Va=j.onVisibleChanged,on=wt(),hn=(0,C.Z)(on,2),Nr=hn[0],Aa=hn[1],Ga=wt(eo),Xn=(0,C.Z)(Ga,2),sn=Xn[0],On=Xn[1],Vr=wt(null),Ai=(0,C.Z)(Vr,2),Fn=Ai[0],oa=Ai[1],Co=(0,x.useRef)(!1),qa=(0,x.useRef)(null);function ci(){return P()}var Po=(0,x.useRef)(!1);function m(Dt){var We=ci();if(!(Dt&&!Dt.deadline&&Dt.target!==We)){var st=Po.current,Qt;sn===_o&&st?Qt=ba==null?void 0:ba(We,Dt):sn===w&&st?Qt=ia==null?void 0:ia(We,Dt):sn===D&&st&&(Qt=ya==null?void 0:ya(We,Dt)),sn!==eo&&st&&Qt!==!1&&(On(eo,!0),oa(null,!0))}}var M=Vn(m),A=(0,C.Z)(M,1),R=A[0],K=x.useMemo(function(){var Dt,We,st;switch(sn){case _o:return Dt={},(0,ee.Z)(Dt,ae,tr),(0,ee.Z)(Dt,_e,fn),(0,ee.Z)(Dt,Ie,Zr),Dt;case w:return We={},(0,ee.Z)(We,ae,qt),(0,ee.Z)(We,_e,zr),(0,ee.Z)(We,Ie,Mr),We;case D:return st={},(0,ee.Z)(st,ae,Zt),(0,ee.Z)(st,_e,Sn),(0,ee.Z)(st,Ie,Yt),st;default:return{}}},[sn]),ie=Xr(sn,function(Dt){if(Dt===ae){var We=K[ae];return We?We(ci()):Kt}if(qe in K){var st;oa(((st=K[qe])===null||st===void 0?void 0:st.call(K,ci(),null))||null)}return qe===Ie&&(R(ci()),Pt>0&&(clearTimeout(qa.current),qa.current=setTimeout(function(){m({deadline:!0})},Pt))),gr}),oe=(0,C.Z)(ie,2),Ge=oe[0],qe=oe[1],Qe=en(qe);Po.current=Qe,Gt(function(){Aa(B);var Dt=Co.current;if(Co.current=!0,!!_){var We;!Dt&&B&&$e&&(We=_o),Dt&&B&&Ce&&(We=w),(Dt&&!B&&rt||!Dt&&dt&&!B&&rt)&&(We=D),We&&(On(We),Ge())}},[B]),(0,x.useEffect)(function(){(sn===_o&&!$e||sn===w&&!Ce||sn===D&&!rt)&&On(eo)},[$e,Ce,rt]),(0,x.useEffect)(function(){return function(){Co.current=!1,clearTimeout(qa.current)}},[]);var Ot=x.useRef(!1);(0,x.useEffect)(function(){Nr&&(Ot.current=!0),Nr!==void 0&&sn===eo&&((Ot.current||Nr)&&(Va==null||Va(Nr)),Ot.current=!0)},[Nr,sn]);var kt=Fn;return K[ae]&&qe===_e&&(kt=(0,fe.Z)({transition:"none"},kt)),[sn,qe,kt,Nr!=null?Nr:B]}var tn=y(15671),bn=y(43144),ma=y(60136),Fr=y(51630),aa=function(_){(0,ma.Z)(P,_);var B=(0,Fr.Z)(P);function P(){return(0,tn.Z)(this,P),B.apply(this,arguments)}return(0,bn.Z)(P,[{key:"render",value:function(){return this.props.children}}]),P}(x.Component),kn=aa;function va(_){var B=_;(0,be.Z)(_)==="object"&&(B=_.transitionSupport);function P(se){return!!(se.motionName&&B)}var j=x.forwardRef(function(se,Ce){var ve=se.visible,$e=ve===void 0?!0:ve,ut=se.removeOnLeave,rt=ut===void 0?!0:ut,Pt=se.forceRender,dt=se.children,tr=se.motionName,qt=se.leavedClassName,Zt=se.eventProps,fn=P(se),zr=(0,x.useRef)(),Sn=(0,x.useRef)();function Zr(){try{return zr.current instanceof HTMLElement?zr.current:yl(Sn.current)}catch(Vr){return null}}var Mr=na(fn,$e,Zr,se),Yt=(0,C.Z)(Mr,4),ba=Yt[0],ia=Yt[1],ya=Yt[2],Va=Yt[3],on=x.useRef(Va);Va&&(on.current=!0);var hn=x.useCallback(function(Vr){zr.current=Vr,ue(Ce,Vr)},[Ce]),Nr,Aa=(0,fe.Z)((0,fe.Z)({},Zt),{},{visible:$e});if(!dt)Nr=null;else if(ba===eo||!P(se))Va?Nr=dt((0,fe.Z)({},Aa),hn):!rt&&on.current&&qt?Nr=dt((0,fe.Z)((0,fe.Z)({},Aa),{},{className:qt}),hn):Pt||!rt&&!qt?Nr=dt((0,fe.Z)((0,fe.Z)({},Aa),{},{style:{display:"none"}}),hn):Nr=null;else{var Ga,Xn;ia===ae?Xn="prepare":en(ia)?Xn="active":ia===_e&&(Xn="start"),Nr=dt((0,fe.Z)((0,fe.Z)({},Aa),{},{className:G()(sl(tr,ba),(Ga={},(0,ee.Z)(Ga,sl(tr,"".concat(ba,"-").concat(Xn)),Xn),(0,ee.Z)(Ga,tr,typeof tr=="string"),Ga)),style:ya}),hn)}if(x.isValidElement(Nr)&&mt(Nr)){var sn=Nr,On=sn.ref;On||(Nr=x.cloneElement(Nr,{ref:hn}))}return x.createElement(kn,{ref:Sn},Nr)});return j.displayName="CSSMotion",j}var Ui=va(Bo),es=y(97326),Pa="add",vi="keep",ji="remove",Zo="removed";function Pn(_){var B;return _&&(0,be.Z)(_)==="object"&&"key"in _?B=_:B={key:_},(0,fe.Z)((0,fe.Z)({},B),{},{key:String(B.key)})}function ga(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return _.map(Pn)}function po(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],P=[],j=0,se=B.length,Ce=ga(_),ve=ga(B);Ce.forEach(function(rt){for(var Pt=!1,dt=j;dt<se;dt+=1){var tr=ve[dt];if(tr.key===rt.key){j<dt&&(P=P.concat(ve.slice(j,dt).map(function(qt){return(0,fe.Z)((0,fe.Z)({},qt),{},{status:Pa})})),j=dt),P.push((0,fe.Z)((0,fe.Z)({},tr),{},{status:vi})),j+=1,Pt=!0;break}}Pt||P.push((0,fe.Z)((0,fe.Z)({},rt),{},{status:ji}))}),j<se&&(P=P.concat(ve.slice(j).map(function(rt){return(0,fe.Z)((0,fe.Z)({},rt),{},{status:Pa})})));var $e={};P.forEach(function(rt){var Pt=rt.key;$e[Pt]=($e[Pt]||0)+1});var ut=Object.keys($e).filter(function(rt){return $e[rt]>1});return ut.forEach(function(rt){P=P.filter(function(Pt){var dt=Pt.key,tr=Pt.status;return dt!==rt||tr!==ji}),P.forEach(function(Pt){Pt.key===rt&&(Pt.status=vi)})}),P}var ki=["component","children","onVisibleChanged","onAllRemoved"],Wa=["status"],Gi=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ni(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ui,P=function(j){(0,ma.Z)(Ce,j);var se=(0,Fr.Z)(Ce);function Ce(){var ve;(0,tn.Z)(this,Ce);for(var $e=arguments.length,ut=new Array($e),rt=0;rt<$e;rt++)ut[rt]=arguments[rt];return ve=se.call.apply(se,[this].concat(ut)),(0,ee.Z)((0,es.Z)(ve),"state",{keyEntities:[]}),(0,ee.Z)((0,es.Z)(ve),"removeKey",function(Pt){var dt=ve.state.keyEntities,tr=dt.map(function(qt){return qt.key!==Pt?qt:(0,fe.Z)((0,fe.Z)({},qt),{},{status:Zo})});return ve.setState({keyEntities:tr}),tr.filter(function(qt){var Zt=qt.status;return Zt!==Zo}).length}),ve}return(0,bn.Z)(Ce,[{key:"render",value:function(){var $e=this,ut=this.state.keyEntities,rt=this.props,Pt=rt.component,dt=rt.children,tr=rt.onVisibleChanged,qt=rt.onAllRemoved,Zt=(0,p.Z)(rt,ki),fn=Pt||x.Fragment,zr={};return Gi.forEach(function(Sn){zr[Sn]=Zt[Sn],delete Zt[Sn]}),delete Zt.keys,x.createElement(fn,Zt,ut.map(function(Sn){var Zr=Sn.status,Mr=(0,p.Z)(Sn,Wa),Yt=Zr===Pa||Zr===vi;return x.createElement(B,(0,X.Z)({},zr,{key:Mr.key,visible:Yt,eventProps:Mr,onVisibleChanged:function(ia){if(tr==null||tr(ia,{key:Mr.key}),!ia){var ya=$e.removeKey(Mr.key);ya===0&&qt&&qt()}}}),dt)}))}}],[{key:"getDerivedStateFromProps",value:function($e,ut){var rt=$e.keys,Pt=ut.keyEntities,dt=ga(rt),tr=po(Pt,dt);return{keyEntities:tr.filter(function(qt){var Zt=Pt.find(function(fn){var zr=fn.key;return qt.key===zr});return!(Zt&&Zt.status===Zo&&qt.status===ji)})}}}]),Ce}(x.Component);return(0,ee.Z)(P,"defaultProps",{component:"div"}),P}var gs=ni(Bo),bs=Ui;function Xs(_){var B=_.prefixCls,P=_.align,j=_.arrow,se=_.arrowPos,Ce=j||{},ve=Ce.className,$e=Ce.content,ut=se.x,rt=ut===void 0?0:ut,Pt=se.y,dt=Pt===void 0?0:Pt,tr=x.useRef();if(!P||!P.points)return null;var qt={position:"absolute"};if(P.autoArrow!==!1){var Zt=P.points[0],fn=P.points[1],zr=Zt[0],Sn=Zt[1],Zr=fn[0],Mr=fn[1];zr===Zr||!["t","b"].includes(zr)?qt.top=dt:zr==="t"?qt.top=0:qt.bottom=0,Sn===Mr||!["l","r"].includes(Sn)?qt.left=rt:Sn==="l"?qt.left=0:qt.right=0}return x.createElement("div",{ref:tr,className:G()("".concat(B,"-arrow"),ve),style:qt},$e)}function Js(_){var B=_.prefixCls,P=_.open,j=_.zIndex,se=_.mask,Ce=_.motion;return se?x.createElement(bs,(0,X.Z)({},Ce,{motionAppear:!0,visible:P,removeOnLeave:!0}),function(ve){var $e=ve.className;return x.createElement("div",{style:{zIndex:j},className:G()("".concat(B,"-mask"),$e)})}):null}var Ul=x.memo(function(_){var B=_.children;return B},function(_,B){return B.cache}),Ni=Ul,Pl=x.forwardRef(function(_,B){var P=_.popup,j=_.className,se=_.prefixCls,Ce=_.style,ve=_.target,$e=_.onVisibleChanged,ut=_.open,rt=_.keepDom,Pt=_.fresh,dt=_.onClick,tr=_.mask,qt=_.arrow,Zt=_.arrowPos,fn=_.align,zr=_.motion,Sn=_.maskMotion,Zr=_.forceRender,Mr=_.getPopupContainer,Yt=_.autoDestroy,ba=_.portal,ia=_.zIndex,ya=_.onMouseEnter,Va=_.onMouseLeave,on=_.onPointerEnter,hn=_.ready,Nr=_.offsetX,Aa=_.offsetY,Ga=_.offsetR,Xn=_.offsetB,sn=_.onAlign,On=_.onPrepare,Vr=_.stretch,Ai=_.targetWidth,Fn=_.targetHeight,oa=typeof P=="function"?P():P,Co=ut||rt,qa=(Mr==null?void 0:Mr.length)>0,ci=x.useState(!Mr||!qa),Po=(0,C.Z)(ci,2),m=Po[0],M=Po[1];if(Jt(function(){!m&&qa&&ve&&M(!0)},[m,qa,ve]),!m)return null;var A="auto",R={left:"-1000vw",top:"-1000vh",right:A,bottom:A};if(hn||!ut){var K,ie=fn.points,oe=fn.dynamicInset||((K=fn._experimental)===null||K===void 0?void 0:K.dynamicInset),Ge=oe&&ie[0][1]==="r",qe=oe&&ie[0][0]==="b";Ge?(R.right=Ga,R.left=A):(R.left=Nr,R.right=A),qe?(R.bottom=Xn,R.top=A):(R.top=Aa,R.bottom=A)}var Qe={};return Vr&&(Vr.includes("height")&&Fn?Qe.height=Fn:Vr.includes("minHeight")&&Fn&&(Qe.minHeight=Fn),Vr.includes("width")&&Ai?Qe.width=Ai:Vr.includes("minWidth")&&Ai&&(Qe.minWidth=Ai)),ut||(Qe.pointerEvents="none"),x.createElement(ba,{open:Zr||Co,getContainer:Mr&&function(){return Mr(ve)},autoDestroy:Yt},x.createElement(Js,{prefixCls:se,open:ut,zIndex:ia,mask:tr,motion:Sn}),x.createElement(nr.Z,{onResize:sn,disabled:!ut},function(Ot){return x.createElement(bs,(0,X.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Zr,leavedClassName:"".concat(se,"-hidden")},zr,{onAppearPrepare:On,onEnterPrepare:On,visible:ut,onVisibleChanged:function(Dt){var We;zr==null||(We=zr.onVisibleChanged)===null||We===void 0||We.call(zr,Dt),$e(Dt)}}),function(kt,Dt){var We=kt.className,st=kt.style,Qt=G()(se,We,j);return x.createElement("div",{ref:mi(Ot,B,Dt),className:Qt,style:(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({"--arrow-x":"".concat(Zt.x||0,"px"),"--arrow-y":"".concat(Zt.y||0,"px")},R),Qe),st),{},{boxSizing:"border-box",zIndex:ia},Ce),onMouseEnter:ya,onMouseLeave:Va,onPointerEnter:on,onClick:dt},qt&&x.createElement(Xs,{prefixCls:se,arrow:qt,arrowPos:Zt,align:fn}),x.createElement(Ni,{cache:!ut&&!Pt},oa))})}))}),Za=Pl,Mo=x.forwardRef(function(_,B){var P=_.children,j=_.getTriggerDOMNode,se=Wn(P),Ce=x.useCallback(function($e){pn(B,j?j($e):$e)},[j]),ve=Hn(Ce,P.ref);return se?x.cloneElement(P,{ref:ve}):P}),os=Mo,mo=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Ys(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:je,B=x.forwardRef(function(P,j){var se=P.prefixCls,Ce=se===void 0?"rc-trigger-popup":se,ve=P.children,$e=P.action,ut=$e===void 0?"hover":$e,rt=P.showAction,Pt=P.hideAction,dt=P.popupVisible,tr=P.defaultPopupVisible,qt=P.onPopupVisibleChange,Zt=P.afterPopupVisibleChange,fn=P.mouseEnterDelay,zr=P.mouseLeaveDelay,Sn=zr===void 0?.1:zr,Zr=P.focusDelay,Mr=P.blurDelay,Yt=P.mask,ba=P.maskClosable,ia=ba===void 0?!0:ba,ya=P.getPopupContainer,Va=P.forceRender,on=P.autoDestroy,hn=P.destroyPopupOnHide,Nr=P.popup,Aa=P.popupClassName,Ga=P.popupStyle,Xn=P.popupPlacement,sn=P.builtinPlacements,On=sn===void 0?{}:sn,Vr=P.popupAlign,Ai=P.zIndex,Fn=P.stretch,oa=P.getPopupClassNameFromAlign,Co=P.fresh,qa=P.alignPoint,ci=P.onPopupClick,Po=P.onPopupAlign,m=P.arrow,M=P.popupMotion,A=P.maskMotion,R=P.popupTransitionName,K=P.popupAnimation,ie=P.maskTransitionName,oe=P.maskAnimation,Ge=P.className,qe=P.getTriggerDOMNode,Qe=(0,p.Z)(P,mo),Ot=on||hn||!1,kt=x.useState(!1),Dt=(0,C.Z)(kt,2),We=Dt[0],st=Dt[1];Jt(function(){st(Do())},[]);var Qt=x.useRef({}),Ft=x.useContext(co),Sr=x.useMemo(function(){return{registerSubPopup:function(Jr,ha){Qt.current[Jr]=ha,Ft==null||Ft.registerSubPopup(Jr,ha)}}},[Ft]),er=Pi(),Ut=x.useState(null),ft=(0,C.Z)(Ut,2),sr=ft[0],Ar=ft[1],Pr=gn(function(rr){lr(rr)&&sr!==rr&&Ar(rr),Ft==null||Ft.registerSubPopup(er,rr)}),Cr=x.useState(null),ua=(0,C.Z)(Cr,2),Lr=ua[0],Jn=ua[1],$n=gn(function(rr){lr(rr)&&Lr!==rr&&Jn(rr)}),mn=x.Children.only(ve),rn=(mn==null?void 0:mn.props)||{},Tr={},ln=gn(function(rr){var Jr,ha,Xt=Lr;return(Xt==null?void 0:Xt.contains(rr))||((Jr=Dr(Xt))===null||Jr===void 0?void 0:Jr.host)===rr||rr===Xt||(sr==null?void 0:sr.contains(rr))||((ha=Dr(sr))===null||ha===void 0?void 0:ha.host)===rr||rr===sr||Object.values(Qt.current).some(function(Er){return(Er==null?void 0:Er.contains(rr))||rr===Er})}),vr=ms(Ce,M,K,R),vn=ms(Ce,A,oe,ie),_n=x.useState(tr||!1),xa=(0,C.Z)(_n,2),$a=xa[0],Kr=xa[1],$r=dt!=null?dt:$a,Da=gn(function(rr){dt===void 0&&Kr(rr)});Jt(function(){Kr(dt||!1)},[dt]);var da=x.useRef($r);da.current=$r;var Ra=gn(function(rr){(0,Ke.flushSync)(function(){$r!==rr&&(Da(rr),qt==null||qt(rr))})}),An=x.useRef(),Dn=function(){clearTimeout(An.current)},Yn=function(Jr){var ha=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Dn(),ha===0?Ra(Jr):An.current=setTimeout(function(){Ra(Jr)},ha*1e3)};x.useEffect(function(){return Dn},[]);var Xa=x.useState(!1),La=(0,C.Z)(Xa,2),Ln=La[0],Na=La[1];Jt(function(rr){(!rr||$r)&&Na(!0)},[$r]);var ai=x.useState(null),ui=(0,C.Z)(ai,2),Qn=ui[0],bi=ui[1],Rr=x.useState([0,0]),Oi=(0,C.Z)(Rr,2),Ja=Oi[0],di=Oi[1],fi=function(Jr){di([Jr.clientX,Jr.clientY])},Ya=Cn($r,sr,qa?Ja:Lr,Xn,On,Vr,Po),hi=(0,C.Z)(Ya,11),yi=hi[0],Un=hi[1],Eo=hi[2],Oa=hi[3],Ia=hi[4],pi=hi[5],Fa=hi[6],Uo=hi[7],Ta=hi[8],Xi=hi[9],xi=hi[10],jn=ta(We,ut,rt,Pt),nt=(0,C.Z)(jn,2),In=nt[0],wa=nt[1],ro=In.has("click"),fa=wa.has("click")||wa.has("contextMenu"),Ua=gn(function(){Ln||xi()}),sa=function(){da.current&&qa&&fa&&Yn(!1)};jr($r,Lr,sr,Ua,sa),Jt(function(){Ua()},[Ja,Xn]),Jt(function(){$r&&!(On!=null&&On[Xn])&&Ua()},[JSON.stringify(Vr)]);var zn=x.useMemo(function(){var rr=qs(On,Ce,Xi,qa);return G()(rr,oa==null?void 0:oa(Xi))},[Xi,oa,On,Ce,qa]);x.useImperativeHandle(j,function(){return{forceAlign:Ua}});var Sa=x.useState(0),Ji=(0,C.Z)(Sa,2),Ht=Ji[0],Hr=Ji[1],Rn=x.useState(0),Di=(0,C.Z)(Rn,2),za=Di[0],cs=Di[1],Ts=function(){if(Fn&&Lr){var Jr=Lr.getBoundingClientRect();Hr(Jr.width),cs(Jr.height)}},jo=function(){Ts(),Ua()},ys=function(Jr){Na(!1),xi(),Zt==null||Zt(Jr)},Li=function(){return new Promise(function(Jr){Ts(),bi(function(){return Jr})})};Jt(function(){Qn&&(xi(),Qn(),bi(null))},[Qn]);function Fi(rr,Jr,ha,Xt){Tr[rr]=function(Er){var ts;Xt==null||Xt(Er),Yn(Jr,ha);for(var Bs=arguments.length,ao=new Array(Bs>1?Bs-1:0),ws=1;ws<Bs;ws++)ao[ws-1]=arguments[ws];(ts=rn[rr])===null||ts===void 0||ts.call.apply(ts,[rn,Er].concat(ao))}}(ro||fa)&&(Tr.onClick=function(rr){var Jr;da.current&&fa?Yn(!1):!da.current&&ro&&(fi(rr),Yn(!0));for(var ha=arguments.length,Xt=new Array(ha>1?ha-1:0),Er=1;Er<ha;Er++)Xt[Er-1]=arguments[Er];(Jr=rn.onClick)===null||Jr===void 0||Jr.call.apply(Jr,[rn,rr].concat(Xt))}),Ds($r,fa,Lr,sr,Yt,ia,ln,Yn);var no=In.has("hover"),Ii=wa.has("hover"),$o,Go;no&&(Fi("onMouseEnter",!0,fn,function(rr){fi(rr)}),Fi("onPointerEnter",!0,fn,function(rr){fi(rr)}),$o=function(){($r||Ln)&&Yn(!0,fn)},qa&&(Tr.onMouseMove=function(rr){var Jr;(Jr=rn.onMouseMove)===null||Jr===void 0||Jr.call(rn,rr)})),Ii&&(Fi("onMouseLeave",!1,Sn),Fi("onPointerLeave",!1,Sn),Go=function(){Yn(!1,Sn)}),In.has("focus")&&Fi("onFocus",!0,Zr),wa.has("focus")&&Fi("onBlur",!1,Mr),In.has("contextMenu")&&(Tr.onContextMenu=function(rr){var Jr;da.current&&wa.has("contextMenu")?Yn(!1):(fi(rr),Yn(!0)),rr.preventDefault();for(var ha=arguments.length,Xt=new Array(ha>1?ha-1:0),Er=1;Er<ha;Er++)Xt[Er-1]=arguments[Er];(Jr=rn.onContextMenu)===null||Jr===void 0||Jr.call.apply(Jr,[rn,rr].concat(Xt))}),Ge&&(Tr.className=G()(rn.className,Ge));var us=(0,fe.Z)((0,fe.Z)({},rn),Tr),Ro={},xs=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];xs.forEach(function(rr){Qe[rr]&&(Ro[rr]=function(){for(var Jr,ha=arguments.length,Xt=new Array(ha),Er=0;Er<ha;Er++)Xt[Er]=arguments[Er];(Jr=us[rr])===null||Jr===void 0||Jr.call.apply(Jr,[us].concat(Xt)),Qe[rr].apply(Qe,Xt)})});var Zs=x.cloneElement(mn,(0,fe.Z)((0,fe.Z)({},us),Ro)),zi={x:pi,y:Fa},rl=m?(0,fe.Z)({},m!==!0?m:{}):null;return x.createElement(x.Fragment,null,x.createElement(nr.Z,{disabled:!$r,ref:$n,onResize:jo},x.createElement(os,{getTriggerDOMNode:qe},Zs)),x.createElement(co.Provider,{value:Sr},x.createElement(Za,{portal:_,ref:Pr,prefixCls:Ce,popup:Nr,className:G()(Aa,zn),style:Ga,target:Lr,onMouseEnter:$o,onMouseLeave:Go,onPointerEnter:$o,zIndex:Ai,open:$r,keepDom:Ln,fresh:Co,onClick:ci,mask:Yt,motion:vr,maskMotion:vn,onVisibleChanged:ys,onPrepare:Li,forceRender:Va,autoDestroy:Ot,getPopupContainer:ya,align:Xi,arrow:rl,arrowPos:zi,ready:yi,offsetX:Un,offsetY:Eo,offsetR:Oa,offsetB:Ia,onAlign:Ua,stretch:Fn,targetWidth:Ht/Uo,targetHeight:za/Ta})))});return B}var ss=Ys(je),br={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(B){var P=B.keyCode;if(B.altKey&&!B.ctrlKey||B.metaKey||P>=br.F1&&P<=br.F12)return!1;switch(P){case br.ALT:case br.CAPS_LOCK:case br.CONTEXT_MENU:case br.CTRL:case br.DOWN:case br.END:case br.ESC:case br.HOME:case br.INSERT:case br.LEFT:case br.MAC_FF_META:case br.META:case br.NUMLOCK:case br.NUM_CENTER:case br.PAGE_DOWN:case br.PAGE_UP:case br.PAUSE:case br.PRINT_SCREEN:case br.RIGHT:case br.SHIFT:case br.UP:case br.WIN_KEY:case br.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(B){if(B>=br.ZERO&&B<=br.NINE||B>=br.NUM_ZERO&&B<=br.NUM_MULTIPLY||B>=br.A&&B<=br.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&B===0)return!0;switch(B){case br.SPACE:case br.QUESTION_MARK:case br.NUM_PLUS:case br.NUM_MINUS:case br.NUM_PERIOD:case br.NUM_DIVISION:case br.SEMICOLON:case br.DASH:case br.EQUALS:case br.COMMA:case br.PERIOD:case br.SLASH:case br.APOSTROPHE:case br.SINGLE_QUOTE:case br.OPEN_SQUARE_BRACKET:case br.BACKSLASH:case br.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Qs=br,Os=Qs.ESC,ls=Qs.TAB;function to(_){var B=_.visible,P=_.triggerRef,j=_.onVisibleChange,se=_.autoFocus,Ce=_.overlayRef,ve=x.useRef(!1),$e=function(){if(B){var dt,tr;(dt=P.current)===null||dt===void 0||(tr=dt.focus)===null||tr===void 0||tr.call(dt),j==null||j(!1)}},ut=function(){var dt;return(dt=Ce.current)!==null&&dt!==void 0&&dt.focus?(Ce.current.focus(),ve.current=!0,!0):!1},rt=function(dt){switch(dt.keyCode){case Os:$e();break;case ls:{var tr=!1;ve.current||(tr=ut()),tr?dt.preventDefault():$e();break}}};x.useEffect(function(){return B?(window.addEventListener("keydown",rt),se&&an(ut,3),function(){window.removeEventListener("keydown",rt),ve.current=!1}):function(){ve.current=!1}},[B])}var ca=(0,x.forwardRef)(function(_,B){var P=_.overlay,j=_.arrow,se=_.prefixCls,Ce=(0,x.useMemo)(function(){var $e;return typeof P=="function"?$e=P():$e=P,$e},[P]),ve=Y(B,Ce==null?void 0:Ce.ref);return x.createElement(x.Fragment,null,j&&x.createElement("div",{className:"".concat(se,"-arrow")}),x.cloneElement(Ce,{ref:mt(Ce)?ve:void 0}))}),ll=ca,gi={adjustX:1,adjustY:1},qi=[0,0],Fs={topLeft:{points:["bl","tl"],overflow:gi,offset:[0,-4],targetOffset:qi},top:{points:["bc","tc"],overflow:gi,offset:[0,-4],targetOffset:qi},topRight:{points:["br","tr"],overflow:gi,offset:[0,-4],targetOffset:qi},bottomLeft:{points:["tl","bl"],overflow:gi,offset:[0,4],targetOffset:qi},bottom:{points:["tc","bc"],overflow:gi,offset:[0,4],targetOffset:qi},bottomRight:{points:["tr","br"],overflow:gi,offset:[0,4],targetOffset:qi}},xl=Fs,vo=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function zs(_,B){var P,j=_.arrow,se=j===void 0?!1:j,Ce=_.prefixCls,ve=Ce===void 0?"rc-dropdown":Ce,$e=_.transitionName,ut=_.animation,rt=_.align,Pt=_.placement,dt=Pt===void 0?"bottomLeft":Pt,tr=_.placements,qt=tr===void 0?xl:tr,Zt=_.getPopupContainer,fn=_.showAction,zr=_.hideAction,Sn=_.overlayClassName,Zr=_.overlayStyle,Mr=_.visible,Yt=_.trigger,ba=Yt===void 0?["hover"]:Yt,ia=_.autoFocus,ya=_.overlay,Va=_.children,on=_.onVisibleChange,hn=(0,p.Z)(_,vo),Nr=x.useState(),Aa=(0,C.Z)(Nr,2),Ga=Aa[0],Xn=Aa[1],sn="visible"in _?Mr:Ga,On=x.useRef(null),Vr=x.useRef(null),Ai=x.useRef(null);x.useImperativeHandle(B,function(){return On.current});var Fn=function(R){Xn(R),on==null||on(R)};to({visible:sn,triggerRef:Ai,onVisibleChange:Fn,autoFocus:ia,overlayRef:Vr});var oa=function(R){var K=_.onOverlayClick;Xn(!1),K&&K(R)},Co=function(){return x.createElement(ll,{ref:Vr,overlay:ya,prefixCls:ve,arrow:se})},qa=function(){return typeof ya=="function"?Co:Co()},ci=function(){var R=_.minOverlayWidthMatchTrigger,K=_.alignPoint;return"minOverlayWidthMatchTrigger"in _?R:!K},Po=function(){var R=_.openClassName;return R!==void 0?R:"".concat(ve,"-open")},m=x.cloneElement(Va,{className:G()((P=Va.props)===null||P===void 0?void 0:P.className,sn&&Po()),ref:mt(Va)?Y(Ai,Va.ref):void 0}),M=zr;return!M&&ba.indexOf("contextMenu")!==-1&&(M=["click"]),x.createElement(ss,(0,X.Z)({builtinPlacements:qt},hn,{prefixCls:ve,ref:On,popupClassName:G()(Sn,(0,ee.Z)({},"".concat(ve,"-show-arrow"),se)),popupStyle:Zr,action:ba,showAction:fn,hideAction:M,popupPlacement:dt,popupAlign:rt,popupTransitionName:$e,popupAnimation:ut,popupVisible:sn,stretch:ci()?"minWidth":"",popup:qa(),onPopupVisibleChange:Fn,onPopupClick:oa,getPopupContainer:Zt}),m)}var cl=x.forwardRef(zs),wl=cl,Sl=y(60276),_l=y(5663),Ks=y(10366),Vo=y(80636),jl=y(8745),el=y(96159),Gl=y(53124),ul=y(68508),Is=y(76529),ql=y(46605),Hs=y(66748);const Xl=null,Ml=_=>{const{menu:B,arrow:P,prefixCls:j,children:se,trigger:Ce,disabled:ve,dropdownRender:$e,getPopupContainer:ut,overlayClassName:rt,rootClassName:Pt,open:dt,onOpenChange:tr,visible:qt,onVisibleChange:Zt,mouseEnterDelay:fn=.15,mouseLeaveDelay:zr=.1,autoAdjustOverflow:Sn=!0,placement:Zr="",overlay:Mr,transitionName:Yt}=_,{getPopupContainer:ba,getPrefixCls:ia,direction:ya}=x.useContext(Gl.E_),Va=x.useMemo(()=>{const m=ia();return Yt!==void 0?Yt:Zr.includes("top")?`${m}-slide-down`:`${m}-slide-up`},[ia,Zr,Yt]),on=x.useMemo(()=>Zr?Zr.includes("Center")?Zr.slice(0,Zr.indexOf("Center")):Zr:ya==="rtl"?"bottomRight":"bottomLeft",[Zr,ya]),hn=ia("dropdown",j),[Nr,Aa]=(0,Hs.Z)(hn),[,Ga]=(0,ql.Z)(),Xn=x.Children.only(se),sn=(0,el.Tm)(Xn,{className:G()(`${hn}-trigger`,{[`${hn}-rtl`]:ya==="rtl"},Xn.props.className),disabled:ve}),On=ve?[]:Ce;let Vr;On&&On.includes("contextMenu")&&(Vr=!0);const[Ai,Fn]=(0,_l.Z)(!1,{value:dt!=null?dt:qt}),oa=(0,Sl.useEvent)(m=>{tr==null||tr(m),Zt==null||Zt(m),Fn(m)}),Co=G()(rt,Pt,Aa,{[`${hn}-rtl`]:ya==="rtl"}),qa=(0,Vo.Z)({arrowPointAtCenter:typeof P=="object"&&P.pointAtCenter,autoAdjustOverflow:Sn,offset:Ga.marginXXS,arrowWidth:P?Ga.sizePopupArrow:0,borderRadius:Ga.borderRadius}),ci=x.useCallback(()=>{Fn(!1)},[]),Po=()=>{let m;return B!=null&&B.items?m=x.createElement(ul.default,Object.assign({},B)):typeof Mr=="function"?m=Mr():m=Mr,$e&&(m=$e(m)),m=x.Children.only(typeof m=="string"?x.createElement("span",null,m):m),x.createElement(Is.J,{prefixCls:`${hn}-menu`,expandIcon:x.createElement("span",{className:`${hn}-menu-submenu-arrow`},x.createElement(ge.Z,{className:`${hn}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ci,validator:M=>{let{mode:A}=M}},m)};return Nr(x.createElement(wl,Object.assign({alignPoint:Vr},(0,Ks.Z)(_,["rootClassName"]),{mouseEnterDelay:fn,mouseLeaveDelay:zr,visible:Ai,builtinPlacements:qa,arrow:!!P,overlayClassName:Co,prefixCls:hn,getPopupContainer:ut||ba,transitionName:Va,trigger:On,overlay:Po,placement:on,onVisibleChange:oa}),sn))};function Ws(_){return Object.assign(Object.assign({},_),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const dl=(0,jl.Z)(Ml,"dropdown",_=>_,Ws),rc=_=>x.createElement(dl,Object.assign({},_),x.createElement("span",null));Ml._InternalPanelDoNotUseOrYouWillBeFired=rc;var tl=Ml},66748:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return Ke}});var x=y(14747),J=y(67771),ge=y(33297),ce=y(50438),G=y(97414),X=y(67968),ee=y(45503),p=T=>{const{componentCls:Be,menuCls:Ze,colorError:Mt,colorTextLightSolid:Ue}=T,H=`${Ze}-item`;return{[`${Be}, ${Be}-menu-submenu`]:{[`${Ze} ${H}`]:{[`&${H}-danger:not(${H}-disabled)`]:{color:Mt,"&:hover":{color:Ue,backgroundColor:Mt}}}}}};const fe=T=>{const{componentCls:Be,menuCls:Ze,zIndexPopup:Mt,dropdownArrowDistance:Ue,sizePopupArrow:H,antCls:Re,iconCls:xr,motionDurationMid:Oe,dropdownPaddingVertical:be,fontSize:O,dropdownEdgeChildPadding:V,colorTextDisabled:ue,fontSizeIcon:Y,controlPaddingHorizontal:et,colorBgElevated:mt}=T;return[{[Be]:Object.assign(Object.assign({},(0,x.Wf)(T)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Mt,display:"block","&::before":{position:"absolute",insetBlock:-Ue+H/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${Re}-btn`]:{[`& > ${xr}-down, & > ${Re}-btn-icon > ${xr}-down`]:{fontSize:Y}},[`${Be}-wrap`]:{position:"relative",[`${Re}-btn > ${xr}-down`]:{fontSize:Y},[`${xr}-down::before`]:{transition:`transform ${Oe}`}},[`${Be}-wrap-open`]:{[`${xr}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Re}-slide-down-enter${Re}-slide-down-enter-active${Be}-placement-bottomLeft,
|
|
|
&${Re}-slide-down-appear${Re}-slide-down-appear-active${Be}-placement-bottomLeft,
|
|
|
&${Re}-slide-down-enter${Re}-slide-down-enter-active${Be}-placement-bottom,
|
|
|
&${Re}-slide-down-appear${Re}-slide-down-appear-active${Be}-placement-bottom,
|
|
|
&${Re}-slide-down-enter${Re}-slide-down-enter-active${Be}-placement-bottomRight,
|
|
|
&${Re}-slide-down-appear${Re}-slide-down-appear-active${Be}-placement-bottomRight`]:{animationName:J.fJ},[`&${Re}-slide-up-enter${Re}-slide-up-enter-active${Be}-placement-topLeft,
|
|
|
&${Re}-slide-up-appear${Re}-slide-up-appear-active${Be}-placement-topLeft,
|
|
|
&${Re}-slide-up-enter${Re}-slide-up-enter-active${Be}-placement-top,
|
|
|
&${Re}-slide-up-appear${Re}-slide-up-appear-active${Be}-placement-top,
|
|
|
&${Re}-slide-up-enter${Re}-slide-up-enter-active${Be}-placement-topRight,
|
|
|
&${Re}-slide-up-appear${Re}-slide-up-appear-active${Be}-placement-topRight`]:{animationName:J.Qt},[`&${Re}-slide-down-leave${Re}-slide-down-leave-active${Be}-placement-bottomLeft,
|
|
|
&${Re}-slide-down-leave${Re}-slide-down-leave-active${Be}-placement-bottom,
|
|
|
&${Re}-slide-down-leave${Re}-slide-down-leave-active${Be}-placement-bottomRight`]:{animationName:J.Uw},[`&${Re}-slide-up-leave${Re}-slide-up-leave-active${Be}-placement-topLeft,
|
|
|
&${Re}-slide-up-leave${Re}-slide-up-leave-active${Be}-placement-top,
|
|
|
&${Re}-slide-up-leave${Re}-slide-up-leave-active${Be}-placement-topRight`]:{animationName:J.ly}})},(0,G.ZP)(T,{colorBg:mt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${Be} ${Ze}`]:{position:"relative",margin:0},[`${Ze}-submenu-popup`]:{position:"absolute",zIndex:Mt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Be}, ${Be}-menu-submenu`]:{[Ze]:Object.assign(Object.assign({padding:V,listStyleType:"none",backgroundColor:mt,backgroundClip:"padding-box",borderRadius:T.borderRadiusLG,outline:"none",boxShadow:T.boxShadowSecondary},(0,x.Qy)(T)),{[`${Ze}-item-group-title`]:{padding:`${be}px ${et}px`,color:T.colorTextDescription,transition:`all ${Oe}`},[`${Ze}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ze}-item-icon`]:{minWidth:O,marginInlineEnd:T.marginXS,fontSize:T.fontSizeSM},[`${Ze}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Oe}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ze}-item, ${Ze}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${be}px ${et}px`,color:T.colorText,fontWeight:"normal",fontSize:O,lineHeight:T.lineHeight,cursor:"pointer",transition:`all ${Oe}`,borderRadius:T.borderRadiusSM,"&:hover, &-active":{backgroundColor:T.controlItemBgHover}},(0,x.Qy)(T)),{"&-selected":{color:T.colorPrimary,backgroundColor:T.controlItemBgActive,"&:hover, &-active":{backgroundColor:T.controlItemBgActiveHover}},"&-disabled":{color:ue,cursor:"not-allowed","&:hover":{color:ue,backgroundColor:mt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${T.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:T.colorSplit},[`${Be}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:T.paddingXS,[`${Be}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:T.colorTextDescription,fontSize:Y,fontStyle:"normal"}}}),[`${Ze}-item-group-list`]:{margin:`0 ${T.marginXS}px`,padding:0,listStyle:"none"},[`${Ze}-submenu-title`]:{paddingInlineEnd:et+T.fontSizeSM},[`${Ze}-submenu-vertical`]:{position:"relative"},[`${Ze}-submenu${Ze}-submenu-disabled ${Be}-menu-submenu-title`]:{[`&, ${Be}-menu-submenu-arrow-icon`]:{color:ue,backgroundColor:mt,cursor:"not-allowed"}},[`${Ze}-submenu-selected ${Be}-menu-submenu-title`]:{color:T.colorPrimary}})}},[(0,J.oN)(T,"slide-up"),(0,J.oN)(T,"slide-down"),(0,ge.Fm)(T,"move-up"),(0,ge.Fm)(T,"move-down"),(0,ce._y)(T,"zoom-big")]]};var Ke=(0,X.Z)("Dropdown",(T,Be)=>{let{rootPrefixCls:Ze}=Be;const{marginXXS:Mt,sizePopupArrow:Ue,controlHeight:H,fontSize:Re,lineHeight:xr,paddingXXS:Oe,componentCls:be,borderRadiusLG:O}=T,V=(H-Re*xr)/2,{dropdownArrowOffset:ue}=(0,G.fS)({contentRadius:O}),Y=(0,ee.TS)(T,{menuCls:`${be}-menu`,rootPrefixCls:Ze,dropdownArrowDistance:Ue/2+Mt,dropdownArrowOffset:ue,dropdownPaddingVertical:V,dropdownEdgeChildPadding:Oe});return[fe(Y),p(Y)]},T=>({zIndexPopup:T.zIndexPopupBase+50}))},31795:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return Ri}});var x=y(42922),J=y(53978),ge=y(94184),ce=y.n(ge),G=y(87462),X=y(4942),ee=y(71002),C=y(97685),p=y(45987),fe=y(15671),Ke=y(43144);function T(){return typeof BigInt=="function"}function Be(U){return!U&&U!==0&&!Number.isNaN(U)||!String(U).trim()}function Ze(U){var Q=U.trim(),Se=Q.startsWith("-");Se&&(Q=Q.slice(1)),Q=Q.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Q.startsWith(".")&&(Q="0".concat(Q));var Ye=Q||"0",Ct=Ye.split("."),Nt=Ct[0]||"0",Cn=Ct[1]||"0";Nt==="0"&&Cn==="0"&&(Se=!1);var jr=Se?"-":"";return{negative:Se,negativeStr:jr,trimStr:Ye,integerStr:Nt,decimalStr:Cn,fullStr:"".concat(jr).concat(Ye)}}function Mt(U){var Q=String(U);return!Number.isNaN(Number(Q))&&Q.includes("e")}function Ue(U){var Q=String(U);if(Mt(U)){var Se=Number(Q.slice(Q.indexOf("e-")+2)),Ye=Q.match(/\.(\d+)/);return Ye!=null&&Ye[1]&&(Se+=Ye[1].length),Se}return Q.includes(".")&&Re(Q)?Q.length-Q.indexOf(".")-1:0}function H(U){var Q=String(U);if(Mt(U)){if(U>Number.MAX_SAFE_INTEGER)return String(T()?BigInt(U).toString():Number.MAX_SAFE_INTEGER);if(U<Number.MIN_SAFE_INTEGER)return String(T()?BigInt(U).toString():Number.MIN_SAFE_INTEGER);Q=U.toFixed(Ue(Q))}return Ze(Q).fullStr}function Re(U){return typeof U=="number"?!Number.isNaN(U):U?/^\s*-?\d+(\.\d+)?\s*$/.test(U)||/^\s*-?\d+\.\s*$/.test(U)||/^\s*-?\.\d+\s*$/.test(U):!1}var xr=function(){function U(Q){if((0,fe.Z)(this,U),(0,X.Z)(this,"origin",""),(0,X.Z)(this,"negative",void 0),(0,X.Z)(this,"integer",void 0),(0,X.Z)(this,"decimal",void 0),(0,X.Z)(this,"decimalLen",void 0),(0,X.Z)(this,"empty",void 0),(0,X.Z)(this,"nan",void 0),Be(Q)){this.empty=!0;return}if(this.origin=String(Q),Q==="-"||Number.isNaN(Q)){this.nan=!0;return}var Se=Q;if(Mt(Se)&&(Se=Number(Se)),Se=typeof Se=="string"?Se:H(Se),Re(Se)){var Ye=Ze(Se);this.negative=Ye.negative;var Ct=Ye.trimStr.split(".");this.integer=BigInt(Ct[0]);var Nt=Ct[1]||"0";this.decimal=BigInt(Nt),this.decimalLen=Nt.length}else this.nan=!0}return(0,Ke.Z)(U,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Se){var Ye="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Se,"0"));return BigInt(Ye)}},{key:"negate",value:function(){var Se=new U(this.toString());return Se.negative=!Se.negative,Se}},{key:"cal",value:function(Se,Ye,Ct){var Nt=Math.max(this.getDecimalStr().length,Se.getDecimalStr().length),Cn=this.alignDecimal(Nt),jr=Se.alignDecimal(Nt),ra=Ye(Cn,jr).toString(),En=Ct(Nt),Gr=Ze(ra),Ea=Gr.negativeStr,dn=Gr.trimStr,pn="".concat(Ea).concat(dn.padStart(En+1,"0"));return new U("".concat(pn.slice(0,-En),".").concat(pn.slice(-En)))}},{key:"add",value:function(Se){if(this.isInvalidate())return new U(Se);var Ye=new U(Se);return Ye.isInvalidate()?this:this.cal(Ye,function(Ct,Nt){return Ct+Nt},function(Ct){return Ct})}},{key:"multi",value:function(Se){var Ye=new U(Se);return this.isInvalidate()||Ye.isInvalidate()?new U(NaN):this.cal(Ye,function(Ct,Nt){return Ct*Nt},function(Ct){return Ct*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Se){return this.toString()===(Se==null?void 0:Se.toString())}},{key:"lessEquals",value:function(Se){return this.add(Se.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Se?this.isInvalidate()?"":Ze("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),U}(),Oe=function(){function U(Q){if((0,fe.Z)(this,U),(0,X.Z)(this,"origin",""),(0,X.Z)(this,"number",void 0),(0,X.Z)(this,"empty",void 0),Be(Q)){this.empty=!0;return}this.origin=String(Q),this.number=Number(Q)}return(0,Ke.Z)(U,[{key:"negate",value:function(){return new U(-this.toNumber())}},{key:"add",value:function(Se){if(this.isInvalidate())return new U(Se);var Ye=Number(Se);if(Number.isNaN(Ye))return this;var Ct=this.number+Ye;if(Ct>Number.MAX_SAFE_INTEGER)return new U(Number.MAX_SAFE_INTEGER);if(Ct<Number.MIN_SAFE_INTEGER)return new U(Number.MIN_SAFE_INTEGER);var Nt=Math.max(Ue(this.number),Ue(Ye));return new U(Ct.toFixed(Nt))}},{key:"multi",value:function(Se){var Ye=Number(Se);if(this.isInvalidate()||Number.isNaN(Ye))return new U(NaN);var Ct=this.number*Ye;if(Ct>Number.MAX_SAFE_INTEGER)return new U(Number.MAX_SAFE_INTEGER);if(Ct<Number.MIN_SAFE_INTEGER)return new U(Number.MIN_SAFE_INTEGER);var Nt=Math.max(Ue(this.number),Ue(Ye));return new U(Ct.toFixed(Nt))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Se){return this.toNumber()===(Se==null?void 0:Se.toNumber())}},{key:"lessEquals",value:function(Se){return this.add(Se.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Se?this.isInvalidate()?"":H(this.number):this.origin}}]),U}();function be(U){return T()?new xr(U):new Oe(U)}function O(U,Q,Se){var Ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(U==="")return"";var Ct=Ze(U),Nt=Ct.negativeStr,Cn=Ct.integerStr,jr=Ct.decimalStr,ra="".concat(Q).concat(jr),En="".concat(Nt).concat(Cn);if(Se>=0){var Gr=Number(jr[Se]);if(Gr>=5&&!Ye){var Ea=be(U).add("".concat(Nt,"0.").concat("0".repeat(Se)).concat(10-Gr));return O(Ea.toString(),Q,Se,Ye)}return Se===0?En:"".concat(En).concat(Q).concat(jr.padEnd(Se,"0").slice(0,Se))}return ra===".0"?En:"".concat(En).concat(ra)}var V=be,ue=y(67656),Y=y(67294);function et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mt=et()?Y.useLayoutEffect:Y.useEffect,fr=function(Q,Se){var Ye=Y.useRef(!0);mt(function(){return Q(Ye.current)},Se),mt(function(){return Ye.current=!1,function(){Ye.current=!0}},[])},Lt=function(Q,Se){fr(function(Ye){if(!Ye)return Q()},Se)},Pe=fr,Ne=y(27183);function _t(U,Q,Se){var Ye=React.useRef({});return(!("value"in Ye.current)||Se(Ye.current.condition,Q))&&(Ye.current.value=U(),Ye.current.condition=Q),Ye.current.value}function le(U,Q){typeof U=="function"?U(Q):(0,ee.Z)(U)==="object"&&U&&"current"in U&&(U.current=Q)}function tt(){for(var U=arguments.length,Q=new Array(U),Se=0;Se<U;Se++)Q[Se]=arguments[Se];var Ye=Q.filter(function(Ct){return Ct});return Ye.length<=1?Ye[0]:function(Ct){Q.forEach(function(Nt){le(Nt,Ct)})}}function bt(){for(var U=arguments.length,Q=new Array(U),Se=0;Se<U;Se++)Q[Se]=arguments[Se];return useMemo(function(){return tt.apply(void 0,Q)},Q,function(Ye,Ct){return Ye.length!==Ct.length||Ye.every(function(Nt,Cn){return Nt!==Ct[Cn]})})}function Ee(U){var Q,Se,Ye=isMemo(U)?U.type.type:U.type;return!(typeof Ye=="function"&&!((Q=Ye.prototype)!==null&&Q!==void 0&&Q.render)||typeof U=="function"&&!((Se=U.prototype)!==null&&Se!==void 0&&Se.render))}function Fe(U){return!isValidElement(U)||isFragment(U)?!1:Ee(U)}var Le={},me=[],xt=function(Q){me.push(Q)};function ot(U,Q){if(0)var Se}function Xe(U,Q){if(0)var Se}function ke(){Le={}}function $t(U,Q,Se){!Q&&!Le[Se]&&(U(!1,Se),Le[Se]=!0)}function Tt(U,Q){$t(ot,U,Q)}function wr(U,Q){$t(Xe,U,Q)}Tt.preMessage=xt,Tt.resetWarned=ke,Tt.noteOnce=wr;var Ur=Tt;function nn(U,Q){var Se=(0,Y.useRef)(null);function Ye(){try{var Nt=U.selectionStart,Cn=U.selectionEnd,jr=U.value,ra=jr.substring(0,Nt),En=jr.substring(Cn);Se.current={start:Nt,end:Cn,value:jr,beforeTxt:ra,afterTxt:En}}catch(Gr){}}function Ct(){if(U&&Se.current&&Q)try{var Nt=U.value,Cn=Se.current,jr=Cn.beforeTxt,ra=Cn.afterTxt,En=Cn.start,Gr=Nt.length;if(Nt.endsWith(ra))Gr=Nt.length-Se.current.afterTxt.length;else if(Nt.startsWith(jr))Gr=jr.length;else{var Ea=jr[En-1],dn=Nt.indexOf(Ea,En-1);dn!==-1&&(Gr=dn+1)}U.setSelectionRange(Gr,Gr)}catch(pn){Ur(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(pn.message))}}return[Ye,Ct]}var Qr=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var U=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(U)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(U==null?void 0:U.substr(0,4))},Or=function(){var Q=(0,Y.useState)(!1),Se=(0,C.Z)(Q,2),Ye=Se[0],Ct=Se[1];return Pe(function(){Ct(Qr())},[]),Ye},cn=Or,Et=function(Q){return+setTimeout(Q,16)},Ae=function(Q){return clearTimeout(Q)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Et=function(Q){return window.requestAnimationFrame(Q)},Ae=function(Q){return window.cancelAnimationFrame(Q)});var de=0,te=new Map;function Te(U){te.delete(U)}var Me=function(Q){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;de+=1;var Ye=de;function Ct(Nt){if(Nt===0)Te(Ye),Q();else{var Cn=Et(function(){Ct(Nt-1)});te.set(Ye,Cn)}}return Ct(Se),Ye};Me.cancel=function(U){var Q=te.get(U);return Te(Q),Ae(Q)};var ct=Me,xe=200,we=600;function At(U){var Q=U.prefixCls,Se=U.upNode,Ye=U.downNode,Ct=U.upDisabled,Nt=U.downDisabled,Cn=U.onStep,jr=Y.useRef(),ra=Y.useRef([]),En=Y.useRef();En.current=Cn;var Gr=function(){clearTimeout(jr.current)},Ea=function(He,Zi){He.preventDefault(),Gr(),En.current(Zi);function wo(){En.current(Zi),jr.current=setTimeout(wo,xe)}jr.current=setTimeout(wo,we)};Y.useEffect(function(){return function(){Gr(),ra.current.forEach(function(Br){return ct.cancel(Br)})}},[]);var dn=cn();if(dn)return null;var pn="".concat(Q,"-handler"),mi=ce()(pn,"".concat(pn,"-up"),(0,X.Z)({},"".concat(pn,"-up-disabled"),Ct)),Hn=ce()(pn,"".concat(pn,"-down"),(0,X.Z)({},"".concat(pn,"-down-disabled"),Nt)),Wn=function(){return ra.current.push(ct(Gr))},Ci={unselectable:"on",role:"button",onMouseUp:Wn,onMouseLeave:Wn};return Y.createElement("div",{className:"".concat(pn,"-wrap")},Y.createElement("span",(0,G.Z)({},Ci,{onMouseDown:function(He){Ea(He,!0)},"aria-label":"Increase Value","aria-disabled":Ct,className:mi}),Se||Y.createElement("span",{unselectable:"on",className:"".concat(Q,"-handler-up-inner")})),Y.createElement("span",(0,G.Z)({},Ci,{onMouseDown:function(He){Ea(He,!1)},"aria-label":"Decrease Value","aria-disabled":Nt,className:Hn}),Ye||Y.createElement("span",{unselectable:"on",className:"".concat(Q,"-handler-down-inner")})))}function gt(U){var Q=typeof U=="number"?H(U):Ze(U).fullStr,Se=Q.includes(".");return Se?Ze(Q.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:U+"0"}var je=y(87887),nr=function(){var U=(0,Y.useRef)(0),Q=function(){ct.cancel(U.current)};return(0,Y.useEffect)(function(){return Q},[]),function(Se){Q(),U.current=ct(function(){Se()})}},lr=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],re=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],jt=function(Q,Se){return Q||Se.isEmpty()?Se.toString():Se.toNumber()},Rt=function(Q){var Se=V(Q);return Se.isInvalidate()?null:Se},Dr=Y.forwardRef(function(U,Q){var Se,Ye=U.prefixCls,Ct=Ye===void 0?"rc-input-number":Ye,Nt=U.className,Cn=U.style,jr=U.min,ra=U.max,En=U.step,Gr=En===void 0?1:En,Ea=U.defaultValue,dn=U.value,pn=U.disabled,mi=U.readOnly,Hn=U.upHandler,Wn=U.downHandler,Ci=U.keyboard,Br=U.controls,He=Br===void 0?!0:Br,Zi=U.classNames,wo=U.stringMode,Ei=U.parser,zo=U.formatter,uo=U.precision,Io=U.decimalSeparator,So=U.onChange,ks=U.onInput,vs=U.onPressEnter,Xo=U.onStep,ka=(0,p.Z)(U,lr),Bn="".concat(Ct,"-input"),ti=Y.useRef(null),fo=Y.useState(!1),Ko=(0,C.Z)(fo,2),To=Ko[0],Jo=Ko[1],Yi=Y.useRef(!1),pa=Y.useRef(!1),Rs=Y.useRef(!1),As=Y.useState(function(){return V(dn!=null?dn:Ea)}),Ds=(0,C.Z)(As,2),Nn=Ds[0],yl=Ds[1];function ri(Gt){dn===void 0&&yl(Gt)}var Ns=Y.useCallback(function(Gt,It){if(!It)return uo>=0?uo:Math.max(Ue(Gt),Ue(Gr))},[uo,Gr]),Yo=Y.useCallback(function(Gt){var It=String(Gt);if(Ei)return Ei(It);var Kt=It;return Io&&(Kt=Kt.replace(Io,".")),Kt.replace(/[^\w.-]+/g,"")},[Ei,Io]),li=Y.useRef(""),Ls=Y.useCallback(function(Gt,It){if(zo)return zo(Gt,{userTyping:It,input:String(li.current)});var Kt=typeof Gt=="number"?H(Gt):Gt;if(!It){var gr=Ns(Kt,It);if(Re(Kt)&&(Io||gr>=0)){var en=Io||".";Kt=O(Kt,en,gr)}}return Kt},[zo,Ns,Io]),Ho=Y.useState(function(){var Gt=Ea!=null?Ea:dn;return Nn.isInvalidate()&&["string","number"].includes((0,ee.Z)(Gt))?Number.isNaN(Gt)?"":Gt:Ls(Nn.toString(),!1)}),Qo=(0,C.Z)(Ho,2),Vi=Qo[0],Wo=Qo[1];li.current=Vi;function Bo(Gt,It){Wo(Ls(Gt.isInvalidate()?Gt.toString(!1):Gt.toString(!It),It))}var ho=Y.useMemo(function(){return Rt(ra)},[ra,uo]),Qi=Y.useMemo(function(){return Rt(jr)},[jr,uo]),sl=Y.useMemo(function(){return!ho||!Nn||Nn.isInvalidate()?!1:ho.lessEquals(Nn)},[ho,Nn]),eo=Y.useMemo(function(){return!Qi||!Nn||Nn.isInvalidate()?!1:Nn.lessEquals(Qi)},[Qi,Nn]),_o=nn(ti.current,To),w=(0,C.Z)(_o,2),D=w[0],ne=w[1],ae=function(It){return ho&&!It.lessEquals(ho)?ho:Qi&&!Qi.lessEquals(It)?Qi:null},_e=function(It){return!ae(It)},Ie=function(It,Kt){var gr=It,en=_e(gr)||gr.isEmpty();if(!gr.isEmpty()&&!Kt&&(gr=ae(gr)||gr,en=!0),!mi&&!pn&&en){var Xr=gr.toString(),Vn=Ns(Xr,Kt);return Vn>=0&&(gr=V(O(Xr,".",Vn)),_e(gr)||(gr=V(O(Xr,".",Vn,!0)))),gr.equals(Nn)||(ri(gr),So==null||So(gr.isEmpty()?null:jt(wo,gr)),dn===void 0&&Bo(gr,Kt)),gr}return Nn},at=nr(),wt=function Gt(It){if(D(),li.current=It,Wo(It),!pa.current){var Kt=Yo(It),gr=V(Kt);gr.isNaN()||Ie(gr,!0)}ks==null||ks(It),at(function(){var en=It;Ei||(en=It.replace(/。/g,".")),en!==It&&Gt(en)})},pr=function(){pa.current=!0},ur=function(){pa.current=!1,wt(ti.current.value)},qr=function(It){wt(It.target.value)},Wt=function(It){var Kt;if(!(It&&sl||!It&&eo)){Yi.current=!1;var gr=V(Rs.current?gt(Gr):Gr);It||(gr=gr.negate());var en=(Nn||V(0)).add(gr.toString()),Xr=Ie(en,!1);Xo==null||Xo(jt(wo,Xr),{offset:Rs.current?gt(Gr):Gr,type:It?"up":"down"}),(Kt=ti.current)===null||Kt===void 0||Kt.focus()}},kr=function(It){var Kt=V(Yo(Vi)),gr=Kt;Kt.isNaN()?gr=Ie(Nn,It):gr=Ie(Kt,It),dn!==void 0?Bo(Nn,!1):gr.isNaN()||Bo(gr,!1)},Yr=function(){Yi.current=!0},an=function(It){var Kt=It.key,gr=It.shiftKey;Yi.current=!0,Rs.current=gr,Kt==="Enter"&&(pa.current||(Yi.current=!1),kr(!1),vs==null||vs(It)),Ci!==!1&&!pa.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Kt)&&(Wt(Kt==="Up"||Kt==="ArrowUp"),It.preventDefault())},Zn=function(){Yi.current=!1,Rs.current=!1},qn=function(){kr(!1),Jo(!1),Yi.current=!1};return Lt(function(){Nn.isInvalidate()||Bo(Nn,!1)},[uo]),Lt(function(){var Gt=V(dn);yl(Gt);var It=V(Yo(Vi));(!Gt.equals(It)||!Yi.current||zo)&&Bo(Gt,Yi.current)},[dn]),Lt(function(){zo&&ne()},[Vi]),Y.createElement("div",{className:ce()(Ct,Zi==null?void 0:Zi.input,Nt,(Se={},(0,X.Z)(Se,"".concat(Ct,"-focused"),To),(0,X.Z)(Se,"".concat(Ct,"-disabled"),pn),(0,X.Z)(Se,"".concat(Ct,"-readonly"),mi),(0,X.Z)(Se,"".concat(Ct,"-not-a-number"),Nn.isNaN()),(0,X.Z)(Se,"".concat(Ct,"-out-of-range"),!Nn.isInvalidate()&&!_e(Nn)),Se)),style:Cn,onFocus:function(){Jo(!0)},onBlur:qn,onKeyDown:an,onKeyUp:Zn,onCompositionStart:pr,onCompositionEnd:ur,onBeforeInput:Yr},He&&Y.createElement(At,{prefixCls:Ct,upNode:Hn,downNode:Wn,upDisabled:sl,downDisabled:eo,onStep:Wt}),Y.createElement("div",{className:"".concat(Bn,"-wrap")},Y.createElement("input",(0,G.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":jr,"aria-valuemax":ra,"aria-valuenow":Nn.isInvalidate()?null:Nn.toString(),step:Gr},ka,{ref:tt(ti,Q),className:Bn,value:Vi,onChange:qr,disabled:pn,readOnly:mi}))))}),gn=Y.forwardRef(function(U,Q){var Se=U.disabled,Ye=U.style,Ct=U.prefixCls,Nt=U.value,Cn=U.prefix,jr=U.suffix,ra=U.addonBefore,En=U.addonAfter,Gr=U.classes,Ea=U.className,dn=U.classNames,pn=(0,p.Z)(U,re),mi=Y.useRef(null),Hn=function(Ci){mi.current&&(0,je.nH)(mi.current,Ci)};return Y.createElement(ue.BaseInput,{inputElement:Y.createElement(Dr,(0,G.Z)({prefixCls:Ct,disabled:Se,classNames:dn,ref:tt(mi,Q)},pn)),className:Ea,triggerFocus:Hn,prefixCls:Ct,value:Nt,disabled:Se,style:Ye,prefix:Cn,suffix:jr,addonAfter:En,addonBefore:ra,classes:Gr,classNames:dn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});gn.displayName="InputNumber";var un=gn,_i=un,_r=y(9708),Bt=y(53124),Pi=y(46735),Wi=y(98866),ea=y(98675),wn=y(65223),$i=y(4173),Jt=y(47673),Do=y(14747),xo=y(80110),co=y(67968),Ka=y(45503);const ta=(U,Q)=>{let{componentCls:Se,borderRadiusSM:Ye,borderRadiusLG:Ct}=U;const Nt=Q==="lg"?Ct:Ye;return{[`&-${Q}`]:{[`${Se}-handler-wrap`]:{borderStartEndRadius:Nt,borderEndEndRadius:Nt},[`${Se}-handler-up`]:{borderStartEndRadius:Nt},[`${Se}-handler-down`]:{borderEndEndRadius:Nt}}}},cr=U=>{const{componentCls:Q,lineWidth:Se,lineType:Ye,colorBorder:Ct,borderRadius:Nt,fontSizeLG:Cn,controlHeightLG:jr,controlHeightSM:ra,colorError:En,paddingInlineSM:Gr,colorTextDescription:Ea,motionDurationMid:dn,handleHoverColor:pn,paddingInline:mi,paddingBlock:Hn,handleBg:Wn,handleActiveBg:Ci,colorTextDisabled:Br,borderRadiusSM:He,borderRadiusLG:Zi,controlWidth:wo,handleVisible:Ei,handleBorderColor:zo}=U;return[{[Q]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Do.Wf)(U)),(0,Jt.ik)(U)),(0,Jt.bi)(U,Q)),{display:"inline-block",width:wo,margin:0,padding:0,border:`${Se}px ${Ye} ${Ct}`,borderRadius:Nt,"&-rtl":{direction:"rtl",[`${Q}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Cn,borderRadius:Zi,[`input${Q}-input`]:{height:jr-2*Se}},"&-sm":{padding:0,borderRadius:He,[`input${Q}-input`]:{height:ra-2*Se,padding:`0 ${Gr}px`}},"&:hover":Object.assign({},(0,Jt.pU)(U)),"&-focused":Object.assign({},(0,Jt.M1)(U)),"&-out-of-range":{[`${Q}-input-wrap`]:{input:{color:En}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Do.Wf)(U)),(0,Jt.s7)(U)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Q}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Q}-group-addon`]:{borderRadius:Zi,fontSize:U.fontSizeLG}},"&-sm":{[`${Q}-group-addon`]:{borderRadius:He}},[`${Q}-wrapper-disabled > ${Q}-group-addon`]:Object.assign({},(0,Jt.Xy)(U))}}),[`&-disabled ${Q}-input`]:{cursor:"not-allowed"},[Q]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Do.Wf)(U)),{width:"100%",padding:`${Hn}px ${mi}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Nt,outline:0,transition:`all ${dn} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Jt.nz)(U.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[Q]:Object.assign(Object.assign(Object.assign({[`&:hover ${Q}-handler-wrap, &-focused ${Q}-handler-wrap`]:{opacity:1},[`${Q}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:U.handleWidth,height:"100%",background:Wn,borderStartStartRadius:0,borderStartEndRadius:Nt,borderEndEndRadius:Nt,borderEndStartRadius:0,opacity:Ei===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${dn} linear ${dn}`,[`${Q}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${Q}-handler-up-inner,
|
|
|
${Q}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:U.handleFontSize}}},[`${Q}-handler`]:{height:"50%",overflow:"hidden",color:Ea,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Se}px ${Ye} ${zo}`,transition:`all ${dn} linear`,"&:active":{background:Ci},"&:hover":{height:"60%",[`
|
|
|
${Q}-handler-up-inner,
|
|
|
${Q}-handler-down-inner
|
|
|
`]:{color:pn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Do.Ro)()),{color:Ea,transition:`all ${dn} linear`,userSelect:"none"})},[`${Q}-handler-up`]:{borderStartEndRadius:Nt},[`${Q}-handler-down`]:{borderBlockStart:`${Se}px ${Ye} ${zo}`,borderEndEndRadius:Nt}},ta(U,"lg")),ta(U,"sm")),{"&-disabled, &-readonly":{[`${Q}-handler-wrap`]:{display:"none"},[`${Q}-input`]:{color:"inherit"}},[`
|
|
|
${Q}-handler-up-disabled,
|
|
|
${Q}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${Q}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${Q}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Br}})},{[`${Q}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${Q}-handler-down`]:{borderBlockStartWidth:0}}}]},Ha=U=>{const{componentCls:Q,paddingBlock:Se,paddingInline:Ye,inputAffixPadding:Ct,controlWidth:Nt,borderRadiusLG:Cn,borderRadiusSM:jr}=U;return{[`${Q}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Jt.ik)(U)),(0,Jt.bi)(U,`${Q}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Nt,padding:0,paddingInlineStart:Ye,"&-lg":{borderRadius:Cn},"&-sm":{borderRadius:jr},[`&:not(${Q}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Jt.pU)(U)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Q}-disabled`]:{background:"transparent"},[`> div${Q}`]:{width:"100%",border:"none",outline:"none",[`&${Q}-focused`]:{boxShadow:"none !important"}},[`input${Q}-input`]:{padding:`${Se}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Q}-handler-wrap`]:{zIndex:2},[Q]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Ct},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Ye,marginInlineStart:Ct}}})}};var qs=(0,co.Z)("InputNumber",U=>{const Q=(0,Ka.TS)(U,(0,Jt.e5)(U));return[cr(Q),Ha(Q),(0,xo.c)(Q)]},U=>Object.assign(Object.assign({},(0,Jt.TM)(U)),{controlWidth:90,handleWidth:U.controlHeightSM-U.lineWidth*2,handleFontSize:U.fontSize/2,handleVisible:"auto",handleActiveBg:U.colorFillAlter,handleBg:U.colorBgContainer,handleHoverColor:U.colorPrimary,handleBorderColor:U.colorBorder})),ms=function(U,Q){var Se={};for(var Ye in U)Object.prototype.hasOwnProperty.call(U,Ye)&&Q.indexOf(Ye)<0&&(Se[Ye]=U[Ye]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,Ye=Object.getOwnPropertySymbols(U);Ct<Ye.length;Ct++)Q.indexOf(Ye[Ct])<0&&Object.prototype.propertyIsEnumerable.call(U,Ye[Ct])&&(Se[Ye[Ct]]=U[Ye[Ct]]);return Se};const Lo=Y.forwardRef((U,Q)=>{const{getPrefixCls:Se,direction:Ye}=Y.useContext(Bt.E_),Ct=Y.useRef(null);Y.useImperativeHandle(Q,()=>Ct.current);const{className:Nt,rootClassName:Cn,size:jr,disabled:ra,prefixCls:En,addonBefore:Gr,addonAfter:Ea,prefix:dn,bordered:pn=!0,readOnly:mi,status:Hn,controls:Wn}=U,Ci=ms(U,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Br=Se("input-number",En),[He,Zi]=qs(Br),{compactSize:wo,compactItemClassnames:Ei}=(0,$i.ri)(Br,Ye);let zo=Y.createElement(J.Z,{className:`${Br}-handler-up-inner`}),uo=Y.createElement(x.Z,{className:`${Br}-handler-down-inner`});const Io=typeof Wn=="boolean"?Wn:void 0;typeof Wn=="object"&&(zo=typeof Wn.upIcon=="undefined"?zo:Y.createElement("span",{className:`${Br}-handler-up-inner`},Wn.upIcon),uo=typeof Wn.downIcon=="undefined"?uo:Y.createElement("span",{className:`${Br}-handler-down-inner`},Wn.downIcon));const{hasFeedback:So,status:ks,isFormItemInput:vs,feedbackIcon:Xo}=Y.useContext(wn.aM),ka=(0,_r.F)(ks,Hn),Bn=(0,ea.Z)(Yi=>{var pa;return(pa=jr!=null?jr:wo)!==null&&pa!==void 0?pa:Yi}),ti=Y.useContext(Wi.Z),fo=ra!=null?ra:ti,Ko=ce()({[`${Br}-lg`]:Bn==="large",[`${Br}-sm`]:Bn==="small",[`${Br}-rtl`]:Ye==="rtl",[`${Br}-borderless`]:!pn,[`${Br}-in-form-item`]:vs},(0,_r.Z)(Br,ka),Ei,Zi),To=`${Br}-group`,Jo=Y.createElement(_i,Object.assign({ref:Ct,disabled:fo,className:ce()(Nt,Cn),upHandler:zo,downHandler:uo,prefixCls:Br,readOnly:mi,controls:Io,prefix:dn,suffix:So&&Xo,addonAfter:Ea&&Y.createElement($i.BR,null,Y.createElement(wn.Ux,{override:!0,status:!0},Ea)),addonBefore:Gr&&Y.createElement($i.BR,null,Y.createElement(wn.Ux,{override:!0,status:!0},Gr)),classNames:{input:Ko},classes:{affixWrapper:ce()((0,_r.Z)(`${Br}-affix-wrapper`,ka,So),{[`${Br}-affix-wrapper-sm`]:Bn==="small",[`${Br}-affix-wrapper-lg`]:Bn==="large",[`${Br}-affix-wrapper-rtl`]:Ye==="rtl",[`${Br}-affix-wrapper-borderless`]:!pn},Zi),wrapper:ce()({[`${To}-rtl`]:Ye==="rtl",[`${Br}-wrapper-disabled`]:fo},Zi),group:ce()({[`${Br}-group-wrapper-sm`]:Bn==="small",[`${Br}-group-wrapper-lg`]:Bn==="large",[`${Br}-group-wrapper-rtl`]:Ye==="rtl"},(0,_r.Z)(`${Br}-group-wrapper`,ka,So),Zi)}},Ci));return He(Jo)}),Mi=Lo,Fo=U=>Y.createElement(Pi.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Y.createElement(Lo,Object.assign({},U)));Mi._InternalPanelDoNotUseOrYouWillBeFired=Fo;var Ri=Mi},47673:function(Ir,St,y){"use strict";y.d(St,{M1:function(){return ee},TM:function(){return be},Xy:function(){return C},bi:function(){return Ke},e5:function(){return Oe},ik:function(){return T},nz:function(){return G},pU:function(){return X},s7:function(){return Be},x0:function(){return fe}});var x=y(14747),J=y(80110),ge=y(45503),ce=y(67968);const G=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),X=O=>({borderColor:O.hoverBorderColor}),ee=O=>({borderColor:O.activeBorderColor,boxShadow:O.activeShadow,outline:0}),C=O=>({color:O.colorTextDisabled,backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},X((0,ge.TS)(O,{hoverBorderColor:O.colorBorder})))}),p=O=>{const{paddingBlockLG:V,fontSizeLG:ue,lineHeightLG:Y,borderRadiusLG:et,paddingInlineLG:mt}=O;return{padding:`${V}px ${mt}px`,fontSize:ue,lineHeight:Y,borderRadius:et}},fe=O=>({padding:`${O.paddingBlockSM}px ${O.paddingInlineSM}px`,borderRadius:O.borderRadiusSM}),Ke=(O,V)=>{const{componentCls:ue,colorError:Y,colorWarning:et,errorActiveShadow:mt,warningActiveShadow:fr,colorErrorBorderHover:Lt,colorWarningBorderHover:Pe}=O;return{[`&-status-error:not(${V}-disabled):not(${V}-borderless)${V}`]:{borderColor:Y,"&:hover":{borderColor:Lt},"&:focus, &-focused":Object.assign({},ee((0,ge.TS)(O,{activeBorderColor:Y,activeShadow:mt}))),[`${ue}-prefix, ${ue}-suffix`]:{color:Y}},[`&-status-warning:not(${V}-disabled):not(${V}-borderless)${V}`]:{borderColor:et,"&:hover":{borderColor:Pe},"&:focus, &-focused":Object.assign({},ee((0,ge.TS)(O,{activeBorderColor:et,activeShadow:fr}))),[`${ue}-prefix, ${ue}-suffix`]:{color:et}}}},T=O=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${O.paddingBlock}px ${O.paddingInline}px`,color:O.colorText,fontSize:O.fontSize,lineHeight:O.lineHeight,backgroundColor:O.colorBgContainer,backgroundImage:"none",borderWidth:O.lineWidth,borderStyle:O.lineType,borderColor:O.colorBorder,borderRadius:O.borderRadius,transition:`all ${O.motionDurationMid}`},G(O.colorTextPlaceholder)),{"&:hover":Object.assign({},X(O)),"&:focus, &-focused":Object.assign({},ee(O)),"&-disabled, &[disabled]":Object.assign({},C(O)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:O.controlHeight,lineHeight:O.lineHeight,verticalAlign:"bottom",transition:`all ${O.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},p(O)),"&-sm":Object.assign({},fe(O)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Be=O=>{const{componentCls:V,antCls:ue}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${V}, &-lg > ${V}-group-addon`]:Object.assign({},p(O)),[`&-sm ${V}, &-sm > ${V}-group-addon`]:Object.assign({},fe(O)),[`&-lg ${ue}-select-single ${ue}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${ue}-select-single ${ue}-select-selector`]:{height:O.controlHeightSM},[`> ${V}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${V}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${O.paddingInline}px`,color:O.colorText,fontWeight:"normal",fontSize:O.fontSize,textAlign:"center",backgroundColor:O.colorFillAlter,border:`${O.lineWidth}px ${O.lineType} ${O.colorBorder}`,borderRadius:O.borderRadius,transition:`all ${O.motionDurationSlow}`,lineHeight:1,[`${ue}-select`]:{margin:`-${O.paddingBlock+1}px -${O.paddingInline}px`,[`&${ue}-select-single:not(${ue}-select-customize-input)`]:{[`${ue}-select-selector`]:{backgroundColor:"inherit",border:`${O.lineWidth}px ${O.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${ue}-select-selector`]:{color:O.colorPrimary}}},[`${ue}-cascader-picker`]:{margin:`-9px -${O.paddingInline}px`,backgroundColor:"transparent",[`${ue}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${V}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${V}-search-with-button &`]:{zIndex:0}}},[`> ${V}:first-child, ${V}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${ue}-select ${ue}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${V}-affix-wrapper`]:{[`&:not(:first-child) ${V}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${V}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${V}:last-child, ${V}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${ue}-select ${ue}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${V}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${V}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${V}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${V}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,x.dF)()),{[`${V}-group-addon, ${V}-group-wrap, > ${V}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${V}-affix-wrapper,
|
|
|
& > ${V}-number-affix-wrapper,
|
|
|
& > ${ue}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-O.lineWidth,borderInlineEndWidth:O.lineWidth},[`${V}`]:{float:"none"},[`& > ${ue}-select > ${ue}-select-selector,
|
|
|
& > ${ue}-select-auto-complete ${V},
|
|
|
& > ${ue}-cascader-picker ${V},
|
|
|
& > ${V}-group-wrapper ${V}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${ue}-select-focused`]:{zIndex:1},[`& > ${ue}-select > ${ue}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${ue}-select:first-child > ${ue}-select-selector,
|
|
|
& > ${ue}-select-auto-complete:first-child ${V},
|
|
|
& > ${ue}-cascader-picker:first-child ${V}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
|
|
|
& > ${ue}-select:last-child > ${ue}-select-selector,
|
|
|
& > ${ue}-cascader-picker:last-child ${V},
|
|
|
& > ${ue}-cascader-picker-focused:last-child ${V}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${ue}-select-auto-complete ${V}`]:{verticalAlign:"top"},[`${V}-group-wrapper + ${V}-group-wrapper`]:{marginInlineStart:-O.lineWidth,[`${V}-affix-wrapper`]:{borderRadius:0}},[`${V}-group-wrapper:not(:last-child)`]:{[`&${V}-search > ${V}-group`]:{[`& > ${V}-group-addon > ${V}-search-button`]:{borderRadius:0},[`& > ${V}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},Ze=O=>{const{componentCls:V,controlHeightSM:ue,lineWidth:Y}=O,mt=(ue-Y*2-16)/2;return{[V]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,x.Wf)(O)),T(O)),Ke(O,V)),{'&[type="color"]':{height:O.controlHeight,[`&${V}-lg`]:{height:O.controlHeightLG},[`&${V}-sm`]:{height:ue,paddingTop:mt,paddingBottom:mt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Mt=O=>{const{componentCls:V}=O;return{[`${V}-clear-icon`]:{margin:0,color:O.colorTextQuaternary,fontSize:O.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${O.motionDurationSlow}`,"&:hover":{color:O.colorTextTertiary},"&:active":{color:O.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${O.inputAffixPadding}px`}}}},Ue=O=>{const{componentCls:V,inputAffixPadding:ue,colorTextDescription:Y,motionDurationSlow:et,colorIcon:mt,colorIconHover:fr,iconCls:Lt}=O;return{[`${V}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},T(O)),{display:"inline-flex",[`&:not(${V}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},X(O)),{zIndex:1,[`${V}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${V}[disabled]`]:{background:"transparent"}},[`> input${V}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${V}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:Y},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:ue},"&-suffix":{marginInlineStart:ue}}}),Mt(O)),{[`${Lt}${V}-password-icon`]:{color:mt,cursor:"pointer",transition:`all ${et}`,"&:hover":{color:fr}}}),Ke(O,`${V}-affix-wrapper`))}},H=O=>{const{componentCls:V,colorError:ue,colorWarning:Y,borderRadiusLG:et,borderRadiusSM:mt}=O;return{[`${V}-group`]:Object.assign(Object.assign(Object.assign({},(0,x.Wf)(O)),Be(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${V}-group-addon`]:{borderRadius:et,fontSize:O.fontSizeLG}},"&-sm":{[`${V}-group-addon`]:{borderRadius:mt}},"&-status-error":{[`${V}-group-addon`]:{color:ue,borderColor:ue}},"&-status-warning":{[`${V}-group-addon`]:{color:Y,borderColor:Y}},"&-disabled":{[`${V}-group-addon`]:Object.assign({},C(O))},[`&:not(${V}-compact-first-item):not(${V}-compact-last-item)${V}-compact-item`]:{[`${V}, ${V}-group-addon`]:{borderRadius:0}},[`&:not(${V}-compact-last-item)${V}-compact-first-item`]:{[`${V}, ${V}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${V}-compact-first-item)${V}-compact-last-item`]:{[`${V}, ${V}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Re=O=>{const{componentCls:V,antCls:ue}=O,Y=`${V}-search`;return{[Y]:{[`${V}`]:{"&:hover, &:focus":{borderColor:O.colorPrimaryHover,[`+ ${V}-group-addon ${Y}-button:not(${ue}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${V}-affix-wrapper`]:{borderRadius:0},[`${V}-lg`]:{lineHeight:O.lineHeightLG-2e-4},[`> ${V}-group`]:{[`> ${V}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Y}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Y}-button:not(${ue}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${ue}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Y}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Y}-button`]:{height:O.controlHeightLG},[`&-small ${Y}-button`]:{height:O.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${V}-compact-item`]:{[`&:not(${V}-compact-last-item)`]:{[`${V}-group-addon`]:{[`${V}-search-button`]:{marginInlineEnd:-O.lineWidth,borderRadius:0}}},[`&:not(${V}-compact-first-item)`]:{[`${V},${V}-affix-wrapper`]:{borderRadius:0}},[`> ${V}-group-addon ${V}-search-button,
|
|
|
> ${V},
|
|
|
${V}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${V}-affix-wrapper-focused`]:{zIndex:2}}}}},xr=O=>{const{componentCls:V,paddingLG:ue}=O,Y=`${V}-textarea`;return{[Y]:{position:"relative","&-show-count":{[`> ${V}`]:{height:"100%"},[`${V}-data-count`]:{position:"absolute",bottom:-O.fontSize*O.lineHeight,insetInlineEnd:0,color:O.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${V}`]:{paddingInlineEnd:ue}},[`&-affix-wrapper${Y}-has-feedback`]:{[`${V}`]:{paddingInlineEnd:ue}},[`&-affix-wrapper${V}-affix-wrapper`]:{padding:0,[`> textarea${V}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${V}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${V}-clear-icon`]:{position:"absolute",insetInlineEnd:O.paddingXS,insetBlockStart:O.paddingXS},[`${Y}-suffix`]:{position:"absolute",top:0,insetInlineEnd:O.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Oe(O){return(0,ge.TS)(O,{inputAffixPadding:O.paddingXXS})}const be=O=>{const{controlHeight:V,fontSize:ue,lineHeight:Y,lineWidth:et,controlHeightSM:mt,controlHeightLG:fr,fontSizeLG:Lt,lineHeightLG:Pe,paddingSM:Ne,controlPaddingHorizontalSM:_t,controlPaddingHorizontal:le,colorFillAlter:tt,colorPrimaryHover:bt,controlOutlineWidth:Ee,controlOutline:Fe,colorErrorOutline:Le,colorWarningOutline:me}=O;return{paddingBlock:Math.max(Math.round((V-ue*Y)/2*10)/10-et,3),paddingBlockSM:Math.max(Math.round((mt-ue*Y)/2*10)/10-et,0),paddingBlockLG:Math.ceil((fr-Lt*Pe)/2*10)/10-et,paddingInline:Ne-et,paddingInlineSM:_t-et,paddingInlineLG:le-et,addonBg:tt,activeBorderColor:bt,hoverBorderColor:bt,activeShadow:`0 0 0 ${Ee}px ${Fe}`,errorActiveShadow:`0 0 0 ${Ee}px ${Le}`,warningActiveShadow:`0 0 0 ${Ee}px ${me}`}};St.ZP=(0,ce.Z)("Input",O=>{const V=(0,ge.TS)(O,Oe(O));return[Ze(V),xr(V),Ue(V),H(V),Re(V),(0,J.c)(V)]},be)},71322:function(Ir,St,y){"use strict";y.d(St,{D:function(){return xr},Z:function(){return O}});var x=y(87462),J=y(67294),ge={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ce=ge,G=y(74643),X=function(ue,Y){return J.createElement(G.Z,(0,x.Z)({},ue,{ref:Y,icon:ce}))},ee=J.forwardRef(X),C=y(22751),p=y(91034),fe=y(94184),Ke=y.n(fe),T=y(10366),Ze=V=>!isNaN(parseFloat(V))&&isFinite(V),Mt=y(53124),Ue=y(84321),H=function(V,ue){var Y={};for(var et in V)Object.prototype.hasOwnProperty.call(V,et)&&ue.indexOf(et)<0&&(Y[et]=V[et]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,et=Object.getOwnPropertySymbols(V);mt<et.length;mt++)ue.indexOf(et[mt])<0&&Object.prototype.propertyIsEnumerable.call(V,et[mt])&&(Y[et[mt]]=V[et[mt]]);return Y};const Re={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},xr=J.createContext({}),Oe=(()=>{let V=0;return function(){let ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return V+=1,`${ue}${V}`}})();var O=J.forwardRef((V,ue)=>{const{prefixCls:Y,className:et,trigger:mt,children:fr,defaultCollapsed:Lt=!1,theme:Pe="dark",style:Ne={},collapsible:_t=!1,reverseArrow:le=!1,width:tt=200,collapsedWidth:bt=80,zeroWidthTriggerStyle:Ee,breakpoint:Fe,onCollapse:Le,onBreakpoint:me}=V,xt=H(V,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:ot}=(0,J.useContext)(Ue.Gs),[Xe,ke]=(0,J.useState)("collapsed"in V?V.collapsed:Lt),[$t,Tt]=(0,J.useState)(!1);(0,J.useEffect)(()=>{"collapsed"in V&&ke(V.collapsed)},[V.collapsed]);const wr=(Et,Ae)=>{"collapsed"in V||ke(Et),Le==null||Le(Et,Ae)},Ur=(0,J.useRef)();Ur.current=Et=>{Tt(Et.matches),me==null||me(Et.matches),Xe!==Et.matches&&wr(Et.matches,"responsive")},(0,J.useEffect)(()=>{function Et(de){return Ur.current(de)}let Ae;if(typeof window!="undefined"){const{matchMedia:de}=window;if(de&&Fe&&Fe in Re){Ae=de(`(max-width: ${Re[Fe]})`);try{Ae.addEventListener("change",Et)}catch(te){Ae.addListener(Et)}Et(Ae)}}return()=>{try{Ae==null||Ae.removeEventListener("change",Et)}catch(de){Ae==null||Ae.removeListener(Et)}}},[Fe]),(0,J.useEffect)(()=>{const Et=Oe("ant-sider-");return ot.addSider(Et),()=>ot.removeSider(Et)},[]);const nn=()=>{wr(!Xe,"clickTrigger")},{getPrefixCls:Qr}=(0,J.useContext)(Mt.E_),Or=()=>{const Et=Qr("layout-sider",Y),Ae=(0,T.Z)(xt,["collapsed"]),de=Xe?bt:tt,te=Ze(de)?`${de}px`:String(de),Te=parseFloat(String(bt||0))===0?J.createElement("span",{onClick:nn,className:Ke()(`${Et}-zero-width-trigger`,`${Et}-zero-width-trigger-${le?"right":"left"}`),style:Ee},mt||J.createElement(ee,null)):null,xe={expanded:le?J.createElement(p.Z,null):J.createElement(C.Z,null),collapsed:le?J.createElement(C.Z,null):J.createElement(p.Z,null)}[Xe?"collapsed":"expanded"],we=mt!==null?Te||J.createElement("div",{className:`${Et}-trigger`,onClick:nn,style:{width:te}},mt||xe):null,At=Object.assign(Object.assign({},Ne),{flex:`0 0 ${te}`,maxWidth:te,minWidth:te,width:te}),gt=Ke()(Et,`${Et}-${Pe}`,{[`${Et}-collapsed`]:!!Xe,[`${Et}-has-trigger`]:_t&&mt!==null&&!Te,[`${Et}-below`]:!!$t,[`${Et}-zero-width`]:parseFloat(te)===0},et);return J.createElement("aside",Object.assign({className:gt},Ae,{style:At,ref:ue}),J.createElement("div",{className:`${Et}-children`},fr),_t||$t&&Te?we:null)},cn=J.useMemo(()=>({siderCollapsed:Xe}),[Xe]);return J.createElement(xr.Provider,{value:cn},Or())})},84321:function(Ir,St,y){"use strict";y.d(St,{VY:function(){return Oe},$_:function(){return xr},h4:function(){return Re},Gs:function(){return Be},ZP:function(){return be}});var x=y(74902),J=y(94184),ge=y.n(J),ce=y(10366),G=y(67294),X=y(53124),ee=y(67968),p=O=>{const{componentCls:V,bodyBg:ue,lightSiderBg:Y,lightTriggerBg:et,lightTriggerColor:mt}=O;return{[`${V}-sider-light`]:{background:Y,[`${V}-sider-trigger`]:{color:mt,background:et},[`${V}-sider-zero-width-trigger`]:{color:mt,background:et,border:`1px solid ${ue}`,borderInlineStart:0}}}};const fe=O=>{const{antCls:V,componentCls:ue,colorText:Y,triggerColor:et,footerBg:mt,triggerBg:fr,headerHeight:Lt,headerPadding:Pe,headerColor:Ne,footerPadding:_t,triggerHeight:le,zeroTriggerHeight:tt,zeroTriggerWidth:bt,motionDurationMid:Ee,motionDurationSlow:Fe,fontSize:Le,borderRadius:me,bodyBg:xt,headerBg:ot,siderBg:Xe}=O;return{[ue]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:xt,"&, *":{boxSizing:"border-box"},[`&${ue}-has-sider`]:{flexDirection:"row",[`> ${ue}, > ${ue}-content`]:{width:0}},[`${ue}-header, &${ue}-footer`]:{flex:"0 0 auto"},[`${ue}-sider`]:{position:"relative",minWidth:0,background:Xe,transition:`all ${Ee}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${V}-menu${V}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:le},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:le,color:et,lineHeight:`${le}px`,textAlign:"center",background:fr,cursor:"pointer",transition:`all ${Ee}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Lt,insetInlineEnd:-bt,zIndex:1,width:bt,height:tt,color:et,fontSize:O.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Xe,borderStartStartRadius:0,borderStartEndRadius:me,borderEndEndRadius:me,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Fe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Fe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-bt,borderStartStartRadius:me,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:me}}}}},p(O)),{"&-rtl":{direction:"rtl"}}),[`${ue}-header`]:{height:Lt,padding:Pe,color:Ne,lineHeight:`${Lt}px`,background:ot,[`${V}-menu`]:{lineHeight:"inherit"}},[`${ue}-footer`]:{padding:_t,color:Y,fontSize:Le,background:mt},[`${ue}-content`]:{flex:"auto",minHeight:0}}};var Ke=(0,ee.Z)("Layout",O=>[fe(O)],O=>{const{colorBgLayout:V,controlHeight:ue,controlHeightLG:Y,colorText:et,controlHeightSM:mt,marginXXS:fr,colorTextLightSolid:Lt,colorBgContainer:Pe}=O,Ne=Y*1.25;return{colorBgHeader:"#001529",colorBgBody:V,colorBgTrigger:"#002140",bodyBg:V,headerBg:"#001529",headerHeight:ue*2,headerPadding:`0 ${Ne}px`,headerColor:et,footerPadding:`${mt}px ${Ne}px`,footerBg:V,siderBg:"#001529",triggerHeight:Y+fr*2,triggerBg:"#002140",triggerColor:Lt,zeroTriggerWidth:Y,zeroTriggerHeight:Y,lightSiderBg:Pe,lightTriggerBg:Pe,lightTriggerColor:et}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),T=function(O,V){var ue={};for(var Y in O)Object.prototype.hasOwnProperty.call(O,Y)&&V.indexOf(Y)<0&&(ue[Y]=O[Y]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Y=Object.getOwnPropertySymbols(O);et<Y.length;et++)V.indexOf(Y[et])<0&&Object.prototype.propertyIsEnumerable.call(O,Y[et])&&(ue[Y[et]]=O[Y[et]]);return ue};const Be=G.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ze(O){let{suffixCls:V,tagName:ue,displayName:Y}=O;return et=>G.forwardRef((fr,Lt)=>G.createElement(et,Object.assign({ref:Lt,suffixCls:V,tagName:ue},fr)))}const Mt=G.forwardRef((O,V)=>{const{prefixCls:ue,suffixCls:Y,className:et,tagName:mt}=O,fr=T(O,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Lt}=G.useContext(X.E_),Pe=Lt("layout",ue),[Ne,_t]=Ke(Pe),le=Y?`${Pe}-${Y}`:Pe;return Ne(G.createElement(mt,Object.assign({className:ge()(ue||le,et,_t),ref:V},fr)))}),Ue=G.forwardRef((O,V)=>{const{direction:ue}=G.useContext(X.E_),[Y,et]=G.useState([]),{prefixCls:mt,className:fr,rootClassName:Lt,children:Pe,hasSider:Ne,tagName:_t,style:le}=O,tt=T(O,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),bt=(0,ce.Z)(tt,["suffixCls"]),{getPrefixCls:Ee,layout:Fe}=G.useContext(X.E_),Le=Ee("layout",mt),[me,xt]=Ke(Le),ot=ge()(Le,{[`${Le}-has-sider`]:typeof Ne=="boolean"?Ne:Y.length>0,[`${Le}-rtl`]:ue==="rtl"},Fe==null?void 0:Fe.className,fr,Lt,xt),Xe=G.useMemo(()=>({siderHook:{addSider:ke=>{et($t=>[].concat((0,x.Z)($t),[ke]))},removeSider:ke=>{et($t=>$t.filter(Tt=>Tt!==ke))}}}),[]);return me(G.createElement(Be.Provider,{value:Xe},G.createElement(_t,Object.assign({ref:V,className:ot,style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),le)},bt),Pe)))}),H=Ze({tagName:"div",displayName:"Layout"})(Ue),Re=Ze({suffixCls:"header",tagName:"header",displayName:"Header"})(Mt),xr=Ze({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(Mt),Oe=Ze({suffixCls:"content",tagName:"main",displayName:"Content"})(Mt);var be=H},76529:function(Ir,St,y){"use strict";y.d(St,{J:function(){return X}});var x=y(67294),J=y(4173),ge=y(60276),ce=function(ee,C){var p={};for(var fe in ee)Object.prototype.hasOwnProperty.call(ee,fe)&&C.indexOf(fe)<0&&(p[fe]=ee[fe]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,fe=Object.getOwnPropertySymbols(ee);Ke<fe.length;Ke++)C.indexOf(fe[Ke])<0&&Object.prototype.propertyIsEnumerable.call(ee,fe[Ke])&&(p[fe[Ke]]=ee[fe[Ke]]);return p};const G=x.createContext(null),X=x.forwardRef((ee,C)=>{const{children:p}=ee,fe=ce(ee,["children"]),Ke=x.useContext(G),T=x.useMemo(()=>Object.assign(Object.assign({},Ke),fe),[Ke,fe.prefixCls,fe.mode,fe.selectable]);return x.createElement(G.Provider,{value:T},x.createElement(J.BR,null,(0,ge.supportNodeRef)(p)?x.cloneElement(p,{ref:C}):p))});St.Z=G},68508:function(Ir,St,y){"use strict";y.d(St,{default:function(){return Et}});var x=y(52073),J=y(67294),ge=y(71322),ce=y(94184),G=y.n(ce),X=y(53124),ee=function(Ae,de){var te={};for(var Te in Ae)Object.prototype.hasOwnProperty.call(Ae,Te)&&de.indexOf(Te)<0&&(te[Te]=Ae[Te]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,Te=Object.getOwnPropertySymbols(Ae);Me<Te.length;Me++)de.indexOf(Te[Me])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Te[Me])&&(te[Te[Me]]=Ae[Te[Me]]);return te},p=Ae=>{const{prefixCls:de,className:te,dashed:Te}=Ae,Me=ee(Ae,["prefixCls","className","dashed"]),{getPrefixCls:ct}=J.useContext(X.E_),xe=ct("menu",de),we=G()({[`${xe}-item-divider-dashed`]:!!Te},te);return J.createElement(x.iz,Object.assign({className:we},Me))},fe=y(37419),Ke=y(10366),T=y(83062),Be=y(96159),Mt=(0,J.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),H=Ae=>{var de;const{className:te,children:Te,icon:Me,title:ct,danger:xe}=Ae,{prefixCls:we,firstLevel:At,direction:gt,disableMenuItemTitleTooltip:je,inlineCollapsed:nr}=J.useContext(Mt),lr=un=>{const _i=J.createElement("span",{className:`${we}-title-content`},Te);return(!Me||(0,Be.l$)(Te)&&Te.type==="span")&&Te&&un&&At&&typeof Te=="string"?J.createElement("div",{className:`${we}-inline-collapsed-noicon`},Te.charAt(0)):_i},{siderCollapsed:re}=J.useContext(ge.D);let jt=ct;typeof ct=="undefined"?jt=At?Te:"":ct===!1&&(jt="");const Rt={title:jt};!re&&!nr&&(Rt.title=null,Rt.open=!1);const Dr=(0,fe.Z)(Te).length;let gn=J.createElement(x.ck,Object.assign({},(0,Ke.Z)(Ae,["title","icon","danger"]),{className:G()({[`${we}-item-danger`]:xe,[`${we}-item-only-child`]:(Me?Dr+1:Dr)===1},te),title:typeof ct=="string"?ct:void 0}),(0,Be.Tm)(Me,{className:G()((0,Be.l$)(Me)?(de=Me.props)===null||de===void 0?void 0:de.className:"",`${we}-item-icon`)}),lr(nr));return je||(gn=J.createElement(T.Z,Object.assign({},Rt,{placement:gt==="rtl"?"left":"right",overlayClassName:`${we}-inline-collapsed-tooltip`}),gn)),gn},xr=Ae=>{var de;const{popupClassName:te,icon:Te,title:Me,theme:ct}=Ae,xe=J.useContext(Mt),{prefixCls:we,inlineCollapsed:At,theme:gt}=xe,je=(0,x.Xl)();let nr;if(!Te)nr=At&&!je.length&&Me&&typeof Me=="string"?J.createElement("div",{className:`${we}-inline-collapsed-noicon`},Me.charAt(0)):J.createElement("span",{className:`${we}-title-content`},Me);else{const re=(0,Be.l$)(Me)&&Me.type==="span";nr=J.createElement(J.Fragment,null,(0,Be.Tm)(Te,{className:G()((0,Be.l$)(Te)?(de=Te.props)===null||de===void 0?void 0:de.className:"",`${we}-item-icon`)}),re?Me:J.createElement("span",{className:`${we}-title-content`},Me))}const lr=J.useMemo(()=>Object.assign(Object.assign({},xe),{firstLevel:!1}),[xe]);return J.createElement(Mt.Provider,{value:lr},J.createElement(x.Wd,Object.assign({},(0,Ke.Z)(Ae,["icon"]),{title:nr,popupClassName:G()(we,te,`${we}-${ct||gt}`)})))},Oe=y(25877),be=y(60276),O=y(33603),V=y(76529),ue=function(Ae,de){var te={};for(var Te in Ae)Object.prototype.hasOwnProperty.call(Ae,Te)&&de.indexOf(Te)<0&&(te[Te]=Ae[Te]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,Te=Object.getOwnPropertySymbols(Ae);Me<Te.length;Me++)de.indexOf(Te[Me])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Te[Me])&&(te[Te[Me]]=Ae[Te[Me]]);return te};function Y(Ae){return(Ae||[]).map((de,te)=>{if(de&&typeof de=="object"){const Te=de,{label:Me,children:ct,key:xe,type:we}=Te,At=ue(Te,["label","children","key","type"]),gt=xe!=null?xe:`tmp-${te}`;return ct||we==="group"?we==="group"?J.createElement(x.BW,Object.assign({key:gt},At,{title:Me}),Y(ct)):J.createElement(xr,Object.assign({key:gt},At,{title:Me}),Y(ct)):we==="divider"?J.createElement(p,Object.assign({key:gt},At)):J.createElement(H,Object.assign({key:gt},At),Me)}return null}).filter(de=>de)}function et(Ae){return J.useMemo(()=>Ae&&Y(Ae),[Ae])}var mt=y(84780),fr=y(14747),Lt=y(33507),Pe=y(67771),Ne=y(50438),_t=y(67968),le=y(45503),bt=Ae=>{const{componentCls:de,motionDurationSlow:te,horizontalLineHeight:Te,colorSplit:Me,lineWidth:ct,lineType:xe,itemPaddingInline:we}=Ae;return{[`${de}-horizontal`]:{lineHeight:Te,border:0,borderBottom:`${ct}px ${xe} ${Me}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${de}-item, ${de}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:we},[`> ${de}-item:hover,
|
|
|
> ${de}-item-active,
|
|
|
> ${de}-submenu ${de}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${de}-item, ${de}-submenu-title`]:{transition:[`border-color ${te}`,`background ${te}`].join(",")},[`${de}-submenu-arrow`]:{display:"none"}}}},Fe=Ae=>{let{componentCls:de,menuArrowOffset:te}=Ae;return{[`${de}-rtl`]:{direction:"rtl"},[`${de}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${de}-rtl${de}-vertical,
|
|
|
${de}-submenu-rtl ${de}-vertical`]:{[`${de}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${te})`},"&::after":{transform:`rotate(45deg) translateY(${te})`}}}}};const Le=Ae=>Object.assign({},(0,fr.oN)(Ae));var xt=(Ae,de)=>{const{componentCls:te,itemColor:Te,itemSelectedColor:Me,groupTitleColor:ct,itemBg:xe,subMenuItemBg:we,itemSelectedBg:At,activeBarHeight:gt,activeBarWidth:je,activeBarBorderWidth:nr,motionDurationSlow:lr,motionEaseInOut:re,motionEaseOut:jt,itemPaddingInline:Rt,motionDurationMid:Dr,itemHoverColor:gn,lineType:un,colorSplit:_i,itemDisabledColor:_r,dangerItemColor:Bt,dangerItemHoverColor:Pi,dangerItemSelectedColor:Wi,dangerItemActiveBg:ea,dangerItemSelectedBg:wn,itemHoverBg:$i,itemActiveBg:Jt,menuSubMenuBg:Do,horizontalItemSelectedColor:xo,horizontalItemSelectedBg:co,horizontalItemBorderRadius:Ka,horizontalItemHoverBg:ta,popupBg:cr}=Ae;return{[`${te}-${de}, ${te}-${de} > ${te}`]:{color:Te,background:xe,[`&${te}-root:focus-visible`]:Object.assign({},Le(Ae)),[`${te}-item-group-title`]:{color:ct},[`${te}-submenu-selected`]:{[`> ${te}-submenu-title`]:{color:Me}},[`${te}-item-disabled, ${te}-submenu-disabled`]:{color:`${_r} !important`},[`${te}-item:not(${te}-item-selected):not(${te}-submenu-selected)`]:{[`&:hover, > ${te}-submenu-title:hover`]:{color:gn}},[`&:not(${te}-horizontal)`]:{[`${te}-item:not(${te}-item-selected)`]:{"&:hover":{backgroundColor:$i},"&:active":{backgroundColor:Jt}},[`${te}-submenu-title`]:{"&:hover":{backgroundColor:$i},"&:active":{backgroundColor:Jt}}},[`${te}-item-danger`]:{color:Bt,[`&${te}-item:hover`]:{[`&:not(${te}-item-selected):not(${te}-submenu-selected)`]:{color:Pi}},[`&${te}-item:active`]:{background:ea}},[`${te}-item a`]:{"&, &:hover":{color:"inherit"}},[`${te}-item-selected`]:{color:Me,[`&${te}-item-danger`]:{color:Wi},"a, a:hover":{color:"inherit"}},[`& ${te}-item-selected`]:{backgroundColor:At,[`&${te}-item-danger`]:{backgroundColor:wn}},[`${te}-item, ${te}-submenu-title`]:{[`&:not(${te}-item-disabled):focus-visible`]:Object.assign({},Le(Ae))},[`&${te}-submenu > ${te}`]:{backgroundColor:Do},[`&${te}-popup > ${te}`]:{backgroundColor:cr},[`&${te}-horizontal`]:Object.assign(Object.assign({},de==="dark"?{borderBottom:0}:{}),{[`> ${te}-item, > ${te}-submenu`]:{top:nr,marginTop:-nr,marginBottom:0,borderRadius:Ka,"&::after":{position:"absolute",insetInline:Rt,bottom:0,borderBottom:`${gt}px solid transparent`,transition:`border-color ${lr} ${re}`,content:'""'},"&:hover, &-active, &-open":{background:ta,"&::after":{borderBottomWidth:gt,borderBottomColor:xo}},"&-selected":{color:xo,backgroundColor:co,"&:hover":{backgroundColor:co},"&::after":{borderBottomWidth:gt,borderBottomColor:xo}}}}),[`&${te}-root`]:{[`&${te}-inline, &${te}-vertical`]:{borderInlineEnd:`${nr}px ${un} ${_i}`}},[`&${te}-inline`]:{[`${te}-sub${te}-inline`]:{background:we},[`${te}-item, ${te}-submenu-title`]:nr&&je?{width:`calc(100% + ${nr}px)`}:{},[`${te}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${je}px solid ${Me}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Dr} ${jt}`,`opacity ${Dr} ${jt}`].join(","),content:'""'},[`&${te}-item-danger`]:{"&::after":{borderInlineEndColor:Wi}}},[`${te}-selected, ${te}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Dr} ${re}`,`opacity ${Dr} ${re}`].join(",")}}}}}};const ot=Ae=>{const{componentCls:de,itemHeight:te,itemMarginInline:Te,padding:Me,menuArrowSize:ct,marginXS:xe,itemMarginBlock:we}=Ae,At=Me+ct+xe;return{[`${de}-item`]:{position:"relative",overflow:"hidden"},[`${de}-item, ${de}-submenu-title`]:{height:te,lineHeight:`${te}px`,paddingInline:Me,overflow:"hidden",textOverflow:"ellipsis",marginInline:Te,marginBlock:we,width:`calc(100% - ${Te*2}px)`},[`> ${de}-item,
|
|
|
> ${de}-submenu > ${de}-submenu-title`]:{height:te,lineHeight:`${te}px`},[`${de}-item-group-list ${de}-submenu-title,
|
|
|
${de}-submenu-title`]:{paddingInlineEnd:At}}};var ke=Ae=>{const{componentCls:de,iconCls:te,itemHeight:Te,colorTextLightSolid:Me,dropdownWidth:ct,controlHeightLG:xe,motionDurationMid:we,motionEaseOut:At,paddingXL:gt,itemMarginInline:je,fontSizeLG:nr,motionDurationSlow:lr,paddingXS:re,boxShadowSecondary:jt,collapsedWidth:Rt,collapsedIconSize:Dr}=Ae,gn={height:Te,lineHeight:`${Te}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[de]:{"&-inline, &-vertical":Object.assign({[`&${de}-root`]:{boxShadow:"none"}},ot(Ae))},[`${de}-submenu-popup`]:{[`${de}-vertical`]:Object.assign(Object.assign({},ot(Ae)),{boxShadow:jt})}},{[`${de}-submenu-popup ${de}-vertical${de}-sub`]:{minWidth:ct,maxHeight:`calc(100vh - ${xe*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${de}-inline`]:{width:"100%",[`&${de}-root`]:{[`${de}-item, ${de}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${lr}`,`background ${lr}`,`padding ${we} ${At}`].join(","),[`> ${de}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${de}-sub${de}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${de}-submenu > ${de}-submenu-title`]:gn,[`& ${de}-item-group-title`]:{paddingInlineStart:gt}},[`${de}-item`]:gn}},{[`${de}-inline-collapsed`]:{width:Rt,[`&${de}-root`]:{[`${de}-item, ${de}-submenu ${de}-submenu-title`]:{[`> ${de}-inline-collapsed-noicon`]:{fontSize:nr,textAlign:"center"}}},[`> ${de}-item,
|
|
|
> ${de}-item-group > ${de}-item-group-list > ${de}-item,
|
|
|
> ${de}-item-group > ${de}-item-group-list > ${de}-submenu > ${de}-submenu-title,
|
|
|
> ${de}-submenu > ${de}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${nr/2}px - ${je}px)`,textOverflow:"clip",[`
|
|
|
${de}-submenu-arrow,
|
|
|
${de}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${de}-item-icon, ${te}`]:{margin:0,fontSize:Dr,lineHeight:`${Te}px`,"+ span":{display:"inline-block",opacity:0}}},[`${de}-item-icon, ${te}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${de}-item-icon, ${te}`]:{display:"none"},"a, a:hover":{color:Me}},[`${de}-item-group-title`]:Object.assign(Object.assign({},fr.vS),{paddingInline:re})}}]};const $t=Ae=>{const{componentCls:de,motionDurationSlow:te,motionDurationMid:Te,motionEaseInOut:Me,motionEaseOut:ct,iconCls:xe,iconSize:we,iconMarginInlineEnd:At}=Ae;return{[`${de}-item, ${de}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${te}`,`background ${te}`,`padding ${te} ${Me}`].join(","),[`${de}-item-icon, ${xe}`]:{minWidth:we,fontSize:we,transition:[`font-size ${Te} ${ct}`,`margin ${te} ${Me}`,`color ${te}`].join(","),"+ span":{marginInlineStart:At,opacity:1,transition:[`opacity ${te} ${Me}`,`margin ${te}`,`color ${te}`].join(",")}},[`${de}-item-icon`]:Object.assign({},(0,fr.Ro)()),[`&${de}-item-only-child`]:{[`> ${xe}, > ${de}-item-icon`]:{marginInlineEnd:0}}},[`${de}-item-disabled, ${de}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${de}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Tt=Ae=>{const{componentCls:de,motionDurationSlow:te,motionEaseInOut:Te,borderRadius:Me,menuArrowSize:ct,menuArrowOffset:xe}=Ae;return{[`${de}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ae.margin,width:ct,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${te} ${Te}, opacity ${te}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:ct*.6,height:ct*.15,backgroundColor:"currentcolor",borderRadius:Me,transition:[`background ${te} ${Te}`,`transform ${te} ${Te}`,`top ${te} ${Te}`,`color ${te} ${Te}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${xe})`},"&::after":{transform:`rotate(-45deg) translateY(${xe})`}}}}},wr=Ae=>{const{antCls:de,componentCls:te,fontSize:Te,motionDurationSlow:Me,motionDurationMid:ct,motionEaseInOut:xe,paddingXS:we,padding:At,colorSplit:gt,lineWidth:je,zIndexPopup:nr,borderRadiusLG:lr,subMenuItemBorderRadius:re,menuArrowSize:jt,menuArrowOffset:Rt,lineType:Dr,menuPanelMaskInset:gn,groupTitleLineHeight:un,groupTitleFontSize:_i}=Ae;return[{"":{[`${te}`]:Object.assign(Object.assign({},(0,fr.dF)()),{"&-hidden":{display:"none"}})},[`${te}-submenu-hidden`]:{display:"none"}},{[te]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,fr.Wf)(Ae)),(0,fr.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Te,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Me} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${te}-item`]:{flex:"none"}},[`${te}-item, ${te}-submenu, ${te}-submenu-title`]:{borderRadius:Ae.itemBorderRadius},[`${te}-item-group-title`]:{padding:`${we}px ${At}px`,fontSize:_i,lineHeight:un,transition:`all ${Me}`},[`&-horizontal ${te}-submenu`]:{transition:[`border-color ${Me} ${xe}`,`background ${Me} ${xe}`].join(",")},[`${te}-submenu, ${te}-submenu-inline`]:{transition:[`border-color ${Me} ${xe}`,`background ${Me} ${xe}`,`padding ${ct} ${xe}`].join(",")},[`${te}-submenu ${te}-sub`]:{cursor:"initial",transition:[`background ${Me} ${xe}`,`padding ${Me} ${xe}`].join(",")},[`${te}-title-content`]:{transition:`color ${Me}`},[`${te}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${te}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:gt,borderStyle:Dr,borderWidth:0,borderTopWidth:je,marginBlock:je,padding:0,"&-dashed":{borderStyle:"dashed"}}}),$t(Ae)),{[`${te}-item-group`]:{[`${te}-item-group-list`]:{margin:0,padding:0,[`${te}-item, ${te}-submenu-title`]:{paddingInline:`${Te*2}px ${At}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:nr,borderRadius:lr,boxShadow:"none",transformOrigin:"0 0",[`&${te}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${gn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:gn},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:Ae.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ae.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ae.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ae.paddingXS},[`> ${te}`]:Object.assign(Object.assign(Object.assign({borderRadius:lr},$t(Ae)),Tt(Ae)),{[`${te}-item, ${te}-submenu > ${te}-submenu-title`]:{borderRadius:re},[`${te}-submenu-title::after`]:{transition:`transform ${Me} ${xe}`}})}}),Tt(Ae)),{[`&-inline-collapsed ${te}-submenu-arrow,
|
|
|
&-inline ${te}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Rt})`},"&::after":{transform:`rotate(45deg) translateX(-${Rt})`}},[`${te}-submenu-open${te}-submenu-inline > ${te}-submenu-title > ${te}-submenu-arrow`]:{transform:`translateY(-${jt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Rt})`},"&::before":{transform:`rotate(45deg) translateX(${Rt})`}}})},{[`${de}-layout-header`]:{[te]:{lineHeight:"inherit"}}}]};var Ur=(Ae,de)=>(0,_t.Z)("Menu",Te=>{if(de===!1)return[];const{colorBgElevated:Me,colorPrimary:ct,colorTextLightSolid:xe,controlHeightLG:we,fontSize:At,darkItemColor:gt,darkDangerItemColor:je,darkItemBg:nr,darkSubMenuItemBg:lr,darkItemSelectedColor:re,darkItemSelectedBg:jt,darkDangerItemSelectedBg:Rt,darkItemHoverBg:Dr,darkGroupTitleColor:gn,darkItemHoverColor:un,darkItemDisabledColor:_i,darkDangerItemHoverColor:_r,darkDangerItemSelectedColor:Bt,darkDangerItemActiveBg:Pi}=Te,Wi=At/7*5,ea=(0,le.TS)(Te,{menuArrowSize:Wi,menuHorizontalHeight:we*1.15,menuArrowOffset:`${Wi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Me}),wn=(0,le.TS)(ea,{itemColor:gt,itemHoverColor:un,groupTitleColor:gn,itemSelectedColor:re,itemBg:nr,popupBg:nr,subMenuItemBg:lr,itemActiveBg:"transparent",itemSelectedBg:jt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Dr,itemDisabledColor:_i,dangerItemColor:je,dangerItemHoverColor:_r,dangerItemSelectedColor:Bt,dangerItemActiveBg:Pi,dangerItemSelectedBg:Rt,menuSubMenuBg:lr,horizontalItemSelectedColor:xe,horizontalItemSelectedBg:ct});return[wr(ea),bt(ea),ke(ea),xt(ea,"light"),xt(wn,"dark"),Fe(ea),(0,Lt.Z)(ea),(0,Pe.oN)(ea,"slide-up"),(0,Pe.oN)(ea,"slide-down"),(0,Ne._y)(ea,"zoom-big")]},Te=>{const{colorPrimary:Me,colorError:ct,colorTextDisabled:xe,colorErrorBg:we,colorText:At,colorTextDescription:gt,colorBgContainer:je,colorFillAlter:nr,colorFillContent:lr,lineWidth:re,lineWidthBold:jt,controlItemBgActive:Rt,colorBgTextHover:Dr,controlHeightLG:gn,lineHeight:un,colorBgElevated:_i,marginXXS:_r,padding:Bt,fontSize:Pi,controlHeightSM:Wi,fontSizeLG:ea,colorTextLightSolid:wn,colorErrorHover:$i}=Te,Jt=new mt.C(wn).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Te.zIndexPopupBase+50,radiusItem:Te.borderRadiusLG,itemBorderRadius:Te.borderRadiusLG,radiusSubMenuItem:Te.borderRadiusSM,subMenuItemBorderRadius:Te.borderRadiusSM,colorItemText:At,itemColor:At,colorItemTextHover:At,itemHoverColor:At,colorItemTextHoverHorizontal:Me,horizontalItemHoverColor:Me,colorGroupTitle:gt,groupTitleColor:gt,colorItemTextSelected:Me,itemSelectedColor:Me,colorItemTextSelectedHorizontal:Me,horizontalItemSelectedColor:Me,colorItemBg:je,itemBg:je,colorItemBgHover:Dr,itemHoverBg:Dr,colorItemBgActive:lr,itemActiveBg:Rt,colorSubItemBg:nr,subMenuItemBg:nr,colorItemBgSelected:Rt,itemSelectedBg:Rt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:jt,activeBarHeight:jt,colorActiveBarBorderSize:re,activeBarBorderWidth:re,colorItemTextDisabled:xe,itemDisabledColor:xe,colorDangerItemText:ct,dangerItemColor:ct,colorDangerItemTextHover:ct,dangerItemHoverColor:ct,colorDangerItemTextSelected:ct,dangerItemSelectedColor:ct,colorDangerItemBgActive:we,dangerItemActiveBg:we,colorDangerItemBgSelected:we,dangerItemSelectedBg:we,itemMarginInline:Te.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:gn,groupTitleLineHeight:un,collapsedWidth:gn*2,popupBg:_i,itemMarginBlock:_r,itemPaddingInline:Bt,horizontalLineHeight:`${gn*1.15}px`,iconSize:Pi,iconMarginInlineEnd:Wi-Pi,collapsedIconSize:ea,groupTitleFontSize:Pi,darkItemDisabledColor:new mt.C(wn).setAlpha(.25).toRgbString(),darkItemColor:Jt,darkDangerItemColor:ct,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:wn,darkItemSelectedBg:Me,darkDangerItemSelectedBg:ct,darkItemHoverBg:"transparent",darkGroupTitleColor:Jt,darkItemHoverColor:wn,darkDangerItemHoverColor:$i,darkDangerItemSelectedColor:wn,darkDangerItemActiveBg:ct}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(Ae),nn=function(Ae,de){var te={};for(var Te in Ae)Object.prototype.hasOwnProperty.call(Ae,Te)&&de.indexOf(Te)<0&&(te[Te]=Ae[Te]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,Te=Object.getOwnPropertySymbols(Ae);Me<Te.length;Me++)de.indexOf(Te[Me])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Te[Me])&&(te[Te[Me]]=Ae[Te[Me]]);return te},Or=(0,J.forwardRef)((Ae,de)=>{var te,Te;const Me=J.useContext(V.Z),ct=Me||{},{getPrefixCls:xe,getPopupContainer:we,direction:At,menu:gt}=J.useContext(X.E_),je=xe(),{prefixCls:nr,className:lr,style:re,theme:jt="light",expandIcon:Rt,_internalDisableMenuItemTitleTooltip:Dr,inlineCollapsed:gn,siderCollapsed:un,items:_i,children:_r,rootClassName:Bt,mode:Pi,selectable:Wi,onClick:ea,overflowedIndicatorPopupClassName:wn}=Ae,$i=nn(Ae,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Jt=(0,Ke.Z)($i,["collapsedWidth"]),Do=et(_i)||_r;(te=ct.validator)===null||te===void 0||te.call(ct,{mode:Pi});const xo=(0,be.useEvent)(function(){var Ri;ea==null||ea.apply(void 0,arguments),(Ri=ct.onClick)===null||Ri===void 0||Ri.call(ct)}),co=ct.mode||Pi,Ka=Wi!=null?Wi:ct.selectable,ta=J.useMemo(()=>un!==void 0?un:gn,[gn,un]),cr={horizontal:{motionName:`${je}-slide-up`},inline:(0,O.Z)(je),other:{motionName:`${je}-zoom-big`}},Ha=xe("menu",nr||ct.prefixCls),[qs,ms]=Ur(Ha,!Me),Lo=G()(`${Ha}-${jt}`,gt==null?void 0:gt.className,lr);let Mi;if(typeof Rt=="function")Mi=Rt;else if(Rt===null||Rt===!1)Mi=null;else if(ct.expandIcon===null||ct.expandIcon===!1)Mi=null;else{const Ri=Rt!=null?Rt:ct.expandIcon;Mi=(0,Be.Tm)(Ri,{className:G()(`${Ha}-submenu-expand-icon`,(0,Be.l$)(Ri)?(Te=Ri.props)===null||Te===void 0?void 0:Te.className:"")})}const Fo=J.useMemo(()=>({prefixCls:Ha,inlineCollapsed:ta||!1,direction:At,firstLevel:!0,theme:jt,mode:co,disableMenuItemTitleTooltip:Dr}),[Ha,ta,At,Dr,jt]);return qs(J.createElement(V.Z.Provider,{value:null},J.createElement(Mt.Provider,{value:Fo},J.createElement(x.ZP,Object.assign({getPopupContainer:we,overflowedIndicator:J.createElement(Oe.Z,null),overflowedIndicatorPopupClassName:G()(Ha,`${Ha}-${jt}`,wn),mode:co,selectable:Ka,onClick:xo},Jt,{inlineCollapsed:ta,style:Object.assign(Object.assign({},gt==null?void 0:gt.style),re),className:Lo,prefixCls:Ha,direction:At,defaultMotions:cr,expandIcon:Mi,ref:de,rootClassName:G()(Bt,ms)}),Do))))});const cn=(0,J.forwardRef)((Ae,de)=>{const te=(0,J.useRef)(null),Te=J.useContext(ge.D);return(0,J.useImperativeHandle)(de,()=>({menu:te.current,focus:Me=>{var ct;(ct=te.current)===null||ct===void 0||ct.focus(Me)}})),J.createElement(Or,Object.assign({ref:te},Ae,Te))});cn.Item=H,cn.SubMenu=xr,cn.Divider=p,cn.ItemGroup=x.BW;var Et=cn},78045:function(Ir,St,y){"use strict";y.d(St,{ZP:function(){return Fe}});var x=y(94184),J=y.n(x),ge=y(5663),ce=y(1337),G=y(67294),X=y(53124),ee=y(98675);const C=G.createContext(null),p=C.Provider;var fe=C;const Ke=G.createContext(null),T=Ke.Provider;var Be=y(95860),Ze=y(17799),Mt=y(98866),Ue=y(65223),H=y(14747),Re=y(67968),xr=y(45503);const Oe=Le=>{const{componentCls:me,antCls:xt}=Le,ot=`${me}-group`;return{[ot]:Object.assign(Object.assign({},(0,H.Wf)(Le)),{display:"inline-block",fontSize:0,[`&${ot}-rtl`]:{direction:"rtl"},[`${xt}-badge ${xt}-badge-count`]:{zIndex:1},[`> ${xt}-badge:not(:first-child) > ${xt}-button-wrapper`]:{borderInlineStart:"none"}})}},be=Le=>{const{componentCls:me,wrapperMarginInlineEnd:xt,colorPrimary:ot,radioSize:Xe,motionDurationSlow:ke,motionDurationMid:$t,motionEaseInOutCirc:Tt,colorBgContainer:wr,colorBorder:Ur,lineWidth:nn,dotSize:Qr,colorBgContainerDisabled:Or,colorTextDisabled:cn,paddingXS:Et,dotColorDisabled:Ae,lineType:de,radioDotDisabledSize:te,wireframe:Te,colorWhite:Me}=Le,ct=`${me}-inner`;return{[`${me}-wrapper`]:Object.assign(Object.assign({},(0,H.Wf)(Le)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:xt,cursor:"pointer",[`&${me}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Le.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${me}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${nn}px ${de} ${ot}`,borderRadius:"50%",visibility:"hidden",content:'""'},[me]:Object.assign(Object.assign({},(0,H.Wf)(Le)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${me}-wrapper:hover &,
|
|
|
&:hover ${ct}`]:{borderColor:ot},[`${me}-input:focus-visible + ${ct}`]:Object.assign({},(0,H.oN)(Le)),[`${me}:hover::after, ${me}-wrapper:hover &::after`]:{visibility:"visible"},[`${me}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Xe,height:Xe,marginBlockStart:Xe/-2,marginInlineStart:Xe/-2,backgroundColor:Te?ot:Me,borderBlockStart:0,borderInlineStart:0,borderRadius:Xe,transform:"scale(0)",opacity:0,transition:`all ${ke} ${Tt}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Xe,height:Xe,backgroundColor:wr,borderColor:Ur,borderStyle:"solid",borderWidth:nn,borderRadius:"50%",transition:`all ${$t}`},[`${me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${me}-checked`]:{[ct]:{borderColor:ot,backgroundColor:Te?wr:ot,"&::after":{transform:`scale(${Qr/Xe})`,opacity:1,transition:`all ${ke} ${Tt}`}}},[`${me}-disabled`]:{cursor:"not-allowed",[ct]:{backgroundColor:Or,borderColor:Ur,cursor:"not-allowed","&::after":{backgroundColor:Ae}},[`${me}-input`]:{cursor:"not-allowed"},[`${me}-disabled + span`]:{color:cn,cursor:"not-allowed"},[`&${me}-checked`]:{[ct]:{"&::after":{transform:`scale(${te/Xe})`}}}},[`span${me} + *`]:{paddingInlineStart:Et,paddingInlineEnd:Et}})}},O=Le=>{const{buttonColor:me,controlHeight:xt,componentCls:ot,lineWidth:Xe,lineType:ke,colorBorder:$t,motionDurationSlow:Tt,motionDurationMid:wr,buttonPaddingInline:Ur,fontSize:nn,buttonBg:Qr,fontSizeLG:Or,controlHeightLG:cn,controlHeightSM:Et,paddingXS:Ae,borderRadius:de,borderRadiusSM:te,borderRadiusLG:Te,buttonCheckedBg:Me,buttonSolidCheckedColor:ct,colorTextDisabled:xe,colorBgContainerDisabled:we,buttonCheckedBgDisabled:At,buttonCheckedColorDisabled:gt,colorPrimary:je,colorPrimaryHover:nr,colorPrimaryActive:lr,buttonSolidCheckedBg:re,buttonSolidCheckedHoverBg:jt,buttonSolidCheckedActiveBg:Rt}=Le;return{[`${ot}-button-wrapper`]:{position:"relative",display:"inline-block",height:xt,margin:0,paddingInline:Ur,paddingBlock:0,color:me,fontSize:nn,lineHeight:`${xt-Xe*2}px`,background:Qr,border:`${Xe}px ${ke} ${$t}`,borderBlockStartWidth:Xe+.02,borderInlineStartWidth:0,borderInlineEndWidth:Xe,cursor:"pointer",transition:[`color ${wr}`,`background ${wr}`,`box-shadow ${wr}`].join(","),a:{color:me},[`> ${ot}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Xe,insetInlineStart:-Xe,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Xe,paddingInline:0,backgroundColor:$t,transition:`background-color ${Tt}`,content:'""'}},"&:first-child":{borderInlineStart:`${Xe}px ${ke} ${$t}`,borderStartStartRadius:de,borderEndStartRadius:de},"&:last-child":{borderStartEndRadius:de,borderEndEndRadius:de},"&:first-child:last-child":{borderRadius:de},[`${ot}-group-large &`]:{height:cn,fontSize:Or,lineHeight:`${cn-Xe*2}px`,"&:first-child":{borderStartStartRadius:Te,borderEndStartRadius:Te},"&:last-child":{borderStartEndRadius:Te,borderEndEndRadius:Te}},[`${ot}-group-small &`]:{height:Et,paddingInline:Ae-Xe,paddingBlock:0,lineHeight:`${Et-Xe*2}px`,"&:first-child":{borderStartStartRadius:te,borderEndStartRadius:te},"&:last-child":{borderStartEndRadius:te,borderEndEndRadius:te}},"&:hover":{position:"relative",color:je},"&:has(:focus-visible)":Object.assign({},(0,H.oN)(Le)),[`${ot}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${ot}-button-wrapper-disabled)`]:{zIndex:1,color:je,background:Me,borderColor:je,"&::before":{backgroundColor:je},"&:first-child":{borderColor:je},"&:hover":{color:nr,borderColor:nr,"&::before":{backgroundColor:nr}},"&:active":{color:lr,borderColor:lr,"&::before":{backgroundColor:lr}}},[`${ot}-group-solid &-checked:not(${ot}-button-wrapper-disabled)`]:{color:ct,background:re,borderColor:re,"&:hover":{color:ct,background:jt,borderColor:jt},"&:active":{color:ct,background:Rt,borderColor:Rt}},"&-disabled":{color:xe,backgroundColor:we,borderColor:$t,cursor:"not-allowed","&:first-child, &:hover":{color:xe,backgroundColor:we,borderColor:$t}},[`&-disabled${ot}-button-wrapper-checked`]:{color:gt,backgroundColor:At,borderColor:$t,boxShadow:"none"}}}},V=Le=>Le-4*2;var ue=(0,Re.Z)("Radio",Le=>{const{controlOutline:me,controlOutlineWidth:xt,radioSize:ot}=Le,Xe=`0 0 0 ${xt}px ${me}`,ke=Xe,$t=V(ot),Tt=(0,xr.TS)(Le,{radioDotDisabledSize:$t,radioFocusShadow:Xe,radioButtonFocusShadow:ke});return[Oe(Tt),be(Tt),O(Tt)]},Le=>{const{wireframe:me,padding:xt,marginXS:ot,lineWidth:Xe,fontSizeLG:ke,colorText:$t,colorBgContainer:Tt,colorTextDisabled:wr,controlItemBgActiveDisabled:Ur,colorTextLightSolid:nn,colorPrimary:Qr,colorPrimaryHover:Or,colorPrimaryActive:cn}=Le,Et=4,Ae=ke,de=me?V(Ae):Ae-(Et+Xe)*2;return{radioSize:Ae,dotSize:de,dotColorDisabled:wr,buttonSolidCheckedColor:nn,buttonSolidCheckedBg:Qr,buttonSolidCheckedHoverBg:Or,buttonSolidCheckedActiveBg:cn,buttonBg:Tt,buttonCheckedBg:Tt,buttonColor:$t,buttonCheckedBgDisabled:Ur,buttonCheckedColorDisabled:wr,buttonPaddingInline:xt-Xe,wrapperMarginInlineEnd:ot}}),Y=y(45353),et=y(92429),mt=function(Le,me){var xt={};for(var ot in Le)Object.prototype.hasOwnProperty.call(Le,ot)&&me.indexOf(ot)<0&&(xt[ot]=Le[ot]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,ot=Object.getOwnPropertySymbols(Le);Xe<ot.length;Xe++)me.indexOf(ot[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Le,ot[Xe])&&(xt[ot[Xe]]=Le[ot[Xe]]);return xt};const fr=(Le,me)=>{var xt,ot;const Xe=G.useContext(fe),ke=G.useContext(Ke),{getPrefixCls:$t,direction:Tt,radio:wr}=G.useContext(X.E_),Ur=G.useRef(null),nn=(0,Ze.sQ)(me,Ur),{isFormItemInput:Qr}=G.useContext(Ue.aM),Or=lr=>{var re,jt;(re=Le.onChange)===null||re===void 0||re.call(Le,lr),(jt=Xe==null?void 0:Xe.onChange)===null||jt===void 0||jt.call(Xe,lr)},{prefixCls:cn,className:Et,rootClassName:Ae,children:de,style:te}=Le,Te=mt(Le,["prefixCls","className","rootClassName","children","style"]),Me=$t("radio",cn),ct=((Xe==null?void 0:Xe.optionType)||ke)==="button",xe=ct?`${Me}-button`:Me,[we,At]=ue(Me),gt=Object.assign({},Te),je=G.useContext(Mt.Z);Xe&&(gt.name=Xe.name,gt.onChange=Or,gt.checked=Le.value===Xe.value,gt.disabled=(xt=gt.disabled)!==null&&xt!==void 0?xt:Xe.disabled),gt.disabled=(ot=gt.disabled)!==null&&ot!==void 0?ot:je;const nr=J()(`${xe}-wrapper`,{[`${xe}-wrapper-checked`]:gt.checked,[`${xe}-wrapper-disabled`]:gt.disabled,[`${xe}-wrapper-rtl`]:Tt==="rtl",[`${xe}-wrapper-in-form-item`]:Qr},wr==null?void 0:wr.className,Et,Ae,At);return we(G.createElement(Y.Z,{component:"Radio",disabled:gt.disabled},G.createElement("label",{className:nr,style:Object.assign(Object.assign({},wr==null?void 0:wr.style),te),onMouseEnter:Le.onMouseEnter,onMouseLeave:Le.onMouseLeave},G.createElement(Be.Z,Object.assign({},gt,{className:J()(gt.className,!ct&&et.A),type:"radio",prefixCls:xe,ref:nn})),de!==void 0?G.createElement("span",null,de):null)))};var Pe=G.forwardRef(fr);const Ne=G.forwardRef((Le,me)=>{const{getPrefixCls:xt,direction:ot}=G.useContext(X.E_),[Xe,ke]=(0,ge.Z)(Le.defaultValue,{value:Le.value}),$t=re=>{const jt=Xe,Rt=re.target.value;"value"in Le||ke(Rt);const{onChange:Dr}=Le;Dr&&Rt!==jt&&Dr(re)},{prefixCls:Tt,className:wr,rootClassName:Ur,options:nn,buttonStyle:Qr="outline",disabled:Or,children:cn,size:Et,style:Ae,id:de,onMouseEnter:te,onMouseLeave:Te,onFocus:Me,onBlur:ct}=Le,xe=xt("radio",Tt),we=`${xe}-group`,[At,gt]=ue(xe);let je=cn;nn&&nn.length>0&&(je=nn.map(re=>typeof re=="string"||typeof re=="number"?G.createElement(Pe,{key:re.toString(),prefixCls:xe,disabled:Or,value:re,checked:Xe===re},re):G.createElement(Pe,{key:`radio-group-value-options-${re.value}`,prefixCls:xe,disabled:re.disabled||Or,value:re.value,checked:Xe===re.value,title:re.title,style:re.style},re.label)));const nr=(0,ee.Z)(Et),lr=J()(we,`${we}-${Qr}`,{[`${we}-${nr}`]:nr,[`${we}-rtl`]:ot==="rtl"},wr,Ur,gt);return At(G.createElement("div",Object.assign({},(0,ce.Z)(Le,{aria:!0,data:!0}),{className:lr,style:Ae,onMouseEnter:te,onMouseLeave:Te,onFocus:Me,onBlur:ct,id:de,ref:me}),G.createElement(p,{value:{onChange:$t,value:Xe,disabled:Le.disabled,name:Le.name,optionType:Le.optionType}},je)))});var _t=G.memo(Ne),le=function(Le,me){var xt={};for(var ot in Le)Object.prototype.hasOwnProperty.call(Le,ot)&&me.indexOf(ot)<0&&(xt[ot]=Le[ot]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,ot=Object.getOwnPropertySymbols(Le);Xe<ot.length;Xe++)me.indexOf(ot[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Le,ot[Xe])&&(xt[ot[Xe]]=Le[ot[Xe]]);return xt};const tt=(Le,me)=>{const{getPrefixCls:xt}=G.useContext(X.E_),{prefixCls:ot}=Le,Xe=le(Le,["prefixCls"]),ke=xt("radio",ot);return G.createElement(T,{value:"button"},G.createElement(Pe,Object.assign({prefixCls:ke},Xe,{type:"radio",ref:me})))};var bt=G.forwardRef(tt);const Ee=Pe;Ee.Button=bt,Ee.Group=_t,Ee.__ANT_RADIO=!0;var Fe=Ee},33507:function(Ir,St){"use strict";const y=x=>({[x.componentCls]:{[`${x.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${x.motionDurationMid} ${x.motionEaseInOut},
|
|
|
opacity ${x.motionDurationMid} ${x.motionEaseInOut} !important`}},[`${x.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${x.motionDurationMid} ${x.motionEaseInOut},
|
|
|
opacity ${x.motionDurationMid} ${x.motionEaseInOut} !important`}}});St.Z=y},33297:function(Ir,St,y){"use strict";y.d(St,{Fm:function(){return T}});var x=y(45930),J=y(93590);const ge=new x.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ce=new x.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),G=new x.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),X=new x.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ee=new x.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),C=new x.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),p=new x.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),fe=new x.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ke={"move-up":{inKeyframes:p,outKeyframes:fe},"move-down":{inKeyframes:ge,outKeyframes:ce},"move-left":{inKeyframes:G,outKeyframes:X},"move-right":{inKeyframes:ee,outKeyframes:C}},T=(Be,Ze)=>{const{antCls:Mt}=Be,Ue=`${Mt}-${Ze}`,{inKeyframes:H,outKeyframes:Re}=Ke[Ze];return[(0,J.R)(Ue,H,Re,Be.motionDurationMid),{[`
|
|
|
${Ue}-enter,
|
|
|
${Ue}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:Be.motionEaseOutCirc},[`${Ue}-leave`]:{animationTimingFunction:Be.motionEaseInOutCirc}}]}},67771:function(Ir,St,y){"use strict";y.d(St,{Qt:function(){return G},Uw:function(){return ce},fJ:function(){return ge},ly:function(){return X},oN:function(){return T}});var x=y(45930),J=y(93590);const ge=new x.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ce=new x.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),G=new x.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),X=new x.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ee=new x.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),C=new x.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new x.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),fe=new x.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ke={"slide-up":{inKeyframes:ge,outKeyframes:ce},"slide-down":{inKeyframes:G,outKeyframes:X},"slide-left":{inKeyframes:ee,outKeyframes:C},"slide-right":{inKeyframes:p,outKeyframes:fe}},T=(Be,Ze)=>{const{antCls:Mt}=Be,Ue=`${Mt}-${Ze}`,{inKeyframes:H,outKeyframes:Re}=Ke[Ze];return[(0,J.R)(Ue,H,Re,Be.motionDurationMid),{[`
|
|
|
${Ue}-enter,
|
|
|
${Ue}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Be.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Ue}-leave`]:{animationTimingFunction:Be.motionEaseInQuint}}]}},66368:function(Ir,St,y){"use strict";y.d(St,{default:function(){return _o}});var x=y(73475),J=y(25877),ge=y(38308),ce=y(94184),G=y.n(ce),X=y(87462),ee=y(4942),C=y(1413),p=y(97685),fe=y(71002),Ke=y(45987),T=y(67294),Be=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var w=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(w)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(w==null?void 0:w.substr(0,4))};function Ze(w){var D=T.useRef();D.current=w;var ne=T.useCallback(function(){for(var ae,_e=arguments.length,Ie=new Array(_e),at=0;at<_e;at++)Ie[at]=arguments[at];return(ae=D.current)===null||ae===void 0?void 0:ae.call.apply(ae,[D].concat(Ie))},[]);return ne}function Mt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ue=Mt()?T.useLayoutEffect:T.useEffect,H=function(D,ne){var ae=T.useRef(!0);Ue(function(){return D(ae.current)},ne),Ue(function(){return ae.current=!1,function(){ae.current=!0}},[])},Re=function(D,ne){H(function(ae){if(!ae)return D()},ne)},xr=null;function Oe(w){var D=T.useRef(!1),ne=T.useState(w),ae=(0,p.Z)(ne,2),_e=ae[0],Ie=ae[1];T.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]);function at(wt,pr){pr&&D.current||Ie(wt)}return[_e,at]}function be(w){return w!==void 0}function O(w,D){var ne=D||{},ae=ne.defaultValue,_e=ne.value,Ie=ne.onChange,at=ne.postState,wt=Oe(function(){return be(_e)?_e:be(ae)?typeof ae=="function"?ae():ae:typeof w=="function"?w():w}),pr=(0,p.Z)(wt,2),ur=pr[0],qr=pr[1],Wt=_e!==void 0?_e:ur,kr=at?at(Wt):Wt,Yr=Ze(Ie),an=Oe([Wt]),Zn=(0,p.Z)(an,2),qn=Zn[0],Gt=Zn[1];Re(function(){var Kt=qn[0];ur!==Kt&&Yr(ur,Kt)},[qn]),Re(function(){be(_e)||qr(_e)},[_e]);var It=Ze(function(Kt,gr){qr(Kt,gr),Gt([Wt],gr)});return[kr,It]}var V=y(62874),ue=(0,T.createContext)(null),Y=T.forwardRef(function(w,D){var ne=w.prefixCls,ae=w.className,_e=w.style,Ie=w.id,at=w.active,wt=w.tabKey,pr=w.children;return T.createElement("div",{id:Ie&&"".concat(Ie,"-panel-").concat(wt),role:"tabpanel",tabIndex:at?0:-1,"aria-labelledby":Ie&&"".concat(Ie,"-tab-").concat(wt),"aria-hidden":!at,style:_e,className:G()(ne,at&&"".concat(ne,"-active"),ae),ref:D},pr)}),et=Y,mt=["key","forceRender","style","className"];function fr(w){var D=w.id,ne=w.activeKey,ae=w.animated,_e=w.tabPosition,Ie=w.destroyInactiveTabPane,at=T.useContext(ue),wt=at.prefixCls,pr=at.tabs,ur=ae.tabPane,qr="".concat(wt,"-tabpane");return T.createElement("div",{className:G()("".concat(wt,"-content-holder"))},T.createElement("div",{className:G()("".concat(wt,"-content"),"".concat(wt,"-content-").concat(_e),(0,ee.Z)({},"".concat(wt,"-content-animated"),ur))},pr.map(function(Wt){var kr=Wt.key,Yr=Wt.forceRender,an=Wt.style,Zn=Wt.className,qn=(0,Ke.Z)(Wt,mt),Gt=kr===ne;return T.createElement(V.Z,(0,X.Z)({key:kr,visible:Gt,forceRender:Yr,removeOnLeave:!!Ie,leavedClassName:"".concat(qr,"-hidden")},ae.tabPaneMotion),function(It,Kt){var gr=It.style,en=It.className;return T.createElement(et,(0,X.Z)({},qn,{prefixCls:qr,id:D,tabKey:kr,animated:ur,active:Gt,style:(0,C.Z)((0,C.Z)({},an),gr),className:G()(Zn,en),ref:Kt}))})})))}var Lt=y(74902),Pe=y(48555),Ne=y(59864);function _t(w,D,ne){var ae=T.useRef({});return(!("value"in ae.current)||ne(ae.current.condition,D))&&(ae.current.value=w(),ae.current.condition=D),ae.current.value}function le(w,D){typeof w=="function"?w(D):(0,fe.Z)(w)==="object"&&w&&"current"in w&&(w.current=D)}function tt(){for(var w=arguments.length,D=new Array(w),ne=0;ne<w;ne++)D[ne]=arguments[ne];var ae=D.filter(function(_e){return _e});return ae.length<=1?ae[0]:function(_e){D.forEach(function(Ie){le(Ie,_e)})}}function bt(){for(var w=arguments.length,D=new Array(w),ne=0;ne<w;ne++)D[ne]=arguments[ne];return _t(function(){return tt.apply(void 0,D)},D,function(ae,_e){return ae.length===_e.length&&ae.every(function(Ie,at){return Ie===_e[at]})})}function Ee(w){var D,ne,ae=isMemo(w)?w.type.type:w.type;return!(typeof ae=="function"&&!((D=ae.prototype)!==null&&D!==void 0&&D.render)||typeof w=="function"&&!((ne=w.prototype)!==null&&ne!==void 0&&ne.render))}var Fe={width:0,height:0,left:0,top:0};function Le(w,D,ne){return(0,T.useMemo)(function(){for(var ae,_e=new Map,Ie=D.get((ae=w[0])===null||ae===void 0?void 0:ae.key)||Fe,at=Ie.left+Ie.width,wt=0;wt<w.length;wt+=1){var pr=w[wt].key,ur=D.get(pr);if(!ur){var qr;ur=D.get((qr=w[wt-1])===null||qr===void 0?void 0:qr.key)||Fe}var Wt=_e.get(pr)||(0,C.Z)({},ur);Wt.right=at-Wt.left-Wt.width,_e.set(pr,Wt)}return _e},[w.map(function(ae){return ae.key}).join("_"),D,ne])}function me(w,D){var ne=T.useRef(w),ae=T.useState({}),_e=(0,p.Z)(ae,2),Ie=_e[1];function at(wt){var pr=typeof wt=="function"?wt(ne.current):wt;pr!==ne.current&&D(pr,ne.current),ne.current=pr,Ie({})}return[ne.current,at]}var xt=.1,ot=.01,Xe=20,ke=Math.pow(.995,Xe);function $t(w,D){var ne=(0,T.useState)(),ae=(0,p.Z)(ne,2),_e=ae[0],Ie=ae[1],at=(0,T.useState)(0),wt=(0,p.Z)(at,2),pr=wt[0],ur=wt[1],qr=(0,T.useState)(0),Wt=(0,p.Z)(qr,2),kr=Wt[0],Yr=Wt[1],an=(0,T.useState)(),Zn=(0,p.Z)(an,2),qn=Zn[0],Gt=Zn[1],It=(0,T.useRef)();function Kt(tn){var bn=tn.touches[0],ma=bn.screenX,Fr=bn.screenY;Ie({x:ma,y:Fr}),window.clearInterval(It.current)}function gr(tn){if(_e){tn.preventDefault();var bn=tn.touches[0],ma=bn.screenX,Fr=bn.screenY;Ie({x:ma,y:Fr});var aa=ma-_e.x,kn=Fr-_e.y;D(aa,kn);var va=Date.now();ur(va),Yr(va-pr),Gt({x:aa,y:kn})}}function en(){if(_e&&(Ie(null),Gt(null),qn)){var tn=qn.x/kr,bn=qn.y/kr,ma=Math.abs(tn),Fr=Math.abs(bn);if(Math.max(ma,Fr)<xt)return;var aa=tn,kn=bn;It.current=window.setInterval(function(){if(Math.abs(aa)<ot&&Math.abs(kn)<ot){window.clearInterval(It.current);return}aa*=ke,kn*=ke,D(aa*Xe,kn*Xe)},Xe)}}var Xr=(0,T.useRef)();function Vn(tn){var bn=tn.deltaX,ma=tn.deltaY,Fr=0,aa=Math.abs(bn),kn=Math.abs(ma);aa===kn?Fr=Xr.current==="x"?bn:ma:aa>kn?(Fr=bn,Xr.current="x"):(Fr=ma,Xr.current="y"),D(-Fr,-Fr)&&tn.preventDefault()}var na=(0,T.useRef)(null);na.current={onTouchStart:Kt,onTouchMove:gr,onTouchEnd:en,onWheel:Vn},T.useEffect(function(){function tn(aa){na.current.onTouchStart(aa)}function bn(aa){na.current.onTouchMove(aa)}function ma(aa){na.current.onTouchEnd(aa)}function Fr(aa){na.current.onWheel(aa)}return document.addEventListener("touchmove",bn,{passive:!1}),document.addEventListener("touchend",ma,{passive:!1}),w.current.addEventListener("touchstart",tn,{passive:!1}),w.current.addEventListener("wheel",Fr),function(){document.removeEventListener("touchmove",bn),document.removeEventListener("touchend",ma)}},[])}function Tt(w){var D=(0,T.useState)(0),ne=(0,p.Z)(D,2),ae=ne[0],_e=ne[1],Ie=(0,T.useRef)(0),at=(0,T.useRef)();return at.current=w,Re(function(){var wt;(wt=at.current)===null||wt===void 0||wt.call(at)},[ae]),function(){Ie.current===ae&&(Ie.current+=1,_e(Ie.current))}}function wr(w){var D=(0,T.useRef)([]),ne=(0,T.useState)({}),ae=(0,p.Z)(ne,2),_e=ae[1],Ie=(0,T.useRef)(typeof w=="function"?w():w),at=Tt(function(){var pr=Ie.current;D.current.forEach(function(ur){pr=ur(pr)}),D.current=[],Ie.current=pr,_e({})});function wt(pr){D.current.push(pr),at()}return[Ie.current,wt]}var Ur={width:0,height:0,left:0,top:0,right:0};function nn(w,D,ne,ae,_e,Ie,at){var wt=at.tabs,pr=at.tabPosition,ur=at.rtl,qr,Wt,kr;return["top","bottom"].includes(pr)?(qr="width",Wt=ur?"right":"left",kr=Math.abs(ne)):(qr="height",Wt="top",kr=-ne),(0,T.useMemo)(function(){if(!wt.length)return[0,0];for(var Yr=wt.length,an=Yr,Zn=0;Zn<Yr;Zn+=1){var qn=w.get(wt[Zn].key)||Ur;if(qn[Wt]+qn[qr]>kr+D){an=Zn-1;break}}for(var Gt=0,It=Yr-1;It>=0;It-=1){var Kt=w.get(wt[It].key)||Ur;if(Kt[Wt]<kr){Gt=It+1;break}}return Gt>=an?[0,0]:[Gt,an]},[w,D,ae,_e,Ie,kr,pr,wt.map(function(Yr){return Yr.key}).join("_"),ur])}function Qr(w){var D;return w instanceof Map?(D={},w.forEach(function(ne,ae){D[ae]=ne})):D=w,JSON.stringify(D)}var Or="TABS_DQ";function cn(w){return String(w).replace(/"/g,Or)}function Et(w,D,ne,ae){return!(!ne||ae||w===!1||w===void 0&&(D===!1||D===null))}function Ae(w,D){var ne=w.prefixCls,ae=w.editable,_e=w.locale,Ie=w.style;return!ae||ae.showAdd===!1?null:T.createElement("button",{ref:D,type:"button",className:"".concat(ne,"-nav-add"),style:Ie,"aria-label":(_e==null?void 0:_e.addAriaLabel)||"Add tab",onClick:function(wt){ae.onEdit("add",{event:wt})}},ae.addIcon||"+")}var de=T.forwardRef(Ae),te=T.forwardRef(function(w,D){var ne=w.position,ae=w.prefixCls,_e=w.extra;if(!_e)return null;var Ie,at={};return(0,fe.Z)(_e)==="object"&&!T.isValidElement(_e)?at=_e:at.right=_e,ne==="right"&&(Ie=at.right),ne==="left"&&(Ie=at.left),Ie?T.createElement("div",{className:"".concat(ae,"-extra-content"),ref:D},Ie):null}),Te=te,Me=y(62709);function ct(w,D,ne){var ae=React.useRef({});return(!("value"in ae.current)||ne(ae.current.condition,D))&&(ae.current.value=w(),ae.current.condition=D),ae.current.value}function xe(w,D){typeof w=="function"?w(D):(0,fe.Z)(w)==="object"&&w&&"current"in w&&(w.current=D)}function we(){for(var w=arguments.length,D=new Array(w),ne=0;ne<w;ne++)D[ne]=arguments[ne];var ae=D.filter(function(_e){return _e});return ae.length<=1?ae[0]:function(_e){D.forEach(function(Ie){xe(Ie,_e)})}}function At(){for(var w=arguments.length,D=new Array(w),ne=0;ne<w;ne++)D[ne]=arguments[ne];return useMemo(function(){return we.apply(void 0,D)},D,function(ae,_e){return ae.length===_e.length&&ae.every(function(Ie,at){return Ie===_e[at]})})}function gt(w){var D,ne,ae=(0,Ne.isMemo)(w)?w.type.type:w.type;return!(typeof ae=="function"&&!((D=ae.prototype)!==null&&D!==void 0&&D.render)||typeof w=="function"&&!((ne=w.prototype)!==null&&ne!==void 0&&ne.render))}var je={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(D){var ne=D.keyCode;if(D.altKey&&!D.ctrlKey||D.metaKey||ne>=je.F1&&ne<=je.F12)return!1;switch(ne){case je.ALT:case je.CAPS_LOCK:case je.CONTEXT_MENU:case je.CTRL:case je.DOWN:case je.END:case je.ESC:case je.HOME:case je.INSERT:case je.LEFT:case je.MAC_FF_META:case je.META:case je.NUMLOCK:case je.NUM_CENTER:case je.PAGE_DOWN:case je.PAGE_UP:case je.PAUSE:case je.PRINT_SCREEN:case je.RIGHT:case je.SHIFT:case je.UP:case je.WIN_KEY:case je.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(D){if(D>=je.ZERO&&D<=je.NINE||D>=je.NUM_ZERO&&D<=je.NUM_MULTIPLY||D>=je.A&&D<=je.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&D===0)return!0;switch(D){case je.SPACE:case je.QUESTION_MARK:case je.NUM_PLUS:case je.NUM_MINUS:case je.NUM_PERIOD:case je.NUM_DIVISION:case je.SEMICOLON:case je.DASH:case je.EQUALS:case je.COMMA:case je.PERIOD:case je.SLASH:case je.APOSTROPHE:case je.SINGLE_QUOTE:case je.OPEN_SQUARE_BRACKET:case je.BACKSLASH:case je.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},nr=je,lr=function(D){return+setTimeout(D,16)},re=function(D){return clearTimeout(D)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(lr=function(D){return window.requestAnimationFrame(D)},re=function(D){return window.cancelAnimationFrame(D)});var jt=0,Rt=new Map;function Dr(w){Rt.delete(w)}var gn=function(D){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;jt+=1;var ae=jt;function _e(Ie){if(Ie===0)Dr(ae),D();else{var at=lr(function(){_e(Ie-1)});Rt.set(ae,at)}}return _e(ne),ae};gn.cancel=function(w){var D=Rt.get(w);return Dr(D),re(D)};var un=gn,_i=nr.ESC,_r=nr.TAB;function Bt(w){var D=w.visible,ne=w.triggerRef,ae=w.onVisibleChange,_e=w.autoFocus,Ie=w.overlayRef,at=T.useRef(!1),wt=function(){if(D){var Wt,kr;(Wt=ne.current)===null||Wt===void 0||(kr=Wt.focus)===null||kr===void 0||kr.call(Wt),ae==null||ae(!1)}},pr=function(){var Wt;return(Wt=Ie.current)!==null&&Wt!==void 0&&Wt.focus?(Ie.current.focus(),at.current=!0,!0):!1},ur=function(Wt){switch(Wt.keyCode){case _i:wt();break;case _r:{var kr=!1;at.current||(kr=pr()),kr?Wt.preventDefault():wt();break}}};T.useEffect(function(){return D?(window.addEventListener("keydown",ur),_e&&un(pr,3),function(){window.removeEventListener("keydown",ur),at.current=!1}):function(){at.current=!1}},[D])}var Pi=(0,T.forwardRef)(function(w,D){var ne=w.overlay,ae=w.arrow,_e=w.prefixCls,Ie=(0,T.useMemo)(function(){var wt;return typeof ne=="function"?wt=ne():wt=ne,wt},[ne]),at=we(D,Ie==null?void 0:Ie.ref);return T.createElement(T.Fragment,null,ae&&T.createElement("div",{className:"".concat(_e,"-arrow")}),T.cloneElement(Ie,{ref:gt(Ie)?at:void 0}))}),Wi=Pi,ea={adjustX:1,adjustY:1},wn=[0,0],$i={topLeft:{points:["bl","tl"],overflow:ea,offset:[0,-4],targetOffset:wn},top:{points:["bc","tc"],overflow:ea,offset:[0,-4],targetOffset:wn},topRight:{points:["br","tr"],overflow:ea,offset:[0,-4],targetOffset:wn},bottomLeft:{points:["tl","bl"],overflow:ea,offset:[0,4],targetOffset:wn},bottom:{points:["tc","bc"],overflow:ea,offset:[0,4],targetOffset:wn},bottomRight:{points:["tr","br"],overflow:ea,offset:[0,4],targetOffset:wn}},Jt=$i,Do=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function xo(w,D){var ne,ae=w.arrow,_e=ae===void 0?!1:ae,Ie=w.prefixCls,at=Ie===void 0?"rc-dropdown":Ie,wt=w.transitionName,pr=w.animation,ur=w.align,qr=w.placement,Wt=qr===void 0?"bottomLeft":qr,kr=w.placements,Yr=kr===void 0?Jt:kr,an=w.getPopupContainer,Zn=w.showAction,qn=w.hideAction,Gt=w.overlayClassName,It=w.overlayStyle,Kt=w.visible,gr=w.trigger,en=gr===void 0?["hover"]:gr,Xr=w.autoFocus,Vn=w.overlay,na=w.children,tn=w.onVisibleChange,bn=(0,Ke.Z)(w,Do),ma=T.useState(),Fr=(0,p.Z)(ma,2),aa=Fr[0],kn=Fr[1],va="visible"in w?Kt:aa,Ui=T.useRef(null),es=T.useRef(null),Pa=T.useRef(null);T.useImperativeHandle(D,function(){return Ui.current});var vi=function(ni){kn(ni),tn==null||tn(ni)};Bt({visible:va,triggerRef:Pa,onVisibleChange:vi,autoFocus:Xr,overlayRef:es});var ji=function(ni){var gs=w.onOverlayClick;kn(!1),gs&&gs(ni)},Zo=function(){return T.createElement(Wi,{ref:es,overlay:Vn,prefixCls:at,arrow:_e})},Pn=function(){return typeof Vn=="function"?Zo:Zo()},ga=function(){var ni=w.minOverlayWidthMatchTrigger,gs=w.alignPoint;return"minOverlayWidthMatchTrigger"in w?ni:!gs},po=function(){var ni=w.openClassName;return ni!==void 0?ni:"".concat(at,"-open")},ki=T.cloneElement(na,{className:G()((ne=na.props)===null||ne===void 0?void 0:ne.className,va&&po()),ref:gt(na)?we(Pa,na.ref):void 0}),Wa=qn;return!Wa&&en.indexOf("contextMenu")!==-1&&(Wa=["click"]),T.createElement(Me.Z,(0,X.Z)({builtinPlacements:Yr},bn,{prefixCls:at,ref:Ui,popupClassName:G()(Gt,(0,ee.Z)({},"".concat(at,"-show-arrow"),_e)),popupStyle:It,action:en,showAction:Zn,hideAction:Wa,popupPlacement:Wt,popupAlign:ur,popupTransitionName:wt,popupAnimation:pr,popupVisible:va,stretch:ga()?"minWidth":"",popup:Pn(),onPopupVisibleChange:vi,onPopupClick:ji,getPopupContainer:an}),ki)}var co=T.forwardRef(xo),Ka=co,ta=y(52073),cr={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(D){var ne=D.keyCode;if(D.altKey&&!D.ctrlKey||D.metaKey||ne>=cr.F1&&ne<=cr.F12)return!1;switch(ne){case cr.ALT:case cr.CAPS_LOCK:case cr.CONTEXT_MENU:case cr.CTRL:case cr.DOWN:case cr.END:case cr.ESC:case cr.HOME:case cr.INSERT:case cr.LEFT:case cr.MAC_FF_META:case cr.META:case cr.NUMLOCK:case cr.NUM_CENTER:case cr.PAGE_DOWN:case cr.PAGE_UP:case cr.PAUSE:case cr.PRINT_SCREEN:case cr.RIGHT:case cr.SHIFT:case cr.UP:case cr.WIN_KEY:case cr.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(D){if(D>=cr.ZERO&&D<=cr.NINE||D>=cr.NUM_ZERO&&D<=cr.NUM_MULTIPLY||D>=cr.A&&D<=cr.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&D===0)return!0;switch(D){case cr.SPACE:case cr.QUESTION_MARK:case cr.NUM_PLUS:case cr.NUM_MINUS:case cr.NUM_PERIOD:case cr.NUM_DIVISION:case cr.SEMICOLON:case cr.DASH:case cr.EQUALS:case cr.COMMA:case cr.PERIOD:case cr.SLASH:case cr.APOSTROPHE:case cr.SINGLE_QUOTE:case cr.OPEN_SQUARE_BRACKET:case cr.BACKSLASH:case cr.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ha=cr;function qs(w,D){var ne=w.prefixCls,ae=w.id,_e=w.tabs,Ie=w.locale,at=w.mobile,wt=w.moreIcon,pr=wt===void 0?"More":wt,ur=w.moreTransitionName,qr=w.style,Wt=w.className,kr=w.editable,Yr=w.tabBarGutter,an=w.rtl,Zn=w.removeAriaLabel,qn=w.onTabClick,Gt=w.getPopupContainer,It=w.popupClassName,Kt=(0,T.useState)(!1),gr=(0,p.Z)(Kt,2),en=gr[0],Xr=gr[1],Vn=(0,T.useState)(null),na=(0,p.Z)(Vn,2),tn=na[0],bn=na[1],ma="".concat(ae,"-more-popup"),Fr="".concat(ne,"-dropdown"),aa=tn!==null?"".concat(ma,"-").concat(tn):null,kn=Ie==null?void 0:Ie.dropdownAriaLabel;function va(Pn,ga){Pn.preventDefault(),Pn.stopPropagation(),kr.onEdit("remove",{key:ga,event:Pn})}var Ui=T.createElement(ta.ZP,{onClick:function(ga){var po=ga.key,ki=ga.domEvent;qn(po,ki),Xr(!1)},prefixCls:"".concat(Fr,"-menu"),id:ma,tabIndex:-1,role:"listbox","aria-activedescendant":aa,selectedKeys:[tn],"aria-label":kn!==void 0?kn:"expanded dropdown"},_e.map(function(Pn){var ga=Pn.closable,po=Pn.disabled,ki=Pn.closeIcon,Wa=Pn.key,Gi=Pn.label,ni=Et(ga,ki,kr,po);return T.createElement(ta.sN,{key:Wa,id:"".concat(ma,"-").concat(Wa),role:"option","aria-controls":ae&&"".concat(ae,"-panel-").concat(Wa),disabled:po},T.createElement("span",null,Gi),ni&&T.createElement("button",{type:"button","aria-label":Zn||"remove",tabIndex:0,className:"".concat(Fr,"-menu-item-remove"),onClick:function(bs){bs.stopPropagation(),va(bs,Wa)}},ki||kr.removeIcon||"\xD7"))}));function es(Pn){for(var ga=_e.filter(function(ni){return!ni.disabled}),po=ga.findIndex(function(ni){return ni.key===tn})||0,ki=ga.length,Wa=0;Wa<ki;Wa+=1){po=(po+Pn+ki)%ki;var Gi=ga[po];if(!Gi.disabled){bn(Gi.key);return}}}function Pa(Pn){var ga=Pn.which;if(!en){[Ha.DOWN,Ha.SPACE,Ha.ENTER].includes(ga)&&(Xr(!0),Pn.preventDefault());return}switch(ga){case Ha.UP:es(-1),Pn.preventDefault();break;case Ha.DOWN:es(1),Pn.preventDefault();break;case Ha.ESC:Xr(!1);break;case Ha.SPACE:case Ha.ENTER:tn!==null&&qn(tn,Pn);break}}(0,T.useEffect)(function(){var Pn=document.getElementById(aa);Pn&&Pn.scrollIntoView&&Pn.scrollIntoView(!1)},[tn]),(0,T.useEffect)(function(){en||bn(null)},[en]);var vi=(0,ee.Z)({},an?"marginRight":"marginLeft",Yr);_e.length||(vi.visibility="hidden",vi.order=1);var ji=G()((0,ee.Z)({},"".concat(Fr,"-rtl"),an)),Zo=at?null:T.createElement(Ka,{prefixCls:Fr,overlay:Ui,trigger:["hover"],visible:_e.length?en:!1,transitionName:ur,onVisibleChange:Xr,overlayClassName:G()(ji,It),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Gt},T.createElement("button",{type:"button",className:"".concat(ne,"-nav-more"),style:vi,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":ma,id:"".concat(ae,"-more"),"aria-expanded":en,onKeyDown:Pa},pr));return T.createElement("div",{className:G()("".concat(ne,"-nav-operations"),Wt),style:qr,ref:D},Zo,T.createElement(de,{prefixCls:ne,locale:Ie,editable:kr}))}var ms=T.memo(T.forwardRef(qs),function(w,D){return D.tabMoving});function Lo(w){var D,ne=w.prefixCls,ae=w.id,_e=w.active,Ie=w.tab,at=Ie.key,wt=Ie.label,pr=Ie.disabled,ur=Ie.closeIcon,qr=w.closable,Wt=w.renderWrapper,kr=w.removeAriaLabel,Yr=w.editable,an=w.onClick,Zn=w.onFocus,qn=w.style,Gt="".concat(ne,"-tab"),It=Et(qr,ur,Yr,pr);function Kt(Xr){pr||an(Xr)}function gr(Xr){Xr.preventDefault(),Xr.stopPropagation(),Yr.onEdit("remove",{key:at,event:Xr})}var en=T.createElement("div",{key:at,"data-node-key":cn(at),className:G()(Gt,(D={},(0,ee.Z)(D,"".concat(Gt,"-with-remove"),It),(0,ee.Z)(D,"".concat(Gt,"-active"),_e),(0,ee.Z)(D,"".concat(Gt,"-disabled"),pr),D)),style:qn,onClick:Kt},T.createElement("div",{role:"tab","aria-selected":_e,id:ae&&"".concat(ae,"-tab-").concat(at),className:"".concat(Gt,"-btn"),"aria-controls":ae&&"".concat(ae,"-panel-").concat(at),"aria-disabled":pr,tabIndex:pr?null:0,onClick:function(Vn){Vn.stopPropagation(),Kt(Vn)},onKeyDown:function(Vn){[Ha.SPACE,Ha.ENTER].includes(Vn.which)&&(Vn.preventDefault(),Kt(Vn))},onFocus:Zn},wt),It&&T.createElement("button",{type:"button","aria-label":kr||"remove",tabIndex:0,className:"".concat(Gt,"-remove"),onClick:function(Vn){Vn.stopPropagation(),gr(Vn)}},ur||Yr.removeIcon||"\xD7"));return Wt?Wt(en):en}var Mi=Lo,Fo=function(D){return+setTimeout(D,16)},Ri=function(D){return clearTimeout(D)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Fo=function(D){return window.requestAnimationFrame(D)},Ri=function(D){return window.cancelAnimationFrame(D)});var U=0,Q=new Map;function Se(w){Q.delete(w)}var Ye=function(D){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;U+=1;var ae=U;function _e(Ie){if(Ie===0)Se(ae),D();else{var at=Fo(function(){_e(Ie-1)});Q.set(ae,at)}}return _e(ne),ae};Ye.cancel=function(w){var D=Q.get(w);return Se(D),Ri(D)};var Ct=Ye,Nt=function(D){var ne=D.activeTabOffset,ae=D.horizontal,_e=D.rtl,Ie=D.indicatorSize,at=(0,T.useState)(),wt=(0,p.Z)(at,2),pr=wt[0],ur=wt[1],qr=(0,T.useRef)(),Wt=function(an){return typeof Ie=="function"?Ie(an):typeof Ie=="number"?Ie:an};function kr(){Ct.cancel(qr.current)}return(0,T.useEffect)(function(){var Yr={};return ne&&(ae?(_e?(Yr.right=ne.right+ne.width/2,Yr.transform="translateX(50%)"):(Yr.left=ne.left+ne.width/2,Yr.transform="translateX(-50%)"),Yr.width=Wt(ne.width)):(Yr.top=ne.top+ne.height/2,Yr.transform="translateY(-50%)",Yr.height=Wt(ne.height))),kr(),qr.current=Ct(function(){ur(Yr)}),kr},[ne,ae,_e,Ie]),{style:pr}},Cn=Nt,jr=function(D){var ne=D.current||{},ae=ne.offsetWidth,_e=ae===void 0?0:ae,Ie=ne.offsetHeight,at=Ie===void 0?0:Ie;return[_e,at]},ra=function(D,ne){return D[ne?0:1]};function En(w,D){var ne,ae=T.useContext(ue),_e=ae.prefixCls,Ie=ae.tabs,at=w.className,wt=w.style,pr=w.id,ur=w.animated,qr=w.activeKey,Wt=w.rtl,kr=w.extra,Yr=w.editable,an=w.locale,Zn=w.tabPosition,qn=w.tabBarGutter,Gt=w.children,It=w.onTabClick,Kt=w.onTabScroll,gr=w.indicatorSize,en=(0,T.useRef)(),Xr=(0,T.useRef)(),Vn=(0,T.useRef)(),na=(0,T.useRef)(),tn=(0,T.useRef)(),bn=(0,T.useRef)(),ma=(0,T.useRef)(),Fr=Zn==="top"||Zn==="bottom",aa=me(0,function(ve,$e){Fr&&Kt&&Kt({direction:ve>$e?"left":"right"})}),kn=(0,p.Z)(aa,2),va=kn[0],Ui=kn[1],es=me(0,function(ve,$e){!Fr&&Kt&&Kt({direction:ve>$e?"top":"bottom"})}),Pa=(0,p.Z)(es,2),vi=Pa[0],ji=Pa[1],Zo=(0,T.useState)([0,0]),Pn=(0,p.Z)(Zo,2),ga=Pn[0],po=Pn[1],ki=(0,T.useState)([0,0]),Wa=(0,p.Z)(ki,2),Gi=Wa[0],ni=Wa[1],gs=(0,T.useState)([0,0]),bs=(0,p.Z)(gs,2),Xs=bs[0],Js=bs[1],Ul=(0,T.useState)([0,0]),Ni=(0,p.Z)(Ul,2),Pl=Ni[0],Za=Ni[1],Mo=wr(new Map),os=(0,p.Z)(Mo,2),mo=os[0],Ys=os[1],ss=Le(Ie,mo,Gi[0]),br=ra(ga,Fr),Qs=ra(Gi,Fr),Os=ra(Xs,Fr),ls=ra(Pl,Fr),to=br<Qs+Os,ca=to?br-ls:br-Os,ll="".concat(_e,"-nav-operations-hidden"),gi=0,qi=0;Fr&&Wt?(gi=0,qi=Math.max(0,Qs-ca)):(gi=Math.min(0,ca-Qs),qi=0);function Fs(ve){return ve<gi?gi:ve>qi?qi:ve}var xl=(0,T.useRef)(),vo=(0,T.useState)(),zs=(0,p.Z)(vo,2),cl=zs[0],wl=zs[1];function Sl(){wl(Date.now())}function _l(){window.clearTimeout(xl.current)}$t(na,function(ve,$e){function ut(rt,Pt){rt(function(dt){var tr=Fs(dt+Pt);return tr})}return to?(Fr?ut(Ui,ve):ut(ji,$e),_l(),Sl(),!0):!1}),(0,T.useEffect)(function(){return _l(),cl&&(xl.current=window.setTimeout(function(){wl(0)},100)),_l},[cl]);var Ks=nn(ss,ca,Fr?va:vi,Qs,Os,ls,(0,C.Z)((0,C.Z)({},w),{},{tabs:Ie})),Vo=(0,p.Z)(Ks,2),jl=Vo[0],el=Vo[1],Gl=Ze(function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qr,$e=ss.get(ve)||{width:0,height:0,left:0,right:0,top:0};if(Fr){var ut=va;Wt?$e.right<va?ut=$e.right:$e.right+$e.width>va+ca&&(ut=$e.right+$e.width-ca):$e.left<-va?ut=-$e.left:$e.left+$e.width>-va+ca&&(ut=-($e.left+$e.width-ca)),ji(0),Ui(Fs(ut))}else{var rt=vi;$e.top<-vi?rt=-$e.top:$e.top+$e.height>-vi+ca&&(rt=-($e.top+$e.height-ca)),Ui(0),ji(Fs(rt))}}),ul={};Zn==="top"||Zn==="bottom"?ul[Wt?"marginRight":"marginLeft"]=qn:ul.marginTop=qn;var Is=Ie.map(function(ve,$e){var ut=ve.key;return T.createElement(Mi,{id:pr,prefixCls:_e,key:ut,tab:ve,style:$e===0?void 0:ul,closable:ve.closable,editable:Yr,active:ut===qr,renderWrapper:Gt,removeAriaLabel:an==null?void 0:an.removeAriaLabel,onClick:function(Pt){It(ut,Pt)},onFocus:function(){Gl(ut),Sl(),na.current&&(Wt||(na.current.scrollLeft=0),na.current.scrollTop=0)}})}),ql=function(){return Ys(function(){var $e=new Map;return Ie.forEach(function(ut){var rt,Pt=ut.key,dt=(rt=tn.current)===null||rt===void 0?void 0:rt.querySelector('[data-node-key="'.concat(cn(Pt),'"]'));dt&&$e.set(Pt,{width:dt.offsetWidth,height:dt.offsetHeight,left:dt.offsetLeft,top:dt.offsetTop})}),$e})};(0,T.useEffect)(function(){ql()},[Ie.map(function(ve){return ve.key}).join("_")]);var Hs=Tt(function(){var ve=jr(en),$e=jr(Xr),ut=jr(Vn);po([ve[0]-$e[0]-ut[0],ve[1]-$e[1]-ut[1]]);var rt=jr(ma);Js(rt);var Pt=jr(bn);Za(Pt);var dt=jr(tn);ni([dt[0]-rt[0],dt[1]-rt[1]]),ql()}),Xl=Ie.slice(0,jl),Ml=Ie.slice(el+1),Ws=[].concat((0,Lt.Z)(Xl),(0,Lt.Z)(Ml)),dl=ss.get(qr),rc=Cn({activeTabOffset:dl,horizontal:Fr,rtl:Wt,indicatorSize:gr}),tl=rc.style;(0,T.useEffect)(function(){Gl()},[qr,gi,qi,Qr(dl),Qr(ss),Fr]),(0,T.useEffect)(function(){Hs()},[Wt]);var _=!!Ws.length,B="".concat(_e,"-nav-wrap"),P,j,se,Ce;return Fr?Wt?(j=va>0,P=va!==qi):(P=va<0,j=va!==gi):(se=vi<0,Ce=vi!==gi),T.createElement(Pe.Z,{onResize:Hs},T.createElement("div",{ref:bt(D,en),role:"tablist",className:G()("".concat(_e,"-nav"),at),style:wt,onKeyDown:function(){Sl()}},T.createElement(Te,{ref:Xr,position:"left",extra:kr,prefixCls:_e}),T.createElement(Pe.Z,{onResize:Hs},T.createElement("div",{className:G()(B,(ne={},(0,ee.Z)(ne,"".concat(B,"-ping-left"),P),(0,ee.Z)(ne,"".concat(B,"-ping-right"),j),(0,ee.Z)(ne,"".concat(B,"-ping-top"),se),(0,ee.Z)(ne,"".concat(B,"-ping-bottom"),Ce),ne)),ref:na},T.createElement(Pe.Z,{onResize:Hs},T.createElement("div",{ref:tn,className:"".concat(_e,"-nav-list"),style:{transform:"translate(".concat(va,"px, ").concat(vi,"px)"),transition:cl?"none":void 0}},Is,T.createElement(de,{ref:ma,prefixCls:_e,locale:an,editable:Yr,style:(0,C.Z)((0,C.Z)({},Is.length===0?void 0:ul),{},{visibility:_?"hidden":null})}),T.createElement("div",{className:G()("".concat(_e,"-ink-bar"),(0,ee.Z)({},"".concat(_e,"-ink-bar-animated"),ur.inkBar)),style:tl}))))),T.createElement(ms,(0,X.Z)({},w,{removeAriaLabel:an==null?void 0:an.removeAriaLabel,ref:bn,prefixCls:_e,tabs:Ws,className:!_&&ll,tabMoving:!!cl})),T.createElement(Te,{ref:Vn,position:"right",extra:kr,prefixCls:_e})))}var Gr=T.forwardRef(En),Ea=["renderTabBar"],dn=["label","key"];function pn(w){var D=w.renderTabBar,ne=(0,Ke.Z)(w,Ea),ae=T.useContext(ue),_e=ae.tabs;if(D){var Ie=(0,C.Z)((0,C.Z)({},ne),{},{panes:_e.map(function(at){var wt=at.label,pr=at.key,ur=(0,Ke.Z)(at,dn);return T.createElement(et,(0,X.Z)({tab:wt,key:pr,tabKey:pr},ur))})});return D(Ie,Gr)}return T.createElement(Gr,ne)}var mi={},Hn=[],Wn=function(D){Hn.push(D)};function Ci(w,D){if(0)var ne}function Br(w,D){if(0)var ne}function He(){mi={}}function Zi(w,D,ne){!D&&!mi[ne]&&(w(!1,ne),mi[ne]=!0)}function wo(w,D){Zi(Ci,w,D)}function Ei(w,D){Zi(Br,w,D)}wo.preMessage=Wn,wo.resetWarned=He,wo.noteOnce=Ei;var zo=null;function uo(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},D;return w===!1?D={inkBar:!1,tabPane:!1}:w===!0?D={inkBar:!0,tabPane:!1}:D=(0,C.Z)({inkBar:!0},(0,fe.Z)(w)==="object"?w:{}),D.tabPaneMotion&&D.tabPane===void 0&&(D.tabPane=!0),!D.tabPaneMotion&&D.tabPane&&(D.tabPane=!1),D}var Io=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],So=0;function ks(w,D){var ne,ae=w.id,_e=w.prefixCls,Ie=_e===void 0?"rc-tabs":_e,at=w.className,wt=w.items,pr=w.direction,ur=w.activeKey,qr=w.defaultActiveKey,Wt=w.editable,kr=w.animated,Yr=w.tabPosition,an=Yr===void 0?"top":Yr,Zn=w.tabBarGutter,qn=w.tabBarStyle,Gt=w.tabBarExtraContent,It=w.locale,Kt=w.moreIcon,gr=w.moreTransitionName,en=w.destroyInactiveTabPane,Xr=w.renderTabBar,Vn=w.onChange,na=w.onTabClick,tn=w.onTabScroll,bn=w.getPopupContainer,ma=w.popupClassName,Fr=w.indicatorSize,aa=(0,Ke.Z)(w,Io),kn=T.useMemo(function(){return(wt||[]).filter(function(Za){return Za&&(0,fe.Z)(Za)==="object"&&"key"in Za})},[wt]),va=pr==="rtl",Ui=uo(kr),es=(0,T.useState)(!1),Pa=(0,p.Z)(es,2),vi=Pa[0],ji=Pa[1];(0,T.useEffect)(function(){ji(Be())},[]);var Zo=O(function(){var Za;return(Za=kn[0])===null||Za===void 0?void 0:Za.key},{value:ur,defaultValue:qr}),Pn=(0,p.Z)(Zo,2),ga=Pn[0],po=Pn[1],ki=(0,T.useState)(function(){return kn.findIndex(function(Za){return Za.key===ga})}),Wa=(0,p.Z)(ki,2),Gi=Wa[0],ni=Wa[1];(0,T.useEffect)(function(){var Za=kn.findIndex(function(os){return os.key===ga});if(Za===-1){var Mo;Za=Math.max(0,Math.min(Gi,kn.length-1)),po((Mo=kn[Za])===null||Mo===void 0?void 0:Mo.key)}ni(Za)},[kn.map(function(Za){return Za.key}).join("_"),ga,Gi]);var gs=O(null,{value:ae}),bs=(0,p.Z)(gs,2),Xs=bs[0],Js=bs[1];(0,T.useEffect)(function(){ae||(Js("rc-tabs-".concat(So)),So+=1)},[]);function Ul(Za,Mo){na==null||na(Za,Mo);var os=Za!==ga;po(Za),os&&(Vn==null||Vn(Za))}var Ni={id:Xs,activeKey:ga,animated:Ui,tabPosition:an,rtl:va,mobile:vi},Pl=(0,C.Z)((0,C.Z)({},Ni),{},{editable:Wt,locale:It,moreIcon:Kt,moreTransitionName:gr,tabBarGutter:Zn,onTabClick:Ul,onTabScroll:tn,extra:Gt,style:qn,panes:null,getPopupContainer:bn,popupClassName:ma,indicatorSize:Fr});return T.createElement(ue.Provider,{value:{tabs:kn,prefixCls:Ie}},T.createElement("div",(0,X.Z)({ref:D,id:ae,className:G()(Ie,"".concat(Ie,"-").concat(an),(ne={},(0,ee.Z)(ne,"".concat(Ie,"-mobile"),vi),(0,ee.Z)(ne,"".concat(Ie,"-editable"),Wt),(0,ee.Z)(ne,"".concat(Ie,"-rtl"),va),ne),at)},aa),T.createElement(pn,(0,X.Z)({},Pl,{renderTabBar:Xr})),T.createElement(fr,(0,X.Z)({destroyInactiveTabPane:en},Ni,{animated:Ui}))))}var vs=T.forwardRef(ks),Xo=vs,ka=Xo,Bn=y(53124),ti=y(98675),Ko=()=>null,To=y(33603);const Jo={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Yi(w){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},ne;return D===!1?ne={inkBar:!1,tabPane:!1}:D===!0?ne={inkBar:!0,tabPane:!0}:ne=Object.assign({inkBar:!0},typeof D=="object"?D:{}),ne.tabPane&&(ne.tabPaneMotion=Object.assign(Object.assign({},Jo),{motionName:(0,To.m)(w,"switch")})),ne}var pa=y(37419),Rs=function(w,D){var ne={};for(var ae in w)Object.prototype.hasOwnProperty.call(w,ae)&&D.indexOf(ae)<0&&(ne[ae]=w[ae]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,ae=Object.getOwnPropertySymbols(w);_e<ae.length;_e++)D.indexOf(ae[_e])<0&&Object.prototype.propertyIsEnumerable.call(w,ae[_e])&&(ne[ae[_e]]=w[ae[_e]]);return ne};function As(w){return w.filter(D=>D)}function Ds(w,D){if(w)return w;const ne=(0,pa.Z)(D).map(ae=>{if(T.isValidElement(ae)){const{key:_e,props:Ie}=ae,at=Ie||{},{tab:wt}=at,pr=Rs(at,["tab"]);return Object.assign(Object.assign({key:String(_e)},pr),{label:wt})}return null});return As(ne)}var Nn=y(14747),yl=y(67968),ri=y(45503),Ns=y(67771),li=w=>{const{componentCls:D,motionDurationSlow:ne}=w;return[{[D]:{[`${D}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${ne}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${ne}`}}}}},[(0,Ns.oN)(w,"slide-up"),(0,Ns.oN)(w,"slide-down")]]};const Ls=w=>{const{componentCls:D,tabsCardPadding:ne,cardBg:ae,cardGutter:_e,colorBorderSecondary:Ie,itemSelectedColor:at}=w;return{[`${D}-card`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab`]:{margin:0,padding:ne,background:ae,border:`${w.lineWidth}px ${w.lineType} ${Ie}`,transition:`all ${w.motionDurationSlow} ${w.motionEaseInOut}`},[`${D}-tab-active`]:{color:at,background:w.colorBgContainer},[`${D}-ink-bar`]:{visibility:"hidden"}},[`&${D}-top, &${D}-bottom`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab + ${D}-tab`]:{marginLeft:{_skip_check_:!0,value:`${_e}px`}}}},[`&${D}-top`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab`]:{borderRadius:`${w.borderRadiusLG}px ${w.borderRadiusLG}px 0 0`},[`${D}-tab-active`]:{borderBottomColor:w.colorBgContainer}}},[`&${D}-bottom`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab`]:{borderRadius:`0 0 ${w.borderRadiusLG}px ${w.borderRadiusLG}px`},[`${D}-tab-active`]:{borderTopColor:w.colorBgContainer}}},[`&${D}-left, &${D}-right`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab + ${D}-tab`]:{marginTop:`${_e}px`}}},[`&${D}-left`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab`]:{borderRadius:{_skip_check_:!0,value:`${w.borderRadiusLG}px 0 0 ${w.borderRadiusLG}px`}},[`${D}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:w.colorBgContainer}}}},[`&${D}-right`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${w.borderRadiusLG}px ${w.borderRadiusLG}px 0`}},[`${D}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:w.colorBgContainer}}}}}}},Ho=w=>{const{componentCls:D,itemHoverColor:ne,dropdownEdgeChildVerticalPadding:ae}=w;return{[`${D}-dropdown`]:Object.assign(Object.assign({},(0,Nn.Wf)(w)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${D}-dropdown-menu`]:{maxHeight:w.tabsDropdownHeight,margin:0,padding:`${ae}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:w.colorBgContainer,backgroundClip:"padding-box",borderRadius:w.borderRadiusLG,outline:"none",boxShadow:w.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Nn.vS),{display:"flex",alignItems:"center",minWidth:w.tabsDropdownWidth,margin:0,padding:`${w.paddingXXS}px ${w.paddingSM}px`,color:w.colorText,fontWeight:"normal",fontSize:w.fontSize,lineHeight:w.lineHeight,cursor:"pointer",transition:`all ${w.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:w.marginSM},color:w.colorTextDescription,fontSize:w.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:ne}},"&:hover":{background:w.controlItemBgHover},"&-disabled":{"&, &:hover":{color:w.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Qo=w=>{const{componentCls:D,margin:ne,colorBorderSecondary:ae,horizontalMargin:_e,verticalItemPadding:Ie,verticalItemMargin:at}=w;return{[`${D}-top, ${D}-bottom`]:{flexDirection:"column",[`> ${D}-nav, > div > ${D}-nav`]:{margin:_e,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${w.lineWidth}px ${w.lineType} ${ae}`,content:"''"},[`${D}-ink-bar`]:{height:w.lineWidthBold,"&-animated":{transition:`width ${w.motionDurationSlow}, left ${w.motionDurationSlow},
|
|
|
right ${w.motionDurationSlow}`}},[`${D}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:w.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:w.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:w.boxShadowTabsOverflowRight},[`&${D}-nav-wrap-ping-left::before`]:{opacity:1},[`&${D}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${D}-top`]:{[`> ${D}-nav,
|
|
|
> div > ${D}-nav`]:{"&::before":{bottom:0},[`${D}-ink-bar`]:{bottom:0}}},[`${D}-bottom`]:{[`> ${D}-nav, > div > ${D}-nav`]:{order:1,marginTop:`${ne}px`,marginBottom:0,"&::before":{top:0},[`${D}-ink-bar`]:{top:0}},[`> ${D}-content-holder, > div > ${D}-content-holder`]:{order:0}},[`${D}-left, ${D}-right`]:{[`> ${D}-nav, > div > ${D}-nav`]:{flexDirection:"column",minWidth:w.controlHeight*1.25,[`${D}-tab`]:{padding:Ie,textAlign:"center"},[`${D}-tab + ${D}-tab`]:{margin:at},[`${D}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:w.controlHeight},"&::before":{top:0,boxShadow:w.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:w.boxShadowTabsOverflowBottom},[`&${D}-nav-wrap-ping-top::before`]:{opacity:1},[`&${D}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${D}-ink-bar`]:{width:w.lineWidthBold,"&-animated":{transition:`height ${w.motionDurationSlow}, top ${w.motionDurationSlow}`}},[`${D}-nav-list, ${D}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${D}-left`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${D}-content-holder, > div > ${D}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${w.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${w.lineWidth}px ${w.lineType} ${w.colorBorder}`},[`> ${D}-content > ${D}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:w.paddingLG}}}},[`${D}-right`]:{[`> ${D}-nav, > div > ${D}-nav`]:{order:1,[`${D}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${D}-content-holder, > div > ${D}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-w.lineWidth},borderRight:{_skip_check_:!0,value:`${w.lineWidth}px ${w.lineType} ${w.colorBorder}`},[`> ${D}-content > ${D}-tabpane`]:{paddingRight:{_skip_check_:!0,value:w.paddingLG}}}}}},Vi=w=>{const{componentCls:D,cardPaddingSM:ne,cardPaddingLG:ae,horizontalItemPaddingSM:_e,horizontalItemPaddingLG:Ie}=w;return{[D]:{"&-small":{[`> ${D}-nav`]:{[`${D}-tab`]:{padding:_e,fontSize:w.titleFontSizeSM}}},"&-large":{[`> ${D}-nav`]:{[`${D}-tab`]:{padding:Ie,fontSize:w.titleFontSizeLG}}}},[`${D}-card`]:{[`&${D}-small`]:{[`> ${D}-nav`]:{[`${D}-tab`]:{padding:ne}},[`&${D}-bottom`]:{[`> ${D}-nav ${D}-tab`]:{borderRadius:`0 0 ${w.borderRadius}px ${w.borderRadius}px`}},[`&${D}-top`]:{[`> ${D}-nav ${D}-tab`]:{borderRadius:`${w.borderRadius}px ${w.borderRadius}px 0 0`}},[`&${D}-right`]:{[`> ${D}-nav ${D}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${w.borderRadius}px ${w.borderRadius}px 0`}}},[`&${D}-left`]:{[`> ${D}-nav ${D}-tab`]:{borderRadius:{_skip_check_:!0,value:`${w.borderRadius}px 0 0 ${w.borderRadius}px`}}}},[`&${D}-large`]:{[`> ${D}-nav`]:{[`${D}-tab`]:{padding:ae}}}}}},Wo=w=>{const{componentCls:D,itemActiveColor:ne,itemHoverColor:ae,iconCls:_e,tabsHorizontalItemMargin:Ie,horizontalItemPadding:at,itemSelectedColor:wt,itemColor:pr}=w,ur=`${D}-tab`;return{[ur]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:at,fontSize:w.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:pr,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:ne}},(0,Nn.Qy)(w)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-w.marginXXS},marginLeft:{_skip_check_:!0,value:w.marginXS},color:w.colorTextDescription,fontSize:w.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${w.motionDurationSlow}`,"&:hover":{color:w.colorTextHeading}},"&:hover":{color:ae},[`&${ur}-active ${ur}-btn`]:{color:wt,textShadow:w.tabsActiveTextShadow},[`&${ur}-disabled`]:{color:w.colorTextDisabled,cursor:"not-allowed"},[`&${ur}-disabled ${ur}-btn, &${ur}-disabled ${D}-remove`]:{"&:focus, &:active":{color:w.colorTextDisabled}},[`& ${ur}-remove ${_e}`]:{margin:0},[_e]:{marginRight:{_skip_check_:!0,value:w.marginSM}}},[`${ur} + ${ur}`]:{margin:{_skip_check_:!0,value:Ie}}}},Bo=w=>{const{componentCls:D,tabsHorizontalItemMarginRTL:ne,iconCls:ae,cardGutter:_e}=w;return{[`${D}-rtl`]:{direction:"rtl",[`${D}-nav`]:{[`${D}-tab`]:{margin:{_skip_check_:!0,value:ne},[`${D}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[ae]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${w.marginSM}px`}},[`${D}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${w.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${w.marginXXS}px`},[ae]:{margin:0}}}},[`&${D}-left`]:{[`> ${D}-nav`]:{order:1},[`> ${D}-content-holder`]:{order:0}},[`&${D}-right`]:{[`> ${D}-nav`]:{order:0},[`> ${D}-content-holder`]:{order:1}},[`&${D}-card${D}-top, &${D}-card${D}-bottom`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-tab + ${D}-tab`]:{marginRight:{_skip_check_:!0,value:_e},marginLeft:{_skip_check_:!0,value:0}}}}},[`${D}-dropdown-rtl`]:{direction:"rtl"},[`${D}-menu-item`]:{[`${D}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},ho=w=>{const{componentCls:D,tabsCardPadding:ne,cardHeight:ae,cardGutter:_e,itemHoverColor:Ie,itemActiveColor:at,colorBorderSecondary:wt}=w;return{[D]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Nn.Wf)(w)),{display:"flex",[`> ${D}-nav, > div > ${D}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${D}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${w.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${D}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${w.motionDurationSlow}`},[`${D}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${D}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${D}-nav-more`]:{position:"relative",padding:ne,background:"transparent",border:0,color:w.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:w.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${D}-nav-add`]:Object.assign({minWidth:ae,marginLeft:{_skip_check_:!0,value:_e},padding:`0 ${w.paddingXS}px`,background:"transparent",border:`${w.lineWidth}px ${w.lineType} ${wt}`,borderRadius:`${w.borderRadiusLG}px ${w.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:w.colorText,transition:`all ${w.motionDurationSlow} ${w.motionEaseInOut}`,"&:hover":{color:Ie},"&:active, &:focus:not(:focus-visible)":{color:at}},(0,Nn.Qy)(w))},[`${D}-extra-content`]:{flex:"none"},[`${D}-ink-bar`]:{position:"absolute",background:w.inkBarColor,pointerEvents:"none"}}),Wo(w)),{[`${D}-content`]:{position:"relative",width:"100%"},[`${D}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${D}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${D}-centered`]:{[`> ${D}-nav, > div > ${D}-nav`]:{[`${D}-nav-wrap`]:{[`&:not([class*='${D}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Qi=(0,yl.Z)("Tabs",w=>{const D=(0,ri.TS)(w,{tabsCardPadding:w.cardPadding||`${(w.cardHeight-Math.round(w.fontSize*w.lineHeight))/2-w.lineWidth}px ${w.padding}px`,dropdownEdgeChildVerticalPadding:w.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${w.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${w.horizontalItemGutter}px`});return[Vi(D),Bo(D),Qo(D),Ho(D),Ls(D),ho(D),li(D)]},w=>{const D=w.controlHeightLG;return{zIndexPopup:w.zIndexPopupBase+50,cardBg:w.colorFillAlter,cardHeight:D,cardPadding:"",cardPaddingSM:`${w.paddingXXS*1.5}px ${w.padding}px`,cardPaddingLG:`${w.paddingXS}px ${w.padding}px ${w.paddingXXS*1.5}px`,titleFontSize:w.fontSize,titleFontSizeLG:w.fontSizeLG,titleFontSizeSM:w.fontSize,inkBarColor:w.colorPrimary,horizontalMargin:`0 0 ${w.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${w.paddingSM}px 0`,horizontalItemPaddingSM:`${w.paddingXS}px 0`,horizontalItemPaddingLG:`${w.padding}px 0`,verticalItemPadding:`${w.paddingXS}px ${w.paddingLG}px`,verticalItemMargin:`${w.margin}px 0 0 0`,itemColor:w.colorText,itemSelectedColor:w.colorPrimary,itemHoverColor:w.colorPrimaryHover,itemActiveColor:w.colorPrimaryActive,cardGutter:w.marginXXS/2}}),sl=function(w,D){var ne={};for(var ae in w)Object.prototype.hasOwnProperty.call(w,ae)&&D.indexOf(ae)<0&&(ne[ae]=w[ae]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,ae=Object.getOwnPropertySymbols(w);_e<ae.length;_e++)D.indexOf(ae[_e])<0&&Object.prototype.propertyIsEnumerable.call(w,ae[_e])&&(ne[ae[_e]]=w[ae[_e]]);return ne};const eo=w=>{const{type:D,className:ne,rootClassName:ae,size:_e,onEdit:Ie,hideAdd:at,centered:wt,addIcon:pr,popupClassName:ur,children:qr,items:Wt,animated:kr,style:Yr,indicatorSize:an}=w,Zn=sl(w,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:qn,moreIcon:Gt=T.createElement(J.Z,null)}=Zn,{direction:It,tabs:Kt,getPrefixCls:gr,getPopupContainer:en}=T.useContext(Bn.E_),Xr=gr("tabs",qn),[Vn,na]=Qi(Xr);let tn;D==="editable-card"&&(tn={onEdit:(va,Ui)=>{let{key:es,event:Pa}=Ui;Ie==null||Ie(va==="add"?Pa:es,va)},removeIcon:T.createElement(x.Z,null),addIcon:pr||T.createElement(ge.Z,null),showAdd:at!==!0});const bn=gr(),ma=Ds(Wt,qr),Fr=Yi(Xr,kr),aa=(0,ti.Z)(_e),kn=Object.assign(Object.assign({},Kt==null?void 0:Kt.style),Yr);return Vn(T.createElement(ka,Object.assign({direction:It,getPopupContainer:en,moreTransitionName:`${bn}-slide-up`},Zn,{items:ma,className:G()({[`${Xr}-${aa}`]:aa,[`${Xr}-card`]:["card","editable-card"].includes(D),[`${Xr}-editable-card`]:D==="editable-card",[`${Xr}-centered`]:wt},Kt==null?void 0:Kt.className,ne,ae,na),popupClassName:G()(ur,na),style:kn,editable:tn,moreIcon:Gt,prefixCls:Xr,animated:Fr,indicatorSize:an!=null?an:Kt==null?void 0:Kt.indicatorSize})))};eo.TabPane=Ko;var _o=eo},62661:function(Ir,St){"use strict";var y;var x=Symbol.for("react.element"),J=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),ee=Symbol.for("react.context"),C=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),Ke=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),Be=Symbol.for("react.lazy"),Ze=Symbol.for("react.offscreen"),Mt;Mt=Symbol.for("react.module.reference");function Ue(H){if(typeof H=="object"&&H!==null){var Re=H.$$typeof;switch(Re){case x:switch(H=H.type,H){case ge:case G:case ce:case fe:case Ke:return H;default:switch(H=H&&H.$$typeof,H){case C:case ee:case p:case Be:case T:case X:return H;default:return Re}}case J:return Re}}}y=ee,y=X,y=x,y=p,y=ge,y=Be,y=T,y=J,y=G,y=ce,y=fe,y=Ke,y=function(){return!1},y=function(){return!1},y=function(H){return Ue(H)===ee},y=function(H){return Ue(H)===X},y=function(H){return typeof H=="object"&&H!==null&&H.$$typeof===x},y=function(H){return Ue(H)===p},y=function(H){return Ue(H)===ge},y=function(H){return Ue(H)===Be},St.isMemo=function(H){return Ue(H)===T},y=function(H){return Ue(H)===J},y=function(H){return Ue(H)===G},y=function(H){return Ue(H)===ce},y=function(H){return Ue(H)===fe},y=function(H){return Ue(H)===Ke},y=function(H){return typeof H=="string"||typeof H=="function"||H===ge||H===G||H===ce||H===fe||H===Ke||H===Ze||typeof H=="object"&&H!==null&&(H.$$typeof===Be||H.$$typeof===T||H.$$typeof===X||H.$$typeof===ee||H.$$typeof===p||H.$$typeof===Mt||H.getModuleId!==void 0)},y=Ue},95845:function(Ir,St,y){"use strict";Ir.exports=y(62661)},72665:function(Ir,St){"use strict";var y;var x=typeof Symbol=="function"&&Symbol.for,J=x?Symbol.for("react.element"):60103,ge=x?Symbol.for("react.portal"):60106,ce=x?Symbol.for("react.fragment"):60107,G=x?Symbol.for("react.strict_mode"):60108,X=x?Symbol.for("react.profiler"):60114,ee=x?Symbol.for("react.provider"):60109,C=x?Symbol.for("react.context"):60110,p=x?Symbol.for("react.async_mode"):60111,fe=x?Symbol.for("react.concurrent_mode"):60111,Ke=x?Symbol.for("react.forward_ref"):60112,T=x?Symbol.for("react.suspense"):60113,Be=x?Symbol.for("react.suspense_list"):60120,Ze=x?Symbol.for("react.memo"):60115,Mt=x?Symbol.for("react.lazy"):60116,Ue=x?Symbol.for("react.block"):60121,H=x?Symbol.for("react.fundamental"):60117,Re=x?Symbol.for("react.responder"):60118,xr=x?Symbol.for("react.scope"):60119;function Oe(O){if(typeof O=="object"&&O!==null){var V=O.$$typeof;switch(V){case J:switch(O=O.type,O){case p:case fe:case ce:case X:case G:case T:return O;default:switch(O=O&&O.$$typeof,O){case C:case Ke:case Mt:case Ze:case ee:return O;default:return V}}case ge:return V}}}function be(O){return Oe(O)===fe}y=p,y=fe,y=C,y=ee,y=J,y=Ke,y=ce,y=Mt,y=Ze,y=ge,y=X,y=G,y=T,y=function(O){return be(O)||Oe(O)===p},y=be,y=function(O){return Oe(O)===C},y=function(O){return Oe(O)===ee},y=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===J},y=function(O){return Oe(O)===Ke},y=function(O){return Oe(O)===ce},y=function(O){return Oe(O)===Mt},St.isMemo=function(O){return Oe(O)===Ze},y=function(O){return Oe(O)===ge},y=function(O){return Oe(O)===X},y=function(O){return Oe(O)===G},y=function(O){return Oe(O)===T},y=function(O){return typeof O=="string"||typeof O=="function"||O===ce||O===fe||O===X||O===G||O===T||O===Be||typeof O=="object"&&O!==null&&(O.$$typeof===Mt||O.$$typeof===Ze||O.$$typeof===ee||O.$$typeof===C||O.$$typeof===Ke||O.$$typeof===H||O.$$typeof===Re||O.$$typeof===xr||O.$$typeof===Ue)},y=Oe},12060:function(Ir,St,y){"use strict";Ir.exports=y(72665)},1337:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return C}});var x=y(1413),J=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,ge=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,ce="".concat(J," ").concat(ge).split(/[\s\n]+/),G="aria-",X="data-";function ee(p,fe){return p.indexOf(fe)===0}function C(p){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ke;fe===!1?Ke={aria:!0,data:!0,attr:!0}:fe===!0?Ke={aria:!0}:Ke=(0,x.Z)({},fe);var T={};return Object.keys(p).forEach(function(Be){(Ke.aria&&(Be==="role"||ee(Be,G))||Ke.data&&ee(Be,X)||Ke.attr&&ce.includes(Be))&&(T[Be]=p[Be])}),T}},19575:function(Ir,St,y){var x,J;(function(ge,ce){Ir.exports=ce(ge)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof y.g!="undefined"?y.g:this,function(ge){"use strict";ge=ge||{};var ce=ge.Base64,G="2.6.4",X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=function(Ne){for(var _t={},le=0,tt=Ne.length;le<tt;le++)_t[Ne.charAt(le)]=le;return _t}(X),C=String.fromCharCode,p=function(Ne){if(Ne.length<2){var _t=Ne.charCodeAt(0);return _t<128?Ne:_t<2048?C(192|_t>>>6)+C(128|_t&63):C(224|_t>>>12&15)+C(128|_t>>>6&63)+C(128|_t&63)}else{var _t=65536+(Ne.charCodeAt(0)-55296)*1024+(Ne.charCodeAt(1)-56320);return C(240|_t>>>18&7)+C(128|_t>>>12&63)+C(128|_t>>>6&63)+C(128|_t&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ke=function(Ne){return Ne.replace(fe,p)},T=function(Ne){var _t=[0,2,1][Ne.length%3],le=Ne.charCodeAt(0)<<16|(Ne.length>1?Ne.charCodeAt(1):0)<<8|(Ne.length>2?Ne.charCodeAt(2):0),tt=[X.charAt(le>>>18),X.charAt(le>>>12&63),_t>=2?"=":X.charAt(le>>>6&63),_t>=1?"=":X.charAt(le&63)];return tt.join("")},Be=ge.btoa&&typeof ge.btoa=="function"?function(Ne){return ge.btoa(Ne)}:function(Ne){if(Ne.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ne.replace(/[\s\S]{1,3}/g,T)},Ze=function(Ne){return Be(Ke(String(Ne)))},Mt=function(Ne){return Ne.replace(/[+\/]/g,function(_t){return _t=="+"?"-":"_"}).replace(/=/g,"")},Ue=function(Ne,_t){return _t?Mt(Ze(Ne)):Ze(Ne)},H=function(Ne){return Ue(Ne,!0)},Re;ge.Uint8Array&&(Re=function(Ne,_t){for(var le="",tt=0,bt=Ne.length;tt<bt;tt+=3){var Ee=Ne[tt],Fe=Ne[tt+1],Le=Ne[tt+2],me=Ee<<16|Fe<<8|Le;le+=X.charAt(me>>>18)+X.charAt(me>>>12&63)+(typeof Fe!="undefined"?X.charAt(me>>>6&63):"=")+(typeof Le!="undefined"?X.charAt(me&63):"=")}return _t?Mt(le):le});var xr=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Oe=function(Ne){switch(Ne.length){case 4:var _t=(7&Ne.charCodeAt(0))<<18|(63&Ne.charCodeAt(1))<<12|(63&Ne.charCodeAt(2))<<6|63&Ne.charCodeAt(3),le=_t-65536;return C((le>>>10)+55296)+C((le&1023)+56320);case 3:return C((15&Ne.charCodeAt(0))<<12|(63&Ne.charCodeAt(1))<<6|63&Ne.charCodeAt(2));default:return C((31&Ne.charCodeAt(0))<<6|63&Ne.charCodeAt(1))}},be=function(Ne){return Ne.replace(xr,Oe)},O=function(Ne){var _t=Ne.length,le=_t%4,tt=(_t>0?ee[Ne.charAt(0)]<<18:0)|(_t>1?ee[Ne.charAt(1)]<<12:0)|(_t>2?ee[Ne.charAt(2)]<<6:0)|(_t>3?ee[Ne.charAt(3)]:0),bt=[C(tt>>>16),C(tt>>>8&255),C(tt&255)];return bt.length-=[0,0,2,1][le],bt.join("")},V=ge.atob&&typeof ge.atob=="function"?function(Ne){return ge.atob(Ne)}:function(Ne){return Ne.replace(/\S{1,4}/g,O)},ue=function(Ne){return V(String(Ne).replace(/[^A-Za-z0-9\+\/]/g,""))},Y=function(Ne){return be(V(Ne))},et=function(Ne){return String(Ne).replace(/[-_]/g,function(_t){return _t=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},mt=function(Ne){return Y(et(Ne))},fr;ge.Uint8Array&&(fr=function(Ne){return Uint8Array.from(ue(et(Ne)),function(_t){return _t.charCodeAt(0)})});var Lt=function(){var Ne=ge.Base64;return ge.Base64=ce,Ne};if(ge.Base64={VERSION:G,atob:ue,btoa:Be,fromBase64:mt,toBase64:Ue,utob:Ke,encode:Ue,encodeURI:H,btou:be,decode:mt,noConflict:Lt,fromUint8Array:Re,toUint8Array:fr},typeof Object.defineProperty=="function"){var Pe=function(Ne){return{value:Ne,enumerable:!1,writable:!0,configurable:!0}};ge.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Pe(function(){return mt(this)})),Object.defineProperty(String.prototype,"toBase64",Pe(function(Ne){return Ue(this,Ne)})),Object.defineProperty(String.prototype,"toBase64URI",Pe(function(){return Ue(this,!0)}))}}return ge.Meteor&&(Base64=ge.Base64),Ir.exports?Ir.exports.Base64=ge.Base64:(x=[],J=function(){return ge.Base64}.apply(St,x),J!==void 0&&(Ir.exports=J)),{Base64:ge.Base64}})},95860:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return Oe}});var x=y(87462),J=y(1413),ge=y(4942),ce=y(97685),G=y(45987),X=y(94184),ee=y.n(X),C=y(67294);function p(be){var O=C.useRef();O.current=be;var V=C.useCallback(function(){for(var ue,Y=arguments.length,et=new Array(Y),mt=0;mt<Y;mt++)et[mt]=arguments[mt];return(ue=O.current)===null||ue===void 0?void 0:ue.call.apply(ue,[O].concat(et))},[]);return V}function fe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ke=fe()?C.useLayoutEffect:C.useEffect,T=function(O,V){var ue=C.useRef(!0);Ke(function(){return O(ue.current)},V),Ke(function(){return ue.current=!1,function(){ue.current=!0}},[])},Be=function(O,V){T(function(ue){if(!ue)return O()},V)},Ze=null;function Mt(be){var O=C.useRef(!1),V=C.useState(be),ue=(0,ce.Z)(V,2),Y=ue[0],et=ue[1];C.useEffect(function(){return O.current=!1,function(){O.current=!0}},[]);function mt(fr,Lt){Lt&&O.current||et(fr)}return[Y,mt]}function Ue(be){return be!==void 0}function H(be,O){var V=O||{},ue=V.defaultValue,Y=V.value,et=V.onChange,mt=V.postState,fr=Mt(function(){return Ue(Y)?Y:Ue(ue)?typeof ue=="function"?ue():ue:typeof be=="function"?be():be}),Lt=(0,ce.Z)(fr,2),Pe=Lt[0],Ne=Lt[1],_t=Y!==void 0?Y:Pe,le=mt?mt(_t):_t,tt=p(et),bt=Mt([_t]),Ee=(0,ce.Z)(bt,2),Fe=Ee[0],Le=Ee[1];Be(function(){var xt=Fe[0];Pe!==xt&&tt(Pe,xt)},[Fe]),Be(function(){Ue(Y)||Ne(Y)},[Y]);var me=p(function(xt,ot){Ne(xt,ot),Le([_t],ot)});return[le,me]}var Re=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],xr=(0,C.forwardRef)(function(be,O){var V,ue=be.prefixCls,Y=ue===void 0?"rc-checkbox":ue,et=be.className,mt=be.style,fr=be.checked,Lt=be.disabled,Pe=be.defaultChecked,Ne=Pe===void 0?!1:Pe,_t=be.type,le=_t===void 0?"checkbox":_t,tt=be.title,bt=be.onChange,Ee=(0,G.Z)(be,Re),Fe=(0,C.useRef)(null),Le=H(Ne,{value:fr}),me=(0,ce.Z)(Le,2),xt=me[0],ot=me[1];(0,C.useImperativeHandle)(O,function(){return{focus:function(){var Tt;(Tt=Fe.current)===null||Tt===void 0||Tt.focus()},blur:function(){var Tt;(Tt=Fe.current)===null||Tt===void 0||Tt.blur()},input:Fe.current}});var Xe=ee()(Y,et,(V={},(0,ge.Z)(V,"".concat(Y,"-checked"),xt),(0,ge.Z)(V,"".concat(Y,"-disabled"),Lt),V)),ke=function(Tt){Lt||("checked"in be||ot(Tt.target.checked),bt==null||bt({target:(0,J.Z)((0,J.Z)({},be),{},{type:le,checked:Tt.target.checked}),stopPropagation:function(){Tt.stopPropagation()},preventDefault:function(){Tt.preventDefault()},nativeEvent:Tt.nativeEvent}))};return C.createElement("span",{className:Xe,title:tt,style:mt},C.createElement("input",(0,x.Z)({},Ee,{className:"".concat(Y,"-input"),ref:Fe,onChange:ke,disabled:Lt,checked:!!xt,type:le})),C.createElement("span",{className:"".concat(Y,"-inner")}))}),Oe=xr},82523:function(Ir,St){"use strict";var y;var x=Symbol.for("react.element"),J=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),ee=Symbol.for("react.context"),C=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),Ke=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),Be=Symbol.for("react.lazy"),Ze=Symbol.for("react.offscreen"),Mt;Mt=Symbol.for("react.module.reference");function Ue(H){if(typeof H=="object"&&H!==null){var Re=H.$$typeof;switch(Re){case x:switch(H=H.type,H){case ge:case G:case ce:case fe:case Ke:return H;default:switch(H=H&&H.$$typeof,H){case C:case ee:case p:case Be:case T:case X:return H;default:return Re}}case J:return Re}}}y=ee,y=X,y=x,y=p,y=ge,y=Be,y=T,y=J,y=G,y=ce,y=fe,y=Ke,y=function(){return!1},y=function(){return!1},y=function(H){return Ue(H)===ee},y=function(H){return Ue(H)===X},y=function(H){return typeof H=="object"&&H!==null&&H.$$typeof===x},y=function(H){return Ue(H)===p},y=function(H){return Ue(H)===ge},y=function(H){return Ue(H)===Be},y=function(H){return Ue(H)===T},y=function(H){return Ue(H)===J},y=function(H){return Ue(H)===G},y=function(H){return Ue(H)===ce},y=function(H){return Ue(H)===fe},y=function(H){return Ue(H)===Ke},y=function(H){return typeof H=="string"||typeof H=="function"||H===ge||H===G||H===ce||H===fe||H===Ke||H===Ze||typeof H=="object"&&H!==null&&(H.$$typeof===Be||H.$$typeof===T||H.$$typeof===X||H.$$typeof===ee||H.$$typeof===p||H.$$typeof===Mt||H.getModuleId!==void 0)},y=Ue},27183:function(Ir,St,y){"use strict";y(82523)},67656:function(Ir,St,y){"use strict";y.r(St),y.d(St,{BaseInput:function(){return fe},default:function(){return xr}});var x=y(87462),J=y(1413),ge=y(4942),ce=y(71002),G=y(94184),X=y.n(G),ee=y(67294),C=y(87887),p=function(be){var O,V,ue=be.inputElement,Y=be.prefixCls,et=be.prefix,mt=be.suffix,fr=be.addonBefore,Lt=be.addonAfter,Pe=be.className,Ne=be.style,_t=be.disabled,le=be.readOnly,tt=be.focused,bt=be.triggerFocus,Ee=be.allowClear,Fe=be.value,Le=be.handleReset,me=be.hidden,xt=be.classes,ot=be.classNames,Xe=be.dataAttrs,ke=be.styles,$t=be.components,Tt=($t==null?void 0:$t.affixWrapper)||"span",wr=($t==null?void 0:$t.groupWrapper)||"span",Ur=($t==null?void 0:$t.wrapper)||"span",nn=($t==null?void 0:$t.groupAddon)||"span",Qr=(0,ee.useRef)(null),Or=function(gt){var je;(je=Qr.current)!==null&&je!==void 0&&je.contains(gt.target)&&(bt==null||bt())},cn=function(){var gt;if(!Ee)return null;var je=!_t&&!le&&Fe,nr="".concat(Y,"-clear-icon"),lr=(0,ce.Z)(Ee)==="object"&&Ee!==null&&Ee!==void 0&&Ee.clearIcon?Ee.clearIcon:"\u2716";return ee.createElement("span",{onClick:Le,onMouseDown:function(jt){return jt.preventDefault()},className:X()(nr,(gt={},(0,ge.Z)(gt,"".concat(nr,"-hidden"),!je),(0,ge.Z)(gt,"".concat(nr,"-has-suffix"),!!mt),gt)),role:"button",tabIndex:-1},lr)},Et=(0,ee.cloneElement)(ue,{value:Fe,hidden:me,className:X()((O=ue.props)===null||O===void 0?void 0:O.className,!(0,C.X3)(be)&&!(0,C.He)(be)&&Pe)||null,style:(0,J.Z)((0,J.Z)({},(V=ue.props)===null||V===void 0?void 0:V.style),!(0,C.X3)(be)&&!(0,C.He)(be)?Ne:{})});if((0,C.X3)(be)){var Ae,de="".concat(Y,"-affix-wrapper"),te=X()(de,(Ae={},(0,ge.Z)(Ae,"".concat(de,"-disabled"),_t),(0,ge.Z)(Ae,"".concat(de,"-focused"),tt),(0,ge.Z)(Ae,"".concat(de,"-readonly"),le),(0,ge.Z)(Ae,"".concat(de,"-input-with-clear-btn"),mt&&Ee&&Fe),Ae),!(0,C.He)(be)&&Pe,xt==null?void 0:xt.affixWrapper,ot==null?void 0:ot.affixWrapper),Te=(mt||Ee)&&ee.createElement("span",{className:X()("".concat(Y,"-suffix"),ot==null?void 0:ot.suffix),style:ke==null?void 0:ke.suffix},cn(),mt);Et=ee.createElement(Tt,(0,x.Z)({className:te,style:(0,J.Z)((0,J.Z)({},(0,C.He)(be)?void 0:Ne),ke==null?void 0:ke.affixWrapper),hidden:!(0,C.He)(be)&&me,onClick:Or},Xe==null?void 0:Xe.affixWrapper,{ref:Qr}),et&&ee.createElement("span",{className:X()("".concat(Y,"-prefix"),ot==null?void 0:ot.prefix),style:ke==null?void 0:ke.prefix},et),(0,ee.cloneElement)(ue,{value:Fe,hidden:null}),Te)}if((0,C.He)(be)){var Me="".concat(Y,"-group"),ct="".concat(Me,"-addon"),xe=X()("".concat(Y,"-wrapper"),Me,xt==null?void 0:xt.wrapper),we=X()("".concat(Y,"-group-wrapper"),Pe,xt==null?void 0:xt.group);return ee.createElement(wr,{className:we,style:Ne,hidden:me},ee.createElement(Ur,{className:xe},fr&&ee.createElement(nn,{className:ct},fr),(0,ee.cloneElement)(Et,{hidden:null}),Lt&&ee.createElement(nn,{className:ct},Lt)))}return Et},fe=p,Ke=y(74902),T=y(97685),Be=y(45987),Ze=y(21770),Mt=y(98423),Ue=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],H=(0,ee.forwardRef)(function(Oe,be){var O=Oe.autoComplete,V=Oe.onChange,ue=Oe.onFocus,Y=Oe.onBlur,et=Oe.onPressEnter,mt=Oe.onKeyDown,fr=Oe.prefixCls,Lt=fr===void 0?"rc-input":fr,Pe=Oe.disabled,Ne=Oe.htmlSize,_t=Oe.className,le=Oe.maxLength,tt=Oe.suffix,bt=Oe.showCount,Ee=Oe.type,Fe=Ee===void 0?"text":Ee,Le=Oe.classes,me=Oe.classNames,xt=Oe.styles,ot=(0,Be.Z)(Oe,Ue),Xe=(0,Ze.Z)(Oe.defaultValue,{value:Oe.value}),ke=(0,T.Z)(Xe,2),$t=ke[0],Tt=ke[1],wr=(0,ee.useState)(!1),Ur=(0,T.Z)(wr,2),nn=Ur[0],Qr=Ur[1],Or=(0,ee.useRef)(null),cn=function(we){Or.current&&(0,C.nH)(Or.current,we)};(0,ee.useImperativeHandle)(be,function(){return{focus:cn,blur:function(){var we;(we=Or.current)===null||we===void 0||we.blur()},setSelectionRange:function(we,At,gt){var je;(je=Or.current)===null||je===void 0||je.setSelectionRange(we,At,gt)},select:function(){var we;(we=Or.current)===null||we===void 0||we.select()},input:Or.current}}),(0,ee.useEffect)(function(){Qr(function(xe){return xe&&Pe?!1:xe})},[Pe]);var Et=function(we){Oe.value===void 0&&Tt(we.target.value),Or.current&&(0,C.rJ)(Or.current,we,V)},Ae=function(we){et&&we.key==="Enter"&&et(we),mt==null||mt(we)},de=function(we){Qr(!0),ue==null||ue(we)},te=function(we){Qr(!1),Y==null||Y(we)},Te=function(we){Tt(""),cn(),Or.current&&(0,C.rJ)(Or.current,we,V)},Me=function(){var we=(0,Mt.Z)(Oe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return ee.createElement("input",(0,x.Z)({autoComplete:O},we,{onChange:Et,onFocus:de,onBlur:te,onKeyDown:Ae,className:X()(Lt,(0,ge.Z)({},"".concat(Lt,"-disabled"),Pe),me==null?void 0:me.input),style:xt==null?void 0:xt.input,ref:Or,size:Ne,type:Fe}))},ct=function(){var we=Number(le)>0;if(tt||bt){var At=(0,C.D7)($t),gt=(0,Ke.Z)(At).length,je=(0,ce.Z)(bt)==="object"?bt.formatter({value:At,count:gt,maxLength:le}):"".concat(gt).concat(we?" / ".concat(le):"");return ee.createElement(ee.Fragment,null,!!bt&&ee.createElement("span",{className:X()("".concat(Lt,"-show-count-suffix"),(0,ge.Z)({},"".concat(Lt,"-show-count-has-suffix"),!!tt),me==null?void 0:me.count),style:(0,J.Z)({},xt==null?void 0:xt.count)},je),tt)}return null};return ee.createElement(fe,(0,x.Z)({},ot,{prefixCls:Lt,className:_t,inputElement:Me(),handleReset:Te,value:(0,C.D7)($t),focused:nn,triggerFocus:cn,suffix:ct(),disabled:Pe,classes:Le,classNames:me,styles:xt}))}),Re=H,xr=Re},87887:function(Ir,St,y){"use strict";y.d(St,{D7:function(){return G},He:function(){return x},X3:function(){return J},nH:function(){return ce},rJ:function(){return ge}});function x(X){return!!(X.addonBefore||X.addonAfter)}function J(X){return!!(X.prefix||X.suffix||X.allowClear)}function ge(X,ee,C,p){if(C){var fe=ee;if(ee.type==="click"){var Ke=X.cloneNode(!0);fe=Object.create(ee,{target:{value:Ke},currentTarget:{value:Ke}}),Ke.value="",C(fe);return}if(p!==void 0){fe=Object.create(ee,{target:{value:X},currentTarget:{value:X}}),X.value=p,C(fe);return}C(fe)}}function ce(X,ee){if(X){X.focus(ee);var C=ee||{},p=C.cursor;if(p){var fe=X.value.length;switch(p){case"start":X.setSelectionRange(0,0);break;case"end":X.setSelectionRange(fe,fe);break;default:X.setSelectionRange(0,fe)}}}}function G(X){return typeof X=="undefined"||X===null?"":String(X)}},52073:function(Ir,St,y){"use strict";y.d(St,{iz:function(){return sn},ck:function(){return So},BW:function(){return Xn},sN:function(){return So},Wd:function(){return on},ZP:function(){return Po},Xl:function(){return nr}});var x=y(87462),J=y(4942),ge=y(1413),ce=y(74902),G=y(97685),X=y(45987),ee=y(94184),C=y.n(ee),p=y(67294),fe=y.t(p,2),Ke=y(48555);function T(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Be=T()?p.useLayoutEffect:p.useEffect,Ze=function(M,A){var R=p.useRef(!0);Be(function(){return M(R.current)},A),Be(function(){return R.current=!1,function(){R.current=!0}},[])},Mt=function(M,A){Ze(function(R){if(!R)return M()},A)},Ue=Ze,H=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Re=void 0;function xr(m,M){var A=m.prefixCls,R=m.invalidate,K=m.item,ie=m.renderItem,oe=m.responsive,Ge=m.responsiveDisabled,qe=m.registerSize,Qe=m.itemKey,Ot=m.className,kt=m.style,Dt=m.children,We=m.display,st=m.order,Qt=m.component,Ft=Qt===void 0?"div":Qt,Sr=(0,X.Z)(m,H),er=oe&&!We;function Ut(Cr){qe(Qe,Cr)}p.useEffect(function(){return function(){Ut(null)}},[]);var ft=ie&&K!==Re?ie(K):Dt,sr;R||(sr={opacity:er?0:1,height:er?0:Re,overflowY:er?"hidden":Re,order:oe?st:Re,pointerEvents:er?"none":Re,position:er?"absolute":Re});var Ar={};er&&(Ar["aria-hidden"]=!0);var Pr=p.createElement(Ft,(0,x.Z)({className:C()(!R&&A,Ot),style:(0,ge.Z)((0,ge.Z)({},sr),kt)},Ar,Sr,{ref:M}),ft);return oe&&(Pr=p.createElement(Ke.Z,{onResize:function(ua){var Lr=ua.offsetWidth;Ut(Lr)},disabled:Ge},Pr)),Pr}var Oe=p.forwardRef(xr);Oe.displayName="Item";var be=Oe;function O(m){var M=p.useRef();M.current=m;var A=p.useCallback(function(){for(var R,K=arguments.length,ie=new Array(K),oe=0;oe<K;oe++)ie[oe]=arguments[oe];return(R=M.current)===null||R===void 0?void 0:R.call.apply(R,[M].concat(ie))},[]);return A}var V=y(73935),ue=function(M){return+setTimeout(M,16)},Y=function(M){return clearTimeout(M)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ue=function(M){return window.requestAnimationFrame(M)},Y=function(M){return window.cancelAnimationFrame(M)});var et=0,mt=new Map;function fr(m){mt.delete(m)}var Lt=function(M){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;et+=1;var R=et;function K(ie){if(ie===0)fr(R),M();else{var oe=ue(function(){K(ie-1)});mt.set(R,oe)}}return K(A),R};Lt.cancel=function(m){var M=mt.get(m);return fr(M),Y(M)};var Pe=Lt;function Ne(m){if(typeof MessageChannel=="undefined")Pe(m);else{var M=new MessageChannel;M.port1.onmessage=function(){return m()},M.port2.postMessage(void 0)}}function _t(){var m=p.useRef(null),M=function(R){m.current||(m.current=[],Ne(function(){(0,V.unstable_batchedUpdates)(function(){m.current.forEach(function(K){K()}),m.current=null})})),m.current.push(R)};return M}function le(m,M){var A=p.useState(M),R=(0,G.Z)(A,2),K=R[0],ie=R[1],oe=O(function(Ge){m(function(){ie(Ge)})});return[K,oe]}var tt=p.createContext(null),bt=["component"],Ee=["className"],Fe=["className"],Le=function(M,A){var R=p.useContext(tt);if(!R){var K=M.component,ie=K===void 0?"div":K,oe=(0,X.Z)(M,bt);return p.createElement(ie,(0,x.Z)({},oe,{ref:A}))}var Ge=R.className,qe=(0,X.Z)(R,Ee),Qe=M.className,Ot=(0,X.Z)(M,Fe);return p.createElement(tt.Provider,{value:null},p.createElement(be,(0,x.Z)({ref:A,className:C()(Ge,Qe)},qe,Ot)))},me=p.forwardRef(Le);me.displayName="RawItem";var xt=me,ot=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Xe="responsive",ke="invalidate";function $t(m){return"+ ".concat(m.length," ...")}function Tt(m,M){var A=m.prefixCls,R=A===void 0?"rc-overflow":A,K=m.data,ie=K===void 0?[]:K,oe=m.renderItem,Ge=m.renderRawItem,qe=m.itemKey,Qe=m.itemWidth,Ot=Qe===void 0?10:Qe,kt=m.ssr,Dt=m.style,We=m.className,st=m.maxCount,Qt=m.renderRest,Ft=m.renderRawRest,Sr=m.suffix,er=m.component,Ut=er===void 0?"div":er,ft=m.itemComponent,sr=m.onVisibleChange,Ar=(0,X.Z)(m,ot),Pr=kt==="full",Cr=_t(),ua=le(Cr,null),Lr=(0,G.Z)(ua,2),Jn=Lr[0],$n=Lr[1],mn=Jn||0,rn=le(Cr,new Map),Tr=(0,G.Z)(rn,2),ln=Tr[0],vr=Tr[1],vn=le(Cr,0),_n=(0,G.Z)(vn,2),xa=_n[0],$a=_n[1],Kr=le(Cr,0),$r=(0,G.Z)(Kr,2),Da=$r[0],da=$r[1],Ra=le(Cr,0),An=(0,G.Z)(Ra,2),Dn=An[0],Yn=An[1],Xa=(0,p.useState)(null),La=(0,G.Z)(Xa,2),Ln=La[0],Na=La[1],ai=(0,p.useState)(null),ui=(0,G.Z)(ai,2),Qn=ui[0],bi=ui[1],Rr=p.useMemo(function(){return Qn===null&&Pr?Number.MAX_SAFE_INTEGER:Qn||0},[Qn,Jn]),Oi=(0,p.useState)(!1),Ja=(0,G.Z)(Oi,2),di=Ja[0],fi=Ja[1],Ya="".concat(R,"-item"),hi=Math.max(xa,Da),yi=st===Xe,Un=ie.length&&yi,Eo=st===ke,Oa=Un||typeof st=="number"&&ie.length>st,Ia=(0,p.useMemo)(function(){var Ht=ie;return Un?Jn===null&&Pr?Ht=ie:Ht=ie.slice(0,Math.min(ie.length,mn/Ot)):typeof st=="number"&&(Ht=ie.slice(0,st)),Ht},[ie,Ot,Jn,st,Un]),pi=(0,p.useMemo)(function(){return Un?ie.slice(Rr+1):ie.slice(Ia.length)},[ie,Ia,Un,Rr]),Fa=(0,p.useCallback)(function(Ht,Hr){var Rn;return typeof qe=="function"?qe(Ht):(Rn=qe&&(Ht==null?void 0:Ht[qe]))!==null&&Rn!==void 0?Rn:Hr},[qe]),Uo=(0,p.useCallback)(oe||function(Ht){return Ht},[oe]);function Ta(Ht,Hr,Rn){Qn===Ht&&(Hr===void 0||Hr===Ln)||(bi(Ht),Rn||(fi(Ht<ie.length-1),sr==null||sr(Ht)),Hr!==void 0&&Na(Hr))}function Xi(Ht,Hr){$n(Hr.clientWidth)}function xi(Ht,Hr){vr(function(Rn){var Di=new Map(Rn);return Hr===null?Di.delete(Ht):Di.set(Ht,Hr),Di})}function jn(Ht,Hr){da(Hr),$a(Da)}function nt(Ht,Hr){Yn(Hr)}function In(Ht){return ln.get(Fa(Ia[Ht],Ht))}Ue(function(){if(mn&&typeof hi=="number"&&Ia){var Ht=Dn,Hr=Ia.length,Rn=Hr-1;if(!Hr){Ta(0,null);return}for(var Di=0;Di<Hr;Di+=1){var za=In(Di);if(Pr&&(za=za||0),za===void 0){Ta(Di-1,void 0,!0);break}if(Ht+=za,Rn===0&&Ht<=mn||Di===Rn-1&&Ht+In(Rn)<=mn){Ta(Rn,null);break}else if(Ht+hi>mn){Ta(Di-1,Ht-za-Dn+Da);break}}Sr&&In(0)+Dn>mn&&Na(null)}},[mn,ln,Da,Dn,Fa,Ia]);var wa=di&&!!pi.length,ro={};Ln!==null&&Un&&(ro={position:"absolute",left:Ln,top:0});var fa={prefixCls:Ya,responsive:Un,component:ft,invalidate:Eo},Ua=Ge?function(Ht,Hr){var Rn=Fa(Ht,Hr);return p.createElement(tt.Provider,{key:Rn,value:(0,ge.Z)((0,ge.Z)({},fa),{},{order:Hr,item:Ht,itemKey:Rn,registerSize:xi,display:Hr<=Rr})},Ge(Ht,Hr))}:function(Ht,Hr){var Rn=Fa(Ht,Hr);return p.createElement(be,(0,x.Z)({},fa,{order:Hr,key:Rn,item:Ht,renderItem:Uo,itemKey:Rn,registerSize:xi,display:Hr<=Rr}))},sa,zn={order:wa?Rr:Number.MAX_SAFE_INTEGER,className:"".concat(Ya,"-rest"),registerSize:jn,display:wa};if(Ft)Ft&&(sa=p.createElement(tt.Provider,{value:(0,ge.Z)((0,ge.Z)({},fa),zn)},Ft(pi)));else{var Sa=Qt||$t;sa=p.createElement(be,(0,x.Z)({},fa,zn),typeof Sa=="function"?Sa(pi):Sa)}var Ji=p.createElement(Ut,(0,x.Z)({className:C()(!Eo&&R,We),style:Dt,ref:M},Ar),Ia.map(Ua),Oa?sa:null,Sr&&p.createElement(be,(0,x.Z)({},fa,{responsive:yi,responsiveDisabled:!Un,order:Rr,className:"".concat(Ya,"-suffix"),registerSize:nt,display:!0,style:ro}),Sr));return yi&&(Ji=p.createElement(Ke.Z,{onResize:Xi,disabled:!Un},Ji)),Ji}var wr=p.forwardRef(Tt);wr.displayName="Overflow",wr.Item=xt,wr.RESPONSIVE=Xe,wr.INVALIDATE=ke;var Ur=wr,nn=Ur,Qr=y(21770),Or=y(80334),cn=y(91881),Et=p.createContext(null);function Ae(m,M){return m===void 0?null:"".concat(m,"-").concat(M)}function de(m){var M=p.useContext(Et);return Ae(M,m)}var te=y(56982),Te=["children","locked"],Me=p.createContext(null);function ct(m,M){var A=(0,ge.Z)({},m);return Object.keys(M).forEach(function(R){var K=M[R];K!==void 0&&(A[R]=K)}),A}function xe(m){var M=m.children,A=m.locked,R=(0,X.Z)(m,Te),K=p.useContext(Me),ie=(0,te.Z)(function(){return ct(K,R)},[K,R],function(oe,Ge){return!A&&(oe[0]!==Ge[0]||!(0,cn.Z)(oe[1],Ge[1],!0))});return p.createElement(Me.Provider,{value:ie},M)}var we=[],At=p.createContext(null);function gt(){return p.useContext(At)}var je=p.createContext(we);function nr(m){var M=p.useContext(je);return p.useMemo(function(){return m!==void 0?[].concat((0,ce.Z)(M),[m]):M},[M,m])}var lr=p.createContext(null),re=p.createContext({}),jt=re,Rt=y(15105),Dr=y(75164),gn=function(m){if(!m)return!1;if(m instanceof Element){if(m.offsetParent)return!0;if(m.getBBox){var M=m.getBBox(),A=M.width,R=M.height;if(A||R)return!0}if(m.getBoundingClientRect){var K=m.getBoundingClientRect(),ie=K.width,oe=K.height;if(ie||oe)return!0}}return!1};function un(m){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(gn(m)){var A=m.nodeName.toLowerCase(),R=["input","select","textarea","button"].includes(A)||m.isContentEditable||A==="a"&&!!m.getAttribute("href"),K=m.getAttribute("tabindex"),ie=Number(K),oe=null;return K&&!Number.isNaN(ie)?oe=ie:R&&oe===null&&(oe=0),R&&m.disabled&&(oe=null),oe!==null&&(oe>=0||M&&oe<0)}return!1}function _i(m){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=(0,ce.Z)(m.querySelectorAll("*")).filter(function(R){return un(R,M)});return un(m,M)&&A.unshift(m),A}var _r=null;function Bt(){_r=document.activeElement}function Pi(){_r=null}function Wi(){if(_r)try{_r.focus()}catch(m){}}function ea(m,M){if(M.keyCode===9){var A=_i(m),R=A[M.shiftKey?0:A.length-1],K=R===document.activeElement||m===document.activeElement;if(K){var ie=A[M.shiftKey?A.length-1:0];ie.focus(),M.preventDefault()}}}var wn=Rt.Z.LEFT,$i=Rt.Z.RIGHT,Jt=Rt.Z.UP,Do=Rt.Z.DOWN,xo=Rt.Z.ENTER,co=Rt.Z.ESC,Ka=Rt.Z.HOME,ta=Rt.Z.END,cr=[Jt,Do,wn,$i];function Ha(m,M,A,R){var K,ie,oe,Ge,qe="prev",Qe="next",Ot="children",kt="parent";if(m==="inline"&&R===xo)return{inlineTrigger:!0};var Dt=(K={},(0,J.Z)(K,Jt,qe),(0,J.Z)(K,Do,Qe),K),We=(ie={},(0,J.Z)(ie,wn,A?Qe:qe),(0,J.Z)(ie,$i,A?qe:Qe),(0,J.Z)(ie,Do,Ot),(0,J.Z)(ie,xo,Ot),ie),st=(oe={},(0,J.Z)(oe,Jt,qe),(0,J.Z)(oe,Do,Qe),(0,J.Z)(oe,xo,Ot),(0,J.Z)(oe,co,kt),(0,J.Z)(oe,wn,A?Ot:kt),(0,J.Z)(oe,$i,A?kt:Ot),oe),Qt={inline:Dt,horizontal:We,vertical:st,inlineSub:Dt,horizontalSub:st,verticalSub:st},Ft=(Ge=Qt["".concat(m).concat(M?"":"Sub")])===null||Ge===void 0?void 0:Ge[R];switch(Ft){case qe:return{offset:-1,sibling:!0};case Qe:return{offset:1,sibling:!0};case kt:return{offset:-1,sibling:!1};case Ot:return{offset:1,sibling:!1};default:return null}}function qs(m){for(var M=m;M;){if(M.getAttribute("data-menu-list"))return M;M=M.parentElement}return null}function ms(m,M){for(var A=m||document.activeElement;A;){if(M.has(A))return A;A=A.parentElement}return null}function Lo(m,M){var A=_i(m,!0);return A.filter(function(R){return M.has(R)})}function Mi(m,M,A){var R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!m)return null;var K=Lo(m,M),ie=K.length,oe=K.findIndex(function(Ge){return A===Ge});return R<0?oe===-1?oe=ie-1:oe-=1:R>0&&(oe+=1),oe=(oe+ie)%ie,K[oe]}function Fo(m,M,A,R,K,ie,oe,Ge,qe,Qe){var Ot=p.useRef(),kt=p.useRef();kt.current=M;var Dt=function(){Dr.Z.cancel(Ot.current)};return p.useEffect(function(){return function(){Dt()}},[]),function(We){var st=We.which;if([].concat(cr,[xo,co,Ka,ta]).includes(st)){var Qt,Ft,Sr,er=function(){Qt=new Set,Ft=new Map,Sr=new Map;var Tr=ie();return Tr.forEach(function(ln){var vr=document.querySelector("[data-menu-id='".concat(Ae(R,ln),"']"));vr&&(Qt.add(vr),Sr.set(vr,ln),Ft.set(ln,vr))}),Qt};er();var Ut=Ft.get(M),ft=ms(Ut,Qt),sr=Sr.get(ft),Ar=Ha(m,oe(sr,!0).length===1,A,st);if(!Ar&&st!==Ka&&st!==ta)return;(cr.includes(st)||[Ka,ta].includes(st))&&We.preventDefault();var Pr=function(Tr){if(Tr){var ln=Tr,vr=Tr.querySelector("a");vr!=null&&vr.getAttribute("href")&&(ln=vr);var vn=Sr.get(Tr);Ge(vn),Dt(),Ot.current=(0,Dr.Z)(function(){kt.current===vn&&ln.focus()})}};if([Ka,ta].includes(st)||Ar.sibling||!ft){var Cr;!ft||m==="inline"?Cr=K.current:Cr=qs(ft);var ua,Lr=Lo(Cr,Qt);st===Ka?ua=Lr[0]:st===ta?ua=Lr[Lr.length-1]:ua=Mi(Cr,Qt,ft,Ar.offset),Pr(ua)}else if(Ar.inlineTrigger)qe(sr);else if(Ar.offset>0)qe(sr,!0),Dt(),Ot.current=(0,Dr.Z)(function(){er();var rn=ft.getAttribute("aria-controls"),Tr=document.getElementById(rn),ln=Mi(Tr,Qt);Pr(ln)},5);else if(Ar.offset<0){var Jn=oe(sr,!0),$n=Jn[Jn.length-2],mn=Ft.get($n);qe($n,!1),Pr(mn)}}Qe==null||Qe(We)}}function Ri(m){Promise.resolve().then(m)}var U="__RC_UTIL_PATH_SPLIT__",Q=function(M){return M.join(U)},Se=function(M){return M.split(U)},Ye="rc-menu-more";function Ct(){var m=p.useState({}),M=(0,G.Z)(m,2),A=M[1],R=(0,p.useRef)(new Map),K=(0,p.useRef)(new Map),ie=p.useState([]),oe=(0,G.Z)(ie,2),Ge=oe[0],qe=oe[1],Qe=(0,p.useRef)(0),Ot=(0,p.useRef)(!1),kt=function(){Ot.current||A({})},Dt=(0,p.useCallback)(function(Ut,ft){var sr=Q(ft);K.current.set(sr,Ut),R.current.set(Ut,sr),Qe.current+=1;var Ar=Qe.current;Ri(function(){Ar===Qe.current&&kt()})},[]),We=(0,p.useCallback)(function(Ut,ft){var sr=Q(ft);K.current.delete(sr),R.current.delete(Ut)},[]),st=(0,p.useCallback)(function(Ut){qe(Ut)},[]),Qt=(0,p.useCallback)(function(Ut,ft){var sr=R.current.get(Ut)||"",Ar=Se(sr);return ft&&Ge.includes(Ar[0])&&Ar.unshift(Ye),Ar},[Ge]),Ft=(0,p.useCallback)(function(Ut,ft){return Ut.some(function(sr){var Ar=Qt(sr,!0);return Ar.includes(ft)})},[Qt]),Sr=function(){var ft=(0,ce.Z)(R.current.keys());return Ge.length&&ft.push(Ye),ft},er=(0,p.useCallback)(function(Ut){var ft="".concat(R.current.get(Ut)).concat(U),sr=new Set;return(0,ce.Z)(K.current.keys()).forEach(function(Ar){Ar.startsWith(ft)&&sr.add(K.current.get(Ar))}),sr},[]);return p.useEffect(function(){return function(){Ot.current=!0}},[]),{registerPath:Dt,unregisterPath:We,refreshOverflowKeys:st,isSubPathKey:Ft,getKeyPath:Qt,getKeys:Sr,getSubPathKeys:er}}function Nt(m){var M=p.useRef(m);M.current=m;var A=p.useCallback(function(){for(var R,K=arguments.length,ie=new Array(K),oe=0;oe<K;oe++)ie[oe]=arguments[oe];return(R=M.current)===null||R===void 0?void 0:R.call.apply(R,[M].concat(ie))},[]);return m?A:void 0}var Cn=Math.random().toFixed(5).toString().slice(2),jr=0;function ra(m){var M=(0,Qr.Z)(m,{value:m}),A=(0,G.Z)(M,2),R=A[0],K=A[1];return p.useEffect(function(){jr+=1;var ie="".concat(Cn,"-").concat(jr);K("rc-menu-uuid-".concat(ie))},[]),R}var En=y(15671),Gr=y(43144),Ea=y(60136),dn=y(51630),pn=y(98423),mi=y(42550);function Hn(m,M,A,R){var K=p.useContext(Me),ie=K.activeKey,oe=K.onActive,Ge=K.onInactive,qe={active:ie===m};return M||(qe.onMouseEnter=function(Qe){A==null||A({key:m,domEvent:Qe}),oe(m)},qe.onMouseLeave=function(Qe){R==null||R({key:m,domEvent:Qe}),Ge(m)}),qe}function Wn(m){var M=p.useContext(Me),A=M.mode,R=M.rtl,K=M.inlineIndent;if(A!=="inline")return null;var ie=m;return R?{paddingRight:ie*K}:{paddingLeft:ie*K}}function Ci(m){var M=m.icon,A=m.props,R=m.children,K;return M===null||M===!1?null:(typeof M=="function"?K=p.createElement(M,(0,ge.Z)({},A)):typeof M!="boolean"&&(K=M),K||R||null)}var Br=["item"];function He(m){var M=m.item,A=(0,X.Z)(m,Br);return Object.defineProperty(A,"item",{get:function(){return(0,Or.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),M}}),A}var Zi=["title","attribute","elementRef"],wo=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ei=["active"],zo=function(m){(0,Ea.Z)(A,m);var M=(0,dn.Z)(A);function A(){return(0,En.Z)(this,A),M.apply(this,arguments)}return(0,Gr.Z)(A,[{key:"render",value:function(){var K=this.props,ie=K.title,oe=K.attribute,Ge=K.elementRef,qe=(0,X.Z)(K,Zi),Qe=(0,pn.Z)(qe,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Or.ZP)(!oe,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),p.createElement(nn.Item,(0,x.Z)({},oe,{title:typeof ie=="string"?ie:void 0},Qe,{ref:Ge}))}}]),A}(p.Component),uo=p.forwardRef(function(m,M){var A,R=m.style,K=m.className,ie=m.eventKey,oe=m.warnKey,Ge=m.disabled,qe=m.itemIcon,Qe=m.children,Ot=m.role,kt=m.onMouseEnter,Dt=m.onMouseLeave,We=m.onClick,st=m.onKeyDown,Qt=m.onFocus,Ft=(0,X.Z)(m,wo),Sr=de(ie),er=p.useContext(Me),Ut=er.prefixCls,ft=er.onItemClick,sr=er.disabled,Ar=er.overflowDisabled,Pr=er.itemIcon,Cr=er.selectedKeys,ua=er.onActive,Lr=p.useContext(jt),Jn=Lr._internalRenderMenuItem,$n="".concat(Ut,"-item"),mn=p.useRef(),rn=p.useRef(),Tr=sr||Ge,ln=(0,mi.x1)(M,rn),vr=nr(ie),vn=function(La){return{key:ie,keyPath:(0,ce.Z)(vr).reverse(),item:mn.current,domEvent:La}},_n=qe||Pr,xa=Hn(ie,Tr,kt,Dt),$a=xa.active,Kr=(0,X.Z)(xa,Ei),$r=Cr.includes(ie),Da=Wn(vr.length),da=function(La){if(!Tr){var Ln=vn(La);We==null||We(He(Ln)),ft(Ln)}},Ra=function(La){if(st==null||st(La),La.which===Rt.Z.ENTER){var Ln=vn(La);We==null||We(He(Ln)),ft(Ln)}},An=function(La){ua(ie),Qt==null||Qt(La)},Dn={};m.role==="option"&&(Dn["aria-selected"]=$r);var Yn=p.createElement(zo,(0,x.Z)({ref:mn,elementRef:ln,role:Ot===null?"none":Ot||"menuitem",tabIndex:Ge?null:-1,"data-menu-id":Ar&&Sr?null:Sr},Ft,Kr,Dn,{component:"li","aria-disabled":Ge,style:(0,ge.Z)((0,ge.Z)({},Da),R),className:C()($n,(A={},(0,J.Z)(A,"".concat($n,"-active"),$a),(0,J.Z)(A,"".concat($n,"-selected"),$r),(0,J.Z)(A,"".concat($n,"-disabled"),Tr),A),K),onClick:da,onKeyDown:Ra,onFocus:An}),Qe,p.createElement(Ci,{props:(0,ge.Z)((0,ge.Z)({},m),{},{isSelected:$r}),icon:_n}));return Jn&&(Yn=Jn(Yn,m,{selected:$r})),Yn});function Io(m,M){var A=m.eventKey,R=gt(),K=nr(A);return p.useEffect(function(){if(R)return R.registerPath(A,K),function(){R.unregisterPath(A,K)}},[K]),R?null:p.createElement(uo,(0,x.Z)({},m,{ref:M}))}var So=p.forwardRef(Io),ks=["className","children"],vs=function(M,A){var R=M.className,K=M.children,ie=(0,X.Z)(M,ks),oe=p.useContext(Me),Ge=oe.prefixCls,qe=oe.mode,Qe=oe.rtl;return p.createElement("ul",(0,x.Z)({className:C()(Ge,Qe&&"".concat(Ge,"-rtl"),"".concat(Ge,"-sub"),"".concat(Ge,"-").concat(qe==="inline"?"inline":"vertical"),R),role:"menu"},ie,{"data-menu-list":!0,ref:A}),K)},Xo=p.forwardRef(vs);Xo.displayName="SubMenuList";var ka=Xo,Bn=y(50344);function ti(m,M){return(0,Bn.Z)(m).map(function(A,R){if(p.isValidElement(A)){var K,ie,oe=A.key,Ge=(K=(ie=A.props)===null||ie===void 0?void 0:ie.eventKey)!==null&&K!==void 0?K:oe,qe=Ge==null;qe&&(Ge="tmp_key-".concat([].concat((0,ce.Z)(M),[R]).join("-")));var Qe={key:Ge,eventKey:Ge};return p.cloneElement(A,Qe)}return A})}function fo(m){"@babel/helpers - typeof";return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},fo(m)}function Ko(m,M){if(fo(m)!="object"||!m)return m;var A=m[Symbol.toPrimitive];if(A!==void 0){var R=A.call(m,M||"default");if(fo(R)!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(M==="string"?String:Number)(m)}function To(m){var M=Ko(m,"string");return fo(M)=="symbol"?M:M+""}function Jo(m,M,A){return(M=To(M))in m?Object.defineProperty(m,M,{value:A,enumerable:!0,configurable:!0,writable:!0}):m[M]=A,m}function Yi(m,M){var A=Object.keys(m);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(m);M&&(R=R.filter(function(K){return Object.getOwnPropertyDescriptor(m,K).enumerable})),A.push.apply(A,R)}return A}function pa(m){for(var M=1;M<arguments.length;M++){var A=arguments[M]!=null?arguments[M]:{};M%2?Yi(Object(A),!0).forEach(function(R){Jo(m,R,A[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(A)):Yi(Object(A)).forEach(function(R){Object.defineProperty(m,R,Object.getOwnPropertyDescriptor(A,R))})}return m}function Rs(m){if(Array.isArray(m))return m}function As(m,M){var A=m==null?null:typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(A!=null){var R,K,ie,oe,Ge=[],qe=!0,Qe=!1;try{if(ie=(A=A.call(m)).next,M===0){if(Object(A)!==A)return;qe=!1}else for(;!(qe=(R=ie.call(A)).done)&&(Ge.push(R.value),Ge.length!==M);qe=!0);}catch(Ot){Qe=!0,K=Ot}finally{try{if(!qe&&A.return!=null&&(oe=A.return(),Object(oe)!==oe))return}finally{if(Qe)throw K}}return Ge}}function Ds(m,M){(M==null||M>m.length)&&(M=m.length);for(var A=0,R=Array(M);A<M;A++)R[A]=m[A];return R}function Nn(m,M){if(m){if(typeof m=="string")return Ds(m,M);var A={}.toString.call(m).slice(8,-1);return A==="Object"&&m.constructor&&(A=m.constructor.name),A==="Map"||A==="Set"?Array.from(m):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Ds(m,M):void 0}}function yl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ri(m,M){return Rs(m)||As(m,M)||Nn(m,M)||yl()}function Ns(m,M){if(m==null)return{};var A={};for(var R in m)if({}.hasOwnProperty.call(m,R)){if(M.includes(R))continue;A[R]=m[R]}return A}function Yo(m,M){if(m==null)return{};var A,R,K=Ns(m,M);if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(m);for(R=0;R<ie.length;R++)A=ie[R],M.includes(A)||{}.propertyIsEnumerable.call(m,A)&&(K[A]=m[A])}return K}var li=y(98924),Ls=p.createContext(null),Ho=Ls,Qo=y(8410),Vi=[];function Wo(m,M){var A=p.useState(function(){if(!(0,li.Z)())return null;var st=document.createElement("div");return st}),R=(0,G.Z)(A,1),K=R[0],ie=p.useRef(!1),oe=p.useContext(Ho),Ge=p.useState(Vi),qe=(0,G.Z)(Ge,2),Qe=qe[0],Ot=qe[1],kt=oe||(ie.current?void 0:function(st){Ot(function(Qt){var Ft=[st].concat((0,ce.Z)(Qt));return Ft})});function Dt(){K.parentElement||document.body.appendChild(K),ie.current=!0}function We(){var st;(st=K.parentElement)===null||st===void 0||st.removeChild(K),ie.current=!1}return(0,Qo.Z)(function(){return m?oe?oe(Dt):Dt():We(),We},[m]),(0,Qo.Z)(function(){Qe.length&&(Qe.forEach(function(st){return st()}),Ot(Vi))},[Qe]),[K,kt]}var Bo=y(48981),ho=y(74204);function Qi(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var sl="rc-util-locker-".concat(Date.now()),eo=0;function _o(m){var M=!!m,A=p.useState(function(){return eo+=1,"".concat(sl,"_").concat(eo)}),R=(0,G.Z)(A,1),K=R[0];(0,Qo.Z)(function(){if(M){var ie=(0,ho.o)(document.body).width,oe=Qi();(0,Bo.hq)(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(oe?"width: calc(100% - ".concat(ie,"px);"):"",`
|
|
|
}`),K)}else(0,Bo.jL)(K);return function(){(0,Bo.jL)(K)}},[M,K])}var w=!1;function D(m){return typeof m=="boolean"&&(w=m),w}var ne=function(M){return M===!1?!1:!(0,li.Z)()||!M?null:typeof M=="string"?document.querySelector(M):typeof M=="function"?M():M},ae=p.forwardRef(function(m,M){var A=m.open,R=m.autoLock,K=m.getContainer,ie=m.debug,oe=m.autoDestroy,Ge=oe===void 0?!0:oe,qe=m.children,Qe=p.useState(A),Ot=(0,G.Z)(Qe,2),kt=Ot[0],Dt=Ot[1],We=kt||A;p.useEffect(function(){(Ge||A)&&Dt(A)},[A,Ge]);var st=p.useState(function(){return ne(K)}),Qt=(0,G.Z)(st,2),Ft=Qt[0],Sr=Qt[1];p.useEffect(function(){var $n=ne(K);Sr($n!=null?$n:null)});var er=Wo(We&&!Ft,ie),Ut=(0,G.Z)(er,2),ft=Ut[0],sr=Ut[1],Ar=Ft!=null?Ft:ft;_o(R&&A&&(0,li.Z)()&&(Ar===ft||Ar===document.body));var Pr=null;if(qe&&(0,mi.Yr)(qe)&&M){var Cr=qe;Pr=Cr.ref}var ua=(0,mi.x1)(Pr,M);if(!We||!(0,li.Z)()||Ft===void 0)return null;var Lr=Ar===!1||D(),Jn=qe;return M&&(Jn=p.cloneElement(qe,{ref:ua})),p.createElement(Ho.Provider,{value:sr},Lr?Jn:(0,V.createPortal)(Jn,Ar))}),_e=ae,Ie=_e;function at(m){return m instanceof HTMLElement||m instanceof SVGElement}function wt(m){return m&&_typeof(m)==="object"&&at(m.nativeElement)?m.nativeElement:at(m)?m:null}function pr(m){var M=wt(m);if(M)return M;if(m instanceof React.Component){var A;return(A=ReactDOM.findDOMNode)===null||A===void 0?void 0:A.call(ReactDOM,m)}return null}function ur(m){var M;return m==null||(M=m.getRootNode)===null||M===void 0?void 0:M.call(m)}function qr(m){return ur(m)instanceof ShadowRoot}function Wt(m){return qr(m)?ur(m):null}function kr(m){var M=p.useRef();M.current=m;var A=p.useCallback(function(){for(var R,K=arguments.length,ie=new Array(K),oe=0;oe<K;oe++)ie[oe]=arguments[oe];return(R=M.current)===null||R===void 0?void 0:R.call.apply(R,[M].concat(ie))},[]);return A}function Yr(m){if(Array.isArray(m))return m}function an(m,M){var A=m==null?null:typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(A!=null){var R,K,ie,oe,Ge=[],qe=!0,Qe=!1;try{if(ie=(A=A.call(m)).next,M===0){if(Object(A)!==A)return;qe=!1}else for(;!(qe=(R=ie.call(A)).done)&&(Ge.push(R.value),Ge.length!==M);qe=!0);}catch(Ot){Qe=!0,K=Ot}finally{try{if(!qe&&A.return!=null&&(oe=A.return(),Object(oe)!==oe))return}finally{if(Qe)throw K}}return Ge}}function Zn(m,M){(M==null||M>m.length)&&(M=m.length);for(var A=0,R=new Array(M);A<M;A++)R[A]=m[A];return R}function qn(m,M){if(m){if(typeof m=="string")return Zn(m,M);var A=Object.prototype.toString.call(m).slice(8,-1);if(A==="Object"&&m.constructor&&(A=m.constructor.name),A==="Map"||A==="Set")return Array.from(m);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Zn(m,M)}}function Gt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function It(m,M){return Yr(m)||an(m,M)||qn(m,M)||Gt()}function Kt(m){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},Kt(m)}function gr(m,M){if(Kt(m)!=="object"||m===null)return m;var A=m[Symbol.toPrimitive];if(A!==void 0){var R=A.call(m,M||"default");if(Kt(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(M==="string"?String:Number)(m)}function en(m){var M=gr(m,"string");return Kt(M)==="symbol"?M:String(M)}function Xr(m,M,A){return M=en(M),M in m?Object.defineProperty(m,M,{value:A,enumerable:!0,configurable:!0,writable:!0}):m[M]=A,m}function Vn(m,M){var A=Object.keys(m);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(m);M&&(R=R.filter(function(K){return Object.getOwnPropertyDescriptor(m,K).enumerable})),A.push.apply(A,R)}return A}function na(m){for(var M=1;M<arguments.length;M++){var A=arguments[M]!=null?arguments[M]:{};M%2?Vn(Object(A),!0).forEach(function(R){Xr(m,R,A[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(A)):Vn(Object(A)).forEach(function(R){Object.defineProperty(m,R,Object.getOwnPropertyDescriptor(A,R))})}return m}function tn(){var m=na({},fe);return m.useId}var bn=0;function ma(){}var Fr=tn(),aa=Fr?function(M){var A=Fr();return M||A}:function(M){var A=p.useState("ssr-id"),R=It(A,2),K=R[0],ie=R[1];return p.useEffect(function(){var oe=bn;bn+=1,ie("rc_unique_".concat(oe))},[]),M||K};function kn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var va=kn()?p.useLayoutEffect:p.useEffect,Ui=function(M,A){var R=p.useRef(!0);va(function(){return M(R.current)},A),va(function(){return R.current=!1,function(){R.current=!0}},[])},es=function(M,A){Ui(function(R){if(!R)return M()},A)},Pa=Ui,vi=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var m=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(m)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(m==null?void 0:m.substr(0,4))};function ji(){return ji=Object.assign?Object.assign.bind():function(m){for(var M=1;M<arguments.length;M++){var A=arguments[M];for(var R in A)({}).hasOwnProperty.call(A,R)&&(m[R]=A[R])}return m},ji.apply(null,arguments)}var Zo=y(62874),Pn=y(8399);function ga(m,M,A){var R=p.useRef({});return(!("value"in R.current)||A(R.current.condition,M))&&(R.current.value=m(),R.current.condition=M),R.current.value}var po=Symbol.for("react.element"),ki=Symbol.for("react.transitional.element"),Wa=Symbol.for("react.fragment");function Gi(m){return m&&Kt(m)==="object"&&(m.$$typeof===po||m.$$typeof===ki)&&m.type===Wa}var ni=function(M,A){typeof M=="function"?M(A):Kt(M)==="object"&&M&&"current"in M&&(M.current=A)},gs=function(){for(var M=arguments.length,A=new Array(M),R=0;R<M;R++)A[R]=arguments[R];var K=A.filter(Boolean);return K.length<=1?K[0]:function(ie){A.forEach(function(oe){ni(oe,ie)})}},bs=function(){for(var M=arguments.length,A=new Array(M),R=0;R<M;R++)A[R]=arguments[R];return ga(function(){return gs.apply(void 0,A)},A,function(K,ie){return K.length!==ie.length||K.every(function(oe,Ge){return oe!==ie[Ge]})})},Xs=function(M){var A,R;if(!M)return!1;if(Js(M)&&M.props.propertyIsEnumerable("ref"))return!0;var K=(0,Pn.isMemo)(M)?M.type.type:M.type;return!(typeof K=="function"&&!((A=K.prototype)!==null&&A!==void 0&&A.render)&&K.$$typeof!==Pn.ForwardRef||typeof M=="function"&&!((R=M.prototype)!==null&&R!==void 0&&R.render)&&M.$$typeof!==Pn.ForwardRef)};function Js(m){return(0,p.isValidElement)(m)&&!Gi(m)}var Ul=function(M){return Js(M)&&Xs(M)},Ni=function(M){if(M&&Js(M)){var A=M;return A.props.propertyIsEnumerable("ref")?A.props.ref:A.ref}return null};function Pl(m){var M=m.prefixCls,A=m.align,R=m.arrow,K=m.arrowPos,ie=R||{},oe=ie.className,Ge=ie.content,qe=K.x,Qe=qe===void 0?0:qe,Ot=K.y,kt=Ot===void 0?0:Ot,Dt=p.useRef();if(!A||!A.points)return null;var We={position:"absolute"};if(A.autoArrow!==!1){var st=A.points[0],Qt=A.points[1],Ft=st[0],Sr=st[1],er=Qt[0],Ut=Qt[1];Ft===er||!["t","b"].includes(Ft)?We.top=kt:Ft==="t"?We.top=0:We.bottom=0,Sr===Ut||!["l","r"].includes(Sr)?We.left=Qe:Sr==="l"?We.left=0:We.right=0}return p.createElement("div",{ref:Dt,className:C()("".concat(M,"-arrow"),oe),style:We},Ge)}function Za(m){var M=m.prefixCls,A=m.open,R=m.zIndex,K=m.mask,ie=m.motion;return K?p.createElement(Zo.Z,ji({},ie,{motionAppear:!0,visible:A,removeOnLeave:!0}),function(oe){var Ge=oe.className;return p.createElement("div",{style:{zIndex:R},className:C()("".concat(M,"-mask"),Ge)})}):null}var Mo=p.memo(function(m){var M=m.children;return M},function(m,M){return M.cache}),os=Mo,mo=p.forwardRef(function(m,M){var A=m.popup,R=m.className,K=m.prefixCls,ie=m.style,oe=m.target,Ge=m.onVisibleChanged,qe=m.open,Qe=m.keepDom,Ot=m.fresh,kt=m.onClick,Dt=m.mask,We=m.arrow,st=m.arrowPos,Qt=m.align,Ft=m.motion,Sr=m.maskMotion,er=m.forceRender,Ut=m.getPopupContainer,ft=m.autoDestroy,sr=m.portal,Ar=m.zIndex,Pr=m.onMouseEnter,Cr=m.onMouseLeave,ua=m.onPointerEnter,Lr=m.ready,Jn=m.offsetX,$n=m.offsetY,mn=m.offsetR,rn=m.offsetB,Tr=m.onAlign,ln=m.onPrepare,vr=m.stretch,vn=m.targetWidth,_n=m.targetHeight,xa=typeof A=="function"?A():A,$a=qe||Qe,Kr=(Ut==null?void 0:Ut.length)>0,$r=p.useState(!Ut||!Kr),Da=ri($r,2),da=Da[0],Ra=Da[1];if(Pa(function(){!da&&Kr&&oe&&Ra(!0)},[da,Kr,oe]),!da)return null;var An="auto",Dn={left:"-1000vw",top:"-1000vh",right:An,bottom:An};if(Lr||!qe){var Yn,Xa=Qt.points,La=Qt.dynamicInset||((Yn=Qt._experimental)===null||Yn===void 0?void 0:Yn.dynamicInset),Ln=La&&Xa[0][1]==="r",Na=La&&Xa[0][0]==="b";Ln?(Dn.right=mn,Dn.left=An):(Dn.left=Jn,Dn.right=An),Na?(Dn.bottom=rn,Dn.top=An):(Dn.top=$n,Dn.bottom=An)}var ai={};return vr&&(vr.includes("height")&&_n?ai.height=_n:vr.includes("minHeight")&&_n&&(ai.minHeight=_n),vr.includes("width")&&vn?ai.width=vn:vr.includes("minWidth")&&vn&&(ai.minWidth=vn)),qe||(ai.pointerEvents="none"),p.createElement(sr,{open:er||$a,getContainer:Ut&&function(){return Ut(oe)},autoDestroy:ft},p.createElement(Za,{prefixCls:K,open:qe,zIndex:Ar,mask:Dt,motion:Sr}),p.createElement(Ke.Z,{onResize:Tr,disabled:!qe},function(ui){return p.createElement(Zo.Z,ji({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:er,leavedClassName:"".concat(K,"-hidden")},Ft,{onAppearPrepare:ln,onEnterPrepare:ln,visible:qe,onVisibleChanged:function(bi){var Rr;Ft==null||(Rr=Ft.onVisibleChanged)===null||Rr===void 0||Rr.call(Ft,bi),Ge(bi)}}),function(Qn,bi){var Rr=Qn.className,Oi=Qn.style,Ja=C()(K,Rr,R);return p.createElement("div",{ref:gs(ui,M,bi),className:Ja,style:pa(pa(pa(pa({"--arrow-x":"".concat(st.x||0,"px"),"--arrow-y":"".concat(st.y||0,"px")},Dn),ai),Oi),{},{boxSizing:"border-box",zIndex:Ar},ie),onMouseEnter:Pr,onMouseLeave:Cr,onPointerEnter:ua,onClick:kt},We&&p.createElement(Pl,{prefixCls:K,arrow:We,arrowPos:st,align:Qt}),p.createElement(os,{cache:!qe&&!Ot},xa))})}))}),Ys=mo,ss=p.forwardRef(function(m,M){var A=m.children,R=m.getTriggerDOMNode,K=Xs(A),ie=p.useCallback(function(Ge){ni(M,R?R(Ge):Ge)},[R]),oe=bs(ie,A.ref);return K?p.cloneElement(A,{ref:oe}):A}),br=ss,Qs=p.createContext(null),Os=Qs;function ls(m){return m?Array.isArray(m)?m:[m]:[]}function to(m,M,A,R){return p.useMemo(function(){var K=ls(A!=null?A:M),ie=ls(R!=null?R:M),oe=new Set(K),Ge=new Set(ie);return m&&(oe.has("hover")&&(oe.delete("hover"),oe.add("click")),Ge.has("hover")&&(Ge.delete("hover"),Ge.add("click"))),[oe,Ge]},[m,M,A,R])}var ca=function(m){if(!m)return!1;if(m instanceof Element){if(m.offsetParent)return!0;if(m.getBBox){var M=m.getBBox(),A=M.width,R=M.height;if(A||R)return!0}if(m.getBoundingClientRect){var K=m.getBoundingClientRect(),ie=K.width,oe=K.height;if(ie||oe)return!0}}return!1};function ll(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],A=arguments.length>2?arguments[2]:void 0;return A?m[0]===M[0]:m[0]===M[0]&&m[1]===M[1]}function gi(m,M,A,R){for(var K=A.points,ie=Object.keys(m),oe=0;oe<ie.length;oe+=1){var Ge,qe=ie[oe];if(ll((Ge=m[qe])===null||Ge===void 0?void 0:Ge.points,K,R))return"".concat(M,"-placement-").concat(qe)}return""}function qi(m,M,A,R){return M||(A?{motionName:"".concat(m,"-").concat(A)}:R?{motionName:R}:null)}function Fs(m){return m.ownerDocument.defaultView}function xl(m){for(var M=[],A=m==null?void 0:m.parentElement,R=["hidden","scroll","clip","auto"];A;){var K=Fs(A).getComputedStyle(A),ie=K.overflowX,oe=K.overflowY,Ge=K.overflow;[ie,oe,Ge].some(function(qe){return R.includes(qe)})&&M.push(A),A=A.parentElement}return M}function vo(m){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(m)?M:m}function zs(m){return vo(parseFloat(m),0)}function cl(m,M){var A=pa({},m);return(M||[]).forEach(function(R){if(!(R instanceof HTMLBodyElement||R instanceof HTMLHtmlElement)){var K=Fs(R).getComputedStyle(R),ie=K.overflow,oe=K.overflowClipMargin,Ge=K.borderTopWidth,qe=K.borderBottomWidth,Qe=K.borderLeftWidth,Ot=K.borderRightWidth,kt=R.getBoundingClientRect(),Dt=R.offsetHeight,We=R.clientHeight,st=R.offsetWidth,Qt=R.clientWidth,Ft=zs(Ge),Sr=zs(qe),er=zs(Qe),Ut=zs(Ot),ft=vo(Math.round(kt.width/st*1e3)/1e3),sr=vo(Math.round(kt.height/Dt*1e3)/1e3),Ar=(st-Qt-er-Ut)*ft,Pr=(Dt-We-Ft-Sr)*sr,Cr=Ft*sr,ua=Sr*sr,Lr=er*ft,Jn=Ut*ft,$n=0,mn=0;if(ie==="clip"){var rn=zs(oe);$n=rn*ft,mn=rn*sr}var Tr=kt.x+Lr-$n,ln=kt.y+Cr-mn,vr=Tr+kt.width+2*$n-Lr-Jn-Ar,vn=ln+kt.height+2*mn-Cr-ua-Pr;A.left=Math.max(A.left,Tr),A.top=Math.max(A.top,ln),A.right=Math.min(A.right,vr),A.bottom=Math.min(A.bottom,vn)}}),A}function wl(m){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A="".concat(M),R=A.match(/^(.*)\%$/);return R?m*(parseFloat(R[1])/100):parseFloat(A)}function Sl(m,M){var A=M||[],R=ri(A,2),K=R[0],ie=R[1];return[wl(m.width,K),wl(m.height,ie)]}function _l(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[m[0],m[1]]}function Ks(m,M){var A=M[0],R=M[1],K,ie;return A==="t"?ie=m.y:A==="b"?ie=m.y+m.height:ie=m.y+m.height/2,R==="l"?K=m.x:R==="r"?K=m.x+m.width:K=m.x+m.width/2,{x:K,y:ie}}function Vo(m,M){var A={t:"b",b:"t",l:"r",r:"l"};return m.map(function(R,K){return K===M?A[R]||"c":R}).join("")}function jl(m,M,A,R,K,ie,oe){var Ge=p.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:K[R]||{}}),qe=ri(Ge,2),Qe=qe[0],Ot=qe[1],kt=p.useRef(0),Dt=p.useMemo(function(){return M?xl(M):[]},[M]),We=p.useRef({}),st=function(){We.current={}};m||st();var Qt=kr(function(){if(M&&A&&m){let ko=function(io,_s){var oo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oi,Ps=_n.x+io,Ms=_n.y+_s,Cs=Ps+Dn,_c=Ms+An,Rc=Math.max(Ps,oo.left),Mc=Math.max(Ms,oo.top),Cc=Math.min(Cs,oo.right),go=Math.min(_c,oo.bottom);return Math.max(0,(Cc-Rc)*(go-Mc))},ml=function(){Fi=_n.y+zn,no=Fi+An,Ii=_n.x+sa,$o=Ii+Dn};var er,Ut,ft=M,sr=ft.ownerDocument,Ar=Fs(ft),Pr=Ar.getComputedStyle(ft),Cr=Pr.width,ua=Pr.height,Lr=Pr.position,Jn=ft.style.left,$n=ft.style.top,mn=ft.style.right,rn=ft.style.bottom,Tr=pa(pa({},K[R]),ie),ln=sr.createElement("div");(er=ft.parentElement)===null||er===void 0||er.appendChild(ln),ln.style.left="".concat(ft.offsetLeft,"px"),ln.style.top="".concat(ft.offsetTop,"px"),ln.style.position=Lr,ln.style.height="".concat(ft.offsetHeight,"px"),ln.style.width="".concat(ft.offsetWidth,"px"),ft.style.left="0",ft.style.top="0",ft.style.right="auto",ft.style.bottom="auto";var vr;if(Array.isArray(A))vr={x:A[0],y:A[1],width:0,height:0};else{var vn=A.getBoundingClientRect();vr={x:vn.x,y:vn.y,width:vn.width,height:vn.height}}var _n=ft.getBoundingClientRect(),xa=sr.documentElement,$a=xa.clientWidth,Kr=xa.clientHeight,$r=xa.scrollWidth,Da=xa.scrollHeight,da=xa.scrollTop,Ra=xa.scrollLeft,An=_n.height,Dn=_n.width,Yn=vr.height,Xa=vr.width,La={left:0,top:0,right:$a,bottom:Kr},Ln={left:-Ra,top:-da,right:$r-Ra,bottom:Da-da},Na=Tr.htmlRegion,ai="visible",ui="visibleFirst";Na!=="scroll"&&Na!==ui&&(Na=ai);var Qn=Na===ui,bi=cl(Ln,Dt),Rr=cl(La,Dt),Oi=Na===ai?Rr:bi,Ja=Qn?Rr:Oi;ft.style.left="auto",ft.style.top="auto",ft.style.right="0",ft.style.bottom="0";var di=ft.getBoundingClientRect();ft.style.left=Jn,ft.style.top=$n,ft.style.right=mn,ft.style.bottom=rn,(Ut=ft.parentElement)===null||Ut===void 0||Ut.removeChild(ln);var fi=vo(Math.round(Dn/parseFloat(Cr)*1e3)/1e3),Ya=vo(Math.round(An/parseFloat(ua)*1e3)/1e3);if(fi===0||Ya===0||at(A)&&!ca(A))return;var hi=Tr.offset,yi=Tr.targetOffset,Un=Sl(_n,hi),Eo=ri(Un,2),Oa=Eo[0],Ia=Eo[1],pi=Sl(vr,yi),Fa=ri(pi,2),Uo=Fa[0],Ta=Fa[1];vr.x-=Uo,vr.y-=Ta;var Xi=Tr.points||[],xi=ri(Xi,2),jn=xi[0],nt=xi[1],In=_l(nt),wa=_l(jn),ro=Ks(vr,In),fa=Ks(_n,wa),Ua=pa({},Tr),sa=ro.x-fa.x+Oa,zn=ro.y-fa.y+Ia,Sa=ko(sa,zn),Ji=ko(sa,zn,Rr),Ht=Ks(vr,["t","l"]),Hr=Ks(_n,["t","l"]),Rn=Ks(vr,["b","r"]),Di=Ks(_n,["b","r"]),za=Tr.overflow||{},cs=za.adjustX,Ts=za.adjustY,jo=za.shiftX,ys=za.shiftY,Li=function(_s){return typeof _s=="boolean"?_s:_s>=0},Fi,no,Ii,$o;ml();var Go=Li(Ts),us=wa[0]===In[0];if(Go&&wa[0]==="t"&&(no>Ja.bottom||We.current.bt)){var Ro=zn;us?Ro-=An-Yn:Ro=Ht.y-Di.y-Ia;var xs=ko(sa,Ro),Zs=ko(sa,Ro,Rr);xs>Sa||xs===Sa&&(!Qn||Zs>=Ji)?(We.current.bt=!0,zn=Ro,Ia=-Ia,Ua.points=[Vo(wa,0),Vo(In,0)]):We.current.bt=!1}if(Go&&wa[0]==="b"&&(Fi<Ja.top||We.current.tb)){var zi=zn;us?zi+=An-Yn:zi=Rn.y-Hr.y-Ia;var rl=ko(sa,zi),rr=ko(sa,zi,Rr);rl>Sa||rl===Sa&&(!Qn||rr>=Ji)?(We.current.tb=!0,zn=zi,Ia=-Ia,Ua.points=[Vo(wa,0),Vo(In,0)]):We.current.tb=!1}var Jr=Li(cs),ha=wa[1]===In[1];if(Jr&&wa[1]==="l"&&($o>Ja.right||We.current.rl)){var Xt=sa;ha?Xt-=Dn-Xa:Xt=Ht.x-Di.x-Oa;var Er=ko(Xt,zn),ts=ko(Xt,zn,Rr);Er>Sa||Er===Sa&&(!Qn||ts>=Ji)?(We.current.rl=!0,sa=Xt,Oa=-Oa,Ua.points=[Vo(wa,1),Vo(In,1)]):We.current.rl=!1}if(Jr&&wa[1]==="r"&&(Ii<Ja.left||We.current.lr)){var Bs=sa;ha?Bs+=Dn-Xa:Bs=Rn.x-Hr.x-Oa;var ao=ko(Bs,zn),ws=ko(Bs,zn,Rr);ao>Sa||ao===Sa&&(!Qn||ws>=Ji)?(We.current.lr=!0,sa=Bs,Oa=-Oa,Ua.points=[Vo(wa,1),Vo(In,1)]):We.current.lr=!1}ml();var wi=jo===!0?0:jo;typeof wi=="number"&&(Ii<Rr.left&&(sa-=Ii-Rr.left-Oa,vr.x+Xa<Rr.left+wi&&(sa+=vr.x-Rr.left+Xa-wi)),$o>Rr.right&&(sa-=$o-Rr.right-Oa,vr.x>Rr.right-wi&&(sa+=vr.x-Rr.right+wi)));var fl=ys===!0?0:ys;typeof fl=="number"&&(Fi<Rr.top&&(zn-=Fi-Rr.top-Ia,vr.y+Yn<Rr.top+fl&&(zn+=vr.y-Rr.top+Yn-fl)),no>Rr.bottom&&(zn-=no-Rr.bottom-Ia,vr.y>Rr.bottom-fl&&(zn+=vr.y-Rr.bottom+fl)));var hl=_n.x+sa,$l=hl+Dn,Ss=_n.y+zn,pl=Ss+An,ds=vr.x,Je=ds+Xa,Rl=vr.y,Nl=Rl+Yn,ja=Math.max(hl,ds),Gn=Math.min($l,Je),Qa=(ja+Gn)/2,No=Qa-hl,qo=Math.max(Ss,Rl),_a=Math.min(pl,Nl),Vs=(qo+_a)/2,Jl=Vs-Ss;oe==null||oe(M,Ua);var Ol=di.right-_n.x-(sa+_n.width),Cl=di.bottom-_n.y-(zn+_n.height);Ot({ready:!0,offsetX:sa/fi,offsetY:zn/Ya,offsetR:Ol/fi,offsetB:Cl/Ya,arrowX:No/fi,arrowY:Jl/Ya,scaleX:fi,scaleY:Ya,align:Ua})}}),Ft=function(){kt.current+=1;var Ut=kt.current;Promise.resolve().then(function(){kt.current===Ut&&Qt()})},Sr=function(){Ot(function(Ut){return pa(pa({},Ut),{},{ready:!1})})};return Pa(Sr,[R]),Pa(function(){m||Sr()},[m]),[Qe.ready,Qe.offsetX,Qe.offsetY,Qe.offsetR,Qe.offsetB,Qe.arrowX,Qe.arrowY,Qe.scaleX,Qe.scaleY,Qe.align,Ft]}function el(m){if(Array.isArray(m))return Ds(m)}function Gl(m){if(typeof Symbol!="undefined"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}function ul(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Is(m){return el(m)||Gl(m)||Nn(m)||ul()}function ql(m,M,A,R,K){Pa(function(){if(m&&M&&A){let kt=function(){R(),K()};var ie=M,oe=A,Ge=xl(ie),qe=xl(oe),Qe=Fs(oe),Ot=new Set([Qe].concat(Is(Ge),Is(qe)));return Ot.forEach(function(Dt){Dt.addEventListener("scroll",kt,{passive:!0})}),Qe.addEventListener("resize",kt,{passive:!0}),R(),function(){Ot.forEach(function(Dt){Dt.removeEventListener("scroll",kt),Qe.removeEventListener("resize",kt)})}}},[m,M,A])}var Hs={},Xl=[],Ml=function(M){Xl.push(M)};function Ws(m,M){if(0)var A}function dl(m,M){if(0)var A}function rc(){Hs={}}function tl(m,M,A){!M&&!Hs[A]&&(m(!1,A),Hs[A]=!0)}function _(m,M){tl(Ws,m,M)}function B(m,M){tl(dl,m,M)}_.preMessage=Ml,_.resetWarned=rc,_.noteOnce=B;var P=null,j=function(M){return+setTimeout(M,16)},se=function(M){return clearTimeout(M)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(j=function(M){return window.requestAnimationFrame(M)},se=function(M){return window.cancelAnimationFrame(M)});var Ce=0,ve=new Map;function $e(m){ve.delete(m)}var ut=function(M){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ce+=1;var R=Ce;function K(ie){if(ie===0)$e(R),M();else{var oe=j(function(){K(ie-1)});ve.set(R,oe)}}return K(A),R};ut.cancel=function(m){var M=ve.get(m);return $e(m),se(M)};var rt=ut;function Pt(m,M,A,R,K,ie,oe,Ge){var qe=p.useRef(m),Qe=p.useRef(!1);qe.current!==m&&(Qe.current=!0,qe.current=m),p.useEffect(function(){var Ot=rt(function(){Qe.current=!1});return function(){rt.cancel(Ot)}},[m]),p.useEffect(function(){if(M&&R&&(!K||ie)){var Ot=function(){var Lr=!1,Jn=function(rn){var Tr=rn.target;Lr=oe(Tr)},$n=function(rn){var Tr=rn.target;!Qe.current&&qe.current&&!Lr&&!oe(Tr)&&Ge(!1)};return[Jn,$n]},kt=Ot(),Dt=ri(kt,2),We=Dt[0],st=Dt[1],Qt=Ot(),Ft=ri(Qt,2),Sr=Ft[0],er=Ft[1],Ut=Fs(R);Ut.addEventListener("mousedown",We,!0),Ut.addEventListener("click",st,!0),Ut.addEventListener("contextmenu",st,!0);var ft=Wt(A);if(ft&&(ft.addEventListener("mousedown",Sr,!0),ft.addEventListener("click",er,!0),ft.addEventListener("contextmenu",er,!0)),0)var sr,Ar,Pr,Cr;return function(){Ut.removeEventListener("mousedown",We,!0),Ut.removeEventListener("click",st,!0),Ut.removeEventListener("contextmenu",st,!0),ft&&(ft.removeEventListener("mousedown",Sr,!0),ft.removeEventListener("click",er,!0),ft.removeEventListener("contextmenu",er,!0))}}},[M,A,R,K,ie])}var dt=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function tr(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ie,M=p.forwardRef(function(A,R){var K=A.prefixCls,ie=K===void 0?"rc-trigger-popup":K,oe=A.children,Ge=A.action,qe=Ge===void 0?"hover":Ge,Qe=A.showAction,Ot=A.hideAction,kt=A.popupVisible,Dt=A.defaultPopupVisible,We=A.onPopupVisibleChange,st=A.afterPopupVisibleChange,Qt=A.mouseEnterDelay,Ft=A.mouseLeaveDelay,Sr=Ft===void 0?.1:Ft,er=A.focusDelay,Ut=A.blurDelay,ft=A.mask,sr=A.maskClosable,Ar=sr===void 0?!0:sr,Pr=A.getPopupContainer,Cr=A.forceRender,ua=A.autoDestroy,Lr=A.destroyPopupOnHide,Jn=A.popup,$n=A.popupClassName,mn=A.popupStyle,rn=A.popupPlacement,Tr=A.builtinPlacements,ln=Tr===void 0?{}:Tr,vr=A.popupAlign,vn=A.zIndex,_n=A.stretch,xa=A.getPopupClassNameFromAlign,$a=A.fresh,Kr=A.alignPoint,$r=A.onPopupClick,Da=A.onPopupAlign,da=A.arrow,Ra=A.popupMotion,An=A.maskMotion,Dn=A.popupTransitionName,Yn=A.popupAnimation,Xa=A.maskTransitionName,La=A.maskAnimation,Ln=A.className,Na=A.getTriggerDOMNode,ai=Yo(A,dt),ui=ua||Lr||!1,Qn=p.useState(!1),bi=ri(Qn,2),Rr=bi[0],Oi=bi[1];Pa(function(){Oi(vi())},[]);var Ja=p.useRef({}),di=p.useContext(Os),fi=p.useMemo(function(){return{registerSubPopup:function(Mn,Ki){Ja.current[Mn]=Ki,di==null||di.registerSubPopup(Mn,Ki)}}},[di]),Ya=aa(),hi=p.useState(null),yi=ri(hi,2),Un=yi[0],Eo=yi[1],Oa=kr(function(ar){at(ar)&&Un!==ar&&Eo(ar),di==null||di.registerSubPopup(Ya,ar)}),Ia=p.useState(null),pi=ri(Ia,2),Fa=pi[0],Uo=pi[1],Ta=p.useRef(null),Xi=kr(function(ar){at(ar)&&Fa!==ar&&(Uo(ar),Ta.current=ar)}),xi=p.Children.only(oe),jn=(xi==null?void 0:xi.props)||{},nt={},In=kr(function(ar){var Mn,Ki,so=Fa;return(so==null?void 0:so.contains(ar))||((Mn=Wt(so))===null||Mn===void 0?void 0:Mn.host)===ar||ar===so||(Un==null?void 0:Un.contains(ar))||((Ki=Wt(Un))===null||Ki===void 0?void 0:Ki.host)===ar||ar===Un||Object.values(Ja.current).some(function(yr){return(yr==null?void 0:yr.contains(ar))||ar===yr})}),wa=qi(ie,Ra,Yn,Dn),ro=qi(ie,An,La,Xa),fa=p.useState(Dt||!1),Ua=ri(fa,2),sa=Ua[0],zn=Ua[1],Sa=kt!=null?kt:sa,Ji=kr(function(ar){kt===void 0&&zn(ar)});Pa(function(){zn(kt||!1)},[kt]);var Ht=p.useRef(Sa);Ht.current=Sa;var Hr=kr(function(ar){(0,V.flushSync)(function(){Sa!==ar&&(Ji(ar),We==null||We(ar))})}),Rn=p.useRef(),Di=function(){clearTimeout(Rn.current)},za=function(Mn){var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Di(),Ki===0?Hr(Mn):Rn.current=setTimeout(function(){Hr(Mn)},Ki*1e3)};p.useEffect(function(){return Di},[]);var cs=p.useState(!1),Ts=ri(cs,2),jo=Ts[0],ys=Ts[1];Pa(function(ar){(!ar||Sa)&&ys(!0)},[Sa]);var Li=p.useState(null),Fi=ri(Li,2),no=Fi[0],Ii=Fi[1],$o=p.useState([0,0]),Go=ri($o,2),us=Go[0],Ro=Go[1],xs=function(Mn){Ro([Mn.clientX,Mn.clientY])},Zs=jl(Sa,Un,Kr?us:Fa,rn,ln,vr,Da),zi=ri(Zs,11),rl=zi[0],rr=zi[1],Jr=zi[2],ha=zi[3],Xt=zi[4],Er=zi[5],ts=zi[6],Bs=zi[7],ao=zi[8],ws=zi[9],wi=zi[10],fl=to(Rr,qe,Qe,Ot),hl=ri(fl,2),$l=hl[0],Ss=hl[1],pl=$l.has("click"),ds=Ss.has("click")||Ss.has("contextMenu"),Je=kr(function(){jo||wi()}),Rl=function(){Ht.current&&Kr&&ds&&za(!1)};ql(Sa,Fa,Un,Je,Rl),Pa(function(){Je()},[us,rn]),Pa(function(){Sa&&!(ln!=null&&ln[rn])&&Je()},[JSON.stringify(vr)]);var Nl=p.useMemo(function(){var ar=gi(ln,ie,ws,Kr);return C()(ar,xa==null?void 0:xa(ws))},[ws,xa,ln,ie,Kr]);p.useImperativeHandle(R,function(){return{nativeElement:Ta.current,forceAlign:Je}});var ja=p.useState(0),Gn=ri(ja,2),Qa=Gn[0],No=Gn[1],qo=p.useState(0),_a=ri(qo,2),Vs=_a[0],Jl=_a[1],Ol=function(){if(_n&&Fa){var Mn=Fa.getBoundingClientRect();No(Mn.width),Jl(Mn.height)}},Cl=function(){Ol(),Je()},ko=function(Mn){ys(!1),wi(),st==null||st(Mn)},ml=function(){return new Promise(function(Mn){Ol(),Ii(function(){return Mn})})};Pa(function(){no&&(wi(),no(),Ii(null))},[no]);function io(ar,Mn,Ki,so){nt[ar]=function(yr){var El;so==null||so(yr),za(Mn,Ki);for(var vl=arguments.length,Ec=new Array(vl>1?vl-1:0),De=1;De<vl;De++)Ec[De-1]=arguments[De];(El=jn[ar])===null||El===void 0||El.call.apply(El,[jn,yr].concat(Ec))}}(pl||ds)&&(nt.onClick=function(ar){var Mn;Ht.current&&ds?za(!1):!Ht.current&&pl&&(xs(ar),za(!0));for(var Ki=arguments.length,so=new Array(Ki>1?Ki-1:0),yr=1;yr<Ki;yr++)so[yr-1]=arguments[yr];(Mn=jn.onClick)===null||Mn===void 0||Mn.call.apply(Mn,[jn,ar].concat(so))}),Pt(Sa,ds,Fa,Un,ft,Ar,In,za);var _s=$l.has("hover"),oo=Ss.has("hover"),Ps,Ms;_s&&(io("onMouseEnter",!0,Qt,function(ar){xs(ar)}),io("onPointerEnter",!0,Qt,function(ar){xs(ar)}),Ps=function(){(Sa||jo)&&za(!0,Qt)},Kr&&(nt.onMouseMove=function(ar){var Mn;(Mn=jn.onMouseMove)===null||Mn===void 0||Mn.call(jn,ar)})),oo&&(io("onMouseLeave",!1,Sr),io("onPointerLeave",!1,Sr),Ms=function(){za(!1,Sr)}),$l.has("focus")&&io("onFocus",!0,er),Ss.has("focus")&&io("onBlur",!1,Ut),$l.has("contextMenu")&&(nt.onContextMenu=function(ar){var Mn;Ht.current&&Ss.has("contextMenu")?za(!1):(xs(ar),za(!0)),ar.preventDefault();for(var Ki=arguments.length,so=new Array(Ki>1?Ki-1:0),yr=1;yr<Ki;yr++)so[yr-1]=arguments[yr];(Mn=jn.onContextMenu)===null||Mn===void 0||Mn.call.apply(Mn,[jn,ar].concat(so))}),Ln&&(nt.className=C()(jn.className,Ln));var Cs=pa(pa({},jn),nt),_c={},Rc=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Rc.forEach(function(ar){ai[ar]&&(_c[ar]=function(){for(var Mn,Ki=arguments.length,so=new Array(Ki),yr=0;yr<Ki;yr++)so[yr]=arguments[yr];(Mn=Cs[ar])===null||Mn===void 0||Mn.call.apply(Mn,[Cs].concat(so)),ai[ar].apply(ai,so)})});var Mc=p.cloneElement(xi,pa(pa({},Cs),_c)),Cc={x:Er,y:ts},go=da?pa({},da!==!0?da:{}):null;return p.createElement(p.Fragment,null,p.createElement(Ke.Z,{disabled:!Sa,ref:Xi,onResize:Cl},p.createElement(br,{getTriggerDOMNode:Na},Mc)),p.createElement(Os.Provider,{value:fi},p.createElement(Ys,{portal:m,ref:Oa,prefixCls:ie,popup:Jn,className:C()($n,Nl),style:mn,target:Fa,onMouseEnter:Ps,onMouseLeave:Ms,onPointerEnter:Ps,zIndex:vn,open:Sa,keepDom:jo,fresh:$a,onClick:$r,mask:ft,motion:wa,maskMotion:ro,onVisibleChanged:ko,onPrepare:ml,forceRender:Cr,autoDestroy:ui,getPopupContainer:Pr,align:ws,arrow:go,arrowPos:Cc,ready:rl,offsetX:rr,offsetY:Jr,offsetR:ha,offsetB:Xt,onAlign:Je,stretch:_n,targetWidth:Qa/Bs,targetHeight:Vs/ao})))});return M}var qt=tr(Ie),Zt={adjustX:1,adjustY:1},fn={topLeft:{points:["bl","tl"],overflow:Zt},topRight:{points:["br","tr"],overflow:Zt},bottomLeft:{points:["tl","bl"],overflow:Zt},bottomRight:{points:["tr","br"],overflow:Zt},leftTop:{points:["tr","tl"],overflow:Zt},leftBottom:{points:["br","bl"],overflow:Zt},rightTop:{points:["tl","tr"],overflow:Zt},rightBottom:{points:["bl","br"],overflow:Zt}},zr={topLeft:{points:["bl","tl"],overflow:Zt},topRight:{points:["br","tr"],overflow:Zt},bottomLeft:{points:["tl","bl"],overflow:Zt},bottomRight:{points:["tr","br"],overflow:Zt},rightTop:{points:["tr","tl"],overflow:Zt},rightBottom:{points:["br","bl"],overflow:Zt},leftTop:{points:["tl","tr"],overflow:Zt},leftBottom:{points:["bl","br"],overflow:Zt}},Sn=null;function Zr(m,M,A){if(M)return M;if(A)return A[m]||A.other}var Mr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Yt(m){var M=m.prefixCls,A=m.visible,R=m.children,K=m.popup,ie=m.popupStyle,oe=m.popupClassName,Ge=m.popupOffset,qe=m.disabled,Qe=m.mode,Ot=m.onVisibleChange,kt=p.useContext(Me),Dt=kt.getPopupContainer,We=kt.rtl,st=kt.subMenuOpenDelay,Qt=kt.subMenuCloseDelay,Ft=kt.builtinPlacements,Sr=kt.triggerSubMenuAction,er=kt.forceSubMenuRender,Ut=kt.rootClassName,ft=kt.motion,sr=kt.defaultMotions,Ar=p.useState(!1),Pr=(0,G.Z)(Ar,2),Cr=Pr[0],ua=Pr[1],Lr=We?(0,ge.Z)((0,ge.Z)({},zr),Ft):(0,ge.Z)((0,ge.Z)({},fn),Ft),Jn=Mr[Qe],$n=Zr(Qe,ft,sr),mn=p.useRef($n);Qe!=="inline"&&(mn.current=$n);var rn=(0,ge.Z)((0,ge.Z)({},mn.current),{},{leavedClassName:"".concat(M,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Tr=p.useRef();return p.useEffect(function(){return Tr.current=(0,Dr.Z)(function(){ua(A)}),function(){Dr.Z.cancel(Tr.current)}},[A]),p.createElement(qt,{prefixCls:M,popupClassName:C()("".concat(M,"-popup"),(0,J.Z)({},"".concat(M,"-rtl"),We),oe,Ut),stretch:Qe==="horizontal"?"minWidth":null,getPopupContainer:Dt,builtinPlacements:Lr,popupPlacement:Jn,popupVisible:Cr,popup:K,popupStyle:ie,popupAlign:Ge&&{offset:Ge},action:qe?[]:[Sr],mouseEnterDelay:st,mouseLeaveDelay:Qt,onPopupVisibleChange:Ot,forceRender:er,popupMotion:rn,fresh:!0},R)}function ba(m){var M=m.id,A=m.open,R=m.keyPath,K=m.children,ie="inline",oe=p.useContext(Me),Ge=oe.prefixCls,qe=oe.forceSubMenuRender,Qe=oe.motion,Ot=oe.defaultMotions,kt=oe.mode,Dt=p.useRef(!1);Dt.current=kt===ie;var We=p.useState(!Dt.current),st=(0,G.Z)(We,2),Qt=st[0],Ft=st[1],Sr=Dt.current?A:!1;p.useEffect(function(){Dt.current&&Ft(!1)},[kt]);var er=(0,ge.Z)({},Zr(ie,Qe,Ot));R.length>1&&(er.motionAppear=!1);var Ut=er.onVisibleChanged;return er.onVisibleChanged=function(ft){return!Dt.current&&!ft&&Ft(!0),Ut==null?void 0:Ut(ft)},Qt?null:p.createElement(xe,{mode:ie,locked:!Dt.current},p.createElement(Zo.Z,(0,x.Z)({visible:Sr},er,{forceRender:qe,removeOnLeave:!1,leavedClassName:"".concat(Ge,"-hidden")}),function(ft){var sr=ft.className,Ar=ft.style;return p.createElement(ka,{id:M,className:sr,style:Ar},K)}))}var ia=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ya=["active"],Va=function(M){var A,R=M.style,K=M.className,ie=M.title,oe=M.eventKey,Ge=M.warnKey,qe=M.disabled,Qe=M.internalPopupClose,Ot=M.children,kt=M.itemIcon,Dt=M.expandIcon,We=M.popupClassName,st=M.popupOffset,Qt=M.popupStyle,Ft=M.onClick,Sr=M.onMouseEnter,er=M.onMouseLeave,Ut=M.onTitleClick,ft=M.onTitleMouseEnter,sr=M.onTitleMouseLeave,Ar=(0,X.Z)(M,ia),Pr=de(oe),Cr=p.useContext(Me),ua=Cr.prefixCls,Lr=Cr.mode,Jn=Cr.openKeys,$n=Cr.disabled,mn=Cr.overflowDisabled,rn=Cr.activeKey,Tr=Cr.selectedKeys,ln=Cr.itemIcon,vr=Cr.expandIcon,vn=Cr.onItemClick,_n=Cr.onOpenChange,xa=Cr.onActive,$a=p.useContext(jt),Kr=$a._internalRenderSubMenuItem,$r=p.useContext(lr),Da=$r.isSubPathKey,da=nr(),Ra="".concat(ua,"-submenu"),An=$n||qe,Dn=p.useRef(),Yn=p.useRef(),Xa=kt!=null?kt:ln,La=Dt!=null?Dt:vr,Ln=Jn.includes(oe),Na=!mn&&Ln,ai=Da(Tr,oe),ui=Hn(oe,An,ft,sr),Qn=ui.active,bi=(0,X.Z)(ui,ya),Rr=p.useState(!1),Oi=(0,G.Z)(Rr,2),Ja=Oi[0],di=Oi[1],fi=function(nt){An||di(nt)},Ya=function(nt){fi(!0),Sr==null||Sr({key:oe,domEvent:nt})},hi=function(nt){fi(!1),er==null||er({key:oe,domEvent:nt})},yi=p.useMemo(function(){return Qn||(Lr!=="inline"?Ja||Da([rn],oe):!1)},[Lr,Qn,rn,Ja,oe,Da]),Un=Wn(da.length),Eo=function(nt){An||(Ut==null||Ut({key:oe,domEvent:nt}),Lr==="inline"&&_n(oe,!Ln))},Oa=Nt(function(jn){Ft==null||Ft(He(jn)),vn(jn)}),Ia=function(nt){Lr!=="inline"&&_n(oe,nt)},pi=function(){xa(oe)},Fa=Pr&&"".concat(Pr,"-popup"),Uo=p.createElement("div",(0,x.Z)({role:"menuitem",style:Un,className:"".concat(Ra,"-title"),tabIndex:An?null:-1,ref:Dn,title:typeof ie=="string"?ie:null,"data-menu-id":mn&&Pr?null:Pr,"aria-expanded":Na,"aria-haspopup":!0,"aria-controls":Fa,"aria-disabled":An,onClick:Eo,onFocus:pi},bi),ie,p.createElement(Ci,{icon:Lr!=="horizontal"?La:void 0,props:(0,ge.Z)((0,ge.Z)({},M),{},{isOpen:Na,isSubMenu:!0})},p.createElement("i",{className:"".concat(Ra,"-arrow")}))),Ta=p.useRef(Lr);if(Lr!=="inline"&&da.length>1?Ta.current="vertical":Ta.current=Lr,!mn){var Xi=Ta.current;Uo=p.createElement(Yt,{mode:Xi,prefixCls:Ra,visible:!Qe&&Na&&Lr!=="inline",popupClassName:We,popupOffset:st,popupStyle:Qt,popup:p.createElement(xe,{mode:Xi==="horizontal"?"vertical":Xi},p.createElement(ka,{id:Fa,ref:Yn},Ot)),disabled:An,onVisibleChange:Ia},Uo)}var xi=p.createElement(nn.Item,(0,x.Z)({role:"none"},Ar,{component:"li",style:R,className:C()(Ra,"".concat(Ra,"-").concat(Lr),K,(A={},(0,J.Z)(A,"".concat(Ra,"-open"),Na),(0,J.Z)(A,"".concat(Ra,"-active"),yi),(0,J.Z)(A,"".concat(Ra,"-selected"),ai),(0,J.Z)(A,"".concat(Ra,"-disabled"),An),A)),onMouseEnter:Ya,onMouseLeave:hi}),Uo,!mn&&p.createElement(ba,{id:Fa,open:Na,keyPath:da},Ot));return Kr&&(xi=Kr(xi,M,{selected:ai,active:yi,open:Na,disabled:An})),p.createElement(xe,{onItemClick:Oa,mode:Lr==="horizontal"?"vertical":Lr,itemIcon:Xa,expandIcon:La},xi)};function on(m){var M=m.eventKey,A=m.children,R=nr(M),K=ti(A,R),ie=gt();p.useEffect(function(){if(ie)return ie.registerPath(M,R),function(){ie.unregisterPath(M,R)}},[R]);var oe;return ie?oe=K:oe=p.createElement(Va,m,K),p.createElement(je.Provider,{value:R},oe)}var hn=y(71002),Nr=["className","title","eventKey","children"],Aa=["children"],Ga=function(M){var A=M.className,R=M.title,K=M.eventKey,ie=M.children,oe=(0,X.Z)(M,Nr),Ge=p.useContext(Me),qe=Ge.prefixCls,Qe="".concat(qe,"-item-group");return p.createElement("li",(0,x.Z)({role:"presentation"},oe,{onClick:function(kt){return kt.stopPropagation()},className:C()(Qe,A)}),p.createElement("div",{role:"presentation",className:"".concat(Qe,"-title"),title:typeof R=="string"?R:void 0},R),p.createElement("ul",{role:"group",className:"".concat(Qe,"-list")},ie))};function Xn(m){var M=m.children,A=(0,X.Z)(m,Aa),R=nr(A.eventKey),K=ti(M,R),ie=gt();return ie?K:p.createElement(Ga,(0,pn.Z)(A,["warnKey"]),K)}function sn(m){var M=m.className,A=m.style,R=p.useContext(Me),K=R.prefixCls,ie=gt();return ie?null:p.createElement("li",{role:"separator",className:C()("".concat(K,"-item-divider"),M),style:A})}var On=["label","children","key","type"];function Vr(m){return(m||[]).map(function(M,A){if(M&&(0,hn.Z)(M)==="object"){var R=M,K=R.label,ie=R.children,oe=R.key,Ge=R.type,qe=(0,X.Z)(R,On),Qe=oe!=null?oe:"tmp-".concat(A);return ie||Ge==="group"?Ge==="group"?p.createElement(Xn,(0,x.Z)({key:Qe},qe,{title:K}),Vr(ie)):p.createElement(on,(0,x.Z)({key:Qe},qe,{title:K}),Vr(ie)):Ge==="divider"?p.createElement(sn,(0,x.Z)({key:Qe},qe)):p.createElement(So,(0,x.Z)({key:Qe},qe),K)}return null}).filter(function(M){return M})}function Ai(m,M,A){var R=m;return M&&(R=Vr(M)),ti(R,A)}var Fn=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],oa=[],Co=p.forwardRef(function(m,M){var A,R,K=m,ie=K.prefixCls,oe=ie===void 0?"rc-menu":ie,Ge=K.rootClassName,qe=K.style,Qe=K.className,Ot=K.tabIndex,kt=Ot===void 0?0:Ot,Dt=K.items,We=K.children,st=K.direction,Qt=K.id,Ft=K.mode,Sr=Ft===void 0?"vertical":Ft,er=K.inlineCollapsed,Ut=K.disabled,ft=K.disabledOverflow,sr=K.subMenuOpenDelay,Ar=sr===void 0?.1:sr,Pr=K.subMenuCloseDelay,Cr=Pr===void 0?.1:Pr,ua=K.forceSubMenuRender,Lr=K.defaultOpenKeys,Jn=K.openKeys,$n=K.activeKey,mn=K.defaultActiveFirst,rn=K.selectable,Tr=rn===void 0?!0:rn,ln=K.multiple,vr=ln===void 0?!1:ln,vn=K.defaultSelectedKeys,_n=K.selectedKeys,xa=K.onSelect,$a=K.onDeselect,Kr=K.inlineIndent,$r=Kr===void 0?24:Kr,Da=K.motion,da=K.defaultMotions,Ra=K.triggerSubMenuAction,An=Ra===void 0?"hover":Ra,Dn=K.builtinPlacements,Yn=K.itemIcon,Xa=K.expandIcon,La=K.overflowedIndicator,Ln=La===void 0?"...":La,Na=K.overflowedIndicatorPopupClassName,ai=K.getPopupContainer,ui=K.onClick,Qn=K.onOpenChange,bi=K.onKeyDown,Rr=K.openAnimation,Oi=K.openTransitionName,Ja=K._internalRenderMenuItem,di=K._internalRenderSubMenuItem,fi=(0,X.Z)(K,Fn),Ya=p.useMemo(function(){return Ai(We,Dt,oa)},[We,Dt]),hi=p.useState(!1),yi=(0,G.Z)(hi,2),Un=yi[0],Eo=yi[1],Oa=p.useRef(),Ia=ra(Qt),pi=st==="rtl",Fa=(0,Qr.Z)(Lr,{value:Jn,postState:function(Gn){return Gn||oa}}),Uo=(0,G.Z)(Fa,2),Ta=Uo[0],Xi=Uo[1],xi=function(Gn){var Qa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function No(){Xi(Gn),Qn==null||Qn(Gn)}Qa?(0,V.flushSync)(No):No()},jn=p.useState(Ta),nt=(0,G.Z)(jn,2),In=nt[0],wa=nt[1],ro=p.useRef(!1),fa=p.useMemo(function(){return(Sr==="inline"||Sr==="vertical")&&er?["vertical",er]:[Sr,!1]},[Sr,er]),Ua=(0,G.Z)(fa,2),sa=Ua[0],zn=Ua[1],Sa=sa==="inline",Ji=p.useState(sa),Ht=(0,G.Z)(Ji,2),Hr=Ht[0],Rn=Ht[1],Di=p.useState(zn),za=(0,G.Z)(Di,2),cs=za[0],Ts=za[1];p.useEffect(function(){Rn(sa),Ts(zn),ro.current&&(Sa?Xi(In):xi(oa))},[sa,zn]);var jo=p.useState(0),ys=(0,G.Z)(jo,2),Li=ys[0],Fi=ys[1],no=Li>=Ya.length-1||Hr!=="horizontal"||ft;p.useEffect(function(){Sa&&wa(Ta)},[Ta]),p.useEffect(function(){return ro.current=!0,function(){ro.current=!1}},[]);var Ii=Ct(),$o=Ii.registerPath,Go=Ii.unregisterPath,us=Ii.refreshOverflowKeys,Ro=Ii.isSubPathKey,xs=Ii.getKeyPath,Zs=Ii.getKeys,zi=Ii.getSubPathKeys,rl=p.useMemo(function(){return{registerPath:$o,unregisterPath:Go}},[$o,Go]),rr=p.useMemo(function(){return{isSubPathKey:Ro}},[Ro]);p.useEffect(function(){us(no?oa:Ya.slice(Li+1).map(function(ja){return ja.key}))},[Li,no]);var Jr=(0,Qr.Z)($n||mn&&((A=Ya[0])===null||A===void 0?void 0:A.key),{value:$n}),ha=(0,G.Z)(Jr,2),Xt=ha[0],Er=ha[1],ts=Nt(function(ja){Er(ja)}),Bs=Nt(function(){Er(void 0)});(0,p.useImperativeHandle)(M,function(){return{list:Oa.current,focus:function(Gn){var Qa,No=Xt!=null?Xt:(Qa=Ya.find(function(Jl){return!Jl.props.disabled}))===null||Qa===void 0?void 0:Qa.key;if(No){var qo,_a,Vs;(qo=Oa.current)===null||qo===void 0||(_a=qo.querySelector("li[data-menu-id='".concat(Ae(Ia,No),"']")))===null||_a===void 0||(Vs=_a.focus)===null||Vs===void 0||Vs.call(_a,Gn)}}}});var ao=(0,Qr.Z)(vn||[],{value:_n,postState:function(Gn){return Array.isArray(Gn)?Gn:Gn==null?oa:[Gn]}}),ws=(0,G.Z)(ao,2),wi=ws[0],fl=ws[1],hl=function(Gn){if(Tr){var Qa=Gn.key,No=wi.includes(Qa),qo;vr?No?qo=wi.filter(function(Vs){return Vs!==Qa}):qo=[].concat((0,ce.Z)(wi),[Qa]):qo=[Qa],fl(qo);var _a=(0,ge.Z)((0,ge.Z)({},Gn),{},{selectedKeys:qo});No?$a==null||$a(_a):xa==null||xa(_a)}!vr&&Ta.length&&Hr!=="inline"&&xi(oa)},$l=Nt(function(ja){ui==null||ui(He(ja)),hl(ja)}),Ss=Nt(function(ja,Gn){var Qa=Ta.filter(function(qo){return qo!==ja});if(Gn)Qa.push(ja);else if(Hr!=="inline"){var No=zi(ja);Qa=Qa.filter(function(qo){return!No.has(qo)})}(0,cn.Z)(Ta,Qa,!0)||xi(Qa,!0)}),pl=function(Gn,Qa){var No=Qa!=null?Qa:!Ta.includes(Gn);Ss(Gn,No)},ds=Fo(Hr,Xt,pi,Ia,Oa,Zs,xs,Er,pl,bi);p.useEffect(function(){Eo(!0)},[]);var Je=p.useMemo(function(){return{_internalRenderMenuItem:Ja,_internalRenderSubMenuItem:di}},[Ja,di]),Rl=Hr!=="horizontal"||ft?Ya:Ya.map(function(ja,Gn){return p.createElement(xe,{key:ja.key,overflowDisabled:Gn>Li},ja)}),Nl=p.createElement(nn,(0,x.Z)({id:Qt,ref:Oa,prefixCls:"".concat(oe,"-overflow"),component:"ul",itemComponent:So,className:C()(oe,"".concat(oe,"-root"),"".concat(oe,"-").concat(Hr),Qe,(R={},(0,J.Z)(R,"".concat(oe,"-inline-collapsed"),cs),(0,J.Z)(R,"".concat(oe,"-rtl"),pi),R),Ge),dir:st,style:qe,role:"menu",tabIndex:kt,data:Rl,renderRawItem:function(Gn){return Gn},renderRawRest:function(Gn){var Qa=Gn.length,No=Qa?Ya.slice(-Qa):null;return p.createElement(on,{eventKey:Ye,title:Ln,disabled:no,internalPopupClose:Qa===0,popupClassName:Na},No)},maxCount:Hr!=="horizontal"||ft?nn.INVALIDATE:nn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Gn){Fi(Gn)},onKeyDown:ds},fi));return p.createElement(jt.Provider,{value:Je},p.createElement(Et.Provider,{value:Ia},p.createElement(xe,{prefixCls:oe,rootClassName:Ge,mode:Hr,openKeys:Ta,rtl:pi,disabled:Ut,motion:Un?Da:null,defaultMotions:Un?da:null,activeKey:Xt,onActive:ts,onInactive:Bs,selectedKeys:wi,inlineIndent:$r,subMenuOpenDelay:Ar,subMenuCloseDelay:Cr,forceSubMenuRender:ua,builtinPlacements:Dn,triggerSubMenuAction:An,getPopupContainer:ai,itemIcon:Yn,expandIcon:Xa,onItemClick:$l,onOpenChange:Ss},p.createElement(lr.Provider,{value:rr},Nl),p.createElement("div",{style:{display:"none"},"aria-hidden":!0},p.createElement(At.Provider,{value:rl},Ya)))))}),qa=Co,ci=qa;ci.Item=So,ci.SubMenu=on,ci.ItemGroup=Xn,ci.Divider=sn;var Po=ci},99962:function(Ir,St){"use strict";var y;var x=Symbol.for("react.element"),J=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),ee=Symbol.for("react.context"),C=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),Ke=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),Be=Symbol.for("react.lazy"),Ze=Symbol.for("react.offscreen"),Mt;Mt=Symbol.for("react.module.reference");function Ue(H){if(typeof H=="object"&&H!==null){var Re=H.$$typeof;switch(Re){case x:switch(H=H.type,H){case ge:case G:case ce:case fe:case Ke:return H;default:switch(H=H&&H.$$typeof,H){case C:case ee:case p:case Be:case T:case X:return H;default:return Re}}case J:return Re}}}y=ee,y=X,y=x,St.ForwardRef=p,y=ge,y=Be,y=T,y=J,y=G,y=ce,y=fe,y=Ke,y=function(){return!1},y=function(){return!1},y=function(H){return Ue(H)===ee},y=function(H){return Ue(H)===X},y=function(H){return typeof H=="object"&&H!==null&&H.$$typeof===x},y=function(H){return Ue(H)===p},y=function(H){return Ue(H)===ge},y=function(H){return Ue(H)===Be},St.isMemo=function(H){return Ue(H)===T},y=function(H){return Ue(H)===J},y=function(H){return Ue(H)===G},y=function(H){return Ue(H)===ce},y=function(H){return Ue(H)===fe},y=function(H){return Ue(H)===Ke},y=function(H){return typeof H=="string"||typeof H=="function"||H===ge||H===G||H===ce||H===fe||H===Ke||H===Ze||typeof H=="object"&&H!==null&&(H.$$typeof===Be||H.$$typeof===T||H.$$typeof===X||H.$$typeof===ee||H.$$typeof===p||H.$$typeof===Mt||H.getModuleId!==void 0)},y=Ue},8399:function(Ir,St,y){"use strict";Ir.exports=y(99962)},66680:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return J}});var x=y(67294);function J(ge){var ce=x.useRef();ce.current=ge;var G=x.useCallback(function(){for(var X,ee=arguments.length,C=new Array(ee),p=0;p<ee;p++)C[p]=arguments[p];return(X=ce.current)===null||X===void 0?void 0:X.call.apply(X,[ce].concat(C))},[]);return G}},21770:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return X}});var x=y(97685),J=y(66680),ge=y(8410),ce=y(63896);function G(ee){return ee!==void 0}function X(ee,C){var p=C||{},fe=p.defaultValue,Ke=p.value,T=p.onChange,Be=p.postState,Ze=(0,ce.Z)(function(){return G(Ke)?Ke:G(fe)?typeof fe=="function"?fe():fe:typeof ee=="function"?ee():ee}),Mt=(0,x.Z)(Ze,2),Ue=Mt[0],H=Mt[1],Re=Ke!==void 0?Ke:Ue,xr=Be?Be(Re):Re,Oe=(0,J.Z)(T),be=(0,ce.Z)([Re]),O=(0,x.Z)(be,2),V=O[0],ue=O[1];(0,ge.o)(function(){var et=V[0];Ue!==et&&Oe(Ue,et)},[V]),(0,ge.o)(function(){G(Ke)||H(Ke)},[Ke]);var Y=(0,J.Z)(function(et,mt){H(et,mt),ue([Re],mt)});return[xr,Y]}},91881:function(Ir,St,y){"use strict";var x=y(71002),J=y(80334);function ge(ce,G){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ee=new Set;function C(p,fe){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=ee.has(p);if((0,J.ZP)(!T,"Warning: There may be circular references"),T)return!1;if(p===fe)return!0;if(X&&Ke>1)return!1;ee.add(p);var Be=Ke+1;if(Array.isArray(p)){if(!Array.isArray(fe)||p.length!==fe.length)return!1;for(var Ze=0;Ze<p.length;Ze++)if(!C(p[Ze],fe[Ze],Be))return!1;return!0}if(p&&fe&&(0,x.Z)(p)==="object"&&(0,x.Z)(fe)==="object"){var Mt=Object.keys(p);return Mt.length!==Object.keys(fe).length?!1:Mt.every(function(Ue){return C(p[Ue],fe[Ue],Be)})}return!1}return C(ce,G)}St.Z=ge},98423:function(Ir,St,y){"use strict";y.d(St,{Z:function(){return J}});var x=y(1413);function J(ge,ce){var G=(0,x.Z)({},ge);return Array.isArray(ce)&&ce.forEach(function(X){delete G[X]}),G}},66012:function(Ir,St,y){"use strict";y.d(St,{Z5:function(){return If},_l:function(){return Ba},bK:function(){return Ti}});var x=y(67294),J=y(89611);function ge(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,(0,J.Z)(o,l)}var ce=y(87462),G=y(14890),X=x.createContext(null),ee=null;function C(o){o()}var p=C,fe=function(l){return p=l},Ke=function(){return p};function T(){var o=Ke(),l=null,c=null;return{clear:function(){l=null,c=null},notify:function(){o(function(){for(var g=l;g;)g.callback(),g=g.next})},get:function(){for(var g=[],b=l;b;)g.push(b),b=b.next;return g},subscribe:function(g){var b=!0,S=c={callback:g,next:null,prev:c};return S.prev?S.prev.next=S:l=S,function(){!b||l===null||(b=!1,S.next?S.next.prev=S.prev:c=S.prev,S.prev?S.prev.next=S.next:l=S.next)}}}}var Be={notify:function(){},get:function(){return[]}};function Ze(o,l){var c,f=Be;function g($){return N(),f.subscribe($)}function b(){f.notify()}function S(){L.onStateChange&&L.onStateChange()}function E(){return!!c}function N(){c||(c=l?l.addNestedSub(S):o.subscribe(S),f=T())}function Z(){c&&(c(),c=void 0,f.clear(),f=Be)}var L={addNestedSub:g,notifyNestedSubs:b,handleChangeWrapper:S,isSubscribed:E,trySubscribe:N,tryUnsubscribe:Z,getListeners:function(){return f}};return L}var Mt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?x.useLayoutEffect:x.useEffect;function Ue(o){var l=o.store,c=o.context,f=o.children,g=(0,x.useMemo)(function(){var E=Ze(l);return{store:l,subscription:E}},[l]),b=(0,x.useMemo)(function(){return l.getState()},[l]);Mt(function(){var E=g.subscription;return E.onStateChange=E.notifyNestedSubs,E.trySubscribe(),b!==l.getState()&&E.notifyNestedSubs(),function(){E.tryUnsubscribe(),E.onStateChange=null}},[g,b]);var S=c||X;return x.createElement(S.Provider,{value:g},f)}var H=Ue,Re=y(63366),xr=y(8679),Oe=y.n(xr),be=y(72973),O=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],V=["reactReduxForwardedRef"],ue=[],Y=[null,null],et=function(l){try{return JSON.stringify(l)}catch(c){return String(l)}};function mt(o,l){var c=o[1];return[l.payload,c+1]}function fr(o,l,c){Mt(function(){return o.apply(void 0,l)},c)}function Lt(o,l,c,f,g,b,S){o.current=f,l.current=g,c.current=!1,b.current&&(b.current=null,S())}function Pe(o,l,c,f,g,b,S,E,N,Z){if(o){var L=!1,$=null,F=function(){if(!L){var it=l.getState(),ht,vt;try{ht=f(it,g.current)}catch(zt){vt=zt,$=zt}vt||($=null),ht===b.current?S.current||N():(b.current=ht,E.current=ht,S.current=!0,Z({type:"STORE_UPDATED",payload:{error:vt}}))}};c.onStateChange=F,c.trySubscribe(),F();var q=function(){if(L=!0,c.tryUnsubscribe(),c.onStateChange=null,$)throw $};return q}}var Ne=function(){return[null,0]};function _t(o,l){l===void 0&&(l={});var c=l,f=c.getDisplayName,g=f===void 0?function(hr){return"ConnectAdvanced("+hr+")"}:f,b=c.methodName,S=b===void 0?"connectAdvanced":b,E=c.renderCountProp,N=E===void 0?void 0:E,Z=c.shouldHandleStateChanges,L=Z===void 0?!0:Z,$=c.storeKey,F=$===void 0?"store":$,q=c.withRef,he=q===void 0?!1:q,it=c.forwardRef,ht=it===void 0?!1:it,vt=c.context,zt=vt===void 0?X:vt,ir=(0,Re.Z)(c,O);if(0)var dr;var Wr=zt;return function(yn){var Hi=yn.displayName||yn.name||"Component",xn=g(Hi),Ma=(0,ce.Z)({},ir,{getDisplayName:g,methodName:S,renderCountProp:N,shouldHandleStateChanges:L,storeKey:F,displayName:xn,wrappedComponentName:Hi,WrappedComponent:yn}),rs=ir.pure;function Ao(hs){return o(hs.dispatch,Ma)}var Us=rs?x.useMemo:function(hs){return hs()};function gl(hs){var uc=(0,x.useMemo)(function(){var Xc=hs.reactReduxForwardedRef,Jc=(0,Re.Z)(hs,V);return[hs.context,Xc,Jc]},[hs]),Kl=uc[0],Ql=uc[1],Al=uc[2],Hl=(0,x.useMemo)(function(){return Kl&&Kl.Consumer&&(0,be.isContextConsumer)(x.createElement(Kl.Consumer,null))?Kl:Wr},[Kl,Wr]),Es=(0,x.useContext)(Hl),js=!!hs.store&&!!hs.store.getState&&!!hs.store.dispatch,xu=!!Es&&!!Es.store,Dl=js?hs.store:Es.store,Ic=(0,x.useMemo)(function(){return Ao(Dl)},[Dl]),Gc=(0,x.useMemo)(function(){if(!L)return Y;var Xc=Ze(Dl,js?null:Es.subscription),Jc=Xc.notifyNestedSubs.bind(Xc);return[Xc,Jc]},[Dl,js,Es]),Fc=Gc[0],wu=Gc[1],Su=(0,x.useMemo)(function(){return js?Es:(0,ce.Z)({},Es,{subscription:Fc})},[js,Es,Fc]),Kd=(0,x.useReducer)(mt,ue,Ne),Yf=Kd[0],qc=Yf[0],Qf=Kd[1];if(qc&&qc.error)throw qc.error;var Hd=(0,x.useRef)(),Xu=(0,x.useRef)(Al),_u=(0,x.useRef)(),Wd=(0,x.useRef)(!1),Mu=Us(function(){return _u.current&&Al===Xu.current?_u.current:Ic(Dl.getState(),Al)},[Dl,qc,Al]);fr(Lt,[Xu,Hd,Wd,Al,Mu,_u,wu]),fr(Pe,[L,Dl,Fc,Ic,Xu,Hd,Wd,_u,wu,Qf],[Dl,Fc,Ic]);var Ju=(0,x.useMemo)(function(){return x.createElement(yn,(0,ce.Z)({},Mu,{ref:Ql}))},[Ql,yn,Mu]),e0=(0,x.useMemo)(function(){return L?x.createElement(Hl.Provider,{value:Su},Ju):Ju},[Hl,Ju,Su]);return e0}var nl=rs?x.memo(gl):gl;if(nl.WrappedComponent=yn,nl.displayName=gl.displayName=xn,ht){var al=x.forwardRef(function(uc,Kl){return x.createElement(nl,(0,ce.Z)({},uc,{reactReduxForwardedRef:Kl}))});return al.displayName=xn,al.WrappedComponent=yn,Oe()(al,yn)}return Oe()(nl,yn)}}function le(o,l){return o===l?o!==0||l!==0||1/o===1/l:o!==o&&l!==l}function tt(o,l){if(le(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var c=Object.keys(o),f=Object.keys(l);if(c.length!==f.length)return!1;for(var g=0;g<c.length;g++)if(!Object.prototype.hasOwnProperty.call(l,c[g])||!le(o[c[g]],l[c[g]]))return!1;return!0}function bt(o,l){var c={},f=function(S){var E=o[S];typeof E=="function"&&(c[S]=function(){return l(E.apply(void 0,arguments))})};for(var g in o)f(g);return c}function Ee(o){return function(c,f){var g=o(c,f);function b(){return g}return b.dependsOnOwnProps=!1,b}}function Fe(o){return o.dependsOnOwnProps!==null&&o.dependsOnOwnProps!==void 0?!!o.dependsOnOwnProps:o.length!==1}function Le(o,l){return function(f,g){var b=g.displayName,S=function(N,Z){return S.dependsOnOwnProps?S.mapToProps(N,Z):S.mapToProps(N)};return S.dependsOnOwnProps=!0,S.mapToProps=function(N,Z){S.mapToProps=o,S.dependsOnOwnProps=Fe(o);var L=S(N,Z);return typeof L=="function"&&(S.mapToProps=L,S.dependsOnOwnProps=Fe(L),L=S(N,Z)),L},S}}function me(o){return typeof o=="function"?Le(o,"mapDispatchToProps"):void 0}function xt(o){return o?void 0:Ee(function(l){return{dispatch:l}})}function ot(o){return o&&typeof o=="object"?Ee(function(l){return bt(o,l)}):void 0}var Xe=[me,xt,ot];function ke(o){return typeof o=="function"?Le(o,"mapStateToProps"):void 0}function $t(o){return o?void 0:Ee(function(){return{}})}var Tt=[ke,$t];function wr(o,l,c){return(0,ce.Z)({},c,o,l)}function Ur(o){return function(c,f){var g=f.displayName,b=f.pure,S=f.areMergedPropsEqual,E=!1,N;return function(L,$,F){var q=o(L,$,F);return E?(!b||!S(q,N))&&(N=q):(E=!0,N=q),N}}}function nn(o){return typeof o=="function"?Ur(o):void 0}function Qr(o){return o?void 0:function(){return wr}}var Or=[nn,Qr],cn=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Et(o,l,c,f){return function(b,S){return c(o(b,S),l(f,S),S)}}function Ae(o,l,c,f,g){var b=g.areStatesEqual,S=g.areOwnPropsEqual,E=g.areStatePropsEqual,N=!1,Z,L,$,F,q;function he(ir,dr){return Z=ir,L=dr,$=o(Z,L),F=l(f,L),q=c($,F,L),N=!0,q}function it(){return $=o(Z,L),l.dependsOnOwnProps&&(F=l(f,L)),q=c($,F,L),q}function ht(){return o.dependsOnOwnProps&&($=o(Z,L)),l.dependsOnOwnProps&&(F=l(f,L)),q=c($,F,L),q}function vt(){var ir=o(Z,L),dr=!E(ir,$);return $=ir,dr&&(q=c($,F,L)),q}function zt(ir,dr){var Wr=!S(dr,L),hr=!b(ir,Z,dr,L);return Z=ir,L=dr,Wr&&hr?it():Wr?ht():hr?vt():q}return function(dr,Wr){return N?zt(dr,Wr):he(dr,Wr)}}function de(o,l){var c=l.initMapStateToProps,f=l.initMapDispatchToProps,g=l.initMergeProps,b=(0,Re.Z)(l,cn),S=c(o,b),E=f(o,b),N=g(o,b),Z=b.pure?Ae:Et;return Z(S,E,N,o,b)}var te=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Te(o,l,c){for(var f=l.length-1;f>=0;f--){var g=l[f](o);if(g)return g}return function(b,S){throw new Error("Invalid value of type "+typeof o+" for "+c+" argument when connecting component "+S.wrappedComponentName+".")}}function Me(o,l){return o===l}function ct(o){var l=o===void 0?{}:o,c=l.connectHOC,f=c===void 0?_t:c,g=l.mapStateToPropsFactories,b=g===void 0?Tt:g,S=l.mapDispatchToPropsFactories,E=S===void 0?Xe:S,N=l.mergePropsFactories,Z=N===void 0?Or:N,L=l.selectorFactory,$=L===void 0?de:L;return function(q,he,it,ht){ht===void 0&&(ht={});var vt=ht,zt=vt.pure,ir=zt===void 0?!0:zt,dr=vt.areStatesEqual,Wr=dr===void 0?Me:dr,hr=vt.areOwnPropsEqual,yn=hr===void 0?tt:hr,Hi=vt.areStatePropsEqual,xn=Hi===void 0?tt:Hi,Ma=vt.areMergedPropsEqual,rs=Ma===void 0?tt:Ma,Ao=(0,Re.Z)(vt,te),Us=Te(q,b,"mapStateToProps"),gl=Te(he,E,"mapDispatchToProps"),nl=Te(it,Z,"mergeProps");return f($,(0,ce.Z)({methodName:"connect",getDisplayName:function(hs){return"Connect("+hs+")"},shouldHandleStateChanges:!!q,initMapStateToProps:Us,initMapDispatchToProps:gl,initMergeProps:nl,pure:ir,areStatesEqual:Wr,areOwnPropsEqual:yn,areStatePropsEqual:xn,areMergedPropsEqual:rs},Ao))}}var xe=ct();function we(){var o=useContext(ReactReduxContext);return o}function At(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(){var f=l(),g=f.store;return g}}var gt=null;function je(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultStore:createStoreHook(o);return function(){var f=l();return f.dispatch}}var nr=null,lr=function(l,c){return l===c};function re(o,l,c,f){var g=useReducer(function(he){return he+1},0),b=g[1],S=useMemo(function(){return createSubscription(c,f)},[c,f]),E=useRef(),N=useRef(),Z=useRef(),L=useRef(),$=c.getState(),F;try{if(o!==N.current||$!==Z.current||E.current){var q=o($);L.current===void 0||!l(q,L.current)?F=q:F=L.current}else F=L.current}catch(he){throw E.current&&(he.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+E.current.stack+`
|
|
|
|
|
|
`),he}return useIsomorphicLayoutEffect(function(){N.current=o,Z.current=$,L.current=F,E.current=void 0}),useIsomorphicLayoutEffect(function(){function he(){try{var it=c.getState();if(it===Z.current)return;var ht=N.current(it);if(l(ht,L.current))return;L.current=ht,Z.current=it}catch(vt){E.current=vt}b()}return S.onStateChange=he,S.trySubscribe(),he(),function(){return S.tryUnsubscribe()}},[c,S]),F}function jt(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(f,g){g===void 0&&(g=lr);var b=l(),S=b.store,E=b.subscription,N=re(f,g,S,E);return useDebugValue(N),N}}var Rt=null,Dr=y(73935);fe(Dr.unstable_batchedUpdates);function gn(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(o[c]!==l[c])return!1;return!0}function un(o,l){var c=(0,x.useState)(function(){return{inputs:l,result:o()}})[0],f=(0,x.useRef)(!0),g=(0,x.useRef)(c),b=f.current||!!(l&&g.current.inputs&&gn(l,g.current.inputs)),S=b?g.current:{inputs:l,result:o()};return(0,x.useEffect)(function(){f.current=!1,g.current=S},[S]),S.result}function _i(o,l){return un(function(){return o},l)}var _r=un,Bt=_i,Pi=!0,Wi="Invariant failed";function ea(o,l){if(!o){if(Pi)throw new Error(Wi);var c=typeof l=="function"?l():l,f=c?"".concat(Wi,": ").concat(c):Wi;throw new Error(f)}}var wn=function(l){var c=l.top,f=l.right,g=l.bottom,b=l.left,S=f-b,E=g-c,N={top:c,right:f,bottom:g,left:b,width:S,height:E,x:b,y:c,center:{x:(f+b)/2,y:(g+c)/2}};return N},$i=function(l,c){return{top:l.top-c.top,left:l.left-c.left,bottom:l.bottom+c.bottom,right:l.right+c.right}},Jt=function(l,c){return{top:l.top+c.top,left:l.left+c.left,bottom:l.bottom-c.bottom,right:l.right-c.right}},Do=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},xo={top:0,right:0,bottom:0,left:0},co=function(l){var c=l.borderBox,f=l.margin,g=f===void 0?xo:f,b=l.border,S=b===void 0?xo:b,E=l.padding,N=E===void 0?xo:E,Z=wn($i(c,g)),L=wn(Jt(c,S)),$=wn(Jt(L,N));return{marginBox:Z,borderBox:wn(c),paddingBox:L,contentBox:$,margin:g,border:S,padding:N}},Ka=function(l){var c=l.slice(0,-2),f=l.slice(-2);if(f!=="px")return 0;var g=Number(c);return isNaN(g)&&ea(!1),g},ta=function(){return{x:window.pageXOffset,y:window.pageYOffset}},cr=function(l,c){var f=l.borderBox,g=l.border,b=l.margin,S=l.padding,E=Do(f,c);return co({borderBox:E,border:g,margin:b,padding:S})},Ha=function(l,c){return c===void 0&&(c=ta()),cr(l,c)},qs=function(l,c){var f={top:Ka(c.marginTop),right:Ka(c.marginRight),bottom:Ka(c.marginBottom),left:Ka(c.marginLeft)},g={top:Ka(c.paddingTop),right:Ka(c.paddingRight),bottom:Ka(c.paddingBottom),left:Ka(c.paddingLeft)},b={top:Ka(c.borderTopWidth),right:Ka(c.borderRightWidth),bottom:Ka(c.borderBottomWidth),left:Ka(c.borderLeftWidth)};return co({borderBox:l,margin:f,padding:g,border:b})},ms=function(l){var c=l.getBoundingClientRect(),f=window.getComputedStyle(l);return qs(c,f)},Lo=Number.isNaN||function(l){return typeof l=="number"&&l!==l};function Mi(o,l){return!!(o===l||Lo(o)&&Lo(l))}function Fo(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(!Mi(o[c],l[c]))return!1;return!0}function Ri(o,l){l===void 0&&(l=Fo);var c,f=[],g,b=!1;function S(){for(var E=[],N=0;N<arguments.length;N++)E[N]=arguments[N];return b&&c===this&&l(E,f)||(g=o.apply(this,E),b=!0,c=this,f=E),g}return S}var U=Ri,Q=function(l){var c=[],f=null,g=function(){for(var S=arguments.length,E=new Array(S),N=0;N<S;N++)E[N]=arguments[N];c=E,!f&&(f=requestAnimationFrame(function(){f=null,l.apply(void 0,c)}))};return g.cancel=function(){f&&(cancelAnimationFrame(f),f=null)},g},Se=Q,Ye=!0,Ct=/[ \t]{2,}/g,Nt=/^[ \t]*/gm,Cn=function(l){return l.replace(Ct," ").replace(Nt,"").trim()},jr=function(l){return Cn(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+Cn(l)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},ra=function(l){return[jr(l),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},En="__react-beautiful-dnd-disable-dev-warnings";function Gr(o,l){var c;Ye||typeof window!="undefined"&&window[En]||(c=console)[o].apply(c,ra(l))}var Ea=Gr.bind(null,"warn"),dn=Gr.bind(null,"error");function pn(){}function mi(o,l){return(0,ce.Z)({},o,{},l)}function Hn(o,l,c){var f=l.map(function(g){var b=mi(c,g.options);return o.addEventListener(g.eventName,g.fn,b),function(){o.removeEventListener(g.eventName,g.fn,b)}});return function(){f.forEach(function(b){b()})}}var Wn=!0,Ci="Invariant failed";function Br(o){this.message=o}Br.prototype.toString=function(){return this.message};function He(o,l){if(!o)throw Wn?new Br(Ci):new Br(Ci+": "+(l||""))}var Zi=function(o){ge(l,o);function l(){for(var f,g=arguments.length,b=new Array(g),S=0;S<g;S++)b[S]=arguments[S];return f=o.call.apply(o,[this].concat(b))||this,f.callbacks=null,f.unbind=pn,f.onWindowError=function(E){var N=f.getCallbacks();N.isDragging()&&N.tryAbort();var Z=E.error;Z instanceof Br&&E.preventDefault()},f.getCallbacks=function(){if(!f.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return f.callbacks},f.setCallbacks=function(E){f.callbacks=E},f}var c=l.prototype;return c.componentDidMount=function(){this.unbind=Hn(window,[{eventName:"error",fn:this.onWindowError}])},c.componentWillUnmount=function(){this.unbind()},c.componentDidCatch=function(g){if(g instanceof Br){this.setState({});return}throw g},c.render=function(){return this.props.children(this.setCallbacks)},l}(x.Component),wo=`
|
|
|
Press space bar to start a drag.
|
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
|
`,Ei=function(l){return l+1},zo=function(l){return`
|
|
|
You have lifted an item in position `+Ei(l.source.index)+`
|
|
|
`},uo=function(l,c){var f=l.droppableId===c.droppableId,g=Ei(l.index),b=Ei(c.index);return f?`
|
|
|
You have moved the item from position `+g+`
|
|
|
to position `+b+`
|
|
|
`:`
|
|
|
You have moved the item from position `+g+`
|
|
|
in list `+l.droppableId+`
|
|
|
to list `+c.droppableId+`
|
|
|
in position `+b+`
|
|
|
`},Io=function(l,c,f){var g=c.droppableId===f.droppableId;return g?`
|
|
|
The item `+l+`
|
|
|
has been combined with `+f.draggableId:`
|
|
|
The item `+l+`
|
|
|
in list `+c.droppableId+`
|
|
|
has been combined with `+f.draggableId+`
|
|
|
in list `+f.droppableId+`
|
|
|
`},So=function(l){var c=l.destination;if(c)return uo(l.source,c);var f=l.combine;return f?Io(l.draggableId,l.source,f):"You are over an area that cannot be dropped on"},ks=function(l){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+Ei(l.index)+`
|
|
|
`},vs=function(l){if(l.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+ks(l.source)+`
|
|
|
`;var c=l.destination,f=l.combine;return c?`
|
|
|
You have dropped the item.
|
|
|
`+uo(l.source,c)+`
|
|
|
`:f?`
|
|
|
You have dropped the item.
|
|
|
`+Io(l.draggableId,l.source,f)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+ks(l.source)+`
|
|
|
`},Xo={dragHandleUsageInstructions:wo,onDragStart:zo,onDragUpdate:So,onDragEnd:vs},ka={x:0,y:0},Bn=function(l,c){return{x:l.x+c.x,y:l.y+c.y}},ti=function(l,c){return{x:l.x-c.x,y:l.y-c.y}},fo=function(l,c){return l.x===c.x&&l.y===c.y},Ko=function(l){return{x:l.x!==0?-l.x:0,y:l.y!==0?-l.y:0}},To=function(l,c,f){var g;return f===void 0&&(f=0),g={},g[l]=c,g[l==="x"?"y":"x"]=f,g},Jo=function(l,c){return Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2))},Yi=function(l,c){return Math.min.apply(Math,c.map(function(f){return Jo(l,f)}))},pa=function(l){return function(c){return{x:l(c.x),y:l(c.y)}}},Rs=function(o,l){var c=wn({top:Math.max(l.top,o.top),right:Math.min(l.right,o.right),bottom:Math.min(l.bottom,o.bottom),left:Math.max(l.left,o.left)});return c.width<=0||c.height<=0?null:c},As=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},Ds=function(l){return[{x:l.left,y:l.top},{x:l.right,y:l.top},{x:l.left,y:l.bottom},{x:l.right,y:l.bottom}]},Nn={top:0,right:0,bottom:0,left:0},yl=function(l,c){return c?As(l,c.scroll.diff.displacement):l},ri=function(l,c,f){if(f&&f.increasedBy){var g;return(0,ce.Z)({},l,(g={},g[c.end]=l[c.end]+f.increasedBy[c.line],g))}return l},Ns=function(l,c){return c&&c.shouldClipSubject?Rs(c.pageMarginBox,l):wn(l)},Yo=function(o){var l=o.page,c=o.withPlaceholder,f=o.axis,g=o.frame,b=yl(l.marginBox,g),S=ri(b,f,c),E=Ns(S,g);return{page:l,withPlaceholder:c,active:E}},li=function(o,l){o.frame||He(!1);var c=o.frame,f=ti(l,c.scroll.initial),g=Ko(f),b=(0,ce.Z)({},c,{scroll:{initial:c.scroll.initial,current:l,diff:{value:f,displacement:g},max:c.scroll.max}}),S=Yo({page:o.subject.page,withPlaceholder:o.subject.withPlaceholder,axis:o.axis,frame:b}),E=(0,ce.Z)({},o,{frame:b,subject:S});return E};function Ls(o){return Number.isInteger?Number.isInteger(o):typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}function Ho(o){return Object.values?Object.values(o):Object.keys(o).map(function(l){return o[l]})}function Qo(o,l){if(o.findIndex)return o.findIndex(l);for(var c=0;c<o.length;c++)if(l(o[c]))return c;return-1}function Vi(o,l){if(o.find)return o.find(l);var c=Qo(o,l);if(c!==-1)return o[c]}function Wo(o){return Array.prototype.slice.call(o)}var Bo=U(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),ho=U(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),Qi=U(function(o){return Ho(o)}),sl=U(function(o){return Ho(o)}),eo=U(function(o,l){var c=sl(l).filter(function(f){return o===f.descriptor.droppableId}).sort(function(f,g){return f.descriptor.index-g.descriptor.index});return c});function _o(o){return o.at&&o.at.type==="REORDER"?o.at.destination:null}function w(o){return o.at&&o.at.type==="COMBINE"?o.at.combine:null}var D=U(function(o,l){return l.filter(function(c){return c.descriptor.id!==o.descriptor.id})}),ne=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,g=o.insideDestination,b=o.previousImpact;if(!f.isCombineEnabled)return null;var S=_o(b);if(!S)return null;function E(it){var ht={type:"COMBINE",combine:{draggableId:it,droppableId:f.descriptor.id}};return(0,ce.Z)({},b,{at:ht})}var N=b.displaced.all,Z=N.length?N[0]:null;if(l)return Z?E(Z):null;var L=D(c,g);if(!Z){if(!L.length)return null;var $=L[L.length-1];return E($.descriptor.id)}var F=Qo(L,function(it){return it.descriptor.id===Z});F===-1&&He(!1);var q=F-1;if(q<0)return null;var he=L[q];return E(he.descriptor.id)},ae=function(o,l){return o.descriptor.droppableId===l.descriptor.id},_e={point:ka,value:0},Ie={invisible:{},visible:{},all:[]},at={displaced:Ie,displacedBy:_e,at:null},wt=function(o,l){return function(c){return o<=c&&c<=l}},pr=function(o){var l=wt(o.top,o.bottom),c=wt(o.left,o.right);return function(f){var g=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);if(g)return!0;var b=l(f.top)||l(f.bottom),S=c(f.left)||c(f.right),E=b&&S;if(E)return!0;var N=f.top<o.top&&f.bottom>o.bottom,Z=f.left<o.left&&f.right>o.right,L=N&&Z;if(L)return!0;var $=N&&S||Z&&b;return $}},ur=function(o){var l=wt(o.top,o.bottom),c=wt(o.left,o.right);return function(f){var g=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);return g}},qr={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Wt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},kr=function(o){return function(l){var c=wt(l.top,l.bottom),f=wt(l.left,l.right);return function(g){return o===qr?c(g.top)&&c(g.bottom):f(g.left)&&f(g.right)}}},Yr=function(l,c){var f=c.frame?c.frame.scroll.diff.displacement:ka;return As(l,f)},an=function(l,c,f){return c.subject.active?f(c.subject.active)(l):!1},Zn=function(l,c,f){return f(c)(l)},qn=function(l){var c=l.target,f=l.destination,g=l.viewport,b=l.withDroppableDisplacement,S=l.isVisibleThroughFrameFn,E=b?Yr(c,f):c;return an(E,f,S)&&Zn(E,g,S)},Gt=function(l){return qn((0,ce.Z)({},l,{isVisibleThroughFrameFn:pr}))},It=function(l){return qn((0,ce.Z)({},l,{isVisibleThroughFrameFn:ur}))},Kt=function(l){return qn((0,ce.Z)({},l,{isVisibleThroughFrameFn:kr(l.destination.axis)}))},gr=function(l,c,f){if(typeof f=="boolean")return f;if(!c)return!0;var g=c.invisible,b=c.visible;if(g[l])return!1;var S=b[l];return S?S.shouldAnimate:!0};function en(o,l){var c=o.page.marginBox,f={top:l.point.y,right:0,bottom:0,left:l.point.x};return wn($i(c,f))}function Xr(o){var l=o.afterDragging,c=o.destination,f=o.displacedBy,g=o.viewport,b=o.forceShouldAnimate,S=o.last;return l.reduce(function(N,Z){var L=en(Z,f),$=Z.descriptor.id;N.all.push($);var F=Gt({target:L,destination:c,viewport:g,withDroppableDisplacement:!0});if(!F)return N.invisible[Z.descriptor.id]=!0,N;var q=gr($,S,b),he={draggableId:$,shouldAnimate:q};return N.visible[$]=he,N},{all:[],visible:{},invisible:{}})}function Vn(o,l){if(!o.length)return 0;var c=o[o.length-1].descriptor.index;return l.inHomeList?c:c+1}function na(o){var l=o.insideDestination,c=o.inHomeList,f=o.displacedBy,g=o.destination,b=Vn(l,{inHomeList:c});return{displaced:Ie,displacedBy:f,at:{type:"REORDER",destination:{droppableId:g.descriptor.id,index:b}}}}function tn(o){var l=o.draggable,c=o.insideDestination,f=o.destination,g=o.viewport,b=o.displacedBy,S=o.last,E=o.index,N=o.forceShouldAnimate,Z=ae(l,f);if(E==null)return na({insideDestination:c,inHomeList:Z,displacedBy:b,destination:f});var L=Vi(c,function(it){return it.descriptor.index===E});if(!L)return na({insideDestination:c,inHomeList:Z,displacedBy:b,destination:f});var $=D(l,c),F=c.indexOf(L),q=$.slice(F),he=Xr({afterDragging:q,destination:f,displacedBy:b,last:S,viewport:g.frame,forceShouldAnimate:N});return{displaced:he,displacedBy:b,at:{type:"REORDER",destination:{droppableId:f.descriptor.id,index:E}}}}function bn(o,l){return!!l.effected[o]}var ma=function(o){var l=o.isMovingForward,c=o.destination,f=o.draggables,g=o.combine,b=o.afterCritical;if(!c.isCombineEnabled)return null;var S=g.draggableId,E=f[S],N=E.descriptor.index,Z=bn(S,b);return Z?l?N:N-1:l?N+1:N},Fr=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.insideDestination,g=o.location;if(!f.length)return null;var b=g.index,S=l?b+1:b-1,E=f[0].descriptor.index,N=f[f.length-1].descriptor.index,Z=c?N:N+1;return S<E||S>Z?null:S},aa=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.draggable,g=o.draggables,b=o.destination,S=o.insideDestination,E=o.previousImpact,N=o.viewport,Z=o.afterCritical,L=E.at;if(L||He(!1),L.type==="REORDER"){var $=Fr({isMovingForward:l,isInHomeList:c,location:L.destination,insideDestination:S});return $==null?null:tn({draggable:f,insideDestination:S,destination:b,viewport:N,last:E.displaced,displacedBy:E.displacedBy,index:$})}var F=ma({isMovingForward:l,destination:b,displaced:E.displaced,draggables:g,combine:L.combine,afterCritical:Z});return F==null?null:tn({draggable:f,insideDestination:S,destination:b,viewport:N,last:E.displaced,displacedBy:E.displacedBy,index:F})},kn=function(o){var l=o.displaced,c=o.afterCritical,f=o.combineWith,g=o.displacedBy,b=!!(l.visible[f]||l.invisible[f]);return bn(f,c)?b?ka:Ko(g.point):b?g.point:ka},va=function(o){var l=o.afterCritical,c=o.impact,f=o.draggables,g=w(c);g||He(!1);var b=g.draggableId,S=f[b].page.borderBox.center,E=kn({displaced:c.displaced,afterCritical:l,combineWith:b,displacedBy:c.displacedBy});return Bn(S,E)},Ui=function(l,c){return c.margin[l.start]+c.borderBox[l.size]/2},es=function(l,c){return c.margin[l.end]+c.borderBox[l.size]/2},Pa=function(l,c,f){return c[l.crossAxisStart]+f.margin[l.crossAxisStart]+f.borderBox[l.crossAxisSize]/2},vi=function(l){var c=l.axis,f=l.moveRelativeTo,g=l.isMoving;return To(c.line,f.marginBox[c.end]+Ui(c,g),Pa(c,f.marginBox,g))},ji=function(l){var c=l.axis,f=l.moveRelativeTo,g=l.isMoving;return To(c.line,f.marginBox[c.start]-es(c,g),Pa(c,f.marginBox,g))},Zo=function(l){var c=l.axis,f=l.moveInto,g=l.isMoving;return To(c.line,f.contentBox[c.start]+Ui(c,g),Pa(c,f.contentBox,g))},Pn=function(o){var l=o.impact,c=o.draggable,f=o.draggables,g=o.droppable,b=o.afterCritical,S=eo(g.descriptor.id,f),E=c.page,N=g.axis;if(!S.length)return Zo({axis:N,moveInto:g.page,isMoving:E});var Z=l.displaced,L=l.displacedBy,$=Z.all[0];if($){var F=f[$];if(bn($,b))return ji({axis:N,moveRelativeTo:F.page,isMoving:E});var q=cr(F.page,L.point);return ji({axis:N,moveRelativeTo:q,isMoving:E})}var he=S[S.length-1];if(he.descriptor.id===c.descriptor.id)return E.borderBox.center;if(bn(he.descriptor.id,b)){var it=cr(he.page,Ko(b.displacedBy.point));return vi({axis:N,moveRelativeTo:it,isMoving:E})}return vi({axis:N,moveRelativeTo:he.page,isMoving:E})},ga=function(o,l){var c=o.frame;return c?Bn(l,c.scroll.diff.displacement):l},po=function(l){var c=l.impact,f=l.draggable,g=l.droppable,b=l.draggables,S=l.afterCritical,E=f.page.borderBox.center,N=c.at;return!g||!N?E:N.type==="REORDER"?Pn({impact:c,draggable:f,draggables:b,droppable:g,afterCritical:S}):va({impact:c,draggables:b,afterCritical:S})},ki=function(o){var l=po(o),c=o.droppable,f=c?ga(c,l):l;return f},Wa=function(o,l){var c=ti(l,o.scroll.initial),f=Ko(c),g=wn({top:l.y,bottom:l.y+o.frame.height,left:l.x,right:l.x+o.frame.width}),b={frame:g,scroll:{initial:o.scroll.initial,max:o.scroll.max,current:l,diff:{value:c,displacement:f}}};return b};function Gi(o,l){return o.map(function(c){return l[c]})}function ni(o,l){for(var c=0;c<l.length;c++){var f=l[c].visible[o];if(f)return f}return null}var gs=function(o){var l=o.impact,c=o.viewport,f=o.destination,g=o.draggables,b=o.maxScrollChange,S=Wa(c,Bn(c.scroll.current,b)),E=f.frame?li(f,Bn(f.frame.scroll.current,b)):f,N=l.displaced,Z=Xr({afterDragging:Gi(N.all,g),destination:f,displacedBy:l.displacedBy,viewport:S.frame,last:N,forceShouldAnimate:!1}),L=Xr({afterDragging:Gi(N.all,g),destination:E,displacedBy:l.displacedBy,viewport:c.frame,last:N,forceShouldAnimate:!1}),$={},F={},q=[N,Z,L];N.all.forEach(function(it){var ht=ni(it,q);if(ht){F[it]=ht;return}$[it]=!0});var he=(0,ce.Z)({},l,{displaced:{all:N.all,invisible:$,visible:F}});return he},bs=function(o,l){return Bn(o.scroll.diff.displacement,l)},Xs=function(o){var l=o.pageBorderBoxCenter,c=o.draggable,f=o.viewport,g=bs(f,l),b=ti(g,c.page.borderBox.center);return Bn(c.client.borderBox.center,b)},Js=function(o){var l=o.draggable,c=o.destination,f=o.newPageBorderBoxCenter,g=o.viewport,b=o.withDroppableDisplacement,S=o.onlyOnMainAxis,E=S===void 0?!1:S,N=ti(f,l.page.borderBox.center),Z=As(l.page.borderBox,N),L={target:Z,destination:c,withDroppableDisplacement:b,viewport:g};return E?Kt(L):It(L)},Ul=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,g=o.draggables,b=o.previousImpact,S=o.viewport,E=o.previousPageBorderBoxCenter,N=o.previousClientSelection,Z=o.afterCritical;if(!f.isEnabled)return null;var L=eo(f.descriptor.id,g),$=ae(c,f),F=ne({isMovingForward:l,draggable:c,destination:f,insideDestination:L,previousImpact:b})||aa({isMovingForward:l,isInHomeList:$,draggable:c,draggables:g,destination:f,insideDestination:L,previousImpact:b,viewport:S,afterCritical:Z});if(!F)return null;var q=ki({impact:F,draggable:c,droppable:f,draggables:g,afterCritical:Z}),he=Js({draggable:c,destination:f,newPageBorderBoxCenter:q,viewport:S.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(he){var it=Xs({pageBorderBoxCenter:q,draggable:c,viewport:S});return{clientSelection:it,impact:F,scrollJumpRequest:null}}var ht=ti(q,E),vt=gs({impact:F,viewport:S,destination:f,draggables:g,maxScrollChange:ht});return{clientSelection:N,impact:vt,scrollJumpRequest:ht}},Ni=function(l){var c=l.subject.active;return c||He(!1),c},Pl=function(o){var l=o.isMovingForward,c=o.pageBorderBoxCenter,f=o.source,g=o.droppables,b=o.viewport,S=f.subject.active;if(!S)return null;var E=f.axis,N=wt(S[E.start],S[E.end]),Z=Qi(g).filter(function($){return $!==f}).filter(function($){return $.isEnabled}).filter(function($){return!!$.subject.active}).filter(function($){return pr(b.frame)(Ni($))}).filter(function($){var F=Ni($);return l?S[E.crossAxisEnd]<F[E.crossAxisEnd]:F[E.crossAxisStart]<S[E.crossAxisStart]}).filter(function($){var F=Ni($),q=wt(F[E.start],F[E.end]);return N(F[E.start])||N(F[E.end])||q(S[E.start])||q(S[E.end])}).sort(function($,F){var q=Ni($)[E.crossAxisStart],he=Ni(F)[E.crossAxisStart];return l?q-he:he-q}).filter(function($,F,q){return Ni($)[E.crossAxisStart]===Ni(q[0])[E.crossAxisStart]});if(!Z.length)return null;if(Z.length===1)return Z[0];var L=Z.filter(function($){var F=wt(Ni($)[E.start],Ni($)[E.end]);return F(c[E.line])});return L.length===1?L[0]:L.length>1?L.sort(function($,F){return Ni($)[E.start]-Ni(F)[E.start]})[0]:Z.sort(function($,F){var q=Yi(c,Ds(Ni($))),he=Yi(c,Ds(Ni(F)));return q!==he?q-he:Ni($)[E.start]-Ni(F)[E.start]})[0]},Za=function(l,c){var f=l.page.borderBox.center;return bn(l.descriptor.id,c)?ti(f,c.displacedBy.point):f},Mo=function(l,c){var f=l.page.borderBox;return bn(l.descriptor.id,c)?As(f,Ko(c.displacedBy.point)):f},os=function(o){var l=o.pageBorderBoxCenter,c=o.viewport,f=o.destination,g=o.insideDestination,b=o.afterCritical,S=g.filter(function(E){return It({target:Mo(E,b),destination:f,viewport:c.frame,withDroppableDisplacement:!0})}).sort(function(E,N){var Z=Jo(l,ga(f,Za(E,b))),L=Jo(l,ga(f,Za(N,b)));return Z<L?-1:L<Z?1:E.descriptor.index-N.descriptor.index});return S[0]||null},mo=U(function(l,c){var f=c[l.line];return{value:f,point:To(l.line,f)}}),Ys=function(l,c,f){var g=l.axis;if(l.descriptor.mode==="virtual")return To(g.line,c[g.line]);var b=l.subject.page.contentBox[g.size],S=eo(l.descriptor.id,f),E=S.reduce(function(L,$){return L+$.client.marginBox[g.size]},0),N=E+c[g.line],Z=N-b;return Z<=0?null:To(g.line,Z)},ss=function(l,c){return(0,ce.Z)({},l,{scroll:(0,ce.Z)({},l.scroll,{max:c})})},br=function(l,c,f){var g=l.frame;ae(c,l)&&He(!1),l.subject.withPlaceholder&&He(!1);var b=mo(l.axis,c.displaceBy).point,S=Ys(l,b,f),E={placeholderSize:b,increasedBy:S,oldFrameMaxScroll:l.frame?l.frame.scroll.max:null};if(!g){var N=Yo({page:l.subject.page,withPlaceholder:E,axis:l.axis,frame:l.frame});return(0,ce.Z)({},l,{subject:N})}var Z=S?Bn(g.scroll.max,S):g.scroll.max,L=ss(g,Z),$=Yo({page:l.subject.page,withPlaceholder:E,axis:l.axis,frame:L});return(0,ce.Z)({},l,{subject:$,frame:L})},Qs=function(l){var c=l.subject.withPlaceholder;c||He(!1);var f=l.frame;if(!f){var g=Yo({page:l.subject.page,axis:l.axis,frame:null,withPlaceholder:null});return(0,ce.Z)({},l,{subject:g})}var b=c.oldFrameMaxScroll;b||He(!1);var S=ss(f,b),E=Yo({page:l.subject.page,axis:l.axis,frame:S,withPlaceholder:null});return(0,ce.Z)({},l,{subject:E,frame:S})},Os=function(o){var l=o.previousPageBorderBoxCenter,c=o.moveRelativeTo,f=o.insideDestination,g=o.draggable,b=o.draggables,S=o.destination,E=o.viewport,N=o.afterCritical;if(!c){if(f.length)return null;var Z={displaced:Ie,displacedBy:_e,at:{type:"REORDER",destination:{droppableId:S.descriptor.id,index:0}}},L=ki({impact:Z,draggable:g,droppable:S,draggables:b,afterCritical:N}),$=ae(g,S)?S:br(S,g,b),F=Js({draggable:g,destination:$,newPageBorderBoxCenter:L,viewport:E.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return F?Z:null}var q=l[S.axis.line]<=c.page.borderBox.center[S.axis.line],he=function(){var ht=c.descriptor.index;return c.descriptor.id===g.descriptor.id||q?ht:ht+1}(),it=mo(S.axis,g.displaceBy);return tn({draggable:g,insideDestination:f,destination:S,viewport:E,displacedBy:it,last:Ie,index:he})},ls=function(o){var l=o.isMovingForward,c=o.previousPageBorderBoxCenter,f=o.draggable,g=o.isOver,b=o.draggables,S=o.droppables,E=o.viewport,N=o.afterCritical,Z=Pl({isMovingForward:l,pageBorderBoxCenter:c,source:g,droppables:S,viewport:E});if(!Z)return null;var L=eo(Z.descriptor.id,b),$=os({pageBorderBoxCenter:c,viewport:E,destination:Z,insideDestination:L,afterCritical:N}),F=Os({previousPageBorderBoxCenter:c,destination:Z,draggable:f,draggables:b,moveRelativeTo:$,insideDestination:L,viewport:E,afterCritical:N});if(!F)return null;var q=ki({impact:F,draggable:f,droppable:Z,draggables:b,afterCritical:N}),he=Xs({pageBorderBoxCenter:q,draggable:f,viewport:E});return{clientSelection:he,impact:F,scrollJumpRequest:null}},to=function(o){var l=o.at;return l?l.type==="REORDER"?l.destination.droppableId:l.combine.droppableId:null},ca=function(l,c){var f=to(l);return f?c[f]:null},ll=function(o){var l=o.state,c=o.type,f=ca(l.impact,l.dimensions.droppables),g=!!f,b=l.dimensions.droppables[l.critical.droppable.id],S=f||b,E=S.axis.direction,N=E==="vertical"&&(c==="MOVE_UP"||c==="MOVE_DOWN")||E==="horizontal"&&(c==="MOVE_LEFT"||c==="MOVE_RIGHT");if(N&&!g)return null;var Z=c==="MOVE_DOWN"||c==="MOVE_RIGHT",L=l.dimensions.draggables[l.critical.draggable.id],$=l.current.page.borderBoxCenter,F=l.dimensions,q=F.draggables,he=F.droppables;return N?Ul({isMovingForward:Z,previousPageBorderBoxCenter:$,draggable:L,destination:S,draggables:q,viewport:l.viewport,previousClientSelection:l.current.client.selection,previousImpact:l.impact,afterCritical:l.afterCritical}):ls({isMovingForward:Z,previousPageBorderBoxCenter:$,draggable:L,isOver:S,draggables:q,droppables:he,viewport:l.viewport,afterCritical:l.afterCritical})};function gi(o){return o.phase==="DRAGGING"||o.phase==="COLLECTING"}function qi(o){var l=wt(o.top,o.bottom),c=wt(o.left,o.right);return function(g){return l(g.y)&&c(g.x)}}function Fs(o,l){return o.left<l.right&&o.right>l.left&&o.top<l.bottom&&o.bottom>l.top}function xl(o){var l=o.pageBorderBox,c=o.draggable,f=o.candidates,g=c.page.borderBox.center,b=f.map(function(S){var E=S.axis,N=To(S.axis.line,l.center[E.line],S.page.borderBox.center[E.crossAxisLine]);return{id:S.descriptor.id,distance:Jo(g,N)}}).sort(function(S,E){return E.distance-S.distance});return b[0]?b[0].id:null}function vo(o){var l=o.pageBorderBox,c=o.draggable,f=o.droppables,g=Qi(f).filter(function(b){if(!b.isEnabled)return!1;var S=b.subject.active;if(!S||!Fs(l,S))return!1;if(qi(S)(l.center))return!0;var E=b.axis,N=S.center[E.crossAxisLine],Z=l[E.crossAxisStart],L=l[E.crossAxisEnd],$=wt(S[E.crossAxisStart],S[E.crossAxisEnd]),F=$(Z),q=$(L);return!F&&!q?!0:F?Z<N:L>N});return g.length?g.length===1?g[0].descriptor.id:xl({pageBorderBox:l,draggable:c,candidates:g}):null}var zs=function(l,c){return wn(As(l,c))},cl=function(o,l){var c=o.frame;return c?zs(l,c.scroll.diff.value):l};function wl(o){var l=o.displaced,c=o.id;return!!(l.visible[c]||l.invisible[c])}function Sl(o){var l=o.draggable,c=o.closest,f=o.inHomeList;return c?f&&c.descriptor.index>l.descriptor.index?c.descriptor.index-1:c.descriptor.index:null}var _l=function(o){var l=o.pageBorderBoxWithDroppableScroll,c=o.draggable,f=o.destination,g=o.insideDestination,b=o.last,S=o.viewport,E=o.afterCritical,N=f.axis,Z=mo(f.axis,c.displaceBy),L=Z.value,$=l[N.start],F=l[N.end],q=D(c,g),he=Vi(q,function(ht){var vt=ht.descriptor.id,zt=ht.page.borderBox.center[N.line],ir=bn(vt,E),dr=wl({displaced:b,id:vt});return ir?dr?F<=zt:$<zt-L:dr?F<=zt+L:$<zt}),it=Sl({draggable:c,closest:he,inHomeList:ae(c,f)});return tn({draggable:c,insideDestination:g,destination:f,viewport:S,last:b,displacedBy:Z,index:it})},Ks=4,Vo=function(o){var l=o.draggable,c=o.pageBorderBoxWithDroppableScroll,f=o.previousImpact,g=o.destination,b=o.insideDestination,S=o.afterCritical;if(!g.isCombineEnabled)return null;var E=g.axis,N=mo(g.axis,l.displaceBy),Z=N.value,L=c[E.start],$=c[E.end],F=D(l,b),q=Vi(F,function(it){var ht=it.descriptor.id,vt=it.page.borderBox,zt=vt[E.size],ir=zt/Ks,dr=bn(ht,S),Wr=wl({displaced:f.displaced,id:ht});return dr?Wr?$>vt[E.start]+ir&&$<vt[E.end]-ir:L>vt[E.start]-Z+ir&&L<vt[E.end]-Z-ir:Wr?$>vt[E.start]+Z+ir&&$<vt[E.end]+Z-ir:L>vt[E.start]+ir&&L<vt[E.end]-ir});if(!q)return null;var he={displacedBy:N,displaced:f.displaced,at:{type:"COMBINE",combine:{draggableId:q.descriptor.id,droppableId:g.descriptor.id}}};return he},jl=function(o){var l=o.pageOffset,c=o.draggable,f=o.draggables,g=o.droppables,b=o.previousImpact,S=o.viewport,E=o.afterCritical,N=zs(c.page.borderBox,l),Z=vo({pageBorderBox:N,draggable:c,droppables:g});if(!Z)return at;var L=g[Z],$=eo(L.descriptor.id,f),F=cl(L,N);return Vo({pageBorderBoxWithDroppableScroll:F,draggable:c,previousImpact:b,destination:L,insideDestination:$,afterCritical:E})||_l({pageBorderBoxWithDroppableScroll:F,draggable:c,destination:L,insideDestination:$,last:b.displaced,viewport:S,afterCritical:E})},el=function(o,l){var c;return(0,ce.Z)({},o,(c={},c[l.descriptor.id]=l,c))},Gl=function(l){var c=l.previousImpact,f=l.impact,g=l.droppables,b=to(c),S=to(f);if(!b||b===S)return g;var E=g[b];if(!E.subject.withPlaceholder)return g;var N=Qs(E);return el(g,N)},ul=function(o){var l=o.draggable,c=o.draggables,f=o.droppables,g=o.previousImpact,b=o.impact,S=Gl({previousImpact:g,impact:b,droppables:f}),E=to(b);if(!E)return S;var N=f[E];if(ae(l,N)||N.subject.withPlaceholder)return S;var Z=br(N,l,c);return el(S,Z)},Is=function(o){var l=o.state,c=o.clientSelection,f=o.dimensions,g=o.viewport,b=o.impact,S=o.scrollJumpRequest,E=g||l.viewport,N=f||l.dimensions,Z=c||l.current.client.selection,L=ti(Z,l.initial.client.selection),$={offset:L,selection:Z,borderBoxCenter:Bn(l.initial.client.borderBoxCenter,L)},F={selection:Bn($.selection,E.scroll.current),borderBoxCenter:Bn($.borderBoxCenter,E.scroll.current),offset:Bn($.offset,E.scroll.diff.value)},q={client:$,page:F};if(l.phase==="COLLECTING")return(0,ce.Z)({phase:"COLLECTING"},l,{dimensions:N,viewport:E,current:q});var he=N.draggables[l.critical.draggable.id],it=b||jl({pageOffset:F.offset,draggable:he,draggables:N.draggables,droppables:N.droppables,previousImpact:l.impact,viewport:E,afterCritical:l.afterCritical}),ht=ul({draggable:he,impact:it,previousImpact:l.impact,draggables:N.draggables,droppables:N.droppables}),vt=(0,ce.Z)({},l,{current:q,dimensions:{draggables:N.draggables,droppables:ht},impact:it,viewport:E,scrollJumpRequest:S||null,forceShouldAnimate:S?!1:null});return vt};function ql(o,l){return o.map(function(c){return l[c]})}var Hs=function(o){var l=o.impact,c=o.viewport,f=o.draggables,g=o.destination,b=o.forceShouldAnimate,S=l.displaced,E=ql(S.all,f),N=Xr({afterDragging:E,destination:g,displacedBy:l.displacedBy,viewport:c.frame,forceShouldAnimate:b,last:S});return(0,ce.Z)({},l,{displaced:N})},Xl=function(o){var l=o.impact,c=o.draggable,f=o.droppable,g=o.draggables,b=o.viewport,S=o.afterCritical,E=ki({impact:l,draggable:c,draggables:g,droppable:f,afterCritical:S});return Xs({pageBorderBoxCenter:E,draggable:c,viewport:b})},Ml=function(o){var l=o.state,c=o.dimensions,f=o.viewport;l.movementMode!=="SNAP"&&He(!1);var g=l.impact,b=f||l.viewport,S=c||l.dimensions,E=S.draggables,N=S.droppables,Z=E[l.critical.draggable.id],L=to(g);L||He(!1);var $=N[L],F=Hs({impact:g,viewport:b,destination:$,draggables:E}),q=Xl({impact:F,draggable:Z,droppable:$,draggables:E,viewport:b,afterCritical:l.afterCritical});return Is({impact:F,clientSelection:q,state:l,dimensions:S,viewport:b})},Ws=function(o){return{index:o.index,droppableId:o.droppableId}},dl=function(o){var l=o.draggable,c=o.home,f=o.draggables,g=o.viewport,b=mo(c.axis,l.displaceBy),S=eo(c.descriptor.id,f),E=S.indexOf(l);E===-1&&He(!1);var N=S.slice(E+1),Z=N.reduce(function(q,he){return q[he.descriptor.id]=!0,q},{}),L={inVirtualList:c.descriptor.mode==="virtual",displacedBy:b,effected:Z},$=Xr({afterDragging:N,destination:c,displacedBy:b,last:null,viewport:g.frame,forceShouldAnimate:!1}),F={displaced:$,displacedBy:b,at:{type:"REORDER",destination:Ws(l.descriptor)}};return{impact:F,afterCritical:L}},rc=function(o,l){return{draggables:o.draggables,droppables:el(o.droppables,l)}},tl=function(l){},_=function(l){},B=function(o){var l=o.draggable,c=o.offset,f=o.initialWindowScroll,g=cr(l.client,c),b=Ha(g,f),S=(0,ce.Z)({},l,{placeholder:(0,ce.Z)({},l.placeholder,{client:g}),client:g,page:b});return S},P=function(o){var l=o.frame;return l||He(!1),l},j=function(o){var l=o.additions,c=o.updatedDroppables,f=o.viewport,g=f.scroll.diff.value;return l.map(function(b){var S=b.descriptor.droppableId,E=c[S],N=P(E),Z=N.scroll.diff.value,L=Bn(g,Z),$=B({draggable:b,offset:L,initialWindowScroll:f.scroll.initial});return $})},se=function(o){var l=o.state,c=o.published;tl();var f=c.modified.map(function(ir){var dr=l.dimensions.droppables[ir.droppableId],Wr=li(dr,ir.scroll);return Wr}),g=(0,ce.Z)({},l.dimensions.droppables,{},Bo(f)),b=ho(j({additions:c.additions,updatedDroppables:g,viewport:l.viewport})),S=(0,ce.Z)({},l.dimensions.draggables,{},b);c.removals.forEach(function(ir){delete S[ir]});var E={droppables:g,draggables:S},N=to(l.impact),Z=N?E.droppables[N]:null,L=E.draggables[l.critical.draggable.id],$=E.droppables[l.critical.droppable.id],F=dl({draggable:L,home:$,draggables:S,viewport:l.viewport}),q=F.impact,he=F.afterCritical,it=Z&&Z.isCombineEnabled?l.impact:q,ht=jl({pageOffset:l.current.page.offset,draggable:E.draggables[l.critical.draggable.id],draggables:E.draggables,droppables:E.droppables,previousImpact:it,viewport:l.viewport,afterCritical:he});_();var vt=(0,ce.Z)({phase:"DRAGGING"},l,{phase:"DRAGGING",impact:ht,onLiftImpact:q,dimensions:E,afterCritical:he,forceShouldAnimate:!1});if(l.phase==="COLLECTING")return vt;var zt=(0,ce.Z)({phase:"DROP_PENDING"},vt,{phase:"DROP_PENDING",reason:l.reason,isWaiting:!1});return zt},Ce=function(l){return l.movementMode==="SNAP"},ve=function(l,c,f){var g=rc(l.dimensions,c);return!Ce(l)||f?Is({state:l,dimensions:g}):Ml({state:l,dimensions:g})};function $e(o){return o.isDragging&&o.movementMode==="SNAP"?(0,ce.Z)({phase:"DRAGGING"},o,{scrollJumpRequest:null}):o}var ut={phase:"IDLE",completed:null,shouldFlush:!1},rt=function(o,l){if(o===void 0&&(o=ut),l.type==="FLUSH")return(0,ce.Z)({},ut,{shouldFlush:!0});if(l.type==="INITIAL_PUBLISH"){o.phase!=="IDLE"&&He(!1);var c=l.payload,f=c.critical,g=c.clientSelection,b=c.viewport,S=c.dimensions,E=c.movementMode,N=S.draggables[f.draggable.id],Z=S.droppables[f.droppable.id],L={selection:g,borderBoxCenter:N.client.borderBox.center,offset:ka},$={client:L,page:{selection:Bn(L.selection,b.scroll.initial),borderBoxCenter:Bn(L.selection,b.scroll.initial),offset:Bn(L.selection,b.scroll.diff.value)}},F=Qi(S.droppables).every(function(Su){return!Su.isFixedOnPage}),q=dl({draggable:N,home:Z,draggables:S.draggables,viewport:b}),he=q.impact,it=q.afterCritical,ht={phase:"DRAGGING",isDragging:!0,critical:f,movementMode:E,dimensions:S,initial:$,current:$,isWindowScrollAllowed:F,impact:he,afterCritical:it,onLiftImpact:he,viewport:b,scrollJumpRequest:null,forceShouldAnimate:null};return ht}if(l.type==="COLLECTION_STARTING"){if(o.phase==="COLLECTING"||o.phase==="DROP_PENDING")return o;o.phase!=="DRAGGING"&&He(!1);var vt=(0,ce.Z)({phase:"COLLECTING"},o,{phase:"COLLECTING"});return vt}if(l.type==="PUBLISH_WHILE_DRAGGING")return o.phase==="COLLECTING"||o.phase==="DROP_PENDING"||He(!1),se({state:o,published:l.payload});if(l.type==="MOVE"){if(o.phase==="DROP_PENDING")return o;gi(o)||He(!1);var zt=l.payload.client;return fo(zt,o.current.client.selection)?o:Is({state:o,clientSelection:zt,impact:Ce(o)?o.impact:null})}if(l.type==="UPDATE_DROPPABLE_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="COLLECTING")return $e(o);gi(o)||He(!1);var ir=l.payload,dr=ir.id,Wr=ir.newScroll,hr=o.dimensions.droppables[dr];if(!hr)return o;var yn=li(hr,Wr);return ve(o,yn,!1)}if(l.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(o.phase==="DROP_PENDING")return o;gi(o)||He(!1);var Hi=l.payload,xn=Hi.id,Ma=Hi.isEnabled,rs=o.dimensions.droppables[xn];rs||He(!1),rs.isEnabled===Ma&&He(!1);var Ao=(0,ce.Z)({},rs,{isEnabled:Ma});return ve(o,Ao,!0)}if(l.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(o.phase==="DROP_PENDING")return o;gi(o)||He(!1);var Us=l.payload,gl=Us.id,nl=Us.isCombineEnabled,al=o.dimensions.droppables[gl];al||He(!1),al.isCombineEnabled===nl&&He(!1);var hs=(0,ce.Z)({},al,{isCombineEnabled:nl});return ve(o,hs,!0)}if(l.type==="MOVE_BY_WINDOW_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="DROP_ANIMATING")return o;gi(o)||He(!1),o.isWindowScrollAllowed||He(!1);var uc=l.payload.newScroll;if(fo(o.viewport.scroll.current,uc))return $e(o);var Kl=Wa(o.viewport,uc);return Ce(o)?Ml({state:o,viewport:Kl}):Is({state:o,viewport:Kl})}if(l.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!gi(o))return o;var Ql=l.payload.maxScroll;if(fo(Ql,o.viewport.scroll.max))return o;var Al=(0,ce.Z)({},o.viewport,{scroll:(0,ce.Z)({},o.viewport.scroll,{max:Ql})});return(0,ce.Z)({phase:"DRAGGING"},o,{viewport:Al})}if(l.type==="MOVE_UP"||l.type==="MOVE_DOWN"||l.type==="MOVE_LEFT"||l.type==="MOVE_RIGHT"){if(o.phase==="COLLECTING"||o.phase==="DROP_PENDING")return o;o.phase!=="DRAGGING"&&He(!1);var Hl=ll({state:o,type:l.type});return Hl?Is({state:o,impact:Hl.impact,clientSelection:Hl.clientSelection,scrollJumpRequest:Hl.scrollJumpRequest}):o}if(l.type==="DROP_PENDING"){var Es=l.payload.reason;o.phase!=="COLLECTING"&&He(!1);var js=(0,ce.Z)({phase:"DROP_PENDING"},o,{phase:"DROP_PENDING",isWaiting:!0,reason:Es});return js}if(l.type==="DROP_ANIMATE"){var xu=l.payload,Dl=xu.completed,Ic=xu.dropDuration,Gc=xu.newHomeClientOffset;o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var Fc={phase:"DROP_ANIMATING",completed:Dl,dropDuration:Ic,newHomeClientOffset:Gc,dimensions:o.dimensions};return Fc}if(l.type==="DROP_COMPLETE"){var wu=l.payload.completed;return{phase:"IDLE",completed:wu,shouldFlush:!1}}return o},Pt=function(l){return{type:"BEFORE_INITIAL_CAPTURE",payload:l}},dt=function(l){return{type:"LIFT",payload:l}},tr=function(l){return{type:"INITIAL_PUBLISH",payload:l}},qt=function(l){return{type:"PUBLISH_WHILE_DRAGGING",payload:l}},Zt=function(){return{type:"COLLECTION_STARTING",payload:null}},fn=function(l){return{type:"UPDATE_DROPPABLE_SCROLL",payload:l}},zr=function(l){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:l}},Sn=function(l){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:l}},Zr=function(l){return{type:"MOVE",payload:l}},Mr=function(l){return{type:"MOVE_BY_WINDOW_SCROLL",payload:l}},Yt=function(l){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:l}},ba=function(){return{type:"MOVE_UP",payload:null}},ia=function(){return{type:"MOVE_DOWN",payload:null}},ya=function(){return{type:"MOVE_RIGHT",payload:null}},Va=function(){return{type:"MOVE_LEFT",payload:null}},on=function(){return{type:"FLUSH",payload:null}},hn=function(l){return{type:"DROP_ANIMATE",payload:l}},Nr=function(l){return{type:"DROP_COMPLETE",payload:l}},Aa=function(l){return{type:"DROP",payload:l}},Ga=function(l){return{type:"DROP_PENDING",payload:l}},Xn=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function sn(o){if(!(o.length<=1)){for(var l=o.map(function(E){return E.descriptor.index}),c={},f=1;f<l.length;f++){var g=l[f],b=l[f-1];g!==b+1&&(c[g]=!0)}if(Object.keys(c).length)var S=l.map(function(E){var N=!!c[E];return N?"[\u{1F525}"+E+"]":""+E}).join(", ")}}function On(o,l){if(0)var c}var Vr=function(o){return function(l){var c=l.getState,f=l.dispatch;return function(g){return function(b){if(b.type!=="LIFT"){g(b);return}var S=b.payload,E=S.id,N=S.clientSelection,Z=S.movementMode,L=c();L.phase==="DROP_ANIMATING"&&f(Nr({completed:L.completed})),c().phase!=="IDLE"&&He(!1),f(on()),f(Pt({draggableId:E,movementMode:Z}));var $={shouldPublishImmediately:Z==="SNAP"},F={draggableId:E,scrollOptions:$},q=o.startPublishing(F),he=q.critical,it=q.dimensions,ht=q.viewport;On(he,it),f(tr({critical:he,dimensions:it,clientSelection:N,movementMode:Z,viewport:ht}))}}}},Ai=function(o){return function(){return function(l){return function(c){c.type==="INITIAL_PUBLISH"&&o.dragging(),c.type==="DROP_ANIMATE"&&o.dropping(c.payload.completed.result.reason),(c.type==="FLUSH"||c.type==="DROP_COMPLETE")&&o.resting(),l(c)}}}},Fn={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},oa={opacity:{drop:0,combining:.7},scale:{drop:.75}},Co={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},qa=Co.outOfTheWay+"s "+Fn.outOfTheWay,ci={fluid:"opacity "+qa,snap:"transform "+qa+", opacity "+qa,drop:function(l){var c=l+"s "+Fn.drop;return"transform "+c+", opacity "+c},outOfTheWay:"transform "+qa,placeholder:"height "+qa+", width "+qa+", margin "+qa},Po=function(l){return fo(l,ka)?null:"translate("+l.x+"px, "+l.y+"px)"},m={moveTo:Po,drop:function(l,c){var f=Po(l);return f?c?f+" scale("+oa.scale.drop+")":f:null}},M=Co.minDropTime,A=Co.maxDropTime,R=A-M,K=1500,ie=.6,oe=function(o){var l=o.current,c=o.destination,f=o.reason,g=Jo(l,c);if(g<=0)return M;if(g>=K)return A;var b=g/K,S=M+R*b,E=f==="CANCEL"?S*ie:S;return Number(E.toFixed(2))},Ge=function(o){var l=o.impact,c=o.draggable,f=o.dimensions,g=o.viewport,b=o.afterCritical,S=f.draggables,E=f.droppables,N=to(l),Z=N?E[N]:null,L=E[c.descriptor.droppableId],$=Xl({impact:l,draggable:c,draggables:S,afterCritical:b,droppable:Z||L,viewport:g}),F=ti($,c.client.borderBox.center);return F},qe=function(o){var l=o.draggables,c=o.reason,f=o.lastImpact,g=o.home,b=o.viewport,S=o.onLiftImpact;if(!f.at||c!=="DROP"){var E=Hs({draggables:l,impact:S,destination:g,viewport:b,forceShouldAnimate:!0});return{impact:E,didDropInsideDroppable:!1}}if(f.at.type==="REORDER")return{impact:f,didDropInsideDroppable:!0};var N=(0,ce.Z)({},f,{displaced:Ie});return{impact:N,didDropInsideDroppable:!0}},Qe=function(o){var l=o.getState,c=o.dispatch;return function(f){return function(g){if(g.type!=="DROP"){f(g);return}var b=l(),S=g.payload.reason;if(b.phase==="COLLECTING"){c(Ga({reason:S}));return}if(b.phase!=="IDLE"){var E=b.phase==="DROP_PENDING"&&b.isWaiting;E&&He(!1),b.phase==="DRAGGING"||b.phase==="DROP_PENDING"||He(!1);var N=b.critical,Z=b.dimensions,L=Z.draggables[b.critical.draggable.id],$=qe({reason:S,lastImpact:b.impact,afterCritical:b.afterCritical,onLiftImpact:b.onLiftImpact,home:b.dimensions.droppables[b.critical.droppable.id],viewport:b.viewport,draggables:b.dimensions.draggables}),F=$.impact,q=$.didDropInsideDroppable,he=q?_o(F):null,it=q?w(F):null,ht={index:N.draggable.index,droppableId:N.droppable.id},vt={draggableId:L.descriptor.id,type:L.descriptor.type,source:ht,reason:S,mode:b.movementMode,destination:he,combine:it},zt=Ge({impact:F,draggable:L,dimensions:Z,viewport:b.viewport,afterCritical:b.afterCritical}),ir={critical:b.critical,afterCritical:b.afterCritical,result:vt,impact:F},dr=!fo(b.current.client.offset,zt)||!!vt.combine;if(!dr){c(Nr({completed:ir}));return}var Wr=oe({current:b.current.client.offset,destination:zt,reason:S}),hr={newHomeClientOffset:zt,dropDuration:Wr,completed:ir};c(hn(hr))}}}},Ot=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function kt(o){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(c){c.target!==window&&c.target!==window.document||o()}}}function Dt(o){var l=o.onWindowScroll;function c(){l(Ot())}var f=Se(c),g=kt(f),b=pn;function S(){return b!==pn}function E(){S()&&He(!1),b=Hn(window,[g])}function N(){S()||He(!1),f.cancel(),b(),b=pn}return{start:E,stop:N,isActive:S}}var We=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},st=function(o){var l=Dt({onWindowScroll:function(f){o.dispatch(Mr({newScroll:f}))}});return function(c){return function(f){!l.isActive()&&f.type==="INITIAL_PUBLISH"&&l.start(),l.isActive()&&We(f)&&l.stop(),c(f)}}},Qt=function(o){var l=!1,c=!1,f=setTimeout(function(){c=!0}),g=function(S){l||c||(l=!0,o(S),clearTimeout(f))};return g.wasCalled=function(){return l},g},Ft=function(){var o=[],l=function(b){var S=Qo(o,function(Z){return Z.timerId===b});S===-1&&He(!1);var E=o.splice(S,1),N=E[0];N.callback()},c=function(b){var S=setTimeout(function(){return l(S)}),E={timerId:S,callback:b};o.push(E)},f=function(){if(o.length){var b=[].concat(o);o.length=0,b.forEach(function(S){clearTimeout(S.timerId),S.callback()})}};return{add:c,flush:f}},Sr=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.droppableId===c.droppableId&&l.index===c.index},er=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.draggableId===c.draggableId&&l.droppableId===c.droppableId},Ut=function(l,c){if(l===c)return!0;var f=l.draggable.id===c.draggable.id&&l.draggable.droppableId===c.draggable.droppableId&&l.draggable.type===c.draggable.type&&l.draggable.index===c.draggable.index,g=l.droppable.id===c.droppable.id&&l.droppable.type===c.droppable.type;return f&&g},ft=function(l,c){tl(),c(),_()},sr=function(l,c){return{draggableId:l.draggable.id,type:l.droppable.type,source:{droppableId:l.droppable.id,index:l.draggable.index},mode:c}},Ar=function(l,c,f,g){if(!l){f(g(c));return}var b=Qt(f),S={announce:b};l(c,S),b.wasCalled()||f(g(c))},Pr=function(o,l){var c=Ft(),f=null,g=function(F,q){f&&He(!1),ft("onBeforeCapture",function(){var he=o().onBeforeCapture;if(he){var it={draggableId:F,mode:q};he(it)}})},b=function(F,q){f&&He(!1),ft("onBeforeDragStart",function(){var he=o().onBeforeDragStart;he&&he(sr(F,q))})},S=function(F,q){f&&He(!1);var he=sr(F,q);f={mode:q,lastCritical:F,lastLocation:he.source,lastCombine:null},c.add(function(){ft("onDragStart",function(){return Ar(o().onDragStart,he,l,Xo.onDragStart)})})},E=function(F,q){var he=_o(q),it=w(q);f||He(!1);var ht=!Ut(F,f.lastCritical);ht&&(f.lastCritical=F);var vt=!Sr(f.lastLocation,he);vt&&(f.lastLocation=he);var zt=!er(f.lastCombine,it);if(zt&&(f.lastCombine=it),!(!ht&&!vt&&!zt)){var ir=(0,ce.Z)({},sr(F,f.mode),{combine:it,destination:he});c.add(function(){ft("onDragUpdate",function(){return Ar(o().onDragUpdate,ir,l,Xo.onDragUpdate)})})}},N=function(){f||He(!1),c.flush()},Z=function(F){f||He(!1),f=null,ft("onDragEnd",function(){return Ar(o().onDragEnd,F,l,Xo.onDragEnd)})},L=function(){if(f){var F=(0,ce.Z)({},sr(f.lastCritical,f.mode),{combine:null,destination:null,reason:"CANCEL"});Z(F)}};return{beforeCapture:g,beforeStart:b,start:S,update:E,flush:N,drop:Z,abort:L}},Cr=function(o,l){var c=Pr(o,l);return function(f){return function(g){return function(b){if(b.type==="BEFORE_INITIAL_CAPTURE"){c.beforeCapture(b.payload.draggableId,b.payload.movementMode);return}if(b.type==="INITIAL_PUBLISH"){var S=b.payload.critical;c.beforeStart(S,b.payload.movementMode),g(b),c.start(S,b.payload.movementMode);return}if(b.type==="DROP_COMPLETE"){var E=b.payload.completed.result;c.flush(),g(b),c.drop(E);return}if(g(b),b.type==="FLUSH"){c.abort();return}var N=f.getState();N.phase==="DRAGGING"&&c.update(N.critical,N.impact)}}}},ua=function(o){return function(l){return function(c){if(c.type!=="DROP_ANIMATION_FINISHED"){l(c);return}var f=o.getState();f.phase!=="DROP_ANIMATING"&&He(!1),o.dispatch(Nr({completed:f.completed}))}}},Lr=function(o){var l=null,c=null;function f(){c&&(cancelAnimationFrame(c),c=null),l&&(l(),l=null)}return function(g){return function(b){if((b.type==="FLUSH"||b.type==="DROP_COMPLETE"||b.type==="DROP_ANIMATION_FINISHED")&&f(),g(b),b.type==="DROP_ANIMATE"){var S={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var N=o.getState();N.phase==="DROP_ANIMATING"&&o.dispatch(Xn())}};c=requestAnimationFrame(function(){c=null,l=Hn(window,[S])})}}}},Jn=function(o){return function(){return function(l){return function(c){(c.type==="DROP_COMPLETE"||c.type==="FLUSH"||c.type==="DROP_ANIMATE")&&o.stopPublishing(),l(c)}}}},$n=function(o){var l=!1;return function(){return function(c){return function(f){if(f.type==="INITIAL_PUBLISH"){l=!0,o.tryRecordFocus(f.payload.critical.draggable.id),c(f),o.tryRestoreFocusRecorded();return}if(c(f),!!l){if(f.type==="FLUSH"){l=!1,o.tryRestoreFocusRecorded();return}if(f.type==="DROP_COMPLETE"){l=!1;var g=f.payload.completed.result;g.combine&&o.tryShiftRecord(g.draggableId,g.combine.draggableId),o.tryRestoreFocusRecorded()}}}}}},mn=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},rn=function(o){return function(l){return function(c){return function(f){if(mn(f)){o.stop(),c(f);return}if(f.type==="INITIAL_PUBLISH"){c(f);var g=l.getState();g.phase!=="DRAGGING"&&He(!1),o.start(g);return}c(f),o.scroll(l.getState())}}}},Tr=function(o){return function(l){return function(c){if(l(c),c.type==="PUBLISH_WHILE_DRAGGING"){var f=o.getState();f.phase==="DROP_PENDING"&&(f.isWaiting||o.dispatch(Aa({reason:f.reason})))}}}},ln=G.qC,vr=function(o){var l=o.dimensionMarshal,c=o.focusMarshal,f=o.styleMarshal,g=o.getResponders,b=o.announce,S=o.autoScroller;return(0,G.MT)(rt,ln((0,G.md)(Ai(f),Jn(l),Vr(l),Qe,ua,Lr,Tr,rn(S),st,$n(c),Cr(g,b))))},vn=function(){return{additions:{},removals:{},modified:{}}};function _n(o){var l=o.registry,c=o.callbacks,f=vn(),g=null,b=function(){g||(c.collectionStarting(),g=requestAnimationFrame(function(){g=null,tl();var L=f,$=L.additions,F=L.removals,q=L.modified,he=Object.keys($).map(function(vt){return l.draggable.getById(vt).getDimension(ka)}).sort(function(vt,zt){return vt.descriptor.index-zt.descriptor.index}),it=Object.keys(q).map(function(vt){var zt=l.droppable.getById(vt),ir=zt.callbacks.getScrollWhileDragging();return{droppableId:vt,scroll:ir}}),ht={additions:he,removals:Object.keys(F),modified:it};f=vn(),_(),c.publish(ht)}))},S=function(L){var $=L.descriptor.id;f.additions[$]=L,f.modified[L.descriptor.droppableId]=!0,f.removals[$]&&delete f.removals[$],b()},E=function(L){var $=L.descriptor;f.removals[$.id]=!0,f.modified[$.droppableId]=!0,f.additions[$.id]&&delete f.additions[$.id],b()},N=function(){g&&(cancelAnimationFrame(g),g=null,f=vn())};return{add:S,remove:E,stop:N}}var xa=function(o){var l=o.scrollHeight,c=o.scrollWidth,f=o.height,g=o.width,b=ti({x:c,y:l},{x:g,y:f}),S={x:Math.max(0,b.x),y:Math.max(0,b.y)};return S},$a=function(){var o=document.documentElement;return o||He(!1),o},Kr=function(){var o=$a(),l=xa({scrollHeight:o.scrollHeight,scrollWidth:o.scrollWidth,width:o.clientWidth,height:o.clientHeight});return l},$r=function(){var o=Ot(),l=Kr(),c=o.y,f=o.x,g=$a(),b=g.clientWidth,S=g.clientHeight,E=f+b,N=c+S,Z=wn({top:c,left:f,right:E,bottom:N}),L={frame:Z,scroll:{initial:o,current:o,max:l,diff:{value:ka,displacement:ka}}};return L},Da=function(o){var l=o.critical,c=o.scrollOptions,f=o.registry;tl();var g=$r(),b=g.scroll.current,S=l.droppable,E=f.droppable.getAllByType(S.type).map(function($){return $.callbacks.getDimensionAndWatchScroll(b,c)}),N=f.draggable.getAllByType(l.draggable.type).map(function($){return $.getDimension(b)}),Z={draggables:ho(N),droppables:Bo(E)};_();var L={dimensions:Z,critical:l,viewport:g};return L};function da(o,l,c){if(c.descriptor.id===l.id||c.descriptor.type!==l.type)return!1;var f=o.droppable.getById(c.descriptor.droppableId);return f.descriptor.mode==="virtual"}var Ra=function(o,l){var c=null,f=_n({callbacks:{publish:l.publishWhileDragging,collectionStarting:l.collectionStarting},registry:o}),g=function(q,he){o.droppable.exists(q)||He(!1),c&&l.updateDroppableIsEnabled({id:q,isEnabled:he})},b=function(q,he){c&&(o.droppable.exists(q)||He(!1),l.updateDroppableIsCombineEnabled({id:q,isCombineEnabled:he}))},S=function(q,he){c&&(o.droppable.exists(q)||He(!1),l.updateDroppableScroll({id:q,newScroll:he}))},E=function(q,he){c&&o.droppable.getById(q).callbacks.scroll(he)},N=function(){if(c){f.stop();var q=c.critical.droppable;o.droppable.getAllByType(q.type).forEach(function(he){return he.callbacks.dragStopped()}),c.unsubscribe(),c=null}},Z=function(q){c||He(!1);var he=c.critical.draggable;q.type==="ADDITION"&&da(o,he,q.value)&&f.add(q.value),q.type==="REMOVAL"&&da(o,he,q.value)&&f.remove(q.value)},L=function(q){c&&He(!1);var he=o.draggable.getById(q.draggableId),it=o.droppable.getById(he.descriptor.droppableId),ht={draggable:he.descriptor,droppable:it.descriptor},vt=o.subscribe(Z);return c={critical:ht,unsubscribe:vt},Da({critical:ht,registry:o,scrollOptions:q.scrollOptions})},$={updateDroppableIsEnabled:g,updateDroppableIsCombineEnabled:b,scrollDroppable:E,updateDroppableScroll:S,startPublishing:L,stopPublishing:N};return $},An=function(o,l){return o.phase==="IDLE"?!0:o.phase!=="DROP_ANIMATING"||o.completed.result.draggableId===l?!1:o.completed.result.reason==="DROP"},Dn=function(o){window.scrollBy(o.x,o.y)},Yn=U(function(o){return Qi(o).filter(function(l){return!(!l.isEnabled||!l.frame)})}),Xa=function(l,c){var f=Vi(Yn(c),function(g){return g.frame||He(!1),qi(g.frame.pageMarginBox)(l)});return f},La=function(o){var l=o.center,c=o.destination,f=o.droppables;if(c){var g=f[c];return g.frame?g:null}var b=Xa(l,f);return b},Ln={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(l){return Math.pow(l,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Na=function(o,l){var c=o[l.size]*Ln.startFromPercentage,f=o[l.size]*Ln.maxScrollAtPercentage,g={startScrollingFrom:c,maxScrollValueAt:f};return g},ai=function(o){var l=o.startOfRange,c=o.endOfRange,f=o.current,g=c-l;if(g===0)return 0;var b=f-l,S=b/g;return S},ui=1,Qn=function(o,l){if(o>l.startScrollingFrom)return 0;if(o<=l.maxScrollValueAt)return Ln.maxPixelScroll;if(o===l.startScrollingFrom)return ui;var c=ai({startOfRange:l.maxScrollValueAt,endOfRange:l.startScrollingFrom,current:o}),f=1-c,g=Ln.maxPixelScroll*Ln.ease(f);return Math.ceil(g)},bi=Ln.durationDampening.accelerateAt,Rr=Ln.durationDampening.stopDampeningAt,Oi=function(o,l){var c=l,f=Rr,g=Date.now(),b=g-c;if(b>=Rr)return o;if(b<bi)return ui;var S=ai({startOfRange:bi,endOfRange:f,current:b}),E=o*Ln.ease(S);return Math.ceil(E)},Ja=function(o){var l=o.distanceToEdge,c=o.thresholds,f=o.dragStartTime,g=o.shouldUseTimeDampening,b=Qn(l,c);return b===0?0:g?Math.max(Oi(b,f),ui):b},di=function(o){var l=o.container,c=o.distanceToEdges,f=o.dragStartTime,g=o.axis,b=o.shouldUseTimeDampening,S=Na(l,g),E=c[g.end]<c[g.start];return E?Ja({distanceToEdge:c[g.end],thresholds:S,dragStartTime:f,shouldUseTimeDampening:b}):-1*Ja({distanceToEdge:c[g.start],thresholds:S,dragStartTime:f,shouldUseTimeDampening:b})},fi=function(o){var l=o.container,c=o.subject,f=o.proposedScroll,g=c.height>l.height,b=c.width>l.width;return!b&&!g?f:b&&g?null:{x:b?0:f.x,y:g?0:f.y}},Ya=pa(function(o){return o===0?0:o}),hi=function(o){var l=o.dragStartTime,c=o.container,f=o.subject,g=o.center,b=o.shouldUseTimeDampening,S={top:g.y-c.top,right:c.right-g.x,bottom:c.bottom-g.y,left:g.x-c.left},E=di({container:c,distanceToEdges:S,dragStartTime:l,axis:qr,shouldUseTimeDampening:b}),N=di({container:c,distanceToEdges:S,dragStartTime:l,axis:Wt,shouldUseTimeDampening:b}),Z=Ya({x:N,y:E});if(fo(Z,ka))return null;var L=fi({container:c,subject:f,proposedScroll:Z});return L?fo(L,ka)?null:L:null},yi=pa(function(o){return o===0?0:o>0?1:-1}),Un=function(){var o=function(c,f){return c<0?c:c>f?c-f:0};return function(l){var c=l.current,f=l.max,g=l.change,b=Bn(c,g),S={x:o(b.x,f.x),y:o(b.y,f.y)};return fo(S,ka)?null:S}}(),Eo=function(l){var c=l.max,f=l.current,g=l.change,b={x:Math.max(f.x,c.x),y:Math.max(f.y,c.y)},S=yi(g),E=Un({max:b,current:f,change:S});return!E||S.x!==0&&E.x===0||S.y!==0&&E.y===0},Oa=function(l,c){return Eo({current:l.scroll.current,max:l.scroll.max,change:c})},Ia=function(l,c){if(!Oa(l,c))return null;var f=l.scroll.max,g=l.scroll.current;return Un({current:g,max:f,change:c})},pi=function(l,c){var f=l.frame;return f?Eo({current:f.scroll.current,max:f.scroll.max,change:c}):!1},Fa=function(l,c){var f=l.frame;return!f||!pi(l,c)?null:Un({current:f.scroll.current,max:f.scroll.max,change:c})},Uo=function(o){var l=o.viewport,c=o.subject,f=o.center,g=o.dragStartTime,b=o.shouldUseTimeDampening,S=hi({dragStartTime:g,container:l.frame,subject:c,center:f,shouldUseTimeDampening:b});return S&&Oa(l,S)?S:null},Ta=function(o){var l=o.droppable,c=o.subject,f=o.center,g=o.dragStartTime,b=o.shouldUseTimeDampening,S=l.frame;if(!S)return null;var E=hi({dragStartTime:g,container:S.pageMarginBox,subject:c,center:f,shouldUseTimeDampening:b});return E&&pi(l,E)?E:null},Xi=function(o){var l=o.state,c=o.dragStartTime,f=o.shouldUseTimeDampening,g=o.scrollWindow,b=o.scrollDroppable,S=l.current.page.borderBoxCenter,E=l.dimensions.draggables[l.critical.draggable.id],N=E.page.marginBox;if(l.isWindowScrollAllowed){var Z=l.viewport,L=Uo({dragStartTime:c,viewport:Z,subject:N,center:S,shouldUseTimeDampening:f});if(L){g(L);return}}var $=La({center:S,destination:to(l.impact),droppables:l.dimensions.droppables});if($){var F=Ta({dragStartTime:c,droppable:$,subject:N,center:S,shouldUseTimeDampening:f});F&&b($.descriptor.id,F)}},xi=function(o){var l=o.scrollWindow,c=o.scrollDroppable,f=Se(l),g=Se(c),b=null,S=function(L){b||He(!1);var $=b,F=$.shouldUseTimeDampening,q=$.dragStartTime;Xi({state:L,scrollWindow:f,scrollDroppable:g,dragStartTime:q,shouldUseTimeDampening:F})},E=function(L){tl(),b&&He(!1);var $=Date.now(),F=!1,q=function(){F=!0};Xi({state:L,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:q,scrollDroppable:q}),b={dragStartTime:$,shouldUseTimeDampening:F},_(),F&&S(L)},N=function(){b&&(f.cancel(),g.cancel(),b=null)};return{start:E,stop:N,scroll:S}},jn=function(o){var l=o.move,c=o.scrollDroppable,f=o.scrollWindow,g=function(Z,L){var $=Bn(Z.current.client.selection,L);l({client:$})},b=function(Z,L){if(!pi(Z,L))return L;var $=Fa(Z,L);if(!$)return c(Z.descriptor.id,L),null;var F=ti(L,$);c(Z.descriptor.id,F);var q=ti(L,F);return q},S=function(Z,L,$){if(!Z||!Oa(L,$))return $;var F=Ia(L,$);if(!F)return f($),null;var q=ti($,F);f(q);var he=ti($,q);return he},E=function(Z){var L=Z.scrollJumpRequest;if(L){var $=to(Z.impact);$||He(!1);var F=b(Z.dimensions.droppables[$],L);if(F){var q=Z.viewport,he=S(Z.isWindowScrollAllowed,q,F);he&&g(Z,he)}}};return E},nt=function(o){var l=o.scrollDroppable,c=o.scrollWindow,f=o.move,g=xi({scrollWindow:c,scrollDroppable:l}),b=jn({move:f,scrollWindow:c,scrollDroppable:l}),S=function(Z){if(Z.phase==="DRAGGING"){if(Z.movementMode==="FLUID"){g.scroll(Z);return}Z.scrollJumpRequest&&b(Z)}},E={scroll:S,start:g.start,stop:g.stop};return E},In="data-rbd",wa=function(){var o=In+"-drag-handle";return{base:o,draggableId:o+"-draggable-id",contextId:o+"-context-id"}}(),ro=function(){var o=In+"-draggable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),fa=function(){var o=In+"-droppable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),Ua={contextId:In+"-scroll-container-context-id"},sa=function(l){return function(c){return"["+c+'="'+l+'"]'}},zn=function(l,c){return l.map(function(f){var g=f.styles[c];return g?f.selector+" { "+g+" }":""}).join(" ")},Sa="pointer-events: none;",Ji=function(o){var l=sa(o),c=function(){var E=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:l(wa.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:E,dragging:Sa,dropAnimating:E}}}(),f=function(){var E=`
|
|
|
transition: `+ci.outOfTheWay+`;
|
|
|
`;return{selector:l(ro.contextId),styles:{dragging:E,dropAnimating:E,userCancel:E}}}(),g={selector:l(fa.contextId),styles:{always:"overflow-anchor: none;"}},b={selector:"body",styles:{dragging:`
|
|
|
cursor: grabbing;
|
|
|
cursor: -webkit-grabbing;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
overflow-anchor: none;
|
|
|
`}},S=[f,c,g,b];return{always:zn(S,"always"),resting:zn(S,"resting"),dragging:zn(S,"dragging"),dropAnimating:zn(S,"dropAnimating"),userCancel:zn(S,"userCancel")}},Ht=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?x.useLayoutEffect:x.useEffect,Hr=function(){var l=document.querySelector("head");return l||He(!1),l},Rn=function(l){var c=document.createElement("style");return l&&c.setAttribute("nonce",l),c.type="text/css",c};function Di(o,l){var c=_r(function(){return Ji(o)},[o]),f=(0,x.useRef)(null),g=(0,x.useRef)(null),b=Bt(U(function($){var F=g.current;F||He(!1),F.textContent=$}),[]),S=Bt(function($){var F=f.current;F||He(!1),F.textContent=$},[]);Ht(function(){!f.current&&!g.current||He(!1);var $=Rn(l),F=Rn(l);return f.current=$,g.current=F,$.setAttribute(In+"-always",o),F.setAttribute(In+"-dynamic",o),Hr().appendChild($),Hr().appendChild(F),S(c.always),b(c.resting),function(){var q=function(it){var ht=it.current;ht||He(!1),Hr().removeChild(ht),it.current=null};q(f),q(g)}},[l,S,b,c.always,c.resting,o]);var E=Bt(function(){return b(c.dragging)},[b,c.dragging]),N=Bt(function($){if($==="DROP"){b(c.dropAnimating);return}b(c.userCancel)},[b,c.dropAnimating,c.userCancel]),Z=Bt(function(){g.current&&b(c.resting)},[b,c.resting]),L=_r(function(){return{dragging:E,dropping:N,resting:Z}},[E,N,Z]);return L}var za=function(o){return o&&o.ownerDocument?o.ownerDocument.defaultView:window};function cs(o){return o instanceof za(o).HTMLElement}function Ts(o,l){var c="["+wa.contextId+'="'+o+'"]',f=Wo(document.querySelectorAll(c));if(!f.length)return null;var g=Vi(f,function(b){return b.getAttribute(wa.draggableId)===l});return!g||!cs(g)?null:g}function jo(o){var l=(0,x.useRef)({}),c=(0,x.useRef)(null),f=(0,x.useRef)(null),g=(0,x.useRef)(!1),b=Bt(function(F,q){var he={id:F,focus:q};return l.current[F]=he,function(){var ht=l.current,vt=ht[F];vt!==he&&delete ht[F]}},[]),S=Bt(function(F){var q=Ts(o,F);q&&q!==document.activeElement&&q.focus()},[o]),E=Bt(function(F,q){c.current===F&&(c.current=q)},[]),N=Bt(function(){f.current||g.current&&(f.current=requestAnimationFrame(function(){f.current=null;var F=c.current;F&&S(F)}))},[S]),Z=Bt(function(F){c.current=null;var q=document.activeElement;q&&q.getAttribute(wa.draggableId)===F&&(c.current=F)},[]);Ht(function(){return g.current=!0,function(){g.current=!1;var F=f.current;F&&cancelAnimationFrame(F)}},[]);var L=_r(function(){return{register:b,tryRecordFocus:Z,tryRestoreFocusRecorded:N,tryShiftRecord:E}},[b,Z,N,E]);return L}function ys(){var o={draggables:{},droppables:{}},l=[];function c($){return l.push($),function(){var q=l.indexOf($);q!==-1&&l.splice(q,1)}}function f($){l.length&&l.forEach(function(F){return F($)})}function g($){return o.draggables[$]||null}function b($){var F=g($);return F||He(!1),F}var S={register:function(F){o.draggables[F.descriptor.id]=F,f({type:"ADDITION",value:F})},update:function(F,q){var he=o.draggables[q.descriptor.id];he&&he.uniqueId===F.uniqueId&&(delete o.draggables[q.descriptor.id],o.draggables[F.descriptor.id]=F)},unregister:function(F){var q=F.descriptor.id,he=g(q);he&&F.uniqueId===he.uniqueId&&(delete o.draggables[q],f({type:"REMOVAL",value:F}))},getById:b,findById:g,exists:function(F){return!!g(F)},getAllByType:function(F){return Ho(o.draggables).filter(function(q){return q.descriptor.type===F})}};function E($){return o.droppables[$]||null}function N($){var F=E($);return F||He(!1),F}var Z={register:function(F){o.droppables[F.descriptor.id]=F},unregister:function(F){var q=E(F.descriptor.id);q&&F.uniqueId===q.uniqueId&&delete o.droppables[F.descriptor.id]},getById:N,findById:E,exists:function(F){return!!E(F)},getAllByType:function(F){return Ho(o.droppables).filter(function(q){return q.descriptor.type===F})}};function L(){o.draggables={},o.droppables={},l.length=0}return{draggable:S,droppable:Z,subscribe:c,clean:L}}function Li(){var o=_r(ys,[]);return(0,x.useEffect)(function(){return function(){requestAnimationFrame(o.clean)}},[o]),o}var Fi=x.createContext(null),no=function(){var o=document.body;return o||He(!1),o},Ii={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},$o=function(l){return"rbd-announcement-"+l};function Go(o){var l=_r(function(){return $o(o)},[o]),c=(0,x.useRef)(null);(0,x.useEffect)(function(){var b=document.createElement("div");return c.current=b,b.id=l,b.setAttribute("aria-live","assertive"),b.setAttribute("aria-atomic","true"),(0,ce.Z)(b.style,Ii),no().appendChild(b),function(){setTimeout(function(){var N=no();N.contains(b)&&N.removeChild(b),b===c.current&&(c.current=null)})}},[l]);var f=Bt(function(g){var b=c.current;if(b){b.textContent=g;return}},[]);return f}var us=0,Ro={separator:"::"};function xs(){us=0}function Zs(o,l){return l===void 0&&(l=Ro),_r(function(){return""+o+l.separator+us++},[l.separator,o])}function zi(o){var l=o.contextId,c=o.uniqueId;return"rbd-hidden-text-"+l+"-"+c}function rl(o){var l=o.contextId,c=o.text,f=Zs("hidden-text",{separator:"-"}),g=_r(function(){return zi({contextId:l,uniqueId:f})},[f,l]);return(0,x.useEffect)(function(){var S=document.createElement("div");return S.id=g,S.textContent=c,S.style.display="none",no().appendChild(S),function(){var N=no();N.contains(S)&&N.removeChild(S)}},[g,c]),g}var rr=x.createContext(null),Jr={react:"^16.8.5","react-dom":"^16.8.5"},ha=/(\d+)\.(\d+)\.(\d+)/,Xt=function(l){var c=ha.exec(l);c==null&&He(!1);var f=Number(c[1]),g=Number(c[2]),b=Number(c[3]);return{major:f,minor:g,patch:b,raw:l}},Er=function(l,c){return c.major>l.major?!0:c.major<l.major?!1:c.minor>l.minor?!0:c.minor<l.minor?!1:c.patch>=l.patch},ts=function(o,l){var c=Xt(o),f=Xt(l);Er(c,f)},Bs=`
|
|
|
We expect a html5 doctype: <!doctype html>
|
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
|
`,ao=function(o){var l=o.doctype;l&&(l.name.toLowerCase(),l.publicId)};function ws(o){}function wi(o,l){}function fl(){wi(function(){ts(Jr.react,x.version),ao(document)},[])}function hl(o){var l=(0,x.useRef)(o);return(0,x.useEffect)(function(){l.current=o}),l}function $l(){var o=null;function l(){return!!o}function c(S){return S===o}function f(S){o&&He(!1);var E={abandon:S};return o=E,E}function g(){o||He(!1),o=null}function b(){o&&(o.abandon(),g())}return{isClaimed:l,isActive:c,claim:f,release:g,tryAbandon:b}}var Ss=9,pl=13,ds=27,Je=32,Rl=33,Nl=34,ja=35,Gn=36,Qa=37,No=38,qo=39,_a=40,Vs,Jl=(Vs={},Vs[pl]=!0,Vs[Ss]=!0,Vs),Ol=function(o){Jl[o.keyCode]&&o.preventDefault()},Cl=function(){var o="visibilitychange";if(typeof document=="undefined")return o;var l=[o,"ms"+o,"webkit"+o,"moz"+o,"o"+o],c=Vi(l,function(f){return"on"+f in document});return c||o}(),ko=0,ml=5;function io(o,l){return Math.abs(l.x-o.x)>=ml||Math.abs(l.y-o.y)>=ml}var _s={type:"IDLE"};function oo(o){var l=o.cancel,c=o.completed,f=o.getPhase,g=o.setPhase;return[{eventName:"mousemove",fn:function(S){var E=S.button,N=S.clientX,Z=S.clientY;if(E===ko){var L={x:N,y:Z},$=f();if($.type==="DRAGGING"){S.preventDefault(),$.actions.move(L);return}$.type!=="PENDING"&&He(!1);var F=$.point;if(io(F,L)){S.preventDefault();var q=$.actions.fluidLift(L);g({type:"DRAGGING",actions:q})}}}},{eventName:"mouseup",fn:function(S){var E=f();if(E.type!=="DRAGGING"){l();return}S.preventDefault(),E.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"mousedown",fn:function(S){f().type==="DRAGGING"&&S.preventDefault(),l()}},{eventName:"keydown",fn:function(S){var E=f();if(E.type==="PENDING"){l();return}if(S.keyCode===ds){S.preventDefault(),l();return}Ol(S)}},{eventName:"resize",fn:l},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){f().type==="PENDING"&&l()}},{eventName:"webkitmouseforcedown",fn:function(S){var E=f();if(E.type==="IDLE"&&He(!1),E.actions.shouldRespectForcePress()){l();return}S.preventDefault()}},{eventName:Cl,fn:l}]}function Ps(o){var l=(0,x.useRef)(_s),c=(0,x.useRef)(pn),f=_r(function(){return{eventName:"mousedown",fn:function($){if(!$.defaultPrevented&&$.button===ko&&!($.ctrlKey||$.metaKey||$.shiftKey||$.altKey)){var F=o.findClosestDraggableId($);if(F){var q=o.tryGetLock(F,S,{sourceEvent:$});if(q){$.preventDefault();var he={x:$.clientX,y:$.clientY};c.current(),Z(q,he)}}}}}},[o]),g=_r(function(){return{eventName:"webkitmouseforcewillbegin",fn:function($){if(!$.defaultPrevented){var F=o.findClosestDraggableId($);if(F){var q=o.findOptionsForDraggable(F);q&&(q.shouldRespectForcePress||o.canGetLock(F)&&$.preventDefault())}}}}},[o]),b=Bt(function(){var $={passive:!1,capture:!0};c.current=Hn(window,[g,f],$)},[g,f]),S=Bt(function(){var L=l.current;L.type!=="IDLE"&&(l.current=_s,c.current(),b())},[b]),E=Bt(function(){var L=l.current;S(),L.type==="DRAGGING"&&L.actions.cancel({shouldBlockNextClick:!0}),L.type==="PENDING"&&L.actions.abort()},[S]),N=Bt(function(){var $={capture:!0,passive:!1},F=oo({cancel:E,completed:S,getPhase:function(){return l.current},setPhase:function(he){l.current=he}});c.current=Hn(window,F,$)},[E,S]),Z=Bt(function($,F){l.current.type!=="IDLE"&&He(!1),l.current={type:"PENDING",point:F,actions:$},N()},[N]);Ht(function(){return b(),function(){c.current()}},[b])}var Ms;function Cs(){}var _c=(Ms={},Ms[Nl]=!0,Ms[Rl]=!0,Ms[Gn]=!0,Ms[ja]=!0,Ms);function Rc(o,l){function c(){l(),o.cancel()}function f(){l(),o.drop()}return[{eventName:"keydown",fn:function(b){if(b.keyCode===ds){b.preventDefault(),c();return}if(b.keyCode===Je){b.preventDefault(),f();return}if(b.keyCode===_a){b.preventDefault(),o.moveDown();return}if(b.keyCode===No){b.preventDefault(),o.moveUp();return}if(b.keyCode===qo){b.preventDefault(),o.moveRight();return}if(b.keyCode===Qa){b.preventDefault(),o.moveLeft();return}if(_c[b.keyCode]){b.preventDefault();return}Ol(b)}},{eventName:"mousedown",fn:c},{eventName:"mouseup",fn:c},{eventName:"click",fn:c},{eventName:"touchstart",fn:c},{eventName:"resize",fn:c},{eventName:"wheel",fn:c,options:{passive:!0}},{eventName:Cl,fn:c}]}function Mc(o){var l=(0,x.useRef)(Cs),c=_r(function(){return{eventName:"keydown",fn:function(b){if(b.defaultPrevented||b.keyCode!==Je)return;var S=o.findClosestDraggableId(b);if(!S)return;var E=o.tryGetLock(S,L,{sourceEvent:b});if(!E)return;b.preventDefault();var N=!0,Z=E.snapLift();l.current();function L(){N||He(!1),N=!1,l.current(),f()}l.current=Hn(window,Rc(Z,L),{capture:!0,passive:!1})}}},[o]),f=Bt(function(){var b={passive:!1,capture:!0};l.current=Hn(window,[c],b)},[c]);Ht(function(){return f(),function(){l.current()}},[f])}var Cc={type:"IDLE"},go=120,ar=.15;function Mn(o){var l=o.cancel,c=o.getPhase;return[{eventName:"orientationchange",fn:l},{eventName:"resize",fn:l},{eventName:"contextmenu",fn:function(g){g.preventDefault()}},{eventName:"keydown",fn:function(g){if(c().type!=="DRAGGING"){l();return}g.keyCode===ds&&g.preventDefault(),l()}},{eventName:Cl,fn:l}]}function Ki(o){var l=o.cancel,c=o.completed,f=o.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(b){var S=f();if(S.type!=="DRAGGING"){l();return}S.hasMoved=!0;var E=b.touches[0],N=E.clientX,Z=E.clientY,L={x:N,y:Z};b.preventDefault(),S.actions.move(L)}},{eventName:"touchend",fn:function(b){var S=f();if(S.type!=="DRAGGING"){l();return}b.preventDefault(),S.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"touchcancel",fn:function(b){if(f().type!=="DRAGGING"){l();return}b.preventDefault(),l()}},{eventName:"touchforcechange",fn:function(b){var S=f();S.type==="IDLE"&&He(!1);var E=b.touches[0];if(E){var N=E.force>=ar;if(N){var Z=S.actions.shouldRespectForcePress();if(S.type==="PENDING"){Z&&l();return}if(Z){if(S.hasMoved){b.preventDefault();return}l();return}b.preventDefault()}}}},{eventName:Cl,fn:l}]}function so(o){var l=(0,x.useRef)(Cc),c=(0,x.useRef)(pn),f=Bt(function(){return l.current},[]),g=Bt(function(q){l.current=q},[]),b=_r(function(){return{eventName:"touchstart",fn:function(q){if(!q.defaultPrevented){var he=o.findClosestDraggableId(q);if(he){var it=o.tryGetLock(he,E,{sourceEvent:q});if(it){var ht=q.touches[0],vt=ht.clientX,zt=ht.clientY,ir={x:vt,y:zt};c.current(),$(it,ir)}}}}}},[o]),S=Bt(function(){var q={capture:!0,passive:!1};c.current=Hn(window,[b],q)},[b]),E=Bt(function(){var F=l.current;F.type!=="IDLE"&&(F.type==="PENDING"&&clearTimeout(F.longPressTimerId),g(Cc),c.current(),S())},[S,g]),N=Bt(function(){var F=l.current;E(),F.type==="DRAGGING"&&F.actions.cancel({shouldBlockNextClick:!0}),F.type==="PENDING"&&F.actions.abort()},[E]),Z=Bt(function(){var q={capture:!0,passive:!1},he={cancel:N,completed:E,getPhase:f},it=Hn(window,Ki(he),q),ht=Hn(window,Mn(he),q);c.current=function(){it(),ht()}},[N,f,E]),L=Bt(function(){var q=f();q.type!=="PENDING"&&He(!1);var he=q.actions.fluidLift(q.point);g({type:"DRAGGING",actions:he,hasMoved:!1})},[f,g]),$=Bt(function(q,he){f().type!=="IDLE"&&He(!1);var it=setTimeout(L,go);g({type:"PENDING",point:he,actions:q,longPressTimerId:it}),Z()},[Z,f,g,L]);Ht(function(){return S(),function(){c.current();var he=f();he.type==="PENDING"&&(clearTimeout(he.longPressTimerId),g(Cc))}},[f,S,g]),Ht(function(){var q=Hn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return q},[])}function yr(o){}var El={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function vl(o,l){if(l==null)return!1;var c=!!El[l.tagName.toLowerCase()];if(c)return!0;var f=l.getAttribute("contenteditable");return f==="true"||f===""?!0:l===o?!1:vl(o,l.parentElement)}function Ec(o,l){var c=l.target;return cs(c)?vl(o,c):!1}var De=function(o){return wn(o.getBoundingClientRect()).center};function Mf(o){return o instanceof za(o).Element}var Cf=function(){var o="matches";if(typeof document=="undefined")return o;var l=[o,"msMatchesSelector","webkitMatchesSelector"],c=Vi(l,function(f){return f in Element.prototype});return c||o}();function uu(o,l){return o==null?null:o[Cf](l)?o:uu(o.parentElement,l)}function Ef(o,l){return o.closest?o.closest(l):uu(o,l)}function Vc(o){return"["+wa.contextId+'="'+o+'"]'}function kf(o,l){var c=l.target;if(!Mf(c))return null;var f=Vc(o),g=Ef(c,f);return!g||!cs(g)?null:g}function Af(o,l){var c=kf(o,l);return c?c.getAttribute(wa.draggableId):null}function fs(o,l){var c="["+ro.contextId+'="'+o+'"]',f=Wo(document.querySelectorAll(c)),g=Vi(f,function(b){return b.getAttribute(ro.id)===l});return!g||!cs(g)?null:g}function nc(o){o.preventDefault()}function kc(o){var l=o.expected,c=o.phase,f=o.isLockActive,g=o.shouldWarn;return!(!f()||l!==c)}function Uc(o){var l=o.lockAPI,c=o.store,f=o.registry,g=o.draggableId;if(l.isClaimed())return!1;var b=f.draggable.findById(g);return!(!b||!b.options.isEnabled||!An(c.getState(),g))}function Df(o){var l=o.lockAPI,c=o.contextId,f=o.store,g=o.registry,b=o.draggableId,S=o.forceSensorStop,E=o.sourceEvent,N=Uc({lockAPI:l,store:f,registry:g,draggableId:b});if(!N)return null;var Z=g.draggable.getById(b),L=fs(c,Z.descriptor.id);if(!L||E&&!Z.options.canDragInteractiveElements&&Ec(L,E))return null;var $=l.claim(S||pn),F="PRE_DRAG";function q(){return Z.options.shouldRespectForcePress}function he(){return l.isActive($)}function it(hr,yn){kc({expected:hr,phase:F,isLockActive:he,shouldWarn:!0})&&f.dispatch(yn())}var ht=it.bind(null,"DRAGGING");function vt(hr){function yn(){l.release(),F="COMPLETED"}F!=="PRE_DRAG"&&(yn(),F!=="PRE_DRAG"&&He(!1)),f.dispatch(dt(hr.liftActionArgs)),F="DRAGGING";function Hi(xn,Ma){if(Ma===void 0&&(Ma={shouldBlockNextClick:!1}),hr.cleanup(),Ma.shouldBlockNextClick){var rs=Hn(window,[{eventName:"click",fn:nc,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(rs)}yn(),f.dispatch(Aa({reason:xn}))}return(0,ce.Z)({isActive:function(){return kc({expected:"DRAGGING",phase:F,isLockActive:he,shouldWarn:!1})},shouldRespectForcePress:q,drop:function(Ma){return Hi("DROP",Ma)},cancel:function(Ma){return Hi("CANCEL",Ma)}},hr.actions)}function zt(hr){var yn=Se(function(xn){ht(function(){return Zr({client:xn})})}),Hi=vt({liftActionArgs:{id:b,clientSelection:hr,movementMode:"FLUID"},cleanup:function(){return yn.cancel()},actions:{move:yn}});return(0,ce.Z)({},Hi,{move:yn})}function ir(){var hr={moveUp:function(){return ht(ba)},moveRight:function(){return ht(ya)},moveDown:function(){return ht(ia)},moveLeft:function(){return ht(Va)}};return vt({liftActionArgs:{id:b,clientSelection:De(L),movementMode:"SNAP"},cleanup:pn,actions:hr})}function dr(){var hr=kc({expected:"PRE_DRAG",phase:F,isLockActive:he,shouldWarn:!0});hr&&l.release()}var Wr={isActive:function(){return kc({expected:"PRE_DRAG",phase:F,isLockActive:he,shouldWarn:!1})},shouldRespectForcePress:q,fluidLift:zt,snapLift:ir,abort:dr};return Wr}var Lf=[Ps,Mc,so];function Wu(o){var l=o.contextId,c=o.store,f=o.registry,g=o.customSensors,b=o.enableDefaultSensors,S=[].concat(b?Lf:[],g||[]),E=(0,x.useState)(function(){return $l()})[0],N=Bt(function(zt,ir){zt.isDragging&&!ir.isDragging&&E.tryAbandon()},[E]);Ht(function(){var zt=c.getState(),ir=c.subscribe(function(){var dr=c.getState();N(zt,dr),zt=dr});return ir},[E,c,N]),Ht(function(){return E.tryAbandon},[E.tryAbandon]);var Z=Bt(function(vt){return Uc({lockAPI:E,registry:f,store:c,draggableId:vt})},[E,f,c]),L=Bt(function(vt,zt,ir){return Df({lockAPI:E,registry:f,contextId:l,store:c,draggableId:vt,forceSensorStop:zt,sourceEvent:ir&&ir.sourceEvent?ir.sourceEvent:null})},[l,E,f,c]),$=Bt(function(vt){return Af(l,vt)},[l]),F=Bt(function(vt){var zt=f.draggable.findById(vt);return zt?zt.options:null},[f.draggable]),q=Bt(function(){E.isClaimed()&&(E.tryAbandon(),c.getState().phase!=="IDLE"&&c.dispatch(on()))},[E,c]),he=Bt(E.isClaimed,[E]),it=_r(function(){return{canGetLock:Z,tryGetLock:L,findClosestDraggableId:$,findOptionsForDraggable:F,tryReleaseLock:q,isLockClaimed:he}},[Z,L,$,F,q,he]);yr(S);for(var ht=0;ht<S.length;ht++)S[ht](it)}var bd=function(l){return{onBeforeCapture:l.onBeforeCapture,onBeforeDragStart:l.onBeforeDragStart,onDragStart:l.onDragStart,onDragEnd:l.onDragEnd,onDragUpdate:l.onDragUpdate}};function ac(o){return o.current||He(!1),o.current}function $s(o){var l=o.contextId,c=o.setCallbacks,f=o.sensors,g=o.nonce,b=o.dragHandleUsageInstructions,S=(0,x.useRef)(null);fl();var E=hl(o),N=Bt(function(){return bd(E.current)},[E]),Z=Go(l),L=rl({contextId:l,text:b}),$=Di(l,g),F=Bt(function(xn){ac(S).dispatch(xn)},[]),q=_r(function(){return(0,G.DE)({publishWhileDragging:qt,updateDroppableScroll:fn,updateDroppableIsEnabled:zr,updateDroppableIsCombineEnabled:Sn,collectionStarting:Zt},F)},[F]),he=Li(),it=_r(function(){return Ra(he,q)},[he,q]),ht=_r(function(){return nt((0,ce.Z)({scrollWindow:Dn,scrollDroppable:it.scrollDroppable},(0,G.DE)({move:Zr},F)))},[it.scrollDroppable,F]),vt=jo(l),zt=_r(function(){return vr({announce:Z,autoScroller:ht,dimensionMarshal:it,focusMarshal:vt,getResponders:N,styleMarshal:$})},[Z,ht,it,vt,N,$]);S.current=zt;var ir=Bt(function(){var xn=ac(S),Ma=xn.getState();Ma.phase!=="IDLE"&&xn.dispatch(on())},[]),dr=Bt(function(){var xn=ac(S).getState();return xn.isDragging||xn.phase==="DROP_ANIMATING"},[]),Wr=_r(function(){return{isDragging:dr,tryAbort:ir}},[dr,ir]);c(Wr);var hr=Bt(function(xn){return An(ac(S).getState(),xn)},[]),yn=Bt(function(){return gi(ac(S).getState())},[]),Hi=_r(function(){return{marshal:it,focus:vt,contextId:l,canLift:hr,isMovementAllowed:yn,dragHandleUsageInstructionsId:L,registry:he}},[l,it,L,vt,hr,yn,he]);return Wu({contextId:l,store:zt,registry:he,customSensors:f,enableDefaultSensors:o.enableDefaultSensors!==!1}),(0,x.useEffect)(function(){return ir},[ir]),x.createElement(rr.Provider,{value:Hi},x.createElement(H,{context:Fi,store:zt},o.children))}var ic=0;function yd(){ic=0}function xd(){return _r(function(){return""+ic++},[])}function wd(){yd(),xs()}function If(o){var l=xd(),c=o.dragHandleUsageInstructions||Xo.dragHandleUsageInstructions;return x.createElement(Zi,null,function(f){return x.createElement($s,{nonce:o.nonce,contextId:l,setCallbacks:f,dragHandleUsageInstructions:c,enableDefaultSensors:o.enableDefaultSensors,sensors:o.sensors,onBeforeCapture:o.onBeforeCapture,onBeforeDragStart:o.onBeforeDragStart,onDragStart:o.onDragStart,onDragUpdate:o.onDragUpdate,onDragEnd:o.onDragEnd},o.children)})}var Zu=function(l){return function(c){return l===c}},Tf=Zu("scroll"),Bf=Zu("auto"),Sd=Zu("visible"),ii=function(l,c){return c(l.overflowX)||c(l.overflowY)},Pf=function(l,c){return c(l.overflowX)&&c(l.overflowY)},_d=function(l){var c=window.getComputedStyle(l),f={overflowX:c.overflowX,overflowY:c.overflowY};return ii(f,Tf)||ii(f,Bf)},Ac=function(){return!1;var l,c,f,g},Md=function o(l){return l==null?null:l===document.body?Ac()?l:null:l===document.documentElement?null:_d(l)?l:o(l.parentElement)},du=function(o){if(o)var l=Md(o.parentElement)},Vu=function(o){return{x:o.scrollLeft,y:o.scrollTop}},Cd=function o(l){if(!l)return!1;var c=window.getComputedStyle(l);return c.position==="fixed"?!0:o(l.parentElement)},Ed=function(o){var l=Md(o),c=Cd(o);return{closestScrollable:l,isFixedOnPage:c}},jc=function(o){var l=o.descriptor,c=o.isEnabled,f=o.isCombineEnabled,g=o.isFixedOnPage,b=o.direction,S=o.client,E=o.page,N=o.closest,Z=function(){if(!N)return null;var q=N.scrollSize,he=N.client,it=xa({scrollHeight:q.scrollHeight,scrollWidth:q.scrollWidth,height:he.paddingBox.height,width:he.paddingBox.width});return{pageMarginBox:N.page.marginBox,frameClient:he,scrollSize:q,shouldClipSubject:N.shouldClipSubject,scroll:{initial:N.scroll,current:N.scroll,max:it,diff:{value:ka,displacement:ka}}}}(),L=b==="vertical"?qr:Wt,$=Yo({page:E,withPlaceholder:null,axis:L,frame:Z}),F={descriptor:l,isCombineEnabled:f,isFixedOnPage:g,axis:L,isEnabled:c,client:S,page:E,frame:Z,subject:$};return F},$f=function(l,c){var f=ms(l);if(!c||l!==c)return f;var g=f.paddingBox.top-c.scrollTop,b=f.paddingBox.left-c.scrollLeft,S=g+c.scrollHeight,E=b+c.scrollWidth,N={top:g,right:E,bottom:S,left:b},Z=$i(N,f.border),L=co({borderBox:Z,margin:f.margin,border:f.border,padding:f.padding});return L},kd=function(o){var l=o.ref,c=o.descriptor,f=o.env,g=o.windowScroll,b=o.direction,S=o.isDropDisabled,E=o.isCombineEnabled,N=o.shouldClipSubject,Z=f.closestScrollable,L=$f(l,Z),$=Ha(L,g),F=function(){if(!Z)return null;var he=ms(Z),it={scrollHeight:Z.scrollHeight,scrollWidth:Z.scrollWidth};return{client:he,page:Ha(he,g),scroll:Vu(Z),scrollSize:it,shouldClipSubject:N}}(),q=jc({descriptor:c,isEnabled:!S,isCombineEnabled:E,isFixedOnPage:f.isFixedOnPage,direction:b,client:L,page:$,closest:F});return q},Uu={passive:!1},Ad={passive:!0},Dd=function(o){return o.shouldPublishImmediately?Uu:Ad};function fu(o){var l=(0,x.useContext)(o);return l||He(!1),l}var hu=function(l){return l&&l.env.closestScrollable||null};function Rf(o){var l=(0,x.useRef)(null),c=fu(rr),f=Zs("droppable"),g=c.registry,b=c.marshal,S=hl(o),E=_r(function(){return{id:o.droppableId,type:o.type,mode:o.mode}},[o.droppableId,o.mode,o.type]),N=(0,x.useRef)(E),Z=_r(function(){return U(function(dr,Wr){l.current||He(!1);var hr={x:dr,y:Wr};b.updateDroppableScroll(E.id,hr)})},[E.id,b]),L=Bt(function(){var dr=l.current;return!dr||!dr.env.closestScrollable?ka:Vu(dr.env.closestScrollable)},[]),$=Bt(function(){var dr=L();Z(dr.x,dr.y)},[L,Z]),F=_r(function(){return Se($)},[$]),q=Bt(function(){var dr=l.current,Wr=hu(dr);dr&&Wr||He(!1);var hr=dr.scrollOptions;if(hr.shouldPublishImmediately){$();return}F()},[F,$]),he=Bt(function(dr,Wr){l.current&&He(!1);var hr=S.current,yn=hr.getDroppableRef();yn||He(!1);var Hi=Ed(yn),xn={ref:yn,descriptor:E,env:Hi,scrollOptions:Wr};l.current=xn;var Ma=kd({ref:yn,descriptor:E,env:Hi,windowScroll:dr,direction:hr.direction,isDropDisabled:hr.isDropDisabled,isCombineEnabled:hr.isCombineEnabled,shouldClipSubject:!hr.ignoreContainerClipping}),rs=Hi.closestScrollable;return rs&&(rs.setAttribute(Ua.contextId,c.contextId),rs.addEventListener("scroll",q,Dd(xn.scrollOptions))),Ma},[c.contextId,E,q,S]),it=Bt(function(){var dr=l.current,Wr=hu(dr);return dr&&Wr||He(!1),Vu(Wr)},[]),ht=Bt(function(){var dr=l.current;dr||He(!1);var Wr=hu(dr);l.current=null,Wr&&(F.cancel(),Wr.removeAttribute(Ua.contextId),Wr.removeEventListener("scroll",q,Dd(dr.scrollOptions)))},[q,F]),vt=Bt(function(dr){var Wr=l.current;Wr||He(!1);var hr=hu(Wr);hr||He(!1),hr.scrollTop+=dr.y,hr.scrollLeft+=dr.x},[]),zt=_r(function(){return{getDimensionAndWatchScroll:he,getScrollWhileDragging:it,dragStopped:ht,scroll:vt}},[ht,he,it,vt]),ir=_r(function(){return{uniqueId:f,descriptor:E,callbacks:zt}},[zt,E,f]);Ht(function(){return N.current=ir.descriptor,g.droppable.register(ir),function(){l.current&&ht(),g.droppable.unregister(ir)}},[zt,E,ht,ir,b,g.droppable]),Ht(function(){l.current&&b.updateDroppableIsEnabled(N.current.id,!o.isDropDisabled)},[o.isDropDisabled,b]),Ht(function(){l.current&&b.updateDroppableIsCombineEnabled(N.current.id,o.isCombineEnabled)},[o.isCombineEnabled,b])}function ju(){}var Ld={width:0,height:0,margin:Nn},Nf=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,g=l.animate;return c||g==="close"?Ld:{height:f.client.borderBox.height,width:f.client.borderBox.width,margin:f.client.margin}},Of=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,g=l.animate,b=Nf({isAnimatingOpenOnMount:c,placeholder:f,animate:g});return{display:f.display,boxSizing:"border-box",width:b.width,height:b.height,marginTop:b.margin.top,marginRight:b.margin.right,marginBottom:b.margin.bottom,marginLeft:b.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:g!=="none"?ci.placeholder:null}};function oc(o){var l=(0,x.useRef)(null),c=Bt(function(){l.current&&(clearTimeout(l.current),l.current=null)},[]),f=o.animate,g=o.onTransitionEnd,b=o.onClose,S=o.contextId,E=(0,x.useState)(o.animate==="open"),N=E[0],Z=E[1];(0,x.useEffect)(function(){return N?f!=="open"?(c(),Z(!1),ju):l.current?ju:(l.current=setTimeout(function(){l.current=null,Z(!1)}),c):ju},[f,N,c]);var L=Bt(function(F){F.propertyName==="height"&&(g(),f==="close"&&b())},[f,b,g]),$=Of({isAnimatingOpenOnMount:N,animate:o.animate,placeholder:o.placeholder});return x.createElement(o.placeholder.tagName,{style:$,"data-rbd-placeholder-context-id":S,onTransitionEnd:L,ref:o.innerRef})}var Dc=x.memo(oc),sc=x.createContext(null);function Fl(o){o&&cs(o)||He(!1)}function kl(o){return typeof o=="boolean"}function zl(o,l){l.forEach(function(c){return c(o)})}var pu=[function(l){var c=l.props;c.droppableId||He(!1),typeof c.droppableId!="string"&&He(!1)},function(l){var c=l.props;kl(c.isDropDisabled)||He(!1),kl(c.isCombineEnabled)||He(!1),kl(c.ignoreContainerClipping)||He(!1)},function(l){var c=l.getDroppableRef;Fl(c())}],mu=[function(l){var c=l.props,f=l.getPlaceholderRef;if(c.placeholder)var g=f()}],vu=[function(l){var c=l.props;c.renderClone||He(!1)},function(l){var c=l.getPlaceholderRef;c()&&He(!1)}];function gu(o){wi(function(){zl(o,pu),o.props.mode==="standard"&&zl(o,mu),o.props.mode==="virtual"&&zl(o,vu)})}var Ff=function(o){ge(l,o);function l(){for(var f,g=arguments.length,b=new Array(g),S=0;S<g;S++)b[S]=arguments[S];return f=o.call.apply(o,[this].concat(b))||this,f.state={isVisible:!!f.props.on,data:f.props.on,animate:f.props.shouldAnimate&&f.props.on?"open":"none"},f.onClose=function(){f.state.animate==="close"&&f.setState({isVisible:!1})},f}l.getDerivedStateFromProps=function(g,b){return g.shouldAnimate?g.on?{isVisible:!0,data:g.on,animate:"open"}:b.isVisible?{isVisible:!0,data:b.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!g.on,data:g.on,animate:"none"}};var c=l.prototype;return c.render=function(){if(!this.state.isVisible)return null;var g={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(g)},l}(x.PureComponent),Gu={dragging:5e3,dropAnimating:4500},Id=function(l,c){return c?ci.drop(c.duration):l?ci.snap:ci.fluid},Td=function(l,c){return l?c?oa.opacity.drop:oa.opacity.combining:null},zf=function(l){return l.forceShouldAnimate!=null?l.forceShouldAnimate:l.mode==="SNAP"};function Bd(o){var l=o.dimension,c=l.client,f=o.offset,g=o.combineWith,b=o.dropping,S=!!g,E=zf(o),N=!!b,Z=N?m.drop(f,S):m.moveTo(f),L={position:"fixed",top:c.marginBox.top,left:c.marginBox.left,boxSizing:"border-box",width:c.borderBox.width,height:c.borderBox.height,transition:Id(E,b),transform:Z,opacity:Td(S,N),zIndex:N?Gu.dropAnimating:Gu.dragging,pointerEvents:"none"};return L}function Kf(o){return{transform:m.moveTo(o.offset),transition:o.shouldAnimateDisplacement?null:"none"}}function Hf(o){return o.type==="DRAGGING"?Bd(o):Kf(o)}function Wf(o,l,c){c===void 0&&(c=ka);var f=window.getComputedStyle(l),g=l.getBoundingClientRect(),b=qs(g,f),S=Ha(b,c),E={client:b,tagName:l.tagName.toLowerCase(),display:f.display},N={x:b.marginBox.width,y:b.marginBox.height},Z={descriptor:o,placeholder:E,displaceBy:N,client:b,page:S};return Z}function Zf(o){var l=Zs("draggable"),c=o.descriptor,f=o.registry,g=o.getDraggableRef,b=o.canDragInteractiveElements,S=o.shouldRespectForcePress,E=o.isEnabled,N=_r(function(){return{canDragInteractiveElements:b,shouldRespectForcePress:S,isEnabled:E}},[b,E,S]),Z=Bt(function(q){var he=g();return he||He(!1),Wf(c,he,q)},[c,g]),L=_r(function(){return{uniqueId:l,descriptor:c,options:N,getDimension:Z}},[c,Z,N,l]),$=(0,x.useRef)(L),F=(0,x.useRef)(!0);Ht(function(){return f.draggable.register($.current),function(){return f.draggable.unregister($.current)}},[f.draggable]),Ht(function(){if(F.current){F.current=!1;return}var q=$.current;$.current=L,f.draggable.update(L,q)},[L,f.draggable])}function Vf(o,l,c){wi(function(){function f(b){return"Draggable[id: "+b+"]: "}var g=o.draggableId;g||He(!1),typeof g!="string"&&He(!1),Ls(o.index)||He(!1),o.mapped.type!=="DRAGGING"&&(Fl(c()),o.isEnabled&&(Ts(l,g)||He(!1)))})}function Uf(o){}function jf(o){o.preventDefault()}function bu(o){var l=(0,x.useRef)(null),c=Bt(function(xn){l.current=xn},[]),f=Bt(function(){return l.current},[]),g=fu(rr),b=g.contextId,S=g.dragHandleUsageInstructionsId,E=g.registry,N=fu(sc),Z=N.type,L=N.droppableId,$=_r(function(){return{id:o.draggableId,index:o.index,type:Z,droppableId:L}},[o.draggableId,o.index,Z,L]),F=o.children,q=o.draggableId,he=o.isEnabled,it=o.shouldRespectForcePress,ht=o.canDragInteractiveElements,vt=o.isClone,zt=o.mapped,ir=o.dropAnimationFinished;if(Vf(o,b,f),Uf(vt),!vt){var dr=_r(function(){return{descriptor:$,registry:E,getDraggableRef:f,canDragInteractiveElements:ht,shouldRespectForcePress:it,isEnabled:he}},[$,E,f,ht,it,he]);Zf(dr)}var Wr=_r(function(){return he?{tabIndex:0,role:"button","aria-describedby":S,"data-rbd-drag-handle-draggable-id":q,"data-rbd-drag-handle-context-id":b,draggable:!1,onDragStart:jf}:null},[b,S,q,he]),hr=Bt(function(xn){zt.type==="DRAGGING"&&zt.dropping&&xn.propertyName==="transform"&&ir()},[ir,zt]),yn=_r(function(){var xn=Hf(zt),Ma=zt.type==="DRAGGING"&&zt.dropping?hr:null,rs={innerRef:c,draggableProps:{"data-rbd-draggable-context-id":b,"data-rbd-draggable-id":q,style:xn,onTransitionEnd:Ma},dragHandleProps:Wr};return rs},[b,Wr,q,zt,hr,c]),Hi=_r(function(){return{draggableId:$.id,type:$.type,source:{index:$.index,droppableId:$.droppableId}}},[$.droppableId,$.id,$.index,$.type]);return F(yn,zt.snapshot,Hi)}var Nc=function(o,l){return o===l},lc=function(o){var l=o.combine,c=o.destination;return c?c.droppableId:l?l.droppableId:null},Yl=function(l){return l.combine?l.combine.draggableId:null},Pd=function(l){return l.at&&l.at.type==="COMBINE"?l.at.combine.draggableId:null};function $d(){var o=U(function(g,b){return{x:g,y:b}}),l=U(function(g,b,S,E,N){return{isDragging:!0,isClone:b,isDropAnimating:!!N,dropAnimation:N,mode:g,draggingOver:S,combineWith:E,combineTargetFor:null}}),c=U(function(g,b,S,E,N,Z,L){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:N,combineWith:Z,mode:b,offset:g,dimension:S,forceShouldAnimate:L,snapshot:l(b,E,N,Z,null)}}}),f=function(b,S){if(b.isDragging){if(b.critical.draggable.id!==S.draggableId)return null;var E=b.current.client.offset,N=b.dimensions.draggables[S.draggableId],Z=to(b.impact),L=Pd(b.impact),$=b.forceShouldAnimate;return c(o(E.x,E.y),b.movementMode,N,S.isClone,Z,L,$)}if(b.phase==="DROP_ANIMATING"){var F=b.completed;if(F.result.draggableId!==S.draggableId)return null;var q=S.isClone,he=b.dimensions.draggables[S.draggableId],it=F.result,ht=it.mode,vt=lc(it),zt=Yl(it),ir=b.dropDuration,dr={duration:ir,curve:Fn.drop,moveTo:b.newHomeClientOffset,opacity:zt?oa.opacity.drop:null,scale:zt?oa.scale.drop:null};return{mapped:{type:"DRAGGING",offset:b.newHomeClientOffset,dimension:he,dropping:dr,draggingOver:vt,combineWith:zt,mode:ht,forceShouldAnimate:null,snapshot:l(ht,q,vt,zt,dr)}}}return null};return f}function qu(o){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:o,combineWith:null}}var Gf={mapped:{type:"SECONDARY",offset:ka,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:qu(null)}};function qf(){var o=U(function(S,E){return{x:S,y:E}}),l=U(qu),c=U(function(S,E,N){return E===void 0&&(E=null),{mapped:{type:"SECONDARY",offset:S,combineTargetFor:E,shouldAnimateDisplacement:N,snapshot:l(E)}}}),f=function(E){return E?c(ka,E,!0):null},g=function(E,N,Z,L){var $=Z.displaced.visible[E],F=!!(L.inVirtualList&&L.effected[E]),q=w(Z),he=q&&q.draggableId===E?N:null;if(!$){if(!F)return f(he);if(Z.displaced.invisible[E])return null;var it=Ko(L.displacedBy.point),ht=o(it.x,it.y);return c(ht,he,!0)}if(F)return f(he);var vt=Z.displacedBy.point,zt=o(vt.x,vt.y);return c(zt,he,$.shouldAnimate)},b=function(E,N){if(E.isDragging)return E.critical.draggable.id===N.draggableId?null:g(N.draggableId,E.critical.draggable.id,E.impact,E.afterCritical);if(E.phase==="DROP_ANIMATING"){var Z=E.completed;return Z.result.draggableId===N.draggableId?null:g(N.draggableId,Z.result.draggableId,Z.impact,Z.afterCritical)}return null};return b}var Rd=function(){var l=$d(),c=qf(),f=function(b,S){return l(b,S)||c(b,S)||Gf};return f},Xf={dropAnimationFinished:Xn},Jf=xe(Rd,Xf,null,{context:Fi,pure:!0,areStatePropsEqual:Nc})(bu);function Nd(o){var l=fu(sc),c=l.isUsingCloneFor;return c===o.draggableId&&!o.isClone?null:x.createElement(Jf,o)}function Ba(o){var l=typeof o.isDragDisabled=="boolean"?!o.isDragDisabled:!0,c=!!o.disableInteractiveElementBlocking,f=!!o.shouldRespectForcePress;return x.createElement(Nd,(0,ce.Z)({},o,{isClone:!1,isEnabled:l,canDragInteractiveElements:c,shouldRespectForcePress:f}))}function yu(o){var l=(0,x.useContext)(rr);l||He(!1);var c=l.contextId,f=l.isMovementAllowed,g=(0,x.useRef)(null),b=(0,x.useRef)(null),S=o.children,E=o.droppableId,N=o.type,Z=o.mode,L=o.direction,$=o.ignoreContainerClipping,F=o.isDropDisabled,q=o.isCombineEnabled,he=o.snapshot,it=o.useClone,ht=o.updateViewportMaxScroll,vt=o.getContainerForClone,zt=Bt(function(){return g.current},[]),ir=Bt(function(Ao){g.current=Ao},[]),dr=Bt(function(){return b.current},[]),Wr=Bt(function(Ao){b.current=Ao},[]);gu({props:o,getDroppableRef:zt,getPlaceholderRef:dr});var hr=Bt(function(){f()&&ht({maxScroll:Kr()})},[f,ht]);Rf({droppableId:E,type:N,mode:Z,direction:L,isDropDisabled:F,isCombineEnabled:q,ignoreContainerClipping:$,getDroppableRef:zt});var yn=x.createElement(Ff,{on:o.placeholder,shouldAnimate:o.shouldAnimatePlaceholder},function(Ao){var Us=Ao.onClose,gl=Ao.data,nl=Ao.animate;return x.createElement(Dc,{placeholder:gl,onClose:Us,innerRef:Wr,animate:nl,contextId:c,onTransitionEnd:hr})}),Hi=_r(function(){return{innerRef:ir,placeholder:yn,droppableProps:{"data-rbd-droppable-id":E,"data-rbd-droppable-context-id":c}}},[c,E,yn,ir]),xn=it?it.dragging.draggableId:null,Ma=_r(function(){return{droppableId:E,type:N,isUsingCloneFor:xn}},[E,xn,N]);function rs(){if(!it)return null;var Ao=it.dragging,Us=it.render,gl=x.createElement(Nd,{draggableId:Ao.draggableId,index:Ao.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(nl,al){return Us(nl,al,Ao)});return Dr.createPortal(gl,vt())}return x.createElement(sc.Provider,{value:Ma},S(Hi,he),rs())}var Oc=function(l,c){return l===c.droppable.type},Od=function(l,c){return c.draggables[l.draggable.id]},cc=function(){var l={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},c=(0,ce.Z)({},l,{shouldAnimatePlaceholder:!1}),f=U(function(S){return{draggableId:S.id,type:S.type,source:{index:S.index,droppableId:S.droppableId}}}),g=U(function(S,E,N,Z,L,$){var F=L.descriptor.id,q=L.descriptor.droppableId===S;if(q){var he=$?{render:$,dragging:f(L.descriptor)}:null,it={isDraggingOver:N,draggingOverWith:N?F:null,draggingFromThisWith:F,isUsingPlaceholder:!0};return{placeholder:L.placeholder,shouldAnimatePlaceholder:!1,snapshot:it,useClone:he}}if(!E)return c;if(!Z)return l;var ht={isDraggingOver:N,draggingOverWith:F,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:L.placeholder,shouldAnimatePlaceholder:!0,snapshot:ht,useClone:null}}),b=function(E,N){var Z=N.droppableId,L=N.type,$=!N.isDropDisabled,F=N.renderClone;if(E.isDragging){var q=E.critical;if(!Oc(L,q))return c;var he=Od(q,E.dimensions),it=to(E.impact)===Z;return g(Z,$,it,it,he,F)}if(E.phase==="DROP_ANIMATING"){var ht=E.completed;if(!Oc(L,ht.critical))return c;var vt=Od(ht.critical,E.dimensions);return g(Z,$,lc(ht.result)===Z,to(ht.impact)===Z,vt,F)}if(E.phase==="IDLE"&&E.completed&&!E.shouldFlush){var zt=E.completed;if(!Oc(L,zt.critical))return c;var ir=to(zt.impact)===Z,dr=!!(zt.impact.at&&zt.impact.at.type==="COMBINE"),Wr=zt.critical.droppable.id===Z;return ir?dr?l:c:Wr?l:c}return c};return b},Fd={updateViewportMaxScroll:Yt};function Lc(){return document.body||He(!1),document.body}var zd={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Lc},Ti=xe(cc,Fd,null,{context:Fi,pure:!0,areStatePropsEqual:Nc})(yu);Ti.defaultProps=zd},88359:function(Ir,St){"use strict";var y;var x=60103,J=60106,ge=60107,ce=60108,G=60114,X=60109,ee=60110,C=60112,p=60113,fe=60120,Ke=60115,T=60116,Be=60121,Ze=60122,Mt=60117,Ue=60129,H=60131;if(typeof Symbol=="function"&&Symbol.for){var Re=Symbol.for;x=Re("react.element"),J=Re("react.portal"),ge=Re("react.fragment"),ce=Re("react.strict_mode"),G=Re("react.profiler"),X=Re("react.provider"),ee=Re("react.context"),C=Re("react.forward_ref"),p=Re("react.suspense"),fe=Re("react.suspense_list"),Ke=Re("react.memo"),T=Re("react.lazy"),Be=Re("react.block"),Ze=Re("react.server.block"),Mt=Re("react.fundamental"),Ue=Re("react.debug_trace_mode"),H=Re("react.legacy_hidden")}function xr(Pe){if(typeof Pe=="object"&&Pe!==null){var Ne=Pe.$$typeof;switch(Ne){case x:switch(Pe=Pe.type,Pe){case ge:case G:case ce:case p:case fe:return Pe;default:switch(Pe=Pe&&Pe.$$typeof,Pe){case ee:case C:case T:case Ke:case X:return Pe;default:return Ne}}case J:return Ne}}}var Oe=X,be=x,O=C,V=ge,ue=T,Y=Ke,et=J,mt=G,fr=ce,Lt=p;y=ee,y=Oe,y=be,y=O,y=V,y=ue,y=Y,y=et,y=mt,y=fr,y=Lt,y=function(){return!1},y=function(){return!1},St.isContextConsumer=function(Pe){return xr(Pe)===ee},y=function(Pe){return xr(Pe)===X},y=function(Pe){return typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===x},y=function(Pe){return xr(Pe)===C},y=function(Pe){return xr(Pe)===ge},y=function(Pe){return xr(Pe)===T},y=function(Pe){return xr(Pe)===Ke},y=function(Pe){return xr(Pe)===J},y=function(Pe){return xr(Pe)===G},y=function(Pe){return xr(Pe)===ce},y=function(Pe){return xr(Pe)===p},y=function(Pe){return typeof Pe=="string"||typeof Pe=="function"||Pe===ge||Pe===G||Pe===Ue||Pe===ce||Pe===p||Pe===fe||Pe===H||typeof Pe=="object"&&Pe!==null&&(Pe.$$typeof===T||Pe.$$typeof===Ke||Pe.$$typeof===X||Pe.$$typeof===ee||Pe.$$typeof===C||Pe.$$typeof===Mt||Pe.$$typeof===Be||Pe[0]===Ze)},y=xr},72973:function(Ir,St,y){"use strict";Ir.exports=y(88359)},84279:function(Ir,St,y){"use strict";var x=Object.defineProperty,J=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,ee=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))G.call(t,r)&&ee(e,r,t[r]);if(ce)for(var r of ce(t))X.call(t,r)&&ee(e,r,t[r]);return e},p=(e,t)=>J(e,ge(t)),fe=e=>typeof e=="symbol"?e:e+"",Ke=(e,t)=>{var r={};for(var n in e)G.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ce)for(var n of ce(e))t.indexOf(n)<0&&X.call(e,n)&&(r[n]=e[n]);return r};function T(e){return Array.isArray(e)}var Be={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function Ze(){return"window"in globalThis&&"document"in globalThis}function Mt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function Ue(){return typeof navigator.vibrate=="function"}function H(){var e,t;if(!Ze())return"other";const r=(t=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?t:navigator.platform;return/^mac/i.test(r)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(r)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function Re(){if(!Ze())return!0;if(/firefox/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}function xr(){return HTMLElement.prototype.hasOwnProperty("popover")}var Oe={strings:Be,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Oe._locale||(Oe._locale=Ze()?navigator.language.slice(0,5):"en-US"),Oe._locale},set locale(e){Oe._locale=e,Oe._numberFormatter=void 0,Oe.dirty=!0},get numberFormatter(){return Oe._numberFormatter||(Oe._numberFormatter=new Intl.NumberFormat(Oe.locale)),Oe._numberFormatter},merge(e,t){if(typeof e=="string"&&t)Oe.strings[e]=C(C({},Oe.strings[e]),t),Oe.dirty=!0;else for(const r of Object.keys(e))Oe.merge(r,e[r])},get dirty(){return Oe._dirty},set dirty(e){Oe._dirty||Oe._dirty===e||(Oe._dirty=!0,setTimeout(()=>{Oe._dirty=!1,this._subscribers.forEach(t=>t==null?void 0:t())},0))},subscribe(e){return Oe._subscribers.push(e),Oe._subscribers.length-1},unsubscribe(e){e<0||e>=Oe._subscribers.length||(Oe._subscribers[e]=void 0)},update(e){let t=e.querySelectorAll("[data-l10n-tooltip]");for(const r of t){const n=r.getAttribute("data-l10n-tooltip");if(n){const a=be(n);a&&r.setAttribute("data-tooltip",a)}}t=e.querySelectorAll("[data-l10n-arial-label]");for(const r of t){const n=r.getAttribute("data-l10n-arial-label");if(n){const a=be(n);a&&r.setAttribute("aria-label",a)}}}};function be(e,...t){if(e===void 0)return;let r="";const n=Oe.locale;Oe.strings[n]&&(r=Oe.strings[n][e]);const a=n.slice(0,2);if(!r&&Oe.strings[a]&&(r=Oe.strings[a][e]),r||(r=Oe.strings.en[e]),!r)return;const i=/(%@|%([0-9]+)\$@)/g;let s=i.exec(r),u=0;for(;s;){if(t[u++]){const h=s[2]?parseInt(s[2],10)-1:u-1;let v=t[h];typeof v=="number"&&(v=Oe.numberFormatter.format(v)),r=r.replace(s[1],v)}s=i.exec(r)}return r=r.replace(/%%/g,"%"),r}var O={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},V={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},ue={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},Y={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},et={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},mt={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function fr(e){var t,r,n,a,i,s;const u=e.split("!");let d,h,v,k=255,I=255,z=255,W=-1;const ye=u.length>0&&u[0].startsWith("-");ye&&(u[0]=u[0].slice(1));for(let lt=0;lt<u.length;lt++){d=k,h=I,v=z;const pe=(t=u[lt].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],ze=pe==null?void 0:pe.toLowerCase(),pt=pe&&(s=(i=(a=(n=(r=Y[ze])!=null?r:Y[et[pe]])!=null?n:V[pe])!=null?a:mt[pe])!=null?i:O[pe])!=null?s:u[lt].trim();let Ve=pt.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Ve!=null&&Ve[1]&&Ve[2]&&Ve[3])k=Math.max(0,Math.min(255,Number.parseInt(Ve[1],16))),I=Math.max(0,Math.min(255,Number.parseInt(Ve[2],16))),z=Math.max(0,Math.min(255,Number.parseInt(Ve[3],16)));else if(Ve=pt.match(/^#([\da-f]{3})$/i),Ve!=null&&Ve[1]){const Vt=Number.parseInt(Ve[1][0],16),mr=Number.parseInt(Ve[1][1],16),or=Number.parseInt(Ve[1][2],16);k=Math.max(0,Math.min(255,Vt*16+Vt)),I=Math.max(0,Math.min(255,mr*16+mr)),z=Math.max(0,Math.min(255,or*16+or))}else if(Ve=pt.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Ve!=null&&Ve[1]&&Ve[2]&&Ve[3])k=Math.max(0,Math.min(255,Number.parseInt(Ve[1]))),I=Math.max(0,Math.min(255,Number.parseInt(Ve[2]))),z=Math.max(0,Math.min(255,Number.parseInt(Ve[3])));else return;W>=0&&(k=(1-W)*k+W*d,I=(1-W)*I+W*h,z=(1-W)*z+W*v,W=-1),lt+1<u.length&&(W=Math.max(0,Math.min(100,Number.parseInt(u[++lt])))/100)}return W>=0&&(k=W*k+(1-W)*d,I=W*I+(1-W)*h,z=W*z+(1-W)*v),ye&&(k=255-k,I=255-I,z=255-z),"#"+("00"+Math.round(k).toString(16)).slice(-2)+("00"+Math.round(I).toString(16)).slice(-2)+("00"+Math.round(z).toString(16)).slice(-2)}function Lt(e){var t,r;return e=e.trim(),(r=(t=ue[e.toLowerCase()])!=null?t:ue[et[e]])!=null?r:fr(e)}function Pe(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function Ne(e,t,r){return r<0&&(r+=6),r>=6&&(r-=6),r<1?(t-e)*r+e:r<3?t:r<4?(t-e)*(4-r)+e:e}function _t(e){let[t,r,n]=[e.h,e.s,e.l];t=(t+360)%360/60,n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1));const a=n<=.5?n*(r+1):n+r-n*r,i=n*2-a;return{r:Math.round(255*Ne(i,a,t+2)),g:Math.round(255*Ne(i,a,t)),b:Math.round(255*Ne(i,a,t-2))}}function le(e){return e<0?0:e>255?255:Math.round(e)}function tt(e){const{r:t,g:r,b:n}=e;let a=((1<<24)+(le(t)<<16)+(le(r)<<8)+le(n)).toString(16).slice(1);return a[0]===a[1]&&a[2]===a[3]&&a[4]===a[5]&&a[6]===a[7]&&(a=a[0]+a[2]+a[4]),"#"+a}function bt(e){let{r:t,g:r,b:n}=e;t=t/255,r=r/255,n=n/255;const a=Math.min(t,r,n),i=Math.max(t,r,n),s=i-a;let u,d;i===a?u=0:t===i?u=(r-n)/s:r===i?u=2+(n-t)/s:n===i&&(u=4+(t-r)/s),u=Math.min(u*60,360),u<0&&(u+=360);const h=(a+i)/2;return i===a?d=0:h<=.5?d=s/(i+a):d=s/(2-i-a),{h:u,s:d,l:h}}function Ee(e){let t=Pe(e);if(!t)return e;let{h:r,s:n,l:a}=bt(t);return n+=.1,a-=.1,tt(_t({h:r,s:n,l:a}))}var Fe={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},Le={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},me=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function xt(e,t,r){if(!/[A-Za-z\d]/.test(e)||(r==="up"&&(r=void 0),!t&&!r))return e;const n=e.codePointAt(0);if(n===void 0)return e;for(const a of me)if((!t||a.variant===t)&&(!r||a.style===r)&&n>=a.offset&&n<a.offset+a.len){const i=a.start+n-a.offset;return String.fromCodePoint(Le[i]||i)}return e}function ot(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const r in Le)if(Le[r]===e){e=(t=r.codePointAt(0))!=null?t:0;break}for(const r of me)if(e>=r.start&&e<r.start+r.len)return{char:String.fromCodePoint(e-r.start+r.offset),variant:r.variant,style:r.style};return{char:String.fromCodePoint(e)}}function Xe(e){var t;let r="";for(const n of e){if("{}<>[]$&#^_%:'\u02DC".includes(n)){r+=n;continue}const a=(t=n.codePointAt(0))!=null?t:0;let i=Fe[a];if(i)i.startsWith("\\")?r+=i+" ":r+=i;else{const{char:s,variant:u,style:d}=ot(a);switch(i=s,u){case"double-struck":i=`\\mathbb{${i}}`;break;case"fraktur":i=`\\mathfrak{${i}}`;break;case"script":i=`\\mathscr{${i}}`;break;case"sans-serif":i=`\\mathsf{${i}}`;break;case"monospace":i=`\\mathtt{${i}}`;break;case"calligraphic":i=`\\mathcal{${i}}`;break}switch(d){case"bold":i=`\\mathbf{${i}}`;break;case"italic":i=`\\mathit{${i}}`;break;case"bolditalic":i=`\\mathbfit{${i}}`;break}r+=i}}return r}function ke(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var $t={},Tt=C({},Fe),wr={},Ur={},nn={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},Qr={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},Or={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},cn={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:Or},"amsmath.sty":{package:Qr,primitive:!0},"texvc.sty":{package:nn,primitive:!1}},Et={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},Ae=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,de,te;Re()?(de=new RegExp("\\p{Letter}","u"),te=new RegExp("[0-9\\p{Letter}]","u")):(de=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,te=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function Te(e,t,r="mord",n){t!==void 0&&($t[e]={definitionType:"symbol",type:r,variant:n,codepoint:t},Tt[t]||(Tt[t]=e))}function Me(e,t,r){if(typeof e=="string"){for(let n=0;n<e.length;n++){const a=e.charAt(n);Te(a,a.codePointAt(0))}return}for(const[n,a,i,s]of e)Te(n,a,i!=null?i:t,s!=null?s:r)}function ct(e,t){for(let r=e;r<=t;r++)Te(String.fromCodePoint(r),r)}function xe(e){var t;return(t=Ur[e])!=null?t:null}function we(e,t){var r,n;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];const a=[];for(const s in wr)s.startsWith(t)&&!wr[s].infix&&a.push({match:s,frequency:(r=wr[s].frequency)!=null?r:0});for(const s in $t)s.startsWith(t)&&a.push({match:s,frequency:(n=$t[s].frequency)!=null?n:0});const i=t.substring(1);for(const s of Object.keys(e.options.macros))s.startsWith(i)&&a.push({match:"\\"+s,frequency:0});return a.sort((s,u)=>{var d,h;return s.frequency===u.frequency?s.match.length===u.match.length?s.match<u.match?-1:1:s.match.length-u.match.length:((d=u.frequency)!=null?d:0)-((h=s.frequency)!=null?h:0)}),a.map(s=>s.match)}function At(e){let t="auto";const r=e.match(/:([^=]+)/);return r&&(t=r[1].trim()),t}function gt(e){if(!e)return[];const t=[];let r=e.split("]");if(r[0].startsWith("[")){t.push({isOptional:!0,type:At(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...gt(r[n]))}else if(r=e.split("}"),r[0].startsWith("{")){t.push({isOptional:!1,type:At(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...gt(r[n]))}return t}function je(e){if(!e)return"";let t="",r=!0;for(const n of e)typeof n.value=="string"?t+=n.value:r=!1;return r?t:""}function nr(e,t){typeof e=="string"&&(e=[e]);const r={tabular:!1,params:[],createAtom:t};for(const n of e)Ur[n]=r}function lr(e,t,r){typeof e=="string"&&(e=[e]);const a={tabular:!0,params:gt(t),createAtom:r};for(const i of e)Ur[i]=a}function re(e,t,r){var n,a;r||(r={});const i={definitionType:"function",params:gt(t),ifMode:r.ifMode,isFunction:(n=r.isFunction)!=null?n:!1,applyMode:r.applyMode,infix:(a=r.infix)!=null?a:!1,parse:r.parse,createAtom:r.createAtom,applyStyle:r.applyStyle,serialize:r.serialize,render:r.render};if(typeof e=="string")wr["\\"+e]=i;else for(const s of e)wr["\\"+s]=i}var jt;function Rt(e){return jt||(jt=gn(cn)),e?gn(C(C({},jt),e)):jt}function Dr(e,t){var r,n,a,i;if(typeof e=="string"){let s=0;const u=e;return/(^|[^\\])#1/.test(u)&&(s=1),/(^|[^\\])#2/.test(u)&&(s=2),/(^|[^\\])#3/.test(u)&&(s=3),/(^|[^\\])#4/.test(u)&&(s=4),/(^|[^\\])#5/.test(u)&&(s=5),/(^|[^\\])#6/.test(u)&&(s=6),/(^|[^\\])#7/.test(u)&&(s=7),/(^|[^\\])#8/.test(u)&&(s=8),/(^|[^\\])#9/.test(u)&&(s=9),{expand:(r=t==null?void 0:t.expand)!=null?r:!0,captureSelection:(n=t==null?void 0:t.captureSelection)!=null?n:!0,args:s,def:u}}return C({expand:(a=t==null?void 0:t.expand)!=null?a:!0,captureSelection:(i=t==null?void 0:t.captureSelection)!=null?i:!0,args:0},e)}function gn(e){if(!e)return{};const t={};for(const r of Object.keys(e)){const n=e[r];if(n==null)delete t[r];else if(typeof n=="object"&&"package"in n)for(const a of Object.keys(n.package))t[a]=Dr(n.package[a],{expand:!n.primitive,captureSelection:n.captureSelection});else t[r]=Dr(n)}return t}function un(e,t="math"){if(!e||e.length===0)return null;let r=null;if(e.startsWith("\\")){if(r=wr[e],r)return!r.ifMode||r.ifMode===t?r:null;t==="math"?r=$t[e]:Et[e]&&(r={definitionType:"symbol",type:"mord",codepoint:Et[e]})}else if(t==="math"){if(r=$t[e],!r&&e.length===1){const n=_r("math",e.codePointAt(0));return n.startsWith("\\")?p(C({},un(n,"math")),{command:n}):null}}else Et[e]?r={definitionType:"symbol",type:"mord",codepoint:Et[e]}:t==="text"&&(r={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return r!=null?r:null}function _i(e,t){if(!e.startsWith("\\"))return null;const r=e.slice(1);return t[r]}function _r(e,t){if(t===void 0)return"";if(e==="math"&&Tt[t])return Tt[t];if(e==="text"){const r=Object.keys(Et).find(n=>Et[n]===t);return r||String.fromCodePoint(t)}return String.fromCodePoint(t)}var Bt=[0,.68889,0,0,.72222],Pi=[0,.68889,0,0,.66667],Wi=[0,.68889,0,0,.77778],ea=[0,.68889,0,0,.61111],wn=[.16667,.68889,0,0,.77778],$i=[0,.68889,0,0,.55556],Jt=[0,0,0,0,.25],Do=[0,.825,0,0,2.33334],xo=[0,.9,0,0,2.33334],co=[0,.68889,0,0,.54028],Ka=[-.03598,.46402,0,0,.5],ta=[-.13313,.36687,0,0,1],cr=[.01354,.52239,0,0,1],Ha=[.01354,.52239,0,0,1.11111],qs=[0,.54986,0,0,1],ms=[0,.69224,0,0,.5],Lo=[0,.43056,0,0,1],Mi=[.08198,.58198,0,0,.77778],Fo=[.19444,.69224,0,0,.41667],Ri=[.1808,.675,0,0,1],U=[.19444,.69224,0,0,.83334],Q=[.13667,.63667,0,0,1],Se=[-.064,.437,0,0,1.334],Ye=[.08167,.58167,0,0,.77778],Ct=[0,.69224,0,0,.72222],Nt=[0,.69224,0,0,.66667],Cn=[-.13313,.36687,0,0,.77778],jr=[.06062,.54986,0,0,.77778],ra=[0,.69224,0,0,.77778],En=[.25583,.75583,0,0,.77778],Gr=[.25142,.75726,0,0,.77778],Ea=[.20576,.70576,0,0,.77778],dn=[.30274,.79383,0,0,.77778],pn=[.22958,.72958,0,0,.77778],mi=[.1808,.675,0,0,.77778],Hn=[.13667,.63667,0,0,.77778],Wn=[.13597,.63597,0,0,.77778],Ci=[.03517,.54986,0,0,.77778],Br=[0,.675,0,0,.77778],He=[.19444,.69224,0,0,.61111],Zi=[0,.54986,0,0,.76042],wo=[0,.54986,0,0,.66667],Ei=[.0391,.5391,0,0,.77778],zo=[.03517,.54986,0,0,1.33334],uo=[.38569,.88569,0,0,.77778],Io=[.23222,.74111,0,0,.77778],So=[.19444,.69224,0,0,.77778],ks=[0,.37788,0,0,.5],vs=[0,.54986,0,0,.72222],Xo=[0,.69224,0,0,.83334],ka=[.11111,.69224,0,0,.66667],Bn=[.26167,.75726,0,0,.77778],ti=[.48256,.98256,0,0,.77778],fo=[.28481,.79383,0,0,.77778],Ko=[.08167,.58167,0,0,.22222],To=[.08167,.58167,0,0,.38889],Jo=[0,.43056,.04028,0,.66667],Yi=[.41951,.91951,0,0,.77778],pa=[.24982,.74947,0,0,.38865],Rs=[.08319,.58283,0,0,.75623],As=[0,.10803,0,0,.27764],Ds=[0,.47534,0,0,.50181],Nn=[.18906,.47534,0,0,.50181],yl=[0,.69141,0,0,.50181],ri=[.24982,.74947,0,0,.27764],Ns=[0,.69141,0,0,.21471],Yo=[.25,.75,0,0,.44722],li=[0,.64444,0,0,.575],Ls=[.08556,.58556,0,0,.89444],Ho=[0,.69444,0,0,.89444],Qo=[0,.68611,0,0,.9],Vi=[0,.68611,0,0,.86944],Wo=[.25,.75,0,0,.575],Bo=[.25,.75,0,0,.31944],ho=[0,.69444,0,0,.63889],Qi=[0,.69444,0,0,.31944],sl=[0,.44444,0,0,.63889],eo=[0,.44444,0,0,.51111],_o=[0,.69444,0,0,.575],w=[.13333,.63333,0,0,.89444],D=[0,.44444,0,0,.31944],ne=[0,.69444,0,0,.86944],ae=[0,.68611,0,0,.69166],_e=[0,.68611,0,0,.83055],Ie=[0,.68611,0,0,.89444],at=[0,.69444,0,0,.60278],wt=[.19444,.69444,0,0,.51111],pr=[0,.69444,0,0,.83055],ur=[-.10889,.39111,0,0,1.14999],qr=[.19444,.69444,0,0,.575],Wt=[.19444,.69444,0,0,1.14999],kr=[.19444,.69444,0,0,.70277],Yr=[.05556,.75,0,0,.575],an=[0,.68611,0,0,.95833],Zn=[.08556,.58556,0,0,.76666],qn=[-.02639,.47361,0,0,.575],Gt=[0,.44444,0,0,.89444],It=[0,.55556,0,0,.76666],Kt=[-.10889,.39111,0,0,.89444],gr=[.00222,.50222,0,0,.89444],en=[.19667,.69667,0,0,.89444],Xr=[.08556,.58556,0,0,1.14999],Vn=[0,.69444,0,0,.70277],na=[-.02778,.47222,0,0,.575],tn=[.25,.75,0,0,.51111],bn=[-.13889,.36111,0,0,1.14999],ma=[.19444,.69444,0,0,1.02222],Fr=[.12963,.69444,0,0,.89444],aa=[.19444,.69444,0,0,.44722],kn=[0,.64444,.13167,0,.59111],va=[.19444,.64444,.13167,0,.59111],Ui=[0,.68611,.17208,0,.8961],es=[.19444,.44444,.105,0,.53222],Pa=[0,.44444,.085,0,.82666],vi=[0,.69444,.06709,0,.59111],ji=[0,.69444,.12945,0,.35555],Zo=[0,.69444,0,0,.94888],Pn=[0,.69444,.11472,0,.59111],ga=[0,.68611,.10778,0,.88555],po=[0,.69444,.07939,0,.62055],ki=[0,.69444,.12417,0,.30667],Wa=[0,.64444,.13556,0,.51111],Gi=[.19444,.64444,.13556,0,.51111],ni=[0,.68333,.16389,0,.74333],gs=[.19444,.43056,.08847,0,.46],bs=[0,.43056,.07514,0,.71555],Xs=[0,.69444,.06646,0,.51111],Js=[0,.69444,0,0,.83129],Ul=[0,.69444,.1225,0,.51111],Ni=[0,.68333,.09403,0,.76666],Pl=[0,.68333,.11111,0,.76666],Za=[0,.69444,.06961,0,.51444],Mo=[0,.69444,0,0,.27778],os=[.25,.75,0,0,.38889],mo=[0,.64444,0,0,.5],Ys=[0,.69444,0,0,.77778],ss=[0,.68333,0,0,.75],br=[0,.68333,0,0,.77778],Qs=[0,.68333,0,0,.68056],Os=[0,.68333,0,0,.72222],ls=[.25,.75,0,0,.5],to=[.25,.75,0,0,.27778],ca=[0,.69444,0,0,.5],ll=[0,.69444,0,0,.55556],gi=[0,.43056,0,0,.44445],qi=[0,.43056,0,0,.5],Fs=[.19444,.43056,0,0,.55556],xl=[0,.43056,0,0,.55556],vo=[.08333,.58333,0,0,.77778],zs=[0,.43056,0,0,.27778],cl=[0,.66786,0,0,.27778],wl=[0,.69444,0,0,.75],Sl=[0,.66786,0,0,.5],_l=[0,.68333,0,0,.625],Ks=[.19444,.69444,0,0,.44445],Vo=[0,.69444,0,0,.72222],jl=[.19444,.69444,0,0,.5],el=[.19444,.69444,0,0,1],Gl=[.011,.511,0,0,1.126],ul=[.19444,.69444,0,0,.61111],Is=[.05556,.75,0,0,.5],ql=[0,.68333,0,0,.83334],Hs=[.0391,.5391,0,0,.66667],Xl=[-.05555,.44445,0,0,.5],Ml=[0,.43056,0,0,.77778],Ws=[0,.55556,0,0,.66667],dl=[-.03625,.46375,0,0,.77778],rc=[-.01688,.48312,0,0,.77778],tl=[.0391,.5391,0,0,1],_=[0,.69444,0,0,.61111],B=[-.03472,.46528,0,0,.5],P=[.25,.75,0,0,.44445],j=[-.14236,.35764,0,0,1],se=[.244,.744,0,0,.412],Ce=[.19444,.69444,0,0,.88889],ve=[.12963,.69444,0,0,.77778],$e=[.19444,.69444,0,0,.38889],ut=[.011,.511,0,0,1.638],rt=[.19444,.69444,0,0,0],Pt=[0,.44444,0,0,.575],dt=[.19444,.44444,0,0,.575],tr=[0,.68611,0,0,.75555],qt=[0,.69444,0,0,.66759],Zt=[0,.68611,0,0,.80555],fn=[0,.68611,.08229,0,.98229],zr=[0,.68611,0,0,.76666],Sn=[0,.44444,0,0,.58472],Zr=[.19444,.44444,0,0,.6118],Mr=[.19444,.43056,0,0,.5],Yt=[0,.68333,.02778,.08334,.76278],ba=[0,.68333,.08125,.05556,.83125],ia=[0,.43056,0,.05556,.48472],ya=[.19444,.43056,0,.08334,.51702],Va=[.25,.75,0,0,.42778],on=[0,.69444,0,0,.55],hn=[0,.69444,0,0,.73334],Nr=[0,.69444,0,0,.79445],Aa=[0,.69444,0,0,.51945],Ga=[0,.69444,0,0,.70278],Xn=[0,.69444,0,0,.76389],sn=[.25,.75,0,0,.34306],On=[0,.69444,0,0,.56111],Vr=[0,.69444,0,0,.25556],Ai=[.19444,.45833,0,0,.56111],Fn=[0,.45833,0,0,.56111],oa=[0,.69444,0,0,.30556],Co=[0,.69444,0,0,.58056],qa=[0,.69444,0,0,.67223],ci=[0,.69444,0,0,.85556],Po=[0,.69444,0,0,.55834],m=[0,.65556,.11156,0,.5],M=[0,.69444,.08094,0,.70834],A=[.17014,0,0,0,.44445],R=[0,.69444,.0799,0,.5],K=[0,.69444,0,0,.73752],ie=[0,.69444,.09205,0,.5],oe=[0,.69444,.09031,0,.77778],Ge=[0,.69444,.07816,0,.27778],qe=[0,.69444,.00316,0,.5],Qe=[.19444,.69444,0,0,.83334],Ot=[.05556,.75,0,0,.83334],kt=[0,.75,0,0,.5],Dt=[.125,.08333,0,0,.27778],We=[0,.08333,0,0,.27778],st=[0,.65556,0,0,.5],Qt=[0,.69444,0,0,.47222],Ft=[0,.69444,0,0,.66667],Sr=[0,.69444,0,0,.59722],er=[0,.69444,0,0,.54167],Ut=[0,.69444,0,0,.70834],ft=[.25,.75,0,0,.28889],sr=[0,.69444,0,0,.51667],Ar=[0,.44444,0,0,.44445],Pr=[.19444,.44444,0,0,.51667],Cr=[0,.44444,0,0,.38333],ua=[0,.44444,0,0,.51667],Lr=[0,.69444,0,0,.83334],Jn=[.35001,.85,0,0,.45834],$n=[.35001,.85,0,0,.57778],mn=[.35001,.85,0,0,.41667],rn=[.35001,.85,0,0,.58334],Tr=[0,.72222,0,0,.55556],ln=[1e-5,.6,0,0,.66667],vr=[1e-5,.6,0,0,.77778],vn=[.25001,.75,0,0,.94445],_n=[.306,.805,.19445,0,.47222],xa=[.30612,.805,.19445,0,.47222],$a=[.25001,.75,0,0,.83334],Kr=[.35001,.85,0,0,.47222],$r=[.25001,.75,0,0,1.11111],Da=[.65002,1.15,0,0,.59722],da=[.65002,1.15,0,0,.81111],Ra=[.65002,1.15,0,0,.47222],An=[.65002,1.15,0,0,.66667],Dn=[0,.75,0,0,1],Yn=[.55001,1.05,0,0,1.27778],Xa=[.862,1.36,.44445,0,.55556],La=[.86225,1.36,.44445,0,.55556],Ln=[.55001,1.05,0,0,1.11111],Na=[.65002,1.15,0,0,.52778],ai=[.65002,1.15,0,0,.61111],ui=[.55001,1.05,0,0,1.51112],Qn=[.95003,1.45,0,0,.73611],bi=[.95003,1.45,0,0,1.04445],Rr=[.95003,1.45,0,0,.52778],Oi=[.95003,1.45,0,0,.75],Ja=[0,.75,0,0,1.44445],di=[.95003,1.45,0,0,.58334],fi=[1.25003,1.75,0,0,.79167],Ya=[1.25003,1.75,0,0,1.27778],hi=[1.25003,1.75,0,0,.58334],yi=[1.25003,1.75,0,0,.80556],Un=[0,.825,0,0,1.8889],Eo=[1.25003,1.75,0,0,.63889],Oa=[.64502,1.155,0,0,.875],Ia=[1e-5,.6,0,0,.875],pi=[-99e-5,.601,0,0,.66667],Fa=[.64502,1.155,0,0,.66667],Uo=[1e-5,.9,0,0,.88889],Ta=[.65002,1.15,0,0,.88889],Xi=[.90001,0,0,0,.88889],xi=[-.00499,.605,0,0,1.05556],jn=[0,.12,0,0,.45],nt=[0,.61111,0,0,.525],In=[.08333,.69444,0,0,.525],wa=[-.08056,.53055,0,0,.525],ro=[-.05556,.55556,0,0,.525],fa=[0,.43056,0,0,.525],Ua=[.22222,.43056,0,0,.525],sa=[0,0,0,0,.525],zn={"AMS-Regular":{32:Jt,65:Bt,66:Pi,67:Bt,68:Bt,69:Pi,70:ea,71:Wi,72:Wi,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Wi,76:Pi,77:[0,.68889,0,0,.94445],78:Bt,79:wn,80:ea,81:wn,82:Bt,83:$i,84:Pi,85:Bt,86:Bt,87:[0,.68889,0,0,1],88:Bt,89:Bt,90:Pi,107:$i,160:Jt,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:$i,295:co,710:Do,732:xo,770:Do,771:xo,989:Ye,1008:Jo,8245:[0,.54986,0,0,.275],8463:co,8487:Bt,8498:$i,8502:Pi,8503:[0,.68889,0,0,.44445],8504:Pi,8513:[0,.68889,0,0,.63889],8592:Ka,8594:Ka,8602:ta,8603:ta,8606:cr,8608:cr,8610:Ha,8611:Ha,8619:qs,8620:qs,8621:[-.13313,.37788,0,0,1.38889],8622:ta,8624:ms,8625:ms,8630:Lo,8631:Lo,8634:Mi,8635:Mi,8638:Fo,8639:Fo,8642:Fo,8643:Fo,8644:Ri,8646:Ri,8647:Ri,8648:U,8649:Ri,8650:U,8651:cr,8652:cr,8653:ta,8654:ta,8655:ta,8666:Q,8667:Q,8669:[-.13313,.37788,0,0,1],8672:Se,8674:Se,8705:[0,.825,0,0,.5],8708:$i,8709:Ye,8717:[0,.43056,0,0,.42917],8722:Ka,8724:[.08198,.69224,0,0,.77778],8726:Ye,8733:ra,8736:Ct,8737:Ct,8738:[.03517,.52239,0,0,.72222],8739:Ko,8740:[.25142,.74111,0,0,.27778],8741:To,8742:[.25142,.74111,0,0,.5],8756:Nt,8757:Nt,8764:Cn,8765:[-.13313,.37788,0,0,.77778],8769:Cn,8770:dl,8774:dn,8776:rc,8778:Ye,8782:jr,8783:jr,8785:Mi,8786:Mi,8787:Mi,8790:ra,8791:pn,8796:[.08198,.91667,0,0,.77778],8806:En,8807:En,8808:Gr,8809:Gr,8812:[.25583,.75583,0,0,.5],8814:Ea,8815:Ea,8816:dn,8817:dn,8818:pn,8819:pn,8822:mi,8823:mi,8828:Hn,8829:Hn,8830:pn,8831:pn,8832:Ea,8833:Ea,8840:dn,8841:dn,8842:Wn,8843:Wn,8847:Ci,8848:Ci,8858:Mi,8859:Mi,8861:Mi,8862:Br,8863:Br,8864:Br,8865:Br,8872:[0,.69224,0,0,.61111],8873:Ct,8874:[0,.69224,0,0,.88889],8876:ea,8877:ea,8878:Bt,8879:Bt,8882:Ci,8883:Ci,8884:Hn,8885:Hn,8888:[0,.54986,0,0,1.11111],8890:Fs,8891:He,8892:He,8901:[0,.54986,0,0,.27778],8903:Ye,8905:Ye,8906:Ye,8907:ra,8908:ra,8909:[-.03598,.46402,0,0,.77778],8910:Zi,8911:Zi,8912:Ci,8913:Ci,8914:wo,8915:wo,8916:Nt,8918:Ei,8919:Ei,8920:zo,8921:zo,8922:uo,8923:uo,8926:Hn,8927:Hn,8928:dn,8929:dn,8934:Io,8935:Io,8936:Io,8937:Io,8938:Ea,8939:Ea,8940:dn,8941:dn,8994:So,8995:So,9416:[.15559,.69224,0,0,.90222],9484:ms,9488:ms,9492:ks,9496:ks,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Br,9633:Br,9650:vs,9651:vs,9654:Ci,9660:vs,9661:vs,9664:Ci,9674:ka,9733:[.19444,.69224,0,0,.94445],10003:Xo,10016:Xo,10731:ka,10846:[.19444,.75583,0,0,.61111],10877:Hn,10878:Hn,10885:En,10886:En,10887:Wn,10888:Wn,10889:Bn,10890:Bn,10891:ti,10892:ti,10901:Hn,10902:Hn,10933:Gr,10934:Gr,10935:Bn,10936:Bn,10937:Bn,10938:Bn,10949:En,10950:En,10955:fo,10956:fo,57350:Ko,57351:To,57352:Ye,57353:Jo,57356:Gr,57357:Gr,57358:Yi,57359:dn,57360:dn,57361:Yi,57366:Gr,57367:Gr,57368:Gr,57369:Gr,57370:Wn,57371:Wn},"Caligraphic-Regular":{32:Jt,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:Jt},"Fraktur-Regular":{32:Jt,33:[0,.69141,0,0,.29574],34:Ns,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:pa,41:pa,42:[0,.62119,0,0,.27764],43:Rs,44:As,45:Rs,46:As,47:[.24982,.74947,0,0,.50181],48:Ds,49:Ds,50:Ds,51:Nn,52:Nn,53:Nn,54:yl,55:Nn,56:yl,57:Nn,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:ri,93:ri,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:Jt,8216:Ns,8217:Ns,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:Jt,33:[0,.69444,0,0,.35],34:at,35:[.19444,.69444,0,0,.95833],36:Yr,37:[.05556,.75,0,0,.95833],38:Ho,39:Qi,40:Yo,41:Yo,42:[0,.75,0,0,.575],43:w,44:[.19444,.15556,0,0,.31944],45:Cr,46:[0,.15556,0,0,.31944],47:Wo,48:li,49:li,50:li,51:li,52:li,53:li,54:li,55:li,56:li,57:li,58:D,59:[.19444,.44444,0,0,.31944],60:Ls,61:Kt,62:Ls,63:[0,.69444,0,0,.54305],64:Ho,65:Vi,66:[0,.68611,0,0,.81805],67:_e,68:[0,.68611,0,0,.88194],69:tr,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Qo,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:ae,77:[0,.68611,0,0,1.09166],78:Qo,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:Vi,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Bo,92:Wo,93:Bo,94:_o,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:ho,99:eo,100:ho,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:ho,105:Qi,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Qi,109:[0,.44444,0,0,.95833],110:sl,111:Pt,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:sl,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:eo,123:Wo,124:Bo,125:Wo,126:[.35,.34444,0,0,.575],160:Jt,163:[0,.69444,0,0,.86853],168:_o,172:[0,.44444,0,0,.76666],176:ne,177:w,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:w,216:[.04861,.73472,0,0,.89444],223:Sr,230:[0,.44444,0,0,.83055],247:w,248:[.09722,.54167,0,0,.575],305:D,338:[0,.68611,0,0,1.16944],339:Gt,567:[.19444,.44444,0,0,.35139],710:_o,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:_o,715:_o,728:_o,729:Qi,730:ne,732:_o,733:_o,915:ae,916:an,920:Ie,923:Zt,926:zr,928:Qo,931:_e,933:Ie,934:_e,936:Ie,937:_e,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Qi,8217:Qi,8220:at,8221:at,8224:wt,8225:wt,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:qt,8465:pr,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:pr,8501:Vn,8592:ur,8593:qr,8594:ur,8595:qr,8596:ur,8597:Wo,8598:Wt,8599:Wt,8600:Wt,8601:Wt,8636:ur,8637:ur,8640:ur,8641:ur,8656:ur,8657:kr,8658:ur,8659:kr,8660:ur,8661:[.25,.75,0,0,.70277],8704:ho,8706:[0,.69444,.06389,0,.62847],8707:ho,8709:Yr,8711:an,8712:Zn,8715:Zn,8722:w,8723:w,8725:Wo,8726:Wo,8727:na,8728:qn,8729:qn,8730:[.18,.82,0,0,.95833],8733:Gt,8734:[0,.44444,0,0,1.14999],8736:Ct,8739:Bo,8741:Wo,8743:It,8744:It,8745:It,8746:It,8747:[.19444,.69444,.12778,0,.56875],8764:Kt,8768:[.19444,.69444,0,0,.31944],8771:gr,8776:[.02444,.52444,0,0,.89444],8781:gr,8801:gr,8804:en,8805:en,8810:Xr,8811:Xr,8826:Ls,8827:Ls,8834:Ls,8835:Ls,8838:en,8839:en,8846:It,8849:en,8850:en,8851:It,8852:It,8853:w,8854:w,8855:w,8856:w,8857:w,8866:Vn,8867:Vn,8868:Ho,8869:Ho,8900:qn,8901:[-.02639,.47361,0,0,.31944],8902:na,8968:tn,8969:tn,8970:tn,8971:tn,8994:bn,8995:bn,9651:ma,9657:na,9661:ma,9667:na,9711:Wt,9824:Fr,9825:Fr,9826:Fr,9827:Fr,9837:[0,.75,0,0,.44722],9838:aa,9839:aa,10216:Yo,10217:Yo,10815:Qo,10927:en,10928:en,57376:rt},"Main-BoldItalic":{32:Jt,33:[0,.69444,.11417,0,.38611],34:po,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:ji,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:kn,49:kn,50:kn,51:kn,52:va,53:kn,54:kn,55:va,56:kn,57:kn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Pn,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:Ui,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:Ui,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:vi,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:es,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:es,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:Jt,168:[0,.69444,.11473,0,.59111],176:Zo,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:Pa,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Pa,567:[.19444,.44444,.04611,0,.385],710:vi,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:ji,730:Zo,732:Pn,733:Pn,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:Ui,931:[0,.68611,.11431,0,.82666],933:ga,934:[0,.68611,.05632,0,.82666],936:ga,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:ji,8217:ji,8220:[0,.69444,.16772,0,.62055],8221:po},"Main-Italic":{32:Jt,33:ki,34:Za,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:ki,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Wa,49:Wa,50:Wa,51:Wa,52:Gi,53:Wa,54:Wa,55:Gi,56:Wa,57:Wa,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Ul,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:ni,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:ni,79:Ni,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:ni,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:Xs,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:gs,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:gs,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:Jt,168:[0,.66786,.10474,0,.51111],176:Js,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:bs,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:bs,710:Xs,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:Js,732:[0,.66786,.11585,0,.51111],733:Ul,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Ni,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:ni,931:[0,.68333,.12028,0,.71555],933:Pl,934:[0,.68333,.05986,0,.71555],936:Pl,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:ki,8217:ki,8220:[0,.69444,.1685,0,.51444],8221:Za,8463:co},"Main-Regular":{32:Jt,33:Mo,34:ca,35:Qe,36:Is,37:Ot,38:Ys,39:Mo,40:os,41:os,42:kt,43:vo,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ls,48:mo,49:mo,50:mo,51:mo,52:mo,53:mo,54:mo,55:mo,56:mo,57:mo,58:zs,59:[.19444,.43056,0,0,.27778],60:Ei,61:Cn,62:Ei,63:Qt,64:Ys,65:ss,66:[0,.68333,0,0,.70834],67:Os,68:[0,.68333,0,0,.76389],69:Qs,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:ss,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:br,76:_l,77:[0,.68333,0,0,.91667],78:ss,79:br,80:Qs,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Os,85:ss,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:ss,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:to,92:ls,93:to,94:ca,95:[.31,.12056,.02778,0,.5],97:qi,98:ll,99:gi,100:ll,101:gi,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:ll,105:cl,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Mo,109:[0,.43056,0,0,.83334],110:xl,111:qi,112:Fs,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:xl,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:gi,123:ls,124:to,125:ls,126:[.35,.31786,0,0,.5],160:Jt,163:[0,.69444,0,0,.76909],167:Ks,168:Sl,172:[0,.43056,0,0,.66667],176:wl,177:vo,182:ul,184:A,198:[0,.68333,0,0,.90278],215:vo,216:[.04861,.73194,0,0,.77778],223:ca,230:[0,.43056,0,0,.72222],247:vo,248:[.09722,.52778,0,0,.5],305:zs,338:[0,.68333,0,0,1.01389],339:Ml,567:[.19444,.43056,0,0,.30556],710:ca,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:ca,715:ca,728:ca,729:cl,730:wl,732:Sl,733:ca,915:_l,916:ql,920:br,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:ss,931:Os,933:br,934:Os,936:br,937:Os,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Mo,8217:Mo,8220:ca,8221:ca,8224:Ks,8225:Ks,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:co,8465:Vo,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Vo,8501:_,8592:ta,8593:jl,8594:ta,8595:jl,8596:ta,8597:ls,8598:el,8599:el,8600:el,8601:el,8614:[.011,.511,0,0,1],8617:Gl,8618:Gl,8636:ta,8637:ta,8640:ta,8641:ta,8652:[.011,.671,0,0,1],8656:ta,8657:ul,8658:ta,8659:ul,8660:ta,8661:[.25,.75,0,0,.61111],8704:ll,8706:[0,.69444,.05556,.08334,.5309],8707:ll,8709:Is,8711:ql,8712:Hs,8715:Hs,8722:vo,8723:vo,8725:ls,8726:ls,8727:B,8728:Xl,8729:Xl,8730:[.2,.8,0,0,.83334],8733:Ml,8734:Lo,8736:Ct,8739:to,8741:ls,8743:Ws,8744:Ws,8745:Ws,8746:Ws,8747:[.19444,.69444,.11111,0,.41667],8764:Cn,8768:[.19444,.69444,0,0,.27778],8771:dl,8773:[-.022,.589,0,0,1],8776:rc,8781:dl,8784:[-.133,.67,0,0,.778],8801:dl,8804:Wn,8805:Wn,8810:tl,8811:tl,8826:Ei,8827:Ei,8834:Ei,8835:Ei,8838:Wn,8839:Wn,8846:Ws,8849:Wn,8850:Wn,8851:Ws,8852:Ws,8853:vo,8854:vo,8855:vo,8856:vo,8857:vo,8866:_,8867:_,8868:Ys,8869:Ys,8872:[.249,.75,0,0,.867],8900:Xl,8901:[-.05555,.44445,0,0,.27778],8902:B,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:P,8969:P,8970:P,8971:P,8994:j,8995:j,9136:se,9137:se,9651:Ce,9657:B,9661:Ce,9667:B,9711:el,9824:ve,9825:ve,9826:ve,9827:ve,9837:[0,.75,0,0,.38889],9838:$e,9839:$e,10216:os,10217:os,10222:se,10223:se,10229:[.011,.511,0,0,1.609],10230:ut,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:ut,10815:ss,10927:Wn,10928:Wn,57376:rt},"Math-BoldItalic":{32:Jt,48:Pt,49:Pt,50:Pt,51:dt,52:dt,53:dt,54:li,55:dt,56:li,57:dt,65:Vi,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:fn,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:tr,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:qt,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Sn,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:Jt,915:[0,.68611,.15972,0,.65694],916:an,920:[0,.68611,.03194,0,.86722],923:Zt,926:[0,.68611,.07458,0,.84125],928:fn,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:zr,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:Sn,960:[0,.44444,.03704,0,.68241],961:Zr,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:Zr,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Jt,48:qi,49:qi,50:qi,51:Mr,52:Mr,53:Mr,54:mo,55:Mr,56:mo,57:Mr,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:ba,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Yt,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:ia,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:Jt,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Yt,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:ba,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:ia,960:[0,.43056,.03588,0,.57003],961:ya,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:ya,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Jt,33:[0,.69444,0,0,.36667],34:Po,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:oa,40:Va,41:Va,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:on,49:on,50:on,51:on,52:on,53:on,54:on,55:on,56:on,57:on,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Aa,64:hn,65:hn,66:hn,67:Ga,68:Nr,69:[0,.69444,0,0,.64167],70:_,71:hn,72:Nr,73:[0,.69444,0,0,.33056],74:Aa,75:Xn,76:Co,77:[0,.69444,0,0,.97778],78:Nr,79:Nr,80:Ga,81:[.10556,.69444,0,0,.79445],82:Ga,83:_,84:hn,85:Xn,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:hn,89:[0,.69444,.0275,0,.73334],90:qa,91:sn,93:sn,94:on,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:On,99:[0,.45833,0,0,.48889],100:On,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:On,105:Vr,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Vr,109:[0,.45833,0,0,.86667],110:Fn,111:[0,.45833,0,0,.55],112:Ai,113:Ai,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Fn,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:Jt,168:on,176:hn,180:on,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:on,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:on,729:oa,730:hn,732:on,733:on,915:Co,916:[0,.69444,0,0,.91667],920:ci,923:qa,926:hn,928:Nr,931:Nr,933:ci,934:Nr,936:ci,937:Nr,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:oa,8217:oa,8220:Po,8221:Po},"SansSerif-Italic":{32:Jt,33:[0,.69444,.05733,0,.31945],34:qe,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:Ge,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Dt,45:[0,.44444,.01946,0,.33333],46:We,47:[.25,.75,.13164,0,.5],48:m,49:m,50:m,51:m,52:m,53:m,54:m,55:m,56:m,57:m,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:Ft,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:M,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:er,77:[0,.69444,.08094,0,.875],78:M,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:R,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:Jt,168:[0,.67937,.06385,0,.5],176:K,184:A,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:R,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:ie,715:ca,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:K,732:[0,.67659,.08826,0,.5],733:ie,915:[0,.69444,.13372,0,.54167],916:Lr,920:[0,.69444,.07555,0,.77778],923:_,926:[0,.69444,.12816,0,.66667],928:M,931:[0,.69444,.11983,0,.72222],933:oe,934:[0,.69444,.04603,0,.72222],936:oe,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ge,8217:Ge,8220:[0,.69444,.14205,0,.5],8221:qe},"SansSerif-Regular":{32:Jt,33:[0,.69444,0,0,.31945],34:ca,35:Qe,36:Is,37:Ot,38:[0,.69444,0,0,.75834],39:Mo,40:os,41:os,42:kt,43:vo,44:Dt,45:[0,.44444,0,0,.33333],46:We,47:ls,48:st,49:st,50:st,51:st,52:st,53:st,54:st,55:st,56:st,57:st,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:Qt,64:Ft,65:Ft,66:Ft,67:ho,68:[0,.69444,0,0,.72223],69:Sr,70:[0,.69444,0,0,.56945],71:Ft,72:Ut,73:Mo,74:Qt,75:[0,.69444,0,0,.69445],76:er,77:[0,.69444,0,0,.875],78:Ut,79:[0,.69444,0,0,.73611],80:ho,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:ll,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:Ft,89:[0,.69444,.025,0,.66667],90:_,91:ft,93:ft,94:ca,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:sr,99:Ar,100:sr,101:Ar,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:sr,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:ua,111:[0,.44444,0,0,.5],112:Pr,113:Pr,114:[0,.44444,.01389,0,.34167],115:Cr,116:[0,.57143,0,0,.36111],117:ua,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:Jt,168:[0,.67937,0,0,.5],176:Ft,184:A,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:ca,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:ca,715:ca,728:ca,729:[0,.67937,0,0,.27778],730:Ft,732:[0,.67659,0,0,.5],733:ca,915:er,916:Lr,920:Ys,923:_,926:Ft,928:Ut,931:Vo,933:Ys,934:Vo,936:Ys,937:Vo,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Mo,8217:Mo,8220:ca,8221:ca},"Script-Regular":{32:Jt,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:Jt},"Size1-Regular":{32:Jt,40:Jn,41:Jn,47:$n,91:mn,92:$n,93:mn,123:rn,125:rn,160:Jt,710:Tr,732:Tr,770:Tr,771:Tr,8214:[-99e-5,.601,0,0,.77778],8593:ln,8595:ln,8657:vr,8659:vr,8719:vn,8720:vn,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:xa,8748:_n,8749:_n,8750:xa,8896:$a,8897:$a,8898:$a,8899:$a,8968:Kr,8969:Kr,8970:Kr,8971:Kr,9168:pi,10216:Kr,10217:Kr,10752:$r,10753:$r,10754:$r,10756:$a,10758:$a},"Size2-Regular":{32:Jt,40:Da,41:Da,47:da,91:Ra,92:da,93:Ra,123:An,125:An,160:Jt,710:Dn,732:Dn,770:Dn,771:Dn,8719:Yn,8720:Yn,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:La,8748:Xa,8749:Xa,8750:La,8896:Ln,8897:Ln,8898:Ln,8899:Ln,8968:Na,8969:Na,8970:Na,8971:Na,10216:ai,10217:ai,10752:ui,10753:ui,10754:ui,10756:Ln,10758:Ln},"Size3-Regular":{32:Jt,40:Qn,41:Qn,47:bi,91:Rr,92:bi,93:Rr,123:Oi,125:Oi,160:Jt,710:Ja,732:Ja,770:Ja,771:Ja,8730:[.95003,1.45,0,0,1],8968:di,8969:di,8970:di,8971:di,10216:Oi,10217:Oi},"Size4-Regular":{32:Jt,40:fi,41:fi,47:Ya,91:hi,92:Ya,93:hi,123:yi,125:yi,160:Jt,710:Un,732:Un,770:Un,771:Un,8730:[1.25003,1.75,0,0,1],8968:Eo,8969:Eo,8970:Eo,8971:Eo,9115:Oa,9116:Ia,9117:Oa,9118:Oa,9119:Ia,9120:Oa,9121:Fa,9122:pi,9123:Fa,9124:Fa,9125:pi,9126:Fa,9127:Uo,9128:Ta,9129:Xi,9130:[0,.3,0,0,.88889],9131:Uo,9132:Ta,9133:Xi,9143:[.88502,.915,0,0,1.05556],10216:yi,10217:yi,57344:xi,57345:xi,57680:jn,57681:jn,57682:jn,57683:jn},"Typewriter-Regular":{32:sa,33:nt,34:nt,35:nt,36:In,37:In,38:nt,39:nt,40:In,41:In,42:[0,.52083,0,0,.525],43:wa,44:[.13889,.125,0,0,.525],45:wa,46:[0,.125,0,0,.525],47:In,48:nt,49:nt,50:nt,51:nt,52:nt,53:nt,54:nt,55:nt,56:nt,57:nt,58:fa,59:[.13889,.43056,0,0,.525],60:ro,61:[-.19549,.41562,0,0,.525],62:ro,63:nt,64:nt,65:nt,66:nt,67:nt,68:nt,69:nt,70:nt,71:nt,72:nt,73:nt,74:nt,75:nt,76:nt,77:nt,78:nt,79:nt,80:nt,81:[.13889,.61111,0,0,.525],82:nt,83:nt,84:nt,85:nt,86:nt,87:nt,88:nt,89:nt,90:nt,91:In,92:In,93:In,94:nt,95:[.09514,0,0,0,.525],96:nt,97:fa,98:nt,99:fa,100:nt,101:fa,102:nt,103:Ua,104:nt,105:nt,106:[.22222,.61111,0,0,.525],107:nt,108:nt,109:fa,110:fa,111:fa,112:Ua,113:Ua,114:fa,115:fa,116:[0,.55358,0,0,.525],117:fa,118:fa,119:fa,120:fa,121:Ua,122:fa,123:In,124:In,125:In,126:nt,127:nt,160:sa,176:nt,184:[.19445,0,0,0,.525],305:fa,567:Ua,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:nt,715:nt,728:nt,730:nt,770:nt,771:nt,776:nt,915:nt,916:nt,920:nt,923:nt,926:nt,928:nt,931:nt,933:nt,934:nt,936:nt,937:nt,8216:nt,8217:nt,8242:nt,9251:[.11111,.21944,0,0,.525]}},Sa=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,Ji=10,Ht=.25,Hr=1.2,Rn=.431,Di={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[Rn,Rn,Rn],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[Ht,Ht,Ht],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},za=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],cs=5,Ts={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function jo(e,t){e===void 0&&(e=77);const r=zn[t][e];if(r)return{defaultMetrics:!1,depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const n=String.fromCodePoint(e);if(n in Ts)e=Ts[n].codePointAt(0);else if(Sa.test(n))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var ys={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Li={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Fi={doubleleftarrow:`M262 157
|
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
|
|
|
c -179 0 -524 -115 -524 -115
|
|
|
c -5 -1 -9 -5 -9 -10
|
|
|
c 0 -1 1 -2 1 -3
|
|
|
l 4 -22
|
|
|
c 1 -5 5 -9 11 -9
|
|
|
h 2
|
|
|
s 338 93 512 92
|
|
|
c 174 0 513 -92 513 -92
|
|
|
h 2
|
|
|
c 5 0 9 4 11 9
|
|
|
l 5 22
|
|
|
c 1 6 -2 12 -8 13
|
|
|
c 0 0 -342 115 -520 115
|
|
|
z
|
|
|
`,leftgroup:`M400000 80
|
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function no(e){if(Li[e]){const[h,v,k]=Li[e],I=`<span class="stretchy" style="height:${k}em"><svg width="100%" height="${k}em" viewBox="0 0 ${h} ${v}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Fi[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*k/2)/100}em;min-width:0">${I}</span>`}const[t,r,n,a]=ys[e];let i,s;const u=n/1e3;t.length===3?(i=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],s=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(i=["slice-1-of-2","slice-2-of-2"],s=["xMinYMin","xMaxYMin"]):(i=["slice-1-of-1"],s=[a]);const d=t.map((h,v)=>`<span class="${i[v]}" style=height:${u}em><svg width=400em height=${u}em viewBox="0 0 400000 ${n}" preserveAspectRatio="${s[v]} slice"><path fill="currentcolor" d="${Fi[h]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${u}em;min-width:${r}em;">${d}</span>`}function Ii(e){return ys[e]?ys[e][2]/1e3:Li[e][2]}function $o(e){const t=[];for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n===13&&e.charCodeAt(r+1)===10&&(n=10,r++),(n===13||n===12)&&(n=10),n===0&&(n=65533),n>=55296&&n<=56319){const a=e.charCodeAt(r+1);if(a>=56320&&a<=57343){const i=n-55296,s=a-56320;n=Sc(2,16)+i*Sc(2,10)+s,r++}}t.push(n)}return t}var Go=8205,us=[[Go,1],[65038,2],[127995,5],[129456,4],[917536,96]],Ro,xs=[127462,127487];function Zs(e){var t;if(Ro===void 0){Ro={};for(const r of us)for(let n=r[0];n<=r[0]+r[1]-1;n++)Ro[n]=!0}return(t=Ro[e])!=null?t:!1}function zi(e){return e>=xs[0]&&e<=xs[1]}function rl(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;const t=[],r=$o(e);let n=0;for(;n<r.length;){const a=r[n++],i=r[n];if(i===Go){const s=n-1;for(n+=2;r[n]===Go;)n+=2;t.push(String.fromCodePoint(...r.slice(s,n-s+1)))}else if(Zs(i)){const s=n-1;for(;Zs(r[n]);)n+=r[n]===Go?2:1;t.push(String.fromCodePoint(...r.slice(s,2*n-s-1)))}else zi(a)?(n+=1,t.push(String.fromCodePoint(...r.slice(n-2,2)))):t.push(String.fromCodePoint(a))}return t}var rr=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=rl(e)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(e){const t=typeof this.s=="string"?e.exec(this.s.slice(this.pos)):e.exec(this.s.slice(this.pos).join(""));return t!=null&&t[0]?(this.pos+=t[0].length,t[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const e=this.get();if(e==="\\"){if(!this.end()){let t=this.match(/^[a-zA-Z\*]+/);return t?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):t=this.get(),"\\"+t}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();const t=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(t)return String.fromCodePoint(Number.parseInt(t.slice(t.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let t=!1;if(/[\d?@]/.test(this.peek())&&(t=!0,this.pos+1<this.s.length)){const r=this.s[this.pos+1];t=/[^\dA-Za-z]/.test(r)}return t?"#"+this.get():"#"}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return e}};function Jr(e,t){var r,n,a,i;const s=[];let u=e.next();if(u&&u!=="\\relax"){if(u==="\\noexpand")u=e.next(),u&&s.push(u);else if(u==="\\obeyspaces")e.obeyspaces=!0;else if(u==="\\bgroup")s.push("<{>");else if(u==="\\egroup")s.push("<}>");else if(u==="\\string"){if(u=e.next(),u)if(u.startsWith("\\"))for(const d of u)s.push(d==="\\"?"\\backslash":d);else u==="<{>"?s.push("\\{"):u==="<space>"?s.push("~"):u==="<}>"&&s.push("\\}")}else if(u==="\\csname"){for(;e.peek()==="<space>";)e.next();let d="",h=!1,v=[];do{if(v.length===0)if(/^#[\d?@]$/.test(e.peek())){const k=e.get().slice(1);v=ha((n=(r=t==null?void 0:t(k))!=null?r:t==null?void 0:t("?"))!=null?n:"\\placeholder{}",t),u=v[0]}else u=e.next(),v=u?[u]:[];h=v.length===0,!h&&u==="\\endcsname"&&(h=!0,v.shift()),h||(h=u==="<$>"||u==="<$$>"||u==="<{>"||u==="<}>"||typeof u=="string"&&u.length>1&&u.startsWith("\\")),h||(d+=v.shift())}while(!h);d&&s.push("\\"+d),s.push(...v)}else if(u!=="\\endcsname")if(u.length>1&&u.startsWith("#")){const d=u.slice(1);s.push(...ha((i=(a=t==null?void 0:t(d))!=null?a:t==null?void 0:t("?"))!=null?i:"\\placeholder{}",t))}else s.push(u)}return s}function ha(e,t=null){const r=[];let n="";for(const s of e.toString().split(/\r?\n/)){n&&r.push(n),n=" ";const u=s.match(/((?:\\%)|[^%])*/);u!==null&&r.push(u[0])}const a=new rr(Xe(r.join(""))),i=[];do i.push(...Jr(a,t));while(!a.end());return i}function Xt(e){let t="";const r=[];for(const n of e)n&&(t&&/^[a-zA-Z\*]/.test(n)&&r.push(t),r.push(n),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(n)&&r.push(" "),t=/\\[a-zA-Z]+\*?$/.test(n)?" ":"");return r.join("")}function Er(e,...t){return console.assert(e.startsWith("\\")),t.length===0?e:Xt([e,...t.map(r=>`{${r}}`)])}function ts(e){return Xt(e.map(t=>{var r;return(r={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?r:t}))}var Bs=class gd{constructor(t){gd._registry[t]=this}static createAtom(t,r,n){return gd._registry[t].createAtom(r,un(r,t),n)}static serialize(t,r){var n;if(!t||t.length===0)return"";if((n=r.skipStyles)!=null&&n){const a=[];for(const i of ws(t)){const s=gd._registry[i[0].mode];a.push(...s.serialize(i,r))}return Xt(a)}return Xt($l(t,r))}static getFont(t,r,n){return gd._registry[t].getFont(r,n)}};Bs._registry={};var ao=Bs;function ws(e){const t=[];let r=[],n="NONE";for(const a of e)a.type!=="first"&&(a.mode!==n?(r.length>0&&t.push(r),r=[a],n=a.mode):r.push(a));return r.length>0&&t.push(r),t}function wi(e,t){const r=[];let n=[],a;for(const i of e)if(i.type!=="first"&&i.style){let s;t==="variant"?(s=i.style.variant,i.style.variantStyle&&i.style.variantStyle!=="up"&&(s+="-"+i.style.variantStyle)):s=i.style[t],s===a?n.push(i):(n.length>0&&r.push(n),n=[i],a=s)}return n.length>0&&r.push(n),r}function fl(e,t){var r;const{parent:n}=e[0],a=n==null?void 0:n.computedStyle.color,i=[];for(const s of ws(e)){const u=t.defaultMode;for(const d of wi(s,"color")){const h=d[0].computedStyle,v=ao._registry[d[0].mode].serialize(d,p(C({},t),{defaultMode:u==="text"?"text":"math"}));!t.skipStyles&&h.color&&h.color!=="none"&&(!n||a!==h.color)?i.push(Er("\\textcolor",(r=h.verbatimColor)!=null?r:h.color,Xt(v))):i.push(Xt(v))}}return i}function hl(e,t){const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.backgroundColor;return wi(e,"backgroundColor").map(a=>{var i;if(a.length>0||a[0].type!=="box"){const s=a[0].computedStyle;if(s.backgroundColor&&s.backgroundColor!=="none"&&(!r||n!==s.backgroundColor))return Er("\\colorbox",(i=s.verbatimBackgroundColor)!=null?i:s.backgroundColor,Xt(fl(a,p(C({},t),{defaultMode:"text"}))))}return Xt(fl(a,t))})}function $l(e,t){if(e.length===0)return[];const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.fontSize,a=[];for(const i of wi(e,"fontSize")){const s=i[0].computedStyle.fontSize,u=hl(i,t);u&&(s&&s!=="auto"&&(!r||n!==s)?a.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][s],...u):a.push(...u))}return a}function Ss(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function pl(e){if(e.length===0)return"ord";const t=Ss(e[0].type),r=Ss(e[e.length-1].type);return t&&t===r?t:"ord"}function ds(e,t){if(typeof e=="string")return e;if(typeof e=="number"){console.assert(Number.isFinite(e));const r=Math.ceil(100*e)/100;return r===0?"0":r.toString()+(t!=null?t:"")}return""}var Je=class Qh{constructor(t,r){var n,a,i,s,u;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:T(t)?this.children=t.filter(h=>h!==null):t&&t instanceof Qh&&(this.children=[t]),this.children)for(const h of this.children)h.parent=this;this.type=(n=r==null?void 0:r.type)!=null?n:"ignore",this.isSelected=(r==null?void 0:r.isSelected)===!0,r!=null&&r.caret&&(this.caret=r.caret),this.classes=(a=r==null?void 0:r.classes)!=null?a:"",this.isTight=(i=r==null?void 0:r.isTight)!=null?i:!1,r!=null&&r.attributes&&(this.attributes=r.attributes);let d=r==null?void 0:r.fontFamily;r!=null&&r.style&&this.value&&(d=(u=ao.getFont((s=r.mode)!=null?s:"math",this,p(C({variant:"normal"},r.style),{letterShapeStyle:r.letterShapeStyle})))!=null?u:void 0),d||(d="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(r==null?void 0:r.maxFontSize)!==void 0&&(this.maxFontSize=r.maxFontSize),Qa(this,d)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(const r of this.children)r.selected(t)}setStyle(t,r,n){if(r===void 0)return;const a=ds(r,n);a.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=a)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=ds(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=ds(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=ds(t,"em")))}set bottom(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=ds(t,"em")))}get width(){return this._width*this.scale}set width(t){this._width=t,this.hasExplicitWidth=!0}set softWidth(t){}get height(){return this._height*this.scale}set height(t){this._height=t}get depth(){return this._depth*this.scale}set depth(t){this._depth=t}wrap(t){const r=t.parent;if(!r)return this;t.isPhantom&&this.setStyle("opacity",0);const n=t.color;n&&n!==r.color&&this.setStyle("color",n);let a=t.backgroundColor;this.isSelected&&(a=Ee(a)),a&&a!==r.backgroundColor&&(this.setStyle("background-color",a),this.setStyle("display","inline-block"));const i=t.scalingFactor;return this.scale=i,this.skew*=i,this.italic*=i,this}toMarkup(){var t,r,n,a;let i=(t=this.value)!=null?t:"";if(this.children)for(const z of this.children)i+=z.toMarkup();let s="";if(this.svgBody)s=no(this.svgBody);else if(this.svgOverlay){s='<span style="',s+="display: inline-block;",s+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,s+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,s+='">',s+=i,s+="</span>",s+='<svg style="position:absolute;overflow:visible;',s+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const z=(r=this.cssProperties)==null?void 0:r.padding;z?(s+=`top:${z};`,s+=`left:${z};`,s+=`width:calc(100% - 2 * ${z} );`):s+="top:0;left:0;width:100%;",s+="z-index:2;",s+='"',this.svgStyle&&(s+=this.svgStyle),s+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,s+=`>${this.svgOverlay}</svg>`}let u="";const d=this.classes.split(" ");d.push((n={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?n:""),this.caret==="latex"&&d.push("ML__latex-caret"),this.isSelected&&d.push("ML__selected");const h=d.length===1?d[0]:d.filter((z,W,ye)=>z.length>0&&ye.indexOf(z)===W).join(" ");if(h.length>0&&(u+=` class="${h}"`),this.id&&(u+=` data-atom-id=${this.id}`),this.cssId&&(u+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(u+=" "+Object.keys(this.attributes).map(z=>`${z}="${this.attributes[z]}"`).join(" ")),this.htmlData){const z=this.htmlData.split(",");for(const W of z){const ye=W.match(/([^=]+)=(.+$)/);if(ye){const lt=ye[1].trim().replace(/ /g,"-");lt&&(u+=` data-${lt}="${ye[2]}" `)}else{const lt=W.trim().replace(/ /g,"-");lt&&(u+=` data-${lt} `)}}}const v=(a=this.cssProperties)!=null?a:{};this.hasExplicitWidth&&v.width===void 0&&(v.width=`${Math.ceil(this._width*100)/100}em`);const k=Object.keys(v).map(z=>`${z}:${v[z]}`);if(this.scale!==void 0&&this.scale!==1&&(i.length>0||s.length>0)&&k.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const z=this.htmlStyle.split(";");let W="";for(const ye of z){const lt=ye.match(/([^=]+):(.+$)/);if(lt){const pe=lt[1].trim().replace(/ /g,"-");pe&&(W+=`${pe}:${lt[2]};`)}}W&&(u+=` style="${W}"`)}k.length>0&&(u+=` style="${k.join(";")}"`);let I="";return u.length>0||s.length>0?I=`<span${u}>${i}${s}</span>`:I=i,this.caret==="text"?I+='<span class="ML__text-caret"></span>':this.caret==="math"&&(I+='<span class="ML__caret"></span>'),I}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;const r=this.children&&this.children.length>0,n=t.children&&t.children.length>0;if(r||n)return!1;if(t.cssProperties||this.cssProperties){for(const d of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(t.cssProperties&&d in t.cssProperties||this.cssProperties&&d in this.cssProperties)return!1}const a=this.cssProperties?Object.keys(this.cssProperties).length:0,i=t.cssProperties?Object.keys(t.cssProperties).length:0;if(a!==i)return!1;if(a>0){for(const d of Object.keys(this.cssProperties))if(this.cssProperties[d]!==t.cssProperties[d])return!1}const s=this.classes.trim().replace(/\s+/g," ").split(" "),u=t.classes.trim().replace(/\s+/g," ").split(" ");if(s.length!==u.length)return!1;s.sort(),u.sort();for(const[d,h]of s.entries())if(h==="vertical-separator"||h!==u[d])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};function Rl(e){if(!e||e.length===0)return[];e[0].children=Rl(e[0].children);const t=[e[0]];for(let r=1;r<e.length;r++)t[t.length-1].tryCoalesceWith(e[r])||(e[r].children=Rl(e[r].children),t.push(e[r]));return t}function Nl(e){return e.children&&(e.children=Rl(e.children)),e}function ja(e,t){if(!e)return new Je(null,t);const r=new Je(null,{classes:"ML__strut",type:"ignore"});r.setStyle("height",Math.max(0,e.height),"em");const n=[r];if(e.depth!==0){const a=new Je(null,{classes:"ML__strut--bottom",type:"ignore"});a.setStyle("height",e.height+e.depth,"em"),a.setStyle("vertical-align",-e.depth,"em"),n.push(a)}return n.push(e),new Je(n,p(C({},t),{type:"lift"}))}function Gn(e){const t=Ii(e)/2,r=new Je(null,{maxFontSize:0});return r.height=t+.166,r.depth=t-.166,r.svgBody=e,r}function Qa(e,t){var r;if(e.type==="latex"){e.height=.9,e.depth=.2,e._width=1;return}if(e.value){e.height=-1/0,e.depth=-1/0,e._width=0,e.skew=-1/0,e.italic=-1/0;for(let n=0;n<e.value.length;n++){const a=jo(e.value.codePointAt(n),t);e.height=Math.max(e.height,a.height),e.depth=Math.max(e.depth,a.depth),e._width+=a.width,e.skew=a.skew,e.italic=a.italic}return}if(e.children&&e.children.length>0){let n=-1/0,a=-1/0,i=0;for(const s of e.children)s.height>n&&(n=s.height),s.depth>a&&(a=s.depth),i=Math.max(i,(r=s.maxFontSize)!=null?r:0);e.height=n,e.depth=a,e._width=e.children.reduce((s,u)=>s+u.width,0),e.maxFontSize=i}}function No(e){if("individualShift"in e){const t=e.individualShift;let r=t[0];const n=[r],a=-r.shift-r.box.depth;let i=a;for(let s=1;s<t.length;s++){const u=t[s],d=-u.shift-i-u.box.depth,h=d-(r.box.height+r.box.depth);i=i+d,n.push(h),n.push(u),r=u}return[n,a]}if("top"in e){let t=e.top;for(const r of e.children)t-=typeof r=="number"?r:r.box.height+r.box.depth;return[e.children,t]}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){const t=e.firstBaseline[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.firstBaseline,-t.box.depth]}else if("shift"in e){const t=e.children[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.children,-t.box.depth-e.shift]}}return[null,0]}function qo(e){var t;const[r,n]=No(e);if(!r)return[[],0,0];const a=new Je(null,{classes:"pstrut"});let i=0;for(const W of r)if(typeof W!="number"){const ye=W.box;i=Math.max(i,ye.maxFontSize,ye.height)}i+=2,a.height=i,a.setStyle("height",i,"em");const s=[];let u=n,d=n,h=n,v=0;for(const W of r){if(typeof W=="number")h+=W;else{const ye=W.box,lt=(t=W.classes)!=null?t:[],pe=new Je([a,ye],{classes:lt.join(" "),style:W.style});ye.setStyle("height",ye.height+ye.depth,"em"),ye.setStyle("display","inline-block"),pe.setStyle("top",-i-h-ye.depth,"em"),W.marginLeft&&pe.setStyle("margin-left",W.marginLeft,"em"),W.marginRight&&pe.setStyle("margin-right",W.marginRight,"em"),s.push(pe),h+=ye.height+ye.depth,v=Math.max(v,pe.width)}u=Math.min(u,h),d=Math.max(d,h)}s.forEach(W=>{W.softWidth=v});const k=new Je(s,{classes:"vlist"});if(k.softWidth=v,k.height=d,k.setStyle("height",d,"em"),u>=0)return[[new Je(k,{classes:"vlist-r"})],d,-u];const I=new Je(new Je(null),{classes:"vlist"});I.height=-u,I.setStyle("height",-u,"em");const z=new Je(8203,{classes:"vlist-s",maxFontSize:0});return z.softWidth=0,z.height=0,z.depth=0,[[new Je([k,z],{classes:"vlist-r"}),new Je(I,{classes:"vlist-r"})],d,-u]}var _a=class extends Je{constructor(e,t){var r;const[n,a,i]=qo(e);super(n.length===1?n[0]:n,{type:t==null?void 0:t.type,classes:((r=t==null?void 0:t.classes)!=null?r:"")+" vlist-t"+(n.length===2?" vlist-t2":"")}),this.height=a,this.depth=i,this.softWidth=n.reduce((s,u)=>Math.max(s,u.width),0)}};function Vs(e,t){var r,n,a,i,s;const u=e.metrics,d=new Je(t.base),h=(r=t.baseShift)!=null?r:0,v=(n=t.slant)!=null?n:0;let k=0,I=0;t.above&&(k=(a=t.aboveShift)!=null?a:Math.max(u.bigOpSpacing1,u.bigOpSpacing3-t.above.depth)),t.below&&(I=(i=t.belowShift)!=null?i:Math.max(u.bigOpSpacing2,u.bigOpSpacing4-t.below.height));let z=null;if(t.below&&t.above){const W=u.bigOpSpacing5+t.below.height+t.below.depth+I+d.depth+h;z=new _a({bottom:W,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-v,classes:["ML__center"]},I,{box:d,classes:["ML__center"]},k,{box:t.above,marginLeft:v,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)z=new _a({top:d.height-h,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-v,classes:["ML__center"]},I,{box:d,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){const W=d.depth+h;z=new _a({bottom:W,children:[{box:d,classes:["ML__center"]},k,{box:t.above,marginLeft:v,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else{const W=d.depth+h;z=new _a({bottom:W,children:[{box:d},u.bigOpSpacing5]}).wrap(e)}return new Je(z,{type:(s=t.type)!=null?s:"op"})}var Jl=7,Ol=6,Cl=5,ko=4,ml=3,io=2,_s=1,oo=0,Ps=class{constructor(e,t,r){this.id=e,this.sizeDelta=t,this.cramped=r;const n={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(Di).reduce((a,i)=>p(C({},a),{[i]:Di[i][n]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return Cs[[oo,_s,oo,_s,io,ml,io,ml][this.id]]}get sub(){return Cs[[oo,oo,oo,oo,io,io,io,io][this.id]]}get fracNum(){return Cs[[oo,_s,oo,_s,io,ml,ko,Cl][this.id]]}get fracDen(){return Cs[[oo,oo,oo,oo,io,io,ko,ko][this.id]]}get cramp(){return Cs[[oo,oo,io,io,ko,ko,Ol,Ol][this.id]]}get isTight(){return this.sizeDelta<0}},Ms={7:new Ps(Jl,0,!1),6:new Ps(Ol,0,!0),5:new Ps(Cl,0,!1),4:new Ps(ko,0,!0),3:new Ps(ml,-3,!1),2:new Ps(io,-3,!0),1:new Ps(_s,-4,!1),0:new Ps(oo,-4,!0)},Cs=p(C({},Ms),{displaystyle:Ms[Jl],textstyle:Ms[Cl],scriptstyle:Ms[ml],scriptscriptstyle:Ms[_s]});function _c(e,t){var r;if(!e)return 0;const n={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:Ji,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(r=e.unit)!=null?r:"pt"];if(Number.isFinite(t)){const a=Sc(10,t);return Math.round(e.dimension/Ji*n*a)/a}return e.dimension*n}function Rc(e,t){if(e===null)return 0;const r=_c(e)/Ji;if(Number.isFinite(t)){const n=Sc(10,t);return Math.round(r*n)/n}return r}function Mc(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function Cc(e){let t=Mc(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${Mc(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${Mc(e.shrink)}`),t}function go(e){var t,r;if(e==null)return null;let n="";if("dimension"in e&&(n=`${e.dimension}${(t=e.unit)!=null?t:"pt"}`),"glue"in e&&(n=Cc(e)),"number"in e)if(!("base"in e)||e.base==="decimal")n=Number(e.number).toString();else if(e.base==="alpha")n=`\`${String.fromCodePoint(e.number)}`;else{const a=Math.round(e.number)>>>0;e.base==="hexadecimal"?(n=Number(a).toString(16).toUpperCase(),a<=255?n=n.padStart(2,"0"):a<=65535?n=n.padStart(4,"0"):a<=16777215?n=n.padStart(6,"0"):n=n.padStart(8,"0"),n=`"${n}`):e.base==="octal"&&(n=Number(a).toString(8),a<=63?n=n.padStart(2,"0"):a<=30583?n=n.padStart(4,"0"):n=n.padStart(8,"0"),n=`'${n}`)}return"register"in e&&("factor"in e&&(e.factor===-1?n="-":e.factor!==1&&(n=Number(e.factor).toString())),"global"in e&&e.global&&(n+="\\global"),n+=`\\${e.register}`),"string"in e&&(n=e.string),(r=e.relax)!=null&&r&&(n+="\\relax"),n}function ar(e,t){return e==null?null:"number"in e?p(C({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?p(C({},e),{factor:e.factor*t}):p(C({},e),{factor:t}):"dimension"in e?p(C({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:ar(e.glue,t),shrink:ar(e.shrink,t),grow:ar(e.grow,t)}:e.shrink?{glue:ar(e.glue,t),shrink:ar(e.shrink,t)}:e.grow?{glue:ar(e.glue,t),grow:ar(e.grow,t)}:{glue:ar(e.glue,t)}:null}var Mn={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function Ki(){return C({},Mn)}function so(){return{registers:Ki(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Oe.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:fr,backgroundColorMap:Lt,getMacro:e=>_i(e,Rt())}}var yr=class ep{constructor(t,r){var n,a,i,s,u,d,h,v,k,I,z,W,ye,lt,pe;let ze;t!=null&&t.parent?(this.parent=t.parent,ze=t.parent,this.registers={}):(ze=C(C({},so()),(n=t==null?void 0:t.from)!=null?n:{}),this.registers=ze.registers),ze.atomIdsSettings&&(this.atomIdsSettings=C({},ze.atomIdsSettings)),this.renderPlaceholder=ze.renderPlaceholder,this.isPhantom=(s=(i=t==null?void 0:t.isPhantom)!=null?i:(a=this.parent)==null?void 0:a.isPhantom)!=null?s:!1,this.letterShapeStyle=ze.letterShapeStyle,this.minFontScale=ze.minFontScale,r!=null&&r.color&&r.color!=="none"?this.color=r.color:this.color=(d=(u=this.parent)==null?void 0:u.color)!=null?d:"",r!=null&&r.backgroundColor&&r.backgroundColor!=="none"?this.backgroundColor=r.backgroundColor:this.backgroundColor=(v=(h=this.parent)==null?void 0:h.backgroundColor)!=null?v:"",r!=null&&r.fontSize&&r.fontSize!=="auto"&&r.fontSize!==((k=this.parent)==null?void 0:k.size)?this.size=r.fontSize:this.size=(z=(I=this.parent)==null?void 0:I.size)!=null?z:cs;let pt=(ye=(W=this.parent)==null?void 0:W.mathstyle)!=null?ye:Cs.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(ze instanceof ep)switch(t.mathstyle){case"cramp":pt=pt.cramp;break;case"superscript":pt=pt.sup;break;case"subscript":pt=pt.sub;break;case"numerator":pt=pt.fracNum;break;case"denominator":pt=pt.fracDen;break}switch(t.mathstyle){case"textstyle":pt=Cs.textstyle;break;case"displaystyle":pt=Cs.displaystyle;break;case"scriptstyle":pt=Cs.scriptstyle;break;case"scriptscriptstyle":pt=Cs.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=pt,this.smartFence=ze.smartFence,this.placeholderSymbol=ze.placeholderSymbol,this.colorMap=(lt=ze.colorMap)!=null?lt:Ve=>Ve,this.backgroundColorMap=(pe=ze.backgroundColorMap)!=null?pe:Ve=>Ve,this.getMacro=ze.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===Jl||this.mathstyle.id===Ol}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(za[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){var r;if((r=this.registers)!=null&&r[t])return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){const r=this.getRegister(t);if(typeof r=="number")return r;if(typeof r=="string")return Number(r)}getRegisterAsGlue(t){var r;if((r=this.registers)!=null&&r[t]){const n=this.registers[t];return typeof n=="object"&&"glue"in n?n:typeof n=="object"&&"dimension"in n?{glue:{dimension:n.dimension}}:typeof n=="number"?{glue:{dimension:n}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(t)}getRegisterAsEm(t,r){return Rc(this.getRegisterAsDimension(t),r)}getRegisterAsDimension(t){var r;if((r=this.registers)!=null&&r[t]){const n=this.registers[t];return typeof n=="object"&&"glue"in n?n.glue:typeof n=="object"&&"dimension"in n?n:typeof n=="number"?{dimension:n}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(t)}setRegister(t,r){if(r===void 0){delete this.registers[t];return}this.registers[t]=r}evaluate(t){if(!t||!("register"in t))return t;let r=this;if("global"in t&&t.global)for(;r.parent;)r=r.parent;let n=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(n=t.factor);const a=r.getRegister(t.register);if(a===void 0)return;if(typeof a=="string")return{string:Number(a).toString()+a};if(typeof a=="number")return{number:n*a};const i=r.evaluate(a);if(i!==void 0)return"string"in i?{string:Number(a).toString()+i.string}:"number"in i?{number:n*i.number}:"dimension"in i?p(C({},i),{dimension:n*i.dimension}):"glue"in i?p(C({},i),{glue:p(C({},i.glue),{dimension:n*i.glue.dimension}),shrink:i.shrink?p(C({},i.shrink),{dimension:n*i.shrink.dimension}):void 0,grow:i.grow?p(C({},i.grow),{dimension:n*i.grow.dimension}):void 0}):t}toDimension(t){const r=this.evaluate(t);return r===void 0?null:"dimension"in r?r:"glue"in r?r.glue:"number"in r?{dimension:r.number}:null}toEm(t,r){if(t===null)return 0;const n=this.toDimension(t);return n===null?0:_c(n,r)/Ji}toNumber(t){if(t===null)return null;const r=this.evaluate(t);return r===void 0?null:"number"in r?r.number:"dimension"in r?r.dimension:"glue"in r?r.glue.dimension:"string"in r?Number(r.string):null}toColor(t){var r,n;if(t===null)return null;const a=this.evaluate(t);return a===void 0?null:"string"in a?(n=(r=this.colorMap)==null?void 0:r.call(this,a.string))!=null?n:a.string:null}toBackgroundColor(t){var r,n;if(t===null)return null;const a=this.evaluate(t);return a===void 0?null:"string"in a?(n=(r=this.backgroundColorMap)==null?void 0:r.call(this,a.string))!=null?n:a.string:null}},El=["body","above","below","superscript","subscript"];function vl(e){return typeof e=="string"&&El.includes(e)}function Ec(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var De=class Pc{constructor(t){var r,n,a,i,s,u;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(n=(r=t.command)!=null?r:this.value)!=null?n:"",this.mode=(a=t.mode)!=null?a:"math",t.isFunction&&(this.isFunction=!0),t.limits&&(this.subsupPlacement=t.limits),this.style=C({},t.style),this.displayContainsHighlight=(i=t.displayContainsHighlight)!=null?i:!1,this.captureSelection=(s=t.captureSelection)!=null?s:!1,this.skipBoundary=(u=t.skipBoundary)!=null?u:!1,t.verbatimLatex!==void 0&&t.verbatimLatex!==null&&(this.verbatimLatex=t.verbatimLatex),t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,r,n){var a;if(!r)return null;const i=Mf(r),s=[];for(const d of i){const h=d[0].style,v=Cf(t,d,{style:{color:h.color,backgroundColor:h.backgroundColor,fontSize:h.fontSize}});v&&s.push(v)}if(s.length===0)return null;const u=((a=n==null?void 0:n.classes)!=null?a:"").trim();return s.length===1&&!u&&!(n!=null&&n.type)?s[0].wrap(t):new Je(s,{classes:u,type:n==null?void 0:n.type}).wrap(t)}static serialize(t,r){return ao.serialize(t,r)}static commonAncestor(t,r){if(t===r||t.parent===r.parent)return t.parent;const n=new WeakSet;let{parent:a}=t;for(;a;)n.add(a),a=a.parent;for(a=r.parent;a;){if(n.has(a))return a;a=a.parent}console.assert(!!a)}static fromJson(t){return typeof t=="string"?new Pc({type:"mord",value:t,mode:"math"}):new Pc(t)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=C({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=Ef(this.args)),this._branches)for(const r of Object.keys(this._branches))this._branches[r]&&(t[r]=this._branches[r].filter(n=>n.type!=="first").map(n=>n.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:t}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){if(t){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:r}=this;for(;r;)r.parent||r._changeCounter++,"verbatimLatex"in r&&(r.verbatimLatex=void 0),r._children=void 0,r=r.parent}}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):this.body&&this.command?Xt([Er(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?Xt([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(t){var r;return ao.serialize(this.body,p(C({},t),{defaultMode:(r=t.defaultMode)!=null?r:this.latexMode}))}aboveToLatex(t){return ao.serialize(this.above,t)}belowToLatex(t){return ao.serialize(this.below,t)}supsubToLatex(t){let r="";if(t=p(C({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){const n=ao.serialize(this.subscript,t);n.length===0?r+="_{}":n.length===1?/^[0-9]$/.test(n)?r+=`_${n}`:r+=`_{${n}}`:r+=`_{${n}}`}if(this.branch("superscript")!==void 0){const n=ao.serialize(this.superscript,t);n.length===0?r+="^{}":n.length===1?n==="\u2032"?r+="^\\prime ":n==="\u2033"?r+="^\\doubleprime ":/^[0-9]$/.test(n)?r+=`^${n}`:r+=`^{${n}}`:r+=`^{${n}}`}return r}get treeDepth(){let t=1,r=this.parent;for(;r;)r=r.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(vl(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];const t=[];for(const r of El)this._branches[r]&&t.push(r);return t}createBranch(t){return console.assert(vl(t)),vl(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return Ec(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Ec(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}get computedStyle(){var t,r;const n=typeof this.style.verbatimColor=="string",a=typeof this.style.verbatimBackgroundColor=="string",i=C(C({},(r=(t=this.parent)==null?void 0:t.computedStyle)!=null?r:{}),this.style);return delete i.variant,delete i.variantStyle,a||delete i.verbatimBackgroundColor,n||delete i.verbatimColor,i}applyStyle(t){this.isDirty=!0,this.style=C(C({},this.style),t),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const r of this.children)r.applyStyle(t)}getInitialBaseElement(){var t,r,n;return this.hasEmptyBranch("body")?this:(console.assert(((t=this.body)==null?void 0:t[0].type)==="first"),(n=(r=this.body[1])==null?void 0:r.getInitialBaseElement())!=null?n:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(t){const r=this.branch(t);return r?(console.assert(r.length>0),console.assert(r[0].type==="first"),r.length===1):!0}setChildren(t,r){var n;if(!t||(console.assert(vl(r)),!vl(r)))return;console.assert(((n=t[0])==null?void 0:n.type)!=="first");const a=[this.makeFirstAtom(r),...t];this._branches?this._branches[r]=a:this._branches={[r]:a};for(const i of t)i.parent=this,i.parentBranch=r;this.isDirty=!0}makeFirstAtom(t){const r=new Pc({type:"first",mode:this.mode});return r.parent=this,r.parentBranch=t,r}addChild(t,r){console.assert(t.type!=="first"),this.createBranch(r).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=r}addChildBefore(t,r){console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildAfter(t,r){console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildren(t,r){const n=this.createBranch(r);for(const a of t)a.parent=this,a.parentBranch=r,n.push(a);this.isDirty=!0}addChildrenAfter(t,r){console.assert(t.length===0||t[0].type!=="first"),console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,...t),this.isDirty=!0;for(const a of t)a.parent=this,a.parentBranch=r.parentBranch;return t[t.length-1]}removeBranch(t){const r=this.branch(t);if(vl(t)&&(this._branches[t]=void 0),!r)return[];for(const n of r)n.parent=void 0,n.parentBranch=void 0;return console.assert(r[0].type==="first"),r.shift(),this.isDirty=!0,r}removeChild(t){if(console.assert(t.parent===this),t.type==="first")return;const r=this.branch(t.parentBranch),n=r.indexOf(t);console.assert(n>=0),r.splice(n,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:t}=this;return t[t.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const t=[];for(const r of El)if(this._branches[r])for(const n of this._branches[r])t.push(...n.children),t.push(n);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;const r=un(this.command,this.mode);if(r!=null&&r.render)return r.render(this,t);const n=new yr({parent:t},this.style);let a=this.createBox(n,{classes:this.parent?"":"ML__base"});return a?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(a=this.attachSupsub(n,{base:a})),a.wrap(n)):null}attachSupsub(t,r){var n;const a=r.base,i=this.superscript,s=this.subscript;if(!i&&!s)return a;let u=null,d=null;const h=(n=r.isCharacterBox)!=null?n:this.isCharacterBox();let v=0;if(i){const ye=new yr({parent:t,mathstyle:"superscript"});u=Pc.createBox(ye,i),h||(v=a.height-t.metrics.supDrop*ye.scalingFactor)}let k=0;if(s){const ye=new yr({parent:t,mathstyle:"subscript"});d=Pc.createBox(ye,s),h||(k=a.depth+t.metrics.subDrop*ye.scalingFactor)}let I;t.isDisplayStyle?I=t.metrics.sup1:t.isCramped?I=t.metrics.sup3:I=t.metrics.sup2;const z=.5/Ji/t.scalingFactor;let W=null;if(d&&u){v=Math.max(v,I,u.depth+.25*t.metrics.xHeight),k=Math.max(k,t.metrics.sub2);const ye=t.metrics.defaultRuleThickness;if(v-u.depth-(d.height-k)<4*ye){k=4*ye-(v-u.depth)+d.height;const pe=.8*t.metrics.xHeight-(v-u.depth);pe>0&&(v+=pe,k-=pe)}const lt=this.isExtensibleSymbol&&a.italic?-a.italic:0;W=new _a({individualShift:[{box:d,shift:k,marginLeft:lt},{box:u,shift:-v}]}).wrap(t)}else d&&!u?(k=Math.max(k,t.metrics.sub1,d.height-.8*Rn),W=new _a({shift:k,children:[{box:d,marginRight:z,marginLeft:this.isCharacterBox()?-a.italic:0}]})):!d&&u&&(v=Math.max(v,I,u.depth+.25*Rn),W=new _a({shift:-v,children:[{box:u,marginRight:z}]}));return new Je([a,new Je(W,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:r.type})}attachLimits(t,r){const n=this.superscript?Pc.createBox(new yr({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,a=this.subscript?Pc.createBox(new yr({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!n&&!a?r.base.wrap(t):Vs(t,p(C({},r),{above:n,below:a}))}bind(t,r){if(!r||t.isPhantom||this.value==="\u200B")return r;let n=this.parent;for(;n&&!n.captureSelection;)n=n.parent;return n!=null&&n.captureSelection||(this.id||(this.id=t.makeID()),r.atomID=this.id),r}createBox(t,r){var n,a,i,s;const u=(n=this.value)!=null?n:this.body,d=(a=r==null?void 0:r.boxType)!=null?a:Ss(this.type);let h=(i=r==null?void 0:r.classes)!=null?i:"";this.mode==="text"&&(h+=" ML__text");const v=typeof u=="string"||u===void 0?new Je(u!=null?u:null,{type:d,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:p(C({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:h}):(s=Pc.createBox(t,u,{type:d,classes:h}))!=null?s:new Je(null);return t.isTight&&(v.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(v.italic=0),v.right=v.italic,this.bind(t,v),this.caret&&!this.superscript&&!this.subscript&&(v.caret=this.caret),v}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function Mf(e){let t;const r=[];let n=[];for(const a of e)if(!t&&!a.style)n.push(a);else{const i=a.computedStyle;t&&i.color===t.color&&i.backgroundColor===t.backgroundColor&&i.fontSize===t.fontSize?n.push(a):(n.length>0&&r.push(n),n=[a],t=i)}return n.length>0&&r.push(n),r}function Cf(e,t,r){var n,a,i,s,u;if(!t||t.length===0)return null;const d=new yr({parent:e},r.style),h=!((n=d.atomIdsSettings)!=null&&n.groupNumbers);let v=[];if(t.length===1){const I=t[0],z=I.render(d);z&&(h&&I.isSelected&&z.selected(!0),v=[z])}else{let I="",z=!0;for(const W of t){(a=d.atomIdsSettings)!=null&&a.groupNumbers&&I&&(z&&W.isDigit()||!z&&uu(W))&&(d.atomIdsSettings.overrideID=I);const ye=W.render(d);d.atomIdsSettings&&(d.atomIdsSettings.overrideID=void 0),ye&&((i=d.atomIdsSettings)!=null&&i.groupNumbers&&((W.isDigit()||uu(W))&&(!I||z!==W.isDigit())&&(z=W.isDigit(),I=(s=W.id)!=null?s:""),I&&(!(W.isDigit()||uu(W))||!W.hasEmptyBranch("superscript")||!W.hasEmptyBranch("subscript"))&&(I="")),h&&W.isSelected&&ye.selected(!0),v.push(ye))}}if(v.length===0)return null;const k=new Je(v,p(C({isTight:d.isTight},r),{type:(u=r.type)!=null?u:"lift"}));return k.isSelected=v.every(I=>I.isSelected),k.wrap(d)}function uu(e){return e.mode==="text"}function Ef(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof De?{atoms:t.map(r=>r.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(r=>r.toJson())}:t)}var Vc=class tp extends De{constructor(t,r,n){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=r,this.verbatimLatex=r,this.applyStyle(n)}static fromJson(t){return new tp(t.command,t.value,t.style)}render(t){const r=this.createBox(t);return this.caret&&(r.caret=this.caret),r}_serialize(t){var r;return(r=this.verbatimLatex)!=null?r:_r("text",this.value.codePointAt(0))}};function kf(e,t){if(e.direction===t.direction){const r=e.ranges.length;if(t.ranges.length===r){let n=0;for(;n<r&&Af(e.ranges[n],t.ranges[n])==="equal";)n++;return n===r?"equal":"different"}}return"different"}function Af(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function fs(e){let t=1/0,r=-1/0;for(const n of e.ranges)t=Math.min(t,n[0],n[1]),r=Math.max(r,n[0],n[1]);return[t,r]}function nc(e){return typeof e=="number"&&!Number.isNaN(e)}function kc(e){return Array.isArray(e)&&e.length===2}function Uc(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}function Df(e,t){const r=e.at(t);let n;if(r){n=r.mode;let a=r.parent;for(;!n&&a;)a&&(n=a.mode),a=a.parent}return n}function Lf(e,t){if(!t)return"";if(typeof t=="string")return t;if(!e||t.after===void 0)return t.value;let r=!1,n=!1,a=!1,i=!1,s=!1,u=!1,d=!1,h=!1,v=!1,k=!1,I=!1,z=!1,W=!1,ye=!1,lt=!1,pe=e[0],ze=0;for(;pe!=null&&pe.type&&/^(subsup|placeholder)$/.test(pe.type);)ze+=1,pe=e[ze];return r=!pe||pe.type==="first",pe&&(ye=pe.mode==="text",n=!ye&&pe.type==="mord"&&de.test(pe.value),a=!ye&&pe.type==="mord"&&/\d+$/.test(pe.value),i=!ye&&pe.isFunction,s=pe.type==="genfrac",u=pe.type==="surd",d=pe.type==="mbin",h=pe.type==="mrel",v=pe.type==="mop"||pe.type==="operator"||pe.type==="extensible-symbol",k=pe.type==="mpunct"||pe.type==="minner",I=pe.type==="array",z=pe.type==="mopen",W=pe.type==="mclose"||pe.type==="leftright",lt=pe.type==="space"),t.after.includes("nothing")&&r||t.after.includes("letter")&&n||t.after.includes("digit")&&a||t.after.includes("function")&&i||t.after.includes("frac")&&s||t.after.includes("surd")&&u||t.after.includes("binop")&&d||t.after.includes("relop")&&h||t.after.includes("operator")&&v||t.after.includes("punct")&&k||t.after.includes("array")&&I||t.after.includes("openfence")&&z||t.after.includes("closefence")&&W||t.after.includes("text")&&ye||t.after.includes("space")&<?t.value:""}function Wu(e,t,r){return r?Lf(e,r[t]):""}var bd={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function ac(e,t){var r;let n=(r=t==null?void 0:t.format)!=null?r:"auto";return n==="auto"&&([n,e]=If(e)),n==="ascii-math"?(e=e.replace(/\u2061/gu,""),e=e.replace(/\u3016/gu,"{"),e=e.replace(/\u3017/gu,"}"),e=e.replace(/([^\\])sinx/g,"$1\\sin x"),e=e.replace(/([^\\])cosx/g,"$1\\cos x "),e=e.replace(/\u2013/g,"-"),["ascii-math",$s(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function $s(e,t){var r,n,a;if(!e)return"";let i=!1,s;const u=(r=t.inlineShortcuts)!=null?r:bd;if(!i&&(e.startsWith("^")||e.startsWith("_"))&&(s=ic(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[0]+"{"+s.match+"}",e+=$s(s.rest,t),i=!0),i||(s=e.match(/^(sqrt|\u221A)(.*)/),s&&(s=ic(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt{"+((n=s.match)!=null?n:"\\placeholder{}")+"}",e+=$s(s.rest,t),i=!0)),i||(s=e.match(/^(\\cbrt|\u221B)(.*)/),s&&(s=ic(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt[3]{"+((a=s.match)!=null?a:"\\placeholder{}")+"}",e+=$s(s.rest,t),i=!0)),i||(s=e.match(/^abs(.*)/),s&&(s=ic(s[1],{inlineShortcuts:u,noWrap:!0}),e="\\left|"+s.match+"\\right|",e+=$s(s.rest,t),i=!0)),i||(s=e.match(/^["”“](.*?)["”“](.*)/),s&&(e="\\text{"+s[1]+"}",e+=$s(s[2],t),i=!0)),i||(s=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),s&&(e=yd(s[1],u),e+=$s(s[2],t),i=!0)),!i&&/^([fgh])[^a-zA-Z]/.test(e)&&(s=ic(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[1]==="("?e[0]+"\\left("+s.match+"\\right)":e[0]+s.match,e+=$s(s.rest,t),i=!0),i||(s=e.match(/^([a-zA-Z]+)(.*)/),s&&(e=yd(s[1],u),e+=$s(s[2],t),i=!0)),!i)if(s=ic(e,{inlineShortcuts:u,noWrap:!0}),s.match&&s.rest[0]==="/"){const d=ic(s.rest.slice(1),{inlineShortcuts:u,noWrap:!0});d.match&&(e="\\frac{"+s.match+"}{"+d.match+"}"+$s(d.rest,t)),i=!0}else s.match&&(e=e.startsWith("(")?"\\left("+s.match+"\\right)"+$s(s.rest,t):s.match+$s(s.rest,t),i=!0);return i||(s=e.match(/^(\s+)(.*)$/),s&&(e=" "+$s(s[2],t),i=!0)),e}function ic(e,t){let r="";e=e.trim();let n=e,a=e.charAt(0),i={"(":")","{":"}","[":"]"}[a];if(i){let s=1,u=1;for(;u<e.length&&s>0;)e[u]===a&&s++,e[u]===i&&s--,u++;s===0?(t.noWrap&&a==="("?r=$s(e.substring(1,u-1),t):(a==="{"&&i==="}"&&(a="\\{",i="\\}"),r="\\left"+a+$s(e.substring(1,u-1),t)+"\\right"+i),n=e.slice(Math.max(0,u))):(r=e.substring(1,u),n="")}else{let s=e.match(/^([a-zA-Z]+)/);if(s){let u=Wu(null,e,t.inlineShortcuts);if(u)return u=u.replace("_{#?}",""),u=u.replace("^{#?}",""),{match:u,rest:e.slice(u.length)}}if(s=e.match(/^([a-zA-Z])/),s)return{match:s[1],rest:e.slice(1)};if(s=e.match(/^(-)?\d+(\.\d*)?/),s)return{match:s[0],rest:e.slice(s[0].length)};/^\\(left|right)/.test(e)||(s=e.match(/^(\\[a-zA-Z]+)/),s&&(n=e.slice(s[1].length),r=s[1]))}return{match:r,rest:n}}function yd(e,t){let r=Wu(null,e,t);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=e,r}var xd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function wd(e){const t=e.trim();for(const r of xd)if(t.startsWith(r[0])&&t.endsWith(r[1]))return[!0,t.substring(r[0].length,t.length-r[1].length)];return[!1,e]}function If(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=wd(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}var Zu="$$",Tf="$$",Bf=(e,t,r)=>(xd.some(n=>t.startsWith(n[0])&&t.endsWith(n[1]))||(t=`${Zu} ${t} ${Tf}`),t),Sd=class _f{constructor(t){_f._modes[t]=this}static onPaste(t,r,n){var a;if(!r.contentEditable&&r.userSelect==="none")return r.model.announce("plonk"),!1;if(typeof n=="string"){const s=new DataTransfer;s.setData("text/plain",n),n=s}const i=new ClipboardEvent("paste",{clipboardData:n,cancelable:!0});return(a=r.host)!=null&&a.dispatchEvent(i)?_f._modes[t].onPaste(r,n):!1}static copyToClipboard(t,r){if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const n=t.model,a=n.selectionIsCollapsed?[0,n.lastOffset]:fs(n.selection),i=n.getValue(a,r);navigator.clipboard.writeText(i).then(()=>{},()=>t.model.announce("plonk"))}static onCopy(t,r){var n;if(!r.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const a=t.model,i=a.selectionIsCollapsed?[0,a.lastOffset]:fs(a.selection);let s=a.getAtoms(i);if(s.every(u=>u.mode==="text"||!u.mode))r.clipboardData.setData("text/plain",s.filter(u=>u instanceof Vc).map(u=>u.value).join(""));else if(s.every(u=>u.mode==="latex"))r.clipboardData.setData("text/plain",a.getAtoms(i,{includeChildren:!0}).map(u=>{var d;return(d=u.value)!=null?d:""}).join(""));else{let u;s.length===1&&s[0].verbatimLatex!==void 0?u=s[0].verbatimLatex:u=a.getValue(i,"latex-expanded"),r.clipboardData.setData("application/x-latex",u);try{r.clipboardData.setData("text/plain",t.options.onExport(t,u,i))}catch(d){}if(s.length===1){const d=s[0];(d.type==="root"||d.type==="group")&&(s=d.body.filter(h=>h.type!=="first"))}try{r.clipboardData.setData("application/json+mathlive",JSON.stringify(s.map(d=>d.toJson())))}catch(d){}if((n=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&n.ComputeEngine){const d=window.MathfieldElement.computeEngine;if(d)try{const h=d.jsonSerializationOptions;d.jsonSerializationOptions={metadata:["latex"]};const v=d.parse(a.getValue(i,"latex-unstyled"));d.jsonSerializationOptions=h;const k=JSON.stringify(v.json);k&&r.clipboardData.setData("application/json",k)}catch(h){}}}r.preventDefault()}static insert(t,r,n={}){var a;const i=n.mode==="auto"?t.mode:(a=n.mode)!=null?a:t.mode;return _f._modes[i].insert(t,r,n)}onPaste(t,r){return!1}insert(t,r,n){return!1}};Sd._modes={};var ii=Sd,Pf=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],_d={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Ac(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function Md(e){var t,r;return(r=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?r:e.querySelector(".ML__latex-caret")}function du(e){const t=Md(e);if(!t)return null;const r=t.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function Vu(e){var t;if(!e.parent)return"root";let r=(t=e.parent.id)!=null?t:"";return r+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,r}function Cd(e,t,r){if(!t)return null;const n=e.field.getBoundingClientRect(),a=t.right-t.left,i=t.bottom-t.top,s=Math.ceil(t.left-n.left+e.field.scrollLeft*r),u=Math.ceil(t.top-n.top);return{left:s,right:s+a,top:u,bottom:u+i}}function Ed(e){const t=e.getBoundingClientRect(),r=parseInt(getComputedStyle(e).marginRight),n={top:t.top-1,bottom:t.bottom,left:t.left,right:t.right-1+r};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return n;for(const a of e.children)if(a.nodeType===1&&"atomId"in a.dataset&&!a.classList.contains("pstrut")){const i=Ed(a);n.left=Math.min(n.left,i.left),n.right=Math.max(n.right,i.right),n.top=Math.min(n.top,i.top),n.bottom=Math.max(n.bottom,i.bottom)}return n}function jc(e,t){var r,n;if(!t.id)return null;let a=(n=(r=e.atomBoundsCache)==null?void 0:r.get(t.id))!=null?n:null;if(a!==null)return a;const i=e.field.querySelector(`[data-atom-id="${t.id}"]`);return a=i?Ed(i):null,e.atomBoundsCache&&(a?e.atomBoundsCache.set(t.id,a):e.atomBoundsCache.delete(t.id)),a!=null?a:null}function $f(e,t,r){const n=new Map;for(const a of e.model.getAtoms(t,{includeChildren:!0})){if(r!=null&&r.excludeAtomsWithBackground&&a.style.backgroundColor)continue;const i=e.field,s=i.offsetWidth;let d=Math.floor(i.getBoundingClientRect().width)/s;d=isNaN(d)?1:d;const h=Cd(e,jc(e,a),d);if(h){const v=Vu(a);if(n.has(v)){const k=n.get(v);n.set(v,{left:Math.min(k.left,h.left),right:Math.max(k.right,h.right),top:Math.min(k.top,h.top),bottom:Math.max(k.bottom,h.bottom)})}else n.set(v,h)}}return[...n.values()]}function kd(e,t){return e.model.selection.ranges.reduce((r,n)=>r.concat(...$f(e,n,t)),[])}function Uu(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function Ad(e){let t=0,r=0;const n=e.offsetWidth,a=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,r+=e.offsetLeft,e=e.offsetParent;return new DOMRect(r,t,n,a)}var Dd=`@keyframes ML__caret-blink {
|
|
|
0%,
|
|
|
100% {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
50% {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
}
|
|
|
.ML__container {
|
|
|
display: inline-flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
min-height: 39px;
|
|
|
/* Need some room for the virtual keyboard toggle */
|
|
|
width: 100%;
|
|
|
/* Encourage browsers to consider allocating a hardware accelerated
|
|
|
layer for this element. */
|
|
|
isolation: isolate;
|
|
|
/* Prevent the browser from trying to interpret touch gestures in the field */
|
|
|
/* "Disabling double-tap to zoom removes the need for browsers to
|
|
|
delay the generation of click events when the user taps the screen." */
|
|
|
touch-action: none;
|
|
|
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_selection-color: var(--selection-color, #000);
|
|
|
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
|
|
|
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
|
|
|
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
|
|
|
--_smart-fence-color: var(--smart-fence-color, currentColor);
|
|
|
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
|
|
|
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
|
|
|
--_correct-color: var(--correct-color, #10a000);
|
|
|
--_incorrect-color: var(--incorrect-color, #a01b00);
|
|
|
--_composition-background-color: var(--composition-background-color, #fff1c2);
|
|
|
--_composition-text-color: var(--composition-text-color, black);
|
|
|
--_composition-underline-color: var(--composition-underline-color, transparent);
|
|
|
}
|
|
|
/* This is the actual field content (formula) */
|
|
|
.ML__content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
align-self: center;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 2px 3px 2px 1px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle,
|
|
|
.ML__menu-toggle {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
flex-shrink: 0;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
padding: 0;
|
|
|
margin-right: 4px;
|
|
|
cursor: pointer;
|
|
|
/* Avoid some weird blinking with :hover */
|
|
|
border-radius: 8px;
|
|
|
border: 1px solid transparent;
|
|
|
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
color: hsl(var(--_hue), 40%, 50%);
|
|
|
fill: currentColor;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:hover,
|
|
|
.ML__menu-toggle:hover {
|
|
|
background: hsla(0, 0%, 70%, 0.3);
|
|
|
color: #333;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle > span,
|
|
|
.ML__menu-toggle > span {
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
/* The invisible element used to capture keyboard events. We're just trying
|
|
|
really hard to make sure it doesn't show. */
|
|
|
.ML__keyboard-sink {
|
|
|
display: inline-block;
|
|
|
resize: none;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
/* Need these for Microsoft Edge */
|
|
|
position: fixed;
|
|
|
clip: rect(0 0 0 0);
|
|
|
/* Need this to prevent iOS Safari from auto-zooming */
|
|
|
font-size: 1em;
|
|
|
font-family: KaTeX_Main;
|
|
|
line-height: 0.5;
|
|
|
/* On Chromium, if this is 0, no keyboard events are received */
|
|
|
}
|
|
|
[part="placeholder"] {
|
|
|
color: var(--neutral-400);
|
|
|
}
|
|
|
.ML__composition {
|
|
|
background: var(--_composition-background-color);
|
|
|
color: var(--_composition-text-color);
|
|
|
text-decoration: underline var(--_composition-underline-color);
|
|
|
}
|
|
|
.ML__caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__text-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__latex-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_latex-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.019em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__focused .ML__latex-caret::after,
|
|
|
.ML__focused .ML__text-caret::after,
|
|
|
.ML__focused .ML__caret::after {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.ML__focused .ML__text {
|
|
|
background: var(--_text-highlight-background-color);
|
|
|
}
|
|
|
/* When using smartFence, the anticipated closing fence is displayed
|
|
|
with this style */
|
|
|
.ML__smart-fence__close {
|
|
|
opacity: var(--_smart-fence-opacity);
|
|
|
color: var(--_smart-fence-color);
|
|
|
}
|
|
|
.ML__selected,
|
|
|
.ML__focused .ML__selected .ML__contains-caret,
|
|
|
.ML__focused .ML__selected .ML__smart-fence__close,
|
|
|
.ML__focused .ML__selected .ML__placeholder {
|
|
|
color: var(--_selection-color);
|
|
|
opacity: 1;
|
|
|
}
|
|
|
.ML__selection {
|
|
|
box-sizing: border-box;
|
|
|
background: var(--_selection-background-color) !important;
|
|
|
}
|
|
|
.ML__contains-caret.ML__close,
|
|
|
.ML__contains-caret.ML__open,
|
|
|
.ML__contains-caret > .ML__close,
|
|
|
.ML__contains-caret > .ML__open,
|
|
|
.ML__contains-caret .ML__sqrt-sign,
|
|
|
.ML__contains-caret .ML__sqrt-line {
|
|
|
color: var(--_caret-color);
|
|
|
}
|
|
|
.ML__contains-highlight {
|
|
|
box-sizing: border-box;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__focused .ML__contains-highlight {
|
|
|
background: var(--_contains-highlight-background-color);
|
|
|
}
|
|
|
.ML__raw-latex {
|
|
|
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
font-weight: 400;
|
|
|
font-size: 0.8em;
|
|
|
letter-spacing: -0.05em;
|
|
|
color: var(--_latex-color);
|
|
|
}
|
|
|
.ML__suggestion {
|
|
|
color: var(--neutral-500);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:focus {
|
|
|
outline: none;
|
|
|
border-radius: 8px;
|
|
|
border: 2px solid hsl(var(--_hue), 40%, 50%);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-pressed,
|
|
|
.ML__virtual-keyboard-toggle.is-active:hover,
|
|
|
.ML__virtual-keyboard-toggle.is-active {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to automatically show a
|
|
|
tooltip over a element on hover.
|
|
|
*/
|
|
|
[data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
[data-tooltip]::after {
|
|
|
content: attr(data-tooltip);
|
|
|
position: absolute;
|
|
|
display: block;
|
|
|
z-index: 2;
|
|
|
pointer-events: none;
|
|
|
right: auto;
|
|
|
top: calc(-100% - 4px);
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
border-radius: 4px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
text-align: center;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
/* Phone */
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
[data-tooltip]::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
menu [data-tooltip]::after {
|
|
|
left: 100%;
|
|
|
top: 0%;
|
|
|
}
|
|
|
menu .ML__base {
|
|
|
cursor: default;
|
|
|
}
|
|
|
/** Don't display if we're tracking, i.e. have the pointer down */
|
|
|
.tracking [data-tooltip]:hover::after {
|
|
|
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
/** But do display if tracking and inside a menu */
|
|
|
.tracking menu li[data-tooltip]:hover::after,
|
|
|
[data-tooltip]:hover::after {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
transition-property: opacity, scale;
|
|
|
transition-duration: 0.15s;
|
|
|
transition-delay: 1s;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__prompt {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.ML__editablePromptBox {
|
|
|
outline: 1px solid #acacac;
|
|
|
border-radius: 2px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__focusedPromptBox {
|
|
|
outline: highlight auto 1px;
|
|
|
}
|
|
|
.ML__lockedPromptBox {
|
|
|
background-color: rgba(142, 142, 141, 0.4);
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__correctPromptBox {
|
|
|
outline: 1px solid var(--_correct-color);
|
|
|
box-shadow: 0 0 5px var(--_correct-color);
|
|
|
}
|
|
|
.ML__incorrectPromptBox {
|
|
|
outline: 1px solid var(--_incorrect-color);
|
|
|
box-shadow: 0 0 5px var(--_incorrect-color);
|
|
|
}
|
|
|
.variant-submenu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding: 8px;
|
|
|
}
|
|
|
.variant-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
text-align: center;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.insert-matrix-submenu {
|
|
|
display: grid;
|
|
|
padding: 8px;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
}
|
|
|
.insert-matrix-submenu [part=menu-item] {
|
|
|
font-size: 21px;
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
line-height: 21px;
|
|
|
text-align: center;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.border-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
line-height: 1.2;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.swatches-submenu {
|
|
|
--_swatch-size: 2rem;
|
|
|
--_columns: 4;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
padding: 8px;
|
|
|
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.menu-swatch {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
box-sizing: border-box;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
margin: 2px;
|
|
|
padding: 0;
|
|
|
background: var(--neutral-200);
|
|
|
}
|
|
|
.menu-swatch > .label {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
.menu-swatch > .label > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
min-width: var(--_swatch-size);
|
|
|
min-height: var(--_swatch-size);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.menu-swatch.active {
|
|
|
background: var(--neutral-100);
|
|
|
scale: 1.4;
|
|
|
}
|
|
|
.menu-swatch.active > .label > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.menu-swatch .ui-checkmark,
|
|
|
.menu-swatch .ui-mixedmark {
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: white;
|
|
|
}
|
|
|
.menu-swatch.dark-contrast .ui-checkmark,
|
|
|
.menu-swatch.dark-contrast .ui-mixedmark {
|
|
|
color: #000;
|
|
|
}
|
|
|
`,fu=`.ML__container {
|
|
|
min-height: auto !important;
|
|
|
--_hue: var(--hue, 212);
|
|
|
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
|
|
|
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
|
|
|
}
|
|
|
.ML__sr-only {
|
|
|
position: absolute;
|
|
|
width: 1px;
|
|
|
height: 1px;
|
|
|
margin: -1px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
clip-path: inset(50%);
|
|
|
white-space: nowrap;
|
|
|
border: 0;
|
|
|
}
|
|
|
.ML__is-inline {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__base {
|
|
|
visibility: inherit;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: text;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
box-sizing: content-box;
|
|
|
border: 0;
|
|
|
outline: 0;
|
|
|
vertical-align: baseline;
|
|
|
font-weight: inherit;
|
|
|
font-family: inherit;
|
|
|
font-style: inherit;
|
|
|
text-decoration: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__strut,
|
|
|
.ML__strut--bottom {
|
|
|
display: inline-block;
|
|
|
min-height: 0.5em;
|
|
|
}
|
|
|
.ML__small-delim {
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
/* Text mode */
|
|
|
.ML__text {
|
|
|
font-family: var(--_text-font-family);
|
|
|
white-space: pre;
|
|
|
}
|
|
|
/* Use cmr for 'math upright' */
|
|
|
.ML__cmr {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.ML__mathit {
|
|
|
font-family: KaTeX_Math;
|
|
|
/* The KaTeX_Math font is italic by default, so the font-style below is only
|
|
|
useful when a fallback font is used
|
|
|
*/
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__mathbf {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
|
|
|
to match TeX idiosyncratic behavior */
|
|
|
.lcGreek.ML__mathbf {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.ML__mathbfit {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: bold;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__ams {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
/* Blackboard */
|
|
|
.ML__bb {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
.ML__cal {
|
|
|
font-family: KaTeX_Caligraphic;
|
|
|
}
|
|
|
.ML__frak {
|
|
|
font-family: KaTeX_Fraktur;
|
|
|
}
|
|
|
.ML__tt {
|
|
|
font-family: KaTeX_Typewriter;
|
|
|
}
|
|
|
.ML__script {
|
|
|
font-family: KaTeX_Script;
|
|
|
}
|
|
|
.ML__sans {
|
|
|
font-family: KaTeX_SansSerif;
|
|
|
}
|
|
|
.ML__series_ul {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_el {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_l {
|
|
|
font-weight: 200;
|
|
|
}
|
|
|
.ML__series_sl {
|
|
|
font-weight: 300;
|
|
|
}
|
|
|
.ML__series_sb {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
.ML__bold,
|
|
|
.ML__boldsymbol {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
.ML__series_eb {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
.ML__series_ub {
|
|
|
font-weight: 900;
|
|
|
}
|
|
|
.ML__series_uc {
|
|
|
font-stretch: ultra-condensed;
|
|
|
}
|
|
|
.ML__series_ec {
|
|
|
font-stretch: extra-condensed;
|
|
|
}
|
|
|
.ML__series_c {
|
|
|
font-stretch: condensed;
|
|
|
}
|
|
|
.ML__series_sc {
|
|
|
font-stretch: semi-condensed;
|
|
|
}
|
|
|
.ML__series_sx {
|
|
|
font-stretch: semi-expanded;
|
|
|
}
|
|
|
.ML__series_x {
|
|
|
font-stretch: expanded;
|
|
|
}
|
|
|
.ML__series_ex {
|
|
|
font-stretch: extra-expanded;
|
|
|
}
|
|
|
.ML__series_ux {
|
|
|
font-stretch: ultra-expanded;
|
|
|
}
|
|
|
.ML__it {
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__shape_ol {
|
|
|
-webkit-text-stroke: 1px black;
|
|
|
text-stroke: 1px black;
|
|
|
color: transparent;
|
|
|
}
|
|
|
.ML__shape_sc {
|
|
|
font-variant: small-caps;
|
|
|
}
|
|
|
.ML__shape_sl {
|
|
|
font-style: oblique;
|
|
|
}
|
|
|
/* First level emphasis */
|
|
|
.ML__emph {
|
|
|
color: #bc2612;
|
|
|
}
|
|
|
/* Second level emphasis */
|
|
|
.ML__emph .ML__emph {
|
|
|
color: #0c7f99;
|
|
|
}
|
|
|
.ML__highlight {
|
|
|
color: #007cb2;
|
|
|
background: #edd1b0;
|
|
|
}
|
|
|
.ML__center {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__label_padding {
|
|
|
padding: 0 0.5em;
|
|
|
}
|
|
|
.ML__frac-line {
|
|
|
width: 100%;
|
|
|
min-height: 1px;
|
|
|
}
|
|
|
.ML__frac-line:after {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: max(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
/* There's a bug since Chrome 62 where
|
|
|
sub-pixel border lines don't draw at some zoom
|
|
|
levels (110%, 90%).
|
|
|
Setting the min-height used to work around it, but that workaround
|
|
|
broke in Chrome 84 or so.
|
|
|
Setting the background (and the min-height) seems to work for now.
|
|
|
*/
|
|
|
background: currentColor;
|
|
|
box-sizing: content-box;
|
|
|
/* Vuetify sets the box-sizing to inherit
|
|
|
causes the fraction line to not draw at all sizes (see #26) */
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__sqrt-sign {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__sqrt-line {
|
|
|
display: inline-block;
|
|
|
height: max(1px, 0.04em);
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__sqrt-line:before {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: min(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
background: currentColor;
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt-line:after {
|
|
|
border-bottom-width: 1px;
|
|
|
content: ' ';
|
|
|
display: block;
|
|
|
margin-top: -0.1em;
|
|
|
}
|
|
|
.ML__sqrt-index {
|
|
|
margin-left: 0.27777778em;
|
|
|
margin-right: -0.55555556em;
|
|
|
}
|
|
|
.ML__delim-size1 {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-size2 {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__delim-size3 {
|
|
|
font-family: KaTeX_Size3;
|
|
|
}
|
|
|
.ML__delim-size4 {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size1 > span {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size4 > span {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__accent-body > span {
|
|
|
font-family: KaTeX_Main;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__accent-vec {
|
|
|
position: relative;
|
|
|
left: 0.24em;
|
|
|
}
|
|
|
/** The markup for a LaTeX formula, either in an editable mathfield or
|
|
|
in a static display.
|
|
|
*/
|
|
|
.ML__latex {
|
|
|
display: inline-block;
|
|
|
direction: ltr;
|
|
|
text-align: left;
|
|
|
text-indent: 0;
|
|
|
text-rendering: auto;
|
|
|
font-family: KaTeX_Main, 'Times New Roman', serif;
|
|
|
font-style: normal;
|
|
|
font-size-adjust: none;
|
|
|
font-stretch: normal;
|
|
|
font-variant-caps: normal;
|
|
|
letter-spacing: normal;
|
|
|
line-height: 1.2;
|
|
|
word-wrap: normal;
|
|
|
word-spacing: normal;
|
|
|
white-space: nowrap;
|
|
|
text-shadow: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__latex .style-wrap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .mfrac {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .left-right {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist-t {
|
|
|
display: inline-table;
|
|
|
table-layout: fixed;
|
|
|
border-collapse: collapse;
|
|
|
}
|
|
|
.ML__latex .vlist-r {
|
|
|
display: table-row;
|
|
|
}
|
|
|
.ML__latex .vlist {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span {
|
|
|
display: block;
|
|
|
height: 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span > span {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist > span > .pstrut {
|
|
|
overflow: hidden;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__latex .vlist-t2 {
|
|
|
margin-right: -2px;
|
|
|
}
|
|
|
.ML__latex .vlist-s {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
font-size: 1px;
|
|
|
width: 2px;
|
|
|
min-width: 2px;
|
|
|
}
|
|
|
.ML__latex .msubsup {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .negativethinspace {
|
|
|
display: inline-block;
|
|
|
margin-left: -0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thinspace {
|
|
|
display: inline-block;
|
|
|
width: 0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .mediumspace {
|
|
|
display: inline-block;
|
|
|
width: 0.22222em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thickspace {
|
|
|
display: inline-block;
|
|
|
width: 0.27778em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .enspace {
|
|
|
display: inline-block;
|
|
|
width: 0.5em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .quad {
|
|
|
display: inline-block;
|
|
|
width: 1em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .qquad {
|
|
|
display: inline-block;
|
|
|
width: 2em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .llap,
|
|
|
.ML__latex .rlap {
|
|
|
width: 0;
|
|
|
position: relative;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner,
|
|
|
.ML__latex .rlap > .inner {
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__latex .llap > .fix,
|
|
|
.ML__latex .rlap > .fix {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner {
|
|
|
right: 0;
|
|
|
}
|
|
|
.ML__latex .rlap > .inner {
|
|
|
left: 0;
|
|
|
}
|
|
|
.ML__latex .rule {
|
|
|
display: inline-block;
|
|
|
border: solid 0;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line,
|
|
|
.ML__latex .underline .underline-line {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:before,
|
|
|
.ML__latex .underline .underline-line:before {
|
|
|
content: '';
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:after,
|
|
|
.ML__latex .underline .underline-line:after {
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: -1px;
|
|
|
}
|
|
|
.ML__latex .stretchy {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .stretchy:before,
|
|
|
.ML__latex .stretchy:after {
|
|
|
content: '';
|
|
|
}
|
|
|
.ML__latex .stretchy svg {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: inherit;
|
|
|
fill: currentColor;
|
|
|
stroke: currentColor;
|
|
|
fill-rule: nonzero;
|
|
|
fill-opacity: 1;
|
|
|
stroke-width: 1;
|
|
|
stroke-linecap: butt;
|
|
|
stroke-linejoin: miter;
|
|
|
stroke-miterlimit: 4;
|
|
|
stroke-dasharray: none;
|
|
|
stroke-dashoffset: 0;
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
width: 50%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-3-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-1 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .nulldelimiter {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-group {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-symbol {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .op-symbol.small-op {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__latex .op-symbol.large-op {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__latex .mtable .vertical-separator {
|
|
|
display: inline-block;
|
|
|
min-width: 1px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .mtable .arraycolsep {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-m > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-c > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-l > .vlist-t {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-r > .vlist-t {
|
|
|
text-align: right;
|
|
|
}
|
|
|
.ML__error {
|
|
|
display: inline-block;
|
|
|
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
|
|
|
background-color: hsla(341, 100%, 40%, 0.1);
|
|
|
background-repeat: repeat-x;
|
|
|
background-size: 3px 3px;
|
|
|
padding-bottom: 3px;
|
|
|
background-position: 0 100%;
|
|
|
}
|
|
|
.ML__error > .ML__error {
|
|
|
background: transparent;
|
|
|
padding: 0;
|
|
|
}
|
|
|
.ML__placeholder {
|
|
|
color: var(--_placeholder-color);
|
|
|
opacity: var(--_placeholder-opacity);
|
|
|
padding-left: 0.4ex;
|
|
|
padding-right: 0.4ex;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
}
|
|
|
.ML__notation {
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
|
|
|
For UI elements, see \`[data-ML__tooltip]\`
|
|
|
*/
|
|
|
.ML__tooltip-container {
|
|
|
position: relative;
|
|
|
transform: scale(0);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content {
|
|
|
position: fixed;
|
|
|
display: inline-table;
|
|
|
visibility: hidden;
|
|
|
z-index: 2;
|
|
|
width: max-content;
|
|
|
max-width: 400px;
|
|
|
padding: 12px 12px;
|
|
|
border-radius: 8px;
|
|
|
background: #616161;
|
|
|
--_selection-color: #fff;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
opacity: 0;
|
|
|
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__text {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__base {
|
|
|
display: contents;
|
|
|
}
|
|
|
.ML__tooltip-container:hover .ML__tooltip-content {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
font-size: 0.75em;
|
|
|
transform: scale(1) translate(0, 3em);
|
|
|
}
|
|
|
`,hu=`#mathlive-environment-popover.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
#mathlive-environment-popover {
|
|
|
--_environment-panel-height: var(--environment-panel-height, 70px);
|
|
|
--_accent-color: var(--accent-color, #aaa);
|
|
|
--_background: var(--environment-panel-background, #fff);
|
|
|
--_button-background: var(--environment-panel-button-background, white);
|
|
|
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
|
|
|
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
|
|
|
--_button-text: var(--environment-panel-button-text, #e3e4e8);
|
|
|
position: absolute;
|
|
|
width: calc(var(--_environment-panel-height) * 2);
|
|
|
height: var(--_environment-panel-height);
|
|
|
border-radius: 4px;
|
|
|
border: 1.5px solid var(--_accent-color);
|
|
|
background-color: var(--_background);
|
|
|
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
|
|
|
pointer-events: all;
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons {
|
|
|
height: calc(var(--_environment-panel-height) * 5/4);
|
|
|
width: calc(var(--_environment-panel-height) * 5/4);
|
|
|
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
|
|
|
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .font {
|
|
|
fill: white;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons circle {
|
|
|
fill: #7f7f7f;
|
|
|
transition: fill 300ms;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
|
|
|
fill-opacity: 1;
|
|
|
fill: var(--_background);
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-width: 3px;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons line {
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-opacity: 0;
|
|
|
stroke-width: 40;
|
|
|
pointer-events: none;
|
|
|
transition: stroke-opacity 300ms;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
|
|
|
height: 100%;
|
|
|
width: 50%;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
|
|
|
width: var(--_environment-panel-height);
|
|
|
height: var(--_environment-panel-height);
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
|
|
|
pointer-events: all;
|
|
|
margin-top: 2px;
|
|
|
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
|
|
|
height: calc(var(--_environment-panel-height) / 3 - 2px);
|
|
|
border-radius: calc(var(--_environment-panel-height) / 25);
|
|
|
background-color: var(--_button-background);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
|
|
|
background-color: var(--_button-background-hover);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
|
|
|
stroke: var(--_button-text);
|
|
|
stroke-width: 2;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
|
|
|
fill-opacity: 0;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
|
|
|
pointer-events: none;
|
|
|
background-color: var(--_button-background-active);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
|
|
|
stroke: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
`,Rf=`/* The element that display info while in latex mode */
|
|
|
#mathlive-suggestion-popover {
|
|
|
background-color: rgba(97, 97, 97);
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
border-radius: 8px;
|
|
|
position: fixed;
|
|
|
z-index: 1;
|
|
|
display: none;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
}
|
|
|
#mathlive-suggestion-popover.top-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
top: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-bottom: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.bottom-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
bottom: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-top: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-animated {
|
|
|
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-visible {
|
|
|
display: flex;
|
|
|
}
|
|
|
@keyframes ML__fade-in {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
/* The wrapper class for the entire content of the popover panel */
|
|
|
#mathlive-suggestion-popover ul {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
align-items: flex-start;
|
|
|
max-height: 400px;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
margin: 8px;
|
|
|
padding: 8px;
|
|
|
width: calc(100% - 16px - 16px);
|
|
|
column-gap: 1em;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|
|
|
/* Since the content can be clicked on, provide feedback on hover */
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a {
|
|
|
color: #5ea6fd;
|
|
|
padding-top: 0.3em;
|
|
|
margin-top: 0.4em;
|
|
|
display: block;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a:hover {
|
|
|
color: #5ea6fd;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li:hover,
|
|
|
#mathlive-suggestion-popover li.is-pressed,
|
|
|
#mathlive-suggestion-popover li.is-active {
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
}
|
|
|
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
|
|
|
.ML__popover__command {
|
|
|
font-size: 1.6rem;
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
.ML__popover__current {
|
|
|
background: #5ea6fd;
|
|
|
color: #fff;
|
|
|
}
|
|
|
.ML__popover__latex {
|
|
|
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
align-self: center;
|
|
|
}
|
|
|
/* The keyboard shortcuts for a symbol as displayed in the popover */
|
|
|
.ML__popover__keybinding {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 0.8em;
|
|
|
opacity: 0.7;
|
|
|
}
|
|
|
/* Style for the character that joins the modifiers of a keyboard shortcut
|
|
|
(usually a "+" sign)*/
|
|
|
.ML__shortcut-join {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
`,ju=`/* The element that displays the keys as the user type them */
|
|
|
#mathlive-keystroke-caption-panel {
|
|
|
visibility: hidden;
|
|
|
/*min-width: 160px;*/
|
|
|
/*background-color: rgba(97, 97, 200, .95);*/
|
|
|
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
|
|
|
border-color: var(--secondary-border, hsl(0, 0%, 91%));
|
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 16px;
|
|
|
position: absolute;
|
|
|
z-index: 1;
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse;
|
|
|
justify-content: center;
|
|
|
--keystroke: white;
|
|
|
--on-keystroke: #555;
|
|
|
--keystroke-border: #f7f7f7;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
body:not([theme='light']) #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
}
|
|
|
body[theme='dark'] #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
#mathlive-keystroke-caption-panel > span {
|
|
|
min-width: 14px;
|
|
|
/*height: 8px;*/
|
|
|
margin: 0 8px 0 0;
|
|
|
padding: 4px;
|
|
|
background-color: var(--keystroke);
|
|
|
color: var(--on-keystroke);
|
|
|
fill: currentColor;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 1em;
|
|
|
border-radius: 6px;
|
|
|
border: 2px solid var(--keystroke-border);
|
|
|
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
|
|
|
}
|
|
|
`,Ld=`.ML__keyboard {
|
|
|
--_keyboard-height: 0;
|
|
|
--_keyboard-zindex: var(--keyboard-zindex, 105);
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
|
|
|
--_padding-top: var(--keyboard-padding-top, 5px);
|
|
|
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
|
|
|
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
|
|
|
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
|
|
|
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
|
|
|
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_keycap-height: var(--keycap-height, 60px);
|
|
|
/* Keycap width (incl. margin) */
|
|
|
--_keycap-max-width: var(--keycap-max-width, 100px);
|
|
|
--_keycap-gap: var(--keycap-gap, 8px);
|
|
|
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
|
|
|
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
|
|
|
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 70px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
|
|
|
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
|
|
|
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
|
|
|
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
|
|
|
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
|
|
|
}
|
|
|
.is-math-mode .MLK__rows .if-text-mode,
|
|
|
.is-text-mode .MLK__rows .if-math-mode {
|
|
|
display: none;
|
|
|
}
|
|
|
.if-can-undo,
|
|
|
.if-can-redo,
|
|
|
.if-can-copy,
|
|
|
.if-can-cut,
|
|
|
.if-can-paste {
|
|
|
opacity: 0.4;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.can-undo .if-can-undo,
|
|
|
.can-redo .if-can-redo,
|
|
|
.can-copy .if-can-copy,
|
|
|
.can-cut .if-can-cut,
|
|
|
.can-paste .if-can-paste {
|
|
|
opacity: 1;
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
body > .ML__keyboard {
|
|
|
position: fixed;
|
|
|
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
|
|
|
border-top: 1px solid var(--_border);
|
|
|
}
|
|
|
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
|
|
|
box-shadow: none;
|
|
|
border: none;
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
|
|
|
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
|
|
|
transition-property: transform, opacity;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__keyboard {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
z-index: var(--_keyboard-zindex);
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
opacity: 1;
|
|
|
transform: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.ML__keyboard :where(div) {
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
transform: none;
|
|
|
}
|
|
|
.MLK__backdrop {
|
|
|
position: absolute;
|
|
|
bottom: calc(-1 * var(--_keyboard-height));
|
|
|
width: 100%;
|
|
|
height: var(--_keyboard-height);
|
|
|
box-sizing: border-box;
|
|
|
padding-top: var(--_padding-top);
|
|
|
padding-bottom: var(--_padding-bottom);
|
|
|
padding-left: var(--_padding-horizontal);
|
|
|
padding-right: var(--_padding-horizontal);
|
|
|
opacity: 0;
|
|
|
visibility: hidden;
|
|
|
transform: translate(0, 0);
|
|
|
background: var(--_background);
|
|
|
}
|
|
|
.backdrop-is-transparent .MLK__backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop
|
|
|
(backdrop-is-transparent), make sure to let pointer event go through. */
|
|
|
.backdrop-is-transparent .MLK__plate {
|
|
|
background: transparent;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop, make sure to
|
|
|
allow pointer events on it. */
|
|
|
.backdrop-is-transparent .MLK__layer > div > div {
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
.ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
transform: translate(0, calc(-1 * var(--_keyboard-height)));
|
|
|
opacity: 1;
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.caps-lock-indicator {
|
|
|
display: none;
|
|
|
width: 8px;
|
|
|
height: 8px;
|
|
|
background: #0cbc0c;
|
|
|
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
|
|
|
border-radius: 8px;
|
|
|
right: 8px;
|
|
|
top: 8px;
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .caps-lock-indicator {
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .shift {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
}
|
|
|
.MLK__plate {
|
|
|
position: absolute;
|
|
|
top: var(--_padding-top);
|
|
|
left: var(--_padding-horizontal);
|
|
|
width: calc(100% - 2 * var(--_padding-horizontal));
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
box-sizing: border-box;
|
|
|
container-type: inline-size;
|
|
|
touch-action: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
pointer-events: all;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 16px;
|
|
|
/* Size of toolbar labels */
|
|
|
font-weight: 400;
|
|
|
text-shadow: none;
|
|
|
}
|
|
|
.ML__box-placeholder {
|
|
|
color: var(--_box-placeholder-color);
|
|
|
}
|
|
|
.MLK__tex {
|
|
|
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__tex-math {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.MLK__layer {
|
|
|
display: none;
|
|
|
outline: none;
|
|
|
}
|
|
|
.MLK__layer.is-visible {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
}
|
|
|
/* Keyboard layouts are made or rows of keys... */
|
|
|
.MLK__rows {
|
|
|
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
border-collapse: separate;
|
|
|
clear: both;
|
|
|
border: 0;
|
|
|
margin: 0;
|
|
|
margin-bottom: var(--_keycap-gap);
|
|
|
gap: var(--_keycap-gap);
|
|
|
/* If the styling include, e.g., some shadows, they will be
|
|
|
cut off by the overflow. In that case, set the padding to
|
|
|
compensate. */
|
|
|
padding-left: var(--_row-padding-left);
|
|
|
padding-right: var(--_row-padding-right);
|
|
|
overflow: visible;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: center;
|
|
|
width: 100%;
|
|
|
gap: var(--_keycap-gap);
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
/* For the alignment of the text on some modifiers (e.g. shift) */
|
|
|
/* Extra spacing between two adjacent keys */
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex-math {
|
|
|
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .big-op {
|
|
|
font-size: calc(1.25 * var(--_keycap-font-size));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bottom {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .left {
|
|
|
align-items: flex-start;
|
|
|
padding-left: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .right {
|
|
|
align-items: flex-end;
|
|
|
padding-right: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w0 {
|
|
|
width: 0;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w5 {
|
|
|
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w15 {
|
|
|
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w20 {
|
|
|
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w40 {
|
|
|
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w50 {
|
|
|
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .MLK__keycap.w50 {
|
|
|
font-size: 80%;
|
|
|
padding-top: 10px;
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .separator {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .horizontal-rule {
|
|
|
height: 6px;
|
|
|
margin-top: 3px;
|
|
|
margin-bottom: 0;
|
|
|
width: 100%;
|
|
|
border-radius: 0;
|
|
|
border-top: var(--_horizontal-rule);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost {
|
|
|
background: var(--_toolbar-background);
|
|
|
border: none;
|
|
|
color: var(--_toolbar-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost:hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bigfnbutton {
|
|
|
font-size: var(--_keycap-extra-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift,
|
|
|
.MLK__rows > .MLK__row .action {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
background: var(--_keycap-secondary-background);
|
|
|
border-color: var(--_keycap-secondary-border);
|
|
|
border-bottom-color: var(--_keycap-secondary-border-bottom);
|
|
|
line-height: 0.8;
|
|
|
font-size: min(1rem, var(--_keycap-small-font-size));
|
|
|
font-weight: 600;
|
|
|
padding: 8px 12px 8px 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift:hover,
|
|
|
.MLK__rows > .MLK__row .action:hover {
|
|
|
background: var(--_keycap-secondary-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary {
|
|
|
background: var(--_keycap-primary-background);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary:hover {
|
|
|
background: var(--_keycap-primary-background-hover);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected,
|
|
|
.MLK__rows > .MLK__row .action.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-active,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-active {
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning {
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning svg.svg-glyph {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
/** A regular keycap
|
|
|
* Use the :where() pseudo-class to give it a very low specifity,
|
|
|
* so that it can be overriden by custom style.
|
|
|
*/
|
|
|
:where(.MLK__rows > .MLK__row div) {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: space-evenly;
|
|
|
width: calc(var(--_keycap-width) - var(--_keycap-gap));
|
|
|
height: var(--_keycap-height);
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
vertical-align: top;
|
|
|
text-align: center;
|
|
|
float: left;
|
|
|
color: var(--_keycap-text);
|
|
|
fill: currentColor;
|
|
|
font-size: var(--_keycap-font-size);
|
|
|
background: var(--_keycap-background);
|
|
|
border: 1px solid var(--_keycap-border);
|
|
|
border-bottom-color: var(--_keycap-border-bottom);
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
|
touch-action: none;
|
|
|
/* Keys with a variants panel */
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div):hover {
|
|
|
overflow: visible;
|
|
|
background: var(--_keycap-background-hover);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) .ML__latex {
|
|
|
pointer-events: none;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
|
|
|
margin: 8px 0;
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
|
min-height: 20px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
|
|
|
margin: 8px 0;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
|
|
|
font-size: 25px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
z-index: calc(var(--_keyboard-zindex) - 5);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) small {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) aside {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 10px;
|
|
|
line-height: 10px;
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
|
|
|
Note there are a different set of tooltip rules for the keyboard toggle
|
|
|
(it's in a different CSS tree) */
|
|
|
.ML__keyboard [data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]::after {
|
|
|
position: absolute;
|
|
|
display: inline-table;
|
|
|
content: attr(data-tooltip);
|
|
|
top: inherit;
|
|
|
bottom: 100%;
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
z-index: 2;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
border-radius: 2px;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-weight: 400;
|
|
|
font-size: 12px;
|
|
|
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover::after {
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
}
|
|
|
.MLK__toolbar {
|
|
|
align-self: center;
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
width: 100%;
|
|
|
max-width: 996px;
|
|
|
min-height: 32px;
|
|
|
/* Icons for undo/redo, etc. */
|
|
|
}
|
|
|
.MLK__toolbar svg {
|
|
|
height: 20px;
|
|
|
width: 20px;
|
|
|
}
|
|
|
.MLK__toolbar > .left {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > .right {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
/* "button" in the toolbar */
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
color: var(--_toolbar-text);
|
|
|
fill: currentColor;
|
|
|
background: var(--_toolbar-background);
|
|
|
font-size: var(--_toolbar-font-size);
|
|
|
padding: 4px 15px;
|
|
|
cursor: pointer;
|
|
|
width: max-content;
|
|
|
min-width: 42px;
|
|
|
min-height: 34px;
|
|
|
border: none;
|
|
|
padding-left: 10px;
|
|
|
padding-right: 10px;
|
|
|
padding-bottom: 8px;
|
|
|
padding-top: 8px;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 4px;
|
|
|
margin-left: 4px;
|
|
|
margin-right: 4px;
|
|
|
border-radius: 8px;
|
|
|
box-shadow: none;
|
|
|
border-bottom: 2px solid transparent;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.disabled svg,
|
|
|
.MLK__toolbar > div > div.disabled:hover svg,
|
|
|
.MLK__toolbar > div > div.disabled.is-pressed svg {
|
|
|
color: var(--_toolbar-text);
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:hover,
|
|
|
.MLK__toolbar > div > div:active,
|
|
|
.MLK__toolbar > div > div.is-pressed,
|
|
|
.MLK__toolbar > div > div.is-active {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
background: var(--_toolbar-background-selected);
|
|
|
border-radius: 0;
|
|
|
border-bottom-color: var(--_toolbar-text-active);
|
|
|
padding-bottom: 4px;
|
|
|
margin-bottom: 8px;
|
|
|
}
|
|
|
/* This is the element that displays variants on press+hold */
|
|
|
.MLK__variant-panel {
|
|
|
visibility: hidden;
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
|
flex-flow: row wrap-reverse;
|
|
|
justify-content: center;
|
|
|
align-content: center;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
bottom: auto;
|
|
|
top: 0;
|
|
|
box-sizing: content-box;
|
|
|
transform: none;
|
|
|
z-index: calc(var(--_keyboard-zindex) + 1);
|
|
|
touch-action: none;
|
|
|
max-width: 350px;
|
|
|
background: var(--_variant-panel-background);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 6px;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
transition: none;
|
|
|
}
|
|
|
.MLK__variant-panel.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.MLK__variant-panel.compact {
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
|
|
|
}
|
|
|
.MLK__variant-panel .item {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
font-size: var(--_variant-keycap-font-size);
|
|
|
height: var(--_variant-keycap-length);
|
|
|
width: var(--_variant-keycap-length);
|
|
|
margin: 0;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
border: 1px solid transparent;
|
|
|
background: transparent;
|
|
|
pointer-events: all;
|
|
|
cursor: pointer;
|
|
|
color: var(--_variant-keycap-text);
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
@media (max-height: 412px) {
|
|
|
.MLK__variant-panel .item {
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
.MLK__variant-panel .item .ML__latex {
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-active {
|
|
|
background: var(--_variant-keycap-background-active);
|
|
|
color: var(--_variant-keycap-text-active);
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-pressed {
|
|
|
background: var(--_variant-keycap-background-pressed);
|
|
|
color: var(--_variant-keycap-text-pressed);
|
|
|
}
|
|
|
.MLK__variant-panel .item.small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button {
|
|
|
box-sizing: border-box;
|
|
|
background: #fbfbfb;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
width: calc(100% - 12px);
|
|
|
height: calc(100% - 12px);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover {
|
|
|
background: #f0f0f0;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.MLK__variant-panel .item.box > div,
|
|
|
.MLK__variant-panel .item.box > span {
|
|
|
border: 1px dashed rgba(0, 0, 0, 0.24);
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning {
|
|
|
min-height: 60px;
|
|
|
min-width: 60px;
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
padding: 5px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 5px;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning.is-pressed,
|
|
|
.MLK__variant-panel .item .warning.is-active {
|
|
|
background: red;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning svg.svg-glyph {
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
.MLK__variant-panel .item aside {
|
|
|
font-size: var(--_variant-keycap-aside-font-size);
|
|
|
line-height: 12px;
|
|
|
opacity: 0.78;
|
|
|
padding-top: 2px;
|
|
|
}
|
|
|
.MLK__keycap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
right: 4px;
|
|
|
top: 4px;
|
|
|
font-size: var(--_keycap-shift-font-size);
|
|
|
color: var(--_keycap-shift-color);
|
|
|
}
|
|
|
.hide-shift .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
@media (max-width: 414px) {
|
|
|
.MLK__variant-panel {
|
|
|
max-width: 350px;
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
/* @xs breakpoint: iPhone 5 */
|
|
|
@container (max-width: 414px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--_keycap-height), 42px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
font-size: 100%;
|
|
|
margin-left: 2px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
.MLK__rows .shift,
|
|
|
.MLK__rows .action {
|
|
|
font-size: 65%;
|
|
|
}
|
|
|
.MLK__rows .warning svg.svg-glyph {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
min-height: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 744px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--keycap-height, 52px), 52px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
padding-left: 0;
|
|
|
padding-right: 0;
|
|
|
}
|
|
|
.MLK__tooltip::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.fnbutton {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.bigfnbutton {
|
|
|
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.small {
|
|
|
font-size: 13px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > aside {
|
|
|
display: none;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
/* Medium breakpoint: larger phones */
|
|
|
@container (max-width: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@media (max-height: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 1444px) {
|
|
|
.MLK__rows .if-wide {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
.ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
}
|
|
|
/* Same as the media query, but with a class */
|
|
|
[theme='dark'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
[theme='light'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--_keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
}
|
|
|
`,Nf=`:host {
|
|
|
--primary-color: #5898ff;
|
|
|
--primary-color-dimmed: #c0c0f0;
|
|
|
--primary-color-dark: var(--blue-500);
|
|
|
--primary-color-light: var(--blue-100);
|
|
|
--primary-color-reverse: #ffffff;
|
|
|
--secondary-color: #ff8a65;
|
|
|
--secondary-color-dimmed: #f0d5c5;
|
|
|
--secondary-color-dark: var(--orange-500);
|
|
|
--secondary-color-light: var(--orange-100);
|
|
|
--secondary-color-reverse: #ffffff;
|
|
|
--link-color: #5898ff;
|
|
|
--link-color-dimmed: #c5c5c5;
|
|
|
--link-color-dark: #121212;
|
|
|
--link-color-light: #e2e2e2;
|
|
|
--link-color-reverse: #ffffff;
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--neutral-100: #f5f5f5;
|
|
|
--neutral-200: #eeeeee;
|
|
|
--neutral-300: #e0e0e0;
|
|
|
--neutral-400: #bdbdbd;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #757575;
|
|
|
--neutral-700: #616161;
|
|
|
--neutral-800: #424242;
|
|
|
--neutral-900: #212121;
|
|
|
--red-25: #fff8f7;
|
|
|
--red-50: #fff1ef;
|
|
|
--red-100: #ffeae6;
|
|
|
--red-200: #ffcac1;
|
|
|
--red-300: #ffa495;
|
|
|
--red-400: #ff7865;
|
|
|
--red-500: #f21c0d;
|
|
|
--red-600: #e50018;
|
|
|
--red-700: #d30024;
|
|
|
--red-800: #bd002c;
|
|
|
--red-900: #a1002f;
|
|
|
--orange-25: #fffbf8;
|
|
|
--orange-50: #fff7f1;
|
|
|
--orange-100: #fff3ea;
|
|
|
--orange-200: #ffe1c9;
|
|
|
--orange-300: #ffcca2;
|
|
|
--orange-400: #ffb677;
|
|
|
--orange-500: #fe9310;
|
|
|
--orange-600: #f58700;
|
|
|
--orange-700: #ea7c00;
|
|
|
--orange-800: #dc6d00;
|
|
|
--orange-900: #ca5b00;
|
|
|
--brown-25: #fff8ef;
|
|
|
--brown-50: #fff1df;
|
|
|
--brown-100: #ffe9ce;
|
|
|
--brown-200: #ebcca6;
|
|
|
--brown-300: #cdaf8a;
|
|
|
--brown-400: #af936f;
|
|
|
--brown-500: #856a47;
|
|
|
--brown-600: #7f5e34;
|
|
|
--brown-700: #78511f;
|
|
|
--brown-800: #6e4200;
|
|
|
--brown-900: #593200;
|
|
|
--yellow-25: #fffdf9;
|
|
|
--yellow-50: #fffcf2;
|
|
|
--yellow-100: #fffaec;
|
|
|
--yellow-200: #fff2ce;
|
|
|
--yellow-300: #ffe8ab;
|
|
|
--yellow-400: #ffdf85;
|
|
|
--yellow-500: #ffcf33;
|
|
|
--yellow-600: #f1c000;
|
|
|
--yellow-700: #dfb200;
|
|
|
--yellow-800: #c9a000;
|
|
|
--yellow-900: #ad8a00;
|
|
|
--lime-25: #f4ffee;
|
|
|
--lime-50: #e9ffdd;
|
|
|
--lime-100: #ddffca;
|
|
|
--lime-200: #a8fb6f;
|
|
|
--lime-300: #94e659;
|
|
|
--lime-400: #80d142;
|
|
|
--lime-500: #63b215;
|
|
|
--lime-600: #45a000;
|
|
|
--lime-700: #268e00;
|
|
|
--lime-800: #007417;
|
|
|
--lime-900: #005321;
|
|
|
--green-25: #f5fff5;
|
|
|
--green-50: #ebffea;
|
|
|
--green-100: #e0ffdf;
|
|
|
--green-200: #a7ffa7;
|
|
|
--green-300: #5afa65;
|
|
|
--green-400: #45e953;
|
|
|
--green-500: #17cf36;
|
|
|
--green-600: #00b944;
|
|
|
--green-700: #00a34a;
|
|
|
--green-800: #008749;
|
|
|
--green-900: #00653e;
|
|
|
--teal-25: #f3ffff;
|
|
|
--teal-50: #e6fffe;
|
|
|
--teal-100: #d9fffe;
|
|
|
--teal-200: #8dfffe;
|
|
|
--teal-300: #57f4f4;
|
|
|
--teal-400: #43e5e5;
|
|
|
--teal-500: #17cfcf;
|
|
|
--teal-600: #00c2c0;
|
|
|
--teal-700: #00b5b1;
|
|
|
--teal-800: #00a49e;
|
|
|
--teal-900: #009087;
|
|
|
--cyan-25: #f7fcff;
|
|
|
--cyan-50: #eff8ff;
|
|
|
--cyan-100: #e7f5ff;
|
|
|
--cyan-200: #c2e6ff;
|
|
|
--cyan-300: #95d5ff;
|
|
|
--cyan-400: #61c4ff;
|
|
|
--cyan-500: #13a7ec;
|
|
|
--cyan-600: #069eda;
|
|
|
--cyan-700: #0095c9;
|
|
|
--cyan-800: #0088b2;
|
|
|
--cyan-900: #0a7897;
|
|
|
--blue-25: #f7faff;
|
|
|
--blue-50: #eef5ff;
|
|
|
--blue-100: #e5f1ff;
|
|
|
--blue-200: #bfdbff;
|
|
|
--blue-300: #92c2ff;
|
|
|
--blue-400: #63a8ff;
|
|
|
--blue-500: #0d80f2;
|
|
|
--blue-600: #0077db;
|
|
|
--blue-700: #006dc4;
|
|
|
--blue-800: #0060a7;
|
|
|
--blue-900: #005086;
|
|
|
--indigo-25: #f8f7ff;
|
|
|
--indigo-50: #f1efff;
|
|
|
--indigo-100: #eae7ff;
|
|
|
--indigo-200: #ccc3ff;
|
|
|
--indigo-300: #ac99ff;
|
|
|
--indigo-400: #916aff;
|
|
|
--indigo-500: #63c;
|
|
|
--indigo-600: #5a21b2;
|
|
|
--indigo-700: #4e0b99;
|
|
|
--indigo-800: #3b0071;
|
|
|
--indigo-900: #220040;
|
|
|
--purple-25: #fbf7ff;
|
|
|
--purple-50: #f8f0ff;
|
|
|
--purple-100: #f4e8ff;
|
|
|
--purple-200: #e4c4ff;
|
|
|
--purple-300: #d49aff;
|
|
|
--purple-400: #c36aff;
|
|
|
--purple-500: #a219e6;
|
|
|
--purple-600: #9000c4;
|
|
|
--purple-700: #7c009f;
|
|
|
--purple-800: #600073;
|
|
|
--purple-900: #3d0043;
|
|
|
--magenta-25: #fff8fb;
|
|
|
--magenta-50: #fff2f6;
|
|
|
--magenta-100: #ffebf2;
|
|
|
--magenta-200: #ffcddf;
|
|
|
--magenta-300: #ffa8cb;
|
|
|
--magenta-400: #ff7fb7;
|
|
|
--magenta-500: #eb4799;
|
|
|
--magenta-600: #da3689;
|
|
|
--magenta-700: #c82179;
|
|
|
--magenta-800: #b00065;
|
|
|
--magenta-900: #8a004c;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
/* @media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--label-color: #fff;
|
|
|
--active-label-color: #000;
|
|
|
--menu-bg: #525252;
|
|
|
--active-bg: #5898ff;
|
|
|
--active-bg-dimmed: #5c5c5c;
|
|
|
}
|
|
|
} */
|
|
|
:host {
|
|
|
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
|
|
|
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
|
--ui-font-size: 14px;
|
|
|
--ui-line-height: 1.5;
|
|
|
--ui-letter-spacing: 0.007em;
|
|
|
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
|
|
|
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
|
--ui-layer-1: var(--neutral-100);
|
|
|
--ui-layer-2: var(--neutral-200);
|
|
|
--ui-layer-3: var(--neutral-300);
|
|
|
--ui-layer-4: var(--neutral-400);
|
|
|
--ui-layer-5: var(--neutral-500);
|
|
|
--ui-layer-6: var(--neutral-600);
|
|
|
--ui-border-color: var(--primary-color);
|
|
|
--ui-border-radius: 4px;
|
|
|
--ui-text: var(--neutral-900);
|
|
|
--ui-text-secondary: var(--neutral-700);
|
|
|
--ui-text-placeholder: var(--neutral-500);
|
|
|
--ui-text-muted: var(--neutral-300);
|
|
|
/** A field is a UI element in which a user can type data, for
|
|
|
* example an input or textarea element.
|
|
|
*/
|
|
|
--ui-field-bg: var(--neutral-100);
|
|
|
--ui-field-bg-hover: var(--neutral-100);
|
|
|
--ui-field-bg-disabled: var(--neutral-300);
|
|
|
--ui-field-bg-invalid: var(--red-100);
|
|
|
--ui-field-bg-focus: var(--neutral-100);
|
|
|
--ui-field-border: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-hover: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-disabled: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-invalid: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-focus: 0.5px solid var(--border-color);
|
|
|
--ui-menu-bg: var(--neutral-100);
|
|
|
--ui-menu-text: var(--neutral-900);
|
|
|
--ui-menu-bg-hover: var(--neutral-200);
|
|
|
--ui-menu-text-hover: var(--neutral-900);
|
|
|
/** The \`active\` state is used for the state of menu items
|
|
|
* when they are selected.
|
|
|
*/
|
|
|
--ui-menu-bg-active: var(--primary-color);
|
|
|
--ui-menu-text-active: var(--primary-color-reverse);
|
|
|
/** The \`active-muted\` set is used for the state of
|
|
|
* submenus when they are open.
|
|
|
*/
|
|
|
--ui-menu-bg-active-muted: var(--neutral-300);
|
|
|
--ui-menu-text-active-muted: var(--neutral-900);
|
|
|
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
|
|
|
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
|
|
|
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
|
|
|
--ui-menu-divider: 0.5px solid #c7c7c7;
|
|
|
/* var(--neutral-300); */
|
|
|
--ui-menu-z-index: 10000;
|
|
|
--page-bg: var(--neutral-100);
|
|
|
--content-bg: var(--neutral-200);
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
|
|
|
Noto is a Linux/Android font.
|
|
|
*/
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
|
|
|
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
|
|
|
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
|
|
|
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
|
|
|
}
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
|
|
|
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
|
|
|
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
|
|
|
}
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
|
|
|
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
|
|
|
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
|
|
|
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
|
|
|
}
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
|
|
|
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
|
|
|
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh),
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo),
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac),
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std),
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-size: 1rem;
|
|
|
--ui-line-height: 1.7;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
:dir(rtl) {
|
|
|
--ui-line-height: auto;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
`,Of=`.ui-menu *,
|
|
|
.ui-menu ::before,
|
|
|
.ui-menu ::after {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ui-menu {
|
|
|
display: none;
|
|
|
color-scheme: light dark;
|
|
|
-webkit-user-select: none;
|
|
|
/* Important: Safari iOS doesn't respect user-select */
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0 0 0 0);
|
|
|
--active-label-color: #fff;
|
|
|
/* ui-menu-text-active */
|
|
|
--label-color: #121212;
|
|
|
/* ui-menu-text */
|
|
|
--menu-bg: #e2e2e2;
|
|
|
/* ui-menu-background */
|
|
|
--active-bg: #5898ff;
|
|
|
/* ui-menu-background-active */
|
|
|
--active-bg-dimmed: #c5c5c5;
|
|
|
/* ui-menu-background-active-muted */
|
|
|
}
|
|
|
/** Use the :where pseudo selector to make the specificity of the
|
|
|
* selector 0, so that it can be overridden by the user.
|
|
|
*/
|
|
|
:where(.ui-menu-container) {
|
|
|
position: absolute;
|
|
|
overflow: visible;
|
|
|
width: auto;
|
|
|
height: auto;
|
|
|
z-index: 10000;
|
|
|
border-radius: 8px;
|
|
|
background: var(--ui-menu-bg);
|
|
|
box-shadow: var(--ui-menu-shadow);
|
|
|
list-style: none;
|
|
|
padding: 6px 0 6px 0;
|
|
|
margin: 0;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
color: var(--ui-menu-text);
|
|
|
font-weight: normal;
|
|
|
font-style: normal;
|
|
|
text-shadow: none;
|
|
|
text-transform: none;
|
|
|
letter-spacing: 0;
|
|
|
outline: none;
|
|
|
opacity: 1;
|
|
|
/* The [popover] elements have a 1px solid black border. Ugh. */
|
|
|
border: none;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:where(.ui-menu-container > li) {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
align-items: center;
|
|
|
padding: 1px 7px 1px 7px;
|
|
|
margin-top: 0;
|
|
|
margin-left: 6px;
|
|
|
margin-right: 6px;
|
|
|
border-radius: 4px;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
outline: none;
|
|
|
fill: currentColor;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
text-align: left;
|
|
|
color: inherit;
|
|
|
font-family: var(--ui-font-family);
|
|
|
font-size: var(--ui-font-size);
|
|
|
line-height: var(--ui-line-height);
|
|
|
letter-spacing: var(--ui-letter-spacing);
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label) {
|
|
|
appearance: none;
|
|
|
background: none;
|
|
|
outline: none;
|
|
|
width: 100%;
|
|
|
margin: 0;
|
|
|
padding: 1px 2px 1px 1px;
|
|
|
overflow: visible;
|
|
|
border: 1px solid transparent;
|
|
|
white-space: nowrap;
|
|
|
text-align: start;
|
|
|
}
|
|
|
:where(.ui-menu-container > li:has(.heading)) {
|
|
|
margin-top: 0.5em;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.heading) {
|
|
|
font-weight: bold;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.indent > .label) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.indent) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[role='divider']) {
|
|
|
border-bottom: 1px solid var(--ui-menu-divider);
|
|
|
border-radius: 0;
|
|
|
padding: 0;
|
|
|
margin-left: 15px;
|
|
|
margin-right: 15px;
|
|
|
padding-top: 5px;
|
|
|
margin-bottom: 5px;
|
|
|
width: calc(100% - 30px);
|
|
|
/** 100% - (margin-left + margin-right) */
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-disabled='true']) {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active) {
|
|
|
background: var(--ui-menu-bg-active);
|
|
|
background: -apple-system-control-accent;
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active.is-submenu-open) {
|
|
|
background: var(--ui-menu-bg-active-muted);
|
|
|
color: inherit;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
|
|
|
padding-inline-end: 0;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
/** Keyboard shortcut */
|
|
|
:where(.ui-menu-container > li > kbd) {
|
|
|
font-family: var(--ui-font-family);
|
|
|
margin-inline-start: 12px;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active > kbd) {
|
|
|
opacity: 0.85;
|
|
|
}
|
|
|
.ui-trailing-chevron {
|
|
|
display: flex;
|
|
|
margin-inline-start: 24px;
|
|
|
width: 10px;
|
|
|
height: 10px;
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
.ui-trailing-chevron:dir(rtl) {
|
|
|
transform: scaleX(-1);
|
|
|
}
|
|
|
.ui-checkmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
.ui-mixedmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
`,oc;function Dc(e){let t="";switch(e){case"mathfield-element":t=`
|
|
|
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
|
|
|
:host([hidden]) { display: none; }
|
|
|
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
|
|
|
:host(:focus), :host(:focus-within) {
|
|
|
outline: Highlight auto 1px; /* For Firefox */
|
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
|
}
|
|
|
:host([readonly]:focus), :host([readonly]:focus-within),
|
|
|
:host([read-only]:focus), :host([read-only]:focus-within) {
|
|
|
outline: none;
|
|
|
}
|
|
|
@media (hover: none) and (pointer: coarse) {
|
|
|
:host(:not(:focus)) :first-child { pointer-events: none !important; }
|
|
|
}`;break;case"core":t=fu;break;case"mathfield":t=Dd;break;case"environment-popover":t=hu;break;case"suggestion-popover":t=Rf;break;case"keystroke-caption":t=ju;break;case"virtual-keyboard":t=Ld;break;case"ui":t=Nf;break;case"menu":t=Of;break;default:debugger}return t}function sc(e){return oc||(oc={}),oc[e]||(oc[e]=new CSSStyleSheet,oc[e].replaceSync(Dc(e))),oc[e]}var Fl;function kl(e){var t;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;const r=window.document.createElement("style");r.id=`mathlive-style-${e}`,r.append(window.document.createTextNode(Dc(e))),window.document.head.appendChild(r);return}if(Fl||(Fl={}),((t=Fl[e])!=null?t:0)!==0)Fl[e]+=1;else{const r=sc(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],Fl[e]=1}}function zl(e){if("adoptedStyleSheets"in document&&Fl!=null&&Fl[e]&&(Fl[e]-=1,Fl[e]<=0)){const t=oc[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(r=>r!==t)}}var pu=class rp extends De{constructor(t){var r;super(p(C({},t),{type:"accent",body:(r=t.body)!=null?r:void 0})),t.accentChar?this.accent=t.accentChar:this.svgAccent=t==null?void 0:t.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(t){return new rp(t)}toJson(){return p(C({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(t){var r;const n=new yr({parent:t,mathstyle:"cramp"},this.style),a=(r=De.createBox(n,this.body))!=null?r:new Je("\u25A2",{style:this.style});let i=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(i=a.skew);let s=Math.min(a.height,Rn),u;if(this.svgAccent)u=Gn(this.svgAccent),s=n.metrics.bigOpSpacing1-s;else if(this.accent){const h=new Je(this.accent,{fontFamily:"Main-Regular"});h.italic=0;const v=this.accent===8407?" ML__accent-vec":"";u=new Je(new Je(h),{classes:"ML__accent-body"+v})}u=new _a({shift:0,children:[{box:new Je(a)},-s,{box:u,marginLeft:a.left+2*i,classes:["ML__center"]}]});const d=new Je(u,{type:"lift"});return this.caret&&(d.caret=this.caret),this.bind(n,d.wrap(n)),this.attachSupsub(n,{base:d})}},mu={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},vu=Object.fromEntries(Object.entries(mu).map(([e,t])=>[t,e]));function gu(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[e])!=null?t:e.codePointAt(0)}function Ff(e,t,r,n){var a;const s=new Je(gu(e),{fontFamily:"Main-Regular",isSelected:n.isSelected,classes:"ML__small-delim "+((a=n.classes)!=null?a:"")}).wrap(t);return r&&s.setTop((1-t.scalingFactor)*Ht),s}function Gu(e,t,r,n,a){var i,s;const u=new yr({parent:n,mathstyle:"textstyle"},a==null?void 0:a.style),d=new Je(gu(e),{fontFamily:`Size${t}-Regular`,isSelected:a.isSelected,classes:((i=a.classes)!=null?i:"")+` ML__delim-size${t}`,type:(s=a.type)!=null?s:"ignore"}).wrap(u);return r&&d.setTop((1-u.scalingFactor)*Ht),d}function Id(e,t,r,n,a){var i;let s,u,d,h;s=d=h=gu(e),u=null;let v="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?d=s=h=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?d=s=h=8741:e==="\\uparrow"?d=h=9168:e==="\\Uparrow"?d=h=8214:e==="\\downarrow"?s=d=9168:e==="\\Downarrow"?s=d=8214:e==="\\updownarrow"?(s=8593,d=9168,h=8595):e==="\\Updownarrow"?(s=8657,d=8214,h=8659):e==="["||e==="\\lbrack"?(s=9121,d=9122,h=9123,v="Size4-Regular"):e==="]"||e==="\\rbrack"?(s=9124,d=9125,h=9126,v="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(d=s=9122,h=9123,v="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(s=9121,d=h=9122,v="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(d=s=9125,h=9126,v="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(s=9124,d=h=9125,v="Size4-Regular"):e==="("||e==="\\lparen"?(s=9115,d=9116,h=9117,v="Size4-Regular"):e===")"||e==="\\rparen"?(s=9118,d=9119,h=9120,v="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(s=9127,u=9128,h=9129,d=9130,v="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s=9131,u=9132,h=9133,d=9130,v="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(s=9127,h=9129,d=9130,v="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(s=9131,h=9133,d=9130,v="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(s=9127,h=9133,d=9130,v="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(s=9131,h=9129,d=9130,v="Size4-Regular"):e==="\\surd"?(s=57345,h=9143,d=57344,v="Size4-Regular"):e==="\\ulcorner"?(s=9484,d=h=32):e==="\\urcorner"?(s=9488,d=h=32):e==="\\llcorner"?(h=9492,d=s=32):e==="\\lrcorner"&&(s=9496,d=s=32);const k=jo(s,v),I=k.height+k.depth,z=jo(d,v),W=z.height+z.depth,ye=jo(h,v),lt=ye.height+ye.depth;let pe=0,ze=1;if(u!==null){const as=jo(u,v);pe=as.height+as.depth,ze=2}const pt=I+lt+pe,Ve=Math.max(0,Math.ceil((t-pt)/(ze*W))),Vt=pt+Ve*ze*W;let mr=Ht;r&&(mr=mr*n.scalingFactor);const or=Vt/2-mr,Kn=.008,ei=[];ei.push({box:new Je(h,{fontFamily:v})}),ei.push(-Kn);const yt=new Je(d,{fontFamily:v});if(u===null)for(let as=0;as<Ve;as++)ei.push({box:yt});else{for(let as=0;as<Ve;as++)ei.push({box:yt});ei.push(-Kn),ei.push({box:new Je(u,{fontFamily:v})}),ei.push(-Kn);for(let as=0;as<Ve;as++)ei.push({box:yt})}ei.push(-Kn),ei.push({box:new Je(s,{fontFamily:v})});let Tl="";v==="Size1-Regular"?Tl=" delim-size1":v==="Size4-Regular"&&(Tl=" delim-size4");const gc=new _a({bottom:or,children:ei},{classes:Tl});return new Je(gc,p(C({},a!=null?a:{}),{classes:((i=a==null?void 0:a.classes)!=null?i:"")+" ML__delim-mult"}))}var Td=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),zf=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),Bd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Kf=[0,1.2,1.8,2.4,3];function Hf(e,t,r,n){return e===void 0||e==="."?lc(r,n.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Td.has(e)||Bd.has(e)?Gu(e,t,!1,r,n):zf.has(e)?Id(e,Kf[t],!1,r,n):(console.assert(!1,"Unknown delimiter '"+e+"'"),null))}var Wf=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Zf=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Vf=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Uf(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(console.assert(e.type==="stack"),"Size4-Regular")}function jf(e,t,r,n){const a={"-4":0,"-3":1,0:2}[n.mathstyle.sizeDelta];for(let i=a;i<r.length&&r[i].type!=="stack";i++){const s=jo(e,Uf(r[i]));if(s.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let u=s.height+s.depth;if(r[i].type==="small"&&(r[i].mathstyle==="scriptscriptstyle"?u*=Math.max(za[Math.max(1,n.size-2)],n.minFontScale):r[i].mathstyle==="scriptstyle"&&(u*=Math.max(za[Math.max(1,n.size-1)],n.minFontScale))),u>t)return r[i]}return r[r.length-1]}function bu(e,t,r,n,a,i){if(!t||t.length===0||t===".")return lc(a);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let s;Bd.has(t)?s=Wf:Td.has(t)?s=Vf:s=Zf;const u=jf(gu(t),r,s,a),d=new yr({parent:a,mathstyle:u.mathstyle},i==null?void 0:i.style);return u.type==="small"?Ff(t,d,n,p(C({},i),{type:e})):u.type==="large"?Gu(t,u.size,n,d,p(C({},i),{type:e})):(console.assert(u.type==="stack"),Id(t,r,n,d,p(C({},i),{type:e})))}function Nc(e,t,r,n,a,i){if(t===".")return lc(a,i==null?void 0:i.classes);const s=Ht*a.scalingFactor,u=901,d=5/Ji,h=Math.max(r-s,n+s),v=Math.max(h/500*u,2*h-d);return bu(e,t,v,!0,a,i)}function lc(e,t){const r=new Je(null,{classes:" nulldelimiter "+(t!=null?t:""),type:"ignore"});return r.width=e.getRegisterAsEm("nulldelimiterspace"),r.wrap(new yr({parent:e,mathstyle:"textstyle"}))}var Yl=class np extends De{constructor(t){var r;super({type:"placeholder",command:"\\placeholder",mode:(r=t==null?void 0:t.mode)!=null?r:"math",style:t==null?void 0:t.style}),this.captureSelection=!0}static fromJson(t){return new np(t)}toJson(){return super.toJson()}render(t){let r;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?r=t.renderPlaceholder(t):r=this.createBox(t),this.caret&&(r.classes+=" ML__placeholder-selected"),r}_serialize(t){return t.skipPlaceholders?"":"\\placeholder{}"}},Pd=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],$d=["cases","dcases","rcases"],qu=["align","align*","aligned","gather","gathered","split"],Gf=["array","subequations","eqnarray"];function qf(e){return Gf.concat(qu).concat($d).concat(Pd).includes(e)}function Rd(e){return Pd.includes(e)}function Xf(e){return $d.includes(e)}function Jf(e){return qu.includes(e)}function Nd(e,t,r){let n=0;for(const h of r)"align"in h&&(n+=1);let a=0;const i=[];for(const h of t){let v=0;for(a=Math.max(a,Math.min(h.length,n));v<h.length;){const k=[],I=Math.min(h.length,v+n);for(;v<I;){const z=h[v];z.length===0?k.push([new De({type:"first",mode:e.mode})]):z[0].type!=="first"?k.push([new De({type:"first",mode:e.mode}),...z]):(console.assert(!z.slice(1).some(W=>W.type==="first")),k.push(z)),v+=1}i.push(k)}}i.length>0&&i[i.length-1].length===1&&i[i.length-1][0].length===1&&i[i.length-1][0][0].type==="first"&&i.pop();const s=[];for(const h of i){if(h.length!==a)for(let v=h.length;v<a;v++)h.push([new De({type:"first",mode:e.mode}),new Yl]);s.push(h)}let u=0,d=0;for(const h of s){d=0;for(const v of h){for(const k of v)k.parent=e,k.parentBranch=[u,d];d+=1}u+=1}return e.isDirty=!0,s}var Ba=class ap extends De{constructor(t,r,n,a={}){var i;super({type:"array"}),this.environmentName=t,this.rowGaps=n,a.mathstyleName&&(this.mathstyleName=a.mathstyleName),a.columns&&(a.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=a.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=Nd(this,r,this.colFormat),a.leftDelim&&(this.leftDelim=a.leftDelim),a.rightDelim&&(this.rightDelim=a.rightDelim),a.arraycolsep!==void 0&&(this.arraycolsep=a.arraycolsep),this.colSeparationType=a.colSeparationType,a.arraystretch!==void 0&&(this.arraystretch=a.arraystretch),this.minColumns=(i=a.minColumns)!=null?i:1}static fromJson(t){return new ap(t.environmentName,t.array,t.rowGaps,t)}toJson(){const t=p(C({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(r=>r.map(n=>n.map(a=>a.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(t.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(t.arraycolsep=this.arraycolsep),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}branch(t){var r;if(Ec(t))return(r=this.array[t[0]][t[1]])!=null?r:void 0}createBranch(t){var r;return Ec(t)?(this.isDirty=!0,(r=this.branch(t))!=null?r:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(t=>!!t.align).length}removeBranch(t){if(vl(t))return super.removeBranch(t);const r=this.branch(t);return this.array[t[0]][t[1]]=void 0,r.forEach(n=>{n.parent=void 0,n.parentBranch=void 0}),console.assert(r[0].type==="first"),r.shift(),this.isDirty=!0,r}get hasChildren(){return this.children.length>0}get children(){const t=[];for(const r of this.array)for(const n of r)if(n)for(const a of n)t.push(...a.children),t.push(a);return[...t,...super.children]}render(t){var r,n,a,i,s,u;const d=new yr({parent:t,mathstyle:this.mathstyleName},this.style),h=d.getRegisterAsEm("arrayrulewidth"),v=d.getRegisterAsEm("arraycolsep"),k=d.getRegisterAsEm("doublerulesep"),I=(n=(r=this.arraystretch)!=null?r:d.getRegisterAsNumber("arraystretch"))!=null?n:1;let z=typeof this.arraycolsep=="number"?this.arraycolsep:v;this.colSeparationType==="small"&&(z=.2778*(new yr({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));const W=I*Hr,ye=.7*W,lt=.3*W;let pe=0;const ze=[];let pt=0;const Ve=this.array.length;for(let si=0;si<Ve;++si){const yo=this.array[si];pt=Math.max(pt,yo.length);const is=new yr({parent:d,mathstyle:this.mathstyleName},this.style);let bc=ye/is.scalingFactor,yc=lt/is.scalingFactor;const xc={cells:[],height:0,depth:0,pos:0};for(const tc of yo){const F0=(a=De.createBox(is,tc,{type:"ignore"}))!=null?a:new Je(null,{type:"ignore"});yc=Math.max(yc,F0.depth),bc=Math.max(bc,F0.height),xc.cells.push(F0)}let wc=(i=Rc(this.rowGaps[si]))!=null?i:0;wc>0&&(wc+=lt,yc=Math.max(yc,wc),wc=0),si<Ve-1&&!Rd(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(yc+=d.getRegisterAsEm("jot")),xc.height=bc,xc.depth=yc,pe+=bc,xc.pos=pe,pe+=yc+wc,ze.push(xc)}const Vt=pe/2+Ht,mr=[];for(let si=0;si<pt;si++){const yo=[];for(const is of ze){const bc=is.cells[si];bc.depth=is.depth,bc.height=is.height,yo.push({box:bc,shift:is.pos-Vt})}yo.length>0&&mr.push(new _a({individualShift:yo}))}const or=[];let Kn=!1,ei=!1,yt=0,Tl=!this.leftDelim;const{colFormat:gc}=this;for(const si of gc){if("align"in si&&yt>=mr.length)break;if("align"in si)Kn?or.push(Oc(2*z)):(ei||Tl)&&or.push(Oc(z)),or.push(new Je(mr[yt],{classes:"col-align-"+si.align})),yt++,Kn=!0,ei=!1,Tl=!1;else if("gap"in si){if(typeof si.gap=="number")or.push(Oc(si.gap));else{const yo=Od(t,ze,Vt,si.gap);yo&&or.push(yo)}Kn=!1,ei=!1,Tl=!1}else if("separator"in si){const yo=new Je(null,{classes:"vertical-separator"});yo.height=pe,yo.setStyle("height",pe,"em"),yo.setStyle("border-right",`${h}em ${si.separator} currentColor`),yo.setStyle("vertical-align",-(pe-Vt),"em");let is=0;ei?is=k-h:Kn&&(is=z-h),yo.left=is,or.push(yo),Kn=!1,ei=!0,Tl=!1}}Kn&&!this.rightDelim&&or.push(Oc(z));const Zl=new Je(or,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Zl.caret=this.caret),this.bind(t,Zl);const as=Zl.height,Bl=Zl.depth,ol=this.bind(t,new Je([this.bind(t,Nc("open",(s=this.leftDelim)!=null?s:".",as,Bl,d,{isSelected:this.isSelected})),Zl,this.bind(t,Nc("close",(u=this.rightDelim)!=null?u:".",as,Bl,d,{isSelected:this.isSelected}))],{type:"ord"}));return ol?(ol.setStyle("display","inline-block"),this.caret&&(ol.caret=this.caret),this.bind(t,this.attachSupsub(t,{base:ol}))):null}_serialize(t){var r;const n=[];if(this.environmentName==="lines"?n.push("{\\displaylines"):n.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(n.push("{"),this.colFormat!==void 0)for(const a of this.colFormat)"align"in a&&typeof a.align=="string"?n.push(a.align):"separator"in a&&a.separator==="solid"?n.push("|"):"separator"in a&&a.separator==="dashed"&&n.push(":");n.push("}")}for(let a=0;a<this.array.length;a++){for(let i=0;i<this.array[a].length;i++)i>0&&n.push(" & "),n.push(De.serialize(this.array[a][i],t));if(a<this.array.length-1){const i=this.rowGaps[a];i!=null&&i.dimension?n.push(`\\\\[${i.dimension} ${(r=i.unit)!=null?r:"pt"}] `):n.push("\\\\ ")}}return this.environmentName==="lines"?n.push("}"):n.push(`\\end{${this.environmentName}}`),Xt(n)}getCell(t,r){return this.array[t][r]}setCell(t,r,n){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[t][r]!==void 0);for(const i of this.array[t][r])i.parent=void 0,i.parentBranch=void 0;let a=n;(n.length===0||n[0].type!=="first")&&(a=[new De({type:"first",mode:this.mode}),...n]),this.array[t][r]=a;for(const i of a)i.parent=this,i.parentBranch=[t,r];this.isDirty=!0}addRowBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));const r=[];for(let n=0;n<this.colCount;n++)r.push(yu(this));this.array.splice(t,0,r);for(let n=t;n<this.rowCount;n++)for(let a=0;a<this.colCount;a++){const i=this.array[n][a];if(i)for(const s of i)s.parentBranch=[n,a]}this.isDirty=!0}addRowAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));const r=[];for(let n=0;n<this.colCount;n++)r.push(yu(this));this.array.splice(t+1,0,r);for(let n=t+1;n<this.rowCount;n++)for(let a=0;a<this.colCount;a++){const i=this.array[n][a];if(i)for(const s of i)s.parentBranch=[n,a]}this.isDirty=!0}removeRow(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>t);const r=this.array.splice(t,1);for(const n of r)for(const a of n)if(a)for(const i of a)i.parent=void 0,i.parentBranch=void 0;for(let n=t;n<this.rowCount;n++)for(let a=0;a<this.colCount;a++){const i=this.array[n][a];if(i)for(const s of i)s.parentBranch=[n,a]}this.isDirty=!0}addColumnBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const r of this.array)r.splice(t,0,yu(this));for(let r=0;r<this.rowCount;r++)for(let n=t;n<this.colCount;n++){const a=this.array[r][n];if(a)for(const i of a)i.parentBranch=[r,n]}this.isDirty=!0}addColumnAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const r of this.array)r.splice(t+1,0,yu(this));for(let r=0;r<this.rowCount;r++)for(let n=t+1;n<this.colCount;n++){const a=this.array[r][n];if(a)for(const i of a)i.parentBranch=[r,n]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>t);for(const r of this.array){const n=r.splice(t,1);for(const a of n)if(a)for(const i of a)i.parent=void 0,i.parentBranch=void 0}for(let r=0;r<this.rowCount;r++)for(let n=t;n<this.colCount;n++){const a=this.array[r][n];if(a)for(const i of a)i.parentBranch=[r,n]}this.isDirty=!0}get cells(){const t=[];for(const r of this.array)for(const n of r)n&&t.push(n.filter(a=>a.type!=="first"));return t}};function yu(e){const t=new De({type:"first",mode:e.mode});t.parent=e;const r=new Yl;return r.parent=e,[t,r]}function Oc(e){const t=new Je(null,{classes:"arraycolsep"});return t.width=e,t}function Od(e,t,r,n){if(!n)return null;const a=[];for(const i of t){const s=De.createBox(e,n,{type:"ignore"});s&&(s.depth=i.depth,s.height=i.height,a.push({box:s,shift:i.pos-r}))}return new _a({individualShift:a}).wrap(e)}var cc=class ip extends De{constructor(t){super({mode:t.mode,command:t.command,style:t.style,body:t.body,type:"box"}),this.framecolor=t.framecolor,this.backgroundcolor=t.backgroundcolor,this.padding=t.padding,this.offset=t.offset,this.border=t.border}static fromJson(t){return new ip(t)}toJson(){return p(C({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(t){var r,n,a,i;const s=De.createBox(t,this.body,{type:"lift"});if(!s)return null;const u=t.toEm((r=this.offset)!=null?r:{dimension:0});s.depth+=u,s.setStyle("display","inline-block"),s.setStyle("position","relative"),s.setStyle("height",Math.floor(100*s.height+s.depth)/100,"em"),s.setStyle("vertical-align",-Math.floor(100*s.height)/100,"em");const d=new yr({parent:t},this.style),h=d.toEm((n=this.padding)!=null?n:{register:"fboxsep"}),v=new Je(null,{classes:"ML__box"});v.height=s.height+h,v.depth=s.depth+h,v.setStyle("box-sizing","border-box"),v.setStyle("position","absolute"),v.setStyle("top",-h+.3,"em"),v.setStyle("left",0),v.setStyle("height",v.height+v.depth,"em"),v.setStyle("width","100%"),this.backgroundcolor&&v.setStyle("background-color",(a=d.toColor(this.backgroundcolor))!=null?a:"transparent"),this.framecolor&&v.setStyle("border",`${d.getRegisterAsEm("fboxrule",2)}em solid ${(i=d.toColor(this.framecolor))!=null?i:"black"}`),this.border&&v.setStyle("border",this.border);const k=new Je([v,s],{type:"lift"});return k.setStyle("display","inline-block"),k.setStyle("position","relative"),k.setStyle("line-height",0),k.height=s.height+h+(u>0?u:0),k.depth=s.depth+h+(u<0?-u:0),k.setStyle("padding-left",h,"em"),k.setStyle("padding-right",h,"em"),k.setStyle("height",Math.floor(100*(s.height+s.depth+2*h+Math.abs(u)))/100,"em"),k.setStyle("margin-top",-h,"em"),k.setStyle("top",Math.floor(100*(s.depth-s.height+2*h-u))/100,"em"),k.setStyle("vertical-align",Math.floor(100*(s.depth+2*h))/100,"em"),this.caret&&(k.caret=this.caret),this.attachSupsub(t,{base:k})}_serialize(t){return t.skipStyles?Xt([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},Fd=class op extends De{constructor(t,r){var n;super({type:"composition",mode:(n=r==null?void 0:r.mode)!=null?n:"math",value:t})}static fromJson(t){return new op(t.value,t)}toJson(){return super.toJson()}get computedStyle(){return{}}render(t){const r=new Je(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){return""}},Lc=class sp extends De{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new sp(t.command)}toJson(){return super.toJson()}render(t){const r=this.createBox(t,{classes:"ML__error"});return this.caret&&(r.caret=this.caret),r}},zd=class lp extends De{constructor(t,r,n){super({type:"group",mode:r,style:n}),this.body=t,this.boxType=t.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,t&&t.length===1&&t[0].command===","&&(this.captureSelection=!0)}static fromJson(t){return new lp(t.body,t.mode,t.style)}render(t){const r=De.createBox(t,this.body,{type:this.boxType});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):`{${this.bodyToLatex(t)}}`}},Ti=class cp extends De{constructor(t,r,n){super({type:"leftright",style:n.style,displayContainsHighlight:!0}),this.variant=t,this.body=r,this.leftDelim=n.leftDelim,this.rightDelim=n.rightDelim}static fromJson(t){var r;return new cp((r=t.variant)!=null?r:"",t.body,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}_serialize(t){var r,n;const a=this.matchingRightDelim();return this.variant==="left...right"?Xt(["\\left",(r=this.leftDelim)!=null?r:".",this.bodyToLatex(t),"\\right",a]):this.variant==="mleft...mright"?Xt(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(t),"\\mright",a]):Xt([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(t),a])}matchingRightDelim(){var t,r;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const n=(t=this.leftDelim)!=null?t:".";return(r=mu[n])!=null?r:n}render(t){var r,n;const a=new yr({parent:t},this.style);console.assert(this.body!==void 0);const i=new yr({parent:t,mathstyle:"textstyle"},this.style),s=(r=De.createBox(a,this.body,{type:"inner"}))!=null?r:new Je(null,{type:"inner"}),u=s.height/i.scalingFactor,d=s.depth/i.scalingFactor,h=[];if(this.leftDelim&&h.push(this.bind(i,Nc("open",this.leftDelim,u,d,i,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),s&&(o(s.children,this,a,u,d),h.push(s)),this.rightDelim){let z=this.containsCaret?" ML__contains-caret":"",W=this.rightDelim;W==="?"&&(a.smartFence?(W=this.matchingRightDelim(),z+=" ML__smart-fence__close"):W="."),h.push(this.bind(i,Nc("close",W,u,d,i,{isSelected:this.isSelected,classes:z+" ML__close",mode:this.mode,style:this.style})))}let v=this.variant==="mleft...mright";const k=this.leftSibling;k&&(!v&&k.isFunction&&(v=!0),!v&&k.type==="subsup"&&((n=k.leftSibling)!=null&&n.isFunction)&&(v=!0));const I=new Je(h,{type:v?"close":"inner",classes:"left-right"});return I.setStyle("margin-top",`${-s.depth}em`),I.setStyle("height",`${s.height+s.depth}em`),this.caret&&(I.caret=this.caret),this.bind(a,I.wrap(a))}};function o(e,t,r,n,a){if(e)for(let i=0;i<e.length;i++){const s=e[i];s.type==="middle"?(e[i]=t.bind(r,Nc("inner",s.value,n,a,r,{isSelected:t.isSelected})),e[i].caret=s.caret,e[i].isSelected=s.isSelected,e[i].cssId=s.cssId,e[i].htmlData=s.htmlData,e[i].htmlStyle=s.htmlStyle,e[i].attributes=s.attributes,e[i].cssProperties=s.cssProperties):s.children&&o(s.children,t,r,n,a)}}var l=class up extends De{constructor(t,r){var n;super({type:"macro",command:t,style:r.style}),this.body=r.body,r.captureSelection===void 0?r.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=r.captureSelection,this.macroArgs=r.args,this.expand=(n=r.expand)!=null?n:!1}static fromJson(t){return new up(t.command,t)}toJson(){const t=super.toJson();return this.expand&&(t.expand=!0),this.captureSelection!==void 0&&(t.captureSelection=this.captureSelection),this.macroArgs&&(t.args=this.macroArgs),t}_serialize(t){var r;return t.expandMacro&&this.expand?this.bodyToLatex(t):this.command+((r=this.macroArgs)!=null?r:"")}render(t){const r=De.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},c=class dp extends De{constructor(){super({type:"macro-argument"})}static fromJson(t){return new dp}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},f=class fp extends De{constructor(t,r,n=!1,a,i){var s;super({type:"prompt",mode:(s=i==null?void 0:i.mode)!=null?s:"math",style:i==null?void 0:i.style,command:"\\placeholder"}),this.body=a,this.correctness=r,this.placeholderId=t,this.locked=n,this.captureSelection=this.locked}static fromJson(t){return new fp(t.placeholderId,t.correctness,t.locked,t.body,t)}toJson(){const t=super.toJson();return this.placeholderId&&(t.placeholderId=this.placeholderId),this.body||delete t.body,this.body&&(t.body=this.body.filter(r=>r.type!=="first").map(r=>r.toJson())),this.correctness&&(t.correctness=this.correctness),t.locked=this.locked,t}render(t){const r=new yr({parent:t}),n=r.getRegisterAsEm("fboxsep"),a=n,i=n,s=De.createBox(t,this.body);if(!s)return null;s.height||(s.height=r.metrics.xHeight),s.setStyle("vertical-align",-s.height,"em"),this.correctness==="correct"?s.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&s.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const u=new Je(s,{type:"ord"});u.setStyle("display","inline-block"),u.setStyle("height",s.height+s.depth,"em"),u.setStyle("vertical-align",-i,"em");let d="ML__prompt ";this.locked?d+=" ML__lockedPromptBox ":d+=" ML__editablePromptBox ",this.correctness==="correct"?d+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(d+=" ML__incorrectPromptBox "),this.containsCaret&&(d+=" ML__focusedPromptBox ");const h=new Je(null,{classes:d,attributes:{part:"prompt"}});h.height=u.height+i,h.depth=u.depth+i,h.width=u.width+2*a,h.setStyle("box-sizing","border-box"),h.setStyle("position","absolute"),h.setStyle("height",u.height+u.depth+2*i,"em"),a===0&&h.setStyle("width","100%"),a!==0&&(h.setStyle("width",`calc(100% + ${2*a}em)`),h.setStyle("top",n,"em"),h.setStyle("left",-a,"em")),(!this.body||this.body.length===1)&&(h.width=3*a,h.setStyle("width",`calc(100% + ${3*a}em)`),h.setStyle("left",-1.5*a,"em"));let v="";this.correctness==="incorrect"&&(v+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),v&&(h.svgOverlay=v);const k=new Je([h,u],{classes:"ML__prompt-atom"});return k.setStyle("position","relative"),k.setStyle("display","inline-block"),k.setStyle("line-height",0),k.height=u.height+i+.2,k.depth=u.depth+i,k.left=a,k.right=a,k.setStyle("height",u.height+i,"em"),k.setStyle("top",u.depth-u.height,"em"),k.setStyle("vertical-align",u.depth+i,"em"),k.setStyle("margin-left",.5,"em"),k.setStyle("margin-right",.5,"em"),this.caret&&(k.caret=this.caret),this.bind(r,this.attachSupsub(t,{base:k}))}_serialize(t){var r;const n=(r=this.bodyToLatex(t))!=null?r:"";if(t.skipPlaceholders)return n;let a="\\placeholder";return this.placeholderId&&(a+=`[${this.placeholderId}]`),this.correctness==="correct"?a+="[correct]":this.correctness==="incorrect"&&(a+="[incorrect]"),this.locked&&(a+="[locked]"),Er(a,n)}},g=class hp extends De{constructor(t){super({type:"subsup",style:t==null?void 0:t.style}),this.subsupPlacement="auto"}static fromJson(t){const r=new hp(t);for(const n of El)t[n]&&r.setChildren(t[n],n);return r}render(t){var r;const n=new yr({parent:t,isPhantom:!0}),a=this.leftSibling,i=(r=a.render(n))!=null?r:new Je(null),s=new Je(null);return s.height=i.height,s.depth=i.depth,this.attachSupsub(t,{base:s,isCharacterBox:a.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};function b(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var S=class{constructor(e,t,r){this.errors=[],this.index=0,this.endCount=0;var n,a,i,s;r!=null||(r={}),this.tokens=e,this.context=t instanceof yr&&!(r!=null&&r.parseMode)&&!r.mathstyle?t:new yr({from:t,mathstyle:r.mathstyle},r.style),this.args=(n=r.args)!=null?n:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(a=r.style)!=null?a:{},parseMode:(i=r.parseMode)!=null?i:"math",mathstyle:(s=r.mathstyle)!=null?s:"displaystyle",tabular:!1}}beginContext(e){var t,r,n;const a=this.parsingContext,i={parent:a,mathlist:[],style:C({},a.style),parseMode:(t=e==null?void 0:e.mode)!=null?t:a.parseMode,mathstyle:(r=e==null?void 0:e.mathstyle)!=null?r:a.mathstyle,tabular:(n=e==null?void 0:e.tabular)!=null?n:!1};this.parsingContext=i}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(C({before:ts(this.tokens.slice(this.index,this.index+10)),after:ts(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return C({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(e){return this.tokens[this.index]===e?(this.index++,!0):!1}lastSubsupAtom(){let e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new g({style:this.style}),this.mathlist.push(e)),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var e;const{index:t}=this;if(t<this.tokens.length&&this.tokens[t].startsWith("\\")){const r=un(this.tokens[t],this.parseMode);return!r||r.definitionType==="symbol"||r.ifMode&&!r.ifMode.includes(this.parseMode)?!1:(e=r.infix)!=null?e:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var e;const t=(e=this.args)==null?void 0:e.call(this,"?");return t?E(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Yl({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(e){const t=this.index;let r=this.end(),n="";for(;!r;){const i=this.get();b(i)?(n+=i,r=this.end()||n.length>=e.length):r=!0}const a=e.toUpperCase()===n.toUpperCase();return a||(this.index=t),a}scanString(){let e="";for(;!this.end();){const t=this.peek();if(t==="]")return e;if(t==="<space>")e+=" ";else if(t.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=t.substring(1);else if(b(t))e+=t;else return e;this.next()}return e}scanBalancedString(){let e="",t=this.end(),r=1;for(;!t;){const n=this.get();n==="<space>"?e+=" ":n==="<{>"?(e+="{",r+=1):n==="<}>"?(r-=1,r>0?e+="}":this.index-=1):n==="<$>"?e+="$":n==="<$$>"?e+="$$":e+=n,t=r===0||this.end()}return e}scanLiteralGroup(){var e;if(!this.match("<{>"))return"";let t="",r=1;for(;r>0&&!this.end();){const n=this.get();n==="<}>"?(r-=1,r>0&&(t+="}")):n==="<{>"?(r+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(n)&&(t+=" "),t+=(e={"<space>":" ","<$$>":"$$","<$>":"$"}[n])!=null?e:n)}return t}scanNumber(e=!0){var t,r;let n=!1,a=this.peek();for(;a==="<space>"||a==="+"||a==="-";)this.get(),a==="-"&&(n=!n),a=this.peek();e=!!e;let i=10,s=/\d/;if(this.match("'"))i=8,s=/[0-7]/,e=!0;else if(this.match('"'))i=16,s=/[\dA-F]/,e=!0;else if(this.match("x"))i=16,s=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return a=this.get(),a?a.length===2&&a.startsWith("\\")?{number:(n?-1:1)*((t=a.codePointAt(1))!=null?t:0),base:"alpha"}:{number:(n?-1:1)*((r=a.codePointAt(0))!=null?r:0),base:"alpha"}:null;let u="";for(;this.hasPattern(s);)u+=this.get();if(!e&&(this.match(".")||this.match(",")))for(u+=".";this.hasPattern(s);)u+=this.get();const d=e?Number.parseInt(u,i):Number.parseFloat(u);return Number.isNaN(d)?null:{number:n?-d:d,base:i===16?"hexadecimal":i===8?"octal":"decimal"}}scanRegister(){var e;const t=this.index,r=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return r;let n=!1;if(r===null)for(;;){const i=this.peek();if(i==="-")n=!n;else if(i!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const i=this.get();return i.startsWith("\\")?r?{register:i,global:!0,factor:(n?-1:1)*r.number}:n?{register:i,global:!0,factor:-1}:{register:i,global:!0}:(this.index=t,null)}let a=this.get();return a!=null&&a.startsWith("\\")?(a=a.substring(1),this.context.registers[a]?!n||r!==null?{register:a,factor:(n?-1:1)*((e=r==null?void 0:r.number)!=null?e:1)}:{register:a}:(this.index=t,null)):(this.index=t,null)}scanValue(){const e=this.scanRegister();if(e)return e;const t=this.index,r=this.scanGlueOrDimen();if(r&&("unit"in r||"glue"in r&&"unit"in r.glue))return r;this.index=t;const n=this.scanNumber();if(n)return n;if(this.end()||!b(this.peek()))return null;const a=this.scanString();return a.length>0?{string:a}:null}scanDimen(){const e=this.scanNumber(!1);if(e===null)return null;const t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let r;return this.matchKeyword("pt")?r="pt":this.matchKeyword("mm")?r="mm":this.matchKeyword("cm")?r="cm":this.matchKeyword("ex")?r="ex":this.matchKeyword("px")?r="px":this.matchKeyword("em")?r="em":this.matchKeyword("bp")?r="bp":this.matchKeyword("dd")?r="dd":this.matchKeyword("pc")?r="pc":this.matchKeyword("in")?r="in":this.matchKeyword("mu")&&(r="mu"),r?{dimension:t,unit:r}:{dimension:t}}scanGlueOrDimen(){const e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;const t={glue:e};if(this.matchKeyword("plus")){const r=this.scanDimen();if(r)t.grow=r;else return t}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){const r=this.scanDimen();if(r)t.shrink=r;else return t}return!t.grow&&!t.shrink?e:t}scanColspec(){this.skipWhitespace();const e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const t=this.get();t==="c"||t==="r"||t==="l"?e.push({align:t}):t==="|"?e.push({separator:"solid"}):t===":"?e.push({separator:"dashed"}):t==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(r=>r==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});const t=this.scan(r=>r===(e==="displaystyle"?"\\]":"\\)"));return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const t=this.scan(r=>r===e);return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanEnvironment(){if(!this.match("\\begin"))return null;const e=this.scanArgument("string");if(!e)return null;const t=xe(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const r=[];if(t.params)for(const u of t.params)if(u.isOptional)r.push(this.scanOptionalArgument(u.type));else{const d=this.scanArgument(u.type);d||this.onError({code:"missing-argument",arg:e}),r.push(d)}this.beginContext({tabular:t.tabular});const n=[],a=[];let i=[],s=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s)if(this.matchColumnSeparator())i.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){i.push(this.mathlist),this.mathlist=[];let u=null;this.skipWhitespace(),this.match("[")&&(u=this.scanDimen(),this.skipWhitespace(),this.match("]")),a.push(u!=null?u:{dimension:0}),n.push(i),i=[]}else this.mathlist.push(...this.scan(u=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(u)));while(!s);return i.push(this.mathlist),i.length>0&&n.push(i),this.endContext(),t.createAtom(e,n,a,r)}scanExpression(){const e=this.mathlist;if(this.mathlist=[],this.parseExpression()){const t=this.mathlist;return this.mathlist=e,t}return this.mathlist=e,null}scan(e){this.beginContext(),e||(e=s=>s==="<}>");let t="",r=null,n=[],a=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),r=un(t,"math"),r&&(n=this.scanArguments(r)[1]),a=this.mathlist,this.mathlist=[]):this.parseExpression();let i;return t?(console.assert(!!r),n.unshift(this.mathlist),a&&n.unshift(a),i=[r.createAtom({command:t,args:n,style:this.style,mode:this.parseMode})]):i=this.mathlist,this.endContext(),i}scanGroup(){const e=this.index;if(!this.match("<{>"))return null;const t=this.scan(n=>n==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const r=new zd(t,this.parseMode,this.style);return r.verbatimLatex=ts(this.tokens.slice(e,this.index)),r}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();const t=new Ti("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t}scanDelim(){this.skipWhitespace();const e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!b(e)&&!e.startsWith("\\"))return null;this.next();const t=un(e,"math");return t?t.definitionType==="function"&&t.ifMode&&!t.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):t.definitionType==="symbol"&&(t.type==="mopen"||t.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new Lc("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new Lc("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const r=this.scanDelim();if(!r)return this.onError({code:"unexpected-delimiter"}),new Lc(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();const n=this.mathlist;this.endContext();const a=(e=this.scanDelim())!=null?e:".";return new Ti(t==="\\right"?"left...right":"mleft...mright",n,{leftDelim:r,rightDelim:a,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;const t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new De({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new De({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(ke(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),r=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!r)return!1;const n=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return n===null?!1:(n.explicitSubsupPlacement=!0,e&&(n.subsupPlacement="over-under"),t&&(n.subsupPlacement="adjacent"),r&&(n.subsupPlacement="auto"),!0)}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let t;const r=[];let n=e.infix?2:0;for(;n<e.params.length;){const a=e.params[n];a.type==="rest"?r.push(this.scan(i=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(i))):a.isOptional?r.push(this.scanOptionalArgument(a.type)):a.type.endsWith("*")?t=a.type.slice(0,-1):r.push(this.scanArgument(a.type)),n+=1}return[t,r]}scanSymbolOrLiteral(){const e=this.peek();if(!e)return null;this.next();let t;if(b(e)){const r=ao.createAtom(this.parseMode,e,C({},this.style));return r?[r]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){const r=un(e,this.parseMode);if(!r)return this.onError({code:"unknown-command",arg:e}),[new Lc(e)];if(r.definitionType==="symbol"){const n=C({},this.style);r.variant&&(n.variant=r.variant),t=new De({type:r.type,command:e,style:n,value:String.fromCodePoint(r.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(r.applyMode||r.applyStyle||r.infix)return this.onError({code:"invalid-command",arg:e}),[new Lc(e)];r.createAtom&&(t=r.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}))}}return t?[t]:null}scanArgument(e){var t;this.skipFiller();const r=this.parseMode;if(e==="auto"&&(e=r),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(t=this.scanDelim())!=null?t:".";if(e==="expression")return this.scanExpression();if(e==="math"){e!==r&&this.beginContext({mode:"math"});const a=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),a}if(e==="text"){e!==r&&this.beginContext({mode:"text"});const a=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),a}return e==="balanced-string"||console.assert(!1),null}if(e==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const a=this.mathlist;return this.endContext(),{group:a}}if(e==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const a=this.mathlist;return this.endContext(),{group:a}}let n=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const a=this.mathlist;return this.endContext(),{group:a}}return e==="string"?n=this.scanString():e==="balanced-string"?n=this.scanBalancedString():e==="colspec"?n=this.scanColspec():e==="value"&&(n=this.scanValue()),this.skipUntilToken("<}>"),n}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let t=null;for(;!this.end()&&!this.match("]");)if(e==="string")t=this.scanString();else if(e==="value")t=this.scanValue();else if(e==="colspec")t=this.scanColspec();else if(e==="bbox"){const r={},n=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const a of n){const i=a.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(i)r.padding={dimension:parseInt(i[1]),unit:i[2]};else{const s=a.match(/^\s*border\s*:\s*(.*)/);s?r.border=s[1]:r.backgroundcolor={string:a}}}t=r}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(r=>r==="]")),this.endContext());return t}scanSymbolOrCommand(e){var t,r,n;if(e==="\\placeholder"){const u=this.scanOptionalArgument("string"),d=this.scanOptionalArgument("math"),h=De.serialize(d,{defaultMode:"math"});let v=[],k;!k&&h==="correct"?k="correct":!k&&h==="incorrect"?k="incorrect":h!==""&&(v=d);const I=this.scanOptionalArgument("string")==="locked",z=this.scanArgument("auto");let W;return z&&Array.isArray(z)&&z.length>0?W=z:z&&typeof z=="object"&&"group"in z?W=z.group:W=v,u?[new f(u,k,I,W!=null?W:v,{mode:this.parseMode,style:this.style})]:[new Yl({mode:this.parseMode,style:this.style})]}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){const u=this.index,d=this.scanLiteralGroup()||this.next();if(!d)return null;if(this.context.registers[d.substring(1)]){const h=this.scanArgument("string");h!==null&&(this.context.registers[d.substring(1)]=h);const v=Xt([e,ts(this.tokens.slice(u,this.index))]);return[new De({type:"text",value:"",verbatimLatex:v})]}}let a=this.scanMacro(e);if(a)return[a];const i=un(e,this.parseMode);if(!i)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(u=>new De({type:"text",value:u,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new Lc(e)]);const s=this.index;if(i.definitionType==="symbol"){const u=C({},this.style);i.variant&&(u.variant=i.variant),a=new De({type:i.type,command:e,style:u,value:String.fromCodePoint(i.codepoint),mode:this.parseMode})}else{if(i.ifMode&&!i.ifMode.includes(this.parseMode))return[];const u=this.parseMode;i.applyMode&&(this.parseMode=i.applyMode);let d,h=[];if(i.parse?h=i.parse(this):[d,h]=this.scanArguments(i),this.parseMode=u,i.applyMode&&!i.applyStyle&&!i.createAtom)return ke(h[0]);if(i.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof i.createAtom=="function")a=i.createAtom({command:e,args:h,style:this.style,mode:this.parseMode}),d&&(a.body=ke(this.scanArgument(d)));else if(typeof i.applyStyle=="function"){const v=C(C({},this.style),i.applyStyle(e,h,this.context)),k=this.parseMode;if(i.applyMode&&(this.parseMode=i.applyMode),d){const I=this.style;this.style=v;const z=this.scanArgument(d);return this.style=I,this.parseMode=k,ke(z)}this.style=v}else a=new De({type:"mord",command:(r=i.command)!=null?r:e,style:C({},this.style),value:e,mode:(n=i.applyMode)!=null?n:this.parseMode})}if(!a)return null;if(a instanceof De&&a.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){const u=Xt([e,ts(this.tokens.slice(s,this.index))]);u&&(a.verbatimLatex=u)}if(a.verbatimLatex===null&&(a.verbatimLatex=void 0),a.isFunction&&this.smartFence){const u=this.scanSmartFence();if(u)return[a,u]}return[a]}scanSymbolCommandOrLiteral(){const e=this.get();if(!e)return null;if(b(e)){const t=ao.createAtom(this.parseMode,e,C({},this.style));if(!t)return null;if(t.isFunction&&this.smartFence){const r=this.scanSmartFence();if(r)return[t,r]}return[t]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new Vc(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var t;const r=this.context.getMacro(e);if(!r)return null;const n=this.index,a=r.args,i={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(let s=1;s<=a;s++){let u=this.scanLiteralGroup();if(!u){const d=this.index;this.scanExpression(),u=ts(this.tokens.slice(d,this.index))}i[s]=u}return new l(e,{expand:r.expand,captureSelection:r.captureSelection,args:n===this.index?null:ts(this.tokens.slice(n,this.index)),style:this.parsingContext.style,body:E(r.def,{context:this.context,parseMode:this.parseMode,args:s=>i[s],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var e,t,r,n;let a=(n=(r=(t=(e=this.scanEnvironment())!=null?e:this.scanModeShift())!=null?t:this.scanModeSet())!=null?r:this.scanGroup())!=null?n:this.scanLeftRight();if(a===null){if(this.parseSupSub()||this.parseLimits())return!0;a=this.scanSymbolCommandOrLiteral()}return a?(Array.isArray(a)?this.mathlist.push(...a):this.mathlist.push(a),!0):!1}};function E(e,t){var r,n,a,i;const s=(r=t==null?void 0:t.args)!=null?r:void 0,u=new S(ha(e,s),t==null?void 0:t.context,{args:s,mathstyle:(n=t==null?void 0:t.mathstyle)!=null?n:"displaystyle",parseMode:(a=t==null?void 0:t.parseMode)!=null?a:"math",style:(i=t==null?void 0:t.style)!=null?i:{}}),d=[];for(;!u.end();)d.push(...u.scan(()=>!1));return d}function N(e,t){var r;const n=new S(ha(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(r=t==null?void 0:t.parseMode)!=null?r:"math"});for(;!n.end();)n.scan();return n.errors}var Z=class pp extends De{constructor(t,r){super({type:"chem"},{command:t,mode:"math"});const n=$.go(L.go(r,t==="\\pu"?"pu":"ce"),!1);this.body=E(n),this._verbatimLatex=t+"{"+r+"}",this.arg=r,this.captureSelection=!0}static fromJson(t){return new pp(t.command,t.arg)}set verbatimLatex(t){}get verbatimLatex(){return this._verbatimLatex}toJson(){return p(C({},super.toJson()),{arg:this.arg})}render(t){const r=De.createBox(t,this.body,{type:"inner"});return this.caret&&(r.caret=this.caret),this.bind(t,r)}_serialize(t){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};re(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new Z(e.command,(t=e.args[0])!=null?t:"")}});var L={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var r="0",n={};n.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var a,i=10,s=[];;){a!==e?(i=10,a=e):i--;var u=L.stateMachines[t],d=u.transitions[r]||u.transitions["*"];e:for(var h=0;h<d.length;h++){var v=L.patterns.match_(d[h].pattern,e);if(v){for(var k=d[h].task,I=0;I<k.action_.length;I++){var z;if(u.actions[k.action_[I].type_])z=u.actions[k.action_[I].type_](n,v.match_,k.action_[I].option);else if(L.actions[k.action_[I].type_])z=L.actions[k.action_[I].type_](n,v.match_,k.action_[I].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+k.action_[I].type_+")"];L.concatArray(s,z)}if(r=k.nextState||r,e.length>0){if(k.revisit||(e=v.remainder),!k.toContinue)break e}else return s}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=L.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var r=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:e.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return L.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return L.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return L.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return L.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return L.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return L.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return L.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return L.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return L.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return L.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return L.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return L.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return L.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return L.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return L.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return L.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return L.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return L.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return L.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var r=L.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,r,n,a,i,s,u,d,h){var v=function(pe,ze){if(typeof ze=="string")return pe.indexOf(ze)!==0?null:ze;var pt=pe.match(ze);return pt?pt[0]:null},k=function(pe,ze,pt){for(var Ve=0;ze<pe.length;){var Vt=pe.charAt(ze),mr=v(pe.substr(ze),pt);if(mr!==null&&Ve===0)return{endMatchBegin:ze,endMatchEnd:ze+mr.length};if(Vt==="{")Ve++;else if(Vt==="}"){if(Ve===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Ve--}ze++}return Ve>0,null},I=v(e,t);if(I===null||(e=e.substr(I.length),I=v(e,r),I===null))return null;var z=k(e,I.length,n||a);if(z===null)return null;var W=e.substring(0,n?z.endMatchEnd:z.endMatchBegin);if(i||s){var ye=this.findObserveGroups(e.substr(z.endMatchEnd),i,s,u,d);if(ye===null)return null;var lt=[W,ye.match_];return{match_:h?lt.join(""):lt,remainder:ye.remainder}}else return{match_:W,remainder:e.substr(z.endMatchEnd)}},match_:function(e,t){var r=L.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return L.patterns.patterns[e](t);var n=t.match(r);if(n){var a;return n[2]?a=[n[1],n[2]]:n[1]?a=n[1]:a=n[0],{match_:a,remainder:t.substr(n[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return L.go(t,"text")},"{text}":function(e,t){var r=["{"];return L.concatArray(r,L.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return L.go(t,"tex-math")},"tex-math tight":function(e,t){return L.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return L.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var n=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),r.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:n[3]})),r},"9,9":function(e,t){return L.go(t,"9,9")}},createTransitions:function(e){var t,r,n,a,i={};for(t in e)for(r in e[t])for(n=r.split("|"),e[t][r].stateArray=n,a=0;a<n.length;a++)i[n[a]]=[];for(t in e)for(r in e[t])for(n=e[t][r].stateArray||[],a=0;a<n.length;a++){var s=e[t][r];if(s.action_){s.action_=[].concat(s.action_);for(var u=0;u<s.action_.length;u++)typeof s.action_[u]=="string"&&(s.action_[u]={type_:s.action_[u]})}else s.action_=[];for(var d=t.split("|"),h=0;h<d.length;h++)if(n[a]==="*")for(var v in i)i[v].push({pattern:d[h],task:s});else i[n[a]].push({pattern:d[h],task:s})}return i},stateMachines:{}};L.stateMachines={ce:{transitions:L.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var r;if((e.d||"").match(/^[0-9]+$/)){var n=e.d;e.d=void 0,r=this.output(e),e.b=n}else r=this.output(e);return L.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return L.concatArray(r,this.output(e)),L.concatArray(r,L.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var n=L.patterns.match_("orbital",e.o||""),a=L.patterns.match_("one lowercase greek letter $",e.o||""),i=L.patterns.match_("one lowercase latin letter $",e.o||""),s=L.patterns.match_("$one lowercase latin letter$ $",e.o||""),u=t==="-"&&(n&&n.remainder===""||a||i||s);u&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!n&&i&&(e.o="$"+e.o+"$");var d=[];return u?(L.concatArray(d,this.output(e)),d.push({type_:"hyphen"})):(n=L.patterns.match_("digits",e.d||""),r&&n&&n.remainder===""?(L.concatArray(d,L.actions["d="](e,t)),L.concatArray(d,this.output(e))):(L.concatArray(d,this.output(e)),L.concatArray(d,L.actions.bond(e,t,"-")))),d},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:L.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,""),n=r!==t;return n&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var n;if(!e.r)n=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!r||(e.sb&&n.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&r!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&L.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),n.push({type_:"chemfive",a:L.go(e.a,"a"),b:L.go(e.b,"bd"),p:L.go(e.p,"pq"),o:L.go(e.o,"o"),q:L.go(e.q,"pq"),d:L.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var a;e.rdt==="M"?a=L.go(e.rd,"tex-math"):e.rdt==="T"?a=[{type_:"text",p1:e.rd||""}]:a=L.go(e.rd);var i;e.rqt==="M"?i=L.go(e.rq,"tex-math"):e.rqt==="T"?i=[{type_:"text",p1:e.rq||""}]:i=L.go(e.rq),n={type_:"arrow",r:e.r,rd:a,rq:i}}for(var s in e)s!=="parenthesisLevel"&&s!=="beginsWithBond"&&delete e[s];return n},"oxidation-output":function(e,t){var r=["{"];return L.concatArray(r,L.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:L.go(t[0]),p2:L.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:L.go(t[0]),p2:L.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:L.go(t[0]),p2:L.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:L.go(t[0]),p2:L.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:L.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,r){return{type_:"operator",kind_:r||t}}}},a:{transitions:L.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:L.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var r in e)delete e[r];return t}}}},pq:{transitions:L.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:L.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:L.go(t[1],"pq")}}}},bd:{transitions:L.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:L.go(t[1],"bd")}}}},oxidation:{transitions:L.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"tex-math tight":{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"9,9":{transitions:L.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:L.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(L.concatArray(r,L.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?L.concatArray(r,L.go(t[2],"pu-9,9")):r.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[5]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),L.concatArray(r,L.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=L.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var n=L.patterns.match_("{(...)}",e.q||"");if(n&&n.remainder===""&&(e.q=n.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:L.go(e.d,"pu"),q:L.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:a.d,p2:a.q}:(t=a.d,a.d.length>1||a.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),L.concatArray(t,a.q))}else t=L.go(e.d,"pu-2");for(var i in e)delete e[i];return t}}},"pu-2":{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var r=L.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=L.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:L.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var r=e.text_.length%3;r===0&&(r=3);for(var n=e.text_.length-3;n>0;n-=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var a in e)delete e[a];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,n=0;n<r;n+=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(n))}else t.push(e.text_);for(var a in e)delete e[a];return t}}}};var $={go:function(e,t){if(!e)return"";for(var r="",n=!1,a=0;a<e.length;a++){var i=e[a];typeof i=="string"?r+=i:(r+=$._go2(i),i.type_==="1st-level escape"&&(n=!0))}return!t&&!n&&r&&(r="{"+r+"}"),r},_goInner:function(e){return e&&$.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:$._goInner(e.a),b:$._goInner(e.b),p:$._goInner(e.p),o:$._goInner(e.o),q:$._goInner(e.q),d:$._goInner(e.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),t+=r.a+"\\,"),(r.b||r.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(r.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(r.p||"")+"}}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),t+=r.o),e.dType==="kv"?((r.d||r.q)&&(t+="{\\vphantom{X}}"),r.d&&(t+="^{"+r.d+"}"),r.q&&(t+="_{\\smash[t]{"+r.q+"}}")):e.dType==="oxidation"?(r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"),r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}")):(r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}"),r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+$._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+$._goInner(e.p1);break;case"bond":if(t=$._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var n="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var a="\\frac{"+$._goInner(e.p1)+"}{"+$._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+$._goInner(e.p1)+"}{"+$._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+$._goInner(e.p1)+"}{"+$._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+$._goInner(e.p1)+"}{"+$._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+$._goInner(e.p1)+"}_{"+$._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+$._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var i={rd:$._goInner(e.rd),rq:$._goInner(e.rq)},s=$._getArrow(e.r);i.rd||i.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(s="\\long"+s,i.rd&&(s="\\overset{"+i.rd+"}{"+s+"}"),i.rq&&(e.r==="<-->"?s="\\underset{\\lower2mu{"+i.rq+"}}{"+s+"}":s="\\underset{\\lower6mu{"+i.rq+"}}{"+s+"}"),s=" {}\\mathrel{"+s+"}{} "):(i.rq&&(s+="[{"+i.rq+"}]"),s+="{"+i.rd+"}",s=" {}\\mathrel{\\x"+s+"}{} "):s=" {}\\mathrel{\\long"+s+"}{} ",t=s;break;case"operator":t=$._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function F(e){}function q(e){}var he=class mp extends De{constructor(t){super(p(C({},t),{type:"delim"})),this.value=t.delim,this.size=t.size}static fromJson(t){return new mp(t)}toJson(){return p(C({},super.toJson()),{delim:this.value,size:this.size})}render(t){return new Je(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):Er(this.command,this.value)}},it=class vp extends De{constructor(t){super(p(C({},t),{type:"sizeddelim",value:t.delim})),this.delimType=t.delimType,this.size=t.size}static fromJson(t){return new vp(t)}toJson(){return p(C({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(t){let r=Hf(this.value,this.size,t,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return r?(r=this.bind(t,r),this.caret&&(r.caret=this.caret),r):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):Er(this.command,this.value)}},ht=class gp extends De{constructor(t,r,n,a){var i,s;super({type:"enclose",command:t,style:a.style}),this.body=r,this.backgroundcolor=a.backgroundcolor,n.updiagonalarrow&&(n.updiagonalstrike=!1),n.box&&(n.left=!1,n.right=!1,n.bottom=!1,n.top=!1),this.notation=n,this.shadow=(i=a.shadow)!=null?i:"none",this.strokeWidth=(s=a.strokeWidth)!=null?s:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=a.strokeStyle,this.svgStrokeStyle=a.svgStrokeStyle,this.strokeColor=a.strokeColor,this.borderStyle=a.borderStyle,this.padding=a.padding,this.captureSelection=!1}static fromJson(t){return new gp(t.command,t.body,t.notation,t)}toJson(){return p(C({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(t){var r;if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=un(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);let a=(r=this.command)!=null?r:"";if(this.command==="\\enclose"){a+="{"+Object.keys(this.notation).join(" ")+"}";let i="",s="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(i+=s+'mathbackground="'+this.backgroundcolor+'"',s=","),this.shadow&&this.shadow!=="auto"&&(i+=s+'shadow="'+this.shadow+'"',s=","),this.strokeWidth||this.strokeStyle!=="solid"?(i+=s+this.borderStyle,s=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(i+=s+'mathcolor="'+this.strokeColor+'"',s=","),i&&(a+=`[${i}]`)}return Er(a,this.bodyToLatex(t))}render(t){const r=new yr({parent:t},this.style),n=De.createBox(r,this.body);if(!n)return null;const a=zt(this.borderStyle),i=r.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});n.setStyle("position","relative"),n.setStyle("display","inline-block"),n.setStyle("top",i,"em"),n.setStyle("height",n.height+n.depth,"em"),n.setStyle("width",n.width,"em");const s=new Je(null,{classes:"ML__notation"});let u=n.height+n.depth+2*i;const d=n.width+2*i;let h="";if(this.notation.horizontalstrike&&(h+=this.line(3,50,97,50)),this.notation.verticalstrike&&(h+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(h+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(h+=this.line(3,3,97,97)),this.notation.updiagonalarrow){h+=this.line(i.toString(),(i+n.depth+n.height).toString(),(i+n.width).toString(),i.toString());const W=.03*Math.sqrt(d*d+u*u)*1,ye=n.width*W,lt=(n.depth+n.height)*W,pe=i+n.width;let ze=i;ze+lt-.4*ye<0&&(ze=.4*ye-lt),h+='<polygon points="',h+=`${pe},${ze} ${pe-ye-.4*lt},${ze+lt-.4*ye} `,h+=`${pe-.7*ye},${ze+.7*lt} ${pe-ye+.4*lt},${ze+lt+.4*ye} `,h+=`${pe},${ze}`,h+=`" stroke='none' fill="${this.strokeColor}"`,h+="/>"}let v=0;if(this.notation.phasorangle){const I=dr(r),z=(n.height+n.depth+2*I+i).toString(),W=(n.height+n.depth)/2;h+=this.line(i.toString(),z,(i+W+n.width).toString(),z),h+=this.line(i.toString(),z,(i+W).toString(),(i-I).toString()),u+=I,v=W,n.left+=u/2-i}if(this.notation.longdiv){const I=dr(r);u+=I,h+=this.line(i.toString(),i.toString(),(i+n.width).toString(),i.toString());const z=.3;v=z+I,n.left+=z+I,n.setTop(i+I),h+='<path d="',h+=`M ${i} ${i} a${z} ${(n.depth+n.height+2*I)/2}, 0, 1, 1, 0 ${n.depth+n.height+2*I} "`,h+=` stroke-width="${ir(r)}" stroke="${this.strokeColor}" fill="none"`,h+="/>"}if(s.width=n.width+2*i+v,s.height=n.height+i,s.depth=n.depth+i,s.setStyle("box-sizing","border-box"),s.setStyle("left",`calc(-${a} / 2 )`),s.setStyle("height",`${Math.floor(100*u)/100}em`),s.setStyle("top",`calc(${a} / 2 )`),this.backgroundcolor&&s.setStyle("background-color",this.backgroundcolor),this.notation.box&&s.setStyle("border","1px solid red"),this.notation.actuarial&&(s.setStyle("border-top",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(s.setStyle("border-bottom",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(s.setStyle("border-radius","8px"),s.setStyle("border",this.borderStyle)),this.notation.circle&&(s.setStyle("border-radius","50%"),s.setStyle("border",this.borderStyle)),this.notation.top&&s.setStyle("border-top",this.borderStyle),this.notation.left&&s.setStyle("border-left",this.borderStyle),this.notation.right&&s.setStyle("border-right",this.borderStyle),this.notation.bottom&&s.setStyle("border-bottom",this.borderStyle),h){let I="";this.shadow==="auto"&&(I+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(I+=`filter: drop-shadow(${this.shadow})`),I+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,I+=' stroke-linecap="round"',this.svgStrokeStyle&&(I+=` stroke-dasharray="${this.svgStrokeStyle}"`),s.svgStyle=I,s.svgOverlay=h}const k=new Je([s,n]);return k.setStyle("position","relative"),k.setStyle("vertical-align",i,"em"),k.setStyle("height",`${Math.floor(100*(n.height+n.depth+2*i))/100}em`),k.setStyle("display","inline-block"),k.height=s.height,k.depth=s.depth,k.width=s.width-2*i,k.left=i,k.right=i,this.caret&&(k.caret=this.caret),k.wrap(r)}line(t,r,n,a){return`<line x1="${vt(t)}" y1="${vt(r)}" x2="${vt(n)}" y2="${vt(a)}" vector-effect="non-scaling-stroke"></line>`}};function vt(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function zt(e){if(!e)return"1px";const t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function ir(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function dr(e){const t=e.isDisplayStyle?Rn:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}var Wr=class bp extends De{constructor(t,r,n){var a,i;super(p(C({},n),{type:"genfrac",displayContainsHighlight:!0})),this.above=t,this.below=r,this.hasBarLine=(a=n==null?void 0:n.hasBarLine)!=null?a:!0,this.continuousFraction=(i=n==null?void 0:n.continuousFraction)!=null?i:!1,this.numerPrefix=n==null?void 0:n.numerPrefix,this.denomPrefix=n==null?void 0:n.denomPrefix,this.mathstyleName=n==null?void 0:n.mathstyleName,this.leftDelim=n==null?void 0:n.leftDelim,this.rightDelim=n==null?void 0:n.rightDelim,this.fractionNavigationOrder=n==null?void 0:n.fractionNavigationOrder}static fromJson(t){return new bp(t.above,t.below,t)}toJson(){const t={};return this.continuousFraction&&(t.continuousFraction=!0),this.numerPrefix&&(t.numerPrefix=this.numerPrefix),this.denomPrefix&&(t.denomPrefix=this.denomPrefix),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.hasBarLine||(t.hasBarLine=!1),this.mathstyleName&&(t.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(t.fractionNavigationOrder=this.fractionNavigationOrder),C(C({},super.toJson()),t)}get children(){if(this._children)return this._children;const t=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const r of this.below)t.push(...r.children),t.push(r);for(const r of this.above)t.push(...r.children),t.push(r)}else{for(const r of this.above)t.push(...r.children),t.push(r);for(const r of this.below)t.push(...r.children),t.push(r)}return this._children=t,t}render(t){var r,n;const a=new yr({parent:t,mathstyle:this.mathstyleName},this.style),i=a.metrics,s=new yr({parent:a,mathstyle:this.continuousFraction?"":"numerator"},this.style),u=this.numerPrefix?new Je([new Je(this.numerPrefix),De.createBox(s,this.above)],{isTight:s.isTight,type:"ignore"}):(r=De.createBox(s,this.above,{type:"ignore"}))!=null?r:new Je(null,{type:"ignore"}),d=new yr({parent:a,mathstyle:this.continuousFraction?"":"denominator"},this.style),h=this.denomPrefix?new Je([new Je(this.denomPrefix),De.createBox(d,this.below,{type:"ignore"})]):(n=De.createBox(d,this.below,{type:"ignore"}))!=null?n:new Je(null,{type:"ignore"}),v=this.hasBarLine?i.defaultRuleThickness:0;let k,I=0,z;a.isDisplayStyle?(k=s.metrics.num1,I=v>0?3*v:7*v,z=d.metrics.denom1):(v>0?(k=s.metrics.num2,I=v):(k=s.metrics.num3,I=3*i.defaultRuleThickness),z=d.metrics.denom2);const W=[];this.isSelected&&W.push("ML__selected");const ye=u.depth,lt=h.height;let pe;if(v<=0){const or=k-ye-(lt-z);or<I&&(k+=(I-or)/2,z+=(I-or)/2),pe=new _a({individualShift:[{box:u,shift:-k,classes:[...W,"ML__center"]},{box:h,shift:z,classes:[...W,"ML__center"]}]}).wrap(a)}else{const or=new Je(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});or.softWidth=Math.max(u.width,h.width),or.height=v/2,or.depth=v/2;const Kn=Ht+v/2;k<I+ye+Kn&&(k=I+ye+Kn);const ei=Ht-v/2;z<I+lt-ei&&(z=I+lt-ei),pe=new _a({individualShift:[{box:h,shift:z,classes:[...W,"ML__center"]},{box:or,shift:-ei,classes:W},{box:u,shift:-k,classes:[...W,"ML__center"]}]}).wrap(a)}const ze=a.isDisplayStyle?i.delim1:i.delim2,pt=this.leftDelim?this.bind(t,bu("open",this.leftDelim,ze,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):lc(a,"open");let Ve=null;this.continuousFraction?Ve=new Je(null,{type:"close"}):this.rightDelim?Ve=this.bind(t,bu("close",this.rightDelim,ze,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Ve=lc(a,"close");const Vt=new Je([pt,pe,Ve],{isTight:a.isTight,type:"inner",classes:"mfrac"}),mr=this.bind(t,Vt);return this.caret&&(mr.caret=this.caret),this.attachSupsub(t,{base:mr})}},hr=class yp extends De{constructor(t,r){var n;super({type:"latex",value:t,mode:"latex"}),this.isSuggestion=(n=r==null?void 0:r.isSuggestion)!=null?n:!1,this.isError=!1}static fromJson(t){const r=new yp(t.value);return t.isSuggestion&&(r.isSuggestion=!0),t.isError&&(r.isError=!0),r}toJson(){const t={};return this.isSuggestion&&(t.isSuggestion=!0),this.isError&&(t.isError=!0),C({type:"latex",value:this.value},t)}get computedStyle(){return{}}render(t){const r=new Je(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},yn=class xp extends De{constructor(t){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(r=>new hr(r)),this.skipBoundary=!1}static fromJson(t){return new xp("")}toJson(){return super.toJson()}render(t){const r=De.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){var r,n;return(n=(r=this.body)==null?void 0:r.map(a=>a.value).join(""))!=null?n:""}},Hi=class wp extends De{constructor(t,r){super(p(C({},r),{type:"extensible-symbol",isFunction:r==null?void 0:r.isFunction})),this.value=t,this.variant=r==null?void 0:r.variant,this.subsupPlacement=r==null?void 0:r.limits}static fromJson(t){return new wp(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.value&&(t.symbol=this.value),t}render(t){var r;const n=t.isDisplayStyle&&this.value!=="\\smallint",a=new Je(this.value,{fontFamily:n?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(n?"large-op":"small-op"),type:"op",maxFontSize:t.scalingFactor,isSelected:this.isSelected});if(!a)return null;a.right=a.italic;const i=(a.height-a.depth)/2-Ht*t.scalingFactor,s=a.italic;a.setTop(i);let u=a;if(this.superscript||this.subscript){const d=(r=this.subsupPlacement)!=null?r:"auto";u=d==="over-under"||d==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:a,baseShift:i,slant:s}):this.attachSupsub(t,{base:a})}return new Je(this.bind(t,u),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=[];return n.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),Xt(n)}},xn=class Sp extends De{constructor(t){const r=t.body;super(p(C({},t),{type:"overlap",body:typeof r=="string"?[new De({value:r})]:r,style:t==null?void 0:t.style})),this.skipBoundary=!0,this.align=t==null?void 0:t.align,this.boxType=t==null?void 0:t.boxType}static fromJson(t){return new Sp(t)}toJson(){const t={};return this.align&&(t.align=this.align),this.boxType&&(t.boxType=this.boxType),C(C({},super.toJson()),t)}render(t){const r=De.createBox(t,this.body,{classes:"inner"});return r?(this.caret&&(r.caret=this.caret),this.bind(t,new Je([r,new Je(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Ma=class _p extends De{constructor(t){var r,n,a,i;super({type:"overunder",command:t.command,style:t.style,mode:t.mode,body:t.body,skipBoundary:(r=t.skipBoundary)!=null?r:!0}),this.subsupPlacement=t.supsubPlacement,this.svgAbove=t.svgAbove,this.svgBelow=t.svgBelow,this.svgBody=t.svgBody,this.above=t.above,this.below=t.below,this.boxType=(n=t.boxType)!=null?n:"ord",this.paddedBody=(a=t.paddedBody)!=null?a:!1,this.paddedLabels=(i=t.paddedLabels)!=null?i:!1}static fromJson(t){return new _p(t)}toJson(){const t=super.toJson();return this.skipBoundary||(t.skipBoundary=!1),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.svgAbove&&(t.svgAbove=this.svgAbove),this.svgBelow&&(t.svgBelow=this.svgBelow),this.svgBody&&(t.svgBody=this.svgBody),this.boxType!=="ord"&&(t.boxType=this.boxType),this.paddedBody&&(t.paddedBody=!0),this.paddedLabels&&(t.paddedLabels=!0),t}render(t){let r=this.svgBody?Gn(this.svgBody):De.createBox(t,this.body,{type:"ignore"});const n=new yr({parent:t,mathstyle:"scriptstyle"},this.style);let a=null;this.svgAbove?a=Gn(this.svgAbove):this.above&&(a=De.createBox(n,this.above,{type:"ignore"}));let i=null;this.svgBelow?i=Gn(this.svgBelow):this.below&&(i=De.createBox(n,this.below,{type:"ignore"})),this.paddedBody&&(r=new Je([lc(t,"open"),r,lc(t,"close")],{type:"ignore"}));let s=rs(t,{base:r,above:a,below:i,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return s?(this.subsupPlacement==="over-under"?s=this.attachLimits(t,{base:s,type:s.type}):s=this.attachSupsub(t,{base:s}),this.caret&&(s.caret=this.caret),this.bind(t,s)):null}};function rs(e,t){if(!t.base)return null;if(!t.above&&!t.below){const u=new Je(t.base,{type:t.type});return u.setStyle("position","relative"),u}let r=0;t.above&&(r=e.metrics.bigOpSpacing5);let n=null;const a=t.base,i=0,s=["ML__center"];if(t.paddedAboveBelow&&s.push("ML__label_padding"),t.below&&t.above){const u=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+a.depth+i;n=new _a({bottom:u,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:a,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]})}else t.below?n=new _a({top:a.height-i,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:a,classes:["ML__center"]}]}):t.above&&(n=new _a({bottom:a.depth+i,children:[{box:a,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]}));return new Je(n,{type:t.type})}var Ao=class Mp extends De{constructor(t){var r,n,a,i;super(p(C({},t),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(r=t.isInvisible)!=null?r:!1,this.smashDepth=(n=t.smashDepth)!=null?n:!1,this.smashHeight=(a=t.smashHeight)!=null?a:!1,this.smashWidth=(i=t.smashWidth)!=null?i:!1}static fromJson(t){return new Mp(t)}toJson(){const t={};return this.isInvisible&&(t.isInvisible=!0),this.smashDepth&&(t.smashDepth=!0),this.smashHeight&&(t.smashHeight=!0),this.smashWidth&&(t.smashWidth=!0),C(C({},super.toJson()),t)}render(t){const r=new yr({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),De.createBox(r,this.body,{classes:"inner"});const n=De.createBox(this.isInvisible?r:t,this.body);if(!n)return null;if(this.smashWidth){const a=new Je(null,{classes:"fix"});return new Je([n,a],{classes:"rlap"}).wrap(t)}if(!this.smashHeight&&!this.smashDepth)return n;if(this.smashHeight&&(n.height=0),this.smashDepth&&(n.depth=0),n.children)for(const a of n.children)this.smashHeight&&(a.height=0),this.smashDepth&&(a.depth=0);return new _a({firstBaseline:[{box:n}]},{type:n.type}).wrap(t)}},Us=class Cp extends De{constructor(t){var r;super(C({type:"spacing"},t)),this.width=t==null?void 0:t.width,this._braced=(r=t==null?void 0:t.braced)!=null?r:!1}static fromJson(t){return new Cp(t)}toJson(){const t=super.toJson();return this.width!==void 0&&(t.width=this.width),this._braced&&(t.braced=!0),t}render(t){var r;if(this.command==="space")return new Je(this.mode==="math"?null:" ");let n;if(this.width!==void 0)n=new Je(null,{classes:"mspace"}),n.left=t.toEm(this.width);else{const a=(r={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?r:"mediumspace";n=new Je(null,{classes:a})}return n=this.bind(t,n),this.caret&&(n.caret=this.caret),n}_serialize(t){var r;if(!t.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=un(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);const a=(r=this.command)!=null?r:"";return this.width===void 0?a:this._braced&&!("register"in this.width)?`${a}{${go(this.width)}}`:`${a}${go(this.width)}`}},gl=class Ep extends De{constructor(t){var r;super(p(C({},t),{type:"surd",mode:(r=t.mode)!=null?r:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new Ep(p(C({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=this.command,a=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?Er(`${n}[${this.aboveToLatex(t)}]`,a):/^[0-9]$/.test(a)?`${n}${a}`:Er(n,a)}get children(){if(this._children)return this._children;const t=[];if(this.above)for(const r of this.above)t.push(...r.children),t.push(r);if(this.body)for(const r of this.body)t.push(...r.children),t.push(r);return this._children=t,t}render(t){var r;const n=new yr({parent:t,mathstyle:"cramp"},this.style),a=(r=De.createBox(n,this.body,{type:"inner"}))!=null?r:new Je(null),i=n.scalingFactor,s=n.metrics.defaultRuleThickness/i,u=t.isDisplayStyle?Rn:s,d=new Je(null,{classes:"ML__sqrt-line",style:this.style});d.height=s,d.softWidth=a.width;let h=i*(s+u/4);const k=Math.max(i*2*u,a.height+a.depth)+h+s,I=new yr({parent:t},this.style),z=this.bind(I,new Je(bu("inner","\\surd",k,!1,I,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!z)return null;const W=z.height+z.depth-s;W>a.height+a.depth+h&&(h=(h+W-(a.height+a.depth))/2),z.setTop(z.height-a.height-h);const ye=this.bind(t,new _a({firstBaseline:[{box:new Je(a)},h-2*s,{box:d},s]})),lt=De.createBox(new yr({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!lt){const pt=new Je([z,ye],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return pt.setStyle("display","inline-block"),pt.setStyle("height",pt.height+pt.depth,"em"),this.caret&&(pt.caret=this.caret),this.bind(t,pt)}const pe=new _a({shift:-.6*(Math.max(z.height,ye.height)-Math.max(z.depth,ye.depth)),children:[{box:lt}]}),ze=new Je([new Je(pe,{classes:"ML__sqrt-index",type:"ignore"}),z,ye],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return ze.height=z.height,ze.depth=z.depth,this.caret&&(ze.caret=this.caret),this.bind(t,ze)}},nl=class extends Je{constructor(e){super(null,{type:"skip"}),this._width=e}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function al(e,t){if(!e.parent)return;const r=e.parent.children,n=r.indexOf(e);let a=n-1;for(;a>=0&&r[a].type==="ignore";)a-=1;if(a<0&&e.parent.parent&&e.parent.type==="lift"){al(e.parent,t);return}n>0&&r[n-1].type==="skip"?r[n-1].width+=t:r.splice(n,0,new nl(t))}var hs={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},uc={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function Kl(e){Al(e,(t,r)=>{r.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(r.type="ord"),(t==null?void 0:t.type)==="bin"&&/^(rel|close|punct)$/.test(r.type)&&(t.type="ord"),r.type!=="ignore"&&(t=r)})}function Ql(e,t){if(!e.children)return e;const r=e.children;Kl(r);const n=t.getRegisterAsEm("thinmuskip"),a=t.getRegisterAsEm("medmuskip"),i=t.getRegisterAsEm("thickmuskip");return Al(r,(s,u)=>{var d,h,v;if(!s)return;const k=s.type,I=u.isTight?(d=uc[k])!=null?d:null:(h=hs[k])!=null?h:null,z=(v=I==null?void 0:I[u.type])!=null?v:null;z===3&&al(u,n),z===4&&al(u,a),z===5&&al(u,i)}),e}function Al(e,t,r=void 0){if(!e)return r;e=[...e];for(const n of e)n.type==="lift"?r=Al(n.children,t,r):n.type==="ignore"?Al(n.children,t):(t(r,n),Al(n.children,t),r=n);return r}var Hl=class kp extends De{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new De({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new kp(p(C({},t),{tooltip:js(t.tooltip)}))}toJson(){var t;const r=(t=this.tooltip.body)==null?void 0:t.filter(n=>n.type!=="first").map(n=>n.toJson());return p(C({},super.toJson()),{tooltip:r})}render(t){const r=De.createBox(new yr,this.body);if(!r)return null;const n=new yr({parent:t,mathstyle:"displaystyle"},{fontSize:cs}),a=Nl(Ql(new Je(this.tooltip.render(n),{classes:"ML__tooltip-content"}),n)),i=new Je([a,r],{classes:"ML__tooltip-container"});return this.caret&&(i.caret=this.caret),this.bind(t,i)}},Es=class Ap extends De{constructor(t,r){super(p(C({},r),{type:"operator",isFunction:r==null?void 0:r.isFunction})),this.value=t,this.variant=r==null?void 0:r.variant,this.variantStyle=r==null?void 0:r.variantStyle,this.subsupPlacement=r==null?void 0:r.limits}static fromJson(t){return new Ap(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.variantStyle&&(t.variantStyle=this.variantStyle),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var r;const n=new Je(this.value,{type:"op",mode:"math",maxFontSize:t.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:t.letterShapeStyle});let a=n;if(this.superscript||this.subscript){const i=(r=this.subsupPlacement)!=null?r:"auto";a=i==="over-under"||i==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:n}):this.attachSupsub(t,{base:n})}return new Je(this.bind(t,a),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=un(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),Xt(n)}};function js(e){if(T(e))return e.map(n=>js(n));if(typeof e=="string")return De.fromJson(e);e=C({},e);for(const n of El)e[n]&&(e[n]=js(e[n]));e.args&&(e.args=xu(e.args)),e.array&&(e.array=js(e.array));const t=e.type;let r;t==="accent"&&(r=pu.fromJson(e)),t==="array"&&(r=Ba.fromJson(e)),t==="box"&&(r=cc.fromJson(e)),t==="chem"&&(r=Z.fromJson(e)),t==="composition"&&(r=Fd.fromJson(e)),t==="delim"&&(r=he.fromJson(e)),t==="enclose"&&(r=ht.fromJson(e)),t==="error"&&(r=Lc.fromJson(e)),t==="extensible-symbol"&&(r=Hi.fromJson(e)),t==="genfrac"&&(r=Wr.fromJson(e)),t==="group"&&(r=zd.fromJson(e)),t==="latex"&&(r=hr.fromJson(e)),t==="latexgroup"&&(r=yn.fromJson(e)),t==="leftright"&&(r=Ti.fromJson(e)),t==="macro"&&(r=l.fromJson(e)),t==="macro-argument"&&(r=c.fromJson(e)),t==="operator"&&(r=Es.fromJson(e)),t==="overlap"&&(r=xn.fromJson(e)),t==="overunder"&&(r=Ma.fromJson(e)),t==="placeholder"&&(r=Yl.fromJson(e)),t==="prompt"&&(r=f.fromJson(e)),t==="phantom"&&(r=Ao.fromJson(e)),t==="sizeddelim"&&(r=it.fromJson(e)),t==="spacing"&&(r=Us.fromJson(e)),t==="subsup"&&(r=g.fromJson(e)),t==="surd"&&(r=gl.fromJson(e)),t==="text"&&(r=Vc.fromJson(e)),t==="tooltip"&&(r=Hl.fromJson(e)),r||(console.assert(!t||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(t),`MathLive 0.98.5: an unexpected atom type "${t}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),r=De.fromJson(e));for(const n of El)e[n]&&r.setChildren(e[n],n);return e.verbatimLatex!==void 0&&(r.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(r.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(r.explicitSubsupPlacement=!0),e.isFunction&&(r.isFunction=!0),e.isExtensibleSymbol&&(r.isExtensibleSymbol=!0),e.skipBoundary&&(r.skipBoundary=!0),e.captureSelection&&(r.captureSelection=!0),r}function xu(e){if(e&&Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(r=>js(r))}:typeof t=="object"&&"atoms"in t?t.atoms.map(r=>js(r)):t)}var Dl={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},Ic={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},Gc=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,Fc=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,wu=[/^[a-z]$/,/^[A-Z]$/,Gc,Fc],Su={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Kd=class extends ao{constructor(){super("math")}createAtom(e,t,r){var n,a,i,s;if(t===null)return new De({type:"mord",mode:"math",command:e,value:e,style:r});const u=window.MathfieldElement.isFunction((n=t.command)!=null?n:e);if(t.definitionType==="symbol"){const h=new De({type:(a=t.type)!=null?a:"mord",mode:"math",command:(i=t.command)!=null?i:e,value:String.fromCodePoint(t.codepoint),style:r});return u&&(h.isFunction=!0),e.startsWith("\\")&&(h.verbatimLatex=e),h}const d=new De({type:"mord",mode:"math",command:(s=t.command)!=null?s:e,value:e,style:r});return u&&(d.isFunction=!0),e.startsWith("\\")&&(d.verbatimLatex=e),d}serialize(e,t){const r=Yf(e,p(C({},t),{defaultMode:"math"}));return r.length===0||t.defaultMode!=="text"?r:["$ ",...r," $"]}getFont(e,t){console.assert(t.variant!==void 0);let{variant:r}=t,{variantStyle:n}=t;r==="normal"&&!n&&/[\u00A3\u0131\u0237]/.test(e.value)&&(r="main",n="italic"),r==="normal"&&!n&&e.value.length===1&&wu.forEach((u,d)=>{var h;u.test(e.value)&&Su[(h=t.letterShapeStyle)!=null?h:"tex"][d]==="it"&&(n="italic")}),n==="up"&&(n=void 0);const a=n?r+"-"+n:r;console.assert(Dl[a]!==void 0);const[i,s]=Dl[a];return Ic[r]&&!Ic[r].test(e.value)?(e.value=xt(e.value,r,n),null):(Gc.test(e.value)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),i)}};function Yf(e,t){const{parent:r}=e[0],n=qc(r);return wi(e,"variant").map(a=>{const i=qc(a[0]);let s="";i&&i!==n&&(s={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[i],console.assert(s!==void 0));const u=Xt(a.map(d=>d._serialize(t)));return s?Er(s,u):u})}function qc(e){if(!e)return"";const{style:t}=e;if(t.variant===void 0)return"";let r=t.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(t.variant)&&t.variantStyle&&t.variantStyle!=="up"&&(r+="-"+t.variantStyle),r}new Kd;function Qf(e,t){return e.map(r=>r._serialize(t))}function Hd(e,t){return wi(e,"fontShape").map(r=>{const n=Qf(r,t),{fontShape:a}=r[0].style;let i="";return a==="it"&&(i="\\textit"),a==="sl"&&(i="\\textsl"),a==="sc"&&(i="\\textsc"),a==="n"&&(i="\\textup"),!i&&a?`{${Er("\\fontshape",a)}${Xt(n)}}`:i?Er(i,Xt(n)):Xt(n)})}function Xu(e,t){return wi(e,"fontSeries").map(r=>{const n=Hd(r,t),{fontSeries:a}=r[0].style;let i="";return a==="b"&&(i="\\textbf"),a==="l"&&(i="\\textlf"),a==="m"&&(i="\\textmd"),a&&!i?`{${Er("\\fontseries",a)}${Xt(n)}}`:i?Er(i,Xt(n)):Xt(n)})}function _u(e,t){return wi(e,"fontSize").map(r=>{var n,a;const i=Xu(r,t),s=(a=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(n=r[0].style.fontSize)!=null?n:""])!=null?a:"";return s?`${s} ${Xt(i)}`:Xt(i)})}function Wd(e,t,r){return wi(e,"fontFamily").map(n=>{var a,i;const s=_u(n,t),u=(i={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(a=n[0].style.fontFamily)!=null?a:""])!=null?i:"";return u?`\\${u}{${Xt(s)}}`:n[0].style.fontFamily?`{\\fontfamily{${n[0].style.fontFamily}} ${Xt(s)}}`:r?`\\text{${Xt(s)}}`:Xt(s)})}var Mu={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Ju=class extends ao{constructor(){super("text")}createAtom(e,t,r){return t&&t.definitionType==="symbol"?new Vc(e,String.fromCodePoint(t.codepoint),r!=null?r:{}):null}serialize(e,t){return Wd(e,p(C({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var r,n,a,i,s;const{fontFamily:u}=t;if(Mu[u]?e.classes+=" "+Mu[u]:u&&e.setStyle("font-family",u),t.fontShape&&(e.classes+=" ",e.classes+=(r={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])!=null?r:""),t.fontSeries){const d=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);d&&(e.classes+=" ",e.classes+=(a={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(n=d[1])!=null?n:""])!=null?a:"",e.classes+=" ",e.classes+=(s={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(i=d[2])!=null?i:""])!=null?s:"")}return"Main-Regular"}};new Ju;var e0=class extends ao{constructor(){super("latex")}createAtom(e){return new hr(e)}serialize(e,t){return e.filter(r=>r instanceof hr&&!r.isSuggestion).map(r=>r.value)}getFont(){return null}};new e0;var Xc={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},Jc={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},z0={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},K0={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Bp={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},Pp={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},$p={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Rp={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Np={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Op={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Fp={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},zp={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Kp={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function H0(e){const t=e.split("+"),r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(r.shift=!0),t.includes("alt")&&(r.alt=!0),t.includes("ctrl")&&(r.ctrl=!0),t.includes("cmd")&&(r.cmd=!0),t.includes("win")&&(r.win=!0),t.includes("meta")&&(r.meta=!0),r}function Cu(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}var Hp={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Yu=[],Qu;function t0(){switch(H()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Ll(e){(!e.platform||e.platform===t0())&&Yu.push(e)}function Wp(e,t){var r;const n={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return n;for(const[a,i]of Object.entries(t.mapping)){if(i[0]===e)return n.key=`[${a}]`,n;if(i[1]===e)return n.shift=!0,n.key=`[${a}]`,n;if(i[2]===e)return n.alt=!0,n.key=`[${a}]`,n;if(i[3]===e)return n.shift=!0,n.alt=!0,n.key=`[${a}]`,n}return n.key=(r=Hp[e])!=null?r:"",n}function Zp(e){if(e.code)return e;const t=Object.entries(ed().mapping);let r=!1,n=!1,a="";for(let i=0;i<4;i++){for(const[s,u]of t)if(u[i]===e.key){a=s,i===3?(r=!0,n=!0):i===2?r=!0:i===1&&(n=!0);break}if(a)break}return new KeyboardEvent(e.type,p(C({},e),{altKey:r,shiftKey:n,code:a}))}function Vp(e){var t,r;if(!e||e.key==="Unidentified"||e.key==="Dead")return;const n=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(const a of Yu)((t=a.mapping[e.code])==null?void 0:t[n])===e.key?a.score+=1:(r=a.mapping[e.code])!=null&&r[n]&&(a.score=0);Yu.sort((a,i)=>i.score-a.score)}function Up(e){Qu=Yu.find(t=>e.startsWith(t.locale))}function ed(){return Qu!=null?Qu:Yu[0]}function jp(){switch(t0()){case"apple":return Jc;case"windows":return z0;case"linux":return K0}return Jc}switch(t0()){case"apple":Ll(Jc),Ll(Bp),Ll(Fp),Ll(Rp);break;case"windows":Ll(z0),Ll(Pp),Ll(zp),Ll(Np);break;case"linux":Ll(K0),Ll($p),Ll(Kp),Ll(Op);break}Ll(Xc);function r0(e){var t;const r=/macos|ios/.test(H()),n=e.split("+");let a="";for(const i of n)a&&(a+=r?"\u2009":'<span class="ML__shortcut-join">+</span>'),i.startsWith("[Key")?a+=i.slice(4,5):i.startsWith("Key")?a+=i.slice(3,4):i.startsWith("[Digit")?a+=i.slice(6,7):i.startsWith("Digit")?a+=i.slice(5,6):a+=(t={cmd:"\u2318",meta:r?"\u2318":"Ctrl",shift:r?"\u21E7":"Shift",alt:r?"\u2325":"Alt",ctrl:r?"\u2303":"Ctrl","\n":r?"\u23CE":"Return","[return]":r?"\u23CE":"Return","[enter]":r?"\u2324":"Enter","[tab]":r?"\u21E5":"Tab","[escape]":"Esc","[backspace]":r?"\u232B":"Backspace","[delete]":r?"\u2326":"Del","[pageup]":r?"\u21DE":"Page Up","[pagedown]":r?"\u21DF":"Page Down","[home]":r?"\u2912":"Home","[end]":r?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[i.toLowerCase()])!=null?t:i.toUpperCase();return a}function Zd(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if(e instanceof TouchEvent){const t=[...e.touches].reduce((n,a)=>({x:n.x+a.clientX,y:n.y+a.clientY}),{x:0,y:0}),r=e.touches.length;return{x:t.x/r,y:t.y/r}}}function Yc(e){const t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||e instanceof TouchEvent||e instanceof KeyboardEvent)&&(e.altKey&&(t.alt=!0),e.ctrlKey&&(t.control=!0),e.metaKey&&(t.meta=!0),e.shiftKey&&(t.shift=!0)),t}function Gp(e,t){return!e&&t||e&&!t?!1:!e||!t?!0:e.alt===t.alt&&e.control===t.control&&e.shift===t.shift&&e.meta===t.meta}var qp=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Vd(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:qp.has(e.code)}function Ud(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var dc=class $c{static get scrim(){return $c._scrim||($c._scrim=new $c),$c._scrim}static open(t){$c.scrim.open(t)}static close(){$c.scrim.close()}static get state(){return $c.scrim.state}static get element(){return $c.scrim.element}constructor(t){var r,n;this.lightDismiss=(r=t==null?void 0:t.lightDismiss)!=null?r:!0,this.translucent=(n=t==null?void 0:t.translucent)!=null?n:!1,this.state="closed"}get element(){if(this._element)return this._element;const t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var r;if(this.state!=="closed")return;this.state="opening",this.onDismiss=t==null?void 0:t.onDismiss,this.savedActiveElement=Ud();const{element:n}=this;((r=t==null?void 0:t.root)!=null?r:document.body).appendChild(n),n.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const a=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const i=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${i+a}px`,t!=null&&t.child&&n.append(t.child),this.state="open"}close(){var t,r,n,a;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:i}=this;i.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),i.remove(),document.body.style.overflow=(t=this.savedOverflow)!=null?t:"",document.body.style.marginRight=(r=this.savedMarginRight)!=null?r:"",Ud()!==this.savedActiveElement&&((a=(n=this.savedActiveElement)==null?void 0:n.focus)==null||a.call(n)),i.innerHTML="",this.state="closed"}handleEvent(t){this.lightDismiss&&(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};function Xp(e,t,r){let n=null,a=null,i=!1,s=!1,u=!1;const d=new AbortController,h=d.signal;return e.addEventListener("keydown",v=>{if(i||v.key==="Process"||v.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(v.code)){n=null;return}n=v,a=null,r.onKeystroke(v)?e.textContent="":n=null},{capture:!0,signal:h}),e.addEventListener("keypress",v=>{i||(n&&a&&r.onKeystroke(n),a=v)},{capture:!0,signal:h}),e.addEventListener("compositionstart",v=>{e.textContent="",i=!0,r.onCompositionStart(v.data)},{capture:!0,signal:h}),e.addEventListener("compositionupdate",v=>{i&&r.onCompositionUpdate(v.data)},{capture:!0,signal:h}),e.addEventListener("compositionend",v=>{e.textContent="",i&&(i=!1,r.onCompositionEnd(v.data))},{capture:!0,signal:h}),e.addEventListener("beforeinput",v=>v.stopImmediatePropagation(),{signal:h}),e.addEventListener("input",v=>{var k;if(!i&&(e.textContent="",v.inputType!=="insertCompositionText")){if(v.inputType==="insertFromPaste"){v.preventDefault(),v.stopPropagation();return}r.onInput((k=v.data)!=null?k:""),v.preventDefault(),v.stopPropagation()}},{signal:h}),e.addEventListener("paste",v=>{e.focus({preventScroll:!0}),e.textContent="",r.onPaste(v)||v.preventDefault(),v.stopImmediatePropagation()},{signal:h}),e.addEventListener("cut",v=>r.onCut(v),{capture:!0,signal:h}),e.addEventListener("copy",v=>r.onCopy(v),{capture:!0,signal:h}),e.addEventListener("blur",v=>{var k,I;if(((I=(k=v.relatedTarget)==null?void 0:k._mathfield)==null?void 0:I.element)===t){e.focus({preventScroll:!0}),v.preventDefault(),v.stopPropagation();return}const z=dc.state;if(z==="open"||z==="opening"){v.preventDefault(),v.stopPropagation();return}if(v.relatedTarget===v.target.getRootNode().host){v.preventDefault(),v.stopPropagation();return}u||s||(u=!0,n=null,a=null,r.onBlur(),u=!1)},{capture:!0,signal:h}),e.addEventListener("focus",v=>{u||s||(s=!0,r.onFocus(),s=!1)},{capture:!0,signal:h}),{dispose:()=>d.abort(),cancelComposition:()=>{i&&(e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&e.blur()},focus:()=>{!s&&typeof e.focus=="function"&&e.focus({preventScroll:!0})},hasFocus:()=>Ud()===e,setAriaLabel:v=>e.setAttribute("aria-label",v),setValue:v=>{var k;e.textContent=v,e.style.left="-1000px",(k=window.getSelection())==null||k.selectAllChildren(e)},moveTo:(v,k)=>{e.style.top=`${k}px`,e.style.left=`${v}px`}}}function Eu(e){var t;if(!e||!Vd(e))return"";let r;return e.key==="Unidentified"&&e.target&&(r=e.target.value),r=(t=r!=null?r:e.key)!=null?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(r)&&(r=""),r}function W0(e){e=Zp(e);const t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function Jp(e){if(Ze()){const t=H(),r=e.startsWith("!"),n=e.endsWith(t);if(r&&!n||!r&&n)return!0}return e==="!other"?!1:e==="other"}function Yp(e,t,r){if(e.length===0)return"";const n=Cu(H0(W0(r))),a=Cu({key:r.key,shift:r.shiftKey,alt:r.altKey,ctrl:r.ctrlKey,meta:r.metaKey||r.ctrlKey&&/macos|ios/.test(H()),cmd:!1,win:!1});for(let i=e.length-1;i>=0;i--)if((e[i].key===n||e[i].key===a)&&(!e[i].ifMode||e[i].ifMode===t))return e[i].command;return""}function Z0(e){let t=e;return T(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function Qp(e,t){let r=[];if(typeof t=="string"){const i=_d[t];T(i)?r=i.slice():i&&r.push(i)}const n=Z0(t),a=new RegExp("^"+n.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const i of e)a.test(Z0(i.command))&&r.push(i.key);return r.map(r0)}function em(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;const r=H0(e.key);let n=e.ifPlatform;if(r.cmd){if(n&&n!=="macos"&&n!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+n+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);n||(n=H()==="ios"?"ios":"macos"),r.win=!1,r.cmd=!1,r.meta=!0}if(r.win){if(n&&n!=="windows")throw new Error('Unexpected "win" modifier with platform "'+n+`"
|
|
|
"win" modifier can only be used with Windows platform.`);n="windows",r.win=!1,r.cmd=!1,r.meta=!0}if(n&&!Jp(n))return;if(/^\[.+\]$/.test(r.key))return p(C({},e),{key:Cu(r)});const a=Wp(r.key,t);if(!a)return p(C({},e),{key:Cu(r)});if(a.shift&&r.shift||a.alt&&r.alt)throw new Error(`The keybinding ${e.key} (${n0(e.command)}) is conflicting with the key combination ${Cu(a)} using the ${t.displayName} keyboard layout`);return a.shift=a.shift||r.shift,a.alt=a.alt||r.alt,a.meta=r.meta,a.ctrl=r.ctrl,p(C({},e),{key:Cu(a)})}function n0(e){if(Array.isArray(e)){const t=[...e];return t.shift()+"("+t.map(r=>typeof r=="string"?`"${r}"`:r.toString()).join(", ")+")"}return e}function tm(e,t){const r=[],n=[];for(const a of e)try{const i=em(a,t);if(!i)continue;const s=n.find(u=>u.key===i.key&&u.ifMode===i.ifMode);if(s)throw new Error(`Ambiguous key binding ${a.key} (${n0(a.command)}) matches ${s.key} (${n0(s.command)}) with the ${t.displayName} keyboard layout`);n.push(i)}catch(i){i instanceof Error&&r.push(i.message)}return[n,r]}var rm=class extends ii{constructor(){super("latex")}createAtom(e){return new hr(e)}onPaste(e,t){if(!t)return!1;const r=typeof t=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),lo(e)),e.startRecording(),!0):!1}insert(e,t,r){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r||(r={}),r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder");const{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const a=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(fs(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");const i=[];for(const d of t)Ae.test(d)&&i.push(new hr(d));let s=e.at(e.position);if(s instanceof yn&&(s=s.lastChild),!(s.parent instanceof yn)){const d=new yn("");s.parent.addChildAfter(d,s),s=d.firstChild}const u=s.parent.addChildrenAfter(i,s);return e.silenceNotifications=a,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(u)):u&&(e.position=e.offsetOf(u))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};function nm(e){return e.atoms.find(t=>t.type==="latexgroup")}function td(e){var t,r;const n=e.atoms.find(a=>a.type==="latexgroup");return n?(r=(t=n.body)==null?void 0:t.filter(a=>a.type==="latex"))!=null?r:[]:[]}function V0(e,t){var r;let n=0,a=!1;const i=Number.isFinite(t==null?void 0:t.before)?(r=t==null?void 0:t.before)!=null?r:0:e.lastOffset;for(;n<=i&&!a;){const d=e.at(n);a=d instanceof hr&&d.isSuggestion,a||n++}if(!a)return[void 0,void 0];let s=n,u=!1;for(;s<=i&&!u;){const d=e.at(s);u=!(d instanceof hr&&d.isSuggestion),u||s++}return[n-1,s-1]}new rm;function jd(e){const t=td(e.model).filter(r=>r.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(const r of t)r.parent.removeChild(r)}}function rd(e,t){var r;const{model:n}=e;jd(e);for(const v of td(n))v.isError=!1;if(!n.selectionIsCollapsed||e.options.popoverPolicy==="off"){Au(e);return}const a=[];let i=n.at(n.position);for(;i&&i instanceof hr&&/^[a-zA-Z\*]$/.test(i.value);)i=i.leftSibling;if(i&&i instanceof hr&&i.value==="\\")for(a.push(i),i=i.rightSibling;i&&i instanceof hr&&/^[a-zA-Z\*]$/.test(i.value);)a.push(i),i=i.rightSibling;const s=a.map(v=>v.value).join(""),u=we(e,s);if(u.length===0){if(/^\\[a-zA-Z\*]+$/.test(s))for(const v of a)v.isError=!0;Au(e);return}const d=(r=t==null?void 0:t.atIndex)!=null?r:0;e.suggestionIndex=d<0?u.length-1:d%u.length;const h=u[e.suggestionIndex];if(h!==s){const v=a[a.length-1];v.parent.addChildrenAfter([...h.slice(s.length-h.length)].map(k=>new hr(k,{isSuggestion:!0})),v),Qc(e,{interactive:!0})}im(e,u)}function U0(e){const[t,r]=V0(e,{before:e.position});if(t===void 0||r===void 0)return!1;let n=!1;return e.getAtoms([t,r]).forEach(a=>{a.isSuggestion&&(a.isSuggestion=!1,n=!0)}),n}function ku(e,t="accept",r){var n,a;Au(e);const i=nm(e.model);if(!i)return!1;if(t==="accept-suggestion"||t==="accept-all"){const h=td(e.model).filter(v=>v.isSuggestion);if(h.length!==0){for(const v of h)v.isSuggestion=!1;e.model.position=e.model.offsetOf(h[h.length-1])}if(t==="accept-suggestion")return h.length!==0}const u=td(e.model).filter(h=>!h.isSuggestion).map(h=>h.value).join(""),d=i.leftSibling;return i.parent.removeChild(i),e.model.position=e.model.offsetOf(d),e.switchMode((n=r==null?void 0:r.mode)!=null?n:"math"),t==="reject"||(ii.insert(e.model,u,{selectionMode:(a=r==null?void 0:r.selectItem)!=null&&a?"item":"placeholder",format:"latex",mode:"math"}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math")),!0}function Gd(e){var t;let r=document.getElementById(e);return r?r.dataset.refcount=Number(Number.parseInt((t=r.dataset.refcount)!=null?t:"0")+1).toString():(r=document.createElement("div"),r.setAttribute("aria-hidden","true"),r.dataset.refcount="1",r.id=e,document.body.append(r)),r}function a0(e){var t;const r=document.getElementById(e);if(!r)return;const n=Number.parseInt((t=r.getAttribute("data-refcount"))!=null?t:"0");n<=1?r.remove():r.dataset.refcount=Number(n-1).toString()}function am(e,t){const r=new yr({from:e.context}),n=new De({mode:"math",type:"root",body:E(t,{context:r})}),a=Nl(Ql(new Je(n.render(r),{classes:"ML__base"}),r));return ja(a,{classes:"ML__latex"}).toMarkup()}function im(e,t){var r;if(t.length===0){Au(e);return}let n="";for(const[i,s]of t.entries()){const u=s,d=am(e,s),h=Qp(e.keybindings,u).join("<br>");n+=`<li role="button" data-command="${u}" ${i===e.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${u}</span><span class="ML__popover__command">${d}</span>`,h&&(n+=`<span class="ML__popover__keybinding">${h}</span>`),n+="</li>"}const a=om(e,`<ul>${n}</ul>`);i0()&&((r=a.querySelector(".ML__popover__current"))==null||r.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var i;a&&!i0()&&(a.classList.add("is-visible"),qd(e),(i=a.querySelector(".ML__popover__current"))==null||i.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function i0(){const e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function qd(e,t){var r;if(!e.element||e.element.mathfield!==e||!i0())return;if(((r=e.model.at(e.model.position))==null?void 0:r.type)!=="latex"){Au(e);return}if(t!=null&&t.deferred){setTimeout(()=>qd(e),32);return}const n=du(e.field);if(!n)return;const a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerWidth-document.documentElement.clientWidth,u=window.innerHeight-document.documentElement.clientHeight,d=window.mathVirtualKeyboard.boundingRect.height,h=document.getElementById("mathlive-suggestion-popover");n.x+h.offsetWidth/2>i-s?h.style.left=`${i-h.offsetWidth-s}px`:n.x-h.offsetWidth/2<0?h.style.left="0":h.style.left=`${n.x-h.offsetWidth/2}px`;const v=n.y-n.height;a-u-d-n.y<v?(h.classList.add("ML__popover--reverse-direction"),h.classList.remove("top-tip"),h.classList.add("bottom-tip"),h.style.top=`${n.y-n.height-h.offsetHeight-15}px`):(h.classList.remove("ML__popover--reverse-direction"),h.classList.add("top-tip"),h.classList.remove("bottom-tip"),h.style.top=`${n.y+15}px`)}function Au(e){e.suggestionIndex=0;const t=document.getElementById("mathlive-suggestion-popover");t&&(t.classList.remove("is-visible"),t.innerHTML="")}function om(e,t){let r=document.getElementById("mathlive-suggestion-popover");return r||(r=Gd("mathlive-suggestion-popover"),kl("suggestion-popover"),kl("core"),r.addEventListener("pointerdown",n=>n.preventDefault()),r.addEventListener("click",n=>{let a=n.target;for(;a&&!a.dataset.command;)a=a.parentElement;a&&(ku(e,"reject"),ii.insert(e.model,a.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())})),r.innerHTML=window.MathfieldElement.createHTML(t),r}function sm(){document.getElementById("mathlive-suggestion-popover")&&(a0("mathlive-suggestion-popover"),zl("suggestion-popover"),zl("core"))}function lm(){const e=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(e.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let t=e[1],r=t.match(/http.*\.ts[\?:]/);return r&&(t=e[2]),r=t.match(/(https?:.*):[0-9]+:[0-9]+/),r||(r=t.match(/at (.*(\.ts))[\?:]/),r||(r=t.match(/at (.*(\.mjs|\.js))[\?:]/))),r?r[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}var Xd=null,j0,G0,o0=((G0=(j0=globalThis==null?void 0:globalThis.document)==null?void 0:j0.currentScript)==null?void 0:G0.src)||lm();function q0(e){return Zc(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(e))return new URL(e).href;if(Xd===null)try{const t=yield fetch(o0,{method:"HEAD"});t.status===200&&(Xd=t.url)}catch(t){console.error(`Invalid URL "${e}" (relative to "${o0}")`)}return new URL(e,Xd!=null?Xd:o0).href})}function cm(e,t,r={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,r)}var Il="not-loaded";function um(){return Zc(this,null,function*(){return Il="not-loaded",Jd()})}function Jd(){return Zc(this,null,function*(){var e;if(Il!=="not-loaded")return;if(Il="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){Il="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const r=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],n=Array.from(document.fonts).map(s=>s.family);if(r.every(s=>n.includes(s))){Il="ready";return}if(!window.MathfieldElement.fontsDirectory){Il="not-loaded";return}const a=yield q0(window.MathfieldElement.fontsDirectory);if(!a){document.body.classList.add("ML__fonts-did-not-load"),Il="error";return}const i=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(s=>cm(s[0].replace(/-[a-zA-Z]+$/,""),`${a}/${s[0]}`,s[1]));try{(yield Promise.all(i.map(u=>{try{return u.load()}catch(d){}}))).forEach(u=>document.fonts.add(u)),Il="ready";return}catch(s){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${a}"`,{cause:s}),document.body.classList.add("ML__fonts-did-not-load")}Il="error"}})}function dm(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r),t=t|0;return Math.abs(t)}function lo(e,t){e&&(e.dirty||(e.dirty=!0,requestAnimationFrame(()=>{Ac(e)&&e.dirty&&(e.atomBoundsCache=new Map,Qc(e,t),e.atomBoundsCache=void 0)})))}function fm(e,t){var r;t=t!=null?t:{};const n=new yr({from:p(C({},e.context),{atomIdsSettings:{seed:t.forHighlighting?dm(De.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(r=t.forHighlighting)!=null?r:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),a=e.model.root.render(n);return ja(Ql(a,n),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function X0(e,t){const{model:r}=e;r.root.caret=void 0,r.root.isSelected=!1,r.root.containsCaret=!0;for(const a of r.atoms)a.caret=void 0,a.isSelected=!1,a.containsCaret=!1;if(r.selectionIsCollapsed){const a=r.at(r.position);a.caret=e.model.mode;let i=a.parent;for(;i;)i.containsCaret=!0,i=i.parent}else{const a=r.getAtoms(r.selection,{includeChildren:!0});for(const i of a)i.isSelected=!0}return fm(e,t).toMarkup()}function Qc(e,t){if(!Ac(e))return;t!=null||(t={});const r=e.element.querySelector("[part=virtual-keyboard-toggle]");r&&(r.style.display=e.hasEditableContent?"":"none");const n=e.field;if(!n)return;const a=e.isSelectionEditable&&e.hasFocus(),i=n.classList.contains("ML__focused");i&&!a?n.classList.remove("ML__focused"):!i&&a&&n.classList.add("ML__focused");let s=X0(e,t);const u=e.element.querySelector("[part=menu-toggle]");if(u&&(e.model.atoms.length<=1||e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none"?u.style.display="none":u.style.display=""),e.model.atoms.length<=1){const d=e.options.contentPlaceholder;d&&(s+=`<span part=placeholder class="ML__content-placeholder">${ns(d)}</span>`)}n.innerHTML=window.MathfieldElement.createHTML(s),Yd(e,t.interactive),e.dirty=!1}function Yd(e,t){const r=e.field;if(!r)return;for(const u of r.querySelectorAll(".ML__selection, .ML__contains-highlight"))u.remove();!(t!=null&&t)&&Il!=="error"&&Il!=="ready"&&setTimeout(()=>{Il==="ready"?Yd(e):setTimeout(()=>Yd(e),128)},32);const n=e.model,a=r.offsetWidth,i=r.getBoundingClientRect().width;let s=Math.floor(i)/a;if(s=isNaN(s)?1:s,n.selectionIsCollapsed){qd(e,{deferred:!0});let u=n.at(n.position);for(;u&&u.type!=="prompt"&&!(u.containsCaret&&u.displayContainsHighlight);)u=u.parent;if(u!=null&&u.containsCaret&&u.displayContainsHighlight){const d=Cd(e,jc(e,u),s);if(d){d.left/=s,d.right/=s,d.top/=s,d.bottom/=s;const h=document.createElement("div");h.classList.add("ML__contains-highlight"),h.style.position="absolute",h.style.left=`${d.left+1}px`,h.style.top=`${Math.ceil(d.top)}px`,h.style.width=`${Math.ceil(d.right-d.left)}px`,h.style.height=`${Math.ceil(d.bottom-d.top)}px`,r.insertBefore(h,r.childNodes[0])}}return}for(const u of hm(kd(e,{excludeAtomsWithBackground:!0}))){u.left/=s,u.right/=s,u.top/=s,u.bottom/=s;const d=document.createElement("div");d.classList.add("ML__selection"),d.style.position="absolute",d.style.left=`${u.left}px`,d.style.top=`${u.top}px`,d.style.width=`${Math.ceil(u.right-u.left)}px`,d.style.height=`${Math.ceil(u.bottom-u.top-1)}px`,r.insertBefore(d,r.childNodes[0])}}function hm(e){let t=[];for(const r of e){let n=!1;for(const a of t)if(r.left===a.left&&r.right===a.right&&r.top===a.top&&r.bottom===a.bottom){n=!0;break}n||t.push(r)}e=t,t=[];for(const r of e){let n=0;for(const a of e)if(r.left>=a.left&&r.right<=a.right&&r.top>=a.top&&r.bottom<=a.bottom&&(n+=1,n>1))break;n===1&&t.push(r)}return t}var J0=3,fc;function bl(e,t){t=C({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t!=null?t:{}),fc||(fc={});for(const r of Object.keys(e))console.assert(!fc[r],"Selector already defined: ",r),fc[r]=p(C({},t),{fn:e[r]})}function s0(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return s0(e[1]);t=e[0]}else t=e;return t=t.replace(/-\w/g,r=>r[1].toUpperCase()),fc[t]}function Du(e){var t;return(t=s0(e))==null?void 0:t.target}function pm(e,t){var r;if(!t)return!1;let n,a=[],i=!1,s=!1;T(t)?(n=t[0],a=t.slice(1)):n=t,n=n.replace(/-\w/g,h=>h[1].toUpperCase());const u=fc[n],d=u==null?void 0:u.target;if(d==="model"){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(delete|add)/.test(n)&&(n!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(n)),/^complete/.test(n)||jd(e),fc[n].fn(e.model,...a),rd(e),s=!0,i=!0}else if(d==="virtual-keyboard")s=(r=window.mathVirtualKeyboard.executeCommand(t))!=null?r:!1,i=!0;else if(fc[n]){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(undo|redo)/.test(n)&&e.flushInlineShortcutBuffer(),s=fc[n].fn(e,...a),i=!0}else throw new Error(`Unknown command "${n}"`);return d!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||u!=null&&u.changeSelection&&t!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),u!=null&&u.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),s&&lo(e),i}function mm(e,t){var r;if(!e)return!1;e.focus(),Uh.keypressVibration&&Ue()&&navigator.vibrate(J0);const n=s0(t);window.MathfieldElement.playSound((r=n==null?void 0:n.audioFeedback)!=null?r:"keypress");const a=e.executeCommand(t);return e.scrollIntoView(),a}bl({performWithFeedback:(e,t)=>mm(e,t)});function vm(e){return rd(e,{atIndex:e.suggestionIndex+1}),!1}function gm(e){return rd(e,{atIndex:e.suggestionIndex-1}),!1}bl({complete:ku},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),bl({nextSuggestion:vm,previousSuggestion:gm},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Qd="mathlive#virtual-keyboard-message";function l0(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===Qd}var bm=class Dp{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new Dp),this._singleton}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}get normalizedLayouts(){return[]}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set actionKeycap(t){this.sendMessage("update-setting",{actionKeycap:t})}set shiftKeycap(t){this.sendMessage("update-setting",{shiftKeycap:t})}set backspaceKeycap(t){this.sendMessage("update-setting",{backspaceKeycap:t})}set tabKeycap(t){this.sendMessage("update-setting",{tabKeycap:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.sendMessage("show",t)}hide(t){this.sendMessage("hide",t)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}handleEvent(t){if(l0(t)){if(!Uu(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){const{action:r}=t;if(r==="execute-command"){const{command:n}=t;Du(n)==="virtual-keyboard"&&this.executeCommand(n);return}if(r==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(r==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,r={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(C({type:Qd,action:t},r),this.targetOrigin)}},Y0={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
|
|
|
.minimalist-backdrop {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
.minimalist-container {
|
|
|
--keycap-height: 40px;
|
|
|
--keycap-max-width: 53px;
|
|
|
--keycap-small-font-size: 12px;
|
|
|
background: var(--keyboard-background);
|
|
|
padding: 20px;
|
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
|
border: 1px solid var(--keyboard-border);
|
|
|
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
|
|
|
}
|
|
|
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},ef={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},nd;function Q0(e,t){var r,n,a;const i=zc.singleton;if(!i)return;const s=Lu(e),u=(n=(r=i.getKeycap(s==null?void 0:s.id))==null?void 0:r.variants)!=null?n:"";if(typeof u=="string"&&!eh(u)||Array.isArray(u)&&u.length===0){t==null||t();return}const d={};let h="";for(const ye of xm(u)){const lt=rh(ye),pe=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);d[pe]=lt;const[ze,pt]=tf(lt);h+=`<div id=${pe} class="item ${pt}">${ze}</div>`}const v=document.createElement("div");v.setAttribute("aria-hidden","true"),v.className="MLK__variant-panel",v.style.height="auto";const k=Object.keys(d).length;let I=5;k===1?I=1:k===2||k===4?I=2:k===3||k===5||k===6?I=3:k>=7&&k<14&&(I=4),v.style.width=`calc(var(--variant-keycap-length) * ${I} + 12px)`,v.innerHTML=Uh.createHTML(h),dc.open({root:(a=i==null?void 0:i.container)==null?void 0:a.querySelector(".ML__keyboard"),child:v}),nd=new AbortController;const{signal:z}=nd,W=e==null?void 0:e.getBoundingClientRect();if(W){W.top-v.clientHeight<0&&(v.style.width="auto",k<=6?v.style.height="56px":k<=12?v.style.height="108px":k<=18?v.style.height="205px":v.classList.add("compact"));const ye=Math.max(0,Math.min(window.innerWidth-v.offsetWidth,(W.left+W.right-v.offsetWidth)/2)),lt=W.top-v.clientHeight+5;v.style.transform=`translate(${ye}px, ${lt}px)`,v.classList.add("is-visible"),requestAnimationFrame(()=>{v.addEventListener("pointerup",pe=>{const ze=Lu(pe.target);!(ze!=null&&ze.id)||!d[ze.id]||(c0(d[ze.id]),ad(),t==null||t(),pe.preventDefault())},{capture:!0,passive:!1,signal:z}),v.addEventListener("pointerenter",pe=>{const ze=Lu(pe.target);!(ze!=null&&ze.id)||!d[ze.id]||ze.classList.add("is-active")},{capture:!0,signal:z}),v.addEventListener("pointerleave",pe=>{const ze=Lu(pe.target);!(ze!=null&&ze.id)||!d[ze.id]||ze.classList.remove("is-active")},{capture:!0,signal:z}),window.addEventListener("pointercancel",()=>{ad(),t==null||t()},{signal:z}),window.addEventListener("pointerup",()=>{ad(),t==null||t()},{signal:z})})}}function ad(){nd==null||nd.abort(),nd=null,dc.state==="open"&&dc.close()}function ym(e){if(e==="foreground-color"){const t=[];for(const r of Object.keys(Y))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+Y[r]+'"></span>',command:["applyStyle",{color:r}]});return t}if(e==="background-color"){const t=[];for(const r of Object.keys(ue))t.push({class:"swatch-button",label:'<span style="background:'+ue[r]+'"></span>',command:["applyStyle",{backgroundColor:r}]});return t}}function eh(e){return ef[e]!==void 0}function xm(e){var t;return typeof e!="string"?e:(ef[e]||(ef[e]=(t=ym(e))!=null?t:[]),ef[e])}function wm(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r} !important`).join(";")}function Sm(e){return Object.keys(e).map(t=>`${t} {${wm(e[t])}}`).join("")}function id(e){if(!e)return"";const t=new yr,r=new De({mode:"math",type:"root",body:E(e,{context:t,args:a=>a==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),n=Nl(Ql(new Je(r.render(t),{classes:"ML__base"}),t));return ja(n,{classes:"ML__latex"}).toMarkup()}function od(e){var t;if(Array.isArray(e))return e.map(n=>od(n)).flat();const r=typeof e=="string"?{markup:e}:e;return"rows"in r&&Array.isArray(r.rows)&&(r.rows=r.rows.map(n=>n.map(a=>rh(a)))),(t=r.id)!=null||(r.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[r]}function _m(){var e,t;let n=window.mathVirtualKeyboard.alphabeticLayout;if(n==="auto"){const u=ed();u&&(n=u.virtualLayout),(!n||n==="auto")&&(n=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Oe.locale.slice(0,2)])!=null?e:"qwerty")}const a={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},i=(t=a[n])!=null?t:a.qwerty,s=n==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const u of i){const d=[];for(const h of u)/[a-z]/.test(h)?d.push({label:h,class:"hide-shift",shift:{label:h.toUpperCase()},variants:eh(h)?h:void 0}):h==="~"?n!=="dvorak"?d.push("[backspace]"):d.push({label:"[backspace]",width:1}):h==="^"?d.push("[shift]"):h===" "&&d.push("[separator-5]");s.push(d)}return s.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:od({rows:s})}}function th(e){if(e==="alphabetic")return _m();if(typeof e=="string")return console.assert(Y0[e]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${e}"`),th(Y0[e]);let t;if("rows"in e&&Array.isArray(e.rows)){console.assert(!("layers"in e||"markup"in e),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const a=e,{rows:i}=a,s=Ke(a,["rows"]);t=p(C({},s),{layers:od({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){const a=e,{markup:i}=a,s=Ke(a,["markup"]);t=p(C({},s),{layers:od(e.markup)})}else t=C({},e),"layers"in e?t.layers=od(e.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let r=!1,n=!1;for(const a of t.layers)if(a.rows)for(const i of a.rows.flat()){Iu(i)&&(r=!0);const s=i.command;typeof s=="string"&&["undo","redo","cut","copy","paste"].includes(s)&&(n=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=r),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!n),t}function Mm(e,t){var r,n;let a='<div class="left">';if(e.normalizedLayouts.length>1)for(const[i,s]of e.normalizedLayouts.entries()){const u=s,d=[i===t?"selected":"layer-switch"];u.tooltip&&d.push("MLK__tooltip"),u.labelClass&&d.push(...u.labelClass.split(" ")),a+=`<div class="${d.join(" ")}"`,u.tooltip&&(a+=" data-tooltip='"+((r=be(u.tooltip))!=null?r:u.tooltip)+"' "),i!==t&&(a+=`data-layer="${u.layers[0].id}"`),a+=`>${(n=u.label)!=null?n:"untitled"}</div>`}return a+="</div>",a}function Cm(e,t){let r="";if(e.editToolbar==="none")return"";const a=[];t.selectionIsCollapsed?a.push("undo","redo","pasteFromClipboard"):a.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const i={undo:`<div class='action ${t.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${be("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${be("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${be("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${be("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${be("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return r+=a.map(s=>i[s]).join(""),r}function Em(e){for(const t of e)km(t)}function km(e){const t=zc.singleton;if(!t)return;const r={};if(!e.id){if(e.hasAttribute("data-label")&&(r.label=e.dataset.label),e.hasAttribute("data-latex")&&(r.latex=e.dataset.latex),e.hasAttribute("data-key")&&(r.key=e.dataset.key),e.hasAttribute("data-insert")&&(r.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(r.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(r.aside=e.dataset.aside),e.className&&(r.class=e.className),!r.label&&!r.latex&&!r.key&&!r.insert&&(r.latex=e.innerText,r.label=e.innerHTML),e.hasAttribute("data-command"))try{r.command=JSON.parse(e.dataset.command)}catch(n){}e.id=t.registerKeycap(r)}if(!e.innerHTML){const[n,a]=tf(r);e.innerHTML=window.MathfieldElement.createHTML(n)}}function Am(){kl("virtual-keyboard"),kl("core"),Jd()}function Dm(){zl("core"),zl("virtual-keyboard")}var Lm=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
|
|
|
|
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
|
|
|
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-shift" viewBox="0 0 384 512">
|
|
|
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-commit" viewBox="0 0 512 512">
|
|
|
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
|
|
|
</symbol>
|
|
|
|
|
|
|
|
|
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
|
|
|
|
|
|
<symbol id="svg-command" viewBox="0 0 640 512">
|
|
|
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-undo" viewBox="0 0 512 512">
|
|
|
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-redo" viewBox="0 0 512 512">
|
|
|
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
|
|
|
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
|
|
|
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-tab" viewBox="0 0 448 512">
|
|
|
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
|
|
|
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
|
|
|
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-trash" viewBox="0 0 448 512">
|
|
|
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
|
|
|
</svg>`;function Im(e){e.resetKeycapRegistry(),Am();const t=document.createElement("div");t.className="ML__keyboard";const r=document.createElement("div");r.className="MLK__plate",r.innerHTML=window.MathfieldElement.createHTML(Lm+e.normalizedLayouts.map((s,u)=>Tm(e,s,u)).join(""));const n=document.createElement("div");n.className="MLK__backdrop",n.appendChild(r),t.appendChild(n),t.addEventListener("pointerdown",Pm,{passive:!1});const a=t.querySelectorAll(".ML__edit-toolbar");if(a)for(const s of a)s.addEventListener("click",u=>{var d,h;let v=u.target,k="";for(;v&&!k;)k=(d=v==null?void 0:v.getAttribute("data-command"))!=null?d:"",v=(h=v==null?void 0:v.parentElement)!=null?h:null;k&&e.executeCommand(JSON.parse(k))});Em(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const i=t.querySelectorAll(".MLK__layer");console.assert(i.length>0,"No virtual keyboards available");for(const s of i)s.addEventListener("pointerdown",u=>u.preventDefault());return e.currentLayer=e.latentLayer,t}function Tm(e,t,r){const n=[];if(!("layers"in t))return"";for(const a of t.layers)n.push(`<div tabindex="-1" class="MLK__layer" id="${a.id}">`),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(n.push("<div class='MLK__toolbar' role='toolbar'>"),n.push(Mm(e,r)),t.displayEditToolbar&&n.push('<div class="ML__edit-toolbar right"></div>'),n.push("</div>")),n.push(Bm(e,a)),n.push("</div>");return n.join("")}function Bm(e,t){if(typeof t=="string")return t;let r="";if(typeof t.style=="string"?r+=`<style>${t.style}</style>`:typeof t.style=="object"&&(r+=`<style>${Sm(t.style)}</style>`),t.backdrop&&(r+=`<div class='${t.backdrop}'>`),t.container&&(r+=`<div class='${t.container}'>`),t.rows){r+="<div class=MLK__rows>";for(const n of t.rows){r+="<div dir='ltr' class=MLK__row>";for(const a of n)if(a){const i=e.registerKeycap(a),[s,u]=tf(a);/(^|\s)separator/.test(u)?r+=`<div class="${u}"`:r+=`<div tabindex="-1" id="${i}" class="${u}"`,a.tooltip&&(r+=` data-tooltip="${a.tooltip}"`),r+=`>${s}</div>`}r+="</div>"}r+="</div>"}else t.markup&&(r+=t.markup);return t.container&&(r+="</div>"),t.backdrop&&(r+="</div>"),r}function tf(e,t={shifted:!1}){var r,n,a,i,s,u,d;let h="",v=(r=e.class)!=null?r:"";if(t.shifted&&Iu(e)&&(v+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?h=id(e.shift):typeof e.shift=="object"&&(h=e.shift.label?e.shift.label:(n=id(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?n:""),typeof e.shift=="object"&&(v=(i=(a=e.shift.class)!=null?a:e.class)!=null?i:"");else{if(h=e.label?e.label:(s=id(e.latex||e.insert||"")||e.key)!=null?s:"",e.shift){let k;typeof e.shift=="string"?k=id(e.shift):e.shift.label?k=e.shift.label:k=(u=id(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?u:"",h+=`<span class="MLK__shift">${k}</span>`}e.aside&&(h+=`<aside>${e.aside}</aside>`)}return e.layer&&!/layer-switch/.test(v)&&(v+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(v)||(v+=" MLK__keycap"),!/\bw[0-9]+\b/.test(v)&&e.width&&(v+=(d={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?d:""),[h,v||"MLK__keycap"]}var eu={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function rh(e){var t;if(typeof e=="string"){if(e==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(e="[,]"),!eu[e])return{latex:e};e={label:e}}let r;return"label"in e&&e.label&&eu[e.label]&&(r=p(C(C({},eu[e.label]),e),{label:eu[e.label].label})),"key"in e&&e.key&&eu[e.key]&&(r=p(C(C({},eu[e.key]),e),{key:eu[e.key].key})),r?(r.command==="insertDecimalSeparator"&&(r.label=(t=window.MathfieldElement.decimalSeparator)!=null?t:"."),e.label==="[action]"&&(r=C(C({},r),window.mathVirtualKeyboard.actionKeycap)),e.label==="[shift]"&&(r=C(C({},r),window.mathVirtualKeyboard.shiftKeycap)),e.label==="[backspace]"&&(r=C(C({},r),window.mathVirtualKeyboard.backspaceKeycap)),e.label==="[tab]"&&(r=C(C({},r),window.mathVirtualKeyboard.tabKeycap)),r):e}var sd;function Pm(e){var t;if(e.button!==0)return;const r=zc.singleton;if(!r)return;let n=e.target;for(;n&&!n.getAttribute("data-layer");)n=n.parentElement;if(n){r.currentLayer=(t=n.getAttribute("data-layer"))!=null?t:"",e.preventDefault();return}const a=Lu(e.target);if(!(a!=null&&a.id))return;const i=r.getKeycap(a.id);if(!i)return;console.assert(e.type==="pointerdown");const s=new AbortController,u=s.signal;a.classList.add("is-pressed"),a.addEventListener("pointerenter",rf(s),{capture:!0,signal:u}),a.addEventListener("pointerleave",rf(s),{capture:!0,signal:u}),a.addEventListener("pointercancel",rf(s),{signal:u}),a.addEventListener("pointerup",rf(s),{signal:u}),Iu(i)&&(a.classList.add("is-active"),r.shiftPressCount++),i.variants&&(sd&&clearTimeout(sd),sd=setTimeout(()=>{a.classList.contains("is-pressed")&&(a.classList.remove("is-pressed"),a.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),Q0(a,()=>{s.abort(),a==null||a.classList.remove("is-active")}))},300)),e.preventDefault()}function rf(e){return t=>{const r=Lu(t.target);if(!(r!=null&&r.id))return;const n=zc.singleton;if(!n)return;const a=n.getKeycap(r.id);if(a){if(t.type==="pointerenter"&&t.target===r&&t.isPrimary&&r.classList.add("is-pressed"),t.type==="pointercancel"){r.classList.remove("is-pressed"),Iu(a)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===r){r.classList.remove("is-pressed"),Iu(a)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted));return}if(t.type==="pointerup"){sd&&clearTimeout(sd),Iu(a)?r.classList.toggle("is-active",n.isShifted):r.classList.contains("is-pressed")&&(r.classList.remove("is-pressed"),n.isShifted&&a.shift?typeof a.shift=="string"?n.executeCommand(["insert",a.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):c0(a.shift):c0(a),n.shiftPressCount===1&&!t.shiftKey&&(n.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function c0(e){var t;let r=e.command;!r&&e.insert&&(r=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!r&&e.key&&(r=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!r&&e.latex&&(r=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),r||(r=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(t=zc.singleton)==null||t.executeCommand(r)}function $m(e){if(e.nodeType!==1)return!1;const t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function Lu(e){if(!e)return;let t=e;for(;t&&!$m(t);)t=t.parentElement;return t!=null?t:void 0}function Iu(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var zc=class Lp{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var t,r,n;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(r=(t=window.document)==null?void 0:t.body)!=null?r:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(a=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(n=window.top)==null||n.addEventListener("message",this)}catch(a){window.addEventListener("message",this)}document.body.addEventListener("focusin",a=>{const i=a.target;i!=null&&i.isConnected&&setTimeout(()=>{const s=nh();s&&!s.readOnly&&s.mathVirtualKeyboardPolicy==="auto"&&Mt()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",a=>{a.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{nh()||this.hide()},300)})}get currentLayer(){var t,r,n;return(n=(r=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:r.id)!=null?n:""}set currentLayer(t){var r;if(!this._element){this.latentLayer=t;return}let n=t?this._element.querySelector(`#${t}.MLK__layer`):null;n||(n=this._element.querySelector(".MLK__layer")),n&&((r=this._element.querySelector(".MLK__layer.is-visible"))==null||r.classList.remove("is-visible"),n.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var r;this._shiftPressCount=t>2||t<0?0:t,(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){const r="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[r]=t,r}getKeycap(t){return t?this.keycapRegistry[t]:void 0}getLayer(t){const r=this.normalizedLayouts;for(const n of r)for(const a of n.layers)if(a.id===t)return a}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(t){this._actionKeycap=typeof t=="string"?{label:t}:t}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(t){this._shiftKeycap=typeof t=="string"?{label:t}:t}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(t){this._backspaceKeycap=typeof t=="string"?{label:t}:t}get tabKeycap(){return this._tabKeycap}set tabKeycap(t){this._tabKeycap=typeof t=="string"?{label:t}:t}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){const r=Array.isArray(t)?[...t]:[t],n=r.findIndex(a=>a==="default");n>=0&&r.splice(n,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(r),this._normalizedLayouts=r.map(a=>th(a))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new Lp}catch(t){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}get element(){return this._element}set element(t){var r;this._element!==t&&((r=this._element)==null||r.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var t;if(!this._visible)return new DOMRect;const r=(t=this._element)==null?void 0:t.getElementsByClassName("MLK__plate")[0];return r?r.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var t,r;const n=this.boundingRect.height;if(this.container===document.body){(t=this._element)==null||t.style.setProperty("--_keyboard-height",`calc(${n}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const a=n-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${a}px)`:`${a}px`}else(r=this._element)==null||r.style.setProperty("--_keyboard-height",`${n}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const t=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(t&&(t.backdrop||t.container)));const r=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(r)for(const n of r){const a=this.getKeycap(n.id);if(a){const[i,s]=tf(a,{shifted:this.isShifted});n.innerHTML=window.MathfieldElement.createHTML(i),n.className=s}}}show(t){var r;if(this._visible)return;const n=this.container;if(n&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const a=this._element.getElementsByClassName("MLK__plate")[0];if(a&&this.observer.observe(a),n===window.document.body){const i=n.style.paddingBottom;this.originalContainerBottomPadding=i;const s=a.offsetHeight-1;n.style.paddingBottom=i?`calc(${i} + ${s}px)`:`${s}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var a;return(a=this._element)==null?void 0:a.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){var r;const n=this.container;if(n&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const a=this._element.getElementsByClassName("MLK__plate")[0];a&&this.observer.unobserve(a),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),ad(),Dm(),(r=this._element)==null||r.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(n.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,r;return(r=(t=this.element)==null?void 0:t.offsetHeight)!=null?r:0}buildAndAttachElement(){var t;console.assert(!this.element),this.element=Im(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",r=>{r.shiftKey||((r.ctrlKey||r.button===2)&&Q0(r.target),r.preventDefault(),r.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(l0(t)){if(!Uu(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");t.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(console.assert(t.source!==void 0),this.connectedMathfieldWindow=t.source),this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,r){const{action:n}=t;if(n==="execute-command"){const{command:a}=t,i=Du(a);if(window.top!==void 0&&i!=="virtual-keyboard")return;this.executeCommand(a);return}if((n==="connect"||n==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r),n!=="disconnect"&&window===window.top){if(n==="show"){typeof t.animate!="undefined"?this.show({animate:t.animate}):this.show();return}if(n==="hide"){typeof t.animate!="undefined"?this.hide({animate:t.animate}):this.hide();return}if(n==="update-setting"){t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.editToolbar);return}if(n==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r);return}}}sendMessage(t,r,n){if(n||(n=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||n===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:C({type:Qd,action:t},r)}));return}if(n)n.postMessage(C({type:Qd,action:t},r),{targetOrigin:this.targetOrigin});else if(r.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:r.command})),t==="execute-command"&&Array.isArray(r.command)&&r.command[0]==="insert"){const a=r.command[1].split("");for(const i of a)this.dispatchEvent(new KeyboardEvent("keydown",{key:i,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:i,bubbles:!0}))}}stateWillChange(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(t){const r=this._element;if(!r)return;r.classList.toggle("is-math-mode",t.mode==="math"),r.classList.toggle("is-text-mode",t.mode==="text"),r.classList.toggle("can-undo",t.canUndo),r.classList.toggle("can-redo",t.canRedo),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-paste",!0);const n=r.querySelectorAll(".ML__edit-toolbar");if(n)for(const a of n)a.innerHTML=Cm(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(t){let r,n=[],a=Du(t);return T(t)?(r=t[0],r==="performWithFeedback"&&(t=t.slice(1),a=Du(t)),n=t.slice(1)):r=t,r=r.replace(/-\w/g,i=>i[1].toUpperCase()),a==="virtual-keyboard"?fc[r].fn(void 0,...n):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function nh(){var e,t;let r=Ud(),n=null;for(;r;){if("host"in r&&((t=(e=r.host)==null?void 0:e.tagName)==null?void 0:t.toLowerCase())==="math-field"){n=r.host;break}r=r.parentNode}return n}if(Ze()&&!("mathVirtualKeyboard"in window))if(window===window.top){const e=zc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>bm.singleton,configurable:!0});function nf(e){const t={};for(const r of Object.keys(e))switch(r){case"scriptDepth":const n=e.scriptDepth;if(T(n))t.scriptDepth=[n[0],n[1]];else if(typeof n=="number")t.scriptDepth=[n,n];else if(typeof n=="string"){const[i,s]=n.split(",").map(u=>parseInt(u.trim()));t.scriptDepth=[i,s]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let a=e.mathVirtualKeyboardPolicy.toLowerCase();if(a==="sandboxed"){if(window!==window.top){const i=zc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>i})}a="manual"}t.mathVirtualKeyboardPolicy=a;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?Oe.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=gn(e.macros);break;default:T(e[r])?t[r]=[...e[r]]:typeof e[r]=="object"&&!(e[r]instanceof Element)&&r!=="computeEngine"?t[r]=C({},e[r]):t[r]=e[r]}return t}function tu(e,t){let r;typeof t=="string"?r=[t]:t===void 0?r=Object.keys(e):r=t;const n={};for(const a of r)e[a]===null?n[a]=null:T(e[a])?n[a]=[...e[a]]:typeof e[a]=="object"&&!(e[a]instanceof Element)&&a!=="computeEngine"?n[a]=C({},e[a]):n[a]=e[a];return typeof t=="string"?n[t]:n}function af(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:fr,backgroundColorMap:Lt,letterShapeStyle:Oe.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:e=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(e),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:Pf,inlineShortcuts:bd,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:Bf,value:""}}function ah(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function Kc(e,t){!e||!t||(T(e)?e.forEach(r=>Kc(r,t)):typeof e=="object"&&!e.style.color&&!e.style.backgroundColor&&!e.style.fontFamily&&!e.style.fontShape&&!e.style.fontSeries&&!e.style.fontSize&&!e.style.variant&&!e.style.variantStyle&&(e.applyStyle(t),Kc(e.body,t),Kc(e.above,t),Kc(e.below,t),Kc(e.subscript,t),Kc(e.superscript,t)))}function u0(e,t,r,n){function a(s,u){for(const d of i)if(d.style[s]!==u)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;const i=e.getAtoms(t,{includeChildren:!0});n.operation==="toggle"&&(r.color&&a("color",r.color)&&(r.color="none",delete r.verbatimColor),r.backgroundColor&&a("backgroundColor",r.backgroundColor)&&(r.backgroundColor="none",delete r.verbatimBackgroundColor),r.fontFamily&&a("fontFamily",r.fontFamily)&&(r.fontFamily="none"),r.fontSeries&&a("fontSeries",r.fontSeries)&&(r.fontSeries="auto"),r.fontShape&&a("fontShape",r.fontShape)&&(r.fontShape="auto"),r.fontSize&&a("fontSize",r.fontSize)&&(r.fontSize=cs),r.variant&&a("variant",r.variant)&&(r.variant="normal"),r.variantStyle&&a("variantStyle",r.variantStyle)&&(r.variantStyle=""));for(const s of i)s.applyStyle(r);return!0}function Rm(e,t){const r=e.at(e.position);if(r.type==="composition")r.value=t;else{const{caret:n}=r;r.caret=void 0;const a=new Fd(t,{mode:r.mode});a.caret=n,r.parent.addChildAfter(a,r),e.position+=1}}function Nm(e){const t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}nr(["math","displaymath"],Wl),nr("center",Wl),re("displaylines","",{parse:e=>{const t=[];let r=[];e.beginContext({tabular:!0});do{if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([r]),r=[]):r.push(...e.scan(n=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(n)))}while(!0);return e.endContext(),t.push([r]),t},createAtom:e=>new Ba("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),lr("array","{columns:colspec}",(e,t,r,n)=>new Ba(e,d0(t),r,{columns:n[0],mathstyleName:"textstyle"})),lr(["equation","equation*","subequations"],"",(e,t,r)=>new Ba(e,d0(t),r,{columns:[{align:"c"}]})),lr(["multline","multline*"],"",Wl),lr(["align","align*","aligned","eqnarray"],"",Wl),lr("split","",Wl),lr(["gather","gathered"],"",Wl),lr(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Wl),lr(["smallmatrix","smallmatrix*"],"[columns:colspec]",Wl),lr(["cases","dcases","rcases"],"",Wl);function Om(e){for(const t of e)for(const r of t)if(r.length>0)return!1;return!0}function d0(e,t=1){return Om(e)?Array(t).fill([[new De({type:"first"}),new Yl]]):e.map(r=>r.length===0?[[new De({type:"first"})]]:r.map(n=>n.length===0?[new De({type:"first"})]:(n[0].type!=="first"&&n.unshift(new De({type:"first"})),n)))}function Wl(e,t=[[[]]],r=[],n=[]){switch(t=d0(t,["split","align","align*","aligned","eqnarray"].includes(e)?2:1),e){case"math":return new Ba(e,t,r,{mathstyleName:"textstyle"});case"displaymath":return new Ba(e,t,r,{mathstyleName:"textstyle"});case"center":return new Ba(e,t,r,{columns:[{align:"c"}]});case"multline":case"multline*":return new Ba(e,t,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Ba(e,t,r,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Ba(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Ba(e,t,r,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:ru(n[0])});case"bmatrix":case"bmatrix*":return new Ba(e,t,r,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:ru(n[0])});case"Bmatrix":case"Bmatrix*":return new Ba(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:ru(n[0])});case"vmatrix":case"vmatrix*":return new Ba(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:ru(n[0])});case"Vmatrix":case"Vmatrix*":return new Ba(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:ru(n[0])});case"matrix":case"matrix*":return new Ba(e,t,r,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:ru(n==null?void 0:n[0])});case"smallmatrix":case"smallmatrix*":return new Ba(e,t,r,{mathstyleName:"scriptstyle",columns:ru(n==null?void 0:n[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Ba(e,t,r,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new Ba(e,t,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Ba(e,t,r,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let a=0;for(const u of t)a=Math.max(a,u.length);const i=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let s=2;for(;s<a;)i.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),s+=2;return i.push({gap:0}),new Ba(e,t,r,{arraycolsep:0,columns:i,minColumns:2})}}return new Ba(e,t,r,{mathstyleName:"textstyle"})}function ru(e){return e!=null?e:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Fm(e,t){let r=e.at(e.position);for(;r&&!(r.parent instanceof Ba);)r=r.parent;if(r&&r.type==="array"&&r.environmentName,!r||!(r.parent instanceof Ba)){const n=e.at(e.position);if(r=n,!r.parent.parent){let a=e.extractAtoms([e.position,e.lastOffset]),i=e.extractAtoms([0,e.position]);i.length===0&&(i=lf()),a.length===0&&(a=lf());let s;return t.endsWith("column")?(s=Wl("split",[[i,a]]),e.root=s,nu(s,0,0)?au(e,s,0,0):nu(s,0,1)?au(e,s,0,1):e.position=e.offsetOf(n)):(s=Wl("lines",[[i],[a]]),e.root=s,nu(s,0,0)?au(e,s,0,0):nu(s,1,0)?au(e,s,1,0):e.position=e.offsetOf(n)),[void 0,[0,0]]}if(r.parent instanceof Ti){const a=r.parent;let i=e.extractAtoms([e.position,e.offsetOf(a.lastChild)]),s=e.extractAtoms([e.offsetOf(a.firstChild),e.position]);s.length===0&&(s=lf()),i.length===0&&(i=lf());let u="pmatrix";const d=a.leftDelim,h=a.rightDelim;d==="("&&(h===")"||h==="?")?u="pmatrix":(d==="["||d==="\\lbrack")&&(h==="]"||h==="\\rbrack"||h==="?")?u="bmatrix":d==="\\vert"&&h==="\\vert"?u="vmatrix":d==="\\Vert"&&h==="\\Vert"?u="Vmatrix":(d==="{"||d==="\\lbrace")&&(h==="."||h==="?")&&(u="cases");const v=Wl(u,t.endsWith("column")?[[s,i]]:[[s],[i]]);return a.parent.addChildBefore(v,a),a.parent.removeChild(a),nu(v,0,0)?au(e,v,0,0):t.endsWith("column")?nu(v,0,1)?au(e,v,0,1):e.position=e.offsetOf(r):nu(v,1,0)?au(e,v,1,0):e.position=e.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof Ba?[r.parent,r.parentBranch]:[void 0,[0,0]]}function nu(e,t,r){const n=e.getCell(t,r);return!n||n.length!==2?!1:n[1].type==="placeholder"}function zm(e,t,r,n){const a=t.getCell(r,n);return a?[e.offsetOf(a[0]),e.offsetOf(a[a.length-1])]:-1}function au(e,t,r,n){const a=zm(e,t,r,n);typeof a!="number"&&e.setSelection(a)}function of(e,t,r,n,a){const i=t.getCell(r,n);i&&e.setPositionHandlingPlaceholder(e.offsetOf(i[a==="start"?0:i.length-1]))}function sf(e,t){const[r,[n,a]]=Fm(e,t);if(r)switch(t){case"after row":r.addRowAfter(n),of(e,r,n+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnAfter(a),of(e,r,n,a+1,"end");break;case"before row":r.addRowBefore(n),of(e,r,n,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnBefore(a),of(e,r,n,a,"start");break}}function ih(e){return e.contentWillChange({inputType:"insertText"})?(sf(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Km(e){return e.contentWillChange({inputType:"insertText"})?(sf(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function oh(e){return e.contentWillChange({inputType:"insertText"})?(sf(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Hm(e){return e.contentWillChange({inputType:"insertText"})?(sf(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function sh(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();let r=".",n=".";switch(t){case"pmatrix":case"pmatrix*":r="(",n=")";break;case"bmatrix":case"bmatrix*":r="[",n="]";break;case"Bmatrix":case"Bmatrix*":r="\\lbrace",n="\\rbrace";break;case"vmatrix":case"vmatrix*":r="\\vert",n="\\vert";break;case"Vmatrix":case"Vmatrix*":r="\\Vert",n="\\Vert";break;case"matrix":case"matrix*":r=".",n=".";break;case"cases":case"dcases":r="\\lbrace";break;case"rcases":n="\\rbrace";break}const a=e.at(e.position),i=a.type==="array"?a:e.parentEnvironment;return i.environmentName=t,i.leftDelim=r,i.rightDelim=n,e.contentDidChange({}),!0}function lh(e,t){let r=e.at(e.position);for(;r&&!(Array.isArray(r.parentBranch)&&r.parent instanceof Ba);)r=r.parent;if(Array.isArray(r==null?void 0:r.parentBranch)&&(r==null?void 0:r.parent)instanceof Ba){const n=r.parent,a=r.parentBranch;let i;switch(t){case"row":if(n.rowCount>1){n.removeRow(a[0]);const s=n.getCell(Math.max(0,a[0]-1),a[1]);i=e.offsetOf(s[s.length-1])}break;case"column":if(n.colCount>n.minColumns){n.removeColumn(a[1]);const s=n.getCell(a[0],Math.max(0,a[1]-1));i=e.offsetOf(s[s.length-1])}break}i&&e.setPositionHandlingPlaceholder(i)}}function Wm(e){return e.contentWillChange({inputType:"deleteContent"})?(lh(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function Zm(e){return e.contentWillChange({inputType:"deleteContent"})?(lh(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}bl({addRowAfter:ih,addColumnAfter:oh,addRowBefore:Km,addColumnBefore:Hm,removeRow:Wm,removeColumn:Zm,setEnvironment:sh},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function lf(){return[new Yl]}var ch=class Ip{constructor(t){this.recording=!1,this.model=t,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(t){t&&this.index>=0&&(this.stack[this.index].selection=t),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(t){return this.recording?(t&&t===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>Ip.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t!=null?t:"",!0):!1}};ch.maximumDepth=1e3;var Vm=ch;function f0(e,t,r){if(e.at(t).mode!=="text")return t;const n=r==="backward"?-1:1;let a;if(te.test(e.at(t).value)){let i=t,s;do s=e.at(i).mode==="text"&&te.test(e.at(i).value),i+=n;while(e.at(i)&&s);a=e.at(i)?i-2*n:i-n}else if(/\s/.test(e.at(t).value)){let i=t;for(;e.at(i)&&e.at(i).mode==="text"&&/\s/.test(e.at(i).value);)i+=n;if(!e.at(i))a=i-n;else{let s=!0;do s=e.at(i).mode==="text"&&!/\s/.test(e.at(i).value),i+=n;while(e.at(i)&&s);a=e.at(i)?i-2*n:i-n}}else{let i=t;for(;e.at(i)&&e.at(i).mode==="text"&&!/\s/.test(e.at(i).value);)i+=n;a=e.at(i)?i:i-n;let s=!0;for(;e.at(i)&&s;)s=e.at(i).mode==="text"&&/\s/.test(e.at(i).value),s&&(a=i),i+=n;a=e.at(i)?i-2*n:i-n}return a-(n>0?0:1)}function Tu(e,t,r){var n,a,i,s,u,d,h;const v=e.position;(n=r==null?void 0:r.extend)!=null&&n||e.collapseSelection(t);let k=e.at(e.position);if(t==="forward"&&(k.type==="subsup"?(k=k.rightSibling,k||(k=e.at(e.position+1))):k=e.at(e.position+1)),!k)return e.announce("plonk"),!1;let I=e.offsetOf(k);if(k instanceof Vc)I=f0(e,I,t);else if(k instanceof hr)if(k.isSuggestion)for(console.assert(t==="forward");k&&k instanceof hr;)k.isSuggestion=!1,I=e.offsetOf(k),k=k.rightSibling;else if(t==="forward"){if(k=k.rightSibling,!k||!(k instanceof hr))return e.announce("plonk"),!1;for(;k&&k instanceof hr&&/[a-zA-Z\*]/.test(k.value);)I=e.offsetOf(k),k=k.rightSibling}else{if(k=k.leftSibling,!k||!(k instanceof hr))return e.announce("plonk"),!1;for(;k&&k instanceof hr&&/[a-zA-Z\*]/.test(k.value);)I=e.offsetOf(k),k=k.leftSibling}else if(t==="forward"&&k.type==="mopen"){let z=0;do k.type==="mopen"?z+=1:k.type==="mclose"&&(z-=1),k=k.rightSibling;while(!k.isLastSibling&&z!==0);I=e.offsetOf(k.leftSibling)}else if(t==="backward"&&k.type==="mclose"){let z=0;do k.type==="mopen"?z+=1:k.type==="mclose"&&(z-=1),k=k.leftSibling;while(!k.isFirstSibling&&z!==0);I=e.offsetOf(k)}else if(t==="backward")if(k.type==="first")for(;I>0&&k.type==="first";)I-=1,k=e.at(I);else{const z=k.type;k.type==="subsup"&&(I=e.offsetOf(e.at(I).leftSibling)),I-=1;let W=(a=e.at(I))==null?void 0:a.type;for(;I>=0&&W===z;)((i=e.at(I))==null?void 0:i.type)==="subsup"?I=e.offsetOf(e.at(I).leftSibling):I-=1,W=e.at(I).type}else{const{type:z}=k;let W=(s=e.at(I))==null?void 0:s.type;const{lastOffset:ye}=e;for(;I<=ye&&(W===z||W==="subsup");){for(;((u=e.at(I).rightSibling)==null?void 0:u.type)==="subsup";)I=e.offsetOf(e.at(I).rightSibling);I+=1,W=(d=e.at(I))==null?void 0:d.type}I-=1}if((h=r==null?void 0:r.extend)!=null&&h){if(!e.setSelection(e.anchor,I))return e.announce("plonk"),!1}else{if(I===e.position)return e.announce("plonk"),!1;e.position=I}return e.announce("move",v),e.mathfield.stopCoalescingUndo(),!0}function hc(e,t,r){var n,a;if(r=r!=null?r:{extend:!1},e.mathfield.adoptStyle=t==="backward"?"right":"left",t!=="forward"){const[u,d]=V0(e);u!==void 0&&d!==void 0&&e.deleteAtoms([u,d])}if(t==="upward")return jm(e,r);if(t==="downward")return Gm(e,r);if(r.extend){let u=cf(e,e.position,t);u<0&&(u=0),u>e.lastOffset&&(u=e.lastOffset);const d=e.setSelection(e.anchor,u);return e.mathfield.stopCoalescingUndo(),d}if(e.selectionIsPlaceholder){e.collapseSelection(t);const u=hc(e,t);return e.mathfield.stopCoalescingUndo(),u}let i=e.position;const s=i;if(e.collapseSelection(t)?(i=e.position,uh(e,i)||(i=cf(e,i,t))):i=cf(e,i,t),i<0||i>e.lastOffset){let u=!0;return e.silenceNotifications||(u=(a=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0),u&&e.announce("plonk"),u}return e.setPositionHandlingPlaceholder(i),e.mathfield.stopCoalescingUndo(),e.announce("move",s),!0}function cf(e,t,r){return t=t+(r==="forward"?1:-1),t<0||t>e.lastOffset||uh(e,t)?t:cf(e,t,r)}function uh(e,t){var r;const n=e.at(t);let a=n.parent;for(;a&&!a.inCaptureSelection;)a=a.parent;return!(a!=null&&a.inCaptureSelection||(r=n.parent)!=null&&r.skipBoundary&&(!n.isFirstSibling&&n.isLastSibling||n.type==="first")||e.mathfield.hasEditablePrompts&&!n.parentPrompt)}function Um(e,t,r){let n=1/0,a=0;for(;a<t.length;a++){const i=Ad(e.getHTMLElement(t[a])).right,s=Math.abs(r-i);if(s<=n)n=s;else break}return t[a-1]}function uf(e,t,r,n,a){const i=e.mathfield.hasEditablePrompts,s=i?r.filter(h=>h.type==="prompt"&&!h.captureSelection):r,u=Ad(e.mathfield.getHTMLElement(t)).right,d=e.offsetOf(Um(e.mathfield,s,u))-(i?1:0);if(n){const[h,v]=e.selection.ranges[0];let k;d<(a==="up"?h:v)?k={ranges:[[d,v]],direction:"backward"}:k={ranges:[[h,d]],direction:"forward"},e.setSelection(k)}else e.setPositionHandlingPlaceholder(d);e.announce(`move ${a}`)}function jm(e,t){var r,n;const a=(r=t==null?void 0:t.extend)!=null?r:!1;a||e.collapseSelection("backward");const i=()=>{var d,h;let v=!0;return e.silenceNotifications||(v=(h=(d=e.mathfield.host)==null?void 0:d.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?h:!0),e.announce(v?"plonk":"line"),v},s=e.at(e.position);let u=s;for(;u&&u.parentBranch!=="below"&&!(Array.isArray(u.parentBranch)&&u.parent instanceof Ba);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof Ba){const d=u.parent;if(u.parentBranch[0]<1)return i();const h=u.parentBranch[0]-1,v=d.array[h][u.parentBranch[1]];if(!v.some(I=>I.type==="prompt"&&!I.captureSelection)&&e.mathfield.hasEditablePrompts)return i();uf(e,s,v,a,"up")}else if(u){const d=(n=u.parent.branch("above"))!=null?n:u.parent.createBranch("above");if(!d.some(v=>v.type==="prompt"&&v.placeholderId)&&e.mathfield.hasEditablePrompts)return i();uf(e,s,d,a,"up")}else return i();return e.mathfield.stopCoalescingUndo(),!0}function Gm(e,t){var r,n;const a=(r=t==null?void 0:t.extend)!=null?r:!1;a||e.collapseSelection("forward");const i=()=>{var d,h;let v=!0;return e.silenceNotifications||(v=(h=(d=e.mathfield.host)==null?void 0:d.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?h:!0),e.announce(v?"plonk":"line"),v},s=e.at(e.position);let u=s;for(;u&&u.parentBranch!=="above"&&!(Array.isArray(u.parentBranch)&&u.parent instanceof Ba);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof Ba){const d=u.parent;if(u.parentBranch[0]+1>d.array.length-1)return i();const h=u.parentBranch[0]+1,v=d.array[h][u.parentBranch[1]];if(!v.some(I=>I.type==="prompt"&&!I.captureSelection)&&e.mathfield.hasEditablePrompts)return i();uf(e,s,v,a,"down")}else if(u){const d=(n=u.parent.branch("below"))!=null?n:u.parent.createBranch("below");if(!d.some(v=>v.type==="prompt")&&e.mathfield.hasEditablePrompts)return i();uf(e,s,d,a,"down")}else return i();return!0}function dh(e){const t=e.position,r=e.at(t).parent;return r!=null&&r.parent?(e.position=e.offsetOf(r),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function qm(e){let t=0,r=e.at(e.position),n=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!1):n=!0,r=r.parent;return n?t:0}function Xm(e){let t=0,r=e.at(e.position),n=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!0):n=!1,r=r.parent;return n?t:0}function fh(e){var t;if(e.collapseSelection(),qm(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let r=e.at(e.position);return r.subsupPlacement===void 0&&(((t=r.rightSibling)==null?void 0:t.type)!=="subsup"&&r.parent.addChildAfter(new g({style:r.computedStyle}),r),r=r.rightSibling),r.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(r.superscript[0]))),!0}function hh(e){var t;if(e.collapseSelection(),Xm(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let r=e.at(e.position);return r.subsupPlacement===void 0&&(((t=e.at(e.position+1))==null?void 0:t.type)!=="subsup"&&r.parent.addChildAfter(new g({style:e.at(e.position).computedStyle}),r),r=e.at(e.position+1)),r.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(r.subscript[0]))),!0}function Jm(){function e(d){const h=[],v=[];return[...d.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(t).forEach((I,z)=>{const W=n(I);W===0?h.push(I):v.push({documentOrder:z,tabIndex:W,node:I})}),v.sort((I,z)=>I.tabIndex===z.tabIndex?I.documentOrder-z.documentOrder:I.tabIndex-z.tabIndex).map(I=>I.node).concat(h)}function t(d){return!(!r(d)||a(d)||n(d)<0)}function r(d){return!(d.disabled||d.type==="hidden"&&d.tagName.toUpperCase()==="INPUT"||u(d))}function n(d){var h;const v=Number.parseInt((h=d.getAttribute("tabindex"))!=null?h:"NaN",10);return Number.isNaN(v)?d.contentEditable==="true"||(d.nodeName==="AUDIO"||d.nodeName==="VIDEO")&&d.getAttribute("tabindex")===null?0:d.tabIndex:v}function a(d){return d.tagName.toUpperCase()==="INPUT"&&d.type==="radio"&&!s(d)}function i(d,h){for(const v of d)if(v.checked&&v.form===h)return v;return null}function s(d){var h;if(!d.name)return!0;const k=((h=d.form)!=null?h:d.ownerDocument).querySelectorAll('input[type="radio"][name="'+d.name+'"]'),I=i(k,d.form);return!I||I===d}function u(d){if(!Ze()||d===document.activeElement||d.contains(document.activeElement))return!1;if(getComputedStyle(d).visibility==="hidden")return!0;const h=d.getBoundingClientRect();if(h.width===0||h.height===0)return!0;for(;d;){if(getComputedStyle(d).display==="none")return!0;d=d.parentElement}return!1}return Ze()?e(document.body):[]}function Gs(e,t,r="forward"){const n=e.position;if(Array.isArray(t)){const a=e.offsetOf(t[0]),i=e.offsetOf(t[t.length-1]);return r==="forward"?e.setSelection(a,i):e.setSelection(i,a),e.announce("move",n),e.mathfield.stopCoalescingUndo(),!0}return r==="forward"?Gs(e,[t.leftSibling,t]):Gs(e,[t,t.leftSibling])}function ec(e,t){const r=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{const n=e.offsetOf(t);t.type==="placeholder"?e.setSelection(n-1,n):e.position=n}return e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0}function df(e,t,r=!0){var n,a;const i=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&hc(e,t);let s;const u=e.at(e.anchor).parentPrompt;u?t==="forward"?s=e.offsetOf(u)+1:s=e.offsetOf(u.leftSibling):s=Math.max(e.position+i,0);const d=h0(e,s,t);if(!d||t==="forward"&&e.offsetOf(d)<s||t==="backward"&&e.offsetOf(d)>s){if(!r||!((a=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||a))return e.announce("plonk"),!1;const v=Jm();if(!document.activeElement||v.length<=1)return e.announce("plonk"),!1;let k=v.indexOf(document.activeElement)+i;return k<0&&(k=v.length-1),k>=v.length&&(k=0),v[k].focus(),e.mathfield.stopCoalescingUndo(),!0}return ec(e,d),!0}function h0(e,t=0,r="forward"){return e.findAtom(n=>n.type==="placeholder"||n.type==="prompt"||!e.mathfield.readOnly&&n.treeDepth>2&&n.isFirstSibling&&n.isLastSibling,t,r)}bl({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},r=e.at(e.position),{parent:n}=r;if(!n)return e.announce("plonk"),!1;const a=r.parentBranch;let i;if(typeof a=="string"&&(i=t[a]),!i){const u=r.subsupPlacement?hh(e):fh(e);return e.mathfield.stopCoalescingUndo(),u}n.branch(i)||n.createBranch(i);const s=e.setSelection(e.getBranchRange(e.offsetOf(n),i));return e.mathfield.stopCoalescingUndo(),s},moveBeforeParent:e=>{const{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>dh(e),moveToNextChar:e=>hc(e,"forward"),moveToPreviousChar:e=>hc(e,"backward"),moveUp:e=>hc(e,"upward"),moveDown:e=>hc(e,"downward"),moveToNextWord:e=>Tu(e,"forward"),moveToPreviousWord:e=>Tu(e,"backward"),moveToGroupStart:e=>{const t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{const t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var t,r,n,a;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return df(e,"forward");const i=e.at(e.position);if(i.mode==="text"){if(e.selectionIsCollapsed){let I=i;for(;I&&I.mode==="text";)I=I.leftSibling;let z=i;for(;((t=z.rightSibling)==null?void 0:t.mode)==="text";)z=z.rightSibling;if(I&&z)return Gs(e,[I,z])}if(i.rightSibling.mode==="text"){let I=i;for(;I&&I.mode==="text";)I=I.rightSibling;return I?(ec(e,(r=I.leftSibling)!=null?r:I),e.mathfield.switchMode("math"),!0):ec(e,e.lastOffset)}}const u=e.at(e.anchor).parentPrompt,d=u?e.offsetOf(u)+1:Math.max(e.position+1,0),h=h0(e,d,"forward");if(h)return ec(e,h);const v=ph(e,i,I=>I.type==="leftright"||I.type==="text","forward");if(v){if(v.mode==="text"){let I=v;for(;I&&I.mode==="text";)I=I.rightSibling;return Gs(e,[(n=v.leftSibling)!=null?n:v,(a=I.leftSibling)!=null?a:I])}return Gs(e,v)}const k=i.parent;if(k){if(k.type==="leftright"||k.type==="surd")return Gs(e,k);if(i.parentBranch==="superscript"&&k.subscript)return Gs(e,k.subscript);if(i.parentBranch==="above"&&k.below)return Gs(e,k.below);if(i.parentBranch==="superscript"||i.parentBranch==="subscript")return ec(e,k);if(i.parentBranch==="above"||i.parentBranch==="below")return Gs(e,k)}return ec(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return df(e,"backward");let r=e.at(e.position);const n=r.mode;if(n==="text"){if(e.selectionIsCollapsed){let u=r;for(;u&&u.mode==="text";)u=u.leftSibling;let d=r;for(;((t=d.rightSibling)==null?void 0:t.mode)==="text";)d=d.rightSibling;if(u&&d)return Gs(e,[u,d])}for(;r&&r.mode==="text";)r=r.leftSibling;return r?ec(e,r):ec(e,0)}const a=e.at(e.anchor).parentPrompt,i=a?e.offsetOf(a.leftSibling):Math.max(e.position-1,0),s=h0(e,i,"backward");if(s)return ec(e,s);if(n==="math"){const u=ph(e,r,h=>h.type==="leftright"||h.type==="text","backward");if(u){if(u.mode==="text"){let h=u;for(;h&&h.mode==="text";)h=h.leftSibling;return Gs(e,[u,h])}return Gs(e,u)}const d=r.parent;if(d){if(d.type==="leftright"||d.type==="surd")return Gs(e,d);if(r.parentBranch==="subscript"&&d.superscript)return Gs(e,d.superscript);if(r.parentBranch==="below"&&d.above)return Gs(e,d.above);if(r.parentBranch==="superscript"||r.parentBranch==="subscript")return ec(e,d);if(r.parentBranch==="above"||r.parentBranch==="below")return Gs(e,d)}return ec(e,0)}return!1},moveToMathfieldStart:e=>e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:fh,moveToSubscript:hh},{target:"model",changeSelection:!0}),bl({moveToNextPlaceholder:e=>df(e,"forward"),moveToPreviousPlaceholder:e=>df(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function ph(e,t,r,n){if(n==="forward"){let i=t.rightSibling;for(;i&&!r(i);)i=i.rightSibling;return i}let a=t.leftSibling;for(;a&&!r(a);)a=a.leftSibling;return a}function ff(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,a=!1,i="";for(;!a;){const s=e.at(n);a=t===0||s===void 0||s.type==="first"||s.mode!=="math"||!(s.type&&/mord|mpunct|operator/.test(s.type)||s.type==="mop"&&/[a-zA-Z ]+/.test(s.value))||!s.hasEmptyBranch("superscript")||!s.hasEmptyBranch("subscript")||typeof r=="function"&&!r(s),a||(s.mode="text",s.command=s.value,s.verbatimLatex=void 0,i+=s.value),n-=1,t-=1}e.contentDidChange({data:i,inputType:"insertText"})}function iu(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,a=!1;const i=[];for(;!a;){const s=e.at(n);a=t===0||!s||s.type==="first"||s.isFirstSibling||s.mode!=="text"||s.value===" "||typeof r=="function"&&!r(s),a||(i.push(De.serialize([s],{defaultMode:"math"})),s.mode="math"),n-=1,t-=1}p0(e),e.contentDidChange({data:Xt(i),inputType:"insertText"})}function p0(e){var t;let r=e.position-1;for(;r>=0&&((t=e.at(r))==null?void 0:t.mode)==="math";)r-=1;if(!(r<0)&&e.at(r).mode==="text"&&e.at(r).value===" "&&e.at(r-1).mode==="math"){e.at(r-1).parent.removeChild(e.at(r-1));const n=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=n,e.contentDidChange({inputType:"deleteContent"})}}function Ym(e){let t="",r=e.position,n=!1;for(;!n;){const a=e.at(r);n=!(a&&(a.mode==="text"||a.mode==="math"&&a.type&&/mord|mpunct/.test(a.type))),n||(t=a.value+t),r-=1}return t}function Qm(e,t,r){const{model:n}=e;if(n.mode==="latex"||!n.at(n.position).isLastSibling||!r||!Vd(r))return!1;const a=Eu(r);if(!n.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(a));const i=Ym(n)+a;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(a))return!0;if(/[\^_]/.test(a))return/(^|\s)[a-zA-Z][^_]$/.test(i)&&iu(n,1),!0;const s={")":"(","}":"{","]":"["}[a],{parent:u}=n.at(n.position);if(s&&u instanceof Ti&&u.leftDelim===s)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(i))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(a))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(i))return iu(n,1),!1;if(/\D\.[^\d\s]$/.test(i)){iu(n,1);const d=n.at(n.position);return d.value="\u22C5",d.style.variant="normal",d.command="\\cdot",d.verbatimLatex=void 0,n.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(i)||/\.\d$/.test(i)||/\([\d+\-.]$/.test(i))return iu(n,1),!0;if(/\([a-z][,;]$/.test(i))return iu(n,2),!0;if(/[\d+\-=><*|]$/.test(a))return p0(n),!0}else{if(t==="[Space]")return ff(n,void 0,s=>/[a-z][:,;.]$/.test(s.value)),!0;if(/[a-zA-Z]{3,}$/.test(i)&&!/(dxd|abc|xyz|uvw)$/.test(i))return ff(n,void 0,s=>/[a-zA-Z]/.test(s.value)),!0;if(/(^|\W)(if)$/i.test(i))return ff(n,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(i)&&!/(αβγ)$/.test(i))return ff(n,void 0,s=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(s.value)),!0;if(a==="?"||a==="."&&!/[\d-+]\.$/.test(i))return!0}return!1}function ev(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;const r=mh(),n=e.element.getBoundingClientRect();r.style.left=`${n.left}px`,r.style.top=`${n.top-64}px`,r.innerHTML=window.MathfieldElement.createHTML("<span>"+(r0(t)||t)+"</span>"+r.innerHTML),r.style.visibility="visible",setTimeout(()=>{r.childNodes.length>0&&r.childNodes[r.childNodes.length-1].remove(),r.childNodes.length===0&&(r.style.visibility="hidden")},3e3)}function tv(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){const t=mh();t.innerHTML=""}else{const t=Gd("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function mh(){const e=document.getElementById("mathlive-keystroke-caption-panel");return e||(kl("keystroke-caption"),kl("core"),Gd("mathlive-keystroke-caption-panel"))}function rv(){document.getElementById("mathlive-keystroke-caption-panel")&&(a0("mathlive-keystroke-caption-panel"),zl("core"),zl("keystroke-caption"))}function vh(e,t){var r,n,a;const{model:i}=e,s=W0(t);if(t.isTrusted){Vp(t);const z=ed();e.keyboardLayout!==z.id&&(e.keyboardLayout=z.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,ev(e,s),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let u,d="",h;const v=e.inlineShortcutBuffer;if(e.isSelectionEditable){if(i.mode==="math")if(s==="[Backspace]")v.pop();else if(!Vd(t))e.flushInlineShortcutBuffer();else{const z=Eu(t),W=[...(n=(r=v[v.length-1])==null?void 0:r.keystrokes)!=null?n:[],z];v.push({state:i.getState(),keystrokes:W,leftSiblings:nv(e)});let ye=0,lt="";for(;!u&&ye<W.length;)h=v.length-(W.length-ye),lt=W.slice(ye).join(""),u=Wu(v[h].leftSiblings,lt,e.options.inlineShortcuts),!u&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(lt)&&(u=e.options.onInlineShortcut(e,lt)),ye+=1;e.flushInlineShortcutBuffer({defer:!0})}e.options.smartMode&&(u?e.switchMode("math"):Qm(e,s,t)&&(e.switchMode({math:"text",text:"math"}[i.mode]),d=""))}if(!u){if(d||(d=Yp(e.keybindings,i.mode,t)),!d&&(s==="[Enter]"||s==="[Return]")){let z=!1;return i.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(z=!e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),z||t.preventDefault&&(t.preventDefault(),t.stopPropagation()),i.contentDidChange({inputType:"insertLineBreak"})),z}if((!d||s==="[Space]")&&i.mode==="math"){if(s==="[Space]"){if(e.adoptStyle="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return ii.insert(i,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),d="",e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;const z=i.at(i.position+1),W=i.at(i.position-1);if((z==null?void 0:z.mode)==="text"||(W==null?void 0:W.mode)==="text")return ii.insert(i," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1}(a=i.at(i.position))!=null&&a.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Eu(t)===","&&(d="insertDecimalSeparator")}}if(!u&&!d){if(i.mathfield.smartFence){if(v0(i,Eu(t),e.effectiveStyle))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}else{const{parent:z}=i.at(i.position);if(z instanceof Ti&&z.rightDelim==="?"&&i.at(i.position).isLastSibling&&/^[)}\]|]$/.test(s))return e.snapshot(),z.isDirty=!0,z.rightDelim=s,i.position+=1,i.selectionDidChange(),i.contentDidChange({data:Eu(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!i.selectionIsCollapsed){const W=Eu(t);if(W==="("||W==="{"||W==="["){const ye={"(":"(","{":"\\lbrace","[":"\\lbrack"}[W],lt={"(":")","{":"\\rbrace","[":"\\rbrack"}[W],[pe,ze]=fs(i.selection);return e.snapshot(),i.position=ze,ii.insert(i,lt,{format:"latex"}),i.position=pe,ii.insert(i,ye,{format:"latex"}),i.setSelection(pe+1,ze+1),i.contentDidChange({data:W,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}}}return!0}const k=i.at(Math.max(i.position,i.anchor)),{parent:I}=k;if(d==="moveAfterParent"&&(I==null?void 0:I.type)==="leftright"&&k.isLastSibling&&e.options.smartFence&&v0(i,".",e.defaultStyle)&&(d="",lo(e)),e.keyboardDelegate.cancelComposition(),d)e.executeCommand(d);else if(u){const z=e.effectiveStyle;i.setState(v[h].state);const W=v[v.length-1].keystrokes;for(const ye of W)ii.insert(i,ye,{silenceNotifications:!0,style:z});e.snapshot("insert-shortcut"),i.setState(v[h].state),i.deferNotifications({content:!0,selection:!0,data:u,type:"insertText"},()=>(ii.insert(i,u,{format:"latex",style:z}),p0(e.model),u.endsWith(" ")&&(e.switchMode("text"),ii.insert(i," ",{style:z,mode:"text"})),e.snapshot(),i.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,i.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function m0(e,t,r){const{model:n}=e;if(!e.isSelectionEditable){n.announce("plonk");return}r!=null||(r={}),r.focus&&e.focus(),r.feedback&&window.MathfieldElement.playSound("keypress"),typeof r.mode=="string"&&(e.switchMode(r.mode),e.snapshot());let a=rl(t);const i=window.mathVirtualKeyboard;if(i!=null&&i.isShifted&&(a=typeof a=="string"?a.toUpperCase():a.map(d=>d.toUpperCase())),r.simulateKeystroke){let d=!0;for(const h of a)vh(e,new KeyboardEvent("keypress",{key:h}))&&(d=!1);if(d)return}const s=n.at(n.position),u=C(C({},s.computedStyle),e.defaultStyle);if(n.selectionIsCollapsed||(n.deleteAtoms(fs(n.selection)),e.snapshot("delete")),n.mode==="latex")n.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{jd(e);for(const d of a)ii.insert(n,d);e.snapshot("insert-latex"),rd(e)});else if(n.mode==="text"){for(const d of a)ii.insert(n,d,{style:u});e.snapshot("insert-text")}else if(n.mode==="math")for(const d of a)av(e,d,u,s);e.dirty=!0,e.scrollIntoView()}function nv(e){const t=e.model,r=[];let n=t.at(Math.min(t.position,t.anchor));for(;n.type!=="first";)r.push(n),n=n.leftSibling;return r}function av(e,t,r,n){const a=e.model;let i={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(t===" "&&e.options.mathModeSpace&&(i=["insert",e.options.mathModeSpace]),i){e.executeCommand(i);return}if(/\d/.test(t)&&e.options.smartSuperscript&&n.parentBranch==="superscript"&&n.parent.type!=="mop"&&n.parent.type!=="operator"&&n.parent.type!=="extensible-symbol"&&n.hasNoSiblings){iv(a),ii.insert(a,t,{style:r}),e.snapshot(),dh(a),e.snapshot();return}if(/[a-zA-Z0-9]/.test(t)&&e.adoptStyle!=="none"){const s=e.adoptStyle==="left"?n:n.parent?n.rightSibling:null;(s==null?void 0:s.type)==="mord"&&/[a-zA-Z0-9]/.test(s.value)&&(r=C({},r),s.style.variant&&(r.variant=s.style.variant),s.style.variantStyle&&(r.variantStyle=s.style.variantStyle))}ii.insert(a,t,{style:r}),e.snapshot(`insert-${a.at(a.position).type}`)}function iv(e){e.selectionIsCollapsed||(e.deleteAtoms(fs(e.selection)),e.mathfield.snapshot("delete"))}function v0(e,t,r){if(!t||e.mode!=="math")return!1;const n=e.at(e.position),{parent:a}=n,i={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!i)return!1;const s=vu[i],u=mu[i];if(!e.selectionIsCollapsed){e.mathfield.snapshot();const[d,h]=fs(e.selection),v=e.extractAtoms([d,h]),k=a.addChildrenAfter([new Ti("left...right",v,{leftDelim:i,rightDelim:u})],e.at(d));return e.setSelection(e.offsetOf(k.firstChild),e.offsetOf(k.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:i,inputType:"insertText"}),!0}if(i==="|"){const d=a instanceof Ti?a.leftDelim+a.rightDelim:"";if(d==="\\lbrace\\rbrace"||d==="\\{\\}"||d==="\\lbrace?")return e.mathfield.snapshot(),ii.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:r}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:i,inputType:"insertText"}),!0}if(u){if(a instanceof Ti&&a.firstChild===n&&(a.leftDelim==="?"||a.leftDelim==="."))return a.leftDelim=i,a.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(a instanceof Ti)){let k=n;for(;k&&!(k.type==="mclose"&&k.value===u);)k=k.rightSibling;if(k){e.mathfield.snapshot();const I=e.extractAtoms([e.offsetOf(n),e.offsetOf(k)]);return I.pop(),a.addChildrenAfter([new Ti("left...right",I,{leftDelim:i,rightDelim:u})],n),e.position=e.offsetOf(a.firstChild)+1,e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}const d=e.offsetOf(n.lastSibling);let h;for(h=e.position;h<=d;h++){const k=e.at(h);if(k instanceof Ti&&(k.leftDelim==="?"||k.leftDelim===".")&&gh(i,k.rightDelim))break}const v=e.at(h);if(h<=d&&v instanceof Ti){v.leftDelim=i,e.mathfield.snapshot();let k=e.extractAtoms([e.position,h-1]);return k=k.filter(I=>I.type!=="first"),v.addChildren(k,v.parentBranch),e.position+=1,e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(a instanceof Ti&&(a.leftDelim==="?"||a.leftDelim===".")&&gh(i,a.rightDelim)){a.isDirty=!0,a.leftDelim=i,e.mathfield.snapshot();const k=e.extractAtoms([e.offsetOf(n.firstSibling),e.position]);for(const I of k)a.parent.addChildBefore(I,a);return e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(a instanceof Ti&&a.leftDelim==="|")){if(e.mathfield.snapshot(),ii.insert(e,`\\left${i}\\right?`,{format:"latex",style:r}),n.lastSibling.type!=="first"){const k=e.offsetOf(n.lastSibling),I=e.extractAtoms([e.position,k]);e.at(e.position).body=I,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(s){let d=n;for(;d;){if(d.type==="mopen"&&d.value===s){e.mathfield.snapshot();const z=d.leftSibling,W=e.extractAtoms([e.offsetOf(d.leftSibling),e.offsetOf(n)]);W.shift();const ye=new Ti("left...right",W,{leftDelim:s,rightDelim:i});return a.addChildrenAfter([ye],z),e.position=e.offsetOf(ye),e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}d=d.leftSibling}if(a instanceof Ti&&n.isLastSibling&&g0(a.leftDelim,i))return e.mathfield.snapshot(),a.isDirty=!0,a.rightDelim=i,e.position+=1,e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const h=e.offsetOf(n.firstSibling);let v;for(v=e.position;v>=h;v--){const z=e.at(v);if(z instanceof Ti&&(z.rightDelim==="?"||z.rightDelim===".")&&g0(z.leftDelim,i))break}const k=e.at(v);if(v>=h&&k instanceof Ti)return e.mathfield.snapshot(),k.rightDelim=i,k.addChildren(e.extractAtoms([v,e.position]),k.parentBranch),e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(a instanceof Ti&&(a.rightDelim==="?"||a.rightDelim===".")&&g0(a.leftDelim,i))return e.mathfield.snapshot(),a.isDirty=!0,a.rightDelim=i,a.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(n.lastSibling)]),a.parentBranch),e.position=e.offsetOf(a),e.contentDidChange({data:i,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const I=a.parent;return I instanceof Ti&&(I.rightDelim==="?"||I.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(I),v0(e,i,r)):!1}return!1}function g0(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):mu[e]===t:!0}function gh(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):vu[t]===e:!0}bl({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:tv,toggleContextMenu:e=>{const t=e.toggleContextMenu();return t||e.model.announce("plonk"),t},plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,r,n)=>(e.switchMode(t,r,n),!0),insert:(e,t,r)=>e.insert(t,r),typedText:(e,t,r)=>(m0(e,t,r),!0),insertDecimalSeparator:e=>{const t=e.model;return t.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t;return e.model.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,r)=>{const n=e.getPrompts();let a="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),i=0;for(;n.includes(a)&&i<100;){if(i===99)return console.error("could not find a unique ID after 100 tries"),!1;a="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),i++}return e.insert(`\\placeholder[${t!=null?t:a}]{}`,r),!0}}),bl({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),bl({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(rd(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),lo(e))):e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function ov(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();const r=b0(e,t),{model:n}=e;return n.selectionIsCollapsed?(e.defaultStyle.fontSeries&&r.fontSeries===e.defaultStyle.fontSeries&&(r.fontSeries="auto"),r.fontShape&&r.fontShape===e.defaultStyle.fontShape&&(r.fontShape="auto"),r.color&&r.color===e.defaultStyle.color&&(r.color="none"),r.backgroundColor&&r.backgroundColor===e.defaultStyle.backgroundColor&&(r.backgroundColor="none"),r.fontSize&&r.fontSize===e.defaultStyle.fontSize&&(r.fontSize="auto"),e.defaultStyle=C(C({},e.defaultStyle),r)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{n.selection.ranges.forEach(a=>u0(n,a,r,{operation:"toggle"})),e.snapshot("style-change")}),!0}bl({applyStyle:ov},{target:"mathfield",canUndo:!0,changeContent:!0});function b0(e,t){var r,n,a,i,s,u,d,h,v,k;const I={};if(typeof t.color=="string"){const W=(n=e.colorMap((r=t.color)!=null?r:t.verbatimColor))!=null?n:"none";W!==t.color&&(I.verbatimColor=(a=t.verbatimColor)!=null?a:t.color),I.color=W}if(typeof t.backgroundColor=="string"){const W=(s=e.backgroundColorMap((i=t.backgroundColor)!=null?i:t.verbatimBackgroundColor))!=null?s:"none";W!==t.backgroundColor&&(I.verbatimBackgroundColor=(u=t.verbatimBackgroundColor)!=null?u:t.backgroundColor),I.backgroundColor=W}typeof t.fontFamily=="string"&&(I.fontFamily=t.fontFamily),typeof t.series=="string"&&(I.fontSeries=t.series),typeof t.fontSeries=="string"&&(I.fontSeries=t.fontSeries.toLowerCase()),I.fontSeries&&(I.fontSeries=(d={bold:"b",medium:"m",normal:"m"}[I.fontSeries])!=null?d:I.fontSeries),typeof t.shape=="string"&&(I.fontShape=t.shape),typeof t.fontShape=="string"&&(I.fontShape=t.fontShape.toLowerCase()),I.fontShape&&(I.fontShape=(h={italic:"it",up:"n",upright:"n",normal:"n"}[I.fontShape])!=null?h:I.fontShape),t.variant&&(I.variant=t.variant.toLowerCase()),t.variantStyle&&(I.variantStyle=t.variantStyle.toLowerCase());const z=(v=t.size)!=null?v:t.fontSize;return typeof z=="number"?I.fontSize=Math.max(1,Math.min(10,z)):typeof z=="string"&&(I.fontSize=(k={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[z.toLowerCase()])!=null?k:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[z]),I}function y0(e){let[t,r]=fs(e.selection);if(t=bh(e,t,"backward"),r=bh(e,r,"forward"),t===r){const n=e.at(t);if(n.type==="leftright")return e.setSelection(e.offsetOf(n.firstChild)-1,r);if(n.type==="first"&&(n.parent.type==="leftright"||n.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(n.parent.lastChild)+1);e.setSelection(t-1,r)}else e.setSelection(t,r);return!0}function bh(e,t,r){var n,a,i;let s=e.at(t);if(!s)return t;const u=r==="forward"?1:-1;if(s.mode==="text"){for(;s&&!(s.mode!=="text"||!te.test(s.value));)t+=u,s=e.at(t);return r==="backward"?t-1:t}if(s.mode==="latex"){if(/[a-zA-Z\*]/.test(s.value))if(r==="backward")for(;s&&s.mode==="latex"&&s.value!=="\\"&&/[a-zA-Z]/.test(s.value);)t+=u,s=e.at(t);else for(;s&&s.mode==="latex"&&/[a-zA-Z\*]/.test(s.value);)t+=u,s=e.at(t);else if(s.value==="{"){if(r==="forward"){for(;s&&s.mode==="latex"&&s.value!=="}";)t+=u,s=e.at(t);return t}return t-1}else if(s.value==="}"){if(r==="backward"){for(;s&&s.mode==="latex"&&s.value!=="{";)t+=u,s=e.at(t);return t-1}return t}return t-1}if(s.mode==="math"){if(s.isDigit()){for(;(n=e.at(t+u))!=null&&n.isDigit();)t+=u;return r==="backward"?t-1:t}if(s.style.variant||s.style.variantStyle){let d=(a=e.at(t))==null?void 0:a.style;for(;d&&d.variant===s.style.variant&&d.variantStyle===s.style.variantStyle;)d=(i=e.at(t+u))==null?void 0:i.style,t+=u;return r==="backward"?t-1:t}return t}return t}bl({selectGroup:e=>{const t=y0(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>hc(e,"forward",{extend:!0}),extendSelectionBackward:e=>hc(e,"backward",{extend:!0}),extendToNextWord:e=>Tu(e,"forward",{extend:!0}),extendToPreviousWord:e=>Tu(e,"backward",{extend:!0}),extendSelectionUpward:e=>hc(e,"upward",{extend:!0}),extendSelectionDownward:e=>hc(e,"downward",{extend:!0}),extendToNextBoundary:e=>Tu(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>Tu(e,"backward",{extend:!0}),extendToGroupStart:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{const t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{const t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",changeSelection:!0});var ou=null,ld=0,hf=class Vl{static start(t,r,n,a){var i;Vl.element=t,(i=Vl.controller)==null||i.abort(),Vl.controller=new AbortController;const s={signal:Vl.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",n,s),t.addEventListener("pointerup",a,s),t.addEventListener("pointercancel",a,s),x0(r)&&(Vl.pointerId=r.pointerId,t.setPointerCapture(r.pointerId))):(window.addEventListener("mousemove",n,s),window.addEventListener("blur",a,s),window.addEventListener("mouseup",a,s))}static stop(){var t;(t=Vl.controller)==null||t.abort(),Vl.controller=void 0,typeof Vl.pointerId=="number"&&(Vl.element.releasePointerCapture(Vl.pointerId),Vl.pointerId=void 0)}};function x0(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent}function yh(e,t){var r;if(t.buttons>1)return;e.atomBoundsCache=new Map;const n=e;let a,i=!1,s=!1,u="none",d=!1,h=!1;const v=t.clientX,k=t.clientY,I=Date.now(),z=n.field,W=setInterval(()=>{d?z.scroll({top:0,left:z.scrollLeft-16}):h&&z.scroll({top:0,left:z.scrollLeft+16})},32);function ye(){hf.stop(),i=!1,clearInterval(W),e.element.classList.remove("tracking"),t&&t.preventDefault()}function lt(ze){if(!n.hasFocus()){ye();return}const pt=ze.clientX,Ve=ze.clientY,Vt=x0(ze)&&ze.pointerType==="touch"?20:5;if(Date.now()<I+500&&Math.abs(v-pt)<Vt&&Math.abs(k-Ve)<Vt){ze.preventDefault(),ze.stopPropagation();return}const mr=z.getBoundingClientRect();h=pt>mr.right,d=pt<mr.left;let or=a;x0(ze)&&(ze.isPrimary||(or=cd(n,ze.clientX,ze.clientY,{bias:0})));const Kn=cd(n,pt,Ve,{bias:pt<=v?pt===v?0:-1:1});or>=0&&Kn>=0&&(n.model.extendSelectionTo(or,Kn),lo(e)),s&&y0(n.model)}ou&&Math.abs(ou.x-v)<5&&Math.abs(ou.y-k)<5&&Date.now()<ou.time+500?(ld+=1,ou.time=I):(ou={x:v,y:k,time:I},ld=1);const pe=z.getBoundingClientRect();if(v>=pe.left&&v<=pe.right&&k>=pe.top&&k<=pe.bottom){if(e.flushInlineShortcutBuffer(),e.adoptStyle="left",a=cd(e,v,k,{bias:0}),a>=0){if(e.element.classList.add("tracking"),t.shiftKey){const ze=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,a),U0(e.model)||ze?u="all":u="selection"}else e.model.at(a).type==="placeholder"?(e.model.setSelection(a-1,a),u="selection"):((r=e.model.at(a).rightSibling)==null?void 0:r.type)==="placeholder"?(e.model.setSelection(a,a+1),u="selection"):(e.model.position=a,U0(e.model)?u="all":u="selection");e.defaultStyle={},t.detail===3||ld>2?(ye(),(t.detail===3||ld===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},u="all")):i||(i=!0,hf.start(z,t,lt,ye),(t.detail===2||ld===2)&&(s=!0,y0(e.model),u="all"))}e.hasFocus()||(u="none",e.focus({preventScroll:!0}))}else ou=null;e.stopCoalescingUndo(),u!=="none"&&(e.model.selectionIsCollapsed&&(u="all"),lo(e)),t.preventDefault()}function sv(e,t,r){if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return 0;const n=e-(r.left+r.right)/2,a=t-(r.top+r.bottom)/2;return n*n+a*a}function xh(e,t,r,n,a){if(!r.id)return[1/0,null];if(t.has(r.id))return t.get(r.id);const i=jc(e,r);if(!i)return[1/0,null];let s=[1/0,null];if(r.hasChildren&&!r.captureSelection&&n>=i.left&&n<=i.right)for(const u of r.children){const d=xh(e,t,u,n,a);d[0]<=s[0]&&(s=d)}return s[1]||(s=[sv(n,a,i),r]),t.set(r.id,s),s}function lv(e,t,r){const[,n]=xh(e,new Map,e.model.root,t,r);return n}function cd(e,t,r,n){var a;const i=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!i)return 0;if(t>i.right||r>i.bottom+8)return e.model.lastOffset;if(t<i.left||r<i.top-8)return 0;n=n!=null?n:{},n.bias=(a=n.bias)!=null?a:0;let s=lv(e,t,r);const u=[];let d=s;for(;d;)u.unshift(d),d=d.parent;for(const v of u)if(v.captureSelection){s=v;break}let h=e.model.offsetOf(s);if(h<0)return-1;if(s.leftSibling)if(n.bias===0&&s.type!=="placeholder"){const v=jc(e,s);v&&t<(v.left+v.right)/2&&(h=e.model.offsetOf(s.leftSibling))}else n.bias<0&&(h=e.model.offsetOf(s.leftSibling));return h}var cv=class extends ii{constructor(){super("math")}onPaste(e,t){if(!t||!e.model.contentWillChange({data:typeof t=="string"?t:null,dataTransfer:typeof t=="string"?null:t,inputType:"insertFromPaste"}))return!1;let r="",n="auto",a=typeof t!="string"?t.getData("application/json+mathlive"):"";if(a)try{const i=JSON.parse(a);if(i&&Array.isArray(i)){e.snapshot();const s=js(i),{model:u}=e;u.selectionIsCollapsed||u.deleteAtoms(fs(u.selection));const d=u.at(u.position);if(d.parent instanceof Ba){console.assert(d.parentBranch!==void 0);const h=[];let v=[];s[0].type==="first"&&s.shift(),s[s.length-1].type==="first"&&s.pop();for(const W of s)W.type==="first"&&v.length>0?(h.push(v),v=[W]):v.push(W);v.length>0&&h.push(v);let k=Number(d.parentBranch[0]),I=Number(d.parentBranch[1]);const z=d.parent.maxColumns;for(;d.parent.colCount-I<h.length&&d.parent.colCount<z;)d.parent.addColumn();d.parent.addChildrenAfter(h[0],d);for(let W=1;W<h.length;W++)I++,I>=z&&(I=0,d.parent.addRowAfter(k),k++),d.parent.setCell(k,I,h[W])}else d.parent.addChildrenAfter(s.filter(h=>h.type!=="first"),d);return u.position=u.offsetOf(s[s.length-1]),u.contentDidChange({inputType:"insertFromPaste"}),lo(e),!0}}catch(i){}if(a=typeof t!="string"?t.getData("application/json"):"",a&&window.MathfieldElement.computeEngine)try{const i=JSON.parse(a);if(typeof i=="object"&&"latex"in i&&i.latex&&(r=i.latex),!r){const s=window.MathfieldElement.computeEngine.box(i);s&&!s.has("Error")&&(r=s.latex)}r||(n="latex")}catch(i){}if(!r&&typeof t!="string"&&(r=t.getData("application/x-latex"),r&&(n="latex")),r||(r=typeof t=="string"?t:t.getData("text/plain")),r){let i;return[i,r]=wd(r),n==="auto"&&i&&(n="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r,{format:n})&&(e.startRecording(),e.snapshot("paste"),lo(e)),e.startRecording(),!0}return!1}insert(e,t,r){var n,a;const i=typeof t=="string"?t:(a=(n=window.MathfieldElement.computeEngine)==null?void 0:n.box(t).latex)!=null?a:"";if(!r.silenceNotifications&&!e.contentWillChange({data:i,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");const{silenceNotifications:s}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const u=e.silenceNotifications;e.silenceNotifications=!0;const d={"?":"\\placeholder{}","@":"\\placeholder{}"};d[0]=r.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(fs(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);let h=-1;d[0]?d["@"]=d[0]:typeof t=="string"&&/(^|[^\\])#@/.test(t)&&(h=dv(e),h>=0&&(d["@"]=e.getValue(h,e.position,"latex"))),d[0]||(d[0]=d["?"]);let v=!1;const k=pt=>(v=!0,d[pt]);let[I,z]=wh(e,t,k,r);if(!z)return!1;const W=z.length===1&&z[0].type==="genfrac";W&&h>=0&&typeof e.mathfield.options.isImplicitFunction=="function"&&e.mathfield.options.isImplicitFunction(e.at(e.position).command)?(d["@"]=d["?"],v=!1,[I,z]=wh(e,t,k,r)):h>=0&&e.deleteAtoms([h,e.position]);const{parent:ye}=e.at(e.position),lt=ye.hasEmptyBranch("body");if(W&&I!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&ye instanceof Ti&&ye.leftDelim==="("&<){const pt=ye.parent,Ve=ye.parentBranch;pt.removeChild(ye),pt.setChildren(z,Ve)}const pe=e.at(e.position);pe.parent.addChildrenAfter(z,pe),I==="latex"&&typeof t=="string"&&(ye==null?void 0:ye.type)==="root"&<&&!v&&(ye.verbatimLatex=t),e.silenceNotifications=u;const ze=z[z.length-1];if(r.selectionMode==="placeholder"){const pt=z.flatMap(Ve=>[Ve,...Ve.children]).find(Ve=>Ve.type==="placeholder");if(pt){const Ve=e.offsetOf(pt);e.setSelection(Ve-1,Ve),e.announce("move")}else ze&&(e.position=e.offsetOf(ze))}else r.selectionMode==="before"||(r.selectionMode==="after"?ze&&(e.position=e.offsetOf(ze)):r.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(ze)));return e.contentDidChange({data:i,inputType:"insertText"}),e.silenceNotifications=s,!0}};function wh(e,t,r,n){var a;let i,s=[];if(typeof t!="string"||n.format==="math-json"){const u=window.MathfieldElement.computeEngine;if(!u)return["math-json",[]];[i,t]=["latex",u.box(t).latex],s=E(t,{context:e.mathfield.context})}else typeof t=="string"&&n.format==="ascii-math"?([i,t]=ac(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),s=E(t,{context:e.mathfield.context}),i!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&pf(s)):(n.format==="auto"||(a=n.format)!=null&&a.startsWith("latex"))&&(n.format==="auto"&&([i,t]=ac(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),n.format==="latex"&&([,t]=wd(t)),s=E(t,{context:e.mathfield.context,args:r}),n.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&pf(s));return Kc(s,n.style),[i!=null?i:"latex",s]}function uv(e){if(!e||(console.assert(e[0].type==="first"),e.length>1))return null;const t=e[0];return t instanceof Ti&&t.leftDelim==="("&&t.rightDelim===")"?t.removeBranch("body"):null}function pf(e){if(e){for(let t=0;e[t];t++){const r=e[t];if(r instanceof Ti&&r.leftDelim==="("){let n=0,a=0,i=0;for(let s=0;r.body[s];s++)r.body[s].type==="genfrac"&&(n++,a=s),i++;i===0&&n===1&&(e[t]=r.body[a])}}for(const t of e){for(const r of t.branches)if(!t.hasEmptyBranch(r)){pf(t.branch(r));const n=uv(t.branch(r));n&&t.setChildren(n,r)}if(t instanceof Ba)for(const r of t.cells)pf(r)}}}function dv(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}const r=t;let n=!1;if(t.type==="mclose"){const a=vu[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===a);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),n=!0}else t.type==="leftright"&&(t=t.leftSibling,n=!0);if(n)for(;!t.isFirstSibling&&(t.isFunction||Sh(t));)t=t.leftSibling;else{const a=[];for(;!t.isFirstSibling&&(Sh(t)||a.length>0);)t.type==="mclose"&&a.unshift(t.value),t.type==="mopen"&&a.length>0&&t.value===vu[a[0]]&&a.shift(),t=t.leftSibling}return r===t?-1:e.offsetOf(t)}function Sh(e){return e.isDigit()?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?!e.isExtensibleSymbol:!1}new cv;var fv=class extends ii{constructor(){super("text")}onPaste(e,t){if(!t)return!1;const r=typeof t=="string"?t:t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),lo(e)),e.startRecording(),!0):!1}insert(e,t,r={}){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");const{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const a=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(fs(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");const i=hv(t,e.mathfield.context);if(Kc(i,r.style),!i)return!1;const s=e.at(e.position),u=s.parent.addChildrenAfter(i,s);return e.silenceNotifications=a,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(u)):u&&(e.position=e.offsetOf(u))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};function hv(e,t){return e=e.replace(/\\/g,"\\textbackslash "),e=e.replace(/#/g,"\\#"),e=e.replace(/\$/g,"\\$"),e=e.replace(/%/g,"\\%"),e=e.replace(/&/g,"\\&"),e=e.replace(/_/g,"\\_"),e=e.replace(/{/g,"\\textbraceleft "),e=e.replace(/}/g,"\\textbraceright "),e=e.replace(/lbrace/g,"\\textbraceleft "),e=e.replace(/rbrace/g,"\\textbraceright "),e=e.replace(/\^/g,"\\textasciicircum "),e=e.replace(/~/g,"\\textasciitilde "),e=e.replace(/£/g,"\\textsterling "),E(e,{context:t,parseMode:"text"})}new fv;function pc(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:e.selectionStyle,mode:e.model.mode}}var Si=4,il=20,Oo=2*(il+Si),mf=(e,t)=>`
|
|
|
<line x1="${e+il}" y1="${t+il}"
|
|
|
x2="${e>t?e+il:7*il+10*Si}"
|
|
|
y2="${e<t?t+il:7*il+10*Si}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
|
|
|
</svg>`,_h=(e,t)=>`
|
|
|
<line x1="${e+il}" y1="${t+il}"
|
|
|
x2="${e>t?e+il:7*il+10*Si}"
|
|
|
y2="${e<t?t+il:7*il+10*Si}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
|
|
|
</svg>`,vf=(e,t,r)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${r})" transform-origin="20 20">
|
|
|
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
|
|
|
</g>
|
|
|
</svg>`,pv=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*il+10*Si+5} ${8*il+10*Si+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${Oo+Si}"
|
|
|
height="${3*Oo}"
|
|
|
width="${Oo}"
|
|
|
rx="${Oo/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${Oo+Si}"
|
|
|
y="0"
|
|
|
height="${Oo}"
|
|
|
width="${3*Oo}"
|
|
|
rx="${Oo/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${vf(2*(Si+Oo),2*Si+3*Oo,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${vf(2*(Si+Oo),2*Si+Oo,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${vf(2*Si+3*Oo,2*(Si+Oo),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${vf(2*Si+Oo,2*(Si+Oo),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${mf(2*Si+Oo,Si)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${_h(2*Si+2*Oo,Si)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${mf(2*Si+3*Oo,Si)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${mf(Si,2*Si+Oo)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${_h(Si,2*Si+2*Oo)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${mf(Si,2*Si+3*Oo)}
|
|
|
</g>
|
|
|
</svg>`,mv=e=>`
|
|
|
<svg id="matrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","matrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,vv=e=>`
|
|
|
<svg id="pmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","pmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
|
|
|
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,Mh=e=>`
|
|
|
<svg id="Bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","Bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,gv=e=>`
|
|
|
<svg id="bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4h-3v16h3"/>
|
|
|
<path class="cls-2" d="m22,4h3v16h-3"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,bv=e=>`
|
|
|
<svg id="vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
|
|
|
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
|
|
|
</svg>`,yv=e=>`
|
|
|
<svg id="Vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
|
|
|
data-command='["setEnvironment","Vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
|
|
|
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
|
|
|
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
|
|
|
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
|
|
|
</svg>`,xv=e=>`
|
|
|
<svg id="cases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","cases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<circle cx="13" cy="8" r="1"/>
|
|
|
<circle cx="13" cy="16" r="1"/>
|
|
|
<circle cx="21" cy="8" r="1"/>
|
|
|
<circle cx="21" cy="16" r="1"/>
|
|
|
</svg>`,wv=e=>`
|
|
|
<svg id="rcases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","rcases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
|
|
|
<circle cx="15" cy="8" r="1"/>
|
|
|
<circle cx="15" cy="16" r="1"/>
|
|
|
<circle cx="7" cy="8" r="1"/>
|
|
|
<circle cx="7" cy="16" r="1"/>
|
|
|
</svg>`,w0={matrix:mv,pmatrix:vv,bmatrix:gv,Bmatrix:Mh,vmatrix:bv,Vmatrix:yv},S0={cases:xv,rcases:wv,Bmatrix:Mh};function Sv(e){var t,r;const n=(t=e.model.parentEnvironment)==null?void 0:t.array;if(!n)return;let a=0;n.forEach(W=>{(!a||W.length>a)&&(a=W.length)});let i=document.getElementById("mathlive-environment-popover");i||(i=Gd("mathlive-environment-popover"),kl("environment-popover"),kl("core"),i.setAttribute("aria-hidden","true"));let s;const u=i.querySelector(".MLEP__environment-controls");u?s=u:(s=document.createElement("div"),i.innerHTML="",i.appendChild(s)),s.className="MLEP__environment-controls",s.style.display="flex",s.style.width="100%",s.style.height="100%",s.style.boxSizing="border-box",s.innerHTML=pv;let d=[],h="";const v=e.model.parentEnvironment.environmentName;if(Rd(v)){const W=Mv(v);h=w0[W]("active");const ye=w0,{[W]:lt}=ye,pe=Ke(ye,[fe(W)]);d=Object.values(pe).map(ze=>ze("inactive"))}else if(Xf(v)){const W=Cv(v);h=S0[W]("active");const ye=S0,{[W]:lt}=ye,pe=Ke(ye,[fe(W)]);d=Object.values(pe).map(ze=>ze("inactive"))}else Jf(v)&&(h=w0.matrix("active"),d=Object.values(S0).map(W=>W("inactive")));const k=document.createElement("div");k.className="MLEP__environment-delimiter-controls",k.style.display="flex",k.style.flexDirection="column",k.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${h}
|
|
|
${d.join("")}
|
|
|
</div>`,h&&s.appendChild(k),s.querySelectorAll("[data-command]").forEach(W=>{const ye=W.dataset.command;let lt=ye;try{lt=JSON.parse(ye)}catch(pe){}W.addEventListener("mousedown",pe=>pe.preventDefault()),lt&&W.addEventListener("click",()=>e.executeCommand(lt))});const z=(r=e.field)==null?void 0:r.getBoundingClientRect();z&&(i.style.top=`${window.scrollY+(z.top-i.clientHeight-15)}px`,i.style.left=`${z.left+20}px`,i.classList.add("is-visible"))}function _0(){const e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function _v(){document.getElementById("mathlive-environment-popover")&&(a0("mathlive-environment-popover"),zl("environment-popover"),zl("core"))}function gf(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){const r=e.model.parentEnvironment;if(r!=null&&r.array&&qf(r.environmentName)){const n=e.options.environmentPopoverPolicy;t=n==="auto"||n==="on"}}t?Sv(e):_0()}function Mv(e){return e.replace("*","")}function Cv(e){return e==="dcases"?"cases":e}function Ch(e){const t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr"}function Eh(e,t,r){return t==="left"||t==="leading"&&r==="ltr"||t==="trailing"&&r==="rtl"?e.left:e.right}function M0(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="rtl"||r==="end"&&n==="ltr"||r==="top"||r==="right"?Math.max(0,e-t):e}function Ev(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="ltr"||r==="end"&&n==="rtl"||r==="top"||r==="right"?e:e-t}function kv(e,t){var r,n,a;const i=(r=Ch(e))!=null?r:"ltr";e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";const s=e.getBoundingClientRect(),u=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight;let d=Math.min(u,(n=t.height)!=null?n:s.height),h=M0(t.location.y,d,t.verticalPos,i);h+d>window.innerHeight-8&&(t.alternateLocation?(h=M0(t.alternateLocation.y,d,t.verticalPos,i),h+d>window.innerHeight-8&&(h=void 0)):h=void 0),Number.isFinite(h)||(h=Math.max(8,window.innerHeight-8-d),8+d>window.innerHeight-8&&(e.style.bottom="8px")),d=Math.min(h+d,window.innerHeight-8)-h;const v=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth;let k=Math.min(v,(a=t.width)!=null?a:s.width),I=M0(t.location.x,k,t.horizontalPos,i);I+k>window.innerWidth-8&&(t.alternateLocation?(I=Ev(t.alternateLocation.x,k,t.verticalPos,i),I+k>window.innerWidth-8&&(I=void 0)):I=void 0),Number.isFinite(I)||(I=Math.max(8,window.innerWidth-8-k),8+k>window.innerWidth-8&&(e.style.right="8px")),k=Math.min(I+k,window.innerWidth-8)-I,i==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-I-k).toString()}px`:e.style.left=`${Math.ceil(I).toString()}px`,e.style.top=`${Math.ceil(h).toString()}px`,d!==s.height&&(e.style.height=`${Math.ceil(d).toString()}px`),k!==s.width&&(e.style.width=`${Math.ceil(k).toString()}px`)}function Av(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function Bu(e){return"submenu"in e}function mc(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function C0(e){return"type"in e&&e.type==="divider"}function E0(e){return"type"in e&&e.type==="heading"}var kh={};function k0(e){let t=kh[e];if(!t){let r;switch(e){case"checkmark":r=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
|
|
|
</span>`;break;case"trailing-chevron":r='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":r='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(r){const n=document.createElement("template");n.innerHTML=r,kh[e]=n,t=n}}if(t){if("content"in t)return t.content.cloneNode(!0);const r=document.createElement("svg");return r.innerHTML=t.innerHTML,r}}var Ah=80,Dh=class{constructor(e,t){this._element=null;var r;this.parentMenu=t,this._declaration=e,Bu(e)?(this.type="submenu",this.submenu=new Lh(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(r=e.type)!=null?r:"command",this.hasCheck=mc(e)&&e.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var e,t;(e=this._abortController)==null||e.abort(),this._abortController=void 0,(t=this._element)==null||t.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var e;return(e=this._label)!=null?e:""}set label(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0)}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.dirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(e){this._checked=e,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0)}get active(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))!=null?t:!1}set active(e){this.element&&this.element.classList.toggle("active",e)}updateState(e){var t,r,n;const a=this._declaration;if(C0(a)){this.enabled=!1,this.checked=!1;return}E0(a)&&(this.enabled=!1,this.checked=!1,this.visible=!0),mc(a)&&(this.checked=mc(a)&&((t=Pu(a.checked,e))!=null?t:!1)),(mc(a)||Bu(a))&&(this.enabled=(r=Pu(a.enabled,e))!=null?r:!0,this.visible=(n=Pu(a.visible,e))!=null?n:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(mc(a)||E0(a)||Bu(a))&&(this.label=Pu(a.label,e),this.tooltip=Pu(a.tooltip,e),this.ariaLabel=Pu(a.ariaLabel,e)),this._element&&this.updateElement()}set dirty(e){console.assert(e===!0),e&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const e=this.element;e.textContent="",this.enabled?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true"),this.checked===!0?(e.setAttribute("aria-checked","true"),e.append(k0("checkmark"))):this.checked==="mixed"?(e.setAttribute("aria-checked","mixed"),e.append(k0("mixedmark"))):e.removeAttribute("aria-checked"),this.ariaLabel&&e.setAttribute("aria-label",this.ariaLabel);const t=document.createElement("span");if(t.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&t.classList.add("heading"),t.innerHTML=this.label,e.append(t),this._tooltip&&e.setAttribute("data-tooltip",this._tooltip),mc(this._declaration)&&this._declaration.keyboardShortcut){const r=document.createElement("kbd");r.innerHTML=r0(this._declaration.keyboardShortcut),e.append(r)}this.type==="submenu"&&e.append(k0("trailing-chevron"))}get element(){if(this._element)return this._element;if(C0(this._declaration)){const r=document.createElement("li");return r.setAttribute("part","menu-divider"),r.setAttribute("role","divider"),this._element=r,r}const e=document.createElement("li");this._element=e,(mc(this._declaration)||E0(this._declaration)||Bu(this._declaration))&&this._declaration.class&&(e.className=this._declaration.class),e.setAttribute("part","menu-item"),e.setAttribute("tabindex","-1"),this.hasCheck?e.setAttribute("role","menuitemcheckbox"):e.setAttribute("role","menuitem"),this.type==="submenu"&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"));const t=this.abortController.signal;return e.addEventListener("pointerenter",this,{signal:t}),e.addEventListener("pointerleave",this,{signal:t}),e.addEventListener("pointerup",this,{signal:t}),e.addEventListener("click",this,{signal:t}),this._element}dispatchSelect(){if(!mc(this._declaration))return;const e=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(e)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(e){var t;if(!(!this.visible||!this.enabled)){if(e.type==="click"){this.rootMenu.state==="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}if(e.type==="pointerenter"){const r=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(r))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(e.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(e.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Ah)},Ah)}openSubmenu(e){var t;if(this.type!=="submenu"||!this.element)return;if((t=e==null?void 0:e.withDelay)!=null&&t){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const r=this.element.getBoundingClientRect(),n=Ch(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Eh(r,"trailing",n),y:r.top-4},alternateLocation:{x:Eh(r,"leading",n),y:r.top-4}})}movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;const t=this.rootMenu.lastMoveEvent;if(!t)return!1;const r=e.timeStamp-t.timeStamp;if(r>500)return!1;const n=e.clientX-t.clientX;if(Dv(n,t.clientY-e.clientY,r)<=.2)return!1;let i="right";if(this.submenu.element){const s=this.submenu.element.getBoundingClientRect(),u=this.element.getBoundingClientRect();s.left<u.left+u.width/2&&(i="left")}return i==="right"?n>0:n<0}};function Dv(e,t,r){return Math.hypot(e,t)/r}function Pu(e,t){return e===void 0||typeof e!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t))}var Lh=class Hu{constructor(t,r){this._element=null,this._activeMenuItem=null,this._dirty=!0;var n,a;this.parentMenu=(n=r==null?void 0:r.parentMenu)!=null?n:null,this._submenuClass=r==null?void 0:r.submenuClass,this.columnCount=(a=r==null?void 0:r.columnCount)!=null?a:1,this.isSubmenuOpen=!1,this.menuItems=t}get children(){return this._menuItems}set menuItems(t){const r=this.parentMenu;this.dispose(),this.parentMenu=r,t=[...t],this._menuItems=t.map(n=>n.onCreate?n.onCreate(n,this):new Dh(n,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var t;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(t=this._menuItems)==null||t.forEach(r=>r.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(t){if(t.type==="wheel"&&this._element){const r=t;this._element.scrollBy(0,r.deltaY),t.stopPropagation()}}dispatchEvent(t){return this.rootMenu.dispatchEvent(t)}get rootMenu(){return this.parentMenu.rootMenu}updateState(t){var r,n,a;this._menuItems.forEach(h=>h.updateState(t));const i=this.hasCheck;this.hasCheck=this._menuItems.some(h=>h.visible&&h.hasCheck),this.hasCheck!==i&&this._menuItems.forEach(h=>h.updateState(t));let s,u=0;for(const h of this._menuItems)h.type==="heading"?(s&&u===0&&(s.visible=!1),s=h,u=0):h.type==="divider"&&s?(s.visible=u>0,s=void 0,u=0):s&&h.visible&&(u+=1);s&&(s.visible=u>0);let d=!0;for(const h of this._menuItems)h.type==="divider"?(h.visible=!d,d=!0):h.visible&&(d=!1);(r=this.activeMenuItem)!=null&&r.visible||(this.activeMenuItem=null),!((n=this.activeMenuItem)!=null&&n.enabled)&&((a=this.activeMenuItem)==null?void 0:a.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible&&t.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible)}set dirty(t){console.assert(t===!0),this._dirty!==t&&t&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var t;if(this._element){this._element.textContent="";for(const{element:r,visible:n}of this._menuItems)r&&n&&this._element.append(r);(t=this._element.querySelector("li:first-of-type"))==null||t.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const t=document.createElement("menu");t.setAttribute("role","menu"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-orientation","vertical"),t.setAttribute("part","ui-menu-container"),this._submenuClass&&t.classList.add(this._submenuClass),t.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const r=this._abortController.signal;return t.addEventListener("focus",this,{signal:r}),t.addEventListener("wheel",this,{passive:!0,signal:r}),this._element=t,this.updateElement(),t}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(t){var r,n,a,i;if(this.rootMenu.cancelDelayedOperation(),t!==this._activeMenuItem){if(this.activeMenuItem){const s=this.activeMenuItem;s.active=!1,(r=s.submenu)==null||r.hide()}if(!((n=t==null?void 0:t.visible)==null||n)){this._activeMenuItem=null;return}this._activeMenuItem=t,t&&(t.active=!0)}t?(a=t.element)==null||a.focus({preventScroll:!0}):(i=this._element)==null||i.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let t=0,r=!1;const n=this._menuItems;for(;!r&&t<=n.length-1;){const a=n[t];r=a.type!=="divider"&&a.visible&&a.enabled,t+=1}return r?n[t-1]:null}get lastMenuItem(){this.updateIfDirty();const t=this._menuItems;let r=t.length-1,n=!1;for(;!n&&r>=0;){const a=t[r];n=a.type!=="divider"&&a.visible&&a.enabled,r-=1}return n?t[r+1]:null}nextMenuItem(t){if(t===0)return this._activeMenuItem;if(!this._activeMenuItem)return t>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const r=this._menuItems.indexOf(this.firstMenuItem),n=this._menuItems.indexOf(this.lastMenuItem);let a=this._menuItems.indexOf(this._activeMenuItem),i=1;for(;a>=r&&a<=n;){a+=t>0?1:-1;const s=this._menuItems[a];if(!s)break;if(s.visible&&s.enabled){if(i===Math.abs(t))return this._menuItems[a];i+=1}}return t>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(t){this.updateIfDirty();const n=this._menuItems.filter(a=>a.visible&&a.enabled).indexOf(t);return n<0?-1:n%this.columnCount}static get collator(){return Hu._collator||(Hu._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Hu._collator}findMenuItem(t){var r;this.updateIfDirty();const n=this._menuItems.filter(u=>u.type!=="divider"&&u.visible&&u.enabled);if(n.length===0)return null;const a=Math.max(...n.map(u=>u.label.length))-t.length;if(a<0)return null;let i=null,s=0;for(;s<a&&!i;)i=(r=n.find(u=>Hu.collator.compare(t,u.label.substring(s,t.length))===0))!=null?r:null,s++;return i}show(t){return!this.visible||!t.container?!1:(this.updateElement(),t.container.appendChild(this.element),xr()&&(this.element.popover="manual",this.element.showPopover()),t.location&&kv(this.element,{location:t.location,alternateLocation:t.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var t,r,n,a,i;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),xr()&&((t=this._element)!=null&&t.popover)&&this.element.hidePopover(),(n=(r=this.parentMenu)==null?void 0:r.element)==null||n.focus(),(i=(a=this._element)==null?void 0:a.parentNode)==null||i.removeChild(this._element)}set openSubmenu(t){var r,n,a,i;const s=t!==null;((r=this.activeMenuItem)==null?void 0:r.type)==="submenu"&&((n=this.activeMenuItem.element)==null||n.setAttribute("aria-expanded",s.toString())),(i=(a=this.activeMenuItem)==null?void 0:a.element)==null||i.classList.toggle("is-submenu-open",s),this.isSubmenuOpen=s}},Ih=class Tp extends Lh{constructor(t,r){var n;super(t),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(n=r==null?void 0:r.host)!=null?n:null,this.isDynamic=t.some(Th),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(t){Gp(this._modifiers,t)||(this._modifiers=t,this.dirty=!0)}get activeSubmenu(){let t=this;for(;t.isSubmenuOpen;)t=t.activeMenuItem.submenu;return t}set dirty(t){this._updating||(console.assert(t===!0),this._dirty!==t&&(this._dirty=!0,t&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(t){this._updating=!0,this.modifiers=t!=null?t:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(t){this.isDynamic&&(this.modifiers=Yc(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var r,n,a;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Yc(t));let i=!0;const s=this.activeSubmenu,u=s.activeMenuItem;switch(t.key){case" ":case"Space":case"Return":case"Enter":u==null||u.select(Yc(t));break;case"ArrowRight":if((u==null?void 0:u.type)==="submenu")u.select(Yc(t)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!u)s.activeMenuItem=s.firstMenuItem;else{const d=(r=s.getMenuItemColumn(u))!=null?r:-1;if(d>=0&&d<((n=s.columnCount)!=null?n:1)-1){const h=s.nextMenuItem(1);h&&(s.activeMenuItem=h)}}break;case"ArrowLeft":if(s===this.rootMenu)u||(s.activeMenuItem=s.firstMenuItem);else if((u&&(a=s.getMenuItemColumn(u))!=null?a:-1)<=0||!u){s.hide();const h=s.parentMenu.activeMenuItem;if(h){const{element:v}=h;v==null||v.focus(),v==null||v.classList.remove("is-submenu-open")}}else{const h=s.nextMenuItem(-1);h&&(s.activeMenuItem=h)}break;case"ArrowDown":s.activeMenuItem=s.nextMenuItem(s.columnCount);break;case"ArrowUp":s.activeMenuItem=s.nextMenuItem(-s.columnCount);break;case"Home":case"PageUp":s.activeMenuItem=s.firstMenuItem;break;case"End":case"PageDown":s.activeMenuItem=s.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const d=s.findMenuItem(this.typingBuffer);d&&(s.activeMenuItem=d),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Vd(t)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=t.key;const d=s.findMenuItem(this.typingBuffer);d&&(s.activeMenuItem=d),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else i=!1}i&&(t.preventDefault(),t.stopPropagation())}handleEvent(t){if(t.type==="keydown")this.handleKeydownEvent(t);else if(t.type==="keyup")this.handleKeyupEvent(t);else if(t.type==="pointermove")this.lastMoveEvent=t;else if(t.type==="pointerup"&&t.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(t.type==="contextmenu"){t.preventDefault(),t.stopPropagation();return}super.handleEvent(t)}dispatchEvent(t){return this._host?this._host.dispatchEvent(t):!0}get scrim(){return dc.element}connectScrim(t){const r=this.scrim;r.addEventListener("pointerup",this),r.addEventListener("contextmenu",this),r.addEventListener("keydown",this),r.addEventListener("keyup",this),r.addEventListener("pointermove",this),dc.open({root:t,onDismiss:()=>this.hide()})}disconnectScrim(){const t=this.scrim;t.removeEventListener("pointerup",this),t.removeEventListener("contextmenu",this),t.removeEventListener("keydown",this),t.removeEventListener("keyup",this),t.removeEventListener("pointermove",this),dc.state==="open"&&dc.scrim.close()}get rootMenu(){return this}show(t){return this._onDismiss=t==null?void 0:t.onDismiss,t!=null&&t.modifiers&&(this.modifiers=t.modifiers),this.updateState(),this.connectScrim(t==null?void 0:t.target),super.show(p(C({},t),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,dc.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(t){this.cancelDelayedOperation();const r=Tp.SUBMENU_DELAY;if(r<=0){t();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,t()},r)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};Ih.SUBMENU_DELAY=120;var Lv=Ih;function Th(e){return C0(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(mc(e)||Bu(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||mc(e)&&typeof e.checked=="function"?!0:Bu(e)?e.submenu.some(Th):!1}var bf=class{};bf.DELAY=300,bf.MAX_DISTANCE=10;function Iv(e){return new Promise((t,r)=>{const n=Zd(e);n||t(!1);let a=n;const i=setTimeout(()=>{s.abort(),t(Av(a,n)<bf.MAX_DISTANCE)},bf.DELAY),s=new AbortController,u=s.signal;for(const d of["pointermove","pointerup","pointercancel"])window.addEventListener(d,h=>{if(h.type==="pointerup"||h.type==="pointercancel")clearTimeout(i),s.abort(),t(!1);else if(h.type==="pointermove"){const v=Zd(h);v&&(a=v)}},{passive:!0,signal:u})})}function Bh(e,t,r){return Zc(this,null,function*(){if(e.type==="contextmenu"){const n=e;if(r.show({target:t,location:Zd(n),modifiers:Yc(n)}))return e.preventDefault(),e.stopPropagation(),!0}if(e.type==="keydown"){const n=e;if(n.code==="ContextMenu"||n.code==="F10"&&n.shiftKey){const a=t==null?void 0:t.getBoundingClientRect();if(a&&r.show({target:t,location:{x:Math.ceil(a.left+a.width/2),y:Math.ceil(a.top+a.height/2)},modifiers:Yc(n)}))return e.preventDefault(),e.stopPropagation(),!0}}if(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0){let n=e.target;for(;n&&t!==n;)n=n.parentNode;if(!n||!r.visible)return!1;const a=Zd(e);if(yield Iv(e))return r.state!=="closed"?!1:(r.show({target:t,location:a}),!0)}return!1})}var Ph={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};re(Object.keys(Ph),"{body:auto}",{createAtom:e=>new pu(p(C({},e),{body:ke(e.args[0]),accentChar:Ph[e.command.slice(1)]}))}),re(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{const t=je(ke(e.args[0]));return new pu(p(C({},e),{body:ke(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}}),re(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new pu(p(C({},e),{body:ke(e.args[0]),svgAccent:"overarc"}))}),re(["underarc","underparen"],"{body:auto}",{createAtom:e=>new Ma(p(C({},e),{body:ke(e.args[0]),svgBelow:"underarc"}))}),re("utilde","{body:auto}",{createAtom:e=>{const t=ke(e.args[0]),r=je(t),n="widetilde"+(r.length>5?"4":["1","1","2","2","3","3"][r.length]);return new Ma(p(C({},e),{body:t,svgBelow:n,boxType:pl(t)}))}}),re("^","{:string}",{createAtom:e=>{var t;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}))}}),re("`","{:string}",{createAtom:e=>{var t;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}))}}),re("'","{:string}",{createAtom:e=>{var t;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"'"}))}}),re('"',"{:string}",{createAtom:e=>{var t,r;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[e.args[0]])!=null?r:'"'+e.args[0]:'"'}))}}),re(".","{:string}",{createAtom:e=>{var t,r;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[e.args[0]])!=null?r:"."+e.args[0]:"."}))}}),re("=","{:string}",{createAtom:e=>{var t,r;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[e.args[0]])!=null?r:"="+e.args[0]:"="}))}}),re("~","{:string}",{createAtom:e=>{var t;return new De(p(C({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}))}}),re("c","{:string}",{createAtom:e=>{var t;return new De(p(C({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}))}}),re("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var t,r;const n=e.args,a={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(t=e.style)!=null?t:{}};if(n[1]){const s=n[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const u of s){const d=u.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(d)a.strokeWidth=d[1],a.strokeStyle=d[2],a.strokeColor=d[3];else{const h=u.match(/\s*([a-z]*)\s*=\s*"(.*)"/);h&&(h[1]==="mathbackground"?a.backgroundcolor=h[2]:h[1]==="mathcolor"?a.strokeColor=h[2]:h[1]==="padding"?a.padding=h[2]:h[1]==="shadow"&&(a.shadow=h[2]))}}a.strokeStyle==="dashed"?a.svgStrokeStyle="5,5":a.strokeStyle==="dotted"&&(a.svgStrokeStyle="1,5")}a.borderStyle=`${a.strokeWidth} ${a.strokeStyle} ${a.strokeColor}`;const i={};return((r=n[0])!=null?r:"").split(/[, ]/).filter(s=>s.length>0).forEach(s=>{i[s.toLowerCase()]=!0}),new ht(e.command,ke(n[2]),i,a)}}),re("cancel","{body:auto}",{createAtom:e=>{var t;return new ht(e.command,ke(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),re("bcancel","{body:auto}",{createAtom:e=>{var t;return new ht(e.command,ke(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),re("xcancel","{body:auto}",{createAtom:e=>{var t;return new ht(e.command,ke(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),re(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new Ma(p(C({},e),{body:ke((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}}),re("overbrace","{:auto}",{createAtom:e=>new Ma(p(C({},e),{body:ke(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))}),re(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new Ma(p(C({},e),{body:ke(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))}),re(["underbrace"],"{:auto}",{createAtom:e=>new Ma(p(C({},e),{body:ke(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))}),re(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,r,n,a,i;return new Ma(p(C({},e),{svgBody:e.command.slice(1),above:((r=ke((t=e.args)==null?void 0:t[1]))==null?void 0:r.length)===0?void 0:ke((n=e.args)==null?void 0:n[1]),below:(i=ke((a=e.args)==null?void 0:a[0]))!=null?i:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`}),re(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:e=>new Es(e.command.slice(1),p(C({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),re(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new Es({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],p(C({},e),{limits:"over-under",variant:"main"}))}),re(["lim","mod"],"",{ifMode:"math",createAtom:e=>new Es(e.command.slice(1),p(C({},e),{limits:"over-under",variant:"main"}))}),re(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new Es(e.command.slice(1),p(C({},e),{limits:"over-under",isFunction:!0,variant:"main"}))}),re(["ang"],"{:math}",{ifMode:"math",createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{const r=e.createBox(t),n=r.caret;r.caret=void 0;const a=new Je("\xB0",{style:p(C({},e.style),{variant:"normal",variantStyle:"up"})});return new Je([r,a],{type:"inner",isSelected:e.isSelected,caret:n})}}),re("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new gl(p(C({},e),{body:ke(e.args[1]),index:e.args[0]?ke(e.args[0]):void 0}))}),re(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{const t=C({},e),r=e.command,n=e.args;switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break;default:}switch(r){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new Wr(n[0]?ke(n[0]):[new Yl],n[1]?ke(n[1]):[new Yl],t)},serialize:(e,t)=>{const r=e.aboveToLatex(t),n=e.belowToLatex(t);return/^[0-9]$/.test(r)&&/^[0-9]$/.test(n)?`${e.command}${r}${n}`:Er(e.command,r,n)}}),re(["brace","brack"],"",{infix:!0,createAtom:e=>new Wr(ke(e.args[0]),ke(e.args[1]),p(C({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>Xt([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),re(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,r;const n=e.args;return e.command==="\\choose"&&(t="(",r=")"),new Wr(ke(n[0]),ke(n[1]),p(C({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:r}))},serialize:(e,t)=>Xt([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),re(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var t,r;const n=e.args;return new Wr(ke(n[0]),ke(n[1]),p(C({},e),{leftDelim:(t=n[2])!=null?t:".",rightDelim:(r=n[3])!=null?r:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`}),re("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new Wr(ke(e.args[0]),ke(e.args[1]),p(C({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),re(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new Hi({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[e.command.slice(1)],p(C({},e),{limits:"auto",variant:"main"}))}),re("smallint","",{ifMode:"math",createAtom:e=>new Es("\u222B",p(C({},e),{limits:"adjacent",variant:"main"}))});var $h={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};re(Object.keys($h),"",{ifMode:"math",createAtom:e=>{const t=e.command,r=$h[t.slice(1)];return new Hi(r,p(C({},e),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[r]}))}}),re(["Re","Im"],"",{ifMode:"math",createAtom:e=>new Es({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],p(C({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),re("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new he(p(C({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}}),re("the","{:value}",{createAtom:e=>new De(p(C({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var r;const n=new yr({parent:t},e.style);let a="";e.isSelected&&(a+=" ML__selected");const i=n.evaluate(e.args[0]);return new Je(((r=go(i))!=null?r:"").split("").map(s=>new Je(s,{type:"ord",classes:a,mode:e.mode,isSelected:e.isSelected,style:C({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:a}).wrap(n)},serialize:e=>{var t;return`\\the${(t=go(e.args[0]))!=null?t:"\\relax"}`}}),re("mathtip","{:auto}{:math}",{createAtom:e=>new Hl(p(C({},e),{body:ke(e.args[0]),tooltip:ke(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${De.serialize([e.tooltip],p(C({},t),{defaultMode:"math"}))}}`}),re("texttip","{:auto}{:text}",{createAtom:e=>new Hl(p(C({},e),{body:ke(e.args[0]),tooltip:ke(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${De.serialize([e.tooltip],p(C({},t),{defaultMode:"text"}))}}`}),re("error","{:math}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})}),re("ensuremath","{:math}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(p(C({},t),{defaultMode:"math"}))}}`}),re("color","{:value}",{applyStyle:(e,t,r)=>{var n,a;return{verbatimColor:(n=go(t[0]))!=null?n:void 0,color:r.toColor((a=t[0])!=null?a:{string:"red"})}}}),re("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,r)=>{var n,a;return{verbatimColor:(n=go(t[0]))!=null?n:void 0,color:r.toColor((a=t[0])!=null?a:{string:"red"})}}}),re("boxed","{content:math}",{createAtom:e=>new cc(p(C({},e),{body:ke(e.args[0]),framecolor:{string:"black"}}))}),re("colorbox","{:value}{:text*}",{applyStyle:(e,t,r)=>{var n,a;return{verbatimBackgroundColor:(n=go(t[0]))!=null?n:void 0,backgroundColor:r.toBackgroundColor((a=t[0])!=null?a:{string:"yellow"})}}}),re("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,r;return new cc(p(C({},e),{body:ke(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(r=e.args[1])!=null?r:{string:"yellow"}}))},serialize:(e,t)=>{var r,n;return t.skipStyles?e.bodyToLatex(p(C({},t),{defaultMode:"text"})):Er(e.command,(r=go(e.framecolor))!=null?r:"",(n=go(e.backgroundcolor))!=null?n:"",e.bodyToLatex(p(C({},t),{defaultMode:"text"})))}}),re("bbox","[:bbox]{body:auto}",{createAtom:e=>{var t;const r=e.args[0],n=ke(e.args[1]);return r?new cc(p(C({},e),{body:n,padding:r.padding,border:r.border,backgroundcolor:(t=r.backgroundcolor)!=null?t:void 0})):new cc(p(C({},e),{body:n}))},serialize:(e,t)=>{var r,n;if(t.skipStyles)return e.bodyToLatex(t);let a=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){const i=[];e.padding&&i.push((r=go(e.padding))!=null?r:""),e.border&&i.push(`border: ${e.border}`),e.backgroundcolor&&i.push((n=go(e.backgroundcolor))!=null?n:""),a+=`[${i.join(",")}]`}return Er(a,e.bodyToLatex(t))}}),re(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),render:(e,t)=>{const r=new yr({parent:t,mathstyle:e.command.slice(1)},e.style),n=De.createBox(r,e.body,{type:"lift"});return e.caret&&(n.caret=e.caret),e.bind(t,n)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${Xt([e.command,e.bodyToLatex(t)])}}`}),re(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:e=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[e]})}),re("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontSeries:(r=t[0])!=null?r:"auto"}}}),re("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontShape:(r=t[0])!=null?r:"auto"}}}),re("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontFamily:(r=t[0])!=null?r:"roman"}}}),re("selectfont","",{ifMode:"text",applyStyle:()=>({})}),re("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),re(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__boldsymbol"})}),re("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),re("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),re("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),re("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),re("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),re("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),re("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),re("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),re("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),re("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),re("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),re("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),re("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),re("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),re("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),re("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),re("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),re("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),re("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),re("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),re("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),re("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),re("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),re("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),re("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),re("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),re("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),re(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),re(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),re("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),re("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),re("mbox","{:text}",{ifMode:"math",createAtom:e=>new De(p(C({},e),{type:"mord",body:ke(e.args[0]),mode:"math"})),serialize:(e,t)=>Er("\\mbox",e.bodyToLatex(p(C({},t),{defaultMode:"text"})))}),re("text","{:text}",{ifMode:"math",applyMode:"text"}),re(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var r;return e.createBox(t,{classes:(r=e.args[0])!=null?r:""})}}),re(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.cssId=(r=e.args[0])!=null?r:"",n}}),re("htmlData","{data:string}{content:auto}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.htmlData=(r=e.args[0])!=null?r:"",n}}),re(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.htmlStyle=(r=e.args[0])!=null?r:"",n}}),re("em","{:rest}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})}),re("emph","{:auto}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});var Rh={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};re(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new it(p(C({},e),{delim:(t=e.args[0])!=null?t:".",size:Rh[e.command].size,delimType:Rh[e.command].mclass}))}}),re(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new Us(p(C({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),re(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new Us(p(C({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),re("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new De(e),render:(e,t)=>{let r=0;const n=t.mathstyle.id;(n===Cl||n===ko)&&(r=1),(n===ml||n===io)&&(r=2),(n===_s||n===oo)&&(r=3);const a=ke(e.args[r]);return De.createBox(t,a)},serialize:(e,t)=>`\\mathchoice{${De.serialize(e.args[0],t)}}{${De.serialize(e.args[1],t)}}{${De.serialize(e.args[2],t)}}{${De.serialize(e.args[3],t)}}`}),re("mathop","{:auto}",{createAtom:e=>new De(p(C({},e),{type:"mop",body:ke(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var r;let n=De.createBox(t,e.body);if(e.superscript||e.subscript){const a=(r=e.subsupPlacement)!=null?r:"auto";n=a==="over-under"||a==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return new Je(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[Er(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),Xt(r)}}),re(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new De(p(C({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:ke(e.args[0])}))}),re(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{const t=ke(e.args[0]).map(r=>{var n;return r.type!=="first"&&(r.type="mord",r.value=(n={"\u2217":"*","\u2212":"-"}[r.value])!=null?n:r.value,r.isFunction=!1,!r.style.variant&&!r.style.variantStyle&&(r.style.variant="main",r.style.variantStyle="up")),r});return new De(p(C({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var r;let n=De.createBox(t,e.body);if(e.superscript||e.subscript){const a=(r=e.subsupPlacement)!=null?r:"auto";n=a==="over-under"||a==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return e.caret&&(n.caret=e.caret),new Je(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[Er(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),Xt(r)}}),re(["char","unicode"],"{charcode:value}",{createAtom:e=>new De(p(C({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${go((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let r=t.evaluate(e.args[0]);return(!r||!("number"in r))&&(r={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(r.number),e.createBox(t)}}),re("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new De(e),render:(e,t)=>{var r,n,a;const i=new yr({parent:t,mathstyle:"textstyle"},e.style),s=i.toEm((r=e.args[0])!=null?r:{dimension:0}),u=i.toEm((n=e.args[1])!=null?n:{dimension:10}),d=i.toEm((a=e.args[2])!=null?a:{dimension:10}),h=new Je(null,{classes:"rule",type:"ord"});return h.width=u,h.height=d+s,h.depth=-s,h.setStyle("border-right-width",u,"em"),h.setStyle("border-top-width",d,"em"),h.setStyle("border-color",e.style.color),h.setStyle("vertical-align",s,"em"),e.isSelected&&h.setStyle("opacity","50%"),e.bind(i,h),e.caret&&(h.caret=e.caret),h.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${go(e.args[0])}]`:""}{${go(e.args[1])}}{${go(e.args[2])}}`}),re(["overline","underline"],"{:auto}",{createAtom:e=>new De(p(C({},e),{body:ke(e.args[0])})),render:(e,t)=>{const r=e.command.substring(1),n=new yr({parent:t,mathstyle:"cramp"},e.style),a=De.createBox(n,e.body);if(!a)return null;const i=n.metrics.defaultRuleThickness/n.scalingFactor,s=new Je(null,{classes:r+"-line"});s.height=i,s.maxFontSize=i*1.125*n.scalingFactor;let u;return r==="overline"?u=new _a({shift:0,children:[{box:a},3*i,{box:s},i]}):u=new _a({top:a.height,children:[i,{box:s},3*i,{box:a}]}),e.caret&&(u.caret=e.caret),new Je(u,{classes:r,type:"ignore"})}}),re("overset","{:auto}{base:auto}",{createAtom:e=>{const t=ke(e.args[1]);return new Ma(p(C({},e),{above:ke(e.args[0]),body:t,skipBoundary:!1,boxType:pl(t)}))},serialize:(e,t)=>Er(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),re("underset","{:auto}{base:auto}",{createAtom:e=>{const t=ke(e.args[1]);return new Ma(p(C({},e),{below:ke(e.args[0]),body:t,skipBoundary:!1,boxType:pl(t)}))},serialize:(e,t)=>Er(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),re("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{const t=ke(e.args[2]);return new Ma(p(C({},e),{above:ke(e.args[0]),below:ke(e.args[1]),body:t,skipBoundary:!1,boxType:pl(t)}))},serialize:(e,t)=>Er(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),re(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new Ma(p(C({},e),{body:ke(e.args[2]),above:ke(e.args[1]),below:ke(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>Er(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),re("smash","[:string]{:auto}",{createAtom:e=>{var t,r,n,a;return new Ao(p(C({},e),{body:ke(e.args[1]),smashHeight:(r=(t=e.args[0])==null?void 0:t.includes("t"))!=null?r:!0,smashDepth:(a=(n=e.args[0])==null?void 0:n.includes("b"))!=null?a:!0}))}}),re(["vphantom"],"{:auto}",{createAtom:e=>new Ao(p(C({},e),{body:ke(e.args[0]),isInvisible:!0,smashWidth:!0}))}),re(["hphantom"],"{:auto}",{createAtom:e=>new Ao(p(C({},e),{body:ke(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),re(["phantom"],"{:auto}",{createAtom:e=>new Ao(p(C({},e),{body:ke(e.args[0]),isInvisible:!0}))}),re("not","{:math}",{createAtom:e=>{const t=ke(e.args[0]);return t.length===0?new De(p(C({},e),{type:"mrel",value:"\uE020"})):new De(p(C({},e),{body:[new xn(p(C({},e),{body:"\uE020",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{const r=e.args[0],n=r&&typeof r=="object"&&"group"in r;return e.value!=="\uE020"?n?`\\not{${De.serialize(r.group,t)}}`:`\\not${De.serialize(r,t)}`:n?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);const n=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":pl(ke(e.args[0])),a=De.createBox(t,e.body,{type:n});return e.caret&&(a.caret=e.caret),e.bind(t,a)}}),re(["ne","neq"],"",{createAtom:e=>new De(p(C({},e),{type:"mrel",body:[new xn(p(C({},e),{body:"\uE020",align:"right",boxType:"rel"})),new De(p(C({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command}),re("rlap","{:auto}",{createAtom:e=>new xn(p(C({},e),{body:ke(e.args[0]),align:"right"}))}),re("llap","{:auto}",{createAtom:e=>new xn(p(C({},e),{body:ke(e.args[0]),align:"left"}))}),re("mathrlap","{:math}",{createAtom:e=>new xn(p(C({},e),{body:ke(e.args[0]),align:"left"}))}),re("mathllap","{:math}",{createAtom:e=>new xn(p(C({},e),{body:ke(e.args[0]),align:"left"}))}),re("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new cc(p(C({},e),{body:ke(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return Er("\\raisebox",(r=go(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),re("raise","{:value}{:auto}",{createAtom:e=>{var t;return new cc(p(C({},e),{body:ke(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return Er("\\raise",(r=go(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),re("lower","{:value}{:auto}",{createAtom:e=>{var t;return new cc(p(C({},e),{body:ke(e.args[1]),padding:{dimension:0},offset:(t=ar(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r,n;return Er("\\lower",(n=go(ar((r=e.offset)!=null?r:{dimension:0},-1)))!=null?n:"0pt",e.bodyToLatex(t))}}),Me("0123456789/@.?!"),ct(65,90),ct(97,122),Me([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Me([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Me([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]),Me([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel"),Me([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]),Me([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]),Me([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams"),Me([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin"),Me([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams"),Me([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]),Me([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel"),Me([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Me([["\\wp",8472],["\\aleph",8501]]),Me([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams"),Me([["\\ ",160],["~",160]],"space"),re(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new Us(e)}),re("space","",{createAtom:e=>new Us(e)}),Me([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Me([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Me([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var Nh="<mo>⁡</mo>",yf="<mo>⁢</mo>";function xf(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function oi(e,t){return!e||!t.generateID?"":` extid="${e}"`}function Tv(e,t,r){var n,a,i,s,u,d,h,v,k,I,z;let W=!1;t=t!=null?t:e.atoms.length;let ye="",lt="",pe=e.atoms[e.index];const ze=(a=(n=pe.style)==null?void 0:n.variant)!=null?a:"",pt=(s=(i=pe.style)==null?void 0:i.variantStyle)!=null?s:"";let Ve="";if(ze||pt){const mr=xt(pe.value,(u=pe.style)==null?void 0:u.variant,(d=pe.style)==null?void 0:d.variantStyle);if(mr!==pe.value)return e.index+=1,ye=`<mi${oi(pe.id,r)}>${mr}</mi>`,Tc(ye,e,r)||(e.mathML+=ye,e.lastType="mi"),!0;Ve=(h={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[pt+ze])!=null?h:"",Ve=` mathvariant="${Ve}"`}const Vt={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(pe.command==="!")return e.index+=1,ye="<mo>!</mo>",Tc(ye,e,r)||(e.mathML+=ye,e.lastType="mo"),!0;if(Vt[pe.command]){e.index+=1;let mr=`<mi${oi(pe.id,r)}${Ve}>${Vt[pe.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(mr=yf+mr),Tc(mr,e,r)||(e.mathML+=mr,e.lastType="mi"),!0}if(pe.command==="\\operatorname")lt=$u(pe.body),e.index+=1;else if(ze||pt)for(;e.index<t&&(pe.type==="mord"||pe.type==="macro")&&!pe.isDigit()&&ze===((k=(v=pe.style)==null?void 0:v.variant)!=null?k:"")&&pt===((z=(I=pe.style)==null?void 0:I.variantStyle)!=null?z:"");)lt+=$u([pe]),e.index+=1,pe=e.atoms[e.index];else(pe.type==="mord"||pe.type==="macro")&&!pe.isDigit()&&(lt+=$u([pe]),e.index+=1);if(lt.length>0){W=!0,ye=`<mi${Ve}>${lt}</mi>`;const mr=e.lastType;ye.endsWith(">f</mi>")||ye.endsWith(">g</mi>")?(ye+=Nh,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(ye)?"mo":"mi",Tc(ye,e,r)||((mr==="mi"||mr==="mn"||mr==="mtext"||mr==="fence")&&(ye=yf+ye),e.mathML+=ye)}return W}function Bv(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup"}function Pv(e){let t=-1,r=e.index,n=!1,a=!1;for(;r<e.atoms.length&&!n&&!a;){const i=e.atoms[r];n=!i.isDigit(),a=!n&&i.superscript!==void 0,r++}return a&&(t=r-1),t}function Tc(e,t,r){var n;let a=t.atoms[t.index-1];if(!a)return!1;if(!a.superscript&&!a.subscript)if(((n=t.atoms[t.index])==null?void 0:n.type)==="subsup")a=t.atoms[t.index],t.index+=1;else return!1;const i=t.lastType;t.lastType="";const s=Ca(a.superscript,r);t.lastType="";const u=Ca(a.subscript,r);if(t.lastType=i,!s&&!u)return!1;let d="";return s&&u?d=`<msubsup>${e}${u}${s}</msubsup>`:s?d=`<msup>${e}${s}</msup>`:u&&(d=`<msub>${e}${u}</msub>`),t.mathML+=d,t.lastType="",!0}function $v(e,t,r){t=t!=null?t:e.atoms.length;const n=e.index;let a="";for(;e.index<t&&e.atoms[e.index].mode==="text";)a+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return a.length>0?(e.mathML+=`<mtext ${oi(e.atoms[n].id,r)}>${a}</mtext>`,e.lastType="mtext",!0):!1}function Rv(e,t,r){t=t!=null?t:e.atoms.length;const n=e.index;let a="",i=Pv(e);for(i>=0&&i<t&&(t=i);e.index<t&&e.atoms[e.index].isDigit();)a+=e.atoms[e.index].asDigit(),e.index+=1;return a.length<=0?!1:(a="<mn"+oi(e.atoms[n].id,r)+">"+a+"</mn>",i<0&&Bv(e)&&(i=e.index,e.index+=1),Tc(a,e,r)||(e.mathML+=a,e.lastType="mn"),!0)}function Nv(e,t,r){let n=!1;t=t!=null?t:e.atoms.length;let a="",i="";if(e.index<t&&e.atoms[e.index].type==="mopen"){let s=!1,u=0;const d=e.index;let h=-1,v=d+1;for(;v<t&&!s;)e.atoms[v].type==="mopen"?u+=1:e.atoms[v].type==="mclose"&&(u-=1),u===-1&&(s=!0,h=v),v+=1;s&&(a="<mrow>",a+=su(e.atoms[d],r),a+=Ca(e.atoms,r,d+1,h),a+=su(e.atoms[h],r),a+="</mrow>",e.index=h+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=yf),Tc(a,e,r)&&(n=!0,e.lastType="",a=""),i="fence")}return a.length>0&&(n=!0,e.mathML+=a,e.lastType=i),n}function Ov(e,t,r){let n=!1;t=t!=null?t:e.atoms.length;let a="",i="";const s=e.atoms[e.index];if(!s)return!1;const u={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(u[s.command]){e.index+=1;const d=`<mo${oi(s.id,r)}>${u[s.command]}</mo>`;return Tc(d,e,r)||(e.mathML+=d,e.lastType="mo"),!0}if(e.index<t&&(s.type==="mbin"||s.type==="mrel"))a+=A0(e.atoms[e.index],r),e.index+=1,i="mo";else if(e.index<t&&(s.type==="mop"||s.type==="operator"||s.type==="extensible-symbol")){if(s.subsupPlacement==="over-under"&&(s.superscript||s.subscript)){const d=su(s,r);return s.superscript&&s.subscript?(a+="<munderover>"+d,a+=Ca(s.subscript,r),a+=Ca(s.superscript,r),a+="</munderover>"):s.superscript?(a+="<mover>"+d,a+=Ca(s.superscript,r),a+="</mover>"):s.subscript&&(a+="<munder>"+d,a+=Ca(s.subscript,r),a+="</munder>"),e.mathML+=a,e.lastType="mo",e.index+=1,!0}{const d=e.atoms[e.index],h=d.value==="\\operatorname",v=h?'<mi class="MathML-Unit"'+oi(d.id,r)+">"+$u(d.value)+"</mi>":su(d,r);a+=v,!h&&!/^<mo>(.*)<\/mo>$/.test(v)?(a+=Nh,i="applyfunction"):i=h?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(a)&&(a=yf+a),e.index+=1}return a.length>0&&(n=!0,Tc(a,e,r)||(e.mathML+=a,e.lastType=i)),n}function Ca(e,t,r,n){t!=null||(t={});const a={atoms:[],index:r!=null?r:0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")a.mathML=e.toString();else if(typeof e=="string")a.mathML=e;else if(e instanceof De)a.mathML=A0(e,t);else if(Array.isArray(e)){a.atoms=e;let i=0;for(n=n||(e?e.length:0);a.index<n;)if($v(a,n,t)||Rv(a,n,t)||Tv(a,n,t)||Ov(a,n,t)||Nv(a,n,t))i+=1;else if(a.index<n){let s=A0(a.atoms[a.index],t);a.lastType==="mn"&&s.length>0&&a.atoms[a.index].type==="genfrac"&&(s="<mo>⁤</mo>"+s),a.atoms[a.index].type==="genfrac"?a.lastType="mfrac":a.lastType="",a.index+=1,Tc(s,a,t)?i+=1:s.length>0&&(a.mathML+=s,i+=1)}i>1&&(a.mathML="<mrow>"+a.mathML+"</mrow>")}return a.mathML}function su(e,t){let r="";const n=$u(e.value);return n&&(r="<mo"+oi(e.id,t)+">"+n+"</mo>"),r}function $u(e){if(!e)return"";if(typeof e=="string")return xf(e);if(!Array.isArray(e)&&typeof e.body=="string")return xf(e.body);let t="";for(const r of e)typeof r.value=="string"&&(t+=r.value);return xf(t)}function A0(e,t){var r,n,a,i,s,u,d,h,v,k,I,z,W,ye,lt,pe,ze,pt,Ve,Vt,mr,or;if(e.mode==="text")return`<mi${oi(e.id,t)}>${e.value}</mi>`;const Kn={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},ei={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let yt="",Tl="",gc,Zl,as,Bl,ol,si;const{command:yo}=e;if(e.command==="\\error")return`<merror${oi(e.id,t)}>${Ca(e.body,t)}</merror>`;const is={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},bc={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"group":case"root":yt=Ca(e.body,t);break;case"array":if((e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(yt+="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(yt+="<mo>"+(is[e.leftDelim]||e.leftDelim)+"</mo>")),yt+="<mtable",e.colFormat){for(yt+=' columnalign="',as=0;as<e.colFormat.length;as++)e.colFormat[as].align&&(yt+={l:"left",c:"center",r:"right"}[e.colFormat[as].align]+" ");yt+='"'}for(yt+=">",Zl=0;Zl<e.array.length;Zl++){for(yt+="<mtr>",gc=0;gc<e.array[Zl].length;gc++)yt+="<mtd>"+Ca(e.array[Zl][gc],t)+"</mtd>";yt+="</mtr>"}yt+="</mtable>",(e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(e.rightDelim&&e.rightDelim!=="."&&(yt+="<mo>"+(is[e.leftDelim]||e.rightDelim)+"</mo>"),yt+="</mrow>");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(yt+="<mrow>"),e.leftDelim&&e.leftDelim!=="."&&(yt+="<mo"+oi(e.id,t)+">"+(is[e.leftDelim]||e.leftDelim)+"</mo>"),e.hasBarLine?(yt+="<mfrac>",yt+=Ca(e.above,t)||"<mi> </mi>",yt+=Ca(e.below,t)||"<mi> </mi>",yt+="</mfrac>"):(yt+="<mtable"+oi(e.id,t)+">",yt+="<mtr>"+Ca(e.above,t)+"</mtr>",yt+="<mtr>"+Ca(e.below,t)+"</mtr>",yt+="</mtable>"),e.rightDelim&&e.rightDelim!=="."&&(yt+="<mo"+oi(e.id,t)+">"+(is[e.rightDelim]||e.rightDelim)+"</mo>"),(e.leftDelim||e.rightDelim)&&(yt+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(yt+="<msqrt"+oi(e.id,t)+">",yt+=Ca(e.body,t),yt+="</msqrt>"):(yt+="<mroot"+oi(e.id,t)+">",yt+=Ca(e.body,t),yt+=Ca(e.above,t),yt+="</mroot>");break;case"leftright":const yc=e,xc=yc.leftDelim;yt="<mrow>",xc&&xc!=="."&&(yt+=`<mo${oi(e.id,t)}>${(r=is[xc])!=null?r:xc}</mo>`),e.body&&(yt+=Ca(e.body,t));const wc=yc.matchingRightDelim();wc&&wc!=="."&&(yt+=`<mo${oi(e.id,t)}>${(n=is[wc])!=null?n:wc}</mo>`),yt+="</mrow>";break;case"sizeddelim":case"delim":yt+=`<mo${oi(e.id,t)}>${is[e.value]||e.value}</mo>`;break;case"accent":yt+='<mover accent="true"'+oi(e.id,t)+">",yt+=Ca(e.body,t),yt+="<mo>"+(bc[yo]||e.accent)+"</mo>",yt+="</mover>";break;case"line":case"overlap":break;case"overunder":ol=e.above,Bl=e.below,(e.svgAbove||ol)&&(e.svgBelow||Bl)?si=e.body:ol&&ol.length>0?(si=e.body,(i=(a=e.body)==null?void 0:a[0])!=null&&i.below?(Bl=e.body[0].below,si=e.body[0].body):((u=(s=e.body)==null?void 0:s[0])==null?void 0:u.type)==="first"&&((h=(d=e.body)==null?void 0:d[1])!=null&&h.below)&&(Bl=e.body[1].below,si=e.body[1].body)):Bl&&Bl.length>0&&(si=e.body,(k=(v=e.body)==null?void 0:v[0])!=null&&k.above?(ol=e.body[0].above,si=e.body[0].body):((z=(I=e.body)==null?void 0:I[0])==null?void 0:z.type)==="first"&&((ye=(W=e.body)==null?void 0:W[1])!=null&&ye.above)&&(ol=e.body[1].overscript,si=e.body[1].body)),(e.svgAbove||ol)&&(e.svgBelow||Bl)?(yt+=`<munderover ${oi(e.id,t)}>`,yt+=(lt=Kn[e.svgBody])!=null?lt:Ca(si,t),yt+=(pe=Kn[e.svgBelow])!=null?pe:Ca(Bl,t),yt+=(ze=Kn[e.svgAbove])!=null?ze:Ca(ol,t),yt+="</munderover>"):e.svgAbove||ol?(yt+=`<mover ${oi(e.id,t)}>`+((pt=Kn[e.svgBody])!=null?pt:Ca(si,t)),yt+=(Ve=Kn[e.svgAbove])!=null?Ve:Ca(ol,t),yt+="</mover>"):(e.svgBelow||Bl)&&(yt+=`<munder ${oi(e.id,t)}>`+((Vt=Kn[e.svgBody])!=null?Vt:Ca(si,t)),yt+=(mr=Kn[e.svgBelow])!=null?mr:Ca(Bl,t),yt+="</munder>");break;case"placeholder":yt+="?";break;case"mord":{yt=typeof e.value=="string"?e.value:yo,yo==="\\char"?yt="&#x"+("000000"+e.args[0].number.toString(16)).slice(-4)+";":yt.length>0&&yt.startsWith("\\")&&(typeof e.value=="string"&&e.value.charCodeAt(0)>255?yt="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"?yt=e.value.charAt(0):(console.error("Did not expect this"),yt=""));const tc=/\d/.test(yt)?"mn":"mi";yt=`<${tc}${oi(e.id,t)}>${xf(yt)}</${tc}>`;break}case"mbin":case"mrel":case"minner":yt=su(e,t);break;case"mpunct":yt='<mo separator="true"'+oi(e.id,t)+">"+yo+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.body!=="\u200B"&&(yt="<mo"+oi(e.id,t)+">",yt+=yo==="\\operatorname"?e.body:yo||e.body,yt+="</mo>");break;case"box":yt='<menclose notation="box"',e.backgroundcolor&&(yt+=' mathbackground="'+e.backgroundcolor+'"'),yt+=oi(e.id,t)+">"+Ca(e.body,t)+"</menclose>";break;case"spacing":yt+='<mspace width="'+((or=ei[yo])!=null?or:0)+'em"/>';break;case"enclose":yt='<menclose notation="';for(const tc in e.notation)Object.prototype.hasOwnProperty.call(e.notation,tc)&&e.notation[tc]&&(yt+=Tl+tc,Tl=" ");yt+=oi(e.id,t)+'">'+Ca(e.body,t)+"</menclose>";break;case"prompt":yt='<menclose notation="roundexbox""">'+Ca(e.body,t)+"</menclose>";break;case"space":yt+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":yt+=su(e,t);break;case"mclose":yt+=su(e,t);break;case"macro":{const tc=e.command+$u(e.macroArgs);tc&&(yt+=`<mo ${oi(e.id,t)}>${tc}</mo>`)}break;case"latexgroup":yt+=Ca(e.body,t);break;case"latex":yt+="<mtext"+oi(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":yt+=Ca(e.body,t);break;case"text":yt+=`<mtext ${oi(e.id,t)}x>${e.value}</mtext>`;break;default:if(e.command==="\\displaystyle")return`<mrow ${oi(e.id,t)} displaystyle="true">${Ca(e.body,t)}</mrow>`;if(e.command==="\\textstyle")return`<mrow ${oi(e.id,t)} displaystyle="false">${Ca(e.body,t)}</mrow>`;console.info("Unexpected element in conversion to MathML:",e)}return yt}var Ru={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},D0={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Fv(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function ud(e){let t=0;if(T(e))for(const r of e)r.type!=="first"&&(t+=1);return t===1}function zv(e){if(T(e)){for(const t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function Oh(e){let t="";if(T(e))for(const r of e)r.type!=="first"&&typeof r.value=="string"&&(t+=r.value);return t}function Kv(e){return e?e.map(t=>t.value).join(""):""}function Tn(e,t){var r,n,a,i,s;function u(v){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(v)?` <say-as interpret-as="character">${v}</say-as>`:/[A-Z]/.test(v)?`capital <say-as interpret-as="character">${v.toLowerCase()}</say-as>`:v:/[a-z]/.test(v)?" '"+v.toUpperCase()+"'":/[A-Z]/.test(v)?" 'capital "+v.toUpperCase()+"'":v}function d(v){return"<emphasis>"+v+"</emphasis>"}if(!t)return"";let h="";if(T(t)){let v=!1,k=!1;for(let I=0;I<t.length;I++)t[I].type!=="first"&&(t[I].mode!=="text"&&(k=!1),I<t.length-2&&t[I].type==="mopen"&&t[I+2].type==="mclose"&&t[I+1].type==="mord"?(h+=" of ",h+=d(Tn(e,t[I+1])),I+=2):t[I].mode==="text"?k?h+=(r=t[I].value)!=null?r:" ":(k=!0,h+=Tn("text",t[I])):t[I].isDigit()?v?h+=t[I].asDigit():(v=!0,h+=Tn(e,t[I])):(v=!1,h+=Tn(e,t[I])))}else if(t.mode==="text")t.id&&e==="math"&&(h+='<mark name="'+t.id.toString()+'"/>'),h+=t.value;else{t.id&&e==="math"&&(h+='<mark name="'+t.id.toString()+'"/>');let v="",k="",I="",z=!1;const{command:W}=t;switch(W){case"\\vec":return"vector "+Tn(e,t.body);case"\\acute":return Tn(e,t.body)+" acute";case"\\grave":return Tn(e,t.body)+" grave";case"\\dot":return"dot over"+Tn(e,t.body);case"\\ddot":return"double dot over"+Tn(e,t.body);case"\\mathring":return"ring over"+Tn(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+Tn(e,t.body);case"\\bar":return Tn(e,t.body)+" bar";case"\\breve":return Tn(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Tn(e,t.body);case"\\hat":case"\\widehat":return"hat over"+Tn(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Tn(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+Tn(e,t.body)}switch(t.type){case"prompt":const ye=t.body.length>1?'start input . <break time="500ms"/> '+Tn(e,t.body)+'. <break time="500ms"/> end input':"blank";h+=' <break time="300ms"/> '+ye+'. <break time="700ms"/>'+((n=t.correctness)!=null?n:"")+' . <break time="700ms"/> ';break;case"array":const lt=t.array,pe=t.environmentName;if(Object.keys(D0).includes(pe)){h+=` begin ${D0[pe]} `;for(let Ve=0;Ve<lt.length;Ve++){Ve>0&&(h+=","),h+=` row ${Ve+1} `;for(let Vt=0;Vt<lt[Ve].length;Vt++)Vt>0&&(h+=","),h+=` column ${Vt+1}: `,h+=Tn("math",lt[Ve][Vt])}h+=` end ${D0[pe]} `}break;case"group":W==="\\ne"?h+=" not equal ":(W==="\\not"&&(h+=" not "),h+=Tn("math",t.body));break;case"root":h+=Tn("math",t.body);break;case"genfrac":if(v=Tn("math",t.above),k=Tn("math",t.below),ud(t.above)&&ud(t.below)){const Vt={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[Oh(t.above)+"/"+Oh(t.below)];Vt?h=Vt:h+=v+" over "+k}else h+=' the fraction <break time="150ms"/>'+v+' over <break time="150ms"/>'+k+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(I=Tn("math",t.body),t.hasEmptyBranch("above"))h+=ud(t.body)?" the square root of "+I+" , ":' the square root of <break time="200ms"/>'+I+'. <break time="200ms"/> End square root';else{let Ve=Tn("math",t.above);Ve=Ve.trim();const Vt=Ve.replace(/<mark([^/]*)\/>/g,"");Vt==="3"?h+=' the cube root of <break time="200ms"/>'+I+'. <break time="200ms"/> End cube root':Vt==="n"?h+=' the nth root of <break time="200ms"/>'+I+'. <break time="200ms"/> End root':h+=' the root with index: <break time="200ms"/>'+Ve+', of <break time="200ms"/>'+I+'. <break time="200ms"/> End root'}break;case"leftright":{const Ve=t;h+=(a=Ve.leftDelim?Ru[Ve.leftDelim]:void 0)!=null?a:Ve.leftDelim,h+=Tn("math",t.body),h+=(i=Ve.rightDelim?Ru[Ve.rightDelim]:void 0)!=null?i:Ve.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const ze=W.replace(/^\\/g,""),pt=Rt()[ze];pt&&(pt!=null&&pt.expand?h+=Tn("math",t.body):h+=`${ze} `);break;case"placeholder":h+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(W==="\\mathbin"||W==="\\mathrel"||W==="\\mathopen"||W==="\\mathclose"||W==="\\mathpunct"||W==="\\mathord"||W==="\\mathinner"){h=Tn(e,t.body);break}let Ve=t.isDigit()?t.asDigit():t.value,Vt=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(Vt=t.value,Ve=Vt),e==="text")h+=Ve;else{if(t.type==="mbin"&&(h+='<break time="150ms"/>'),Ve){const mr=Ru[Ve]||(Vt?Ru[Vt.trim()]:"");if(mr)h+=" "+mr;else{const or=Vt?Fv(Vt.trim()):"";h+=or||u(Ve)}}else h+=Tn("math",t.body);t.type==="mbin"&&(h+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(t.value!=="\u200B"){const Ve=t.command;if(Ve==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let Vt=Tn("math",t.superscript);Vt=Vt.trim();let mr=Tn("math",t.subscript);mr=mr.trim(),h+=' the summation from <break time="200ms"/>'+mr+'<break time="200ms"/> to <break time="200ms"/>'+Vt+'<break time="200ms"/> of <break time="150ms"/>',z=!0}else if(t.hasEmptyBranch("subscript"))h+=" the summation of";else{let Vt=Tn("math",t.subscript);Vt=Vt.trim(),h+=' the summation from <break time="200ms"/>'+Vt+'<break time="200ms"/> of <break time="150ms"/>',z=!0}else if(Ve==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let Vt=Tn("math",t.superscript);Vt=Vt.trim();let mr=Tn("math",t.subscript);mr=mr.trim(),h+=' the product from <break time="200ms"/>'+mr+'<break time="200ms"/> to <break time="200ms"/>'+Vt+'<break time="200ms"/> of <break time="150ms"/>',z=!0}else if(t.hasEmptyBranch("subscript"))h+=" the product of ";else{let Vt=Tn("math",t.subscript);Vt=Vt.trim(),h+=' the product from <break time="200ms"/>'+Vt+'<break time="200ms"/> of <break time="150ms"/>',z=!0}else if(Ve==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let Vt=Tn("math",t.superscript);Vt=Vt.trim();let mr=Tn("math",t.subscript);mr=mr.trim(),h+=' the integral from <break time="200ms"/>'+d(mr)+'<break time="200ms"/> to <break time="200ms"/>'+d(Vt)+' <break time="200ms"/> of ',z=!0}else h+=' the integral of <break time="200ms"/> ';else if(typeof t.value=="string"){const Vt=(s=Ru[t.value])!=null?s:t.command?Ru[t.command]:void 0;h+=Vt||" "+t.value}else t.command&&(t.command==="\\mathop"?h+=Tn("math",t.body):t.command==="\\operatorname"?h+=Kv(t.body):h+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":I=Tn("math",t.body),h+=" crossed out "+I+". End crossed out.";break;case"space":case"spacing":break}if(!z&&!t.hasEmptyBranch("superscript")){let ye=Tn(e,t.superscript);ye=ye.trim();const lt=ye.replace(/<[^>]*>/g,"");if(ud(t.superscript)){if(e==="math"){const pe=zv(t.superscript);pe&&(h+='<mark name="'+pe+'"/>')}lt==="\u2032"?h+=" prime ":lt==="2"?h+=" squared ":lt==="3"?h+=" cubed ":Number.isNaN(Number.parseInt(lt))?h+=" to the "+ye+"; ":h+=' to the <say-as interpret-as="ordinal">'+lt+"</say-as> power; "}else Number.isNaN(Number.parseInt(lt))?h+=" raised to the "+ye+"; ":h+=' raised to the <say-as interpret-as="ordinal">'+lt+"</say-as> power; "}if(!z&&!t.hasEmptyBranch("subscript")){let ye=Tn("math",t.subscript);ye=ye.trim(),h+=ud(t.subscript)?" sub "+ye:" subscript "+ye+". End subscript. "}}return h}function Nu(e){var t,r;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const a=Ca(e);if(a){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(t=window.MathfieldElement.textToSpeechRulesOptions)!=null?t:{},window.MathfieldElement.textToSpeechRulesOptions=p(C({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=p(C({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=p(C({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const i=(r=window.SRE)!=null?r:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&i.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let s="";try{s=i.toSpeech(a)}catch(u){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",u)}return s}return""}let n=Tn("math",e);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let a="";window.MathfieldElement.speechEngineRate&&(a='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),n='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+a+"<p><s>"+n+"</s></p>"+(a?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&H()==="macos"?n=n.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):n=n.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return n}var dd={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},fd={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Hv(e){let t="";for(const r of e){const n=t[t.length-1];n!==void 0&&/\d/.test(n)&&/^\d/.test(r)&&(t+=" "),t+=r}return t}function bo(e){var t,r,n,a,i,s,u,d,h,v,k,I,z;if(!e)return"";if(T(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(bo).join("");if(e[0].mode==="text"){let pt=0,Ve="";for(;((t=e[pt])==null?void 0:t.mode)==="text";)Ve+=e[pt].body?bo(e[pt].body):e[pt].value,pt++;return`"${Ve}" ${bo(e.slice(pt))}`}let pe=0;const ze=[];for(;e[pe]&&e[pe].mode==="math";){let pt="";for(;e[pe]&&e[pe].type==="mord"&&/\d/.test(e[pe].value);)pt+=e[pe++].value;pt?ze.push(pt):ze.push(bo(e[pe++]))}return ze.push(bo(e.slice(pe))),Hv(ze)}if(e.mode==="text")return`"${e.value}"`;let W="";const{command:ye}=e;let lt;if(ye==="\\placeholder")return`(${bo(e.body)})`;switch(e.type){case"accent":const pe={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[ye];W=`${pe!=null?pe:""} ${bo(e.body)} `;break;case"first":return"";case"latexgroup":return e.body.map(or=>or.value).join("");case"group":case"root":W=(r=dd[ye])!=null?r:bo(e.body);break;case"genfrac":{const or=e;(or.leftDelim||or.rightDelim)&&(W=or.leftDelim==="."||!or.leftDelim?"{:":or.leftDelim),or.hasBarLine?(W+="(",W+=bo(or.above),W+=")/(",W+=bo(or.below),W+=")"):(W+="("+bo(or.above)+"),",W+="("+bo(or.below)+")"),(or.leftDelim||or.rightDelim)&&(W+=or.rightDelim==="."||!or.rightDelim?"{:":or.rightDelim)}break;case"surd":W+=e.hasEmptyBranch("above")?"sqrt("+bo(e.body)+")":"root("+bo(e.above)+")("+bo(e.body)+")";break;case"latex":W=e.value;break;case"leftright":{const or=e,Kn=or.leftDelim;W+=Kn==="."||!Kn?"{:":Kn,W+=bo(or.body);const ei=or.matchingRightDelim();W+=ei==="."||!ei?":}":ei}break;case"sizeddelim":case"delim":W=e.value;break;case"overlap":break;case"overunder":break;case"mord":W=(a=(n=dd[ye])!=null?n:ye)!=null?a:typeof e.value=="string"?e.value:"",W.startsWith("\\")&&(W+=" "),lt=ye?ye.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,lt?W=String.fromCodePoint(Number.parseInt("0x"+lt[1])):W.length>0&&W.startsWith("\\")&&(W=typeof e.value=="string"?e.value.charAt(0):e.command),W=Wv(W,e.style);break;case"mbin":case"mrel":case"minner":W=(s=(i=dd[ye])!=null?i:fd[ye])!=null?s:e.value;break;case"mopen":case"mclose":W=e.value;break;case"mpunct":W=(u=fd[ye])!=null?u:ye;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(fd[ye]?W=fd[ye]:W=ye==="\\operatorname"?bo(e.body):(d=e.value)!=null?d:ye,W+=" ");break;case"array":const ze=e.array,pt=e.environmentName,Ve=(h={bmatrix:["[","]"],"bmatrix*":["[","]"]}[pt])!=null?h:["(",")"],Vt=[];for(const or of ze){const Kn=[];for(const ei of or)Kn.push(Ve[0]+bo(ei)+Ve[1]);Vt.push(Kn.join(","))}const mr=(v={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[pt])!=null?v:["(",")"];W=mr[0]+Vt.join(",")+mr[1];break;case"box":break;case"spacing":W=(k=dd[ye])!=null?k:" ";break;case"enclose":W="("+bo(e.body)+")";break;case"space":W=" ";break;case"subsup":W="";break;case"macro":W=(z=(I=dd[ye])!=null?I:fd[ye])!=null?z:bo(e.body);break}if(!e.hasEmptyBranch("subscript")){W+="_";const pe=bo(e.subscript);W+=pe.length!==1?`(${pe})`:pe}if(!e.hasEmptyBranch("superscript")){W+="^";const pe=bo(e.superscript);W+=pe.length!==1?`(${pe})`:pe}return W}function Wv(e,t){if(!t)return e;let r=e;return t.variant==="double-struck"&&(r=`bbb "${r}"`),t.variant==="script"&&(r=`cc "${r}"`),t.variant==="fraktur"&&(r=`fr "${r}"`),t.variant==="sans-serif"&&(r=`sf "${r}"`),t.variant==="monospace"&&(r=`tt "${r}"`),t.variantStyle==="bold"&&(r=`bb "${r}"`),t.color?`color({${t.color}})(${r})`:r}function ns(e,t){var r,n;t!=null||(t={}),t.mathstyle=(r=t.mathstyle)!=null?r:"displaystyle";const a=new yr({from:p(C({},so()),{renderPlaceholder:()=>new Je(160,{maxFontSize:1}),letterShapeStyle:(n=t==null?void 0:t.letterShapeStyle)!=null?n:"tex"}),mathstyle:t.mathstyle}),s=new De({mode:"math",type:"root",body:E(e,{context:a,parseMode:"math",mathstyle:t.mathstyle})}).render(a);return s?(Nl(Ql(s,a)),ja(s,{classes:"ML__latex"}).toMarkup()):""}function Bg(e){return N(e,{context:so()})}function Zv(e,t={}){return Ca(E(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Vv(e){const t=E(e,{parseMode:"math",mathstyle:"displaystyle"});return Nu(t)}var wf;function Uv(e){var t,r;if(!wf){const n=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;n?wf=new n:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(r=wf==null?void 0:wf.box(e).latex)!=null?r:""}function Pg(e,t="math"){return bo(new De({type:"root",body:E(e,{parseMode:t})}))}function $g(e){return ac(e,{format:"ascii-math"})[1]}function L0(e){if(typeof e=="string"){const t=jv(e);if(!t)throw new Error(`Invalid color: ${e}`);return t}return"C"in e?qv(e):"a"in e?Fh(e):e}function Ou(e){return e<0?0:e>255?255:Math.round(e)}function jv(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&typeof t.a=="undefined"&&(t.a=1),t}function I0(e){const[t,r,n]=[e.L,e.C,e.H],a=n*Math.PI/180,i={L:t,a:r*Math.cos(a),b:r*Math.sin(a)};return e.alpha!==void 0&&(i.alpha=e.alpha),i}function Gv(e){const[t,r,n]=[e.L,e.a,e.b],a=Math.sqrt(r*r+n*n),s=Math.atan2(n,r)*180/Math.PI,u={L:t,C:a,H:s};return e.alpha!==void 0&&(u.alpha=e.alpha),u}function T0(e){const[t,r,n]=[e.L,e.a,e.b],a=Math.pow(.9999999984505198*t+.39633779217376786*r+.2158037580607588*n,3),i=Math.pow(1.00000000888176*t-.10556134232365635*r-.0638541747717059*n,3),s=Math.pow(t*1.000000054672411-.0894841820949657*r-1.2914855378640917*n,3),u=4.076741661347994*a-3.307711590408193*i+.230969928729428*s,d=-1.2684380040921763*a+2.6097574006633715*i-.3413193963102197*s,h=-.004196086541837188*a-.7034186144594493*i+1.7076147009309444*s,v=k=>{const I=Math.abs(k);return I<=.0031308?k*12.92:(Math.sign(k)||1)*(1.055*Math.pow(I,1/2.4)-.055)};return[v(u),v(d),v(h)]}function B0(e){const[t,r,n]=e;return t>=0&&t<=1&&r>=0&&r<=1&&n>=0&&n<=1}function P0(e,t){let[r,n,a]=e;return r=Ou(r*255),n=Ou(n*255),a=Ou(a*255),t!==void 0?{r,g:n,b:a,alpha:t}:{r,g:n,b:a}}function Fh(e){let[t,r,n]=T0(e);if(B0([t,r,n]))return P0([t,r,n],e.alpha);const a=Gv(e);if(a.C=0,[t,r,n]=T0(I0(a)),!B0([t,r,n]))return P0([t,r,n],e.alpha);let i=0,s=e.L,u=(i+s)/2;a.C=u;const d=.36/Math.pow(2,12);for(;s-i>d;)u=(i+s)/2,a.C=u,[t,r,n]=T0(I0(a)),B0([t,r,n])?i=u:s=u;return P0([t,r,n],e.alpha)}function qv(e){return Fh(I0(e))}function zh(e,t){const r=L0(e),n=L0(t),a=.56,i=.57,s=.62,u=.65,d=.022,h=1.414,v=.1,k=5e-4,I=1.14,z=.027,W=1.14,ye=.027;function lt(or){return or>=d?or:or+Sc(d-or,h)}function pe(or){return(or<0?-1:1)*Math.pow(Math.abs(or),2.4)}const ze=lt(pe(n.r/255)*.2126729+pe(n.g/255)*.7151522+pe(n.b/255)*.072175),pt=lt(pe(r.r/255)*.2126729+pe(r.g/255)*.7151522+pe(r.b/255)*.072175);let Ve,Vt,mr;return Math.abs(pt-ze)<k?Vt=0:pt>ze?(Ve=Sc(pt,a)-Sc(ze,i),Vt=Ve*I):(Ve=Sc(pt,u)-Sc(ze,s),Vt=Ve*W),Math.abs(Vt)<v?mr=0:Vt>0?mr=Vt-ye:mr=Vt+z,mr*100}function Kh(e,t,r){r!=null||(r="#fff"),t!=null||(t="#000");const n=zh(e,r),a=zh(e,t);return Math.abs(n)>Math.abs(a)?r:t}function Xv(e){const t=L0(e);let r=((1<<24)+(Ou(t.r)<<16)+(Ou(t.g)<<8)+Ou(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(r+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]&&r[6]===r[7]&&(r=r[0]+r[2]+r[4]+(t.alpha!==void 0&&t.alpha<1?r[6]:"")),"#"+r}function Bi(e){const t=Hh(e);let r="";for(const n of t){if(typeof n.value!="string")return"";r+=n.value}return r}function Hh(e){const r=e.model.selection.ranges;return r.length!==1?[]:e.model.getAtoms(r[0])}function Jv(e,t){const r=Hh(e);if(r.length!==1)return!1;const n=Ic[t];return n?!!n.test(r[0].value):!1}function Yv(e,t){return Bi(e).length>0}function Qv(e){return[$0(e,"double-struck","mathbb","tooltip.blackboard"),$0(e,"fraktur","mathfrak","tooltip.fraktur"),$0(e,"calligraphic","mathcal","tooltip.caligraphic"),R0(e,"up","mathrm","tooltip.roman-upright"),R0(e,"bold","mathbf","tooltip.bold"),R0(e,"italic","mathit","tooltip.italic")]}function eg(e){return[{label:()=>ns(`\\vec{${Bi(e)}}`),visible:()=>Bi(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>ns(`\\overrightarrow{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>ns(`\\overleftarrow{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>ns(`\\dot{${Bi(e)}}`),visible:()=>Bi(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>ns(`\\ddot{${Bi(e)}}`),visible:()=>Bi(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>ns(`\\bar{${Bi(e)}}`),visible:()=>Bi(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>ns(`\\overline{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>ns(`\\overgroup{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>ns(`\\overbrace{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>ns(`\\underline{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>ns(`\\undergroup{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>ns(`\\underbrace{${Bi(e)}}`),visible:()=>Bi(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function tg(e){return[{label:()=>ns(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>ns(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>ns(`\\bbox[5px, border: 2px dashed black]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function rg(e){const t=[];for(const r of Object.keys(ue))t.push({class:(Xv(Kh(ue[r]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${ue[r]} "></span>`,ariaLabel:()=>{var n;return(n=be(r))!=null?n:r},checked:()=>{var n;return{some:"mixed",all:!0}[(n=e.queryStyle({backgroundColor:r}))!=null?n:!1]},onMenuSelect:()=>{e.applyStyle({backgroundColor:r},{operation:"toggle"}),e.adoptStyle="none"}});return t}function ng(e){const t=[];for(const r of Object.keys(Y))t.push({class:(Kh(Y[r])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Y[r]} "></span>`,ariaLabel:()=>{var n;return(n=be(r))!=null?n:r},checked:()=>{var n;return{some:"mixed",all:!0}[(n=e.queryStyle({color:r}))!=null?n:!1]},onMenuSelect:()=>{e.applyStyle({color:r},{operation:"toggle"}),e.adoptStyle="none"}});return t}var ag=class extends Dh{constructor(e,t,r,n){super(e,t),this.row=r,this.col=n}set active(e){const t=this.parentMenu.children;if(e)for(const r of t)r.element.classList.toggle("active",r.row<=this.row&&r.col<=this.col);else for(const r of t)r.element.classList.remove("active")}};function ig(e){const t=[];for(let r=1;r<=5;r++)for(let n=1;n<=5;n++)t.push({onCreate:(a,i)=>new ag(a,i,r,n),label:"\u2610",tooltip:()=>be("tooltip.row-by-col",r,n),data:{row:r,col:n},onMenuSelect:()=>{e.insert(`\\begin{pmatrix}${Array(r).fill(Array(n).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return t}function og(e){return[{label:()=>be("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),visible:()=>lu(e)},{label:()=>be("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),visible:()=>lu(e)},{label:()=>be("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>lu(e),enabled:()=>{const t=e.model.parentEnvironment;if(!t)return!1;const[r,n]=lg(e);return r<t.maxColumns}},{label:()=>be("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),visible:()=>lu(e)},{type:"divider"},{label:()=>be("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),visible:()=>lu(e)},{label:()=>be("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),visible:()=>lu(e)},{type:"divider"},{label:()=>be("menu.borders"),visible:()=>(sg(e)||lu(e))&&e.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>hd(e,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>hd(e,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>hd(e,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>hd(e,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>hd(e,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>be("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:ig(e),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>be("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>be("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{ku(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>be("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{ku(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>be("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>be("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:Qv(e),submenuClass:"variant-submenu"},{label:()=>be("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:ng(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>be("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:rg(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>be("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:eg(e),submenuClass:"variant-submenu"},{label:()=>be("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&Bi(e).length>0,submenu:tg(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>be("menu.evaluate"),id:"ce-evaluate",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const t=cg(e);if(!t){e.model.announce("plonk");return}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert(`=${t}`,{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>be("menu.simplify"),id:"ce-simplify",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var t,r;if(e.model.selectionIsCollapsed){const n=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!n){e.model.announce("plonk");return}e.insert(`=${n.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const n=(r=window.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection)).simplify();if(!n){e.model.announce("plonk");return}e.insert(n.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var t;if(window.MathfieldElement.computeEngine===null)return"";const r=(t=e.expression)==null?void 0:t.unknowns[0];return r?be("menu.solve-for",ns(r)):be("menu.solve")},id:"ce-solve",visible:()=>{var t;return e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((t=e.expression)==null?void 0:t.unknowns.length)===1&&e.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var t;const r=e.expression,n=r==null?void 0:r.unknowns[0],a=(t=r.solve(n))==null?void 0:t.map(i=>{var s;return(s=i.simplify().latex)!=null?s:""});if(!a){e.model.announce("plonk");return}e.insert(`${n}=${a.length===1?a[0]:"\\left\\lbrace"+(a==null?void 0:a.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>be("menu.cut"),onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>be("menu.copy"),id:"copy",submenu:[{label:()=>be("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>ii.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>be("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>ii.copyToClipboard(e,"ascii-math")},{label:()=>be("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>ii.copyToClipboard(e,"math-ml")}]},{label:()=>be("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>be("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function lu(e){var t;return!!((t=e.model.parentEnvironment)!=null&&t.array)}function sg(e){return e.model.at(e.model.position).type==="array"}function lg(e){var t;const r=(t=e.model.parentEnvironment)==null?void 0:t.array;return r?[r.length,r.reduce((n,a)=>Math.max(n,a.length),0)]:[0,0]}function hd(e,t){jd(e),e.flushInlineShortcutBuffer(),sh(e.model,t),lo(e)}function cg(e){var t,r;let n;if(e.model.selectionIsCollapsed?n=(t=window.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):n=(r=window.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection),{canonical:!1}),!n)return"";let a=n.evaluate();return a.isSame(n)&&(a=n.N()),a.latex}function $0(e,t,r,n){return{label:()=>ns(`\\${r}{${Bi(e)}}`),tooltip:()=>{var a;return(a=be(n))!=null?a:n},visible:()=>Jv(e,t),checked:()=>{var a;return{some:"mixed",all:!0}[(a=e.queryStyle({variant:t}))!=null?a:!1]},onMenuSelect:()=>{e.applyStyle({variant:t},{operation:"toggle"}),e.adoptStyle="none"}}}function R0(e,t,r,n){return{label:()=>ns(`\\${r}{${Bi(e)}}`),tooltip:()=>{var a;return(a=be(n))!=null?a:n},visible:()=>Yv(e,t),checked:()=>{var a;return{some:"mixed",all:!0}[(a=e.queryStyle({variantStyle:t}))!=null?a:!1]},onMenuSelect:()=>{e.applyStyle({variantStyle:t},{operation:"toggle"}),e.adoptStyle="none"}}}function Fu(e,t){return e+Nu(t)}bl({speak:(e,t,r)=>ug(e,t,r)},{target:"mathfield"});function ug(e,t,r){var n,a;r=r!=null?r:{withHighlighting:!1};const{model:i}=e;function s(v){let k=null;switch(v){case"all":k=i.root;break;case"selection":k=i.getAtoms(i.selection);break;case"left":{k=i.getAtoms(i.offsetOf(i.at(i.position).leftSibling),i.position);break}case"right":{k=i.getAtoms(i.position,i.offsetOf(i.at(i.position).rightSibling));break}case"group":k=i.getAtoms(i.getSiblingsRange(i.position));break;case"parent":{const{parent:I}=i.at(i.position);I!=null&&I.parent?k=I:k=i.root;break}default:k=i.root}return k}function u(v){let k="";switch(v){case"all":console.log("Internal failure: speak all failed");break;case"selection":k="no selection";break;case"left":k="at start";break;case"right":k="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":k="no parent";break;default:console.log('unknown speak_ param value: "'+v+'"');break}return k}const d=s(t);if(d===null)return(a=(n=window.MathfieldElement).speakHook)==null||a.call(n,u(t)),!1;(r.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const h=Nu(d);return Ze()&&r.withHighlighting?(Wc().readAloudMathfield=e,Qc(e,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(e.field,h)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(h),!1}function dg(e){var t,r;if(!Ze()){console.log("Speak:",e);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const n=new SpeechSynthesisUtterance(e);window.speechSynthesis.speak(n)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"mp3",VoiceId:(t=window.MathfieldElement.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};n.synthesizeSpeech(a,(i,s)=>{if(i)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${i}`);else if(s!=null&&s.AudioStream){const u=new Uint8Array(s.AudioStream),d=new Blob([u.buffer],{type:"audio/mpeg"}),h=URL.createObjectURL(d);new Audio(h).play().catch(k=>console.log(k))}else console.log("polly.synthesizeSpeech():",s)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function Wh(e){var t;let r;if(e.parent.type==="prompt")e.parentBranch==="body"&&(r="prompt");else if(e.parentBranch==="body")r=e.type&&(t={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[e.type])!=null?t:"parent";else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(r="index"):e.parentBranch==="superscript"?r="superscript":e.parentBranch==="subscript"&&(r="subscript");return r||console.log("unknown relationship"),r!=null?r:"parent"}function fg(e,t,r,n){let a="";if(t==="plonk")window.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();else if(t==="delete")a=Fu("deleted: ",n);else if(t==="focus"||t.includes("move"))a=hg(e.model,r)+(e.model.selectionIsCollapsed?"":"selected: ")+pg(e.model);else if(t==="replacement")a=Fu("",e.model.at(e.model.position));else if(t==="line"){const i=Fu("",e.model.root);e.keyboardDelegate.setAriaLabel(i)}else a=n?Fu(t+" ",n):t;if(a){const i=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=a+i}}function hg(e,t){if(Number.isNaN(t))return"";const r=e.at(t);if(!r||r.treeDepth<=e.at(e.position).treeDepth)return"";let n="",a=r.parent;const i=e.at(e.position).parent;for(;a!==e.root&&a!==i;)n+=`out of ${Wh(a)};`,a=a.parent;return n}function pg(e){if(!e.selectionIsCollapsed)return Fu("",e.getAtoms(e.selection));let t="";const r=e.at(e.position),n=Wh(r);return r.isFirstSibling&&(t=(n?"start of "+n:"unknown")+": "),r.isLastSibling?r.isFirstSibling||(t+=n?"end of "+n:"unknown"):t+=Fu("",r),t}var mg=class{constructor(e,t,r){this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=r}dispose(){this.mathfield=void 0}getState(){const e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,t){var r;const n=this.silenceNotifications;this.silenceNotifications=(r=t==null?void 0:t.silenceNotifications)!=null?r:!0;let a={};if((t==null?void 0:t.type)==="undo"&&(a={inputType:"historyUndo"}),(t==null?void 0:t.type)==="redo"&&(a={inputType:"historyRedo"}),this.contentWillChange(a)){const i=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=js(e.content),this.selection=e.selection,this.silenceNotifications=i,this.contentDidChange(a)}this.silenceNotifications=n}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var r,n,a;const i=this.normalizeSelection(e,t);if(i===void 0)throw new TypeError("Invalid selection");if(i.ranges.length===1&&i.ranges[0][0]===i.ranges[0][1]){const v=i.ranges[0][0];if(!this.mathfield.dirty&&!((r=this.at(v))!=null&&r.parentPrompt)&&this.mathfield.hasEditablePrompts){if((n=this.at(v-1))!=null&&n.parentPrompt){this._anchor=this.normalizeOffset(v-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((a=this.at(v+1))!=null&&a.parentPrompt){this._anchor=this.normalizeOffset(v+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=v,this._position=v,this._selection=i;return}const s=fs(i);i.direction==="backward"?[this._position,this._anchor]=s:[this._anchor,this._position]=s;const u=this.at(s[0]+1),d=this.at(s[1]),h=De.commonAncestor(u,d);(h==null?void 0:h.type)==="array"&&u.parent===h&&d.parent===h?this._selection={ranges:[s],direction:i.direction}:this._selection={ranges:[s],direction:i.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(e){var t;const r=this.at(e);(r==null?void 0:r.type)==="placeholder"?this.setSelection(e-1,e):((t=r==null?void 0:r.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,r instanceof hr&&r.isSuggestion&&(r.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){const t=this.at(e),{parent:r}=t;if(!r)return[0,this.lastOffset];const n=t.parent.branch(t.parentBranch);return[this.offsetOf(n[0]),this.offsetOf(n[n.length-1])]}getBranchRange(e,t){const r=this.at(e).branch(t);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])]}getAtoms(e,t,r){let n=r!=null?r:{};if(Uc(e)){if(n=t!=null?t:{},e.ranges.length>1)return e.ranges.reduce((h,v)=>[...h,...this.getAtoms(v,n)],[]);e=e.ranges[0]}let a,i;if(nc(e)){if(a=e,!nc(t))return[];i=t}else[a,i]=e,n=t!=null?t:{};if(!Number.isFinite(a))return[];n.includeChildren===void 0&&(n.includeChildren=!1),a<0&&(a=this.lastOffset-a+1),i<0&&(i=this.lastOffset-i+1);const s=Math.min(a,i)+1,u=Math.max(a,i);if(!n.includeChildren&&s===1&&u===this.lastOffset)return[this.root];let d=[];for(let h=s;h<=u;h++){const v=this.atoms[h];Zh(this,v,s,u)&&d.push(v)}return n.includeChildren||(d=d.filter(h=>{let v=!1,{parent:k}=h;for(;k&&!v;)v=Zh(this,k,s,u),k=k.parent;return!v})),d}getAllAtoms(e=0){const t=[],r=this.lastOffset;for(let n=e;n<=r;n++)t.push(this.atoms[n]);for(let n=0;n<e;n++)t.push(this.atoms[n]);return t}findAtom(e,t=0,r="forward"){let n;const a=this.lastOffset;if(r==="forward"){for(let i=t;i<=a;i++)if(n=this.atoms[i],e(n))return n;for(let i=0;i<t;i++)if(n=this.atoms[i],e(n))return n;return}for(let i=t;i>=0;i--)if(n=this.atoms[i],e(n))return n;for(let i=a;i>t;i--)if(n=this.atoms[i],e(n))return n}extractAtoms(e){let t=this.getAtoms(e);if(t.length===1&&!t[0].parent)if(t[0].type==="root")t=[...t[0].body],t.shift();else return t=this.root.cells.flat(),this.root=new De({type:"root",body:[]}),t;for(const r of t)r.parent.removeChild(r);return t}deleteAtoms(e){this.extractAtoms(e),this.position=e[0]}atomToString(e,t){const r=t!=null?t:"latex";if(r.startsWith("latex"))return De.serialize([e],{expandMacro:r==="latex-expanded",skipStyles:r==="latex-unstyled",skipPlaceholders:r==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(r==="math-ml")return Ca(e);if(r==="spoken")return Nu(e);if(r==="spoken-text"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const a=Nu(e);return window.MathfieldElement.textToSpeechMarkup=n,a}if(r==="spoken-ssml"||r==="spoken-ssml-with-highlighting"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const a=Nu(e);return window.MathfieldElement.textToSpeechMarkup=n,a}return r==="ascii-math"?bo(e):(console.error(`MathLive 0.98.5: Unexpected format "${r}`),"")}getValue(e,t,r){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string"&&e!=="math-json")return this.atomToString(this.root,e);let n,a;if(nc(e)&&nc(t)?(n=[this.normalizeRange([e,t])],a=r):kc(e)?(n=[this.normalizeRange(e)],a=t):Uc(e)?(n=e.ranges,a=t):(n=[this.normalizeRange([0,-1])],a=e),a!=null||(a="latex"),a==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
|
|
|
Load the library, for example with:
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const i=this.getValue({ranges:n},"latex-unstyled");try{const s=window.MathfieldElement.computeEngine.parse(i);return JSON.stringify(s.json)}catch(s){return JSON.stringify(["Error",`'${s.toString()}'`])}}if(a.startsWith("latex")){const i={expandMacro:a==="latex-expanded",skipStyles:a==="latex-unstyled",skipPlaceholders:a==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return Xt(n.map(s=>De.serialize(this.getAtoms(s),i)))}return n.map(i=>this.getAtoms(i).map(s=>this.atomToString(s,a)).join("")).join("")}extendSelectionTo(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const r=this.normalizeRange([e,t]);let[n,a]=r,{parent:i}=this.at(a);if(i&&(i.type==="genfrac"||i.type==="subsup"))for(;i!==this.root&&N0(this,i,[n,a]);)a=this.offsetOf(i),i=i.parent;for(i=this.at(n).parent;i!==this.root&&N0(this,i,[n,a]);)n=this.offsetOf(i.leftSibling),i=i.parent;if(i=this.at(a).parent,(i==null?void 0:i.type)==="genfrac")for(;i!==this.root&&N0(this,i,[n,a]);)a=this.offsetOf(i),console.assert(a>=0),i=i.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[n,a]],direction:"none"}})}announce(e,t,r=[]){var n,a;((a=(n=this.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:r},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0)&&fg(this.mathfield,e,t,r)}deferNotifications(e,t){const r=this._selection,n=this._anchor,a=this._position,i=this.silenceNotifications;this.silenceNotifications=!0;const s=this.root.changeCounter;t();const u=this.root.changeCounter!==s,d=n!==this._anchor||a!==this._position||kf(this._selection,r)==="different";return this.silenceNotifications=i,e.content&&u&&this.contentDidChange({inputType:e.type}),e.selection&&d&&this.selectionDidChange(),u||d}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,r]=e;return t=this.normalizeOffset(t),r=this.normalizeOffset(r),t<r?[t,r]:[r,t]}normalizeSelection(e,t){var r;let n;if(nc(e)){const a=this.normalizeOffset(e);if(nc(t)){const i=this.normalizeOffset(t);n=a<=i?{ranges:[[a,i]],direction:"none"}:{ranges:[[i,a]],direction:"backward"}}else n={ranges:[[a,a]],direction:"none"}}else if(kc(e)){const a=this.normalizeOffset(e[0]),i=this.normalizeOffset(e[1]);n=a<=i?{ranges:[[a,i]],direction:"none"}:{ranges:[[i,a]],direction:"backward"}}else Uc(e)&&(n={ranges:e.ranges.map(a=>this.normalizeRange(a)),direction:(r=e.direction)!=null?r:"none"});return console.assert(n!==void 0),n}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}get cell(){var e;let t=this.at(this.position);if(t){for(;t&&((e=t.parent)==null?void 0:e.type)!=="array";)t=t.parent;if(!(!(t!=null&&t.parent)||t.parent.type!=="array"))return t.parentBranch}}contentWillChange(e={}){if(this.silenceNotifications||!this.mathfield)return!0;const t=this.silenceNotifications;this.silenceNotifications=!0;const r=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,r}contentDidChange(e){var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const r=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",p(C({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",bubbles:!0,composed:!0}))),this.silenceNotifications=r}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this.mathfield)),this.silenceNotifications))return;const e=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=e}};function Zh(e,t,r,n){const a=e.offsetOf(t);if(a<r||a>n)return!1;if(!t.hasChildren)return!0;const i=e.offsetOf(t.firstChild);if(i>=r&&i<=n){const s=e.offsetOf(t.lastChild);if(s>=r&&s<=n)return!0}return!1}function N0(e,t,r){if(!(t!=null&&t.hasChildren))return!1;const[n,a]=r,i=e.offsetOf(t.firstChild),s=e.offsetOf(t.lastChild);return i>=n&&i<=a&&s>=i&&s<=a}function pd(e,t,r,n){var a,i,s,u,d,h;const v=r.parent;if(v&&r instanceof Ti){const k=!n&&t==="forward"||n==="body"&&t==="backward";let I=k?e.offsetOf(r.firstChild):e.offsetOf(r.lastChild);return k?r.rightDelim!=="?"&&r.rightDelim!=="."?(r.leftDelim=".",r.isDirty=!0):(v.addChildrenAfter(r.removeBranch("body"),r),v.removeChild(r),I--):r.leftDelim!=="?"&&r.leftDelim!=="."?(r.rightDelim=".",r.isDirty=!0):(v.addChildrenAfter(r.removeBranch("body"),r),v.removeChild(r),I--),e.position=I,!0}if(v&&r.type==="surd"){if(t==="forward"&&!n||t==="backward"&&n==="body"){const k=r.leftSibling;r.hasChildren&&v.addChildrenAfter(r.removeBranch("body"),r),v.removeChild(r),e.position=e.offsetOf(k)}else t==="forward"&&n==="body"?e.position=e.offsetOf(r):!n&&t==="backward"?r.hasChildren?e.position=e.offsetOf(r.lastChild):(e.position=Math.max(0,e.offsetOf(r)-1),v.removeChild(r)):n==="above"&&(r.hasEmptyBranch("above")&&r.removeBranch("above"),t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r.body[0]));return!0}if(v&&(r.type==="box"||r.type==="enclose")){const k=n&&t==="backward"||!n&&t==="forward"?r.leftSibling:r.lastChild;return v.addChildrenAfter(r.removeBranch("body"),r),v.removeChild(r),e.position=e.offsetOf(k),!0}if(r.type==="genfrac"||r.type==="overunder"){if(!n)return r.type==="overunder"&&r.hasEmptyBranch("body")||r.type==="genfrac"&&r.hasEmptyBranch("below")&&r.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?r.firstChild:r.lastChild),!0);const k=md.fractionNavigationOrder==="numerator-denominator"?"above":"below",I=k==="above"?"below":"above";if(v&&(t==="forward"&&n===k||t==="backward"&&n===I)){const z=r.removeBranch(k),W=r.removeBranch(I);return v.addChildrenAfter([...z,...W],r),v.removeChild(r),e.position=e.offsetOf(z.length>0?z[z.length-1]:W[0]),!0}return t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r),!0}if(r.isExtensibleSymbol||r.type==="subsup"){if(!n&&t==="forward")return!1;if(!n){if(r.subscript||r.superscript){const k=t==="forward"?(s=(a=r.superscript)==null?void 0:a[0])!=null?s:(i=r.subscript)==null?void 0:i[0]:(h=(u=r.subscript)==null?void 0:u[0].lastSibling)!=null?h:(d=r.superscript)==null?void 0:d[0].lastSibling;return k&&(e.position=e.offsetOf(k)),!0}return!1}if(!r.hasChildren&&r.type==="subsup"){const k=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=k,!0}if(n==="superscript")if(t==="backward"){const k=e.offsetOf(r.firstChild)-1;console.assert(k>=0),e.position=k}else r.subscript?e.position=e.offsetOf(r.subscript[0]):e.position=e.offsetOf(r);else n==="subscript"&&(t==="backward"&&r.superscript?e.position=e.offsetOf(r.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(r.firstChild)-1:e.position=e.offsetOf(r));if(n&&r.hasEmptyBranch(n)&&(r.removeBranch(n),r.type==="subsup"&&!r.subscript&&!r.superscript)){const k=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);r.parent.removeChild(r),e.position=k}return!0}if((v==null?void 0:v.type)==="genfrac"&&!n&&r.type!=="first"){let k=e.offsetOf(r.leftSibling);return v.removeChild(r),v.hasEmptyBranch("above")&&v.hasEmptyBranch("below")?(k=e.offsetOf(v.leftSibling),v.parent.removeChild(v),e.announce("delete",void 0,[v]),e.position=k,!0):(e.announce("delete",void 0,[r]),e.position=k,!0)}if(t==="backward"&&((v==null?void 0:v.command)==="\\ln"||(v==null?void 0:v.command)==="\\log")&&r.parentBranch!=="body"){const k=e.offsetOf(v.leftSibling);return v.parent.removeChild(v),e.announce("delete",void 0,[v]),e.position=k,!0}return!1}function vg(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&pd(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(pd(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t])}}):vc(e,fs(e.selection),"deleteContentBackward")}function gg(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var t,r;let n=e.at(e.position).rightSibling;if(n&&pd(e,"forward",n))return;if(n){if(e.at(e.position).isLastSibling&&pd(e,"forward",n.parent,n.parentBranch))return}else{if(n=e.at(e.position),n.isLastSibling&&pd(e,"forward",n.parent,n.parentBranch))return;n=void 0}if(e.position===e.lastOffset||!n){e.announce("plonk");return}n.parent.removeChild(n);let a=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;(a==null?void 0:a.type)==="subsup";)a.parent.removeChild(a),a=(r=e.at(e.position))==null?void 0:r.rightSibling;e.announce("delete",void 0,[n])}):vc(e,fs(e.selection),"deleteContentForward")}function vc(e,t,r){const n=e.getAtoms(t);if(n.length>0&&n[0].parent){let a=n[0].parent.firstChild;a.type==="first"&&(a=a.rightSibling);const i=n[n.length-1].parent.lastChild;let s=n[0];s.type==="first"&&(s=s.rightSibling);const u=n[n.length-1];if(s===a&&u===i){const d=n[0].parent;d.parent&&d.type!=="prompt"&&(t=[e.offsetOf(d.leftSibling),e.offsetOf(d)])}if(n.length===1&&n[0].type==="placeholder"&&n[0].parent.type==="genfrac"){const d=n[0].parent,h=n[0].parentBranch==="below"?"above":"below",v=e.offsetOf(d.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:r},()=>{var k,I;const z=d.removeBranch(h);if(z.length===1&&z[0].type==="placeholder")(I=d.parent)==null||I.removeChild(d),e.position=Math.max(0,v);else{const W=d.parent.addChildrenAfter(z,d);(k=d.parent)==null||k.removeChild(d),e.position=e.offsetOf(W)}})}}return e.deferNotifications({content:!0,selection:!0,type:r},()=>e.deleteAtoms(t))}bl({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&vc(e,[0,-1],"deleteContent"),deleteForward:e=>gg(e),deleteBackward:e=>vg(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&vc(e,[e.anchor,f0(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&vc(e,[e.anchor,f0(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>e.contentWillChange({inputType:"deleteSoftLineBackward"})&&vc(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>e.contentWillChange({inputType:"deleteSoftLineForward"})&&vc(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&vc(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&vc(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var bg=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${be("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,yg=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${be("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,xg=class{constructor(e,t){this.focusBlurInProgress=!1;var r,n,a;this.options=C(p(C({},af()),{macros:Rt(),registers:Ki()}),nf(t)),this.eventController=new AbortController;const i=this.eventController.signal;t.eventSink&&(this.host=t.eventSink),this.element=e,e.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let s=(n=(r=t.value)!=null?r:this.element.textContent)!=null?n:"";s=s.trim();const u=ah(this.options),d=new De({type:"root",mode:u,body:E(s,{context:this.context})});this.model=new mg(this,u,d),this.undoManager=new Vm(this.model);const h=[];if(h.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),h.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),h.push("<span part=content class=ML__content>"),h.push(X0(this)),h.push("</span>"),window.mathVirtualKeyboard&&(h.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),h.push(bg),h.push("</div>")),h.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),h.push(yg),h.push("</div>"),h.push("</span>"),h.push("<span class=ML__sr-only>"),h.push("<span role=status aria-live=assertive aria-atomic=true></span>"),h.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(h.join("")),!this.element.children){console.error("%cMathLive 0.98.5: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=Oe.subscribe(()=>Oe.update(this.element)),Oe.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",k=>k.stopImmediatePropagation(),{capture:!1,signal:i}),this.field.addEventListener("wheel",this,{passive:!1,signal:i}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:i}):this.field.addEventListener("mousedown",this,{signal:i}),(a=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||a.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(pc(this)))},{signal:i}),this._menu=new Lv(og(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:i});const v=this.element.querySelector("[part=menu-toggle]");v==null||v.addEventListener("pointerdown",k=>{if(k.currentTarget!==v||this._menu.state!=="closed")return;this.element.classList.add("tracking");const I=v.getBoundingClientRect();this._menu.modifiers=Yc(k),this._menu.show({target:v,location:{x:I.left,y:I.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),k.preventDefault(),k.stopPropagation()},{signal:i}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(v.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Xp(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:i}),document.addEventListener("scroll",this,{signal:i}),this.resizeObserver=new ResizeObserver(()=>lo(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:i}),Qu&&!Oe.locale.startsWith(Qu.locale)&&Up(Oe.locale),Il!=="ready"&&document.fonts.ready.then(()=>Yd(this)),e.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(e){this._defaultStyle=e}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const e=this.model.at(this.model.position),t=this.adoptStyle==="right"?e.rightSibling:e;if(!t)return this.defaultStyle;if(t.type==="group"){const r=t.branch("body");return!r||r.length<2?{}:this.adoptStyle==="right"?r[1].computedStyle:r[r.length-1].computedStyle}return t.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this)),gf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,_0())}showMenu(e){var t,r;const n=(r=(t=e==null?void 0:e.location)!=null?t:du(this.field))!=null?r:void 0,a=e==null?void 0:e.modifiers,i=this.element.querySelector("[part=container]");return this._menu.show({target:i,location:n,modifiers:a})}get colorMap(){return e=>{var t,r,n;return(n=(r=(t=this.options).colorMap)==null?void 0:r.call(t,e))!=null?n:fr(e)}}get backgroundColorMap(){return e=>{var t,r,n,a,i,s;return(s=(i=(r=(t=this.options).backgroundColorMap)==null?void 0:r.call(t,e))!=null?i:(a=(n=this.options).colorMap)==null?void 0:a.call(n,e))!=null?s:Lt(e)}}get smartFence(){var e;return(e=this.options.smartFence)!=null?e:!1}get readOnly(){var e;return(e=this.options.readOnly)!=null?e:!1}get disabled(){var e,t;return(t=(e=this.host)==null?void 0:e.disabled)!=null?t:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const e=getComputedStyle(this.host);return e.getPropertyValue("user-select")||e.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(e=>e.type==="prompt"&&!e.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const e=this.model.at(this.model.anchor),t=this.model.at(this.model.position),r=De.commonAncestor(e,t);return!!((r==null?void 0:r.type)==="prompt"||r!=null&&r.parentPrompt)}get letterShapeStyle(){var e;return(e=this.options.letterShapeStyle)!=null?e:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const e=this.model.getAtoms(this.model.selection);if(e.length===0)return{};const t=C({},e[0].style);for(const r of e)for(const[n,a]of Object.entries(r.style))t[n]!==a&&delete t[n];return t}queryStyle(e){const t=b0(this,e);"verbatimColor"in t&&delete t.verbatimColor,"verbatimBackgroundColor"in t&&delete t.verbatimBackgroundColor;const r=Object.keys(t).length;if(r===0)return"all";if(r>1){for(const d of Object.keys(t)){const h=this.queryStyle({[d]:t[d]});if(h==="none")return"none";if(h==="some")return"some"}return"all"}const n=Object.keys(t)[0],a=t[n];if(this.model.selectionIsCollapsed)return this.effectiveStyle[n]===a?"all":"none";const i=this.model.getAtoms(this.model.selection,{includeChildren:!0});let s=i.length;if(s===0)return"none";let u=0;for(const d of i){if(d.type==="first"){s-=1;continue}d.style[n]===a&&(u+=1)}return u===0?"none":u===s?"all":"some"}get keybindings(){var e,t;if(this._keybindings)return this._keybindings;const[r,n]=tm(this.options.keybindings,(e=ed())!=null?e:jp());return((t=ed())==null?void 0:t.score)>0&&(this._keybindings=r,n.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",n)),r}get menu(){return this._menu}setOptions(e){var t;this.options=C(C({},this.options),nf(e)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let r=this.options.defaultMode;r==="inline-math"&&(r="math"),((t=this.model.root.firstChild)==null?void 0:t.mode)!==r&&(this.model.root.firstChild.mode=r),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const n=De.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==n)&&ii.insert(this.model,n,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in e||"macros"in e||"registers"in e||"colorMap"in e||"backgroundColorMap"in e||"letterShapeStyle"in e||"minFontScale"in e||"readOnly"in e||"placeholderSymbol"in e)&&lo(this)}getOptions(e){return tu(this.options,e)}getOption(e){return tu(this.options,e)}handleEvent(e){return Zc(this,null,function*(){var t;if(Ac(this)){if(l0(e)){if(!Uu(e.origin,(t=this.options.originValidator)!=null?t:"none"))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");const{action:r}=e.data;if(r==="execute-command"){const n=e.data.command;if(Du(n)==="virtual-keyboard")return;this.executeCommand(n)}else r==="update-state"||(r==="focus"?this.focus({preventScroll:!0}):r==="blur"&&this.blur());return}switch(e.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&yh(this,e);break;case"pointerdown":this.userSelect!=="none"&&(yh(this,e),e.shiftKey===!1&&(yield Bh(e,this.element.querySelector("[part=container]"),this._menu))&&hf.stop());break;case"contextmenu":this.userSelect!=="none"&&e.shiftKey===!1&&(yield Bh(e,this.element.querySelector("[part=container]"),this._menu))&&hf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&gf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Ac(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Ac(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}})}dispose(){if(!Ac(this))return;Oe.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const e=this.element;delete e.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,rv(),sm(),_v()}flushInlineShortcutBuffer(e){if(e!=null||(e={defer:!1}),!e.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(e){return Du(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(pc(this))),!1):pm(this,e)}get errors(){return N(this.model.getValue(),{context:this.context})}getValue(e,t,r){return this.model.getValue(e,t,r)}setValue(e,t){var r;t=t!=null?t:{mode:"math"},t.insertionMode===void 0&&(t.insertionMode="replaceAll"),(t.format===void 0||t.format==="auto")&&(t.format="latex"),(t.mode===void 0||t.mode==="auto")&&(t.mode=(r=Df(this.model,this.model.position))!=null?r:"math");const n=this.undoManager.canUndo();ii.insert(this.model,e,t)&&(lo(this),n||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const e=window.MathfieldElement.computeEngine;return e?e.box(e.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var e;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const n=window.mathVirtualKeyboard.boundingRect,a=this.host.getBoundingClientRect();a.bottom>n.top&&((e=window.document.scrollingElement)==null||e.scrollBy(0,a.bottom-n.top+8))}}this.dirty&&Qc(this,{interactive:!0});const t=this.field.getBoundingClientRect();let r=null;if(this.model.selectionIsCollapsed)r=du(this.field);else{const n=kd(this);if(n.length>0){let a=-1/0,i=-1/0;for(const s of n)s.right>a&&(a=s.right),s.top<i&&(i=s.top);r={x:a+t.left-this.field.scrollLeft,y:i+t.top-this.field.scrollTop,height:0}}}if(this.host&&r){const n=this.host.getBoundingClientRect(),a=r.y;let i=this.host.scrollTop;a<n.top?i=a-n.top+this.host.scrollTop:a>n.bottom&&(i=a-n.bottom+this.host.scrollTop+r.height),this.host.scroll({top:i,left:0})}if(r){const n=r.x-window.scrollX;let a=this.field.scrollLeft;n<t.left?a=n-t.left+this.field.scrollLeft-20:n>t.right&&(a=n-t.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:a})}}insert(e,t){return typeof e!="string"||e.length===0&&((t==null?void 0:t.insertionMode)==="insertBefore"||(t==null?void 0:t.insertionMode)==="insertAfter")||e.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),t=t!=null?t:{mode:"math"},t.focus&&this.focus(),t.feedback&&(window.MathfieldElement.keypressVibration&&Ue()&&navigator.vibrate(J0),window.MathfieldElement.playSound("keypress")),e==="\\\\"?ih(this.model):e==="&"?oh(this.model):this.model.selectionIsCollapsed?ii.insert(this.model,e,C({style:this.model.at(this.model.position).computedStyle},t)):ii.insert(this.model,e,t),this.snapshot(`insert-${this.model.at(this.model.position).type}`),lo(this),t.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(e,t="",r=""){var n;if(this.model.mode===e||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const a=this.model.mode;if(this.model.mode=e,!((n=this.host)!=null&&n.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=a;return}const i=this.model.mode,{model:s}=this;s.deferNotifications({content:!!r||!!t,selection:!0,type:"insertText"},()=>{let u=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),t&&e!=="latex"){const d=E(t,{context:this.context,parseMode:e});s.collapseSelection("forward");const h=s.at(s.position);s.position=s.offsetOf(h.parent.addChildrenAfter(d,h)),u=!0}if(this.model.mode=e,e==="latex"){let d=s.selectionIsCollapsed;ku(this,"accept");let h,v=s.at(s.position);if(d)h="\\";else{const I=fs(s.selection);h=this.model.getValue(I,"latex");const z=this.model.extractAtoms(I);z.length===1&&z[0].type==="placeholder"&&(h=t,d=!0),v=s.at(I[0])}const k=new yn(h);v.parent.addChildAfter(k,v),d?s.position=s.offsetOf(k.lastChild):s.setSelection(s.offsetOf(k.firstChild),s.offsetOf(k.lastChild))}else td(s).forEach(d=>{d.isError=!1});if(r){const d=E(r,{context:this.context,parseMode:i});s.collapseSelection("forward");const h=s.at(s.position);s.position=s.offsetOf(h.parent.addChildrenAfter(d,h)),u=!0}return lo(this),this.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),u}),this.model.mode=e,window.mathVirtualKeyboard.update(pc(this))}hasFocus(){return!this.blurred}focus(e){var t;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(t=e==null?void 0:e.preventScroll)!=null&&t||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(e,t={}){var r,n;const a={operation:"set",silenceNotifications:!1};kc(t)?a.range=t:(t.operation==="toggle"&&(a.operation="toggle"),a.range=t.range,a.silenceNotifications=(r=t.silenceNotifications)!=null?r:!1);const i=b0(this,e),s=(n=a.operation)!=null?n:"set";if(a.range===void 0&&this.model.selectionIsCollapsed){if(s==="set"){this.defaultStyle=C(C({},this.defaultStyle),i);return}const u=C({},this.defaultStyle);for(const d of Object.keys(i))u[d]===i[d]?(d==="color"&&delete u.verbatimColor,d==="backgroundColor"&&delete u.verbatimBackgroundColor,delete u[d]):u[d]=i[d];this.defaultStyle=u;return}this.model.deferNotifications({content:!a.silenceNotifications,type:"insertText"},()=>{if(a.range===void 0)for(const u of this.model.selection.ranges)u0(this.model,u,i,{operation:s});else u0(this.model,a.range,i,{operation:s})}),lo(this)}toggleContextMenu(){var e;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(e=this.getCaretPoint())!=null?e:void 0,onDismiss:()=>{var t;return(t=this.element)==null?void 0:t.focus()}}),!0):!1}getCaretPoint(){const e=du(this.field);return e?{x:e.x,y:e.y}:null}setCaretPoint(e,t){const r=cd(this,e,t,{bias:0});if(r<0)return!1;const n=this.model.position;return this.model.position=r,this.model.announce("move",n),lo(this),!0}getPrompt(e){const t=this.model.findAtom(r=>r.type==="prompt"&&r.placeholderId===e);return console.assert(t!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),t}getPromptValue(e,t){const r=this.getPrompt(e);if(!r)return"";const n=this.model.offsetOf(r.firstChild),a=this.model.offsetOf(r.lastChild);return this.model.getValue(n,a,t)}getPrompts(e){return this.model.getAllAtoms().filter(t=>t.type!=="prompt"?!1:e?!(e.id&&t.placeholderId!==e.id||e.locked&&t.locked!==e.locked||e.correctness==="undefined"&&t.correctness||e.correctness&&t.correctness!==e.correctness):!0).map(t=>t.placeholderId)}setPromptValue(e,t,r){if(t!==void 0){const n=this.getPrompt(e);if(!n){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}const a=this.model.getBranchRange(this.model.offsetOf(n),"body");this.model.setSelection(a),this.insert(t,p(C({},r),{insertionMode:"replaceSelection"}))}r!=null&&r.silenceNotifications&&(this.valueOnFocus=this.getValue()),lo(this)}setPromptState(e,t,r){const n=this.getPrompt(e);if(!n){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}t==="undefined"?n.correctness=void 0:typeof t=="string"&&(n.correctness=t),typeof r=="boolean"&&(n.locked=r,n.captureSelection=r),lo(this)}getPromptState(e){const t=this.getPrompt(e);return t?[t.correctness,t.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[void 0,!0])}getPromptRange(e){const t=this.getPrompt(e);return t?this.model.getBranchRange(this.model.offsetOf(t),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(e){var t;this.undoManager.snapshot(e)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this)),(t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var e;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var e;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var e;(e=this.undoManager)==null||e.reset()}onSelectionDidChange(){var e,t;const r=this.model;this.keyboardDelegate.setValue(r.getValue(this.model.selection,"latex-expanded"));{const n=r.at(r.position),a=(e=n.mode)!=null?e:ah(this.options);this.model.mode!==a&&(this.model.mode==="latex"?(ku(this,"accept",{mode:a}),r.position=r.offsetOf(n)):this.switchMode(a))}(t=this.host)==null||t.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(pc(this)),gf(this)}onContentWillChange(e){var t,r,n;return(n=(r=this.host)==null?void 0:r.dispatchEvent(new InputEvent("beforeinput",p(C({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?n:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),Qc(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var e,t,r;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Au(this),this.model.getValue()!==this.valueOnFocus&&((e=this.host)==null||e.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(t=this.host)==null||t.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(r=this.host)==null||r.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),lo(this),this.focusBlurInProgress=!1,_0();const n=new AbortController,a=n.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Ac(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:a})},{once:!0,signal:a}),setTimeout(()=>n.abort(),100)}onInput(e){m0(this,e)}onKeystroke(e){return vh(this,e)}onCompositionStart(e){this.model.deleteAtoms(fs(this.model.selection));const t=du(this.field);t&&requestAnimationFrame(()=>{Qc(this),this.keyboardDelegate.moveTo(t.x,t.y-t.height)})}onCompositionUpdate(e){Rm(this.model,e),lo(this)}onCompositionEnd(e){Nm(this.model),m0(this,e,{simulateKeystroke:!0})}onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),ii.onCopy(this,e),vc(this.model,fs(this.model.selection),"deleteByCut"),this.snapshot("cut"),lo(this))}onCopy(e){ii.onCopy(this,e)}onPaste(e){let t=this.isSelectionEditable;return t&&(t=ii.onPaste(this.model.at(this.model.position).mode,this,e.clipboardData)),t||this.model.announce("plonk"),e.preventDefault(),e.stopPropagation(),t}onGeometryChange(){this._menu.hide(),qd(this),gf(this)}onWheel(e){const t=5*e.deltaX;if(!Number.isFinite(t)||t===0)return;const r=this.field;t<0&&r.scrollLeft===0||t>0&&r.offsetWidth+r.scrollLeft>=r.scrollWidth||(r.scrollBy({top:0,left:t}),e.preventDefault(),e.stopPropagation())}getHTMLElement(e){let t=e;for(;!t.id&&t.hasChildren;)t=e.children[0];return this.field.querySelector(`[data-atom-id="${t.id}"]`)}get context(){var e,t;return{registers:(e=this.options.registers)!=null?e:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(t=this.options.placeholderSymbol)!=null?t:"\u25A2",colorMap:r=>this.colorMap(r),backgroundColorMap:r=>this.backgroundColorMap(r),getMacro:r=>_i(r,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function Vh(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(const t of e.children)Vh(t)}function O0(e,t){var r;e&&(!t||((r=e.dataset)==null?void 0:r.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&O0(n)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&O0(n,t)})))}function wg(e,t){var r;if(!Ze())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(t);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"json",VoiceId:(r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};Wc().readAloudElement=e,n.synthesizeSpeech(a,(i,s)=>{if(i){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${i}`);return}if(!(s!=null&&s.AudioStream)){console.log("polly.synthesizeSpeech():",s);return}const u=new TextDecoder("utf-8").decode(new Uint8Array(s.AudioStream));Wc().readAloudMarks=u.split(`
|
|
|
`).map(d=>d?JSON.parse(d):{}),Wc().readAloudTokens=[];for(const d of Wc().readAloudMarks)d.value&&Wc().readAloudTokens.push(d.value);Wc().readAloudCurrentMark="",a.OutputFormat="mp3",a.SpeechMarkTypes=[],n.synthesizeSpeech(a,(d,h)=>{if(d){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${t}") error:${d}`);return}if(!(h!=null&&h.AudioStream))return;const v=new Uint8Array(h.AudioStream),k=new Blob([v.buffer],{type:"audio/mpeg"}),I=URL.createObjectURL(k),z=Wc();z.readAloudAudio?z.readAloudAudio.pause():(z.readAloudAudio=new Audio,z.readAloudAudio.addEventListener("ended",()=>{const W=z.readAloudMathfield;z.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),W?(Qc(W),z.readAloudElement=null,z.readAloudMathfield=null,z.readAloudTokens=[],z.readAloudMarks=[],z.readAloudCurrentMark=""):Vh(z.readAloudElement)}),z.readAloudAudio.addEventListener("timeupdate",()=>{let W="";const ye=z.readAloudAudio.currentTime*1e3+100;for(const lt of z.readAloudMarks)lt.time<ye&&(W=lt.value);z.readAloudCurrentMark!==W&&(z.readAloudCurrentToken=W,W&&W===z.readAloudFinalToken?z.readAloudAudio.pause():(z.readAloudCurrentMark=W,O0(z.readAloudElement,z.readAloudCurrentMark)))})),z.readAloudAudio.src=I,z.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),z.readAloudAudio.play()})})}Ze()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var la=new WeakMap,Sg=.5,Hc={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},ps=class cu extends HTMLElement{static get formAssociated(){return zu()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(t){t!==this._fontsDirectory&&(this._fontsDirectory=t,um())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(t){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(t){this._soundsDirectory=t,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(t){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(t){var r,n,a;this.audioBuffers={},t===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof t=="string"?this._keypressSound={spacebar:t,return:t,delete:t,default:t}:typeof t=="object"&&"default"in t&&(this._keypressSound={spacebar:(r=t.spacebar)!=null?r:t.default,return:(n=t.return)!=null?n:t.default,delete:(a=t.delete)!=null?a:t.default,default:t.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(t){this.audioBuffers={},this._plonkSound=t}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(t){this._speechEngine=t}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(t){this._speechEngineRate=t}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(t){this._speechEngineVoice=t}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(t){this._textToSpeechMarkup=t}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(t){this._textToSpeechRules=t}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(t){this._textToSpeechRulesOptions=t}static get locale(){return Oe.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),Oe.locale=t}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(t){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Oe.strings}static set strings(t){Oe.merge(t)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(t){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(t){this._decimalSeparator=t,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(t){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var t,r;if(this._computeEngine===void 0){const n=(t=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;if(!n)return null;this._computeEngine=new n,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(r=this._computeEngine)!=null?r:null}static set computeEngine(t){this._computeEngine=t}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(t){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(t){this._isFunction=t}static loadSound(t){return Zc(this,null,function*(){delete this.audioBuffers[t];let r="";switch(t){case"keypress":r=this._keypressSound.default;break;case"return":r=this._keypressSound.return;break;case"spacebar":r=this._keypressSound.spacebar;break;case"delete":r=this._keypressSound.delete;break;case"plonk":r=this.plonkSound;break}if(typeof r!="string")return;r=r.trim();const n=this.soundsDirectory;if(!(n==null||n==="null"||r==="none"||r==="null"))try{const i=yield(yield fetch(yield q0(`${n}/${r}`))).arrayBuffer(),s=yield this.audioContext.decodeAudioData(i);this.audioBuffers[t]=s}catch(a){}})}static playSound(t){return Zc(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[t]||(yield this.loadSound(t)),!this.audioBuffers[t])return;const r=this.audioContext.createBufferSource();r.buffer=this.audioBuffers[t];const n=this.audioContext.createGain();n.gain.value=Sg,r.connect(n).connect(this.audioContext.destination),r.start()})}constructor(t){if(super(),t){const r=[];for(const n of Object.keys(t))if(Hc[n])if(Hc[n].startsWith("mf."))if(Hc[n].startsWith(`mf.${n}`))r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${Hc[n]}`);else{const a=Hc[n].match(/([a-zA-Z]+) =/);r.push(`Option \`${n}\` has been renamed \`${a[1]}\``)}else r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${Hc[n]}`);if(r.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const n of r)console.warn(n);console.groupEnd()}}if(zu()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[sc("core"),sc("mathfield"),sc("mathfield-element"),sc("ui"),sc("menu")],this.shadowRoot.appendChild(document.createElement("span"));const r=document.createElement("slot");r.style.display="none",this.shadowRoot.appendChild(r)}else this.shadowRoot.innerHTML="<style>"+Dc("core")+Dc("mathfield")+Dc("mathfield-element")+Dc("ui")+Dc("menu")+'</style><span></span><slot style="display:none"></slot>';t&&this._setOptions(t),this.shadowRoot.addEventListener("slotchange",()=>{var r;const n=this.shadowRoot.querySelector("slot:not([name])");this.value=(r=n==null?void 0:n.assignedNodes().map(a=>a.nodeType===3?a.textContent:"").join("").trim())!=null?r:""})}showMenu(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.showMenu(t))!=null?n:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",t=>{var r;t.target===this&&!((r=this._mathfield)!=null&&r.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,relatedTarget:t.relatedTarget,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}))},{once:!0})}getPromptValue(t,r){var n,a;return(a=(n=this._mathfield)==null?void 0:n.getPromptValue(t,r))!=null?a:""}setPromptValue(t,r,n){var a;(a=this._mathfield)==null||a.setPromptValue(t,r,n)}getPromptRange(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptRange(t))!=null?n:null}getPrompts(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPrompts(t))!=null?n:[]}get form(){var t;return(t=this._internals)==null?void 0:t.form}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}get type(){return this.localName}get mode(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.mode)!=null?r:this.defaultMode==="text"?"text":"math"}set mode(t){var r;(r=this._mathfield)==null||r.switchMode(t)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(t){var r,n;if(!this._mathfield)return;const a=(n=(r=cu.computeEngine)==null?void 0:r.box(t).latex)!=null?n:null;a!==null&&this._mathfield.setValue(a),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.errors)!=null?r:[]}_getOptions(t){return this._mathfield?tu(this._mathfield.options,t):la.has(this)?C({},tu(C(C({},af()),nf(la.get(this).options)),t)):null}getOptions(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?tu(this._mathfield.options,t):la.has(this)?tu(C(C({},af()),nf(la.get(this).options)),t):null}reflectAttributes(){const t=af(),r=this._getOptions();Object.keys(cu.optionsAttributes).forEach(n=>{const a=Bc(n);cu.optionsAttributes[n]==="on/off"?t[a]!==r[a]?this.setAttribute(n,r[a]?"on":"off"):this.removeAttribute(n):t[a]!==r[a]&&(cu.optionsAttributes[n]==="boolean"?r[a]?this.setAttribute(n,""):this.removeAttribute(n):(typeof r[a]=="string"||typeof r[a]=="number")&&this.setAttribute(n,r[a].toString()))})}getOption(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([t])[t]}_getOption(t){return this._getOptions([t])[t]}_setOptions(t){if(this._mathfield)this._mathfield.setOptions(t);else if(la.has(this)){const r=C(C({},la.get(this).options),t);la.set(this,p(C({},la.get(this)),{selection:{ranges:r.readOnly?[[0,0]]:[[0,-1]]},options:r}))}else la.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:t,menuItems:void 0});this.reflectAttributes()}setOptions(t){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const r of Object.keys(t))Hc[r]&&console.warn(`\`mf.setOptions({${r}:...})\` -> ${Hc[r]}`);console.groupEnd(),this._setOptions(t)}executeCommand(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.executeCommand(t))!=null?n:!1}getValue(t,r,n){var a,i;if(this._mathfield)return this._mathfield.model.getValue(t,r,n);if(la.has(this)){let s,u,d;if(Uc(t)?([s,u]=t.ranges[0],d=r):kc(t)?([s,u]=t,d=r):nc(t)&&nc(r)?(s=t,u=r,d=n):(s=0,u=-1,d=t),(d===void 0||d==="latex")&&s===0&&u===-1)return(i=(a=la.get(this).value)!=null?a:this.textContent)!=null?i:""}return""}setValue(t,r){if(this._mathfield&&t!==void 0){r!=null||(r={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(t,r);return}if(la.has(this)){const a=la.get(this).options;la.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:a,menuItems:void 0});return}const n=vd(this);la.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:n,menuItems:void 0})}hasFocus(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.hasFocus())!=null?r:!1}focus(){var t;(t=this._mathfield)==null||t.focus()}blur(){var t;(t=this._mathfield)==null||t.blur()}select(){var t;(t=this._mathfield)==null||t.select()}insert(t,r){var n,a;return(a=(n=this._mathfield)==null?void 0:n.insert(t,r))!=null?a:!1}applyStyle(t,r){var n;return(n=this._mathfield)==null?void 0:n.applyStyle(t,r)}queryStyle(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.queryStyle(t))!=null?n:"none"}get caretPoint(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.getCaretPoint())!=null?r:null}set caretPoint(t){var r;t&&((r=this._mathfield)==null||r.setCaretPoint(t.x,t.y))}setCaretPoint(t,r){var n,a;return(a=(n=this._mathfield)==null?void 0:n.setCaretPoint(t,r))!=null?a:!1}offsetFromPoint(t,r,n){return this._mathfield?cd(this._mathfield,t,r,n):-1}hitboxFromOffset(t){if(!this._mathfield)return null;const r=this._mathfield.model.at(t);if(!r)return null;const n=jc(this._mathfield,r);return n?new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top):null}resetUndo(){var t;(t=this._mathfield)==null||t.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(t){var r,n,a,i;dc.state==="closed"&&((n=(r=this._mathfield)==null?void 0:r.menu)==null?void 0:n.state)==="closed"&&(t.type==="pointerdown"&&this.onPointerDown(),t.type==="focus"&&((a=this._mathfield)==null||a.focus()),t.type==="blur"&&((i=this._mathfield)==null||i.blur()))}connectedCallback(){var t,r,n,a;const i=window.getComputedStyle(this),s=this.shadowRoot,u=i.userSelect!=="none";if(u)s.host.addEventListener("pointerdown",this,!0);else{const v=s.querySelector("span");v.style.pointerEvents="none"}s.host.addEventListener("focus",this,!0),s.host.addEventListener("blur",this,!0),zu()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),u&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const d=s.querySelector("slot:not([name])");if(d)try{this._style=d.assignedElements().filter(v=>v.tagName.toLowerCase()==="style").map(v=>v.textContent).join("")}catch(v){console.error(v)}if(this._style){const v=document.createElement("style");v.textContent=this._style,s.appendChild(v)}let h="";if(this.hasAttribute("value")?h=this.getAttribute("value"):h=(t=d==null?void 0:d.assignedNodes().map(v=>v.nodeType===3?v.textContent:"").join("").trim())!=null?t:"",this._mathfield=new xg(s.querySelector(":host > span"),p(C({},(n=(r=la.get(this))==null?void 0:r.options)!=null?n:vd(this)),{eventSink:this,value:h})),!la.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const v of Object.keys(cu.optionsAttributes))this.upgradeProperty(Bc(v))}if(!((a=this._mathfield)!=null&&a.model)){this._mathfield=null;return}if(la.has(this)){const v=this._mathfield,k=la.get(this),I=k.menuItems;v.model.deferNotifications({content:!1,selection:!1},()=>{const z=k.value;z!==void 0&&v.setValue(z),v.model.selection=k.selection,la.delete(this)}),I&&(this.menuItems=I)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Jd()}disconnectedCallback(){var t,r;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const n=tu(this._mathfield.options,Object.keys(cu.optionsAttributes).map(a=>Bc(a)));la.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(r=(t=this._mathfield.menu)==null?void 0:t.menuItems)!=null?r:void 0,options:n}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(t){if(this.hasOwnProperty(t)){const r=this[t];delete this[t],(t==="readonly"||t==="read-only")&&(t="readOnly"),this[t]=r}}attributeChangedCallback(t,r,n){if(r===n)return;const a=n!==null;switch(t){case"contenteditable":lo(this._mathfield);break;case"disabled":this.disabled=a;break;case"read-only":case"readonly":this.readOnly=a;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(t){const r=!!t;r?(this.setAttribute("readonly",""),zu()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(zu()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:r})}get disabled(){return this.hasAttribute("disabled")}set disabled(t){var r;const n=!!t;n?this.setAttribute("disabled",""):this.removeAttribute("disabled"),zu()?this._internals.ariaDisabled=n?"true":"false":this.setAttribute("aria-disabled",n?"true":"false"),n&&((r=this._mathfield)!=null&&r.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(t){this.setValue(t)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(t){this._setOptions({defaultMode:t})}get macros(){return this._getOption("macros")}set macros(t){this._setOptions({macros:t})}get registers(){const t=this;return new Proxy({},{get:(r,n)=>{if(typeof n=="string")return t._getOption("registers")[n]},set(r,n,a){return typeof n!="string"?!1:(t._setOptions({registers:p(C({},t._getOption("registers")),{[n]:a})}),!0)}})}set registers(t){this._setOptions({registers:t})}get colorMap(){return this._getOption("colorMap")}set colorMap(t){this._setOptions({colorMap:t})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(t){this._setOptions({backgroundColorMap:t})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(t){this._setOptions({letterShapeStyle:t})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(t){this._setOptions({minFontScale:t})}get smartMode(){return this._getOption("smartMode")}set smartMode(t){this._setOptions({smartMode:t})}get smartFence(){return this._getOption("smartFence")}set smartFence(t){this._setOptions({smartFence:t})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(t){this._setOptions({smartSuperscript:t})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(t){this._setOptions({scriptDepth:t})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(t){this._setOptions({removeExtraneousParentheses:t})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(t){this._setOptions({mathModeSpace:t})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(t){this._setOptions({placeholderSymbol:t})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(t){this._setOptions({popoverPolicy:t})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(t){this._setOptions({environmentPopoverPolicy:t})}get menuItems(){var t,r,n;return this._mathfield?(t=this._mathfield.menu._menuItems.map(a=>a.menuItem))!=null?t:[]:(n=(r=la.get(this))==null?void 0:r.menuItems)!=null?n:[]}set menuItems(t){var r;if(this._mathfield){const n=(r=this._mathfield.element)==null?void 0:r.querySelector("[part=menu-toggle]");n&&(n.style.display=t.length===0?"none":""),this._mathfield.menu.menuItems=t}la.has(this)?la.set(this,p(C({},la.get(this)),{menuItems:t})):la.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:vd(this),menuItems:t})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(t){this._setOptions({mathVirtualKeyboardPolicy:t})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(t){this._setOptions({inlineShortcuts:t})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(t){this._setOptions({inlineShortcutTimeout:t})}get keybindings(){return this._getOption("keybindings")}set keybindings(t){this._setOptions({keybindings:t})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(t){this._setOptions({onInlineShortcut:t})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(t){this._setOptions({onScrollIntoView:t})}get onExport(){return this._getOption("onExport")}set onExport(t){this._setOptions({onExport:t})}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOptions({readOnly:t})}get isSelectionEditable(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.isSelectionEditable)!=null?r:!1}setPromptState(t,r,n){var a;(a=this._mathfield)==null||a.setPromptState(t,r,n)}getPromptState(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptState(t))!=null?n:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(t){this._setOptions({virtualKeyboardTargetOrigin:t})}get selection(){return this._mathfield?this._mathfield.model.selection:la.has(this)?la.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(t){if(typeof t=="number"&&(t={ranges:[[t,t]]}),this._mathfield){this._mathfield.model.selection=t,lo(this._mathfield);return}if(la.has(this)){la.set(this,p(C({},la.get(this)),{selection:t}));return}la.set(this,{value:void 0,selection:t,options:vd(this),menuItems:void 0})}get selectionIsCollapsed(){const t=this.selection;return t.ranges.length===1&&t.ranges[0][0]===t.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:la.has(this)?la.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,lo(this._mathfield)),la.has(this)){la.set(this,p(C({},la.get(this)),{selection:{ranges:[[t,t]]}}));return}la.set(this,{value:void 0,selection:{ranges:[[t,t]]},options:vd(this),menuItems:void 0})}getOffsetDepth(t){var r,n;return this._mathfield?((n=(r=this._mathfield.model.at(t))==null?void 0:r.treeDepth)!=null?n:2)-2:0}get lastOffset(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.lastOffset)!=null?r:-1}};ps.version="0.98.5",ps._fontsDirectory="./fonts",ps._soundsDirectory="./sounds",ps.keypressVibration=!0,ps._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ps._plonkSound="plonk.wav",ps.audioBuffers={},ps.createHTML=e=>e,ps._speechEngineRate="100%",ps._speechEngineVoice="Joanna",ps._textToSpeechMarkup="",ps._textToSpeechRules="mathlive",ps._textToSpeechRulesOptions={},ps.speakHook=dg,ps.readAloudHook=wg,ps._decimalSeparator=".",ps.fractionNavigationOrder="numerator-denominator",ps._isFunction=e=>{var t,r;const n=window.MathfieldElement.computeEngine;return(r=(t=n==null?void 0:n.parse(e).domain)==null?void 0:t.isFunction)!=null?r:!1};var md=ps;function Bc(e){return e.replace(/[^a-zA-Z\d]+(.)/g,(t,r)=>r.toUpperCase())}function vd(e){const t={readOnly:!1},r=md.optionsAttributes;return Object.keys(r).forEach(n=>{if(e.hasAttribute(n)){const a=e.getAttribute(n);n==="placeholder"?t.contentPlaceholder=a!=null?a:"":r[n]==="boolean"?t[Bc(n)]=!0:r[n]==="on/off"?a==="on"?t[Bc(n)]=!0:a==="off"?t[Bc(n)]=!1:t[Bc(n)]=void 0:r[n]==="number"?t[Bc(n)]=Number.parseFloat(a!=null?a:"0"):t[Bc(n)]=a}}),t}function zu(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var Uh=md,jh,Gh,qh,Xh;if(Ze()&&!((jh=window.customElements)!=null&&jh.get("math-field"))){(qh=window[Gh=Symbol.for("io.cortexjs.mathlive")])!=null||(window[Gh]={});const e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.98.5",window.MathfieldElement=md,(Xh=window.customElements)==null||Xh.define("math-field",md)}function _g(e,t,r){let n=r,a=0;const i=e.length;for(;n<t.length;){const s=t[n];if(a<=0&&t.slice(n,n+i)===e)return n;s==="\\"?n++:s==="{"?a++:s==="}"&&a--,n++}return-1}function Sf(e,t,r,n,a="latex"){const i=[];for(const s of e)if(s.type==="text"){const u=s.data;let d=!0,h=0,v;v=u.indexOf(t),v!==-1&&(h=v,h>0&&i.push({type:"text",data:u.slice(0,h)}),d=!1);let k=!1;for(;!k;){if(d){if(v=u.indexOf(t,h),v===-1){k=!0;break}h!==v&&i.push({type:"text",data:u.slice(h,v)}),h=v}else{if(v=_g(r,u,h+t.length),v===-1){k=!0;break}let I=u.slice(h+t.length,v);a==="ascii-math"&&([,I]=ac(I,{format:"ascii-math"})),i.push({type:"math",data:I,rawData:u.slice(h,v+r.length),mathstyle:n}),h=v+r.length}d=!d}h<u.length&&i.push({type:"text",data:u.slice(h)})}else i.push(s);return i}function Jh(e,t,r){let n=[{type:"text",data:e}];return t!=null&&t.inline&&t.inline.forEach(([a,i])=>{n=Sf(n,a,i,"textstyle")}),t!=null&&t.display&&t.display.forEach(([a,i])=>{n=Sf(n,a,i,"displaystyle")}),r!=null&&r.inline&&r.inline.forEach(([a,i])=>{n=Sf(n,a,i,"textstyle","ascii-math")}),r!=null&&r.display&&r.display.forEach(([a,i])=>{n=Sf(n,a,i,"displaystyle","ascii-math")}),n}function Mg(e,t){const r=document.createElement("span");r.setAttribute("translate","no");try{const n="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";r.innerHTML=window.MathfieldElement.createHTML(n)}catch(n){console.error(`MathLive 0.98.5: Could not convert "${e}"' to MathML with ${n}`),r.textContent=e}return r.className="ML__sr-only",r}function Cg(e,t,r,n){try{const a=t.renderToMarkup(e,{mathstyle:r,format:"html"}),i=document.createElement("span");return i.dataset.latex=e,i.style.display=r==="displaystyle"?"flex":"inline-flex",i.setAttribute("aria-hidden","true"),i.setAttribute("translate","no"),i.innerHTML=window.MathfieldElement.createHTML(a),i}catch(a){if(console.error("Could not parse'"+e+"' with ",a),n)return document.createTextNode(e)}return null}function Ku(e,t,r,n){var a;const i=Cg(e,r,t||"textstyle",n),s=(a=r.renderAccessibleContent)!=null?a:"";if(i&&/\b(mathml|speakable-text)\b/i.test(s)){const u=document.createElement("span");if(/\bmathml\b/i.test(s)&&r.renderToMathML&&u.append(Mg(e,r)),/\bspeakable-text\b/i.test(s)&&r.renderToSpeakableText){const d=document.createElement("span");d.setAttribute("translate","no");const h=r.renderToSpeakableText(e);d.innerHTML=window.MathfieldElement.createHTML(h),d.className="ML__sr-only",u.append(d)}return u.append(i),u}return i}function Eg(e,t){var r,n,a;let i=null;if((r=t.TeX)!=null&&r.processEnvironments&&/^\s*\\begin/.test(e)){i=document.createDocumentFragment();const s=Ku(e,"",t,!0);s&&i.appendChild(s)}else{if(!e.trim())return null;const s=Jh(e,(n=t.TeX)==null?void 0:n.delimiters,(a=t.asciiMath)==null?void 0:a.delimiters);if(s.length===1&&s[0].type==="text")return null;i=document.createDocumentFragment();for(const u of s)if(u.type==="text")i.appendChild(document.createTextNode(u.data));else{const d=Ku(u.data,u.mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);d&&i.appendChild(d)}}return i}function Yh(e,t){var r,n,a,i,s,u,d,h,v,k,I,z,W,ye,lt,pe;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const ze=(r=e.childNodes[0].textContent)!=null?r:"";if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(ze)){e.textContent="";const Ve=Ku(ze,"",t,!0);Ve&&e.append(Ve);return}const pt=Jh(ze,(a=t.TeX)==null?void 0:a.delimiters,(i=t.asciiMath)==null?void 0:i.delimiters);if(pt.length===1&&pt[0].type==="math"){e.textContent="";const Ve=Ku(pt[0].data,pt[0].mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);Ve&&e.append(Ve);return}if(pt.length===1&&pt[0].type==="text")return}for(let ze=e.childNodes.length-1;ze>=0;ze--){const pt=e.childNodes[ze];if(pt.nodeType===3){const Ve=Eg((s=pt.textContent)!=null?s:"",t);Ve&&(ze+=Ve.childNodes.length-1,pt.replaceWith(Ve))}else if(pt.nodeType===1){const Ve=pt,Vt=pt.nodeName.toLowerCase();if(Vt==="script"){const mr=pt;let or;if((u=t.processScriptTypePattern)!=null&&u.test(mr.type))or=(d=mr.textContent)!=null?d:"";else if((h=t.processMathJSONScriptTypePattern)!=null&&h.test(mr.type))try{or=(k=t.serializeToLatex)==null?void 0:k.call(t,JSON.parse((v=mr.textContent)!=null?v:""))}catch(Kn){console.error(Kn)}if(or){let Kn="textstyle";for(const yt of mr.type.split(";")){const[Tl,gc]=yt.toLowerCase().split("=");Tl.trim()==="mode"&&(Kn=gc.trim()==="display"?"displaystyle":"textstyle")}const ei=Ku(or,Kn,t,!0);ei&&mr.parentNode.replaceChild(ei,mr)}}else if(((z=(I=t.processClassPattern)==null?void 0:I.test(Ve.className))!=null?z:!1)||!((ye=(W=t.skipTags)==null?void 0:W.includes(Vt))!=null&&ye||(pe=(lt=t.ignoreClassPattern)==null?void 0:lt.test(Ve.className))!=null&&pe))if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const or=e.textContent;e.textContent="";const Kn=Ku(or!=null?or:"","displaystyle",t,!0);Kn&&e.append(Kn)}else Yh(Ve,t)}}}var kg={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function Ag(e,t){var r,n,a,i;try{const s=C(C({},kg),t);s.ignoreClassPattern=new RegExp((r=s.ignoreClass)!=null?r:""),s.processClassPattern=new RegExp((n=s.processClass)!=null?n:""),s.processScriptTypePattern=new RegExp((a=s.processScriptType)!=null?a:""),s.processMathJSONScriptTypePattern=new RegExp((i=s.processMathJSONScriptType)!=null?i:""),Jd(),kl("core"),Yh(e,s)}catch(s){s instanceof Error?console.error("renderMathInElement(): "+s.message):console.error("renderMathInElement(): Could not render math for element",e)}}function Dg(e,t){const r=zc.singleton;return r?(r.show(),ad(),r.currentLayer=t,r.render(),r.focus(),!0):!1}function Lg(){const e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}bl({switchKeyboardLayer:Dg,toggleVirtualKeyboard:Lg,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function Wc(){var e,t;return(t=globalThis[e=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Rg(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function Ng(e){Tg(document.body,e)}function Ig(e){if(typeof e=="string"){const t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return typeof e=="string"?null:e}function Tg(e,t){var r,n,a,i;const s=Ig(e);if(!s)return;const u=t!=null?t:{};(r=u.renderToMarkup)!=null||(u.renderToMarkup=ns),(n=u.renderToMathML)!=null||(u.renderToMathML=Zv),(a=u.renderToSpeakableText)!=null||(u.renderToSpeakableText=Vv),(i=u.serializeToLatex)!=null||(u.serializeToLatex=Uv),Ag(s,u)}var Og={mathlive:"0.98.5"}}}]);
|
|
|
}()); |