|
|
!(function(){var Dl=Math.pow;var gu=(bn,Zt,le)=>new Promise((se,Be)=>{var Ne=Se=>{try{ve(le.next(Se))}catch(Me){Be(Me)}},Ye=Se=>{try{ve(le.throw(Se))}catch(Me){Be(Me)}},ve=Se=>Se.done?se(Se.value):Promise.resolve(Se.value).then(Ne,Ye);ve((le=le.apply(bn,Zt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[7043],{18299:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},81893:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},42922:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},25877:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},63237:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},99569:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},22751:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},40043:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},38308:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},17663:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},91034:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},72395:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},53978:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Me}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(me,Te){return Be.createElement(ve.Z,(0,se.Z)({},me,{ref:Te,icon:Ye}))},Me=Be.forwardRef(Se)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(bn,Zt){"use strict";Zt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var bn={},Zt="5.0",le={},se=null,Be=!1,Ne=!1,Ye=null,ve=!1,Se=null,Me=null,we=0;we<arguments.length;we++){var me=arguments[we];if(me!==null)switch(typeof me){case"number":Zt=me.toFixed(1);break;case"string":me.match(new RegExp("^[0-9]\\.[0-9]+$"))?Zt=me:Ye=me;break;case"object":typeof me.is3D!="undefined"?se=me:le=me;break;case"boolean":Be=me,Ne=!0;break}}se===null&&(se={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},le.material_id!==void 0&&!Ne&&(Be=!0)),Ye!==null&&le.id===void 0&&(le.id=Ye);var Te="",ot="",Oe=!1,st=null,lt=null,Je=null,Ge=!1,Ce=null,pt=null,zt=null,qe=null,ut=null;le.height!==void 0&&(le.height=Math.round(le.height)),le.width!==void 0&&(le.width=Math.round(le.width));var xe=function(tt){return parseFloat(tt)>4?parseFloat(tt):5};bn.setHTML5Codebase=function(tt,ft){Me=tt,Rt(tt,ft)},bn.setJavaCodebase=bn.setJavaCodebaseVersion=bn.isCompiledInstalled=bn.setPreCompiledScriptPath=bn.setPreCompiledResourcePath=function(){},bn.setHTML5CodebaseVersion=function(tt,ft){var Xt=parseFloat(tt);if(Xt!==NaN&&Xt<5){console.log("The GeoGebra HTML5 codebase version "+Xt+" is deprecated. Using version latest instead.");return}Se=tt,Le(tt,ft)},bn.getHTML5CodebaseVersion=function(){return lt},bn.getParameters=function(){return le},bn.setFontsCSSURL=function(tt){qe=tt},bn.setGiacJSURL=function(tt){},bn.setJNLPFile=function(tt){Te=tt},bn.setJNLPBaseDir=function(tt){},bn.inject=function(){function tt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ft="auto",Xt=le.id,Tn,mn=!1,Ut=0;Ut<arguments.length;Ut++){var jt=arguments[Ut];typeof jt=="string"?(jt=jt.toLowerCase(),jt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ft=jt:Xt=arguments[Ut]):typeof jt=="boolean"?mn=jt:jt instanceof HTMLElement&&(Tn=jt)}_n();function _n(){if(!ve){setTimeout(_n,200);return}ft=dn(ft);var yn=Tn||document.getElementById(Xt);if(!yn){console.log("possibly bug on ajax loading? ");return}if(bn.removeExistingApplet(yn,!1),le.width===void 0&&yn.clientWidth&&(le.width=yn.clientWidth),le.height===void 0&&yn.clientHeight&&(le.height=yn.clientHeight),!(le.width&&le.height)&&ft==="html5"&&(delete le.width,delete le.height),st=ft,ft==="screenshot")Et(yn,le);else{var Ae=!1;le.hasOwnProperty("playButton")&&le.playButton||le.hasOwnProperty("clickToLoad")&&le.clickToLoad?Ae=!0:le.hasOwnProperty("playButtonAutoDecide")&&le.playButtonAutoDecide&&(Ae=(!Ee()||tt())&&Ve()),Ae?(st="screenshot",at(yn,le,mn,ft)):Pt(yn,le,mn)}}};function Ee(){try{return window.self!==window.top}catch(tt){return!0}}function Ve(){return le.hasOwnProperty("screenshotGenerator")&&le.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}bn.getViews=function(){return se},bn.isJavaInstalled=function(){return!1};var Xe=function(tt){var ft=function(Ut){var jt=JSON.parse(Ut),_n=function(ce){return ce.type=="G"||ce.type=="E"},yn=jt.elements?jt.elements.filter(_n)[0]:jt;if(!yn||!yn.url){Xt();return}le.fileName=yn.url,Mt(yn.settings||{}),se.is3D=!0;var Ae="https://www.geogebra.org/images/";bn.setPreviewImage(Ce||yn.previewUrl,Ae+"GeoGebra_loading.png",Ae+"applet_play.png"),tt()},Xt=function(){le.onError&&le.onError(),Sn("Error: Fetching material (id "+le.material_id+") failed.",le)},Tn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",mn="/materials/"+le.material_id+"?scope=basic";mt("https://"+Tn+"/api/proxy.php?path="+encodeURIComponent(mn),ft,Xt)};function Mt(tt){var ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Xt){tt[Xt]=!!tt[Xt]}),ft.forEach(function(Xt){le[Xt]===void 0&&tt[Xt]!==void 0&&(le[Xt]=tt[Xt])}),le.showToolBarHelp===void 0&&(le.showToolBarHelp=le.showToolBar)}function mt(tt,ft,Xt){var Tn=new XMLHttpRequest;Tn.open("GET",tt),Tn.onload=function(){ft(Tn.responseText)},Tn.onerror=Xt,Tn.send()}bn.isHTML5Installed=function(){return!0},bn.getLoadedAppletType=function(){return st},bn.setPreviewImage=function(tt,ft,Xt){Ce=tt,pt=ft,zt=Xt},bn.removeExistingApplet=function(tt,ft){var Xt;typeof tt=="string"&&(tt=document.getElementById(tt)),st=null;var Tn=null;for(Xt=0;Xt<tt.childNodes.length;Xt++){var mn=tt.childNodes[Xt],Ut=mn.className;Ut==="applet_screenshot"?ft?(mn.style.display="block",st="screenshot"):mn.style.display="none":Ut!=="applet_scaler prerender"&&(tt.removeChild(mn),Tn=Ut&&Ut.indexOf("appletParameters")!=-1?mn.id:null,Xt--)}var jt=le.id!==void 0?le.id:Tn,_n=window[jt];_n&&typeof _n.getBase64=="function"&&(_n.remove(),window[jt]=null)},bn.refreshHitPoints=function(){if(xe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var tt=bn.getAppletObject();return tt&&typeof tt.recalculateEnvironments=="function"?(tt.recalculateEnvironments(),!0):!1},bn.startAnimation=function(){var tt=bn.getAppletObject();return tt&&typeof tt.startAnimation=="function"?(tt.startAnimation(),!0):!1},bn.stopAnimation=function(){var tt=bn.getAppletObject();return tt&&typeof tt.stopAnimation=="function"?(tt.stopAnimation(),!0):!1},bn.getAppletObject=function(){var tt=le.id!==void 0?le.id:"ggbApplet";return window[tt]},bn.resize=function(){};var St=function(tt,ft,Xt){var Tn=document.createElement("param");Tn.setAttribute("name",ft),Tn.setAttribute("value",Xt),tt.appendChild(Tn)},Ke=function(tt){return tt&&tt!=="false"},Pt=function(tt,ft,Xt){xe(lt)<=4.2&&(Xt=!0);var Tn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==lt||ggbHTML5LoadedCodebaseIsWebSimple&&!Ge)&&(Tn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var mn=document.createElement("div");mn.classList.add("appletParameters","notranslate");var Ut=ft.width,jt=ft.height;if(ft.disableAutoScale=ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ft.disableAutoScale,ft.width!==void 0)if(xe(lt)<=4.4)Ke(ft.showToolBar)&&(ft.height-=7),Ke(ft.showAlgebraInput)&&(ft.height-=37),ft.width<605&&Ke(ft.showToolBar)&&(ft.width=605,Ut=605);else{var _n=100;(Ke(ft.showToolBar)||Ke(ft.showMenuBar))&&(ft.hasOwnProperty("customToolBar")&&(ft.customToolbar=ft.customToolBar),_n=Ke(ft.showMenuBar)?245:155),Ut<_n&&(ft.width=_n,Ut=_n)}mn.style.border="none",mn.style.display="inline-block";for(var yn in ft)ft.hasOwnProperty(yn)&&yn!=="appletOnLoad"&&mn.setAttribute("data-param-"+yn,ft[yn]);qe&&mn.setAttribute("data-param-fontscssurl",qe),bn.resize=function(){GGBAppletUtils.responsiveResize(tt,ft)},window.addEventListener("resize",function(Jt){bn.resize()});var Ae=typeof ft.appletOnLoad=="function"?ft.appletOnLoad:function(){};if(!Xt&&ft.width!==void 0){ft.hasOwnProperty("showSplash")||mn.setAttribute("data-param-showSplash","false");var ce=tt.querySelector(".applet_scaler.prerender"),ue=ce!==null;if(ue)var pe=ce.querySelector(".ggb_preview");else{var pe=fn(Ut,jt,ft.borderColor,!1);ce=document.createElement("div"),ce.className="applet_scaler",ce.style.position="relative",ce.style.display="block",ce.style.width=Ut+"px",ce.style.height=jt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ce,"66%"),xe(lt)>=5?(ft.appletOnLoad=function(Jt){var et=tt.querySelector(".ggb_preview");et&&et.parentNode.removeChild(et),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ce),window.GGBT_wsf_view&&$(window).trigger("resize"),Ae(Jt)},ue||ce.appendChild(pe)):mn.appendChild(pe),ce.appendChild(mn),ue||tt.appendChild(ce),setTimeout(function(){bn.resize()},1)}else{var he=document.createElement("div");he.className="applet_scaler",he.style.position="relative",he.style.display="block",he.appendChild(mn),tt.appendChild(he),ft.appletOnLoad=function(Jt){bn.resize(),Ae(Jt)}}function oe(Jt,et){et&&typeof et.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Jt,et.appletOnLoad):renderGGBElement(Jt),Sn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",et)}function Ie(Jt,et){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Jt,params:et}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(wt){oe(wt.article,wt.params)}),html5AppletsToProcess=null)},xe(lt)<5&&(Jt.className+=" geogebraweb")):oe(Jt,et)}if(Tn){scriptLoadStarted=!0;for(var Qe=0;Qe<mn.childNodes.length;Qe++){var Lt=mn.childNodes[Qe].tagName;Lt==="TABLE"&&(mn.removeChild(mn.childNodes[Qe]),Qe--)}if(ggbHTML5LoadedScript!==null){var $t=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');$t!=null&&$t.parentNode.removeChild($t)}var Kt=document.createElement("script"),en=function(){Ie(mn,ft)};Kt.src=ot+Je,ggbHTML5LoadedCodebaseIsWebSimple=Ge,ggbHTML5LoadedCodebaseVersion=lt,ggbHTML5LoadedScript=Kt.src,Sn("GeoGebra HTML5 codebase loaded: '"+ot+"'.",ft),!Me&&(!Se||Se=="5.0")?(Ge?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),en()):ot.requirejs?__webpack_require__.e(12).then(function(){var Jt=[__webpack_require__(12)];en.apply(null,Jt)}.bind(this)).catch(__webpack_require__.oe):(Kt.onload=en,tt.appendChild(Kt))}else Ie(mn,ft);ft.height=jt,ft.width=Ut},Et=function(tt,ft,Xt){var Tn=fn(ft.width,ft.height,ft.borderColor,Xt),mn=document.createElement("div");mn.style.position="relative",mn.style.display="block",mn.style.width=ft.width+"px",mn.style.height=ft.height+"px",mn.className="applet_screenshot applet_scaler"+(Xt?" applet_screenshot_play":""),mn.appendChild(Tn);var Ut=GGBAppletUtils.getScale(ft,tt,Xt);Xt?(tt.appendChild(Vt()),window.GGBT_wsf_view||(tt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(mn,"66%"),tt.appendChild(mn),Ut!==1&&!isNaN(Ut)&&(GGBAppletUtils.scaleElement(mn,Ut),mn.style.width=ft.width+"px",mn.style.height=ft.height+"px",mn.parentNode.style.width=ft.width*Ut+"px",mn.parentNode.style.height=ft.height*Ut+"px"),bn.resize=function(){Yt(tt,Tn,mn,Xt)},window.addEventListener("resize",function(jt){bn.resize()}),bn.resize()};function Yt(tt,ft,Xt,Tn){if(tt.contains(ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(tt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(tt)}var mn=GGBAppletUtils.getScale(le,tt,Tn);Xt.parentNode!==null&&(!isNaN(mn)&&mn!==1?(GGBAppletUtils.scaleElement(Xt,mn),Xt.parentNode.style.width=le.width*mn+"px",Xt.parentNode.style.height=le.height*mn+"px"):(GGBAppletUtils.scaleElement(Xt,1),Xt.parentNode.style.width=le.width+"px",Xt.parentNode.style.height=le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(tt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}bn.onExitFullscreen=function(tt,ft){ft.appendChild(tt)};var at=function(tt,ft,Xt,Tn){Et(tt,ft,!0);for(var mn=function(){var _n=[];for(jt=0;jt<tt.childNodes.length;jt++)_n.push(tt.childNodes[jt]);if(window.GGBT_wsf_view){var yn=window.GGBT_wsf_view.renderFullScreen(tt,ft.id),Ae=document.getElementById("fullscreencontainer"),ce=jQuery(tt).find(".fullscreencontent");ce.length>0?(yn.remove(),ce.attr("id","fullscreencontent").show(),jQuery(Ae).append(ce),window.dispatchEvent(new Event("resize"))):Pt(yn,ft,!1),window.GGBT_wsf_view.launchFullScreen(Ae)}else st=Tn,Pt(tt,ft,!1);if(!window.GGBT_wsf_view)for(jt=0;jt<_n.length;jt++)tt.removeChild(_n[jt])},Ut=tt.getElementsByClassName("ggb_preview_play"),jt=0;jt<Ut.length;jt++)Ut[jt].addEventListener("click",mn,!1),Ut[jt].addEventListener("ontouchstart",mn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(tt),Ve()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Vt=function(){var tt=document.createElement("div");if(tt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ft='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Xt=document.createElement("style");Xt.styleSheet?Xt.styleSheet.cssText=ft:Xt.appendChild(document.createTextNode(ft)),document.getElementsByTagName("head")[0].appendChild(Xt)}return tt},fn=function(tt,ft,Xt,Tn){var mn=document.createElement("div");mn.className="ggb_preview",mn.style.position="absolute",mn.style.zIndex="90",mn.style.width=tt-2+"px",mn.style.height=ft-2+"px",mn.style.top="0px",mn.style.left="0px",mn.style.overflow="hidden",mn.style.backgroundColor="white";var Ut="lightgrey";Xt!==void 0&&(Xt==="none"?Ut="transparent":Ut=Xt),mn.style.border="1px solid "+Ut;var jt=document.createElement("img");if(jt.style.position="relative",jt.style.zIndex="1000",jt.style.top="-1px",jt.style.left="-1px",Ce!==null&&jt.setAttribute("src",Ce),jt.style.opacity=.7,pt!==null){var _n,yn,Ae;if(!Tn){_n=document.createElement("img"),_n.style.position="absolute",_n.style.zIndex="1001",_n.style.opacity=1,jt.style.opacity=.3,yn=360,yn>tt/4*3&&(yn=tt/4*3),Ae=yn/5.8,_n.setAttribute("src",pt),_n.setAttribute("width",yn),_n.setAttribute("height",Ae);var ce=(tt-yn)/2,ue=(ft-Ae)/2;_n.style.left=ce+"px",_n.style.top=ue+"px",mn.appendChild(_n)}}return mn.appendChild(jt),mn},dn=function(tt){return tt=tt.toLowerCase(),tt==="html5"||tt==="screenshot"?tt:"html5"},Ue=["web","webSimple","web3d","tablet","tablet3d","phone"],Le=function(tt,ft){if(lt=tt,ft){Rt(lt,!0);return}var Xt=!Be;if(Xt){var Tn=xe(lt);!isNaN(Tn)&&Tn<4.4&&(Xt=!1)}var mn,Ut;window.location.protocol.substr(0,4)==="http"?mn=window.location.protocol:mn="http:";var jt=lt.indexOf("//");jt>0?Ut=lt:jt===0?Ut=mn+lt:Ut="https://www.geogebra.org/apps/5.2.814.0/";for(var _n in Ue)if(lt.slice(Ue[_n].length*-1)===Ue[_n]||lt.slice((Ue[_n].length+1)*-1)===Ue[_n]+"/"){Rt(Ut,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Xt&&!se.is3D&&!se.AV&&!se.SV&&!se.CV&&!se.EV2&&!se.CP&&!se.PC&&!se.DA&&!se.FI&&!se.PV&&!Ke(le.showToolBar)&&!Ke(le.showMenuBar)&&!Ke(le.showAlgebraInput)&&!Ke(le.enableRightClick)&&(!le.appName||le.appName=="classic")?Ut+="webSimple/":Ut+="web3d/",Rt(Ut,!1)},Rt=function(tt,ft){if(tt.requirejs){ot=tt;return}tt.slice(-1)!=="/"&&(tt+="/"),ot=tt,ft===null&&(ft=tt.indexOf("http")===-1),Oe=ft,Je="web.nocache.js",Ge=!1;var Xt=ot.split("/");Xt.length>1&&(!ft&&Xt[Xt.length-2]==="webSimple"?(Je="webSimple.nocache.js",Ge=!0):Ue.indexOf(Xt[Xt.length-2])>=0&&(Je=Xt[Xt.length-2]+".nocache.js")),Xt=tt.split("/"),lt=Xt[Xt.length-3],lt.substr(0,4)==="test"?lt=lt.substr(4,1)+"."+lt.substr(5,1):(lt.substr(0,3)==="war"||lt.substr(0,4)==="beta")&&(lt="5.0");var Tn=parseFloat(lt);Tn!==NaN&&Tn<5&&tt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Tn+" is deprecated. Using version latest instead."),Le("5.0",ft))},Sn=function(tt,ft){window.console&&window.console.log&&(!ft||typeof ft.showLogging=="undefined"||ft.showLogging&&ft.showLogging!=="false")&&console.log(tt)};le.material_id!==void 0?Xe(un):un();function un(){var tt=Zt;Se!==null?tt=Se:parseFloat(tt)<5&&(tt="5.0"),Le(tt,!1),Me!==null&&Rt(Me,Oe),ve=!0}return bn},GGBAppletUtils=function(){"use strict";function bn(){return window.GGBT_wsf_edit!==void 0}function Zt(ve,Se){Se!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+Se+","+Se+")",ve.style.webkitTransform="scale("+Se+","+Se+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function le(ve,Se,Me,we,me,Te){var ot=null;if(Te!=null&&Te!="")for(var Oe=ve.parentNode;Oe!=null;)if((" "+Oe.className+" ").indexOf(" "+Te+" ")>-1){ot=Oe;break}else Oe=Oe.parentNode;var st=0,lt=0,Je=0,Ge=0,Ce=0,pt=0,zt=0;if(ot)st=ot.offsetWidth,lt=Math.max(we?ot.offsetWidth:0,ot.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(st=Math.min(window.innerWidth,document.documentElement.clientWidth),lt=Math.min(window.innerHeight,document.documentElement.clientHeight),Je=st):(st=window.innerWidth,lt=window.innerHeight,Je=window.innerWidth),ve){var qe=ve.getBoundingClientRect();qe.left>0&&qe.left<=st&&(me===void 0||!me)&&(document.dir==="rtl"?(Ce=st-qe.width-qe.left,pt=Je<=480?10:30):(pt=qe.left,Ce=Je<=480?10:30),Ge=pt+Ce)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ut=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ge=40,zt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ge=0,zt=40)}}return ve&&((Me===void 0||!Me)&&Se>0&&Se+Ge<st?st=Se:st-=Ge,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(lt-=zt)),{width:st,height:lt}}function se(ve,Se,Me,we,me){if(ve.isScreenshoGenerator)return 1;var Te=we!==void 0&&we,ot=ve.noScaleMargin!=null&&ve.noScaleMargin,Oe=function(ut){return ut&&ut!=="false"},st=Oe(ve.autoHeight),lt=le(Se,ve.width,Me,st,Te&&window.GGBT_wsf_view||ot,me),Je=parseInt(lt.width),Ge=ve.width,Ce=ve.height;if(Ge===void 0){var pt=Se.querySelector(".appletParameters");pt&&(Ge=pt.offsetWidth,Ce=pt.offsetHeight)}var zt=Je/Ge,qe=Te?1:lt.height/Ce;return Me!==void 0&&!Me&&(zt=Math.min(1,zt),qe=Math.min(1,qe)),Math.min(zt,qe)}function Be(ve,Se,Me){var we=1,me,Te=!1;if(ve.hasOwnProperty("allowUpscale")&&(Te=ve.allowUpscale),ve.hasOwnProperty("scale")&&(we=parseFloat(ve.scale),(isNaN(we)||we===null||we===0)&&(we=1),we>1&&(Te=!0)),Se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Te=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))me=se(ve,Se,Te,Me,ve.scaleContainerClass);else return we;return Te&&(!ve.hasOwnProperty("scale")||we===1)?me:Math.min(we,me)}function Ne(ve){var Se=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),we=ve.getBoundingClientRect(),me=(Se-we.width)/2,Te=(Me-we.height)/2;Te<0&&(Te=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(me<40?ve.style.left="40px":ve.style.left=me+"px",ve.style.top=Te+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Te<40?ve.style.top="40px":ve.style.top=Te+"px",ve.style.left=me+"px")}function Ye(ve,Se){var Me=ve.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Se.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var we=Be(Se,ve);bn()&&Me.setAttribute("data-param-scale",we);for(var me=null,Te=0;Te<ve.childNodes.length;Te++)if(ve.childNodes[Te].className!==void 0&&ve.childNodes[Te].className.match(/^applet_scaler/)){me=ve.childNodes[Te];break}if(me!==null&&me.querySelector(".noscale")!==null)return;var ot=Se.id!==void 0?Se.id:"ggbApplet",Oe=window[ot];(Oe==null||!Oe.recalculateEnvironments)&&me!==null&&!me.className.match(/fullscreen/)&&(me.parentNode.style.transform="",!isNaN(we)&&we!==1?(me.parentNode.style.width=Se.width*we+"px",me.parentNode.style.height=Se.height*we+"px",Zt(me,we)):(Zt(me,1),me.parentNode.style.width=Se.width+"px",me.parentNode.style.height=Se.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ne(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:Ye,isFlexibleWorksheetEditor:bn,positionCenter:Ne,getScale:Be,scaleElement:Zt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var bn=n.location.search;return bn.indexOf(J)!=-1||bn.indexOf(K)!=-1}function q(bn,Zt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(bn){var Zt=s[L].bindings;s[L].bindings=function(){for(var le=Zt?Zt():{},se=bn[webModule.__softPermutationId],Be=O;Be<se.length;Be++){var Ne=se[Be];le[Ne[O]]=Ne[P]}return le}};var t;function u(){return v(),t}function v(){if(!t){var bn=o.createElement(Q);if(bn.id=L,bn.style.cssText=R+S,bn.tabIndex=-1,o.body.appendChild(bn),t=bn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Zt=document.compatMode==U?V:W;t.write(Zt+X),t.close()}}}function w(bn){function Zt(se){function Be(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ne=Be();if(Ne){se();return}function Ye(){if(!Ne){if(!Be())return;Ne=!0,se(),o.removeEventListener&&o.removeEventListener(Z,Ye,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,Ye,!1);var ve=setInterval(function(){Ye()},$)}function le(se){var Be=u(),Ne=Be.body,Ye=Be.createElement(_);Ye.language=ab,Ye.crossOrigin=W,Ye.src=se,webModule.__errFn&&(Ye.onerror=function(){webModule.__errFn(L,new Error(bb+se))}),Ne.appendChild(Ye)}Zt(function(){le(bn)})}webModule.__startLoadingFragment=function(bn){return C(bn)},webModule.__installRunAsyncCode=function(bn){var Zt=u(),le=Zt.body,se=Zt.createElement(_);se.language=ab,se.text=bn,le.appendChild(se),le.removeChild(se)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(bn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(bn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(bn){var Zt=c[bn];return Zt==null?null:Zt},r=d,webModule.__errFn=e}function B(){function bn(ve){var Se=ve.lastIndexOf(rb);Se==-1&&(Se=ve.length);var Me=ve.indexOf(sb);Me==-1&&(Me=ve.length);var we=ve.lastIndexOf(tb,Math.min(Me,Se));return we>=O?ve.substring(O,we+P):W}function Zt(ve){if(!ve.match(/^\w+:\/\//)){var Se=o.createElement(ub);Se.src=ve+vb,ve=bn(Se.src)}return ve}function le(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function se(){for(var ve=o.getElementsByTagName(_),Se=O;Se<ve.length;++Se)if(ve[Se].src.indexOf(xb)!=-1)return bn(ve[Se].src);return W}function Be(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Ne(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var Ye=le();return Ye==W&&(Ye=se()),Ye==W&&(Ye=Be()),Ye==W&&Ne()&&(Ye=bn(o.location.href)),Ye=Zt(Ye),Ye}function C(bn){return bn.match(/^\//)||bn.match(/^[a-zA-Z]+:\/\//)?bn:webModule.__moduleBase+bn}function D(){var bn=[],Zt=O,le=[],se=[];function Be(ve){var Se=se[ve](),Me=le[ve];if(Se in Me)return Se;var we=[];for(var me in Me)we[Me[me]]=me;throw r&&r(ve,we,Se),null}if(__gwt_isKnownPropertyValue=function(ve,Se){return Se in le[ve]},webModule.__getPropMap=function(){var ve={};for(var Se in le)le.hasOwnProperty(Se)&&(ve[Se]=Be(Se));return ve},webModule.__computePropValue=Be,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var Ye=Ne.indexOf(Db);Ye!=-1&&(Zt=parseInt(Ne.substring(Ye+P),$),Ne=Ne.substring(O,Ye))}catch(ve){}return webModule.__softPermutationId=Zt,C(Ne+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase=window.ENV==="build"?"/react/build/js/mathematicalGraphics/"+name+"/":"/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(bn,Zt,le){"use strict";le.d(Zt,{Ax:function(){return Ye},Ds:function(){return ve},KI:function(){return Me},SI:function(){return Ne},f1:function(){return Be}});var se=le(11320);function Be(we){let me=!0;if(we.length>0){for(let Te=0;Te<we.length;Te++)if(we[Te].compile_success==0||!we[Te].compile_success){me=!1;break}}else me=!1;return me}function Ne(we,me=""){let Te=[];for(let ot=0;ot<we.length;ot++){let Oe=we[ot],st=me?`${me}/${Oe.name}`:`${Oe.name}`;Te.push({title:Oe.name,type:Oe.type,isLeaf:Oe.type!=="tree",key:st})}return Te}function Ye(we,me,Te){for(let ot=0;ot<we.length;ot++){let Oe=we[ot];if(Oe.key===me){Oe.children=Te;break}Oe.children&&Ye(Oe.children,me,Te)}return we}function ve(we,me,Te){let ot;return function(){let Oe=this,st=arguments,lt=function(){ot=null,Te||we.apply(Oe,st)},Je=Te&&!ot;clearTimeout(ot),ot=setTimeout(lt,me),Je&&we.apply(Oe,st)}}const Se=!0,Me=se.Z.API_SERVER},73646:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return me}});var se=le(67294),Be=le(69677),Ne=le(66309),Ye=le(2453),ve={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Se=le(38308);const{TextArea:Me}=Be.default;class we extends se.Component{constructor(ot){super(ot),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:ot,onAnswerChange:Oe,addChildAnswer:st,exerciseIsPublish:lt,answers:Je,activeOptionErrorIndex:Ge,flex:Ce="0 0 1000px"}=this.props;console.log("----",Je);let{inputVisible:pt,EditInputIndex:zt}=this.state;return se.createElement("div",{className:ve.flex},se.createElement("div",{className:`${ve.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",ot+1,"):"),se.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},Je==null?void 0:Je.map((qe,ut)=>se.createElement(se.Fragment,null,zt!==ut?(qe==null?void 0:qe.length)>0?se.createElement(Ne.Z,{className:"edit-tag",key:qe,closable:!(ot===0&&ut===0),onClose:xe=>{xe.preventDefault(),(Je==null?void 0:Je.length)===1&&ut===0?this.props.deleteChildAnswermain(ot,ut):this.props.deleteChildAnswer(ot,ut)}},se.createElement("span",{onDoubleClick:xe=>{this.setState({EditInputIndex:ut}),xe.preventDefault()}},qe)):se.createElement(Be.default,{defaultValue:qe,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:xe=>{if(xe.target.value.replaceAll(" ","").length<=0){Ye.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}Oe(ot,ut,xe.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):se.createElement(Be.default,{defaultValue:qe,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:xe=>{if(xe.target.value.replaceAll(" ","").length<=0){Ye.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}Oe(ot,ut,xe.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!pt&&se.createElement(Ne.Z,{className:"site-tag-plus",onClick:()=>{st(ot),this.setState({inputVisible:!0})}},se.createElement(Se.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var me=we},35566:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return lt}});var se=le(67294),Be=le(91304),Ne=Object.defineProperty,Ye=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,me=(Je,Ge,Ce)=>Ge in Je?Ne(Je,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):Je[Ge]=Ce,Te=(Je,Ge)=>{for(var Ce in Ge||(Ge={}))Me.call(Ge,Ce)&&me(Je,Ce,Ge[Ce]);if(Se)for(var Ce of Se(Ge))we.call(Ge,Ce)&&me(Je,Ce,Ge[Ce]);return Je},ot=(Je,Ge)=>Ye(Je,ve(Ge)),Oe=(Je,Ge,Ce)=>me(Je,typeof Ge!="symbol"?Ge+"":Ge,Ce);const st="\u2581";class lt extends se.Component{constructor(){super(...arguments),Oe(this,"getChCountBeforeCursor",(Ge,Ce)=>{const pt=Ce.line;let zt=0;for(let ut=0;ut<pt;ut++)zt+=Ge.getLine(ut).split(st).length-1;const qe=Ge.getLine(pt).substring(0,Ce.ch);return zt+=qe.split(st).length-1,zt}),Oe(this,"onCMBeforeChange",(Ge,Ce)=>{const pt=Ge.getRange(Ce.from,Ce.to);let zt=0;if(Ce.text.forEach(qe=>{zt+=qe.split(st).length-1}),pt&&pt.indexOf(st)!=-1){const qe=pt.split(st).length-1,ut=this.getChCountBeforeCursor(Ge,Ce.from);console.log(`\u5220\u9664${qe}\u4E2A\uFF0C \u4E4B\u524D\u6709${ut}\u4E2A\uFF0C\u65B0\u589E${zt}\u4E2A`),this.props.deleteEmptyDisabled?Ce.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ut,qe,zt)}else if(zt){const qe=this.getChCountBeforeCursor(Ge,Ce.from);console.log(`\u65B0\u589E${zt}\u4E2A\uFF0C\u4E4B\u524D\u6709${qe}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(qe,0,zt)}})}render(){return se.createElement(Be.Z,ot(Te({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},63205:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return ot}});var se=le(67294),Be={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=le(94184),Ye=le.n(Ne),ve=le(57953),Se=le(15979),Me=le(33170),we=le(28706),me=(Oe,st,lt)=>new Promise((Je,Ge)=>{var Ce=qe=>{try{zt(lt.next(qe))}catch(ut){Ge(ut)}},pt=qe=>{try{zt(lt.throw(qe))}catch(ut){Ge(ut)}},zt=qe=>qe.done?Je(qe.value):Promise.resolve(qe.value).then(Ce,pt);zt((lt=lt.apply(Oe,st)).next())}),ot=({data:Oe,className:st,fullWidth:lt,style:Je={},onClose:Ge,onOk:Ce,showFullTools:pt,noAssociationId:zt})=>{const qe=(0,se.useRef)(null),ut=(0,se.useRef)(null),xe=(0,se.useRef)(null),Ee=(0,se.useRef)(null),[Ve,Xe]=(0,se.useState)(!1),[Mt,mt]=(0,se.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,se.useEffect)(()=>{xe.current||(xe.current=document.createElement("style"),document.head.appendChild(xe.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),xe.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&St()):(document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null))},[Oe==null?void 0:Oe.visible]);const St=()=>me(void 0,null,function*(){Xe(!0),mt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const at=yield(0,we.ZJ)(Oe==null?void 0:Oe.src);qe.current.src="",qe.current.src=at,qe.current.onload=function(){Yt()},Xe(!1),mt("")}),Ke=()=>{document.body.removeAttribute("data-custom"),xe.current.innerHTML=" ",Ge()},Pt=at=>me(void 0,null,function*(){Xe(!0),mt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Vt=yield(0,Me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:at.dataUrl}});Vt!=null&&Vt.id&&!zt?(yield(0,Me.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Vt==null?void 0:Vt.id,settings:JSON.stringify(at.state)}})).status===0&&Ce():Vt!=null&&Vt.id&&Ce(Vt),document.body.removeAttribute("data-custom"),xe.current.innerHTML=" ",Xe(!1),mt("")}),Et=()=>{const at=document.querySelector('a[href="https://markerjs.com/"]');at&&at.parentNode&&(at.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(fn=>{const dn=document.querySelector(fn.name);dn&&dn.setAttribute("title",fn.title)})},Yt=()=>{ut.current=new Se.hP(qe.current),ut.current.targetRoot=Ee.current,ut.current.addEventListener("render",Pt),ut.current.addEventListener("beforeclose",Ke),pt&&(ut.current.availableMarkerTypes=ut.current.ALL_MARKER_TYPES,ut.current.uiStyleSettings.redoButtonVisible=!0,ut.current.uiStyleSettings.notesButtonVisible=!0,ut.current.uiStyleSettings.zoomButtonVisible=!0,ut.current.uiStyleSettings.zoomOutButtonVisible=!0,ut.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ut.current.uiStyleSettings,ut.current.show(),Oe!=null&&Oe.snapshotData&&ut.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Et()},300)};return se.createElement(se.Fragment,null,(Oe==null?void 0:Oe.visible)&&se.createElement(ve.Z,{spinning:Ve,tip:Mt,style:{position:"absolute"}},se.createElement("div",{ref:Ee,className:Ye()(Be.imageDimensions,st,lt?Be.fullWidth:""),style:Je},se.createElement("img",{className:Be.img,ref:qe}))))}},36527:function(bn,Zt,le){"use strict";var se=le(67294),Be=le(71230),Ne=le(15746),Ye=le(66368),ve=le(71577),Se=le(35598),Me=le(71736),we=le(84279),me=le(67294);const Te=(0,se.forwardRef)(({callback:ot,showSaveButton:Oe,value:st=""},lt)=>{const Je=(0,se.useRef)(),Ge=[{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 "}]}]}],Ce=[{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}`}]}]}],pt=ut=>{Je.current.setValue(Je.current.getValue()+" "+ut.value+" ")},zt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:me.createElement(Be.Z,{className:Me.Z.lists,gutter:[10,10]},Ge.map((ut,xe)=>me.createElement(Ne.Z,{flex:"110px",className:Me.Z.item},me.createElement("div",null,me.createElement(Se.Z,{value:`$$${ut.value}$$`}),ut.name),me.createElement("div",{className:Me.Z.children},ut.children.map((Ee,Ve)=>me.createElement("div",{key:Ve},me.createElement("h1",null,Ee.name),me.createElement(Be.Z,{gutter:[10,10]},Ee.data.map((Xe,Mt)=>me.createElement(Ne.Z,{key:Mt,onClick:()=>pt(Xe),className:Me.Z.diamond},me.createElement(Se.Z,{value:"`$$"+Xe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:me.createElement(Be.Z,{className:Me.Z.lists,gutter:[10,10]},Ce.map((ut,xe)=>me.createElement(Ne.Z,{flex:"110px",className:Me.Z.item},me.createElement("div",null,me.createElement(Se.Z,{value:"`$$"+ut.value+"$$`"}),ut.name),me.createElement("div",{className:Me.Z.children},ut.children.map((Ee,Ve)=>me.createElement("div",{key:Ve},Ee.name&&me.createElement("h1",null,Ee.name),me.createElement(Be.Z,{gutter:[10,10]},Ee.data.map((Xe,Mt)=>me.createElement(Ne.Z,{key:Mt,onClick:()=>pt(Xe),className:Me.Z.diamond},me.createElement(Se.Z,{value:"`$$"+Xe.value+"$$`"}))))))))))}],qe=()=>{var ut=document.createElement("div");ut.innerHTML=Je.current.getValue();var xe=ut.innerText;return ot&&ot(xe),xe};return(0,se.useImperativeHandle)(lt,()=>({getData:qe})),me.createElement("div",{className:Me.Z.mathWrap},me.createElement(Ye.default,{defaultActiveKey:"1",items:zt}),me.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Je,style:{width:800,marginTop:30,fontSize:18}},st||""),Oe&&me.createElement("div",{className:Me.Z.button},me.createElement(ve.ZP,{size:"large",onClick:qe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Zt.Z=Te},57444:function(bn,Zt,le){"use strict";le.d(Zt,{h:function(){return ut}});var se=le(67294),Be=le(11713),Ne=le(22150),Ye=le(71577),ve=le(4631),Se=le.n(ve),Me=le(71749),we=le(30483),me=Object.defineProperty,Te=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,Je=(xe,Ee,Ve)=>Ee in xe?me(xe,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):xe[Ee]=Ve,Ge=(xe,Ee)=>{for(var Ve in Ee||(Ee={}))st.call(Ee,Ve)&&Je(xe,Ve,Ee[Ve]);if(Oe)for(var Ve of Oe(Ee))lt.call(Ee,Ve)&&Je(xe,Ve,Ee[Ve]);return xe},Ce=(xe,Ee)=>Te(xe,ot(Ee));const pt=Be.default.Option,zt={labelCol:{span:4},wrapperCol:{span:20}},qe={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Zt.Z=({callback:xe,onCancel:Ee})=>{const[Ve,Xe]=(0,se.useState)("python");function Mt(St){Xe(qe[St][1])}function mt(St){xe(St)}return se.createElement(Ne.default,Ce(Ge({},zt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:mt,style:{width:500}}),se.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},se.createElement(Be.default,{getPopupContainer:St=>St.parentNode,onChange:Mt},Object.keys(qe).map(St=>se.createElement(pt,{key:St,value:St},qe[St][0])))),se.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},se.createElement(ut,{mode:Ve})),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ye.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ye.ZP,{type:"ghost",onClick:Ee},"\u53D6\u6D88")))};function ut({value:xe,onChange:Ee,mode:Ve,options:Xe={}}){const Mt=(0,se.useRef)(),[mt,St]=(0,se.useState)();return(0,se.useEffect)(()=>{if(mt){let Ke=function(Pt){const Et=Pt.getValue();Ee&&Ee(Et)};return mt.on("change",Ke),()=>{mt.off("change",Ke)}}},[mt,Ee]),(0,se.useEffect)(()=>{mt&&mt.setOption("mode",Ve)},[mt,Ve]),(0,se.useEffect)(()=>{mt&&(xe!==mt.getValue()||xe==="")&&setTimeout(()=>{mt.setValue(xe||"")},300)},[mt,xe]),(0,se.useEffect)(()=>{if(Mt.current&&!mt){const Ke=Se().fromTextArea(Mt.current,Ge({mode:Ve,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Xe));St(Ke)}},[Mt.current,mt]),se.createElement("div",{className:"my-codemirror-container"},se.createElement("textarea",{ref:Mt}))}},91304:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return ar}});var se=le(67294),Be=le(4631),Ne=le.n(Be),Ye=le(91033),ve=le(71749),Se=le(57341),Me=le(82801),we=le(88386),me=le(49047),Te=le(80785),ot=le(35598),Oe=({value:Rn="",className:it,showTextOnly:dt,showLines:Bt,style:qt={}})=>{const je=(0,se.useMemo)(()=>"",[Rn]);return se.createElement(se.Fragment,null,se.createElement("div",{dangerouslySetInnerHTML:{__html:je}}))},st=le(67294),lt=Object.defineProperty,Je=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,qe=(Rn,it,dt)=>it in Rn?lt(Rn,it,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Rn[it]=dt,ut=(Rn,it)=>{for(var dt in it||(it={}))pt.call(it,dt)&&qe(Rn,dt,it[dt]);if(Ce)for(var dt of Ce(it))zt.call(it,dt)&&qe(Rn,dt,it[dt]);return Rn},xe=(Rn,it)=>Je(Rn,Ge(it));let Ee=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ve({onActionCallback:Rn,title:it,icon:dt,actionName:Bt,className:qt="",children:je}){function Ct(){Rn(Bt)}return st.createElement("a",{title:it,className:qt,onClick:Ct},st.createElement("i",{className:`${dt}`}),je)}var Xe=({watch:Rn,showNullButton:it,showNullProgramButton:dt,onActionCallback:Bt,fullScreen:qt,insertTemp:je,hidetoolBar:Ct,extraUse:Wt})=>{const Ft=[...Ee,{title:`${Rn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Rn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return st.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&Ft.map((an,rn)=>st.createElement("li",{key:rn},an.actionName?st.createElement(Ve,xe(ut({},an),{onActionCallback:Bt})):st.createElement("span",{className:"v-line"}))),it?st.createElement("li",null,st.createElement(Ve,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Bt},st.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,dt?st.createElement(st.Fragment,null,st.createElement("li",null,st.createElement(Ve,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Bt},st.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),st.createElement("li",null,st.createElement(Ve,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Bt},st.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,je&&st.createElement("li",null,st.createElement(Ve,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${je}`,onActionCallback:Bt},st.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Wt&&st.createElement("li",null,Wt),st.createElement("li",{className:"btn-full-screen"},st.createElement(Ve,{icon:`${qt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:qt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Bt})))},Mt=le(76621),mt=le(22150),St=le(69677),Ke=le(71577),Pt=Object.defineProperty,Et=Object.defineProperties,Yt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,dn=(Rn,it,dt)=>it in Rn?Pt(Rn,it,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Rn[it]=dt,Ue=(Rn,it)=>{for(var dt in it||(it={}))Vt.call(it,dt)&&dn(Rn,dt,it[dt]);if(at)for(var dt of at(it))fn.call(it,dt)&&dn(Rn,dt,it[dt]);return Rn},Le=(Rn,it)=>Et(Rn,Yt(it));const Rt={labelCol:{span:4},wrapperCol:{span:20}};var Sn=({callback:Rn,onCancel:it})=>{function dt(Bt){Rn(Bt)}return se.createElement(mt.default,Le(Ue({},Rt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:dt,style:{width:500}}),se.createElement(mt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},se.createElement(St.default,null)),se.createElement(mt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},se.createElement(St.default,null)),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ke.ZP,{type:"ghost",onClick:it},"\u53D6\u6D88")))},un=le(57444),tt=le(70859),ft=le(14446),Xt=le(71230),Tn=le(63205),mn=le(67294),Ut=({callback:Rn,onCancel:it})=>{const dt=document.createElement("canvas"),Bt=dt.getContext("2d");dt.width=1e3,dt.height=800,Bt.fillStyle="#ffffff",Bt.fillRect(0,0,dt.width,dt.height);const qt=dt.toDataURL("image/png");return mn.createElement(ft.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},mn.createElement(Xt.Z,{style:{height:"100vh"}},mn.createElement(Tn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:qt,visible:!0,title:String(Date.now())},onOk:je=>{Rn({src:je.url})},onClose:it})))},jt=le(72565),_n=le(15746),yn=le(2453),Ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ce=le(67294),pe=(0,se.forwardRef)(({onCancel:Rn,editImgId:it,callback:dt},Bt)=>{let qt=(0,se.useRef)(),je=(0,se.useRef)(),Ct=(0,se.useRef)(),Wt=(0,se.useRef)(!1);const Ft=(0,se.useRef)(!1);console.log("ref:",Bt);const[an,rn]=(0,se.useState)(0),[Vn,Pr]=(0,se.useState)("100vh");return(0,se.useEffect)(()=>{rn(1);try{indexedDB.databases().then(nr=>{nr.forEach(Xn=>indexedDB.deleteDatabase(Xn.name))})}catch(nr){}},[]),(0,se.useImperativeHandle)(Bt,()=>({setHeight:Pr})),ce.createElement("div",{ref:Ft,className:"body-overflow-initial"},ce.createElement(jt.Z,{width:"100vw",height:Vn,footer:null,closable:!0,placement:"bottom",open:!!an,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Ae.drawerWrap}`,onClose:()=>{window.saveDrawData(nr=>{dt({src:`/api/attachments/${nr}`,id:nr})})},title:ce.createElement(Xt.Z,{align:"middle"},ce.createElement(_n.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ce.createElement(_n.Z,{onClick:()=>{Pr(Vn==="60px"?"100vh":"60px")}},ce.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ce.createElement(_n.Z,{onClick:()=>{window.saveDrawData(nr=>{if(nr===null){yn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}yn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),dt({src:`/api/attachments/${nr}`,id:nr,disabledClose:!0})})}},ce.createElement(Ke.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ce.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${it||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:je})))}),he=le(11320),oe=le(78045),Ie=le(31795);const Qe=oe.ZP.Group,Lt={margin:"0 8px"};var $t=({callback:Rn,onCancel:it})=>{function dt(Bt){Rn(Bt)}return se.createElement(mt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:dt},se.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},se.createElement("span",{style:Lt},"\u5355\u5143\u683C\u6570\uFF1A"),se.createElement("span",{style:Lt},"\u884C\u6570"),se.createElement(mt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},se.createElement(Ie.Z,null)),se.createElement("span",{style:Lt},"\u5217\u6570"),se.createElement(mt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},se.createElement(Ie.Z,null))),se.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},se.createElement("span",{style:Lt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),se.createElement(mt.default.Item,{name:"align"},se.createElement(Qe,null,se.createElement(oe.ZP,{value:"default"},se.createElement("i",{className:"fa fa-align-justify"})),se.createElement(oe.ZP,{value:"left"},se.createElement("i",{className:"fa fa-align-left"})),se.createElement(oe.ZP,{value:"center"},se.createElement("i",{className:"fa fa-align-center"})),se.createElement(oe.ZP,{value:"right"},se.createElement("i",{className:"fa fa-align-right"}))))),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ke.ZP,{type:"ghost",onClick:it},"\u53D6\u6D88")))},Kt=le(47897),en=le(61016),Jt=le.n(en),wt=(0,se.forwardRef)(({use3d:Rn,width:it,height:dt,callback:Bt,showSaveButton:qt},je)=>{const Ct=(0,se.useRef)(),Wt=(0,se.useRef)(),[Ft,an]=(0,se.useState)(!1),rn=(0,se.useRef)({id:Ct,appName:"graphing",width:it||1e3,height:dt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,se.useEffect)(()=>{Wt.current=new(Jt())(rn.current,!0),window.onload=function(){Wt.current.inject("applet_container")}},[]);const Vn=()=>{var Pr=window.ggbApplet.getPNGBase64(1,!0,72);return Bt&&Bt(Pr),Pr};return(0,se.useEffect)(()=>{rn.current.appName=Ft?"3D":"graphing",Wt.current.inject("applet_container")},[Ft]),(0,se.useEffect)(()=>{an(Rn)},[Rn]),(0,se.useImperativeHandle)(je,()=>({getImgData:Vn})),se.createElement(se.Fragment,null,se.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Ct}),se.createElement(Xt.Z,{align:"middle"},se.createElement(_n.Z,{flex:1},se.createElement(Kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ft,onChange:Pr=>an(Pr)})),se.createElement(_n.Z,null,se.createElement(Ke.ZP,{size:"large",onClick:Vn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Tt=le(36527),Ot=le(25934);const yt="link",Dn="upload-image",gn="add-flowchart",$n="draw-image",Kr="add-flowchart",tr="code-block",lr="add-table",ur="------------",ni={default:ur,left:`:${ur}`,center:`:${ur}:`,right:`${ur}:`};var Xr=le(99914),Qr=(Rn,it,dt)=>new Promise((Bt,qt)=>{var je=Ft=>{try{Wt(dt.next(Ft))}catch(an){qt(an)}},Ct=Ft=>{try{Wt(dt.throw(Ft))}catch(an){qt(an)}},Wt=Ft=>Ft.done?Bt(Ft.value):Promise.resolve(Ft.value).then(je,Ct);Wt((dt=dt.apply(Rn,it)).next())});function gi(){}let Sr=0;const Ei=1e4,Ui="\u2581",ea="@\u2581\u2581@",ra="@\u2581@",Zi=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,At=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function An(Rn){return/^\d+$/.test(Rn)?`${Rn}px`:Rn}const wn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",kr={[wn+"-B"]:"bold",[wn+"-I"]:"italic"},or={[yt]:"\u6DFB\u52A0\u94FE\u63A5",[tr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Dn]:"\u6DFB\u52A0\u56FE\u7247",[$n]:"\u6DFB\u52A0\u753B\u56FE",[gn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[lr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ar=({defaultValue:Rn="",onChange:it,width:dt="100%",height:Bt=400,miniToolbar:qt=!1,isFocus:je=!1,watch:Ct,insertTemp:Wt,mode:Ft="markdown",id:an="markdown-editor-id",showResizeBar:rn=!1,noStorage:Vn=!1,showNullButton:Pr=!1,showNullProgramButton:nr=!1,hidetoolBar:Xn=!1,fullScreen:mr=!1,onBlur:fr,onCMBeforeChange:Yr,onFullScreen:xn,className:qn="",disablePaste:Si=!1,disabled:Ii=!1,disabledFill:di=!1,placeholder:si="",values:zi="",extraUse:Lr,onAddBlank:Mi})=>{const[Pn,Qt]=(0,se.useState)(null),[Gt,kt]=(0,se.useState)(Rn),[Wn,ri]=(0,se.useState)(Ct),[Ai,Zr]=(0,se.useState)(mr),[Hn,tn]=(0,se.useState)(""),[Ur,Jr]=(0,se.useState)(0),[ai,Ti]=(0,se.useState)(Bt),[Ki,Tr]=(0,se.useState)(!1),Gr=(0,se.useRef)((0,Ot.Z)()),gt=(0,se.useRef)(!1),ht=(0,se.useRef)(),[Ht,sn]=(0,se.useState)(0),[Ln,gr]=(0,se.useState)(0),vr=(0,se.useRef)(),Mr=(0,se.useRef)(),Cr=(0,se.useRef)(),br=(0,se.useRef)(),cr=(0,se.useRef)(),fi=(0,se.useRef)(),Dr=()=>Qr(void 0,null,function*(){var Cn;const vn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Gr.current}});(Cn=vn==null?void 0:vn.attachments)!=null&&Cn.length&&(console.log("cm:",Pn,vr),vn.attachments.map(Bn=>{Bn.content_type.indexOf("image")>-1?Pn.replaceSelection(``):Bn.content_type.indexOf("video")>-1?Pn.replaceSelection(`<video width="100%" controls src="${he.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Bn.content_type.indexOf("pdf")>-1?Pn.replaceSelection(`<a href="${he.Z.API_SERVER}/api/attachments/${Bn.id}?type=${Bn.content_type}&disposition=inline" target="_blank">${Bn.name}</a>`):Pn.replaceSelection(`[${Bn.name}](${he.Z.API_SERVER}/api/attachments/${Bn.id}?type=${Bn.content_type})`)}))});(0,se.useEffect)(()=>{const Cn=window.scrollY||window.pageYOffset;kt(zi),Pn==null||Pn.setValue(zi),window.scrollTo(0,Cn)},[zi]),(0,se.useEffect)(()=>{xn==null||xn(Ai)},[Ai]),(0,se.useEffect)(()=>{if(vr.current){let Cn=function(Bn,Fn){var xr;if(Si){Fn.preventDefault();return}const Qn=Fn.clipboardData;if(Qn){const Yn=Qn.types.toString(),ir=Qn.items;if(Yn==="Files"||Qn.types.indexOf("Files")>-1){if(Fn.preventDefault(),Ft=="stex")return;try{let rr=ir[1];((xr=ir[0])==null?void 0:xr.kind)==="file"&&(rr=ir[0]);const Er=rr.getAsFile(),He=Er.name.split(".").pop();(0,tt.I)(Er,We=>{var Nt,_t,ln;We.id?((Nt=Er==null?void 0:Er.type)==null?void 0:Nt.indexOf("image"))>-1?vn.replaceSelection(`<img width="100%" src="/api/attachments/${We.id}?type=${We.content_type})" alt="" />`):((_t=Er==null?void 0:Er.type)==null?void 0:_t.indexOf("video"))>-1?vn.replaceSelection(`<video width="100%" controls src="/api/attachments/${We.id}"></video>`):((ln=Er==null?void 0:Er.type)==null?void 0:ln.indexOf("pdf"))>-1?vn.replaceSelection(`<a href="/api/attachments/${We.id}?type=${Er.type}&disposition=inline" target="_blank">${Er.name}</a>`):At.includes(He)?vn.replaceSelection(`<a href="/api/attachments/${We.id}?type=office&disposition=inline" target="_blank">${Er.name}</a>`):vn.replaceSelection(`[${Er.name}](/api/attachments/${We.id}?type=${We.content_type})`):(We==null?void 0:We.status)===401&&(yn.ZP.warning((We==null?void 0:We.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(rr){yn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const vn=Ne().fromTextArea(vr.current,{mode:Ft,lineNumbers:!qt,lineWrapping:!0,value:Rn,autoCloseTags:!nr,autoCloseBrackets:!0});return vn.on("keyup",function(Bn,Fn){Fn.keyCode===8&&(Bn.getValue()==""?vn.setOption("placeholder",si):vn.setOption("placeholder",null))}),vn.on("keydown",function(Bn,Fn){if(Fn.keyCode===8){var xr=ei(Bn);xr&&Fn.preventDefault()}}),je&&vn.focus(),vn.on("paste",Cn),vn.on("dragleave",function(Bn,Fn){Mr.current.classList.remove("mouse-hover-md")}),Ii&&vn.on("beforeChange",function(Bn,Fn){(Fn.origin==="paste"||Fn.origin==="+input")&&Fn.cancel()}),Qt(vn),()=>{vn.off("paste",Cn)}}},[]);const dr=(0,se.useCallback)(()=>{if(Mr.current)try{}catch(Cn){console.log(Cn,"---- to set md editor body height")}},[ai,Mr,Ai]);(0,se.useEffect)(()=>{function Cn(){let vn=new Ye.Z(Bn=>{for(let Fn of Bn)(Fn.target.offsetHeight>0||Fn.target.offsetWidth>0)&&(dr(),Pn.setSize("100%","100%"),Pn.refresh())});return vn.observe(vr.current.parentElement),vn}if(Pn){const vn=Cn();return()=>{var Bn,Fn;(Bn=vr.current)!=null&&Bn.parentElement&&vn.unobserve((Fn=vr.current)==null?void 0:Fn.parentElement)}}},[Pn,dr]),(0,se.useEffect)(()=>{if(Pn){let Cn=[];for(const[vn,Bn]of Object.entries(kr)){let Fn={[vn]:()=>{jr(Bn)}};Cn.push(Fn),Pn.addKeyMap(Fn)}return ht.current=setInterval(()=>{gt.current&&Dr()},4e3),()=>{clearInterval(ht.current);for(let vn of Cn)Pn.removeKeyMap(vn)}}},[Pn]),(0,se.useEffect)(()=>{mr!==Ai&&Zr(mr)},[mr]),(0,Xr.Z)(()=>{if(!Vn&&Ur>0){let Cn=new Date().getTime(),vn=window.sessionStorage.getItem(an);Cn>=Ur+Ei&&(!vn||vn!==Gt)&&(window.sessionStorage.setItem(an,Gt),Tr(!0))}},Ei),(0,se.useEffect)(()=>{ri(Ct)},[Pn,Ct]),(0,se.useEffect)(()=>{Pn&&je&&Pn.focus()},[Pn,je]),(0,se.useEffect)(()=>{if(Wn&&Pn){let Cn=function(Bn){let Fn=Bn.target;if(br.current){let xr=Fn.scrollTop/Fn.scrollHeight;br.current.scrollTop=br.current.scrollHeight*xr}};const vn=Pn.getScrollerElement();return vn.addEventListener("scroll",Cn),()=>{vn.removeEventListener("scroll",Cn)}}},[Pn,Wn]),(0,se.useEffect)(()=>{if(Pn&&Yr){let Cn=function(vn,Bn){Yr(vn,Bn)};return Pn.on("beforeChange",Cn),()=>{Pn.off("beforeChange",Cn)}}},[Pn,Yr]),(0,se.useEffect)(()=>{if(Pn&&fr){let Cn=function(){fr(Pn.getValue())};return Pn.on("blur",Cn),()=>{Pn.off("blur",Cn)}}},[Pn,fr]);function ei(Cn,vn){var Bn=Cn.getDoc(),Fn=Bn.getCursor(),xr=Bn.getLine(Fn.line),Qn=xr.charAt(Fn.ch-1),Yn=xr.lastIndexOf("@\u2581@",Fn.ch),ir=xr.lastIndexOf("@\u2581\u2581@",Fn.ch),rr=Yn>ir?Yn:ir,Er=Yn>ir?3:4;if(ea.indexOf(Qn)===-1)return null;if(console.log("change1:",vn,Cn,xr,Fn,rr,Yn,ir,Qn),rr>=0&&Fn.ch-rr<5){var He=rr+Er;return Bn.replaceRange("",{line:Fn.line,ch:rr},{line:Fn.line,ch:He}),{line:Fn.line,ch:He}}return null}(0,se.useEffect)(()=>{if(Pn){let Cn=function(vn,Bn){const Fn=vn.getValue();kt(Fn),Jr(new Date().getTime()),vn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),it&&(nr?it(Fn,nn(Fn)):it(Fn))};return Pn.on("change",Cn),()=>{Pn.off("change",Cn)}}},[Pn,it]),(0,se.useEffect)(()=>{if(Pn)if(Rn==null)Pn.setValue(""),kt("");else{const Cn=window.scrollY||window.pageYOffset;Rn!==Pn.getValue()&&(Pn.setValue(Rn),kt(Rn),Pn.setCursor(Ii?1:Pn.lineCount(),0),window.scrollTo(0,Cn))}},[Pn,Rn]);const jr=(0,se.useCallback)(Cn=>{const vn=Pn.getCursor(),Bn=Pn.getSelection();let Fn=Bn.split(`
|
|
|
`);switch(Cn){case"bold":return Pn.replaceSelection("**"+Bn+"**"),Bn===""&&Pn.setCursor(vn.line,vn.ch+2),Pn.focus();case"italic":return Pn.replaceSelection("*"+Bn+"*"),Bn===""&&Pn.setCursor(vn.line,vn.ch+1),Pn.focus();case"code":return Pn.replaceSelection("`"+Bn+"`"),Bn===""&&Pn.setCursor(vn.line,vn.ch+1),Pn.focus();case"inline-latex":return tn("inline-latex"),Pn.focus();case"latex":return Pn.replaceSelection("```latex\n"+Bn+"\n```"),Pn.setCursor(vn.line+1,Bn.length+1),Pn.focus();case"line-break":return Pn.replaceSelection(`<br/>
|
|
|
`),Pn.focus();case"list-ul":return Bn===""?Pn.replaceSelection("- "+Bn):Pn.replaceSelection(Fn.map(xr=>xr===""?"":`- ${xr}`).join(`
|
|
|
`)),Pn.focus();case"list-ol":return Bn===""?Pn.replaceSelection("1. "+Bn):Pn.replaceSelection(Fn.map((xr,Qn)=>xr===""?"":`${Qn+1}. ${xr}`).join(`
|
|
|
`)),Pn.focus();case"add-null-ch":Mi==null||Mi();return;case"add-signal":return Bn===""&&Pn.setCursor(vn.line,vn.ch),Pn.replaceSelection(ra),Pn.focus();case"add-multiple":return Bn===""&&Pn.setCursor(vn.line,vn.ch),Pn.replaceSelection(ea),Pn.focus();case"inster-template-1":return Bn===""&&Pn.setCursor(vn.line,vn.ch),Pn.replaceSelection(Zi),Pn.focus();case"eraser":return Pn.setValue(""),Pn.focus();case"trigger-watch":return ri(!Wn),Pn.focus();case"trigger-full-screen":return Zr(!Ai),Pn.focus();case yt:tn(yt);return;case tr:tn(tr);return;case Dn:tn(Dn);return;case $n:tn($n);return;case"maths-latex":tn("maths-latex");return;case gn:cr.current="",sessionStorage.removeItem("file_id"),tn(gn);return;case lr:tn(lr);return;default:throw new Error}},[Pn,Wn,Ai]),De=(0,se.useCallback)((Cn,vn)=>{var Bn,Fn,xr,Qn,Yn,ir;tn("");const{src:rr,alt:Er,id:He}=Cn||{};switch(Hn){case yt:const{title:Mn,link:En}=Cn;return Pn.replaceSelection(`[${Mn}](${En})`),Pn.focus();case tr:const{language:Zn,content:Nn}=Cn;return Pn.replaceSelection(["```"+Zn,Nn,"```"].join(`
|
|
|
`)),Pn.focus();case"maths-latex":for(var We=atob(Cn),Nt=new Uint8Array(We.length),_t=0;_t<We.length;_t++)Nt[_t]=We.charCodeAt(_t);var ln=new Blob([Nt],{type:"image/png"});(0,tt.I)(ln,ii=>{ii.id?Pn.replaceSelection(``):(ii==null?void 0:ii.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Pn.replaceSelection("`$$"+Cn+"$$`");break;case Kr:if(!He)return;Pn.focus(),Pn.getValue().indexOf(rr)===-1?Pn.replaceSelection(`<center><img id="${He}" width="80%" src="${rr}" class="draw-flowchart" alt="${Er||""}" /></center>`):document.getElementById(He).src=he.Z.API_SERVER+rr+"?t="+Date.now();try{setTimeout(()=>{fr(Pn.getValue())},100)}catch(ii){}break;case Dn:case $n:const hn=vn,zn=(xr=(Fn=(Bn=hn==null?void 0:hn.name)==null?void 0:Bn.split("."))==null?void 0:Fn.pop)==null?void 0:xr.call(Fn);return((Qn=hn==null?void 0:hn.type)==null?void 0:Qn.indexOf("image"))>-1||!(hn!=null&&hn.type)?hn!=null&&hn.align||hn!=null&&hn.width?Pn.replaceSelection(`<p style="text-align:${hn.align||"initial"}"><img width="${hn.width?hn.width+"%":"initial"}" src="${rr}" alt="${Er||""}" /></p>`):Pn.replaceSelection(`<img width="100%" src="${rr}" alt="${Er||""}" />`):((Yn=hn==null?void 0:hn.type)==null?void 0:Yn.indexOf("video"))>-1?Pn.replaceSelection(`<video width="100%" controls src="${rr}"></video>`):((ir=hn==null?void 0:hn.type)==null?void 0:ir.indexOf("pdf"))>-1?Pn.replaceSelection(`<a href="${rr}?type=${hn.type}&disposition=inline" target="_blank">${hn.name}</a>`):At.includes(zn)?Pn.replaceSelection(`<a href="${rr}?type=office&disposition=inline" target="_blank">${hn.name}</a>`):Pn.replaceSelection(`[${hn.name}](${rr})`),Pn.focus();case lr:const{row:jn,col:hr,align:Kn}=Cn;let Ar=`
|
|
|
`;for(let ii=0;ii<jn;ii++){let Fr=[],qr=[];for(let Ir=0;Ir<hr;Ir++)ii===1&&qr.push(ni[Kn]),Fr.push(" ");ii===1&&(Ar+=`| ${qr.join(" | ")} |
|
|
|
`),Ar+=`| ${Fr.join(hr===1?"":" | ")} |
|
|
|
`}return Pn.replaceSelection(Ar+`
|
|
|
`),Pn.focus();default:throw new Error}},[Pn,Hn]),Fe=(0,se.useMemo)(()=>{switch(Hn){case yt:return se.createElement(Sn,{callback:De,onCancel:Re});case tr:return se.createElement(un.Z,{callback:De,onCancel:Re});case Dn:return se.createElement(tt.Z,{callback:De,onCancel:Re});case gn:return se.createElement(pe,{editImgId:cr.current,callback:De,onCancel:Re});case lr:return se.createElement($t,{callback:De,onCancel:Re});case"maths-latex":return se.createElement(wt,{showSaveButton:!0,callback:De});case"inline-latex":return se.createElement(Tt.Z,{showSaveButton:!0,callback:De});default:return null}},[Hn]);function Re(){tn("")}(0,se.useEffect)(()=>{if(Cr.current){let Cn=function(Yn){xr=!0,Qn=Yn.pageY},vn=function(){xr=!1},Bn=function(Yn){if(xr){let ir=Yn.pageY-Qn;ir<0&&(ir=0),ir>300&&(ir=300);let rr=Bt+ir+"px";Ti(rr)}},Fn=Cr.current,xr=!1,Qn=0;return Fn.addEventListener("mousedown",Cn),document.addEventListener("mousemove",Bn),document.addEventListener("mouseup",vn),()=>{Fn.removeEventListener("mousedown",Cn),document.removeEventListener("mousemove",Bn),document.removeEventListener("mouseup",vn)}}},[Pn,Cr]),(0,se.useEffect)(()=>{Ti(Bt)},[Bt]);const Ze=An(dt),nt=An(ai),ct={width:Ze,height:nt},vt=(0,se.useMemo)(()=>{if(Ur){let Cn=new Date(Ur),vn=Cn.getHours(),Bn=Cn.getMinutes(),Fn=Cn.getSeconds();return vn=vn<10?"0"+vn:vn,Bn=Bn<10?"0"+Bn:Bn,Fn=Fn<10?"0"+Fn:Fn,`${vn}:${Bn}:${Fn}`}return 0},[Ur]),nn=Cn=>{const vn=[];if(nr){let Bn=-1;Cn=Cn.replace(/(@▁▁@|@▁@)/g,function(Fn,xr,Qn){vn.push({multiLine:Fn!==ra})})}return vn};function on(){window.sessionStorage.removeItem(an),Tr(!1),Jr(0)}function Un(){Tr(!1),Jr(0),Pn.setValue(window.sessionStorage.getItem(an))}(0,se.useEffect)(()=>{or[Hn]&&Hn!==$n&&Hn!==gn&&setTimeout(()=>{const Cn=document.getElementsByClassName("markdown-popup-form")[0],vn=window.innerWidth/2-Cn.offsetWidth/2,Bn=window.innerHeight/2-Cn.offsetHeight/2;sn(vn),gr(Bn)},0)},[Hn]);const yr=Cn=>{Cn.preventDefault();const vn=Cn.clientX-Ht,Bn=Cn.clientY-Ln;document.body.onmousemove=Fn=>{let xr=Fn.clientX-vn,Qn=Fn.clientY-Bn;const Yn=document.getElementsByClassName("markdown-popup-form")[0],ir=window.innerWidth-Yn.offsetWidth,rr=window.innerHeight-Yn.offsetHeight;xr=Math.max(0,Math.min(xr,ir)),Qn=Math.max(0,Math.min(Qn,rr)),Gn(Fn.clientX,Fn.clientY,vn,Bn)&&(sn(xr),gr(Qn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Gn=(Cn,vn,Bn,Fn)=>{const xr=document.body.clientHeight,Qn=document.body.clientWidth;return Cn<20&&Bn>Cn||Cn>Qn-20&&Bn<Cn||vn<20&&Fn>vn||vn>xr-20&&Fn<vn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return se.createElement(se.Fragment,null,se.createElement("div",{className:"markdown-editor-wrapper",ref:Mr},se.createElement("div",{className:`markdown-editor-container ${qn} ${Wn?"on-preview":""} ${qt?"mini":""} ${Ai?"full-screen":""}`,style:ct},se.createElement(Xe,{insertTemp:Wt,watch:Wn,fullScreen:Ai,showNullButton:Pr,showNullProgramButton:nr,onActionCallback:jr,hidetoolBar:Xn,extraUse:Lr}),se.createElement("div",{className:"markdown-editor-body"},se.createElement("div",{className:"codemirror-container"},se.createElement("textarea",{ref:vr,placeholder:si})),Wn?se.createElement("div",{ref:br,className:"preview-container"},Ft==="stex"&&se.createElement(Oe,{value:Gt}),Ft!=="stex"&&se.createElement(ot.Z,{edit:!0,disabledFill:di,showProgramFill:nr,value:Gt,openEditor:Cn=>{var vn;cr.current=Cn,(vn=fi.current)==null||vn.setHeight("100vh"),setTimeout(()=>{tn("add-flowchart")},150)}})):null))),rn?se.createElement("a",{ref:Cr,className:"editor-resize"}):null,Hn===$n&&se.createElement(Ut,{callback:De,onCancel:Re}),Hn===gn&&se.createElement(pe,{ref:fi,editImgId:cr.current,callback:De,onCancel:Re}),se.createElement(Mt.Z,null,or[Hn]&&Hn!==$n&&Hn!==gn?se.createElement(ft.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ht,top:Ln},title:se.createElement("div",{style:{cursor:"move"},onMouseDown:yr},or[Hn]),open:!0,onCancel:Re,footer:null,destroyOnClose:!0,width:Hn===gn?"1200px":null,height:Hn===gn?"80vh":null,className:"markdown-popup-form"},Fe):null))}},70859:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Ve},I:function(){return Mt}});var se=le(22150),Be=le(2453),Ne=le(69677),Ye=le(93421),ve=le(31795),Se=le(78045),Me=le(71577),we=le(15476),me=le(67294),Te=le(52262),ot=le(67294),Oe=Object.defineProperty,st=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,pt=(mt,St,Ke)=>St in mt?Oe(mt,St,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):mt[St]=Ke,zt=(mt,St)=>{for(var Ke in St||(St={}))Ge.call(St,Ke)&&pt(mt,Ke,St[Ke]);if(Je)for(var Ke of Je(St))Ce.call(St,Ke)&&pt(mt,Ke,St[Ke]);return mt},qe=(mt,St)=>st(mt,lt(St));const{useForm:ut}=se.default,xe={width:280,marginRight:10},Ee={labelCol:{span:5},wrapperCol:{span:19}};var Ve=({callback:mt,onCancel:St})=>{const[Ke]=ut();let Pt=(0,me.useRef)();function Et(Vt){Pt.current.width=Ke.getFieldValue("width"),Pt.current.align=Ke.getFieldValue("align"),mt(Vt,Pt.current)}function Yt(Vt,fn){if(Vt.status===-1){Be.ZP.error(Vt.message);return}Ke.setFieldsValue({src:`/api/attachments/${Vt.id}`,type:fn.type})}function at(Vt){let fn=Vt.target.files[0];Pt.current=fn,Mt(fn,Yt)}return ot.createElement(se.default,qe(zt({form:Ke},Ee),{className:"upload-image-panel",onFinish:Et,style:{width:470,overflow:"hidden"}}),ot.createElement(se.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ot.createElement("div",{className:"flex-container"},ot.createElement(se.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},ot.createElement(Ne.default,{style:xe})),ot.createElement(Xe,{onFileChange:at}))),ot.createElement(se.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ot.createElement(Ne.default,{style:{width:264}})),ot.createElement(se.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ot.createElement(Ye.Z,null,ot.createElement(se.default.Item,{name:"width",style:{margin:0}},ot.createElement(ve.Z,{style:{width:264}})),ot.createElement("span",{className:"ml8"},"%"))),ot.createElement(se.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ot.createElement(Se.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),ot.createElement("aside",null,ot.createElement(se.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ot.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ot.createElement(Me.ZP,{type:"default",onClick:St},"\u53D6\u6D88"))))};function Xe({onFileChange:mt}){return ot.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ot.createElement("input",{type:"file",onChange:mt}))}function Mt(mt,St){if(!mt)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Te.bg)())throw Be.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Ke=new FormData;Ke.append("editormd-image-file",mt),Ke.append("file_param_name","editormd-image-file"),Ke.append("byxhr","true");var Pt=new window.XMLHttpRequest;Pt.withCredentials=!0,Pt.addEventListener("load",function(Et){St(JSON.parse(Et.target.responseText),mt)},!1),Pt.addEventListener("error",function(Et){console.error(Et)},!1),Pt.open("POST",`${we.KI}/api/attachments.json`),Pt.send(Ke)}},76621:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Ne}});var se=le(67294),Be=le(73935);class Ne extends se.Component{constructor(ve){super(ve);const Se=window.document;this.node=Se.createElement("div"),Se.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,Be.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Be}});var se=le(67294);function Be(Ne,Ye){const ve=(0,se.useRef)();(0,se.useEffect)(()=>{ve.current=Ne}),(0,se.useEffect)(()=>{function Se(){ve.current()}if(Ye!==null){let Me=setInterval(Se,Ye);return()=>clearInterval(Me)}},[Ye])}},79061:function(bn,Zt,le){"use strict";le.r(Zt),le.d(Zt,{default:function(){return Pn}});var se=le(67294),Be=le(35973),Ne=le(68508),Ye=le(97183),ve=le(22150),Se=le(2453),Me=le(96074),we=le(85673),me=le(71230),Te=le(15746),ot=le(83062),Oe=le(69677),st=le(71577),lt=le(40043),Je=le(32027),Ge=le(14446),Ce=le(84567),pt=le(31795),zt=le(15835),qe=le(91304),ut=le(35598),xe={flex_box_center:"flex_box_center___T9vjl",flex_space_between:"flex_space_between___zZP1J",flex_box_vertical_center:"flex_box_vertical_center___vbIhw",flex_box_center_end:"flex_box_center_end___SjRau",flex_box_column:"flex_box_column___Ic_zi",wrap:"wrap___GtXAk",modal:"modal___mDuC3",titleWrap:"titleWrap___EzCZh",required:"required___KgfdI",title:"title___TMgfc",colorGray:"colorGray___xNVTs",choiceWrap:"choiceWrap___Rv9ug",answer:"answer___hVpls",activeAnswer:"activeAnswer___oJoq9",deleteIcon:"deleteIcon___bkn4b",addIcon:"addIcon___S2pDY",editorWrap:"editorWrap___BOx_r",htmlWrap:"htmlWrap___ERVlQ",radio:"radio___lrt5b",color333:"color333___pz3OT",color999:"color999___jtQ7e",questionType:"questionType___qUnUb",questionChoices:"questionChoices___n36qp"},Ee=Object.defineProperty,Ve=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,mt=(Qt,Gt,kt)=>Gt in Qt?Ee(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,St=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))Xe.call(Gt,kt)&&mt(Qt,kt,Gt[kt]);if(Ve)for(var kt of Ve(Gt))Mt.call(Gt,kt)&&mt(Qt,kt,Gt[kt]);return Qt},Ke=(Qt,Gt)=>{var kt={};for(var Wn in Qt)Xe.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&Ve)for(var Wn of Ve(Qt))Gt.indexOf(Wn)<0&&Mt.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},Pt=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const Et=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Yt=(Qt,Gt)=>{var kt=Qt,{problemset:Wn,globalSetting:ri,loading:Ai,dispatch:Zr,onRef:Hn=()=>{},editData:tn}=kt,Ur=Ke(kt,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Jr,ai]=(0,se.useState)([]),[Ti,Ki]=(0,se.useState)(),[Tr,Gr]=(0,se.useState)([]),[gt,ht]=(0,se.useState)(""),[Ht,sn]=(0,se.useState)(5),[Ln,gr]=(0,se.useState)(!1),vr=(0,Be.useParams)();(0,se.useEffect)(()=>{ai(["","","",""])},[]),(0,se.useEffect)(()=>{if(!(tn!=null&&tn.question_choices)){gr(!0);return}ht(tn==null?void 0:tn.question_title),sn(parseInt(tn==null?void 0:tn.question_score)),ai(tn==null?void 0:tn.question_choices.map(dr=>dr.choice_text));const Dr=[];tn==null||tn.standard_answer.map((dr,ei)=>{Dr.push(dr-1)}),Gr(Dr)},[tn]),(0,se.useImperativeHandle)(Gt,()=>({onSave:Mr,isEdit:Ln}));const Mr=()=>Pt(void 0,null,function*(){if(!gt)return Se.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const Dr=Jr.findIndex(jr=>!jr);if(Dr>-1)return Se.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Et[Dr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Tr.length)return Se.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Tr.length<1)return Se.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const dr=Jr.map((jr,De)=>({choice_text:jr,is_answer:Tr.includes(De)?De+1:0}));let ei;tn.question_id?ei=yield Zr({type:"exercise/editExerciseQuestion",payload:{id:tn.question_id,question_title:gt,question_type:1,question_score:"5.0",question_choices:dr.map(jr=>jr.choice_text),standard_answers:dr.filter(jr=>jr.is_answer).map(jr=>jr.is_answer)}}):ei=yield Zr({type:"exercise/addExerciseQuestion",payload:{categoryId:vr.categoryId,question_title:gt,question_type:1,question_score:"5.0",question_choices:dr.map(jr=>jr.choice_text),standard_answers:dr.filter(jr=>jr.is_answer).map(jr=>jr.is_answer)}}),ei.status===0&&(Se.ZP.success("\u4FDD\u5B58\u6210\u529F"),gr(!1),Zr({type:"exercise/editExercise",payload:St({},vr)}))}),Cr=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],br=Dr=>Pt(void 0,null,function*(){switch(Dr.id){case"del":let dr;Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Pt(this,null,function*(){yield(0,zt.Fl)({id:tn.question_id}),Zr({type:"exercise/editExercise",payload:St({},vr)})})}});break;case"up":case"down":yield Zr({type:"exercise/exeriseMoveUpDown",payload:{id:tn.question_id,opr:Dr.id}}),Zr({type:"exercise/editExercise",payload:St({},vr)});break;case"edit":gr(!0);break}}),cr=()=>{var Dr;return se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},tn.key,"\u3001\u591A\u9009\u9898"),"\uFF08",tn.question_score,"\u5206\uFF09"),!tn.hideAction&&Cr.map(function(dr,ei){return dr.id==="up"&&tn.key===1||dr.id==="down"&&tn.key===tn.len?null:se.createElement(ot.Z,{key:ei,placement:"bottom",title:dr.name},se.createElement("span",{onClick:()=>br(dr),className:dr.icon}))})),se.createElement("div",{className:"mt5"},se.createElement(ut.Z,{value:tn.question_title})),se.createElement("div",{className:xe.questionChoices},(Dr=tn==null?void 0:tn.question_choices)==null?void 0:Dr.map(function(dr,ei){return se.createElement(me.Z,null,se.createElement(Te.Z,null,se.createElement(Ce.default,{key:ei,checked:tn.standard_answer.includes(ei+1),disabled:!0},Et[ei],".")),se.createElement(Te.Z,{flex:"1"},se.createElement("span",{className:"c-black font14"},se.createElement(ut.Z,{value:dr.choice_text}))))})))},fi=()=>se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),se.createElement("p",{className:xe.titleWrap},se.createElement("span",{className:xe.required},"*"),se.createElement("span",{className:xe.title},"\u9898\u5E72\uFF1A")),se.createElement(qe.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:gt,onChange:Dr=>ht(Dr)}),Jr.map((Dr,dr)=>se.createElement("div",{className:xe.choiceWrap,key:dr},se.createElement(ot.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},se.createElement("div",{className:`${xe.answer} ${Tr.includes(dr)?xe.activeAnswer:""}`,onClick:()=>{Tr.includes(dr)?Gr(Tr.filter(ei=>ei!==dr)):Gr([...Tr,dr])}},Et[dr])),se.createElement("div",{className:xe.editorWrap},Ti===dr?se.createElement(qe.Z,{id:`single-question-option-${dr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Dr,onChange:ei=>{Jr[dr]=ei,ai(Jr)}}):se.createElement("div",{className:xe.htmlWrap,onClick:()=>Ki(dr)},se.createElement(ut.Z,{value:Dr}))),dr>1&&se.createElement(ot.Z,{title:"\u5220\u9664"},se.createElement("i",{className:`${xe.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>ai(Jr.filter((ei,jr)=>jr!==dr))})),dr<7&&dr===Jr.length-1&&se.createElement(ot.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},se.createElement("i",{className:`${xe.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>ai([...Jr,""])})))),se.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),se.createElement("p",{className:""},"\u5206\u503C\uFF1A",se.createElement(pt.Z,{value:Ht,max:1e4,min:-1,onChange:Dr=>{sn(Dr)}})," \u5206"),se.createElement("aside",{className:"tr"},tn.question_id&&se.createElement(st.ZP,{type:"default",onClick:()=>gr(!1)},"\u53D6\u6D88"),se.createElement(st.ZP,{className:"ml20",type:"primary",onClick:()=>Mr()},"\u4FDD\u5B58")));return se.createElement("section",{className:xe.wrap},!Ln&&cr(),Ln&&fi())};var at=(0,Be.connect)(({problemset:Qt,loading:Gt,globalSetting:kt})=>({problemset:Qt,globalSetting:kt,loading:Gt.effects}),null,null,{forwardRef:!0})((0,se.forwardRef)(Yt)),Vt=le(78045),fn=Object.defineProperty,dn=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Rt=(Qt,Gt,kt)=>Gt in Qt?fn(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,Sn=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))Ue.call(Gt,kt)&&Rt(Qt,kt,Gt[kt]);if(dn)for(var kt of dn(Gt))Le.call(Gt,kt)&&Rt(Qt,kt,Gt[kt]);return Qt},un=(Qt,Gt)=>{var kt={};for(var Wn in Qt)Ue.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&dn)for(var Wn of dn(Qt))Gt.indexOf(Wn)<0&&Le.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},tt=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const ft=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Xt=(Qt,Gt)=>{var kt=Qt,{problemset:Wn,globalSetting:ri,loading:Ai,dispatch:Zr,onRef:Hn=()=>{},editData:tn}=kt,Ur=un(kt,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Jr,ai]=(0,se.useState)([]),[Ti,Ki]=(0,se.useState)(),[Tr,Gr]=(0,se.useState)([]),[gt,ht]=(0,se.useState)(""),[Ht,sn]=(0,se.useState)(0),[Ln,gr]=(0,se.useState)(!1),vr=(0,Be.useParams)();(0,se.useEffect)(()=>{ai(["","","",""])},[]),(0,se.useEffect)(()=>{if(!(tn!=null&&tn.question_choices)){gr(!0);return}ht(tn==null?void 0:tn.question_title),sn(parseInt(tn==null?void 0:tn.question_score)),ai(tn==null?void 0:tn.question_choices.map(dr=>dr.choice_text));const Dr=[];tn==null||tn.standard_answer.map((dr,ei)=>{Dr.push(dr-1)}),Gr(Dr)},[tn]),(0,se.useImperativeHandle)(Gt,()=>({onSave:Mr,isEdit:Ln}));const Mr=()=>tt(void 0,null,function*(){if(!gt)return Se.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const Dr=Jr.findIndex(jr=>!jr);if(Dr>-1)return Se.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${ft[Dr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Tr.length)return Se.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Tr.length<1)return Se.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const dr=Jr.map((jr,De)=>({choice_text:jr,is_answer:Tr.includes(De)?De+1:0}));let ei;tn.question_id?ei=yield(0,Je.Kc)({id:tn.question_id,question_title:gt,question_type:1,question_score:Ht,question_choices:dr.map(jr=>jr.choice_text),standard_answers:dr.filter(jr=>jr.is_answer).map(jr=>jr.is_answer)}):ei=yield(0,Je.iV)({exercise_bank_id:vr.topicId,question_title:gt,question_type:1,question_score:"5.0",question_choices:dr.map(jr=>jr.choice_text),standard_answers:dr.filter(jr=>jr.is_answer).map(jr=>jr.is_answer)}),ei.status===0&&(Se.ZP.success("\u4FDD\u5B58\u6210\u529F"),gr(!1)),yield Zr({type:"polls/getExerciseBanks",payload:Sn({},vr)})}),Cr=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],br=Dr=>tt(void 0,null,function*(){switch(Dr.id){case"del":let dr;Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return tt(this,null,function*(){yield(0,Je.x$)({pollsId:tn.question_id}),Zr({type:"polls/getExerciseBanks",payload:Sn({},vr)})})}});break;case"up":case"down":yield(0,Je.W)({exerciseId:tn==null?void 0:tn.question_id,opr:Dr.id}),Zr({type:"polls/getExerciseBanks",payload:Sn({},vr)});break;case"edit":gr(!0);break}}),cr=()=>{var Dr;return se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},tn.key,"\u3001\u5355\u9009\u9898"),"\uFF08",tn.question_score,"\u5206\uFF09"),!tn.hideAction&&Cr.map(function(dr,ei){return dr.id==="up"&&tn.key===1||dr.id==="down"&&tn.key===tn.len?null:se.createElement(ot.Z,{key:ei,placement:"bottom",title:dr.name},se.createElement("span",{onClick:()=>br(dr),className:dr.icon}))})),se.createElement("div",{className:"mt5"},se.createElement(ut.Z,{value:tn.question_title})),se.createElement("div",{className:xe.questionChoices},(Dr=tn==null?void 0:tn.question_choices)==null?void 0:Dr.map(function(dr,ei){return se.createElement(me.Z,null,se.createElement(Te.Z,null,se.createElement(Vt.ZP,{key:ei,checked:tn.standard_answer.includes(ei+1),disabled:!0},ft[ei],".")),se.createElement(Te.Z,{flex:"1"},se.createElement("span",{className:"c-black font14"},se.createElement(ut.Z,{value:dr.choice_text}))))})))},fi=()=>se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),se.createElement("p",{className:xe.titleWrap},se.createElement("span",{className:xe.required},"*"),se.createElement("span",{className:xe.title},"\u9898\u5E72\uFF1A")),se.createElement(qe.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:gt,onChange:Dr=>ht(Dr)}),Jr.map((Dr,dr)=>se.createElement("div",{className:xe.choiceWrap,key:dr},se.createElement(ot.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},se.createElement("div",{className:`${xe.answer} ${Tr.includes(dr)?xe.activeAnswer:""}`,onClick:()=>{Tr.includes(dr)?Gr(Tr.filter(ei=>ei!==dr)):Gr([...Tr,dr])}},ft[dr])),se.createElement("div",{className:xe.editorWrap},Ti===dr?se.createElement(qe.Z,{id:`single-question-option-${dr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Dr,onChange:ei=>{Jr[dr]=ei,ai(Jr)}}):se.createElement("div",{className:xe.htmlWrap,onClick:()=>Ki(dr)},se.createElement(ut.Z,{value:Dr}))),dr>1&&se.createElement(ot.Z,{title:"\u5220\u9664"},se.createElement("i",{className:`${xe.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>ai(Jr.filter((ei,jr)=>jr!==dr))})),dr<7&&dr===Jr.length-1&&se.createElement(ot.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},se.createElement("i",{className:`${xe.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>ai([...Jr,""])})))),se.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),se.createElement("p",{className:""},"\u5206\u503C\uFF1A",se.createElement(pt.Z,{value:Ht,max:1e4,min:-1,onChange:Dr=>{sn(Dr)}})," \u5206"),se.createElement("aside",{className:"tr"},tn.question_id&&se.createElement(st.ZP,{type:"default",onClick:()=>gr(!1)},"\u53D6\u6D88"),se.createElement(st.ZP,{className:"ml20",type:"primary",onClick:()=>Mr()},"\u4FDD\u5B58")));return se.createElement("section",{className:xe.wrap},!Ln&&cr(),Ln&&fi())};var Tn=(0,Be.connect)(({problemset:Qt,loading:Gt,globalSetting:kt})=>({problemset:Qt,globalSetting:kt,loading:Gt.effects}),null,null,{forwardRef:!0})((0,se.forwardRef)(Xt)),mn=Object.defineProperty,Ut=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,yn=(Qt,Gt,kt)=>Gt in Qt?mn(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,Ae=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))jt.call(Gt,kt)&&yn(Qt,kt,Gt[kt]);if(Ut)for(var kt of Ut(Gt))_n.call(Gt,kt)&&yn(Qt,kt,Gt[kt]);return Qt},ce=(Qt,Gt)=>{var kt={};for(var Wn in Qt)jt.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&Ut)for(var Wn of Ut(Qt))Gt.indexOf(Wn)<0&&_n.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},ue=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const pe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],he=(Qt,Gt)=>{var kt=Qt,{problemset:Wn,globalSetting:ri,loading:Ai,dispatch:Zr,onRef:Hn=()=>{},editData:tn}=kt,Ur=ce(kt,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Jr,ai]=(0,se.useState)(),[Ti,Ki]=(0,se.useState)(""),[Tr,Gr]=(0,se.useState)(!1),[gt,ht]=(0,se.useState)(5),Ht=(0,Be.useParams)();(0,se.useEffect)(()=>{if(!(tn!=null&&tn.question_choices)){Gr(!0);return}Ki(tn==null?void 0:tn.question_title),ht(tn==null?void 0:tn.question_score),ai(tn.standard_answer[0]+"")},[tn]),(0,se.useImperativeHandle)(Gt,()=>({onSave:sn,isEdit:Tr}));const sn=()=>ue(void 0,null,function*(){if(!Ti)return Se.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Jr)return Se.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;const Cr=[{choice_text:"\u6B63\u786E",is_answer:Jr==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Jr==="2"?2:0}];let br;return tn.question_id?br=yield(0,Je.Kc)({id:tn.question_id,question_title:Ti,question_type:2,question_score:gt,question_choices:Cr.map(cr=>cr.choice_text),standard_answers:Cr.filter(cr=>cr.is_answer).map(cr=>cr.is_answer)}):br=yield(0,Je.iV)({exercise_bank_id:Ht.topicId,question_title:Ti,question_type:2,question_score:gt,question_choices:Cr.map(cr=>cr.choice_text),standard_answers:Cr.filter(cr=>cr.is_answer).map(cr=>cr.is_answer)}),br.status===0&&(Se.ZP.success("\u4FDD\u5B58\u6210\u529F"),Gr(!1)),Zr({type:"polls/getExerciseBanks",payload:Ae({},Ht)}),{name:Ti,choices:Cr}}),Ln=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],gr=Cr=>ue(void 0,null,function*(){switch(Cr.id){case"del":let br;Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return ue(this,null,function*(){yield(0,Je.x$)({pollsId:tn.question_id}),Zr({type:"polls/getExerciseBanks",payload:Ae({},Ht)})})}});break;case"up":case"down":yield(0,Je.W)({exerciseId:tn==null?void 0:tn.question_id,opr:Cr.id}),Zr({type:"polls/getExerciseBanks",payload:Ae({},Ht)});break;case"edit":Gr(!0);break}}),vr=()=>{var Cr;return se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},tn.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",tn.question_score,"\u5206\uFF09"),!tn.hideAction&&Ln.map(function(br,cr){return br.id==="up"&&tn.key===1||br.id==="down"&&tn.key===tn.len?null:se.createElement(ot.Z,{key:cr,placement:"bottom",title:br.name},se.createElement("span",{onClick:()=>gr(br),className:br.icon}))})),se.createElement("div",{className:"mt5"},tn.question_title),se.createElement("div",{className:xe.questionChoices},(Cr=tn==null?void 0:tn.question_choices)==null?void 0:Cr.map(function(br,cr){return se.createElement(Vt.ZP,{key:cr,checked:tn.standard_answer.includes(cr+1),disabled:!0},pe[cr],". ",se.createElement("span",{className:"c-black font14"},br.choice_text))})))},Mr=()=>se.createElement("aside",null,se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),se.createElement("p",{className:xe.titleWrap},se.createElement("span",{className:xe.required},"*"),se.createElement("span",{className:xe.title},"\u9898\u5E72\uFF1A")),se.createElement(qe.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ti,onChange:Cr=>Ki(Cr)}),se.createElement("p",{className:xe.titleWrap},se.createElement("span",{className:xe.required},"*"),se.createElement("span",{className:xe.title},"\u7B54\u6848\u9009\u9879\uFF1A",se.createElement("span",{className:xe.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),se.createElement(Vt.ZP.Group,{buttonStyle:"solid",value:Jr,onChange:Cr=>ai(Cr.target.value)},se.createElement(Vt.ZP.Button,{value:"1",className:`${xe.radio} mr40`},"\u6B63\u786E"),se.createElement(Vt.ZP.Button,{value:"2",className:xe.radio},"\u9519\u8BEF")),se.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),se.createElement("p",{className:""},"\u5206\u503C\uFF1A",se.createElement(pt.Z,{value:gt,max:1e4,min:-1,onChange:Cr=>{ht(Cr)}})," \u5206"),se.createElement("aside",{className:"tr"},tn.question_id&&se.createElement(st.ZP,{type:"default",onClick:()=>Gr(!1)},"\u53D6\u6D88"),se.createElement(st.ZP,{className:"ml20",type:"primary",onClick:()=>sn()},"\u4FDD\u5B58")));return se.createElement("section",{className:xe.wrap},!Tr&&vr(),Tr&&Mr())};var oe=(0,Be.connect)(({problemset:Qt,loading:Gt,globalSetting:kt})=>({problemset:Qt,globalSetting:kt,loading:Gt.effects}),null,null,{forwardRef:!0})((0,se.forwardRef)(he)),Ie=le(35566),Qe=le(73646),Lt=le(28706),$t=Object.defineProperty,Kt=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,et=(Qt,Gt,kt)=>Gt in Qt?$t(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,wt=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))en.call(Gt,kt)&&et(Qt,kt,Gt[kt]);if(Kt)for(var kt of Kt(Gt))Jt.call(Gt,kt)&&et(Qt,kt,Gt[kt]);return Qt},Tt=(Qt,Gt)=>{var kt={};for(var Wn in Qt)en.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&Kt)for(var Wn of Kt(Qt))Gt.indexOf(Wn)<0&&Jt.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},Ot=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const yt=null,Dn=(Qt,Gt)=>{var kt=Qt,{problemset:Wn,globalSetting:ri,loading:Ai,dispatch:Zr,editData:Hn}=kt,tn=Tt(kt,["problemset","globalSetting","loading","dispatch","editData"]);const[Ur,Jr]=(0,se.useState)(""),[ai,Ti]=(0,se.useState)(""),[Ki,Tr]=(0,se.useState)([]),[Gr,gt]=(0,se.useState)(""),[ht,Ht]=(0,se.useState)(),[sn,Ln]=(0,se.useState)(!1),[gr,vr]=(0,se.useState)(5),[Mr,Cr]=(0,se.useState)(!1),br=(0,Be.useParams)();(0,se.useEffect)(()=>{if(!(Hn!=null&&Hn.question_title)){Cr(!0);return}Jr(Hn==null?void 0:Hn.question_title),Ht(Hn==null?void 0:Hn.is_ordered),vr(Hn==null?void 0:Hn.question_score);const nt=Hn==null?void 0:Hn.standard_answer.map(ct=>ct.answer_text);Tr(nt)},[Wn.editData]),(0,se.useEffect)(()=>{Ln(!1)},[Mr]),(0,se.useImperativeHandle)(Gt,()=>({onSave:cr,isEdit:Mr}));const cr=()=>Ot(void 0,null,function*(){let nt=[],ct=!1;if(Ki.forEach((nn,on)=>{nt.push({choice_id:on+1,answer_text:[]}),nn.forEach((Un,yr)=>{nt[on].answer_text.push(Un),(!Un||!(0,Lt.eR)(Un,1e4))&&(gt(`${on}-${yr}`),Se.ZP.info(Un?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),ct=!0)})}),ct)return!1;let vt;return Hn.question_id?vt=yield(0,Je.Kc)({id:Hn.question_id,question_title:Ur,question_type:3,question_score:gr,is_ordered:ht,standard_answers:nt}):vt=yield(0,Je.iV)({exercise_bank_id:br.topicId,question_title:Ur,question_type:3,question_score:gr,is_ordered:ht,standard_answers:nt}),vt.status===0&&(Se.ZP.success("\u4FDD\u5B58\u6210\u529F"),Cr(!1)),Zr({type:"polls/getExerciseBanks",payload:wt({},br)}),{name:Ur,analysis:ai,standard_answers:nt,is_ordered:ht}}),fi=(nt,ct,vt)=>{const nn=Ki.slice();if(ct&&nn.splice(nt,ct),vt&&sn)for(let on=0;on<vt;on++)nn.splice(nt+on,0,[""]);Ln(!0),Tr(nn)},Dr=(nt,ct,vt)=>{gt("");let nn=Ki.slice();nn[nt][ct]=vt,Tr(nn)},dr=nt=>{let ct=Ki.slice();ct[nt]=[...ct[nt],""],Tr(ct)},ei=(nt,ct)=>{let vt=Ki.slice();if(!vt[nt][ct]){vt[nt]=vt[nt].filter((nn,on)=>on!==ct),Tr(vt);return}Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:xe.modal,onOk:()=>{vt[nt]=vt[nt].filter((nn,on)=>on!==ct),Tr(vt)}})},jr=nt=>{Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:xe.modal,onOk:()=>{let ct=Ki.slice();ct=Ki.filter((vt,nn)=>nt!==nn),Tr(ct)}})},De=()=>se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),se.createElement("div",null,se.createElement(Ie.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Ur,onChange:nt=>Jr(nt),showNullButton:!0,onPlaceholderChange:fi})),se.createElement("div",{className:"mt20"},Ki.map((nt,ct)=>se.createElement(Qe.Z,{key:ct,answers:nt,index:ct,is_md:!0,activeOptionErrorIndex:Gr,onAnswerChange:Dr,addChildAnswer:dr,deleteChildAnswer:ei,deleteChildAnswermain:jr}))),se.createElement("div",{className:"mt20"},Ki.length>1&&se.createElement("span",null,se.createElement(Ce.default,{checked:ht,onChange:nt=>Ht(nt.target.checked),className:`${xe.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),se.createElement("span",{className:`${xe.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),se.createElement("p",{className:""},"\u5206\u503C\uFF1A",se.createElement(pt.Z,{value:gr,max:1e4,min:-1,onChange:nt=>{vr(nt)}})," \u5206"),se.createElement("aside",{className:"tr"},Hn.question_id&&se.createElement(st.ZP,{type:"default",onClick:()=>Cr(!1)},"\u53D6\u6D88"),se.createElement(st.ZP,{className:"ml20",type:"primary",onClick:()=>cr()},"\u4FDD\u5B58"))),Fe=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Re=nt=>Ot(void 0,null,function*(){switch(nt.id){case"del":let ct;Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Ot(this,null,function*(){yield(0,Je.x$)({pollsId:Hn.question_id}),Zr({type:"polls/getExerciseBanks",payload:wt({},br)})})}});break;case"up":case"down":yield(0,Je.W)({exerciseId:Hn==null?void 0:Hn.question_id,opr:nt.id}),Zr({type:"polls/getExerciseBanks",payload:wt({},br)});break;case"edit":Cr(!0);break}}),Ze=()=>{var nt;return se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},Hn.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",Hn.question_score,"\u5206\uFF09"),!Hn.hideAction&&Fe.map(function(ct,vt){return ct.id==="up"&&Hn.key===1||ct.id==="down"&&Hn.key===Hn.len?null:se.createElement(ot.Z,{key:vt,placement:"bottom",title:ct.name},se.createElement("span",{onClick:()=>Re(ct),className:ct.icon}))})),se.createElement("div",{className:"mt5"},Hn.question_title),se.createElement("div",{className:xe.questionChoices},(nt=Hn==null?void 0:Hn.standard_answer)==null?void 0:nt.map(function(ct,vt){return se.createElement(me.Z,null,se.createElement(Te.Z,null,"\u7B54\u6848\uFF08\u586B\u7A7A",ct.choice_id,"\uFF09\uFF1A"),se.createElement(Te.Z,{flex:"1"},se.createElement(Oe.default,{key:vt,checked:Hn.standard_answer.includes(vt),disabled:!0,value:ct.answer_text})))})))};return se.createElement("section",{className:xe.wrap},!Mr&&Ze(),Mr&&De())};var gn=(0,Be.connect)(({problemset:Qt,loading:Gt,globalSetting:kt})=>({problemset:Qt,globalSetting:kt,loading:Gt.effects}),null,null,{forwardRef:!0})((0,se.forwardRef)(Dn)),$n=Object.defineProperty,Kr=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,ur=(Qt,Gt,kt)=>Gt in Qt?$n(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,ni=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))tr.call(Gt,kt)&&ur(Qt,kt,Gt[kt]);if(Kr)for(var kt of Kr(Gt))lr.call(Gt,kt)&&ur(Qt,kt,Gt[kt]);return Qt},Xr=(Qt,Gt)=>{var kt={};for(var Wn in Qt)tr.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&Kr)for(var Wn of Kr(Qt))Gt.indexOf(Wn)<0&&lr.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},Qr=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const gi=null,Sr=(Qt,Gt)=>{var kt=Qt,{problemset:Wn,globalSetting:ri,loading:Ai,dispatch:Zr,onRef:Hn=()=>{},editData:tn}=kt,Ur=Xr(kt,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[Jr,ai]=(0,se.useState)(""),[Ti,Ki]=(0,se.useState)(""),[Tr,Gr]=(0,se.useState)(""),[gt,ht]=(0,se.useState)(5),[Ht,sn]=(0,se.useState)(!1),Ln=(0,Be.useParams)();(0,se.useEffect)(()=>{var cr;if(!(tn!=null&&tn.question_title)){sn(!0);return}ai(tn==null?void 0:tn.question_title),Gr((cr=tn==null?void 0:tn.standard_answer)==null?void 0:cr[0]),ht(tn==null?void 0:tn.question_score)},[Wn.editData]),(0,se.useImperativeHandle)(Gt,()=>({onSave:gr,isEdit:Ht}));const gr=()=>Qr(void 0,null,function*(){if(!Jr)return Se.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;let cr;return tn.question_id?cr=yield(0,Je.Kc)({id:tn.question_id,question_title:Jr,question_type:4,question_score:gt,standard_answers:[Tr]}):cr=yield(0,Je.iV)({exercise_bank_id:Ln.topicId,question_title:Jr,question_type:4,question_score:gt,standard_answers:[Tr]}),cr.status===0&&(Se.ZP.success("\u4FDD\u5B58\u6210\u529F"),sn(!1),Zr({type:"polls/getExerciseBanks",payload:ni({},Ln)})),{name:Jr,answer_texts:[Tr],analysis:Ti}}),vr=()=>se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),se.createElement(qe.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Jr,onChange:cr=>ai(cr)}),se.createElement("p",{className:xe.titleWrap},se.createElement("span",{className:xe.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),se.createElement(qe.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Tr,onChange:cr=>Gr(cr)}),se.createElement("p",{className:""},"\u5206\u503C\uFF1A",se.createElement(pt.Z,{value:gt,max:1e4,min:-1,onChange:cr=>{ht(cr)}})," \u5206"),se.createElement("aside",{className:"tr"},tn.question_id&&se.createElement(st.ZP,{type:"default",onClick:()=>sn(!1)},"\u53D6\u6D88"),se.createElement(st.ZP,{className:"ml20",type:"primary",onClick:()=>gr()},"\u4FDD\u5B58"))),Mr=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Cr=cr=>Qr(void 0,null,function*(){switch(cr.id){case"del":let fi;Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Qr(this,null,function*(){yield(0,Je.x$)({pollsId:tn.question_id}),Zr({type:"polls/getExerciseBanks",payload:ni({},Ln)})})}});break;case"up":case"down":yield(0,Je.W)({exerciseId:tn==null?void 0:tn.question_id,opr:cr.id}),Zr({type:"polls/getExerciseBanks",payload:ni({},Ln)});break;case"edit":sn(!0);break}}),br=()=>se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},tn.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",tn.question_score,"\u5206\uFF09"),!tn.hideAction&&Mr.map(function(cr,fi){return cr.id==="up"&&tn.key===1||cr.id==="down"&&tn.key===tn.len?null:se.createElement(ot.Z,{key:fi,placement:"bottom",title:cr.name},se.createElement("span",{onClick:()=>Cr(cr),className:cr.icon}))})),se.createElement("div",{className:"mt5"},tn.question_title),se.createElement("div",{className:xe.questionChoices},se.createElement("p",null,se.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),se.createElement(ut.Z,{value:Tr})));return se.createElement("section",{className:xe.wrap},!Ht&&br(),Ht&&vr())};var Ei=(0,Be.connect)(({problemset:Qt,loading:Gt,globalSetting:kt})=>({problemset:Qt,globalSetting:kt,loading:Gt.effects}),null,null,{forwardRef:!0})((0,se.forwardRef)(Sr)),Ui=Object.defineProperty,ea=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,Zi=Object.prototype.propertyIsEnumerable,At=(Qt,Gt,kt)=>Gt in Qt?Ui(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,An=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))ra.call(Gt,kt)&&At(Qt,kt,Gt[kt]);if(ea)for(var kt of ea(Gt))Zi.call(Gt,kt)&&At(Qt,kt,Gt[kt]);return Qt},On=(Qt,Gt)=>{var kt={};for(var Wn in Qt)ra.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&ea)for(var Wn of ea(Qt))Gt.indexOf(Wn)<0&&Zi.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},wn=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const kr=null,or=(Qt,Gt)=>{var kt=Qt,{problemset:Wn,globalSetting:ri,loading:Ai,dispatch:Zr,editData:Hn}=kt,tn=On(kt,["problemset","globalSetting","loading","dispatch","editData"]);const[Ur,Jr]=(0,se.useState)(""),[ai,Ti]=(0,se.useState)(""),[Ki,Tr]=(0,se.useState)(""),[Gr,gt]=(0,se.useState)([]),[ht,Ht]=(0,se.useState)(""),[sn,Ln]=(0,se.useState)(),[gr,vr]=(0,se.useState)(!1),[Mr,Cr]=(0,se.useState)([]),[br,cr]=(0,se.useState)(!1),fi=(0,Be.useParams)();(0,se.useEffect)(()=>{var Fe;Hn.edit&&cr(!0),Jr(Hn.shixun_name),Ti(Hn.question_title);const Re=[];(Fe=Hn.shixun)==null||Fe.map(Ze=>{Re.push(Ze.challenge_score)}),Cr(Re)},[Hn]),(0,se.useEffect)(()=>{vr(!1)},[br]),(0,se.useImperativeHandle)(Gt,()=>({onSave:Dr,isEdit:br}));const Dr=()=>wn(void 0,null,function*(){let Fe=[];if(!1)return!1;let Ze;return Hn.question_id?Ze=yield(0,Je.Kc)({id:Hn.question_id,question_title:ai,shixun_name:Ur,shixun_id:Hn.shixun_id,question_type:5,question_scores:Mr}):Ze=yield(0,Je.iV)({exercise_bank_id:fi.topicId,question_title:ai,shixun_name:Ur,shixun_id:Hn.shixun_id,question_type:5,question_scores:Mr}),Ze.status===0&&(Se.ZP.success("\u4FDD\u5B58\u6210\u529F"),cr(!1)),yield Zr({type:"polls/getExerciseBanks",payload:An({},fi)}),{name:ai,analysis:Ki,standard_answers:Fe,is_ordered:sn}}),dr=()=>{var Fe;return se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),se.createElement("div",{className:"mt10"},se.createElement(Oe.default,{defaultValue:Ur,onChange:Re=>{Jr(Re.target.value)}})),se.createElement("div",{className:"mt10"},se.createElement(qe.Z,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:ai,onChange:Re=>{Ti(Re)}})),se.createElement("div",{className:"mt20"},(Fe=Hn.shixun)==null?void 0:Fe.map((Re,Ze)=>se.createElement(me.Z,{gutter:[20,20]},se.createElement(Te.Z,{flex:"1"},Ze+1,".",Re.challenge_name),se.createElement(Te.Z,null,se.createElement(pt.Z,{defaultValue:Mr[Ze],onChange:nt=>{Mr[Ze]=nt,Cr(Mr),console.log("srore:L",Mr[Ze])}}))))),se.createElement("div",{className:"mt20"},Gr.length>1&&se.createElement("span",null,se.createElement(Ce.default,{checked:sn,onChange:Re=>Ln(Re.target.checked),className:`${xe.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),se.createElement("span",{className:`${xe.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),se.createElement("aside",{className:"tr"},!(Hn!=null&&Hn.edit)&&se.createElement(st.ZP,{type:"default",onClick:()=>cr(!1)},"\u53D6\u6D88"),se.createElement(st.ZP,{className:"ml20",type:"primary",onClick:()=>Dr()},"\u4FDD\u5B58")))},ei=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],jr=Fe=>wn(void 0,null,function*(){switch(Fe.id){case"del":let Re;Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return wn(this,null,function*(){yield(0,Je.x$)({pollsId:Hn.question_id}),Zr({type:"polls/getExerciseBanks",payload:An({},fi)})})}});break;case"up":case"down":yield(0,Je.W)({exerciseId:Hn==null?void 0:Hn.question_id,opr:Fe.id}),Zr({type:"polls/getExerciseBanks",payload:An({},fi)});break;case"edit":cr(!0);break}}),De=()=>{var Fe;return se.createElement("aside",null,se.createElement("div",{className:xe.questionType},se.createElement("div",null,se.createElement("span",{className:"font16 c-blue"},Hn.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",Hn.question_score,"\u5206\uFF09"),se.createElement("div",{className:"tr"},se.createElement(Be.Link,{target:"_blank",to:`/shixuns/${Hn.shixun_identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),!Hn.hideAction&&ei.map(function(Re,Ze){return Re.id==="up"&&Hn.key===1||Re.id==="down"&&Hn.key===Hn.len?null:se.createElement(ot.Z,{key:Ze,placement:"bottom",title:Re.name},se.createElement("span",{onClick:()=>jr(Re),className:Re.icon}))}))),se.createElement("div",{className:"font16"},Hn.shixun_name),se.createElement("div",{className:"mt30"}),(Fe=Hn.shixun)==null?void 0:Fe.map(function(Re,Ze){return se.createElement("div",{key:Ze},"\u7B2C",Ze+1,"\u5173 ",se.createElement("span",{className:"ml10"},Re.challenge_name)," ",se.createElement("span",{className:"ml10"},Re.challenge_score))}))};return se.createElement("section",{className:xe.wrap},!br&&De(),br&&dr())};var ar=(0,Be.connect)(({problemset:Qt,loading:Gt,globalSetting:kt})=>({problemset:Qt,globalSetting:kt,loading:Gt.effects}),null,null,{forwardRef:!0})((0,se.forwardRef)(or)),Rn=le(72565),it=le(28452),dt={flex_box_center:"flex_box_center___hUmFx",flex_space_between:"flex_space_between___ZQWRF",flex_box_vertical_center:"flex_box_vertical_center___NvFWH",flex_box_center_end:"flex_box_center_end___VzfH9",flex_box_column:"flex_box_column___jzLHY",wrp:"wrp___tA5YW",drawer:"drawer___aMsAr",menu:"menu___EdF6h",actived:"actived___rUgO6",actived2:"actived2___ENpPA",listItem:"listItem___Ixzli",info:"info___KHkuz",title:"title___pDJPn",titleLeft:"titleLeft___UBBKz",titleRight:"titleRight___WrCz9",search:"search___AEwRm",description:"description___CYPQc",menuCourse:"menuCourse___gwZ0E"},Bt=Object.defineProperty,qt=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Wt=(Qt,Gt,kt)=>Gt in Qt?Bt(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,Ft=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))je.call(Gt,kt)&&Wt(Qt,kt,Gt[kt]);if(qt)for(var kt of qt(Gt))Ct.call(Gt,kt)&&Wt(Qt,kt,Gt[kt]);return Qt},an=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const{Search:rn}=Oe.default,Vn=[{id:"type",name:"\u7B5B\u9009",children:[{name:"\u5168\u90E8\u5B9E\u8BAD",id:"all",type:"type"},{name:"\u6211\u7684\u5B9E\u8BAD",id:"mine",type:"type"}]},{id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]}],Pr=({classroomList:Qt,loading:Gt,dispatch:kt,callback:Wn})=>{var ri;const Ai=(0,Be.useParams)(),Zr=(0,Be.useLocation)(),{actionTabs:Hn}=Qt,[tn]=ve.default.useForm(),{shixunLists:Ur}=Qt,[Jr,ai]=(0,se.useState)([]),[Ti,Ki]=(0,se.useState)({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"publish_time",no_jupyter:1});return(0,se.useEffect)(()=>{kt({type:"classroomList/getShixunLists",payload:Ft({},Ti)})},[Ai.categoryId]),(0,se.useEffect)(()=>{ai([])},[Qt.actionTabs.key]),Qt.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:se.createElement(Rn.Z,{title:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",placement:"bottom",height:"100%",closable:!1,open:Qt.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",rootClassName:dt.drawer,footer:se.createElement("div",{className:"tc"},se.createElement(st.ZP,{size:"middle",onClick:()=>{kt({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8}},"\u53D6\u6D88"),se.createElement(st.ZP,{size:"middle",onClick:()=>an(void 0,null,function*(){var Tr;Jr.length>1?Se.ZP.error("\u53EA\u80FD\u9009\u62E9\u4E00\u4E2A\u5B9E\u8DF5\u9879\u76EE"):Jr.length===0?Se.ZP.error("\u8BF7\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE"):(Wn&&Wn((Tr=Ur==null?void 0:Ur.shixun_list)==null?void 0:Tr.filter(Gr=>Gr.id===Jr[0])[0]),kt({type:"classroomList/setActionTabs",payload:{key:""}}))}),type:"primary"},"\u786E\u5B9A"))},se.createElement("section",{className:"tc"},se.createElement(rn,{placeholder:"\u5B9E\u8BAD\u4FE1\u606F/\u9662\u6821\u540D\u79F0/\u521B\u5EFA\u8005",enterButton:"\u641C\u7D22",size:"middle",className:dt.search,onSearch:Tr=>{Ti.keyword=Tr,kt({type:"classroomList/getShixunLists",payload:Ft({},Ti)})}})),se.createElement("section",{className:"edu-container"},Vn.map(function(Tr,Gr){var gt;return se.createElement("ul",{className:dt.menu,key:Gr},se.createElement("li",null,Tr.name),(gt=Tr==null?void 0:Tr.children)==null?void 0:gt.map(function(ht,Ht){return se.createElement("li",{key:Ht,className:Ti[Tr.id]==ht.id?dt.actived:"",onClick:()=>{Ti[Tr.id]=ht.id,Ki(Ft({},Ti)),kt({type:"classroomList/getShixunLists",payload:Ft({},Ti)})}},se.createElement("strong",null,ht.name))}))}),(ri=Ur==null?void 0:Ur.shixun_list)==null?void 0:ri.map(function(Tr,Gr){return se.createElement("div",{className:dt.listItem,key:Gr},se.createElement(Ce.default,{checked:Jr.includes(Tr.id),value:Tr.id,onChange:gt=>{let ht=Jr.indexOf(Tr.id);Jr.indexOf(Tr.id)>-1?ai(Jr.filter(Ht=>Ht!==Tr.id)):ai(Jr.concat(Tr.id))}}),se.createElement("div",{className:dt.info},se.createElement("div",{className:dt.title},se.createElement("div",{className:dt.titleLeft},se.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:Tr.title}}))),se.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},se.createElement("span",{className:dt.description,dangerouslySetInnerHTML:{__html:Tr.description}})),se.createElement("div",{className:" mt15"},Tr.challenge_names.map(function(gt,ht){return se.createElement("span",{key:ht,className:"mr30"},"\u7B2C",ht+1,"\u5173 ",gt," ")})),se.createElement(Me.Z,{dashed:!0}),se.createElement("div",{className:"c-light-black mt20"},se.createElement("span",null,Tr.author_name),se.createElement("span",{className:"ml15 mr15"},"|"),se.createElement("span",null,Tr.author_school_name),se.createElement("span",{className:"ml15 mr15"},"|"),se.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570:",Tr.level),se.createElement("span",{className:"ml15 mr15"},"|"),se.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570:"),se.createElement("span",null,Tr.study_count))))}),se.createElement("p",null)),se.createElement("div",{className:"tc"},se.createElement(it.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showQuickJumper:!0,total:Ur==null?void 0:Ur.shixuns_count,onChange:Tr=>{Ti.page=Tr,ai([]),kt({type:"classroomList/getShixunLists",payload:Ft({},Ti)})}})))};var nr=(0,Be.connect)(({classroomList:Qt,loading:Gt})=>({classroomList:Qt,loading:Gt}))(Pr),Xn={flex_box_center:"flex_box_center___SQWFF",flex_space_between:"flex_space_between___CnFKV",flex_box_vertical_center:"flex_box_vertical_center___pIPP9",flex_box_center_end:"flex_box_center_end___wiYA8",flex_box_column:"flex_box_column___elCPc",bg:"bg___EaPuT",containerTitle:"containerTitle___ixpkx",containerDesc:"containerDesc___r2R0u",listItem:"listItem___jvD98",info:"info___dCwGz",title:"title___UW6TT",titleLeft:"titleLeft___MquHc",titleRight:"titleRight___aWhE3",acitons:"acitons___yle7y"},mr=Object.defineProperty,fr=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,qn=(Qt,Gt,kt)=>Gt in Qt?mr(Qt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Qt[Gt]=kt,Si=(Qt,Gt)=>{for(var kt in Gt||(Gt={}))Yr.call(Gt,kt)&&qn(Qt,kt,Gt[kt]);if(fr)for(var kt of fr(Gt))xn.call(Gt,kt)&&qn(Qt,kt,Gt[kt]);return Qt},Ii=(Qt,Gt)=>{var kt={};for(var Wn in Qt)Yr.call(Qt,Wn)&&Gt.indexOf(Wn)<0&&(kt[Wn]=Qt[Wn]);if(Qt!=null&&fr)for(var Wn of fr(Qt))Gt.indexOf(Wn)<0&&xn.call(Qt,Wn)&&(kt[Wn]=Qt[Wn]);return kt},di=(Qt,Gt,kt)=>new Promise((Wn,ri)=>{var Ai=tn=>{try{Hn(kt.next(tn))}catch(Ur){ri(Ur)}},Zr=tn=>{try{Hn(kt.throw(tn))}catch(Ur){ri(Ur)}},Hn=tn=>tn.done?Wn(tn.value):Promise.resolve(tn.value).then(Ai,Zr);Hn((kt=kt.apply(Qt,Gt)).next())});const{SubMenu:si}=Ne.default,{Content:zi,Sider:Lr}=Ye.default,Mi=Qt=>{var Gt=Qt,{polls:kt,globalSetting:Wn,loading:ri,user:Ai,dispatch:Zr}=Gt,Hn=Ii(Gt,["polls","globalSetting","loading","user","dispatch"]),tn,Ur,Jr,ai,Ti,Ki,Tr,Gr,gt,ht,Ht,sn,Ln,gr,vr,Mr,Cr,br,cr,fi,Dr,dr,ei,jr,De,Fe,Re,Ze,nt,ct,vt,nn,on,Un,yr,Gn,Cn,vn,Bn,Fn,xr,Qn,Yn,ir,rr,Er,He,We,Nt,_t,ln,Mn,En,Zn,Nn,hn;const zn=(0,Be.useParams)(),jn=(0,Be.useLocation)(),{userInfo:hr}=Ai,[Kn]=ve.default.useForm(),[Ar,ii]=(0,se.useState)([]),[Fr,qr]=(0,se.useState)(!1),Ir=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],Rr=(0,se.useRef)();(0,se.useEffect)(()=>{var Or,mi,Yi,Xi,Pi,Ji;(Or=kt.exerciseBanks)!=null&&Or.exercise_questions&&(ii([...(mi=kt.exerciseBanks)==null?void 0:mi.exercise_questions]),Kn.setFieldsValue({exercise_name:(Xi=(Yi=kt.exerciseBanks)==null?void 0:Yi.exercise)==null?void 0:Xi.exercise_name,exercise_description:(Ji=(Pi=kt.exerciseBanks)==null?void 0:Pi.exercise)==null?void 0:Ji.exercise_description}))},[kt.exerciseBanks]),(0,se.useEffect)(()=>{Zr({type:"polls/getExerciseBanks",payload:Si({},zn)})},[zn.categoryId]);const li=()=>di(void 0,null,function*(){var Or,mi;yield Kn.validateFields();const Yi=Kn.getFieldValue();Yi.is_md=!0,Yi.topicId=(mi=(Or=kt.exerciseBanks)==null?void 0:Or.exercise)==null?void 0:mi.id,qr(!1),yield(0,Je.hO)(Si({},Yi)),Zr({type:"polls/getExerciseBanks",payload:Si({},zn)})}),pi=Or=>di(void 0,null,function*(){const mi=yield Rr==null?void 0:Rr.current;if(mi!=null&&mi.isEdit){Se.ZP.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}Or===5?Zr({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):ii([...Ar,{question_type:Or}])}),zr=function(){return Ar==null?void 0:Ar.map(function(Or,mi){if(Or.key=mi+1,Or.len=Ar.length,Or.question_type===0)return se.createElement("aside",null,se.createElement(Tn,{ref:Rr,editData:Or}),se.createElement(Me.Z,null));if(Or.question_type===1)return se.createElement("aside",null,se.createElement(at,{ref:Rr,editData:Or}),se.createElement(Me.Z,null));if(Or.question_type===2)return se.createElement("aside",null,se.createElement(oe,{ref:Rr,editData:Or}),se.createElement(Me.Z,null));if(Or.question_type===3)return se.createElement("aside",null,se.createElement(gn,{editData:Or}),se.createElement(Me.Z,null));if(Or.question_type===4)return se.createElement("aside",null,se.createElement(Ei,{editData:Or}),se.createElement(Me.Z,null));if(Or.question_type===5)return se.createElement("aside",null,se.createElement(ar,{editData:Or}),se.createElement(Me.Z,null))})};return se.createElement("section",{className:"edu-container"},se.createElement("section",{className:"animated fadeIn"},se.createElement("aside",{className:"mt10"},hr&&se.createElement(we.Z,{separator:">"},se.createElement(we.Z.Item,null,se.createElement(Be.Link,{to:`/users/${hr.login}/topics/personal`},"\u6211\u7684\u9898\u5E93")),se.createElement(we.Z.Item,null,se.createElement(Be.Link,{to:`/users/${hr==null?void 0:hr.login}/topics/${zn.topicId}/${zn.topictype}/exercise/detail`},"\u8BE6\u60C5")),se.createElement(we.Z.Item,null,"\u7F16\u8F91"))),se.createElement("aside",{className:[Xn.title,"mt20"].join(" ")},se.createElement(me.Z,{style:{width:"100%"},align:"middle"},se.createElement(Te.Z,{flex:"1"},se.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u8BD5\u5377"),se.createElement(Lt.VV,{status:[(Ur=(tn=kt.exerciseBanks)==null?void 0:tn.exercise)!=null&&Ur.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),se.createElement(Te.Z,null,se.createElement(Be.Link,{className:"font16 c-light-black",to:`/users/${hr.login}/topics/personal`},"\u8FD4\u56DE"))))),se.createElement("section",{className:[Xn.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},!Fr&&se.createElement("aside",null,se.createElement("div",{className:Xn.containerDesc},se.createElement("div",null,(ai=(Jr=kt.exerciseBanks)==null?void 0:Jr.exercise)==null?void 0:ai.exercise_name),se.createElement("div",null,se.createElement(ot.Z,{title:"\u7F16\u8F91"},se.createElement("span",{onClick:()=>qr(!0),className:"iconfont c-green ml30 icon-bianjishijuan3x"})))),se.createElement("div",{className:"c-light-black"},(Ki=(Ti=kt.exerciseBanks)==null?void 0:Ti.exercise)==null?void 0:Ki.exercise_description)),Fr&&se.createElement(ve.default,{layout:"vertical",form:Kn},se.createElement(ve.default.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},se.createElement(Oe.default,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),se.createElement(ve.default.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},se.createElement(Oe.default.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),se.createElement(ve.default.Item,{className:"tr"},se.createElement(st.ZP,{type:"primary",onClick:()=>{li()}},"\u4FDD\u5B58")))),se.createElement("p",{className:"mt10",style:{display:"flex"}},se.createElement("span",{className:"fl",style:{flex:"1"}},!!((Gr=(Tr=kt.exerciseBanks)==null?void 0:Tr.exercise_types)!=null&&Gr.q_singles)&&se.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(ht=(gt=kt.exerciseBanks)==null?void 0:gt.exercise_types)==null?void 0:ht.q_singles,"\u9898\uFF0C\u5171",(sn=(Ht=kt.exerciseBanks)==null?void 0:Ht.exercise_types)==null?void 0:sn.q_singles_scores,"\u5206"),!!((gr=(Ln=kt.exerciseBanks)==null?void 0:Ln.exercise_types)!=null&&gr.q_doubles)&&se.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(Mr=(vr=kt.exerciseBanks)==null?void 0:vr.exercise_types)==null?void 0:Mr.q_doubles,"\u9898\uFF0C\u5171",(br=(Cr=kt.exerciseBanks)==null?void 0:Cr.exercise_types)==null?void 0:br.q_doubles_scores,"\u5206"),!!((fi=(cr=kt.exerciseBanks)==null?void 0:cr.exercise_types)!=null&&fi.q_judges)&&se.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(dr=(Dr=kt.exerciseBanks)==null?void 0:Dr.exercise_types)==null?void 0:dr.q_judges,"\u9898\uFF0C\u5171",(jr=(ei=kt.exerciseBanks)==null?void 0:ei.exercise_types)==null?void 0:jr.q_judges_scores,"\u5206"),!!((Fe=(De=kt.exerciseBanks)==null?void 0:De.exercise_types)!=null&&Fe.q_nulls)&&se.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(Ze=(Re=kt.exerciseBanks)==null?void 0:Re.exercise_types)==null?void 0:Ze.q_nulls,"\u9898\uFF0C\u5171",(ct=(nt=kt.exerciseBanks)==null?void 0:nt.exercise_types)==null?void 0:ct.q_nulls_scores,"\u5206"),!!((nn=(vt=kt.exerciseBanks)==null?void 0:vt.exercise_types)!=null&&nn.q_mains)&&se.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(Un=(on=kt.exerciseBanks)==null?void 0:on.exercise_types)==null?void 0:Un.q_mains,"\u9898\uFF0C\u5171",(Gn=(yr=kt.exerciseBanks)==null?void 0:yr.exercise_types)==null?void 0:Gn.q_mains_scores,"\u5206"),!!((vn=(Cn=kt.exerciseBanks)==null?void 0:Cn.exercise_types)!=null&&vn.q_shixuns)&&se.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(Fn=(Bn=kt.exerciseBanks)==null?void 0:Bn.exercise_types)==null?void 0:Fn.q_shixuns,"\u9898\uFF0C\u5171",(Qn=(xr=kt.exerciseBanks)==null?void 0:xr.exercise_types)==null?void 0:Qn.q_shixuns_scores,"\u5206"),!!((ir=(Yn=kt.exerciseBanks)==null?void 0:Yn.exercise_types)!=null&&ir.q_pros)&&se.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(Er=(rr=kt.exerciseBanks)==null?void 0:rr.exercise_types)==null?void 0:Er.q_pros,"\u9898\uFF0C\u5171",(We=(He=kt.exerciseBanks)==null?void 0:He.exercise_types)==null?void 0:We.q_pros_scores,"\u5206")),se.createElement("span",{className:"fr"},!!((_t=(Nt=kt.exerciseBanks)==null?void 0:Nt.exercise_types)!=null&&_t.q_counts)&&se.createElement("span",null,"\u5408\u8BA1 ",se.createElement("span",{className:"color-blue"},(Mn=(ln=kt.exerciseBanks)==null?void 0:ln.exercise_types)==null?void 0:Mn.q_counts)," \u9898\uFF0C \u5171 ",se.createElement("span",{className:`${((Zn=(En=kt.exerciseBanks)==null?void 0:En.exercise_types)==null?void 0:Zn.q_scores)>100?"color-red font-bd":"color-orange"}`},(hn=(Nn=kt.exerciseBanks)==null?void 0:Nn.exercise_types)==null?void 0:hn.q_scores)," \u5206"))),Ar!=""&&se.createElement("section",{className:[Xn.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},zr()),se.createElement("section",{style:{display:"flex"},className:[Xn.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},se.createElement("div",{style:{flex:"1"}},Ir.map(function(Or,mi){return se.createElement(st.ZP,{className:"mr20",type:"primary",onClick:()=>pi(Or.id)},se.createElement(lt.Z,{className:"mr5"}),Or.name)}))),se.createElement(nr,{callback:Or=>{Ar.push({shixun:Or.challenge_names.map(mi=>({challenge_name:mi,challenge_score:5})),shixun_name:Or.title,shixun_id:Or.id,question_type:5,edit:!0}),ii([...Ar])}}))};var Pn=(0,Be.connect)(({polls:Qt,loading:Gt,user:kt,globalSetting:Wn})=>({polls:Qt,globalSetting:Wn,user:kt,loading:Gt.effects}))(Mi)},57838:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Be}});var se=le(67294);function Be(){const[,Ne]=se.useReducer(Ye=>Ye+1,0);return Ne}},9708:function(bn,Zt,le){"use strict";le.d(Zt,{F:function(){return ve},Z:function(){return Ye}});var se=le(94184),Be=le.n(se);const Ne=null;function Ye(Se,Me,we){return Be()({[`${Se}-status-success`]:Me==="success",[`${Se}-status-warning`]:Me==="warning",[`${Se}-status-error`]:Me==="error",[`${Se}-status-validating`]:Me==="validating",[`${Se}-has-feedback`]:we})}const ve=(Se,Me)=>Me||Se},85673:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Yt}});var se=le(94184),Be=le.n(se),Ne=le(37419),Ye=le(1337),ve=le(67294),Se=le(96159),Me=le(53124),we=le(42922),me=le(35874);const Te=at=>{let{children:Vt}=at;const{getPrefixCls:fn}=ve.useContext(Me.E_),dn=fn("breadcrumb");return ve.createElement("li",{className:`${dn}-separator`,"aria-hidden":"true"},Vt===""?Vt:Vt||"/")};Te.__ANT_BREADCRUMB_SEPARATOR=!0;var ot=Te,Oe=function(at,Vt){var fn={};for(var dn in at)Object.prototype.hasOwnProperty.call(at,dn)&&Vt.indexOf(dn)<0&&(fn[dn]=at[dn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,dn=Object.getOwnPropertySymbols(at);Ue<dn.length;Ue++)Vt.indexOf(dn[Ue])<0&&Object.prototype.propertyIsEnumerable.call(at,dn[Ue])&&(fn[dn[Ue]]=at[dn[Ue]]);return fn};function st(at,Vt){if(at.title===void 0||at.title===null)return null;const fn=Object.keys(Vt).join("|");return typeof at.title=="object"?at.title:String(at.title).replace(new RegExp(`:(${fn})`,"g"),(dn,Ue)=>Vt[Ue]||dn)}function lt(at,Vt,fn,dn){if(fn==null)return null;const{className:Ue,onClick:Le}=Vt,Rt=Oe(Vt,["className","onClick"]),Sn=Object.assign(Object.assign({},(0,Ye.Z)(Rt,{data:!0,aria:!0})),{onClick:Le});return dn!==void 0?ve.createElement("a",Object.assign({},Sn,{className:Be()(`${at}-link`,Ue),href:dn}),fn):ve.createElement("span",Object.assign({},Sn,{className:Be()(`${at}-link`,Ue)}),fn)}function Je(at,Vt){return(dn,Ue,Le,Rt,Sn)=>{if(Vt)return Vt(dn,Ue,Le,Rt);const un=st(dn,Ue);return lt(at,dn,un,Sn)}}var Ge=function(at,Vt){var fn={};for(var dn in at)Object.prototype.hasOwnProperty.call(at,dn)&&Vt.indexOf(dn)<0&&(fn[dn]=at[dn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,dn=Object.getOwnPropertySymbols(at);Ue<dn.length;Ue++)Vt.indexOf(dn[Ue])<0&&Object.prototype.propertyIsEnumerable.call(at,dn[Ue])&&(fn[dn[Ue]]=at[dn[Ue]]);return fn};const Ce=at=>{const{prefixCls:Vt,separator:fn="/",children:dn,menu:Ue,overlay:Le,dropdownProps:Rt,href:Sn}=at,tt=(ft=>{if(Ue||Le){const Xt=Object.assign({},Rt);if(Ue){const Tn=Ue||{},{items:mn}=Tn,Ut=Ge(Tn,["items"]);Xt.menu=Object.assign(Object.assign({},Ut),{items:mn==null?void 0:mn.map((jt,_n)=>{var{key:yn,title:Ae,label:ce,path:ue}=jt,pe=Ge(jt,["key","title","label","path"]);let he=ce!=null?ce:Ae;return ue&&(he=ve.createElement("a",{href:`${Sn}${ue}`},he)),Object.assign(Object.assign({},pe),{key:yn!=null?yn:_n,label:he})})})}else Le&&(Xt.overlay=Le);return ve.createElement(me.Z,Object.assign({placement:"bottom"},Xt),ve.createElement("span",{className:`${Vt}-overlay-link`},ft,ve.createElement(we.Z,null)))}return ft})(dn);return tt!=null?ve.createElement(ve.Fragment,null,ve.createElement("li",null,tt),fn&&ve.createElement(ot,null,fn)):null},pt=at=>{const{prefixCls:Vt,children:fn,href:dn}=at,Ue=Ge(at,["prefixCls","children","href"]),{getPrefixCls:Le}=ve.useContext(Me.E_),Rt=Le("breadcrumb",Vt);return ve.createElement(Ce,Object.assign({},Ue,{prefixCls:Rt}),lt(Rt,Ue,fn,dn))};pt.__ANT_BREADCRUMB_ITEM=!0;var zt=pt,qe=le(14747),ut=le(67968),xe=le(45503);const Ee=at=>{const{componentCls:Vt,iconCls:fn}=at;return{[Vt]:Object.assign(Object.assign({},(0,qe.Wf)(at)),{color:at.itemColor,fontSize:at.fontSize,[fn]:{fontSize:at.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:at.linkColor,transition:`color ${at.motionDurationMid}`,padding:`0 ${at.paddingXXS}px`,borderRadius:at.borderRadiusSM,height:at.lineHeight*at.fontSize,display:"inline-block",marginInline:-at.marginXXS,"&:hover":{color:at.linkHoverColor,backgroundColor:at.colorBgTextHover}},(0,qe.Qy)(at)),"li:last-child":{color:at.lastItemColor},[`${Vt}-separator`]:{marginInline:at.separatorMargin,color:at.separatorColor},[`${Vt}-link`]:{[`
|
|
|
> ${fn} + span,
|
|
|
> ${fn} + a
|
|
|
`]:{marginInlineStart:at.marginXXS}},[`${Vt}-overlay-link`]:{borderRadius:at.borderRadiusSM,height:at.lineHeight*at.fontSize,display:"inline-block",padding:`0 ${at.paddingXXS}px`,marginInline:-at.marginXXS,[`> ${fn}`]:{marginInlineStart:at.marginXXS,fontSize:at.fontSizeIcon},"&:hover":{color:at.linkHoverColor,backgroundColor:at.colorBgTextHover,a:{color:at.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${at.componentCls}-rtl`]:{direction:"rtl"}})}};var Ve=(0,ut.Z)("Breadcrumb",at=>{const Vt=(0,xe.TS)(at,{});return[Ee(Vt)]},at=>({itemColor:at.colorTextDescription,lastItemColor:at.colorText,iconFontSize:at.fontSize,linkColor:at.colorTextDescription,linkHoverColor:at.colorText,separatorColor:at.colorTextDescription,separatorMargin:at.marginXS})),Xe=function(at,Vt){var fn={};for(var dn in at)Object.prototype.hasOwnProperty.call(at,dn)&&Vt.indexOf(dn)<0&&(fn[dn]=at[dn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,dn=Object.getOwnPropertySymbols(at);Ue<dn.length;Ue++)Vt.indexOf(dn[Ue])<0&&Object.prototype.propertyIsEnumerable.call(at,dn[Ue])&&(fn[dn[Ue]]=at[dn[Ue]]);return fn};function Mt(at){const{breadcrumbName:Vt,children:fn}=at,dn=Xe(at,["breadcrumbName","children"]),Ue=Object.assign({title:Vt},dn);return fn&&(Ue.menu={items:fn.map(Le=>{var{breadcrumbName:Rt}=Le,Sn=Xe(Le,["breadcrumbName"]);return Object.assign(Object.assign({},Sn),{title:Rt})})}),Ue}function mt(at,Vt){return(0,ve.useMemo)(()=>at||(Vt?Vt.map(Mt):null),[at,Vt])}var St=function(at,Vt){var fn={};for(var dn in at)Object.prototype.hasOwnProperty.call(at,dn)&&Vt.indexOf(dn)<0&&(fn[dn]=at[dn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,dn=Object.getOwnPropertySymbols(at);Ue<dn.length;Ue++)Vt.indexOf(dn[Ue])<0&&Object.prototype.propertyIsEnumerable.call(at,dn[Ue])&&(fn[dn[Ue]]=at[dn[Ue]]);return fn};const Ke=(at,Vt)=>{if(Vt===void 0)return Vt;let fn=(Vt||"").replace(/^\//,"");return Object.keys(at).forEach(dn=>{fn=fn.replace(`:${dn}`,at[dn])}),fn},Pt=at=>{const{prefixCls:Vt,separator:fn="/",style:dn,className:Ue,rootClassName:Le,routes:Rt,items:Sn,children:un,itemRender:tt,params:ft={}}=at,Xt=St(at,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Tn,direction:mn,breadcrumb:Ut}=ve.useContext(Me.E_);let jt;const _n=Tn("breadcrumb",Vt),[yn,Ae]=Ve(_n),ce=mt(Sn,Rt),ue=Je(_n,tt);if(ce&&ce.length>0){const oe=[],Ie=Sn||Rt;jt=ce.map((Qe,Lt)=>{const{path:$t,key:Kt,type:en,menu:Jt,overlay:et,onClick:wt,className:Tt,separator:Ot,dropdownProps:yt}=Qe,Dn=Ke(ft,$t);Dn!==void 0&&oe.push(Dn);const gn=Kt!=null?Kt:Lt;if(en==="separator")return ve.createElement(ot,{key:gn},Ot);const $n={},Kr=Lt===ce.length-1;Jt?$n.menu=Jt:et&&($n.overlay=et);let{href:tr}=Qe;return oe.length&&Dn!==void 0&&(tr=`#/${oe.join("/")}`),ve.createElement(Ce,Object.assign({key:gn},$n,(0,Ye.Z)(Qe,{data:!0,aria:!0}),{className:Tt,dropdownProps:yt,href:tr,separator:Kr?"":fn,onClick:wt,prefixCls:_n}),ue(Qe,ft,Ie,oe,tr))})}else if(un){const oe=(0,Ne.Z)(un).length;jt=(0,Ne.Z)(un).map((Ie,Qe)=>{if(!Ie)return Ie;const Lt=Qe===oe-1;return(0,Se.Tm)(Ie,{separator:Lt?"":fn,key:Qe})})}const pe=Be()(_n,Ut==null?void 0:Ut.className,{[`${_n}-rtl`]:mn==="rtl"},Ue,Le,Ae),he=Object.assign(Object.assign({},Ut==null?void 0:Ut.style),dn);return yn(ve.createElement("nav",Object.assign({className:pe,style:he},Xt),ve.createElement("ol",null,jt)))};Pt.Item=zt,Pt.Separator=ot;var Et=Pt,Yt=Et},84567:function(bn,Zt,le){"use strict";le.d(Zt,{default:function(){return Ve}});var se=le(94184),Be=le.n(se),Ne=le(95860),Ye=le(67294),ve=le(53124),Se=le(98866),Me=le(65223),me=Ye.createContext(null),Te=le(63185),ot=le(45353),Oe=le(92429),st=function(Xe,Mt){var mt={};for(var St in Xe)Object.prototype.hasOwnProperty.call(Xe,St)&&Mt.indexOf(St)<0&&(mt[St]=Xe[St]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,St=Object.getOwnPropertySymbols(Xe);Ke<St.length;Ke++)Mt.indexOf(St[Ke])<0&&Object.prototype.propertyIsEnumerable.call(Xe,St[Ke])&&(mt[St[Ke]]=Xe[St[Ke]]);return mt};const lt=(Xe,Mt)=>{var mt;const{prefixCls:St,className:Ke,rootClassName:Pt,children:Et,indeterminate:Yt=!1,style:at,onMouseEnter:Vt,onMouseLeave:fn,skipGroup:dn=!1,disabled:Ue}=Xe,Le=st(Xe,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Rt,direction:Sn,checkbox:un}=Ye.useContext(ve.E_),tt=Ye.useContext(me),{isFormItemInput:ft}=Ye.useContext(Me.aM),Xt=Ye.useContext(Se.Z),Tn=(mt=(tt==null?void 0:tt.disabled)||Ue)!==null&&mt!==void 0?mt:Xt,mn=Ye.useRef(Le.value);Ye.useEffect(()=>{tt==null||tt.registerValue(Le.value)},[]),Ye.useEffect(()=>{if(!dn)return Le.value!==mn.current&&(tt==null||tt.cancelValue(mn.current),tt==null||tt.registerValue(Le.value),mn.current=Le.value),()=>tt==null?void 0:tt.cancelValue(Le.value)},[Le.value]);const Ut=Rt("checkbox",St),[jt,_n]=(0,Te.ZP)(Ut),yn=Object.assign({},Le);tt&&!dn&&(yn.onChange=function(){Le.onChange&&Le.onChange.apply(Le,arguments),tt.toggleOption&&tt.toggleOption({label:Et,value:Le.value})},yn.name=tt.name,yn.checked=tt.value.includes(Le.value));const Ae=Be()(`${Ut}-wrapper`,{[`${Ut}-rtl`]:Sn==="rtl",[`${Ut}-wrapper-checked`]:yn.checked,[`${Ut}-wrapper-disabled`]:Tn,[`${Ut}-wrapper-in-form-item`]:ft},un==null?void 0:un.className,Ke,Pt,_n),ce=Be()({[`${Ut}-indeterminate`]:Yt},Oe.A,_n),ue=Yt?"mixed":void 0;return jt(Ye.createElement(ot.Z,{component:"Checkbox",disabled:Tn},Ye.createElement("label",{className:Ae,style:Object.assign(Object.assign({},un==null?void 0:un.style),at),onMouseEnter:Vt,onMouseLeave:fn},Ye.createElement(Ne.Z,Object.assign({"aria-checked":ue},yn,{prefixCls:Ut,className:ce,disabled:Tn,ref:Mt})),Et!==void 0&&Ye.createElement("span",null,Et))))};var Ge=Ye.forwardRef(lt),Ce=le(74902),pt=le(10366),zt=function(Xe,Mt){var mt={};for(var St in Xe)Object.prototype.hasOwnProperty.call(Xe,St)&&Mt.indexOf(St)<0&&(mt[St]=Xe[St]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,St=Object.getOwnPropertySymbols(Xe);Ke<St.length;Ke++)Mt.indexOf(St[Ke])<0&&Object.prototype.propertyIsEnumerable.call(Xe,St[Ke])&&(mt[St[Ke]]=Xe[St[Ke]]);return mt};const qe=(Xe,Mt)=>{const{defaultValue:mt,children:St,options:Ke=[],prefixCls:Pt,className:Et,rootClassName:Yt,style:at,onChange:Vt}=Xe,fn=zt(Xe,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:dn,direction:Ue}=Ye.useContext(ve.E_),[Le,Rt]=Ye.useState(fn.value||mt||[]),[Sn,un]=Ye.useState([]);Ye.useEffect(()=>{"value"in fn&&Rt(fn.value||[])},[fn.value]);const tt=Ye.useMemo(()=>Ke.map(pe=>typeof pe=="string"||typeof pe=="number"?{label:pe,value:pe}:pe),[Ke]),ft=pe=>{un(he=>he.filter(oe=>oe!==pe))},Xt=pe=>{un(he=>[].concat((0,Ce.Z)(he),[pe]))},Tn=pe=>{const he=Le.indexOf(pe.value),oe=(0,Ce.Z)(Le);he===-1?oe.push(pe.value):oe.splice(he,1),"value"in fn||Rt(oe),Vt==null||Vt(oe.filter(Ie=>Sn.includes(Ie)).sort((Ie,Qe)=>{const Lt=tt.findIndex(Kt=>Kt.value===Ie),$t=tt.findIndex(Kt=>Kt.value===Qe);return Lt-$t}))},mn=dn("checkbox",Pt),Ut=`${mn}-group`,[jt,_n]=(0,Te.ZP)(mn),yn=(0,pt.Z)(fn,["value","disabled"]),Ae=Ke.length?tt.map(pe=>Ye.createElement(Ge,{prefixCls:mn,key:pe.value.toString(),disabled:"disabled"in pe?pe.disabled:fn.disabled,value:pe.value,checked:Le.includes(pe.value),onChange:pe.onChange,className:`${Ut}-item`,style:pe.style,title:pe.title},pe.label)):St,ce={toggleOption:Tn,value:Le,disabled:fn.disabled,name:fn.name,registerValue:Xt,cancelValue:ft},ue=Be()(Ut,{[`${Ut}-rtl`]:Ue==="rtl"},Et,Yt,_n);return jt(Ye.createElement("div",Object.assign({className:ue,style:at},yn,{ref:Mt}),Ye.createElement(me.Provider,{value:ce},Ae)))},ut=Ye.forwardRef(qe);var xe=Ye.memo(ut);const Ee=Ge;Ee.Group=xe,Ee.__ANT_CHECKBOX=!0;var Ve=Ee},63185:function(bn,Zt,le){"use strict";le.d(Zt,{C2:function(){return ve}});var se=le(14747),Be=le(45503),Ne=le(67968);const Ye=Se=>{const{checkboxCls:Me}=Se,we=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,se.Wf)(Se)),{display:"inline-flex",flexWrap:"wrap",columnGap:Se.marginXS,[`> ${Se.antCls}-row`]:{flex:1}}),[we]:Object.assign(Object.assign({},(0,se.Wf)(Se)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${we}`]:{marginInlineStart:0},[`&${we}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,se.Wf)(Se)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Se.borderRadiusSM,alignSelf:"center",[`${Me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Me}-inner`]:Object.assign({},(0,se.oN)(Se))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Se.checkboxSize,height:Se.checkboxSize,direction:"ltr",backgroundColor:Se.colorBgContainer,border:`${Se.lineWidth}px ${Se.lineType} ${Se.colorBorder}`,borderRadius:Se.borderRadiusSM,borderCollapse:"separate",transition:`all ${Se.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Se.checkboxSize/14*5,height:Se.checkboxSize/14*8,border:`${Se.lineWidthBold}px solid ${Se.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Se.motionDurationFast} ${Se.motionEaseInBack}, opacity ${Se.motionDurationFast}`}},"& + span":{paddingInlineStart:Se.paddingXS,paddingInlineEnd:Se.paddingXS}})},{[`
|
|
|
${we}:not(${we}-disabled),
|
|
|
${Me}:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{borderColor:Se.colorPrimary}},[`${we}:not(${we}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:Se.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:Se.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:Se.colorPrimary,borderColor:Se.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Se.motionDurationMid} ${Se.motionEaseOutBack} ${Se.motionDurationFast}`}}},[`
|
|
|
${we}-checked:not(${we}-disabled),
|
|
|
${Me}-checked:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:Se.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:Se.colorBgContainer,borderColor:Se.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Se.fontSizeLG/2,height:Se.fontSizeLG/2,backgroundColor:Se.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${we}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:Se.colorBgContainerDisabled,borderColor:Se.colorBorder,"&:after":{borderColor:Se.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Se.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:Se.colorTextDisabled}}}]};function ve(Se,Me){const we=(0,Be.TS)(Me,{checkboxCls:`.${Se}`,checkboxSize:Me.controlInteractiveSize});return[Ye(we)]}Zt.ZP=(0,Ne.Z)("Checkbox",(Se,Me)=>{let{prefixCls:we}=Me;return[ve(we,Se)]})},88258:function(bn,Zt,le){"use strict";var se=le(67294),Be=le(53124),Ne=le(32983);const Ye=ve=>{const{componentName:Se}=ve,{getPrefixCls:Me}=(0,se.useContext)(Be.E_),we=Me("empty");switch(Se){case"Table":case"List":return se.createElement(Ne.Z,{image:Ne.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return se.createElement(Ne.Z,{image:Ne.Z.PRESENTED_IMAGE_SIMPLE,className:`${we}-small`});default:return se.createElement(Ne.Z,null)}};Zt.Z=Ye},96074:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Oe}});var se=le(94184),Be=le.n(se),Ne=le(67294),Ye=le(53124),ve=le(14747),Se=le(67968),Me=le(45503);const we=st=>{const{componentCls:lt,sizePaddingEdgeHorizontal:Je,colorSplit:Ge,lineWidth:Ce,textPaddingInline:pt,orientationMargin:zt,verticalMarginInline:qe}=st;return{[lt]:Object.assign(Object.assign({},(0,ve.Wf)(st)),{borderBlockStart:`${Ce}px solid ${Ge}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:qe,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${Ce}px solid ${Ge}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${st.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${lt}-with-text`]:{display:"flex",alignItems:"center",margin:`${st.dividerHorizontalWithTextGutterMargin}px 0`,color:st.colorTextHeading,fontWeight:500,fontSize:st.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${Ge}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${Ce}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${lt}-with-text-left`]:{"&::before":{width:`${zt*100}%`},"&::after":{width:`${100-zt*100}%`}},[`&-horizontal${lt}-with-text-right`]:{"&::before":{width:`${100-zt*100}%`},"&::after":{width:`${zt*100}%`}},[`${lt}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:pt},"&-dashed":{background:"none",borderColor:Ge,borderStyle:"dashed",borderWidth:`${Ce}px 0 0`},[`&-horizontal${lt}-with-text${lt}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${lt}-dashed`]:{borderInlineStartWidth:Ce,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${lt}-with-text`]:{color:st.colorText,fontWeight:"normal",fontSize:st.fontSize},[`&-horizontal${lt}-with-text-left${lt}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${lt}-inner-text`]:{paddingInlineStart:Je}},[`&-horizontal${lt}-with-text-right${lt}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${lt}-inner-text`]:{paddingInlineEnd:Je}}})}};var me=(0,Se.Z)("Divider",st=>{const lt=(0,Me.TS)(st,{dividerHorizontalWithTextGutterMargin:st.margin,dividerHorizontalGutterMargin:st.marginLG,sizePaddingEdgeHorizontal:0});return[we(lt)]},st=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:st.marginXS})),Te=function(st,lt){var Je={};for(var Ge in st)Object.prototype.hasOwnProperty.call(st,Ge)&<.indexOf(Ge)<0&&(Je[Ge]=st[Ge]);if(st!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ce=0,Ge=Object.getOwnPropertySymbols(st);Ce<Ge.length;Ce++)lt.indexOf(Ge[Ce])<0&&Object.prototype.propertyIsEnumerable.call(st,Ge[Ce])&&(Je[Ge[Ce]]=st[Ge[Ce]]);return Je},Oe=st=>{const{getPrefixCls:lt,direction:Je,divider:Ge}=Ne.useContext(Ye.E_),{prefixCls:Ce,type:pt="horizontal",orientation:zt="center",orientationMargin:qe,className:ut,rootClassName:xe,children:Ee,dashed:Ve,plain:Xe,style:Mt}=st,mt=Te(st,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),St=lt("divider",Ce),[Ke,Pt]=me(St),Et=zt.length>0?`-${zt}`:zt,Yt=!!Ee,at=zt==="left"&&qe!=null,Vt=zt==="right"&&qe!=null,fn=Be()(St,Ge==null?void 0:Ge.className,Pt,`${St}-${pt}`,{[`${St}-with-text`]:Yt,[`${St}-with-text${Et}`]:Yt,[`${St}-dashed`]:!!Ve,[`${St}-plain`]:!!Xe,[`${St}-rtl`]:Je==="rtl",[`${St}-no-default-orientation-margin-left`]:at,[`${St}-no-default-orientation-margin-right`]:Vt},ut,xe),dn=Ne.useMemo(()=>typeof qe=="number"?qe:/^\d+$/.test(qe)?Number(qe):qe,[qe]),Ue=Object.assign(Object.assign({},at&&{marginLeft:dn}),Vt&&{marginRight:dn});return Ke(Ne.createElement("div",Object.assign({className:fn,style:Object.assign(Object.assign({},Ge==null?void 0:Ge.style),Mt)},mt,{role:"separator"}),Ee&&pt!=="vertical"&&Ne.createElement("span",{className:`${St}-inner-text`,style:Ue},Ee)))}},72565:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Gr}});var se=le(94184),Be=le.n(se),Ne=le(1413),Ye=le(97685),ve=le(67294),Se=le(73935);function Me(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var we={};function me(gt,ht){}function Te(gt,ht){}function ot(){we={}}function Oe(gt,ht,Ht){!ht&&!we[Ht]&&(gt(!1,Ht),we[Ht]=!0)}function st(gt,ht){Oe(me,gt,ht)}function lt(gt,ht){Oe(Te,gt,ht)}var Je=null,Ge=le(71002),Ce=le(18459);function pt(gt,ht,Ht){var sn=ve.useRef({});return(!("value"in sn.current)||Ht(sn.current.condition,ht))&&(sn.current.value=gt(),sn.current.condition=ht),sn.current.value}function zt(gt,ht){typeof gt=="function"?gt(ht):(0,Ge.Z)(gt)==="object"&>&&"current"in gt&&(gt.current=ht)}function qe(){for(var gt=arguments.length,ht=new Array(gt),Ht=0;Ht<gt;Ht++)ht[Ht]=arguments[Ht];var sn=ht.filter(function(Ln){return Ln});return sn.length<=1?sn[0]:function(Ln){ht.forEach(function(gr){zt(gr,Ln)})}}function ut(){for(var gt=arguments.length,ht=new Array(gt),Ht=0;Ht<gt;Ht++)ht[Ht]=arguments[Ht];return pt(function(){return qe.apply(void 0,ht)},ht,function(sn,Ln){return sn.length===Ln.length&&sn.every(function(gr,vr){return gr===Ln[vr]})})}function xe(gt){var ht,Ht,sn=(0,Ce.isMemo)(gt)?gt.type.type:gt.type;return!(typeof sn=="function"&&!((ht=sn.prototype)!==null&&ht!==void 0&&ht.render)||typeof gt=="function"&&!((Ht=gt.prototype)!==null&&Ht!==void 0&&Ht.render))}var Ee=ve.createContext(null),Ve=Ee,Xe=le(74902),Mt=Me()?ve.useLayoutEffect:ve.useEffect,mt=Mt,St=function(ht,Ht){var sn=React.useRef(!0);Mt(function(){if(!sn.current)return ht()},Ht),Mt(function(){return sn.current=!1,function(){sn.current=!0}},[])},Ke=[];function Pt(gt,ht){var Ht=ve.useState(function(){if(!Me())return null;var ei=document.createElement("div");return ei}),sn=(0,Ye.Z)(Ht,1),Ln=sn[0],gr=ve.useRef(!1),vr=ve.useContext(Ve),Mr=ve.useState(Ke),Cr=(0,Ye.Z)(Mr,2),br=Cr[0],cr=Cr[1],fi=vr||(gr.current?void 0:function(ei){cr(function(jr){var De=[ei].concat((0,Xe.Z)(jr));return De})});function Dr(){Ln.parentElement||document.body.appendChild(Ln),gr.current=!0}function dr(){var ei;(ei=Ln.parentElement)===null||ei===void 0||ei.removeChild(Ln),gr.current=!1}return mt(function(){return gt?vr?vr(Dr):Dr():dr(),dr},[gt]),mt(function(){br.length&&(br.forEach(function(ei){return ei()}),cr(Ke))},[br]),[Ln,fi]}function Et(gt,ht){if(!gt)return!1;if(gt.contains)return gt.contains(ht);for(var Ht=ht;Ht;){if(Ht===gt)return!0;Ht=Ht.parentNode}return!1}var Yt="data-rc-order",at="rc-util-key",Vt=new Map;function fn(){var gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ht=gt.mark;return ht?ht.startsWith("data-")?ht:"data-".concat(ht):at}function dn(gt){if(gt.attachTo)return gt.attachTo;var ht=document.querySelector("head");return ht||document.body}function Ue(gt){return gt==="queue"?"prependQueue":gt?"prepend":"append"}function Le(gt){return Array.from((Vt.get(gt)||gt).children).filter(function(ht){return ht.tagName==="STYLE"})}function Rt(gt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Me())return null;var Ht=ht.csp,sn=ht.prepend,Ln=document.createElement("style");Ln.setAttribute(Yt,Ue(sn)),Ht!=null&&Ht.nonce&&(Ln.nonce=Ht==null?void 0:Ht.nonce),Ln.innerHTML=gt;var gr=dn(ht),vr=gr.firstChild;if(sn){if(sn==="queue"){var Mr=Le(gr).filter(function(Cr){return["prepend","prependQueue"].includes(Cr.getAttribute(Yt))});if(Mr.length)return gr.insertBefore(Ln,Mr[Mr.length-1].nextSibling),Ln}gr.insertBefore(Ln,vr)}else gr.appendChild(Ln);return Ln}function Sn(gt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ht=dn(ht);return Le(Ht).find(function(sn){return sn.getAttribute(fn(ht))===gt})}function un(gt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ht=Sn(gt,ht);if(Ht){var sn=dn(ht);sn.removeChild(Ht)}}function tt(gt,ht){var Ht=Vt.get(gt);if(!Ht||!Et(document,Ht)){var sn=Rt("",ht),Ln=sn.parentNode;Vt.set(gt,Ln),gt.removeChild(sn)}}function ft(){Vt.clear()}function Xt(gt,ht){var Ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},sn=dn(Ht);tt(sn,Ht);var Ln=Sn(ht,Ht);if(Ln){var gr,vr;if((gr=Ht.csp)!==null&&gr!==void 0&&gr.nonce&&Ln.nonce!==((vr=Ht.csp)===null||vr===void 0?void 0:vr.nonce)){var Mr;Ln.nonce=(Mr=Ht.csp)===null||Mr===void 0?void 0:Mr.nonce}return Ln.innerHTML!==gt&&(Ln.innerHTML=gt),Ln}var Cr=Rt(gt,Ht);return Cr.setAttribute(fn(Ht),ht),Cr}var Tn;function mn(gt){if(typeof document=="undefined")return 0;if(gt||Tn===void 0){var ht=document.createElement("div");ht.style.width="100%",ht.style.height="200px";var Ht=document.createElement("div"),sn=Ht.style;sn.position="absolute",sn.top="0",sn.left="0",sn.pointerEvents="none",sn.visibility="hidden",sn.width="200px",sn.height="150px",sn.overflow="hidden",Ht.appendChild(ht),document.body.appendChild(Ht);var Ln=ht.offsetWidth;Ht.style.overflow="scroll";var gr=ht.offsetWidth;Ln===gr&&(gr=Ht.clientWidth),document.body.removeChild(Ht),Tn=Ln-gr}return Tn}function Ut(gt){var ht=gt.match(/^(.*)px$/),Ht=Number(ht==null?void 0:ht[1]);return Number.isNaN(Ht)?mn():Ht}function jt(gt){if(typeof document=="undefined"||!gt||!(gt instanceof Element))return{width:0,height:0};var ht=getComputedStyle(gt,"::-webkit-scrollbar"),Ht=ht.width,sn=ht.height;return{width:Ut(Ht),height:Ut(sn)}}function _n(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var yn="rc-util-locker-".concat(Date.now()),Ae=0;function ce(gt){var ht=!!gt,Ht=ve.useState(function(){return Ae+=1,"".concat(yn,"_").concat(Ae)}),sn=(0,Ye.Z)(Ht,1),Ln=sn[0];mt(function(){if(ht){var gr=jt(document.body).width,vr=_n();Xt(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(vr?"width: calc(100% - ".concat(gr,"px);"):"",`
|
|
|
}`),Ln)}else un(Ln);return function(){un(Ln)}},[ht,Ln])}var ue=!1;function pe(gt){return typeof gt=="boolean"&&(ue=gt),ue}var he=function(ht){return ht===!1?!1:!Me()||!ht?null:typeof ht=="string"?document.querySelector(ht):typeof ht=="function"?ht():ht},oe=ve.forwardRef(function(gt,ht){var Ht=gt.open,sn=gt.autoLock,Ln=gt.getContainer,gr=gt.debug,vr=gt.autoDestroy,Mr=vr===void 0?!0:vr,Cr=gt.children,br=ve.useState(Ht),cr=(0,Ye.Z)(br,2),fi=cr[0],Dr=cr[1],dr=fi||Ht;ve.useEffect(function(){(Mr||Ht)&&Dr(Ht)},[Ht,Mr]);var ei=ve.useState(function(){return he(Ln)}),jr=(0,Ye.Z)(ei,2),De=jr[0],Fe=jr[1];ve.useEffect(function(){var Cn=he(Ln);Fe(Cn!=null?Cn:null)});var Re=Pt(dr&&!De,gr),Ze=(0,Ye.Z)(Re,2),nt=Ze[0],ct=Ze[1],vt=De!=null?De:nt;ce(sn&&Ht&&Me()&&(vt===nt||vt===document.body));var nn=null;if(Cr&&xe(Cr)&&ht){var on=Cr;nn=on.ref}var Un=ut(nn,ht);if(!dr||!Me()||De===void 0)return null;var yr=vt===!1||pe(),Gn=Cr;return ht&&(Gn=ve.cloneElement(Cr,{ref:Un})),ve.createElement(Ve.Provider,{value:ct},yr?Gn:(0,Se.createPortal)(Gn,vt))}),Ie=oe,Qe=Ie;function Lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var $t=Lt()?ve.useLayoutEffect:ve.useEffect,Kt=function(ht,Ht){var sn=ve.useRef(!0);$t(function(){return ht(sn.current)},Ht),$t(function(){return sn.current=!1,function(){sn.current=!0}},[])},en=function(ht,Ht){Kt(function(sn){if(!sn)return ht()},Ht)},Jt=Kt,et=ve.createContext(null),wt=ve.createContext({}),Tt=et,Ot=le(4942),yt=le(87462),Dn=le(62874),gn={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(ht){var Ht=ht.keyCode;if(ht.altKey&&!ht.ctrlKey||ht.metaKey||Ht>=gn.F1&&Ht<=gn.F12)return!1;switch(Ht){case gn.ALT:case gn.CAPS_LOCK:case gn.CONTEXT_MENU:case gn.CTRL:case gn.DOWN:case gn.END:case gn.ESC:case gn.HOME:case gn.INSERT:case gn.LEFT:case gn.MAC_FF_META:case gn.META:case gn.NUMLOCK:case gn.NUM_CENTER:case gn.PAGE_DOWN:case gn.PAGE_UP:case gn.PAUSE:case gn.PRINT_SCREEN:case gn.RIGHT:case gn.SHIFT:case gn.UP:case gn.WIN_KEY:case gn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ht){if(ht>=gn.ZERO&&ht<=gn.NINE||ht>=gn.NUM_ZERO&&ht<=gn.NUM_MULTIPLY||ht>=gn.A&&ht<=gn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ht===0)return!0;switch(ht){case gn.SPACE:case gn.QUESTION_MARK:case gn.NUM_PLUS:case gn.NUM_MINUS:case gn.NUM_PERIOD:case gn.NUM_DIVISION:case gn.SEMICOLON:case gn.DASH:case gn.EQUALS:case gn.COMMA:case gn.PERIOD:case gn.SLASH:case gn.APOSTROPHE:case gn.SINGLE_QUOTE:case gn.OPEN_SQUARE_BRACKET:case gn.BACKSLASH:case gn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},$n=gn,Kr=`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`,tr=`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`,lr="".concat(Kr," ").concat(tr).split(/[\s\n]+/),ur="aria-",ni="data-";function Xr(gt,ht){return gt.indexOf(ht)===0}function Qr(gt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht;ht===!1?Ht={aria:!0,data:!0,attr:!0}:ht===!0?Ht={aria:!0}:Ht=(0,Ne.Z)({},ht);var sn={};return Object.keys(gt).forEach(function(Ln){(Ht.aria&&(Ln==="role"||Xr(Ln,ur))||Ht.data&&Xr(Ln,ni)||Ht.attr&&lr.includes(Ln))&&(sn[Ln]=gt[Ln])}),sn}function gi(gt){var ht=React.useRef();ht.current=gt;var Ht=React.useCallback(function(){for(var sn,Ln=arguments.length,gr=new Array(Ln),vr=0;vr<Ln;vr++)gr[vr]=arguments[vr];return(sn=ht.current)===null||sn===void 0?void 0:sn.call.apply(sn,[ht].concat(gr))},[]);return Ht}function Sr(gt){var ht=React.useRef(!1),Ht=React.useState(gt),sn=_slicedToArray(Ht,2),Ln=sn[0],gr=sn[1];React.useEffect(function(){return ht.current=!1,function(){ht.current=!0}},[]);function vr(Mr,Cr){Cr&&ht.current||gr(Mr)}return[Ln,vr]}function Ei(gt){return gt!==void 0}function Ui(gt,ht){var Ht=ht||{},sn=Ht.defaultValue,Ln=Ht.value,gr=Ht.onChange,vr=Ht.postState,Mr=useState(function(){return Ei(Ln)?Ln:Ei(sn)?typeof sn=="function"?sn():sn:typeof gt=="function"?gt():gt}),Cr=_slicedToArray(Mr,2),br=Cr[0],cr=Cr[1],fi=Ln!==void 0?Ln:br,Dr=vr?vr(fi):fi,dr=useEvent(gr),ei=useState([fi]),jr=_slicedToArray(ei,2),De=jr[0],Fe=jr[1];useLayoutUpdateEffect(function(){var Ze=De[0];br!==Ze&&dr(br,Ze)},[De]),useLayoutUpdateEffect(function(){Ei(Ln)||cr(Ln)},[Ln]);var Re=useEvent(function(Ze,nt){cr(Ze,nt),Fe([fi],nt)});return[Dr,Re]}var ea=le(33993);function ra(gt,ht,Ht){var sn=ve.useRef({});return(!("value"in sn.current)||Ht(sn.current.condition,ht))&&(sn.current.value=gt(),sn.current.condition=ht),sn.current.value}function Zi(gt,ht){typeof gt=="function"?gt(ht):(0,Ge.Z)(gt)==="object"&>&&"current"in gt&&(gt.current=ht)}function At(){for(var gt=arguments.length,ht=new Array(gt),Ht=0;Ht<gt;Ht++)ht[Ht]=arguments[Ht];var sn=ht.filter(function(Ln){return Ln});return sn.length<=1?sn[0]:function(Ln){ht.forEach(function(gr){Zi(gr,Ln)})}}function An(){for(var gt=arguments.length,ht=new Array(gt),Ht=0;Ht<gt;Ht++)ht[Ht]=arguments[Ht];return ra(function(){return At.apply(void 0,ht)},ht,function(sn,Ln){return sn.length!==Ln.length||sn.every(function(gr,vr){return gr!==Ln[vr]})})}function On(gt){var ht,Ht,sn=isMemo(gt)?gt.type.type:gt.type;return!(typeof sn=="function"&&!((ht=sn.prototype)!==null&&ht!==void 0&&ht.render)||typeof gt=="function"&&!((Ht=gt.prototype)!==null&&Ht!==void 0&&Ht.render))}function wn(gt){return!isValidElement(gt)||isFragment(gt)?!1:On(gt)}function kr(gt,ht,Ht,sn){if(!ht.length)return Ht;var Ln=_toArray(ht),gr=Ln[0],vr=Ln.slice(1),Mr;return!gt&&typeof gr=="number"?Mr=[]:Array.isArray(gt)?Mr=_toConsumableArray(gt):Mr=_objectSpread({},gt),sn&&Ht===void 0&&vr.length===1?delete Mr[gr][vr[0]]:Mr[gr]=kr(Mr[gr],vr,Ht,sn),Mr}function or(gt,ht,Ht){var sn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return ht.length&&sn&&Ht===void 0&&!get(gt,ht.slice(0,-1))?gt:kr(gt,ht,Ht,sn)}function ar(gt){return _typeof(gt)==="object"&>!==null&&Object.getPrototypeOf(gt)===Object.prototype}function Rn(gt){return Array.isArray(gt)?[]:{}}var it=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function dt(){for(var gt=arguments.length,ht=new Array(gt),Ht=0;Ht<gt;Ht++)ht[Ht]=arguments[Ht];var sn=Rn(ht[0]);return ht.forEach(function(Ln){function gr(vr,Mr){var Cr=new Set(Mr),br=get(Ln,vr),cr=Array.isArray(br);if(cr||ar(br)){if(!Cr.has(br)){Cr.add(br);var fi=get(sn,vr);cr?sn=or(sn,vr,[]):(!fi||_typeof(fi)!=="object")&&(sn=or(sn,vr,Rn(br))),it(br).forEach(function(Dr){gr([].concat(_toConsumableArray(vr),[Dr]),Cr)})}}else sn=or(sn,vr,br)}gr([])}),sn}var Bt={},qt=[],je=function(ht){qt.push(ht)};function Ct(gt,ht){if(0)var Ht}function Wt(gt,ht){if(0)var Ht}function Ft(){Bt={}}function an(gt,ht,Ht){!ht&&!Bt[Ht]&&(gt(!1,Ht),Bt[Ht]=!0)}function rn(gt,ht){an(Ct,gt,ht)}function Vn(gt,ht){an(Wt,gt,ht)}rn.preMessage=je,rn.resetWarned=Ft,rn.noteOnce=Vn;var Pr=rn,nr=function(ht){var Ht=ht.prefixCls,sn=ht.className,Ln=ht.style,gr=ht.children,vr=ht.containerRef,Mr=ht.id,Cr=ht.onMouseEnter,br=ht.onMouseOver,cr=ht.onMouseLeave,fi=ht.onClick,Dr=ht.onKeyDown,dr=ht.onKeyUp,ei={onMouseEnter:Cr,onMouseOver:br,onMouseLeave:cr,onClick:fi,onKeyDown:Dr,onKeyUp:dr},jr=ve.useContext(wt),De=jr.panel,Fe=An(De,vr);return ve.createElement(ve.Fragment,null,ve.createElement("div",(0,yt.Z)({id:Mr,className:Be()("".concat(Ht,"-content"),sn),style:(0,Ne.Z)({},Ln),"aria-modal":"true",role:"dialog",ref:Fe},ei),gr))},Xn=nr;function mr(gt){return typeof gt=="string"&&String(Number(gt))===gt?(Pr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(gt)):gt}function fr(gt){warning(!("wrapperClassName"in gt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!gt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Yr={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function xn(gt,ht){var Ht,sn,Ln,gr,vr=gt.prefixCls,Mr=gt.open,Cr=gt.placement,br=gt.inline,cr=gt.push,fi=gt.forceRender,Dr=gt.autoFocus,dr=gt.keyboard,ei=gt.rootClassName,jr=gt.rootStyle,De=gt.zIndex,Fe=gt.className,Re=gt.id,Ze=gt.style,nt=gt.motion,ct=gt.width,vt=gt.height,nn=gt.children,on=gt.contentWrapperStyle,Un=gt.mask,yr=gt.maskClosable,Gn=gt.maskMotion,Cn=gt.maskClassName,vn=gt.maskStyle,Bn=gt.afterOpenChange,Fn=gt.onClose,xr=gt.onMouseEnter,Qn=gt.onMouseOver,Yn=gt.onMouseLeave,ir=gt.onClick,rr=gt.onKeyDown,Er=gt.onKeyUp,He=ve.useRef(),We=ve.useRef(),Nt=ve.useRef();ve.useImperativeHandle(ht,function(){return He.current});var _t=function(Rr){var li=Rr.keyCode,pi=Rr.shiftKey;switch(li){case $n.TAB:{if(li===$n.TAB){if(!pi&&document.activeElement===Nt.current){var zr;(zr=We.current)===null||zr===void 0||zr.focus({preventScroll:!0})}else if(pi&&document.activeElement===We.current){var Or;(Or=Nt.current)===null||Or===void 0||Or.focus({preventScroll:!0})}}break}case $n.ESC:{Fn&&dr&&(Rr.stopPropagation(),Fn(Rr));break}}};ve.useEffect(function(){if(Mr&&Dr){var Ir;(Ir=He.current)===null||Ir===void 0||Ir.focus({preventScroll:!0})}},[Mr]);var ln=ve.useState(!1),Mn=(0,Ye.Z)(ln,2),En=Mn[0],Zn=Mn[1],Nn=ve.useContext(Tt),hn;cr===!1?hn={distance:0}:cr===!0?hn={}:hn=cr||{};var zn=(Ht=(sn=(Ln=hn)===null||Ln===void 0?void 0:Ln.distance)!==null&&sn!==void 0?sn:Nn==null?void 0:Nn.pushDistance)!==null&&Ht!==void 0?Ht:180,jn=ve.useMemo(function(){return{pushDistance:zn,push:function(){Zn(!0)},pull:function(){Zn(!1)}}},[zn]);ve.useEffect(function(){if(Mr){var Ir;Nn==null||(Ir=Nn.push)===null||Ir===void 0||Ir.call(Nn)}else{var Rr;Nn==null||(Rr=Nn.pull)===null||Rr===void 0||Rr.call(Nn)}},[Mr]),ve.useEffect(function(){return function(){var Ir;Nn==null||(Ir=Nn.pull)===null||Ir===void 0||Ir.call(Nn)}},[]);var hr=Un&&ve.createElement(Dn.Z,(0,yt.Z)({key:"mask"},Gn,{visible:Mr}),function(Ir,Rr){var li=Ir.className,pi=Ir.style;return ve.createElement("div",{className:Be()("".concat(vr,"-mask"),li,Cn),style:(0,Ne.Z)((0,Ne.Z)({},pi),vn),onClick:yr&&Mr?Fn:void 0,ref:Rr})}),Kn=typeof nt=="function"?nt(Cr):nt,Ar={};if(En&&zn)switch(Cr){case"top":Ar.transform="translateY(".concat(zn,"px)");break;case"bottom":Ar.transform="translateY(".concat(-zn,"px)");break;case"left":Ar.transform="translateX(".concat(zn,"px)");break;default:Ar.transform="translateX(".concat(-zn,"px)");break}Cr==="left"||Cr==="right"?Ar.width=mr(ct):Ar.height=mr(vt);var ii={onMouseEnter:xr,onMouseOver:Qn,onMouseLeave:Yn,onClick:ir,onKeyDown:rr,onKeyUp:Er},Fr=ve.createElement(Dn.Z,(0,yt.Z)({key:"panel"},Kn,{visible:Mr,forceRender:fi,onVisibleChanged:function(Rr){Bn==null||Bn(Rr)},removeOnLeave:!1,leavedClassName:"".concat(vr,"-content-wrapper-hidden")}),function(Ir,Rr){var li=Ir.className,pi=Ir.style;return ve.createElement("div",(0,yt.Z)({className:Be()("".concat(vr,"-content-wrapper"),li),style:(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},Ar),pi),on)},Qr(gt,{data:!0})),ve.createElement(Xn,(0,yt.Z)({id:Re,containerRef:Rr,prefixCls:vr,className:Fe,style:Ze},ii),nn))}),qr=(0,Ne.Z)({},jr);return De&&(qr.zIndex=De),ve.createElement(Tt.Provider,{value:jn},ve.createElement("div",{className:Be()(vr,"".concat(vr,"-").concat(Cr),ei,(gr={},(0,Ot.Z)(gr,"".concat(vr,"-open"),Mr),(0,Ot.Z)(gr,"".concat(vr,"-inline"),br),gr)),style:qr,tabIndex:-1,ref:He,onKeyDown:_t},hr,ve.createElement("div",{tabIndex:0,ref:We,style:Yr,"aria-hidden":"true","data-sentinel":"start"}),Fr,ve.createElement("div",{tabIndex:0,ref:Nt,style:Yr,"aria-hidden":"true","data-sentinel":"end"})))}var qn=ve.forwardRef(xn),Si=qn,Ii=function(ht){var Ht=ht.open,sn=Ht===void 0?!1:Ht,Ln=ht.prefixCls,gr=Ln===void 0?"rc-drawer":Ln,vr=ht.placement,Mr=vr===void 0?"right":vr,Cr=ht.autoFocus,br=Cr===void 0?!0:Cr,cr=ht.keyboard,fi=cr===void 0?!0:cr,Dr=ht.width,dr=Dr===void 0?378:Dr,ei=ht.mask,jr=ei===void 0?!0:ei,De=ht.maskClosable,Fe=De===void 0?!0:De,Re=ht.getContainer,Ze=ht.forceRender,nt=ht.afterOpenChange,ct=ht.destroyOnClose,vt=ht.onMouseEnter,nn=ht.onMouseOver,on=ht.onMouseLeave,Un=ht.onClick,yr=ht.onKeyDown,Gn=ht.onKeyUp,Cn=ht.panelRef,vn=ve.useState(!1),Bn=(0,Ye.Z)(vn,2),Fn=Bn[0],xr=Bn[1],Qn=ve.useState(!1),Yn=(0,Ye.Z)(Qn,2),ir=Yn[0],rr=Yn[1];Jt(function(){rr(!0)},[]);var Er=ir?sn:!1,He=ve.useRef(),We=ve.useRef();Jt(function(){Er&&(We.current=document.activeElement)},[Er]);var Nt=function(Zn){var Nn;if(xr(Zn),nt==null||nt(Zn),!Zn&&We.current&&!((Nn=He.current)!==null&&Nn!==void 0&&Nn.contains(We.current))){var hn;(hn=We.current)===null||hn===void 0||hn.focus({preventScroll:!0})}},_t=ve.useMemo(function(){return{panel:Cn}},[Cn]);if(!Ze&&!Fn&&!Er&&ct)return null;var ln={onMouseEnter:vt,onMouseOver:nn,onMouseLeave:on,onClick:Un,onKeyDown:yr,onKeyUp:Gn},Mn=(0,Ne.Z)((0,Ne.Z)({},ht),{},{open:Er,prefixCls:gr,placement:Mr,autoFocus:br,keyboard:fi,width:dr,mask:jr,maskClosable:Fe,inline:Re===!1,afterOpenChange:Nt,ref:He},ln);return ve.createElement(wt.Provider,{value:_t},ve.createElement(Qe,{open:Er||Ze||Fn,autoDestroy:!1,getContainer:Re,autoLock:jr&&(Er||Fn)},ve.createElement(Si,Mn)))},di=Ii,si=di,zi=le(33603),Lr=le(53124),Mi=le(65223),Pn=le(69760),Gt=gt=>{const{prefixCls:ht,title:Ht,footer:sn,extra:Ln,closeIcon:gr,closable:vr,onClose:Mr,headerStyle:Cr,drawerStyle:br,bodyStyle:cr,footerStyle:fi,children:Dr}=gt,dr=ve.useCallback(Re=>ve.createElement("button",{type:"button",onClick:Mr,"aria-label":"Close",className:`${ht}-close`},Re),[Mr]),[ei,jr]=(0,Pn.Z)(vr,gr,dr,void 0,!0),De=ve.useMemo(()=>!Ht&&!ei?null:ve.createElement("div",{style:Cr,className:Be()(`${ht}-header`,{[`${ht}-header-close-only`]:ei&&!Ht&&!Ln})},ve.createElement("div",{className:`${ht}-header-title`},jr,Ht&&ve.createElement("div",{className:`${ht}-title`},Ht)),Ln&&ve.createElement("div",{className:`${ht}-extra`},Ln)),[ei,jr,Ln,Cr,ht,Ht]),Fe=ve.useMemo(()=>{if(!sn)return null;const Re=`${ht}-footer`;return ve.createElement("div",{className:Re,style:fi},sn)},[sn,fi,ht]);return ve.createElement("div",{className:`${ht}-wrapper-body`,style:br},De,ve.createElement("div",{className:`${ht}-body`,style:cr},Dr),Fe)},kt=le(4173),Wn=le(67968),ri=le(45503),Zr=gt=>{const{componentCls:ht,motionDurationSlow:Ht}=gt,sn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Ht}`}}};return{[ht]:{[`${ht}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Ht}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${ht}-panel-motion`]:{"&-left":[sn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[sn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[sn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[sn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Hn=gt=>{const{componentCls:ht,zIndexPopup:Ht,colorBgMask:sn,colorBgElevated:Ln,motionDurationSlow:gr,motionDurationMid:vr,padding:Mr,paddingLG:Cr,fontSizeLG:br,lineHeightLG:cr,lineWidth:fi,lineType:Dr,colorSplit:dr,marginSM:ei,colorIcon:jr,colorIconHover:De,colorText:Fe,fontWeightStrong:Re,footerPaddingBlock:Ze,footerPaddingInline:nt}=gt,ct=`${ht}-content-wrapper`;return{[ht]:{position:"fixed",inset:0,zIndex:Ht,pointerEvents:"none","&-pure":{position:"relative",background:Ln,[`&${ht}-left`]:{boxShadow:gt.boxShadowDrawerLeft},[`&${ht}-right`]:{boxShadow:gt.boxShadowDrawerRight},[`&${ht}-top`]:{boxShadow:gt.boxShadowDrawerUp},[`&${ht}-bottom`]:{boxShadow:gt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${ht}-mask`]:{position:"absolute",inset:0,zIndex:Ht,background:sn,pointerEvents:"auto"},[ct]:{position:"absolute",zIndex:Ht,maxWidth:"100vw",transition:`all ${gr}`,"&-hidden":{display:"none"}},[`&-left > ${ct}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:gt.boxShadowDrawerLeft},[`&-right > ${ct}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:gt.boxShadowDrawerRight},[`&-top > ${ct}`]:{top:0,insetInline:0,boxShadow:gt.boxShadowDrawerUp},[`&-bottom > ${ct}`]:{bottom:0,insetInline:0,boxShadow:gt.boxShadowDrawerDown},[`${ht}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Ln,pointerEvents:"auto"},[`${ht}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${ht}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Mr}px ${Cr}px`,fontSize:br,lineHeight:cr,borderBottom:`${fi}px ${Dr} ${dr}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${ht}-extra`]:{flex:"none"},[`${ht}-close`]:{display:"inline-block",marginInlineEnd:ei,color:jr,fontWeight:Re,fontSize:br,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${vr}`,textRendering:"auto","&:focus, &:hover":{color:De,textDecoration:"none"}},[`${ht}-title`]:{flex:1,margin:0,color:Fe,fontWeight:gt.fontWeightStrong,fontSize:br,lineHeight:cr},[`${ht}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Cr,overflow:"auto"},[`${ht}-footer`]:{flexShrink:0,padding:`${Ze}px ${nt}px`,borderTop:`${fi}px ${Dr} ${dr}`},"&-rtl":{direction:"rtl"}}}};var tn=(0,Wn.Z)("Drawer",gt=>{const ht=(0,ri.TS)(gt,{});return[Hn(ht),Zr(ht)]},gt=>({zIndexPopup:gt.zIndexPopupBase,footerPaddingBlock:gt.paddingXS,footerPaddingInline:gt.padding})),Ur=le(16569),Jr=function(gt,ht){var Ht={};for(var sn in gt)Object.prototype.hasOwnProperty.call(gt,sn)&&ht.indexOf(sn)<0&&(Ht[sn]=gt[sn]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ln=0,sn=Object.getOwnPropertySymbols(gt);Ln<sn.length;Ln++)ht.indexOf(sn[Ln])<0&&Object.prototype.propertyIsEnumerable.call(gt,sn[Ln])&&(Ht[sn[Ln]]=gt[sn[Ln]]);return Ht};const ai=null,Ti={distance:180},Ki=gt=>{var ht;const{rootClassName:Ht,width:sn,height:Ln,size:gr="default",mask:vr=!0,push:Mr=Ti,open:Cr,afterOpenChange:br,onClose:cr,prefixCls:fi,getContainer:Dr,style:dr,className:ei,visible:jr,afterVisibleChange:De}=gt,Fe=Jr(gt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Re,getPrefixCls:Ze,direction:nt,drawer:ct}=ve.useContext(Lr.E_),vt=Ze("drawer",fi),[nn,on]=tn(vt),Un=Dr===void 0&&Re?()=>Re(document.body):Dr,yr=Be()({"no-mask":!vr,[`${vt}-rtl`]:nt==="rtl"},Ht,on),Gn=ve.useMemo(()=>sn!=null?sn:gr==="large"?736:378,[sn,gr]),Cn=ve.useMemo(()=>Ln!=null?Ln:gr==="large"?736:378,[Ln,gr]),vn={motionName:(0,zi.m)(vt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Bn=xr=>({motionName:(0,zi.m)(vt,`panel-motion-${xr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Fn=(0,Ur.H)();return nn(ve.createElement(kt.BR,null,ve.createElement(Mi.Ux,{status:!0,override:!0},ve.createElement(si,Object.assign({prefixCls:vt,onClose:cr,maskMotion:vn,motion:Bn},Fe,{open:Cr!=null?Cr:jr,mask:vr,push:Mr,width:Gn,height:Cn,style:Object.assign(Object.assign({},ct==null?void 0:ct.style),dr),className:Be()(ct==null?void 0:ct.className,ei),rootClassName:yr,getContainer:Un,afterOpenChange:br!=null?br:De,panelRef:Fn}),ve.createElement(Gt,Object.assign({prefixCls:vt},Fe,{onClose:cr}))))))},Tr=gt=>{const{prefixCls:ht,style:Ht,className:sn,placement:Ln="right"}=gt,gr=Jr(gt,["prefixCls","style","className","placement"]),{getPrefixCls:vr}=ve.useContext(Lr.E_),Mr=vr("drawer",ht),[Cr,br]=tn(Mr),cr=Be()(Mr,`${Mr}-pure`,`${Mr}-${Ln}`,br,sn);return Cr(ve.createElement("div",{className:cr,style:Ht},ve.createElement(Gt,Object.assign({prefixCls:Mr},gr))))};Ki._InternalPanelDoNotUseOrYouWillBeFired=Tr;var Gr=Ki},35874:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return he}});var se=le(67294),Be=le(91034),Ne=le(94184),Ye=le.n(Ne),ve=le(87462),Se=le(4942),Me=le(97685),we=le(45987),me=le(62709),Te=le(71002),ot=le(12060);function Oe(oe,Ie,Qe){var Lt=React.useRef({});return(!("value"in Lt.current)||Qe(Lt.current.condition,Ie))&&(Lt.current.value=oe(),Lt.current.condition=Ie),Lt.current.value}function st(oe,Ie){typeof oe=="function"?oe(Ie):(0,Te.Z)(oe)==="object"&&oe&&"current"in oe&&(oe.current=Ie)}function lt(){for(var oe=arguments.length,Ie=new Array(oe),Qe=0;Qe<oe;Qe++)Ie[Qe]=arguments[Qe];var Lt=Ie.filter(function($t){return $t});return Lt.length<=1?Lt[0]:function($t){Ie.forEach(function(Kt){st(Kt,$t)})}}function Je(){for(var oe=arguments.length,Ie=new Array(oe),Qe=0;Qe<oe;Qe++)Ie[Qe]=arguments[Qe];return useMemo(function(){return lt.apply(void 0,Ie)},Ie,function(Lt,$t){return Lt.length===$t.length&&Lt.every(function(Kt,en){return Kt===$t[en]})})}function Ge(oe){var Ie,Qe,Lt=(0,ot.isMemo)(oe)?oe.type.type:oe.type;return!(typeof Lt=="function"&&!((Ie=Lt.prototype)!==null&&Ie!==void 0&&Ie.render)||typeof oe=="function"&&!((Qe=oe.prototype)!==null&&Qe!==void 0&&Qe.render))}var Ce={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(Ie){var Qe=Ie.keyCode;if(Ie.altKey&&!Ie.ctrlKey||Ie.metaKey||Qe>=Ce.F1&&Qe<=Ce.F12)return!1;switch(Qe){case Ce.ALT:case Ce.CAPS_LOCK:case Ce.CONTEXT_MENU:case Ce.CTRL:case Ce.DOWN:case Ce.END:case Ce.ESC:case Ce.HOME:case Ce.INSERT:case Ce.LEFT:case Ce.MAC_FF_META:case Ce.META:case Ce.NUMLOCK:case Ce.NUM_CENTER:case Ce.PAGE_DOWN:case Ce.PAGE_UP:case Ce.PAUSE:case Ce.PRINT_SCREEN:case Ce.RIGHT:case Ce.SHIFT:case Ce.UP:case Ce.WIN_KEY:case Ce.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ie){if(Ie>=Ce.ZERO&&Ie<=Ce.NINE||Ie>=Ce.NUM_ZERO&&Ie<=Ce.NUM_MULTIPLY||Ie>=Ce.A&&Ie<=Ce.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ie===0)return!0;switch(Ie){case Ce.SPACE:case Ce.QUESTION_MARK:case Ce.NUM_PLUS:case Ce.NUM_MINUS:case Ce.NUM_PERIOD:case Ce.NUM_DIVISION:case Ce.SEMICOLON:case Ce.DASH:case Ce.EQUALS:case Ce.COMMA:case Ce.PERIOD:case Ce.SLASH:case Ce.APOSTROPHE:case Ce.SINGLE_QUOTE:case Ce.OPEN_SQUARE_BRACKET:case Ce.BACKSLASH:case Ce.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},pt=Ce,zt=function(Ie){return+setTimeout(Ie,16)},qe=function(Ie){return clearTimeout(Ie)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(zt=function(Ie){return window.requestAnimationFrame(Ie)},qe=function(Ie){return window.cancelAnimationFrame(Ie)});var ut=0,xe=new Map;function Ee(oe){xe.delete(oe)}var Ve=function(Ie){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ut+=1;var Lt=ut;function $t(Kt){if(Kt===0)Ee(Lt),Ie();else{var en=zt(function(){$t(Kt-1)});xe.set(Lt,en)}}return $t(Qe),Lt};Ve.cancel=function(oe){var Ie=xe.get(oe);return Ee(Ie),qe(Ie)};var Xe=Ve,Mt=pt.ESC,mt=pt.TAB;function St(oe){var Ie=oe.visible,Qe=oe.triggerRef,Lt=oe.onVisibleChange,$t=oe.autoFocus,Kt=oe.overlayRef,en=se.useRef(!1),Jt=function(){if(Ie){var Ot,yt;(Ot=Qe.current)===null||Ot===void 0||(yt=Ot.focus)===null||yt===void 0||yt.call(Ot),Lt==null||Lt(!1)}},et=function(){var Ot;return(Ot=Kt.current)!==null&&Ot!==void 0&&Ot.focus?(Kt.current.focus(),en.current=!0,!0):!1},wt=function(Ot){switch(Ot.keyCode){case Mt:Jt();break;case mt:{var yt=!1;en.current||(yt=et()),yt?Ot.preventDefault():Jt();break}}};se.useEffect(function(){return Ie?(window.addEventListener("keydown",wt),$t&&Xe(et,3),function(){window.removeEventListener("keydown",wt),en.current=!1}):function(){en.current=!1}},[Ie])}var Ke=(0,se.forwardRef)(function(oe,Ie){var Qe=oe.overlay,Lt=oe.arrow,$t=oe.prefixCls,Kt=(0,se.useMemo)(function(){var Jt;return typeof Qe=="function"?Jt=Qe():Jt=Qe,Jt},[Qe]),en=lt(Ie,Kt==null?void 0:Kt.ref);return se.createElement(se.Fragment,null,Lt&&se.createElement("div",{className:"".concat($t,"-arrow")}),se.cloneElement(Kt,{ref:Ge(Kt)?en:void 0}))}),Pt=Ke,Et={adjustX:1,adjustY:1},Yt=[0,0],at={topLeft:{points:["bl","tl"],overflow:Et,offset:[0,-4],targetOffset:Yt},top:{points:["bc","tc"],overflow:Et,offset:[0,-4],targetOffset:Yt},topRight:{points:["br","tr"],overflow:Et,offset:[0,-4],targetOffset:Yt},bottomLeft:{points:["tl","bl"],overflow:Et,offset:[0,4],targetOffset:Yt},bottom:{points:["tc","bc"],overflow:Et,offset:[0,4],targetOffset:Yt},bottomRight:{points:["tr","br"],overflow:Et,offset:[0,4],targetOffset:Yt}},Vt=at,fn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function dn(oe,Ie){var Qe,Lt=oe.arrow,$t=Lt===void 0?!1:Lt,Kt=oe.prefixCls,en=Kt===void 0?"rc-dropdown":Kt,Jt=oe.transitionName,et=oe.animation,wt=oe.align,Tt=oe.placement,Ot=Tt===void 0?"bottomLeft":Tt,yt=oe.placements,Dn=yt===void 0?Vt:yt,gn=oe.getPopupContainer,$n=oe.showAction,Kr=oe.hideAction,tr=oe.overlayClassName,lr=oe.overlayStyle,ur=oe.visible,ni=oe.trigger,Xr=ni===void 0?["hover"]:ni,Qr=oe.autoFocus,gi=oe.overlay,Sr=oe.children,Ei=oe.onVisibleChange,Ui=(0,we.Z)(oe,fn),ea=se.useState(),ra=(0,Me.Z)(ea,2),Zi=ra[0],At=ra[1],An="visible"in oe?ur:Zi,On=se.useRef(null),wn=se.useRef(null),kr=se.useRef(null);se.useImperativeHandle(Ie,function(){return On.current});var or=function(Wt){At(Wt),Ei==null||Ei(Wt)};St({visible:An,triggerRef:kr,onVisibleChange:or,autoFocus:Qr,overlayRef:wn});var ar=function(Wt){var Ft=oe.onOverlayClick;At(!1),Ft&&Ft(Wt)},Rn=function(){return se.createElement(Pt,{ref:wn,overlay:gi,prefixCls:en,arrow:$t})},it=function(){return typeof gi=="function"?Rn:Rn()},dt=function(){var Wt=oe.minOverlayWidthMatchTrigger,Ft=oe.alignPoint;return"minOverlayWidthMatchTrigger"in oe?Wt:!Ft},Bt=function(){var Wt=oe.openClassName;return Wt!==void 0?Wt:"".concat(en,"-open")},qt=se.cloneElement(Sr,{className:Ye()((Qe=Sr.props)===null||Qe===void 0?void 0:Qe.className,An&&Bt()),ref:Ge(Sr)?lt(kr,Sr.ref):void 0}),je=Kr;return!je&&Xr.indexOf("contextMenu")!==-1&&(je=["click"]),se.createElement(me.Z,(0,ve.Z)({builtinPlacements:Dn},Ui,{prefixCls:en,ref:On,popupClassName:Ye()(tr,(0,Se.Z)({},"".concat(en,"-show-arrow"),$t)),popupStyle:lr,action:Xr,showAction:$n,hideAction:je,popupPlacement:Ot,popupAlign:wt,popupTransitionName:Jt,popupAnimation:et,popupVisible:An,stretch:dt()?"minWidth":"",popup:it(),onPopupVisibleChange:or,onPopupClick:ar,getPopupContainer:gn}),qt)}var Ue=se.forwardRef(dn),Le=Ue,Rt=le(60276),Sn=le(5663),un=le(10366),tt=le(80636),ft=le(8745),Xt=le(96159),Tn=le(53124),mn=le(68508),Ut=le(76529),jt=le(29691),_n=le(66748);const yn=null,Ae=oe=>{const{menu:Ie,arrow:Qe,prefixCls:Lt,children:$t,trigger:Kt,disabled:en,dropdownRender:Jt,getPopupContainer:et,overlayClassName:wt,rootClassName:Tt,open:Ot,onOpenChange:yt,visible:Dn,onVisibleChange:gn,mouseEnterDelay:$n=.15,mouseLeaveDelay:Kr=.1,autoAdjustOverflow:tr=!0,placement:lr="",overlay:ur,transitionName:ni}=oe,{getPopupContainer:Xr,getPrefixCls:Qr,direction:gi}=se.useContext(Tn.E_),Sr=se.useMemo(()=>{const qt=Qr();return ni!==void 0?ni:lr.includes("top")?`${qt}-slide-down`:`${qt}-slide-up`},[Qr,lr,ni]),Ei=se.useMemo(()=>lr?lr.includes("Center")?lr.slice(0,lr.indexOf("Center")):lr:gi==="rtl"?"bottomRight":"bottomLeft",[lr,gi]),Ui=Qr("dropdown",Lt),[ea,ra]=(0,_n.Z)(Ui),[,Zi]=(0,jt.Z)(),At=se.Children.only($t),An=(0,Xt.Tm)(At,{className:Ye()(`${Ui}-trigger`,{[`${Ui}-rtl`]:gi==="rtl"},At.props.className),disabled:en}),On=en?[]:Kt;let wn;On&&On.includes("contextMenu")&&(wn=!0);const[kr,or]=(0,Sn.Z)(!1,{value:Ot!=null?Ot:Dn}),ar=(0,Rt.useEvent)(qt=>{yt==null||yt(qt),gn==null||gn(qt),or(qt)}),Rn=Ye()(wt,Tt,ra,{[`${Ui}-rtl`]:gi==="rtl"}),it=(0,tt.Z)({arrowPointAtCenter:typeof Qe=="object"&&Qe.pointAtCenter,autoAdjustOverflow:tr,offset:Zi.marginXXS,arrowWidth:Qe?Zi.sizePopupArrow:0,borderRadius:Zi.borderRadius}),dt=se.useCallback(()=>{or(!1)},[]),Bt=()=>{let qt;return Ie!=null&&Ie.items?qt=se.createElement(mn.default,Object.assign({},Ie)):typeof ur=="function"?qt=ur():qt=ur,Jt&&(qt=Jt(qt)),qt=se.Children.only(typeof qt=="string"?se.createElement("span",null,qt):qt),se.createElement(Ut.J,{prefixCls:`${Ui}-menu`,expandIcon:se.createElement("span",{className:`${Ui}-menu-submenu-arrow`},se.createElement(Be.Z,{className:`${Ui}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:dt,validator:je=>{let{mode:Ct}=je}},qt)};return ea(se.createElement(Le,Object.assign({alignPoint:wn},(0,un.Z)(oe,["rootClassName"]),{mouseEnterDelay:$n,mouseLeaveDelay:Kr,visible:kr,builtinPlacements:it,arrow:!!Qe,overlayClassName:Rn,prefixCls:Ui,getPopupContainer:et||Xr,transitionName:Sr,trigger:On,overlay:Bt,placement:Ei,onVisibleChange:ar}),An))};function ce(oe){return Object.assign(Object.assign({},oe),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ue=(0,ft.Z)(Ae,"dropdown",oe=>oe,ce),pe=oe=>se.createElement(ue,Object.assign({},oe),se.createElement("span",null));Ae._InternalPanelDoNotUseOrYouWillBeFired=pe;var he=Ae},66748:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return ot}});var se=le(14747),Be=le(67771),Ne=le(33297),Ye=le(50438),ve=le(97414),Se=le(67968),Me=le(45503),me=Oe=>{const{componentCls:st,menuCls:lt,colorError:Je,colorTextLightSolid:Ge}=Oe,Ce=`${lt}-item`;return{[`${st}, ${st}-menu-submenu`]:{[`${lt} ${Ce}`]:{[`&${Ce}-danger:not(${Ce}-disabled)`]:{color:Je,"&:hover":{color:Ge,backgroundColor:Je}}}}}};const Te=Oe=>{const{componentCls:st,menuCls:lt,zIndexPopup:Je,dropdownArrowDistance:Ge,sizePopupArrow:Ce,antCls:pt,iconCls:zt,motionDurationMid:qe,dropdownPaddingVertical:ut,fontSize:xe,dropdownEdgeChildPadding:Ee,colorTextDisabled:Ve,fontSizeIcon:Xe,controlPaddingHorizontal:Mt,colorBgElevated:mt}=Oe;return[{[st]:Object.assign(Object.assign({},(0,se.Wf)(Oe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Je,display:"block","&::before":{position:"absolute",insetBlock:-Ge+Ce/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${pt}-btn`]:{[`& > ${zt}-down, & > ${pt}-btn-icon > ${zt}-down`]:{fontSize:Xe}},[`${st}-wrap`]:{position:"relative",[`${pt}-btn > ${zt}-down`]:{fontSize:Xe},[`${zt}-down::before`]:{transition:`transform ${qe}`}},[`${st}-wrap-open`]:{[`${zt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${pt}-slide-down-enter${pt}-slide-down-enter-active${st}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${st}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-enter${pt}-slide-down-enter-active${st}-placement-bottom,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${st}-placement-bottom,
|
|
|
&${pt}-slide-down-enter${pt}-slide-down-enter-active${st}-placement-bottomRight,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${st}-placement-bottomRight`]:{animationName:Be.fJ},[`&${pt}-slide-up-enter${pt}-slide-up-enter-active${st}-placement-topLeft,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${st}-placement-topLeft,
|
|
|
&${pt}-slide-up-enter${pt}-slide-up-enter-active${st}-placement-top,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${st}-placement-top,
|
|
|
&${pt}-slide-up-enter${pt}-slide-up-enter-active${st}-placement-topRight,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${st}-placement-topRight`]:{animationName:Be.Qt},[`&${pt}-slide-down-leave${pt}-slide-down-leave-active${st}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-leave${pt}-slide-down-leave-active${st}-placement-bottom,
|
|
|
&${pt}-slide-down-leave${pt}-slide-down-leave-active${st}-placement-bottomRight`]:{animationName:Be.Uw},[`&${pt}-slide-up-leave${pt}-slide-up-leave-active${st}-placement-topLeft,
|
|
|
&${pt}-slide-up-leave${pt}-slide-up-leave-active${st}-placement-top,
|
|
|
&${pt}-slide-up-leave${pt}-slide-up-leave-active${st}-placement-topRight`]:{animationName:Be.ly}})},(0,ve.ZP)(Oe,{colorBg:mt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${st} ${lt}`]:{position:"relative",margin:0},[`${lt}-submenu-popup`]:{position:"absolute",zIndex:Je,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${st}, ${st}-menu-submenu`]:{[lt]:Object.assign(Object.assign({padding:Ee,listStyleType:"none",backgroundColor:mt,backgroundClip:"padding-box",borderRadius:Oe.borderRadiusLG,outline:"none",boxShadow:Oe.boxShadowSecondary},(0,se.Qy)(Oe)),{[`${lt}-item-group-title`]:{padding:`${ut}px ${Mt}px`,color:Oe.colorTextDescription,transition:`all ${qe}`},[`${lt}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${lt}-item-icon`]:{minWidth:xe,marginInlineEnd:Oe.marginXS,fontSize:Oe.fontSizeSM},[`${lt}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${qe}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${lt}-item, ${lt}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ut}px ${Mt}px`,color:Oe.colorText,fontWeight:"normal",fontSize:xe,lineHeight:Oe.lineHeight,cursor:"pointer",transition:`all ${qe}`,borderRadius:Oe.borderRadiusSM,"&:hover, &-active":{backgroundColor:Oe.controlItemBgHover}},(0,se.Qy)(Oe)),{"&-selected":{color:Oe.colorPrimary,backgroundColor:Oe.controlItemBgActive,"&:hover, &-active":{backgroundColor:Oe.controlItemBgActiveHover}},"&-disabled":{color:Ve,cursor:"not-allowed","&:hover":{color:Ve,backgroundColor:mt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Oe.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Oe.colorSplit},[`${st}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Oe.paddingXS,[`${st}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Oe.colorTextDescription,fontSize:Xe,fontStyle:"normal"}}}),[`${lt}-item-group-list`]:{margin:`0 ${Oe.marginXS}px`,padding:0,listStyle:"none"},[`${lt}-submenu-title`]:{paddingInlineEnd:Mt+Oe.fontSizeSM},[`${lt}-submenu-vertical`]:{position:"relative"},[`${lt}-submenu${lt}-submenu-disabled ${st}-menu-submenu-title`]:{[`&, ${st}-menu-submenu-arrow-icon`]:{color:Ve,backgroundColor:mt,cursor:"not-allowed"}},[`${lt}-submenu-selected ${st}-menu-submenu-title`]:{color:Oe.colorPrimary}})}},[(0,Be.oN)(Oe,"slide-up"),(0,Be.oN)(Oe,"slide-down"),(0,Ne.Fm)(Oe,"move-up"),(0,Ne.Fm)(Oe,"move-down"),(0,Ye._y)(Oe,"zoom-big")]]};var ot=(0,Se.Z)("Dropdown",(Oe,st)=>{let{rootPrefixCls:lt}=st;const{marginXXS:Je,sizePopupArrow:Ge,controlHeight:Ce,fontSize:pt,lineHeight:zt,paddingXXS:qe,componentCls:ut,borderRadiusLG:xe}=Oe,Ee=(Ce-pt*zt)/2,{dropdownArrowOffset:Ve}=(0,ve.fS)({contentRadius:xe}),Xe=(0,Me.TS)(Oe,{menuCls:`${ut}-menu`,rootPrefixCls:lt,dropdownArrowDistance:Ge/2+Je,dropdownArrowOffset:Ve,dropdownPaddingVertical:Ee,dropdownEdgeChildPadding:qe});return[Te(Xe),me(Xe)]},Oe=>({zIndexPopup:Oe.zIndexPopupBase+50}))},32983:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return qe}});var se=le(94184),Be=le.n(se),Ne=le(67294),Ye=le(53124),ve=le(10110),Se=le(84780),Me=le(29691),me=()=>{const[,ut]=(0,Me.Z)(),Ee=new Se.C(ut.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ne.createElement("svg",{style:Ee,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ne.createElement("g",{fill:"none",fillRule:"evenodd"},Ne.createElement("g",{transform:"translate(24 31.67)"},Ne.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ne.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),Ne.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),Ne.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),Ne.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),Ne.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),Ne.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ne.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ne.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ot=()=>{const[,ut]=(0,Me.Z)(),{colorFill:xe,colorFillTertiary:Ee,colorFillQuaternary:Ve,colorBgContainer:Xe}=ut,{borderColor:Mt,shadowColor:mt,contentColor:St}=(0,Ne.useMemo)(()=>({borderColor:new Se.C(xe).onBackground(Xe).toHexShortString(),shadowColor:new Se.C(Ee).onBackground(Xe).toHexShortString(),contentColor:new Se.C(Ve).onBackground(Xe).toHexShortString()}),[xe,Ee,Ve,Xe]);return Ne.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ne.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ne.createElement("ellipse",{fill:mt,cx:"32",cy:"33",rx:"32",ry:"7"}),Ne.createElement("g",{fillRule:"nonzero",stroke:Mt},Ne.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),Ne.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:St}))))},Oe=le(67968),st=le(45503);const lt=ut=>{const{componentCls:xe,margin:Ee,marginXS:Ve,marginXL:Xe,fontSize:Mt,lineHeight:mt}=ut;return{[xe]:{marginInline:Ve,fontSize:Mt,lineHeight:mt,textAlign:"center",[`${xe}-image`]:{height:ut.emptyImgHeight,marginBottom:Ve,opacity:ut.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${xe}-description`]:{color:ut.colorText},[`${xe}-footer`]:{marginTop:Ee},"&-normal":{marginBlock:Xe,color:ut.colorTextDisabled,[`${xe}-description`]:{color:ut.colorTextDisabled},[`${xe}-image`]:{height:ut.emptyImgHeightMD}},"&-small":{marginBlock:Ve,color:ut.colorTextDisabled,[`${xe}-image`]:{height:ut.emptyImgHeightSM}}}}};var Je=(0,Oe.Z)("Empty",ut=>{const{componentCls:xe,controlHeightLG:Ee}=ut,Ve=(0,st.TS)(ut,{emptyImgCls:`${xe}-img`,emptyImgHeight:Ee*2.5,emptyImgHeightMD:Ee,emptyImgHeightSM:Ee*.875});return[lt(Ve)]}),Ge=function(ut,xe){var Ee={};for(var Ve in ut)Object.prototype.hasOwnProperty.call(ut,Ve)&&xe.indexOf(Ve)<0&&(Ee[Ve]=ut[Ve]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ve=Object.getOwnPropertySymbols(ut);Xe<Ve.length;Xe++)xe.indexOf(Ve[Xe])<0&&Object.prototype.propertyIsEnumerable.call(ut,Ve[Xe])&&(Ee[Ve[Xe]]=ut[Ve[Xe]]);return Ee};const Ce=Ne.createElement(me,null),pt=Ne.createElement(ot,null),zt=ut=>{var{className:xe,rootClassName:Ee,prefixCls:Ve,image:Xe=Ce,description:Mt,children:mt,imageStyle:St,style:Ke}=ut,Pt=Ge(ut,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Et,direction:Yt,empty:at}=Ne.useContext(Ye.E_),Vt=Et("empty",Ve),[fn,dn]=Je(Vt),[Ue]=(0,ve.Z)("Empty"),Le=typeof Mt!="undefined"?Mt:Ue==null?void 0:Ue.description,Rt=typeof Le=="string"?Le:"empty";let Sn=null;return typeof Xe=="string"?Sn=Ne.createElement("img",{alt:Rt,src:Xe}):Sn=Xe,fn(Ne.createElement("div",Object.assign({className:Be()(dn,Vt,at==null?void 0:at.className,{[`${Vt}-normal`]:Xe===pt,[`${Vt}-rtl`]:Yt==="rtl"},xe,Ee),style:Object.assign(Object.assign({},at==null?void 0:at.style),Ke)},Pt),Ne.createElement("div",{className:`${Vt}-image`,style:St},Sn),Le&&Ne.createElement("div",{className:`${Vt}-description`},Le),mt&&Ne.createElement("div",{className:`${Vt}-footer`},mt)))};zt.PRESENTED_IMAGE_DEFAULT=Ce,zt.PRESENTED_IMAGE_SIMPLE=pt;var qe=zt},22150:function(bn,Zt,le){"use strict";le.d(Zt,{default:function(){return qt}});var se=le(74902),Be=le(94184),Ne=le.n(Be),Ye=le(38379),ve=le(67294),Se=le(33603),Me=le(65223);function we(je){const[Ct,Wt]=ve.useState(je);return ve.useEffect(()=>{const Ft=setTimeout(()=>{Wt(je)},je.length?0:10);return()=>{clearTimeout(Ft)}},[je]),Ct}var me=le(14747),Te=le(50438),ot=le(33507),Oe=le(45503),st=le(67968),Je=je=>{const{componentCls:Ct}=je,Wt=`${Ct}-show-help`,Ft=`${Ct}-show-help-item`;return{[Wt]:{transition:`opacity ${je.motionDurationSlow} ${je.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Ft]:{overflow:"hidden",transition:`height ${je.motionDurationSlow} ${je.motionEaseInOut},
|
|
|
opacity ${je.motionDurationSlow} ${je.motionEaseInOut},
|
|
|
transform ${je.motionDurationSlow} ${je.motionEaseInOut} !important`,[`&${Ft}-appear, &${Ft}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Ft}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Ge=je=>({legend:{display:"block",width:"100%",marginBottom:je.marginLG,padding:0,color:je.colorTextDescription,fontSize:je.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${je.lineWidth}px ${je.lineType} ${je.colorBorder}`},label:{fontSize:je.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${je.controlOutlineWidth}px ${je.controlOutline}`},output:{display:"block",paddingTop:15,color:je.colorText,fontSize:je.fontSize,lineHeight:je.lineHeight}}),Ce=(je,Ct)=>{const{formItemCls:Wt}=je;return{[Wt]:{[`${Wt}-label > label`]:{height:Ct},[`${Wt}-control-input`]:{minHeight:Ct}}}},pt=je=>{const{componentCls:Ct}=je;return{[je.componentCls]:Object.assign(Object.assign(Object.assign({},(0,me.Wf)(je)),Ge(je)),{[`${Ct}-text`]:{display:"inline-block",paddingInlineEnd:je.paddingSM},"&-small":Object.assign({},Ce(je,je.controlHeightSM)),"&-large":Object.assign({},Ce(je,je.controlHeightLG))})}},zt=je=>{const{formItemCls:Ct,iconCls:Wt,componentCls:Ft,rootPrefixCls:an,labelRequiredMarkColor:rn,labelColor:Vn,labelFontSize:Pr,labelHeight:nr,labelColonMarginInlineStart:Xn,labelColonMarginInlineEnd:mr,itemMarginBottom:fr}=je;return{[Ct]:Object.assign(Object.assign({},(0,me.Wf)(je)),{marginBottom:fr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${an}-row`]:{display:"none"},"&-has-warning":{[`${Ct}-split`]:{color:je.colorError}},"&-has-error":{[`${Ct}-split`]:{color:je.colorWarning}},[`${Ct}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${je.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:nr,color:Vn,fontSize:Pr,[`> ${Wt}`]:{fontSize:je.fontSize,verticalAlign:"top"},[`&${Ct}-required:not(${Ct}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:je.marginXXS,color:rn,fontSize:je.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Ft}-hide-required-mark &`]:{display:"none"}},[`${Ct}-optional`]:{display:"inline-block",marginInlineStart:je.marginXXS,color:je.colorTextDescription,[`${Ft}-hide-required-mark &`]:{display:"none"}},[`${Ct}-tooltip`]:{color:je.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:je.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Xn,marginInlineEnd:mr},[`&${Ct}-no-colon::after`]:{content:'"\\a0"'}}},[`${Ct}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${an}-col-'"]):not([class*="' ${an}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:je.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Ct]:{"&-explain, &-extra":{clear:"both",color:je.colorTextDescription,fontSize:je.fontSize,lineHeight:je.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:je.controlHeightSM,transition:`color ${je.motionDurationMid} ${je.motionEaseOut}`},"&-explain":{"&-error":{color:je.colorError},"&-warning":{color:je.colorWarning}}},[`&-with-help ${Ct}-explain`]:{height:"auto",opacity:1},[`${Ct}-feedback-icon`]:{fontSize:je.fontSize,textAlign:"center",visibility:"visible",animationName:Te.kr,animationDuration:je.motionDurationMid,animationTimingFunction:je.motionEaseOutBack,pointerEvents:"none","&-success":{color:je.colorSuccess},"&-error":{color:je.colorError},"&-warning":{color:je.colorWarning},"&-validating":{color:je.colorPrimary}}})}},qe=je=>{const{componentCls:Ct,formItemCls:Wt}=je;return{[`${Ct}-horizontal`]:{[`${Wt}-label`]:{flexGrow:0},[`${Wt}-control`]:{flex:"1 1 0",minWidth:0},[`${Wt}-label[class$='-24'], ${Wt}-label[class*='-24 ']`]:{[`& + ${Wt}-control`]:{minWidth:"unset"}}}}},ut=je=>{const{componentCls:Ct,formItemCls:Wt}=je;return{[`${Ct}-inline`]:{display:"flex",flexWrap:"wrap",[Wt]:{flex:"none",marginInlineEnd:je.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Wt}-label,
|
|
|
> ${Wt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Wt}-label`]:{flex:"none"},[`${Ct}-text`]:{display:"inline-block"},[`${Wt}-has-feedback`]:{display:"inline-block"}}}}},xe=je=>({padding:je.verticalLabelPadding,margin:je.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Ee=je=>{const{componentCls:Ct,formItemCls:Wt,rootPrefixCls:Ft}=je;return{[`${Wt} ${Wt}-label`]:xe(je),[Ct]:{[Wt]:{flexWrap:"wrap",[`${Wt}-label, ${Wt}-control`]:{[`&:not([class*=" ${Ft}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ve=je=>{const{componentCls:Ct,formItemCls:Wt,rootPrefixCls:Ft}=je;return{[`${Ct}-vertical`]:{[Wt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Ct}-item-control`]:{width:"100%"}}},[`${Ct}-vertical ${Wt}-label,
|
|
|
.${Ft}-col-24${Wt}-label,
|
|
|
.${Ft}-col-xl-24${Wt}-label`]:xe(je),[`@media (max-width: ${je.screenXSMax}px)`]:[Ee(je),{[Ct]:{[`.${Ft}-col-xs-24${Wt}-label`]:xe(je)}}],[`@media (max-width: ${je.screenSMMax}px)`]:{[Ct]:{[`.${Ft}-col-sm-24${Wt}-label`]:xe(je)}},[`@media (max-width: ${je.screenMDMax}px)`]:{[Ct]:{[`.${Ft}-col-md-24${Wt}-label`]:xe(je)}},[`@media (max-width: ${je.screenLGMax}px)`]:{[Ct]:{[`.${Ft}-col-lg-24${Wt}-label`]:xe(je)}}}},Xe=(je,Ct)=>(0,Oe.TS)(je,{formItemCls:`${je.componentCls}-item`,rootPrefixCls:Ct});var Mt=(0,st.Z)("Form",(je,Ct)=>{let{rootPrefixCls:Wt}=Ct;const Ft=Xe(je,Wt);return[pt(Ft),zt(Ft),Je(Ft),qe(Ft),ut(Ft),Ve(Ft),(0,ot.Z)(Ft),Te.kr]},je=>({labelRequiredMarkColor:je.colorError,labelColor:je.colorTextHeading,labelFontSize:je.fontSize,labelHeight:je.controlHeight,labelColonMarginInlineStart:je.marginXXS/2,labelColonMarginInlineEnd:je.marginXS,itemMarginBottom:je.marginLG,verticalLabelPadding:`0 0 ${je.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const mt=[];function St(je,Ct,Wt){let Ft=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof je=="string"?je:`${Ct}-${Ft}`,error:je,errorStatus:Wt}}var Pt=je=>{let{help:Ct,helpStatus:Wt,errors:Ft=mt,warnings:an=mt,className:rn,fieldId:Vn,onVisibleChanged:Pr}=je;const{prefixCls:nr}=ve.useContext(Me.Rk),Xn=`${nr}-item-explain`,[,mr]=Mt(nr),fr=(0,ve.useMemo)(()=>(0,Se.Z)(nr),[nr]),Yr=we(Ft),xn=we(an),qn=ve.useMemo(()=>Ct!=null?[St(Ct,"help",Wt)]:[].concat((0,se.Z)(Yr.map((Ii,di)=>St(Ii,"error","error",di))),(0,se.Z)(xn.map((Ii,di)=>St(Ii,"warning","warning",di)))),[Ct,Wt,Yr,xn]),Si={};return Vn&&(Si.id=`${Vn}_help`),ve.createElement(Ye.default,{motionDeadline:fr.motionDeadline,motionName:`${nr}-show-help`,visible:!!qn.length,onVisibleChanged:Pr},Ii=>{const{className:di,style:si}=Ii;return ve.createElement("div",Object.assign({},Si,{className:Ne()(Xn,di,rn,mr),style:si,role:"alert"}),ve.createElement(Ye.CSSMotionList,Object.assign({keys:qn},(0,Se.Z)(nr),{motionName:`${nr}-show-help-item`,component:!1}),zi=>{const{key:Lr,error:Mi,errorStatus:Pn,className:Qt,style:Gt}=zi;return ve.createElement("div",{key:Lr,className:Ne()(Qt,{[`${Xn}-${Pn}`]:Pn}),style:Gt},Mi)}))})},Et=le(46660),Yt=le(53124),at=le(98866),Vt=le(97647),fn=le(98675),dn=le(17423);const Ue=["parentNode"],Le="form_item";function Rt(je){return je===void 0||je===!1?[]:Array.isArray(je)?je:[je]}function Sn(je,Ct){if(!je.length)return;const Wt=je.join("_");return Ct?`${Ct}_${Wt}`:Ue.includes(Wt)?`${Le}_${Wt}`:Wt}function un(je,Ct,Wt,Ft,an,rn){let Vn=Ft;return rn!==void 0?Vn=rn:Wt.validating?Vn="validating":je.length?Vn="error":Ct.length?Vn="warning":(Wt.touched||an&&Wt.validated)&&(Vn="success"),Vn}function tt(je){return Rt(je).join("_")}function ft(je){const[Ct]=(0,Et.useForm)(),Wt=ve.useRef({}),Ft=ve.useMemo(()=>je!=null?je:Object.assign(Object.assign({},Ct),{__INTERNAL__:{itemRef:an=>rn=>{const Vn=tt(an);rn?Wt.current[Vn]=rn:delete Wt.current[Vn]}},scrollToField:function(an){let rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Vn=Rt(an),Pr=Sn(Vn,Ft.__INTERNAL__.name),nr=Pr?document.getElementById(Pr):null;nr&&(0,dn.Z)(nr,Object.assign({scrollMode:"if-needed",block:"nearest"},rn))},getFieldInstance:an=>{const rn=tt(an);return Wt.current[rn]}}),[je,Ct]);return[Ft]}var Xt=le(37920),Tn=function(je,Ct){var Wt={};for(var Ft in je)Object.prototype.hasOwnProperty.call(je,Ft)&&Ct.indexOf(Ft)<0&&(Wt[Ft]=je[Ft]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,Ft=Object.getOwnPropertySymbols(je);an<Ft.length;an++)Ct.indexOf(Ft[an])<0&&Object.prototype.propertyIsEnumerable.call(je,Ft[an])&&(Wt[Ft[an]]=je[Ft[an]]);return Wt};const mn=(je,Ct)=>{const Wt=ve.useContext(at.Z),{getPrefixCls:Ft,direction:an,form:rn}=ve.useContext(Yt.E_),{prefixCls:Vn,className:Pr,rootClassName:nr,size:Xn,disabled:mr=Wt,form:fr,colon:Yr,labelAlign:xn,labelWrap:qn,labelCol:Si,wrapperCol:Ii,hideRequiredMark:di,layout:si="horizontal",scrollToFirstError:zi,requiredMark:Lr,onFinishFailed:Mi,name:Pn,style:Qt,feedbackIcons:Gt}=je,kt=Tn(je,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Wn=(0,fn.Z)(Xn),ri=ve.useContext(Xt.Z),Ai=(0,ve.useMemo)(()=>Lr!==void 0?Lr:rn&&rn.requiredMark!==void 0?rn.requiredMark:!di,[di,Lr,rn]),Zr=Yr!=null?Yr:rn==null?void 0:rn.colon,Hn=Ft("form",Vn),[tn,Ur]=Mt(Hn),Jr=Ne()(Hn,`${Hn}-${si}`,{[`${Hn}-hide-required-mark`]:Ai===!1,[`${Hn}-rtl`]:an==="rtl",[`${Hn}-${Wn}`]:Wn},Ur,rn==null?void 0:rn.className,Pr,nr),[ai]=ft(fr),{__INTERNAL__:Ti}=ai;Ti.name=Pn;const Ki=(0,ve.useMemo)(()=>({name:Pn,labelAlign:xn,labelCol:Si,labelWrap:qn,wrapperCol:Ii,vertical:si==="vertical",colon:Zr,requiredMark:Ai,itemRef:Ti.itemRef,form:ai,feedbackIcons:Gt}),[Pn,xn,Si,Ii,si,Zr,Ai,ai,Gt]);ve.useImperativeHandle(Ct,()=>ai);const Tr=(gt,ht)=>{if(gt){let Ht={block:"nearest"};typeof gt=="object"&&(Ht=gt),ai.scrollToField(ht,Ht)}},Gr=gt=>{if(Mi==null||Mi(gt),gt.errorFields.length){const ht=gt.errorFields[0].name;if(zi!==void 0){Tr(zi,ht);return}rn&&rn.scrollToFirstError!==void 0&&Tr(rn.scrollToFirstError,ht)}};return tn(ve.createElement(at.n,{disabled:mr},ve.createElement(Vt.q,{size:Wn},ve.createElement(Me.RV,Object.assign({},{validateMessages:ri}),ve.createElement(Me.q3.Provider,{value:Ki},ve.createElement(Et.default,Object.assign({id:Pn},kt,{name:Pn,onFinishFailed:Gr,form:ai,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Qt),className:Jr})))))))};var jt=ve.forwardRef(mn),_n=le(9475),yn=le(17799),Ae=le(96159),ce=le(37419);function ue(je){if(typeof je=="function")return je;const Ct=(0,ce.Z)(je);return Ct.length<=1?Ct[0]:Ct}const pe=()=>{const{status:je,errors:Ct=[],warnings:Wt=[]}=(0,ve.useContext)(Me.aM);return{status:je,errors:Ct,warnings:Wt}};pe.Context=Me.aM;var he=pe,oe=le(96523);function Ie(je){const[Ct,Wt]=ve.useState(je),Ft=(0,ve.useRef)(null),an=(0,ve.useRef)([]),rn=(0,ve.useRef)(!1);ve.useEffect(()=>(rn.current=!1,()=>{rn.current=!0,oe.Z.cancel(Ft.current),Ft.current=null}),[]);function Vn(Pr){rn.current||(Ft.current===null&&(an.current=[],Ft.current=(0,oe.Z)(()=>{Ft.current=null,Wt(nr=>{let Xn=nr;return an.current.forEach(mr=>{Xn=mr(Xn)}),Xn})})),an.current.push(Pr))}return[Ct,Vn]}function Qe(){const{itemRef:je}=ve.useContext(Me.q3),Ct=ve.useRef({});function Wt(Ft,an){const rn=an&&typeof an=="object"&&an.ref,Vn=Ft.join("_");return(Ct.current.name!==Vn||Ct.current.originRef!==rn)&&(Ct.current.name=Vn,Ct.current.originRef=rn,Ct.current.ref=(0,yn.sQ)(je(Ft),rn)),Ct.current.ref}return Wt}var Lt=le(48130),$t=le(14075),Kt=le(10366),en=le(92820),Jt=le(21584);const et=je=>{const{formItemCls:Ct}=je;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Ct}-control`]:{display:"flex"}}}};var wt=(0,st.b)(["Form","item-item"],(je,Ct)=>{let{rootPrefixCls:Wt}=Ct;const Ft=Xe(je,Wt);return[et(Ft)]}),Ot=je=>{const{prefixCls:Ct,status:Wt,wrapperCol:Ft,children:an,errors:rn,warnings:Vn,_internalItemRender:Pr,extra:nr,help:Xn,fieldId:mr,marginBottom:fr,onErrorVisibleChanged:Yr}=je,xn=`${Ct}-item`,qn=ve.useContext(Me.q3),Si=Ft||qn.wrapperCol||{},Ii=Ne()(`${xn}-control`,Si.className),di=ve.useMemo(()=>Object.assign({},qn),[qn]);delete di.labelCol,delete di.wrapperCol;const si=ve.createElement("div",{className:`${xn}-control-input`},ve.createElement("div",{className:`${xn}-control-input-content`},an)),zi=ve.useMemo(()=>({prefixCls:Ct,status:Wt}),[Ct,Wt]),Lr=fr!==null||rn.length||Vn.length?ve.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ve.createElement(Me.Rk.Provider,{value:zi},ve.createElement(Pt,{fieldId:mr,errors:rn,warnings:Vn,help:Xn,helpStatus:Wt,className:`${xn}-explain-connected`,onVisibleChanged:Yr})),!!fr&&ve.createElement("div",{style:{width:0,height:fr}})):null,Mi={};mr&&(Mi.id=`${mr}_extra`);const Pn=nr?ve.createElement("div",Object.assign({},Mi,{className:`${xn}-extra`}),nr):null,Qt=Pr&&Pr.mark==="pro_table_render"&&Pr.render?Pr.render(je,{input:si,errorList:Lr,extra:Pn}):ve.createElement(ve.Fragment,null,si,Lr,Pn);return ve.createElement(Me.q3.Provider,{value:di},ve.createElement(Jt.Z,Object.assign({},Si,{className:Ii}),Qt),ve.createElement(wt,{prefixCls:Ct}))},yt=le(17663),Dn=le(24457),gn=le(10110),$n=le(83062),Kr=function(je,Ct){var Wt={};for(var Ft in je)Object.prototype.hasOwnProperty.call(je,Ft)&&Ct.indexOf(Ft)<0&&(Wt[Ft]=je[Ft]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,Ft=Object.getOwnPropertySymbols(je);an<Ft.length;an++)Ct.indexOf(Ft[an])<0&&Object.prototype.propertyIsEnumerable.call(je,Ft[an])&&(Wt[Ft[an]]=je[Ft[an]]);return Wt};function tr(je){return je?typeof je=="object"&&!ve.isValidElement(je)?je:{title:je}:null}var ur=je=>{let{prefixCls:Ct,label:Wt,htmlFor:Ft,labelCol:an,labelAlign:rn,colon:Vn,required:Pr,requiredMark:nr,tooltip:Xn}=je;var mr;const[fr]=(0,gn.Z)("Form"),{vertical:Yr,labelAlign:xn,labelCol:qn,labelWrap:Si,colon:Ii}=ve.useContext(Me.q3);if(!Wt)return null;const di=an||qn||{},si=rn||xn,zi=`${Ct}-item-label`,Lr=Ne()(zi,si==="left"&&`${zi}-left`,di.className,{[`${zi}-wrap`]:!!Si});let Mi=Wt;const Pn=Vn===!0||Ii!==!1&&Vn!==!1;Pn&&!Yr&&typeof Wt=="string"&&Wt.trim()!==""&&(Mi=Wt.replace(/[:|:]\s*$/,""));const Gt=tr(Xn);if(Gt){const{icon:Ai=ve.createElement(yt.Z,null)}=Gt,Zr=Kr(Gt,["icon"]),Hn=ve.createElement($n.Z,Object.assign({},Zr),ve.cloneElement(Ai,{className:`${Ct}-item-tooltip`,title:""}));Mi=ve.createElement(ve.Fragment,null,Mi,Hn)}const kt=nr==="optional",Wn=typeof nr=="function";Wn?Mi=nr(Mi,{required:!!Pr}):kt&&!Pr&&(Mi=ve.createElement(ve.Fragment,null,Mi,ve.createElement("span",{className:`${Ct}-item-optional`,title:""},(fr==null?void 0:fr.optional)||((mr=Dn.Z.Form)===null||mr===void 0?void 0:mr.optional))));const ri=Ne()({[`${Ct}-item-required`]:Pr,[`${Ct}-item-required-mark-optional`]:kt||Wn,[`${Ct}-item-no-colon`]:!Pn});return ve.createElement(Jt.Z,Object.assign({},di,{className:Lr}),ve.createElement("label",{htmlFor:Ft,className:ri,title:typeof Wt=="string"?Wt:""},Mi))},ni=le(87725),Xr=le(16646),Qr=le(87995),gi=le(3407);const Sr={success:ni.Z,warning:Qr.Z,error:Xr.Z,validating:gi.Z};function Ei(je){let{children:Ct,errors:Wt,warnings:Ft,hasFeedback:an,validateStatus:rn,prefixCls:Vn,meta:Pr,noStyle:nr}=je;const Xn=`${Vn}-item`,{feedbackIcons:mr}=ve.useContext(Me.q3),fr=un(Wt,Ft,Pr,null,!!an,rn),{isFormItemInput:Yr,status:xn}=ve.useContext(Me.aM),qn=ve.useMemo(()=>{var Si;let Ii;if(an){const zi=an!==!0&&an.icons||mr,Lr=fr&&((Si=zi==null?void 0:zi({status:fr,errors:Wt,warnings:Ft}))===null||Si===void 0?void 0:Si[fr]),Mi=fr&&Sr[fr];Ii=Lr!==!1&&Mi?ve.createElement("span",{className:Ne()(`${Xn}-feedback-icon`,`${Xn}-feedback-icon-${fr}`)},Lr||ve.createElement(Mi,null)):null}let di=!0,si=fr||"";return nr&&(di=Yr,si=(fr!=null?fr:xn)||""),{status:si,errors:Wt,warnings:Ft,hasFeedback:!!an,feedbackIcon:Ii,isFormItemInput:di}},[fr,an,nr,Yr,xn]);return ve.createElement(Me.aM.Provider,{value:qn},Ct)}var Ui=function(je,Ct){var Wt={};for(var Ft in je)Object.prototype.hasOwnProperty.call(je,Ft)&&Ct.indexOf(Ft)<0&&(Wt[Ft]=je[Ft]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,Ft=Object.getOwnPropertySymbols(je);an<Ft.length;an++)Ct.indexOf(Ft[an])<0&&Object.prototype.propertyIsEnumerable.call(je,Ft[an])&&(Wt[Ft[an]]=je[Ft[an]]);return Wt};function ea(je){const{prefixCls:Ct,className:Wt,rootClassName:Ft,style:an,help:rn,errors:Vn,warnings:Pr,validateStatus:nr,meta:Xn,hasFeedback:mr,hidden:fr,children:Yr,fieldId:xn,required:qn,isRequired:Si,onSubItemMetaChange:Ii}=je,di=Ui(je,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),si=`${Ct}-item`,{requiredMark:zi}=ve.useContext(Me.q3),Lr=ve.useRef(null),Mi=we(Vn),Pn=we(Pr),Qt=rn!=null,Gt=!!(Qt||Vn.length||Pr.length),kt=!!Lr.current&&(0,Lt.Z)(Lr.current),[Wn,ri]=ve.useState(null);(0,$t.Z)(()=>{if(Gt&&Lr.current){const Ur=getComputedStyle(Lr.current);ri(parseInt(Ur.marginBottom,10))}},[Gt,kt]);const Ai=Ur=>{Ur||ri(null)},Hn=function(){let Ur=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Jr=Ur?Mi:Xn.errors,ai=Ur?Pn:Xn.warnings;return un(Jr,ai,Xn,"",!!mr,nr)}(),tn=Ne()(si,Wt,Ft,{[`${si}-with-help`]:Qt||Mi.length||Pn.length,[`${si}-has-feedback`]:Hn&&mr,[`${si}-has-success`]:Hn==="success",[`${si}-has-warning`]:Hn==="warning",[`${si}-has-error`]:Hn==="error",[`${si}-is-validating`]:Hn==="validating",[`${si}-hidden`]:fr});return ve.createElement("div",{className:tn,style:an,ref:Lr},ve.createElement(en.Z,Object.assign({className:`${si}-row`},(0,Kt.Z)(di,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),ve.createElement(ur,Object.assign({htmlFor:xn},je,{requiredMark:zi,required:qn!=null?qn:Si,prefixCls:Ct})),ve.createElement(Ot,Object.assign({},je,Xn,{errors:Mi,warnings:Pn,prefixCls:Ct,status:Hn,help:rn,marginBottom:Wn,onErrorVisibleChanged:Ai}),ve.createElement(Me.qI.Provider,{value:Ii},ve.createElement(Ei,{prefixCls:Ct,meta:Xn,errors:Xn.errors,warnings:Xn.warnings,hasFeedback:mr,validateStatus:Hn},Yr)))),!!Wn&&ve.createElement("div",{className:`${si}-margin-offset`,style:{marginBottom:-Wn}}))}const ra="__SPLIT__",Zi=null,At=ve.memo(je=>{let{children:Ct}=je;return Ct},(je,Ct)=>je.value===Ct.value&&je.update===Ct.update&&je.childProps.length===Ct.childProps.length&&je.childProps.every((Wt,Ft)=>Wt===Ct.childProps[Ft]));function An(je){return je!=null}function On(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function wn(je){const{name:Ct,noStyle:Wt,className:Ft,dependencies:an,prefixCls:rn,shouldUpdate:Vn,rules:Pr,children:nr,required:Xn,label:mr,messageVariables:fr,trigger:Yr="onChange",validateTrigger:xn,hidden:qn,help:Si}=je,{getPrefixCls:Ii}=ve.useContext(Yt.E_),{name:di}=ve.useContext(Me.q3),si=ue(nr),zi=typeof si=="function",Lr=ve.useContext(Me.qI),{validateTrigger:Mi}=ve.useContext(Et.FieldContext),Pn=xn!==void 0?xn:Mi,Qt=An(Ct),Gt=Ii("form",rn),[kt,Wn]=Mt(Gt),ri=ve.useContext(Et.ListContext),Ai=ve.useRef(),[Zr,Hn]=Ie({}),[tn,Ur]=(0,_n.Z)(()=>On()),Jr=ht=>{const Ht=ri==null?void 0:ri.getKey(ht.name);if(Ur(ht.destroy?On():ht,!0),Wt&&Si!==!1&&Lr){let sn=ht.name;if(ht.destroy)sn=Ai.current||sn;else if(Ht!==void 0){const[Ln,gr]=Ht;sn=[Ln].concat((0,se.Z)(gr)),Ai.current=sn}Lr(ht,sn)}},ai=(ht,Ht)=>{Hn(sn=>{const Ln=Object.assign({},sn),vr=[].concat((0,se.Z)(ht.name.slice(0,-1)),(0,se.Z)(Ht)).join(ra);return ht.destroy?delete Ln[vr]:Ln[vr]=ht,Ln})},[Ti,Ki]=ve.useMemo(()=>{const ht=(0,se.Z)(tn.errors),Ht=(0,se.Z)(tn.warnings);return Object.values(Zr).forEach(sn=>{ht.push.apply(ht,(0,se.Z)(sn.errors||[])),Ht.push.apply(Ht,(0,se.Z)(sn.warnings||[]))}),[ht,Ht]},[Zr,tn.errors,tn.warnings]),Tr=Qe();function Gr(ht,Ht,sn){return Wt&&!qn?ve.createElement(Ei,{prefixCls:Gt,hasFeedback:je.hasFeedback,validateStatus:je.validateStatus,meta:tn,errors:Ti,warnings:Ki,noStyle:!0},ht):ve.createElement(ea,Object.assign({key:"row"},je,{className:Ne()(Ft,Wn),prefixCls:Gt,fieldId:Ht,isRequired:sn,errors:Ti,warnings:Ki,meta:tn,onSubItemMetaChange:ai}),ht)}if(!Qt&&!zi&&!an)return kt(Gr(si));let gt={};return typeof mr=="string"?gt.label=mr:Ct&&(gt.label=String(Ct)),fr&&(gt=Object.assign(Object.assign({},gt),fr)),kt(ve.createElement(Et.Field,Object.assign({},je,{messageVariables:gt,trigger:Yr,validateTrigger:Pn,onMetaChange:Jr}),(ht,Ht,sn)=>{const Ln=Rt(Ct).length&&Ht?Ht.name:[],gr=Sn(Ln,di),vr=Xn!==void 0?Xn:!!(Pr&&Pr.some(br=>{if(br&&typeof br=="object"&&br.required&&!br.warningOnly)return!0;if(typeof br=="function"){const cr=br(sn);return cr&&cr.required&&!cr.warningOnly}return!1})),Mr=Object.assign({},ht);let Cr=null;if(Array.isArray(si)&&Qt)Cr=si;else if(!(zi&&(!(Vn||an)||Qt))){if(!(an&&!zi&&!Qt))if((0,Ae.l$)(si)){const br=Object.assign(Object.assign({},si.props),Mr);if(br.id||(br.id=gr),Si||Ti.length>0||Ki.length>0||je.extra){const Dr=[];(Si||Ti.length>0)&&Dr.push(`${gr}_help`),je.extra&&Dr.push(`${gr}_extra`),br["aria-describedby"]=Dr.join(" ")}Ti.length>0&&(br["aria-invalid"]="true"),vr&&(br["aria-required"]="true"),(0,yn.Yr)(si)&&(br.ref=Tr(Ln,si)),new Set([].concat((0,se.Z)(Rt(Yr)),(0,se.Z)(Rt(Pn)))).forEach(Dr=>{br[Dr]=function(){for(var dr,ei,jr,De,Fe,Re=arguments.length,Ze=new Array(Re),nt=0;nt<Re;nt++)Ze[nt]=arguments[nt];(jr=Mr[Dr])===null||jr===void 0||(dr=jr).call.apply(dr,[Mr].concat(Ze)),(Fe=(De=si.props)[Dr])===null||Fe===void 0||(ei=Fe).call.apply(ei,[De].concat(Ze))}});const fi=[br["aria-required"],br["aria-invalid"],br["aria-describedby"]];Cr=ve.createElement(At,{value:Mr[je.valuePropName||"value"],update:si,childProps:fi},(0,Ae.Tm)(si,br))}else zi&&(Vn||an)&&!Qt?Cr=si(sn):Cr=si}return Gr(Cr,gr,vr)}))}const kr=wn;kr.useStatus=he;var or=kr,ar=function(je,Ct){var Wt={};for(var Ft in je)Object.prototype.hasOwnProperty.call(je,Ft)&&Ct.indexOf(Ft)<0&&(Wt[Ft]=je[Ft]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,Ft=Object.getOwnPropertySymbols(je);an<Ft.length;an++)Ct.indexOf(Ft[an])<0&&Object.prototype.propertyIsEnumerable.call(je,Ft[an])&&(Wt[Ft[an]]=je[Ft[an]]);return Wt},it=je=>{var{prefixCls:Ct,children:Wt}=je,Ft=ar(je,["prefixCls","children"]);const{getPrefixCls:an}=ve.useContext(Yt.E_),rn=an("form",Ct),Vn=ve.useMemo(()=>({prefixCls:rn,status:"error"}),[rn]);return ve.createElement(Et.List,Object.assign({},Ft),(Pr,nr,Xn)=>ve.createElement(Me.Rk.Provider,{value:Vn},Wt(Pr.map(mr=>Object.assign(Object.assign({},mr),{fieldKey:mr.key})),nr,{errors:Xn.errors,warnings:Xn.warnings})))};function dt(){const{form:je}=(0,ve.useContext)(Me.q3);return je}const Bt=jt;Bt.Item=or,Bt.List=it,Bt.ErrorList=Pt,Bt.useForm=ft,Bt.useFormInstance=dt,Bt.useWatch=Et.useWatch,Bt.Provider=Me.RV,Bt.create=()=>{};var qt=Bt},25378:function(bn,Zt,le){"use strict";var se=le(67294),Be=le(14075),Ne=le(57838),Ye=le(74443);function ve(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,se.useRef)({}),we=(0,Ne.Z)(),me=(0,Ye.ZP)();return(0,Be.Z)(()=>{const Te=me.subscribe(ot=>{Me.current=ot,Se&&we()});return()=>me.unsubscribe(Te)},[]),Me.current}Zt.Z=ve},31795:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Rn}});var se=le(42922),Be=le(53978),Ne=le(94184),Ye=le.n(Ne),ve=le(87462),Se=le(4942),Me=le(71002),we=le(97685),me=le(45987),Te=le(15671),ot=le(43144);function Oe(){return typeof BigInt=="function"}function st(it){return!it&&it!==0&&!Number.isNaN(it)||!String(it).trim()}function lt(it){var dt=it.trim(),Bt=dt.startsWith("-");Bt&&(dt=dt.slice(1)),dt=dt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),dt.startsWith(".")&&(dt="0".concat(dt));var qt=dt||"0",je=qt.split("."),Ct=je[0]||"0",Wt=je[1]||"0";Ct==="0"&&Wt==="0"&&(Bt=!1);var Ft=Bt?"-":"";return{negative:Bt,negativeStr:Ft,trimStr:qt,integerStr:Ct,decimalStr:Wt,fullStr:"".concat(Ft).concat(qt)}}function Je(it){var dt=String(it);return!Number.isNaN(Number(dt))&&dt.includes("e")}function Ge(it){var dt=String(it);if(Je(it)){var Bt=Number(dt.slice(dt.indexOf("e-")+2)),qt=dt.match(/\.(\d+)/);return qt!=null&&qt[1]&&(Bt+=qt[1].length),Bt}return dt.includes(".")&&pt(dt)?dt.length-dt.indexOf(".")-1:0}function Ce(it){var dt=String(it);if(Je(it)){if(it>Number.MAX_SAFE_INTEGER)return String(Oe()?BigInt(it).toString():Number.MAX_SAFE_INTEGER);if(it<Number.MIN_SAFE_INTEGER)return String(Oe()?BigInt(it).toString():Number.MIN_SAFE_INTEGER);dt=it.toFixed(Ge(dt))}return lt(dt).fullStr}function pt(it){return typeof it=="number"?!Number.isNaN(it):it?/^\s*-?\d+(\.\d+)?\s*$/.test(it)||/^\s*-?\d+\.\s*$/.test(it)||/^\s*-?\.\d+\s*$/.test(it):!1}var zt=function(){function it(dt){if((0,Te.Z)(this,it),(0,Se.Z)(this,"origin",""),(0,Se.Z)(this,"negative",void 0),(0,Se.Z)(this,"integer",void 0),(0,Se.Z)(this,"decimal",void 0),(0,Se.Z)(this,"decimalLen",void 0),(0,Se.Z)(this,"empty",void 0),(0,Se.Z)(this,"nan",void 0),st(dt)){this.empty=!0;return}if(this.origin=String(dt),dt==="-"||Number.isNaN(dt)){this.nan=!0;return}var Bt=dt;if(Je(Bt)&&(Bt=Number(Bt)),Bt=typeof Bt=="string"?Bt:Ce(Bt),pt(Bt)){var qt=lt(Bt);this.negative=qt.negative;var je=qt.trimStr.split(".");this.integer=BigInt(je[0]);var Ct=je[1]||"0";this.decimal=BigInt(Ct),this.decimalLen=Ct.length}else this.nan=!0}return(0,ot.Z)(it,[{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(Bt){var qt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Bt,"0"));return BigInt(qt)}},{key:"negate",value:function(){var Bt=new it(this.toString());return Bt.negative=!Bt.negative,Bt}},{key:"cal",value:function(Bt,qt,je){var Ct=Math.max(this.getDecimalStr().length,Bt.getDecimalStr().length),Wt=this.alignDecimal(Ct),Ft=Bt.alignDecimal(Ct),an=qt(Wt,Ft).toString(),rn=je(Ct),Vn=lt(an),Pr=Vn.negativeStr,nr=Vn.trimStr,Xn="".concat(Pr).concat(nr.padStart(rn+1,"0"));return new it("".concat(Xn.slice(0,-rn),".").concat(Xn.slice(-rn)))}},{key:"add",value:function(Bt){if(this.isInvalidate())return new it(Bt);var qt=new it(Bt);return qt.isInvalidate()?this:this.cal(qt,function(je,Ct){return je+Ct},function(je){return je})}},{key:"multi",value:function(Bt){var qt=new it(Bt);return this.isInvalidate()||qt.isInvalidate()?new it(NaN):this.cal(qt,function(je,Ct){return je*Ct},function(je){return je*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(Bt){return this.toString()===(Bt==null?void 0:Bt.toString())}},{key:"lessEquals",value:function(Bt){return this.add(Bt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Bt?this.isInvalidate()?"":lt("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),it}(),qe=function(){function it(dt){if((0,Te.Z)(this,it),(0,Se.Z)(this,"origin",""),(0,Se.Z)(this,"number",void 0),(0,Se.Z)(this,"empty",void 0),st(dt)){this.empty=!0;return}this.origin=String(dt),this.number=Number(dt)}return(0,ot.Z)(it,[{key:"negate",value:function(){return new it(-this.toNumber())}},{key:"add",value:function(Bt){if(this.isInvalidate())return new it(Bt);var qt=Number(Bt);if(Number.isNaN(qt))return this;var je=this.number+qt;if(je>Number.MAX_SAFE_INTEGER)return new it(Number.MAX_SAFE_INTEGER);if(je<Number.MIN_SAFE_INTEGER)return new it(Number.MIN_SAFE_INTEGER);var Ct=Math.max(Ge(this.number),Ge(qt));return new it(je.toFixed(Ct))}},{key:"multi",value:function(Bt){var qt=Number(Bt);if(this.isInvalidate()||Number.isNaN(qt))return new it(NaN);var je=this.number*qt;if(je>Number.MAX_SAFE_INTEGER)return new it(Number.MAX_SAFE_INTEGER);if(je<Number.MIN_SAFE_INTEGER)return new it(Number.MIN_SAFE_INTEGER);var Ct=Math.max(Ge(this.number),Ge(qt));return new it(je.toFixed(Ct))}},{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(Bt){return this.toNumber()===(Bt==null?void 0:Bt.toNumber())}},{key:"lessEquals",value:function(Bt){return this.add(Bt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Bt?this.isInvalidate()?"":Ce(this.number):this.origin}}]),it}();function ut(it){return Oe()?new zt(it):new qe(it)}function xe(it,dt,Bt){var qt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(it==="")return"";var je=lt(it),Ct=je.negativeStr,Wt=je.integerStr,Ft=je.decimalStr,an="".concat(dt).concat(Ft),rn="".concat(Ct).concat(Wt);if(Bt>=0){var Vn=Number(Ft[Bt]);if(Vn>=5&&!qt){var Pr=ut(it).add("".concat(Ct,"0.").concat("0".repeat(Bt)).concat(10-Vn));return xe(Pr.toString(),dt,Bt,qt)}return Bt===0?rn:"".concat(rn).concat(dt).concat(Ft.padEnd(Bt,"0").slice(0,Bt))}return an===".0"?rn:"".concat(rn).concat(an)}var Ee=ut,Ve=le(67656),Xe=le(67294);function Mt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mt=Mt()?Xe.useLayoutEffect:Xe.useEffect,St=function(dt,Bt){var qt=Xe.useRef(!0);mt(function(){return dt(qt.current)},Bt),mt(function(){return qt.current=!1,function(){qt.current=!0}},[])},Ke=function(dt,Bt){St(function(qt){if(!qt)return dt()},Bt)},Pt=St,Et=le(27183);function Yt(it,dt,Bt){var qt=React.useRef({});return(!("value"in qt.current)||Bt(qt.current.condition,dt))&&(qt.current.value=it(),qt.current.condition=dt),qt.current.value}function at(it,dt){typeof it=="function"?it(dt):(0,Me.Z)(it)==="object"&&it&&"current"in it&&(it.current=dt)}function Vt(){for(var it=arguments.length,dt=new Array(it),Bt=0;Bt<it;Bt++)dt[Bt]=arguments[Bt];var qt=dt.filter(function(je){return je});return qt.length<=1?qt[0]:function(je){dt.forEach(function(Ct){at(Ct,je)})}}function fn(){for(var it=arguments.length,dt=new Array(it),Bt=0;Bt<it;Bt++)dt[Bt]=arguments[Bt];return useMemo(function(){return Vt.apply(void 0,dt)},dt,function(qt,je){return qt.length!==je.length||qt.every(function(Ct,Wt){return Ct!==je[Wt]})})}function dn(it){var dt,Bt,qt=isMemo(it)?it.type.type:it.type;return!(typeof qt=="function"&&!((dt=qt.prototype)!==null&&dt!==void 0&&dt.render)||typeof it=="function"&&!((Bt=it.prototype)!==null&&Bt!==void 0&&Bt.render))}function Ue(it){return!isValidElement(it)||isFragment(it)?!1:dn(it)}var Le={},Rt=[],Sn=function(dt){Rt.push(dt)};function un(it,dt){if(0)var Bt}function tt(it,dt){if(0)var Bt}function ft(){Le={}}function Xt(it,dt,Bt){!dt&&!Le[Bt]&&(it(!1,Bt),Le[Bt]=!0)}function Tn(it,dt){Xt(un,it,dt)}function mn(it,dt){Xt(tt,it,dt)}Tn.preMessage=Sn,Tn.resetWarned=ft,Tn.noteOnce=mn;var Ut=Tn;function jt(it,dt){var Bt=(0,Xe.useRef)(null);function qt(){try{var Ct=it.selectionStart,Wt=it.selectionEnd,Ft=it.value,an=Ft.substring(0,Ct),rn=Ft.substring(Wt);Bt.current={start:Ct,end:Wt,value:Ft,beforeTxt:an,afterTxt:rn}}catch(Vn){}}function je(){if(it&&Bt.current&&dt)try{var Ct=it.value,Wt=Bt.current,Ft=Wt.beforeTxt,an=Wt.afterTxt,rn=Wt.start,Vn=Ct.length;if(Ct.endsWith(an))Vn=Ct.length-Bt.current.afterTxt.length;else if(Ct.startsWith(Ft))Vn=Ft.length;else{var Pr=Ft[rn-1],nr=Ct.indexOf(Pr,rn-1);nr!==-1&&(Vn=nr+1)}it.setSelectionRange(Vn,Vn)}catch(Xn){Ut(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Xn.message))}}return[qt,je]}var _n=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var it=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(it)||/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(it==null?void 0:it.substr(0,4))},yn=function(){var dt=(0,Xe.useState)(!1),Bt=(0,we.Z)(dt,2),qt=Bt[0],je=Bt[1];return Pt(function(){je(_n())},[]),qt},Ae=yn,ce=function(dt){return+setTimeout(dt,16)},ue=function(dt){return clearTimeout(dt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ce=function(dt){return window.requestAnimationFrame(dt)},ue=function(dt){return window.cancelAnimationFrame(dt)});var pe=0,he=new Map;function oe(it){he.delete(it)}var Ie=function(dt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pe+=1;var qt=pe;function je(Ct){if(Ct===0)oe(qt),dt();else{var Wt=ce(function(){je(Ct-1)});he.set(qt,Wt)}}return je(Bt),qt};Ie.cancel=function(it){var dt=he.get(it);return oe(dt),ue(dt)};var Qe=Ie,Lt=200,$t=600;function Kt(it){var dt=it.prefixCls,Bt=it.upNode,qt=it.downNode,je=it.upDisabled,Ct=it.downDisabled,Wt=it.onStep,Ft=Xe.useRef(),an=Xe.useRef([]),rn=Xe.useRef();rn.current=Wt;var Vn=function(){clearTimeout(Ft.current)},Pr=function(Si,Ii){Si.preventDefault(),Vn(),rn.current(Ii);function di(){rn.current(Ii),Ft.current=setTimeout(di,Lt)}Ft.current=setTimeout(di,$t)};Xe.useEffect(function(){return function(){Vn(),an.current.forEach(function(qn){return Qe.cancel(qn)})}},[]);var nr=Ae();if(nr)return null;var Xn="".concat(dt,"-handler"),mr=Ye()(Xn,"".concat(Xn,"-up"),(0,Se.Z)({},"".concat(Xn,"-up-disabled"),je)),fr=Ye()(Xn,"".concat(Xn,"-down"),(0,Se.Z)({},"".concat(Xn,"-down-disabled"),Ct)),Yr=function(){return an.current.push(Qe(Vn))},xn={unselectable:"on",role:"button",onMouseUp:Yr,onMouseLeave:Yr};return Xe.createElement("div",{className:"".concat(Xn,"-wrap")},Xe.createElement("span",(0,ve.Z)({},xn,{onMouseDown:function(Si){Pr(Si,!0)},"aria-label":"Increase Value","aria-disabled":je,className:mr}),Bt||Xe.createElement("span",{unselectable:"on",className:"".concat(dt,"-handler-up-inner")})),Xe.createElement("span",(0,ve.Z)({},xn,{onMouseDown:function(Si){Pr(Si,!1)},"aria-label":"Decrease Value","aria-disabled":Ct,className:fr}),qt||Xe.createElement("span",{unselectable:"on",className:"".concat(dt,"-handler-down-inner")})))}function en(it){var dt=typeof it=="number"?Ce(it):lt(it).fullStr,Bt=dt.includes(".");return Bt?lt(dt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:it+"0"}var Jt=le(87887),et=function(){var it=(0,Xe.useRef)(0),dt=function(){Qe.cancel(it.current)};return(0,Xe.useEffect)(function(){return dt},[]),function(Bt){dt(),it.current=Qe(function(){Bt()})}},wt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Tt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Ot=function(dt,Bt){return dt||Bt.isEmpty()?Bt.toString():Bt.toNumber()},yt=function(dt){var Bt=Ee(dt);return Bt.isInvalidate()?null:Bt},Dn=Xe.forwardRef(function(it,dt){var Bt,qt=it.prefixCls,je=qt===void 0?"rc-input-number":qt,Ct=it.className,Wt=it.style,Ft=it.min,an=it.max,rn=it.step,Vn=rn===void 0?1:rn,Pr=it.defaultValue,nr=it.value,Xn=it.disabled,mr=it.readOnly,fr=it.upHandler,Yr=it.downHandler,xn=it.keyboard,qn=it.controls,Si=qn===void 0?!0:qn,Ii=it.classNames,di=it.stringMode,si=it.parser,zi=it.formatter,Lr=it.precision,Mi=it.decimalSeparator,Pn=it.onChange,Qt=it.onInput,Gt=it.onPressEnter,kt=it.onStep,Wn=(0,me.Z)(it,wt),ri="".concat(je,"-input"),Ai=Xe.useRef(null),Zr=Xe.useState(!1),Hn=(0,we.Z)(Zr,2),tn=Hn[0],Ur=Hn[1],Jr=Xe.useRef(!1),ai=Xe.useRef(!1),Ti=Xe.useRef(!1),Ki=Xe.useState(function(){return Ee(nr!=null?nr:Pr)}),Tr=(0,we.Z)(Ki,2),Gr=Tr[0],gt=Tr[1];function ht(Qn){nr===void 0&>(Qn)}var Ht=Xe.useCallback(function(Qn,Yn){if(!Yn)return Lr>=0?Lr:Math.max(Ge(Qn),Ge(Vn))},[Lr,Vn]),sn=Xe.useCallback(function(Qn){var Yn=String(Qn);if(si)return si(Yn);var ir=Yn;return Mi&&(ir=ir.replace(Mi,".")),ir.replace(/[^\w.-]+/g,"")},[si,Mi]),Ln=Xe.useRef(""),gr=Xe.useCallback(function(Qn,Yn){if(zi)return zi(Qn,{userTyping:Yn,input:String(Ln.current)});var ir=typeof Qn=="number"?Ce(Qn):Qn;if(!Yn){var rr=Ht(ir,Yn);if(pt(ir)&&(Mi||rr>=0)){var Er=Mi||".";ir=xe(ir,Er,rr)}}return ir},[zi,Ht,Mi]),vr=Xe.useState(function(){var Qn=Pr!=null?Pr:nr;return Gr.isInvalidate()&&["string","number"].includes((0,Me.Z)(Qn))?Number.isNaN(Qn)?"":Qn:gr(Gr.toString(),!1)}),Mr=(0,we.Z)(vr,2),Cr=Mr[0],br=Mr[1];Ln.current=Cr;function cr(Qn,Yn){br(gr(Qn.isInvalidate()?Qn.toString(!1):Qn.toString(!Yn),Yn))}var fi=Xe.useMemo(function(){return yt(an)},[an,Lr]),Dr=Xe.useMemo(function(){return yt(Ft)},[Ft,Lr]),dr=Xe.useMemo(function(){return!fi||!Gr||Gr.isInvalidate()?!1:fi.lessEquals(Gr)},[fi,Gr]),ei=Xe.useMemo(function(){return!Dr||!Gr||Gr.isInvalidate()?!1:Gr.lessEquals(Dr)},[Dr,Gr]),jr=jt(Ai.current,tn),De=(0,we.Z)(jr,2),Fe=De[0],Re=De[1],Ze=function(Yn){return fi&&!Yn.lessEquals(fi)?fi:Dr&&!Dr.lessEquals(Yn)?Dr:null},nt=function(Yn){return!Ze(Yn)},ct=function(Yn,ir){var rr=Yn,Er=nt(rr)||rr.isEmpty();if(!rr.isEmpty()&&!ir&&(rr=Ze(rr)||rr,Er=!0),!mr&&!Xn&&Er){var He=rr.toString(),We=Ht(He,ir);return We>=0&&(rr=Ee(xe(He,".",We)),nt(rr)||(rr=Ee(xe(He,".",We,!0)))),rr.equals(Gr)||(ht(rr),Pn==null||Pn(rr.isEmpty()?null:Ot(di,rr)),nr===void 0&&cr(rr,ir)),rr}return Gr},vt=et(),nn=function Qn(Yn){if(Fe(),Ln.current=Yn,br(Yn),!ai.current){var ir=sn(Yn),rr=Ee(ir);rr.isNaN()||ct(rr,!0)}Qt==null||Qt(Yn),vt(function(){var Er=Yn;si||(Er=Yn.replace(/。/g,".")),Er!==Yn&&Qn(Er)})},on=function(){ai.current=!0},Un=function(){ai.current=!1,nn(Ai.current.value)},yr=function(Yn){nn(Yn.target.value)},Gn=function(Yn){var ir;if(!(Yn&&dr||!Yn&&ei)){Jr.current=!1;var rr=Ee(Ti.current?en(Vn):Vn);Yn||(rr=rr.negate());var Er=(Gr||Ee(0)).add(rr.toString()),He=ct(Er,!1);kt==null||kt(Ot(di,He),{offset:Ti.current?en(Vn):Vn,type:Yn?"up":"down"}),(ir=Ai.current)===null||ir===void 0||ir.focus()}},Cn=function(Yn){var ir=Ee(sn(Cr)),rr=ir;ir.isNaN()?rr=ct(Gr,Yn):rr=ct(ir,Yn),nr!==void 0?cr(Gr,!1):rr.isNaN()||cr(rr,!1)},vn=function(){Jr.current=!0},Bn=function(Yn){var ir=Yn.key,rr=Yn.shiftKey;Jr.current=!0,Ti.current=rr,ir==="Enter"&&(ai.current||(Jr.current=!1),Cn(!1),Gt==null||Gt(Yn)),xn!==!1&&!ai.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ir)&&(Gn(ir==="Up"||ir==="ArrowUp"),Yn.preventDefault())},Fn=function(){Jr.current=!1,Ti.current=!1},xr=function(){Cn(!1),Ur(!1),Jr.current=!1};return Ke(function(){Gr.isInvalidate()||cr(Gr,!1)},[Lr]),Ke(function(){var Qn=Ee(nr);gt(Qn);var Yn=Ee(sn(Cr));(!Qn.equals(Yn)||!Jr.current||zi)&&cr(Qn,Jr.current)},[nr]),Ke(function(){zi&&Re()},[Cr]),Xe.createElement("div",{className:Ye()(je,Ii==null?void 0:Ii.input,Ct,(Bt={},(0,Se.Z)(Bt,"".concat(je,"-focused"),tn),(0,Se.Z)(Bt,"".concat(je,"-disabled"),Xn),(0,Se.Z)(Bt,"".concat(je,"-readonly"),mr),(0,Se.Z)(Bt,"".concat(je,"-not-a-number"),Gr.isNaN()),(0,Se.Z)(Bt,"".concat(je,"-out-of-range"),!Gr.isInvalidate()&&!nt(Gr)),Bt)),style:Wt,onFocus:function(){Ur(!0)},onBlur:xr,onKeyDown:Bn,onKeyUp:Fn,onCompositionStart:on,onCompositionEnd:Un,onBeforeInput:vn},Si&&Xe.createElement(Kt,{prefixCls:je,upNode:fr,downNode:Yr,upDisabled:dr,downDisabled:ei,onStep:Gn}),Xe.createElement("div",{className:"".concat(ri,"-wrap")},Xe.createElement("input",(0,ve.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ft,"aria-valuemax":an,"aria-valuenow":Gr.isInvalidate()?null:Gr.toString(),step:Vn},Wn,{ref:Vt(Ai,dt),className:ri,value:Cr,onChange:yr,disabled:Xn,readOnly:mr}))))}),gn=Xe.forwardRef(function(it,dt){var Bt=it.disabled,qt=it.style,je=it.prefixCls,Ct=it.value,Wt=it.prefix,Ft=it.suffix,an=it.addonBefore,rn=it.addonAfter,Vn=it.classes,Pr=it.className,nr=it.classNames,Xn=(0,me.Z)(it,Tt),mr=Xe.useRef(null),fr=function(xn){mr.current&&(0,Jt.nH)(mr.current,xn)};return Xe.createElement(Ve.BaseInput,{inputElement:Xe.createElement(Dn,(0,ve.Z)({prefixCls:je,disabled:Bt,classNames:nr,ref:Vt(mr,dt)},Xn)),className:Pr,triggerFocus:fr,prefixCls:je,value:Ct,disabled:Bt,style:qt,prefix:Wt,suffix:Ft,addonAfter:rn,addonBefore:an,classes:Vn,classNames:nr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});gn.displayName="InputNumber";var $n=gn,Kr=$n,tr=le(9708),lr=le(53124),ur=le(46735),ni=le(98866),Xr=le(98675),Qr=le(65223),gi=le(4173),Sr=le(47673),Ei=le(14747),Ui=le(80110),ea=le(67968),ra=le(45503);const Zi=(it,dt)=>{let{componentCls:Bt,borderRadiusSM:qt,borderRadiusLG:je}=it;const Ct=dt==="lg"?je:qt;return{[`&-${dt}`]:{[`${Bt}-handler-wrap`]:{borderStartEndRadius:Ct,borderEndEndRadius:Ct},[`${Bt}-handler-up`]:{borderStartEndRadius:Ct},[`${Bt}-handler-down`]:{borderEndEndRadius:Ct}}}},At=it=>{const{componentCls:dt,lineWidth:Bt,lineType:qt,colorBorder:je,borderRadius:Ct,fontSizeLG:Wt,controlHeightLG:Ft,controlHeightSM:an,colorError:rn,paddingInlineSM:Vn,colorTextDescription:Pr,motionDurationMid:nr,handleHoverColor:Xn,paddingInline:mr,paddingBlock:fr,handleBg:Yr,handleActiveBg:xn,colorTextDisabled:qn,borderRadiusSM:Si,borderRadiusLG:Ii,controlWidth:di,handleVisible:si,handleBorderColor:zi}=it;return[{[dt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ei.Wf)(it)),(0,Sr.ik)(it)),(0,Sr.bi)(it,dt)),{display:"inline-block",width:di,margin:0,padding:0,border:`${Bt}px ${qt} ${je}`,borderRadius:Ct,"&-rtl":{direction:"rtl",[`${dt}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Wt,borderRadius:Ii,[`input${dt}-input`]:{height:Ft-2*Bt}},"&-sm":{padding:0,borderRadius:Si,[`input${dt}-input`]:{height:an-2*Bt,padding:`0 ${Vn}px`}},"&:hover":Object.assign({},(0,Sr.pU)(it)),"&-focused":Object.assign({},(0,Sr.M1)(it)),"&-out-of-range":{[`${dt}-input-wrap`]:{input:{color:rn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Ei.Wf)(it)),(0,Sr.s7)(it)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${dt}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${dt}-group-addon`]:{borderRadius:Ii,fontSize:it.fontSizeLG}},"&-sm":{[`${dt}-group-addon`]:{borderRadius:Si}},[`${dt}-wrapper-disabled > ${dt}-group-addon`]:Object.assign({},(0,Sr.Xy)(it))}}),[`&-disabled ${dt}-input`]:{cursor:"not-allowed"},[dt]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ei.Wf)(it)),{width:"100%",padding:`${fr}px ${mr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Ct,outline:0,transition:`all ${nr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Sr.nz)(it.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[dt]:Object.assign(Object.assign(Object.assign({[`&:hover ${dt}-handler-wrap, &-focused ${dt}-handler-wrap`]:{opacity:1},[`${dt}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:it.handleWidth,height:"100%",background:Yr,borderStartStartRadius:0,borderStartEndRadius:Ct,borderEndEndRadius:Ct,borderEndStartRadius:0,opacity:si===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${nr} linear ${nr}`,[`${dt}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${dt}-handler-up-inner,
|
|
|
${dt}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:it.handleFontSize}}},[`${dt}-handler`]:{height:"50%",overflow:"hidden",color:Pr,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Bt}px ${qt} ${zi}`,transition:`all ${nr} linear`,"&:active":{background:xn},"&:hover":{height:"60%",[`
|
|
|
${dt}-handler-up-inner,
|
|
|
${dt}-handler-down-inner
|
|
|
`]:{color:Xn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Ei.Ro)()),{color:Pr,transition:`all ${nr} linear`,userSelect:"none"})},[`${dt}-handler-up`]:{borderStartEndRadius:Ct},[`${dt}-handler-down`]:{borderBlockStart:`${Bt}px ${qt} ${zi}`,borderEndEndRadius:Ct}},Zi(it,"lg")),Zi(it,"sm")),{"&-disabled, &-readonly":{[`${dt}-handler-wrap`]:{display:"none"},[`${dt}-input`]:{color:"inherit"}},[`
|
|
|
${dt}-handler-up-disabled,
|
|
|
${dt}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${dt}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${dt}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:qn}})},{[`${dt}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${dt}-handler-down`]:{borderBlockStartWidth:0}}}]},An=it=>{const{componentCls:dt,paddingBlock:Bt,paddingInline:qt,inputAffixPadding:je,controlWidth:Ct,borderRadiusLG:Wt,borderRadiusSM:Ft}=it;return{[`${dt}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Sr.ik)(it)),(0,Sr.bi)(it,`${dt}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Ct,padding:0,paddingInlineStart:qt,"&-lg":{borderRadius:Wt},"&-sm":{borderRadius:Ft},[`&:not(${dt}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Sr.pU)(it)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${dt}-disabled`]:{background:"transparent"},[`> div${dt}`]:{width:"100%",border:"none",outline:"none",[`&${dt}-focused`]:{boxShadow:"none !important"}},[`input${dt}-input`]:{padding:`${Bt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${dt}-handler-wrap`]:{zIndex:2},[dt]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:je},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:qt,marginInlineStart:je}}})}};var On=(0,ea.Z)("InputNumber",it=>{const dt=(0,ra.TS)(it,(0,Sr.e5)(it));return[At(dt),An(dt),(0,Ui.c)(dt)]},it=>Object.assign(Object.assign({},(0,Sr.TM)(it)),{controlWidth:90,handleWidth:it.controlHeightSM-it.lineWidth*2,handleFontSize:it.fontSize/2,handleVisible:"auto",handleActiveBg:it.colorFillAlter,handleBg:it.colorBgContainer,handleHoverColor:it.colorPrimary,handleBorderColor:it.colorBorder})),wn=function(it,dt){var Bt={};for(var qt in it)Object.prototype.hasOwnProperty.call(it,qt)&&dt.indexOf(qt)<0&&(Bt[qt]=it[qt]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,qt=Object.getOwnPropertySymbols(it);je<qt.length;je++)dt.indexOf(qt[je])<0&&Object.prototype.propertyIsEnumerable.call(it,qt[je])&&(Bt[qt[je]]=it[qt[je]]);return Bt};const kr=Xe.forwardRef((it,dt)=>{const{getPrefixCls:Bt,direction:qt}=Xe.useContext(lr.E_),je=Xe.useRef(null);Xe.useImperativeHandle(dt,()=>je.current);const{className:Ct,rootClassName:Wt,size:Ft,disabled:an,prefixCls:rn,addonBefore:Vn,addonAfter:Pr,prefix:nr,bordered:Xn=!0,readOnly:mr,status:fr,controls:Yr}=it,xn=wn(it,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),qn=Bt("input-number",rn),[Si,Ii]=On(qn),{compactSize:di,compactItemClassnames:si}=(0,gi.ri)(qn,qt);let zi=Xe.createElement(Be.Z,{className:`${qn}-handler-up-inner`}),Lr=Xe.createElement(se.Z,{className:`${qn}-handler-down-inner`});const Mi=typeof Yr=="boolean"?Yr:void 0;typeof Yr=="object"&&(zi=typeof Yr.upIcon=="undefined"?zi:Xe.createElement("span",{className:`${qn}-handler-up-inner`},Yr.upIcon),Lr=typeof Yr.downIcon=="undefined"?Lr:Xe.createElement("span",{className:`${qn}-handler-down-inner`},Yr.downIcon));const{hasFeedback:Pn,status:Qt,isFormItemInput:Gt,feedbackIcon:kt}=Xe.useContext(Qr.aM),Wn=(0,tr.F)(Qt,fr),ri=(0,Xr.Z)(Jr=>{var ai;return(ai=Ft!=null?Ft:di)!==null&&ai!==void 0?ai:Jr}),Ai=Xe.useContext(ni.Z),Zr=an!=null?an:Ai,Hn=Ye()({[`${qn}-lg`]:ri==="large",[`${qn}-sm`]:ri==="small",[`${qn}-rtl`]:qt==="rtl",[`${qn}-borderless`]:!Xn,[`${qn}-in-form-item`]:Gt},(0,tr.Z)(qn,Wn),si,Ii),tn=`${qn}-group`,Ur=Xe.createElement(Kr,Object.assign({ref:je,disabled:Zr,className:Ye()(Ct,Wt),upHandler:zi,downHandler:Lr,prefixCls:qn,readOnly:mr,controls:Mi,prefix:nr,suffix:Pn&&kt,addonAfter:Pr&&Xe.createElement(gi.BR,null,Xe.createElement(Qr.Ux,{override:!0,status:!0},Pr)),addonBefore:Vn&&Xe.createElement(gi.BR,null,Xe.createElement(Qr.Ux,{override:!0,status:!0},Vn)),classNames:{input:Hn},classes:{affixWrapper:Ye()((0,tr.Z)(`${qn}-affix-wrapper`,Wn,Pn),{[`${qn}-affix-wrapper-sm`]:ri==="small",[`${qn}-affix-wrapper-lg`]:ri==="large",[`${qn}-affix-wrapper-rtl`]:qt==="rtl",[`${qn}-affix-wrapper-borderless`]:!Xn},Ii),wrapper:Ye()({[`${tn}-rtl`]:qt==="rtl",[`${qn}-wrapper-disabled`]:Zr},Ii),group:Ye()({[`${qn}-group-wrapper-sm`]:ri==="small",[`${qn}-group-wrapper-lg`]:ri==="large",[`${qn}-group-wrapper-rtl`]:qt==="rtl"},(0,tr.Z)(`${qn}-group-wrapper`,Wn,Pn),Ii)}},xn));return Si(Ur)}),or=kr,ar=it=>Xe.createElement(ur.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Xe.createElement(kr,Object.assign({},it)));or._InternalPanelDoNotUseOrYouWillBeFired=ar;var Rn=or},82586:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return zt},n:function(){return Ce}});var se=le(16646),Be=le(94184),Ne=le.n(Be),Ye=le(67656),ve=le(17799),Se=le(67294),Me=le(9708),we=le(53124),me=le(98866),Te=le(98675),ot=le(65223),Oe=le(4173),st=le(72922),lt=le(47673);function Je(qe){return!!(qe.prefix||qe.suffix||qe.allowClear)}var Ge=function(qe,ut){var xe={};for(var Ee in qe)Object.prototype.hasOwnProperty.call(qe,Ee)&&ut.indexOf(Ee)<0&&(xe[Ee]=qe[Ee]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Ee=Object.getOwnPropertySymbols(qe);Ve<Ee.length;Ve++)ut.indexOf(Ee[Ve])<0&&Object.prototype.propertyIsEnumerable.call(qe,Ee[Ve])&&(xe[Ee[Ve]]=qe[Ee[Ve]]);return xe};function Ce(qe,ut){if(!qe)return;qe.focus(ut);const{cursor:xe}=ut||{};if(xe){const Ee=qe.value.length;switch(xe){case"start":qe.setSelectionRange(0,0);break;case"end":qe.setSelectionRange(Ee,Ee);break;default:qe.setSelectionRange(0,Ee);break}}}var zt=(0,Se.forwardRef)((qe,ut)=>{var xe;const{prefixCls:Ee,bordered:Ve=!0,status:Xe,size:Mt,disabled:mt,onBlur:St,onFocus:Ke,suffix:Pt,allowClear:Et,addonAfter:Yt,addonBefore:at,className:Vt,style:fn,styles:dn,rootClassName:Ue,onChange:Le,classNames:Rt}=qe,Sn=Ge(qe,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:un,direction:tt,input:ft}=Se.useContext(we.E_),Xt=un("input",Ee),Tn=(0,Se.useRef)(null),[mn,Ut]=(0,lt.ZP)(Xt),{compactSize:jt,compactItemClassnames:_n}=(0,Oe.ri)(Xt,tt),yn=(0,Te.Z)(wt=>{var Tt;return(Tt=Mt!=null?Mt:jt)!==null&&Tt!==void 0?Tt:wt}),Ae=Se.useContext(me.Z),ce=mt!=null?mt:Ae,{status:ue,hasFeedback:pe,feedbackIcon:he}=(0,Se.useContext)(ot.aM),oe=(0,Me.F)(ue,Xe),Ie=Je(qe)||!!pe,Qe=(0,Se.useRef)(Ie);(0,Se.useEffect)(()=>{var wt;Ie&&Qe.current,Qe.current=Ie},[Ie]);const Lt=(0,st.Z)(Tn,!0),$t=wt=>{Lt(),St==null||St(wt)},Kt=wt=>{Lt(),Ke==null||Ke(wt)},en=wt=>{Lt(),Le==null||Le(wt)},Jt=(pe||Pt)&&Se.createElement(Se.Fragment,null,Pt,pe&&he);let et;return typeof Et=="object"&&(Et!=null&&Et.clearIcon)?et=Et:Et&&(et={clearIcon:Se.createElement(se.Z,null)}),mn(Se.createElement(Ye.default,Object.assign({ref:(0,ve.sQ)(ut,Tn),prefixCls:Xt,autoComplete:ft==null?void 0:ft.autoComplete},Sn,{disabled:ce,onBlur:$t,onFocus:Kt,style:Object.assign(Object.assign({},ft==null?void 0:ft.style),fn),styles:Object.assign(Object.assign({},ft==null?void 0:ft.styles),dn),suffix:Jt,allowClear:et,className:Ne()(Vt,Ue,_n,ft==null?void 0:ft.className),onChange:en,addonAfter:Yt&&Se.createElement(Oe.BR,null,Se.createElement(ot.Ux,{override:!0,status:!0},Yt)),addonBefore:at&&Se.createElement(Oe.BR,null,Se.createElement(ot.Ux,{override:!0,status:!0},at)),classNames:Object.assign(Object.assign(Object.assign({},Rt),ft==null?void 0:ft.classNames),{input:Ne()({[`${Xt}-sm`]:yn==="small",[`${Xt}-lg`]:yn==="large",[`${Xt}-rtl`]:tt==="rtl",[`${Xt}-borderless`]:!Ve},!Ie&&(0,Me.Z)(Xt,oe),Rt==null?void 0:Rt.input,(xe=ft==null?void 0:ft.classNames)===null||xe===void 0?void 0:xe.input,Ut)}),classes:{affixWrapper:Ne()({[`${Xt}-affix-wrapper-sm`]:yn==="small",[`${Xt}-affix-wrapper-lg`]:yn==="large",[`${Xt}-affix-wrapper-rtl`]:tt==="rtl",[`${Xt}-affix-wrapper-borderless`]:!Ve},(0,Me.Z)(`${Xt}-affix-wrapper`,oe,pe),Ut),wrapper:Ne()({[`${Xt}-group-rtl`]:tt==="rtl"},Ut),group:Ne()({[`${Xt}-group-wrapper-sm`]:yn==="small",[`${Xt}-group-wrapper-lg`]:yn==="large",[`${Xt}-group-wrapper-rtl`]:tt==="rtl",[`${Xt}-group-wrapper-disabled`]:ce},(0,Me.Z)(`${Xt}-group-wrapper`,oe,pe),Ut)}})))})},96330:function(bn,Zt,le){"use strict";var se=le(16646),Be=le(94184),Ne=le.n(Be),Ye=le(64701),ve=le(67294),Se=le(9708),Me=le(53124),we=le(98866),me=le(98675),Te=le(65223),ot=le(82586),Oe=le(47673),st=function(Je,Ge){var Ce={};for(var pt in Je)Object.prototype.hasOwnProperty.call(Je,pt)&&Ge.indexOf(pt)<0&&(Ce[pt]=Je[pt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,pt=Object.getOwnPropertySymbols(Je);zt<pt.length;zt++)Ge.indexOf(pt[zt])<0&&Object.prototype.propertyIsEnumerable.call(Je,pt[zt])&&(Ce[pt[zt]]=Je[pt[zt]]);return Ce};const lt=(0,ve.forwardRef)((Je,Ge)=>{const{prefixCls:Ce,bordered:pt=!0,size:zt,disabled:qe,status:ut,allowClear:xe,showCount:Ee,classNames:Ve,rootClassName:Xe,className:Mt}=Je,mt=st(Je,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:St,direction:Ke}=ve.useContext(Me.E_),Pt=(0,me.Z)(zt),Et=ve.useContext(we.Z),Yt=qe!=null?qe:Et,{status:at,hasFeedback:Vt,feedbackIcon:fn}=ve.useContext(Te.aM),dn=(0,Se.F)(at,ut),Ue=ve.useRef(null);ve.useImperativeHandle(Ge,()=>{var tt;return{resizableTextArea:(tt=Ue.current)===null||tt===void 0?void 0:tt.resizableTextArea,focus:ft=>{var Xt,Tn;(0,ot.n)((Tn=(Xt=Ue.current)===null||Xt===void 0?void 0:Xt.resizableTextArea)===null||Tn===void 0?void 0:Tn.textArea,ft)},blur:()=>{var ft;return(ft=Ue.current)===null||ft===void 0?void 0:ft.blur()}}});const Le=St("input",Ce);let Rt;typeof xe=="object"&&(xe!=null&&xe.clearIcon)?Rt=xe:xe&&(Rt={clearIcon:ve.createElement(se.Z,null)});const[Sn,un]=(0,Oe.ZP)(Le);return Sn(ve.createElement(Ye.default,Object.assign({},mt,{disabled:Yt,allowClear:Rt,className:Ne()(Mt,Xe),classes:{affixWrapper:Ne()(`${Le}-textarea-affix-wrapper`,{[`${Le}-affix-wrapper-rtl`]:Ke==="rtl",[`${Le}-affix-wrapper-borderless`]:!pt,[`${Le}-affix-wrapper-sm`]:Pt==="small",[`${Le}-affix-wrapper-lg`]:Pt==="large",[`${Le}-textarea-show-count`]:Ee},(0,Se.Z)(`${Le}-affix-wrapper`,dn),un)},classNames:Object.assign(Object.assign({},Ve),{textarea:Ne()({[`${Le}-borderless`]:!pt,[`${Le}-sm`]:Pt==="small",[`${Le}-lg`]:Pt==="large"},(0,Se.Z)(Le,dn),un,Ve==null?void 0:Ve.textarea)}),prefixCls:Le,suffix:Vt&&ve.createElement("span",{className:`${Le}-textarea-suffix`},fn),showCount:Ee,ref:Ue})))});Zt.Z=lt},72922:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Be}});var se=le(67294);function Be(Ne,Ye){const ve=(0,se.useRef)([]),Se=()=>{ve.current.push(setTimeout(()=>{var Me,we,me,Te;!((Me=Ne.current)===null||Me===void 0)&&Me.input&&((we=Ne.current)===null||we===void 0?void 0:we.input.getAttribute("type"))==="password"&&(!((me=Ne.current)===null||me===void 0)&&me.input.hasAttribute("value"))&&((Te=Ne.current)===null||Te===void 0||Te.input.removeAttribute("value"))}))};return(0,se.useEffect)(()=>(Ye&&Se(),()=>ve.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),Se}},69677:function(bn,Zt,le){"use strict";le.d(Zt,{default:function(){return Pt}});var se=le(94184),Be=le.n(se),Ne=le(67294),Ye=le(53124),ve=le(65223),Se=le(47673),we=Et=>{const{getPrefixCls:Yt,direction:at}=(0,Ne.useContext)(Ye.E_),{prefixCls:Vt,className:fn}=Et,dn=Yt("input-group",Vt),Ue=Yt("input"),[Le,Rt]=(0,Se.ZP)(Ue),Sn=Be()(dn,{[`${dn}-lg`]:Et.size==="large",[`${dn}-sm`]:Et.size==="small",[`${dn}-compact`]:Et.compact,[`${dn}-rtl`]:at==="rtl"},Rt,fn),un=(0,Ne.useContext)(ve.aM),tt=(0,Ne.useMemo)(()=>Object.assign(Object.assign({},un),{isFormItemInput:!1}),[un]);return Le(Ne.createElement("span",{className:Sn,style:Et.style,onMouseEnter:Et.onMouseEnter,onMouseLeave:Et.onMouseLeave,onFocus:Et.onFocus,onBlur:Et.onBlur},Ne.createElement(ve.aM.Provider,{value:tt},Et.children)))},me=le(82586),Te=le(63237),ot=le(99569),Oe=le(10366),st=le(17799),lt=le(72922),Je=function(Et,Yt){var at={};for(var Vt in Et)Object.prototype.hasOwnProperty.call(Et,Vt)&&Yt.indexOf(Vt)<0&&(at[Vt]=Et[Vt]);if(Et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fn=0,Vt=Object.getOwnPropertySymbols(Et);fn<Vt.length;fn++)Yt.indexOf(Vt[fn])<0&&Object.prototype.propertyIsEnumerable.call(Et,Vt[fn])&&(at[Vt[fn]]=Et[Vt[fn]]);return at};const Ge=Et=>Et?Ne.createElement(ot.Z,null):Ne.createElement(Te.Z,null),Ce={click:"onClick",hover:"onMouseOver"};var zt=Ne.forwardRef((Et,Yt)=>{const{visibilityToggle:at=!0}=Et,Vt=typeof at=="object"&&at.visible!==void 0,[fn,dn]=(0,Ne.useState)(()=>Vt?at.visible:!1),Ue=(0,Ne.useRef)(null);Ne.useEffect(()=>{Vt&&dn(at.visible)},[Vt,at]);const Le=(0,lt.Z)(Ue),Rt=()=>{const{disabled:ce}=Et;ce||(fn&&Le(),dn(ue=>{var pe;const he=!ue;return typeof at=="object"&&((pe=at.onVisibleChange)===null||pe===void 0||pe.call(at,he)),he}))},Sn=ce=>{const{action:ue="click",iconRender:pe=Ge}=Et,he=Ce[ue]||"",oe=pe(fn),Ie={[he]:Rt,className:`${ce}-icon`,key:"passwordIcon",onMouseDown:Qe=>{Qe.preventDefault()},onMouseUp:Qe=>{Qe.preventDefault()}};return Ne.cloneElement(Ne.isValidElement(oe)?oe:Ne.createElement("span",null,oe),Ie)},{className:un,prefixCls:tt,inputPrefixCls:ft,size:Xt}=Et,Tn=Je(Et,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:mn}=Ne.useContext(Ye.E_),Ut=mn("input",ft),jt=mn("input-password",tt),_n=at&&Sn(jt),yn=Be()(jt,un,{[`${jt}-${Xt}`]:!!Xt}),Ae=Object.assign(Object.assign({},(0,Oe.Z)(Tn,["suffix","iconRender","visibilityToggle"])),{type:fn?"text":"password",className:yn,prefixCls:Ut,suffix:_n});return Xt&&(Ae.size=Xt),Ne.createElement(me.Z,Object.assign({ref:(0,st.sQ)(Yt,Ue)},Ae))}),qe=le(72395),ut=le(96159),xe=le(71577),Ee=le(98675),Ve=le(4173),Xe=function(Et,Yt){var at={};for(var Vt in Et)Object.prototype.hasOwnProperty.call(Et,Vt)&&Yt.indexOf(Vt)<0&&(at[Vt]=Et[Vt]);if(Et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fn=0,Vt=Object.getOwnPropertySymbols(Et);fn<Vt.length;fn++)Yt.indexOf(Vt[fn])<0&&Object.prototype.propertyIsEnumerable.call(Et,Vt[fn])&&(at[Vt[fn]]=Et[Vt[fn]]);return at},mt=Ne.forwardRef((Et,Yt)=>{const{prefixCls:at,inputPrefixCls:Vt,className:fn,size:dn,suffix:Ue,enterButton:Le=!1,addonAfter:Rt,loading:Sn,disabled:un,onSearch:tt,onChange:ft,onCompositionStart:Xt,onCompositionEnd:Tn}=Et,mn=Xe(Et,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Ut,direction:jt}=Ne.useContext(Ye.E_),_n=Ne.useRef(!1),yn=Ut("input-search",at),Ae=Ut("input",Vt),{compactSize:ce}=(0,Ve.ri)(yn,jt),ue=(0,Ee.Z)(Ot=>{var yt;return(yt=dn!=null?dn:ce)!==null&&yt!==void 0?yt:Ot}),pe=Ne.useRef(null),he=Ot=>{Ot&&Ot.target&&Ot.type==="click"&&tt&&tt(Ot.target.value,Ot,{source:"clear"}),ft&&ft(Ot)},oe=Ot=>{var yt;document.activeElement===((yt=pe.current)===null||yt===void 0?void 0:yt.input)&&Ot.preventDefault()},Ie=Ot=>{var yt,Dn;tt&&tt((Dn=(yt=pe.current)===null||yt===void 0?void 0:yt.input)===null||Dn===void 0?void 0:Dn.value,Ot,{source:"input"})},Qe=Ot=>{_n.current||Sn||Ie(Ot)},Lt=typeof Le=="boolean"?Ne.createElement(qe.Z,null):null,$t=`${yn}-button`;let Kt;const en=Le||{},Jt=en.type&&en.type.__ANT_BUTTON===!0;Jt||en.type==="button"?Kt=(0,ut.Tm)(en,Object.assign({onMouseDown:oe,onClick:Ot=>{var yt,Dn;(Dn=(yt=en==null?void 0:en.props)===null||yt===void 0?void 0:yt.onClick)===null||Dn===void 0||Dn.call(yt,Ot),Ie(Ot)},key:"enterButton"},Jt?{className:$t,size:ue}:{})):Kt=Ne.createElement(xe.ZP,{className:$t,type:Le?"primary":void 0,size:ue,disabled:un,key:"enterButton",onMouseDown:oe,onClick:Ie,loading:Sn,icon:Lt},Le),Rt&&(Kt=[Kt,(0,ut.Tm)(Rt,{key:"addonAfter"})]);const et=Be()(yn,{[`${yn}-rtl`]:jt==="rtl",[`${yn}-${ue}`]:!!ue,[`${yn}-with-button`]:!!Le},fn),wt=Ot=>{_n.current=!0,Xt==null||Xt(Ot)},Tt=Ot=>{_n.current=!1,Tn==null||Tn(Ot)};return Ne.createElement(me.Z,Object.assign({ref:(0,st.sQ)(pe,Yt),onPressEnter:Qe},mn,{size:ue,onCompositionStart:wt,onCompositionEnd:Tt,prefixCls:Ae,addonAfter:Kt,suffix:Ue,onChange:he,className:et,disabled:un}))}),St=le(96330);const Ke=me.Z;Ke.Group=we,Ke.Search=mt,Ke.TextArea=St.Z,Ke.Password=zt;var Pt=Ke},47673:function(bn,Zt,le){"use strict";le.d(Zt,{M1:function(){return Me},TM:function(){return ut},Xy:function(){return we},bi:function(){return ot},e5:function(){return qe},ik:function(){return Oe},nz:function(){return ve},pU:function(){return Se},s7:function(){return st},x0:function(){return Te}});var se=le(14747),Be=le(80110),Ne=le(45503),Ye=le(67968);const ve=xe=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:xe,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Se=xe=>({borderColor:xe.hoverBorderColor}),Me=xe=>({borderColor:xe.activeBorderColor,boxShadow:xe.activeShadow,outline:0}),we=xe=>({color:xe.colorTextDisabled,backgroundColor:xe.colorBgContainerDisabled,borderColor:xe.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Se((0,Ne.TS)(xe,{hoverBorderColor:xe.colorBorder})))}),me=xe=>{const{paddingBlockLG:Ee,fontSizeLG:Ve,lineHeightLG:Xe,borderRadiusLG:Mt,paddingInlineLG:mt}=xe;return{padding:`${Ee}px ${mt}px`,fontSize:Ve,lineHeight:Xe,borderRadius:Mt}},Te=xe=>({padding:`${xe.paddingBlockSM}px ${xe.paddingInlineSM}px`,borderRadius:xe.borderRadiusSM}),ot=(xe,Ee)=>{const{componentCls:Ve,colorError:Xe,colorWarning:Mt,errorActiveShadow:mt,warningActiveShadow:St,colorErrorBorderHover:Ke,colorWarningBorderHover:Pt}=xe;return{[`&-status-error:not(${Ee}-disabled):not(${Ee}-borderless)${Ee}`]:{borderColor:Xe,"&:hover":{borderColor:Ke},"&:focus, &-focused":Object.assign({},Me((0,Ne.TS)(xe,{activeBorderColor:Xe,activeShadow:mt}))),[`${Ve}-prefix, ${Ve}-suffix`]:{color:Xe}},[`&-status-warning:not(${Ee}-disabled):not(${Ee}-borderless)${Ee}`]:{borderColor:Mt,"&:hover":{borderColor:Pt},"&:focus, &-focused":Object.assign({},Me((0,Ne.TS)(xe,{activeBorderColor:Mt,activeShadow:St}))),[`${Ve}-prefix, ${Ve}-suffix`]:{color:Mt}}}},Oe=xe=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${xe.paddingBlock}px ${xe.paddingInline}px`,color:xe.colorText,fontSize:xe.fontSize,lineHeight:xe.lineHeight,backgroundColor:xe.colorBgContainer,backgroundImage:"none",borderWidth:xe.lineWidth,borderStyle:xe.lineType,borderColor:xe.colorBorder,borderRadius:xe.borderRadius,transition:`all ${xe.motionDurationMid}`},ve(xe.colorTextPlaceholder)),{"&:hover":Object.assign({},Se(xe)),"&:focus, &-focused":Object.assign({},Me(xe)),"&-disabled, &[disabled]":Object.assign({},we(xe)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:xe.controlHeight,lineHeight:xe.lineHeight,verticalAlign:"bottom",transition:`all ${xe.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},me(xe)),"&-sm":Object.assign({},Te(xe)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),st=xe=>{const{componentCls:Ee,antCls:Ve}=xe;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:xe.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Ee}, &-lg > ${Ee}-group-addon`]:Object.assign({},me(xe)),[`&-sm ${Ee}, &-sm > ${Ee}-group-addon`]:Object.assign({},Te(xe)),[`&-lg ${Ve}-select-single ${Ve}-select-selector`]:{height:xe.controlHeightLG},[`&-sm ${Ve}-select-single ${Ve}-select-selector`]:{height:xe.controlHeightSM},[`> ${Ee}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Ee}-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 ${xe.paddingInline}px`,color:xe.colorText,fontWeight:"normal",fontSize:xe.fontSize,textAlign:"center",backgroundColor:xe.colorFillAlter,border:`${xe.lineWidth}px ${xe.lineType} ${xe.colorBorder}`,borderRadius:xe.borderRadius,transition:`all ${xe.motionDurationSlow}`,lineHeight:1,[`${Ve}-select`]:{margin:`-${xe.paddingBlock+1}px -${xe.paddingInline}px`,[`&${Ve}-select-single:not(${Ve}-select-customize-input)`]:{[`${Ve}-select-selector`]:{backgroundColor:"inherit",border:`${xe.lineWidth}px ${xe.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Ve}-select-selector`]:{color:xe.colorPrimary}}},[`${Ve}-cascader-picker`]:{margin:`-9px -${xe.paddingInline}px`,backgroundColor:"transparent",[`${Ve}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${Ee}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Ee}-search-with-button &`]:{zIndex:0}}},[`> ${Ee}:first-child, ${Ee}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ve}-select ${Ve}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Ee}-affix-wrapper`]:{[`&:not(:first-child) ${Ee}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Ee}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Ee}:last-child, ${Ee}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Ve}-select ${Ve}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Ee}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ee}-search &`]:{borderStartStartRadius:xe.borderRadius,borderEndStartRadius:xe.borderRadius}},[`&:not(:first-child), ${Ee}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Ee}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,se.dF)()),{[`${Ee}-group-addon, ${Ee}-group-wrap, > ${Ee}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:xe.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${Ee}-affix-wrapper,
|
|
|
& > ${Ee}-number-affix-wrapper,
|
|
|
& > ${Ve}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-xe.lineWidth,borderInlineEndWidth:xe.lineWidth},[`${Ee}`]:{float:"none"},[`& > ${Ve}-select > ${Ve}-select-selector,
|
|
|
& > ${Ve}-select-auto-complete ${Ee},
|
|
|
& > ${Ve}-cascader-picker ${Ee},
|
|
|
& > ${Ee}-group-wrapper ${Ee}`]:{borderInlineEndWidth:xe.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Ve}-select-focused`]:{zIndex:1},[`& > ${Ve}-select > ${Ve}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Ve}-select:first-child > ${Ve}-select-selector,
|
|
|
& > ${Ve}-select-auto-complete:first-child ${Ee},
|
|
|
& > ${Ve}-cascader-picker:first-child ${Ee}`]:{borderStartStartRadius:xe.borderRadius,borderEndStartRadius:xe.borderRadius},[`& > *:last-child,
|
|
|
& > ${Ve}-select:last-child > ${Ve}-select-selector,
|
|
|
& > ${Ve}-cascader-picker:last-child ${Ee},
|
|
|
& > ${Ve}-cascader-picker-focused:last-child ${Ee}`]:{borderInlineEndWidth:xe.lineWidth,borderStartEndRadius:xe.borderRadius,borderEndEndRadius:xe.borderRadius},[`& > ${Ve}-select-auto-complete ${Ee}`]:{verticalAlign:"top"},[`${Ee}-group-wrapper + ${Ee}-group-wrapper`]:{marginInlineStart:-xe.lineWidth,[`${Ee}-affix-wrapper`]:{borderRadius:0}},[`${Ee}-group-wrapper:not(:last-child)`]:{[`&${Ee}-search > ${Ee}-group`]:{[`& > ${Ee}-group-addon > ${Ee}-search-button`]:{borderRadius:0},[`& > ${Ee}`]:{borderStartStartRadius:xe.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:xe.borderRadius}}}})}},lt=xe=>{const{componentCls:Ee,controlHeightSM:Ve,lineWidth:Xe}=xe,mt=(Ve-Xe*2-16)/2;return{[Ee]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(xe)),Oe(xe)),ot(xe,Ee)),{'&[type="color"]':{height:xe.controlHeight,[`&${Ee}-lg`]:{height:xe.controlHeightLG},[`&${Ee}-sm`]:{height:Ve,paddingTop:mt,paddingBottom:mt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Je=xe=>{const{componentCls:Ee}=xe;return{[`${Ee}-clear-icon`]:{margin:0,color:xe.colorTextQuaternary,fontSize:xe.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${xe.motionDurationSlow}`,"&:hover":{color:xe.colorTextTertiary},"&:active":{color:xe.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${xe.inputAffixPadding}px`}}}},Ge=xe=>{const{componentCls:Ee,inputAffixPadding:Ve,colorTextDescription:Xe,motionDurationSlow:Mt,colorIcon:mt,colorIconHover:St,iconCls:Ke}=xe;return{[`${Ee}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Oe(xe)),{display:"inline-flex",[`&:not(${Ee}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Se(xe)),{zIndex:1,[`${Ee}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${Ee}[disabled]`]:{background:"transparent"}},[`> input${Ee}`]:{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"'},[`${Ee}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:xe.paddingXS}},"&-show-count-suffix":{color:Xe},"&-show-count-has-suffix":{marginInlineEnd:xe.paddingXXS},"&-prefix":{marginInlineEnd:Ve},"&-suffix":{marginInlineStart:Ve}}}),Je(xe)),{[`${Ke}${Ee}-password-icon`]:{color:mt,cursor:"pointer",transition:`all ${Mt}`,"&:hover":{color:St}}}),ot(xe,`${Ee}-affix-wrapper`))}},Ce=xe=>{const{componentCls:Ee,colorError:Ve,colorWarning:Xe,borderRadiusLG:Mt,borderRadiusSM:mt}=xe;return{[`${Ee}-group`]:Object.assign(Object.assign(Object.assign({},(0,se.Wf)(xe)),st(xe)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Ee}-group-addon`]:{borderRadius:Mt,fontSize:xe.fontSizeLG}},"&-sm":{[`${Ee}-group-addon`]:{borderRadius:mt}},"&-status-error":{[`${Ee}-group-addon`]:{color:Ve,borderColor:Ve}},"&-status-warning":{[`${Ee}-group-addon`]:{color:Xe,borderColor:Xe}},"&-disabled":{[`${Ee}-group-addon`]:Object.assign({},we(xe))},[`&:not(${Ee}-compact-first-item):not(${Ee}-compact-last-item)${Ee}-compact-item`]:{[`${Ee}, ${Ee}-group-addon`]:{borderRadius:0}},[`&:not(${Ee}-compact-last-item)${Ee}-compact-first-item`]:{[`${Ee}, ${Ee}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Ee}-compact-first-item)${Ee}-compact-last-item`]:{[`${Ee}, ${Ee}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},pt=xe=>{const{componentCls:Ee,antCls:Ve}=xe,Xe=`${Ee}-search`;return{[Xe]:{[`${Ee}`]:{"&:hover, &:focus":{borderColor:xe.colorPrimaryHover,[`+ ${Ee}-group-addon ${Xe}-button:not(${Ve}-btn-primary)`]:{borderInlineStartColor:xe.colorPrimaryHover}}},[`${Ee}-affix-wrapper`]:{borderRadius:0},[`${Ee}-lg`]:{lineHeight:xe.lineHeightLG-2e-4},[`> ${Ee}-group`]:{[`> ${Ee}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Xe}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:xe.borderRadius,borderEndEndRadius:xe.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Xe}-button:not(${Ve}-btn-primary)`]:{color:xe.colorTextDescription,"&:hover":{color:xe.colorPrimaryHover},"&:active":{color:xe.colorPrimaryActive},[`&${Ve}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Xe}-button`]:{height:xe.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Xe}-button`]:{height:xe.controlHeightLG},[`&-small ${Xe}-button`]:{height:xe.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Ee}-compact-item`]:{[`&:not(${Ee}-compact-last-item)`]:{[`${Ee}-group-addon`]:{[`${Ee}-search-button`]:{marginInlineEnd:-xe.lineWidth,borderRadius:0}}},[`&:not(${Ee}-compact-first-item)`]:{[`${Ee},${Ee}-affix-wrapper`]:{borderRadius:0}},[`> ${Ee}-group-addon ${Ee}-search-button,
|
|
|
> ${Ee},
|
|
|
${Ee}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Ee}-affix-wrapper-focused`]:{zIndex:2}}}}},zt=xe=>{const{componentCls:Ee,paddingLG:Ve}=xe,Xe=`${Ee}-textarea`;return{[Xe]:{position:"relative","&-show-count":{[`> ${Ee}`]:{height:"100%"},[`${Ee}-data-count`]:{position:"absolute",bottom:-xe.fontSize*xe.lineHeight,insetInlineEnd:0,color:xe.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Ee}`]:{paddingInlineEnd:Ve}},[`&-affix-wrapper${Xe}-has-feedback`]:{[`${Ee}`]:{paddingInlineEnd:Ve}},[`&-affix-wrapper${Ee}-affix-wrapper`]:{padding:0,[`> textarea${Ee}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${Ee}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Ee}-clear-icon`]:{position:"absolute",insetInlineEnd:xe.paddingXS,insetBlockStart:xe.paddingXS},[`${Xe}-suffix`]:{position:"absolute",top:0,insetInlineEnd:xe.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function qe(xe){return(0,Ne.TS)(xe,{inputAffixPadding:xe.paddingXXS})}const ut=xe=>{const{controlHeight:Ee,fontSize:Ve,lineHeight:Xe,lineWidth:Mt,controlHeightSM:mt,controlHeightLG:St,fontSizeLG:Ke,lineHeightLG:Pt,paddingSM:Et,controlPaddingHorizontalSM:Yt,controlPaddingHorizontal:at,colorFillAlter:Vt,colorPrimaryHover:fn,controlOutlineWidth:dn,controlOutline:Ue,colorErrorOutline:Le,colorWarningOutline:Rt}=xe;return{paddingBlock:Math.max(Math.round((Ee-Ve*Xe)/2*10)/10-Mt,3),paddingBlockSM:Math.max(Math.round((mt-Ve*Xe)/2*10)/10-Mt,0),paddingBlockLG:Math.ceil((St-Ke*Pt)/2*10)/10-Mt,paddingInline:Et-Mt,paddingInlineSM:Yt-Mt,paddingInlineLG:at-Mt,addonBg:Vt,activeBorderColor:fn,hoverBorderColor:fn,activeShadow:`0 0 0 ${dn}px ${Ue}`,errorActiveShadow:`0 0 0 ${dn}px ${Le}`,warningActiveShadow:`0 0 0 ${dn}px ${Rt}`}};Zt.ZP=(0,Ye.Z)("Input",xe=>{const Ee=(0,Ne.TS)(xe,qe(xe));return[lt(Ee),zt(Ee),Ge(Ee),Ce(Ee),pt(Ee),(0,Be.c)(Ee)]},ut)},71322:function(bn,Zt,le){"use strict";le.d(Zt,{D:function(){return zt},Z:function(){return xe}});var se=le(87462),Be=le(67294),Ne={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"},Ye=Ne,ve=le(84089),Se=function(Ve,Xe){return Be.createElement(ve.Z,(0,se.Z)({},Ve,{ref:Xe,icon:Ye}))},Me=Be.forwardRef(Se),we=le(22751),me=le(91034),Te=le(94184),ot=le.n(Te),Oe=le(10366),lt=Ee=>!isNaN(parseFloat(Ee))&&isFinite(Ee),Je=le(53124),Ge=le(84321),Ce=function(Ee,Ve){var Xe={};for(var Mt in Ee)Object.prototype.hasOwnProperty.call(Ee,Mt)&&Ve.indexOf(Mt)<0&&(Xe[Mt]=Ee[Mt]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,Mt=Object.getOwnPropertySymbols(Ee);mt<Mt.length;mt++)Ve.indexOf(Mt[mt])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Mt[mt])&&(Xe[Mt[mt]]=Ee[Mt[mt]]);return Xe};const pt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},zt=Be.createContext({}),qe=(()=>{let Ee=0;return function(){let Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ee+=1,`${Ve}${Ee}`}})();var xe=Be.forwardRef((Ee,Ve)=>{const{prefixCls:Xe,className:Mt,trigger:mt,children:St,defaultCollapsed:Ke=!1,theme:Pt="dark",style:Et={},collapsible:Yt=!1,reverseArrow:at=!1,width:Vt=200,collapsedWidth:fn=80,zeroWidthTriggerStyle:dn,breakpoint:Ue,onCollapse:Le,onBreakpoint:Rt}=Ee,Sn=Ce(Ee,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:un}=(0,Be.useContext)(Ge.Gs),[tt,ft]=(0,Be.useState)("collapsed"in Ee?Ee.collapsed:Ke),[Xt,Tn]=(0,Be.useState)(!1);(0,Be.useEffect)(()=>{"collapsed"in Ee&&ft(Ee.collapsed)},[Ee.collapsed]);const mn=(ce,ue)=>{"collapsed"in Ee||ft(ce),Le==null||Le(ce,ue)},Ut=(0,Be.useRef)();Ut.current=ce=>{Tn(ce.matches),Rt==null||Rt(ce.matches),tt!==ce.matches&&mn(ce.matches,"responsive")},(0,Be.useEffect)(()=>{function ce(pe){return Ut.current(pe)}let ue;if(typeof window!="undefined"){const{matchMedia:pe}=window;if(pe&&Ue&&Ue in pt){ue=pe(`(max-width: ${pt[Ue]})`);try{ue.addEventListener("change",ce)}catch(he){ue.addListener(ce)}ce(ue)}}return()=>{try{ue==null||ue.removeEventListener("change",ce)}catch(pe){ue==null||ue.removeListener(ce)}}},[Ue]),(0,Be.useEffect)(()=>{const ce=qe("ant-sider-");return un.addSider(ce),()=>un.removeSider(ce)},[]);const jt=()=>{mn(!tt,"clickTrigger")},{getPrefixCls:_n}=(0,Be.useContext)(Je.E_),yn=()=>{const ce=_n("layout-sider",Xe),ue=(0,Oe.Z)(Sn,["collapsed"]),pe=tt?fn:Vt,he=lt(pe)?`${pe}px`:String(pe),oe=parseFloat(String(fn||0))===0?Be.createElement("span",{onClick:jt,className:ot()(`${ce}-zero-width-trigger`,`${ce}-zero-width-trigger-${at?"right":"left"}`),style:dn},mt||Be.createElement(Me,null)):null,Lt={expanded:at?Be.createElement(me.Z,null):Be.createElement(we.Z,null),collapsed:at?Be.createElement(we.Z,null):Be.createElement(me.Z,null)}[tt?"collapsed":"expanded"],$t=mt!==null?oe||Be.createElement("div",{className:`${ce}-trigger`,onClick:jt,style:{width:he}},mt||Lt):null,Kt=Object.assign(Object.assign({},Et),{flex:`0 0 ${he}`,maxWidth:he,minWidth:he,width:he}),en=ot()(ce,`${ce}-${Pt}`,{[`${ce}-collapsed`]:!!tt,[`${ce}-has-trigger`]:Yt&&mt!==null&&!oe,[`${ce}-below`]:!!Xt,[`${ce}-zero-width`]:parseFloat(he)===0},Mt);return Be.createElement("aside",Object.assign({className:en},ue,{style:Kt,ref:Ve}),Be.createElement("div",{className:`${ce}-children`},St),Yt||Xt&&oe?$t:null)},Ae=Be.useMemo(()=>({siderCollapsed:tt}),[tt]);return Be.createElement(zt.Provider,{value:Ae},yn())})},97183:function(bn,Zt,le){"use strict";var se=le(84321),Be=le(71322);const Ne=se.ZP;Ne.Header=se.h4,Ne.Footer=se.$_,Ne.Content=se.VY,Ne.Sider=Be.Z,Zt.default=Ne},84321:function(bn,Zt,le){"use strict";le.d(Zt,{VY:function(){return qe},$_:function(){return zt},h4:function(){return pt},Gs:function(){return st},ZP:function(){return ut}});var se=le(74902),Be=le(94184),Ne=le.n(Be),Ye=le(10366),ve=le(67294),Se=le(53124),Me=le(67968),me=xe=>{const{componentCls:Ee,bodyBg:Ve,lightSiderBg:Xe,lightTriggerBg:Mt,lightTriggerColor:mt}=xe;return{[`${Ee}-sider-light`]:{background:Xe,[`${Ee}-sider-trigger`]:{color:mt,background:Mt},[`${Ee}-sider-zero-width-trigger`]:{color:mt,background:Mt,border:`1px solid ${Ve}`,borderInlineStart:0}}}};const Te=xe=>{const{antCls:Ee,componentCls:Ve,colorText:Xe,triggerColor:Mt,footerBg:mt,triggerBg:St,headerHeight:Ke,headerPadding:Pt,headerColor:Et,footerPadding:Yt,triggerHeight:at,zeroTriggerHeight:Vt,zeroTriggerWidth:fn,motionDurationMid:dn,motionDurationSlow:Ue,fontSize:Le,borderRadius:Rt,bodyBg:Sn,headerBg:un,siderBg:tt}=xe;return{[Ve]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Sn,"&, *":{boxSizing:"border-box"},[`&${Ve}-has-sider`]:{flexDirection:"row",[`> ${Ve}, > ${Ve}-content`]:{width:0}},[`${Ve}-header, &${Ve}-footer`]:{flex:"0 0 auto"},[`${Ve}-sider`]:{position:"relative",minWidth:0,background:tt,transition:`all ${dn}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Ee}-menu${Ee}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:at},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:at,color:Mt,lineHeight:`${at}px`,textAlign:"center",background:St,cursor:"pointer",transition:`all ${dn}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ke,insetInlineEnd:-fn,zIndex:1,width:fn,height:Vt,color:Mt,fontSize:xe.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:tt,borderStartStartRadius:0,borderStartEndRadius:Rt,borderEndEndRadius:Rt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Ue} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Ue}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-fn,borderStartStartRadius:Rt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Rt}}}}},me(xe)),{"&-rtl":{direction:"rtl"}}),[`${Ve}-header`]:{height:Ke,padding:Pt,color:Et,lineHeight:`${Ke}px`,background:un,[`${Ee}-menu`]:{lineHeight:"inherit"}},[`${Ve}-footer`]:{padding:Yt,color:Xe,fontSize:Le,background:mt},[`${Ve}-content`]:{flex:"auto",minHeight:0}}};var ot=(0,Me.Z)("Layout",xe=>[Te(xe)],xe=>{const{colorBgLayout:Ee,controlHeight:Ve,controlHeightLG:Xe,colorText:Mt,controlHeightSM:mt,marginXXS:St,colorTextLightSolid:Ke,colorBgContainer:Pt}=xe,Et=Xe*1.25;return{colorBgHeader:"#001529",colorBgBody:Ee,colorBgTrigger:"#002140",bodyBg:Ee,headerBg:"#001529",headerHeight:Ve*2,headerPadding:`0 ${Et}px`,headerColor:Mt,footerPadding:`${mt}px ${Et}px`,footerBg:Ee,siderBg:"#001529",triggerHeight:Xe+St*2,triggerBg:"#002140",triggerColor:Ke,zeroTriggerWidth:Xe,zeroTriggerHeight:Xe,lightSiderBg:Pt,lightTriggerBg:Pt,lightTriggerColor:Mt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Oe=function(xe,Ee){var Ve={};for(var Xe in xe)Object.prototype.hasOwnProperty.call(xe,Xe)&&Ee.indexOf(Xe)<0&&(Ve[Xe]=xe[Xe]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mt=0,Xe=Object.getOwnPropertySymbols(xe);Mt<Xe.length;Mt++)Ee.indexOf(Xe[Mt])<0&&Object.prototype.propertyIsEnumerable.call(xe,Xe[Mt])&&(Ve[Xe[Mt]]=xe[Xe[Mt]]);return Ve};const st=ve.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function lt(xe){let{suffixCls:Ee,tagName:Ve,displayName:Xe}=xe;return Mt=>ve.forwardRef((St,Ke)=>ve.createElement(Mt,Object.assign({ref:Ke,suffixCls:Ee,tagName:Ve},St)))}const Je=ve.forwardRef((xe,Ee)=>{const{prefixCls:Ve,suffixCls:Xe,className:Mt,tagName:mt}=xe,St=Oe(xe,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ke}=ve.useContext(Se.E_),Pt=Ke("layout",Ve),[Et,Yt]=ot(Pt),at=Xe?`${Pt}-${Xe}`:Pt;return Et(ve.createElement(mt,Object.assign({className:Ne()(Ve||at,Mt,Yt),ref:Ee},St)))}),Ge=ve.forwardRef((xe,Ee)=>{const{direction:Ve}=ve.useContext(Se.E_),[Xe,Mt]=ve.useState([]),{prefixCls:mt,className:St,rootClassName:Ke,children:Pt,hasSider:Et,tagName:Yt,style:at}=xe,Vt=Oe(xe,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),fn=(0,Ye.Z)(Vt,["suffixCls"]),{getPrefixCls:dn,layout:Ue}=ve.useContext(Se.E_),Le=dn("layout",mt),[Rt,Sn]=ot(Le),un=Ne()(Le,{[`${Le}-has-sider`]:typeof Et=="boolean"?Et:Xe.length>0,[`${Le}-rtl`]:Ve==="rtl"},Ue==null?void 0:Ue.className,St,Ke,Sn),tt=ve.useMemo(()=>({siderHook:{addSider:ft=>{Mt(Xt=>[].concat((0,se.Z)(Xt),[ft]))},removeSider:ft=>{Mt(Xt=>Xt.filter(Tn=>Tn!==ft))}}}),[]);return Rt(ve.createElement(st.Provider,{value:tt},ve.createElement(Yt,Object.assign({ref:Ee,className:un,style:Object.assign(Object.assign({},Ue==null?void 0:Ue.style),at)},fn),Pt)))}),Ce=lt({tagName:"div",displayName:"Layout"})(Ge),pt=lt({suffixCls:"header",tagName:"header",displayName:"Header"})(Je),zt=lt({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(Je),qe=lt({suffixCls:"content",tagName:"main",displayName:"Content"})(Je);var ut=Ce},76529:function(bn,Zt,le){"use strict";le.d(Zt,{J:function(){return Se}});var se=le(67294),Be=le(4173),Ne=le(60276),Ye=function(Me,we){var me={};for(var Te in Me)Object.prototype.hasOwnProperty.call(Me,Te)&&we.indexOf(Te)<0&&(me[Te]=Me[Te]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Te=Object.getOwnPropertySymbols(Me);ot<Te.length;ot++)we.indexOf(Te[ot])<0&&Object.prototype.propertyIsEnumerable.call(Me,Te[ot])&&(me[Te[ot]]=Me[Te[ot]]);return me};const ve=se.createContext(null),Se=se.forwardRef((Me,we)=>{const{children:me}=Me,Te=Ye(Me,["children"]),ot=se.useContext(ve),Oe=se.useMemo(()=>Object.assign(Object.assign({},ot),Te),[ot,Te.prefixCls,Te.mode,Te.selectable]);return se.createElement(ve.Provider,{value:Oe},se.createElement(Be.BR,null,(0,Ne.supportNodeRef)(me)?se.cloneElement(me,{ref:we}):me))});Zt.Z=ve},68508:function(bn,Zt,le){"use strict";le.d(Zt,{default:function(){return ce}});var se=le(78595),Be=le(67294),Ne=le(71322),Ye=le(94184),ve=le.n(Ye),Se=le(53124),Me=function(ue,pe){var he={};for(var oe in ue)Object.prototype.hasOwnProperty.call(ue,oe)&&pe.indexOf(oe)<0&&(he[oe]=ue[oe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,oe=Object.getOwnPropertySymbols(ue);Ie<oe.length;Ie++)pe.indexOf(oe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ue,oe[Ie])&&(he[oe[Ie]]=ue[oe[Ie]]);return he},me=ue=>{const{prefixCls:pe,className:he,dashed:oe}=ue,Ie=Me(ue,["prefixCls","className","dashed"]),{getPrefixCls:Qe}=Be.useContext(Se.E_),Lt=Qe("menu",pe),$t=ve()({[`${Lt}-item-divider-dashed`]:!!oe},he);return Be.createElement(se.iz,Object.assign({className:$t},Ie))},Te=le(37419),ot=le(10366),Oe=le(83062),st=le(96159),Je=(0,Be.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Ce=ue=>{var pe;const{className:he,children:oe,icon:Ie,title:Qe,danger:Lt}=ue,{prefixCls:$t,firstLevel:Kt,direction:en,disableMenuItemTitleTooltip:Jt,inlineCollapsed:et}=Be.useContext(Je),wt=$n=>{const Kr=Be.createElement("span",{className:`${$t}-title-content`},oe);return(!Ie||(0,st.l$)(oe)&&oe.type==="span")&&oe&&$n&&Kt&&typeof oe=="string"?Be.createElement("div",{className:`${$t}-inline-collapsed-noicon`},oe.charAt(0)):Kr},{siderCollapsed:Tt}=Be.useContext(Ne.D);let Ot=Qe;typeof Qe=="undefined"?Ot=Kt?oe:"":Qe===!1&&(Ot="");const yt={title:Ot};!Tt&&!et&&(yt.title=null,yt.open=!1);const Dn=(0,Te.Z)(oe).length;let gn=Be.createElement(se.ck,Object.assign({},(0,ot.Z)(ue,["title","icon","danger"]),{className:ve()({[`${$t}-item-danger`]:Lt,[`${$t}-item-only-child`]:(Ie?Dn+1:Dn)===1},he),title:typeof Qe=="string"?Qe:void 0}),(0,st.Tm)(Ie,{className:ve()((0,st.l$)(Ie)?(pe=Ie.props)===null||pe===void 0?void 0:pe.className:"",`${$t}-item-icon`)}),wt(et));return Jt||(gn=Be.createElement(Oe.Z,Object.assign({},yt,{placement:en==="rtl"?"left":"right",overlayClassName:`${$t}-inline-collapsed-tooltip`}),gn)),gn},zt=ue=>{var pe;const{popupClassName:he,icon:oe,title:Ie,theme:Qe}=ue,Lt=Be.useContext(Je),{prefixCls:$t,inlineCollapsed:Kt,theme:en}=Lt,Jt=(0,se.Xl)();let et;if(!oe)et=Kt&&!Jt.length&&Ie&&typeof Ie=="string"?Be.createElement("div",{className:`${$t}-inline-collapsed-noicon`},Ie.charAt(0)):Be.createElement("span",{className:`${$t}-title-content`},Ie);else{const Tt=(0,st.l$)(Ie)&&Ie.type==="span";et=Be.createElement(Be.Fragment,null,(0,st.Tm)(oe,{className:ve()((0,st.l$)(oe)?(pe=oe.props)===null||pe===void 0?void 0:pe.className:"",`${$t}-item-icon`)}),Tt?Ie:Be.createElement("span",{className:`${$t}-title-content`},Ie))}const wt=Be.useMemo(()=>Object.assign(Object.assign({},Lt),{firstLevel:!1}),[Lt]);return Be.createElement(Je.Provider,{value:wt},Be.createElement(se.Wd,Object.assign({},(0,ot.Z)(ue,["icon"]),{title:et,popupClassName:ve()($t,he,`${$t}-${Qe||en}`)})))},qe=le(25877),ut=le(60276),xe=le(33603),Ee=le(76529),Ve=function(ue,pe){var he={};for(var oe in ue)Object.prototype.hasOwnProperty.call(ue,oe)&&pe.indexOf(oe)<0&&(he[oe]=ue[oe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,oe=Object.getOwnPropertySymbols(ue);Ie<oe.length;Ie++)pe.indexOf(oe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ue,oe[Ie])&&(he[oe[Ie]]=ue[oe[Ie]]);return he};function Xe(ue){return(ue||[]).map((pe,he)=>{if(pe&&typeof pe=="object"){const oe=pe,{label:Ie,children:Qe,key:Lt,type:$t}=oe,Kt=Ve(oe,["label","children","key","type"]),en=Lt!=null?Lt:`tmp-${he}`;return Qe||$t==="group"?$t==="group"?Be.createElement(se.BW,Object.assign({key:en},Kt,{title:Ie}),Xe(Qe)):Be.createElement(zt,Object.assign({key:en},Kt,{title:Ie}),Xe(Qe)):$t==="divider"?Be.createElement(me,Object.assign({key:en},Kt)):Be.createElement(Ce,Object.assign({key:en},Kt),Ie)}return null}).filter(pe=>pe)}function Mt(ue){return Be.useMemo(()=>ue&&Xe(ue),[ue])}var mt=le(84780),St=le(14747),Ke=le(33507),Pt=le(67771),Et=le(50438),Yt=le(67968),at=le(45503),fn=ue=>{const{componentCls:pe,motionDurationSlow:he,horizontalLineHeight:oe,colorSplit:Ie,lineWidth:Qe,lineType:Lt,itemPaddingInline:$t}=ue;return{[`${pe}-horizontal`]:{lineHeight:oe,border:0,borderBottom:`${Qe}px ${Lt} ${Ie}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${pe}-item, ${pe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:$t},[`> ${pe}-item:hover,
|
|
|
> ${pe}-item-active,
|
|
|
> ${pe}-submenu ${pe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${pe}-item, ${pe}-submenu-title`]:{transition:[`border-color ${he}`,`background ${he}`].join(",")},[`${pe}-submenu-arrow`]:{display:"none"}}}},Ue=ue=>{let{componentCls:pe,menuArrowOffset:he}=ue;return{[`${pe}-rtl`]:{direction:"rtl"},[`${pe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${pe}-rtl${pe}-vertical,
|
|
|
${pe}-submenu-rtl ${pe}-vertical`]:{[`${pe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${he})`},"&::after":{transform:`rotate(45deg) translateY(${he})`}}}}};const Le=ue=>Object.assign({},(0,St.oN)(ue));var Sn=(ue,pe)=>{const{componentCls:he,itemColor:oe,itemSelectedColor:Ie,groupTitleColor:Qe,itemBg:Lt,subMenuItemBg:$t,itemSelectedBg:Kt,activeBarHeight:en,activeBarWidth:Jt,activeBarBorderWidth:et,motionDurationSlow:wt,motionEaseInOut:Tt,motionEaseOut:Ot,itemPaddingInline:yt,motionDurationMid:Dn,itemHoverColor:gn,lineType:$n,colorSplit:Kr,itemDisabledColor:tr,dangerItemColor:lr,dangerItemHoverColor:ur,dangerItemSelectedColor:ni,dangerItemActiveBg:Xr,dangerItemSelectedBg:Qr,itemHoverBg:gi,itemActiveBg:Sr,menuSubMenuBg:Ei,horizontalItemSelectedColor:Ui,horizontalItemSelectedBg:ea,horizontalItemBorderRadius:ra,horizontalItemHoverBg:Zi,popupBg:At}=ue;return{[`${he}-${pe}, ${he}-${pe} > ${he}`]:{color:oe,background:Lt,[`&${he}-root:focus-visible`]:Object.assign({},Le(ue)),[`${he}-item-group-title`]:{color:Qe},[`${he}-submenu-selected`]:{[`> ${he}-submenu-title`]:{color:Ie}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{color:`${tr} !important`},[`${he}-item:not(${he}-item-selected):not(${he}-submenu-selected)`]:{[`&:hover, > ${he}-submenu-title:hover`]:{color:gn}},[`&:not(${he}-horizontal)`]:{[`${he}-item:not(${he}-item-selected)`]:{"&:hover":{backgroundColor:gi},"&:active":{backgroundColor:Sr}},[`${he}-submenu-title`]:{"&:hover":{backgroundColor:gi},"&:active":{backgroundColor:Sr}}},[`${he}-item-danger`]:{color:lr,[`&${he}-item:hover`]:{[`&:not(${he}-item-selected):not(${he}-submenu-selected)`]:{color:ur}},[`&${he}-item:active`]:{background:Xr}},[`${he}-item a`]:{"&, &:hover":{color:"inherit"}},[`${he}-item-selected`]:{color:Ie,[`&${he}-item-danger`]:{color:ni},"a, a:hover":{color:"inherit"}},[`& ${he}-item-selected`]:{backgroundColor:Kt,[`&${he}-item-danger`]:{backgroundColor:Qr}},[`${he}-item, ${he}-submenu-title`]:{[`&:not(${he}-item-disabled):focus-visible`]:Object.assign({},Le(ue))},[`&${he}-submenu > ${he}`]:{backgroundColor:Ei},[`&${he}-popup > ${he}`]:{backgroundColor:At},[`&${he}-horizontal`]:Object.assign(Object.assign({},pe==="dark"?{borderBottom:0}:{}),{[`> ${he}-item, > ${he}-submenu`]:{top:et,marginTop:-et,marginBottom:0,borderRadius:ra,"&::after":{position:"absolute",insetInline:yt,bottom:0,borderBottom:`${en}px solid transparent`,transition:`border-color ${wt} ${Tt}`,content:'""'},"&:hover, &-active, &-open":{background:Zi,"&::after":{borderBottomWidth:en,borderBottomColor:Ui}},"&-selected":{color:Ui,backgroundColor:ea,"&:hover":{backgroundColor:ea},"&::after":{borderBottomWidth:en,borderBottomColor:Ui}}}}),[`&${he}-root`]:{[`&${he}-inline, &${he}-vertical`]:{borderInlineEnd:`${et}px ${$n} ${Kr}`}},[`&${he}-inline`]:{[`${he}-sub${he}-inline`]:{background:$t},[`${he}-item, ${he}-submenu-title`]:et&&Jt?{width:`calc(100% + ${et}px)`}:{},[`${he}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Jt}px solid ${Ie}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Dn} ${Ot}`,`opacity ${Dn} ${Ot}`].join(","),content:'""'},[`&${he}-item-danger`]:{"&::after":{borderInlineEndColor:ni}}},[`${he}-selected, ${he}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Dn} ${Tt}`,`opacity ${Dn} ${Tt}`].join(",")}}}}}};const un=ue=>{const{componentCls:pe,itemHeight:he,itemMarginInline:oe,padding:Ie,menuArrowSize:Qe,marginXS:Lt,itemMarginBlock:$t}=ue,Kt=Ie+Qe+Lt;return{[`${pe}-item`]:{position:"relative",overflow:"hidden"},[`${pe}-item, ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`,paddingInline:Ie,overflow:"hidden",textOverflow:"ellipsis",marginInline:oe,marginBlock:$t,width:`calc(100% - ${oe*2}px)`},[`> ${pe}-item,
|
|
|
> ${pe}-submenu > ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`},[`${pe}-item-group-list ${pe}-submenu-title,
|
|
|
${pe}-submenu-title`]:{paddingInlineEnd:Kt}}};var ft=ue=>{const{componentCls:pe,iconCls:he,itemHeight:oe,colorTextLightSolid:Ie,dropdownWidth:Qe,controlHeightLG:Lt,motionDurationMid:$t,motionEaseOut:Kt,paddingXL:en,itemMarginInline:Jt,fontSizeLG:et,motionDurationSlow:wt,paddingXS:Tt,boxShadowSecondary:Ot,collapsedWidth:yt,collapsedIconSize:Dn}=ue,gn={height:oe,lineHeight:`${oe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[pe]:{"&-inline, &-vertical":Object.assign({[`&${pe}-root`]:{boxShadow:"none"}},un(ue))},[`${pe}-submenu-popup`]:{[`${pe}-vertical`]:Object.assign(Object.assign({},un(ue)),{boxShadow:Ot})}},{[`${pe}-submenu-popup ${pe}-vertical${pe}-sub`]:{minWidth:Qe,maxHeight:`calc(100vh - ${Lt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${pe}-inline`]:{width:"100%",[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${wt}`,`background ${wt}`,`padding ${$t} ${Kt}`].join(","),[`> ${pe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${pe}-sub${pe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${pe}-submenu > ${pe}-submenu-title`]:gn,[`& ${pe}-item-group-title`]:{paddingInlineStart:en}},[`${pe}-item`]:gn}},{[`${pe}-inline-collapsed`]:{width:yt,[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu ${pe}-submenu-title`]:{[`> ${pe}-inline-collapsed-noicon`]:{fontSize:et,textAlign:"center"}}},[`> ${pe}-item,
|
|
|
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-item,
|
|
|
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-submenu > ${pe}-submenu-title,
|
|
|
> ${pe}-submenu > ${pe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${et/2}px - ${Jt}px)`,textOverflow:"clip",[`
|
|
|
${pe}-submenu-arrow,
|
|
|
${pe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${pe}-item-icon, ${he}`]:{margin:0,fontSize:Dn,lineHeight:`${oe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${pe}-item-icon, ${he}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${pe}-item-icon, ${he}`]:{display:"none"},"a, a:hover":{color:Ie}},[`${pe}-item-group-title`]:Object.assign(Object.assign({},St.vS),{paddingInline:Tt})}}]};const Xt=ue=>{const{componentCls:pe,motionDurationSlow:he,motionDurationMid:oe,motionEaseInOut:Ie,motionEaseOut:Qe,iconCls:Lt,iconSize:$t,iconMarginInlineEnd:Kt}=ue;return{[`${pe}-item, ${pe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${he}`,`background ${he}`,`padding ${he} ${Ie}`].join(","),[`${pe}-item-icon, ${Lt}`]:{minWidth:$t,fontSize:$t,transition:[`font-size ${oe} ${Qe}`,`margin ${he} ${Ie}`,`color ${he}`].join(","),"+ span":{marginInlineStart:Kt,opacity:1,transition:[`opacity ${he} ${Ie}`,`margin ${he}`,`color ${he}`].join(",")}},[`${pe}-item-icon`]:Object.assign({},(0,St.Ro)()),[`&${pe}-item-only-child`]:{[`> ${Lt}, > ${pe}-item-icon`]:{marginInlineEnd:0}}},[`${pe}-item-disabled, ${pe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${pe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Tn=ue=>{const{componentCls:pe,motionDurationSlow:he,motionEaseInOut:oe,borderRadius:Ie,menuArrowSize:Qe,menuArrowOffset:Lt}=ue;return{[`${pe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ue.margin,width:Qe,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${he} ${oe}, opacity ${he}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Qe*.6,height:Qe*.15,backgroundColor:"currentcolor",borderRadius:Ie,transition:[`background ${he} ${oe}`,`transform ${he} ${oe}`,`top ${he} ${oe}`,`color ${he} ${oe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Lt})`},"&::after":{transform:`rotate(-45deg) translateY(${Lt})`}}}}},mn=ue=>{const{antCls:pe,componentCls:he,fontSize:oe,motionDurationSlow:Ie,motionDurationMid:Qe,motionEaseInOut:Lt,paddingXS:$t,padding:Kt,colorSplit:en,lineWidth:Jt,zIndexPopup:et,borderRadiusLG:wt,subMenuItemBorderRadius:Tt,menuArrowSize:Ot,menuArrowOffset:yt,lineType:Dn,menuPanelMaskInset:gn,groupTitleLineHeight:$n,groupTitleFontSize:Kr}=ue;return[{"":{[`${he}`]:Object.assign(Object.assign({},(0,St.dF)()),{"&-hidden":{display:"none"}})},[`${he}-submenu-hidden`]:{display:"none"}},{[he]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,St.Wf)(ue)),(0,St.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:oe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Ie} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${he}-item`]:{flex:"none"}},[`${he}-item, ${he}-submenu, ${he}-submenu-title`]:{borderRadius:ue.itemBorderRadius},[`${he}-item-group-title`]:{padding:`${$t}px ${Kt}px`,fontSize:Kr,lineHeight:$n,transition:`all ${Ie}`},[`&-horizontal ${he}-submenu`]:{transition:[`border-color ${Ie} ${Lt}`,`background ${Ie} ${Lt}`].join(",")},[`${he}-submenu, ${he}-submenu-inline`]:{transition:[`border-color ${Ie} ${Lt}`,`background ${Ie} ${Lt}`,`padding ${Qe} ${Lt}`].join(",")},[`${he}-submenu ${he}-sub`]:{cursor:"initial",transition:[`background ${Ie} ${Lt}`,`padding ${Ie} ${Lt}`].join(",")},[`${he}-title-content`]:{transition:`color ${Ie}`},[`${he}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${he}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:en,borderStyle:Dn,borderWidth:0,borderTopWidth:Jt,marginBlock:Jt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Xt(ue)),{[`${he}-item-group`]:{[`${he}-item-group-list`]:{margin:0,padding:0,[`${he}-item, ${he}-submenu-title`]:{paddingInline:`${oe*2}px ${Kt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:et,borderRadius:wt,boxShadow:"none",transformOrigin:"0 0",[`&${he}-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:ue.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:ue.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:ue.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:ue.paddingXS},[`> ${he}`]:Object.assign(Object.assign(Object.assign({borderRadius:wt},Xt(ue)),Tn(ue)),{[`${he}-item, ${he}-submenu > ${he}-submenu-title`]:{borderRadius:Tt},[`${he}-submenu-title::after`]:{transition:`transform ${Ie} ${Lt}`}})}}),Tn(ue)),{[`&-inline-collapsed ${he}-submenu-arrow,
|
|
|
&-inline ${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${yt})`},"&::after":{transform:`rotate(45deg) translateX(-${yt})`}},[`${he}-submenu-open${he}-submenu-inline > ${he}-submenu-title > ${he}-submenu-arrow`]:{transform:`translateY(-${Ot*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${yt})`},"&::before":{transform:`rotate(45deg) translateX(${yt})`}}})},{[`${pe}-layout-header`]:{[he]:{lineHeight:"inherit"}}}]};var Ut=(ue,pe)=>(0,Yt.Z)("Menu",oe=>{if(pe===!1)return[];const{colorBgElevated:Ie,colorPrimary:Qe,colorTextLightSolid:Lt,controlHeightLG:$t,fontSize:Kt,darkItemColor:en,darkDangerItemColor:Jt,darkItemBg:et,darkSubMenuItemBg:wt,darkItemSelectedColor:Tt,darkItemSelectedBg:Ot,darkDangerItemSelectedBg:yt,darkItemHoverBg:Dn,darkGroupTitleColor:gn,darkItemHoverColor:$n,darkItemDisabledColor:Kr,darkDangerItemHoverColor:tr,darkDangerItemSelectedColor:lr,darkDangerItemActiveBg:ur}=oe,ni=Kt/7*5,Xr=(0,at.TS)(oe,{menuArrowSize:ni,menuHorizontalHeight:$t*1.15,menuArrowOffset:`${ni*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Ie}),Qr=(0,at.TS)(Xr,{itemColor:en,itemHoverColor:$n,groupTitleColor:gn,itemSelectedColor:Tt,itemBg:et,popupBg:et,subMenuItemBg:wt,itemActiveBg:"transparent",itemSelectedBg:Ot,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Dn,itemDisabledColor:Kr,dangerItemColor:Jt,dangerItemHoverColor:tr,dangerItemSelectedColor:lr,dangerItemActiveBg:ur,dangerItemSelectedBg:yt,menuSubMenuBg:wt,horizontalItemSelectedColor:Lt,horizontalItemSelectedBg:Qe});return[mn(Xr),fn(Xr),ft(Xr),Sn(Xr,"light"),Sn(Qr,"dark"),Ue(Xr),(0,Ke.Z)(Xr),(0,Pt.oN)(Xr,"slide-up"),(0,Pt.oN)(Xr,"slide-down"),(0,Et._y)(Xr,"zoom-big")]},oe=>{const{colorPrimary:Ie,colorError:Qe,colorTextDisabled:Lt,colorErrorBg:$t,colorText:Kt,colorTextDescription:en,colorBgContainer:Jt,colorFillAlter:et,colorFillContent:wt,lineWidth:Tt,lineWidthBold:Ot,controlItemBgActive:yt,colorBgTextHover:Dn,controlHeightLG:gn,lineHeight:$n,colorBgElevated:Kr,marginXXS:tr,padding:lr,fontSize:ur,controlHeightSM:ni,fontSizeLG:Xr,colorTextLightSolid:Qr,colorErrorHover:gi}=oe,Sr=new mt.C(Qr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:oe.zIndexPopupBase+50,radiusItem:oe.borderRadiusLG,itemBorderRadius:oe.borderRadiusLG,radiusSubMenuItem:oe.borderRadiusSM,subMenuItemBorderRadius:oe.borderRadiusSM,colorItemText:Kt,itemColor:Kt,colorItemTextHover:Kt,itemHoverColor:Kt,colorItemTextHoverHorizontal:Ie,horizontalItemHoverColor:Ie,colorGroupTitle:en,groupTitleColor:en,colorItemTextSelected:Ie,itemSelectedColor:Ie,colorItemTextSelectedHorizontal:Ie,horizontalItemSelectedColor:Ie,colorItemBg:Jt,itemBg:Jt,colorItemBgHover:Dn,itemHoverBg:Dn,colorItemBgActive:wt,itemActiveBg:yt,colorSubItemBg:et,subMenuItemBg:et,colorItemBgSelected:yt,itemSelectedBg:yt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Ot,activeBarHeight:Ot,colorActiveBarBorderSize:Tt,activeBarBorderWidth:Tt,colorItemTextDisabled:Lt,itemDisabledColor:Lt,colorDangerItemText:Qe,dangerItemColor:Qe,colorDangerItemTextHover:Qe,dangerItemHoverColor:Qe,colorDangerItemTextSelected:Qe,dangerItemSelectedColor:Qe,colorDangerItemBgActive:$t,dangerItemActiveBg:$t,colorDangerItemBgSelected:$t,dangerItemSelectedBg:$t,itemMarginInline:oe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:gn,groupTitleLineHeight:$n,collapsedWidth:gn*2,popupBg:Kr,itemMarginBlock:tr,itemPaddingInline:lr,horizontalLineHeight:`${gn*1.15}px`,iconSize:ur,iconMarginInlineEnd:ni-ur,collapsedIconSize:Xr,groupTitleFontSize:ur,darkItemDisabledColor:new mt.C(Qr).setAlpha(.25).toRgbString(),darkItemColor:Sr,darkDangerItemColor:Qe,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Qr,darkItemSelectedBg:Ie,darkDangerItemSelectedBg:Qe,darkItemHoverBg:"transparent",darkGroupTitleColor:Sr,darkItemHoverColor:Qr,darkDangerItemHoverColor:gi,darkDangerItemSelectedColor:Qr,darkDangerItemActiveBg:Qe}},{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"]]})(ue),jt=function(ue,pe){var he={};for(var oe in ue)Object.prototype.hasOwnProperty.call(ue,oe)&&pe.indexOf(oe)<0&&(he[oe]=ue[oe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,oe=Object.getOwnPropertySymbols(ue);Ie<oe.length;Ie++)pe.indexOf(oe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ue,oe[Ie])&&(he[oe[Ie]]=ue[oe[Ie]]);return he},yn=(0,Be.forwardRef)((ue,pe)=>{var he,oe;const Ie=Be.useContext(Ee.Z),Qe=Ie||{},{getPrefixCls:Lt,getPopupContainer:$t,direction:Kt,menu:en}=Be.useContext(Se.E_),Jt=Lt(),{prefixCls:et,className:wt,style:Tt,theme:Ot="light",expandIcon:yt,_internalDisableMenuItemTitleTooltip:Dn,inlineCollapsed:gn,siderCollapsed:$n,items:Kr,children:tr,rootClassName:lr,mode:ur,selectable:ni,onClick:Xr,overflowedIndicatorPopupClassName:Qr}=ue,gi=jt(ue,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Sr=(0,ot.Z)(gi,["collapsedWidth"]),Ei=Mt(Kr)||tr;(he=Qe.validator)===null||he===void 0||he.call(Qe,{mode:ur});const Ui=(0,ut.useEvent)(function(){var Rn;Xr==null||Xr.apply(void 0,arguments),(Rn=Qe.onClick)===null||Rn===void 0||Rn.call(Qe)}),ea=Qe.mode||ur,ra=ni!=null?ni:Qe.selectable,Zi=Be.useMemo(()=>$n!==void 0?$n:gn,[gn,$n]),At={horizontal:{motionName:`${Jt}-slide-up`},inline:(0,xe.Z)(Jt),other:{motionName:`${Jt}-zoom-big`}},An=Lt("menu",et||Qe.prefixCls),[On,wn]=Ut(An,!Ie),kr=ve()(`${An}-${Ot}`,en==null?void 0:en.className,wt);let or;if(typeof yt=="function")or=yt;else if(yt===null||yt===!1)or=null;else if(Qe.expandIcon===null||Qe.expandIcon===!1)or=null;else{const Rn=yt!=null?yt:Qe.expandIcon;or=(0,st.Tm)(Rn,{className:ve()(`${An}-submenu-expand-icon`,(0,st.l$)(Rn)?(oe=Rn.props)===null||oe===void 0?void 0:oe.className:"")})}const ar=Be.useMemo(()=>({prefixCls:An,inlineCollapsed:Zi||!1,direction:Kt,firstLevel:!0,theme:Ot,mode:ea,disableMenuItemTitleTooltip:Dn}),[An,Zi,Kt,Dn,Ot]);return On(Be.createElement(Ee.Z.Provider,{value:null},Be.createElement(Je.Provider,{value:ar},Be.createElement(se.ZP,Object.assign({getPopupContainer:$t,overflowedIndicator:Be.createElement(qe.Z,null),overflowedIndicatorPopupClassName:ve()(An,`${An}-${Ot}`,Qr),mode:ea,selectable:ra,onClick:Ui},Sr,{inlineCollapsed:Zi,style:Object.assign(Object.assign({},en==null?void 0:en.style),Tt),className:kr,prefixCls:An,direction:Kt,defaultMotions:At,expandIcon:or,ref:pe,rootClassName:ve()(lr,wn)}),Ei))))});const Ae=(0,Be.forwardRef)((ue,pe)=>{const he=(0,Be.useRef)(null),oe=Be.useContext(Ne.D);return(0,Be.useImperativeHandle)(pe,()=>({menu:he.current,focus:Ie=>{var Qe;(Qe=he.current)===null||Qe===void 0||Qe.focus(Ie)}})),Be.createElement(yn,Object.assign({ref:he},ue,oe))});Ae.Item=Ce,Ae.SubMenu=zt,Ae.Divider=me,Ae.ItemGroup=se.BW;var ce=Ae},28452:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Jt}});var se=le(87462),Be=le(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Ye=Ne,ve=le(84089),Se=function(wt,Tt){return Be.createElement(ve.Z,(0,se.Z)({},wt,{ref:Tt,icon:Ye}))},Me=Be.forwardRef(Se),we=le(81893),me=le(22751),Te=le(91034),ot=le(94184),Oe=le.n(ot),st=le(4942),lt=le(1413),Je=le(15671),Ge=le(43144),Ce=le(60136),pt=le(51630),zt=`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`,qe=`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`,ut="".concat(zt," ").concat(qe).split(/[\s\n]+/),xe="aria-",Ee="data-";function Ve(et,wt){return et.indexOf(wt)===0}function Xe(et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tt;wt===!1?Tt={aria:!0,data:!0,attr:!0}:wt===!0?Tt={aria:!0}:Tt=(0,lt.Z)({},wt);var Ot={};return Object.keys(et).forEach(function(yt){(Tt.aria&&(yt==="role"||Ve(yt,xe))||Tt.data&&Ve(yt,Ee)||Tt.attr&&ut.includes(yt))&&(Ot[yt]=et[yt])}),Ot}var Mt={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},mt=Mt,St=le(81626),Ke=function(et){(0,Ce.Z)(Tt,et);var wt=(0,pt.Z)(Tt);function Tt(){var Ot;(0,Je.Z)(this,Tt);for(var yt=arguments.length,Dn=new Array(yt),gn=0;gn<yt;gn++)Dn[gn]=arguments[gn];return Ot=wt.call.apply(wt,[this].concat(Dn)),Ot.state={goInputText:""},Ot.getValidValue=function(){var $n=Ot.state.goInputText;return!$n||Number.isNaN($n)?void 0:Number($n)},Ot.buildOptionText=function($n){return"".concat($n," ").concat(Ot.props.locale.items_per_page)},Ot.changeSize=function($n){Ot.props.changeSize(Number($n))},Ot.handleChange=function($n){Ot.setState({goInputText:$n.target.value})},Ot.handleBlur=function($n){var Kr=Ot.props,tr=Kr.goButton,lr=Kr.quickGo,ur=Kr.rootPrefixCls,ni=Ot.state.goInputText;tr||ni===""||(Ot.setState({goInputText:""}),!($n.relatedTarget&&($n.relatedTarget.className.indexOf("".concat(ur,"-item-link"))>=0||$n.relatedTarget.className.indexOf("".concat(ur,"-item"))>=0))&&lr(Ot.getValidValue()))},Ot.go=function($n){var Kr=Ot.state.goInputText;Kr!==""&&($n.keyCode===mt.ENTER||$n.type==="click")&&(Ot.setState({goInputText:""}),Ot.props.quickGo(Ot.getValidValue()))},Ot}return(0,Ge.Z)(Tt,[{key:"getPageSizeOptions",value:function(){var yt=this.props,Dn=yt.pageSize,gn=yt.pageSizeOptions;return gn.some(function($n){return $n.toString()===Dn.toString()})?gn:gn.concat([Dn.toString()]).sort(function($n,Kr){var tr=Number.isNaN(Number($n))?0:Number($n),lr=Number.isNaN(Number(Kr))?0:Number(Kr);return tr-lr})}},{key:"render",value:function(){var yt=this,Dn=this.props,gn=Dn.pageSize,$n=Dn.locale,Kr=Dn.rootPrefixCls,tr=Dn.changeSize,lr=Dn.quickGo,ur=Dn.goButton,ni=Dn.selectComponentClass,Xr=Dn.buildOptionText,Qr=Dn.selectPrefixCls,gi=Dn.disabled,Sr=this.state.goInputText,Ei="".concat(Kr,"-options"),Ui=ni,ea=null,ra=null,Zi=null;if(!tr&&!lr)return null;var At=this.getPageSizeOptions();if(tr&&Ui){var An=At.map(function(On,wn){return Be.createElement(Ui.Option,{key:wn,value:On.toString()},(Xr||yt.buildOptionText)(On))});ea=Be.createElement(Ui,{disabled:gi,prefixCls:Qr,showSearch:!1,className:"".concat(Ei,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(gn||At[0]).toString(),onChange:this.changeSize,getPopupContainer:function(wn){return wn.parentNode},"aria-label":$n.page_size,defaultOpen:!1},An)}return lr&&(ur&&(Zi=typeof ur=="boolean"?Be.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:gi,className:"".concat(Ei,"-quick-jumper-button")},$n.jump_to_confirm):Be.createElement("span",{onClick:this.go,onKeyUp:this.go},ur)),ra=Be.createElement("div",{className:"".concat(Ei,"-quick-jumper")},$n.jump_to,Be.createElement("input",{disabled:gi,type:"text",value:Sr,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":$n.page}),$n.page,Zi)),Be.createElement("li",{className:"".concat(Ei)},ea,ra)}}]),Tt}(Be.Component);Ke.defaultProps={pageSizeOptions:["10","20","50","100"]};var Pt=Ke,Et=function(wt){var Tt,Ot=wt.rootPrefixCls,yt=wt.page,Dn=wt.active,gn=wt.className,$n=wt.showTitle,Kr=wt.onClick,tr=wt.onKeyPress,lr=wt.itemRender,ur="".concat(Ot,"-item"),ni=Oe()(ur,"".concat(ur,"-").concat(yt),(Tt={},(0,st.Z)(Tt,"".concat(ur,"-active"),Dn),(0,st.Z)(Tt,"".concat(ur,"-disabled"),!yt),(0,st.Z)(Tt,wt.className,gn),Tt)),Xr=function(){Kr(yt)},Qr=function(Ei){tr(Ei,Kr,yt)},gi=lr(yt,"page",Be.createElement("a",{rel:"nofollow"},yt));return gi?Be.createElement("li",{title:$n?yt.toString():null,className:ni,onClick:Xr,onKeyPress:Qr,tabIndex:0},gi):null},Yt=Et;function at(){}function Vt(et){var wt=Number(et);return typeof wt=="number"&&!Number.isNaN(wt)&&isFinite(wt)&&Math.floor(wt)===wt}var fn=function(wt,Tt,Ot){return Ot};function dn(et,wt,Tt){var Ot=typeof et=="undefined"?wt.pageSize:et;return Math.floor((Tt.total-1)/Ot)+1}var Ue=function(et){(0,Ce.Z)(Tt,et);var wt=(0,pt.Z)(Tt);function Tt(Ot){var yt;(0,Je.Z)(this,Tt),yt=wt.call(this,Ot),yt.paginationNode=Be.createRef(),yt.getJumpPrevPage=function(){return Math.max(1,yt.state.current-(yt.props.showLessItems?3:5))},yt.getJumpNextPage=function(){return Math.min(dn(void 0,yt.state,yt.props),yt.state.current+(yt.props.showLessItems?3:5))},yt.getItemIcon=function(tr,lr){var ur=yt.props.prefixCls,ni=tr||Be.createElement("button",{type:"button","aria-label":lr,className:"".concat(ur,"-item-link")});return typeof tr=="function"&&(ni=Be.createElement(tr,(0,lt.Z)({},yt.props))),ni},yt.isValid=function(tr){var lr=yt.props.total;return Vt(tr)&&tr!==yt.state.current&&Vt(lr)&&lr>0},yt.shouldDisplayQuickJumper=function(){var tr=yt.props,lr=tr.showQuickJumper,ur=tr.total,ni=yt.state.pageSize;return ur<=ni?!1:lr},yt.handleKeyDown=function(tr){(tr.keyCode===mt.ARROW_UP||tr.keyCode===mt.ARROW_DOWN)&&tr.preventDefault()},yt.handleKeyUp=function(tr){var lr=yt.getValidValue(tr),ur=yt.state.currentInputValue;lr!==ur&&yt.setState({currentInputValue:lr}),tr.keyCode===mt.ENTER?yt.handleChange(lr):tr.keyCode===mt.ARROW_UP?yt.handleChange(lr-1):tr.keyCode===mt.ARROW_DOWN&&yt.handleChange(lr+1)},yt.handleBlur=function(tr){var lr=yt.getValidValue(tr);yt.handleChange(lr)},yt.changePageSize=function(tr){var lr=yt.state.current,ur=dn(tr,yt.state,yt.props);lr=lr>ur?ur:lr,ur===0&&(lr=yt.state.current),typeof tr=="number"&&("pageSize"in yt.props||yt.setState({pageSize:tr}),"current"in yt.props||yt.setState({current:lr,currentInputValue:lr})),yt.props.onShowSizeChange(lr,tr),"onChange"in yt.props&&yt.props.onChange&&yt.props.onChange(lr,tr)},yt.handleChange=function(tr){var lr=yt.props,ur=lr.disabled,ni=lr.onChange,Xr=yt.state,Qr=Xr.pageSize,gi=Xr.current,Sr=Xr.currentInputValue;if(yt.isValid(tr)&&!ur){var Ei=dn(void 0,yt.state,yt.props),Ui=tr;return tr>Ei?Ui=Ei:tr<1&&(Ui=1),"current"in yt.props||yt.setState({current:Ui}),Ui!==Sr&&yt.setState({currentInputValue:Ui}),ni(Ui,Qr),Ui}return gi},yt.prev=function(){yt.hasPrev()&&yt.handleChange(yt.state.current-1)},yt.next=function(){yt.hasNext()&&yt.handleChange(yt.state.current+1)},yt.jumpPrev=function(){yt.handleChange(yt.getJumpPrevPage())},yt.jumpNext=function(){yt.handleChange(yt.getJumpNextPage())},yt.hasPrev=function(){return yt.state.current>1},yt.hasNext=function(){return yt.state.current<dn(void 0,yt.state,yt.props)},yt.runIfEnter=function(tr,lr){if(tr.key==="Enter"||tr.charCode===13){for(var ur=arguments.length,ni=new Array(ur>2?ur-2:0),Xr=2;Xr<ur;Xr++)ni[Xr-2]=arguments[Xr];lr.apply(void 0,ni)}},yt.runIfEnterPrev=function(tr){yt.runIfEnter(tr,yt.prev)},yt.runIfEnterNext=function(tr){yt.runIfEnter(tr,yt.next)},yt.runIfEnterJumpPrev=function(tr){yt.runIfEnter(tr,yt.jumpPrev)},yt.runIfEnterJumpNext=function(tr){yt.runIfEnter(tr,yt.jumpNext)},yt.handleGoTO=function(tr){(tr.keyCode===mt.ENTER||tr.type==="click")&&yt.handleChange(yt.state.currentInputValue)},yt.renderPrev=function(tr){var lr=yt.props,ur=lr.prevIcon,ni=lr.itemRender,Xr=ni(tr,"prev",yt.getItemIcon(ur,"prev page")),Qr=!yt.hasPrev();return(0,Be.isValidElement)(Xr)?(0,Be.cloneElement)(Xr,{disabled:Qr}):Xr},yt.renderNext=function(tr){var lr=yt.props,ur=lr.nextIcon,ni=lr.itemRender,Xr=ni(tr,"next",yt.getItemIcon(ur,"next page")),Qr=!yt.hasNext();return(0,Be.isValidElement)(Xr)?(0,Be.cloneElement)(Xr,{disabled:Qr}):Xr};var Dn=Ot.onChange!==at,gn="current"in Ot;gn&&!Dn&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var $n=Ot.defaultCurrent;"current"in Ot&&($n=Ot.current);var Kr=Ot.defaultPageSize;return"pageSize"in Ot&&(Kr=Ot.pageSize),$n=Math.min($n,dn(Kr,void 0,Ot)),yt.state={current:$n,currentInputValue:$n,pageSize:Kr},yt}return(0,Ge.Z)(Tt,[{key:"componentDidUpdate",value:function(yt,Dn){var gn=this.props.prefixCls;if(Dn.current!==this.state.current&&this.paginationNode.current){var $n=this.paginationNode.current.querySelector(".".concat(gn,"-item-").concat(Dn.current));if($n&&document.activeElement===$n){var Kr;$n==null||(Kr=$n.blur)===null||Kr===void 0||Kr.call($n)}}}},{key:"getValidValue",value:function(yt){var Dn=yt.target.value,gn=dn(void 0,this.state,this.props),$n=this.state.currentInputValue,Kr;return Dn===""?Kr=Dn:Number.isNaN(Number(Dn))?Kr=$n:Dn>=gn?Kr=gn:Kr=Number(Dn),Kr}},{key:"getShowSizeChanger",value:function(){var yt=this.props,Dn=yt.showSizeChanger,gn=yt.total,$n=yt.totalBoundaryShowSizeChanger;return typeof Dn!="undefined"?Dn:gn>$n}},{key:"render",value:function(){var yt=this.props,Dn=yt.prefixCls,gn=yt.className,$n=yt.style,Kr=yt.disabled,tr=yt.hideOnSinglePage,lr=yt.total,ur=yt.locale,ni=yt.showQuickJumper,Xr=yt.showLessItems,Qr=yt.showTitle,gi=yt.showTotal,Sr=yt.simple,Ei=yt.itemRender,Ui=yt.showPrevNextJumpers,ea=yt.jumpPrevIcon,ra=yt.jumpNextIcon,Zi=yt.selectComponentClass,At=yt.selectPrefixCls,An=yt.pageSizeOptions,On=this.state,wn=On.current,kr=On.pageSize,or=On.currentInputValue;if(tr===!0&&lr<=kr)return null;var ar=dn(void 0,this.state,this.props),Rn=[],it=null,dt=null,Bt=null,qt=null,je=null,Ct=ni&&ni.goButton,Wt=Xr?1:2,Ft=wn-1>0?wn-1:0,an=wn+1<ar?wn+1:ar,rn=Xe(this.props,{aria:!0,data:!0}),Vn=gi&&Be.createElement("li",{className:"".concat(Dn,"-total-text")},gi(lr,[lr===0?0:(wn-1)*kr+1,wn*kr>lr?lr:wn*kr]));if(Sr){Ct&&(typeof Ct=="boolean"?je=Be.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ur.jump_to_confirm):je=Be.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ct),je=Be.createElement("li",{title:Qr?"".concat(ur.jump_to).concat(wn,"/").concat(ar):null,className:"".concat(Dn,"-simple-pager")},je));var Pr=this.renderPrev(Ft);return Be.createElement("ul",(0,se.Z)({className:Oe()(Dn,"".concat(Dn,"-simple"),(0,st.Z)({},"".concat(Dn,"-disabled"),Kr),gn),style:$n,ref:this.paginationNode},rn),Vn,Pr?Be.createElement("li",{title:Qr?ur.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:Oe()("".concat(Dn,"-prev"),(0,st.Z)({},"".concat(Dn,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Pr):null,Be.createElement("li",{title:Qr?"".concat(wn,"/").concat(ar):null,className:"".concat(Dn,"-simple-pager")},Be.createElement("input",{type:"text",value:or,disabled:Kr,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Be.createElement("span",{className:"".concat(Dn,"-slash")},"/"),ar),Be.createElement("li",{title:Qr?ur.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:Oe()("".concat(Dn,"-next"),(0,st.Z)({},"".concat(Dn,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(an)),je)}if(ar<=3+Wt*2){var nr={locale:ur,rootPrefixCls:Dn,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Qr,itemRender:Ei};ar||Rn.push(Be.createElement(Yt,(0,se.Z)({},nr,{key:"noPager",page:1,className:"".concat(Dn,"-item-disabled")})));for(var Xn=1;Xn<=ar;Xn+=1){var mr=wn===Xn;Rn.push(Be.createElement(Yt,(0,se.Z)({},nr,{key:Xn,page:Xn,active:mr})))}}else{var fr=Xr?ur.prev_3:ur.prev_5,Yr=Xr?ur.next_3:ur.next_5,xn=Ei(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ea,"prev page")),qn=Ei(this.getJumpNextPage(),"jump-next",this.getItemIcon(ra,"next page"));Ui&&(it=xn?Be.createElement("li",{title:Qr?fr:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:Oe()("".concat(Dn,"-jump-prev"),(0,st.Z)({},"".concat(Dn,"-jump-prev-custom-icon"),!!ea))},xn):null,dt=qn?Be.createElement("li",{title:Qr?Yr:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:Oe()("".concat(Dn,"-jump-next"),(0,st.Z)({},"".concat(Dn,"-jump-next-custom-icon"),!!ra))},qn):null),qt=Be.createElement(Yt,{locale:ur,last:!0,rootPrefixCls:Dn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ar,page:ar,active:!1,showTitle:Qr,itemRender:Ei}),Bt=Be.createElement(Yt,{locale:ur,rootPrefixCls:Dn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Qr,itemRender:Ei});var Si=Math.max(1,wn-Wt),Ii=Math.min(wn+Wt,ar);wn-1<=Wt&&(Ii=1+Wt*2),ar-wn<=Wt&&(Si=ar-Wt*2);for(var di=Si;di<=Ii;di+=1){var si=wn===di;Rn.push(Be.createElement(Yt,{locale:ur,rootPrefixCls:Dn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:di,page:di,active:si,showTitle:Qr,itemRender:Ei}))}wn-1>=Wt*2&&wn!==3&&(Rn[0]=(0,Be.cloneElement)(Rn[0],{className:"".concat(Dn,"-item-after-jump-prev")}),Rn.unshift(it)),ar-wn>=Wt*2&&wn!==ar-2&&(Rn[Rn.length-1]=(0,Be.cloneElement)(Rn[Rn.length-1],{className:"".concat(Dn,"-item-before-jump-next")}),Rn.push(dt)),Si!==1&&Rn.unshift(Bt),Ii!==ar&&Rn.push(qt)}var zi=!this.hasPrev()||!ar,Lr=!this.hasNext()||!ar,Mi=this.renderPrev(Ft),Pn=this.renderNext(an);return Be.createElement("ul",(0,se.Z)({className:Oe()(Dn,gn,(0,st.Z)({},"".concat(Dn,"-disabled"),Kr)),style:$n,ref:this.paginationNode},rn),Vn,Mi?Be.createElement("li",{title:Qr?ur.prev_page:null,onClick:this.prev,tabIndex:zi?null:0,onKeyPress:this.runIfEnterPrev,className:Oe()("".concat(Dn,"-prev"),(0,st.Z)({},"".concat(Dn,"-disabled"),zi)),"aria-disabled":zi},Mi):null,Rn,Pn?Be.createElement("li",{title:Qr?ur.next_page:null,onClick:this.next,tabIndex:Lr?null:0,onKeyPress:this.runIfEnterNext,className:Oe()("".concat(Dn,"-next"),(0,st.Z)({},"".concat(Dn,"-disabled"),Lr)),"aria-disabled":Lr},Pn):null,Be.createElement(Pt,{disabled:Kr,locale:ur,rootPrefixCls:Dn,selectComponentClass:Zi,selectPrefixCls:At,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:wn,pageSize:kr,pageSizeOptions:An,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ct}))}}],[{key:"getDerivedStateFromProps",value:function(yt,Dn){var gn={};if("current"in yt&&(gn.current=yt.current,yt.current!==Dn.current&&(gn.currentInputValue=gn.current)),"pageSize"in yt&&yt.pageSize!==Dn.pageSize){var $n=Dn.current,Kr=dn(yt.pageSize,Dn,yt);$n=$n>Kr?Kr:$n,"current"in yt||(gn.current=$n,gn.currentInputValue=$n),gn.pageSize=yt.pageSize}return gn}}]),Tt}(Be.Component);Ue.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:at,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:at,locale:St.Z,style:{},itemRender:fn,totalBoundaryShowSizeChanger:50};var Le=Ue,Rt=le(62906),Sn=le(53124),un=le(98675),tt=le(25378),ft=le(10110),Xt=le(11713);const Tn=et=>Be.createElement(Xt.default,Object.assign({},et,{showSearch:!0,size:"small"})),mn=et=>Be.createElement(Xt.default,Object.assign({},et,{showSearch:!0,size:"middle"}));Tn.Option=Xt.default.Option,mn.Option=Xt.default.Option;var Ut=le(47673),jt=le(14747),_n=le(67968),yn=le(45503);const Ae=et=>{const{componentCls:wt}=et;return{[`${wt}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${wt}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${wt}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed"}}},[`&${wt}-disabled`]:{cursor:"not-allowed",[`${wt}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:et.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:et.colorBorder,backgroundColor:et.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:et.itemActiveBgDisabled},a:{color:et.itemActiveColorDisabled}}},[`${wt}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${wt}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${wt}-simple-pager`]:{color:et.colorTextDisabled},[`${wt}-jump-prev, ${wt}-jump-next`]:{[`${wt}-item-link-icon`]:{opacity:0},[`${wt}-item-ellipsis`]:{opacity:1}}},[`&${wt}-simple`]:{[`${wt}-prev, ${wt}-next`]:{[`&${wt}-disabled ${wt}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},ce=et=>{const{componentCls:wt}=et;return{[`&${wt}-mini ${wt}-total-text, &${wt}-mini ${wt}-simple-pager`]:{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`},[`&${wt}-mini ${wt}-item`]:{minWidth:et.itemSizeSM,height:et.itemSizeSM,margin:0,lineHeight:`${et.itemSizeSM-2}px`},[`&${wt}-mini:not(${wt}-disabled) ${wt}-item:not(${wt}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive}},[`&${wt}-mini ${wt}-prev, &${wt}-mini ${wt}-next`]:{minWidth:et.itemSizeSM,height:et.itemSizeSM,margin:0,lineHeight:`${et.itemSizeSM}px`},[`&${wt}-mini:not(${wt}-disabled)`]:{[`${wt}-prev, ${wt}-next`]:{[`&:hover ${wt}-item-link`]:{backgroundColor:et.colorBgTextHover},[`&:active ${wt}-item-link`]:{backgroundColor:et.colorBgTextActive},[`&${wt}-disabled:hover ${wt}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${wt}-mini ${wt}-prev ${wt}-item-link,
|
|
|
&${wt}-mini ${wt}-next ${wt}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`}},[`&${wt}-mini ${wt}-jump-prev, &${wt}-mini ${wt}-jump-next`]:{height:et.itemSizeSM,marginInlineEnd:0,lineHeight:`${et.itemSizeSM}px`},[`&${wt}-mini ${wt}-options`]:{marginInlineStart:et.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:et.miniOptionsSizeChangerTop},"&-quick-jumper":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Ut.x0)(et)),{width:et.paginationMiniQuickJumperInputWidth,height:et.controlHeightSM})}}}},ue=et=>{const{componentCls:wt}=et;return{[`
|
|
|
&${wt}-simple ${wt}-prev,
|
|
|
&${wt}-simple ${wt}-next
|
|
|
`]:{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`,verticalAlign:"top",[`${wt}-item-link`]:{height:et.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive},"&::after":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`}}},[`&${wt}-simple ${wt}-simple-pager`]:{display:"inline-block",height:et.itemSizeSM,marginInlineEnd:et.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:et.marginXS,padding:`0 ${et.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:et.itemInputBg,border:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`,borderRadius:et.borderRadius,outline:"none",transition:`border-color ${et.motionDurationMid}`,color:"inherit","&:hover":{borderColor:et.colorPrimary},"&:focus":{borderColor:et.colorPrimaryHover,boxShadow:`${et.inputOutlineOffset}px 0 ${et.controlOutlineWidth}px ${et.controlOutline}`},"&[disabled]":{color:et.colorTextDisabled,backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,cursor:"not-allowed"}}}}},pe=et=>{const{componentCls:wt}=et;return{[`${wt}-jump-prev, ${wt}-jump-next`]:{outline:0,[`${wt}-item-container`]:{position:"relative",[`${wt}-item-link-icon`]:{color:et.colorPrimary,fontSize:et.fontSizeSM,opacity:0,transition:`all ${et.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${wt}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:et.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:et.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:et.paginationEllipsisTextIndent,opacity:1,transition:`all ${et.motionDurationMid}`}},"&:hover":{[`${wt}-item-link-icon`]:{opacity:1},[`${wt}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${wt}-prev,
|
|
|
${wt}-jump-prev,
|
|
|
${wt}-jump-next
|
|
|
`]:{marginInlineEnd:et.marginXS},[`
|
|
|
${wt}-prev,
|
|
|
${wt}-next,
|
|
|
${wt}-jump-prev,
|
|
|
${wt}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:et.itemSize,height:et.itemSize,color:et.colorText,fontFamily:et.fontFamily,lineHeight:`${et.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:et.borderRadius,cursor:"pointer",transition:`all ${et.motionDurationMid}`},[`${wt}-prev, ${wt}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:et.colorText,cursor:"pointer",userSelect:"none"},[`${wt}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:et.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${et.lineWidth}px ${et.lineType} transparent`,borderRadius:et.borderRadius,outline:"none",transition:`all ${et.motionDurationMid}`},[`&:hover ${wt}-item-link`]:{backgroundColor:et.colorBgTextHover},[`&:active ${wt}-item-link`]:{backgroundColor:et.colorBgTextActive},[`&${wt}-disabled:hover`]:{[`${wt}-item-link`]:{backgroundColor:"transparent"}}},[`${wt}-slash`]:{marginInlineEnd:et.paginationSlashMarginInlineEnd,marginInlineStart:et.paginationSlashMarginInlineStart},[`${wt}-options`]:{display:"inline-block",marginInlineStart:et.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:et.controlHeight,marginInlineStart:et.marginXS,lineHeight:`${et.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Ut.ik)(et)),{width:et.controlHeightLG*1.25,height:et.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:et.marginXS,marginInlineEnd:et.marginXS})}}}},he=et=>{const{componentCls:wt}=et;return{[`${wt}-item`]:{display:"inline-block",minWidth:et.itemSize,height:et.itemSize,marginInlineEnd:et.marginXS,fontFamily:et.fontFamily,lineHeight:`${et.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${et.lineWidth}px ${et.lineType} transparent`,borderRadius:et.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${et.paginationItemPaddingInline}px`,color:et.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${wt}-item-active)`]:{"&:hover":{transition:`all ${et.motionDurationMid}`,backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive}},"&-active":{fontWeight:et.fontWeightStrong,backgroundColor:et.itemActiveBg,borderColor:et.colorPrimary,a:{color:et.colorPrimary},"&:hover":{borderColor:et.colorPrimaryHover},"&:hover a":{color:et.colorPrimaryHover}}}}},oe=et=>{const{componentCls:wt}=et;return{[wt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,jt.Wf)(et)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${wt}-total-text`]:{display:"inline-block",height:et.itemSize,marginInlineEnd:et.marginXS,lineHeight:`${et.itemSize-2}px`,verticalAlign:"middle"}}),he(et)),pe(et)),ue(et)),ce(et)),Ae(et)),{[`@media only screen and (max-width: ${et.screenLG}px)`]:{[`${wt}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${et.screenSM}px)`]:{[`${wt}-options`]:{display:"none"}}}),[`&${et.componentCls}-rtl`]:{direction:"rtl"}}},Ie=et=>{const{componentCls:wt}=et;return{[`${wt}${wt}-disabled:not(${wt}-mini)`]:{"&, &:hover":{[`${wt}-item-link`]:{borderColor:et.colorBorder}},"&:focus-visible":{[`${wt}-item-link`]:{borderColor:et.colorBorder}},[`${wt}-item, ${wt}-item-link`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,[`&:hover:not(${wt}-item-active)`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,a:{color:et.colorTextDisabled}},[`&${wt}-item-active`]:{backgroundColor:et.itemActiveBgDisabled}},[`${wt}-prev, ${wt}-next`]:{"&:hover button":{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,color:et.colorTextDisabled},[`${wt}-item-link`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder}}},[`${wt}:not(${wt}-mini)`]:{[`${wt}-prev, ${wt}-next`]:{"&:hover button":{borderColor:et.colorPrimaryHover,backgroundColor:et.itemBg},[`${wt}-item-link`]:{backgroundColor:et.itemLinkBg,borderColor:et.colorBorder},[`&:hover ${wt}-item-link`]:{borderColor:et.colorPrimary,backgroundColor:et.itemBg,color:et.colorPrimary},[`&${wt}-disabled`]:{[`${wt}-item-link`]:{borderColor:et.colorBorder,color:et.colorTextDisabled}}},[`${wt}-item`]:{backgroundColor:et.itemBg,border:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`,[`&:hover:not(${wt}-item-active)`]:{borderColor:et.colorPrimary,backgroundColor:et.itemBg,a:{color:et.colorPrimary}},"&-active":{borderColor:et.colorPrimary}}}}},Qe=et=>{const{componentCls:wt}=et;return{[`${wt}:not(${wt}-disabled)`]:{[`${wt}-item`]:Object.assign({},(0,jt.Qy)(et)),[`${wt}-jump-prev, ${wt}-jump-next`]:{"&:focus-visible":Object.assign({[`${wt}-item-link-icon`]:{opacity:1},[`${wt}-item-ellipsis`]:{opacity:0}},(0,jt.oN)(et))},[`${wt}-prev, ${wt}-next`]:{[`&:focus-visible ${wt}-item-link`]:Object.assign({},(0,jt.oN)(et))}}}};var Lt=(0,_n.Z)("Pagination",et=>{const wt=(0,yn.TS)(et,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:et.marginXXS/2,paginationMiniQuickJumperInputWidth:et.controlHeightLG*1.1,paginationItemPaddingInline:et.marginXXS*1.5,paginationEllipsisLetterSpacing:et.marginXXS/2,paginationSlashMarginInlineStart:et.marginXXS,paginationSlashMarginInlineEnd:et.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ut.e5)(et),(0,Ut.TM)(et));return[oe(wt),Qe(wt),et.wireframe&&Ie(wt)]},et=>({itemBg:et.colorBgContainer,itemSize:et.controlHeight,itemSizeSM:et.controlHeightSM,itemActiveBg:et.colorBgContainer,itemLinkBg:et.colorBgContainer,itemActiveColorDisabled:et.colorTextDisabled,itemActiveBgDisabled:et.controlItemBgActiveDisabled,itemInputBg:et.colorBgContainer,miniOptionsSizeChangerTop:0})),$t=function(et,wt){var Tt={};for(var Ot in et)Object.prototype.hasOwnProperty.call(et,Ot)&&wt.indexOf(Ot)<0&&(Tt[Ot]=et[Ot]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,Ot=Object.getOwnPropertySymbols(et);yt<Ot.length;yt++)wt.indexOf(Ot[yt])<0&&Object.prototype.propertyIsEnumerable.call(et,Ot[yt])&&(Tt[Ot[yt]]=et[Ot[yt]]);return Tt},en=et=>{const{prefixCls:wt,selectPrefixCls:Tt,className:Ot,rootClassName:yt,style:Dn,size:gn,locale:$n,selectComponentClass:Kr,responsive:tr,showSizeChanger:lr}=et,ur=$t(et,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:ni}=(0,tt.Z)(tr),{getPrefixCls:Xr,direction:Qr,pagination:gi={}}=Be.useContext(Sn.E_),Sr=Xr("pagination",wt),[Ei,Ui]=Lt(Sr),ea=lr!=null?lr:gi.showSizeChanger,ra=Be.useMemo(()=>{const ar=Be.createElement("span",{className:`${Sr}-item-ellipsis`},"\u2022\u2022\u2022"),Rn=Be.createElement("button",{className:`${Sr}-item-link`,type:"button",tabIndex:-1},Qr==="rtl"?Be.createElement(Te.Z,null):Be.createElement(me.Z,null)),it=Be.createElement("button",{className:`${Sr}-item-link`,type:"button",tabIndex:-1},Qr==="rtl"?Be.createElement(me.Z,null):Be.createElement(Te.Z,null)),dt=Be.createElement("a",{className:`${Sr}-item-link`},Be.createElement("div",{className:`${Sr}-item-container`},Qr==="rtl"?Be.createElement(we.Z,{className:`${Sr}-item-link-icon`}):Be.createElement(Me,{className:`${Sr}-item-link-icon`}),ar)),Bt=Be.createElement("a",{className:`${Sr}-item-link`},Be.createElement("div",{className:`${Sr}-item-container`},Qr==="rtl"?Be.createElement(Me,{className:`${Sr}-item-link-icon`}):Be.createElement(we.Z,{className:`${Sr}-item-link-icon`}),ar));return{prevIcon:Rn,nextIcon:it,jumpPrevIcon:dt,jumpNextIcon:Bt}},[Qr,Sr]),[Zi]=(0,ft.Z)("Pagination",Rt.Z),At=Object.assign(Object.assign({},Zi),$n),An=(0,un.Z)(gn),On=An==="small"||!!(ni&&!An&&tr),wn=Xr("select",Tt),kr=Oe()({[`${Sr}-mini`]:On,[`${Sr}-rtl`]:Qr==="rtl"},gi==null?void 0:gi.className,Ot,yt,Ui),or=Object.assign(Object.assign({},gi==null?void 0:gi.style),Dn);return Ei(Be.createElement(Le,Object.assign({},ra,ur,{style:or,prefixCls:Sr,selectPrefixCls:wn,className:kr,selectComponentClass:Kr||(On?Tn:mn),locale:At,showSizeChanger:ea})))},Jt=en},78045:function(bn,Zt,le){"use strict";le.d(Zt,{ZP:function(){return Ue}});var se=le(94184),Be=le.n(se),Ne=le(5663),Ye=le(1337),ve=le(67294),Se=le(53124),Me=le(98675);const we=ve.createContext(null),me=we.Provider;var Te=we;const ot=ve.createContext(null),Oe=ot.Provider;var st=le(95860),lt=le(17799),Je=le(98866),Ge=le(65223),Ce=le(14747),pt=le(67968),zt=le(45503);const qe=Le=>{const{componentCls:Rt,antCls:Sn}=Le,un=`${Rt}-group`;return{[un]:Object.assign(Object.assign({},(0,Ce.Wf)(Le)),{display:"inline-block",fontSize:0,[`&${un}-rtl`]:{direction:"rtl"},[`${Sn}-badge ${Sn}-badge-count`]:{zIndex:1},[`> ${Sn}-badge:not(:first-child) > ${Sn}-button-wrapper`]:{borderInlineStart:"none"}})}},ut=Le=>{const{componentCls:Rt,wrapperMarginInlineEnd:Sn,colorPrimary:un,radioSize:tt,motionDurationSlow:ft,motionDurationMid:Xt,motionEaseInOutCirc:Tn,colorBgContainer:mn,colorBorder:Ut,lineWidth:jt,dotSize:_n,colorBgContainerDisabled:yn,colorTextDisabled:Ae,paddingXS:ce,dotColorDisabled:ue,lineType:pe,radioDotDisabledSize:he,wireframe:oe,colorWhite:Ie}=Le,Qe=`${Rt}-inner`;return{[`${Rt}-wrapper`]:Object.assign(Object.assign({},(0,Ce.Wf)(Le)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Sn,cursor:"pointer",[`&${Rt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Le.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${Rt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${jt}px ${pe} ${un}`,borderRadius:"50%",visibility:"hidden",content:'""'},[Rt]:Object.assign(Object.assign({},(0,Ce.Wf)(Le)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Rt}-wrapper:hover &,
|
|
|
&:hover ${Qe}`]:{borderColor:un},[`${Rt}-input:focus-visible + ${Qe}`]:Object.assign({},(0,Ce.oN)(Le)),[`${Rt}:hover::after, ${Rt}-wrapper:hover &::after`]:{visibility:"visible"},[`${Rt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:tt,height:tt,marginBlockStart:tt/-2,marginInlineStart:tt/-2,backgroundColor:oe?un:Ie,borderBlockStart:0,borderInlineStart:0,borderRadius:tt,transform:"scale(0)",opacity:0,transition:`all ${ft} ${Tn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:tt,height:tt,backgroundColor:mn,borderColor:Ut,borderStyle:"solid",borderWidth:jt,borderRadius:"50%",transition:`all ${Xt}`},[`${Rt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Rt}-checked`]:{[Qe]:{borderColor:un,backgroundColor:oe?mn:un,"&::after":{transform:`scale(${_n/tt})`,opacity:1,transition:`all ${ft} ${Tn}`}}},[`${Rt}-disabled`]:{cursor:"not-allowed",[Qe]:{backgroundColor:yn,borderColor:Ut,cursor:"not-allowed","&::after":{backgroundColor:ue}},[`${Rt}-input`]:{cursor:"not-allowed"},[`${Rt}-disabled + span`]:{color:Ae,cursor:"not-allowed"},[`&${Rt}-checked`]:{[Qe]:{"&::after":{transform:`scale(${he/tt})`}}}},[`span${Rt} + *`]:{paddingInlineStart:ce,paddingInlineEnd:ce}})}},xe=Le=>{const{buttonColor:Rt,controlHeight:Sn,componentCls:un,lineWidth:tt,lineType:ft,colorBorder:Xt,motionDurationSlow:Tn,motionDurationMid:mn,buttonPaddingInline:Ut,fontSize:jt,buttonBg:_n,fontSizeLG:yn,controlHeightLG:Ae,controlHeightSM:ce,paddingXS:ue,borderRadius:pe,borderRadiusSM:he,borderRadiusLG:oe,buttonCheckedBg:Ie,buttonSolidCheckedColor:Qe,colorTextDisabled:Lt,colorBgContainerDisabled:$t,buttonCheckedBgDisabled:Kt,buttonCheckedColorDisabled:en,colorPrimary:Jt,colorPrimaryHover:et,colorPrimaryActive:wt,buttonSolidCheckedBg:Tt,buttonSolidCheckedHoverBg:Ot,buttonSolidCheckedActiveBg:yt}=Le;return{[`${un}-button-wrapper`]:{position:"relative",display:"inline-block",height:Sn,margin:0,paddingInline:Ut,paddingBlock:0,color:Rt,fontSize:jt,lineHeight:`${Sn-tt*2}px`,background:_n,border:`${tt}px ${ft} ${Xt}`,borderBlockStartWidth:tt+.02,borderInlineStartWidth:0,borderInlineEndWidth:tt,cursor:"pointer",transition:[`color ${mn}`,`background ${mn}`,`box-shadow ${mn}`].join(","),a:{color:Rt},[`> ${un}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-tt,insetInlineStart:-tt,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:tt,paddingInline:0,backgroundColor:Xt,transition:`background-color ${Tn}`,content:'""'}},"&:first-child":{borderInlineStart:`${tt}px ${ft} ${Xt}`,borderStartStartRadius:pe,borderEndStartRadius:pe},"&:last-child":{borderStartEndRadius:pe,borderEndEndRadius:pe},"&:first-child:last-child":{borderRadius:pe},[`${un}-group-large &`]:{height:Ae,fontSize:yn,lineHeight:`${Ae-tt*2}px`,"&:first-child":{borderStartStartRadius:oe,borderEndStartRadius:oe},"&:last-child":{borderStartEndRadius:oe,borderEndEndRadius:oe}},[`${un}-group-small &`]:{height:ce,paddingInline:ue-tt,paddingBlock:0,lineHeight:`${ce-tt*2}px`,"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},"&:hover":{position:"relative",color:Jt},"&:has(:focus-visible)":Object.assign({},(0,Ce.oN)(Le)),[`${un}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${un}-button-wrapper-disabled)`]:{zIndex:1,color:Jt,background:Ie,borderColor:Jt,"&::before":{backgroundColor:Jt},"&:first-child":{borderColor:Jt},"&:hover":{color:et,borderColor:et,"&::before":{backgroundColor:et}},"&:active":{color:wt,borderColor:wt,"&::before":{backgroundColor:wt}}},[`${un}-group-solid &-checked:not(${un}-button-wrapper-disabled)`]:{color:Qe,background:Tt,borderColor:Tt,"&:hover":{color:Qe,background:Ot,borderColor:Ot},"&:active":{color:Qe,background:yt,borderColor:yt}},"&-disabled":{color:Lt,backgroundColor:$t,borderColor:Xt,cursor:"not-allowed","&:first-child, &:hover":{color:Lt,backgroundColor:$t,borderColor:Xt}},[`&-disabled${un}-button-wrapper-checked`]:{color:en,backgroundColor:Kt,borderColor:Xt,boxShadow:"none"}}}},Ee=Le=>Le-4*2;var Ve=(0,pt.Z)("Radio",Le=>{const{controlOutline:Rt,controlOutlineWidth:Sn,radioSize:un}=Le,tt=`0 0 0 ${Sn}px ${Rt}`,ft=tt,Xt=Ee(un),Tn=(0,zt.TS)(Le,{radioDotDisabledSize:Xt,radioFocusShadow:tt,radioButtonFocusShadow:ft});return[qe(Tn),ut(Tn),xe(Tn)]},Le=>{const{wireframe:Rt,padding:Sn,marginXS:un,lineWidth:tt,fontSizeLG:ft,colorText:Xt,colorBgContainer:Tn,colorTextDisabled:mn,controlItemBgActiveDisabled:Ut,colorTextLightSolid:jt,colorPrimary:_n,colorPrimaryHover:yn,colorPrimaryActive:Ae}=Le,ce=4,ue=ft,pe=Rt?Ee(ue):ue-(ce+tt)*2;return{radioSize:ue,dotSize:pe,dotColorDisabled:mn,buttonSolidCheckedColor:jt,buttonSolidCheckedBg:_n,buttonSolidCheckedHoverBg:yn,buttonSolidCheckedActiveBg:Ae,buttonBg:Tn,buttonCheckedBg:Tn,buttonColor:Xt,buttonCheckedBgDisabled:Ut,buttonCheckedColorDisabled:mn,buttonPaddingInline:Sn-tt,wrapperMarginInlineEnd:un}}),Xe=le(45353),Mt=le(92429),mt=function(Le,Rt){var Sn={};for(var un in Le)Object.prototype.hasOwnProperty.call(Le,un)&&Rt.indexOf(un)<0&&(Sn[un]=Le[un]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,un=Object.getOwnPropertySymbols(Le);tt<un.length;tt++)Rt.indexOf(un[tt])<0&&Object.prototype.propertyIsEnumerable.call(Le,un[tt])&&(Sn[un[tt]]=Le[un[tt]]);return Sn};const St=(Le,Rt)=>{var Sn,un;const tt=ve.useContext(Te),ft=ve.useContext(ot),{getPrefixCls:Xt,direction:Tn,radio:mn}=ve.useContext(Se.E_),Ut=ve.useRef(null),jt=(0,lt.sQ)(Rt,Ut),{isFormItemInput:_n}=ve.useContext(Ge.aM),yn=wt=>{var Tt,Ot;(Tt=Le.onChange)===null||Tt===void 0||Tt.call(Le,wt),(Ot=tt==null?void 0:tt.onChange)===null||Ot===void 0||Ot.call(tt,wt)},{prefixCls:Ae,className:ce,rootClassName:ue,children:pe,style:he}=Le,oe=mt(Le,["prefixCls","className","rootClassName","children","style"]),Ie=Xt("radio",Ae),Qe=((tt==null?void 0:tt.optionType)||ft)==="button",Lt=Qe?`${Ie}-button`:Ie,[$t,Kt]=Ve(Ie),en=Object.assign({},oe),Jt=ve.useContext(Je.Z);tt&&(en.name=tt.name,en.onChange=yn,en.checked=Le.value===tt.value,en.disabled=(Sn=en.disabled)!==null&&Sn!==void 0?Sn:tt.disabled),en.disabled=(un=en.disabled)!==null&&un!==void 0?un:Jt;const et=Be()(`${Lt}-wrapper`,{[`${Lt}-wrapper-checked`]:en.checked,[`${Lt}-wrapper-disabled`]:en.disabled,[`${Lt}-wrapper-rtl`]:Tn==="rtl",[`${Lt}-wrapper-in-form-item`]:_n},mn==null?void 0:mn.className,ce,ue,Kt);return $t(ve.createElement(Xe.Z,{component:"Radio",disabled:en.disabled},ve.createElement("label",{className:et,style:Object.assign(Object.assign({},mn==null?void 0:mn.style),he),onMouseEnter:Le.onMouseEnter,onMouseLeave:Le.onMouseLeave},ve.createElement(st.Z,Object.assign({},en,{className:Be()(en.className,!Qe&&Mt.A),type:"radio",prefixCls:Lt,ref:jt})),pe!==void 0?ve.createElement("span",null,pe):null)))};var Pt=ve.forwardRef(St);const Et=ve.forwardRef((Le,Rt)=>{const{getPrefixCls:Sn,direction:un}=ve.useContext(Se.E_),[tt,ft]=(0,Ne.Z)(Le.defaultValue,{value:Le.value}),Xt=Tt=>{const Ot=tt,yt=Tt.target.value;"value"in Le||ft(yt);const{onChange:Dn}=Le;Dn&&yt!==Ot&&Dn(Tt)},{prefixCls:Tn,className:mn,rootClassName:Ut,options:jt,buttonStyle:_n="outline",disabled:yn,children:Ae,size:ce,style:ue,id:pe,onMouseEnter:he,onMouseLeave:oe,onFocus:Ie,onBlur:Qe}=Le,Lt=Sn("radio",Tn),$t=`${Lt}-group`,[Kt,en]=Ve(Lt);let Jt=Ae;jt&&jt.length>0&&(Jt=jt.map(Tt=>typeof Tt=="string"||typeof Tt=="number"?ve.createElement(Pt,{key:Tt.toString(),prefixCls:Lt,disabled:yn,value:Tt,checked:tt===Tt},Tt):ve.createElement(Pt,{key:`radio-group-value-options-${Tt.value}`,prefixCls:Lt,disabled:Tt.disabled||yn,value:Tt.value,checked:tt===Tt.value,title:Tt.title,style:Tt.style},Tt.label)));const et=(0,Me.Z)(ce),wt=Be()($t,`${$t}-${_n}`,{[`${$t}-${et}`]:et,[`${$t}-rtl`]:un==="rtl"},mn,Ut,en);return Kt(ve.createElement("div",Object.assign({},(0,Ye.Z)(Le,{aria:!0,data:!0}),{className:wt,style:ue,onMouseEnter:he,onMouseLeave:oe,onFocus:Ie,onBlur:Qe,id:pe,ref:Rt}),ve.createElement(me,{value:{onChange:Xt,value:tt,disabled:Le.disabled,name:Le.name,optionType:Le.optionType}},Jt)))});var Yt=ve.memo(Et),at=function(Le,Rt){var Sn={};for(var un in Le)Object.prototype.hasOwnProperty.call(Le,un)&&Rt.indexOf(un)<0&&(Sn[un]=Le[un]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,un=Object.getOwnPropertySymbols(Le);tt<un.length;tt++)Rt.indexOf(un[tt])<0&&Object.prototype.propertyIsEnumerable.call(Le,un[tt])&&(Sn[un[tt]]=Le[un[tt]]);return Sn};const Vt=(Le,Rt)=>{const{getPrefixCls:Sn}=ve.useContext(Se.E_),{prefixCls:un}=Le,tt=at(Le,["prefixCls"]),ft=Sn("radio",un);return ve.createElement(Oe,{value:"button"},ve.createElement(Pt,Object.assign({prefixCls:ft},tt,{type:"radio",ref:Rt})))};var fn=ve.forwardRef(Vt);const dn=Pt;dn.Button=fn,dn.Group=Yt,dn.__ANT_RADIO=!0;var Ue=dn},11713:function(bn,Zt,le){"use strict";le.d(Zt,{default:function(){return Er}});var se=le(94184),Be=le.n(se),Ne=le(87462),Ye=le(74902),ve=le(4942),Se=le(1413),Me=le(97685),we=le(45987),me=le(71002),Te=le(67294);function ot(He){var We=Te.useRef();We.current=He;var Nt=Te.useCallback(function(){for(var _t,ln=arguments.length,Mn=new Array(ln),En=0;En<ln;En++)Mn[En]=arguments[En];return(_t=We.current)===null||_t===void 0?void 0:_t.call.apply(_t,[We].concat(Mn))},[]);return Nt}function Oe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var st=Oe()?Te.useLayoutEffect:Te.useEffect,lt=st,Je=function(We,Nt){var _t=Te.useRef(!0);st(function(){if(!_t.current)return We()},Nt),st(function(){return _t.current=!1,function(){_t.current=!0}},[])};function Ge(He){var We=Te.useRef(!1),Nt=Te.useState(He),_t=(0,Me.Z)(Nt,2),ln=_t[0],Mn=_t[1];Te.useEffect(function(){return We.current=!1,function(){We.current=!0}},[]);function En(Zn,Nn){Nn&&We.current||Mn(Zn)}return[ln,En]}function Ce(He){return He!==void 0}function pt(He,We){var Nt=We||{},_t=Nt.defaultValue,ln=Nt.value,Mn=Nt.onChange,En=Nt.postState,Zn=Ge(function(){return Ce(ln)?ln:Ce(_t)?typeof _t=="function"?_t():_t:typeof He=="function"?He():He}),Nn=(0,Me.Z)(Zn,2),hn=Nn[0],zn=Nn[1],jn=ln!==void 0?ln:hn,hr=En?En(jn):jn,Kn=ot(Mn),Ar=Ge([jn]),ii=(0,Me.Z)(Ar,2),Fr=ii[0],qr=ii[1];Je(function(){var Rr=Fr[0];hn!==Rr&&Kn(hn,Rr)},[Fr]),Je(function(){Ce(ln)||zn(ln)},[ln]);var Ir=ot(function(Rr,li){zn(Rr,li),qr([jn],li)});return[hr,Ir]}var zt={};function qe(He,We){}function ut(He,We){}function xe(){zt={}}function Ee(He,We,Nt){!We&&!zt[Nt]&&(He(!1,Nt),zt[Nt]=!0)}function Ve(He,We){Ee(qe,He,We)}function Xe(He,We){Ee(ut,He,We)}var Mt=Ve,mt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var He=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(He)||/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(He==null?void 0:He.substr(0,4))},St={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(We){var Nt=We.keyCode;if(We.altKey&&!We.ctrlKey||We.metaKey||Nt>=St.F1&&Nt<=St.F12)return!1;switch(Nt){case St.ALT:case St.CAPS_LOCK:case St.CONTEXT_MENU:case St.CTRL:case St.DOWN:case St.END:case St.ESC:case St.HOME:case St.INSERT:case St.LEFT:case St.MAC_FF_META:case St.META:case St.NUMLOCK:case St.NUM_CENTER:case St.PAGE_DOWN:case St.PAGE_UP:case St.PAUSE:case St.PRINT_SCREEN:case St.RIGHT:case St.SHIFT:case St.UP:case St.WIN_KEY:case St.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(We){if(We>=St.ZERO&&We<=St.NINE||We>=St.NUM_ZERO&&We<=St.NUM_MULTIPLY||We>=St.A&&We<=St.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&We===0)return!0;switch(We){case St.SPACE:case St.QUESTION_MARK:case St.NUM_PLUS:case St.NUM_MINUS:case St.NUM_PERIOD:case St.NUM_DIVISION:case St.SEMICOLON:case St.DASH:case St.EQUALS:case St.COMMA:case St.PERIOD:case St.SLASH:case St.APOSTROPHE:case St.SINGLE_QUOTE:case St.OPEN_SQUARE_BRACKET:case St.BACKSLASH:case St.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ke=St,Pt=le(47655);function Et(He,We,Nt){var _t=Te.useRef({});return(!("value"in _t.current)||Nt(_t.current.condition,We))&&(_t.current.value=He(),_t.current.condition=We),_t.current.value}function Yt(He,We){typeof He=="function"?He(We):(0,me.Z)(He)==="object"&&He&&"current"in He&&(He.current=We)}function at(){for(var He=arguments.length,We=new Array(He),Nt=0;Nt<He;Nt++)We[Nt]=arguments[Nt];var _t=We.filter(function(ln){return ln});return _t.length<=1?_t[0]:function(ln){We.forEach(function(Mn){Yt(Mn,ln)})}}function Vt(){for(var He=arguments.length,We=new Array(He),Nt=0;Nt<He;Nt++)We[Nt]=arguments[Nt];return Et(function(){return at.apply(void 0,We)},We,function(_t,ln){return _t.length===ln.length&&_t.every(function(Mn,En){return Mn===ln[En]})})}function fn(He){var We,Nt,_t=isMemo(He)?He.type.type:He.type;return!(typeof _t=="function"&&!((We=_t.prototype)!==null&&We!==void 0&&We.render)||typeof He=="function"&&!((Nt=He.prototype)!==null&&Nt!==void 0&&Nt.render))}var dn=function(We){var Nt=We.className,_t=We.customizeIcon,ln=We.customizeIconProps,Mn=We.onMouseDown,En=We.onClick,Zn=We.children,Nn;return typeof _t=="function"?Nn=_t(ln):Nn=_t,Te.createElement("span",{className:Nt,onMouseDown:function(zn){zn.preventDefault(),Mn&&Mn(zn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:En,"aria-hidden":!0},Nn!==void 0?Nn:Te.createElement("span",{className:Be()(Nt.split(/\s+/).map(function(hn){return"".concat(hn,"-icon")}))},Zn))},Ue=dn;function Le(He,We,Nt,_t,ln){var Mn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,En=arguments.length>6?arguments[6]:void 0,Zn=arguments.length>7?arguments[7]:void 0,Nn=Te.useMemo(function(){if((0,me.Z)(_t)==="object")return _t.clearIcon;if(ln)return ln},[_t,ln]),hn=Te.useMemo(function(){return!!(!Mn&&_t&&(Nt.length||En)&&!(Zn==="combobox"&&En===""))},[_t,Mn,Nt.length,En,Zn]);return{allowClear:hn,clearIcon:Te.createElement(Ue,{className:"".concat(He,"-clear"),onMouseDown:We,customizeIcon:Nn},"\xD7")}}var Rt=Te.createContext(null);function Sn(){return Te.useContext(Rt)}function un(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,We=Te.useState(!1),Nt=(0,Me.Z)(We,2),_t=Nt[0],ln=Nt[1],Mn=Te.useRef(null),En=function(){window.clearTimeout(Mn.current)};Te.useEffect(function(){return En},[]);var Zn=function(hn,zn){En(),Mn.current=window.setTimeout(function(){ln(hn),zn&&zn()},He)};return[_t,Zn,En]}function tt(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,We=Te.useRef(null),Nt=Te.useRef(null);Te.useEffect(function(){return function(){window.clearTimeout(Nt.current)}},[]);function _t(ln){(ln||We.current===null)&&(We.current=ln),window.clearTimeout(Nt.current),Nt.current=window.setTimeout(function(){We.current=null},He)}return[function(){return We.current},_t]}function ft(He,We,Nt,_t){var ln=Te.useRef(null);ln.current={open:We,triggerOpen:Nt,customizedTrigger:_t},Te.useEffect(function(){function Mn(En){var Zn;if(!((Zn=ln.current)!==null&&Zn!==void 0&&Zn.customizedTrigger)){var Nn=En.target;Nn.shadowRoot&&En.composed&&(Nn=En.composedPath()[0]||Nn),ln.current.open&&He().filter(function(hn){return hn}).every(function(hn){return!hn.contains(Nn)&&hn!==Nn})&&ln.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Mn),function(){return window.removeEventListener("mousedown",Mn)}},[])}var Xt=`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`,Tn=`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`,mn="".concat(Xt," ").concat(Tn).split(/[\s\n]+/),Ut="aria-",jt="data-";function _n(He,We){return He.indexOf(We)===0}function yn(He){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt;We===!1?Nt={aria:!0,data:!0,attr:!0}:We===!0?Nt={aria:!0}:Nt=(0,Se.Z)({},We);var _t={};return Object.keys(He).forEach(function(ln){(Nt.aria&&(ln==="role"||_n(ln,Ut))||Nt.data&&_n(ln,jt)||Nt.attr&&mn.includes(ln))&&(_t[ln]=He[ln])}),_t}var Ae=le(48555),ce=le(14075),ue=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],pe=void 0;function he(He,We){var Nt=He.prefixCls,_t=He.invalidate,ln=He.item,Mn=He.renderItem,En=He.responsive,Zn=He.responsiveDisabled,Nn=He.registerSize,hn=He.itemKey,zn=He.className,jn=He.style,hr=He.children,Kn=He.display,Ar=He.order,ii=He.component,Fr=ii===void 0?"div":ii,qr=(0,we.Z)(He,ue),Ir=En&&!Kn;function Rr(mi){Nn(hn,mi)}Te.useEffect(function(){return function(){Rr(null)}},[]);var li=Mn&&ln!==pe?Mn(ln):hr,pi;_t||(pi={opacity:Ir?0:1,height:Ir?0:pe,overflowY:Ir?"hidden":pe,order:En?Ar:pe,pointerEvents:Ir?"none":pe,position:Ir?"absolute":pe});var zr={};Ir&&(zr["aria-hidden"]=!0);var Or=Te.createElement(Fr,(0,Ne.Z)({className:Be()(!_t&&Nt,zn),style:(0,Se.Z)((0,Se.Z)({},pi),jn)},zr,qr,{ref:We}),li);return En&&(Or=Te.createElement(Ae.Z,{onResize:function(Yi){var Xi=Yi.offsetWidth;Rr(Xi)},disabled:Zn},Or)),Or}var oe=Te.forwardRef(he);oe.displayName="Item";var Ie=oe,Qe=le(77527),Lt=le(73935),$t=le(96523);function Kt(He){if(typeof MessageChannel=="undefined")(0,$t.Z)(He);else{var We=new MessageChannel;We.port1.onmessage=function(){return He()},We.port2.postMessage(void 0)}}function en(){var He=Te.useRef(null),We=function(_t){He.current||(He.current=[],Kt(function(){(0,Lt.unstable_batchedUpdates)(function(){He.current.forEach(function(ln){ln()}),He.current=null})})),He.current.push(_t)};return We}function Jt(He,We){var Nt=Te.useState(We),_t=(0,Me.Z)(Nt,2),ln=_t[0],Mn=_t[1],En=(0,Qe.Z)(function(Zn){He(function(){Mn(Zn)})});return[ln,En]}var et=Te.createContext(null),wt=["component"],Tt=["className"],Ot=["className"],yt=function(We,Nt){var _t=Te.useContext(et);if(!_t){var ln=We.component,Mn=ln===void 0?"div":ln,En=(0,we.Z)(We,wt);return Te.createElement(Mn,(0,Ne.Z)({},En,{ref:Nt}))}var Zn=_t.className,Nn=(0,we.Z)(_t,Tt),hn=We.className,zn=(0,we.Z)(We,Ot);return Te.createElement(et.Provider,{value:null},Te.createElement(Ie,(0,Ne.Z)({ref:Nt,className:Be()(Zn,hn)},Nn,zn)))},Dn=Te.forwardRef(yt);Dn.displayName="RawItem";var gn=Dn,$n=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Kr="responsive",tr="invalidate";function lr(He){return"+ ".concat(He.length," ...")}function ur(He,We){var Nt=He.prefixCls,_t=Nt===void 0?"rc-overflow":Nt,ln=He.data,Mn=ln===void 0?[]:ln,En=He.renderItem,Zn=He.renderRawItem,Nn=He.itemKey,hn=He.itemWidth,zn=hn===void 0?10:hn,jn=He.ssr,hr=He.style,Kn=He.className,Ar=He.maxCount,ii=He.renderRest,Fr=He.renderRawRest,qr=He.suffix,Ir=He.component,Rr=Ir===void 0?"div":Ir,li=He.itemComponent,pi=He.onVisibleChange,zr=(0,we.Z)(He,$n),Or=jn==="full",mi=en(),Yi=Jt(mi,null),Xi=(0,Me.Z)(Yi,2),Pi=Xi[0],Ji=Xi[1],ta=Pi||0,_i=Jt(mi,new Map),Hi=(0,Me.Z)(_i,2),ui=Hi[0],xi=Hi[1],Ni=Jt(mi,0),Qi=(0,Me.Z)(Ni,2),Ra=Qi[0],$a=Qi[1],Aa=Jt(mi,0),ua=(0,Me.Z)(Aa,2),na=ua[0],Di=ua[1],Ba=Jt(mi,0),Bi=(0,Me.Z)(Ba,2),ci=Bi[0],ji=Bi[1],ca=(0,Te.useState)(null),qi=(0,Me.Z)(ca,2),oa=qi[0],wi=qi[1],pa=(0,Te.useState)(null),xa=(0,Me.Z)(pa,2),fa=xa[0],Sa=xa[1],Ma=Te.useMemo(function(){return fa===null&&Or?Number.MAX_SAFE_INTEGER:fa||0},[fa,Pi]),Va=(0,Te.useState)(!1),ha=(0,Me.Z)(Va,2),_a=ha[0],Ja=ha[1],Ga="".concat(_t,"-item"),so=Math.max(Ra,na),Fa=Ar===Kr,Ca=Mn.length&&Fa,Oi=Ar===tr,Vi=Ca||typeof Ar=="number"&&Mn.length>Ar,da=(0,Te.useMemo)(function(){var sa=Mn;return Ca?Pi===null&&Or?sa=Mn:sa=Mn.slice(0,Math.min(Mn.length,ta/zn)):typeof Ar=="number"&&(sa=Mn.slice(0,Ar)),sa},[Mn,zn,Pi,Ar,Ca]),wa=(0,Te.useMemo)(function(){return Ca?Mn.slice(Ma+1):Mn.slice(da.length)},[Mn,da,Ca,Ma]),Ka=(0,Te.useCallback)(function(sa,Hr){var ki;return typeof Nn=="function"?Nn(sa):(ki=Nn&&(sa==null?void 0:sa[Nn]))!==null&&ki!==void 0?ki:Hr},[Nn]),io=(0,Te.useCallback)(En||function(sa){return sa},[En]);function ho(sa,Hr,ki){fa===sa&&(Hr===void 0||Hr===oa)||(Sa(sa),ki||(Ja(sa<Mn.length-1),pi==null||pi(sa)),Hr!==void 0&&wi(Hr))}function Bo(sa,Hr){Ji(Hr.clientWidth)}function Oo(sa,Hr){xi(function(ki){var Li=new Map(ki);return Hr===null?Li.delete(sa):Li.set(sa,Hr),Li})}function lo(sa,Hr){Di(Hr),$a(na)}function Ao(sa,Hr){ji(Hr)}function ia(sa){return ui.get(Ka(da[sa],sa))}(0,ce.Z)(function(){if(ta&&typeof so=="number"&&da){var sa=ci,Hr=da.length,ki=Hr-1;if(!Hr){ho(0,null);return}for(var Li=0;Li<Hr;Li+=1){var Ri=ia(Li);if(Or&&(Ri=Ri||0),Ri===void 0){ho(Li-1,void 0,!0);break}if(sa+=Ri,ki===0&&sa<=ta||Li===ki-1&&sa+ia(ki)<=ta){ho(ki,null);break}else if(sa+so>ta){ho(Li-1,sa-Ri-ci+na);break}}qr&&ia(0)+ci>ta&&wi(null)}},[ta,ui,na,ci,Ka,da]);var Fi=_a&&!!wa.length,Ta={};oa!==null&&Ca&&(Ta={position:"absolute",left:oa,top:0});var ka={prefixCls:Ga,responsive:Ca,component:li,invalidate:Oi},uo=Zn?function(sa,Hr){var ki=Ka(sa,Hr);return Te.createElement(et.Provider,{key:ki,value:(0,Se.Z)((0,Se.Z)({},ka),{},{order:Hr,item:sa,itemKey:ki,registerSize:Oo,display:Hr<=Ma})},Zn(sa,Hr))}:function(sa,Hr){var ki=Ka(sa,Hr);return Te.createElement(Ie,(0,Ne.Z)({},ka,{order:Hr,key:ki,item:sa,renderItem:io,itemKey:ki,registerSize:Oo,display:Hr<=Ma}))},ao,hs={order:Fi?Ma:Number.MAX_SAFE_INTEGER,className:"".concat(Ga,"-rest"),registerSize:lo,display:Fi};if(Fr)Fr&&(ao=Te.createElement(et.Provider,{value:(0,Se.Z)((0,Se.Z)({},ka),hs)},Fr(wa)));else{var Qo=ii||lr;ao=Te.createElement(Ie,(0,Ne.Z)({},ka,hs),typeof Qo=="function"?Qo(wa):Qo)}var ps=Te.createElement(Rr,(0,Ne.Z)({className:Be()(!Oi&&_t,Kn),style:hr,ref:We},zr),da.map(uo),Vi?ao:null,qr&&Te.createElement(Ie,(0,Ne.Z)({},ka,{responsive:Fa,responsiveDisabled:!Ca,order:Ma,className:"".concat(Ga,"-suffix"),registerSize:Ao,display:!0,style:Ta}),qr));return Fa&&(ps=Te.createElement(Ae.Z,{onResize:Bo,disabled:!Ca},ps)),ps}var ni=Te.forwardRef(ur);ni.displayName="Overflow",ni.Item=gn,ni.RESPONSIVE=Kr,ni.INVALIDATE=tr;var Xr=ni,Qr=Xr,gi=function(We,Nt){var _t,ln,Mn=We.prefixCls,En=We.id,Zn=We.inputElement,Nn=We.disabled,hn=We.tabIndex,zn=We.autoFocus,jn=We.autoComplete,hr=We.editable,Kn=We.activeDescendantId,Ar=We.value,ii=We.maxLength,Fr=We.onKeyDown,qr=We.onMouseDown,Ir=We.onChange,Rr=We.onPaste,li=We.onCompositionStart,pi=We.onCompositionEnd,zr=We.open,Or=We.attrs,mi=Zn||Te.createElement("input",null),Yi=mi,Xi=Yi.ref,Pi=Yi.props,Ji=Pi.onKeyDown,ta=Pi.onChange,_i=Pi.onMouseDown,Hi=Pi.onCompositionStart,ui=Pi.onCompositionEnd,xi=Pi.style;return"maxLength"in mi.props,mi=Te.cloneElement(mi,(0,Se.Z)((0,Se.Z)((0,Se.Z)({type:"search"},Pi),{},{id:En,ref:at(Nt,Xi),disabled:Nn,tabIndex:hn,autoComplete:jn||"off",autoFocus:zn,className:Be()("".concat(Mn,"-selection-search-input"),(_t=mi)===null||_t===void 0||(ln=_t.props)===null||ln===void 0?void 0:ln.className),role:"combobox","aria-label":"Search","aria-expanded":zr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(En,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(En,"_list"),"aria-activedescendant":zr?Kn:void 0},Or),{},{value:hr?Ar:"",maxLength:ii,readOnly:!hr,unselectable:hr?null:"on",style:(0,Se.Z)((0,Se.Z)({},xi),{},{opacity:hr?null:0}),onKeyDown:function(Qi){Fr(Qi),Ji&&Ji(Qi)},onMouseDown:function(Qi){qr(Qi),_i&&_i(Qi)},onChange:function(Qi){Ir(Qi),ta&&ta(Qi)},onCompositionStart:function(Qi){li(Qi),Hi&&Hi(Qi)},onCompositionEnd:function(Qi){pi(Qi),ui&&ui(Qi)},onPaste:Rr})),mi},Sr=Te.forwardRef(gi);Sr.displayName="Input";var Ei=Sr;function Ui(He){return Array.isArray(He)?He:He!==void 0?[He]:[]}var ea=typeof window!="undefined"&&window.document&&window.document.documentElement,ra=ea;function Zi(He){return He!=null}function At(He){return!He&&He!==0}function An(He){return["string","number"].includes((0,me.Z)(He))}function On(He){var We=void 0;return He&&(An(He.title)?We=He.title.toString():An(He.label)&&(We=He.label.toString())),We}function wn(He,We){ra?Te.useLayoutEffect(He,We):Te.useEffect(He,We)}function kr(He){var We;return(We=He.key)!==null&&We!==void 0?We:He.value}var or=function(We){We.preventDefault(),We.stopPropagation()},ar=function(We){var Nt=We.id,_t=We.prefixCls,ln=We.values,Mn=We.open,En=We.searchValue,Zn=We.autoClearSearchValue,Nn=We.inputRef,hn=We.placeholder,zn=We.disabled,jn=We.mode,hr=We.showSearch,Kn=We.autoFocus,Ar=We.autoComplete,ii=We.activeDescendantId,Fr=We.tabIndex,qr=We.removeIcon,Ir=We.maxTagCount,Rr=We.maxTagTextLength,li=We.maxTagPlaceholder,pi=li===void 0?function(wi){return"+ ".concat(wi.length," ...")}:li,zr=We.tagRender,Or=We.onToggleOpen,mi=We.onRemove,Yi=We.onInputChange,Xi=We.onInputPaste,Pi=We.onInputKeyDown,Ji=We.onInputMouseDown,ta=We.onInputCompositionStart,_i=We.onInputCompositionEnd,Hi=Te.useRef(null),ui=(0,Te.useState)(0),xi=(0,Me.Z)(ui,2),Ni=xi[0],Qi=xi[1],Ra=(0,Te.useState)(!1),$a=(0,Me.Z)(Ra,2),Aa=$a[0],ua=$a[1],na="".concat(_t,"-selection"),Di=Mn||jn==="multiple"&&Zn===!1||jn==="tags"?En:"",Ba=jn==="tags"||jn==="multiple"&&Zn===!1||hr&&(Mn||Aa);wn(function(){Qi(Hi.current.scrollWidth)},[Di]);function Bi(wi,pa,xa,fa,Sa){return Te.createElement("span",{className:Be()("".concat(na,"-item"),(0,ve.Z)({},"".concat(na,"-item-disabled"),xa)),title:On(wi)},Te.createElement("span",{className:"".concat(na,"-item-content")},pa),fa&&Te.createElement(Ue,{className:"".concat(na,"-item-remove"),onMouseDown:or,onClick:Sa,customizeIcon:qr},"\xD7"))}function ci(wi,pa,xa,fa,Sa){var Ma=function(ha){or(ha),Or(!Mn)};return Te.createElement("span",{onMouseDown:Ma},zr({label:pa,value:wi,disabled:xa,closable:fa,onClose:Sa}))}function ji(wi){var pa=wi.disabled,xa=wi.label,fa=wi.value,Sa=!zn&&!pa,Ma=xa;if(typeof Rr=="number"&&(typeof xa=="string"||typeof xa=="number")){var Va=String(Ma);Va.length>Rr&&(Ma="".concat(Va.slice(0,Rr),"..."))}var ha=function(Ja){Ja&&Ja.stopPropagation(),mi(wi)};return typeof zr=="function"?ci(fa,Ma,pa,Sa,ha):Bi(wi,Ma,pa,Sa,ha)}function ca(wi){var pa=typeof pi=="function"?pi(wi):pi;return Bi({title:pa},pa,!1)}var qi=Te.createElement("div",{className:"".concat(na,"-search"),style:{width:Ni},onFocus:function(){ua(!0)},onBlur:function(){ua(!1)}},Te.createElement(Ei,{ref:Nn,open:Mn,prefixCls:_t,id:Nt,inputElement:null,disabled:zn,autoFocus:Kn,autoComplete:Ar,editable:Ba,activeDescendantId:ii,value:Di,onKeyDown:Pi,onMouseDown:Ji,onChange:Yi,onPaste:Xi,onCompositionStart:ta,onCompositionEnd:_i,tabIndex:Fr,attrs:yn(We,!0)}),Te.createElement("span",{ref:Hi,className:"".concat(na,"-search-mirror"),"aria-hidden":!0},Di,"\xA0")),oa=Te.createElement(Qr,{prefixCls:"".concat(na,"-overflow"),data:ln,renderItem:ji,renderRest:ca,suffix:qi,itemKey:kr,maxCount:Ir});return Te.createElement(Te.Fragment,null,oa,!ln.length&&!Di&&Te.createElement("span",{className:"".concat(na,"-placeholder")},hn))},Rn=ar,it=function(We){var Nt=We.inputElement,_t=We.prefixCls,ln=We.id,Mn=We.inputRef,En=We.disabled,Zn=We.autoFocus,Nn=We.autoComplete,hn=We.activeDescendantId,zn=We.mode,jn=We.open,hr=We.values,Kn=We.placeholder,Ar=We.tabIndex,ii=We.showSearch,Fr=We.searchValue,qr=We.activeValue,Ir=We.maxLength,Rr=We.onInputKeyDown,li=We.onInputMouseDown,pi=We.onInputChange,zr=We.onInputPaste,Or=We.onInputCompositionStart,mi=We.onInputCompositionEnd,Yi=We.title,Xi=Te.useState(!1),Pi=(0,Me.Z)(Xi,2),Ji=Pi[0],ta=Pi[1],_i=zn==="combobox",Hi=_i||ii,ui=hr[0],xi=Fr||"";_i&&qr&&!Ji&&(xi=qr),Te.useEffect(function(){_i&&ta(!1)},[_i,qr]);var Ni=zn!=="combobox"&&!jn&&!ii?!1:!!xi,Qi=Yi===void 0?On(ui):Yi,Ra=function(){if(ui)return null;var Aa=Ni?{visibility:"hidden"}:void 0;return Te.createElement("span",{className:"".concat(_t,"-selection-placeholder"),style:Aa},Kn)};return Te.createElement(Te.Fragment,null,Te.createElement("span",{className:"".concat(_t,"-selection-search")},Te.createElement(Ei,{ref:Mn,prefixCls:_t,id:ln,open:jn,inputElement:Nt,disabled:En,autoFocus:Zn,autoComplete:Nn,editable:Hi,activeDescendantId:hn,value:xi,onKeyDown:Rr,onMouseDown:li,onChange:function(Aa){ta(!0),pi(Aa)},onPaste:zr,onCompositionStart:Or,onCompositionEnd:mi,tabIndex:Ar,attrs:yn(We,!0),maxLength:_i?Ir:void 0})),!_i&&ui?Te.createElement("span",{className:"".concat(_t,"-selection-item"),title:Qi,style:Ni?{visibility:"hidden"}:void 0},ui.label):null,Ra())},dt=it;function Bt(He){return![Ke.ESC,Ke.SHIFT,Ke.BACKSPACE,Ke.TAB,Ke.WIN_KEY,Ke.ALT,Ke.META,Ke.WIN_KEY_RIGHT,Ke.CTRL,Ke.SEMICOLON,Ke.EQUALS,Ke.CAPS_LOCK,Ke.CONTEXT_MENU,Ke.F1,Ke.F2,Ke.F3,Ke.F4,Ke.F5,Ke.F6,Ke.F7,Ke.F8,Ke.F9,Ke.F10,Ke.F11,Ke.F12].includes(He)}var qt=function(We,Nt){var _t=(0,Te.useRef)(null),ln=(0,Te.useRef)(!1),Mn=We.prefixCls,En=We.open,Zn=We.mode,Nn=We.showSearch,hn=We.tokenWithEnter,zn=We.autoClearSearchValue,jn=We.onSearch,hr=We.onSearchSubmit,Kn=We.onToggleOpen,Ar=We.onInputKeyDown,ii=We.domRef;Te.useImperativeHandle(Nt,function(){return{focus:function(){_t.current.focus()},blur:function(){_t.current.blur()}}});var Fr=tt(0),qr=(0,Me.Z)(Fr,2),Ir=qr[0],Rr=qr[1],li=function(xi){var Ni=xi.which;(Ni===Ke.UP||Ni===Ke.DOWN)&&xi.preventDefault(),Ar&&Ar(xi),Ni===Ke.ENTER&&Zn==="tags"&&!ln.current&&!En&&(hr==null||hr(xi.target.value)),Bt(Ni)&&Kn(!0)},pi=function(){Rr(!0)},zr=(0,Te.useRef)(null),Or=function(xi){jn(xi,!0,ln.current)!==!1&&Kn(!0)},mi=function(){ln.current=!0},Yi=function(xi){ln.current=!1,Zn!=="combobox"&&Or(xi.target.value)},Xi=function(xi){var Ni=xi.target.value;if(hn&&zr.current&&/[\r\n]/.test(zr.current)){var Qi=zr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ni=Ni.replace(Qi,zr.current)}zr.current=null,Or(Ni)},Pi=function(xi){var Ni=xi.clipboardData,Qi=Ni.getData("text");zr.current=Qi},Ji=function(xi){var Ni=xi.target;if(Ni!==_t.current){var Qi=document.body.style.msTouchAction!==void 0;Qi?setTimeout(function(){_t.current.focus()}):_t.current.focus()}},ta=function(xi){var Ni=Ir();xi.target!==_t.current&&!Ni&&Zn!=="combobox"&&xi.preventDefault(),(Zn!=="combobox"&&(!Nn||!Ni)||!En)&&(En&&zn!==!1&&jn("",!0,!1),Kn())},_i={inputRef:_t,onInputKeyDown:li,onInputMouseDown:pi,onInputChange:Xi,onInputPaste:Pi,onInputCompositionStart:mi,onInputCompositionEnd:Yi},Hi=Zn==="multiple"||Zn==="tags"?Te.createElement(Rn,(0,Ne.Z)({},We,_i)):Te.createElement(dt,(0,Ne.Z)({},We,_i));return Te.createElement("div",{ref:ii,className:"".concat(Mn,"-selector"),onClick:Ji,onMouseDown:ta},Hi)},je=Te.forwardRef(qt);je.displayName="Selector";var Ct=je,Wt=le(62709),Ft=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],an=function(We){var Nt=We===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"}}},rn=function(We,Nt){var _t=We.prefixCls,ln=We.disabled,Mn=We.visible,En=We.children,Zn=We.popupElement,Nn=We.animation,hn=We.transitionName,zn=We.dropdownStyle,jn=We.dropdownClassName,hr=We.direction,Kn=hr===void 0?"ltr":hr,Ar=We.placement,ii=We.builtinPlacements,Fr=We.dropdownMatchSelectWidth,qr=We.dropdownRender,Ir=We.dropdownAlign,Rr=We.getPopupContainer,li=We.empty,pi=We.getTriggerDOMNode,zr=We.onPopupVisibleChange,Or=We.onPopupMouseEnter,mi=(0,we.Z)(We,Ft),Yi="".concat(_t,"-dropdown"),Xi=Zn;qr&&(Xi=qr(Zn));var Pi=Te.useMemo(function(){return ii||an(Fr)},[ii,Fr]),Ji=Nn?"".concat(Yi,"-").concat(Nn):hn,ta=typeof Fr=="number",_i=Te.useMemo(function(){return ta?null:Fr===!1?"minWidth":"width"},[Fr,ta]),Hi=zn;ta&&(Hi=(0,Se.Z)((0,Se.Z)({},Hi),{},{width:Fr}));var ui=Te.useRef(null);return Te.useImperativeHandle(Nt,function(){return{getPopupElement:function(){return ui.current}}}),Te.createElement(Wt.Z,(0,Ne.Z)({},mi,{showAction:zr?["click"]:[],hideAction:zr?["click"]:[],popupPlacement:Ar||(Kn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Pi,prefixCls:Yi,popupTransitionName:Ji,popup:Te.createElement("div",{ref:ui,onMouseEnter:Or},Xi),stretch:_i,popupAlign:Ir,popupVisible:Mn,getPopupContainer:Rr,popupClassName:Be()(jn,(0,ve.Z)({},"".concat(Yi,"-empty"),li)),popupStyle:Hi,getTriggerDOMNode:pi,onPopupVisibleChange:zr}),En)},Vn=Te.forwardRef(rn);Vn.displayName="SelectTrigger";var Pr=Vn,nr=le(84506);function Xn(He,We){var Nt=He.key,_t;return"value"in He&&(_t=He.value),Nt!=null?Nt:_t!==void 0?_t:"rc-index-key-".concat(We)}function mr(He,We){var Nt=He||{},_t=Nt.label,ln=Nt.value,Mn=Nt.options,En=Nt.groupLabel,Zn=_t||(We?"children":"label");return{label:Zn,value:ln||"value",options:Mn||"options",groupLabel:En||Zn}}function fr(He){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nt=We.fieldNames,_t=We.childrenAsData,ln=[],Mn=mr(Nt,!1),En=Mn.label,Zn=Mn.value,Nn=Mn.options,hn=Mn.groupLabel;function zn(jn,hr){jn.forEach(function(Kn){if(hr||!(Nn in Kn)){var Ar=Kn[Zn];ln.push({key:Xn(Kn,ln.length),groupOption:hr,data:Kn,label:Kn[En],value:Ar})}else{var ii=Kn[hn];ii===void 0&&_t&&(ii=Kn.label),ln.push({key:Xn(Kn,ln.length),group:!0,data:Kn,label:ii}),zn(Kn[Nn],!0)}})}return zn(He,!1),ln}function Yr(He){var We=(0,Se.Z)({},He);return"props"in We||Object.defineProperty(We,"props",{get:function(){return Mt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),We}}),We}function xn(He,We){if(!We||!We.length)return null;var Nt=!1;function _t(Mn,En){var Zn=(0,nr.Z)(En),Nn=Zn[0],hn=Zn.slice(1);if(!Nn)return[Mn];var zn=Mn.split(Nn);return Nt=Nt||zn.length>1,zn.reduce(function(jn,hr){return[].concat((0,Ye.Z)(jn),(0,Ye.Z)(_t(hr,hn)))},[]).filter(function(jn){return jn})}var ln=_t(He,We);return Nt?ln:null}var qn=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Si=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Ii(He){return He==="tags"||He==="multiple"}var di=Te.forwardRef(function(He,We){var Nt,_t,ln=He.id,Mn=He.prefixCls,En=He.className,Zn=He.showSearch,Nn=He.tagRender,hn=He.direction,zn=He.omitDomProps,jn=He.displayValues,hr=He.onDisplayValuesChange,Kn=He.emptyOptions,Ar=He.notFoundContent,ii=Ar===void 0?"Not Found":Ar,Fr=He.onClear,qr=He.mode,Ir=He.disabled,Rr=He.loading,li=He.getInputElement,pi=He.getRawInputElement,zr=He.open,Or=He.defaultOpen,mi=He.onDropdownVisibleChange,Yi=He.activeValue,Xi=He.onActiveValueChange,Pi=He.activeDescendantId,Ji=He.searchValue,ta=He.autoClearSearchValue,_i=He.onSearch,Hi=He.onSearchSplit,ui=He.tokenSeparators,xi=He.allowClear,Ni=He.suffixIcon,Qi=He.clearIcon,Ra=He.OptionList,$a=He.animation,Aa=He.transitionName,ua=He.dropdownStyle,na=He.dropdownClassName,Di=He.dropdownMatchSelectWidth,Ba=He.dropdownRender,Bi=He.dropdownAlign,ci=He.placement,ji=He.builtinPlacements,ca=He.getPopupContainer,qi=He.showAction,oa=qi===void 0?[]:qi,wi=He.onFocus,pa=He.onBlur,xa=He.onKeyUp,fa=He.onKeyDown,Sa=He.onMouseDown,Ma=(0,we.Z)(He,qn),Va=Ii(qr),ha=(Zn!==void 0?Zn:Va)||qr==="combobox",_a=(0,Se.Z)({},Ma);Si.forEach(function(Da){delete _a[Da]}),zn==null||zn.forEach(function(Da){delete _a[Da]});var Ja=Te.useState(!1),Ga=(0,Me.Z)(Ja,2),so=Ga[0],Fa=Ga[1];Te.useEffect(function(){Fa(mt())},[]);var Ca=Te.useRef(null),Oi=Te.useRef(null),Vi=Te.useRef(null),da=Te.useRef(null),wa=Te.useRef(null),Ka=un(),io=(0,Me.Z)(Ka,3),ho=io[0],Bo=io[1],Oo=io[2];Te.useImperativeHandle(We,function(){var Da,ma;return{focus:(Da=da.current)===null||Da===void 0?void 0:Da.focus,blur:(ma=da.current)===null||ma===void 0?void 0:ma.blur,scrollTo:function(es){var ga;return(ga=wa.current)===null||ga===void 0?void 0:ga.scrollTo(es)}}});var lo=Te.useMemo(function(){var Da;if(qr!=="combobox")return Ji;var ma=(Da=jn[0])===null||Da===void 0?void 0:Da.value;return typeof ma=="string"||typeof ma=="number"?String(ma):""},[Ji,qr,jn]),Ao=qr==="combobox"&&typeof li=="function"&&li()||null,ia=typeof pi=="function"&&pi(),Fi=Vt(Oi,ia==null||(Nt=ia.props)===null||Nt===void 0?void 0:Nt.ref),Ta=Te.useState(!1),ka=(0,Me.Z)(Ta,2),uo=ka[0],ao=ka[1];lt(function(){ao(!0)},[]);var hs=pt(!1,{defaultValue:Or,value:zr}),Qo=(0,Me.Z)(hs,2),ps=Qo[0],sa=Qo[1],Hr=uo?ps:!1,ki=!ii&&Kn;(Ir||ki&&Hr&&qr==="combobox")&&(Hr=!1);var Li=ki?!1:Hr,Ri=Te.useCallback(function(Da){var ma=Da!==void 0?Da:!Hr;Ir||(sa(ma),Hr!==ma&&(mi==null||mi(ma)))},[Ir,Hr,sa,mi]),Ha=Te.useMemo(function(){return(ui||[]).some(function(Da){return[`
|
|
|
`,`\r
|
|
|
`].includes(Da)})},[ui]),Ua=function(ma,Ho,es){var ga=!0,za=ma;Xi==null||Xi(null);var Oa=es?null:xn(ma,ui);return qr!=="combobox"&&Oa&&(za="",Hi==null||Hi(Oa),Ri(!1),ga=!1),_i&&lo!==za&&_i(za,{source:Ho?"typing":"effect"}),ga},Fo=function(ma){!ma||!ma.trim()||_i(ma,{source:"submit"})};Te.useEffect(function(){!Hr&&!Va&&qr!=="combobox"&&Ua("",!1,!1)},[Hr]),Te.useEffect(function(){ps&&Ir&&sa(!1),Ir&&Bo(!1)},[Ir]);var Zo=tt(),ls=(0,Me.Z)(Zo,2),va=ls[0],No=ls[1],us=function(ma){var Ho=va(),es=ma.which;if(es===Ke.ENTER&&(qr!=="combobox"&&ma.preventDefault(),Hr||Ri(!0)),No(!!lo),es===Ke.BACKSPACE&&!Ho&&Va&&!lo&&jn.length){for(var ga=(0,Ye.Z)(jn),za=null,Oa=ga.length-1;Oa>=0;Oa-=1){var po=ga[Oa];if(!po.disabled){ga.splice(Oa,1),za=po;break}}za&&hr(ga,{type:"remove",values:[za]})}for(var is=arguments.length,Hs=new Array(is>1?is-1:0),gs=1;gs<is;gs++)Hs[gs-1]=arguments[gs];if(Hr&&wa.current){var Jl;(Jl=wa.current).onKeyDown.apply(Jl,[ma].concat(Hs))}fa==null||fa.apply(void 0,[ma].concat(Hs))},cl=function(ma){for(var Ho=arguments.length,es=new Array(Ho>1?Ho-1:0),ga=1;ga<Ho;ga++)es[ga-1]=arguments[ga];if(Hr&&wa.current){var za;(za=wa.current).onKeyUp.apply(za,[ma].concat(es))}xa==null||xa.apply(void 0,[ma].concat(es))},As=function(ma){var Ho=jn.filter(function(es){return es!==ma});hr(Ho,{type:"remove",values:[ma]})},ms=Te.useRef(!1),zo=function(){Bo(!0),Ir||(wi&&!ms.current&&wi.apply(void 0,arguments),oa.includes("focus")&&Ri(!0)),ms.current=!0},Ts=function(){Bo(!1,function(){ms.current=!1,Ri(!1)}),!Ir&&(lo&&(qr==="tags"?_i(lo,{source:"submit"}):qr==="multiple"&&_i("",{source:"blur"})),pa&&pa.apply(void 0,arguments))},Is=[];Te.useEffect(function(){return function(){Is.forEach(function(Da){return clearTimeout(Da)}),Is.splice(0,Is.length)}},[]);var Ys=function(ma){var Ho,es=ma.target,ga=(Ho=Vi.current)===null||Ho===void 0?void 0:Ho.getPopupElement();if(ga&&ga.contains(es)){var za=setTimeout(function(){var Hs=Is.indexOf(za);if(Hs!==-1&&Is.splice(Hs,1),Oo(),!so&&!ga.contains(document.activeElement)){var gs;(gs=da.current)===null||gs===void 0||gs.focus()}});Is.push(za)}for(var Oa=arguments.length,po=new Array(Oa>1?Oa-1:0),is=1;is<Oa;is++)po[is-1]=arguments[is];Sa==null||Sa.apply(void 0,[ma].concat(po))},oo=Te.useState({}),Ia=(0,Me.Z)(oo,2),Xa=Ia[1];function go(){Xa({})}var yo;ia&&(yo=function(ma){Ri(ma)}),ft(function(){var Da;return[Ca.current,(Da=Vi.current)===null||Da===void 0?void 0:Da.getPopupElement()]},Li,Ri,!!ia);var Ko=Te.useMemo(function(){return(0,Se.Z)((0,Se.Z)({},He),{},{notFoundContent:ii,open:Hr,triggerOpen:Li,id:ln,showSearch:ha,multiple:Va,toggleOpen:Ri})},[He,ii,Li,Hr,ln,ha,Va,Ri]),So=!!Ni||Rr,xs;So&&(xs=Te.createElement(Ue,{className:Be()("".concat(Mn,"-arrow"),(0,ve.Z)({},"".concat(Mn,"-arrow-loading"),Rr)),customizeIcon:Ni,customizeIconProps:{loading:Rr,searchValue:lo,open:Hr,focused:ho,showSearch:ha}}));var Xl=function(){var ma;Fr==null||Fr(),(ma=da.current)===null||ma===void 0||ma.focus(),hr([],{type:"clear",values:jn}),Ua("",!1,!1)},ql=Le(Mn,Xl,jn,xi,Qi,Ir,lo,qr),vu=ql.allowClear,Xu=ql.clearIcon,Ks=Te.createElement(Ra,{ref:wa}),Ds=Be()(Mn,En,(_t={},(0,ve.Z)(_t,"".concat(Mn,"-focused"),ho),(0,ve.Z)(_t,"".concat(Mn,"-multiple"),Va),(0,ve.Z)(_t,"".concat(Mn,"-single"),!Va),(0,ve.Z)(_t,"".concat(Mn,"-allow-clear"),xi),(0,ve.Z)(_t,"".concat(Mn,"-show-arrow"),So),(0,ve.Z)(_t,"".concat(Mn,"-disabled"),Ir),(0,ve.Z)(_t,"".concat(Mn,"-loading"),Rr),(0,ve.Z)(_t,"".concat(Mn,"-open"),Hr),(0,ve.Z)(_t,"".concat(Mn,"-customize-input"),Ao),(0,ve.Z)(_t,"".concat(Mn,"-show-search"),ha),_t)),yu=Te.createElement(Pr,{ref:Vi,disabled:Ir,prefixCls:Mn,visible:Li,popupElement:Ks,animation:$a,transitionName:Aa,dropdownStyle:ua,dropdownClassName:na,direction:hn,dropdownMatchSelectWidth:Di,dropdownRender:Ba,dropdownAlign:Bi,placement:ci,builtinPlacements:ji,getPopupContainer:ca,empty:Kn,getTriggerDOMNode:function(){return Oi.current},onPopupVisibleChange:yo,onPopupMouseEnter:go},ia?Te.cloneElement(ia,{ref:Fi}):Te.createElement(Ct,(0,Ne.Z)({},He,{domRef:Oi,prefixCls:Mn,inputElement:Ao,ref:da,id:ln,showSearch:ha,autoClearSearchValue:ta,mode:qr,activeDescendantId:Pi,tagRender:Nn,values:jn,open:Hr,onToggleOpen:Ri,activeValue:Yi,searchValue:lo,onSearch:Ua,onSearchSubmit:Fo,onRemove:As,tokenWithEnter:Ha}))),Yl;return ia?Yl=yu:Yl=Te.createElement("div",(0,Ne.Z)({className:Ds},_a,{ref:Ca,onMouseDown:Ys,onKeyDown:us,onKeyUp:cl,onFocus:zo,onBlur:Ts}),ho&&!Hr&&Te.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(jn.map(function(Da){var ma=Da.label,Ho=Da.value;return["number","string"].includes((0,me.Z)(ma))?ma:Ho}).join(", "))),yu,xs,vu&&Xu),Te.createElement(Rt.Provider,{value:Ko},Yl)}),si=di,zi=function(He,We){var Nt=Te.useRef({values:new Map,options:new Map}),_t=Te.useMemo(function(){var Mn=Nt.current,En=Mn.values,Zn=Mn.options,Nn=He.map(function(jn){if(jn.label===void 0){var hr;return(0,Se.Z)((0,Se.Z)({},jn),{},{label:(hr=En.get(jn.value))===null||hr===void 0?void 0:hr.label})}return jn}),hn=new Map,zn=new Map;return Nn.forEach(function(jn){hn.set(jn.value,jn),zn.set(jn.value,We.get(jn.value)||Zn.get(jn.value))}),Nt.current.values=hn,Nt.current.options=zn,Nn},[He,We]),ln=Te.useCallback(function(Mn){return We.get(Mn)||Nt.current.options.get(Mn)},[We]);return[_t,ln]};function Lr(He,We){return Ui(He).join("").toUpperCase().includes(We)}var Mi=function(He,We,Nt,_t,ln){return Te.useMemo(function(){if(!Nt||_t===!1)return He;var Mn=We.options,En=We.label,Zn=We.value,Nn=[],hn=typeof _t=="function",zn=Nt.toUpperCase(),jn=hn?_t:function(Kn,Ar){return ln?Lr(Ar[ln],zn):Ar[Mn]?Lr(Ar[En!=="children"?En:"label"],zn):Lr(Ar[Zn],zn)},hr=hn?function(Kn){return Yr(Kn)}:function(Kn){return Kn};return He.forEach(function(Kn){if(Kn[Mn]){var Ar=jn(Nt,hr(Kn));if(Ar)Nn.push(Kn);else{var ii=Kn[Mn].filter(function(Fr){return jn(Nt,hr(Fr))});ii.length&&Nn.push((0,Se.Z)((0,Se.Z)({},Kn),{},(0,ve.Z)({},Mn,ii)))}return}jn(Nt,hr(Kn))&&Nn.push(Kn)}),Nn},[He,_t,ln,Nt,We])},Pn=0,Qt=Oe();function Gt(){var He;return Qt?(He=Pn,Pn+=1):He="TEST_OR_SSR",He}function kt(He){var We=Te.useState(),Nt=(0,Me.Z)(We,2),_t=Nt[0],ln=Nt[1];return Te.useEffect(function(){ln("rc_select_".concat(Gt()))},[]),He||_t}function Wn(He){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nt=[];return Te.Children.forEach(He,function(_t){_t==null&&!We.keepEmpty||(Array.isArray(_t)?Nt=Nt.concat(Wn(_t)):(0,Pt.isFragment)(_t)&&_t.props?Nt=Nt.concat(Wn(_t.props.children,We)):Nt.push(_t))}),Nt}var ri=["children","value"],Ai=["children"];function Zr(He){var We=He,Nt=We.key,_t=We.props,ln=_t.children,Mn=_t.value,En=(0,we.Z)(_t,ri);return(0,Se.Z)({key:Nt,value:Mn!==void 0?Mn:Nt,children:ln},En)}function Hn(He){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Wn(He).map(function(Nt,_t){if(!Te.isValidElement(Nt)||!Nt.type)return null;var ln=Nt,Mn=ln.type.isSelectOptGroup,En=ln.key,Zn=ln.props,Nn=Zn.children,hn=(0,we.Z)(Zn,Ai);return We||!Mn?Zr(Nt):(0,Se.Z)((0,Se.Z)({key:"__RC_SELECT_GRP__".concat(En===null?_t:En,"__"),label:En},hn),{},{options:Hn(Nn)})}).filter(function(Nt){return Nt})}function tn(He,We,Nt,_t,ln){return Te.useMemo(function(){var Mn=He,En=!He;En&&(Mn=Hn(We));var Zn=new Map,Nn=new Map,hn=function(hr,Kn,Ar){Ar&&typeof Ar=="string"&&hr.set(Kn[Ar],Kn)};function zn(jn){for(var hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Kn=0;Kn<jn.length;Kn+=1){var Ar=jn[Kn];!Ar[Nt.options]||hr?(Zn.set(Ar[Nt.value],Ar),hn(Nn,Ar,Nt.label),hn(Nn,Ar,_t),hn(Nn,Ar,ln)):zn(Ar[Nt.options],!0)}}return zn(Mn),{options:Mn,valueOptions:Zn,labelOptions:Nn}},[He,We,Nt,_t,ln])}function Ur(He){var We=Te.useRef();We.current=He;var Nt=Te.useCallback(function(){return We.current.apply(We,arguments)},[]);return Nt}var Jr=function(){return null};Jr.isSelectOptGroup=!0;var ai=Jr,Ti=function(){return null};Ti.isSelectOption=!0;var Ki=Ti;function Tr(He,We){var Nt=(0,Se.Z)({},He);return Array.isArray(We)&&We.forEach(function(_t){delete Nt[_t]}),Nt}var Gr=le(73299),gt=Te.createContext(null),ht=gt;function Ht(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var sn=["disabled","title","children","style","className"];function Ln(He){return typeof He=="string"||typeof He=="number"}var gr=function(We,Nt){var _t=Sn(),ln=_t.prefixCls,Mn=_t.id,En=_t.open,Zn=_t.multiple,Nn=_t.mode,hn=_t.searchValue,zn=_t.toggleOpen,jn=_t.notFoundContent,hr=_t.onPopupScroll,Kn=Te.useContext(ht),Ar=Kn.flattenOptions,ii=Kn.onActiveValue,Fr=Kn.defaultActiveFirstOption,qr=Kn.onSelect,Ir=Kn.menuItemSelectedIcon,Rr=Kn.rawValues,li=Kn.fieldNames,pi=Kn.virtual,zr=Kn.direction,Or=Kn.listHeight,mi=Kn.listItemHeight,Yi="".concat(ln,"-item"),Xi=Et(function(){return Ar},[En,Ar],function(Bi,ci){return ci[0]&&Bi[1]!==ci[1]}),Pi=Te.useRef(null),Ji=function(ci){ci.preventDefault()},ta=function(ci){Pi.current&&Pi.current.scrollTo(typeof ci=="number"?{index:ci}:ci)},_i=function(ci){for(var ji=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ca=Xi.length,qi=0;qi<ca;qi+=1){var oa=(ci+qi*ji+ca)%ca,wi=Xi[oa],pa=wi.group,xa=wi.data;if(!pa&&!xa.disabled)return oa}return-1},Hi=Te.useState(function(){return _i(0)}),ui=(0,Me.Z)(Hi,2),xi=ui[0],Ni=ui[1],Qi=function(ci){var ji=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ni(ci);var ca={source:ji?"keyboard":"mouse"},qi=Xi[ci];if(!qi){ii(null,-1,ca);return}ii(qi.value,ci,ca)};(0,Te.useEffect)(function(){Qi(Fr!==!1?_i(0):-1)},[Xi.length,hn]);var Ra=Te.useCallback(function(Bi){return Rr.has(Bi)&&Nn!=="combobox"},[Nn,(0,Ye.Z)(Rr).toString(),Rr.size]);(0,Te.useEffect)(function(){var Bi=setTimeout(function(){if(!Zn&&En&&Rr.size===1){var ji=Array.from(Rr)[0],ca=Xi.findIndex(function(qi){var oa=qi.data;return oa.value===ji});ca!==-1&&(Qi(ca),ta(ca))}});if(En){var ci;(ci=Pi.current)===null||ci===void 0||ci.scrollTo(void 0)}return function(){return clearTimeout(Bi)}},[En,hn,Ar.length]);var $a=function(ci){ci!==void 0&&qr(ci,{selected:!Rr.has(ci)}),Zn||zn(!1)};if(Te.useImperativeHandle(Nt,function(){return{onKeyDown:function(ci){var ji=ci.which,ca=ci.ctrlKey;switch(ji){case Ke.N:case Ke.P:case Ke.UP:case Ke.DOWN:{var qi=0;if(ji===Ke.UP?qi=-1:ji===Ke.DOWN?qi=1:Ht()&&ca&&(ji===Ke.N?qi=1:ji===Ke.P&&(qi=-1)),qi!==0){var oa=_i(xi+qi,qi);ta(oa),Qi(oa,!0)}break}case Ke.ENTER:{var wi=Xi[xi];wi&&!wi.data.disabled?$a(wi.value):$a(void 0),En&&ci.preventDefault();break}case Ke.ESC:zn(!1),En&&ci.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ci){ta(ci)}}}),Xi.length===0)return Te.createElement("div",{role:"listbox",id:"".concat(Mn,"_list"),className:"".concat(Yi,"-empty"),onMouseDown:Ji},jn);var Aa=Object.keys(li).map(function(Bi){return li[Bi]}),ua=function(ci){return ci.label};function na(Bi,ci){var ji=Bi.group;return{role:ji?"presentation":"option",id:"".concat(Mn,"_list_").concat(ci)}}var Di=function(ci){var ji=Xi[ci];if(!ji)return null;var ca=ji.data||{},qi=ca.value,oa=ji.group,wi=yn(ca,!0),pa=ua(ji);return ji?Te.createElement("div",(0,Ne.Z)({"aria-label":typeof pa=="string"&&!oa?pa:null},wi,{key:ci},na(ji,ci),{"aria-selected":Ra(qi)}),qi):null},Ba={role:"listbox",id:"".concat(Mn,"_list")};return Te.createElement(Te.Fragment,null,pi&&Te.createElement("div",(0,Ne.Z)({},Ba,{style:{height:0,width:0,overflow:"hidden"}}),Di(xi-1),Di(xi),Di(xi+1)),Te.createElement(Gr.Z,{itemKey:"key",ref:Pi,data:Xi,height:Or,itemHeight:mi,fullHeight:!1,onMouseDown:Ji,onScroll:hr,virtual:pi,direction:zr,innerProps:pi?null:Ba},function(Bi,ci){var ji,ca=Bi.group,qi=Bi.groupOption,oa=Bi.data,wi=Bi.label,pa=Bi.value,xa=oa.key;if(ca){var fa,Sa=(fa=oa.title)!==null&&fa!==void 0?fa:Ln(wi)?wi.toString():void 0;return Te.createElement("div",{className:Be()(Yi,"".concat(Yi,"-group")),title:Sa},wi!==void 0?wi:xa)}var Ma=oa.disabled,Va=oa.title,ha=oa.children,_a=oa.style,Ja=oa.className,Ga=(0,we.Z)(oa,sn),so=Tr(Ga,Aa),Fa=Ra(pa),Ca="".concat(Yi,"-option"),Oi=Be()(Yi,Ca,Ja,(ji={},(0,ve.Z)(ji,"".concat(Ca,"-grouped"),qi),(0,ve.Z)(ji,"".concat(Ca,"-active"),xi===ci&&!Ma),(0,ve.Z)(ji,"".concat(Ca,"-disabled"),Ma),(0,ve.Z)(ji,"".concat(Ca,"-selected"),Fa),ji)),Vi=ua(Bi),da=!Ir||typeof Ir=="function"||Fa,wa=typeof Vi=="number"?Vi:Vi||pa,Ka=Ln(wa)?wa.toString():void 0;return Va!==void 0&&(Ka=Va),Te.createElement("div",(0,Ne.Z)({},yn(so),pi?{}:na(Bi,ci),{"aria-selected":Fa,className:Oi,title:Ka,onMouseMove:function(){xi===ci||Ma||Qi(ci)},onClick:function(){Ma||$a(pa)},style:_a}),Te.createElement("div",{className:"".concat(Ca,"-content")},wa),Te.isValidElement(Ir)||Fa,da&&Te.createElement(Ue,{className:"".concat(Yi,"-option-state"),customizeIcon:Ir,customizeIconProps:{isSelected:Fa}},Fa?"\u2713":null))}))},vr=Te.forwardRef(gr);vr.displayName="OptionList";var Mr=vr;function Cr(He){var We=He.mode,Nt=He.options,_t=He.children,ln=He.backfill,Mn=He.allowClear,En=He.placeholder,Zn=He.getInputElement,Nn=He.showSearch,hn=He.onSearch,zn=He.defaultOpen,jn=He.autoFocus,hr=He.labelInValue,Kn=He.value,Ar=He.inputValue,ii=He.optionLabelProp,Fr=isMultiple(We),qr=Nn!==void 0?Nn:Fr||We==="combobox",Ir=Nt||convertChildrenToData(_t);if(warning(We!=="tags"||Ir.every(function(zr){return!zr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),We==="tags"||We==="combobox"){var Rr=Ir.some(function(zr){return zr.options?zr.options.some(function(Or){return typeof("value"in Or?Or.value:Or.key)=="number"}):typeof("value"in zr?zr.value:zr.key)=="number"});warning(!Rr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(We!=="combobox"||!ii,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(We==="combobox"||!ln,"`backfill` only works with `combobox` mode."),warning(We==="combobox"||!Zn,"`getInputElement` only work with `combobox` mode."),noteOnce(We!=="combobox"||!Zn||!Mn||!En,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),hn&&!qr&&We!=="combobox"&&We!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!zn||jn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Kn!=null){var li=toArray(Kn);warning(!hr||li.every(function(zr){return _typeof(zr)==="object"&&("key"in zr||"value"in zr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Fr||Array.isArray(Kn),"`value` should be array when `mode` is `multiple` or `tags`")}if(_t){var pi=null;toNodeArray(_t).some(function(zr){if(!React.isValidElement(zr)||!zr.type)return!1;var Or=zr,mi=Or.type;if(mi.isSelectOption)return!1;if(mi.isSelectOptGroup){var Yi=toNodeArray(zr.props.children).every(function(Xi){return!React.isValidElement(Xi)||!zr.type||Xi.type.isSelectOption?!0:(pi=Xi.type,!1)});return!Yi}return pi=mi,!0}),pi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pi.displayName||pi.name||pi,"`.")),warning(Ar===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function br(He,We){if(He){var Nt=function _t(ln){for(var Mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,En=0;En<ln.length;En++){var Zn=ln[En];if(Zn[We==null?void 0:We.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Mn&&Array.isArray(Zn[We==null?void 0:We.options])&&_t(Zn[We==null?void 0:We.options],!0))break}};Nt(He)}}var cr=null,fi=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Dr=["inputValue"];function dr(He){return!He||(0,me.Z)(He)!=="object"}var ei=Te.forwardRef(function(He,We){var Nt=He.id,_t=He.mode,ln=He.prefixCls,Mn=ln===void 0?"rc-select":ln,En=He.backfill,Zn=He.fieldNames,Nn=He.inputValue,hn=He.searchValue,zn=He.onSearch,jn=He.autoClearSearchValue,hr=jn===void 0?!0:jn,Kn=He.onSelect,Ar=He.onDeselect,ii=He.dropdownMatchSelectWidth,Fr=ii===void 0?!0:ii,qr=He.filterOption,Ir=He.filterSort,Rr=He.optionFilterProp,li=He.optionLabelProp,pi=He.options,zr=He.children,Or=He.defaultActiveFirstOption,mi=He.menuItemSelectedIcon,Yi=He.virtual,Xi=He.direction,Pi=He.listHeight,Ji=Pi===void 0?200:Pi,ta=He.listItemHeight,_i=ta===void 0?20:ta,Hi=He.value,ui=He.defaultValue,xi=He.labelInValue,Ni=He.onChange,Qi=(0,we.Z)(He,fi),Ra=kt(Nt),$a=Ii(_t),Aa=!!(!pi&&zr),ua=Te.useMemo(function(){return qr===void 0&&_t==="combobox"?!1:qr},[qr,_t]),na=Te.useMemo(function(){return mr(Zn,Aa)},[JSON.stringify(Zn),Aa]),Di=pt("",{value:hn!==void 0?hn:Nn,postState:function(ki){return ki||""}}),Ba=(0,Me.Z)(Di,2),Bi=Ba[0],ci=Ba[1],ji=tn(pi,zr,na,Rr,li),ca=ji.valueOptions,qi=ji.labelOptions,oa=ji.options,wi=Te.useCallback(function(Hr){var ki=Ui(Hr);return ki.map(function(Li){var Ri,Ha,Ua,Fo,Zo;if(dr(Li))Ri=Li;else{var ls;Ua=Li.key,Ha=Li.label,Ri=(ls=Li.value)!==null&&ls!==void 0?ls:Ua}var va=ca.get(Ri);if(va){var No;if(Ha===void 0&&(Ha=va==null?void 0:va[li||na.label]),Ua===void 0&&(Ua=(No=va==null?void 0:va.key)!==null&&No!==void 0?No:Ri),Fo=va==null?void 0:va.disabled,Zo=va==null?void 0:va.title,0)var us}return{label:Ha,value:Ri,key:Ua,disabled:Fo,title:Zo}})},[na,li,ca]),pa=pt(ui,{value:Hi}),xa=(0,Me.Z)(pa,2),fa=xa[0],Sa=xa[1],Ma=Te.useMemo(function(){var Hr,ki=wi(fa);return _t==="combobox"&&At((Hr=ki[0])===null||Hr===void 0?void 0:Hr.value)?[]:ki},[fa,wi,_t]),Va=zi(Ma,ca),ha=(0,Me.Z)(Va,2),_a=ha[0],Ja=ha[1],Ga=Te.useMemo(function(){if(!_t&&_a.length===1){var Hr=_a[0];if(Hr.value===null&&(Hr.label===null||Hr.label===void 0))return[]}return _a.map(function(ki){var Li;return(0,Se.Z)((0,Se.Z)({},ki),{},{label:(Li=ki.label)!==null&&Li!==void 0?Li:ki.value})})},[_t,_a]),so=Te.useMemo(function(){return new Set(_a.map(function(Hr){return Hr.value}))},[_a]);Te.useEffect(function(){if(_t==="combobox"){var Hr,ki=(Hr=_a[0])===null||Hr===void 0?void 0:Hr.value;ci(Zi(ki)?String(ki):"")}},[_a]);var Fa=Ur(function(Hr,ki){var Li,Ri=ki!=null?ki:Hr;return Li={},(0,ve.Z)(Li,na.value,Hr),(0,ve.Z)(Li,na.label,Ri),Li}),Ca=Te.useMemo(function(){if(_t!=="tags")return oa;var Hr=(0,Ye.Z)(oa),ki=function(Ri){return ca.has(Ri)};return(0,Ye.Z)(_a).sort(function(Li,Ri){return Li.value<Ri.value?-1:1}).forEach(function(Li){var Ri=Li.value;ki(Ri)||Hr.push(Fa(Ri,Li.label))}),Hr},[Fa,oa,ca,_a,_t]),Oi=Mi(Ca,na,Bi,ua,Rr),Vi=Te.useMemo(function(){return _t!=="tags"||!Bi||Oi.some(function(Hr){return Hr[Rr||"value"]===Bi})||Oi.some(function(Hr){return Hr[na.value]===Bi})?Oi:[Fa(Bi)].concat((0,Ye.Z)(Oi))},[Fa,Rr,_t,Oi,Bi,na]),da=Te.useMemo(function(){return Ir?(0,Ye.Z)(Vi).sort(function(Hr,ki){return Ir(Hr,ki)}):Vi},[Vi,Ir]),wa=Te.useMemo(function(){return fr(da,{fieldNames:na,childrenAsData:Aa})},[da,na,Aa]),Ka=function(ki){var Li=wi(ki);if(Sa(Li),Ni&&(Li.length!==_a.length||Li.some(function(Ua,Fo){var Zo;return((Zo=_a[Fo])===null||Zo===void 0?void 0:Zo.value)!==(Ua==null?void 0:Ua.value)}))){var Ri=xi?Li:Li.map(function(Ua){return Ua.value}),Ha=Li.map(function(Ua){return Yr(Ja(Ua.value))});Ni($a?Ri:Ri[0],$a?Ha:Ha[0])}},io=Te.useState(null),ho=(0,Me.Z)(io,2),Bo=ho[0],Oo=ho[1],lo=Te.useState(0),Ao=(0,Me.Z)(lo,2),ia=Ao[0],Fi=Ao[1],Ta=Or!==void 0?Or:_t!=="combobox",ka=Te.useCallback(function(Hr,ki){var Li=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ri=Li.source,Ha=Ri===void 0?"keyboard":Ri;Fi(ki),En&&_t==="combobox"&&Hr!==null&&Ha==="keyboard"&&Oo(String(Hr))},[En,_t]),uo=function(ki,Li,Ri){var Ha=function(){var ms,zo=Ja(ki);return[xi?{label:zo==null?void 0:zo[na.label],value:ki,key:(ms=zo==null?void 0:zo.key)!==null&&ms!==void 0?ms:ki}:ki,Yr(zo)]};if(Li&&Kn){var Ua=Ha(),Fo=(0,Me.Z)(Ua,2),Zo=Fo[0],ls=Fo[1];Kn(Zo,ls)}else if(!Li&&Ar&&Ri!=="clear"){var va=Ha(),No=(0,Me.Z)(va,2),us=No[0],cl=No[1];Ar(us,cl)}},ao=Ur(function(Hr,ki){var Li,Ri=$a?ki.selected:!0;Ri?Li=$a?[].concat((0,Ye.Z)(_a),[Hr]):[Hr]:Li=_a.filter(function(Ha){return Ha.value!==Hr}),Ka(Li),uo(Hr,Ri),_t==="combobox"?Oo(""):(!Ii||hr)&&(ci(""),Oo(""))}),hs=function(ki,Li){Ka(ki);var Ri=Li.type,Ha=Li.values;(Ri==="remove"||Ri==="clear")&&Ha.forEach(function(Ua){uo(Ua.value,!1,Ri)})},Qo=function(ki,Li){if(ci(ki),Oo(null),Li.source==="submit"){var Ri=(ki||"").trim();if(Ri){var Ha=Array.from(new Set([].concat((0,Ye.Z)(so),[Ri])));Ka(Ha),uo(Ri,!0),ci("")}return}Li.source!=="blur"&&(_t==="combobox"&&Ka(ki),zn==null||zn(ki))},ps=function(ki){var Li=ki;_t!=="tags"&&(Li=ki.map(function(Ha){var Ua=qi.get(Ha);return Ua==null?void 0:Ua.value}).filter(function(Ha){return Ha!==void 0}));var Ri=Array.from(new Set([].concat((0,Ye.Z)(so),(0,Ye.Z)(Li))));Ka(Ri),Ri.forEach(function(Ha){uo(Ha,!0)})},sa=Te.useMemo(function(){var Hr=Yi!==!1&&Fr!==!1;return(0,Se.Z)((0,Se.Z)({},ji),{},{flattenOptions:wa,onActiveValue:ka,defaultActiveFirstOption:Ta,onSelect:ao,menuItemSelectedIcon:mi,rawValues:so,fieldNames:na,virtual:Hr,direction:Xi,listHeight:Ji,listItemHeight:_i,childrenAsData:Aa})},[ji,wa,ka,Ta,ao,mi,so,na,Yi,Fr,Ji,_i,Aa]);return Te.createElement(ht.Provider,{value:sa},Te.createElement(si,(0,Ne.Z)({},Qi,{id:Ra,prefixCls:Mn,ref:We,omitDomProps:Dr,mode:_t,displayValues:Ga,onDisplayValuesChange:hs,direction:Xi,searchValue:Bi,onSearch:Qo,autoClearSearchValue:hr,onSearchSplit:ps,dropdownMatchSelectWidth:Fr,OptionList:Mr,emptyOptions:!wa.length,activeValue:Bo,activeDescendantId:"".concat(Ra,"_list_").concat(ia)})))}),jr=ei;jr.Option=Ki,jr.OptGroup=ai;var De=jr,Fe=De,Re=le(10366),Ze=le(8745),nt=le(33603),ct=le(9708),vt=le(53124),nn=le(98866),on=le(88258),Un=le(98675),yr=le(65223),Gn=le(4173),Cn=le(87244),vn=le(13458),Bn=le(78642),Fn=le(46163),xr=function(He,We){var Nt={};for(var _t in He)Object.prototype.hasOwnProperty.call(He,_t)&&We.indexOf(_t)<0&&(Nt[_t]=He[_t]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ln=0,_t=Object.getOwnPropertySymbols(He);ln<_t.length;ln++)We.indexOf(_t[ln])<0&&Object.prototype.propertyIsEnumerable.call(He,_t[ln])&&(Nt[_t[ln]]=He[_t[ln]]);return Nt};const Qn="SECRET_COMBOBOX_MODE_DO_NOT_USE",Yn=(He,We)=>{var Nt,{prefixCls:_t,bordered:ln=!0,className:Mn,rootClassName:En,getPopupContainer:Zn,popupClassName:Nn,dropdownClassName:hn,listHeight:zn=256,placement:jn,listItemHeight:hr=24,size:Kn,disabled:Ar,notFoundContent:ii,status:Fr,builtinPlacements:qr,dropdownMatchSelectWidth:Ir,popupMatchSelectWidth:Rr,direction:li,style:pi,allowClear:zr}=He,Or=xr(He,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:mi,getPrefixCls:Yi,renderEmpty:Xi,direction:Pi,virtual:Ji,popupMatchSelectWidth:ta,popupOverflow:_i,select:Hi}=Te.useContext(vt.E_),ui=Yi("select",_t),xi=Yi(),Ni=li!=null?li:Pi,{compactSize:Qi,compactItemClassnames:Ra}=(0,Gn.ri)(ui,Ni),[$a,Aa]=(0,Cn.Z)(ui),ua=Te.useMemo(()=>{const{mode:Ca}=Or;if(Ca!=="combobox")return Ca===Qn?"combobox":Ca},[Or.mode]),na=ua==="multiple"||ua==="tags",Di=(0,Bn.Z)(Or.suffixIcon,Or.showArrow),Ba=(Nt=Rr!=null?Rr:Ir)!==null&&Nt!==void 0?Nt:ta,{status:Bi,hasFeedback:ci,isFormItemInput:ji,feedbackIcon:ca}=Te.useContext(yr.aM),qi=(0,ct.F)(Bi,Fr);let oa;ii!==void 0?oa=ii:ua==="combobox"?oa=null:oa=(Xi==null?void 0:Xi("Select"))||Te.createElement(on.Z,{componentName:"Select"});const{suffixIcon:wi,itemIcon:pa,removeIcon:xa,clearIcon:fa}=(0,Fn.Z)(Object.assign(Object.assign({},Or),{multiple:na,hasFeedback:ci,feedbackIcon:ca,showSuffixIcon:Di,prefixCls:ui,showArrow:Or.showArrow,componentName:"Select"})),Sa=zr===!0?{clearIcon:fa}:zr,Ma=(0,Re.Z)(Or,["suffixIcon","itemIcon"]),Va=Be()(Nn||hn,{[`${ui}-dropdown-${Ni}`]:Ni==="rtl"},En,Aa),ha=(0,Un.Z)(Ca=>{var Oi;return(Oi=Kn!=null?Kn:Qi)!==null&&Oi!==void 0?Oi:Ca}),_a=Te.useContext(nn.Z),Ja=Ar!=null?Ar:_a,Ga=Be()({[`${ui}-lg`]:ha==="large",[`${ui}-sm`]:ha==="small",[`${ui}-rtl`]:Ni==="rtl",[`${ui}-borderless`]:!ln,[`${ui}-in-form-item`]:ji},(0,ct.Z)(ui,qi,ci),Ra,Hi==null?void 0:Hi.className,Mn,En,Aa),so=Te.useMemo(()=>jn!==void 0?jn:Ni==="rtl"?"bottomRight":"bottomLeft",[jn,Ni]),Fa=(0,vn.Z)(qr,_i);return $a(Te.createElement(Fe,Object.assign({ref:We,virtual:Ji,showSearch:Hi==null?void 0:Hi.showSearch},Ma,{style:Object.assign(Object.assign({},Hi==null?void 0:Hi.style),pi),dropdownMatchSelectWidth:Ba,builtinPlacements:Fa,transitionName:(0,nt.m)(xi,"slide-up",Or.transitionName),listHeight:zn,listItemHeight:hr,mode:ua,prefixCls:ui,placement:so,direction:Ni,suffixIcon:wi,menuItemSelectedIcon:pa,removeIcon:xa,allowClear:Sa,notFoundContent:oa,className:Ga,getPopupContainer:Zn||mi,dropdownClassName:Va,disabled:Ja})))},ir=Te.forwardRef(Yn),rr=(0,Ze.Z)(ir);ir.SECRET_COMBOBOX_MODE_DO_NOT_USE=Qn,ir.Option=Ki,ir.OptGroup=ai,ir._InternalPanelDoNotUseOrYouWillBeFired=rr;var Er=ir},87244:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return xe}});var se=le(14747),Be=le(80110),Ne=le(45503),Ye=le(67968),ve=le(67771),Se=le(33297);const Me=Ee=>{const{optionHeight:Ve,optionFontSize:Xe,optionLineHeight:Mt,optionPadding:mt}=Ee;return{position:"relative",display:"block",minHeight:Ve,padding:mt,color:Ee.colorText,fontWeight:"normal",fontSize:Xe,lineHeight:Mt,boxSizing:"border-box"}};var me=Ee=>{const{antCls:Ve,componentCls:Xe}=Ee,Mt=`${Xe}-item`,mt=`&${Ve}-slide-up-enter${Ve}-slide-up-enter-active`,St=`&${Ve}-slide-up-appear${Ve}-slide-up-appear-active`,Ke=`&${Ve}-slide-up-leave${Ve}-slide-up-leave-active`,Pt=`${Xe}-dropdown-placement-`;return[{[`${Xe}-dropdown`]:Object.assign(Object.assign({},(0,se.Wf)(Ee)),{position:"absolute",top:-9999,zIndex:Ee.zIndexPopup,boxSizing:"border-box",padding:Ee.paddingXXS,overflow:"hidden",fontSize:Ee.fontSize,fontVariant:"initial",backgroundColor:Ee.colorBgElevated,borderRadius:Ee.borderRadiusLG,outline:"none",boxShadow:Ee.boxShadowSecondary,[`
|
|
|
${mt}${Pt}bottomLeft,
|
|
|
${St}${Pt}bottomLeft
|
|
|
`]:{animationName:ve.fJ},[`
|
|
|
${mt}${Pt}topLeft,
|
|
|
${St}${Pt}topLeft,
|
|
|
${mt}${Pt}topRight,
|
|
|
${St}${Pt}topRight
|
|
|
`]:{animationName:ve.Qt},[`${Ke}${Pt}bottomLeft`]:{animationName:ve.Uw},[`
|
|
|
${Ke}${Pt}topLeft,
|
|
|
${Ke}${Pt}topRight
|
|
|
`]:{animationName:ve.ly},"&-hidden":{display:"none"},[`${Mt}`]:Object.assign(Object.assign({},Me(Ee)),{cursor:"pointer",transition:`background ${Ee.motionDurationSlow} ease`,borderRadius:Ee.borderRadiusSM,"&-group":{color:Ee.colorTextDescription,fontSize:Ee.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},se.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Mt}-option-disabled)`]:{backgroundColor:Ee.optionActiveBg},[`&-selected:not(${Mt}-option-disabled)`]:{color:Ee.optionSelectedColor,fontWeight:Ee.optionSelectedFontWeight,backgroundColor:Ee.optionSelectedBg,[`${Mt}-option-state`]:{color:Ee.colorPrimary}},"&-disabled":{[`&${Mt}-option-selected`]:{backgroundColor:Ee.colorBgContainerDisabled},color:Ee.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Ee.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ve.oN)(Ee,"slide-up"),(0,ve.oN)(Ee,"slide-down"),(0,Se.Fm)(Ee,"move-up"),(0,Se.Fm)(Ee,"move-down")]};const Te=2,ot=Ee=>{let{controlHeightSM:Ve,controlHeight:Xe,lineWidth:Mt}=Ee;const mt=(Xe-Ve)/2-Mt,St=Math.ceil(mt/2);return[mt,St]};function Oe(Ee,Ve){const{componentCls:Xe,iconCls:Mt}=Ee,mt=`${Xe}-selection-overflow`,St=Ee.multipleSelectItemHeight,[Ke]=ot(Ee),Pt=Ve?`${Xe}-${Ve}`:"";return{[`${Xe}-multiple${Pt}`]:{fontSize:Ee.fontSize,[mt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Xe}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ke-Te}px ${Te*2}px`,borderRadius:Ee.borderRadius,[`${Xe}-show-search&`]:{cursor:"text"},[`${Xe}-disabled&`]:{background:Ee.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Te}px 0`,lineHeight:`${St}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Xe}-show-arrow ${Xe}-selector,
|
|
|
&${Xe}-allow-clear ${Xe}-selector
|
|
|
`]:{paddingInlineEnd:Ee.fontSizeIcon+Ee.controlPaddingHorizontal},[`${Xe}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:St,marginTop:Te,marginBottom:Te,lineHeight:`${St-Ee.lineWidth*2}px`,background:Ee.multipleItemBg,border:`${Ee.lineWidth}px ${Ee.lineType} ${Ee.multipleItemBorderColor}`,borderRadius:Ee.borderRadiusSM,cursor:"default",transition:`font-size ${Ee.motionDurationSlow}, line-height ${Ee.motionDurationSlow}, height ${Ee.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Te*2,paddingInlineStart:Ee.paddingXS,paddingInlineEnd:Ee.paddingXS/2,[`${Xe}-disabled&`]:{color:Ee.multipleItemColorDisabled,borderColor:Ee.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Ee.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,se.Ro)()),{display:"inline-flex",alignItems:"center",color:Ee.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Mt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ee.colorIconHover}})},[`${mt}-item + ${mt}-item`]:{[`${Xe}-selection-search`]:{marginInlineStart:0}},[`${Xe}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Ee.inputPaddingHorizontalBase-Ke,"\n &-input,\n &-mirror\n ":{height:St,fontFamily:Ee.fontFamily,lineHeight:`${St}px`,transition:`all ${Ee.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Xe}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Ee.inputPaddingHorizontalBase,insetInlineEnd:Ee.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Ee.motionDurationSlow}`}}}}var lt=Ee=>{const{componentCls:Ve}=Ee,Xe=(0,Ne.TS)(Ee,{controlHeight:Ee.controlHeightSM,multipleSelectItemHeight:Ee.controlHeightXS,borderRadius:Ee.borderRadiusSM,borderRadiusSM:Ee.borderRadiusXS}),Mt=(0,Ne.TS)(Ee,{fontSize:Ee.fontSizeLG,controlHeight:Ee.controlHeightLG,multipleSelectItemHeight:Ee.multipleItemHeightLG,borderRadius:Ee.borderRadiusLG,borderRadiusSM:Ee.borderRadius}),[,mt]=ot(Ee);return[Oe(Ee),Oe(Xe,"sm"),{[`${Ve}-multiple${Ve}-sm`]:{[`${Ve}-selection-placeholder`]:{insetInline:Ee.controlPaddingHorizontalSM-Ee.lineWidth},[`${Ve}-selection-search`]:{marginInlineStart:mt}}},Oe(Mt,"lg")]};function Je(Ee,Ve){const{componentCls:Xe,inputPaddingHorizontalBase:Mt,borderRadius:mt}=Ee,St=Ee.controlHeight-Ee.lineWidth*2,Ke=Math.ceil(Ee.fontSize*1.25),Pt=Ve?`${Xe}-${Ve}`:"";return{[`${Xe}-single${Pt}`]:{fontSize:Ee.fontSize,[`${Xe}-selector`]:Object.assign(Object.assign({},(0,se.Wf)(Ee)),{display:"flex",borderRadius:mt,[`${Xe}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Mt,insetInlineEnd:Mt,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Xe}-selection-item,
|
|
|
${Xe}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${St}px`,transition:`all ${Ee.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${St}px`}},[`${Xe}-selection-item`]:{position:"relative",userSelect:"none"},[`${Xe}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Xe}-selection-item:after`,`${Xe}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Xe}-show-arrow ${Xe}-selection-item,
|
|
|
&${Xe}-show-arrow ${Xe}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ke},[`&${Xe}-open ${Xe}-selection-item`]:{color:Ee.colorTextPlaceholder},[`&:not(${Xe}-customize-input)`]:{[`${Xe}-selector`]:{width:"100%",height:Ee.controlHeight,padding:`0 ${Mt}px`,[`${Xe}-selection-search-input`]:{height:St},"&:after":{lineHeight:`${St}px`}}},[`&${Xe}-customize-input`]:{[`${Xe}-selector`]:{"&:after":{display:"none"},[`${Xe}-selection-search`]:{position:"static",width:"100%"},[`${Xe}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Mt}px`,"&:after":{display:"none"}}}}}}}function Ge(Ee){const{componentCls:Ve}=Ee,Xe=Ee.controlPaddingHorizontalSM-Ee.lineWidth;return[Je(Ee),Je((0,Ne.TS)(Ee,{controlHeight:Ee.controlHeightSM,borderRadius:Ee.borderRadiusSM}),"sm"),{[`${Ve}-single${Ve}-sm`]:{[`&:not(${Ve}-customize-input)`]:{[`${Ve}-selection-search`]:{insetInlineStart:Xe,insetInlineEnd:Xe},[`${Ve}-selector`]:{padding:`0 ${Xe}px`},[`&${Ve}-show-arrow ${Ve}-selection-search`]:{insetInlineEnd:Xe+Ee.fontSize*1.5},[`
|
|
|
&${Ve}-show-arrow ${Ve}-selection-item,
|
|
|
&${Ve}-show-arrow ${Ve}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ee.fontSize*1.5}}}},Je((0,Ne.TS)(Ee,{controlHeight:Ee.singleItemHeightLG,fontSize:Ee.fontSizeLG,borderRadius:Ee.borderRadiusLG}),"lg")]}const Ce=Ee=>{const{componentCls:Ve,selectorBg:Xe}=Ee;return{position:"relative",backgroundColor:Xe,border:`${Ee.lineWidth}px ${Ee.lineType} ${Ee.colorBorder}`,transition:`all ${Ee.motionDurationMid} ${Ee.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ve}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ve}-disabled&`]:{color:Ee.colorTextDisabled,background:Ee.colorBgContainerDisabled,cursor:"not-allowed",[`${Ve}-multiple&`]:{background:Ee.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},pt=function(Ee,Ve){let Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Mt,borderHoverColor:mt,outlineColor:St,antCls:Ke}=Ve,Pt=Xe?{[`${Mt}-selector`]:{borderColor:mt}}:{};return{[Ee]:{[`&:not(${Mt}-disabled):not(${Mt}-customize-input):not(${Ke}-pagination-size-changer)`]:Object.assign(Object.assign({},Pt),{[`${Mt}-focused& ${Mt}-selector`]:{borderColor:mt,boxShadow:`0 0 0 ${Ve.controlOutlineWidth}px ${St}`,outline:0},[`&:hover ${Mt}-selector`]:{borderColor:mt}})}}},zt=Ee=>{const{componentCls:Ve}=Ee;return{[`${Ve}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},qe=Ee=>{const{componentCls:Ve,inputPaddingHorizontalBase:Xe,iconCls:Mt}=Ee;return{[Ve]:Object.assign(Object.assign({},(0,se.Wf)(Ee)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ve}-customize-input) ${Ve}-selector`]:Object.assign(Object.assign({},Ce(Ee)),zt(Ee)),[`${Ve}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},se.vS),[`${Ve}-selection-placeholder`]:Object.assign(Object.assign({},se.vS),{flex:1,color:Ee.colorTextPlaceholder,pointerEvents:"none"}),[`${Ve}-arrow`]:Object.assign(Object.assign({},(0,se.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Xe,height:Ee.fontSizeIcon,marginTop:-Ee.fontSizeIcon/2,color:Ee.colorTextQuaternary,fontSize:Ee.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Mt]:{verticalAlign:"top",transition:`transform ${Ee.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ve}-suffix)`]:{pointerEvents:"auto"}},[`${Ve}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ve}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Xe,zIndex:1,display:"inline-block",width:Ee.fontSizeIcon,height:Ee.fontSizeIcon,marginTop:-Ee.fontSizeIcon/2,color:Ee.colorTextQuaternary,fontSize:Ee.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Ee.clearBg,cursor:"pointer",opacity:0,transition:`color ${Ee.motionDurationMid} ease, opacity ${Ee.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Ee.colorTextTertiary}},"&:hover":{[`${Ve}-clear`]:{opacity:1}}}),[`${Ve}-has-feedback`]:{[`${Ve}-clear`]:{insetInlineEnd:Xe+Ee.fontSize+Ee.paddingXS}}}},ut=Ee=>{const{componentCls:Ve}=Ee;return[{[Ve]:{[`&-borderless ${Ve}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ve}-in-form-item`]:{width:"100%"}}},qe(Ee),Ge(Ee),lt(Ee),me(Ee),{[`${Ve}-rtl`]:{direction:"rtl"}},pt(Ve,(0,Ne.TS)(Ee,{borderHoverColor:Ee.colorPrimaryHover,outlineColor:Ee.controlOutline})),pt(`${Ve}-status-error`,(0,Ne.TS)(Ee,{borderHoverColor:Ee.colorErrorHover,outlineColor:Ee.colorErrorOutline}),!0),pt(`${Ve}-status-warning`,(0,Ne.TS)(Ee,{borderHoverColor:Ee.colorWarningHover,outlineColor:Ee.colorWarningOutline}),!0),(0,Be.c)(Ee,{borderElCls:`${Ve}-selector`,focusElCls:`${Ve}-focused`})]};var xe=(0,Ye.Z)("Select",(Ee,Ve)=>{let{rootPrefixCls:Xe}=Ve;const Mt=(0,Ne.TS)(Ee,{rootPrefixCls:Xe,inputPaddingHorizontalBase:Ee.paddingSM-1,multipleSelectItemHeight:Ee.multipleItemHeight});return[ut(Mt)]},Ee=>{const{fontSize:Ve,lineHeight:Xe,controlHeight:Mt,controlPaddingHorizontal:mt,zIndexPopupBase:St,colorText:Ke,fontWeightStrong:Pt,controlItemBgActive:Et,controlItemBgHover:Yt,colorBgContainer:at,colorFillSecondary:Vt,controlHeightLG:fn,controlHeightSM:dn,colorBgContainerDisabled:Ue,colorTextDisabled:Le}=Ee;return{zIndexPopup:St+50,optionSelectedColor:Ke,optionSelectedFontWeight:Pt,optionSelectedBg:Et,optionActiveBg:Yt,optionPadding:`${(Mt-Ve*Xe)/2}px ${mt}px`,optionFontSize:Ve,optionLineHeight:Xe,optionHeight:Mt,selectorBg:at,clearBg:at,singleItemHeightLG:fn,multipleItemBg:Vt,multipleItemBorderColor:"transparent",multipleItemHeight:dn,multipleItemHeightLG:Mt,multipleSelectorBgDisabled:Ue,multipleItemColorDisabled:Le,multipleItemBorderColorDisabled:"transparent"}})},13458:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Be}});const se=Ne=>{const ve={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ne==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ve),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ve),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ve),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ve),{points:["br","tr"],offset:[0,-4]})}};function Be(Ne,Ye){return Ne||se(Ye)}},78642:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return se}});function se(Be,Ne){return Ne!==void 0?Ne:Be!==null}},46163:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return we}});var se=le(18299),Be=le(16646),Ne=le(73475),Ye=le(42922),ve=le(3407),Se=le(72395),Me=le(67294);function we(me){let{suffixIcon:Te,clearIcon:ot,menuItemSelectedIcon:Oe,removeIcon:st,loading:lt,multiple:Je,hasFeedback:Ge,prefixCls:Ce,showSuffixIcon:pt,feedbackIcon:zt,showArrow:qe,componentName:ut}=me;const xe=ot!=null?ot:Me.createElement(Be.Z,null),Ee=mt=>Te===null&&!Ge&&!qe?null:Me.createElement(Me.Fragment,null,pt!==!1&&mt,Ge&&zt);let Ve=null;if(Te!==void 0)Ve=Ee(Te);else if(lt)Ve=Ee(Me.createElement(ve.Z,{spin:!0}));else{const mt=`${Ce}-suffix`;Ve=St=>{let{open:Ke,showSearch:Pt}=St;return Ee(Ke&&Pt?Me.createElement(Se.Z,{className:mt}):Me.createElement(Ye.Z,{className:mt}))}}let Xe=null;Oe!==void 0?Xe=Oe:Je?Xe=Me.createElement(se.Z,null):Xe=null;let Mt=null;return st!==void 0?Mt=st:Mt=Me.createElement(Ne.Z,null),{clearIcon:xe,suffixIcon:Ve,itemIcon:Xe,removeIcon:Mt}}},33507:function(bn,Zt){"use strict";const le=se=>({[se.componentCls]:{[`${se.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${se.motionDurationMid} ${se.motionEaseInOut},
|
|
|
opacity ${se.motionDurationMid} ${se.motionEaseInOut} !important`}},[`${se.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${se.motionDurationMid} ${se.motionEaseInOut},
|
|
|
opacity ${se.motionDurationMid} ${se.motionEaseInOut} !important`}}});Zt.Z=le},33297:function(bn,Zt,le){"use strict";le.d(Zt,{Fm:function(){return Oe}});var se=le(34367),Be=le(93590);const Ne=new se.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ye=new se.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ve=new se.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Se=new se.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Me=new se.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),we=new se.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),me=new se.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Te=new se.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),ot={"move-up":{inKeyframes:me,outKeyframes:Te},"move-down":{inKeyframes:Ne,outKeyframes:Ye},"move-left":{inKeyframes:ve,outKeyframes:Se},"move-right":{inKeyframes:Me,outKeyframes:we}},Oe=(st,lt)=>{const{antCls:Je}=st,Ge=`${Je}-${lt}`,{inKeyframes:Ce,outKeyframes:pt}=ot[lt];return[(0,Be.R)(Ge,Ce,pt,st.motionDurationMid),{[`
|
|
|
${Ge}-enter,
|
|
|
${Ge}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:st.motionEaseOutCirc},[`${Ge}-leave`]:{animationTimingFunction:st.motionEaseInOutCirc}}]}},67771:function(bn,Zt,le){"use strict";le.d(Zt,{Qt:function(){return ve},Uw:function(){return Ye},fJ:function(){return Ne},ly:function(){return Se},oN:function(){return Oe}});var se=le(34367),Be=le(93590);const Ne=new se.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ye=new se.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ve=new se.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Se=new se.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Me=new se.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),we=new se.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),me=new se.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Te=new se.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ot={"slide-up":{inKeyframes:Ne,outKeyframes:Ye},"slide-down":{inKeyframes:ve,outKeyframes:Se},"slide-left":{inKeyframes:Me,outKeyframes:we},"slide-right":{inKeyframes:me,outKeyframes:Te}},Oe=(st,lt)=>{const{antCls:Je}=st,Ge=`${Je}-${lt}`,{inKeyframes:Ce,outKeyframes:pt}=ot[lt];return[(0,Be.R)(Ge,Ce,pt,st.motionDurationMid),{[`
|
|
|
${Ge}-enter,
|
|
|
${Ge}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:st.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Ge}-leave`]:{animationTimingFunction:st.motionEaseInQuint}}]}},47897:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return pe}});var se=le(3407),Be=le(94184),Ne=le.n(Be);function Ye(){return Ye=Object.assign?Object.assign.bind():function(he){for(var oe=1;oe<arguments.length;oe++){var Ie=arguments[oe];for(var Qe in Ie)Object.prototype.hasOwnProperty.call(Ie,Qe)&&(he[Qe]=Ie[Qe])}return he},Ye.apply(this,arguments)}function ve(he){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},ve(he)}function Se(he,oe){if(ve(he)!=="object"||he===null)return he;var Ie=he[Symbol.toPrimitive];if(Ie!==void 0){var Qe=Ie.call(he,oe||"default");if(ve(Qe)!=="object")return Qe;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(he)}function Me(he){var oe=Se(he,"string");return ve(oe)==="symbol"?oe:String(oe)}function we(he,oe,Ie){return oe=Me(oe),oe in he?Object.defineProperty(he,oe,{value:Ie,enumerable:!0,configurable:!0,writable:!0}):he[oe]=Ie,he}function me(he){if(Array.isArray(he))return he}function Te(he,oe){var Ie=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ie!=null){var Qe,Lt,$t,Kt,en=[],Jt=!0,et=!1;try{if($t=(Ie=Ie.call(he)).next,oe===0){if(Object(Ie)!==Ie)return;Jt=!1}else for(;!(Jt=(Qe=$t.call(Ie)).done)&&(en.push(Qe.value),en.length!==oe);Jt=!0);}catch(wt){et=!0,Lt=wt}finally{try{if(!Jt&&Ie.return!=null&&(Kt=Ie.return(),Object(Kt)!==Kt))return}finally{if(et)throw Lt}}return en}}function ot(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Ie=0,Qe=new Array(oe);Ie<oe;Ie++)Qe[Ie]=he[Ie];return Qe}function Oe(he,oe){if(he){if(typeof he=="string")return ot(he,oe);var Ie=Object.prototype.toString.call(he).slice(8,-1);if(Ie==="Object"&&he.constructor&&(Ie=he.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(he);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return ot(he,oe)}}function st(){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 lt(he,oe){return me(he)||Te(he,oe)||Oe(he,oe)||st()}function Je(he,oe){if(he==null)return{};var Ie={},Qe=Object.keys(he),Lt,$t;for($t=0;$t<Qe.length;$t++)Lt=Qe[$t],!(oe.indexOf(Lt)>=0)&&(Ie[Lt]=he[Lt]);return Ie}function Ge(he,oe){if(he==null)return{};var Ie=Je(he,oe),Qe,Lt;if(Object.getOwnPropertySymbols){var $t=Object.getOwnPropertySymbols(he);for(Lt=0;Lt<$t.length;Lt++)Qe=$t[Lt],!(oe.indexOf(Qe)>=0)&&Object.prototype.propertyIsEnumerable.call(he,Qe)&&(Ie[Qe]=he[Qe])}return Ie}var Ce=le(67294);function pt(he){if(Array.isArray(he))return he}function zt(he,oe){var Ie=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ie!=null){var Qe,Lt,$t,Kt,en=[],Jt=!0,et=!1;try{if($t=(Ie=Ie.call(he)).next,oe===0){if(Object(Ie)!==Ie)return;Jt=!1}else for(;!(Jt=(Qe=$t.call(Ie)).done)&&(en.push(Qe.value),en.length!==oe);Jt=!0);}catch(wt){et=!0,Lt=wt}finally{try{if(!Jt&&Ie.return!=null&&(Kt=Ie.return(),Object(Kt)!==Kt))return}finally{if(et)throw Lt}}return en}}function qe(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Ie=0,Qe=new Array(oe);Ie<oe;Ie++)Qe[Ie]=he[Ie];return Qe}function ut(he,oe){if(he){if(typeof he=="string")return qe(he,oe);var Ie=Object.prototype.toString.call(he).slice(8,-1);if(Ie==="Object"&&he.constructor&&(Ie=he.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(he);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return qe(he,oe)}}function xe(){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 Ee(he,oe){return pt(he)||zt(he,oe)||ut(he,oe)||xe()}function Ve(he){var oe=Ce.useRef();oe.current=he;var Ie=Ce.useCallback(function(){for(var Qe,Lt=arguments.length,$t=new Array(Lt),Kt=0;Kt<Lt;Kt++)$t[Kt]=arguments[Kt];return(Qe=oe.current)===null||Qe===void 0?void 0:Qe.call.apply(Qe,[oe].concat($t))},[]);return Ie}function Xe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Mt=Xe()?Ce.useLayoutEffect:Ce.useEffect,mt=function(oe,Ie){var Qe=Ce.useRef(!0);Mt(function(){return oe(Qe.current)},Ie),Mt(function(){return Qe.current=!1,function(){Qe.current=!0}},[])},St=function(oe,Ie){mt(function(Qe){if(!Qe)return oe()},Ie)},Ke=null;function Pt(he){var oe=Ce.useRef(!1),Ie=Ce.useState(he),Qe=Ee(Ie,2),Lt=Qe[0],$t=Qe[1];Ce.useEffect(function(){return oe.current=!1,function(){oe.current=!0}},[]);function Kt(en,Jt){Jt&&oe.current||$t(en)}return[Lt,Kt]}function Et(he){return he!==void 0}function Yt(he,oe){var Ie=oe||{},Qe=Ie.defaultValue,Lt=Ie.value,$t=Ie.onChange,Kt=Ie.postState,en=Pt(function(){return Et(Lt)?Lt:Et(Qe)?typeof Qe=="function"?Qe():Qe:typeof he=="function"?he():he}),Jt=Ee(en,2),et=Jt[0],wt=Jt[1],Tt=Lt!==void 0?Lt:et,Ot=Kt?Kt(Tt):Tt,yt=Ve($t),Dn=Pt([Tt]),gn=Ee(Dn,2),$n=gn[0],Kr=gn[1];St(function(){var lr=$n[0];et!==lr&&yt(et,lr)},[$n]),St(function(){Et(Lt)||wt(Lt)},[Lt]);var tr=Ve(function(lr,ur){wt(lr,ur),Kr([Tt],ur)});return[Ot,tr]}var at={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(oe){var Ie=oe.keyCode;if(oe.altKey&&!oe.ctrlKey||oe.metaKey||Ie>=at.F1&&Ie<=at.F12)return!1;switch(Ie){case at.ALT:case at.CAPS_LOCK:case at.CONTEXT_MENU:case at.CTRL:case at.DOWN:case at.END:case at.ESC:case at.HOME:case at.INSERT:case at.LEFT:case at.MAC_FF_META:case at.META:case at.NUMLOCK:case at.NUM_CENTER:case at.PAGE_DOWN:case at.PAGE_UP:case at.PAUSE:case at.PRINT_SCREEN:case at.RIGHT:case at.SHIFT:case at.UP:case at.WIN_KEY:case at.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(oe){if(oe>=at.ZERO&&oe<=at.NINE||oe>=at.NUM_ZERO&&oe<=at.NUM_MULTIPLY||oe>=at.A&&oe<=at.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&oe===0)return!0;switch(oe){case at.SPACE:case at.QUESTION_MARK:case at.NUM_PLUS:case at.NUM_MINUS:case at.NUM_PERIOD:case at.NUM_DIVISION:case at.SEMICOLON:case at.DASH:case at.EQUALS:case at.COMMA:case at.PERIOD:case at.SLASH:case at.APOSTROPHE:case at.SINGLE_QUOTE:case at.OPEN_SQUARE_BRACKET:case at.BACKSLASH:case at.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Vt=at,fn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],dn=Ce.forwardRef(function(he,oe){var Ie,Qe=he.prefixCls,Lt=Qe===void 0?"rc-switch":Qe,$t=he.className,Kt=he.checked,en=he.defaultChecked,Jt=he.disabled,et=he.loadingIcon,wt=he.checkedChildren,Tt=he.unCheckedChildren,Ot=he.onClick,yt=he.onChange,Dn=he.onKeyDown,gn=Ge(he,fn),$n=Yt(!1,{value:Kt,defaultValue:en}),Kr=lt($n,2),tr=Kr[0],lr=Kr[1];function ur(gi,Sr){var Ei=tr;return Jt||(Ei=gi,lr(Ei),yt==null||yt(Ei,Sr)),Ei}function ni(gi){gi.which===Vt.LEFT?ur(!1,gi):gi.which===Vt.RIGHT&&ur(!0,gi),Dn==null||Dn(gi)}function Xr(gi){var Sr=ur(!tr,gi);Ot==null||Ot(Sr,gi)}var Qr=Ne()(Lt,$t,(Ie={},we(Ie,"".concat(Lt,"-checked"),tr),we(Ie,"".concat(Lt,"-disabled"),Jt),Ie));return Ce.createElement("button",Ye({},gn,{type:"button",role:"switch","aria-checked":tr,disabled:Jt,className:Qr,ref:oe,onKeyDown:ni,onClick:Xr}),et,Ce.createElement("span",{className:"".concat(Lt,"-inner")},Ce.createElement("span",{className:"".concat(Lt,"-inner-checked")},wt),Ce.createElement("span",{className:"".concat(Lt,"-inner-unchecked")},Tt)))});dn.displayName="Switch";var Ue=dn,Le=le(45353),Rt=le(53124),Sn=le(98866),un=le(98675),tt=le(84780),ft=le(14747),Xt=le(67968),Tn=le(45503);const mn=he=>{const{componentCls:oe,trackHeightSM:Ie,trackPadding:Qe,trackMinWidthSM:Lt,innerMinMarginSM:$t,innerMaxMarginSM:Kt,handleSizeSM:en}=he,Jt=`${oe}-inner`;return{[oe]:{[`&${oe}-small`]:{minWidth:Lt,height:Ie,lineHeight:`${Ie}px`,[`${oe}-inner`]:{paddingInlineStart:Kt,paddingInlineEnd:$t,[`${Jt}-checked`]:{marginInlineStart:`calc(-100% + ${en+Qe*2}px - ${Kt*2}px)`,marginInlineEnd:`calc(100% - ${en+Qe*2}px + ${Kt*2}px)`},[`${Jt}-unchecked`]:{marginTop:-Ie,marginInlineStart:0,marginInlineEnd:0}},[`${oe}-handle`]:{width:en,height:en},[`${oe}-loading-icon`]:{top:(en-he.switchLoadingIconSize)/2,fontSize:he.switchLoadingIconSize},[`&${oe}-checked`]:{[`${oe}-inner`]:{paddingInlineStart:$t,paddingInlineEnd:Kt,[`${Jt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Jt}-unchecked`]:{marginInlineStart:`calc(100% - ${en+Qe*2}px + ${Kt*2}px)`,marginInlineEnd:`calc(-100% + ${en+Qe*2}px - ${Kt*2}px)`}},[`${oe}-handle`]:{insetInlineStart:`calc(100% - ${en+Qe}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${Jt}`]:{[`${Jt}-unchecked`]:{marginInlineStart:he.marginXXS/2,marginInlineEnd:-he.marginXXS/2}},[`&${oe}-checked ${Jt}`]:{[`${Jt}-checked`]:{marginInlineStart:-he.marginXXS/2,marginInlineEnd:he.marginXXS/2}}}}}}},Ut=he=>{const{componentCls:oe,handleSize:Ie}=he;return{[oe]:{[`${oe}-loading-icon${he.iconCls}`]:{position:"relative",top:(Ie-he.fontSize)/2,color:he.switchLoadingIconColor,verticalAlign:"top"},[`&${oe}-checked ${oe}-loading-icon`]:{color:he.switchColor}}}},jt=he=>{const{componentCls:oe,motion:Ie,trackPadding:Qe,handleBg:Lt,handleShadow:$t,handleSize:Kt}=he,en=`${oe}-handle`;return{[oe]:{[en]:{position:"absolute",top:Qe,insetInlineStart:Qe,width:Kt,height:Kt,transition:`all ${he.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Lt,borderRadius:Kt/2,boxShadow:$t,transition:`all ${he.switchDuration} ease-in-out`,content:'""'}},[`&${oe}-checked ${en}`]:{insetInlineStart:`calc(100% - ${Kt+Qe}px)`},[`&:not(${oe}-disabled):active`]:Ie?{[`${en}::before`]:{insetInlineEnd:he.switchHandleActiveInset,insetInlineStart:0},[`&${oe}-checked ${en}::before`]:{insetInlineEnd:0,insetInlineStart:he.switchHandleActiveInset}}:{}}}},_n=he=>{const{componentCls:oe,trackHeight:Ie,trackPadding:Qe,innerMinMargin:Lt,innerMaxMargin:$t,handleSize:Kt}=he,en=`${oe}-inner`;return{[oe]:{[en]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:$t,paddingInlineEnd:Lt,transition:`padding-inline-start ${he.switchDuration} ease-in-out, padding-inline-end ${he.switchDuration} ease-in-out`,[`${en}-checked, ${en}-unchecked`]:{display:"block",color:he.colorTextLightSolid,fontSize:he.fontSizeSM,transition:`margin-inline-start ${he.switchDuration} ease-in-out, margin-inline-end ${he.switchDuration} ease-in-out`,pointerEvents:"none"},[`${en}-checked`]:{marginInlineStart:`calc(-100% + ${Kt+Qe*2}px - ${$t*2}px)`,marginInlineEnd:`calc(100% - ${Kt+Qe*2}px + ${$t*2}px)`},[`${en}-unchecked`]:{marginTop:-Ie,marginInlineStart:0,marginInlineEnd:0}},[`&${oe}-checked ${en}`]:{paddingInlineStart:Lt,paddingInlineEnd:$t,[`${en}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${en}-unchecked`]:{marginInlineStart:`calc(100% - ${Kt+Qe*2}px + ${$t*2}px)`,marginInlineEnd:`calc(-100% + ${Kt+Qe*2}px - ${$t*2}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${en}`]:{[`${en}-unchecked`]:{marginInlineStart:Qe*2,marginInlineEnd:-Qe*2}},[`&${oe}-checked ${en}`]:{[`${en}-checked`]:{marginInlineStart:-Qe*2,marginInlineEnd:Qe*2}}}}}},yn=he=>{const{componentCls:oe,trackHeight:Ie,trackMinWidth:Qe}=he;return{[oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ft.Wf)(he)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Qe,height:Ie,lineHeight:`${Ie}px`,verticalAlign:"middle",background:he.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${he.motionDurationMid}`,userSelect:"none",[`&:hover:not(${oe}-disabled)`]:{background:he.colorTextTertiary}}),(0,ft.Qy)(he)),{[`&${oe}-checked`]:{background:he.switchColor,[`&:hover:not(${oe}-disabled)`]:{background:he.colorPrimaryHover}},[`&${oe}-loading, &${oe}-disabled`]:{cursor:"not-allowed",opacity:he.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${oe}-rtl`]:{direction:"rtl"}})}};var Ae=(0,Xt.Z)("Switch",he=>{const oe=(0,Tn.TS)(he,{switchDuration:he.motionDurationMid,switchColor:he.colorPrimary,switchDisabledOpacity:he.opacityLoading,switchLoadingIconSize:he.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${he.opacityLoading})`,switchHandleActiveInset:"-30%"});return[yn(oe),_n(oe),jt(oe),Ut(oe),mn(oe)]},he=>{const{fontSize:oe,lineHeight:Ie,controlHeight:Qe,colorWhite:Lt}=he,$t=oe*Ie,Kt=Qe/2,en=2,Jt=$t-en*2,et=Kt-en*2;return{trackHeight:$t,trackHeightSM:Kt,trackMinWidth:Jt*2+en*4,trackMinWidthSM:et*2+en*2,trackPadding:en,handleBg:Lt,handleSize:Jt,handleSizeSM:et,handleShadow:`0 2px 4px 0 ${new tt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Jt/2,innerMaxMargin:Jt+en+en*2,innerMinMarginSM:et/2,innerMaxMarginSM:et+en+en*2}}),ce=function(he,oe){var Ie={};for(var Qe in he)Object.prototype.hasOwnProperty.call(he,Qe)&&oe.indexOf(Qe)<0&&(Ie[Qe]=he[Qe]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Lt=0,Qe=Object.getOwnPropertySymbols(he);Lt<Qe.length;Lt++)oe.indexOf(Qe[Lt])<0&&Object.prototype.propertyIsEnumerable.call(he,Qe[Lt])&&(Ie[Qe[Lt]]=he[Qe[Lt]]);return Ie};const ue=Ce.forwardRef((he,oe)=>{const{prefixCls:Ie,size:Qe,disabled:Lt,loading:$t,className:Kt,rootClassName:en,style:Jt}=he,et=ce(he,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:wt,direction:Tt,switch:Ot}=Ce.useContext(Rt.E_),yt=Ce.useContext(Sn.Z),Dn=(Lt!=null?Lt:yt)||$t,gn=wt("switch",Ie),$n=Ce.createElement("div",{className:`${gn}-handle`},$t&&Ce.createElement(se.Z,{className:`${gn}-loading-icon`})),[Kr,tr]=Ae(gn),lr=(0,un.Z)(Qe),ur=Ne()(Ot==null?void 0:Ot.className,{[`${gn}-small`]:lr==="small",[`${gn}-loading`]:$t,[`${gn}-rtl`]:Tt==="rtl"},Kt,en,tr),ni=Object.assign(Object.assign({},Ot==null?void 0:Ot.style),Jt);return Kr(Ce.createElement(Le.Z,{component:"Switch"},Ce.createElement(Ue,Object.assign({},et,{prefixCls:gn,className:ur,style:ni,disabled:Dn,ref:oe,loadingIcon:$n}))))});ue.__ANT_SWITCH=!0;var pe=ue},66368:function(bn,Zt,le){"use strict";le.d(Zt,{default:function(){return jr}});var se=le(73475),Be=le(25877),Ne=le(38308),Ye=le(94184),ve=le.n(Ye),Se=le(87462),Me=le(4942),we=le(1413),me=le(97685),Te=le(71002),ot=le(45987),Oe=le(67294),st=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var De=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(De)||/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(De==null?void 0:De.substr(0,4))};function lt(De){var Fe=Oe.useRef();Fe.current=De;var Re=Oe.useCallback(function(){for(var Ze,nt=arguments.length,ct=new Array(nt),vt=0;vt<nt;vt++)ct[vt]=arguments[vt];return(Ze=Fe.current)===null||Ze===void 0?void 0:Ze.call.apply(Ze,[Fe].concat(ct))},[]);return Re}function Je(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ge=Je()?Oe.useLayoutEffect:Oe.useEffect,Ce=function(Fe,Re){var Ze=Oe.useRef(!0);Ge(function(){return Fe(Ze.current)},Re),Ge(function(){return Ze.current=!1,function(){Ze.current=!0}},[])},pt=function(Fe,Re){Ce(function(Ze){if(!Ze)return Fe()},Re)},zt=null;function qe(De){var Fe=Oe.useRef(!1),Re=Oe.useState(De),Ze=(0,me.Z)(Re,2),nt=Ze[0],ct=Ze[1];Oe.useEffect(function(){return Fe.current=!1,function(){Fe.current=!0}},[]);function vt(nn,on){on&&Fe.current||ct(nn)}return[nt,vt]}function ut(De){return De!==void 0}function xe(De,Fe){var Re=Fe||{},Ze=Re.defaultValue,nt=Re.value,ct=Re.onChange,vt=Re.postState,nn=qe(function(){return ut(nt)?nt:ut(Ze)?typeof Ze=="function"?Ze():Ze:typeof De=="function"?De():De}),on=(0,me.Z)(nn,2),Un=on[0],yr=on[1],Gn=nt!==void 0?nt:Un,Cn=vt?vt(Gn):Gn,vn=lt(ct),Bn=qe([Gn]),Fn=(0,me.Z)(Bn,2),xr=Fn[0],Qn=Fn[1];pt(function(){var ir=xr[0];Un!==ir&&vn(Un,ir)},[xr]),pt(function(){ut(nt)||yr(nt)},[nt]);var Yn=lt(function(ir,rr){yr(ir,rr),Qn([Gn],rr)});return[Cn,Yn]}var Ee=le(62874),Ve=(0,Oe.createContext)(null),Xe=Oe.forwardRef(function(De,Fe){var Re=De.prefixCls,Ze=De.className,nt=De.style,ct=De.id,vt=De.active,nn=De.tabKey,on=De.children;return Oe.createElement("div",{id:ct&&"".concat(ct,"-panel-").concat(nn),role:"tabpanel",tabIndex:vt?0:-1,"aria-labelledby":ct&&"".concat(ct,"-tab-").concat(nn),"aria-hidden":!vt,style:nt,className:ve()(Re,vt&&"".concat(Re,"-active"),Ze),ref:Fe},on)}),Mt=Xe,mt=["key","forceRender","style","className"];function St(De){var Fe=De.id,Re=De.activeKey,Ze=De.animated,nt=De.tabPosition,ct=De.destroyInactiveTabPane,vt=Oe.useContext(Ve),nn=vt.prefixCls,on=vt.tabs,Un=Ze.tabPane,yr="".concat(nn,"-tabpane");return Oe.createElement("div",{className:ve()("".concat(nn,"-content-holder"))},Oe.createElement("div",{className:ve()("".concat(nn,"-content"),"".concat(nn,"-content-").concat(nt),(0,Me.Z)({},"".concat(nn,"-content-animated"),Un))},on.map(function(Gn){var Cn=Gn.key,vn=Gn.forceRender,Bn=Gn.style,Fn=Gn.className,xr=(0,ot.Z)(Gn,mt),Qn=Cn===Re;return Oe.createElement(Ee.Z,(0,Se.Z)({key:Cn,visible:Qn,forceRender:vn,removeOnLeave:!!ct,leavedClassName:"".concat(yr,"-hidden")},Ze.tabPaneMotion),function(Yn,ir){var rr=Yn.style,Er=Yn.className;return Oe.createElement(Mt,(0,Se.Z)({},xr,{prefixCls:yr,id:Fe,tabKey:Cn,animated:Un,active:Qn,style:(0,we.Z)((0,we.Z)({},Bn),rr),className:ve()(Fn,Er),ref:ir}))})})))}var Ke=le(74902),Pt=le(48555),Et=le(59864);function Yt(De,Fe,Re){var Ze=Oe.useRef({});return(!("value"in Ze.current)||Re(Ze.current.condition,Fe))&&(Ze.current.value=De(),Ze.current.condition=Fe),Ze.current.value}function at(De,Fe){typeof De=="function"?De(Fe):(0,Te.Z)(De)==="object"&&De&&"current"in De&&(De.current=Fe)}function Vt(){for(var De=arguments.length,Fe=new Array(De),Re=0;Re<De;Re++)Fe[Re]=arguments[Re];var Ze=Fe.filter(function(nt){return nt});return Ze.length<=1?Ze[0]:function(nt){Fe.forEach(function(ct){at(ct,nt)})}}function fn(){for(var De=arguments.length,Fe=new Array(De),Re=0;Re<De;Re++)Fe[Re]=arguments[Re];return Yt(function(){return Vt.apply(void 0,Fe)},Fe,function(Ze,nt){return Ze.length===nt.length&&Ze.every(function(ct,vt){return ct===nt[vt]})})}function dn(De){var Fe,Re,Ze=isMemo(De)?De.type.type:De.type;return!(typeof Ze=="function"&&!((Fe=Ze.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof De=="function"&&!((Re=De.prototype)!==null&&Re!==void 0&&Re.render))}var Ue={width:0,height:0,left:0,top:0};function Le(De,Fe,Re){return(0,Oe.useMemo)(function(){for(var Ze,nt=new Map,ct=Fe.get((Ze=De[0])===null||Ze===void 0?void 0:Ze.key)||Ue,vt=ct.left+ct.width,nn=0;nn<De.length;nn+=1){var on=De[nn].key,Un=Fe.get(on);if(!Un){var yr;Un=Fe.get((yr=De[nn-1])===null||yr===void 0?void 0:yr.key)||Ue}var Gn=nt.get(on)||(0,we.Z)({},Un);Gn.right=vt-Gn.left-Gn.width,nt.set(on,Gn)}return nt},[De.map(function(Ze){return Ze.key}).join("_"),Fe,Re])}function Rt(De,Fe){var Re=Oe.useRef(De),Ze=Oe.useState({}),nt=(0,me.Z)(Ze,2),ct=nt[1];function vt(nn){var on=typeof nn=="function"?nn(Re.current):nn;on!==Re.current&&Fe(on,Re.current),Re.current=on,ct({})}return[Re.current,vt]}var Sn=.1,un=.01,tt=20,ft=Math.pow(.995,tt);function Xt(De,Fe){var Re=(0,Oe.useState)(),Ze=(0,me.Z)(Re,2),nt=Ze[0],ct=Ze[1],vt=(0,Oe.useState)(0),nn=(0,me.Z)(vt,2),on=nn[0],Un=nn[1],yr=(0,Oe.useState)(0),Gn=(0,me.Z)(yr,2),Cn=Gn[0],vn=Gn[1],Bn=(0,Oe.useState)(),Fn=(0,me.Z)(Bn,2),xr=Fn[0],Qn=Fn[1],Yn=(0,Oe.useRef)();function ir(_t){var ln=_t.touches[0],Mn=ln.screenX,En=ln.screenY;ct({x:Mn,y:En}),window.clearInterval(Yn.current)}function rr(_t){if(nt){_t.preventDefault();var ln=_t.touches[0],Mn=ln.screenX,En=ln.screenY;ct({x:Mn,y:En});var Zn=Mn-nt.x,Nn=En-nt.y;Fe(Zn,Nn);var hn=Date.now();Un(hn),vn(hn-on),Qn({x:Zn,y:Nn})}}function Er(){if(nt&&(ct(null),Qn(null),xr)){var _t=xr.x/Cn,ln=xr.y/Cn,Mn=Math.abs(_t),En=Math.abs(ln);if(Math.max(Mn,En)<Sn)return;var Zn=_t,Nn=ln;Yn.current=window.setInterval(function(){if(Math.abs(Zn)<un&&Math.abs(Nn)<un){window.clearInterval(Yn.current);return}Zn*=ft,Nn*=ft,Fe(Zn*tt,Nn*tt)},tt)}}var He=(0,Oe.useRef)();function We(_t){var ln=_t.deltaX,Mn=_t.deltaY,En=0,Zn=Math.abs(ln),Nn=Math.abs(Mn);Zn===Nn?En=He.current==="x"?ln:Mn:Zn>Nn?(En=ln,He.current="x"):(En=Mn,He.current="y"),Fe(-En,-En)&&_t.preventDefault()}var Nt=(0,Oe.useRef)(null);Nt.current={onTouchStart:ir,onTouchMove:rr,onTouchEnd:Er,onWheel:We},Oe.useEffect(function(){function _t(Zn){Nt.current.onTouchStart(Zn)}function ln(Zn){Nt.current.onTouchMove(Zn)}function Mn(Zn){Nt.current.onTouchEnd(Zn)}function En(Zn){Nt.current.onWheel(Zn)}return document.addEventListener("touchmove",ln,{passive:!1}),document.addEventListener("touchend",Mn,{passive:!1}),De.current.addEventListener("touchstart",_t,{passive:!1}),De.current.addEventListener("wheel",En),function(){document.removeEventListener("touchmove",ln),document.removeEventListener("touchend",Mn)}},[])}function Tn(De){var Fe=(0,Oe.useState)(0),Re=(0,me.Z)(Fe,2),Ze=Re[0],nt=Re[1],ct=(0,Oe.useRef)(0),vt=(0,Oe.useRef)();return vt.current=De,pt(function(){var nn;(nn=vt.current)===null||nn===void 0||nn.call(vt)},[Ze]),function(){ct.current===Ze&&(ct.current+=1,nt(ct.current))}}function mn(De){var Fe=(0,Oe.useRef)([]),Re=(0,Oe.useState)({}),Ze=(0,me.Z)(Re,2),nt=Ze[1],ct=(0,Oe.useRef)(typeof De=="function"?De():De),vt=Tn(function(){var on=ct.current;Fe.current.forEach(function(Un){on=Un(on)}),Fe.current=[],ct.current=on,nt({})});function nn(on){Fe.current.push(on),vt()}return[ct.current,nn]}var Ut={width:0,height:0,left:0,top:0,right:0};function jt(De,Fe,Re,Ze,nt,ct,vt){var nn=vt.tabs,on=vt.tabPosition,Un=vt.rtl,yr,Gn,Cn;return["top","bottom"].includes(on)?(yr="width",Gn=Un?"right":"left",Cn=Math.abs(Re)):(yr="height",Gn="top",Cn=-Re),(0,Oe.useMemo)(function(){if(!nn.length)return[0,0];for(var vn=nn.length,Bn=vn,Fn=0;Fn<vn;Fn+=1){var xr=De.get(nn[Fn].key)||Ut;if(xr[Gn]+xr[yr]>Cn+Fe){Bn=Fn-1;break}}for(var Qn=0,Yn=vn-1;Yn>=0;Yn-=1){var ir=De.get(nn[Yn].key)||Ut;if(ir[Gn]<Cn){Qn=Yn+1;break}}return Qn>=Bn?[0,0]:[Qn,Bn]},[De,Fe,Ze,nt,ct,Cn,on,nn.map(function(vn){return vn.key}).join("_"),Un])}function _n(De){var Fe;return De instanceof Map?(Fe={},De.forEach(function(Re,Ze){Fe[Ze]=Re})):Fe=De,JSON.stringify(Fe)}var yn="TABS_DQ";function Ae(De){return String(De).replace(/"/g,yn)}function ce(De,Fe,Re,Ze){return!(!Re||Ze||De===!1||De===void 0&&(Fe===!1||Fe===null))}function ue(De,Fe){var Re=De.prefixCls,Ze=De.editable,nt=De.locale,ct=De.style;return!Ze||Ze.showAdd===!1?null:Oe.createElement("button",{ref:Fe,type:"button",className:"".concat(Re,"-nav-add"),style:ct,"aria-label":(nt==null?void 0:nt.addAriaLabel)||"Add tab",onClick:function(nn){Ze.onEdit("add",{event:nn})}},Ze.addIcon||"+")}var pe=Oe.forwardRef(ue),he=Oe.forwardRef(function(De,Fe){var Re=De.position,Ze=De.prefixCls,nt=De.extra;if(!nt)return null;var ct,vt={};return(0,Te.Z)(nt)==="object"&&!Oe.isValidElement(nt)?vt=nt:vt.right=nt,Re==="right"&&(ct=vt.right),Re==="left"&&(ct=vt.left),ct?Oe.createElement("div",{className:"".concat(Ze,"-extra-content"),ref:Fe},ct):null}),oe=he,Ie=le(62709);function Qe(De,Fe,Re){var Ze=React.useRef({});return(!("value"in Ze.current)||Re(Ze.current.condition,Fe))&&(Ze.current.value=De(),Ze.current.condition=Fe),Ze.current.value}function Lt(De,Fe){typeof De=="function"?De(Fe):(0,Te.Z)(De)==="object"&&De&&"current"in De&&(De.current=Fe)}function $t(){for(var De=arguments.length,Fe=new Array(De),Re=0;Re<De;Re++)Fe[Re]=arguments[Re];var Ze=Fe.filter(function(nt){return nt});return Ze.length<=1?Ze[0]:function(nt){Fe.forEach(function(ct){Lt(ct,nt)})}}function Kt(){for(var De=arguments.length,Fe=new Array(De),Re=0;Re<De;Re++)Fe[Re]=arguments[Re];return useMemo(function(){return $t.apply(void 0,Fe)},Fe,function(Ze,nt){return Ze.length===nt.length&&Ze.every(function(ct,vt){return ct===nt[vt]})})}function en(De){var Fe,Re,Ze=(0,Et.isMemo)(De)?De.type.type:De.type;return!(typeof Ze=="function"&&!((Fe=Ze.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof De=="function"&&!((Re=De.prototype)!==null&&Re!==void 0&&Re.render))}var Jt={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(Fe){var Re=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||Re>=Jt.F1&&Re<=Jt.F12)return!1;switch(Re){case Jt.ALT:case Jt.CAPS_LOCK:case Jt.CONTEXT_MENU:case Jt.CTRL:case Jt.DOWN:case Jt.END:case Jt.ESC:case Jt.HOME:case Jt.INSERT:case Jt.LEFT:case Jt.MAC_FF_META:case Jt.META:case Jt.NUMLOCK:case Jt.NUM_CENTER:case Jt.PAGE_DOWN:case Jt.PAGE_UP:case Jt.PAUSE:case Jt.PRINT_SCREEN:case Jt.RIGHT:case Jt.SHIFT:case Jt.UP:case Jt.WIN_KEY:case Jt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=Jt.ZERO&&Fe<=Jt.NINE||Fe>=Jt.NUM_ZERO&&Fe<=Jt.NUM_MULTIPLY||Fe>=Jt.A&&Fe<=Jt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case Jt.SPACE:case Jt.QUESTION_MARK:case Jt.NUM_PLUS:case Jt.NUM_MINUS:case Jt.NUM_PERIOD:case Jt.NUM_DIVISION:case Jt.SEMICOLON:case Jt.DASH:case Jt.EQUALS:case Jt.COMMA:case Jt.PERIOD:case Jt.SLASH:case Jt.APOSTROPHE:case Jt.SINGLE_QUOTE:case Jt.OPEN_SQUARE_BRACKET:case Jt.BACKSLASH:case Jt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},et=Jt,wt=function(Fe){return+setTimeout(Fe,16)},Tt=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(wt=function(Fe){return window.requestAnimationFrame(Fe)},Tt=function(Fe){return window.cancelAnimationFrame(Fe)});var Ot=0,yt=new Map;function Dn(De){yt.delete(De)}var gn=function(Fe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ot+=1;var Ze=Ot;function nt(ct){if(ct===0)Dn(Ze),Fe();else{var vt=wt(function(){nt(ct-1)});yt.set(Ze,vt)}}return nt(Re),Ze};gn.cancel=function(De){var Fe=yt.get(De);return Dn(Fe),Tt(Fe)};var $n=gn,Kr=et.ESC,tr=et.TAB;function lr(De){var Fe=De.visible,Re=De.triggerRef,Ze=De.onVisibleChange,nt=De.autoFocus,ct=De.overlayRef,vt=Oe.useRef(!1),nn=function(){if(Fe){var Gn,Cn;(Gn=Re.current)===null||Gn===void 0||(Cn=Gn.focus)===null||Cn===void 0||Cn.call(Gn),Ze==null||Ze(!1)}},on=function(){var Gn;return(Gn=ct.current)!==null&&Gn!==void 0&&Gn.focus?(ct.current.focus(),vt.current=!0,!0):!1},Un=function(Gn){switch(Gn.keyCode){case Kr:nn();break;case tr:{var Cn=!1;vt.current||(Cn=on()),Cn?Gn.preventDefault():nn();break}}};Oe.useEffect(function(){return Fe?(window.addEventListener("keydown",Un),nt&&$n(on,3),function(){window.removeEventListener("keydown",Un),vt.current=!1}):function(){vt.current=!1}},[Fe])}var ur=(0,Oe.forwardRef)(function(De,Fe){var Re=De.overlay,Ze=De.arrow,nt=De.prefixCls,ct=(0,Oe.useMemo)(function(){var nn;return typeof Re=="function"?nn=Re():nn=Re,nn},[Re]),vt=$t(Fe,ct==null?void 0:ct.ref);return Oe.createElement(Oe.Fragment,null,Ze&&Oe.createElement("div",{className:"".concat(nt,"-arrow")}),Oe.cloneElement(ct,{ref:en(ct)?vt:void 0}))}),ni=ur,Xr={adjustX:1,adjustY:1},Qr=[0,0],gi={topLeft:{points:["bl","tl"],overflow:Xr,offset:[0,-4],targetOffset:Qr},top:{points:["bc","tc"],overflow:Xr,offset:[0,-4],targetOffset:Qr},topRight:{points:["br","tr"],overflow:Xr,offset:[0,-4],targetOffset:Qr},bottomLeft:{points:["tl","bl"],overflow:Xr,offset:[0,4],targetOffset:Qr},bottom:{points:["tc","bc"],overflow:Xr,offset:[0,4],targetOffset:Qr},bottomRight:{points:["tr","br"],overflow:Xr,offset:[0,4],targetOffset:Qr}},Sr=gi,Ei=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ui(De,Fe){var Re,Ze=De.arrow,nt=Ze===void 0?!1:Ze,ct=De.prefixCls,vt=ct===void 0?"rc-dropdown":ct,nn=De.transitionName,on=De.animation,Un=De.align,yr=De.placement,Gn=yr===void 0?"bottomLeft":yr,Cn=De.placements,vn=Cn===void 0?Sr:Cn,Bn=De.getPopupContainer,Fn=De.showAction,xr=De.hideAction,Qn=De.overlayClassName,Yn=De.overlayStyle,ir=De.visible,rr=De.trigger,Er=rr===void 0?["hover"]:rr,He=De.autoFocus,We=De.overlay,Nt=De.children,_t=De.onVisibleChange,ln=(0,ot.Z)(De,Ei),Mn=Oe.useState(),En=(0,me.Z)(Mn,2),Zn=En[0],Nn=En[1],hn="visible"in De?ir:Zn,zn=Oe.useRef(null),jn=Oe.useRef(null),hr=Oe.useRef(null);Oe.useImperativeHandle(Fe,function(){return zn.current});var Kn=function(zr){Nn(zr),_t==null||_t(zr)};lr({visible:hn,triggerRef:hr,onVisibleChange:Kn,autoFocus:He,overlayRef:jn});var Ar=function(zr){var Or=De.onOverlayClick;Nn(!1),Or&&Or(zr)},ii=function(){return Oe.createElement(ni,{ref:jn,overlay:We,prefixCls:vt,arrow:nt})},Fr=function(){return typeof We=="function"?ii:ii()},qr=function(){var zr=De.minOverlayWidthMatchTrigger,Or=De.alignPoint;return"minOverlayWidthMatchTrigger"in De?zr:!Or},Ir=function(){var zr=De.openClassName;return zr!==void 0?zr:"".concat(vt,"-open")},Rr=Oe.cloneElement(Nt,{className:ve()((Re=Nt.props)===null||Re===void 0?void 0:Re.className,hn&&Ir()),ref:en(Nt)?$t(hr,Nt.ref):void 0}),li=xr;return!li&&Er.indexOf("contextMenu")!==-1&&(li=["click"]),Oe.createElement(Ie.Z,(0,Se.Z)({builtinPlacements:vn},ln,{prefixCls:vt,ref:zn,popupClassName:ve()(Qn,(0,Me.Z)({},"".concat(vt,"-show-arrow"),nt)),popupStyle:Yn,action:Er,showAction:Fn,hideAction:li,popupPlacement:Gn,popupAlign:Un,popupTransitionName:nn,popupAnimation:on,popupVisible:hn,stretch:qr()?"minWidth":"",popup:Fr(),onPopupVisibleChange:Kn,onPopupClick:Ar,getPopupContainer:Bn}),Rr)}var ea=Oe.forwardRef(Ui),ra=ea,Zi=le(78595),At={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(Fe){var Re=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||Re>=At.F1&&Re<=At.F12)return!1;switch(Re){case At.ALT:case At.CAPS_LOCK:case At.CONTEXT_MENU:case At.CTRL:case At.DOWN:case At.END:case At.ESC:case At.HOME:case At.INSERT:case At.LEFT:case At.MAC_FF_META:case At.META:case At.NUMLOCK:case At.NUM_CENTER:case At.PAGE_DOWN:case At.PAGE_UP:case At.PAUSE:case At.PRINT_SCREEN:case At.RIGHT:case At.SHIFT:case At.UP:case At.WIN_KEY:case At.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=At.ZERO&&Fe<=At.NINE||Fe>=At.NUM_ZERO&&Fe<=At.NUM_MULTIPLY||Fe>=At.A&&Fe<=At.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case At.SPACE:case At.QUESTION_MARK:case At.NUM_PLUS:case At.NUM_MINUS:case At.NUM_PERIOD:case At.NUM_DIVISION:case At.SEMICOLON:case At.DASH:case At.EQUALS:case At.COMMA:case At.PERIOD:case At.SLASH:case At.APOSTROPHE:case At.SINGLE_QUOTE:case At.OPEN_SQUARE_BRACKET:case At.BACKSLASH:case At.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},An=At;function On(De,Fe){var Re=De.prefixCls,Ze=De.id,nt=De.tabs,ct=De.locale,vt=De.mobile,nn=De.moreIcon,on=nn===void 0?"More":nn,Un=De.moreTransitionName,yr=De.style,Gn=De.className,Cn=De.editable,vn=De.tabBarGutter,Bn=De.rtl,Fn=De.removeAriaLabel,xr=De.onTabClick,Qn=De.getPopupContainer,Yn=De.popupClassName,ir=(0,Oe.useState)(!1),rr=(0,me.Z)(ir,2),Er=rr[0],He=rr[1],We=(0,Oe.useState)(null),Nt=(0,me.Z)(We,2),_t=Nt[0],ln=Nt[1],Mn="".concat(Ze,"-more-popup"),En="".concat(Re,"-dropdown"),Zn=_t!==null?"".concat(Mn,"-").concat(_t):null,Nn=ct==null?void 0:ct.dropdownAriaLabel;function hn(Fr,qr){Fr.preventDefault(),Fr.stopPropagation(),Cn.onEdit("remove",{key:qr,event:Fr})}var zn=Oe.createElement(Zi.ZP,{onClick:function(qr){var Ir=qr.key,Rr=qr.domEvent;xr(Ir,Rr),He(!1)},prefixCls:"".concat(En,"-menu"),id:Mn,tabIndex:-1,role:"listbox","aria-activedescendant":Zn,selectedKeys:[_t],"aria-label":Nn!==void 0?Nn:"expanded dropdown"},nt.map(function(Fr){var qr=Fr.closable,Ir=Fr.disabled,Rr=Fr.closeIcon,li=Fr.key,pi=Fr.label,zr=ce(qr,Rr,Cn,Ir);return Oe.createElement(Zi.sN,{key:li,id:"".concat(Mn,"-").concat(li),role:"option","aria-controls":Ze&&"".concat(Ze,"-panel-").concat(li),disabled:Ir},Oe.createElement("span",null,pi),zr&&Oe.createElement("button",{type:"button","aria-label":Fn||"remove",tabIndex:0,className:"".concat(En,"-menu-item-remove"),onClick:function(mi){mi.stopPropagation(),hn(mi,li)}},Rr||Cn.removeIcon||"\xD7"))}));function jn(Fr){for(var qr=nt.filter(function(zr){return!zr.disabled}),Ir=qr.findIndex(function(zr){return zr.key===_t})||0,Rr=qr.length,li=0;li<Rr;li+=1){Ir=(Ir+Fr+Rr)%Rr;var pi=qr[Ir];if(!pi.disabled){ln(pi.key);return}}}function hr(Fr){var qr=Fr.which;if(!Er){[An.DOWN,An.SPACE,An.ENTER].includes(qr)&&(He(!0),Fr.preventDefault());return}switch(qr){case An.UP:jn(-1),Fr.preventDefault();break;case An.DOWN:jn(1),Fr.preventDefault();break;case An.ESC:He(!1);break;case An.SPACE:case An.ENTER:_t!==null&&xr(_t,Fr);break}}(0,Oe.useEffect)(function(){var Fr=document.getElementById(Zn);Fr&&Fr.scrollIntoView&&Fr.scrollIntoView(!1)},[_t]),(0,Oe.useEffect)(function(){Er||ln(null)},[Er]);var Kn=(0,Me.Z)({},Bn?"marginRight":"marginLeft",vn);nt.length||(Kn.visibility="hidden",Kn.order=1);var Ar=ve()((0,Me.Z)({},"".concat(En,"-rtl"),Bn)),ii=vt?null:Oe.createElement(ra,{prefixCls:En,overlay:zn,trigger:["hover"],visible:nt.length?Er:!1,transitionName:Un,onVisibleChange:He,overlayClassName:ve()(Ar,Yn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Qn},Oe.createElement("button",{type:"button",className:"".concat(Re,"-nav-more"),style:Kn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Mn,id:"".concat(Ze,"-more"),"aria-expanded":Er,onKeyDown:hr},on));return Oe.createElement("div",{className:ve()("".concat(Re,"-nav-operations"),Gn),style:yr,ref:Fe},ii,Oe.createElement(pe,{prefixCls:Re,locale:ct,editable:Cn}))}var wn=Oe.memo(Oe.forwardRef(On),function(De,Fe){return Fe.tabMoving});function kr(De){var Fe,Re=De.prefixCls,Ze=De.id,nt=De.active,ct=De.tab,vt=ct.key,nn=ct.label,on=ct.disabled,Un=ct.closeIcon,yr=De.closable,Gn=De.renderWrapper,Cn=De.removeAriaLabel,vn=De.editable,Bn=De.onClick,Fn=De.onFocus,xr=De.style,Qn="".concat(Re,"-tab"),Yn=ce(yr,Un,vn,on);function ir(He){on||Bn(He)}function rr(He){He.preventDefault(),He.stopPropagation(),vn.onEdit("remove",{key:vt,event:He})}var Er=Oe.createElement("div",{key:vt,"data-node-key":Ae(vt),className:ve()(Qn,(Fe={},(0,Me.Z)(Fe,"".concat(Qn,"-with-remove"),Yn),(0,Me.Z)(Fe,"".concat(Qn,"-active"),nt),(0,Me.Z)(Fe,"".concat(Qn,"-disabled"),on),Fe)),style:xr,onClick:ir},Oe.createElement("div",{role:"tab","aria-selected":nt,id:Ze&&"".concat(Ze,"-tab-").concat(vt),className:"".concat(Qn,"-btn"),"aria-controls":Ze&&"".concat(Ze,"-panel-").concat(vt),"aria-disabled":on,tabIndex:on?null:0,onClick:function(We){We.stopPropagation(),ir(We)},onKeyDown:function(We){[An.SPACE,An.ENTER].includes(We.which)&&(We.preventDefault(),ir(We))},onFocus:Fn},nn),Yn&&Oe.createElement("button",{type:"button","aria-label":Cn||"remove",tabIndex:0,className:"".concat(Qn,"-remove"),onClick:function(We){We.stopPropagation(),rr(We)}},Un||vn.removeIcon||"\xD7"));return Gn?Gn(Er):Er}var or=kr,ar=function(Fe){return+setTimeout(Fe,16)},Rn=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ar=function(Fe){return window.requestAnimationFrame(Fe)},Rn=function(Fe){return window.cancelAnimationFrame(Fe)});var it=0,dt=new Map;function Bt(De){dt.delete(De)}var qt=function(Fe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;it+=1;var Ze=it;function nt(ct){if(ct===0)Bt(Ze),Fe();else{var vt=ar(function(){nt(ct-1)});dt.set(Ze,vt)}}return nt(Re),Ze};qt.cancel=function(De){var Fe=dt.get(De);return Bt(Fe),Rn(Fe)};var je=qt,Ct=function(Fe){var Re=Fe.activeTabOffset,Ze=Fe.horizontal,nt=Fe.rtl,ct=Fe.indicatorSize,vt=(0,Oe.useState)(),nn=(0,me.Z)(vt,2),on=nn[0],Un=nn[1],yr=(0,Oe.useRef)(),Gn=function(Bn){return typeof ct=="function"?ct(Bn):typeof ct=="number"?ct:Bn};function Cn(){je.cancel(yr.current)}return(0,Oe.useEffect)(function(){var vn={};return Re&&(Ze?(nt?(vn.right=Re.right+Re.width/2,vn.transform="translateX(50%)"):(vn.left=Re.left+Re.width/2,vn.transform="translateX(-50%)"),vn.width=Gn(Re.width)):(vn.top=Re.top+Re.height/2,vn.transform="translateY(-50%)",vn.height=Gn(Re.height))),Cn(),yr.current=je(function(){Un(vn)}),Cn},[Re,Ze,nt,ct]),{style:on}},Wt=Ct,Ft=function(Fe){var Re=Fe.current||{},Ze=Re.offsetWidth,nt=Ze===void 0?0:Ze,ct=Re.offsetHeight,vt=ct===void 0?0:ct;return[nt,vt]},an=function(Fe,Re){return Fe[Re?0:1]};function rn(De,Fe){var Re,Ze=Oe.useContext(Ve),nt=Ze.prefixCls,ct=Ze.tabs,vt=De.className,nn=De.style,on=De.id,Un=De.animated,yr=De.activeKey,Gn=De.rtl,Cn=De.extra,vn=De.editable,Bn=De.locale,Fn=De.tabPosition,xr=De.tabBarGutter,Qn=De.children,Yn=De.onTabClick,ir=De.onTabScroll,rr=De.indicatorSize,Er=(0,Oe.useRef)(),He=(0,Oe.useRef)(),We=(0,Oe.useRef)(),Nt=(0,Oe.useRef)(),_t=(0,Oe.useRef)(),ln=(0,Oe.useRef)(),Mn=(0,Oe.useRef)(),En=Fn==="top"||Fn==="bottom",Zn=Rt(0,function(ia,Fi){En&&ir&&ir({direction:ia>Fi?"left":"right"})}),Nn=(0,me.Z)(Zn,2),hn=Nn[0],zn=Nn[1],jn=Rt(0,function(ia,Fi){!En&&ir&&ir({direction:ia>Fi?"top":"bottom"})}),hr=(0,me.Z)(jn,2),Kn=hr[0],Ar=hr[1],ii=(0,Oe.useState)([0,0]),Fr=(0,me.Z)(ii,2),qr=Fr[0],Ir=Fr[1],Rr=(0,Oe.useState)([0,0]),li=(0,me.Z)(Rr,2),pi=li[0],zr=li[1],Or=(0,Oe.useState)([0,0]),mi=(0,me.Z)(Or,2),Yi=mi[0],Xi=mi[1],Pi=(0,Oe.useState)([0,0]),Ji=(0,me.Z)(Pi,2),ta=Ji[0],_i=Ji[1],Hi=mn(new Map),ui=(0,me.Z)(Hi,2),xi=ui[0],Ni=ui[1],Qi=Le(ct,xi,pi[0]),Ra=an(qr,En),$a=an(pi,En),Aa=an(Yi,En),ua=an(ta,En),na=Ra<$a+Aa,Di=na?Ra-ua:Ra-Aa,Ba="".concat(nt,"-nav-operations-hidden"),Bi=0,ci=0;En&&Gn?(Bi=0,ci=Math.max(0,$a-Di)):(Bi=Math.min(0,Di-$a),ci=0);function ji(ia){return ia<Bi?Bi:ia>ci?ci:ia}var ca=(0,Oe.useRef)(),qi=(0,Oe.useState)(),oa=(0,me.Z)(qi,2),wi=oa[0],pa=oa[1];function xa(){pa(Date.now())}function fa(){window.clearTimeout(ca.current)}Xt(Nt,function(ia,Fi){function Ta(ka,uo){ka(function(ao){var hs=ji(ao+uo);return hs})}return na?(En?Ta(zn,ia):Ta(Ar,Fi),fa(),xa(),!0):!1}),(0,Oe.useEffect)(function(){return fa(),wi&&(ca.current=window.setTimeout(function(){pa(0)},100)),fa},[wi]);var Sa=jt(Qi,Di,En?hn:Kn,$a,Aa,ua,(0,we.Z)((0,we.Z)({},De),{},{tabs:ct})),Ma=(0,me.Z)(Sa,2),Va=Ma[0],ha=Ma[1],_a=lt(function(){var ia=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yr,Fi=Qi.get(ia)||{width:0,height:0,left:0,right:0,top:0};if(En){var Ta=hn;Gn?Fi.right<hn?Ta=Fi.right:Fi.right+Fi.width>hn+Di&&(Ta=Fi.right+Fi.width-Di):Fi.left<-hn?Ta=-Fi.left:Fi.left+Fi.width>-hn+Di&&(Ta=-(Fi.left+Fi.width-Di)),Ar(0),zn(ji(Ta))}else{var ka=Kn;Fi.top<-Kn?ka=-Fi.top:Fi.top+Fi.height>-Kn+Di&&(ka=-(Fi.top+Fi.height-Di)),zn(0),Ar(ji(ka))}}),Ja={};Fn==="top"||Fn==="bottom"?Ja[Gn?"marginRight":"marginLeft"]=xr:Ja.marginTop=xr;var Ga=ct.map(function(ia,Fi){var Ta=ia.key;return Oe.createElement(or,{id:on,prefixCls:nt,key:Ta,tab:ia,style:Fi===0?void 0:Ja,closable:ia.closable,editable:vn,active:Ta===yr,renderWrapper:Qn,removeAriaLabel:Bn==null?void 0:Bn.removeAriaLabel,onClick:function(uo){Yn(Ta,uo)},onFocus:function(){_a(Ta),xa(),Nt.current&&(Gn||(Nt.current.scrollLeft=0),Nt.current.scrollTop=0)}})}),so=function(){return Ni(function(){var Fi=new Map;return ct.forEach(function(Ta){var ka,uo=Ta.key,ao=(ka=_t.current)===null||ka===void 0?void 0:ka.querySelector('[data-node-key="'.concat(Ae(uo),'"]'));ao&&Fi.set(uo,{width:ao.offsetWidth,height:ao.offsetHeight,left:ao.offsetLeft,top:ao.offsetTop})}),Fi})};(0,Oe.useEffect)(function(){so()},[ct.map(function(ia){return ia.key}).join("_")]);var Fa=Tn(function(){var ia=Ft(Er),Fi=Ft(He),Ta=Ft(We);Ir([ia[0]-Fi[0]-Ta[0],ia[1]-Fi[1]-Ta[1]]);var ka=Ft(Mn);Xi(ka);var uo=Ft(ln);_i(uo);var ao=Ft(_t);zr([ao[0]-ka[0],ao[1]-ka[1]]),so()}),Ca=ct.slice(0,Va),Oi=ct.slice(ha+1),Vi=[].concat((0,Ke.Z)(Ca),(0,Ke.Z)(Oi)),da=Qi.get(yr),wa=Wt({activeTabOffset:da,horizontal:En,rtl:Gn,indicatorSize:rr}),Ka=wa.style;(0,Oe.useEffect)(function(){_a()},[yr,Bi,ci,_n(da),_n(Qi),En]),(0,Oe.useEffect)(function(){Fa()},[Gn]);var io=!!Vi.length,ho="".concat(nt,"-nav-wrap"),Bo,Oo,lo,Ao;return En?Gn?(Oo=hn>0,Bo=hn!==ci):(Bo=hn<0,Oo=hn!==Bi):(lo=Kn<0,Ao=Kn!==Bi),Oe.createElement(Pt.Z,{onResize:Fa},Oe.createElement("div",{ref:fn(Fe,Er),role:"tablist",className:ve()("".concat(nt,"-nav"),vt),style:nn,onKeyDown:function(){xa()}},Oe.createElement(oe,{ref:He,position:"left",extra:Cn,prefixCls:nt}),Oe.createElement(Pt.Z,{onResize:Fa},Oe.createElement("div",{className:ve()(ho,(Re={},(0,Me.Z)(Re,"".concat(ho,"-ping-left"),Bo),(0,Me.Z)(Re,"".concat(ho,"-ping-right"),Oo),(0,Me.Z)(Re,"".concat(ho,"-ping-top"),lo),(0,Me.Z)(Re,"".concat(ho,"-ping-bottom"),Ao),Re)),ref:Nt},Oe.createElement(Pt.Z,{onResize:Fa},Oe.createElement("div",{ref:_t,className:"".concat(nt,"-nav-list"),style:{transform:"translate(".concat(hn,"px, ").concat(Kn,"px)"),transition:wi?"none":void 0}},Ga,Oe.createElement(pe,{ref:Mn,prefixCls:nt,locale:Bn,editable:vn,style:(0,we.Z)((0,we.Z)({},Ga.length===0?void 0:Ja),{},{visibility:io?"hidden":null})}),Oe.createElement("div",{className:ve()("".concat(nt,"-ink-bar"),(0,Me.Z)({},"".concat(nt,"-ink-bar-animated"),Un.inkBar)),style:Ka}))))),Oe.createElement(wn,(0,Se.Z)({},De,{removeAriaLabel:Bn==null?void 0:Bn.removeAriaLabel,ref:ln,prefixCls:nt,tabs:Vi,className:!io&&Ba,tabMoving:!!wi})),Oe.createElement(oe,{ref:We,position:"right",extra:Cn,prefixCls:nt})))}var Vn=Oe.forwardRef(rn),Pr=["renderTabBar"],nr=["label","key"];function Xn(De){var Fe=De.renderTabBar,Re=(0,ot.Z)(De,Pr),Ze=Oe.useContext(Ve),nt=Ze.tabs;if(Fe){var ct=(0,we.Z)((0,we.Z)({},Re),{},{panes:nt.map(function(vt){var nn=vt.label,on=vt.key,Un=(0,ot.Z)(vt,nr);return Oe.createElement(Mt,(0,Se.Z)({tab:nn,key:on,tabKey:on},Un))})});return Fe(ct,Vn)}return Oe.createElement(Vn,Re)}var mr={},fr=[],Yr=function(Fe){fr.push(Fe)};function xn(De,Fe){if(0)var Re}function qn(De,Fe){if(0)var Re}function Si(){mr={}}function Ii(De,Fe,Re){!Fe&&!mr[Re]&&(De(!1,Re),mr[Re]=!0)}function di(De,Fe){Ii(xn,De,Fe)}function si(De,Fe){Ii(qn,De,Fe)}di.preMessage=Yr,di.resetWarned=Si,di.noteOnce=si;var zi=null;function Lr(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Fe;return De===!1?Fe={inkBar:!1,tabPane:!1}:De===!0?Fe={inkBar:!0,tabPane:!1}:Fe=(0,we.Z)({inkBar:!0},(0,Te.Z)(De)==="object"?De:{}),Fe.tabPaneMotion&&Fe.tabPane===void 0&&(Fe.tabPane=!0),!Fe.tabPaneMotion&&Fe.tabPane&&(Fe.tabPane=!1),Fe}var Mi=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],Pn=0;function Qt(De,Fe){var Re,Ze=De.id,nt=De.prefixCls,ct=nt===void 0?"rc-tabs":nt,vt=De.className,nn=De.items,on=De.direction,Un=De.activeKey,yr=De.defaultActiveKey,Gn=De.editable,Cn=De.animated,vn=De.tabPosition,Bn=vn===void 0?"top":vn,Fn=De.tabBarGutter,xr=De.tabBarStyle,Qn=De.tabBarExtraContent,Yn=De.locale,ir=De.moreIcon,rr=De.moreTransitionName,Er=De.destroyInactiveTabPane,He=De.renderTabBar,We=De.onChange,Nt=De.onTabClick,_t=De.onTabScroll,ln=De.getPopupContainer,Mn=De.popupClassName,En=De.indicatorSize,Zn=(0,ot.Z)(De,Mi),Nn=Oe.useMemo(function(){return(nn||[]).filter(function(_i){return _i&&(0,Te.Z)(_i)==="object"&&"key"in _i})},[nn]),hn=on==="rtl",zn=Lr(Cn),jn=(0,Oe.useState)(!1),hr=(0,me.Z)(jn,2),Kn=hr[0],Ar=hr[1];(0,Oe.useEffect)(function(){Ar(st())},[]);var ii=xe(function(){var _i;return(_i=Nn[0])===null||_i===void 0?void 0:_i.key},{value:Un,defaultValue:yr}),Fr=(0,me.Z)(ii,2),qr=Fr[0],Ir=Fr[1],Rr=(0,Oe.useState)(function(){return Nn.findIndex(function(_i){return _i.key===qr})}),li=(0,me.Z)(Rr,2),pi=li[0],zr=li[1];(0,Oe.useEffect)(function(){var _i=Nn.findIndex(function(ui){return ui.key===qr});if(_i===-1){var Hi;_i=Math.max(0,Math.min(pi,Nn.length-1)),Ir((Hi=Nn[_i])===null||Hi===void 0?void 0:Hi.key)}zr(_i)},[Nn.map(function(_i){return _i.key}).join("_"),qr,pi]);var Or=xe(null,{value:Ze}),mi=(0,me.Z)(Or,2),Yi=mi[0],Xi=mi[1];(0,Oe.useEffect)(function(){Ze||(Xi("rc-tabs-".concat(Pn)),Pn+=1)},[]);function Pi(_i,Hi){Nt==null||Nt(_i,Hi);var ui=_i!==qr;Ir(_i),ui&&(We==null||We(_i))}var Ji={id:Yi,activeKey:qr,animated:zn,tabPosition:Bn,rtl:hn,mobile:Kn},ta=(0,we.Z)((0,we.Z)({},Ji),{},{editable:Gn,locale:Yn,moreIcon:ir,moreTransitionName:rr,tabBarGutter:Fn,onTabClick:Pi,onTabScroll:_t,extra:Qn,style:xr,panes:null,getPopupContainer:ln,popupClassName:Mn,indicatorSize:En});return Oe.createElement(Ve.Provider,{value:{tabs:Nn,prefixCls:ct}},Oe.createElement("div",(0,Se.Z)({ref:Fe,id:Ze,className:ve()(ct,"".concat(ct,"-").concat(Bn),(Re={},(0,Me.Z)(Re,"".concat(ct,"-mobile"),Kn),(0,Me.Z)(Re,"".concat(ct,"-editable"),Gn),(0,Me.Z)(Re,"".concat(ct,"-rtl"),hn),Re),vt)},Zn),Oe.createElement(Xn,(0,Se.Z)({},ta,{renderTabBar:He})),Oe.createElement(St,(0,Se.Z)({destroyInactiveTabPane:Er},Ji,{animated:zn}))))}var Gt=Oe.forwardRef(Qt),kt=Gt,Wn=kt,ri=le(53124),Ai=le(98675),Hn=()=>null,tn=le(33603);const Ur={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Jr(De){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Re;return Fe===!1?Re={inkBar:!1,tabPane:!1}:Fe===!0?Re={inkBar:!0,tabPane:!0}:Re=Object.assign({inkBar:!0},typeof Fe=="object"?Fe:{}),Re.tabPane&&(Re.tabPaneMotion=Object.assign(Object.assign({},Ur),{motionName:(0,tn.m)(De,"switch")})),Re}var ai=le(37419),Ti=function(De,Fe){var Re={};for(var Ze in De)Object.prototype.hasOwnProperty.call(De,Ze)&&Fe.indexOf(Ze)<0&&(Re[Ze]=De[Ze]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Ze=Object.getOwnPropertySymbols(De);nt<Ze.length;nt++)Fe.indexOf(Ze[nt])<0&&Object.prototype.propertyIsEnumerable.call(De,Ze[nt])&&(Re[Ze[nt]]=De[Ze[nt]]);return Re};function Ki(De){return De.filter(Fe=>Fe)}function Tr(De,Fe){if(De)return De;const Re=(0,ai.Z)(Fe).map(Ze=>{if(Oe.isValidElement(Ze)){const{key:nt,props:ct}=Ze,vt=ct||{},{tab:nn}=vt,on=Ti(vt,["tab"]);return Object.assign(Object.assign({key:String(nt)},on),{label:nn})}return null});return Ki(Re)}var Gr=le(14747),gt=le(67968),ht=le(45503),Ht=le(67771),Ln=De=>{const{componentCls:Fe,motionDurationSlow:Re}=De;return[{[Fe]:{[`${Fe}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Re}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Re}`}}}}},[(0,Ht.oN)(De,"slide-up"),(0,Ht.oN)(De,"slide-down")]]};const gr=De=>{const{componentCls:Fe,tabsCardPadding:Re,cardBg:Ze,cardGutter:nt,colorBorderSecondary:ct,itemSelectedColor:vt}=De;return{[`${Fe}-card`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{margin:0,padding:Re,background:Ze,border:`${De.lineWidth}px ${De.lineType} ${ct}`,transition:`all ${De.motionDurationSlow} ${De.motionEaseInOut}`},[`${Fe}-tab-active`]:{color:vt,background:De.colorBgContainer},[`${Fe}-ink-bar`]:{visibility:"hidden"}},[`&${Fe}-top, &${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginLeft:{_skip_check_:!0,value:`${nt}px`}}}},[`&${Fe}-top`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`${De.borderRadiusLG}px ${De.borderRadiusLG}px 0 0`},[`${Fe}-tab-active`]:{borderBottomColor:De.colorBgContainer}}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`0 0 ${De.borderRadiusLG}px ${De.borderRadiusLG}px`},[`${Fe}-tab-active`]:{borderTopColor:De.colorBgContainer}}},[`&${Fe}-left, &${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginTop:`${nt}px`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${De.borderRadiusLG}px 0 0 ${De.borderRadiusLG}px`}},[`${Fe}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:De.colorBgContainer}}}},[`&${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${De.borderRadiusLG}px ${De.borderRadiusLG}px 0`}},[`${Fe}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:De.colorBgContainer}}}}}}},vr=De=>{const{componentCls:Fe,itemHoverColor:Re,dropdownEdgeChildVerticalPadding:Ze}=De;return{[`${Fe}-dropdown`]:Object.assign(Object.assign({},(0,Gr.Wf)(De)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:De.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Fe}-dropdown-menu`]:{maxHeight:De.tabsDropdownHeight,margin:0,padding:`${Ze}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:De.colorBgContainer,backgroundClip:"padding-box",borderRadius:De.borderRadiusLG,outline:"none",boxShadow:De.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Gr.vS),{display:"flex",alignItems:"center",minWidth:De.tabsDropdownWidth,margin:0,padding:`${De.paddingXXS}px ${De.paddingSM}px`,color:De.colorText,fontWeight:"normal",fontSize:De.fontSize,lineHeight:De.lineHeight,cursor:"pointer",transition:`all ${De.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:De.marginSM},color:De.colorTextDescription,fontSize:De.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Re}},"&:hover":{background:De.controlItemBgHover},"&-disabled":{"&, &:hover":{color:De.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Mr=De=>{const{componentCls:Fe,margin:Re,colorBorderSecondary:Ze,horizontalMargin:nt,verticalItemPadding:ct,verticalItemMargin:vt}=De;return{[`${Fe}-top, ${Fe}-bottom`]:{flexDirection:"column",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{margin:nt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${De.lineWidth}px ${De.lineType} ${Ze}`,content:"''"},[`${Fe}-ink-bar`]:{height:De.lineWidthBold,"&-animated":{transition:`width ${De.motionDurationSlow}, left ${De.motionDurationSlow},
|
|
|
right ${De.motionDurationSlow}`}},[`${Fe}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:De.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:De.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:De.boxShadowTabsOverflowRight},[`&${Fe}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Fe}-top`]:{[`> ${Fe}-nav,
|
|
|
> div > ${Fe}-nav`]:{"&::before":{bottom:0},[`${Fe}-ink-bar`]:{bottom:0}}},[`${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,marginTop:`${Re}px`,marginBottom:0,"&::before":{top:0},[`${Fe}-ink-bar`]:{top:0}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0}},[`${Fe}-left, ${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{flexDirection:"column",minWidth:De.controlHeight*1.25,[`${Fe}-tab`]:{padding:ct,textAlign:"center"},[`${Fe}-tab + ${Fe}-tab`]:{margin:vt},[`${Fe}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:De.controlHeight},"&::before":{top:0,boxShadow:De.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:De.boxShadowTabsOverflowBottom},[`&${Fe}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Fe}-ink-bar`]:{width:De.lineWidthBold,"&-animated":{transition:`height ${De.motionDurationSlow}, top ${De.motionDurationSlow}`}},[`${Fe}-nav-list, ${Fe}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${De.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${De.lineWidth}px ${De.lineType} ${De.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:De.paddingLG}}}},[`${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,[`${Fe}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-De.lineWidth},borderRight:{_skip_check_:!0,value:`${De.lineWidth}px ${De.lineType} ${De.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingRight:{_skip_check_:!0,value:De.paddingLG}}}}}},Cr=De=>{const{componentCls:Fe,cardPaddingSM:Re,cardPaddingLG:Ze,horizontalItemPaddingSM:nt,horizontalItemPaddingLG:ct}=De;return{[Fe]:{"&-small":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:nt,fontSize:De.titleFontSizeSM}}},"&-large":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:ct,fontSize:De.titleFontSizeLG}}}},[`${Fe}-card`]:{[`&${Fe}-small`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:Re}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`0 0 ${De.borderRadius}px ${De.borderRadius}px`}},[`&${Fe}-top`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`${De.borderRadius}px ${De.borderRadius}px 0 0`}},[`&${Fe}-right`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${De.borderRadius}px ${De.borderRadius}px 0`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${De.borderRadius}px 0 0 ${De.borderRadius}px`}}}},[`&${Fe}-large`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:Ze}}}}}},br=De=>{const{componentCls:Fe,itemActiveColor:Re,itemHoverColor:Ze,iconCls:nt,tabsHorizontalItemMargin:ct,horizontalItemPadding:vt,itemSelectedColor:nn,itemColor:on}=De,Un=`${Fe}-tab`;return{[Un]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:vt,fontSize:De.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:on,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Re}},(0,Gr.Qy)(De)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-De.marginXXS},marginLeft:{_skip_check_:!0,value:De.marginXS},color:De.colorTextDescription,fontSize:De.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${De.motionDurationSlow}`,"&:hover":{color:De.colorTextHeading}},"&:hover":{color:Ze},[`&${Un}-active ${Un}-btn`]:{color:nn,textShadow:De.tabsActiveTextShadow},[`&${Un}-disabled`]:{color:De.colorTextDisabled,cursor:"not-allowed"},[`&${Un}-disabled ${Un}-btn, &${Un}-disabled ${Fe}-remove`]:{"&:focus, &:active":{color:De.colorTextDisabled}},[`& ${Un}-remove ${nt}`]:{margin:0},[nt]:{marginRight:{_skip_check_:!0,value:De.marginSM}}},[`${Un} + ${Un}`]:{margin:{_skip_check_:!0,value:ct}}}},cr=De=>{const{componentCls:Fe,tabsHorizontalItemMarginRTL:Re,iconCls:Ze,cardGutter:nt}=De;return{[`${Fe}-rtl`]:{direction:"rtl",[`${Fe}-nav`]:{[`${Fe}-tab`]:{margin:{_skip_check_:!0,value:Re},[`${Fe}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Ze]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${De.marginSM}px`}},[`${Fe}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${De.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${De.marginXXS}px`},[Ze]:{margin:0}}}},[`&${Fe}-left`]:{[`> ${Fe}-nav`]:{order:1},[`> ${Fe}-content-holder`]:{order:0}},[`&${Fe}-right`]:{[`> ${Fe}-nav`]:{order:0},[`> ${Fe}-content-holder`]:{order:1}},[`&${Fe}-card${Fe}-top, &${Fe}-card${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginRight:{_skip_check_:!0,value:nt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Fe}-dropdown-rtl`]:{direction:"rtl"},[`${Fe}-menu-item`]:{[`${Fe}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},fi=De=>{const{componentCls:Fe,tabsCardPadding:Re,cardHeight:Ze,cardGutter:nt,itemHoverColor:ct,itemActiveColor:vt,colorBorderSecondary:nn}=De;return{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Gr.Wf)(De)),{display:"flex",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Fe}-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 ${De.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Fe}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${De.motionDurationSlow}`},[`${Fe}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Fe}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Fe}-nav-more`]:{position:"relative",padding:Re,background:"transparent",border:0,color:De.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:De.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Fe}-nav-add`]:Object.assign({minWidth:Ze,marginLeft:{_skip_check_:!0,value:nt},padding:`0 ${De.paddingXS}px`,background:"transparent",border:`${De.lineWidth}px ${De.lineType} ${nn}`,borderRadius:`${De.borderRadiusLG}px ${De.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:De.colorText,transition:`all ${De.motionDurationSlow} ${De.motionEaseInOut}`,"&:hover":{color:ct},"&:active, &:focus:not(:focus-visible)":{color:vt}},(0,Gr.Qy)(De))},[`${Fe}-extra-content`]:{flex:"none"},[`${Fe}-ink-bar`]:{position:"absolute",background:De.inkBarColor,pointerEvents:"none"}}),br(De)),{[`${Fe}-content`]:{position:"relative",width:"100%"},[`${Fe}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Fe}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Fe}-centered`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-nav-wrap`]:{[`&:not([class*='${Fe}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Dr=(0,gt.Z)("Tabs",De=>{const Fe=(0,ht.TS)(De,{tabsCardPadding:De.cardPadding||`${(De.cardHeight-Math.round(De.fontSize*De.lineHeight))/2-De.lineWidth}px ${De.padding}px`,dropdownEdgeChildVerticalPadding:De.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${De.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${De.horizontalItemGutter}px`});return[Cr(Fe),cr(Fe),Mr(Fe),vr(Fe),gr(Fe),fi(Fe),Ln(Fe)]},De=>{const Fe=De.controlHeightLG;return{zIndexPopup:De.zIndexPopupBase+50,cardBg:De.colorFillAlter,cardHeight:Fe,cardPadding:"",cardPaddingSM:`${De.paddingXXS*1.5}px ${De.padding}px`,cardPaddingLG:`${De.paddingXS}px ${De.padding}px ${De.paddingXXS*1.5}px`,titleFontSize:De.fontSize,titleFontSizeLG:De.fontSizeLG,titleFontSizeSM:De.fontSize,inkBarColor:De.colorPrimary,horizontalMargin:`0 0 ${De.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${De.paddingSM}px 0`,horizontalItemPaddingSM:`${De.paddingXS}px 0`,horizontalItemPaddingLG:`${De.padding}px 0`,verticalItemPadding:`${De.paddingXS}px ${De.paddingLG}px`,verticalItemMargin:`${De.margin}px 0 0 0`,itemColor:De.colorText,itemSelectedColor:De.colorPrimary,itemHoverColor:De.colorPrimaryHover,itemActiveColor:De.colorPrimaryActive,cardGutter:De.marginXXS/2}}),dr=function(De,Fe){var Re={};for(var Ze in De)Object.prototype.hasOwnProperty.call(De,Ze)&&Fe.indexOf(Ze)<0&&(Re[Ze]=De[Ze]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Ze=Object.getOwnPropertySymbols(De);nt<Ze.length;nt++)Fe.indexOf(Ze[nt])<0&&Object.prototype.propertyIsEnumerable.call(De,Ze[nt])&&(Re[Ze[nt]]=De[Ze[nt]]);return Re};const ei=De=>{const{type:Fe,className:Re,rootClassName:Ze,size:nt,onEdit:ct,hideAdd:vt,centered:nn,addIcon:on,popupClassName:Un,children:yr,items:Gn,animated:Cn,style:vn,indicatorSize:Bn}=De,Fn=dr(De,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:xr,moreIcon:Qn=Oe.createElement(Be.Z,null)}=Fn,{direction:Yn,tabs:ir,getPrefixCls:rr,getPopupContainer:Er}=Oe.useContext(ri.E_),He=rr("tabs",xr),[We,Nt]=Dr(He);let _t;Fe==="editable-card"&&(_t={onEdit:(hn,zn)=>{let{key:jn,event:hr}=zn;ct==null||ct(hn==="add"?hr:jn,hn)},removeIcon:Oe.createElement(se.Z,null),addIcon:on||Oe.createElement(Ne.Z,null),showAdd:vt!==!0});const ln=rr(),Mn=Tr(Gn,yr),En=Jr(He,Cn),Zn=(0,Ai.Z)(nt),Nn=Object.assign(Object.assign({},ir==null?void 0:ir.style),vn);return We(Oe.createElement(Wn,Object.assign({direction:Yn,getPopupContainer:Er,moreTransitionName:`${ln}-slide-up`},Fn,{items:Mn,className:ve()({[`${He}-${Zn}`]:Zn,[`${He}-card`]:["card","editable-card"].includes(Fe),[`${He}-editable-card`]:Fe==="editable-card",[`${He}-centered`]:nn},ir==null?void 0:ir.className,Re,Ze,Nt),popupClassName:ve()(Un,Nt),style:Nn,editable:_t,moreIcon:Qn,prefixCls:He,animated:En,indicatorSize:Bn!=null?Bn:ir==null?void 0:ir.indicatorSize})))};ei.TabPane=Hn;var jr=ei},66309:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return St}});var se=le(67294),Be=le(73475),Ne=le(94184),Ye=le.n(Ne),ve=le(98787),Se=le(69760),Me=le(45353),we=le(53124),me=le(14747),Te=le(45503),ot=le(67968);const Oe=Ke=>{const{paddingXXS:Pt,lineWidth:Et,tagPaddingHorizontal:Yt,componentCls:at}=Ke,Vt=Yt-Et,fn=Pt-Et;return{[at]:Object.assign(Object.assign({},(0,me.Wf)(Ke)),{display:"inline-block",height:"auto",marginInlineEnd:Ke.marginXS,paddingInline:Vt,fontSize:Ke.tagFontSize,lineHeight:Ke.tagLineHeight,whiteSpace:"nowrap",background:Ke.defaultBg,border:`${Ke.lineWidth}px ${Ke.lineType} ${Ke.colorBorder}`,borderRadius:Ke.borderRadiusSM,opacity:1,transition:`all ${Ke.motionDurationMid}`,textAlign:"start",position:"relative",[`&${at}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ke.defaultColor},[`${at}-close-icon`]:{marginInlineStart:fn,color:Ke.colorTextDescription,fontSize:Ke.tagIconSize,cursor:"pointer",transition:`all ${Ke.motionDurationMid}`,"&:hover":{color:Ke.colorTextHeading}},[`&${at}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ke.iconCls}-close, ${Ke.iconCls}-close:hover`]:{color:Ke.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${at}-checkable-checked):hover`]:{color:Ke.colorPrimary,backgroundColor:Ke.colorFillSecondary},"&:active, &-checked":{color:Ke.colorTextLightSolid},"&-checked":{backgroundColor:Ke.colorPrimary,"&:hover":{backgroundColor:Ke.colorPrimaryHover}},"&:active":{backgroundColor:Ke.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ke.iconCls} + span, > span + ${Ke.iconCls}`]:{marginInlineStart:Vt}}),[`${at}-borderless`]:{borderColor:"transparent",background:Ke.tagBorderlessBg}}},st=Ke=>{const{lineWidth:Pt,fontSizeIcon:Et}=Ke,Yt=Ke.fontSizeSM,at=`${Ke.lineHeightSM*Yt}px`;return(0,Te.TS)(Ke,{tagFontSize:Yt,tagLineHeight:at,tagIconSize:Et-2*Pt,tagPaddingHorizontal:8,tagBorderlessBg:Ke.colorFillTertiary})},lt=Ke=>({defaultBg:Ke.colorFillQuaternary,defaultColor:Ke.colorText});var Je=(0,ot.Z)("Tag",Ke=>{const Pt=st(Ke);return Oe(Pt)},lt),Ge=function(Ke,Pt){var Et={};for(var Yt in Ke)Object.prototype.hasOwnProperty.call(Ke,Yt)&&Pt.indexOf(Yt)<0&&(Et[Yt]=Ke[Yt]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Yt=Object.getOwnPropertySymbols(Ke);at<Yt.length;at++)Pt.indexOf(Yt[at])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Yt[at])&&(Et[Yt[at]]=Ke[Yt[at]]);return Et},pt=Ke=>{const{prefixCls:Pt,style:Et,className:Yt,checked:at,onChange:Vt,onClick:fn}=Ke,dn=Ge(Ke,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:Ue,tag:Le}=se.useContext(we.E_),Rt=Xt=>{Vt==null||Vt(!at),fn==null||fn(Xt)},Sn=Ue("tag",Pt),[un,tt]=Je(Sn),ft=Ye()(Sn,`${Sn}-checkable`,{[`${Sn}-checkable-checked`]:at},Le==null?void 0:Le.className,Yt,tt);return un(se.createElement("span",Object.assign({},dn,{style:Object.assign(Object.assign({},Et),Le==null?void 0:Le.style),className:ft,onClick:Rt})))},zt=le(98719);const qe=Ke=>(0,zt.Z)(Ke,(Pt,Et)=>{let{textColor:Yt,lightBorderColor:at,lightColor:Vt,darkColor:fn}=Et;return{[`${Ke.componentCls}-${Pt}`]:{color:Yt,background:Vt,borderColor:at,"&-inverse":{color:Ke.colorTextLightSolid,background:fn,borderColor:fn},[`&${Ke.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ut=(0,ot.b)(["Tag","preset"],Ke=>{const Pt=st(Ke);return qe(Pt)},lt);function xe(Ke){return typeof Ke!="string"?Ke:Ke.charAt(0).toUpperCase()+Ke.slice(1)}const Ee=(Ke,Pt,Et)=>{const Yt=xe(Et);return{[`${Ke.componentCls}-${Pt}`]:{color:Ke[`color${Et}`],background:Ke[`color${Yt}Bg`],borderColor:Ke[`color${Yt}Border`],[`&${Ke.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ve=(0,ot.b)(["Tag","status"],Ke=>{const Pt=st(Ke);return[Ee(Pt,"success","Success"),Ee(Pt,"processing","Info"),Ee(Pt,"error","Error"),Ee(Pt,"warning","Warning")]},lt),Xe=function(Ke,Pt){var Et={};for(var Yt in Ke)Object.prototype.hasOwnProperty.call(Ke,Yt)&&Pt.indexOf(Yt)<0&&(Et[Yt]=Ke[Yt]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Yt=Object.getOwnPropertySymbols(Ke);at<Yt.length;at++)Pt.indexOf(Yt[at])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Yt[at])&&(Et[Yt[at]]=Ke[Yt[at]]);return Et};const Mt=(Ke,Pt)=>{const{prefixCls:Et,className:Yt,rootClassName:at,style:Vt,children:fn,icon:dn,color:Ue,onClose:Le,closeIcon:Rt,closable:Sn,bordered:un=!0}=Ke,tt=Xe(Ke,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:ft,direction:Xt,tag:Tn}=se.useContext(we.E_),[mn,Ut]=se.useState(!0);se.useEffect(()=>{"visible"in tt&&Ut(tt.visible)},[tt.visible]);const jt=(0,ve.o2)(Ue),_n=(0,ve.yT)(Ue),yn=jt||_n,Ae=Object.assign(Object.assign({backgroundColor:Ue&&!yn?Ue:void 0},Tn==null?void 0:Tn.style),Vt),ce=ft("tag",Et),[ue,pe]=Je(ce),he=Ye()(ce,Tn==null?void 0:Tn.className,{[`${ce}-${Ue}`]:yn,[`${ce}-has-color`]:Ue&&!yn,[`${ce}-hidden`]:!mn,[`${ce}-rtl`]:Xt==="rtl",[`${ce}-borderless`]:!un},Yt,at,pe),oe=en=>{en.stopPropagation(),Le==null||Le(en),!en.defaultPrevented&&Ut(!1)},[,Ie]=(0,Se.Z)(Sn,Rt,en=>en===null?se.createElement(Be.Z,{className:`${ce}-close-icon`,onClick:oe}):se.createElement("span",{className:`${ce}-close-icon`,onClick:oe},en),null,!1),Qe=typeof tt.onClick=="function"||fn&&fn.type==="a",Lt=dn||null,$t=Lt?se.createElement(se.Fragment,null,Lt,fn&&se.createElement("span",null,fn)):fn,Kt=se.createElement("span",Object.assign({},tt,{ref:Pt,className:he,style:Ae}),$t,Ie,jt&&se.createElement(ut,{key:"preset",prefixCls:ce}),_n&&se.createElement(Ve,{key:"status",prefixCls:ce}));return ue(Qe?se.createElement(Me.Z,{component:"Tag"},Kt):Kt)},mt=se.forwardRef(Mt);mt.CheckableTag=pt;var St=mt},72665:function(bn,Zt){"use strict";var le;var se=typeof Symbol=="function"&&Symbol.for,Be=se?Symbol.for("react.element"):60103,Ne=se?Symbol.for("react.portal"):60106,Ye=se?Symbol.for("react.fragment"):60107,ve=se?Symbol.for("react.strict_mode"):60108,Se=se?Symbol.for("react.profiler"):60114,Me=se?Symbol.for("react.provider"):60109,we=se?Symbol.for("react.context"):60110,me=se?Symbol.for("react.async_mode"):60111,Te=se?Symbol.for("react.concurrent_mode"):60111,ot=se?Symbol.for("react.forward_ref"):60112,Oe=se?Symbol.for("react.suspense"):60113,st=se?Symbol.for("react.suspense_list"):60120,lt=se?Symbol.for("react.memo"):60115,Je=se?Symbol.for("react.lazy"):60116,Ge=se?Symbol.for("react.block"):60121,Ce=se?Symbol.for("react.fundamental"):60117,pt=se?Symbol.for("react.responder"):60118,zt=se?Symbol.for("react.scope"):60119;function qe(xe){if(typeof xe=="object"&&xe!==null){var Ee=xe.$$typeof;switch(Ee){case Be:switch(xe=xe.type,xe){case me:case Te:case Ye:case Se:case ve:case Oe:return xe;default:switch(xe=xe&&xe.$$typeof,xe){case we:case ot:case Je:case lt:case Me:return xe;default:return Ee}}case Ne:return Ee}}}function ut(xe){return qe(xe)===Te}le=me,le=Te,le=we,le=Me,le=Be,le=ot,le=Ye,le=Je,le=lt,le=Ne,le=Se,le=ve,le=Oe,le=function(xe){return ut(xe)||qe(xe)===me},le=ut,le=function(xe){return qe(xe)===we},le=function(xe){return qe(xe)===Me},le=function(xe){return typeof xe=="object"&&xe!==null&&xe.$$typeof===Be},le=function(xe){return qe(xe)===ot},le=function(xe){return qe(xe)===Ye},le=function(xe){return qe(xe)===Je},Zt.isMemo=function(xe){return qe(xe)===lt},le=function(xe){return qe(xe)===Ne},le=function(xe){return qe(xe)===Se},le=function(xe){return qe(xe)===ve},le=function(xe){return qe(xe)===Oe},le=function(xe){return typeof xe=="string"||typeof xe=="function"||xe===Ye||xe===Te||xe===Se||xe===ve||xe===Oe||xe===st||typeof xe=="object"&&xe!==null&&(xe.$$typeof===Je||xe.$$typeof===lt||xe.$$typeof===Me||xe.$$typeof===we||xe.$$typeof===ot||xe.$$typeof===Ce||xe.$$typeof===pt||xe.$$typeof===zt||xe.$$typeof===Ge)},le=qe},12060:function(bn,Zt,le){"use strict";bn.exports=le(72665)},41771:function(bn,Zt){"use strict";var le;var se=typeof Symbol=="function"&&Symbol.for,Be=se?Symbol.for("react.element"):60103,Ne=se?Symbol.for("react.portal"):60106,Ye=se?Symbol.for("react.fragment"):60107,ve=se?Symbol.for("react.strict_mode"):60108,Se=se?Symbol.for("react.profiler"):60114,Me=se?Symbol.for("react.provider"):60109,we=se?Symbol.for("react.context"):60110,me=se?Symbol.for("react.async_mode"):60111,Te=se?Symbol.for("react.concurrent_mode"):60111,ot=se?Symbol.for("react.forward_ref"):60112,Oe=se?Symbol.for("react.suspense"):60113,st=se?Symbol.for("react.suspense_list"):60120,lt=se?Symbol.for("react.memo"):60115,Je=se?Symbol.for("react.lazy"):60116,Ge=se?Symbol.for("react.block"):60121,Ce=se?Symbol.for("react.fundamental"):60117,pt=se?Symbol.for("react.responder"):60118,zt=se?Symbol.for("react.scope"):60119;function qe(xe){if(typeof xe=="object"&&xe!==null){var Ee=xe.$$typeof;switch(Ee){case Be:switch(xe=xe.type,xe){case me:case Te:case Ye:case Se:case ve:case Oe:return xe;default:switch(xe=xe&&xe.$$typeof,xe){case we:case ot:case Je:case lt:case Me:return xe;default:return Ee}}case Ne:return Ee}}}function ut(xe){return qe(xe)===Te}le=me,le=Te,le=we,le=Me,le=Be,le=ot,le=Ye,le=Je,le=lt,le=Ne,le=Se,le=ve,le=Oe,le=function(xe){return ut(xe)||qe(xe)===me},le=ut,le=function(xe){return qe(xe)===we},le=function(xe){return qe(xe)===Me},le=function(xe){return typeof xe=="object"&&xe!==null&&xe.$$typeof===Be},le=function(xe){return qe(xe)===ot},Zt.isFragment=function(xe){return qe(xe)===Ye},le=function(xe){return qe(xe)===Je},le=function(xe){return qe(xe)===lt},le=function(xe){return qe(xe)===Ne},le=function(xe){return qe(xe)===Se},le=function(xe){return qe(xe)===ve},le=function(xe){return qe(xe)===Oe},le=function(xe){return typeof xe=="string"||typeof xe=="function"||xe===Ye||xe===Te||xe===Se||xe===ve||xe===Oe||xe===st||typeof xe=="object"&&xe!==null&&(xe.$$typeof===Je||xe.$$typeof===lt||xe.$$typeof===Me||xe.$$typeof===we||xe.$$typeof===ot||xe.$$typeof===Ce||xe.$$typeof===pt||xe.$$typeof===zt||xe.$$typeof===Ge)},le=qe},47655:function(bn,Zt,le){"use strict";bn.exports=le(41771)},64701:function(bn,Zt,le){"use strict";le.r(Zt),le.d(Zt,{ResizableTextArea:function(){return Sn},default:function(){return mn}});var se=le(87462),Be=le(1413),Ne=le(4942),Ye=le(71002),ve=le(97685),Se=le(45987),Me=le(74902),we=le(94184),me=le.n(we),Te=le(67656),ot=le(87887),Oe=le(67294);function st(Ut){var jt=Oe.useRef();jt.current=Ut;var _n=Oe.useCallback(function(){for(var yn,Ae=arguments.length,ce=new Array(Ae),ue=0;ue<Ae;ue++)ce[ue]=arguments[ue];return(yn=jt.current)===null||yn===void 0?void 0:yn.call.apply(yn,[jt].concat(ce))},[]);return _n}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Je=lt()?Oe.useLayoutEffect:Oe.useEffect,Ge=Je,Ce=function(jt,_n){var yn=Oe.useRef(!0);Je(function(){if(!yn.current)return jt()},_n),Je(function(){return yn.current=!1,function(){yn.current=!0}},[])};function pt(Ut){var jt=Oe.useRef(!1),_n=Oe.useState(Ut),yn=(0,ve.Z)(_n,2),Ae=yn[0],ce=yn[1];Oe.useEffect(function(){return jt.current=!1,function(){jt.current=!0}},[]);function ue(pe,he){he&&jt.current||ce(pe)}return[Ae,ue]}function zt(Ut){return Ut!==void 0}function qe(Ut,jt){var _n=jt||{},yn=_n.defaultValue,Ae=_n.value,ce=_n.onChange,ue=_n.postState,pe=pt(function(){return zt(Ae)?Ae:zt(yn)?typeof yn=="function"?yn():yn:typeof Ut=="function"?Ut():Ut}),he=(0,ve.Z)(pe,2),oe=he[0],Ie=he[1],Qe=Ae!==void 0?Ae:oe,Lt=ue?ue(Qe):Qe,$t=st(ce),Kt=pt([Qe]),en=(0,ve.Z)(Kt,2),Jt=en[0],et=en[1];Ce(function(){var Tt=Jt[0];oe!==Tt&&$t(oe,Tt)},[Jt]),Ce(function(){zt(Ae)||Ie(Ae)},[Ae]);var wt=st(function(Tt,Ot){Ie(Tt,Ot),et([Qe],Ot)});return[Lt,wt]}var ut=le(48555),xe=function(jt){return+setTimeout(jt,16)},Ee=function(jt){return clearTimeout(jt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(xe=function(jt){return window.requestAnimationFrame(jt)},Ee=function(jt){return window.cancelAnimationFrame(jt)});var Ve=0,Xe=new Map;function Mt(Ut){Xe.delete(Ut)}var mt=function(jt){var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ve+=1;var yn=Ve;function Ae(ce){if(ce===0)Mt(yn),jt();else{var ue=xe(function(){Ae(ce-1)});Xe.set(yn,ue)}}return Ae(_n),yn};mt.cancel=function(Ut){var jt=Xe.get(Ut);return Mt(jt),Ee(jt)};var St=mt,Ke=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,Pt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Et={},Yt;function at(Ut){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_n=Ut.getAttribute("id")||Ut.getAttribute("data-reactid")||Ut.getAttribute("name");if(jt&&Et[_n])return Et[_n];var yn=window.getComputedStyle(Ut),Ae=yn.getPropertyValue("box-sizing")||yn.getPropertyValue("-moz-box-sizing")||yn.getPropertyValue("-webkit-box-sizing"),ce=parseFloat(yn.getPropertyValue("padding-bottom"))+parseFloat(yn.getPropertyValue("padding-top")),ue=parseFloat(yn.getPropertyValue("border-bottom-width"))+parseFloat(yn.getPropertyValue("border-top-width")),pe=Pt.map(function(oe){return"".concat(oe,":").concat(yn.getPropertyValue(oe))}).join(";"),he={sizingStyle:pe,paddingSize:ce,borderSize:ue,boxSizing:Ae};return jt&&_n&&(Et[_n]=he),he}function Vt(Ut){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,yn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Yt||(Yt=document.createElement("textarea"),Yt.setAttribute("tab-index","-1"),Yt.setAttribute("aria-hidden","true"),document.body.appendChild(Yt)),Ut.getAttribute("wrap")?Yt.setAttribute("wrap",Ut.getAttribute("wrap")):Yt.removeAttribute("wrap");var Ae=at(Ut,jt),ce=Ae.paddingSize,ue=Ae.borderSize,pe=Ae.boxSizing,he=Ae.sizingStyle;Yt.setAttribute("style","".concat(he,";").concat(Ke)),Yt.value=Ut.value||Ut.placeholder||"";var oe=void 0,Ie=void 0,Qe,Lt=Yt.scrollHeight;if(pe==="border-box"?Lt+=ue:pe==="content-box"&&(Lt-=ce),_n!==null||yn!==null){Yt.value=" ";var $t=Yt.scrollHeight-ce;_n!==null&&(oe=$t*_n,pe==="border-box"&&(oe=oe+ce+ue),Lt=Math.max(oe,Lt)),yn!==null&&(Ie=$t*yn,pe==="border-box"&&(Ie=Ie+ce+ue),Qe=Lt>Ie?"":"hidden",Lt=Math.min(Ie,Lt))}var Kt={height:Lt,overflowY:Qe,resize:"none"};return oe&&(Kt.minHeight=oe),Ie&&(Kt.maxHeight=Ie),Kt}var fn=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],dn=0,Ue=1,Le=2,Rt=Oe.forwardRef(function(Ut,jt){var _n=Ut,yn=_n.prefixCls,Ae=_n.onPressEnter,ce=_n.defaultValue,ue=_n.value,pe=_n.autoSize,he=_n.onResize,oe=_n.className,Ie=_n.style,Qe=_n.disabled,Lt=_n.onChange,$t=_n.onInternalAutoSize,Kt=(0,Se.Z)(_n,fn),en=qe(ce,{value:ue,postState:function(wn){return wn!=null?wn:""}}),Jt=(0,ve.Z)(en,2),et=Jt[0],wt=Jt[1],Tt=function(wn){wt(wn.target.value),Lt==null||Lt(wn)},Ot=Oe.useRef();Oe.useImperativeHandle(jt,function(){return{textArea:Ot.current}});var yt=Oe.useMemo(function(){return pe&&(0,Ye.Z)(pe)==="object"?[pe.minRows,pe.maxRows]:[]},[pe]),Dn=(0,ve.Z)(yt,2),gn=Dn[0],$n=Dn[1],Kr=!!pe,tr=function(){try{if(document.activeElement===Ot.current){var wn=Ot.current,kr=wn.selectionStart,or=wn.selectionEnd,ar=wn.scrollTop;Ot.current.setSelectionRange(kr,or),Ot.current.scrollTop=ar}}catch(Rn){}},lr=Oe.useState(Le),ur=(0,ve.Z)(lr,2),ni=ur[0],Xr=ur[1],Qr=Oe.useState(),gi=(0,ve.Z)(Qr,2),Sr=gi[0],Ei=gi[1],Ui=function(){Xr(dn)};Ge(function(){Kr&&Ui()},[ue,gn,$n,Kr]),Ge(function(){if(ni===dn)Xr(Ue);else if(ni===Ue){var On=Vt(Ot.current,!1,gn,$n);Xr(Le),Ei(On)}else tr()},[ni]);var ea=Oe.useRef(),ra=function(){St.cancel(ea.current)},Zi=function(wn){ni===Le&&(he==null||he(wn),pe&&(ra(),ea.current=St(function(){Ui()})))};Oe.useEffect(function(){return ra},[]);var At=Kr?Sr:null,An=(0,Be.Z)((0,Be.Z)({},Ie),At);return(ni===dn||ni===Ue)&&(An.overflowY="hidden",An.overflowX="hidden"),Oe.createElement(ut.Z,{onResize:Zi,disabled:!(pe||he)},Oe.createElement("textarea",(0,se.Z)({},Kt,{ref:Ot,style:An,className:me()(yn,oe,(0,Ne.Z)({},"".concat(yn,"-disabled"),Qe)),disabled:Qe,value:et,onChange:Tt})))}),Sn=Rt,un=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function tt(Ut,jt){return(0,Me.Z)(Ut||"").slice(0,jt).join("")}function ft(Ut,jt,_n,yn){var Ae=_n;return Ut?Ae=tt(_n,yn):(0,Me.Z)(jt||"").length<_n.length&&(0,Me.Z)(_n||"").length>yn&&(Ae=jt),Ae}var Xt=Oe.forwardRef(function(Ut,jt){var _n,yn=Ut.defaultValue,Ae=Ut.value,ce=Ut.onFocus,ue=Ut.onBlur,pe=Ut.onChange,he=Ut.allowClear,oe=Ut.maxLength,Ie=Ut.onCompositionStart,Qe=Ut.onCompositionEnd,Lt=Ut.suffix,$t=Ut.prefixCls,Kt=$t===void 0?"rc-textarea":$t,en=Ut.classes,Jt=Ut.showCount,et=Ut.className,wt=Ut.style,Tt=Ut.disabled,Ot=Ut.hidden,yt=Ut.classNames,Dn=Ut.styles,gn=Ut.onResize,$n=(0,Se.Z)(Ut,un),Kr=qe(yn,{value:Ae,defaultValue:yn}),tr=(0,ve.Z)(Kr,2),lr=tr[0],ur=tr[1],ni=(0,Oe.useRef)(null),Xr=Oe.useState(!1),Qr=(0,ve.Z)(Xr,2),gi=Qr[0],Sr=Qr[1],Ei=Oe.useState(!1),Ui=(0,ve.Z)(Ei,2),ea=Ui[0],ra=Ui[1],Zi=Oe.useRef(),At=Oe.useRef(0),An=Oe.useState(null),On=(0,ve.Z)(An,2),wn=On[0],kr=On[1],or=function(){var mr;(mr=ni.current)===null||mr===void 0||mr.textArea.focus()};(0,Oe.useImperativeHandle)(jt,function(){return{resizableTextArea:ni.current,focus:or,blur:function(){var mr;(mr=ni.current)===null||mr===void 0||mr.textArea.blur()}}}),(0,Oe.useEffect)(function(){Sr(function(Xn){return!Tt&&Xn})},[Tt]);var ar=Number(oe)>0,Rn=function(mr){ra(!0),Zi.current=lr,At.current=mr.currentTarget.selectionStart,Ie==null||Ie(mr)},it=function(mr){ra(!1);var fr=mr.currentTarget.value;if(ar){var Yr,xn=At.current>=oe+1||At.current===((Yr=Zi.current)===null||Yr===void 0?void 0:Yr.length);fr=ft(xn,Zi.current,fr,oe)}fr!==lr&&(ur(fr),(0,ot.rJ)(mr.currentTarget,mr,pe,fr)),Qe==null||Qe(mr)},dt=function(mr){var fr=mr.target.value;if(!ea&&ar){var Yr=mr.target.selectionStart>=oe+1||mr.target.selectionStart===fr.length||!mr.target.selectionStart;fr=ft(Yr,lr,fr,oe)}ur(fr),(0,ot.rJ)(mr.currentTarget,mr,pe,fr)},Bt=function(mr){var fr=$n.onPressEnter,Yr=$n.onKeyDown;mr.key==="Enter"&&fr&&fr(mr),Yr==null||Yr(mr)},qt=function(mr){Sr(!0),ce==null||ce(mr)},je=function(mr){Sr(!1),ue==null||ue(mr)},Ct=function(mr){var fr;ur(""),or(),(0,ot.rJ)((fr=ni.current)===null||fr===void 0?void 0:fr.textArea,mr,pe)},Wt=(0,ot.D7)(lr);!ea&&ar&&Ae==null&&(Wt=tt(Wt,oe));var Ft=Lt,an;if(Jt){var rn=(0,Me.Z)(Wt).length;(0,Ye.Z)(Jt)==="object"?an=Jt.formatter({value:Wt,count:rn,maxLength:oe}):an="".concat(rn).concat(ar?" / ".concat(oe):""),Ft=Oe.createElement(Oe.Fragment,null,Ft,Oe.createElement("span",{className:me()("".concat(Kt,"-data-count"),yt==null?void 0:yt.count),style:Dn==null?void 0:Dn.count},an))}var Vn=function(mr){var fr;gn==null||gn(mr),(fr=ni.current)!==null&&fr!==void 0&&fr.textArea.style.height&&kr(!0)},Pr=!$n.autoSize&&!Jt&&!he,nr=Oe.createElement(Te.BaseInput,{value:Wt,allowClear:he,handleReset:Ct,suffix:Ft,prefixCls:Kt,classes:{affixWrapper:me()(en==null?void 0:en.affixWrapper,(_n={},(0,Ne.Z)(_n,"".concat(Kt,"-show-count"),Jt),(0,Ne.Z)(_n,"".concat(Kt,"-textarea-allow-clear"),he),_n))},disabled:Tt,focused:gi,className:et,style:(0,Be.Z)((0,Be.Z)({},wt),wn&&!Pr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof an=="string"?an:void 0}},hidden:Ot,inputElement:Oe.createElement(Sn,(0,se.Z)({},$n,{onKeyDown:Bt,onChange:dt,onFocus:qt,onBlur:je,onCompositionStart:Rn,onCompositionEnd:it,className:yt==null?void 0:yt.textarea,style:(0,Be.Z)((0,Be.Z)({},Dn==null?void 0:Dn.textarea),{},{resize:wt==null?void 0:wt.resize}),disabled:Tt,prefixCls:Kt,onResize:Vn,ref:ni}))});return nr}),Tn=Xt,mn=Tn},1337:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return we}});var se=le(1413),Be=`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`,Ne=`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`,Ye="".concat(Be," ").concat(Ne).split(/[\s\n]+/),ve="aria-",Se="data-";function Me(me,Te){return me.indexOf(Te)===0}function we(me){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot;Te===!1?ot={aria:!0,data:!0,attr:!0}:Te===!0?ot={aria:!0}:ot=(0,se.Z)({},Te);var Oe={};return Object.keys(me).forEach(function(st){(ot.aria&&(st==="role"||Me(st,ve))||ot.data&&Me(st,Se)||ot.attr&&Ye.includes(st))&&(Oe[st]=me[st])}),Oe}},88386:function(bn,Zt,le){(function(se){se(le(4631))})(function(se){se.defineOption("placeholder","",function(we,me,Te){var ot=Te&&Te!=se.Init;if(me&&!ot)we.on("blur",ve),we.on("change",Se),we.on("swapDoc",Se),se.on(we.getInputField(),"compositionupdate",we.state.placeholderCompose=function(){Ye(we)}),Se(we);else if(!me&&ot){we.off("blur",ve),we.off("change",Se),we.off("swapDoc",Se),se.off(we.getInputField(),"compositionupdate",we.state.placeholderCompose),Be(we);var Oe=we.getWrapperElement();Oe.className=Oe.className.replace(" CodeMirror-empty","")}me&&!we.hasFocus()&&ve(we)});function Be(we){we.state.placeholder&&(we.state.placeholder.parentNode.removeChild(we.state.placeholder),we.state.placeholder=null)}function Ne(we){Be(we);var me=we.state.placeholder=document.createElement("pre");me.style.cssText="height: 0; overflow: visible",me.style.direction=we.getOption("direction"),me.className="CodeMirror-placeholder CodeMirror-line-like";var Te=we.getOption("placeholder");typeof Te=="string"&&(Te=document.createTextNode(Te)),me.appendChild(Te),we.display.lineSpace.insertBefore(me,we.display.lineSpace.firstChild)}function Ye(we){setTimeout(function(){var me=!1,Te=we.getInputField();Te.nodeName=="TEXTAREA"?me=!Te.value:we.lineCount()==1&&(me=!/[^\u200b]/.test(Te.querySelector(".CodeMirror-line").textContent)),me?Ne(we):Be(we)},20)}function ve(we){Me(we)&&Ne(we)}function Se(we){var me=we.getWrapperElement(),Te=Me(we);me.className=me.className.replace(" CodeMirror-empty","")+(Te?" CodeMirror-empty":""),Te?Ne(we):Be(we)}function Me(we){return we.lineCount()===1&&we.getLine(0)===""}})},82801:function(bn,Zt,le){(function(se){se(le(4631))})(function(se){var Be={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=se.Pos;se.defineOption("autoCloseBrackets",!1,function(Je,Ge,Ce){Ce&&Ce!=se.Init&&(Je.removeKeyMap(ve),Je.state.closeBrackets=null),Ge&&(Se(Ye(Ge,"pairs")),Je.state.closeBrackets=Ge,Je.addKeyMap(ve))});function Ye(Je,Ge){return Ge=="pairs"&&typeof Je=="string"?Je:typeof Je=="object"&&Je[Ge]!=null?Je[Ge]:Be[Ge]}var ve={Backspace:me,Enter:Te};function Se(Je){for(var Ge=0;Ge<Je.length;Ge++){var Ce=Je.charAt(Ge),pt="'"+Ce+"'";ve[pt]||(ve[pt]=Me(Ce))}}Se(Be.pairs+"`");function Me(Je){return function(Ge){return Oe(Ge,Je)}}function we(Je){var Ge=Je.state.closeBrackets;if(!Ge||Ge.override)return Ge;var Ce=Je.getModeAt(Je.getCursor());return Ce.closeBrackets||Ge}function me(Je){var Ge=we(Je);if(!Ge||Je.getOption("disableInput"))return se.Pass;for(var Ce=Ye(Ge,"pairs"),pt=Je.listSelections(),zt=0;zt<pt.length;zt++){if(!pt[zt].empty())return se.Pass;var qe=st(Je,pt[zt].head);if(!qe||Ce.indexOf(qe)%2!=0)return se.Pass}for(var zt=pt.length-1;zt>=0;zt--){var ut=pt[zt].head;Je.replaceRange("",Ne(ut.line,ut.ch-1),Ne(ut.line,ut.ch+1),"+delete")}}function Te(Je){var Ge=we(Je),Ce=Ge&&Ye(Ge,"explode");if(!Ce||Je.getOption("disableInput"))return se.Pass;for(var pt=Je.listSelections(),zt=0;zt<pt.length;zt++){if(!pt[zt].empty())return se.Pass;var qe=st(Je,pt[zt].head);if(!qe||Ce.indexOf(qe)%2!=0)return se.Pass}Je.operation(function(){var ut=Je.lineSeparator()||`
|
|
|
`;Je.replaceSelection(ut+ut,null),Je.execCommand("goCharLeft"),pt=Je.listSelections();for(var xe=0;xe<pt.length;xe++){var Ee=pt[xe].head.line;Je.indentLine(Ee,null,!0),Je.indentLine(Ee+1,null,!0)}})}function ot(Je){var Ge=se.cmpPos(Je.anchor,Je.head)>0;return{anchor:new Ne(Je.anchor.line,Je.anchor.ch+(Ge?-1:1)),head:new Ne(Je.head.line,Je.head.ch+(Ge?1:-1))}}function Oe(Je,Ge){var Ce=we(Je);if(!Ce||Je.getOption("disableInput"))return se.Pass;var pt=Ye(Ce,"pairs"),zt=pt.indexOf(Ge);if(zt==-1)return se.Pass;for(var qe=Ye(Ce,"closeBefore"),ut=Ye(Ce,"triples"),xe=pt.charAt(zt+1)==Ge,Ee=Je.listSelections(),Ve=zt%2==0,Xe,Mt=0;Mt<Ee.length;Mt++){var mt=Ee[Mt],St=mt.head,Ke,Pt=Je.getRange(St,Ne(St.line,St.ch+1));if(Ve&&!mt.empty())Ke="surround";else if((xe||!Ve)&&Pt==Ge)xe&<(Je,St)?Ke="both":ut.indexOf(Ge)>=0&&Je.getRange(St,Ne(St.line,St.ch+3))==Ge+Ge+Ge?Ke="skipThree":Ke="skip";else if(xe&&St.ch>1&&ut.indexOf(Ge)>=0&&Je.getRange(Ne(St.line,St.ch-2),St)==Ge+Ge){if(St.ch>2&&/\bstring/.test(Je.getTokenTypeAt(Ne(St.line,St.ch-2))))return se.Pass;Ke="addFour"}else if(xe){var Et=St.ch==0?" ":Je.getRange(Ne(St.line,St.ch-1),St);if(!se.isWordChar(Pt)&&Et!=Ge&&!se.isWordChar(Et))Ke="both";else return se.Pass}else if(Ve&&(Pt.length===0||/\s/.test(Pt)||qe.indexOf(Pt)>-1))Ke="both";else return se.Pass;if(!Xe)Xe=Ke;else if(Xe!=Ke)return se.Pass}var Yt=zt%2?pt.charAt(zt-1):Ge,at=zt%2?Ge:pt.charAt(zt+1);Je.operation(function(){if(Xe=="skip")Je.execCommand("goCharRight");else if(Xe=="skipThree")for(var Vt=0;Vt<3;Vt++)Je.execCommand("goCharRight");else if(Xe=="surround"){for(var fn=Je.getSelections(),Vt=0;Vt<fn.length;Vt++)fn[Vt]=Yt+fn[Vt]+at;Je.replaceSelections(fn,"around"),fn=Je.listSelections().slice();for(var Vt=0;Vt<fn.length;Vt++)fn[Vt]=ot(fn[Vt]);Je.setSelections(fn)}else Xe=="both"?(Je.replaceSelection(Yt+at,null),Je.triggerElectric(Yt+at),Je.execCommand("goCharLeft")):Xe=="addFour"&&(Je.replaceSelection(Yt+Yt+Yt+Yt,"before"),Je.execCommand("goCharRight"))})}function st(Je,Ge){var Ce=Je.getRange(Ne(Ge.line,Ge.ch-1),Ne(Ge.line,Ge.ch+1));return Ce.length==2?Ce:null}function lt(Je,Ge){var Ce=Je.getTokenAt(Ne(Ge.line,Ge.ch+1));return/\bstring/.test(Ce.type)&&Ce.start==Ge.ch&&(Ge.ch==0||!/\bstring/.test(Je.getTokenTypeAt(Ge)))}})},57341:function(bn,Zt,le){(function(se){se(le(4631),le(4786))})(function(se){se.defineOption("autoCloseTags",!1,function(me,Te,ot){if(ot!=se.Init&&ot&&me.removeKeyMap("autoCloseTags"),!!Te){var Oe={name:"autoCloseTags"};(typeof Te!="object"||Te.whenClosing!==!1)&&(Oe["'/'"]=function(st){return Se(st)}),(typeof Te!="object"||Te.whenOpening!==!1)&&(Oe["'>'"]=function(st){return Ye(st)}),me.addKeyMap(Oe)}});var Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ne=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ye(me){if(me.getOption("disableInput"))return se.Pass;for(var Te=me.listSelections(),ot=[],Oe=me.getOption("autoCloseTags"),st=0;st<Te.length;st++){if(!Te[st].empty())return se.Pass;var lt=Te[st].head,Je=me.getTokenAt(lt),Ge=se.innerMode(me.getMode(),Je.state),Ce=Ge.state,pt=Ge.mode.xmlCurrentTag&&Ge.mode.xmlCurrentTag(Ce),zt=pt&&pt.name;if(!zt)return se.Pass;var qe=Ge.mode.configuration=="html",ut=typeof Oe=="object"&&Oe.dontCloseTags||qe&&Be,xe=typeof Oe=="object"&&Oe.indentTags||qe&&Ne;Je.end>lt.ch&&(zt=zt.slice(0,zt.length-Je.end+lt.ch));var Ee=zt.toLowerCase();if(!zt||Je.type=="string"&&(Je.end!=lt.ch||!/[\"\']/.test(Je.string.charAt(Je.string.length-1))||Je.string.length==1)||Je.type=="tag"&&pt.close||Je.string.indexOf("/")==lt.ch-Je.start-1||ut&&Me(ut,Ee)>-1||we(me,Ge.mode.xmlCurrentContext&&Ge.mode.xmlCurrentContext(Ce)||[],zt,lt,!0))return se.Pass;var Ve=typeof Oe=="object"&&Oe.emptyTags;if(Ve&&Me(Ve,zt)>-1){ot[st]={text:"/>",newPos:se.Pos(lt.line,lt.ch+2)};continue}var Xe=xe&&Me(xe,Ee)>-1;ot[st]={indent:Xe,text:">"+(Xe?`
|
|
|
|
|
|
`:"")+"</"+zt+">",newPos:Xe?se.Pos(lt.line+1,0):se.Pos(lt.line,lt.ch+1)}}for(var Mt=typeof Oe=="object"&&Oe.dontIndentOnAutoClose,st=Te.length-1;st>=0;st--){var mt=ot[st];me.replaceRange(mt.text,Te[st].head,Te[st].anchor,"+insert");var St=me.listSelections().slice(0);St[st]={head:mt.newPos,anchor:mt.newPos},me.setSelections(St),!Mt&&mt.indent&&(me.indentLine(mt.newPos.line,null,!0),me.indentLine(mt.newPos.line+1,null,!0))}}function ve(me,Te){for(var ot=me.listSelections(),Oe=[],st=Te?"/":"</",lt=me.getOption("autoCloseTags"),Je=typeof lt=="object"&<.dontIndentOnSlash,Ge=0;Ge<ot.length;Ge++){if(!ot[Ge].empty())return se.Pass;var Ce=ot[Ge].head,pt=me.getTokenAt(Ce),zt=se.innerMode(me.getMode(),pt.state),qe=zt.state;if(Te&&(pt.type=="string"||pt.string.charAt(0)!="<"||pt.start!=Ce.ch-1))return se.Pass;var ut,xe=zt.mode.name!="xml"&&me.getMode().name=="htmlmixed";if(xe&&zt.mode.name=="javascript")ut=st+"script";else if(xe&&zt.mode.name=="css")ut=st+"style";else{var Ee=zt.mode.xmlCurrentContext&&zt.mode.xmlCurrentContext(qe);if(!Ee||Ee.length&&we(me,Ee,Ee[Ee.length-1],Ce))return se.Pass;ut=st+Ee[Ee.length-1]}me.getLine(Ce.line).charAt(pt.end)!=">"&&(ut+=">"),Oe[Ge]=ut}if(me.replaceSelections(Oe),ot=me.listSelections(),!Je)for(var Ge=0;Ge<ot.length;Ge++)(Ge==ot.length-1||ot[Ge].head.line<ot[Ge+1].head.line)&&me.indentLine(ot[Ge].head.line)}function Se(me){return me.getOption("disableInput")?se.Pass:ve(me,!0)}se.commands.closeTag=function(me){return ve(me)};function Me(me,Te){if(me.indexOf)return me.indexOf(Te);for(var ot=0,Oe=me.length;ot<Oe;++ot)if(me[ot]==Te)return ot;return-1}function we(me,Te,ot,Oe,st){if(!se.scanForClosingTag)return!1;var lt=Math.min(me.lastLine()+1,Oe.line+500),Je=se.scanForClosingTag(me,Oe,null,lt);if(!Je||Je.tag!=ot)return!1;for(var Ge=st?1:0,Ce=Te.length-1;Ce>=0&&Te[Ce]==ot;Ce--)++Ge;Oe=Je.to;for(var Ce=1;Ce<Ge;Ce++){var pt=se.scanForClosingTag(me,Oe,null,lt);if(!pt||pt.tag!=ot)return!1;Oe=pt.to}return!0}})},4786:function(bn,Zt,le){(function(se){se(le(4631))})(function(se){"use strict";var Be=se.Pos;function Ne(Ce,pt){return Ce.line-pt.line||Ce.ch-pt.ch}var Ye="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ve=Ye+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Se=new RegExp("<(/?)(["+Ye+"]["+ve+"]*)","g");function Me(Ce,pt,zt,qe){this.line=pt,this.ch=zt,this.cm=Ce,this.text=Ce.getLine(pt),this.min=qe?Math.max(qe.from,Ce.firstLine()):Ce.firstLine(),this.max=qe?Math.min(qe.to-1,Ce.lastLine()):Ce.lastLine()}function we(Ce,pt){var zt=Ce.cm.getTokenTypeAt(Be(Ce.line,pt));return zt&&/\btag\b/.test(zt)}function me(Ce){if(!(Ce.line>=Ce.max))return Ce.ch=0,Ce.text=Ce.cm.getLine(++Ce.line),!0}function Te(Ce){if(!(Ce.line<=Ce.min))return Ce.text=Ce.cm.getLine(--Ce.line),Ce.ch=Ce.text.length,!0}function ot(Ce){for(;;){var pt=Ce.text.indexOf(">",Ce.ch);if(pt==-1){if(me(Ce))continue;return}if(!we(Ce,pt+1)){Ce.ch=pt+1;continue}var zt=Ce.text.lastIndexOf("/",pt),qe=zt>-1&&!/\S/.test(Ce.text.slice(zt+1,pt));return Ce.ch=pt+1,qe?"selfClose":"regular"}}function Oe(Ce){for(;;){var pt=Ce.ch?Ce.text.lastIndexOf("<",Ce.ch-1):-1;if(pt==-1){if(Te(Ce))continue;return}if(!we(Ce,pt+1)){Ce.ch=pt;continue}Se.lastIndex=pt,Ce.ch=pt;var zt=Se.exec(Ce.text);if(zt&&zt.index==pt)return zt}}function st(Ce){for(;;){Se.lastIndex=Ce.ch;var pt=Se.exec(Ce.text);if(!pt){if(me(Ce))continue;return}if(!we(Ce,pt.index+1)){Ce.ch=pt.index+1;continue}return Ce.ch=pt.index+pt[0].length,pt}}function lt(Ce){for(;;){var pt=Ce.ch?Ce.text.lastIndexOf(">",Ce.ch-1):-1;if(pt==-1){if(Te(Ce))continue;return}if(!we(Ce,pt+1)){Ce.ch=pt;continue}var zt=Ce.text.lastIndexOf("/",pt),qe=zt>-1&&!/\S/.test(Ce.text.slice(zt+1,pt));return Ce.ch=pt+1,qe?"selfClose":"regular"}}function Je(Ce,pt){for(var zt=[];;){var qe=st(Ce),ut,xe=Ce.line,Ee=Ce.ch-(qe?qe[0].length:0);if(!qe||!(ut=ot(Ce)))return;if(ut!="selfClose")if(qe[1]){for(var Ve=zt.length-1;Ve>=0;--Ve)if(zt[Ve]==qe[2]){zt.length=Ve;break}if(Ve<0&&(!pt||pt==qe[2]))return{tag:qe[2],from:Be(xe,Ee),to:Be(Ce.line,Ce.ch)}}else zt.push(qe[2])}}function Ge(Ce,pt){for(var zt=[];;){var qe=lt(Ce);if(!qe)return;if(qe=="selfClose"){Oe(Ce);continue}var ut=Ce.line,xe=Ce.ch,Ee=Oe(Ce);if(!Ee)return;if(Ee[1])zt.push(Ee[2]);else{for(var Ve=zt.length-1;Ve>=0;--Ve)if(zt[Ve]==Ee[2]){zt.length=Ve;break}if(Ve<0&&(!pt||pt==Ee[2]))return{tag:Ee[2],from:Be(Ce.line,Ce.ch),to:Be(ut,xe)}}}}se.registerHelper("fold","xml",function(Ce,pt){for(var zt=new Me(Ce,pt.line,0);;){var qe=st(zt);if(!qe||zt.line!=pt.line)return;var ut=ot(zt);if(!ut)return;if(!qe[1]&&ut!="selfClose"){var xe=Be(zt.line,zt.ch),Ee=Je(zt,qe[2]);return Ee&&Ne(Ee.from,xe)>0?{from:xe,to:Ee.from}:null}}}),se.findMatchingTag=function(Ce,pt,zt){var qe=new Me(Ce,pt.line,pt.ch,zt);if(!(qe.text.indexOf(">")==-1&&qe.text.indexOf("<")==-1)){var ut=ot(qe),xe=ut&&Be(qe.line,qe.ch),Ee=ut&&Oe(qe);if(!(!ut||!Ee||Ne(qe,pt)>0)){var Ve={from:Be(qe.line,qe.ch),to:xe,tag:Ee[2]};return ut=="selfClose"?{open:Ve,close:null,at:"open"}:Ee[1]?{open:Ge(qe,Ee[2]),close:Ve,at:"close"}:(qe=new Me(Ce,xe.line,xe.ch,zt),{open:Ve,close:Je(qe,Ee[2]),at:"open"})}}},se.findEnclosingTag=function(Ce,pt,zt,qe){for(var ut=new Me(Ce,pt.line,pt.ch,zt);;){var xe=Ge(ut,qe);if(!xe)break;var Ee=new Me(Ce,pt.line,pt.ch,zt),Ve=Je(Ee,xe.tag);if(Ve)return{open:xe,close:Ve}}},se.scanForClosingTag=function(Ce,pt,zt,qe){var ut=new Me(Ce,pt.line,pt.ch,qe?{from:0,to:qe}:null);return Je(ut,zt)}})},4631:function(bn){(function(Zt,le){bn.exports=le()})(this,function(){"use strict";var Zt=navigator.userAgent,le=navigator.platform,se=/gecko\/\d/i.test(Zt),Be=/MSIE \d/.test(Zt),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zt),Ye=/Edge\/(\d+)/.exec(Zt),ve=Be||Ne||Ye,Se=ve&&(Be?document.documentMode||6:+(Ye||Ne)[1]),Me=!Ye&&/WebKit\//.test(Zt),we=Me&&/Qt\/\d+\.\d+/.test(Zt),me=!Ye&&/Chrome\//.test(Zt),Te=/Opera\//.test(Zt),ot=/Apple Computer/.test(navigator.vendor),Oe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Zt),st=/PhantomJS/.test(Zt),lt=!Ye&&/AppleWebKit/.test(Zt)&&/Mobile\/\w+/.test(Zt),Je=/Android/.test(Zt),Ge=lt||Je||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Zt),Ce=lt||/Mac/.test(le),pt=/\bCrOS\b/.test(Zt),zt=/win/i.test(le),qe=Te&&Zt.match(/Version\/(\d*\.\d*)/);qe&&(qe=Number(qe[1])),qe&&qe>=15&&(Te=!1,Me=!0);var ut=Ce&&(we||Te&&(qe==null||qe<12.11)),xe=se||ve&&Se>=9;function Ee(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Ve=function(x,z){var ne=x.className,te=Ee(z).exec(ne);if(te){var ie=ne.slice(te.index+te[0].length);x.className=ne.slice(0,te.index)+(ie?te[1]+ie:"")}};function Xe(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function Mt(x,z){return Xe(x).appendChild(z)}function mt(x,z,ne,te){var ie=document.createElement(x);if(ne&&(ie.className=ne),te&&(ie.style.cssText=te),typeof z=="string")ie.appendChild(document.createTextNode(z));else if(z)for(var de=0;de<z.length;++de)ie.appendChild(z[de]);return ie}function St(x,z,ne,te){var ie=mt(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var Ke;document.createRange?Ke=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:Ke=function(x,z,ne){var te=document.body.createTextRange();try{te.moveToElementText(x.parentNode)}catch(ie){return te}return te.collapse(!0),te.moveEnd("character",ne),te.moveStart("character",z),te};function Pt(x,z){if(z.nodeType==3&&(z=z.parentNode),x.contains)return x.contains(z);do if(z.nodeType==11&&(z=z.host),z==x)return!0;while(z=z.parentNode)}function Et(){var x;try{x=document.activeElement}catch(z){x=document.body||null}for(;x&&x.shadowRoot&&x.shadowRoot.activeElement;)x=x.shadowRoot.activeElement;return x}function Yt(x,z){var ne=x.className;Ee(z).test(ne)||(x.className+=(ne?" ":"")+z)}function at(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!Ee(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var Vt=function(x){x.select()};lt?Vt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ve&&(Vt=function(x){try{x.select()}catch(z){}});function fn(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function dn(x,z,ne){z||(z={});for(var te in x)x.hasOwnProperty(te)&&(ne!==!1||!z.hasOwnProperty(te))&&(z[te]=x[te]);return z}function Ue(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var de=te||0,ye=ie||0;;){var ke=x.indexOf(" ",de);if(ke<0||ke>=z)return ye+(z-de);ye+=ke-de,ye+=ne-ye%ne,de=ke+1}}var Le=function(){this.id=null,this.f=null,this.time=0,this.handler=fn(this.onTimeout,this)};Le.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Le.prototype.set=function(x,z){this.f=z;var ne=+new Date+x;(!this.id||ne<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,x),this.time=ne)};function Rt(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var Sn=50,un={toString:function(){return"CodeMirror.Pass"}},tt={scroll:!1},ft={origin:"*mouse"},Xt={origin:"+move"};function Tn(x,z,ne){for(var te=0,ie=0;;){var de=x.indexOf(" ",te);de==-1&&(de=x.length);var ye=de-te;if(de==x.length||ie+ye>=z)return te+Math.min(ye,z-ie);if(ie+=de-te,ie+=ne-ie%ne,te=de+1,ie>=z)return te}}var mn=[""];function Ut(x){for(;mn.length<=x;)mn.push(jt(mn)+" ");return mn[x]}function jt(x){return x[x.length-1]}function _n(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function yn(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function Ae(){}function ce(x,z){var ne;return Object.create?ne=Object.create(x):(Ae.prototype=x,ne=new Ae),z&&dn(z,ne),ne}var ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pe(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||ue.test(x))}function he(x,z){return z?z.source.indexOf("\\w")>-1&&pe(x)?!0:z.test(x):pe(x)}function oe(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var Ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Qe(x){return x.charCodeAt(0)>=768&&Ie.test(x)}function Lt(x,z,ne){for(;(ne<0?z>0:z<x.length)&&Qe(x.charAt(z));)z+=ne;return z}function $t(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,de=te<0?Math.ceil(ie):Math.floor(ie);if(de==z)return x(de)?z:ne;x(de)?ne=de:z=de+te}}function Kt(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,de=0;de<x.length;++de){var ye=x[de];(ye.from<ne&&ye.to>z||z==ne&&ye.to==z)&&(te(Math.max(ye.from,z),Math.min(ye.to,ne),ye.level==1?"rtl":"ltr",de),ie=!0)}ie||te(z,ne,"ltr")}var en=null;function Jt(x,z,ne){var te;en=null;for(var ie=0;ie<x.length;++ie){var de=x[ie];if(de.from<z&&de.to>z)return ie;de.to==z&&(de.from!=de.to&&ne=="before"?te=ie:en=ie),de.from==z&&(de.from!=de.to&&ne!="before"?te=ie:en=ie)}return te!=null?te:en}var et=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne($e){return $e<=247?x.charAt($e):1424<=$e&&$e<=1524?"R":1536<=$e&&$e<=1785?z.charAt($e-1536):1774<=$e&&$e<=2220?"r":8192<=$e&&$e<=8203?"w":$e==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,de=/[LRr]/,ye=/[Lb1n]/,ke=/[1n]/;function Pe($e,bt,Dt){this.level=$e,this.from=bt,this.to=Dt}return function($e,bt){var Dt=bt=="ltr"?"L":"R";if($e.length==0||bt=="ltr"&&!te.test($e))return!1;for(var pn=$e.length,cn=[],er=0;er<pn;++er)cn.push(ne($e.charCodeAt(er)));for(var wr=0,Wr=Dt;wr<pn;++wr){var oi=cn[wr];oi=="m"?cn[wr]=Wr:Wr=oi}for(var hi=0,ti=Dt;hi<pn;++hi){var vi=cn[hi];vi=="1"&&ti=="r"?cn[hi]="n":de.test(vi)&&(ti=vi,vi=="r"&&(cn[hi]="R"))}for(var Wi=1,Gi=cn[0];Wi<pn-1;++Wi){var ba=cn[Wi];ba=="+"&&Gi=="1"&&cn[Wi+1]=="1"?cn[Wi]="1":ba==","&&Gi==cn[Wi+1]&&(Gi=="1"||Gi=="n")&&(cn[Wi]=Gi),Gi=ba}for(var to=0;to<pn;++to){var Wo=cn[to];if(Wo==",")cn[to]="N";else if(Wo=="%"){var bo=void 0;for(bo=to+1;bo<pn&&cn[bo]=="%";++bo);for(var cs=to&&cn[to-1]=="!"||bo<pn&&cn[bo]=="1"?"1":"N",ds=to;ds<bo;++ds)cn[ds]=cs;to=bo-1}}for(var Do=0,fs=Dt;Do<pn;++Do){var la=cn[Do];fs=="L"&&la=="1"?cn[Do]="L":de.test(la)&&(fs=la)}for(var wo=0;wo<pn;++wo)if(ie.test(cn[wo])){var xo=void 0;for(xo=wo+1;xo<pn&&ie.test(cn[xo]);++xo);for(var Co=(wo?cn[wo-1]:Dt)=="L",_o=(xo<pn?cn[xo]:Dt)=="L",Wl=Co==_o?Co?"L":"R":Dt,ys=wo;ys<xo;++ys)cn[ys]=Wl;wo=xo-1}for(var Go=[],Wa,Ro=0;Ro<pn;)if(ye.test(cn[Ro])){var Mc=Ro;for(++Ro;Ro<pn&&ye.test(cn[Ro]);++Ro);Go.push(new Pe(0,Mc,Ro))}else{var sl=Ro,xl=Go.length,Vs=bt=="rtl"?1:0;for(++Ro;Ro<pn&&cn[Ro]!="L";++Ro);for(var Po=sl;Po<Ro;)if(ke.test(cn[Po])){sl<Po&&(Go.splice(xl,0,new Pe(1,sl,Po)),xl+=Vs);var Zl=Po;for(++Po;Po<Ro&&ke.test(cn[Po]);++Po);Go.splice(xl,0,new Pe(2,Zl,Po)),xl+=Vs,sl=Po}else++Po;sl<Ro&&Go.splice(xl,0,new Pe(1,sl,Ro))}return bt=="ltr"&&(Go[0].level==1&&(Wa=$e.match(/^\s+/))&&(Go[0].from=Wa[0].length,Go.unshift(new Pe(0,0,Wa[0].length))),jt(Go).level==1&&(Wa=$e.match(/\s+$/))&&(jt(Go).to-=Wa[0].length,Go.push(new Pe(0,pn-Wa[0].length,pn)))),bt=="rtl"?Go.reverse():Go}}();function wt(x,z){var ne=x.order;return ne==null&&(ne=x.order=et(x.text,z)),ne}var Tt=[],Ot=function(x,z,ne){if(x.addEventListener)x.addEventListener(z,ne,!1);else if(x.attachEvent)x.attachEvent("on"+z,ne);else{var te=x._handlers||(x._handlers={});te[z]=(te[z]||Tt).concat(ne)}};function yt(x,z){return x._handlers&&x._handlers[z]||Tt}function Dn(x,z,ne){if(x.removeEventListener)x.removeEventListener(z,ne,!1);else if(x.detachEvent)x.detachEvent("on"+z,ne);else{var te=x._handlers,ie=te&&te[z];if(ie){var de=Rt(ie,ne);de>-1&&(te[z]=ie.slice(0,de).concat(ie.slice(de+1)))}}}function gn(x,z){var ne=yt(x,z);if(ne.length)for(var te=Array.prototype.slice.call(arguments,2),ie=0;ie<ne.length;++ie)ne[ie].apply(null,te)}function $n(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),gn(x,ne||z.type,x,z),Xr(z)||z.codemirrorIgnore}function Kr(x){var z=x._handlers&&x._handlers.cursorActivity;if(z)for(var ne=x.curOp.cursorActivityHandlers||(x.curOp.cursorActivityHandlers=[]),te=0;te<z.length;++te)Rt(ne,z[te])==-1&&ne.push(z[te])}function tr(x,z){return yt(x,z).length>0}function lr(x){x.prototype.on=function(z,ne){Ot(this,z,ne)},x.prototype.off=function(z,ne){Dn(this,z,ne)}}function ur(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function ni(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Xr(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Qr(x){ur(x),ni(x)}function gi(x){return x.target||x.srcElement}function Sr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),Ce&&x.ctrlKey&&z==1&&(z=3),z}var Ei=function(){if(ve&&Se<9)return!1;var x=mt("div");return"draggable"in x||"dragDrop"in x}(),Ui;function ea(x){if(Ui==null){var z=mt("span","\u200B");Mt(x,mt("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(Ui=z.offsetWidth<=1&&z.offsetHeight>2&&!(ve&&Se<8))}var ne=Ui?mt("span","\u200B"):mt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var ra;function Zi(x){if(ra!=null)return ra;var z=Mt(x,document.createTextNode("A\u062EA")),ne=Ke(z,0,1).getBoundingClientRect(),te=Ke(z,1,2).getBoundingClientRect();return Xe(x),!ne||ne.left==ne.right?!1:ra=te.right-ne.right<3}var At=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(x){for(var z=0,ne=[],te=x.length;z<=te;){var ie=x.indexOf(`
|
|
|
`,z);ie==-1&&(ie=x.length);var de=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),ye=de.indexOf("\r");ye!=-1?(ne.push(de.slice(0,ye)),z+=ye+1):(ne.push(de),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},An=window.getSelection?function(x){try{return x.selectionStart!=x.selectionEnd}catch(z){return!1}}:function(x){var z;try{z=x.ownerDocument.selection.createRange()}catch(ne){}return!z||z.parentElement()!=x?!1:z.compareEndPoints("StartToEnd",z)!=0},On=function(){var x=mt("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),wn=null;function kr(x){if(wn!=null)return wn;var z=Mt(x,mt("span","x")),ne=z.getBoundingClientRect(),te=Ke(z,0,1).getBoundingClientRect();return wn=Math.abs(ne.left-te.left)>1}var or={},ar={};function Rn(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),or[x]=z}function it(x,z){ar[x]=z}function dt(x){if(typeof x=="string"&&ar.hasOwnProperty(x))x=ar[x];else if(x&&typeof x.name=="string"&&ar.hasOwnProperty(x.name)){var z=ar[x.name];typeof z=="string"&&(z={name:z}),x=ce(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return dt("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return dt("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function Bt(x,z){z=dt(z);var ne=or[z.name];if(!ne)return Bt(x,"text/plain");var te=ne(x,z);if(qt.hasOwnProperty(z.name)){var ie=qt[z.name];for(var de in ie)ie.hasOwnProperty(de)&&(te.hasOwnProperty(de)&&(te["_"+de]=te[de]),te[de]=ie[de])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var ye in z.modeProps)te[ye]=z.modeProps[ye];return te}var qt={};function je(x,z){var ne=qt.hasOwnProperty(x)?qt[x]:qt[x]={};dn(z,ne)}function Ct(x,z){if(z===!0)return z;if(x.copyState)return x.copyState(z);var ne={};for(var te in z){var ie=z[te];ie instanceof Array&&(ie=ie.concat([])),ne[te]=ie}return ne}function Wt(x,z){for(var ne;x.innerMode&&(ne=x.innerMode(z),!(!ne||ne.mode==x));)z=ne.state,x=ne.mode;return ne||{mode:x,state:z}}function Ft(x,z,ne){return x.startState?x.startState(z,ne):!0}var an=function(x,z,ne){this.pos=this.start=0,this.string=x,this.tabSize=z||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ne};an.prototype.eol=function(){return this.pos>=this.string.length},an.prototype.sol=function(){return this.pos==this.lineStart},an.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},an.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},an.prototype.eat=function(x){var z=this.string.charAt(this.pos),ne;if(typeof x=="string"?ne=z==x:ne=z&&(x.test?x.test(z):x(z)),ne)return++this.pos,z},an.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},an.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},an.prototype.skipToEnd=function(){this.pos=this.string.length},an.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},an.prototype.backUp=function(x){this.pos-=x},an.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ue(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ue(this.string,this.lineStart,this.tabSize):0)},an.prototype.indentation=function(){return Ue(this.string,null,this.tabSize)-(this.lineStart?Ue(this.string,this.lineStart,this.tabSize):0)},an.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(ye){return ne?ye.toLowerCase():ye},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var de=this.string.slice(this.pos).match(x);return de&&de.index>0?null:(de&&z!==!1&&(this.pos+=de[0].length),de)}},an.prototype.current=function(){return this.string.slice(this.start,this.pos)},an.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},an.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},an.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function rn(x,z){if(z-=x.first,z<0||z>=x.size)throw new Error("There is no line "+(z+x.first)+" in the document.");for(var ne=x;!ne.lines;)for(var te=0;;++te){var ie=ne.children[te],de=ie.chunkSize();if(z<de){ne=ie;break}z-=de}return ne.lines[z]}function Vn(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(de){var ye=de.text;ie==ne.line&&(ye=ye.slice(0,ne.ch)),ie==z.line&&(ye=ye.slice(z.ch)),te.push(ye),++ie}),te}function Pr(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function nr(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function Xn(x){if(x.parent==null)return null;for(var z=x.parent,ne=Rt(z.lines,x),te=z.parent;te;z=te,te=te.parent)for(var ie=0;te.children[ie]!=z;++ie)ne+=te.children[ie].chunkSize();return ne+z.first}function mr(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],de=ie.height;if(z<de){x=ie;continue e}z-=de,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var ye=0;ye<x.lines.length;++ye){var ke=x.lines[ye],Pe=ke.height;if(z<Pe)break;z-=Pe}return ne+ye}function fr(x,z){return z>=x.first&&z<x.first+x.size}function Yr(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function xn(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof xn))return new xn(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function qn(x,z){return x.line-z.line||x.ch-z.ch}function Si(x,z){return x.sticky==z.sticky&&qn(x,z)==0}function Ii(x){return xn(x.line,x.ch)}function di(x,z){return qn(x,z)<0?z:x}function si(x,z){return qn(x,z)<0?x:z}function zi(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function Lr(x,z){if(z.line<x.first)return xn(x.first,0);var ne=x.first+x.size-1;return z.line>ne?xn(ne,rn(x,ne).text.length):Mi(z,rn(x,z.line).text.length)}function Mi(x,z){var ne=x.ch;return ne==null||ne>z?xn(x.line,z):ne<0?xn(x.line,0):x}function Pn(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=Lr(x,z[te]);return ne}var Qt=function(x,z){this.state=x,this.lookAhead=z},Gt=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};Gt.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},Gt.prototype.baseToken=function(x){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=x;)this.baseTokenPos+=2;var z=this.baseTokens[this.baseTokenPos+1];return{type:z&&z.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-x}},Gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Gt.fromSaved=function(x,z,ne){return z instanceof Qt?new Gt(x,Ct(x.mode,z.state),ne,z.lookAhead):new Gt(x,Ct(x.mode,z),ne)},Gt.prototype.save=function(x){var z=x!==!1?Ct(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Qt(z,this.maxLookAhead):z};function kt(x,z,ne,te){var ie=[x.state.modeGen],de={};ai(x,z.text,x.doc.mode,ne,function($e,bt){return ie.push($e,bt)},de,te);for(var ye=ne.state,ke=function($e){ne.baseTokens=ie;var bt=x.state.overlays[$e],Dt=1,pn=0;ne.state=!0,ai(x,z.text,bt.mode,ne,function(cn,er){for(var wr=Dt;pn<cn;){var Wr=ie[Dt];Wr>cn&&ie.splice(Dt,1,cn,ie[Dt+1],Wr),Dt+=2,pn=Math.min(cn,Wr)}if(er)if(bt.opaque)ie.splice(wr,Dt-wr,cn,"overlay "+er),Dt=wr+2;else for(;wr<Dt;wr+=2){var oi=ie[wr+1];ie[wr+1]=(oi?oi+" ":"")+"overlay "+er}},de),ne.state=ye,ne.baseTokens=null,ne.baseTokenPos=1},Pe=0;Pe<x.state.overlays.length;++Pe)ke(Pe);return{styles:ie,classes:de.bgClass||de.textClass?de:null}}function Wn(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=ri(x,Xn(z)),ie=z.text.length>x.options.maxHighlightLength&&Ct(x.doc.mode,te.state),de=kt(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=de.styles,de.classes?z.styleClasses=de.classes:z.styleClasses&&(z.styleClasses=null),ne===x.doc.highlightFrontier&&(x.doc.modeFrontier=Math.max(x.doc.modeFrontier,++x.doc.highlightFrontier))}return z.styles}function ri(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new Gt(te,!0,z);var de=Ti(x,z,ne),ye=de>te.first&&rn(te,de-1).stateAfter,ke=ye?Gt.fromSaved(te,ye,de):new Gt(te,Ft(te.mode),de);return te.iter(de,z,function(Pe){Ai(x,Pe.text,ke);var $e=ke.line;Pe.stateAfter=$e==z-1||$e%5==0||$e>=ie.viewFrom&&$e<ie.viewTo?ke.save():null,ke.nextLine()}),ne&&(te.modeFrontier=ke.line),ke}function Ai(x,z,ne,te){var ie=x.doc.mode,de=new an(z,x.options.tabSize,ne);for(de.start=de.pos=te||0,z==""&&Zr(ie,ne.state);!de.eol();)Hn(ie,de,ne.state),de.start=de.pos}function Zr(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=Wt(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function Hn(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=Wt(x,ne).mode);var de=x.token(z,ne);if(z.pos>z.start)return de}throw new Error("Mode "+x.name+" failed to advance stream.")}var tn=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function Ur(x,z,ne,te){var ie=x.doc,de=ie.mode,ye;z=Lr(ie,z);var ke=rn(ie,z.line),Pe=ri(x,z.line,ne),$e=new an(ke.text,x.options.tabSize,Pe),bt;for(te&&(bt=[]);(te||$e.pos<z.ch)&&!$e.eol();)$e.start=$e.pos,ye=Hn(de,$e,Pe.state),te&&bt.push(new tn($e,ye,Ct(ie.mode,Pe.state)));return te?bt:new tn($e,ye,Pe.state)}function Jr(x,z){if(x)for(;;){var ne=x.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ne)break;x=x.slice(0,ne.index)+x.slice(ne.index+ne[0].length);var te=ne[1]?"bgClass":"textClass";z[te]==null?z[te]=ne[2]:new RegExp("(?:^|\\s)"+ne[2]+"(?:$|\\s)").test(z[te])||(z[te]+=" "+ne[2])}return x}function ai(x,z,ne,te,ie,de,ye){var ke=ne.flattenSpans;ke==null&&(ke=x.options.flattenSpans);var Pe=0,$e=null,bt=new an(z,x.options.tabSize,te),Dt,pn=x.options.addModeClass&&[null];for(z==""&&Jr(Zr(ne,te.state),de);!bt.eol();){if(bt.pos>x.options.maxHighlightLength?(ke=!1,ye&&Ai(x,z,te,bt.pos),bt.pos=z.length,Dt=null):Dt=Jr(Hn(ne,bt,te.state,pn),de),pn){var cn=pn[0].name;cn&&(Dt="m-"+(Dt?cn+" "+Dt:cn))}if(!ke||$e!=Dt){for(;Pe<bt.start;)Pe=Math.min(bt.start,Pe+5e3),ie(Pe,$e);$e=Dt}bt.start=bt.pos}for(;Pe<bt.pos;){var er=Math.min(bt.pos,Pe+5e3);ie(er,$e),Pe=er}}function Ti(x,z,ne){for(var te,ie,de=x.doc,ye=ne?-1:z-(x.doc.mode.innerMode?1e3:100),ke=z;ke>ye;--ke){if(ke<=de.first)return de.first;var Pe=rn(de,ke-1),$e=Pe.stateAfter;if($e&&(!ne||ke+($e instanceof Qt?$e.lookAhead:0)<=de.modeFrontier))return ke;var bt=Ue(Pe.text,null,x.options.tabSize);(ie==null||te>bt)&&(ie=ke-1,te=bt)}return ie}function Ki(x,z){if(x.modeFrontier=Math.min(x.modeFrontier,z),!(x.highlightFrontier<z-10)){for(var ne=x.first,te=z-1;te>ne;te--){var ie=rn(x,te).stateAfter;if(ie&&(!(ie instanceof Qt)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var Tr=!1,Gr=!1;function gt(){Tr=!0}function ht(){Gr=!0}function Ht(x,z,ne){this.marker=x,this.from=z,this.to=ne}function sn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function Ln(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function gr(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function vr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var de=x[ie],ye=de.marker,ke=de.from==null||(ye.inclusiveLeft?de.from<=z:de.from<z);if(ke||de.from==z&&ye.type=="bookmark"&&(!ne||!de.marker.insertLeft)){var Pe=de.to==null||(ye.inclusiveRight?de.to>=z:de.to>z);(te||(te=[])).push(new Ht(ye,de.from,Pe?null:de.to))}}return te}function Mr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var de=x[ie],ye=de.marker,ke=de.to==null||(ye.inclusiveRight?de.to>=z:de.to>z);if(ke||de.from==z&&ye.type=="bookmark"&&(!ne||de.marker.insertLeft)){var Pe=de.from==null||(ye.inclusiveLeft?de.from<=z:de.from<z);(te||(te=[])).push(new Ht(ye,Pe?null:de.from-z,de.to==null?null:de.to-z))}}return te}function Cr(x,z){if(z.full)return null;var ne=fr(x,z.from.line)&&rn(x,z.from.line).markedSpans,te=fr(x,z.to.line)&&rn(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,de=z.to.ch,ye=qn(z.from,z.to)==0,ke=vr(ne,ie,ye),Pe=Mr(te,de,ye),$e=z.text.length==1,bt=jt(z.text).length+($e?ie:0);if(ke)for(var Dt=0;Dt<ke.length;++Dt){var pn=ke[Dt];if(pn.to==null){var cn=sn(Pe,pn.marker);cn?$e&&(pn.to=cn.to==null?null:cn.to+bt):pn.to=ie}}if(Pe)for(var er=0;er<Pe.length;++er){var wr=Pe[er];if(wr.to!=null&&(wr.to+=bt),wr.from==null){var Wr=sn(ke,wr.marker);Wr||(wr.from=bt,$e&&(ke||(ke=[])).push(wr))}else wr.from+=bt,$e&&(ke||(ke=[])).push(wr)}ke&&(ke=br(ke)),Pe&&Pe!=ke&&(Pe=br(Pe));var oi=[ke];if(!$e){var hi=z.text.length-2,ti;if(hi>0&&ke)for(var vi=0;vi<ke.length;++vi)ke[vi].to==null&&(ti||(ti=[])).push(new Ht(ke[vi].marker,null,null));for(var Wi=0;Wi<hi;++Wi)oi.push(ti);oi.push(Pe)}return oi}function br(x){for(var z=0;z<x.length;++z){var ne=x[z];ne.from!=null&&ne.from==ne.to&&ne.marker.clearWhenEmpty!==!1&&x.splice(z--,1)}return x.length?x:null}function cr(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(cn){if(cn.markedSpans)for(var er=0;er<cn.markedSpans.length;++er){var wr=cn.markedSpans[er].marker;wr.readOnly&&(!te||Rt(te,wr)==-1)&&(te||(te=[])).push(wr)}}),!te)return null;for(var ie=[{from:z,to:ne}],de=0;de<te.length;++de)for(var ye=te[de],ke=ye.find(0),Pe=0;Pe<ie.length;++Pe){var $e=ie[Pe];if(!(qn($e.to,ke.from)<0||qn($e.from,ke.to)>0)){var bt=[Pe,1],Dt=qn($e.from,ke.from),pn=qn($e.to,ke.to);(Dt<0||!ye.inclusiveLeft&&!Dt)&&bt.push({from:$e.from,to:ke.from}),(pn>0||!ye.inclusiveRight&&!pn)&&bt.push({from:ke.to,to:$e.to}),ie.splice.apply(ie,bt),Pe+=bt.length-3}}return ie}function fi(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Dr(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function dr(x){return x.inclusiveLeft?-1:0}function ei(x){return x.inclusiveRight?1:0}function jr(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),de=qn(te.from,ie.from)||dr(x)-dr(z);if(de)return-de;var ye=qn(te.to,ie.to)||ei(x)-ei(z);return ye||z.id-x.id}function De(x,z){var ne=Gr&&x.markedSpans,te;if(ne)for(var ie=void 0,de=0;de<ne.length;++de)ie=ne[de],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||jr(te,ie.marker)<0)&&(te=ie.marker);return te}function Fe(x){return De(x,!0)}function Re(x){return De(x,!1)}function Ze(x,z){var ne=Gr&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var de=ne[ie];de.marker.collapsed&&(de.from==null||de.from<z)&&(de.to==null||de.to>z)&&(!te||jr(te,de.marker)<0)&&(te=de.marker)}return te}function nt(x,z,ne,te,ie){var de=rn(x,z),ye=Gr&&de.markedSpans;if(ye)for(var ke=0;ke<ye.length;++ke){var Pe=ye[ke];if(Pe.marker.collapsed){var $e=Pe.marker.find(0),bt=qn($e.from,ne)||dr(Pe.marker)-dr(ie),Dt=qn($e.to,te)||ei(Pe.marker)-ei(ie);if(!(bt>=0&&Dt<=0||bt<=0&&Dt>=0)&&(bt<=0&&(Pe.marker.inclusiveRight&&ie.inclusiveLeft?qn($e.to,ne)>=0:qn($e.to,ne)>0)||bt>=0&&(Pe.marker.inclusiveRight&&ie.inclusiveLeft?qn($e.from,te)<=0:qn($e.from,te)<0)))return!0}}}function ct(x){for(var z;z=Fe(x);)x=z.find(-1,!0).line;return x}function vt(x){for(var z;z=Re(x);)x=z.find(1,!0).line;return x}function nn(x){for(var z,ne;z=Re(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function on(x,z){var ne=rn(x,z),te=ct(ne);return ne==te?z:Xn(te)}function Un(x,z){if(z>x.lastLine())return z;var ne=rn(x,z),te;if(!yr(x,ne))return z;for(;te=Re(ne);)ne=te.find(1,!0).line;return Xn(ne)+1}function yr(x,z){var ne=Gr&&z.markedSpans;if(ne){for(var te=void 0,ie=0;ie<ne.length;++ie)if(te=ne[ie],!!te.marker.collapsed){if(te.from==null)return!0;if(!te.marker.widgetNode&&te.from==0&&te.marker.inclusiveLeft&&Gn(x,z,te))return!0}}}function Gn(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return Gn(x,te.line,sn(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,de=0;de<z.markedSpans.length;++de)if(ie=z.markedSpans[de],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&Gn(x,z,ie))return!0}function Cn(x){x=ct(x);for(var z=0,ne=x.parent,te=0;te<ne.lines.length;++te){var ie=ne.lines[te];if(ie==x)break;z+=ie.height}for(var de=ne.parent;de;ne=de,de=ne.parent)for(var ye=0;ye<de.children.length;++ye){var ke=de.children[ye];if(ke==ne)break;z+=ke.height}return z}function vn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Fe(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=Re(te);){var de=ne.find(0,!0);z-=te.text.length-de.from.ch,te=de.to.line,z+=te.text.length-de.to.ch}return z}function Bn(x){var z=x.display,ne=x.doc;z.maxLine=rn(ne,ne.first),z.maxLineLength=vn(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=vn(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var Fn=function(x,z,ne){this.text=x,Dr(this,z),this.height=ne?ne(this):1};Fn.prototype.lineNo=function(){return Xn(this)},lr(Fn);function xr(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),fi(x),Dr(x,ne);var ie=te?te(x):1;ie!=x.height&&nr(x,ie)}function Qn(x){x.parent=null,fi(x)}var Yn={},ir={};function rr(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?ir:Yn;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function Er(x,z){var ne=St("span",null,null,Me?"padding-right: .1px":null),te={pre:St("pre",[ne],"CodeMirror-line"),content:ne,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var ie=0;ie<=(z.rest?z.rest.length:0);ie++){var de=ie?z.rest[ie-1]:z.line,ye=void 0;te.pos=0,te.addToken=We,Zi(x.display.measure)&&(ye=wt(de,x.doc.direction))&&(te.addToken=_t(te.addToken,ye)),te.map=[];var ke=z!=x.display.externalMeasured&&Xn(de);Mn(de,te,Wn(x,de,ke)),de.styleClasses&&(de.styleClasses.bgClass&&(te.bgClass=at(de.styleClasses.bgClass,te.bgClass||"")),de.styleClasses.textClass&&(te.textClass=at(de.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(ea(x.display.measure))),ie==0?(z.measure.map=te.map,z.measure.cache={}):((z.measure.maps||(z.measure.maps=[])).push(te.map),(z.measure.caches||(z.measure.caches=[])).push({}))}if(Me){var Pe=te.content.lastChild;(/\bcm-tab\b/.test(Pe.className)||Pe.querySelector&&Pe.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return gn(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=at(te.pre.className,te.textClass||"")),te}function He(x){var z=mt("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function We(x,z,ne,te,ie,de,ye){if(z){var ke=x.splitSpaces?Nt(z,x.trailingSpace):z,Pe=x.cm.state.specialChars,$e=!1,bt;if(!Pe.test(z))x.col+=z.length,bt=document.createTextNode(ke),x.map.push(x.pos,x.pos+z.length,bt),ve&&Se<9&&($e=!0),x.pos+=z.length;else{bt=document.createDocumentFragment();for(var Dt=0;;){Pe.lastIndex=Dt;var pn=Pe.exec(z),cn=pn?pn.index-Dt:z.length-Dt;if(cn){var er=document.createTextNode(ke.slice(Dt,Dt+cn));ve&&Se<9?bt.appendChild(mt("span",[er])):bt.appendChild(er),x.map.push(x.pos,x.pos+cn,er),x.col+=cn,x.pos+=cn}if(!pn)break;Dt+=cn+1;var wr=void 0;if(pn[0]==" "){var Wr=x.cm.options.tabSize,oi=Wr-x.col%Wr;wr=bt.appendChild(mt("span",Ut(oi),"cm-tab")),wr.setAttribute("role","presentation"),wr.setAttribute("cm-text"," "),x.col+=oi}else pn[0]=="\r"||pn[0]==`
|
|
|
`?(wr=bt.appendChild(mt("span",pn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),wr.setAttribute("cm-text",pn[0]),x.col+=1):(wr=x.cm.options.specialCharPlaceholder(pn[0]),wr.setAttribute("cm-text",pn[0]),ve&&Se<9?bt.appendChild(mt("span",[wr])):bt.appendChild(wr),x.col+=1);x.map.push(x.pos,x.pos+1,wr),x.pos++}}if(x.trailingSpace=ke.charCodeAt(z.length-1)==32,ne||te||ie||$e||de||ye){var hi=ne||"";te&&(hi+=te),ie&&(hi+=ie);var ti=mt("span",[bt],hi,de);if(ye)for(var vi in ye)ye.hasOwnProperty(vi)&&vi!="style"&&vi!="class"&&ti.setAttribute(vi,ye[vi]);return x.content.appendChild(ti)}x.content.appendChild(bt)}}function Nt(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var de=x.charAt(ie);de==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(de="\xA0"),te+=de,ne=de==" "}return te}function _t(x,z){return function(ne,te,ie,de,ye,ke,Pe){ie=ie?ie+" cm-force-border":"cm-force-border";for(var $e=ne.pos,bt=$e+te.length;;){for(var Dt=void 0,pn=0;pn<z.length&&(Dt=z[pn],!(Dt.to>$e&&Dt.from<=$e));pn++);if(Dt.to>=bt)return x(ne,te,ie,de,ye,ke,Pe);x(ne,te.slice(0,Dt.to-$e),ie,de,null,ke,Pe),de=null,te=te.slice(Dt.to-$e),$e=Dt.to}}}function ln(x,z,ne,te){var ie=!te&&ne.widgetNode;ie&&x.map.push(x.pos,x.pos+z,ie),!te&&x.cm.display.input.needsContentAttribute&&(ie||(ie=x.content.appendChild(document.createElement("span"))),ie.setAttribute("cm-marker",ne.id)),ie&&(x.cm.display.input.setUneditable(ie),x.content.appendChild(ie)),x.pos+=z,x.trailingSpace=!1}function Mn(x,z,ne){var te=x.markedSpans,ie=x.text,de=0;if(!te){for(var ye=1;ye<ne.length;ye+=2)z.addToken(z,ie.slice(de,de=ne[ye]),rr(ne[ye+1],z.cm.options));return}for(var ke=ie.length,Pe=0,$e=1,bt="",Dt,pn,cn=0,er,wr,Wr,oi,hi;;){if(cn==Pe){er=wr=Wr=pn="",hi=null,oi=null,cn=1/0;for(var ti=[],vi=void 0,Wi=0;Wi<te.length;++Wi){var Gi=te[Wi],ba=Gi.marker;if(ba.type=="bookmark"&&Gi.from==Pe&&ba.widgetNode)ti.push(ba);else if(Gi.from<=Pe&&(Gi.to==null||Gi.to>Pe||ba.collapsed&&Gi.to==Pe&&Gi.from==Pe)){if(Gi.to!=null&&Gi.to!=Pe&&cn>Gi.to&&(cn=Gi.to,wr=""),ba.className&&(er+=" "+ba.className),ba.css&&(pn=(pn?pn+";":"")+ba.css),ba.startStyle&&Gi.from==Pe&&(Wr+=" "+ba.startStyle),ba.endStyle&&Gi.to==cn&&(vi||(vi=[])).push(ba.endStyle,Gi.to),ba.title&&((hi||(hi={})).title=ba.title),ba.attributes)for(var to in ba.attributes)(hi||(hi={}))[to]=ba.attributes[to];ba.collapsed&&(!oi||jr(oi.marker,ba)<0)&&(oi=Gi)}else Gi.from>Pe&&cn>Gi.from&&(cn=Gi.from)}if(vi)for(var Wo=0;Wo<vi.length;Wo+=2)vi[Wo+1]==cn&&(wr+=" "+vi[Wo]);if(!oi||oi.from==Pe)for(var bo=0;bo<ti.length;++bo)ln(z,0,ti[bo]);if(oi&&(oi.from||0)==Pe){if(ln(z,(oi.to==null?ke+1:oi.to)-Pe,oi.marker,oi.from==null),oi.to==null)return;oi.to==Pe&&(oi=!1)}}if(Pe>=ke)break;for(var cs=Math.min(ke,cn);;){if(bt){var ds=Pe+bt.length;if(!oi){var Do=ds>cs?bt.slice(0,cs-Pe):bt;z.addToken(z,Do,Dt?Dt+er:er,Wr,Pe+Do.length==cn?wr:"",pn,hi)}if(ds>=cs){bt=bt.slice(cs-Pe),Pe=cs;break}Pe=ds,Wr=""}bt=ie.slice(de,de=ne[$e++]),Dt=rr(ne[$e++],z.cm.options)}}}function En(x,z,ne){this.line=z,this.rest=nn(z),this.size=this.rest?Xn(jt(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=yr(x,z)}function Zn(x,z,ne){for(var te=[],ie,de=z;de<ne;de=ie){var ye=new En(x.doc,rn(x.doc,de),de);ie=de+ye.size,te.push(ye)}return te}var Nn=null;function hn(x){Nn?Nn.ops.push(x):x.ownsGroup=Nn={ops:[x],delayedCallbacks:[]}}function zn(x){var z=x.delayedCallbacks,ne=0;do{for(;ne<z.length;ne++)z[ne].call(null);for(var te=0;te<x.ops.length;te++){var ie=x.ops[te];if(ie.cursorActivityHandlers)for(;ie.cursorActivityCalled<ie.cursorActivityHandlers.length;)ie.cursorActivityHandlers[ie.cursorActivityCalled++].call(null,ie.cm)}}while(ne<z.length)}function jn(x,z){var ne=x.ownsGroup;if(ne)try{zn(ne)}finally{Nn=null,z(ne)}}var hr=null;function Kn(x,z){var ne=yt(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;Nn?ie=Nn.delayedCallbacks:hr?ie=hr:(ie=hr=[],setTimeout(Ar,0));for(var de=function(ke){ie.push(function(){return ne[ke].apply(null,te)})},ye=0;ye<ne.length;++ye)de(ye)}}function Ar(){var x=hr;hr=null;for(var z=0;z<x.length;++z)x[z]()}function ii(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var de=z.changes[ie];de=="text"?Rr(x,z):de=="gutter"?pi(x,z,ne,te):de=="class"?li(x,z):de=="widget"&&zr(x,z,te)}z.changes=null}function Fr(x){return x.node==x.text&&(x.node=mt("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ve&&Se<8&&(x.node.style.zIndex=2)),x.node}function qr(x,z){var ne=z.bgClass?z.bgClass+" "+(z.line.bgClass||""):z.line.bgClass;if(ne&&(ne+=" CodeMirror-linebackground"),z.background)ne?z.background.className=ne:(z.background.parentNode.removeChild(z.background),z.background=null);else if(ne){var te=Fr(z);z.background=te.insertBefore(mt("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function Ir(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):Er(x,z)}function Rr(x,z){var ne=z.text.className,te=Ir(x,z);z.text==z.node&&(z.node=te.pre),z.text.parentNode.replaceChild(te.pre,z.text),z.text=te.pre,te.bgClass!=z.bgClass||te.textClass!=z.textClass?(z.bgClass=te.bgClass,z.textClass=te.textClass,li(x,z)):ne&&(z.text.className=ne)}function li(x,z){qr(x,z),z.line.wrapClass?Fr(z).className=z.line.wrapClass:z.node!=z.text&&(z.node.className="");var ne=z.textClass?z.textClass+" "+(z.line.textClass||""):z.line.textClass;z.text.className=ne||""}function pi(x,z,ne,te){if(z.gutter&&(z.node.removeChild(z.gutter),z.gutter=null),z.gutterBackground&&(z.node.removeChild(z.gutterBackground),z.gutterBackground=null),z.line.gutterClass){var ie=Fr(z);z.gutterBackground=mt("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px; width: "+te.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),ie.insertBefore(z.gutterBackground,z.text)}var de=z.line.gutterMarkers;if(x.options.lineNumbers||de){var ye=Fr(z),ke=z.gutter=mt("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(ke),ye.insertBefore(ke,z.text),z.line.gutterClass&&(ke.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!de||!de["CodeMirror-linenumbers"])&&(z.lineNumber=ke.appendChild(mt("div",Yr(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),de)for(var Pe=0;Pe<x.display.gutterSpecs.length;++Pe){var $e=x.display.gutterSpecs[Pe].className,bt=de.hasOwnProperty($e)&&de[$e];bt&&ke.appendChild(mt("div",[bt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[$e]+"px; width: "+te.gutterWidth[$e]+"px"))}}}function zr(x,z,ne){z.alignable&&(z.alignable=null);for(var te=Ee("CodeMirror-linewidget"),ie=z.node.firstChild,de=void 0;ie;ie=de)de=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);mi(x,z,ne)}function Or(x,z,ne,te){var ie=Ir(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),li(x,z),pi(x,z,ne,te),mi(x,z,te),z.node}function mi(x,z,ne){if(Yi(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)Yi(x,z.rest[te],z,ne,!1)}function Yi(x,z,ne,te,ie){if(z.widgets)for(var de=Fr(ne),ye=0,ke=z.widgets;ye<ke.length;++ye){var Pe=ke[ye],$e=mt("div",[Pe.node],"CodeMirror-linewidget"+(Pe.className?" "+Pe.className:""));Pe.handleMouseEvents||$e.setAttribute("cm-ignore-events","true"),Xi(Pe,$e,ne,te),x.display.input.setUneditable($e),ie&&Pe.above?de.insertBefore($e,ne.gutter||ne.text):de.appendChild($e),Kn(Pe,"redraw")}}function Xi(x,z,ne,te){if(x.noHScroll){(ne.alignable||(ne.alignable=[])).push(z);var ie=te.wrapperWidth;z.style.left=te.fixedPos+"px",x.coverGutter||(ie-=te.gutterTotalWidth,z.style.paddingLeft=te.gutterTotalWidth+"px"),z.style.width=ie+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-te.gutterTotalWidth+"px"))}function Pi(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Pt(document.body,x.node)){var ne="position: relative;";x.coverGutter&&(ne+="margin-left: -"+z.display.gutters.offsetWidth+"px;"),x.noHScroll&&(ne+="width: "+z.display.wrapper.clientWidth+"px;"),Mt(z.display.measure,mt("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function Ji(x,z){for(var ne=gi(z);ne!=x.wrapper;ne=ne.parentNode)if(!ne||ne.nodeType==1&&ne.getAttribute("cm-ignore-events")=="true"||ne.parentNode==x.sizer&&ne!=x.mover)return!0}function ta(x){return x.lineSpace.offsetTop}function _i(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function Hi(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=Mt(x.measure,mt("pre","x","CodeMirror-line-like")),ne=window.getComputedStyle?window.getComputedStyle(z):z.currentStyle,te={left:parseInt(ne.paddingLeft),right:parseInt(ne.paddingRight)};return!isNaN(te.left)&&!isNaN(te.right)&&(x.cachedPaddingH=te),te}function ui(x){return Sn-x.display.nativeBarWidth}function xi(x){return x.display.scroller.clientWidth-ui(x)-x.display.barWidth}function Ni(x){return x.display.scroller.clientHeight-ui(x)-x.display.barHeight}function Qi(x,z,ne){var te=x.options.lineWrapping,ie=te&&xi(x);if(!z.measure.heights||te&&z.measure.width!=ie){var de=z.measure.heights=[];if(te){z.measure.width=ie;for(var ye=z.text.firstChild.getClientRects(),ke=0;ke<ye.length-1;ke++){var Pe=ye[ke],$e=ye[ke+1];Math.abs(Pe.bottom-$e.bottom)>2&&de.push((Pe.bottom+$e.top)/2-ne.top)}}de.push(ne.bottom-ne.top)}}function Ra(x,z,ne){if(x.line==z)return{map:x.measure.map,cache:x.measure.cache};for(var te=0;te<x.rest.length;te++)if(x.rest[te]==z)return{map:x.measure.maps[te],cache:x.measure.caches[te]};for(var ie=0;ie<x.rest.length;ie++)if(Xn(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function $a(x,z){z=ct(z);var ne=Xn(z),te=x.display.externalMeasured=new En(x.doc,z,ne);te.lineN=ne;var ie=te.built=Er(x,te);return te.text=ie.pre,Mt(x.display.lineMeasure,ie.pre),te}function Aa(x,z,ne,te){return Di(x,na(x,z),ne,te)}function ua(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[ia(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function na(x,z){var ne=Xn(z),te=ua(x,ne);te&&!te.text?te=null:te&&te.changes&&(ii(x,te,ne,ho(x)),x.curOp.forceUpdate=!0),te||(te=$a(x,z));var ie=Ra(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Di(x,z,ne,te,ie){z.before&&(ne=-1);var de=ne+(te||""),ye;return z.cache.hasOwnProperty(de)?ye=z.cache[de]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(Qi(x,z.view,z.rect),z.hasHeights=!0),ye=ji(x,z,ne,te),ye.bogus||(z.cache[de]=ye)),{left:ye.left,right:ye.right,top:ie?ye.rtop:ye.top,bottom:ie?ye.rbottom:ye.bottom}}var Ba={left:0,right:0,top:0,bottom:0};function Bi(x,z,ne){for(var te,ie,de,ye,ke,Pe,$e=0;$e<x.length;$e+=3)if(ke=x[$e],Pe=x[$e+1],z<ke?(ie=0,de=1,ye="left"):z<Pe?(ie=z-ke,de=ie+1):($e==x.length-3||z==Pe&&x[$e+3]>z)&&(de=Pe-ke,ie=de-1,z>=Pe&&(ye="right")),ie!=null){if(te=x[$e+2],ke==Pe&&ne==(te.insertLeft?"left":"right")&&(ye=ne),ne=="left"&&ie==0)for(;$e&&x[$e-2]==x[$e-3]&&x[$e-1].insertLeft;)te=x[($e-=3)+2],ye="left";if(ne=="right"&&ie==Pe-ke)for(;$e<x.length-3&&x[$e+3]==x[$e+4]&&!x[$e+5].insertLeft;)te=x[($e+=3)+2],ye="right";break}return{node:te,start:ie,end:de,collapse:ye,coverStart:ke,coverEnd:Pe}}function ci(x,z){var ne=Ba;if(z=="left")for(var te=0;te<x.length&&(ne=x[te]).left==ne.right;te++);else for(var ie=x.length-1;ie>=0&&(ne=x[ie]).left==ne.right;ie--);return ne}function ji(x,z,ne,te){var ie=Bi(z.map,ne,te),de=ie.node,ye=ie.start,ke=ie.end,Pe=ie.collapse,$e;if(de.nodeType==3){for(var bt=0;bt<4;bt++){for(;ye&&Qe(z.line.text.charAt(ie.coverStart+ye));)--ye;for(;ie.coverStart+ke<ie.coverEnd&&Qe(z.line.text.charAt(ie.coverStart+ke));)++ke;if(ve&&Se<9&&ye==0&&ke==ie.coverEnd-ie.coverStart?$e=de.parentNode.getBoundingClientRect():$e=ci(Ke(de,ye,ke).getClientRects(),te),$e.left||$e.right||ye==0)break;ke=ye,ye=ye-1,Pe="right"}ve&&Se<11&&($e=ca(x.display.measure,$e))}else{ye>0&&(Pe=te="right");var Dt;x.options.lineWrapping&&(Dt=de.getClientRects()).length>1?$e=Dt[te=="right"?Dt.length-1:0]:$e=de.getBoundingClientRect()}if(ve&&Se<9&&!ye&&(!$e||!$e.left&&!$e.right)){var pn=de.parentNode.getClientRects()[0];pn?$e={left:pn.left,right:pn.left+io(x.display),top:pn.top,bottom:pn.bottom}:$e=Ba}for(var cn=$e.top-z.rect.top,er=$e.bottom-z.rect.top,wr=(cn+er)/2,Wr=z.view.measure.heights,oi=0;oi<Wr.length-1&&!(wr<Wr[oi]);oi++);var hi=oi?Wr[oi-1]:0,ti=Wr[oi],vi={left:(Pe=="right"?$e.right:$e.left)-z.rect.left,right:(Pe=="left"?$e.left:$e.right)-z.rect.left,top:hi,bottom:ti};return!$e.left&&!$e.right&&(vi.bogus=!0),x.options.singleCursorHeightPerLine||(vi.rtop=cn,vi.rbottom=er),vi}function ca(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!kr(x))return z;var ne=screen.logicalXDPI/screen.deviceXDPI,te=screen.logicalYDPI/screen.deviceYDPI;return{left:z.left*ne,right:z.right*ne,top:z.top*te,bottom:z.bottom*te}}function qi(x){if(x.measure&&(x.measure.cache={},x.measure.heights=null,x.rest))for(var z=0;z<x.rest.length;z++)x.measure.caches[z]={}}function oa(x){x.display.externalMeasure=null,Xe(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)qi(x.display.view[z])}function wi(x){oa(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function pa(){return me&&Je?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function xa(){return me&&Je?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function fa(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=Pi(x.widgets[ne]));return z}function Sa(x,z,ne,te,ie){if(!ie){var de=fa(z);ne.top+=de,ne.bottom+=de}if(te=="line")return ne;te||(te="local");var ye=Cn(z);if(te=="local"?ye+=ta(x.display):ye-=x.display.viewOffset,te=="page"||te=="window"){var ke=x.display.lineSpace.getBoundingClientRect();ye+=ke.top+(te=="window"?0:xa());var Pe=ke.left+(te=="window"?0:pa());ne.left+=Pe,ne.right+=Pe}return ne.top+=ye,ne.bottom+=ye,ne}function Ma(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=pa(),ie-=xa();else if(ne=="local"||!ne){var de=x.display.sizer.getBoundingClientRect();te+=de.left,ie+=de.top}var ye=x.display.lineSpace.getBoundingClientRect();return{left:te-ye.left,top:ie-ye.top}}function Va(x,z,ne,te,ie){return te||(te=rn(x.doc,z.line)),Sa(x,te,Aa(x,te,z.ch,ie),ne)}function ha(x,z,ne,te,ie,de){te=te||rn(x.doc,z.line),ie||(ie=na(x,te));function ye(er,wr){var Wr=Di(x,ie,er,wr?"right":"left",de);return wr?Wr.left=Wr.right:Wr.right=Wr.left,Sa(x,te,Wr,ne)}var ke=wt(te,x.doc.direction),Pe=z.ch,$e=z.sticky;if(Pe>=te.text.length?(Pe=te.text.length,$e="before"):Pe<=0&&(Pe=0,$e="after"),!ke)return ye($e=="before"?Pe-1:Pe,$e=="before");function bt(er,wr,Wr){var oi=ke[wr],hi=oi.level==1;return ye(Wr?er-1:er,hi!=Wr)}var Dt=Jt(ke,Pe,$e),pn=en,cn=bt(Pe,Dt,$e=="before");return pn!=null&&(cn.other=bt(Pe,pn,$e!="before")),cn}function _a(x,z){var ne=0;z=Lr(x.doc,z),x.options.lineWrapping||(ne=io(x.display)*z.ch);var te=rn(x.doc,z.line),ie=Cn(te)+ta(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function Ja(x,z,ne,te,ie){var de=xn(x,z,ne);return de.xRel=ie,te&&(de.outside=te),de}function Ga(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return Ja(te.first,0,null,-1,-1);var ie=mr(te,ne),de=te.first+te.size-1;if(ie>de)return Ja(te.first+te.size-1,rn(te,de).text.length,null,1,1);z<0&&(z=0);for(var ye=rn(te,ie);;){var ke=Oi(x,ye,ie,z,ne),Pe=Ze(ye,ke.ch+(ke.xRel>0||ke.outside>0?1:0));if(!Pe)return ke;var $e=Pe.find(1);if($e.line==ie)return $e;ye=rn(te,ie=$e.line)}}function so(x,z,ne,te){te-=fa(z);var ie=z.text.length,de=$t(function(ye){return Di(x,ne,ye-1).bottom<=te},ie,0);return ie=$t(function(ye){return Di(x,ne,ye).top>te},de,ie),{begin:de,end:ie}}function Fa(x,z,ne,te){ne||(ne=na(x,z));var ie=Sa(x,z,Di(x,ne,te),"line").top;return so(x,z,ne,ie)}function Ca(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function Oi(x,z,ne,te,ie){ie-=Cn(z);var de=na(x,z),ye=fa(z),ke=0,Pe=z.text.length,$e=!0,bt=wt(z,x.doc.direction);if(bt){var Dt=(x.options.lineWrapping?da:Vi)(x,z,ne,de,bt,te,ie);$e=Dt.level!=1,ke=$e?Dt.from:Dt.to-1,Pe=$e?Dt.to:Dt.from-1}var pn=null,cn=null,er=$t(function(Wi){var Gi=Di(x,de,Wi);return Gi.top+=ye,Gi.bottom+=ye,Ca(Gi,te,ie,!1)?(Gi.top<=ie&&Gi.left<=te&&(pn=Wi,cn=Gi),!0):!1},ke,Pe),wr,Wr,oi=!1;if(cn){var hi=te-cn.left<cn.right-te,ti=hi==$e;er=pn+(ti?0:1),Wr=ti?"after":"before",wr=hi?cn.left:cn.right}else{!$e&&(er==Pe||er==ke)&&er++,Wr=er==0?"after":er==z.text.length?"before":Di(x,de,er-($e?1:0)).bottom+ye<=ie==$e?"after":"before";var vi=ha(x,xn(ne,er,Wr),"line",z,de);wr=vi.left,oi=ie<vi.top?-1:ie>=vi.bottom?1:0}return er=Lt(z.text,er,1),Ja(ne,er,Wr,oi,te-wr)}function Vi(x,z,ne,te,ie,de,ye){var ke=$t(function(Dt){var pn=ie[Dt],cn=pn.level!=1;return Ca(ha(x,xn(ne,cn?pn.to:pn.from,cn?"before":"after"),"line",z,te),de,ye,!0)},0,ie.length-1),Pe=ie[ke];if(ke>0){var $e=Pe.level!=1,bt=ha(x,xn(ne,$e?Pe.from:Pe.to,$e?"after":"before"),"line",z,te);Ca(bt,de,ye,!0)&&bt.top>ye&&(Pe=ie[ke-1])}return Pe}function da(x,z,ne,te,ie,de,ye){var ke=so(x,z,te,ye),Pe=ke.begin,$e=ke.end;/\s/.test(z.text.charAt($e-1))&&$e--;for(var bt=null,Dt=null,pn=0;pn<ie.length;pn++){var cn=ie[pn];if(!(cn.from>=$e||cn.to<=Pe)){var er=cn.level!=1,wr=Di(x,te,er?Math.min($e,cn.to)-1:Math.max(Pe,cn.from)).right,Wr=wr<de?de-wr+1e9:wr-de;(!bt||Dt>Wr)&&(bt=cn,Dt=Wr)}}return bt||(bt=ie[ie.length-1]),bt.from<Pe&&(bt={from:Pe,to:bt.to,level:bt.level}),bt.to>$e&&(bt={from:bt.from,to:$e,level:bt.level}),bt}var wa;function Ka(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(wa==null){wa=mt("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)wa.appendChild(document.createTextNode("x")),wa.appendChild(mt("br"));wa.appendChild(document.createTextNode("x"))}Mt(x.measure,wa);var ne=wa.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Xe(x.measure),ne||1}function io(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=mt("span","xxxxxxxxxx"),ne=mt("pre",[z],"CodeMirror-line-like");Mt(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function ho(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,de=z.gutters.firstChild,ye=0;de;de=de.nextSibling,++ye){var ke=x.display.gutterSpecs[ye].className;ne[ke]=de.offsetLeft+de.clientLeft+ie,te[ke]=de.clientWidth}return{fixedPos:Bo(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Bo(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Oo(x){var z=Ka(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/io(x.display)-3);return function(ie){if(yr(x.doc,ie))return 0;var de=0;if(ie.widgets)for(var ye=0;ye<ie.widgets.length;ye++)ie.widgets[ye].height&&(de+=ie.widgets[ye].height);return ne?de+(Math.ceil(ie.text.length/te)||1)*z:de+z}}function lo(x){var z=x.doc,ne=Oo(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&nr(te,ie)})}function Ao(x,z,ne,te){var ie=x.display;if(!ne&&gi(z).getAttribute("cm-not-content")=="true")return null;var de,ye,ke=ie.lineSpace.getBoundingClientRect();try{de=z.clientX-ke.left,ye=z.clientY-ke.top}catch(Dt){return null}var Pe=Ga(x,de,ye),$e;if(te&&Pe.xRel>0&&($e=rn(x.doc,Pe.line).text).length==Pe.ch){var bt=Ue($e,$e.length,x.options.tabSize)-$e.length;Pe=xn(Pe.line,Math.max(0,Math.round((de-Hi(x.display).left)/io(x.display))-bt))}return Pe}function ia(x,z){if(z>=x.display.viewTo||(z-=x.display.viewFrom,z<0))return null;for(var ne=x.display.view,te=0;te<ne.length;te++)if(z-=ne[te].size,z<0)return te}function Fi(x,z,ne,te){z==null&&(z=x.doc.first),ne==null&&(ne=x.doc.first+x.doc.size),te||(te=0);var ie=x.display;if(te&&ne<ie.viewTo&&(ie.updateLineNumbers==null||ie.updateLineNumbers>z)&&(ie.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=ie.viewTo)Gr&&on(x.doc,z)<ie.viewTo&&ka(x);else if(ne<=ie.viewFrom)Gr&&Un(x.doc,ne+te)>ie.viewFrom?ka(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)ka(x);else if(z<=ie.viewFrom){var de=uo(x,ne,ne+te,1);de?(ie.view=ie.view.slice(de.index),ie.viewFrom=de.lineN,ie.viewTo+=te):ka(x)}else if(ne>=ie.viewTo){var ye=uo(x,z,z,-1);ye?(ie.view=ie.view.slice(0,ye.index),ie.viewTo=ye.lineN):ka(x)}else{var ke=uo(x,z,z,-1),Pe=uo(x,ne,ne+te,1);ke&&Pe?(ie.view=ie.view.slice(0,ke.index).concat(Zn(x,ke.lineN,Pe.lineN)).concat(ie.view.slice(Pe.index)),ie.viewTo+=te):ka(x)}var $e=ie.externalMeasured;$e&&(ne<$e.lineN?$e.lineN+=te:z<$e.lineN+$e.size&&(ie.externalMeasured=null))}function Ta(x,z,ne){x.curOp.viewChanged=!0;var te=x.display,ie=x.display.externalMeasured;if(ie&&z>=ie.lineN&&z<ie.lineN+ie.size&&(te.externalMeasured=null),!(z<te.viewFrom||z>=te.viewTo)){var de=te.view[ia(x,z)];if(de.node!=null){var ye=de.changes||(de.changes=[]);Rt(ye,ne)==-1&&ye.push(ne)}}}function ka(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function uo(x,z,ne,te){var ie=ia(x,z),de,ye=x.display.view;if(!Gr||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var ke=x.display.viewFrom,Pe=0;Pe<ie;Pe++)ke+=ye[Pe].size;if(ke!=z){if(te>0){if(ie==ye.length-1)return null;de=ke+ye[ie].size-z,ie++}else de=ke-z;z+=de,ne+=de}for(;on(x.doc,ne)!=ne;){if(ie==(te<0?0:ye.length-1))return null;ne+=te*ye[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function ao(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=Zn(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=Zn(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(ia(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(Zn(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,ia(x,ne)))),te.viewTo=ne}function hs(x){for(var z=x.display.view,ne=0,te=0;te<z.length;te++){var ie=z[te];!ie.hidden&&(!ie.node||ie.changes)&&++ne}return ne}function Qo(x){x.display.input.showSelection(x.display.input.prepareSelection())}function ps(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),de=te.selection=document.createDocumentFragment(),ye=0;ye<ne.sel.ranges.length;ye++)if(!(!z&&ye==ne.sel.primIndex)){var ke=ne.sel.ranges[ye];if(!(ke.from().line>=x.display.viewTo||ke.to().line<x.display.viewFrom)){var Pe=ke.empty();(Pe||x.options.showCursorWhenSelecting)&&sa(x,ke.head,ie),Pe||ki(x,ke,de)}}return te}function sa(x,z,ne){var te=ha(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(mt("div","\xA0","CodeMirror-cursor"));if(ie.style.left=te.left+"px",ie.style.top=te.top+"px",ie.style.height=Math.max(0,te.bottom-te.top)*x.options.cursorHeight+"px",te.other){var de=ne.appendChild(mt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));de.style.display="",de.style.left=te.other.left+"px",de.style.top=te.other.top+"px",de.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function Hr(x,z){return x.top-z.top||x.left-z.left}function ki(x,z,ne){var te=x.display,ie=x.doc,de=document.createDocumentFragment(),ye=Hi(x.display),ke=ye.left,Pe=Math.max(te.sizerWidth,xi(x)-te.sizer.offsetLeft)-ye.right,$e=ie.direction=="ltr";function bt(ti,vi,Wi,Gi){vi<0&&(vi=0),vi=Math.round(vi),Gi=Math.round(Gi),de.appendChild(mt("div",null,"CodeMirror-selected","position: absolute; left: "+ti+`px;
|
|
|
top: `+vi+"px; width: "+(Wi==null?Pe-ti:Wi)+`px;
|
|
|
height: `+(Gi-vi)+"px"))}function Dt(ti,vi,Wi){var Gi=rn(ie,ti),ba=Gi.text.length,to,Wo;function bo(Do,fs){return Va(x,xn(ti,Do),"div",Gi,fs)}function cs(Do,fs,la){var wo=Fa(x,Gi,null,Do),xo=fs=="ltr"==(la=="after")?"left":"right",Co=la=="after"?wo.begin:wo.end-(/\s/.test(Gi.text.charAt(wo.end-1))?2:1);return bo(Co,xo)[xo]}var ds=wt(Gi,ie.direction);return Kt(ds,vi||0,Wi==null?ba:Wi,function(Do,fs,la,wo){var xo=la=="ltr",Co=bo(Do,xo?"left":"right"),_o=bo(fs-1,xo?"right":"left"),Wl=vi==null&&Do==0,ys=Wi==null&&fs==ba,Go=wo==0,Wa=!ds||wo==ds.length-1;if(_o.top-Co.top<=3){var Ro=($e?Wl:ys)&&Go,Mc=($e?ys:Wl)&&Wa,sl=Ro?ke:(xo?Co:_o).left,xl=Mc?Pe:(xo?_o:Co).right;bt(sl,Co.top,xl-sl,Co.bottom)}else{var Vs,Po,Zl,Xo;xo?(Vs=$e&&Wl&&Go?ke:Co.left,Po=$e?Pe:cs(Do,la,"before"),Zl=$e?ke:cs(fs,la,"after"),Xo=$e&&ys&&Wa?Pe:_o.right):(Vs=$e?cs(Do,la,"before"):ke,Po=!$e&&Wl&&Go?Pe:Co.right,Zl=!$e&&ys&&Wa?ke:_o.left,Xo=$e?cs(fs,la,"after"):Pe),bt(Vs,Co.top,Po-Vs,Co.bottom),Co.bottom<_o.top&&bt(ke,Co.bottom,null,_o.top),bt(Zl,_o.top,Xo-Zl,_o.bottom)}(!to||Hr(Co,to)<0)&&(to=Co),Hr(_o,to)<0&&(to=_o),(!Wo||Hr(Co,Wo)<0)&&(Wo=Co),Hr(_o,Wo)<0&&(Wo=_o)}),{start:to,end:Wo}}var pn=z.from(),cn=z.to();if(pn.line==cn.line)Dt(pn.line,pn.ch,cn.ch);else{var er=rn(ie,pn.line),wr=rn(ie,cn.line),Wr=ct(er)==ct(wr),oi=Dt(pn.line,pn.ch,Wr?er.text.length+1:null).end,hi=Dt(cn.line,Wr?0:null,cn.ch).start;Wr&&(oi.top<hi.top-2?(bt(oi.right,oi.top,null,oi.bottom),bt(ke,hi.top,hi.left,hi.bottom)):bt(oi.right,oi.top,hi.left-oi.right,oi.bottom)),oi.bottom<hi.top&&bt(ke,oi.bottom,null,hi.top)}ne.appendChild(de)}function Li(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var ne=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||Fo(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Ri(x){x.state.focused||(x.display.input.focus(),Ua(x))}function Ha(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Fo(x))},100)}function Ua(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(gn(x,"focus",x,z),x.state.focused=!0,Yt(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),Me&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Li(x))}function Fo(x,z){x.state.delayingBlurEvent||(x.state.focused&&(gn(x,"blur",x,z),x.state.focused=!1,Ve(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function Zo(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],de=x.options.lineWrapping,ye=void 0,ke=0;if(!ie.hidden){if(ve&&Se<8){var Pe=ie.node.offsetTop+ie.node.offsetHeight;ye=Pe-ne,ne=Pe}else{var $e=ie.node.getBoundingClientRect();ye=$e.bottom-$e.top,!de&&ie.text.firstChild&&(ke=ie.text.firstChild.getBoundingClientRect().right-$e.left-1)}var bt=ie.line.height-ye;if((bt>.005||bt<-.005)&&(nr(ie.line,ye),ls(ie.line),ie.rest))for(var Dt=0;Dt<ie.rest.length;Dt++)ls(ie.rest[Dt]);if(ke>x.display.sizerWidth){var pn=Math.ceil(ke/io(x.display));pn>x.display.maxLineLength&&(x.display.maxLineLength=pn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function ls(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var ne=x.widgets[z],te=ne.node.parentNode;te&&(ne.height=te.offsetHeight)}}function va(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-ta(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,de=mr(z,te),ye=mr(z,ie);if(ne&&ne.ensure){var ke=ne.ensure.from.line,Pe=ne.ensure.to.line;ke<de?(de=ke,ye=mr(z,Cn(rn(z,ke))+x.wrapper.clientHeight)):Math.min(Pe,z.lastLine())>=ye&&(de=mr(z,Cn(rn(z,Pe))-x.wrapper.clientHeight),ye=Pe)}return{from:de,to:Math.max(ye,de+1)}}function No(x,z){if(!$n(x,"scrollCursorIntoView")){var ne=x.display,te=ne.sizer.getBoundingClientRect(),ie=null;if(z.top+te.top<0?ie=!0:z.bottom+te.top>(window.innerHeight||document.documentElement.clientHeight)&&(ie=!1),ie!=null&&!st){var de=mt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-ta(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+ui(x)+ne.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(de),de.scrollIntoView(ie),x.display.lineSpace.removeChild(de)}}}function us(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?xn(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?xn(z.line,z.ch+1,"before"):z);for(var de=0;de<5;de++){var ye=!1,ke=ha(x,z),Pe=!ne||ne==z?ke:ha(x,ne);ie={left:Math.min(ke.left,Pe.left),top:Math.min(ke.top,Pe.top)-te,right:Math.max(ke.left,Pe.left),bottom:Math.max(ke.bottom,Pe.bottom)+te};var $e=As(x,ie),bt=x.doc.scrollTop,Dt=x.doc.scrollLeft;if($e.scrollTop!=null&&(Ia(x,$e.scrollTop),Math.abs(x.doc.scrollTop-bt)>1&&(ye=!0)),$e.scrollLeft!=null&&(go(x,$e.scrollLeft),Math.abs(x.doc.scrollLeft-Dt)>1&&(ye=!0)),!ye)break}return ie}function cl(x,z){var ne=As(x,z);ne.scrollTop!=null&&Ia(x,ne.scrollTop),ne.scrollLeft!=null&&go(x,ne.scrollLeft)}function As(x,z){var ne=x.display,te=Ka(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,de=Ni(x),ye={};z.bottom-z.top>de&&(z.bottom=z.top+de);var ke=x.doc.height+_i(ne),Pe=z.top<te,$e=z.bottom>ke-te;if(z.top<ie)ye.scrollTop=Pe?0:z.top;else if(z.bottom>ie+de){var bt=Math.min(z.top,($e?ke:z.bottom)-de);bt!=ie&&(ye.scrollTop=bt)}var Dt=x.options.fixedGutter?0:ne.gutters.offsetWidth,pn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Dt,cn=xi(x)-ne.gutters.offsetWidth,er=z.right-z.left>cn;return er&&(z.right=z.left+cn),z.left<10?ye.scrollLeft=0:z.left<pn?ye.scrollLeft=Math.max(0,z.left+Dt-(er?0:10)):z.right>cn+pn-3&&(ye.scrollLeft=z.right+(er?0:10)-cn),ye}function ms(x,z){z!=null&&(Ys(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function zo(x){Ys(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ts(x,z,ne){(z!=null||ne!=null)&&Ys(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Is(x,z){Ys(x),x.curOp.scrollToPos=z}function Ys(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=_a(x,z.from),te=_a(x,z.to);oo(x,ne,te,z.margin)}}function oo(x,z,ne,te){var ie=As(x,{left:Math.min(z.left,ne.left),top:Math.min(z.top,ne.top)-te,right:Math.max(z.right,ne.right),bottom:Math.max(z.bottom,ne.bottom)+te});Ts(x,ie.scrollLeft,ie.scrollTop)}function Ia(x,z){Math.abs(x.doc.scrollTop-z)<2||(se||Yu(x,{top:z}),Xa(x,z,!0),se&&Yu(x),is(x,100))}function Xa(x,z,ne){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!ne)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function go(x,z,ne,te){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ne?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!te)&&(x.doc.scrollLeft=z,Vc(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function yo(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+_i(x.display));return{clientHeight:z.scroller.clientHeight,viewHeight:z.wrapper.clientHeight,scrollWidth:z.scroller.scrollWidth,clientWidth:z.scroller.clientWidth,viewWidth:z.wrapper.clientWidth,barLeft:x.options.fixedGutter?ne:0,docHeight:te,scrollHeight:te+ui(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var Ko=function(x,z,ne){this.cm=ne;var te=this.vert=mt("div",[mt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=mt("div",[mt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),Ot(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),Ot(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&Se<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ko.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ne=x.scrollHeight>x.clientHeight+1,te=x.nativeBarWidth;if(ne){this.vert.style.display="block",this.vert.style.bottom=z?te+"px":"0";var ie=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ne?te+"px":"0",this.horiz.style.left=x.barLeft+"px";var de=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+de)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(te==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ne?te:0,bottom:z?te:0}},Ko.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ko.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ko.prototype.zeroWidthHack=function(){var x=Ce&&!Oe?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Le,this.disableVert=new Le},Ko.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),de=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);de!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},Ko.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var So=function(){};So.prototype.update=function(){return{bottom:0,right:0}},So.prototype.setScrollLeft=function(){},So.prototype.setScrollTop=function(){},So.prototype.clear=function(){};function xs(x,z){z||(z=yo(x));var ne=x.display.barWidth,te=x.display.barHeight;Xl(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&Zo(x),Xl(x,yo(x)),ne=x.display.barWidth,te=x.display.barHeight}function Xl(x,z){var ne=x.display,te=ne.scrollbars.update(z);ne.sizer.style.paddingRight=(ne.barWidth=te.right)+"px",ne.sizer.style.paddingBottom=(ne.barHeight=te.bottom)+"px",ne.heightForcer.style.borderBottom=te.bottom+"px solid transparent",te.right&&te.bottom?(ne.scrollbarFiller.style.display="block",ne.scrollbarFiller.style.height=te.bottom+"px",ne.scrollbarFiller.style.width=te.right+"px"):ne.scrollbarFiller.style.display="",te.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(ne.gutterFiller.style.display="block",ne.gutterFiller.style.height=te.bottom+"px",ne.gutterFiller.style.width=z.gutterWidth+"px"):ne.gutterFiller.style.display=""}var ql={native:Ko,null:So};function vu(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Ve(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new ql[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),Ot(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,ne){ne=="horizontal"?go(x,z):Ia(x,z)},x),x.display.scrollbars.addClass&&Yt(x.display.wrapper,x.display.scrollbars.addClass)}var Xu=0;function Ks(x){x.curOp={cm:x,viewChanged:!1,startHeight:x.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xu},hn(x.curOp)}function Ds(x){var z=x.curOp;z&&jn(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;yu(ne)})}function yu(x){for(var z=x.ops,ne=0;ne<z.length;ne++)Yl(z[ne]);for(var te=0;te<z.length;te++)Da(z[te]);for(var ie=0;ie<z.length;ie++)ma(z[ie]);for(var de=0;de<z.length;de++)Ho(z[de]);for(var ye=0;ye<z.length;ye++)es(z[ye])}function Yl(x){var z=x.cm,ne=z.display;Jl(z),x.updateMaxLine&&Bn(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<ne.viewFrom||x.scrollToPos.to.line>=ne.viewTo)||ne.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new gs(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function Da(x){x.updatedDisplay=x.mustUpdate&&qu(x.cm,x.update)}function ma(x){var z=x.cm,ne=z.display;x.updatedDisplay&&Zo(z),x.barMeasure=yo(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=Aa(z,ne.maxLine,ne.maxLine.text.length).left+3,z.display.sizerWidth=x.adjustWidthTo,x.barMeasure.scrollWidth=Math.max(ne.scroller.clientWidth,ne.sizer.offsetLeft+x.adjustWidthTo+ui(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-xi(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Ho(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&go(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==Et();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&xs(z,x.barMeasure),x.updatedDisplay&&Qu(z,x.barMeasure),x.selectionChanged&&Li(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Ri(x.cm)}function es(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&jc(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Xa(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&go(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=us(z,Lr(te,x.scrollToPos.from),Lr(te,x.scrollToPos.to),x.scrollToPos.margin);No(z,ie)}var de=x.maybeHiddenMarkers,ye=x.maybeUnhiddenMarkers;if(de)for(var ke=0;ke<de.length;++ke)de[ke].lines.length||gn(de[ke],"hide");if(ye)for(var Pe=0;Pe<ye.length;++Pe)ye[Pe].lines.length&&gn(ye[Pe],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&gn(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function ga(x,z){if(x.curOp)return z();Ks(x);try{return z()}finally{Ds(x)}}function za(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ks(x);try{return z.apply(x,arguments)}finally{Ds(x)}}}function Oa(x){return function(){if(this.curOp)return x.apply(this,arguments);Ks(this);try{return x.apply(this,arguments)}finally{Ds(this)}}}function po(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ks(z);try{return x.apply(this,arguments)}finally{Ds(z)}}}function is(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,fn(Hs,x))}function Hs(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=ri(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(de){if(te.line>=x.display.viewFrom){var ye=de.styles,ke=de.text.length>x.options.maxHighlightLength?Ct(z.mode,te.state):null,Pe=kt(x,de,te,!0);ke&&(te.state=ke),de.styles=Pe.styles;var $e=de.styleClasses,bt=Pe.classes;bt?de.styleClasses=bt:$e&&(de.styleClasses=null);for(var Dt=!ye||ye.length!=de.styles.length||$e!=bt&&(!$e||!bt||$e.bgClass!=bt.bgClass||$e.textClass!=bt.textClass),pn=0;!Dt&&pn<ye.length;++pn)Dt=ye[pn]!=de.styles[pn];Dt&&ie.push(te.line),de.stateAfter=te.save(),te.nextLine()}else de.text.length<=x.options.maxHighlightLength&&Ai(x,de.text,te),de.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return is(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&ga(x,function(){for(var de=0;de<ie.length;de++)Ta(x,ie[de],"text")})}}var gs=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=va(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=xi(x),this.force=ne,this.dims=ho(x),this.events=[]};gs.prototype.signal=function(x,z){tr(x,z)&&this.events.push(arguments)},gs.prototype.finish=function(){for(var x=0;x<this.events.length;x++)gn.apply(null,this.events[x])};function Jl(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=ui(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=ui(x)+"px",z.scrollbarsClipped=!0)}function jd(x){if(x.hasFocus())return null;var z=Et();if(!z||!Pt(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&Pt(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function Vd(x){if(!(!x||!x.activeElt||x.activeElt==Et())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Pt(document.body,x.anchorNode)&&Pt(document.body,x.focusNode))){var z=window.getSelection(),ne=document.createRange();ne.setEnd(x.anchorNode,x.anchorOffset),ne.collapse(!1),z.removeAllRanges(),z.addRange(ne),z.extend(x.focusNode,x.focusOffset)}}function qu(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return ka(x),!1;if(!z.force&&z.visible.from>=ne.viewFrom&&z.visible.to<=ne.viewTo&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo)&&ne.renderedView==ne.view&&hs(x)==0)return!1;bu(x)&&(ka(x),z.dims=ho(x));var ie=te.first+te.size,de=Math.max(z.visible.from-x.options.viewportMargin,te.first),ye=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<de&&de-ne.viewFrom<20&&(de=Math.max(te.first,ne.viewFrom)),ne.viewTo>ye&&ne.viewTo-ye<20&&(ye=Math.min(ie,ne.viewTo)),Gr&&(de=on(x.doc,de),ye=Un(x.doc,ye));var ke=de!=ne.viewFrom||ye!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;ao(x,de,ye),ne.viewOffset=Cn(rn(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Pe=hs(x);if(!ke&&Pe==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var $e=jd(x);return Pe>4&&(ne.lineDiv.style.display="none"),Ud(x,ne.updateLineNumbers,z.dims),Pe>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Vd($e),Xe(ne.cursorDiv),Xe(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,ke&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,is(x,400)),ne.updateLineNumbers=null,!0}function jc(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==xi(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+_i(x.display)-Ni(x),ne.top)}),z.visible=va(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=va(x.display,x.doc,ne));if(!qu(x,z))break;Zo(x);var ie=yo(x);Qo(x),xs(x,ie),Qu(x,ie),z.force=!1}z.signal(x,"update",x),(x.display.viewFrom!=x.display.reportedViewFrom||x.display.viewTo!=x.display.reportedViewTo)&&(z.signal(x,"viewportChange",x,x.display.viewFrom,x.display.viewTo),x.display.reportedViewFrom=x.display.viewFrom,x.display.reportedViewTo=x.display.viewTo)}function Yu(x,z){var ne=new gs(x,z);if(qu(x,ne)){Zo(x),jc(x,ne);var te=yo(x);Qo(x),xs(x,te),Qu(x,te),ne.finish()}}function Ud(x,z,ne){var te=x.display,ie=x.options.lineNumbers,de=te.lineDiv,ye=de.firstChild;function ke(er){var wr=er.nextSibling;return Me&&Ce&&x.display.currentWheelTarget==er?er.style.display="none":er.parentNode.removeChild(er),wr}for(var Pe=te.view,$e=te.viewFrom,bt=0;bt<Pe.length;bt++){var Dt=Pe[bt];if(!Dt.hidden)if(!Dt.node||Dt.node.parentNode!=de){var pn=Or(x,Dt,$e,ne);de.insertBefore(pn,ye)}else{for(;ye!=Dt.node;)ye=ke(ye);var cn=ie&&z!=null&&z<=$e&&Dt.lineNumber;Dt.changes&&(Rt(Dt.changes,"gutter")>-1&&(cn=!1),ii(x,Dt,$e,ne)),cn&&(Xe(Dt.lineNumber),Dt.lineNumber.appendChild(document.createTextNode(Yr(x.options,$e)))),ye=Dt.node.nextSibling}$e+=Dt.size}for(;ye;)ye=ke(ye)}function Ju(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Qu(x,z){x.display.sizer.style.minHeight=z.docHeight+"px",x.display.heightForcer.style.top=z.docHeight+"px",x.display.gutters.style.height=z.docHeight+x.display.barHeight+ui(x)+"px"}function Vc(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Bo(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,de=te+"px",ye=0;ye<ne.length;ye++)if(!ne[ye].hidden){x.options.fixedGutter&&(ne[ye].gutter&&(ne[ye].gutter.style.left=de),ne[ye].gutterBackground&&(ne[ye].gutterBackground.style.left=de));var ke=ne[ye].alignable;if(ke)for(var Pe=0;Pe<ke.length;Pe++)ke[Pe].style.left=de}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function bu(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=Yr(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(mt("div",[mt("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),de=ie.firstChild.offsetWidth,ye=ie.offsetWidth-de;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(de,te.lineGutter.offsetWidth-ye)+1,te.lineNumWidth=te.lineNumInnerWidth+ye,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Ju(x.display),!0}return!1}function ec(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var de=x[ie],ye=null;if(typeof de!="string"&&(ye=de.style,de=de.className),de=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:de,style:ye})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function Uc(x){var z=x.gutters,ne=x.gutterSpecs;Xe(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],de=ie.className,ye=ie.style,ke=z.appendChild(mt("div",null,"CodeMirror-gutter "+de));ye&&(ke.style.cssText=ye),de=="CodeMirror-linenumbers"&&(x.lineGutter=ke,ke.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Ju(x)}function Ql(x){Uc(x.display),Fi(x),Vc(x)}function Gd(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=mt("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=mt("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=St("div",null,"CodeMirror-code"),ie.selectionDiv=mt("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=mt("div",null,"CodeMirror-cursors"),ie.measure=mt("div",null,"CodeMirror-measure"),ie.lineMeasure=mt("div",null,"CodeMirror-measure"),ie.lineSpace=St("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var de=St("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=mt("div",[de],null,"position: relative"),ie.sizer=mt("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=mt("div",null,null,"position: absolute; height: "+Sn+"px; width: 1px;"),ie.gutters=mt("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=mt("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=mt("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),ve&&Se<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Me&&!(se&&Ge)&&(ie.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(ie.wrapper):x(ie.wrapper)),ie.viewFrom=ie.viewTo=z.first,ie.reportedViewFrom=ie.reportedViewTo=z.first,ie.view=[],ie.renderedView=null,ie.externalMeasured=null,ie.viewOffset=0,ie.lastWrapHeight=ie.lastWrapWidth=0,ie.updateLineNumbers=null,ie.nativeBarWidth=ie.barHeight=ie.barWidth=0,ie.scrollbarsClipped=!1,ie.lineNumWidth=ie.lineNumInnerWidth=ie.lineNumChars=null,ie.alignWidgets=!1,ie.cachedCharWidth=ie.cachedTextHeight=ie.cachedPaddingH=null,ie.maxLine=null,ie.maxLineLength=0,ie.maxLineChanged=!1,ie.wheelDX=ie.wheelDY=ie.wheelStartX=ie.wheelStartY=null,ie.shift=!1,ie.selForContextMenu=null,ie.activeTouch=null,ie.gutterSpecs=ec(te.gutters,te.lineNumbers),Uc(ie),ne.init(ie)}var xu=0,jo=null;ve?jo=-.53:se?jo=15:me?jo=-.7:ot&&(jo=-1/3);function Pl(x){var z=x.wheelDeltaX,ne=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),ne==null&&x.detail&&x.axis==x.VERTICAL_AXIS?ne=x.detail:ne==null&&(ne=x.wheelDelta),{x:z,y:ne}}function Gc(x){var z=Pl(x);return z.x*=jo,z.y*=jo,z}function Xc(x,z){var ne=Pl(z),te=ne.x,ie=ne.y,de=x.display,ye=de.scroller,ke=ye.scrollWidth>ye.clientWidth,Pe=ye.scrollHeight>ye.clientHeight;if(te&&ke||ie&&Pe){if(ie&&Ce&&Me){e:for(var $e=z.target,bt=de.view;$e!=ye;$e=$e.parentNode)for(var Dt=0;Dt<bt.length;Dt++)if(bt[Dt].node==$e){x.display.currentWheelTarget=$e;break e}}if(te&&!se&&!Te&&jo!=null){ie&&Pe&&Ia(x,Math.max(0,ye.scrollTop+ie*jo)),go(x,Math.max(0,ye.scrollLeft+te*jo)),(!ie||ie&&Pe)&&ur(z),de.wheelStartX=null;return}if(ie&&jo!=null){var pn=ie*jo,cn=x.doc.scrollTop,er=cn+de.wrapper.clientHeight;pn<0?cn=Math.max(0,cn+pn-50):er=Math.min(x.doc.height,er+pn+50),Yu(x,{top:cn,bottom:er})}xu<20&&(de.wheelStartX==null?(de.wheelStartX=ye.scrollLeft,de.wheelStartY=ye.scrollTop,de.wheelDX=te,de.wheelDY=ie,setTimeout(function(){if(de.wheelStartX!=null){var wr=ye.scrollLeft-de.wheelStartX,Wr=ye.scrollTop-de.wheelStartY,oi=Wr&&de.wheelDY&&Wr/de.wheelDY||wr&&de.wheelDX&&wr/de.wheelDX;de.wheelStartX=de.wheelStartY=null,oi&&(jo=(jo*xu+oi)/(xu+1),++xu)}},200)):(de.wheelDX+=te,de.wheelDY+=ie))}}var vs=function(x,z){this.ranges=x,this.primIndex=z};vs.prototype.primary=function(){return this.ranges[this.primIndex]},vs.prototype.equals=function(x){if(x==this)return!0;if(x.primIndex!=this.primIndex||x.ranges.length!=this.ranges.length)return!1;for(var z=0;z<this.ranges.length;z++){var ne=this.ranges[z],te=x.ranges[z];if(!Si(ne.anchor,te.anchor)||!Si(ne.head,te.head))return!1}return!0},vs.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new ja(Ii(this.ranges[z].anchor),Ii(this.ranges[z].head));return new vs(x,this.primIndex)},vs.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},vs.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(qn(z,te.from())>=0&&qn(x,te.to())<=0)return ne}return-1};var ja=function(x,z){this.anchor=x,this.head=z};ja.prototype.from=function(){return si(this.anchor,this.head)},ja.prototype.to=function(){return di(this.anchor,this.head)},ja.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ms(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(pn,cn){return qn(pn.from(),cn.from())}),ne=Rt(z,ie);for(var de=1;de<z.length;de++){var ye=z[de],ke=z[de-1],Pe=qn(ke.to(),ye.from());if(te&&!ye.empty()?Pe>0:Pe>=0){var $e=si(ke.from(),ye.from()),bt=di(ke.to(),ye.to()),Dt=ke.empty()?ye.from()==ye.head:ke.from()==ke.head;de<=ne&&--ne,z.splice(--de,2,new ja(Dt?bt:$e,Dt?$e:bt))}}return new vs(z,ne)}function Ps(x,z){return new vs([new ja(x,z||x)],0)}function Js(x){return x.text?xn(x.from.line+x.text.length-1,jt(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function qc(x,z){if(qn(x,z.from)<0)return x;if(qn(x,z.to)<=0)return Js(z);var ne=x.line+z.text.length-(z.to.line-z.from.line)-1,te=x.ch;return x.line==z.to.line&&(te+=Js(z).ch-z.to.ch),xn(ne,te)}function tc(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new ja(qc(ie.anchor,z),qc(ie.head,z)))}return Ms(x.cm,ne,x.sel.primIndex)}function Bl(x,z,ne){return x.line==z.line?xn(ne.line,x.ch-z.ch+ne.ch):xn(ne.line+(x.line-z.line),x.ch)}function nc(x,z,ne){for(var te=[],ie=xn(x.first,0),de=ie,ye=0;ye<z.length;ye++){var ke=z[ye],Pe=Bl(ke.from,ie,de),$e=Bl(Js(ke),ie,de);if(ie=ke.to,de=$e,ne=="around"){var bt=x.sel.ranges[ye],Dt=qn(bt.head,bt.anchor)<0;te[ye]=new ja(Dt?$e:Pe,Dt?Pe:$e)}else te[ye]=new ja(Pe,Pe)}return new vs(te,x.sel.primIndex)}function rc(x){x.doc.mode=Bt(x.options,x.doc.modeOption),Ol(x)}function Ol(x){x.doc.iter(function(z){z.stateAfter&&(z.stateAfter=null),z.styles&&(z.styles=null)}),x.doc.modeFrontier=x.doc.highlightFrontier=x.doc.first,is(x,100),x.state.modeGen++,x.curOp&&Fi(x)}function Yc(x,z){return z.from.ch==0&&z.to.ch==0&&jt(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function ic(x,z,ne,te){function ie(hi){return ne?ne[hi]:null}function de(hi,ti,vi){xr(hi,ti,vi,te),Kn(hi,"change",hi,z)}function ye(hi,ti){for(var vi=[],Wi=hi;Wi<ti;++Wi)vi.push(new Fn($e[Wi],ie(Wi),te));return vi}var ke=z.from,Pe=z.to,$e=z.text,bt=rn(x,ke.line),Dt=rn(x,Pe.line),pn=jt($e),cn=ie($e.length-1),er=Pe.line-ke.line;if(z.full)x.insert(0,ye(0,$e.length)),x.remove($e.length,x.size-$e.length);else if(Yc(x,z)){var wr=ye(0,$e.length-1);de(Dt,Dt.text,cn),er&&x.remove(ke.line,er),wr.length&&x.insert(ke.line,wr)}else if(bt==Dt)if($e.length==1)de(bt,bt.text.slice(0,ke.ch)+pn+bt.text.slice(Pe.ch),cn);else{var Wr=ye(1,$e.length-1);Wr.push(new Fn(pn+bt.text.slice(Pe.ch),cn,te)),de(bt,bt.text.slice(0,ke.ch)+$e[0],ie(0)),x.insert(ke.line+1,Wr)}else if($e.length==1)de(bt,bt.text.slice(0,ke.ch)+$e[0]+Dt.text.slice(Pe.ch),ie(0)),x.remove(ke.line+1,er);else{de(bt,bt.text.slice(0,ke.ch)+$e[0],ie(0)),de(Dt,pn+Dt.text.slice(Pe.ch),cn);var oi=ye(1,$e.length-1);er>1&&x.remove(ke.line+1,er-1),x.insert(ke.line+1,oi)}Kn(x,"change",x,z)}function Qs(x,z,ne){function te(ie,de,ye){if(ie.linked)for(var ke=0;ke<ie.linked.length;++ke){var Pe=ie.linked[ke];if(Pe.doc!=de){var $e=ye&&Pe.sharedHist;ne&&!$e||(z(Pe.doc,$e),te(Pe.doc,ie,$e))}}}te(x,null,!0)}function Su(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,lo(x),rc(x),wu(x),x.options.lineWrapping||Bn(x),x.options.mode=z.modeOption,Fi(x)}function wu(x){(x.doc.direction=="rtl"?Yt:Ve)(x.display.lineDiv,"CodeMirror-rtl")}function ac(x){ga(x,function(){wu(x),Fi(x)})}function Cu(x){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=x||1}function oc(x,z){var ne={from:Ii(z.from),to:Js(z),text:Vn(x,z.from,z.to)};return cc(x,ne,z.from.line,z.to.line+1),Qs(x,function(te){return cc(te,ne,z.from.line,z.to.line+1)},!0),ne}function Jc(x){for(;x.length;){var z=jt(x);if(z.ranges)x.pop();else break}}function sc(x,z){if(z)return Jc(x.done),jt(x.done);if(x.done.length&&!jt(x.done).ranges)return jt(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),jt(x.done)}function Eu(x,z,ne,te){var ie=x.history;ie.undone.length=0;var de=+new Date,ye,ke;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>de-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(ye=sc(ie,ie.lastOp==te)))ke=jt(ye.changes),qn(z.from,z.to)==0&&qn(z.from,ke.to)==0?ke.to=Js(z):ye.changes.push(oc(x,z));else{var Pe=jt(ie.done);for((!Pe||!Pe.ranges)&&Mu(x.sel,ie.done),ye={changes:[oc(x,z)],generation:ie.generation},ie.done.push(ye);ie.done.length>ie.undoDepth;)ie.done.shift(),ie.done[0].ranges||ie.done.shift()}ie.done.push(ne),ie.generation=++ie.maxGeneration,ie.lastModTime=ie.lastSelTime=de,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,ke||gn(x,"historyAdded")}function lc(x,z,ne,te){var ie=z.charAt(0);return ie=="*"||ie=="+"&&ne.ranges.length==te.ranges.length&&ne.somethingSelected()==te.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function uc(x,z,ne,te){var ie=x.history,de=te&&te.origin;ne==ie.lastSelOp||de&&ie.lastSelOrigin==de&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==de||lc(x,de,jt(ie.done),z))?ie.done[ie.done.length-1]=z:Mu(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=de,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Jc(ie.undone)}function Mu(x,z){var ne=jt(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function cc(x,z,ne,te){var ie=z["spans_"+x.id],de=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(ye){ye.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[de]=ye.markedSpans),++de})}function dc(x){if(!x)return null;for(var z,ne=0;ne<x.length;++ne)x[ne].marker.explicitlyCleared?z||(z=x.slice(0,ne)):z&&z.push(x[ne]);return z?z.length?z:null:x}function Xd(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(dc(ne[ie]));return te}function Qc(x,z){var ne=Xd(x,z),te=Cr(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var de=ne[ie],ye=te[ie];if(de&&ye)e:for(var ke=0;ke<ye.length;++ke){for(var Pe=ye[ke],$e=0;$e<de.length;++$e)if(de[$e].marker==Pe.marker)continue e;de.push(Pe)}else ye&&(ne[ie]=ye)}return ne}function Nl(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var de=x[ie];if(de.ranges){te.push(ne?vs.prototype.deepCopy.call(de):de);continue}var ye=de.changes,ke=[];te.push({changes:ke});for(var Pe=0;Pe<ye.length;++Pe){var $e=ye[Pe],bt=void 0;if(ke.push({from:$e.from,to:$e.to,text:$e.text}),z)for(var Dt in $e)(bt=Dt.match(/^spans_(\d+)$/))&&Rt(z,Number(bt[1]))>-1&&(jt(ke)[Dt]=$e[Dt],delete $e[Dt])}}return te}function fc(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var de=qn(z,ie)<0;de!=qn(ne,ie)<0?(ie=z,z=ne):de!=qn(z,ne)<0&&(z=ne)}return new ja(ie,z)}else return new ja(ne||z,z)}function Rl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),To(x,new vs([fc(x.sel.primary(),z,ne,ie)],0),te)}function yi(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),de=0;de<x.sel.ranges.length;de++)te[de]=fc(x.sel.ranges[de],z[de],null,ie);var ye=Ms(x.cm,te,x.sel.primIndex);To(x,ye,ne)}function Ss(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,To(x,Ms(x.cm,ie,x.sel.primIndex),te)}function ed(x,z,ne,te){To(x,Ps(z,ne),te)}function qd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var de=0;de<ie.length;de++)this.ranges[de]=new ja(Lr(x,ie[de].anchor),Lr(x,ie[de].head))},origin:ne&&ne.origin};return gn(x,"beforeSelectionChange",x,te),x.cm&&gn(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?Ms(x.cm,te.ranges,te.ranges.length-1):z}function as(x,z,ne){var te=x.history.done,ie=jt(te);ie&&ie.ranges?(te[te.length-1]=z,_u(x,z,ne)):To(x,z,ne)}function To(x,z,ne){_u(x,z,ne),uc(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function _u(x,z,ne){(tr(x,"beforeSelectionChange")||x.cm&&tr(x.cm,"beforeSelectionChange"))&&(z=qd(x,z,ne));var te=ne&&ne.bias||(qn(z.primary().head,x.sel.primary().head)<0?-1:1);Yd(x,$l(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&zo(x.cm)}function Yd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Kr(x.cm)),Kn(x,"cursorActivity",x))}function Jd(x){Yd(x,$l(x,x.sel,null,!1))}function $l(x,z,ne,te){for(var ie,de=0;de<z.ranges.length;de++){var ye=z.ranges[de],ke=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[de],Pe=hc(x,ye.anchor,ke&&ke.anchor,ne,te),$e=hc(x,ye.head,ke&&ke.head,ne,te);(ie||Pe!=ye.anchor||$e!=ye.head)&&(ie||(ie=z.ranges.slice(0,de)),ie[de]=new ja(Pe,$e))}return ie?Ms(x.cm,ie,z.primIndex):z}function os(x,z,ne,te,ie){var de=rn(x,z.line);if(de.markedSpans)for(var ye=0;ye<de.markedSpans.length;++ye){var ke=de.markedSpans[ye],Pe=ke.marker,$e="selectLeft"in Pe?!Pe.selectLeft:Pe.inclusiveLeft,bt="selectRight"in Pe?!Pe.selectRight:Pe.inclusiveRight;if((ke.from==null||($e?ke.from<=z.ch:ke.from<z.ch))&&(ke.to==null||(bt?ke.to>=z.ch:ke.to>z.ch))){if(ie&&(gn(Pe,"beforeCursorEnter"),Pe.explicitlyCleared))if(de.markedSpans){--ye;continue}else break;if(!Pe.atomic)continue;if(ne){var Dt=Pe.find(te<0?1:-1),pn=void 0;if((te<0?bt:$e)&&(Dt=el(x,Dt,-te,Dt&&Dt.line==z.line?de:null)),Dt&&Dt.line==z.line&&(pn=qn(Dt,ne))&&(te<0?pn<0:pn>0))return os(x,Dt,z,te,ie)}var cn=Pe.find(te<0?-1:1);return(te<0?$e:bt)&&(cn=el(x,cn,te,cn.line==z.line?de:null)),cn?os(x,cn,z,te,ie):null}}return z}function hc(x,z,ne,te,ie){var de=te||1,ye=os(x,z,ne,de,ie)||!ie&&os(x,z,ne,de,!0)||os(x,z,ne,-de,ie)||!ie&&os(x,z,ne,-de,!0);return ye||(x.cantEdit=!0,xn(x.first,0))}function el(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?Lr(x,xn(z.line-1)):null:ne>0&&z.ch==(te||rn(x,z.line)).text.length?z.line<x.first+x.size-1?xn(z.line+1,0):null:new xn(z.line,z.ch+ne)}function td(x){x.setSelection(xn(x.firstLine(),0),xn(x.lastLine()),tt)}function pc(x,z,ne){var te={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return te.canceled=!0}};return ne&&(te.update=function(ie,de,ye,ke){ie&&(te.from=Lr(x,ie)),de&&(te.to=Lr(x,de)),ye&&(te.text=ye),ke!==void 0&&(te.origin=ke)}),gn(x,"beforeChange",x,te),x.cm&&gn(x.cm,"beforeChange",x.cm,te),te.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:te.from,to:te.to,text:te.text,origin:te.origin}}function dl(x,z,ne){if(x.cm){if(!x.cm.curOp)return za(x.cm,dl)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((tr(x,"beforeChange")||x.cm&&tr(x.cm,"beforeChange"))&&(z=pc(x,z,!0),!z))){var te=Tr&&!ne&&cr(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)nd(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else nd(x,z)}}function nd(x,z){if(!(z.text.length==1&&z.text[0]==""&&qn(z.from,z.to)==0)){var ne=tc(x,z);Eu(x,z,ne,x.cm?x.cm.curOp.id:NaN),Fl(x,z,ne,Cr(x,z));var te=[];Qs(x,function(ie,de){!de&&Rt(te,ie.history)==-1&&(ku(ie.history,z),te.push(ie.history)),Fl(ie,z,null,Cr(ie,z))})}}function tl(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,de,ye=x.sel,ke=z=="undo"?ie.done:ie.undone,Pe=z=="undo"?ie.undone:ie.done,$e=0;$e<ke.length&&(de=ke[$e],!(ne?de.ranges&&!de.equals(x.sel):!de.ranges));$e++);if($e!=ke.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(de=ke.pop(),de.ranges){if(Mu(de,Pe),ne&&!de.equals(x.sel)){To(x,de,{clearRedo:!1});return}ye=de}else if(te){ke.push(de);return}else break;var bt=[];Mu(ye,Pe),Pe.push({changes:bt,generation:ie.generation}),ie.generation=de.generation||++ie.maxGeneration;for(var Dt=tr(x,"beforeChange")||x.cm&&tr(x.cm,"beforeChange"),pn=function(wr){var Wr=de.changes[wr];if(Wr.origin=z,Dt&&!pc(x,Wr,!1))return ke.length=0,{};bt.push(oc(x,Wr));var oi=wr?tc(x,Wr):jt(ke);Fl(x,Wr,oi,Qc(x,Wr)),!wr&&x.cm&&x.cm.scrollIntoView({from:Wr.from,to:Js(Wr)});var hi=[];Qs(x,function(ti,vi){!vi&&Rt(hi,ti.history)==-1&&(ku(ti.history,Wr),hi.push(ti.history)),Fl(ti,Wr,null,Qc(ti,Wr))})},cn=de.changes.length-1;cn>=0;--cn){var er=pn(cn);if(er)return er.v}}}}function mc(x,z){if(z!=0&&(x.first+=z,x.sel=new vs(_n(x.sel.ranges,function(ie){return new ja(xn(ie.anchor.line+z,ie.anchor.ch),xn(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){Fi(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Ta(x.cm,te,"gutter")}}function Fl(x,z,ne,te){if(x.cm&&!x.cm.curOp)return za(x.cm,Fl)(x,z,ne,te);if(z.to.line<x.first){mc(x,z.text.length-1-(z.to.line-z.from.line));return}if(!(z.from.line>x.lastLine())){if(z.from.line<x.first){var ie=z.text.length-1-(x.first-z.from.line);mc(x,ie),z={from:xn(x.first,0),to:xn(z.to.line+ie,z.to.ch),text:[jt(z.text)],origin:z.origin}}var de=x.lastLine();z.to.line>de&&(z={from:z.from,to:xn(de,rn(x,de).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Vn(x,z.from,z.to),ne||(ne=tc(x,z)),x.cm?Qd(x.cm,z,te):ic(x,z,te),_u(x,ne,tt),x.cantEdit&&hc(x,xn(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,de=z.from,ye=z.to,ke=!1,Pe=de.line;x.options.lineWrapping||(Pe=Xn(ct(rn(te,de.line))),te.iter(Pe,ye.line+1,function(cn){if(cn==ie.maxLine)return ke=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Kr(x),ic(te,z,ne,Oo(x)),x.options.lineWrapping||(te.iter(Pe,de.line+z.text.length,function(cn){var er=vn(cn);er>ie.maxLineLength&&(ie.maxLine=cn,ie.maxLineLength=er,ie.maxLineChanged=!0,ke=!1)}),ke&&(x.curOp.updateMaxLine=!0)),Ki(te,de.line),is(x,400);var $e=z.text.length-(ye.line-de.line)-1;z.full?Fi(x):de.line==ye.line&&z.text.length==1&&!Yc(x.doc,z)?Ta(x,de.line,"text"):Fi(x,de.line,ye.line+1,$e);var bt=tr(x,"changes"),Dt=tr(x,"change");if(Dt||bt){var pn={from:de,to:ye,text:z.text,removed:z.removed,origin:z.origin};Dt&&Kn(x,"change",x,pn),bt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(pn)}x.display.selForContextMenu=null}function eu(x,z,ne,te,ie){var de;te||(te=ne),qn(te,ne)<0&&(de=[te,ne],ne=de[0],te=de[1]),typeof z=="string"&&(z=x.splitLines(z)),dl(x,{from:ne,to:te,text:z,origin:ie})}function ef(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function tf(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var de=x[ie],ye=!0;if(de.ranges){de.copied||(de=x[ie]=de.deepCopy(),de.copied=!0);for(var ke=0;ke<de.ranges.length;ke++)ef(de.ranges[ke].anchor,z,ne,te),ef(de.ranges[ke].head,z,ne,te);continue}for(var Pe=0;Pe<de.changes.length;++Pe){var $e=de.changes[Pe];if(ne<$e.from.line)$e.from=xn($e.from.line+te,$e.from.ch),$e.to=xn($e.to.line+te,$e.to.ch);else if(z<=$e.to.line){ye=!1;break}}ye||(x.splice(0,ie+1),ie=0)}}function ku(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;tf(x.done,ne,te,ie),tf(x.undone,ne,te,ie)}function Lu(x,z,ne,te){var ie=z,de=z;return typeof z=="number"?de=rn(x,zi(x,z)):ie=Xn(z),ie==null?null:(te(de,ie)&&x.cm&&Ta(x.cm,ie,ne),de)}function fl(x){this.lines=x,this.parent=null;for(var z=0,ne=0;ne<x.length;++ne)x[ne].parent=this,z+=x[ne].height;this.height=z}fl.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ne=x,te=x+z;ne<te;++ne){var ie=this.lines[ne];this.height-=ie.height,Qn(ie),Kn(ie,"delete")}this.lines.splice(x,z)},collapse:function(x){x.push.apply(x,this.lines)},insertInner:function(x,z,ne){this.height+=ne,this.lines=this.lines.slice(0,x).concat(z).concat(this.lines.slice(x));for(var te=0;te<z.length;++te)z[te].parent=this},iterN:function(x,z,ne){for(var te=x+z;x<te;++x)if(ne(this.lines[x]))return!0}};function tu(x){this.children=x;for(var z=0,ne=0,te=0;te<x.length;++te){var ie=x[te];z+=ie.chunkSize(),ne+=ie.height,ie.parent=this}this.size=z,this.height=ne,this.parent=null}tu.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var ne=0;ne<this.children.length;++ne){var te=this.children[ne],ie=te.chunkSize();if(x<ie){var de=Math.min(z,ie-x),ye=te.height;if(te.removeInner(x,de),this.height-=ye-te.height,ie==de&&(this.children.splice(ne--,1),te.parent=null),(z-=de)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof fl))){var ke=[];this.collapse(ke),this.children=[new fl(ke)],this.children[0].parent=this}},collapse:function(x){for(var z=0;z<this.children.length;++z)this.children[z].collapse(x)},insertInner:function(x,z,ne){this.size+=z.length,this.height+=ne;for(var te=0;te<this.children.length;++te){var ie=this.children[te],de=ie.chunkSize();if(x<=de){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var ye=ie.lines.length%25+25,ke=ye;ke<ie.lines.length;){var Pe=new fl(ie.lines.slice(ke,ke+=25));ie.height-=Pe.height,this.children.splice(++te,0,Pe),Pe.parent=this}ie.lines=ie.lines.slice(0,ye),this.maybeSpill()}break}x-=de}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new tu(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=Rt(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new tu(x.children);te.parent=x,x.children=[te,ne],x=te}ne.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,ne){for(var te=0;te<this.children.length;++te){var ie=this.children[te],de=ie.chunkSize();if(x<de){var ye=Math.min(z,de-x);if(ie.iterN(x,ye,ne))return!0;if((z-=ye)==0)break;x=0}else x-=de}}};var nu=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};nu.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=Xn(ne);if(!(te==null||!z)){for(var ie=0;ie<z.length;++ie)z[ie]==this&&z.splice(ie--,1);z.length||(ne.widgets=null);var de=Pi(this);nr(ne,Math.max(0,ne.height-de)),x&&(ga(x,function(){nf(x,ne,-de),Ta(x,te,"widget")}),Kn(x,"lineWidgetCleared",x,this,te))}},nu.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=Pi(this)-z;ie&&(yr(this.doc,te)||nr(te,te.height+ie),ne&&ga(ne,function(){ne.curOp.forceUpdate=!0,nf(ne,te,ie),Kn(ne,"lineWidgetChanged",ne,x,Xn(te))}))},lr(nu);function nf(x,z,ne){Cn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&ms(x,ne)}function rf(x,z,ne,te){var ie=new nu(x,ne,te),de=x.cm;return de&&ie.noHScroll&&(de.display.alignWidgets=!0),Lu(x,z,"widget",function(ye){var ke=ye.widgets||(ye.widgets=[]);if(ie.insertAt==null?ke.push(ie):ke.splice(Math.min(ke.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ye,de&&!yr(x,ye)){var Pe=Cn(ye)<x.scrollTop;nr(ye,ye.height+Pi(ie)),Pe&&ms(de,ie.height),de.curOp.forceUpdate=!0}return!0}),de&&Kn(de,"lineWidgetAdded",de,ie,typeof z=="number"?z:Xn(z)),ie}var af=0,hl=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++af};hl.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ks(x),tr(this,"clear")){var ne=this.find();ne&&Kn(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,de=0;de<this.lines.length;++de){var ye=this.lines[de],ke=sn(ye.markedSpans,this);x&&!this.collapsed?Ta(x,Xn(ye),"text"):x&&(ke.to!=null&&(ie=Xn(ye)),ke.from!=null&&(te=Xn(ye))),ye.markedSpans=Ln(ye.markedSpans,ke),ke.from==null&&this.collapsed&&!yr(this.doc,ye)&&x&&nr(ye,Ka(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Pe=0;Pe<this.lines.length;++Pe){var $e=ct(this.lines[Pe]),bt=vn($e);bt>x.display.maxLineLength&&(x.display.maxLine=$e,x.display.maxLineLength=bt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&Fi(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&Jd(x.doc)),x&&Kn(x,"markerCleared",x,this,te,ie),z&&Ds(x),this.parent&&this.parent.clear()}},hl.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var de=this.lines[ie],ye=sn(de.markedSpans,this);if(ye.from!=null&&(ne=xn(z?de:Xn(de),ye.from),x==-1))return ne;if(ye.to!=null&&(te=xn(z?de:Xn(de),ye.to),x==1))return te}return ne&&{from:ne,to:te}},hl.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||ga(te,function(){var ie=z.line,de=Xn(z.line),ye=ua(te,de);if(ye&&(qi(ye),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!yr(ne.doc,ie)&&ne.height!=null){var ke=ne.height;ne.height=null;var Pe=Pi(ne)-ke;Pe&&nr(ie,ie.height+Pe)}Kn(te,"markerChanged",te,x)})},hl.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||Rt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},hl.prototype.detachLine=function(x){if(this.lines.splice(Rt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},lr(hl);function nl(x,z,ne,te,ie){if(te&&te.shared)return co(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return za(x.cm,nl)(x,z,ne,te,ie);var de=new hl(x,ie),ye=qn(z,ne);if(te&&dn(te,de,!1),ye>0||ye==0&&de.clearWhenEmpty!==!1)return de;if(de.replacedWith&&(de.collapsed=!0,de.widgetNode=St("span",[de.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||de.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(de.widgetNode.insertLeft=!0)),de.collapsed){if(nt(x,z.line,z,ne,de)||z.line!=ne.line&&nt(x,ne.line,z,ne,de))throw new Error("Inserting collapsed marker partially overlapping an existing one");ht()}de.addToHistory&&Eu(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var ke=z.line,Pe=x.cm,$e;if(x.iter(ke,ne.line+1,function(Dt){Pe&&de.collapsed&&!Pe.options.lineWrapping&&ct(Dt)==Pe.display.maxLine&&($e=!0),de.collapsed&&ke!=z.line&&nr(Dt,0),gr(Dt,new Ht(de,ke==z.line?z.ch:null,ke==ne.line?ne.ch:null)),++ke}),de.collapsed&&x.iter(z.line,ne.line+1,function(Dt){yr(x,Dt)&&nr(Dt,0)}),de.clearOnEnter&&Ot(de,"beforeCursorEnter",function(){return de.clear()}),de.readOnly&&(gt(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),de.collapsed&&(de.id=++af,de.atomic=!0),Pe){if($e&&(Pe.curOp.updateMaxLine=!0),de.collapsed)Fi(Pe,z.line,ne.line+1);else if(de.className||de.startStyle||de.endStyle||de.css||de.attributes||de.title)for(var bt=z.line;bt<=ne.line;bt++)Ta(Pe,bt,"text");de.atomic&&Jd(Pe.doc),Kn(Pe,"markerAdded",Pe,de)}return de}var ya=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Kn(this,"clear")}},ya.prototype.find=function(x,z){return this.primary.find(x,z)},lr(ya);function co(x,z,ne,te,ie){te=dn(te),te.shared=!1;var de=[nl(x,z,ne,te,ie)],ye=de[0],ke=te.widgetNode;return Qs(x,function(Pe){ke&&(te.widgetNode=ke.cloneNode(!0)),de.push(nl(Pe,Lr(Pe,z),Lr(Pe,ne),te,ie));for(var $e=0;$e<Pe.linked.length;++$e)if(Pe.linked[$e].isParent)return;ye=jt(de)}),new ya(de,ye)}function pl(x){return x.findMarks(xn(x.first,0),x.clipPos(xn(x.lastLine())),function(z){return z.parent})}function of(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),de=x.clipPos(ie.from),ye=x.clipPos(ie.to);if(qn(de,ye)){var ke=nl(x,de,ye,te.primary,te.primary.type);te.markers.push(ke),ke.parent=te}}}function ws(x){for(var z=function(te){var ie=x[te],de=[ie.primary.doc];Qs(ie.primary.doc,function(Pe){return de.push(Pe)});for(var ye=0;ye<ie.markers.length;ye++){var ke=ie.markers[ye];Rt(de,ke.doc)==-1&&(ke.parent=null,ie.markers.splice(ye--,1))}},ne=0;ne<x.length;ne++)z(ne)}var sf=0,Mo=function(x,z,ne,te,ie){if(!(this instanceof Mo))return new Mo(x,z,ne,te,ie);ne==null&&(ne=0),tu.call(this,[new fl([new Fn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var de=xn(ne,0);this.sel=Ps(de),this.history=new Cu(null),this.id=++sf,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),ic(this,{from:de,to:de,text:x}),To(this,Ps(de),tt)};Mo.prototype=ce(tu.prototype,{constructor:Mo,iter:function(x,z,ne){ne?this.iterN(x-this.first,z-x,ne):this.iterN(this.first,this.first+this.size,x)},insert:function(x,z){for(var ne=0,te=0;te<z.length;++te)ne+=z[te].height;this.insertInner(x-this.first,z,ne)},remove:function(x,z){this.removeInner(x-this.first,z)},getValue:function(x){var z=Pr(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:po(function(x){var z=xn(this.first,0),ne=this.first+this.size-1;dl(this,{from:z,to:xn(ne,rn(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ts(this.cm,0,0),To(this,Ps(z),tt)}),replaceRange:function(x,z,ne,te){z=Lr(this,z),ne=ne?Lr(this,ne):z,eu(this,x,z,ne,te)},getRange:function(x,z,ne){var te=Vn(this,Lr(this,x),Lr(this,z));return ne===!1?te:te.join(ne||this.lineSeparator())},getLine:function(x){var z=this.getLineHandle(x);return z&&z.text},getLineHandle:function(x){if(fr(this,x))return rn(this,x)},getLineNumber:function(x){return Xn(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=rn(this,x)),ct(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return Lr(this,x)},getCursor:function(x){var z=this.sel.primary(),ne;return x==null||x=="head"?ne=z.head:x=="anchor"?ne=z.anchor:x=="end"||x=="to"||x===!1?ne=z.to():ne=z.from(),ne},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:po(function(x,z,ne){ed(this,Lr(this,typeof x=="number"?xn(x,z||0):x),null,ne)}),setSelection:po(function(x,z,ne){ed(this,Lr(this,x),Lr(this,z||x),ne)}),extendSelection:po(function(x,z,ne){Rl(this,Lr(this,x),z&&Lr(this,z),ne)}),extendSelections:po(function(x,z){yi(this,Pn(this,x),z)}),extendSelectionsBy:po(function(x,z){var ne=_n(this.sel.ranges,x);yi(this,Pn(this,ne),z)}),setSelections:po(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new ja(Lr(this,x[ie].anchor),Lr(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),To(this,Ms(this.cm,te,z),ne)}}),addSelection:po(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new ja(Lr(this,x),Lr(this,z||x))),To(this,Ms(this.cm,te,te.length-1),ne)}),getSelection:function(x){for(var z=this.sel.ranges,ne,te=0;te<z.length;te++){var ie=Vn(this,z[te].from(),z[te].to());ne=ne?ne.concat(ie):ie}return x===!1?ne:ne.join(x||this.lineSeparator())},getSelections:function(x){for(var z=[],ne=this.sel.ranges,te=0;te<ne.length;te++){var ie=Vn(this,ne[te].from(),ne[te].to());x!==!1&&(ie=ie.join(x||this.lineSeparator())),z[te]=ie}return z},replaceSelection:function(x,z,ne){for(var te=[],ie=0;ie<this.sel.ranges.length;ie++)te[ie]=x;this.replaceSelections(te,z,ne||"+input")},replaceSelections:po(function(x,z,ne){for(var te=[],ie=this.sel,de=0;de<ie.ranges.length;de++){var ye=ie.ranges[de];te[de]={from:ye.from(),to:ye.to(),text:this.splitLines(x[de]),origin:ne}}for(var ke=z&&z!="end"&&nc(this,te,z),Pe=te.length-1;Pe>=0;Pe--)dl(this,te[Pe]);ke?as(this,ke):this.cm&&zo(this.cm)}),undo:po(function(){tl(this,"undo")}),redo:po(function(){tl(this,"redo")}),undoSelection:po(function(){tl(this,"undo",!0)}),redoSelection:po(function(){tl(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,ne=0,te=0;te<x.done.length;te++)x.done[te].ranges||++z;for(var ie=0;ie<x.undone.length;ie++)x.undone[ie].ranges||++ne;return{undo:z,redo:ne}},clearHistory:function(){var x=this;this.history=new Cu(this.history.maxGeneration),Qs(this,function(z){return z.history=x.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(x){return x&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(x){return this.history.generation==(x||this.cleanGeneration)},getHistory:function(){return{done:Nl(this.history.done),undone:Nl(this.history.undone)}},setHistory:function(x){var z=this.history=new Cu(this.history.maxGeneration);z.done=Nl(x.done.slice(0),null,!0),z.undone=Nl(x.undone.slice(0),null,!0)},setGutterMarker:po(function(x,z,ne){return Lu(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&oe(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:po(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Lu(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,oe(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!fr(this,x)||(z=x,x=rn(this,x),!x))return null}else if(z=Xn(x),z==null)return null;return{line:z,handle:x,text:x.text,gutterMarkers:x.gutterMarkers,textClass:x.textClass,bgClass:x.bgClass,wrapClass:x.wrapClass,widgets:x.widgets}},addLineClass:po(function(x,z,ne){return Lu(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!te[ie])te[ie]=ne;else{if(Ee(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:po(function(x,z,ne){return Lu(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",de=te[ie];if(de)if(ne==null)te[ie]=null;else{var ye=de.match(Ee(ne));if(!ye)return!1;var ke=ye.index+ye[0].length;te[ie]=de.slice(0,ye.index)+(!ye.index||ke==de.length?"":" ")+de.slice(ke)||null}else return!1;return!0})}),addLineWidget:po(function(x,z,ne){return rf(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return nl(this,Lr(this,x),Lr(this,z),ne,ne&&ne.type||"range")},setBookmark:function(x,z){var ne={replacedWith:z&&(z.nodeType==null?z.widget:z),insertLeft:z&&z.insertLeft,clearWhenEmpty:!1,shared:z&&z.shared,handleMouseEvents:z&&z.handleMouseEvents};return x=Lr(this,x),nl(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=Lr(this,x);var z=[],ne=rn(this,x.line).markedSpans;if(ne)for(var te=0;te<ne.length;++te){var ie=ne[te];(ie.from==null||ie.from<=x.ch)&&(ie.to==null||ie.to>=x.ch)&&z.push(ie.marker.parent||ie.marker)}return z},findMarks:function(x,z,ne){x=Lr(this,x),z=Lr(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(de){var ye=de.markedSpans;if(ye)for(var ke=0;ke<ye.length;ke++){var Pe=ye[ke];!(Pe.to!=null&&ie==x.line&&x.ch>=Pe.to||Pe.from==null&&ie!=x.line||Pe.from!=null&&ie==z.line&&Pe.from>=z.ch)&&(!ne||ne(Pe.marker))&&te.push(Pe.marker.parent||Pe.marker)}++ie}),te},getAllMarks:function(){var x=[];return this.iter(function(z){var ne=z.markedSpans;if(ne)for(var te=0;te<ne.length;++te)ne[te].from!=null&&x.push(ne[te].marker)}),x},posFromIndex:function(x){var z,ne=this.first,te=this.lineSeparator().length;return this.iter(function(ie){var de=ie.text.length+te;if(de>x)return z=x,!0;x-=de,++ne}),Lr(this,xn(ne,z))},indexFromPos:function(x){x=Lr(this,x);var z=x.ch;if(x.line<this.first||x.ch<0)return 0;var ne=this.lineSeparator().length;return this.iter(this.first,x.line,function(te){z+=te.text.length+ne}),z},copy:function(x){var z=new Mo(Pr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return z.scrollTop=this.scrollTop,z.scrollLeft=this.scrollLeft,z.sel=this.sel,z.extend=!1,x&&(z.history.undoDepth=this.history.undoDepth,z.setHistory(this.getHistory())),z},linkedDoc:function(x){x||(x={});var z=this.first,ne=this.first+this.size;x.from!=null&&x.from>z&&(z=x.from),x.to!=null&&x.to<ne&&(ne=x.to);var te=new Mo(Pr(this,z,ne),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(te.history=this.history),(this.linked||(this.linked=[])).push({doc:te,sharedHist:x.sharedHist}),te.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],of(te,pl(this)),te},unlinkDoc:function(x){if(x instanceof aa&&(x=x.doc),this.linked)for(var z=0;z<this.linked.length;++z){var ne=this.linked[z];if(ne.doc==x){this.linked.splice(z,1),x.unlinkDoc(this),ws(pl(this));break}}if(x.history==this.history){var te=[x.id];Qs(x,function(ie){return te.push(ie.id)},!0),x.history=new Cu(null),x.history.done=Nl(this.history.done,te),x.history.undone=Nl(this.history.undone,te)}},iterLinkedDocs:function(x){Qs(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):At(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:po(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&ac(this.cm))})}),Mo.prototype.eachLine=Mo.prototype.iter;var rd=0;function eh(x){var z=this;if(ru(z),!($n(z,x)||Ji(z.display,x))){ur(x),ve&&(rd=+new Date);var ne=Ao(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,de=Array(ie),ye=0,ke=function(){++ye==ie&&za(z,function(){ne=Lr(z.doc,ne);var cn={from:ne,to:ne,text:z.doc.splitLines(de.filter(function(er){return er!=null}).join(z.doc.lineSeparator())),origin:"paste"};dl(z.doc,cn),as(z.doc,Ps(Lr(z.doc,ne),Lr(z.doc,Js(cn))))})()},Pe=function(cn,er){if(z.options.allowDropFileTypes&&Rt(z.options.allowDropFileTypes,cn.type)==-1){ke();return}var wr=new FileReader;wr.onerror=function(){return ke()},wr.onload=function(){var Wr=wr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Wr)){ke();return}de[er]=Wr,ke()},wr.readAsText(cn)},$e=0;$e<te.length;$e++)Pe(te[$e],$e);else{if(z.state.draggingText&&z.doc.sel.contains(ne)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var bt=x.dataTransfer.getData("Text");if(bt){var Dt;if(z.state.draggingText&&!z.state.draggingText.copy&&(Dt=z.listSelections()),_u(z.doc,Ps(ne,ne)),Dt)for(var pn=0;pn<Dt.length;++pn)eu(z.doc,"",Dt[pn].anchor,Dt[pn].head,"drag");z.replaceSelection(bt,"around","paste"),z.display.input.focus()}}catch(cn){}}}}function th(x,z){if(ve&&(!x.state.draggingText||+new Date-rd<100)){Qr(z);return}if(!($n(x,z)||Ji(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!ot)){var ne=mt("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Te&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Te&&ne.parentNode.removeChild(ne)}}function id(x,z){var ne=Ao(x,z);if(ne){var te=document.createDocumentFragment();sa(x,ne,te),x.display.dragCursor||(x.display.dragCursor=mt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),Mt(x.display.dragCursor,te)}}function ru(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function iu(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ne=[],te=0;te<z.length;te++){var ie=z[te].CodeMirror;ie&&ne.push(ie)}ne.length&&ne[0].operation(function(){for(var de=0;de<ne.length;de++)x(ne[de])})}}var Nr=!1;function ad(){Nr||(gc(),Nr=!0)}function gc(){var x;Ot(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,iu(vc)},100))}),Ot(window,"blur",function(){return iu(Fo)})}function vc(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Bs={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Au=0;Au<10;Au++)Bs[Au+48]=Bs[Au+96]=String(Au);for(var yc=65;yc<=90;yc++)Bs[yc]=String.fromCharCode(yc);for(var Tu=1;Tu<=12;Tu++)Bs[Tu+111]=Bs[Tu+63235]="F"+Tu;var Qa={};Qa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Qa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Qa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Qa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Qa.default=Ce?Qa.macDefault:Qa.pcDefault;function nh(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,de,ye=0;ye<z.length-1;ye++){var ke=z[ye];if(/^(cmd|meta|m)$/i.test(ke))de=!0;else if(/^a(lt)?$/i.test(ke))ne=!0;else if(/^(c|ctrl|control)$/i.test(ke))te=!0;else if(/^s(hift)?$/i.test(ke))ie=!0;else throw new Error("Unrecognized modifier name: "+ke)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),de&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function od(x){var z={};for(var ne in x)if(x.hasOwnProperty(ne)){var te=x[ne];if(/^(name|fallthrough|(de|at)tach)$/.test(ne))continue;if(te=="..."){delete x[ne];continue}for(var ie=_n(ne.split(" "),nh),de=0;de<ie.length;de++){var ye=void 0,ke=void 0;de==ie.length-1?(ke=ie.join(" "),ye=te):(ke=ie.slice(0,de+1).join(" "),ye="...");var Pe=z[ke];if(!Pe)z[ke]=ye;else if(Pe!=ye)throw new Error("Inconsistent bindings for "+ke)}delete x[ne]}for(var $e in z)x[$e]=z[$e];return x}function rl(x,z,ne,te){z=ss(z);var ie=z.call?z.call(x,te):z[x];if(ie===!1)return"nothing";if(ie==="...")return"multi";if(ie!=null&&ne(ie))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return rl(x,z.fallthrough,ne,te);for(var de=0;de<z.fallthrough.length;de++){var ye=rl(x,z.fallthrough[de],ne,te);if(ye)return ye}}}function Iu(x){var z=typeof x=="string"?x:Bs[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function ml(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(ut?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(ut?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function zl(x,z){if(Te&&x.keyCode==34&&x.char)return!1;var ne=Bs[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),ml(ne,x,z))}function ss(x){return typeof x=="string"?Qa[x]:x}function _s(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var de=z(ne[ie]);te.length&&qn(de.from,jt(te).to)<=0;){var ye=te.pop();if(qn(ye.from,de.from)<0){de.from=ye.from;break}}te.push(de)}ga(x,function(){for(var ke=te.length-1;ke>=0;ke--)eu(x.doc,"",te[ke].from,te[ke].to,"+delete");zo(x)})}function Vo(x,z,ne){var te=Lt(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Ws(x,z,ne){var te=Vo(x,z.ch,ne);return te==null?null:new xn(z.line,te,ne<0?"after":"before")}function Kl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var de=wt(ne,z.doc.direction);if(de){var ye=ie<0?jt(de):de[0],ke=ie<0==(ye.level==1),Pe=ke?"after":"before",$e;if(ye.level>0||z.doc.direction=="rtl"){var bt=na(z,ne);$e=ie<0?ne.text.length-1:0;var Dt=Di(z,bt,$e).top;$e=$t(function(pn){return Di(z,bt,pn).top==Dt},ie<0==(ye.level==1)?ye.from:ye.to-1,$e),Pe=="before"&&($e=Vo(ne,$e,1))}else $e=ie<0?ye.to:ye.from;return new xn(te,$e,Pe)}}return new xn(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Zs(x,z,ne,te){var ie=wt(z,x.doc.direction);if(!ie)return Ws(z,ne,te);ne.ch>=z.text.length?(ne.ch=z.text.length,ne.sticky="before"):ne.ch<=0&&(ne.ch=0,ne.sticky="after");var de=Jt(ie,ne.ch,ne.sticky),ye=ie[de];if(x.doc.direction=="ltr"&&ye.level%2==0&&(te>0?ye.to>ne.ch:ye.from<ne.ch))return Ws(z,ne,te);var ke=function(oi,hi){return Vo(z,oi instanceof xn?oi.ch:oi,hi)},Pe,$e=function(oi){return x.options.lineWrapping?(Pe=Pe||na(x,z),Fa(x,z,Pe,oi)):{begin:0,end:z.text.length}},bt=$e(ne.sticky=="before"?ke(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ye.level==1){var Dt=ye.level==1==te<0,pn=ke(ne,Dt?1:-1);if(pn!=null&&(Dt?pn<=ye.to&&pn<=bt.end:pn>=ye.from&&pn>=bt.begin)){var cn=Dt?"before":"after";return new xn(ne.line,pn,cn)}}var er=function(oi,hi,ti){for(var vi=function(to,Wo){return Wo?new xn(ne.line,ke(to,1),"before"):new xn(ne.line,to,"after")};oi>=0&&oi<ie.length;oi+=hi){var Wi=ie[oi],Gi=hi>0==(Wi.level!=1),ba=Gi?ti.begin:ke(ti.end,-1);if(Wi.from<=ba&&ba<Wi.to||(ba=Gi?Wi.from:ke(Wi.to,-1),ti.begin<=ba&&ba<ti.end))return vi(ba,Gi)}},wr=er(de+te,te,bt);if(wr)return wr;var Wr=te>0?bt.end:ke(bt.begin,-1);return Wr!=null&&!(te>0&&Wr==z.text.length)&&(wr=er(te>0?0:ie.length-1,te,$e(Wr)),wr)?wr:null}var au={selectAll:td,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),tt)},killLine:function(x){return _s(x,function(z){if(z.empty()){var ne=rn(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:xn(z.head.line+1,0)}:{from:z.head,to:xn(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return _s(x,function(z){return{from:xn(z.from().line,0),to:Lr(x.doc,xn(z.to().line+1,0))}})},delLineLeft:function(x){return _s(x,function(z){return{from:xn(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return _s(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return{from:te,to:z.from()}})},delWrappedLineRight:function(x){return _s(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div");return{from:z.from(),to:te}})},undo:function(x){return x.undo()},redo:function(x){return x.redo()},undoSelection:function(x){return x.undoSelection()},redoSelection:function(x){return x.redoSelection()},goDocStart:function(x){return x.extendSelection(xn(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(xn(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return sd(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return lf(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return ld(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div")},Xt)},goLineLeft:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:0,top:ne},"div")},Xt)},goLineLeftSmart:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return te.ch<x.getLine(te.line).search(/\S/)?lf(x,z.head):te},Xt)},goLineUp:function(x){return x.moveV(-1,"line")},goLineDown:function(x){return x.moveV(1,"line")},goPageUp:function(x){return x.moveV(-1,"page")},goPageDown:function(x){return x.moveV(1,"page")},goCharLeft:function(x){return x.moveH(-1,"char")},goCharRight:function(x){return x.moveH(1,"char")},goColumnLeft:function(x){return x.moveH(-1,"column")},goColumnRight:function(x){return x.moveH(1,"column")},goWordLeft:function(x){return x.moveH(-1,"word")},goGroupRight:function(x){return x.moveH(1,"group")},goGroupLeft:function(x){return x.moveH(-1,"group")},goWordRight:function(x){return x.moveH(1,"word")},delCharBefore:function(x){return x.deleteH(-1,"codepoint")},delCharAfter:function(x){return x.deleteH(1,"char")},delWordBefore:function(x){return x.deleteH(-1,"word")},delWordAfter:function(x){return x.deleteH(1,"word")},delGroupBefore:function(x){return x.deleteH(-1,"group")},delGroupAfter:function(x){return x.deleteH(1,"group")},indentAuto:function(x){return x.indentSelection("smart")},indentMore:function(x){return x.indentSelection("add")},indentLess:function(x){return x.indentSelection("subtract")},insertTab:function(x){return x.replaceSelection(" ")},insertSoftTab:function(x){for(var z=[],ne=x.listSelections(),te=x.options.tabSize,ie=0;ie<ne.length;ie++){var de=ne[ie].from(),ye=Ue(x.getLine(de.line),de.ch,te);z.push(Ut(te-ye%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return ga(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,de=rn(x.doc,ie.line).text;if(de){if(ie.ch==de.length&&(ie=new xn(ie.line,ie.ch-1)),ie.ch>0)ie=new xn(ie.line,ie.ch+1),x.replaceRange(de.charAt(ie.ch-1)+de.charAt(ie.ch-2),xn(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ye=rn(x.doc,ie.line-1).text;ye&&(ie=new xn(ie.line,1),x.replaceRange(de.charAt(0)+x.doc.lineSeparator()+ye.charAt(ye.length-1),xn(ie.line-1,ye.length-1),ie,"+transpose"))}}ne.push(new ja(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return ga(x,function(){for(var z=x.listSelections(),ne=z.length-1;ne>=0;ne--)x.replaceRange(x.doc.lineSeparator(),z[ne].anchor,z[ne].head,"+input");z=x.listSelections();for(var te=0;te<z.length;te++)x.indentLine(z[te].from().line,null,!0);zo(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function sd(x,z){var ne=rn(x.doc,z),te=ct(ne);return te!=ne&&(z=Xn(te)),Kl(!0,x,te,z,1)}function ld(x,z){var ne=rn(x.doc,z),te=vt(ne);return te!=ne&&(z=Xn(te)),Kl(!0,x,ne,z,-1)}function lf(x,z){var ne=sd(x,z.line),te=rn(x.doc,ne.line),ie=wt(te,x.doc.direction);if(!ie||ie[0].level==0){var de=Math.max(ne.ch,te.text.search(/\S/)),ye=z.line==ne.line&&z.ch<=de&&z.ch;return xn(ne.line,ye?0:de,ne.sticky)}return ne}function Io(x,z,ne){if(typeof z=="string"&&(z=au[z],!z))return!1;x.display.input.ensurePolled();var te=x.display.shift,ie=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ne&&(x.display.shift=!1),ie=z(x)!=un}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function js(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=rl(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&rl(z,x.options.extraKeys,ne,x)||rl(z,x.options.keyMap,ne,x)}var rh=new Le;function ou(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(Iu(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:rh.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),bc(x,ie+" "+z,ne,te))return!0}return bc(x,z,ne,te)}function bc(x,z,ne,te){var ie=js(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Kn(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(ur(ne),Li(x)),!!ie}function La(x,z){var ne=zl(z,!0);return ne?z.shiftKey&&!x.state.keySeq?ou(x,"Shift-"+ne,z,function(te){return Io(x,te,!0)})||ou(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Io(x,te)}):ou(x,ne,z,function(te){return Io(x,te)}):!1}function su(x,z,ne){return ou(x,"'"+ne+"'",z,function(te){return Io(x,te,!0)})}var il=null;function Du(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=Et(),!$n(z,x))){ve&&Se<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=La(z,x);Te&&(il=te?ne:null,!te&&ne==88&&!On&&(Ce?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),se&&!Ce&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&Jn(z)}}function Jn(x){var z=x.display.lineDiv;Yt(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(Ve(z,"CodeMirror-crosshair"),Dn(document,"keyup",ne),Dn(document,"mouseover",ne))}Ot(document,"keyup",ne),Ot(document,"mouseover",ne)}function uf(x){x.keyCode==16&&(this.doc.sel.shift=!1),$n(this,x)}function cf(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(Ji(z.display,x)||$n(z,x)||x.ctrlKey&&!x.altKey||Ce&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Te&&ne==il){il=null,ur(x);return}if(!(Te&&(!x.which||x.which<10)&&La(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(su(z,x,ie)||z.display.input.onKeyPress(x))}}}var ud=400,cd=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};cd.prototype.compare=function(x,z,ne){return this.time+ud>x&&qn(z,this.pos)==0&&ne==this.button};var al,Pu;function ih(x,z){var ne=+new Date;return Pu&&Pu.compare(ne,x,z)?(al=Pu=null,"triple"):al&&al.compare(ne,x,z)?(Pu=new cd(ne,x,z),al=null,"double"):(al=new cd(ne,x,z),Pu=null,"single")}function Uo(x){var z=this,ne=z.display;if(!($n(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,Ji(ne,x)){Me||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!ts(z,x)){var te=Ao(z,x),ie=Sr(x),de=te?ih(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&gl(z,ie,te,de,x))&&(ie==1?te?Sc(z,te,de,x):gi(x)==ne.scroller&&ur(x):ie==2?(te&&Rl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(xe?z.display.input.onContextMenu(x):Ha(z)))}}}function gl(x,z,ne,te,ie){var de="Click";return te=="double"?de="Double"+de:te=="triple"&&(de="Triple"+de),de=(z==1?"Left":z==2?"Middle":"Right")+de,ou(x,ml(de,ie),ie,function(ye){if(typeof ye=="string"&&(ye=au[ye]),!ye)return!1;var ke=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ke=ye(x,ne)!=un}finally{x.state.suppressEdits=!1}return ke})}function xc(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var de=pt?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=de?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(ie.extend==null||x.doc.extend)&&(ie.extend=x.doc.extend||ne.shiftKey),ie.addNew==null&&(ie.addNew=Ce?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(Ce?ne.altKey:ne.ctrlKey)),ie}function Sc(x,z,ne,te){ve?setTimeout(fn(Ri,x),0):x.curOp.focus=Et();var ie=xc(x,ne,te),de=x.doc.sel,ye;x.options.dragDrop&&Ei&&!x.isReadOnly()&&ne=="single"&&(ye=de.contains(z))>-1&&(qn((ye=de.ranges[ye]).from(),z)<0||z.xRel>0)&&(qn(ye.to(),z)>0||z.xRel<0)?ah(x,te,z,ie):dd(x,te,z,ie)}function ah(x,z,ne,te){var ie=x.display,de=!1,ye=za(x,function($e){Me&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Dn(ie.wrapper.ownerDocument,"mouseup",ye),Dn(ie.wrapper.ownerDocument,"mousemove",ke),Dn(ie.scroller,"dragstart",Pe),Dn(ie.scroller,"drop",ye),de||(ur($e),te.addNew||Rl(x.doc,ne,null,null,te.extend),Me&&!ot||ve&&Se==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),ke=function($e){de=de||Math.abs(z.clientX-$e.clientX)+Math.abs(z.clientY-$e.clientY)>=10},Pe=function(){return de=!0};Me&&(ie.scroller.draggable=!0),x.state.draggingText=ye,ye.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),Ot(ie.wrapper.ownerDocument,"mouseup",ye),Ot(ie.wrapper.ownerDocument,"mousemove",ke),Ot(ie.scroller,"dragstart",Pe),Ot(ie.scroller,"drop",ye),Ha(x),setTimeout(function(){return ie.input.focus()},20)}function df(x,z,ne){if(ne=="char")return new ja(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new ja(xn(z.line,0),Lr(x.doc,xn(z.line+1,0)));var te=ne(x,z);return new ja(te.from,te.to)}function dd(x,z,ne,te){var ie=x.display,de=x.doc;ur(z);var ye,ke,Pe=de.sel,$e=Pe.ranges;if(te.addNew&&!te.extend?(ke=de.sel.contains(ne),ke>-1?ye=$e[ke]:ye=new ja(ne,ne)):(ye=de.sel.primary(),ke=de.sel.primIndex),te.unit=="rectangle")te.addNew||(ye=new ja(ne,ne)),ne=Ao(x,z,!0,!0),ke=-1;else{var bt=df(x,ne,te.unit);te.extend?ye=fc(ye,bt.anchor,bt.head,te.extend):ye=bt}te.addNew?ke==-1?(ke=$e.length,To(de,Ms(x,$e.concat([ye]),ke),{scroll:!1,origin:"*mouse"})):$e.length>1&&$e[ke].empty()&&te.unit=="char"&&!te.extend?(To(de,Ms(x,$e.slice(0,ke).concat($e.slice(ke+1)),0),{scroll:!1,origin:"*mouse"}),Pe=de.sel):Ss(de,ke,ye,ft):(ke=0,To(de,new vs([ye],0),ft),Pe=de.sel);var Dt=ne;function pn(ti){if(qn(Dt,ti)!=0)if(Dt=ti,te.unit=="rectangle"){for(var vi=[],Wi=x.options.tabSize,Gi=Ue(rn(de,ne.line).text,ne.ch,Wi),ba=Ue(rn(de,ti.line).text,ti.ch,Wi),to=Math.min(Gi,ba),Wo=Math.max(Gi,ba),bo=Math.min(ne.line,ti.line),cs=Math.min(x.lastLine(),Math.max(ne.line,ti.line));bo<=cs;bo++){var ds=rn(de,bo).text,Do=Tn(ds,to,Wi);to==Wo?vi.push(new ja(xn(bo,Do),xn(bo,Do))):ds.length>Do&&vi.push(new ja(xn(bo,Do),xn(bo,Tn(ds,Wo,Wi))))}vi.length||vi.push(new ja(ne,ne)),To(de,Ms(x,Pe.ranges.slice(0,ke).concat(vi),ke),{origin:"*mouse",scroll:!1}),x.scrollIntoView(ti)}else{var fs=ye,la=df(x,ti,te.unit),wo=fs.anchor,xo;qn(la.anchor,wo)>0?(xo=la.head,wo=si(fs.from(),la.anchor)):(xo=la.anchor,wo=di(fs.to(),la.head));var Co=Pe.ranges.slice(0);Co[ke]=ff(x,new ja(Lr(de,wo),xo)),To(de,Ms(x,Co,ke),ft)}}var cn=ie.wrapper.getBoundingClientRect(),er=0;function wr(ti){var vi=++er,Wi=Ao(x,ti,!0,te.unit=="rectangle");if(Wi)if(qn(Wi,Dt)!=0){x.curOp.focus=Et(),pn(Wi);var Gi=va(ie,de);(Wi.line>=Gi.to||Wi.line<Gi.from)&&setTimeout(za(x,function(){er==vi&&wr(ti)}),150)}else{var ba=ti.clientY<cn.top?-20:ti.clientY>cn.bottom?20:0;ba&&setTimeout(za(x,function(){er==vi&&(ie.scroller.scrollTop+=ba,wr(ti))}),50)}}function Wr(ti){x.state.selectingText=!1,er=1/0,ti&&(ur(ti),ie.input.focus()),Dn(ie.wrapper.ownerDocument,"mousemove",oi),Dn(ie.wrapper.ownerDocument,"mouseup",hi),de.history.lastSelOrigin=null}var oi=za(x,function(ti){ti.buttons===0||!Sr(ti)?Wr(ti):wr(ti)}),hi=za(x,Wr);x.state.selectingText=hi,Ot(ie.wrapper.ownerDocument,"mousemove",oi),Ot(ie.wrapper.ownerDocument,"mouseup",hi)}function ff(x,z){var ne=z.anchor,te=z.head,ie=rn(x.doc,ne.line);if(qn(ne,te)==0&&ne.sticky==te.sticky)return z;var de=wt(ie);if(!de)return z;var ye=Jt(de,ne.ch,ne.sticky),ke=de[ye];if(ke.from!=ne.ch&&ke.to!=ne.ch)return z;var Pe=ye+(ke.from==ne.ch==(ke.level!=1)?0:1);if(Pe==0||Pe==de.length)return z;var $e;if(te.line!=ne.line)$e=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var bt=Jt(de,te.ch,te.sticky),Dt=bt-ye||(te.ch-ne.ch)*(ke.level==1?-1:1);bt==Pe-1||bt==Pe?$e=Dt<0:$e=Dt>0}var pn=de[Pe+($e?-1:0)],cn=$e==(pn.level==1),er=cn?pn.from:pn.to,wr=cn?"after":"before";return ne.ch==er&&ne.sticky==wr?z:new ja(new xn(ne.line,er,wr),te)}function Bu(x,z,ne,te){var ie,de;if(z.touches)ie=z.touches[0].clientX,de=z.touches[0].clientY;else try{ie=z.clientX,de=z.clientY}catch(pn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&ur(z);var ye=x.display,ke=ye.lineDiv.getBoundingClientRect();if(de>ke.bottom||!tr(x,ne))return Xr(z);de-=ke.top-ye.viewOffset;for(var Pe=0;Pe<x.display.gutterSpecs.length;++Pe){var $e=ye.gutters.childNodes[Pe];if($e&&$e.getBoundingClientRect().right>=ie){var bt=mr(x.doc,de),Dt=x.display.gutterSpecs[Pe];return gn(x,ne,x,bt,Dt.className,z),Xr(z)}}}function ts(x,z){return Bu(x,z,"gutterClick",!0)}function vl(x,z){Ji(x.display,z)||hf(x,z)||$n(x,z,"contextmenu")||xe||x.display.input.onContextMenu(z)}function hf(x,z){return tr(x,"gutterContextMenu")?Bu(x,z,"gutterContextMenu",!1):!1}function fd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wi(x)}var yl={toString:function(){return"CodeMirror.Init"}},pf={},wc={};function oh(x){var z=x.optionHandlers;function ne(te,ie,de,ye){x.defaults[te]=ie,de&&(z[te]=ye?function(ke,Pe,$e){$e!=yl&&de(ke,Pe,$e)}:de)}x.defineOption=ne,x.Init=yl,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,rc(te)},!0),ne("indentUnit",2,rc,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Ol(te),wi(te),Fi(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var de=[],ye=te.doc.first;te.doc.iter(function(Pe){for(var $e=0;;){var bt=Pe.text.indexOf(ie,$e);if(bt==-1)break;$e=bt+ie.length,de.push(xn(ye,bt))}ye++});for(var ke=de.length-1;ke>=0;ke--)eu(te.doc,ie,de[ke],xn(de[ke].line,de[ke].ch+ie.length))}}),ne("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(te,ie,de){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),de!=yl&&te.refresh()}),ne("specialCharPlaceholder",He,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",Ge?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ne("spellcheck",!1,function(te,ie){return te.getInputField().spellcheck=ie},!0),ne("autocorrect",!1,function(te,ie){return te.getInputField().autocorrect=ie},!0),ne("autocapitalize",!1,function(te,ie){return te.getInputField().autocapitalize=ie},!0),ne("rtlMoveVisually",!zt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){fd(te),Ql(te)},!0),ne("keyMap","default",function(te,ie,de){var ye=ss(ie),ke=de!=yl&&ss(de);ke&&ke.detach&&ke.detach(te,ye),ye.attach&&ye.attach(te,ke||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,mf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=ec(ie,te.options.lineNumbers),Ql(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?Bo(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return xs(te)},!0),ne("scrollbarStyle","native",function(te){vu(te),xs(te),te.display.scrollbars.setScrollTop(te.doc.scrollTop),te.display.scrollbars.setScrollLeft(te.doc.scrollLeft)},!0),ne("lineNumbers",!1,function(te,ie){te.display.gutterSpecs=ec(te.options.gutters,ie),Ql(te)},!0),ne("firstLineNumber",1,Ql,!0),ne("lineNumberFormatter",function(te){return te},Ql,!0),ne("showCursorWhenSelecting",!1,Qo,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(Fo(te),te.display.input.blur()),te.display.input.readOnlyChanged(ie)}),ne("screenReaderLabel",null,function(te,ie){ie=ie===""?null:ie,te.display.input.screenReaderLabelChanged(ie)}),ne("disableInput",!1,function(te,ie){ie||te.display.input.reset()},!0),ne("dragDrop",!0,sh),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,Qo,!0),ne("singleCursorHeightPerLine",!0,Qo,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Ol,!0),ne("addModeClass",!1,Ol,!0),ne("pollInterval",100),ne("undoDepth",200,function(te,ie){return te.doc.history.undoDepth=ie}),ne("historyEventDelay",1250),ne("viewportMargin",10,function(te){return te.refresh()},!0),ne("maxHighlightLength",1e4,Ol,!0),ne("moveInputWithCursor",!0,function(te,ie){ie||te.display.input.resetPosition()}),ne("tabindex",null,function(te,ie){return te.display.input.getField().tabIndex=ie||""}),ne("autofocus",null),ne("direction","ltr",function(te,ie){return te.doc.setDirection(ie)},!0),ne("phrases",null)}function sh(x,z,ne){var te=ne&&ne!=yl;if(!z!=!te){var ie=x.display.dragFunctions,de=z?Ot:Dn;de(x.display.scroller,"dragstart",ie.start),de(x.display.scroller,"dragenter",ie.enter),de(x.display.scroller,"dragover",ie.over),de(x.display.scroller,"dragleave",ie.leave),de(x.display.scroller,"drop",ie.drop)}}function mf(x){x.options.lineWrapping?(Yt(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Ve(x.display.wrapper,"CodeMirror-wrap"),Bn(x)),lo(x),Fi(x),wi(x),setTimeout(function(){return xs(x)},100)}function aa(x,z){var ne=this;if(!(this instanceof aa))return new aa(x,z);this.options=z=z?dn(z):{},dn(pf,z,!1);var te=z.value;typeof te=="string"?te=new Mo(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new aa.inputStyles[z.inputStyle](this),de=this.display=new Gd(x,te,ie,z);de.wrapper.CodeMirror=this,fd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Le,keySeq:null,specialChars:null},z.autofocus&&!Ge&&de.input.focus(),ve&&Se<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),ad(),Ks(this),this.curOp.forceUpdate=!0,Su(this,te),z.autofocus&&!Ge||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&Ua(ne)},20):Fo(this);for(var ye in wc)wc.hasOwnProperty(ye)&&wc[ye](this,z[ye],yl);bu(this),z.finishInit&&z.finishInit(this);for(var ke=0;ke<hd.length;++ke)hd[ke](this);Ds(this),Me&&z.lineWrapping&&getComputedStyle(de.lineDiv).textRendering=="optimizelegibility"&&(de.lineDiv.style.textRendering="auto")}aa.defaults=pf,aa.optionHandlers=wc;function lh(x){var z=x.display;Ot(z.scroller,"mousedown",za(x,Uo)),ve&&Se<11?Ot(z.scroller,"dblclick",za(x,function(Pe){if(!$n(x,Pe)){var $e=Ao(x,Pe);if(!(!$e||ts(x,Pe)||Ji(x.display,Pe))){ur(Pe);var bt=x.findWordAt($e);Rl(x.doc,bt.anchor,bt.head)}}})):Ot(z.scroller,"dblclick",function(Pe){return $n(x,Pe)||ur(Pe)}),Ot(z.scroller,"contextmenu",function(Pe){return vl(x,Pe)}),Ot(z.input.getField(),"contextmenu",function(Pe){z.scroller.contains(Pe.target)||vl(x,Pe)});var ne,te={end:0};function ie(){z.activeTouch&&(ne=setTimeout(function(){return z.activeTouch=null},1e3),te=z.activeTouch,te.end=+new Date)}function de(Pe){if(Pe.touches.length!=1)return!1;var $e=Pe.touches[0];return $e.radiusX<=1&&$e.radiusY<=1}function ye(Pe,$e){if($e.left==null)return!0;var bt=$e.left-Pe.left,Dt=$e.top-Pe.top;return bt*bt+Dt*Dt>20*20}Ot(z.scroller,"touchstart",function(Pe){if(!$n(x,Pe)&&!de(Pe)&&!ts(x,Pe)){z.input.ensurePolled(),clearTimeout(ne);var $e=+new Date;z.activeTouch={start:$e,moved:!1,prev:$e-te.end<=300?te:null},Pe.touches.length==1&&(z.activeTouch.left=Pe.touches[0].pageX,z.activeTouch.top=Pe.touches[0].pageY)}}),Ot(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),Ot(z.scroller,"touchend",function(Pe){var $e=z.activeTouch;if($e&&!Ji(z,Pe)&&$e.left!=null&&!$e.moved&&new Date-$e.start<300){var bt=x.coordsChar(z.activeTouch,"page"),Dt;!$e.prev||ye($e,$e.prev)?Dt=new ja(bt,bt):!$e.prev.prev||ye($e,$e.prev.prev)?Dt=x.findWordAt(bt):Dt=new ja(xn(bt.line,0),Lr(x.doc,xn(bt.line+1,0))),x.setSelection(Dt.anchor,Dt.head),x.focus(),ur(Pe)}ie()}),Ot(z.scroller,"touchcancel",ie),Ot(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Ia(x,z.scroller.scrollTop),go(x,z.scroller.scrollLeft,!0),gn(x,"scroll",x))}),Ot(z.scroller,"mousewheel",function(Pe){return Xc(x,Pe)}),Ot(z.scroller,"DOMMouseScroll",function(Pe){return Xc(x,Pe)}),Ot(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Pe){$n(x,Pe)||Qr(Pe)},over:function(Pe){$n(x,Pe)||(id(x,Pe),Qr(Pe))},start:function(Pe){return th(x,Pe)},drop:za(x,eh),leave:function(Pe){$n(x,Pe)||ru(x)}};var ke=z.input.getField();Ot(ke,"keyup",function(Pe){return uf.call(x,Pe)}),Ot(ke,"keydown",za(x,Du)),Ot(ke,"keypress",za(x,cf)),Ot(ke,"focus",function(Pe){return Ua(x,Pe)}),Ot(ke,"blur",function(Pe){return Fo(x,Pe)})}var hd=[];aa.defineInitHook=function(x){return hd.push(x)};function Os(x,z,ne,te){var ie=x.doc,de;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?de=ri(x,z).state:ne="prev");var ye=x.options.tabSize,ke=rn(ie,z),Pe=Ue(ke.text,null,ye);ke.stateAfter&&(ke.stateAfter=null);var $e=ke.text.match(/^\s*/)[0],bt;if(!te&&!/\S/.test(ke.text))bt=0,ne="not";else if(ne=="smart"&&(bt=ie.mode.indent(de,ke.text.slice($e.length),ke.text),bt==un||bt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?bt=Ue(rn(ie,z-1).text,null,ye):bt=0:ne=="add"?bt=Pe+x.options.indentUnit:ne=="subtract"?bt=Pe-x.options.indentUnit:typeof ne=="number"&&(bt=Pe+ne),bt=Math.max(0,bt);var Dt="",pn=0;if(x.options.indentWithTabs)for(var cn=Math.floor(bt/ye);cn;--cn)pn+=ye,Dt+=" ";if(pn<bt&&(Dt+=Ut(bt-pn)),Dt!=$e)return eu(ie,Dt,xn(z,0),xn(z,$e.length),"+input"),ke.stateAfter=null,!0;for(var er=0;er<ie.sel.ranges.length;er++){var wr=ie.sel.ranges[er];if(wr.head.line==z&&wr.head.ch<$e.length){var Wr=xn(z,$e.length);Ss(ie,er,new ja(Wr,Wr));break}}}var Ns=null;function bl(x){Ns=x}function pd(x,z,ne,te,ie){var de=x.doc;x.display.shift=!1,te||(te=de.sel);var ye=+new Date-200,ke=ie=="paste"||x.state.pasteIncoming>ye,Pe=At(z),$e=null;if(ke&&te.ranges.length>1)if(Ns&&Ns.text.join(`
|
|
|
`)==z){if(te.ranges.length%Ns.text.length==0){$e=[];for(var bt=0;bt<Ns.text.length;bt++)$e.push(de.splitLines(Ns.text[bt]))}}else Pe.length==te.ranges.length&&x.options.pasteLinesPerSelection&&($e=_n(Pe,function(oi){return[oi]}));for(var Dt=x.curOp.updateInput,pn=te.ranges.length-1;pn>=0;pn--){var cn=te.ranges[pn],er=cn.from(),wr=cn.to();cn.empty()&&(ne&&ne>0?er=xn(er.line,er.ch-ne):x.state.overwrite&&!ke?wr=xn(wr.line,Math.min(rn(de,wr.line).text.length,wr.ch+jt(Pe).length)):ke&&Ns&&Ns.lineWise&&Ns.text.join(`
|
|
|
`)==Pe.join(`
|
|
|
`)&&(er=wr=xn(er.line,0)));var Wr={from:er,to:wr,text:$e?$e[pn%$e.length]:Pe,origin:ie||(ke?"paste":x.state.cutIncoming>ye?"cut":"+input")};dl(x.doc,Wr),Kn(x,"inputRead",x,Wr)}z&&!ke&&gd(x,z),zo(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Dt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function md(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&ga(z,function(){return pd(z,ne,0,null,"paste")}),!0}function gd(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ie=ne.ranges[te];if(!(ie.head.ch>100||te&&ne.ranges[te-1].head.line==ie.head.line)){var de=x.getModeAt(ie.head),ye=!1;if(de.electricChars){for(var ke=0;ke<de.electricChars.length;ke++)if(z.indexOf(de.electricChars.charAt(ke))>-1){ye=Os(x,ie.head.line,"smart");break}}else de.electricInput&&de.electricInput.test(rn(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ye=Os(x,ie.head.line,"smart"));ye&&Kn(x,"electricInput",x,ie.head.line)}}}function lu(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,de={anchor:xn(ie,0),head:xn(ie+1,0)};ne.push(de),z.push(x.getRange(de.anchor,de.head))}return{text:z,ranges:ne}}function gf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function vd(){var x=mt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=mt("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?x.style.width="1000px":x.setAttribute("wrap","off"),lt&&(x.style.border="1px solid black"),gf(x),z}function yd(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ie){var de=this.options,ye=de[te];de[te]==ie&&te!="mode"||(de[te]=ie,z.hasOwnProperty(te)&&za(this,z[te])(this,ie,ye),gn(this,"optionChange",this,te))},getOption:function(te){return this.options[te]},getDoc:function(){return this.doc},addKeyMap:function(te,ie){this.state.keyMaps[ie?"push":"unshift"](ss(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,de=0;de<ie.length;++de)if(ie[de]==te||ie[de].name==te)return ie.splice(de,1),!0},addOverlay:Oa(function(te,ie){var de=te.token?te:x.getMode(this.options,te);if(de.startState)throw new Error("Overlays may not be stateful.");yn(this.state.overlays,{mode:de,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ye){return ye.priority}),this.state.modeGen++,Fi(this)}),removeOverlay:Oa(function(te){for(var ie=this.state.overlays,de=0;de<ie.length;++de){var ye=ie[de].modeSpec;if(ye==te||typeof te=="string"&&ye.name==te){ie.splice(de,1),this.state.modeGen++,Fi(this);return}}}),indentLine:Oa(function(te,ie,de){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),fr(this.doc,te)&&Os(this,te,ie,de)}),indentSelection:Oa(function(te){for(var ie=this.doc.sel.ranges,de=-1,ye=0;ye<ie.length;ye++){var ke=ie[ye];if(ke.empty())ke.head.line>de&&(Os(this,ke.head.line,te,!0),de=ke.head.line,ye==this.doc.sel.primIndex&&zo(this));else{var Pe=ke.from(),$e=ke.to(),bt=Math.max(de,Pe.line);de=Math.min(this.lastLine(),$e.line-($e.ch?0:1))+1;for(var Dt=bt;Dt<de;++Dt)Os(this,Dt,te);var pn=this.doc.sel.ranges;Pe.ch==0&&ie.length==pn.length&&pn[ye].from().ch>0&&Ss(this.doc,ye,new ja(Pe,pn[ye].to()),tt)}}}),getTokenAt:function(te,ie){return Ur(this,te,ie)},getLineTokens:function(te,ie){return Ur(this,xn(te),ie,!0)},getTokenTypeAt:function(te){te=Lr(this.doc,te);var ie=Wn(this,rn(this.doc,te.line)),de=0,ye=(ie.length-1)/2,ke=te.ch,Pe;if(ke==0)Pe=ie[2];else for(;;){var $e=de+ye>>1;if(($e?ie[$e*2-1]:0)>=ke)ye=$e;else if(ie[$e*2+1]<ke)de=$e+1;else{Pe=ie[$e*2+2];break}}var bt=Pe?Pe.indexOf("overlay "):-1;return bt<0?Pe:bt==0?null:Pe.slice(0,bt-1)},getModeAt:function(te){var ie=this.doc.mode;return ie.innerMode?x.innerMode(ie,this.getTokenAt(te).state).mode:ie},getHelper:function(te,ie){return this.getHelpers(te,ie)[0]},getHelpers:function(te,ie){var de=[];if(!ne.hasOwnProperty(ie))return de;var ye=ne[ie],ke=this.getModeAt(te);if(typeof ke[ie]=="string")ye[ke[ie]]&&de.push(ye[ke[ie]]);else if(ke[ie])for(var Pe=0;Pe<ke[ie].length;Pe++){var $e=ye[ke[ie][Pe]];$e&&de.push($e)}else ke.helperType&&ye[ke.helperType]?de.push(ye[ke.helperType]):ye[ke.name]&&de.push(ye[ke.name]);for(var bt=0;bt<ye._global.length;bt++){var Dt=ye._global[bt];Dt.pred(ke,this)&&Rt(de,Dt.val)==-1&&de.push(Dt.val)}return de},getStateAfter:function(te,ie){var de=this.doc;return te=zi(de,te==null?de.first+de.size-1:te),ri(this,te+1,ie).state},cursorCoords:function(te,ie){var de,ye=this.doc.sel.primary();return te==null?de=ye.head:typeof te=="object"?de=Lr(this.doc,te):de=te?ye.from():ye.to(),ha(this,de,ie||"page")},charCoords:function(te,ie){return Va(this,Lr(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=Ma(this,te,ie||"page"),Ga(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=Ma(this,{top:te,left:0},ie||"page").top,mr(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,de){var ye=!1,ke;if(typeof te=="number"){var Pe=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Pe&&(te=Pe,ye=!0),ke=rn(this.doc,te)}else ke=te;return Sa(this,ke,{top:0,left:0},ie||"page",de||ye).top+(ye?this.doc.height-Cn(ke):0)},defaultTextHeight:function(){return Ka(this.display)},defaultCharWidth:function(){return io(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,de,ye,ke){var Pe=this.display;te=ha(this,Lr(this.doc,te));var $e=te.bottom,bt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Pe.sizer.appendChild(ie),ye=="over")$e=te.top;else if(ye=="above"||ye=="near"){var Dt=Math.max(Pe.wrapper.clientHeight,this.doc.height),pn=Math.max(Pe.sizer.clientWidth,Pe.lineSpace.clientWidth);(ye=="above"||te.bottom+ie.offsetHeight>Dt)&&te.top>ie.offsetHeight?$e=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=Dt&&($e=te.bottom),bt+ie.offsetWidth>pn&&(bt=pn-ie.offsetWidth)}ie.style.top=$e+"px",ie.style.left=ie.style.right="",ke=="right"?(bt=Pe.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(ke=="left"?bt=0:ke=="middle"&&(bt=(Pe.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=bt+"px"),de&&cl(this,{left:bt,top:$e,right:bt+ie.offsetWidth,bottom:$e+ie.offsetHeight})},triggerOnKeyDown:Oa(Du),triggerOnKeyPress:Oa(cf),triggerOnKeyUp:uf,triggerOnMouseDown:Oa(Uo),execCommand:function(te){if(au.hasOwnProperty(te))return au[te].call(null,this)},triggerElectric:Oa(function(te){gd(this,te)}),findPosH:function(te,ie,de,ye){var ke=1;ie<0&&(ke=-1,ie=-ie);for(var Pe=Lr(this.doc,te),$e=0;$e<ie&&(Pe=Cc(this.doc,Pe,ke,de,ye),!Pe.hitSide);++$e);return Pe},moveH:Oa(function(te,ie){var de=this;this.extendSelectionsBy(function(ye){return de.display.shift||de.doc.extend||ye.empty()?Cc(de.doc,ye.head,te,ie,de.options.rtlMoveVisually):te<0?ye.from():ye.to()},Xt)}),deleteH:Oa(function(te,ie){var de=this.doc.sel,ye=this.doc;de.somethingSelected()?ye.replaceSelection("",null,"+delete"):_s(this,function(ke){var Pe=Cc(ye,ke.head,te,ie,!1);return te<0?{from:Pe,to:ke.head}:{from:ke.head,to:Pe}})}),findPosV:function(te,ie,de,ye){var ke=1,Pe=ye;ie<0&&(ke=-1,ie=-ie);for(var $e=Lr(this.doc,te),bt=0;bt<ie;++bt){var Dt=ha(this,$e,"div");if(Pe==null?Pe=Dt.left:Dt.left=Pe,$e=vf(this,Dt,ke,de),$e.hitSide)break}return $e},moveV:Oa(function(te,ie){var de=this,ye=this.doc,ke=[],Pe=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(bt){if(Pe)return te<0?bt.from():bt.to();var Dt=ha(de,bt.head,"div");bt.goalColumn!=null&&(Dt.left=bt.goalColumn),ke.push(Dt.left);var pn=vf(de,Dt,te,ie);return ie=="page"&&bt==ye.sel.primary()&&ms(de,Va(de,pn,"div").top-Dt.top),pn},Xt),ke.length)for(var $e=0;$e<ye.sel.ranges.length;$e++)ye.sel.ranges[$e].goalColumn=ke[$e]}),findWordAt:function(te){var ie=this.doc,de=rn(ie,te.line).text,ye=te.ch,ke=te.ch;if(de){var Pe=this.getHelper(te,"wordChars");(te.sticky=="before"||ke==de.length)&&ye?--ye:++ke;for(var $e=de.charAt(ye),bt=he($e,Pe)?function(Dt){return he(Dt,Pe)}:/\s/.test($e)?function(Dt){return/\s/.test(Dt)}:function(Dt){return!/\s/.test(Dt)&&!he(Dt)};ye>0&&bt(de.charAt(ye-1));)--ye;for(;ke<de.length&&bt(de.charAt(ke));)++ke}return new ja(xn(te.line,ye),xn(te.line,ke))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Yt(this.display.cursorDiv,"CodeMirror-overwrite"):Ve(this.display.cursorDiv,"CodeMirror-overwrite"),gn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Et()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Oa(function(te,ie){Ts(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-ui(this)-this.display.barHeight,width:te.scrollWidth-ui(this)-this.display.barWidth,clientHeight:Ni(this),clientWidth:xi(this)}},scrollIntoView:Oa(function(te,ie){te==null?(te={from:this.doc.sel.primary().head,to:null},ie==null&&(ie=this.options.cursorScrollMargin)):typeof te=="number"?te={from:xn(te,0),to:null}:te.from==null&&(te={from:te,to:null}),te.to||(te.to=te.from),te.margin=ie||0,te.from.line!=null?Is(this,te):oo(this,te.from,te.to,te.margin)}),setSize:Oa(function(te,ie){var de=this,ye=function(Pe){return typeof Pe=="number"||/^\d+$/.test(String(Pe))?Pe+"px":Pe};te!=null&&(this.display.wrapper.style.width=ye(te)),ie!=null&&(this.display.wrapper.style.height=ye(ie)),this.options.lineWrapping&&oa(this);var ke=this.display.viewFrom;this.doc.iter(ke,this.display.viewTo,function(Pe){if(Pe.widgets){for(var $e=0;$e<Pe.widgets.length;$e++)if(Pe.widgets[$e].noHScroll){Ta(de,ke,"widget");break}}++ke}),this.curOp.forceUpdate=!0,gn(this,"refresh",this)}),operation:function(te){return ga(this,te)},startOperation:function(){return Ks(this)},endOperation:function(){return Ds(this)},refresh:Oa(function(){var te=this.display.cachedTextHeight;Fi(this),this.curOp.forceUpdate=!0,wi(this),Ts(this,this.doc.scrollLeft,this.doc.scrollTop),Ju(this.display),(te==null||Math.abs(te-Ka(this.display))>.5||this.options.lineWrapping)&&lo(this),gn(this,"refresh",this)}),swapDoc:Oa(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),Su(this,te),wi(this),this.display.input.reset(),Ts(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Kn(this,"swapDoc",this,ie),ie}),phrase:function(te){var ie=this.options.phrases;return ie&&Object.prototype.hasOwnProperty.call(ie,te)?ie[te]:te},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},lr(x),x.registerHelper=function(te,ie,de){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=de},x.registerGlobalHelper=function(te,ie,de,ye){x.registerHelper(te,ie,ye),ne[te]._global.push({pred:de,val:ye})}}function Cc(x,z,ne,te,ie){var de=z,ye=ne,ke=rn(x,z.line),Pe=ie&&x.direction=="rtl"?-ne:ne;function $e(){var hi=z.line+Pe;return hi<x.first||hi>=x.first+x.size?!1:(z=new xn(hi,z.ch,z.sticky),ke=rn(x,hi))}function bt(hi){var ti;if(te=="codepoint"){var vi=ke.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(vi)?ti=null:ti=new xn(z.line,Math.max(0,Math.min(ke.text.length,z.ch+ne*(vi>=55296&&vi<56320?2:1))),-ne)}else ie?ti=Zs(x.cm,ke,z,ne):ti=Ws(ke,z,ne);if(ti==null)if(!hi&&$e())z=Kl(ie,x.cm,ke,z.line,Pe);else return!1;else z=ti;return!0}if(te=="char"||te=="codepoint")bt();else if(te=="column")bt(!0);else if(te=="word"||te=="group")for(var Dt=null,pn=te=="group",cn=x.cm&&x.cm.getHelper(z,"wordChars"),er=!0;!(ne<0&&!bt(!er));er=!1){var wr=ke.text.charAt(z.ch)||`
|
|
|
`,Wr=he(wr,cn)?"w":pn&&wr==`
|
|
|
`?"n":!pn||/\s/.test(wr)?null:"p";if(pn&&!er&&!Wr&&(Wr="s"),Dt&&Dt!=Wr){ne<0&&(ne=1,bt(),z.sticky="after");break}if(Wr&&(Dt=Wr),ne>0&&!bt(!er))break}var oi=hc(x,z,de,ye,!0);return Si(de,oi)&&(oi.hitSide=!0),oi}function vf(x,z,ne,te){var ie=x.doc,de=z.left,ye;if(te=="page"){var ke=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Pe=Math.max(ke-.5*Ka(x.display),3);ye=(ne>0?z.bottom:z.top)+ne*Pe}else te=="line"&&(ye=ne>0?z.bottom+3:z.top-3);for(var $e;$e=Ga(x,de,ye),!!$e.outside;){if(ne<0?ye<=0:ye>=ie.height){$e.hitSide=!0;break}ye+=ne*5}return $e}var qa=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};qa.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;gf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function de(ke){for(var Pe=ke.target;Pe;Pe=Pe.parentNode){if(Pe==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Pe.className))break}return!1}Ot(ie,"paste",function(ke){!de(ke)||$n(te,ke)||md(ke,te)||Se<=11&&setTimeout(za(te,function(){return z.updateFromDOM()}),20)}),Ot(ie,"compositionstart",function(ke){z.composing={data:ke.data,done:!1}}),Ot(ie,"compositionupdate",function(ke){z.composing||(z.composing={data:ke.data,done:!1})}),Ot(ie,"compositionend",function(ke){z.composing&&(ke.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),Ot(ie,"touchstart",function(){return ne.forceCompositionEnd()}),Ot(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ye(ke){if(!(!de(ke)||$n(te,ke))){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()}),ke.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Pe=lu(te);bl({lineWise:!0,text:Pe.text}),ke.type=="cut"&&te.operation(function(){te.setSelections(Pe.ranges,0,tt),te.replaceSelection("",null,"cut")})}else return;if(ke.clipboardData){ke.clipboardData.clearData();var $e=Ns.text.join(`
|
|
|
`);if(ke.clipboardData.setData("Text",$e),ke.clipboardData.getData("Text")==$e){ke.preventDefault();return}}var bt=vd(),Dt=bt.firstChild;te.display.lineSpace.insertBefore(bt,te.display.lineSpace.firstChild),Dt.value=Ns.text.join(`
|
|
|
`);var pn=document.activeElement;Vt(Dt),setTimeout(function(){te.display.lineSpace.removeChild(bt),pn.focus(),pn==ie&&ne.showPrimarySelection()},50)}}Ot(ie,"copy",ye),Ot(ie,"cut",ye)},qa.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var x=ps(this.cm,!1);return x.focus=document.activeElement==this.div,x},qa.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qa.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ne=z.doc.sel.primary(),te=ne.from(),ie=ne.to();if(z.display.viewTo==z.display.viewFrom||te.line>=z.display.viewTo||ie.line<z.display.viewFrom){x.removeAllRanges();return}var de=Ec(z,x.anchorNode,x.anchorOffset),ye=Ec(z,x.focusNode,x.focusOffset);if(!(de&&!de.bad&&ye&&!ye.bad&&qn(si(de,ye),te)==0&&qn(di(de,ye),ie)==0)){var ke=z.display.view,Pe=te.line>=z.display.viewFrom&&yf(z,te)||{node:ke[0].measure.map[2],offset:0},$e=ie.line<z.display.viewTo&&yf(z,ie);if(!$e){var bt=ke[ke.length-1].measure,Dt=bt.maps?bt.maps[bt.maps.length-1]:bt.map;$e={node:Dt[Dt.length-1],offset:Dt[Dt.length-2]-Dt[Dt.length-3]}}if(!Pe||!$e){x.removeAllRanges();return}var pn=x.rangeCount&&x.getRangeAt(0),cn;try{cn=Ke(Pe.node,Pe.offset,$e.offset,$e.node)}catch(er){}cn&&(!se&&z.state.focused?(x.collapse(Pe.node,Pe.offset),cn.collapsed||(x.removeAllRanges(),x.addRange(cn))):(x.removeAllRanges(),x.addRange(cn)),pn&&x.anchorNode==null?x.addRange(pn):se&&this.startGracePeriod()),this.rememberSelection()}},qa.prototype.startGracePeriod=function(){var x=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){x.gracePeriod=!1,x.selectionChanged()&&x.cm.operation(function(){return x.cm.curOp.selectionChanged=!0})},20)},qa.prototype.showMultipleSelections=function(x){Mt(this.cm.display.cursorDiv,x.cursors),Mt(this.cm.display.selectionDiv,x.selection)},qa.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},qa.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Pt(this.div,z)},qa.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},qa.prototype.blur=function(){this.div.blur()},qa.prototype.getField=function(){return this.div},qa.prototype.supportsTouch=function(){return!0},qa.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():ga(this.cm,function(){return x.cm.curOp.selectionChanged=!0});function z(){x.cm.state.focused&&(x.pollSelection(),x.polling.set(x.cm.options.pollInterval,z))}this.polling.set(this.cm.options.pollInterval,z)},qa.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},qa.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(Je&&me&&this.cm.display.gutterSpecs.length&&uh(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=Ec(z,x.anchorNode,x.anchorOffset),te=Ec(z,x.focusNode,x.focusOffset);ne&&te&&ga(z,function(){To(z.doc,Ps(ne,te),tt),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},qa.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var x=this.cm,z=x.display,ne=x.doc.sel.primary(),te=ne.from(),ie=ne.to();if(te.ch==0&&te.line>x.firstLine()&&(te=xn(te.line-1,rn(x.doc,te.line-1).length)),ie.ch==rn(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=xn(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var de,ye,ke;te.line==z.viewFrom||(de=ia(x,te.line))==0?(ye=Xn(z.view[0].line),ke=z.view[0].node):(ye=Xn(z.view[de].line),ke=z.view[de-1].node.nextSibling);var Pe=ia(x,ie.line),$e,bt;if(Pe==z.view.length-1?($e=z.viewTo-1,bt=z.lineDiv.lastChild):($e=Xn(z.view[Pe+1].line)-1,bt=z.view[Pe+1].node.previousSibling),!ke)return!1;for(var Dt=x.doc.splitLines(ch(x,ke,bt,ye,$e)),pn=Vn(x.doc,xn(ye,0),xn($e,rn(x.doc,$e).text.length));Dt.length>1&&pn.length>1;)if(jt(Dt)==jt(pn))Dt.pop(),pn.pop(),$e--;else if(Dt[0]==pn[0])Dt.shift(),pn.shift(),ye++;else break;for(var cn=0,er=0,wr=Dt[0],Wr=pn[0],oi=Math.min(wr.length,Wr.length);cn<oi&&wr.charCodeAt(cn)==Wr.charCodeAt(cn);)++cn;for(var hi=jt(Dt),ti=jt(pn),vi=Math.min(hi.length-(Dt.length==1?cn:0),ti.length-(pn.length==1?cn:0));er<vi&&hi.charCodeAt(hi.length-er-1)==ti.charCodeAt(ti.length-er-1);)++er;if(Dt.length==1&&pn.length==1&&ye==te.line)for(;cn&&cn>te.ch&&hi.charCodeAt(hi.length-er-1)==ti.charCodeAt(ti.length-er-1);)cn--,er++;Dt[Dt.length-1]=hi.slice(0,hi.length-er).replace(/^\u200b+/,""),Dt[0]=Dt[0].slice(cn).replace(/\u200b+$/,"");var Wi=xn(ye,cn),Gi=xn($e,pn.length?jt(pn).length-er:0);if(Dt.length>1||Dt[0]||qn(Wi,Gi))return eu(x.doc,Dt,Wi,Gi,"+input"),!0},qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},qa.prototype.reset=function(){this.forceCompositionEnd()},qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},qa.prototype.readFromDOMSoon=function(){var x=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(x.readDOMTimeout=null,x.composing)if(x.composing.done)x.composing=null;else return;x.updateFromDOM()},80))},qa.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&ga(this.cm,function(){return Fi(x.cm)})},qa.prototype.setUneditable=function(x){x.contentEditable="false"},qa.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||za(this.cm,pd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},qa.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},qa.prototype.onContextMenu=function(){},qa.prototype.resetPosition=function(){},qa.prototype.needsContentAttribute=!0;function yf(x,z){var ne=ua(x,z.line);if(!ne||ne.hidden)return null;var te=rn(x.doc,z.line),ie=Ra(ne,te,z.line),de=wt(te,x.doc.direction),ye="left";if(de){var ke=Jt(de,z.ch);ye=ke%2?"right":"left"}var Pe=Bi(ie.map,z.ch,ye);return Pe.offset=Pe.collapse=="right"?Pe.end:Pe.start,Pe}function uh(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function uu(x,z){return z&&(x.bad=!0),x}function ch(x,z,ne,te,ie){var de="",ye=!1,ke=x.doc.lineSeparator(),Pe=!1;function $e(cn){return function(er){return er.id==cn}}function bt(){ye&&(de+=ke,Pe&&(de+=ke),ye=Pe=!1)}function Dt(cn){cn&&(bt(),de+=cn)}function pn(cn){if(cn.nodeType==1){var er=cn.getAttribute("cm-text");if(er){Dt(er);return}var wr=cn.getAttribute("cm-marker"),Wr;if(wr){var oi=x.findMarks(xn(te,0),xn(ie+1,0),$e(+wr));oi.length&&(Wr=oi[0].find(0))&&Dt(Vn(x.doc,Wr.from,Wr.to).join(ke));return}if(cn.getAttribute("contenteditable")=="false")return;var hi=/^(pre|div|p|li|table|br)$/i.test(cn.nodeName);if(!/^br$/i.test(cn.nodeName)&&cn.textContent.length==0)return;hi&&bt();for(var ti=0;ti<cn.childNodes.length;ti++)pn(cn.childNodes[ti]);/^(pre|p)$/i.test(cn.nodeName)&&(Pe=!0),hi&&(ye=!0)}else cn.nodeType==3&&Dt(cn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;pn(z),z!=ne;)z=z.nextSibling,Pe=!1;return de}function Ec(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return uu(x.clipPos(xn(x.display.viewTo-1)),!0);z=null,ne=0}else for(te=z;;te=te.parentNode){if(!te||te==x.display.lineDiv)return null;if(te.parentNode&&te.parentNode==x.display.lineDiv)break}for(var ie=0;ie<x.display.view.length;ie++){var de=x.display.view[ie];if(de.node==te)return dh(de,z,ne)}}function dh(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!Pt(te,z))return uu(xn(Xn(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var de=x.rest?jt(x.rest):x.line;return uu(xn(Xn(de),de.text.length),ie)}var ye=z.nodeType==3?z:null,ke=z;for(!ye&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ye=z.firstChild,ne&&(ne=ye.nodeValue.length));ke.parentNode!=te;)ke=ke.parentNode;var Pe=x.measure,$e=Pe.maps;function bt(Wr,oi,hi){for(var ti=-1;ti<($e?$e.length:0);ti++)for(var vi=ti<0?Pe.map:$e[ti],Wi=0;Wi<vi.length;Wi+=3){var Gi=vi[Wi+2];if(Gi==Wr||Gi==oi){var ba=Xn(ti<0?x.line:x.rest[ti]),to=vi[Wi]+hi;return(hi<0||Gi!=Wr)&&(to=vi[Wi+(hi?1:0)]),xn(ba,to)}}}var Dt=bt(ye,ke,ne);if(Dt)return uu(Dt,ie);for(var pn=ke.nextSibling,cn=ye?ye.nodeValue.length-ne:0;pn;pn=pn.nextSibling){if(Dt=bt(pn,pn.firstChild,0),Dt)return uu(xn(Dt.line,Dt.ch-cn),ie);cn+=pn.textContent.length}for(var er=ke.previousSibling,wr=ne;er;er=er.previousSibling){if(Dt=bt(er,er.firstChild,-1),Dt)return uu(xn(Dt.line,Dt.ch+wr),ie);wr+=er.textContent.length}}var eo=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Le,this.hasSelection=!1,this.composing=null};eo.prototype.init=function(x){var z=this,ne=this,te=this.cm;this.createField(x);var ie=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),lt&&(ie.style.width="0px"),Ot(ie,"input",function(){ve&&Se>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),Ot(ie,"paste",function(ye){$n(te,ye)||md(ye,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function de(ye){if(!$n(te,ye)){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var ke=lu(te);bl({lineWise:!0,text:ke.text}),ye.type=="cut"?te.setSelections(ke.ranges,null,tt):(ne.prevInput="",ie.value=ke.text.join(`
|
|
|
`),Vt(ie))}else return;ye.type=="cut"&&(te.state.cutIncoming=+new Date)}}Ot(ie,"cut",de),Ot(ie,"copy",de),Ot(x.scroller,"paste",function(ye){if(!(Ji(x,ye)||$n(te,ye))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var ke=new Event("paste");ke.clipboardData=ye.clipboardData,ie.dispatchEvent(ke)}}),Ot(x.lineSpace,"selectstart",function(ye){Ji(x,ye)||ur(ye)}),Ot(ie,"compositionstart",function(){var ye=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:ye,range:te.markText(ye,te.getCursor("to"),{className:"CodeMirror-composing"})}}),Ot(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},eo.prototype.createField=function(x){this.wrapper=vd(),this.textarea=this.wrapper.firstChild},eo.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},eo.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=ps(x);if(x.options.moveInputWithCursor){var ie=ha(x,ne.sel.primary().head,"div"),de=z.wrapper.getBoundingClientRect(),ye=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+ye.top-de.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+ye.left-de.left))}return te},eo.prototype.showSelection=function(x){var z=this.cm,ne=z.display;Mt(ne.cursorDiv,x.cursors),Mt(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},eo.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var ne=z.getSelection();this.textarea.value=ne,z.state.focused&&Vt(this.textarea),ve&&Se>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ve&&Se>=9&&(this.hasSelection=null))}},eo.prototype.getField=function(){return this.textarea},eo.prototype.supportsTouch=function(){return!1},eo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ge||Et()!=this.textarea))try{this.textarea.focus()}catch(x){}},eo.prototype.blur=function(){this.textarea.blur()},eo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},eo.prototype.receivedFocus=function(){this.slowPoll()},eo.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},eo.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function ne(){var te=z.poll();!te&&!x?(x=!0,z.polling.set(60,ne)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,ne)},eo.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||An(ne)&&!te&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var ie=ne.value;if(ie==te&&!z.somethingSelected())return!1;if(ve&&Se>=9&&this.hasSelection===ie||Ce&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var de=ie.charCodeAt(0);if(de==8203&&!te&&(te="\u200B"),de==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,ke=Math.min(te.length,ie.length);ye<ke&&te.charCodeAt(ye)==ie.charCodeAt(ye);)++ye;return ga(z,function(){pd(z,ie.slice(ye),te.length-ye,null,x.composing?"*compose":null),ie.length>1e3||ie.indexOf(`
|
|
|
`)>-1?ne.value=x.prevInput="":x.prevInput=ie,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},eo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},eo.prototype.onKeyPress=function(){ve&&Se>=9&&(this.hasSelection=null),this.fastPoll()},eo.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var de=Ao(ne,x),ye=te.scroller.scrollTop;if(!de||Te)return;var ke=ne.options.resetSelectionOnContextMenu;ke&&ne.doc.sel.contains(de)==-1&&za(ne,To)(ne.doc,Ps(de),tt);var Pe=ie.style.cssText,$e=z.wrapper.style.cssText,bt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-bt.top-5)+"px; left: "+(x.clientX-bt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Dt;Me&&(Dt=window.scrollY),te.input.focus(),Me&&window.scrollTo(null,Dt),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=cn,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function pn(){if(ie.selectionStart!=null){var wr=ne.somethingSelected(),Wr="\u200B"+(wr?ie.value:"");ie.value="\u21DA",ie.value=Wr,z.prevInput=wr?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=Wr.length,te.selForContextMenu=ne.doc.sel}}function cn(){if(z.contextMenuPending==cn&&(z.contextMenuPending=!1,z.wrapper.style.cssText=$e,ie.style.cssText=Pe,ve&&Se<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ye),ie.selectionStart!=null)){(!ve||ve&&Se<9)&&pn();var wr=0,Wr=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?za(ne,td)(ne):wr++<10?te.detectingSelectAll=setTimeout(Wr,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(Wr,200)}}if(ve&&Se>=9&&pn(),xe){Qr(x);var er=function(){Dn(window,"mouseup",er),setTimeout(cn,20)};Ot(window,"mouseup",er)}else setTimeout(cn,50)},eo.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},eo.prototype.setUneditable=function(){},eo.prototype.needsContentAttribute=!1;function Hl(x,z){if(z=z?dn(z):{},z.value=x.value,!z.tabindex&&x.tabIndex&&(z.tabindex=x.tabIndex),!z.placeholder&&x.placeholder&&(z.placeholder=x.placeholder),z.autofocus==null){var ne=Et();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=ke.getValue()}var ie;if(x.form&&(Ot(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var de=x.form;ie=de.submit;try{var ye=de.submit=function(){te(),de.submit=ie,de.submit(),de.submit=ye}}catch(Pe){}}z.finishInit=function(Pe){Pe.save=te,Pe.getTextArea=function(){return x},Pe.toTextArea=function(){Pe.toTextArea=isNaN,te(),x.parentNode.removeChild(Pe.getWrapperElement()),x.style.display="",x.form&&(Dn(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var ke=aa(function(Pe){return x.parentNode.insertBefore(Pe,x.nextSibling)},z);return ke}function cu(x){x.off=Dn,x.on=Ot,x.wheelEventPixels=Gc,x.Doc=Mo,x.splitLines=At,x.countColumn=Ue,x.findColumn=Tn,x.isWordChar=pe,x.Pass=un,x.signal=gn,x.Line=Fn,x.changeEnd=Js,x.scrollbarModel=ql,x.Pos=xn,x.cmpPos=qn,x.modes=or,x.mimeModes=ar,x.resolveMode=dt,x.getMode=Bt,x.modeExtensions=qt,x.extendMode=je,x.copyState=Ct,x.startState=Ft,x.innerMode=Wt,x.commands=au,x.keyMap=Qa,x.keyName=zl,x.isModifierKey=Iu,x.lookupKey=rl,x.normalizeKeyMap=od,x.StringStream=an,x.SharedTextMarker=ya,x.TextMarker=hl,x.LineWidget=nu,x.e_preventDefault=ur,x.e_stopPropagation=ni,x.e_stop=Qr,x.addClass=Yt,x.contains=Pt,x.rmClass=Ve,x.keyNames=Bs}oh(aa),yd(aa);var ol="iter insert remove copy getEditor constructor".split(" ");for(var ks in Mo.prototype)Mo.prototype.hasOwnProperty(ks)&&Rt(ol,ks)<0&&(aa.prototype[ks]=function(x){return function(){return x.apply(this.doc,arguments)}}(Mo.prototype[ks]));return lr(Mo),aa.inputStyles={textarea:eo,contenteditable:qa},aa.defineMode=function(x){!aa.defaults.mode&&x!="null"&&(aa.defaults.mode=x),Rn.apply(this,arguments)},aa.defineMIME=it,aa.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),aa.defineMIME("text/plain","null"),aa.defineExtension=function(x,z){aa.prototype[x]=z},aa.defineDocExtension=function(x,z){Mo.prototype[x]=z},aa.fromTextArea=Hl,cu(aa),aa.version="5.58.2",aa})},49047:function(bn,Zt,le){(function(se){se(le(4631),le(29589),le(52539))})(function(se){"use strict";se.defineMode("markdown",function(Be,Ne){var Ye=se.getMode(Be,"text/html"),ve=Ye.name=="null";function Se(Ue){if(se.findModeByName){var Le=se.findModeByName(Ue);Le&&(Ue=Le.mime||Le.mimes[0])}var Rt=se.getMode(Be,Ue);return Rt.name=="null"?null:Rt}Ne.highlightFormatting===void 0&&(Ne.highlightFormatting=!1),Ne.maxBlockquoteDepth===void 0&&(Ne.maxBlockquoteDepth=0),Ne.taskLists===void 0&&(Ne.taskLists=!1),Ne.strikethrough===void 0&&(Ne.strikethrough=!1),Ne.emoji===void 0&&(Ne.emoji=!1),Ne.fencedCodeBlockHighlighting===void 0&&(Ne.fencedCodeBlockHighlighting=!0),Ne.fencedCodeBlockDefaultMode===void 0&&(Ne.fencedCodeBlockDefaultMode="text/plain"),Ne.xml===void 0&&(Ne.xml=!0),Ne.tokenTypeOverrides===void 0&&(Ne.tokenTypeOverrides={});var Me={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var we in Me)Me.hasOwnProperty(we)&&Ne.tokenTypeOverrides[we]&&(Me[we]=Ne.tokenTypeOverrides[we]);var me=/^([*\-_])(?:\s*\1){2,}\s*$/,Te=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ot=/^\[(x| )\](?=\s)/i,Oe=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,st=/^ {0,3}(?:\={1,}|-{2,})\s*$/,lt=/^[^#!\[\]*_\\<>` "'(~:]+/,Je=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ge=/^\s*\[[^\]]+?\]:.*$/,Ce=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,pt=" ";function zt(Ue,Le,Rt){return Le.f=Le.inline=Rt,Rt(Ue,Le)}function qe(Ue,Le,Rt){return Le.f=Le.block=Rt,Rt(Ue,Le)}function ut(Ue){return!Ue||!/\S/.test(Ue.string)}function xe(Ue){if(Ue.linkTitle=!1,Ue.linkHref=!1,Ue.linkText=!1,Ue.em=!1,Ue.strong=!1,Ue.strikethrough=!1,Ue.quote=0,Ue.indentedCode=!1,Ue.f==Ve){var Le=ve;if(!Le){var Rt=se.innerMode(Ye,Ue.htmlState);Le=Rt.mode.name=="xml"&&Rt.state.tagStart===null&&!Rt.state.context&&Rt.state.tokenize.isInText}Le&&(Ue.f=St,Ue.block=Ee,Ue.htmlState=null)}return Ue.trailingSpace=0,Ue.trailingSpaceNewLine=!1,Ue.prevLine=Ue.thisLine,Ue.thisLine={stream:null},null}function Ee(Ue,Le){var Rt=Ue.column()===Le.indentation,Sn=ut(Le.prevLine.stream),un=Le.indentedCode,tt=Le.prevLine.hr,ft=Le.list!==!1,Xt=(Le.listStack[Le.listStack.length-1]||0)+3;Le.indentedCode=!1;var Tn=Le.indentation;if(Le.indentationDiff===null&&(Le.indentationDiff=Le.indentation,ft)){for(Le.list=null;Tn<Le.listStack[Le.listStack.length-1];)Le.listStack.pop(),Le.listStack.length?Le.indentation=Le.listStack[Le.listStack.length-1]:Le.list=!1;Le.list!==!1&&(Le.indentationDiff=Tn-Le.listStack[Le.listStack.length-1])}var mn=!Sn&&!tt&&!Le.prevLine.header&&(!ft||!un)&&!Le.prevLine.fencedCodeEnd,Ut=(Le.list===!1||tt||Sn)&&Le.indentation<=Xt&&Ue.match(me),jt=null;if(Le.indentationDiff>=4&&(un||Le.prevLine.fencedCodeEnd||Le.prevLine.header||Sn))return Ue.skipToEnd(),Le.indentedCode=!0,Me.code;if(Ue.eatSpace())return null;if(Rt&&Le.indentation<=Xt&&(jt=Ue.match(Oe))&&jt[1].length<=6)return Le.quote=0,Le.header=jt[1].length,Le.thisLine.header=!0,Ne.highlightFormatting&&(Le.formatting="header"),Le.f=Le.inline,Mt(Le);if(Le.indentation<=Xt&&Ue.eat(">"))return Le.quote=Rt?1:Le.quote+1,Ne.highlightFormatting&&(Le.formatting="quote"),Ue.eatSpace(),Mt(Le);if(!Ut&&!Le.setext&&Rt&&Le.indentation<=Xt&&(jt=Ue.match(Te))){var _n=jt[1]?"ol":"ul";return Le.indentation=Tn+Ue.current().length,Le.list=!0,Le.quote=0,Le.listStack.push(Le.indentation),Le.em=!1,Le.strong=!1,Le.code=!1,Le.strikethrough=!1,Ne.taskLists&&Ue.match(ot,!1)&&(Le.taskList=!0),Le.f=Le.inline,Ne.highlightFormatting&&(Le.formatting=["list","list-"+_n]),Mt(Le)}else{if(Rt&&Le.indentation<=Xt&&(jt=Ue.match(Je,!0)))return Le.quote=0,Le.fencedEndRE=new RegExp(jt[1]+"+ *$"),Le.localMode=Ne.fencedCodeBlockHighlighting&&Se(jt[2]||Ne.fencedCodeBlockDefaultMode),Le.localMode&&(Le.localState=se.startState(Le.localMode)),Le.f=Le.block=Xe,Ne.highlightFormatting&&(Le.formatting="code-block"),Le.code=-1,Mt(Le);if(Le.setext||(!mn||!ft)&&!Le.quote&&Le.list===!1&&!Le.code&&!Ut&&!Ge.test(Ue.string)&&(jt=Ue.lookAhead(1))&&(jt=jt.match(st)))return Le.setext?(Le.header=Le.setext,Le.setext=0,Ue.skipToEnd(),Ne.highlightFormatting&&(Le.formatting="header")):(Le.header=jt[0].charAt(0)=="="?1:2,Le.setext=Le.header),Le.thisLine.header=!0,Le.f=Le.inline,Mt(Le);if(Ut)return Ue.skipToEnd(),Le.hr=!0,Le.thisLine.hr=!0,Me.hr;if(Ue.peek()==="[")return zt(Ue,Le,at)}return zt(Ue,Le,Le.inline)}function Ve(Ue,Le){var Rt=Ye.token(Ue,Le.htmlState);if(!ve){var Sn=se.innerMode(Ye,Le.htmlState);(Sn.mode.name=="xml"&&Sn.state.tagStart===null&&!Sn.state.context&&Sn.state.tokenize.isInText||Le.md_inside&&Ue.current().indexOf(">")>-1)&&(Le.f=St,Le.block=Ee,Le.htmlState=null)}return Rt}function Xe(Ue,Le){var Rt=Le.listStack[Le.listStack.length-1]||0,Sn=Le.indentation<Rt,un=Rt+3;if(Le.fencedEndRE&&Le.indentation<=un&&(Sn||Ue.match(Le.fencedEndRE))){Ne.highlightFormatting&&(Le.formatting="code-block");var tt;return Sn||(tt=Mt(Le)),Le.localMode=Le.localState=null,Le.block=Ee,Le.f=St,Le.fencedEndRE=null,Le.code=0,Le.thisLine.fencedCodeEnd=!0,Sn?qe(Ue,Le,Le.block):tt}else return Le.localMode?Le.localMode.token(Ue,Le.localState):(Ue.skipToEnd(),Me.code)}function Mt(Ue){var Le=[];if(Ue.formatting){Le.push(Me.formatting),typeof Ue.formatting=="string"&&(Ue.formatting=[Ue.formatting]);for(var Rt=0;Rt<Ue.formatting.length;Rt++)Le.push(Me.formatting+"-"+Ue.formatting[Rt]),Ue.formatting[Rt]==="header"&&Le.push(Me.formatting+"-"+Ue.formatting[Rt]+"-"+Ue.header),Ue.formatting[Rt]==="quote"&&(!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=Ue.quote?Le.push(Me.formatting+"-"+Ue.formatting[Rt]+"-"+Ue.quote):Le.push("error"))}if(Ue.taskOpen)return Le.push("meta"),Le.length?Le.join(" "):null;if(Ue.taskClosed)return Le.push("property"),Le.length?Le.join(" "):null;if(Ue.linkHref?Le.push(Me.linkHref,"url"):(Ue.strong&&Le.push(Me.strong),Ue.em&&Le.push(Me.em),Ue.strikethrough&&Le.push(Me.strikethrough),Ue.emoji&&Le.push(Me.emoji),Ue.linkText&&Le.push(Me.linkText),Ue.code&&Le.push(Me.code),Ue.image&&Le.push(Me.image),Ue.imageAltText&&Le.push(Me.imageAltText,"link"),Ue.imageMarker&&Le.push(Me.imageMarker)),Ue.header&&Le.push(Me.header,Me.header+"-"+Ue.header),Ue.quote&&(Le.push(Me.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=Ue.quote?Le.push(Me.quote+"-"+Ue.quote):Le.push(Me.quote+"-"+Ne.maxBlockquoteDepth)),Ue.list!==!1){var Sn=(Ue.listStack.length-1)%3;Sn?Sn===1?Le.push(Me.list2):Le.push(Me.list3):Le.push(Me.list1)}return Ue.trailingSpaceNewLine?Le.push("trailing-space-new-line"):Ue.trailingSpace&&Le.push("trailing-space-"+(Ue.trailingSpace%2?"a":"b")),Le.length?Le.join(" "):null}function mt(Ue,Le){if(Ue.match(lt,!0))return Mt(Le)}function St(Ue,Le){var Rt=Le.text(Ue,Le);if(typeof Rt!="undefined")return Rt;if(Le.list)return Le.list=null,Mt(Le);if(Le.taskList){var Sn=Ue.match(ot,!0)[1]===" ";return Sn?Le.taskOpen=!0:Le.taskClosed=!0,Ne.highlightFormatting&&(Le.formatting="task"),Le.taskList=!1,Mt(Le)}if(Le.taskOpen=!1,Le.taskClosed=!1,Le.header&&Ue.match(/^#+$/,!0))return Ne.highlightFormatting&&(Le.formatting="header"),Mt(Le);var un=Ue.next();if(Le.linkTitle){Le.linkTitle=!1;var tt=un;un==="("&&(tt=")"),tt=(tt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ft="^\\s*(?:[^"+tt+"\\\\]+|\\\\\\\\|\\\\.)"+tt;if(Ue.match(new RegExp(ft),!0))return Me.linkHref}if(un==="`"){var Xt=Le.formatting;Ne.highlightFormatting&&(Le.formatting="code"),Ue.eatWhile("`");var Tn=Ue.current().length;if(Le.code==0&&(!Le.quote||Tn==1))return Le.code=Tn,Mt(Le);if(Tn==Le.code){var mn=Mt(Le);return Le.code=0,mn}else return Le.formatting=Xt,Mt(Le)}else if(Le.code)return Mt(Le);if(un==="\\"&&(Ue.next(),Ne.highlightFormatting)){var Ut=Mt(Le),jt=Me.formatting+"-escape";return Ut?Ut+" "+jt:jt}if(un==="!"&&Ue.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Le.imageMarker=!0,Le.image=!0,Ne.highlightFormatting&&(Le.formatting="image"),Mt(Le);if(un==="["&&Le.imageMarker&&Ue.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Le.imageMarker=!1,Le.imageAltText=!0,Ne.highlightFormatting&&(Le.formatting="image"),Mt(Le);if(un==="]"&&Le.imageAltText){Ne.highlightFormatting&&(Le.formatting="image");var Ut=Mt(Le);return Le.imageAltText=!1,Le.image=!1,Le.inline=Le.f=Pt,Ut}if(un==="["&&!Le.image)return Le.linkText&&Ue.match(/^.*?\]/)||(Le.linkText=!0,Ne.highlightFormatting&&(Le.formatting="link")),Mt(Le);if(un==="]"&&Le.linkText){Ne.highlightFormatting&&(Le.formatting="link");var Ut=Mt(Le);return Le.linkText=!1,Le.inline=Le.f=Ue.match(/\(.*?\)| ?\[.*?\]/,!1)?Pt:St,Ut}if(un==="<"&&Ue.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Le.f=Le.inline=Ke,Ne.highlightFormatting&&(Le.formatting="link");var Ut=Mt(Le);return Ut?Ut+=" ":Ut="",Ut+Me.linkInline}if(un==="<"&&Ue.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Le.f=Le.inline=Ke,Ne.highlightFormatting&&(Le.formatting="link");var Ut=Mt(Le);return Ut?Ut+=" ":Ut="",Ut+Me.linkEmail}if(Ne.xml&&un==="<"&&Ue.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _n=Ue.string.indexOf(">",Ue.pos);if(_n!=-1){var yn=Ue.string.substring(Ue.start,_n);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(yn)&&(Le.md_inside=!0)}return Ue.backUp(1),Le.htmlState=se.startState(Ye),qe(Ue,Le,Ve)}if(Ne.xml&&un==="<"&&Ue.match(/^\/\w*?>/))return Le.md_inside=!1,"tag";if(un==="*"||un==="_"){for(var Ae=1,ce=Ue.pos==1?" ":Ue.string.charAt(Ue.pos-2);Ae<3&&Ue.eat(un);)Ae++;var ue=Ue.peek()||" ",pe=!/\s/.test(ue)&&(!Ce.test(ue)||/\s/.test(ce)||Ce.test(ce)),he=!/\s/.test(ce)&&(!Ce.test(ce)||/\s/.test(ue)||Ce.test(ue)),oe=null,Ie=null;if(Ae%2&&(!Le.em&&pe&&(un==="*"||!he||Ce.test(ce))?oe=!0:Le.em==un&&he&&(un==="*"||!pe||Ce.test(ue))&&(oe=!1)),Ae>1&&(!Le.strong&&pe&&(un==="*"||!he||Ce.test(ce))?Ie=!0:Le.strong==un&&he&&(un==="*"||!pe||Ce.test(ue))&&(Ie=!1)),Ie!=null||oe!=null){Ne.highlightFormatting&&(Le.formatting=oe==null?"strong":Ie==null?"em":"strong em"),oe===!0&&(Le.em=un),Ie===!0&&(Le.strong=un);var mn=Mt(Le);return oe===!1&&(Le.em=!1),Ie===!1&&(Le.strong=!1),mn}}else if(un===" "&&(Ue.eat("*")||Ue.eat("_"))){if(Ue.peek()===" ")return Mt(Le);Ue.backUp(1)}if(Ne.strikethrough){if(un==="~"&&Ue.eatWhile(un)){if(Le.strikethrough){Ne.highlightFormatting&&(Le.formatting="strikethrough");var mn=Mt(Le);return Le.strikethrough=!1,mn}else if(Ue.match(/^[^\s]/,!1))return Le.strikethrough=!0,Ne.highlightFormatting&&(Le.formatting="strikethrough"),Mt(Le)}else if(un===" "&&Ue.match(/^~~/,!0)){if(Ue.peek()===" ")return Mt(Le);Ue.backUp(2)}}if(Ne.emoji&&un===":"&&Ue.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Le.emoji=!0,Ne.highlightFormatting&&(Le.formatting="emoji");var Qe=Mt(Le);return Le.emoji=!1,Qe}return un===" "&&(Ue.match(/^ +$/,!1)?Le.trailingSpace++:Le.trailingSpace&&(Le.trailingSpaceNewLine=!0)),Mt(Le)}function Ke(Ue,Le){var Rt=Ue.next();if(Rt===">"){Le.f=Le.inline=St,Ne.highlightFormatting&&(Le.formatting="link");var Sn=Mt(Le);return Sn?Sn+=" ":Sn="",Sn+Me.linkInline}return Ue.match(/^[^>]+/,!0),Me.linkInline}function Pt(Ue,Le){if(Ue.eatSpace())return null;var Rt=Ue.next();return Rt==="("||Rt==="["?(Le.f=Le.inline=Yt(Rt==="("?")":"]"),Ne.highlightFormatting&&(Le.formatting="link-string"),Le.linkHref=!0,Mt(Le)):"error"}var Et={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Yt(Ue){return function(Le,Rt){var Sn=Le.next();if(Sn===Ue){Rt.f=Rt.inline=St,Ne.highlightFormatting&&(Rt.formatting="link-string");var un=Mt(Rt);return Rt.linkHref=!1,un}return Le.match(Et[Ue]),Rt.linkHref=!0,Mt(Rt)}}function at(Ue,Le){return Ue.match(/^([^\]\\]|\\.)*\]:/,!1)?(Le.f=Vt,Ue.next(),Ne.highlightFormatting&&(Le.formatting="link"),Le.linkText=!0,Mt(Le)):zt(Ue,Le,St)}function Vt(Ue,Le){if(Ue.match(/^\]:/,!0)){Le.f=Le.inline=fn,Ne.highlightFormatting&&(Le.formatting="link");var Rt=Mt(Le);return Le.linkText=!1,Rt}return Ue.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function fn(Ue,Le){return Ue.eatSpace()?null:(Ue.match(/^[^\s]+/,!0),Ue.peek()===void 0?Le.linkTitle=!0:Ue.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Le.f=Le.inline=St,Me.linkHref+" url")}var dn={startState:function(){return{f:Ee,prevLine:{stream:null},thisLine:{stream:null},block:Ee,htmlState:null,indentation:0,inline:St,text:mt,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(Ue){return{f:Ue.f,prevLine:Ue.prevLine,thisLine:Ue.thisLine,block:Ue.block,htmlState:Ue.htmlState&&se.copyState(Ye,Ue.htmlState),indentation:Ue.indentation,localMode:Ue.localMode,localState:Ue.localMode?se.copyState(Ue.localMode,Ue.localState):null,inline:Ue.inline,text:Ue.text,formatting:!1,linkText:Ue.linkText,linkTitle:Ue.linkTitle,linkHref:Ue.linkHref,code:Ue.code,em:Ue.em,strong:Ue.strong,strikethrough:Ue.strikethrough,emoji:Ue.emoji,header:Ue.header,setext:Ue.setext,hr:Ue.hr,taskList:Ue.taskList,list:Ue.list,listStack:Ue.listStack.slice(0),quote:Ue.quote,indentedCode:Ue.indentedCode,trailingSpace:Ue.trailingSpace,trailingSpaceNewLine:Ue.trailingSpaceNewLine,md_inside:Ue.md_inside,fencedEndRE:Ue.fencedEndRE}},token:function(Ue,Le){if(Le.formatting=!1,Ue!=Le.thisLine.stream){if(Le.header=0,Le.hr=!1,Ue.match(/^\s*$/,!0))return xe(Le),null;if(Le.prevLine=Le.thisLine,Le.thisLine={stream:Ue},Le.taskList=!1,Le.trailingSpace=0,Le.trailingSpaceNewLine=!1,!Le.localState&&(Le.f=Le.block,Le.f!=Ve)){var Rt=Ue.match(/^\s*/,!0)[0].replace(/\t/g,pt).length;if(Le.indentation=Rt,Le.indentationDiff=null,Rt>0)return null}}return Le.f(Ue,Le)},innerMode:function(Ue){return Ue.block==Ve?{state:Ue.htmlState,mode:Ye}:Ue.localState?{state:Ue.localState,mode:Ue.localMode}:{state:Ue,mode:dn}},indent:function(Ue,Le,Rt){return Ue.block==Ve&&Ye.indent?Ye.indent(Ue.htmlState,Le,Rt):Ue.localState&&Ue.localMode.indent?Ue.localMode.indent(Ue.localState,Le,Rt):se.Pass},blankLine:xe,getType:Mt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return dn},"xml"),se.defineMIME("text/markdown","markdown"),se.defineMIME("text/x-markdown","markdown")})},52539:function(bn,Zt,le){(function(se){se(le(4631))})(function(se){"use strict";se.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Be=0;Be<se.modeInfo.length;Be++){var Ne=se.modeInfo[Be];Ne.mimes&&(Ne.mime=Ne.mimes[0])}se.findModeByMIME=function(Ye){Ye=Ye.toLowerCase();for(var ve=0;ve<se.modeInfo.length;ve++){var Se=se.modeInfo[ve];if(Se.mime==Ye)return Se;if(Se.mimes){for(var Me=0;Me<Se.mimes.length;Me++)if(Se.mimes[Me]==Ye)return Se}}if(/\+xml$/.test(Ye))return se.findModeByMIME("application/xml");if(/\+json$/.test(Ye))return se.findModeByMIME("application/json")},se.findModeByExtension=function(Ye){Ye=Ye.toLowerCase();for(var ve=0;ve<se.modeInfo.length;ve++){var Se=se.modeInfo[ve];if(Se.ext){for(var Me=0;Me<Se.ext.length;Me++)if(Se.ext[Me]==Ye)return Se}}},se.findModeByFileName=function(Ye){for(var ve=0;ve<se.modeInfo.length;ve++){var Se=se.modeInfo[ve];if(Se.file&&Se.file.test(Ye))return Se}var Me=Ye.lastIndexOf("."),we=Me>-1&&Ye.substring(Me+1,Ye.length);if(we)return se.findModeByExtension(we)},se.findModeByName=function(Ye){Ye=Ye.toLowerCase();for(var ve=0;ve<se.modeInfo.length;ve++){var Se=se.modeInfo[ve];if(Se.name.toLowerCase()==Ye)return Se;if(Se.alias){for(var Me=0;Me<Se.alias.length;Me++)if(Se.alias[Me].toLowerCase()==Ye)return Se}}}})},80785:function(bn,Zt,le){(function(se){se(le(4631))})(function(se){"use strict";se.defineMode("stex",function(Be,Ne){"use strict";function Ye(lt,Je){lt.cmdState.push(Je)}function ve(lt){return lt.cmdState.length>0?lt.cmdState[lt.cmdState.length-1]:null}function Se(lt){var Je=lt.cmdState.pop();Je&&Je.closeBracket()}function Me(lt){for(var Je=lt.cmdState,Ge=Je.length-1;Ge>=0;Ge--){var Ce=Je[Ge];if(Ce.name!="DEFAULT")return Ce}return{styleIdentifier:function(){return null}}}function we(lt,Je,Ge){return function(){this.name=lt,this.bracketNo=0,this.style=Je,this.styles=Ge,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var me={};me.importmodule=we("importmodule","tag",["string","builtin"]),me.documentclass=we("documentclass","tag",["","atom"]),me.usepackage=we("usepackage","tag",["atom"]),me.begin=we("begin","tag",["atom"]),me.end=we("end","tag",["atom"]),me.label=we("label","tag",["atom"]),me.ref=we("ref","tag",["atom"]),me.eqref=we("eqref","tag",["atom"]),me.cite=we("cite","tag",["atom"]),me.bibitem=we("bibitem","tag",["atom"]),me.Bibitem=we("Bibitem","tag",["atom"]),me.RBibitem=we("RBibitem","tag",["atom"]),me.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Te(lt,Je){lt.f=Je}function ot(lt,Je){var Ge;if(lt.match(/^\\[a-zA-Z@]+/)){var Ce=lt.current().slice(1);return Ge=me.hasOwnProperty(Ce)?me[Ce]:me.DEFAULT,Ge=new Ge,Ye(Je,Ge),Te(Je,st),Ge.style}if(lt.match(/^\\[$&%#{}_]/)||lt.match(/^\\[,;!\/\\]/))return"tag";if(lt.match("\\["))return Te(Je,function(zt,qe){return Oe(zt,qe,"\\]")}),"keyword";if(lt.match("\\("))return Te(Je,function(zt,qe){return Oe(zt,qe,"\\)")}),"keyword";if(lt.match("$$"))return Te(Je,function(zt,qe){return Oe(zt,qe,"$$")}),"keyword";if(lt.match("$"))return Te(Je,function(zt,qe){return Oe(zt,qe,"$")}),"keyword";var pt=lt.next();if(pt=="%")return lt.skipToEnd(),"comment";if(pt=="}"||pt=="]"){if(Ge=ve(Je),Ge)Ge.closeBracket(pt),Te(Je,st);else return"error";return"bracket"}else return pt=="{"||pt=="["?(Ge=me.DEFAULT,Ge=new Ge,Ye(Je,Ge),"bracket"):/\d/.test(pt)?(lt.eatWhile(/[\w.%]/),"atom"):(lt.eatWhile(/[\w\-_]/),Ge=Me(Je),Ge.name=="begin"&&(Ge.argument=lt.current()),Ge.styleIdentifier())}function Oe(lt,Je,Ge){if(lt.eatSpace())return null;if(Ge&<.match(Ge))return Te(Je,ot),"keyword";if(lt.match(/^\\[a-zA-Z@]+/))return"tag";if(lt.match(/^[a-zA-Z]+/))return"variable-2";if(lt.match(/^\\[$&%#{}_]/)||lt.match(/^\\[,;!\/]/)||lt.match(/^[\^_&]/))return"tag";if(lt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(lt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ce=lt.next();return Ce=="{"||Ce=="}"||Ce=="["||Ce=="]"||Ce=="("||Ce==")"?"bracket":Ce=="%"?(lt.skipToEnd(),"comment"):"error"}function st(lt,Je){var Ge=lt.peek(),Ce;return Ge=="{"||Ge=="["?(Ce=ve(Je),Ce.openBracket(Ge),lt.eat(Ge),Te(Je,ot),"bracket"):/[ \t\r]/.test(Ge)?(lt.eat(Ge),null):(Te(Je,ot),Se(Je),ot(lt,Je))}return{startState:function(){var lt=Ne.inMathMode?function(Je,Ge){return Oe(Je,Ge)}:ot;return{cmdState:[],f:lt}},copyState:function(lt){return{cmdState:lt.cmdState.slice(),f:lt.f}},token:function(lt,Je){return Je.f(lt,Je)},blankLine:function(lt){lt.f=ot,lt.cmdState.length=0},lineComment:"%"}}),se.defineMIME("text/x-stex","stex"),se.defineMIME("text/x-latex","stex")})},29589:function(bn,Zt,le){(function(se){se(le(4631))})(function(se){"use strict";var Be={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Ne={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};se.defineMode("xml",function(Ye,ve){var Se=Ye.indentUnit,Me={},we=ve.htmlMode?Be:Ne;for(var me in we)Me[me]=we[me];for(var me in ve)Me[me]=ve[me];var Te,ot;function Oe(Ke,Pt){function Et(Vt){return Pt.tokenize=Vt,Vt(Ke,Pt)}var Yt=Ke.next();if(Yt=="<")return Ke.eat("!")?Ke.eat("[")?Ke.match("CDATA[")?Et(Je("atom","]]>")):null:Ke.match("--")?Et(Je("comment","-->")):Ke.match("DOCTYPE",!0,!0)?(Ke.eatWhile(/[\w\._\-]/),Et(Ge(1))):null:Ke.eat("?")?(Ke.eatWhile(/[\w\._\-]/),Pt.tokenize=Je("meta","?>"),"meta"):(Te=Ke.eat("/")?"closeTag":"openTag",Pt.tokenize=st,"tag bracket");if(Yt=="&"){var at;return Ke.eat("#")?Ke.eat("x")?at=Ke.eatWhile(/[a-fA-F\d]/)&&Ke.eat(";"):at=Ke.eatWhile(/[\d]/)&&Ke.eat(";"):at=Ke.eatWhile(/[\w\.\-:]/)&&Ke.eat(";"),at?"atom":"error"}else return Ke.eatWhile(/[^&<]/),null}Oe.isInText=!0;function st(Ke,Pt){var Et=Ke.next();if(Et==">"||Et=="/"&&Ke.eat(">"))return Pt.tokenize=Oe,Te=Et==">"?"endTag":"selfcloseTag","tag bracket";if(Et=="=")return Te="equals",null;if(Et=="<"){Pt.tokenize=Oe,Pt.state=qe,Pt.tagName=Pt.tagStart=null;var Yt=Pt.tokenize(Ke,Pt);return Yt?Yt+" tag error":"tag error"}else return/[\'\"]/.test(Et)?(Pt.tokenize=lt(Et),Pt.stringStartCol=Ke.column(),Pt.tokenize(Ke,Pt)):(Ke.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function lt(Ke){var Pt=function(Et,Yt){for(;!Et.eol();)if(Et.next()==Ke){Yt.tokenize=st;break}return"string"};return Pt.isInAttribute=!0,Pt}function Je(Ke,Pt){return function(Et,Yt){for(;!Et.eol();){if(Et.match(Pt)){Yt.tokenize=Oe;break}Et.next()}return Ke}}function Ge(Ke){return function(Pt,Et){for(var Yt;(Yt=Pt.next())!=null;){if(Yt=="<")return Et.tokenize=Ge(Ke+1),Et.tokenize(Pt,Et);if(Yt==">")if(Ke==1){Et.tokenize=Oe;break}else return Et.tokenize=Ge(Ke-1),Et.tokenize(Pt,Et)}return"meta"}}function Ce(Ke,Pt,Et){this.prev=Ke.context,this.tagName=Pt,this.indent=Ke.indented,this.startOfLine=Et,(Me.doNotIndent.hasOwnProperty(Pt)||Ke.context&&Ke.context.noIndent)&&(this.noIndent=!0)}function pt(Ke){Ke.context&&(Ke.context=Ke.context.prev)}function zt(Ke,Pt){for(var Et;;){if(!Ke.context||(Et=Ke.context.tagName,!Me.contextGrabbers.hasOwnProperty(Et)||!Me.contextGrabbers[Et].hasOwnProperty(Pt)))return;pt(Ke)}}function qe(Ke,Pt,Et){return Ke=="openTag"?(Et.tagStart=Pt.column(),ut):Ke=="closeTag"?xe:qe}function ut(Ke,Pt,Et){return Ke=="word"?(Et.tagName=Pt.current(),ot="tag",Xe):Me.allowMissingTagName&&Ke=="endTag"?(ot="tag bracket",Xe(Ke,Pt,Et)):(ot="error",ut)}function xe(Ke,Pt,Et){if(Ke=="word"){var Yt=Pt.current();return Et.context&&Et.context.tagName!=Yt&&Me.implicitlyClosed.hasOwnProperty(Et.context.tagName)&&pt(Et),Et.context&&Et.context.tagName==Yt||Me.matchClosing===!1?(ot="tag",Ee):(ot="tag error",Ve)}else return Me.allowMissingTagName&&Ke=="endTag"?(ot="tag bracket",Ee(Ke,Pt,Et)):(ot="error",Ve)}function Ee(Ke,Pt,Et){return Ke!="endTag"?(ot="error",Ee):(pt(Et),qe)}function Ve(Ke,Pt,Et){return ot="error",Ee(Ke,Pt,Et)}function Xe(Ke,Pt,Et){if(Ke=="word")return ot="attribute",Mt;if(Ke=="endTag"||Ke=="selfcloseTag"){var Yt=Et.tagName,at=Et.tagStart;return Et.tagName=Et.tagStart=null,Ke=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(Yt)?zt(Et,Yt):(zt(Et,Yt),Et.context=new Ce(Et,Yt,at==Et.indented)),qe}return ot="error",Xe}function Mt(Ke,Pt,Et){return Ke=="equals"?mt:(Me.allowMissing||(ot="error"),Xe(Ke,Pt,Et))}function mt(Ke,Pt,Et){return Ke=="string"?St:Ke=="word"&&Me.allowUnquoted?(ot="string",Xe):(ot="error",Xe(Ke,Pt,Et))}function St(Ke,Pt,Et){return Ke=="string"?St:Xe(Ke,Pt,Et)}return{startState:function(Ke){var Pt={tokenize:Oe,state:qe,indented:Ke||0,tagName:null,tagStart:null,context:null};return Ke!=null&&(Pt.baseIndent=Ke),Pt},token:function(Ke,Pt){if(!Pt.tagName&&Ke.sol()&&(Pt.indented=Ke.indentation()),Ke.eatSpace())return null;Te=null;var Et=Pt.tokenize(Ke,Pt);return(Et||Te)&&Et!="comment"&&(ot=null,Pt.state=Pt.state(Te||Et,Ke,Pt),ot&&(Et=ot=="error"?Et+" error":ot)),Et},indent:function(Ke,Pt,Et){var Yt=Ke.context;if(Ke.tokenize.isInAttribute)return Ke.tagStart==Ke.indented?Ke.stringStartCol+1:Ke.indented+Se;if(Yt&&Yt.noIndent)return se.Pass;if(Ke.tokenize!=st&&Ke.tokenize!=Oe)return Et?Et.match(/^(\s*)/)[0].length:0;if(Ke.tagName)return Me.multilineTagIndentPastTag!==!1?Ke.tagStart+Ke.tagName.length+2:Ke.tagStart+Se*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(Pt))return 0;var at=Pt&&/^<(\/)?([\w_:\.-]*)/.exec(Pt);if(at&&at[1])for(;Yt;)if(Yt.tagName==at[2]){Yt=Yt.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(Yt.tagName))Yt=Yt.prev;else break;else if(at)for(;Yt;){var Vt=Me.contextGrabbers[Yt.tagName];if(Vt&&Vt.hasOwnProperty(at[2]))Yt=Yt.prev;else break}for(;Yt&&Yt.prev&&!Yt.startOfLine;)Yt=Yt.prev;return Yt?Yt.indent+Se:Ke.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(Ke){Ke.state==mt&&(Ke.state=Xe)},xmlCurrentTag:function(Ke){return Ke.tagName?{name:Ke.tagName,close:Ke.type=="closeTag"}:null},xmlCurrentContext:function(Ke){for(var Pt=[],Et=Ke.context;Et;Et=Et.prev)Et.tagName&&Pt.push(Et.tagName);return Pt.reverse()}}}),se.defineMIME("text/xml","xml"),se.defineMIME("application/xml","xml"),se.mimeModes.hasOwnProperty("text/html")||se.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(bn,Zt,le){"use strict";le.d(Zt,{hP:function(){return yn}});var se=function(Ae,ce){return(se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,pe){ue.__proto__=pe}||function(ue,pe){for(var he in pe)Object.prototype.hasOwnProperty.call(pe,he)&&(ue[he]=pe[he])})(Ae,ce)};function Be(Ae,ce){function ue(){this.constructor=Ae}se(Ae,ce),Ae.prototype=ce===null?Object.create(ce):(ue.prototype=ce.prototype,new ue)}function Ne(Ae,ce,ue,pe){return new(ue||(ue=Promise))(function(he,oe){function Ie($t){try{Lt(pe.next($t))}catch(Kt){oe(Kt)}}function Qe($t){try{Lt(pe.throw($t))}catch(Kt){oe(Kt)}}function Lt($t){var Kt;$t.done?he($t.value):(Kt=$t.value,Kt instanceof ue?Kt:new ue(function(en){en(Kt)})).then(Ie,Qe)}Lt((pe=pe.apply(Ae,ce||[])).next())})}function Ye(Ae,ce){var ue,pe,he,oe,Ie={label:0,sent:function(){if(1&he[0])throw he[1];return he[1]},trys:[],ops:[]};return oe={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Qe(Lt){return function($t){return function(Kt){if(ue)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(ue=1,pe&&(he=2&Kt[0]?pe.return:Kt[0]?pe.throw||((he=pe.return)&&he.call(pe),0):pe.next)&&!(he=he.call(pe,Kt[1])).done)return he;switch(pe=0,he&&(Kt=[2&Kt[0],he.value]),Kt[0]){case 0:case 1:he=Kt;break;case 4:return Ie.label++,{value:Kt[1],done:!1};case 5:Ie.label++,pe=Kt[1],Kt=[0];continue;case 7:Kt=Ie.ops.pop(),Ie.trys.pop();continue;default:if(he=Ie.trys,!((he=he.length>0&&he[he.length-1])||Kt[0]!==6&&Kt[0]!==2)){Ie=0;continue}if(Kt[0]===3&&(!he||Kt[1]>he[0]&&Kt[1]<he[3])){Ie.label=Kt[1];break}if(Kt[0]===6&&Ie.label<he[1]){Ie.label=he[1],he=Kt;break}if(he&&Ie.label<he[2]){Ie.label=he[2],Ie.ops.push(Kt);break}he[2]&&Ie.ops.pop(),Ie.trys.pop();continue}Kt=ce.call(Ae,Ie)}catch(en){Kt=[6,en],pe=0}finally{ue=he=0}if(5&Kt[0])throw Kt[1];return{value:Kt[0]?Kt[1]:void 0,done:!0}}([Lt,$t])}}}function ve(){for(var Ae=0,ce=0,ue=arguments.length;ce<ue;ce++)Ae+=arguments[ce].length;var pe=Array(Ae),he=0;for(ce=0;ce<ue;ce++)for(var oe=arguments[ce],Ie=0,Qe=oe.length;Ie<Qe;Ie++,he++)pe[he]=oe[Ie];return pe}var Se=function(){function Ae(){}return Ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ae.setAttributes=function(ce,ue){for(var pe=0,he=ue;pe<he.length;pe++){var oe=he[pe],Ie=oe[0],Qe=oe[1];ce.setAttribute(Ie,Qe)}},Ae.createRect=function(ce,ue,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","rect");return he.setAttribute("width",ce.toString()),he.setAttribute("height",ue.toString()),pe&&Ae.setAttributes(he,pe),he},Ae.createLine=function(ce,ue,pe,he,oe){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",ce.toString()),Ie.setAttribute("y1",ue.toString()),Ie.setAttribute("x2",pe.toString()),Ie.setAttribute("y2",he.toString()),oe&&Ae.setAttributes(Ie,oe),Ie},Ae.createPolygon=function(ce,ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return pe.setAttribute("points",ce),ue&&Ae.setAttributes(pe,ue),pe},Ae.createCircle=function(ce,ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","circle");return pe.setAttribute("cx",(ce/2).toString()),pe.setAttribute("cy",(ce/2).toString()),pe.setAttribute("r",ce.toString()),ue&&Ae.setAttributes(pe,ue),pe},Ae.createEllipse=function(ce,ue,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return he.setAttribute("cx",(ce/2).toString()),he.setAttribute("cy",(ue/2).toString()),he.setAttribute("rx",(ce/2).toString()),he.setAttribute("ry",(ue/2).toString()),pe&&Ae.setAttributes(he,pe),he},Ae.createGroup=function(ce){var ue=document.createElementNS("http://www.w3.org/2000/svg","g");return ce&&Ae.setAttributes(ue,ce),ue},Ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ae.createMarker=function(ce,ue,pe,he,oe,Ie,Qe){var Lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ae.setAttributes(Lt,[["id",ce],["orient",ue],["markerWidth",pe.toString()],["markerHeight",he.toString()],["refX",oe.toString()],["refY",Ie.toString()]]),Lt.appendChild(Qe),Lt},Ae.createText=function(ce){var ue=document.createElementNS("http://www.w3.org/2000/svg","text");return ue.setAttribute("x","0"),ue.setAttribute("y","0"),ce&&Ae.setAttributes(ue,ce),ue},Ae.createTSpan=function(ce,ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return pe.textContent=ce,ue&&Ae.setAttributes(pe,ue),pe},Ae.createImage=function(ce){var ue=document.createElementNS("http://www.w3.org/2000/svg","image");return ce&&Ae.setAttributes(ue,ce),ue},Ae.createPoint=function(ce,ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return pe.x=ce,pe.y=ue,pe},Ae.createPath=function(ce,ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","path");return pe.setAttribute("d",ce),ue&&Ae.setAttributes(pe,ue),pe},Ae}(),Me=function(){function Ae(){}return Ae.addKey=function(ce){Ae.key=ce},Object.defineProperty(Ae,"isLicensed",{get:function(){return!!Ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ae.key)},enumerable:!1,configurable:!0}),Ae}(),we=function(){function Ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ae.prototype.rasterize=function(ce,ue,pe){var he=this;return new Promise(function(oe){var Ie=pe!==void 0?pe:document.createElement("canvas");ce===null&&(he.markersOnly=!0,he.naturalSize=!1);var Qe=document.createElementNS("http://www.w3.org/2000/svg","svg");Qe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Qe.setAttribute("width",ue.width.baseVal.valueAsString),Qe.setAttribute("height",ue.height.baseVal.valueAsString),Qe.setAttribute("viewBox","0 0 "+ue.viewBox.baseVal.width.toString()+" "+ue.viewBox.baseVal.height.toString()),Qe.innerHTML=ue.innerHTML,he.naturalSize===!0?(Qe.width.baseVal.value=ce.naturalWidth,Qe.height.baseVal.value=ce.naturalHeight):he.width!==void 0&&he.height!==void 0&&(Qe.width.baseVal.value=he.width,Qe.height.baseVal.value=he.height),Ie.width=Qe.width.baseVal.value,Ie.height=Qe.height.baseVal.value;var Lt=Qe.outerHTML,$t=Ie.getContext("2d");he.markersOnly!==!0&&$t.drawImage(ce,0,0,Ie.width,Ie.height);var Kt=window.URL,en=new Image(Ie.width,Ie.height);en.setAttribute("crossOrigin","anonymous");var Jt=new Blob([Lt],{type:"image/svg+xml"}),et=Kt.createObjectURL(Jt);en.onload=function(){$t.drawImage(en,0,0),Kt.revokeObjectURL(et);var wt=Ie.toDataURL(he.imageType,he.imageQuality);oe(wt)},en.src=et})},Ae}(),me=function(){},Te=function(){function Ae(ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ce+"_"}return Object.defineProperty(Ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ae.prototype.addClass=function(ce){return this.styleSheet===void 0&&this.addStyleSheet(),ce.name=""+this.classNamePrefix+ce.localName,this.classes.push(ce),this.styleSheet.sheet.insertRule("."+ce.name+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length),ce},Ae.prototype.addRule=function(ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ce),this.styleSheet.sheet.insertRule(ce.selector+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length)},Ae.prototype.addStyleSheet=function(){var ce;this.styleSheet=document.createElement("style"),((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).appendChild(this.styleSheet),this.addRule(new ot("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ot("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ot("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Oe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Oe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Ae.prototype.removeStyleSheet=function(){var ce;this.styleSheet&&(((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ae}(),ot=function(Ae,ce){this.selector=Ae,this.style=ce},Oe=function(Ae,ce){this.localName=Ae,this.style=ce},st=function(){function Ae(ce,ue,pe,he,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ce,this.displayMode=ue,this.markerItems=pe,this.uiStyleSettings=he,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ae.prototype.show=function(ce){var ue=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ce,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var pe=document.createElement("div");pe.className=this.toolbarBlockStyleClass.name,pe.style.whiteSpace="nowrap",this.uiContainer.appendChild(pe),this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Ie=document.createElement("div");Ie.className=""+ue.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",oe.typeName),Ie.innerHTML=oe.icon,Ie.addEventListener("click",function(){ue.markerToolbarButtonClicked(Ie,oe)}),ue.buttons.push(Ie),ue.markerButtons.push(Ie)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var he=document.createElement("div");he.className=this.toolbarBlockStyleClass.name,he.style.whiteSpace="nowrap",he.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(he),this.addActionButton(he,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(he,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ae.prototype.addButtonClickListener=function(ce){this.buttonClickListeners.push(ce)},Ae.prototype.removeButtonClickListener=function(ce){this.buttonClickListeners.indexOf(ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ce),1)},Ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ce=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ue=0;ue<this.markerButtons.length;ue++)ue<ce||ue===ce&&this.markerButtons.length-1===ce?this.markerButtonBlock.appendChild(this.markerButtons[ue]):(ue===ce&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ue]))}},Ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Ae.prototype.resetButtonStyles=function(){var ce=this;this.buttons.forEach(function(ue){ue.className=ue.className.replace(ce.uiStyleSettings.toolbarButtonStyleColorsClassName?ce.uiStyleSettings.toolbarButtonStyleColorsClassName:ce.toolbarButtonStyleColorsClass.name,"").trim(),ue.className=ue.className.replace(ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),ue.className+=" "+(ce.uiStyleSettings.toolbarButtonStyleColorsClassName?ce.uiStyleSettings.toolbarButtonStyleColorsClassName:ce.toolbarButtonStyleColorsClass.name)})},Ae.prototype.addActionButton=function(ce,ue,pe){var he=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=ue,oe.setAttribute("data-action",pe),oe.addEventListener("click",function(){he.actionToolbarButtonClicked(oe,pe)}),pe){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}ce.appendChild(oe),this.buttons.push(oe)},Ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Oe("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Oe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Oe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Oe("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Oe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Oe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ce)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ce)+`px;
|
|
|
padding: `+ce+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ot("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ot("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Ae.prototype.markerToolbarButtonClicked=function(ce,ue){this.setActiveButton(ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("marker",ue)}),this.markerButtonOverflowBlock.style.display="none"},Ae.prototype.actionToolbarButtonClicked=function(ce,ue){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("action",ue)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ae.prototype.setActiveButton=function(ce){this.resetButtonStyles(),ce.className=ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ae.prototype.setActiveMarkerButton=function(ce){var ue=this.markerButtons.find(function(pe){return pe.getAttribute("data-type-name")===ce});ue&&this.setActiveButton(ue)},Ae.prototype.setCurrentMarker=function(ce){var ue=this;this.currentMarker=ce,this.buttons.filter(function(pe){return/delete|notes/.test(pe.getAttribute("data-action"))}).forEach(function(pe){ue.currentMarker===void 0?(pe.style.fillOpacity="0.4",pe.style.pointerEvents="none"):(pe.style.fillOpacity="1",pe.style.pointerEvents="all")})},Ae}(),lt=function(){function Ae(ce,ue,pe,he){this.panels=[],this.panelButtons=[],this.markerjsContainer=ce,this.displayMode=ue,this.uiStyleSettings=pe,this.styles=he,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ae.prototype.addStyles=function(){var ce;this.toolboxStyleClass=this.styles.addClass(new Oe("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Oe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var ue=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Oe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Oe("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ce!==void 0?ce:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Oe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ot("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ot("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Ae.prototype.show=function(ce){var ue;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ce,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ue=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ue!==void 0?ue:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ae.prototype.setPanelButtons=function(ce){var ue,pe,he=this;this.panels=ce,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ue=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ue!==void 0?ue:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((pe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&pe!==void 0?pe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ie;oe.uiStyleSettings=he.uiStyleSettings;var Qe=document.createElement("div");Qe.className=he.toolboxButtonStyleClass.name+" "+((Ie=he.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:he.toolboxButtonStyleColorsClass.name),Qe.innerHTML=oe.icon,Qe.title=oe.title,Qe.addEventListener("click",function(){he.panelButtonClick(oe)}),he.panelButtons.push(Qe),he.buttonRow.appendChild(Qe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ae.prototype.panelButtonClick=function(ce){var ue=this,pe=-1;if(ce!==this.activePanel){pe=this.panels.indexOf(ce),this.panelRow.innerHTML="";var he=ce.getUi();he.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(he),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=ce}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ue.displayMode==="inline"?ue.panelRow.style.display="none":ue.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ie){var Qe,Lt;oe.className=ue.toolboxButtonStyleClass.name+" "+(Ie===pe?""+((Qe=ue.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:ue.toolboxActiveButtonStyleColorsClass.name):""+((Lt=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Lt!==void 0?Lt:ue.toolboxButtonStyleColorsClass.name))})},Ae}(),Je=function(Ae,ce){this.title=Ae,this.icon=ce},Ge=function(Ae){function ce(ue,pe,he,oe){var Ie=Ae.call(this,ue,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ie.colors=[],Ie.addTransparent=!1,Ie.colorBoxes=[],Ie.colors=pe,Ie.currentColor=he,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return Be(ce,Ae),ce.prototype.getUi=function(){var ue=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.whiteSpace="nowrap",this.colors.forEach(function(he){var oe=ue.getColorBox(he);pe.appendChild(oe),ue.colorBoxes.push(oe)}),pe},ce.prototype.getColorBox=function(ue){var pe=this,he=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-he,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=oe-2+"px",Ie.style.height=oe-2+"px",Ie.style.padding="1px",Ie.style.marginRight="2px",Ie.style.marginBottom="2px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderRadius=(oe+2)/2+"px",Ie.style.borderColor=ue===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){pe.setCurrentColor(ue,Ie)});var Qe=document.createElement("div");return Qe.style.display="inline-block",Qe.style.width=oe-2+"px",Qe.style.height=oe-2+"px",Qe.style.backgroundColor=ue,Qe.style.borderRadius=oe/2+"px",ue==="transparent"&&(Qe.style.fill=this.uiStyleSettings.toolboxAccentColor,Qe.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Ie.appendChild(Qe),Ie},ce.prototype.setCurrentColor=function(ue,pe){var he=this;this.currentColor=ue,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ue)},ce}(Je),Ce=function(){function Ae(ce,ue,pe){this._state="new",this._isSelected=!1,this._container=ce,this._overlayContainer=ue,this.globalSettings=pe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ae.prototype.ownsTarget=function(ce){return!1},Object.defineProperty(Ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ae.prototype.pointerDown=function(ce,ue){},Ae.prototype.dblClick=function(ce,ue){},Ae.prototype.manipulate=function(ce){},Ae.prototype.pointerUp=function(ce){this.stateChanged()},Ae.prototype.dispose=function(){},Ae.prototype.addMarkerVisualToContainer=function(ce){this.container.childNodes.length>0?this.container.insertBefore(ce,this.container.childNodes[0]):this.container.appendChild(ce)},Ae.prototype.getState=function(){return{typeName:Ae.typeName,state:this.state,notes:this.notes}},Ae.prototype.restoreState=function(ce){this._state=ce.state,this.notes=ce.notes},Ae.prototype.scale=function(ce,ue){},Ae.prototype.colorChanged=function(ce){this.onColorChanged&&this.onColorChanged(ce),this.stateChanged()},Ae.prototype.fillColorChanged=function(ce){this.onFillColorChanged&&this.onFillColorChanged(ce),this.stateChanged()},Ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ce)&&this.onStateChanged(this)}},Ae.typeName="MarkerBase",Ae}(),pt=function(){function Ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ae.prototype.findGripByVisual=function(ce){return this.topLeft.ownsTarget(ce)?this.topLeft:this.topCenter.ownsTarget(ce)?this.topCenter:this.topRight.ownsTarget(ce)?this.topRight:this.centerLeft.ownsTarget(ce)?this.centerLeft:this.centerRight.ownsTarget(ce)?this.centerRight:this.bottomLeft.ownsTarget(ce)?this.bottomLeft:this.bottomCenter.ownsTarget(ce)?this.bottomCenter:this.bottomRight.ownsTarget(ce)?this.bottomRight:void 0},Ae}(),zt=function(){function Ae(){this.GRIP_SIZE=10,this.visual=Se.createGroup(),this.visual.appendChild(Se.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Se.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ae.prototype.ownsTarget=function(ce){return ce===this.visual||ce===this.visual.childNodes[0]||ce===this.visual.childNodes[1]},Ae}(),qe=function(){function Ae(){}return Ae.toITransformMatrix=function(ce){return{a:ce.a,b:ce.b,c:ce.c,d:ce.d,e:ce.e,f:ce.f}},Ae.toSVGMatrix=function(ce,ue){return ce.a=ue.a,ce.b=ue.b,ce.c=ue.c,ce.d=ue.d,ce.e=ue.e,ce.f=ue.f,ce},Ae}(),ut=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(Se.createTransform()),oe.setupControlBox(),oe}return Be(ce,Ae),Object.defineProperty(ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"visual",{get:function(){return this._visual},set:function(ue){this._visual=ue;var pe=Se.createTransform();this._visual.transform.baseVal.appendItem(pe)},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(ue){return!!Ae.prototype.ownsTarget.call(this,ue)||!!(this.controlGrips.findGripByVisual(ue)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ue))},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.state==="new"&&(this.left=ue.x,this.top=ue.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var he=this.unrotatePoint(ue);if(this.manipulationStartX=he.x,this.manipulationStartY=he.y,this.offsetX=he.x-this.left,this.offsetY=he.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(pe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(pe)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ie=this.container.transform.baseVal.getItem(0);Ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ce.prototype.pointerUp=function(ue){var pe=this.state;Ae.prototype.pointerUp.call(this,ue),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ue),this._state="select",pe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ce.prototype.moveVisual=function(ue){this.visual.style.transform="translate("+ue.x+"px, "+ue.y+"px)"},ce.prototype.manipulate=function(ue){var pe=this.unrotatePoint(ue);this.state==="creating"?this.resize(ue):this.state==="move"?(this.left=this.manipulationStartLeft+(pe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(pe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(pe):this.state==="rotate"&&this.rotate(ue)},ce.prototype.resize=function(ue){var pe=this.manipulationStartLeft,he=this.manipulationStartWidth,oe=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:pe=this.manipulationStartLeft+ue.x-this.manipulationStartX,he=this.manipulationStartWidth+this.manipulationStartLeft-pe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:he=this.manipulationStartWidth+ue.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+ue.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ie=this.manipulationStartHeight+ue.y-this.manipulationStartY}he>=0?(this.left=pe,this.width=he):(this.left=pe+he,this.width=-he),Ie>=0?(this.top=oe,this.height=Ie):(this.top=oe+Ie,this.height=-Ie),this.setSize()},ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ce.prototype.rotate=function(ue){if(Math.abs(ue.x-this.centerX)>.1){var pe=Math.sign(ue.x-this.centerX);this.rotationAngle=180*Math.atan((ue.y-this.centerY)/(ue.x-this.centerX))/Math.PI+90*pe,this.applyRotation()}},ce.prototype.applyRotation=function(){var ue=this.container.transform.baseVal.getItem(0);ue.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ue,0)},ce.prototype.rotatePoint=function(ue){if(this.rotationAngle===0)return ue;var pe=this.container.getCTM(),he=Se.createPoint(ue.x,ue.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},ce.prototype.unrotatePoint=function(ue){if(this.rotationAngle===0)return ue;var pe=this.container.getCTM();pe=pe.inverse();var he=Se.createPoint(ue.x,ue.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},ce.prototype.select=function(){Ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ce.prototype.deselect=function(){Ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ce.prototype.setupControlBox=function(){this.controlBox=Se.createGroup();var ue=Se.createTransform();ue.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ue),this.container.appendChild(this.controlBox),this.controlRect=Se.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=Se.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new pt,this.addControlGrips(),this.controlBox.style.display="none"},ce.prototype.adjustControlBox=function(){var ue=this.controlBox.transform.baseVal.getItem(0);ue.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ue,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},ce.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},ce.prototype.createGrip=function(){var ue=new zt;return ue.visual.transform.baseVal.appendItem(Se.createTransform()),this.controlBox.appendChild(ue.visual),ue},ce.prototype.positionGrips=function(){var ue=this.controlGrips.topLeft.GRIP_SIZE,pe=-ue/2,he=pe,oe=(this.width+this.CB_DISTANCE)/2-ue/2,Ie=(this.height+this.CB_DISTANCE)/2-ue/2,Qe=this.height+this.CB_DISTANCE-ue/2,Lt=this.width+this.CB_DISTANCE-ue/2;this.positionGrip(this.controlGrips.topLeft.visual,pe,he),this.positionGrip(this.controlGrips.topCenter.visual,oe,he),this.positionGrip(this.controlGrips.topRight.visual,Lt,he),this.positionGrip(this.controlGrips.centerLeft.visual,pe,Ie),this.positionGrip(this.controlGrips.centerRight.visual,Lt,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,pe,Qe),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Qe),this.positionGrip(this.controlGrips.bottomRight.visual,Lt,Qe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,he-3*this.CB_DISTANCE)},ce.prototype.positionGrip=function(ue,pe,he){var oe=ue.transform.baseVal.getItem(0);oe.setTranslate(pe,he),ue.transform.baseVal.replaceItem(oe,0)},ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ce.prototype.showControlBox=function(){this.controlBox.style.display=""},ce.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ae.prototype.getState.call(this))},ce.prototype.restoreState=function(ue){Ae.prototype.restoreState.call(this,ue);var pe=ue;this.left=pe.left,this.top=pe.top,this.width=pe.width,this.height=pe.height,this.rotationAngle=pe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,pe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,pe.containerTransformMatrix))},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe);var he=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:he.x*ue,y:he.y*pe});this.left=oe.x,this.top=oe.y,this.width=this.width*ue,this.height=this.height*pe,this.adjustControlBox()},ce}(Ce),xe=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.visual)},ce.prototype.createVisual=function(){this.visual=Se.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(ue),this._state="creating")},ce.prototype.manipulate=function(ue){Ae.prototype.manipulate.call(this,ue)},ce.prototype.resize=function(ue){Ae.prototype.resize.call(this,ue),this.setSize()},ce.prototype.setSize=function(){Ae.prototype.setSize.call(this),Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ce.prototype.pointerUp=function(ue){Ae.prototype.pointerUp.call(this,ue),this.setSize()},ce.prototype.setStrokeColor=function(ue){this.strokeColor=ue,this.visual&&Se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ue),this.stateChanged()},ce.prototype.setFillColor=function(ue){this.fillColor=ue,this.visual&&Se.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ce.prototype.setStrokeWidth=function(ue){this.strokeWidth=ue,this.visual&&Se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(ue){this.strokeDasharray=ue,this.visual&&Se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ce.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ae.prototype.getState.call(this))},ce.prototype.restoreState=function(ue){var pe=ue;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),Ae.prototype.restoreState.call(this,ue),this.setSize()},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.setSize()},ce.title="Rectangle marker",ce}(ut),Ee=function(Ae){function ce(ue,pe,he,oe){var Ie=Ae.call(this,ue,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ie.widths=[],Ie.widthBoxes=[],Ie.widths=pe,Ie.currentWidth=he,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return Be(ce,Ae),ce.prototype.getUi=function(){var ue=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.widths.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===ue.currentWidth?ue.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){ue.setCurrentWidth(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.innerText=he.toString(),Ie.style.marginRight="5px",oe.appendChild(Ie);var Qe=document.createElement("div");Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.display="flex",Qe.style.alignItems="center";var Lt=document.createElement("hr");Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop=he+"px solid "+ue.uiStyleSettings.toolboxColor,Lt.style.flexGrow="2",Qe.appendChild(Lt),oe.appendChild(Qe),ue.widthBoxes.push(oe)}),pe},ce.prototype.setCurrentWidth=function(ue,pe){var he=this;this.currentWidth=ue,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ce}(Je),Ve=function(Ae){function ce(ue,pe,he,oe){var Ie=Ae.call(this,ue,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ie.styles=[],Ie.styleBoxes=[],Ie.styles=pe,Ie.currentStyle=he,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return Be(ce,Ae),ce.prototype.getUi=function(){var ue=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.styles.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/ue.styles.length-5+"%",oe.style.borderColor=he===ue.currentStyle?ue.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){ue.setCurrentStyle(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var Qe=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ue.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(he!==""?'stroke-dasharray="'+he+'"':"")+` />
|
|
|
</svg>`;Ie.innerHTML=Qe,oe.appendChild(Ie),ue.styleBoxes.push(oe)}),pe},ce.prototype.setCurrentStyle=function(ue,pe){var he=this;this.currentStyle=ue,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ce}(Je),Xe=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new Ge("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Ee("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ve("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Be(ce,Ae),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Ae.prototype.getState.call(this);return ue.typeName=ce.typeName,ue},ce.typeName="FrameMarker",ce.title="Frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ce}(xe),Mt=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},mt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!!Ae.prototype.ownsTarget.call(this,ue)||!(!this.grip1.ownsTarget(ue)&&!this.grip2.ownsTarget(ue))},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.state==="new"&&(this.x1=ue.x,this.y1=ue.y,this.x2=ue.x,this.y2=ue.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(pe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(pe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ce.prototype.pointerUp=function(ue){var pe=this.state;Ae.prototype.pointerUp.call(this,ue),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(ue),this._state="select",pe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ce.prototype.adjustVisual=function(){},ce.prototype.manipulate=function(ue){this.state==="creating"?this.resize(ue):this.state==="move"?(this.x1=this.manipulationStartX1+ue.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ue.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ue.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ue.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ue)},ce.prototype.resize=function(ue){switch(this.activeGrip){case this.grip1:this.x1=ue.x,this.y1=ue.y;break;case this.grip2:case void 0:this.x2=ue.x,this.y2=ue.y}this.adjustVisual(),this.adjustControlBox()},ce.prototype.select=function(){Ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ce.prototype.deselect=function(){Ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ce.prototype.setupControlBox=function(){this.controlBox=Se.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ce.prototype.adjustControlBox=function(){this.positionGrips()},ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ce.prototype.createGrip=function(){var ue=new zt;return ue.visual.transform.baseVal.appendItem(Se.createTransform()),this.controlBox.appendChild(ue.visual),ue},ce.prototype.positionGrips=function(){var ue=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ue/2,this.y1-ue/2),this.positionGrip(this.grip2.visual,this.x2-ue/2,this.y2-ue/2)},ce.prototype.positionGrip=function(ue,pe,he){var oe=ue.transform.baseVal.getItem(0);oe.setTranslate(pe,he),ue.transform.baseVal.replaceItem(oe,0)},ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ae.prototype.getState.call(this))},ce.prototype.restoreState=function(ue){Ae.prototype.restoreState.call(this,ue);var pe=ue;this.x1=pe.x1,this.y1=pe.y1,this.x2=pe.x2,this.y2=pe.y2},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.x1=this.x1*ue,this.y1=this.y1*pe,this.x2=this.x2*ue,this.y2=this.y2*pe,this.adjustVisual(),this.adjustControlBox()},ce}(Ce),St=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new Ge("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Ee("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ve("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.visual&&ue!==this.selectorLine&&ue!==this.visibleLine)},ce.prototype.createVisual=function(){this.visual=Se.createGroup(),this.selectorLine=Se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ce.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Se.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Se.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Se.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ce.prototype.setStrokeColor=function(ue){this.strokeColor=ue,this.adjustVisual(),this.colorChanged(ue)},ce.prototype.setStrokeWidth=function(ue){this.strokeWidth=ue,this.adjustVisual()},ce.prototype.setStrokeDasharray=function(ue){this.strokeDasharray=ue,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){Ae.prototype.restoreState.call(this,ue);var pe=ue;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.createVisual(),this.adjustVisual()},ce.typeName="LineMarker",ce.title="Line marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ce}(mt),Ke=function(Ae){function ce(ue,pe,he,oe){var Ie=Ae.call(this,ue,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ie.fonts=[],Ie.fontBoxes=[],Ie.fonts=pe,Ie.currentFont=he,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return Be(ce,Ae),ce.prototype.getUi=function(){var ue=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.flexGrow="2",this.fonts.forEach(function(he){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/ue.fonts.length-5+"%",oe.style.borderColor=he===ue.currentFont?ue.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){ue.setCurrentFont(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.fontFamily=he,Ie.style.overflow="hidden";var Qe=document.createElement("div");Qe.style.whiteSpace="nowrap",Qe.style.overflow="hidden",Qe.style.textOverflow="ellipsis",Qe.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(Qe),oe.appendChild(Ie),ue.fontBoxes.push(oe)}),pe},ce.prototype.setCurrentFont=function(ue,pe){var he=this;this.currentFont=ue,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ce}(Je),Pt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=he.defaultColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new Ge("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Ke("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){if(Ae.prototype.ownsTarget.call(this,ue)||ue===this.visual||ue===this.textElement||ue===this.bgRectangle)return!0;var pe=!1;return this.textElement.childNodes.forEach(function(he){he===ue&&(pe=!0)}),pe},ce.prototype.createVisual=function(){this.visual=Se.createGroup(),this.bgRectangle=Se.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Se.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Se.createTransform()),this.textElement.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.isMoved=!1,this.pointerDownPoint=ue,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ue),this._state="creating")},ce.prototype.renderText=function(){var ue=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(pe){ue.textElement.appendChild(Se.createTSpan(pe.trim()===""?" ":pe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ce.prototype.getTextScale=function(){var ue=this.textElement.getBBox(),pe=1;if(ue.width>0&&ue.height>0){var he=(1*this.width-this.width*this.padding*2/100)/ue.width,oe=(1*this.height-this.height*this.padding*2/100)/ue.height;pe=Math.min(he,oe)}return pe},ce.prototype.getTextPosition=function(ue){var pe=this.textElement.getBBox(),he=0,oe=0;return pe.width>0&&pe.height>0&&(he=(this.width-pe.width*ue)/2,oe=this.height/2-pe.height*ue/2),{x:he,y:oe}},ce.prototype.sizeText=function(){var ue=this.textElement.getBBox(),pe=this.getTextScale(),he=this.getTextPosition(pe);he.y-=ue.y*pe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+he.x+"px, "+he.y+"px) scale("+pe+", "+pe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(he.x,he.y),this.textElement.transform.baseVal.getItem(1).setScale(pe,pe))},ce.prototype.manipulate=function(ue){Ae.prototype.manipulate.call(this,ue),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ue.x-this.pointerDownPoint.x)>5||Math.abs(ue.y-this.pointerDownPoint.y)>5)},ce.prototype.resize=function(ue){Ae.prototype.resize.call(this,ue),this.isMoved=!0,this.setSize(),this.sizeText()},ce.prototype.setSize=function(){Ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ce.prototype.pointerUp=function(ue){var pe=this.state;pe==="creating"&&(this._suppressMarkerCreateEvent=!0),Ae.prototype.pointerUp.call(this,ue),this.setSize(),(pe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ce.prototype.showTextEditor=function(){var ue=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(pe){pe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var pe=Number.parseFloat(ue.textEditor.style.fontSize);ue.textEditor.clientWidth>=Number.parseInt(ue.textEditor.style.maxWidth)&&pe>.9;)pe-=.1,ue.textEditor.style.fontSize=Math.max(pe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(pe){if(pe.clipboardData){var he=pe.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(he)),pe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ue.textEditDivClicked(ue.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ce.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ue=this.getTextScale(),pe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),he=this.textElement.getBBox(),oe={x:he.width*ue,y:he.height*ue};pe.x-=oe.x/2,pe.y-=oe.y/2,this.textEditor.style.top=pe.y+"px",this.textEditor.style.left=pe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-pe.x+"px",this.textEditor.style.fontSize=Math.max(16*ue,12)+"px",this.textElement.style.display="none"}},ce.prototype.textEditDivClicked=function(ue){this.text=ue.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ce.prototype.select=function(){Ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ae.prototype.deselect.call(this)},ce.prototype.dblClick=function(ue,pe){Ae.prototype.dblClick.call(this,ue,pe),this.showTextEditor()},ce.prototype.setColor=function(ue){this.textElement&&Se.setAttributes(this.textElement,[["fill",ue]]),this.color=ue,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ue)},ce.prototype.setFont=function(ue){this.textElement&&Se.setAttributes(this.textElement,[["font-family",ue]]),this.fontFamily=ue,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){var pe=ue;this.color=pe.color,this.fontFamily=pe.fontFamily,this.padding=pe.padding,this.text=pe.text,this.createVisual(),Ae.prototype.restoreState.call(this,ue),this.setSize()},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.setSize(),this.sizeText(),this.positionTextEditor()},ce.typeName="TextMarker",ce.title="Text marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',ce}(ut),Et=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=he.defaultColor,oe.lineWidth=he.defaultStrokeWidth,oe.pixelRatio=he.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new Ge("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new Ee("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.visual&&ue!==this.drawingImage)},ce.prototype.createVisual=function(){this.visual=Se.createGroup(),this.drawingImage=Se.createImage(),this.visual.appendChild(this.drawingImage);var ue=Se.createTransform();this.visual.transform.baseVal.appendItem(ue),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(ue,pe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(ue.x,ue.y),this.drawing=!0):Ae.prototype.pointerDown.call(this,ue,pe)},ce.prototype.manipulate=function(ue){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ue.x,ue.y),this.canvasContext.stroke()):Ae.prototype.manipulate.call(this,ue)},ce.prototype.resize=function(ue){Ae.prototype.resize.call(this,ue),Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ce.prototype.pointerUp=function(ue){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ae.prototype.pointerUp.call(this,ue)},ce.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ae.prototype.select.call(this)},ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ae.prototype.deselect.call(this)},ce.prototype.finishCreation=function(){for(var ue=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),pe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],he=pe[0],oe=pe[1],Ie=pe[2],Qe=pe[3],Lt=!1,$t=0;$t<this.canvasElement.height;$t++)for(var Kt=0;Kt<this.canvasElement.width;Kt++)ue.data[$t*this.canvasElement.width*4+4*Kt+3]>0&&(Lt=!0,$t<oe&&(oe=$t),Kt<he&&(he=Kt),$t>Qe&&(Qe=$t),Kt>Ie&&(Ie=Kt));if(Lt){this.left=he/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ie-he)/this.pixelRatio,this.height=(Qe-oe)/this.pixelRatio;var en=document.createElement("canvas");en.width=Ie-he,en.height=Qe-oe,en.getContext("2d").putImageData(this.canvasContext.getImageData(he,oe,Ie-he,Qe-oe),0,0),this.drawingImgUrl=en.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ce.prototype.setDrawingImage=function(){Se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ce.prototype.setColor=function(ue){this.color=ue,this.colorChanged(ue)},ce.prototype.setLineWidth=function(ue){this.lineWidth=ue},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({drawingImgUrl:this.drawingImgUrl},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){this.createVisual(),Ae.prototype.restoreState.call(this,ue),this.drawingImgUrl=ue.drawingImgUrl,this.setDrawingImage()},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.setDrawingImage()},ce.typeName="FreehandMarker",ce.title="Freehand marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',ce}(ut),Yt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,he||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=pe,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return Be(ce,Ae),ce.prototype.getUi=function(){var ue=this,pe=document.createElement("div");pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2";for(var he=function(Qe){var Lt="both";switch(Qe){case 0:Lt="both";break;case 1:Lt="start";break;case 2:Lt="end";break;case 3:Lt="none"}var $t=document.createElement("div");if($t.style.display="flex",$t.style.flexGrow="2",$t.style.alignItems="center",$t.style.justifyContent="space-between",$t.style.padding="5px",$t.style.borderWidth="2px",$t.style.borderStyle="solid",$t.style.borderColor=Lt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",$t.addEventListener("click",function(){ue.setCurrentType(Lt,$t)}),pe.appendChild($t),Lt==="both"||Lt==="start"){var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.alignItems="center",Kt.style.minHeight="20px",Kt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Kt.style.marginLeft="5px",$t.appendChild(Kt)}var en=document.createElement("div");en.style.display="flex",en.style.alignItems="center",en.style.minHeight="20px",en.style.flexGrow="2";var Jt=document.createElement("hr");if(Jt.style.minWidth="20px",Jt.style.border="0px",Jt.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Jt.style.flexGrow="2",en.appendChild(Jt),$t.appendChild(en),Lt==="both"||Lt==="end"){var et=document.createElement("div");et.style.display="flex",et.style.alignItems="center",et.style.minHeight="20px",et.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,et.style.marginRight="5px",$t.appendChild(et)}oe.typeBoxes.push($t)},oe=this,Ie=0;Ie<4;Ie++)he(Ie);return pe},ce.prototype.setCurrentType=function(ue,pe){var he=this;this.currentType=ue,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings!==void 0?he.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ce}(Je),at=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Yt("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.arrow1&&ue!==this.arrow2)},ce.prototype.getArrowPoints=function(ue,pe){var he=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return ue-he/2+","+(pe+oe/2)+" "+ue+","+(pe-oe/2)+" "+(ue+he/2)+","+(pe+oe/2)},ce.prototype.createTips=function(){this.arrow1=Se.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Se.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.arrow2)},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.state==="creating"&&this.createTips()},ce.prototype.adjustVisual=function(){if(Ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Se.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Se.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ue=0;Math.abs(this.x1-this.x2)>.1&&(ue=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var pe=this.arrow1.transform.baseVal.getItem(0);pe.setRotate(ue,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(pe,0);var he=this.arrow2.transform.baseVal.getItem(0);he.setRotate(ue+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(he,0)}},ce.prototype.setArrowType=function(ue){this.arrowType=ue,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({arrowType:this.arrowType},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){Ae.prototype.restoreState.call(this,ue);var pe=ue;this.arrowType=pe.arrowType,this.createTips(),this.adjustVisual()},ce.typeName="ArrowMarker",ce.title="Arrow marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ce}(St),Vt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.fillColor=he.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new Ge("Color",he.defaultColorSet,he.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return Be(ce,Ae),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Ae.prototype.getState.call(this);return ue.typeName=ce.typeName,ue},ce.typeName="CoverMarker",ce.title="Cover marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ce}(xe),fn=function(Ae){function ce(ue,pe,he,oe){var Ie=Ae.call(this,ue,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ie.opacities=[],Ie.opacityBoxes=[],Ie.opacities=pe,Ie.currentOpacity=he,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return Be(ce,Ae),ce.prototype.getUi=function(){var ue=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",pe.style.justifyContent="space-between",this.opacities.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===ue.currentOpacity?ue.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){ue.setCurrentOpacity(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.innerText=100*he+"%",oe.appendChild(Ie),ue.opacityBoxes.push(oe)}),pe},ce.prototype.setCurrentOpacity=function(ue,pe){var he=this;this.currentOpacity=ue,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ce}(Je),dn=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=he.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=he.defaultHighlightOpacity,oe.fillPanel=new Ge("Color",he.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new fn("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Be(ce,Ae),ce.prototype.setOpacity=function(ue){this.opacity=ue,this.visual&&Se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Ae.prototype.getState.call(this);return ue.typeName=ce.typeName,ue},ce.typeName="HighlightMarker",ce.title="Highlight marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',ce}(Vt),Ue='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Le='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Rt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=he.defaultStrokeColor,oe.bgColor=he.defaultFillColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new Ge("Text color",he.defaultColorSet,oe.color,Ue),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new Ge("Fill color",he.defaultColorSet,oe.bgColor,Le),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Ke("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new zt,oe.tipGrip.visual.transform.baseVal.appendItem(Se.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return Ae.prototype.ownsTarget.call(this,ue)||this.tipGrip.ownsTarget(ue)||this.tip===ue},ce.prototype.createTip=function(){Se.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Se.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ce.prototype.pointerDown=function(ue,pe){this.state==="new"&&Ae.prototype.pointerDown.call(this,ue,pe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(pe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ae.prototype.pointerDown.call(this,ue,pe)},ce.prototype.pointerUp=function(ue){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ae.prototype.pointerUp.call(this,ue);else{var pe=this.state==="creating";Ae.prototype.pointerUp.call(this,ue),this.setTipPoints(pe),this.positionTip()}},ce.prototype.manipulate=function(ue){if(this.tipMoving){var pe=this.unrotatePoint(ue);this.tipPosition={x:pe.x-this.manipulationStartLeft,y:pe.y-this.manipulationStartTop},this.positionTip()}else Ae.prototype.manipulate.call(this,ue)},ce.prototype.setBgColor=function(ue){this.bgRectangle&&this.tip&&(Se.setAttributes(this.bgRectangle,[["fill",ue]]),Se.setAttributes(this.tip,[["fill",ue]])),this.bgColor=ue,this.fillColorChanged(ue)},ce.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},ce.prototype.setTipPoints=function(ue){ue===void 0&&(ue=!1);var pe=Math.min(this.height/2,15),he=this.height/5;ue&&(this.tipPosition={x:pe+he/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:0},this.tipBase2Position={x:pe+he,y:0}):(this.tipBase1Position={x:0,y:pe},this.tipBase2Position={x:0,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:0},this.tipBase2Position={x:this.width-pe,y:0}):(this.tipBase1Position={x:this.width,y:pe},this.tipBase2Position={x:this.width,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:this.height},this.tipBase2Position={x:this.width-pe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-pe-he},this.tipBase2Position={x:this.width,y:this.height-pe}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:this.height},this.tipBase2Position={x:pe+he,y:this.height}):(this.tipBase1Position={x:0,y:this.height-pe},this.tipBase2Position={x:0,y:this.height-pe-he})},ce.prototype.resize=function(ue){Ae.prototype.resize.call(this,ue),this.positionTip()},ce.prototype.positionTip=function(){Se.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ue=this.tipGrip.visual.transform.baseVal.getItem(0);ue.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ue,0)},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.positionTip(),Ae.prototype.select.call(this)},ce.prototype.getState=function(){var ue=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){var pe=ue;this.bgColor=pe.bgColor,this.tipPosition=pe.tipPosition,Ae.prototype.restoreState.call(this,ue),this.createTip(),this.setTipPoints()},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.tipPosition={x:this.tipPosition.x*ue,y:this.tipPosition.y*pe},this.positionTip()},ce.typeName="CalloutMarker",ce.title="Callout marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',ce}(Pt),Sn=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new Ge("Line color",ve(he.defaultColorSet,["transparent"]),he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Ge("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new Ee("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ve("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new fn("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.visual)},ce.prototype.createVisual=function(){this.visual=Se.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(ue),this._state="creating")},ce.prototype.manipulate=function(ue){Ae.prototype.manipulate.call(this,ue)},ce.prototype.resize=function(ue){Ae.prototype.resize.call(this,ue),this.setSize()},ce.prototype.setSize=function(){Ae.prototype.setSize.call(this),Se.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ce.prototype.pointerUp=function(ue){Ae.prototype.pointerUp.call(this,ue),this.setSize()},ce.prototype.setStrokeColor=function(ue){this.strokeColor=ue,this.visual&&Se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ue),this.stateChanged()},ce.prototype.setFillColor=function(ue){this.fillColor=ue,this.visual&&Se.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ue),this.stateChanged()},ce.prototype.setStrokeWidth=function(ue){this.strokeWidth=ue,this.visual&&Se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(ue){this.strokeDasharray=ue,this.visual&&Se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ce.prototype.setOpacity=function(ue){this.opacity=ue,this.visual&&Se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){var pe=ue;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),Ae.prototype.restoreState.call(this,ue),this.setSize()},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.setSize()},ce.typeName="EllipseMarker",ce.title="Ellipse marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',ce}(ut),un=function(Ae){function ce(ue,pe,he){return Ae.call(this,ue,pe,he)||this}return Be(ce,Ae),Object.defineProperty(ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.tip1&&ue!==this.tip2)},ce.prototype.createTips=function(){this.tip1=Se.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Se.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.tip2)},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.state==="creating"&&this.createTips()},ce.prototype.adjustVisual=function(){if(Ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Se.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Se.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var ue=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),pe=this.tip1.transform.baseVal.getItem(0);pe.setRotate(ue,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(pe,0);var he=this.tip2.transform.baseVal.getItem(0);he.setRotate(ue+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(he,0)}},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Ae.prototype.getState.call(this);return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){Ae.prototype.restoreState.call(this,ue),this.createTips(),this.adjustVisual()},ce.typeName="MeasurementMarker",ce.title="Measurement marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',ce}(St),tt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.strokePanel.colors=he.defaultColorSet,oe.fillColor="transparent",oe}return Be(ce,Ae),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Ae.prototype.getState.call(this);return ue.typeName=ce.typeName,ue},ce.typeName="EllipseFrameMarker",ce.title="Ellipse frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',ce}(Sn),ft=function(){function Ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ae.prototype.addUndoStep=function(ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ce)||(this.undoStack.push(ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ce)&&this.redoStack.splice(0,this.redoStack.length))},Ae.prototype.replaceLastUndoStep=function(ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ce)},Ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ae.prototype.undo=function(){if(this.undoStack.length>1){var ce=this.undoStack.pop();return ce!==void 0&&this.redoStack.push(ce),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ae}(),Xt=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new Ge("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Ee("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ve("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.visual&&ue!==this.selectorCurve&&ue!==this.visibleCurve&&!this.curveGrip.ownsTarget(ue))},ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ce.prototype.createVisual=function(){this.visual=Se.createGroup(),this.selectorCurve=Se.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Se.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ue.x,this.curveY=ue.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(pe)&&(this.activeGrip=this.curveGrip,this._state="resize")},ce.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Se.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Se.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Se.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ce.prototype.setupControlBox=function(){Ae.prototype.setupControlBox.call(this),this.curveControlLine1=Se.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Se.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ae.prototype.addControlGrips.call(this)},ce.prototype.positionGrips=function(){Ae.prototype.positionGrips.call(this);var ue=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ue/2,this.curveY-ue/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},ce.prototype.manipulate=function(ue){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ue.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ue.y-this.manipulationStartY),Ae.prototype.manipulate.call(this,ue)},ce.prototype.resize=function(ue){this.activeGrip===this.curveGrip&&(this.curveX=ue.x,this.curveY=ue.y),Ae.prototype.resize.call(this,ue),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ce.prototype.setStrokeColor=function(ue){this.strokeColor=ue,this.adjustVisual(),this.colorChanged(ue)},ce.prototype.setStrokeWidth=function(ue){this.strokeWidth=ue,this.adjustVisual()},ce.prototype.setStrokeDasharray=function(ue){this.strokeDasharray=ue,this.adjustVisual()},ce.prototype.scale=function(ue,pe){this.curveX=this.curveX*ue,this.curveY=this.curveY*pe,Ae.prototype.scale.call(this,ue,pe)},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ae.prototype.getState.call(this));return ue.typeName=ce.typeName,ue},ce.prototype.restoreState=function(ue){Ae.prototype.restoreState.call(this,ue);var pe=ue;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.curveX=pe.curveX,this.curveY=pe.curveY,this.createVisual(),this.adjustVisual()},ce.typeName="CurveMarker",ce.title="Curve marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',ce}(mt),Tn=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.textColor=he.defaultStrokeColor,oe.fontFamily=he.defaultFontFamily,oe.fontSize=he.defaultCaptionFontSize,oe.captionText=he.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new Ge("Line color",ve(he.defaultColorSet,["transparent"]),oe.strokeColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Ge("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new Ee("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ve("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new Ke("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new Ge("Text color",he.defaultColorSet,oe.textColor,Ue),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return Be(ce,Ae),ce.prototype.ownsTarget=function(ue){return!(!Ae.prototype.ownsTarget.call(this,ue)&&ue!==this.visual&&ue!==this.frame&&ue!==this.captionBg&&ue!==this.captionElement)},ce.prototype.createVisual=function(){this.visual=Se.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Se.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Se.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Se.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},ce.prototype.setCaptionText=function(ue){this.captionText=ue,this.captionElement.textContent=this.captionText,this.sizeCaption()},ce.prototype.pointerDown=function(ue,pe){Ae.prototype.pointerDown.call(this,ue,pe),this.isMoved=!1,this.pointerDownPoint=ue,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ue),this._state="creating")},ce.prototype.manipulate=function(ue){Ae.prototype.manipulate.call(this,ue),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ue.x-this.pointerDownPoint.x)>5||Math.abs(ue.y-this.pointerDownPoint.y)>5)},ce.prototype.resize=function(ue){Ae.prototype.resize.call(this,ue),this.setSize()},ce.prototype.sizeCaption=function(){var ue=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ue.width+2*this.PADDING,this.captionBoxHeight=ue.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Se.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Se.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},ce.prototype.showTextEditor=function(){var ue=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(pe){pe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(pe){pe.key==="Enter"&&ue.finishTextEditing(ue.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ue.finishTextEditing(ue.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ue.finishTextEditing(ue.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ce.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},ce.prototype.finishTextEditing=function(ue){this.setCaptionText(ue.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ce.prototype.setFont=function(ue){this.captionElement&&Se.setAttributes(this.captionElement,[["font-family",ue]]),this.fontFamily=ue,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ce.prototype.setTextColor=function(ue){this.captionElement&&Se.setAttributes(this.captionElement,[["fill",ue]]),this.textColor=ue,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ce.prototype.setSize=function(){Ae.prototype.setSize.call(this),Se.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ce.prototype.pointerUp=function(ue){Ae.prototype.pointerUp.call(this,ue),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ce.prototype.dblClick=function(ue,pe){Ae.prototype.dblClick.call(this,ue,pe),this.showTextEditor()},ce.prototype.setStrokeColor=function(ue){this.strokeColor=ue,this.frame&&Se.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ue),this.stateChanged()},ce.prototype.setFillColor=function(ue){this.fillColor=ue,this.captionBg&&Se.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ue),this.stateChanged()},ce.prototype.setStrokeWidth=function(ue){this.strokeWidth=ue,this.frame&&Se.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(ue){this.strokeDasharray=ue,this.frame&&Se.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var ue=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Ae.prototype.getState.call(this));return ue.typeName=this.typeName,ue},ce.prototype.restoreState=function(ue){var pe=ue;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.textColor=pe.textColor,this.fontFamily=pe.fontFamily,this.captionText=pe.captionText,this.fontSize=pe.fontSize,this.createVisual(),Ae.prototype.restoreState.call(this,ue),this.setSize()},ce.prototype.scale=function(ue,pe){Ae.prototype.scale.call(this,ue,pe),this.setSize()},ce.typeName="CaptionFrameMarker",ce.title="Caption frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',ce}(ut),mn=function(){function Ae(ce,ue){ue===void 0&&(ue=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ce,this.cancelable=ue}return Object.defineProperty(Ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ae.prototype.preventDefault=function(){this._defaultPrevented=!0},Ae}(),Ut=function(Ae){function ce(ue,pe,he){var oe=Ae.call(this,ue,!1)||this;return oe.dataUrl=pe,oe.state=he,oe}return Be(ce,Ae),ce}(mn),jt=function(Ae){function ce(ue,pe,he){he===void 0&&(he=!1);var oe=Ae.call(this,ue,he)||this;return oe.marker=pe,oe}return Be(ce,Ae),ce}(mn),_n=function(){function Ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Ae.prototype.addEventListener=function(ce,ue){this[ce].push(ue)},Ae.prototype.removeEventListener=function(ce,ue){var pe=this[ce].indexOf(ue);pe>-1&&this[ce].splice(pe,1)},Ae}(),yn=function(){function Ae(ce){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Mt,this._isOpen=!1,this.undoRedoManager=new ft,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new _n,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ae.instanceCounter++,this.styles=new Te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ce,this.targetRoot=document.body,this.width=ce.clientWidth,this.height=ce.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[Xe,Et,at,Pt,tt,Sn,dn,Rt,un,Vt,St,Xt,Tn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Xe,Et,at,Pt,Sn,dn,Rt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Xe,Et,at,Pt,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ce){var ue=this;this._availableMarkerTypes.splice(0),ce.forEach(function(pe){if(typeof pe=="string"){var he=ue.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===pe});he!==void 0&&ue._availableMarkerTypes.push(he)}else ue._availableMarkerTypes.push(pe)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ce){this._zoomLevel=ce,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ae.prototype.show=function(){var ce=this;this.styles.styleSheetRoot===void 0&&me.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=me.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ue){return ue(new mn(ce))})},Ae.prototype.render=function(){return Ne(this,void 0,void 0,function(){var ce;return Ye(this,function(ue){switch(ue.label){case 0:return this.setCurrentMarker(),(ce=new we).naturalSize=this.renderAtNaturalSize,ce.imageType=this.renderImageType,ce.imageQuality=this.renderImageQuality,ce.markersOnly=this.renderMarkersOnly,ce.width=this.renderWidth,ce.height=this.renderHeight,[4,ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ue.sent(),[4,ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ue.sent()]}})})},Ae.prototype.close=function(ce){var ue=this;if(ce===void 0&&(ce=!1),this.isOpen){var pe=!1;ce||this.eventListeners.beforeclose.forEach(function(he){var oe=new mn(ue,!0);he(oe),oe.defaultPrevented&&(pe=!0)}),pe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(he){return he(new mn(ue))}),this.detachEvents(),this._isOpen=!1)}},Ae.prototype.addMarkersToToolbar=function(){for(var ce,ue=[],pe=0;pe<arguments.length;pe++)ue[pe]=arguments[pe];(ce=this._availableMarkerTypes).push.apply(ce,ue)},Ae.prototype.addRenderEventListener=function(ce){this.addEventListener("render",function(ue){ce(ue.dataUrl,ue.state)})},Ae.prototype.removeRenderEventListener=function(ce){},Ae.prototype.addCloseEventListener=function(ce){this.addEventListener("close",function(){ce()})},Ae.prototype.removeCloseEventListener=function(ce){},Ae.prototype.setupResizeObserver=function(){var ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ce.resize(ce.target.clientWidth,ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ae.prototype.onPopupTargetResize=function(){var ce=1*this.target.clientWidth/this.target.clientHeight,ue=this.editorCanvas.clientWidth/ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ce:this.editorCanvas.clientWidth,pe=ue<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ce;this.resize(ue,pe)},Ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ae.prototype.resize=function(ce,ue){this._isResizing=!0;var pe=ce/this.imageWidth,he=ue/this.imageHeight;this.imageWidth=Math.round(ce),this.imageHeight=Math.round(ue),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(pe,he),this._isResizing=!1},Ae.prototype.scaleMarkers=function(ce,ue){var pe,he=this;this._currentMarker&&this._currentMarker instanceof Pt?this._currentMarker.scale(ce,ue):(pe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==he._currentMarker&&oe.scale(ce,ue)}),pe!==void 0&&this.setCurrentMarker(pe)},Ae.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Ae.prototype.setTopLeft=function(){var ce=this.editingTarget.getBoundingClientRect(),ue=this.editorCanvas.getBoundingClientRect();this.left=ce.left-ue.left,this.top=ce.top-ue.top},Ae.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Ae.prototype.addDefs=function(){for(var ce,ue=[],pe=0;pe<arguments.length;pe++)ue[pe]=arguments[pe];this.defs=Se.createDefs(),this.addDefsToImage(),(ce=this.defs).append.apply(ce,ue)},Ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ae.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ae.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ae.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var ce=document.createElement("a");ce.href="https://markerjs.com/",ce.target="_blank",ce.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',ce.title="Powered by marker.js",ce.style.display="grid",ce.style.alignItems="center",ce.style.justifyItems="center",ce.style.padding="3px",ce.style.width="20px",ce.style.height="20px",this.logoUI.appendChild(ce),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var ce=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ce+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new st(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new lt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ae.prototype.removeMarker=function(ce){this.markerImage.removeChild(ce.container),this.markers.indexOf(ce)>-1&&this.markers.splice(this.markers.indexOf(ce),1),ce.dispose()},Ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Ae.prototype.toolbarButtonClicked=function(ce,ue){if(ce==="marker"&&ue!==void 0)this.createNewMarker(ue);else if(ce==="action")switch(ue){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Ae.prototype.deleteSelectedMarker=function(){var ce=this;if(this._currentMarker!==void 0){var ue=!1;if(this.eventListeners.markerbeforedelete.forEach(function(he){var oe=new jt(ce,ce._currentMarker,!0);he(oe),oe.defaultPrevented&&(ue=!0)}),!ue){var pe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(he){return he(new jt(ce,pe))})}}},Ae.prototype.clear=function(){var ce=this,ue=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var Qe=new jt(ce,void 0,!0);Ie(Qe),Qe.defaultPrevented&&(ue=!0)}),!ue)){this.setCurrentMarker();for(var pe=function(Ie){var Qe=he.markers[Ie];he.setCurrentMarker(he.markers[Ie]),he._currentMarker.dispose(),he.markerImage.removeChild(he._currentMarker.container),he.markers.splice(he.markers.indexOf(he._currentMarker),1),he.eventListeners.markerdelete.forEach(function(Lt){return Lt(new jt(ce,Qe))})},he=this,oe=this.markers.length-1;oe>=0;oe--)pe(oe);this.addUndoStep()}},Object.defineProperty(Ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ae.prototype.showNotesEditor=function(){var ce;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(ce=this._currentMarker.notes)!==null&&ce!==void 0?ce:"",this.overlayContainer.appendChild(this.notesArea))},Ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ae.prototype.addUndoStep=function(){var ce=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ue=this.getState(),pe=this.undoRedoManager.getLastUndoStep();if(!pe||pe.width===ue.width&&pe.height===ue.height){var he=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ue),he<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new mn(ce))})}else this.undoRedoManager.replaceLastUndoStep(ue),this.eventListeners.statechange.forEach(function(oe){return oe(new mn(ce))})}},Ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ae.prototype.undoStep=function(){var ce=this,ue=this.undoRedoManager.undo();ue!==void 0&&(this.restoreState(ue),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(pe){return pe(new mn(ce))}))},Ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ae.prototype.redoStep=function(){var ce=this,ue=this.undoRedoManager.redo();ue!==void 0&&(this.restoreState(ue),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(pe){return pe(new mn(ce))}))},Ae.prototype.stepZoom=function(){var ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ce<this.zoomSteps.length-1?this.zoomSteps[ce+1]:this.zoomSteps[0]},Ae.prototype.panTo=function(ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ce.x,top:this.prevPanPoint.y-ce.y}),this.prevPanPoint=ce},Ae.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var ce,ue,pe=this;return Ye(this,function(he){switch(he.label){case 0:return[4,this.render()];case 1:return ce=he.sent(),ue=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new Ut(pe,ce,ue))}),this.close(!0),[2]}})})},Ae.prototype.getState=function(ce){ce===!0&&this.setCurrentMarker();var ue={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(pe){return ue.markers.push(pe.getState())}),ue},Ae.prototype.restoreState=function(ce){var ue=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ce.markers.forEach(function(pe){var he=ue._availableMarkerTypes.find(function(Ie){return Ie.typeName===pe.typeName});if(he!==void 0){var oe=ue.addNewMarker(he);oe.restoreState(pe),ue.markers.push(oe)}}),ce.width&&ce.height&&(ce.width!==this.imageWidth||ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ce.width,this.imageHeight/ce.height),this.eventListeners.restorestate.forEach(function(pe){return pe(new mn(ue))})},Ae.prototype.addNewMarker=function(ce){var ue=Se.createGroup();return this.markerImage.appendChild(ue),new ce(ue,this.overlayContainer,this.settings)},Ae.prototype.createNewMarker=function(ce){var ue,pe=this;(ue=typeof ce=="string"?this._availableMarkerTypes.find(function(he){return he.typeName===ce}):ce)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ue),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(ue.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(he){return he(new jt(pe,pe._currentMarker))}))},Ae.prototype.markerCreated=function(ce){var ue=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ce),this.setCurrentMarker(ce),ce instanceof Et&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Et):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(pe){return pe(new jt(ue,ue._currentMarker))})},Ae.prototype.colorChanged=function(ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ce,this.settings.defaultStrokeColor=ce)},Ae.prototype.fillColorChanged=function(ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ce)},Ae.prototype.markerStateChanged=function(ce){var ue=this;this.eventListeners.markerchange.forEach(function(pe){return pe(new jt(ue,ce))})},Ae.prototype.setCurrentMarker=function(ce){var ue=this;this._currentMarker!==ce&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(pe){return pe(new jt(ue,ue._currentMarker))})),this._currentMarker=ce,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(pe){return pe(new jt(ue,ue._currentMarker))}))},Ae.prototype.onPointerDown=function(ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ce.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ue=this.markers.find(function(pe){return pe.ownsTarget(ce.target)});ue!==void 0?(this.setCurrentMarker(ue),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ce.clientX,ce.clientY),ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ce.clientX,y:ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ce.clientX,ce.clientY))},Ae.prototype.onDblClick=function(ce){if(this._isFocused||this.focus(),this.mode==="select"){var ue=this.markers.find(function(pe){return pe.ownsTarget(ce.target)});ue!==void 0&&ue!==this._currentMarker&&this.setCurrentMarker(ue),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ce.clientX,ce.clientY),ce.target):this.setCurrentMarker()}},Ae.prototype.onPointerMove=function(ce){this.touchPoints!==1&&ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ce.clientX,ce.clientY)):this.zoomLevel>1&&this.panTo({x:ce.clientX,y:ce.clientY}))},Ae.prototype.onPointerUp=function(ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ce.clientX,ce.clientY)),this.isDragging=!1,this.addUndoStep()},Ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ae.prototype.onKeyUp=function(ce){this._currentMarker===void 0||this.notesArea!==void 0||ce.key!=="Delete"&&ce.key!=="Backspace"||this.deleteSelectedMarker()},Ae.prototype.clientToLocalCoordinates=function(ce,ue){var pe=this.markerImage.getBoundingClientRect();return{x:(ce-pe.left)/this.zoomLevel,y:(ue-pe.top)/this.zoomLevel}},Ae.prototype.onWindowResize=function(){this.positionUI()},Ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ce+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Ae.prototype.addLicenseKey=function(ce){Me.addKey(ce)},Ae.prototype.addEventListener=function(ce,ue){this.eventListeners.addEventListener(ce,ue)},Ae.prototype.removeEventListener=function(ce,ue){this.eventListeners.removeEventListener(ce,ue)},Ae.prototype.renderState=function(ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ae.prototype.focus=function(){var ce=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ue){return ue(new mn(ce))}))},Ae.prototype.blur=function(){var ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ue){return ue(new mn(ce))}))},Ae.instanceCounter=0,Ae}()},95860:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return qe}});var se=le(87462),Be=le(1413),Ne=le(4942),Ye=le(97685),ve=le(45987),Se=le(94184),Me=le.n(Se),we=le(67294);function me(ut){var xe=we.useRef();xe.current=ut;var Ee=we.useCallback(function(){for(var Ve,Xe=arguments.length,Mt=new Array(Xe),mt=0;mt<Xe;mt++)Mt[mt]=arguments[mt];return(Ve=xe.current)===null||Ve===void 0?void 0:Ve.call.apply(Ve,[xe].concat(Mt))},[]);return Ee}function Te(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ot=Te()?we.useLayoutEffect:we.useEffect,Oe=function(xe,Ee){var Ve=we.useRef(!0);ot(function(){return xe(Ve.current)},Ee),ot(function(){return Ve.current=!1,function(){Ve.current=!0}},[])},st=function(xe,Ee){Oe(function(Ve){if(!Ve)return xe()},Ee)},lt=null;function Je(ut){var xe=we.useRef(!1),Ee=we.useState(ut),Ve=(0,Ye.Z)(Ee,2),Xe=Ve[0],Mt=Ve[1];we.useEffect(function(){return xe.current=!1,function(){xe.current=!0}},[]);function mt(St,Ke){Ke&&xe.current||Mt(St)}return[Xe,mt]}function Ge(ut){return ut!==void 0}function Ce(ut,xe){var Ee=xe||{},Ve=Ee.defaultValue,Xe=Ee.value,Mt=Ee.onChange,mt=Ee.postState,St=Je(function(){return Ge(Xe)?Xe:Ge(Ve)?typeof Ve=="function"?Ve():Ve:typeof ut=="function"?ut():ut}),Ke=(0,Ye.Z)(St,2),Pt=Ke[0],Et=Ke[1],Yt=Xe!==void 0?Xe:Pt,at=mt?mt(Yt):Yt,Vt=me(Mt),fn=Je([Yt]),dn=(0,Ye.Z)(fn,2),Ue=dn[0],Le=dn[1];st(function(){var Sn=Ue[0];Pt!==Sn&&Vt(Pt,Sn)},[Ue]),st(function(){Ge(Xe)||Et(Xe)},[Xe]);var Rt=me(function(Sn,un){Et(Sn,un),Le([Yt],un)});return[at,Rt]}var pt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],zt=(0,we.forwardRef)(function(ut,xe){var Ee,Ve=ut.prefixCls,Xe=Ve===void 0?"rc-checkbox":Ve,Mt=ut.className,mt=ut.style,St=ut.checked,Ke=ut.disabled,Pt=ut.defaultChecked,Et=Pt===void 0?!1:Pt,Yt=ut.type,at=Yt===void 0?"checkbox":Yt,Vt=ut.title,fn=ut.onChange,dn=(0,ve.Z)(ut,pt),Ue=(0,we.useRef)(null),Le=Ce(Et,{value:St}),Rt=(0,Ye.Z)(Le,2),Sn=Rt[0],un=Rt[1];(0,we.useImperativeHandle)(xe,function(){return{focus:function(){var Tn;(Tn=Ue.current)===null||Tn===void 0||Tn.focus()},blur:function(){var Tn;(Tn=Ue.current)===null||Tn===void 0||Tn.blur()},input:Ue.current}});var tt=Me()(Xe,Mt,(Ee={},(0,Ne.Z)(Ee,"".concat(Xe,"-checked"),Sn),(0,Ne.Z)(Ee,"".concat(Xe,"-disabled"),Ke),Ee)),ft=function(Tn){Ke||("checked"in ut||un(Tn.target.checked),fn==null||fn({target:(0,Be.Z)((0,Be.Z)({},ut),{},{type:at,checked:Tn.target.checked}),stopPropagation:function(){Tn.stopPropagation()},preventDefault:function(){Tn.preventDefault()},nativeEvent:Tn.nativeEvent}))};return we.createElement("span",{className:tt,title:Vt,style:mt},we.createElement("input",(0,se.Z)({},dn,{className:"".concat(Xe,"-input"),ref:Ue,onChange:ft,disabled:Ke,checked:!!Sn,type:at})),we.createElement("span",{className:"".concat(Xe,"-inner")}))}),qe=zt},26819:function(bn,Zt){"use strict";var le;var se=typeof Symbol=="function"&&Symbol.for,Be=se?Symbol.for("react.element"):60103,Ne=se?Symbol.for("react.portal"):60106,Ye=se?Symbol.for("react.fragment"):60107,ve=se?Symbol.for("react.strict_mode"):60108,Se=se?Symbol.for("react.profiler"):60114,Me=se?Symbol.for("react.provider"):60109,we=se?Symbol.for("react.context"):60110,me=se?Symbol.for("react.async_mode"):60111,Te=se?Symbol.for("react.concurrent_mode"):60111,ot=se?Symbol.for("react.forward_ref"):60112,Oe=se?Symbol.for("react.suspense"):60113,st=se?Symbol.for("react.suspense_list"):60120,lt=se?Symbol.for("react.memo"):60115,Je=se?Symbol.for("react.lazy"):60116,Ge=se?Symbol.for("react.block"):60121,Ce=se?Symbol.for("react.fundamental"):60117,pt=se?Symbol.for("react.responder"):60118,zt=se?Symbol.for("react.scope"):60119;function qe(xe){if(typeof xe=="object"&&xe!==null){var Ee=xe.$$typeof;switch(Ee){case Be:switch(xe=xe.type,xe){case me:case Te:case Ye:case Se:case ve:case Oe:return xe;default:switch(xe=xe&&xe.$$typeof,xe){case we:case ot:case Je:case lt:case Me:return xe;default:return Ee}}case Ne:return Ee}}}function ut(xe){return qe(xe)===Te}le=me,le=Te,le=we,le=Me,le=Be,le=ot,le=Ye,le=Je,le=lt,le=Ne,le=Se,le=ve,le=Oe,le=function(xe){return ut(xe)||qe(xe)===me},le=ut,le=function(xe){return qe(xe)===we},le=function(xe){return qe(xe)===Me},le=function(xe){return typeof xe=="object"&&xe!==null&&xe.$$typeof===Be},le=function(xe){return qe(xe)===ot},le=function(xe){return qe(xe)===Ye},le=function(xe){return qe(xe)===Je},Zt.isMemo=function(xe){return qe(xe)===lt},le=function(xe){return qe(xe)===Ne},le=function(xe){return qe(xe)===Se},le=function(xe){return qe(xe)===ve},le=function(xe){return qe(xe)===Oe},le=function(xe){return typeof xe=="string"||typeof xe=="function"||xe===Ye||xe===Te||xe===Se||xe===ve||xe===Oe||xe===st||typeof xe=="object"&&xe!==null&&(xe.$$typeof===Je||xe.$$typeof===lt||xe.$$typeof===Me||xe.$$typeof===we||xe.$$typeof===ot||xe.$$typeof===Ce||xe.$$typeof===pt||xe.$$typeof===zt||xe.$$typeof===Ge)},le=qe},18459:function(bn,Zt,le){"use strict";bn.exports=le(26819)},16651:function(bn,Zt){"use strict";var le;var se=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ne=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Se=Symbol.for("react.provider"),Me=Symbol.for("react.context"),we=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),lt=Symbol.for("react.offscreen"),Je;Je=Symbol.for("react.module.reference");function Ge(Ce){if(typeof Ce=="object"&&Ce!==null){var pt=Ce.$$typeof;switch(pt){case se:switch(Ce=Ce.type,Ce){case Ne:case ve:case Ye:case Te:case ot:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case we:case Me:case me:case st:case Oe:case Se:return Ce;default:return pt}}case Be:return pt}}}le=Me,le=Se,le=se,le=me,le=Ne,le=st,le=Oe,le=Be,le=ve,le=Ye,le=Te,le=ot,le=function(){return!1},le=function(){return!1},le=function(Ce){return Ge(Ce)===Me},le=function(Ce){return Ge(Ce)===Se},le=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===se},le=function(Ce){return Ge(Ce)===me},le=function(Ce){return Ge(Ce)===Ne},le=function(Ce){return Ge(Ce)===st},le=function(Ce){return Ge(Ce)===Oe},le=function(Ce){return Ge(Ce)===Be},le=function(Ce){return Ge(Ce)===ve},le=function(Ce){return Ge(Ce)===Ye},le=function(Ce){return Ge(Ce)===Te},le=function(Ce){return Ge(Ce)===ot},le=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ne||Ce===ve||Ce===Ye||Ce===Te||Ce===ot||Ce===lt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===st||Ce.$$typeof===Oe||Ce.$$typeof===Se||Ce.$$typeof===Me||Ce.$$typeof===me||Ce.$$typeof===Je||Ce.getModuleId!==void 0)},le=Ge},33993:function(bn,Zt,le){"use strict";le(16651)},82523:function(bn,Zt){"use strict";var le;var se=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ne=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Se=Symbol.for("react.provider"),Me=Symbol.for("react.context"),we=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),lt=Symbol.for("react.offscreen"),Je;Je=Symbol.for("react.module.reference");function Ge(Ce){if(typeof Ce=="object"&&Ce!==null){var pt=Ce.$$typeof;switch(pt){case se:switch(Ce=Ce.type,Ce){case Ne:case ve:case Ye:case Te:case ot:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case we:case Me:case me:case st:case Oe:case Se:return Ce;default:return pt}}case Be:return pt}}}le=Me,le=Se,le=se,le=me,le=Ne,le=st,le=Oe,le=Be,le=ve,le=Ye,le=Te,le=ot,le=function(){return!1},le=function(){return!1},le=function(Ce){return Ge(Ce)===Me},le=function(Ce){return Ge(Ce)===Se},le=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===se},le=function(Ce){return Ge(Ce)===me},le=function(Ce){return Ge(Ce)===Ne},le=function(Ce){return Ge(Ce)===st},le=function(Ce){return Ge(Ce)===Oe},le=function(Ce){return Ge(Ce)===Be},le=function(Ce){return Ge(Ce)===ve},le=function(Ce){return Ge(Ce)===Ye},le=function(Ce){return Ge(Ce)===Te},le=function(Ce){return Ge(Ce)===ot},le=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ne||Ce===ve||Ce===Ye||Ce===Te||Ce===ot||Ce===lt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===st||Ce.$$typeof===Oe||Ce.$$typeof===Se||Ce.$$typeof===Me||Ce.$$typeof===me||Ce.$$typeof===Je||Ce.getModuleId!==void 0)},le=Ge},27183:function(bn,Zt,le){"use strict";le(82523)},67656:function(bn,Zt,le){"use strict";le.r(Zt),le.d(Zt,{BaseInput:function(){return Te},default:function(){return zt}});var se=le(87462),Be=le(1413),Ne=le(4942),Ye=le(71002),ve=le(94184),Se=le.n(ve),Me=le(67294),we=le(87887),me=function(ut){var xe,Ee,Ve=ut.inputElement,Xe=ut.prefixCls,Mt=ut.prefix,mt=ut.suffix,St=ut.addonBefore,Ke=ut.addonAfter,Pt=ut.className,Et=ut.style,Yt=ut.disabled,at=ut.readOnly,Vt=ut.focused,fn=ut.triggerFocus,dn=ut.allowClear,Ue=ut.value,Le=ut.handleReset,Rt=ut.hidden,Sn=ut.classes,un=ut.classNames,tt=ut.dataAttrs,ft=ut.styles,Xt=ut.components,Tn=(Xt==null?void 0:Xt.affixWrapper)||"span",mn=(Xt==null?void 0:Xt.groupWrapper)||"span",Ut=(Xt==null?void 0:Xt.wrapper)||"span",jt=(Xt==null?void 0:Xt.groupAddon)||"span",_n=(0,Me.useRef)(null),yn=function(en){var Jt;(Jt=_n.current)!==null&&Jt!==void 0&&Jt.contains(en.target)&&(fn==null||fn())},Ae=function(){var en;if(!dn)return null;var Jt=!Yt&&!at&&Ue,et="".concat(Xe,"-clear-icon"),wt=(0,Ye.Z)(dn)==="object"&&dn!==null&&dn!==void 0&&dn.clearIcon?dn.clearIcon:"\u2716";return Me.createElement("span",{onClick:Le,onMouseDown:function(Ot){return Ot.preventDefault()},className:Se()(et,(en={},(0,Ne.Z)(en,"".concat(et,"-hidden"),!Jt),(0,Ne.Z)(en,"".concat(et,"-has-suffix"),!!mt),en)),role:"button",tabIndex:-1},wt)},ce=(0,Me.cloneElement)(Ve,{value:Ue,hidden:Rt,className:Se()((xe=Ve.props)===null||xe===void 0?void 0:xe.className,!(0,we.X3)(ut)&&!(0,we.He)(ut)&&Pt)||null,style:(0,Be.Z)((0,Be.Z)({},(Ee=Ve.props)===null||Ee===void 0?void 0:Ee.style),!(0,we.X3)(ut)&&!(0,we.He)(ut)?Et:{})});if((0,we.X3)(ut)){var ue,pe="".concat(Xe,"-affix-wrapper"),he=Se()(pe,(ue={},(0,Ne.Z)(ue,"".concat(pe,"-disabled"),Yt),(0,Ne.Z)(ue,"".concat(pe,"-focused"),Vt),(0,Ne.Z)(ue,"".concat(pe,"-readonly"),at),(0,Ne.Z)(ue,"".concat(pe,"-input-with-clear-btn"),mt&&dn&&Ue),ue),!(0,we.He)(ut)&&Pt,Sn==null?void 0:Sn.affixWrapper,un==null?void 0:un.affixWrapper),oe=(mt||dn)&&Me.createElement("span",{className:Se()("".concat(Xe,"-suffix"),un==null?void 0:un.suffix),style:ft==null?void 0:ft.suffix},Ae(),mt);ce=Me.createElement(Tn,(0,se.Z)({className:he,style:(0,Be.Z)((0,Be.Z)({},(0,we.He)(ut)?void 0:Et),ft==null?void 0:ft.affixWrapper),hidden:!(0,we.He)(ut)&&Rt,onClick:yn},tt==null?void 0:tt.affixWrapper,{ref:_n}),Mt&&Me.createElement("span",{className:Se()("".concat(Xe,"-prefix"),un==null?void 0:un.prefix),style:ft==null?void 0:ft.prefix},Mt),(0,Me.cloneElement)(Ve,{value:Ue,hidden:null}),oe)}if((0,we.He)(ut)){var Ie="".concat(Xe,"-group"),Qe="".concat(Ie,"-addon"),Lt=Se()("".concat(Xe,"-wrapper"),Ie,Sn==null?void 0:Sn.wrapper),$t=Se()("".concat(Xe,"-group-wrapper"),Pt,Sn==null?void 0:Sn.group);return Me.createElement(mn,{className:$t,style:Et,hidden:Rt},Me.createElement(Ut,{className:Lt},St&&Me.createElement(jt,{className:Qe},St),(0,Me.cloneElement)(ce,{hidden:null}),Ke&&Me.createElement(jt,{className:Qe},Ke)))}return ce},Te=me,ot=le(74902),Oe=le(97685),st=le(45987),lt=le(21770),Je=le(98423),Ge=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Ce=(0,Me.forwardRef)(function(qe,ut){var xe=qe.autoComplete,Ee=qe.onChange,Ve=qe.onFocus,Xe=qe.onBlur,Mt=qe.onPressEnter,mt=qe.onKeyDown,St=qe.prefixCls,Ke=St===void 0?"rc-input":St,Pt=qe.disabled,Et=qe.htmlSize,Yt=qe.className,at=qe.maxLength,Vt=qe.suffix,fn=qe.showCount,dn=qe.type,Ue=dn===void 0?"text":dn,Le=qe.classes,Rt=qe.classNames,Sn=qe.styles,un=(0,st.Z)(qe,Ge),tt=(0,lt.Z)(qe.defaultValue,{value:qe.value}),ft=(0,Oe.Z)(tt,2),Xt=ft[0],Tn=ft[1],mn=(0,Me.useState)(!1),Ut=(0,Oe.Z)(mn,2),jt=Ut[0],_n=Ut[1],yn=(0,Me.useRef)(null),Ae=function($t){yn.current&&(0,we.nH)(yn.current,$t)};(0,Me.useImperativeHandle)(ut,function(){return{focus:Ae,blur:function(){var $t;($t=yn.current)===null||$t===void 0||$t.blur()},setSelectionRange:function($t,Kt,en){var Jt;(Jt=yn.current)===null||Jt===void 0||Jt.setSelectionRange($t,Kt,en)},select:function(){var $t;($t=yn.current)===null||$t===void 0||$t.select()},input:yn.current}}),(0,Me.useEffect)(function(){_n(function(Lt){return Lt&&Pt?!1:Lt})},[Pt]);var ce=function($t){qe.value===void 0&&Tn($t.target.value),yn.current&&(0,we.rJ)(yn.current,$t,Ee)},ue=function($t){Mt&&$t.key==="Enter"&&Mt($t),mt==null||mt($t)},pe=function($t){_n(!0),Ve==null||Ve($t)},he=function($t){_n(!1),Xe==null||Xe($t)},oe=function($t){Tn(""),Ae(),yn.current&&(0,we.rJ)(yn.current,$t,Ee)},Ie=function(){var $t=(0,Je.Z)(qe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Me.createElement("input",(0,se.Z)({autoComplete:xe},$t,{onChange:ce,onFocus:pe,onBlur:he,onKeyDown:ue,className:Se()(Ke,(0,Ne.Z)({},"".concat(Ke,"-disabled"),Pt),Rt==null?void 0:Rt.input),style:Sn==null?void 0:Sn.input,ref:yn,size:Et,type:Ue}))},Qe=function(){var $t=Number(at)>0;if(Vt||fn){var Kt=(0,we.D7)(Xt),en=(0,ot.Z)(Kt).length,Jt=(0,Ye.Z)(fn)==="object"?fn.formatter({value:Kt,count:en,maxLength:at}):"".concat(en).concat($t?" / ".concat(at):"");return Me.createElement(Me.Fragment,null,!!fn&&Me.createElement("span",{className:Se()("".concat(Ke,"-show-count-suffix"),(0,Ne.Z)({},"".concat(Ke,"-show-count-has-suffix"),!!Vt),Rt==null?void 0:Rt.count),style:(0,Be.Z)({},Sn==null?void 0:Sn.count)},Jt),Vt)}return null};return Me.createElement(Te,(0,se.Z)({},un,{prefixCls:Ke,className:Yt,inputElement:Ie(),handleReset:oe,value:(0,we.D7)(Xt),focused:jt,triggerFocus:Ae,suffix:Qe(),disabled:Pt,classes:Le,classNames:Rt,styles:Sn}))}),pt=Ce,zt=pt},87887:function(bn,Zt,le){"use strict";le.d(Zt,{D7:function(){return ve},He:function(){return se},X3:function(){return Be},nH:function(){return Ye},rJ:function(){return Ne}});function se(Se){return!!(Se.addonBefore||Se.addonAfter)}function Be(Se){return!!(Se.prefix||Se.suffix||Se.allowClear)}function Ne(Se,Me,we,me){if(we){var Te=Me;if(Me.type==="click"){var ot=Se.cloneNode(!0);Te=Object.create(Me,{target:{value:ot},currentTarget:{value:ot}}),ot.value="",we(Te);return}if(me!==void 0){Te=Object.create(Me,{target:{value:Se},currentTarget:{value:Se}}),Se.value=me,we(Te);return}we(Te)}}function Ye(Se,Me){if(Se){Se.focus(Me);var we=Me||{},me=we.cursor;if(me){var Te=Se.value.length;switch(me){case"start":Se.setSelectionRange(0,0);break;case"end":Se.setSelectionRange(Te,Te);break;default:Se.setSelectionRange(0,Te)}}}}function ve(Se){return typeof Se=="undefined"||Se===null?"":String(Se)}},78595:function(bn,Zt,le){"use strict";le.d(Zt,{iz:function(){return Cr},ck:function(){return Mi},BW:function(){return Mr},sN:function(){return Mi},Wd:function(){return Ht},ZP:function(){return Fe},Xl:function(){return Jt}});var se=le(87462),Be=le(4942),Ne=le(1413),Ye=le(74902),ve=le(97685),Se=le(45987),Me=le(94184),we=le.n(Me),me=le(67294),Te=le(48555);function ot(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Oe=ot()?me.useLayoutEffect:me.useEffect,st=function(Ze,nt){var ct=me.useRef(!0);Oe(function(){return Ze(ct.current)},nt),Oe(function(){return ct.current=!1,function(){ct.current=!0}},[])},lt=function(Ze,nt){st(function(ct){if(!ct)return Ze()},nt)},Je=st,Ge=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ce=void 0;function pt(Re,Ze){var nt=Re.prefixCls,ct=Re.invalidate,vt=Re.item,nn=Re.renderItem,on=Re.responsive,Un=Re.responsiveDisabled,yr=Re.registerSize,Gn=Re.itemKey,Cn=Re.className,vn=Re.style,Bn=Re.children,Fn=Re.display,xr=Re.order,Qn=Re.component,Yn=Qn===void 0?"div":Qn,ir=(0,Se.Z)(Re,Ge),rr=on&&!Fn;function Er(ln){yr(Gn,ln)}me.useEffect(function(){return function(){Er(null)}},[]);var He=nn&&vt!==Ce?nn(vt):Bn,We;ct||(We={opacity:rr?0:1,height:rr?0:Ce,overflowY:rr?"hidden":Ce,order:on?xr:Ce,pointerEvents:rr?"none":Ce,position:rr?"absolute":Ce});var Nt={};rr&&(Nt["aria-hidden"]=!0);var _t=me.createElement(Yn,(0,se.Z)({className:we()(!ct&&nt,Cn),style:(0,Ne.Z)((0,Ne.Z)({},We),vn)},Nt,ir,{ref:Ze}),He);return on&&(_t=me.createElement(Te.Z,{onResize:function(Mn){var En=Mn.offsetWidth;Er(En)},disabled:Un},_t)),_t}var zt=me.forwardRef(pt);zt.displayName="Item";var qe=zt;function ut(Re){var Ze=me.useRef();Ze.current=Re;var nt=me.useCallback(function(){for(var ct,vt=arguments.length,nn=new Array(vt),on=0;on<vt;on++)nn[on]=arguments[on];return(ct=Ze.current)===null||ct===void 0?void 0:ct.call.apply(ct,[Ze].concat(nn))},[]);return nt}var xe=le(73935),Ee=function(Ze){return+setTimeout(Ze,16)},Ve=function(Ze){return clearTimeout(Ze)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ee=function(Ze){return window.requestAnimationFrame(Ze)},Ve=function(Ze){return window.cancelAnimationFrame(Ze)});var Xe=0,Mt=new Map;function mt(Re){Mt.delete(Re)}var St=function(Ze){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Xe+=1;var ct=Xe;function vt(nn){if(nn===0)mt(ct),Ze();else{var on=Ee(function(){vt(nn-1)});Mt.set(ct,on)}}return vt(nt),ct};St.cancel=function(Re){var Ze=Mt.get(Re);return mt(Ze),Ve(Ze)};var Ke=St;function Pt(Re){if(typeof MessageChannel=="undefined")Ke(Re);else{var Ze=new MessageChannel;Ze.port1.onmessage=function(){return Re()},Ze.port2.postMessage(void 0)}}function Et(){var Re=me.useRef(null),Ze=function(ct){Re.current||(Re.current=[],Pt(function(){(0,xe.unstable_batchedUpdates)(function(){Re.current.forEach(function(vt){vt()}),Re.current=null})})),Re.current.push(ct)};return Ze}function Yt(Re,Ze){var nt=me.useState(Ze),ct=(0,ve.Z)(nt,2),vt=ct[0],nn=ct[1],on=ut(function(Un){Re(function(){nn(Un)})});return[vt,on]}var at=me.createContext(null),Vt=["component"],fn=["className"],dn=["className"],Ue=function(Ze,nt){var ct=me.useContext(at);if(!ct){var vt=Ze.component,nn=vt===void 0?"div":vt,on=(0,Se.Z)(Ze,Vt);return me.createElement(nn,(0,se.Z)({},on,{ref:nt}))}var Un=ct.className,yr=(0,Se.Z)(ct,fn),Gn=Ze.className,Cn=(0,Se.Z)(Ze,dn);return me.createElement(at.Provider,{value:null},me.createElement(qe,(0,se.Z)({ref:nt,className:we()(Un,Gn)},yr,Cn)))},Le=me.forwardRef(Ue);Le.displayName="RawItem";var Rt=Le,Sn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],un="responsive",tt="invalidate";function ft(Re){return"+ ".concat(Re.length," ...")}function Xt(Re,Ze){var nt=Re.prefixCls,ct=nt===void 0?"rc-overflow":nt,vt=Re.data,nn=vt===void 0?[]:vt,on=Re.renderItem,Un=Re.renderRawItem,yr=Re.itemKey,Gn=Re.itemWidth,Cn=Gn===void 0?10:Gn,vn=Re.ssr,Bn=Re.style,Fn=Re.className,xr=Re.maxCount,Qn=Re.renderRest,Yn=Re.renderRawRest,ir=Re.suffix,rr=Re.component,Er=rr===void 0?"div":rr,He=Re.itemComponent,We=Re.onVisibleChange,Nt=(0,Se.Z)(Re,Sn),_t=vn==="full",ln=Et(),Mn=Yt(ln,null),En=(0,ve.Z)(Mn,2),Zn=En[0],Nn=En[1],hn=Zn||0,zn=Yt(ln,new Map),jn=(0,ve.Z)(zn,2),hr=jn[0],Kn=jn[1],Ar=Yt(ln,0),ii=(0,ve.Z)(Ar,2),Fr=ii[0],qr=ii[1],Ir=Yt(ln,0),Rr=(0,ve.Z)(Ir,2),li=Rr[0],pi=Rr[1],zr=Yt(ln,0),Or=(0,ve.Z)(zr,2),mi=Or[0],Yi=Or[1],Xi=(0,me.useState)(null),Pi=(0,ve.Z)(Xi,2),Ji=Pi[0],ta=Pi[1],_i=(0,me.useState)(null),Hi=(0,ve.Z)(_i,2),ui=Hi[0],xi=Hi[1],Ni=me.useMemo(function(){return ui===null&&_t?Number.MAX_SAFE_INTEGER:ui||0},[ui,Zn]),Qi=(0,me.useState)(!1),Ra=(0,ve.Z)(Qi,2),$a=Ra[0],Aa=Ra[1],ua="".concat(ct,"-item"),na=Math.max(Fr,li),Di=xr===un,Ba=nn.length&&Di,Bi=xr===tt,ci=Ba||typeof xr=="number"&&nn.length>xr,ji=(0,me.useMemo)(function(){var Oi=nn;return Ba?Zn===null&&_t?Oi=nn:Oi=nn.slice(0,Math.min(nn.length,hn/Cn)):typeof xr=="number"&&(Oi=nn.slice(0,xr)),Oi},[nn,Cn,Zn,xr,Ba]),ca=(0,me.useMemo)(function(){return Ba?nn.slice(Ni+1):nn.slice(ji.length)},[nn,ji,Ba,Ni]),qi=(0,me.useCallback)(function(Oi,Vi){var da;return typeof yr=="function"?yr(Oi):(da=yr&&(Oi==null?void 0:Oi[yr]))!==null&&da!==void 0?da:Vi},[yr]),oa=(0,me.useCallback)(on||function(Oi){return Oi},[on]);function wi(Oi,Vi,da){ui===Oi&&(Vi===void 0||Vi===Ji)||(xi(Oi),da||(Aa(Oi<nn.length-1),We==null||We(Oi)),Vi!==void 0&&ta(Vi))}function pa(Oi,Vi){Nn(Vi.clientWidth)}function xa(Oi,Vi){Kn(function(da){var wa=new Map(da);return Vi===null?wa.delete(Oi):wa.set(Oi,Vi),wa})}function fa(Oi,Vi){pi(Vi),qr(li)}function Sa(Oi,Vi){Yi(Vi)}function Ma(Oi){return hr.get(qi(ji[Oi],Oi))}Je(function(){if(hn&&typeof na=="number"&&ji){var Oi=mi,Vi=ji.length,da=Vi-1;if(!Vi){wi(0,null);return}for(var wa=0;wa<Vi;wa+=1){var Ka=Ma(wa);if(_t&&(Ka=Ka||0),Ka===void 0){wi(wa-1,void 0,!0);break}if(Oi+=Ka,da===0&&Oi<=hn||wa===da-1&&Oi+Ma(da)<=hn){wi(da,null);break}else if(Oi+na>hn){wi(wa-1,Oi-Ka-mi+li);break}}ir&&Ma(0)+mi>hn&&ta(null)}},[hn,hr,li,mi,qi,ji]);var Va=$a&&!!ca.length,ha={};Ji!==null&&Ba&&(ha={position:"absolute",left:Ji,top:0});var _a={prefixCls:ua,responsive:Ba,component:He,invalidate:Bi},Ja=Un?function(Oi,Vi){var da=qi(Oi,Vi);return me.createElement(at.Provider,{key:da,value:(0,Ne.Z)((0,Ne.Z)({},_a),{},{order:Vi,item:Oi,itemKey:da,registerSize:xa,display:Vi<=Ni})},Un(Oi,Vi))}:function(Oi,Vi){var da=qi(Oi,Vi);return me.createElement(qe,(0,se.Z)({},_a,{order:Vi,key:da,item:Oi,renderItem:oa,itemKey:da,registerSize:xa,display:Vi<=Ni}))},Ga,so={order:Va?Ni:Number.MAX_SAFE_INTEGER,className:"".concat(ua,"-rest"),registerSize:fa,display:Va};if(Yn)Yn&&(Ga=me.createElement(at.Provider,{value:(0,Ne.Z)((0,Ne.Z)({},_a),so)},Yn(ca)));else{var Fa=Qn||ft;Ga=me.createElement(qe,(0,se.Z)({},_a,so),typeof Fa=="function"?Fa(ca):Fa)}var Ca=me.createElement(Er,(0,se.Z)({className:we()(!Bi&&ct,Fn),style:Bn,ref:Ze},Nt),ji.map(Ja),ci?Ga:null,ir&&me.createElement(qe,(0,se.Z)({},_a,{responsive:Di,responsiveDisabled:!Ba,order:Ni,className:"".concat(ua,"-suffix"),registerSize:Sa,display:!0,style:ha}),ir));return Di&&(Ca=me.createElement(Te.Z,{onResize:pa,disabled:!Ba},Ca)),Ca}var Tn=me.forwardRef(Xt);Tn.displayName="Overflow",Tn.Item=Rt,Tn.RESPONSIVE=un,Tn.INVALIDATE=tt;var mn=Tn,Ut=mn,jt=le(21770),_n=le(80334),yn=le(91881),Ae=me.createContext(null);function ce(Re,Ze){return Re===void 0?null:"".concat(Re,"-").concat(Ze)}function ue(Re){var Ze=me.useContext(Ae);return ce(Ze,Re)}var pe=le(56982),he=["children","locked"],oe=me.createContext(null);function Ie(Re,Ze){var nt=(0,Ne.Z)({},Re);return Object.keys(Ze).forEach(function(ct){var vt=Ze[ct];vt!==void 0&&(nt[ct]=vt)}),nt}function Qe(Re){var Ze=Re.children,nt=Re.locked,ct=(0,Se.Z)(Re,he),vt=me.useContext(oe),nn=(0,pe.Z)(function(){return Ie(vt,ct)},[vt,ct],function(on,Un){return!nt&&(on[0]!==Un[0]||!(0,yn.Z)(on[1],Un[1],!0))});return me.createElement(oe.Provider,{value:nn},Ze)}var Lt=[],$t=me.createContext(null);function Kt(){return me.useContext($t)}var en=me.createContext(Lt);function Jt(Re){var Ze=me.useContext(en);return me.useMemo(function(){return Re!==void 0?[].concat((0,Ye.Z)(Ze),[Re]):Ze},[Ze,Re])}var et=me.createContext(null),wt=me.createContext({}),Tt=wt,Ot=le(15105),yt=le(75164),Dn=function(Re){if(!Re)return!1;if(Re instanceof Element){if(Re.offsetParent)return!0;if(Re.getBBox){var Ze=Re.getBBox(),nt=Ze.width,ct=Ze.height;if(nt||ct)return!0}if(Re.getBoundingClientRect){var vt=Re.getBoundingClientRect(),nn=vt.width,on=vt.height;if(nn||on)return!0}}return!1};function gn(Re){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Dn(Re)){var nt=Re.nodeName.toLowerCase(),ct=["input","select","textarea","button"].includes(nt)||Re.isContentEditable||nt==="a"&&!!Re.getAttribute("href"),vt=Re.getAttribute("tabindex"),nn=Number(vt),on=null;return vt&&!Number.isNaN(nn)?on=nn:ct&&on===null&&(on=0),ct&&Re.disabled&&(on=null),on!==null&&(on>=0||Ze&&on<0)}return!1}function $n(Re){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=(0,Ye.Z)(Re.querySelectorAll("*")).filter(function(ct){return gn(ct,Ze)});return gn(Re,Ze)&&nt.unshift(Re),nt}var Kr=null;function tr(){Kr=document.activeElement}function lr(){Kr=null}function ur(){if(Kr)try{Kr.focus()}catch(Re){}}function ni(Re,Ze){if(Ze.keyCode===9){var nt=$n(Re),ct=nt[Ze.shiftKey?0:nt.length-1],vt=ct===document.activeElement||Re===document.activeElement;if(vt){var nn=nt[Ze.shiftKey?nt.length-1:0];nn.focus(),Ze.preventDefault()}}}var Xr=Ot.Z.LEFT,Qr=Ot.Z.RIGHT,gi=Ot.Z.UP,Sr=Ot.Z.DOWN,Ei=Ot.Z.ENTER,Ui=Ot.Z.ESC,ea=Ot.Z.HOME,ra=Ot.Z.END,Zi=[gi,Sr,Xr,Qr];function At(Re,Ze,nt,ct){var vt,nn,on,Un,yr="prev",Gn="next",Cn="children",vn="parent";if(Re==="inline"&&ct===Ei)return{inlineTrigger:!0};var Bn=(vt={},(0,Be.Z)(vt,gi,yr),(0,Be.Z)(vt,Sr,Gn),vt),Fn=(nn={},(0,Be.Z)(nn,Xr,nt?Gn:yr),(0,Be.Z)(nn,Qr,nt?yr:Gn),(0,Be.Z)(nn,Sr,Cn),(0,Be.Z)(nn,Ei,Cn),nn),xr=(on={},(0,Be.Z)(on,gi,yr),(0,Be.Z)(on,Sr,Gn),(0,Be.Z)(on,Ei,Cn),(0,Be.Z)(on,Ui,vn),(0,Be.Z)(on,Xr,nt?Cn:vn),(0,Be.Z)(on,Qr,nt?vn:Cn),on),Qn={inline:Bn,horizontal:Fn,vertical:xr,inlineSub:Bn,horizontalSub:xr,verticalSub:xr},Yn=(Un=Qn["".concat(Re).concat(Ze?"":"Sub")])===null||Un===void 0?void 0:Un[ct];switch(Yn){case yr:return{offset:-1,sibling:!0};case Gn:return{offset:1,sibling:!0};case vn:return{offset:-1,sibling:!1};case Cn:return{offset:1,sibling:!1};default:return null}}function An(Re){for(var Ze=Re;Ze;){if(Ze.getAttribute("data-menu-list"))return Ze;Ze=Ze.parentElement}return null}function On(Re,Ze){for(var nt=Re||document.activeElement;nt;){if(Ze.has(nt))return nt;nt=nt.parentElement}return null}function wn(Re,Ze){var nt=$n(Re,!0);return nt.filter(function(ct){return Ze.has(ct)})}function kr(Re,Ze,nt){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Re)return null;var vt=wn(Re,Ze),nn=vt.length,on=vt.findIndex(function(Un){return nt===Un});return ct<0?on===-1?on=nn-1:on-=1:ct>0&&(on+=1),on=(on+nn)%nn,vt[on]}function or(Re,Ze,nt,ct,vt,nn,on,Un,yr,Gn){var Cn=me.useRef(),vn=me.useRef();vn.current=Ze;var Bn=function(){yt.Z.cancel(Cn.current)};return me.useEffect(function(){return function(){Bn()}},[]),function(Fn){var xr=Fn.which;if([].concat(Zi,[Ei,Ui,ea,ra]).includes(xr)){var Qn,Yn,ir,rr=function(){Qn=new Set,Yn=new Map,ir=new Map;var jn=nn();return jn.forEach(function(hr){var Kn=document.querySelector("[data-menu-id='".concat(ce(ct,hr),"']"));Kn&&(Qn.add(Kn),ir.set(Kn,hr),Yn.set(hr,Kn))}),Qn};rr();var Er=Yn.get(Ze),He=On(Er,Qn),We=ir.get(He),Nt=At(Re,on(We,!0).length===1,nt,xr);if(!Nt&&xr!==ea&&xr!==ra)return;(Zi.includes(xr)||[ea,ra].includes(xr))&&Fn.preventDefault();var _t=function(jn){if(jn){var hr=jn,Kn=jn.querySelector("a");Kn!=null&&Kn.getAttribute("href")&&(hr=Kn);var Ar=ir.get(jn);Un(Ar),Bn(),Cn.current=(0,yt.Z)(function(){vn.current===Ar&&hr.focus()})}};if([ea,ra].includes(xr)||Nt.sibling||!He){var ln;!He||Re==="inline"?ln=vt.current:ln=An(He);var Mn,En=wn(ln,Qn);xr===ea?Mn=En[0]:xr===ra?Mn=En[En.length-1]:Mn=kr(ln,Qn,He,Nt.offset),_t(Mn)}else if(Nt.inlineTrigger)yr(We);else if(Nt.offset>0)yr(We,!0),Bn(),Cn.current=(0,yt.Z)(function(){rr();var zn=He.getAttribute("aria-controls"),jn=document.getElementById(zn),hr=kr(jn,Qn);_t(hr)},5);else if(Nt.offset<0){var Zn=on(We,!0),Nn=Zn[Zn.length-2],hn=Yn.get(Nn);yr(Nn,!1),_t(hn)}}Gn==null||Gn(Fn)}}function ar(Re){Promise.resolve().then(Re)}var Rn="__RC_UTIL_PATH_SPLIT__",it=function(Ze){return Ze.join(Rn)},dt=function(Ze){return Ze.split(Rn)},Bt="rc-menu-more";function qt(){var Re=me.useState({}),Ze=(0,ve.Z)(Re,2),nt=Ze[1],ct=(0,me.useRef)(new Map),vt=(0,me.useRef)(new Map),nn=me.useState([]),on=(0,ve.Z)(nn,2),Un=on[0],yr=on[1],Gn=(0,me.useRef)(0),Cn=(0,me.useRef)(!1),vn=function(){Cn.current||nt({})},Bn=(0,me.useCallback)(function(Er,He){var We=it(He);vt.current.set(We,Er),ct.current.set(Er,We),Gn.current+=1;var Nt=Gn.current;ar(function(){Nt===Gn.current&&vn()})},[]),Fn=(0,me.useCallback)(function(Er,He){var We=it(He);vt.current.delete(We),ct.current.delete(Er)},[]),xr=(0,me.useCallback)(function(Er){yr(Er)},[]),Qn=(0,me.useCallback)(function(Er,He){var We=ct.current.get(Er)||"",Nt=dt(We);return He&&Un.includes(Nt[0])&&Nt.unshift(Bt),Nt},[Un]),Yn=(0,me.useCallback)(function(Er,He){return Er.some(function(We){var Nt=Qn(We,!0);return Nt.includes(He)})},[Qn]),ir=function(){var He=(0,Ye.Z)(ct.current.keys());return Un.length&&He.push(Bt),He},rr=(0,me.useCallback)(function(Er){var He="".concat(ct.current.get(Er)).concat(Rn),We=new Set;return(0,Ye.Z)(vt.current.keys()).forEach(function(Nt){Nt.startsWith(He)&&We.add(vt.current.get(Nt))}),We},[]);return me.useEffect(function(){return function(){Cn.current=!0}},[]),{registerPath:Bn,unregisterPath:Fn,refreshOverflowKeys:xr,isSubPathKey:Yn,getKeyPath:Qn,getKeys:ir,getSubPathKeys:rr}}function je(Re){var Ze=me.useRef(Re);Ze.current=Re;var nt=me.useCallback(function(){for(var ct,vt=arguments.length,nn=new Array(vt),on=0;on<vt;on++)nn[on]=arguments[on];return(ct=Ze.current)===null||ct===void 0?void 0:ct.call.apply(ct,[Ze].concat(nn))},[]);return Re?nt:void 0}var Ct=Math.random().toFixed(5).toString().slice(2),Wt=0;function Ft(Re){var Ze=(0,jt.Z)(Re,{value:Re}),nt=(0,ve.Z)(Ze,2),ct=nt[0],vt=nt[1];return me.useEffect(function(){Wt+=1;var nn="".concat(Ct,"-").concat(Wt);vt("rc-menu-uuid-".concat(nn))},[]),ct}var an=le(15671),rn=le(43144),Vn=le(60136),Pr=le(51630),nr=le(98423),Xn=le(42550);function mr(Re,Ze,nt,ct){var vt=me.useContext(oe),nn=vt.activeKey,on=vt.onActive,Un=vt.onInactive,yr={active:nn===Re};return Ze||(yr.onMouseEnter=function(Gn){nt==null||nt({key:Re,domEvent:Gn}),on(Re)},yr.onMouseLeave=function(Gn){ct==null||ct({key:Re,domEvent:Gn}),Un(Re)}),yr}function fr(Re){var Ze=me.useContext(oe),nt=Ze.mode,ct=Ze.rtl,vt=Ze.inlineIndent;if(nt!=="inline")return null;var nn=Re;return ct?{paddingRight:nn*vt}:{paddingLeft:nn*vt}}function Yr(Re){var Ze=Re.icon,nt=Re.props,ct=Re.children,vt;return Ze===null||Ze===!1?null:(typeof Ze=="function"?vt=me.createElement(Ze,(0,Ne.Z)({},nt)):typeof Ze!="boolean"&&(vt=Ze),vt||ct||null)}var xn=["item"];function qn(Re){var Ze=Re.item,nt=(0,Se.Z)(Re,xn);return Object.defineProperty(nt,"item",{get:function(){return(0,_n.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ze}}),nt}var Si=["title","attribute","elementRef"],Ii=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],di=["active"],si=function(Re){(0,Vn.Z)(nt,Re);var Ze=(0,Pr.Z)(nt);function nt(){return(0,an.Z)(this,nt),Ze.apply(this,arguments)}return(0,rn.Z)(nt,[{key:"render",value:function(){var vt=this.props,nn=vt.title,on=vt.attribute,Un=vt.elementRef,yr=(0,Se.Z)(vt,Si),Gn=(0,nr.Z)(yr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,_n.ZP)(!on,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),me.createElement(Ut.Item,(0,se.Z)({},on,{title:typeof nn=="string"?nn:void 0},Gn,{ref:Un}))}}]),nt}(me.Component),zi=me.forwardRef(function(Re,Ze){var nt,ct=Re.style,vt=Re.className,nn=Re.eventKey,on=Re.warnKey,Un=Re.disabled,yr=Re.itemIcon,Gn=Re.children,Cn=Re.role,vn=Re.onMouseEnter,Bn=Re.onMouseLeave,Fn=Re.onClick,xr=Re.onKeyDown,Qn=Re.onFocus,Yn=(0,Se.Z)(Re,Ii),ir=ue(nn),rr=me.useContext(oe),Er=rr.prefixCls,He=rr.onItemClick,We=rr.disabled,Nt=rr.overflowDisabled,_t=rr.itemIcon,ln=rr.selectedKeys,Mn=rr.onActive,En=me.useContext(Tt),Zn=En._internalRenderMenuItem,Nn="".concat(Er,"-item"),hn=me.useRef(),zn=me.useRef(),jn=We||Un,hr=(0,Xn.x1)(Ze,zn),Kn=Jt(nn),Ar=function(Pi){return{key:nn,keyPath:(0,Ye.Z)(Kn).reverse(),item:hn.current,domEvent:Pi}},ii=yr||_t,Fr=mr(nn,jn,vn,Bn),qr=Fr.active,Ir=(0,Se.Z)(Fr,di),Rr=ln.includes(nn),li=fr(Kn.length),pi=function(Pi){if(!jn){var Ji=Ar(Pi);Fn==null||Fn(qn(Ji)),He(Ji)}},zr=function(Pi){if(xr==null||xr(Pi),Pi.which===Ot.Z.ENTER){var Ji=Ar(Pi);Fn==null||Fn(qn(Ji)),He(Ji)}},Or=function(Pi){Mn(nn),Qn==null||Qn(Pi)},mi={};Re.role==="option"&&(mi["aria-selected"]=Rr);var Yi=me.createElement(si,(0,se.Z)({ref:hn,elementRef:hr,role:Cn===null?"none":Cn||"menuitem",tabIndex:Un?null:-1,"data-menu-id":Nt&&ir?null:ir},Yn,Ir,mi,{component:"li","aria-disabled":Un,style:(0,Ne.Z)((0,Ne.Z)({},li),ct),className:we()(Nn,(nt={},(0,Be.Z)(nt,"".concat(Nn,"-active"),qr),(0,Be.Z)(nt,"".concat(Nn,"-selected"),Rr),(0,Be.Z)(nt,"".concat(Nn,"-disabled"),jn),nt),vt),onClick:pi,onKeyDown:zr,onFocus:Or}),Gn,me.createElement(Yr,{props:(0,Ne.Z)((0,Ne.Z)({},Re),{},{isSelected:Rr}),icon:ii}));return Zn&&(Yi=Zn(Yi,Re,{selected:Rr})),Yi});function Lr(Re,Ze){var nt=Re.eventKey,ct=Kt(),vt=Jt(nt);return me.useEffect(function(){if(ct)return ct.registerPath(nt,vt),function(){ct.unregisterPath(nt,vt)}},[vt]),ct?null:me.createElement(zi,(0,se.Z)({},Re,{ref:Ze}))}var Mi=me.forwardRef(Lr),Pn=["className","children"],Qt=function(Ze,nt){var ct=Ze.className,vt=Ze.children,nn=(0,Se.Z)(Ze,Pn),on=me.useContext(oe),Un=on.prefixCls,yr=on.mode,Gn=on.rtl;return me.createElement("ul",(0,se.Z)({className:we()(Un,Gn&&"".concat(Un,"-rtl"),"".concat(Un,"-sub"),"".concat(Un,"-").concat(yr==="inline"?"inline":"vertical"),ct),role:"menu"},nn,{"data-menu-list":!0,ref:nt}),vt)},Gt=me.forwardRef(Qt);Gt.displayName="SubMenuList";var kt=Gt,Wn=le(50344);function ri(Re,Ze){return(0,Wn.Z)(Re).map(function(nt,ct){if(me.isValidElement(nt)){var vt,nn,on=nt.key,Un=(vt=(nn=nt.props)===null||nn===void 0?void 0:nn.eventKey)!==null&&vt!==void 0?vt:on,yr=Un==null;yr&&(Un="tmp_key-".concat([].concat((0,Ye.Z)(Ze),[ct]).join("-")));var Gn={key:Un,eventKey:Un};return me.cloneElement(nt,Gn)}return nt})}var Ai=le(62709),Zr={adjustX:1,adjustY:1},Hn={topLeft:{points:["bl","tl"],overflow:Zr},topRight:{points:["br","tr"],overflow:Zr},bottomLeft:{points:["tl","bl"],overflow:Zr},bottomRight:{points:["tr","br"],overflow:Zr},leftTop:{points:["tr","tl"],overflow:Zr},leftBottom:{points:["br","bl"],overflow:Zr},rightTop:{points:["tl","tr"],overflow:Zr},rightBottom:{points:["bl","br"],overflow:Zr}},tn={topLeft:{points:["bl","tl"],overflow:Zr},topRight:{points:["br","tr"],overflow:Zr},bottomLeft:{points:["tl","bl"],overflow:Zr},bottomRight:{points:["tr","br"],overflow:Zr},rightTop:{points:["tr","tl"],overflow:Zr},rightBottom:{points:["br","bl"],overflow:Zr},leftTop:{points:["tl","tr"],overflow:Zr},leftBottom:{points:["bl","br"],overflow:Zr}},Ur=null;function Jr(Re,Ze,nt){if(Ze)return Ze;if(nt)return nt[Re]||nt.other}var ai={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ti(Re){var Ze=Re.prefixCls,nt=Re.visible,ct=Re.children,vt=Re.popup,nn=Re.popupStyle,on=Re.popupClassName,Un=Re.popupOffset,yr=Re.disabled,Gn=Re.mode,Cn=Re.onVisibleChange,vn=me.useContext(oe),Bn=vn.getPopupContainer,Fn=vn.rtl,xr=vn.subMenuOpenDelay,Qn=vn.subMenuCloseDelay,Yn=vn.builtinPlacements,ir=vn.triggerSubMenuAction,rr=vn.forceSubMenuRender,Er=vn.rootClassName,He=vn.motion,We=vn.defaultMotions,Nt=me.useState(!1),_t=(0,ve.Z)(Nt,2),ln=_t[0],Mn=_t[1],En=Fn?(0,Ne.Z)((0,Ne.Z)({},tn),Yn):(0,Ne.Z)((0,Ne.Z)({},Hn),Yn),Zn=ai[Gn],Nn=Jr(Gn,He,We),hn=me.useRef(Nn);Gn!=="inline"&&(hn.current=Nn);var zn=(0,Ne.Z)((0,Ne.Z)({},hn.current),{},{leavedClassName:"".concat(Ze,"-hidden"),removeOnLeave:!1,motionAppear:!0}),jn=me.useRef();return me.useEffect(function(){return jn.current=(0,yt.Z)(function(){Mn(nt)}),function(){yt.Z.cancel(jn.current)}},[nt]),me.createElement(Ai.Z,{prefixCls:Ze,popupClassName:we()("".concat(Ze,"-popup"),(0,Be.Z)({},"".concat(Ze,"-rtl"),Fn),on,Er),stretch:Gn==="horizontal"?"minWidth":null,getPopupContainer:Bn,builtinPlacements:En,popupPlacement:Zn,popupVisible:ln,popup:vt,popupStyle:nn,popupAlign:Un&&{offset:Un},action:yr?[]:[ir],mouseEnterDelay:xr,mouseLeaveDelay:Qn,onPopupVisibleChange:Cn,forceRender:rr,popupMotion:zn,fresh:!0},ct)}var Ki=le(62874);function Tr(Re){var Ze=Re.id,nt=Re.open,ct=Re.keyPath,vt=Re.children,nn="inline",on=me.useContext(oe),Un=on.prefixCls,yr=on.forceSubMenuRender,Gn=on.motion,Cn=on.defaultMotions,vn=on.mode,Bn=me.useRef(!1);Bn.current=vn===nn;var Fn=me.useState(!Bn.current),xr=(0,ve.Z)(Fn,2),Qn=xr[0],Yn=xr[1],ir=Bn.current?nt:!1;me.useEffect(function(){Bn.current&&Yn(!1)},[vn]);var rr=(0,Ne.Z)({},Jr(nn,Gn,Cn));ct.length>1&&(rr.motionAppear=!1);var Er=rr.onVisibleChanged;return rr.onVisibleChanged=function(He){return!Bn.current&&!He&&Yn(!0),Er==null?void 0:Er(He)},Qn?null:me.createElement(Qe,{mode:nn,locked:!Bn.current},me.createElement(Ki.Z,(0,se.Z)({visible:ir},rr,{forceRender:yr,removeOnLeave:!1,leavedClassName:"".concat(Un,"-hidden")}),function(He){var We=He.className,Nt=He.style;return me.createElement(kt,{id:Ze,className:We,style:Nt},vt)}))}var Gr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],gt=["active"],ht=function(Ze){var nt,ct=Ze.style,vt=Ze.className,nn=Ze.title,on=Ze.eventKey,Un=Ze.warnKey,yr=Ze.disabled,Gn=Ze.internalPopupClose,Cn=Ze.children,vn=Ze.itemIcon,Bn=Ze.expandIcon,Fn=Ze.popupClassName,xr=Ze.popupOffset,Qn=Ze.popupStyle,Yn=Ze.onClick,ir=Ze.onMouseEnter,rr=Ze.onMouseLeave,Er=Ze.onTitleClick,He=Ze.onTitleMouseEnter,We=Ze.onTitleMouseLeave,Nt=(0,Se.Z)(Ze,Gr),_t=ue(on),ln=me.useContext(oe),Mn=ln.prefixCls,En=ln.mode,Zn=ln.openKeys,Nn=ln.disabled,hn=ln.overflowDisabled,zn=ln.activeKey,jn=ln.selectedKeys,hr=ln.itemIcon,Kn=ln.expandIcon,Ar=ln.onItemClick,ii=ln.onOpenChange,Fr=ln.onActive,qr=me.useContext(Tt),Ir=qr._internalRenderSubMenuItem,Rr=me.useContext(et),li=Rr.isSubPathKey,pi=Jt(),zr="".concat(Mn,"-submenu"),Or=Nn||yr,mi=me.useRef(),Yi=me.useRef(),Xi=vn!=null?vn:hr,Pi=Bn!=null?Bn:Kn,Ji=Zn.includes(on),ta=!hn&&Ji,_i=li(jn,on),Hi=mr(on,Or,He,We),ui=Hi.active,xi=(0,Se.Z)(Hi,gt),Ni=me.useState(!1),Qi=(0,ve.Z)(Ni,2),Ra=Qi[0],$a=Qi[1],Aa=function(Sa){Or||$a(Sa)},ua=function(Sa){Aa(!0),ir==null||ir({key:on,domEvent:Sa})},na=function(Sa){Aa(!1),rr==null||rr({key:on,domEvent:Sa})},Di=me.useMemo(function(){return ui||(En!=="inline"?Ra||li([zn],on):!1)},[En,ui,zn,Ra,on,li]),Ba=fr(pi.length),Bi=function(Sa){Or||(Er==null||Er({key:on,domEvent:Sa}),En==="inline"&&ii(on,!Ji))},ci=je(function(fa){Yn==null||Yn(qn(fa)),Ar(fa)}),ji=function(Sa){En!=="inline"&&ii(on,Sa)},ca=function(){Fr(on)},qi=_t&&"".concat(_t,"-popup"),oa=me.createElement("div",(0,se.Z)({role:"menuitem",style:Ba,className:"".concat(zr,"-title"),tabIndex:Or?null:-1,ref:mi,title:typeof nn=="string"?nn:null,"data-menu-id":hn&&_t?null:_t,"aria-expanded":ta,"aria-haspopup":!0,"aria-controls":qi,"aria-disabled":Or,onClick:Bi,onFocus:ca},xi),nn,me.createElement(Yr,{icon:En!=="horizontal"?Pi:void 0,props:(0,Ne.Z)((0,Ne.Z)({},Ze),{},{isOpen:ta,isSubMenu:!0})},me.createElement("i",{className:"".concat(zr,"-arrow")}))),wi=me.useRef(En);if(En!=="inline"&&pi.length>1?wi.current="vertical":wi.current=En,!hn){var pa=wi.current;oa=me.createElement(Ti,{mode:pa,prefixCls:zr,visible:!Gn&&ta&&En!=="inline",popupClassName:Fn,popupOffset:xr,popupStyle:Qn,popup:me.createElement(Qe,{mode:pa==="horizontal"?"vertical":pa},me.createElement(kt,{id:qi,ref:Yi},Cn)),disabled:Or,onVisibleChange:ji},oa)}var xa=me.createElement(Ut.Item,(0,se.Z)({role:"none"},Nt,{component:"li",style:ct,className:we()(zr,"".concat(zr,"-").concat(En),vt,(nt={},(0,Be.Z)(nt,"".concat(zr,"-open"),ta),(0,Be.Z)(nt,"".concat(zr,"-active"),Di),(0,Be.Z)(nt,"".concat(zr,"-selected"),_i),(0,Be.Z)(nt,"".concat(zr,"-disabled"),Or),nt)),onMouseEnter:ua,onMouseLeave:na}),oa,!hn&&me.createElement(Tr,{id:qi,open:ta,keyPath:pi},Cn));return Ir&&(xa=Ir(xa,Ze,{selected:_i,active:Di,open:ta,disabled:Or})),me.createElement(Qe,{onItemClick:ci,mode:En==="horizontal"?"vertical":En,itemIcon:Xi,expandIcon:Pi},xa)};function Ht(Re){var Ze=Re.eventKey,nt=Re.children,ct=Jt(Ze),vt=ri(nt,ct),nn=Kt();me.useEffect(function(){if(nn)return nn.registerPath(Ze,ct),function(){nn.unregisterPath(Ze,ct)}},[ct]);var on;return nn?on=vt:on=me.createElement(ht,Re,vt),me.createElement(en.Provider,{value:ct},on)}var sn=le(71002),Ln=["className","title","eventKey","children"],gr=["children"],vr=function(Ze){var nt=Ze.className,ct=Ze.title,vt=Ze.eventKey,nn=Ze.children,on=(0,Se.Z)(Ze,Ln),Un=me.useContext(oe),yr=Un.prefixCls,Gn="".concat(yr,"-item-group");return me.createElement("li",(0,se.Z)({role:"presentation"},on,{onClick:function(vn){return vn.stopPropagation()},className:we()(Gn,nt)}),me.createElement("div",{role:"presentation",className:"".concat(Gn,"-title"),title:typeof ct=="string"?ct:void 0},ct),me.createElement("ul",{role:"group",className:"".concat(Gn,"-list")},nn))};function Mr(Re){var Ze=Re.children,nt=(0,Se.Z)(Re,gr),ct=Jt(nt.eventKey),vt=ri(Ze,ct),nn=Kt();return nn?vt:me.createElement(vr,(0,nr.Z)(nt,["warnKey"]),vt)}function Cr(Re){var Ze=Re.className,nt=Re.style,ct=me.useContext(oe),vt=ct.prefixCls,nn=Kt();return nn?null:me.createElement("li",{role:"separator",className:we()("".concat(vt,"-item-divider"),Ze),style:nt})}var br=["label","children","key","type"];function cr(Re){return(Re||[]).map(function(Ze,nt){if(Ze&&(0,sn.Z)(Ze)==="object"){var ct=Ze,vt=ct.label,nn=ct.children,on=ct.key,Un=ct.type,yr=(0,Se.Z)(ct,br),Gn=on!=null?on:"tmp-".concat(nt);return nn||Un==="group"?Un==="group"?me.createElement(Mr,(0,se.Z)({key:Gn},yr,{title:vt}),cr(nn)):me.createElement(Ht,(0,se.Z)({key:Gn},yr,{title:vt}),cr(nn)):Un==="divider"?me.createElement(Cr,(0,se.Z)({key:Gn},yr)):me.createElement(Mi,(0,se.Z)({key:Gn},yr),vt)}return null}).filter(function(Ze){return Ze})}function fi(Re,Ze,nt){var ct=Re;return Ze&&(ct=cr(Ze)),ri(ct,nt)}var Dr=["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"],dr=[],ei=me.forwardRef(function(Re,Ze){var nt,ct,vt=Re,nn=vt.prefixCls,on=nn===void 0?"rc-menu":nn,Un=vt.rootClassName,yr=vt.style,Gn=vt.className,Cn=vt.tabIndex,vn=Cn===void 0?0:Cn,Bn=vt.items,Fn=vt.children,xr=vt.direction,Qn=vt.id,Yn=vt.mode,ir=Yn===void 0?"vertical":Yn,rr=vt.inlineCollapsed,Er=vt.disabled,He=vt.disabledOverflow,We=vt.subMenuOpenDelay,Nt=We===void 0?.1:We,_t=vt.subMenuCloseDelay,ln=_t===void 0?.1:_t,Mn=vt.forceSubMenuRender,En=vt.defaultOpenKeys,Zn=vt.openKeys,Nn=vt.activeKey,hn=vt.defaultActiveFirst,zn=vt.selectable,jn=zn===void 0?!0:zn,hr=vt.multiple,Kn=hr===void 0?!1:hr,Ar=vt.defaultSelectedKeys,ii=vt.selectedKeys,Fr=vt.onSelect,qr=vt.onDeselect,Ir=vt.inlineIndent,Rr=Ir===void 0?24:Ir,li=vt.motion,pi=vt.defaultMotions,zr=vt.triggerSubMenuAction,Or=zr===void 0?"hover":zr,mi=vt.builtinPlacements,Yi=vt.itemIcon,Xi=vt.expandIcon,Pi=vt.overflowedIndicator,Ji=Pi===void 0?"...":Pi,ta=vt.overflowedIndicatorPopupClassName,_i=vt.getPopupContainer,Hi=vt.onClick,ui=vt.onOpenChange,xi=vt.onKeyDown,Ni=vt.openAnimation,Qi=vt.openTransitionName,Ra=vt._internalRenderMenuItem,$a=vt._internalRenderSubMenuItem,Aa=(0,Se.Z)(vt,Dr),ua=me.useMemo(function(){return fi(Fn,Bn,dr)},[Fn,Bn]),na=me.useState(!1),Di=(0,ve.Z)(na,2),Ba=Di[0],Bi=Di[1],ci=me.useRef(),ji=Ft(Qn),ca=xr==="rtl",qi=(0,jt.Z)(En,{value:Zn,postState:function(Ia){return Ia||dr}}),oa=(0,ve.Z)(qi,2),wi=oa[0],pa=oa[1],xa=function(Ia){var Xa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function go(){pa(Ia),ui==null||ui(Ia)}Xa?(0,xe.flushSync)(go):go()},fa=me.useState(wi),Sa=(0,ve.Z)(fa,2),Ma=Sa[0],Va=Sa[1],ha=me.useRef(!1),_a=me.useMemo(function(){return(ir==="inline"||ir==="vertical")&&rr?["vertical",rr]:[ir,!1]},[ir,rr]),Ja=(0,ve.Z)(_a,2),Ga=Ja[0],so=Ja[1],Fa=Ga==="inline",Ca=me.useState(Ga),Oi=(0,ve.Z)(Ca,2),Vi=Oi[0],da=Oi[1],wa=me.useState(so),Ka=(0,ve.Z)(wa,2),io=Ka[0],ho=Ka[1];me.useEffect(function(){da(Ga),ho(so),ha.current&&(Fa?pa(Ma):xa(dr))},[Ga,so]);var Bo=me.useState(0),Oo=(0,ve.Z)(Bo,2),lo=Oo[0],Ao=Oo[1],ia=lo>=ua.length-1||Vi!=="horizontal"||He;me.useEffect(function(){Fa&&Va(wi)},[wi]),me.useEffect(function(){return ha.current=!0,function(){ha.current=!1}},[]);var Fi=qt(),Ta=Fi.registerPath,ka=Fi.unregisterPath,uo=Fi.refreshOverflowKeys,ao=Fi.isSubPathKey,hs=Fi.getKeyPath,Qo=Fi.getKeys,ps=Fi.getSubPathKeys,sa=me.useMemo(function(){return{registerPath:Ta,unregisterPath:ka}},[Ta,ka]),Hr=me.useMemo(function(){return{isSubPathKey:ao}},[ao]);me.useEffect(function(){uo(ia?dr:ua.slice(lo+1).map(function(oo){return oo.key}))},[lo,ia]);var ki=(0,jt.Z)(Nn||hn&&((nt=ua[0])===null||nt===void 0?void 0:nt.key),{value:Nn}),Li=(0,ve.Z)(ki,2),Ri=Li[0],Ha=Li[1],Ua=je(function(oo){Ha(oo)}),Fo=je(function(){Ha(void 0)});(0,me.useImperativeHandle)(Ze,function(){return{list:ci.current,focus:function(Ia){var Xa,go=Ri!=null?Ri:(Xa=ua.find(function(xs){return!xs.props.disabled}))===null||Xa===void 0?void 0:Xa.key;if(go){var yo,Ko,So;(yo=ci.current)===null||yo===void 0||(Ko=yo.querySelector("li[data-menu-id='".concat(ce(ji,go),"']")))===null||Ko===void 0||(So=Ko.focus)===null||So===void 0||So.call(Ko,Ia)}}}});var Zo=(0,jt.Z)(Ar||[],{value:ii,postState:function(Ia){return Array.isArray(Ia)?Ia:Ia==null?dr:[Ia]}}),ls=(0,ve.Z)(Zo,2),va=ls[0],No=ls[1],us=function(Ia){if(jn){var Xa=Ia.key,go=va.includes(Xa),yo;Kn?go?yo=va.filter(function(So){return So!==Xa}):yo=[].concat((0,Ye.Z)(va),[Xa]):yo=[Xa],No(yo);var Ko=(0,Ne.Z)((0,Ne.Z)({},Ia),{},{selectedKeys:yo});go?qr==null||qr(Ko):Fr==null||Fr(Ko)}!Kn&&wi.length&&Vi!=="inline"&&xa(dr)},cl=je(function(oo){Hi==null||Hi(qn(oo)),us(oo)}),As=je(function(oo,Ia){var Xa=wi.filter(function(yo){return yo!==oo});if(Ia)Xa.push(oo);else if(Vi!=="inline"){var go=ps(oo);Xa=Xa.filter(function(yo){return!go.has(yo)})}(0,yn.Z)(wi,Xa,!0)||xa(Xa,!0)}),ms=function(Ia,Xa){var go=Xa!=null?Xa:!wi.includes(Ia);As(Ia,go)},zo=or(Vi,Ri,ca,ji,ci,Qo,hs,Ha,ms,xi);me.useEffect(function(){Bi(!0)},[]);var Ts=me.useMemo(function(){return{_internalRenderMenuItem:Ra,_internalRenderSubMenuItem:$a}},[Ra,$a]),Is=Vi!=="horizontal"||He?ua:ua.map(function(oo,Ia){return me.createElement(Qe,{key:oo.key,overflowDisabled:Ia>lo},oo)}),Ys=me.createElement(Ut,(0,se.Z)({id:Qn,ref:ci,prefixCls:"".concat(on,"-overflow"),component:"ul",itemComponent:Mi,className:we()(on,"".concat(on,"-root"),"".concat(on,"-").concat(Vi),Gn,(ct={},(0,Be.Z)(ct,"".concat(on,"-inline-collapsed"),io),(0,Be.Z)(ct,"".concat(on,"-rtl"),ca),ct),Un),dir:xr,style:yr,role:"menu",tabIndex:vn,data:Is,renderRawItem:function(Ia){return Ia},renderRawRest:function(Ia){var Xa=Ia.length,go=Xa?ua.slice(-Xa):null;return me.createElement(Ht,{eventKey:Bt,title:Ji,disabled:ia,internalPopupClose:Xa===0,popupClassName:ta},go)},maxCount:Vi!=="horizontal"||He?Ut.INVALIDATE:Ut.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ia){Ao(Ia)},onKeyDown:zo},Aa));return me.createElement(Tt.Provider,{value:Ts},me.createElement(Ae.Provider,{value:ji},me.createElement(Qe,{prefixCls:on,rootClassName:Un,mode:Vi,openKeys:wi,rtl:ca,disabled:Er,motion:Ba?li:null,defaultMotions:Ba?pi:null,activeKey:Ri,onActive:Ua,onInactive:Fo,selectedKeys:va,inlineIndent:Rr,subMenuOpenDelay:Nt,subMenuCloseDelay:ln,forceSubMenuRender:Mn,builtinPlacements:mi,triggerSubMenuAction:Or,getPopupContainer:_i,itemIcon:Yi,expandIcon:Xi,onItemClick:cl,onOpenChange:As},me.createElement(et.Provider,{value:Hr},Ys),me.createElement("div",{style:{display:"none"},"aria-hidden":!0},me.createElement($t.Provider,{value:sa},ua)))))}),jr=ei,De=jr;De.Item=Mi,De.SubMenu=Ht,De.ItemGroup=Mr,De.Divider=Cr;var Fe=De},81626:function(bn,Zt){"use strict";Zt.Z={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"}},66680:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Be}});var se=le(67294);function Be(Ne){var Ye=se.useRef();Ye.current=Ne;var ve=se.useCallback(function(){for(var Se,Me=arguments.length,we=new Array(Me),me=0;me<Me;me++)we[me]=arguments[me];return(Se=Ye.current)===null||Se===void 0?void 0:Se.call.apply(Se,[Ye].concat(we))},[]);return ve}},21770:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Se}});var se=le(97685),Be=le(66680),Ne=le(8410),Ye=le(63896);function ve(Me){return Me!==void 0}function Se(Me,we){var me=we||{},Te=me.defaultValue,ot=me.value,Oe=me.onChange,st=me.postState,lt=(0,Ye.Z)(function(){return ve(ot)?ot:ve(Te)?typeof Te=="function"?Te():Te:typeof Me=="function"?Me():Me}),Je=(0,se.Z)(lt,2),Ge=Je[0],Ce=Je[1],pt=ot!==void 0?ot:Ge,zt=st?st(pt):pt,qe=(0,Be.Z)(Oe),ut=(0,Ye.Z)([pt]),xe=(0,se.Z)(ut,2),Ee=xe[0],Ve=xe[1];(0,Ne.o)(function(){var Mt=Ee[0];Ge!==Mt&&qe(Ge,Mt)},[Ee]),(0,Ne.o)(function(){ve(ot)||Ce(ot)},[ot]);var Xe=(0,Be.Z)(function(Mt,mt){Ce(Mt,mt),Ve([pt],mt)});return[zt,Xe]}},91881:function(bn,Zt,le){"use strict";var se=le(71002),Be=le(80334);function Ne(Ye,ve){var Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Me=new Set;function we(me,Te){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Oe=Me.has(me);if((0,Be.ZP)(!Oe,"Warning: There may be circular references"),Oe)return!1;if(me===Te)return!0;if(Se&&ot>1)return!1;Me.add(me);var st=ot+1;if(Array.isArray(me)){if(!Array.isArray(Te)||me.length!==Te.length)return!1;for(var lt=0;lt<me.length;lt++)if(!we(me[lt],Te[lt],st))return!1;return!0}if(me&&Te&&(0,se.Z)(me)==="object"&&(0,se.Z)(Te)==="object"){var Je=Object.keys(me);return Je.length!==Object.keys(Te).length?!1:Je.every(function(Ge){return we(me[Ge],Te[Ge],st)})}return!1}return we(Ye,ve)}Zt.Z=Ne},98423:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Be}});var se=le(1413);function Be(Ne,Ye){var ve=(0,se.Z)({},Ne);return Array.isArray(Ye)&&Ye.forEach(function(Se){delete ve[Se]}),ve}},73299:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return Zi}});var se=le(87462),Be=le(1413),Ne=le(71002),Ye=le(97685),ve=le(4942),Se=le(45987),Me=le(67294),we=le(73935),me=le(94184),Te=le.n(me),ot=le(48555),Oe=Me.forwardRef(function(At,An){var On=At.height,wn=At.offsetY,kr=At.offsetX,or=At.children,ar=At.prefixCls,Rn=At.onInnerResize,it=At.innerProps,dt=At.rtl,Bt=At.extra,qt={},je={display:"flex",flexDirection:"column"};if(wn!==void 0){var Ct;qt={height:On,position:"relative",overflow:"hidden"},je=(0,Be.Z)((0,Be.Z)({},je),{},(Ct={transform:"translateY(".concat(wn,"px)")},(0,ve.Z)(Ct,dt?"marginRight":"marginLeft",-kr),(0,ve.Z)(Ct,"position","absolute"),(0,ve.Z)(Ct,"left",0),(0,ve.Z)(Ct,"right",0),(0,ve.Z)(Ct,"top",0),Ct))}return Me.createElement("div",{style:qt},Me.createElement(ot.Z,{onResize:function(Ft){var an=Ft.offsetHeight;an&&Rn&&Rn()}},Me.createElement("div",(0,se.Z)({style:je,className:Te()((0,ve.Z)({},"".concat(ar,"-holder-inner"),ar)),ref:An},it),or,Bt)))});Oe.displayName="Filler";var st=Oe,lt=function(An){return+setTimeout(An,16)},Je=function(An){return clearTimeout(An)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(lt=function(An){return window.requestAnimationFrame(An)},Je=function(An){return window.cancelAnimationFrame(An)});var Ge=0,Ce=new Map;function pt(At){Ce.delete(At)}var zt=function(An){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ge+=1;var wn=Ge;function kr(or){if(or===0)pt(wn),An();else{var ar=lt(function(){kr(or-1)});Ce.set(wn,ar)}}return kr(On),wn};zt.cancel=function(At){var An=Ce.get(At);return pt(An),Je(An)};var qe=zt;function ut(At,An){var On="touches"in At?At.touches[0]:At;return On[An?"pageX":"pageY"]}var xe=Me.forwardRef(function(At,An){var On,wn=At.prefixCls,kr=At.rtl,or=At.scrollOffset,ar=At.scrollRange,Rn=At.onStartMove,it=At.onStopMove,dt=At.onScroll,Bt=At.horizontal,qt=At.spinSize,je=At.containerSize,Ct=At.style,Wt=At.thumbStyle,Ft=Me.useState(!1),an=(0,Ye.Z)(Ft,2),rn=an[0],Vn=an[1],Pr=Me.useState(null),nr=(0,Ye.Z)(Pr,2),Xn=nr[0],mr=nr[1],fr=Me.useState(null),Yr=(0,Ye.Z)(fr,2),xn=Yr[0],qn=Yr[1],Si=!kr,Ii=Me.useRef(),di=Me.useRef(),si=Me.useState(!1),zi=(0,Ye.Z)(si,2),Lr=zi[0],Mi=zi[1],Pn=Me.useRef(),Qt=function(){clearTimeout(Pn.current),Mi(!0),Pn.current=setTimeout(function(){Mi(!1)},3e3)},Gt=ar-je||0,kt=je-qt||0,Wn=Gt>0,ri=Me.useMemo(function(){if(or===0||Gt===0)return 0;var Ki=or/Gt;return Ki*kt},[or,Gt,kt]),Ai=function(Tr){Tr.stopPropagation(),Tr.preventDefault()},Zr=Me.useRef({top:ri,dragging:rn,pageY:Xn,startTop:xn});Zr.current={top:ri,dragging:rn,pageY:Xn,startTop:xn};var Hn=function(Tr){Vn(!0),mr(ut(Tr,Bt)),qn(Zr.current.top),Rn(),Tr.stopPropagation(),Tr.preventDefault()};Me.useEffect(function(){var Ki=function(ht){ht.preventDefault()},Tr=Ii.current,Gr=di.current;return Tr.addEventListener("touchstart",Ki),Gr.addEventListener("touchstart",Hn),function(){Tr.removeEventListener("touchstart",Ki),Gr.removeEventListener("touchstart",Hn)}},[]);var tn=Me.useRef();tn.current=Gt;var Ur=Me.useRef();Ur.current=kt,Me.useEffect(function(){if(rn){var Ki,Tr=function(ht){var Ht=Zr.current,sn=Ht.dragging,Ln=Ht.pageY,gr=Ht.startTop;if(qe.cancel(Ki),sn){var vr=ut(ht,Bt)-Ln,Mr=gr;!Si&&Bt?Mr-=vr:Mr+=vr;var Cr=tn.current,br=Ur.current,cr=br?Mr/br:0,fi=Math.ceil(cr*Cr);fi=Math.max(fi,0),fi=Math.min(fi,Cr),Ki=qe(function(){dt(fi,Bt)})}},Gr=function(){Vn(!1),it()};return window.addEventListener("mousemove",Tr),window.addEventListener("touchmove",Tr),window.addEventListener("mouseup",Gr),window.addEventListener("touchend",Gr),function(){window.removeEventListener("mousemove",Tr),window.removeEventListener("touchmove",Tr),window.removeEventListener("mouseup",Gr),window.removeEventListener("touchend",Gr),qe.cancel(Ki)}}},[rn]),Me.useEffect(function(){Qt()},[or]),Me.useImperativeHandle(An,function(){return{delayHidden:Qt}});var Jr="".concat(wn,"-scrollbar"),ai={position:"absolute",visibility:Lr&&Wn?null:"hidden"},Ti={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Bt?(ai.height=8,ai.left=0,ai.right=0,ai.bottom=0,Ti.height="100%",Ti.width=qt,Si?Ti.left=ri:Ti.right=ri):(ai.width=8,ai.top=0,ai.bottom=0,Si?ai.right=0:ai.left=0,Ti.width="100%",Ti.height=qt,Ti.top=ri),Me.createElement("div",{ref:Ii,className:Te()(Jr,(On={},(0,ve.Z)(On,"".concat(Jr,"-horizontal"),Bt),(0,ve.Z)(On,"".concat(Jr,"-vertical"),!Bt),(0,ve.Z)(On,"".concat(Jr,"-visible"),Lr),On)),style:(0,Be.Z)((0,Be.Z)({},ai),Ct),onMouseDown:Ai,onMouseMove:Qt},Me.createElement("div",{ref:di,className:Te()("".concat(Jr,"-thumb"),(0,ve.Z)({},"".concat(Jr,"-thumb-moving"),rn)),style:(0,Be.Z)((0,Be.Z)({},Ti),Wt),onMouseDown:Hn}))}),Ee=xe;function Ve(At){var An=At.children,On=At.setRef,wn=Me.useCallback(function(kr){On(kr)},[]);return Me.cloneElement(An,{ref:wn})}function Xe(At,An,On,wn,kr,or,ar){var Rn=ar.getKey;return At.slice(An,On+1).map(function(it,dt){var Bt=An+dt,qt=or(it,Bt,{style:{width:wn}}),je=Rn(it);return Me.createElement(Ve,{key:je,setRef:function(Wt){return kr(it,Wt)}},qt)})}function Mt(At){return At instanceof HTMLElement||At instanceof SVGElement}function mt(At){return Mt(At)?At:At instanceof Me.Component?we.findDOMNode(At):null}var St=le(15671),Ke=le(43144),Pt=function(){function At(){(0,St.Z)(this,At),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Ke.Z)(At,[{key:"set",value:function(On,wn){this.maps[On]=wn,this.id+=1}},{key:"get",value:function(On){return this.maps[On]}}]),At}(),Et=Pt;function Yt(At,An,On){var wn=Me.useState(0),kr=(0,Ye.Z)(wn,2),or=kr[0],ar=kr[1],Rn=(0,Me.useRef)(new Map),it=(0,Me.useRef)(new Et),dt=(0,Me.useRef)();function Bt(){qe.cancel(dt.current)}function qt(){var Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Bt();var Wt=function(){Rn.current.forEach(function(an,rn){if(an&&an.offsetParent){var Vn=mt(an),Pr=Vn.offsetHeight;it.current.get(rn)!==Pr&&it.current.set(rn,Vn.offsetHeight)}}),ar(function(an){return an+1})};Ct?Wt():dt.current=qe(Wt)}function je(Ct,Wt){var Ft=At(Ct),an=Rn.current.get(Ft);Wt?(Rn.current.set(Ft,Wt),qt()):Rn.current.delete(Ft),!an!=!Wt&&(Wt?An==null||An(Ct):On==null||On(Ct))}return(0,Me.useEffect)(function(){return Bt},[]),[je,qt,it.current,or]}function at(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Vt=at()?Me.useLayoutEffect:Me.useEffect,fn=function(An,On){var wn=Me.useRef(!0);Vt(function(){return An(wn.current)},On),Vt(function(){return wn.current=!1,function(){wn.current=!0}},[])},dn=function(An,On){fn(function(wn){if(!wn)return An()},On)},Ue=fn;function Le(At){var An=Me.useRef();An.current=At;var On=Me.useCallback(function(){for(var wn,kr=arguments.length,or=new Array(kr),ar=0;ar<kr;ar++)or[ar]=arguments[ar];return(wn=An.current)===null||wn===void 0?void 0:wn.call.apply(wn,[An].concat(or))},[]);return On}function Rt(At){var An=React.useRef(!1),On=React.useState(At),wn=_slicedToArray(On,2),kr=wn[0],or=wn[1];React.useEffect(function(){return An.current=!1,function(){An.current=!0}},[]);function ar(Rn,it){it&&An.current||or(Rn)}return[kr,ar]}function Sn(At){return At!==void 0}function un(At,An){var On=An||{},wn=On.defaultValue,kr=On.value,or=On.onChange,ar=On.postState,Rn=useState(function(){return Sn(kr)?kr:Sn(wn)?typeof wn=="function"?wn():wn:typeof At=="function"?At():At}),it=_slicedToArray(Rn,2),dt=it[0],Bt=it[1],qt=kr!==void 0?kr:dt,je=ar?ar(qt):qt,Ct=useEvent(or),Wt=useState([qt]),Ft=_slicedToArray(Wt,2),an=Ft[0],rn=Ft[1];useLayoutUpdateEffect(function(){var Pr=an[0];dt!==Pr&&Ct(dt,Pr)},[an]),useLayoutUpdateEffect(function(){Sn(kr)||Bt(kr)},[kr]);var Vn=useEvent(function(Pr,nr){Bt(Pr,nr),rn([qt],nr)});return[je,Vn]}var tt=le(31461);function ft(At,An,On){var wn=React.useRef({});return(!("value"in wn.current)||On(wn.current.condition,An))&&(wn.current.value=At(),wn.current.condition=An),wn.current.value}function Xt(At,An){typeof At=="function"?At(An):_typeof(At)==="object"&&At&&"current"in At&&(At.current=An)}function Tn(){for(var At=arguments.length,An=new Array(At),On=0;On<At;On++)An[On]=arguments[On];var wn=An.filter(function(kr){return kr});return wn.length<=1?wn[0]:function(kr){An.forEach(function(or){Xt(or,kr)})}}function mn(){for(var At=arguments.length,An=new Array(At),On=0;On<At;On++)An[On]=arguments[On];return useMemo(function(){return Tn.apply(void 0,An)},An,function(wn,kr){return wn.length!==kr.length||wn.every(function(or,ar){return or!==kr[ar]})})}function Ut(At){var An,On,wn=isMemo(At)?At.type.type:At.type;return!(typeof wn=="function"&&!((An=wn.prototype)!==null&&An!==void 0&&An.render)||typeof At=="function"&&!((On=At.prototype)!==null&&On!==void 0&&On.render))}function jt(At){return!isValidElement(At)||isFragment(At)?!1:Ut(At)}function _n(At,An,On,wn){if(!An.length)return On;var kr=_toArray(An),or=kr[0],ar=kr.slice(1),Rn;return!At&&typeof or=="number"?Rn=[]:Array.isArray(At)?Rn=_toConsumableArray(At):Rn=_objectSpread({},At),wn&&On===void 0&&ar.length===1?delete Rn[or][ar[0]]:Rn[or]=_n(Rn[or],ar,On,wn),Rn}function yn(At,An,On){var wn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return An.length&&wn&&On===void 0&&!get(At,An.slice(0,-1))?At:_n(At,An,On,wn)}function Ae(At){return _typeof(At)==="object"&&At!==null&&Object.getPrototypeOf(At)===Object.prototype}function ce(At){return Array.isArray(At)?[]:{}}var ue=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function pe(){for(var At=arguments.length,An=new Array(At),On=0;On<At;On++)An[On]=arguments[On];var wn=ce(An[0]);return An.forEach(function(kr){function or(ar,Rn){var it=new Set(Rn),dt=get(kr,ar),Bt=Array.isArray(dt);if(Bt||Ae(dt)){if(!it.has(dt)){it.add(dt);var qt=get(wn,ar);Bt?wn=yn(wn,ar,[]):(!qt||_typeof(qt)!=="object")&&(wn=yn(wn,ar,ce(dt))),ue(dt).forEach(function(je){or([].concat(_toConsumableArray(ar),[je]),it)})}}else wn=yn(wn,ar,dt)}or([])}),wn}var he={},oe=[],Ie=function(An){oe.push(An)};function Qe(At,An){if(0)var On}function Lt(At,An){if(0)var On}function $t(){he={}}function Kt(At,An,On){!An&&!he[On]&&(At(!1,On),he[On]=!0)}function en(At,An){Kt(Qe,At,An)}function Jt(At,An){Kt(Lt,At,An)}en.preMessage=Ie,en.resetWarned=$t,en.noteOnce=Jt;var et=null,wt=10;function Tt(At,An,On,wn,kr,or,ar,Rn){var it=Me.useRef(),dt=Me.useState(null),Bt=(0,Ye.Z)(dt,2),qt=Bt[0],je=Bt[1];return Ue(function(){if(qt&&qt.times<wt){if(!At.current){je(function(Qt){return(0,Be.Z)({},Qt)});return}or();var Ct=qt.targetAlign,Wt=qt.originAlign,Ft=qt.index,an=qt.offset,rn=At.current.clientHeight,Vn=!1,Pr=Ct,nr=null;if(rn){for(var Xn=Ct||Wt,mr=0,fr=0,Yr=0,xn=Math.min(An.length-1,Ft),qn=0;qn<=xn;qn+=1){var Si=kr(An[qn]);fr=mr;var Ii=On.get(Si);Yr=fr+(Ii===void 0?wn:Ii),mr=Yr}for(var di=Xn==="top"?an:rn-an,si=xn;si>=0;si-=1){var zi=kr(An[si]),Lr=On.get(zi);if(Lr===void 0){Vn=!0;break}if(di-=Lr,di<=0)break}switch(Xn){case"top":nr=fr-an;break;case"bottom":nr=Yr-rn+an;break;default:{var Mi=At.current.scrollTop,Pn=Mi+rn;fr<Mi?Pr="top":Yr>Pn&&(Pr="bottom")}}nr!==null&&ar(nr),nr!==qt.lastTop&&(Vn=!0)}Vn&&je(function(Qt){return(0,Be.Z)((0,Be.Z)({},Qt),{},{times:Qt.times+1,targetAlign:Pr,lastTop:nr})})}},[qt,At.current]),function(Ct){if(Ct==null){Rn();return}if(qe.cancel(it.current),typeof Ct=="number")ar(Ct);else if(Ct&&(0,Ne.Z)(Ct)==="object"){var Wt,Ft=Ct.align;"index"in Ct?Wt=Ct.index:Wt=An.findIndex(function(Vn){return kr(Vn)===Ct.key});var an=Ct.offset,rn=an===void 0?0:an;je({times:0,index:Wt,offset:rn,originAlign:Ft})}}}function Ot(At,An,On,wn){var kr=On-At,or=An-On,ar=Math.min(kr,or)*2;if(wn<=ar){var Rn=Math.floor(wn/2);return wn%2?On+Rn+1:On-Rn}return kr>or?On-(wn-or):On+(wn-kr)}function yt(At,An,On){var wn=At.length,kr=An.length,or,ar;if(wn===0&&kr===0)return null;wn<kr?(or=At,ar=An):(or=An,ar=At);var Rn={__EMPTY_ITEM__:!0};function it(Wt){return Wt!==void 0?On(Wt):Rn}for(var dt=null,Bt=Math.abs(wn-kr)!==1,qt=0;qt<ar.length;qt+=1){var je=it(or[qt]),Ct=it(ar[qt]);if(je!==Ct){dt=qt,Bt=Bt||je!==it(ar[qt+1]);break}}return dt===null?null:{index:dt,multiple:Bt}}function Dn(At,An,On){var wn=Me.useState(At),kr=(0,Ye.Z)(wn,2),or=kr[0],ar=kr[1],Rn=Me.useState(null),it=(0,Ye.Z)(Rn,2),dt=it[0],Bt=it[1];return Me.useEffect(function(){var qt=yt(or||[],At||[],An);(qt==null?void 0:qt.index)!==void 0&&(On==null||On(qt.index),Bt(At[qt.index])),ar(At)},[At]),[dt]}var gn=(typeof navigator=="undefined"?"undefined":(0,Ne.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),$n=gn,Kr=function(At,An){var On=(0,Me.useRef)(!1),wn=(0,Me.useRef)(null);function kr(){clearTimeout(wn.current),On.current=!0,wn.current=setTimeout(function(){On.current=!1},50)}var or=(0,Me.useRef)({top:At,bottom:An});return or.current.top=At,or.current.bottom=An,function(ar){var Rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,it=ar<0&&or.current.top||ar>0&&or.current.bottom;return Rn&&it?(clearTimeout(wn.current),On.current=!1):(!it||On.current)&&kr(),!On.current&&it}};function tr(At,An,On,wn,kr){var or=(0,Me.useRef)(0),ar=(0,Me.useRef)(null),Rn=(0,Me.useRef)(null),it=(0,Me.useRef)(!1),dt=Kr(An,On);function Bt(an,rn){qe.cancel(ar.current),or.current+=rn,Rn.current=rn,!dt(rn)&&($n||an.preventDefault(),ar.current=qe(function(){var Vn=it.current?10:1;kr(or.current*Vn),or.current=0}))}function qt(an,rn){kr(rn,!0),$n||an.preventDefault()}var je=(0,Me.useRef)(null),Ct=(0,Me.useRef)(null);function Wt(an){if(At){qe.cancel(Ct.current),Ct.current=qe(function(){je.current=null},2);var rn=an.deltaX,Vn=an.deltaY,Pr=an.shiftKey,nr=rn,Xn=Vn;(je.current==="sx"||!je.current&&Pr&&Vn&&!rn)&&(nr=Vn,Xn=0,je.current="sx");var mr=Math.abs(nr),fr=Math.abs(Xn);je.current===null&&(je.current=wn&&mr>fr?"x":"y"),je.current==="y"?Bt(an,Xn):qt(an,nr)}}function Ft(an){At&&(it.current=an.detail===Rn.current)}return[Wt,Ft]}var lr=14/15;function ur(At,An,On){var wn=(0,Me.useRef)(!1),kr=(0,Me.useRef)(0),or=(0,Me.useRef)(null),ar=(0,Me.useRef)(null),Rn,it=function(je){if(wn.current){var Ct=Math.ceil(je.touches[0].pageY),Wt=kr.current-Ct;kr.current=Ct,On(Wt)&&je.preventDefault(),clearInterval(ar.current),ar.current=setInterval(function(){Wt*=lr,(!On(Wt,!0)||Math.abs(Wt)<=.1)&&clearInterval(ar.current)},16)}},dt=function(){wn.current=!1,Rn()},Bt=function(je){Rn(),je.touches.length===1&&!wn.current&&(wn.current=!0,kr.current=Math.ceil(je.touches[0].pageY),or.current=je.target,or.current.addEventListener("touchmove",it),or.current.addEventListener("touchend",dt))};Rn=function(){or.current&&(or.current.removeEventListener("touchmove",it),or.current.removeEventListener("touchend",dt))},Ue(function(){return At&&An.current.addEventListener("touchstart",Bt),function(){var qt;(qt=An.current)===null||qt===void 0||qt.removeEventListener("touchstart",Bt),Rn(),clearInterval(ar.current)}},[At])}var ni=20;function Xr(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,On=At/An*100;return isNaN(On)&&(On=0),On=Math.max(On,ni),On=Math.min(On,At/2),Math.floor(On)}function Qr(At,An,On,wn){var kr=Me.useMemo(function(){return[new Map,[]]},[At,On.id,wn]),or=(0,Ye.Z)(kr,2),ar=or[0],Rn=or[1],it=function(Bt){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bt,je=ar.get(Bt),Ct=ar.get(qt);if(je===void 0||Ct===void 0)for(var Wt=At.length,Ft=Rn.length;Ft<Wt;Ft+=1){var an,rn=At[Ft],Vn=An(rn);ar.set(Vn,Ft);var Pr=(an=On.get(Vn))!==null&&an!==void 0?an:wn;if(Rn[Ft]=(Rn[Ft-1]||0)+Pr,Vn===Bt&&(je=Ft),Vn===qt&&(Ct=Ft),je!==void 0&&Ct!==void 0)break}return{top:Rn[je-1]||0,bottom:Rn[Ct]}};return it}var gi=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Sr=[],Ei={overflowY:"auto",overflowAnchor:"none"};function Ui(At,An){var On=At.prefixCls,wn=On===void 0?"rc-virtual-list":On,kr=At.className,or=At.height,ar=At.itemHeight,Rn=At.fullHeight,it=Rn===void 0?!0:Rn,dt=At.style,Bt=At.data,qt=At.children,je=At.itemKey,Ct=At.virtual,Wt=At.direction,Ft=At.scrollWidth,an=At.component,rn=an===void 0?"div":an,Vn=At.onScroll,Pr=At.onVirtualScroll,nr=At.onVisibleChange,Xn=At.innerProps,mr=At.extraRender,fr=At.styles,Yr=(0,Se.Z)(At,gi),xn=!!(Ct!==!1&&or&&ar),qn=xn&&Bt&&(ar*Bt.length>or||!!Ft),Si=Wt==="rtl",Ii=Te()(wn,(0,ve.Z)({},"".concat(wn,"-rtl"),Si),kr),di=Bt||Sr,si=(0,Me.useRef)(),zi=(0,Me.useRef)(),Lr=(0,Me.useState)(0),Mi=(0,Ye.Z)(Lr,2),Pn=Mi[0],Qt=Mi[1],Gt=(0,Me.useState)(0),kt=(0,Ye.Z)(Gt,2),Wn=kt[0],ri=kt[1],Ai=(0,Me.useState)(!1),Zr=(0,Ye.Z)(Ai,2),Hn=Zr[0],tn=Zr[1],Ur=function(){tn(!0)},Jr=function(){tn(!1)},ai=Me.useCallback(function(hn){return typeof je=="function"?je(hn):hn==null?void 0:hn[je]},[je]),Ti={getKey:ai};function Ki(hn){Qt(function(zn){var jn;typeof hn=="function"?jn=hn(zn):jn=hn;var hr=Un(jn);return si.current.scrollTop=hr,hr})}var Tr=(0,Me.useRef)({start:0,end:di.length}),Gr=(0,Me.useRef)(),gt=Dn(di,ai),ht=(0,Ye.Z)(gt,1),Ht=ht[0];Gr.current=Ht;var sn=Yt(ai,null,null),Ln=(0,Ye.Z)(sn,4),gr=Ln[0],vr=Ln[1],Mr=Ln[2],Cr=Ln[3],br=Me.useMemo(function(){if(!xn)return{scrollHeight:void 0,start:0,end:di.length-1,offset:void 0};if(!qn){var hn;return{scrollHeight:((hn=zi.current)===null||hn===void 0?void 0:hn.offsetHeight)||0,start:0,end:di.length-1,offset:void 0}}for(var zn=0,jn,hr,Kn,Ar=di.length,ii=0;ii<Ar;ii+=1){var Fr=di[ii],qr=ai(Fr),Ir=Mr.get(qr),Rr=zn+(Ir===void 0?ar:Ir);Rr>=Pn&&jn===void 0&&(jn=ii,hr=zn),Rr>Pn+or&&Kn===void 0&&(Kn=ii),zn=Rr}return jn===void 0&&(jn=0,hr=0,Kn=Math.ceil(or/ar)),Kn===void 0&&(Kn=di.length-1),Kn=Math.min(Kn+1,di.length-1),{scrollHeight:zn,start:jn,end:Kn,offset:hr}},[qn,xn,Pn,di,Cr,or]),cr=br.scrollHeight,fi=br.start,Dr=br.end,dr=br.offset;Tr.current.start=fi,Tr.current.end=Dr;var ei=Me.useState({width:0,height:or}),jr=(0,Ye.Z)(ei,2),De=jr[0],Fe=jr[1],Re=function(zn){Fe({width:zn.width||zn.offsetWidth,height:zn.height||zn.offsetHeight})},Ze=(0,Me.useRef)(),nt=(0,Me.useRef)(),ct=Me.useMemo(function(){return Xr(De.width,Ft)},[De.width,Ft]),vt=Me.useMemo(function(){return Xr(De.height,cr)},[De.height,cr]),nn=cr-or,on=(0,Me.useRef)(nn);on.current=nn;function Un(hn){var zn=hn;return Number.isNaN(on.current)||(zn=Math.min(zn,on.current)),zn=Math.max(zn,0),zn}var yr=Pn<=0,Gn=Pn>=nn,Cn=Kr(yr,Gn),vn=function(){return{x:Si?-Wn:Wn,y:Pn}},Bn=(0,Me.useRef)(vn()),Fn=Le(function(){if(Pr){var hn=vn();(Bn.current.x!==hn.x||Bn.current.y!==hn.y)&&(Pr(hn),Bn.current=hn)}});function xr(hn,zn){var jn=hn;zn?((0,we.flushSync)(function(){ri(jn)}),Fn()):Ki(jn)}function Qn(hn){var zn=hn.currentTarget.scrollTop;zn!==Pn&&Ki(zn),Vn==null||Vn(hn),Fn()}var Yn=function(zn){var jn=zn,hr=Ft-De.width;return jn=Math.max(jn,0),jn=Math.min(jn,hr),jn},ir=Le(function(hn,zn){zn?((0,we.flushSync)(function(){ri(function(jn){var hr=jn+(Si?-hn:hn);return Yn(hr)})}),Fn()):Ki(function(jn){var hr=jn+hn;return hr})}),rr=tr(xn,yr,Gn,!!Ft,ir),Er=(0,Ye.Z)(rr,2),He=Er[0],We=Er[1];ur(xn,si,function(hn,zn){return Cn(hn,zn)?!1:(He({preventDefault:function(){},deltaY:hn}),!0)}),Ue(function(){function hn(jn){xn&&jn.preventDefault()}var zn=si.current;return zn.addEventListener("wheel",He),zn.addEventListener("DOMMouseScroll",We),zn.addEventListener("MozMousePixelScroll",hn),function(){zn.removeEventListener("wheel",He),zn.removeEventListener("DOMMouseScroll",We),zn.removeEventListener("MozMousePixelScroll",hn)}},[xn]),Ue(function(){Ft&&ri(function(hn){return Yn(hn)})},[De.width,Ft]);var Nt=function(){var zn,jn;(zn=Ze.current)===null||zn===void 0||zn.delayHidden(),(jn=nt.current)===null||jn===void 0||jn.delayHidden()},_t=Tt(si,di,Mr,ar,ai,function(){return vr(!0)},Ki,Nt);Me.useImperativeHandle(An,function(){return{getScrollInfo:vn,scrollTo:function(zn){function jn(hr){return hr&&(0,Ne.Z)(hr)==="object"&&("left"in hr||"top"in hr)}jn(zn)?(zn.left!==void 0&&ri(Yn(zn.left)),_t(zn.top)):_t(zn)}}}),Ue(function(){if(nr){var hn=di.slice(fi,Dr+1);nr(hn,di)}},[fi,Dr,di]);var ln=Qr(di,ai,Mr,ar),Mn=mr==null?void 0:mr({start:fi,end:Dr,virtual:qn,offsetX:Wn,offsetY:dr,rtl:Si,getSize:ln}),En=Xe(di,fi,Dr,Ft,gr,qt,Ti),Zn=null;or&&(Zn=(0,Be.Z)((0,ve.Z)({},it?"height":"maxHeight",or),Ei),xn&&(Zn.overflowY="hidden",Ft&&(Zn.overflowX="hidden"),Hn&&(Zn.pointerEvents="none")));var Nn={};return Si&&(Nn.dir="rtl"),Me.createElement("div",(0,se.Z)({style:(0,Be.Z)((0,Be.Z)({},dt),{},{position:"relative"}),className:Ii},Nn,Yr),Me.createElement(ot.Z,{onResize:Re},Me.createElement(rn,{className:"".concat(wn,"-holder"),style:Zn,ref:si,onScroll:Qn,onMouseEnter:Nt},Me.createElement(st,{prefixCls:wn,height:cr,offsetX:Wn,offsetY:dr,scrollWidth:Ft,onInnerResize:vr,ref:zi,innerProps:Xn,rtl:Si,extra:Mn},En))),qn&&cr>or&&Me.createElement(Ee,{ref:Ze,prefixCls:wn,scrollOffset:Pn,scrollRange:cr,rtl:Si,onScroll:xr,onStartMove:Ur,onStopMove:Jr,spinSize:vt,containerSize:De.height,style:fr==null?void 0:fr.verticalScrollBar,thumbStyle:fr==null?void 0:fr.verticalScrollBarThumb}),qn&&Ft&&Me.createElement(Ee,{ref:nt,prefixCls:wn,scrollOffset:Wn,scrollRange:Ft,rtl:Si,onScroll:xr,onStartMove:Ur,onStopMove:Jr,spinSize:ct,containerSize:De.width,horizontal:!0,style:fr==null?void 0:fr.horizontalScrollBar,thumbStyle:fr==null?void 0:fr.horizontalScrollBarThumb}))}var ea=Me.forwardRef(Ui);ea.displayName="List";var ra=ea,Zi=ra},66392:function(bn,Zt){"use strict";var le;var se=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ne=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Se=Symbol.for("react.provider"),Me=Symbol.for("react.context"),we=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),lt=Symbol.for("react.offscreen"),Je;Je=Symbol.for("react.module.reference");function Ge(Ce){if(typeof Ce=="object"&&Ce!==null){var pt=Ce.$$typeof;switch(pt){case se:switch(Ce=Ce.type,Ce){case Ne:case ve:case Ye:case Te:case ot:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case we:case Me:case me:case st:case Oe:case Se:return Ce;default:return pt}}case Be:return pt}}}le=Me,le=Se,le=se,le=me,le=Ne,le=st,le=Oe,le=Be,le=ve,le=Ye,le=Te,le=ot,le=function(){return!1},le=function(){return!1},le=function(Ce){return Ge(Ce)===Me},le=function(Ce){return Ge(Ce)===Se},le=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===se},le=function(Ce){return Ge(Ce)===me},le=function(Ce){return Ge(Ce)===Ne},le=function(Ce){return Ge(Ce)===st},le=function(Ce){return Ge(Ce)===Oe},le=function(Ce){return Ge(Ce)===Be},le=function(Ce){return Ge(Ce)===ve},le=function(Ce){return Ge(Ce)===Ye},le=function(Ce){return Ge(Ce)===Te},le=function(Ce){return Ge(Ce)===ot},le=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ne||Ce===ve||Ce===Ye||Ce===Te||Ce===ot||Ce===lt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===st||Ce.$$typeof===Oe||Ce.$$typeof===Se||Ce.$$typeof===Me||Ce.$$typeof===me||Ce.$$typeof===Je||Ce.getModuleId!==void 0)},le=Ge},31461:function(bn,Zt,le){"use strict";le(66392)},84279:function(bn,Zt,le){"use strict";var se=Object.defineProperty,Be=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Me=(a,y,b)=>y in a?se(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,we=(a,y)=>{for(var b in y||(y={}))ve.call(y,b)&&Me(a,b,y[b]);if(Ye)for(var b of Ye(y))Se.call(y,b)&&Me(a,b,y[b]);return a},me=(a,y)=>Be(a,Ne(y)),Te=a=>typeof a=="symbol"?a:a+"",ot=(a,y)=>{var b={};for(var E in a)ve.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Ye)for(var E of Ye(a))y.indexOf(E)<0&&Se.call(a,E)&&(b[E]=a[E]);return b};function Oe(a){return Array.isArray(a)}var st={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 lt(){return"window"in globalThis&&"document"in globalThis}function Je(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function Ge(){return typeof navigator.vibrate=="function"}function Ce(){var a,y;if(!lt())return"other";const b=(y=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?y:navigator.platform;return/^mac/i.test(b)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(b)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function pt(){if(!lt())return!0;if(/firefox/i.test(navigator.userAgent)){const a=navigator.userAgent.match(/firefox\/(\d+)/i);return a?parseInt(a[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const a=navigator.userAgent.match(/edg\/(\d+)/i);return a?parseInt(a[1])>=79:!1}return!0}function zt(){return HTMLElement.prototype.hasOwnProperty("popover")}var qe={strings:st,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return qe._locale||(qe._locale=lt()?navigator.language.slice(0,5):"en-US"),qe._locale},set locale(a){qe._locale=a,qe._numberFormatter=void 0,qe.dirty=!0},get numberFormatter(){return qe._numberFormatter||(qe._numberFormatter=new Intl.NumberFormat(qe.locale)),qe._numberFormatter},merge(a,y){if(typeof a=="string"&&y)qe.strings[a]=we(we({},qe.strings[a]),y),qe.dirty=!0;else for(const b of Object.keys(a))qe.merge(b,a[b])},get dirty(){return qe._dirty},set dirty(a){qe._dirty||qe._dirty===a||(qe._dirty=!0,setTimeout(()=>{qe._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return qe._subscribers.push(a),qe._subscribers.length-1},unsubscribe(a){a<0||a>=qe._subscribers.length||(qe._subscribers[a]=void 0)},update(a){let y=a.querySelectorAll("[data-l10n-tooltip]");for(const b of y){const E=b.getAttribute("data-l10n-tooltip");if(E){const ee=ut(E);ee&&b.setAttribute("data-tooltip",ee)}}y=a.querySelectorAll("[data-l10n-arial-label]");for(const b of y){const E=b.getAttribute("data-l10n-arial-label");if(E){const ee=ut(E);ee&&b.setAttribute("aria-label",ee)}}}};function ut(a,...y){if(a===void 0)return;let b="";const E=qe.locale;qe.strings[E]&&(b=qe.strings[E][a]);const ee=E.slice(0,2);if(!b&&qe.strings[ee]&&(b=qe.strings[ee][a]),b||(b=qe.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(b),fe=0;for(;ae;){if(y[fe++]){const be=ae[2]?parseInt(ae[2],10)-1:fe-1;let _e=y[be];typeof _e=="number"&&(_e=qe.numberFormatter.format(_e)),b=b.replace(ae[1],_e)}ae=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var xe={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Ee={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ve={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"},Xe={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"},Mt={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 St(a){var y,b,E,ee,re,ae;const fe=a.split("!");let ge,be,_e,ze=255,rt=255,xt=255,It=-1;const In=fe.length>0&&fe[0].startsWith("-");In&&(fe[0]=fe[0].slice(1));for(let Br=0;Br<fe.length;Br++){ge=ze,be=rt,_e=xt;const kn=(y=fe[Br].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],sr=kn==null?void 0:kn.toLowerCase(),$r=kn&&(ae=(re=(ee=(E=(b=Xe[sr])!=null?b:Xe[Mt[kn]])!=null?E:Ee[kn])!=null?ee:mt[kn])!=null?re:xe[kn])!=null?ae:fe[Br].trim();let pr=$r.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(pr!=null&&pr[1]&&pr[2]&&pr[3])ze=Math.max(0,Math.min(255,Number.parseInt(pr[1],16))),rt=Math.max(0,Math.min(255,Number.parseInt(pr[2],16))),xt=Math.max(0,Math.min(255,Number.parseInt(pr[3],16)));else if(pr=$r.match(/^#([\da-f]{3})$/i),pr!=null&&pr[1]){const bi=Number.parseInt(pr[1][0],16),$i=Number.parseInt(pr[1][1],16),Ci=Number.parseInt(pr[1][2],16);ze=Math.max(0,Math.min(255,bi*16+bi)),rt=Math.max(0,Math.min(255,$i*16+$i)),xt=Math.max(0,Math.min(255,Ci*16+Ci))}else if(pr=$r.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),pr!=null&&pr[1]&&pr[2]&&pr[3])ze=Math.max(0,Math.min(255,Number.parseInt(pr[1]))),rt=Math.max(0,Math.min(255,Number.parseInt(pr[2]))),xt=Math.max(0,Math.min(255,Number.parseInt(pr[3])));else return;It>=0&&(ze=(1-It)*ze+It*ge,rt=(1-It)*rt+It*be,xt=(1-It)*xt+It*_e,It=-1),Br+1<fe.length&&(It=Math.max(0,Math.min(100,Number.parseInt(fe[++Br])))/100)}return It>=0&&(ze=It*ze+(1-It)*ge,rt=It*rt+(1-It)*be,xt=It*xt+(1-It)*_e),In&&(ze=255-ze,rt=255-rt,xt=255-xt),"#"+("00"+Math.round(ze).toString(16)).slice(-2)+("00"+Math.round(rt).toString(16)).slice(-2)+("00"+Math.round(xt).toString(16)).slice(-2)}function Ke(a){var y,b;return a=a.trim(),(b=(y=Ve[a.toLowerCase()])!=null?y:Ve[Mt[a]])!=null?b:St(a)}function Pt(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&y.a===void 0&&(y.a=1),y}function Et(a,y,b){return b<0&&(b+=6),b>=6&&(b-=6),b<1?(y-a)*b+a:b<3?y:b<4?(y-a)*(4-b)+a:a}function Yt(a){let[y,b,E]=[a.h,a.s,a.l];y=(y+360)%360/60,E=Math.max(0,Math.min(E,1)),b=Math.max(0,Math.min(b,1));const ee=E<=.5?E*(b+1):E+b-E*b,re=E*2-ee;return{r:Math.round(255*Et(re,ee,y+2)),g:Math.round(255*Et(re,ee,y)),b:Math.round(255*Et(re,ee,y-2))}}function at(a){return a<0?0:a>255?255:Math.round(a)}function Vt(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(at(y)<<16)+(at(b)<<8)+at(E)).toString(16).slice(1);return ee[0]===ee[1]&&ee[2]===ee[3]&&ee[4]===ee[5]&&ee[6]===ee[7]&&(ee=ee[0]+ee[2]+ee[4]),"#"+ee}function fn(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const ee=Math.min(y,b,E),re=Math.max(y,b,E),ae=re-ee;let fe,ge;re===ee?fe=0:y===re?fe=(b-E)/ae:b===re?fe=2+(E-y)/ae:E===re&&(fe=4+(y-b)/ae),fe=Math.min(fe*60,360),fe<0&&(fe+=360);const be=(ee+re)/2;return re===ee?ge=0:be<=.5?ge=ae/(re+ee):ge=ae/(2-re-ee),{h:fe,s:ge,l:be}}function dn(a){let y=Pt(a);if(!y)return a;let{h:b,s:E,l:ee}=fn(y);return E+=.1,ee-=.1,Vt(Yt({h:b,s:E,l:ee}))}var Ue={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},Rt=[{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 Sn(a,y,b){if(!/[A-Za-z\d]/.test(a)||(b==="up"&&(b=void 0),!y&&!b))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of Rt)if((!y||ee.variant===y)&&(!b||ee.style===b)&&E>=ee.offset&&E<ee.offset+ee.len){const re=ee.start+E-ee.offset;return String.fromCodePoint(Le[re]||re)}return a}function un(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Le)if(Le[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of Rt)if(a>=b.start&&a<b.start+b.len)return{char:String.fromCodePoint(a-b.start+b.offset),variant:b.variant,style:b.style};return{char:String.fromCodePoint(a)}}function tt(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const ee=(y=E.codePointAt(0))!=null?y:0;let re=Ue[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:ae,variant:fe,style:ge}=un(ee);switch(re=ae,fe){case"double-struck":re=`\\mathbb{${re}}`;break;case"fraktur":re=`\\mathfrak{${re}}`;break;case"script":re=`\\mathscr{${re}}`;break;case"sans-serif":re=`\\mathsf{${re}}`;break;case"monospace":re=`\\mathtt{${re}}`;break;case"calligraphic":re=`\\mathcal{${re}}`;break}switch(ge){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function ft(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Xt={},Tn=we({},Ue),mn={},Ut={},jt={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}"},_n={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}},yn={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}},Ae={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:yn},"amsmath.sty":{package:_n,primitive:!0},"texvc.sty":{package:jt,primitive:!1}},ce={" ":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},ue=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,pe,he;pt()?(pe=new RegExp("\\p{Letter}","u"),he=new RegExp("[0-9\\p{Letter}]","u")):(pe=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,he=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function oe(a,y,b="mord",E){y!==void 0&&(Xt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},Tn[y]||(Tn[y]=a))}function Ie(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);oe(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)oe(E,ee,re!=null?re:y,ae!=null?ae:b)}function Qe(a,y){for(let b=a;b<=y;b++)oe(String.fromCodePoint(b),b)}function Lt(a){var y;return(y=Ut[a])!=null?y:null}function $t(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const ae in mn)ae.startsWith(y)&&!mn[ae].infix&&ee.push({match:ae,frequency:(b=mn[ae].frequency)!=null?b:0});for(const ae in Xt)ae.startsWith(y)&&ee.push({match:ae,frequency:(E=Xt[ae].frequency)!=null?E:0});const re=y.substring(1);for(const ae of Object.keys(a.options.macros))ae.startsWith(re)&&ee.push({match:"\\"+ae,frequency:0});return ee.sort((ae,fe)=>{var ge,be;return ae.frequency===fe.frequency?ae.match.length===fe.match.length?ae.match<fe.match?-1:1:ae.match.length-fe.match.length:((ge=fe.frequency)!=null?ge:0)-((be=ae.frequency)!=null?be:0)}),ee.map(ae=>ae.match)}function Kt(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function en(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Kt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...en(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Kt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...en(b[E]))}return y}function Jt(a){if(!a)return"";let y="",b=!0;for(const E of a)typeof E.value=="string"?y+=E.value:b=!1;return b?y:""}function et(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)Ut[E]=b}function wt(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:en(y),createAtom:b};for(const re of a)Ut[re]=ee}function Tt(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:en(y),ifMode:b.ifMode,isFunction:(E=b.isFunction)!=null?E:!1,applyMode:b.applyMode,infix:(ee=b.infix)!=null?ee:!1,parse:b.parse,createAtom:b.createAtom,applyStyle:b.applyStyle,serialize:b.serialize,render:b.render};if(typeof a=="string")mn["\\"+a]=re;else for(const ae of a)mn["\\"+ae]=re}var Ot;function yt(a){return Ot||(Ot=gn(Ae)),a?gn(we(we({},Ot),a)):Ot}function Dn(a,y){var b,E,ee,re;if(typeof a=="string"){let ae=0;const fe=a;return/(^|[^\\])#1/.test(fe)&&(ae=1),/(^|[^\\])#2/.test(fe)&&(ae=2),/(^|[^\\])#3/.test(fe)&&(ae=3),/(^|[^\\])#4/.test(fe)&&(ae=4),/(^|[^\\])#5/.test(fe)&&(ae=5),/(^|[^\\])#6/.test(fe)&&(ae=6),/(^|[^\\])#7/.test(fe)&&(ae=7),/(^|[^\\])#8/.test(fe)&&(ae=8),/(^|[^\\])#9/.test(fe)&&(ae=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:ae,def:fe}}return we({expand:(ee=y==null?void 0:y.expand)!=null?ee:!0,captureSelection:(re=y==null?void 0:y.captureSelection)!=null?re:!0,args:0},a)}function gn(a){if(!a)return{};const y={};for(const b of Object.keys(a)){const E=a[b];if(E==null)delete y[b];else if(typeof E=="object"&&"package"in E)for(const ee of Object.keys(E.package))y[ee]=Dn(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Dn(E)}return y}function $n(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=mn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Xt[a]:ce[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ce[a]})}else if(y==="math"){if(b=Xt[a],!b&&a.length===1){const E=tr("math",a.codePointAt(0));return E.startsWith("\\")?me(we({},$n(E,"math")),{command:E}):null}}else ce[a]?b={definitionType:"symbol",type:"mord",codepoint:ce[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Kr(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function tr(a,y){if(y===void 0)return"";if(a==="math"&&Tn[y])return Tn[y];if(a==="text"){const b=Object.keys(ce).find(E=>ce[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var lr=[0,.68889,0,0,.72222],ur=[0,.68889,0,0,.66667],ni=[0,.68889,0,0,.77778],Xr=[0,.68889,0,0,.61111],Qr=[.16667,.68889,0,0,.77778],gi=[0,.68889,0,0,.55556],Sr=[0,0,0,0,.25],Ei=[0,.825,0,0,2.33334],Ui=[0,.9,0,0,2.33334],ea=[0,.68889,0,0,.54028],ra=[-.03598,.46402,0,0,.5],Zi=[-.13313,.36687,0,0,1],At=[.01354,.52239,0,0,1],An=[.01354,.52239,0,0,1.11111],On=[0,.54986,0,0,1],wn=[0,.69224,0,0,.5],kr=[0,.43056,0,0,1],or=[.08198,.58198,0,0,.77778],ar=[.19444,.69224,0,0,.41667],Rn=[.1808,.675,0,0,1],it=[.19444,.69224,0,0,.83334],dt=[.13667,.63667,0,0,1],Bt=[-.064,.437,0,0,1.334],qt=[.08167,.58167,0,0,.77778],je=[0,.69224,0,0,.72222],Ct=[0,.69224,0,0,.66667],Wt=[-.13313,.36687,0,0,.77778],Ft=[.06062,.54986,0,0,.77778],an=[0,.69224,0,0,.77778],rn=[.25583,.75583,0,0,.77778],Vn=[.25142,.75726,0,0,.77778],Pr=[.20576,.70576,0,0,.77778],nr=[.30274,.79383,0,0,.77778],Xn=[.22958,.72958,0,0,.77778],mr=[.1808,.675,0,0,.77778],fr=[.13667,.63667,0,0,.77778],Yr=[.13597,.63597,0,0,.77778],xn=[.03517,.54986,0,0,.77778],qn=[0,.675,0,0,.77778],Si=[.19444,.69224,0,0,.61111],Ii=[0,.54986,0,0,.76042],di=[0,.54986,0,0,.66667],si=[.0391,.5391,0,0,.77778],zi=[.03517,.54986,0,0,1.33334],Lr=[.38569,.88569,0,0,.77778],Mi=[.23222,.74111,0,0,.77778],Pn=[.19444,.69224,0,0,.77778],Qt=[0,.37788,0,0,.5],Gt=[0,.54986,0,0,.72222],kt=[0,.69224,0,0,.83334],Wn=[.11111,.69224,0,0,.66667],ri=[.26167,.75726,0,0,.77778],Ai=[.48256,.98256,0,0,.77778],Zr=[.28481,.79383,0,0,.77778],Hn=[.08167,.58167,0,0,.22222],tn=[.08167,.58167,0,0,.38889],Ur=[0,.43056,.04028,0,.66667],Jr=[.41951,.91951,0,0,.77778],ai=[.24982,.74947,0,0,.38865],Ti=[.08319,.58283,0,0,.75623],Ki=[0,.10803,0,0,.27764],Tr=[0,.47534,0,0,.50181],Gr=[.18906,.47534,0,0,.50181],gt=[0,.69141,0,0,.50181],ht=[.24982,.74947,0,0,.27764],Ht=[0,.69141,0,0,.21471],sn=[.25,.75,0,0,.44722],Ln=[0,.64444,0,0,.575],gr=[.08556,.58556,0,0,.89444],vr=[0,.69444,0,0,.89444],Mr=[0,.68611,0,0,.9],Cr=[0,.68611,0,0,.86944],br=[.25,.75,0,0,.575],cr=[.25,.75,0,0,.31944],fi=[0,.69444,0,0,.63889],Dr=[0,.69444,0,0,.31944],dr=[0,.44444,0,0,.63889],ei=[0,.44444,0,0,.51111],jr=[0,.69444,0,0,.575],De=[.13333,.63333,0,0,.89444],Fe=[0,.44444,0,0,.31944],Re=[0,.69444,0,0,.86944],Ze=[0,.68611,0,0,.69166],nt=[0,.68611,0,0,.83055],ct=[0,.68611,0,0,.89444],vt=[0,.69444,0,0,.60278],nn=[.19444,.69444,0,0,.51111],on=[0,.69444,0,0,.83055],Un=[-.10889,.39111,0,0,1.14999],yr=[.19444,.69444,0,0,.575],Gn=[.19444,.69444,0,0,1.14999],Cn=[.19444,.69444,0,0,.70277],vn=[.05556,.75,0,0,.575],Bn=[0,.68611,0,0,.95833],Fn=[.08556,.58556,0,0,.76666],xr=[-.02639,.47361,0,0,.575],Qn=[0,.44444,0,0,.89444],Yn=[0,.55556,0,0,.76666],ir=[-.10889,.39111,0,0,.89444],rr=[.00222,.50222,0,0,.89444],Er=[.19667,.69667,0,0,.89444],He=[.08556,.58556,0,0,1.14999],We=[0,.69444,0,0,.70277],Nt=[-.02778,.47222,0,0,.575],_t=[.25,.75,0,0,.51111],ln=[-.13889,.36111,0,0,1.14999],Mn=[.19444,.69444,0,0,1.02222],En=[.12963,.69444,0,0,.89444],Zn=[.19444,.69444,0,0,.44722],Nn=[0,.64444,.13167,0,.59111],hn=[.19444,.64444,.13167,0,.59111],zn=[0,.68611,.17208,0,.8961],jn=[.19444,.44444,.105,0,.53222],hr=[0,.44444,.085,0,.82666],Kn=[0,.69444,.06709,0,.59111],Ar=[0,.69444,.12945,0,.35555],ii=[0,.69444,0,0,.94888],Fr=[0,.69444,.11472,0,.59111],qr=[0,.68611,.10778,0,.88555],Ir=[0,.69444,.07939,0,.62055],Rr=[0,.69444,.12417,0,.30667],li=[0,.64444,.13556,0,.51111],pi=[.19444,.64444,.13556,0,.51111],zr=[0,.68333,.16389,0,.74333],Or=[.19444,.43056,.08847,0,.46],mi=[0,.43056,.07514,0,.71555],Yi=[0,.69444,.06646,0,.51111],Xi=[0,.69444,0,0,.83129],Pi=[0,.69444,.1225,0,.51111],Ji=[0,.68333,.09403,0,.76666],ta=[0,.68333,.11111,0,.76666],_i=[0,.69444,.06961,0,.51444],Hi=[0,.69444,0,0,.27778],ui=[.25,.75,0,0,.38889],xi=[0,.64444,0,0,.5],Ni=[0,.69444,0,0,.77778],Qi=[0,.68333,0,0,.75],Ra=[0,.68333,0,0,.77778],$a=[0,.68333,0,0,.68056],Aa=[0,.68333,0,0,.72222],ua=[.25,.75,0,0,.5],na=[.25,.75,0,0,.27778],Di=[0,.69444,0,0,.5],Ba=[0,.69444,0,0,.55556],Bi=[0,.43056,0,0,.44445],ci=[0,.43056,0,0,.5],ji=[.19444,.43056,0,0,.55556],ca=[0,.43056,0,0,.55556],qi=[.08333,.58333,0,0,.77778],oa=[0,.43056,0,0,.27778],wi=[0,.66786,0,0,.27778],pa=[0,.69444,0,0,.75],xa=[0,.66786,0,0,.5],fa=[0,.68333,0,0,.625],Sa=[.19444,.69444,0,0,.44445],Ma=[0,.69444,0,0,.72222],Va=[.19444,.69444,0,0,.5],ha=[.19444,.69444,0,0,1],_a=[.011,.511,0,0,1.126],Ja=[.19444,.69444,0,0,.61111],Ga=[.05556,.75,0,0,.5],so=[0,.68333,0,0,.83334],Fa=[.0391,.5391,0,0,.66667],Ca=[-.05555,.44445,0,0,.5],Oi=[0,.43056,0,0,.77778],Vi=[0,.55556,0,0,.66667],da=[-.03625,.46375,0,0,.77778],wa=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],io=[0,.69444,0,0,.61111],ho=[-.03472,.46528,0,0,.5],Bo=[.25,.75,0,0,.44445],Oo=[-.14236,.35764,0,0,1],lo=[.244,.744,0,0,.412],Ao=[.19444,.69444,0,0,.88889],ia=[.12963,.69444,0,0,.77778],Fi=[.19444,.69444,0,0,.38889],Ta=[.011,.511,0,0,1.638],ka=[.19444,.69444,0,0,0],uo=[0,.44444,0,0,.575],ao=[.19444,.44444,0,0,.575],hs=[0,.68611,0,0,.75555],Qo=[0,.69444,0,0,.66759],ps=[0,.68611,0,0,.80555],sa=[0,.68611,.08229,0,.98229],Hr=[0,.68611,0,0,.76666],ki=[0,.44444,0,0,.58472],Li=[.19444,.44444,0,0,.6118],Ri=[.19444,.43056,0,0,.5],Ha=[0,.68333,.02778,.08334,.76278],Ua=[0,.68333,.08125,.05556,.83125],Fo=[0,.43056,0,.05556,.48472],Zo=[.19444,.43056,0,.08334,.51702],ls=[.25,.75,0,0,.42778],va=[0,.69444,0,0,.55],No=[0,.69444,0,0,.73334],us=[0,.69444,0,0,.79445],cl=[0,.69444,0,0,.51945],As=[0,.69444,0,0,.70278],ms=[0,.69444,0,0,.76389],zo=[.25,.75,0,0,.34306],Ts=[0,.69444,0,0,.56111],Is=[0,.69444,0,0,.25556],Ys=[.19444,.45833,0,0,.56111],oo=[0,.45833,0,0,.56111],Ia=[0,.69444,0,0,.30556],Xa=[0,.69444,0,0,.58056],go=[0,.69444,0,0,.67223],yo=[0,.69444,0,0,.85556],Ko=[0,.69444,0,0,.55834],So=[0,.65556,.11156,0,.5],xs=[0,.69444,.08094,0,.70834],Xl=[.17014,0,0,0,.44445],ql=[0,.69444,.0799,0,.5],vu=[0,.69444,0,0,.73752],Xu=[0,.69444,.09205,0,.5],Ks=[0,.69444,.09031,0,.77778],Ds=[0,.69444,.07816,0,.27778],yu=[0,.69444,.00316,0,.5],Yl=[.19444,.69444,0,0,.83334],Da=[.05556,.75,0,0,.83334],ma=[0,.75,0,0,.5],Ho=[.125,.08333,0,0,.27778],es=[0,.08333,0,0,.27778],ga=[0,.65556,0,0,.5],za=[0,.69444,0,0,.47222],Oa=[0,.69444,0,0,.66667],po=[0,.69444,0,0,.59722],is=[0,.69444,0,0,.54167],Hs=[0,.69444,0,0,.70834],gs=[.25,.75,0,0,.28889],Jl=[0,.69444,0,0,.51667],jd=[0,.44444,0,0,.44445],Vd=[.19444,.44444,0,0,.51667],qu=[0,.44444,0,0,.38333],jc=[0,.44444,0,0,.51667],Yu=[0,.69444,0,0,.83334],Ud=[.35001,.85,0,0,.45834],Ju=[.35001,.85,0,0,.57778],Qu=[.35001,.85,0,0,.41667],Vc=[.35001,.85,0,0,.58334],bu=[0,.72222,0,0,.55556],ec=[1e-5,.6,0,0,.66667],Uc=[1e-5,.6,0,0,.77778],Ql=[.25001,.75,0,0,.94445],Gd=[.306,.805,.19445,0,.47222],xu=[.30612,.805,.19445,0,.47222],jo=[.25001,.75,0,0,.83334],Pl=[.35001,.85,0,0,.47222],Gc=[.25001,.75,0,0,1.11111],Xc=[.65002,1.15,0,0,.59722],vs=[.65002,1.15,0,0,.81111],ja=[.65002,1.15,0,0,.47222],Ms=[.65002,1.15,0,0,.66667],Ps=[0,.75,0,0,1],Js=[.55001,1.05,0,0,1.27778],qc=[.862,1.36,.44445,0,.55556],tc=[.86225,1.36,.44445,0,.55556],Bl=[.55001,1.05,0,0,1.11111],nc=[.65002,1.15,0,0,.52778],rc=[.65002,1.15,0,0,.61111],Ol=[.55001,1.05,0,0,1.51112],Yc=[.95003,1.45,0,0,.73611],ic=[.95003,1.45,0,0,1.04445],Qs=[.95003,1.45,0,0,.52778],Su=[.95003,1.45,0,0,.75],wu=[0,.75,0,0,1.44445],ac=[.95003,1.45,0,0,.58334],Cu=[1.25003,1.75,0,0,.79167],oc=[1.25003,1.75,0,0,1.27778],Jc=[1.25003,1.75,0,0,.58334],sc=[1.25003,1.75,0,0,.80556],Eu=[0,.825,0,0,1.8889],lc=[1.25003,1.75,0,0,.63889],uc=[.64502,1.155,0,0,.875],Mu=[1e-5,.6,0,0,.875],cc=[-99e-5,.601,0,0,.66667],dc=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Qc=[.65002,1.15,0,0,.88889],Nl=[.90001,0,0,0,.88889],fc=[-.00499,.605,0,0,1.05556],Rl=[0,.12,0,0,.45],yi=[0,.61111,0,0,.525],Ss=[.08333,.69444,0,0,.525],ed=[-.08056,.53055,0,0,.525],qd=[-.05556,.55556,0,0,.525],as=[0,.43056,0,0,.525],To=[.22222,.43056,0,0,.525],_u=[0,0,0,0,.525],Yd={"AMS-Regular":{32:Sr,65:lr,66:ur,67:lr,68:lr,69:ur,70:Xr,71:ni,72:ni,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:ni,76:ur,77:[0,.68889,0,0,.94445],78:lr,79:Qr,80:Xr,81:Qr,82:lr,83:gi,84:ur,85:lr,86:lr,87:[0,.68889,0,0,1],88:lr,89:lr,90:ur,107:gi,160:Sr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:gi,295:ea,710:Ei,732:Ui,770:Ei,771:Ui,989:qt,1008:Ur,8245:[0,.54986,0,0,.275],8463:ea,8487:lr,8498:gi,8502:ur,8503:[0,.68889,0,0,.44445],8504:ur,8513:[0,.68889,0,0,.63889],8592:ra,8594:ra,8602:Zi,8603:Zi,8606:At,8608:At,8610:An,8611:An,8619:On,8620:On,8621:[-.13313,.37788,0,0,1.38889],8622:Zi,8624:wn,8625:wn,8630:kr,8631:kr,8634:or,8635:or,8638:ar,8639:ar,8642:ar,8643:ar,8644:Rn,8646:Rn,8647:Rn,8648:it,8649:Rn,8650:it,8651:At,8652:At,8653:Zi,8654:Zi,8655:Zi,8666:dt,8667:dt,8669:[-.13313,.37788,0,0,1],8672:Bt,8674:Bt,8705:[0,.825,0,0,.5],8708:gi,8709:qt,8717:[0,.43056,0,0,.42917],8722:ra,8724:[.08198,.69224,0,0,.77778],8726:qt,8733:an,8736:je,8737:je,8738:[.03517,.52239,0,0,.72222],8739:Hn,8740:[.25142,.74111,0,0,.27778],8741:tn,8742:[.25142,.74111,0,0,.5],8756:Ct,8757:Ct,8764:Wt,8765:[-.13313,.37788,0,0,.77778],8769:Wt,8770:da,8774:nr,8776:wa,8778:qt,8782:Ft,8783:Ft,8785:or,8786:or,8787:or,8790:an,8791:Xn,8796:[.08198,.91667,0,0,.77778],8806:rn,8807:rn,8808:Vn,8809:Vn,8812:[.25583,.75583,0,0,.5],8814:Pr,8815:Pr,8816:nr,8817:nr,8818:Xn,8819:Xn,8822:mr,8823:mr,8828:fr,8829:fr,8830:Xn,8831:Xn,8832:Pr,8833:Pr,8840:nr,8841:nr,8842:Yr,8843:Yr,8847:xn,8848:xn,8858:or,8859:or,8861:or,8862:qn,8863:qn,8864:qn,8865:qn,8872:[0,.69224,0,0,.61111],8873:je,8874:[0,.69224,0,0,.88889],8876:Xr,8877:Xr,8878:lr,8879:lr,8882:xn,8883:xn,8884:fr,8885:fr,8888:[0,.54986,0,0,1.11111],8890:ji,8891:Si,8892:Si,8901:[0,.54986,0,0,.27778],8903:qt,8905:qt,8906:qt,8907:an,8908:an,8909:[-.03598,.46402,0,0,.77778],8910:Ii,8911:Ii,8912:xn,8913:xn,8914:di,8915:di,8916:Ct,8918:si,8919:si,8920:zi,8921:zi,8922:Lr,8923:Lr,8926:fr,8927:fr,8928:nr,8929:nr,8934:Mi,8935:Mi,8936:Mi,8937:Mi,8938:Pr,8939:Pr,8940:nr,8941:nr,8994:Pn,8995:Pn,9416:[.15559,.69224,0,0,.90222],9484:wn,9488:wn,9492:Qt,9496:Qt,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:qn,9633:qn,9650:Gt,9651:Gt,9654:xn,9660:Gt,9661:Gt,9664:xn,9674:Wn,9733:[.19444,.69224,0,0,.94445],10003:kt,10016:kt,10731:Wn,10846:[.19444,.75583,0,0,.61111],10877:fr,10878:fr,10885:rn,10886:rn,10887:Yr,10888:Yr,10889:ri,10890:ri,10891:Ai,10892:Ai,10901:fr,10902:fr,10933:Vn,10934:Vn,10935:ri,10936:ri,10937:ri,10938:ri,10949:rn,10950:rn,10955:Zr,10956:Zr,57350:Hn,57351:tn,57352:qt,57353:Ur,57356:Vn,57357:Vn,57358:Jr,57359:nr,57360:nr,57361:Jr,57366:Vn,57367:Vn,57368:Vn,57369:Vn,57370:Yr,57371:Yr},"Caligraphic-Regular":{32:Sr,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:Sr},"Fraktur-Regular":{32:Sr,33:[0,.69141,0,0,.29574],34:Ht,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:ai,41:ai,42:[0,.62119,0,0,.27764],43:Ti,44:Ki,45:Ti,46:Ki,47:[.24982,.74947,0,0,.50181],48:Tr,49:Tr,50:Tr,51:Gr,52:Gr,53:Gr,54:gt,55:Gr,56:gt,57:Gr,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:ht,93:ht,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:Sr,8216:Ht,8217:Ht,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:Sr,33:[0,.69444,0,0,.35],34:vt,35:[.19444,.69444,0,0,.95833],36:vn,37:[.05556,.75,0,0,.95833],38:vr,39:Dr,40:sn,41:sn,42:[0,.75,0,0,.575],43:De,44:[.19444,.15556,0,0,.31944],45:qu,46:[0,.15556,0,0,.31944],47:br,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,58:Fe,59:[.19444,.44444,0,0,.31944],60:gr,61:ir,62:gr,63:[0,.69444,0,0,.54305],64:vr,65:Cr,66:[0,.68611,0,0,.81805],67:nt,68:[0,.68611,0,0,.88194],69:hs,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Mr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:Ze,77:[0,.68611,0,0,1.09166],78:Mr,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:Cr,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:cr,92:br,93:cr,94:jr,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:fi,99:ei,100:fi,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:fi,105:Dr,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Dr,109:[0,.44444,0,0,.95833],110:dr,111:uo,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:dr,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:ei,123:br,124:cr,125:br,126:[.35,.34444,0,0,.575],160:Sr,163:[0,.69444,0,0,.86853],168:jr,172:[0,.44444,0,0,.76666],176:Re,177:De,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:De,216:[.04861,.73472,0,0,.89444],223:po,230:[0,.44444,0,0,.83055],247:De,248:[.09722,.54167,0,0,.575],305:Fe,338:[0,.68611,0,0,1.16944],339:Qn,567:[.19444,.44444,0,0,.35139],710:jr,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:jr,715:jr,728:jr,729:Dr,730:Re,732:jr,733:jr,915:Ze,916:Bn,920:ct,923:ps,926:Hr,928:Mr,931:nt,933:ct,934:nt,936:ct,937:nt,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Dr,8217:Dr,8220:vt,8221:vt,8224:nn,8225:nn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:Qo,8465:on,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:on,8501:We,8592:Un,8593:yr,8594:Un,8595:yr,8596:Un,8597:br,8598:Gn,8599:Gn,8600:Gn,8601:Gn,8636:Un,8637:Un,8640:Un,8641:Un,8656:Un,8657:Cn,8658:Un,8659:Cn,8660:Un,8661:[.25,.75,0,0,.70277],8704:fi,8706:[0,.69444,.06389,0,.62847],8707:fi,8709:vn,8711:Bn,8712:Fn,8715:Fn,8722:De,8723:De,8725:br,8726:br,8727:Nt,8728:xr,8729:xr,8730:[.18,.82,0,0,.95833],8733:Qn,8734:[0,.44444,0,0,1.14999],8736:je,8739:cr,8741:br,8743:Yn,8744:Yn,8745:Yn,8746:Yn,8747:[.19444,.69444,.12778,0,.56875],8764:ir,8768:[.19444,.69444,0,0,.31944],8771:rr,8776:[.02444,.52444,0,0,.89444],8781:rr,8801:rr,8804:Er,8805:Er,8810:He,8811:He,8826:gr,8827:gr,8834:gr,8835:gr,8838:Er,8839:Er,8846:Yn,8849:Er,8850:Er,8851:Yn,8852:Yn,8853:De,8854:De,8855:De,8856:De,8857:De,8866:We,8867:We,8868:vr,8869:vr,8900:xr,8901:[-.02639,.47361,0,0,.31944],8902:Nt,8968:_t,8969:_t,8970:_t,8971:_t,8994:ln,8995:ln,9651:Mn,9657:Nt,9661:Mn,9667:Nt,9711:Gn,9824:En,9825:En,9826:En,9827:En,9837:[0,.75,0,0,.44722],9838:Zn,9839:Zn,10216:sn,10217:sn,10815:Mr,10927:Er,10928:Er,57376:ka},"Main-BoldItalic":{32:Sr,33:[0,.69444,.11417,0,.38611],34:Ir,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Ar,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:Nn,49:Nn,50:Nn,51:Nn,52:hn,53:Nn,54:Nn,55:hn,56:Nn,57:Nn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Fr,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:zn,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:zn,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:Kn,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:jn,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:jn,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:Sr,168:[0,.69444,.11473,0,.59111],176:ii,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:hr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:hr,567:[.19444,.44444,.04611,0,.385],710:Kn,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:Ar,730:ii,732:Fr,733:Fr,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:zn,931:[0,.68611,.11431,0,.82666],933:qr,934:[0,.68611,.05632,0,.82666],936:qr,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Ar,8217:Ar,8220:[0,.69444,.16772,0,.62055],8221:Ir},"Main-Italic":{32:Sr,33:Rr,34:_i,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Rr,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:li,49:li,50:li,51:li,52:pi,53:li,54:li,55:pi,56:li,57:li,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Pi,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:zr,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:zr,79:Ji,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:zr,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:Yi,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:Or,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:Or,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:Sr,168:[0,.66786,.10474,0,.51111],176:Xi,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:mi,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:mi,710:Yi,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:Xi,732:[0,.66786,.11585,0,.51111],733:Pi,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Ji,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:zr,931:[0,.68333,.12028,0,.71555],933:ta,934:[0,.68333,.05986,0,.71555],936:ta,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Rr,8217:Rr,8220:[0,.69444,.1685,0,.51444],8221:_i,8463:ea},"Main-Regular":{32:Sr,33:Hi,34:Di,35:Yl,36:Ga,37:Da,38:Ni,39:Hi,40:ui,41:ui,42:ma,43:qi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ua,48:xi,49:xi,50:xi,51:xi,52:xi,53:xi,54:xi,55:xi,56:xi,57:xi,58:oa,59:[.19444,.43056,0,0,.27778],60:si,61:Wt,62:si,63:za,64:Ni,65:Qi,66:[0,.68333,0,0,.70834],67:Aa,68:[0,.68333,0,0,.76389],69:$a,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Qi,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:Ra,76:fa,77:[0,.68333,0,0,.91667],78:Qi,79:Ra,80:$a,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Aa,85:Qi,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Qi,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:na,92:ua,93:na,94:Di,95:[.31,.12056,.02778,0,.5],97:ci,98:Ba,99:Bi,100:Ba,101:Bi,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Ba,105:wi,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Hi,109:[0,.43056,0,0,.83334],110:ca,111:ci,112:ji,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:ca,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:Bi,123:ua,124:na,125:ua,126:[.35,.31786,0,0,.5],160:Sr,163:[0,.69444,0,0,.76909],167:Sa,168:xa,172:[0,.43056,0,0,.66667],176:pa,177:qi,182:Ja,184:Xl,198:[0,.68333,0,0,.90278],215:qi,216:[.04861,.73194,0,0,.77778],223:Di,230:[0,.43056,0,0,.72222],247:qi,248:[.09722,.52778,0,0,.5],305:oa,338:[0,.68333,0,0,1.01389],339:Oi,567:[.19444,.43056,0,0,.30556],710:Di,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Di,715:Di,728:Di,729:wi,730:pa,732:xa,733:Di,915:fa,916:so,920:Ra,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Qi,931:Aa,933:Ra,934:Aa,936:Ra,937:Aa,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Hi,8217:Hi,8220:Di,8221:Di,8224:Sa,8225:Sa,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:ea,8465:Ma,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ma,8501:io,8592:Zi,8593:Va,8594:Zi,8595:Va,8596:Zi,8597:ua,8598:ha,8599:ha,8600:ha,8601:ha,8614:[.011,.511,0,0,1],8617:_a,8618:_a,8636:Zi,8637:Zi,8640:Zi,8641:Zi,8652:[.011,.671,0,0,1],8656:Zi,8657:Ja,8658:Zi,8659:Ja,8660:Zi,8661:[.25,.75,0,0,.61111],8704:Ba,8706:[0,.69444,.05556,.08334,.5309],8707:Ba,8709:Ga,8711:so,8712:Fa,8715:Fa,8722:qi,8723:qi,8725:ua,8726:ua,8727:ho,8728:Ca,8729:Ca,8730:[.2,.8,0,0,.83334],8733:Oi,8734:kr,8736:je,8739:na,8741:ua,8743:Vi,8744:Vi,8745:Vi,8746:Vi,8747:[.19444,.69444,.11111,0,.41667],8764:Wt,8768:[.19444,.69444,0,0,.27778],8771:da,8773:[-.022,.589,0,0,1],8776:wa,8781:da,8784:[-.133,.67,0,0,.778],8801:da,8804:Yr,8805:Yr,8810:Ka,8811:Ka,8826:si,8827:si,8834:si,8835:si,8838:Yr,8839:Yr,8846:Vi,8849:Yr,8850:Yr,8851:Vi,8852:Vi,8853:qi,8854:qi,8855:qi,8856:qi,8857:qi,8866:io,8867:io,8868:Ni,8869:Ni,8872:[.249,.75,0,0,.867],8900:Ca,8901:[-.05555,.44445,0,0,.27778],8902:ho,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:Bo,8969:Bo,8970:Bo,8971:Bo,8994:Oo,8995:Oo,9136:lo,9137:lo,9651:Ao,9657:ho,9661:Ao,9667:ho,9711:ha,9824:ia,9825:ia,9826:ia,9827:ia,9837:[0,.75,0,0,.38889],9838:Fi,9839:Fi,10216:ui,10217:ui,10222:lo,10223:lo,10229:[.011,.511,0,0,1.609],10230:Ta,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:Ta,10815:Qi,10927:Yr,10928:Yr,57376:ka},"Math-BoldItalic":{32:Sr,48:uo,49:uo,50:uo,51:ao,52:ao,53:ao,54:Ln,55:ao,56:Ln,57:ao,65:Cr,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:sa,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:hs,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:Qo,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:ki,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:Sr,915:[0,.68611,.15972,0,.65694],916:Bn,920:[0,.68611,.03194,0,.86722],923:ps,926:[0,.68611,.07458,0,.84125],928:sa,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Hr,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:ki,960:[0,.44444,.03704,0,.68241],961:Li,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:Li,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Sr,48:ci,49:ci,50:ci,51:Ri,52:Ri,53:Ri,54:xi,55:Ri,56:xi,57:Ri,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:Ua,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:Ha,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:Fo,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:Sr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ha,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Ua,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:Fo,960:[0,.43056,.03588,0,.57003],961:Zo,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:Zo,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Sr,33:[0,.69444,0,0,.36667],34:Ko,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:Ia,40:ls,41:ls,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:va,49:va,50:va,51:va,52:va,53:va,54:va,55:va,56:va,57:va,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:cl,64:No,65:No,66:No,67:As,68:us,69:[0,.69444,0,0,.64167],70:io,71:No,72:us,73:[0,.69444,0,0,.33056],74:cl,75:ms,76:Xa,77:[0,.69444,0,0,.97778],78:us,79:us,80:As,81:[.10556,.69444,0,0,.79445],82:As,83:io,84:No,85:ms,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:No,89:[0,.69444,.0275,0,.73334],90:go,91:zo,93:zo,94:va,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ts,99:[0,.45833,0,0,.48889],100:Ts,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ts,105:Is,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Is,109:[0,.45833,0,0,.86667],110:oo,111:[0,.45833,0,0,.55],112:Ys,113:Ys,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:oo,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:Sr,168:va,176:No,180:va,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:va,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:va,729:Ia,730:No,732:va,733:va,915:Xa,916:[0,.69444,0,0,.91667],920:yo,923:go,926:No,928:us,931:us,933:yo,934:us,936:yo,937:us,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ia,8217:Ia,8220:Ko,8221:Ko},"SansSerif-Italic":{32:Sr,33:[0,.69444,.05733,0,.31945],34:yu,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:Ds,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:Ho,45:[0,.44444,.01946,0,.33333],46:es,47:[.25,.75,.13164,0,.5],48:So,49:So,50:So,51:So,52:So,53:So,54:So,55:So,56:So,57:So,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:Oa,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:xs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:is,77:[0,.69444,.08094,0,.875],78:xs,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:ql,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:Sr,168:[0,.67937,.06385,0,.5],176:vu,184:Xl,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:ql,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Xu,715:Di,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:vu,732:[0,.67659,.08826,0,.5],733:Xu,915:[0,.69444,.13372,0,.54167],916:Yu,920:[0,.69444,.07555,0,.77778],923:io,926:[0,.69444,.12816,0,.66667],928:xs,931:[0,.69444,.11983,0,.72222],933:Ks,934:[0,.69444,.04603,0,.72222],936:Ks,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ds,8217:Ds,8220:[0,.69444,.14205,0,.5],8221:yu},"SansSerif-Regular":{32:Sr,33:[0,.69444,0,0,.31945],34:Di,35:Yl,36:Ga,37:Da,38:[0,.69444,0,0,.75834],39:Hi,40:ui,41:ui,42:ma,43:qi,44:Ho,45:[0,.44444,0,0,.33333],46:es,47:ua,48:ga,49:ga,50:ga,51:ga,52:ga,53:ga,54:ga,55:ga,56:ga,57:ga,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:za,64:Oa,65:Oa,66:Oa,67:fi,68:[0,.69444,0,0,.72223],69:po,70:[0,.69444,0,0,.56945],71:Oa,72:Hs,73:Hi,74:za,75:[0,.69444,0,0,.69445],76:is,77:[0,.69444,0,0,.875],78:Hs,79:[0,.69444,0,0,.73611],80:fi,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Ba,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:Oa,89:[0,.69444,.025,0,.66667],90:io,91:gs,93:gs,94:Di,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Jl,99:jd,100:Jl,101:jd,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Jl,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:jc,111:[0,.44444,0,0,.5],112:Vd,113:Vd,114:[0,.44444,.01389,0,.34167],115:qu,116:[0,.57143,0,0,.36111],117:jc,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:Sr,168:[0,.67937,0,0,.5],176:Oa,184:Xl,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Di,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Di,715:Di,728:Di,729:[0,.67937,0,0,.27778],730:Oa,732:[0,.67659,0,0,.5],733:Di,915:is,916:Yu,920:Ni,923:io,926:Oa,928:Hs,931:Ma,933:Ni,934:Ma,936:Ni,937:Ma,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Hi,8217:Hi,8220:Di,8221:Di},"Script-Regular":{32:Sr,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:Sr},"Size1-Regular":{32:Sr,40:Ud,41:Ud,47:Ju,91:Qu,92:Ju,93:Qu,123:Vc,125:Vc,160:Sr,710:bu,732:bu,770:bu,771:bu,8214:[-99e-5,.601,0,0,.77778],8593:ec,8595:ec,8657:Uc,8659:Uc,8719:Ql,8720:Ql,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:xu,8748:Gd,8749:Gd,8750:xu,8896:jo,8897:jo,8898:jo,8899:jo,8968:Pl,8969:Pl,8970:Pl,8971:Pl,9168:cc,10216:Pl,10217:Pl,10752:Gc,10753:Gc,10754:Gc,10756:jo,10758:jo},"Size2-Regular":{32:Sr,40:Xc,41:Xc,47:vs,91:ja,92:vs,93:ja,123:Ms,125:Ms,160:Sr,710:Ps,732:Ps,770:Ps,771:Ps,8719:Js,8720:Js,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:tc,8748:qc,8749:qc,8750:tc,8896:Bl,8897:Bl,8898:Bl,8899:Bl,8968:nc,8969:nc,8970:nc,8971:nc,10216:rc,10217:rc,10752:Ol,10753:Ol,10754:Ol,10756:Bl,10758:Bl},"Size3-Regular":{32:Sr,40:Yc,41:Yc,47:ic,91:Qs,92:ic,93:Qs,123:Su,125:Su,160:Sr,710:wu,732:wu,770:wu,771:wu,8730:[.95003,1.45,0,0,1],8968:ac,8969:ac,8970:ac,8971:ac,10216:Su,10217:Su},"Size4-Regular":{32:Sr,40:Cu,41:Cu,47:oc,91:Jc,92:oc,93:Jc,123:sc,125:sc,160:Sr,710:Eu,732:Eu,770:Eu,771:Eu,8730:[1.25003,1.75,0,0,1],8968:lc,8969:lc,8970:lc,8971:lc,9115:uc,9116:Mu,9117:uc,9118:uc,9119:Mu,9120:uc,9121:dc,9122:cc,9123:dc,9124:dc,9125:cc,9126:dc,9127:Xd,9128:Qc,9129:Nl,9130:[0,.3,0,0,.88889],9131:Xd,9132:Qc,9133:Nl,9143:[.88502,.915,0,0,1.05556],10216:sc,10217:sc,57344:fc,57345:fc,57680:Rl,57681:Rl,57682:Rl,57683:Rl},"Typewriter-Regular":{32:_u,33:yi,34:yi,35:yi,36:Ss,37:Ss,38:yi,39:yi,40:Ss,41:Ss,42:[0,.52083,0,0,.525],43:ed,44:[.13889,.125,0,0,.525],45:ed,46:[0,.125,0,0,.525],47:Ss,48:yi,49:yi,50:yi,51:yi,52:yi,53:yi,54:yi,55:yi,56:yi,57:yi,58:as,59:[.13889,.43056,0,0,.525],60:qd,61:[-.19549,.41562,0,0,.525],62:qd,63:yi,64:yi,65:yi,66:yi,67:yi,68:yi,69:yi,70:yi,71:yi,72:yi,73:yi,74:yi,75:yi,76:yi,77:yi,78:yi,79:yi,80:yi,81:[.13889,.61111,0,0,.525],82:yi,83:yi,84:yi,85:yi,86:yi,87:yi,88:yi,89:yi,90:yi,91:Ss,92:Ss,93:Ss,94:yi,95:[.09514,0,0,0,.525],96:yi,97:as,98:yi,99:as,100:yi,101:as,102:yi,103:To,104:yi,105:yi,106:[.22222,.61111,0,0,.525],107:yi,108:yi,109:as,110:as,111:as,112:To,113:To,114:as,115:as,116:[0,.55358,0,0,.525],117:as,118:as,119:as,120:as,121:To,122:as,123:Ss,124:Ss,125:Ss,126:yi,127:yi,160:_u,176:yi,184:[.19445,0,0,0,.525],305:as,567:To,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:yi,715:yi,728:yi,730:yi,770:yi,771:yi,776:yi,915:yi,916:yi,920:yi,923:yi,926:yi,928:yi,931:yi,933:yi,934:yi,936:yi,937:yi,8216:yi,8217:yi,8242:yi,9251:[.11111,.21944,0,0,.525]}},Jd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,$l=10,os=.25,hc=1.2,el=.431,td={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[el,el,el],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:[os,os,os],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]},pc=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dl=5,nd={"\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 tl(a,y){a===void 0&&(a=77);const b=Yd[y][a];if(b)return{defaultMetrics:!1,depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]};if(a===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const E=String.fromCodePoint(a);if(E in nd)a=nd[E].codePointAt(0);else if(Jd.test(E))return a=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 mc={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]},Fl={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]},Qd={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 eu(a){if(Fl[a]){const[be,_e,ze]=Fl[a],rt=`<span class="stretchy" style="height:${ze}em"><svg width="100%" height="${ze}em" viewBox="0 0 ${be} ${_e}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Qd[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*ze/2)/100}em;min-width:0">${rt}</span>`}const[y,b,E,ee]=mc[a];let re,ae;const fe=E/1e3;y.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],ae=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(re=["slice-1-of-2","slice-2-of-2"],ae=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],ae=[ee]);const ge=y.map((be,_e)=>`<span class="${re[_e]}" style=height:${fe}em><svg width=400em height=${fe}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[_e]} slice"><path fill="currentcolor" d="${Qd[be]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${fe}em;min-width:${b}em;">${ge}</span>`}function ef(a){return mc[a]?mc[a][2]/1e3:Fl[a][2]}function tf(a){const y=[];for(let b=0;b<a.length;b++){let E=a.charCodeAt(b);if(E===13&&a.charCodeAt(b+1)===10&&(E=10,b++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(b+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Dl(2,16)+re*Dl(2,10)+ae,b++}}y.push(E)}return y}var ku=8205,Lu=[[ku,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,tu=[127462,127487];function nu(a){var y;if(fl===void 0){fl={};for(const b of Lu)for(let E=b[0];E<=b[0]+b[1]-1;E++)fl[E]=!0}return(y=fl[a])!=null?y:!1}function nf(a){return a>=tu[0]&&a<=tu[1]}function rf(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=tf(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===ku){const ae=E-1;for(E+=2;b[E]===ku;)E+=2;y.push(String.fromCodePoint(...b.slice(ae,E-ae+1)))}else if(nu(re)){const ae=E-1;for(;nu(b[E]);)E+=b[E]===ku?2:1;y.push(String.fromCodePoint(...b.slice(ae,2*E-ae-1)))}else nf(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var af=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rf(a)}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(a){const y=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return y!=null&&y[0]?(this.pos+=y[0].length,y[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 a=this.get();if(a==="\\"){if(!this.end()){let y=this.match(/^[a-zA-Z\*]+/);return y?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):y=this.get(),"\\"+y}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const y=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(y)return String.fromCodePoint(Number.parseInt(y.slice(y.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let y=!1;if(/[\d?@]/.test(this.peek())&&(y=!0,this.pos+1<this.s.length)){const b=this.s[this.pos+1];y=/[^\dA-Za-z]/.test(b)}return y?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function hl(a,y){var b,E,ee,re;const ae=[];let fe=a.next();if(fe&&fe!=="\\relax"){if(fe==="\\noexpand")fe=a.next(),fe&&ae.push(fe);else if(fe==="\\obeyspaces")a.obeyspaces=!0;else if(fe==="\\bgroup")ae.push("<{>");else if(fe==="\\egroup")ae.push("<}>");else if(fe==="\\string"){if(fe=a.next(),fe)if(fe.startsWith("\\"))for(const ge of fe)ae.push(ge==="\\"?"\\backslash":ge);else fe==="<{>"?ae.push("\\{"):fe==="<space>"?ae.push("~"):fe==="<}>"&&ae.push("\\}")}else if(fe==="\\csname"){for(;a.peek()==="<space>";)a.next();let ge="",be=!1,_e=[];do{if(_e.length===0)if(/^#[\d?@]$/.test(a.peek())){const ze=a.get().slice(1);_e=nl((E=(b=y==null?void 0:y(ze))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),fe=_e[0]}else fe=a.next(),_e=fe?[fe]:[];be=_e.length===0,!be&&fe==="\\endcsname"&&(be=!0,_e.shift()),be||(be=fe==="<$>"||fe==="<$$>"||fe==="<{>"||fe==="<}>"||typeof fe=="string"&&fe.length>1&&fe.startsWith("\\")),be||(ge+=_e.shift())}while(!be);ge&&ae.push("\\"+ge),ae.push(..._e)}else if(fe!=="\\endcsname")if(fe.length>1&&fe.startsWith("#")){const ge=fe.slice(1);ae.push(...nl((re=(ee=y==null?void 0:y(ge))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else ae.push(fe)}return ae}function nl(a,y=null){const b=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const fe=ae.match(/((?:\\%)|[^%])*/);fe!==null&&b.push(fe[0])}const ee=new af(tt(b.join(""))),re=[];do re.push(...hl(ee,y));while(!ee.end());return re}function ya(a){let y="";const b=[];for(const E of a)E&&(y&&/^[a-zA-Z\*]/.test(E)&&b.push(y),b.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&b.push(" "),y=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return b.join("")}function co(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ya([a,...y.map(b=>`{${b}}`)])}function pl(a){return ya(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var of=class Zd{constructor(y){Zd._registry[y]=this}static createAtom(y,b,E){return Zd._registry[y].createAtom(b,$n(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ee=[];for(const re of sf(y)){const ae=Zd._registry[re[0].mode];ee.push(...ae.serialize(re,b))}return ya(ee)}return ya(th(y,b))}static getFont(y,b,E){return Zd._registry[y].getFont(b,E)}};of._registry={};var ws=of;function sf(a){const y=[];let b=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(b.length>0&&y.push(b),b=[ee],E=ee.mode):b.push(ee));return b.length>0&&y.push(b),y}function Mo(a,y){const b=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;y==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[y],ae===ee?E.push(re):(E.length>0&&b.push(E),E=[re],ee=ae)}return E.length>0&&b.push(E),b}function rd(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of sf(a)){const fe=y.defaultMode;for(const ge of Mo(ae,"color")){const be=ge[0].computedStyle,_e=ws._registry[ge[0].mode].serialize(ge,me(we({},y),{defaultMode:fe==="text"?"text":"math"}));!y.skipStyles&&be.color&&be.color!=="none"&&(!E||ee!==be.color)?re.push(co("\\textcolor",(b=be.verbatimColor)!=null?b:be.color,ya(_e))):re.push(ya(_e))}}return re}function eh(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Mo(a,"backgroundColor").map(ee=>{var re;if(ee.length>0||ee[0].type!=="box"){const ae=ee[0].computedStyle;if(ae.backgroundColor&&ae.backgroundColor!=="none"&&(!b||E!==ae.backgroundColor))return co("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,ya(rd(ee,me(we({},y),{defaultMode:"text"}))))}return ya(rd(ee,y))})}function th(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,ee=[];for(const re of Mo(a,"fontSize")){const ae=re[0].computedStyle.fontSize,fe=eh(re,y);fe&&(ae&&ae!=="auto"&&(!b||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...fe):ee.push(...fe))}return ee}function id(a){return a?{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"}[a]:void 0}function ru(a){if(a.length===0)return"ord";const y=id(a[0].type),b=id(a[a.length-1].type);return y&&y===b?y:"ord"}function iu(a,y){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const b=Math.ceil(100*a)/100;return b===0?"0":b.toString()+(y!=null?y:"")}return""}var Nr=class Ep{constructor(y,b){var E,ee,re,ae,fe;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:Oe(y)?this.children=y.filter(be=>be!==null):y&&y instanceof Ep&&(this.children=[y]),this.children)for(const be of this.children)be.parent=this;this.type=(E=b==null?void 0:b.type)!=null?E:"ignore",this.isSelected=(b==null?void 0:b.isSelected)===!0,b!=null&&b.caret&&(this.caret=b.caret),this.classes=(ee=b==null?void 0:b.classes)!=null?ee:"",this.isTight=(re=b==null?void 0:b.isTight)!=null?re:!1,b!=null&&b.attributes&&(this.attributes=b.attributes);let ge=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(ge=(fe=ws.getFont((ae=b.mode)!=null?ae:"math",this,me(we({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?fe:void 0),ge||(ge="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,(b==null?void 0:b.maxFontSize)!==void 0&&(this.maxFontSize=b.maxFontSize),Au(this,ge)}set atomID(y){y===void 0||y.length===0||(this.id=y)}selected(y){if(this.isSelected!==y&&(this.isSelected=y,this.children))for(const b of this.children)b.selected(y)}setStyle(y,b,E){if(b===void 0)return;const ee=iu(b,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=ee)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=iu(y,"em"),this.height-=y,this.depth+=y)}get left(){var y;return(y=this.cssProperties)!=null&&y["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=iu(y,"em")))}set right(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=iu(y,"em")))}set bottom(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=iu(y,"em")))}get width(){return this._width*this.scale}set width(y){this._width=y,this.hasExplicitWidth=!0}set softWidth(y){}get height(){return this._height*this.scale}set height(y){this._height=y}get depth(){return this._depth*this.scale}set depth(y){this._depth=y}wrap(y){const b=y.parent;if(!b)return this;y.isPhantom&&this.setStyle("opacity",0);const E=y.color;E&&E!==b.color&&this.setStyle("color",E);let ee=y.backgroundColor;this.isSelected&&(ee=dn(ee)),ee&&ee!==b.backgroundColor&&(this.setStyle("background-color",ee),this.setStyle("display","inline-block"));const re=y.scalingFactor;return this.scale=re,this.skew*=re,this.italic*=re,this}toMarkup(){var y,b,E,ee;let re=(y=this.value)!=null?y:"";if(this.children)for(const xt of this.children)re+=xt.toMarkup();let ae="";if(this.svgBody)ae=eu(this.svgBody);else if(this.svgOverlay){ae='<span style="',ae+="display: inline-block;",ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,ae+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,ae+='">',ae+=re,ae+="</span>",ae+='<svg style="position:absolute;overflow:visible;',ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const xt=(b=this.cssProperties)==null?void 0:b.padding;xt?(ae+=`top:${xt};`,ae+=`left:${xt};`,ae+=`width:calc(100% - 2 * ${xt} );`):ae+="top:0;left:0;width:100%;",ae+="z-index:2;",ae+='"',this.svgStyle&&(ae+=this.svgStyle),ae+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,ae+=`>${this.svgOverlay}</svg>`}let fe="";const ge=this.classes.split(" ");ge.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&ge.push("ML__latex-caret"),this.isSelected&&ge.push("ML__selected");const be=ge.length===1?ge[0]:ge.filter((xt,It,In)=>xt.length>0&&In.indexOf(xt)===It).join(" ");if(be.length>0&&(fe+=` class="${be}"`),this.id&&(fe+=` data-atom-id=${this.id}`),this.cssId&&(fe+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(fe+=" "+Object.keys(this.attributes).map(xt=>`${xt}="${this.attributes[xt]}"`).join(" ")),this.htmlData){const xt=this.htmlData.split(",");for(const It of xt){const In=It.match(/([^=]+)=(.+$)/);if(In){const Br=In[1].trim().replace(/ /g,"-");Br&&(fe+=` data-${Br}="${In[2]}" `)}else{const Br=It.trim().replace(/ /g,"-");Br&&(fe+=` data-${Br} `)}}}const _e=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&_e.width===void 0&&(_e.width=`${Math.ceil(this._width*100)/100}em`);const ze=Object.keys(_e).map(xt=>`${xt}:${_e[xt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&ze.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const xt=this.htmlStyle.split(";");let It="";for(const In of xt){const Br=In.match(/([^=]+):(.+$)/);if(Br){const kn=Br[1].trim().replace(/ /g,"-");kn&&(It+=`${kn}:${Br[2]};`)}}It&&(fe+=` style="${It}"`)}ze.length>0&&(fe+=` style="${ze.join(";")}"`);let rt="";return fe.length>0||ae.length>0?rt=`<span${fe}>${re}${ae}</span>`:rt=re,this.caret==="text"?rt+='<span class="ML__text-caret"></span>':this.caret==="math"&&(rt+='<span class="ML__caret"></span>'),rt}tryCoalesceWith(y){if(this.svgBody||!this.value||y.svgBody||!y.value)return!1;const b=this.children&&this.children.length>0,E=y.children&&y.children.length>0;if(b||E)return!1;if(y.cssProperties||this.cssProperties){for(const ge of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&ge in y.cssProperties||this.cssProperties&&ge in this.cssProperties)return!1}const ee=this.cssProperties?Object.keys(this.cssProperties).length:0,re=y.cssProperties?Object.keys(y.cssProperties).length:0;if(ee!==re)return!1;if(ee>0){for(const ge of Object.keys(this.cssProperties))if(this.cssProperties[ge]!==y.cssProperties[ge])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),fe=y.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==fe.length)return!1;ae.sort(),fe.sort();for(const[ge,be]of ae.entries())if(be==="vertical-separator"||be!==fe[ge])return!1;return this.value+=y.value,this.height=Math.max(this.height,y.height),this.depth=Math.max(this.depth,y.depth),this._width=this._width+y._width,this.maxFontSize=Math.max(this.maxFontSize,y.maxFontSize),this.italic=y.italic,!0}};function ad(a){if(!a||a.length===0)return[];a[0].children=ad(a[0].children);const y=[a[0]];for(let b=1;b<a.length;b++)y[y.length-1].tryCoalesceWith(a[b])||(a[b].children=ad(a[b].children),y.push(a[b]));return y}function gc(a){return a.children&&(a.children=ad(a.children)),a}function vc(a,y){if(!a)return new Nr(null,y);const b=new Nr(null,{classes:"ML__strut",type:"ignore"});b.setStyle("height",Math.max(0,a.height),"em");const E=[b];if(a.depth!==0){const ee=new Nr(null,{classes:"ML__strut--bottom",type:"ignore"});ee.setStyle("height",a.height+a.depth,"em"),ee.setStyle("vertical-align",-a.depth,"em"),E.push(ee)}return E.push(a),new Nr(E,me(we({},y),{type:"lift"}))}function Bs(a){const y=ef(a)/2,b=new Nr(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function Au(a,y){var b;if(a.type==="latex"){a.height=.9,a.depth=.2,a._width=1;return}if(a.value){a.height=-1/0,a.depth=-1/0,a._width=0,a.skew=-1/0,a.italic=-1/0;for(let E=0;E<a.value.length;E++){const ee=tl(a.value.codePointAt(E),y);a.height=Math.max(a.height,ee.height),a.depth=Math.max(a.depth,ee.depth),a._width+=ee.width,a.skew=ee.skew,a.italic=ee.italic}return}if(a.children&&a.children.length>0){let E=-1/0,ee=-1/0,re=0;for(const ae of a.children)ae.height>E&&(E=ae.height),ae.depth>ee&&(ee=ae.depth),re=Math.max(re,(b=ae.maxFontSize)!=null?b:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,fe)=>ae+fe.width,0),a.maxFontSize=re}}function yc(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],ee=-b.shift-b.box.depth;let re=ee;for(let ae=1;ae<y.length;ae++){const fe=y[ae],ge=-fe.shift-re-fe.box.depth,be=ge-(b.box.height+b.box.depth);re=re+ge,E.push(be),E.push(fe),b=fe}return[E,ee]}if("top"in a){let y=a.top;for(const b of a.children)y-=typeof b=="number"?b:b.box.height+b.box.depth;return[a.children,y]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const y=a.firstBaseline[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-y.box.depth]}else if("shift"in a){const y=a.children[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.children,-y.box.depth-a.shift]}}return[null,0]}function Tu(a){var y;const[b,E]=yc(a);if(!b)return[[],0,0];const ee=new Nr(null,{classes:"pstrut"});let re=0;for(const It of b)if(typeof It!="number"){const In=It.box;re=Math.max(re,In.maxFontSize,In.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let fe=E,ge=E,be=E,_e=0;for(const It of b){if(typeof It=="number")be+=It;else{const In=It.box,Br=(y=It.classes)!=null?y:[],kn=new Nr([ee,In],{classes:Br.join(" "),style:It.style});In.setStyle("height",In.height+In.depth,"em"),In.setStyle("display","inline-block"),kn.setStyle("top",-re-be-In.depth,"em"),It.marginLeft&&kn.setStyle("margin-left",It.marginLeft,"em"),It.marginRight&&kn.setStyle("margin-right",It.marginRight,"em"),ae.push(kn),be+=In.height+In.depth,_e=Math.max(_e,kn.width)}fe=Math.min(fe,be),ge=Math.max(ge,be)}ae.forEach(It=>{It.softWidth=_e});const ze=new Nr(ae,{classes:"vlist"});if(ze.softWidth=_e,ze.height=ge,ze.setStyle("height",ge,"em"),fe>=0)return[[new Nr(ze,{classes:"vlist-r"})],ge,-fe];const rt=new Nr(new Nr(null),{classes:"vlist"});rt.height=-fe,rt.setStyle("height",-fe,"em");const xt=new Nr(8203,{classes:"vlist-s",maxFontSize:0});return xt.softWidth=0,xt.height=0,xt.depth=0,[[new Nr([ze,xt],{classes:"vlist-r"}),new Nr(rt,{classes:"vlist-r"})],ge,-fe]}var Qa=class extends Nr{constructor(a,y){var b;const[E,ee,re]=Tu(a);super(E.length===1?E[0]:E,{type:y==null?void 0:y.type,classes:((b=y==null?void 0:y.classes)!=null?b:"")+" vlist-t"+(E.length===2?" vlist-t2":"")}),this.height=ee,this.depth=re,this.softWidth=E.reduce((ae,fe)=>Math.max(ae,fe.width),0)}};function nh(a,y){var b,E,ee,re,ae;const fe=a.metrics,ge=new Nr(y.base),be=(b=y.baseShift)!=null?b:0,_e=(E=y.slant)!=null?E:0;let ze=0,rt=0;y.above&&(ze=(ee=y.aboveShift)!=null?ee:Math.max(fe.bigOpSpacing1,fe.bigOpSpacing3-y.above.depth)),y.below&&(rt=(re=y.belowShift)!=null?re:Math.max(fe.bigOpSpacing2,fe.bigOpSpacing4-y.below.height));let xt=null;if(y.below&&y.above){const It=fe.bigOpSpacing5+y.below.height+y.below.depth+rt+ge.depth+be;xt=new Qa({bottom:It,children:[fe.bigOpSpacing5,{box:y.below,marginLeft:-_e,classes:["ML__center"]},rt,{box:ge,classes:["ML__center"]},ze,{box:y.above,marginLeft:_e,classes:["ML__center"]},fe.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)xt=new Qa({top:ge.height-be,children:[fe.bigOpSpacing5,{box:y.below,marginLeft:-_e,classes:["ML__center"]},rt,{box:ge,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const It=ge.depth+be;xt=new Qa({bottom:It,children:[{box:ge,classes:["ML__center"]},ze,{box:y.above,marginLeft:_e,classes:["ML__center"]},fe.bigOpSpacing5]}).wrap(a)}else{const It=ge.depth+be;xt=new Qa({bottom:It,children:[{box:ge},fe.bigOpSpacing5]}).wrap(a)}return new Nr(xt,{type:(ae=y.type)!=null?ae:"op"})}var od=7,rl=6,Iu=5,ml=4,zl=3,ss=2,_s=1,Vo=0,Ws=class{constructor(a,y,b){this.id=a,this.sizeDelta=y,this.cramped=b;const E={"-4":2,"-3":1,0:0}[y];this.metrics=Object.keys(td).reduce((ee,re)=>me(we({},ee),{[re]:td[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Zs[[Vo,_s,Vo,_s,ss,zl,ss,zl][this.id]]}get sub(){return Zs[[Vo,Vo,Vo,Vo,ss,ss,ss,ss][this.id]]}get fracNum(){return Zs[[Vo,_s,Vo,_s,ss,zl,ml,Iu][this.id]]}get fracDen(){return Zs[[Vo,Vo,Vo,Vo,ss,ss,ml,ml][this.id]]}get cramp(){return Zs[[Vo,Vo,ss,ss,ml,ml,rl,rl][this.id]]}get isTight(){return this.sizeDelta<0}},Kl={7:new Ws(od,0,!1),6:new Ws(rl,0,!0),5:new Ws(Iu,0,!1),4:new Ws(ml,0,!0),3:new Ws(zl,-3,!1),2:new Ws(ss,-3,!0),1:new Ws(_s,-4,!1),0:new Ws(Vo,-4,!0)},Zs=me(we({},Kl),{displaystyle:Kl[od],textstyle:Kl[Iu],scriptstyle:Kl[zl],scriptscriptstyle:Kl[_s]});function au(a,y){var b;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:$l,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(b=a.unit)!=null?b:"pt"];if(Number.isFinite(y)){const ee=Dl(10,y);return Math.round(a.dimension/$l*E*ee)/ee}return a.dimension*E}function sd(a,y){if(a===null)return 0;const b=au(a)/$l;if(Number.isFinite(y)){const E=Dl(10,y);return Math.round(b*E)/E}return b}function ld(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function lf(a){let y=ld(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${ld(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${ld(a.shrink)}`),y}function Io(a){var y,b;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(y=a.unit)!=null?y:"pt"}`),"glue"in a&&(E=lf(a)),"number"in a)if(!("base"in a)||a.base==="decimal")E=Number(a.number).toString();else if(a.base==="alpha")E=`\`${String.fromCodePoint(a.number)}`;else{const ee=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(ee).toString(16).toUpperCase(),ee<=255?E=E.padStart(2,"0"):ee<=65535?E=E.padStart(4,"0"):ee<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(ee).toString(8),ee<=63?E=E.padStart(2,"0"):ee<=30583?E=E.padStart(4,"0"):E=E.padStart(8,"0"),E=`'${E}`)}return"register"in a&&("factor"in a&&(a.factor===-1?E="-":a.factor!==1&&(E=Number(a.factor).toString())),"global"in a&&a.global&&(E+="\\global"),E+=`\\${a.register}`),"string"in a&&(E=a.string),(b=a.relax)!=null&&b&&(E+="\\relax"),E}function js(a,y){return a==null?null:"number"in a?me(we({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?me(we({},a),{factor:a.factor*y}):me(we({},a),{factor:y}):"dimension"in a?me(we({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:js(a.glue,y),shrink:js(a.shrink,y),grow:js(a.grow,y)}:a.shrink?{glue:js(a.glue,y),shrink:js(a.shrink,y)}:a.grow?{glue:js(a.glue,y),grow:js(a.grow,y)}:{glue:js(a.glue,y)}:null}var rh={"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 ou(){return we({},rh)}function bc(){return{registers:ou(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:qe.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:St,backgroundColorMap:Ke,getMacro:a=>Kr(a,yt())}}var La=class Mp{constructor(y,b){var E,ee,re,ae,fe,ge,be,_e,ze,rt,xt,It,In,Br,kn;let sr;y!=null&&y.parent?(this.parent=y.parent,sr=y.parent,this.registers={}):(sr=we(we({},bc()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=sr.registers),sr.atomIdsSettings&&(this.atomIdsSettings=we({},sr.atomIdsSettings)),this.renderPlaceholder=sr.renderPlaceholder,this.isPhantom=(ae=(re=y==null?void 0:y.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?ae:!1,this.letterShapeStyle=sr.letterShapeStyle,this.minFontScale=sr.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(ge=(fe=this.parent)==null?void 0:fe.color)!=null?ge:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(_e=(be=this.parent)==null?void 0:be.backgroundColor)!=null?_e:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((ze=this.parent)==null?void 0:ze.size)?this.size=b.fontSize:this.size=(xt=(rt=this.parent)==null?void 0:rt.size)!=null?xt:dl;let $r=(In=(It=this.parent)==null?void 0:It.mathstyle)!=null?In:Zs.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(sr instanceof Mp)switch(y.mathstyle){case"cramp":$r=$r.cramp;break;case"superscript":$r=$r.sup;break;case"subscript":$r=$r.sub;break;case"numerator":$r=$r.fracNum;break;case"denominator":$r=$r.fracDen;break}switch(y.mathstyle){case"textstyle":$r=Zs.textstyle;break;case"displaystyle":$r=Zs.displaystyle;break;case"scriptstyle":$r=Zs.scriptstyle;break;case"scriptscriptstyle":$r=Zs.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=$r,this.smartFence=sr.smartFence,this.placeholderSymbol=sr.placeholderSymbol,this.colorMap=(Br=sr.colorMap)!=null?Br:pr=>pr,this.backgroundColorMap=(kn=sr.backgroundColorMap)!=null?kn:pr=>pr,this.getMacro=sr.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 y=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,y}scale(y){return y*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===od||this.mathstyle.id===rl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(pc[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(y){var b;if((b=this.registers)!=null&&b[y])return this.registers[y];if(this.parent)return this.parent.getRegister(y)}getRegisterAsNumber(y){const b=this.getRegister(y);if(typeof b=="number")return b;if(typeof b=="string")return Number(b)}getRegisterAsGlue(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E:typeof E=="object"&&"dimension"in E?{glue:{dimension:E.dimension}}:typeof E=="number"?{glue:{dimension:E}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(y)}getRegisterAsEm(y,b){return sd(this.getRegisterAsDimension(y),b)}getRegisterAsDimension(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E.glue:typeof E=="object"&&"dimension"in E?E:typeof E=="number"?{dimension:E}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(y)}setRegister(y,b){if(b===void 0){delete this.registers[y];return}this.registers[y]=b}evaluate(y){if(!y||!("register"in y))return y;let b=this;if("global"in y&&y.global)for(;b.parent;)b=b.parent;let E=1;"factor"in y&&y.factor!==1&&y.factor!==void 0&&(E=y.factor);const ee=b.getRegister(y.register);if(ee===void 0)return;if(typeof ee=="string")return{string:Number(ee).toString()+ee};if(typeof ee=="number")return{number:E*ee};const re=b.evaluate(ee);if(re!==void 0)return"string"in re?{string:Number(ee).toString()+re.string}:"number"in re?{number:E*re.number}:"dimension"in re?me(we({},re),{dimension:E*re.dimension}):"glue"in re?me(we({},re),{glue:me(we({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?me(we({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?me(we({},re.grow),{dimension:E*re.grow.dimension}):void 0}):y}toDimension(y){const b=this.evaluate(y);return b===void 0?null:"dimension"in b?b:"glue"in b?b.glue:"number"in b?{dimension:b.number}:null}toEm(y,b){if(y===null)return 0;const E=this.toDimension(y);return E===null?0:au(E,b)/$l}toNumber(y){if(y===null)return null;const b=this.evaluate(y);return b===void 0?null:"number"in b?b.number:"dimension"in b?b.dimension:"glue"in b?b.glue.dimension:"string"in b?Number(b.string):null}toColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.colorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}},su=["body","above","below","superscript","subscript"];function il(a){return typeof a=="string"&&su.includes(a)}function Du(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Jn=class Ul{constructor(y){var b,E,ee,re,ae,fe;this.type=y.type,typeof y.value=="string"&&(this.value=y.value),this.command=(E=(b=y.command)!=null?b:this.value)!=null?E:"",this.mode=(ee=y.mode)!=null?ee:"math",y.isFunction&&(this.isFunction=!0),y.limits&&(this.subsupPlacement=y.limits),this.style=we({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=y.captureSelection)!=null?ae:!1,this.skipBoundary=(fe=y.skipBoundary)!=null?fe:!1,y.verbatimLatex!==void 0&&y.verbatimLatex!==null&&(this.verbatimLatex=y.verbatimLatex),y.args&&(this.args=y.args),y.body&&(this.body=y.body),this._changeCounter=0}static createBox(y,b,E){var ee;if(!b)return null;const re=uf(b),ae=[];for(const ge of re){const be=ge[0].style,_e=cf(y,ge,{style:{color:be.color,backgroundColor:be.backgroundColor,fontSize:be.fontSize}});_e&&ae.push(_e)}if(ae.length===0)return null;const fe=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!fe&&!(E!=null&&E.type)?ae[0].wrap(y):new Nr(ae,{classes:fe,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return ws.serialize(y,b)}static commonAncestor(y,b){if(y===b||y.parent===b.parent)return y.parent;const E=new WeakSet;let{parent:ee}=y;for(;ee;)E.add(ee),ee=ee.parent;for(ee=b.parent;ee;){if(E.has(ee))return ee;ee=ee.parent}console.assert(!!ee)}static fromJson(y){return typeof y=="string"?new Ul({type:"mord",value:y,mode:"math"}):new Ul(y)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const y={};if(this.type&&(y.type=this.type),this.mode!=="math"&&(y.mode=this.mode),this.command&&this.command!==this.value&&(y.command=this.command),this.value!==void 0&&(y.value=this.value),this.style&&Object.keys(this.style).length>0&&(y.style=we({},this.style)),this.verbatimLatex!==void 0&&(y.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),this.isFunction&&(y.isFunction=!0),this.displayContainsHighlight&&(y.displayContainsHighlight=!0),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.skipBoundary&&(y.skipBoundary=!0),this.captureSelection&&(y.captureSelection=!0),this.args&&(y.args=cd(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ya([co(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ya([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return ws.serialize(this.body,me(we({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return ws.serialize(this.above,y)}belowToLatex(y){return ws.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=me(we({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=ws.serialize(this.subscript,y);E.length===0?b+="_{}":E.length===1?/^[0-9]$/.test(E)?b+=`_${E}`:b+=`_{${E}}`:b+=`_{${E}}`}if(this.branch("superscript")!==void 0){const E=ws.serialize(this.superscript,y);E.length===0?b+="^{}":E.length===1?E==="\u2032"?b+="^\\prime ":E==="\u2033"?b+="^\\doubleprime ":/^[0-9]$/.test(E)?b+=`^${E}`:b+=`^{${E}}`:b+=`^{${E}}`}return b}get treeDepth(){let y=1,b=this.parent;for(;b;)b=b.parent,y+=1;return y}get inCaptureSelection(){let y=this;for(;y;){if(y.captureSelection)return!0;y=y.parent}return!1}get parentPrompt(){let y=this.parent;for(;y;){if(y.type==="prompt"&&!y.captureSelection)return y;y=y.parent}return null}branch(y){if(il(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of su)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(il(y)),il(y)?(this._branches?this._branches[y]||(this._branches[y]=[this.makeFirstAtom(y)]):this._branches={[y]:[this.makeFirstAtom(y)]},this.isDirty=!0,this._branches[y]):[]}get row(){return Du(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Du(this.parentBranch)?this.parentBranch[1]:-1}get body(){var y;return(y=this._branches)==null?void 0:y.body}set body(y){this.setChildren(y,"body")}get superscript(){var y;return(y=this._branches)==null?void 0:y.superscript}set superscript(y){this.setChildren(y,"superscript")}get subscript(){var y;return(y=this._branches)==null?void 0:y.subscript}set subscript(y){this.setChildren(y,"subscript")}get above(){var y;return(y=this._branches)==null?void 0:y.above}set above(y){this.setChildren(y,"above")}get below(){var y;return(y=this._branches)==null?void 0:y.below}set below(y){this.setChildren(y,"below")}get computedStyle(){var y,b;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=we(we({},(b=(y=this.parent)==null?void 0:y.computedStyle)!=null?b:{}),this.style);return delete re.variant,delete re.variantStyle,ee||delete re.verbatimBackgroundColor,E||delete re.verbatimColor,re}applyStyle(y){this.isDirty=!0,this.style=we(we({},this.style),y),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 b of this.children)b.applyStyle(y)}getInitialBaseElement(){var y,b,E;return this.hasEmptyBranch("body")?this:(console.assert(((y=this.body)==null?void 0:y[0].type)==="first"),(E=(b=this.body[1])==null?void 0:b.getInitialBaseElement())!=null?E: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(y){const b=this.branch(y);return b?(console.assert(b.length>0),console.assert(b[0].type==="first"),b.length===1):!0}setChildren(y,b){var E;if(!y||(console.assert(il(b)),!il(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=ee:this._branches={[b]:ee};for(const re of y)re.parent=this,re.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new Ul({type:"first",mode:this.mode});return b.parent=this,b.parentBranch=y,b}addChild(y,b){console.assert(y.type!=="first"),this.createBranch(b).push(y),this.isDirty=!0,y.parent=this,y.parentBranch=b}addChildBefore(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b),0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildAfter(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildren(y,b){const E=this.createBranch(b);for(const ee of y)ee.parent=this,ee.parentBranch=b,E.push(ee);this.isDirty=!0}addChildrenAfter(y,b){console.assert(y.length===0||y[0].type!=="first"),console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,...y),this.isDirty=!0;for(const ee of y)ee.parent=this,ee.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(il(y)&&(this._branches[y]=void 0),!b)return[];for(const E of b)E.parent=void 0,E.parentBranch=void 0;return console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}removeChild(y){if(console.assert(y.parent===this),y.type==="first")return;const b=this.branch(y.parentBranch),E=b.indexOf(y);console.assert(E>=0),b.splice(E,1),this.isDirty=!0,y.parent=void 0,y.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:y}=this;return y[y.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 y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.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:y}=this;return y[y.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const y=[];for(const b of su)if(this._branches[b])for(const E of this._branches[b])y.push(...E.children),y.push(E);return this._children=y,y}render(y){if(this.type==="first"&&!y.atomIdsSettings)return null;const b=$n(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new La({parent:y},this.style);let ee=this.createBox(E,{classes:this.parent?"":"ML__base"});return ee?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(ee=this.attachSupsub(E,{base:ee})),ee.wrap(E)):null}attachSupsub(y,b){var E;const ee=b.base,re=this.superscript,ae=this.subscript;if(!re&&!ae)return ee;let fe=null,ge=null;const be=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let _e=0;if(re){const In=new La({parent:y,mathstyle:"superscript"});fe=Ul.createBox(In,re),be||(_e=ee.height-y.metrics.supDrop*In.scalingFactor)}let ze=0;if(ae){const In=new La({parent:y,mathstyle:"subscript"});ge=Ul.createBox(In,ae),be||(ze=ee.depth+y.metrics.subDrop*In.scalingFactor)}let rt;y.isDisplayStyle?rt=y.metrics.sup1:y.isCramped?rt=y.metrics.sup3:rt=y.metrics.sup2;const xt=.5/$l/y.scalingFactor;let It=null;if(ge&&fe){_e=Math.max(_e,rt,fe.depth+.25*y.metrics.xHeight),ze=Math.max(ze,y.metrics.sub2);const In=y.metrics.defaultRuleThickness;if(_e-fe.depth-(ge.height-ze)<4*In){ze=4*In-(_e-fe.depth)+ge.height;const kn=.8*y.metrics.xHeight-(_e-fe.depth);kn>0&&(_e+=kn,ze-=kn)}const Br=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;It=new Qa({individualShift:[{box:ge,shift:ze,marginLeft:Br},{box:fe,shift:-_e}]}).wrap(y)}else ge&&!fe?(ze=Math.max(ze,y.metrics.sub1,ge.height-.8*el),It=new Qa({shift:ze,children:[{box:ge,marginRight:xt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!ge&&fe&&(_e=Math.max(_e,rt,fe.depth+.25*el),It=new Qa({shift:-_e,children:[{box:fe,marginRight:xt}]}));return new Nr([ee,new Nr(It,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?Ul.createBox(new La({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?Ul.createBox(new La({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):nh(y,me(we({},b),{above:E,below:ee}))}bind(y,b){if(!b||y.isPhantom||this.value==="\u200B")return b;let E=this.parent;for(;E&&!E.captureSelection;)E=E.parent;return E!=null&&E.captureSelection||(this.id||(this.id=y.makeID()),b.atomID=this.id),b}createBox(y,b){var E,ee,re,ae;const fe=(E=this.value)!=null?E:this.body,ge=(ee=b==null?void 0:b.boxType)!=null?ee:id(this.type);let be=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(be+=" ML__text");const _e=typeof fe=="string"||fe===void 0?new Nr(fe!=null?fe:null,{type:ge,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:me(we({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:be}):(ae=Ul.createBox(y,fe,{type:ge,classes:be}))!=null?ae:new Nr(null);return y.isTight&&(_e.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(_e.italic=0),_e.right=_e.italic,this.bind(y,_e),this.caret&&!this.superscript&&!this.subscript&&(_e.caret=this.caret),_e}isDigit(){var y;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((y=this.body)==null?void 0:y.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var y;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((y=this.body)==null?void 0:y.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function uf(a){let y;const b=[];let E=[];for(const ee of a)if(!y&&!ee.style)E.push(ee);else{const re=ee.computedStyle;y&&re.color===y.color&&re.backgroundColor===y.backgroundColor&&re.fontSize===y.fontSize?E.push(ee):(E.length>0&&b.push(E),E=[ee],y=re)}return E.length>0&&b.push(E),b}function cf(a,y,b){var E,ee,re,ae,fe;if(!y||y.length===0)return null;const ge=new La({parent:a},b.style),be=!((E=ge.atomIdsSettings)!=null&&E.groupNumbers);let _e=[];if(y.length===1){const rt=y[0],xt=rt.render(ge);xt&&(be&&rt.isSelected&&xt.selected(!0),_e=[xt])}else{let rt="",xt=!0;for(const It of y){(ee=ge.atomIdsSettings)!=null&&ee.groupNumbers&&rt&&(xt&&It.isDigit()||!xt&&ud(It))&&(ge.atomIdsSettings.overrideID=rt);const In=It.render(ge);ge.atomIdsSettings&&(ge.atomIdsSettings.overrideID=void 0),In&&((re=ge.atomIdsSettings)!=null&&re.groupNumbers&&((It.isDigit()||ud(It))&&(!rt||xt!==It.isDigit())&&(xt=It.isDigit(),rt=(ae=It.id)!=null?ae:""),rt&&(!(It.isDigit()||ud(It))||!It.hasEmptyBranch("superscript")||!It.hasEmptyBranch("subscript"))&&(rt="")),be&&It.isSelected&&In.selected(!0),_e.push(In))}}if(_e.length===0)return null;const ze=new Nr(_e,me(we({isTight:ge.isTight},b),{type:(fe=b.type)!=null?fe:"lift"}));return ze.isSelected=_e.every(rt=>rt.isSelected),ze.wrap(ge)}function ud(a){return a.mode==="text"}function cd(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof Jn?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var al=class _p extends Jn{constructor(y,b,E){super({type:"text",command:y,mode:"text",displayContainsHighlight:!0}),this.value=b,this.verbatimLatex=b,this.applyStyle(E)}static fromJson(y){return new _p(y.command,y.value,y.style)}render(y){const b=this.createBox(y);return this.caret&&(b.caret=this.caret),b}_serialize(y){var b;return(b=this.verbatimLatex)!=null?b:tr("text",this.value.codePointAt(0))}};function Pu(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&ih(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function ih(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Uo(a){let y=1/0,b=-1/0;for(const E of a.ranges)y=Math.min(y,E[0],E[1]),b=Math.max(b,E[0],E[1]);return[y,b]}function gl(a){return typeof a=="number"&&!Number.isNaN(a)}function xc(a){return Array.isArray(a)&&a.length===2}function Sc(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ah(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ee=b.parent;for(;!E&ⅇ)ee&&(E=ee.mode),ee=ee.parent}return E}function df(a,y){if(!y)return"";if(typeof y=="string")return y;if(!a||y.after===void 0)return y.value;let b=!1,E=!1,ee=!1,re=!1,ae=!1,fe=!1,ge=!1,be=!1,_e=!1,ze=!1,rt=!1,xt=!1,It=!1,In=!1,Br=!1,kn=a[0],sr=0;for(;kn!=null&&kn.type&&/^(subsup|placeholder)$/.test(kn.type);)sr+=1,kn=a[sr];return b=!kn||kn.type==="first",kn&&(In=kn.mode==="text",E=!In&&kn.type==="mord"&&pe.test(kn.value),ee=!In&&kn.type==="mord"&&/\d+$/.test(kn.value),re=!In&&kn.isFunction,ae=kn.type==="genfrac",fe=kn.type==="surd",ge=kn.type==="mbin",be=kn.type==="mrel",_e=kn.type==="mop"||kn.type==="operator"||kn.type==="extensible-symbol",ze=kn.type==="mpunct"||kn.type==="minner",rt=kn.type==="array",xt=kn.type==="mopen",It=kn.type==="mclose"||kn.type==="leftright",Br=kn.type==="space"),y.after.includes("nothing")&&b||y.after.includes("letter")&&E||y.after.includes("digit")&&ee||y.after.includes("function")&&re||y.after.includes("frac")&&ae||y.after.includes("surd")&&fe||y.after.includes("binop")&&ge||y.after.includes("relop")&&be||y.after.includes("operator")&&_e||y.after.includes("punct")&&ze||y.after.includes("array")&&rt||y.after.includes("openfence")&&xt||y.after.includes("closefence")&&It||y.after.includes("text")&&In||y.after.includes("space")&&Br?y.value:""}function dd(a,y,b){return b?df(a,b[y]):""}var ff={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 Bu(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=pf(a)),E==="ascii-math"?(a=a.replace(/\u2061/gu,""),a=a.replace(/\u3016/gu,"{"),a=a.replace(/\u3017/gu,"}"),a=a.replace(/([^\\])sinx/g,"$1\\sin x"),a=a.replace(/([^\\])cosx/g,"$1\\cos x "),a=a.replace(/\u2013/g,"-"),["ascii-math",ts(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function ts(a,y){var b,E,ee;if(!a)return"";let re=!1,ae;const fe=(b=y.inlineShortcuts)!=null?b:ff;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=vl(a.slice(1),{inlineShortcuts:fe,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:fe,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:fe,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=vl(ae[1],{inlineShortcuts:fe,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=ts(ae[2],y),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hf(ae[1],fe),a+=ts(ae[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=vl(a.slice(1),{inlineShortcuts:fe,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hf(ae[1],fe),a+=ts(ae[2],y),re=!0)),!re)if(ae=vl(a,{inlineShortcuts:fe,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const ge=vl(ae.rest.slice(1),{inlineShortcuts:fe,noWrap:!0});ge.match&&(a="\\frac{"+ae.match+"}{"+ge.match+"}"+ts(ge.rest,y)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+ts(ae.rest,y):ae.match+ts(ae.rest,y),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+ts(ae[2],y),re=!0)),a}function vl(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,fe=1;for(;fe<a.length&&ae>0;)a[fe]===ee&&ae++,a[fe]===re&&ae--,fe++;ae===0?(y.noWrap&&ee==="("?b=ts(a.substring(1,fe-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+ts(a.substring(1,fe-1),y)+"\\right"+re),E=a.slice(Math.max(0,fe))):(b=a.substring(1,fe),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let fe=dd(null,a,y.inlineShortcuts);if(fe)return fe=fe.replace("_{#?}",""),fe=fe.replace("^{#?}",""),{match:fe,rest:a.slice(fe.length)}}if(ae=a.match(/^([a-zA-Z])/),ae)return{match:ae[1],rest:a.slice(1)};if(ae=a.match(/^(-)?\d+(\.\d*)?/),ae)return{match:ae[0],rest:a.slice(ae[0].length)};/^\\(left|right)/.test(a)||(ae=a.match(/^(\\[a-zA-Z]+)/),ae&&(E=a.slice(ae[1].length),b=ae[1]))}return{match:b,rest:E}}function hf(a,y){let b=dd(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var fd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function yl(a){const y=a.trim();for(const b of fd)if(y.startsWith(b[0])&&y.endsWith(b[1]))return[!0,y.substring(b[0].length,y.length-b[1].length)];return[!1,a]}function pf(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=yl(a),y?["latex",a]:a.startsWith("`")&&a.endsWith("`")?(a=a.substring(1,a.length-1),["ascii-math",a]):a.includes("\\")?["latex",a]:/\$.+\$/.test(a)?["latex",`\\text{${a}}`]:[void 0,a]}var wc="$$",oh="$$",sh=(a,y,b)=>(fd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${wc} ${y} ${oh}`),y),mf=class Qf{constructor(y){Qf._modes[y]=this}static onPaste(y,b,E){var ee;if(!b.contentEditable&&b.userSelect==="none")return b.model.announce("plonk"),!1;if(typeof E=="string"){const ae=new DataTransfer;ae.setData("text/plain",E),E=ae}const re=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ee=b.host)!=null&&ee.dispatchEvent(re)?Qf._modes[y].onPaste(b,E):!1}static copyToClipboard(y,b){if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const E=y.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:Uo(E.selection),re=E.getValue(ee,b);navigator.clipboard.writeText(re).then(()=>{},()=>y.model.announce("plonk"))}static onCopy(y,b){var E;if(!b.clipboardData)return;if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const ee=y.model,re=ee.selectionIsCollapsed?[0,ee.lastOffset]:Uo(ee.selection);let ae=ee.getAtoms(re);if(ae.every(fe=>fe.mode==="text"||!fe.mode))b.clipboardData.setData("text/plain",ae.filter(fe=>fe instanceof al).map(fe=>fe.value).join(""));else if(ae.every(fe=>fe.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(fe=>{var ge;return(ge=fe.value)!=null?ge:""}).join(""));else{let fe;ae.length===1&&ae[0].verbatimLatex!==void 0?fe=ae[0].verbatimLatex:fe=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",fe);try{b.clipboardData.setData("text/plain",y.options.onExport(y,fe,re))}catch(ge){}if(ae.length===1){const ge=ae[0];(ge.type==="root"||ge.type==="group")&&(ae=ge.body.filter(be=>be.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(ge=>ge.toJson())))}catch(ge){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const ge=window.MathfieldElement.computeEngine;if(ge)try{const be=ge.jsonSerializationOptions;ge.jsonSerializationOptions={metadata:["latex"]};const _e=ge.parse(ee.getValue(re,"latex-unstyled"));ge.jsonSerializationOptions=be;const ze=JSON.stringify(_e.json);ze&&b.clipboardData.setData("application/json",ze)}catch(be){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return Qf._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};mf._modes={};var aa=mf,lh=[{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","^"]}],hd={"\\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 Os(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function Ns(a){var y,b;return(b=(y=a.querySelector(".ML__caret"))!=null?y:a.querySelector(".ML__text-caret"))!=null?b:a.querySelector(".ML__latex-caret")}function bl(a){const y=Ns(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function pd(a){var y;if(!a.parent)return"root";let b=(y=a.parent.id)!=null?y:"";return b+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,b}function md(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ee=y.right-y.left,re=y.bottom-y.top,ae=Math.ceil(y.left-E.left+a.field.scrollLeft*b),fe=Math.ceil(y.top-E.top);return{left:ae,right:ae+ee,top:fe,bottom:fe+re}}function gd(a){const y=a.getBoundingClientRect(),b=parseInt(getComputedStyle(a).marginRight),E={top:y.top-1,bottom:y.bottom,left:y.left,right:y.right-1+b};if(a.children.length===0||a.tagName.toUpperCase()==="SVG")return E;for(const ee of a.children)if(ee.nodeType===1&&"atomId"in ee.dataset&&!ee.classList.contains("pstrut")){const re=gd(ee);E.left=Math.min(E.left,re.left),E.right=Math.max(E.right,re.right),E.top=Math.min(E.top,re.top),E.bottom=Math.max(E.bottom,re.bottom)}return E}function lu(a,y){var b,E;if(!y.id)return null;let ee=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${y.id}"]`);return ee=re?gd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function gf(a,y,b){const E=new Map;for(const ee of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let ge=Math.floor(re.getBoundingClientRect().width)/ae;ge=isNaN(ge)?1:ge;const be=md(a,lu(a,ee),ge);if(be){const _e=pd(ee);if(E.has(_e)){const ze=E.get(_e);E.set(_e,{left:Math.min(ze.left,be.left),right:Math.max(ze.right,be.right),top:Math.min(ze.top,be.top),bottom:Math.max(ze.bottom,be.bottom)})}else E.set(_e,be)}}return[...E.values()]}function vd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...gf(a,E,y)),[])}function yd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function Cc(a){let y=0,b=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,ee)}var vf=`@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;
|
|
|
}
|
|
|
`,qa=`.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);
|
|
|
}
|
|
|
`,yf=`#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);
|
|
|
}
|
|
|
`,uh=`/* 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;
|
|
|
}
|
|
|
`,uu=`/* 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);*/
|
|
|
}
|
|
|
`,ch=`.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));
|
|
|
}
|
|
|
`,Ec=`: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;
|
|
|
}
|
|
|
`,dh=`.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;
|
|
|
}
|
|
|
`,eo;function Hl(a){let y="";switch(a){case"mathfield-element":y=`
|
|
|
: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":y=qa;break;case"mathfield":y=vf;break;case"environment-popover":y=yf;break;case"suggestion-popover":y=uh;break;case"keystroke-caption":y=uu;break;case"virtual-keyboard":y=ch;break;case"ui":y=Ec;break;case"menu":y=dh;break;default:debugger}return y}function cu(a){return eo||(eo={}),eo[a]||(eo[a]=new CSSStyleSheet,eo[a].replaceSync(Hl(a))),eo[a]}var ol;function ks(a){var y;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const b=window.document.createElement("style");b.id=`mathlive-style-${a}`,b.append(window.document.createTextNode(Hl(a))),window.document.head.appendChild(b);return}if(ol||(ol={}),((y=ol[a])!=null?y:0)!==0)ol[a]+=1;else{const b=cu(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],ol[a]=1}}function x(a){if("adoptedStyleSheets"in document&&ol!=null&&ol[a]&&(ol[a]-=1,ol[a]<=0)){const y=eo[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class kp extends Jn{constructor(y){var b;super(me(we({},y),{type:"accent",body:(b=y.body)!=null?b:void 0})),y.accentChar?this.accent=y.accentChar:this.svgAccent=y==null?void 0:y.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(y){return new kp(y)}toJson(){return me(we({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new La({parent:y,mathstyle:"cramp"},this.style),ee=(b=Jn.createBox(E,this.body))!=null?b:new Nr("\u25A2",{style:this.style});let re=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(re=ee.skew);let ae=Math.min(ee.height,el),fe;if(this.svgAccent)fe=Bs(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const be=new Nr(this.accent,{fontFamily:"Main-Regular"});be.italic=0;const _e=this.accent===8407?" ML__accent-vec":"";fe=new Nr(new Nr(be),{classes:"ML__accent-body"+_e})}fe=new Qa({shift:0,children:[{box:new Nr(ee)},-ae,{box:fe,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const ge=new Nr(fe,{type:"lift"});return this.caret&&(ge.caret=this.caret),this.bind(E,ge.wrap(E)),this.attachSupsub(E,{base:ge})}},ne={"(":")","{":"}","[":"]","|":"|","\\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"},te=Object.fromEntries(Object.entries(ne).map(([a,y])=>[y,a]));function ie(a){var y;return(y={"[":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}[a])!=null?y:a.codePointAt(0)}function de(a,y,b,E){var ee;const ae=new Nr(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(y);return b&&ae.setTop((1-y.scalingFactor)*os),ae}function ye(a,y,b,E,ee){var re,ae;const fe=new La({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),ge=new Nr(ie(a),{fontFamily:`Size${y}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${y}`,type:(ae=ee.type)!=null?ae:"ignore"}).wrap(fe);return b&&ge.setTop((1-fe.scalingFactor)*os),ge}function ke(a,y,b,E,ee){var re;let ae,fe,ge,be;ae=ge=be=ie(a),fe=null;let _e="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?ge=ae=be=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?ge=ae=be=8741:a==="\\uparrow"?ge=be=9168:a==="\\Uparrow"?ge=be=8214:a==="\\downarrow"?ae=ge=9168:a==="\\Downarrow"?ae=ge=8214:a==="\\updownarrow"?(ae=8593,ge=9168,be=8595):a==="\\Updownarrow"?(ae=8657,ge=8214,be=8659):a==="["||a==="\\lbrack"?(ae=9121,ge=9122,be=9123,_e="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,ge=9125,be=9126,_e="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(ge=ae=9122,be=9123,_e="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,ge=be=9122,_e="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(ge=ae=9125,be=9126,_e="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,ge=be=9125,_e="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,ge=9116,be=9117,_e="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,ge=9119,be=9120,_e="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,fe=9128,be=9129,ge=9130,_e="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,fe=9132,be=9133,ge=9130,_e="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,be=9129,ge=9130,_e="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,be=9133,ge=9130,_e="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,be=9133,ge=9130,_e="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,be=9129,ge=9130,_e="Size4-Regular"):a==="\\surd"?(ae=57345,be=9143,ge=57344,_e="Size4-Regular"):a==="\\ulcorner"?(ae=9484,ge=be=32):a==="\\urcorner"?(ae=9488,ge=be=32):a==="\\llcorner"?(be=9492,ge=ae=32):a==="\\lrcorner"&&(ae=9496,ge=ae=32);const ze=tl(ae,_e),rt=ze.height+ze.depth,xt=tl(ge,_e),It=xt.height+xt.depth,In=tl(be,_e),Br=In.height+In.depth;let kn=0,sr=1;if(fe!==null){const Yo=tl(fe,_e);kn=Yo.height+Yo.depth,sr=2}const $r=rt+Br+kn,pr=Math.max(0,Math.ceil((y-$r)/(sr*It))),bi=$r+pr*sr*It;let $i=os;b&&($i=$i*E.scalingFactor);const Ci=bi/2-$i,Pa=.008,Ya=[];Ya.push({box:new Nr(be,{fontFamily:_e})}),Ya.push(-Pa);const Vr=new Nr(ge,{fontFamily:_e});if(fe===null)for(let Yo=0;Yo<pr;Yo++)Ya.push({box:Vr});else{for(let Yo=0;Yo<pr;Yo++)Ya.push({box:Vr});Ya.push(-Pa),Ya.push({box:new Nr(fe,{fontFamily:_e})}),Ya.push(-Pa);for(let Yo=0;Yo<pr;Yo++)Ya.push({box:Vr})}Ya.push(-Pa),Ya.push({box:new Nr(ae,{fontFamily:_e})});let Fs="";_e==="Size1-Regular"?Fs=" delim-size1":_e==="Size4-Regular"&&(Fs=" delim-size4");const kl=new Qa({bottom:Ci,children:Ya},{classes:Fs});return new Nr(kl,me(we({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Pe=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),$e=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),bt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Dt=[0,1.2,1.8,2.4,3];function pn(a,y,b,E){return a===void 0||a==="."?vi(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Pe.has(a)||bt.has(a)?ye(a,y,!1,b,E):$e.has(a)?ke(a,Dt[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var cn=[{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}],er=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],wr=[{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 Wr(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function oi(a,y,b,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<b.length&&b[re].type!=="stack";re++){const ae=tl(a,Wr(b[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let fe=ae.height+ae.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?fe*=Math.max(pc[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(fe*=Math.max(pc[Math.max(1,E.size-1)],E.minFontScale))),fe>y)return b[re]}return b[b.length-1]}function hi(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return vi(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let ae;bt.has(y)?ae=cn:Pe.has(y)?ae=wr:ae=er;const fe=oi(ie(y),b,ae,ee),ge=new La({parent:ee,mathstyle:fe.mathstyle},re==null?void 0:re.style);return fe.type==="small"?de(y,ge,E,me(we({},re),{type:a})):fe.type==="large"?ye(y,fe.size,E,ge,me(we({},re),{type:a})):(console.assert(fe.type==="stack"),ke(y,b,E,ge,me(we({},re),{type:a})))}function ti(a,y,b,E,ee,re){if(y===".")return vi(ee,re==null?void 0:re.classes);const ae=os*ee.scalingFactor,fe=901,ge=5/$l,be=Math.max(b-ae,E+ae),_e=Math.max(be/500*fe,2*be-ge);return hi(a,y,_e,!0,ee,re)}function vi(a,y){const b=new Nr(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new La({parent:a,mathstyle:"textstyle"}))}var Wi=class Lp extends Jn{constructor(y){var b;super({type:"placeholder",command:"\\placeholder",mode:(b=y==null?void 0:y.mode)!=null?b:"math",style:y==null?void 0:y.style}),this.captureSelection=!0}static fromJson(y){return new Lp(y)}toJson(){return super.toJson()}render(y){let b;return this.value=y.placeholderSymbol,typeof y.renderPlaceholder=="function"?b=y.renderPlaceholder(y):b=this.createBox(y),this.caret&&(b.classes+=" ML__placeholder-selected"),b}_serialize(y){return y.skipPlaceholders?"":"\\placeholder{}"}},Gi=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],ba=["cases","dcases","rcases"],to=["align","align*","aligned","gather","gathered","split"],Wo=["array","subequations","eqnarray"];function bo(a){return Wo.concat(to).concat(ba).concat(Gi).includes(a)}function cs(a){return Gi.includes(a)}function ds(a){return ba.includes(a)}function Do(a){return to.includes(a)}function fs(a,y,b){let E=0;for(const be of b)"align"in be&&(E+=1);let ee=0;const re=[];for(const be of y){let _e=0;for(ee=Math.max(ee,Math.min(be.length,E));_e<be.length;){const ze=[],rt=Math.min(be.length,_e+E);for(;_e<rt;){const xt=be[_e];xt.length===0?ze.push([new Jn({type:"first",mode:a.mode})]):xt[0].type!=="first"?ze.push([new Jn({type:"first",mode:a.mode}),...xt]):(console.assert(!xt.slice(1).some(It=>It.type==="first")),ze.push(xt)),_e+=1}re.push(ze)}}re.length>0&&re[re.length-1].length===1&&re[re.length-1][0].length===1&&re[re.length-1][0][0].type==="first"&&re.pop();const ae=[];for(const be of re){if(be.length!==ee)for(let _e=be.length;_e<ee;_e++)be.push([new Jn({type:"first",mode:a.mode}),new Wi]);ae.push(be)}let fe=0,ge=0;for(const be of ae){ge=0;for(const _e of be){for(const ze of _e)ze.parent=a,ze.parentBranch=[fe,ge];ge+=1}fe+=1}return a.isDirty=!0,ae}var la=class Ap extends Jn{constructor(y,b,E,ee={}){var re;super({type:"array"}),this.environmentName=y,this.rowGaps=E,ee.mathstyleName&&(this.mathstyleName=ee.mathstyleName),ee.columns&&(ee.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=ee.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=fs(this,b,this.colFormat),ee.leftDelim&&(this.leftDelim=ee.leftDelim),ee.rightDelim&&(this.rightDelim=ee.rightDelim),ee.arraycolsep!==void 0&&(this.arraycolsep=ee.arraycolsep),this.colSeparationType=ee.colSeparationType,ee.arraystretch!==void 0&&(this.arraystretch=ee.arraystretch),this.minColumns=(re=ee.minColumns)!=null?re:1}static fromJson(y){return new Ap(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=me(we({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(b=>b.map(E=>E.map(ee=>ee.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(y.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(y.arraycolsep=this.arraycolsep),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}branch(y){var b;if(Du(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Du(y)?(this.isDirty=!0,(b=this.branch(y))!=null?b:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(y=>!!y.align).length}removeBranch(y){if(il(y))return super.removeBranch(y);const b=this.branch(y);return this.array[y[0]][y[1]]=void 0,b.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}get hasChildren(){return this.children.length>0}get children(){const y=[];for(const b of this.array)for(const E of b)if(E)for(const ee of E)y.push(...ee.children),y.push(ee);return[...y,...super.children]}render(y){var b,E,ee,re,ae,fe;const ge=new La({parent:y,mathstyle:this.mathstyleName},this.style),be=ge.getRegisterAsEm("arrayrulewidth"),_e=ge.getRegisterAsEm("arraycolsep"),ze=ge.getRegisterAsEm("doublerulesep"),rt=(E=(b=this.arraystretch)!=null?b:ge.getRegisterAsNumber("arraystretch"))!=null?E:1;let xt=typeof this.arraycolsep=="number"?this.arraycolsep:_e;this.colSeparationType==="small"&&(xt=.2778*(new La({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const It=rt*hc,In=.7*It,Br=.3*It;let kn=0;const sr=[];let $r=0;const pr=this.array.length;for(let ro=0;ro<pr;++ro){const Lo=this.array[ro];$r=Math.max($r,Lo.length);const Jo=new La({parent:ge,mathstyle:this.mathstyleName},this.style);let Ll=In/Jo.scalingFactor,Al=Br/Jo.scalingFactor;const Tl={cells:[],height:0,depth:0,pos:0};for(const ul of Lo){const e0=(ee=Jn.createBox(Jo,ul,{type:"ignore"}))!=null?ee:new Nr(null,{type:"ignore"});Al=Math.max(Al,e0.depth),Ll=Math.max(Ll,e0.height),Tl.cells.push(e0)}let Il=(re=sd(this.rowGaps[ro]))!=null?re:0;Il>0&&(Il+=Br,Al=Math.max(Al,Il),Il=0),ro<pr-1&&!cs(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Al+=ge.getRegisterAsEm("jot")),Tl.height=Ll,Tl.depth=Al,kn+=Ll,Tl.pos=kn,kn+=Al+Il,sr.push(Tl)}const bi=kn/2+os,$i=[];for(let ro=0;ro<$r;ro++){const Lo=[];for(const Jo of sr){const Ll=Jo.cells[ro];Ll.depth=Jo.depth,Ll.height=Jo.height,Lo.push({box:Ll,shift:Jo.pos-bi})}Lo.length>0&&$i.push(new Qa({individualShift:Lo}))}const Ci=[];let Pa=!1,Ya=!1,Vr=0,Fs=!this.leftDelim;const{colFormat:kl}=this;for(const ro of kl){if("align"in ro&&Vr>=$i.length)break;if("align"in ro)Pa?Ci.push(xo(2*xt)):(Ya||Fs)&&Ci.push(xo(xt)),Ci.push(new Nr($i[Vr],{classes:"col-align-"+ro.align})),Vr++,Pa=!0,Ya=!1,Fs=!1;else if("gap"in ro){if(typeof ro.gap=="number")Ci.push(xo(ro.gap));else{const Lo=Co(y,sr,bi,ro.gap);Lo&&Ci.push(Lo)}Pa=!1,Ya=!1,Fs=!1}else if("separator"in ro){const Lo=new Nr(null,{classes:"vertical-separator"});Lo.height=kn,Lo.setStyle("height",kn,"em"),Lo.setStyle("border-right",`${be}em ${ro.separator} currentColor`),Lo.setStyle("vertical-align",-(kn-bi),"em");let Jo=0;Ya?Jo=ze-be:Pa&&(Jo=xt-be),Lo.left=Jo,Ci.push(Lo),Pa=!1,Ya=!0,Fs=!1}}Pa&&!this.rightDelim&&Ci.push(xo(xt));const Xs=new Nr(Ci,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Xs.caret=this.caret),this.bind(y,Xs);const Yo=Xs.height,zs=Xs.depth,Es=this.bind(y,new Nr([this.bind(y,ti("open",(ae=this.leftDelim)!=null?ae:".",Yo,zs,ge,{isSelected:this.isSelected})),Xs,this.bind(y,ti("close",(fe=this.rightDelim)!=null?fe:".",Yo,zs,ge,{isSelected:this.isSelected}))],{type:"ord"}));return Es?(Es.setStyle("display","inline-block"),this.caret&&(Es.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Es}))):null}_serialize(y){var b;const E=[];if(this.environmentName==="lines"?E.push("{\\displaylines"):E.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(E.push("{"),this.colFormat!==void 0)for(const ee of this.colFormat)"align"in ee&&typeof ee.align=="string"?E.push(ee.align):"separator"in ee&&ee.separator==="solid"?E.push("|"):"separator"in ee&&ee.separator==="dashed"&&E.push(":");E.push("}")}for(let ee=0;ee<this.array.length;ee++){for(let re=0;re<this.array[ee].length;re++)re>0&&E.push(" & "),E.push(Jn.serialize(this.array[ee][re],y));if(ee<this.array.length-1){const re=this.rowGaps[ee];re!=null&&re.dimension?E.push(`\\\\[${re.dimension} ${(b=re.unit)!=null?b:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),ya(E)}getCell(y,b){return this.array[y][b]}setCell(y,b,E){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[y][b]!==void 0);for(const re of this.array[y][b])re.parent=void 0,re.parentBranch=void 0;let ee=E;(E.length===0||E[0].type!=="first")&&(ee=[new Jn({type:"first",mode:this.mode}),...E]),this.array[y][b]=ee;for(const re of ee)re.parent=this,re.parentBranch=[y,b];this.isDirty=!0}addRowBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(wo(this));this.array.splice(y,0,b);for(let E=y;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addRowAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(wo(this));this.array.splice(y+1,0,b);for(let E=y+1;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}removeRow(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>y);const b=this.array.splice(y,1);for(const E of b)for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0;for(let E=y;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addColumnBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y,0,wo(this));for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumnAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y+1,0,wo(this));for(let b=0;b<this.rowCount;b++)for(let E=y+1;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>y);for(const b of this.array){const E=b.splice(y,1);for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0}for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}get cells(){const y=[];for(const b of this.array)for(const E of b)E&&y.push(E.filter(ee=>ee.type!=="first"));return y}};function wo(a){const y=new Jn({type:"first",mode:a.mode});y.parent=a;const b=new Wi;return b.parent=a,[y,b]}function xo(a){const y=new Nr(null,{classes:"arraycolsep"});return y.width=a,y}function Co(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const ae=Jn.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-b}))}return new Qa({individualShift:ee}).wrap(a)}var _o=class Tp extends Jn{constructor(y){super({mode:y.mode,command:y.command,style:y.style,body:y.body,type:"box"}),this.framecolor=y.framecolor,this.backgroundcolor=y.backgroundcolor,this.padding=y.padding,this.offset=y.offset,this.border=y.border}static fromJson(y){return new Tp(y)}toJson(){return me(we({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(y){var b,E,ee,re;const ae=Jn.createBox(y,this.body,{type:"lift"});if(!ae)return null;const fe=y.toEm((b=this.offset)!=null?b:{dimension:0});ae.depth+=fe,ae.setStyle("display","inline-block"),ae.setStyle("position","relative"),ae.setStyle("height",Math.floor(100*ae.height+ae.depth)/100,"em"),ae.setStyle("vertical-align",-Math.floor(100*ae.height)/100,"em");const ge=new La({parent:y},this.style),be=ge.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),_e=new Nr(null,{classes:"ML__box"});_e.height=ae.height+be,_e.depth=ae.depth+be,_e.setStyle("box-sizing","border-box"),_e.setStyle("position","absolute"),_e.setStyle("top",-be+.3,"em"),_e.setStyle("left",0),_e.setStyle("height",_e.height+_e.depth,"em"),_e.setStyle("width","100%"),this.backgroundcolor&&_e.setStyle("background-color",(ee=ge.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&_e.setStyle("border",`${ge.getRegisterAsEm("fboxrule",2)}em solid ${(re=ge.toColor(this.framecolor))!=null?re:"black"}`),this.border&&_e.setStyle("border",this.border);const ze=new Nr([_e,ae],{type:"lift"});return ze.setStyle("display","inline-block"),ze.setStyle("position","relative"),ze.setStyle("line-height",0),ze.height=ae.height+be+(fe>0?fe:0),ze.depth=ae.depth+be+(fe<0?-fe:0),ze.setStyle("padding-left",be,"em"),ze.setStyle("padding-right",be,"em"),ze.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*be+Math.abs(fe)))/100,"em"),ze.setStyle("margin-top",-be,"em"),ze.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*be-fe))/100,"em"),ze.setStyle("vertical-align",Math.floor(100*(ae.depth+2*be))/100,"em"),this.caret&&(ze.caret=this.caret),this.attachSupsub(y,{base:ze})}_serialize(y){return y.skipStyles?ya([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},Wl=class Ip extends Jn{constructor(y,b){var E;super({type:"composition",mode:(E=b==null?void 0:b.mode)!=null?E:"math",value:y})}static fromJson(y){return new Ip(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Nr(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},ys=class Dp extends Jn{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Dp(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Go=class Pp extends Jn{constructor(y,b,E){super({type:"group",mode:b,style:E}),this.body=y,this.boxType=y.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,y&&y.length===1&&y[0].command===","&&(this.captureSelection=!0)}static fromJson(y){return new Pp(y.body,y.mode,y.style)}render(y){const b=Jn.createBox(y,this.body,{type:this.boxType});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Wa=class Bp extends Jn{constructor(y,b,E){super({type:"leftright",style:E.style,displayContainsHighlight:!0}),this.variant=y,this.body=b,this.leftDelim=E.leftDelim,this.rightDelim=E.rightDelim}static fromJson(y){var b;return new Bp((b=y.variant)!=null?b:"",y.body,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}_serialize(y){var b,E;const ee=this.matchingRightDelim();return this.variant==="left...right"?ya(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?ya(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):ya([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(y),ee])}matchingRightDelim(){var y,b;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(y=this.leftDelim)!=null?y:".";return(b=ne[E])!=null?b:E}render(y){var b,E;const ee=new La({parent:y},this.style);console.assert(this.body!==void 0);const re=new La({parent:y,mathstyle:"textstyle"},this.style),ae=(b=Jn.createBox(ee,this.body,{type:"inner"}))!=null?b:new Nr(null,{type:"inner"}),fe=ae.height/re.scalingFactor,ge=ae.depth/re.scalingFactor,be=[];if(this.leftDelim&&be.push(this.bind(re,ti("open",this.leftDelim,fe,ge,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&(Ro(ae.children,this,ee,fe,ge),be.push(ae)),this.rightDelim){let xt=this.containsCaret?" ML__contains-caret":"",It=this.rightDelim;It==="?"&&(ee.smartFence?(It=this.matchingRightDelim(),xt+=" ML__smart-fence__close"):It="."),be.push(this.bind(re,ti("close",It,fe,ge,re,{isSelected:this.isSelected,classes:xt+" ML__close",mode:this.mode,style:this.style})))}let _e=this.variant==="mleft...mright";const ze=this.leftSibling;ze&&(!_e&&ze.isFunction&&(_e=!0),!_e&&ze.type==="subsup"&&((E=ze.leftSibling)!=null&&E.isFunction)&&(_e=!0));const rt=new Nr(be,{type:_e?"close":"inner",classes:"left-right"});return rt.setStyle("margin-top",`${-ae.depth}em`),rt.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(rt.caret=this.caret),this.bind(ee,rt.wrap(ee))}};function Ro(a,y,b,E,ee){if(a)for(let re=0;re<a.length;re++){const ae=a[re];ae.type==="middle"?(a[re]=y.bind(b,ti("inner",ae.value,E,ee,b,{isSelected:y.isSelected})),a[re].caret=ae.caret,a[re].isSelected=ae.isSelected,a[re].cssId=ae.cssId,a[re].htmlData=ae.htmlData,a[re].htmlStyle=ae.htmlStyle,a[re].attributes=ae.attributes,a[re].cssProperties=ae.cssProperties):ae.children&&Ro(ae.children,y,b,E,ee)}}var Mc=class Op extends Jn{constructor(y,b){var E;super({type:"macro",command:y,style:b.style}),this.body=b.body,b.captureSelection===void 0?b.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=b.captureSelection,this.macroArgs=b.args,this.expand=(E=b.expand)!=null?E:!1}static fromJson(y){return new Op(y.command,y)}toJson(){const y=super.toJson();return this.expand&&(y.expand=!0),this.captureSelection!==void 0&&(y.captureSelection=this.captureSelection),this.macroArgs&&(y.args=this.macroArgs),y}_serialize(y){var b;return y.expandMacro&&this.expand?this.bodyToLatex(y):this.command+((b=this.macroArgs)!=null?b:"")}render(y){const b=Jn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},sl=class Np extends Jn{constructor(){super({type:"macro-argument"})}static fromJson(y){return new Np}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},xl=class Rp extends Jn{constructor(y,b,E=!1,ee,re){var ae;super({type:"prompt",mode:(ae=re==null?void 0:re.mode)!=null?ae:"math",style:re==null?void 0:re.style,command:"\\placeholder"}),this.body=ee,this.correctness=b,this.placeholderId=y,this.locked=E,this.captureSelection=this.locked}static fromJson(y){return new Rp(y.placeholderId,y.correctness,y.locked,y.body,y)}toJson(){const y=super.toJson();return this.placeholderId&&(y.placeholderId=this.placeholderId),this.body||delete y.body,this.body&&(y.body=this.body.filter(b=>b.type!=="first").map(b=>b.toJson())),this.correctness&&(y.correctness=this.correctness),y.locked=this.locked,y}render(y){const b=new La({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Jn.createBox(y,this.body);if(!ae)return null;ae.height||(ae.height=b.metrics.xHeight),ae.setStyle("vertical-align",-ae.height,"em"),this.correctness==="correct"?ae.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&ae.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const fe=new Nr(ae,{type:"ord"});fe.setStyle("display","inline-block"),fe.setStyle("height",ae.height+ae.depth,"em"),fe.setStyle("vertical-align",-re,"em");let ge="ML__prompt ";this.locked?ge+=" ML__lockedPromptBox ":ge+=" ML__editablePromptBox ",this.correctness==="correct"?ge+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(ge+=" ML__incorrectPromptBox "),this.containsCaret&&(ge+=" ML__focusedPromptBox ");const be=new Nr(null,{classes:ge,attributes:{part:"prompt"}});be.height=fe.height+re,be.depth=fe.depth+re,be.width=fe.width+2*ee,be.setStyle("box-sizing","border-box"),be.setStyle("position","absolute"),be.setStyle("height",fe.height+fe.depth+2*re,"em"),ee===0&&be.setStyle("width","100%"),ee!==0&&(be.setStyle("width",`calc(100% + ${2*ee}em)`),be.setStyle("top",E,"em"),be.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(be.width=3*ee,be.setStyle("width",`calc(100% + ${3*ee}em)`),be.setStyle("left",-1.5*ee,"em"));let _e="";this.correctness==="incorrect"&&(_e+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),_e&&(be.svgOverlay=_e);const ze=new Nr([be,fe],{classes:"ML__prompt-atom"});return ze.setStyle("position","relative"),ze.setStyle("display","inline-block"),ze.setStyle("line-height",0),ze.height=fe.height+re+.2,ze.depth=fe.depth+re,ze.left=ee,ze.right=ee,ze.setStyle("height",fe.height+re,"em"),ze.setStyle("top",fe.depth-fe.height,"em"),ze.setStyle("vertical-align",fe.depth+re,"em"),ze.setStyle("margin-left",.5,"em"),ze.setStyle("margin-right",.5,"em"),this.caret&&(ze.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:ze}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.skipPlaceholders)return E;let ee="\\placeholder";return this.placeholderId&&(ee+=`[${this.placeholderId}]`),this.correctness==="correct"?ee+="[correct]":this.correctness==="incorrect"&&(ee+="[incorrect]"),this.locked&&(ee+="[locked]"),co(ee,E)}},Vs=class $p extends Jn{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new $p(y);for(const E of su)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new La({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new Nr(null),ae=new Nr(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(y,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Po(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Zl=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,ae;b!=null||(b={}),this.tokens=a,this.context=y instanceof La&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new La({from:y,mathstyle:b.mathstyle},b.style),this.args=(E=b.args)!=null?E:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(ee=b.style)!=null?ee:{},parseMode:(re=b.parseMode)!=null?re:"math",mathstyle:(ae=b.mathstyle)!=null?ae:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:we({},ee.style),parseMode:(y=a==null?void 0:a.mode)!=null?y:ee.parseMode,mathstyle:(b=a==null?void 0:a.mathstyle)!=null?b:ee.mathstyle,tabular:(E=a==null?void 0:a.tabular)!=null?E:!1};this.parsingContext=re}endContext(){this.parsingContext=this.parsingContext.parent}onError(a){this.errors.push(we({before:pl(this.tokens.slice(this.index,this.index+10)),after:pl(this.tokens.slice(Math.max(0,this.index-10),this.index))},a))}get mathlist(){return this.parsingContext.mathlist}set mathlist(a){this.parsingContext.mathlist=a}get parseMode(){return this.parsingContext.parseMode}set parseMode(a){this.parsingContext.parseMode=a}get tabularMode(){return this.parsingContext.tabular}get style(){let a=this.parsingContext;for(;a;){if(a.style)return we({},a.style);a=a.parent}return{}}set style(a){this.parsingContext.style=a}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(a){return this.tokens[this.index]===a?(this.index++,!0):!1}lastSubsupAtom(){let a;return this.mathlist.length>0&&(a=this.mathlist[this.mathlist.length-1],a.type==="subsup"||a.subsupPlacement!==void 0)||(a=new Vs({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:y}=this;if(y<this.tokens.length&&this.tokens[y].startsWith("\\")){const b=$n(this.tokens[y],this.parseMode);return!b||b.definitionType==="symbol"||b.ifMode&&!b.ifMode.includes(this.parseMode)?!1:(a=b.infix)!=null?a:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const a=this.peek();return a!=="\\\\"&&a!=="\\cr"&&a!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var a;const y=(a=this.args)==null?void 0:a.call(this,"?");return y?Xo(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Wi({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let y=this.tokens[this.index];for(;y&&y!==a;)y=this.tokens[++this.index];y===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const y=this.index;let b=this.end(),E="";for(;!b;){const re=this.get();Po(re)?(E+=re,b=this.end()||E.length>=a.length):b=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=y),ee}scanString(){let a="";for(;!this.end();){const y=this.peek();if(y==="]")return a;if(y==="<space>")a+=" ";else if(y.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=y.substring(1);else if(Po(y))a+=y;else return a;this.next()}return a}scanBalancedString(){let a="",y=this.end(),b=1;for(;!y;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",b+=1):E==="<}>"?(b-=1,b>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,y=b===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let y="",b=1;for(;b>0&&!this.end();){const E=this.get();E==="<}>"?(b-=1,b>0&&(y+="}")):E==="<{>"?(b+=1,y+="{"):(/\\[a-zA-Z]+$/.test(y)&&/^[a-zA-Z]/.test(E)&&(y+=" "),y+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return y}scanNumber(a=!0){var y,b;let E=!1,ee=this.peek();for(;ee==="<space>"||ee==="+"||ee==="-";)this.get(),ee==="-"&&(E=!E),ee=this.peek();a=!!a;let re=10,ae=/\d/;if(this.match("'"))re=8,ae=/[0-7]/,a=!0;else if(this.match('"'))re=16,ae=/[\dA-F]/,a=!0;else if(this.match("x"))re=16,ae=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return ee=this.get(),ee?ee.length===2&&ee.startsWith("\\")?{number:(E?-1:1)*((y=ee.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=ee.codePointAt(0))!=null?b:0),base:"alpha"}:null;let fe="";for(;this.hasPattern(ae);)fe+=this.get();if(!a&&(this.match(".")||this.match(",")))for(fe+=".";this.hasPattern(ae);)fe+=this.get();const ge=a?Number.parseInt(fe,re):Number.parseFloat(fe);return Number.isNaN(ge)?null:{number:E?-ge:ge,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const y=this.index,b=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return b;let E=!1;if(b===null)for(;;){const re=this.peek();if(re==="-")E=!E;else if(re!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const re=this.get();return re.startsWith("\\")?b?{register:re,global:!0,factor:(E?-1:1)*b.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=y,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||b!==null?{register:ee,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:ee}:(this.index=y,null)):(this.index=y,null)}scanValue(){const a=this.scanRegister();if(a)return a;const y=this.index,b=this.scanGlueOrDimen();if(b&&("unit"in b||"glue"in b&&"unit"in b.glue))return b;this.index=y;const E=this.scanNumber();if(E)return E;if(this.end()||!Po(this.peek()))return null;const ee=this.scanString();return ee.length>0?{string:ee}:null}scanDimen(){const a=this.scanNumber(!1);if(a===null)return null;const y=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let b;return this.matchKeyword("pt")?b="pt":this.matchKeyword("mm")?b="mm":this.matchKeyword("cm")?b="cm":this.matchKeyword("ex")?b="ex":this.matchKeyword("px")?b="px":this.matchKeyword("em")?b="em":this.matchKeyword("bp")?b="bp":this.matchKeyword("dd")?b="dd":this.matchKeyword("pc")?b="pc":this.matchKeyword("in")?b="in":this.matchKeyword("mu")&&(b="mu"),b?{dimension:y,unit:b}:{dimension:y}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const y={glue:a};if(this.matchKeyword("plus")){const b=this.scanDimen();if(b)y.grow=b;else return y}if(this.skipWhitespace(),this.match("\\relax"))return y;if(this.skipWhitespace(),this.matchKeyword("minus")){const b=this.scanDimen();if(b)y.shrink=b;else return y}return!y.grow&&!y.shrink?a:y}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const y=this.get();y==="c"||y==="r"||y==="l"?a.push({align:y}):y==="|"?a.push({separator:"solid"}):y===":"?a.push({separator:"dashed"}):y==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(b=>b==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return a}scanModeSet(){let a;if(this.match("\\(")&&(a="textstyle"),!a&&this.match("\\[")&&(a="displaystyle"),!a)return null;this.beginContext({mode:"math",mathstyle:a});const y=this.scan(b=>b===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const y=this.scan(b=>b===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const y=Lt(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const fe of y.params)if(fe.isOptional)b.push(this.scanOptionalArgument(fe.type));else{const ge=this.scanArgument(fe.type);ge||this.onError({code:"missing-argument",arg:a}),b.push(ge)}this.beginContext({tabular:y.tabular});const E=[],ee=[];let re=[],ae=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae)if(this.matchColumnSeparator())re.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){re.push(this.mathlist),this.mathlist=[];let fe=null;this.skipWhitespace(),this.match("[")&&(fe=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(fe!=null?fe:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(fe=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(fe)));while(!ae);return re.push(this.mathlist),re.length>0&&E.push(re),this.endContext(),y.createAtom(a,E,ee,b)}scanExpression(){const a=this.mathlist;if(this.mathlist=[],this.parseExpression()){const y=this.mathlist;return this.mathlist=a,y}return this.mathlist=a,null}scan(a){this.beginContext(),a||(a=ae=>ae==="<}>");let y="",b=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=$n(y,"math"),b&&(E=this.scanArguments(b)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return y?(console.assert(!!b),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):re=this.mathlist,this.endContext(),re}scanGroup(){const a=this.index;if(!this.match("<{>"))return null;const y=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const b=new Go(y,this.parseMode,this.style);return b.verbatimLatex=pl(this.tokens.slice(a,this.index)),b}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let a=1;for(;!this.end()&&a!==0;)this.match("(")&&(a+=1),this.match(")")&&(a-=1),a!==0&&this.parseExpression();const y=new Wa("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),y}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Po(a)&&!a.startsWith("\\"))return null;this.next();const y=$n(a,"math");return y?y.definitionType==="function"&&y.ifMode&&!y.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):y.definitionType==="symbol"&&(y.type==="mopen"||y.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(a)?a:(this.onError({code:"unexpected-delimiter",arg:a}),null):(this.onError({code:"unknown-command",arg:a}),null)}scanLeftRight(){var a;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new ys("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new ys("\\mright");let y="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;y="\\mright"}const b=this.scanDelim();if(!b)return this.onError({code:"unexpected-delimiter"}),new ys(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Wa(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const y=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?y.addChild(new Jn({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new Jn({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(ft(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),y=!a&&this.match("\\nolimits"),b=!y&&!a&&this.match("\\displaylimits");if(!a&&!y&&!b)return!1;const E=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return E===null?!1:(E.explicitSubsupPlacement=!0,a&&(E.subsupPlacement="over-under"),y&&(E.subsupPlacement="adjacent"),b&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let y;const b=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?b.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?b.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?y=ee.type.slice(0,-1):b.push(this.scanArgument(ee.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(Po(a)){const b=ws.createAtom(this.parseMode,a,we({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=$n(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new ys(a)];if(b.definitionType==="symbol"){const E=we({},this.style);b.variant&&(E.variant=b.variant),y=new Jn({type:b.type,command:a,style:E,value:String.fromCodePoint(b.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(b.applyMode||b.applyStyle||b.infix)return this.onError({code:"invalid-command",arg:a}),[new ys(a)];b.createAtom&&(y=b.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return y?[y]:null}scanArgument(a){var y;this.skipFiller();const b=this.parseMode;if(a==="auto"&&(a=b),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(y=this.scanDelim())!=null?y:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==b&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}return a==="balanced-string"||console.assert(!1),null}if(a==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}return a==="string"?E=this.scanString():a==="balanced-string"?E=this.scanBalancedString():a==="colspec"?E=this.scanColspec():a==="value"&&(E=this.scanValue()),this.skipUntilToken("<}>"),E}scanOptionalArgument(a){if(a=a==="auto"?this.parseMode:a,this.skipFiller(),!this.match("["))return null;let y=null;for(;!this.end()&&!this.match("]");)if(a==="string")y=this.scanString();else if(a==="value")y=this.scanValue();else if(a==="colspec")y=this.scanColspec();else if(a==="bbox"){const b={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)b.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?b.border=ae[1]:b.backgroundcolor={string:ee}}}y=b}else a==="math"&&(this.beginContext({mode:"math"}),y=this.mathlist.concat(this.scan(b=>b==="]")),this.endContext());return y}scanSymbolOrCommand(a){var y,b,E;if(a==="\\placeholder"){const fe=this.scanOptionalArgument("string"),ge=this.scanOptionalArgument("math"),be=Jn.serialize(ge,{defaultMode:"math"});let _e=[],ze;!ze&&be==="correct"?ze="correct":!ze&&be==="incorrect"?ze="incorrect":be!==""&&(_e=ge);const rt=this.scanOptionalArgument("string")==="locked",xt=this.scanArgument("auto");let It;return xt&&Array.isArray(xt)&&xt.length>0?It=xt:xt&&typeof xt=="object"&&"group"in xt?It=xt.group:It=_e,fe?[new xl(fe,ze,rt,It!=null?It:_e,{mode:this.parseMode,style:this.style})]:[new Wi({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const fe=this.index,ge=this.scanLiteralGroup()||this.next();if(!ge)return null;if(this.context.registers[ge.substring(1)]){const be=this.scanArgument("string");be!==null&&(this.context.registers[ge.substring(1)]=be);const _e=ya([a,pl(this.tokens.slice(fe,this.index))]);return[new Jn({type:"text",value:"",verbatimLatex:_e})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=$n(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(fe=>new Jn({type:"text",value:fe,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new ys(a)]);const ae=this.index;if(re.definitionType==="symbol"){const fe=we({},this.style);re.variant&&(fe.variant=re.variant),ee=new Jn({type:re.type,command:a,style:fe,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const fe=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let ge,be=[];if(re.parse?be=re.parse(this):[ge,be]=this.scanArguments(re),this.parseMode=fe,re.applyMode&&!re.applyStyle&&!re.createAtom)return ft(be[0]);if(re.infix)return this.onError({code:"too-many-infix-commands",arg:a}),null;if(typeof re.createAtom=="function")ee=re.createAtom({command:a,args:be,style:this.style,mode:this.parseMode}),ge&&(ee.body=ft(this.scanArgument(ge)));else if(typeof re.applyStyle=="function"){const _e=we(we({},this.style),re.applyStyle(a,be,this.context)),ze=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),ge){const rt=this.style;this.style=_e;const xt=this.scanArgument(ge);return this.style=rt,this.parseMode=ze,ft(xt)}this.style=_e}else ee=new Jn({type:"mord",command:(b=re.command)!=null?b:a,style:we({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof Jn&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const fe=ya([a,pl(this.tokens.slice(ae,this.index))]);fe&&(ee.verbatimLatex=fe)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const fe=this.scanSmartFence();if(fe)return[ee,fe]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Po(a)){const y=ws.createAtom(this.parseMode,a,we({},this.style));if(!y)return null;if(y.isFunction&&this.smartFence){const b=this.scanSmartFence();if(b)return[y,b]}return[y]}return a.startsWith("\\")?this.scanSymbolOrCommand(a):a==="<space>"?this.parseMode==="text"?[new al(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var y;const b=this.context.getMacro(a);if(!b)return null;const E=this.index,ee=b.args,re={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let ae=1;ae<=ee;ae++){let fe=this.scanLiteralGroup();if(!fe){const ge=this.index;this.scanExpression(),fe=pl(this.tokens.slice(ge,this.index))}re[ae]=fe}return new Mc(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:pl(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:Xo(b.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let ee=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b:this.scanGroup())!=null?E:this.scanLeftRight();if(ee===null){if(this.parseSupSub()||this.parseLimits())return!0;ee=this.scanSymbolCommandOrLiteral()}return ee?(Array.isArray(ee)?this.mathlist.push(...ee):this.mathlist.push(ee),!0):!1}};function Xo(a,y){var b,E,ee,re;const ae=(b=y==null?void 0:y.args)!=null?b:void 0,fe=new Zl(nl(a,ae),y==null?void 0:y.context,{args:ae,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(ee=y==null?void 0:y.parseMode)!=null?ee:"math",style:(re=y==null?void 0:y.style)!=null?re:{}}),ge=[];for(;!fe.end();)ge.push(...fe.scan(()=>!1));return ge}function t0(a,y){var b;const E=new Zl(nl(a,null),y==null?void 0:y.context,{mathstyle:"displaystyle",parseMode:(b=y==null?void 0:y.parseMode)!=null?b:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class Fp extends Jn{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=vo.go(_r.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=Xo(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new Fp(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return me(we({},super.toJson()),{arg:this.arg})}render(y){const b=Jn.createBox(y,this.body,{type:"inner"});return this.caret&&(b.caret=this.caret),this.bind(y,b)}_serialize(y){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};Tt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var _r={go:function(a,y){if(!a)return[];y===void 0&&(y="ce");var b="0",E={};E.parenthesisLevel=0,a=a.replace(/\n/g," "),a=a.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),a=a.replace(/[\u2026]/g,"...");for(var ee,re=10,ae=[];;){ee!==a?(re=10,ee=a):re--;var fe=_r.stateMachines[y],ge=fe.transitions[b]||fe.transitions["*"];e:for(var be=0;be<ge.length;be++){var _e=_r.patterns.match_(ge[be].pattern,a);if(_e){for(var ze=ge[be].task,rt=0;rt<ze.action_.length;rt++){var xt;if(fe.actions[ze.action_[rt].type_])xt=fe.actions[ze.action_[rt].type_](E,_e.match_,ze.action_[rt].option);else if(_r.actions[ze.action_[rt].type_])xt=_r.actions[ze.action_[rt].type_](E,_e.match_,ze.action_[rt].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+ze.action_[rt].type_+")"];_r.concatArray(ae,xt)}if(b=ze.nextState||b,a.length>0){if(ze.revisit||(a=_e.remainder),!ze.toContinue)break e}else return ae}}if(re<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(a,y){if(y)if(Object.prototype.toString.call(y)==="[object Array]")for(var b=0;b<y.length;b++)a.push(y[b]);else a.push(y)},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(a){var y=a.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 y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"(-)(9)^(-9)":function(a){var y=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"state of aggregation $":function(a){var y=_r.patterns.findObserveGroups(a,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(y&&y.remainder.match(/^($|[\s,;\)\]\}])/))return y;var b=a.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return b?{match_:b[0],remainder:a.substr(b[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(a){return _r.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return _r.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return _r.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return _r.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return _r.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return _r.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return _r.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return _r.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return _r.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return _r.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return _r.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return _r.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return _r.patterns.findObserveGroups(a,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\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(a){return _r.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return _r.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return _r.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return _r.patterns.findObserveGroups(a,"",/^\\[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(a){return _r.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return _r.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return _r.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return _r.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return _r.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return _r.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return _r.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return _r.patterns.findObserveGroups(a,"\\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(a){var y;if(y=a.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))/),y)return{match_:y[0],remainder:a.substr(y[0].length)};var b=_r.patterns.findObserveGroups(a,"","$","$","");return b&&(y=b.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),y)?{match_:y[0],remainder:a.substr(y[0].length)}:null},amount2:function(a){return this.amount(a)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(a){if(a.match(/^\([a-z]+\)$/))return null;var y=a.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return y?{match_:y[0],remainder:a.substr(y[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(a,y,b,E,ee,re,ae,fe,ge,be){var _e=function(kn,sr){if(typeof sr=="string")return kn.indexOf(sr)!==0?null:sr;var $r=kn.match(sr);return $r?$r[0]:null},ze=function(kn,sr,$r){for(var pr=0;sr<kn.length;){var bi=kn.charAt(sr),$i=_e(kn.substr(sr),$r);if($i!==null&&pr===0)return{endMatchBegin:sr,endMatchEnd:sr+$i.length};if(bi==="{")pr++;else if(bi==="}"){if(pr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];pr--}sr++}return pr>0,null},rt=_e(a,y);if(rt===null||(a=a.substr(rt.length),rt=_e(a,b),rt===null))return null;var xt=ze(a,rt.length,E||ee);if(xt===null)return null;var It=a.substring(0,E?xt.endMatchEnd:xt.endMatchBegin);if(re||ae){var In=this.findObserveGroups(a.substr(xt.endMatchEnd),re,ae,fe,ge);if(In===null)return null;var Br=[It,In.match_];return{match_:be?Br.join(""):Br,remainder:In.remainder}}else return{match_:It,remainder:a.substr(xt.endMatchEnd)}},match_:function(a,y){var b=_r.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return _r.patterns.patterns[a](y);var E=y.match(b);if(E){var ee;return E[2]?ee=[E[1],E[2]]:E[1]?ee=E[1]:ee=E[0],{match_:ee,remainder:y.substr(E[0].length)}}return null}},actions:{"a=":function(a,y){a.a=(a.a||"")+y},"b=":function(a,y){a.b=(a.b||"")+y},"p=":function(a,y){a.p=(a.p||"")+y},"o=":function(a,y){a.o=(a.o||"")+y},"q=":function(a,y){a.q=(a.q||"")+y},"d=":function(a,y){a.d=(a.d||"")+y},"rm=":function(a,y){a.rm=(a.rm||"")+y},"text=":function(a,y){a.text_=(a.text_||"")+y},insert:function(a,y,b){return{type_:b}},"insert+p1":function(a,y,b){return{type_:b,p1:y}},"insert+p1+p2":function(a,y,b){return{type_:b,p1:y[0],p2:y[1]}},copy:function(a,y){return y},rm:function(a,y){return{type_:"rm",p1:y||""}},text:function(a,y){return _r.go(y,"text")},"{text}":function(a,y){var b=["{"];return _r.concatArray(b,_r.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return _r.go(y,"tex-math")},"tex-math tight":function(a,y){return _r.go(y,"tex-math tight")},bond:function(a,y,b){return{type_:"bond",kind_:b||y}},"color0-output":function(a,y){return{type_:"color0",color:y[0]}},ce:function(a,y){return _r.go(y)},"1/2":function(a,y){var b=[];y.match(/^[+\-]/)&&(b.push(y.substr(0,1)),y=y.substr(1));var E=y.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return E[1]=E[1].replace(/\$/g,""),b.push({type_:"frac",p1:E[1],p2:E[2]}),E[3]&&(E[3]=E[3].replace(/\$/g,""),b.push({type_:"tex-math",p1:E[3]})),b},"9,9":function(a,y){return _r.go(y,"9,9")}},createTransitions:function(a){var y,b,E,ee,re={};for(y in a)for(b in a[y])for(E=b.split("|"),a[y][b].stateArray=E,ee=0;ee<E.length;ee++)re[E[ee]]=[];for(y in a)for(b in a[y])for(E=a[y][b].stateArray||[],ee=0;ee<E.length;ee++){var ae=a[y][b];if(ae.action_){ae.action_=[].concat(ae.action_);for(var fe=0;fe<ae.action_.length;fe++)typeof ae.action_[fe]=="string"&&(ae.action_[fe]={type_:ae.action_[fe]})}else ae.action_=[];for(var ge=y.split("|"),be=0;be<ge.length;be++)if(E[ee]==="*")for(var _e in re)re[_e].push({pattern:ge[be],task:ae});else re[E[ee]].push({pattern:ge[be],task:ae})}return re},stateMachines:{}};_r.stateMachines={ce:{transitions:_r.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(a,y){var b;if((a.d||"").match(/^[0-9]+$/)){var E=a.d;a.d=void 0,b=this.output(a),a.b=E}else b=this.output(a);return _r.actions["o="](a,y),b},"d= kv":function(a,y){a.d=y,a.dType="kv"},"charge or bond":function(a,y){if(a.beginsWithBond){var b=[];return _r.concatArray(b,this.output(a)),_r.concatArray(b,_r.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=_r.patterns.match_("orbital",a.o||""),ee=_r.patterns.match_("one lowercase greek letter $",a.o||""),re=_r.patterns.match_("one lowercase latin letter $",a.o||""),ae=_r.patterns.match_("$one lowercase latin letter$ $",a.o||""),fe=y==="-"&&(E&&E.remainder===""||ee||re||ae);fe&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var ge=[];return fe?(_r.concatArray(ge,this.output(a)),ge.push({type_:"hyphen"})):(E=_r.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(_r.concatArray(ge,_r.actions["d="](a,y)),_r.concatArray(ge,this.output(a))):(_r.concatArray(ge,this.output(a)),_r.concatArray(ge,_r.actions.bond(a,y,"-")))),ge},"a to o":function(a){a.o=a.a,a.a=void 0},"sb=true":function(a){a.sb=!0},"sb=false":function(a){a.sb=!1},"beginsWithBond=true":function(a){a.beginsWithBond=!0},"beginsWithBond=false":function(a){a.beginsWithBond=!1},"parenthesisLevel++":function(a){a.parenthesisLevel++},"parenthesisLevel--":function(a){a.parenthesisLevel--},"state of aggregation":function(a,y){return{type_:"state of aggregation",p1:_r.go(y,"o")}},comma:function(a,y){var b=y.replace(/\s*$/,""),E=b!==y;return E&&a.parenthesisLevel===0?{type_:"comma enumeration L",p1:b}:{type_:"comma enumeration M",p1:b}},output:function(a,y,b){var E;if(!a.r)E=[],!a.a&&!a.b&&!a.p&&!a.o&&!a.q&&!a.d&&!b||(a.sb&&E.push({type_:"entitySkip"}),!a.o&&!a.q&&!a.d&&!a.b&&!a.p&&b!==2?(a.o=a.a,a.a=void 0):!a.o&&!a.q&&!a.d&&(a.b||a.p)?(a.o=a.a,a.d=a.b,a.q=a.p,a.a=a.b=a.p=void 0):a.o&&a.dType==="kv"&&_r.patterns.match_("d-oxidation$",a.d||"")?a.dType="oxidation":a.o&&a.dType==="kv"&&!a.q&&(a.dType=void 0),E.push({type_:"chemfive",a:_r.go(a.a,"a"),b:_r.go(a.b,"bd"),p:_r.go(a.p,"pq"),o:_r.go(a.o,"o"),q:_r.go(a.q,"pq"),d:_r.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=_r.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=_r.go(a.rd);var re;a.rqt==="M"?re=_r.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=_r.go(a.rq),E={type_:"arrow",r:a.r,rd:ee,rq:re}}for(var ae in a)ae!=="parenthesisLevel"&&ae!=="beginsWithBond"&&delete a[ae];return E},"oxidation-output":function(a,y){var b=["{"];return _r.concatArray(b,_r.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:_r.go(y[0]),p2:_r.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:_r.go(y[0]),p2:_r.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:_r.go(y[0]),p2:_r.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:_r.go(y[0]),p2:_r.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:_r.go(y[1])}},"r=":function(a,y){a.r=y},"rdt=":function(a,y){a.rdt=y},"rd=":function(a,y){a.rd=y},"rqt=":function(a,y){a.rqt=y},"rq=":function(a,y){a.rq=y},operator:function(a,y,b){return{type_:"operator",kind_:b||y}}}},a:{transitions:_r.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:_r.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:_r.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(a){if(a.text_){var y={type_:"text",p1:a.text_};for(var b in a)delete a[b];return y}}}},pq:{transitions:_r.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(a,y){return{type_:"state of aggregation subscript",p1:_r.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:_r.go(y[1],"pq")}}}},bd:{transitions:_r.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(a,y){return{type_:"color",color1:y[0],color2:_r.go(y[1],"bd")}}}},oxidation:{transitions:_r.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(a,y){return{type_:"roman numeral",p1:y||""}}}},"tex-math":{transitions:_r.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"tex-math tight":{transitions:_r.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(a,y){a.o=(a.o||"")+"{"+y+"}"},output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"9,9":{transitions:_r.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:_r.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(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),y[1]&&(_r.concatArray(b,_r.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?_r.concatArray(b,_r.go(y[2],"pu-9,9")):b.push(y[2])),(y[3]||y[4])&&(y[3]==="e"||y[4]==="*"?b.push({type_:"cdot"}):b.push({type_:"times"}))),y[5]&&b.push("10^{"+y[5]+"}"),b},"number^":function(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),_r.concatArray(b,_r.go(y[1],"pu-9,9")),b.push("^{"+y[2]+"}"),b},operator:function(a,y,b){return{type_:"operator",kind_:b||y}},space:function(){return{type_:"pu-space-1"}},output:function(a){var y,b=_r.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=_r.patterns.match_("{(...)}",a.q||"");if(E&&E.remainder===""&&(a.q=E.match_),a.d&&(a.d=a.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),a.d=a.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),a.q){a.q=a.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),a.q=a.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var ee={d:_r.go(a.d,"pu"),q:_r.go(a.q,"pu")};a.o==="//"?y={type_:"pu-frac",p1:ee.d,p2:ee.q}:(y=ee.d,ee.d.length>1||ee.q.length>1?y.push({type_:" / "}):y.push({type_:"/"}),_r.concatArray(y,ee.q))}else y=_r.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:_r.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(a,y){a.rm+="^{"+y+"}"},space:function(){return{type_:"pu-space-2"}},output:function(a){var y=[];if(a.rm){var b=_r.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=_r.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:_r.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(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){var b=a.text_.length%3;b===0&&(b=3);for(var E=a.text_.length-3;E>0;E-=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(0,b)),y.reverse()}else y.push(a.text_);for(var ee in a)delete a[ee];return y},"output-o":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){for(var b=a.text_.length-3,E=0;E<b;E+=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(E))}else y.push(a.text_);for(var ee in a)delete a[ee];return y}}}};var vo={go:function(a,y){if(!a)return"";for(var b="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?b+=re:(b+=vo._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&vo.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:vo._goInner(a.a),b:vo._goInner(a.b),p:vo._goInner(a.p),o:vo._goInner(a.o),q:vo._goInner(a.q),d:vo._goInner(a.d)};b.a&&(b.a.match(/^[+\-]/)&&(b.a="{"+b.a+"}"),y+=b.a+"\\,"),(b.b||b.p)&&(y+="{\\vphantom{X}}",y+="^{\\hphantom{"+(b.b||"")+"}}_{\\hphantom{"+(b.p||"")+"}}",y+="{\\vphantom{X}}",y+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(b.b||"")+"}}",y+="_{\\vphantom{2}\\llap{\\smash[t]{"+(b.p||"")+"}}}"),b.o&&(b.o.match(/^[+\-]/)&&(b.o="{"+b.o+"}"),y+=b.o),a.dType==="kv"?((b.d||b.q)&&(y+="{\\vphantom{X}}"),b.d&&(y+="^{"+b.d+"}"),b.q&&(y+="_{\\smash[t]{"+b.q+"}}")):a.dType==="oxidation"?(b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"),b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}")):(b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}"),b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"));break;case"rm":y="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),y="\\mathrm{"+a.p1+"}"):y="\\text{"+a.p1+"}";break;case"roman numeral":y="\\mathrm{"+a.p1+"}";break;case"state of aggregation":y="\\mskip2mu "+vo._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+vo._goInner(a.p1);break;case"bond":if(y=vo._getBond(a.kind_),!y)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";y="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+vo._goInner(a.p1)+"}_{"+vo._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+vo._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:vo._goInner(a.rd),rq:vo._goInner(a.rq)},ae=vo._getArrow(a.r);re.rd||re.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(ae="\\long"+ae,re.rd&&(ae="\\overset{"+re.rd+"}{"+ae+"}"),re.rq&&(a.r==="<-->"?ae="\\underset{\\lower2mu{"+re.rq+"}}{"+ae+"}":ae="\\underset{\\lower6mu{"+re.rq+"}}{"+ae+"}"),ae=" {}\\mathrel{"+ae+"}{} "):(re.rq&&(ae+="[{"+re.rq+"}]"),ae+="{"+re.rd+"}",ae=" {}\\mathrel{\\x"+ae+"}{} "):ae=" {}\\mathrel{\\long"+ae+"}{} ",y=ae;break;case"operator":y=vo._getOperator(a.kind_);break;case"1st-level escape":y=a.p1+" ";break;case"space":y=" ";break;case"entitySkip":y="~";break;case"pu-space-1":y="~";break;case"pu-space-2":y="\\mkern3mu ";break;case"1000 separator":y="\\mkern2mu ";break;case"commaDecimal":y="{,}";break;case"comma enumeration L":y="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":y="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":y="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":y="\\text{-}";break;case"addition compound":y="\\,{\\cdot}\\,";break;case"electron dot":y="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":y="{\\times}";break;case"prime":y="\\prime ";break;case"cdot":y="\\cdot ";break;case"tight cdot":y="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":y="\\times ";break;case"circa":y="{\\sim}";break;case"^":y="uparrow";break;case"v":y="downarrow";break;case"ellipsis":y="\\ldots ";break;case"/":y="/";break;case" / ":y="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return y},_getArrow:function(a){switch(a){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(a){switch(a){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(a){switch(a){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 M1(a){}function _1(a){}var r0=class zp extends Jn{constructor(y){super(me(we({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new zp(y)}toJson(){return me(we({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Nr(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):co(this.command,this.value)}},i0=class Kp extends Jn{constructor(y){super(me(we({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new Kp(y)}toJson(){return me(we({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=pn(this.value,this.size,y,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return b?(b=this.bind(y,b),this.caret&&(b.caret=this.caret),b):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):co(this.command,this.value)}},bd=class Hp extends Jn{constructor(y,b,E,ee){var re,ae;super({type:"enclose",command:y,style:ee.style}),this.body=b,this.backgroundcolor=ee.backgroundcolor,E.updiagonalarrow&&(E.updiagonalstrike=!1),E.box&&(E.left=!1,E.right=!1,E.bottom=!1,E.top=!1),this.notation=E,this.shadow=(re=ee.shadow)!=null?re:"none",this.strokeWidth=(ae=ee.strokeWidth)!=null?ae:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=ee.strokeStyle,this.svgStrokeStyle=ee.svgStrokeStyle,this.strokeColor=ee.strokeColor,this.borderStyle=ee.borderStyle,this.padding=ee.padding,this.captureSelection=!1}static fromJson(y){return new Hp(y.command,y.body,y.notation,y)}toJson(){return me(we({},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(y){var b;if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=$n(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ee=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){ee+="{"+Object.keys(this.notation).join(" ")+"}";let re="",ae="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(re+=ae+'mathbackground="'+this.backgroundcolor+'"',ae=","),this.shadow&&this.shadow!=="auto"&&(re+=ae+'shadow="'+this.shadow+'"',ae=","),this.strokeWidth||this.strokeStyle!=="solid"?(re+=ae+this.borderStyle,ae=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(re+=ae+'mathcolor="'+this.strokeColor+'"',ae=","),re&&(ee+=`[${re}]`)}return co(ee,this.bodyToLatex(y))}render(y){const b=new La({parent:y},this.style),E=Jn.createBox(b,this.body);if(!E)return null;const ee=im(this.borderStyle),re=b.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});E.setStyle("position","relative"),E.setStyle("display","inline-block"),E.setStyle("top",re,"em"),E.setStyle("height",E.height+E.depth,"em"),E.setStyle("width",E.width,"em");const ae=new Nr(null,{classes:"ML__notation"});let fe=E.height+E.depth+2*re;const ge=E.width+2*re;let be="";if(this.notation.horizontalstrike&&(be+=this.line(3,50,97,50)),this.notation.verticalstrike&&(be+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(be+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(be+=this.line(3,3,97,97)),this.notation.updiagonalarrow){be+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const It=.03*Math.sqrt(ge*ge+fe*fe)*1,In=E.width*It,Br=(E.depth+E.height)*It,kn=re+E.width;let sr=re;sr+Br-.4*In<0&&(sr=.4*In-Br),be+='<polygon points="',be+=`${kn},${sr} ${kn-In-.4*Br},${sr+Br-.4*In} `,be+=`${kn-.7*In},${sr+.7*Br} ${kn-In+.4*Br},${sr+Br+.4*In} `,be+=`${kn},${sr}`,be+=`" stroke='none' fill="${this.strokeColor}"`,be+="/>"}let _e=0;if(this.notation.phasorangle){const rt=a0(b),xt=(E.height+E.depth+2*rt+re).toString(),It=(E.height+E.depth)/2;be+=this.line(re.toString(),xt,(re+It+E.width).toString(),xt),be+=this.line(re.toString(),xt,(re+It).toString(),(re-rt).toString()),fe+=rt,_e=It,E.left+=fe/2-re}if(this.notation.longdiv){const rt=a0(b);fe+=rt,be+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const xt=.3;_e=xt+rt,E.left+=xt+rt,E.setTop(re+rt),be+='<path d="',be+=`M ${re} ${re} a${xt} ${(E.depth+E.height+2*rt)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*rt} "`,be+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,be+="/>"}if(ae.width=E.width+2*re+_e,ae.height=E.height+re,ae.depth=E.depth+re,ae.setStyle("box-sizing","border-box"),ae.setStyle("left",`calc(-${ee} / 2 )`),ae.setStyle("height",`${Math.floor(100*fe)/100}em`),ae.setStyle("top",`calc(${ee} / 2 )`),this.backgroundcolor&&ae.setStyle("background-color",this.backgroundcolor),this.notation.box&&ae.setStyle("border","1px solid red"),this.notation.actuarial&&(ae.setStyle("border-top",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(ae.setStyle("border-bottom",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(ae.setStyle("border-radius","8px"),ae.setStyle("border",this.borderStyle)),this.notation.circle&&(ae.setStyle("border-radius","50%"),ae.setStyle("border",this.borderStyle)),this.notation.top&&ae.setStyle("border-top",this.borderStyle),this.notation.left&&ae.setStyle("border-left",this.borderStyle),this.notation.right&&ae.setStyle("border-right",this.borderStyle),this.notation.bottom&&ae.setStyle("border-bottom",this.borderStyle),be){let rt="";this.shadow==="auto"&&(rt+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(rt+=`filter: drop-shadow(${this.shadow})`),rt+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,rt+=' stroke-linecap="round"',this.svgStrokeStyle&&(rt+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=rt,ae.svgOverlay=be}const ze=new Nr([ae,E]);return ze.setStyle("position","relative"),ze.setStyle("vertical-align",re,"em"),ze.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),ze.setStyle("display","inline-block"),ze.height=ae.height,ze.depth=ae.depth,ze.width=ae.width-2*re,ze.left=re,ze.right=re,this.caret&&(ze.caret=this.caret),ze.wrap(b)}line(y,b,E,ee){return`<line x1="${bf(y)}" y1="${bf(b)}" x2="${bf(E)}" y2="${bf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function bf(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const y=a.match(/([0-9][a-zA-Z\%]+)/);return y===null?"1px":y[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const y=a.isDisplayStyle?el:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var _c=class Wp extends Jn{constructor(y,b,E){var ee,re;super(me(we({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=y,this.below=b,this.hasBarLine=(ee=E==null?void 0:E.hasBarLine)!=null?ee:!0,this.continuousFraction=(re=E==null?void 0:E.continuousFraction)!=null?re:!1,this.numerPrefix=E==null?void 0:E.numerPrefix,this.denomPrefix=E==null?void 0:E.denomPrefix,this.mathstyleName=E==null?void 0:E.mathstyleName,this.leftDelim=E==null?void 0:E.leftDelim,this.rightDelim=E==null?void 0:E.rightDelim,this.fractionNavigationOrder=E==null?void 0:E.fractionNavigationOrder}static fromJson(y){return new Wp(y.above,y.below,y)}toJson(){const y={};return this.continuousFraction&&(y.continuousFraction=!0),this.numerPrefix&&(y.numerPrefix=this.numerPrefix),this.denomPrefix&&(y.denomPrefix=this.denomPrefix),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),this.hasBarLine||(y.hasBarLine=!1),this.mathstyleName&&(y.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(y.fractionNavigationOrder=this.fractionNavigationOrder),we(we({},super.toJson()),y)}get children(){if(this._children)return this._children;const y=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const b of this.below)y.push(...b.children),y.push(b);for(const b of this.above)y.push(...b.children),y.push(b)}else{for(const b of this.above)y.push(...b.children),y.push(b);for(const b of this.below)y.push(...b.children),y.push(b)}return this._children=y,y}render(y){var b,E;const ee=new La({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new La({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),fe=this.numerPrefix?new Nr([new Nr(this.numerPrefix),Jn.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(b=Jn.createBox(ae,this.above,{type:"ignore"}))!=null?b:new Nr(null,{type:"ignore"}),ge=new La({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),be=this.denomPrefix?new Nr([new Nr(this.denomPrefix),Jn.createBox(ge,this.below,{type:"ignore"})]):(E=Jn.createBox(ge,this.below,{type:"ignore"}))!=null?E:new Nr(null,{type:"ignore"}),_e=this.hasBarLine?re.defaultRuleThickness:0;let ze,rt=0,xt;ee.isDisplayStyle?(ze=ae.metrics.num1,rt=_e>0?3*_e:7*_e,xt=ge.metrics.denom1):(_e>0?(ze=ae.metrics.num2,rt=_e):(ze=ae.metrics.num3,rt=3*re.defaultRuleThickness),xt=ge.metrics.denom2);const It=[];this.isSelected&&It.push("ML__selected");const In=fe.depth,Br=be.height;let kn;if(_e<=0){const Ci=ze-In-(Br-xt);Ci<rt&&(ze+=(rt-Ci)/2,xt+=(rt-Ci)/2),kn=new Qa({individualShift:[{box:fe,shift:-ze,classes:[...It,"ML__center"]},{box:be,shift:xt,classes:[...It,"ML__center"]}]}).wrap(ee)}else{const Ci=new Nr(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Ci.softWidth=Math.max(fe.width,be.width),Ci.height=_e/2,Ci.depth=_e/2;const Pa=os+_e/2;ze<rt+In+Pa&&(ze=rt+In+Pa);const Ya=os-_e/2;xt<rt+Br-Ya&&(xt=rt+Br-Ya),kn=new Qa({individualShift:[{box:be,shift:xt,classes:[...It,"ML__center"]},{box:Ci,shift:-Ya,classes:It},{box:fe,shift:-ze,classes:[...It,"ML__center"]}]}).wrap(ee)}const sr=ee.isDisplayStyle?re.delim1:re.delim2,$r=this.leftDelim?this.bind(y,hi("open",this.leftDelim,sr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):vi(ee,"open");let pr=null;this.continuousFraction?pr=new Nr(null,{type:"close"}):this.rightDelim?pr=this.bind(y,hi("close",this.rightDelim,sr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):pr=vi(ee,"close");const bi=new Nr([$r,kn,pr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),$i=this.bind(y,bi);return this.caret&&($i.caret=this.caret),this.attachSupsub(y,{base:$i})}},ns=class Zp extends Jn{constructor(y,b){var E;super({type:"latex",value:y,mode:"latex"}),this.isSuggestion=(E=b==null?void 0:b.isSuggestion)!=null?E:!1,this.isError=!1}static fromJson(y){const b=new Zp(y.value);return y.isSuggestion&&(b.isSuggestion=!0),y.isError&&(b.isError=!0),b}toJson(){const y={};return this.isSuggestion&&(y.isSuggestion=!0),this.isError&&(y.isError=!0),we({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Nr(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},xd=class jp extends Jn{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new ns(b)),this.skipBoundary=!1}static fromJson(y){return new jp("")}toJson(){return super.toJson()}render(y){const b=Jn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){var b,E;return(E=(b=this.body)==null?void 0:b.map(ee=>ee.value).join(""))!=null?E:""}},fh=class Vp extends Jn{constructor(y,b){super(me(we({},b),{type:"extensible-symbol",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Vp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.value&&(y.symbol=this.value),y}render(y){var b;const E=y.isDisplayStyle&&this.value!=="\\smallint",ee=new Nr(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:y.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-os*y.scalingFactor,ae=ee.italic;ee.setTop(re);let fe=ee;if(this.superscript||this.subscript){const ge=(b=this.subsupPlacement)!=null?b:"auto";fe=ge==="over-under"||ge==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(y,{base:ee})}return new Nr(this.bind(y,fe),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[];return E.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),ya(E)}},Ou=class Up extends Jn{constructor(y){const b=y.body;super(me(we({},y),{type:"overlap",body:typeof b=="string"?[new Jn({value:b})]:b,style:y==null?void 0:y.style})),this.skipBoundary=!0,this.align=y==null?void 0:y.align,this.boxType=y==null?void 0:y.boxType}static fromJson(y){return new Up(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),we(we({},super.toJson()),y)}render(y){const b=Jn.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new Nr([b,new Nr(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Us=class Gp extends Jn{constructor(y){var b,E,ee,re;super({type:"overunder",command:y.command,style:y.style,mode:y.mode,body:y.body,skipBoundary:(b=y.skipBoundary)!=null?b:!0}),this.subsupPlacement=y.supsubPlacement,this.svgAbove=y.svgAbove,this.svgBelow=y.svgBelow,this.svgBody=y.svgBody,this.above=y.above,this.below=y.below,this.boxType=(E=y.boxType)!=null?E:"ord",this.paddedBody=(ee=y.paddedBody)!=null?ee:!1,this.paddedLabels=(re=y.paddedLabels)!=null?re:!1}static fromJson(y){return new Gp(y)}toJson(){const y=super.toJson();return this.skipBoundary||(y.skipBoundary=!1),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.svgAbove&&(y.svgAbove=this.svgAbove),this.svgBelow&&(y.svgBelow=this.svgBelow),this.svgBody&&(y.svgBody=this.svgBody),this.boxType!=="ord"&&(y.boxType=this.boxType),this.paddedBody&&(y.paddedBody=!0),this.paddedLabels&&(y.paddedLabels=!0),y}render(y){let b=this.svgBody?Bs(this.svgBody):Jn.createBox(y,this.body,{type:"ignore"});const E=new La({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Bs(this.svgAbove):this.above&&(ee=Jn.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Bs(this.svgBelow):this.below&&(re=Jn.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Nr([vi(y,"open"),b,vi(y,"close")],{type:"ignore"}));let ae=om(y,{base:b,above:ee,below:re,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return ae?(this.subsupPlacement==="over-under"?ae=this.attachLimits(y,{base:ae,type:ae.type}):ae=this.attachSupsub(y,{base:ae}),this.caret&&(ae.caret=this.caret),this.bind(y,ae)):null}};function om(a,y){if(!y.base)return null;if(!y.above&&!y.below){const fe=new Nr(y.base,{type:y.type});return fe.setStyle("position","relative"),fe}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const ee=y.base,re=0,ae=["ML__center"];if(y.paddedAboveBelow&&ae.push("ML__label_padding"),y.below&&y.above){const fe=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Qa({bottom:fe,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]})}else y.below?E=new Qa({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Qa({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]}));return new Nr(E,{type:y.type})}var Sd=class Xp extends Jn{constructor(y){var b,E,ee,re;super(me(we({},y),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(b=y.isInvisible)!=null?b:!1,this.smashDepth=(E=y.smashDepth)!=null?E:!1,this.smashHeight=(ee=y.smashHeight)!=null?ee:!1,this.smashWidth=(re=y.smashWidth)!=null?re:!1}static fromJson(y){return new Xp(y)}toJson(){const y={};return this.isInvisible&&(y.isInvisible=!0),this.smashDepth&&(y.smashDepth=!0),this.smashHeight&&(y.smashHeight=!0),this.smashWidth&&(y.smashWidth=!0),we(we({},super.toJson()),y)}render(y){const b=new La({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Jn.createBox(b,this.body,{classes:"inner"});const E=Jn.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new Nr(null,{classes:"fix"});return new Nr([E,ee],{classes:"rlap"}).wrap(y)}if(!this.smashHeight&&!this.smashDepth)return E;if(this.smashHeight&&(E.height=0),this.smashDepth&&(E.depth=0),E.children)for(const ee of E.children)this.smashHeight&&(ee.height=0),this.smashDepth&&(ee.depth=0);return new Qa({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},wd=class qp extends Jn{constructor(y){var b;super(we({type:"spacing"},y)),this.width=y==null?void 0:y.width,this._braced=(b=y==null?void 0:y.braced)!=null?b:!1}static fromJson(y){return new qp(y)}toJson(){const y=super.toJson();return this.width!==void 0&&(y.width=this.width),this._braced&&(y.braced=!0),y}render(y){var b;if(this.command==="space")return new Nr(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Nr(null,{classes:"mspace"}),E.left=y.toEm(this.width);else{const ee=(b={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?b:"mediumspace";E=new Nr(null,{classes:ee})}return E=this.bind(y,E),this.caret&&(E.caret=this.caret),E}_serialize(y){var b;if(!y.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=$n(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ee=(b=this.command)!=null?b:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Io(this.width)}}`:`${ee}${Io(this.width)}`}},o0=class Yp extends Jn{constructor(y){var b;super(me(we({},y),{type:"surd",mode:(b=y.mode)!=null?b:"math",style:y.style,displayContainsHighlight:!0,body:y.body})),this.above=y.index}static fromJson(y){return new Yp(me(we({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ee=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?co(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:co(E,ee)}get children(){if(this._children)return this._children;const y=[];if(this.above)for(const b of this.above)y.push(...b.children),y.push(b);if(this.body)for(const b of this.body)y.push(...b.children),y.push(b);return this._children=y,y}render(y){var b;const E=new La({parent:y,mathstyle:"cramp"},this.style),ee=(b=Jn.createBox(E,this.body,{type:"inner"}))!=null?b:new Nr(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,fe=y.isDisplayStyle?el:ae,ge=new Nr(null,{classes:"ML__sqrt-line",style:this.style});ge.height=ae,ge.softWidth=ee.width;let be=re*(ae+fe/4);const ze=Math.max(re*2*fe,ee.height+ee.depth)+be+ae,rt=new La({parent:y},this.style),xt=this.bind(rt,new Nr(hi("inner","\\surd",ze,!1,rt,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!xt)return null;const It=xt.height+xt.depth-ae;It>ee.height+ee.depth+be&&(be=(be+It-(ee.height+ee.depth))/2),xt.setTop(xt.height-ee.height-be);const In=this.bind(y,new Qa({firstBaseline:[{box:new Nr(ee)},be-2*ae,{box:ge},ae]})),Br=Jn.createBox(new La({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Br){const $r=new Nr([xt,In],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return $r.setStyle("display","inline-block"),$r.setStyle("height",$r.height+$r.depth,"em"),this.caret&&($r.caret=this.caret),this.bind(y,$r)}const kn=new Qa({shift:-.6*(Math.max(xt.height,In.height)-Math.max(xt.depth,In.depth)),children:[{box:Br}]}),sr=new Nr([new Nr(kn,{classes:"ML__sqrt-index",type:"ignore"}),xt,In],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return sr.height=xt.height,sr.depth=xt.depth,this.caret&&(sr.caret=this.caret),this.bind(y,sr)}},sm=class extends Nr{constructor(a){super(null,{type:"skip"}),this._width=a}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function xf(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let ee=E-1;for(;ee>=0&&b[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){xf(a.parent,y);return}E>0&&b[E-1].type==="skip"?b[E-1].width+=y:b.splice(E,0,new sm(y))}var lm={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}},um={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function cm(a){Ed(a,(y,b)=>{b.type==="bin"&&(!y||/^(middle|bin|op|rel|open|punct)$/.test(y.type))&&(b.type="ord"),(y==null?void 0:y.type)==="bin"&&/^(rel|close|punct)$/.test(b.type)&&(y.type="ord"),b.type!=="ignore"&&(y=b)})}function Cd(a,y){if(!a.children)return a;const b=a.children;cm(b);const E=y.getRegisterAsEm("thinmuskip"),ee=y.getRegisterAsEm("medmuskip"),re=y.getRegisterAsEm("thickmuskip");return Ed(b,(ae,fe)=>{var ge,be,_e;if(!ae)return;const ze=ae.type,rt=fe.isTight?(ge=um[ze])!=null?ge:null:(be=lm[ze])!=null?be:null,xt=(_e=rt==null?void 0:rt[fe.type])!=null?_e:null;xt===3&&xf(fe,E),xt===4&&xf(fe,ee),xt===5&&xf(fe,re)}),a}function Ed(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Ed(E.children,y,b):E.type==="ignore"?Ed(E.children,y):(y(b,E),Ed(E.children,y),b=E);return b}var hh=class Jp extends Jn{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new Jn({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new Jp(me(we({},y),{tooltip:du(y.tooltip)}))}toJson(){var y;const b=(y=this.tooltip.body)==null?void 0:y.filter(E=>E.type!=="first").map(E=>E.toJson());return me(we({},super.toJson()),{tooltip:b})}render(y){const b=Jn.createBox(new La,this.body);if(!b)return null;const E=new La({parent:y,mathstyle:"displaystyle"},{fontSize:dl}),ee=gc(Cd(new Nr(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new Nr([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},Nu=class Qp extends Jn{constructor(y,b){super(me(we({},b),{type:"operator",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.variantStyle=b==null?void 0:b.variantStyle,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Qp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.variantStyle&&(y.variantStyle=this.variantStyle),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.value&&(y.symbol=this.value),y}render(y){var b;const E=new Nr(this.value,{type:"op",mode:"math",maxFontSize:y.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:y.letterShapeStyle});let ee=E;if(this.superscript||this.subscript){const re=(b=this.subsupPlacement)!=null?b:"auto";ee=re==="over-under"||re==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:E}):this.attachSupsub(y,{base:E})}return new Nr(this.bind(y,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=$n(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),ya(E)}};function du(a){if(Oe(a))return a.map(E=>du(E));if(typeof a=="string")return Jn.fromJson(a);a=we({},a);for(const E of su)a[E]&&(a[E]=du(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=du(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=la.fromJson(a)),y==="box"&&(b=_o.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=Wl.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=bd.fromJson(a)),y==="error"&&(b=ys.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=_c.fromJson(a)),y==="group"&&(b=Go.fromJson(a)),y==="latex"&&(b=ns.fromJson(a)),y==="latexgroup"&&(b=xd.fromJson(a)),y==="leftright"&&(b=Wa.fromJson(a)),y==="macro"&&(b=Mc.fromJson(a)),y==="macro-argument"&&(b=sl.fromJson(a)),y==="operator"&&(b=Nu.fromJson(a)),y==="overlap"&&(b=Ou.fromJson(a)),y==="overunder"&&(b=Us.fromJson(a)),y==="placeholder"&&(b=Wi.fromJson(a)),y==="prompt"&&(b=xl.fromJson(a)),y==="phantom"&&(b=Sd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=wd.fromJson(a)),y==="subsup"&&(b=Vs.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=al.fromJson(a)),y==="tooltip"&&(b=hh.fromJson(a)),b||(console.assert(!y||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(y),`MathLive 0.98.5: an unexpected atom type "${y}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),b=Jn.fromJson(a));for(const E of su)a[E]&&b.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(b.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(b.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),a.isFunction&&(b.isFunction=!0),a.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),a.skipBoundary&&(b.skipBoundary=!0),a.captureSelection&&(b.captureSelection=!0),b}function dm(a){if(a&&Array.isArray(a))return a.map(y=>y==="<null>"?null:typeof y=="object"&&"group"in y?{group:y.group.map(b=>du(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>du(b)):y)}var s0={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"]},ph={"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]$/},l0=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,fm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,hm=[/^[a-z]$/,/^[A-Z]$/,l0,fm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends ws{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,ae;if(y===null)return new Jn({type:"mord",mode:"math",command:a,value:a,style:b});const fe=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const be=new Jn({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return fe&&(be.isFunction=!0),a.startsWith("\\")&&(be.verbatimLatex=a),be}const ge=new Jn({type:"mord",mode:"math",command:(ae=y.command)!=null?ae:a,value:a,style:b});return fe&&(ge.isFunction=!0),a.startsWith("\\")&&(ge.verbatimLatex=a),ge}serialize(a,y){const b=gm(a,me(we({},y),{defaultMode:"math"}));return b.length===0||y.defaultMode!=="text"?b:["$ ",...b," $"]}getFont(a,y){console.assert(y.variant!==void 0);let{variant:b}=y,{variantStyle:E}=y;b==="normal"&&!E&&/[\u00A3\u0131\u0237]/.test(a.value)&&(b="main",E="italic"),b==="normal"&&!E&&a.value.length===1&&hm.forEach((fe,ge)=>{var be;fe.test(a.value)&&pm[(be=y.letterShapeStyle)!=null?be:"tex"][ge]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=Sn(a.value,b,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function gm(a,y){const{parent:b}=a[0],E=u0(b);return Mo(a,"variant").map(ee=>{const re=u0(ee[0]);let ae="";re&&re!==E&&(ae={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"}[re],console.assert(ae!==void 0));const fe=ya(ee.map(ge=>ge._serialize(y)));return ae?co(ae,fe):fe})}function u0(a){if(!a)return"";const{style:y}=a;if(y.variant===void 0)return"";let b=y.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(y.variant)&&y.variantStyle&&y.variantStyle!=="up"&&(b+="-"+y.variantStyle),b}new mm;function vm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Mo(a,"fontShape").map(b=>{const E=vm(b,y),{fontShape:ee}=b[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${co("\\fontshape",ee)}${ya(E)}}`:re?co(re,ya(E)):ya(E)})}function bm(a,y){return Mo(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:ee}=b[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${co("\\fontseries",ee)}${ya(E)}}`:re?co(re,ya(E)):ya(E)})}function xm(a,y){return Mo(a,"fontSize").map(b=>{var E,ee;const re=bm(b,y),ae=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?ee:"";return ae?`${ae} ${ya(re)}`:ya(re)})}function Sm(a,y,b){return Mo(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,y),fe=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return fe?`\\${fe}{${ya(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ya(ae)}}`:b?`\\text{${ya(ae)}}`:ya(ae)})}var c0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},wm=class extends ws{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new al(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return Sm(a,me(we({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,ae;const{fontFamily:fe}=y;if(c0[fe]?a.classes+=" "+c0[fe]:fe&&a.setStyle("font-family",fe),y.fontShape&&(a.classes+=" ",a.classes+=(b={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[y.fontShape])!=null?b:""),y.fontSeries){const ge=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);ge&&(a.classes+=" ",a.classes+=(ee={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"}[(E=ge[1])!=null?E:""])!=null?ee:"",a.classes+=" ",a.classes+=(ae={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"}[(re=ge[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new wm;var Cm=class extends ws{constructor(){super("latex")}createAtom(a){return new ns(a)}serialize(a,y){return a.filter(b=>b instanceof ns&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var Em={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:["","=","","="]}},mh={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:["","=","","="]}},d0={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:["\\","|","",""]}},f0={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:[")",")",")",")"]}},Mm={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:["=","=","=","="]}},_m={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:["<",">","",""]}},km={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"]}},Lm={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:["=","=","=","="]}},Am={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:["<",">","|",""]}},Tm={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:[".",".",".","."]}},Im={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"]}},Dm={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:["<",">","",""]}},Pm={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(a){const y=a.split("+"),b={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:y.pop()};return y.includes("shift")&&(b.shift=!0),y.includes("alt")&&(b.alt=!0),y.includes("ctrl")&&(b.ctrl=!0),y.includes("cmd")&&(b.cmd=!0),y.includes("win")&&(b.win=!0),y.includes("meta")&&(b.meta=!0),b}function kc(a){let y="";return a.shift&&(y+="shift+"),a.alt&&(y+="alt+"),a.ctrl&&(y+="ctrl+"),a.cmd&&(y+="cmd+"),a.win&&(y+="win+"),a.meta&&(y+="meta+"),y+a.key}var Bm={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]"},Md=[],_d;function gh(){switch(Ce()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Rs(a){(!a.platform||a.platform===gh())&&Md.push(a)}function Om(a,y){var b;const E={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!a)return E;for(const[ee,re]of Object.entries(y.mapping)){if(re[0]===a)return E.key=`[${ee}]`,E;if(re[1]===a)return E.shift=!0,E.key=`[${ee}]`,E;if(re[2]===a)return E.alt=!0,E.key=`[${ee}]`,E;if(re[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${ee}]`,E}return E.key=(b=Bm[a])!=null?b:"",E}function Nm(a){if(a.code)return a;const y=Object.entries(kd().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,fe]of y)if(fe[re]===a.key){ee=ae,re===3?(b=!0,E=!0):re===2?b=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,me(we({},a),{altKey:b,shiftKey:E,code:ee}))}function Rm(a){var y,b;if(!a||a.key==="Unidentified"||a.key==="Dead")return;const E=a.shiftKey&&a.altKey?3:a.altKey?2:a.shiftKey?1:0;for(const ee of Md)((y=ee.mapping[a.code])==null?void 0:y[E])===a.key?ee.score+=1:(b=ee.mapping[a.code])!=null&&b[E]&&(ee.score=0);Md.sort((ee,re)=>re.score-ee.score)}function $m(a){_d=Md.find(y=>a.startsWith(y.locale))}function kd(){return _d!=null?_d:Md[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(gh()){case"apple":Rs(mh),Rs(Mm),Rs(Im),Rs(Lm);break;case"windows":Rs(d0),Rs(_m),Rs(Dm),Rs(Am);break;case"linux":Rs(f0),Rs(km),Rs(Pm),Rs(Tm);break}Rs(Em);function vh(a){var y;const b=/macos|ios/.test(Ce()),E=a.split("+");let ee="";for(const re of E)ee&&(ee+=b?"\u2009":'<span class="ML__shortcut-join">+</span>'),re.startsWith("[Key")?ee+=re.slice(4,5):re.startsWith("Key")?ee+=re.slice(3,4):re.startsWith("[Digit")?ee+=re.slice(6,7):re.startsWith("Digit")?ee+=re.slice(5,6):ee+=(y={cmd:"\u2318",meta:b?"\u2318":"Ctrl",shift:b?"\u21E7":"Shift",alt:b?"\u2325":"Alt",ctrl:b?"\u2303":"Ctrl","\n":b?"\u23CE":"Return","[return]":b?"\u23CE":"Return","[enter]":b?"\u2324":"Enter","[tab]":b?"\u21E5":"Tab","[escape]":"Esc","[backspace]":b?"\u232B":"Backspace","[delete]":b?"\u2326":"Del","[pageup]":b?"\u21DE":"Page Up","[pagedown]":b?"\u21DF":"Page Down","[home]":b?"\u2912":"Home","[end]":b?"\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"}[re.toLowerCase()])!=null?y:re.toUpperCase();return ee}function Sf(a){if(a instanceof MouseEvent||a instanceof PointerEvent)return{x:a.clientX,y:a.clientY};if(a instanceof TouchEvent){const y=[...a.touches].reduce((E,ee)=>({x:E.x+ee.clientX,y:E.y+ee.clientY}),{x:0,y:0}),b=a.touches.length;return{x:y.x/b,y:y.y/b}}}function Ru(a){const y={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(y.alt=!0),a.ctrlKey&&(y.control=!0),a.metaKey&&(y.meta=!0),a.shiftKey&&(y.shift=!0)),y}function zm(a,y){return!a&&y||a&&!y?!1:!a||!y?!0:a.alt===y.alt&&a.control===y.control&&a.shift===y.shift&&a.meta===y.meta}var Km=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 wf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Cf(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var Sl=class Gl{static get scrim(){return Gl._scrim||(Gl._scrim=new Gl),Gl._scrim}static open(y){Gl.scrim.open(y)}static close(){Gl.scrim.close()}static get state(){return Gl.scrim.state}static get element(){return Gl.scrim.element}constructor(y){var b,E;this.lightDismiss=(b=y==null?void 0:y.lightDismiss)!=null?b:!0,this.translucent=(E=y==null?void 0:y.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const y=document.createElement("div");return y.setAttribute("role","presentation"),y.style.position="fixed",y.style.contain="content",y.style.top="0",y.style.left="0",y.style.right="0",y.style.bottom="0",y.style.zIndex="var(--scrim-zindex, 10099)",y.style.outline="none",this.translucent?(y.style.background="rgba(255, 255, 255, .2)",y.style.backdropFilter="contrast(40%)"):y.style.background="transparent",this._element=y,y}open(y){var b;if(this.state!=="closed")return;this.state="opening",this.onDismiss=y==null?void 0:y.onDismiss,this.savedActiveElement=Cf();const{element:E}=this;((b=y==null?void 0:y.root)!=null?b:document.body).appendChild(E),E.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const ee=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const re=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${re+ee}px`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,E,ee;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:re}=this;re.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),re.remove(),document.body.style.overflow=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Cf()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(y){this.lightDismiss&&(y.target===this._element&&y.type==="click"?(this.close(),y.preventDefault(),y.stopPropagation()):y.target===document&&(y.type==="touchmove"||y.type==="scroll")&&(this.close(),y.preventDefault(),y.stopPropagation()))}};function Hm(a,y,b){let E=null,ee=null,re=!1,ae=!1,fe=!1;const ge=new AbortController,be=ge.signal;return a.addEventListener("keydown",_e=>{if(re||_e.key==="Process"||_e.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(_e.code)){E=null;return}E=_e,ee=null,b.onKeystroke(_e)?a.textContent="":E=null},{capture:!0,signal:be}),a.addEventListener("keypress",_e=>{re||(E&&ee&&b.onKeystroke(E),ee=_e)},{capture:!0,signal:be}),a.addEventListener("compositionstart",_e=>{a.textContent="",re=!0,b.onCompositionStart(_e.data)},{capture:!0,signal:be}),a.addEventListener("compositionupdate",_e=>{re&&b.onCompositionUpdate(_e.data)},{capture:!0,signal:be}),a.addEventListener("compositionend",_e=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(_e.data))},{capture:!0,signal:be}),a.addEventListener("beforeinput",_e=>_e.stopImmediatePropagation(),{signal:be}),a.addEventListener("input",_e=>{var ze;if(!re&&(a.textContent="",_e.inputType!=="insertCompositionText")){if(_e.inputType==="insertFromPaste"){_e.preventDefault(),_e.stopPropagation();return}b.onInput((ze=_e.data)!=null?ze:""),_e.preventDefault(),_e.stopPropagation()}},{signal:be}),a.addEventListener("paste",_e=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(_e)||_e.preventDefault(),_e.stopImmediatePropagation()},{signal:be}),a.addEventListener("cut",_e=>b.onCut(_e),{capture:!0,signal:be}),a.addEventListener("copy",_e=>b.onCopy(_e),{capture:!0,signal:be}),a.addEventListener("blur",_e=>{var ze,rt;if(((rt=(ze=_e.relatedTarget)==null?void 0:ze._mathfield)==null?void 0:rt.element)===y){a.focus({preventScroll:!0}),_e.preventDefault(),_e.stopPropagation();return}const xt=Sl.state;if(xt==="open"||xt==="opening"){_e.preventDefault(),_e.stopPropagation();return}if(_e.relatedTarget===_e.target.getRootNode().host){_e.preventDefault(),_e.stopPropagation();return}fe||ae||(fe=!0,E=null,ee=null,b.onBlur(),fe=!1)},{capture:!0,signal:be}),a.addEventListener("focus",_e=>{fe||ae||(ae=!0,b.onFocus(),ae=!1)},{capture:!0,signal:be}),{dispose:()=>ge.abort(),cancelComposition:()=>{re&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!ae&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Cf()===a,setAriaLabel:_e=>a.setAttribute("aria-label",_e),setValue:_e=>{var ze;a.textContent=_e,a.style.left="-1000px",(ze=window.getSelection())==null||ze.selectAllChildren(a)},moveTo:(_e,ze)=>{a.style.top=`${ze}px`,a.style.left=`${_e}px`}}}function Lc(a){var y;if(!a||!wf(a))return"";let b;return a.key==="Unidentified"&&a.target&&(b=a.target.value),b=(y=b!=null?b:a.key)!=null?y:a.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(b)&&(b=""),b}function p0(a){a=Nm(a);const y=[];return a.ctrlKey&&y.push("ctrl"),a.metaKey&&y.push("meta"),a.altKey&&y.push("alt"),a.shiftKey&&y.push("shift"),y.length===0?`[${a.code}]`:(y.push(`[${a.code}]`),y.join("+"))}function Wm(a){if(lt()){const y=Ce(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Zm(a,y,b){if(a.length===0)return"";const E=kc(h0(p0(b))),ee=kc({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(Ce()),cmd:!1,win:!1});for(let re=a.length-1;re>=0;re--)if((a[re].key===E||a[re].key===ee)&&(!a[re].ifMode||a[re].ifMode===y))return a[re].command;return""}function m0(a){let y=a;return Oe(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function jm(a,y){let b=[];if(typeof y=="string"){const re=hd[y];Oe(re)?b=re.slice():re&&b.push(re)}const E=m0(y),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&b.push(re.key);return b.map(vh)}function Vm(a,y){if(a.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(a.ifPlatform))throw new Error(`Unexpected platform "${a.ifPlatform}" for keybinding ${a.key}`);if(a.ifLayout!==void 0&&(y.score===0||!a.ifLayout.includes(y.id)))return;const b=h0(a.key);let E=a.ifPlatform;if(b.cmd){if(E&&E!=="macos"&&E!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+E+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);E||(E=Ce()==="ios"?"ios":"macos"),b.win=!1,b.cmd=!1,b.meta=!0}if(b.win){if(E&&E!=="windows")throw new Error('Unexpected "win" modifier with platform "'+E+`"
|
|
|
"win" modifier can only be used with Windows platform.`);E="windows",b.win=!1,b.cmd=!1,b.meta=!0}if(E&&!Wm(E))return;if(/^\[.+\]$/.test(b.key))return me(we({},a),{key:kc(b)});const ee=Om(b.key,y);if(!ee)return me(we({},a),{key:kc(b)});if(ee.shift&&b.shift||ee.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yh(a.command)}) is conflicting with the key combination ${kc(ee)} using the ${y.displayName} keyboard layout`);return ee.shift=ee.shift||b.shift,ee.alt=ee.alt||b.alt,ee.meta=b.meta,ee.ctrl=b.ctrl,me(we({},a),{key:kc(ee)})}function yh(a){if(Array.isArray(a)){const y=[...a];return y.shift()+"("+y.map(b=>typeof b=="string"?`"${b}"`:b.toString()).join(", ")+")"}return a}function Um(a,y){const b=[],E=[];for(const ee of a)try{const re=Vm(ee,y);if(!re)continue;const ae=E.find(fe=>fe.key===re.key&&fe.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${yh(ee.command)}) matches ${ae.key} (${yh(ae.command)}) with the ${y.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&b.push(re.message)}return[E,b]}var Gm=class extends aa{constructor(){super("latex")}createAtom(a){return new ns(a)}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("application/x-latex")||y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Eo(a)),a.startRecording(),!0):!1}insert(a,y,b){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b||(b={}),b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Uo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=[];for(const ge of y)ue.test(ge)&&re.push(new ns(ge));let ae=a.at(a.position);if(ae instanceof xd&&(ae=ae.lastChild),!(ae.parent instanceof xd)){const ge=new xd("");ae.parent.addChildAfter(ge,ae),ae=ge.firstChild}const fe=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(fe)):fe&&(a.position=a.offsetOf(fe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function Ld(a){var y,b;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(ee=>ee.type==="latex"))!=null?b:[]:[]}function g0(a,y){var b;let E=0,ee=!1;const re=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=re&&!ee;){const ge=a.at(E);ee=ge instanceof ns&&ge.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,fe=!1;for(;ae<=re&&!fe;){const ge=a.at(ae);fe=!(ge instanceof ns&&ge.isSuggestion),fe||ae++}return[E-1,ae-1]}new Gm;function Ef(a){const y=Ld(a.model).filter(b=>b.isSuggestion);if(y.length!==0){a.model.position=a.model.offsetOf(y[0].leftSibling);for(const b of y)b.parent.removeChild(b)}}function Ad(a,y){var b;const{model:E}=a;Ef(a);for(const _e of Ld(E))_e.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Tc(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof ns&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(_e=>_e.value).join(""),fe=$t(a,ae);if(fe.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const _e of ee)_e.isError=!0;Tc(a);return}const ge=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=ge<0?fe.length-1:ge%fe.length;const be=fe[a.suggestionIndex];if(be!==ae){const _e=ee[ee.length-1];_e.parent.addChildrenAfter([...be.slice(ae.length-be.length)].map(ze=>new ns(ze,{isSuggestion:!0})),_e),$u(a,{interactive:!0})}Ym(a,fe)}function v0(a){const[y,b]=g0(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function Ac(a,y="accept",b){var E,ee;Tc(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const be=Ld(a.model).filter(_e=>_e.isSuggestion);if(be.length!==0){for(const _e of be)_e.isSuggestion=!1;a.model.position=a.model.offsetOf(be[be.length-1])}if(y==="accept-suggestion")return be.length!==0}const fe=Ld(a.model).filter(be=>!be.isSuggestion).map(be=>be.value).join(""),ge=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(ge),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(aa.insert(a.model,fe,{selectionMode:(ee=b==null?void 0:b.selectItem)!=null&&ee?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Mf(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function qm(a,y){const b=new La({from:a.context}),E=new Jn({mode:"math",type:"root",body:Xo(y,{context:b})}),ee=gc(Cd(new Nr(E.render(b),{classes:"ML__base"}),b));return vc(ee,{classes:"ML__latex"}).toMarkup()}function Ym(a,y){var b;if(y.length===0){Tc(a);return}let E="";for(const[re,ae]of y.entries()){const fe=ae,ge=qm(a,ae),be=jm(a.keybindings,fe).join("<br>");E+=`<li role="button" data-command="${fe}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${fe}</span><span class="ML__popover__command">${ge}</span>`,be&&(E+=`<span class="ML__popover__keybinding">${be}</span>`),E+="</li>"}const ee=Jm(a,`<ul>${E}</ul>`);xh()&&((b=ee.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xh()&&(ee.classList.add("is-visible"),_f(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xh(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function _f(a,y){var b;if(!a.element||a.element.mathfield!==a||!xh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){Tc(a);return}if(y!=null&&y.deferred){setTimeout(()=>_f(a),32);return}const E=bl(a.field);if(!E)return;const ee=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,re=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ae=window.innerWidth-document.documentElement.clientWidth,fe=window.innerHeight-document.documentElement.clientHeight,ge=window.mathVirtualKeyboard.boundingRect.height,be=document.getElementById("mathlive-suggestion-popover");E.x+be.offsetWidth/2>re-ae?be.style.left=`${re-be.offsetWidth-ae}px`:E.x-be.offsetWidth/2<0?be.style.left="0":be.style.left=`${E.x-be.offsetWidth/2}px`;const _e=E.y-E.height;ee-fe-ge-E.y<_e?(be.classList.add("ML__popover--reverse-direction"),be.classList.remove("top-tip"),be.classList.add("bottom-tip"),be.style.top=`${E.y-E.height-be.offsetHeight-15}px`):(be.classList.remove("ML__popover--reverse-direction"),be.classList.add("top-tip"),be.classList.remove("bottom-tip"),be.style.top=`${E.y+15}px`)}function Tc(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function Jm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Mf("mathlive-suggestion-popover"),ks("suggestion-popover"),ks("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Ac(a,"reject"),aa.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),b.innerHTML=window.MathfieldElement.createHTML(y),b}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(bh("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function eg(){const a=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(a.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 y=a[1],b=y.match(/http.*\.ts[\?:]/);return b&&(y=a[2]),b=y.match(/(https?:.*):[0-9]+:[0-9]+/),b||(b=y.match(/at (.*(\.ts))[\?:]/),b||(b=y.match(/at (.*(\.mjs|\.js))[\?:]/))),b?b[1]:(console.error(a),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${y}").`),"")}var kf=null,y0,b0,Sh=((b0=(y0=globalThis==null?void 0:globalThis.document)==null?void 0:y0.currentScript)==null?void 0:b0.src)||eg();function x0(a){return gu(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(kf===null)try{const y=yield fetch(Sh,{method:"HEAD"});y.status===200&&(kf=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${Sh}")`)}return new URL(a,kf!=null?kf:Sh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var $s="not-loaded";function ng(){return gu(this,null,function*(){return $s="not-loaded",Lf()})}function Lf(){return gu(this,null,function*(){var a;if($s!=="not-loaded")return;if($s="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){$s="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const b=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],E=Array.from(document.fonts).map(ae=>ae.family);if(b.every(ae=>E.includes(ae))){$s="ready";return}if(!window.MathfieldElement.fontsDirectory){$s="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),$s="error";return}const re=[["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(ae=>tg(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(fe=>{try{return fe.load()}catch(ge){}}))).forEach(fe=>document.fonts.add(fe)),$s="ready";return}catch(ae){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${ee}"`,{cause:ae}),document.body.classList.add("ML__fonts-did-not-load")}$s="error"}})}function rg(a){let y=0;for(let b=0;b<a.length;b++)y=y*31+a.charCodeAt(b),y=y|0;return Math.abs(y)}function Eo(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Os(a)&&a.dirty&&(a.atomBoundsCache=new Map,$u(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new La({from:me(we({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(Jn.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(b=y.forHighlighting)!=null?b:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return vc(Cd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function S0(a,y){const{model:b}=a;b.root.caret=void 0,b.root.isSelected=!1,b.root.containsCaret=!0;for(const ee of b.atoms)ee.caret=void 0,ee.isSelected=!1,ee.containsCaret=!1;if(b.selectionIsCollapsed){const ee=b.at(b.position);ee.caret=a.model.mode;let re=ee.parent;for(;re;)re.containsCaret=!0,re=re.parent}else{const ee=b.getAtoms(b.selection,{includeChildren:!0});for(const re of ee)re.isSelected=!0}return ig(a,y).toMarkup()}function $u(a,y){if(!Os(a))return;y!=null||(y={});const b=a.element.querySelector("[part=virtual-keyboard-toggle]");b&&(b.style.display=a.hasEditableContent?"":"none");const E=a.field;if(!E)return;const ee=a.isSelectionEditable&&a.hasFocus(),re=E.classList.contains("ML__focused");re&&!ee?E.classList.remove("ML__focused"):!re&&ee&&E.classList.add("ML__focused");let ae=S0(a,y);const fe=a.element.querySelector("[part=menu-toggle]");if(fe&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?fe.style.display="none":fe.style.display=""),a.model.atoms.length<=1){const ge=a.options.contentPlaceholder;ge&&(ae+=`<span part=placeholder class="ML__content-placeholder">${qo(ge)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Af(a,y.interactive),a.dirty=!1}function Af(a,y){const b=a.field;if(!b)return;for(const fe of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))fe.remove();!(y!=null&&y)&&$s!=="error"&&$s!=="ready"&&setTimeout(()=>{$s==="ready"?Af(a):setTimeout(()=>Af(a),128)},32);const E=a.model,ee=b.offsetWidth,re=b.getBoundingClientRect().width;let ae=Math.floor(re)/ee;if(ae=isNaN(ae)?1:ae,E.selectionIsCollapsed){_f(a,{deferred:!0});let fe=E.at(E.position);for(;fe&&fe.type!=="prompt"&&!(fe.containsCaret&&fe.displayContainsHighlight);)fe=fe.parent;if(fe!=null&&fe.containsCaret&&fe.displayContainsHighlight){const ge=md(a,lu(a,fe),ae);if(ge){ge.left/=ae,ge.right/=ae,ge.top/=ae,ge.bottom/=ae;const be=document.createElement("div");be.classList.add("ML__contains-highlight"),be.style.position="absolute",be.style.left=`${ge.left+1}px`,be.style.top=`${Math.ceil(ge.top)}px`,be.style.width=`${Math.ceil(ge.right-ge.left)}px`,be.style.height=`${Math.ceil(ge.bottom-ge.top)}px`,b.insertBefore(be,b.childNodes[0])}}return}for(const fe of ag(vd(a,{excludeAtomsWithBackground:!0}))){fe.left/=ae,fe.right/=ae,fe.top/=ae,fe.bottom/=ae;const ge=document.createElement("div");ge.classList.add("ML__selection"),ge.style.position="absolute",ge.style.left=`${fe.left}px`,ge.style.top=`${fe.top}px`,ge.style.width=`${Math.ceil(fe.right-fe.left)}px`,ge.style.height=`${Math.ceil(fe.bottom-fe.top-1)}px`,b.insertBefore(ge,b.childNodes[0])}}function ag(a){let y=[];for(const b of a){let E=!1;for(const ee of y)if(b.left===ee.left&&b.right===ee.right&&b.top===ee.top&&b.bottom===ee.bottom){E=!0;break}E||y.push(b)}a=y,y=[];for(const b of a){let E=0;for(const ee of a)if(b.left>=ee.left&&b.right<=ee.right&&b.top>=ee.top&&b.bottom<=ee.bottom&&(E+=1,E>1))break;E===1&&y.push(b)}return y}var w0=3,wl;function Ls(a,y){y=we({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),wl||(wl={});for(const b of Object.keys(a))console.assert(!wl[b],"Selector already defined: ",b),wl[b]=me(we({},y),{fn:a[b]})}function wh(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return wh(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),wl[y]}function Ic(a){var y;return(y=wh(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,ae=!1;Oe(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,be=>be[1].toUpperCase());const fe=wl[E],ge=fe==null?void 0:fe.target;if(ge==="model"){if(!a.isSelectionEditable&&(fe!=null&&fe.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Ef(a),wl[E].fn(a.model,...ee),Ad(a),ae=!0,re=!0}else if(ge==="virtual-keyboard")ae=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(wl[E]){if(!a.isSelectionEditable&&(fe!=null&&fe.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=wl[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return ge!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||fe!=null&&fe.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),fe!=null&&fe.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&Eo(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&Ge()&&navigator.vibrate(w0);const E=wh(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}Ls({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return Ad(a,{atIndex:a.suggestionIndex+1}),!1}function ug(a){return Ad(a,{atIndex:a.suggestionIndex-1}),!1}Ls({complete:Ac},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ls({nextSuggestion:lg,previousSuggestion:ug},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Tf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Tf}var cg=class em{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 em),this._singleton}set alphabeticLayout(y){this.sendMessage("update-setting",{alphabeticLayout:y})}set layouts(y){this.sendMessage("update-setting",{layouts:y})}get normalizedLayouts(){return[]}set editToolbar(y){this.sendMessage("update-setting",{editToolbar:y})}set actionKeycap(y){this.sendMessage("update-setting",{actionKeycap:y})}set shiftKeycap(y){this.sendMessage("update-setting",{shiftKeycap:y})}set backspaceKeycap(y){this.sendMessage("update-setting",{backspaceKeycap:y})}set tabKeycap(y){this.sendMessage("update-setting",{tabKeycap:y})}set container(y){throw new Error("Container inside an iframe cannot be changed")}show(y){this.sendMessage("show",y)}hide(y){this.sendMessage("hide",y)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(y){y?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(y){return this.sendMessage("execute-command",{command:y}),!0}updateToolbar(y){this.sendMessage("update-toolbar",y)}update(y){this.sendMessage("update-setting",y)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");this.handleMessage(y.data)}}handleMessage(y){const{action:b}=y;if(b==="execute-command"){const{command:E}=y;Ic(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(b==="synchronize-proxy"){this._boundingRect=y.boundingRect,this._isShifted=y.isShifted;return}if(b==="geometry-changed"){this._boundingRect=y.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(y,b={}){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(we({type:Tf,action:y},b),this.targetOrigin)}},C0={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]"]]}},If={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"}]},Td;function E0(a,y){var b,E,ee;const re=fu.singleton;if(!re)return;const ae=Dc(a),fe=(E=(b=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:b.variants)!=null?E:"";if(typeof fe=="string"&&!M0(fe)||Array.isArray(fe)&&fe.length===0){y==null||y();return}const ge={};let be="";for(const In of fg(fe)){const Br=k0(In),kn=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);ge[kn]=Br;const[sr,$r]=Df(Br);be+=`<div id=${kn} class="item ${$r}">${sr}</div>`}const _e=document.createElement("div");_e.setAttribute("aria-hidden","true"),_e.className="MLK__variant-panel",_e.style.height="auto";const ze=Object.keys(ge).length;let rt=5;ze===1?rt=1:ze===2||ze===4?rt=2:ze===3||ze===5||ze===6?rt=3:ze>=7&&ze<14&&(rt=4),_e.style.width=`calc(var(--variant-keycap-length) * ${rt} + 12px)`,_e.innerHTML=vp.createHTML(be),Sl.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:_e}),Td=new AbortController;const{signal:xt}=Td,It=a==null?void 0:a.getBoundingClientRect();if(It){It.top-_e.clientHeight<0&&(_e.style.width="auto",ze<=6?_e.style.height="56px":ze<=12?_e.style.height="108px":ze<=18?_e.style.height="205px":_e.classList.add("compact"));const In=Math.max(0,Math.min(window.innerWidth-_e.offsetWidth,(It.left+It.right-_e.offsetWidth)/2)),Br=It.top-_e.clientHeight+5;_e.style.transform=`translate(${In}px, ${Br}px)`,_e.classList.add("is-visible"),requestAnimationFrame(()=>{_e.addEventListener("pointerup",kn=>{const sr=Dc(kn.target);!(sr!=null&&sr.id)||!ge[sr.id]||(Eh(ge[sr.id]),Id(),y==null||y(),kn.preventDefault())},{capture:!0,passive:!1,signal:xt}),_e.addEventListener("pointerenter",kn=>{const sr=Dc(kn.target);!(sr!=null&&sr.id)||!ge[sr.id]||sr.classList.add("is-active")},{capture:!0,signal:xt}),_e.addEventListener("pointerleave",kn=>{const sr=Dc(kn.target);!(sr!=null&&sr.id)||!ge[sr.id]||sr.classList.remove("is-active")},{capture:!0,signal:xt}),window.addEventListener("pointercancel",()=>{Id(),y==null||y()},{signal:xt}),window.addEventListener("pointerup",()=>{Id(),y==null||y()},{signal:xt})})}}function Id(){Td==null||Td.abort(),Td=null,Sl.state==="open"&&Sl.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(Xe))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+Xe[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(Ve))y.push({class:"swatch-button",label:'<span style="background:'+Ve[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function M0(a){return If[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(If[a]||(If[a]=(y=dg(a))!=null?y:[]),If[a])}function hg(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pg(a){return Object.keys(a).map(y=>`${y} {${hg(a[y])}}`).join("")}function Dd(a){if(!a)return"";const y=new La,b=new Jn({mode:"math",type:"root",body:Xo(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=gc(Cd(new Nr(b.render(y),{classes:"ML__base"}),y));return vc(E,{classes:"ML__latex"}).toMarkup()}function Pd(a){var y;if(Array.isArray(a))return a.map(E=>Pd(E)).flat();const b=typeof a=="string"?{markup:a}:a;return"rows"in b&&Array.isArray(b.rows)&&(b.rows=b.rows.map(E=>E.map(ee=>k0(ee)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mg(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const fe=kd();fe&&(E=fe.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[qe.locale.slice(0,2)])!=null?a:"qwerty")}const ee={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},re=(y=ee[E])!=null?y:ee.qwerty,ae=E==="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 fe of re){const ge=[];for(const be of fe)/[a-z]/.test(be)?ge.push({label:be,class:"hide-shift",shift:{label:be.toUpperCase()},variants:M0(be)?be:void 0}):be==="~"?E!=="dvorak"?ge.push("[backspace]"):ge.push({label:"[backspace]",width:1}):be==="^"?ge.push("[shift]"):be===" "&&ge.push("[separator-5]");ae.push(ge)}return ae.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:Pd({rows:ae})}}function _0(a){if(a==="alphabetic")return mg();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),_0(C0[a]);let y;if("rows"in a&&Array.isArray(a.rows)){console.assert(!("layers"in a||"markup"in a),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const ee=a,{rows:re}=ee,ae=ot(ee,["rows"]);y=me(we({},ae),{layers:Pd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=ot(ee,["markup"]);y=me(we({},ae),{layers:Pd(a.markup)})}else y=we({},a),"layers"in a?y.layers=Pd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let b=!1,E=!1;for(const ee of y.layers)if(ee.rows)for(const re of ee.rows.flat()){Pc(re)&&(b=!0);const ae=re.command;typeof ae=="string"&&["undo","redo","cut","copy","paste"].includes(ae)&&(E=!0)}return(!("displayShiftedKeycaps"in a)||a.displayShiftedKeycaps===void 0)&&(y.displayShiftedKeycaps=b),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(y.displayEditToolbar=!E),y}function gg(a,y){var b,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const fe=ae,ge=[re===y?"selected":"layer-switch"];fe.tooltip&&ge.push("MLK__tooltip"),fe.labelClass&&ge.push(...fe.labelClass.split(" ")),ee+=`<div class="${ge.join(" ")}"`,fe.tooltip&&(ee+=" data-tooltip='"+((b=ut(fe.tooltip))!=null?b:fe.tooltip)+"' "),re!==y&&(ee+=`data-layer="${fe.layers[0].id}"`),ee+=`>${(E=fe.label)!=null?E:"untitled"}</div>`}return ee+="</div>",ee}function vg(a,y){let b="";if(a.editToolbar==="none")return"";const ee=[];y.selectionIsCollapsed?ee.push("undo","redo","pasteFromClipboard"):ee.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const re={undo:`<div class='action ${y.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${ut("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${ut("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${ut("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${ut("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${ut("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return b+=ee.map(ae=>re[ae]).join(""),b}function yg(a){for(const y of a)bg(y)}function bg(a){const y=fu.singleton;if(!y)return;const b={};if(!a.id){if(a.hasAttribute("data-label")&&(b.label=a.dataset.label),a.hasAttribute("data-latex")&&(b.latex=a.dataset.latex),a.hasAttribute("data-key")&&(b.key=a.dataset.key),a.hasAttribute("data-insert")&&(b.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(b.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(b.aside=a.dataset.aside),a.className&&(b.class=a.className),!b.label&&!b.latex&&!b.key&&!b.insert&&(b.latex=a.innerText,b.label=a.innerHTML),a.hasAttribute("data-command"))try{b.command=JSON.parse(a.dataset.command)}catch(E){}a.id=y.registerKeycap(b)}if(!a.innerHTML){const[E,ee]=Df(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){ks("virtual-keyboard"),ks("core"),Lf()}function Sg(){x("core"),x("virtual-keyboard")}var wg=`<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 Cg(a){a.resetKeycapRegistry(),xg();const y=document.createElement("div");y.className="ML__keyboard";const b=document.createElement("div");b.className="MLK__plate",b.innerHTML=window.MathfieldElement.createHTML(wg+a.normalizedLayouts.map((ae,fe)=>Eg(a,ae,fe)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",_g,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",fe=>{var ge,be;let _e=fe.target,ze="";for(;_e&&!ze;)ze=(ge=_e==null?void 0:_e.getAttribute("data-command"))!=null?ge:"",_e=(be=_e==null?void 0:_e.parentElement)!=null?be:null;ze&&a.executeCommand(JSON.parse(ze))});yg(y.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const re=y.querySelectorAll(".MLK__layer");console.assert(re.length>0,"No virtual keyboards available");for(const ae of re)ae.addEventListener("pointerdown",fe=>fe.preventDefault());return a.currentLayer=a.latentLayer,y}function Eg(a,y,b){const E=[];if(!("layers"in y))return"";for(const ee of y.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ee.id}">`),(a.normalizedLayouts.length>1||y.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(gg(a,b)),y.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Mg(a,ee)),E.push("</div>");return E.join("")}function Mg(a,y){if(typeof y=="string")return y;let b="";if(typeof y.style=="string"?b+=`<style>${y.style}</style>`:typeof y.style=="object"&&(b+=`<style>${pg(y.style)}</style>`),y.backdrop&&(b+=`<div class='${y.backdrop}'>`),y.container&&(b+=`<div class='${y.container}'>`),y.rows){b+="<div class=MLK__rows>";for(const E of y.rows){b+="<div dir='ltr' class=MLK__row>";for(const ee of E)if(ee){const re=a.registerKeycap(ee),[ae,fe]=Df(ee);/(^|\s)separator/.test(fe)?b+=`<div class="${fe}"`:b+=`<div tabindex="-1" id="${re}" class="${fe}"`,ee.tooltip&&(b+=` data-tooltip="${ee.tooltip}"`),b+=`>${ae}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Df(a,y={shifted:!1}){var b,E,ee,re,ae,fe,ge;let be="",_e=(b=a.class)!=null?b:"";if(y.shifted&&Pc(a)&&(_e+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?be=Dd(a.shift):typeof a.shift=="object"&&(be=a.shift.label?a.shift.label:(E=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(_e=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(be=a.label?a.label:(ae=Dd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let ze;typeof a.shift=="string"?ze=Dd(a.shift):a.shift.label?ze=a.shift.label:ze=(fe=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?fe:"",be+=`<span class="MLK__shift">${ze}</span>`}a.aside&&(be+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(_e)&&(_e+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(_e)||(_e+=" MLK__keycap"),!/\bw[0-9]+\b/.test(_e)&&a.width&&(_e+=(ge={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?ge:""),[be,_e||"MLK__keycap"]}var Fu={"[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 k0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Fu[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Fu[a.label]&&(b=me(we(we({},Fu[a.label]),a),{label:Fu[a.label].label})),"key"in a&&a.key&&Fu[a.key]&&(b=me(we(we({},Fu[a.key]),a),{key:Fu[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=we(we({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=we(we({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=we(we({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=we(we({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var Bd;function _g(a){var y;if(a.button!==0)return;const b=fu.singleton;if(!b)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){b.currentLayer=(y=E.getAttribute("data-layer"))!=null?y:"",a.preventDefault();return}const ee=Dc(a.target);if(!(ee!=null&&ee.id))return;const re=b.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const ae=new AbortController,fe=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Pf(ae),{capture:!0,signal:fe}),ee.addEventListener("pointerleave",Pf(ae),{capture:!0,signal:fe}),ee.addEventListener("pointercancel",Pf(ae),{signal:fe}),ee.addEventListener("pointerup",Pf(ae),{signal:fe}),Pc(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(Bd&&clearTimeout(Bd),Bd=setTimeout(()=>{ee.classList.contains("is-pressed")&&(ee.classList.remove("is-pressed"),ee.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),E0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Pf(a){return y=>{const b=Dc(y.target);if(!(b!=null&&b.id))return;const E=fu.singleton;if(!E)return;const ee=E.getKeycap(b.id);if(ee){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),Pc(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted)),a.abort();return}if(y.type==="pointerleave"&&y.target===b){b.classList.remove("is-pressed"),Pc(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){Bd&&clearTimeout(Bd),Pc(ee)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.classList.remove("is-pressed"),E.isShifted&&ee.shift?typeof ee.shift=="string"?E.executeCommand(["insert",ee.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Eh(ee.shift):Eh(ee),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function Eh(a){var y;let b=a.command;!b&&a.insert&&(b=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!b&&a.key&&(b=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!b&&a.latex&&(b=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),b||(b=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(y=fu.singleton)==null||y.executeCommand(b)}function kg(a){if(a.nodeType!==1)return!1;const y=a.classList;return y.contains("MLK__keycap")||y.contains("shift")||y.contains("action")||y.contains("fnbutton")||y.contains("bigfnbutton")}function Dc(a){if(!a)return;let y=a;for(;y&&!kg(y);)y=y.parentElement;return y!=null?y:void 0}function Pc(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var fu=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var y,b,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(b=(y=window.document)==null?void 0:y.body)!=null?b:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(ee=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(E=window.top)==null||E.addEventListener("message",this)}catch(ee){window.addEventListener("message",this)}document.body.addEventListener("focusin",ee=>{const re=ee.target;re!=null&&re.isConnected&&setTimeout(()=>{const ae=L0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&&Je()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{L0()||this.hide()},300)})}get currentLayer(){var y,b,E;return(E=(b=(y=this._element)==null?void 0:y.querySelector(".MLK__layer.is-visible"))==null?void 0:b.id)!=null?E:""}set currentLayer(y){var b;if(!this._element){this.latentLayer=y;return}let E=y?this._element.querySelector(`#${y}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((b=this._element.querySelector(".MLK__layer.is-visible"))==null||b.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(y){var b;this._shiftPressCount=y>2||y<0?0:y,(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(y){const b="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[b]=y,b}getKeycap(y){return y?this.keycapRegistry[y]:void 0}getLayer(y){const b=this.normalizedLayouts;for(const E of b)for(const ee of E.layers)if(ee.id===y)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(y){this._alphabeticLayout=y,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(y){this._actionKeycap=typeof y=="string"?{label:y}:y}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(y){this._shiftKeycap=typeof y=="string"?{label:y}:y}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(y){this._backspaceKeycap=typeof y=="string"?{label:y}:y}get tabKeycap(){return this._tabKeycap}set tabKeycap(y){this._tabKeycap=typeof y=="string"?{label:y}:y}get layouts(){return this._layouts}set layouts(y){this.updateNormalizedLayouts(y),this.rebuild()}updateNormalizedLayouts(y){const b=Array.isArray(y)?[...y]:[y],E=b.findIndex(ee=>ee==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(ee=>_0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(y){this._editToolbar=y,this.rebuild()}get container(){return this._container}set container(y){this._container=y,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(y){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}get element(){return this._element}set element(y){var b;this._element!==y&&((b=this._element)==null||b.remove(),this._element=y)}get visible(){return this._visible}set visible(y){y?this.show():this.hide()}get boundingRect(){var y;if(!this._visible)return new DOMRect;const b=(y=this._element)==null?void 0:y.getElementsByClassName("MLK__plate")[0];return b?b.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var y,b;const E=this.boundingRect.height;if(this.container===document.body){(y=this._element)==null||y.style.setProperty("--_keyboard-height",`calc(${E}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const ee=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${ee}px)`:`${ee}px`}else(b=this._element)==null||b.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const y=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=y,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const y=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(y&&(y.backdrop||y.container)));const b=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(b)for(const E of b){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=Df(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(y){var b;if(this._visible)return;const E=this.container;if(E&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const ee=this._element.getElementsByClassName("MLK__plate")[0];if(ee&&this.observer.observe(ee),E===window.document.body){const re=E.style.paddingBottom;this.originalContainerBottomPadding=re;const ae=ee.offsetHeight-1;E.style.paddingBottom=re?`calc(${re} + ${ae}px)`:`${ae}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,y!=null&&y.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var ee;return(ee=this._element)==null?void 0:ee.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(y){var b;const E=this.container;if(E&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const ee=this._element.getElementsByClassName("MLK__plate")[0];ee&&this.observer.unobserve(ee),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}),Id(),Sg(),(b=this._element)==null||b.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(E.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var y,b;return(b=(y=this.element)==null?void 0:y.offsetHeight)!=null?b:0}buildAndAttachElement(){var y;console.assert(!this.element),this.element=Cg(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",b=>{b.shiftKey||((b.ctrlKey||b.button===2)&&E0(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");y.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:y.data.action!=="update-setting"&&y.data.action!=="proxy-created"&&y.data.action!=="execute-command"&&(console.assert(y.source!==void 0),this.connectedMathfieldWindow=y.source),this.handleMessage(y.data,y.source)}if(this._element)switch(y.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":y.button!==2&&y.preventDefault();break;case"keydown":{y.key==="Shift"&&!y.repeat&&(this.shiftPressCount=1);break}case"keyup":{(y.key==="Shift"||!y.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(y,b){const{action:E}=y;if(E==="execute-command"){const{command:ee}=y,re=Ic(ee);if(window.top!==void 0&&re!=="virtual-keyboard")return;this.executeCommand(ee);return}if((E==="connect"||E==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b),E!=="disconnect"&&window===window.top){if(E==="show"){typeof y.animate!="undefined"?this.show({animate:y.animate}):this.show();return}if(E==="hide"){typeof y.animate!="undefined"?this.hide({animate:y.animate}):this.hide();return}if(E==="update-setting"){y.alphabeticLayout&&(this.alphabeticLayout=y.alphabeticLayout),y.layouts&&(this.layouts=y.layouts),y.editToolbar&&(this.editToolbar=y.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b);return}}}sendMessage(y,b,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:we({type:Tf,action:y},b)}));return}if(E)E.postMessage(we({type:Tf,action:y},b),{targetOrigin:this.targetOrigin});else if(b.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:b.command})),y==="execute-command"&&Array.isArray(b.command)&&b.command[0]==="insert"){const ee=b.command[1].split("");for(const re of ee)this.dispatchEvent(new KeyboardEvent("keydown",{key:re,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:re,bubbles:!0}))}}stateWillChange(y){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:y},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(y){const b=this._element;if(!b)return;b.classList.toggle("is-math-mode",y.mode==="math"),b.classList.toggle("is-text-mode",y.mode==="text"),b.classList.toggle("can-undo",y.canUndo),b.classList.toggle("can-redo",y.canRedo),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-paste",!0);const E=b.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=vg(this,y)}update(y){this._style=y.style,this.updateToolbar(y)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(y){let b,E=[],ee=Ic(y);return Oe(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Ic(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?wl[b].fn(void 0,...E):(this.sendMessage("execute-command",{command:y}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function L0(){var a,y;let b=Cf(),E=null;for(;b;){if("host"in b&&((y=(a=b.host)==null?void 0:a.tagName)==null?void 0:y.toLowerCase())==="math-field"){E=b.host;break}b=b.parentNode}return E}if(lt()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=fu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>cg.singleton,configurable:!0});function Bf(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(Oe(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(fe=>parseInt(fe.trim()));y.scriptDepth=[re,ae]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let ee=a.mathVirtualKeyboardPolicy.toLowerCase();if(ee==="sandboxed"){if(window!==window.top){const re=fu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?qe.locale.startsWith("fr")?y.letterShapeStyle="french":y.letterShapeStyle="tex":y.letterShapeStyle=a.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(a.defaultMode)?y.defaultMode=a.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),y.defaultMode="math");break;case"macros":y.macros=gn(a.macros);break;default:Oe(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=we({},a[b]):y[b]=a[b]}return y}function zu(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const ee of b)a[ee]===null?E[ee]=null:Oe(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=we({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Of(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:St,backgroundColorMap:Ke,letterShapeStyle:qe.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:a=>["\\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(a),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:lh,inlineShortcuts:ff,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sh,value:""}}function A0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function hu(a,y){!a||!y||(Oe(a)?a.forEach(b=>hu(b,y)):typeof a=="object"&&!a.style.color&&!a.style.backgroundColor&&!a.style.fontFamily&&!a.style.fontShape&&!a.style.fontSeries&&!a.style.fontSize&&!a.style.variant&&!a.style.variantStyle&&(a.applyStyle(y),hu(a.body,y),hu(a.above,y),hu(a.below,y),hu(a.subscript,y),hu(a.superscript,y)))}function Mh(a,y,b,E){function ee(ae,fe){for(const ge of re)if(ge.style[ae]!==fe)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const re=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&ee("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&ee("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&ee("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&ee("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&ee("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&ee("fontSize",b.fontSize)&&(b.fontSize=dl),b.variant&&ee("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ee("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const ae of re)ae.applyStyle(b);return!0}function Lg(a,y){const b=a.at(a.position);if(b.type==="composition")b.value=y;else{const{caret:E}=b;b.caret=void 0;const ee=new Wl(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Ag(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}et(["math","displaymath"],Gs),et("center",Gs),Tt("displaylines","",{parse:a=>{const y=[];let b=[];a.beginContext({tabular:!0});do{if(a.end()||a.match("<}>"))break;a.matchColumnSeparator()||a.matchRowSeparator()?(y.push([b]),b=[]):b.push(...a.scan(E=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(E)))}while(!0);return a.endContext(),y.push([b]),y},createAtom:a=>new la("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),wt("array","{columns:colspec}",(a,y,b,E)=>new la(a,_h(y),b,{columns:E[0],mathstyleName:"textstyle"})),wt(["equation","equation*","subequations"],"",(a,y,b)=>new la(a,_h(y),b,{columns:[{align:"c"}]})),wt(["multline","multline*"],"",Gs),wt(["align","align*","aligned","eqnarray"],"",Gs),wt("split","",Gs),wt(["gather","gathered"],"",Gs),wt(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Gs),wt(["smallmatrix","smallmatrix*"],"[columns:colspec]",Gs),wt(["cases","dcases","rcases"],"",Gs);function Tg(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function _h(a,y=1){return Tg(a)?Array(y).fill([[new Jn({type:"first"}),new Wi]]):a.map(b=>b.length===0?[[new Jn({type:"first"})]]:b.map(E=>E.length===0?[new Jn({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Jn({type:"first"})),E)))}function Gs(a,y=[[[]]],b=[],E=[]){switch(y=_h(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new la(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new la(a,y,b,{mathstyleName:"textstyle"});case"center":return new la(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new la(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new la(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new la(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new la(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Ku(E[0])});case"bmatrix":case"bmatrix*":return new la(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Ku(E[0])});case"Bmatrix":case"Bmatrix*":return new la(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Ku(E[0])});case"vmatrix":case"vmatrix*":return new la(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Ku(E[0])});case"Vmatrix":case"Vmatrix*":return new la(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Ku(E[0])});case"matrix":case"matrix*":return new la(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Ku(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new la(a,y,b,{mathstyleName:"scriptstyle",columns:Ku(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new la(a,y,b,{mathstyleName:a==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new la(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new la(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const fe of y)ee=Math.max(ee,fe.length);const re=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let ae=2;for(;ae<ee;)re.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),ae+=2;return re.push({gap:0}),new la(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new la(a,y,b,{mathstyleName:"textstyle"})}function Ku(a){return a!=null?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Ig(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof la);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof la)){const E=a.at(a.position);if(b=E,!b.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=$f()),ee.length===0&&(ee=$f());let ae;return y.endsWith("column")?(ae=Gs("split",[[re,ee]]),a.root=ae,Hu(ae,0,0)?Wu(a,ae,0,0):Hu(ae,0,1)?Wu(a,ae,0,1):a.position=a.offsetOf(E)):(ae=Gs("lines",[[re],[ee]]),a.root=ae,Hu(ae,0,0)?Wu(a,ae,0,0):Hu(ae,1,0)?Wu(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Wa){const ee=b.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=$f()),re.length===0&&(re=$f());let fe="pmatrix";const ge=ee.leftDelim,be=ee.rightDelim;ge==="("&&(be===")"||be==="?")?fe="pmatrix":(ge==="["||ge==="\\lbrack")&&(be==="]"||be==="\\rbrack"||be==="?")?fe="bmatrix":ge==="\\vert"&&be==="\\vert"?fe="vmatrix":ge==="\\Vert"&&be==="\\Vert"?fe="Vmatrix":(ge==="{"||ge==="\\lbrace")&&(be==="."||be==="?")&&(fe="cases");const _e=Gs(fe,y.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(_e,ee),ee.parent.removeChild(ee),Hu(_e,0,0)?Wu(a,_e,0,0):y.endsWith("column")?Hu(_e,0,1)?Wu(a,_e,0,1):a.position=a.offsetOf(b):Hu(_e,1,0)?Wu(a,_e,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof la?[b.parent,b.parentBranch]:[void 0,[0,0]]}function Hu(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Dg(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function Wu(a,y,b,E){const ee=Dg(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Nf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Rf(a,y){const[b,[E,ee]]=Ig(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Nf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Nf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Nf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Nf(a,b,E,ee,"start");break}}function T0(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Bg(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function D0(a,y){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let b=".",E=".";switch(y){case"pmatrix":case"pmatrix*":b="(",E=")";break;case"bmatrix":case"bmatrix*":b="[",E="]";break;case"Bmatrix":case"Bmatrix*":b="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":b="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":b="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":b=".",E=".";break;case"cases":case"dcases":b="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=y,re.leftDelim=b,re.rightDelim=E,a.contentDidChange({}),!0}function P0(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof la);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof la){const E=b.parent,ee=b.parentBranch;let re;switch(y){case"row":if(E.rowCount>1){E.removeRow(ee[0]);const ae=E.getCell(Math.max(0,ee[0]-1),ee[1]);re=a.offsetOf(ae[ae.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(ee[1]);const ae=E.getCell(ee[0],Math.max(0,ee[1]-1));re=a.offsetOf(ae[ae.length-1])}break}re&&a.setPositionHandlingPlaceholder(re)}}function Og(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Ng(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Ls({addRowAfter:T0,addColumnAfter:I0,addRowBefore:Pg,addColumnBefore:Bg,removeRow:Og,removeColumn:Ng,setEnvironment:D0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function $f(){return[new Wi]}var B0=class nm{constructor(y){this.recording=!1,this.model=y,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(y){y&&this.index>=0&&(this.stack[this.index].selection=y),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(y){return this.recording?(y&&y===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>nm.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=y!=null?y:"",!0):!1}};B0.maximumDepth=1e3;var Rg=B0;function kh(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ee;if(he.test(a.at(y).value)){let re=y,ae;do ae=a.at(re).mode==="text"&&he.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}else if(/\s/.test(a.at(y).value)){let re=y;for(;a.at(re)&&a.at(re).mode==="text"&&/\s/.test(a.at(re).value);)re+=E;if(!a.at(re))ee=re-E;else{let ae=!0;do ae=a.at(re).mode==="text"&&!/\s/.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}}else{let re=y;for(;a.at(re)&&a.at(re).mode==="text"&&!/\s/.test(a.at(re).value);)re+=E;ee=a.at(re)?re:re-E;let ae=!0;for(;a.at(re)&&ae;)ae=a.at(re).mode==="text"&&/\s/.test(a.at(re).value),ae&&(ee=re),re+=E;ee=a.at(re)?re-2*E:re-E}return ee-(E>0?0:1)}function Bc(a,y,b){var E,ee,re,ae,fe,ge,be;const _e=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let ze=a.at(a.position);if(y==="forward"&&(ze.type==="subsup"?(ze=ze.rightSibling,ze||(ze=a.at(a.position+1))):ze=a.at(a.position+1)),!ze)return a.announce("plonk"),!1;let rt=a.offsetOf(ze);if(ze instanceof al)rt=kh(a,rt,y);else if(ze instanceof ns)if(ze.isSuggestion)for(console.assert(y==="forward");ze&&ze instanceof ns;)ze.isSuggestion=!1,rt=a.offsetOf(ze),ze=ze.rightSibling;else if(y==="forward"){if(ze=ze.rightSibling,!ze||!(ze instanceof ns))return a.announce("plonk"),!1;for(;ze&&ze instanceof ns&&/[a-zA-Z\*]/.test(ze.value);)rt=a.offsetOf(ze),ze=ze.rightSibling}else{if(ze=ze.leftSibling,!ze||!(ze instanceof ns))return a.announce("plonk"),!1;for(;ze&&ze instanceof ns&&/[a-zA-Z\*]/.test(ze.value);)rt=a.offsetOf(ze),ze=ze.leftSibling}else if(y==="forward"&&ze.type==="mopen"){let xt=0;do ze.type==="mopen"?xt+=1:ze.type==="mclose"&&(xt-=1),ze=ze.rightSibling;while(!ze.isLastSibling&&xt!==0);rt=a.offsetOf(ze.leftSibling)}else if(y==="backward"&&ze.type==="mclose"){let xt=0;do ze.type==="mopen"?xt+=1:ze.type==="mclose"&&(xt-=1),ze=ze.leftSibling;while(!ze.isFirstSibling&&xt!==0);rt=a.offsetOf(ze)}else if(y==="backward")if(ze.type==="first")for(;rt>0&&ze.type==="first";)rt-=1,ze=a.at(rt);else{const xt=ze.type;ze.type==="subsup"&&(rt=a.offsetOf(a.at(rt).leftSibling)),rt-=1;let It=(ee=a.at(rt))==null?void 0:ee.type;for(;rt>=0&&It===xt;)((re=a.at(rt))==null?void 0:re.type)==="subsup"?rt=a.offsetOf(a.at(rt).leftSibling):rt-=1,It=a.at(rt).type}else{const{type:xt}=ze;let It=(ae=a.at(rt))==null?void 0:ae.type;const{lastOffset:In}=a;for(;rt<=In&&(It===xt||It==="subsup");){for(;((fe=a.at(rt).rightSibling)==null?void 0:fe.type)==="subsup";)rt=a.offsetOf(a.at(rt).rightSibling);rt+=1,It=(ge=a.at(rt))==null?void 0:ge.type}rt-=1}if((be=b==null?void 0:b.extend)!=null&&be){if(!a.setSelection(a.anchor,rt))return a.announce("plonk"),!1}else{if(rt===a.position)return a.announce("plonk"),!1;a.position=rt}return a.announce("move",_e),a.mathfield.stopCoalescingUndo(),!0}function Cl(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[fe,ge]=g0(a);fe!==void 0&&ge!==void 0&&a.deleteAtoms([fe,ge])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let fe=Ff(a,a.position,y);fe<0&&(fe=0),fe>a.lastOffset&&(fe=a.lastOffset);const ge=a.setSelection(a.anchor,fe);return a.mathfield.stopCoalescingUndo(),ge}if(a.selectionIsPlaceholder){a.collapseSelection(y);const fe=Cl(a,y);return a.mathfield.stopCoalescingUndo(),fe}let re=a.position;const ae=re;if(a.collapseSelection(y)?(re=a.position,O0(a,re)||(re=Ff(a,re,y))):re=Ff(a,re,y),re<0||re>a.lastOffset){let fe=!0;return a.silenceNotifications||(fe=(ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0),fe&&a.announce("plonk"),fe}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Ff(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||O0(a,y)?y:Ff(a,y,b)}function O0(a,y){var b;const E=a.at(y);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function $g(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=Cc(a.getHTMLElement(y[ee])).right,ae=Math.abs(b-re);if(ae<=E)E=ae;else break}return y[ee-1]}function zf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?b.filter(be=>be.type==="prompt"&&!be.captureSelection):b,fe=Cc(a.mathfield.getHTMLElement(y)).right,ge=a.offsetOf($g(a.mathfield,ae,fe))-(re?1:0);if(E){const[be,_e]=a.selection.ranges[0];let ze;ge<(ee==="up"?be:_e)?ze={ranges:[[ge,_e]],direction:"backward"}:ze={ranges:[[be,ge]],direction:"forward"},a.setSelection(ze)}else a.setPositionHandlingPlaceholder(ge);a.announce(`move ${ee}`)}function Fg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("backward");const re=()=>{var ge,be;let _e=!0;return a.silenceNotifications||(_e=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(_e?"plonk":"line"),_e},ae=a.at(a.position);let fe=ae;for(;fe&&fe.parentBranch!=="below"&&!(Array.isArray(fe.parentBranch)&&fe.parent instanceof la);)fe=fe.parent;if(Array.isArray(fe==null?void 0:fe.parentBranch)&&fe.parent instanceof la){const ge=fe.parent;if(fe.parentBranch[0]<1)return re();const be=fe.parentBranch[0]-1,_e=ge.array[be][fe.parentBranch[1]];if(!_e.some(rt=>rt.type==="prompt"&&!rt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,_e,ee,"up")}else if(fe){const ge=(E=fe.parent.branch("above"))!=null?E:fe.parent.createBranch("above");if(!ge.some(_e=>_e.type==="prompt"&&_e.placeholderId)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"up")}else return re();return a.mathfield.stopCoalescingUndo(),!0}function zg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("forward");const re=()=>{var ge,be;let _e=!0;return a.silenceNotifications||(_e=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(_e?"plonk":"line"),_e},ae=a.at(a.position);let fe=ae;for(;fe&&fe.parentBranch!=="above"&&!(Array.isArray(fe.parentBranch)&&fe.parent instanceof la);)fe=fe.parent;if(Array.isArray(fe==null?void 0:fe.parentBranch)&&fe.parent instanceof la){const ge=fe.parent;if(fe.parentBranch[0]+1>ge.array.length-1)return re();const be=fe.parentBranch[0]+1,_e=ge.array[be][fe.parentBranch[1]];if(!_e.some(rt=>rt.type==="prompt"&&!rt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,_e,ee,"down")}else if(fe){const ge=(E=fe.parent.branch("below"))!=null?E:fe.parent.createBranch("below");if(!ge.some(_e=>_e.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"down")}else return re();return!0}function N0(a){const y=a.position,b=a.at(y).parent;return b!=null&&b.parent?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),a.announce("move",y),!0):(a.announce("plonk"),!1)}function Kg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!1):E=!0,b=b.parent;return E?y:0}function Hg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!0):E=!1,b=b.parent;return E?y:0}function R0(a){var y;if(a.collapseSelection(),Kg(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=b.rightSibling)==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Vs({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function $0(a){var y;if(a.collapseSelection(),Hg(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=a.at(a.position+1))==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Vs({style:a.at(a.position).computedStyle}),b),b=a.at(a.position+1)),b.createBranch("subscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.subscript[0]))),!0}function Wg(){function a(ge){const be=[],_e=[];return[...ge.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((rt,xt)=>{const It=E(rt);It===0?be.push(rt):_e.push({documentOrder:xt,tabIndex:It,node:rt})}),_e.sort((rt,xt)=>rt.tabIndex===xt.tabIndex?rt.documentOrder-xt.documentOrder:rt.tabIndex-xt.tabIndex).map(rt=>rt.node).concat(be)}function y(ge){return!(!b(ge)||ee(ge)||E(ge)<0)}function b(ge){return!(ge.disabled||ge.type==="hidden"&&ge.tagName.toUpperCase()==="INPUT"||fe(ge))}function E(ge){var be;const _e=Number.parseInt((be=ge.getAttribute("tabindex"))!=null?be:"NaN",10);return Number.isNaN(_e)?ge.contentEditable==="true"||(ge.nodeName==="AUDIO"||ge.nodeName==="VIDEO")&&ge.getAttribute("tabindex")===null?0:ge.tabIndex:_e}function ee(ge){return ge.tagName.toUpperCase()==="INPUT"&&ge.type==="radio"&&!ae(ge)}function re(ge,be){for(const _e of ge)if(_e.checked&&_e.form===be)return _e;return null}function ae(ge){var be;if(!ge.name)return!0;const ze=((be=ge.form)!=null?be:ge.ownerDocument).querySelectorAll('input[type="radio"][name="'+ge.name+'"]'),rt=re(ze,ge.form);return!rt||rt===ge}function fe(ge){if(!lt()||ge===document.activeElement||ge.contains(document.activeElement))return!1;if(getComputedStyle(ge).visibility==="hidden")return!0;const be=ge.getBoundingClientRect();if(be.width===0||be.height===0)return!0;for(;ge;){if(getComputedStyle(ge).display==="none")return!0;ge=ge.parentElement}return!1}return lt()?a(document.body):[]}function bs(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const ee=a.offsetOf(y[0]),re=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?bs(a,[y.leftSibling,y]):bs(a,[y,y.leftSibling])}function ll(a,y){const b=a.position;if(typeof y=="number"&&(y=a.at(y)),y.type==="prompt")a.setSelection(a.offsetOf(y.firstChild),a.offsetOf(y.lastChild));else{const E=a.offsetOf(y);y.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",b),a.mathfield.stopCoalescingUndo(),!0}function Kf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Cl(a,y);let ae;const fe=a.at(a.anchor).parentPrompt;fe?y==="forward"?ae=a.offsetOf(fe)+1:ae=a.offsetOf(fe.leftSibling):ae=Math.max(a.position+re,0);const ge=Lh(a,ae,y);if(!ge||y==="forward"&&a.offsetOf(ge)<ae||y==="backward"&&a.offsetOf(ge)>ae){if(!b||!((ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))==null||ee))return a.announce("plonk"),!1;const _e=Wg();if(!document.activeElement||_e.length<=1)return a.announce("plonk"),!1;let ze=_e.indexOf(document.activeElement)+re;return ze<0&&(ze=_e.length-1),ze>=_e.length&&(ze=0),_e[ze].focus(),a.mathfield.stopCoalescingUndo(),!0}return ll(a,ge),!0}function Lh(a,y=0,b="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,y,b)}Ls({moveToOpposite:a=>{const y={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},b=a.at(a.position),{parent:E}=b;if(!E)return a.announce("plonk"),!1;const ee=b.parentBranch;let re;if(typeof ee=="string"&&(re=y[ee]),!re){const fe=b.subsupPlacement?$0(a):R0(a);return a.mathfield.stopCoalescingUndo(),fe}E.branch(re)||E.createBranch(re);const ae=a.setSelection(a.getBranchRange(a.offsetOf(E),re));return a.mathfield.stopCoalescingUndo(),ae},moveBeforeParent:a=>{const{parent:y}=a.at(a.position);return y?(a.position=a.offsetOf(y),a.mathfield.stopCoalescingUndo(),!0):(a.announce("plonk"),!1)},moveAfterParent:a=>N0(a),moveToNextChar:a=>Cl(a,"forward"),moveToPreviousChar:a=>Cl(a,"backward"),moveUp:a=>Cl(a,"upward"),moveDown:a=>Cl(a,"downward"),moveToNextWord:a=>Bc(a,"forward"),moveToPreviousWord:a=>Bc(a,"backward"),moveToGroupStart:a=>{const y=a.offsetOf(a.at(a.position).firstSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const y=a.offsetOf(a.at(a.position).lastSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var y,b,E,ee;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Kf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let rt=re;for(;rt&&rt.mode==="text";)rt=rt.leftSibling;let xt=re;for(;((y=xt.rightSibling)==null?void 0:y.mode)==="text";)xt=xt.rightSibling;if(rt&&xt)return bs(a,[rt,xt])}if(re.rightSibling.mode==="text"){let rt=re;for(;rt&&rt.mode==="text";)rt=rt.rightSibling;return rt?(ll(a,(b=rt.leftSibling)!=null?b:rt),a.mathfield.switchMode("math"),!0):ll(a,a.lastOffset)}}const fe=a.at(a.anchor).parentPrompt,ge=fe?a.offsetOf(fe)+1:Math.max(a.position+1,0),be=Lh(a,ge,"forward");if(be)return ll(a,be);const _e=F0(a,re,rt=>rt.type==="leftright"||rt.type==="text","forward");if(_e){if(_e.mode==="text"){let rt=_e;for(;rt&&rt.mode==="text";)rt=rt.rightSibling;return bs(a,[(E=_e.leftSibling)!=null?E:_e,(ee=rt.leftSibling)!=null?ee:rt])}return bs(a,_e)}const ze=re.parent;if(ze){if(ze.type==="leftright"||ze.type==="surd")return bs(a,ze);if(re.parentBranch==="superscript"&&ze.subscript)return bs(a,ze.subscript);if(re.parentBranch==="above"&&ze.below)return bs(a,ze.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return ll(a,ze);if(re.parentBranch==="above"||re.parentBranch==="below")return bs(a,ze)}return ll(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Kf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let fe=b;for(;fe&&fe.mode==="text";)fe=fe.leftSibling;let ge=b;for(;((y=ge.rightSibling)==null?void 0:y.mode)==="text";)ge=ge.rightSibling;if(fe&&ge)return bs(a,[fe,ge])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?ll(a,b):ll(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Lh(a,re,"backward");if(ae)return ll(a,ae);if(E==="math"){const fe=F0(a,b,be=>be.type==="leftright"||be.type==="text","backward");if(fe){if(fe.mode==="text"){let be=fe;for(;be&&be.mode==="text";)be=be.leftSibling;return bs(a,[fe,be])}return bs(a,fe)}const ge=b.parent;if(ge){if(ge.type==="leftright"||ge.type==="surd")return bs(a,ge);if(b.parentBranch==="subscript"&&ge.superscript)return bs(a,ge.superscript);if(b.parentBranch==="below"&&ge.above)return bs(a,ge.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return ll(a,ge);if(b.parentBranch==="above"||b.parentBranch==="below")return bs(a,ge)}return ll(a,0)}return!1},moveToMathfieldStart:a=>a.selectionIsCollapsed&&a.position===0?(a.announce("plonk"),!1):(a.position=0,a.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:a=>a.selectionIsCollapsed&&a.position===a.lastOffset?(a.announce("plonk"),!1):(a.position=a.lastOffset,a.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:R0,moveToSubscript:$0},{target:"model",changeSelection:!0}),Ls({moveToNextPlaceholder:a=>Kf(a,"forward"),moveToPreviousPlaceholder:a=>Kf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function F0(a,y,b,E){if(E==="forward"){let re=y.rightSibling;for(;re&&!b(re);)re=re.rightSibling;return re}let ee=y.leftSibling;for(;ee&&!b(ee);)ee=ee.leftSibling;return ee}function Hf(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=y===0||ae===void 0||ae.type==="first"||ae.mode!=="math"||!(ae.type&&/mord|mpunct|operator/.test(ae.type)||ae.type==="mop"&&/[a-zA-Z ]+/.test(ae.value))||!ae.hasEmptyBranch("superscript")||!ae.hasEmptyBranch("subscript")||typeof b=="function"&&!b(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,y-=1}a.contentDidChange({data:re,inputType:"insertText"})}function Zu(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1;const re=[];for(;!ee;){const ae=a.at(E);ee=y===0||!ae||ae.type==="first"||ae.isFirstSibling||ae.mode!=="text"||ae.value===" "||typeof b=="function"&&!b(ae),ee||(re.push(Jn.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,y-=1}Ah(a),a.contentDidChange({data:ya(re),inputType:"insertText"})}function Ah(a){var y;let b=a.position-1;for(;b>=0&&((y=a.at(b))==null?void 0:y.mode)==="math";)b-=1;if(!(b<0)&&a.at(b).mode==="text"&&a.at(b).value===" "&&a.at(b-1).mode==="math"){a.at(b-1).parent.removeChild(a.at(b-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Zg(a){let y="",b=a.position,E=!1;for(;!E;){const ee=a.at(b);E=!(ee&&(ee.mode==="text"||ee.mode==="math"&&ee.type&&/mord|mpunct/.test(ee.type))),E||(y=ee.value+y),b-=1}return y}function jg(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!wf(b))return!1;const ee=Lc(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Zg(E)+ee;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&Zu(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:fe}=E.at(E.position);if(ae&&fe instanceof Wa&&fe.leftDelim===ae)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(re))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(ee))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(re))return Zu(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){Zu(E,1);const ge=E.at(E.position);return ge.value="\u22C5",ge.style.variant="normal",ge.command="\\cdot",ge.verbatimLatex=void 0,E.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(re)||/\.\d$/.test(re)||/\([\d+\-.]$/.test(re))return Zu(E,1),!0;if(/\([a-z][,;]$/.test(re))return Zu(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Ah(E),!0}else{if(y==="[Space]")return Hf(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Hf(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Hf(E,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(re)&&!/(αβγ)$/.test(re))return Hf(E,void 0,ae=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(ae.value)),!0;if(ee==="?"||ee==="."&&!/[\d-+]\.$/.test(re))return!0}return!1}function Vg(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=z0(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(vh(y)||y)+"</span>"+b.innerHTML),b.style.visibility="visible",setTimeout(()=>{b.childNodes.length>0&&b.childNodes[b.childNodes.length-1].remove(),b.childNodes.length===0&&(b.style.visibility="hidden")},3e3)}function Ug(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=z0();y.innerHTML=""}else{const y=Mf("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(ks("keystroke-caption"),ks("core"),Mf("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,y){var b,E,ee;const{model:re}=a,ae=p0(y);if(y.isTrusted){Rm(y);const xt=kd();a.keyboardLayout!==xt.id&&(a.keyboardLayout=xt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Vg(a,ae),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let fe,ge="",be;const _e=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")_e.pop();else if(!wf(y))a.flushInlineShortcutBuffer();else{const xt=Lc(y),It=[...(E=(b=_e[_e.length-1])==null?void 0:b.keystrokes)!=null?E:[],xt];_e.push({state:re.getState(),keystrokes:It,leftSiblings:Xg(a)});let In=0,Br="";for(;!fe&&In<It.length;)be=_e.length-(It.length-In),Br=It.slice(In).join(""),fe=dd(_e[be].leftSiblings,Br,a.options.inlineShortcuts),!fe&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Br)&&(fe=a.options.onInlineShortcut(a,Br)),In+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(fe?a.switchMode("math"):jg(a,ae,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),ge=""))}if(!fe){if(ge||(ge=Zm(a.keybindings,re.mode,y)),!ge&&(ae==="[Enter]"||ae==="[Return]")){let xt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(xt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),xt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),xt}if((!ge||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return aa.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),ge="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const xt=re.at(re.position+1),It=re.at(re.position-1);if((xt==null?void 0:xt.mode)==="text"||(It==null?void 0:It.mode)==="text")return aa.insert(re," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(ee=re.at(re.position))!=null&&ee.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Lc(y)===","&&(ge="insertDecimalSeparator")}}if(!fe&&!ge){if(re.mathfield.smartFence){if(Ih(re,Lc(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:xt}=re.at(re.position);if(xt instanceof Wa&&xt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),xt.isDirty=!0,xt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Lc(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const It=Lc(y);if(It==="("||It==="{"||It==="["){const In={"(":"(","{":"\\lbrace","[":"\\lbrack"}[It],Br={"(":")","{":"\\rbrace","[":"\\rbrack"}[It],[kn,sr]=Uo(re.selection);return a.snapshot(),re.position=sr,aa.insert(re,Br,{format:"latex"}),re.position=kn,aa.insert(re,In,{format:"latex"}),re.setSelection(kn+1,sr+1),re.contentDidChange({data:It,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const ze=re.at(Math.max(re.position,re.anchor)),{parent:rt}=ze;if(ge==="moveAfterParent"&&(rt==null?void 0:rt.type)==="leftright"&&ze.isLastSibling&&a.options.smartFence&&Ih(re,".",a.defaultStyle)&&(ge="",Eo(a)),a.keyboardDelegate.cancelComposition(),ge)a.executeCommand(ge);else if(fe){const xt=a.effectiveStyle;re.setState(_e[be].state);const It=_e[_e.length-1].keystrokes;for(const In of It)aa.insert(re,In,{silenceNotifications:!0,style:xt});a.snapshot("insert-shortcut"),re.setState(_e[be].state),re.deferNotifications({content:!0,selection:!0,data:fe,type:"insertText"},()=>(aa.insert(re,fe,{format:"latex",style:xt}),Ah(a.model),fe.endsWith(" ")&&(a.switchMode("text"),aa.insert(re," ",{style:xt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Th(a,y,b){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}b!=null||(b={}),b.focus&&a.focus(),b.feedback&&window.MathfieldElement.playSound("keypress"),typeof b.mode=="string"&&(a.switchMode(b.mode),a.snapshot());let ee=rf(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(ge=>ge.toUpperCase())),b.simulateKeystroke){let ge=!0;for(const be of ee)K0(a,new KeyboardEvent("keypress",{key:be}))&&(ge=!1);if(ge)return}const ae=E.at(E.position),fe=we(we({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Uo(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Ef(a);for(const ge of ee)aa.insert(E,ge);a.snapshot("insert-latex"),Ad(a)});else if(E.mode==="text"){for(const ge of ee)aa.insert(E,ge,{style:fe});a.snapshot("insert-text")}else if(E.mode==="math")for(const ge of ee)qg(a,ge,fe,ae);a.dirty=!0,a.scrollIntoView()}function Xg(a){const y=a.model,b=[];let E=y.at(Math.min(y.position,y.anchor));for(;E.type!=="first";)b.push(E),E=E.leftSibling;return b}function qg(a,y,b,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(y)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){Yg(ee),aa.insert(ee,y,{style:b}),a.snapshot(),N0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&a.adoptStyle!=="none"){const ae=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(ae==null?void 0:ae.type)==="mord"&&/[a-zA-Z0-9]/.test(ae.value)&&(b=we({},b),ae.style.variant&&(b.variant=ae.style.variant),ae.style.variantStyle&&(b.variantStyle=ae.style.variantStyle))}aa.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function Yg(a){a.selectionIsCollapsed||(a.deleteAtoms(Uo(a.selection)),a.mathfield.snapshot("delete"))}function Ih(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!re)return!1;const ae=te[re],fe=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[ge,be]=Uo(a.selection),_e=a.extractAtoms([ge,be]),ze=ee.addChildrenAfter([new Wa("left...right",_e,{leftDelim:re,rightDelim:fe})],a.at(ge));return a.setSelection(a.offsetOf(ze.firstChild),a.offsetOf(ze.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const ge=ee instanceof Wa?ee.leftDelim+ee.rightDelim:"";if(ge==="\\lbrace\\rbrace"||ge==="\\{\\}"||ge==="\\lbrace?")return a.mathfield.snapshot(),aa.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(fe){if(ee instanceof Wa&&ee.firstChild===E&&(ee.leftDelim==="?"||ee.leftDelim==="."))return ee.leftDelim=re,ee.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(ee instanceof Wa)){let ze=E;for(;ze&&!(ze.type==="mclose"&&ze.value===fe);)ze=ze.rightSibling;if(ze){a.mathfield.snapshot();const rt=a.extractAtoms([a.offsetOf(E),a.offsetOf(ze)]);return rt.pop(),ee.addChildrenAfter([new Wa("left...right",rt,{leftDelim:re,rightDelim:fe})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const ge=a.offsetOf(E.lastSibling);let be;for(be=a.position;be<=ge;be++){const ze=a.at(be);if(ze instanceof Wa&&(ze.leftDelim==="?"||ze.leftDelim===".")&&H0(re,ze.rightDelim))break}const _e=a.at(be);if(be<=ge&&_e instanceof Wa){_e.leftDelim=re,a.mathfield.snapshot();let ze=a.extractAtoms([a.position,be-1]);return ze=ze.filter(rt=>rt.type!=="first"),_e.addChildren(ze,_e.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Wa&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const ze=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const rt of ze)ee.parent.addChildBefore(rt,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Wa&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),aa.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const ze=a.offsetOf(E.lastSibling),rt=a.extractAtoms([a.position,ze]);a.at(a.position).body=rt,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let ge=E;for(;ge;){if(ge.type==="mopen"&&ge.value===ae){a.mathfield.snapshot();const xt=ge.leftSibling,It=a.extractAtoms([a.offsetOf(ge.leftSibling),a.offsetOf(E)]);It.shift();const In=new Wa("left...right",It,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([In],xt),a.position=a.offsetOf(In),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}ge=ge.leftSibling}if(ee instanceof Wa&&E.isLastSibling&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const be=a.offsetOf(E.firstSibling);let _e;for(_e=a.position;_e>=be;_e--){const xt=a.at(_e);if(xt instanceof Wa&&(xt.rightDelim==="?"||xt.rightDelim===".")&&Dh(xt.leftDelim,re))break}const ze=a.at(_e);if(_e>=be&&ze instanceof Wa)return a.mathfield.snapshot(),ze.rightDelim=re,ze.addChildren(a.extractAtoms([_e,a.position]),ze.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Wa&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,ee.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ee.parentBranch),a.position=a.offsetOf(ee),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const rt=ee.parent;return rt instanceof Wa&&(rt.rightDelim==="?"||rt.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(rt),Ih(a,re,b)):!1}return!1}function Dh(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function H0(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}Ls({undo:a=>(a.undo(),!0),redo:a=>(a.redo(),!0),scrollIntoView:a=>(a.scrollIntoView(),!0),scrollToStart:a=>(a.field.scroll(0,0),!0),scrollToEnd:a=>{const y=a.field.getBoundingClientRect();return a.field.scroll(y.left-window.scrollX,0),!0},toggleKeystrokeCaption:Ug,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(Th(a,y,b),!0),insertDecimalSeparator:a=>{const y=a.model;return y.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&y.at(Math.max(y.position,y.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var y;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((y=a.host)==null||y.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,y,b)=>{const E=a.getPrompts();let ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re=0;for(;E.includes(ee)&&re<100;){if(re===99)return console.error("could not find a unique ID after 100 tries"),!1;ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re++}return a.insert(`\\placeholder[${y!=null?y:ee}]{}`,b),!0}}),Ls({copyToClipboard:a=>(a.focus(),a.model.selectionIsCollapsed&&a.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Ls({cutToClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(y=>{y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(y,{mode:a.model.mode})&&(Ad(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Eo(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jg(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Ph(a,y),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&b.fontSeries===a.defaultStyle.fontSeries&&(b.fontSeries="auto"),b.fontShape&&b.fontShape===a.defaultStyle.fontShape&&(b.fontShape="auto"),b.color&&b.color===a.defaultStyle.color&&(b.color="none"),b.backgroundColor&&b.backgroundColor===a.defaultStyle.backgroundColor&&(b.backgroundColor="none"),b.fontSize&&b.fontSize===a.defaultStyle.fontSize&&(b.fontSize="auto"),a.defaultStyle=we(we({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Mh(E,ee,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Ls({applyStyle:Jg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,ae,fe,ge,be,_e,ze;const rt={};if(typeof y.color=="string"){const It=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";It!==y.color&&(rt.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),rt.color=It}if(typeof y.backgroundColor=="string"){const It=(ae=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?ae:"none";It!==y.backgroundColor&&(rt.verbatimBackgroundColor=(fe=y.verbatimBackgroundColor)!=null?fe:y.backgroundColor),rt.backgroundColor=It}typeof y.fontFamily=="string"&&(rt.fontFamily=y.fontFamily),typeof y.series=="string"&&(rt.fontSeries=y.series),typeof y.fontSeries=="string"&&(rt.fontSeries=y.fontSeries.toLowerCase()),rt.fontSeries&&(rt.fontSeries=(ge={bold:"b",medium:"m",normal:"m"}[rt.fontSeries])!=null?ge:rt.fontSeries),typeof y.shape=="string"&&(rt.fontShape=y.shape),typeof y.fontShape=="string"&&(rt.fontShape=y.fontShape.toLowerCase()),rt.fontShape&&(rt.fontShape=(be={italic:"it",up:"n",upright:"n",normal:"n"}[rt.fontShape])!=null?be:rt.fontShape),y.variant&&(rt.variant=y.variant.toLowerCase()),y.variantStyle&&(rt.variantStyle=y.variantStyle.toLowerCase());const xt=(_e=y.size)!=null?_e:y.fontSize;return typeof xt=="number"?rt.fontSize=Math.max(1,Math.min(10,xt)):typeof xt=="string"&&(rt.fontSize=(ze={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[xt.toLowerCase()])!=null?ze:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[xt]),rt}function Bh(a){let[y,b]=Uo(a.selection);if(y=W0(a,y,"backward"),b=W0(a,b,"forward"),y===b){const E=a.at(y);if(E.type==="leftright")return a.setSelection(a.offsetOf(E.firstChild)-1,b);if(E.type==="first"&&(E.parent.type==="leftright"||E.parent.type==="surd"))return a.setSelection(y-1,a.offsetOf(E.parent.lastChild)+1);a.setSelection(y-1,b)}else a.setSelection(y,b);return!0}function W0(a,y,b){var E,ee,re;let ae=a.at(y);if(!ae)return y;const fe=b==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!he.test(ae.value));)y+=fe,ae=a.at(y);return b==="backward"?y-1:y}if(ae.mode==="latex"){if(/[a-zA-Z\*]/.test(ae.value))if(b==="backward")for(;ae&&ae.mode==="latex"&&ae.value!=="\\"&&/[a-zA-Z]/.test(ae.value);)y+=fe,ae=a.at(y);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)y+=fe,ae=a.at(y);else if(ae.value==="{"){if(b==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)y+=fe,ae=a.at(y);return y}return y-1}else if(ae.value==="}"){if(b==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)y+=fe,ae=a.at(y);return y-1}return y}return y-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(y+fe))!=null&&E.isDigit();)y+=fe;return b==="backward"?y-1:y}if(ae.style.variant||ae.style.variantStyle){let ge=(ee=a.at(y))==null?void 0:ee.style;for(;ge&&ge.variant===ae.style.variant&&ge.variantStyle===ae.style.variantStyle;)ge=(re=a.at(y+fe))==null?void 0:re.style,y+=fe;return b==="backward"?y-1:y}return y}return y}Ls({selectGroup:a=>{const y=Bh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Cl(a,"forward",{extend:!0}),extendSelectionBackward:a=>Cl(a,"backward",{extend:!0}),extendToNextWord:a=>Bc(a,"forward",{extend:!0}),extendToPreviousWord:a=>Bc(a,"backward",{extend:!0}),extendSelectionUpward:a=>Cl(a,"upward",{extend:!0}),extendSelectionDownward:a=>Cl(a,"downward",{extend:!0}),extendToNextBoundary:a=>Bc(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Bc(a,"backward",{extend:!0}),extendToGroupStart:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).firstSibling));return y||a.announce("plonk"),y},extendToGroupEnd:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).lastSibling));return y||a.announce("plonk"),y},extendToMathFieldStart:a=>{const y=a.setSelection(a.anchor,0);return y||a.announce("plonk"),y},extendToMathFieldEnd:a=>{const y=a.setSelection(a.anchor,a.lastOffset);return y||a.announce("plonk"),y}},{target:"model",changeSelection:!0});var ju=null,Od=0,Wf=class qs{static start(y,b,E,ee){var re;qs.element=y,(re=qs.controller)==null||re.abort(),qs.controller=new AbortController;const ae={signal:qs.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,ae),y.addEventListener("pointerup",ee,ae),y.addEventListener("pointercancel",ee,ae),Oh(b)&&(qs.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var y;(y=qs.controller)==null||y.abort(),qs.controller=void 0,typeof qs.pointerId=="number"&&(qs.element.releasePointerCapture(qs.pointerId),qs.pointerId=void 0)}};function Oh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Z0(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,fe="none",ge=!1,be=!1;const _e=y.clientX,ze=y.clientY,rt=Date.now(),xt=E.field,It=setInterval(()=>{ge?xt.scroll({top:0,left:xt.scrollLeft-16}):be&&xt.scroll({top:0,left:xt.scrollLeft+16})},32);function In(){Wf.stop(),re=!1,clearInterval(It),a.element.classList.remove("tracking"),y&&y.preventDefault()}function Br(sr){if(!E.hasFocus()){In();return}const $r=sr.clientX,pr=sr.clientY,bi=Oh(sr)&&sr.pointerType==="touch"?20:5;if(Date.now()<rt+500&&Math.abs(_e-$r)<bi&&Math.abs(ze-pr)<bi){sr.preventDefault(),sr.stopPropagation();return}const $i=xt.getBoundingClientRect();be=$r>$i.right,ge=$r<$i.left;let Ci=ee;Oh(sr)&&(sr.isPrimary||(Ci=Nd(E,sr.clientX,sr.clientY,{bias:0})));const Pa=Nd(E,$r,pr,{bias:$r<=_e?$r===_e?0:-1:1});Ci>=0&&Pa>=0&&(E.model.extendSelectionTo(Ci,Pa),Eo(a)),ae&&Bh(E.model)}ju&&Math.abs(ju.x-_e)<5&&Math.abs(ju.y-ze)<5&&Date.now()<ju.time+500?(Od+=1,ju.time=rt):(ju={x:_e,y:ze,time:rt},Od=1);const kn=xt.getBoundingClientRect();if(_e>=kn.left&&_e<=kn.right&&ze>=kn.top&&ze<=kn.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=Nd(a,_e,ze,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const sr=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||sr?fe="all":fe="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),fe="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),fe="selection"):(a.model.position=ee,v0(a.model)?fe="all":fe="selection");a.defaultStyle={},y.detail===3||Od>2?(In(),(y.detail===3||Od===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},fe="all")):re||(re=!0,Wf.start(xt,y,Br,In),(y.detail===2||Od===2)&&(ae=!0,Bh(a.model),fe="all"))}a.hasFocus()||(fe="none",a.focus({preventScroll:!0}))}else ju=null;a.stopCoalescingUndo(),fe!=="none"&&(a.model.selectionIsCollapsed&&(fe="all"),Eo(a)),y.preventDefault()}function Qg(a,y,b){if(a>=b.left&&a<=b.right&&y>=b.top&&y<=b.bottom)return 0;const E=a-(b.left+b.right)/2,ee=y-(b.top+b.bottom)/2;return E*E+ee*ee}function j0(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=lu(a,b);if(!re)return[1/0,null];let ae=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=re.left&&E<=re.right)for(const fe of b.children){const ge=j0(a,y,fe,E,ee);ge[0]<=ae[0]&&(ae=ge)}return ae[1]||(ae=[Qg(E,ee,re),b]),y.set(b.id,ae),ae}function ev(a,y,b){const[,E]=j0(a,new Map,a.model.root,y,b);return E}function Nd(a,y,b,E){var ee;const re=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!re)return 0;if(y>re.right||b>re.bottom+8)return a.model.lastOffset;if(y<re.left||b<re.top-8)return 0;E=E!=null?E:{},E.bias=(ee=E.bias)!=null?ee:0;let ae=ev(a,y,b);const fe=[];let ge=ae;for(;ge;)fe.unshift(ge),ge=ge.parent;for(const _e of fe)if(_e.captureSelection){ae=_e;break}let be=a.model.offsetOf(ae);if(be<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const _e=lu(a,ae);_e&&y<(_e.left+_e.right)/2&&(be=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(be=a.model.offsetOf(ae.leftSibling));return be}var tv=class extends aa{constructor(){super("math")}onPaste(a,y){if(!y||!a.model.contentWillChange({data:typeof y=="string"?y:null,dataTransfer:typeof y=="string"?null:y,inputType:"insertFromPaste"}))return!1;let b="",E="auto",ee=typeof y!="string"?y.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=du(re),{model:fe}=a;fe.selectionIsCollapsed||fe.deleteAtoms(Uo(fe.selection));const ge=fe.at(fe.position);if(ge.parent instanceof la){console.assert(ge.parentBranch!==void 0);const be=[];let _e=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const It of ae)It.type==="first"&&_e.length>0?(be.push(_e),_e=[It]):_e.push(It);_e.length>0&&be.push(_e);let ze=Number(ge.parentBranch[0]),rt=Number(ge.parentBranch[1]);const xt=ge.parent.maxColumns;for(;ge.parent.colCount-rt<be.length&&ge.parent.colCount<xt;)ge.parent.addColumn();ge.parent.addChildrenAfter(be[0],ge);for(let It=1;It<be.length;It++)rt++,rt>=xt&&(rt=0,ge.parent.addRowAfter(ze),ze++),ge.parent.setCell(ze,rt,be[It])}else ge.parent.addChildrenAfter(ae.filter(be=>be.type!=="first"),ge);return fe.position=fe.offsetOf(ae[ae.length-1]),fe.contentDidChange({inputType:"insertFromPaste"}),Eo(a),!0}}catch(re){}if(ee=typeof y!="string"?y.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(b=re.latex),!b){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(b=ae.latex)}b||(E="latex")}catch(re){}if(!b&&typeof y!="string"&&(b=y.getData("application/x-latex"),b&&(E="latex")),b||(b=typeof y=="string"?y:y.getData("text/plain")),b){let re;return[re,b]=yl(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),Eo(a)),a.startRecording(),!0}return!1}insert(a,y,b){var E,ee;const re=typeof y=="string"?y:(ee=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(y).latex)!=null?ee:"";if(!b.silenceNotifications&&!a.contentWillChange({data:re,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:ae}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const fe=a.silenceNotifications;a.silenceNotifications=!0;const ge={"?":"\\placeholder{}","@":"\\placeholder{}"};ge[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Uo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward"),!a.at(a.position).isLastSibling&&a.at(a.position+1).type==="placeholder"?a.deleteAtoms([a.position,a.position+1]):a.at(a.position).type==="placeholder"&&a.deleteAtoms([a.position-1,a.position]);let be=-1;ge[0]?ge["@"]=ge[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(be=rv(a),be>=0&&(ge["@"]=a.getValue(be,a.position,"latex"))),ge[0]||(ge[0]=ge["?"]);let _e=!1;const ze=$r=>(_e=!0,ge[$r]);let[rt,xt]=V0(a,y,ze,b);if(!xt)return!1;const It=xt.length===1&&xt[0].type==="genfrac";It&&be>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(ge["@"]=ge["?"],_e=!1,[rt,xt]=V0(a,y,ze,b)):be>=0&&a.deleteAtoms([be,a.position]);const{parent:In}=a.at(a.position),Br=In.hasEmptyBranch("body");if(It&&rt!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&In instanceof Wa&&In.leftDelim==="("&&Br){const $r=In.parent,pr=In.parentBranch;$r.removeChild(In),$r.setChildren(xt,pr)}const kn=a.at(a.position);kn.parent.addChildrenAfter(xt,kn),rt==="latex"&&typeof y=="string"&&(In==null?void 0:In.type)==="root"&&Br&&!_e&&(In.verbatimLatex=y),a.silenceNotifications=fe;const sr=xt[xt.length-1];if(b.selectionMode==="placeholder"){const $r=xt.flatMap(pr=>[pr,...pr.children]).find(pr=>pr.type==="placeholder");if($r){const pr=a.offsetOf($r);a.setSelection(pr-1,pr),a.announce("move")}else sr&&(a.position=a.offsetOf(sr))}else b.selectionMode==="before"||(b.selectionMode==="after"?sr&&(a.position=a.offsetOf(sr)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(sr)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function V0(a,y,b,E){var ee;let re,ae=[];if(typeof y!="string"||E.format==="math-json"){const fe=window.MathfieldElement.computeEngine;if(!fe)return["math-json",[]];[re,y]=["latex",fe.box(y).latex],ae=Xo(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Bu(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=Xo(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Zf(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Bu(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=yl(y)),ae=Xo(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Zf(ae));return hu(ae,E.style),[re!=null?re:"latex",ae]}function nv(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof Wa&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Zf(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof Wa&&b.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;b.body[ae];ae++)b.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[y]=b.body[ee])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){Zf(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof la)for(const b of y.cells)Zf(b)}}}function rv(a){let y=a.at(a.position);if(y.mode==="text"){for(;!y.isFirstSibling&&y.mode==="text";)y=y.leftSibling;return a.offsetOf(y)}const b=y;let E=!1;if(y.type==="mclose"){const ee=te[y.value];for(;!y.isFirstSibling&&!(y.type==="mopen"&&y.value===ee);)y=y.leftSibling;y.isFirstSibling||(y=y.leftSibling),E=!0}else y.type==="leftright"&&(y=y.leftSibling,E=!0);if(E)for(;!y.isFirstSibling&&(y.isFunction||U0(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(U0(y)||ee.length>0);)y.type==="mclose"&&ee.unshift(y.value),y.type==="mopen"&&ee.length>0&&y.value===te[ee[0]]&&ee.shift(),y=y.leftSibling}return b===y?-1:a.offsetOf(y)}function U0(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tv;var iv=class extends aa{constructor(){super("text")}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.model.contentDidChange({inputType:"insertFromPaste"}),a.startRecording(),a.snapshot("paste"),Eo(a)),a.startRecording(),!0):!1}insert(a,y,b={}){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Uo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=av(y,a.mathfield.context);if(hu(re,b.style),!re)return!1;const ae=a.at(a.position),fe=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(fe)):fe&&(a.position=a.offsetOf(fe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function av(a,y){return a=a.replace(/\\/g,"\\textbackslash "),a=a.replace(/#/g,"\\#"),a=a.replace(/\$/g,"\\$"),a=a.replace(/%/g,"\\%"),a=a.replace(/&/g,"\\&"),a=a.replace(/_/g,"\\_"),a=a.replace(/{/g,"\\textbraceleft "),a=a.replace(/}/g,"\\textbraceright "),a=a.replace(/lbrace/g,"\\textbraceleft "),a=a.replace(/rbrace/g,"\\textbraceright "),a=a.replace(/\^/g,"\\textasciicircum "),a=a.replace(/~/g,"\\textasciitilde "),a=a.replace(/£/g,"\\textsterling "),Xo(a,{context:y,parseMode:"text"})}new iv;function El(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var fo=4,Cs=20,$o=2*(Cs+fo),jf=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${y}" 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>`,G0=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${y}" 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=(a,y,b)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${b})" 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>`,ov=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*Cs+10*fo+5} ${8*Cs+10*fo+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${$o+fo}"
|
|
|
height="${3*$o}"
|
|
|
width="${$o}"
|
|
|
rx="${$o/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${$o+fo}"
|
|
|
y="0"
|
|
|
height="${$o}"
|
|
|
width="${3*$o}"
|
|
|
rx="${$o/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${Vf(2*(fo+$o),2*fo+3*$o,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${Vf(2*(fo+$o),2*fo+$o,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${Vf(2*fo+3*$o,2*(fo+$o),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${Vf(2*fo+$o,2*(fo+$o),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${jf(2*fo+$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${G0(2*fo+2*$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${jf(2*fo+3*$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${jf(fo,2*fo+$o)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${G0(fo,2*fo+2*$o)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${jf(fo,2*fo+3*$o)}
|
|
|
</g>
|
|
|
</svg>`,sv=a=>`
|
|
|
<svg id="matrix" class="${a}" 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>`,lv=a=>`
|
|
|
<svg id="pmatrix" class="${a}" 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>`,X0=a=>`
|
|
|
<svg id="Bmatrix" class="${a}" 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>`,uv=a=>`
|
|
|
<svg id="bmatrix" class="${a}" 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>`,cv=a=>`
|
|
|
<svg id="vmatrix" class="${a}" 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>`,dv=a=>`
|
|
|
<svg id="Vmatrix" class="${a}" 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>`,fv=a=>`
|
|
|
<svg id="cases" class="${a}" 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>`,hv=a=>`
|
|
|
<svg id="rcases" class="${a}" 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>`,Nh={matrix:sv,pmatrix:lv,bmatrix:uv,Bmatrix:X0,vmatrix:cv,Vmatrix:dv},Rh={cases:fv,rcases:hv,Bmatrix:X0};function pv(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let ee=0;E.forEach(It=>{(!ee||It.length>ee)&&(ee=It.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Mf("mathlive-environment-popover"),ks("environment-popover"),ks("core"),re.setAttribute("aria-hidden","true"));let ae;const fe=re.querySelector(".MLEP__environment-controls");fe?ae=fe:(ae=document.createElement("div"),re.innerHTML="",re.appendChild(ae)),ae.className="MLEP__environment-controls",ae.style.display="flex",ae.style.width="100%",ae.style.height="100%",ae.style.boxSizing="border-box",ae.innerHTML=ov;let ge=[],be="";const _e=a.model.parentEnvironment.environmentName;if(cs(_e)){const It=gv(_e);be=Nh[It]("active");const In=Nh,{[It]:Br}=In,kn=ot(In,[Te(It)]);ge=Object.values(kn).map(sr=>sr("inactive"))}else if(ds(_e)){const It=vv(_e);be=Rh[It]("active");const In=Rh,{[It]:Br}=In,kn=ot(In,[Te(It)]);ge=Object.values(kn).map(sr=>sr("inactive"))}else Do(_e)&&(be=Nh.matrix("active"),ge=Object.values(Rh).map(It=>It("inactive")));const ze=document.createElement("div");ze.className="MLEP__environment-delimiter-controls",ze.style.display="flex",ze.style.flexDirection="column",ze.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${be}
|
|
|
${ge.join("")}
|
|
|
</div>`,be&&ae.appendChild(ze),ae.querySelectorAll("[data-command]").forEach(It=>{const In=It.dataset.command;let Br=In;try{Br=JSON.parse(In)}catch(kn){}It.addEventListener("mousedown",kn=>kn.preventDefault()),Br&&It.addEventListener("click",()=>a.executeCommand(Br))});const xt=(b=a.field)==null?void 0:b.getBoundingClientRect();xt&&(re.style.top=`${window.scrollY+(xt.top-re.clientHeight-15)}px`,re.style.left=`${xt.left+20}px`,re.classList.add("is-visible"))}function $h(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mv(){document.getElementById("mathlive-environment-popover")&&(bh("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Uf(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&bo(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):$h()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function q0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function Y0(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function Fh(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="rtl"||b==="end"&&E==="ltr"||b==="top"||b==="right"?Math.max(0,a-y):a}function yv(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="ltr"||b==="end"&&E==="rtl"||b==="top"||b==="right"?a:a-y}function bv(a,y){var b,E,ee;const re=(b=q0(a))!=null?b:"ltr";a.style.position="fixed",a.style.left="",a.style.top="",a.style.right="",a.style.bottom="",a.style.height="",a.style.width="";const ae=a.getBoundingClientRect(),fe=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let ge=Math.min(fe,(E=y.height)!=null?E:ae.height),be=Fh(y.location.y,ge,y.verticalPos,re);be+ge>window.innerHeight-8&&(y.alternateLocation?(be=Fh(y.alternateLocation.y,ge,y.verticalPos,re),be+ge>window.innerHeight-8&&(be=void 0)):be=void 0),Number.isFinite(be)||(be=Math.max(8,window.innerHeight-8-ge),8+ge>window.innerHeight-8&&(a.style.bottom="8px")),ge=Math.min(be+ge,window.innerHeight-8)-be;const _e=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let ze=Math.min(_e,(ee=y.width)!=null?ee:ae.width),rt=Fh(y.location.x,ze,y.horizontalPos,re);rt+ze>window.innerWidth-8&&(y.alternateLocation?(rt=yv(y.alternateLocation.x,ze,y.verticalPos,re),rt+ze>window.innerWidth-8&&(rt=void 0)):rt=void 0),Number.isFinite(rt)||(rt=Math.max(8,window.innerWidth-8-ze),8+ze>window.innerWidth-8&&(a.style.right="8px")),ze=Math.min(rt+ze,window.innerWidth-8)-rt,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-rt-ze).toString()}px`:a.style.left=`${Math.ceil(rt).toString()}px`,a.style.top=`${Math.ceil(be).toString()}px`,ge!==ae.height&&(a.style.height=`${Math.ceil(ge).toString()}px`),ze!==ae.width&&(a.style.width=`${Math.ceil(ze).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Oc(a){return"submenu"in a}function Ml(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zh(a){return"type"in a&&a.type==="divider"}function Kh(a){return"type"in a&&a.type==="heading"}var J0={};function Hh(a){let y=J0[a];if(!y){let b;switch(a){case"checkmark":b=`<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":b='<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":b='<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(b){const E=document.createElement("template");E.innerHTML=b,J0[a]=E,y=E}}if(y){if("content"in y)return y.content.cloneNode(!0);const b=document.createElement("svg");return b.innerHTML=y.innerHTML,b}}var Q0=80,ep=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,Oc(a)?(this.type="submenu",this.submenu=new tp(a.submenu,{parentMenu:y,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(b=a.type)!=null?b:"command",this.hasCheck=Ml(a)&&a.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var a,y;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(y=this._element)==null||y.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var a;return(a=this._label)!=null?a:""}set label(a){a===void 0&&(a=""),a!==this._label&&(this._label=a,this.dirty=!0)}get visible(){return this._visible}set visible(a){a!==this._visible&&(this._visible=a,this.dirty=!0)}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.element&&(a?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(a){this._checked=a,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(a){a!==this._tooltip&&(this._tooltip=a,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){a!==this._ariaLabel&&(this._ariaLabel=a,this.dirty=!0)}get active(){var a,y;return(y=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?y:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var y,b,E;const ee=this._declaration;if(zh(ee)){this.enabled=!1,this.checked=!1;return}Kh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Ml(ee)&&(this.checked=Ml(ee)&&((y=Nc(ee.checked,a))!=null?y:!1)),(Ml(ee)||Oc(ee))&&(this.enabled=(b=Nc(ee.enabled,a))!=null?b:!0,this.visible=(E=Nc(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Ml(ee)||Kh(ee)||Oc(ee))&&(this.label=Nc(ee.label,a),this.tooltip=Nc(ee.tooltip,a),this.ariaLabel=Nc(ee.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hh("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const y=document.createElement("span");if(y.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&y.classList.add("heading"),y.innerHTML=this.label,a.append(y),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),Ml(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const b=document.createElement("li");return b.setAttribute("part","menu-divider"),b.setAttribute("role","divider"),this._element=b,b}const a=document.createElement("li");this._element=a,(Ml(this._declaration)||Kh(this._declaration)||Oc(this._declaration))&&this._declaration.class&&(a.className=this._declaration.class),a.setAttribute("part","menu-item"),a.setAttribute("tabindex","-1"),this.hasCheck?a.setAttribute("role","menuitemcheckbox"):a.setAttribute("role","menuitem"),this.type==="submenu"&&(a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"));const y=this.abortController.signal;return a.addEventListener("pointerenter",this,{signal:y}),a.addEventListener("pointerleave",this,{signal:y}),a.addEventListener("pointerup",this,{signal:y}),a.addEventListener("click",this,{signal:y}),this._element}dispatchSelect(){if(!Ml(this._declaration))return;const a=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(a)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(a){var y;if(!(!this.visible||!this.enabled)){if(a.type==="click"){this.rootMenu.state==="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}if(a.type==="pointerenter"){const b=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((y=this.parentMenu.activeMenuItem)!=null&&y.movingTowardSubmenu(b))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(a.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(a.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),a.stopPropagation(),a.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()},Q0)},Q0)}openSubmenu(a){var y;if(this.type!=="submenu"||!this.element)return;if((y=a==null?void 0:a.withDelay)!=null&&y){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const b=this.element.getBoundingClientRect(),E=q0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Y0(b,"trailing",E),y:b.top-4},alternateLocation:{x:Y0(b,"leading",E),y:b.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const y=this.rootMenu.lastMoveEvent;if(!y)return!1;const b=a.timeStamp-y.timeStamp;if(b>500)return!1;const E=a.clientX-y.clientX;if(Sv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),fe=this.element.getBoundingClientRect();ae.left<fe.left+fe.width/2&&(re="left")}return re==="right"?E>0:E<0}};function Sv(a,y,b){return Math.hypot(a,y)/b}function Nc(a,y){return a===void 0||typeof a!="function"?a:(y!=null||(y={alt:!1,control:!1,shift:!1,meta:!1}),a(y))}var tp=class Zc{constructor(y,b){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ee;this.parentMenu=(E=b==null?void 0:b.parentMenu)!=null?E:null,this._submenuClass=b==null?void 0:b.submenuClass,this.columnCount=(ee=b==null?void 0:b.columnCount)!=null?ee:1,this.isSubmenuOpen=!1,this.menuItems=y}get children(){return this._menuItems}set menuItems(y){const b=this.parentMenu;this.dispose(),this.parentMenu=b,y=[...y],this._menuItems=y.map(E=>E.onCreate?E.onCreate(E,this):new ep(E,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var y;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(y=this._menuItems)==null||y.forEach(b=>b.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(y){if(y.type==="wheel"&&this._element){const b=y;this._element.scrollBy(0,b.deltaY),y.stopPropagation()}}dispatchEvent(y){return this.rootMenu.dispatchEvent(y)}get rootMenu(){return this.parentMenu.rootMenu}updateState(y){var b,E,ee;this._menuItems.forEach(be=>be.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(be=>be.visible&&be.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(be=>be.updateState(y));let ae,fe=0;for(const be of this._menuItems)be.type==="heading"?(ae&&fe===0&&(ae.visible=!1),ae=be,fe=0):be.type==="divider"&&ae?(ae.visible=fe>0,ae=void 0,fe=0):ae&&be.visible&&(fe+=1);ae&&(ae.visible=fe>0);let ge=!0;for(const be of this._menuItems)be.type==="divider"?(be.visible=!ge,ge=!0):be.visible&&(ge=!1);(b=this.activeMenuItem)!=null&&b.visible||(this.activeMenuItem=null),!((E=this.activeMenuItem)!=null&&E.enabled)&&((ee=this.activeMenuItem)==null?void 0:ee.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible&&y.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible)}set dirty(y){console.assert(y===!0),this._dirty!==y&&y&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var y;if(this._element){this._element.textContent="";for(const{element:b,visible:E}of this._menuItems)b&&E&&this._element.append(b);(y=this._element.querySelector("li:first-of-type"))==null||y.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const y=document.createElement("menu");y.setAttribute("role","menu"),y.setAttribute("tabindex","-1"),y.setAttribute("aria-orientation","vertical"),y.setAttribute("part","ui-menu-container"),this._submenuClass&&y.classList.add(this._submenuClass),y.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const b=this._abortController.signal;return y.addEventListener("focus",this,{signal:b}),y.addEventListener("wheel",this,{passive:!0,signal:b}),this._element=y,this.updateElement(),y}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(y){var b,E,ee,re;if(this.rootMenu.cancelDelayedOperation(),y!==this._activeMenuItem){if(this.activeMenuItem){const ae=this.activeMenuItem;ae.active=!1,(b=ae.submenu)==null||b.hide()}if(!((E=y==null?void 0:y.visible)==null||E)){this._activeMenuItem=null;return}this._activeMenuItem=y,y&&(y.active=!0)}y?(ee=y.element)==null||ee.focus({preventScroll:!0}):(re=this._element)==null||re.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let y=0,b=!1;const E=this._menuItems;for(;!b&&y<=E.length-1;){const ee=E[y];b=ee.type!=="divider"&&ee.visible&&ee.enabled,y+=1}return b?E[y-1]:null}get lastMenuItem(){this.updateIfDirty();const y=this._menuItems;let b=y.length-1,E=!1;for(;!E&&b>=0;){const ee=y[b];E=ee.type!=="divider"&&ee.visible&&ee.enabled,b-=1}return E?y[b+1]:null}nextMenuItem(y){if(y===0)return this._activeMenuItem;if(!this._activeMenuItem)return y>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const b=this._menuItems.indexOf(this.firstMenuItem),E=this._menuItems.indexOf(this.lastMenuItem);let ee=this._menuItems.indexOf(this._activeMenuItem),re=1;for(;ee>=b&&ee<=E;){ee+=y>0?1:-1;const ae=this._menuItems[ee];if(!ae)break;if(ae.visible&&ae.enabled){if(re===Math.abs(y))return this._menuItems[ee];re+=1}}return y>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(y){this.updateIfDirty();const E=this._menuItems.filter(ee=>ee.visible&&ee.enabled).indexOf(y);return E<0?-1:E%this.columnCount}static get collator(){return Zc._collator||(Zc._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Zc._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(fe=>fe.type!=="divider"&&fe.visible&&fe.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(fe=>fe.label.length))-y.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(b=E.find(fe=>Zc.collator.compare(y,fe.label.substring(ae,y.length))===0))!=null?b:null,ae++;return re}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),zt()&&(this.element.popover="manual",this.element.showPopover()),y.location&&bv(this.element,{location:y.location,alternateLocation:y.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var y,b,E,ee,re;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),zt()&&((y=this._element)!=null&&y.popover)&&this.element.hidePopover(),(E=(b=this.parentMenu)==null?void 0:b.element)==null||E.focus(),(re=(ee=this._element)==null?void 0:ee.parentNode)==null||re.removeChild(this._element)}set openSubmenu(y){var b,E,ee,re;const ae=y!==null;((b=this.activeMenuItem)==null?void 0:b.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",ae.toString())),(re=(ee=this.activeMenuItem)==null?void 0:ee.element)==null||re.classList.toggle("is-submenu-open",ae),this.isSubmenuOpen=ae}},np=class rm extends tp{constructor(y,b){var E;super(y),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(E=b==null?void 0:b.host)!=null?E:null,this.isDynamic=y.some(rp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(y){zm(this._modifiers,y)||(this._modifiers=y,this.dirty=!0)}get activeSubmenu(){let y=this;for(;y.isSubmenuOpen;)y=y.activeMenuItem.submenu;return y}set dirty(y){this._updating||(console.assert(y===!0),this._dirty!==y&&(this._dirty=!0,y&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(y){this._updating=!0,this.modifiers=y!=null?y:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(y){this.isDynamic&&(this.modifiers=Ru(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Ru(y));let re=!0;const ae=this.activeSubmenu,fe=ae.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":fe==null||fe.select(Ru(y));break;case"ArrowRight":if((fe==null?void 0:fe.type)==="submenu")fe.select(Ru(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!fe)ae.activeMenuItem=ae.firstMenuItem;else{const ge=(b=ae.getMenuItemColumn(fe))!=null?b:-1;if(ge>=0&&ge<((E=ae.columnCount)!=null?E:1)-1){const be=ae.nextMenuItem(1);be&&(ae.activeMenuItem=be)}}break;case"ArrowLeft":if(ae===this.rootMenu)fe||(ae.activeMenuItem=ae.firstMenuItem);else if((fe&&(ee=ae.getMenuItemColumn(fe))!=null?ee:-1)<=0||!fe){ae.hide();const be=ae.parentMenu.activeMenuItem;if(be){const{element:_e}=be;_e==null||_e.focus(),_e==null||_e.classList.remove("is-submenu-open")}}else{const be=ae.nextMenuItem(-1);be&&(ae.activeMenuItem=be)}break;case"ArrowDown":ae.activeMenuItem=ae.nextMenuItem(ae.columnCount);break;case"ArrowUp":ae.activeMenuItem=ae.nextMenuItem(-ae.columnCount);break;case"Home":case"PageUp":ae.activeMenuItem=ae.firstMenuItem;break;case"End":case"PageDown":ae.activeMenuItem=ae.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(wf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else re=!1}re&&(y.preventDefault(),y.stopPropagation())}handleEvent(y){if(y.type==="keydown")this.handleKeydownEvent(y);else if(y.type==="keyup")this.handleKeyupEvent(y);else if(y.type==="pointermove")this.lastMoveEvent=y;else if(y.type==="pointerup"&&y.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(y.type==="contextmenu"){y.preventDefault(),y.stopPropagation();return}super.handleEvent(y)}dispatchEvent(y){return this._host?this._host.dispatchEvent(y):!0}get scrim(){return Sl.element}connectScrim(y){const b=this.scrim;b.addEventListener("pointerup",this),b.addEventListener("contextmenu",this),b.addEventListener("keydown",this),b.addEventListener("keyup",this),b.addEventListener("pointermove",this),Sl.open({root:y,onDismiss:()=>this.hide()})}disconnectScrim(){const y=this.scrim;y.removeEventListener("pointerup",this),y.removeEventListener("contextmenu",this),y.removeEventListener("keydown",this),y.removeEventListener("keyup",this),y.removeEventListener("pointermove",this),Sl.state==="open"&&Sl.scrim.close()}get rootMenu(){return this}show(y){return this._onDismiss=y==null?void 0:y.onDismiss,y!=null&&y.modifiers&&(this.modifiers=y.modifiers),this.updateState(),this.connectScrim(y==null?void 0:y.target),super.show(me(we({},y),{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,Sl.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(y){this.cancelDelayedOperation();const b=rm.SUBMENU_DELAY;if(b<=0){y();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,y()},b)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};np.SUBMENU_DELAY=120;var wv=np;function rp(a){return zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Ml(a)||Oc(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Ml(a)&&typeof a.checked=="function"?!0:Oc(a)?a.submenu.some(rp):!1}var Gf=class{};Gf.DELAY=300,Gf.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=Sf(a);E||y(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),y(xv(ee,E)<Gf.MAX_DISTANCE)},Gf.DELAY),ae=new AbortController,fe=ae.signal;for(const ge of["pointermove","pointerup","pointercancel"])window.addEventListener(ge,be=>{if(be.type==="pointerup"||be.type==="pointercancel")clearTimeout(re),ae.abort(),y(!1);else if(be.type==="pointermove"){const _e=Sf(be);_e&&(ee=_e)}},{passive:!0,signal:fe})})}function ip(a,y,b){return gu(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:Sf(E),modifiers:Ru(E)}))return a.preventDefault(),a.stopPropagation(),!0}if(a.type==="keydown"){const E=a;if(E.code==="ContextMenu"||E.code==="F10"&&E.shiftKey){const ee=y==null?void 0:y.getBoundingClientRect();if(ee&&b.show({target:y,location:{x:Math.ceil(ee.left+ee.width/2),y:Math.ceil(ee.top+ee.height/2)},modifiers:Ru(E)}))return a.preventDefault(),a.stopPropagation(),!0}}if(a.type==="pointerdown"&&a.pointerType!=="mouse"&&a.button===0){let E=a.target;for(;E&&y!==E;)E=E.parentNode;if(!E||!b.visible)return!1;const ee=Sf(a);if(yield Cv(a))return b.state!=="closed"?!1:(b.show({target:y,location:ee}),!0)}return!1})}var ap={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};Tt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(me(we({},a),{body:ft(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Tt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=Jt(ft(a.args[0]));return new z(me(we({},a),{body:ft(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Tt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(me(we({},a),{body:ft(a.args[0]),svgAccent:"overarc"}))}),Tt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Us(me(we({},a),{body:ft(a.args[0]),svgBelow:"underarc"}))}),Tt("utilde","{body:auto}",{createAtom:a=>{const y=ft(a.args[0]),b=Jt(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new Us(me(we({},a),{body:y,svgBelow:E,boxType:ru(y)}))}}),Tt("^","{:string}",{createAtom:a=>{var y;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[a.args[0]])!=null?y:"^"}))}}),Tt("`","{:string}",{createAtom:a=>{var y;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[a.args[0]])!=null?y:"`"}))}}),Tt("'","{:string}",{createAtom:a=>{var y;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[a.args[0]])!=null?y:"'"}))}}),Tt('"',"{:string}",{createAtom:a=>{var y,b;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[a.args[0]])!=null?b:'"'+a.args[0]:'"'}))}}),Tt(".","{:string}",{createAtom:a=>{var y,b;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[a.args[0]])!=null?b:"."+a.args[0]:"."}))}}),Tt("=","{:string}",{createAtom:a=>{var y,b;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[a.args[0]])!=null?b:"="+a.args[0]:"="}))}}),Tt("~","{:string}",{createAtom:a=>{var y;return new Jn(me(we({type:"mord"},a),{isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[a.args[0]])!=null?y:"\xB4"}))}}),Tt("c","{:string}",{createAtom:a=>{var y;return new Jn(me(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Tt("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var y,b;const E=a.args,ee={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(y=a.style)!=null?y:{}};if(E[1]){const ae=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const fe of ae){const ge=fe.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(ge)ee.strokeWidth=ge[1],ee.strokeStyle=ge[2],ee.strokeColor=ge[3];else{const be=fe.match(/\s*([a-z]*)\s*=\s*"(.*)"/);be&&(be[1]==="mathbackground"?ee.backgroundcolor=be[2]:be[1]==="mathcolor"?ee.strokeColor=be[2]:be[1]==="padding"?ee.padding=be[2]:be[1]==="shadow"&&(ee.shadow=be[2]))}}ee.strokeStyle==="dashed"?ee.svgStrokeStyle="5,5":ee.strokeStyle==="dotted"&&(ee.svgStrokeStyle="1,5")}ee.borderStyle=`${ee.strokeWidth} ${ee.strokeStyle} ${ee.strokeColor}`;const re={};return((b=E[0])!=null?b:"").split(/[, ]/).filter(ae=>ae.length>0).forEach(ae=>{re[ae.toLowerCase()]=!0}),new bd(a.command,ft(E[2]),re,ee)}}),Tt("cancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Tt("bcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Tt("xcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Tt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new Us(me(we({},a),{body:ft((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Tt("overbrace","{:auto}",{createAtom:a=>new Us(me(we({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Tt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Us(me(we({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Tt(["underbrace"],"{:auto}",{createAtom:a=>new Us(me(we({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Tt(["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:a=>{var y,b,E,ee,re;return new Us(me(we({},a),{svgBody:a.command.slice(1),above:((b=ft((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:ft((E=a.args)==null?void 0:E[1]),below:(re=ft((ee=a.args)==null?void 0:ee[0]))!=null?re:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(a,y)=>a.command+(a.hasEmptyBranch("below")?"":`[${a.belowToLatex(y)}]`)+`{${a.aboveToLatex(y)}}${a.supsubToLatex(y)}`}),Tt(["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:a=>new Nu(a.command.slice(1),me(we({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Tt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Nu({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],me(we({},a),{limits:"over-under",variant:"main"}))}),Tt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Nu(a.command.slice(1),me(we({},a),{limits:"over-under",variant:"main"}))}),Tt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Nu(a.command.slice(1),me(we({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Tt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`\\ang{${a.bodyToLatex(y)}}`,render:(a,y)=>{const b=a.createBox(y),E=b.caret;b.caret=void 0;const ee=new Nr("\xB0",{style:me(we({},a.style),{variant:"normal",variantStyle:"up"})});return new Nr([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Tt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(me(we({},a),{body:ft(a.args[1]),index:a.args[0]?ft(a.args[0]):void 0}))}),Tt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=we({},a),b=a.command,E=a.args;switch(b){case"\\dfrac":case"\\frac":case"\\tfrac":y.hasBarLine=!0;break;case"\\atopfrac":y.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":y.hasBarLine=!1,y.leftDelim="(",y.rightDelim=")";break;case"\\cfrac":y.hasBarLine=!0,y.continuousFraction=!0;break;default:}switch(b){case"\\dfrac":case"\\dbinom":y.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":y.mathstyleName="textstyle";break;default:}return new _c(E[0]?ft(E[0]):[new Wi],E[1]?ft(E[1]):[new Wi],y)},serialize:(a,y)=>{const b=a.aboveToLatex(y),E=a.belowToLatex(y);return/^[0-9]$/.test(b)&&/^[0-9]$/.test(E)?`${a.command}${b}${E}`:co(a.command,b,E)}}),Tt(["brace","brack"],"",{infix:!0,createAtom:a=>new _c(ft(a.args[0]),ft(a.args[1]),me(we({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ya([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Tt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new _c(ft(E[0]),ft(E[1]),me(we({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ya([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Tt(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var y,b;const E=a.args;return new _c(ft(E[0]),ft(E[1]),me(we({},a),{leftDelim:(y=E[2])!=null?y:".",rightDelim:(b=E[3])!=null?b:".",hasBarLine:!1}))},serialize:(a,y)=>`${a.aboveToLatex(y)} ${a.command}${a.leftDelim}${a.rightDelim}${a.belowToLatex(y)}`}),Tt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new _c(ft(a.args[0]),ft(a.args[1]),me(we({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Tt(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new fh({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"}[a.command.slice(1)],me(we({},a),{limits:"auto",variant:"main"}))}),Tt("smallint","",{ifMode:"math",createAtom:a=>new Nu("\u222B",me(we({},a),{limits:"adjacent",variant:"main"}))});var op={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"};Tt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new fh(b,me(we({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Tt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Nu({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],me(we({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Tt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(me(we({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Tt("the","{:value}",{createAtom:a=>new Jn(me(we({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new La({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new Nr(((b=Io(re))!=null?b:"").split("").map(ae=>new Nr(ae,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:we({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:ee}).wrap(E)},serialize:a=>{var y;return`\\the${(y=Io(a.args[0]))!=null?y:"\\relax"}`}}),Tt("mathtip","{:auto}{:math}",{createAtom:a=>new hh(me(we({},a),{body:ft(a.args[0]),tooltip:ft(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Jn.serialize([a.tooltip],me(we({},y),{defaultMode:"math"}))}}`}),Tt("texttip","{:auto}{:text}",{createAtom:a=>new hh(me(we({},a),{body:ft(a.args[0]),tooltip:ft(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Jn.serialize([a.tooltip],me(we({},y),{defaultMode:"text"}))}}`}),Tt("error","{:math}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Tt("ensuremath","{:math}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(me(we({},y),{defaultMode:"math"}))}}`}),Tt("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Tt("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Tt("boxed","{content:math}",{createAtom:a=>new _o(me(we({},a),{body:ft(a.args[0]),framecolor:{string:"black"}}))}),Tt("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=Io(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Tt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new _o(me(we({},a),{body:ft(a.args[2]),framecolor:(y=a.args[0])!=null?y:{string:"blue"},backgroundcolor:(b=a.args[1])!=null?b:{string:"yellow"}}))},serialize:(a,y)=>{var b,E;return y.skipStyles?a.bodyToLatex(me(we({},y),{defaultMode:"text"})):co(a.command,(b=Io(a.framecolor))!=null?b:"",(E=Io(a.backgroundcolor))!=null?E:"",a.bodyToLatex(me(we({},y),{defaultMode:"text"})))}}),Tt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=ft(a.args[1]);return b?new _o(me(we({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new _o(me(we({},a),{body:E}))},serialize:(a,y)=>{var b,E;if(y.skipStyles)return a.bodyToLatex(y);let ee=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const re=[];a.padding&&re.push((b=Io(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Io(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return co(ee,a.bodyToLatex(y))}}),Tt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),render:(a,y)=>{const b=new La({parent:y,mathstyle:a.command.slice(1)},a.style),E=Jn.createBox(b,a.body,{type:"lift"});return a.caret&&(E.caret=a.caret),a.bind(y,E)},serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{${ya([a.command,a.bodyToLatex(y)])}}`}),Tt(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:a=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[a]})}),Tt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Tt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Tt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Tt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Tt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Tt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Tt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Tt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Tt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Tt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Tt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Tt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Tt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Tt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Tt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Tt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Tt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Tt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Tt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Tt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Tt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Tt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Tt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Tt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Tt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Tt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Tt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Tt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Tt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Tt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Tt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Tt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Tt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Tt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Tt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Tt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Tt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Tt("mbox","{:text}",{ifMode:"math",createAtom:a=>new Jn(me(we({},a),{type:"mord",body:ft(a.args[0]),mode:"math"})),serialize:(a,y)=>co("\\mbox",a.bodyToLatex(me(we({},y),{defaultMode:"text"})))}),Tt("text","{:text}",{ifMode:"math",applyMode:"text"}),Tt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>!a.args[0]||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`,render:(a,y)=>{var b;return a.createBox(y,{classes:(b=a.args[0])!=null?b:""})}}),Tt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.cssId=(b=a.args[0])!=null?b:"",E}}),Tt("htmlData","{data:string}{content:auto}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`\\htmlData{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlData=(b=a.args[0])!=null?b:"",E}}),Tt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlStyle=(b=a.args[0])!=null?b:"",E}}),Tt("em","{:rest}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{\\em ${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})}),Tt("emph","{:auto}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[1])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\emph{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})});var sp={"\\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}};Tt(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new i0(me(we({},a),{delim:(y=a.args[0])!=null?y:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),Tt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new wd(me(we({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Tt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new wd(me(we({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Tt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Jn(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Iu||E===ml)&&(b=1),(E===zl||E===ss)&&(b=2),(E===_s||E===Vo)&&(b=3);const ee=ft(a.args[b]);return Jn.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${Jn.serialize(a.args[0],y)}}{${Jn.serialize(a.args[1],y)}}{${Jn.serialize(a.args[2],y)}}{${Jn.serialize(a.args[3],y)}}`}),Tt("mathop","{:auto}",{createAtom:a=>new Jn(me(we({},a),{type:"mop",body:ft(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=Jn.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return new Nr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[co(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ya(b)}}),Tt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Jn(me(we({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:ft(a.args[0])}))}),Tt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=ft(a.args[0]).map(b=>{var E;return b.type!=="first"&&(b.type="mord",b.value=(E={"\u2217":"*","\u2212":"-"}[b.value])!=null?E:b.value,b.isFunction=!1,!b.style.variant&&!b.style.variantStyle&&(b.style.variant="main",b.style.variantStyle="up")),b});return new Jn(me(we({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=Jn.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return a.caret&&(E.caret=a.caret),new Nr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[co(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ya(b)}}),Tt(["char","unicode"],"{charcode:value}",{createAtom:a=>new Jn(me(we({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Io((y=a.args[0])!=null?y:{number:10067,base:"hexadecimal"})}`},render:(a,y)=>{let b=y.evaluate(a.args[0]);return(!b||!("number"in b))&&(b={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(b.number),a.createBox(y)}}),Tt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Jn(a),render:(a,y)=>{var b,E,ee;const re=new La({parent:y,mathstyle:"textstyle"},a.style),ae=re.toEm((b=a.args[0])!=null?b:{dimension:0}),fe=re.toEm((E=a.args[1])!=null?E:{dimension:10}),ge=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),be=new Nr(null,{classes:"rule",type:"ord"});return be.width=fe,be.height=ge+ae,be.depth=-ae,be.setStyle("border-right-width",fe,"em"),be.setStyle("border-top-width",ge,"em"),be.setStyle("border-color",a.style.color),be.setStyle("vertical-align",ae,"em"),a.isSelected&&be.setStyle("opacity","50%"),a.bind(re,be),a.caret&&(be.caret=a.caret),be.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Io(a.args[0])}]`:""}{${Io(a.args[1])}}{${Io(a.args[2])}}`}),Tt(["overline","underline"],"{:auto}",{createAtom:a=>new Jn(me(we({},a),{body:ft(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new La({parent:y,mathstyle:"cramp"},a.style),ee=Jn.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new Nr(null,{classes:b+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let fe;return b==="overline"?fe=new Qa({shift:0,children:[{box:ee},3*re,{box:ae},re]}):fe=new Qa({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(fe.caret=a.caret),new Nr(fe,{classes:b,type:"ignore"})}}),Tt("overset","{:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[1]);return new Us(me(we({},a),{above:ft(a.args[0]),body:y,skipBoundary:!1,boxType:ru(y)}))},serialize:(a,y)=>co(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Tt("underset","{:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[1]);return new Us(me(we({},a),{below:ft(a.args[0]),body:y,skipBoundary:!1,boxType:ru(y)}))},serialize:(a,y)=>co(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Tt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[2]);return new Us(me(we({},a),{above:ft(a.args[0]),below:ft(a.args[1]),body:y,skipBoundary:!1,boxType:ru(y)}))},serialize:(a,y)=>co(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Tt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Us(me(we({},a),{body:ft(a.args[2]),above:ft(a.args[1]),below:ft(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>co(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Tt("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new Sd(me(we({},a),{body:ft(a.args[1]),smashHeight:(b=(y=a.args[0])==null?void 0:y.includes("t"))!=null?b:!0,smashDepth:(ee=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ee:!0}))}}),Tt(["vphantom"],"{:auto}",{createAtom:a=>new Sd(me(we({},a),{body:ft(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Tt(["hphantom"],"{:auto}",{createAtom:a=>new Sd(me(we({},a),{body:ft(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Tt(["phantom"],"{:auto}",{createAtom:a=>new Sd(me(we({},a),{body:ft(a.args[0]),isInvisible:!0}))}),Tt("not","{:math}",{createAtom:a=>{const y=ft(a.args[0]);return y.length===0?new Jn(me(we({},a),{type:"mrel",value:"\uE020"})):new Jn(me(we({},a),{body:[new Ou(me(we({},a),{body:"\uE020",align:"right"})),...y],captureSelection:!0}))},serialize:(a,y)=>{const b=a.args[0],E=b&&typeof b=="object"&&"group"in b;return a.value!=="\uE020"?E?`\\not{${Jn.serialize(b.group,y)}}`:`\\not${Jn.serialize(b,y)}`:E?"\\not{}":"\\not"},render:(a,y)=>{if(a.value)return a.createBox(y);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":ru(ft(a.args[0])),ee=Jn.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Tt(["ne","neq"],"",{createAtom:a=>new Jn(me(we({},a),{type:"mrel",body:[new Ou(me(we({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Jn(me(we({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Tt("rlap","{:auto}",{createAtom:a=>new Ou(me(we({},a),{body:ft(a.args[0]),align:"right"}))}),Tt("llap","{:auto}",{createAtom:a=>new Ou(me(we({},a),{body:ft(a.args[0]),align:"left"}))}),Tt("mathrlap","{:math}",{createAtom:a=>new Ou(me(we({},a),{body:ft(a.args[0]),align:"left"}))}),Tt("mathllap","{:math}",{createAtom:a=>new Ou(me(we({},a),{body:ft(a.args[0]),align:"left"}))}),Tt("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new _o(me(we({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return co("\\raisebox",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Tt("raise","{:value}{:auto}",{createAtom:a=>{var y;return new _o(me(we({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return co("\\raise",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Tt("lower","{:value}{:auto}",{createAtom:a=>{var y;return new _o(me(we({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=js(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return co("\\lower",(E=Io(js((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Ie("0123456789/@.?!"),Qe(65,90),Qe(97,122),Ie([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Ie([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Ie([["\\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]]),Ie([["\\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"),Ie([["\\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"]]),Ie([["\\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"]]),Ie([["\\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"),Ie([["+",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"),Ie([["\\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"),Ie([["\\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]]),Ie([["=",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"),Ie([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Ie([["\\wp",8472],["\\aleph",8501]]),Ie([["\\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"),Ie([["\\ ",160],["~",160]],"space"),Tt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new wd(a)}),Tt("space","",{createAtom:a=>new wd(a)}),Ie([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Ie([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Ie([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>⁡</mo>",Xf="<mo>⁢</mo>";function qf(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function no(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Ev(a,y,b){var E,ee,re,ae,fe,ge,be,_e,ze,rt,xt;let It=!1;y=y!=null?y:a.atoms.length;let In="",Br="",kn=a.atoms[a.index];const sr=(ee=(E=kn.style)==null?void 0:E.variant)!=null?ee:"",$r=(ae=(re=kn.style)==null?void 0:re.variantStyle)!=null?ae:"";let pr="";if(sr||$r){const $i=Sn(kn.value,(fe=kn.style)==null?void 0:fe.variant,(ge=kn.style)==null?void 0:ge.variantStyle);if($i!==kn.value)return a.index+=1,In=`<mi${no(kn.id,b)}>${$i}</mi>`,jl(In,a,b)||(a.mathML+=In,a.lastType="mi"),!0;pr=(be={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"}[$r+sr])!=null?be:"",pr=` mathvariant="${pr}"`}const bi={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(kn.command==="!")return a.index+=1,In="<mo>!</mo>",jl(In,a,b)||(a.mathML+=In,a.lastType="mo"),!0;if(bi[kn.command]){a.index+=1;let $i=`<mi${no(kn.id,b)}${pr}>${bi[kn.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&($i=Xf+$i),jl($i,a,b)||(a.mathML+=$i,a.lastType="mi"),!0}if(kn.command==="\\operatorname")Br=Rc(kn.body),a.index+=1;else if(sr||$r)for(;a.index<y&&(kn.type==="mord"||kn.type==="macro")&&!kn.isDigit()&&sr===((ze=(_e=kn.style)==null?void 0:_e.variant)!=null?ze:"")&&$r===((xt=(rt=kn.style)==null?void 0:rt.variantStyle)!=null?xt:"");)Br+=Rc([kn]),a.index+=1,kn=a.atoms[a.index];else(kn.type==="mord"||kn.type==="macro")&&!kn.isDigit()&&(Br+=Rc([kn]),a.index+=1);if(Br.length>0){It=!0,In=`<mi${pr}>${Br}</mi>`;const $i=a.lastType;In.endsWith(">f</mi>")||In.endsWith(">g</mi>")?(In+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(In)?"mo":"mi",jl(In,a,b)||(($i==="mi"||$i==="mn"||$i==="mtext"||$i==="fence")&&(In=Xf+In),a.mathML+=In)}return It}function Mv(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function _v(a){let y=-1,b=a.index,E=!1,ee=!1;for(;b<a.atoms.length&&!E&&!ee;){const re=a.atoms[b];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,b++}return ee&&(y=b-1),y}function jl(a,y,b){var E;let ee=y.atoms[y.index-1];if(!ee)return!1;if(!ee.superscript&&!ee.subscript)if(((E=y.atoms[y.index])==null?void 0:E.type)==="subsup")ee=y.atoms[y.index],y.index+=1;else return!1;const re=y.lastType;y.lastType="";const ae=Za(ee.superscript,b);y.lastType="";const fe=Za(ee.subscript,b);if(y.lastType=re,!ae&&!fe)return!1;let ge="";return ae&&fe?ge=`<msubsup>${a}${fe}${ae}</msubsup>`:ae?ge=`<msup>${a}${ae}</msup>`:fe&&(ge=`<msub>${a}${fe}</msub>`),y.mathML+=ge,y.lastType="",!0}function kv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="";for(;a.index<y&&a.atoms[a.index].mode==="text";)ee+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return ee.length>0?(a.mathML+=`<mtext ${no(a.atoms[E].id,b)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Lv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="",re=_v(a);for(re>=0&&re<y&&(y=re);a.index<y&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+no(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Mv(a)&&(re=a.index,a.index+=1),jl(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Av(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let ae=!1,fe=0;const ge=a.index;let be=-1,_e=ge+1;for(;_e<y&&!ae;)a.atoms[_e].type==="mopen"?fe+=1:a.atoms[_e].type==="mclose"&&(fe-=1),fe===-1&&(ae=!0,be=_e),_e+=1;ae&&(ee="<mrow>",ee+=Vu(a.atoms[ge],b),ee+=Za(a.atoms,b,ge+1,be),ee+=Vu(a.atoms[be],b),ee+="</mrow>",a.index=be+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Xf),jl(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Tv(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const fe={"\\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(fe[ae.command]){a.index+=1;const ge=`<mo${no(ae.id,b)}>${fe[ae.command]}</mo>`;return jl(ge,a,b)||(a.mathML+=ge,a.lastType="mo"),!0}if(a.index<y&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wh(a.atoms[a.index],b),a.index+=1,re="mo";else if(a.index<y&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const ge=Vu(ae,b);return ae.superscript&&ae.subscript?(ee+="<munderover>"+ge,ee+=Za(ae.subscript,b),ee+=Za(ae.superscript,b),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+ge,ee+=Za(ae.superscript,b),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+ge,ee+=Za(ae.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const ge=a.atoms[a.index],be=ge.value==="\\operatorname",_e=be?'<mi class="MathML-Unit"'+no(ge.id,b)+">"+Rc(ge.value)+"</mi>":Vu(ge,b);ee+=_e,!be&&!/^<mo>(.*)<\/mo>$/.test(_e)?(ee+=lp,re="applyfunction"):re=be?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Xf+ee),a.index+=1}return ee.length>0&&(E=!0,jl(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Za(a,y,b,E){y!=null||(y={});const ee={atoms:[],index:b!=null?b:0,mathML:"",lastType:""};if(typeof a=="number"||typeof a=="boolean")ee.mathML=a.toString();else if(typeof a=="string")ee.mathML=a;else if(a instanceof Jn)ee.mathML=Wh(a,y);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(kv(ee,E,y)||Lv(ee,E,y)||Ev(ee,E,y)||Tv(ee,E,y)||Av(ee,E,y))re+=1;else if(ee.index<E){let ae=Wh(ee.atoms[ee.index],y);ee.lastType==="mn"&&ae.length>0&&ee.atoms[ee.index].type==="genfrac"&&(ae="<mo>⁤</mo>"+ae),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,jl(ae,ee,y)?re+=1:ae.length>0&&(ee.mathML+=ae,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function Vu(a,y){let b="";const E=Rc(a.value);return E&&(b="<mo"+no(a.id,y)+">"+E+"</mo>"),b}function Rc(a){if(!a)return"";if(typeof a=="string")return qf(a);if(!Array.isArray(a)&&typeof a.body=="string")return qf(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return qf(y)}function Wh(a,y){var b,E,ee,re,ae,fe,ge,be,_e,ze,rt,xt,It,In,Br,kn,sr,$r,pr,bi,$i,Ci;if(a.mode==="text")return`<mi${no(a.id,y)}>${a.value}</mi>`;const Pa={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"},Ya={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Vr="",Fs="",kl,Xs,Yo,zs,Es,ro;const{command:Lo}=a;if(a.command==="\\error")return`<merror${no(a.id,y)}>${Za(a.body,y)}</merror>`;const Jo={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Ll={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":Vr=Za(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Vr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Vr+="<mo>"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>")),Vr+="<mtable",a.colFormat){for(Vr+=' columnalign="',Yo=0;Yo<a.colFormat.length;Yo++)a.colFormat[Yo].align&&(Vr+={l:"left",c:"center",r:"right"}[a.colFormat[Yo].align]+" ");Vr+='"'}for(Vr+=">",Xs=0;Xs<a.array.length;Xs++){for(Vr+="<mtr>",kl=0;kl<a.array[Xs].length;kl++)Vr+="<mtd>"+Za(a.array[Xs][kl],y)+"</mtd>";Vr+="</mtr>"}Vr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Vr+="<mo>"+(Jo[a.leftDelim]||a.rightDelim)+"</mo>"),Vr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Vr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Vr+="<mo"+no(a.id,y)+">"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Vr+="<mfrac>",Vr+=Za(a.above,y)||"<mi> </mi>",Vr+=Za(a.below,y)||"<mi> </mi>",Vr+="</mfrac>"):(Vr+="<mtable"+no(a.id,y)+">",Vr+="<mtr>"+Za(a.above,y)+"</mtr>",Vr+="<mtr>"+Za(a.below,y)+"</mtr>",Vr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Vr+="<mo"+no(a.id,y)+">"+(Jo[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Vr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Vr+="<msqrt"+no(a.id,y)+">",Vr+=Za(a.body,y),Vr+="</msqrt>"):(Vr+="<mroot"+no(a.id,y)+">",Vr+=Za(a.body,y),Vr+=Za(a.above,y),Vr+="</mroot>");break;case"leftright":const Al=a,Tl=Al.leftDelim;Vr="<mrow>",Tl&&Tl!=="."&&(Vr+=`<mo${no(a.id,y)}>${(b=Jo[Tl])!=null?b:Tl}</mo>`),a.body&&(Vr+=Za(a.body,y));const Il=Al.matchingRightDelim();Il&&Il!=="."&&(Vr+=`<mo${no(a.id,y)}>${(E=Jo[Il])!=null?E:Il}</mo>`),Vr+="</mrow>";break;case"sizeddelim":case"delim":Vr+=`<mo${no(a.id,y)}>${Jo[a.value]||a.value}</mo>`;break;case"accent":Vr+='<mover accent="true"'+no(a.id,y)+">",Vr+=Za(a.body,y),Vr+="<mo>"+(Ll[Lo]||a.accent)+"</mo>",Vr+="</mover>";break;case"line":case"overlap":break;case"overunder":Es=a.above,zs=a.below,(a.svgAbove||Es)&&(a.svgBelow||zs)?ro=a.body:Es&&Es.length>0?(ro=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(zs=a.body[0].below,ro=a.body[0].body):((fe=(ae=a.body)==null?void 0:ae[0])==null?void 0:fe.type)==="first"&&((be=(ge=a.body)==null?void 0:ge[1])!=null&&be.below)&&(zs=a.body[1].below,ro=a.body[1].body)):zs&&zs.length>0&&(ro=a.body,(ze=(_e=a.body)==null?void 0:_e[0])!=null&&ze.above?(Es=a.body[0].above,ro=a.body[0].body):((xt=(rt=a.body)==null?void 0:rt[0])==null?void 0:xt.type)==="first"&&((In=(It=a.body)==null?void 0:It[1])!=null&&In.above)&&(Es=a.body[1].overscript,ro=a.body[1].body)),(a.svgAbove||Es)&&(a.svgBelow||zs)?(Vr+=`<munderover ${no(a.id,y)}>`,Vr+=(Br=Pa[a.svgBody])!=null?Br:Za(ro,y),Vr+=(kn=Pa[a.svgBelow])!=null?kn:Za(zs,y),Vr+=(sr=Pa[a.svgAbove])!=null?sr:Za(Es,y),Vr+="</munderover>"):a.svgAbove||Es?(Vr+=`<mover ${no(a.id,y)}>`+(($r=Pa[a.svgBody])!=null?$r:Za(ro,y)),Vr+=(pr=Pa[a.svgAbove])!=null?pr:Za(Es,y),Vr+="</mover>"):(a.svgBelow||zs)&&(Vr+=`<munder ${no(a.id,y)}>`+((bi=Pa[a.svgBody])!=null?bi:Za(ro,y)),Vr+=($i=Pa[a.svgBelow])!=null?$i:Za(zs,y),Vr+="</munder>");break;case"placeholder":Vr+="?";break;case"mord":{Vr=typeof a.value=="string"?a.value:Lo,Lo==="\\char"?Vr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Vr.length>0&&Vr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Vr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Vr=a.value.charAt(0):(console.error("Did not expect this"),Vr=""));const ul=/\d/.test(Vr)?"mn":"mi";Vr=`<${ul}${no(a.id,y)}>${qf(Vr)}</${ul}>`;break}case"mbin":case"mrel":case"minner":Vr=Vu(a,y);break;case"mpunct":Vr='<mo separator="true"'+no(a.id,y)+">"+Lo+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Vr="<mo"+no(a.id,y)+">",Vr+=Lo==="\\operatorname"?a.body:Lo||a.body,Vr+="</mo>");break;case"box":Vr='<menclose notation="box"',a.backgroundcolor&&(Vr+=' mathbackground="'+a.backgroundcolor+'"'),Vr+=no(a.id,y)+">"+Za(a.body,y)+"</menclose>";break;case"spacing":Vr+='<mspace width="'+((Ci=Ya[Lo])!=null?Ci:0)+'em"/>';break;case"enclose":Vr='<menclose notation="';for(const ul in a.notation)Object.prototype.hasOwnProperty.call(a.notation,ul)&&a.notation[ul]&&(Vr+=Fs+ul,Fs=" ");Vr+=no(a.id,y)+'">'+Za(a.body,y)+"</menclose>";break;case"prompt":Vr='<menclose notation="roundexbox""">'+Za(a.body,y)+"</menclose>";break;case"space":Vr+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Vr+=Vu(a,y);break;case"mclose":Vr+=Vu(a,y);break;case"macro":{const ul=a.command+Rc(a.macroArgs);ul&&(Vr+=`<mo ${no(a.id,y)}>${ul}</mo>`)}break;case"latexgroup":Vr+=Za(a.body,y);break;case"latex":Vr+="<mtext"+no(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":Vr+=Za(a.body,y);break;case"text":Vr+=`<mtext ${no(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${no(a.id,y)} displaystyle="true">${Za(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${no(a.id,y)} displaystyle="false">${Za(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Vr}var $c={"\\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"},Zh={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 Iv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function Rd(a){let y=0;if(Oe(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Dv(a){if(Oe(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function up(a){let y="";if(Oe(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Pv(a){return a?a.map(y=>y.value).join(""):""}function Ea(a,y){var b,E,ee,re,ae;function fe(_e){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(_e)?` <say-as interpret-as="character">${_e}</say-as>`:/[A-Z]/.test(_e)?`capital <say-as interpret-as="character">${_e.toLowerCase()}</say-as>`:_e:/[a-z]/.test(_e)?" '"+_e.toUpperCase()+"'":/[A-Z]/.test(_e)?" 'capital "+_e.toUpperCase()+"'":_e}function ge(_e){return"<emphasis>"+_e+"</emphasis>"}if(!y)return"";let be="";if(Oe(y)){let _e=!1,ze=!1;for(let rt=0;rt<y.length;rt++)y[rt].type!=="first"&&(y[rt].mode!=="text"&&(ze=!1),rt<y.length-2&&y[rt].type==="mopen"&&y[rt+2].type==="mclose"&&y[rt+1].type==="mord"?(be+=" of ",be+=ge(Ea(a,y[rt+1])),rt+=2):y[rt].mode==="text"?ze?be+=(b=y[rt].value)!=null?b:" ":(ze=!0,be+=Ea("text",y[rt])):y[rt].isDigit()?_e?be+=y[rt].asDigit():(_e=!0,be+=Ea(a,y[rt])):(_e=!1,be+=Ea(a,y[rt])))}else if(y.mode==="text")y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>'),be+=y.value;else{y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>');let _e="",ze="",rt="",xt=!1;const{command:It}=y;switch(It){case"\\vec":return"vector "+Ea(a,y.body);case"\\acute":return Ea(a,y.body)+" acute";case"\\grave":return Ea(a,y.body)+" grave";case"\\dot":return"dot over"+Ea(a,y.body);case"\\ddot":return"double dot over"+Ea(a,y.body);case"\\mathring":return"ring over"+Ea(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+Ea(a,y.body);case"\\bar":return Ea(a,y.body)+" bar";case"\\breve":return Ea(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Ea(a,y.body);case"\\hat":case"\\widehat":return"hat over"+Ea(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Ea(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+Ea(a,y.body)}switch(y.type){case"prompt":const In=y.body.length>1?'start input . <break time="500ms"/> '+Ea(a,y.body)+'. <break time="500ms"/> end input':"blank";be+=' <break time="300ms"/> '+In+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const Br=y.array,kn=y.environmentName;if(Object.keys(Zh).includes(kn)){be+=` begin ${Zh[kn]} `;for(let pr=0;pr<Br.length;pr++){pr>0&&(be+=","),be+=` row ${pr+1} `;for(let bi=0;bi<Br[pr].length;bi++)bi>0&&(be+=","),be+=` column ${bi+1}: `,be+=Ea("math",Br[pr][bi])}be+=` end ${Zh[kn]} `}break;case"group":It==="\\ne"?be+=" not equal ":(It==="\\not"&&(be+=" not "),be+=Ea("math",y.body));break;case"root":be+=Ea("math",y.body);break;case"genfrac":if(_e=Ea("math",y.above),ze=Ea("math",y.below),Rd(y.above)&&Rd(y.below)){const bi={"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 "}[up(y.above)+"/"+up(y.below)];bi?be=bi:be+=_e+" over "+ze}else be+=' the fraction <break time="150ms"/>'+_e+' over <break time="150ms"/>'+ze+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(rt=Ea("math",y.body),y.hasEmptyBranch("above"))be+=Rd(y.body)?" the square root of "+rt+" , ":' the square root of <break time="200ms"/>'+rt+'. <break time="200ms"/> End square root';else{let pr=Ea("math",y.above);pr=pr.trim();const bi=pr.replace(/<mark([^/]*)\/>/g,"");bi==="3"?be+=' the cube root of <break time="200ms"/>'+rt+'. <break time="200ms"/> End cube root':bi==="n"?be+=' the nth root of <break time="200ms"/>'+rt+'. <break time="200ms"/> End root':be+=' the root with index: <break time="200ms"/>'+pr+', of <break time="200ms"/>'+rt+'. <break time="200ms"/> End root'}break;case"leftright":{const pr=y;be+=(ee=pr.leftDelim?$c[pr.leftDelim]:void 0)!=null?ee:pr.leftDelim,be+=Ea("math",y.body),be+=(re=pr.rightDelim?$c[pr.rightDelim]:void 0)!=null?re:pr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const sr=It.replace(/^\\/g,""),$r=yt()[sr];$r&&($r!=null&&$r.expand?be+=Ea("math",y.body):be+=`${sr} `);break;case"placeholder":be+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(It==="\\mathbin"||It==="\\mathrel"||It==="\\mathopen"||It==="\\mathclose"||It==="\\mathpunct"||It==="\\mathord"||It==="\\mathinner"){be=Ea(a,y.body);break}let pr=y.isDigit()?y.asDigit():y.value,bi=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(bi=y.value,pr=bi),a==="text")be+=pr;else{if(y.type==="mbin"&&(be+='<break time="150ms"/>'),pr){const $i=$c[pr]||(bi?$c[bi.trim()]:"");if($i)be+=" "+$i;else{const Ci=bi?Iv(bi.trim()):"";be+=Ci||fe(pr)}}else be+=Ea("math",y.body);y.type==="mbin"&&(be+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const pr=y.command;if(pr==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let bi=Ea("math",y.superscript);bi=bi.trim();let $i=Ea("math",y.subscript);$i=$i.trim(),be+=' the summation from <break time="200ms"/>'+$i+'<break time="200ms"/> to <break time="200ms"/>'+bi+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the summation of";else{let bi=Ea("math",y.subscript);bi=bi.trim(),be+=' the summation from <break time="200ms"/>'+bi+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(pr==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let bi=Ea("math",y.superscript);bi=bi.trim();let $i=Ea("math",y.subscript);$i=$i.trim(),be+=' the product from <break time="200ms"/>'+$i+'<break time="200ms"/> to <break time="200ms"/>'+bi+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the product of ";else{let bi=Ea("math",y.subscript);bi=bi.trim(),be+=' the product from <break time="200ms"/>'+bi+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(pr==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let bi=Ea("math",y.superscript);bi=bi.trim();let $i=Ea("math",y.subscript);$i=$i.trim(),be+=' the integral from <break time="200ms"/>'+ge($i)+'<break time="200ms"/> to <break time="200ms"/>'+ge(bi)+' <break time="200ms"/> of ',xt=!0}else be+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const bi=(ae=$c[y.value])!=null?ae:y.command?$c[y.command]:void 0;be+=bi||" "+y.value}else y.command&&(y.command==="\\mathop"?be+=Ea("math",y.body):y.command==="\\operatorname"?be+=Pv(y.body):be+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":rt=Ea("math",y.body),be+=" crossed out "+rt+". End crossed out.";break;case"space":case"spacing":break}if(!xt&&!y.hasEmptyBranch("superscript")){let In=Ea(a,y.superscript);In=In.trim();const Br=In.replace(/<[^>]*>/g,"");if(Rd(y.superscript)){if(a==="math"){const kn=Dv(y.superscript);kn&&(be+='<mark name="'+kn+'"/>')}Br==="\u2032"?be+=" prime ":Br==="2"?be+=" squared ":Br==="3"?be+=" cubed ":Number.isNaN(Number.parseInt(Br))?be+=" to the "+In+"; ":be+=' to the <say-as interpret-as="ordinal">'+Br+"</say-as> power; "}else Number.isNaN(Number.parseInt(Br))?be+=" raised to the "+In+"; ":be+=' raised to the <say-as interpret-as="ordinal">'+Br+"</say-as> power; "}if(!xt&&!y.hasEmptyBranch("subscript")){let In=Ea("math",y.subscript);In=In.trim(),be+=Rd(y.subscript)?" sub "+In:" subscript "+In+". End subscript. "}}return be}function Fc(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Za(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=me(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=me(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=me(we({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const re=(b=window.SRE)!=null?b:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&re.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let ae="";try{ae=re.toSpeech(ee)}catch(fe){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",fe)}return ae}return""}let E=Ea("math",a);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let ee="";window.MathfieldElement.speechEngineRate&&(ee='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),E='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+ee+"<p><s>"+E+"</s></p>"+(ee?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&Ce()==="macos"?E=E.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,""):E=E.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return E}var $d={"\\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 Bv(a){let y="";for(const b of a){const E=y[y.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(b)&&(y+=" "),y+=b}return y}function ko(a){var y,b,E,ee,re,ae,fe,ge,be,_e,ze,rt,xt;if(!a)return"";if(Oe(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(ko).join("");if(a[0].mode==="text"){let $r=0,pr="";for(;((y=a[$r])==null?void 0:y.mode)==="text";)pr+=a[$r].body?ko(a[$r].body):a[$r].value,$r++;return`"${pr}" ${ko(a.slice($r))}`}let kn=0;const sr=[];for(;a[kn]&&a[kn].mode==="math";){let $r="";for(;a[kn]&&a[kn].type==="mord"&&/\d/.test(a[kn].value);)$r+=a[kn++].value;$r?sr.push($r):sr.push(ko(a[kn++]))}return sr.push(ko(a.slice(kn))),Bv(sr)}if(a.mode==="text")return`"${a.value}"`;let It="";const{command:In}=a;let Br;if(In==="\\placeholder")return`(${ko(a.body)})`;switch(a.type){case"accent":const kn={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[In];It=`${kn!=null?kn:""} ${ko(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(Ci=>Ci.value).join("");case"group":case"root":It=(b=$d[In])!=null?b:ko(a.body);break;case"genfrac":{const Ci=a;(Ci.leftDelim||Ci.rightDelim)&&(It=Ci.leftDelim==="."||!Ci.leftDelim?"{:":Ci.leftDelim),Ci.hasBarLine?(It+="(",It+=ko(Ci.above),It+=")/(",It+=ko(Ci.below),It+=")"):(It+="("+ko(Ci.above)+"),",It+="("+ko(Ci.below)+")"),(Ci.leftDelim||Ci.rightDelim)&&(It+=Ci.rightDelim==="."||!Ci.rightDelim?"{:":Ci.rightDelim)}break;case"surd":It+=a.hasEmptyBranch("above")?"sqrt("+ko(a.body)+")":"root("+ko(a.above)+")("+ko(a.body)+")";break;case"latex":It=a.value;break;case"leftright":{const Ci=a,Pa=Ci.leftDelim;It+=Pa==="."||!Pa?"{:":Pa,It+=ko(Ci.body);const Ya=Ci.matchingRightDelim();It+=Ya==="."||!Ya?":}":Ya}break;case"sizeddelim":case"delim":It=a.value;break;case"overlap":break;case"overunder":break;case"mord":It=(ee=(E=$d[In])!=null?E:In)!=null?ee:typeof a.value=="string"?a.value:"",It.startsWith("\\")&&(It+=" "),Br=In?In.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Br?It=String.fromCodePoint(Number.parseInt("0x"+Br[1])):It.length>0&&It.startsWith("\\")&&(It=typeof a.value=="string"?a.value.charAt(0):a.command),It=Ov(It,a.style);break;case"mbin":case"mrel":case"minner":It=(ae=(re=$d[In])!=null?re:Fd[In])!=null?ae:a.value;break;case"mopen":case"mclose":It=a.value;break;case"mpunct":It=(fe=Fd[In])!=null?fe:In;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Fd[In]?It=Fd[In]:It=In==="\\operatorname"?ko(a.body):(ge=a.value)!=null?ge:In,It+=" ");break;case"array":const sr=a.array,$r=a.environmentName,pr=(be={bmatrix:["[","]"],"bmatrix*":["[","]"]}[$r])!=null?be:["(",")"],bi=[];for(const Ci of sr){const Pa=[];for(const Ya of Ci)Pa.push(pr[0]+ko(Ya)+pr[1]);bi.push(Pa.join(","))}const $i=(_e={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[$r])!=null?_e:["(",")"];It=$i[0]+bi.join(",")+$i[1];break;case"box":break;case"spacing":It=(ze=$d[In])!=null?ze:" ";break;case"enclose":It="("+ko(a.body)+")";break;case"space":It=" ";break;case"subsup":It="";break;case"macro":It=(xt=(rt=$d[In])!=null?rt:Fd[In])!=null?xt:ko(a.body);break}if(!a.hasEmptyBranch("subscript")){It+="_";const kn=ko(a.subscript);It+=kn.length!==1?`(${kn})`:kn}if(!a.hasEmptyBranch("superscript")){It+="^";const kn=ko(a.superscript);It+=kn.length!==1?`(${kn})`:kn}return It}function Ov(a,y){if(!y)return a;let b=a;return y.variant==="double-struck"&&(b=`bbb "${b}"`),y.variant==="script"&&(b=`cc "${b}"`),y.variant==="fraktur"&&(b=`fr "${b}"`),y.variant==="sans-serif"&&(b=`sf "${b}"`),y.variant==="monospace"&&(b=`tt "${b}"`),y.variantStyle==="bold"&&(b=`bb "${b}"`),y.color?`color({${y.color}})(${b})`:b}function qo(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new La({from:me(we({},bc()),{renderPlaceholder:()=>new Nr(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),ae=new Jn({mode:"math",type:"root",body:Xo(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return ae?(gc(Cd(ae,ee)),vc(ae,{classes:"ML__latex"}).toMarkup()):""}function k1(a){return t0(a,{context:bc()})}function Nv(a,y={}){return Za(Xo(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Rv(a){const y=Xo(a,{parseMode:"math",mathstyle:"displaystyle"});return Fc(y)}var Yf;function $v(a){var y,b;if(!Yf){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?Yf=new E: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(b=Yf==null?void 0:Yf.box(a).latex)!=null?b:""}function L1(a,y="math"){return ko(new Jn({type:"root",body:Xo(a,{parseMode:y})}))}function A1(a){return Bu(a,{format:"ascii-math"})[1]}function jh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Kv(a):"a"in a?cp(a):a}function zc(a){return a<0?0:a>255?255:Math.round(a)}function Fv(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&typeof y.a=="undefined"&&(y.a=1),y}function Vh(a){const[y,b,E]=[a.L,a.C,a.H],ee=E*Math.PI/180,re={L:y,a:b*Math.cos(ee),b:b*Math.sin(ee)};return a.alpha!==void 0&&(re.alpha=a.alpha),re}function zv(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.sqrt(b*b+E*E),ae=Math.atan2(E,b)*180/Math.PI,fe={L:y,C:ee,H:ae};return a.alpha!==void 0&&(fe.alpha=a.alpha),fe}function Uh(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),re=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),ae=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),fe=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,ge=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,be=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,_e=ze=>{const rt=Math.abs(ze);return rt<=.0031308?ze*12.92:(Math.sign(ze)||1)*(1.055*Math.pow(rt,1/2.4)-.055)};return[_e(fe),_e(ge),_e(be)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xh(a,y){let[b,E,ee]=a;return b=zc(b*255),E=zc(E*255),ee=zc(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function cp(a){let[y,b,E]=Uh(a);if(Gh([y,b,E]))return Xh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=Uh(Vh(ee)),!Gh([y,b,E]))return Xh([y,b,E],a.alpha);let re=0,ae=a.L,fe=(re+ae)/2;ee.C=fe;const ge=.36/Math.pow(2,12);for(;ae-re>ge;)fe=(re+ae)/2,ee.C=fe,[y,b,E]=Uh(Vh(ee)),Gh([y,b,E])?re=fe:ae=fe;return Xh([y,b,E],a.alpha)}function Kv(a){return cp(Vh(a))}function dp(a,y){const b=jh(a),E=jh(y),ee=.56,re=.57,ae=.62,fe=.65,ge=.022,be=1.414,_e=.1,ze=5e-4,rt=1.14,xt=.027,It=1.14,In=.027;function Br(Ci){return Ci>=ge?Ci:Ci+Dl(ge-Ci,be)}function kn(Ci){return(Ci<0?-1:1)*Math.pow(Math.abs(Ci),2.4)}const sr=Br(kn(E.r/255)*.2126729+kn(E.g/255)*.7151522+kn(E.b/255)*.072175),$r=Br(kn(b.r/255)*.2126729+kn(b.g/255)*.7151522+kn(b.b/255)*.072175);let pr,bi,$i;return Math.abs($r-sr)<ze?bi=0:$r>sr?(pr=Dl($r,ee)-Dl(sr,re),bi=pr*rt):(pr=Dl($r,fe)-Dl(sr,ae),bi=pr*It),Math.abs(bi)<_e?$i=0:bi>0?$i=bi-In:$i=bi+xt,$i*100}function fp(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=dp(a,b),ee=dp(a,y);return Math.abs(E)>Math.abs(ee)?b:y}function Hv(a){const y=jh(a);let b=((1<<24)+(zc(y.r)<<16)+(zc(y.g)<<8)+zc(y.b)).toString(16).slice(1);return y.alpha!==void 0&&y.alpha<1&&(b+=("00"+Math.round(y.alpha*255).toString(16)).slice(-2)),b[0]===b[1]&&b[2]===b[3]&&b[4]===b[5]&&b[6]===b[7]&&(b=b[0]+b[2]+b[4]+(y.alpha!==void 0&&y.alpha<1?b[6]:"")),"#"+b}function mo(a){const y=hp(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function hp(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=hp(a);if(b.length!==1)return!1;const E=ph[y];return E?!!E.test(b[0].value):!1}function Zv(a,y){return mo(a).length>0}function jv(a){return[qh(a,"double-struck","mathbb","tooltip.blackboard"),qh(a,"fraktur","mathfrak","tooltip.fraktur"),qh(a,"calligraphic","mathcal","tooltip.caligraphic"),Yh(a,"up","mathrm","tooltip.roman-upright"),Yh(a,"bold","mathbf","tooltip.bold"),Yh(a,"italic","mathit","tooltip.italic")]}function Vv(a){return[{label:()=>qo(`\\vec{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overrightarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overleftarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>qo(`\\dot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>qo(`\\ddot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>qo(`\\bar{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overgroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>qo(`\\underline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>qo(`\\undergroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>qo(`\\underbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Uv(a){return[{label:()=>qo(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>qo(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>qo(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gv(a){const y=[];for(const b of Object.keys(Ve))y.push({class:(Hv(fp(Ve[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ve[b]} "></span>`,ariaLabel:()=>{var E;return(E=ut(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}function Xv(a){const y=[];for(const b of Object.keys(Xe))y.push({class:(fp(Xe[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Xe[b]} "></span>`,ariaLabel:()=>{var E;return(E=ut(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}var qv=class extends ep{constructor(a,y,b,E){super(a,y),this.row=b,this.col=E}set active(a){const y=this.parentMenu.children;if(a)for(const b of y)b.element.classList.toggle("active",b.row<=this.row&&b.col<=this.col);else for(const b of y)b.element.classList.remove("active")}};function Yv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new qv(ee,re,b,E),label:"\u2610",tooltip:()=>ut("tooltip.row-by-col",b,E),data:{row:b,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(b).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return y}function Jv(a){return[{label:()=>ut("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Uu(a)},{label:()=>ut("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Uu(a)},{label:()=>ut("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Uu(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>ut("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Uu(a)},{type:"divider"},{label:()=>ut("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Uu(a)},{label:()=>ut("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Uu(a)},{type:"divider"},{label:()=>ut("menu.borders"),visible:()=>(Qv(a)||Uu(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>zd(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>zd(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>zd(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>zd(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>zd(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>ut("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Yv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>ut("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>ut("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Ac(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>ut("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Ac(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>ut("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>ut("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:jv(a),submenuClass:"variant-submenu"},{label:()=>ut("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ut("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ut("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Vv(a),submenuClass:"variant-submenu"},{label:()=>ut("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&mo(a).length>0,submenu:Uv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>ut("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const y=t1(a);if(!y){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${y}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(y,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>ut("menu.simplify"),id:"ce-simplify",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var y,b;if(a.model.selectionIsCollapsed){const E=(y=a.expression)==null?void 0:y.simplify();if(a.model.position=a.model.lastOffset,!E){a.model.announce("plonk");return}a.insert(`=${E.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection)).simplify();if(!E){a.model.announce("plonk");return}a.insert(E.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var y;if(window.MathfieldElement.computeEngine===null)return"";const b=(y=a.expression)==null?void 0:y.unknowns[0];return b?ut("menu.solve-for",qo(b)):ut("menu.solve")},id:"ce-solve",visible:()=>{var y;return a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((y=a.expression)==null?void 0:y.unknowns.length)===1&&a.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var y;const b=a.expression,E=b==null?void 0:b.unknowns[0],ee=(y=b.solve(E))==null?void 0:y.map(re=>{var ae;return(ae=re.simplify().latex)!=null?ae:""});if(!ee){a.model.announce("plonk");return}a.insert(`${E}=${ee.length===1?ee[0]:"\\left\\lbrace"+(ee==null?void 0:ee.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>ut("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>ut("menu.copy"),id:"copy",submenu:[{label:()=>ut("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>aa.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>ut("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>aa.copyToClipboard(a,"ascii-math")},{label:()=>ut("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>aa.copyToClipboard(a,"math-ml")}]},{label:()=>ut("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>ut("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Uu(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qv(a){return a.model.at(a.model.position).type==="array"}function e1(a){var y;const b=(y=a.model.parentEnvironment)==null?void 0:y.array;return b?[b.length,b.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function zd(a,y){Ef(a),a.flushInlineShortcutBuffer(),D0(a.model,y),Eo(a)}function t1(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function qh(a,y,b,E){return{label:()=>qo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=ut(E))!=null?ee:E},visible:()=>Wv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Yh(a,y,b,E){return{label:()=>qo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=ut(E))!=null?ee:E},visible:()=>Zv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Kc(a,y){return a+Fc(y)}Ls({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,ee;b=b!=null?b:{withHighlighting:!1};const{model:re}=a;function ae(_e){let ze=null;switch(_e){case"all":ze=re.root;break;case"selection":ze=re.getAtoms(re.selection);break;case"left":{ze=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{ze=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":ze=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:rt}=re.at(re.position);rt!=null&&rt.parent?ze=rt:ze=re.root;break}default:ze=re.root}return ze}function fe(_e){let ze="";switch(_e){case"all":console.log("Internal failure: speak all failed");break;case"selection":ze="no selection";break;case"left":ze="at start";break;case"right":ze="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":ze="no parent";break;default:console.log('unknown speak_ param value: "'+_e+'"');break}return ze}const ge=ae(y);if(ge===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,fe(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const be=Fc(ge);return lt()&&b.withHighlighting?(mu().readAloudMathfield=a,$u(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,be)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(be),!1}function r1(a){var y,b;if(!lt()){console.log("Speak:",a);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const E=new SpeechSynthesisUtterance(a);window.speechSynthesis.speak(E)}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 E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"mp3",VoiceId:(y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna")?"neural":"standard",Text:a,TextType:"ssml"};E.synthesizeSpeech(ee,(re,ae)=>{if(re)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);else if(ae!=null&&ae.AudioStream){const fe=new Uint8Array(ae.AudioStream),ge=new Blob([fe.buffer],{type:"audio/mpeg"}),be=URL.createObjectURL(ge);new Audio(be).play().catch(ze=>console.log(ze))}else console.log("polly.synthesizeSpeech():",ae)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function pp(a){var y;let b;if(a.parent.type==="prompt")a.parentBranch==="body"&&(b="prompt");else if(a.parentBranch==="body")b=a.type&&(y={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?y:"parent";else if(a.parent.type==="genfrac"){if(a.parentBranch==="above")return"numerator";if(a.parentBranch==="below")return"denominator"}else a.parent.type==="surd"?a.parentBranch==="above"&&(b="index"):a.parentBranch==="superscript"?b="superscript":a.parentBranch==="subscript"&&(b="subscript");return b||console.log("unknown relationship"),b!=null?b:"parent"}function i1(a,y,b,E){let ee="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ee=Kc("deleted: ",E);else if(y==="focus"||y.includes("move"))ee=a1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(y==="replacement")ee=Kc("",a.model.at(a.model.position));else if(y==="line"){const re=Kc("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Kc(y+" ",E):y;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=b.parent;const re=a.at(a.position).parent;for(;ee!==a.root&&ee!==re;)E+=`out of ${pp(ee)};`,ee=ee.parent;return E}function o1(a){if(!a.selectionIsCollapsed)return Kc("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=pp(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Kc("",b),y}var s1=class{constructor(a,y,b){this.mathfield=a,this.mode=y,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=b}dispose(){this.mathfield=void 0}getState(){const a={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(a.direction=this.selection.direction),{content:this.root.toJson(),selection:a,mode:this.mode}}setState(a,y){var b;const E=this.silenceNotifications;this.silenceNotifications=(b=y==null?void 0:y.silenceNotifications)!=null?b:!0;let ee={};if((y==null?void 0:y.type)==="undo"&&(ee={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=du(a.content),this.selection=a.selection,this.silenceNotifications=re,this.contentDidChange(ee)}this.silenceNotifications=E}get atoms(){return this.root.children}get selection(){return this._selection}set selection(a){this.setSelection(a)}setSelection(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var b,E,ee;const re=this.normalizeSelection(a,y);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const _e=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(_e))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(_e-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(_e-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(_e+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(_e+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=_e,this._position=_e,this._selection=re;return}const ae=Uo(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const fe=this.at(ae[0]+1),ge=this.at(ae[1]),be=Jn.commonAncestor(fe,ge);(be==null?void 0:be.type)==="array"&&fe.parent===be&&ge.parent===be?this._selection={ranges:[ae],direction:re.direction}:this._selection={ranges:[ae],direction:re.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(a){var y;const b=this.at(a);(b==null?void 0:b.type)==="placeholder"?this.setSelection(a-1,a):((y=b==null?void 0:b.rightSibling)==null?void 0:y.type)==="placeholder"?this.setSelection(a,a+1):this.position=a,b instanceof ns&&b.isSuggestion&&(b.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(a){this.setSelection(a,a)}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(a="forward"){return this._anchor===this._position?!1:(a==="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(a){return this.atoms[a]}offsetOf(a){return this.atoms.indexOf(a)}getSiblingsRange(a){const y=this.at(a),{parent:b}=y;if(!b)return[0,this.lastOffset];const E=y.parent.branch(y.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,y){const b=this.at(a).branch(y);return[this.offsetOf(b[0]),this.offsetOf(b[b.length-1])]}getAtoms(a,y,b){let E=b!=null?b:{};if(Sc(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((be,_e)=>[...be,...this.getAtoms(_e,E)],[]);a=a.ranges[0]}let ee,re;if(gl(a)){if(ee=a,!gl(y))return[];re=y}else[ee,re]=a,E=y!=null?y:{};if(!Number.isFinite(ee))return[];E.includeChildren===void 0&&(E.includeChildren=!1),ee<0&&(ee=this.lastOffset-ee+1),re<0&&(re=this.lastOffset-re+1);const ae=Math.min(ee,re)+1,fe=Math.max(ee,re);if(!E.includeChildren&&ae===1&&fe===this.lastOffset)return[this.root];let ge=[];for(let be=ae;be<=fe;be++){const _e=this.atoms[be];mp(this,_e,ae,fe)&&ge.push(_e)}return E.includeChildren||(ge=ge.filter(be=>{let _e=!1,{parent:ze}=be;for(;ze&&!_e;)_e=mp(this,ze,ae,fe),ze=ze.parent;return!_e})),ge}getAllAtoms(a=0){const y=[],b=this.lastOffset;for(let E=a;E<=b;E++)y.push(this.atoms[E]);for(let E=0;E<a;E++)y.push(this.atoms[E]);return y}findAtom(a,y=0,b="forward"){let E;const ee=this.lastOffset;if(b==="forward"){for(let re=y;re<=ee;re++)if(E=this.atoms[re],a(E))return E;for(let re=0;re<y;re++)if(E=this.atoms[re],a(E))return E;return}for(let re=y;re>=0;re--)if(E=this.atoms[re],a(E))return E;for(let re=ee;re>y;re--)if(E=this.atoms[re],a(E))return E}extractAtoms(a){let y=this.getAtoms(a);if(y.length===1&&!y[0].parent)if(y[0].type==="root")y=[...y[0].body],y.shift();else return y=this.root.cells.flat(),this.root=new Jn({type:"root",body:[]}),y;for(const b of y)b.parent.removeChild(b);return y}deleteAtoms(a){this.extractAtoms(a),this.position=a[0]}atomToString(a,y){const b=y!=null?y:"latex";if(b.startsWith("latex"))return Jn.serialize([a],{expandMacro:b==="latex-expanded",skipStyles:b==="latex-unstyled",skipPlaceholders:b==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(b==="math-ml")return Za(a);if(b==="spoken")return Fc(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Fc(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=Fc(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?ko(a):(console.error(`MathLive 0.98.5: Unexpected format "${b}`),"")}getValue(a,y,b){if(a===void 0)return this.atomToString(this.root,"latex");if(typeof a=="string"&&a!=="math-json")return this.atomToString(this.root,a);let E,ee;if(gl(a)&&gl(y)?(E=[this.normalizeRange([a,y])],ee=b):xc(a)?(E=[this.normalizeRange(a)],ee=y):Sc(a)?(E=a.ranges,ee=y):(E=[this.normalizeRange([0,-1])],ee=a),ee!=null||(ee="latex"),ee==="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 re=this.getValue({ranges:E},"latex-unstyled");try{const ae=window.MathfieldElement.computeEngine.parse(re);return JSON.stringify(ae.json)}catch(ae){return JSON.stringify(["Error",`'${ae.toString()}'`])}}if(ee.startsWith("latex")){const re={expandMacro:ee==="latex-expanded",skipStyles:ee==="latex-unstyled",skipPlaceholders:ee==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ya(E.map(ae=>Jn.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const b=this.normalizeRange([a,y]);let[E,ee]=b,{parent:re}=this.at(ee);if(re&&(re.type==="genfrac"||re.type==="subsup"))for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&Jh(this,re,[E,ee]);)E=this.offsetOf(re.leftSibling),re=re.parent;if(re=this.at(ee).parent,(re==null?void 0:re.type)==="genfrac")for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),console.assert(ee>=0),re=re.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,y,b=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:y,atoms:b},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;y();const fe=this.root.changeCounter!==ae,ge=E!==this._anchor||ee!==this._position||Pu(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&fe&&this.contentDidChange({inputType:a.type}),a.selection&&ge&&this.selectionDidChange(),fe||ge}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[y,b]=a;return y=this.normalizeOffset(y),b=this.normalizeOffset(b),y<b?[y,b]:[b,y]}normalizeSelection(a,y){var b;let E;if(gl(a)){const ee=this.normalizeOffset(a);if(gl(y)){const re=this.normalizeOffset(y);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(xc(a)){const ee=this.normalizeOffset(a[0]),re=this.normalizeOffset(a[1]);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else Sc(a)&&(E={ranges:a.ranges.map(ee=>this.normalizeRange(ee)),direction:(b=a.direction)!=null?b:"none"});return console.assert(E!==void 0),E}get parentEnvironment(){let a=this.at(this.position).parent;if(a){for(;a.parent&&a.type!=="array";)a=a.parent;if(a.type==="array")return a}}get cell(){var a;let y=this.at(this.position);if(y){for(;y&&((a=y.parent)==null?void 0:a.type)!=="array";)y=y.parent;if(!(!(y!=null&&y.parent)||y.parent.type!=="array"))return y.parentBranch}}contentWillChange(a={}){if(this.silenceNotifications||!this.mathfield)return!0;const y=this.silenceNotifications;this.silenceNotifications=!0;const b=this.mathfield.onContentWillChange(a);return this.silenceNotifications=y,b}contentDidChange(a){var y;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",me(we({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",bubbles:!0,composed:!0}))),this.silenceNotifications=b}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,y,b,E){const ee=a.offsetOf(y);if(ee<b||ee>E)return!1;if(!y.hasChildren)return!0;const re=a.offsetOf(y.firstChild);if(re>=b&&re<=E){const ae=a.offsetOf(y.lastChild);if(ae>=b&&ae<=E)return!0}return!1}function Jh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ee]=b,re=a.offsetOf(y.firstChild),ae=a.offsetOf(y.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Kd(a,y,b,E){var ee,re,ae,fe,ge,be;const _e=b.parent;if(_e&&b instanceof Wa){const ze=!E&&y==="forward"||E==="body"&&y==="backward";let rt=ze?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return ze?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(_e.addChildrenAfter(b.removeBranch("body"),b),_e.removeChild(b),rt--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(_e.addChildrenAfter(b.removeBranch("body"),b),_e.removeChild(b),rt--),a.position=rt,!0}if(_e&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const ze=b.leftSibling;b.hasChildren&&_e.addChildrenAfter(b.removeBranch("body"),b),_e.removeChild(b),a.position=a.offsetOf(ze)}else y==="forward"&&E==="body"?a.position=a.offsetOf(b):!E&&y==="backward"?b.hasChildren?a.position=a.offsetOf(b.lastChild):(a.position=Math.max(0,a.offsetOf(b)-1),_e.removeChild(b)):E==="above"&&(b.hasEmptyBranch("above")&&b.removeBranch("above"),y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b.body[0]));return!0}if(_e&&(b.type==="box"||b.type==="enclose")){const ze=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return _e.addChildrenAfter(b.removeBranch("body"),b),_e.removeChild(b),a.position=a.offsetOf(ze),!0}if(b.type==="genfrac"||b.type==="overunder"){if(!E)return b.type==="overunder"&&b.hasEmptyBranch("body")||b.type==="genfrac"&&b.hasEmptyBranch("below")&&b.hasEmptyBranch("above")?!1:(a.position=a.offsetOf(y==="forward"?b.firstChild:b.lastChild),!0);const ze=Hd.fractionNavigationOrder==="numerator-denominator"?"above":"below",rt=ze==="above"?"below":"above";if(_e&&(y==="forward"&&E===ze||y==="backward"&&E===rt)){const xt=b.removeBranch(ze),It=b.removeBranch(rt);return _e.addChildrenAfter([...xt,...It],b),_e.removeChild(b),a.position=a.offsetOf(xt.length>0?xt[xt.length-1]:It[0]),!0}return y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b),!0}if(b.isExtensibleSymbol||b.type==="subsup"){if(!E&&y==="forward")return!1;if(!E){if(b.subscript||b.superscript){const ze=y==="forward"?(ae=(ee=b.superscript)==null?void 0:ee[0])!=null?ae:(re=b.subscript)==null?void 0:re[0]:(be=(fe=b.subscript)==null?void 0:fe[0].lastSibling)!=null?be:(ge=b.superscript)==null?void 0:ge[0].lastSibling;return ze&&(a.position=a.offsetOf(ze)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const ze=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=ze,!0}if(E==="superscript")if(y==="backward"){const ze=a.offsetOf(b.firstChild)-1;console.assert(ze>=0),a.position=ze}else b.subscript?a.position=a.offsetOf(b.subscript[0]):a.position=a.offsetOf(b);else E==="subscript"&&(y==="backward"&&b.superscript?a.position=a.offsetOf(b.superscript[0].lastSibling):y==="backward"?a.position=a.offsetOf(b.firstChild)-1:a.position=a.offsetOf(b));if(E&&b.hasEmptyBranch(E)&&(b.removeBranch(E),b.type==="subsup"&&!b.subscript&&!b.superscript)){const ze=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=ze}return!0}if((_e==null?void 0:_e.type)==="genfrac"&&!E&&b.type!=="first"){let ze=a.offsetOf(b.leftSibling);return _e.removeChild(b),_e.hasEmptyBranch("above")&&_e.hasEmptyBranch("below")?(ze=a.offsetOf(_e.leftSibling),_e.parent.removeChild(_e),a.announce("delete",void 0,[_e]),a.position=ze,!0):(a.announce("delete",void 0,[b]),a.position=ze,!0)}if(y==="backward"&&((_e==null?void 0:_e.command)==="\\ln"||(_e==null?void 0:_e.command)==="\\log")&&b.parentBranch!=="body"){const ze=a.offsetOf(_e.leftSibling);return _e.parent.removeChild(_e),a.announce("delete",void 0,[_e]),a.position=ze,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let y=a.at(a.position);if(!(y&&Kd(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Kd(a,"backward",y.parent,y.parentBranch))return;y=null}if(!y){a.announce("plonk");return}a.position=a.offsetOf(y.leftSibling),y.parent.removeChild(y),a.announce("delete",void 0,[y])}}):_l(a,Uo(a.selection),"deleteContentBackward")}function u1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var y,b;let E=a.at(a.position).rightSibling;if(E&&Kd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return;E=void 0}if(a.position===a.lastOffset||!E){a.announce("plonk");return}E.parent.removeChild(E);let ee=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):_l(a,Uo(a.selection),"deleteContentForward")}function _l(a,y,b){const E=a.getAtoms(y);if(E.length>0&&E[0].parent){let ee=E[0].parent.firstChild;ee.type==="first"&&(ee=ee.rightSibling);const re=E[E.length-1].parent.lastChild;let ae=E[0];ae.type==="first"&&(ae=ae.rightSibling);const fe=E[E.length-1];if(ae===ee&&fe===re){const ge=E[0].parent;ge.parent&&ge.type!=="prompt"&&(y=[a.offsetOf(ge.leftSibling),a.offsetOf(ge)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const ge=E[0].parent,be=E[0].parentBranch==="below"?"above":"below",_e=a.offsetOf(ge.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var ze,rt;const xt=ge.removeBranch(be);if(xt.length===1&&xt[0].type==="placeholder")(rt=ge.parent)==null||rt.removeChild(ge),a.position=Math.max(0,_e);else{const It=ge.parent.addChildrenAfter(xt,ge);(ze=ge.parent)==null||ze.removeChild(ge),a.position=a.offsetOf(It)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ls({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&_l(a,[0,-1],"deleteContent"),deleteForward:a=>u1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&_l(a,[a.anchor,kh(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&_l(a,[a.anchor,kh(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&_l(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&_l(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&_l(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&_l(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var c1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${ut("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>`,d1=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${ut("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>`,f1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=we(me(we({},Of()),{macros:yt(),registers:ou()}),Bf(y)),this.eventController=new AbortController;const re=this.eventController.signal;y.eventSink&&(this.host=y.eventSink),this.element=a,a.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 ae=(E=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";ae=ae.trim();const fe=A0(this.options),ge=new Jn({type:"root",mode:fe,body:Xo(ae,{context:this.context})});this.model=new s1(this,fe,ge),this.undoManager=new Rg(this.model);const be=[];if(be.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>"),be.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),be.push("<span part=content class=ML__content>"),be.push(S0(this)),be.push("</span>"),window.mathVirtualKeyboard&&(be.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">`),be.push(c1),be.push("</div>")),be.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),be.push(d1),be.push("</div>"),be.push("</span>"),be.push("<span class=ML__sr-only>"),be.push("<span role=status aria-live=assertive aria-atomic=true></span>"),be.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(be.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=qe.subscribe(()=>qe.update(this.element)),qe.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",ze=>ze.stopImmediatePropagation(),{capture:!1,signal:re}),this.field.addEventListener("wheel",this,{passive:!1,signal:re}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:re}):this.field.addEventListener("mousedown",this,{signal:re}),(ee=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||ee.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(El(this)))},{signal:re}),this._menu=new wv(Jv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const _e=this.element.querySelector("[part=menu-toggle]");_e==null||_e.addEventListener("pointerdown",ze=>{if(ze.currentTarget!==_e||this._menu.state!=="closed")return;this.element.classList.add("tracking");const rt=_e.getBoundingClientRect();this._menu.modifiers=Ru(ze),this._menu.show({target:_e,location:{x:rt.left,y:rt.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),ze.preventDefault(),ze.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(_e.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Hm(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:re}),document.addEventListener("scroll",this,{signal:re}),this.resizeObserver=new ResizeObserver(()=>Eo(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),_d&&!qe.locale.startsWith(_d.locale)&&$m(qe.locale),$s!=="ready"&&document.fonts.ready.then(()=>Af(this)),a.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(a){this._defaultStyle=a}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const a=this.model.at(this.model.position),y=this.adoptStyle==="right"?a.rightSibling:a;if(!y)return this.defaultStyle;if(y.type==="group"){const b=y.branch("body");return!b||b.length<2?{}:this.adoptStyle==="right"?b[1].computedStyle:b[b.length-1].computedStyle}return y.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),Uf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,$h())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:bl(this.field))!=null?b:void 0,ee=a==null?void 0:a.modifiers,re=this.element.querySelector("[part=container]");return this._menu.show({target:re,location:E,modifiers:ee})}get colorMap(){return a=>{var y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:St(a)}}get backgroundColorMap(){return a=>{var y,b,E,ee,re,ae;return(ae=(re=(b=(y=this.options).backgroundColorMap)==null?void 0:b.call(y,a))!=null?re:(ee=(E=this.options).colorMap)==null?void 0:ee.call(E,a))!=null?ae:Ke(a)}}get smartFence(){var a;return(a=this.options.smartFence)!=null?a:!1}get readOnly(){var a;return(a=this.options.readOnly)!=null?a:!1}get disabled(){var a,y;return(y=(a=this.host)==null?void 0:a.disabled)!=null?y:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const a=getComputedStyle(this.host);return a.getPropertyValue("user-select")||a.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(a=>a.type==="prompt"&&!a.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const a=this.model.at(this.model.anchor),y=this.model.at(this.model.position),b=Jn.commonAncestor(a,y);return!!((b==null?void 0:b.type)==="prompt"||b!=null&&b.parentPrompt)}get letterShapeStyle(){var a;return(a=this.options.letterShapeStyle)!=null?a:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const a=this.model.getAtoms(this.model.selection);if(a.length===0)return{};const y=we({},a[0].style);for(const b of a)for(const[E,ee]of Object.entries(b.style))y[E]!==ee&&delete y[E];return y}queryStyle(a){const y=Ph(this,a);"verbatimColor"in y&&delete y.verbatimColor,"verbatimBackgroundColor"in y&&delete y.verbatimBackgroundColor;const b=Object.keys(y).length;if(b===0)return"all";if(b>1){for(const ge of Object.keys(y)){const be=this.queryStyle({[ge]:y[ge]});if(be==="none")return"none";if(be==="some")return"some"}return"all"}const E=Object.keys(y)[0],ee=y[E];if(this.model.selectionIsCollapsed)return this.effectiveStyle[E]===ee?"all":"none";const re=this.model.getAtoms(this.model.selection,{includeChildren:!0});let ae=re.length;if(ae===0)return"none";let fe=0;for(const ge of re){if(ge.type==="first"){ae-=1;continue}ge.style[E]===ee&&(fe+=1)}return fe===0?"none":fe===ae?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Um(this.options.keybindings,(a=kd())!=null?a:Fm());return((y=kd())==null?void 0:y.score)>0&&(this._keybindings=b,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),b}get menu(){return this._menu}setOptions(a){var y;this.options=we(we({},this.options),Bf(a)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let b=this.options.defaultMode;b==="inline-math"&&(b="math"),((y=this.model.root.firstChild)==null?void 0:y.mode)!==b&&(this.model.root.firstChild.mode=b),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const E=Jn.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&aa.insert(this.model,E,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in a||"macros"in a||"registers"in a||"colorMap"in a||"backgroundColorMap"in a||"letterShapeStyle"in a||"minFontScale"in a||"readOnly"in a||"placeholderSymbol"in a)&&Eo(this)}getOptions(a){return zu(this.options,a)}getOption(a){return zu(this.options,a)}handleEvent(a){return gu(this,null,function*(){var y;if(Os(this)){if(Ch(a)){if(!yd(a.origin,(y=this.options.originValidator)!=null?y:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:b}=a.data;if(b==="execute-command"){const E=a.data.command;if(Ic(E)==="virtual-keyboard")return;this.executeCommand(E)}else b==="update-state"||(b==="focus"?this.focus({preventScroll:!0}):b==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&Z0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Z0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Uf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Os(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Os(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Os(this))return;qe.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 a=this.element;delete a.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,Gg(),Qm(),mv()}flushInlineShortcutBuffer(a){if(a!=null||(a={defer:!1}),!a.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(a){return Ic(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(El(this))),!1):og(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,y,b){return this.model.getValue(a,y,b)}setValue(a,y){var b;y=y!=null?y:{mode:"math"},y.insertionMode===void 0&&(y.insertionMode="replaceAll"),(y.format===void 0||y.format==="auto")&&(y.format="latex"),(y.mode===void 0||y.mode==="auto")&&(y.mode=(b=ah(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();aa.insert(this.model,a,y)&&(Eo(this),E||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const a=window.MathfieldElement.computeEngine;return a?a.box(a.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 a;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 E=window.mathVirtualKeyboard.boundingRect,ee=this.host.getBoundingClientRect();ee.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,ee.bottom-E.top+8))}}this.dirty&&$u(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=bl(this.field);else{const E=vd(this);if(E.length>0){let ee=-1/0,re=-1/0;for(const ae of E)ae.right>ee&&(ee=ae.right),ae.top<re&&(re=ae.top);b={x:ee+y.left-this.field.scrollLeft,y:re+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),ee=b.y;let re=this.host.scrollTop;ee<E.top?re=ee-E.top+this.host.scrollTop:ee>E.bottom&&(re=ee-E.bottom+this.host.scrollTop+b.height),this.host.scroll({top:re,left:0})}if(b){const E=b.x-window.scrollX;let ee=this.field.scrollLeft;E<y.left?ee=E-y.left+this.field.scrollLeft-20:E>y.right&&(ee=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,y){return typeof a!="string"||a.length===0&&((y==null?void 0:y.insertionMode)==="insertBefore"||(y==null?void 0:y.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),y=y!=null?y:{mode:"math"},y.focus&&this.focus(),y.feedback&&(window.MathfieldElement.keypressVibration&&Ge()&&navigator.vibrate(w0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?T0(this.model):a==="&"?I0(this.model):this.model.selectionIsCollapsed?aa.insert(this.model,a,we({style:this.model.at(this.model.position).computedStyle},y)):aa.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Eo(this),y.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(a,y="",b=""){var E;if(this.model.mode===a||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const ee=this.model.mode;if(this.model.mode=a,!((E=this.host)!=null&&E.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=ee;return}const re=this.model.mode,{model:ae}=this;ae.deferNotifications({content:!!b||!!y,selection:!0,type:"insertText"},()=>{let fe=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const ge=Xo(y,{context:this.context,parseMode:a});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),fe=!0}if(this.model.mode=a,a==="latex"){let ge=ae.selectionIsCollapsed;Ac(this,"accept");let be,_e=ae.at(ae.position);if(ge)be="\\";else{const rt=Uo(ae.selection);be=this.model.getValue(rt,"latex");const xt=this.model.extractAtoms(rt);xt.length===1&&xt[0].type==="placeholder"&&(be=y,ge=!0),_e=ae.at(rt[0])}const ze=new xd(be);_e.parent.addChildAfter(ze,_e),ge?ae.position=ae.offsetOf(ze.lastChild):ae.setSelection(ae.offsetOf(ze.firstChild),ae.offsetOf(ze.lastChild))}else Ld(ae).forEach(ge=>{ge.isError=!1});if(b){const ge=Xo(b,{context:this.context,parseMode:re});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),fe=!0}return Eo(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),fe}),this.model.mode=a,window.mathVirtualKeyboard.update(El(this))}hasFocus(){return!this.blurred}focus(a){var y;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(y=a==null?void 0:a.preventScroll)!=null&&y||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,y={}){var b,E;const ee={operation:"set",silenceNotifications:!1};xc(y)?ee.range=y:(y.operation==="toggle"&&(ee.operation="toggle"),ee.range=y.range,ee.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const re=Ph(this,a),ae=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(ae==="set"){this.defaultStyle=we(we({},this.defaultStyle),re);return}const fe=we({},this.defaultStyle);for(const ge of Object.keys(re))fe[ge]===re[ge]?(ge==="color"&&delete fe.verbatimColor,ge==="backgroundColor"&&delete fe.verbatimBackgroundColor,delete fe[ge]):fe[ge]=re[ge];this.defaultStyle=fe;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const fe of this.model.selection.ranges)Mh(this.model,fe,re,{operation:ae});else Mh(this.model,ee.range,re,{operation:ae})}),Eo(this)}toggleContextMenu(){var a;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(a=this.getCaretPoint())!=null?a:void 0,onDismiss:()=>{var y;return(y=this.element)==null?void 0:y.focus()}}),!0):!1}getCaretPoint(){const a=bl(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=Nd(this,a,y,{bias:0});if(b<0)return!1;const E=this.model.position;return this.model.position=b,this.model.announce("move",E),Eo(this),!0}getPrompt(a){const y=this.model.findAtom(b=>b.type==="prompt"&&b.placeholderId===a);return console.assert(y!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),y}getPromptValue(a,y){const b=this.getPrompt(a);if(!b)return"";const E=this.model.offsetOf(b.firstChild),ee=this.model.offsetOf(b.lastChild);return this.model.getValue(E,ee,y)}getPrompts(a){return this.model.getAllAtoms().filter(y=>y.type!=="prompt"?!1:a?!(a.id&&y.placeholderId!==a.id||a.locked&&y.locked!==a.locked||a.correctness==="undefined"&&y.correctness||a.correctness&&y.correctness!==a.correctness):!0).map(y=>y.placeholderId)}setPromptValue(a,y,b){if(y!==void 0){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}const ee=this.model.getBranchRange(this.model.offsetOf(E),"body");this.model.setSelection(ee),this.insert(y,me(we({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),Eo(this)}setPromptState(a,y,b){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}y==="undefined"?E.correctness=void 0:typeof y=="string"&&(E.correctness=y),typeof b=="boolean"&&(E.locked=b,E.captureSelection=b),Eo(this)}getPromptState(a){const y=this.getPrompt(a);return y?[y.correctness,y.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[void 0,!0])}getPromptRange(a){const y=this.getPrompt(a);return y?this.model.getBranchRange(this.model.offsetOf(y),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(a){var y;this.undoManager.snapshot(a)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(y=this.host)==null||y.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 a;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var a;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var a;(a=this.undoManager)==null||a.reset()}onSelectionDidChange(){var a,y;const b=this.model;this.keyboardDelegate.setValue(b.getValue(this.model.selection,"latex-expanded"));{const E=b.at(b.position),ee=(a=E.mode)!=null?a:A0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Ac(this,"accept",{mode:ee}),b.position=b.offsetOf(E)):this.switchMode(ee))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),Uf(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",me(we({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?E:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),$u(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 a,y,b;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Tc(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(y=this.host)==null||y.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(b=this.host)==null||b.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Eo(this),this.focusBlurInProgress=!1,$h();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Os(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Th(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(Uo(this.model.selection));const y=bl(this.field);y&&requestAnimationFrame(()=>{$u(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),Eo(this)}onCompositionEnd(a){Ag(this.model),Th(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),aa.onCopy(this,a),_l(this.model,Uo(this.model.selection),"deleteByCut"),this.snapshot("cut"),Eo(this))}onCopy(a){aa.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=aa.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),y||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),y}onGeometryChange(){this._menu.hide(),_f(this),Uf(this)}onWheel(a){const y=5*a.deltaX;if(!Number.isFinite(y)||y===0)return;const b=this.field;y<0&&b.scrollLeft===0||y>0&&b.offsetWidth+b.scrollLeft>=b.scrollWidth||(b.scrollBy({top:0,left:y}),a.preventDefault(),a.stopPropagation())}getHTMLElement(a){let y=a;for(;!y.id&&y.hasChildren;)y=a.children[0];return this.field.querySelector(`[data-atom-id="${y.id}"]`)}get context(){var a,y;return{registers:(a=this.options.registers)!=null?a:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(y=this.options.placeholderSymbol)!=null?y:"\u25A2",colorMap:b=>this.colorMap(b),backgroundColorMap:b=>this.backgroundColorMap(b),getMacro:b=>Kr(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function gp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)gp(y)}function Qh(a,y){var b;a&&(!y||((b=a.dataset)==null?void 0:b.atomId)===y?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E,y)})))}function h1(a,y){var b;if(!lt())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(y);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"json",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};mu().readAloudElement=a,E.synthesizeSpeech(ee,(re,ae)=>{if(re){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);return}if(!(ae!=null&&ae.AudioStream)){console.log("polly.synthesizeSpeech():",ae);return}const fe=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));mu().readAloudMarks=fe.split(`
|
|
|
`).map(ge=>ge?JSON.parse(ge):{}),mu().readAloudTokens=[];for(const ge of mu().readAloudMarks)ge.value&&mu().readAloudTokens.push(ge.value);mu().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(ge,be)=>{if(ge){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${ge}`);return}if(!(be!=null&&be.AudioStream))return;const _e=new Uint8Array(be.AudioStream),ze=new Blob([_e.buffer],{type:"audio/mpeg"}),rt=URL.createObjectURL(ze),xt=mu();xt.readAloudAudio?xt.readAloudAudio.pause():(xt.readAloudAudio=new Audio,xt.readAloudAudio.addEventListener("ended",()=>{const It=xt.readAloudMathfield;xt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),It?($u(It),xt.readAloudElement=null,xt.readAloudMathfield=null,xt.readAloudTokens=[],xt.readAloudMarks=[],xt.readAloudCurrentMark=""):gp(xt.readAloudElement)}),xt.readAloudAudio.addEventListener("timeupdate",()=>{let It="";const In=xt.readAloudAudio.currentTime*1e3+100;for(const Br of xt.readAloudMarks)Br.time<In&&(It=Br.value);xt.readAloudCurrentMark!==It&&(xt.readAloudCurrentToken=It,It&&It===xt.readAloudFinalToken?xt.readAloudAudio.pause():(xt.readAloudCurrentMark=It,Qh(xt.readAloudElement,xt.readAloudCurrentMark)))})),xt.readAloudAudio.src=rt,xt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),xt.readAloudAudio.play()})})}lt()||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 Na=new WeakMap,p1=.5,pu={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 = ..."},rs=class Gu extends HTMLElement{static get formAssociated(){return Hc()}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(y){y!==this._fontsDirectory&&(this._fontsDirectory=y,ng())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(y){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(y){this._soundsDirectory=y,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(y){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(y){var b,E,ee;this.audioBuffers={},y===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof y=="string"?this._keypressSound={spacebar:y,return:y,delete:y,default:y}:typeof y=="object"&&"default"in y&&(this._keypressSound={spacebar:(b=y.spacebar)!=null?b:y.default,return:(E=y.return)!=null?E:y.default,delete:(ee=y.delete)!=null?ee:y.default,default:y.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(y){this.audioBuffers={},this._plonkSound=y}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(y){this._speechEngine=y}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(y){this._speechEngineRate=y}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(y){this._speechEngineVoice=y}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(y){this._textToSpeechMarkup=y}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(y){this._textToSpeechRules=y}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(y){this._textToSpeechRulesOptions=y}static get locale(){return qe.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),qe.locale=y}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(y){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return qe.strings}static set strings(y){qe.merge(y)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(y){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(y){this._decimalSeparator=y,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(y){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var y,b;if(this._computeEngine===void 0){const E=(y=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(b=this._computeEngine)!=null?b:null}static set computeEngine(y){this._computeEngine=y}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(y){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(y){this._isFunction=y}static loadSound(y){return gu(this,null,function*(){delete this.audioBuffers[y];let b="";switch(y){case"keypress":b=this._keypressSound.default;break;case"return":b=this._keypressSound.return;break;case"spacebar":b=this._keypressSound.spacebar;break;case"delete":b=this._keypressSound.delete;break;case"plonk":b=this.plonkSound;break}if(typeof b!="string")return;b=b.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||b==="none"||b==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${b}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=ae}catch(ee){}})}static playSound(y){return gu(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[y]||(yield this.loadSound(y)),!this.audioBuffers[y])return;const b=this.audioContext.createBufferSource();b.buffer=this.audioBuffers[y];const E=this.audioContext.createGain();E.gain.value=p1,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(pu[E])if(pu[E].startsWith("mf."))if(pu[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pu[E]}`);else{const ee=pu[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pu[E]}`);if(b.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 E of b)console.warn(E);console.groupEnd()}}if(Hc()&&(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=[cu("core"),cu("mathfield"),cu("mathfield-element"),cu("ui"),cu("menu")],this.shadowRoot.appendChild(document.createElement("span"));const b=document.createElement("slot");b.style.display="none",this.shadowRoot.appendChild(b)}else this.shadowRoot.innerHTML="<style>"+Hl("core")+Hl("mathfield")+Hl("mathfield-element")+Hl("ui")+Hl("menu")+'</style><span></span><slot style="display:none"></slot>';y&&this._setOptions(y),this.shadowRoot.addEventListener("slotchange",()=>{var b;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(b=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?b:""})}showMenu(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.showMenu(y))!=null?E:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",y=>{var b;y.target===this&&!((b=this._mathfield)!=null&&b.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:y.altKey,button:y.button,buttons:y.buttons,clientX:y.clientX,clientY:y.clientY,ctrlKey:y.ctrlKey,metaKey:y.metaKey,movementX:y.movementX,movementY:y.movementY,relatedTarget:y.relatedTarget,screenX:y.screenX,screenY:y.screenY,shiftKey:y.shiftKey}))},{once:!0})}getPromptValue(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?ee:""}setPromptValue(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(y,b,E)}getPromptRange(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptRange(y))!=null?E:null}getPrompts(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPrompts(y))!=null?E:[]}get form(){var y;return(y=this._internals)==null?void 0:y.form}get name(){var y;return(y=this.getAttribute("name"))!=null?y:""}get type(){return this.localName}get mode(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.mode)!=null?b:this.defaultMode==="text"?"text":"math"}set mode(y){var b;(b=this._mathfield)==null||b.switchMode(y)}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(y){var b,E;if(!this._mathfield)return;const ee=(E=(b=Gu.computeEngine)==null?void 0:b.box(y).latex)!=null?E:null;ee!==null&&this._mathfield.setValue(ee),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 y,b;return(b=(y=this._mathfield)==null?void 0:y.errors)!=null?b:[]}_getOptions(y){return this._mathfield?zu(this._mathfield.options,y):Na.has(this)?we({},zu(we(we({},Of()),Bf(Na.get(this).options)),y)):null}getOptions(y){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?zu(this._mathfield.options,y):Na.has(this)?zu(we(we({},Of()),Bf(Na.get(this).options)),y):null}reflectAttributes(){const y=Of(),b=this._getOptions();Object.keys(Gu.optionsAttributes).forEach(E=>{const ee=Vl(E);Gu.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Gu.optionsAttributes[E]==="boolean"?b[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[ee]=="string"||typeof b[ee]=="number")&&this.setAttribute(E,b[ee].toString()))})}getOption(y){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([y])[y]}_getOption(y){return this._getOptions([y])[y]}_setOptions(y){if(this._mathfield)this._mathfield.setOptions(y);else if(Na.has(this)){const b=we(we({},Na.get(this).options),y);Na.set(this,me(we({},Na.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Na.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:y,menuItems:void 0});this.reflectAttributes()}setOptions(y){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 b of Object.keys(y))pu[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${pu[b]}`);console.groupEnd(),this._setOptions(y)}executeCommand(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.executeCommand(y))!=null?E:!1}getValue(y,b,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(Na.has(this)){let ae,fe,ge;if(Sc(y)?([ae,fe]=y.ranges[0],ge=b):xc(y)?([ae,fe]=y,ge=b):gl(y)&&gl(b)?(ae=y,fe=b,ge=E):(ae=0,fe=-1,ge=y),(ge===void 0||ge==="latex")&&ae===0&&fe===-1)return(re=(ee=Na.get(this).value)!=null?ee:this.textContent)!=null?re:""}return""}setValue(y,b){if(this._mathfield&&y!==void 0){b!=null||(b={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(y,b);return}if(Na.has(this)){const ee=Na.get(this).options;Na.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Wd(this);Na.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:E,menuItems:void 0})}hasFocus(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.hasFocus())!=null?b:!1}focus(){var y;(y=this._mathfield)==null||y.focus()}blur(){var y;(y=this._mathfield)==null||y.blur()}select(){var y;(y=this._mathfield)==null||y.select()}insert(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.insert(y,b))!=null?ee:!1}applyStyle(y,b){var E;return(E=this._mathfield)==null?void 0:E.applyStyle(y,b)}queryStyle(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.queryStyle(y))!=null?E:"none"}get caretPoint(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.getCaretPoint())!=null?b:null}set caretPoint(y){var b;y&&((b=this._mathfield)==null||b.setCaretPoint(y.x,y.y))}setCaretPoint(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.setCaretPoint(y,b))!=null?ee:!1}offsetFromPoint(y,b,E){return this._mathfield?Nd(this._mathfield,y,b,E):-1}hitboxFromOffset(y){if(!this._mathfield)return null;const b=this._mathfield.model.at(y);if(!b)return null;const E=lu(this._mathfield,b);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var y;(y=this._mathfield)==null||y.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(y){var b,E,ee,re;Sl.state==="closed"&&((E=(b=this._mathfield)==null?void 0:b.menu)==null?void 0:E.state)==="closed"&&(y.type==="pointerdown"&&this.onPointerDown(),y.type==="focus"&&((ee=this._mathfield)==null||ee.focus()),y.type==="blur"&&((re=this._mathfield)==null||re.blur()))}connectedCallback(){var y,b,E,ee;const re=window.getComputedStyle(this),ae=this.shadowRoot,fe=re.userSelect!=="none";if(fe)ae.host.addEventListener("pointerdown",this,!0);else{const _e=ae.querySelector("span");_e.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),Hc()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),fe&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const ge=ae.querySelector("slot:not([name])");if(ge)try{this._style=ge.assignedElements().filter(_e=>_e.tagName.toLowerCase()==="style").map(_e=>_e.textContent).join("")}catch(_e){console.error(_e)}if(this._style){const _e=document.createElement("style");_e.textContent=this._style,ae.appendChild(_e)}let be="";if(this.hasAttribute("value")?be=this.getAttribute("value"):be=(y=ge==null?void 0:ge.assignedNodes().map(_e=>_e.nodeType===3?_e.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(ae.querySelector(":host > span"),me(we({},(E=(b=Na.get(this))==null?void 0:b.options)!=null?E:Wd(this)),{eventSink:this,value:be})),!Na.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const _e of Object.keys(Gu.optionsAttributes))this.upgradeProperty(Vl(_e))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Na.has(this)){const _e=this._mathfield,ze=Na.get(this),rt=ze.menuItems;_e.model.deferNotifications({content:!1,selection:!1},()=>{const xt=ze.value;xt!==void 0&&_e.setValue(xt),_e.model.selection=ze.selection,Na.delete(this)}),rt&&(this.menuItems=rt)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Lf()}disconnectedCallback(){var y,b;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 E=zu(this._mathfield.options,Object.keys(Gu.optionsAttributes).map(ee=>Vl(ee)));Na.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(b=(y=this._mathfield.menu)==null?void 0:y.menuItems)!=null?b:void 0,options:E}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(y){if(this.hasOwnProperty(y)){const b=this[y];delete this[y],(y==="readonly"||y==="read-only")&&(y="readOnly"),this[y]=b}}attributeChangedCallback(y,b,E){if(b===E)return;const ee=E!==null;switch(y){case"contenteditable":Eo(this._mathfield);break;case"disabled":this.disabled=ee;break;case"read-only":case"readonly":this.readOnly=ee;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(y){const b=!!y;b?(this.setAttribute("readonly",""),Hc()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Hc()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:b})}get disabled(){return this.hasAttribute("disabled")}set disabled(y){var b;const E=!!y;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Hc()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((b=this._mathfield)!=null&&b.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(y){this.setValue(y)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(y){this._setOptions({defaultMode:y})}get macros(){return this._getOption("macros")}set macros(y){this._setOptions({macros:y})}get registers(){const y=this;return new Proxy({},{get:(b,E)=>{if(typeof E=="string")return y._getOption("registers")[E]},set(b,E,ee){return typeof E!="string"?!1:(y._setOptions({registers:me(we({},y._getOption("registers")),{[E]:ee})}),!0)}})}set registers(y){this._setOptions({registers:y})}get colorMap(){return this._getOption("colorMap")}set colorMap(y){this._setOptions({colorMap:y})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(y){this._setOptions({backgroundColorMap:y})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(y){this._setOptions({letterShapeStyle:y})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(y){this._setOptions({minFontScale:y})}get smartMode(){return this._getOption("smartMode")}set smartMode(y){this._setOptions({smartMode:y})}get smartFence(){return this._getOption("smartFence")}set smartFence(y){this._setOptions({smartFence:y})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(y){this._setOptions({smartSuperscript:y})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(y){this._setOptions({scriptDepth:y})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(y){this._setOptions({removeExtraneousParentheses:y})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(y){this._setOptions({mathModeSpace:y})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(y){this._setOptions({placeholderSymbol:y})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(y){this._setOptions({popoverPolicy:y})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(y){this._setOptions({environmentPopoverPolicy:y})}get menuItems(){var y,b,E;return this._mathfield?(y=this._mathfield.menu._menuItems.map(ee=>ee.menuItem))!=null?y:[]:(E=(b=Na.get(this))==null?void 0:b.menuItems)!=null?E:[]}set menuItems(y){var b;if(this._mathfield){const E=(b=this._mathfield.element)==null?void 0:b.querySelector("[part=menu-toggle]");E&&(E.style.display=y.length===0?"none":""),this._mathfield.menu.menuItems=y}Na.has(this)?Na.set(this,me(we({},Na.get(this)),{menuItems:y})):Na.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Wd(this),menuItems:y})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(y){this._setOptions({mathVirtualKeyboardPolicy:y})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(y){this._setOptions({inlineShortcuts:y})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(y){this._setOptions({inlineShortcutTimeout:y})}get keybindings(){return this._getOption("keybindings")}set keybindings(y){this._setOptions({keybindings:y})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(y){this._setOptions({onInlineShortcut:y})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(y){this._setOptions({onScrollIntoView:y})}get onExport(){return this._getOption("onExport")}set onExport(y){this._setOptions({onExport:y})}get readOnly(){return this._getOption("readOnly")}set readOnly(y){this._setOptions({readOnly:y})}get isSelectionEditable(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.isSelectionEditable)!=null?b:!1}setPromptState(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(y,b,E)}getPromptState(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptState(y))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(y){this._setOptions({virtualKeyboardTargetOrigin:y})}get selection(){return this._mathfield?this._mathfield.model.selection:Na.has(this)?Na.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(y){if(typeof y=="number"&&(y={ranges:[[y,y]]}),this._mathfield){this._mathfield.model.selection=y,Eo(this._mathfield);return}if(Na.has(this)){Na.set(this,me(we({},Na.get(this)),{selection:y}));return}Na.set(this,{value:void 0,selection:y,options:Wd(this),menuItems:void 0})}get selectionIsCollapsed(){const y=this.selection;return y.ranges.length===1&&y.ranges[0][0]===y.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Na.has(this)?Na.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,Eo(this._mathfield)),Na.has(this)){Na.set(this,me(we({},Na.get(this)),{selection:{ranges:[[y,y]]}}));return}Na.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Wd(this),menuItems:void 0})}getOffsetDepth(y){var b,E;return this._mathfield?((E=(b=this._mathfield.model.at(y))==null?void 0:b.treeDepth)!=null?E:2)-2:0}get lastOffset(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.lastOffset)!=null?b:-1}};rs.version="0.98.5",rs._fontsDirectory="./fonts",rs._soundsDirectory="./sounds",rs.keypressVibration=!0,rs._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},rs._plonkSound="plonk.wav",rs.audioBuffers={},rs.createHTML=a=>a,rs._speechEngineRate="100%",rs._speechEngineVoice="Joanna",rs._textToSpeechMarkup="",rs._textToSpeechRules="mathlive",rs._textToSpeechRulesOptions={},rs.speakHook=r1,rs.readAloudHook=h1,rs._decimalSeparator=".",rs.fractionNavigationOrder="numerator-denominator",rs._isFunction=a=>{var y,b;const E=window.MathfieldElement.computeEngine;return(b=(y=E==null?void 0:E.parse(a).domain)==null?void 0:y.isFunction)!=null?b:!1};var Hd=rs;function Vl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Wd(a){const y={readOnly:!1},b=Hd.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=ee!=null?ee:"":b[E]==="boolean"?y[Vl(E)]=!0:b[E]==="on/off"?ee==="on"?y[Vl(E)]=!0:ee==="off"?y[Vl(E)]=!1:y[Vl(E)]=void 0:b[E]==="number"?y[Vl(E)]=Number.parseFloat(ee!=null?ee:"0"):y[Vl(E)]=ee}}),y}function Hc(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=Hd,yp,bp,xp,Sp;if(lt()&&!((yp=window.customElements)!=null&&yp.get("math-field"))){(xp=window[bp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[bp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Hd,(Sp=window.customElements)==null||Sp.define("math-field",Hd)}function m1(a,y,b){let E=b,ee=0;const re=a.length;for(;E<y.length;){const ae=y[E];if(ee<=0&&y.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jf(a,y,b,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const fe=ae.data;let ge=!0,be=0,_e;_e=fe.indexOf(y),_e!==-1&&(be=_e,be>0&&re.push({type:"text",data:fe.slice(0,be)}),ge=!1);let ze=!1;for(;!ze;){if(ge){if(_e=fe.indexOf(y,be),_e===-1){ze=!0;break}be!==_e&&re.push({type:"text",data:fe.slice(be,_e)}),be=_e}else{if(_e=m1(b,fe,be+y.length),_e===-1){ze=!0;break}let rt=fe.slice(be+y.length,_e);ee==="ascii-math"&&([,rt]=Bu(rt,{format:"ascii-math"})),re.push({type:"math",data:rt,rawData:fe.slice(be,_e+b.length),mathstyle:E}),be=_e+b.length}ge=!ge}be<fe.length&&re.push({type:"text",data:fe.slice(be)})}else re.push(ae);return re}function wp(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle","ascii-math")}),E}function g1(a,y){const b=document.createElement("span");b.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+y.renderToMathML(a)+"</math>";b.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),b.textContent=a}return b.className="ML__sr-only",b}function v1(a,y,b,E){try{const ee=y.renderToMarkup(a,{mathstyle:b,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=b==="displaystyle"?"flex":"inline-flex",re.setAttribute("aria-hidden","true"),re.setAttribute("translate","no"),re.innerHTML=window.MathfieldElement.createHTML(ee),re}catch(ee){if(console.error("Could not parse'"+a+"' with ",ee),E)return document.createTextNode(a)}return null}function Wc(a,y,b,E){var ee;const re=v1(a,b,y||"textstyle",E),ae=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const fe=document.createElement("span");if(/\bmathml\b/i.test(ae)&&b.renderToMathML&&fe.append(g1(a,b)),/\bspeakable-text\b/i.test(ae)&&b.renderToSpeakableText){const ge=document.createElement("span");ge.setAttribute("translate","no");const be=b.renderToSpeakableText(a);ge.innerHTML=window.MathfieldElement.createHTML(be),ge.className="ML__sr-only",fe.append(ge)}return fe.append(re),fe}return re}function y1(a,y){var b,E,ee;let re=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=Wc(a,"",y,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=wp(a,(E=y.TeX)==null?void 0:E.delimiters,(ee=y.asciiMath)==null?void 0:ee.delimiters);if(ae.length===1&&ae[0].type==="text")return null;re=document.createDocumentFragment();for(const fe of ae)if(fe.type==="text")re.appendChild(document.createTextNode(fe.data));else{const ge=Wc(fe.data,fe.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);ge&&re.appendChild(ge)}}return re}function Cp(a,y){var b,E,ee,re,ae,fe,ge,be,_e,ze,rt,xt,It,In,Br,kn;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const sr=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(sr)){a.textContent="";const pr=Wc(sr,"",y,!0);pr&&a.append(pr);return}const $r=wp(sr,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if($r.length===1&&$r[0].type==="math"){a.textContent="";const pr=Wc($r[0].data,$r[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);pr&&a.append(pr);return}if($r.length===1&&$r[0].type==="text")return}for(let sr=a.childNodes.length-1;sr>=0;sr--){const $r=a.childNodes[sr];if($r.nodeType===3){const pr=y1((ae=$r.textContent)!=null?ae:"",y);pr&&(sr+=pr.childNodes.length-1,$r.replaceWith(pr))}else if($r.nodeType===1){const pr=$r,bi=$r.nodeName.toLowerCase();if(bi==="script"){const $i=$r;let Ci;if((fe=y.processScriptTypePattern)!=null&&fe.test($i.type))Ci=(ge=$i.textContent)!=null?ge:"";else if((be=y.processMathJSONScriptTypePattern)!=null&&be.test($i.type))try{Ci=(ze=y.serializeToLatex)==null?void 0:ze.call(y,JSON.parse((_e=$i.textContent)!=null?_e:""))}catch(Pa){console.error(Pa)}if(Ci){let Pa="textstyle";for(const Vr of $i.type.split(";")){const[Fs,kl]=Vr.toLowerCase().split("=");Fs.trim()==="mode"&&(Pa=kl.trim()==="display"?"displaystyle":"textstyle")}const Ya=Wc(Ci,Pa,y,!0);Ya&&$i.parentNode.replaceChild(Ya,$i)}}else if(((xt=(rt=y.processClassPattern)==null?void 0:rt.test(pr.className))!=null?xt:!1)||!((In=(It=y.skipTags)==null?void 0:It.includes(bi))!=null&&In||(kn=(Br=y.ignoreClassPattern)==null?void 0:Br.test(pr.className))!=null&&kn))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Ci=a.textContent;a.textContent="";const Pa=Wc(Ci!=null?Ci:"","displaystyle",y,!0);Pa&&a.append(Pa)}else Cp(pr,y)}}}var b1={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 x1(a,y){var b,E,ee,re;try{const ae=we(we({},b1),y);ae.ignoreClassPattern=new RegExp((b=ae.ignoreClass)!=null?b:""),ae.processClassPattern=new RegExp((E=ae.processClass)!=null?E:""),ae.processScriptTypePattern=new RegExp((ee=ae.processScriptType)!=null?ee:""),ae.processMathJSONScriptTypePattern=new RegExp((re=ae.processMathJSONScriptType)!=null?re:""),Lf(),ks("core"),Cp(a,ae)}catch(ae){ae instanceof Error?console.error("renderMathInElement(): "+ae.message):console.error("renderMathInElement(): Could not render math for element",a)}}function S1(a,y){const b=fu.singleton;return b?(b.show(),Id(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function w1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}Ls({switchKeyboardLayer:S1,toggleVirtualKeyboard:w1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function mu(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function T1(){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 I1(a){E1(document.body,a)}function C1(a){if(typeof a=="string"){const y=document.getElementById(a);if(y===null)throw new Error(`The element with ID "${a}" could not be found.`);return y}return typeof a=="string"?null:a}function E1(a,y){var b,E,ee,re;const ae=C1(a);if(!ae)return;const fe=y!=null?y:{};(b=fe.renderToMarkup)!=null||(fe.renderToMarkup=qo),(E=fe.renderToMathML)!=null||(fe.renderToMathML=Nv),(ee=fe.renderToSpeakableText)!=null||(fe.renderToSpeakableText=Rv),(re=fe.serializeToLatex)!=null||(fe.serializeToLatex=$v),x1(ae,fe)}var D1={mathlive:"0.98.5"}},17423:function(bn,Zt,le){"use strict";le.d(Zt,{Z:function(){return we}});const se=me=>typeof me=="object"&&me!=null&&me.nodeType===1,Be=(me,Te)=>(!Te||me!=="hidden")&&me!=="visible"&&me!=="clip",Ne=(me,Te)=>{if(me.clientHeight<me.scrollHeight||me.clientWidth<me.scrollWidth){const ot=getComputedStyle(me,null);return Be(ot.overflowY,Te)||Be(ot.overflowX,Te)||(Oe=>{const st=(lt=>{if(!lt.ownerDocument||!lt.ownerDocument.defaultView)return null;try{return lt.ownerDocument.defaultView.frameElement}catch(Je){return null}})(Oe);return!!st&&(st.clientHeight<Oe.scrollHeight||st.clientWidth<Oe.scrollWidth)})(me)}return!1},Ye=(me,Te,ot,Oe,st,lt,Je,Ge)=>lt<me&&Je>Te||lt>me&&Je<Te?0:lt<=me&&Ge<=ot||Je>=Te&&Ge>=ot?lt-me-Oe:Je>Te&&Ge<ot||lt<me&&Ge>ot?Je-Te+st:0,ve=me=>{const Te=me.parentElement;return Te==null?me.getRootNode().host||null:Te},Se=(me,Te)=>{var ot,Oe,st,lt;if(typeof document=="undefined")return[];const{scrollMode:Je,block:Ge,inline:Ce,boundary:pt,skipOverflowHiddenElements:zt}=Te,qe=typeof pt=="function"?pt:un=>un!==pt;if(!se(me))throw new TypeError("Invalid target");const ut=document.scrollingElement||document.documentElement,xe=[];let Ee=me;for(;se(Ee)&&qe(Ee);){if(Ee=ve(Ee),Ee===ut){xe.push(Ee);break}Ee!=null&&Ee===document.body&&Ne(Ee)&&!Ne(document.documentElement)||Ee!=null&&Ne(Ee,zt)&&xe.push(Ee)}const Ve=(Oe=(ot=window.visualViewport)==null?void 0:ot.width)!=null?Oe:innerWidth,Xe=(lt=(st=window.visualViewport)==null?void 0:st.height)!=null?lt:innerHeight,{scrollX:Mt,scrollY:mt}=window,{height:St,width:Ke,top:Pt,right:Et,bottom:Yt,left:at}=me.getBoundingClientRect(),{top:Vt,right:fn,bottom:dn,left:Ue}=(un=>{const tt=window.getComputedStyle(un);return{top:parseFloat(tt.scrollMarginTop)||0,right:parseFloat(tt.scrollMarginRight)||0,bottom:parseFloat(tt.scrollMarginBottom)||0,left:parseFloat(tt.scrollMarginLeft)||0}})(me);let Le=Ge==="start"||Ge==="nearest"?Pt-Vt:Ge==="end"?Yt+dn:Pt+St/2-Vt+dn,Rt=Ce==="center"?at+Ke/2-Ue+fn:Ce==="end"?Et+fn:at-Ue;const Sn=[];for(let un=0;un<xe.length;un++){const tt=xe[un],{height:ft,width:Xt,top:Tn,right:mn,bottom:Ut,left:jt}=tt.getBoundingClientRect();if(Je==="if-needed"&&Pt>=0&&at>=0&&Yt<=Xe&&Et<=Ve&&Pt>=Tn&&Yt<=Ut&&at>=jt&&Et<=mn)return Sn;const _n=getComputedStyle(tt),yn=parseInt(_n.borderLeftWidth,10),Ae=parseInt(_n.borderTopWidth,10),ce=parseInt(_n.borderRightWidth,10),ue=parseInt(_n.borderBottomWidth,10);let pe=0,he=0;const oe="offsetWidth"in tt?tt.offsetWidth-tt.clientWidth-yn-ce:0,Ie="offsetHeight"in tt?tt.offsetHeight-tt.clientHeight-Ae-ue:0,Qe="offsetWidth"in tt?tt.offsetWidth===0?0:Xt/tt.offsetWidth:0,Lt="offsetHeight"in tt?tt.offsetHeight===0?0:ft/tt.offsetHeight:0;if(ut===tt)pe=Ge==="start"?Le:Ge==="end"?Le-Xe:Ge==="nearest"?Ye(mt,mt+Xe,Xe,Ae,ue,mt+Le,mt+Le+St,St):Le-Xe/2,he=Ce==="start"?Rt:Ce==="center"?Rt-Ve/2:Ce==="end"?Rt-Ve:Ye(Mt,Mt+Ve,Ve,yn,ce,Mt+Rt,Mt+Rt+Ke,Ke),pe=Math.max(0,pe+mt),he=Math.max(0,he+Mt);else{pe=Ge==="start"?Le-Tn-Ae:Ge==="end"?Le-Ut+ue+Ie:Ge==="nearest"?Ye(Tn,Ut,ft,Ae,ue+Ie,Le,Le+St,St):Le-(Tn+ft/2)+Ie/2,he=Ce==="start"?Rt-jt-yn:Ce==="center"?Rt-(jt+Xt/2)+oe/2:Ce==="end"?Rt-mn+ce+oe:Ye(jt,mn,Xt,yn,ce+oe,Rt,Rt+Ke,Ke);const{scrollLeft:$t,scrollTop:Kt}=tt;pe=Lt===0?0:Math.max(0,Math.min(Kt+pe/Lt,tt.scrollHeight-ft/Lt+Ie)),he=Qe===0?0:Math.max(0,Math.min($t+he/Qe,tt.scrollWidth-Xt/Qe+oe)),Le+=Kt-pe,Rt+=$t-he}Sn.push({el:tt,top:pe,left:he})}return Sn},Me=me=>me===!1?{block:"end",inline:"nearest"}:(Te=>Te===Object(Te)&&Object.keys(Te).length!==0)(me)?me:{block:"start",inline:"nearest"};function we(me,Te){if(!me.isConnected||!(st=>{let lt=st;for(;lt&<.parentNode;){if(lt.parentNode===document)return!0;lt=lt.parentNode instanceof ShadowRoot?lt.parentNode.host:lt.parentNode}return!1})(me))return;const ot=(st=>{const lt=window.getComputedStyle(st);return{top:parseFloat(lt.scrollMarginTop)||0,right:parseFloat(lt.scrollMarginRight)||0,bottom:parseFloat(lt.scrollMarginBottom)||0,left:parseFloat(lt.scrollMarginLeft)||0}})(me);if((st=>typeof st=="object"&&typeof st.behavior=="function")(Te))return Te.behavior(Se(me,Te));const Oe=typeof Te=="boolean"||Te==null?void 0:Te.behavior;for(const{el:st,top:lt,left:Je}of Se(me,Me(Te))){const Ge=lt-ot.top+ot.bottom,Ce=Je-ot.left+ot.right;st.scroll({top:Ge,left:Ce,behavior:Oe})}}}}]);
|
|
|
}()); |