|
|
!(function(){var Ys=Math.pow;var zl=(Mn,sn,ue)=>new Promise((pe,je)=>{var Fe=_e=>{try{xe(ue.next(_e))}catch(Ae){je(Ae)}},tt=_e=>{try{xe(ue.throw(_e))}catch(Ae){je(Ae)}},xe=_e=>_e.done?pe(_e.value):Promise.resolve(_e.value).then(Fe,tt);xe((ue=ue.apply(Mn,sn)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[8517],{40001:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},26227:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},84105:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},41464:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},18785:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},73331:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},15277:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},33853:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},62772:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},61485:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},38819:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},47472:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},87395:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ke,ct){return je.createElement(xe.Z,(0,pe.Z)({},Ke,{ref:ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae},41913:function(){"use strict"},8682:function(){"use strict"},20699:function(Mn,sn){"use strict";sn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},5296: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 Mn={},sn="5.0",ue={},pe=null,je=!1,Fe=!1,tt=null,xe=!1,_e=null,Ae=null,Se=0;Se<arguments.length;Se++){var Me=arguments[Se];if(Me!==null)switch(typeof Me){case"number":sn=Me.toFixed(1);break;case"string":Me.match(new RegExp("^[0-9]\\.[0-9]+$"))?sn=Me:tt=Me;break;case"object":typeof Me.is3D!="undefined"?pe=Me:ue=Me;break;case"boolean":je=Me,Fe=!0;break}}pe===null&&(pe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ue.material_id!==void 0&&!Fe&&(je=!0)),tt!==null&&ue.id===void 0&&(ue.id=tt);var Ke="",ct="",De=!1,We=null,vt=null,nt=null,dt=!1,st=null,wt=null,en=null,it=null,mt=null;ue.height!==void 0&&(ue.height=Math.round(ue.height)),ue.width!==void 0&&(ue.width=Math.round(ue.width));var Ze=function(Ve){return parseFloat(Ve)>4?parseFloat(Ve):5};Mn.setHTML5Codebase=function(Ve,Ye){Ae=Ve,ht(Ve,Ye)},Mn.setJavaCodebase=Mn.setJavaCodebaseVersion=Mn.isCompiledInstalled=Mn.setPreCompiledScriptPath=Mn.setPreCompiledResourcePath=function(){},Mn.setHTML5CodebaseVersion=function(Ve,Ye){var At=parseFloat(Ve);if(At!==NaN&&At<5){console.log("The GeoGebra HTML5 codebase version "+At+" is deprecated. Using version latest instead.");return}_e=Ve,be(Ve,Ye)},Mn.getHTML5CodebaseVersion=function(){return vt},Mn.getParameters=function(){return ue},Mn.setFontsCSSURL=function(Ve){it=Ve},Mn.setGiacJSURL=function(Ve){},Mn.setJNLPFile=function(Ve){Ke=Ve},Mn.setJNLPBaseDir=function(Ve){},Mn.inject=function(){function Ve(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ye="auto",At=ue.id,gn,Jt=!1,un=0;un<arguments.length;un++){var Gt=arguments[un];typeof Gt=="string"?(Gt=Gt.toLowerCase(),Gt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ye=Gt:At=arguments[un]):typeof Gt=="boolean"?Jt=Gt:Gt instanceof HTMLElement&&(gn=Gt)}Vt();function Vt(){if(!xe){setTimeout(Vt,200);return}Ye=ut(Ye);var Nt=gn||document.getElementById(At);if(!Nt){console.log("possibly bug on ajax loading? ");return}if(Mn.removeExistingApplet(Nt,!1),ue.width===void 0&&Nt.clientWidth&&(ue.width=Nt.clientWidth),ue.height===void 0&&Nt.clientHeight&&(ue.height=Nt.clientHeight),!(ue.width&&ue.height)&&Ye==="html5"&&(delete ue.width,delete ue.height),We=Ye,Ye==="screenshot")Je(Nt,ue);else{var ve=!1;ue.hasOwnProperty("playButton")&&ue.playButton||ue.hasOwnProperty("clickToLoad")&&ue.clickToLoad?ve=!0:ue.hasOwnProperty("playButtonAutoDecide")&&ue.playButtonAutoDecide&&(ve=(!Ee()||Ve())&&He()),ve?(We="screenshot",ft(Nt,ue,Jt,Ye)):kt(Nt,ue,Jt)}}};function Ee(){try{return window.self!==window.top}catch(Ve){return!0}}function He(){return ue.hasOwnProperty("screenshotGenerator")&&ue.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Mn.getViews=function(){return pe},Mn.isJavaInstalled=function(){return!1};var Ue=function(Ve){var Ye=function(un){var Gt=JSON.parse(un),Vt=function(se){return se.type=="G"||se.type=="E"},Nt=Gt.elements?Gt.elements.filter(Vt)[0]:Gt;if(!Nt||!Nt.url){At();return}ue.fileName=Nt.url,Ct(Nt.settings||{}),pe.is3D=!0;var ve="https://www.geogebra.org/images/";Mn.setPreviewImage(st||Nt.previewUrl,ve+"GeoGebra_loading.png",ve+"applet_play.png"),Ve()},At=function(){ue.onError&&ue.onError(),nn("Error: Fetching material (id "+ue.material_id+") failed.",ue)},gn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Jt="/materials/"+ue.material_id+"?scope=basic";Ge("https://"+gn+"/api/proxy.php?path="+encodeURIComponent(Jt),Ye,At)};function Ct(Ve){var Ye=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(At){Ve[At]=!!Ve[At]}),Ye.forEach(function(At){ue[At]===void 0&&Ve[At]!==void 0&&(ue[At]=Ve[At])}),ue.showToolBarHelp===void 0&&(ue.showToolBarHelp=ue.showToolBar)}function Ge(Ve,Ye,At){var gn=new XMLHttpRequest;gn.open("GET",Ve),gn.onload=function(){Ye(gn.responseText)},gn.onerror=At,gn.send()}Mn.isHTML5Installed=function(){return!0},Mn.getLoadedAppletType=function(){return We},Mn.setPreviewImage=function(Ve,Ye,At){st=Ve,wt=Ye,en=At},Mn.removeExistingApplet=function(Ve,Ye){var At;typeof Ve=="string"&&(Ve=document.getElementById(Ve)),We=null;var gn=null;for(At=0;At<Ve.childNodes.length;At++){var Jt=Ve.childNodes[At],un=Jt.className;un==="applet_screenshot"?Ye?(Jt.style.display="block",We="screenshot"):Jt.style.display="none":un!=="applet_scaler prerender"&&(Ve.removeChild(Jt),gn=un&&un.indexOf("appletParameters")!=-1?Jt.id:null,At--)}var Gt=ue.id!==void 0?ue.id:gn,Vt=window[Gt];Vt&&typeof Vt.getBase64=="function"&&(Vt.remove(),window[Gt]=null)},Mn.refreshHitPoints=function(){if(Ze(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ve=Mn.getAppletObject();return Ve&&typeof Ve.recalculateEnvironments=="function"?(Ve.recalculateEnvironments(),!0):!1},Mn.startAnimation=function(){var Ve=Mn.getAppletObject();return Ve&&typeof Ve.startAnimation=="function"?(Ve.startAnimation(),!0):!1},Mn.stopAnimation=function(){var Ve=Mn.getAppletObject();return Ve&&typeof Ve.stopAnimation=="function"?(Ve.stopAnimation(),!0):!1},Mn.getAppletObject=function(){var Ve=ue.id!==void 0?ue.id:"ggbApplet";return window[Ve]},Mn.resize=function(){};var It=function(Ve,Ye,At){var gn=document.createElement("param");gn.setAttribute("name",Ye),gn.setAttribute("value",At),Ve.appendChild(gn)},et=function(Ve){return Ve&&Ve!=="false"},kt=function(Ve,Ye,At){Ze(vt)<=4.2&&(At=!0);var gn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==vt||ggbHTML5LoadedCodebaseIsWebSimple&&!dt)&&(gn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Jt=document.createElement("div");Jt.classList.add("appletParameters","notranslate");var un=Ye.width,Gt=Ye.height;if(Ye.disableAutoScale=Ye.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ye.disableAutoScale,Ye.width!==void 0)if(Ze(vt)<=4.4)et(Ye.showToolBar)&&(Ye.height-=7),et(Ye.showAlgebraInput)&&(Ye.height-=37),Ye.width<605&&et(Ye.showToolBar)&&(Ye.width=605,un=605);else{var Vt=100;(et(Ye.showToolBar)||et(Ye.showMenuBar))&&(Ye.hasOwnProperty("customToolBar")&&(Ye.customToolbar=Ye.customToolBar),Vt=et(Ye.showMenuBar)?245:155),un<Vt&&(Ye.width=Vt,un=Vt)}Jt.style.border="none",Jt.style.display="inline-block";for(var Nt in Ye)Ye.hasOwnProperty(Nt)&&Nt!=="appletOnLoad"&&Jt.setAttribute("data-param-"+Nt,Ye[Nt]);it&&Jt.setAttribute("data-param-fontscssurl",it),Mn.resize=function(){GGBAppletUtils.responsiveResize(Ve,Ye)},window.addEventListener("resize",function(on){Mn.resize()});var ve=typeof Ye.appletOnLoad=="function"?Ye.appletOnLoad:function(){};if(!At&&Ye.width!==void 0){Ye.hasOwnProperty("showSplash")||Jt.setAttribute("data-param-showSplash","false");var se=Ve.querySelector(".applet_scaler.prerender"),oe=se!==null;if(oe)var de=se.querySelector(".ggb_preview");else{var de=Et(un,Gt,Ye.borderColor,!1);se=document.createElement("div"),se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.style.width=un+"px",se.style.height=Gt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(se,"66%"),Ze(vt)>=5?(Ye.appletOnLoad=function(on){var pn=Ve.querySelector(".ggb_preview");pn&&pn.parentNode.removeChild(pn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(se),window.GGBT_wsf_view&&$(window).trigger("resize"),ve(on)},oe||se.appendChild(de)):Jt.appendChild(de),se.appendChild(Jt),oe||Ve.appendChild(se),setTimeout(function(){Mn.resize()},1)}else{var fe=document.createElement("div");fe.className="applet_scaler",fe.style.position="relative",fe.style.display="block",fe.appendChild(Jt),Ve.appendChild(fe),Ye.appletOnLoad=function(on){Mn.resize(),ve(on)}}function le(on,pn){pn&&typeof pn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(on,pn.appletOnLoad):renderGGBElement(on),nn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",pn)}function Ie(on,pn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:on,params:pn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Cn){le(Cn.article,Cn.params)}),html5AppletsToProcess=null)},Ze(vt)<5&&(on.className+=" geogebraweb")):le(on,pn)}if(gn){scriptLoadStarted=!0;for(var ot=0;ot<Jt.childNodes.length;ot++){var Kt=Jt.childNodes[ot].tagName;Kt==="TABLE"&&(Jt.removeChild(Jt.childNodes[ot]),ot--)}if(ggbHTML5LoadedScript!==null){var Ft=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ft!=null&&Ft.parentNode.removeChild(Ft)}var Xt=document.createElement("script"),Qt=function(){Ie(Jt,Ye)};Xt.src=ct+nt,ggbHTML5LoadedCodebaseIsWebSimple=dt,ggbHTML5LoadedCodebaseVersion=vt,ggbHTML5LoadedScript=Xt.src,nn("GeoGebra HTML5 codebase loaded: '"+ct+"'.",Ye),!Ae&&(!_e||_e=="5.0")?(dt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Qt()):ct.requirejs?__webpack_require__.e(5994).then(function(){var on=[__webpack_require__(35994)];Qt.apply(null,on)}.bind(this)).catch(__webpack_require__.oe):(Xt.onload=Qt,Ve.appendChild(Xt))}else Ie(Jt,Ye);Ye.height=Gt,Ye.width=un},Je=function(Ve,Ye,At){var gn=Et(Ye.width,Ye.height,Ye.borderColor,At),Jt=document.createElement("div");Jt.style.position="relative",Jt.style.display="block",Jt.style.width=Ye.width+"px",Jt.style.height=Ye.height+"px",Jt.className="applet_screenshot applet_scaler"+(At?" applet_screenshot_play":""),Jt.appendChild(gn);var un=GGBAppletUtils.getScale(Ye,Ve,At);At?(Ve.appendChild(Dt()),window.GGBT_wsf_view||(Ve.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Jt,"66%"),Ve.appendChild(Jt),un!==1&&!isNaN(un)&&(GGBAppletUtils.scaleElement(Jt,un),Jt.style.width=Ye.width+"px",Jt.style.height=Ye.height+"px",Jt.parentNode.style.width=Ye.width*un+"px",Jt.parentNode.style.height=Ye.height*un+"px"),Mn.resize=function(){Ut(Ve,gn,Jt,At)},window.addEventListener("resize",function(Gt){Mn.resize()}),Mn.resize()};function Ut(Ve,Ye,At,gn){if(Ve.contains(Ye)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ve.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ve)}var Jt=GGBAppletUtils.getScale(ue,Ve,gn);At.parentNode!==null&&(!isNaN(Jt)&&Jt!==1?(GGBAppletUtils.scaleElement(At,Jt),At.parentNode.style.width=ue.width*Jt+"px",At.parentNode.style.height=ue.height*Jt+"px"):(GGBAppletUtils.scaleElement(At,1),At.parentNode.style.width=ue.width+"px",At.parentNode.style.height=ue.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ve),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Mn.onExitFullscreen=function(Ve,Ye){Ye.appendChild(Ve)};var ft=function(Ve,Ye,At,gn){Je(Ve,Ye,!0);for(var Jt=function(){var Vt=[];for(Gt=0;Gt<Ve.childNodes.length;Gt++)Vt.push(Ve.childNodes[Gt]);if(window.GGBT_wsf_view){var Nt=window.GGBT_wsf_view.renderFullScreen(Ve,Ye.id),ve=document.getElementById("fullscreencontainer"),se=jQuery(Ve).find(".fullscreencontent");se.length>0?(Nt.remove(),se.attr("id","fullscreencontent").show(),jQuery(ve).append(se),window.dispatchEvent(new Event("resize"))):kt(Nt,Ye,!1),window.GGBT_wsf_view.launchFullScreen(ve)}else We=gn,kt(Ve,Ye,!1);if(!window.GGBT_wsf_view)for(Gt=0;Gt<Vt.length;Gt++)Ve.removeChild(Vt[Gt])},un=Ve.getElementsByClassName("ggb_preview_play"),Gt=0;Gt<un.length;Gt++)un[Gt].addEventListener("click",Jt,!1),un[Gt].addEventListener("ontouchstart",Jt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ve),He()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Dt=function(){var Ve=document.createElement("div");if(Ve.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ye='.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");}',At=document.createElement("style");At.styleSheet?At.styleSheet.cssText=Ye:At.appendChild(document.createTextNode(Ye)),document.getElementsByTagName("head")[0].appendChild(At)}return Ve},Et=function(Ve,Ye,At,gn){var Jt=document.createElement("div");Jt.className="ggb_preview",Jt.style.position="absolute",Jt.style.zIndex="90",Jt.style.width=Ve-2+"px",Jt.style.height=Ye-2+"px",Jt.style.top="0px",Jt.style.left="0px",Jt.style.overflow="hidden",Jt.style.backgroundColor="white";var un="lightgrey";At!==void 0&&(At==="none"?un="transparent":un=At),Jt.style.border="1px solid "+un;var Gt=document.createElement("img");if(Gt.style.position="relative",Gt.style.zIndex="1000",Gt.style.top="-1px",Gt.style.left="-1px",st!==null&&Gt.setAttribute("src",st),Gt.style.opacity=.7,wt!==null){var Vt,Nt,ve;if(!gn){Vt=document.createElement("img"),Vt.style.position="absolute",Vt.style.zIndex="1001",Vt.style.opacity=1,Gt.style.opacity=.3,Nt=360,Nt>Ve/4*3&&(Nt=Ve/4*3),ve=Nt/5.8,Vt.setAttribute("src",wt),Vt.setAttribute("width",Nt),Vt.setAttribute("height",ve);var se=(Ve-Nt)/2,oe=(Ye-ve)/2;Vt.style.left=se+"px",Vt.style.top=oe+"px",Jt.appendChild(Vt)}}return Jt.appendChild(Gt),Jt},ut=function(Ve){return Ve=Ve.toLowerCase(),Ve==="html5"||Ve==="screenshot"?Ve:"html5"},Be=["web","webSimple","web3d","tablet","tablet3d","phone"],be=function(Ve,Ye){if(vt=Ve,Ye){ht(vt,!0);return}var At=!je;if(At){var gn=Ze(vt);!isNaN(gn)&&gn<4.4&&(At=!1)}var Jt,un;window.location.protocol.substr(0,4)==="http"?Jt=window.location.protocol:Jt="http:";var Gt=vt.indexOf("//");Gt>0?un=vt:Gt===0?un=Jt+vt:un="https://www.geogebra.org/apps/5.2.814.0/";for(var Vt in Be)if(vt.slice(Be[Vt].length*-1)===Be[Vt]||vt.slice((Be[Vt].length+1)*-1)===Be[Vt]+"/"){ht(un,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&At&&!pe.is3D&&!pe.AV&&!pe.SV&&!pe.CV&&!pe.EV2&&!pe.CP&&!pe.PC&&!pe.DA&&!pe.FI&&!pe.PV&&!et(ue.showToolBar)&&!et(ue.showMenuBar)&&!et(ue.showAlgebraInput)&&!et(ue.enableRightClick)&&(!ue.appName||ue.appName=="classic")?un+="webSimple/":un+="web3d/",ht(un,!1)},ht=function(Ve,Ye){if(Ve.requirejs){ct=Ve;return}Ve.slice(-1)!=="/"&&(Ve+="/"),ct=Ve,Ye===null&&(Ye=Ve.indexOf("http")===-1),De=Ye,nt="web.nocache.js",dt=!1;var At=ct.split("/");At.length>1&&(!Ye&&At[At.length-2]==="webSimple"?(nt="webSimple.nocache.js",dt=!0):Be.indexOf(At[At.length-2])>=0&&(nt=At[At.length-2]+".nocache.js")),At=Ve.split("/"),vt=At[At.length-3],vt.substr(0,4)==="test"?vt=vt.substr(4,1)+"."+vt.substr(5,1):(vt.substr(0,3)==="war"||vt.substr(0,4)==="beta")&&(vt="5.0");var gn=parseFloat(vt);gn!==NaN&&gn<5&&Ve.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+gn+" is deprecated. Using version latest instead."),be("5.0",Ye))},nn=function(Ve,Ye){window.console&&window.console.log&&(!Ye||typeof Ye.showLogging=="undefined"||Ye.showLogging&&Ye.showLogging!=="false")&&console.log(Ve)};ue.material_id!==void 0?Ue(Wt):Wt();function Wt(){var Ve=sn;_e!==null?Ve=_e:parseFloat(Ve)<5&&(Ve="5.0"),be(Ve,!1),Ae!==null&&ht(Ae,De),xe=!0}return Mn},GGBAppletUtils=function(){"use strict";function Mn(){return window.GGBT_wsf_edit!==void 0}function sn(xe,_e){_e!=1?(xe.style.transformOrigin="0% 0% 0px",xe.style.webkitTransformOrigin="0% 0% 0px",xe.style.transform="scale("+_e+","+_e+")",xe.style.webkitTransform="scale("+_e+","+_e+")",xe.style.maxWidth="initial",xe.querySelector(".ggb_preview")!==null&&(xe.querySelector(".ggb_preview").style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(xe.style.transform="none",xe.style.webkitTransform="none")}function ue(xe,_e,Ae,Se,Me,Ke){var ct=null;if(Ke!=null&&Ke!="")for(var De=xe.parentNode;De!=null;)if((" "+De.className+" ").indexOf(" "+Ke+" ")>-1){ct=De;break}else De=De.parentNode;var We=0,vt=0,nt=0,dt=0,st=0,wt=0,en=0;if(ct)We=ct.offsetWidth,vt=Math.max(Se?ct.offsetWidth:0,ct.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(We=Math.min(window.innerWidth,document.documentElement.clientWidth),vt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=We):(We=window.innerWidth,vt=window.innerHeight,nt=window.innerWidth),xe){var it=xe.getBoundingClientRect();it.left>0&&it.left<=We&&(Me===void 0||!Me)&&(document.dir==="rtl"?(st=We-it.width-it.left,wt=nt<=480?10:30):(wt=it.left,st=nt<=480?10:30),dt=wt+st)}if(xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var mt=xe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(dt=40,en=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(dt=0,en=40)}}return xe&&((Ae===void 0||!Ae)&&_e>0&&_e+dt<We?We=_e:We-=dt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ae===void 0||!Ae)&&(vt-=en)),{width:We,height:vt}}function pe(xe,_e,Ae,Se,Me){if(xe.isScreenshoGenerator)return 1;var Ke=Se!==void 0&&Se,ct=xe.noScaleMargin!=null&&xe.noScaleMargin,De=function(mt){return mt&&mt!=="false"},We=De(xe.autoHeight),vt=ue(_e,xe.width,Ae,We,Ke&&window.GGBT_wsf_view||ct,Me),nt=parseInt(vt.width),dt=xe.width,st=xe.height;if(dt===void 0){var wt=_e.querySelector(".appletParameters");wt&&(dt=wt.offsetWidth,st=wt.offsetHeight)}var en=nt/dt,it=Ke?1:vt.height/st;return Ae!==void 0&&!Ae&&(en=Math.min(1,en),it=Math.min(1,it)),Math.min(en,it)}function je(xe,_e,Ae){var Se=1,Me,Ke=!1;if(xe.hasOwnProperty("allowUpscale")&&(Ke=xe.allowUpscale),xe.hasOwnProperty("scale")&&(Se=parseFloat(xe.scale),(isNaN(Se)||Se===null||Se===0)&&(Se=1),Se>1&&(Ke=!0)),_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ke=!0),!(xe.hasOwnProperty("disableAutoScale")&&xe.disableAutoScale))Me=pe(xe,_e,Ke,Ae,xe.scaleContainerClass);else return Se;return Ke&&(!xe.hasOwnProperty("scale")||Se===1)?Me:Math.min(Se,Me)}function Fe(xe){var _e=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),Se=xe.getBoundingClientRect(),Me=(_e-Se.width)/2,Ke=(Ae-Se.height)/2;Ke<0&&(Ke=0),xe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Me<40?xe.style.left="40px":xe.style.left=Me+"px",xe.style.top=Ke+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ke<40?xe.style.top="40px":xe.style.top=Ke+"px",xe.style.left=Me+"px")}function tt(xe,_e){var Ae=xe.querySelector(".appletParameters");if(Ae){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_e.id!==Ae.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}if(Ae.parentElement&&/fullscreen/.test(Ae.parentElement.className))return;var Se=je(_e,xe);Mn()&&Ae.setAttribute("data-param-scale",Se);for(var Me=null,Ke=0;Ke<xe.childNodes.length;Ke++)if(xe.childNodes[Ke].className!==void 0&&xe.childNodes[Ke].className.match(/^applet_scaler/)){Me=xe.childNodes[Ke];break}if(Me!==null&&Me.querySelector(".noscale")!==null)return;var ct=_e.id!==void 0?_e.id:"ggbApplet",De=window[ct];(De==null||!De.recalculateEnvironments)&&Me!==null&&!Me.className.match(/fullscreen/)&&(Me.parentNode.style.transform="",!isNaN(Se)&&Se!==1?(Me.parentNode.style.width=_e.width*Se+"px",Me.parentNode.style.height=_e.height*Se+"px",sn(Me,Se)):(sn(Me,1),Me.parentNode.style.width=_e.width+"px",Me.parentNode.style.height=_e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(xe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ae).parents(".content-added-content"))}}return{responsiveResize:tt,isFlexibleWorksheetEditor:Mn,positionCenter:Fe,getScale:je,scaleElement:sn}}();__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 Mn=n.location.search;return Mn.indexOf(J)!=-1||Mn.indexOf(K)!=-1}function q(Mn,sn){}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(Mn){var sn=s[L].bindings;s[L].bindings=function(){for(var ue=sn?sn():{},pe=Mn[webModule.__softPermutationId],je=O;je<pe.length;je++){var Fe=pe[je];ue[Fe[O]]=Fe[P]}return ue}};var t;function u(){return v(),t}function v(){if(!t){var Mn=o.createElement(Q);if(Mn.id=L,Mn.style.cssText=R+S,Mn.tabIndex=-1,o.body.appendChild(Mn),t=Mn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var sn=document.compatMode==U?V:W;t.write(sn+X),t.close()}}}function w(Mn){function sn(pe){function je(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=je();if(Fe){pe();return}function tt(){if(!Fe){if(!je())return;Fe=!0,pe(),o.removeEventListener&&o.removeEventListener(Z,tt,!1),xe&&clearInterval(xe)}}o.addEventListener&&o.addEventListener(Z,tt,!1);var xe=setInterval(function(){tt()},$)}function ue(pe){var je=u(),Fe=je.body,tt=je.createElement(_);tt.language=ab,tt.crossOrigin=W,tt.src=pe,webModule.__errFn&&(tt.onerror=function(){webModule.__errFn(L,new Error(bb+pe))}),Fe.appendChild(tt)}sn(function(){ue(Mn)})}webModule.__startLoadingFragment=function(Mn){return C(Mn)},webModule.__installRunAsyncCode=function(Mn){var sn=u(),ue=sn.body,pe=sn.createElement(_);pe.language=ab,pe.text=Mn,ue.appendChild(pe),ue.removeChild(pe)};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(Mn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Mn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Mn){var sn=c[Mn];return sn==null?null:sn},r=d,webModule.__errFn=e}function B(){function Mn(xe){var _e=xe.lastIndexOf(rb);_e==-1&&(_e=xe.length);var Ae=xe.indexOf(sb);Ae==-1&&(Ae=xe.length);var Se=xe.lastIndexOf(tb,Math.min(Ae,_e));return Se>=O?xe.substring(O,Se+P):W}function sn(xe){if(!xe.match(/^\w+:\/\//)){var _e=o.createElement(ub);_e.src=xe+vb,xe=Mn(_e.src)}return xe}function ue(){var xe=__gwt_getMetaProperty(wb);return xe!=null?xe:W}function pe(){for(var xe=o.getElementsByTagName(_),_e=O;_e<xe.length;++_e)if(xe[_e].src.indexOf(xb)!=-1)return Mn(xe[_e].src);return W}function je(){var xe=o.getElementsByTagName(yb);return xe.length>O?xe[xe.length-P].href:W}function Fe(){var xe=o.location;return xe.href==xe.protocol+zb+xe.host+xe.pathname+xe.search+xe.hash}var tt=ue();return tt==W&&(tt=pe()),tt==W&&(tt=je()),tt==W&&Fe()&&(tt=Mn(o.location.href)),tt=sn(tt),tt}function C(Mn){return Mn.match(/^\//)||Mn.match(/^[a-zA-Z]+:\/\//)?Mn:webModule.__moduleBase+Mn}function D(){var Mn=[],sn=O,ue=[],pe=[];function je(xe){var _e=pe[xe](),Ae=ue[xe];if(_e in Ae)return _e;var Se=[];for(var Me in Ae)Se[Ae[Me]]=Me;throw r&&r(xe,Se,_e),null}if(__gwt_isKnownPropertyValue=function(xe,_e){return _e in ue[xe]},webModule.__getPropMap=function(){var xe={};for(var _e in ue)ue.hasOwnProperty(_e)&&(xe[_e]=je(_e));return xe},webModule.__computePropValue=je,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var tt=Fe.indexOf(Db);tt!=-1&&(sn=parseInt(Fe.substring(tt+P),$),Fe=Fe.substring(O,tt))}catch(xe){}return webModule.__softPermutationId=sn,C(Fe+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})()},33045:function(Mn,sn,ue){"use strict";ue.d(sn,{Ax:function(){return tt},Ds:function(){return xe},KI:function(){return Ae},SI:function(){return Fe},f1:function(){return je}});var pe=ue(82506);function je(Se){let Me=!0;if(Se.length>0){for(let Ke=0;Ke<Se.length;Ke++)if(Se[Ke].compile_success==0||!Se[Ke].compile_success){Me=!1;break}}else Me=!1;return Me}function Fe(Se,Me=""){let Ke=[];for(let ct=0;ct<Se.length;ct++){let De=Se[ct],We=Me?`${Me}/${De.name}`:`${De.name}`;Ke.push({title:De.name,type:De.type,isLeaf:De.type!=="tree",key:We})}return Ke}function tt(Se,Me,Ke){for(let ct=0;ct<Se.length;ct++){let De=Se[ct];if(De.key===Me){De.children=Ke;break}De.children&&tt(De.children,Me,Ke)}return Se}function xe(Se,Me,Ke){let ct;return function(){let De=this,We=arguments,vt=function(){ct=null,Ke||Se.apply(De,We)},nt=Ke&&!ct;clearTimeout(ct),ct=setTimeout(vt,Me),nt&&Se.apply(De,We)}}const _e=!0,Ae=pe.Z.API_SERVER},80137:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return ct}});var pe=ue(59301),je={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=ue(92310),tt=ue.n(Fe),xe=ue(71418),_e=ue(2859),Ae=ue(56640),Se=ue(5871),Me=(De,We,vt)=>new Promise((nt,dt)=>{var st=it=>{try{en(vt.next(it))}catch(mt){dt(mt)}},wt=it=>{try{en(vt.throw(it))}catch(mt){dt(mt)}},en=it=>it.done?nt(it.value):Promise.resolve(it.value).then(st,wt);en((vt=vt.apply(De,We)).next())}),ct=({data:De,className:We,fullWidth:vt,style:nt={},onClose:dt,onOk:st,showFullTools:wt,noAssociationId:en})=>{const it=(0,pe.useRef)(null),mt=(0,pe.useRef)(null),Ze=(0,pe.useRef)(null),Ee=(0,pe.useRef)(null),[He,Ue]=(0,pe.useState)(!1),[Ct,Ge]=(0,pe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,pe.useEffect)(()=>{Ze.current||(Ze.current=document.createElement("style"),document.head.appendChild(Ze.current)),De!=null&&De.visible?(document.body.setAttribute("data-custom","y-hidden"),Ze.current.innerHTML=" html { overflow-y: hidden; }",De!=null&&De.src&&It()):(document.body.removeAttribute("data-custom"),Ze.current&&(document.head.removeChild(Ze.current),Ze.current=null))},[De==null?void 0:De.visible]);const It=()=>Me(void 0,null,function*(){Ue(!0),Ge("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ft=yield(0,Se.ZJ)(De==null?void 0:De.src);it.current.src="",it.current.src=ft,it.current.onload=function(){Ut()},Ue(!1),Ge("")}),et=()=>{document.body.removeAttribute("data-custom"),Ze.current.innerHTML=" ",dt()},kt=ft=>Me(void 0,null,function*(){Ue(!0),Ge("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Dt=yield(0,Ae.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:De.title,file:ft.dataUrl}});Dt!=null&&Dt.id&&!en?(yield(0,Ae.ZP)(`/api/attachments/${De.id}/add_subitem.json`,{method:"post",body:{subitem_id:Dt==null?void 0:Dt.id,settings:JSON.stringify(ft.state)}})).status===0&&st():Dt!=null&&Dt.id&&st(Dt),document.body.removeAttribute("data-custom"),Ze.current.innerHTML=" ",Ue(!1),Ge("")}),Je=()=>{const ft=document.querySelector('a[href="https://markerjs.com/"]');ft&&ft.parentNode&&(ft.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(Et=>{const ut=document.querySelector(Et.name);ut&&ut.setAttribute("title",Et.title)})},Ut=()=>{mt.current=new _e.hP(it.current),mt.current.targetRoot=Ee.current,mt.current.addEventListener("render",kt),mt.current.addEventListener("beforeclose",et),wt&&(mt.current.availableMarkerTypes=mt.current.ALL_MARKER_TYPES,mt.current.uiStyleSettings.redoButtonVisible=!0,mt.current.uiStyleSettings.notesButtonVisible=!0,mt.current.uiStyleSettings.zoomButtonVisible=!0,mt.current.uiStyleSettings.zoomOutButtonVisible=!0,mt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=mt.current.uiStyleSettings,mt.current.show(),De!=null&&De.snapshotData&&mt.current.restoreState(De.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Je()},300)};return pe.createElement(pe.Fragment,null,(De==null?void 0:De.visible)&&pe.createElement(xe.Z,{spinning:He,tip:Ct,style:{position:"absolute"}},pe.createElement("div",{ref:Ee,className:tt()(je.imageDimensions,We,vt?je.fullWidth:""),style:nt},pe.createElement("img",{className:je.img,ref:it}))))}},69923:function(Mn,sn,ue){"use strict";var pe=ue(59301),je=ue(95237),Fe=ue(43604),tt=ue(99313),xe=ue(3113),_e=ue(33754),Ae=ue(20699),Se=ue(48136),Me=ue(59301);const Ke=(0,pe.forwardRef)(({callback:ct,showSaveButton:De,value:We=""},vt)=>{const nt=(0,pe.useRef)(),dt=[{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 "}]}]}],st=[{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}`}]}]}],wt=mt=>{nt.current.setValue(nt.current.getValue()+" "+mt.value+" ")},en=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Me.createElement(je.Z,{className:Ae.Z.lists,gutter:[10,10]},dt.map((mt,Ze)=>Me.createElement(Fe.Z,{flex:"110px",className:Ae.Z.item},Me.createElement("div",null,Me.createElement(_e.Z,{value:`$$${mt.value}$$`}),mt.name),Me.createElement("div",{className:Ae.Z.children},mt.children.map((Ee,He)=>Me.createElement("div",{key:He},Me.createElement("h1",null,Ee.name),Me.createElement(je.Z,{gutter:[10,10]},Ee.data.map((Ue,Ct)=>Me.createElement(Fe.Z,{key:Ct,onClick:()=>wt(Ue),className:Ae.Z.diamond},Me.createElement(_e.Z,{value:"`$$"+Ue.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Me.createElement(je.Z,{className:Ae.Z.lists,gutter:[10,10]},st.map((mt,Ze)=>Me.createElement(Fe.Z,{flex:"110px",className:Ae.Z.item},Me.createElement("div",null,Me.createElement(_e.Z,{value:"`$$"+mt.value+"$$`"}),mt.name),Me.createElement("div",{className:Ae.Z.children},mt.children.map((Ee,He)=>Me.createElement("div",{key:He},Ee.name&&Me.createElement("h1",null,Ee.name),Me.createElement(je.Z,{gutter:[10,10]},Ee.data.map((Ue,Ct)=>Me.createElement(Fe.Z,{key:Ct,onClick:()=>wt(Ue),className:Ae.Z.diamond},Me.createElement(_e.Z,{value:"`$$"+Ue.value+"$$`"}))))))))))}],it=()=>{var mt=document.createElement("div");mt.innerHTML=nt.current.getValue();var Ze=mt.innerText;return ct&&ct(Ze),Ze};return(0,pe.useImperativeHandle)(vt,()=>({getData:it})),Me.createElement("div",{className:Ae.Z.mathWrap},Me.createElement(tt.default,{defaultActiveKey:"1",items:en}),Me.createElement("math-field",{locale:"zh_cn",className:Ae.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},We||""),De&&Me.createElement("div",{className:Ae.Z.button},Me.createElement(xe.ZP,{size:"large",onClick:it,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});sn.Z=Ke},45326:function(Mn,sn,ue){"use strict";ue.d(sn,{h:function(){return mt}});var pe=ue(59301),je=ue(57809),Fe=ue(78241),tt=ue(3113),xe=ue(89780),_e=ue.n(xe),Ae=ue(41913),Se=ue(8682),Me=Object.defineProperty,Ke=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,nt=(Ze,Ee,He)=>Ee in Ze?Me(Ze,Ee,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ze[Ee]=He,dt=(Ze,Ee)=>{for(var He in Ee||(Ee={}))We.call(Ee,He)&&nt(Ze,He,Ee[He]);if(De)for(var He of De(Ee))vt.call(Ee,He)&&nt(Ze,He,Ee[He]);return Ze},st=(Ze,Ee)=>Ke(Ze,ct(Ee));const wt=je.default.Option,en={labelCol:{span:4},wrapperCol:{span:20}},it={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"]};sn.Z=({callback:Ze,onCancel:Ee})=>{const[He,Ue]=(0,pe.useState)("python");function Ct(It){Ue(it[It][1])}function Ge(It){Ze(It)}return pe.createElement(Fe.default,st(dt({},en),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ge,style:{width:500}}),pe.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},pe.createElement(je.default,{getPopupContainer:It=>It.parentNode,onChange:Ct},Object.keys(it).map(It=>pe.createElement(wt,{key:It,value:It},it[It][0])))),pe.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},pe.createElement(mt,{mode:He})),pe.createElement("div",{className:"flex-container flex-end"},pe.createElement(tt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(tt.ZP,{type:"ghost",onClick:Ee},"\u53D6\u6D88")))};function mt({value:Ze,onChange:Ee,mode:He,options:Ue={}}){const Ct=(0,pe.useRef)(),[Ge,It]=(0,pe.useState)();return(0,pe.useEffect)(()=>{if(Ge){let et=function(kt){const Je=kt.getValue();Ee&&Ee(Je)};return Ge.on("change",et),()=>{Ge.off("change",et)}}},[Ge,Ee]),(0,pe.useEffect)(()=>{Ge&&Ge.setOption("mode",He)},[Ge,He]),(0,pe.useEffect)(()=>{Ge&&(Ze!==Ge.getValue()||Ze==="")&&setTimeout(()=>{Ge.setValue(Ze||"")},300)},[Ge,Ze]),(0,pe.useEffect)(()=>{if(Ct.current&&!Ge){const et=_e().fromTextArea(Ct.current,dt({mode:He,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ue));It(et)}},[Ct.current,Ge]),pe.createElement("div",{className:"my-codemirror-container"},pe.createElement("textarea",{ref:Ct}))}},41722:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Nr}});var pe=ue(59301),je=ue(89780),Fe=ue.n(je),tt=ue(76374),xe=ue(41913),_e=ue(6313),Ae=ue(25717),Se=ue(99498),Me=ue(25419),Ke=ue(67549),ct=ue(33754),De=({value:Jn="",className:lr,showTextOnly:Rn,showLines:$n,style:wr={}})=>{const lt=(0,pe.useMemo)(()=>"",[Jn]);return pe.createElement(pe.Fragment,null,pe.createElement("div",{dangerouslySetInnerHTML:{__html:lt}}))},We=ue(59301),vt=Object.defineProperty,nt=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,it=(Jn,lr,Rn)=>lr in Jn?vt(Jn,lr,{enumerable:!0,configurable:!0,writable:!0,value:Rn}):Jn[lr]=Rn,mt=(Jn,lr)=>{for(var Rn in lr||(lr={}))wt.call(lr,Rn)&&it(Jn,Rn,lr[Rn]);if(st)for(var Rn of st(lr))en.call(lr,Rn)&&it(Jn,Rn,lr[Rn]);return Jn},Ze=(Jn,lr)=>nt(Jn,dt(lr));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 He({onActionCallback:Jn,title:lr,icon:Rn,actionName:$n,className:wr="",children:lt}){function ke(){Jn($n)}return We.createElement("a",{title:lr,className:wr,onClick:ke},We.createElement("i",{className:`${Rn}`}),lt)}var Ue=({watch:Jn,showNullButton:lr,showNullProgramButton:Rn,onActionCallback:$n,fullScreen:wr,insertTemp:lt,hidetoolBar:ke,extraUse:Oe})=>{const Te=[...Ee,{title:`${Jn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Jn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return We.createElement("ul",{className:"markdown-toolbar-container"},!ke&&Te.map((Pe,Qe)=>We.createElement("li",{key:Qe},Pe.actionName?We.createElement(He,Ze(mt({},Pe),{onActionCallback:$n})):We.createElement("span",{className:"v-line"}))),lr?We.createElement("li",null,We.createElement(He,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:$n},We.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Rn?We.createElement(We.Fragment,null,We.createElement("li",null,We.createElement(He,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:$n},We.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),We.createElement("li",null,We.createElement(He,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:$n},We.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,lt&&We.createElement("li",null,We.createElement(He,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${lt}`,onActionCallback:$n},We.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Oe&&We.createElement("li",null,Oe),We.createElement("li",{className:"btn-full-screen"},We.createElement(He,{icon:`${wr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:wr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:$n})))},Ct=ue(55444),Ge=ue(78241),It=ue(92832),et=ue(3113),kt=Object.defineProperty,Je=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,ut=(Jn,lr,Rn)=>lr in Jn?kt(Jn,lr,{enumerable:!0,configurable:!0,writable:!0,value:Rn}):Jn[lr]=Rn,Be=(Jn,lr)=>{for(var Rn in lr||(lr={}))Dt.call(lr,Rn)&&ut(Jn,Rn,lr[Rn]);if(ft)for(var Rn of ft(lr))Et.call(lr,Rn)&&ut(Jn,Rn,lr[Rn]);return Jn},be=(Jn,lr)=>Je(Jn,Ut(lr));const ht={labelCol:{span:4},wrapperCol:{span:20}};var nn=({callback:Jn,onCancel:lr})=>{function Rn($n){Jn($n)}return pe.createElement(Ge.default,be(Be({},ht),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Rn,style:{width:500}}),pe.createElement(Ge.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},pe.createElement(It.default,null)),pe.createElement(Ge.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},pe.createElement(It.default,null)),pe.createElement("div",{className:"flex-container flex-end"},pe.createElement(et.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(et.ZP,{type:"ghost",onClick:lr},"\u53D6\u6D88")))},Wt=ue(45326),Ve=ue(96554),Ye=ue(43418),At=ue(95237),gn=ue(80137),Jt=ue(59301),un=({callback:Jn,onCancel:lr})=>{const Rn=document.createElement("canvas"),$n=Rn.getContext("2d");Rn.width=1e3,Rn.height=800,$n.fillStyle="#ffffff",$n.fillRect(0,0,Rn.width,Rn.height);const wr=Rn.toDataURL("image/png");return Jt.createElement(Ye.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Jt.createElement(At.Z,{style:{height:"100vh"}},Jt.createElement(gn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:wr,visible:!0,title:String(Date.now())},onOk:lt=>{Jn({src:lt.url})},onClose:lr})))},Gt=ue(43428),Vt=ue(43604),Nt=ue(8591),ve={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},se=ue(59301),de=(0,pe.forwardRef)(({onCancel:Jn,editImgId:lr,callback:Rn},$n)=>{let wr=(0,pe.useRef)(),lt=(0,pe.useRef)(),ke=(0,pe.useRef)(),Oe=(0,pe.useRef)(!1);const Te=(0,pe.useRef)(!1);console.log("ref:",$n);const[Pe,Qe]=(0,pe.useState)(0),[pt,Yt]=(0,pe.useState)("100vh");return(0,pe.useEffect)(()=>{Qe(1)},[]),(0,pe.useImperativeHandle)($n,()=>({setHeight:Yt})),se.createElement("div",{ref:Te,className:"body-overflow-initial"},se.createElement(Gt.Z,{width:"100vw",height:pt,footer:null,closable:!0,placement:"bottom",open:!!Pe,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ve.drawerWrap}`,onClose:()=>{window.saveDrawData($t=>{Rn({src:`/api/attachments/${$t}`,id:$t})})},title:se.createElement(At.Z,{align:"middle"},se.createElement(Vt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),se.createElement(Vt.Z,{onClick:()=>{Yt(pt==="60px"?"100vh":"60px")}},se.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),se.createElement(Vt.Z,{onClick:()=>{window.saveDrawData($t=>{if($t===null){Nt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Nt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Rn({src:`/api/attachments/${$t}`,id:$t,disabledClose:!0})})}},se.createElement(et.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},se.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${lr||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:lt})))}),fe=ue(82506),le=ue(5112),Ie=ue(20071);const ot=le.ZP.Group,Kt={margin:"0 8px"};var Ft=({callback:Jn,onCancel:lr})=>{function Rn($n){Jn($n)}return pe.createElement(Ge.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Rn},pe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},pe.createElement("span",{style:Kt},"\u5355\u5143\u683C\u6570\uFF1A"),pe.createElement("span",{style:Kt},"\u884C\u6570"),pe.createElement(Ge.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},pe.createElement(Ie.Z,null)),pe.createElement("span",{style:Kt},"\u5217\u6570"),pe.createElement(Ge.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},pe.createElement(Ie.Z,null))),pe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},pe.createElement("span",{style:Kt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),pe.createElement(Ge.default.Item,{name:"align"},pe.createElement(ot,null,pe.createElement(le.ZP,{value:"default"},pe.createElement("i",{className:"fa fa-align-justify"})),pe.createElement(le.ZP,{value:"left"},pe.createElement("i",{className:"fa fa-align-left"})),pe.createElement(le.ZP,{value:"center"},pe.createElement("i",{className:"fa fa-align-center"})),pe.createElement(le.ZP,{value:"right"},pe.createElement("i",{className:"fa fa-align-right"}))))),pe.createElement("div",{className:"flex-container flex-end"},pe.createElement(et.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(et.ZP,{type:"ghost",onClick:lr},"\u53D6\u6D88")))},Xt=ue(78673),Qt=ue(5296),on=ue.n(Qt),Cn=(0,pe.forwardRef)(({use3d:Jn,width:lr,height:Rn,callback:$n,showSaveButton:wr},lt)=>{const ke=(0,pe.useRef)(),Oe=(0,pe.useRef)(),[Te,Pe]=(0,pe.useState)(!1),Qe=(0,pe.useRef)({id:ke,appName:"graphing",width:lr||1e3,height:Rn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,pe.useEffect)(()=>{Oe.current=new(on())(Qe.current,!0),window.onload=function(){Oe.current.inject("applet_container")}},[]);const pt=()=>{var Yt=window.ggbApplet.getPNGBase64(1,!0,72);return $n&&$n(Yt),Yt};return(0,pe.useEffect)(()=>{Qe.current.appName=Te?"3D":"graphing",Oe.current.inject("applet_container")},[Te]),(0,pe.useEffect)(()=>{Pe(Jn)},[Jn]),(0,pe.useImperativeHandle)(lt,()=>({getImgData:pt})),pe.createElement(pe.Fragment,null,pe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ke}),pe.createElement(At.Z,{align:"middle"},pe.createElement(Vt.Z,{flex:1},pe.createElement(Xt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Te,onChange:Yt=>Pe(Yt)})),pe.createElement(Vt.Z,null,pe.createElement(et.ZP,{size:"large",onClick:pt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),bt=ue(69923),hn=ue(1012);const On="link",rt="upload-image",ze="add-flowchart",Xe="draw-image",jt="add-flowchart",tn="code-block",cn="add-table",Dn="------------",Tn={default:Dn,left:`:${Dn}`,center:`:${Dn}:`,right:`${Dn}:`};var _n=ue(8184),Fn=(Jn,lr,Rn)=>new Promise(($n,wr)=>{var lt=Te=>{try{Oe(Rn.next(Te))}catch(Pe){wr(Pe)}},ke=Te=>{try{Oe(Rn.throw(Te))}catch(Pe){wr(Pe)}},Oe=Te=>Te.done?$n(Te.value):Promise.resolve(Te.value).then(lt,ke);Oe((Rn=Rn.apply(Jn,lr)).next())});function jn(){}let An=0;const hr=1e4,kr="\u2581",Tr="@\u2581\u2581@",Hr="@\u2581@",sr=`
|
|
|
**\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`,Mr=["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 rr(Jn){return/^\d+$/.test(Jn)?`${Jn}px`:Jn}const Fr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",_r={[Fr+"-B"]:"bold",[Fr+"-I"]:"italic"},jr={[On]:"\u6DFB\u52A0\u94FE\u63A5",[tn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[rt]:"\u6DFB\u52A0\u56FE\u7247",[Xe]:"\u6DFB\u52A0\u753B\u56FE",[ze]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[cn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Nr=({defaultValue:Jn="",onChange:lr,width:Rn="100%",height:$n=400,miniToolbar:wr=!1,isFocus:lt=!1,watch:ke,insertTemp:Oe,mode:Te="markdown",id:Pe="markdown-editor-id",showResizeBar:Qe=!1,noStorage:pt=!1,showNullButton:Yt=!1,showNullProgramButton:$t=!1,hidetoolBar:qt=!1,fullScreen:vn=!1,onBlur:wn,onCMBeforeChange:Sn,onFullScreen:Bt,className:dn="",disablePaste:at=!1,disabled:Mt=!1,disabledFill:Pt=!1,placeholder:Rt="",values:an="",extraUse:Tt,onAddBlank:rn})=>{const[$e,xt]=(0,pe.useState)(null),[St,zt]=(0,pe.useState)(Jn),[Ot,Ht]=(0,pe.useState)(ke),[Zt,mn]=(0,pe.useState)(vn),[xn,Ln]=(0,pe.useState)(""),[zn,er]=(0,pe.useState)(0),[cr,Un]=(0,pe.useState)($n),[In,fr]=(0,pe.useState)(!1),tr=(0,pe.useRef)((0,hn.Z)()),yr=(0,pe.useRef)(!1),Gn=(0,pe.useRef)(),[Xn,br]=(0,pe.useState)(0),[ur,Br]=(0,pe.useState)(0),Gr=(0,pe.useRef)(),ar=(0,pe.useRef)(),kn=(0,pe.useRef)(),En=(0,pe.useRef)(),gr=(0,pe.useRef)(),nr=(0,pe.useRef)(),Er=()=>Fn(void 0,null,function*(){var Yn;const Vn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tr.current}});(Yn=Vn==null?void 0:Vn.attachments)!=null&&Yn.length&&(console.log("cm:",$e,Gr),Vn.attachments.map(Zn=>{Zn.content_type.indexOf("image")>-1?$e.replaceSelection(``):Zn.content_type.indexOf("video")>-1?$e.replaceSelection(`<video width="100%" controls src="${fe.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Zn.content_type.indexOf("pdf")>-1?$e.replaceSelection(`<a href="${fe.Z.API_SERVER}/api/attachments/${Zn.id}?type=${Zn.content_type}&disposition=inline" target="_blank">${Zn.name}</a>`):$e.replaceSelection(`[${Zn.name}](${fe.Z.API_SERVER}/api/attachments/${Zn.id}?type=${Zn.content_type})`)}))});(0,pe.useEffect)(()=>{const Yn=window.scrollY||window.pageYOffset;zt(an),$e==null||$e.setValue(an),window.scrollTo(0,Yn)},[an]),(0,pe.useEffect)(()=>{Bt==null||Bt(Zt)},[Zt]),(0,pe.useEffect)(()=>{if(Gr.current){let Yn=function(Zn,mr){var ni;if(at){mr.preventDefault();return}const xi=mr.clipboardData;if(xi){const Mi=xi.types.toString(),gi=xi.items;if(Mi==="Files"||xi.types.indexOf("Files")>-1){if(mr.preventDefault(),Te=="stex")return;try{let ci=gi[1];((ni=gi[0])==null?void 0:ni.kind)==="file"&&(ci=gi[0]);const ki=ci.getAsFile(),Hi=ki.name.split(".").pop();(0,Ve.I)(ki,Ni=>{var oa,Xr,ei;Ni.id?((oa=ki==null?void 0:ki.type)==null?void 0:oa.indexOf("image"))>-1?Vn.replaceSelection(`<img width="100%" src="/api/attachments/${Ni.id}?type=${Ni.content_type})" alt="" />`):((Xr=ki==null?void 0:ki.type)==null?void 0:Xr.indexOf("video"))>-1?Vn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ni.id}"></video>`):((ei=ki==null?void 0:ki.type)==null?void 0:ei.indexOf("pdf"))>-1?Vn.replaceSelection(`<a href="/api/attachments/${Ni.id}?type=${ki.type}&disposition=inline" target="_blank">${ki.name}</a>`):Mr.includes(Hi)?Vn.replaceSelection(`<a href="/api/attachments/${Ni.id}?type=office&disposition=inline" target="_blank">${ki.name}</a>`):Vn.replaceSelection(`[${ki.name}](/api/attachments/${Ni.id}?type=${Ni.content_type})`):(Ni==null?void 0:Ni.status)===401&&(Nt.ZP.warning((Ni==null?void 0:Ni.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(ci){Nt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Vn=Fe().fromTextArea(Gr.current,{mode:Te,lineNumbers:!wr,lineWrapping:!0,value:Jn,autoCloseTags:!$t,autoCloseBrackets:!0});return Vn.on("keyup",function(Zn,mr){mr.keyCode===8&&(Zn.getValue()==""?Vn.setOption("placeholder",Rt):Vn.setOption("placeholder",null))}),Vn.on("keydown",function(Zn,mr){if(mr.keyCode===8){var ni=Ir(Zn);ni&&mr.preventDefault()}}),lt&&Vn.focus(),Vn.on("paste",Yn),Vn.on("dragleave",function(Zn,mr){ar.current.classList.remove("mouse-hover-md")}),Mt&&Vn.on("beforeChange",function(Zn,mr){(mr.origin==="paste"||mr.origin==="+input")&&mr.cancel()}),xt(Vn),()=>{Vn.off("paste",Yn)}}},[]);const Lr=(0,pe.useCallback)(()=>{if(ar.current)try{}catch(Yn){console.log(Yn,"---- to set md editor body height")}},[cr,ar,Zt]);(0,pe.useEffect)(()=>{function Yn(){let Vn=new tt.Z(Zn=>{for(let mr of Zn)(mr.target.offsetHeight>0||mr.target.offsetWidth>0)&&(Lr(),$e.setSize("100%","100%"),$e.refresh())});return Vn.observe(Gr.current.parentElement),Vn}if($e){const Vn=Yn();return()=>{var Zn,mr;(Zn=Gr.current)!=null&&Zn.parentElement&&Vn.unobserve((mr=Gr.current)==null?void 0:mr.parentElement)}}},[$e,Lr]),(0,pe.useEffect)(()=>{if($e){let Yn=[];for(const[Vn,Zn]of Object.entries(_r)){let mr={[Vn]:()=>{pr(Zn)}};Yn.push(mr),$e.addKeyMap(mr)}return Gn.current=setInterval(()=>{yr.current&&Er()},4e3),()=>{clearInterval(Gn.current);for(let Vn of Yn)$e.removeKeyMap(Vn)}}},[$e]),(0,pe.useEffect)(()=>{vn!==Zt&&mn(vn)},[vn]),(0,_n.Z)(()=>{if(!pt&&zn>0){let Yn=new Date().getTime(),Vn=window.sessionStorage.getItem(Pe);Yn>=zn+hr&&(!Vn||Vn!==St)&&(window.sessionStorage.setItem(Pe,St),fr(!0))}},hr),(0,pe.useEffect)(()=>{Ht(ke)},[$e,ke]),(0,pe.useEffect)(()=>{$e&<&&$e.focus()},[$e,lt]),(0,pe.useEffect)(()=>{if(Ot&&$e){let Yn=function(Zn){let mr=Zn.target;if(En.current){let ni=mr.scrollTop/mr.scrollHeight;En.current.scrollTop=En.current.scrollHeight*ni}};const Vn=$e.getScrollerElement();return Vn.addEventListener("scroll",Yn),()=>{Vn.removeEventListener("scroll",Yn)}}},[$e,Ot]),(0,pe.useEffect)(()=>{if($e&&Sn){let Yn=function(Vn,Zn){Sn(Vn,Zn)};return $e.on("beforeChange",Yn),()=>{$e.off("beforeChange",Yn)}}},[$e,Sn]),(0,pe.useEffect)(()=>{if($e&&wn){let Yn=function(){wn($e.getValue())};return $e.on("blur",Yn),()=>{$e.off("blur",Yn)}}},[$e,wn]);function Ir(Yn,Vn){var Zn=Yn.getDoc(),mr=Zn.getCursor(),ni=Zn.getLine(mr.line),xi=ni.charAt(mr.ch-1),Mi=ni.lastIndexOf("@\u2581@",mr.ch),gi=ni.lastIndexOf("@\u2581\u2581@",mr.ch),ci=Mi>gi?Mi:gi,ki=Mi>gi?3:4;if(Tr.indexOf(xi)===-1)return null;if(console.log("change1:",Vn,Yn,ni,mr,ci,Mi,gi,xi),ci>=0&&mr.ch-ci<5){var Hi=ci+ki;return Zn.replaceRange("",{line:mr.line,ch:ci},{line:mr.line,ch:Hi}),{line:mr.line,ch:Hi}}return null}(0,pe.useEffect)(()=>{if($e){let Yn=function(Vn,Zn){const mr=Vn.getValue();zt(mr),er(new Date().getTime()),Vn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lr&&($t?lr(mr,di(mr)):lr(mr))};return $e.on("change",Yn),()=>{$e.off("change",Yn)}}},[$e,lr]),(0,pe.useEffect)(()=>{if($e)if(Jn==null)$e.setValue(""),zt("");else{const Yn=window.scrollY||window.pageYOffset;Jn!==$e.getValue()&&($e.setValue(Jn),zt(Jn),$e.setCursor(Mt?1:$e.lineCount(),0),window.scrollTo(0,Yn))}},[$e,Jn]);const pr=(0,pe.useCallback)(Yn=>{const Vn=$e.getCursor(),Zn=$e.getSelection();let mr=Zn.split(`
|
|
|
`);switch(Yn){case"bold":return $e.replaceSelection("**"+Zn+"**"),Zn===""&&$e.setCursor(Vn.line,Vn.ch+2),$e.focus();case"italic":return $e.replaceSelection("*"+Zn+"*"),Zn===""&&$e.setCursor(Vn.line,Vn.ch+1),$e.focus();case"code":return $e.replaceSelection("`"+Zn+"`"),Zn===""&&$e.setCursor(Vn.line,Vn.ch+1),$e.focus();case"inline-latex":return Ln("inline-latex"),$e.focus();case"latex":return $e.replaceSelection("```latex\n"+Zn+"\n```"),$e.setCursor(Vn.line+1,Zn.length+1),$e.focus();case"line-break":return $e.replaceSelection(`<br/>
|
|
|
`),$e.focus();case"list-ul":return Zn===""?$e.replaceSelection("- "+Zn):$e.replaceSelection(mr.map(ni=>ni===""?"":`- ${ni}`).join(`
|
|
|
`)),$e.focus();case"list-ol":return Zn===""?$e.replaceSelection("1. "+Zn):$e.replaceSelection(mr.map((ni,xi)=>ni===""?"":`${xi+1}. ${ni}`).join(`
|
|
|
`)),$e.focus();case"add-null-ch":rn==null||rn();return;case"add-signal":return Zn===""&&$e.setCursor(Vn.line,Vn.ch),$e.replaceSelection(Hr),$e.focus();case"add-multiple":return Zn===""&&$e.setCursor(Vn.line,Vn.ch),$e.replaceSelection(Tr),$e.focus();case"inster-template-1":return Zn===""&&$e.setCursor(Vn.line,Vn.ch),$e.replaceSelection(sr),$e.focus();case"eraser":return $e.setValue(""),$e.focus();case"trigger-watch":return Ht(!Ot),$e.focus();case"trigger-full-screen":return mn(!Zt),$e.focus();case On:Ln(On);return;case tn:Ln(tn);return;case rt:Ln(rt);return;case Xe:Ln(Xe);return;case"maths-latex":Ln("maths-latex");return;case ze:gr.current="",sessionStorage.removeItem("file_id"),Ln(ze);return;case cn:Ln(cn);return;default:throw new Error}},[$e,Ot,Zt]),Sr=(0,pe.useCallback)((Yn,Vn)=>{var Zn,mr,ni,xi,Mi,gi;Ln("");const{src:ci,alt:ki,id:Hi}=Yn||{};switch(xn){case On:const{title:Ai,link:ai}=Yn;return $e.replaceSelection(`[${Ai}](${ai})`),$e.focus();case tn:const{language:fi,content:Ei}=Yn;return $e.replaceSelection(["```"+fi,Ei,"```"].join(`
|
|
|
`)),$e.focus();case"maths-latex":for(var Ni=atob(Yn),oa=new Uint8Array(Ni.length),Xr=0;Xr<Ni.length;Xr++)oa[Xr]=Ni.charCodeAt(Xr);var ei=new Blob([oa],{type:"image/png"});(0,Ve.I)(ei,oi=>{oi.id?$e.replaceSelection(``):(oi==null?void 0:oi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":$e.replaceSelection("`$$"+Yn+"$$`");break;case jt:if(!Hi)return;$e.getValue().indexOf(ci)===-1?$e.replaceSelection(`<center><img id="${Hi}" width="80%" src="${ci}" class="draw-flowchart" alt="${ki||""}" /></center>`):document.getElementById(Hi).src=fe.Z.API_SERVER+ci+"?t="+Date.now();break;case rt:case Xe:const pi=Vn,Pr=(ni=(mr=(Zn=pi==null?void 0:pi.name)==null?void 0:Zn.split("."))==null?void 0:mr.pop)==null?void 0:ni.call(mr);return((xi=pi==null?void 0:pi.type)==null?void 0:xi.indexOf("image"))>-1||!(pi!=null&&pi.type)?pi!=null&&pi.align||pi!=null&&pi.width?$e.replaceSelection(`<p style="text-align:${pi.align||"initial"}"><img width="${pi.width?pi.width+"%":"initial"}" src="${ci}" alt="${ki||""}" /></p>`):$e.replaceSelection(`<img width="100%" src="${ci}" alt="${ki||""}" />`):((Mi=pi==null?void 0:pi.type)==null?void 0:Mi.indexOf("video"))>-1?$e.replaceSelection(`<video width="100%" controls src="${ci}"></video>`):((gi=pi==null?void 0:pi.type)==null?void 0:gi.indexOf("pdf"))>-1?$e.replaceSelection(`<a href="${ci}?type=${pi.type}&disposition=inline" target="_blank">${pi.name}</a>`):Mr.includes(Pr)?$e.replaceSelection(`<a href="${ci}?type=office&disposition=inline" target="_blank">${pi.name}</a>`):$e.replaceSelection(`[${pi.name}](${ci})`),$e.focus();case cn:const{row:Yr,col:Ur,align:zr}=Yn;let ui=`
|
|
|
`;for(let oi=0;oi<Yr;oi++){let zi=[],Wi=[];for(let Zi=0;Zi<Ur;Zi++)oi===1&&Wi.push(Tn[zr]),zi.push(" ");oi===1&&(ui+=`| ${Wi.join(" | ")} |
|
|
|
`),ui+=`| ${zi.join(Ur===1?"":" | ")} |
|
|
|
`}return $e.replaceSelection(ui+`
|
|
|
`),$e.focus();default:throw new Error}},[$e,xn]),ii=(0,pe.useMemo)(()=>{switch(xn){case On:return pe.createElement(nn,{callback:Sr,onCancel:Hn});case tn:return pe.createElement(Wt.Z,{callback:Sr,onCancel:Hn});case rt:return pe.createElement(Ve.Z,{callback:Sr,onCancel:Hn});case ze:return pe.createElement(de,{editImgId:gr.current,callback:Sr,onCancel:Hn});case cn:return pe.createElement(Ft,{callback:Sr,onCancel:Hn});case"maths-latex":return pe.createElement(Cn,{showSaveButton:!0,callback:Sr});case"inline-latex":return pe.createElement(bt.Z,{showSaveButton:!0,callback:Sr});default:return null}},[xn]);function Hn(){Ln("")}(0,pe.useEffect)(()=>{if(kn.current){let Yn=function(Mi){ni=!0,xi=Mi.pageY},Vn=function(){ni=!1},Zn=function(Mi){if(ni){let gi=Mi.pageY-xi;gi<0&&(gi=0),gi>300&&(gi=300);let ci=$n+gi+"px";Un(ci)}},mr=kn.current,ni=!1,xi=0;return mr.addEventListener("mousedown",Yn),document.addEventListener("mousemove",Zn),document.addEventListener("mouseup",Vn),()=>{mr.removeEventListener("mousedown",Yn),document.removeEventListener("mousemove",Zn),document.removeEventListener("mouseup",Vn)}}},[$e,kn]),(0,pe.useEffect)(()=>{Un($n)},[$n]);const qn=rr(Rn),Dr=rr(cr),$r={width:qn,height:Dr},li=(0,pe.useMemo)(()=>{if(zn){let Yn=new Date(zn),Vn=Yn.getHours(),Zn=Yn.getMinutes(),mr=Yn.getSeconds();return Vn=Vn<10?"0"+Vn:Vn,Zn=Zn<10?"0"+Zn:Zn,mr=mr<10?"0"+mr:mr,`${Vn}:${Zn}:${mr}`}return 0},[zn]),di=Yn=>{const Vn=[];if($t){let Zn=-1;Yn=Yn.replace(/(@▁▁@|@▁@)/g,function(mr,ni,xi){Vn.push({multiLine:mr!==Hr})})}return Vn};function ri(){window.sessionStorage.removeItem(Pe),fr(!1),er(0)}function Jr(){fr(!1),er(0),$e.setValue(window.sessionStorage.getItem(Pe))}(0,pe.useEffect)(()=>{jr[xn]&&xn!==Xe&&xn!==ze&&setTimeout(()=>{const Yn=document.getElementsByClassName("markdown-popup-form")[0],Vn=window.innerWidth/2-Yn.offsetWidth/2,Zn=window.innerHeight/2-Yn.offsetHeight/2;br(Vn),Br(Zn)},0)},[xn]);const yi=Yn=>{Yn.preventDefault();const Vn=Yn.clientX-Xn,Zn=Yn.clientY-ur;document.body.onmousemove=mr=>{let ni=mr.clientX-Vn,xi=mr.clientY-Zn;const Mi=document.getElementsByClassName("markdown-popup-form")[0],gi=window.innerWidth-Mi.offsetWidth,ci=window.innerHeight-Mi.offsetHeight;ni=Math.max(0,Math.min(ni,gi)),xi=Math.max(0,Math.min(xi,ci)),bi(mr.clientX,mr.clientY,Vn,Zn)&&(br(ni),Br(xi))},document.body.onmouseup=function(){document.body.onmousemove=null}},bi=(Yn,Vn,Zn,mr)=>{const ni=document.body.clientHeight,xi=document.body.clientWidth;return Yn<20&&Zn>Yn||Yn>xi-20&&Zn<Yn||Vn<20&&mr>Vn||Vn>ni-20&&mr<Vn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return pe.createElement(pe.Fragment,null,pe.createElement("div",{className:"markdown-editor-wrapper",ref:ar},pe.createElement("div",{className:`markdown-editor-container ${dn} ${Ot?"on-preview":""} ${wr?"mini":""} ${Zt?"full-screen":""}`,style:$r},pe.createElement(Ue,{insertTemp:Oe,watch:Ot,fullScreen:Zt,showNullButton:Yt,showNullProgramButton:$t,onActionCallback:pr,hidetoolBar:qt,extraUse:Tt}),pe.createElement("div",{className:"markdown-editor-body"},pe.createElement("div",{className:"codemirror-container"},pe.createElement("textarea",{ref:Gr,placeholder:Rt})),Ot?pe.createElement("div",{ref:En,className:"preview-container"},Te==="stex"&&pe.createElement(De,{value:St}),Te!=="stex"&&pe.createElement(ct.Z,{edit:!0,disabledFill:Pt,showProgramFill:$t,value:St,openEditor:Yn=>{var Vn;gr.current=Yn,(Vn=nr.current)==null||Vn.setHeight("100vh"),setTimeout(()=>{Ln("add-flowchart")},150)}})):null))),Qe?pe.createElement("a",{ref:kn,className:"editor-resize"}):null,xn===Xe&&pe.createElement(un,{callback:Sr,onCancel:Hn}),xn===ze&&pe.createElement(de,{ref:nr,editImgId:gr.current,callback:Sr,onCancel:Hn}),pe.createElement(Ct.Z,null,jr[xn]&&xn!==Xe&&xn!==ze?pe.createElement(Ye.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Xn,top:ur},title:pe.createElement("div",{style:{cursor:"move"},onMouseDown:yi},jr[xn]),open:!0,onCancel:Hn,footer:null,destroyOnClose:!0,width:xn===ze?"1200px":null,height:xn===ze?"80vh":null,className:"markdown-popup-form"},ii):null))}},96554:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return He},I:function(){return Ct}});var pe=ue(78241),je=ue(8591),Fe=ue(92832),tt=ue(81327),xe=ue(20071),_e=ue(5112),Ae=ue(3113),Se=ue(33045),Me=ue(59301),Ke=ue(62602),ct=ue(59301),De=Object.defineProperty,We=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,wt=(Ge,It,et)=>It in Ge?De(Ge,It,{enumerable:!0,configurable:!0,writable:!0,value:et}):Ge[It]=et,en=(Ge,It)=>{for(var et in It||(It={}))dt.call(It,et)&&wt(Ge,et,It[et]);if(nt)for(var et of nt(It))st.call(It,et)&&wt(Ge,et,It[et]);return Ge},it=(Ge,It)=>We(Ge,vt(It));const{useForm:mt}=pe.default,Ze={width:280,marginRight:10},Ee={labelCol:{span:5},wrapperCol:{span:19}};var He=({callback:Ge,onCancel:It})=>{const[et]=mt();let kt=(0,Me.useRef)();function Je(Dt){kt.current.width=et.getFieldValue("width"),kt.current.align=et.getFieldValue("align"),Ge(Dt,kt.current)}function Ut(Dt,Et){if(Dt.status===-1){je.ZP.error(Dt.message);return}et.setFieldsValue({src:`/api/attachments/${Dt.id}`,type:Et.type})}function ft(Dt){let Et=Dt.target.files[0];kt.current=Et,Ct(Et,Ut)}return ct.createElement(pe.default,it(en({form:et},Ee),{className:"upload-image-panel",onFinish:Je,style:{width:470,overflow:"hidden"}}),ct.createElement(pe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ct.createElement("div",{className:"flex-container"},ct.createElement(pe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},ct.createElement(Fe.default,{style:Ze})),ct.createElement(Ue,{onFileChange:ft}))),ct.createElement(pe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ct.createElement(Fe.default,{style:{width:264}})),ct.createElement(pe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ct.createElement(tt.Z,null,ct.createElement(pe.default.Item,{name:"width",style:{margin:0}},ct.createElement(xe.Z,{style:{width:264}})),ct.createElement("span",{className:"ml8"},"%"))),ct.createElement(pe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ct.createElement(_e.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"}]})),ct.createElement("aside",null,ct.createElement(pe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ct.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ct.createElement(Ae.ZP,{type:"default",onClick:It},"\u53D6\u6D88"))))};function Ue({onFileChange:Ge}){return ct.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ct.createElement("input",{type:"file",onChange:Ge}))}function Ct(Ge,It){if(!Ge)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Ke.bg)())throw je.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let et=new FormData;et.append("editormd-image-file",Ge),et.append("file_param_name","editormd-image-file"),et.append("byxhr","true");var kt=new window.XMLHttpRequest;kt.withCredentials=!0,kt.addEventListener("load",function(Je){It(JSON.parse(Je.target.responseText),Ge)},!1),kt.addEventListener("error",function(Je){console.error(Je)},!1),kt.open("POST",`${Se.KI}/api/attachments.json`),kt.send(et)}},55444:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Fe}});var pe=ue(59301),je=ue(4676);class Fe extends pe.Component{constructor(xe){super(xe);const _e=window.document;this.node=_e.createElement("div"),_e.body.appendChild(this.node)}render(){const{children:xe}=this.props;return(0,je.createPortal)(xe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},8184:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return je}});var pe=ue(59301);function je(Fe,tt){const xe=(0,pe.useRef)();(0,pe.useEffect)(()=>{xe.current=Fe}),(0,pe.useEffect)(()=>{function _e(){xe.current()}if(tt!==null){let Ae=setInterval(_e,tt);return()=>clearInterval(Ae)}},[tt])}},45238:function(Mn,sn,ue){"use strict";ue.r(sn),ue.d(sn,{default:function(){return It}});var pe=ue(59301),je=ue(91911),Fe=ue(78241),tt=ue(8591),xe=ue(66104),_e=ue(92832),Ae=ue(54580),Se=ue(95237),Me=ue(43604),Ke=ue(20071),ct=ue(24905),De=ue(3113),We=ue(41722),vt=ue(33135),nt=ue(82506),dt={bg:"bg___iB8eB",flexRow:"flexRow___rWsOs",flexJustifyCenter:"flexJustifyCenter___GenLk",flexAlignEnd:"flexAlignEnd___AMfei",flexAlignCenter:"flexAlignCenter___rQos5",flexColumn:"flexColumn___fJhyT",formWrap:"formWrap___pNpQ9",titleWrap:"titleWrap____VSL0",fieldWrap:"fieldWrap___ACUG9",mdWrap:"mdWrap___xFqQa",backgroundFa:"backgroundFa___MuFzN",button:"button___tzh3S"},st=Object.defineProperty,wt=Object.defineProperties,en=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ee=(et,kt,Je)=>kt in et?st(et,kt,{enumerable:!0,configurable:!0,writable:!0,value:Je}):et[kt]=Je,He=(et,kt)=>{for(var Je in kt||(kt={}))mt.call(kt,Je)&&Ee(et,Je,kt[Je]);if(it)for(var Je of it(kt))Ze.call(kt,Je)&&Ee(et,Je,kt[Je]);return et},Ue=(et,kt)=>wt(et,en(kt)),Ct=(et,kt,Je)=>new Promise((Ut,ft)=>{var Dt=Be=>{try{ut(Je.next(Be))}catch(be){ft(be)}},Et=Be=>{try{ut(Je.throw(Be))}catch(be){ft(be)}},ut=Be=>Be.done?Ut(Be.value):Promise.resolve(Be.value).then(Dt,Et);ut((Je=Je.apply(et,kt)).next())});const Ge=({shixunHomeworks:et,newCourse:kt,globalSetting:Je,loading:Ut,dispatch:ft})=>{var Dt;const Et=(0,je.useParams)(),[ut]=Fe.default.useForm(),[Be,be]=(0,pe.useState)({}),[ht,nn]=(0,pe.useState)(!1),[Wt,Ve]=(0,pe.useState)([]),[Ye,At]=(0,pe.useState)([]),{commonHomeWorkEditDefaultData:gn}=et,Jt={name:"file",multiple:!0,action:nt.Z.API_SERVER+"/api/attachments.json",defaultFileList:Wt,onChange(Nt){const{status:ve}=Nt.file;ve==="done"?tt.ZP.success(`${Nt.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`):ve==="error"&&tt.ZP.error(`${Nt.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)}};(0,pe.useEffect)(()=>{Gt()},[Et.topicId]);const un=Nt=>Nt==null?void 0:Nt.map(ve=>({uid:ve.id,response:{id:ve.id},name:ve.title,status:"done",url:ve.url})),Gt=()=>Ct(void 0,null,function*(){const Nt=yield ft({type:"shixunHomeworks/editCommonHomeWorkDefaultBankData",payload:{id:Et.topicId}});Nt&&(ut.setFieldsValue({name:Nt.name}),ut.setFieldsValue({description:Nt.description}),ut.setFieldsValue(He({},Nt)),be(He({},Nt)),Ve([...un(Nt.attachments)]),At([...un(Nt.reference_attachments)]),nn(!0))}),Vt=Nt=>Ct(void 0,null,function*(){var ve,se;const oe=He({},Nt);oe.attachment_ids&&(oe.attachment_ids=(ve=oe==null?void 0:oe.attachment_ids.fileList)==null?void 0:ve.map(fe=>fe.response.id)),oe.reference_attachment_ids&&(oe.reference_attachment_ids=(se=oe==null?void 0:oe.reference_attachment_ids.fileList)==null?void 0:se.map(fe=>fe.response.id)),(yield(0,vt.yT)(Ue(He(He({id:Et.topicId},Et),oe),{type:3})))&&je.history.push(`/users/${Et.username}/topics/${Et.topicId}/${Et.topictype}/group/detail`)});return pe.createElement("section",{className:dt.bg},pe.createElement("section",{className:"animated fadeIn"},pe.createElement("aside",{className:"mt10"},pe.createElement(xe.Z,{separator:">"},pe.createElement(xe.Z.Item,null,pe.createElement(je.Link,{to:`/users/${Et.username}/${Et.topictype==="personal"?"topics":"topicbank"}/${Et.topictype}`},Et.topictype==="personal"?"\u6211\u7684\u8BFE\u5802\u8D44\u6E90":"\u516C\u5171\u9898\u5E93")),pe.createElement(xe.Z.Item,null,pe.createElement(je.Link,{to:`/users/${Et.username}/topics/${Et.topicId}/${Et.topictype}/group/detail`},"\u8BE6\u60C5")),pe.createElement(xe.Z.Item,null,"\u7F16\u8F91")))),pe.createElement("aside",{className:"font24 bold mt20 mb20"},"\u7F16\u8F91\u666E\u901A\u4F5C\u4E1A"),pe.createElement(Fe.default,{form:ut,className:dt.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:()=>{be(He({},ut.getFieldsValue()))},onFinish:Vt},pe.createElement("div",{className:dt.fieldWrap},pe.createElement(Fe.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},pe.createElement(_e.default,{maxLength:60,suffix:`${((Dt=Be.name)==null?void 0:Dt.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),pe.createElement("div",{className:dt.mdWrap},pe.createElement(Fe.default.Item,{name:"description",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},pe.createElement(We.Z,{watch:!0,defaultValue:gn.description})),pe.createElement("div",null,pe.createElement(Fe.default.Item,{name:"attachment_ids"},ht&&pe.createElement(Ae.default,He({defaultFileList:Wt},Jt),pe.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09"))),pe.createElement(Se.Z,{gutter:[20,20]},pe.createElement(Me.Z,{flex:"230px"},pe.createElement(Fe.default.Item,{name:"min_num",label:"\u5206\u7EC4\u8BBE\u7F6E",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}]},pe.createElement(Ke.Z,{style:{width:200},min:1,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}))),pe.createElement(Me.Z,{flex:"230px"},pe.createElement(Fe.default.Item,{name:"max_num",label:pe.createElement("div",null,"\xA0"),rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}]},pe.createElement(Ke.Z,{style:{width:200},max:10,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}))),pe.createElement(Me.Z,null,pe.createElement("div",{className:"mt30"},"\uFF08\u5B66\u751F\u63D0\u4EA4\u4F5C\u54C1\u65F6\u9700\u8981\u5173\u8054\u540C\u7EC4\u6210\u5458\uFF0C\u7EC4\u5185\u6210\u5458\u4F5C\u54C1\u5171\u4EAB\uFF09"))),pe.createElement(Se.Z,null,pe.createElement(Me.Z,null,pe.createElement(Fe.default.Item,{name:"base_on_project",valuePropName:"checked"},pe.createElement(ct.default,{value:1,defaultChecked:!0},"\u57FA\u4E8E\u9879\u76EE\u5B9E\u65BD")),pe.createElement("span",{className:"c-light-black"},"\uFF08\u9009\u4E2D\uFF0C\u5219\u5FC5\u987B\u5728\u672C\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF1B\u4E0D\u9009\u4E2D\uFF0C\u65E0\u9700\u5728\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u4EFB\u610F\u5C0F\u7EC4\u6210\u5458\u5747\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF09")))),pe.createElement("div",{className:dt.mdWrap},pe.createElement(Fe.default.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},pe.createElement(We.Z,{defaultValue:gn.reference_answer,watch:!0})),pe.createElement("div",null,pe.createElement(Fe.default.Item,{name:"reference_attachment_ids"},ht&&pe.createElement(Ae.default,Ue(He({},Jt),{defaultFileList:Ye}),pe.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09")))),pe.createElement("div",{className:dt.backgroundFa},pe.createElement("div",{className:"pt40 mb30"},pe.createElement(Fe.default.Item,null,pe.createElement(De.ZP,{size:"middle",type:"primary",className:`${dt.button} mr20`,htmlType:"submit"},"\u63D0\u4EA4"),pe.createElement(De.ZP,{size:"middle",type:"primary",ghost:!0,className:dt.button,onClick:()=>je.history.push(`/users/${Et.username}/topics/${Et.topicId}/${Et.topictype}/group/detail`)},"\u53D6\u6D88"))))))};var It=(0,je.connect)(({shixunHomeworks:et,newCourse:kt,loading:Je,globalSetting:Ut})=>({shixunHomeworks:et,newCourse:kt,globalSetting:Ut,loading:Je.effects}))(Ge)},56762:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return je}});var pe=ue(59301);function je(){const[,Fe]=pe.useReducer(tt=>tt+1,0);return Fe}},19080:function(Mn,sn,ue){"use strict";ue.d(sn,{F:function(){return xe},Z:function(){return tt}});var pe=ue(92310),je=ue.n(pe);const Fe=null;function tt(_e,Ae,Se){return je()({[`${_e}-status-success`]:Ae==="success",[`${_e}-status-warning`]:Ae==="warning",[`${_e}-status-error`]:Ae==="error",[`${_e}-status-validating`]:Ae==="validating",[`${_e}-has-feedback`]:Se})}const xe=(_e,Ae)=>Ae||_e},66104:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Ut}});var pe=ue(92310),je=ue.n(pe),Fe=ue(11592),tt=ue(26112),xe=ue(59301),_e=ue(92343),Ae=ue(36355),Se=ue(84105),Me=ue(91857);const Ke=ft=>{let{children:Dt}=ft;const{getPrefixCls:Et}=xe.useContext(Ae.E_),ut=Et("breadcrumb");return xe.createElement("li",{className:`${ut}-separator`,"aria-hidden":"true"},Dt===""?Dt:Dt||"/")};Ke.__ANT_BREADCRUMB_SEPARATOR=!0;var ct=Ke,De=function(ft,Dt){var Et={};for(var ut in ft)Object.prototype.hasOwnProperty.call(ft,ut)&&Dt.indexOf(ut)<0&&(Et[ut]=ft[ut]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ut=Object.getOwnPropertySymbols(ft);Be<ut.length;Be++)Dt.indexOf(ut[Be])<0&&Object.prototype.propertyIsEnumerable.call(ft,ut[Be])&&(Et[ut[Be]]=ft[ut[Be]]);return Et};function We(ft,Dt){if(ft.title===void 0||ft.title===null)return null;const Et=Object.keys(Dt).join("|");return typeof ft.title=="object"?ft.title:String(ft.title).replace(new RegExp(`:(${Et})`,"g"),(ut,Be)=>Dt[Be]||ut)}function vt(ft,Dt,Et,ut){if(Et==null)return null;const{className:Be,onClick:be}=Dt,ht=De(Dt,["className","onClick"]),nn=Object.assign(Object.assign({},(0,tt.Z)(ht,{data:!0,aria:!0})),{onClick:be});return ut!==void 0?xe.createElement("a",Object.assign({},nn,{className:je()(`${ft}-link`,Be),href:ut}),Et):xe.createElement("span",Object.assign({},nn,{className:je()(`${ft}-link`,Be)}),Et)}function nt(ft,Dt){return(ut,Be,be,ht,nn)=>{if(Dt)return Dt(ut,Be,be,ht);const Wt=We(ut,Be);return vt(ft,ut,Wt,nn)}}var dt=function(ft,Dt){var Et={};for(var ut in ft)Object.prototype.hasOwnProperty.call(ft,ut)&&Dt.indexOf(ut)<0&&(Et[ut]=ft[ut]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ut=Object.getOwnPropertySymbols(ft);Be<ut.length;Be++)Dt.indexOf(ut[Be])<0&&Object.prototype.propertyIsEnumerable.call(ft,ut[Be])&&(Et[ut[Be]]=ft[ut[Be]]);return Et};const st=ft=>{const{prefixCls:Dt,separator:Et="/",children:ut,menu:Be,overlay:be,dropdownProps:ht,href:nn}=ft,Ve=(Ye=>{if(Be||be){const At=Object.assign({},ht);if(Be){const gn=Be||{},{items:Jt}=gn,un=dt(gn,["items"]);At.menu=Object.assign(Object.assign({},un),{items:Jt==null?void 0:Jt.map((Gt,Vt)=>{var{key:Nt,title:ve,label:se,path:oe}=Gt,de=dt(Gt,["key","title","label","path"]);let fe=se!=null?se:ve;return oe&&(fe=xe.createElement("a",{href:`${nn}${oe}`},fe)),Object.assign(Object.assign({},de),{key:Nt!=null?Nt:Vt,label:fe})})})}else be&&(At.overlay=be);return xe.createElement(Me.Z,Object.assign({placement:"bottom"},At),xe.createElement("span",{className:`${Dt}-overlay-link`},Ye,xe.createElement(Se.Z,null)))}return Ye})(ut);return Ve!=null?xe.createElement(xe.Fragment,null,xe.createElement("li",null,Ve),Et&&xe.createElement(ct,null,Et)):null},wt=ft=>{const{prefixCls:Dt,children:Et,href:ut}=ft,Be=dt(ft,["prefixCls","children","href"]),{getPrefixCls:be}=xe.useContext(Ae.E_),ht=be("breadcrumb",Dt);return xe.createElement(st,Object.assign({},Be,{prefixCls:ht}),vt(ht,Be,Et,ut))};wt.__ANT_BREADCRUMB_ITEM=!0;var en=wt,it=ue(17313),mt=ue(83116),Ze=ue(37613);const Ee=ft=>{const{componentCls:Dt,iconCls:Et}=ft;return{[Dt]:Object.assign(Object.assign({},(0,it.Wf)(ft)),{color:ft.itemColor,fontSize:ft.fontSize,[Et]:{fontSize:ft.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:ft.linkColor,transition:`color ${ft.motionDurationMid}`,padding:`0 ${ft.paddingXXS}px`,borderRadius:ft.borderRadiusSM,height:ft.lineHeight*ft.fontSize,display:"inline-block",marginInline:-ft.marginXXS,"&:hover":{color:ft.linkHoverColor,backgroundColor:ft.colorBgTextHover}},(0,it.Qy)(ft)),"li:last-child":{color:ft.lastItemColor},[`${Dt}-separator`]:{marginInline:ft.separatorMargin,color:ft.separatorColor},[`${Dt}-link`]:{[`
|
|
|
> ${Et} + span,
|
|
|
> ${Et} + a
|
|
|
`]:{marginInlineStart:ft.marginXXS}},[`${Dt}-overlay-link`]:{borderRadius:ft.borderRadiusSM,height:ft.lineHeight*ft.fontSize,display:"inline-block",padding:`0 ${ft.paddingXXS}px`,marginInline:-ft.marginXXS,[`> ${Et}`]:{marginInlineStart:ft.marginXXS,fontSize:ft.fontSizeIcon},"&:hover":{color:ft.linkHoverColor,backgroundColor:ft.colorBgTextHover,a:{color:ft.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${ft.componentCls}-rtl`]:{direction:"rtl"}})}};var He=(0,mt.Z)("Breadcrumb",ft=>{const Dt=(0,Ze.TS)(ft,{});return[Ee(Dt)]},ft=>({itemColor:ft.colorTextDescription,lastItemColor:ft.colorText,iconFontSize:ft.fontSize,linkColor:ft.colorTextDescription,linkHoverColor:ft.colorText,separatorColor:ft.colorTextDescription,separatorMargin:ft.marginXS})),Ue=function(ft,Dt){var Et={};for(var ut in ft)Object.prototype.hasOwnProperty.call(ft,ut)&&Dt.indexOf(ut)<0&&(Et[ut]=ft[ut]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ut=Object.getOwnPropertySymbols(ft);Be<ut.length;Be++)Dt.indexOf(ut[Be])<0&&Object.prototype.propertyIsEnumerable.call(ft,ut[Be])&&(Et[ut[Be]]=ft[ut[Be]]);return Et};function Ct(ft){const{breadcrumbName:Dt,children:Et}=ft,ut=Ue(ft,["breadcrumbName","children"]),Be=Object.assign({title:Dt},ut);return Et&&(Be.menu={items:Et.map(be=>{var{breadcrumbName:ht}=be,nn=Ue(be,["breadcrumbName"]);return Object.assign(Object.assign({},nn),{title:ht})})}),Be}function Ge(ft,Dt){return(0,xe.useMemo)(()=>ft||(Dt?Dt.map(Ct):null),[ft,Dt])}var It=function(ft,Dt){var Et={};for(var ut in ft)Object.prototype.hasOwnProperty.call(ft,ut)&&Dt.indexOf(ut)<0&&(Et[ut]=ft[ut]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ut=Object.getOwnPropertySymbols(ft);Be<ut.length;Be++)Dt.indexOf(ut[Be])<0&&Object.prototype.propertyIsEnumerable.call(ft,ut[Be])&&(Et[ut[Be]]=ft[ut[Be]]);return Et};const et=(ft,Dt)=>{if(Dt===void 0)return Dt;let Et=(Dt||"").replace(/^\//,"");return Object.keys(ft).forEach(ut=>{Et=Et.replace(`:${ut}`,ft[ut])}),Et},kt=ft=>{const{prefixCls:Dt,separator:Et="/",style:ut,className:Be,rootClassName:be,routes:ht,items:nn,children:Wt,itemRender:Ve,params:Ye={}}=ft,At=It(ft,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:gn,direction:Jt,breadcrumb:un}=xe.useContext(Ae.E_);let Gt;const Vt=gn("breadcrumb",Dt),[Nt,ve]=He(Vt),se=Ge(nn,ht),oe=nt(Vt,Ve);if(se&&se.length>0){const le=[],Ie=nn||ht;Gt=se.map((ot,Kt)=>{const{path:Ft,key:Xt,type:Qt,menu:on,overlay:pn,onClick:Cn,className:bt,separator:hn,dropdownProps:On}=ot,rt=et(Ye,Ft);rt!==void 0&&le.push(rt);const ze=Xt!=null?Xt:Kt;if(Qt==="separator")return xe.createElement(ct,{key:ze},hn);const Xe={},jt=Kt===se.length-1;on?Xe.menu=on:pn&&(Xe.overlay=pn);let{href:tn}=ot;return le.length&&rt!==void 0&&(tn=`#/${le.join("/")}`),xe.createElement(st,Object.assign({key:ze},Xe,(0,tt.Z)(ot,{data:!0,aria:!0}),{className:bt,dropdownProps:On,href:tn,separator:jt?"":Et,onClick:Cn,prefixCls:Vt}),oe(ot,Ye,Ie,le,tn))})}else if(Wt){const le=(0,Fe.Z)(Wt).length;Gt=(0,Fe.Z)(Wt).map((Ie,ot)=>{if(!Ie)return Ie;const Kt=ot===le-1;return(0,_e.Tm)(Ie,{separator:Kt?"":Et,key:ot})})}const de=je()(Vt,un==null?void 0:un.className,{[`${Vt}-rtl`]:Jt==="rtl"},Be,be,ve),fe=Object.assign(Object.assign({},un==null?void 0:un.style),ut);return Nt(xe.createElement("nav",Object.assign({className:de,style:fe},At),xe.createElement("ol",null,Gt)))};kt.Item=en,kt.Separator=ct;var Je=kt,Ut=Je},24905:function(Mn,sn,ue){"use strict";ue.d(sn,{default:function(){return He}});var pe=ue(92310),je=ue.n(pe),Fe=ue(5630),tt=ue(59301),xe=ue(36355),_e=ue(1684),Ae=ue(32441),Me=tt.createContext(null),Ke=ue(98447),ct=ue(14088),De=ue(4572),We=function(Ue,Ct){var Ge={};for(var It in Ue)Object.prototype.hasOwnProperty.call(Ue,It)&&Ct.indexOf(It)<0&&(Ge[It]=Ue[It]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,It=Object.getOwnPropertySymbols(Ue);et<It.length;et++)Ct.indexOf(It[et])<0&&Object.prototype.propertyIsEnumerable.call(Ue,It[et])&&(Ge[It[et]]=Ue[It[et]]);return Ge};const vt=(Ue,Ct)=>{var Ge;const{prefixCls:It,className:et,rootClassName:kt,children:Je,indeterminate:Ut=!1,style:ft,onMouseEnter:Dt,onMouseLeave:Et,skipGroup:ut=!1,disabled:Be}=Ue,be=We(Ue,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ht,direction:nn,checkbox:Wt}=tt.useContext(xe.E_),Ve=tt.useContext(Me),{isFormItemInput:Ye}=tt.useContext(Ae.aM),At=tt.useContext(_e.Z),gn=(Ge=(Ve==null?void 0:Ve.disabled)||Be)!==null&&Ge!==void 0?Ge:At,Jt=tt.useRef(be.value);tt.useEffect(()=>{Ve==null||Ve.registerValue(be.value)},[]),tt.useEffect(()=>{if(!ut)return be.value!==Jt.current&&(Ve==null||Ve.cancelValue(Jt.current),Ve==null||Ve.registerValue(be.value),Jt.current=be.value),()=>Ve==null?void 0:Ve.cancelValue(be.value)},[be.value]);const un=ht("checkbox",It),[Gt,Vt]=(0,Ke.ZP)(un),Nt=Object.assign({},be);Ve&&!ut&&(Nt.onChange=function(){be.onChange&&be.onChange.apply(be,arguments),Ve.toggleOption&&Ve.toggleOption({label:Je,value:be.value})},Nt.name=Ve.name,Nt.checked=Ve.value.includes(be.value));const ve=je()(`${un}-wrapper`,{[`${un}-rtl`]:nn==="rtl",[`${un}-wrapper-checked`]:Nt.checked,[`${un}-wrapper-disabled`]:gn,[`${un}-wrapper-in-form-item`]:Ye},Wt==null?void 0:Wt.className,et,kt,Vt),se=je()({[`${un}-indeterminate`]:Ut},De.A,Vt),oe=Ut?"mixed":void 0;return Gt(tt.createElement(ct.Z,{component:"Checkbox",disabled:gn},tt.createElement("label",{className:ve,style:Object.assign(Object.assign({},Wt==null?void 0:Wt.style),ft),onMouseEnter:Dt,onMouseLeave:Et},tt.createElement(Fe.Z,Object.assign({"aria-checked":oe},Nt,{prefixCls:un,className:se,disabled:gn,ref:Ct})),Je!==void 0&&tt.createElement("span",null,Je))))};var dt=tt.forwardRef(vt),st=ue(94480),wt=ue(2738),en=function(Ue,Ct){var Ge={};for(var It in Ue)Object.prototype.hasOwnProperty.call(Ue,It)&&Ct.indexOf(It)<0&&(Ge[It]=Ue[It]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,It=Object.getOwnPropertySymbols(Ue);et<It.length;et++)Ct.indexOf(It[et])<0&&Object.prototype.propertyIsEnumerable.call(Ue,It[et])&&(Ge[It[et]]=Ue[It[et]]);return Ge};const it=(Ue,Ct)=>{const{defaultValue:Ge,children:It,options:et=[],prefixCls:kt,className:Je,rootClassName:Ut,style:ft,onChange:Dt}=Ue,Et=en(Ue,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:ut,direction:Be}=tt.useContext(xe.E_),[be,ht]=tt.useState(Et.value||Ge||[]),[nn,Wt]=tt.useState([]);tt.useEffect(()=>{"value"in Et&&ht(Et.value||[])},[Et.value]);const Ve=tt.useMemo(()=>et.map(de=>typeof de=="string"||typeof de=="number"?{label:de,value:de}:de),[et]),Ye=de=>{Wt(fe=>fe.filter(le=>le!==de))},At=de=>{Wt(fe=>[].concat((0,st.Z)(fe),[de]))},gn=de=>{const fe=be.indexOf(de.value),le=(0,st.Z)(be);fe===-1?le.push(de.value):le.splice(fe,1),"value"in Et||ht(le),Dt==null||Dt(le.filter(Ie=>nn.includes(Ie)).sort((Ie,ot)=>{const Kt=Ve.findIndex(Xt=>Xt.value===Ie),Ft=Ve.findIndex(Xt=>Xt.value===ot);return Kt-Ft}))},Jt=ut("checkbox",kt),un=`${Jt}-group`,[Gt,Vt]=(0,Ke.ZP)(Jt),Nt=(0,wt.Z)(Et,["value","disabled"]),ve=et.length?Ve.map(de=>tt.createElement(dt,{prefixCls:Jt,key:de.value.toString(),disabled:"disabled"in de?de.disabled:Et.disabled,value:de.value,checked:be.includes(de.value),onChange:de.onChange,className:`${un}-item`,style:de.style,title:de.title},de.label)):It,se={toggleOption:gn,value:be,disabled:Et.disabled,name:Et.name,registerValue:At,cancelValue:Ye},oe=je()(un,{[`${un}-rtl`]:Be==="rtl"},Je,Ut,Vt);return Gt(tt.createElement("div",Object.assign({className:oe,style:ft},Nt,{ref:Ct}),tt.createElement(Me.Provider,{value:se},ve)))},mt=tt.forwardRef(it);var Ze=tt.memo(mt);const Ee=dt;Ee.Group=Ze,Ee.__ANT_CHECKBOX=!0;var He=Ee},98447:function(Mn,sn,ue){"use strict";ue.d(sn,{C2:function(){return xe}});var pe=ue(17313),je=ue(37613),Fe=ue(83116);const tt=_e=>{const{checkboxCls:Ae}=_e,Se=`${Ae}-wrapper`;return[{[`${Ae}-group`]:Object.assign(Object.assign({},(0,pe.Wf)(_e)),{display:"inline-flex",flexWrap:"wrap",columnGap:_e.marginXS,[`> ${_e.antCls}-row`]:{flex:1}}),[Se]:Object.assign(Object.assign({},(0,pe.Wf)(_e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Se}`]:{marginInlineStart:0},[`&${Se}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Ae]:Object.assign(Object.assign({},(0,pe.Wf)(_e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:_e.borderRadiusSM,alignSelf:"center",[`${Ae}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Ae}-inner`]:Object.assign({},(0,pe.oN)(_e))},[`${Ae}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:_e.checkboxSize,height:_e.checkboxSize,direction:"ltr",backgroundColor:_e.colorBgContainer,border:`${_e.lineWidth}px ${_e.lineType} ${_e.colorBorder}`,borderRadius:_e.borderRadiusSM,borderCollapse:"separate",transition:`all ${_e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:_e.checkboxSize/14*5,height:_e.checkboxSize/14*8,border:`${_e.lineWidthBold}px solid ${_e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${_e.motionDurationFast} ${_e.motionEaseInBack}, opacity ${_e.motionDurationFast}`}},"& + span":{paddingInlineStart:_e.paddingXS,paddingInlineEnd:_e.paddingXS}})},{[`
|
|
|
${Se}:not(${Se}-disabled),
|
|
|
${Ae}:not(${Ae}-disabled)
|
|
|
`]:{[`&:hover ${Ae}-inner`]:{borderColor:_e.colorPrimary}},[`${Se}:not(${Se}-disabled)`]:{[`&:hover ${Ae}-checked:not(${Ae}-disabled) ${Ae}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Ae}-checked:not(${Ae}-disabled):after`]:{borderColor:_e.colorPrimaryHover}}},{[`${Ae}-checked`]:{[`${Ae}-inner`]:{backgroundColor:_e.colorPrimary,borderColor:_e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${_e.motionDurationMid} ${_e.motionEaseOutBack} ${_e.motionDurationFast}`}}},[`
|
|
|
${Se}-checked:not(${Se}-disabled),
|
|
|
${Ae}-checked:not(${Ae}-disabled)
|
|
|
`]:{[`&:hover ${Ae}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"}}},{[Ae]:{"&-indeterminate":{[`${Ae}-inner`]:{backgroundColor:_e.colorBgContainer,borderColor:_e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:_e.fontSizeLG/2,height:_e.fontSizeLG/2,backgroundColor:_e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Se}-disabled`]:{cursor:"not-allowed"},[`${Ae}-disabled`]:{[`&, ${Ae}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Ae}-inner`]:{background:_e.colorBgContainerDisabled,borderColor:_e.colorBorder,"&:after":{borderColor:_e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:_e.colorTextDisabled},[`&${Ae}-indeterminate ${Ae}-inner::after`]:{background:_e.colorTextDisabled}}}]};function xe(_e,Ae){const Se=(0,je.TS)(Ae,{checkboxCls:`.${_e}`,checkboxSize:Ae.controlInteractiveSize});return[tt(Se)]}sn.ZP=(0,Fe.Z)("Checkbox",(_e,Ae)=>{let{prefixCls:Se}=Ae;return[xe(Se,_e)]})},93891:function(Mn,sn,ue){"use strict";var pe=ue(59301),je=ue(36355),Fe=ue(64165);const tt=xe=>{const{componentName:_e}=xe,{getPrefixCls:Ae}=(0,pe.useContext)(je.E_),Se=Ae("empty");switch(_e){case"Table":case"List":return pe.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return pe.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE,className:`${Se}-small`});default:return pe.createElement(Fe.Z,null)}};sn.Z=tt},43428:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Gt}});var pe=ue(92310),je=ue.n(pe),Fe=ue(33885),tt=ue(42978),xe=ue(43403),_e=ue(34280),Ae=ue(59301),Se=Ae.createContext(null),Me=Ae.createContext({}),Ke=Se,ct=ue(20068),De=ue(54476),We=ue(77900),vt=ue(10228),nt=ue(26112),dt=ue(70425),st=function(Nt){var ve=Nt.prefixCls,se=Nt.className,oe=Nt.style,de=Nt.children,fe=Nt.containerRef,le=Nt.id,Ie=Nt.onMouseEnter,ot=Nt.onMouseOver,Kt=Nt.onMouseLeave,Ft=Nt.onClick,Xt=Nt.onKeyDown,Qt=Nt.onKeyUp,on={onMouseEnter:Ie,onMouseOver:ot,onMouseLeave:Kt,onClick:Ft,onKeyDown:Xt,onKeyUp:Qt},pn=Ae.useContext(Me),Cn=pn.panel,bt=(0,dt.useComposeRef)(Cn,fe);return Ae.createElement(Ae.Fragment,null,Ae.createElement("div",(0,De.Z)({id:le,className:je()("".concat(ve,"-content"),se),style:(0,Fe.Z)({},oe),"aria-modal":"true",role:"dialog",ref:bt},on),de))},wt=st,en=ue(48736);function it(Vt){return typeof Vt=="string"&&String(Number(Vt))===Vt?((0,en.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Vt)):Vt}function mt(Vt){warning(!("wrapperClassName"in Vt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Vt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ze={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ee(Vt,Nt){var ve,se,oe,de,fe=Vt.prefixCls,le=Vt.open,Ie=Vt.placement,ot=Vt.inline,Kt=Vt.push,Ft=Vt.forceRender,Xt=Vt.autoFocus,Qt=Vt.keyboard,on=Vt.rootClassName,pn=Vt.rootStyle,Cn=Vt.zIndex,bt=Vt.className,hn=Vt.id,On=Vt.style,rt=Vt.motion,ze=Vt.width,Xe=Vt.height,jt=Vt.children,tn=Vt.contentWrapperStyle,cn=Vt.mask,Dn=Vt.maskClosable,Tn=Vt.maskMotion,_n=Vt.maskClassName,Fn=Vt.maskStyle,jn=Vt.afterOpenChange,An=Vt.onClose,hr=Vt.onMouseEnter,kr=Vt.onMouseOver,Tr=Vt.onMouseLeave,Hr=Vt.onClick,sr=Vt.onKeyDown,Mr=Vt.onKeyUp,rr=Ae.useRef(),Or=Ae.useRef(),Fr=Ae.useRef();Ae.useImperativeHandle(Nt,function(){return rr.current});var _r=function($t){var qt=$t.keyCode,vn=$t.shiftKey;switch(qt){case vt.Z.TAB:{if(qt===vt.Z.TAB){if(!vn&&document.activeElement===Fr.current){var wn;(wn=Or.current)===null||wn===void 0||wn.focus({preventScroll:!0})}else if(vn&&document.activeElement===Or.current){var Sn;(Sn=Fr.current)===null||Sn===void 0||Sn.focus({preventScroll:!0})}}break}case vt.Z.ESC:{An&&Qt&&($t.stopPropagation(),An($t));break}}};Ae.useEffect(function(){if(le&&Xt){var Yt;(Yt=rr.current)===null||Yt===void 0||Yt.focus({preventScroll:!0})}},[le]);var jr=Ae.useState(!1),Nr=(0,tt.Z)(jr,2),Jn=Nr[0],lr=Nr[1],Rn=Ae.useContext(Ke),$n;Kt===!1?$n={distance:0}:Kt===!0?$n={}:$n=Kt||{};var wr=(ve=(se=(oe=$n)===null||oe===void 0?void 0:oe.distance)!==null&&se!==void 0?se:Rn==null?void 0:Rn.pushDistance)!==null&&ve!==void 0?ve:180,lt=Ae.useMemo(function(){return{pushDistance:wr,push:function(){lr(!0)},pull:function(){lr(!1)}}},[wr]);Ae.useEffect(function(){if(le){var Yt;Rn==null||(Yt=Rn.push)===null||Yt===void 0||Yt.call(Rn)}else{var $t;Rn==null||($t=Rn.pull)===null||$t===void 0||$t.call(Rn)}},[le]),Ae.useEffect(function(){return function(){var Yt;Rn==null||(Yt=Rn.pull)===null||Yt===void 0||Yt.call(Rn)}},[]);var ke=cn&&Ae.createElement(We.default,(0,De.Z)({key:"mask"},Tn,{visible:le}),function(Yt,$t){var qt=Yt.className,vn=Yt.style;return Ae.createElement("div",{className:je()("".concat(fe,"-mask"),qt,_n),style:(0,Fe.Z)((0,Fe.Z)({},vn),Fn),onClick:Dn&&le?An:void 0,ref:$t})}),Oe=typeof rt=="function"?rt(Ie):rt,Te={};if(Jn&&wr)switch(Ie){case"top":Te.transform="translateY(".concat(wr,"px)");break;case"bottom":Te.transform="translateY(".concat(-wr,"px)");break;case"left":Te.transform="translateX(".concat(wr,"px)");break;default:Te.transform="translateX(".concat(-wr,"px)");break}Ie==="left"||Ie==="right"?Te.width=it(ze):Te.height=it(Xe);var Pe={onMouseEnter:hr,onMouseOver:kr,onMouseLeave:Tr,onClick:Hr,onKeyDown:sr,onKeyUp:Mr},Qe=Ae.createElement(We.default,(0,De.Z)({key:"panel"},Oe,{visible:le,forceRender:Ft,onVisibleChanged:function($t){jn==null||jn($t)},removeOnLeave:!1,leavedClassName:"".concat(fe,"-content-wrapper-hidden")}),function(Yt,$t){var qt=Yt.className,vn=Yt.style;return Ae.createElement("div",(0,De.Z)({className:je()("".concat(fe,"-content-wrapper"),qt),style:(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Te),vn),tn)},(0,nt.Z)(Vt,{data:!0})),Ae.createElement(wt,(0,De.Z)({id:hn,containerRef:$t,prefixCls:fe,className:bt,style:On},Pe),jt))}),pt=(0,Fe.Z)({},pn);return Cn&&(pt.zIndex=Cn),Ae.createElement(Ke.Provider,{value:lt},Ae.createElement("div",{className:je()(fe,"".concat(fe,"-").concat(Ie),on,(de={},(0,ct.Z)(de,"".concat(fe,"-open"),le),(0,ct.Z)(de,"".concat(fe,"-inline"),ot),de)),style:pt,tabIndex:-1,ref:rr,onKeyDown:_r},ke,Ae.createElement("div",{tabIndex:0,ref:Or,style:Ze,"aria-hidden":"true","data-sentinel":"start"}),Qe,Ae.createElement("div",{tabIndex:0,ref:Fr,style:Ze,"aria-hidden":"true","data-sentinel":"end"})))}var He=Ae.forwardRef(Ee),Ue=He,Ct=function(Nt){var ve=Nt.open,se=ve===void 0?!1:ve,oe=Nt.prefixCls,de=oe===void 0?"rc-drawer":oe,fe=Nt.placement,le=fe===void 0?"right":fe,Ie=Nt.autoFocus,ot=Ie===void 0?!0:Ie,Kt=Nt.keyboard,Ft=Kt===void 0?!0:Kt,Xt=Nt.width,Qt=Xt===void 0?378:Xt,on=Nt.mask,pn=on===void 0?!0:on,Cn=Nt.maskClosable,bt=Cn===void 0?!0:Cn,hn=Nt.getContainer,On=Nt.forceRender,rt=Nt.afterOpenChange,ze=Nt.destroyOnClose,Xe=Nt.onMouseEnter,jt=Nt.onMouseOver,tn=Nt.onMouseLeave,cn=Nt.onClick,Dn=Nt.onKeyDown,Tn=Nt.onKeyUp,_n=Nt.panelRef,Fn=Ae.useState(!1),jn=(0,tt.Z)(Fn,2),An=jn[0],hr=jn[1],kr=Ae.useState(!1),Tr=(0,tt.Z)(kr,2),Hr=Tr[0],sr=Tr[1];(0,_e.Z)(function(){sr(!0)},[]);var Mr=Hr?se:!1,rr=Ae.useRef(),Or=Ae.useRef();(0,_e.Z)(function(){Mr&&(Or.current=document.activeElement)},[Mr]);var Fr=function(lr){var Rn;if(hr(lr),rt==null||rt(lr),!lr&&Or.current&&!((Rn=rr.current)!==null&&Rn!==void 0&&Rn.contains(Or.current))){var $n;($n=Or.current)===null||$n===void 0||$n.focus({preventScroll:!0})}},_r=Ae.useMemo(function(){return{panel:_n}},[_n]);if(!On&&!An&&!Mr&&ze)return null;var jr={onMouseEnter:Xe,onMouseOver:jt,onMouseLeave:tn,onClick:cn,onKeyDown:Dn,onKeyUp:Tn},Nr=(0,Fe.Z)((0,Fe.Z)({},Nt),{},{open:Mr,prefixCls:de,placement:le,autoFocus:ot,keyboard:Ft,width:Qt,mask:pn,maskClosable:bt,inline:hn===!1,afterOpenChange:Fr,ref:rr},jr);return Ae.createElement(Me.Provider,{value:_r},Ae.createElement(xe.Z,{open:Mr||On||An,autoDestroy:!1,getContainer:hn,autoLock:pn&&(Mr||An)},Ae.createElement(Ue,Nr)))},Ge=Ct,It=Ge,et=ue(62892),kt=ue(36355),Je=ue(32441),Ut=ue(47729),Dt=Vt=>{const{prefixCls:Nt,title:ve,footer:se,extra:oe,closeIcon:de,closable:fe,onClose:le,headerStyle:Ie,drawerStyle:ot,bodyStyle:Kt,footerStyle:Ft,children:Xt}=Vt,Qt=Ae.useCallback(hn=>Ae.createElement("button",{type:"button",onClick:le,"aria-label":"Close",className:`${Nt}-close`},hn),[le]),[on,pn]=(0,Ut.Z)(fe,de,Qt,void 0,!0),Cn=Ae.useMemo(()=>!ve&&!on?null:Ae.createElement("div",{style:Ie,className:je()(`${Nt}-header`,{[`${Nt}-header-close-only`]:on&&!ve&&!oe})},Ae.createElement("div",{className:`${Nt}-header-title`},pn,ve&&Ae.createElement("div",{className:`${Nt}-title`},ve)),oe&&Ae.createElement("div",{className:`${Nt}-extra`},oe)),[on,pn,oe,Ie,Nt,ve]),bt=Ae.useMemo(()=>{if(!se)return null;const hn=`${Nt}-footer`;return Ae.createElement("div",{className:hn,style:Ft},se)},[se,Ft,Nt]);return Ae.createElement("div",{className:`${Nt}-wrapper-body`,style:ot},Cn,Ae.createElement("div",{className:`${Nt}-body`,style:Kt},Xt),bt)},Et=ue(33234),ut=ue(83116),Be=ue(37613),ht=Vt=>{const{componentCls:Nt,motionDurationSlow:ve}=Vt,se={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${ve}`}}};return{[Nt]:{[`${Nt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${ve}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Nt}-panel-motion`]:{"&-left":[se,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[se,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[se,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[se,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const nn=Vt=>{const{componentCls:Nt,zIndexPopup:ve,colorBgMask:se,colorBgElevated:oe,motionDurationSlow:de,motionDurationMid:fe,padding:le,paddingLG:Ie,fontSizeLG:ot,lineHeightLG:Kt,lineWidth:Ft,lineType:Xt,colorSplit:Qt,marginSM:on,colorIcon:pn,colorIconHover:Cn,colorText:bt,fontWeightStrong:hn,footerPaddingBlock:On,footerPaddingInline:rt}=Vt,ze=`${Nt}-content-wrapper`;return{[Nt]:{position:"fixed",inset:0,zIndex:ve,pointerEvents:"none","&-pure":{position:"relative",background:oe,[`&${Nt}-left`]:{boxShadow:Vt.boxShadowDrawerLeft},[`&${Nt}-right`]:{boxShadow:Vt.boxShadowDrawerRight},[`&${Nt}-top`]:{boxShadow:Vt.boxShadowDrawerUp},[`&${Nt}-bottom`]:{boxShadow:Vt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Nt}-mask`]:{position:"absolute",inset:0,zIndex:ve,background:se,pointerEvents:"auto"},[ze]:{position:"absolute",zIndex:ve,maxWidth:"100vw",transition:`all ${de}`,"&-hidden":{display:"none"}},[`&-left > ${ze}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Vt.boxShadowDrawerLeft},[`&-right > ${ze}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Vt.boxShadowDrawerRight},[`&-top > ${ze}`]:{top:0,insetInline:0,boxShadow:Vt.boxShadowDrawerUp},[`&-bottom > ${ze}`]:{bottom:0,insetInline:0,boxShadow:Vt.boxShadowDrawerDown},[`${Nt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:oe,pointerEvents:"auto"},[`${Nt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Nt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${le}px ${Ie}px`,fontSize:ot,lineHeight:Kt,borderBottom:`${Ft}px ${Xt} ${Qt}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Nt}-extra`]:{flex:"none"},[`${Nt}-close`]:{display:"inline-block",marginInlineEnd:on,color:pn,fontWeight:hn,fontSize:ot,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${fe}`,textRendering:"auto","&:focus, &:hover":{color:Cn,textDecoration:"none"}},[`${Nt}-title`]:{flex:1,margin:0,color:bt,fontWeight:Vt.fontWeightStrong,fontSize:ot,lineHeight:Kt},[`${Nt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Ie,overflow:"auto"},[`${Nt}-footer`]:{flexShrink:0,padding:`${On}px ${rt}px`,borderTop:`${Ft}px ${Xt} ${Qt}`},"&-rtl":{direction:"rtl"}}}};var Wt=(0,ut.Z)("Drawer",Vt=>{const Nt=(0,Be.TS)(Vt,{});return[nn(Nt),ht(Nt)]},Vt=>({zIndexPopup:Vt.zIndexPopupBase,footerPaddingBlock:Vt.paddingXS,footerPaddingInline:Vt.padding})),Ve=ue(11575),Ye=function(Vt,Nt){var ve={};for(var se in Vt)Object.prototype.hasOwnProperty.call(Vt,se)&&Nt.indexOf(se)<0&&(ve[se]=Vt[se]);if(Vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,se=Object.getOwnPropertySymbols(Vt);oe<se.length;oe++)Nt.indexOf(se[oe])<0&&Object.prototype.propertyIsEnumerable.call(Vt,se[oe])&&(ve[se[oe]]=Vt[se[oe]]);return ve};const At=null,gn={distance:180},Jt=Vt=>{var Nt;const{rootClassName:ve,width:se,height:oe,size:de="default",mask:fe=!0,push:le=gn,open:Ie,afterOpenChange:ot,onClose:Kt,prefixCls:Ft,getContainer:Xt,style:Qt,className:on,visible:pn,afterVisibleChange:Cn}=Vt,bt=Ye(Vt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:hn,getPrefixCls:On,direction:rt,drawer:ze}=Ae.useContext(kt.E_),Xe=On("drawer",Ft),[jt,tn]=Wt(Xe),cn=Xt===void 0&&hn?()=>hn(document.body):Xt,Dn=je()({"no-mask":!fe,[`${Xe}-rtl`]:rt==="rtl"},ve,tn),Tn=Ae.useMemo(()=>se!=null?se:de==="large"?736:378,[se,de]),_n=Ae.useMemo(()=>oe!=null?oe:de==="large"?736:378,[oe,de]),Fn={motionName:(0,et.m)(Xe,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},jn=hr=>({motionName:(0,et.m)(Xe,`panel-motion-${hr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),An=(0,Ve.H)();return jt(Ae.createElement(Et.BR,null,Ae.createElement(Je.Ux,{status:!0,override:!0},Ae.createElement(It,Object.assign({prefixCls:Xe,onClose:Kt,maskMotion:Fn,motion:jn},bt,{open:Ie!=null?Ie:pn,mask:fe,push:le,width:Tn,height:_n,style:Object.assign(Object.assign({},ze==null?void 0:ze.style),Qt),className:je()(ze==null?void 0:ze.className,on),rootClassName:Dn,getContainer:cn,afterOpenChange:ot!=null?ot:Cn,panelRef:An}),Ae.createElement(Dt,Object.assign({prefixCls:Xe},bt,{onClose:Kt}))))))},un=Vt=>{const{prefixCls:Nt,style:ve,className:se,placement:oe="right"}=Vt,de=Ye(Vt,["prefixCls","style","className","placement"]),{getPrefixCls:fe}=Ae.useContext(kt.E_),le=fe("drawer",Nt),[Ie,ot]=Wt(le),Kt=je()(le,`${le}-pure`,`${le}-${oe}`,ot,se);return Ie(Ae.createElement("div",{className:Kt,style:ve},Ae.createElement(Dt,Object.assign({prefixCls:le},de))))};Jt._InternalPanelDoNotUseOrYouWillBeFired=un;var Gt=Jt},91857:function(Mn,sn,ue){"use strict";var pe=ue(59301),je=ue(38819),Fe=ue(92310),tt=ue.n(Fe),xe=ue(31561),_e=ue(70425),Ae=ue(18929),Se=ue(2738),Me=ue(79676),Ke=ue(53487),ct=ue(92343),De=ue(36355),We=ue(20834),vt=ue(40875),nt=ue(88088),dt=ue(47211);const st=null,wt=Ze=>{const{menu:Ee,arrow:He,prefixCls:Ue,children:Ct,trigger:Ge,disabled:It,dropdownRender:et,getPopupContainer:kt,overlayClassName:Je,rootClassName:Ut,open:ft,onOpenChange:Dt,visible:Et,onVisibleChange:ut,mouseEnterDelay:Be=.15,mouseLeaveDelay:be=.1,autoAdjustOverflow:ht=!0,placement:nn="",overlay:Wt,transitionName:Ve}=Ze,{getPopupContainer:Ye,getPrefixCls:At,direction:gn}=pe.useContext(De.E_),Jt=pe.useMemo(()=>{const on=At();return Ve!==void 0?Ve:nn.includes("top")?`${on}-slide-down`:`${on}-slide-up`},[At,nn,Ve]),un=pe.useMemo(()=>nn?nn.includes("Center")?nn.slice(0,nn.indexOf("Center")):nn:gn==="rtl"?"bottomRight":"bottomLeft",[nn,gn]),Gt=At("dropdown",Ue),[Vt,Nt]=(0,dt.Z)(Gt),[,ve]=(0,nt.Z)(),se=pe.Children.only(Ct),oe=(0,ct.Tm)(se,{className:tt()(`${Gt}-trigger`,{[`${Gt}-rtl`]:gn==="rtl"},se.props.className),disabled:It}),de=It?[]:Ge;let fe;de&&de.includes("contextMenu")&&(fe=!0);const[le,Ie]=(0,Ae.Z)(!1,{value:ft!=null?ft:Et}),ot=(0,_e.useEvent)(on=>{Dt==null||Dt(on),ut==null||ut(on),Ie(on)}),Kt=tt()(Je,Ut,Nt,{[`${Gt}-rtl`]:gn==="rtl"}),Ft=(0,Me.Z)({arrowPointAtCenter:typeof He=="object"&&He.pointAtCenter,autoAdjustOverflow:ht,offset:ve.marginXXS,arrowWidth:He?ve.sizePopupArrow:0,borderRadius:ve.borderRadius}),Xt=pe.useCallback(()=>{Ie(!1)},[]),Qt=()=>{let on;return Ee!=null&&Ee.items?on=pe.createElement(We.default,Object.assign({},Ee)):typeof Wt=="function"?on=Wt():on=Wt,et&&(on=et(on)),on=pe.Children.only(typeof on=="string"?pe.createElement("span",null,on):on),pe.createElement(vt.J,{prefixCls:`${Gt}-menu`,expandIcon:pe.createElement("span",{className:`${Gt}-menu-submenu-arrow`},pe.createElement(je.Z,{className:`${Gt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Xt,validator:pn=>{let{mode:Cn}=pn}},on)};return Vt(pe.createElement(xe.Z,Object.assign({alignPoint:fe},(0,Se.Z)(Ze,["rootClassName"]),{mouseEnterDelay:Be,mouseLeaveDelay:be,visible:le,builtinPlacements:Ft,arrow:!!He,overlayClassName:Kt,prefixCls:Gt,getPopupContainer:kt||Ye,transitionName:Jt,trigger:de,overlay:Qt,placement:un,onVisibleChange:ot}),oe))};function en(Ze){return Object.assign(Object.assign({},Ze),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const it=(0,Ke.Z)(wt,"dropdown",Ze=>Ze,en),mt=Ze=>pe.createElement(it,Object.assign({},Ze),pe.createElement("span",null));wt._InternalPanelDoNotUseOrYouWillBeFired=mt,sn.Z=wt},47211:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return ct}});var pe=ue(17313),je=ue(13826),Fe=ue(92899),tt=ue(29878),xe=ue(19447),_e=ue(83116),Ae=ue(37613),Me=De=>{const{componentCls:We,menuCls:vt,colorError:nt,colorTextLightSolid:dt}=De,st=`${vt}-item`;return{[`${We}, ${We}-menu-submenu`]:{[`${vt} ${st}`]:{[`&${st}-danger:not(${st}-disabled)`]:{color:nt,"&:hover":{color:dt,backgroundColor:nt}}}}}};const Ke=De=>{const{componentCls:We,menuCls:vt,zIndexPopup:nt,dropdownArrowDistance:dt,sizePopupArrow:st,antCls:wt,iconCls:en,motionDurationMid:it,dropdownPaddingVertical:mt,fontSize:Ze,dropdownEdgeChildPadding:Ee,colorTextDisabled:He,fontSizeIcon:Ue,controlPaddingHorizontal:Ct,colorBgElevated:Ge}=De;return[{[We]:Object.assign(Object.assign({},(0,pe.Wf)(De)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:nt,display:"block","&::before":{position:"absolute",insetBlock:-dt+st/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${wt}-btn`]:{[`& > ${en}-down, & > ${wt}-btn-icon > ${en}-down`]:{fontSize:Ue}},[`${We}-wrap`]:{position:"relative",[`${wt}-btn > ${en}-down`]:{fontSize:Ue},[`${en}-down::before`]:{transition:`transform ${it}`}},[`${We}-wrap-open`]:{[`${en}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${wt}-slide-down-enter${wt}-slide-down-enter-active${We}-placement-bottomLeft,
|
|
|
&${wt}-slide-down-appear${wt}-slide-down-appear-active${We}-placement-bottomLeft,
|
|
|
&${wt}-slide-down-enter${wt}-slide-down-enter-active${We}-placement-bottom,
|
|
|
&${wt}-slide-down-appear${wt}-slide-down-appear-active${We}-placement-bottom,
|
|
|
&${wt}-slide-down-enter${wt}-slide-down-enter-active${We}-placement-bottomRight,
|
|
|
&${wt}-slide-down-appear${wt}-slide-down-appear-active${We}-placement-bottomRight`]:{animationName:je.fJ},[`&${wt}-slide-up-enter${wt}-slide-up-enter-active${We}-placement-topLeft,
|
|
|
&${wt}-slide-up-appear${wt}-slide-up-appear-active${We}-placement-topLeft,
|
|
|
&${wt}-slide-up-enter${wt}-slide-up-enter-active${We}-placement-top,
|
|
|
&${wt}-slide-up-appear${wt}-slide-up-appear-active${We}-placement-top,
|
|
|
&${wt}-slide-up-enter${wt}-slide-up-enter-active${We}-placement-topRight,
|
|
|
&${wt}-slide-up-appear${wt}-slide-up-appear-active${We}-placement-topRight`]:{animationName:je.Qt},[`&${wt}-slide-down-leave${wt}-slide-down-leave-active${We}-placement-bottomLeft,
|
|
|
&${wt}-slide-down-leave${wt}-slide-down-leave-active${We}-placement-bottom,
|
|
|
&${wt}-slide-down-leave${wt}-slide-down-leave-active${We}-placement-bottomRight`]:{animationName:je.Uw},[`&${wt}-slide-up-leave${wt}-slide-up-leave-active${We}-placement-topLeft,
|
|
|
&${wt}-slide-up-leave${wt}-slide-up-leave-active${We}-placement-top,
|
|
|
&${wt}-slide-up-leave${wt}-slide-up-leave-active${We}-placement-topRight`]:{animationName:je.ly}})},(0,xe.ZP)(De,{colorBg:Ge,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${We} ${vt}`]:{position:"relative",margin:0},[`${vt}-submenu-popup`]:{position:"absolute",zIndex:nt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${We}, ${We}-menu-submenu`]:{[vt]:Object.assign(Object.assign({padding:Ee,listStyleType:"none",backgroundColor:Ge,backgroundClip:"padding-box",borderRadius:De.borderRadiusLG,outline:"none",boxShadow:De.boxShadowSecondary},(0,pe.Qy)(De)),{[`${vt}-item-group-title`]:{padding:`${mt}px ${Ct}px`,color:De.colorTextDescription,transition:`all ${it}`},[`${vt}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${vt}-item-icon`]:{minWidth:Ze,marginInlineEnd:De.marginXS,fontSize:De.fontSizeSM},[`${vt}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${it}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${vt}-item, ${vt}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${mt}px ${Ct}px`,color:De.colorText,fontWeight:"normal",fontSize:Ze,lineHeight:De.lineHeight,cursor:"pointer",transition:`all ${it}`,borderRadius:De.borderRadiusSM,"&:hover, &-active":{backgroundColor:De.controlItemBgHover}},(0,pe.Qy)(De)),{"&-selected":{color:De.colorPrimary,backgroundColor:De.controlItemBgActive,"&:hover, &-active":{backgroundColor:De.controlItemBgActiveHover}},"&-disabled":{color:He,cursor:"not-allowed","&:hover":{color:He,backgroundColor:Ge,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${De.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:De.colorSplit},[`${We}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:De.paddingXS,[`${We}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:De.colorTextDescription,fontSize:Ue,fontStyle:"normal"}}}),[`${vt}-item-group-list`]:{margin:`0 ${De.marginXS}px`,padding:0,listStyle:"none"},[`${vt}-submenu-title`]:{paddingInlineEnd:Ct+De.fontSizeSM},[`${vt}-submenu-vertical`]:{position:"relative"},[`${vt}-submenu${vt}-submenu-disabled ${We}-menu-submenu-title`]:{[`&, ${We}-menu-submenu-arrow-icon`]:{color:He,backgroundColor:Ge,cursor:"not-allowed"}},[`${vt}-submenu-selected ${We}-menu-submenu-title`]:{color:De.colorPrimary}})}},[(0,je.oN)(De,"slide-up"),(0,je.oN)(De,"slide-down"),(0,Fe.Fm)(De,"move-up"),(0,Fe.Fm)(De,"move-down"),(0,tt._y)(De,"zoom-big")]]};var ct=(0,_e.Z)("Dropdown",(De,We)=>{let{rootPrefixCls:vt}=We;const{marginXXS:nt,sizePopupArrow:dt,controlHeight:st,fontSize:wt,lineHeight:en,paddingXXS:it,componentCls:mt,borderRadiusLG:Ze}=De,Ee=(st-wt*en)/2,{dropdownArrowOffset:He}=(0,xe.fS)({contentRadius:Ze}),Ue=(0,Ae.TS)(De,{menuCls:`${mt}-menu`,rootPrefixCls:vt,dropdownArrowDistance:dt/2+nt,dropdownArrowOffset:He,dropdownPaddingVertical:Ee,dropdownEdgeChildPadding:it});return[Ke(Ue),Me(Ue)]},De=>({zIndexPopup:De.zIndexPopupBase+50}))},64165:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return it}});var pe=ue(92310),je=ue.n(pe),Fe=ue(59301),tt=ue(36355),xe=ue(9763),_e=ue(64993),Ae=ue(88088),Me=()=>{const[,mt]=(0,Ae.Z)(),Ee=new _e.C(mt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Fe.createElement("svg",{style:Ee,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{fill:"none",fillRule:"evenodd"},Fe.createElement("g",{transform:"translate(24 31.67)"},Fe.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Fe.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"}),Fe.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)"}),Fe.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"}),Fe.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"})),Fe.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"}),Fe.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Fe.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Fe.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ct=()=>{const[,mt]=(0,Ae.Z)(),{colorFill:Ze,colorFillTertiary:Ee,colorFillQuaternary:He,colorBgContainer:Ue}=mt,{borderColor:Ct,shadowColor:Ge,contentColor:It}=(0,Fe.useMemo)(()=>({borderColor:new _e.C(Ze).onBackground(Ue).toHexShortString(),shadowColor:new _e.C(Ee).onBackground(Ue).toHexShortString(),contentColor:new _e.C(He).onBackground(Ue).toHexShortString()}),[Ze,Ee,He,Ue]);return Fe.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Fe.createElement("ellipse",{fill:Ge,cx:"32",cy:"33",rx:"32",ry:"7"}),Fe.createElement("g",{fillRule:"nonzero",stroke:Ct},Fe.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"}),Fe.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:It}))))},De=ue(83116),We=ue(37613);const vt=mt=>{const{componentCls:Ze,margin:Ee,marginXS:He,marginXL:Ue,fontSize:Ct,lineHeight:Ge}=mt;return{[Ze]:{marginInline:He,fontSize:Ct,lineHeight:Ge,textAlign:"center",[`${Ze}-image`]:{height:mt.emptyImgHeight,marginBottom:He,opacity:mt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ze}-description`]:{color:mt.colorText},[`${Ze}-footer`]:{marginTop:Ee},"&-normal":{marginBlock:Ue,color:mt.colorTextDisabled,[`${Ze}-description`]:{color:mt.colorTextDisabled},[`${Ze}-image`]:{height:mt.emptyImgHeightMD}},"&-small":{marginBlock:He,color:mt.colorTextDisabled,[`${Ze}-image`]:{height:mt.emptyImgHeightSM}}}}};var nt=(0,De.Z)("Empty",mt=>{const{componentCls:Ze,controlHeightLG:Ee}=mt,He=(0,We.TS)(mt,{emptyImgCls:`${Ze}-img`,emptyImgHeight:Ee*2.5,emptyImgHeightMD:Ee,emptyImgHeightSM:Ee*.875});return[vt(He)]}),dt=function(mt,Ze){var Ee={};for(var He in mt)Object.prototype.hasOwnProperty.call(mt,He)&&Ze.indexOf(He)<0&&(Ee[He]=mt[He]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,He=Object.getOwnPropertySymbols(mt);Ue<He.length;Ue++)Ze.indexOf(He[Ue])<0&&Object.prototype.propertyIsEnumerable.call(mt,He[Ue])&&(Ee[He[Ue]]=mt[He[Ue]]);return Ee};const st=Fe.createElement(Me,null),wt=Fe.createElement(ct,null),en=mt=>{var{className:Ze,rootClassName:Ee,prefixCls:He,image:Ue=st,description:Ct,children:Ge,imageStyle:It,style:et}=mt,kt=dt(mt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Je,direction:Ut,empty:ft}=Fe.useContext(tt.E_),Dt=Je("empty",He),[Et,ut]=nt(Dt),[Be]=(0,xe.Z)("Empty"),be=typeof Ct!="undefined"?Ct:Be==null?void 0:Be.description,ht=typeof be=="string"?be:"empty";let nn=null;return typeof Ue=="string"?nn=Fe.createElement("img",{alt:ht,src:Ue}):nn=Ue,Et(Fe.createElement("div",Object.assign({className:je()(ut,Dt,ft==null?void 0:ft.className,{[`${Dt}-normal`]:Ue===wt,[`${Dt}-rtl`]:Ut==="rtl"},Ze,Ee),style:Object.assign(Object.assign({},ft==null?void 0:ft.style),et)},kt),Fe.createElement("div",{className:`${Dt}-image`,style:It},nn),be&&Fe.createElement("div",{className:`${Dt}-description`},be),Ge&&Fe.createElement("div",{className:`${Dt}-footer`},Ge)))};en.PRESENTED_IMAGE_DEFAULT=st,en.PRESENTED_IMAGE_SIMPLE=wt;var it=en},78241:function(Mn,sn,ue){"use strict";ue.d(sn,{default:function(){return wr}});var pe=ue(94480),je=ue(92310),Fe=ue.n(je),tt=ue(77900),xe=ue(59301),_e=ue(62892),Ae=ue(32441);function Se(lt){const[ke,Oe]=xe.useState(lt);return xe.useEffect(()=>{const Te=setTimeout(()=>{Oe(lt)},lt.length?0:10);return()=>{clearTimeout(Te)}},[lt]),ke}var Me=ue(17313),Ke=ue(29878),ct=ue(8378),De=ue(37613),We=ue(83116),nt=lt=>{const{componentCls:ke}=lt,Oe=`${ke}-show-help`,Te=`${ke}-show-help-item`;return{[Oe]:{transition:`opacity ${lt.motionDurationSlow} ${lt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Te]:{overflow:"hidden",transition:`height ${lt.motionDurationSlow} ${lt.motionEaseInOut},
|
|
|
opacity ${lt.motionDurationSlow} ${lt.motionEaseInOut},
|
|
|
transform ${lt.motionDurationSlow} ${lt.motionEaseInOut} !important`,[`&${Te}-appear, &${Te}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Te}-leave-active`]:{transform:"translateY(-5px)"}}}}};const dt=lt=>({legend:{display:"block",width:"100%",marginBottom:lt.marginLG,padding:0,color:lt.colorTextDescription,fontSize:lt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${lt.lineWidth}px ${lt.lineType} ${lt.colorBorder}`},label:{fontSize:lt.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 ${lt.controlOutlineWidth}px ${lt.controlOutline}`},output:{display:"block",paddingTop:15,color:lt.colorText,fontSize:lt.fontSize,lineHeight:lt.lineHeight}}),st=(lt,ke)=>{const{formItemCls:Oe}=lt;return{[Oe]:{[`${Oe}-label > label`]:{height:ke},[`${Oe}-control-input`]:{minHeight:ke}}}},wt=lt=>{const{componentCls:ke}=lt;return{[lt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Me.Wf)(lt)),dt(lt)),{[`${ke}-text`]:{display:"inline-block",paddingInlineEnd:lt.paddingSM},"&-small":Object.assign({},st(lt,lt.controlHeightSM)),"&-large":Object.assign({},st(lt,lt.controlHeightLG))})}},en=lt=>{const{formItemCls:ke,iconCls:Oe,componentCls:Te,rootPrefixCls:Pe,labelRequiredMarkColor:Qe,labelColor:pt,labelFontSize:Yt,labelHeight:$t,labelColonMarginInlineStart:qt,labelColonMarginInlineEnd:vn,itemMarginBottom:wn}=lt;return{[ke]:Object.assign(Object.assign({},(0,Me.Wf)(lt)),{marginBottom:wn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Pe}-row`]:{display:"none"},"&-has-warning":{[`${ke}-split`]:{color:lt.colorError}},"&-has-error":{[`${ke}-split`]:{color:lt.colorWarning}},[`${ke}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${lt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:$t,color:pt,fontSize:Yt,[`> ${Oe}`]:{fontSize:lt.fontSize,verticalAlign:"top"},[`&${ke}-required:not(${ke}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:lt.marginXXS,color:Qe,fontSize:lt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Te}-hide-required-mark &`]:{display:"none"}},[`${ke}-optional`]:{display:"inline-block",marginInlineStart:lt.marginXXS,color:lt.colorTextDescription,[`${Te}-hide-required-mark &`]:{display:"none"}},[`${ke}-tooltip`]:{color:lt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:lt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:qt,marginInlineEnd:vn},[`&${ke}-no-colon::after`]:{content:'"\\a0"'}}},[`${ke}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Pe}-col-'"]):not([class*="' ${Pe}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:lt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[ke]:{"&-explain, &-extra":{clear:"both",color:lt.colorTextDescription,fontSize:lt.fontSize,lineHeight:lt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:lt.controlHeightSM,transition:`color ${lt.motionDurationMid} ${lt.motionEaseOut}`},"&-explain":{"&-error":{color:lt.colorError},"&-warning":{color:lt.colorWarning}}},[`&-with-help ${ke}-explain`]:{height:"auto",opacity:1},[`${ke}-feedback-icon`]:{fontSize:lt.fontSize,textAlign:"center",visibility:"visible",animationName:Ke.kr,animationDuration:lt.motionDurationMid,animationTimingFunction:lt.motionEaseOutBack,pointerEvents:"none","&-success":{color:lt.colorSuccess},"&-error":{color:lt.colorError},"&-warning":{color:lt.colorWarning},"&-validating":{color:lt.colorPrimary}}})}},it=lt=>{const{componentCls:ke,formItemCls:Oe}=lt;return{[`${ke}-horizontal`]:{[`${Oe}-label`]:{flexGrow:0},[`${Oe}-control`]:{flex:"1 1 0",minWidth:0},[`${Oe}-label[class$='-24'], ${Oe}-label[class*='-24 ']`]:{[`& + ${Oe}-control`]:{minWidth:"unset"}}}}},mt=lt=>{const{componentCls:ke,formItemCls:Oe}=lt;return{[`${ke}-inline`]:{display:"flex",flexWrap:"wrap",[Oe]:{flex:"none",marginInlineEnd:lt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Oe}-label,
|
|
|
> ${Oe}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Oe}-label`]:{flex:"none"},[`${ke}-text`]:{display:"inline-block"},[`${Oe}-has-feedback`]:{display:"inline-block"}}}}},Ze=lt=>({padding:lt.verticalLabelPadding,margin:lt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Ee=lt=>{const{componentCls:ke,formItemCls:Oe,rootPrefixCls:Te}=lt;return{[`${Oe} ${Oe}-label`]:Ze(lt),[ke]:{[Oe]:{flexWrap:"wrap",[`${Oe}-label, ${Oe}-control`]:{[`&:not([class*=" ${Te}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},He=lt=>{const{componentCls:ke,formItemCls:Oe,rootPrefixCls:Te}=lt;return{[`${ke}-vertical`]:{[Oe]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${ke}-item-control`]:{width:"100%"}}},[`${ke}-vertical ${Oe}-label,
|
|
|
.${Te}-col-24${Oe}-label,
|
|
|
.${Te}-col-xl-24${Oe}-label`]:Ze(lt),[`@media (max-width: ${lt.screenXSMax}px)`]:[Ee(lt),{[ke]:{[`.${Te}-col-xs-24${Oe}-label`]:Ze(lt)}}],[`@media (max-width: ${lt.screenSMMax}px)`]:{[ke]:{[`.${Te}-col-sm-24${Oe}-label`]:Ze(lt)}},[`@media (max-width: ${lt.screenMDMax}px)`]:{[ke]:{[`.${Te}-col-md-24${Oe}-label`]:Ze(lt)}},[`@media (max-width: ${lt.screenLGMax}px)`]:{[ke]:{[`.${Te}-col-lg-24${Oe}-label`]:Ze(lt)}}}},Ue=(lt,ke)=>(0,De.TS)(lt,{formItemCls:`${lt.componentCls}-item`,rootPrefixCls:ke});var Ct=(0,We.Z)("Form",(lt,ke)=>{let{rootPrefixCls:Oe}=ke;const Te=Ue(lt,Oe);return[wt(Te),en(Te),nt(Te),it(Te),mt(Te),He(Te),(0,ct.Z)(Te),Ke.kr]},lt=>({labelRequiredMarkColor:lt.colorError,labelColor:lt.colorTextHeading,labelFontSize:lt.fontSize,labelHeight:lt.controlHeight,labelColonMarginInlineStart:lt.marginXXS/2,labelColonMarginInlineEnd:lt.marginXS,itemMarginBottom:lt.marginLG,verticalLabelPadding:`0 0 ${lt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ge=[];function It(lt,ke,Oe){let Te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof lt=="string"?lt:`${ke}-${Te}`,error:lt,errorStatus:Oe}}var kt=lt=>{let{help:ke,helpStatus:Oe,errors:Te=Ge,warnings:Pe=Ge,className:Qe,fieldId:pt,onVisibleChanged:Yt}=lt;const{prefixCls:$t}=xe.useContext(Ae.Rk),qt=`${$t}-item-explain`,[,vn]=Ct($t),wn=(0,xe.useMemo)(()=>(0,_e.Z)($t),[$t]),Sn=Se(Te),Bt=Se(Pe),dn=xe.useMemo(()=>ke!=null?[It(ke,"help",Oe)]:[].concat((0,pe.Z)(Sn.map((Mt,Pt)=>It(Mt,"error","error",Pt))),(0,pe.Z)(Bt.map((Mt,Pt)=>It(Mt,"warning","warning",Pt)))),[ke,Oe,Sn,Bt]),at={};return pt&&(at.id=`${pt}_help`),xe.createElement(tt.default,{motionDeadline:wn.motionDeadline,motionName:`${$t}-show-help`,visible:!!dn.length,onVisibleChanged:Yt},Mt=>{const{className:Pt,style:Rt}=Mt;return xe.createElement("div",Object.assign({},at,{className:Fe()(qt,Pt,Qe,vn),style:Rt,role:"alert"}),xe.createElement(tt.CSSMotionList,Object.assign({keys:dn},(0,_e.Z)($t),{motionName:`${$t}-show-help-item`,component:!1}),an=>{const{key:Tt,error:rn,errorStatus:$e,className:xt,style:St}=an;return xe.createElement("div",{key:Tt,className:Fe()(xt,{[`${qt}-${$e}`]:$e}),style:St},rn)}))})},Je=ue(95013),Ut=ue(36355),ft=ue(1684),Dt=ue(52946),Et=ue(19716),ut=ue(16722);const Be=["parentNode"],be="form_item";function ht(lt){return lt===void 0||lt===!1?[]:Array.isArray(lt)?lt:[lt]}function nn(lt,ke){if(!lt.length)return;const Oe=lt.join("_");return ke?`${ke}_${Oe}`:Be.includes(Oe)?`${be}_${Oe}`:Oe}function Wt(lt,ke,Oe,Te,Pe,Qe){let pt=Te;return Qe!==void 0?pt=Qe:Oe.validating?pt="validating":lt.length?pt="error":ke.length?pt="warning":(Oe.touched||Pe&&Oe.validated)&&(pt="success"),pt}function Ve(lt){return ht(lt).join("_")}function Ye(lt){const[ke]=(0,Je.useForm)(),Oe=xe.useRef({}),Te=xe.useMemo(()=>lt!=null?lt:Object.assign(Object.assign({},ke),{__INTERNAL__:{itemRef:Pe=>Qe=>{const pt=Ve(Pe);Qe?Oe.current[pt]=Qe:delete Oe.current[pt]}},scrollToField:function(Pe){let Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const pt=ht(Pe),Yt=nn(pt,Te.__INTERNAL__.name),$t=Yt?document.getElementById(Yt):null;$t&&(0,ut.Z)($t,Object.assign({scrollMode:"if-needed",block:"nearest"},Qe))},getFieldInstance:Pe=>{const Qe=Ve(Pe);return Oe.current[Qe]}}),[lt,ke]);return[Te]}var At=ue(28726),gn=function(lt,ke){var Oe={};for(var Te in lt)Object.prototype.hasOwnProperty.call(lt,Te)&&ke.indexOf(Te)<0&&(Oe[Te]=lt[Te]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Te=Object.getOwnPropertySymbols(lt);Pe<Te.length;Pe++)ke.indexOf(Te[Pe])<0&&Object.prototype.propertyIsEnumerable.call(lt,Te[Pe])&&(Oe[Te[Pe]]=lt[Te[Pe]]);return Oe};const Jt=(lt,ke)=>{const Oe=xe.useContext(ft.Z),{getPrefixCls:Te,direction:Pe,form:Qe}=xe.useContext(Ut.E_),{prefixCls:pt,className:Yt,rootClassName:$t,size:qt,disabled:vn=Oe,form:wn,colon:Sn,labelAlign:Bt,labelWrap:dn,labelCol:at,wrapperCol:Mt,hideRequiredMark:Pt,layout:Rt="horizontal",scrollToFirstError:an,requiredMark:Tt,onFinishFailed:rn,name:$e,style:xt,feedbackIcons:St}=lt,zt=gn(lt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ot=(0,Et.Z)(qt),Ht=xe.useContext(At.Z),Zt=(0,xe.useMemo)(()=>Tt!==void 0?Tt:Qe&&Qe.requiredMark!==void 0?Qe.requiredMark:!Pt,[Pt,Tt,Qe]),mn=Sn!=null?Sn:Qe==null?void 0:Qe.colon,xn=Te("form",pt),[Ln,zn]=Ct(xn),er=Fe()(xn,`${xn}-${Rt}`,{[`${xn}-hide-required-mark`]:Zt===!1,[`${xn}-rtl`]:Pe==="rtl",[`${xn}-${Ot}`]:Ot},zn,Qe==null?void 0:Qe.className,Yt,$t),[cr]=Ye(wn),{__INTERNAL__:Un}=cr;Un.name=$e;const In=(0,xe.useMemo)(()=>({name:$e,labelAlign:Bt,labelCol:at,labelWrap:dn,wrapperCol:Mt,vertical:Rt==="vertical",colon:mn,requiredMark:Zt,itemRef:Un.itemRef,form:cr,feedbackIcons:St}),[$e,Bt,at,Mt,Rt,mn,Zt,cr,St]);xe.useImperativeHandle(ke,()=>cr);const fr=(yr,Gn)=>{if(yr){let Xn={block:"nearest"};typeof yr=="object"&&(Xn=yr),cr.scrollToField(Gn,Xn)}},tr=yr=>{if(rn==null||rn(yr),yr.errorFields.length){const Gn=yr.errorFields[0].name;if(an!==void 0){fr(an,Gn);return}Qe&&Qe.scrollToFirstError!==void 0&&fr(Qe.scrollToFirstError,Gn)}};return Ln(xe.createElement(ft.n,{disabled:vn},xe.createElement(Dt.q,{size:Ot},xe.createElement(Ae.RV,Object.assign({},{validateMessages:Ht}),xe.createElement(Ae.q3.Provider,{value:In},xe.createElement(Je.default,Object.assign({id:$e},zt,{name:$e,onFinishFailed:tr,form:cr,style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),xt),className:er})))))))};var Gt=xe.forwardRef(Jt),Vt=ue(41799),Nt=ue(8654),ve=ue(92343),se=ue(11592);function oe(lt){if(typeof lt=="function")return lt;const ke=(0,se.Z)(lt);return ke.length<=1?ke[0]:ke}const de=()=>{const{status:lt,errors:ke=[],warnings:Oe=[]}=(0,xe.useContext)(Ae.aM);return{status:lt,errors:ke,warnings:Oe}};de.Context=Ae.aM;var fe=de,le=ue(16089);function Ie(lt){const[ke,Oe]=xe.useState(lt),Te=(0,xe.useRef)(null),Pe=(0,xe.useRef)([]),Qe=(0,xe.useRef)(!1);xe.useEffect(()=>(Qe.current=!1,()=>{Qe.current=!0,le.Z.cancel(Te.current),Te.current=null}),[]);function pt(Yt){Qe.current||(Te.current===null&&(Pe.current=[],Te.current=(0,le.Z)(()=>{Te.current=null,Oe($t=>{let qt=$t;return Pe.current.forEach(vn=>{qt=vn(qt)}),qt})})),Pe.current.push(Yt))}return[ke,pt]}function ot(){const{itemRef:lt}=xe.useContext(Ae.q3),ke=xe.useRef({});function Oe(Te,Pe){const Qe=Pe&&typeof Pe=="object"&&Pe.ref,pt=Te.join("_");return(ke.current.name!==pt||ke.current.originRef!==Qe)&&(ke.current.name=pt,ke.current.originRef=Qe,ke.current.ref=(0,Nt.sQ)(lt(Te),Qe)),ke.current.ref}return Oe}var Kt=ue(29194),Ft=ue(34280),Xt=ue(2738),Qt=ue(27382),on=ue(37028);const pn=lt=>{const{formItemCls:ke}=lt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${ke}-control`]:{display:"flex"}}}};var Cn=(0,We.b)(["Form","item-item"],(lt,ke)=>{let{rootPrefixCls:Oe}=ke;const Te=Ue(lt,Oe);return[pn(Te)]}),hn=lt=>{const{prefixCls:ke,status:Oe,wrapperCol:Te,children:Pe,errors:Qe,warnings:pt,_internalItemRender:Yt,extra:$t,help:qt,fieldId:vn,marginBottom:wn,onErrorVisibleChanged:Sn}=lt,Bt=`${ke}-item`,dn=xe.useContext(Ae.q3),at=Te||dn.wrapperCol||{},Mt=Fe()(`${Bt}-control`,at.className),Pt=xe.useMemo(()=>Object.assign({},dn),[dn]);delete Pt.labelCol,delete Pt.wrapperCol;const Rt=xe.createElement("div",{className:`${Bt}-control-input`},xe.createElement("div",{className:`${Bt}-control-input-content`},Pe)),an=xe.useMemo(()=>({prefixCls:ke,status:Oe}),[ke,Oe]),Tt=wn!==null||Qe.length||pt.length?xe.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},xe.createElement(Ae.Rk.Provider,{value:an},xe.createElement(kt,{fieldId:vn,errors:Qe,warnings:pt,help:qt,helpStatus:Oe,className:`${Bt}-explain-connected`,onVisibleChanged:Sn})),!!wn&&xe.createElement("div",{style:{width:0,height:wn}})):null,rn={};vn&&(rn.id=`${vn}_extra`);const $e=$t?xe.createElement("div",Object.assign({},rn,{className:`${Bt}-extra`}),$t):null,xt=Yt&&Yt.mark==="pro_table_render"&&Yt.render?Yt.render(lt,{input:Rt,errorList:Tt,extra:$e}):xe.createElement(xe.Fragment,null,Rt,Tt,$e);return xe.createElement(Ae.q3.Provider,{value:Pt},xe.createElement(on.Z,Object.assign({},at,{className:Mt}),xt),xe.createElement(Cn,{prefixCls:ke}))},On=ue(61485),rt=ue(31724),ze=ue(9763),Xe=ue(6848),jt=function(lt,ke){var Oe={};for(var Te in lt)Object.prototype.hasOwnProperty.call(lt,Te)&&ke.indexOf(Te)<0&&(Oe[Te]=lt[Te]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Te=Object.getOwnPropertySymbols(lt);Pe<Te.length;Pe++)ke.indexOf(Te[Pe])<0&&Object.prototype.propertyIsEnumerable.call(lt,Te[Pe])&&(Oe[Te[Pe]]=lt[Te[Pe]]);return Oe};function tn(lt){return lt?typeof lt=="object"&&!xe.isValidElement(lt)?lt:{title:lt}:null}var Dn=lt=>{let{prefixCls:ke,label:Oe,htmlFor:Te,labelCol:Pe,labelAlign:Qe,colon:pt,required:Yt,requiredMark:$t,tooltip:qt}=lt;var vn;const[wn]=(0,ze.Z)("Form"),{vertical:Sn,labelAlign:Bt,labelCol:dn,labelWrap:at,colon:Mt}=xe.useContext(Ae.q3);if(!Oe)return null;const Pt=Pe||dn||{},Rt=Qe||Bt,an=`${ke}-item-label`,Tt=Fe()(an,Rt==="left"&&`${an}-left`,Pt.className,{[`${an}-wrap`]:!!at});let rn=Oe;const $e=pt===!0||Mt!==!1&&pt!==!1;$e&&!Sn&&typeof Oe=="string"&&Oe.trim()!==""&&(rn=Oe.replace(/[:|:]\s*$/,""));const St=tn(qt);if(St){const{icon:Zt=xe.createElement(On.Z,null)}=St,mn=jt(St,["icon"]),xn=xe.createElement(Xe.Z,Object.assign({},mn),xe.cloneElement(Zt,{className:`${ke}-item-tooltip`,title:""}));rn=xe.createElement(xe.Fragment,null,rn,xn)}const zt=$t==="optional",Ot=typeof $t=="function";Ot?rn=$t(rn,{required:!!Yt}):zt&&!Yt&&(rn=xe.createElement(xe.Fragment,null,rn,xe.createElement("span",{className:`${ke}-item-optional`,title:""},(wn==null?void 0:wn.optional)||((vn=rt.Z.Form)===null||vn===void 0?void 0:vn.optional))));const Ht=Fe()({[`${ke}-item-required`]:Yt,[`${ke}-item-required-mark-optional`]:zt||Ot,[`${ke}-item-no-colon`]:!$e});return xe.createElement(on.Z,Object.assign({},Pt,{className:Tt}),xe.createElement("label",{htmlFor:Te,className:Ht,title:typeof Oe=="string"?Oe:""},rn))},Tn=ue(29679),_n=ue(19248),Fn=ue(96512),jn=ue(58617);const An={success:Tn.Z,warning:Fn.Z,error:_n.Z,validating:jn.Z};function hr(lt){let{children:ke,errors:Oe,warnings:Te,hasFeedback:Pe,validateStatus:Qe,prefixCls:pt,meta:Yt,noStyle:$t}=lt;const qt=`${pt}-item`,{feedbackIcons:vn}=xe.useContext(Ae.q3),wn=Wt(Oe,Te,Yt,null,!!Pe,Qe),{isFormItemInput:Sn,status:Bt}=xe.useContext(Ae.aM),dn=xe.useMemo(()=>{var at;let Mt;if(Pe){const an=Pe!==!0&&Pe.icons||vn,Tt=wn&&((at=an==null?void 0:an({status:wn,errors:Oe,warnings:Te}))===null||at===void 0?void 0:at[wn]),rn=wn&&An[wn];Mt=Tt!==!1&&rn?xe.createElement("span",{className:Fe()(`${qt}-feedback-icon`,`${qt}-feedback-icon-${wn}`)},Tt||xe.createElement(rn,null)):null}let Pt=!0,Rt=wn||"";return $t&&(Pt=Sn,Rt=(wn!=null?wn:Bt)||""),{status:Rt,errors:Oe,warnings:Te,hasFeedback:!!Pe,feedbackIcon:Mt,isFormItemInput:Pt}},[wn,Pe,$t,Sn,Bt]);return xe.createElement(Ae.aM.Provider,{value:dn},ke)}var kr=function(lt,ke){var Oe={};for(var Te in lt)Object.prototype.hasOwnProperty.call(lt,Te)&&ke.indexOf(Te)<0&&(Oe[Te]=lt[Te]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Te=Object.getOwnPropertySymbols(lt);Pe<Te.length;Pe++)ke.indexOf(Te[Pe])<0&&Object.prototype.propertyIsEnumerable.call(lt,Te[Pe])&&(Oe[Te[Pe]]=lt[Te[Pe]]);return Oe};function Tr(lt){const{prefixCls:ke,className:Oe,rootClassName:Te,style:Pe,help:Qe,errors:pt,warnings:Yt,validateStatus:$t,meta:qt,hasFeedback:vn,hidden:wn,children:Sn,fieldId:Bt,required:dn,isRequired:at,onSubItemMetaChange:Mt}=lt,Pt=kr(lt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Rt=`${ke}-item`,{requiredMark:an}=xe.useContext(Ae.q3),Tt=xe.useRef(null),rn=Se(pt),$e=Se(Yt),xt=Qe!=null,St=!!(xt||pt.length||Yt.length),zt=!!Tt.current&&(0,Kt.Z)(Tt.current),[Ot,Ht]=xe.useState(null);(0,Ft.Z)(()=>{if(St&&Tt.current){const zn=getComputedStyle(Tt.current);Ht(parseInt(zn.marginBottom,10))}},[St,zt]);const Zt=zn=>{zn||Ht(null)},xn=function(){let zn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const er=zn?rn:qt.errors,cr=zn?$e:qt.warnings;return Wt(er,cr,qt,"",!!vn,$t)}(),Ln=Fe()(Rt,Oe,Te,{[`${Rt}-with-help`]:xt||rn.length||$e.length,[`${Rt}-has-feedback`]:xn&&vn,[`${Rt}-has-success`]:xn==="success",[`${Rt}-has-warning`]:xn==="warning",[`${Rt}-has-error`]:xn==="error",[`${Rt}-is-validating`]:xn==="validating",[`${Rt}-hidden`]:wn});return xe.createElement("div",{className:Ln,style:Pe,ref:Tt},xe.createElement(Qt.Z,Object.assign({className:`${Rt}-row`},(0,Xt.Z)(Pt,["_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"])),xe.createElement(Dn,Object.assign({htmlFor:Bt},lt,{requiredMark:an,required:dn!=null?dn:at,prefixCls:ke})),xe.createElement(hn,Object.assign({},lt,qt,{errors:rn,warnings:$e,prefixCls:ke,status:xn,help:Qe,marginBottom:Ot,onErrorVisibleChanged:Zt}),xe.createElement(Ae.qI.Provider,{value:Mt},xe.createElement(hr,{prefixCls:ke,meta:qt,errors:qt.errors,warnings:qt.warnings,hasFeedback:vn,validateStatus:xn},Sn)))),!!Ot&&xe.createElement("div",{className:`${Rt}-margin-offset`,style:{marginBottom:-Ot}}))}const Hr="__SPLIT__",sr=null,Mr=xe.memo(lt=>{let{children:ke}=lt;return ke},(lt,ke)=>lt.value===ke.value&<.update===ke.update&<.childProps.length===ke.childProps.length&<.childProps.every((Oe,Te)=>Oe===ke.childProps[Te]));function rr(lt){return lt!=null}function Or(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Fr(lt){const{name:ke,noStyle:Oe,className:Te,dependencies:Pe,prefixCls:Qe,shouldUpdate:pt,rules:Yt,children:$t,required:qt,label:vn,messageVariables:wn,trigger:Sn="onChange",validateTrigger:Bt,hidden:dn,help:at}=lt,{getPrefixCls:Mt}=xe.useContext(Ut.E_),{name:Pt}=xe.useContext(Ae.q3),Rt=oe($t),an=typeof Rt=="function",Tt=xe.useContext(Ae.qI),{validateTrigger:rn}=xe.useContext(Je.FieldContext),$e=Bt!==void 0?Bt:rn,xt=rr(ke),St=Mt("form",Qe),[zt,Ot]=Ct(St),Ht=xe.useContext(Je.ListContext),Zt=xe.useRef(),[mn,xn]=Ie({}),[Ln,zn]=(0,Vt.Z)(()=>Or()),er=Gn=>{const Xn=Ht==null?void 0:Ht.getKey(Gn.name);if(zn(Gn.destroy?Or():Gn,!0),Oe&&at!==!1&&Tt){let br=Gn.name;if(Gn.destroy)br=Zt.current||br;else if(Xn!==void 0){const[ur,Br]=Xn;br=[ur].concat((0,pe.Z)(Br)),Zt.current=br}Tt(Gn,br)}},cr=(Gn,Xn)=>{xn(br=>{const ur=Object.assign({},br),Gr=[].concat((0,pe.Z)(Gn.name.slice(0,-1)),(0,pe.Z)(Xn)).join(Hr);return Gn.destroy?delete ur[Gr]:ur[Gr]=Gn,ur})},[Un,In]=xe.useMemo(()=>{const Gn=(0,pe.Z)(Ln.errors),Xn=(0,pe.Z)(Ln.warnings);return Object.values(mn).forEach(br=>{Gn.push.apply(Gn,(0,pe.Z)(br.errors||[])),Xn.push.apply(Xn,(0,pe.Z)(br.warnings||[]))}),[Gn,Xn]},[mn,Ln.errors,Ln.warnings]),fr=ot();function tr(Gn,Xn,br){return Oe&&!dn?xe.createElement(hr,{prefixCls:St,hasFeedback:lt.hasFeedback,validateStatus:lt.validateStatus,meta:Ln,errors:Un,warnings:In,noStyle:!0},Gn):xe.createElement(Tr,Object.assign({key:"row"},lt,{className:Fe()(Te,Ot),prefixCls:St,fieldId:Xn,isRequired:br,errors:Un,warnings:In,meta:Ln,onSubItemMetaChange:cr}),Gn)}if(!xt&&!an&&!Pe)return zt(tr(Rt));let yr={};return typeof vn=="string"?yr.label=vn:ke&&(yr.label=String(ke)),wn&&(yr=Object.assign(Object.assign({},yr),wn)),zt(xe.createElement(Je.Field,Object.assign({},lt,{messageVariables:yr,trigger:Sn,validateTrigger:$e,onMetaChange:er}),(Gn,Xn,br)=>{const ur=ht(ke).length&&Xn?Xn.name:[],Br=nn(ur,Pt),Gr=qt!==void 0?qt:!!(Yt&&Yt.some(En=>{if(En&&typeof En=="object"&&En.required&&!En.warningOnly)return!0;if(typeof En=="function"){const gr=En(br);return gr&&gr.required&&!gr.warningOnly}return!1})),ar=Object.assign({},Gn);let kn=null;if(Array.isArray(Rt)&&xt)kn=Rt;else if(!(an&&(!(pt||Pe)||xt))){if(!(Pe&&!an&&!xt))if((0,ve.l$)(Rt)){const En=Object.assign(Object.assign({},Rt.props),ar);if(En.id||(En.id=Br),at||Un.length>0||In.length>0||lt.extra){const Er=[];(at||Un.length>0)&&Er.push(`${Br}_help`),lt.extra&&Er.push(`${Br}_extra`),En["aria-describedby"]=Er.join(" ")}Un.length>0&&(En["aria-invalid"]="true"),Gr&&(En["aria-required"]="true"),(0,Nt.Yr)(Rt)&&(En.ref=fr(ur,Rt)),new Set([].concat((0,pe.Z)(ht(Sn)),(0,pe.Z)(ht($e)))).forEach(Er=>{En[Er]=function(){for(var Lr,Ir,pr,Sr,ii,Hn=arguments.length,qn=new Array(Hn),Dr=0;Dr<Hn;Dr++)qn[Dr]=arguments[Dr];(pr=ar[Er])===null||pr===void 0||(Lr=pr).call.apply(Lr,[ar].concat(qn)),(ii=(Sr=Rt.props)[Er])===null||ii===void 0||(Ir=ii).call.apply(Ir,[Sr].concat(qn))}});const nr=[En["aria-required"],En["aria-invalid"],En["aria-describedby"]];kn=xe.createElement(Mr,{value:ar[lt.valuePropName||"value"],update:Rt,childProps:nr},(0,ve.Tm)(Rt,En))}else an&&(pt||Pe)&&!xt?kn=Rt(br):kn=Rt}return tr(kn,Br,Gr)}))}const _r=Fr;_r.useStatus=fe;var jr=_r,Nr=function(lt,ke){var Oe={};for(var Te in lt)Object.prototype.hasOwnProperty.call(lt,Te)&&ke.indexOf(Te)<0&&(Oe[Te]=lt[Te]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Te=Object.getOwnPropertySymbols(lt);Pe<Te.length;Pe++)ke.indexOf(Te[Pe])<0&&Object.prototype.propertyIsEnumerable.call(lt,Te[Pe])&&(Oe[Te[Pe]]=lt[Te[Pe]]);return Oe},lr=lt=>{var{prefixCls:ke,children:Oe}=lt,Te=Nr(lt,["prefixCls","children"]);const{getPrefixCls:Pe}=xe.useContext(Ut.E_),Qe=Pe("form",ke),pt=xe.useMemo(()=>({prefixCls:Qe,status:"error"}),[Qe]);return xe.createElement(Je.List,Object.assign({},Te),(Yt,$t,qt)=>xe.createElement(Ae.Rk.Provider,{value:pt},Oe(Yt.map(vn=>Object.assign(Object.assign({},vn),{fieldKey:vn.key})),$t,{errors:qt.errors,warnings:qt.warnings})))};function Rn(){const{form:lt}=(0,xe.useContext)(Ae.q3);return lt}const $n=Gt;$n.Item=jr,$n.List=lr,$n.ErrorList=kt,$n.useForm=Ye,$n.useFormInstance=Rn,$n.useWatch=Je.useWatch,$n.Provider=Ae.RV,$n.create=()=>{};var wr=$n},20071:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return On}});var pe=ue(84105),je=ue(87395),Fe=ue(92310),tt=ue.n(Fe),xe=ue(54476),_e=ue(20068),Ae=ue(76190),Se=ue(42978),Me=ue(75931),Ke=ue(67732),ct=ue(83652);function De(){return typeof BigInt=="function"}function We(rt){return!rt&&rt!==0&&!Number.isNaN(rt)||!String(rt).trim()}function vt(rt){var ze=rt.trim(),Xe=ze.startsWith("-");Xe&&(ze=ze.slice(1)),ze=ze.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ze.startsWith(".")&&(ze="0".concat(ze));var jt=ze||"0",tn=jt.split("."),cn=tn[0]||"0",Dn=tn[1]||"0";cn==="0"&&Dn==="0"&&(Xe=!1);var Tn=Xe?"-":"";return{negative:Xe,negativeStr:Tn,trimStr:jt,integerStr:cn,decimalStr:Dn,fullStr:"".concat(Tn).concat(jt)}}function nt(rt){var ze=String(rt);return!Number.isNaN(Number(ze))&&ze.includes("e")}function dt(rt){var ze=String(rt);if(nt(rt)){var Xe=Number(ze.slice(ze.indexOf("e-")+2)),jt=ze.match(/\.(\d+)/);return jt!=null&&jt[1]&&(Xe+=jt[1].length),Xe}return ze.includes(".")&&wt(ze)?ze.length-ze.indexOf(".")-1:0}function st(rt){var ze=String(rt);if(nt(rt)){if(rt>Number.MAX_SAFE_INTEGER)return String(De()?BigInt(rt).toString():Number.MAX_SAFE_INTEGER);if(rt<Number.MIN_SAFE_INTEGER)return String(De()?BigInt(rt).toString():Number.MIN_SAFE_INTEGER);ze=rt.toFixed(dt(ze))}return vt(ze).fullStr}function wt(rt){return typeof rt=="number"?!Number.isNaN(rt):rt?/^\s*-?\d+(\.\d+)?\s*$/.test(rt)||/^\s*-?\d+\.\s*$/.test(rt)||/^\s*-?\.\d+\s*$/.test(rt):!1}var en=function(){function rt(ze){if((0,Ke.Z)(this,rt),(0,_e.Z)(this,"origin",""),(0,_e.Z)(this,"negative",void 0),(0,_e.Z)(this,"integer",void 0),(0,_e.Z)(this,"decimal",void 0),(0,_e.Z)(this,"decimalLen",void 0),(0,_e.Z)(this,"empty",void 0),(0,_e.Z)(this,"nan",void 0),We(ze)){this.empty=!0;return}if(this.origin=String(ze),ze==="-"||Number.isNaN(ze)){this.nan=!0;return}var Xe=ze;if(nt(Xe)&&(Xe=Number(Xe)),Xe=typeof Xe=="string"?Xe:st(Xe),wt(Xe)){var jt=vt(Xe);this.negative=jt.negative;var tn=jt.trimStr.split(".");this.integer=BigInt(tn[0]);var cn=tn[1]||"0";this.decimal=BigInt(cn),this.decimalLen=cn.length}else this.nan=!0}return(0,ct.Z)(rt,[{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(Xe){var jt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Xe,"0"));return BigInt(jt)}},{key:"negate",value:function(){var Xe=new rt(this.toString());return Xe.negative=!Xe.negative,Xe}},{key:"cal",value:function(Xe,jt,tn){var cn=Math.max(this.getDecimalStr().length,Xe.getDecimalStr().length),Dn=this.alignDecimal(cn),Tn=Xe.alignDecimal(cn),_n=jt(Dn,Tn).toString(),Fn=tn(cn),jn=vt(_n),An=jn.negativeStr,hr=jn.trimStr,kr="".concat(An).concat(hr.padStart(Fn+1,"0"));return new rt("".concat(kr.slice(0,-Fn),".").concat(kr.slice(-Fn)))}},{key:"add",value:function(Xe){if(this.isInvalidate())return new rt(Xe);var jt=new rt(Xe);return jt.isInvalidate()?this:this.cal(jt,function(tn,cn){return tn+cn},function(tn){return tn})}},{key:"multi",value:function(Xe){var jt=new rt(Xe);return this.isInvalidate()||jt.isInvalidate()?new rt(NaN):this.cal(jt,function(tn,cn){return tn*cn},function(tn){return tn*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(Xe){return this.toString()===(Xe==null?void 0:Xe.toString())}},{key:"lessEquals",value:function(Xe){return this.add(Xe.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Xe?this.isInvalidate()?"":vt("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),rt}(),it=function(){function rt(ze){if((0,Ke.Z)(this,rt),(0,_e.Z)(this,"origin",""),(0,_e.Z)(this,"number",void 0),(0,_e.Z)(this,"empty",void 0),We(ze)){this.empty=!0;return}this.origin=String(ze),this.number=Number(ze)}return(0,ct.Z)(rt,[{key:"negate",value:function(){return new rt(-this.toNumber())}},{key:"add",value:function(Xe){if(this.isInvalidate())return new rt(Xe);var jt=Number(Xe);if(Number.isNaN(jt))return this;var tn=this.number+jt;if(tn>Number.MAX_SAFE_INTEGER)return new rt(Number.MAX_SAFE_INTEGER);if(tn<Number.MIN_SAFE_INTEGER)return new rt(Number.MIN_SAFE_INTEGER);var cn=Math.max(dt(this.number),dt(jt));return new rt(tn.toFixed(cn))}},{key:"multi",value:function(Xe){var jt=Number(Xe);if(this.isInvalidate()||Number.isNaN(jt))return new rt(NaN);var tn=this.number*jt;if(tn>Number.MAX_SAFE_INTEGER)return new rt(Number.MAX_SAFE_INTEGER);if(tn<Number.MIN_SAFE_INTEGER)return new rt(Number.MIN_SAFE_INTEGER);var cn=Math.max(dt(this.number),dt(jt));return new rt(tn.toFixed(cn))}},{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(Xe){return this.toNumber()===(Xe==null?void 0:Xe.toNumber())}},{key:"lessEquals",value:function(Xe){return this.add(Xe.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Xe?this.isInvalidate()?"":st(this.number):this.origin}}]),rt}();function mt(rt){return De()?new en(rt):new it(rt)}function Ze(rt,ze,Xe){var jt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(rt==="")return"";var tn=vt(rt),cn=tn.negativeStr,Dn=tn.integerStr,Tn=tn.decimalStr,_n="".concat(ze).concat(Tn),Fn="".concat(cn).concat(Dn);if(Xe>=0){var jn=Number(Tn[Xe]);if(jn>=5&&!jt){var An=mt(rt).add("".concat(cn,"0.").concat("0".repeat(Xe)).concat(10-jn));return Ze(An.toString(),ze,Xe,jt)}return Xe===0?Fn:"".concat(Fn).concat(ze).concat(Tn.padEnd(Xe,"0").slice(0,Xe))}return _n===".0"?Fn:"".concat(Fn).concat(_n)}var Ee=mt,He=ue(93681),Ue=ue(34280),Ct=ue(8654),Ge=ue(59301),It=ue(48736);function et(rt,ze){var Xe=(0,Ge.useRef)(null);function jt(){try{var cn=rt.selectionStart,Dn=rt.selectionEnd,Tn=rt.value,_n=Tn.substring(0,cn),Fn=Tn.substring(Dn);Xe.current={start:cn,end:Dn,value:Tn,beforeTxt:_n,afterTxt:Fn}}catch(jn){}}function tn(){if(rt&&Xe.current&&ze)try{var cn=rt.value,Dn=Xe.current,Tn=Dn.beforeTxt,_n=Dn.afterTxt,Fn=Dn.start,jn=cn.length;if(cn.endsWith(_n))jn=cn.length-Xe.current.afterTxt.length;else if(cn.startsWith(Tn))jn=Tn.length;else{var An=Tn[Fn-1],hr=cn.indexOf(An,Fn-1);hr!==-1&&(jn=hr+1)}rt.setSelectionRange(jn,jn)}catch(kr){(0,It.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(kr.message))}}return[jt,tn]}var kt=ue(49658),Je=function(){var ze=(0,Ge.useState)(!1),Xe=(0,Se.Z)(ze,2),jt=Xe[0],tn=Xe[1];return(0,Ue.Z)(function(){tn((0,kt.Z)())},[]),jt},Ut=Je,ft=ue(16089),Dt=200,Et=600;function ut(rt){var ze=rt.prefixCls,Xe=rt.upNode,jt=rt.downNode,tn=rt.upDisabled,cn=rt.downDisabled,Dn=rt.onStep,Tn=Ge.useRef(),_n=Ge.useRef([]),Fn=Ge.useRef();Fn.current=Dn;var jn=function(){clearTimeout(Tn.current)},An=function(Or,Fr){Or.preventDefault(),jn(),Fn.current(Fr);function _r(){Fn.current(Fr),Tn.current=setTimeout(_r,Dt)}Tn.current=setTimeout(_r,Et)};Ge.useEffect(function(){return function(){jn(),_n.current.forEach(function(rr){return ft.Z.cancel(rr)})}},[]);var hr=Ut();if(hr)return null;var kr="".concat(ze,"-handler"),Tr=tt()(kr,"".concat(kr,"-up"),(0,_e.Z)({},"".concat(kr,"-up-disabled"),tn)),Hr=tt()(kr,"".concat(kr,"-down"),(0,_e.Z)({},"".concat(kr,"-down-disabled"),cn)),sr=function(){return _n.current.push((0,ft.Z)(jn))},Mr={unselectable:"on",role:"button",onMouseUp:sr,onMouseLeave:sr};return Ge.createElement("div",{className:"".concat(kr,"-wrap")},Ge.createElement("span",(0,xe.Z)({},Mr,{onMouseDown:function(Or){An(Or,!0)},"aria-label":"Increase Value","aria-disabled":tn,className:Tr}),Xe||Ge.createElement("span",{unselectable:"on",className:"".concat(ze,"-handler-up-inner")})),Ge.createElement("span",(0,xe.Z)({},Mr,{onMouseDown:function(Or){An(Or,!1)},"aria-label":"Decrease Value","aria-disabled":cn,className:Hr}),jt||Ge.createElement("span",{unselectable:"on",className:"".concat(ze,"-handler-down-inner")})))}function Be(rt){var ze=typeof rt=="number"?st(rt):vt(rt).fullStr,Xe=ze.includes(".");return Xe?vt(ze.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:rt+"0"}var be=ue(5643),ht=function(){var rt=(0,Ge.useRef)(0),ze=function(){ft.Z.cancel(rt.current)};return(0,Ge.useEffect)(function(){return ze},[]),function(Xe){ze(),rt.current=(0,ft.Z)(function(){Xe()})}},nn=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Wt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Ve=function(ze,Xe){return ze||Xe.isEmpty()?Xe.toString():Xe.toNumber()},Ye=function(ze){var Xe=Ee(ze);return Xe.isInvalidate()?null:Xe},At=Ge.forwardRef(function(rt,ze){var Xe,jt=rt.prefixCls,tn=jt===void 0?"rc-input-number":jt,cn=rt.className,Dn=rt.style,Tn=rt.min,_n=rt.max,Fn=rt.step,jn=Fn===void 0?1:Fn,An=rt.defaultValue,hr=rt.value,kr=rt.disabled,Tr=rt.readOnly,Hr=rt.upHandler,sr=rt.downHandler,Mr=rt.keyboard,rr=rt.controls,Or=rr===void 0?!0:rr,Fr=rt.classNames,_r=rt.stringMode,jr=rt.parser,Nr=rt.formatter,Jn=rt.precision,lr=rt.decimalSeparator,Rn=rt.onChange,$n=rt.onInput,wr=rt.onPressEnter,lt=rt.onStep,ke=(0,Me.Z)(rt,nn),Oe="".concat(tn,"-input"),Te=Ge.useRef(null),Pe=Ge.useState(!1),Qe=(0,Se.Z)(Pe,2),pt=Qe[0],Yt=Qe[1],$t=Ge.useRef(!1),qt=Ge.useRef(!1),vn=Ge.useRef(!1),wn=Ge.useState(function(){return Ee(hr!=null?hr:An)}),Sn=(0,Se.Z)(wn,2),Bt=Sn[0],dn=Sn[1];function at(kn){hr===void 0&&dn(kn)}var Mt=Ge.useCallback(function(kn,En){if(!En)return Jn>=0?Jn:Math.max(dt(kn),dt(jn))},[Jn,jn]),Pt=Ge.useCallback(function(kn){var En=String(kn);if(jr)return jr(En);var gr=En;return lr&&(gr=gr.replace(lr,".")),gr.replace(/[^\w.-]+/g,"")},[jr,lr]),Rt=Ge.useRef(""),an=Ge.useCallback(function(kn,En){if(Nr)return Nr(kn,{userTyping:En,input:String(Rt.current)});var gr=typeof kn=="number"?st(kn):kn;if(!En){var nr=Mt(gr,En);if(wt(gr)&&(lr||nr>=0)){var Er=lr||".";gr=Ze(gr,Er,nr)}}return gr},[Nr,Mt,lr]),Tt=Ge.useState(function(){var kn=An!=null?An:hr;return Bt.isInvalidate()&&["string","number"].includes((0,Ae.Z)(kn))?Number.isNaN(kn)?"":kn:an(Bt.toString(),!1)}),rn=(0,Se.Z)(Tt,2),$e=rn[0],xt=rn[1];Rt.current=$e;function St(kn,En){xt(an(kn.isInvalidate()?kn.toString(!1):kn.toString(!En),En))}var zt=Ge.useMemo(function(){return Ye(_n)},[_n,Jn]),Ot=Ge.useMemo(function(){return Ye(Tn)},[Tn,Jn]),Ht=Ge.useMemo(function(){return!zt||!Bt||Bt.isInvalidate()?!1:zt.lessEquals(Bt)},[zt,Bt]),Zt=Ge.useMemo(function(){return!Ot||!Bt||Bt.isInvalidate()?!1:Bt.lessEquals(Ot)},[Ot,Bt]),mn=et(Te.current,pt),xn=(0,Se.Z)(mn,2),Ln=xn[0],zn=xn[1],er=function(En){return zt&&!En.lessEquals(zt)?zt:Ot&&!Ot.lessEquals(En)?Ot:null},cr=function(En){return!er(En)},Un=function(En,gr){var nr=En,Er=cr(nr)||nr.isEmpty();if(!nr.isEmpty()&&!gr&&(nr=er(nr)||nr,Er=!0),!Tr&&!kr&&Er){var Lr=nr.toString(),Ir=Mt(Lr,gr);return Ir>=0&&(nr=Ee(Ze(Lr,".",Ir)),cr(nr)||(nr=Ee(Ze(Lr,".",Ir,!0)))),nr.equals(Bt)||(at(nr),Rn==null||Rn(nr.isEmpty()?null:Ve(_r,nr)),hr===void 0&&St(nr,gr)),nr}return Bt},In=ht(),fr=function kn(En){if(Ln(),Rt.current=En,xt(En),!qt.current){var gr=Pt(En),nr=Ee(gr);nr.isNaN()||Un(nr,!0)}$n==null||$n(En),In(function(){var Er=En;jr||(Er=En.replace(/。/g,".")),Er!==En&&kn(Er)})},tr=function(){qt.current=!0},yr=function(){qt.current=!1,fr(Te.current.value)},Gn=function(En){fr(En.target.value)},Xn=function(En){var gr;if(!(En&&Ht||!En&&Zt)){$t.current=!1;var nr=Ee(vn.current?Be(jn):jn);En||(nr=nr.negate());var Er=(Bt||Ee(0)).add(nr.toString()),Lr=Un(Er,!1);lt==null||lt(Ve(_r,Lr),{offset:vn.current?Be(jn):jn,type:En?"up":"down"}),(gr=Te.current)===null||gr===void 0||gr.focus()}},br=function(En){var gr=Ee(Pt($e)),nr=gr;gr.isNaN()?nr=Un(Bt,En):nr=Un(gr,En),hr!==void 0?St(Bt,!1):nr.isNaN()||St(nr,!1)},ur=function(){$t.current=!0},Br=function(En){var gr=En.key,nr=En.shiftKey;$t.current=!0,vn.current=nr,gr==="Enter"&&(qt.current||($t.current=!1),br(!1),wr==null||wr(En)),Mr!==!1&&!qt.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gr)&&(Xn(gr==="Up"||gr==="ArrowUp"),En.preventDefault())},Gr=function(){$t.current=!1,vn.current=!1},ar=function(){br(!1),Yt(!1),$t.current=!1};return(0,Ue.o)(function(){Bt.isInvalidate()||St(Bt,!1)},[Jn]),(0,Ue.o)(function(){var kn=Ee(hr);dn(kn);var En=Ee(Pt($e));(!kn.equals(En)||!$t.current||Nr)&&St(kn,$t.current)},[hr]),(0,Ue.o)(function(){Nr&&zn()},[$e]),Ge.createElement("div",{className:tt()(tn,Fr==null?void 0:Fr.input,cn,(Xe={},(0,_e.Z)(Xe,"".concat(tn,"-focused"),pt),(0,_e.Z)(Xe,"".concat(tn,"-disabled"),kr),(0,_e.Z)(Xe,"".concat(tn,"-readonly"),Tr),(0,_e.Z)(Xe,"".concat(tn,"-not-a-number"),Bt.isNaN()),(0,_e.Z)(Xe,"".concat(tn,"-out-of-range"),!Bt.isInvalidate()&&!cr(Bt)),Xe)),style:Dn,onFocus:function(){Yt(!0)},onBlur:ar,onKeyDown:Br,onKeyUp:Gr,onCompositionStart:tr,onCompositionEnd:yr,onBeforeInput:ur},Or&&Ge.createElement(ut,{prefixCls:tn,upNode:Hr,downNode:sr,upDisabled:Ht,downDisabled:Zt,onStep:Xn}),Ge.createElement("div",{className:"".concat(Oe,"-wrap")},Ge.createElement("input",(0,xe.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Tn,"aria-valuemax":_n,"aria-valuenow":Bt.isInvalidate()?null:Bt.toString(),step:jn},ke,{ref:(0,Ct.sQ)(Te,ze),className:Oe,value:$e,onChange:Gn,disabled:kr,readOnly:Tr}))))}),gn=Ge.forwardRef(function(rt,ze){var Xe=rt.disabled,jt=rt.style,tn=rt.prefixCls,cn=rt.value,Dn=rt.prefix,Tn=rt.suffix,_n=rt.addonBefore,Fn=rt.addonAfter,jn=rt.classes,An=rt.className,hr=rt.classNames,kr=(0,Me.Z)(rt,Wt),Tr=Ge.useRef(null),Hr=function(Mr){Tr.current&&(0,be.nH)(Tr.current,Mr)};return Ge.createElement(He.BaseInput,{inputElement:Ge.createElement(At,(0,xe.Z)({prefixCls:tn,disabled:Xe,classNames:hr,ref:(0,Ct.sQ)(Tr,ze)},kr)),className:An,triggerFocus:Hr,prefixCls:tn,value:cn,disabled:Xe,style:jt,prefix:Dn,suffix:Tn,addonAfter:Fn,addonBefore:_n,classes:jn,classNames:hr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});gn.displayName="InputNumber";var Jt=gn,un=Jt,Gt=ue(19080),Vt=ue(36355),Nt=ue(92736),ve=ue(1684),se=ue(19716),oe=ue(32441),de=ue(33234),fe=ue(9937),le=ue(17313),Ie=ue(74207),ot=ue(83116),Kt=ue(37613);const Ft=(rt,ze)=>{let{componentCls:Xe,borderRadiusSM:jt,borderRadiusLG:tn}=rt;const cn=ze==="lg"?tn:jt;return{[`&-${ze}`]:{[`${Xe}-handler-wrap`]:{borderStartEndRadius:cn,borderEndEndRadius:cn},[`${Xe}-handler-up`]:{borderStartEndRadius:cn},[`${Xe}-handler-down`]:{borderEndEndRadius:cn}}}},Xt=rt=>{const{componentCls:ze,lineWidth:Xe,lineType:jt,colorBorder:tn,borderRadius:cn,fontSizeLG:Dn,controlHeightLG:Tn,controlHeightSM:_n,colorError:Fn,paddingInlineSM:jn,colorTextDescription:An,motionDurationMid:hr,handleHoverColor:kr,paddingInline:Tr,paddingBlock:Hr,handleBg:sr,handleActiveBg:Mr,colorTextDisabled:rr,borderRadiusSM:Or,borderRadiusLG:Fr,controlWidth:_r,handleVisible:jr,handleBorderColor:Nr}=rt;return[{[ze]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(rt)),(0,fe.ik)(rt)),(0,fe.bi)(rt,ze)),{display:"inline-block",width:_r,margin:0,padding:0,border:`${Xe}px ${jt} ${tn}`,borderRadius:cn,"&-rtl":{direction:"rtl",[`${ze}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Dn,borderRadius:Fr,[`input${ze}-input`]:{height:Tn-2*Xe}},"&-sm":{padding:0,borderRadius:Or,[`input${ze}-input`]:{height:_n-2*Xe,padding:`0 ${jn}px`}},"&:hover":Object.assign({},(0,fe.pU)(rt)),"&-focused":Object.assign({},(0,fe.M1)(rt)),"&-out-of-range":{[`${ze}-input-wrap`]:{input:{color:Fn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,le.Wf)(rt)),(0,fe.s7)(rt)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${ze}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${ze}-group-addon`]:{borderRadius:Fr,fontSize:rt.fontSizeLG}},"&-sm":{[`${ze}-group-addon`]:{borderRadius:Or}},[`${ze}-wrapper-disabled > ${ze}-group-addon`]:Object.assign({},(0,fe.Xy)(rt))}}),[`&-disabled ${ze}-input`]:{cursor:"not-allowed"},[ze]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(rt)),{width:"100%",padding:`${Hr}px ${Tr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:cn,outline:0,transition:`all ${hr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,fe.nz)(rt.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[ze]:Object.assign(Object.assign(Object.assign({[`&:hover ${ze}-handler-wrap, &-focused ${ze}-handler-wrap`]:{opacity:1},[`${ze}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:rt.handleWidth,height:"100%",background:sr,borderStartStartRadius:0,borderStartEndRadius:cn,borderEndEndRadius:cn,borderEndStartRadius:0,opacity:jr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${hr} linear ${hr}`,[`${ze}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${ze}-handler-up-inner,
|
|
|
${ze}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:rt.handleFontSize}}},[`${ze}-handler`]:{height:"50%",overflow:"hidden",color:An,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Xe}px ${jt} ${Nr}`,transition:`all ${hr} linear`,"&:active":{background:Mr},"&:hover":{height:"60%",[`
|
|
|
${ze}-handler-up-inner,
|
|
|
${ze}-handler-down-inner
|
|
|
`]:{color:kr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,le.Ro)()),{color:An,transition:`all ${hr} linear`,userSelect:"none"})},[`${ze}-handler-up`]:{borderStartEndRadius:cn},[`${ze}-handler-down`]:{borderBlockStart:`${Xe}px ${jt} ${Nr}`,borderEndEndRadius:cn}},Ft(rt,"lg")),Ft(rt,"sm")),{"&-disabled, &-readonly":{[`${ze}-handler-wrap`]:{display:"none"},[`${ze}-input`]:{color:"inherit"}},[`
|
|
|
${ze}-handler-up-disabled,
|
|
|
${ze}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${ze}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${ze}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:rr}})},{[`${ze}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${ze}-handler-down`]:{borderBlockStartWidth:0}}}]},Qt=rt=>{const{componentCls:ze,paddingBlock:Xe,paddingInline:jt,inputAffixPadding:tn,controlWidth:cn,borderRadiusLG:Dn,borderRadiusSM:Tn}=rt;return{[`${ze}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,fe.ik)(rt)),(0,fe.bi)(rt,`${ze}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:cn,padding:0,paddingInlineStart:jt,"&-lg":{borderRadius:Dn},"&-sm":{borderRadius:Tn},[`&:not(${ze}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,fe.pU)(rt)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${ze}-disabled`]:{background:"transparent"},[`> div${ze}`]:{width:"100%",border:"none",outline:"none",[`&${ze}-focused`]:{boxShadow:"none !important"}},[`input${ze}-input`]:{padding:`${Xe}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${ze}-handler-wrap`]:{zIndex:2},[ze]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:tn},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:jt,marginInlineStart:tn}}})}};var on=(0,ot.Z)("InputNumber",rt=>{const ze=(0,Kt.TS)(rt,(0,fe.e5)(rt));return[Xt(ze),Qt(ze),(0,Ie.c)(ze)]},rt=>Object.assign(Object.assign({},(0,fe.TM)(rt)),{controlWidth:90,handleWidth:rt.controlHeightSM-rt.lineWidth*2,handleFontSize:rt.fontSize/2,handleVisible:"auto",handleActiveBg:rt.colorFillAlter,handleBg:rt.colorBgContainer,handleHoverColor:rt.colorPrimary,handleBorderColor:rt.colorBorder})),pn=function(rt,ze){var Xe={};for(var jt in rt)Object.prototype.hasOwnProperty.call(rt,jt)&&ze.indexOf(jt)<0&&(Xe[jt]=rt[jt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tn=0,jt=Object.getOwnPropertySymbols(rt);tn<jt.length;tn++)ze.indexOf(jt[tn])<0&&Object.prototype.propertyIsEnumerable.call(rt,jt[tn])&&(Xe[jt[tn]]=rt[jt[tn]]);return Xe};const Cn=Ge.forwardRef((rt,ze)=>{const{getPrefixCls:Xe,direction:jt}=Ge.useContext(Vt.E_),tn=Ge.useRef(null);Ge.useImperativeHandle(ze,()=>tn.current);const{className:cn,rootClassName:Dn,size:Tn,disabled:_n,prefixCls:Fn,addonBefore:jn,addonAfter:An,prefix:hr,bordered:kr=!0,readOnly:Tr,status:Hr,controls:sr}=rt,Mr=pn(rt,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),rr=Xe("input-number",Fn),[Or,Fr]=on(rr),{compactSize:_r,compactItemClassnames:jr}=(0,de.ri)(rr,jt);let Nr=Ge.createElement(je.Z,{className:`${rr}-handler-up-inner`}),Jn=Ge.createElement(pe.Z,{className:`${rr}-handler-down-inner`});const lr=typeof sr=="boolean"?sr:void 0;typeof sr=="object"&&(Nr=typeof sr.upIcon=="undefined"?Nr:Ge.createElement("span",{className:`${rr}-handler-up-inner`},sr.upIcon),Jn=typeof sr.downIcon=="undefined"?Jn:Ge.createElement("span",{className:`${rr}-handler-down-inner`},sr.downIcon));const{hasFeedback:Rn,status:$n,isFormItemInput:wr,feedbackIcon:lt}=Ge.useContext(oe.aM),ke=(0,Gt.F)($n,Hr),Oe=(0,se.Z)($t=>{var qt;return(qt=Tn!=null?Tn:_r)!==null&&qt!==void 0?qt:$t}),Te=Ge.useContext(ve.Z),Pe=_n!=null?_n:Te,Qe=tt()({[`${rr}-lg`]:Oe==="large",[`${rr}-sm`]:Oe==="small",[`${rr}-rtl`]:jt==="rtl",[`${rr}-borderless`]:!kr,[`${rr}-in-form-item`]:wr},(0,Gt.Z)(rr,ke),jr,Fr),pt=`${rr}-group`,Yt=Ge.createElement(un,Object.assign({ref:tn,disabled:Pe,className:tt()(cn,Dn),upHandler:Nr,downHandler:Jn,prefixCls:rr,readOnly:Tr,controls:lr,prefix:hr,suffix:Rn&<,addonAfter:An&&Ge.createElement(de.BR,null,Ge.createElement(oe.Ux,{override:!0,status:!0},An)),addonBefore:jn&&Ge.createElement(de.BR,null,Ge.createElement(oe.Ux,{override:!0,status:!0},jn)),classNames:{input:Qe},classes:{affixWrapper:tt()((0,Gt.Z)(`${rr}-affix-wrapper`,ke,Rn),{[`${rr}-affix-wrapper-sm`]:Oe==="small",[`${rr}-affix-wrapper-lg`]:Oe==="large",[`${rr}-affix-wrapper-rtl`]:jt==="rtl",[`${rr}-affix-wrapper-borderless`]:!kr},Fr),wrapper:tt()({[`${pt}-rtl`]:jt==="rtl",[`${rr}-wrapper-disabled`]:Pe},Fr),group:tt()({[`${rr}-group-wrapper-sm`]:Oe==="small",[`${rr}-group-wrapper-lg`]:Oe==="large",[`${rr}-group-wrapper-rtl`]:jt==="rtl"},(0,Gt.Z)(`${rr}-group-wrapper`,ke,Rn),Fr)}},Mr));return Or(Yt)}),bt=Cn,hn=rt=>Ge.createElement(Nt.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Ge.createElement(Cn,Object.assign({},rt)));bt._InternalPanelDoNotUseOrYouWillBeFired=hn;var On=bt},9432:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return en},n:function(){return st}});var pe=ue(19248),je=ue(92310),Fe=ue.n(je),tt=ue(93681),xe=ue(8654),_e=ue(59301),Ae=ue(19080),Se=ue(36355),Me=ue(1684),Ke=ue(19716),ct=ue(32441),De=ue(33234),We=ue(59412),vt=ue(9937);function nt(it){return!!(it.prefix||it.suffix||it.allowClear)}var dt=function(it,mt){var Ze={};for(var Ee in it)Object.prototype.hasOwnProperty.call(it,Ee)&&mt.indexOf(Ee)<0&&(Ze[Ee]=it[Ee]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,Ee=Object.getOwnPropertySymbols(it);He<Ee.length;He++)mt.indexOf(Ee[He])<0&&Object.prototype.propertyIsEnumerable.call(it,Ee[He])&&(Ze[Ee[He]]=it[Ee[He]]);return Ze};function st(it,mt){if(!it)return;it.focus(mt);const{cursor:Ze}=mt||{};if(Ze){const Ee=it.value.length;switch(Ze){case"start":it.setSelectionRange(0,0);break;case"end":it.setSelectionRange(Ee,Ee);break;default:it.setSelectionRange(0,Ee);break}}}var en=(0,_e.forwardRef)((it,mt)=>{var Ze;const{prefixCls:Ee,bordered:He=!0,status:Ue,size:Ct,disabled:Ge,onBlur:It,onFocus:et,suffix:kt,allowClear:Je,addonAfter:Ut,addonBefore:ft,className:Dt,style:Et,styles:ut,rootClassName:Be,onChange:be,classNames:ht}=it,nn=dt(it,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Wt,direction:Ve,input:Ye}=_e.useContext(Se.E_),At=Wt("input",Ee),gn=(0,_e.useRef)(null),[Jt,un]=(0,vt.ZP)(At),{compactSize:Gt,compactItemClassnames:Vt}=(0,De.ri)(At,Ve),Nt=(0,Ke.Z)(Cn=>{var bt;return(bt=Ct!=null?Ct:Gt)!==null&&bt!==void 0?bt:Cn}),ve=_e.useContext(Me.Z),se=Ge!=null?Ge:ve,{status:oe,hasFeedback:de,feedbackIcon:fe}=(0,_e.useContext)(ct.aM),le=(0,Ae.F)(oe,Ue),Ie=nt(it)||!!de,ot=(0,_e.useRef)(Ie);(0,_e.useEffect)(()=>{var Cn;Ie&&ot.current,ot.current=Ie},[Ie]);const Kt=(0,We.Z)(gn,!0),Ft=Cn=>{Kt(),It==null||It(Cn)},Xt=Cn=>{Kt(),et==null||et(Cn)},Qt=Cn=>{Kt(),be==null||be(Cn)},on=(de||kt)&&_e.createElement(_e.Fragment,null,kt,de&&fe);let pn;return typeof Je=="object"&&(Je!=null&&Je.clearIcon)?pn=Je:Je&&(pn={clearIcon:_e.createElement(pe.Z,null)}),Jt(_e.createElement(tt.default,Object.assign({ref:(0,xe.sQ)(mt,gn),prefixCls:At,autoComplete:Ye==null?void 0:Ye.autoComplete},nn,{disabled:se,onBlur:Ft,onFocus:Xt,style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),Et),styles:Object.assign(Object.assign({},Ye==null?void 0:Ye.styles),ut),suffix:on,allowClear:pn,className:Fe()(Dt,Be,Vt,Ye==null?void 0:Ye.className),onChange:Qt,addonAfter:Ut&&_e.createElement(De.BR,null,_e.createElement(ct.Ux,{override:!0,status:!0},Ut)),addonBefore:ft&&_e.createElement(De.BR,null,_e.createElement(ct.Ux,{override:!0,status:!0},ft)),classNames:Object.assign(Object.assign(Object.assign({},ht),Ye==null?void 0:Ye.classNames),{input:Fe()({[`${At}-sm`]:Nt==="small",[`${At}-lg`]:Nt==="large",[`${At}-rtl`]:Ve==="rtl",[`${At}-borderless`]:!He},!Ie&&(0,Ae.Z)(At,le),ht==null?void 0:ht.input,(Ze=Ye==null?void 0:Ye.classNames)===null||Ze===void 0?void 0:Ze.input,un)}),classes:{affixWrapper:Fe()({[`${At}-affix-wrapper-sm`]:Nt==="small",[`${At}-affix-wrapper-lg`]:Nt==="large",[`${At}-affix-wrapper-rtl`]:Ve==="rtl",[`${At}-affix-wrapper-borderless`]:!He},(0,Ae.Z)(`${At}-affix-wrapper`,le,de),un),wrapper:Fe()({[`${At}-group-rtl`]:Ve==="rtl"},un),group:Fe()({[`${At}-group-wrapper-sm`]:Nt==="small",[`${At}-group-wrapper-lg`]:Nt==="large",[`${At}-group-wrapper-rtl`]:Ve==="rtl",[`${At}-group-wrapper-disabled`]:se},(0,Ae.Z)(`${At}-group-wrapper`,le,de),un)}})))})},1643:function(Mn,sn,ue){"use strict";var pe=ue(19248),je=ue(92310),Fe=ue.n(je),tt=ue(9296),xe=ue(59301),_e=ue(19080),Ae=ue(36355),Se=ue(1684),Me=ue(19716),Ke=ue(32441),ct=ue(9432),De=ue(9937),We=function(nt,dt){var st={};for(var wt in nt)Object.prototype.hasOwnProperty.call(nt,wt)&&dt.indexOf(wt)<0&&(st[wt]=nt[wt]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,wt=Object.getOwnPropertySymbols(nt);en<wt.length;en++)dt.indexOf(wt[en])<0&&Object.prototype.propertyIsEnumerable.call(nt,wt[en])&&(st[wt[en]]=nt[wt[en]]);return st};const vt=(0,xe.forwardRef)((nt,dt)=>{const{prefixCls:st,bordered:wt=!0,size:en,disabled:it,status:mt,allowClear:Ze,showCount:Ee,classNames:He,rootClassName:Ue,className:Ct}=nt,Ge=We(nt,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:It,direction:et}=xe.useContext(Ae.E_),kt=(0,Me.Z)(en),Je=xe.useContext(Se.Z),Ut=it!=null?it:Je,{status:ft,hasFeedback:Dt,feedbackIcon:Et}=xe.useContext(Ke.aM),ut=(0,_e.F)(ft,mt),Be=xe.useRef(null);xe.useImperativeHandle(dt,()=>{var Ve;return{resizableTextArea:(Ve=Be.current)===null||Ve===void 0?void 0:Ve.resizableTextArea,focus:Ye=>{var At,gn;(0,ct.n)((gn=(At=Be.current)===null||At===void 0?void 0:At.resizableTextArea)===null||gn===void 0?void 0:gn.textArea,Ye)},blur:()=>{var Ye;return(Ye=Be.current)===null||Ye===void 0?void 0:Ye.blur()}}});const be=It("input",st);let ht;typeof Ze=="object"&&(Ze!=null&&Ze.clearIcon)?ht=Ze:Ze&&(ht={clearIcon:xe.createElement(pe.Z,null)});const[nn,Wt]=(0,De.ZP)(be);return nn(xe.createElement(tt.default,Object.assign({},Ge,{disabled:Ut,allowClear:ht,className:Fe()(Ct,Ue),classes:{affixWrapper:Fe()(`${be}-textarea-affix-wrapper`,{[`${be}-affix-wrapper-rtl`]:et==="rtl",[`${be}-affix-wrapper-borderless`]:!wt,[`${be}-affix-wrapper-sm`]:kt==="small",[`${be}-affix-wrapper-lg`]:kt==="large",[`${be}-textarea-show-count`]:Ee},(0,_e.Z)(`${be}-affix-wrapper`,ut),Wt)},classNames:Object.assign(Object.assign({},He),{textarea:Fe()({[`${be}-borderless`]:!wt,[`${be}-sm`]:kt==="small",[`${be}-lg`]:kt==="large"},(0,_e.Z)(be,ut),Wt,He==null?void 0:He.textarea)}),prefixCls:be,suffix:Dt&&xe.createElement("span",{className:`${be}-textarea-suffix`},Et),showCount:Ee,ref:Be})))});sn.Z=vt},59412:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return je}});var pe=ue(59301);function je(Fe,tt){const xe=(0,pe.useRef)([]),_e=()=>{xe.current.push(setTimeout(()=>{var Ae,Se,Me,Ke;!((Ae=Fe.current)===null||Ae===void 0)&&Ae.input&&((Se=Fe.current)===null||Se===void 0?void 0:Se.input.getAttribute("type"))==="password"&&(!((Me=Fe.current)===null||Me===void 0)&&Me.input.hasAttribute("value"))&&((Ke=Fe.current)===null||Ke===void 0||Ke.input.removeAttribute("value"))}))};return(0,pe.useEffect)(()=>(tt&&_e(),()=>xe.current.forEach(Ae=>{Ae&&clearTimeout(Ae)})),[]),_e}},92832:function(Mn,sn,ue){"use strict";ue.d(sn,{default:function(){return kt}});var pe=ue(92310),je=ue.n(pe),Fe=ue(59301),tt=ue(36355),xe=ue(32441),_e=ue(9937),Se=Je=>{const{getPrefixCls:Ut,direction:ft}=(0,Fe.useContext)(tt.E_),{prefixCls:Dt,className:Et}=Je,ut=Ut("input-group",Dt),Be=Ut("input"),[be,ht]=(0,_e.ZP)(Be),nn=je()(ut,{[`${ut}-lg`]:Je.size==="large",[`${ut}-sm`]:Je.size==="small",[`${ut}-compact`]:Je.compact,[`${ut}-rtl`]:ft==="rtl"},ht,Et),Wt=(0,Fe.useContext)(xe.aM),Ve=(0,Fe.useMemo)(()=>Object.assign(Object.assign({},Wt),{isFormItemInput:!1}),[Wt]);return be(Fe.createElement("span",{className:nn,style:Je.style,onMouseEnter:Je.onMouseEnter,onMouseLeave:Je.onMouseLeave,onFocus:Je.onFocus,onBlur:Je.onBlur},Fe.createElement(xe.aM.Provider,{value:Ve},Je.children)))},Me=ue(9432),Ke=ue(73331),ct=ue(15277),De=ue(2738),We=ue(8654),vt=ue(59412),nt=function(Je,Ut){var ft={};for(var Dt in Je)Object.prototype.hasOwnProperty.call(Je,Dt)&&Ut.indexOf(Dt)<0&&(ft[Dt]=Je[Dt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Dt=Object.getOwnPropertySymbols(Je);Et<Dt.length;Et++)Ut.indexOf(Dt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,Dt[Et])&&(ft[Dt[Et]]=Je[Dt[Et]]);return ft};const dt=Je=>Je?Fe.createElement(ct.Z,null):Fe.createElement(Ke.Z,null),st={click:"onClick",hover:"onMouseOver"};var en=Fe.forwardRef((Je,Ut)=>{const{visibilityToggle:ft=!0}=Je,Dt=typeof ft=="object"&&ft.visible!==void 0,[Et,ut]=(0,Fe.useState)(()=>Dt?ft.visible:!1),Be=(0,Fe.useRef)(null);Fe.useEffect(()=>{Dt&&ut(ft.visible)},[Dt,ft]);const be=(0,vt.Z)(Be),ht=()=>{const{disabled:se}=Je;se||(Et&&be(),ut(oe=>{var de;const fe=!oe;return typeof ft=="object"&&((de=ft.onVisibleChange)===null||de===void 0||de.call(ft,fe)),fe}))},nn=se=>{const{action:oe="click",iconRender:de=dt}=Je,fe=st[oe]||"",le=de(Et),Ie={[fe]:ht,className:`${se}-icon`,key:"passwordIcon",onMouseDown:ot=>{ot.preventDefault()},onMouseUp:ot=>{ot.preventDefault()}};return Fe.cloneElement(Fe.isValidElement(le)?le:Fe.createElement("span",null,le),Ie)},{className:Wt,prefixCls:Ve,inputPrefixCls:Ye,size:At}=Je,gn=nt(Je,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Jt}=Fe.useContext(tt.E_),un=Jt("input",Ye),Gt=Jt("input-password",Ve),Vt=ft&&nn(Gt),Nt=je()(Gt,Wt,{[`${Gt}-${At}`]:!!At}),ve=Object.assign(Object.assign({},(0,De.Z)(gn,["suffix","iconRender","visibilityToggle"])),{type:Et?"text":"password",className:Nt,prefixCls:un,suffix:Vt});return At&&(ve.size=At),Fe.createElement(Me.Z,Object.assign({ref:(0,We.sQ)(Ut,Be)},ve))}),it=ue(47472),mt=ue(92343),Ze=ue(3113),Ee=ue(19716),He=ue(33234),Ue=function(Je,Ut){var ft={};for(var Dt in Je)Object.prototype.hasOwnProperty.call(Je,Dt)&&Ut.indexOf(Dt)<0&&(ft[Dt]=Je[Dt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Dt=Object.getOwnPropertySymbols(Je);Et<Dt.length;Et++)Ut.indexOf(Dt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,Dt[Et])&&(ft[Dt[Et]]=Je[Dt[Et]]);return ft},Ge=Fe.forwardRef((Je,Ut)=>{const{prefixCls:ft,inputPrefixCls:Dt,className:Et,size:ut,suffix:Be,enterButton:be=!1,addonAfter:ht,loading:nn,disabled:Wt,onSearch:Ve,onChange:Ye,onCompositionStart:At,onCompositionEnd:gn}=Je,Jt=Ue(Je,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:un,direction:Gt}=Fe.useContext(tt.E_),Vt=Fe.useRef(!1),Nt=un("input-search",ft),ve=un("input",Dt),{compactSize:se}=(0,He.ri)(Nt,Gt),oe=(0,Ee.Z)(hn=>{var On;return(On=ut!=null?ut:se)!==null&&On!==void 0?On:hn}),de=Fe.useRef(null),fe=hn=>{hn&&hn.target&&hn.type==="click"&&Ve&&Ve(hn.target.value,hn,{source:"clear"}),Ye&&Ye(hn)},le=hn=>{var On;document.activeElement===((On=de.current)===null||On===void 0?void 0:On.input)&&hn.preventDefault()},Ie=hn=>{var On,rt;Ve&&Ve((rt=(On=de.current)===null||On===void 0?void 0:On.input)===null||rt===void 0?void 0:rt.value,hn,{source:"input"})},ot=hn=>{Vt.current||nn||Ie(hn)},Kt=typeof be=="boolean"?Fe.createElement(it.Z,null):null,Ft=`${Nt}-button`;let Xt;const Qt=be||{},on=Qt.type&&Qt.type.__ANT_BUTTON===!0;on||Qt.type==="button"?Xt=(0,mt.Tm)(Qt,Object.assign({onMouseDown:le,onClick:hn=>{var On,rt;(rt=(On=Qt==null?void 0:Qt.props)===null||On===void 0?void 0:On.onClick)===null||rt===void 0||rt.call(On,hn),Ie(hn)},key:"enterButton"},on?{className:Ft,size:oe}:{})):Xt=Fe.createElement(Ze.ZP,{className:Ft,type:be?"primary":void 0,size:oe,disabled:Wt,key:"enterButton",onMouseDown:le,onClick:Ie,loading:nn,icon:Kt},be),ht&&(Xt=[Xt,(0,mt.Tm)(ht,{key:"addonAfter"})]);const pn=je()(Nt,{[`${Nt}-rtl`]:Gt==="rtl",[`${Nt}-${oe}`]:!!oe,[`${Nt}-with-button`]:!!be},Et),Cn=hn=>{Vt.current=!0,At==null||At(hn)},bt=hn=>{Vt.current=!1,gn==null||gn(hn)};return Fe.createElement(Me.Z,Object.assign({ref:(0,We.sQ)(de,Ut),onPressEnter:ot},Jt,{size:oe,onCompositionStart:Cn,onCompositionEnd:bt,prefixCls:ve,addonAfter:Xt,suffix:Be,onChange:fe,className:pn,disabled:Wt}))}),It=ue(1643);const et=Me.Z;et.Group=Se,et.Search=Ge,et.TextArea=It.Z,et.Password=en;var kt=et},9937:function(Mn,sn,ue){"use strict";ue.d(sn,{M1:function(){return Ae},TM:function(){return mt},Xy:function(){return Se},bi:function(){return ct},e5:function(){return it},ik:function(){return De},nz:function(){return xe},pU:function(){return _e},s7:function(){return We},x0:function(){return Ke}});var pe=ue(17313),je=ue(74207),Fe=ue(37613),tt=ue(83116);const xe=Ze=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Ze,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),_e=Ze=>({borderColor:Ze.hoverBorderColor}),Ae=Ze=>({borderColor:Ze.activeBorderColor,boxShadow:Ze.activeShadow,outline:0}),Se=Ze=>({color:Ze.colorTextDisabled,backgroundColor:Ze.colorBgContainerDisabled,borderColor:Ze.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},_e((0,Fe.TS)(Ze,{hoverBorderColor:Ze.colorBorder})))}),Me=Ze=>{const{paddingBlockLG:Ee,fontSizeLG:He,lineHeightLG:Ue,borderRadiusLG:Ct,paddingInlineLG:Ge}=Ze;return{padding:`${Ee}px ${Ge}px`,fontSize:He,lineHeight:Ue,borderRadius:Ct}},Ke=Ze=>({padding:`${Ze.paddingBlockSM}px ${Ze.paddingInlineSM}px`,borderRadius:Ze.borderRadiusSM}),ct=(Ze,Ee)=>{const{componentCls:He,colorError:Ue,colorWarning:Ct,errorActiveShadow:Ge,warningActiveShadow:It,colorErrorBorderHover:et,colorWarningBorderHover:kt}=Ze;return{[`&-status-error:not(${Ee}-disabled):not(${Ee}-borderless)${Ee}`]:{borderColor:Ue,"&:hover":{borderColor:et},"&:focus, &-focused":Object.assign({},Ae((0,Fe.TS)(Ze,{activeBorderColor:Ue,activeShadow:Ge}))),[`${He}-prefix, ${He}-suffix`]:{color:Ue}},[`&-status-warning:not(${Ee}-disabled):not(${Ee}-borderless)${Ee}`]:{borderColor:Ct,"&:hover":{borderColor:kt},"&:focus, &-focused":Object.assign({},Ae((0,Fe.TS)(Ze,{activeBorderColor:Ct,activeShadow:It}))),[`${He}-prefix, ${He}-suffix`]:{color:Ct}}}},De=Ze=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Ze.paddingBlock}px ${Ze.paddingInline}px`,color:Ze.colorText,fontSize:Ze.fontSize,lineHeight:Ze.lineHeight,backgroundColor:Ze.colorBgContainer,backgroundImage:"none",borderWidth:Ze.lineWidth,borderStyle:Ze.lineType,borderColor:Ze.colorBorder,borderRadius:Ze.borderRadius,transition:`all ${Ze.motionDurationMid}`},xe(Ze.colorTextPlaceholder)),{"&:hover":Object.assign({},_e(Ze)),"&:focus, &-focused":Object.assign({},Ae(Ze)),"&-disabled, &[disabled]":Object.assign({},Se(Ze)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Ze.controlHeight,lineHeight:Ze.lineHeight,verticalAlign:"bottom",transition:`all ${Ze.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},Me(Ze)),"&-sm":Object.assign({},Ke(Ze)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),We=Ze=>{const{componentCls:Ee,antCls:He}=Ze;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Ze.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Ee}, &-lg > ${Ee}-group-addon`]:Object.assign({},Me(Ze)),[`&-sm ${Ee}, &-sm > ${Ee}-group-addon`]:Object.assign({},Ke(Ze)),[`&-lg ${He}-select-single ${He}-select-selector`]:{height:Ze.controlHeightLG},[`&-sm ${He}-select-single ${He}-select-selector`]:{height:Ze.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 ${Ze.paddingInline}px`,color:Ze.colorText,fontWeight:"normal",fontSize:Ze.fontSize,textAlign:"center",backgroundColor:Ze.colorFillAlter,border:`${Ze.lineWidth}px ${Ze.lineType} ${Ze.colorBorder}`,borderRadius:Ze.borderRadius,transition:`all ${Ze.motionDurationSlow}`,lineHeight:1,[`${He}-select`]:{margin:`-${Ze.paddingBlock+1}px -${Ze.paddingInline}px`,[`&${He}-select-single:not(${He}-select-customize-input)`]:{[`${He}-select-selector`]:{backgroundColor:"inherit",border:`${Ze.lineWidth}px ${Ze.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${He}-select-selector`]:{color:Ze.colorPrimary}}},[`${He}-cascader-picker`]:{margin:`-9px -${Ze.paddingInline}px`,backgroundColor:"transparent",[`${He}-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,[`${He}-select ${He}-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,[`${He}-select ${He}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Ee}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ee}-search &`]:{borderStartStartRadius:Ze.borderRadius,borderEndStartRadius:Ze.borderRadius}},[`&:not(:first-child), ${Ee}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Ee}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,pe.dF)()),{[`${Ee}-group-addon, ${Ee}-group-wrap, > ${Ee}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Ze.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${Ee}-affix-wrapper,
|
|
|
& > ${Ee}-number-affix-wrapper,
|
|
|
& > ${He}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Ze.lineWidth,borderInlineEndWidth:Ze.lineWidth},[`${Ee}`]:{float:"none"},[`& > ${He}-select > ${He}-select-selector,
|
|
|
& > ${He}-select-auto-complete ${Ee},
|
|
|
& > ${He}-cascader-picker ${Ee},
|
|
|
& > ${Ee}-group-wrapper ${Ee}`]:{borderInlineEndWidth:Ze.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${He}-select-focused`]:{zIndex:1},[`& > ${He}-select > ${He}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${He}-select:first-child > ${He}-select-selector,
|
|
|
& > ${He}-select-auto-complete:first-child ${Ee},
|
|
|
& > ${He}-cascader-picker:first-child ${Ee}`]:{borderStartStartRadius:Ze.borderRadius,borderEndStartRadius:Ze.borderRadius},[`& > *:last-child,
|
|
|
& > ${He}-select:last-child > ${He}-select-selector,
|
|
|
& > ${He}-cascader-picker:last-child ${Ee},
|
|
|
& > ${He}-cascader-picker-focused:last-child ${Ee}`]:{borderInlineEndWidth:Ze.lineWidth,borderStartEndRadius:Ze.borderRadius,borderEndEndRadius:Ze.borderRadius},[`& > ${He}-select-auto-complete ${Ee}`]:{verticalAlign:"top"},[`${Ee}-group-wrapper + ${Ee}-group-wrapper`]:{marginInlineStart:-Ze.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:Ze.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ze.borderRadius}}}})}},vt=Ze=>{const{componentCls:Ee,controlHeightSM:He,lineWidth:Ue}=Ze,Ge=(He-Ue*2-16)/2;return{[Ee]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,pe.Wf)(Ze)),De(Ze)),ct(Ze,Ee)),{'&[type="color"]':{height:Ze.controlHeight,[`&${Ee}-lg`]:{height:Ze.controlHeightLG},[`&${Ee}-sm`]:{height:He,paddingTop:Ge,paddingBottom:Ge}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},nt=Ze=>{const{componentCls:Ee}=Ze;return{[`${Ee}-clear-icon`]:{margin:0,color:Ze.colorTextQuaternary,fontSize:Ze.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Ze.motionDurationSlow}`,"&:hover":{color:Ze.colorTextTertiary},"&:active":{color:Ze.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Ze.inputAffixPadding}px`}}}},dt=Ze=>{const{componentCls:Ee,inputAffixPadding:He,colorTextDescription:Ue,motionDurationSlow:Ct,colorIcon:Ge,colorIconHover:It,iconCls:et}=Ze;return{[`${Ee}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},De(Ze)),{display:"inline-flex",[`&:not(${Ee}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},_e(Ze)),{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:Ze.paddingXS}},"&-show-count-suffix":{color:Ue},"&-show-count-has-suffix":{marginInlineEnd:Ze.paddingXXS},"&-prefix":{marginInlineEnd:He},"&-suffix":{marginInlineStart:He}}}),nt(Ze)),{[`${et}${Ee}-password-icon`]:{color:Ge,cursor:"pointer",transition:`all ${Ct}`,"&:hover":{color:It}}}),ct(Ze,`${Ee}-affix-wrapper`))}},st=Ze=>{const{componentCls:Ee,colorError:He,colorWarning:Ue,borderRadiusLG:Ct,borderRadiusSM:Ge}=Ze;return{[`${Ee}-group`]:Object.assign(Object.assign(Object.assign({},(0,pe.Wf)(Ze)),We(Ze)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Ee}-group-addon`]:{borderRadius:Ct,fontSize:Ze.fontSizeLG}},"&-sm":{[`${Ee}-group-addon`]:{borderRadius:Ge}},"&-status-error":{[`${Ee}-group-addon`]:{color:He,borderColor:He}},"&-status-warning":{[`${Ee}-group-addon`]:{color:Ue,borderColor:Ue}},"&-disabled":{[`${Ee}-group-addon`]:Object.assign({},Se(Ze))},[`&: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}}}})}},wt=Ze=>{const{componentCls:Ee,antCls:He}=Ze,Ue=`${Ee}-search`;return{[Ue]:{[`${Ee}`]:{"&:hover, &:focus":{borderColor:Ze.colorPrimaryHover,[`+ ${Ee}-group-addon ${Ue}-button:not(${He}-btn-primary)`]:{borderInlineStartColor:Ze.colorPrimaryHover}}},[`${Ee}-affix-wrapper`]:{borderRadius:0},[`${Ee}-lg`]:{lineHeight:Ze.lineHeightLG-2e-4},[`> ${Ee}-group`]:{[`> ${Ee}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ue}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Ze.borderRadius,borderEndEndRadius:Ze.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ue}-button:not(${He}-btn-primary)`]:{color:Ze.colorTextDescription,"&:hover":{color:Ze.colorPrimaryHover},"&:active":{color:Ze.colorPrimaryActive},[`&${He}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ue}-button`]:{height:Ze.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ue}-button`]:{height:Ze.controlHeightLG},[`&-small ${Ue}-button`]:{height:Ze.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Ee}-compact-item`]:{[`&:not(${Ee}-compact-last-item)`]:{[`${Ee}-group-addon`]:{[`${Ee}-search-button`]:{marginInlineEnd:-Ze.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}}}}},en=Ze=>{const{componentCls:Ee,paddingLG:He}=Ze,Ue=`${Ee}-textarea`;return{[Ue]:{position:"relative","&-show-count":{[`> ${Ee}`]:{height:"100%"},[`${Ee}-data-count`]:{position:"absolute",bottom:-Ze.fontSize*Ze.lineHeight,insetInlineEnd:0,color:Ze.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Ee}`]:{paddingInlineEnd:He}},[`&-affix-wrapper${Ue}-has-feedback`]:{[`${Ee}`]:{paddingInlineEnd:He}},[`&-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:Ze.paddingXS,insetBlockStart:Ze.paddingXS},[`${Ue}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ze.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function it(Ze){return(0,Fe.TS)(Ze,{inputAffixPadding:Ze.paddingXXS})}const mt=Ze=>{const{controlHeight:Ee,fontSize:He,lineHeight:Ue,lineWidth:Ct,controlHeightSM:Ge,controlHeightLG:It,fontSizeLG:et,lineHeightLG:kt,paddingSM:Je,controlPaddingHorizontalSM:Ut,controlPaddingHorizontal:ft,colorFillAlter:Dt,colorPrimaryHover:Et,controlOutlineWidth:ut,controlOutline:Be,colorErrorOutline:be,colorWarningOutline:ht}=Ze;return{paddingBlock:Math.max(Math.round((Ee-He*Ue)/2*10)/10-Ct,3),paddingBlockSM:Math.max(Math.round((Ge-He*Ue)/2*10)/10-Ct,0),paddingBlockLG:Math.ceil((It-et*kt)/2*10)/10-Ct,paddingInline:Je-Ct,paddingInlineSM:Ut-Ct,paddingInlineLG:ft-Ct,addonBg:Dt,activeBorderColor:Et,hoverBorderColor:Et,activeShadow:`0 0 0 ${ut}px ${Be}`,errorActiveShadow:`0 0 0 ${ut}px ${be}`,warningActiveShadow:`0 0 0 ${ut}px ${ht}`}};sn.ZP=(0,tt.Z)("Input",Ze=>{const Ee=(0,Fe.TS)(Ze,it(Ze));return[vt(Ee),en(Ee),dt(Ee),st(Ee),wt(Ee),(0,je.c)(Ee)]},mt)},45818:function(Mn,sn,ue){"use strict";ue.d(sn,{D:function(){return it},Z:function(){return Ee}});var pe=ue(54476),je=ue(59301),Fe={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"},tt=Fe,xe=ue(7657),_e=function(Ue,Ct){return je.createElement(xe.Z,(0,pe.Z)({},Ue,{ref:Ct,icon:tt}))},Ae=je.forwardRef(_e),Se=Ae,Me=ue(33853),Ke=ue(38819),ct=ue(92310),De=ue.n(ct),We=ue(2738),nt=He=>!isNaN(parseFloat(He))&&isFinite(He),dt=ue(36355),st=ue(84966),wt=function(He,Ue){var Ct={};for(var Ge in He)Object.prototype.hasOwnProperty.call(He,Ge)&&Ue.indexOf(Ge)<0&&(Ct[Ge]=He[Ge]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,Ge=Object.getOwnPropertySymbols(He);It<Ge.length;It++)Ue.indexOf(Ge[It])<0&&Object.prototype.propertyIsEnumerable.call(He,Ge[It])&&(Ct[Ge[It]]=He[Ge[It]]);return Ct};const en={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},it=je.createContext({}),mt=(()=>{let He=0;return function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return He+=1,`${Ue}${He}`}})();var Ee=je.forwardRef((He,Ue)=>{const{prefixCls:Ct,className:Ge,trigger:It,children:et,defaultCollapsed:kt=!1,theme:Je="dark",style:Ut={},collapsible:ft=!1,reverseArrow:Dt=!1,width:Et=200,collapsedWidth:ut=80,zeroWidthTriggerStyle:Be,breakpoint:be,onCollapse:ht,onBreakpoint:nn}=He,Wt=wt(He,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ve}=(0,je.useContext)(st.Gs),[Ye,At]=(0,je.useState)("collapsed"in He?He.collapsed:kt),[gn,Jt]=(0,je.useState)(!1);(0,je.useEffect)(()=>{"collapsed"in He&&At(He.collapsed)},[He.collapsed]);const un=(oe,de)=>{"collapsed"in He||At(oe),ht==null||ht(oe,de)},Gt=(0,je.useRef)();Gt.current=oe=>{Jt(oe.matches),nn==null||nn(oe.matches),Ye!==oe.matches&&un(oe.matches,"responsive")},(0,je.useEffect)(()=>{function oe(fe){return Gt.current(fe)}let de;if(typeof window!="undefined"){const{matchMedia:fe}=window;if(fe&&be&&be in en){de=fe(`(max-width: ${en[be]})`);try{de.addEventListener("change",oe)}catch(le){de.addListener(oe)}oe(de)}}return()=>{try{de==null||de.removeEventListener("change",oe)}catch(fe){de==null||de.removeListener(oe)}}},[be]),(0,je.useEffect)(()=>{const oe=mt("ant-sider-");return Ve.addSider(oe),()=>Ve.removeSider(oe)},[]);const Vt=()=>{un(!Ye,"clickTrigger")},{getPrefixCls:Nt}=(0,je.useContext)(dt.E_),ve=()=>{const oe=Nt("layout-sider",Ct),de=(0,We.Z)(Wt,["collapsed"]),fe=Ye?ut:Et,le=nt(fe)?`${fe}px`:String(fe),Ie=parseFloat(String(ut||0))===0?je.createElement("span",{onClick:Vt,className:De()(`${oe}-zero-width-trigger`,`${oe}-zero-width-trigger-${Dt?"right":"left"}`),style:Be},It||je.createElement(Se,null)):null,Ft={expanded:Dt?je.createElement(Ke.Z,null):je.createElement(Me.Z,null),collapsed:Dt?je.createElement(Me.Z,null):je.createElement(Ke.Z,null)}[Ye?"collapsed":"expanded"],Xt=It!==null?Ie||je.createElement("div",{className:`${oe}-trigger`,onClick:Vt,style:{width:le}},It||Ft):null,Qt=Object.assign(Object.assign({},Ut),{flex:`0 0 ${le}`,maxWidth:le,minWidth:le,width:le}),on=De()(oe,`${oe}-${Je}`,{[`${oe}-collapsed`]:!!Ye,[`${oe}-has-trigger`]:ft&&It!==null&&!Ie,[`${oe}-below`]:!!gn,[`${oe}-zero-width`]:parseFloat(le)===0},Ge);return je.createElement("aside",Object.assign({className:on},de,{style:Qt,ref:Ue}),je.createElement("div",{className:`${oe}-children`},et),ft||gn&&Ie?Xt:null)},se=je.useMemo(()=>({siderCollapsed:Ye}),[Ye]);return je.createElement(it.Provider,{value:se},ve())})},84966:function(Mn,sn,ue){"use strict";ue.d(sn,{VY:function(){return it},$_:function(){return en},h4:function(){return wt},Gs:function(){return We},ZP:function(){return mt}});var pe=ue(94480),je=ue(92310),Fe=ue.n(je),tt=ue(2738),xe=ue(59301),_e=ue(36355),Ae=ue(83116),Me=Ze=>{const{componentCls:Ee,bodyBg:He,lightSiderBg:Ue,lightTriggerBg:Ct,lightTriggerColor:Ge}=Ze;return{[`${Ee}-sider-light`]:{background:Ue,[`${Ee}-sider-trigger`]:{color:Ge,background:Ct},[`${Ee}-sider-zero-width-trigger`]:{color:Ge,background:Ct,border:`1px solid ${He}`,borderInlineStart:0}}}};const Ke=Ze=>{const{antCls:Ee,componentCls:He,colorText:Ue,triggerColor:Ct,footerBg:Ge,triggerBg:It,headerHeight:et,headerPadding:kt,headerColor:Je,footerPadding:Ut,triggerHeight:ft,zeroTriggerHeight:Dt,zeroTriggerWidth:Et,motionDurationMid:ut,motionDurationSlow:Be,fontSize:be,borderRadius:ht,bodyBg:nn,headerBg:Wt,siderBg:Ve}=Ze;return{[He]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:nn,"&, *":{boxSizing:"border-box"},[`&${He}-has-sider`]:{flexDirection:"row",[`> ${He}, > ${He}-content`]:{width:0}},[`${He}-header, &${He}-footer`]:{flex:"0 0 auto"},[`${He}-sider`]:{position:"relative",minWidth:0,background:Ve,transition:`all ${ut}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Ee}-menu${Ee}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:ft},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:ft,color:Ct,lineHeight:`${ft}px`,textAlign:"center",background:It,cursor:"pointer",transition:`all ${ut}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:et,insetInlineEnd:-Et,zIndex:1,width:Et,height:Dt,color:Ct,fontSize:Ze.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ve,borderStartStartRadius:0,borderStartEndRadius:ht,borderEndEndRadius:ht,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Be} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Be}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Et,borderStartStartRadius:ht,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ht}}}}},Me(Ze)),{"&-rtl":{direction:"rtl"}}),[`${He}-header`]:{height:et,padding:kt,color:Je,lineHeight:`${et}px`,background:Wt,[`${Ee}-menu`]:{lineHeight:"inherit"}},[`${He}-footer`]:{padding:Ut,color:Ue,fontSize:be,background:Ge},[`${He}-content`]:{flex:"auto",minHeight:0}}};var ct=(0,Ae.Z)("Layout",Ze=>[Ke(Ze)],Ze=>{const{colorBgLayout:Ee,controlHeight:He,controlHeightLG:Ue,colorText:Ct,controlHeightSM:Ge,marginXXS:It,colorTextLightSolid:et,colorBgContainer:kt}=Ze,Je=Ue*1.25;return{colorBgHeader:"#001529",colorBgBody:Ee,colorBgTrigger:"#002140",bodyBg:Ee,headerBg:"#001529",headerHeight:He*2,headerPadding:`0 ${Je}px`,headerColor:Ct,footerPadding:`${Ge}px ${Je}px`,footerBg:Ee,siderBg:"#001529",triggerHeight:Ue+It*2,triggerBg:"#002140",triggerColor:et,zeroTriggerWidth:Ue,zeroTriggerHeight:Ue,lightSiderBg:kt,lightTriggerBg:kt,lightTriggerColor:Ct}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),De=function(Ze,Ee){var He={};for(var Ue in Ze)Object.prototype.hasOwnProperty.call(Ze,Ue)&&Ee.indexOf(Ue)<0&&(He[Ue]=Ze[Ue]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,Ue=Object.getOwnPropertySymbols(Ze);Ct<Ue.length;Ct++)Ee.indexOf(Ue[Ct])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ue[Ct])&&(He[Ue[Ct]]=Ze[Ue[Ct]]);return He};const We=xe.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function vt(Ze){let{suffixCls:Ee,tagName:He,displayName:Ue}=Ze;return Ct=>xe.forwardRef((It,et)=>xe.createElement(Ct,Object.assign({ref:et,suffixCls:Ee,tagName:He},It)))}const nt=xe.forwardRef((Ze,Ee)=>{const{prefixCls:He,suffixCls:Ue,className:Ct,tagName:Ge}=Ze,It=De(Ze,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:et}=xe.useContext(_e.E_),kt=et("layout",He),[Je,Ut]=ct(kt),ft=Ue?`${kt}-${Ue}`:kt;return Je(xe.createElement(Ge,Object.assign({className:Fe()(He||ft,Ct,Ut),ref:Ee},It)))}),dt=xe.forwardRef((Ze,Ee)=>{const{direction:He}=xe.useContext(_e.E_),[Ue,Ct]=xe.useState([]),{prefixCls:Ge,className:It,rootClassName:et,children:kt,hasSider:Je,tagName:Ut,style:ft}=Ze,Dt=De(Ze,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Et=(0,tt.Z)(Dt,["suffixCls"]),{getPrefixCls:ut,layout:Be}=xe.useContext(_e.E_),be=ut("layout",Ge),[ht,nn]=ct(be),Wt=Fe()(be,{[`${be}-has-sider`]:typeof Je=="boolean"?Je:Ue.length>0,[`${be}-rtl`]:He==="rtl"},Be==null?void 0:Be.className,It,et,nn),Ve=xe.useMemo(()=>({siderHook:{addSider:Ye=>{Ct(At=>[].concat((0,pe.Z)(At),[Ye]))},removeSider:Ye=>{Ct(At=>At.filter(gn=>gn!==Ye))}}}),[]);return ht(xe.createElement(We.Provider,{value:Ve},xe.createElement(Ut,Object.assign({ref:Ee,className:Wt,style:Object.assign(Object.assign({},Be==null?void 0:Be.style),ft)},Et),kt)))}),st=vt({tagName:"div",displayName:"Layout"})(dt),wt=vt({suffixCls:"header",tagName:"header",displayName:"Header"})(nt),en=vt({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(nt),it=vt({suffixCls:"content",tagName:"main",displayName:"Content"})(nt);var mt=st},40875:function(Mn,sn,ue){"use strict";ue.d(sn,{J:function(){return _e}});var pe=ue(59301),je=ue(33234),Fe=ue(70425),tt=function(Ae,Se){var Me={};for(var Ke in Ae)Object.prototype.hasOwnProperty.call(Ae,Ke)&&Se.indexOf(Ke)<0&&(Me[Ke]=Ae[Ke]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ke=Object.getOwnPropertySymbols(Ae);ct<Ke.length;ct++)Se.indexOf(Ke[ct])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ke[ct])&&(Me[Ke[ct]]=Ae[Ke[ct]]);return Me};const xe=pe.createContext(null),_e=pe.forwardRef((Ae,Se)=>{const{children:Me}=Ae,Ke=tt(Ae,["children"]),ct=pe.useContext(xe),De=pe.useMemo(()=>Object.assign(Object.assign({},ct),Ke),[ct,Ke.prefixCls,Ke.mode,Ke.selectable]);return pe.createElement(xe.Provider,{value:De},pe.createElement(je.BR,null,(0,Fe.supportNodeRef)(Me)?pe.cloneElement(Me,{ref:Se}):Me))});sn.Z=xe},20834:function(Mn,sn,ue){"use strict";ue.d(sn,{default:function(){return se}});var pe=ue(15285),je=ue(59301),Fe=ue(45818),tt=ue(92310),xe=ue.n(tt),_e=ue(36355),Ae=function(oe,de){var fe={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&de.indexOf(le)<0&&(fe[le]=oe[le]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,le=Object.getOwnPropertySymbols(oe);Ie<le.length;Ie++)de.indexOf(le[Ie])<0&&Object.prototype.propertyIsEnumerable.call(oe,le[Ie])&&(fe[le[Ie]]=oe[le[Ie]]);return fe},Me=oe=>{const{prefixCls:de,className:fe,dashed:le}=oe,Ie=Ae(oe,["prefixCls","className","dashed"]),{getPrefixCls:ot}=je.useContext(_e.E_),Kt=ot("menu",de),Ft=xe()({[`${Kt}-item-divider-dashed`]:!!le},fe);return je.createElement(pe.iz,Object.assign({className:Ft},Ie))},Ke=ue(11592),ct=ue(2738),De=ue(6848),We=ue(92343),nt=(0,je.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),st=oe=>{var de;const{className:fe,children:le,icon:Ie,title:ot,danger:Kt}=oe,{prefixCls:Ft,firstLevel:Xt,direction:Qt,disableMenuItemTitleTooltip:on,inlineCollapsed:pn}=je.useContext(nt),Cn=Xe=>{const jt=je.createElement("span",{className:`${Ft}-title-content`},le);return(!Ie||(0,We.l$)(le)&&le.type==="span")&&le&&Xe&&Xt&&typeof le=="string"?je.createElement("div",{className:`${Ft}-inline-collapsed-noicon`},le.charAt(0)):jt},{siderCollapsed:bt}=je.useContext(Fe.D);let hn=ot;typeof ot=="undefined"?hn=Xt?le:"":ot===!1&&(hn="");const On={title:hn};!bt&&!pn&&(On.title=null,On.open=!1);const rt=(0,Ke.Z)(le).length;let ze=je.createElement(pe.ck,Object.assign({},(0,ct.Z)(oe,["title","icon","danger"]),{className:xe()({[`${Ft}-item-danger`]:Kt,[`${Ft}-item-only-child`]:(Ie?rt+1:rt)===1},fe),title:typeof ot=="string"?ot:void 0}),(0,We.Tm)(Ie,{className:xe()((0,We.l$)(Ie)?(de=Ie.props)===null||de===void 0?void 0:de.className:"",`${Ft}-item-icon`)}),Cn(pn));return on||(ze=je.createElement(De.Z,Object.assign({},On,{placement:Qt==="rtl"?"left":"right",overlayClassName:`${Ft}-inline-collapsed-tooltip`}),ze)),ze},en=oe=>{var de;const{popupClassName:fe,icon:le,title:Ie,theme:ot}=oe,Kt=je.useContext(nt),{prefixCls:Ft,inlineCollapsed:Xt,theme:Qt}=Kt,on=(0,pe.Xl)();let pn;if(!le)pn=Xt&&!on.length&&Ie&&typeof Ie=="string"?je.createElement("div",{className:`${Ft}-inline-collapsed-noicon`},Ie.charAt(0)):je.createElement("span",{className:`${Ft}-title-content`},Ie);else{const bt=(0,We.l$)(Ie)&&Ie.type==="span";pn=je.createElement(je.Fragment,null,(0,We.Tm)(le,{className:xe()((0,We.l$)(le)?(de=le.props)===null||de===void 0?void 0:de.className:"",`${Ft}-item-icon`)}),bt?Ie:je.createElement("span",{className:`${Ft}-title-content`},Ie))}const Cn=je.useMemo(()=>Object.assign(Object.assign({},Kt),{firstLevel:!1}),[Kt]);return je.createElement(nt.Provider,{value:Cn},je.createElement(pe.Wd,Object.assign({},(0,ct.Z)(oe,["icon"]),{title:pn,popupClassName:xe()(Ft,fe,`${Ft}-${ot||Qt}`)})))},it=ue(18785),mt=ue(70425),Ze=ue(62892),Ee=ue(40875),He=function(oe,de){var fe={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&de.indexOf(le)<0&&(fe[le]=oe[le]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,le=Object.getOwnPropertySymbols(oe);Ie<le.length;Ie++)de.indexOf(le[Ie])<0&&Object.prototype.propertyIsEnumerable.call(oe,le[Ie])&&(fe[le[Ie]]=oe[le[Ie]]);return fe};function Ue(oe){return(oe||[]).map((de,fe)=>{if(de&&typeof de=="object"){const le=de,{label:Ie,children:ot,key:Kt,type:Ft}=le,Xt=He(le,["label","children","key","type"]),Qt=Kt!=null?Kt:`tmp-${fe}`;return ot||Ft==="group"?Ft==="group"?je.createElement(pe.BW,Object.assign({key:Qt},Xt,{title:Ie}),Ue(ot)):je.createElement(en,Object.assign({key:Qt},Xt,{title:Ie}),Ue(ot)):Ft==="divider"?je.createElement(Me,Object.assign({key:Qt},Xt)):je.createElement(st,Object.assign({key:Qt},Xt),Ie)}return null}).filter(de=>de)}function Ct(oe){return je.useMemo(()=>oe&&Ue(oe),[oe])}var Ge=ue(64993),It=ue(17313),et=ue(8378),kt=ue(13826),Je=ue(29878),Ut=ue(83116),ft=ue(37613),Et=oe=>{const{componentCls:de,motionDurationSlow:fe,horizontalLineHeight:le,colorSplit:Ie,lineWidth:ot,lineType:Kt,itemPaddingInline:Ft}=oe;return{[`${de}-horizontal`]:{lineHeight:le,border:0,borderBottom:`${ot}px ${Kt} ${Ie}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${de}-item, ${de}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ft},[`> ${de}-item:hover,
|
|
|
> ${de}-item-active,
|
|
|
> ${de}-submenu ${de}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${de}-item, ${de}-submenu-title`]:{transition:[`border-color ${fe}`,`background ${fe}`].join(",")},[`${de}-submenu-arrow`]:{display:"none"}}}},Be=oe=>{let{componentCls:de,menuArrowOffset:fe}=oe;return{[`${de}-rtl`]:{direction:"rtl"},[`${de}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${de}-rtl${de}-vertical,
|
|
|
${de}-submenu-rtl ${de}-vertical`]:{[`${de}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${fe})`},"&::after":{transform:`rotate(45deg) translateY(${fe})`}}}}};const be=oe=>Object.assign({},(0,It.oN)(oe));var nn=(oe,de)=>{const{componentCls:fe,itemColor:le,itemSelectedColor:Ie,groupTitleColor:ot,itemBg:Kt,subMenuItemBg:Ft,itemSelectedBg:Xt,activeBarHeight:Qt,activeBarWidth:on,activeBarBorderWidth:pn,motionDurationSlow:Cn,motionEaseInOut:bt,motionEaseOut:hn,itemPaddingInline:On,motionDurationMid:rt,itemHoverColor:ze,lineType:Xe,colorSplit:jt,itemDisabledColor:tn,dangerItemColor:cn,dangerItemHoverColor:Dn,dangerItemSelectedColor:Tn,dangerItemActiveBg:_n,dangerItemSelectedBg:Fn,itemHoverBg:jn,itemActiveBg:An,menuSubMenuBg:hr,horizontalItemSelectedColor:kr,horizontalItemSelectedBg:Tr,horizontalItemBorderRadius:Hr,horizontalItemHoverBg:sr,popupBg:Mr}=oe;return{[`${fe}-${de}, ${fe}-${de} > ${fe}`]:{color:le,background:Kt,[`&${fe}-root:focus-visible`]:Object.assign({},be(oe)),[`${fe}-item-group-title`]:{color:ot},[`${fe}-submenu-selected`]:{[`> ${fe}-submenu-title`]:{color:Ie}},[`${fe}-item-disabled, ${fe}-submenu-disabled`]:{color:`${tn} !important`},[`${fe}-item:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{[`&:hover, > ${fe}-submenu-title:hover`]:{color:ze}},[`&:not(${fe}-horizontal)`]:{[`${fe}-item:not(${fe}-item-selected)`]:{"&:hover":{backgroundColor:jn},"&:active":{backgroundColor:An}},[`${fe}-submenu-title`]:{"&:hover":{backgroundColor:jn},"&:active":{backgroundColor:An}}},[`${fe}-item-danger`]:{color:cn,[`&${fe}-item:hover`]:{[`&:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{color:Dn}},[`&${fe}-item:active`]:{background:_n}},[`${fe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${fe}-item-selected`]:{color:Ie,[`&${fe}-item-danger`]:{color:Tn},"a, a:hover":{color:"inherit"}},[`& ${fe}-item-selected`]:{backgroundColor:Xt,[`&${fe}-item-danger`]:{backgroundColor:Fn}},[`${fe}-item, ${fe}-submenu-title`]:{[`&:not(${fe}-item-disabled):focus-visible`]:Object.assign({},be(oe))},[`&${fe}-submenu > ${fe}`]:{backgroundColor:hr},[`&${fe}-popup > ${fe}`]:{backgroundColor:Mr},[`&${fe}-horizontal`]:Object.assign(Object.assign({},de==="dark"?{borderBottom:0}:{}),{[`> ${fe}-item, > ${fe}-submenu`]:{top:pn,marginTop:-pn,marginBottom:0,borderRadius:Hr,"&::after":{position:"absolute",insetInline:On,bottom:0,borderBottom:`${Qt}px solid transparent`,transition:`border-color ${Cn} ${bt}`,content:'""'},"&:hover, &-active, &-open":{background:sr,"&::after":{borderBottomWidth:Qt,borderBottomColor:kr}},"&-selected":{color:kr,backgroundColor:Tr,"&:hover":{backgroundColor:Tr},"&::after":{borderBottomWidth:Qt,borderBottomColor:kr}}}}),[`&${fe}-root`]:{[`&${fe}-inline, &${fe}-vertical`]:{borderInlineEnd:`${pn}px ${Xe} ${jt}`}},[`&${fe}-inline`]:{[`${fe}-sub${fe}-inline`]:{background:Ft},[`${fe}-item, ${fe}-submenu-title`]:pn&&on?{width:`calc(100% + ${pn}px)`}:{},[`${fe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${on}px solid ${Ie}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${rt} ${hn}`,`opacity ${rt} ${hn}`].join(","),content:'""'},[`&${fe}-item-danger`]:{"&::after":{borderInlineEndColor:Tn}}},[`${fe}-selected, ${fe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${rt} ${bt}`,`opacity ${rt} ${bt}`].join(",")}}}}}};const Wt=oe=>{const{componentCls:de,itemHeight:fe,itemMarginInline:le,padding:Ie,menuArrowSize:ot,marginXS:Kt,itemMarginBlock:Ft}=oe,Xt=Ie+ot+Kt;return{[`${de}-item`]:{position:"relative",overflow:"hidden"},[`${de}-item, ${de}-submenu-title`]:{height:fe,lineHeight:`${fe}px`,paddingInline:Ie,overflow:"hidden",textOverflow:"ellipsis",marginInline:le,marginBlock:Ft,width:`calc(100% - ${le*2}px)`},[`> ${de}-item,
|
|
|
> ${de}-submenu > ${de}-submenu-title`]:{height:fe,lineHeight:`${fe}px`},[`${de}-item-group-list ${de}-submenu-title,
|
|
|
${de}-submenu-title`]:{paddingInlineEnd:Xt}}};var Ye=oe=>{const{componentCls:de,iconCls:fe,itemHeight:le,colorTextLightSolid:Ie,dropdownWidth:ot,controlHeightLG:Kt,motionDurationMid:Ft,motionEaseOut:Xt,paddingXL:Qt,itemMarginInline:on,fontSizeLG:pn,motionDurationSlow:Cn,paddingXS:bt,boxShadowSecondary:hn,collapsedWidth:On,collapsedIconSize:rt}=oe,ze={height:le,lineHeight:`${le}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[de]:{"&-inline, &-vertical":Object.assign({[`&${de}-root`]:{boxShadow:"none"}},Wt(oe))},[`${de}-submenu-popup`]:{[`${de}-vertical`]:Object.assign(Object.assign({},Wt(oe)),{boxShadow:hn})}},{[`${de}-submenu-popup ${de}-vertical${de}-sub`]:{minWidth:ot,maxHeight:`calc(100vh - ${Kt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${de}-inline`]:{width:"100%",[`&${de}-root`]:{[`${de}-item, ${de}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Cn}`,`background ${Cn}`,`padding ${Ft} ${Xt}`].join(","),[`> ${de}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${de}-sub${de}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${de}-submenu > ${de}-submenu-title`]:ze,[`& ${de}-item-group-title`]:{paddingInlineStart:Qt}},[`${de}-item`]:ze}},{[`${de}-inline-collapsed`]:{width:On,[`&${de}-root`]:{[`${de}-item, ${de}-submenu ${de}-submenu-title`]:{[`> ${de}-inline-collapsed-noicon`]:{fontSize:pn,textAlign:"center"}}},[`> ${de}-item,
|
|
|
> ${de}-item-group > ${de}-item-group-list > ${de}-item,
|
|
|
> ${de}-item-group > ${de}-item-group-list > ${de}-submenu > ${de}-submenu-title,
|
|
|
> ${de}-submenu > ${de}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${pn/2}px - ${on}px)`,textOverflow:"clip",[`
|
|
|
${de}-submenu-arrow,
|
|
|
${de}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${de}-item-icon, ${fe}`]:{margin:0,fontSize:rt,lineHeight:`${le}px`,"+ span":{display:"inline-block",opacity:0}}},[`${de}-item-icon, ${fe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${de}-item-icon, ${fe}`]:{display:"none"},"a, a:hover":{color:Ie}},[`${de}-item-group-title`]:Object.assign(Object.assign({},It.vS),{paddingInline:bt})}}]};const At=oe=>{const{componentCls:de,motionDurationSlow:fe,motionDurationMid:le,motionEaseInOut:Ie,motionEaseOut:ot,iconCls:Kt,iconSize:Ft,iconMarginInlineEnd:Xt}=oe;return{[`${de}-item, ${de}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${fe}`,`background ${fe}`,`padding ${fe} ${Ie}`].join(","),[`${de}-item-icon, ${Kt}`]:{minWidth:Ft,fontSize:Ft,transition:[`font-size ${le} ${ot}`,`margin ${fe} ${Ie}`,`color ${fe}`].join(","),"+ span":{marginInlineStart:Xt,opacity:1,transition:[`opacity ${fe} ${Ie}`,`margin ${fe}`,`color ${fe}`].join(",")}},[`${de}-item-icon`]:Object.assign({},(0,It.Ro)()),[`&${de}-item-only-child`]:{[`> ${Kt}, > ${de}-item-icon`]:{marginInlineEnd:0}}},[`${de}-item-disabled, ${de}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${de}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},gn=oe=>{const{componentCls:de,motionDurationSlow:fe,motionEaseInOut:le,borderRadius:Ie,menuArrowSize:ot,menuArrowOffset:Kt}=oe;return{[`${de}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:oe.margin,width:ot,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${fe} ${le}, opacity ${fe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:ot*.6,height:ot*.15,backgroundColor:"currentcolor",borderRadius:Ie,transition:[`background ${fe} ${le}`,`transform ${fe} ${le}`,`top ${fe} ${le}`,`color ${fe} ${le}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Kt})`},"&::after":{transform:`rotate(-45deg) translateY(${Kt})`}}}}},Jt=oe=>{const{antCls:de,componentCls:fe,fontSize:le,motionDurationSlow:Ie,motionDurationMid:ot,motionEaseInOut:Kt,paddingXS:Ft,padding:Xt,colorSplit:Qt,lineWidth:on,zIndexPopup:pn,borderRadiusLG:Cn,subMenuItemBorderRadius:bt,menuArrowSize:hn,menuArrowOffset:On,lineType:rt,menuPanelMaskInset:ze,groupTitleLineHeight:Xe,groupTitleFontSize:jt}=oe;return[{"":{[`${fe}`]:Object.assign(Object.assign({},(0,It.dF)()),{"&-hidden":{display:"none"}})},[`${fe}-submenu-hidden`]:{display:"none"}},{[fe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,It.Wf)(oe)),(0,It.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:le,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",[`${fe}-item`]:{flex:"none"}},[`${fe}-item, ${fe}-submenu, ${fe}-submenu-title`]:{borderRadius:oe.itemBorderRadius},[`${fe}-item-group-title`]:{padding:`${Ft}px ${Xt}px`,fontSize:jt,lineHeight:Xe,transition:`all ${Ie}`},[`&-horizontal ${fe}-submenu`]:{transition:[`border-color ${Ie} ${Kt}`,`background ${Ie} ${Kt}`].join(",")},[`${fe}-submenu, ${fe}-submenu-inline`]:{transition:[`border-color ${Ie} ${Kt}`,`background ${Ie} ${Kt}`,`padding ${ot} ${Kt}`].join(",")},[`${fe}-submenu ${fe}-sub`]:{cursor:"initial",transition:[`background ${Ie} ${Kt}`,`padding ${Ie} ${Kt}`].join(",")},[`${fe}-title-content`]:{transition:`color ${Ie}`},[`${fe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${fe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Qt,borderStyle:rt,borderWidth:0,borderTopWidth:on,marginBlock:on,padding:0,"&-dashed":{borderStyle:"dashed"}}}),At(oe)),{[`${fe}-item-group`]:{[`${fe}-item-group-list`]:{margin:0,padding:0,[`${fe}-item, ${fe}-submenu-title`]:{paddingInline:`${le*2}px ${Xt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:pn,borderRadius:Cn,boxShadow:"none",transformOrigin:"0 0",[`&${fe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${ze}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:ze},"\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:oe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:oe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:oe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:oe.paddingXS},[`> ${fe}`]:Object.assign(Object.assign(Object.assign({borderRadius:Cn},At(oe)),gn(oe)),{[`${fe}-item, ${fe}-submenu > ${fe}-submenu-title`]:{borderRadius:bt},[`${fe}-submenu-title::after`]:{transition:`transform ${Ie} ${Kt}`}})}}),gn(oe)),{[`&-inline-collapsed ${fe}-submenu-arrow,
|
|
|
&-inline ${fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${On})`},"&::after":{transform:`rotate(45deg) translateX(-${On})`}},[`${fe}-submenu-open${fe}-submenu-inline > ${fe}-submenu-title > ${fe}-submenu-arrow`]:{transform:`translateY(-${hn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${On})`},"&::before":{transform:`rotate(45deg) translateX(${On})`}}})},{[`${de}-layout-header`]:{[fe]:{lineHeight:"inherit"}}}]};var un=(oe,de)=>(0,Ut.Z)("Menu",le=>{if(de===!1)return[];const{colorBgElevated:Ie,colorPrimary:ot,colorTextLightSolid:Kt,controlHeightLG:Ft,fontSize:Xt,darkItemColor:Qt,darkDangerItemColor:on,darkItemBg:pn,darkSubMenuItemBg:Cn,darkItemSelectedColor:bt,darkItemSelectedBg:hn,darkDangerItemSelectedBg:On,darkItemHoverBg:rt,darkGroupTitleColor:ze,darkItemHoverColor:Xe,darkItemDisabledColor:jt,darkDangerItemHoverColor:tn,darkDangerItemSelectedColor:cn,darkDangerItemActiveBg:Dn}=le,Tn=Xt/7*5,_n=(0,ft.TS)(le,{menuArrowSize:Tn,menuHorizontalHeight:Ft*1.15,menuArrowOffset:`${Tn*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Ie}),Fn=(0,ft.TS)(_n,{itemColor:Qt,itemHoverColor:Xe,groupTitleColor:ze,itemSelectedColor:bt,itemBg:pn,popupBg:pn,subMenuItemBg:Cn,itemActiveBg:"transparent",itemSelectedBg:hn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:rt,itemDisabledColor:jt,dangerItemColor:on,dangerItemHoverColor:tn,dangerItemSelectedColor:cn,dangerItemActiveBg:Dn,dangerItemSelectedBg:On,menuSubMenuBg:Cn,horizontalItemSelectedColor:Kt,horizontalItemSelectedBg:ot});return[Jt(_n),Et(_n),Ye(_n),nn(_n,"light"),nn(Fn,"dark"),Be(_n),(0,et.Z)(_n),(0,kt.oN)(_n,"slide-up"),(0,kt.oN)(_n,"slide-down"),(0,Je._y)(_n,"zoom-big")]},le=>{const{colorPrimary:Ie,colorError:ot,colorTextDisabled:Kt,colorErrorBg:Ft,colorText:Xt,colorTextDescription:Qt,colorBgContainer:on,colorFillAlter:pn,colorFillContent:Cn,lineWidth:bt,lineWidthBold:hn,controlItemBgActive:On,colorBgTextHover:rt,controlHeightLG:ze,lineHeight:Xe,colorBgElevated:jt,marginXXS:tn,padding:cn,fontSize:Dn,controlHeightSM:Tn,fontSizeLG:_n,colorTextLightSolid:Fn,colorErrorHover:jn}=le,An=new Ge.C(Fn).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:le.zIndexPopupBase+50,radiusItem:le.borderRadiusLG,itemBorderRadius:le.borderRadiusLG,radiusSubMenuItem:le.borderRadiusSM,subMenuItemBorderRadius:le.borderRadiusSM,colorItemText:Xt,itemColor:Xt,colorItemTextHover:Xt,itemHoverColor:Xt,colorItemTextHoverHorizontal:Ie,horizontalItemHoverColor:Ie,colorGroupTitle:Qt,groupTitleColor:Qt,colorItemTextSelected:Ie,itemSelectedColor:Ie,colorItemTextSelectedHorizontal:Ie,horizontalItemSelectedColor:Ie,colorItemBg:on,itemBg:on,colorItemBgHover:rt,itemHoverBg:rt,colorItemBgActive:Cn,itemActiveBg:On,colorSubItemBg:pn,subMenuItemBg:pn,colorItemBgSelected:On,itemSelectedBg:On,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:hn,activeBarHeight:hn,colorActiveBarBorderSize:bt,activeBarBorderWidth:bt,colorItemTextDisabled:Kt,itemDisabledColor:Kt,colorDangerItemText:ot,dangerItemColor:ot,colorDangerItemTextHover:ot,dangerItemHoverColor:ot,colorDangerItemTextSelected:ot,dangerItemSelectedColor:ot,colorDangerItemBgActive:Ft,dangerItemActiveBg:Ft,colorDangerItemBgSelected:Ft,dangerItemSelectedBg:Ft,itemMarginInline:le.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:ze,groupTitleLineHeight:Xe,collapsedWidth:ze*2,popupBg:jt,itemMarginBlock:tn,itemPaddingInline:cn,horizontalLineHeight:`${ze*1.15}px`,iconSize:Dn,iconMarginInlineEnd:Tn-Dn,collapsedIconSize:_n,groupTitleFontSize:Dn,darkItemDisabledColor:new Ge.C(Fn).setAlpha(.25).toRgbString(),darkItemColor:An,darkDangerItemColor:ot,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Fn,darkItemSelectedBg:Ie,darkDangerItemSelectedBg:ot,darkItemHoverBg:"transparent",darkGroupTitleColor:An,darkItemHoverColor:Fn,darkDangerItemHoverColor:jn,darkDangerItemSelectedColor:Fn,darkDangerItemActiveBg:ot}},{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"]]})(oe),Gt=function(oe,de){var fe={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&de.indexOf(le)<0&&(fe[le]=oe[le]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,le=Object.getOwnPropertySymbols(oe);Ie<le.length;Ie++)de.indexOf(le[Ie])<0&&Object.prototype.propertyIsEnumerable.call(oe,le[Ie])&&(fe[le[Ie]]=oe[le[Ie]]);return fe},Nt=(0,je.forwardRef)((oe,de)=>{var fe,le;const Ie=je.useContext(Ee.Z),ot=Ie||{},{getPrefixCls:Kt,getPopupContainer:Ft,direction:Xt,menu:Qt}=je.useContext(_e.E_),on=Kt(),{prefixCls:pn,className:Cn,style:bt,theme:hn="light",expandIcon:On,_internalDisableMenuItemTitleTooltip:rt,inlineCollapsed:ze,siderCollapsed:Xe,items:jt,children:tn,rootClassName:cn,mode:Dn,selectable:Tn,onClick:_n,overflowedIndicatorPopupClassName:Fn}=oe,jn=Gt(oe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),An=(0,ct.Z)(jn,["collapsedWidth"]),hr=Ct(jt)||tn;(fe=ot.validator)===null||fe===void 0||fe.call(ot,{mode:Dn});const kr=(0,mt.useEvent)(function(){var Jn;_n==null||_n.apply(void 0,arguments),(Jn=ot.onClick)===null||Jn===void 0||Jn.call(ot)}),Tr=ot.mode||Dn,Hr=Tn!=null?Tn:ot.selectable,sr=je.useMemo(()=>Xe!==void 0?Xe:ze,[ze,Xe]),Mr={horizontal:{motionName:`${on}-slide-up`},inline:(0,Ze.Z)(on),other:{motionName:`${on}-zoom-big`}},rr=Kt("menu",pn||ot.prefixCls),[Or,Fr]=un(rr,!Ie),_r=xe()(`${rr}-${hn}`,Qt==null?void 0:Qt.className,Cn);let jr;if(typeof On=="function")jr=On;else if(On===null||On===!1)jr=null;else if(ot.expandIcon===null||ot.expandIcon===!1)jr=null;else{const Jn=On!=null?On:ot.expandIcon;jr=(0,We.Tm)(Jn,{className:xe()(`${rr}-submenu-expand-icon`,(0,We.l$)(Jn)?(le=Jn.props)===null||le===void 0?void 0:le.className:"")})}const Nr=je.useMemo(()=>({prefixCls:rr,inlineCollapsed:sr||!1,direction:Xt,firstLevel:!0,theme:hn,mode:Tr,disableMenuItemTitleTooltip:rt}),[rr,sr,Xt,rt,hn]);return Or(je.createElement(Ee.Z.Provider,{value:null},je.createElement(nt.Provider,{value:Nr},je.createElement(pe.ZP,Object.assign({getPopupContainer:Ft,overflowedIndicator:je.createElement(it.Z,null),overflowedIndicatorPopupClassName:xe()(rr,`${rr}-${hn}`,Fn),mode:Tr,selectable:Hr,onClick:kr},An,{inlineCollapsed:sr,style:Object.assign(Object.assign({},Qt==null?void 0:Qt.style),bt),className:_r,prefixCls:rr,direction:Xt,defaultMotions:Mr,expandIcon:jr,ref:de,rootClassName:xe()(cn,Fr)}),hr))))});const ve=(0,je.forwardRef)((oe,de)=>{const fe=(0,je.useRef)(null),le=je.useContext(Fe.D);return(0,je.useImperativeHandle)(de,()=>({menu:fe.current,focus:Ie=>{var ot;(ot=fe.current)===null||ot===void 0||ot.focus(Ie)}})),je.createElement(Nt,Object.assign({ref:fe},oe,le))});ve.Item=st,ve.SubMenu=en,ve.Divider=Me,ve.ItemGroup=pe.BW;var se=ve},93948:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return rt}});var pe=ue(59301),je=ue(29679),Fe=ue(40001),tt=ue(19248),xe=ue(99267),_e=ue(92310),Ae=ue.n(_e),Se=ue(2738),Me=ue(36355),Ke=ue(54476),ct=ue(33885),De=ue(75931),We={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},vt=function(){var Xe=(0,pe.useRef)([]),jt=(0,pe.useRef)(null);return(0,pe.useEffect)(function(){var tn=Date.now(),cn=!1;Xe.current.forEach(function(Dn){if(Dn){cn=!0;var Tn=Dn.style;Tn.transitionDuration=".3s, .3s, .3s, .06s",jt.current&&tn-jt.current<100&&(Tn.transitionDuration="0s, 0s")}}),cn&&(jt.current=Date.now())}),Xe.current},nt=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],dt=function(Xe){var jt=(0,ct.Z)((0,ct.Z)({},We),Xe),tn=jt.className,cn=jt.percent,Dn=jt.prefixCls,Tn=jt.strokeColor,_n=jt.strokeLinecap,Fn=jt.strokeWidth,jn=jt.style,An=jt.trailColor,hr=jt.trailWidth,kr=jt.transition,Tr=(0,De.Z)(jt,nt);delete Tr.gapPosition;var Hr=Array.isArray(cn)?cn:[cn],sr=Array.isArray(Tn)?Tn:[Tn],Mr=vt(),rr=Fn/2,Or=100-Fn/2,Fr="M ".concat(_n==="round"?rr:0,",").concat(rr,`
|
|
|
L `).concat(_n==="round"?Or:100,",").concat(rr),_r="0 0 100 ".concat(Fn),jr=0;return pe.createElement("svg",(0,Ke.Z)({className:Ae()("".concat(Dn,"-line"),tn),viewBox:_r,preserveAspectRatio:"none",style:jn},Tr),pe.createElement("path",{className:"".concat(Dn,"-line-trail"),d:Fr,strokeLinecap:_n,stroke:An,strokeWidth:hr||Fn,fillOpacity:"0"}),Hr.map(function(Nr,Jn){var lr=1;switch(_n){case"round":lr=1-Fn/100;break;case"square":lr=1-Fn/2/100;break;default:lr=1;break}var Rn={strokeDasharray:"".concat(Nr*lr,"px, 100px"),strokeDashoffset:"-".concat(jr,"px"),transition:kr||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},$n=sr[Jn]||sr[sr.length-1];return jr+=Nr,pe.createElement("path",{key:Jn,className:"".concat(Dn,"-line-path"),d:Fr,strokeLinecap:_n,stroke:$n,strokeWidth:Fn,fillOpacity:"0",ref:function(lt){Mr[Jn]=lt},style:Rn})}))},st=dt,wt=ue(76190),en=ue(42978),it=ue(47273),mt=0,Ze=(0,it.Z)();function Ee(){var ze;return Ze?(ze=mt,mt+=1):ze="TEST_OR_SSR",ze}var He=function(ze){var Xe=pe.useState(),jt=(0,en.Z)(Xe,2),tn=jt[0],cn=jt[1];return pe.useEffect(function(){cn("rc_progress_".concat(Ee()))},[]),ze||tn},Ue=function(Xe){var jt=Xe.bg,tn=Xe.children;return pe.createElement("div",{style:{width:"100%",height:"100%",background:jt}},tn)};function Ct(ze,Xe){return Object.keys(ze).map(function(jt){var tn=parseFloat(jt),cn="".concat(Math.floor(tn*Xe),"%");return"".concat(ze[jt]," ").concat(cn)})}var Ge=pe.forwardRef(function(ze,Xe){var jt=ze.prefixCls,tn=ze.color,cn=ze.gradientId,Dn=ze.radius,Tn=ze.style,_n=ze.ptg,Fn=ze.strokeLinecap,jn=ze.strokeWidth,An=ze.size,hr=ze.gapDegree,kr=tn&&(0,wt.Z)(tn)==="object",Tr=kr?"#FFF":void 0,Hr=An/2,sr=pe.createElement("circle",{className:"".concat(jt,"-circle-path"),r:Dn,cx:Hr,cy:Hr,stroke:Tr,strokeLinecap:Fn,strokeWidth:jn,opacity:_n===0?0:1,style:Tn,ref:Xe});if(!kr)return sr;var Mr="".concat(cn,"-conic"),rr=hr?"".concat(180+hr/2,"deg"):"0deg",Or=Ct(tn,(360-hr)/360),Fr=Ct(tn,1),_r="conic-gradient(from ".concat(rr,", ").concat(Or.join(", "),")"),jr="linear-gradient(to ".concat(hr?"bottom":"top",", ").concat(Fr.join(", "),")");return pe.createElement(pe.Fragment,null,pe.createElement("mask",{id:Mr},sr),pe.createElement("foreignObject",{x:0,y:0,width:An,height:An,mask:"url(#".concat(Mr,")")},pe.createElement(Ue,{bg:jr},pe.createElement(Ue,{bg:_r}))))}),It=Ge,et=100,kt=function(Xe,jt,tn,cn,Dn,Tn,_n,Fn,jn,An){var hr=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,kr=tn/100*360*((360-Tn)/360),Tr=Tn===0?0:{bottom:0,top:180,left:90,right:-90}[_n],Hr=(100-cn)/100*jt;jn==="round"&&cn!==100&&(Hr+=An/2,Hr>=jt&&(Hr=jt-.01));var sr=et/2;return{stroke:typeof Fn=="string"?Fn:void 0,strokeDasharray:"".concat(jt,"px ").concat(Xe),strokeDashoffset:Hr+hr,transform:"rotate(".concat(Dn+kr+Tr,"deg)"),transformOrigin:"".concat(sr,"px ").concat(sr,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Je=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ut(ze){var Xe=ze!=null?ze:[];return Array.isArray(Xe)?Xe:[Xe]}var ft=function(Xe){var jt=(0,ct.Z)((0,ct.Z)({},We),Xe),tn=jt.id,cn=jt.prefixCls,Dn=jt.steps,Tn=jt.strokeWidth,_n=jt.trailWidth,Fn=jt.gapDegree,jn=Fn===void 0?0:Fn,An=jt.gapPosition,hr=jt.trailColor,kr=jt.strokeLinecap,Tr=jt.style,Hr=jt.className,sr=jt.strokeColor,Mr=jt.percent,rr=(0,De.Z)(jt,Je),Or=et/2,Fr=He(tn),_r="".concat(Fr,"-gradient"),jr=Or-Tn/2,Nr=Math.PI*2*jr,Jn=jn>0?90+jn/2:-90,lr=Nr*((360-jn)/360),Rn=(0,wt.Z)(Dn)==="object"?Dn:{count:Dn,space:2},$n=Rn.count,wr=Rn.space,lt=Ut(Mr),ke=Ut(sr),Oe=ke.find(function(qt){return qt&&(0,wt.Z)(qt)==="object"}),Te=Oe&&(0,wt.Z)(Oe)==="object",Pe=Te?"butt":kr,Qe=kt(Nr,lr,0,100,Jn,jn,An,hr,Pe,Tn),pt=vt(),Yt=function(){var vn=0;return lt.map(function(wn,Sn){var Bt=ke[Sn]||ke[ke.length-1],dn=kt(Nr,lr,vn,wn,Jn,jn,An,Bt,Pe,Tn);return vn+=wn,pe.createElement(It,{key:Sn,color:Bt,ptg:wn,radius:jr,prefixCls:cn,gradientId:_r,style:dn,strokeLinecap:Pe,strokeWidth:Tn,gapDegree:jn,ref:function(Mt){pt[Sn]=Mt},size:et})}).reverse()},$t=function(){var vn=Math.round($n*(lt[0]/100)),wn=100/$n,Sn=0;return new Array($n).fill(null).map(function(Bt,dn){var at=dn<=vn-1?ke[0]:hr,Mt=at&&(0,wt.Z)(at)==="object"?"url(#".concat(_r,")"):void 0,Pt=kt(Nr,lr,Sn,wn,Jn,jn,An,at,"butt",Tn,wr);return Sn+=(lr-Pt.strokeDashoffset+wr)*100/lr,pe.createElement("circle",{key:dn,className:"".concat(cn,"-circle-path"),r:jr,cx:Or,cy:Or,stroke:Mt,strokeWidth:Tn,opacity:1,style:Pt,ref:function(an){pt[dn]=an}})})};return pe.createElement("svg",(0,Ke.Z)({className:Ae()("".concat(cn,"-circle"),Hr),viewBox:"0 0 ".concat(et," ").concat(et),style:Tr,id:tn,role:"presentation"},rr),!$n&&pe.createElement("circle",{className:"".concat(cn,"-circle-trail"),r:jr,cx:Or,cy:Or,stroke:hr,strokeLinecap:Pe,strokeWidth:_n||Tn,style:Qe}),$n?$t():Yt())},Dt=ft,Et={Line:st,Circle:Dt},ut=ue(6848),Be=ue(30071);function be(ze){return!ze||ze<0?0:ze>100?100:ze}function ht(ze){let{success:Xe,successPercent:jt}=ze,tn=jt;return Xe&&"progress"in Xe&&(tn=Xe.progress),Xe&&"percent"in Xe&&(tn=Xe.percent),tn}const nn=ze=>{let{percent:Xe,success:jt,successPercent:tn}=ze;const cn=be(ht({success:jt,successPercent:tn}));return[cn,be(be(Xe)-cn)]},Wt=ze=>{let{success:Xe={},strokeColor:jt}=ze;const{strokeColor:tn}=Xe;return[tn||Be.presetPrimaryColors.green,jt||null]},Ve=(ze,Xe,jt)=>{var tn,cn,Dn,Tn;let _n=-1,Fn=-1;if(Xe==="step"){const jn=jt.steps,An=jt.strokeWidth;typeof ze=="string"||typeof ze=="undefined"?(_n=ze==="small"?2:14,Fn=An!=null?An:8):typeof ze=="number"?[_n,Fn]=[ze,ze]:[_n=14,Fn=8]=ze,_n*=jn}else if(Xe==="line"){const jn=jt==null?void 0:jt.strokeWidth;typeof ze=="string"||typeof ze=="undefined"?Fn=jn||(ze==="small"?6:8):typeof ze=="number"?[_n,Fn]=[ze,ze]:[_n=-1,Fn=8]=ze}else(Xe==="circle"||Xe==="dashboard")&&(typeof ze=="string"||typeof ze=="undefined"?[_n,Fn]=ze==="small"?[60,60]:[120,120]:typeof ze=="number"?[_n,Fn]=[ze,ze]:(_n=(cn=(tn=ze[0])!==null&&tn!==void 0?tn:ze[1])!==null&&cn!==void 0?cn:120,Fn=(Tn=(Dn=ze[0])!==null&&Dn!==void 0?Dn:ze[1])!==null&&Tn!==void 0?Tn:120));return[_n,Fn]},Ye=3,At=ze=>Ye/ze*100;var Jt=ze=>{const{prefixCls:Xe,trailColor:jt=null,strokeLinecap:tn="round",gapPosition:cn,gapDegree:Dn,width:Tn=120,type:_n,children:Fn,success:jn,size:An=Tn}=ze,[hr,kr]=Ve(An,"circle");let{strokeWidth:Tr}=ze;Tr===void 0&&(Tr=Math.max(At(hr),6));const Hr={width:hr,height:kr,fontSize:hr*.15+6},sr=pe.useMemo(()=>{if(Dn||Dn===0)return Dn;if(_n==="dashboard")return 75},[Dn,_n]),Mr=cn||_n==="dashboard"&&"bottom"||void 0,rr=Object.prototype.toString.call(ze.strokeColor)==="[object Object]",Or=Wt({success:jn,strokeColor:ze.strokeColor}),Fr=Ae()(`${Xe}-inner`,{[`${Xe}-circle-gradient`]:rr}),_r=pe.createElement(Dt,{percent:nn(ze),strokeWidth:Tr,trailWidth:Tr,strokeColor:Or,strokeLinecap:tn,trailColor:jt,prefixCls:Xe,gapDegree:sr,gapPosition:Mr});return pe.createElement("div",{className:Fr,style:Hr},hr<=20?pe.createElement(ut.Z,{title:Fn},pe.createElement("span",null,_r)):pe.createElement(pe.Fragment,null,_r,Fn))},un=function(ze,Xe){var jt={};for(var tn in ze)Object.prototype.hasOwnProperty.call(ze,tn)&&Xe.indexOf(tn)<0&&(jt[tn]=ze[tn]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var cn=0,tn=Object.getOwnPropertySymbols(ze);cn<tn.length;cn++)Xe.indexOf(tn[cn])<0&&Object.prototype.propertyIsEnumerable.call(ze,tn[cn])&&(jt[tn[cn]]=ze[tn[cn]]);return jt};const Gt=ze=>{let Xe=[];return Object.keys(ze).forEach(jt=>{const tn=parseFloat(jt.replace(/%/g,""));isNaN(tn)||Xe.push({key:tn,value:ze[jt]})}),Xe=Xe.sort((jt,tn)=>jt.key-tn.key),Xe.map(jt=>{let{key:tn,value:cn}=jt;return`${cn} ${tn}%`}).join(", ")},Vt=(ze,Xe)=>{const{from:jt=Be.presetPrimaryColors.blue,to:tn=Be.presetPrimaryColors.blue,direction:cn=Xe==="rtl"?"to left":"to right"}=ze,Dn=un(ze,["from","to","direction"]);if(Object.keys(Dn).length!==0){const Tn=Gt(Dn);return{backgroundImage:`linear-gradient(${cn}, ${Tn})`}}return{backgroundImage:`linear-gradient(${cn}, ${jt}, ${tn})`}};var ve=ze=>{const{prefixCls:Xe,direction:jt,percent:tn,size:cn,strokeWidth:Dn,strokeColor:Tn,strokeLinecap:_n="round",children:Fn,trailColor:jn=null,success:An}=ze,hr=Tn&&typeof Tn!="string"?Vt(Tn,jt):{backgroundColor:Tn},kr=_n==="square"||_n==="butt"?0:void 0,Tr={backgroundColor:jn||void 0,borderRadius:kr},Hr=cn!=null?cn:[-1,Dn||(cn==="small"?6:8)],[sr,Mr]=Ve(Hr,"line",{strokeWidth:Dn}),rr=Object.assign({width:`${be(tn)}%`,height:Mr,borderRadius:kr},hr),Or=ht(ze),Fr={width:`${be(Or)}%`,height:Mr,borderRadius:kr,backgroundColor:An==null?void 0:An.strokeColor},_r={width:sr<0?"100%":sr,height:Mr};return pe.createElement(pe.Fragment,null,pe.createElement("div",{className:`${Xe}-outer`,style:_r},pe.createElement("div",{className:`${Xe}-inner`,style:Tr},pe.createElement("div",{className:`${Xe}-bg`,style:rr}),Or!==void 0?pe.createElement("div",{className:`${Xe}-success-bg`,style:Fr}):null)),Fn)},oe=ze=>{const{size:Xe,steps:jt,percent:tn=0,strokeWidth:cn=8,strokeColor:Dn,trailColor:Tn=null,prefixCls:_n,children:Fn}=ze,jn=Math.round(jt*(tn/100)),An=Xe==="small"?2:14,hr=Xe!=null?Xe:[An,cn],[kr,Tr]=Ve(hr,"step",{steps:jt,strokeWidth:cn}),Hr=kr/jt,sr=new Array(jt);for(let Mr=0;Mr<jt;Mr++){const rr=Array.isArray(Dn)?Dn[Mr]:Dn;sr[Mr]=pe.createElement("div",{key:Mr,className:Ae()(`${_n}-steps-item`,{[`${_n}-steps-item-active`]:Mr<=jn-1}),style:{backgroundColor:Mr<=jn-1?rr:Tn,width:Hr,height:Tr}})}return pe.createElement("div",{className:`${_n}-steps-outer`},sr,Fn)},de=ue(36237),fe=ue(17313),le=ue(83116),Ie=ue(37613);const ot=ze=>{const Xe=ze?"100%":"-100%";return new de.Keyframes(`antProgress${ze?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Xe}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Xe}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Kt=ze=>{const{componentCls:Xe,iconCls:jt}=ze;return{[Xe]:Object.assign(Object.assign({},(0,fe.Wf)(ze)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:ze.fontSize,marginInlineEnd:ze.marginXS,marginBottom:ze.marginXS},[`${Xe}-outer`]:{display:"inline-block",width:"100%"},[`&${Xe}-show-info`]:{[`${Xe}-outer`]:{marginInlineEnd:`calc(-2em - ${ze.marginXS}px)`,paddingInlineEnd:`calc(2em + ${ze.paddingXS}px)`}},[`${Xe}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:ze.remainingColor,borderRadius:ze.lineBorderRadius},[`${Xe}-inner:not(${Xe}-circle-gradient)`]:{[`${Xe}-circle-path`]:{stroke:ze.defaultColor}},[`${Xe}-success-bg, ${Xe}-bg`]:{position:"relative",backgroundColor:ze.defaultColor,borderRadius:ze.lineBorderRadius,transition:`all ${ze.motionDurationSlow} ${ze.motionEaseInOutCirc}`},[`${Xe}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:ze.colorSuccess},[`${Xe}-text`]:{display:"inline-block",width:"2em",marginInlineStart:ze.marginXS,color:ze.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[jt]:{fontSize:ze.fontSize}},[`&${Xe}-status-active`]:{[`${Xe}-bg::before`]:{position:"absolute",inset:0,backgroundColor:ze.colorBgContainer,borderRadius:ze.lineBorderRadius,opacity:0,animationName:ot(),animationDuration:ze.progressActiveMotionDuration,animationTimingFunction:ze.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Xe}-rtl${Xe}-status-active`]:{[`${Xe}-bg::before`]:{animationName:ot(!0)}},[`&${Xe}-status-exception`]:{[`${Xe}-bg`]:{backgroundColor:ze.colorError},[`${Xe}-text`]:{color:ze.colorError}},[`&${Xe}-status-exception ${Xe}-inner:not(${Xe}-circle-gradient)`]:{[`${Xe}-circle-path`]:{stroke:ze.colorError}},[`&${Xe}-status-success`]:{[`${Xe}-bg`]:{backgroundColor:ze.colorSuccess},[`${Xe}-text`]:{color:ze.colorSuccess}},[`&${Xe}-status-success ${Xe}-inner:not(${Xe}-circle-gradient)`]:{[`${Xe}-circle-path`]:{stroke:ze.colorSuccess}}})}},Ft=ze=>{const{componentCls:Xe,iconCls:jt}=ze;return{[Xe]:{[`${Xe}-circle-trail`]:{stroke:ze.remainingColor},[`&${Xe}-circle ${Xe}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Xe}-circle ${Xe}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:ze.circleTextColor,fontSize:ze.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[jt]:{fontSize:`${ze.fontSize/ze.fontSizeSM}em`}},[`${Xe}-circle&-status-exception`]:{[`${Xe}-text`]:{color:ze.colorError}},[`${Xe}-circle&-status-success`]:{[`${Xe}-text`]:{color:ze.colorSuccess}}},[`${Xe}-inline-circle`]:{lineHeight:1,[`${Xe}-inner`]:{verticalAlign:"bottom"}}}},Xt=ze=>{const{componentCls:Xe}=ze;return{[Xe]:{[`${Xe}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:ze.progressStepMinWidth,marginInlineEnd:ze.progressStepMarginInlineEnd,backgroundColor:ze.remainingColor,transition:`all ${ze.motionDurationSlow}`,"&-active":{backgroundColor:ze.defaultColor}}}}}},Qt=ze=>{const{componentCls:Xe,iconCls:jt}=ze;return{[Xe]:{[`${Xe}-small&-line, ${Xe}-small&-line ${Xe}-text ${jt}`]:{fontSize:ze.fontSizeSM}}}};var on=(0,le.Z)("Progress",ze=>{const Xe=ze.marginXXS/2,jt=(0,Ie.TS)(ze,{progressStepMarginInlineEnd:Xe,progressStepMinWidth:Xe,progressActiveMotionDuration:"2.4s"});return[Kt(jt),Ft(jt),Xt(jt),Qt(jt)]},ze=>({circleTextColor:ze.colorText,defaultColor:ze.colorInfo,remainingColor:ze.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),pn=function(ze,Xe){var jt={};for(var tn in ze)Object.prototype.hasOwnProperty.call(ze,tn)&&Xe.indexOf(tn)<0&&(jt[tn]=ze[tn]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var cn=0,tn=Object.getOwnPropertySymbols(ze);cn<tn.length;cn++)Xe.indexOf(tn[cn])<0&&Object.prototype.propertyIsEnumerable.call(ze,tn[cn])&&(jt[tn[cn]]=ze[tn[cn]]);return jt};const Cn=null,bt=["normal","exception","active","success"];var On=pe.forwardRef((ze,Xe)=>{const{prefixCls:jt,className:tn,rootClassName:cn,steps:Dn,strokeColor:Tn,percent:_n=0,size:Fn="default",showInfo:jn=!0,type:An="line",status:hr,format:kr,style:Tr}=ze,Hr=pn(ze,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),sr=pe.useMemo(()=>{var lt,ke;const Oe=ht(ze);return parseInt(Oe!==void 0?(lt=Oe!=null?Oe:0)===null||lt===void 0?void 0:lt.toString():(ke=_n!=null?_n:0)===null||ke===void 0?void 0:ke.toString(),10)},[_n,ze.success,ze.successPercent]),Mr=pe.useMemo(()=>!bt.includes(hr)&&sr>=100?"success":hr||"normal",[hr,sr]),{getPrefixCls:rr,direction:Or,progress:Fr}=pe.useContext(Me.E_),_r=rr("progress",jt),[jr,Nr]=on(_r),Jn=pe.useMemo(()=>{if(!jn)return null;const lt=ht(ze);let ke;const Oe=kr||(Pe=>`${Pe}%`),Te=An==="line";return kr||Mr!=="exception"&&Mr!=="success"?ke=Oe(be(_n),be(lt)):Mr==="exception"?ke=Te?pe.createElement(tt.Z,null):pe.createElement(xe.Z,null):Mr==="success"&&(ke=Te?pe.createElement(je.Z,null):pe.createElement(Fe.Z,null)),pe.createElement("span",{className:`${_r}-text`,title:typeof ke=="string"?ke:void 0},ke)},[jn,_n,sr,Mr,An,_r,kr]),lr=Array.isArray(Tn)?Tn[0]:Tn,Rn=typeof Tn=="string"||Array.isArray(Tn)?Tn:void 0;let $n;An==="line"?$n=Dn?pe.createElement(oe,Object.assign({},ze,{strokeColor:Rn,prefixCls:_r,steps:Dn}),Jn):pe.createElement(ve,Object.assign({},ze,{strokeColor:lr,prefixCls:_r,direction:Or}),Jn):(An==="circle"||An==="dashboard")&&($n=pe.createElement(Jt,Object.assign({},ze,{strokeColor:lr,prefixCls:_r,progressStatus:Mr}),Jn));const wr=Ae()(_r,`${_r}-status-${Mr}`,`${_r}-${An==="dashboard"&&"circle"||Dn&&"steps"||An}`,{[`${_r}-inline-circle`]:An==="circle"&&Ve(Fn,"circle")[0]<=20,[`${_r}-show-info`]:jn,[`${_r}-${Fn}`]:typeof Fn=="string",[`${_r}-rtl`]:Or==="rtl"},Fr==null?void 0:Fr.className,tn,cn,Nr);return jr(pe.createElement("div",Object.assign({ref:Xe,style:Object.assign(Object.assign({},Fr==null?void 0:Fr.style),Tr),className:wr,role:"progressbar","aria-valuenow":sr},(0,Se.Z)(Hr,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),$n))}),rt=On},5112:function(Mn,sn,ue){"use strict";ue.d(sn,{ZP:function(){return Be}});var pe=ue(92310),je=ue.n(pe),Fe=ue(18929),tt=ue(26112),xe=ue(59301),_e=ue(36355),Ae=ue(19716);const Se=xe.createContext(null),Me=Se.Provider;var Ke=Se;const ct=xe.createContext(null),De=ct.Provider;var We=ue(5630),vt=ue(8654),nt=ue(1684),dt=ue(32441),st=ue(17313),wt=ue(83116),en=ue(37613);const it=be=>{const{componentCls:ht,antCls:nn}=be,Wt=`${ht}-group`;return{[Wt]:Object.assign(Object.assign({},(0,st.Wf)(be)),{display:"inline-block",fontSize:0,[`&${Wt}-rtl`]:{direction:"rtl"},[`${nn}-badge ${nn}-badge-count`]:{zIndex:1},[`> ${nn}-badge:not(:first-child) > ${nn}-button-wrapper`]:{borderInlineStart:"none"}})}},mt=be=>{const{componentCls:ht,wrapperMarginInlineEnd:nn,colorPrimary:Wt,radioSize:Ve,motionDurationSlow:Ye,motionDurationMid:At,motionEaseInOutCirc:gn,colorBgContainer:Jt,colorBorder:un,lineWidth:Gt,dotSize:Vt,colorBgContainerDisabled:Nt,colorTextDisabled:ve,paddingXS:se,dotColorDisabled:oe,lineType:de,radioDotDisabledSize:fe,wireframe:le,colorWhite:Ie}=be,ot=`${ht}-inner`;return{[`${ht}-wrapper`]:Object.assign(Object.assign({},(0,st.Wf)(be)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:nn,cursor:"pointer",[`&${ht}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:be.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${ht}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Gt}px ${de} ${Wt}`,borderRadius:"50%",visibility:"hidden",content:'""'},[ht]:Object.assign(Object.assign({},(0,st.Wf)(be)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${ht}-wrapper:hover &,
|
|
|
&:hover ${ot}`]:{borderColor:Wt},[`${ht}-input:focus-visible + ${ot}`]:Object.assign({},(0,st.oN)(be)),[`${ht}:hover::after, ${ht}-wrapper:hover &::after`]:{visibility:"visible"},[`${ht}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ve,height:Ve,marginBlockStart:Ve/-2,marginInlineStart:Ve/-2,backgroundColor:le?Wt:Ie,borderBlockStart:0,borderInlineStart:0,borderRadius:Ve,transform:"scale(0)",opacity:0,transition:`all ${Ye} ${gn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ve,height:Ve,backgroundColor:Jt,borderColor:un,borderStyle:"solid",borderWidth:Gt,borderRadius:"50%",transition:`all ${At}`},[`${ht}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${ht}-checked`]:{[ot]:{borderColor:Wt,backgroundColor:le?Jt:Wt,"&::after":{transform:`scale(${Vt/Ve})`,opacity:1,transition:`all ${Ye} ${gn}`}}},[`${ht}-disabled`]:{cursor:"not-allowed",[ot]:{backgroundColor:Nt,borderColor:un,cursor:"not-allowed","&::after":{backgroundColor:oe}},[`${ht}-input`]:{cursor:"not-allowed"},[`${ht}-disabled + span`]:{color:ve,cursor:"not-allowed"},[`&${ht}-checked`]:{[ot]:{"&::after":{transform:`scale(${fe/Ve})`}}}},[`span${ht} + *`]:{paddingInlineStart:se,paddingInlineEnd:se}})}},Ze=be=>{const{buttonColor:ht,controlHeight:nn,componentCls:Wt,lineWidth:Ve,lineType:Ye,colorBorder:At,motionDurationSlow:gn,motionDurationMid:Jt,buttonPaddingInline:un,fontSize:Gt,buttonBg:Vt,fontSizeLG:Nt,controlHeightLG:ve,controlHeightSM:se,paddingXS:oe,borderRadius:de,borderRadiusSM:fe,borderRadiusLG:le,buttonCheckedBg:Ie,buttonSolidCheckedColor:ot,colorTextDisabled:Kt,colorBgContainerDisabled:Ft,buttonCheckedBgDisabled:Xt,buttonCheckedColorDisabled:Qt,colorPrimary:on,colorPrimaryHover:pn,colorPrimaryActive:Cn,buttonSolidCheckedBg:bt,buttonSolidCheckedHoverBg:hn,buttonSolidCheckedActiveBg:On}=be;return{[`${Wt}-button-wrapper`]:{position:"relative",display:"inline-block",height:nn,margin:0,paddingInline:un,paddingBlock:0,color:ht,fontSize:Gt,lineHeight:`${nn-Ve*2}px`,background:Vt,border:`${Ve}px ${Ye} ${At}`,borderBlockStartWidth:Ve+.02,borderInlineStartWidth:0,borderInlineEndWidth:Ve,cursor:"pointer",transition:[`color ${Jt}`,`background ${Jt}`,`box-shadow ${Jt}`].join(","),a:{color:ht},[`> ${Wt}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Ve,insetInlineStart:-Ve,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ve,paddingInline:0,backgroundColor:At,transition:`background-color ${gn}`,content:'""'}},"&:first-child":{borderInlineStart:`${Ve}px ${Ye} ${At}`,borderStartStartRadius:de,borderEndStartRadius:de},"&:last-child":{borderStartEndRadius:de,borderEndEndRadius:de},"&:first-child:last-child":{borderRadius:de},[`${Wt}-group-large &`]:{height:ve,fontSize:Nt,lineHeight:`${ve-Ve*2}px`,"&:first-child":{borderStartStartRadius:le,borderEndStartRadius:le},"&:last-child":{borderStartEndRadius:le,borderEndEndRadius:le}},[`${Wt}-group-small &`]:{height:se,paddingInline:oe-Ve,paddingBlock:0,lineHeight:`${se-Ve*2}px`,"&:first-child":{borderStartStartRadius:fe,borderEndStartRadius:fe},"&:last-child":{borderStartEndRadius:fe,borderEndEndRadius:fe}},"&:hover":{position:"relative",color:on},"&:has(:focus-visible)":Object.assign({},(0,st.oN)(be)),[`${Wt}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Wt}-button-wrapper-disabled)`]:{zIndex:1,color:on,background:Ie,borderColor:on,"&::before":{backgroundColor:on},"&:first-child":{borderColor:on},"&:hover":{color:pn,borderColor:pn,"&::before":{backgroundColor:pn}},"&:active":{color:Cn,borderColor:Cn,"&::before":{backgroundColor:Cn}}},[`${Wt}-group-solid &-checked:not(${Wt}-button-wrapper-disabled)`]:{color:ot,background:bt,borderColor:bt,"&:hover":{color:ot,background:hn,borderColor:hn},"&:active":{color:ot,background:On,borderColor:On}},"&-disabled":{color:Kt,backgroundColor:Ft,borderColor:At,cursor:"not-allowed","&:first-child, &:hover":{color:Kt,backgroundColor:Ft,borderColor:At}},[`&-disabled${Wt}-button-wrapper-checked`]:{color:Qt,backgroundColor:Xt,borderColor:At,boxShadow:"none"}}}},Ee=be=>be-4*2;var He=(0,wt.Z)("Radio",be=>{const{controlOutline:ht,controlOutlineWidth:nn,radioSize:Wt}=be,Ve=`0 0 0 ${nn}px ${ht}`,Ye=Ve,At=Ee(Wt),gn=(0,en.TS)(be,{radioDotDisabledSize:At,radioFocusShadow:Ve,radioButtonFocusShadow:Ye});return[it(gn),mt(gn),Ze(gn)]},be=>{const{wireframe:ht,padding:nn,marginXS:Wt,lineWidth:Ve,fontSizeLG:Ye,colorText:At,colorBgContainer:gn,colorTextDisabled:Jt,controlItemBgActiveDisabled:un,colorTextLightSolid:Gt,colorPrimary:Vt,colorPrimaryHover:Nt,colorPrimaryActive:ve}=be,se=4,oe=Ye,de=ht?Ee(oe):oe-(se+Ve)*2;return{radioSize:oe,dotSize:de,dotColorDisabled:Jt,buttonSolidCheckedColor:Gt,buttonSolidCheckedBg:Vt,buttonSolidCheckedHoverBg:Nt,buttonSolidCheckedActiveBg:ve,buttonBg:gn,buttonCheckedBg:gn,buttonColor:At,buttonCheckedBgDisabled:un,buttonCheckedColorDisabled:Jt,buttonPaddingInline:nn-Ve,wrapperMarginInlineEnd:Wt}}),Ue=ue(14088),Ct=ue(4572),Ge=function(be,ht){var nn={};for(var Wt in be)Object.prototype.hasOwnProperty.call(be,Wt)&&ht.indexOf(Wt)<0&&(nn[Wt]=be[Wt]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Wt=Object.getOwnPropertySymbols(be);Ve<Wt.length;Ve++)ht.indexOf(Wt[Ve])<0&&Object.prototype.propertyIsEnumerable.call(be,Wt[Ve])&&(nn[Wt[Ve]]=be[Wt[Ve]]);return nn};const It=(be,ht)=>{var nn,Wt;const Ve=xe.useContext(Ke),Ye=xe.useContext(ct),{getPrefixCls:At,direction:gn,radio:Jt}=xe.useContext(_e.E_),un=xe.useRef(null),Gt=(0,vt.sQ)(ht,un),{isFormItemInput:Vt}=xe.useContext(dt.aM),Nt=Cn=>{var bt,hn;(bt=be.onChange)===null||bt===void 0||bt.call(be,Cn),(hn=Ve==null?void 0:Ve.onChange)===null||hn===void 0||hn.call(Ve,Cn)},{prefixCls:ve,className:se,rootClassName:oe,children:de,style:fe}=be,le=Ge(be,["prefixCls","className","rootClassName","children","style"]),Ie=At("radio",ve),ot=((Ve==null?void 0:Ve.optionType)||Ye)==="button",Kt=ot?`${Ie}-button`:Ie,[Ft,Xt]=He(Ie),Qt=Object.assign({},le),on=xe.useContext(nt.Z);Ve&&(Qt.name=Ve.name,Qt.onChange=Nt,Qt.checked=be.value===Ve.value,Qt.disabled=(nn=Qt.disabled)!==null&&nn!==void 0?nn:Ve.disabled),Qt.disabled=(Wt=Qt.disabled)!==null&&Wt!==void 0?Wt:on;const pn=je()(`${Kt}-wrapper`,{[`${Kt}-wrapper-checked`]:Qt.checked,[`${Kt}-wrapper-disabled`]:Qt.disabled,[`${Kt}-wrapper-rtl`]:gn==="rtl",[`${Kt}-wrapper-in-form-item`]:Vt},Jt==null?void 0:Jt.className,se,oe,Xt);return Ft(xe.createElement(Ue.Z,{component:"Radio",disabled:Qt.disabled},xe.createElement("label",{className:pn,style:Object.assign(Object.assign({},Jt==null?void 0:Jt.style),fe),onMouseEnter:be.onMouseEnter,onMouseLeave:be.onMouseLeave},xe.createElement(We.Z,Object.assign({},Qt,{className:je()(Qt.className,!ot&&Ct.A),type:"radio",prefixCls:Kt,ref:Gt})),de!==void 0?xe.createElement("span",null,de):null)))};var kt=xe.forwardRef(It);const Je=xe.forwardRef((be,ht)=>{const{getPrefixCls:nn,direction:Wt}=xe.useContext(_e.E_),[Ve,Ye]=(0,Fe.Z)(be.defaultValue,{value:be.value}),At=bt=>{const hn=Ve,On=bt.target.value;"value"in be||Ye(On);const{onChange:rt}=be;rt&&On!==hn&&rt(bt)},{prefixCls:gn,className:Jt,rootClassName:un,options:Gt,buttonStyle:Vt="outline",disabled:Nt,children:ve,size:se,style:oe,id:de,onMouseEnter:fe,onMouseLeave:le,onFocus:Ie,onBlur:ot}=be,Kt=nn("radio",gn),Ft=`${Kt}-group`,[Xt,Qt]=He(Kt);let on=ve;Gt&&Gt.length>0&&(on=Gt.map(bt=>typeof bt=="string"||typeof bt=="number"?xe.createElement(kt,{key:bt.toString(),prefixCls:Kt,disabled:Nt,value:bt,checked:Ve===bt},bt):xe.createElement(kt,{key:`radio-group-value-options-${bt.value}`,prefixCls:Kt,disabled:bt.disabled||Nt,value:bt.value,checked:Ve===bt.value,title:bt.title,style:bt.style},bt.label)));const pn=(0,Ae.Z)(se),Cn=je()(Ft,`${Ft}-${Vt}`,{[`${Ft}-${pn}`]:pn,[`${Ft}-rtl`]:Wt==="rtl"},Jt,un,Qt);return Xt(xe.createElement("div",Object.assign({},(0,tt.Z)(be,{aria:!0,data:!0}),{className:Cn,style:oe,onMouseEnter:fe,onMouseLeave:le,onFocus:Ie,onBlur:ot,id:de,ref:ht}),xe.createElement(Me,{value:{onChange:At,value:Ve,disabled:be.disabled,name:be.name,optionType:be.optionType}},on)))});var Ut=xe.memo(Je),ft=function(be,ht){var nn={};for(var Wt in be)Object.prototype.hasOwnProperty.call(be,Wt)&&ht.indexOf(Wt)<0&&(nn[Wt]=be[Wt]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Wt=Object.getOwnPropertySymbols(be);Ve<Wt.length;Ve++)ht.indexOf(Wt[Ve])<0&&Object.prototype.propertyIsEnumerable.call(be,Wt[Ve])&&(nn[Wt[Ve]]=be[Wt[Ve]]);return nn};const Dt=(be,ht)=>{const{getPrefixCls:nn}=xe.useContext(_e.E_),{prefixCls:Wt}=be,Ve=ft(be,["prefixCls"]),Ye=nn("radio",Wt);return xe.createElement(De,{value:"button"},xe.createElement(kt,Object.assign({prefixCls:Ye},Ve,{type:"radio",ref:ht})))};var Et=xe.forwardRef(Dt);const ut=kt;ut.Button=Et,ut.Group=Ut,ut.__ANT_RADIO=!0;var Be=ut},57809:function(Mn,sn,ue){"use strict";var pe=ue(92310),je=ue.n(pe),Fe=ue(77861),tt=ue(2738),xe=ue(59301),_e=ue(53487),Ae=ue(62892),Se=ue(19080),Me=ue(36355),Ke=ue(1684),ct=ue(93891),De=ue(19716),We=ue(32441),vt=ue(33234),nt=ue(14154),dt=ue(58582),st=ue(84443),wt=ue(66339),en=function(He,Ue){var Ct={};for(var Ge in He)Object.prototype.hasOwnProperty.call(He,Ge)&&Ue.indexOf(Ge)<0&&(Ct[Ge]=He[Ge]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,Ge=Object.getOwnPropertySymbols(He);It<Ge.length;It++)Ue.indexOf(Ge[It])<0&&Object.prototype.propertyIsEnumerable.call(He,Ge[It])&&(Ct[Ge[It]]=He[Ge[It]]);return Ct};const it="SECRET_COMBOBOX_MODE_DO_NOT_USE",mt=(He,Ue)=>{var Ct,{prefixCls:Ge,bordered:It=!0,className:et,rootClassName:kt,getPopupContainer:Je,popupClassName:Ut,dropdownClassName:ft,listHeight:Dt=256,placement:Et,listItemHeight:ut=24,size:Be,disabled:be,notFoundContent:ht,status:nn,builtinPlacements:Wt,dropdownMatchSelectWidth:Ve,popupMatchSelectWidth:Ye,direction:At,style:gn,allowClear:Jt}=He,un=en(He,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Gt,getPrefixCls:Vt,renderEmpty:Nt,direction:ve,virtual:se,popupMatchSelectWidth:oe,popupOverflow:de,select:fe}=xe.useContext(Me.E_),le=Vt("select",Ge),Ie=Vt(),ot=At!=null?At:ve,{compactSize:Kt,compactItemClassnames:Ft}=(0,vt.ri)(le,ot),[Xt,Qt]=(0,nt.Z)(le),on=xe.useMemo(()=>{const{mode:Mr}=un;if(Mr!=="combobox")return Mr===it?"combobox":Mr},[un.mode]),pn=on==="multiple"||on==="tags",Cn=(0,st.Z)(un.suffixIcon,un.showArrow),bt=(Ct=Ye!=null?Ye:Ve)!==null&&Ct!==void 0?Ct:oe,{status:hn,hasFeedback:On,isFormItemInput:rt,feedbackIcon:ze}=xe.useContext(We.aM),Xe=(0,Se.F)(hn,nn);let jt;ht!==void 0?jt=ht:on==="combobox"?jt=null:jt=(Nt==null?void 0:Nt("Select"))||xe.createElement(ct.Z,{componentName:"Select"});const{suffixIcon:tn,itemIcon:cn,removeIcon:Dn,clearIcon:Tn}=(0,wt.Z)(Object.assign(Object.assign({},un),{multiple:pn,hasFeedback:On,feedbackIcon:ze,showSuffixIcon:Cn,prefixCls:le,showArrow:un.showArrow,componentName:"Select"})),_n=Jt===!0?{clearIcon:Tn}:Jt,Fn=(0,tt.Z)(un,["suffixIcon","itemIcon"]),jn=je()(Ut||ft,{[`${le}-dropdown-${ot}`]:ot==="rtl"},kt,Qt),An=(0,De.Z)(Mr=>{var rr;return(rr=Be!=null?Be:Kt)!==null&&rr!==void 0?rr:Mr}),hr=xe.useContext(Ke.Z),kr=be!=null?be:hr,Tr=je()({[`${le}-lg`]:An==="large",[`${le}-sm`]:An==="small",[`${le}-rtl`]:ot==="rtl",[`${le}-borderless`]:!It,[`${le}-in-form-item`]:rt},(0,Se.Z)(le,Xe,On),Ft,fe==null?void 0:fe.className,et,kt,Qt),Hr=xe.useMemo(()=>Et!==void 0?Et:ot==="rtl"?"bottomRight":"bottomLeft",[Et,ot]),sr=(0,dt.Z)(Wt,de);return Xt(xe.createElement(Fe.ZP,Object.assign({ref:Ue,virtual:se,showSearch:fe==null?void 0:fe.showSearch},Fn,{style:Object.assign(Object.assign({},fe==null?void 0:fe.style),gn),dropdownMatchSelectWidth:bt,builtinPlacements:sr,transitionName:(0,Ae.m)(Ie,"slide-up",un.transitionName),listHeight:Dt,listItemHeight:ut,mode:on,prefixCls:le,placement:Hr,direction:ot,suffixIcon:tn,menuItemSelectedIcon:cn,removeIcon:Dn,allowClear:_n,notFoundContent:jt,className:Tr,getPopupContainer:Je||Gt,dropdownClassName:jn,disabled:kr})))},Ze=xe.forwardRef(mt),Ee=(0,_e.Z)(Ze);Ze.SECRET_COMBOBOX_MODE_DO_NOT_USE=it,Ze.Option=Fe.Wx,Ze.OptGroup=Fe.Xo,Ze._InternalPanelDoNotUseOrYouWillBeFired=Ee,sn.default=Ze},14154:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Ze}});var pe=ue(17313),je=ue(74207),Fe=ue(37613),tt=ue(83116),xe=ue(13826),_e=ue(92899);const Ae=Ee=>{const{optionHeight:He,optionFontSize:Ue,optionLineHeight:Ct,optionPadding:Ge}=Ee;return{position:"relative",display:"block",minHeight:He,padding:Ge,color:Ee.colorText,fontWeight:"normal",fontSize:Ue,lineHeight:Ct,boxSizing:"border-box"}};var Me=Ee=>{const{antCls:He,componentCls:Ue}=Ee,Ct=`${Ue}-item`,Ge=`&${He}-slide-up-enter${He}-slide-up-enter-active`,It=`&${He}-slide-up-appear${He}-slide-up-appear-active`,et=`&${He}-slide-up-leave${He}-slide-up-leave-active`,kt=`${Ue}-dropdown-placement-`;return[{[`${Ue}-dropdown`]:Object.assign(Object.assign({},(0,pe.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,[`
|
|
|
${Ge}${kt}bottomLeft,
|
|
|
${It}${kt}bottomLeft
|
|
|
`]:{animationName:xe.fJ},[`
|
|
|
${Ge}${kt}topLeft,
|
|
|
${It}${kt}topLeft,
|
|
|
${Ge}${kt}topRight,
|
|
|
${It}${kt}topRight
|
|
|
`]:{animationName:xe.Qt},[`${et}${kt}bottomLeft`]:{animationName:xe.Uw},[`
|
|
|
${et}${kt}topLeft,
|
|
|
${et}${kt}topRight
|
|
|
`]:{animationName:xe.ly},"&-hidden":{display:"none"},[`${Ct}`]:Object.assign(Object.assign({},Ae(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"},pe.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ct}-option-disabled)`]:{backgroundColor:Ee.optionActiveBg},[`&-selected:not(${Ct}-option-disabled)`]:{color:Ee.optionSelectedColor,fontWeight:Ee.optionSelectedFontWeight,backgroundColor:Ee.optionSelectedBg,[`${Ct}-option-state`]:{color:Ee.colorPrimary}},"&-disabled":{[`&${Ct}-option-selected`]:{backgroundColor:Ee.colorBgContainerDisabled},color:Ee.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Ee.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,xe.oN)(Ee,"slide-up"),(0,xe.oN)(Ee,"slide-down"),(0,_e.Fm)(Ee,"move-up"),(0,_e.Fm)(Ee,"move-down")]};const Ke=2,ct=Ee=>{let{controlHeightSM:He,controlHeight:Ue,lineWidth:Ct}=Ee;const Ge=(Ue-He)/2-Ct,It=Math.ceil(Ge/2);return[Ge,It]};function De(Ee,He){const{componentCls:Ue,iconCls:Ct}=Ee,Ge=`${Ue}-selection-overflow`,It=Ee.multipleSelectItemHeight,[et]=ct(Ee),kt=He?`${Ue}-${He}`:"";return{[`${Ue}-multiple${kt}`]:{fontSize:Ee.fontSize,[Ge]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ue}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${et-Ke}px ${Ke*2}px`,borderRadius:Ee.borderRadius,[`${Ue}-show-search&`]:{cursor:"text"},[`${Ue}-disabled&`]:{background:Ee.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ke}px 0`,lineHeight:`${It}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ue}-show-arrow ${Ue}-selector,
|
|
|
&${Ue}-allow-clear ${Ue}-selector
|
|
|
`]:{paddingInlineEnd:Ee.fontSizeIcon+Ee.controlPaddingHorizontal},[`${Ue}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:It,marginTop:Ke,marginBottom:Ke,lineHeight:`${It-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:Ke*2,paddingInlineStart:Ee.paddingXS,paddingInlineEnd:Ee.paddingXS/2,[`${Ue}-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,pe.Ro)()),{display:"inline-flex",alignItems:"center",color:Ee.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Ct}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ee.colorIconHover}})},[`${Ge}-item + ${Ge}-item`]:{[`${Ue}-selection-search`]:{marginInlineStart:0}},[`${Ue}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Ee.inputPaddingHorizontalBase-et,"\n &-input,\n &-mirror\n ":{height:It,fontFamily:Ee.fontFamily,lineHeight:`${It}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"}},[`${Ue}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Ee.inputPaddingHorizontalBase,insetInlineEnd:Ee.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Ee.motionDurationSlow}`}}}}var vt=Ee=>{const{componentCls:He}=Ee,Ue=(0,Fe.TS)(Ee,{controlHeight:Ee.controlHeightSM,multipleSelectItemHeight:Ee.controlHeightXS,borderRadius:Ee.borderRadiusSM,borderRadiusSM:Ee.borderRadiusXS}),Ct=(0,Fe.TS)(Ee,{fontSize:Ee.fontSizeLG,controlHeight:Ee.controlHeightLG,multipleSelectItemHeight:Ee.multipleItemHeightLG,borderRadius:Ee.borderRadiusLG,borderRadiusSM:Ee.borderRadius}),[,Ge]=ct(Ee);return[De(Ee),De(Ue,"sm"),{[`${He}-multiple${He}-sm`]:{[`${He}-selection-placeholder`]:{insetInline:Ee.controlPaddingHorizontalSM-Ee.lineWidth},[`${He}-selection-search`]:{marginInlineStart:Ge}}},De(Ct,"lg")]};function nt(Ee,He){const{componentCls:Ue,inputPaddingHorizontalBase:Ct,borderRadius:Ge}=Ee,It=Ee.controlHeight-Ee.lineWidth*2,et=Math.ceil(Ee.fontSize*1.25),kt=He?`${Ue}-${He}`:"";return{[`${Ue}-single${kt}`]:{fontSize:Ee.fontSize,[`${Ue}-selector`]:Object.assign(Object.assign({},(0,pe.Wf)(Ee)),{display:"flex",borderRadius:Ge,[`${Ue}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Ct,insetInlineEnd:Ct,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ue}-selection-item,
|
|
|
${Ue}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${It}px`,transition:`all ${Ee.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${It}px`}},[`${Ue}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ue}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ue}-selection-item:after`,`${Ue}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ue}-show-arrow ${Ue}-selection-item,
|
|
|
&${Ue}-show-arrow ${Ue}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:et},[`&${Ue}-open ${Ue}-selection-item`]:{color:Ee.colorTextPlaceholder},[`&:not(${Ue}-customize-input)`]:{[`${Ue}-selector`]:{width:"100%",height:Ee.controlHeight,padding:`0 ${Ct}px`,[`${Ue}-selection-search-input`]:{height:It},"&:after":{lineHeight:`${It}px`}}},[`&${Ue}-customize-input`]:{[`${Ue}-selector`]:{"&:after":{display:"none"},[`${Ue}-selection-search`]:{position:"static",width:"100%"},[`${Ue}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Ct}px`,"&:after":{display:"none"}}}}}}}function dt(Ee){const{componentCls:He}=Ee,Ue=Ee.controlPaddingHorizontalSM-Ee.lineWidth;return[nt(Ee),nt((0,Fe.TS)(Ee,{controlHeight:Ee.controlHeightSM,borderRadius:Ee.borderRadiusSM}),"sm"),{[`${He}-single${He}-sm`]:{[`&:not(${He}-customize-input)`]:{[`${He}-selection-search`]:{insetInlineStart:Ue,insetInlineEnd:Ue},[`${He}-selector`]:{padding:`0 ${Ue}px`},[`&${He}-show-arrow ${He}-selection-search`]:{insetInlineEnd:Ue+Ee.fontSize*1.5},[`
|
|
|
&${He}-show-arrow ${He}-selection-item,
|
|
|
&${He}-show-arrow ${He}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ee.fontSize*1.5}}}},nt((0,Fe.TS)(Ee,{controlHeight:Ee.singleItemHeightLG,fontSize:Ee.fontSizeLG,borderRadius:Ee.borderRadiusLG}),"lg")]}const st=Ee=>{const{componentCls:He,selectorBg:Ue}=Ee;return{position:"relative",backgroundColor:Ue,border:`${Ee.lineWidth}px ${Ee.lineType} ${Ee.colorBorder}`,transition:`all ${Ee.motionDurationMid} ${Ee.motionEaseInOut}`,input:{cursor:"pointer"},[`${He}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${He}-disabled&`]:{color:Ee.colorTextDisabled,background:Ee.colorBgContainerDisabled,cursor:"not-allowed",[`${He}-multiple&`]:{background:Ee.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},wt=function(Ee,He){let Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Ct,borderHoverColor:Ge,outlineColor:It,antCls:et}=He,kt=Ue?{[`${Ct}-selector`]:{borderColor:Ge}}:{};return{[Ee]:{[`&:not(${Ct}-disabled):not(${Ct}-customize-input):not(${et}-pagination-size-changer)`]:Object.assign(Object.assign({},kt),{[`${Ct}-focused& ${Ct}-selector`]:{borderColor:Ge,boxShadow:`0 0 0 ${He.controlOutlineWidth}px ${It}`,outline:0},[`&:hover ${Ct}-selector`]:{borderColor:Ge}})}}},en=Ee=>{const{componentCls:He}=Ee;return{[`${He}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},it=Ee=>{const{componentCls:He,inputPaddingHorizontalBase:Ue,iconCls:Ct}=Ee;return{[He]:Object.assign(Object.assign({},(0,pe.Wf)(Ee)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${He}-customize-input) ${He}-selector`]:Object.assign(Object.assign({},st(Ee)),en(Ee)),[`${He}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},pe.vS),[`${He}-selection-placeholder`]:Object.assign(Object.assign({},pe.vS),{flex:1,color:Ee.colorTextPlaceholder,pointerEvents:"none"}),[`${He}-arrow`]:Object.assign(Object.assign({},(0,pe.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ue,height:Ee.fontSizeIcon,marginTop:-Ee.fontSizeIcon/2,color:Ee.colorTextQuaternary,fontSize:Ee.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Ct]:{verticalAlign:"top",transition:`transform ${Ee.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${He}-suffix)`]:{pointerEvents:"auto"}},[`${He}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${He}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ue,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":{[`${He}-clear`]:{opacity:1}}}),[`${He}-has-feedback`]:{[`${He}-clear`]:{insetInlineEnd:Ue+Ee.fontSize+Ee.paddingXS}}}},mt=Ee=>{const{componentCls:He}=Ee;return[{[He]:{[`&-borderless ${He}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${He}-in-form-item`]:{width:"100%"}}},it(Ee),dt(Ee),vt(Ee),Me(Ee),{[`${He}-rtl`]:{direction:"rtl"}},wt(He,(0,Fe.TS)(Ee,{borderHoverColor:Ee.colorPrimaryHover,outlineColor:Ee.controlOutline})),wt(`${He}-status-error`,(0,Fe.TS)(Ee,{borderHoverColor:Ee.colorErrorHover,outlineColor:Ee.colorErrorOutline}),!0),wt(`${He}-status-warning`,(0,Fe.TS)(Ee,{borderHoverColor:Ee.colorWarningHover,outlineColor:Ee.colorWarningOutline}),!0),(0,je.c)(Ee,{borderElCls:`${He}-selector`,focusElCls:`${He}-focused`})]};var Ze=(0,tt.Z)("Select",(Ee,He)=>{let{rootPrefixCls:Ue}=He;const Ct=(0,Fe.TS)(Ee,{rootPrefixCls:Ue,inputPaddingHorizontalBase:Ee.paddingSM-1,multipleSelectItemHeight:Ee.multipleItemHeight});return[mt(Ct)]},Ee=>{const{fontSize:He,lineHeight:Ue,controlHeight:Ct,controlPaddingHorizontal:Ge,zIndexPopupBase:It,colorText:et,fontWeightStrong:kt,controlItemBgActive:Je,controlItemBgHover:Ut,colorBgContainer:ft,colorFillSecondary:Dt,controlHeightLG:Et,controlHeightSM:ut,colorBgContainerDisabled:Be,colorTextDisabled:be}=Ee;return{zIndexPopup:It+50,optionSelectedColor:et,optionSelectedFontWeight:kt,optionSelectedBg:Je,optionActiveBg:Ut,optionPadding:`${(Ct-He*Ue)/2}px ${Ge}px`,optionFontSize:He,optionLineHeight:Ue,optionHeight:Ct,selectorBg:ft,clearBg:ft,singleItemHeightLG:Et,multipleItemBg:Dt,multipleItemBorderColor:"transparent",multipleItemHeight:ut,multipleItemHeightLG:Ct,multipleSelectorBgDisabled:Be,multipleItemColorDisabled:be,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return je}});const pe=Fe=>{const xe={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Fe==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},xe),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},xe),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},xe),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},xe),{points:["br","tr"],offset:[0,-4]})}};function je(Fe,tt){return Fe||pe(tt)}},84443:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return pe}});function pe(je,Fe){return Fe!==void 0?Fe:je!==null}},66339:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});var pe=ue(40001),je=ue(19248),Fe=ue(99267),tt=ue(84105),xe=ue(58617),_e=ue(47472),Ae=ue(59301);function Se(Me){let{suffixIcon:Ke,clearIcon:ct,menuItemSelectedIcon:De,removeIcon:We,loading:vt,multiple:nt,hasFeedback:dt,prefixCls:st,showSuffixIcon:wt,feedbackIcon:en,showArrow:it,componentName:mt}=Me;const Ze=ct!=null?ct:Ae.createElement(je.Z,null),Ee=Ge=>Ke===null&&!dt&&!it?null:Ae.createElement(Ae.Fragment,null,wt!==!1&&Ge,dt&&en);let He=null;if(Ke!==void 0)He=Ee(Ke);else if(vt)He=Ee(Ae.createElement(xe.Z,{spin:!0}));else{const Ge=`${st}-suffix`;He=It=>{let{open:et,showSearch:kt}=It;return Ee(et&&kt?Ae.createElement(_e.Z,{className:Ge}):Ae.createElement(tt.Z,{className:Ge}))}}let Ue=null;De!==void 0?Ue=De:nt?Ue=Ae.createElement(pe.Z,null):Ue=null;let Ct=null;return We!==void 0?Ct=We:Ct=Ae.createElement(Fe.Z,null),{clearIcon:Ze,suffixIcon:He,itemIcon:Ue,removeIcon:Ct}}},8378:function(Mn,sn){"use strict";const ue=pe=>({[pe.componentCls]:{[`${pe.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${pe.motionDurationMid} ${pe.motionEaseInOut},
|
|
|
opacity ${pe.motionDurationMid} ${pe.motionEaseInOut} !important`}},[`${pe.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${pe.motionDurationMid} ${pe.motionEaseInOut},
|
|
|
opacity ${pe.motionDurationMid} ${pe.motionEaseInOut} !important`}}});sn.Z=ue},92899:function(Mn,sn,ue){"use strict";ue.d(sn,{Fm:function(){return De}});var pe=ue(36237),je=ue(95406);const Fe=new pe.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),tt=new pe.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),xe=new pe.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_e=new pe.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Ae=new pe.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Se=new pe.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 pe.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ke=new pe.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),ct={"move-up":{inKeyframes:Me,outKeyframes:Ke},"move-down":{inKeyframes:Fe,outKeyframes:tt},"move-left":{inKeyframes:xe,outKeyframes:_e},"move-right":{inKeyframes:Ae,outKeyframes:Se}},De=(We,vt)=>{const{antCls:nt}=We,dt=`${nt}-${vt}`,{inKeyframes:st,outKeyframes:wt}=ct[vt];return[(0,je.R)(dt,st,wt,We.motionDurationMid),{[`
|
|
|
${dt}-enter,
|
|
|
${dt}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:We.motionEaseOutCirc},[`${dt}-leave`]:{animationTimingFunction:We.motionEaseInOutCirc}}]}},13826:function(Mn,sn,ue){"use strict";ue.d(sn,{Qt:function(){return xe},Uw:function(){return tt},fJ:function(){return Fe},ly:function(){return _e},oN:function(){return De}});var pe=ue(36237),je=ue(95406);const Fe=new pe.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),tt=new pe.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),xe=new pe.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),_e=new pe.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Ae=new pe.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Se=new pe.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Me=new pe.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Ke=new pe.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ct={"slide-up":{inKeyframes:Fe,outKeyframes:tt},"slide-down":{inKeyframes:xe,outKeyframes:_e},"slide-left":{inKeyframes:Ae,outKeyframes:Se},"slide-right":{inKeyframes:Me,outKeyframes:Ke}},De=(We,vt)=>{const{antCls:nt}=We,dt=`${nt}-${vt}`,{inKeyframes:st,outKeyframes:wt}=ct[vt];return[(0,je.R)(dt,st,wt,We.motionDurationMid),{[`
|
|
|
${dt}-enter,
|
|
|
${dt}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:We.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${dt}-leave`]:{animationTimingFunction:We.motionEaseInQuint}}]}},78673:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return kt}});var pe=ue(58617),je=ue(92310),Fe=ue.n(je),tt=ue(54476),xe=ue(20068),_e=ue(42978),Ae=ue(75931),Se=ue(59301),Me=ue(18929),Ke=ue(10228),ct=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],De=Se.forwardRef(function(Je,Ut){var ft,Dt=Je.prefixCls,Et=Dt===void 0?"rc-switch":Dt,ut=Je.className,Be=Je.checked,be=Je.defaultChecked,ht=Je.disabled,nn=Je.loadingIcon,Wt=Je.checkedChildren,Ve=Je.unCheckedChildren,Ye=Je.onClick,At=Je.onChange,gn=Je.onKeyDown,Jt=(0,Ae.Z)(Je,ct),un=(0,Me.Z)(!1,{value:Be,defaultValue:be}),Gt=(0,_e.Z)(un,2),Vt=Gt[0],Nt=Gt[1];function ve(fe,le){var Ie=Vt;return ht||(Ie=fe,Nt(Ie),At==null||At(Ie,le)),Ie}function se(fe){fe.which===Ke.Z.LEFT?ve(!1,fe):fe.which===Ke.Z.RIGHT&&ve(!0,fe),gn==null||gn(fe)}function oe(fe){var le=ve(!Vt,fe);Ye==null||Ye(le,fe)}var de=Fe()(Et,ut,(ft={},(0,xe.Z)(ft,"".concat(Et,"-checked"),Vt),(0,xe.Z)(ft,"".concat(Et,"-disabled"),ht),ft));return Se.createElement("button",(0,tt.Z)({},Jt,{type:"button",role:"switch","aria-checked":Vt,disabled:ht,className:de,ref:Ut,onKeyDown:se,onClick:oe}),nn,Se.createElement("span",{className:"".concat(Et,"-inner")},Se.createElement("span",{className:"".concat(Et,"-inner-checked")},Wt),Se.createElement("span",{className:"".concat(Et,"-inner-unchecked")},Ve)))});De.displayName="Switch";var We=De,vt=ue(14088),nt=ue(36355),dt=ue(1684),st=ue(19716),wt=ue(64993),en=ue(17313),it=ue(83116),mt=ue(37613);const Ze=Je=>{const{componentCls:Ut,trackHeightSM:ft,trackPadding:Dt,trackMinWidthSM:Et,innerMinMarginSM:ut,innerMaxMarginSM:Be,handleSizeSM:be}=Je,ht=`${Ut}-inner`;return{[Ut]:{[`&${Ut}-small`]:{minWidth:Et,height:ft,lineHeight:`${ft}px`,[`${Ut}-inner`]:{paddingInlineStart:Be,paddingInlineEnd:ut,[`${ht}-checked`]:{marginInlineStart:`calc(-100% + ${be+Dt*2}px - ${Be*2}px)`,marginInlineEnd:`calc(100% - ${be+Dt*2}px + ${Be*2}px)`},[`${ht}-unchecked`]:{marginTop:-ft,marginInlineStart:0,marginInlineEnd:0}},[`${Ut}-handle`]:{width:be,height:be},[`${Ut}-loading-icon`]:{top:(be-Je.switchLoadingIconSize)/2,fontSize:Je.switchLoadingIconSize},[`&${Ut}-checked`]:{[`${Ut}-inner`]:{paddingInlineStart:ut,paddingInlineEnd:Be,[`${ht}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ht}-unchecked`]:{marginInlineStart:`calc(100% - ${be+Dt*2}px + ${Be*2}px)`,marginInlineEnd:`calc(-100% + ${be+Dt*2}px - ${Be*2}px)`}},[`${Ut}-handle`]:{insetInlineStart:`calc(100% - ${be+Dt}px)`}},[`&:not(${Ut}-disabled):active`]:{[`&:not(${Ut}-checked) ${ht}`]:{[`${ht}-unchecked`]:{marginInlineStart:Je.marginXXS/2,marginInlineEnd:-Je.marginXXS/2}},[`&${Ut}-checked ${ht}`]:{[`${ht}-checked`]:{marginInlineStart:-Je.marginXXS/2,marginInlineEnd:Je.marginXXS/2}}}}}}},Ee=Je=>{const{componentCls:Ut,handleSize:ft}=Je;return{[Ut]:{[`${Ut}-loading-icon${Je.iconCls}`]:{position:"relative",top:(ft-Je.fontSize)/2,color:Je.switchLoadingIconColor,verticalAlign:"top"},[`&${Ut}-checked ${Ut}-loading-icon`]:{color:Je.switchColor}}}},He=Je=>{const{componentCls:Ut,motion:ft,trackPadding:Dt,handleBg:Et,handleShadow:ut,handleSize:Be}=Je,be=`${Ut}-handle`;return{[Ut]:{[be]:{position:"absolute",top:Dt,insetInlineStart:Dt,width:Be,height:Be,transition:`all ${Je.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Et,borderRadius:Be/2,boxShadow:ut,transition:`all ${Je.switchDuration} ease-in-out`,content:'""'}},[`&${Ut}-checked ${be}`]:{insetInlineStart:`calc(100% - ${Be+Dt}px)`},[`&:not(${Ut}-disabled):active`]:ft?{[`${be}::before`]:{insetInlineEnd:Je.switchHandleActiveInset,insetInlineStart:0},[`&${Ut}-checked ${be}::before`]:{insetInlineEnd:0,insetInlineStart:Je.switchHandleActiveInset}}:{}}}},Ue=Je=>{const{componentCls:Ut,trackHeight:ft,trackPadding:Dt,innerMinMargin:Et,innerMaxMargin:ut,handleSize:Be}=Je,be=`${Ut}-inner`;return{[Ut]:{[be]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:ut,paddingInlineEnd:Et,transition:`padding-inline-start ${Je.switchDuration} ease-in-out, padding-inline-end ${Je.switchDuration} ease-in-out`,[`${be}-checked, ${be}-unchecked`]:{display:"block",color:Je.colorTextLightSolid,fontSize:Je.fontSizeSM,transition:`margin-inline-start ${Je.switchDuration} ease-in-out, margin-inline-end ${Je.switchDuration} ease-in-out`,pointerEvents:"none"},[`${be}-checked`]:{marginInlineStart:`calc(-100% + ${Be+Dt*2}px - ${ut*2}px)`,marginInlineEnd:`calc(100% - ${Be+Dt*2}px + ${ut*2}px)`},[`${be}-unchecked`]:{marginTop:-ft,marginInlineStart:0,marginInlineEnd:0}},[`&${Ut}-checked ${be}`]:{paddingInlineStart:Et,paddingInlineEnd:ut,[`${be}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${be}-unchecked`]:{marginInlineStart:`calc(100% - ${Be+Dt*2}px + ${ut*2}px)`,marginInlineEnd:`calc(-100% + ${Be+Dt*2}px - ${ut*2}px)`}},[`&:not(${Ut}-disabled):active`]:{[`&:not(${Ut}-checked) ${be}`]:{[`${be}-unchecked`]:{marginInlineStart:Dt*2,marginInlineEnd:-Dt*2}},[`&${Ut}-checked ${be}`]:{[`${be}-checked`]:{marginInlineStart:-Dt*2,marginInlineEnd:Dt*2}}}}}},Ct=Je=>{const{componentCls:Ut,trackHeight:ft,trackMinWidth:Dt}=Je;return{[Ut]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,en.Wf)(Je)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Dt,height:ft,lineHeight:`${ft}px`,verticalAlign:"middle",background:Je.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Je.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ut}-disabled)`]:{background:Je.colorTextTertiary}}),(0,en.Qy)(Je)),{[`&${Ut}-checked`]:{background:Je.switchColor,[`&:hover:not(${Ut}-disabled)`]:{background:Je.colorPrimaryHover}},[`&${Ut}-loading, &${Ut}-disabled`]:{cursor:"not-allowed",opacity:Je.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ut}-rtl`]:{direction:"rtl"}})}};var Ge=(0,it.Z)("Switch",Je=>{const Ut=(0,mt.TS)(Je,{switchDuration:Je.motionDurationMid,switchColor:Je.colorPrimary,switchDisabledOpacity:Je.opacityLoading,switchLoadingIconSize:Je.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${Je.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Ct(Ut),Ue(Ut),He(Ut),Ee(Ut),Ze(Ut)]},Je=>{const{fontSize:Ut,lineHeight:ft,controlHeight:Dt,colorWhite:Et}=Je,ut=Ut*ft,Be=Dt/2,be=2,ht=ut-be*2,nn=Be-be*2;return{trackHeight:ut,trackHeightSM:Be,trackMinWidth:ht*2+be*4,trackMinWidthSM:nn*2+be*2,trackPadding:be,handleBg:Et,handleSize:ht,handleSizeSM:nn,handleShadow:`0 2px 4px 0 ${new wt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ht/2,innerMaxMargin:ht+be+be*2,innerMinMarginSM:nn/2,innerMaxMarginSM:nn+be+be*2}}),It=function(Je,Ut){var ft={};for(var Dt in Je)Object.prototype.hasOwnProperty.call(Je,Dt)&&Ut.indexOf(Dt)<0&&(ft[Dt]=Je[Dt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Dt=Object.getOwnPropertySymbols(Je);Et<Dt.length;Et++)Ut.indexOf(Dt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Je,Dt[Et])&&(ft[Dt[Et]]=Je[Dt[Et]]);return ft};const et=Se.forwardRef((Je,Ut)=>{const{prefixCls:ft,size:Dt,disabled:Et,loading:ut,className:Be,rootClassName:be,style:ht}=Je,nn=It(Je,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Wt,direction:Ve,switch:Ye}=Se.useContext(nt.E_),At=Se.useContext(dt.Z),gn=(Et!=null?Et:At)||ut,Jt=Wt("switch",ft),un=Se.createElement("div",{className:`${Jt}-handle`},ut&&Se.createElement(pe.Z,{className:`${Jt}-loading-icon`})),[Gt,Vt]=Ge(Jt),Nt=(0,st.Z)(Dt),ve=Fe()(Ye==null?void 0:Ye.className,{[`${Jt}-small`]:Nt==="small",[`${Jt}-loading`]:ut,[`${Jt}-rtl`]:Ve==="rtl"},Be,be,Vt),se=Object.assign(Object.assign({},Ye==null?void 0:Ye.style),ht);return Gt(Se.createElement(vt.Z,{component:"Switch"},Se.createElement(We,Object.assign({},nn,{prefixCls:Jt,className:ve,style:se,disabled:gn,ref:Ut,loadingIcon:un}))))});et.__ANT_SWITCH=!0;var kt=et},99313:function(Mn,sn,ue){"use strict";ue.d(sn,{default:function(){return lt}});var pe=ue(99267),je=ue(18785),Fe=ue(62772),tt=ue(92310),xe=ue.n(tt),_e=ue(54476),Ae=ue(20068),Se=ue(33885),Me=ue(42978),Ke=ue(76190),ct=ue(75931),De=ue(59301),We=ue(49658),vt=ue(18929),nt=ue(77900),dt=(0,De.createContext)(null),st=De.forwardRef(function(ke,Oe){var Te=ke.prefixCls,Pe=ke.className,Qe=ke.style,pt=ke.id,Yt=ke.active,$t=ke.tabKey,qt=ke.children;return De.createElement("div",{id:pt&&"".concat(pt,"-panel-").concat($t),role:"tabpanel",tabIndex:Yt?0:-1,"aria-labelledby":pt&&"".concat(pt,"-tab-").concat($t),"aria-hidden":!Yt,style:Qe,className:xe()(Te,Yt&&"".concat(Te,"-active"),Pe),ref:Oe},qt)}),wt=st,en=["key","forceRender","style","className"];function it(ke){var Oe=ke.id,Te=ke.activeKey,Pe=ke.animated,Qe=ke.tabPosition,pt=ke.destroyInactiveTabPane,Yt=De.useContext(dt),$t=Yt.prefixCls,qt=Yt.tabs,vn=Pe.tabPane,wn="".concat($t,"-tabpane");return De.createElement("div",{className:xe()("".concat($t,"-content-holder"))},De.createElement("div",{className:xe()("".concat($t,"-content"),"".concat($t,"-content-").concat(Qe),(0,Ae.Z)({},"".concat($t,"-content-animated"),vn))},qt.map(function(Sn){var Bt=Sn.key,dn=Sn.forceRender,at=Sn.style,Mt=Sn.className,Pt=(0,ct.Z)(Sn,en),Rt=Bt===Te;return De.createElement(nt.default,(0,_e.Z)({key:Bt,visible:Rt,forceRender:dn,removeOnLeave:!!pt,leavedClassName:"".concat(wn,"-hidden")},Pe.tabPaneMotion),function(an,Tt){var rn=an.style,$e=an.className;return De.createElement(wt,(0,_e.Z)({},Pt,{prefixCls:wn,id:Oe,tabKey:Bt,animated:vn,active:Rt,style:(0,Se.Z)((0,Se.Z)({},at),rn),className:xe()(Mt,$e),ref:Tt}))})})))}var mt=ue(94480),Ze=ue(29301),Ee=ue(6089),He=ue(8654),Ue={width:0,height:0,left:0,top:0};function Ct(ke,Oe,Te){return(0,De.useMemo)(function(){for(var Pe,Qe=new Map,pt=Oe.get((Pe=ke[0])===null||Pe===void 0?void 0:Pe.key)||Ue,Yt=pt.left+pt.width,$t=0;$t<ke.length;$t+=1){var qt=ke[$t].key,vn=Oe.get(qt);if(!vn){var wn;vn=Oe.get((wn=ke[$t-1])===null||wn===void 0?void 0:wn.key)||Ue}var Sn=Qe.get(qt)||(0,Se.Z)({},vn);Sn.right=Yt-Sn.left-Sn.width,Qe.set(qt,Sn)}return Qe},[ke.map(function(Pe){return Pe.key}).join("_"),Oe,Te])}function Ge(ke,Oe){var Te=De.useRef(ke),Pe=De.useState({}),Qe=(0,Me.Z)(Pe,2),pt=Qe[1];function Yt($t){var qt=typeof $t=="function"?$t(Te.current):$t;qt!==Te.current&&Oe(qt,Te.current),Te.current=qt,pt({})}return[Te.current,Yt]}var It=.1,et=.01,kt=20,Je=Math.pow(.995,kt);function Ut(ke,Oe){var Te=(0,De.useState)(),Pe=(0,Me.Z)(Te,2),Qe=Pe[0],pt=Pe[1],Yt=(0,De.useState)(0),$t=(0,Me.Z)(Yt,2),qt=$t[0],vn=$t[1],wn=(0,De.useState)(0),Sn=(0,Me.Z)(wn,2),Bt=Sn[0],dn=Sn[1],at=(0,De.useState)(),Mt=(0,Me.Z)(at,2),Pt=Mt[0],Rt=Mt[1],an=(0,De.useRef)();function Tt(Ot){var Ht=Ot.touches[0],Zt=Ht.screenX,mn=Ht.screenY;pt({x:Zt,y:mn}),window.clearInterval(an.current)}function rn(Ot){if(Qe){Ot.preventDefault();var Ht=Ot.touches[0],Zt=Ht.screenX,mn=Ht.screenY;pt({x:Zt,y:mn});var xn=Zt-Qe.x,Ln=mn-Qe.y;Oe(xn,Ln);var zn=Date.now();vn(zn),dn(zn-qt),Rt({x:xn,y:Ln})}}function $e(){if(Qe&&(pt(null),Rt(null),Pt)){var Ot=Pt.x/Bt,Ht=Pt.y/Bt,Zt=Math.abs(Ot),mn=Math.abs(Ht);if(Math.max(Zt,mn)<It)return;var xn=Ot,Ln=Ht;an.current=window.setInterval(function(){if(Math.abs(xn)<et&&Math.abs(Ln)<et){window.clearInterval(an.current);return}xn*=Je,Ln*=Je,Oe(xn*kt,Ln*kt)},kt)}}var xt=(0,De.useRef)();function St(Ot){var Ht=Ot.deltaX,Zt=Ot.deltaY,mn=0,xn=Math.abs(Ht),Ln=Math.abs(Zt);xn===Ln?mn=xt.current==="x"?Ht:Zt:xn>Ln?(mn=Ht,xt.current="x"):(mn=Zt,xt.current="y"),Oe(-mn,-mn)&&Ot.preventDefault()}var zt=(0,De.useRef)(null);zt.current={onTouchStart:Tt,onTouchMove:rn,onTouchEnd:$e,onWheel:St},De.useEffect(function(){function Ot(xn){zt.current.onTouchStart(xn)}function Ht(xn){zt.current.onTouchMove(xn)}function Zt(xn){zt.current.onTouchEnd(xn)}function mn(xn){zt.current.onWheel(xn)}return document.addEventListener("touchmove",Ht,{passive:!1}),document.addEventListener("touchend",Zt,{passive:!1}),ke.current.addEventListener("touchstart",Ot,{passive:!1}),ke.current.addEventListener("wheel",mn),function(){document.removeEventListener("touchmove",Ht),document.removeEventListener("touchend",Zt)}},[])}var ft=ue(34280);function Dt(ke){var Oe=(0,De.useState)(0),Te=(0,Me.Z)(Oe,2),Pe=Te[0],Qe=Te[1],pt=(0,De.useRef)(0),Yt=(0,De.useRef)();return Yt.current=ke,(0,ft.o)(function(){var $t;($t=Yt.current)===null||$t===void 0||$t.call(Yt)},[Pe]),function(){pt.current===Pe&&(pt.current+=1,Qe(pt.current))}}function Et(ke){var Oe=(0,De.useRef)([]),Te=(0,De.useState)({}),Pe=(0,Me.Z)(Te,2),Qe=Pe[1],pt=(0,De.useRef)(typeof ke=="function"?ke():ke),Yt=Dt(function(){var qt=pt.current;Oe.current.forEach(function(vn){qt=vn(qt)}),Oe.current=[],pt.current=qt,Qe({})});function $t(qt){Oe.current.push(qt),Yt()}return[pt.current,$t]}var ut={width:0,height:0,left:0,top:0,right:0};function Be(ke,Oe,Te,Pe,Qe,pt,Yt){var $t=Yt.tabs,qt=Yt.tabPosition,vn=Yt.rtl,wn,Sn,Bt;return["top","bottom"].includes(qt)?(wn="width",Sn=vn?"right":"left",Bt=Math.abs(Te)):(wn="height",Sn="top",Bt=-Te),(0,De.useMemo)(function(){if(!$t.length)return[0,0];for(var dn=$t.length,at=dn,Mt=0;Mt<dn;Mt+=1){var Pt=ke.get($t[Mt].key)||ut;if(Pt[Sn]+Pt[wn]>Bt+Oe){at=Mt-1;break}}for(var Rt=0,an=dn-1;an>=0;an-=1){var Tt=ke.get($t[an].key)||ut;if(Tt[Sn]<Bt){Rt=an+1;break}}return Rt>=at?[0,0]:[Rt,at]},[ke,Oe,Pe,Qe,pt,Bt,qt,$t.map(function(dn){return dn.key}).join("_"),vn])}function be(ke){var Oe;return ke instanceof Map?(Oe={},ke.forEach(function(Te,Pe){Oe[Pe]=Te})):Oe=ke,JSON.stringify(Oe)}var ht="TABS_DQ";function nn(ke){return String(ke).replace(/"/g,ht)}function Wt(ke,Oe,Te,Pe){return!(!Te||Pe||ke===!1||ke===void 0&&(Oe===!1||Oe===null))}function Ve(ke,Oe){var Te=ke.prefixCls,Pe=ke.editable,Qe=ke.locale,pt=ke.style;return!Pe||Pe.showAdd===!1?null:De.createElement("button",{ref:Oe,type:"button",className:"".concat(Te,"-nav-add"),style:pt,"aria-label":(Qe==null?void 0:Qe.addAriaLabel)||"Add tab",onClick:function($t){Pe.onEdit("add",{event:$t})}},Pe.addIcon||"+")}var Ye=De.forwardRef(Ve),At=De.forwardRef(function(ke,Oe){var Te=ke.position,Pe=ke.prefixCls,Qe=ke.extra;if(!Qe)return null;var pt,Yt={};return(0,Ke.Z)(Qe)==="object"&&!De.isValidElement(Qe)?Yt=Qe:Yt.right=Qe,Te==="right"&&(pt=Yt.right),Te==="left"&&(pt=Yt.left),pt?De.createElement("div",{className:"".concat(Pe,"-extra-content"),ref:Oe},pt):null}),gn=At,Jt=ue(31561),un=ue(15285),Gt=ue(10228);function Vt(ke,Oe){var Te=ke.prefixCls,Pe=ke.id,Qe=ke.tabs,pt=ke.locale,Yt=ke.mobile,$t=ke.moreIcon,qt=$t===void 0?"More":$t,vn=ke.moreTransitionName,wn=ke.style,Sn=ke.className,Bt=ke.editable,dn=ke.tabBarGutter,at=ke.rtl,Mt=ke.removeAriaLabel,Pt=ke.onTabClick,Rt=ke.getPopupContainer,an=ke.popupClassName,Tt=(0,De.useState)(!1),rn=(0,Me.Z)(Tt,2),$e=rn[0],xt=rn[1],St=(0,De.useState)(null),zt=(0,Me.Z)(St,2),Ot=zt[0],Ht=zt[1],Zt="".concat(Pe,"-more-popup"),mn="".concat(Te,"-dropdown"),xn=Ot!==null?"".concat(Zt,"-").concat(Ot):null,Ln=pt==null?void 0:pt.dropdownAriaLabel;function zn(yr,Gn){yr.preventDefault(),yr.stopPropagation(),Bt.onEdit("remove",{key:Gn,event:yr})}var er=De.createElement(un.ZP,{onClick:function(Gn){var Xn=Gn.key,br=Gn.domEvent;Pt(Xn,br),xt(!1)},prefixCls:"".concat(mn,"-menu"),id:Zt,tabIndex:-1,role:"listbox","aria-activedescendant":xn,selectedKeys:[Ot],"aria-label":Ln!==void 0?Ln:"expanded dropdown"},Qe.map(function(yr){var Gn=yr.closable,Xn=yr.disabled,br=yr.closeIcon,ur=yr.key,Br=yr.label,Gr=Wt(Gn,br,Bt,Xn);return De.createElement(un.sN,{key:ur,id:"".concat(Zt,"-").concat(ur),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(ur),disabled:Xn},De.createElement("span",null,Br),Gr&&De.createElement("button",{type:"button","aria-label":Mt||"remove",tabIndex:0,className:"".concat(mn,"-menu-item-remove"),onClick:function(kn){kn.stopPropagation(),zn(kn,ur)}},br||Bt.removeIcon||"\xD7"))}));function cr(yr){for(var Gn=Qe.filter(function(Gr){return!Gr.disabled}),Xn=Gn.findIndex(function(Gr){return Gr.key===Ot})||0,br=Gn.length,ur=0;ur<br;ur+=1){Xn=(Xn+yr+br)%br;var Br=Gn[Xn];if(!Br.disabled){Ht(Br.key);return}}}function Un(yr){var Gn=yr.which;if(!$e){[Gt.Z.DOWN,Gt.Z.SPACE,Gt.Z.ENTER].includes(Gn)&&(xt(!0),yr.preventDefault());return}switch(Gn){case Gt.Z.UP:cr(-1),yr.preventDefault();break;case Gt.Z.DOWN:cr(1),yr.preventDefault();break;case Gt.Z.ESC:xt(!1);break;case Gt.Z.SPACE:case Gt.Z.ENTER:Ot!==null&&Pt(Ot,yr);break}}(0,De.useEffect)(function(){var yr=document.getElementById(xn);yr&&yr.scrollIntoView&&yr.scrollIntoView(!1)},[Ot]),(0,De.useEffect)(function(){$e||Ht(null)},[$e]);var In=(0,Ae.Z)({},at?"marginRight":"marginLeft",dn);Qe.length||(In.visibility="hidden",In.order=1);var fr=xe()((0,Ae.Z)({},"".concat(mn,"-rtl"),at)),tr=Yt?null:De.createElement(Jt.Z,{prefixCls:mn,overlay:er,trigger:["hover"],visible:Qe.length?$e:!1,transitionName:vn,onVisibleChange:xt,overlayClassName:xe()(fr,an),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Rt},De.createElement("button",{type:"button",className:"".concat(Te,"-nav-more"),style:In,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Zt,id:"".concat(Pe,"-more"),"aria-expanded":$e,onKeyDown:Un},qt));return De.createElement("div",{className:xe()("".concat(Te,"-nav-operations"),Sn),style:wn,ref:Oe},tr,De.createElement(Ye,{prefixCls:Te,locale:pt,editable:Bt}))}var Nt=De.memo(De.forwardRef(Vt),function(ke,Oe){return Oe.tabMoving});function ve(ke){var Oe,Te=ke.prefixCls,Pe=ke.id,Qe=ke.active,pt=ke.tab,Yt=pt.key,$t=pt.label,qt=pt.disabled,vn=pt.closeIcon,wn=ke.closable,Sn=ke.renderWrapper,Bt=ke.removeAriaLabel,dn=ke.editable,at=ke.onClick,Mt=ke.onFocus,Pt=ke.style,Rt="".concat(Te,"-tab"),an=Wt(wn,vn,dn,qt);function Tt(xt){qt||at(xt)}function rn(xt){xt.preventDefault(),xt.stopPropagation(),dn.onEdit("remove",{key:Yt,event:xt})}var $e=De.createElement("div",{key:Yt,"data-node-key":nn(Yt),className:xe()(Rt,(Oe={},(0,Ae.Z)(Oe,"".concat(Rt,"-with-remove"),an),(0,Ae.Z)(Oe,"".concat(Rt,"-active"),Qe),(0,Ae.Z)(Oe,"".concat(Rt,"-disabled"),qt),Oe)),style:Pt,onClick:Tt},De.createElement("div",{role:"tab","aria-selected":Qe,id:Pe&&"".concat(Pe,"-tab-").concat(Yt),className:"".concat(Rt,"-btn"),"aria-controls":Pe&&"".concat(Pe,"-panel-").concat(Yt),"aria-disabled":qt,tabIndex:qt?null:0,onClick:function(St){St.stopPropagation(),Tt(St)},onKeyDown:function(St){[Gt.Z.SPACE,Gt.Z.ENTER].includes(St.which)&&(St.preventDefault(),Tt(St))},onFocus:Mt},$t),an&&De.createElement("button",{type:"button","aria-label":Bt||"remove",tabIndex:0,className:"".concat(Rt,"-remove"),onClick:function(St){St.stopPropagation(),rn(St)}},vn||dn.removeIcon||"\xD7"));return Sn?Sn($e):$e}var se=ve,oe=ue(16089),de=function(Oe){var Te=Oe.activeTabOffset,Pe=Oe.horizontal,Qe=Oe.rtl,pt=Oe.indicatorSize,Yt=(0,De.useState)(),$t=(0,Me.Z)(Yt,2),qt=$t[0],vn=$t[1],wn=(0,De.useRef)(),Sn=function(at){return typeof pt=="function"?pt(at):typeof pt=="number"?pt:at};function Bt(){oe.Z.cancel(wn.current)}return(0,De.useEffect)(function(){var dn={};return Te&&(Pe?(Qe?(dn.right=Te.right+Te.width/2,dn.transform="translateX(50%)"):(dn.left=Te.left+Te.width/2,dn.transform="translateX(-50%)"),dn.width=Sn(Te.width)):(dn.top=Te.top+Te.height/2,dn.transform="translateY(-50%)",dn.height=Sn(Te.height))),Bt(),wn.current=(0,oe.Z)(function(){vn(dn)}),Bt},[Te,Pe,Qe,pt]),{style:qt}},fe=de,le=function(Oe){var Te=Oe.current||{},Pe=Te.offsetWidth,Qe=Pe===void 0?0:Pe,pt=Te.offsetHeight,Yt=pt===void 0?0:pt;return[Qe,Yt]},Ie=function(Oe,Te){return Oe[Te?0:1]};function ot(ke,Oe){var Te,Pe=De.useContext(dt),Qe=Pe.prefixCls,pt=Pe.tabs,Yt=ke.className,$t=ke.style,qt=ke.id,vn=ke.animated,wn=ke.activeKey,Sn=ke.rtl,Bt=ke.extra,dn=ke.editable,at=ke.locale,Mt=ke.tabPosition,Pt=ke.tabBarGutter,Rt=ke.children,an=ke.onTabClick,Tt=ke.onTabScroll,rn=ke.indicatorSize,$e=(0,De.useRef)(),xt=(0,De.useRef)(),St=(0,De.useRef)(),zt=(0,De.useRef)(),Ot=(0,De.useRef)(),Ht=(0,De.useRef)(),Zt=(0,De.useRef)(),mn=Mt==="top"||Mt==="bottom",xn=Ge(0,function(wi,vi){mn&&Tt&&Tt({direction:wi>vi?"left":"right"})}),Ln=(0,Me.Z)(xn,2),zn=Ln[0],er=Ln[1],cr=Ge(0,function(wi,vi){!mn&&Tt&&Tt({direction:wi>vi?"top":"bottom"})}),Un=(0,Me.Z)(cr,2),In=Un[0],fr=Un[1],tr=(0,De.useState)([0,0]),yr=(0,Me.Z)(tr,2),Gn=yr[0],Xn=yr[1],br=(0,De.useState)([0,0]),ur=(0,Me.Z)(br,2),Br=ur[0],Gr=ur[1],ar=(0,De.useState)([0,0]),kn=(0,Me.Z)(ar,2),En=kn[0],gr=kn[1],nr=(0,De.useState)([0,0]),Er=(0,Me.Z)(nr,2),Lr=Er[0],Ir=Er[1],pr=Et(new Map),Sr=(0,Me.Z)(pr,2),ii=Sr[0],Hn=Sr[1],qn=Ct(pt,ii,Br[0]),Dr=Ie(Gn,mn),$r=Ie(Br,mn),li=Ie(En,mn),di=Ie(Lr,mn),ri=Dr<$r+li,Jr=ri?Dr-di:Dr-li,yi="".concat(Qe,"-nav-operations-hidden"),bi=0,Yn=0;mn&&Sn?(bi=0,Yn=Math.max(0,$r-Jr)):(bi=Math.min(0,Jr-$r),Yn=0);function Vn(wi){return wi<bi?bi:wi>Yn?Yn:wi}var Zn=(0,De.useRef)(),mr=(0,De.useState)(),ni=(0,Me.Z)(mr,2),xi=ni[0],Mi=ni[1];function gi(){Mi(Date.now())}function ci(){window.clearTimeout(Zn.current)}Ut(zt,function(wi,vi){function Gi(ca,sa){ca(function(ta){var ts=Vn(ta+sa);return ts})}return ri?(mn?Gi(er,wi):Gi(fr,vi),ci(),gi(),!0):!1}),(0,De.useEffect)(function(){return ci(),xi&&(Zn.current=window.setTimeout(function(){Mi(0)},100)),ci},[xi]);var ki=Be(qn,Jr,mn?zn:In,$r,li,di,(0,Se.Z)((0,Se.Z)({},ke),{},{tabs:pt})),Hi=(0,Me.Z)(ki,2),Ni=Hi[0],oa=Hi[1],Xr=(0,Ee.Z)(function(){var wi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wn,vi=qn.get(wi)||{width:0,height:0,left:0,right:0,top:0};if(mn){var Gi=zn;Sn?vi.right<zn?Gi=vi.right:vi.right+vi.width>zn+Jr&&(Gi=vi.right+vi.width-Jr):vi.left<-zn?Gi=-vi.left:vi.left+vi.width>-zn+Jr&&(Gi=-(vi.left+vi.width-Jr)),fr(0),er(Vn(Gi))}else{var ca=In;vi.top<-In?ca=-vi.top:vi.top+vi.height>-In+Jr&&(ca=-(vi.top+vi.height-Jr)),er(0),fr(Vn(ca))}}),ei={};Mt==="top"||Mt==="bottom"?ei[Sn?"marginRight":"marginLeft"]=Pt:ei.marginTop=Pt;var Ai=pt.map(function(wi,vi){var Gi=wi.key;return De.createElement(se,{id:qt,prefixCls:Qe,key:Gi,tab:wi,style:vi===0?void 0:ei,closable:wi.closable,editable:dn,active:Gi===wn,renderWrapper:Rt,removeAriaLabel:at==null?void 0:at.removeAriaLabel,onClick:function(sa){an(Gi,sa)},onFocus:function(){Xr(Gi),gi(),zt.current&&(Sn||(zt.current.scrollLeft=0),zt.current.scrollTop=0)}})}),ai=function(){return Hn(function(){var vi=new Map;return pt.forEach(function(Gi){var ca,sa=Gi.key,ta=(ca=Ot.current)===null||ca===void 0?void 0:ca.querySelector('[data-node-key="'.concat(nn(sa),'"]'));ta&&vi.set(sa,{width:ta.offsetWidth,height:ta.offsetHeight,left:ta.offsetLeft,top:ta.offsetTop})}),vi})};(0,De.useEffect)(function(){ai()},[pt.map(function(wi){return wi.key}).join("_")]);var fi=Dt(function(){var wi=le($e),vi=le(xt),Gi=le(St);Xn([wi[0]-vi[0]-Gi[0],wi[1]-vi[1]-Gi[1]]);var ca=le(Zt);gr(ca);var sa=le(Ht);Ir(sa);var ta=le(Ot);Gr([ta[0]-ca[0],ta[1]-ca[1]]),ai()}),Ei=pt.slice(0,Ni),pi=pt.slice(oa+1),Pr=[].concat((0,mt.Z)(Ei),(0,mt.Z)(pi)),Yr=qn.get(wn),Ur=fe({activeTabOffset:Yr,horizontal:mn,rtl:Sn,indicatorSize:rn}),zr=Ur.style;(0,De.useEffect)(function(){Xr()},[wn,bi,Yn,be(Yr),be(qn),mn]),(0,De.useEffect)(function(){fi()},[Sn]);var ui=!!Pr.length,oi="".concat(Qe,"-nav-wrap"),zi,Wi,Zi,na;return mn?Sn?(Wi=zn>0,zi=zn!==Yn):(zi=zn<0,Wi=zn!==bi):(Zi=In<0,na=In!==bi),De.createElement(Ze.Z,{onResize:fi},De.createElement("div",{ref:(0,He.x1)(Oe,$e),role:"tablist",className:xe()("".concat(Qe,"-nav"),Yt),style:$t,onKeyDown:function(){gi()}},De.createElement(gn,{ref:xt,position:"left",extra:Bt,prefixCls:Qe}),De.createElement(Ze.Z,{onResize:fi},De.createElement("div",{className:xe()(oi,(Te={},(0,Ae.Z)(Te,"".concat(oi,"-ping-left"),zi),(0,Ae.Z)(Te,"".concat(oi,"-ping-right"),Wi),(0,Ae.Z)(Te,"".concat(oi,"-ping-top"),Zi),(0,Ae.Z)(Te,"".concat(oi,"-ping-bottom"),na),Te)),ref:zt},De.createElement(Ze.Z,{onResize:fi},De.createElement("div",{ref:Ot,className:"".concat(Qe,"-nav-list"),style:{transform:"translate(".concat(zn,"px, ").concat(In,"px)"),transition:xi?"none":void 0}},Ai,De.createElement(Ye,{ref:Zt,prefixCls:Qe,locale:at,editable:dn,style:(0,Se.Z)((0,Se.Z)({},Ai.length===0?void 0:ei),{},{visibility:ui?"hidden":null})}),De.createElement("div",{className:xe()("".concat(Qe,"-ink-bar"),(0,Ae.Z)({},"".concat(Qe,"-ink-bar-animated"),vn.inkBar)),style:zr}))))),De.createElement(Nt,(0,_e.Z)({},ke,{removeAriaLabel:at==null?void 0:at.removeAriaLabel,ref:Ht,prefixCls:Qe,tabs:Pr,className:!ui&&yi,tabMoving:!!xi})),De.createElement(gn,{ref:St,position:"right",extra:Bt,prefixCls:Qe})))}var Kt=De.forwardRef(ot),Ft=["renderTabBar"],Xt=["label","key"];function Qt(ke){var Oe=ke.renderTabBar,Te=(0,ct.Z)(ke,Ft),Pe=De.useContext(dt),Qe=Pe.tabs;if(Oe){var pt=(0,Se.Z)((0,Se.Z)({},Te),{},{panes:Qe.map(function(Yt){var $t=Yt.label,qt=Yt.key,vn=(0,ct.Z)(Yt,Xt);return De.createElement(wt,(0,_e.Z)({tab:$t,key:qt,tabKey:qt},vn))})});return Oe(pt,Kt)}return De.createElement(Kt,Te)}var on=ue(48736);function pn(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Oe;return ke===!1?Oe={inkBar:!1,tabPane:!1}:ke===!0?Oe={inkBar:!0,tabPane:!1}:Oe=(0,Se.Z)({inkBar:!0},(0,Ke.Z)(ke)==="object"?ke:{}),Oe.tabPaneMotion&&Oe.tabPane===void 0&&(Oe.tabPane=!0),!Oe.tabPaneMotion&&Oe.tabPane&&(Oe.tabPane=!1),Oe}var Cn=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],bt=0;function hn(ke,Oe){var Te,Pe=ke.id,Qe=ke.prefixCls,pt=Qe===void 0?"rc-tabs":Qe,Yt=ke.className,$t=ke.items,qt=ke.direction,vn=ke.activeKey,wn=ke.defaultActiveKey,Sn=ke.editable,Bt=ke.animated,dn=ke.tabPosition,at=dn===void 0?"top":dn,Mt=ke.tabBarGutter,Pt=ke.tabBarStyle,Rt=ke.tabBarExtraContent,an=ke.locale,Tt=ke.moreIcon,rn=ke.moreTransitionName,$e=ke.destroyInactiveTabPane,xt=ke.renderTabBar,St=ke.onChange,zt=ke.onTabClick,Ot=ke.onTabScroll,Ht=ke.getPopupContainer,Zt=ke.popupClassName,mn=ke.indicatorSize,xn=(0,ct.Z)(ke,Cn),Ln=De.useMemo(function(){return($t||[]).filter(function(Ir){return Ir&&(0,Ke.Z)(Ir)==="object"&&"key"in Ir})},[$t]),zn=qt==="rtl",er=pn(Bt),cr=(0,De.useState)(!1),Un=(0,Me.Z)(cr,2),In=Un[0],fr=Un[1];(0,De.useEffect)(function(){fr((0,We.Z)())},[]);var tr=(0,vt.Z)(function(){var Ir;return(Ir=Ln[0])===null||Ir===void 0?void 0:Ir.key},{value:vn,defaultValue:wn}),yr=(0,Me.Z)(tr,2),Gn=yr[0],Xn=yr[1],br=(0,De.useState)(function(){return Ln.findIndex(function(Ir){return Ir.key===Gn})}),ur=(0,Me.Z)(br,2),Br=ur[0],Gr=ur[1];(0,De.useEffect)(function(){var Ir=Ln.findIndex(function(Sr){return Sr.key===Gn});if(Ir===-1){var pr;Ir=Math.max(0,Math.min(Br,Ln.length-1)),Xn((pr=Ln[Ir])===null||pr===void 0?void 0:pr.key)}Gr(Ir)},[Ln.map(function(Ir){return Ir.key}).join("_"),Gn,Br]);var ar=(0,vt.Z)(null,{value:Pe}),kn=(0,Me.Z)(ar,2),En=kn[0],gr=kn[1];(0,De.useEffect)(function(){Pe||(gr("rc-tabs-".concat(bt)),bt+=1)},[]);function nr(Ir,pr){zt==null||zt(Ir,pr);var Sr=Ir!==Gn;Xn(Ir),Sr&&(St==null||St(Ir))}var Er={id:En,activeKey:Gn,animated:er,tabPosition:at,rtl:zn,mobile:In},Lr=(0,Se.Z)((0,Se.Z)({},Er),{},{editable:Sn,locale:an,moreIcon:Tt,moreTransitionName:rn,tabBarGutter:Mt,onTabClick:nr,onTabScroll:Ot,extra:Rt,style:Pt,panes:null,getPopupContainer:Ht,popupClassName:Zt,indicatorSize:mn});return De.createElement(dt.Provider,{value:{tabs:Ln,prefixCls:pt}},De.createElement("div",(0,_e.Z)({ref:Oe,id:Pe,className:xe()(pt,"".concat(pt,"-").concat(at),(Te={},(0,Ae.Z)(Te,"".concat(pt,"-mobile"),In),(0,Ae.Z)(Te,"".concat(pt,"-editable"),Sn),(0,Ae.Z)(Te,"".concat(pt,"-rtl"),zn),Te),Yt)},xn),De.createElement(Qt,(0,_e.Z)({},Lr,{renderTabBar:xt})),De.createElement(it,(0,_e.Z)({destroyInactiveTabPane:$e},Er,{animated:er}))))}var On=De.forwardRef(hn),rt=On,ze=rt,Xe=ue(36355),jt=ue(19716),cn=()=>null,Dn=ue(62892);const Tn={motionAppear:!1,motionEnter:!0,motionLeave:!0};function _n(ke){let Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Te;return Oe===!1?Te={inkBar:!1,tabPane:!1}:Oe===!0?Te={inkBar:!0,tabPane:!0}:Te=Object.assign({inkBar:!0},typeof Oe=="object"?Oe:{}),Te.tabPane&&(Te.tabPaneMotion=Object.assign(Object.assign({},Tn),{motionName:(0,Dn.m)(ke,"switch")})),Te}var Fn=ue(11592),jn=function(ke,Oe){var Te={};for(var Pe in ke)Object.prototype.hasOwnProperty.call(ke,Pe)&&Oe.indexOf(Pe)<0&&(Te[Pe]=ke[Pe]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Pe=Object.getOwnPropertySymbols(ke);Qe<Pe.length;Qe++)Oe.indexOf(Pe[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ke,Pe[Qe])&&(Te[Pe[Qe]]=ke[Pe[Qe]]);return Te};function An(ke){return ke.filter(Oe=>Oe)}function hr(ke,Oe){if(ke)return ke;const Te=(0,Fn.Z)(Oe).map(Pe=>{if(De.isValidElement(Pe)){const{key:Qe,props:pt}=Pe,Yt=pt||{},{tab:$t}=Yt,qt=jn(Yt,["tab"]);return Object.assign(Object.assign({key:String(Qe)},qt),{label:$t})}return null});return An(Te)}var kr=ue(17313),Tr=ue(83116),Hr=ue(37613),sr=ue(13826),rr=ke=>{const{componentCls:Oe,motionDurationSlow:Te}=ke;return[{[Oe]:{[`${Oe}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Te}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Te}`}}}}},[(0,sr.oN)(ke,"slide-up"),(0,sr.oN)(ke,"slide-down")]]};const Or=ke=>{const{componentCls:Oe,tabsCardPadding:Te,cardBg:Pe,cardGutter:Qe,colorBorderSecondary:pt,itemSelectedColor:Yt}=ke;return{[`${Oe}-card`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab`]:{margin:0,padding:Te,background:Pe,border:`${ke.lineWidth}px ${ke.lineType} ${pt}`,transition:`all ${ke.motionDurationSlow} ${ke.motionEaseInOut}`},[`${Oe}-tab-active`]:{color:Yt,background:ke.colorBgContainer},[`${Oe}-ink-bar`]:{visibility:"hidden"}},[`&${Oe}-top, &${Oe}-bottom`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab + ${Oe}-tab`]:{marginLeft:{_skip_check_:!0,value:`${Qe}px`}}}},[`&${Oe}-top`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab`]:{borderRadius:`${ke.borderRadiusLG}px ${ke.borderRadiusLG}px 0 0`},[`${Oe}-tab-active`]:{borderBottomColor:ke.colorBgContainer}}},[`&${Oe}-bottom`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab`]:{borderRadius:`0 0 ${ke.borderRadiusLG}px ${ke.borderRadiusLG}px`},[`${Oe}-tab-active`]:{borderTopColor:ke.colorBgContainer}}},[`&${Oe}-left, &${Oe}-right`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab + ${Oe}-tab`]:{marginTop:`${Qe}px`}}},[`&${Oe}-left`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ke.borderRadiusLG}px 0 0 ${ke.borderRadiusLG}px`}},[`${Oe}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:ke.colorBgContainer}}}},[`&${Oe}-right`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ke.borderRadiusLG}px ${ke.borderRadiusLG}px 0`}},[`${Oe}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:ke.colorBgContainer}}}}}}},Fr=ke=>{const{componentCls:Oe,itemHoverColor:Te,dropdownEdgeChildVerticalPadding:Pe}=ke;return{[`${Oe}-dropdown`]:Object.assign(Object.assign({},(0,kr.Wf)(ke)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ke.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Oe}-dropdown-menu`]:{maxHeight:ke.tabsDropdownHeight,margin:0,padding:`${Pe}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:ke.colorBgContainer,backgroundClip:"padding-box",borderRadius:ke.borderRadiusLG,outline:"none",boxShadow:ke.boxShadowSecondary,"&-item":Object.assign(Object.assign({},kr.vS),{display:"flex",alignItems:"center",minWidth:ke.tabsDropdownWidth,margin:0,padding:`${ke.paddingXXS}px ${ke.paddingSM}px`,color:ke.colorText,fontWeight:"normal",fontSize:ke.fontSize,lineHeight:ke.lineHeight,cursor:"pointer",transition:`all ${ke.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:ke.marginSM},color:ke.colorTextDescription,fontSize:ke.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Te}},"&:hover":{background:ke.controlItemBgHover},"&-disabled":{"&, &:hover":{color:ke.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},_r=ke=>{const{componentCls:Oe,margin:Te,colorBorderSecondary:Pe,horizontalMargin:Qe,verticalItemPadding:pt,verticalItemMargin:Yt}=ke;return{[`${Oe}-top, ${Oe}-bottom`]:{flexDirection:"column",[`> ${Oe}-nav, > div > ${Oe}-nav`]:{margin:Qe,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${ke.lineWidth}px ${ke.lineType} ${Pe}`,content:"''"},[`${Oe}-ink-bar`]:{height:ke.lineWidthBold,"&-animated":{transition:`width ${ke.motionDurationSlow}, left ${ke.motionDurationSlow},
|
|
|
right ${ke.motionDurationSlow}`}},[`${Oe}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:ke.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:ke.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:ke.boxShadowTabsOverflowRight},[`&${Oe}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Oe}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Oe}-top`]:{[`> ${Oe}-nav,
|
|
|
> div > ${Oe}-nav`]:{"&::before":{bottom:0},[`${Oe}-ink-bar`]:{bottom:0}}},[`${Oe}-bottom`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{order:1,marginTop:`${Te}px`,marginBottom:0,"&::before":{top:0},[`${Oe}-ink-bar`]:{top:0}},[`> ${Oe}-content-holder, > div > ${Oe}-content-holder`]:{order:0}},[`${Oe}-left, ${Oe}-right`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{flexDirection:"column",minWidth:ke.controlHeight*1.25,[`${Oe}-tab`]:{padding:pt,textAlign:"center"},[`${Oe}-tab + ${Oe}-tab`]:{margin:Yt},[`${Oe}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:ke.controlHeight},"&::before":{top:0,boxShadow:ke.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:ke.boxShadowTabsOverflowBottom},[`&${Oe}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Oe}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Oe}-ink-bar`]:{width:ke.lineWidthBold,"&-animated":{transition:`height ${ke.motionDurationSlow}, top ${ke.motionDurationSlow}`}},[`${Oe}-nav-list, ${Oe}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Oe}-left`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Oe}-content-holder, > div > ${Oe}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${ke.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${ke.lineWidth}px ${ke.lineType} ${ke.colorBorder}`},[`> ${Oe}-content > ${Oe}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:ke.paddingLG}}}},[`${Oe}-right`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{order:1,[`${Oe}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Oe}-content-holder, > div > ${Oe}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-ke.lineWidth},borderRight:{_skip_check_:!0,value:`${ke.lineWidth}px ${ke.lineType} ${ke.colorBorder}`},[`> ${Oe}-content > ${Oe}-tabpane`]:{paddingRight:{_skip_check_:!0,value:ke.paddingLG}}}}}},jr=ke=>{const{componentCls:Oe,cardPaddingSM:Te,cardPaddingLG:Pe,horizontalItemPaddingSM:Qe,horizontalItemPaddingLG:pt}=ke;return{[Oe]:{"&-small":{[`> ${Oe}-nav`]:{[`${Oe}-tab`]:{padding:Qe,fontSize:ke.titleFontSizeSM}}},"&-large":{[`> ${Oe}-nav`]:{[`${Oe}-tab`]:{padding:pt,fontSize:ke.titleFontSizeLG}}}},[`${Oe}-card`]:{[`&${Oe}-small`]:{[`> ${Oe}-nav`]:{[`${Oe}-tab`]:{padding:Te}},[`&${Oe}-bottom`]:{[`> ${Oe}-nav ${Oe}-tab`]:{borderRadius:`0 0 ${ke.borderRadius}px ${ke.borderRadius}px`}},[`&${Oe}-top`]:{[`> ${Oe}-nav ${Oe}-tab`]:{borderRadius:`${ke.borderRadius}px ${ke.borderRadius}px 0 0`}},[`&${Oe}-right`]:{[`> ${Oe}-nav ${Oe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ke.borderRadius}px ${ke.borderRadius}px 0`}}},[`&${Oe}-left`]:{[`> ${Oe}-nav ${Oe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ke.borderRadius}px 0 0 ${ke.borderRadius}px`}}}},[`&${Oe}-large`]:{[`> ${Oe}-nav`]:{[`${Oe}-tab`]:{padding:Pe}}}}}},Nr=ke=>{const{componentCls:Oe,itemActiveColor:Te,itemHoverColor:Pe,iconCls:Qe,tabsHorizontalItemMargin:pt,horizontalItemPadding:Yt,itemSelectedColor:$t,itemColor:qt}=ke,vn=`${Oe}-tab`;return{[vn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:Yt,fontSize:ke.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:qt,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Te}},(0,kr.Qy)(ke)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-ke.marginXXS},marginLeft:{_skip_check_:!0,value:ke.marginXS},color:ke.colorTextDescription,fontSize:ke.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${ke.motionDurationSlow}`,"&:hover":{color:ke.colorTextHeading}},"&:hover":{color:Pe},[`&${vn}-active ${vn}-btn`]:{color:$t,textShadow:ke.tabsActiveTextShadow},[`&${vn}-disabled`]:{color:ke.colorTextDisabled,cursor:"not-allowed"},[`&${vn}-disabled ${vn}-btn, &${vn}-disabled ${Oe}-remove`]:{"&:focus, &:active":{color:ke.colorTextDisabled}},[`& ${vn}-remove ${Qe}`]:{margin:0},[Qe]:{marginRight:{_skip_check_:!0,value:ke.marginSM}}},[`${vn} + ${vn}`]:{margin:{_skip_check_:!0,value:pt}}}},Jn=ke=>{const{componentCls:Oe,tabsHorizontalItemMarginRTL:Te,iconCls:Pe,cardGutter:Qe}=ke;return{[`${Oe}-rtl`]:{direction:"rtl",[`${Oe}-nav`]:{[`${Oe}-tab`]:{margin:{_skip_check_:!0,value:Te},[`${Oe}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Pe]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${ke.marginSM}px`}},[`${Oe}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${ke.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${ke.marginXXS}px`},[Pe]:{margin:0}}}},[`&${Oe}-left`]:{[`> ${Oe}-nav`]:{order:1},[`> ${Oe}-content-holder`]:{order:0}},[`&${Oe}-right`]:{[`> ${Oe}-nav`]:{order:0},[`> ${Oe}-content-holder`]:{order:1}},[`&${Oe}-card${Oe}-top, &${Oe}-card${Oe}-bottom`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-tab + ${Oe}-tab`]:{marginRight:{_skip_check_:!0,value:Qe},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Oe}-dropdown-rtl`]:{direction:"rtl"},[`${Oe}-menu-item`]:{[`${Oe}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},lr=ke=>{const{componentCls:Oe,tabsCardPadding:Te,cardHeight:Pe,cardGutter:Qe,itemHoverColor:pt,itemActiveColor:Yt,colorBorderSecondary:$t}=ke;return{[Oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,kr.Wf)(ke)),{display:"flex",[`> ${Oe}-nav, > div > ${Oe}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Oe}-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 ${ke.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Oe}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${ke.motionDurationSlow}`},[`${Oe}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Oe}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Oe}-nav-more`]:{position:"relative",padding:Te,background:"transparent",border:0,color:ke.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:ke.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Oe}-nav-add`]:Object.assign({minWidth:Pe,marginLeft:{_skip_check_:!0,value:Qe},padding:`0 ${ke.paddingXS}px`,background:"transparent",border:`${ke.lineWidth}px ${ke.lineType} ${$t}`,borderRadius:`${ke.borderRadiusLG}px ${ke.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:ke.colorText,transition:`all ${ke.motionDurationSlow} ${ke.motionEaseInOut}`,"&:hover":{color:pt},"&:active, &:focus:not(:focus-visible)":{color:Yt}},(0,kr.Qy)(ke))},[`${Oe}-extra-content`]:{flex:"none"},[`${Oe}-ink-bar`]:{position:"absolute",background:ke.inkBarColor,pointerEvents:"none"}}),Nr(ke)),{[`${Oe}-content`]:{position:"relative",width:"100%"},[`${Oe}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Oe}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Oe}-centered`]:{[`> ${Oe}-nav, > div > ${Oe}-nav`]:{[`${Oe}-nav-wrap`]:{[`&:not([class*='${Oe}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Rn=(0,Tr.Z)("Tabs",ke=>{const Oe=(0,Hr.TS)(ke,{tabsCardPadding:ke.cardPadding||`${(ke.cardHeight-Math.round(ke.fontSize*ke.lineHeight))/2-ke.lineWidth}px ${ke.padding}px`,dropdownEdgeChildVerticalPadding:ke.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ke.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${ke.horizontalItemGutter}px`});return[jr(Oe),Jn(Oe),_r(Oe),Fr(Oe),Or(Oe),lr(Oe),rr(Oe)]},ke=>{const Oe=ke.controlHeightLG;return{zIndexPopup:ke.zIndexPopupBase+50,cardBg:ke.colorFillAlter,cardHeight:Oe,cardPadding:"",cardPaddingSM:`${ke.paddingXXS*1.5}px ${ke.padding}px`,cardPaddingLG:`${ke.paddingXS}px ${ke.padding}px ${ke.paddingXXS*1.5}px`,titleFontSize:ke.fontSize,titleFontSizeLG:ke.fontSizeLG,titleFontSizeSM:ke.fontSize,inkBarColor:ke.colorPrimary,horizontalMargin:`0 0 ${ke.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${ke.paddingSM}px 0`,horizontalItemPaddingSM:`${ke.paddingXS}px 0`,horizontalItemPaddingLG:`${ke.padding}px 0`,verticalItemPadding:`${ke.paddingXS}px ${ke.paddingLG}px`,verticalItemMargin:`${ke.margin}px 0 0 0`,itemColor:ke.colorText,itemSelectedColor:ke.colorPrimary,itemHoverColor:ke.colorPrimaryHover,itemActiveColor:ke.colorPrimaryActive,cardGutter:ke.marginXXS/2}}),$n=function(ke,Oe){var Te={};for(var Pe in ke)Object.prototype.hasOwnProperty.call(ke,Pe)&&Oe.indexOf(Pe)<0&&(Te[Pe]=ke[Pe]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Pe=Object.getOwnPropertySymbols(ke);Qe<Pe.length;Qe++)Oe.indexOf(Pe[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ke,Pe[Qe])&&(Te[Pe[Qe]]=ke[Pe[Qe]]);return Te};const wr=ke=>{const{type:Oe,className:Te,rootClassName:Pe,size:Qe,onEdit:pt,hideAdd:Yt,centered:$t,addIcon:qt,popupClassName:vn,children:wn,items:Sn,animated:Bt,style:dn,indicatorSize:at}=ke,Mt=$n(ke,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:Pt,moreIcon:Rt=De.createElement(je.Z,null)}=Mt,{direction:an,tabs:Tt,getPrefixCls:rn,getPopupContainer:$e}=De.useContext(Xe.E_),xt=rn("tabs",Pt),[St,zt]=Rn(xt);let Ot;Oe==="editable-card"&&(Ot={onEdit:(zn,er)=>{let{key:cr,event:Un}=er;pt==null||pt(zn==="add"?Un:cr,zn)},removeIcon:De.createElement(pe.Z,null),addIcon:qt||De.createElement(Fe.Z,null),showAdd:Yt!==!0});const Ht=rn(),Zt=hr(Sn,wn),mn=_n(xt,Bt),xn=(0,jt.Z)(Qe),Ln=Object.assign(Object.assign({},Tt==null?void 0:Tt.style),dn);return St(De.createElement(ze,Object.assign({direction:an,getPopupContainer:$e,moreTransitionName:`${Ht}-slide-up`},Mt,{items:Zt,className:xe()({[`${xt}-${xn}`]:xn,[`${xt}-card`]:["card","editable-card"].includes(Oe),[`${xt}-editable-card`]:Oe==="editable-card",[`${xt}-centered`]:$t},Tt==null?void 0:Tt.className,Te,Pe,zt),popupClassName:xe()(vn,zt),style:Ln,editable:Ot,moreIcon:Rt,prefixCls:xt,animated:mn,indicatorSize:at!=null?at:Tt==null?void 0:Tt.indicatorSize})))};wr.TabPane=cn;var lt=wr},54580:function(Mn,sn,ue){"use strict";ue.d(sn,{default:function(){return dn}});var pe=ue(59301),je=ue(94480),Fe=ue(92310),tt=ue.n(Fe),xe=ue(54476),_e=ue(67732),Ae=ue(83652),Se=ue(42403),Me=ue(158),Ke=ue(20068),ct=ue(75931),De=ue(75044),We=ue(76190),vt=ue(3202),nt=ue(26112);function dt(at,Mt){var Pt="cannot ".concat(at.method," ").concat(at.action," ").concat(Mt.status,"'"),Rt=new Error(Pt);return Rt.status=Mt.status,Rt.method=at.method,Rt.url=at.action,Rt}function st(at){var Mt=at.responseText||at.response;if(!Mt)return Mt;try{return JSON.parse(Mt)}catch(Pt){return Mt}}function wt(at){var Mt=new XMLHttpRequest;at.onProgress&&Mt.upload&&(Mt.upload.onprogress=function(Tt){Tt.total>0&&(Tt.percent=Tt.loaded/Tt.total*100),at.onProgress(Tt)});var Pt=new FormData;at.data&&Object.keys(at.data).forEach(function(an){var Tt=at.data[an];if(Array.isArray(Tt)){Tt.forEach(function(rn){Pt.append("".concat(an,"[]"),rn)});return}Pt.append(an,Tt)}),at.file instanceof Blob?Pt.append(at.filename,at.file,at.file.name):Pt.append(at.filename,at.file),Mt.onerror=function(Tt){at.onError(Tt)},Mt.onload=function(){return Mt.status<200||Mt.status>=300?at.onError(dt(at,Mt),st(Mt)):at.onSuccess(st(Mt),Mt)},Mt.open(at.method,at.action,!0),at.withCredentials&&"withCredentials"in Mt&&(Mt.withCredentials=!0);var Rt=at.headers||{};return Rt["X-Requested-With"]!==null&&Mt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Rt).forEach(function(an){Rt[an]!==null&&Mt.setRequestHeader(an,Rt[an])}),Mt.send(Pt),{abort:function(){Mt.abort()}}}var en=+new Date,it=0;function mt(){return"rc-upload-".concat(en,"-").concat(++it)}var Ze=ue(48736),Ee=function(at,Mt){if(at&&Mt){var Pt=Array.isArray(Mt)?Mt:Mt.split(","),Rt=at.name||"",an=at.type||"",Tt=an.replace(/\/.*$/,"");return Pt.some(function(rn){var $e=rn.trim();if(/^\*(\/\*)?$/.test(rn))return!0;if($e.charAt(0)==="."){var xt=Rt.toLowerCase(),St=$e.toLowerCase(),zt=[St];return(St===".jpg"||St===".jpeg")&&(zt=[".jpg",".jpeg"]),zt.some(function(Ot){return xt.endsWith(Ot)})}return/\/\*$/.test($e)?Tt===$e.replace(/\/.*$/,""):an===$e?!0:/^\w+$/.test($e)?((0,Ze.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat($e,"'.Skip for check.")),!0):!1})}return!0};function He(at,Mt){var Pt=at.createReader(),Rt=[];function an(){Pt.readEntries(function(Tt){var rn=Array.prototype.slice.apply(Tt);Rt=Rt.concat(rn);var $e=!rn.length;$e?Mt(Rt):an()})}an()}var Ue=function(Mt,Pt,Rt){var an=function Tt(rn,$e){rn&&(rn.path=$e||"",rn.isFile?rn.file(function(xt){Rt(xt)&&(rn.fullPath&&!xt.webkitRelativePath&&(Object.defineProperties(xt,{webkitRelativePath:{writable:!0}}),xt.webkitRelativePath=rn.fullPath.replace(/^\//,""),Object.defineProperties(xt,{webkitRelativePath:{writable:!1}})),Pt([xt]))}):rn.isDirectory&&He(rn,function(xt){xt.forEach(function(St){Tt(St,"".concat($e).concat(rn.name,"/"))})}))};Mt.forEach(function(Tt){an(Tt.webkitGetAsEntry())})},Ct=Ue,Ge=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],It=function(at){(0,Se.Z)(Pt,at);var Mt=(0,Me.Z)(Pt);function Pt(){var Rt;(0,_e.Z)(this,Pt);for(var an=arguments.length,Tt=new Array(an),rn=0;rn<an;rn++)Tt[rn]=arguments[rn];return Rt=Mt.call.apply(Mt,[this].concat(Tt)),Rt.state={uid:mt()},Rt.reqs={},Rt.fileInput=void 0,Rt._isMounted=void 0,Rt.onChange=function($e){var xt=Rt.props,St=xt.accept,zt=xt.directory,Ot=$e.target.files,Ht=(0,je.Z)(Ot).filter(function(Zt){return!zt||Ee(Zt,St)});Rt.uploadFiles(Ht),Rt.reset()},Rt.onClick=function($e){var xt=Rt.fileInput;if(xt){var St=$e.target,zt=Rt.props.onClick;if(St&&St.tagName==="BUTTON"){var Ot=xt.parentNode;Ot.focus(),St.blur()}xt.click(),zt&&zt($e)}},Rt.onKeyDown=function($e){$e.key==="Enter"&&Rt.onClick($e)},Rt.onFileDrop=function($e){var xt=Rt.props.multiple;if($e.preventDefault(),$e.type!=="dragover")if(Rt.props.directory)Ct(Array.prototype.slice.call($e.dataTransfer.items),Rt.uploadFiles,function(zt){return Ee(zt,Rt.props.accept)});else{var St=(0,je.Z)($e.dataTransfer.files).filter(function(zt){return Ee(zt,Rt.props.accept)});xt===!1&&(St=St.slice(0,1)),Rt.uploadFiles(St)}},Rt.uploadFiles=function($e){var xt=(0,je.Z)($e),St=xt.map(function(zt){return zt.uid=mt(),Rt.processFile(zt,xt)});Promise.all(St).then(function(zt){var Ot=Rt.props.onBatchStart;Ot==null||Ot(zt.map(function(Ht){var Zt=Ht.origin,mn=Ht.parsedFile;return{file:Zt,parsedFile:mn}})),zt.filter(function(Ht){return Ht.parsedFile!==null}).forEach(function(Ht){Rt.post(Ht)})})},Rt.processFile=function(){var $e=(0,vt.Z)((0,De.Z)().mark(function xt(St,zt){var Ot,Ht,Zt,mn,xn,Ln,zn,er,cr;return(0,De.Z)().wrap(function(In){for(;;)switch(In.prev=In.next){case 0:if(Ot=Rt.props.beforeUpload,Ht=St,!Ot){In.next=14;break}return In.prev=3,In.next=6,Ot(St,zt);case 6:Ht=In.sent,In.next=12;break;case 9:In.prev=9,In.t0=In.catch(3),Ht=!1;case 12:if(Ht!==!1){In.next=14;break}return In.abrupt("return",{origin:St,parsedFile:null,action:null,data:null});case 14:if(Zt=Rt.props.action,typeof Zt!="function"){In.next=21;break}return In.next=18,Zt(St);case 18:mn=In.sent,In.next=22;break;case 21:mn=Zt;case 22:if(xn=Rt.props.data,typeof xn!="function"){In.next=29;break}return In.next=26,xn(St);case 26:Ln=In.sent,In.next=30;break;case 29:Ln=xn;case 30:return zn=((0,We.Z)(Ht)==="object"||typeof Ht=="string")&&Ht?Ht:St,zn instanceof File?er=zn:er=new File([zn],St.name,{type:St.type}),cr=er,cr.uid=St.uid,In.abrupt("return",{origin:St,data:Ln,parsedFile:cr,action:mn});case 35:case"end":return In.stop()}},xt,null,[[3,9]])}));return function(xt,St){return $e.apply(this,arguments)}}(),Rt.saveFileInput=function($e){Rt.fileInput=$e},Rt}return(0,Ae.Z)(Pt,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(an){var Tt=this,rn=an.data,$e=an.origin,xt=an.action,St=an.parsedFile;if(this._isMounted){var zt=this.props,Ot=zt.onStart,Ht=zt.customRequest,Zt=zt.name,mn=zt.headers,xn=zt.withCredentials,Ln=zt.method,zn=$e.uid,er=Ht||wt,cr={action:xt,filename:Zt,data:rn,file:St,headers:mn,withCredentials:xn,method:Ln||"post",onProgress:function(In){var fr=Tt.props.onProgress;fr==null||fr(In,St)},onSuccess:function(In,fr){var tr=Tt.props.onSuccess;tr==null||tr(In,St,fr),delete Tt.reqs[zn]},onError:function(In,fr){var tr=Tt.props.onError;tr==null||tr(In,fr,St),delete Tt.reqs[zn]}};Ot($e),this.reqs[zn]=er(cr)}}},{key:"reset",value:function(){this.setState({uid:mt()})}},{key:"abort",value:function(an){var Tt=this.reqs;if(an){var rn=an.uid?an.uid:an;Tt[rn]&&Tt[rn].abort&&Tt[rn].abort(),delete Tt[rn]}else Object.keys(Tt).forEach(function($e){Tt[$e]&&Tt[$e].abort&&Tt[$e].abort(),delete Tt[$e]})}},{key:"render",value:function(){var an=this.props,Tt=an.component,rn=an.prefixCls,$e=an.className,xt=an.disabled,St=an.id,zt=an.style,Ot=an.multiple,Ht=an.accept,Zt=an.capture,mn=an.children,xn=an.directory,Ln=an.openFileDialogOnClick,zn=an.onMouseEnter,er=an.onMouseLeave,cr=(0,ct.Z)(an,Ge),Un=tt()((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},rn,!0),"".concat(rn,"-disabled"),xt),$e,$e)),In=xn?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},fr=xt?{}:{onClick:Ln?this.onClick:function(){},onKeyDown:Ln?this.onKeyDown:function(){},onMouseEnter:zn,onMouseLeave:er,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return pe.createElement(Tt,(0,xe.Z)({},fr,{className:Un,role:"button",style:zt}),pe.createElement("input",(0,xe.Z)({},(0,nt.Z)(cr,{aria:!0,data:!0}),{id:St,disabled:xt,type:"file",ref:this.saveFileInput,onClick:function(yr){return yr.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Ht},In,{multiple:Ot,onChange:this.onChange},Zt!=null?{capture:Zt}:{})),mn)}}]),Pt}(pe.Component),et=It;function kt(){}var Je=function(at){(0,Se.Z)(Pt,at);var Mt=(0,Me.Z)(Pt);function Pt(){var Rt;(0,_e.Z)(this,Pt);for(var an=arguments.length,Tt=new Array(an),rn=0;rn<an;rn++)Tt[rn]=arguments[rn];return Rt=Mt.call.apply(Mt,[this].concat(Tt)),Rt.uploader=void 0,Rt.saveUploader=function($e){Rt.uploader=$e},Rt}return(0,Ae.Z)(Pt,[{key:"abort",value:function(an){this.uploader.abort(an)}},{key:"render",value:function(){return pe.createElement(et,(0,xe.Z)({},this.props,{ref:this.saveUploader}))}}]),Pt}(pe.Component);Je.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:kt,onError:kt,onSuccess:kt,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Ut=Je,ft=Ut,Dt=ue(18929),Et=ue(4676),ut=ue(36355),Be=ue(1684),be=ue(9763),ht=ue(31724),nn={icon:function(Mt,Pt){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:Pt}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:Mt}}]}},name:"file",theme:"twotone"},Wt=nn,Ve=ue(7657),Ye=function(Mt,Pt){return pe.createElement(Ve.Z,(0,xe.Z)({},Mt,{ref:Pt,icon:Wt}))},At=pe.forwardRef(Ye),gn=At,Jt=ue(58617),un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Gt=un,Vt=function(Mt,Pt){return pe.createElement(Ve.Z,(0,xe.Z)({},Mt,{ref:Pt,icon:Gt}))},Nt=pe.forwardRef(Vt),ve=Nt,se={icon:function(Mt,Pt){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:Mt}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:Pt}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:Pt}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:Pt}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:Mt}}]}},name:"picture",theme:"twotone"},oe=se,de=function(Mt,Pt){return pe.createElement(Ve.Z,(0,xe.Z)({},Mt,{ref:Pt,icon:oe}))},fe=pe.forwardRef(de),le=fe,Ie=ue(77900),ot=ue(56762),Kt=ue(62892),Ft=ue(92343),Xt=ue(3113);function Qt(at){return Object.assign(Object.assign({},at),{lastModified:at.lastModified,lastModifiedDate:at.lastModifiedDate,name:at.name,size:at.size,type:at.type,uid:at.uid,percent:0,originFileObj:at})}function on(at,Mt){const Pt=(0,je.Z)(Mt),Rt=Pt.findIndex(an=>{let{uid:Tt}=an;return Tt===at.uid});return Rt===-1?Pt.push(at):Pt[Rt]=at,Pt}function pn(at,Mt){const Pt=at.uid!==void 0?"uid":"name";return Mt.filter(Rt=>Rt[Pt]===at[Pt])[0]}function Cn(at,Mt){const Pt=at.uid!==void 0?"uid":"name",Rt=Mt.filter(an=>an[Pt]!==at[Pt]);return Rt.length===Mt.length?null:Rt}const bt=function(){const Mt=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Rt=Mt[Mt.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Rt)||[""])[0]},hn=at=>at.indexOf("image/")===0,On=at=>{if(at.type&&!at.thumbUrl)return hn(at.type);const Mt=at.thumbUrl||at.url||"",Pt=bt(Mt);return/^data:image\//.test(Mt)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(Pt)?!0:!(/^data:/.test(Mt)||Pt)},rt=200;function ze(at){return new Promise(Mt=>{if(!at.type||!hn(at.type)){Mt("");return}const Pt=document.createElement("canvas");Pt.width=rt,Pt.height=rt,Pt.style.cssText=`position: fixed; left: 0; top: 0; width: ${rt}px; height: ${rt}px; z-index: 9999; display: none;`,document.body.appendChild(Pt);const Rt=Pt.getContext("2d"),an=new Image;if(an.onload=()=>{const{width:Tt,height:rn}=an;let $e=rt,xt=rt,St=0,zt=0;Tt>rn?(xt=rn*(rt/Tt),zt=-(xt-$e)/2):($e=Tt*(rt/rn),St=-($e-xt)/2),Rt.drawImage(an,St,zt,$e,xt);const Ot=Pt.toDataURL();document.body.removeChild(Pt),window.URL.revokeObjectURL(an.src),Mt(Ot)},an.crossOrigin="anonymous",at.type.startsWith("image/svg+xml")){const Tt=new FileReader;Tt.onload=()=>{Tt.result&&(an.src=Tt.result)},Tt.readAsDataURL(at)}else if(at.type.startsWith("image/gif")){const Tt=new FileReader;Tt.onload=()=>{Tt.result&&Mt(Tt.result)},Tt.readAsDataURL(at)}else an.src=window.URL.createObjectURL(at)})}var Xe=ue(26227),jt=ue(41464),tn=ue(15277),cn=ue(93948),Dn=ue(6848),_n=pe.forwardRef((at,Mt)=>{let{prefixCls:Pt,className:Rt,style:an,locale:Tt,listType:rn,file:$e,items:xt,progress:St,iconRender:zt,actionIconRender:Ot,itemRender:Ht,isImgUrl:Zt,showPreviewIcon:mn,showRemoveIcon:xn,showDownloadIcon:Ln,previewIcon:zn,removeIcon:er,downloadIcon:cr,onPreview:Un,onDownload:In,onClose:fr}=at;var tr,yr;const{status:Gn}=$e,[Xn,br]=pe.useState(Gn);pe.useEffect(()=>{Gn!=="removed"&&br(Gn)},[Gn]);const[ur,Br]=pe.useState(!1);pe.useEffect(()=>{const di=setTimeout(()=>{Br(!0)},300);return()=>{clearTimeout(di)}},[]);const Gr=zt($e);let ar=pe.createElement("div",{className:`${Pt}-icon`},Gr);if(rn==="picture"||rn==="picture-card"||rn==="picture-circle")if(Xn==="uploading"||!$e.thumbUrl&&!$e.url){const di=tt()(`${Pt}-list-item-thumbnail`,{[`${Pt}-list-item-file`]:Xn!=="uploading"});ar=pe.createElement("div",{className:di},Gr)}else{const di=Zt!=null&&Zt($e)?pe.createElement("img",{src:$e.thumbUrl||$e.url,alt:$e.name,className:`${Pt}-list-item-image`,crossOrigin:$e.crossOrigin}):Gr,ri=tt()(`${Pt}-list-item-thumbnail`,{[`${Pt}-list-item-file`]:Zt&&!Zt($e)});ar=pe.createElement("a",{className:ri,onClick:Jr=>Un($e,Jr),href:$e.url||$e.thumbUrl,target:"_blank",rel:"noopener noreferrer"},di)}const kn=tt()(`${Pt}-list-item`,`${Pt}-list-item-${Xn}`),En=typeof $e.linkProps=="string"?JSON.parse($e.linkProps):$e.linkProps,gr=xn?Ot((typeof er=="function"?er($e):er)||pe.createElement(Xe.Z,null),()=>fr($e),Pt,Tt.removeFile):null,nr=Ln&&Xn==="done"?Ot((typeof cr=="function"?cr($e):cr)||pe.createElement(jt.Z,null),()=>In($e),Pt,Tt.downloadFile):null,Er=rn!=="picture-card"&&rn!=="picture-circle"&&pe.createElement("span",{key:"download-delete",className:tt()(`${Pt}-list-item-actions`,{picture:rn==="picture"})},nr,gr),Lr=tt()(`${Pt}-list-item-name`),Ir=$e.url?[pe.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Lr,title:$e.name},En,{href:$e.url,onClick:di=>Un($e,di)}),$e.name),Er]:[pe.createElement("span",{key:"view",className:Lr,onClick:di=>Un($e,di),title:$e.name},$e.name),Er],pr={pointerEvents:"none",opacity:.5},Sr=mn?pe.createElement("a",{href:$e.url||$e.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:$e.url||$e.thumbUrl?void 0:pr,onClick:di=>Un($e,di),title:Tt.previewFile},typeof zn=="function"?zn($e):zn||pe.createElement(tn.Z,null)):null,ii=(rn==="picture-card"||rn==="picture-circle")&&Xn!=="uploading"&&pe.createElement("span",{className:`${Pt}-list-item-actions`},Sr,Xn==="done"&&nr,gr),{getPrefixCls:Hn}=pe.useContext(ut.E_),qn=Hn(),Dr=pe.createElement("div",{className:kn},ar,Ir,ii,ur&&pe.createElement(Ie.default,{motionName:`${qn}-fade`,visible:Xn==="uploading",motionDeadline:2e3},di=>{let{className:ri}=di;const Jr="percent"in $e?pe.createElement(cn.Z,Object.assign({},St,{type:"line",percent:$e.percent,"aria-label":$e["aria-label"],"aria-labelledby":$e["aria-labelledby"]})):null;return pe.createElement("div",{className:tt()(`${Pt}-list-item-progress`,ri)},Jr)})),$r=$e.response&&typeof $e.response=="string"?$e.response:((tr=$e.error)===null||tr===void 0?void 0:tr.statusText)||((yr=$e.error)===null||yr===void 0?void 0:yr.message)||Tt.uploadError,li=Xn==="error"?pe.createElement(Dn.Z,{title:$r,getPopupContainer:di=>di.parentNode},Dr):Dr;return pe.createElement("div",{className:tt()(`${Pt}-list-item-container`,Rt),style:an,ref:Mt},Ht?Ht(li,$e,xt,{download:In.bind(null,$e),preview:Un.bind(null,$e),remove:fr.bind(null,$e)}):li)});const Fn=(at,Mt)=>{const{listType:Pt="text",previewFile:Rt=ze,onPreview:an,onDownload:Tt,onRemove:rn,locale:$e,iconRender:xt,isImageUrl:St=On,prefixCls:zt,items:Ot=[],showPreviewIcon:Ht=!0,showRemoveIcon:Zt=!0,showDownloadIcon:mn=!1,removeIcon:xn,previewIcon:Ln,downloadIcon:zn,progress:er={size:[-1,2],showInfo:!1},appendAction:cr,appendActionVisible:Un=!0,itemRender:In,disabled:fr}=at,tr=(0,ot.Z)(),[yr,Gn]=pe.useState(!1);pe.useEffect(()=>{Pt!=="picture"&&Pt!=="picture-card"&&Pt!=="picture-circle"||(Ot||[]).forEach(pr=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(pr.originFileObj instanceof File||pr.originFileObj instanceof Blob)||pr.thumbUrl!==void 0||(pr.thumbUrl="",Rt&&Rt(pr.originFileObj).then(Sr=>{pr.thumbUrl=Sr||"",tr()}))})},[Pt,Ot,Rt]),pe.useEffect(()=>{Gn(!0)},[]);const Xn=(pr,Sr)=>{if(an)return Sr==null||Sr.preventDefault(),an(pr)},br=pr=>{typeof Tt=="function"?Tt(pr):pr.url&&window.open(pr.url)},ur=pr=>{rn==null||rn(pr)},Br=pr=>{if(xt)return xt(pr,Pt);const Sr=pr.status==="uploading",ii=St&&St(pr)?pe.createElement(le,null):pe.createElement(gn,null);let Hn=Sr?pe.createElement(Jt.Z,null):pe.createElement(ve,null);return Pt==="picture"?Hn=Sr?pe.createElement(Jt.Z,null):ii:(Pt==="picture-card"||Pt==="picture-circle")&&(Hn=Sr?$e.uploading:ii),Hn},Gr=(pr,Sr,ii,Hn)=>{const qn={type:"text",size:"small",title:Hn,onClick:Dr=>{Sr(),(0,Ft.l$)(pr)&&pr.props.onClick&&pr.props.onClick(Dr)},className:`${ii}-list-item-action`,disabled:fr};if((0,Ft.l$)(pr)){const Dr=(0,Ft.Tm)(pr,Object.assign(Object.assign({},pr.props),{onClick:()=>{}}));return pe.createElement(Xt.ZP,Object.assign({},qn,{icon:Dr}))}return pe.createElement(Xt.ZP,Object.assign({},qn),pe.createElement("span",null,pr))};pe.useImperativeHandle(Mt,()=>({handlePreview:Xn,handleDownload:br}));const{getPrefixCls:ar}=pe.useContext(ut.E_),kn=ar("upload",zt),En=ar(),gr=tt()(`${kn}-list`,`${kn}-list-${Pt}`),nr=(0,je.Z)(Ot.map(pr=>({key:pr.uid,file:pr})));let Lr={motionDeadline:2e3,motionName:`${kn}-${Pt==="picture-card"||Pt==="picture-circle"?"animate-inline":"animate"}`,keys:nr,motionAppear:yr};const Ir=pe.useMemo(()=>{const pr=Object.assign({},(0,Kt.Z)(En));return delete pr.onAppearEnd,delete pr.onEnterEnd,delete pr.onLeaveEnd,pr},[En]);return Pt!=="picture-card"&&Pt!=="picture-circle"&&(Lr=Object.assign(Object.assign({},Ir),Lr)),pe.createElement("div",{className:gr},pe.createElement(Ie.CSSMotionList,Object.assign({},Lr,{component:!1}),pr=>{let{key:Sr,file:ii,className:Hn,style:qn}=pr;return pe.createElement(_n,{key:Sr,locale:$e,prefixCls:kn,className:Hn,style:qn,file:ii,items:Ot,progress:er,listType:Pt,isImgUrl:St,showPreviewIcon:Ht,showRemoveIcon:Zt,showDownloadIcon:mn,removeIcon:xn,previewIcon:Ln,downloadIcon:zn,iconRender:Br,actionIconRender:Gr,itemRender:In,onPreview:Xn,onDownload:br,onClose:ur})}),cr&&pe.createElement(Ie.default,Object.assign({},Lr,{visible:Un,forceRender:!0}),pr=>{let{className:Sr,style:ii}=pr;return(0,Ft.Tm)(cr,Hn=>({className:tt()(Hn.className,Sr),style:Object.assign(Object.assign(Object.assign({},ii),{pointerEvents:Sr?"none":void 0}),Hn.style)}))}))};var An=pe.forwardRef(Fn),hr=ue(17313),kr=ue(8378),Tr=ue(83116),Hr=ue(37613),Mr=at=>{const{componentCls:Mt,iconCls:Pt}=at;return{[`${Mt}-wrapper`]:{[`${Mt}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:at.colorFillAlter,border:`${at.lineWidth}px dashed ${at.colorBorder}`,borderRadius:at.borderRadiusLG,cursor:"pointer",transition:`border-color ${at.motionDurationSlow}`,[Mt]:{padding:`${at.padding}px 0`},[`${Mt}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${Mt}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${Mt}-disabled):hover`]:{borderColor:at.colorPrimaryHover},[`p${Mt}-drag-icon`]:{marginBottom:at.margin,[Pt]:{color:at.colorPrimary,fontSize:at.uploadThumbnailSize}},[`p${Mt}-text`]:{margin:`0 0 ${at.marginXXS}px`,color:at.colorTextHeading,fontSize:at.fontSizeLG},[`p${Mt}-hint`]:{color:at.colorTextDescription,fontSize:at.fontSize},[`&${Mt}-disabled`]:{cursor:"not-allowed",[`p${Mt}-drag-icon ${Pt},
|
|
|
p${Mt}-text,
|
|
|
p${Mt}-hint
|
|
|
`]:{color:at.colorTextDisabled}}}}}},Or=at=>{const{componentCls:Mt,antCls:Pt,iconCls:Rt,fontSize:an,lineHeight:Tt}=at,rn=`${Mt}-list-item`,$e=`${rn}-actions`,xt=`${rn}-action`,St=Math.round(an*Tt);return{[`${Mt}-wrapper`]:{[`${Mt}-list`]:Object.assign(Object.assign({},(0,hr.dF)()),{lineHeight:at.lineHeight,[rn]:{position:"relative",height:at.lineHeight*an,marginTop:at.marginXS,fontSize:an,display:"flex",alignItems:"center",transition:`background-color ${at.motionDurationSlow}`,"&:hover":{backgroundColor:at.controlItemBgHover},[`${rn}-name`]:Object.assign(Object.assign({},hr.vS),{padding:`0 ${at.paddingXS}px`,lineHeight:Tt,flex:"auto",transition:`all ${at.motionDurationSlow}`}),[$e]:{[xt]:{opacity:0},[`${xt}${Pt}-btn-sm`]:{height:St,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${xt}:focus-visible,
|
|
|
&.picture ${xt}
|
|
|
`]:{opacity:1},[Rt]:{color:at.actionsColor,transition:`all ${at.motionDurationSlow}`},[`&:hover ${Rt}`]:{color:at.colorText}},[`${Mt}-icon ${Rt}`]:{color:at.colorTextDescription,fontSize:an},[`${rn}-progress`]:{position:"absolute",bottom:-at.uploadProgressOffset,width:"100%",paddingInlineStart:an+at.paddingXS,fontSize:an,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${rn}:hover ${xt}`]:{opacity:1,color:at.colorText},[`${rn}-error`]:{color:at.colorError,[`${rn}-name, ${Mt}-icon ${Rt}`]:{color:at.colorError},[$e]:{[`${Rt}, ${Rt}:hover`]:{color:at.colorError},[xt]:{opacity:1}}},[`${Mt}-list-item-container`]:{transition:`opacity ${at.motionDurationSlow}, height ${at.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Fr=ue(36237),_r=ue(1950);const jr=new Fr.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Nr=new Fr.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var lr=at=>{const{componentCls:Mt}=at,Pt=`${Mt}-animate-inline`;return[{[`${Mt}-wrapper`]:{[`${Pt}-appear, ${Pt}-enter, ${Pt}-leave`]:{animationDuration:at.motionDurationSlow,animationTimingFunction:at.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Pt}-appear, ${Pt}-enter`]:{animationName:jr},[`${Pt}-leave`]:{animationName:Nr}}},{[`${Mt}-wrapper`]:(0,_r.J$)(at)},jr,Nr]},Rn=ue(30071),$n=ue(64993);const wr=at=>{const{componentCls:Mt,iconCls:Pt,uploadThumbnailSize:Rt,uploadProgressOffset:an}=at,Tt=`${Mt}-list`,rn=`${Tt}-item`;return{[`${Mt}-wrapper`]:{[`
|
|
|
${Tt}${Tt}-picture,
|
|
|
${Tt}${Tt}-picture-card,
|
|
|
${Tt}${Tt}-picture-circle
|
|
|
`]:{[rn]:{position:"relative",height:Rt+at.lineWidth*2+at.paddingXS*2,padding:at.paddingXS,border:`${at.lineWidth}px ${at.lineType} ${at.colorBorder}`,borderRadius:at.borderRadiusLG,"&:hover":{background:"transparent"},[`${rn}-thumbnail`]:Object.assign(Object.assign({},hr.vS),{width:Rt,height:Rt,lineHeight:`${Rt+at.paddingSM}px`,textAlign:"center",flex:"none",[Pt]:{fontSize:at.fontSizeHeading2,color:at.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${rn}-progress`]:{bottom:an,width:`calc(100% - ${at.paddingSM*2}px)`,marginTop:0,paddingInlineStart:Rt+at.paddingXS}},[`${rn}-error`]:{borderColor:at.colorError,[`${rn}-thumbnail ${Pt}`]:{[`svg path[fill='${Rn.blue[0]}']`]:{fill:at.colorErrorBg},[`svg path[fill='${Rn.blue.primary}']`]:{fill:at.colorError}}},[`${rn}-uploading`]:{borderStyle:"dashed",[`${rn}-name`]:{marginBottom:an}}},[`${Tt}${Tt}-picture-circle ${rn}`]:{[`&, &::before, ${rn}-thumbnail`]:{borderRadius:"50%"}}}}},lt=at=>{const{componentCls:Mt,iconCls:Pt,fontSizeLG:Rt,colorTextLightSolid:an}=at,Tt=`${Mt}-list`,rn=`${Tt}-item`,$e=at.uploadPicCardSize;return{[`
|
|
|
${Mt}-wrapper${Mt}-picture-card-wrapper,
|
|
|
${Mt}-wrapper${Mt}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,hr.dF)()),{display:"inline-block",width:"100%",[`${Mt}${Mt}-select`]:{width:$e,height:$e,marginInlineEnd:at.marginXS,marginBottom:at.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:at.colorFillAlter,border:`${at.lineWidth}px dashed ${at.colorBorder}`,borderRadius:at.borderRadiusLG,cursor:"pointer",transition:`border-color ${at.motionDurationSlow}`,[`> ${Mt}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${Mt}-disabled):hover`]:{borderColor:at.colorPrimary}},[`${Tt}${Tt}-picture-card, ${Tt}${Tt}-picture-circle`]:{[`${Tt}-item-container`]:{display:"inline-block",width:$e,height:$e,marginBlock:`0 ${at.marginXS}px`,marginInline:`0 ${at.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[rn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${at.paddingXS*2}px)`,height:`calc(100% - ${at.paddingXS*2}px)`,backgroundColor:at.colorBgMask,opacity:0,transition:`all ${at.motionDurationSlow}`,content:'" "'}},[`${rn}:hover`]:{[`&::before, ${rn}-actions`]:{opacity:1}},[`${rn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${at.motionDurationSlow}`,[`${Pt}-eye, ${Pt}-download, ${Pt}-delete`]:{zIndex:10,width:Rt,margin:`0 ${at.marginXXS}px`,fontSize:Rt,cursor:"pointer",transition:`all ${at.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${rn}-actions, ${rn}-actions:hover`]:{[`${Pt}-eye, ${Pt}-download, ${Pt}-delete`]:{color:new $n.C(an).setAlpha(.65).toRgbString(),"&:hover":{color:an}}},[`${rn}-thumbnail, ${rn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${rn}-name`]:{display:"none",textAlign:"center"},[`${rn}-file + ${rn}-name`]:{position:"absolute",bottom:at.margin,display:"block",width:`calc(100% - ${at.paddingXS*2}px)`},[`${rn}-uploading`]:{[`&${rn}`]:{backgroundColor:at.colorFillAlter},[`&::before, ${Pt}-eye, ${Pt}-download, ${Pt}-delete`]:{display:"none"}},[`${rn}-progress`]:{bottom:at.marginXL,width:`calc(100% - ${at.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${Mt}-wrapper${Mt}-picture-circle-wrapper`]:{[`${Mt}${Mt}-select`]:{borderRadius:"50%"}}}};var Oe=at=>{const{componentCls:Mt}=at;return{[`${Mt}-rtl`]:{direction:"rtl"}}};const Te=at=>{const{componentCls:Mt,colorTextDisabled:Pt}=at;return{[`${Mt}-wrapper`]:Object.assign(Object.assign({},(0,hr.Wf)(at)),{[Mt]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${Mt}-select`]:{display:"inline-block"},[`${Mt}-disabled`]:{color:Pt,cursor:"not-allowed"}})}};var Pe=(0,Tr.Z)("Upload",at=>{const{fontSizeHeading3:Mt,fontSize:Pt,lineHeight:Rt,lineWidth:an,controlHeightLG:Tt}=at,rn=Math.round(Pt*Rt),$e=(0,Hr.TS)(at,{uploadThumbnailSize:Mt*2,uploadProgressOffset:rn/2+an,uploadPicCardSize:Tt*2.55});return[Te($e),Mr($e),wr($e),lt($e),Or($e),lr($e),Oe($e),(0,kr.Z)($e)]},at=>({actionsColor:at.colorTextDescription})),Qe=function(at,Mt,Pt,Rt){function an(Tt){return Tt instanceof Pt?Tt:new Pt(function(rn){rn(Tt)})}return new(Pt||(Pt=Promise))(function(Tt,rn){function $e(zt){try{St(Rt.next(zt))}catch(Ot){rn(Ot)}}function xt(zt){try{St(Rt.throw(zt))}catch(Ot){rn(Ot)}}function St(zt){zt.done?Tt(zt.value):an(zt.value).then($e,xt)}St((Rt=Rt.apply(at,Mt||[])).next())})};const pt=`__LIST_IGNORE_${Date.now()}__`,Yt=(at,Mt)=>{const{fileList:Pt,defaultFileList:Rt,onRemove:an,showUploadList:Tt=!0,listType:rn="text",onPreview:$e,onDownload:xt,onChange:St,onDrop:zt,previewFile:Ot,disabled:Ht,locale:Zt,iconRender:mn,isImageUrl:xn,progress:Ln,prefixCls:zn,className:er,type:cr="select",children:Un,style:In,itemRender:fr,maxCount:tr,data:yr={},multiple:Gn=!1,action:Xn="",accept:br="",supportServerRender:ur=!0,rootClassName:Br}=at,Gr=pe.useContext(Be.Z),ar=Ht!=null?Ht:Gr,[kn,En]=(0,Dt.Z)(Rt||[],{value:Pt,postState:Xr=>Xr!=null?Xr:[]}),[gr,nr]=pe.useState("drop"),Er=pe.useRef(null);pe.useMemo(()=>{const Xr=Date.now();(Pt||[]).forEach((ei,Ai)=>{!ei.uid&&!Object.isFrozen(ei)&&(ei.uid=`__AUTO__${Xr}_${Ai}__`)})},[Pt]);const Lr=(Xr,ei,Ai)=>{let ai=(0,je.Z)(ei),fi=!1;tr===1?ai=ai.slice(-1):tr&&(fi=ai.length>tr,ai=ai.slice(0,tr)),(0,Et.flushSync)(()=>{En(ai)});const Ei={file:Xr,fileList:ai};Ai&&(Ei.event=Ai),(!fi||ai.some(pi=>pi.uid===Xr.uid))&&(0,Et.flushSync)(()=>{St==null||St(Ei)})},Ir=(Xr,ei)=>Qe(void 0,void 0,void 0,function*(){const{beforeUpload:Ai,transformFile:ai}=at;let fi=Xr;if(Ai){const Ei=yield Ai(Xr,ei);if(Ei===!1)return!1;if(delete Xr[pt],Ei===pt)return Object.defineProperty(Xr,pt,{value:!0,configurable:!0}),!1;typeof Ei=="object"&&Ei&&(fi=Ei)}return ai&&(fi=yield ai(fi)),fi}),pr=Xr=>{const ei=Xr.filter(fi=>!fi.file[pt]);if(!ei.length)return;const Ai=ei.map(fi=>Qt(fi.file));let ai=(0,je.Z)(kn);Ai.forEach(fi=>{ai=on(fi,ai)}),Ai.forEach((fi,Ei)=>{let pi=fi;if(ei[Ei].parsedFile)fi.status="uploading";else{const{originFileObj:Pr}=fi;let Yr;try{Yr=new File([Pr],Pr.name,{type:Pr.type})}catch(Ur){Yr=new Blob([Pr],{type:Pr.type}),Yr.name=Pr.name,Yr.lastModifiedDate=new Date,Yr.lastModified=new Date().getTime()}Yr.uid=fi.uid,pi=Yr}Lr(pi,ai)})},Sr=(Xr,ei,Ai)=>{try{typeof Xr=="string"&&(Xr=JSON.parse(Xr))}catch(Ei){}if(!pn(ei,kn))return;const ai=Qt(ei);ai.status="done",ai.percent=100,ai.response=Xr,ai.xhr=Ai;const fi=on(ai,kn);Lr(ai,fi)},ii=(Xr,ei)=>{if(!pn(ei,kn))return;const Ai=Qt(ei);Ai.status="uploading",Ai.percent=Xr.percent;const ai=on(Ai,kn);Lr(Ai,ai,Xr)},Hn=(Xr,ei,Ai)=>{if(!pn(Ai,kn))return;const ai=Qt(Ai);ai.error=Xr,ai.response=ei,ai.status="error";const fi=on(ai,kn);Lr(ai,fi)},qn=Xr=>{let ei;Promise.resolve(typeof an=="function"?an(Xr):an).then(Ai=>{var ai;if(Ai===!1)return;const fi=Cn(Xr,kn);fi&&(ei=Object.assign(Object.assign({},Xr),{status:"removed"}),kn==null||kn.forEach(Ei=>{const pi=ei.uid!==void 0?"uid":"name";Ei[pi]===ei[pi]&&!Object.isFrozen(Ei)&&(Ei.status="removed")}),(ai=Er.current)===null||ai===void 0||ai.abort(ei),Lr(ei,fi))})},Dr=Xr=>{nr(Xr.type),Xr.type==="drop"&&(zt==null||zt(Xr))};pe.useImperativeHandle(Mt,()=>({onBatchStart:pr,onSuccess:Sr,onProgress:ii,onError:Hn,fileList:kn,upload:Er.current}));const{getPrefixCls:$r,direction:li,upload:di}=pe.useContext(ut.E_),ri=$r("upload",zn),Jr=Object.assign(Object.assign({onBatchStart:pr,onError:Hn,onProgress:ii,onSuccess:Sr},at),{data:yr,multiple:Gn,action:Xn,accept:br,supportServerRender:ur,prefixCls:ri,disabled:ar,beforeUpload:Ir,onChange:void 0});delete Jr.className,delete Jr.style,(!Un||ar)&&delete Jr.id;const[yi,bi]=Pe(ri),[Yn]=(0,be.Z)("Upload",ht.Z.Upload),{showRemoveIcon:Vn,showPreviewIcon:Zn,showDownloadIcon:mr,removeIcon:ni,previewIcon:xi,downloadIcon:Mi}=typeof Tt=="boolean"?{}:Tt,gi=(Xr,ei)=>Tt?pe.createElement(An,{prefixCls:ri,listType:rn,items:kn,previewFile:Ot,onPreview:$e,onDownload:xt,onRemove:qn,showRemoveIcon:!ar&&Vn,showPreviewIcon:Zn,showDownloadIcon:mr,removeIcon:ni,previewIcon:xi,downloadIcon:Mi,iconRender:mn,locale:Object.assign(Object.assign({},Yn),Zt),isImageUrl:xn,progress:Ln,appendAction:Xr,appendActionVisible:ei,itemRender:fr,disabled:ar}):Xr,ci=tt()(`${ri}-wrapper`,er,Br,bi,di==null?void 0:di.className,{[`${ri}-rtl`]:li==="rtl",[`${ri}-picture-card-wrapper`]:rn==="picture-card",[`${ri}-picture-circle-wrapper`]:rn==="picture-circle"}),ki=Object.assign(Object.assign({},di==null?void 0:di.style),In);if(cr==="drag"){const Xr=tt()(bi,ri,`${ri}-drag`,{[`${ri}-drag-uploading`]:kn.some(ei=>ei.status==="uploading"),[`${ri}-drag-hover`]:gr==="dragover",[`${ri}-disabled`]:ar,[`${ri}-rtl`]:li==="rtl"});return yi(pe.createElement("span",{className:ci},pe.createElement("div",{className:Xr,style:ki,onDrop:Dr,onDragOver:Dr,onDragLeave:Dr},pe.createElement(ft,Object.assign({},Jr,{ref:Er,className:`${ri}-btn`}),pe.createElement("div",{className:`${ri}-drag-container`},Un))),gi()))}const Hi=tt()(ri,`${ri}-select`,{[`${ri}-disabled`]:ar}),oa=(Xr=>pe.createElement("div",{className:Hi,style:Xr},pe.createElement(ft,Object.assign({},Jr,{ref:Er}))))(Un?void 0:{display:"none"});return yi(rn==="picture-card"||rn==="picture-circle"?pe.createElement("span",{className:ci},gi(oa,!!Un)):pe.createElement("span",{className:ci},oa,gi()))};var qt=pe.forwardRef(Yt),vn=function(at,Mt){var Pt={};for(var Rt in at)Object.prototype.hasOwnProperty.call(at,Rt)&&Mt.indexOf(Rt)<0&&(Pt[Rt]=at[Rt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,Rt=Object.getOwnPropertySymbols(at);an<Rt.length;an++)Mt.indexOf(Rt[an])<0&&Object.prototype.propertyIsEnumerable.call(at,Rt[an])&&(Pt[Rt[an]]=at[Rt[an]]);return Pt},Sn=pe.forwardRef((at,Mt)=>{var{style:Pt,height:Rt}=at,an=vn(at,["style","height"]);return pe.createElement(qt,Object.assign({ref:Mt},an,{type:"drag",style:Object.assign(Object.assign({},Pt),{height:Rt})}))});const Bt=qt;Bt.Dragger=Sn,Bt.LIST_IGNORE=pt;var dn=Bt},99498:function(Mn,sn,ue){(function(pe){pe(ue(89780))})(function(pe){pe.defineOption("placeholder","",function(Se,Me,Ke){var ct=Ke&&Ke!=pe.Init;if(Me&&!ct)Se.on("blur",xe),Se.on("change",_e),Se.on("swapDoc",_e),pe.on(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose=function(){tt(Se)}),_e(Se);else if(!Me&&ct){Se.off("blur",xe),Se.off("change",_e),Se.off("swapDoc",_e),pe.off(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose),je(Se);var De=Se.getWrapperElement();De.className=De.className.replace(" CodeMirror-empty","")}Me&&!Se.hasFocus()&&xe(Se)});function je(Se){Se.state.placeholder&&(Se.state.placeholder.parentNode.removeChild(Se.state.placeholder),Se.state.placeholder=null)}function Fe(Se){je(Se);var Me=Se.state.placeholder=document.createElement("pre");Me.style.cssText="height: 0; overflow: visible",Me.style.direction=Se.getOption("direction"),Me.className="CodeMirror-placeholder CodeMirror-line-like";var Ke=Se.getOption("placeholder");typeof Ke=="string"&&(Ke=document.createTextNode(Ke)),Me.appendChild(Ke),Se.display.lineSpace.insertBefore(Me,Se.display.lineSpace.firstChild)}function tt(Se){setTimeout(function(){var Me=!1,Ke=Se.getInputField();Ke.nodeName=="TEXTAREA"?Me=!Ke.value:Se.lineCount()==1&&(Me=!/[^\u200b]/.test(Ke.querySelector(".CodeMirror-line").textContent)),Me?Fe(Se):je(Se)},20)}function xe(Se){Ae(Se)&&Fe(Se)}function _e(Se){var Me=Se.getWrapperElement(),Ke=Ae(Se);Me.className=Me.className.replace(" CodeMirror-empty","")+(Ke?" CodeMirror-empty":""),Ke?Fe(Se):je(Se)}function Ae(Se){return Se.lineCount()===1&&Se.getLine(0)===""}})},25717:function(Mn,sn,ue){(function(pe){pe(ue(89780))})(function(pe){var je={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=pe.Pos;pe.defineOption("autoCloseBrackets",!1,function(nt,dt,st){st&&st!=pe.Init&&(nt.removeKeyMap(xe),nt.state.closeBrackets=null),dt&&(_e(tt(dt,"pairs")),nt.state.closeBrackets=dt,nt.addKeyMap(xe))});function tt(nt,dt){return dt=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[dt]!=null?nt[dt]:je[dt]}var xe={Backspace:Me,Enter:Ke};function _e(nt){for(var dt=0;dt<nt.length;dt++){var st=nt.charAt(dt),wt="'"+st+"'";xe[wt]||(xe[wt]=Ae(st))}}_e(je.pairs+"`");function Ae(nt){return function(dt){return De(dt,nt)}}function Se(nt){var dt=nt.state.closeBrackets;if(!dt||dt.override)return dt;var st=nt.getModeAt(nt.getCursor());return st.closeBrackets||dt}function Me(nt){var dt=Se(nt);if(!dt||nt.getOption("disableInput"))return pe.Pass;for(var st=tt(dt,"pairs"),wt=nt.listSelections(),en=0;en<wt.length;en++){if(!wt[en].empty())return pe.Pass;var it=We(nt,wt[en].head);if(!it||st.indexOf(it)%2!=0)return pe.Pass}for(var en=wt.length-1;en>=0;en--){var mt=wt[en].head;nt.replaceRange("",Fe(mt.line,mt.ch-1),Fe(mt.line,mt.ch+1),"+delete")}}function Ke(nt){var dt=Se(nt),st=dt&&tt(dt,"explode");if(!st||nt.getOption("disableInput"))return pe.Pass;for(var wt=nt.listSelections(),en=0;en<wt.length;en++){if(!wt[en].empty())return pe.Pass;var it=We(nt,wt[en].head);if(!it||st.indexOf(it)%2!=0)return pe.Pass}nt.operation(function(){var mt=nt.lineSeparator()||`
|
|
|
`;nt.replaceSelection(mt+mt,null),nt.execCommand("goCharLeft"),wt=nt.listSelections();for(var Ze=0;Ze<wt.length;Ze++){var Ee=wt[Ze].head.line;nt.indentLine(Ee,null,!0),nt.indentLine(Ee+1,null,!0)}})}function ct(nt){var dt=pe.cmpPos(nt.anchor,nt.head)>0;return{anchor:new Fe(nt.anchor.line,nt.anchor.ch+(dt?-1:1)),head:new Fe(nt.head.line,nt.head.ch+(dt?1:-1))}}function De(nt,dt){var st=Se(nt);if(!st||nt.getOption("disableInput"))return pe.Pass;var wt=tt(st,"pairs"),en=wt.indexOf(dt);if(en==-1)return pe.Pass;for(var it=tt(st,"closeBefore"),mt=tt(st,"triples"),Ze=wt.charAt(en+1)==dt,Ee=nt.listSelections(),He=en%2==0,Ue,Ct=0;Ct<Ee.length;Ct++){var Ge=Ee[Ct],It=Ge.head,et,kt=nt.getRange(It,Fe(It.line,It.ch+1));if(He&&!Ge.empty())et="surround";else if((Ze||!He)&&kt==dt)Ze&&vt(nt,It)?et="both":mt.indexOf(dt)>=0&&nt.getRange(It,Fe(It.line,It.ch+3))==dt+dt+dt?et="skipThree":et="skip";else if(Ze&&It.ch>1&&mt.indexOf(dt)>=0&&nt.getRange(Fe(It.line,It.ch-2),It)==dt+dt){if(It.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Fe(It.line,It.ch-2))))return pe.Pass;et="addFour"}else if(Ze){var Je=It.ch==0?" ":nt.getRange(Fe(It.line,It.ch-1),It);if(!pe.isWordChar(kt)&&Je!=dt&&!pe.isWordChar(Je))et="both";else return pe.Pass}else if(He&&(kt.length===0||/\s/.test(kt)||it.indexOf(kt)>-1))et="both";else return pe.Pass;if(!Ue)Ue=et;else if(Ue!=et)return pe.Pass}var Ut=en%2?wt.charAt(en-1):dt,ft=en%2?dt:wt.charAt(en+1);nt.operation(function(){if(Ue=="skip")nt.execCommand("goCharRight");else if(Ue=="skipThree")for(var Dt=0;Dt<3;Dt++)nt.execCommand("goCharRight");else if(Ue=="surround"){for(var Et=nt.getSelections(),Dt=0;Dt<Et.length;Dt++)Et[Dt]=Ut+Et[Dt]+ft;nt.replaceSelections(Et,"around"),Et=nt.listSelections().slice();for(var Dt=0;Dt<Et.length;Dt++)Et[Dt]=ct(Et[Dt]);nt.setSelections(Et)}else Ue=="both"?(nt.replaceSelection(Ut+ft,null),nt.triggerElectric(Ut+ft),nt.execCommand("goCharLeft")):Ue=="addFour"&&(nt.replaceSelection(Ut+Ut+Ut+Ut,"before"),nt.execCommand("goCharRight"))})}function We(nt,dt){var st=nt.getRange(Fe(dt.line,dt.ch-1),Fe(dt.line,dt.ch+1));return st.length==2?st:null}function vt(nt,dt){var st=nt.getTokenAt(Fe(dt.line,dt.ch+1));return/\bstring/.test(st.type)&&st.start==dt.ch&&(dt.ch==0||!/\bstring/.test(nt.getTokenTypeAt(dt)))}})},6313:function(Mn,sn,ue){(function(pe){pe(ue(89780),ue(32855))})(function(pe){pe.defineOption("autoCloseTags",!1,function(Me,Ke,ct){if(ct!=pe.Init&&ct&&Me.removeKeyMap("autoCloseTags"),!!Ke){var De={name:"autoCloseTags"};(typeof Ke!="object"||Ke.whenClosing!==!1)&&(De["'/'"]=function(We){return _e(We)}),(typeof Ke!="object"||Ke.whenOpening!==!1)&&(De["'>'"]=function(We){return tt(We)}),Me.addKeyMap(De)}});var je=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["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 tt(Me){if(Me.getOption("disableInput"))return pe.Pass;for(var Ke=Me.listSelections(),ct=[],De=Me.getOption("autoCloseTags"),We=0;We<Ke.length;We++){if(!Ke[We].empty())return pe.Pass;var vt=Ke[We].head,nt=Me.getTokenAt(vt),dt=pe.innerMode(Me.getMode(),nt.state),st=dt.state,wt=dt.mode.xmlCurrentTag&&dt.mode.xmlCurrentTag(st),en=wt&&wt.name;if(!en)return pe.Pass;var it=dt.mode.configuration=="html",mt=typeof De=="object"&&De.dontCloseTags||it&&je,Ze=typeof De=="object"&&De.indentTags||it&&Fe;nt.end>vt.ch&&(en=en.slice(0,en.length-nt.end+vt.ch));var Ee=en.toLowerCase();if(!en||nt.type=="string"&&(nt.end!=vt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&wt.close||nt.string.indexOf("/")==vt.ch-nt.start-1||mt&&Ae(mt,Ee)>-1||Se(Me,dt.mode.xmlCurrentContext&&dt.mode.xmlCurrentContext(st)||[],en,vt,!0))return pe.Pass;var He=typeof De=="object"&&De.emptyTags;if(He&&Ae(He,en)>-1){ct[We]={text:"/>",newPos:pe.Pos(vt.line,vt.ch+2)};continue}var Ue=Ze&&Ae(Ze,Ee)>-1;ct[We]={indent:Ue,text:">"+(Ue?`
|
|
|
|
|
|
`:"")+"</"+en+">",newPos:Ue?pe.Pos(vt.line+1,0):pe.Pos(vt.line,vt.ch+1)}}for(var Ct=typeof De=="object"&&De.dontIndentOnAutoClose,We=Ke.length-1;We>=0;We--){var Ge=ct[We];Me.replaceRange(Ge.text,Ke[We].head,Ke[We].anchor,"+insert");var It=Me.listSelections().slice(0);It[We]={head:Ge.newPos,anchor:Ge.newPos},Me.setSelections(It),!Ct&&Ge.indent&&(Me.indentLine(Ge.newPos.line,null,!0),Me.indentLine(Ge.newPos.line+1,null,!0))}}function xe(Me,Ke){for(var ct=Me.listSelections(),De=[],We=Ke?"/":"</",vt=Me.getOption("autoCloseTags"),nt=typeof vt=="object"&&vt.dontIndentOnSlash,dt=0;dt<ct.length;dt++){if(!ct[dt].empty())return pe.Pass;var st=ct[dt].head,wt=Me.getTokenAt(st),en=pe.innerMode(Me.getMode(),wt.state),it=en.state;if(Ke&&(wt.type=="string"||wt.string.charAt(0)!="<"||wt.start!=st.ch-1))return pe.Pass;var mt,Ze=en.mode.name!="xml"&&Me.getMode().name=="htmlmixed";if(Ze&&en.mode.name=="javascript")mt=We+"script";else if(Ze&&en.mode.name=="css")mt=We+"style";else{var Ee=en.mode.xmlCurrentContext&&en.mode.xmlCurrentContext(it);if(!Ee||Ee.length&&Se(Me,Ee,Ee[Ee.length-1],st))return pe.Pass;mt=We+Ee[Ee.length-1]}Me.getLine(st.line).charAt(wt.end)!=">"&&(mt+=">"),De[dt]=mt}if(Me.replaceSelections(De),ct=Me.listSelections(),!nt)for(var dt=0;dt<ct.length;dt++)(dt==ct.length-1||ct[dt].head.line<ct[dt+1].head.line)&&Me.indentLine(ct[dt].head.line)}function _e(Me){return Me.getOption("disableInput")?pe.Pass:xe(Me,!0)}pe.commands.closeTag=function(Me){return xe(Me)};function Ae(Me,Ke){if(Me.indexOf)return Me.indexOf(Ke);for(var ct=0,De=Me.length;ct<De;++ct)if(Me[ct]==Ke)return ct;return-1}function Se(Me,Ke,ct,De,We){if(!pe.scanForClosingTag)return!1;var vt=Math.min(Me.lastLine()+1,De.line+500),nt=pe.scanForClosingTag(Me,De,null,vt);if(!nt||nt.tag!=ct)return!1;for(var dt=We?1:0,st=Ke.length-1;st>=0&&Ke[st]==ct;st--)++dt;De=nt.to;for(var st=1;st<dt;st++){var wt=pe.scanForClosingTag(Me,De,null,vt);if(!wt||wt.tag!=ct)return!1;De=wt.to}return!0}})},32855:function(Mn,sn,ue){(function(pe){pe(ue(89780))})(function(pe){"use strict";var je=pe.Pos;function Fe(st,wt){return st.line-wt.line||st.ch-wt.ch}var tt="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",xe=tt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_e=new RegExp("<(/?)(["+tt+"]["+xe+"]*)","g");function Ae(st,wt,en,it){this.line=wt,this.ch=en,this.cm=st,this.text=st.getLine(wt),this.min=it?Math.max(it.from,st.firstLine()):st.firstLine(),this.max=it?Math.min(it.to-1,st.lastLine()):st.lastLine()}function Se(st,wt){var en=st.cm.getTokenTypeAt(je(st.line,wt));return en&&/\btag\b/.test(en)}function Me(st){if(!(st.line>=st.max))return st.ch=0,st.text=st.cm.getLine(++st.line),!0}function Ke(st){if(!(st.line<=st.min))return st.text=st.cm.getLine(--st.line),st.ch=st.text.length,!0}function ct(st){for(;;){var wt=st.text.indexOf(">",st.ch);if(wt==-1){if(Me(st))continue;return}if(!Se(st,wt+1)){st.ch=wt+1;continue}var en=st.text.lastIndexOf("/",wt),it=en>-1&&!/\S/.test(st.text.slice(en+1,wt));return st.ch=wt+1,it?"selfClose":"regular"}}function De(st){for(;;){var wt=st.ch?st.text.lastIndexOf("<",st.ch-1):-1;if(wt==-1){if(Ke(st))continue;return}if(!Se(st,wt+1)){st.ch=wt;continue}_e.lastIndex=wt,st.ch=wt;var en=_e.exec(st.text);if(en&&en.index==wt)return en}}function We(st){for(;;){_e.lastIndex=st.ch;var wt=_e.exec(st.text);if(!wt){if(Me(st))continue;return}if(!Se(st,wt.index+1)){st.ch=wt.index+1;continue}return st.ch=wt.index+wt[0].length,wt}}function vt(st){for(;;){var wt=st.ch?st.text.lastIndexOf(">",st.ch-1):-1;if(wt==-1){if(Ke(st))continue;return}if(!Se(st,wt+1)){st.ch=wt;continue}var en=st.text.lastIndexOf("/",wt),it=en>-1&&!/\S/.test(st.text.slice(en+1,wt));return st.ch=wt+1,it?"selfClose":"regular"}}function nt(st,wt){for(var en=[];;){var it=We(st),mt,Ze=st.line,Ee=st.ch-(it?it[0].length:0);if(!it||!(mt=ct(st)))return;if(mt!="selfClose")if(it[1]){for(var He=en.length-1;He>=0;--He)if(en[He]==it[2]){en.length=He;break}if(He<0&&(!wt||wt==it[2]))return{tag:it[2],from:je(Ze,Ee),to:je(st.line,st.ch)}}else en.push(it[2])}}function dt(st,wt){for(var en=[];;){var it=vt(st);if(!it)return;if(it=="selfClose"){De(st);continue}var mt=st.line,Ze=st.ch,Ee=De(st);if(!Ee)return;if(Ee[1])en.push(Ee[2]);else{for(var He=en.length-1;He>=0;--He)if(en[He]==Ee[2]){en.length=He;break}if(He<0&&(!wt||wt==Ee[2]))return{tag:Ee[2],from:je(st.line,st.ch),to:je(mt,Ze)}}}}pe.registerHelper("fold","xml",function(st,wt){for(var en=new Ae(st,wt.line,0);;){var it=We(en);if(!it||en.line!=wt.line)return;var mt=ct(en);if(!mt)return;if(!it[1]&&mt!="selfClose"){var Ze=je(en.line,en.ch),Ee=nt(en,it[2]);return Ee&&Fe(Ee.from,Ze)>0?{from:Ze,to:Ee.from}:null}}}),pe.findMatchingTag=function(st,wt,en){var it=new Ae(st,wt.line,wt.ch,en);if(!(it.text.indexOf(">")==-1&&it.text.indexOf("<")==-1)){var mt=ct(it),Ze=mt&&je(it.line,it.ch),Ee=mt&&De(it);if(!(!mt||!Ee||Fe(it,wt)>0)){var He={from:je(it.line,it.ch),to:Ze,tag:Ee[2]};return mt=="selfClose"?{open:He,close:null,at:"open"}:Ee[1]?{open:dt(it,Ee[2]),close:He,at:"close"}:(it=new Ae(st,Ze.line,Ze.ch,en),{open:He,close:nt(it,Ee[2]),at:"open"})}}},pe.findEnclosingTag=function(st,wt,en,it){for(var mt=new Ae(st,wt.line,wt.ch,en);;){var Ze=dt(mt,it);if(!Ze)break;var Ee=new Ae(st,wt.line,wt.ch,en),He=nt(Ee,Ze.tag);if(He)return{open:Ze,close:He}}},pe.scanForClosingTag=function(st,wt,en,it){var mt=new Ae(st,wt.line,wt.ch,it?{from:0,to:it}:null);return nt(mt,en)}})},89780:function(Mn){(function(sn,ue){Mn.exports=ue()})(this,function(){"use strict";var sn=navigator.userAgent,ue=navigator.platform,pe=/gecko\/\d/i.test(sn),je=/MSIE \d/.test(sn),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(sn),tt=/Edge\/(\d+)/.exec(sn),xe=je||Fe||tt,_e=xe&&(je?document.documentMode||6:+(tt||Fe)[1]),Ae=!tt&&/WebKit\//.test(sn),Se=Ae&&/Qt\/\d+\.\d+/.test(sn),Me=!tt&&/Chrome\//.test(sn),Ke=/Opera\//.test(sn),ct=/Apple Computer/.test(navigator.vendor),De=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(sn),We=/PhantomJS/.test(sn),vt=!tt&&/AppleWebKit/.test(sn)&&/Mobile\/\w+/.test(sn),nt=/Android/.test(sn),dt=vt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(sn),st=vt||/Mac/.test(ue),wt=/\bCrOS\b/.test(sn),en=/win/i.test(ue),it=Ke&&sn.match(/Version\/(\d*\.\d*)/);it&&(it=Number(it[1])),it&&it>=15&&(Ke=!1,Ae=!0);var mt=st&&(Se||Ke&&(it==null||it<12.11)),Ze=pe||xe&&_e>=9;function Ee(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var He=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 Ue(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function Ct(x,z){return Ue(x).appendChild(z)}function Ge(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 ce=0;ce<z.length;++ce)ie.appendChild(z[ce]);return ie}function It(x,z,ne,te){var ie=Ge(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var et;document.createRange?et=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:et=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 kt(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 Je(){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 Ut(x,z){var ne=x.className;Ee(z).test(ne)||(x.className+=(ne?" ":"")+z)}function ft(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 Dt=function(x){x.select()};vt?Dt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:xe&&(Dt=function(x){try{x.select()}catch(z){}});function Et(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function ut(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 Be(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ce=te||0,ge=ie||0;;){var Ce=x.indexOf(" ",ce);if(Ce<0||Ce>=z)return ge+(z-ce);ge+=Ce-ce,ge+=ne-ge%ne,ce=Ce+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=Et(this.onTimeout,this)};be.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},be.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 ht(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var nn=50,Wt={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},Ye={origin:"*mouse"},At={origin:"+move"};function gn(x,z,ne){for(var te=0,ie=0;;){var ce=x.indexOf(" ",te);ce==-1&&(ce=x.length);var ge=ce-te;if(ce==x.length||ie+ge>=z)return te+Math.min(ge,z-ie);if(ie+=ce-te,ie+=ne-ie%ne,te=ce+1,ie>=z)return te}}var Jt=[""];function un(x){for(;Jt.length<=x;)Jt.push(Gt(Jt)+" ");return Jt[x]}function Gt(x){return x[x.length-1]}function Vt(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function Nt(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function ve(){}function se(x,z){var ne;return Object.create?ne=Object.create(x):(ve.prototype=x,ne=new ve),z&&ut(z,ne),ne}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function de(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||oe.test(x))}function fe(x,z){return z?z.source.indexOf("\\w")>-1&&de(x)?!0:z.test(x):de(x)}function le(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 ot(x){return x.charCodeAt(0)>=768&&Ie.test(x)}function Kt(x,z,ne){for(;(ne<0?z>0:z<x.length)&&ot(x.charAt(z));)z+=ne;return z}function Ft(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,ce=te<0?Math.ceil(ie):Math.floor(ie);if(ce==z)return x(ce)?z:ne;x(ce)?ne=ce:z=ce+te}}function Xt(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ce=0;ce<x.length;++ce){var ge=x[ce];(ge.from<ne&&ge.to>z||z==ne&&ge.to==z)&&(te(Math.max(ge.from,z),Math.min(ge.to,ne),ge.level==1?"rtl":"ltr",ce),ie=!0)}ie||te(z,ne,"ltr")}var Qt=null;function on(x,z,ne){var te;Qt=null;for(var ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.from<z&&ce.to>z)return ie;ce.to==z&&(ce.from!=ce.to&&ne=="before"?te=ie:Qt=ie),ce.from==z&&(ce.from!=ce.to&&ne!="before"?te=ie:Qt=ie)}return te!=null?te:Qt}var pn=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne(Re){return Re<=247?x.charAt(Re):1424<=Re&&Re<=1524?"R":1536<=Re&&Re<=1785?z.charAt(Re-1536):1774<=Re&&Re<=2220?"r":8192<=Re&&Re<=8203?"w":Re==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,ce=/[LRr]/,ge=/[Lb1n]/,Ce=/[1n]/;function Le(Re,gt,Lt){this.level=Re,this.from=gt,this.to=Lt}return function(Re,gt){var Lt=gt=="ltr"?"L":"R";if(Re.length==0||gt=="ltr"&&!te.test(Re))return!1;for(var fn=Re.length,ln=[],Bn=0;Bn<fn;++Bn)ln.push(ne(Re.charCodeAt(Bn)));for(var Wn=0,vr=Lt;Wn<fn;++Wn){var Ar=ln[Wn];Ar=="m"?ln[Wn]=vr:vr=Ar}for(var Rr=0,Cr=Lt;Rr<fn;++Rr){var Kr=ln[Rr];Kr=="1"&&Cr=="r"?ln[Rr]="n":ce.test(Kr)&&(Cr=Kr,Kr=="r"&&(ln[Rr]="R"))}for(var Qr=1,ti=ln[0];Qr<fn-1;++Qr){var Ci=ln[Qr];Ci=="+"&&ti=="1"&&ln[Qr+1]=="1"?ln[Qr]="1":Ci==","&&ti==ln[Qr+1]&&(ti=="1"||ti=="n")&&(ln[Qr]=ti),ti=Ci}for(var qi=0;qi<fn;++qi){var Na=ln[qi];if(Na==",")ln[qi]="N";else if(Na=="%"){var da=void 0;for(da=qi+1;da<fn&&ln[da]=="%";++da);for(var co=qi&&ln[qi-1]=="!"||da<fn&&ln[da]=="1"?"1":"N",uo=qi;uo<da;++uo)ln[uo]=co;qi=da-1}}for(var Ea=0,ho=Lt;Ea<fn;++Ea){var hi=ln[Ea];ho=="L"&&hi=="1"?ln[Ea]="L":ce.test(hi)&&(ho=hi)}for(var ma=0;ma<fn;++ma)if(ie.test(ln[ma])){var ha=void 0;for(ha=ma+1;ha<fn&&ie.test(ln[ha]);++ha);for(var ga=(ma?ln[ma-1]:Lt)=="L",ba=(ha<fn?ln[ha]:Lt)=="L",fl=ga==ba?ga?"L":"R":Lt,vo=ma;vo<ha;++vo)ln[vo]=fl;ma=ha-1}for(var Za=[],$i,Pa=0;Pa<fn;)if(ge.test(ln[Pa])){var au=Pa;for(++Pa;Pa<fn&&ge.test(ln[Pa]);++Pa);Za.push(new Le(0,au,Pa))}else{var bs=Pa,Ns=Za.length,Yo=gt=="rtl"?1:0;for(++Pa;Pa<fn&&ln[Pa]!="L";++Pa);for(var ka=bs;ka<Pa;)if(Ce.test(ln[ka])){bs<ka&&(Za.splice(Ns,0,new Le(1,bs,ka)),Ns+=Yo);var pl=ka;for(++ka;ka<Pa&&Ce.test(ln[ka]);++ka);Za.splice(Ns,0,new Le(2,pl,ka)),Ns+=Yo,bs=ka}else++ka;bs<Pa&&Za.splice(Ns,0,new Le(1,bs,Pa))}return gt=="ltr"&&(Za[0].level==1&&($i=Re.match(/^\s+/))&&(Za[0].from=$i[0].length,Za.unshift(new Le(0,0,$i[0].length))),Gt(Za).level==1&&($i=Re.match(/\s+$/))&&(Gt(Za).to-=$i[0].length,Za.push(new Le(0,fn-$i[0].length,fn)))),gt=="rtl"?Za.reverse():Za}}();function Cn(x,z){var ne=x.order;return ne==null&&(ne=x.order=pn(x.text,z)),ne}var bt=[],hn=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]||bt).concat(ne)}};function On(x,z){return x._handlers&&x._handlers[z]||bt}function rt(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 ce=ht(ie,ne);ce>-1&&(te[z]=ie.slice(0,ce).concat(ie.slice(ce+1)))}}}function ze(x,z){var ne=On(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 Xe(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),ze(x,ne||z.type,x,z),_n(z)||z.codemirrorIgnore}function jt(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)ht(ne,z[te])==-1&&ne.push(z[te])}function tn(x,z){return On(x,z).length>0}function cn(x){x.prototype.on=function(z,ne){hn(this,z,ne)},x.prototype.off=function(z,ne){rt(this,z,ne)}}function Dn(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Tn(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function _n(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Fn(x){Dn(x),Tn(x)}function jn(x){return x.target||x.srcElement}function An(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),st&&x.ctrlKey&&z==1&&(z=3),z}var hr=function(){if(xe&&_e<9)return!1;var x=Ge("div");return"draggable"in x||"dragDrop"in x}(),kr;function Tr(x){if(kr==null){var z=Ge("span","\u200B");Ct(x,Ge("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(kr=z.offsetWidth<=1&&z.offsetHeight>2&&!(xe&&_e<8))}var ne=kr?Ge("span","\u200B"):Ge("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var Hr;function sr(x){if(Hr!=null)return Hr;var z=Ct(x,document.createTextNode("A\u062EA")),ne=et(z,0,1).getBoundingClientRect(),te=et(z,1,2).getBoundingClientRect();return Ue(x),!ne||ne.left==ne.right?!1:Hr=te.right-ne.right<3}var Mr=`
|
|
|
|
|
|
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 ce=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),ge=ce.indexOf("\r");ge!=-1?(ne.push(ce.slice(0,ge)),z+=ge+1):(ne.push(ce),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},rr=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},Or=function(){var x=Ge("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),Fr=null;function _r(x){if(Fr!=null)return Fr;var z=Ct(x,Ge("span","x")),ne=z.getBoundingClientRect(),te=et(z,0,1).getBoundingClientRect();return Fr=Math.abs(ne.left-te.left)>1}var jr={},Nr={};function Jn(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),jr[x]=z}function lr(x,z){Nr[x]=z}function Rn(x){if(typeof x=="string"&&Nr.hasOwnProperty(x))x=Nr[x];else if(x&&typeof x.name=="string"&&Nr.hasOwnProperty(x.name)){var z=Nr[x.name];typeof z=="string"&&(z={name:z}),x=se(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return Rn("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return Rn("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function $n(x,z){z=Rn(z);var ne=jr[z.name];if(!ne)return $n(x,"text/plain");var te=ne(x,z);if(wr.hasOwnProperty(z.name)){var ie=wr[z.name];for(var ce in ie)ie.hasOwnProperty(ce)&&(te.hasOwnProperty(ce)&&(te["_"+ce]=te[ce]),te[ce]=ie[ce])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var ge in z.modeProps)te[ge]=z.modeProps[ge];return te}var wr={};function lt(x,z){var ne=wr.hasOwnProperty(x)?wr[x]:wr[x]={};ut(z,ne)}function ke(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 Oe(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 Te(x,z,ne){return x.startState?x.startState(z,ne):!0}var Pe=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};Pe.prototype.eol=function(){return this.pos>=this.string.length},Pe.prototype.sol=function(){return this.pos==this.lineStart},Pe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Pe.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},Pe.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},Pe.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},Pe.prototype.skipToEnd=function(){this.pos=this.string.length},Pe.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},Pe.prototype.backUp=function(x){this.pos-=x},Pe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Be(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Be(this.string,this.lineStart,this.tabSize):0)},Pe.prototype.indentation=function(){return Be(this.string,null,this.tabSize)-(this.lineStart?Be(this.string,this.lineStart,this.tabSize):0)},Pe.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(ge){return ne?ge.toLowerCase():ge},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var ce=this.string.slice(this.pos).match(x);return ce&&ce.index>0?null:(ce&&z!==!1&&(this.pos+=ce[0].length),ce)}},Pe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pe.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},Pe.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},Pe.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function Qe(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],ce=ie.chunkSize();if(z<ce){ne=ie;break}z-=ce}return ne.lines[z]}function pt(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ce){var ge=ce.text;ie==ne.line&&(ge=ge.slice(0,ne.ch)),ie==z.line&&(ge=ge.slice(z.ch)),te.push(ge),++ie}),te}function Yt(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function $t(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function qt(x){if(x.parent==null)return null;for(var z=x.parent,ne=ht(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 vn(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],ce=ie.height;if(z<ce){x=ie;continue e}z-=ce,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var ge=0;ge<x.lines.length;++ge){var Ce=x.lines[ge],Le=Ce.height;if(z<Le)break;z-=Le}return ne+ge}function wn(x,z){return z>=x.first&&z<x.first+x.size}function Sn(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function Bt(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof Bt))return new Bt(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function dn(x,z){return x.line-z.line||x.ch-z.ch}function at(x,z){return x.sticky==z.sticky&&dn(x,z)==0}function Mt(x){return Bt(x.line,x.ch)}function Pt(x,z){return dn(x,z)<0?z:x}function Rt(x,z){return dn(x,z)<0?x:z}function an(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function Tt(x,z){if(z.line<x.first)return Bt(x.first,0);var ne=x.first+x.size-1;return z.line>ne?Bt(ne,Qe(x,ne).text.length):rn(z,Qe(x,z.line).text.length)}function rn(x,z){var ne=x.ch;return ne==null||ne>z?Bt(x.line,z):ne<0?Bt(x.line,0):x}function $e(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=Tt(x,z[te]);return ne}var xt=function(x,z){this.state=x,this.lookAhead=z},St=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};St.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},St.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}},St.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},St.fromSaved=function(x,z,ne){return z instanceof xt?new St(x,ke(x.mode,z.state),ne,z.lookAhead):new St(x,ke(x.mode,z),ne)},St.prototype.save=function(x){var z=x!==!1?ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new xt(z,this.maxLookAhead):z};function zt(x,z,ne,te){var ie=[x.state.modeGen],ce={};cr(x,z.text,x.doc.mode,ne,function(Re,gt){return ie.push(Re,gt)},ce,te);for(var ge=ne.state,Ce=function(Re){ne.baseTokens=ie;var gt=x.state.overlays[Re],Lt=1,fn=0;ne.state=!0,cr(x,z.text,gt.mode,ne,function(ln,Bn){for(var Wn=Lt;fn<ln;){var vr=ie[Lt];vr>ln&&ie.splice(Lt,1,ln,ie[Lt+1],vr),Lt+=2,fn=Math.min(ln,vr)}if(Bn)if(gt.opaque)ie.splice(Wn,Lt-Wn,ln,"overlay "+Bn),Lt=Wn+2;else for(;Wn<Lt;Wn+=2){var Ar=ie[Wn+1];ie[Wn+1]=(Ar?Ar+" ":"")+"overlay "+Bn}},ce),ne.state=ge,ne.baseTokens=null,ne.baseTokenPos=1},Le=0;Le<x.state.overlays.length;++Le)Ce(Le);return{styles:ie,classes:ce.bgClass||ce.textClass?ce:null}}function Ot(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=Ht(x,qt(z)),ie=z.text.length>x.options.maxHighlightLength&&ke(x.doc.mode,te.state),ce=zt(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=ce.styles,ce.classes?z.styleClasses=ce.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 Ht(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new St(te,!0,z);var ce=Un(x,z,ne),ge=ce>te.first&&Qe(te,ce-1).stateAfter,Ce=ge?St.fromSaved(te,ge,ce):new St(te,Te(te.mode),ce);return te.iter(ce,z,function(Le){Zt(x,Le.text,Ce);var Re=Ce.line;Le.stateAfter=Re==z-1||Re%5==0||Re>=ie.viewFrom&&Re<ie.viewTo?Ce.save():null,Ce.nextLine()}),ne&&(te.modeFrontier=Ce.line),Ce}function Zt(x,z,ne,te){var ie=x.doc.mode,ce=new Pe(z,x.options.tabSize,ne);for(ce.start=ce.pos=te||0,z==""&&mn(ie,ne.state);!ce.eol();)xn(ie,ce,ne.state),ce.start=ce.pos}function mn(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=Oe(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function xn(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=Oe(x,ne).mode);var ce=x.token(z,ne);if(z.pos>z.start)return ce}throw new Error("Mode "+x.name+" failed to advance stream.")}var Ln=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function zn(x,z,ne,te){var ie=x.doc,ce=ie.mode,ge;z=Tt(ie,z);var Ce=Qe(ie,z.line),Le=Ht(x,z.line,ne),Re=new Pe(Ce.text,x.options.tabSize,Le),gt;for(te&&(gt=[]);(te||Re.pos<z.ch)&&!Re.eol();)Re.start=Re.pos,ge=xn(ce,Re,Le.state),te&>.push(new Ln(Re,ge,ke(ie.mode,Le.state)));return te?gt:new Ln(Re,ge,Le.state)}function er(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 cr(x,z,ne,te,ie,ce,ge){var Ce=ne.flattenSpans;Ce==null&&(Ce=x.options.flattenSpans);var Le=0,Re=null,gt=new Pe(z,x.options.tabSize,te),Lt,fn=x.options.addModeClass&&[null];for(z==""&&er(mn(ne,te.state),ce);!gt.eol();){if(gt.pos>x.options.maxHighlightLength?(Ce=!1,ge&&Zt(x,z,te,gt.pos),gt.pos=z.length,Lt=null):Lt=er(xn(ne,gt,te.state,fn),ce),fn){var ln=fn[0].name;ln&&(Lt="m-"+(Lt?ln+" "+Lt:ln))}if(!Ce||Re!=Lt){for(;Le<gt.start;)Le=Math.min(gt.start,Le+5e3),ie(Le,Re);Re=Lt}gt.start=gt.pos}for(;Le<gt.pos;){var Bn=Math.min(gt.pos,Le+5e3);ie(Bn,Re),Le=Bn}}function Un(x,z,ne){for(var te,ie,ce=x.doc,ge=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Ce=z;Ce>ge;--Ce){if(Ce<=ce.first)return ce.first;var Le=Qe(ce,Ce-1),Re=Le.stateAfter;if(Re&&(!ne||Ce+(Re instanceof xt?Re.lookAhead:0)<=ce.modeFrontier))return Ce;var gt=Be(Le.text,null,x.options.tabSize);(ie==null||te>gt)&&(ie=Ce-1,te=gt)}return ie}function In(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=Qe(x,te).stateAfter;if(ie&&(!(ie instanceof xt)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var fr=!1,tr=!1;function yr(){fr=!0}function Gn(){tr=!0}function Xn(x,z,ne){this.marker=x,this.from=z,this.to=ne}function br(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function ur(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function Br(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function Gr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ge=ce.marker,Ce=ce.from==null||(ge.inclusiveLeft?ce.from<=z:ce.from<z);if(Ce||ce.from==z&&ge.type=="bookmark"&&(!ne||!ce.marker.insertLeft)){var Le=ce.to==null||(ge.inclusiveRight?ce.to>=z:ce.to>z);(te||(te=[])).push(new Xn(ge,ce.from,Le?null:ce.to))}}return te}function ar(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ge=ce.marker,Ce=ce.to==null||(ge.inclusiveRight?ce.to>=z:ce.to>z);if(Ce||ce.from==z&&ge.type=="bookmark"&&(!ne||ce.marker.insertLeft)){var Le=ce.from==null||(ge.inclusiveLeft?ce.from<=z:ce.from<z);(te||(te=[])).push(new Xn(ge,Le?null:ce.from-z,ce.to==null?null:ce.to-z))}}return te}function kn(x,z){if(z.full)return null;var ne=wn(x,z.from.line)&&Qe(x,z.from.line).markedSpans,te=wn(x,z.to.line)&&Qe(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ce=z.to.ch,ge=dn(z.from,z.to)==0,Ce=Gr(ne,ie,ge),Le=ar(te,ce,ge),Re=z.text.length==1,gt=Gt(z.text).length+(Re?ie:0);if(Ce)for(var Lt=0;Lt<Ce.length;++Lt){var fn=Ce[Lt];if(fn.to==null){var ln=br(Le,fn.marker);ln?Re&&(fn.to=ln.to==null?null:ln.to+gt):fn.to=ie}}if(Le)for(var Bn=0;Bn<Le.length;++Bn){var Wn=Le[Bn];if(Wn.to!=null&&(Wn.to+=gt),Wn.from==null){var vr=br(Ce,Wn.marker);vr||(Wn.from=gt,Re&&(Ce||(Ce=[])).push(Wn))}else Wn.from+=gt,Re&&(Ce||(Ce=[])).push(Wn)}Ce&&(Ce=En(Ce)),Le&&Le!=Ce&&(Le=En(Le));var Ar=[Ce];if(!Re){var Rr=z.text.length-2,Cr;if(Rr>0&&Ce)for(var Kr=0;Kr<Ce.length;++Kr)Ce[Kr].to==null&&(Cr||(Cr=[])).push(new Xn(Ce[Kr].marker,null,null));for(var Qr=0;Qr<Rr;++Qr)Ar.push(Cr);Ar.push(Le)}return Ar}function En(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 gr(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(ln){if(ln.markedSpans)for(var Bn=0;Bn<ln.markedSpans.length;++Bn){var Wn=ln.markedSpans[Bn].marker;Wn.readOnly&&(!te||ht(te,Wn)==-1)&&(te||(te=[])).push(Wn)}}),!te)return null;for(var ie=[{from:z,to:ne}],ce=0;ce<te.length;++ce)for(var ge=te[ce],Ce=ge.find(0),Le=0;Le<ie.length;++Le){var Re=ie[Le];if(!(dn(Re.to,Ce.from)<0||dn(Re.from,Ce.to)>0)){var gt=[Le,1],Lt=dn(Re.from,Ce.from),fn=dn(Re.to,Ce.to);(Lt<0||!ge.inclusiveLeft&&!Lt)&>.push({from:Re.from,to:Ce.from}),(fn>0||!ge.inclusiveRight&&!fn)&>.push({from:Ce.to,to:Re.to}),ie.splice.apply(ie,gt),Le+=gt.length-3}}return ie}function nr(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Er(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function Lr(x){return x.inclusiveLeft?-1:0}function Ir(x){return x.inclusiveRight?1:0}function pr(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ce=dn(te.from,ie.from)||Lr(x)-Lr(z);if(ce)return-ce;var ge=dn(te.to,ie.to)||Ir(x)-Ir(z);return ge||z.id-x.id}function Sr(x,z){var ne=tr&&x.markedSpans,te;if(ne)for(var ie=void 0,ce=0;ce<ne.length;++ce)ie=ne[ce],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||pr(te,ie.marker)<0)&&(te=ie.marker);return te}function ii(x){return Sr(x,!0)}function Hn(x){return Sr(x,!1)}function qn(x,z){var ne=tr&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var ce=ne[ie];ce.marker.collapsed&&(ce.from==null||ce.from<z)&&(ce.to==null||ce.to>z)&&(!te||pr(te,ce.marker)<0)&&(te=ce.marker)}return te}function Dr(x,z,ne,te,ie){var ce=Qe(x,z),ge=tr&&ce.markedSpans;if(ge)for(var Ce=0;Ce<ge.length;++Ce){var Le=ge[Ce];if(Le.marker.collapsed){var Re=Le.marker.find(0),gt=dn(Re.from,ne)||Lr(Le.marker)-Lr(ie),Lt=dn(Re.to,te)||Ir(Le.marker)-Ir(ie);if(!(gt>=0&&Lt<=0||gt<=0&&Lt>=0)&&(gt<=0&&(Le.marker.inclusiveRight&&ie.inclusiveLeft?dn(Re.to,ne)>=0:dn(Re.to,ne)>0)||gt>=0&&(Le.marker.inclusiveRight&&ie.inclusiveLeft?dn(Re.from,te)<=0:dn(Re.from,te)<0)))return!0}}}function $r(x){for(var z;z=ii(x);)x=z.find(-1,!0).line;return x}function li(x){for(var z;z=Hn(x);)x=z.find(1,!0).line;return x}function di(x){for(var z,ne;z=Hn(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function ri(x,z){var ne=Qe(x,z),te=$r(ne);return ne==te?z:qt(te)}function Jr(x,z){if(z>x.lastLine())return z;var ne=Qe(x,z),te;if(!yi(x,ne))return z;for(;te=Hn(ne);)ne=te.find(1,!0).line;return qt(ne)+1}function yi(x,z){var ne=tr&&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&&bi(x,z,te))return!0}}}function bi(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return bi(x,te.line,br(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,ce=0;ce<z.markedSpans.length;++ce)if(ie=z.markedSpans[ce],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&bi(x,z,ie))return!0}function Yn(x){x=$r(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 ce=ne.parent;ce;ne=ce,ce=ne.parent)for(var ge=0;ge<ce.children.length;++ge){var Ce=ce.children[ge];if(Ce==ne)break;z+=Ce.height}return z}function Vn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=ii(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=Hn(te);){var ce=ne.find(0,!0);z-=te.text.length-ce.from.ch,te=ce.to.line,z+=te.text.length-ce.to.ch}return z}function Zn(x){var z=x.display,ne=x.doc;z.maxLine=Qe(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 mr=function(x,z,ne){this.text=x,Er(this,z),this.height=ne?ne(this):1};mr.prototype.lineNo=function(){return qt(this)},cn(mr);function ni(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),nr(x),Er(x,ne);var ie=te?te(x):1;ie!=x.height&&$t(x,ie)}function xi(x){x.parent=null,nr(x)}var Mi={},gi={};function ci(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?gi:Mi;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function ki(x,z){var ne=It("span",null,null,Ae?"padding-right: .1px":null),te={pre:It("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 ce=ie?z.rest[ie-1]:z.line,ge=void 0;te.pos=0,te.addToken=Ni,sr(x.display.measure)&&(ge=Cn(ce,x.doc.direction))&&(te.addToken=Xr(te.addToken,ge)),te.map=[];var Ce=z!=x.display.externalMeasured&&qt(ce);Ai(ce,te,Ot(x,ce,Ce)),ce.styleClasses&&(ce.styleClasses.bgClass&&(te.bgClass=ft(ce.styleClasses.bgClass,te.bgClass||"")),ce.styleClasses.textClass&&(te.textClass=ft(ce.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(Tr(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(Ae){var Le=te.content.lastChild;(/\bcm-tab\b/.test(Le.className)||Le.querySelector&&Le.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return ze(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=ft(te.pre.className,te.textClass||"")),te}function Hi(x){var z=Ge("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ni(x,z,ne,te,ie,ce,ge){if(z){var Ce=x.splitSpaces?oa(z,x.trailingSpace):z,Le=x.cm.state.specialChars,Re=!1,gt;if(!Le.test(z))x.col+=z.length,gt=document.createTextNode(Ce),x.map.push(x.pos,x.pos+z.length,gt),xe&&_e<9&&(Re=!0),x.pos+=z.length;else{gt=document.createDocumentFragment();for(var Lt=0;;){Le.lastIndex=Lt;var fn=Le.exec(z),ln=fn?fn.index-Lt:z.length-Lt;if(ln){var Bn=document.createTextNode(Ce.slice(Lt,Lt+ln));xe&&_e<9?gt.appendChild(Ge("span",[Bn])):gt.appendChild(Bn),x.map.push(x.pos,x.pos+ln,Bn),x.col+=ln,x.pos+=ln}if(!fn)break;Lt+=ln+1;var Wn=void 0;if(fn[0]==" "){var vr=x.cm.options.tabSize,Ar=vr-x.col%vr;Wn=gt.appendChild(Ge("span",un(Ar),"cm-tab")),Wn.setAttribute("role","presentation"),Wn.setAttribute("cm-text"," "),x.col+=Ar}else fn[0]=="\r"||fn[0]==`
|
|
|
`?(Wn=gt.appendChild(Ge("span",fn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Wn.setAttribute("cm-text",fn[0]),x.col+=1):(Wn=x.cm.options.specialCharPlaceholder(fn[0]),Wn.setAttribute("cm-text",fn[0]),xe&&_e<9?gt.appendChild(Ge("span",[Wn])):gt.appendChild(Wn),x.col+=1);x.map.push(x.pos,x.pos+1,Wn),x.pos++}}if(x.trailingSpace=Ce.charCodeAt(z.length-1)==32,ne||te||ie||Re||ce||ge){var Rr=ne||"";te&&(Rr+=te),ie&&(Rr+=ie);var Cr=Ge("span",[gt],Rr,ce);if(ge)for(var Kr in ge)ge.hasOwnProperty(Kr)&&Kr!="style"&&Kr!="class"&&Cr.setAttribute(Kr,ge[Kr]);return x.content.appendChild(Cr)}x.content.appendChild(gt)}}function oa(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var ce=x.charAt(ie);ce==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(ce="\xA0"),te+=ce,ne=ce==" "}return te}function Xr(x,z){return function(ne,te,ie,ce,ge,Ce,Le){ie=ie?ie+" cm-force-border":"cm-force-border";for(var Re=ne.pos,gt=Re+te.length;;){for(var Lt=void 0,fn=0;fn<z.length&&(Lt=z[fn],!(Lt.to>Re&&Lt.from<=Re));fn++);if(Lt.to>=gt)return x(ne,te,ie,ce,ge,Ce,Le);x(ne,te.slice(0,Lt.to-Re),ie,ce,null,Ce,Le),ce=null,te=te.slice(Lt.to-Re),Re=Lt.to}}}function ei(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 Ai(x,z,ne){var te=x.markedSpans,ie=x.text,ce=0;if(!te){for(var ge=1;ge<ne.length;ge+=2)z.addToken(z,ie.slice(ce,ce=ne[ge]),ci(ne[ge+1],z.cm.options));return}for(var Ce=ie.length,Le=0,Re=1,gt="",Lt,fn,ln=0,Bn,Wn,vr,Ar,Rr;;){if(ln==Le){Bn=Wn=vr=fn="",Rr=null,Ar=null,ln=1/0;for(var Cr=[],Kr=void 0,Qr=0;Qr<te.length;++Qr){var ti=te[Qr],Ci=ti.marker;if(Ci.type=="bookmark"&&ti.from==Le&&Ci.widgetNode)Cr.push(Ci);else if(ti.from<=Le&&(ti.to==null||ti.to>Le||Ci.collapsed&&ti.to==Le&&ti.from==Le)){if(ti.to!=null&&ti.to!=Le&&ln>ti.to&&(ln=ti.to,Wn=""),Ci.className&&(Bn+=" "+Ci.className),Ci.css&&(fn=(fn?fn+";":"")+Ci.css),Ci.startStyle&&ti.from==Le&&(vr+=" "+Ci.startStyle),Ci.endStyle&&ti.to==ln&&(Kr||(Kr=[])).push(Ci.endStyle,ti.to),Ci.title&&((Rr||(Rr={})).title=Ci.title),Ci.attributes)for(var qi in Ci.attributes)(Rr||(Rr={}))[qi]=Ci.attributes[qi];Ci.collapsed&&(!Ar||pr(Ar.marker,Ci)<0)&&(Ar=ti)}else ti.from>Le&&ln>ti.from&&(ln=ti.from)}if(Kr)for(var Na=0;Na<Kr.length;Na+=2)Kr[Na+1]==ln&&(Wn+=" "+Kr[Na]);if(!Ar||Ar.from==Le)for(var da=0;da<Cr.length;++da)ei(z,0,Cr[da]);if(Ar&&(Ar.from||0)==Le){if(ei(z,(Ar.to==null?Ce+1:Ar.to)-Le,Ar.marker,Ar.from==null),Ar.to==null)return;Ar.to==Le&&(Ar=!1)}}if(Le>=Ce)break;for(var co=Math.min(Ce,ln);;){if(gt){var uo=Le+gt.length;if(!Ar){var Ea=uo>co?gt.slice(0,co-Le):gt;z.addToken(z,Ea,Lt?Lt+Bn:Bn,vr,Le+Ea.length==ln?Wn:"",fn,Rr)}if(uo>=co){gt=gt.slice(co-Le),Le=co;break}Le=uo,vr=""}gt=ie.slice(ce,ce=ne[Re++]),Lt=ci(ne[Re++],z.cm.options)}}}function ai(x,z,ne){this.line=z,this.rest=di(z),this.size=this.rest?qt(Gt(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=yi(x,z)}function fi(x,z,ne){for(var te=[],ie,ce=z;ce<ne;ce=ie){var ge=new ai(x.doc,Qe(x.doc,ce),ce);ie=ce+ge.size,te.push(ge)}return te}var Ei=null;function pi(x){Ei?Ei.ops.push(x):x.ownsGroup=Ei={ops:[x],delayedCallbacks:[]}}function Pr(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 Yr(x,z){var ne=x.ownsGroup;if(ne)try{Pr(ne)}finally{Ei=null,z(ne)}}var Ur=null;function zr(x,z){var ne=On(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;Ei?ie=Ei.delayedCallbacks:Ur?ie=Ur:(ie=Ur=[],setTimeout(ui,0));for(var ce=function(Ce){ie.push(function(){return ne[Ce].apply(null,te)})},ge=0;ge<ne.length;++ge)ce(ge)}}function ui(){var x=Ur;Ur=null;for(var z=0;z<x.length;++z)x[z]()}function oi(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ce=z.changes[ie];ce=="text"?na(x,z):ce=="gutter"?vi(x,z,ne,te):ce=="class"?wi(x,z):ce=="widget"&&Gi(x,z,te)}z.changes=null}function zi(x){return x.node==x.text&&(x.node=Ge("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),xe&&_e<8&&(x.node.style.zIndex=2)),x.node}function Wi(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=zi(z);z.background=te.insertBefore(Ge("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function Zi(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):ki(x,z)}function na(x,z){var ne=z.text.className,te=Zi(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,wi(x,z)):ne&&(z.text.className=ne)}function wi(x,z){Wi(x,z),z.line.wrapClass?zi(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 vi(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=zi(z);z.gutterBackground=Ge("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 ce=z.line.gutterMarkers;if(x.options.lineNumbers||ce){var ge=zi(z),Ce=z.gutter=Ge("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Ce),ge.insertBefore(Ce,z.text),z.line.gutterClass&&(Ce.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ce||!ce["CodeMirror-linenumbers"])&&(z.lineNumber=Ce.appendChild(Ge("div",Sn(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ce)for(var Le=0;Le<x.display.gutterSpecs.length;++Le){var Re=x.display.gutterSpecs[Le].className,gt=ce.hasOwnProperty(Re)&&ce[Re];gt&&Ce.appendChild(Ge("div",[gt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Re]+"px; width: "+te.gutterWidth[Re]+"px"))}}}function Gi(x,z,ne){z.alignable&&(z.alignable=null);for(var te=Ee("CodeMirror-linewidget"),ie=z.node.firstChild,ce=void 0;ie;ie=ce)ce=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);sa(x,z,ne)}function ca(x,z,ne,te){var ie=Zi(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),wi(x,z),vi(x,z,ne,te),sa(x,z,te),z.node}function sa(x,z,ne){if(ta(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)ta(x,z.rest[te],z,ne,!1)}function ta(x,z,ne,te,ie){if(z.widgets)for(var ce=zi(ne),ge=0,Ce=z.widgets;ge<Ce.length;++ge){var Le=Ce[ge],Re=Ge("div",[Le.node],"CodeMirror-linewidget"+(Le.className?" "+Le.className:""));Le.handleMouseEvents||Re.setAttribute("cm-ignore-events","true"),ts(Le,Re,ne,te),x.display.input.setUneditable(Re),ie&&Le.above?ce.insertBefore(Re,ne.gutter||ne.text):ce.appendChild(Re),zr(Le,"redraw")}}function ts(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 ao(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!kt(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;"),Ct(z.display.measure,Ge("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function oo(x,z){for(var ne=jn(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 eo(x){return x.lineSpace.offsetTop}function Ss(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function fo(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=Ct(x.measure,Ge("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 _a(x){return nn-x.display.nativeBarWidth}function fa(x){return x.display.scroller.clientWidth-_a(x)-x.display.barWidth}function bo(x){return x.display.scroller.clientHeight-_a(x)-x.display.barHeight}function ko(x,z,ne){var te=x.options.lineWrapping,ie=te&&fa(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ce=z.measure.heights=[];if(te){z.measure.width=ie;for(var ge=z.text.firstChild.getClientRects(),Ce=0;Ce<ge.length-1;Ce++){var Le=ge[Ce],Re=ge[Ce+1];Math.abs(Le.bottom-Re.bottom)>2&&ce.push((Le.bottom+Re.top)/2-ne.top)}}ce.push(ne.bottom-ne.top)}}function _o(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(qt(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function ns(x,z){z=$r(z);var ne=qt(z),te=x.display.externalMeasured=new ai(x.doc,z,ne);te.lineN=ne;var ie=te.built=ki(x,te);return te.text=ie.pre,Ct(x.display.lineMeasure,ie.pre),te}function $o(x,z,ne,te){return Oi(x,Oa(x,z),ne,te)}function Xa(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[po(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function Oa(x,z){var ne=qt(z),te=Xa(x,ne);te&&!te.text?te=null:te&&te.changes&&(oi(x,te,ne,Bi(x)),x.curOp.forceUpdate=!0),te||(te=ns(x,z));var ie=_o(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Oi(x,z,ne,te,ie){z.before&&(ne=-1);var ce=ne+(te||""),ge;return z.cache.hasOwnProperty(ce)?ge=z.cache[ce]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(ko(x,z.view,z.rect),z.hasHeights=!0),ge=_i(x,z,ne,te),ge.bogus||(z.cache[ce]=ge)),{left:ge.left,right:ge.right,top:ie?ge.rtop:ge.top,bottom:ie?ge.rbottom:ge.bottom}}var Lo={left:0,right:0,top:0,bottom:0};function rs(x,z,ne){for(var te,ie,ce,ge,Ce,Le,Re=0;Re<x.length;Re+=3)if(Ce=x[Re],Le=x[Re+1],z<Ce?(ie=0,ce=1,ge="left"):z<Le?(ie=z-Ce,ce=ie+1):(Re==x.length-3||z==Le&&x[Re+3]>z)&&(ce=Le-Ce,ie=ce-1,z>=Le&&(ge="right")),ie!=null){if(te=x[Re+2],Ce==Le&&ne==(te.insertLeft?"left":"right")&&(ge=ne),ne=="left"&&ie==0)for(;Re&&x[Re-2]==x[Re-3]&&x[Re-1].insertLeft;)te=x[(Re-=3)+2],ge="left";if(ne=="right"&&ie==Le-Ce)for(;Re<x.length-3&&x[Re+3]==x[Re+4]&&!x[Re+5].insertLeft;)te=x[(Re+=3)+2],ge="right";break}return{node:te,start:ie,end:ce,collapse:ge,coverStart:Ce,coverEnd:Le}}function Do(x,z){var ne=Lo;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 _i(x,z,ne,te){var ie=rs(z.map,ne,te),ce=ie.node,ge=ie.start,Ce=ie.end,Le=ie.collapse,Re;if(ce.nodeType==3){for(var gt=0;gt<4;gt++){for(;ge&&ot(z.line.text.charAt(ie.coverStart+ge));)--ge;for(;ie.coverStart+Ce<ie.coverEnd&&ot(z.line.text.charAt(ie.coverStart+Ce));)++Ce;if(xe&&_e<9&&ge==0&&Ce==ie.coverEnd-ie.coverStart?Re=ce.parentNode.getBoundingClientRect():Re=Do(et(ce,ge,Ce).getClientRects(),te),Re.left||Re.right||ge==0)break;Ce=ge,ge=ge-1,Le="right"}xe&&_e<11&&(Re=mi(x.display.measure,Re))}else{ge>0&&(Le=te="right");var Lt;x.options.lineWrapping&&(Lt=ce.getClientRects()).length>1?Re=Lt[te=="right"?Lt.length-1:0]:Re=ce.getBoundingClientRect()}if(xe&&_e<9&&!ge&&(!Re||!Re.left&&!Re.right)){var fn=ce.parentNode.getClientRects()[0];fn?Re={left:fn.left,right:fn.left+Ii(x.display),top:fn.top,bottom:fn.bottom}:Re=Lo}for(var ln=Re.top-z.rect.top,Bn=Re.bottom-z.rect.top,Wn=(ln+Bn)/2,vr=z.view.measure.heights,Ar=0;Ar<vr.length-1&&!(Wn<vr[Ar]);Ar++);var Rr=Ar?vr[Ar-1]:0,Cr=vr[Ar],Kr={left:(Le=="right"?Re.right:Re.left)-z.rect.left,right:(Le=="left"?Re.left:Re.right)-z.rect.left,top:Rr,bottom:Cr};return!Re.left&&!Re.right&&(Kr.bogus=!0),x.options.singleCursorHeightPerLine||(Kr.rtop=ln,Kr.rbottom=Bn),Kr}function mi(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!_r(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 Ki(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 La(x){x.display.externalMeasure=null,Ue(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)Ki(x.display.view[z])}function Xi(x){La(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function $a(){return Me&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Fa(){return Me&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function to(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=ao(x.widgets[ne]));return z}function Ra(x,z,ne,te,ie){if(!ie){var ce=to(z);ne.top+=ce,ne.bottom+=ce}if(te=="line")return ne;te||(te="local");var ge=Yn(z);if(te=="local"?ge+=eo(x.display):ge-=x.display.viewOffset,te=="page"||te=="window"){var Ce=x.display.lineSpace.getBoundingClientRect();ge+=Ce.top+(te=="window"?0:Fa());var Le=Ce.left+(te=="window"?0:$a());ne.left+=Le,ne.right+=Le}return ne.top+=ge,ne.bottom+=ge,ne}function so(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=$a(),ie-=Fa();else if(ne=="local"||!ne){var ce=x.display.sizer.getBoundingClientRect();te+=ce.left,ie+=ce.top}var ge=x.display.lineSpace.getBoundingClientRect();return{left:te-ge.left,top:ie-ge.top}}function lo(x,z,ne,te,ie){return te||(te=Qe(x.doc,z.line)),Ra(x,te,$o(x,te,z.ch,ie),ne)}function Da(x,z,ne,te,ie,ce){te=te||Qe(x.doc,z.line),ie||(ie=Oa(x,te));function ge(Bn,Wn){var vr=Oi(x,ie,Bn,Wn?"right":"left",ce);return Wn?vr.left=vr.right:vr.right=vr.left,Ra(x,te,vr,ne)}var Ce=Cn(te,x.doc.direction),Le=z.ch,Re=z.sticky;if(Le>=te.text.length?(Le=te.text.length,Re="before"):Le<=0&&(Le=0,Re="after"),!Ce)return ge(Re=="before"?Le-1:Le,Re=="before");function gt(Bn,Wn,vr){var Ar=Ce[Wn],Rr=Ar.level==1;return ge(vr?Bn-1:Bn,Rr!=vr)}var Lt=on(Ce,Le,Re),fn=Qt,ln=gt(Le,Lt,Re=="before");return fn!=null&&(ln.other=gt(Le,fn,Re!="before")),ln}function bl(x,z){var ne=0;z=Tt(x.doc,z),x.options.lineWrapping||(ne=Ii(x.display)*z.ch);var te=Qe(x.doc,z.line),ie=Yn(te)+eo(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function jo(x,z,ne,te,ie){var ce=Bt(x,z,ne);return ce.xRel=ie,te&&(ce.outside=te),ce}function Js(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return jo(te.first,0,null,-1,-1);var ie=vn(te,ne),ce=te.first+te.size-1;if(ie>ce)return jo(te.first+te.size-1,Qe(te,ce).text.length,null,1,1);z<0&&(z=0);for(var ge=Qe(te,ie);;){var Ce=Ec(x,ge,ie,z,ne),Le=qn(ge,Ce.ch+(Ce.xRel>0||Ce.outside>0?1:0));if(!Le)return Ce;var Re=Le.find(1);if(Re.line==ie)return Re;ge=Qe(te,ie=Re.line)}}function Kl(x,z,ne,te){te-=to(z);var ie=z.text.length,ce=Ft(function(ge){return Oi(x,ne,ge-1).bottom<=te},ie,0);return ie=Ft(function(ge){return Oi(x,ne,ge).top>te},ce,ie),{begin:ce,end:ie}}function Hl(x,z,ne,te){ne||(ne=Oa(x,z));var ie=Ra(x,z,Oi(x,ne,te),"line").top;return Kl(x,z,ne,ie)}function Cs(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function Ec(x,z,ne,te,ie){ie-=Yn(z);var ce=Oa(x,z),ge=to(z),Ce=0,Le=z.text.length,Re=!0,gt=Cn(z,x.doc.direction);if(gt){var Lt=(x.options.lineWrapping?xl:is)(x,z,ne,ce,gt,te,ie);Re=Lt.level!=1,Ce=Re?Lt.from:Lt.to-1,Le=Re?Lt.to:Lt.from-1}var fn=null,ln=null,Bn=Ft(function(Qr){var ti=Oi(x,ce,Qr);return ti.top+=ge,ti.bottom+=ge,Cs(ti,te,ie,!1)?(ti.top<=ie&&ti.left<=te&&(fn=Qr,ln=ti),!0):!1},Ce,Le),Wn,vr,Ar=!1;if(ln){var Rr=te-ln.left<ln.right-te,Cr=Rr==Re;Bn=fn+(Cr?0:1),vr=Cr?"after":"before",Wn=Rr?ln.left:ln.right}else{!Re&&(Bn==Le||Bn==Ce)&&Bn++,vr=Bn==0?"after":Bn==z.text.length?"before":Oi(x,ce,Bn-(Re?1:0)).bottom+ge<=ie==Re?"after":"before";var Kr=Da(x,Bt(ne,Bn,vr),"line",z,ce);Wn=Kr.left,Ar=ie<Kr.top?-1:ie>=Kr.bottom?1:0}return Bn=Kt(z.text,Bn,1),jo(ne,Bn,vr,Ar,te-Wn)}function is(x,z,ne,te,ie,ce,ge){var Ce=Ft(function(Lt){var fn=ie[Lt],ln=fn.level!=1;return Cs(Da(x,Bt(ne,ln?fn.to:fn.from,ln?"before":"after"),"line",z,te),ce,ge,!0)},0,ie.length-1),Le=ie[Ce];if(Ce>0){var Re=Le.level!=1,gt=Da(x,Bt(ne,Re?Le.from:Le.to,Re?"after":"before"),"line",z,te);Cs(gt,ce,ge,!0)&>.top>ge&&(Le=ie[Ce-1])}return Le}function xl(x,z,ne,te,ie,ce,ge){var Ce=Kl(x,z,te,ge),Le=Ce.begin,Re=Ce.end;/\s/.test(z.text.charAt(Re-1))&&Re--;for(var gt=null,Lt=null,fn=0;fn<ie.length;fn++){var ln=ie[fn];if(!(ln.from>=Re||ln.to<=Le)){var Bn=ln.level!=1,Wn=Oi(x,te,Bn?Math.min(Re,ln.to)-1:Math.max(Le,ln.from)).right,vr=Wn<ce?ce-Wn+1e9:Wn-ce;(!gt||Lt>vr)&&(gt=ln,Lt=vr)}}return gt||(gt=ie[ie.length-1]),gt.from<Le&&(gt={from:Le,to:gt.to,level:gt.level}),gt.to>Re&&(gt={from:gt.from,to:Re,level:gt.level}),gt}var Vo;function as(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(Vo==null){Vo=Ge("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)Vo.appendChild(document.createTextNode("x")),Vo.appendChild(Ge("br"));Vo.appendChild(document.createTextNode("x"))}Ct(x.measure,Vo);var ne=Vo.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Ue(x.measure),ne||1}function Ii(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=Ge("span","xxxxxxxxxx"),ne=Ge("pre",[z],"CodeMirror-line-like");Ct(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function Bi(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ce=z.gutters.firstChild,ge=0;ce;ce=ce.nextSibling,++ge){var Ce=x.display.gutterSpecs[ge].className;ne[Ce]=ce.offsetLeft+ce.clientLeft+ie,te[Ce]=ce.clientWidth}return{fixedPos:ji(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function ji(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Ya(x){var z=as(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/Ii(x.display)-3);return function(ie){if(yi(x.doc,ie))return 0;var ce=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;ge++)ie.widgets[ge].height&&(ce+=ie.widgets[ge].height);return ne?ce+(Math.ceil(ie.text.length/te)||1)*z:ce+z}}function Aa(x){var z=x.doc,ne=Ya(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&$t(te,ie)})}function xo(x,z,ne,te){var ie=x.display;if(!ne&&jn(z).getAttribute("cm-not-content")=="true")return null;var ce,ge,Ce=ie.lineSpace.getBoundingClientRect();try{ce=z.clientX-Ce.left,ge=z.clientY-Ce.top}catch(Lt){return null}var Le=Js(x,ce,ge),Re;if(te&&Le.xRel>0&&(Re=Qe(x.doc,Le.line).text).length==Le.ch){var gt=Be(Re,Re.length,x.options.tabSize)-Re.length;Le=Bt(Le.line,Math.max(0,Math.round((ce-fo(x.display).left)/Ii(x.display))-gt))}return Le}function po(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 za(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)tr&&ri(x.doc,z)<ie.viewTo&&To(x);else if(ne<=ie.viewFrom)tr&&Jr(x.doc,ne+te)>ie.viewFrom?To(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)To(x);else if(z<=ie.viewFrom){var ce=wo(x,ne,ne+te,1);ce?(ie.view=ie.view.slice(ce.index),ie.viewFrom=ce.lineN,ie.viewTo+=te):To(x)}else if(ne>=ie.viewTo){var ge=wo(x,z,z,-1);ge?(ie.view=ie.view.slice(0,ge.index),ie.viewTo=ge.lineN):To(x)}else{var Ce=wo(x,z,z,-1),Le=wo(x,ne,ne+te,1);Ce&&Le?(ie.view=ie.view.slice(0,Ce.index).concat(fi(x,Ce.lineN,Le.lineN)).concat(ie.view.slice(Le.index)),ie.viewTo+=te):To(x)}var Re=ie.externalMeasured;Re&&(ne<Re.lineN?Re.lineN+=te:z<Re.lineN+Re.size&&(ie.externalMeasured=null))}function Ao(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 ce=te.view[po(x,z)];if(ce.node!=null){var ge=ce.changes||(ce.changes=[]);ht(ge,ne)==-1&&ge.push(ne)}}}function To(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function wo(x,z,ne,te){var ie=po(x,z),ce,ge=x.display.view;if(!tr||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var Ce=x.display.viewFrom,Le=0;Le<ie;Le++)Ce+=ge[Le].size;if(Ce!=z){if(te>0){if(ie==ge.length-1)return null;ce=Ce+ge[ie].size-z,ie++}else ce=Ce-z;z+=ce,ne+=ce}for(;ri(x.doc,ne)!=ne;){if(ie==(te<0?0:ge.length-1))return null;ne+=te*ge[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function os(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=fi(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=fi(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(po(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(fi(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,po(x,ne)))),te.viewTo=ne}function Wl(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 wl(x){x.display.input.showSelection(x.display.input.prepareSelection())}function Eu(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ce=te.selection=document.createDocumentFragment(),ge=0;ge<ne.sel.ranges.length;ge++)if(!(!z&&ge==ne.sel.primIndex)){var Ce=ne.sel.ranges[ge];if(!(Ce.from().line>=x.display.viewTo||Ce.to().line<x.display.viewFrom)){var Le=Ce.empty();(Le||x.options.showCursorWhenSelecting)&&ku(x,Ce.head,ie),Le||Od(x,Ce,ce)}}return te}function ku(x,z,ne){var te=Da(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(Ge("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 ce=ne.appendChild(Ge("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ce.style.display="",ce.style.left=te.other.left+"px",ce.style.top=te.other.top+"px",ce.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function Zl(x,z){return x.top-z.top||x.left-z.left}function Od(x,z,ne){var te=x.display,ie=x.doc,ce=document.createDocumentFragment(),ge=fo(x.display),Ce=ge.left,Le=Math.max(te.sizerWidth,fa(x)-te.sizer.offsetLeft)-ge.right,Re=ie.direction=="ltr";function gt(Cr,Kr,Qr,ti){Kr<0&&(Kr=0),Kr=Math.round(Kr),ti=Math.round(ti),ce.appendChild(Ge("div",null,"CodeMirror-selected","position: absolute; left: "+Cr+`px;
|
|
|
top: `+Kr+"px; width: "+(Qr==null?Le-Cr:Qr)+`px;
|
|
|
height: `+(ti-Kr)+"px"))}function Lt(Cr,Kr,Qr){var ti=Qe(ie,Cr),Ci=ti.text.length,qi,Na;function da(Ea,ho){return lo(x,Bt(Cr,Ea),"div",ti,ho)}function co(Ea,ho,hi){var ma=Hl(x,ti,null,Ea),ha=ho=="ltr"==(hi=="after")?"left":"right",ga=hi=="after"?ma.begin:ma.end-(/\s/.test(ti.text.charAt(ma.end-1))?2:1);return da(ga,ha)[ha]}var uo=Cn(ti,ie.direction);return Xt(uo,Kr||0,Qr==null?Ci:Qr,function(Ea,ho,hi,ma){var ha=hi=="ltr",ga=da(Ea,ha?"left":"right"),ba=da(ho-1,ha?"right":"left"),fl=Kr==null&&Ea==0,vo=Qr==null&&ho==Ci,Za=ma==0,$i=!uo||ma==uo.length-1;if(ba.top-ga.top<=3){var Pa=(Re?fl:vo)&&Za,au=(Re?vo:fl)&&$i,bs=Pa?Ce:(ha?ga:ba).left,Ns=au?Le:(ha?ba:ga).right;gt(bs,ga.top,Ns-bs,ga.bottom)}else{var Yo,ka,pl,ja;ha?(Yo=Re&&fl&&Za?Ce:ga.left,ka=Re?Le:co(Ea,hi,"before"),pl=Re?Ce:co(ho,hi,"after"),ja=Re&&vo&&$i?Le:ba.right):(Yo=Re?co(Ea,hi,"before"):Ce,ka=!Re&&fl&&Za?Le:ga.right,pl=!Re&&vo&&$i?Ce:ba.left,ja=Re?co(ho,hi,"after"):Le),gt(Yo,ga.top,ka-Yo,ga.bottom),ga.bottom<ba.top&>(Ce,ga.bottom,null,ba.top),gt(pl,ba.top,ja-pl,ba.bottom)}(!qi||Zl(ga,qi)<0)&&(qi=ga),Zl(ba,qi)<0&&(qi=ba),(!Na||Zl(ga,Na)<0)&&(Na=ga),Zl(ba,Na)<0&&(Na=ba)}),{start:qi,end:Na}}var fn=z.from(),ln=z.to();if(fn.line==ln.line)Lt(fn.line,fn.ch,ln.ch);else{var Bn=Qe(ie,fn.line),Wn=Qe(ie,ln.line),vr=$r(Bn)==$r(Wn),Ar=Lt(fn.line,fn.ch,vr?Bn.text.length+1:null).end,Rr=Lt(ln.line,vr?0:null,ln.ch).start;vr&&(Ar.top<Rr.top-2?(gt(Ar.right,Ar.top,null,Ar.bottom),gt(Ce,Rr.top,Rr.left,Rr.bottom)):gt(Ar.right,Ar.top,Rr.left-Ar.right,Ar.bottom)),Ar.bottom<Rr.top&>(Ce,Ar.bottom,null,Rr.top)}ne.appendChild(ce)}function kc(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()||qs(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Sl(x){x.state.focused||(x.display.input.focus(),_c(x))}function _u(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,qs(x))},100)}function _c(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(ze(x,"focus",x,z),x.state.focused=!0,Ut(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),Ae&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),kc(x))}function qs(x,z){x.state.delayingBlurEvent||(x.state.focused&&(ze(x,"blur",x,z),x.state.focused=!1,He(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function jl(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ce=x.options.lineWrapping,ge=void 0,Ce=0;if(!ie.hidden){if(xe&&_e<8){var Le=ie.node.offsetTop+ie.node.offsetHeight;ge=Le-ne,ne=Le}else{var Re=ie.node.getBoundingClientRect();ge=Re.bottom-Re.top,!ce&&ie.text.firstChild&&(Ce=ie.text.firstChild.getBoundingClientRect().right-Re.left-1)}var gt=ie.line.height-ge;if((gt>.005||gt<-.005)&&($t(ie.line,ge),Lu(ie.line),ie.rest))for(var Lt=0;Lt<ie.rest.length;Lt++)Lu(ie.rest[Lt]);if(Ce>x.display.sizerWidth){var fn=Math.ceil(Ce/Ii(x.display));fn>x.display.maxLineLength&&(x.display.maxLineLength=fn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function Lu(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 Ta(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-eo(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ce=vn(z,te),ge=vn(z,ie);if(ne&&ne.ensure){var Ce=ne.ensure.from.line,Le=ne.ensure.to.line;Ce<ce?(ce=Ce,ge=vn(z,Yn(Qe(z,Ce))+x.wrapper.clientHeight)):Math.min(Le,z.lastLine())>=ge&&(ce=vn(z,Yn(Qe(z,Le))-x.wrapper.clientHeight),ge=Le)}return{from:ce,to:Math.max(ge,ce+1)}}function ss(x,z){if(!Xe(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&&!We){var ce=Ge("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-eo(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+_a(x)+ne.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(ce),ce.scrollIntoView(ie),x.display.lineSpace.removeChild(ce)}}}function Ms(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?Bt(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?Bt(z.line,z.ch+1,"before"):z);for(var ce=0;ce<5;ce++){var ge=!1,Ce=Da(x,z),Le=!ne||ne==z?Ce:Da(x,ne);ie={left:Math.min(Ce.left,Le.left),top:Math.min(Ce.top,Le.top)-te,right:Math.max(Ce.left,Le.left),bottom:Math.max(Ce.bottom,Le.bottom)+te};var Re=Vl(x,ie),gt=x.doc.scrollTop,Lt=x.doc.scrollLeft;if(Re.scrollTop!=null&&(Es(x,Re.scrollTop),Math.abs(x.doc.scrollTop-gt)>1&&(ge=!0)),Re.scrollLeft!=null&&(ks(x,Re.scrollLeft),Math.abs(x.doc.scrollLeft-Lt)>1&&(ge=!0)),!ge)break}return ie}function $d(x,z){var ne=Vl(x,z);ne.scrollTop!=null&&Es(x,ne.scrollTop),ne.scrollLeft!=null&&ks(x,ne.scrollLeft)}function Vl(x,z){var ne=x.display,te=as(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ce=bo(x),ge={};z.bottom-z.top>ce&&(z.bottom=z.top+ce);var Ce=x.doc.height+Ss(ne),Le=z.top<te,Re=z.bottom>Ce-te;if(z.top<ie)ge.scrollTop=Le?0:z.top;else if(z.bottom>ie+ce){var gt=Math.min(z.top,(Re?Ce:z.bottom)-ce);gt!=ie&&(ge.scrollTop=gt)}var Lt=x.options.fixedGutter?0:ne.gutters.offsetWidth,fn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Lt,ln=fa(x)-ne.gutters.offsetWidth,Bn=z.right-z.left>ln;return Bn&&(z.right=z.left+ln),z.left<10?ge.scrollLeft=0:z.left<fn?ge.scrollLeft=Math.max(0,z.left+Lt-(Bn?0:10)):z.right>ln+fn-3&&(ge.scrollLeft=z.right+(Bn?0:10)-ln),ge}function Lc(x,z){z!=null&&(Ul(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function Qs(x){Ul(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function el(x,z,ne){(z!=null||ne!=null)&&Ul(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Rd(x,z){Ul(x),x.curOp.scrollToPos=z}function Ul(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=bl(x,z.from),te=bl(x,z.to);Du(x,ne,te,z.margin)}}function Du(x,z,ne,te){var ie=Vl(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});el(x,ie.scrollLeft,ie.scrollTop)}function Es(x,z){Math.abs(x.doc.scrollTop-z)<2||(pe||Tc(x,{top:z}),Au(x,z,!0),pe&&Tc(x),nl(x,100))}function Au(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 ks(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,$u(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function tl(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+Ss(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+_a(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var ls=function(x,z,ne){this.cm=ne;var te=this.vert=Ge("div",[Ge("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=Ge("div",[Ge("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),hn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),hn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xe&&_e<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ls.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 ce=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+ce)+"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}},ls.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ls.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ls.prototype.zeroWidthHack=function(){var x=st&&!De?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new be,this.disableVert=new be},ls.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),ce=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);ce!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},ls.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var mo=function(){};mo.prototype.update=function(){return{bottom:0,right:0}},mo.prototype.setScrollLeft=function(){},mo.prototype.setScrollTop=function(){},mo.prototype.clear=function(){};function _s(x,z){z||(z=tl(x));var ne=x.display.barWidth,te=x.display.barHeight;Dc(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&jl(x),Dc(x,tl(x)),ne=x.display.barWidth,te=x.display.barHeight}function Dc(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 Tu={native:ls,null:mo};function Iu(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&He(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new Tu[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),hn(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"?ks(x,z):Es(x,z)},x),x.display.scrollbars.addClass&&Ut(x.display.wrapper,x.display.scrollbars.addClass)}var Nd=0;function Ls(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:++Nd},pi(x.curOp)}function cs(x){var z=x.curOp;z&&Yr(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;Fd(ne)})}function Fd(x){for(var z=x.ops,ne=0;ne<z.length;ne++)zd(z[ne]);for(var te=0;te<z.length;te++)Kd(z[te]);for(var ie=0;ie<z.length;ie++)Hd(z[ie]);for(var ce=0;ce<z.length;ce++)Wd(z[ce]);for(var ge=0;ge<z.length;ge++)Zd(z[ge])}function zd(x){var z=x.cm,ne=z.display;Bu(z),x.updateMaxLine&&Zn(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 Gl(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function Kd(x){x.updatedDisplay=x.mustUpdate&&Ac(x.cm,x.update)}function Hd(x){var z=x.cm,ne=z.display;x.updatedDisplay&&jl(z),x.barMeasure=tl(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=$o(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+_a(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-fa(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Wd(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&ks(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==Je();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&_s(z,x.barMeasure),x.updatedDisplay&&Pc(z,x.barMeasure),x.selectionChanged&&kc(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Sl(x.cm)}function Zd(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&Ou(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Au(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&ks(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=Ms(z,Tt(te,x.scrollToPos.from),Tt(te,x.scrollToPos.to),x.scrollToPos.margin);ss(z,ie)}var ce=x.maybeHiddenMarkers,ge=x.maybeUnhiddenMarkers;if(ce)for(var Ce=0;Ce<ce.length;++Ce)ce[Ce].lines.length||ze(ce[Ce],"hide");if(ge)for(var Le=0;Le<ge.length;++Le)ge[Le].lines.length&&ze(ge[Le],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&ze(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function pa(x,z){if(x.curOp)return z();Ls(x);try{return z()}finally{cs(x)}}function Sa(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ls(x);try{return z.apply(x,arguments)}finally{cs(x)}}}function ua(x){return function(){if(this.curOp)return x.apply(this,arguments);Ls(this);try{return x.apply(this,arguments)}finally{cs(this)}}}function Ia(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ls(z);try{return x.apply(this,arguments)}finally{cs(z)}}}function nl(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,Et(Pu,x))}function Pu(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=Ht(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(ce){if(te.line>=x.display.viewFrom){var ge=ce.styles,Ce=ce.text.length>x.options.maxHighlightLength?ke(z.mode,te.state):null,Le=zt(x,ce,te,!0);Ce&&(te.state=Ce),ce.styles=Le.styles;var Re=ce.styleClasses,gt=Le.classes;gt?ce.styleClasses=gt:Re&&(ce.styleClasses=null);for(var Lt=!ge||ge.length!=ce.styles.length||Re!=gt&&(!Re||!gt||Re.bgClass!=gt.bgClass||Re.textClass!=gt.textClass),fn=0;!Lt&&fn<ge.length;++fn)Lt=ge[fn]!=ce.styles[fn];Lt&&ie.push(te.line),ce.stateAfter=te.save(),te.nextLine()}else ce.text.length<=x.options.maxHighlightLength&&Zt(x,ce.text,te),ce.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return nl(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&pa(x,function(){for(var ce=0;ce<ie.length;ce++)Ao(x,ie[ce],"text")})}}var Gl=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=Ta(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=fa(x),this.force=ne,this.dims=Bi(x),this.events=[]};Gl.prototype.signal=function(x,z){tn(x,z)&&this.events.push(arguments)},Gl.prototype.finish=function(){for(var x=0;x<this.events.length;x++)ze.apply(null,this.events[x])};function Bu(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=_a(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=_a(x)+"px",z.scrollbarsClipped=!0)}function jd(x){if(x.hasFocus())return null;var z=Je();if(!z||!kt(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&kt(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==Je())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&kt(document.body,x.anchorNode)&&kt(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 Ac(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return To(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&&Wl(x)==0)return!1;Xl(x)&&(To(x),z.dims=Bi(x));var ie=te.first+te.size,ce=Math.max(z.visible.from-x.options.viewportMargin,te.first),ge=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<ce&&ce-ne.viewFrom<20&&(ce=Math.max(te.first,ne.viewFrom)),ne.viewTo>ge&&ne.viewTo-ge<20&&(ge=Math.min(ie,ne.viewTo)),tr&&(ce=ri(x.doc,ce),ge=Jr(x.doc,ge));var Ce=ce!=ne.viewFrom||ge!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;os(x,ce,ge),ne.viewOffset=Yn(Qe(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Le=Wl(x);if(!Ce&&Le==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Re=jd(x);return Le>4&&(ne.lineDiv.style.display="none"),Ud(x,ne.updateLineNumbers,z.dims),Le>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Vd(Re),Ue(ne.cursorDiv),Ue(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Ce&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,nl(x,400)),ne.updateLineNumbers=null,!0}function Ou(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==fa(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+Ss(x.display)-bo(x),ne.top)}),z.visible=Ta(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=Ta(x.display,x.doc,ne));if(!Ac(x,z))break;jl(x);var ie=tl(x);wl(x),_s(x,ie),Pc(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 Tc(x,z){var ne=new Gl(x,z);if(Ac(x,ne)){jl(x),Ou(x,ne);var te=tl(x);wl(x),_s(x,te),Pc(x,te),ne.finish()}}function Ud(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ce=te.lineDiv,ge=ce.firstChild;function Ce(Bn){var Wn=Bn.nextSibling;return Ae&&st&&x.display.currentWheelTarget==Bn?Bn.style.display="none":Bn.parentNode.removeChild(Bn),Wn}for(var Le=te.view,Re=te.viewFrom,gt=0;gt<Le.length;gt++){var Lt=Le[gt];if(!Lt.hidden)if(!Lt.node||Lt.node.parentNode!=ce){var fn=ca(x,Lt,Re,ne);ce.insertBefore(fn,ge)}else{for(;ge!=Lt.node;)ge=Ce(ge);var ln=ie&&z!=null&&z<=Re&&Lt.lineNumber;Lt.changes&&(ht(Lt.changes,"gutter")>-1&&(ln=!1),oi(x,Lt,Re,ne)),ln&&(Ue(Lt.lineNumber),Lt.lineNumber.appendChild(document.createTextNode(Sn(x.options,Re)))),ge=Lt.node.nextSibling}Re+=Lt.size}for(;ge;)ge=Ce(ge)}function Ic(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Pc(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+_a(x)+"px"}function $u(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=ji(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ce=te+"px",ge=0;ge<ne.length;ge++)if(!ne[ge].hidden){x.options.fixedGutter&&(ne[ge].gutter&&(ne[ge].gutter.style.left=ce),ne[ge].gutterBackground&&(ne[ge].gutterBackground.style.left=ce));var Ce=ne[ge].alignable;if(Ce)for(var Le=0;Le<Ce.length;Le++)Ce[Le].style.left=ce}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function Xl(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=Sn(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(Ge("div",[Ge("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ce=ie.firstChild.offsetWidth,ge=ie.offsetWidth-ce;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ce,te.lineGutter.offsetWidth-ge)+1,te.lineNumWidth=te.lineNumInnerWidth+ge,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Ic(x.display),!0}return!1}function Bc(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ce=x[ie],ge=null;if(typeof ce!="string"&&(ge=ce.style,ce=ce.className),ce=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ce,style:ge})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function Ru(x){var z=x.gutters,ne=x.gutterSpecs;Ue(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ce=ie.className,ge=ie.style,Ce=z.appendChild(Ge("div",null,"CodeMirror-gutter "+ce));ge&&(Ce.style.cssText=ge),ce=="CodeMirror-linenumbers"&&(x.lineGutter=Ce,Ce.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Ic(x)}function Cl(x){Ru(x.display),za(x),$u(x)}function Gd(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=Ge("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=Ge("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=It("div",null,"CodeMirror-code"),ie.selectionDiv=Ge("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=Ge("div",null,"CodeMirror-cursors"),ie.measure=Ge("div",null,"CodeMirror-measure"),ie.lineMeasure=Ge("div",null,"CodeMirror-measure"),ie.lineSpace=It("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ce=It("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=Ge("div",[ce],null,"position: relative"),ie.sizer=Ge("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=Ge("div",null,null,"position: absolute; height: "+nn+"px; width: 1px;"),ie.gutters=Ge("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=Ge("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=Ge("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),xe&&_e<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Ae&&!(pe&&dt)&&(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=Bc(te.gutters,te.lineNumbers),Ru(ie),ne.init(ie)}var Yl=0,Ka=null;xe?Ka=-.53:pe?Ka=15:Me?Ka=-.7:ct&&(Ka=-1/3);function rl(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 Nu(x){var z=rl(x);return z.x*=Ka,z.y*=Ka,z}function Fu(x,z){var ne=rl(z),te=ne.x,ie=ne.y,ce=x.display,ge=ce.scroller,Ce=ge.scrollWidth>ge.clientWidth,Le=ge.scrollHeight>ge.clientHeight;if(te&&Ce||ie&&Le){if(ie&&st&&Ae){e:for(var Re=z.target,gt=ce.view;Re!=ge;Re=Re.parentNode)for(var Lt=0;Lt<gt.length;Lt++)if(gt[Lt].node==Re){x.display.currentWheelTarget=Re;break e}}if(te&&!pe&&!Ke&&Ka!=null){ie&&Le&&Es(x,Math.max(0,ge.scrollTop+ie*Ka)),ks(x,Math.max(0,ge.scrollLeft+te*Ka)),(!ie||ie&&Le)&&Dn(z),ce.wheelStartX=null;return}if(ie&&Ka!=null){var fn=ie*Ka,ln=x.doc.scrollTop,Bn=ln+ce.wrapper.clientHeight;fn<0?ln=Math.max(0,ln+fn-50):Bn=Math.min(x.doc.height,Bn+fn+50),Tc(x,{top:ln,bottom:Bn})}Yl<20&&(ce.wheelStartX==null?(ce.wheelStartX=ge.scrollLeft,ce.wheelStartY=ge.scrollTop,ce.wheelDX=te,ce.wheelDY=ie,setTimeout(function(){if(ce.wheelStartX!=null){var Wn=ge.scrollLeft-ce.wheelStartX,vr=ge.scrollTop-ce.wheelStartY,Ar=vr&&ce.wheelDY&&vr/ce.wheelDY||Wn&&ce.wheelDX&&Wn/ce.wheelDX;ce.wheelStartX=ce.wheelStartY=null,Ar&&(Ka=(Ka*Yl+Ar)/(Yl+1),++Yl)}},200)):(ce.wheelDX+=te,ce.wheelDY+=ie))}}var go=function(x,z){this.ranges=x,this.primIndex=z};go.prototype.primary=function(){return this.ranges[this.primIndex]},go.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(!at(ne.anchor,te.anchor)||!at(ne.head,te.head))return!1}return!0},go.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new Fi(Mt(this.ranges[z].anchor),Mt(this.ranges[z].head));return new go(x,this.primIndex)},go.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},go.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(dn(z,te.from())>=0&&dn(x,te.to())<=0)return ne}return-1};var Fi=function(x,z){this.anchor=x,this.head=z};Fi.prototype.from=function(){return Rt(this.anchor,this.head)},Fi.prototype.to=function(){return Pt(this.anchor,this.head)},Fi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Io(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(fn,ln){return dn(fn.from(),ln.from())}),ne=ht(z,ie);for(var ce=1;ce<z.length;ce++){var ge=z[ce],Ce=z[ce-1],Le=dn(Ce.to(),ge.from());if(te&&!ge.empty()?Le>0:Le>=0){var Re=Rt(Ce.from(),ge.from()),gt=Pt(Ce.to(),ge.to()),Lt=Ce.empty()?ge.from()==ge.head:Ce.from()==Ce.head;ce<=ne&&--ne,z.splice(--ce,2,new Fi(Lt?gt:Re,Lt?Re:gt))}}return new go(z,ne)}function Ro(x,z){return new go([new Fi(x,z||x)],0)}function us(x){return x.text?Bt(x.from.line+x.text.length-1,Gt(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function zu(x,z){if(dn(x,z.from)<0)return x;if(dn(x,z.to)<=0)return us(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+=us(z).ch-z.to.ch),Bt(ne,te)}function Oc(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new Fi(zu(ie.anchor,z),zu(ie.head,z)))}return Io(x.cm,ne,x.sel.primIndex)}function il(x,z,ne){return x.line==z.line?Bt(ne.line,x.ch-z.ch+ne.ch):Bt(ne.line+(x.line-z.line),x.ch)}function $c(x,z,ne){for(var te=[],ie=Bt(x.first,0),ce=ie,ge=0;ge<z.length;ge++){var Ce=z[ge],Le=il(Ce.from,ie,ce),Re=il(us(Ce),ie,ce);if(ie=Ce.to,ce=Re,ne=="around"){var gt=x.sel.ranges[ge],Lt=dn(gt.head,gt.anchor)<0;te[ge]=new Fi(Lt?Re:Le,Lt?Le:Re)}else te[ge]=new Fi(Le,Le)}return new go(te,x.sel.primIndex)}function Rc(x){x.doc.mode=$n(x.options,x.doc.modeOption),al(x)}function al(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,nl(x,100),x.state.modeGen++,x.curOp&&za(x)}function Ku(x,z){return z.from.ch==0&&z.to.ch==0&&Gt(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Nc(x,z,ne,te){function ie(Rr){return ne?ne[Rr]:null}function ce(Rr,Cr,Kr){ni(Rr,Cr,Kr,te),zr(Rr,"change",Rr,z)}function ge(Rr,Cr){for(var Kr=[],Qr=Rr;Qr<Cr;++Qr)Kr.push(new mr(Re[Qr],ie(Qr),te));return Kr}var Ce=z.from,Le=z.to,Re=z.text,gt=Qe(x,Ce.line),Lt=Qe(x,Le.line),fn=Gt(Re),ln=ie(Re.length-1),Bn=Le.line-Ce.line;if(z.full)x.insert(0,ge(0,Re.length)),x.remove(Re.length,x.size-Re.length);else if(Ku(x,z)){var Wn=ge(0,Re.length-1);ce(Lt,Lt.text,ln),Bn&&x.remove(Ce.line,Bn),Wn.length&&x.insert(Ce.line,Wn)}else if(gt==Lt)if(Re.length==1)ce(gt,gt.text.slice(0,Ce.ch)+fn+gt.text.slice(Le.ch),ln);else{var vr=ge(1,Re.length-1);vr.push(new mr(fn+gt.text.slice(Le.ch),ln,te)),ce(gt,gt.text.slice(0,Ce.ch)+Re[0],ie(0)),x.insert(Ce.line+1,vr)}else if(Re.length==1)ce(gt,gt.text.slice(0,Ce.ch)+Re[0]+Lt.text.slice(Le.ch),ie(0)),x.remove(Ce.line+1,Bn);else{ce(gt,gt.text.slice(0,Ce.ch)+Re[0],ie(0)),ce(Lt,fn+Lt.text.slice(Le.ch),ln);var Ar=ge(1,Re.length-1);Bn>1&&x.remove(Ce.line+1,Bn-1),x.insert(Ce.line+1,Ar)}zr(x,"change",x,z)}function ds(x,z,ne){function te(ie,ce,ge){if(ie.linked)for(var Ce=0;Ce<ie.linked.length;++Ce){var Le=ie.linked[Ce];if(Le.doc!=ce){var Re=ge&&Le.sharedHist;ne&&!Re||(z(Le.doc,Re),te(Le.doc,ie,Re))}}}te(x,null,!0)}function Jl(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,Aa(x),Rc(x),ql(x),x.options.lineWrapping||Zn(x),x.options.mode=z.modeOption,za(x)}function ql(x){(x.doc.direction=="rtl"?Ut:He)(x.display.lineDiv,"CodeMirror-rtl")}function Fc(x){pa(x,function(){ql(x),za(x)})}function Ql(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 zc(x,z){var ne={from:Mt(z.from),to:us(z),text:pt(x,z.from,z.to)};return Zc(x,ne,z.from.line,z.to.line+1),ds(x,function(te){return Zc(te,ne,z.from.line,z.to.line+1)},!0),ne}function Hu(x){for(;x.length;){var z=Gt(x);if(z.ranges)x.pop();else break}}function Kc(x,z){if(z)return Hu(x.done),Gt(x.done);if(x.done.length&&!Gt(x.done).ranges)return Gt(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),Gt(x.done)}function ec(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ce=+new Date,ge,Ce;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>ce-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(ge=Kc(ie,ie.lastOp==te)))Ce=Gt(ge.changes),dn(z.from,z.to)==0&&dn(z.from,Ce.to)==0?Ce.to=us(z):ge.changes.push(zc(x,z));else{var Le=Gt(ie.done);for((!Le||!Le.ranges)&&tc(x.sel,ie.done),ge={changes:[zc(x,z)],generation:ie.generation},ie.done.push(ge);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=ce,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,Ce||ze(x,"historyAdded")}function Hc(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 Wc(x,z,ne,te){var ie=x.history,ce=te&&te.origin;ne==ie.lastSelOp||ce&&ie.lastSelOrigin==ce&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==ce||Hc(x,ce,Gt(ie.done),z))?ie.done[ie.done.length-1]=z:tc(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ce,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Hu(ie.undone)}function tc(x,z){var ne=Gt(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function Zc(x,z,ne,te){var ie=z["spans_"+x.id],ce=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(ge){ge.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ce]=ge.markedSpans),++ce})}function jc(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(jc(ne[ie]));return te}function Wu(x,z){var ne=Xd(x,z),te=kn(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ce=ne[ie],ge=te[ie];if(ce&&ge)e:for(var Ce=0;Ce<ge.length;++Ce){for(var Le=ge[Ce],Re=0;Re<ce.length;++Re)if(ce[Re].marker==Le.marker)continue e;ce.push(Le)}else ge&&(ne[ie]=ge)}return ne}function ol(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.ranges){te.push(ne?go.prototype.deepCopy.call(ce):ce);continue}var ge=ce.changes,Ce=[];te.push({changes:Ce});for(var Le=0;Le<ge.length;++Le){var Re=ge[Le],gt=void 0;if(Ce.push({from:Re.from,to:Re.to,text:Re.text}),z)for(var Lt in Re)(gt=Lt.match(/^spans_(\d+)$/))&&ht(z,Number(gt[1]))>-1&&(Gt(Ce)[Lt]=Re[Lt],delete Re[Lt])}}return te}function Vc(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ce=dn(z,ie)<0;ce!=dn(ne,ie)<0?(ie=z,z=ne):ce!=dn(z,ne)<0&&(z=ne)}return new Fi(ie,z)}else return new Fi(ne||z,z)}function sl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),Ca(x,new go([Vc(x.sel.primary(),z,ne,ie)],0),te)}function Wr(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),ce=0;ce<x.sel.ranges.length;ce++)te[ce]=Vc(x.sel.ranges[ce],z[ce],null,ie);var ge=Io(x.cm,te,x.sel.primIndex);Ca(x,ge,ne)}function So(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,Ca(x,Io(x.cm,ie,x.sel.primIndex),te)}function Zu(x,z,ne,te){Ca(x,Ro(z,ne),te)}function Yd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ce=0;ce<ie.length;ce++)this.ranges[ce]=new Fi(Tt(x,ie[ce].anchor),Tt(x,ie[ce].head))},origin:ne&&ne.origin};return ze(x,"beforeSelectionChange",x,te),x.cm&&ze(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?Io(x.cm,te.ranges,te.ranges.length-1):z}function no(x,z,ne){var te=x.history.done,ie=Gt(te);ie&&ie.ranges?(te[te.length-1]=z,nc(x,z,ne)):Ca(x,z,ne)}function Ca(x,z,ne){nc(x,z,ne),Wc(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function nc(x,z,ne){(tn(x,"beforeSelectionChange")||x.cm&&tn(x.cm,"beforeSelectionChange"))&&(z=Yd(x,z,ne));var te=ne&&ne.bias||(dn(z.primary().head,x.sel.primary().head)<0?-1:1);Jd(x,ll(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&Qs(x.cm)}function Jd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,jt(x.cm)),zr(x,"cursorActivity",x))}function qd(x){Jd(x,ll(x,x.sel,null,!1))}function ll(x,z,ne,te){for(var ie,ce=0;ce<z.ranges.length;ce++){var ge=z.ranges[ce],Ce=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ce],Le=Uc(x,ge.anchor,Ce&&Ce.anchor,ne,te),Re=Uc(x,ge.head,Ce&&Ce.head,ne,te);(ie||Le!=ge.anchor||Re!=ge.head)&&(ie||(ie=z.ranges.slice(0,ce)),ie[ce]=new Fi(Le,Re))}return ie?Io(x.cm,ie,z.primIndex):z}function ro(x,z,ne,te,ie){var ce=Qe(x,z.line);if(ce.markedSpans)for(var ge=0;ge<ce.markedSpans.length;++ge){var Ce=ce.markedSpans[ge],Le=Ce.marker,Re="selectLeft"in Le?!Le.selectLeft:Le.inclusiveLeft,gt="selectRight"in Le?!Le.selectRight:Le.inclusiveRight;if((Ce.from==null||(Re?Ce.from<=z.ch:Ce.from<z.ch))&&(Ce.to==null||(gt?Ce.to>=z.ch:Ce.to>z.ch))){if(ie&&(ze(Le,"beforeCursorEnter"),Le.explicitlyCleared))if(ce.markedSpans){--ge;continue}else break;if(!Le.atomic)continue;if(ne){var Lt=Le.find(te<0?1:-1),fn=void 0;if((te<0?gt:Re)&&(Lt=hs(x,Lt,-te,Lt&&Lt.line==z.line?ce:null)),Lt&&Lt.line==z.line&&(fn=dn(Lt,ne))&&(te<0?fn<0:fn>0))return ro(x,Lt,z,te,ie)}var ln=Le.find(te<0?-1:1);return(te<0?Re:gt)&&(ln=hs(x,ln,te,ln.line==z.line?ce:null)),ln?ro(x,ln,z,te,ie):null}}return z}function Uc(x,z,ne,te,ie){var ce=te||1,ge=ro(x,z,ne,ce,ie)||!ie&&ro(x,z,ne,ce,!0)||ro(x,z,ne,-ce,ie)||!ie&&ro(x,z,ne,-ce,!0);return ge||(x.cantEdit=!0,Bt(x.first,0))}function hs(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?Tt(x,Bt(z.line-1)):null:ne>0&&z.ch==(te||Qe(x,z.line)).text.length?z.line<x.first+x.size-1?Bt(z.line+1,0):null:new Bt(z.line,z.ch+ne)}function ju(x){x.setSelection(Bt(x.firstLine(),0),Bt(x.lastLine()),Ve)}function Gc(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,ce,ge,Ce){ie&&(te.from=Tt(x,ie)),ce&&(te.to=Tt(x,ce)),ge&&(te.text=ge),Ce!==void 0&&(te.origin=Ce)}),ze(x,"beforeChange",x,te),x.cm&&ze(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 Ds(x,z,ne){if(x.cm){if(!x.cm.curOp)return Sa(x.cm,Ds)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((tn(x,"beforeChange")||x.cm&&tn(x.cm,"beforeChange"))&&(z=Gc(x,z,!0),!z))){var te=fr&&!ne&&gr(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)Vu(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else Vu(x,z)}}function Vu(x,z){if(!(z.text.length==1&&z.text[0]==""&&dn(z.from,z.to)==0)){var ne=Oc(x,z);ec(x,z,ne,x.cm?x.cm.curOp.id:NaN),cl(x,z,ne,kn(x,z));var te=[];ds(x,function(ie,ce){!ce&&ht(te,ie.history)==-1&&(rc(ie.history,z),te.push(ie.history)),cl(ie,z,null,kn(ie,z))})}}function fs(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ce,ge=x.sel,Ce=z=="undo"?ie.done:ie.undone,Le=z=="undo"?ie.undone:ie.done,Re=0;Re<Ce.length&&(ce=Ce[Re],!(ne?ce.ranges&&!ce.equals(x.sel):!ce.ranges));Re++);if(Re!=Ce.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ce=Ce.pop(),ce.ranges){if(tc(ce,Le),ne&&!ce.equals(x.sel)){Ca(x,ce,{clearRedo:!1});return}ge=ce}else if(te){Ce.push(ce);return}else break;var gt=[];tc(ge,Le),Le.push({changes:gt,generation:ie.generation}),ie.generation=ce.generation||++ie.maxGeneration;for(var Lt=tn(x,"beforeChange")||x.cm&&tn(x.cm,"beforeChange"),fn=function(Wn){var vr=ce.changes[Wn];if(vr.origin=z,Lt&&!Gc(x,vr,!1))return Ce.length=0,{};gt.push(zc(x,vr));var Ar=Wn?Oc(x,vr):Gt(Ce);cl(x,vr,Ar,Wu(x,vr)),!Wn&&x.cm&&x.cm.scrollIntoView({from:vr.from,to:us(vr)});var Rr=[];ds(x,function(Cr,Kr){!Kr&&ht(Rr,Cr.history)==-1&&(rc(Cr.history,vr),Rr.push(Cr.history)),cl(Cr,vr,null,Wu(Cr,vr))})},ln=ce.changes.length-1;ln>=0;--ln){var Bn=fn(ln);if(Bn)return Bn.v}}}}function Xc(x,z){if(z!=0&&(x.first+=z,x.sel=new go(Vt(x.sel.ranges,function(ie){return new Fi(Bt(ie.anchor.line+z,ie.anchor.ch),Bt(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){za(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Ao(x.cm,te,"gutter")}}function cl(x,z,ne,te){if(x.cm&&!x.cm.curOp)return Sa(x.cm,cl)(x,z,ne,te);if(z.to.line<x.first){Xc(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);Xc(x,ie),z={from:Bt(x.first,0),to:Bt(z.to.line+ie,z.to.ch),text:[Gt(z.text)],origin:z.origin}}var ce=x.lastLine();z.to.line>ce&&(z={from:z.from,to:Bt(ce,Qe(x,ce).text.length),text:[z.text[0]],origin:z.origin}),z.removed=pt(x,z.from,z.to),ne||(ne=Oc(x,z)),x.cm?Qd(x.cm,z,te):Nc(x,z,te),nc(x,ne,Ve),x.cantEdit&&Uc(x,Bt(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,ce=z.from,ge=z.to,Ce=!1,Le=ce.line;x.options.lineWrapping||(Le=qt($r(Qe(te,ce.line))),te.iter(Le,ge.line+1,function(ln){if(ln==ie.maxLine)return Ce=!0,!0})),te.sel.contains(z.from,z.to)>-1&&jt(x),Nc(te,z,ne,Ya(x)),x.options.lineWrapping||(te.iter(Le,ce.line+z.text.length,function(ln){var Bn=Vn(ln);Bn>ie.maxLineLength&&(ie.maxLine=ln,ie.maxLineLength=Bn,ie.maxLineChanged=!0,Ce=!1)}),Ce&&(x.curOp.updateMaxLine=!0)),In(te,ce.line),nl(x,400);var Re=z.text.length-(ge.line-ce.line)-1;z.full?za(x):ce.line==ge.line&&z.text.length==1&&!Ku(x.doc,z)?Ao(x,ce.line,"text"):za(x,ce.line,ge.line+1,Re);var gt=tn(x,"changes"),Lt=tn(x,"change");if(Lt||gt){var fn={from:ce,to:ge,text:z.text,removed:z.removed,origin:z.origin};Lt&&zr(x,"change",x,fn),gt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(fn)}x.display.selForContextMenu=null}function Ml(x,z,ne,te,ie){var ce;te||(te=ne),dn(te,ne)<0&&(ce=[te,ne],ne=ce[0],te=ce[1]),typeof z=="string"&&(z=x.splitLines(z)),Ds(x,{from:ne,to:te,text:z,origin:ie})}function eh(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function th(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ce=x[ie],ge=!0;if(ce.ranges){ce.copied||(ce=x[ie]=ce.deepCopy(),ce.copied=!0);for(var Ce=0;Ce<ce.ranges.length;Ce++)eh(ce.ranges[Ce].anchor,z,ne,te),eh(ce.ranges[Ce].head,z,ne,te);continue}for(var Le=0;Le<ce.changes.length;++Le){var Re=ce.changes[Le];if(ne<Re.from.line)Re.from=Bt(Re.from.line+te,Re.from.ch),Re.to=Bt(Re.to.line+te,Re.to.ch);else if(z<=Re.to.line){ge=!1;break}}ge||(x.splice(0,ie+1),ie=0)}}function rc(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;th(x.done,ne,te,ie),th(x.undone,ne,te,ie)}function ic(x,z,ne,te){var ie=z,ce=z;return typeof z=="number"?ce=Qe(x,an(x,z)):ie=qt(z),ie==null?null:(te(ce,ie)&&x.cm&&Ao(x.cm,ie,ne),ce)}function As(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}As.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,xi(ie),zr(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 El(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}El.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 ce=Math.min(z,ie-x),ge=te.height;if(te.removeInner(x,ce),this.height-=ge-te.height,ie==ce&&(this.children.splice(ne--,1),te.parent=null),(z-=ce)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof As))){var Ce=[];this.collapse(Ce),this.children=[new As(Ce)],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],ce=ie.chunkSize();if(x<=ce){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var ge=ie.lines.length%25+25,Ce=ge;Ce<ie.lines.length;){var Le=new As(ie.lines.slice(Ce,Ce+=25));ie.height-=Le.height,this.children.splice(++te,0,Le),Le.parent=this}ie.lines=ie.lines.slice(0,ge),this.maybeSpill()}break}x-=ce}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new El(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=ht(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new El(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],ce=ie.chunkSize();if(x<ce){var ge=Math.min(z,ce-x);if(ie.iterN(x,ge,ne))return!0;if((z-=ge)==0)break;x=0}else x-=ce}}};var kl=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};kl.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=qt(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 ce=ao(this);$t(ne,Math.max(0,ne.height-ce)),x&&(pa(x,function(){nh(x,ne,-ce),Ao(x,te,"widget")}),zr(x,"lineWidgetCleared",x,this,te))}},kl.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=ao(this)-z;ie&&(yi(this.doc,te)||$t(te,te.height+ie),ne&&pa(ne,function(){ne.curOp.forceUpdate=!0,nh(ne,te,ie),zr(ne,"lineWidgetChanged",ne,x,qt(te))}))},cn(kl);function nh(x,z,ne){Yn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&Lc(x,ne)}function rh(x,z,ne,te){var ie=new kl(x,ne,te),ce=x.cm;return ce&&ie.noHScroll&&(ce.display.alignWidgets=!0),ic(x,z,"widget",function(ge){var Ce=ge.widgets||(ge.widgets=[]);if(ie.insertAt==null?Ce.push(ie):Ce.splice(Math.min(Ce.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ge,ce&&!yi(x,ge)){var Le=Yn(ge)<x.scrollTop;$t(ge,ge.height+ao(ie)),Le&&Lc(ce,ie.height),ce.curOp.forceUpdate=!0}return!0}),ce&&zr(ce,"lineWidgetAdded",ce,ie,typeof z=="number"?z:qt(z)),ie}var ih=0,Ts=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++ih};Ts.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ls(x),tn(this,"clear")){var ne=this.find();ne&&zr(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ce=0;ce<this.lines.length;++ce){var ge=this.lines[ce],Ce=br(ge.markedSpans,this);x&&!this.collapsed?Ao(x,qt(ge),"text"):x&&(Ce.to!=null&&(ie=qt(ge)),Ce.from!=null&&(te=qt(ge))),ge.markedSpans=ur(ge.markedSpans,Ce),Ce.from==null&&this.collapsed&&!yi(this.doc,ge)&&x&&$t(ge,as(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Le=0;Le<this.lines.length;++Le){var Re=$r(this.lines[Le]),gt=Vn(Re);gt>x.display.maxLineLength&&(x.display.maxLine=Re,x.display.maxLineLength=gt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&za(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&qd(x.doc)),x&&zr(x,"markerCleared",x,this,te,ie),z&&cs(x),this.parent&&this.parent.clear()}},Ts.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ce=this.lines[ie],ge=br(ce.markedSpans,this);if(ge.from!=null&&(ne=Bt(z?ce:qt(ce),ge.from),x==-1))return ne;if(ge.to!=null&&(te=Bt(z?ce:qt(ce),ge.to),x==1))return te}return ne&&{from:ne,to:te}},Ts.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||pa(te,function(){var ie=z.line,ce=qt(z.line),ge=Xa(te,ce);if(ge&&(Ki(ge),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!yi(ne.doc,ie)&&ne.height!=null){var Ce=ne.height;ne.height=null;var Le=ao(ne)-Ce;Le&&$t(ie,ie.height+Le)}zr(te,"markerChanged",te,x)})},Ts.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||ht(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},Ts.prototype.detachLine=function(x){if(this.lines.splice(ht(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},cn(Ts);function ps(x,z,ne,te,ie){if(te&&te.shared)return ra(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return Sa(x.cm,ps)(x,z,ne,te,ie);var ce=new Ts(x,ie),ge=dn(z,ne);if(te&&ut(te,ce,!1),ge>0||ge==0&&ce.clearWhenEmpty!==!1)return ce;if(ce.replacedWith&&(ce.collapsed=!0,ce.widgetNode=It("span",[ce.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ce.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ce.widgetNode.insertLeft=!0)),ce.collapsed){if(Dr(x,z.line,z,ne,ce)||z.line!=ne.line&&Dr(x,ne.line,z,ne,ce))throw new Error("Inserting collapsed marker partially overlapping an existing one");Gn()}ce.addToHistory&&ec(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Ce=z.line,Le=x.cm,Re;if(x.iter(Ce,ne.line+1,function(Lt){Le&&ce.collapsed&&!Le.options.lineWrapping&&$r(Lt)==Le.display.maxLine&&(Re=!0),ce.collapsed&&Ce!=z.line&&$t(Lt,0),Br(Lt,new Xn(ce,Ce==z.line?z.ch:null,Ce==ne.line?ne.ch:null)),++Ce}),ce.collapsed&&x.iter(z.line,ne.line+1,function(Lt){yi(x,Lt)&&$t(Lt,0)}),ce.clearOnEnter&&hn(ce,"beforeCursorEnter",function(){return ce.clear()}),ce.readOnly&&(yr(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ce.collapsed&&(ce.id=++ih,ce.atomic=!0),Le){if(Re&&(Le.curOp.updateMaxLine=!0),ce.collapsed)za(Le,z.line,ne.line+1);else if(ce.className||ce.startStyle||ce.endStyle||ce.css||ce.attributes||ce.title)for(var gt=z.line;gt<=ne.line;gt++)Ao(Le,gt,"text");ce.atomic&&qd(Le.doc),zr(Le,"markerAdded",Le,ce)}return ce}var Si=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};Si.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();zr(this,"clear")}},Si.prototype.find=function(x,z){return this.primary.find(x,z)},cn(Si);function ra(x,z,ne,te,ie){te=ut(te),te.shared=!1;var ce=[ps(x,z,ne,te,ie)],ge=ce[0],Ce=te.widgetNode;return ds(x,function(Le){Ce&&(te.widgetNode=Ce.cloneNode(!0)),ce.push(ps(Le,Tt(Le,z),Tt(Le,ne),te,ie));for(var Re=0;Re<Le.linked.length;++Re)if(Le.linked[Re].isParent)return;ge=Gt(ce)}),new Si(ce,ge)}function Is(x){return x.findMarks(Bt(x.first,0),x.clipPos(Bt(x.lastLine())),function(z){return z.parent})}function ah(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),ce=x.clipPos(ie.from),ge=x.clipPos(ie.to);if(dn(ce,ge)){var Ce=ps(x,ce,ge,te.primary,te.primary.type);te.markers.push(Ce),Ce.parent=te}}}function Co(x){for(var z=function(te){var ie=x[te],ce=[ie.primary.doc];ds(ie.primary.doc,function(Le){return ce.push(Le)});for(var ge=0;ge<ie.markers.length;ge++){var Ce=ie.markers[ge];ht(ce,Ce.doc)==-1&&(Ce.parent=null,ie.markers.splice(ge--,1))}},ne=0;ne<x.length;ne++)z(ne)}var oh=0,ya=function(x,z,ne,te,ie){if(!(this instanceof ya))return new ya(x,z,ne,te,ie);ne==null&&(ne=0),El.call(this,[new As([new mr("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ce=Bt(ne,0);this.sel=Ro(ce),this.history=new Ql(null),this.id=++oh,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),Nc(this,{from:ce,to:ce,text:x}),Ca(this,Ro(ce),Ve)};ya.prototype=se(El.prototype,{constructor:ya,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=Yt(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:Ia(function(x){var z=Bt(this.first,0),ne=this.first+this.size-1;Ds(this,{from:z,to:Bt(ne,Qe(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&el(this.cm,0,0),Ca(this,Ro(z),Ve)}),replaceRange:function(x,z,ne,te){z=Tt(this,z),ne=ne?Tt(this,ne):z,Ml(this,x,z,ne,te)},getRange:function(x,z,ne){var te=pt(this,Tt(this,x),Tt(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(wn(this,x))return Qe(this,x)},getLineNumber:function(x){return qt(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=Qe(this,x)),$r(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return Tt(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:Ia(function(x,z,ne){Zu(this,Tt(this,typeof x=="number"?Bt(x,z||0):x),null,ne)}),setSelection:Ia(function(x,z,ne){Zu(this,Tt(this,x),Tt(this,z||x),ne)}),extendSelection:Ia(function(x,z,ne){sl(this,Tt(this,x),z&&Tt(this,z),ne)}),extendSelections:Ia(function(x,z){Wr(this,$e(this,x),z)}),extendSelectionsBy:Ia(function(x,z){var ne=Vt(this.sel.ranges,x);Wr(this,$e(this,ne),z)}),setSelections:Ia(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new Fi(Tt(this,x[ie].anchor),Tt(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),Ca(this,Io(this.cm,te,z),ne)}}),addSelection:Ia(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new Fi(Tt(this,x),Tt(this,z||x))),Ca(this,Io(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=pt(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=pt(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:Ia(function(x,z,ne){for(var te=[],ie=this.sel,ce=0;ce<ie.ranges.length;ce++){var ge=ie.ranges[ce];te[ce]={from:ge.from(),to:ge.to(),text:this.splitLines(x[ce]),origin:ne}}for(var Ce=z&&z!="end"&&$c(this,te,z),Le=te.length-1;Le>=0;Le--)Ds(this,te[Le]);Ce?no(this,Ce):this.cm&&Qs(this.cm)}),undo:Ia(function(){fs(this,"undo")}),redo:Ia(function(){fs(this,"redo")}),undoSelection:Ia(function(){fs(this,"undo",!0)}),redoSelection:Ia(function(){fs(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 Ql(this.history.maxGeneration),ds(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:ol(this.history.done),undone:ol(this.history.undone)}},setHistory:function(x){var z=this.history=new Ql(this.history.maxGeneration);z.done=ol(x.done.slice(0),null,!0),z.undone=ol(x.undone.slice(0),null,!0)},setGutterMarker:Ia(function(x,z,ne){return ic(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&le(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:Ia(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&ic(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,le(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!wn(this,x)||(z=x,x=Qe(this,x),!x))return null}else if(z=qt(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:Ia(function(x,z,ne){return ic(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:Ia(function(x,z,ne){return ic(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",ce=te[ie];if(ce)if(ne==null)te[ie]=null;else{var ge=ce.match(Ee(ne));if(!ge)return!1;var Ce=ge.index+ge[0].length;te[ie]=ce.slice(0,ge.index)+(!ge.index||Ce==ce.length?"":" ")+ce.slice(Ce)||null}else return!1;return!0})}),addLineWidget:Ia(function(x,z,ne){return rh(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return ps(this,Tt(this,x),Tt(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=Tt(this,x),ps(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=Tt(this,x);var z=[],ne=Qe(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=Tt(this,x),z=Tt(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ce){var ge=ce.markedSpans;if(ge)for(var Ce=0;Ce<ge.length;Ce++){var Le=ge[Ce];!(Le.to!=null&&ie==x.line&&x.ch>=Le.to||Le.from==null&&ie!=x.line||Le.from!=null&&ie==z.line&&Le.from>=z.ch)&&(!ne||ne(Le.marker))&&te.push(Le.marker.parent||Le.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 ce=ie.text.length+te;if(ce>x)return z=x,!0;x-=ce,++ne}),Tt(this,Bt(ne,z))},indexFromPos:function(x){x=Tt(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 ya(Yt(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 ya(Yt(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}],ah(te,Is(this)),te},unlinkDoc:function(x){if(x instanceof si&&(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),Co(Is(this));break}}if(x.history==this.history){var te=[x.id];ds(x,function(ie){return te.push(ie.id)},!0),x.history=new Ql(null),x.history.done=ol(this.history.done,te),x.history.undone=ol(this.history.undone,te)}},iterLinkedDocs:function(x){ds(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):Mr(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Ia(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&Fc(this.cm))})}),ya.prototype.eachLine=ya.prototype.iter;var Uu=0;function Qh(x){var z=this;if(_l(z),!(Xe(z,x)||oo(z.display,x))){Dn(x),xe&&(Uu=+new Date);var ne=xo(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ce=Array(ie),ge=0,Ce=function(){++ge==ie&&Sa(z,function(){ne=Tt(z.doc,ne);var ln={from:ne,to:ne,text:z.doc.splitLines(ce.filter(function(Bn){return Bn!=null}).join(z.doc.lineSeparator())),origin:"paste"};Ds(z.doc,ln),no(z.doc,Ro(Tt(z.doc,ne),Tt(z.doc,us(ln))))})()},Le=function(ln,Bn){if(z.options.allowDropFileTypes&&ht(z.options.allowDropFileTypes,ln.type)==-1){Ce();return}var Wn=new FileReader;Wn.onerror=function(){return Ce()},Wn.onload=function(){var vr=Wn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(vr)){Ce();return}ce[Bn]=vr,Ce()},Wn.readAsText(ln)},Re=0;Re<te.length;Re++)Le(te[Re],Re);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 gt=x.dataTransfer.getData("Text");if(gt){var Lt;if(z.state.draggingText&&!z.state.draggingText.copy&&(Lt=z.listSelections()),nc(z.doc,Ro(ne,ne)),Lt)for(var fn=0;fn<Lt.length;++fn)Ml(z.doc,"",Lt[fn].anchor,Lt[fn].head,"drag");z.replaceSelection(gt,"around","paste"),z.display.input.focus()}}catch(ln){}}}}function ef(x,z){if(xe&&(!x.state.draggingText||+new Date-Uu<100)){Fn(z);return}if(!(Xe(x,z)||oo(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!ct)){var ne=Ge("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ke&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Ke&&ne.parentNode.removeChild(ne)}}function Gu(x,z){var ne=xo(x,z);if(ne){var te=document.createDocumentFragment();ku(x,ne,te),x.display.dragCursor||(x.display.dragCursor=Ge("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),Ct(x.display.dragCursor,te)}}function _l(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function Ll(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 ce=0;ce<ne.length;ce++)x(ne[ce])})}}var or=!1;function Xu(){or||(Yc(),or=!0)}function Yc(){var x;hn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,Ll(Jc)},100))}),hn(window,"blur",function(){return Ll(qs)})}function Jc(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var No={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"},ac=0;ac<10;ac++)No[ac+48]=No[ac+96]=String(ac);for(var qc=65;qc<=90;qc++)No[qc]=String.fromCharCode(qc);for(var oc=1;oc<=12;oc++)No[oc+111]=No[oc+63235]="F"+oc;var Yi={};Yi.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"},Yi.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"},Yi.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"},Yi.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"]},Yi.default=st?Yi.macDefault:Yi.pcDefault;function tf(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ce,ge=0;ge<z.length-1;ge++){var Ce=z[ge];if(/^(cmd|meta|m)$/i.test(Ce))ce=!0;else if(/^a(lt)?$/i.test(Ce))ne=!0;else if(/^(c|ctrl|control)$/i.test(Ce))te=!0;else if(/^s(hift)?$/i.test(Ce))ie=!0;else throw new Error("Unrecognized modifier name: "+Ce)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),ce&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function Yu(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=Vt(ne.split(" "),tf),ce=0;ce<ie.length;ce++){var ge=void 0,Ce=void 0;ce==ie.length-1?(Ce=ie.join(" "),ge=te):(Ce=ie.slice(0,ce+1).join(" "),ge="...");var Le=z[Ce];if(!Le)z[Ce]=ge;else if(Le!=ge)throw new Error("Inconsistent bindings for "+Ce)}delete x[ne]}for(var Re in z)x[Re]=z[Re];return x}function ms(x,z,ne,te){z=io(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 ms(x,z.fallthrough,ne,te);for(var ce=0;ce<z.fallthrough.length;ce++){var ge=ms(x,z.fallthrough[ce],ne,te);if(ge)return ge}}}function sc(x){var z=typeof x=="string"?x:No[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function Ps(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(mt?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(mt?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function ul(x,z){if(Ke&&x.keyCode==34&&x.char)return!1;var ne=No[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),Ps(ne,x,z))}function io(x){return typeof x=="string"?Yi[x]:x}function Po(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ce=z(ne[ie]);te.length&&dn(ce.from,Gt(te).to)<=0;){var ge=te.pop();if(dn(ge.from,ce.from)<0){ce.from=ge.from;break}}te.push(ce)}pa(x,function(){for(var Ce=te.length-1;Ce>=0;Ce--)Ml(x.doc,"",te[Ce].from,te[Ce].to,"+delete");Qs(x)})}function Ha(x,z,ne){var te=Kt(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Uo(x,z,ne){var te=Ha(x,z.ch,ne);return te==null?null:new Bt(z.line,te,ne<0?"after":"before")}function dl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ce=Cn(ne,z.doc.direction);if(ce){var ge=ie<0?Gt(ce):ce[0],Ce=ie<0==(ge.level==1),Le=Ce?"after":"before",Re;if(ge.level>0||z.doc.direction=="rtl"){var gt=Oa(z,ne);Re=ie<0?ne.text.length-1:0;var Lt=Oi(z,gt,Re).top;Re=Ft(function(fn){return Oi(z,gt,fn).top==Lt},ie<0==(ge.level==1)?ge.from:ge.to-1,Re),Le=="before"&&(Re=Ha(ne,Re,1))}else Re=ie<0?ge.to:ge.from;return new Bt(te,Re,Le)}}return new Bt(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Go(x,z,ne,te){var ie=Cn(z,x.doc.direction);if(!ie)return Uo(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 ce=on(ie,ne.ch,ne.sticky),ge=ie[ce];if(x.doc.direction=="ltr"&&ge.level%2==0&&(te>0?ge.to>ne.ch:ge.from<ne.ch))return Uo(z,ne,te);var Ce=function(Ar,Rr){return Ha(z,Ar instanceof Bt?Ar.ch:Ar,Rr)},Le,Re=function(Ar){return x.options.lineWrapping?(Le=Le||Oa(x,z),Hl(x,z,Le,Ar)):{begin:0,end:z.text.length}},gt=Re(ne.sticky=="before"?Ce(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ge.level==1){var Lt=ge.level==1==te<0,fn=Ce(ne,Lt?1:-1);if(fn!=null&&(Lt?fn<=ge.to&&fn<=gt.end:fn>=ge.from&&fn>=gt.begin)){var ln=Lt?"before":"after";return new Bt(ne.line,fn,ln)}}var Bn=function(Ar,Rr,Cr){for(var Kr=function(qi,Na){return Na?new Bt(ne.line,Ce(qi,1),"before"):new Bt(ne.line,qi,"after")};Ar>=0&&Ar<ie.length;Ar+=Rr){var Qr=ie[Ar],ti=Rr>0==(Qr.level!=1),Ci=ti?Cr.begin:Ce(Cr.end,-1);if(Qr.from<=Ci&&Ci<Qr.to||(Ci=ti?Qr.from:Ce(Qr.to,-1),Cr.begin<=Ci&&Ci<Cr.end))return Kr(Ci,ti)}},Wn=Bn(ce+te,te,gt);if(Wn)return Wn;var vr=te>0?gt.end:Ce(gt.begin,-1);return vr!=null&&!(te>0&&vr==z.text.length)&&(Wn=Bn(te>0?0:ie.length-1,te,Re(vr)),Wn)?Wn:null}var Dl={selectAll:ju,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),Ve)},killLine:function(x){return Po(x,function(z){if(z.empty()){var ne=Qe(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:Bt(z.head.line+1,0)}:{from:z.head,to:Bt(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return Po(x,function(z){return{from:Bt(z.from().line,0),to:Tt(x.doc,Bt(z.to().line+1,0))}})},delLineLeft:function(x){return Po(x,function(z){return{from:Bt(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return Po(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 Po(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(Bt(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(Bt(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return Ju(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return sh(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return qu(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")},At)},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")},At)},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/)?sh(x,z.head):te},At)},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 ce=ne[ie].from(),ge=Be(x.getLine(ce.line),ce.ch,te);z.push(un(te-ge%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return pa(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ce=Qe(x.doc,ie.line).text;if(ce){if(ie.ch==ce.length&&(ie=new Bt(ie.line,ie.ch-1)),ie.ch>0)ie=new Bt(ie.line,ie.ch+1),x.replaceRange(ce.charAt(ie.ch-1)+ce.charAt(ie.ch-2),Bt(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ge=Qe(x.doc,ie.line-1).text;ge&&(ie=new Bt(ie.line,1),x.replaceRange(ce.charAt(0)+x.doc.lineSeparator()+ge.charAt(ge.length-1),Bt(ie.line-1,ge.length-1),ie,"+transpose"))}}ne.push(new Fi(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return pa(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);Qs(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function Ju(x,z){var ne=Qe(x.doc,z),te=$r(ne);return te!=ne&&(z=qt(te)),dl(!0,x,te,z,1)}function qu(x,z){var ne=Qe(x.doc,z),te=li(ne);return te!=ne&&(z=qt(te)),dl(!0,x,ne,z,-1)}function sh(x,z){var ne=Ju(x,z.line),te=Qe(x.doc,ne.line),ie=Cn(te,x.doc.direction);if(!ie||ie[0].level==0){var ce=Math.max(ne.ch,te.text.search(/\S/)),ge=z.line==ne.line&&z.ch<=ce&&z.ch;return Bt(ne.line,ge?0:ce,ne.sticky)}return ne}function Ma(x,z,ne){if(typeof z=="string"&&(z=Dl[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)!=Wt}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function Xo(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=ms(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&ms(z,x.options.extraKeys,ne,x)||ms(z,x.options.keyMap,ne,x)}var nf=new be;function Al(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(sc(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:nf.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),Qc(x,ie+" "+z,ne,te))return!0}return Qc(x,z,ne,te)}function Qc(x,z,ne,te){var ie=Xo(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&zr(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Dn(ne),kc(x)),!!ie}function Di(x,z){var ne=ul(z,!0);return ne?z.shiftKey&&!x.state.keySeq?Al(x,"Shift-"+ne,z,function(te){return Ma(x,te,!0)})||Al(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Ma(x,te)}):Al(x,ne,z,function(te){return Ma(x,te)}):!1}function Tl(x,z,ne){return Al(x,"'"+ne+"'",z,function(te){return Ma(x,te,!0)})}var gs=null;function lc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=Je(),!Xe(z,x))){xe&&_e<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=Di(z,x);Ke&&(gs=te?ne:null,!te&&ne==88&&!Or&&(st?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),pe&&!st&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&Pn(z)}}function Pn(x){var z=x.display.lineDiv;Ut(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(He(z,"CodeMirror-crosshair"),rt(document,"keyup",ne),rt(document,"mouseover",ne))}hn(document,"keyup",ne),hn(document,"mouseover",ne)}function lh(x){x.keyCode==16&&(this.doc.sel.shift=!1),Xe(this,x)}function ch(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(oo(z.display,x)||Xe(z,x)||x.ctrlKey&&!x.altKey||st&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Ke&&ne==gs){gs=null,Dn(x);return}if(!(Ke&&(!x.which||x.which<10)&&Di(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(Tl(z,x,ie)||z.display.input.onKeyPress(x))}}}var Qu=400,ed=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};ed.prototype.compare=function(x,z,ne){return this.time+Qu>x&&dn(z,this.pos)==0&&ne==this.button};var vs,cc;function rf(x,z){var ne=+new Date;return cc&&cc.compare(ne,x,z)?(vs=cc=null,"triple"):vs&&vs.compare(ne,x,z)?(cc=new ed(ne,x,z),vs=null,"double"):(vs=new ed(ne,x,z),cc=null,"single")}function Wa(x){var z=this,ne=z.display;if(!(Xe(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,oo(ne,x)){Ae||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!Ja(z,x)){var te=xo(z,x),ie=An(x),ce=te?rf(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&Bs(z,ie,te,ce,x))&&(ie==1?te?tu(z,te,ce,x):jn(x)==ne.scroller&&Dn(x):ie==2?(te&&sl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(Ze?z.display.input.onContextMenu(x):_u(z)))}}}function Bs(x,z,ne,te,ie){var ce="Click";return te=="double"?ce="Double"+ce:te=="triple"&&(ce="Triple"+ce),ce=(z==1?"Left":z==2?"Middle":"Right")+ce,Al(x,Ps(ce,ie),ie,function(ge){if(typeof ge=="string"&&(ge=Dl[ge]),!ge)return!1;var Ce=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Ce=ge(x,ne)!=Wt}finally{x.state.suppressEdits=!1}return Ce})}function eu(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ce=wt?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=ce?"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=st?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(st?ne.altKey:ne.ctrlKey)),ie}function tu(x,z,ne,te){xe?setTimeout(Et(Sl,x),0):x.curOp.focus=Je();var ie=eu(x,ne,te),ce=x.doc.sel,ge;x.options.dragDrop&&hr&&!x.isReadOnly()&&ne=="single"&&(ge=ce.contains(z))>-1&&(dn((ge=ce.ranges[ge]).from(),z)<0||z.xRel>0)&&(dn(ge.to(),z)>0||z.xRel<0)?af(x,te,z,ie):td(x,te,z,ie)}function af(x,z,ne,te){var ie=x.display,ce=!1,ge=Sa(x,function(Re){Ae&&(ie.scroller.draggable=!1),x.state.draggingText=!1,rt(ie.wrapper.ownerDocument,"mouseup",ge),rt(ie.wrapper.ownerDocument,"mousemove",Ce),rt(ie.scroller,"dragstart",Le),rt(ie.scroller,"drop",ge),ce||(Dn(Re),te.addNew||sl(x.doc,ne,null,null,te.extend),Ae&&!ct||xe&&_e==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),Ce=function(Re){ce=ce||Math.abs(z.clientX-Re.clientX)+Math.abs(z.clientY-Re.clientY)>=10},Le=function(){return ce=!0};Ae&&(ie.scroller.draggable=!0),x.state.draggingText=ge,ge.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),hn(ie.wrapper.ownerDocument,"mouseup",ge),hn(ie.wrapper.ownerDocument,"mousemove",Ce),hn(ie.scroller,"dragstart",Le),hn(ie.scroller,"drop",ge),_u(x),setTimeout(function(){return ie.input.focus()},20)}function uh(x,z,ne){if(ne=="char")return new Fi(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new Fi(Bt(z.line,0),Tt(x.doc,Bt(z.line+1,0)));var te=ne(x,z);return new Fi(te.from,te.to)}function td(x,z,ne,te){var ie=x.display,ce=x.doc;Dn(z);var ge,Ce,Le=ce.sel,Re=Le.ranges;if(te.addNew&&!te.extend?(Ce=ce.sel.contains(ne),Ce>-1?ge=Re[Ce]:ge=new Fi(ne,ne)):(ge=ce.sel.primary(),Ce=ce.sel.primIndex),te.unit=="rectangle")te.addNew||(ge=new Fi(ne,ne)),ne=xo(x,z,!0,!0),Ce=-1;else{var gt=uh(x,ne,te.unit);te.extend?ge=Vc(ge,gt.anchor,gt.head,te.extend):ge=gt}te.addNew?Ce==-1?(Ce=Re.length,Ca(ce,Io(x,Re.concat([ge]),Ce),{scroll:!1,origin:"*mouse"})):Re.length>1&&Re[Ce].empty()&&te.unit=="char"&&!te.extend?(Ca(ce,Io(x,Re.slice(0,Ce).concat(Re.slice(Ce+1)),0),{scroll:!1,origin:"*mouse"}),Le=ce.sel):So(ce,Ce,ge,Ye):(Ce=0,Ca(ce,new go([ge],0),Ye),Le=ce.sel);var Lt=ne;function fn(Cr){if(dn(Lt,Cr)!=0)if(Lt=Cr,te.unit=="rectangle"){for(var Kr=[],Qr=x.options.tabSize,ti=Be(Qe(ce,ne.line).text,ne.ch,Qr),Ci=Be(Qe(ce,Cr.line).text,Cr.ch,Qr),qi=Math.min(ti,Ci),Na=Math.max(ti,Ci),da=Math.min(ne.line,Cr.line),co=Math.min(x.lastLine(),Math.max(ne.line,Cr.line));da<=co;da++){var uo=Qe(ce,da).text,Ea=gn(uo,qi,Qr);qi==Na?Kr.push(new Fi(Bt(da,Ea),Bt(da,Ea))):uo.length>Ea&&Kr.push(new Fi(Bt(da,Ea),Bt(da,gn(uo,Na,Qr))))}Kr.length||Kr.push(new Fi(ne,ne)),Ca(ce,Io(x,Le.ranges.slice(0,Ce).concat(Kr),Ce),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Cr)}else{var ho=ge,hi=uh(x,Cr,te.unit),ma=ho.anchor,ha;dn(hi.anchor,ma)>0?(ha=hi.head,ma=Rt(ho.from(),hi.anchor)):(ha=hi.anchor,ma=Pt(ho.to(),hi.head));var ga=Le.ranges.slice(0);ga[Ce]=dh(x,new Fi(Tt(ce,ma),ha)),Ca(ce,Io(x,ga,Ce),Ye)}}var ln=ie.wrapper.getBoundingClientRect(),Bn=0;function Wn(Cr){var Kr=++Bn,Qr=xo(x,Cr,!0,te.unit=="rectangle");if(Qr)if(dn(Qr,Lt)!=0){x.curOp.focus=Je(),fn(Qr);var ti=Ta(ie,ce);(Qr.line>=ti.to||Qr.line<ti.from)&&setTimeout(Sa(x,function(){Bn==Kr&&Wn(Cr)}),150)}else{var Ci=Cr.clientY<ln.top?-20:Cr.clientY>ln.bottom?20:0;Ci&&setTimeout(Sa(x,function(){Bn==Kr&&(ie.scroller.scrollTop+=Ci,Wn(Cr))}),50)}}function vr(Cr){x.state.selectingText=!1,Bn=1/0,Cr&&(Dn(Cr),ie.input.focus()),rt(ie.wrapper.ownerDocument,"mousemove",Ar),rt(ie.wrapper.ownerDocument,"mouseup",Rr),ce.history.lastSelOrigin=null}var Ar=Sa(x,function(Cr){Cr.buttons===0||!An(Cr)?vr(Cr):Wn(Cr)}),Rr=Sa(x,vr);x.state.selectingText=Rr,hn(ie.wrapper.ownerDocument,"mousemove",Ar),hn(ie.wrapper.ownerDocument,"mouseup",Rr)}function dh(x,z){var ne=z.anchor,te=z.head,ie=Qe(x.doc,ne.line);if(dn(ne,te)==0&&ne.sticky==te.sticky)return z;var ce=Cn(ie);if(!ce)return z;var ge=on(ce,ne.ch,ne.sticky),Ce=ce[ge];if(Ce.from!=ne.ch&&Ce.to!=ne.ch)return z;var Le=ge+(Ce.from==ne.ch==(Ce.level!=1)?0:1);if(Le==0||Le==ce.length)return z;var Re;if(te.line!=ne.line)Re=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var gt=on(ce,te.ch,te.sticky),Lt=gt-ge||(te.ch-ne.ch)*(Ce.level==1?-1:1);gt==Le-1||gt==Le?Re=Lt<0:Re=Lt>0}var fn=ce[Le+(Re?-1:0)],ln=Re==(fn.level==1),Bn=ln?fn.from:fn.to,Wn=ln?"after":"before";return ne.ch==Bn&&ne.sticky==Wn?z:new Fi(new Bt(ne.line,Bn,Wn),te)}function uc(x,z,ne,te){var ie,ce;if(z.touches)ie=z.touches[0].clientX,ce=z.touches[0].clientY;else try{ie=z.clientX,ce=z.clientY}catch(fn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Dn(z);var ge=x.display,Ce=ge.lineDiv.getBoundingClientRect();if(ce>Ce.bottom||!tn(x,ne))return _n(z);ce-=Ce.top-ge.viewOffset;for(var Le=0;Le<x.display.gutterSpecs.length;++Le){var Re=ge.gutters.childNodes[Le];if(Re&&Re.getBoundingClientRect().right>=ie){var gt=vn(x.doc,ce),Lt=x.display.gutterSpecs[Le];return ze(x,ne,x,gt,Lt.className,z),_n(z)}}}function Ja(x,z){return uc(x,z,"gutterClick",!0)}function Os(x,z){oo(x.display,z)||hh(x,z)||Xe(x,z,"contextmenu")||Ze||x.display.input.onContextMenu(z)}function hh(x,z){return tn(x,"gutterContextMenu")?uc(x,z,"gutterContextMenu",!1):!1}function nd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Xi(x)}var $s={toString:function(){return"CodeMirror.Init"}},fh={},nu={};function of(x){var z=x.optionHandlers;function ne(te,ie,ce,ge){x.defaults[te]=ie,ce&&(z[te]=ge?function(Ce,Le,Re){Re!=$s&&ce(Ce,Le,Re)}:ce)}x.defineOption=ne,x.Init=$s,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){al(te),Xi(te),za(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ce=[],ge=te.doc.first;te.doc.iter(function(Le){for(var Re=0;;){var gt=Le.text.indexOf(ie,Re);if(gt==-1)break;Re=gt+ie.length,ce.push(Bt(ge,gt))}ge++});for(var Ce=ce.length-1;Ce>=0;Ce--)Ml(te.doc,ie,ce[Ce],Bt(ce[Ce].line,ce[Ce].ch+ie.length))}}),ne("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(te,ie,ce){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),ce!=$s&&te.refresh()}),ne("specialCharPlaceholder",Hi,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",dt?"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",!en),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){nd(te),Cl(te)},!0),ne("keyMap","default",function(te,ie,ce){var ge=io(ie),Ce=ce!=$s&&io(ce);Ce&&Ce.detach&&Ce.detach(te,ge),ge.attach&&ge.attach(te,Ce||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,ph,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=Bc(ie,te.options.lineNumbers),Cl(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?ji(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return _s(te)},!0),ne("scrollbarStyle","native",function(te){Iu(te),_s(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=Bc(te.options.gutters,ie),Cl(te)},!0),ne("firstLineNumber",1,Cl,!0),ne("lineNumberFormatter",function(te){return te},Cl,!0),ne("showCursorWhenSelecting",!1,wl,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(qs(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,sf),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,wl,!0),ne("singleCursorHeightPerLine",!0,wl,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,al,!0),ne("addModeClass",!1,al,!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,al,!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 sf(x,z,ne){var te=ne&&ne!=$s;if(!z!=!te){var ie=x.display.dragFunctions,ce=z?hn:rt;ce(x.display.scroller,"dragstart",ie.start),ce(x.display.scroller,"dragenter",ie.enter),ce(x.display.scroller,"dragover",ie.over),ce(x.display.scroller,"dragleave",ie.leave),ce(x.display.scroller,"drop",ie.drop)}}function ph(x){x.options.lineWrapping?(Ut(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(He(x.display.wrapper,"CodeMirror-wrap"),Zn(x)),Aa(x),za(x),Xi(x),setTimeout(function(){return _s(x)},100)}function si(x,z){var ne=this;if(!(this instanceof si))return new si(x,z);this.options=z=z?ut(z):{},ut(fh,z,!1);var te=z.value;typeof te=="string"?te=new ya(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new si.inputStyles[z.inputStyle](this),ce=this.display=new Gd(x,te,ie,z);ce.wrapper.CodeMirror=this,nd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Iu(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 be,keySeq:null,specialChars:null},z.autofocus&&!dt&&ce.input.focus(),xe&&_e<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lf(this),Xu(),Ls(this),this.curOp.forceUpdate=!0,Jl(this,te),z.autofocus&&!dt||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&_c(ne)},20):qs(this);for(var ge in nu)nu.hasOwnProperty(ge)&&nu[ge](this,z[ge],$s);Xl(this),z.finishInit&&z.finishInit(this);for(var Ce=0;Ce<rd.length;++Ce)rd[Ce](this);cs(this),Ae&&z.lineWrapping&&getComputedStyle(ce.lineDiv).textRendering=="optimizelegibility"&&(ce.lineDiv.style.textRendering="auto")}si.defaults=fh,si.optionHandlers=nu;function lf(x){var z=x.display;hn(z.scroller,"mousedown",Sa(x,Wa)),xe&&_e<11?hn(z.scroller,"dblclick",Sa(x,function(Le){if(!Xe(x,Le)){var Re=xo(x,Le);if(!(!Re||Ja(x,Le)||oo(x.display,Le))){Dn(Le);var gt=x.findWordAt(Re);sl(x.doc,gt.anchor,gt.head)}}})):hn(z.scroller,"dblclick",function(Le){return Xe(x,Le)||Dn(Le)}),hn(z.scroller,"contextmenu",function(Le){return Os(x,Le)}),hn(z.input.getField(),"contextmenu",function(Le){z.scroller.contains(Le.target)||Os(x,Le)});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 ce(Le){if(Le.touches.length!=1)return!1;var Re=Le.touches[0];return Re.radiusX<=1&&Re.radiusY<=1}function ge(Le,Re){if(Re.left==null)return!0;var gt=Re.left-Le.left,Lt=Re.top-Le.top;return gt*gt+Lt*Lt>20*20}hn(z.scroller,"touchstart",function(Le){if(!Xe(x,Le)&&!ce(Le)&&!Ja(x,Le)){z.input.ensurePolled(),clearTimeout(ne);var Re=+new Date;z.activeTouch={start:Re,moved:!1,prev:Re-te.end<=300?te:null},Le.touches.length==1&&(z.activeTouch.left=Le.touches[0].pageX,z.activeTouch.top=Le.touches[0].pageY)}}),hn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),hn(z.scroller,"touchend",function(Le){var Re=z.activeTouch;if(Re&&!oo(z,Le)&&Re.left!=null&&!Re.moved&&new Date-Re.start<300){var gt=x.coordsChar(z.activeTouch,"page"),Lt;!Re.prev||ge(Re,Re.prev)?Lt=new Fi(gt,gt):!Re.prev.prev||ge(Re,Re.prev.prev)?Lt=x.findWordAt(gt):Lt=new Fi(Bt(gt.line,0),Tt(x.doc,Bt(gt.line+1,0))),x.setSelection(Lt.anchor,Lt.head),x.focus(),Dn(Le)}ie()}),hn(z.scroller,"touchcancel",ie),hn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Es(x,z.scroller.scrollTop),ks(x,z.scroller.scrollLeft,!0),ze(x,"scroll",x))}),hn(z.scroller,"mousewheel",function(Le){return Fu(x,Le)}),hn(z.scroller,"DOMMouseScroll",function(Le){return Fu(x,Le)}),hn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Le){Xe(x,Le)||Fn(Le)},over:function(Le){Xe(x,Le)||(Gu(x,Le),Fn(Le))},start:function(Le){return ef(x,Le)},drop:Sa(x,Qh),leave:function(Le){Xe(x,Le)||_l(x)}};var Ce=z.input.getField();hn(Ce,"keyup",function(Le){return lh.call(x,Le)}),hn(Ce,"keydown",Sa(x,lc)),hn(Ce,"keypress",Sa(x,ch)),hn(Ce,"focus",function(Le){return _c(x,Le)}),hn(Ce,"blur",function(Le){return qs(x,Le)})}var rd=[];si.defineInitHook=function(x){return rd.push(x)};function Fo(x,z,ne,te){var ie=x.doc,ce;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ce=Ht(x,z).state:ne="prev");var ge=x.options.tabSize,Ce=Qe(ie,z),Le=Be(Ce.text,null,ge);Ce.stateAfter&&(Ce.stateAfter=null);var Re=Ce.text.match(/^\s*/)[0],gt;if(!te&&!/\S/.test(Ce.text))gt=0,ne="not";else if(ne=="smart"&&(gt=ie.mode.indent(ce,Ce.text.slice(Re.length),Ce.text),gt==Wt||gt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?gt=Be(Qe(ie,z-1).text,null,ge):gt=0:ne=="add"?gt=Le+x.options.indentUnit:ne=="subtract"?gt=Le-x.options.indentUnit:typeof ne=="number"&&(gt=Le+ne),gt=Math.max(0,gt);var Lt="",fn=0;if(x.options.indentWithTabs)for(var ln=Math.floor(gt/ge);ln;--ln)fn+=ge,Lt+=" ";if(fn<gt&&(Lt+=un(gt-fn)),Lt!=Re)return Ml(ie,Lt,Bt(z,0),Bt(z,Re.length),"+input"),Ce.stateAfter=null,!0;for(var Bn=0;Bn<ie.sel.ranges.length;Bn++){var Wn=ie.sel.ranges[Bn];if(Wn.head.line==z&&Wn.head.ch<Re.length){var vr=Bt(z,Re.length);So(ie,Bn,new Fi(vr,vr));break}}}var zo=null;function Rs(x){zo=x}function id(x,z,ne,te,ie){var ce=x.doc;x.display.shift=!1,te||(te=ce.sel);var ge=+new Date-200,Ce=ie=="paste"||x.state.pasteIncoming>ge,Le=Mr(z),Re=null;if(Ce&&te.ranges.length>1)if(zo&&zo.text.join(`
|
|
|
`)==z){if(te.ranges.length%zo.text.length==0){Re=[];for(var gt=0;gt<zo.text.length;gt++)Re.push(ce.splitLines(zo.text[gt]))}}else Le.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Re=Vt(Le,function(Ar){return[Ar]}));for(var Lt=x.curOp.updateInput,fn=te.ranges.length-1;fn>=0;fn--){var ln=te.ranges[fn],Bn=ln.from(),Wn=ln.to();ln.empty()&&(ne&&ne>0?Bn=Bt(Bn.line,Bn.ch-ne):x.state.overwrite&&!Ce?Wn=Bt(Wn.line,Math.min(Qe(ce,Wn.line).text.length,Wn.ch+Gt(Le).length)):Ce&&zo&&zo.lineWise&&zo.text.join(`
|
|
|
`)==Le.join(`
|
|
|
`)&&(Bn=Wn=Bt(Bn.line,0)));var vr={from:Bn,to:Wn,text:Re?Re[fn%Re.length]:Le,origin:ie||(Ce?"paste":x.state.cutIncoming>ge?"cut":"+input")};Ds(x.doc,vr),zr(x,"inputRead",x,vr)}z&&!Ce&&od(x,z),Qs(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Lt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function ad(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&pa(z,function(){return id(z,ne,0,null,"paste")}),!0}function od(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 ce=x.getModeAt(ie.head),ge=!1;if(ce.electricChars){for(var Ce=0;Ce<ce.electricChars.length;Ce++)if(z.indexOf(ce.electricChars.charAt(Ce))>-1){ge=Fo(x,ie.head.line,"smart");break}}else ce.electricInput&&ce.electricInput.test(Qe(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ge=Fo(x,ie.head.line,"smart"));ge&&zr(x,"electricInput",x,ie.head.line)}}}function Il(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,ce={anchor:Bt(ie,0),head:Bt(ie+1,0)};ne.push(ce),z.push(x.getRange(ce.anchor,ce.head))}return{text:z,ranges:ne}}function mh(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function sd(){var x=Ge("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=Ge("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ae?x.style.width="1000px":x.setAttribute("wrap","off"),vt&&(x.style.border="1px solid black"),mh(x),z}function ld(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 ce=this.options,ge=ce[te];ce[te]==ie&&te!="mode"||(ce[te]=ie,z.hasOwnProperty(te)&&Sa(this,z[te])(this,ie,ge),ze(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"](io(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ce=0;ce<ie.length;++ce)if(ie[ce]==te||ie[ce].name==te)return ie.splice(ce,1),!0},addOverlay:ua(function(te,ie){var ce=te.token?te:x.getMode(this.options,te);if(ce.startState)throw new Error("Overlays may not be stateful.");Nt(this.state.overlays,{mode:ce,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ge){return ge.priority}),this.state.modeGen++,za(this)}),removeOverlay:ua(function(te){for(var ie=this.state.overlays,ce=0;ce<ie.length;++ce){var ge=ie[ce].modeSpec;if(ge==te||typeof te=="string"&&ge.name==te){ie.splice(ce,1),this.state.modeGen++,za(this);return}}}),indentLine:ua(function(te,ie,ce){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),wn(this.doc,te)&&Fo(this,te,ie,ce)}),indentSelection:ua(function(te){for(var ie=this.doc.sel.ranges,ce=-1,ge=0;ge<ie.length;ge++){var Ce=ie[ge];if(Ce.empty())Ce.head.line>ce&&(Fo(this,Ce.head.line,te,!0),ce=Ce.head.line,ge==this.doc.sel.primIndex&&Qs(this));else{var Le=Ce.from(),Re=Ce.to(),gt=Math.max(ce,Le.line);ce=Math.min(this.lastLine(),Re.line-(Re.ch?0:1))+1;for(var Lt=gt;Lt<ce;++Lt)Fo(this,Lt,te);var fn=this.doc.sel.ranges;Le.ch==0&&ie.length==fn.length&&fn[ge].from().ch>0&&So(this.doc,ge,new Fi(Le,fn[ge].to()),Ve)}}}),getTokenAt:function(te,ie){return zn(this,te,ie)},getLineTokens:function(te,ie){return zn(this,Bt(te),ie,!0)},getTokenTypeAt:function(te){te=Tt(this.doc,te);var ie=Ot(this,Qe(this.doc,te.line)),ce=0,ge=(ie.length-1)/2,Ce=te.ch,Le;if(Ce==0)Le=ie[2];else for(;;){var Re=ce+ge>>1;if((Re?ie[Re*2-1]:0)>=Ce)ge=Re;else if(ie[Re*2+1]<Ce)ce=Re+1;else{Le=ie[Re*2+2];break}}var gt=Le?Le.indexOf("overlay "):-1;return gt<0?Le:gt==0?null:Le.slice(0,gt-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 ce=[];if(!ne.hasOwnProperty(ie))return ce;var ge=ne[ie],Ce=this.getModeAt(te);if(typeof Ce[ie]=="string")ge[Ce[ie]]&&ce.push(ge[Ce[ie]]);else if(Ce[ie])for(var Le=0;Le<Ce[ie].length;Le++){var Re=ge[Ce[ie][Le]];Re&&ce.push(Re)}else Ce.helperType&&ge[Ce.helperType]?ce.push(ge[Ce.helperType]):ge[Ce.name]&&ce.push(ge[Ce.name]);for(var gt=0;gt<ge._global.length;gt++){var Lt=ge._global[gt];Lt.pred(Ce,this)&&ht(ce,Lt.val)==-1&&ce.push(Lt.val)}return ce},getStateAfter:function(te,ie){var ce=this.doc;return te=an(ce,te==null?ce.first+ce.size-1:te),Ht(this,te+1,ie).state},cursorCoords:function(te,ie){var ce,ge=this.doc.sel.primary();return te==null?ce=ge.head:typeof te=="object"?ce=Tt(this.doc,te):ce=te?ge.from():ge.to(),Da(this,ce,ie||"page")},charCoords:function(te,ie){return lo(this,Tt(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=so(this,te,ie||"page"),Js(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=so(this,{top:te,left:0},ie||"page").top,vn(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ce){var ge=!1,Ce;if(typeof te=="number"){var Le=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Le&&(te=Le,ge=!0),Ce=Qe(this.doc,te)}else Ce=te;return Ra(this,Ce,{top:0,left:0},ie||"page",ce||ge).top+(ge?this.doc.height-Yn(Ce):0)},defaultTextHeight:function(){return as(this.display)},defaultCharWidth:function(){return Ii(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ce,ge,Ce){var Le=this.display;te=Da(this,Tt(this.doc,te));var Re=te.bottom,gt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Le.sizer.appendChild(ie),ge=="over")Re=te.top;else if(ge=="above"||ge=="near"){var Lt=Math.max(Le.wrapper.clientHeight,this.doc.height),fn=Math.max(Le.sizer.clientWidth,Le.lineSpace.clientWidth);(ge=="above"||te.bottom+ie.offsetHeight>Lt)&&te.top>ie.offsetHeight?Re=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=Lt&&(Re=te.bottom),gt+ie.offsetWidth>fn&&(gt=fn-ie.offsetWidth)}ie.style.top=Re+"px",ie.style.left=ie.style.right="",Ce=="right"?(gt=Le.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(Ce=="left"?gt=0:Ce=="middle"&&(gt=(Le.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=gt+"px"),ce&&$d(this,{left:gt,top:Re,right:gt+ie.offsetWidth,bottom:Re+ie.offsetHeight})},triggerOnKeyDown:ua(lc),triggerOnKeyPress:ua(ch),triggerOnKeyUp:lh,triggerOnMouseDown:ua(Wa),execCommand:function(te){if(Dl.hasOwnProperty(te))return Dl[te].call(null,this)},triggerElectric:ua(function(te){od(this,te)}),findPosH:function(te,ie,ce,ge){var Ce=1;ie<0&&(Ce=-1,ie=-ie);for(var Le=Tt(this.doc,te),Re=0;Re<ie&&(Le=ru(this.doc,Le,Ce,ce,ge),!Le.hitSide);++Re);return Le},moveH:ua(function(te,ie){var ce=this;this.extendSelectionsBy(function(ge){return ce.display.shift||ce.doc.extend||ge.empty()?ru(ce.doc,ge.head,te,ie,ce.options.rtlMoveVisually):te<0?ge.from():ge.to()},At)}),deleteH:ua(function(te,ie){var ce=this.doc.sel,ge=this.doc;ce.somethingSelected()?ge.replaceSelection("",null,"+delete"):Po(this,function(Ce){var Le=ru(ge,Ce.head,te,ie,!1);return te<0?{from:Le,to:Ce.head}:{from:Ce.head,to:Le}})}),findPosV:function(te,ie,ce,ge){var Ce=1,Le=ge;ie<0&&(Ce=-1,ie=-ie);for(var Re=Tt(this.doc,te),gt=0;gt<ie;++gt){var Lt=Da(this,Re,"div");if(Le==null?Le=Lt.left:Lt.left=Le,Re=gh(this,Lt,Ce,ce),Re.hitSide)break}return Re},moveV:ua(function(te,ie){var ce=this,ge=this.doc,Ce=[],Le=!this.display.shift&&!ge.extend&&ge.sel.somethingSelected();if(ge.extendSelectionsBy(function(gt){if(Le)return te<0?gt.from():gt.to();var Lt=Da(ce,gt.head,"div");gt.goalColumn!=null&&(Lt.left=gt.goalColumn),Ce.push(Lt.left);var fn=gh(ce,Lt,te,ie);return ie=="page"&>==ge.sel.primary()&&Lc(ce,lo(ce,fn,"div").top-Lt.top),fn},At),Ce.length)for(var Re=0;Re<ge.sel.ranges.length;Re++)ge.sel.ranges[Re].goalColumn=Ce[Re]}),findWordAt:function(te){var ie=this.doc,ce=Qe(ie,te.line).text,ge=te.ch,Ce=te.ch;if(ce){var Le=this.getHelper(te,"wordChars");(te.sticky=="before"||Ce==ce.length)&&ge?--ge:++Ce;for(var Re=ce.charAt(ge),gt=fe(Re,Le)?function(Lt){return fe(Lt,Le)}:/\s/.test(Re)?function(Lt){return/\s/.test(Lt)}:function(Lt){return!/\s/.test(Lt)&&!fe(Lt)};ge>0&>(ce.charAt(ge-1));)--ge;for(;Ce<ce.length&>(ce.charAt(Ce));)++Ce}return new Fi(Bt(te.line,ge),Bt(te.line,Ce))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ut(this.display.cursorDiv,"CodeMirror-overwrite"):He(this.display.cursorDiv,"CodeMirror-overwrite"),ze(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Je()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ua(function(te,ie){el(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-_a(this)-this.display.barHeight,width:te.scrollWidth-_a(this)-this.display.barWidth,clientHeight:bo(this),clientWidth:fa(this)}},scrollIntoView:ua(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:Bt(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?Rd(this,te):Du(this,te.from,te.to,te.margin)}),setSize:ua(function(te,ie){var ce=this,ge=function(Le){return typeof Le=="number"||/^\d+$/.test(String(Le))?Le+"px":Le};te!=null&&(this.display.wrapper.style.width=ge(te)),ie!=null&&(this.display.wrapper.style.height=ge(ie)),this.options.lineWrapping&&La(this);var Ce=this.display.viewFrom;this.doc.iter(Ce,this.display.viewTo,function(Le){if(Le.widgets){for(var Re=0;Re<Le.widgets.length;Re++)if(Le.widgets[Re].noHScroll){Ao(ce,Ce,"widget");break}}++Ce}),this.curOp.forceUpdate=!0,ze(this,"refresh",this)}),operation:function(te){return pa(this,te)},startOperation:function(){return Ls(this)},endOperation:function(){return cs(this)},refresh:ua(function(){var te=this.display.cachedTextHeight;za(this),this.curOp.forceUpdate=!0,Xi(this),el(this,this.doc.scrollLeft,this.doc.scrollTop),Ic(this.display),(te==null||Math.abs(te-as(this.display))>.5||this.options.lineWrapping)&&Aa(this),ze(this,"refresh",this)}),swapDoc:ua(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),Jl(this,te),Xi(this),this.display.input.reset(),el(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,zr(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}},cn(x),x.registerHelper=function(te,ie,ce){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=ce},x.registerGlobalHelper=function(te,ie,ce,ge){x.registerHelper(te,ie,ge),ne[te]._global.push({pred:ce,val:ge})}}function ru(x,z,ne,te,ie){var ce=z,ge=ne,Ce=Qe(x,z.line),Le=ie&&x.direction=="rtl"?-ne:ne;function Re(){var Rr=z.line+Le;return Rr<x.first||Rr>=x.first+x.size?!1:(z=new Bt(Rr,z.ch,z.sticky),Ce=Qe(x,Rr))}function gt(Rr){var Cr;if(te=="codepoint"){var Kr=Ce.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(Kr)?Cr=null:Cr=new Bt(z.line,Math.max(0,Math.min(Ce.text.length,z.ch+ne*(Kr>=55296&&Kr<56320?2:1))),-ne)}else ie?Cr=Go(x.cm,Ce,z,ne):Cr=Uo(Ce,z,ne);if(Cr==null)if(!Rr&&Re())z=dl(ie,x.cm,Ce,z.line,Le);else return!1;else z=Cr;return!0}if(te=="char"||te=="codepoint")gt();else if(te=="column")gt(!0);else if(te=="word"||te=="group")for(var Lt=null,fn=te=="group",ln=x.cm&&x.cm.getHelper(z,"wordChars"),Bn=!0;!(ne<0&&!gt(!Bn));Bn=!1){var Wn=Ce.text.charAt(z.ch)||`
|
|
|
`,vr=fe(Wn,ln)?"w":fn&&Wn==`
|
|
|
`?"n":!fn||/\s/.test(Wn)?null:"p";if(fn&&!Bn&&!vr&&(vr="s"),Lt&&Lt!=vr){ne<0&&(ne=1,gt(),z.sticky="after");break}if(vr&&(Lt=vr),ne>0&&!gt(!Bn))break}var Ar=Uc(x,z,ce,ge,!0);return at(ce,Ar)&&(Ar.hitSide=!0),Ar}function gh(x,z,ne,te){var ie=x.doc,ce=z.left,ge;if(te=="page"){var Ce=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Le=Math.max(Ce-.5*as(x.display),3);ge=(ne>0?z.bottom:z.top)+ne*Le}else te=="line"&&(ge=ne>0?z.bottom+3:z.top-3);for(var Re;Re=Js(x,ce,ge),!!Re.outside;){if(ne<0?ge<=0:ge>=ie.height){Re.hitSide=!0;break}ge+=ne*5}return Re}var Vi=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vi.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;mh(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ce(Ce){for(var Le=Ce.target;Le;Le=Le.parentNode){if(Le==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Le.className))break}return!1}hn(ie,"paste",function(Ce){!ce(Ce)||Xe(te,Ce)||ad(Ce,te)||_e<=11&&setTimeout(Sa(te,function(){return z.updateFromDOM()}),20)}),hn(ie,"compositionstart",function(Ce){z.composing={data:Ce.data,done:!1}}),hn(ie,"compositionupdate",function(Ce){z.composing||(z.composing={data:Ce.data,done:!1})}),hn(ie,"compositionend",function(Ce){z.composing&&(Ce.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),hn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),hn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ge(Ce){if(!(!ce(Ce)||Xe(te,Ce))){if(te.somethingSelected())Rs({lineWise:!1,text:te.getSelections()}),Ce.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Le=Il(te);Rs({lineWise:!0,text:Le.text}),Ce.type=="cut"&&te.operation(function(){te.setSelections(Le.ranges,0,Ve),te.replaceSelection("",null,"cut")})}else return;if(Ce.clipboardData){Ce.clipboardData.clearData();var Re=zo.text.join(`
|
|
|
`);if(Ce.clipboardData.setData("Text",Re),Ce.clipboardData.getData("Text")==Re){Ce.preventDefault();return}}var gt=sd(),Lt=gt.firstChild;te.display.lineSpace.insertBefore(gt,te.display.lineSpace.firstChild),Lt.value=zo.text.join(`
|
|
|
`);var fn=document.activeElement;Dt(Lt),setTimeout(function(){te.display.lineSpace.removeChild(gt),fn.focus(),fn==ie&&ne.showPrimarySelection()},50)}}hn(ie,"copy",ge),hn(ie,"cut",ge)},Vi.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Vi.prototype.prepareSelection=function(){var x=Eu(this.cm,!1);return x.focus=document.activeElement==this.div,x},Vi.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Vi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vi.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 ce=iu(z,x.anchorNode,x.anchorOffset),ge=iu(z,x.focusNode,x.focusOffset);if(!(ce&&!ce.bad&&ge&&!ge.bad&&dn(Rt(ce,ge),te)==0&&dn(Pt(ce,ge),ie)==0)){var Ce=z.display.view,Le=te.line>=z.display.viewFrom&&vh(z,te)||{node:Ce[0].measure.map[2],offset:0},Re=ie.line<z.display.viewTo&&vh(z,ie);if(!Re){var gt=Ce[Ce.length-1].measure,Lt=gt.maps?gt.maps[gt.maps.length-1]:gt.map;Re={node:Lt[Lt.length-1],offset:Lt[Lt.length-2]-Lt[Lt.length-3]}}if(!Le||!Re){x.removeAllRanges();return}var fn=x.rangeCount&&x.getRangeAt(0),ln;try{ln=et(Le.node,Le.offset,Re.offset,Re.node)}catch(Bn){}ln&&(!pe&&z.state.focused?(x.collapse(Le.node,Le.offset),ln.collapsed||(x.removeAllRanges(),x.addRange(ln))):(x.removeAllRanges(),x.addRange(ln)),fn&&x.anchorNode==null?x.addRange(fn):pe&&this.startGracePeriod()),this.rememberSelection()}},Vi.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)},Vi.prototype.showMultipleSelections=function(x){Ct(this.cm.display.cursorDiv,x.cursors),Ct(this.cm.display.selectionDiv,x.selection)},Vi.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Vi.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return kt(this.div,z)},Vi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Vi.prototype.blur=function(){this.div.blur()},Vi.prototype.getField=function(){return this.div},Vi.prototype.supportsTouch=function(){return!0},Vi.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():pa(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)},Vi.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Vi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(nt&&Me&&this.cm.display.gutterSpecs.length&&cf(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=iu(z,x.anchorNode,x.anchorOffset),te=iu(z,x.focusNode,x.focusOffset);ne&&te&&pa(z,function(){Ca(z.doc,Ro(ne,te),Ve),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},Vi.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=Bt(te.line-1,Qe(x.doc,te.line-1).length)),ie.ch==Qe(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=Bt(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ce,ge,Ce;te.line==z.viewFrom||(ce=po(x,te.line))==0?(ge=qt(z.view[0].line),Ce=z.view[0].node):(ge=qt(z.view[ce].line),Ce=z.view[ce-1].node.nextSibling);var Le=po(x,ie.line),Re,gt;if(Le==z.view.length-1?(Re=z.viewTo-1,gt=z.lineDiv.lastChild):(Re=qt(z.view[Le+1].line)-1,gt=z.view[Le+1].node.previousSibling),!Ce)return!1;for(var Lt=x.doc.splitLines(uf(x,Ce,gt,ge,Re)),fn=pt(x.doc,Bt(ge,0),Bt(Re,Qe(x.doc,Re).text.length));Lt.length>1&&fn.length>1;)if(Gt(Lt)==Gt(fn))Lt.pop(),fn.pop(),Re--;else if(Lt[0]==fn[0])Lt.shift(),fn.shift(),ge++;else break;for(var ln=0,Bn=0,Wn=Lt[0],vr=fn[0],Ar=Math.min(Wn.length,vr.length);ln<Ar&&Wn.charCodeAt(ln)==vr.charCodeAt(ln);)++ln;for(var Rr=Gt(Lt),Cr=Gt(fn),Kr=Math.min(Rr.length-(Lt.length==1?ln:0),Cr.length-(fn.length==1?ln:0));Bn<Kr&&Rr.charCodeAt(Rr.length-Bn-1)==Cr.charCodeAt(Cr.length-Bn-1);)++Bn;if(Lt.length==1&&fn.length==1&&ge==te.line)for(;ln&&ln>te.ch&&Rr.charCodeAt(Rr.length-Bn-1)==Cr.charCodeAt(Cr.length-Bn-1);)ln--,Bn++;Lt[Lt.length-1]=Rr.slice(0,Rr.length-Bn).replace(/^\u200b+/,""),Lt[0]=Lt[0].slice(ln).replace(/\u200b+$/,"");var Qr=Bt(ge,ln),ti=Bt(Re,fn.length?Gt(fn).length-Bn:0);if(Lt.length>1||Lt[0]||dn(Qr,ti))return Ml(x.doc,Lt,Qr,ti,"+input"),!0},Vi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vi.prototype.reset=function(){this.forceCompositionEnd()},Vi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Vi.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))},Vi.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&pa(this.cm,function(){return za(x.cm)})},Vi.prototype.setUneditable=function(x){x.contentEditable="false"},Vi.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||Sa(this.cm,id)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Vi.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Vi.prototype.onContextMenu=function(){},Vi.prototype.resetPosition=function(){},Vi.prototype.needsContentAttribute=!0;function vh(x,z){var ne=Xa(x,z.line);if(!ne||ne.hidden)return null;var te=Qe(x.doc,z.line),ie=_o(ne,te,z.line),ce=Cn(te,x.doc.direction),ge="left";if(ce){var Ce=on(ce,z.ch);ge=Ce%2?"right":"left"}var Le=rs(ie.map,z.ch,ge);return Le.offset=Le.collapse=="right"?Le.end:Le.start,Le}function cf(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function Pl(x,z){return z&&(x.bad=!0),x}function uf(x,z,ne,te,ie){var ce="",ge=!1,Ce=x.doc.lineSeparator(),Le=!1;function Re(ln){return function(Bn){return Bn.id==ln}}function gt(){ge&&(ce+=Ce,Le&&(ce+=Ce),ge=Le=!1)}function Lt(ln){ln&&(gt(),ce+=ln)}function fn(ln){if(ln.nodeType==1){var Bn=ln.getAttribute("cm-text");if(Bn){Lt(Bn);return}var Wn=ln.getAttribute("cm-marker"),vr;if(Wn){var Ar=x.findMarks(Bt(te,0),Bt(ie+1,0),Re(+Wn));Ar.length&&(vr=Ar[0].find(0))&&Lt(pt(x.doc,vr.from,vr.to).join(Ce));return}if(ln.getAttribute("contenteditable")=="false")return;var Rr=/^(pre|div|p|li|table|br)$/i.test(ln.nodeName);if(!/^br$/i.test(ln.nodeName)&&ln.textContent.length==0)return;Rr&>();for(var Cr=0;Cr<ln.childNodes.length;Cr++)fn(ln.childNodes[Cr]);/^(pre|p)$/i.test(ln.nodeName)&&(Le=!0),Rr&&(ge=!0)}else ln.nodeType==3&&Lt(ln.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;fn(z),z!=ne;)z=z.nextSibling,Le=!1;return ce}function iu(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return Pl(x.clipPos(Bt(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 ce=x.display.view[ie];if(ce.node==te)return df(ce,z,ne)}}function df(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!kt(te,z))return Pl(Bt(qt(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ce=x.rest?Gt(x.rest):x.line;return Pl(Bt(qt(ce),ce.text.length),ie)}var ge=z.nodeType==3?z:null,Ce=z;for(!ge&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ge=z.firstChild,ne&&(ne=ge.nodeValue.length));Ce.parentNode!=te;)Ce=Ce.parentNode;var Le=x.measure,Re=Le.maps;function gt(vr,Ar,Rr){for(var Cr=-1;Cr<(Re?Re.length:0);Cr++)for(var Kr=Cr<0?Le.map:Re[Cr],Qr=0;Qr<Kr.length;Qr+=3){var ti=Kr[Qr+2];if(ti==vr||ti==Ar){var Ci=qt(Cr<0?x.line:x.rest[Cr]),qi=Kr[Qr]+Rr;return(Rr<0||ti!=vr)&&(qi=Kr[Qr+(Rr?1:0)]),Bt(Ci,qi)}}}var Lt=gt(ge,Ce,ne);if(Lt)return Pl(Lt,ie);for(var fn=Ce.nextSibling,ln=ge?ge.nodeValue.length-ne:0;fn;fn=fn.nextSibling){if(Lt=gt(fn,fn.firstChild,0),Lt)return Pl(Bt(Lt.line,Lt.ch-ln),ie);ln+=fn.textContent.length}for(var Bn=Ce.previousSibling,Wn=ne;Bn;Bn=Bn.previousSibling){if(Lt=gt(Bn,Bn.firstChild,-1),Lt)return Pl(Bt(Lt.line,Lt.ch+Wn),ie);Wn+=Bn.textContent.length}}var Ji=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new be,this.hasSelection=!1,this.composing=null};Ji.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),vt&&(ie.style.width="0px"),hn(ie,"input",function(){xe&&_e>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),hn(ie,"paste",function(ge){Xe(te,ge)||ad(ge,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ce(ge){if(!Xe(te,ge)){if(te.somethingSelected())Rs({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Ce=Il(te);Rs({lineWise:!0,text:Ce.text}),ge.type=="cut"?te.setSelections(Ce.ranges,null,Ve):(ne.prevInput="",ie.value=Ce.text.join(`
|
|
|
`),Dt(ie))}else return;ge.type=="cut"&&(te.state.cutIncoming=+new Date)}}hn(ie,"cut",ce),hn(ie,"copy",ce),hn(x.scroller,"paste",function(ge){if(!(oo(x,ge)||Xe(te,ge))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Ce=new Event("paste");Ce.clipboardData=ge.clipboardData,ie.dispatchEvent(Ce)}}),hn(x.lineSpace,"selectstart",function(ge){oo(x,ge)||Dn(ge)}),hn(ie,"compositionstart",function(){var ge=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:ge,range:te.markText(ge,te.getCursor("to"),{className:"CodeMirror-composing"})}}),hn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},Ji.prototype.createField=function(x){this.wrapper=sd(),this.textarea=this.wrapper.firstChild},Ji.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},Ji.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=Eu(x);if(x.options.moveInputWithCursor){var ie=Da(x,ne.sel.primary().head,"div"),ce=z.wrapper.getBoundingClientRect(),ge=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+ge.top-ce.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+ge.left-ce.left))}return te},Ji.prototype.showSelection=function(x){var z=this.cm,ne=z.display;Ct(ne.cursorDiv,x.cursors),Ct(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},Ji.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&&Dt(this.textarea),xe&&_e>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",xe&&_e>=9&&(this.hasSelection=null))}},Ji.prototype.getField=function(){return this.textarea},Ji.prototype.supportsTouch=function(){return!1},Ji.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!dt||Je()!=this.textarea))try{this.textarea.focus()}catch(x){}},Ji.prototype.blur=function(){this.textarea.blur()},Ji.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ji.prototype.receivedFocus=function(){this.slowPoll()},Ji.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},Ji.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)},Ji.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||rr(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(xe&&_e>=9&&this.hasSelection===ie||st&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var ce=ie.charCodeAt(0);if(ce==8203&&!te&&(te="\u200B"),ce==8666)return this.reset(),this.cm.execCommand("undo")}for(var ge=0,Ce=Math.min(te.length,ie.length);ge<Ce&&te.charCodeAt(ge)==ie.charCodeAt(ge);)++ge;return pa(z,function(){id(z,ie.slice(ge),te.length-ge,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},Ji.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ji.prototype.onKeyPress=function(){xe&&_e>=9&&(this.hasSelection=null),this.fastPoll()},Ji.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ce=xo(ne,x),ge=te.scroller.scrollTop;if(!ce||Ke)return;var Ce=ne.options.resetSelectionOnContextMenu;Ce&&ne.doc.sel.contains(ce)==-1&&Sa(ne,Ca)(ne.doc,Ro(ce),Ve);var Le=ie.style.cssText,Re=z.wrapper.style.cssText,gt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-gt.top-5)+"px; left: "+(x.clientX-gt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(xe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Lt;Ae&&(Lt=window.scrollY),te.input.focus(),Ae&&window.scrollTo(null,Lt),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=ln,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function fn(){if(ie.selectionStart!=null){var Wn=ne.somethingSelected(),vr="\u200B"+(Wn?ie.value:"");ie.value="\u21DA",ie.value=vr,z.prevInput=Wn?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=vr.length,te.selForContextMenu=ne.doc.sel}}function ln(){if(z.contextMenuPending==ln&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Re,ie.style.cssText=Le,xe&&_e<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ge),ie.selectionStart!=null)){(!xe||xe&&_e<9)&&fn();var Wn=0,vr=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?Sa(ne,ju)(ne):Wn++<10?te.detectingSelectAll=setTimeout(vr,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(vr,200)}}if(xe&&_e>=9&&fn(),Ze){Fn(x);var Bn=function(){rt(window,"mouseup",Bn),setTimeout(ln,20)};hn(window,"mouseup",Bn)}else setTimeout(ln,50)},Ji.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},Ji.prototype.setUneditable=function(){},Ji.prototype.needsContentAttribute=!1;function hl(x,z){if(z=z?ut(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=Je();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Ce.getValue()}var ie;if(x.form&&(hn(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ce=x.form;ie=ce.submit;try{var ge=ce.submit=function(){te(),ce.submit=ie,ce.submit(),ce.submit=ge}}catch(Le){}}z.finishInit=function(Le){Le.save=te,Le.getTextArea=function(){return x},Le.toTextArea=function(){Le.toTextArea=isNaN,te(),x.parentNode.removeChild(Le.getWrapperElement()),x.style.display="",x.form&&(rt(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var Ce=si(function(Le){return x.parentNode.insertBefore(Le,x.nextSibling)},z);return Ce}function Bl(x){x.off=rt,x.on=hn,x.wheelEventPixels=Nu,x.Doc=ya,x.splitLines=Mr,x.countColumn=Be,x.findColumn=gn,x.isWordChar=de,x.Pass=Wt,x.signal=ze,x.Line=mr,x.changeEnd=us,x.scrollbarModel=Tu,x.Pos=Bt,x.cmpPos=dn,x.modes=jr,x.mimeModes=Nr,x.resolveMode=Rn,x.getMode=$n,x.modeExtensions=wr,x.extendMode=lt,x.copyState=ke,x.startState=Te,x.innerMode=Oe,x.commands=Dl,x.keyMap=Yi,x.keyName=ul,x.isModifierKey=sc,x.lookupKey=ms,x.normalizeKeyMap=Yu,x.StringStream=Pe,x.SharedTextMarker=Si,x.TextMarker=Ts,x.LineWidget=kl,x.e_preventDefault=Dn,x.e_stopPropagation=Tn,x.e_stop=Fn,x.addClass=Ut,x.contains=kt,x.rmClass=He,x.keyNames=No}of(si),ld(si);var ys="iter insert remove copy getEditor constructor".split(" ");for(var Bo in ya.prototype)ya.prototype.hasOwnProperty(Bo)&&ht(ys,Bo)<0&&(si.prototype[Bo]=function(x){return function(){return x.apply(this.doc,arguments)}}(ya.prototype[Bo]));return cn(ya),si.inputStyles={textarea:Ji,contenteditable:Vi},si.defineMode=function(x){!si.defaults.mode&&x!="null"&&(si.defaults.mode=x),Jn.apply(this,arguments)},si.defineMIME=lr,si.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),si.defineMIME("text/plain","null"),si.defineExtension=function(x,z){si.prototype[x]=z},si.defineDocExtension=function(x,z){ya.prototype[x]=z},si.fromTextArea=hl,Bl(si),si.version="5.58.2",si})},25419:function(Mn,sn,ue){(function(pe){pe(ue(89780),ue(15525),ue(98101))})(function(pe){"use strict";pe.defineMode("markdown",function(je,Fe){var tt=pe.getMode(je,"text/html"),xe=tt.name=="null";function _e(Be){if(pe.findModeByName){var be=pe.findModeByName(Be);be&&(Be=be.mime||be.mimes[0])}var ht=pe.getMode(je,Be);return ht.name=="null"?null:ht}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.tokenTypeOverrides={});var Ae={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 Se in Ae)Ae.hasOwnProperty(Se)&&Fe.tokenTypeOverrides[Se]&&(Ae[Se]=Fe.tokenTypeOverrides[Se]);var Me=/^([*\-_])(?:\s*\1){2,}\s*$/,Ke=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ct=/^\[(x| )\](?=\s)/i,De=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,We=/^ {0,3}(?:\={1,}|-{2,})\s*$/,vt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,dt=/^\s*\[[^\]]+?\]:.*$/,st=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,wt=" ";function en(Be,be,ht){return be.f=be.inline=ht,ht(Be,be)}function it(Be,be,ht){return be.f=be.block=ht,ht(Be,be)}function mt(Be){return!Be||!/\S/.test(Be.string)}function Ze(Be){if(Be.linkTitle=!1,Be.linkHref=!1,Be.linkText=!1,Be.em=!1,Be.strong=!1,Be.strikethrough=!1,Be.quote=0,Be.indentedCode=!1,Be.f==He){var be=xe;if(!be){var ht=pe.innerMode(tt,Be.htmlState);be=ht.mode.name=="xml"&&ht.state.tagStart===null&&!ht.state.context&&ht.state.tokenize.isInText}be&&(Be.f=It,Be.block=Ee,Be.htmlState=null)}return Be.trailingSpace=0,Be.trailingSpaceNewLine=!1,Be.prevLine=Be.thisLine,Be.thisLine={stream:null},null}function Ee(Be,be){var ht=Be.column()===be.indentation,nn=mt(be.prevLine.stream),Wt=be.indentedCode,Ve=be.prevLine.hr,Ye=be.list!==!1,At=(be.listStack[be.listStack.length-1]||0)+3;be.indentedCode=!1;var gn=be.indentation;if(be.indentationDiff===null&&(be.indentationDiff=be.indentation,Ye)){for(be.list=null;gn<be.listStack[be.listStack.length-1];)be.listStack.pop(),be.listStack.length?be.indentation=be.listStack[be.listStack.length-1]:be.list=!1;be.list!==!1&&(be.indentationDiff=gn-be.listStack[be.listStack.length-1])}var Jt=!nn&&!Ve&&!be.prevLine.header&&(!Ye||!Wt)&&!be.prevLine.fencedCodeEnd,un=(be.list===!1||Ve||nn)&&be.indentation<=At&&Be.match(Me),Gt=null;if(be.indentationDiff>=4&&(Wt||be.prevLine.fencedCodeEnd||be.prevLine.header||nn))return Be.skipToEnd(),be.indentedCode=!0,Ae.code;if(Be.eatSpace())return null;if(ht&&be.indentation<=At&&(Gt=Be.match(De))&&Gt[1].length<=6)return be.quote=0,be.header=Gt[1].length,be.thisLine.header=!0,Fe.highlightFormatting&&(be.formatting="header"),be.f=be.inline,Ct(be);if(be.indentation<=At&&Be.eat(">"))return be.quote=ht?1:be.quote+1,Fe.highlightFormatting&&(be.formatting="quote"),Be.eatSpace(),Ct(be);if(!un&&!be.setext&&ht&&be.indentation<=At&&(Gt=Be.match(Ke))){var Vt=Gt[1]?"ol":"ul";return be.indentation=gn+Be.current().length,be.list=!0,be.quote=0,be.listStack.push(be.indentation),be.em=!1,be.strong=!1,be.code=!1,be.strikethrough=!1,Fe.taskLists&&Be.match(ct,!1)&&(be.taskList=!0),be.f=be.inline,Fe.highlightFormatting&&(be.formatting=["list","list-"+Vt]),Ct(be)}else{if(ht&&be.indentation<=At&&(Gt=Be.match(nt,!0)))return be.quote=0,be.fencedEndRE=new RegExp(Gt[1]+"+ *$"),be.localMode=Fe.fencedCodeBlockHighlighting&&_e(Gt[2]||Fe.fencedCodeBlockDefaultMode),be.localMode&&(be.localState=pe.startState(be.localMode)),be.f=be.block=Ue,Fe.highlightFormatting&&(be.formatting="code-block"),be.code=-1,Ct(be);if(be.setext||(!Jt||!Ye)&&!be.quote&&be.list===!1&&!be.code&&!un&&!dt.test(Be.string)&&(Gt=Be.lookAhead(1))&&(Gt=Gt.match(We)))return be.setext?(be.header=be.setext,be.setext=0,Be.skipToEnd(),Fe.highlightFormatting&&(be.formatting="header")):(be.header=Gt[0].charAt(0)=="="?1:2,be.setext=be.header),be.thisLine.header=!0,be.f=be.inline,Ct(be);if(un)return Be.skipToEnd(),be.hr=!0,be.thisLine.hr=!0,Ae.hr;if(Be.peek()==="[")return en(Be,be,ft)}return en(Be,be,be.inline)}function He(Be,be){var ht=tt.token(Be,be.htmlState);if(!xe){var nn=pe.innerMode(tt,be.htmlState);(nn.mode.name=="xml"&&nn.state.tagStart===null&&!nn.state.context&&nn.state.tokenize.isInText||be.md_inside&&Be.current().indexOf(">")>-1)&&(be.f=It,be.block=Ee,be.htmlState=null)}return ht}function Ue(Be,be){var ht=be.listStack[be.listStack.length-1]||0,nn=be.indentation<ht,Wt=ht+3;if(be.fencedEndRE&&be.indentation<=Wt&&(nn||Be.match(be.fencedEndRE))){Fe.highlightFormatting&&(be.formatting="code-block");var Ve;return nn||(Ve=Ct(be)),be.localMode=be.localState=null,be.block=Ee,be.f=It,be.fencedEndRE=null,be.code=0,be.thisLine.fencedCodeEnd=!0,nn?it(Be,be,be.block):Ve}else return be.localMode?be.localMode.token(Be,be.localState):(Be.skipToEnd(),Ae.code)}function Ct(Be){var be=[];if(Be.formatting){be.push(Ae.formatting),typeof Be.formatting=="string"&&(Be.formatting=[Be.formatting]);for(var ht=0;ht<Be.formatting.length;ht++)be.push(Ae.formatting+"-"+Be.formatting[ht]),Be.formatting[ht]==="header"&&be.push(Ae.formatting+"-"+Be.formatting[ht]+"-"+Be.header),Be.formatting[ht]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Be.quote?be.push(Ae.formatting+"-"+Be.formatting[ht]+"-"+Be.quote):be.push("error"))}if(Be.taskOpen)return be.push("meta"),be.length?be.join(" "):null;if(Be.taskClosed)return be.push("property"),be.length?be.join(" "):null;if(Be.linkHref?be.push(Ae.linkHref,"url"):(Be.strong&&be.push(Ae.strong),Be.em&&be.push(Ae.em),Be.strikethrough&&be.push(Ae.strikethrough),Be.emoji&&be.push(Ae.emoji),Be.linkText&&be.push(Ae.linkText),Be.code&&be.push(Ae.code),Be.image&&be.push(Ae.image),Be.imageAltText&&be.push(Ae.imageAltText,"link"),Be.imageMarker&&be.push(Ae.imageMarker)),Be.header&&be.push(Ae.header,Ae.header+"-"+Be.header),Be.quote&&(be.push(Ae.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Be.quote?be.push(Ae.quote+"-"+Be.quote):be.push(Ae.quote+"-"+Fe.maxBlockquoteDepth)),Be.list!==!1){var nn=(Be.listStack.length-1)%3;nn?nn===1?be.push(Ae.list2):be.push(Ae.list3):be.push(Ae.list1)}return Be.trailingSpaceNewLine?be.push("trailing-space-new-line"):Be.trailingSpace&&be.push("trailing-space-"+(Be.trailingSpace%2?"a":"b")),be.length?be.join(" "):null}function Ge(Be,be){if(Be.match(vt,!0))return Ct(be)}function It(Be,be){var ht=be.text(Be,be);if(typeof ht!="undefined")return ht;if(be.list)return be.list=null,Ct(be);if(be.taskList){var nn=Be.match(ct,!0)[1]===" ";return nn?be.taskOpen=!0:be.taskClosed=!0,Fe.highlightFormatting&&(be.formatting="task"),be.taskList=!1,Ct(be)}if(be.taskOpen=!1,be.taskClosed=!1,be.header&&Be.match(/^#+$/,!0))return Fe.highlightFormatting&&(be.formatting="header"),Ct(be);var Wt=Be.next();if(be.linkTitle){be.linkTitle=!1;var Ve=Wt;Wt==="("&&(Ve=")"),Ve=(Ve+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ye="^\\s*(?:[^"+Ve+"\\\\]+|\\\\\\\\|\\\\.)"+Ve;if(Be.match(new RegExp(Ye),!0))return Ae.linkHref}if(Wt==="`"){var At=be.formatting;Fe.highlightFormatting&&(be.formatting="code"),Be.eatWhile("`");var gn=Be.current().length;if(be.code==0&&(!be.quote||gn==1))return be.code=gn,Ct(be);if(gn==be.code){var Jt=Ct(be);return be.code=0,Jt}else return be.formatting=At,Ct(be)}else if(be.code)return Ct(be);if(Wt==="\\"&&(Be.next(),Fe.highlightFormatting)){var un=Ct(be),Gt=Ae.formatting+"-escape";return un?un+" "+Gt:Gt}if(Wt==="!"&&Be.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return be.imageMarker=!0,be.image=!0,Fe.highlightFormatting&&(be.formatting="image"),Ct(be);if(Wt==="["&&be.imageMarker&&Be.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return be.imageMarker=!1,be.imageAltText=!0,Fe.highlightFormatting&&(be.formatting="image"),Ct(be);if(Wt==="]"&&be.imageAltText){Fe.highlightFormatting&&(be.formatting="image");var un=Ct(be);return be.imageAltText=!1,be.image=!1,be.inline=be.f=kt,un}if(Wt==="["&&!be.image)return be.linkText&&Be.match(/^.*?\]/)||(be.linkText=!0,Fe.highlightFormatting&&(be.formatting="link")),Ct(be);if(Wt==="]"&&be.linkText){Fe.highlightFormatting&&(be.formatting="link");var un=Ct(be);return be.linkText=!1,be.inline=be.f=Be.match(/\(.*?\)| ?\[.*?\]/,!1)?kt:It,un}if(Wt==="<"&&Be.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){be.f=be.inline=et,Fe.highlightFormatting&&(be.formatting="link");var un=Ct(be);return un?un+=" ":un="",un+Ae.linkInline}if(Wt==="<"&&Be.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){be.f=be.inline=et,Fe.highlightFormatting&&(be.formatting="link");var un=Ct(be);return un?un+=" ":un="",un+Ae.linkEmail}if(Fe.xml&&Wt==="<"&&Be.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Vt=Be.string.indexOf(">",Be.pos);if(Vt!=-1){var Nt=Be.string.substring(Be.start,Vt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Nt)&&(be.md_inside=!0)}return Be.backUp(1),be.htmlState=pe.startState(tt),it(Be,be,He)}if(Fe.xml&&Wt==="<"&&Be.match(/^\/\w*?>/))return be.md_inside=!1,"tag";if(Wt==="*"||Wt==="_"){for(var ve=1,se=Be.pos==1?" ":Be.string.charAt(Be.pos-2);ve<3&&Be.eat(Wt);)ve++;var oe=Be.peek()||" ",de=!/\s/.test(oe)&&(!st.test(oe)||/\s/.test(se)||st.test(se)),fe=!/\s/.test(se)&&(!st.test(se)||/\s/.test(oe)||st.test(oe)),le=null,Ie=null;if(ve%2&&(!be.em&&de&&(Wt==="*"||!fe||st.test(se))?le=!0:be.em==Wt&&fe&&(Wt==="*"||!de||st.test(oe))&&(le=!1)),ve>1&&(!be.strong&&de&&(Wt==="*"||!fe||st.test(se))?Ie=!0:be.strong==Wt&&fe&&(Wt==="*"||!de||st.test(oe))&&(Ie=!1)),Ie!=null||le!=null){Fe.highlightFormatting&&(be.formatting=le==null?"strong":Ie==null?"em":"strong em"),le===!0&&(be.em=Wt),Ie===!0&&(be.strong=Wt);var Jt=Ct(be);return le===!1&&(be.em=!1),Ie===!1&&(be.strong=!1),Jt}}else if(Wt===" "&&(Be.eat("*")||Be.eat("_"))){if(Be.peek()===" ")return Ct(be);Be.backUp(1)}if(Fe.strikethrough){if(Wt==="~"&&Be.eatWhile(Wt)){if(be.strikethrough){Fe.highlightFormatting&&(be.formatting="strikethrough");var Jt=Ct(be);return be.strikethrough=!1,Jt}else if(Be.match(/^[^\s]/,!1))return be.strikethrough=!0,Fe.highlightFormatting&&(be.formatting="strikethrough"),Ct(be)}else if(Wt===" "&&Be.match(/^~~/,!0)){if(Be.peek()===" ")return Ct(be);Be.backUp(2)}}if(Fe.emoji&&Wt===":"&&Be.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){be.emoji=!0,Fe.highlightFormatting&&(be.formatting="emoji");var ot=Ct(be);return be.emoji=!1,ot}return Wt===" "&&(Be.match(/^ +$/,!1)?be.trailingSpace++:be.trailingSpace&&(be.trailingSpaceNewLine=!0)),Ct(be)}function et(Be,be){var ht=Be.next();if(ht===">"){be.f=be.inline=It,Fe.highlightFormatting&&(be.formatting="link");var nn=Ct(be);return nn?nn+=" ":nn="",nn+Ae.linkInline}return Be.match(/^[^>]+/,!0),Ae.linkInline}function kt(Be,be){if(Be.eatSpace())return null;var ht=Be.next();return ht==="("||ht==="["?(be.f=be.inline=Ut(ht==="("?")":"]"),Fe.highlightFormatting&&(be.formatting="link-string"),be.linkHref=!0,Ct(be)):"error"}var Je={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ut(Be){return function(be,ht){var nn=be.next();if(nn===Be){ht.f=ht.inline=It,Fe.highlightFormatting&&(ht.formatting="link-string");var Wt=Ct(ht);return ht.linkHref=!1,Wt}return be.match(Je[Be]),ht.linkHref=!0,Ct(ht)}}function ft(Be,be){return Be.match(/^([^\]\\]|\\.)*\]:/,!1)?(be.f=Dt,Be.next(),Fe.highlightFormatting&&(be.formatting="link"),be.linkText=!0,Ct(be)):en(Be,be,It)}function Dt(Be,be){if(Be.match(/^\]:/,!0)){be.f=be.inline=Et,Fe.highlightFormatting&&(be.formatting="link");var ht=Ct(be);return be.linkText=!1,ht}return Be.match(/^([^\]\\]|\\.)+/,!0),Ae.linkText}function Et(Be,be){return Be.eatSpace()?null:(Be.match(/^[^\s]+/,!0),Be.peek()===void 0?be.linkTitle=!0:Be.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),be.f=be.inline=It,Ae.linkHref+" url")}var ut={startState:function(){return{f:Ee,prevLine:{stream:null},thisLine:{stream:null},block:Ee,htmlState:null,indentation:0,inline:It,text:Ge,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(Be){return{f:Be.f,prevLine:Be.prevLine,thisLine:Be.thisLine,block:Be.block,htmlState:Be.htmlState&&pe.copyState(tt,Be.htmlState),indentation:Be.indentation,localMode:Be.localMode,localState:Be.localMode?pe.copyState(Be.localMode,Be.localState):null,inline:Be.inline,text:Be.text,formatting:!1,linkText:Be.linkText,linkTitle:Be.linkTitle,linkHref:Be.linkHref,code:Be.code,em:Be.em,strong:Be.strong,strikethrough:Be.strikethrough,emoji:Be.emoji,header:Be.header,setext:Be.setext,hr:Be.hr,taskList:Be.taskList,list:Be.list,listStack:Be.listStack.slice(0),quote:Be.quote,indentedCode:Be.indentedCode,trailingSpace:Be.trailingSpace,trailingSpaceNewLine:Be.trailingSpaceNewLine,md_inside:Be.md_inside,fencedEndRE:Be.fencedEndRE}},token:function(Be,be){if(be.formatting=!1,Be!=be.thisLine.stream){if(be.header=0,be.hr=!1,Be.match(/^\s*$/,!0))return Ze(be),null;if(be.prevLine=be.thisLine,be.thisLine={stream:Be},be.taskList=!1,be.trailingSpace=0,be.trailingSpaceNewLine=!1,!be.localState&&(be.f=be.block,be.f!=He)){var ht=Be.match(/^\s*/,!0)[0].replace(/\t/g,wt).length;if(be.indentation=ht,be.indentationDiff=null,ht>0)return null}}return be.f(Be,be)},innerMode:function(Be){return Be.block==He?{state:Be.htmlState,mode:tt}:Be.localState?{state:Be.localState,mode:Be.localMode}:{state:Be,mode:ut}},indent:function(Be,be,ht){return Be.block==He&&tt.indent?tt.indent(Be.htmlState,be,ht):Be.localState&&Be.localMode.indent?Be.localMode.indent(Be.localState,be,ht):pe.Pass},blankLine:Ze,getType:Ct,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ut},"xml"),pe.defineMIME("text/markdown","markdown"),pe.defineMIME("text/x-markdown","markdown")})},98101:function(Mn,sn,ue){(function(pe){pe(ue(89780))})(function(pe){"use strict";pe.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 je=0;je<pe.modeInfo.length;je++){var Fe=pe.modeInfo[je];Fe.mimes&&(Fe.mime=Fe.mimes[0])}pe.findModeByMIME=function(tt){tt=tt.toLowerCase();for(var xe=0;xe<pe.modeInfo.length;xe++){var _e=pe.modeInfo[xe];if(_e.mime==tt)return _e;if(_e.mimes){for(var Ae=0;Ae<_e.mimes.length;Ae++)if(_e.mimes[Ae]==tt)return _e}}if(/\+xml$/.test(tt))return pe.findModeByMIME("application/xml");if(/\+json$/.test(tt))return pe.findModeByMIME("application/json")},pe.findModeByExtension=function(tt){tt=tt.toLowerCase();for(var xe=0;xe<pe.modeInfo.length;xe++){var _e=pe.modeInfo[xe];if(_e.ext){for(var Ae=0;Ae<_e.ext.length;Ae++)if(_e.ext[Ae]==tt)return _e}}},pe.findModeByFileName=function(tt){for(var xe=0;xe<pe.modeInfo.length;xe++){var _e=pe.modeInfo[xe];if(_e.file&&_e.file.test(tt))return _e}var Ae=tt.lastIndexOf("."),Se=Ae>-1&&tt.substring(Ae+1,tt.length);if(Se)return pe.findModeByExtension(Se)},pe.findModeByName=function(tt){tt=tt.toLowerCase();for(var xe=0;xe<pe.modeInfo.length;xe++){var _e=pe.modeInfo[xe];if(_e.name.toLowerCase()==tt)return _e;if(_e.alias){for(var Ae=0;Ae<_e.alias.length;Ae++)if(_e.alias[Ae].toLowerCase()==tt)return _e}}}})},67549:function(Mn,sn,ue){(function(pe){pe(ue(89780))})(function(pe){"use strict";pe.defineMode("stex",function(je,Fe){"use strict";function tt(vt,nt){vt.cmdState.push(nt)}function xe(vt){return vt.cmdState.length>0?vt.cmdState[vt.cmdState.length-1]:null}function _e(vt){var nt=vt.cmdState.pop();nt&&nt.closeBracket()}function Ae(vt){for(var nt=vt.cmdState,dt=nt.length-1;dt>=0;dt--){var st=nt[dt];if(st.name!="DEFAULT")return st}return{styleIdentifier:function(){return null}}}function Se(vt,nt,dt){return function(){this.name=vt,this.bracketNo=0,this.style=nt,this.styles=dt,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=Se("importmodule","tag",["string","builtin"]),Me.documentclass=Se("documentclass","tag",["","atom"]),Me.usepackage=Se("usepackage","tag",["atom"]),Me.begin=Se("begin","tag",["atom"]),Me.end=Se("end","tag",["atom"]),Me.label=Se("label","tag",["atom"]),Me.ref=Se("ref","tag",["atom"]),Me.eqref=Se("eqref","tag",["atom"]),Me.cite=Se("cite","tag",["atom"]),Me.bibitem=Se("bibitem","tag",["atom"]),Me.Bibitem=Se("Bibitem","tag",["atom"]),Me.RBibitem=Se("RBibitem","tag",["atom"]),Me.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ke(vt,nt){vt.f=nt}function ct(vt,nt){var dt;if(vt.match(/^\\[a-zA-Z@]+/)){var st=vt.current().slice(1);return dt=Me.hasOwnProperty(st)?Me[st]:Me.DEFAULT,dt=new dt,tt(nt,dt),Ke(nt,We),dt.style}if(vt.match(/^\\[$&%#{}_]/)||vt.match(/^\\[,;!\/\\]/))return"tag";if(vt.match("\\["))return Ke(nt,function(en,it){return De(en,it,"\\]")}),"keyword";if(vt.match("\\("))return Ke(nt,function(en,it){return De(en,it,"\\)")}),"keyword";if(vt.match("$$"))return Ke(nt,function(en,it){return De(en,it,"$$")}),"keyword";if(vt.match("$"))return Ke(nt,function(en,it){return De(en,it,"$")}),"keyword";var wt=vt.next();if(wt=="%")return vt.skipToEnd(),"comment";if(wt=="}"||wt=="]"){if(dt=xe(nt),dt)dt.closeBracket(wt),Ke(nt,We);else return"error";return"bracket"}else return wt=="{"||wt=="["?(dt=Me.DEFAULT,dt=new dt,tt(nt,dt),"bracket"):/\d/.test(wt)?(vt.eatWhile(/[\w.%]/),"atom"):(vt.eatWhile(/[\w\-_]/),dt=Ae(nt),dt.name=="begin"&&(dt.argument=vt.current()),dt.styleIdentifier())}function De(vt,nt,dt){if(vt.eatSpace())return null;if(dt&&vt.match(dt))return Ke(nt,ct),"keyword";if(vt.match(/^\\[a-zA-Z@]+/))return"tag";if(vt.match(/^[a-zA-Z]+/))return"variable-2";if(vt.match(/^\\[$&%#{}_]/)||vt.match(/^\\[,;!\/]/)||vt.match(/^[\^_&]/))return"tag";if(vt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(vt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var st=vt.next();return st=="{"||st=="}"||st=="["||st=="]"||st=="("||st==")"?"bracket":st=="%"?(vt.skipToEnd(),"comment"):"error"}function We(vt,nt){var dt=vt.peek(),st;return dt=="{"||dt=="["?(st=xe(nt),st.openBracket(dt),vt.eat(dt),Ke(nt,ct),"bracket"):/[ \t\r]/.test(dt)?(vt.eat(dt),null):(Ke(nt,ct),_e(nt),ct(vt,nt))}return{startState:function(){var vt=Fe.inMathMode?function(nt,dt){return De(nt,dt)}:ct;return{cmdState:[],f:vt}},copyState:function(vt){return{cmdState:vt.cmdState.slice(),f:vt.f}},token:function(vt,nt){return nt.f(vt,nt)},blankLine:function(vt){vt.f=ct,vt.cmdState.length=0},lineComment:"%"}}),pe.defineMIME("text/x-stex","stex"),pe.defineMIME("text/x-latex","stex")})},15525:function(Mn,sn,ue){(function(pe){pe(ue(89780))})(function(pe){"use strict";var je={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},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};pe.defineMode("xml",function(tt,xe){var _e=tt.indentUnit,Ae={},Se=xe.htmlMode?je:Fe;for(var Me in Se)Ae[Me]=Se[Me];for(var Me in xe)Ae[Me]=xe[Me];var Ke,ct;function De(et,kt){function Je(Dt){return kt.tokenize=Dt,Dt(et,kt)}var Ut=et.next();if(Ut=="<")return et.eat("!")?et.eat("[")?et.match("CDATA[")?Je(nt("atom","]]>")):null:et.match("--")?Je(nt("comment","-->")):et.match("DOCTYPE",!0,!0)?(et.eatWhile(/[\w\._\-]/),Je(dt(1))):null:et.eat("?")?(et.eatWhile(/[\w\._\-]/),kt.tokenize=nt("meta","?>"),"meta"):(Ke=et.eat("/")?"closeTag":"openTag",kt.tokenize=We,"tag bracket");if(Ut=="&"){var ft;return et.eat("#")?et.eat("x")?ft=et.eatWhile(/[a-fA-F\d]/)&&et.eat(";"):ft=et.eatWhile(/[\d]/)&&et.eat(";"):ft=et.eatWhile(/[\w\.\-:]/)&&et.eat(";"),ft?"atom":"error"}else return et.eatWhile(/[^&<]/),null}De.isInText=!0;function We(et,kt){var Je=et.next();if(Je==">"||Je=="/"&&et.eat(">"))return kt.tokenize=De,Ke=Je==">"?"endTag":"selfcloseTag","tag bracket";if(Je=="=")return Ke="equals",null;if(Je=="<"){kt.tokenize=De,kt.state=it,kt.tagName=kt.tagStart=null;var Ut=kt.tokenize(et,kt);return Ut?Ut+" tag error":"tag error"}else return/[\'\"]/.test(Je)?(kt.tokenize=vt(Je),kt.stringStartCol=et.column(),kt.tokenize(et,kt)):(et.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function vt(et){var kt=function(Je,Ut){for(;!Je.eol();)if(Je.next()==et){Ut.tokenize=We;break}return"string"};return kt.isInAttribute=!0,kt}function nt(et,kt){return function(Je,Ut){for(;!Je.eol();){if(Je.match(kt)){Ut.tokenize=De;break}Je.next()}return et}}function dt(et){return function(kt,Je){for(var Ut;(Ut=kt.next())!=null;){if(Ut=="<")return Je.tokenize=dt(et+1),Je.tokenize(kt,Je);if(Ut==">")if(et==1){Je.tokenize=De;break}else return Je.tokenize=dt(et-1),Je.tokenize(kt,Je)}return"meta"}}function st(et,kt,Je){this.prev=et.context,this.tagName=kt,this.indent=et.indented,this.startOfLine=Je,(Ae.doNotIndent.hasOwnProperty(kt)||et.context&&et.context.noIndent)&&(this.noIndent=!0)}function wt(et){et.context&&(et.context=et.context.prev)}function en(et,kt){for(var Je;;){if(!et.context||(Je=et.context.tagName,!Ae.contextGrabbers.hasOwnProperty(Je)||!Ae.contextGrabbers[Je].hasOwnProperty(kt)))return;wt(et)}}function it(et,kt,Je){return et=="openTag"?(Je.tagStart=kt.column(),mt):et=="closeTag"?Ze:it}function mt(et,kt,Je){return et=="word"?(Je.tagName=kt.current(),ct="tag",Ue):Ae.allowMissingTagName&&et=="endTag"?(ct="tag bracket",Ue(et,kt,Je)):(ct="error",mt)}function Ze(et,kt,Je){if(et=="word"){var Ut=kt.current();return Je.context&&Je.context.tagName!=Ut&&Ae.implicitlyClosed.hasOwnProperty(Je.context.tagName)&&wt(Je),Je.context&&Je.context.tagName==Ut||Ae.matchClosing===!1?(ct="tag",Ee):(ct="tag error",He)}else return Ae.allowMissingTagName&&et=="endTag"?(ct="tag bracket",Ee(et,kt,Je)):(ct="error",He)}function Ee(et,kt,Je){return et!="endTag"?(ct="error",Ee):(wt(Je),it)}function He(et,kt,Je){return ct="error",Ee(et,kt,Je)}function Ue(et,kt,Je){if(et=="word")return ct="attribute",Ct;if(et=="endTag"||et=="selfcloseTag"){var Ut=Je.tagName,ft=Je.tagStart;return Je.tagName=Je.tagStart=null,et=="selfcloseTag"||Ae.autoSelfClosers.hasOwnProperty(Ut)?en(Je,Ut):(en(Je,Ut),Je.context=new st(Je,Ut,ft==Je.indented)),it}return ct="error",Ue}function Ct(et,kt,Je){return et=="equals"?Ge:(Ae.allowMissing||(ct="error"),Ue(et,kt,Je))}function Ge(et,kt,Je){return et=="string"?It:et=="word"&&Ae.allowUnquoted?(ct="string",Ue):(ct="error",Ue(et,kt,Je))}function It(et,kt,Je){return et=="string"?It:Ue(et,kt,Je)}return{startState:function(et){var kt={tokenize:De,state:it,indented:et||0,tagName:null,tagStart:null,context:null};return et!=null&&(kt.baseIndent=et),kt},token:function(et,kt){if(!kt.tagName&&et.sol()&&(kt.indented=et.indentation()),et.eatSpace())return null;Ke=null;var Je=kt.tokenize(et,kt);return(Je||Ke)&&Je!="comment"&&(ct=null,kt.state=kt.state(Ke||Je,et,kt),ct&&(Je=ct=="error"?Je+" error":ct)),Je},indent:function(et,kt,Je){var Ut=et.context;if(et.tokenize.isInAttribute)return et.tagStart==et.indented?et.stringStartCol+1:et.indented+_e;if(Ut&&Ut.noIndent)return pe.Pass;if(et.tokenize!=We&&et.tokenize!=De)return Je?Je.match(/^(\s*)/)[0].length:0;if(et.tagName)return Ae.multilineTagIndentPastTag!==!1?et.tagStart+et.tagName.length+2:et.tagStart+_e*(Ae.multilineTagIndentFactor||1);if(Ae.alignCDATA&&/<!\[CDATA\[/.test(kt))return 0;var ft=kt&&/^<(\/)?([\w_:\.-]*)/.exec(kt);if(ft&&ft[1])for(;Ut;)if(Ut.tagName==ft[2]){Ut=Ut.prev;break}else if(Ae.implicitlyClosed.hasOwnProperty(Ut.tagName))Ut=Ut.prev;else break;else if(ft)for(;Ut;){var Dt=Ae.contextGrabbers[Ut.tagName];if(Dt&&Dt.hasOwnProperty(ft[2]))Ut=Ut.prev;else break}for(;Ut&&Ut.prev&&!Ut.startOfLine;)Ut=Ut.prev;return Ut?Ut.indent+_e:et.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ae.htmlMode?"html":"xml",helperType:Ae.htmlMode?"html":"xml",skipAttribute:function(et){et.state==Ge&&(et.state=Ue)},xmlCurrentTag:function(et){return et.tagName?{name:et.tagName,close:et.type=="closeTag"}:null},xmlCurrentContext:function(et){for(var kt=[],Je=et.context;Je;Je=Je.prev)Je.tagName&&kt.push(Je.tagName);return kt.reverse()}}}),pe.defineMIME("text/xml","xml"),pe.defineMIME("application/xml","xml"),pe.mimeModes.hasOwnProperty("text/html")||pe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(Mn,sn,ue){"use strict";ue.d(sn,{hP:function(){return Nt}});var pe=function(ve,se){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,de){oe.__proto__=de}||function(oe,de){for(var fe in de)Object.prototype.hasOwnProperty.call(de,fe)&&(oe[fe]=de[fe])})(ve,se)};function je(ve,se){function oe(){this.constructor=ve}pe(ve,se),ve.prototype=se===null?Object.create(se):(oe.prototype=se.prototype,new oe)}function Fe(ve,se,oe,de){return new(oe||(oe=Promise))(function(fe,le){function Ie(Ft){try{Kt(de.next(Ft))}catch(Xt){le(Xt)}}function ot(Ft){try{Kt(de.throw(Ft))}catch(Xt){le(Xt)}}function Kt(Ft){var Xt;Ft.done?fe(Ft.value):(Xt=Ft.value,Xt instanceof oe?Xt:new oe(function(Qt){Qt(Xt)})).then(Ie,ot)}Kt((de=de.apply(ve,se||[])).next())})}function tt(ve,se){var oe,de,fe,le,Ie={label:0,sent:function(){if(1&fe[0])throw fe[1];return fe[1]},trys:[],ops:[]};return le={next:ot(0),throw:ot(1),return:ot(2)},typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function ot(Kt){return function(Ft){return function(Xt){if(oe)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(oe=1,de&&(fe=2&Xt[0]?de.return:Xt[0]?de.throw||((fe=de.return)&&fe.call(de),0):de.next)&&!(fe=fe.call(de,Xt[1])).done)return fe;switch(de=0,fe&&(Xt=[2&Xt[0],fe.value]),Xt[0]){case 0:case 1:fe=Xt;break;case 4:return Ie.label++,{value:Xt[1],done:!1};case 5:Ie.label++,de=Xt[1],Xt=[0];continue;case 7:Xt=Ie.ops.pop(),Ie.trys.pop();continue;default:if(fe=Ie.trys,!((fe=fe.length>0&&fe[fe.length-1])||Xt[0]!==6&&Xt[0]!==2)){Ie=0;continue}if(Xt[0]===3&&(!fe||Xt[1]>fe[0]&&Xt[1]<fe[3])){Ie.label=Xt[1];break}if(Xt[0]===6&&Ie.label<fe[1]){Ie.label=fe[1],fe=Xt;break}if(fe&&Ie.label<fe[2]){Ie.label=fe[2],Ie.ops.push(Xt);break}fe[2]&&Ie.ops.pop(),Ie.trys.pop();continue}Xt=se.call(ve,Ie)}catch(Qt){Xt=[6,Qt],de=0}finally{oe=fe=0}if(5&Xt[0])throw Xt[1];return{value:Xt[0]?Xt[1]:void 0,done:!0}}([Kt,Ft])}}}function xe(){for(var ve=0,se=0,oe=arguments.length;se<oe;se++)ve+=arguments[se].length;var de=Array(ve),fe=0;for(se=0;se<oe;se++)for(var le=arguments[se],Ie=0,ot=le.length;Ie<ot;Ie++,fe++)de[fe]=le[Ie];return de}var _e=function(){function ve(){}return ve.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ve.setAttributes=function(se,oe){for(var de=0,fe=oe;de<fe.length;de++){var le=fe[de],Ie=le[0],ot=le[1];se.setAttribute(Ie,ot)}},ve.createRect=function(se,oe,de){var fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return fe.setAttribute("width",se.toString()),fe.setAttribute("height",oe.toString()),de&&ve.setAttributes(fe,de),fe},ve.createLine=function(se,oe,de,fe,le){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",se.toString()),Ie.setAttribute("y1",oe.toString()),Ie.setAttribute("x2",de.toString()),Ie.setAttribute("y2",fe.toString()),le&&ve.setAttributes(Ie,le),Ie},ve.createPolygon=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","polygon");return de.setAttribute("points",se),oe&&ve.setAttributes(de,oe),de},ve.createCircle=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","circle");return de.setAttribute("cx",(se/2).toString()),de.setAttribute("cy",(se/2).toString()),de.setAttribute("r",se.toString()),oe&&ve.setAttributes(de,oe),de},ve.createEllipse=function(se,oe,de){var fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return fe.setAttribute("cx",(se/2).toString()),fe.setAttribute("cy",(oe/2).toString()),fe.setAttribute("rx",(se/2).toString()),fe.setAttribute("ry",(oe/2).toString()),de&&ve.setAttributes(fe,de),fe},ve.createGroup=function(se){var oe=document.createElementNS("http://www.w3.org/2000/svg","g");return se&&ve.setAttributes(oe,se),oe},ve.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ve.createMarker=function(se,oe,de,fe,le,Ie,ot){var Kt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ve.setAttributes(Kt,[["id",se],["orient",oe],["markerWidth",de.toString()],["markerHeight",fe.toString()],["refX",le.toString()],["refY",Ie.toString()]]),Kt.appendChild(ot),Kt},ve.createText=function(se){var oe=document.createElementNS("http://www.w3.org/2000/svg","text");return oe.setAttribute("x","0"),oe.setAttribute("y","0"),se&&ve.setAttributes(oe,se),oe},ve.createTSpan=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","tspan");return de.textContent=se,oe&&ve.setAttributes(de,oe),de},ve.createImage=function(se){var oe=document.createElementNS("http://www.w3.org/2000/svg","image");return se&&ve.setAttributes(oe,se),oe},ve.createPoint=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return de.x=se,de.y=oe,de},ve.createPath=function(se,oe){var de=document.createElementNS("http://www.w3.org/2000/svg","path");return de.setAttribute("d",se),oe&&ve.setAttributes(de,oe),de},ve}(),Ae=function(){function ve(){}return ve.addKey=function(se){ve.key=se},Object.defineProperty(ve,"isLicensed",{get:function(){return!!ve.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ve.key)},enumerable:!1,configurable:!0}),ve}(),Se=function(){function ve(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ve.prototype.rasterize=function(se,oe,de){var fe=this;return new Promise(function(le){var Ie=de!==void 0?de:document.createElement("canvas");se===null&&(fe.markersOnly=!0,fe.naturalSize=!1);var ot=document.createElementNS("http://www.w3.org/2000/svg","svg");ot.setAttribute("xmlns","http://www.w3.org/2000/svg"),ot.setAttribute("width",oe.width.baseVal.valueAsString),ot.setAttribute("height",oe.height.baseVal.valueAsString),ot.setAttribute("viewBox","0 0 "+oe.viewBox.baseVal.width.toString()+" "+oe.viewBox.baseVal.height.toString()),ot.innerHTML=oe.innerHTML,fe.naturalSize===!0?(ot.width.baseVal.value=se.naturalWidth,ot.height.baseVal.value=se.naturalHeight):fe.width!==void 0&&fe.height!==void 0&&(ot.width.baseVal.value=fe.width,ot.height.baseVal.value=fe.height),Ie.width=ot.width.baseVal.value,Ie.height=ot.height.baseVal.value;var Kt=ot.outerHTML,Ft=Ie.getContext("2d");fe.markersOnly!==!0&&Ft.drawImage(se,0,0,Ie.width,Ie.height);var Xt=window.URL,Qt=new Image(Ie.width,Ie.height);Qt.setAttribute("crossOrigin","anonymous");var on=new Blob([Kt],{type:"image/svg+xml"}),pn=Xt.createObjectURL(on);Qt.onload=function(){Ft.drawImage(Qt,0,0),Xt.revokeObjectURL(pn);var Cn=Ie.toDataURL(fe.imageType,fe.imageQuality);le(Cn)},Qt.src=pn})},ve}(),Me=function(){},Ke=function(){function ve(se){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+se+"_"}return Object.defineProperty(ve.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ve.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(ve.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ve.prototype.addClass=function(se){return this.styleSheet===void 0&&this.addStyleSheet(),se.name=""+this.classNamePrefix+se.localName,this.classes.push(se),this.styleSheet.sheet.insertRule("."+se.name+" {"+se.style+"}",this.styleSheet.sheet.cssRules.length),se},ve.prototype.addRule=function(se){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(se),this.styleSheet.sheet.insertRule(se.selector+" {"+se.style+"}",this.styleSheet.sheet.cssRules.length)},ve.prototype.addStyleSheet=function(){var se;this.styleSheet=document.createElement("style"),((se=this.styleSheetRoot)!==null&&se!==void 0?se:document.head).appendChild(this.styleSheet),this.addRule(new ct("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ct("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ct("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new De("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new De("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ve.prototype.removeStyleSheet=function(){var se;this.styleSheet&&(((se=this.styleSheetRoot)!==null&&se!==void 0?se:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ve}(),ct=function(ve,se){this.selector=ve,this.style=se},De=function(ve,se){this.localName=ve,this.style=se},We=function(){function ve(se,oe,de,fe,le){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=se,this.displayMode=oe,this.markerItems=de,this.uiStyleSettings=fe,this.styles=le,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ve.prototype.show=function(se){var oe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=se,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var de=document.createElement("div");de.className=this.toolbarBlockStyleClass.name,de.style.whiteSpace="nowrap",this.uiContainer.appendChild(de),this.addActionButton(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(de,'<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(le){var Ie=document.createElement("div");Ie.className=""+oe.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",le.typeName),Ie.innerHTML=le.icon,Ie.addEventListener("click",function(){oe.markerToolbarButtonClicked(Ie,le)}),oe.buttons.push(Ie),oe.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 fe=document.createElement("div");fe.className=this.toolbarBlockStyleClass.name,fe.style.whiteSpace="nowrap",fe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(fe),this.addActionButton(fe,'<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(fe,'<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()},ve.prototype.addButtonClickListener=function(se){this.buttonClickListeners.push(se)},ve.prototype.removeButtonClickListener=function(se){this.buttonClickListeners.indexOf(se)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(se),1)},ve.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ve.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var se=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var oe=0;oe<this.markerButtons.length;oe++)oe<se||oe===se&&this.markerButtons.length-1===se?this.markerButtonBlock.appendChild(this.markerButtons[oe]):(oe===se&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[oe]))}},ve.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")},ve.prototype.resetButtonStyles=function(){var se=this;this.buttons.forEach(function(oe){oe.className=oe.className.replace(se.uiStyleSettings.toolbarButtonStyleColorsClassName?se.uiStyleSettings.toolbarButtonStyleColorsClassName:se.toolbarButtonStyleColorsClass.name,"").trim(),oe.className=oe.className.replace(se.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?se.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:se.toolbarActiveButtonStyleColorsClass.name,"").trim(),oe.className+=" "+(se.uiStyleSettings.toolbarButtonStyleColorsClassName?se.uiStyleSettings.toolbarButtonStyleColorsClassName:se.toolbarButtonStyleColorsClass.name)})},ve.prototype.addActionButton=function(se,oe,de){var fe=this,le=document.createElement("div");switch(le.className=""+this.toolbarButtonStyleClass.name,le.innerHTML=oe,le.setAttribute("data-action",de),le.addEventListener("click",function(){fe.actionToolbarButtonClicked(le,de)}),de){case"select":le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":le.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":le.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":le.style.fill=this.uiStyleSettings.closeButtonColor}se.appendChild(le),this.buttons.push(le)},ve.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new De("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 De("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new De("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new De("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 De("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var se=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new De("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*se)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*se)+`px;
|
|
|
padding: `+se+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new De("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ct("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ct("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ve.prototype.markerToolbarButtonClicked=function(se,oe){this.setActiveButton(se),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(de){return de("marker",oe)}),this.markerButtonOverflowBlock.style.display="none"},ve.prototype.actionToolbarButtonClicked=function(se,oe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(de){return de("action",oe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ve.prototype.setActiveButton=function(se){this.resetButtonStyles(),se.className=se.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),se.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ve.prototype.setActiveMarkerButton=function(se){var oe=this.markerButtons.find(function(de){return de.getAttribute("data-type-name")===se});oe&&this.setActiveButton(oe)},ve.prototype.setCurrentMarker=function(se){var oe=this;this.currentMarker=se,this.buttons.filter(function(de){return/delete|notes/.test(de.getAttribute("data-action"))}).forEach(function(de){oe.currentMarker===void 0?(de.style.fillOpacity="0.4",de.style.pointerEvents="none"):(de.style.fillOpacity="1",de.style.pointerEvents="all")})},ve}(),vt=function(){function ve(se,oe,de,fe){this.panels=[],this.panelButtons=[],this.markerjsContainer=se,this.displayMode=oe,this.uiStyleSettings=de,this.styles=fe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ve.prototype.addStyles=function(){var se;this.toolboxStyleClass=this.styles.addClass(new De("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 De("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var oe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new De("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new De("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new De("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 De("toolbox-panel-row_colors",`
|
|
|
background-color: `+((se=this.uiStyleSettings.toolboxBackgroundColor)!==null&&se!==void 0?se:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new De("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*oe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*oe)+`px;
|
|
|
padding: `+oe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new De("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ct("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ct("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ve.prototype.show=function(se){var oe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=se,this.uiContainer.className=this.toolboxStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ve.prototype.setPanelButtons=function(se){var oe,de,fe=this;this.panels=se,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((de=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&de!==void 0?de:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(le){var Ie;le.uiStyleSettings=fe.uiStyleSettings;var ot=document.createElement("div");ot.className=fe.toolboxButtonStyleClass.name+" "+((Ie=fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:fe.toolboxButtonStyleColorsClass.name),ot.innerHTML=le.icon,ot.title=le.title,ot.addEventListener("click",function(){fe.panelButtonClick(le)}),fe.panelButtons.push(ot),fe.buttonRow.appendChild(ot)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ve.prototype.panelButtonClick=function(se){var oe=this,de=-1;if(se!==this.activePanel){de=this.panels.indexOf(se),this.panelRow.innerHTML="";var fe=se.getUi();fe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(fe),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=se}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){oe.displayMode==="inline"?oe.panelRow.style.display="none":oe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(le,Ie){var ot,Kt;le.className=oe.toolboxButtonStyleClass.name+" "+(Ie===de?""+((ot=oe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ot!==void 0?ot:oe.toolboxActiveButtonStyleColorsClass.name):""+((Kt=oe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Kt!==void 0?Kt:oe.toolboxButtonStyleColorsClass.name))})},ve}(),nt=function(ve,se){this.title=ve,this.icon=se},dt=function(ve){function se(oe,de,fe,le){var Ie=ve.call(this,oe,le||'<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=de,Ie.currentColor=fe,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return je(se,ve),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.overflow="hidden",de.style.whiteSpace="nowrap",this.colors.forEach(function(fe){var le=oe.getColorBox(fe);de.appendChild(le),oe.colorBoxes.push(le)}),de},se.prototype.getColorBox=function(oe){var de=this,fe=this.uiStyleSettings.toolbarHeight/4,le=this.uiStyleSettings.toolbarHeight-fe,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=le-2+"px",Ie.style.height=le-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=(le+2)/2+"px",Ie.style.borderColor=oe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){de.setCurrentColor(oe,Ie)});var ot=document.createElement("div");return ot.style.display="inline-block",ot.style.width=le-2+"px",ot.style.height=le-2+"px",ot.style.backgroundColor=oe,ot.style.borderRadius=le/2+"px",oe==="transparent"&&(ot.style.fill=this.uiStyleSettings.toolboxAccentColor,ot.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(ot),Ie},se.prototype.setCurrentColor=function(oe,de){var fe=this;this.currentColor=oe,this.colorBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(oe)},se}(nt),st=function(){function ve(se,oe,de){this._state="new",this._isSelected=!1,this._container=se,this._overlayContainer=oe,this.globalSettings=de,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ve.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ve.prototype.ownsTarget=function(se){return!1},Object.defineProperty(ve.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ve.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ve.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ve.prototype.pointerDown=function(se,oe){},ve.prototype.dblClick=function(se,oe){},ve.prototype.manipulate=function(se){},ve.prototype.pointerUp=function(se){this.stateChanged()},ve.prototype.dispose=function(){},ve.prototype.addMarkerVisualToContainer=function(se){this.container.childNodes.length>0?this.container.insertBefore(se,this.container.childNodes[0]):this.container.appendChild(se)},ve.prototype.getState=function(){return{typeName:ve.typeName,state:this.state,notes:this.notes}},ve.prototype.restoreState=function(se){this._state=se.state,this.notes=se.notes},ve.prototype.scale=function(se,oe){},ve.prototype.colorChanged=function(se){this.onColorChanged&&this.onColorChanged(se),this.stateChanged()},ve.prototype.fillColorChanged=function(se){this.onFillColorChanged&&this.onFillColorChanged(se),this.stateChanged()},ve.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var se=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),se.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(se)&&this.onStateChanged(this)}},ve.typeName="MarkerBase",ve}(),wt=function(){function ve(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ve.prototype.findGripByVisual=function(se){return this.topLeft.ownsTarget(se)?this.topLeft:this.topCenter.ownsTarget(se)?this.topCenter:this.topRight.ownsTarget(se)?this.topRight:this.centerLeft.ownsTarget(se)?this.centerLeft:this.centerRight.ownsTarget(se)?this.centerRight:this.bottomLeft.ownsTarget(se)?this.bottomLeft:this.bottomCenter.ownsTarget(se)?this.bottomCenter:this.bottomRight.ownsTarget(se)?this.bottomRight:void 0},ve}(),en=function(){function ve(){this.GRIP_SIZE=10,this.visual=_e.createGroup(),this.visual.appendChild(_e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_e.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ve.prototype.ownsTarget=function(se){return se===this.visual||se===this.visual.childNodes[0]||se===this.visual.childNodes[1]},ve}(),it=function(){function ve(){}return ve.toITransformMatrix=function(se){return{a:se.a,b:se.b,c:se.c,d:se.d,e:se.e,f:se.f}},ve.toSVGMatrix=function(se,oe){return se.a=oe.a,se.b=oe.b,se.c=oe.c,se.d=oe.d,se.e=oe.e,se.f=oe.f,se},ve}(),mt=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.left=0,le.top=0,le.width=0,le.height=0,le.defaultSize={x:50,y:20},le.offsetX=0,le.offsetY=0,le.rotationAngle=0,le.CB_DISTANCE=10,le._suppressMarkerCreateEvent=!1,le.container.transform.baseVal.appendItem(_e.createTransform()),le.setupControlBox(),le}return je(se,ve),Object.defineProperty(se.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"visual",{get:function(){return this._visual},set:function(oe){this._visual=oe;var de=_e.createTransform();this._visual.transform.baseVal.appendItem(de)},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(oe){return!!ve.prototype.ownsTarget.call(this,oe)||!!(this.controlGrips.findGripByVisual(oe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe))},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.left=oe.x,this.top=oe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var fe=this.unrotatePoint(oe);if(this.manipulationStartX=fe.x,this.manipulationStartY=fe.y,this.offsetX=fe.x-this.left,this.offsetY=fe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(de),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(de)){this.activeGrip=this.rotatorGrip;var le=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=le.x-this.width/2,this.top=le.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"},se.prototype.pointerUp=function(oe){var de=this.state;ve.prototype.pointerUp.call(this,oe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(oe),this._state="select",de==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},se.prototype.moveVisual=function(oe){this.visual.style.transform="translate("+oe.x+"px, "+oe.y+"px)"},se.prototype.manipulate=function(oe){var de=this.unrotatePoint(oe);this.state==="creating"?this.resize(oe):this.state==="move"?(this.left=this.manipulationStartLeft+(de.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(de.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(de):this.state==="rotate"&&this.rotate(oe)},se.prototype.resize=function(oe){var de=this.manipulationStartLeft,fe=this.manipulationStartWidth,le=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:de=this.manipulationStartLeft+oe.x-this.manipulationStartX,fe=this.manipulationStartWidth+this.manipulationStartLeft-de;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:fe=this.manipulationStartWidth+oe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:le=this.manipulationStartTop+oe.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-le;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ie=this.manipulationStartHeight+oe.y-this.manipulationStartY}fe>=0?(this.left=de,this.width=fe):(this.left=de+fe,this.width=-fe),Ie>=0?(this.top=le,this.height=Ie):(this.top=le+Ie,this.height=-Ie),this.setSize()},se.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},se.prototype.rotate=function(oe){if(Math.abs(oe.x-this.centerX)>.1){var de=Math.sign(oe.x-this.centerX);this.rotationAngle=180*Math.atan((oe.y-this.centerY)/(oe.x-this.centerX))/Math.PI+90*de,this.applyRotation()}},se.prototype.applyRotation=function(){var oe=this.container.transform.baseVal.getItem(0);oe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(oe,0)},se.prototype.rotatePoint=function(oe){if(this.rotationAngle===0)return oe;var de=this.container.getCTM(),fe=_e.createPoint(oe.x,oe.y);return{x:(fe=fe.matrixTransform(de)).x,y:fe.y}},se.prototype.unrotatePoint=function(oe){if(this.rotationAngle===0)return oe;var de=this.container.getCTM();de=de.inverse();var fe=_e.createPoint(oe.x,oe.y);return{x:(fe=fe.matrixTransform(de)).x,y:fe.y}},se.prototype.select=function(){ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},se.prototype.deselect=function(){ve.prototype.deselect.call(this),this.controlBox.style.display="none"},se.prototype.setupControlBox=function(){this.controlBox=_e.createGroup();var oe=_e.createTransform();oe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(oe),this.container.appendChild(this.controlBox),this.controlRect=_e.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=_e.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 wt,this.addControlGrips(),this.controlBox.style.display="none"},se.prototype.adjustControlBox=function(){var oe=this.controlBox.transform.baseVal.getItem(0);oe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(oe,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()},se.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()},se.prototype.createGrip=function(){var oe=new en;return oe.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(oe.visual),oe},se.prototype.positionGrips=function(){var oe=this.controlGrips.topLeft.GRIP_SIZE,de=-oe/2,fe=de,le=(this.width+this.CB_DISTANCE)/2-oe/2,Ie=(this.height+this.CB_DISTANCE)/2-oe/2,ot=this.height+this.CB_DISTANCE-oe/2,Kt=this.width+this.CB_DISTANCE-oe/2;this.positionGrip(this.controlGrips.topLeft.visual,de,fe),this.positionGrip(this.controlGrips.topCenter.visual,le,fe),this.positionGrip(this.controlGrips.topRight.visual,Kt,fe),this.positionGrip(this.controlGrips.centerLeft.visual,de,Ie),this.positionGrip(this.controlGrips.centerRight.visual,Kt,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,de,ot),this.positionGrip(this.controlGrips.bottomCenter.visual,le,ot),this.positionGrip(this.controlGrips.bottomRight.visual,Kt,ot),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,le,fe-3*this.CB_DISTANCE)},se.prototype.positionGrip=function(oe,de,fe){var le=oe.transform.baseVal.getItem(0);le.setTranslate(de,fe),oe.transform.baseVal.replaceItem(le,0)},se.prototype.hideControlBox=function(){this.controlBox.style.display="none"},se.prototype.showControlBox=function(){this.controlBox.style.display=""},se.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ve.prototype.getState.call(this))},se.prototype.restoreState=function(oe){ve.prototype.restoreState.call(this,oe);var de=oe;this.left=de.left,this.top=de.top,this.width=de.width,this.height=de.height,this.rotationAngle=de.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,de.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,de.containerTransformMatrix))},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de);var fe=this.rotatePoint({x:this.left,y:this.top}),le=this.unrotatePoint({x:fe.x*oe,y:fe.y*de});this.left=le.x,this.top=le.y,this.width=this.width*oe,this.height=this.height*de,this.adjustControlBox()},se}(st),Ze=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.opacity=1,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.createVisual=le.createVisual.bind(le),le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.visual)},se.prototype.createVisual=function(){this.visual=_e.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)},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.manipulate=function(oe){ve.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){ve.prototype.resize.call(this,oe),this.setSize()},se.prototype.setSize=function(){ve.prototype.setSize.call(this),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},se.prototype.pointerUp=function(oe){ve.prototype.pointerUp.call(this,oe),this.setSize()},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(oe),this.stateChanged()},se.prototype.setFillColor=function(oe){this.fillColor=oe,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},se.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ve.prototype.getState.call(this))},se.prototype.restoreState=function(oe){var de=oe;this.fillColor=de.fillColor,this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.opacity=de.opacity,this.createVisual(),ve.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.setSize()},se.title="Rectangle marker",se}(mt),Ee=function(ve){function se(oe,de,fe,le){var Ie=ve.call(this,oe,le||'<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=de,Ie.currentWidth=fe,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return je(se,ve),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2",this.widths.forEach(function(fe){var le=document.createElement("div");le.style.display="flex",le.style.flexGrow="2",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=fe===oe.currentWidth?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentWidth(fe,le)}),de.appendChild(le);var Ie=document.createElement("div");Ie.innerText=fe.toString(),Ie.style.marginRight="5px",le.appendChild(Ie);var ot=document.createElement("div");ot.style.minHeight="20px",ot.style.flexGrow="2",ot.style.display="flex",ot.style.alignItems="center";var Kt=document.createElement("hr");Kt.style.minWidth="20px",Kt.style.border="0px",Kt.style.borderTop=fe+"px solid "+oe.uiStyleSettings.toolboxColor,Kt.style.flexGrow="2",ot.appendChild(Kt),le.appendChild(ot),oe.widthBoxes.push(le)}),de},se.prototype.setCurrentWidth=function(oe,de){var fe=this;this.currentWidth=oe,this.widthBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},se}(nt),He=function(ve){function se(oe,de,fe,le){var Ie=ve.call(this,oe,le||'<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=de,Ie.currentStyle=fe,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return je(se,ve),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2",this.styles.forEach(function(fe){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.overflow="hidden",le.style.maxWidth=100/oe.styles.length-5+"%",le.style.borderColor=fe===oe.currentStyle?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentStyle(fe,le)}),de.appendChild(le);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var ot=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+oe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(fe!==""?'stroke-dasharray="'+fe+'"':"")+` />
|
|
|
</svg>`;Ie.innerHTML=ot,le.appendChild(Ie),oe.styleBoxes.push(le)}),de},se.prototype.setCurrentStyle=function(oe,de){var fe=this;this.currentStyle=oe,this.styleBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},se}(nt),Ue=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.strokePanel=new dt("Line color",fe.defaultColorSet,fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Ee("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new He("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return je(se,ve),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ve.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="FrameMarker",se.title="Frame marker",se.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',se}(Ze),Ct=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"},Ge=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.x1=0,le.y1=0,le.x2=0,le.y2=0,le.defaultLength=50,le.manipulationStartX=0,le.manipulationStartY=0,le.manipulationStartX1=0,le.manipulationStartY1=0,le.manipulationStartX2=0,le.manipulationStartY2=0,le.setupControlBox(),le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!!ve.prototype.ownsTarget.call(this,oe)||!(!this.grip1.ownsTarget(oe)&&!this.grip2.ownsTarget(oe))},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.manipulationStartX=oe.x,this.manipulationStartY=oe.y,this.state==="new"&&(this.x1=oe.x,this.y1=oe.y,this.x2=oe.x,this.y2=oe.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(de)?this.activeGrip=this.grip1:this.grip2.ownsTarget(de)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},se.prototype.pointerUp=function(oe){var de=this.state;ve.prototype.pointerUp.call(this,oe),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(oe),this._state="select",de==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},se.prototype.adjustVisual=function(){},se.prototype.manipulate=function(oe){this.state==="creating"?this.resize(oe):this.state==="move"?(this.x1=this.manipulationStartX1+oe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+oe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+oe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+oe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(oe)},se.prototype.resize=function(oe){switch(this.activeGrip){case this.grip1:this.x1=oe.x,this.y1=oe.y;break;case this.grip2:case void 0:this.x2=oe.x,this.y2=oe.y}this.adjustVisual(),this.adjustControlBox()},se.prototype.select=function(){ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},se.prototype.deselect=function(){ve.prototype.deselect.call(this),this.controlBox.style.display="none"},se.prototype.setupControlBox=function(){this.controlBox=_e.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},se.prototype.adjustControlBox=function(){this.positionGrips()},se.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},se.prototype.createGrip=function(){var oe=new en;return oe.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(oe.visual),oe},se.prototype.positionGrips=function(){var oe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-oe/2,this.y1-oe/2),this.positionGrip(this.grip2.visual,this.x2-oe/2,this.y2-oe/2)},se.prototype.positionGrip=function(oe,de,fe){var le=oe.transform.baseVal.getItem(0);le.setTranslate(de,fe),oe.transform.baseVal.replaceItem(le,0)},se.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ve.prototype.getState.call(this))},se.prototype.restoreState=function(oe){ve.prototype.restoreState.call(this,oe);var de=oe;this.x1=de.x1,this.y1=de.y1,this.x2=de.x2,this.y2=de.y2},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.x1=this.x1*oe,this.y1=this.y1*de,this.x2=this.x2*oe,this.y2=this.y2*de,this.adjustVisual(),this.adjustControlBox()},se}(st),It=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.setStrokeColor=le.setStrokeColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.strokePanel=new dt("Line color",fe.defaultColorSet,fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Ee("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new He("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.selectorLine&&oe!==this.visibleLine)},se.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorLine=_e.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_e.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)},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},se.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()),_e.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.adjustVisual(),this.colorChanged(oe)},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.adjustVisual()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ve.prototype.restoreState.call(this,oe);var de=oe;this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.createVisual(),this.adjustVisual()},se.typeName="LineMarker",se.title="Line marker",se.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',se}(Ge),et=function(ve){function se(oe,de,fe,le){var Ie=ve.call(this,oe,le||'<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=de,Ie.currentFont=fe,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return je(se,ve),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.overflow="hidden",de.style.flexGrow="2",this.fonts.forEach(function(fe){var le=document.createElement("div");le.style.display="inline-block",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.overflow="hidden",le.style.maxWidth=100/oe.fonts.length-5+"%",le.style.borderColor=fe===oe.currentFont?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentFont(fe,le)}),de.appendChild(le);var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.fontFamily=fe,Ie.style.overflow="hidden";var ot=document.createElement("div");ot.style.whiteSpace="nowrap",ot.style.overflow="hidden",ot.style.textOverflow="ellipsis",ot.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(ot),le.appendChild(Ie),oe.fontBoxes.push(le)}),de},se.prototype.setCurrentFont=function(oe,de){var fe=this;this.currentFont=oe,this.fontBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},se}(nt),kt=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.color="transparent",le.padding=5,le.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",le.text=le.DEFAULT_TEXT,le.isMoved=!1,le.color=fe.defaultColor,le.fontFamily=fe.defaultFontFamily,le.defaultSize={x:100,y:30},le.setColor=le.setColor.bind(le),le.setFont=le.setFont.bind(le),le.renderText=le.renderText.bind(le),le.sizeText=le.sizeText.bind(le),le.textEditDivClicked=le.textEditDivClicked.bind(le),le.showTextEditor=le.showTextEditor.bind(le),le.setSize=le.setSize.bind(le),le.positionTextEditor=le.positionTextEditor.bind(le),le.colorPanel=new dt("Color",fe.defaultColorSet,fe.defaultColor),le.colorPanel.onColorChanged=le.setColor,le.fontFamilyPanel=new et("Font",fe.defaultFontFamilies,fe.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le}return je(se,ve),se.prototype.ownsTarget=function(oe){if(ve.prototype.ownsTarget.call(this,oe)||oe===this.visual||oe===this.textElement||oe===this.bgRectangle)return!0;var de=!1;return this.textElement.childNodes.forEach(function(fe){fe===oe&&(de=!0)}),de},se.prototype.createVisual=function(){this.visual=_e.createGroup(),this.bgRectangle=_e.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_e.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.isMoved=!1,this.pointerDownPoint=oe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.renderText=function(){var oe=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(de){oe.textElement.appendChild(_e.createTSpan(de.trim()===""?" ":de.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},se.prototype.getTextScale=function(){var oe=this.textElement.getBBox(),de=1;if(oe.width>0&&oe.height>0){var fe=(1*this.width-this.width*this.padding*2/100)/oe.width,le=(1*this.height-this.height*this.padding*2/100)/oe.height;de=Math.min(fe,le)}return de},se.prototype.getTextPosition=function(oe){var de=this.textElement.getBBox(),fe=0,le=0;return de.width>0&&de.height>0&&(fe=(this.width-de.width*oe)/2,le=this.height/2-de.height*oe/2),{x:fe,y:le}},se.prototype.sizeText=function(){var oe=this.textElement.getBBox(),de=this.getTextScale(),fe=this.getTextPosition(de);fe.y-=oe.y*de,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+fe.x+"px, "+fe.y+"px) scale("+de+", "+de+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(fe.x,fe.y),this.textElement.transform.baseVal.getItem(1).setScale(de,de))},se.prototype.manipulate=function(oe){ve.prototype.manipulate.call(this,oe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(oe.x-this.pointerDownPoint.x)>5||Math.abs(oe.y-this.pointerDownPoint.y)>5)},se.prototype.resize=function(oe){ve.prototype.resize.call(this,oe),this.isMoved=!0,this.setSize(),this.sizeText()},se.prototype.setSize=function(){ve.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},se.prototype.pointerUp=function(oe){var de=this.state;de==="creating"&&(this._suppressMarkerCreateEvent=!0),ve.prototype.pointerUp.call(this,oe),this.setSize(),(de==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},se.prototype.showTextEditor=function(){var oe=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(de){de.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var de=Number.parseFloat(oe.textEditor.style.fontSize);oe.textEditor.clientWidth>=Number.parseInt(oe.textEditor.style.maxWidth)&&de>.9;)de-=.1,oe.textEditor.style.fontSize=Math.max(de,.9)+"em"}),this.textEditor.addEventListener("keyup",function(de){de.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(de){if(de.clipboardData){var fe=de.clipboardData.getData("text"),le=window.getSelection();if(!le.rangeCount)return!1;le.deleteFromDocument(),le.getRangeAt(0).insertNode(document.createTextNode(fe)),de.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){oe.textEditDivClicked(oe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},se.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var oe=this.getTextScale(),de=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),fe=this.textElement.getBBox(),le={x:fe.width*oe,y:fe.height*oe};de.x-=le.x/2,de.y-=le.y/2,this.textEditor.style.top=de.y+"px",this.textEditor.style.left=de.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-de.x+"px",this.textEditor.style.fontSize=Math.max(16*oe,12)+"px",this.textElement.style.display="none"}},se.prototype.textEditDivClicked=function(oe){this.text=oe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},se.prototype.select=function(){ve.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},se.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ve.prototype.deselect.call(this)},se.prototype.dblClick=function(oe,de){ve.prototype.dblClick.call(this,oe,de),this.showTextEditor()},se.prototype.setColor=function(oe){this.textElement&&_e.setAttributes(this.textElement,[["fill",oe]]),this.color=oe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(oe)},se.prototype.setFont=function(oe){this.textElement&&_e.setAttributes(this.textElement,[["font-family",oe]]),this.fontFamily=oe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},se.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},se.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.color=de.color,this.fontFamily=de.fontFamily,this.padding=de.padding,this.text=de.text,this.createVisual(),ve.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.setSize(),this.sizeText(),this.positionTextEditor()},se.typeName="TextMarker",se.title="Text marker",se.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>',se}(mt),Je=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.color="transparent",le.lineWidth=3,le.drawing=!1,le.pixelRatio=1,le.color=fe.defaultColor,le.lineWidth=fe.defaultStrokeWidth,le.pixelRatio=fe.freehandPixelRatio,le.setColor=le.setColor.bind(le),le.addCanvas=le.addCanvas.bind(le),le.finishCreation=le.finishCreation.bind(le),le.setLineWidth=le.setLineWidth.bind(le),le.colorPanel=new dt("Color",fe.defaultColorSet,fe.defaultColor),le.colorPanel.onColorChanged=le.setColor,le.lineWidthPanel=new Ee("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.lineWidthPanel.onWidthChanged=le.setLineWidth,le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.drawingImage)},se.prototype.createVisual=function(){this.visual=_e.createGroup(),this.drawingImage=_e.createImage(),this.visual.appendChild(this.drawingImage);var oe=_e.createTransform();this.visual.transform.baseVal.appendItem(oe),this.addMarkerVisualToContainer(this.visual)},se.prototype.pointerDown=function(oe,de){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(oe.x,oe.y),this.drawing=!0):ve.prototype.pointerDown.call(this,oe,de)},se.prototype.manipulate=function(oe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(oe.x,oe.y),this.canvasContext.stroke()):ve.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){ve.prototype.resize.call(this,oe),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},se.prototype.pointerUp=function(oe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ve.prototype.pointerUp.call(this,oe)},se.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)},se.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ve.prototype.select.call(this)},se.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ve.prototype.deselect.call(this)},se.prototype.finishCreation=function(){for(var oe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),de=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],fe=de[0],le=de[1],Ie=de[2],ot=de[3],Kt=!1,Ft=0;Ft<this.canvasElement.height;Ft++)for(var Xt=0;Xt<this.canvasElement.width;Xt++)oe.data[Ft*this.canvasElement.width*4+4*Xt+3]>0&&(Kt=!0,Ft<le&&(le=Ft),Xt<fe&&(fe=Xt),Ft>ot&&(ot=Ft),Xt>Ie&&(Ie=Xt));if(Kt){this.left=fe/this.pixelRatio,this.top=le/this.pixelRatio,this.width=(Ie-fe)/this.pixelRatio,this.height=(ot-le)/this.pixelRatio;var Qt=document.createElement("canvas");Qt.width=Ie-fe,Qt.height=ot-le,Qt.getContext("2d").putImageData(this.canvasContext.getImageData(fe,le,Ie-fe,ot-le),0,0),this.drawingImgUrl=Qt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},se.prototype.setDrawingImage=function(){_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},se.prototype.setColor=function(oe){this.color=oe,this.colorChanged(oe)},se.prototype.setLineWidth=function(oe){this.lineWidth=oe},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({drawingImgUrl:this.drawingImgUrl},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){this.createVisual(),ve.prototype.restoreState.call(this,oe),this.drawingImgUrl=oe.drawingImgUrl,this.setDrawingImage()},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.setDrawingImage()},se.typeName="FreehandMarker",se.title="Freehand marker",se.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>',se}(mt),Ut=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,fe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return le.typeBoxes=[],le.currentType=de,le.setCurrentType=le.setCurrentType.bind(le),le}return je(se,ve),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2";for(var fe=function(ot){var Kt="both";switch(ot){case 0:Kt="both";break;case 1:Kt="start";break;case 2:Kt="end";break;case 3:Kt="none"}var Ft=document.createElement("div");if(Ft.style.display="flex",Ft.style.flexGrow="2",Ft.style.alignItems="center",Ft.style.justifyContent="space-between",Ft.style.padding="5px",Ft.style.borderWidth="2px",Ft.style.borderStyle="solid",Ft.style.borderColor=Kt===le.currentType?le.uiStyleSettings.toolboxAccentColor:"transparent",Ft.addEventListener("click",function(){oe.setCurrentType(Kt,Ft)}),de.appendChild(Ft),Kt==="both"||Kt==="start"){var Xt=document.createElement("div");Xt.style.display="flex",Xt.style.alignItems="center",Xt.style.minHeight="20px",Xt.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="`+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Xt.style.marginLeft="5px",Ft.appendChild(Xt)}var Qt=document.createElement("div");Qt.style.display="flex",Qt.style.alignItems="center",Qt.style.minHeight="20px",Qt.style.flexGrow="2";var on=document.createElement("hr");if(on.style.minWidth="20px",on.style.border="0px",on.style.borderTop="3px solid "+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee"),on.style.flexGrow="2",Qt.appendChild(on),Ft.appendChild(Qt),Kt==="both"||Kt==="end"){var pn=document.createElement("div");pn.style.display="flex",pn.style.alignItems="center",pn.style.minHeight="20px",pn.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="`+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,pn.style.marginRight="5px",Ft.appendChild(pn)}le.typeBoxes.push(Ft)},le=this,Ie=0;Ie<4;Ie++)fe(Ie);return de},se.prototype.setCurrentType=function(oe,de){var fe=this;this.currentType=oe,this.typeBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings!==void 0?fe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},se}(nt),ft=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.arrowType="end",le.arrowBaseHeight=10,le.arrowBaseWidth=10,le.getArrowPoints=le.getArrowPoints.bind(le),le.setArrowType=le.setArrowType.bind(le),le.arrowTypePanel=new Ut("Arrow type","end"),le.arrowTypePanel.onArrowTypeChanged=le.setArrowType,le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.arrow1&&oe!==this.arrow2)},se.prototype.getArrowPoints=function(oe,de){var fe=this.arrowBaseWidth+2*this.strokeWidth,le=this.arrowBaseHeight+2*this.strokeWidth;return oe-fe/2+","+(de+le/2)+" "+oe+","+(de-le/2)+" "+(oe+fe/2)+","+(de+le/2)},se.prototype.createTips=function(){this.arrow1=_e.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_e.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow2)},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.state==="creating"&&this.createTips()},se.prototype.adjustVisual=function(){if(ve.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",_e.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_e.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var oe=0;Math.abs(this.x1-this.x2)>.1&&(oe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var de=this.arrow1.transform.baseVal.getItem(0);de.setRotate(oe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(de,0);var fe=this.arrow2.transform.baseVal.getItem(0);fe.setRotate(oe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(fe,0)}},se.prototype.setArrowType=function(oe){this.arrowType=oe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({arrowType:this.arrowType},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ve.prototype.restoreState.call(this,oe);var de=oe;this.arrowType=de.arrowType,this.createTips(),this.adjustVisual()},se.typeName="ArrowMarker",se.title="Arrow marker",se.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',se}(It),Dt=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.fillColor=fe.defaultFillColor,le.strokeWidth=0,le.fillPanel=new dt("Color",fe.defaultColorSet,fe.defaultFillColor),le.fillPanel.onColorChanged=le.setFillColor,le}return je(se,ve),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ve.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="CoverMarker",se.title="Cover marker",se.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',se}(Ze),Et=function(ve){function se(oe,de,fe,le){var Ie=ve.call(this,oe,le||'<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=de,Ie.currentOpacity=fe,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return je(se,ve),se.prototype.getUi=function(){var oe=this,de=document.createElement("div");return de.style.display="flex",de.style.overflow="hidden",de.style.flexGrow="2",de.style.justifyContent="space-between",this.opacities.forEach(function(fe){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.justifyContent="center",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=fe===oe.currentOpacity?oe.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){oe.setCurrentOpacity(fe,le)}),de.appendChild(le);var Ie=document.createElement("div");Ie.innerText=100*fe+"%",le.appendChild(Ie),oe.opacityBoxes.push(le)}),de},se.prototype.setCurrentOpacity=function(oe,de){var fe=this;this.currentOpacity=oe,this.opacityBoxes.forEach(function(le){le.style.borderColor=le===de?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},se}(nt),ut=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.setOpacity=le.setOpacity.bind(le),le.fillColor=fe.defaultHighlightColor,le.strokeWidth=0,le.opacity=fe.defaultHighlightOpacity,le.fillPanel=new dt("Color",fe.defaultColorSet,le.fillColor),le.fillPanel.onColorChanged=le.setFillColor,le.opacityPanel=new Et("Opacity",fe.defaultOpacitySteps,le.opacity),le.opacityPanel.onOpacityChanged=le.setOpacity,le}return je(se,ve),se.prototype.setOpacity=function(oe){this.opacity=oe,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ve.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="HighlightMarker",se.title="Highlight marker",se.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>',se}(Dt),Be='<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>',be='<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>',ht=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.bgColor="transparent",le.tipPosition={x:0,y:0},le.tipBase1Position={x:0,y:0},le.tipBase2Position={x:0,y:0},le.tipMoving=!1,le.color=fe.defaultStrokeColor,le.bgColor=fe.defaultFillColor,le.fontFamily=fe.defaultFontFamily,le.defaultSize={x:100,y:30},le.setBgColor=le.setBgColor.bind(le),le.getTipPoints=le.getTipPoints.bind(le),le.positionTip=le.positionTip.bind(le),le.setTipPoints=le.setTipPoints.bind(le),le.colorPanel=new dt("Text color",fe.defaultColorSet,le.color,Be),le.colorPanel.onColorChanged=le.setColor,le.bgColorPanel=new dt("Fill color",fe.defaultColorSet,le.bgColor,be),le.bgColorPanel.onColorChanged=le.setBgColor,le.fontFamilyPanel=new et("Font",fe.defaultFontFamilies,fe.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le.tipGrip=new en,le.tipGrip.visual.transform.baseVal.appendItem(_e.createTransform()),le.controlBox.appendChild(le.tipGrip.visual),le}return je(se,ve),se.prototype.ownsTarget=function(oe){return ve.prototype.ownsTarget.call(this,oe)||this.tipGrip.ownsTarget(oe)||this.tip===oe},se.prototype.createTip=function(){_e.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_e.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},se.prototype.pointerDown=function(oe,de){this.state==="new"&&ve.prototype.pointerDown.call(this,oe,de),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(de)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ve.prototype.pointerDown.call(this,oe,de)},se.prototype.pointerUp=function(oe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ve.prototype.pointerUp.call(this,oe);else{var de=this.state==="creating";ve.prototype.pointerUp.call(this,oe),this.setTipPoints(de),this.positionTip()}},se.prototype.manipulate=function(oe){if(this.tipMoving){var de=this.unrotatePoint(oe);this.tipPosition={x:de.x-this.manipulationStartLeft,y:de.y-this.manipulationStartTop},this.positionTip()}else ve.prototype.manipulate.call(this,oe)},se.prototype.setBgColor=function(oe){this.bgRectangle&&this.tip&&(_e.setAttributes(this.bgRectangle,[["fill",oe]]),_e.setAttributes(this.tip,[["fill",oe]])),this.bgColor=oe,this.fillColorChanged(oe)},se.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},se.prototype.setTipPoints=function(oe){oe===void 0&&(oe=!1);var de=Math.min(this.height/2,15),fe=this.height/5;oe&&(this.tipPosition={x:de+fe/2,y:this.height+20});var le=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?le<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:de,y:0},this.tipBase2Position={x:de+fe,y:0}):(this.tipBase1Position={x:0,y:de},this.tipBase2Position={x:0,y:de+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?le<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-de-fe,y:0},this.tipBase2Position={x:this.width-de,y:0}):(this.tipBase1Position={x:this.width,y:de},this.tipBase2Position={x:this.width,y:de+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?le<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-de-fe,y:this.height},this.tipBase2Position={x:this.width-de,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-de-fe},this.tipBase2Position={x:this.width,y:this.height-de}):le<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,de=Math.min(this.width/2,15),this.tipBase1Position={x:de,y:this.height},this.tipBase2Position={x:de+fe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-de},this.tipBase2Position={x:0,y:this.height-de-fe})},se.prototype.resize=function(oe){ve.prototype.resize.call(this,oe),this.positionTip()},se.prototype.positionTip=function(){_e.setAttributes(this.tip,[["points",this.getTipPoints()]]);var oe=this.tipGrip.visual.transform.baseVal.getItem(0);oe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(oe,0)},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.positionTip(),ve.prototype.select.call(this)},se.prototype.getState=function(){var oe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.bgColor=de.bgColor,this.tipPosition=de.tipPosition,ve.prototype.restoreState.call(this,oe),this.createTip(),this.setTipPoints()},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.tipPosition={x:this.tipPosition.x*oe,y:this.tipPosition.y*de},this.positionTip()},se.typeName="CalloutMarker",se.title="Callout marker",se.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>',se}(kt),nn=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.opacity=1,le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.fillColor=fe.defaultFillColor,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.setOpacity=le.setOpacity.bind(le),le.createVisual=le.createVisual.bind(le),le.strokePanel=new dt("Line color",xe(fe.defaultColorSet,["transparent"]),fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.fillPanel=new dt("Fill color",xe(fe.defaultColorSet,["transparent"]),le.fillColor,be),le.fillPanel.onColorChanged=le.setFillColor,le.strokeWidthPanel=new Ee("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new He("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le.opacityPanel=new Et("Opacity",fe.defaultOpacitySteps,le.opacity),le.opacityPanel.onOpacityChanged=le.setOpacity,le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.visual)},se.prototype.createVisual=function(){this.visual=_e.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)},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.manipulate=function(oe){ve.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){ve.prototype.resize.call(this,oe),this.setSize()},se.prototype.setSize=function(){ve.prototype.setSize.call(this),_e.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},se.prototype.pointerUp=function(oe){ve.prototype.pointerUp.call(this,oe),this.setSize()},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(oe),this.stateChanged()},se.prototype.setFillColor=function(oe){this.fillColor=oe,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(oe),this.stateChanged()},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},se.prototype.setOpacity=function(oe){this.opacity=oe,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.fillColor=de.fillColor,this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.opacity=de.opacity,this.createVisual(),ve.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.setSize()},se.typeName="EllipseMarker",se.title="Ellipse marker",se.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>',se}(mt),Wt=function(ve){function se(oe,de,fe){return ve.call(this,oe,de,fe)||this}return je(se,ve),Object.defineProperty(se.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.tip1&&oe!==this.tip2)},se.prototype.createTips=function(){this.tip1=_e.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(_e.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_e.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(_e.createTransform()),this.visual.appendChild(this.tip2)},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.state==="creating"&&this.createTips()},se.prototype.adjustVisual=function(){if(ve.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_e.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()]]),_e.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 oe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),de=this.tip1.transform.baseVal.getItem(0);de.setRotate(oe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(de,0);var fe=this.tip2.transform.baseVal.getItem(0);fe.setRotate(oe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(fe,0)}},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ve.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ve.prototype.restoreState.call(this,oe),this.createTips(),this.adjustVisual()},se.typeName="MeasurementMarker",se.title="Measurement marker",se.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>',se}(It),Ve=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.strokePanel.colors=fe.defaultColorSet,le.fillColor="transparent",le}return je(se,ve),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=ve.prototype.getState.call(this);return oe.typeName=se.typeName,oe},se.typeName="EllipseFrameMarker",se.title="Ellipse frame marker",se.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>',se}(nn),Ye=function(){function ve(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ve.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ve.prototype.addUndoStep=function(se){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(se)||(this.undoStack.push(se),JSON.stringify(this.lastRedoStep)!==JSON.stringify(se)&&this.redoStack.splice(0,this.redoStack.length))},ve.prototype.replaceLastUndoStep=function(se){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=se)},ve.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ve.prototype.undo=function(){if(this.undoStack.length>1){var se=this.undoStack.pop();return se!==void 0&&this.redoStack.push(se),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ve.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ve}(),At=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.curveX=0,le.curveY=0,le.manipulationStartCurveX=0,le.manipulationStartCurveY=0,le.setStrokeColor=le.setStrokeColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.positionGrips=le.positionGrips.bind(le),le.addControlGrips=le.addControlGrips.bind(le),le.adjustVisual=le.adjustVisual.bind(le),le.setupControlBox=le.setupControlBox.bind(le),le.resize=le.resize.bind(le),le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.strokePanel=new dt("Line color",fe.defaultColorSet,fe.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Ee("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new He("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.selectorCurve&&oe!==this.visibleCurve&&!this.curveGrip.ownsTarget(oe))},se.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},se.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorCurve=_e.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_e.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)},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=oe.x,this.curveY=oe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(de)&&(this.activeGrip=this.curveGrip,this._state="resize")},se.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_e.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},se.prototype.setupControlBox=function(){ve.prototype.setupControlBox.call(this),this.curveControlLine1=_e.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_e.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)},se.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ve.prototype.addControlGrips.call(this)},se.prototype.positionGrips=function(){ve.prototype.positionGrips.call(this);var oe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-oe/2,this.curveY-oe/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()))},se.prototype.manipulate=function(oe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+oe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+oe.y-this.manipulationStartY),ve.prototype.manipulate.call(this,oe)},se.prototype.resize=function(oe){this.activeGrip===this.curveGrip&&(this.curveX=oe.x,this.curveY=oe.y),ve.prototype.resize.call(this,oe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.adjustVisual(),this.colorChanged(oe)},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.adjustVisual()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.adjustVisual()},se.prototype.scale=function(oe,de){this.curveX=this.curveX*oe,this.curveY=this.curveY*de,ve.prototype.scale.call(this,oe,de)},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ve.prototype.getState.call(this));return oe.typeName=se.typeName,oe},se.prototype.restoreState=function(oe){ve.prototype.restoreState.call(this,oe);var de=oe;this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.curveX=de.curveX,this.curveY=de.curveY,this.createVisual(),this.adjustVisual()},se.typeName="CurveMarker",se.title="Curve marker",se.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>',se}(Ge),gn=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,de,fe)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.textColor="transparent",le.fontSize="1rem",le.isMoved=!1,le.captionText="Caption",le.PADDING=5,le.captionBoxWidth=0,le.captionBoxHeight=0,le.strokeColor=fe.defaultColor,le.strokeWidth=fe.defaultStrokeWidth,le.strokeDasharray=fe.defaultStrokeDasharray,le.fillColor=fe.defaultFillColor,le.textColor=fe.defaultStrokeColor,le.fontFamily=fe.defaultFontFamily,le.fontSize=fe.defaultCaptionFontSize,le.captionText=fe.defaultCaptionText,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.createVisual=le.createVisual.bind(le),le.sizeCaption=le.sizeCaption.bind(le),le.setCaptionText=le.setCaptionText.bind(le),le.showTextEditor=le.showTextEditor.bind(le),le.positionTextEditor=le.positionTextEditor.bind(le),le.finishTextEditing=le.finishTextEditing.bind(le),le.setFont=le.setFont.bind(le),le.setTextColor=le.setTextColor.bind(le),le.strokePanel=new dt("Line color",xe(fe.defaultColorSet,["transparent"]),le.strokeColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.fillPanel=new dt("Fill color",xe(fe.defaultColorSet,["transparent"]),le.fillColor,be),le.fillPanel.onColorChanged=le.setFillColor,le.strokeWidthPanel=new Ee("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new He("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le.fontFamilyPanel=new et("Font",fe.defaultFontFamilies,fe.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le.textColorPanel=new dt("Text color",fe.defaultColorSet,le.textColor,Be),le.textColorPanel.onColorChanged=le.setTextColor,le}return je(se,ve),se.prototype.ownsTarget=function(oe){return!(!ve.prototype.ownsTarget.call(this,oe)&&oe!==this.visual&&oe!==this.frame&&oe!==this.captionBg&&oe!==this.captionElement)},se.prototype.createVisual=function(){this.visual=_e.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=_e.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=_e.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=_e.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()},se.prototype.setCaptionText=function(oe){this.captionText=oe,this.captionElement.textContent=this.captionText,this.sizeCaption()},se.prototype.pointerDown=function(oe,de){ve.prototype.pointerDown.call(this,oe,de),this.isMoved=!1,this.pointerDownPoint=oe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(oe),this._state="creating")},se.prototype.manipulate=function(oe){ve.prototype.manipulate.call(this,oe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(oe.x-this.pointerDownPoint.x)>5||Math.abs(oe.y-this.pointerDownPoint.y)>5)},se.prototype.resize=function(oe){ve.prototype.resize.call(this,oe),this.setSize()},se.prototype.sizeCaption=function(){var oe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=oe.width+2*this.PADDING,this.captionBoxHeight=oe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),_e.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')"]]),_e.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')"]])},se.prototype.showTextEditor=function(){var oe=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(de){de.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(de){de.key==="Enter"&&oe.finishTextEditing(oe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(de){de.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){oe.finishTextEditing(oe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){oe.finishTextEditing(oe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},se.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"))},se.prototype.finishTextEditing=function(oe){this.setCaptionText(oe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},se.prototype.setFont=function(oe){this.captionElement&&_e.setAttributes(this.captionElement,[["font-family",oe]]),this.fontFamily=oe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},se.prototype.setTextColor=function(oe){this.captionElement&&_e.setAttributes(this.captionElement,[["fill",oe]]),this.textColor=oe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},se.prototype.setSize=function(){ve.prototype.setSize.call(this),_e.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},se.prototype.pointerUp=function(oe){ve.prototype.pointerUp.call(this,oe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},se.prototype.dblClick=function(oe,de){ve.prototype.dblClick.call(this,oe,de),this.showTextEditor()},se.prototype.setStrokeColor=function(oe){this.strokeColor=oe,this.frame&&_e.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(oe),this.stateChanged()},se.prototype.setFillColor=function(oe){this.fillColor=oe,this.captionBg&&_e.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(oe),this.stateChanged()},se.prototype.setStrokeWidth=function(oe){this.strokeWidth=oe,this.frame&&_e.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},se.prototype.setStrokeDasharray=function(oe){this.strokeDasharray=oe,this.frame&&_e.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),se.prototype.getState=function(){var oe=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},ve.prototype.getState.call(this));return oe.typeName=this.typeName,oe},se.prototype.restoreState=function(oe){var de=oe;this.fillColor=de.fillColor,this.strokeColor=de.strokeColor,this.strokeWidth=de.strokeWidth,this.strokeDasharray=de.strokeDasharray,this.textColor=de.textColor,this.fontFamily=de.fontFamily,this.captionText=de.captionText,this.fontSize=de.fontSize,this.createVisual(),ve.prototype.restoreState.call(this,oe),this.setSize()},se.prototype.scale=function(oe,de){ve.prototype.scale.call(this,oe,de),this.setSize()},se.typeName="CaptionFrameMarker",se.title="Caption frame marker",se.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>',se}(mt),Jt=function(){function ve(se,oe){oe===void 0&&(oe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=se,this.cancelable=oe}return Object.defineProperty(ve.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ve.prototype.preventDefault=function(){this._defaultPrevented=!0},ve}(),un=function(ve){function se(oe,de,fe){var le=ve.call(this,oe,!1)||this;return le.dataUrl=de,le.state=fe,le}return je(se,ve),se}(Jt),Gt=function(ve){function se(oe,de,fe){fe===void 0&&(fe=!1);var le=ve.call(this,oe,fe)||this;return le.marker=de,le}return je(se,ve),se}(Jt),Vt=function(){function ve(){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 ve.prototype.addEventListener=function(se,oe){this[se].push(oe)},ve.prototype.removeEventListener=function(se,oe){var de=this[se].indexOf(oe);de>-1&&this[se].splice(de,1)},ve}(),Nt=function(){function ve(se){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ct,this._isOpen=!1,this.undoRedoManager=new Ye,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 Vt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ve.instanceCounter++,this.styles=new Ke(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=se,this.targetRoot=document.body,this.width=se.clientWidth,this.height=se.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(ve.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ue,Je,ft,kt,Ve,nn,ut,ht,Wt,Dt,It,At,gn]},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ue,Je,ft,kt,nn,ut,ht]},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ue,Je,ft,kt,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(se){var oe=this;this._availableMarkerTypes.splice(0),se.forEach(function(de){if(typeof de=="string"){var fe=oe.ALL_MARKER_TYPES.find(function(le){return le.typeName===de});fe!==void 0&&oe._availableMarkerTypes.push(fe)}else oe._availableMarkerTypes.push(de)})},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(se){this._zoomLevel=se,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(ve.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ve.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ae.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ve.prototype.show=function(){var se=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(oe){return oe(new Jt(se))})},ve.prototype.render=function(){return Fe(this,void 0,void 0,function(){var se;return tt(this,function(oe){switch(oe.label){case 0:return this.setCurrentMarker(),(se=new Se).naturalSize=this.renderAtNaturalSize,se.imageType=this.renderImageType,se.imageQuality=this.renderImageQuality,se.markersOnly=this.renderMarkersOnly,se.width=this.renderWidth,se.height=this.renderHeight,[4,se.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return oe.sent(),[4,se.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,oe.sent()]}})})},ve.prototype.close=function(se){var oe=this;if(se===void 0&&(se=!1),this.isOpen){var de=!1;se||this.eventListeners.beforeclose.forEach(function(fe){var le=new Jt(oe,!0);fe(le),le.defaultPrevented&&(de=!0)}),de||(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(fe){return fe(new Jt(oe))}),this.detachEvents(),this._isOpen=!1)}},ve.prototype.addMarkersToToolbar=function(){for(var se,oe=[],de=0;de<arguments.length;de++)oe[de]=arguments[de];(se=this._availableMarkerTypes).push.apply(se,oe)},ve.prototype.addRenderEventListener=function(se){this.addEventListener("render",function(oe){se(oe.dataUrl,oe.state)})},ve.prototype.removeRenderEventListener=function(se){},ve.prototype.addCloseEventListener=function(se){this.addEventListener("close",function(){se()})},ve.prototype.removeCloseEventListener=function(se){},ve.prototype.setupResizeObserver=function(){var se=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){se.resize(se.target.clientWidth,se.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return se.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ve.prototype.onPopupTargetResize=function(){var se=1*this.target.clientWidth/this.target.clientHeight,oe=this.editorCanvas.clientWidth/se>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*se:this.editorCanvas.clientWidth,de=oe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/se;this.resize(oe,de)},ve.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ve.prototype.resize=function(se,oe){this._isResizing=!0;var de=se/this.imageWidth,fe=oe/this.imageHeight;this.imageWidth=Math.round(se),this.imageHeight=Math.round(oe),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(de,fe),this._isResizing=!1},ve.prototype.scaleMarkers=function(se,oe){var de,fe=this;this._currentMarker&&this._currentMarker instanceof kt?this._currentMarker.scale(se,oe):(de=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(le){le!==fe._currentMarker&&le.scale(se,oe)}),de!==void 0&&this.setCurrentMarker(de)},ve.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"},ve.prototype.setTopLeft=function(){var se=this.editingTarget.getBoundingClientRect(),oe=this.editorCanvas.getBoundingClientRect();this.left=se.left-oe.left,this.top=se.top-oe.top},ve.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)},ve.prototype.addDefs=function(){for(var se,oe=[],de=0;de<arguments.length;de++)oe[de]=arguments[de];this.defs=_e.createDefs(),this.addDefsToImage(),(se=this.defs).append.apply(se,oe)},ve.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ve.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)},ve.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ve.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ve.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)},ve.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ve.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)},ve.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 se=document.createElement("a");se.href="https://markerjs.com/",se.target="_blank",se.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>',se.title="Powered by marker.js",se.style.display="grid",se.style.alignItems="center",se.style.justifyItems="center",se.style.padding="3px",se.style.width="20px",se.style.height="20px",this.logoUI.appendChild(se),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ve.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")},ve.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"},ve.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ve.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 se=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=se+"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 We(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 vt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ve.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ve.prototype.removeMarker=function(se){this.markerImage.removeChild(se.container),this.markers.indexOf(se)>-1&&this.markers.splice(this.markers.indexOf(se),1),se.dispose()},ve.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())},ve.prototype.toolbarButtonClicked=function(se,oe){if(se==="marker"&&oe!==void 0)this.createNewMarker(oe);else if(se==="action")switch(oe){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()}},ve.prototype.deleteSelectedMarker=function(){var se=this;if(this._currentMarker!==void 0){var oe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(fe){var le=new Gt(se,se._currentMarker,!0);fe(le),le.defaultPrevented&&(oe=!0)}),!oe){var de=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(fe){return fe(new Gt(se,de))})}}},ve.prototype.clear=function(){var se=this,oe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var ot=new Gt(se,void 0,!0);Ie(ot),ot.defaultPrevented&&(oe=!0)}),!oe)){this.setCurrentMarker();for(var de=function(Ie){var ot=fe.markers[Ie];fe.setCurrentMarker(fe.markers[Ie]),fe._currentMarker.dispose(),fe.markerImage.removeChild(fe._currentMarker.container),fe.markers.splice(fe.markers.indexOf(fe._currentMarker),1),fe.eventListeners.markerdelete.forEach(function(Kt){return Kt(new Gt(se,ot))})},fe=this,le=this.markers.length-1;le>=0;le--)de(le);this.addUndoStep()}},Object.defineProperty(ve.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ve.prototype.showNotesEditor=function(){var se;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=(se=this._currentMarker.notes)!==null&&se!==void 0?se:"",this.overlayContainer.appendChild(this.notesArea))},ve.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)},ve.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ve.prototype.addUndoStep=function(){var se=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var oe=this.getState(),de=this.undoRedoManager.getLastUndoStep();if(!de||de.width===oe.width&&de.height===oe.height){var fe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(oe),fe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(le){return le(new Jt(se))})}else this.undoRedoManager.replaceLastUndoStep(oe),this.eventListeners.statechange.forEach(function(le){return le(new Jt(se))})}},ve.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ve.prototype.undoStep=function(){var se=this,oe=this.undoRedoManager.undo();oe!==void 0&&(this.restoreState(oe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(de){return de(new Jt(se))}))},ve.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ve.prototype.redoStep=function(){var se=this,oe=this.undoRedoManager.redo();oe!==void 0&&(this.restoreState(oe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(de){return de(new Jt(se))}))},ve.prototype.stepZoom=function(){var se=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=se<this.zoomSteps.length-1?this.zoomSteps[se+1]:this.zoomSteps[0]},ve.prototype.panTo=function(se){this.contentDiv.scrollBy({left:this.prevPanPoint.x-se.x,top:this.prevPanPoint.y-se.y}),this.prevPanPoint=se},ve.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var se,oe,de=this;return tt(this,function(fe){switch(fe.label){case 0:return[4,this.render()];case 1:return se=fe.sent(),oe=this.getState(),this.eventListeners.render.forEach(function(le){return le(new un(de,se,oe))}),this.close(!0),[2]}})})},ve.prototype.getState=function(se){se===!0&&this.setCurrentMarker();var oe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(de){return oe.markers.push(de.getState())}),oe},ve.prototype.restoreState=function(se){var oe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);se.markers.forEach(function(de){var fe=oe._availableMarkerTypes.find(function(Ie){return Ie.typeName===de.typeName});if(fe!==void 0){var le=oe.addNewMarker(fe);le.restoreState(de),oe.markers.push(le)}}),se.width&&se.height&&(se.width!==this.imageWidth||se.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/se.width,this.imageHeight/se.height),this.eventListeners.restorestate.forEach(function(de){return de(new Jt(oe))})},ve.prototype.addNewMarker=function(se){var oe=_e.createGroup();return this.markerImage.appendChild(oe),new se(oe,this.overlayContainer,this.settings)},ve.prototype.createNewMarker=function(se){var oe,de=this;(oe=typeof se=="string"?this._availableMarkerTypes.find(function(fe){return fe.typeName===se}):se)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(oe),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(oe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(fe){return fe(new Gt(de,de._currentMarker))}))},ve.prototype.markerCreated=function(se){var oe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(se),this.setCurrentMarker(se),se instanceof Je&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Je):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(de){return de(new Gt(oe,oe._currentMarker))})},ve.prototype.colorChanged=function(se){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=se,this.settings.defaultStrokeColor=se)},ve.prototype.fillColorChanged=function(se){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=se)},ve.prototype.markerStateChanged=function(se){var oe=this;this.eventListeners.markerchange.forEach(function(de){return de(new Gt(oe,se))})},ve.prototype.setCurrentMarker=function(se){var oe=this;this._currentMarker!==se&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(de){return de(new Gt(oe,oe._currentMarker))})),this._currentMarker=se,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(de){return de(new Gt(oe,oe._currentMarker))}))},ve.prototype.onPointerDown=function(se){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||se.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var oe=this.markers.find(function(de){return de.ownsTarget(se.target)});oe!==void 0?(this.setCurrentMarker(oe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(se.clientX,se.clientY),se.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:se.clientX,y:se.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(se.clientX,se.clientY))},ve.prototype.onDblClick=function(se){if(this._isFocused||this.focus(),this.mode==="select"){var oe=this.markers.find(function(de){return de.ownsTarget(se.target)});oe!==void 0&&oe!==this._currentMarker&&this.setCurrentMarker(oe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(se.clientX,se.clientY),se.target):this.setCurrentMarker()}},ve.prototype.onPointerMove=function(se){this.touchPoints!==1&&se.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||se.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(se.clientX,se.clientY)):this.zoomLevel>1&&this.panTo({x:se.clientX,y:se.clientY}))},ve.prototype.onPointerUp=function(se){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(se.clientX,se.clientY)),this.isDragging=!1,this.addUndoStep()},ve.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ve.prototype.onKeyUp=function(se){this._currentMarker===void 0||this.notesArea!==void 0||se.key!=="Delete"&&se.key!=="Backspace"||this.deleteSelectedMarker()},ve.prototype.clientToLocalCoordinates=function(se,oe){var de=this.markerImage.getBoundingClientRect();return{x:(se-de.left)/this.zoomLevel,y:(oe-de.top)/this.zoomLevel}},ve.prototype.onWindowResize=function(){this.positionUI()},ve.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var se=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=se+"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()},ve.prototype.addLicenseKey=function(se){Ae.addKey(se)},ve.prototype.addEventListener=function(se,oe){this.eventListeners.addEventListener(se,oe)},ve.prototype.removeEventListener=function(se,oe){this.eventListeners.removeEventListener(se,oe)},ve.prototype.renderState=function(se){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(se),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ve.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ve.prototype.focus=function(){var se=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(oe){return oe(new Jt(se))}))},ve.prototype.blur=function(){var se=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(oe){return oe(new Jt(se))}))},ve.instanceCounter=0,ve}()},5630:function(Mn,sn,ue){"use strict";var pe=ue(54476),je=ue(33885),Fe=ue(20068),tt=ue(42978),xe=ue(75931),_e=ue(92310),Ae=ue.n(_e),Se=ue(18929),Me=ue(59301),Ke=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],ct=(0,Me.forwardRef)(function(De,We){var vt,nt=De.prefixCls,dt=nt===void 0?"rc-checkbox":nt,st=De.className,wt=De.style,en=De.checked,it=De.disabled,mt=De.defaultChecked,Ze=mt===void 0?!1:mt,Ee=De.type,He=Ee===void 0?"checkbox":Ee,Ue=De.title,Ct=De.onChange,Ge=(0,xe.Z)(De,Ke),It=(0,Me.useRef)(null),et=(0,Se.Z)(Ze,{value:en}),kt=(0,tt.Z)(et,2),Je=kt[0],Ut=kt[1];(0,Me.useImperativeHandle)(We,function(){return{focus:function(){var ut;(ut=It.current)===null||ut===void 0||ut.focus()},blur:function(){var ut;(ut=It.current)===null||ut===void 0||ut.blur()},input:It.current}});var ft=Ae()(dt,st,(vt={},(0,Fe.Z)(vt,"".concat(dt,"-checked"),Je),(0,Fe.Z)(vt,"".concat(dt,"-disabled"),it),vt)),Dt=function(ut){it||("checked"in De||Ut(ut.target.checked),Ct==null||Ct({target:(0,je.Z)((0,je.Z)({},De),{},{type:He,checked:ut.target.checked}),stopPropagation:function(){ut.stopPropagation()},preventDefault:function(){ut.preventDefault()},nativeEvent:ut.nativeEvent}))};return Me.createElement("span",{className:ft,title:Ue,style:wt},Me.createElement("input",(0,pe.Z)({},Ge,{className:"".concat(dt,"-input"),ref:It,onChange:Dt,disabled:it,checked:!!Je,type:He})),Me.createElement("span",{className:"".concat(dt,"-inner")}))});sn.Z=ct},31561:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return He}});var pe=ue(54476),je=ue(20068),Fe=ue(42978),tt=ue(75931),xe=ue(35593),_e=ue(92310),Ae=ue.n(_e),Se=ue(8654),Me=ue(59301),Ke=ue(10228),ct=ue(16089),De=Ke.Z.ESC,We=Ke.Z.TAB;function vt(Ue){var Ct=Ue.visible,Ge=Ue.triggerRef,It=Ue.onVisibleChange,et=Ue.autoFocus,kt=Ue.overlayRef,Je=Me.useRef(!1),Ut=function(){if(Ct){var ut,Be;(ut=Ge.current)===null||ut===void 0||(Be=ut.focus)===null||Be===void 0||Be.call(ut),It==null||It(!1)}},ft=function(){var ut;return(ut=kt.current)!==null&&ut!==void 0&&ut.focus?(kt.current.focus(),Je.current=!0,!0):!1},Dt=function(ut){switch(ut.keyCode){case De:Ut();break;case We:{var Be=!1;Je.current||(Be=ft()),Be?ut.preventDefault():Ut();break}}};Me.useEffect(function(){return Ct?(window.addEventListener("keydown",Dt),et&&(0,ct.Z)(ft,3),function(){window.removeEventListener("keydown",Dt),Je.current=!1}):function(){Je.current=!1}},[Ct])}var nt=(0,Me.forwardRef)(function(Ue,Ct){var Ge=Ue.overlay,It=Ue.arrow,et=Ue.prefixCls,kt=(0,Me.useMemo)(function(){var Ut;return typeof Ge=="function"?Ut=Ge():Ut=Ge,Ut},[Ge]),Je=(0,Se.sQ)(Ct,kt==null?void 0:kt.ref);return Me.createElement(Me.Fragment,null,It&&Me.createElement("div",{className:"".concat(et,"-arrow")}),Me.cloneElement(kt,{ref:(0,Se.Yr)(kt)?Je:void 0}))}),dt=nt,st={adjustX:1,adjustY:1},wt=[0,0],en={topLeft:{points:["bl","tl"],overflow:st,offset:[0,-4],targetOffset:wt},top:{points:["bc","tc"],overflow:st,offset:[0,-4],targetOffset:wt},topRight:{points:["br","tr"],overflow:st,offset:[0,-4],targetOffset:wt},bottomLeft:{points:["tl","bl"],overflow:st,offset:[0,4],targetOffset:wt},bottom:{points:["tc","bc"],overflow:st,offset:[0,4],targetOffset:wt},bottomRight:{points:["tr","br"],overflow:st,offset:[0,4],targetOffset:wt}},it=en,mt=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ze(Ue,Ct){var Ge,It=Ue.arrow,et=It===void 0?!1:It,kt=Ue.prefixCls,Je=kt===void 0?"rc-dropdown":kt,Ut=Ue.transitionName,ft=Ue.animation,Dt=Ue.align,Et=Ue.placement,ut=Et===void 0?"bottomLeft":Et,Be=Ue.placements,be=Be===void 0?it:Be,ht=Ue.getPopupContainer,nn=Ue.showAction,Wt=Ue.hideAction,Ve=Ue.overlayClassName,Ye=Ue.overlayStyle,At=Ue.visible,gn=Ue.trigger,Jt=gn===void 0?["hover"]:gn,un=Ue.autoFocus,Gt=Ue.overlay,Vt=Ue.children,Nt=Ue.onVisibleChange,ve=(0,tt.Z)(Ue,mt),se=Me.useState(),oe=(0,Fe.Z)(se,2),de=oe[0],fe=oe[1],le="visible"in Ue?At:de,Ie=Me.useRef(null),ot=Me.useRef(null),Kt=Me.useRef(null);Me.useImperativeHandle(Ct,function(){return Ie.current});var Ft=function(rt){fe(rt),Nt==null||Nt(rt)};vt({visible:le,triggerRef:Kt,onVisibleChange:Ft,autoFocus:un,overlayRef:ot});var Xt=function(rt){var ze=Ue.onOverlayClick;fe(!1),ze&&ze(rt)},Qt=function(){return Me.createElement(dt,{ref:ot,overlay:Gt,prefixCls:Je,arrow:et})},on=function(){return typeof Gt=="function"?Qt:Qt()},pn=function(){var rt=Ue.minOverlayWidthMatchTrigger,ze=Ue.alignPoint;return"minOverlayWidthMatchTrigger"in Ue?rt:!ze},Cn=function(){var rt=Ue.openClassName;return rt!==void 0?rt:"".concat(Je,"-open")},bt=Me.cloneElement(Vt,{className:Ae()((Ge=Vt.props)===null||Ge===void 0?void 0:Ge.className,le&&Cn()),ref:(0,Se.Yr)(Vt)?(0,Se.sQ)(Kt,Vt.ref):void 0}),hn=Wt;return!hn&&Jt.indexOf("contextMenu")!==-1&&(hn=["click"]),Me.createElement(xe.Z,(0,pe.Z)({builtinPlacements:be},ve,{prefixCls:Je,ref:Ie,popupClassName:Ae()(Ve,(0,je.Z)({},"".concat(Je,"-show-arrow"),et)),popupStyle:Ye,action:Jt,showAction:nn,hideAction:hn,popupPlacement:ut,popupAlign:Dt,popupTransitionName:Ut,popupAnimation:ft,popupVisible:le,stretch:pn()?"minWidth":"",popup:on(),onPopupVisibleChange:Ft,onPopupClick:Xt,getPopupContainer:ht}),bt)}var Ee=Me.forwardRef(Ze),He=Ee},93681:function(Mn,sn,ue){"use strict";ue.r(sn),ue.d(sn,{BaseInput:function(){return Ke},default:function(){return en}});var pe=ue(54476),je=ue(33885),Fe=ue(20068),tt=ue(76190),xe=ue(92310),_e=ue.n(xe),Ae=ue(59301),Se=ue(5643),Me=function(mt){var Ze,Ee,He=mt.inputElement,Ue=mt.prefixCls,Ct=mt.prefix,Ge=mt.suffix,It=mt.addonBefore,et=mt.addonAfter,kt=mt.className,Je=mt.style,Ut=mt.disabled,ft=mt.readOnly,Dt=mt.focused,Et=mt.triggerFocus,ut=mt.allowClear,Be=mt.value,be=mt.handleReset,ht=mt.hidden,nn=mt.classes,Wt=mt.classNames,Ve=mt.dataAttrs,Ye=mt.styles,At=mt.components,gn=(At==null?void 0:At.affixWrapper)||"span",Jt=(At==null?void 0:At.groupWrapper)||"span",un=(At==null?void 0:At.wrapper)||"span",Gt=(At==null?void 0:At.groupAddon)||"span",Vt=(0,Ae.useRef)(null),Nt=function(Qt){var on;(on=Vt.current)!==null&&on!==void 0&&on.contains(Qt.target)&&(Et==null||Et())},ve=function(){var Qt;if(!ut)return null;var on=!Ut&&!ft&&Be,pn="".concat(Ue,"-clear-icon"),Cn=(0,tt.Z)(ut)==="object"&&ut!==null&&ut!==void 0&&ut.clearIcon?ut.clearIcon:"\u2716";return Ae.createElement("span",{onClick:be,onMouseDown:function(hn){return hn.preventDefault()},className:_e()(pn,(Qt={},(0,Fe.Z)(Qt,"".concat(pn,"-hidden"),!on),(0,Fe.Z)(Qt,"".concat(pn,"-has-suffix"),!!Ge),Qt)),role:"button",tabIndex:-1},Cn)},se=(0,Ae.cloneElement)(He,{value:Be,hidden:ht,className:_e()((Ze=He.props)===null||Ze===void 0?void 0:Ze.className,!(0,Se.X3)(mt)&&!(0,Se.He)(mt)&&kt)||null,style:(0,je.Z)((0,je.Z)({},(Ee=He.props)===null||Ee===void 0?void 0:Ee.style),!(0,Se.X3)(mt)&&!(0,Se.He)(mt)?Je:{})});if((0,Se.X3)(mt)){var oe,de="".concat(Ue,"-affix-wrapper"),fe=_e()(de,(oe={},(0,Fe.Z)(oe,"".concat(de,"-disabled"),Ut),(0,Fe.Z)(oe,"".concat(de,"-focused"),Dt),(0,Fe.Z)(oe,"".concat(de,"-readonly"),ft),(0,Fe.Z)(oe,"".concat(de,"-input-with-clear-btn"),Ge&&ut&&Be),oe),!(0,Se.He)(mt)&&kt,nn==null?void 0:nn.affixWrapper,Wt==null?void 0:Wt.affixWrapper),le=(Ge||ut)&&Ae.createElement("span",{className:_e()("".concat(Ue,"-suffix"),Wt==null?void 0:Wt.suffix),style:Ye==null?void 0:Ye.suffix},ve(),Ge);se=Ae.createElement(gn,(0,pe.Z)({className:fe,style:(0,je.Z)((0,je.Z)({},(0,Se.He)(mt)?void 0:Je),Ye==null?void 0:Ye.affixWrapper),hidden:!(0,Se.He)(mt)&&ht,onClick:Nt},Ve==null?void 0:Ve.affixWrapper,{ref:Vt}),Ct&&Ae.createElement("span",{className:_e()("".concat(Ue,"-prefix"),Wt==null?void 0:Wt.prefix),style:Ye==null?void 0:Ye.prefix},Ct),(0,Ae.cloneElement)(He,{value:Be,hidden:null}),le)}if((0,Se.He)(mt)){var Ie="".concat(Ue,"-group"),ot="".concat(Ie,"-addon"),Kt=_e()("".concat(Ue,"-wrapper"),Ie,nn==null?void 0:nn.wrapper),Ft=_e()("".concat(Ue,"-group-wrapper"),kt,nn==null?void 0:nn.group);return Ae.createElement(Jt,{className:Ft,style:Je,hidden:ht},Ae.createElement(un,{className:Kt},It&&Ae.createElement(Gt,{className:ot},It),(0,Ae.cloneElement)(se,{hidden:null}),et&&Ae.createElement(Gt,{className:ot},et)))}return se},Ke=Me,ct=ue(94480),De=ue(42978),We=ue(75931),vt=ue(18929),nt=ue(2738),dt=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],st=(0,Ae.forwardRef)(function(it,mt){var Ze=it.autoComplete,Ee=it.onChange,He=it.onFocus,Ue=it.onBlur,Ct=it.onPressEnter,Ge=it.onKeyDown,It=it.prefixCls,et=It===void 0?"rc-input":It,kt=it.disabled,Je=it.htmlSize,Ut=it.className,ft=it.maxLength,Dt=it.suffix,Et=it.showCount,ut=it.type,Be=ut===void 0?"text":ut,be=it.classes,ht=it.classNames,nn=it.styles,Wt=(0,We.Z)(it,dt),Ve=(0,vt.Z)(it.defaultValue,{value:it.value}),Ye=(0,De.Z)(Ve,2),At=Ye[0],gn=Ye[1],Jt=(0,Ae.useState)(!1),un=(0,De.Z)(Jt,2),Gt=un[0],Vt=un[1],Nt=(0,Ae.useRef)(null),ve=function(Ft){Nt.current&&(0,Se.nH)(Nt.current,Ft)};(0,Ae.useImperativeHandle)(mt,function(){return{focus:ve,blur:function(){var Ft;(Ft=Nt.current)===null||Ft===void 0||Ft.blur()},setSelectionRange:function(Ft,Xt,Qt){var on;(on=Nt.current)===null||on===void 0||on.setSelectionRange(Ft,Xt,Qt)},select:function(){var Ft;(Ft=Nt.current)===null||Ft===void 0||Ft.select()},input:Nt.current}}),(0,Ae.useEffect)(function(){Vt(function(Kt){return Kt&&kt?!1:Kt})},[kt]);var se=function(Ft){it.value===void 0&&gn(Ft.target.value),Nt.current&&(0,Se.rJ)(Nt.current,Ft,Ee)},oe=function(Ft){Ct&&Ft.key==="Enter"&&Ct(Ft),Ge==null||Ge(Ft)},de=function(Ft){Vt(!0),He==null||He(Ft)},fe=function(Ft){Vt(!1),Ue==null||Ue(Ft)},le=function(Ft){gn(""),ve(),Nt.current&&(0,Se.rJ)(Nt.current,Ft,Ee)},Ie=function(){var Ft=(0,nt.Z)(it,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Ae.createElement("input",(0,pe.Z)({autoComplete:Ze},Ft,{onChange:se,onFocus:de,onBlur:fe,onKeyDown:oe,className:_e()(et,(0,Fe.Z)({},"".concat(et,"-disabled"),kt),ht==null?void 0:ht.input),style:nn==null?void 0:nn.input,ref:Nt,size:Je,type:Be}))},ot=function(){var Ft=Number(ft)>0;if(Dt||Et){var Xt=(0,Se.D7)(At),Qt=(0,ct.Z)(Xt).length,on=(0,tt.Z)(Et)==="object"?Et.formatter({value:Xt,count:Qt,maxLength:ft}):"".concat(Qt).concat(Ft?" / ".concat(ft):"");return Ae.createElement(Ae.Fragment,null,!!Et&&Ae.createElement("span",{className:_e()("".concat(et,"-show-count-suffix"),(0,Fe.Z)({},"".concat(et,"-show-count-has-suffix"),!!Dt),ht==null?void 0:ht.count),style:(0,je.Z)({},nn==null?void 0:nn.count)},on),Dt)}return null};return Ae.createElement(Ke,(0,pe.Z)({},Wt,{prefixCls:et,className:Ut,inputElement:Ie(),handleReset:le,value:(0,Se.D7)(At),focused:Gt,triggerFocus:ve,suffix:ot(),disabled:kt,classes:be,classNames:ht,styles:nn}))}),wt=st,en=wt},5643:function(Mn,sn,ue){"use strict";ue.d(sn,{D7:function(){return xe},He:function(){return pe},X3:function(){return je},nH:function(){return tt},rJ:function(){return Fe}});function pe(_e){return!!(_e.addonBefore||_e.addonAfter)}function je(_e){return!!(_e.prefix||_e.suffix||_e.allowClear)}function Fe(_e,Ae,Se,Me){if(Se){var Ke=Ae;if(Ae.type==="click"){var ct=_e.cloneNode(!0);Ke=Object.create(Ae,{target:{value:ct},currentTarget:{value:ct}}),ct.value="",Se(Ke);return}if(Me!==void 0){Ke=Object.create(Ae,{target:{value:_e},currentTarget:{value:_e}}),_e.value=Me,Se(Ke);return}Se(Ke)}}function tt(_e,Ae){if(_e){_e.focus(Ae);var Se=Ae||{},Me=Se.cursor;if(Me){var Ke=_e.value.length;switch(Me){case"start":_e.setSelectionRange(0,0);break;case"end":_e.setSelectionRange(Ke,Ke);break;default:_e.setSelectionRange(0,Ke)}}}}function xe(_e){return typeof _e=="undefined"||_e===null?"":String(_e)}},15285:function(Mn,sn,ue){"use strict";ue.d(sn,{iz:function(){return Sn},ck:function(){return Hr},BW:function(){return wn},sN:function(){return Hr},Wd:function(){return pt},ZP:function(){return rn},Xl:function(){return Ge}});var pe=ue(54476),je=ue(20068),Fe=ue(33885),tt=ue(94480),xe=ue(42978),_e=ue(75931),Ae=ue(92310),Se=ue.n(Ae),Me=ue(83836),Ke=ue(18929),ct=ue(13697),De=ue(48736),We=ue(59301),vt=ue(4676),nt=We.createContext(null);function dt($e,xt){return $e===void 0?null:"".concat($e,"-").concat(xt)}function st($e){var xt=We.useContext(nt);return dt(xt,$e)}var wt=ue(80547),en=["children","locked"],it=We.createContext(null);function mt($e,xt){var St=(0,Fe.Z)({},$e);return Object.keys(xt).forEach(function(zt){var Ot=xt[zt];Ot!==void 0&&(St[zt]=Ot)}),St}function Ze($e){var xt=$e.children,St=$e.locked,zt=(0,_e.Z)($e,en),Ot=We.useContext(it),Ht=(0,wt.Z)(function(){return mt(Ot,zt)},[Ot,zt],function(Zt,mn){return!St&&(Zt[0]!==mn[0]||!(0,ct.Z)(Zt[1],mn[1],!0))});return We.createElement(it.Provider,{value:Ht},xt)}var Ee=[],He=We.createContext(null);function Ue(){return We.useContext(He)}var Ct=We.createContext(Ee);function Ge($e){var xt=We.useContext(Ct);return We.useMemo(function(){return $e!==void 0?[].concat((0,tt.Z)(xt),[$e]):xt},[xt,$e])}var It=We.createContext(null),et=We.createContext({}),kt=et,Je=ue(29194);function Ut($e){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,Je.Z)($e)){var St=$e.nodeName.toLowerCase(),zt=["input","select","textarea","button"].includes(St)||$e.isContentEditable||St==="a"&&!!$e.getAttribute("href"),Ot=$e.getAttribute("tabindex"),Ht=Number(Ot),Zt=null;return Ot&&!Number.isNaN(Ht)?Zt=Ht:zt&&Zt===null&&(Zt=0),zt&&$e.disabled&&(Zt=null),Zt!==null&&(Zt>=0||xt&&Zt<0)}return!1}function ft($e){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=(0,tt.Z)($e.querySelectorAll("*")).filter(function(zt){return Ut(zt,xt)});return Ut($e,xt)&&St.unshift($e),St}var Dt=null;function Et(){Dt=document.activeElement}function ut(){Dt=null}function Be(){if(Dt)try{Dt.focus()}catch($e){}}function be($e,xt){if(xt.keyCode===9){var St=ft($e),zt=St[xt.shiftKey?0:St.length-1],Ot=zt===document.activeElement||$e===document.activeElement;if(Ot){var Ht=St[xt.shiftKey?St.length-1:0];Ht.focus(),xt.preventDefault()}}}var ht=ue(10228),nn=ue(16089),Wt=ht.Z.LEFT,Ve=ht.Z.RIGHT,Ye=ht.Z.UP,At=ht.Z.DOWN,gn=ht.Z.ENTER,Jt=ht.Z.ESC,un=ht.Z.HOME,Gt=ht.Z.END,Vt=[Ye,At,Wt,Ve];function Nt($e,xt,St,zt){var Ot,Ht,Zt,mn,xn="prev",Ln="next",zn="children",er="parent";if($e==="inline"&&zt===gn)return{inlineTrigger:!0};var cr=(Ot={},(0,je.Z)(Ot,Ye,xn),(0,je.Z)(Ot,At,Ln),Ot),Un=(Ht={},(0,je.Z)(Ht,Wt,St?Ln:xn),(0,je.Z)(Ht,Ve,St?xn:Ln),(0,je.Z)(Ht,At,zn),(0,je.Z)(Ht,gn,zn),Ht),In=(Zt={},(0,je.Z)(Zt,Ye,xn),(0,je.Z)(Zt,At,Ln),(0,je.Z)(Zt,gn,zn),(0,je.Z)(Zt,Jt,er),(0,je.Z)(Zt,Wt,St?zn:er),(0,je.Z)(Zt,Ve,St?er:zn),Zt),fr={inline:cr,horizontal:Un,vertical:In,inlineSub:cr,horizontalSub:In,verticalSub:In},tr=(mn=fr["".concat($e).concat(xt?"":"Sub")])===null||mn===void 0?void 0:mn[zt];switch(tr){case xn:return{offset:-1,sibling:!0};case Ln:return{offset:1,sibling:!0};case er:return{offset:-1,sibling:!1};case zn:return{offset:1,sibling:!1};default:return null}}function ve($e){for(var xt=$e;xt;){if(xt.getAttribute("data-menu-list"))return xt;xt=xt.parentElement}return null}function se($e,xt){for(var St=$e||document.activeElement;St;){if(xt.has(St))return St;St=St.parentElement}return null}function oe($e,xt){var St=ft($e,!0);return St.filter(function(zt){return xt.has(zt)})}function de($e,xt,St){var zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!$e)return null;var Ot=oe($e,xt),Ht=Ot.length,Zt=Ot.findIndex(function(mn){return St===mn});return zt<0?Zt===-1?Zt=Ht-1:Zt-=1:zt>0&&(Zt+=1),Zt=(Zt+Ht)%Ht,Ot[Zt]}var fe=function(xt,St){var zt=new Set,Ot=new Map,Ht=new Map;return xt.forEach(function(Zt){var mn=document.querySelector("[data-menu-id='".concat(dt(St,Zt),"']"));mn&&(zt.add(mn),Ht.set(mn,Zt),Ot.set(Zt,mn))}),{elements:zt,key2element:Ot,element2key:Ht}};function le($e,xt,St,zt,Ot,Ht,Zt,mn,xn,Ln){var zn=We.useRef(),er=We.useRef();er.current=xt;var cr=function(){nn.Z.cancel(zn.current)};return We.useEffect(function(){return function(){cr()}},[]),function(Un){var In=Un.which;if([].concat(Vt,[gn,Jt,un,Gt]).includes(In)){var fr=Ht(),tr=fe(fr,zt),yr=tr,Gn=yr.elements,Xn=yr.key2element,br=yr.element2key,ur=Xn.get(xt),Br=se(ur,Gn),Gr=br.get(Br),ar=Nt($e,Zt(Gr,!0).length===1,St,In);if(!ar&&In!==un&&In!==Gt)return;(Vt.includes(In)||[un,Gt].includes(In))&&Un.preventDefault();var kn=function(Sr){if(Sr){var ii=Sr,Hn=Sr.querySelector("a");Hn!=null&&Hn.getAttribute("href")&&(ii=Hn);var qn=br.get(Sr);mn(qn),cr(),zn.current=(0,nn.Z)(function(){er.current===qn&&ii.focus()})}};if([un,Gt].includes(In)||ar.sibling||!Br){var En;!Br||$e==="inline"?En=Ot.current:En=ve(Br);var gr,nr=oe(En,Gn);In===un?gr=nr[0]:In===Gt?gr=nr[nr.length-1]:gr=de(En,Gn,Br,ar.offset),kn(gr)}else if(ar.inlineTrigger)xn(Gr);else if(ar.offset>0)xn(Gr,!0),cr(),zn.current=(0,nn.Z)(function(){tr=fe(fr,zt);var pr=Br.getAttribute("aria-controls"),Sr=document.getElementById(pr),ii=de(Sr,tr.elements);kn(ii)},5);else if(ar.offset<0){var Er=Zt(Gr,!0),Lr=Er[Er.length-2],Ir=Xn.get(Lr);xn(Lr,!1),kn(Ir)}}Ln==null||Ln(Un)}}function Ie($e){Promise.resolve().then($e)}var ot="__RC_UTIL_PATH_SPLIT__",Kt=function(xt){return xt.join(ot)},Ft=function(xt){return xt.split(ot)},Xt="rc-menu-more";function Qt(){var $e=We.useState({}),xt=(0,xe.Z)($e,2),St=xt[1],zt=(0,We.useRef)(new Map),Ot=(0,We.useRef)(new Map),Ht=We.useState([]),Zt=(0,xe.Z)(Ht,2),mn=Zt[0],xn=Zt[1],Ln=(0,We.useRef)(0),zn=(0,We.useRef)(!1),er=function(){zn.current||St({})},cr=(0,We.useCallback)(function(Xn,br){var ur=Kt(br);Ot.current.set(ur,Xn),zt.current.set(Xn,ur),Ln.current+=1;var Br=Ln.current;Ie(function(){Br===Ln.current&&er()})},[]),Un=(0,We.useCallback)(function(Xn,br){var ur=Kt(br);Ot.current.delete(ur),zt.current.delete(Xn)},[]),In=(0,We.useCallback)(function(Xn){xn(Xn)},[]),fr=(0,We.useCallback)(function(Xn,br){var ur=zt.current.get(Xn)||"",Br=Ft(ur);return br&&mn.includes(Br[0])&&Br.unshift(Xt),Br},[mn]),tr=(0,We.useCallback)(function(Xn,br){return Xn.some(function(ur){var Br=fr(ur,!0);return Br.includes(br)})},[fr]),yr=function(){var br=(0,tt.Z)(zt.current.keys());return mn.length&&br.push(Xt),br},Gn=(0,We.useCallback)(function(Xn){var br="".concat(zt.current.get(Xn)).concat(ot),ur=new Set;return(0,tt.Z)(Ot.current.keys()).forEach(function(Br){Br.startsWith(br)&&ur.add(Ot.current.get(Br))}),ur},[]);return We.useEffect(function(){return function(){zn.current=!0}},[]),{registerPath:cr,unregisterPath:Un,refreshOverflowKeys:In,isSubPathKey:tr,getKeyPath:fr,getKeys:yr,getSubPathKeys:Gn}}function on($e){var xt=We.useRef($e);xt.current=$e;var St=We.useCallback(function(){for(var zt,Ot=arguments.length,Ht=new Array(Ot),Zt=0;Zt<Ot;Zt++)Ht[Zt]=arguments[Zt];return(zt=xt.current)===null||zt===void 0?void 0:zt.call.apply(zt,[xt].concat(Ht))},[]);return $e?St:void 0}var pn=Math.random().toFixed(5).toString().slice(2),Cn=0;function bt($e){var xt=(0,Ke.Z)($e,{value:$e}),St=(0,xe.Z)(xt,2),zt=St[0],Ot=St[1];return We.useEffect(function(){Cn+=1;var Ht="".concat(pn,"-").concat(Cn);Ot("rc-menu-uuid-".concat(Ht))},[]),zt}var hn=ue(67732),On=ue(83652),rt=ue(42403),ze=ue(158),Xe=ue(2738),jt=ue(8654);function tn($e,xt,St,zt){var Ot=We.useContext(it),Ht=Ot.activeKey,Zt=Ot.onActive,mn=Ot.onInactive,xn={active:Ht===$e};return xt||(xn.onMouseEnter=function(Ln){St==null||St({key:$e,domEvent:Ln}),Zt($e)},xn.onMouseLeave=function(Ln){zt==null||zt({key:$e,domEvent:Ln}),mn($e)}),xn}function cn($e){var xt=We.useContext(it),St=xt.mode,zt=xt.rtl,Ot=xt.inlineIndent;if(St!=="inline")return null;var Ht=$e;return zt?{paddingRight:Ht*Ot}:{paddingLeft:Ht*Ot}}function Dn($e){var xt=$e.icon,St=$e.props,zt=$e.children,Ot;return xt===null||xt===!1?null:(typeof xt=="function"?Ot=We.createElement(xt,(0,Fe.Z)({},St)):typeof xt!="boolean"&&(Ot=xt),Ot||zt||null)}var Tn=["item"];function _n($e){var xt=$e.item,St=(0,_e.Z)($e,Tn);return Object.defineProperty(St,"item",{get:function(){return(0,De.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),xt}}),St}var Fn=["title","attribute","elementRef"],jn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],An=["active"],hr=function($e){(0,rt.Z)(St,$e);var xt=(0,ze.Z)(St);function St(){return(0,hn.Z)(this,St),xt.apply(this,arguments)}return(0,On.Z)(St,[{key:"render",value:function(){var Ot=this.props,Ht=Ot.title,Zt=Ot.attribute,mn=Ot.elementRef,xn=(0,_e.Z)(Ot,Fn),Ln=(0,Xe.Z)(xn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,De.ZP)(!Zt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),We.createElement(Me.Z.Item,(0,pe.Z)({},Zt,{title:typeof Ht=="string"?Ht:void 0},Ln,{ref:mn}))}}]),St}(We.Component),kr=We.forwardRef(function($e,xt){var St,zt=$e.style,Ot=$e.className,Ht=$e.eventKey,Zt=$e.warnKey,mn=$e.disabled,xn=$e.itemIcon,Ln=$e.children,zn=$e.role,er=$e.onMouseEnter,cr=$e.onMouseLeave,Un=$e.onClick,In=$e.onKeyDown,fr=$e.onFocus,tr=(0,_e.Z)($e,jn),yr=st(Ht),Gn=We.useContext(it),Xn=Gn.prefixCls,br=Gn.onItemClick,ur=Gn.disabled,Br=Gn.overflowDisabled,Gr=Gn.itemIcon,ar=Gn.selectedKeys,kn=Gn.onActive,En=We.useContext(kt),gr=En._internalRenderMenuItem,nr="".concat(Xn,"-item"),Er=We.useRef(),Lr=We.useRef(),Ir=ur||mn,pr=(0,jt.x1)(xt,Lr),Sr=Ge(Ht),ii=function(Zn){return{key:Ht,keyPath:(0,tt.Z)(Sr).reverse(),item:Er.current,domEvent:Zn}},Hn=xn||Gr,qn=tn(Ht,Ir,er,cr),Dr=qn.active,$r=(0,_e.Z)(qn,An),li=ar.includes(Ht),di=cn(Sr.length),ri=function(Zn){if(!Ir){var mr=ii(Zn);Un==null||Un(_n(mr)),br(mr)}},Jr=function(Zn){if(In==null||In(Zn),Zn.which===ht.Z.ENTER){var mr=ii(Zn);Un==null||Un(_n(mr)),br(mr)}},yi=function(Zn){kn(Ht),fr==null||fr(Zn)},bi={};$e.role==="option"&&(bi["aria-selected"]=li);var Yn=We.createElement(hr,(0,pe.Z)({ref:Er,elementRef:pr,role:zn===null?"none":zn||"menuitem",tabIndex:mn?null:-1,"data-menu-id":Br&&yr?null:yr},tr,$r,bi,{component:"li","aria-disabled":mn,style:(0,Fe.Z)((0,Fe.Z)({},di),zt),className:Se()(nr,(St={},(0,je.Z)(St,"".concat(nr,"-active"),Dr),(0,je.Z)(St,"".concat(nr,"-selected"),li),(0,je.Z)(St,"".concat(nr,"-disabled"),Ir),St),Ot),onClick:ri,onKeyDown:Jr,onFocus:yi}),Ln,We.createElement(Dn,{props:(0,Fe.Z)((0,Fe.Z)({},$e),{},{isSelected:li}),icon:Hn}));return gr&&(Yn=gr(Yn,$e,{selected:li})),Yn});function Tr($e,xt){var St=$e.eventKey,zt=Ue(),Ot=Ge(St);return We.useEffect(function(){if(zt)return zt.registerPath(St,Ot),function(){zt.unregisterPath(St,Ot)}},[Ot]),zt?null:We.createElement(kr,(0,pe.Z)({},$e,{ref:xt}))}var Hr=We.forwardRef(Tr),sr=["className","children"],Mr=function(xt,St){var zt=xt.className,Ot=xt.children,Ht=(0,_e.Z)(xt,sr),Zt=We.useContext(it),mn=Zt.prefixCls,xn=Zt.mode,Ln=Zt.rtl;return We.createElement("ul",(0,pe.Z)({className:Se()(mn,Ln&&"".concat(mn,"-rtl"),"".concat(mn,"-sub"),"".concat(mn,"-").concat(xn==="inline"?"inline":"vertical"),zt),role:"menu"},Ht,{"data-menu-list":!0,ref:St}),Ot)},rr=We.forwardRef(Mr);rr.displayName="SubMenuList";var Or=rr,Fr=ue(11592);function _r($e,xt){return(0,Fr.Z)($e).map(function(St,zt){if(We.isValidElement(St)){var Ot,Ht,Zt=St.key,mn=(Ot=(Ht=St.props)===null||Ht===void 0?void 0:Ht.eventKey)!==null&&Ot!==void 0?Ot:Zt,xn=mn==null;xn&&(mn="tmp_key-".concat([].concat((0,tt.Z)(xt),[zt]).join("-")));var Ln={key:mn,eventKey:mn};return We.cloneElement(St,Ln)}return St})}var jr=ue(35593),Nr={adjustX:1,adjustY:1},Jn={topLeft:{points:["bl","tl"],overflow:Nr},topRight:{points:["br","tr"],overflow:Nr},bottomLeft:{points:["tl","bl"],overflow:Nr},bottomRight:{points:["tr","br"],overflow:Nr},leftTop:{points:["tr","tl"],overflow:Nr},leftBottom:{points:["br","bl"],overflow:Nr},rightTop:{points:["tl","tr"],overflow:Nr},rightBottom:{points:["bl","br"],overflow:Nr}},lr={topLeft:{points:["bl","tl"],overflow:Nr},topRight:{points:["br","tr"],overflow:Nr},bottomLeft:{points:["tl","bl"],overflow:Nr},bottomRight:{points:["tr","br"],overflow:Nr},rightTop:{points:["tr","tl"],overflow:Nr},rightBottom:{points:["br","bl"],overflow:Nr},leftTop:{points:["tl","tr"],overflow:Nr},leftBottom:{points:["bl","br"],overflow:Nr}},Rn=null;function $n($e,xt,St){if(xt)return xt;if(St)return St[$e]||St.other}var wr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function lt($e){var xt=$e.prefixCls,St=$e.visible,zt=$e.children,Ot=$e.popup,Ht=$e.popupStyle,Zt=$e.popupClassName,mn=$e.popupOffset,xn=$e.disabled,Ln=$e.mode,zn=$e.onVisibleChange,er=We.useContext(it),cr=er.getPopupContainer,Un=er.rtl,In=er.subMenuOpenDelay,fr=er.subMenuCloseDelay,tr=er.builtinPlacements,yr=er.triggerSubMenuAction,Gn=er.forceSubMenuRender,Xn=er.rootClassName,br=er.motion,ur=er.defaultMotions,Br=We.useState(!1),Gr=(0,xe.Z)(Br,2),ar=Gr[0],kn=Gr[1],En=Un?(0,Fe.Z)((0,Fe.Z)({},lr),tr):(0,Fe.Z)((0,Fe.Z)({},Jn),tr),gr=wr[Ln],nr=$n(Ln,br,ur),Er=We.useRef(nr);Ln!=="inline"&&(Er.current=nr);var Lr=(0,Fe.Z)((0,Fe.Z)({},Er.current),{},{leavedClassName:"".concat(xt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Ir=We.useRef();return We.useEffect(function(){return Ir.current=(0,nn.Z)(function(){kn(St)}),function(){nn.Z.cancel(Ir.current)}},[St]),We.createElement(jr.Z,{prefixCls:xt,popupClassName:Se()("".concat(xt,"-popup"),(0,je.Z)({},"".concat(xt,"-rtl"),Un),Zt,Xn),stretch:Ln==="horizontal"?"minWidth":null,getPopupContainer:cr,builtinPlacements:En,popupPlacement:gr,popupVisible:ar,popup:Ot,popupStyle:Ht,popupAlign:mn&&{offset:mn},action:xn?[]:[yr],mouseEnterDelay:In,mouseLeaveDelay:fr,onPopupVisibleChange:zn,forceRender:Gn,popupMotion:Lr,fresh:!0},zt)}var ke=ue(77900);function Oe($e){var xt=$e.id,St=$e.open,zt=$e.keyPath,Ot=$e.children,Ht="inline",Zt=We.useContext(it),mn=Zt.prefixCls,xn=Zt.forceSubMenuRender,Ln=Zt.motion,zn=Zt.defaultMotions,er=Zt.mode,cr=We.useRef(!1);cr.current=er===Ht;var Un=We.useState(!cr.current),In=(0,xe.Z)(Un,2),fr=In[0],tr=In[1],yr=cr.current?St:!1;We.useEffect(function(){cr.current&&tr(!1)},[er]);var Gn=(0,Fe.Z)({},$n(Ht,Ln,zn));zt.length>1&&(Gn.motionAppear=!1);var Xn=Gn.onVisibleChanged;return Gn.onVisibleChanged=function(br){return!cr.current&&!br&&tr(!0),Xn==null?void 0:Xn(br)},fr?null:We.createElement(Ze,{mode:Ht,locked:!cr.current},We.createElement(ke.default,(0,pe.Z)({visible:yr},Gn,{forceRender:xn,removeOnLeave:!1,leavedClassName:"".concat(mn,"-hidden")}),function(br){var ur=br.className,Br=br.style;return We.createElement(Or,{id:xt,className:ur,style:Br},Ot)}))}var Te=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Pe=["active"],Qe=function(xt){var St,zt=xt.style,Ot=xt.className,Ht=xt.title,Zt=xt.eventKey,mn=xt.warnKey,xn=xt.disabled,Ln=xt.internalPopupClose,zn=xt.children,er=xt.itemIcon,cr=xt.expandIcon,Un=xt.popupClassName,In=xt.popupOffset,fr=xt.popupStyle,tr=xt.onClick,yr=xt.onMouseEnter,Gn=xt.onMouseLeave,Xn=xt.onTitleClick,br=xt.onTitleMouseEnter,ur=xt.onTitleMouseLeave,Br=(0,_e.Z)(xt,Te),Gr=st(Zt),ar=We.useContext(it),kn=ar.prefixCls,En=ar.mode,gr=ar.openKeys,nr=ar.disabled,Er=ar.overflowDisabled,Lr=ar.activeKey,Ir=ar.selectedKeys,pr=ar.itemIcon,Sr=ar.expandIcon,ii=ar.onItemClick,Hn=ar.onOpenChange,qn=ar.onActive,Dr=We.useContext(kt),$r=Dr._internalRenderSubMenuItem,li=We.useContext(It),di=li.isSubPathKey,ri=Ge(),Jr="".concat(kn,"-submenu"),yi=nr||xn,bi=We.useRef(),Yn=We.useRef(),Vn=er!=null?er:pr,Zn=cr!=null?cr:Sr,mr=gr.includes(Zt),ni=!Er&&mr,xi=di(Ir,Zt),Mi=tn(Zt,yi,br,ur),gi=Mi.active,ci=(0,_e.Z)(Mi,Pe),ki=We.useState(!1),Hi=(0,xe.Z)(ki,2),Ni=Hi[0],oa=Hi[1],Xr=function(Zi){yi||oa(Zi)},ei=function(Zi){Xr(!0),yr==null||yr({key:Zt,domEvent:Zi})},Ai=function(Zi){Xr(!1),Gn==null||Gn({key:Zt,domEvent:Zi})},ai=We.useMemo(function(){return gi||(En!=="inline"?Ni||di([Lr],Zt):!1)},[En,gi,Lr,Ni,Zt,di]),fi=cn(ri.length),Ei=function(Zi){yi||(Xn==null||Xn({key:Zt,domEvent:Zi}),En==="inline"&&Hn(Zt,!mr))},pi=on(function(Wi){tr==null||tr(_n(Wi)),ii(Wi)}),Pr=function(Zi){En!=="inline"&&Hn(Zt,Zi)},Yr=function(){qn(Zt)},Ur=Gr&&"".concat(Gr,"-popup"),zr=We.createElement("div",(0,pe.Z)({role:"menuitem",style:fi,className:"".concat(Jr,"-title"),tabIndex:yi?null:-1,ref:bi,title:typeof Ht=="string"?Ht:null,"data-menu-id":Er&&Gr?null:Gr,"aria-expanded":ni,"aria-haspopup":!0,"aria-controls":Ur,"aria-disabled":yi,onClick:Ei,onFocus:Yr},ci),Ht,We.createElement(Dn,{icon:En!=="horizontal"?Zn:void 0,props:(0,Fe.Z)((0,Fe.Z)({},xt),{},{isOpen:ni,isSubMenu:!0})},We.createElement("i",{className:"".concat(Jr,"-arrow")}))),ui=We.useRef(En);if(En!=="inline"&&ri.length>1?ui.current="vertical":ui.current=En,!Er){var oi=ui.current;zr=We.createElement(lt,{mode:oi,prefixCls:Jr,visible:!Ln&&ni&&En!=="inline",popupClassName:Un,popupOffset:In,popupStyle:fr,popup:We.createElement(Ze,{mode:oi==="horizontal"?"vertical":oi},We.createElement(Or,{id:Ur,ref:Yn},zn)),disabled:yi,onVisibleChange:Pr},zr)}var zi=We.createElement(Me.Z.Item,(0,pe.Z)({role:"none"},Br,{component:"li",style:zt,className:Se()(Jr,"".concat(Jr,"-").concat(En),Ot,(St={},(0,je.Z)(St,"".concat(Jr,"-open"),ni),(0,je.Z)(St,"".concat(Jr,"-active"),ai),(0,je.Z)(St,"".concat(Jr,"-selected"),xi),(0,je.Z)(St,"".concat(Jr,"-disabled"),yi),St)),onMouseEnter:ei,onMouseLeave:Ai}),zr,!Er&&We.createElement(Oe,{id:Ur,open:ni,keyPath:ri},zn));return $r&&(zi=$r(zi,xt,{selected:xi,active:ai,open:ni,disabled:yi})),We.createElement(Ze,{onItemClick:pi,mode:En==="horizontal"?"vertical":En,itemIcon:Vn,expandIcon:Zn},zi)};function pt($e){var xt=$e.eventKey,St=$e.children,zt=Ge(xt),Ot=_r(St,zt),Ht=Ue();We.useEffect(function(){if(Ht)return Ht.registerPath(xt,zt),function(){Ht.unregisterPath(xt,zt)}},[zt]);var Zt;return Ht?Zt=Ot:Zt=We.createElement(Qe,$e,Ot),We.createElement(Ct.Provider,{value:zt},Zt)}var Yt=ue(76190),$t=["className","title","eventKey","children"],qt=["children"],vn=function(xt){var St=xt.className,zt=xt.title,Ot=xt.eventKey,Ht=xt.children,Zt=(0,_e.Z)(xt,$t),mn=We.useContext(it),xn=mn.prefixCls,Ln="".concat(xn,"-item-group");return We.createElement("li",(0,pe.Z)({role:"presentation"},Zt,{onClick:function(er){return er.stopPropagation()},className:Se()(Ln,St)}),We.createElement("div",{role:"presentation",className:"".concat(Ln,"-title"),title:typeof zt=="string"?zt:void 0},zt),We.createElement("ul",{role:"group",className:"".concat(Ln,"-list")},Ht))};function wn($e){var xt=$e.children,St=(0,_e.Z)($e,qt),zt=Ge(St.eventKey),Ot=_r(xt,zt),Ht=Ue();return Ht?Ot:We.createElement(vn,(0,Xe.Z)(St,["warnKey"]),Ot)}function Sn($e){var xt=$e.className,St=$e.style,zt=We.useContext(it),Ot=zt.prefixCls,Ht=Ue();return Ht?null:We.createElement("li",{role:"separator",className:Se()("".concat(Ot,"-item-divider"),xt),style:St})}var Bt=["label","children","key","type"];function dn($e){return($e||[]).map(function(xt,St){if(xt&&(0,Yt.Z)(xt)==="object"){var zt=xt,Ot=zt.label,Ht=zt.children,Zt=zt.key,mn=zt.type,xn=(0,_e.Z)(zt,Bt),Ln=Zt!=null?Zt:"tmp-".concat(St);return Ht||mn==="group"?mn==="group"?We.createElement(wn,(0,pe.Z)({key:Ln},xn,{title:Ot}),dn(Ht)):We.createElement(pt,(0,pe.Z)({key:Ln},xn,{title:Ot}),dn(Ht)):mn==="divider"?We.createElement(Sn,(0,pe.Z)({key:Ln},xn)):We.createElement(Hr,(0,pe.Z)({key:Ln},xn),Ot)}return null}).filter(function(xt){return xt})}function at($e,xt,St){var zt=$e;return xt&&(zt=dn(xt)),_r(zt,St)}var Mt=["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"],Pt=[],Rt=We.forwardRef(function($e,xt){var St,zt,Ot=$e,Ht=Ot.prefixCls,Zt=Ht===void 0?"rc-menu":Ht,mn=Ot.rootClassName,xn=Ot.style,Ln=Ot.className,zn=Ot.tabIndex,er=zn===void 0?0:zn,cr=Ot.items,Un=Ot.children,In=Ot.direction,fr=Ot.id,tr=Ot.mode,yr=tr===void 0?"vertical":tr,Gn=Ot.inlineCollapsed,Xn=Ot.disabled,br=Ot.disabledOverflow,ur=Ot.subMenuOpenDelay,Br=ur===void 0?.1:ur,Gr=Ot.subMenuCloseDelay,ar=Gr===void 0?.1:Gr,kn=Ot.forceSubMenuRender,En=Ot.defaultOpenKeys,gr=Ot.openKeys,nr=Ot.activeKey,Er=Ot.defaultActiveFirst,Lr=Ot.selectable,Ir=Lr===void 0?!0:Lr,pr=Ot.multiple,Sr=pr===void 0?!1:pr,ii=Ot.defaultSelectedKeys,Hn=Ot.selectedKeys,qn=Ot.onSelect,Dr=Ot.onDeselect,$r=Ot.inlineIndent,li=$r===void 0?24:$r,di=Ot.motion,ri=Ot.defaultMotions,Jr=Ot.triggerSubMenuAction,yi=Jr===void 0?"hover":Jr,bi=Ot.builtinPlacements,Yn=Ot.itemIcon,Vn=Ot.expandIcon,Zn=Ot.overflowedIndicator,mr=Zn===void 0?"...":Zn,ni=Ot.overflowedIndicatorPopupClassName,xi=Ot.getPopupContainer,Mi=Ot.onClick,gi=Ot.onOpenChange,ci=Ot.onKeyDown,ki=Ot.openAnimation,Hi=Ot.openTransitionName,Ni=Ot._internalRenderMenuItem,oa=Ot._internalRenderSubMenuItem,Xr=(0,_e.Z)(Ot,Mt),ei=We.useMemo(function(){return at(Un,cr,Pt)},[Un,cr]),Ai=We.useState(!1),ai=(0,xe.Z)(Ai,2),fi=ai[0],Ei=ai[1],pi=We.useRef(),Pr=bt(fr),Yr=In==="rtl",Ur=(0,Ke.Z)(En,{value:gr,postState:function(Bi){return Bi||Pt}}),zr=(0,xe.Z)(Ur,2),ui=zr[0],oi=zr[1],zi=function(Bi){var ji=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ya(){oi(Bi),gi==null||gi(Bi)}ji?(0,vt.flushSync)(Ya):Ya()},Wi=We.useState(ui),Zi=(0,xe.Z)(Wi,2),na=Zi[0],wi=Zi[1],vi=We.useRef(!1),Gi=We.useMemo(function(){return(yr==="inline"||yr==="vertical")&&Gn?["vertical",Gn]:[yr,!1]},[yr,Gn]),ca=(0,xe.Z)(Gi,2),sa=ca[0],ta=ca[1],ts=sa==="inline",ao=We.useState(sa),oo=(0,xe.Z)(ao,2),eo=oo[0],Ss=oo[1],fo=We.useState(ta),_a=(0,xe.Z)(fo,2),fa=_a[0],bo=_a[1];We.useEffect(function(){Ss(sa),bo(ta),vi.current&&(ts?oi(na):zi(Pt))},[sa,ta]);var ko=We.useState(0),_o=(0,xe.Z)(ko,2),ns=_o[0],$o=_o[1],Xa=ns>=ei.length-1||eo!=="horizontal"||br;We.useEffect(function(){ts&&wi(ui)},[ui]),We.useEffect(function(){return vi.current=!0,function(){vi.current=!1}},[]);var Oa=Qt(),Oi=Oa.registerPath,Lo=Oa.unregisterPath,rs=Oa.refreshOverflowKeys,Do=Oa.isSubPathKey,_i=Oa.getKeyPath,mi=Oa.getKeys,Ki=Oa.getSubPathKeys,La=We.useMemo(function(){return{registerPath:Oi,unregisterPath:Lo}},[Oi,Lo]),Xi=We.useMemo(function(){return{isSubPathKey:Do}},[Do]);We.useEffect(function(){rs(Xa?Pt:ei.slice(ns+1).map(function(Ii){return Ii.key}))},[ns,Xa]);var $a=(0,Ke.Z)(nr||Er&&((St=ei[0])===null||St===void 0?void 0:St.key),{value:nr}),Fa=(0,xe.Z)($a,2),to=Fa[0],Ra=Fa[1],so=on(function(Ii){Ra(Ii)}),lo=on(function(){Ra(void 0)});(0,We.useImperativeHandle)(xt,function(){return{list:pi.current,focus:function(Bi){var ji,Ya=mi(),Aa=fe(Ya,Pr),xo=Aa.elements,po=Aa.key2element,za=Aa.element2key,Ao=oe(pi.current,xo),To=to!=null?to:Ao[0]?za.get(Ao[0]):(ji=ei.find(function(Wl){return!Wl.props.disabled}))===null||ji===void 0?void 0:ji.key,wo=po.get(To);if(To&&wo){var os;wo==null||(os=wo.focus)===null||os===void 0||os.call(wo,Bi)}}}});var Da=(0,Ke.Z)(ii||[],{value:Hn,postState:function(Bi){return Array.isArray(Bi)?Bi:Bi==null?Pt:[Bi]}}),bl=(0,xe.Z)(Da,2),jo=bl[0],Js=bl[1],Kl=function(Bi){if(Ir){var ji=Bi.key,Ya=jo.includes(ji),Aa;Sr?Ya?Aa=jo.filter(function(po){return po!==ji}):Aa=[].concat((0,tt.Z)(jo),[ji]):Aa=[ji],Js(Aa);var xo=(0,Fe.Z)((0,Fe.Z)({},Bi),{},{selectedKeys:Aa});Ya?Dr==null||Dr(xo):qn==null||qn(xo)}!Sr&&ui.length&&eo!=="inline"&&zi(Pt)},Hl=on(function(Ii){Mi==null||Mi(_n(Ii)),Kl(Ii)}),Cs=on(function(Ii,Bi){var ji=ui.filter(function(Aa){return Aa!==Ii});if(Bi)ji.push(Ii);else if(eo!=="inline"){var Ya=Ki(Ii);ji=ji.filter(function(Aa){return!Ya.has(Aa)})}(0,ct.Z)(ui,ji,!0)||zi(ji,!0)}),Ec=function(Bi,ji){var Ya=ji!=null?ji:!ui.includes(Bi);Cs(Bi,Ya)},is=le(eo,to,Yr,Pr,pi,mi,_i,Ra,Ec,ci);We.useEffect(function(){Ei(!0)},[]);var xl=We.useMemo(function(){return{_internalRenderMenuItem:Ni,_internalRenderSubMenuItem:oa}},[Ni,oa]),Vo=eo!=="horizontal"||br?ei:ei.map(function(Ii,Bi){return We.createElement(Ze,{key:Ii.key,overflowDisabled:Bi>ns},Ii)}),as=We.createElement(Me.Z,(0,pe.Z)({id:fr,ref:pi,prefixCls:"".concat(Zt,"-overflow"),component:"ul",itemComponent:Hr,className:Se()(Zt,"".concat(Zt,"-root"),"".concat(Zt,"-").concat(eo),Ln,(zt={},(0,je.Z)(zt,"".concat(Zt,"-inline-collapsed"),fa),(0,je.Z)(zt,"".concat(Zt,"-rtl"),Yr),zt),mn),dir:In,style:xn,role:"menu",tabIndex:er,data:Vo,renderRawItem:function(Bi){return Bi},renderRawRest:function(Bi){var ji=Bi.length,Ya=ji?ei.slice(-ji):null;return We.createElement(pt,{eventKey:Xt,title:mr,disabled:Xa,internalPopupClose:ji===0,popupClassName:ni},Ya)},maxCount:eo!=="horizontal"||br?Me.Z.INVALIDATE:Me.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Bi){$o(Bi)},onKeyDown:is},Xr));return We.createElement(kt.Provider,{value:xl},We.createElement(nt.Provider,{value:Pr},We.createElement(Ze,{prefixCls:Zt,rootClassName:mn,mode:eo,openKeys:ui,rtl:Yr,disabled:Xn,motion:fi?di:null,defaultMotions:fi?ri:null,activeKey:to,onActive:so,onInactive:lo,selectedKeys:jo,inlineIndent:li,subMenuOpenDelay:Br,subMenuCloseDelay:ar,forceSubMenuRender:kn,builtinPlacements:bi,triggerSubMenuAction:yi,getPopupContainer:xi,itemIcon:Yn,expandIcon:Vn,onItemClick:Hl,onOpenChange:Cs},We.createElement(It.Provider,{value:Xi},as),We.createElement("div",{style:{display:"none"},"aria-hidden":!0},We.createElement(He.Provider,{value:La},ei)))))}),an=Rt,Tt=an;Tt.Item=Hr,Tt.SubMenu=pt,Tt.ItemGroup=wn,Tt.Divider=Sn;var rn=Tt},83836:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Et}});var pe=ue(54476),je=ue(33885),Fe=ue(42978),tt=ue(75931),xe=ue(59301),_e=ue(92310),Ae=ue.n(_e),Se=ue(29301),Me=ue(34280),Ke=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ct=void 0;function De(ut,Be){var be=ut.prefixCls,ht=ut.invalidate,nn=ut.item,Wt=ut.renderItem,Ve=ut.responsive,Ye=ut.responsiveDisabled,At=ut.registerSize,gn=ut.itemKey,Jt=ut.className,un=ut.style,Gt=ut.children,Vt=ut.display,Nt=ut.order,ve=ut.component,se=ve===void 0?"div":ve,oe=(0,tt.Z)(ut,Ke),de=Ve&&!Vt;function fe(Ft){At(gn,Ft)}xe.useEffect(function(){return function(){fe(null)}},[]);var le=Wt&&nn!==ct?Wt(nn,{index:Nt}):Gt,Ie;ht||(Ie={opacity:de?0:1,height:de?0:ct,overflowY:de?"hidden":ct,order:Ve?Nt:ct,pointerEvents:de?"none":ct,position:de?"absolute":ct});var ot={};de&&(ot["aria-hidden"]=!0);var Kt=xe.createElement(se,(0,pe.Z)({className:Ae()(!ht&&be,Jt),style:(0,je.Z)((0,je.Z)({},Ie),un)},ot,oe,{ref:Be}),le);return Ve&&(Kt=xe.createElement(Se.Z,{onResize:function(Xt){var Qt=Xt.offsetWidth;fe(Qt)},disabled:Ye},Kt)),Kt}var We=xe.forwardRef(De);We.displayName="Item";var vt=We,nt=ue(6089),dt=ue(4676),st=ue(16089);function wt(ut){if(typeof MessageChannel=="undefined")(0,st.Z)(ut);else{var Be=new MessageChannel;Be.port1.onmessage=function(){return ut()},Be.port2.postMessage(void 0)}}function en(){var ut=xe.useRef(null),Be=function(ht){ut.current||(ut.current=[],wt(function(){(0,dt.unstable_batchedUpdates)(function(){ut.current.forEach(function(nn){nn()}),ut.current=null})})),ut.current.push(ht)};return Be}function it(ut,Be){var be=xe.useState(Be),ht=(0,Fe.Z)(be,2),nn=ht[0],Wt=ht[1],Ve=(0,nt.Z)(function(Ye){ut(function(){Wt(Ye)})});return[nn,Ve]}var mt=xe.createContext(null),Ze=["component"],Ee=["className"],He=["className"],Ue=function(Be,be){var ht=xe.useContext(mt);if(!ht){var nn=Be.component,Wt=nn===void 0?"div":nn,Ve=(0,tt.Z)(Be,Ze);return xe.createElement(Wt,(0,pe.Z)({},Ve,{ref:be}))}var Ye=ht.className,At=(0,tt.Z)(ht,Ee),gn=Be.className,Jt=(0,tt.Z)(Be,He);return xe.createElement(mt.Provider,{value:null},xe.createElement(vt,(0,pe.Z)({ref:be,className:Ae()(Ye,gn)},At,Jt)))},Ct=xe.forwardRef(Ue);Ct.displayName="RawItem";var Ge=Ct,It=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],et="responsive",kt="invalidate";function Je(ut){return"+ ".concat(ut.length," ...")}function Ut(ut,Be){var be=ut.prefixCls,ht=be===void 0?"rc-overflow":be,nn=ut.data,Wt=nn===void 0?[]:nn,Ve=ut.renderItem,Ye=ut.renderRawItem,At=ut.itemKey,gn=ut.itemWidth,Jt=gn===void 0?10:gn,un=ut.ssr,Gt=ut.style,Vt=ut.className,Nt=ut.maxCount,ve=ut.renderRest,se=ut.renderRawRest,oe=ut.prefix,de=ut.suffix,fe=ut.component,le=fe===void 0?"div":fe,Ie=ut.itemComponent,ot=ut.onVisibleChange,Kt=(0,tt.Z)(ut,It),Ft=un==="full",Xt=en(),Qt=it(Xt,null),on=(0,Fe.Z)(Qt,2),pn=on[0],Cn=on[1],bt=pn||0,hn=it(Xt,new Map),On=(0,Fe.Z)(hn,2),rt=On[0],ze=On[1],Xe=it(Xt,0),jt=(0,Fe.Z)(Xe,2),tn=jt[0],cn=jt[1],Dn=it(Xt,0),Tn=(0,Fe.Z)(Dn,2),_n=Tn[0],Fn=Tn[1],jn=it(Xt,0),An=(0,Fe.Z)(jn,2),hr=An[0],kr=An[1],Tr=it(Xt,0),Hr=(0,Fe.Z)(Tr,2),sr=Hr[0],Mr=Hr[1],rr=(0,xe.useState)(null),Or=(0,Fe.Z)(rr,2),Fr=Or[0],_r=Or[1],jr=(0,xe.useState)(null),Nr=(0,Fe.Z)(jr,2),Jn=Nr[0],lr=Nr[1],Rn=xe.useMemo(function(){return Jn===null&&Ft?Number.MAX_SAFE_INTEGER:Jn||0},[Jn,pn]),$n=(0,xe.useState)(!1),wr=(0,Fe.Z)($n,2),lt=wr[0],ke=wr[1],Oe="".concat(ht,"-item"),Te=Math.max(tn,_n),Pe=Nt===et,Qe=Wt.length&&Pe,pt=Nt===kt,Yt=Qe||typeof Nt=="number"&&Wt.length>Nt,$t=(0,xe.useMemo)(function(){var Ht=Wt;return Qe?pn===null&&Ft?Ht=Wt:Ht=Wt.slice(0,Math.min(Wt.length,bt/Jt)):typeof Nt=="number"&&(Ht=Wt.slice(0,Nt)),Ht},[Wt,Jt,pn,Nt,Qe]),qt=(0,xe.useMemo)(function(){return Qe?Wt.slice(Rn+1):Wt.slice($t.length)},[Wt,$t,Qe,Rn]),vn=(0,xe.useCallback)(function(Ht,Zt){var mn;return typeof At=="function"?At(Ht):(mn=At&&(Ht==null?void 0:Ht[At]))!==null&&mn!==void 0?mn:Zt},[At]),wn=(0,xe.useCallback)(Ve||function(Ht){return Ht},[Ve]);function Sn(Ht,Zt,mn){Jn===Ht&&(Zt===void 0||Zt===Fr)||(lr(Ht),mn||(ke(Ht<Wt.length-1),ot==null||ot(Ht)),Zt!==void 0&&_r(Zt))}function Bt(Ht,Zt){Cn(Zt.clientWidth)}function dn(Ht,Zt){ze(function(mn){var xn=new Map(mn);return Zt===null?xn.delete(Ht):xn.set(Ht,Zt),xn})}function at(Ht,Zt){Fn(Zt),cn(_n)}function Mt(Ht,Zt){kr(Zt)}function Pt(Ht,Zt){Mr(Zt)}function Rt(Ht){return rt.get(vn($t[Ht],Ht))}(0,Me.Z)(function(){if(bt&&typeof Te=="number"&&$t){var Ht=hr+sr,Zt=$t.length,mn=Zt-1;if(!Zt){Sn(0,null);return}for(var xn=0;xn<Zt;xn+=1){var Ln=Rt(xn);if(Ft&&(Ln=Ln||0),Ln===void 0){Sn(xn-1,void 0,!0);break}if(Ht+=Ln,mn===0&&Ht<=bt||xn===mn-1&&Ht+Rt(mn)<=bt){Sn(mn,null);break}else if(Ht+Te>bt){Sn(xn-1,Ht-Ln-sr+_n);break}}de&&Rt(0)+sr>bt&&_r(null)}},[bt,rt,_n,hr,sr,vn,$t]);var an=lt&&!!qt.length,Tt={};Fr!==null&&Qe&&(Tt={position:"absolute",left:Fr,top:0});var rn={prefixCls:Oe,responsive:Qe,component:Ie,invalidate:pt},$e=Ye?function(Ht,Zt){var mn=vn(Ht,Zt);return xe.createElement(mt.Provider,{key:mn,value:(0,je.Z)((0,je.Z)({},rn),{},{order:Zt,item:Ht,itemKey:mn,registerSize:dn,display:Zt<=Rn})},Ye(Ht,Zt))}:function(Ht,Zt){var mn=vn(Ht,Zt);return xe.createElement(vt,(0,pe.Z)({},rn,{order:Zt,key:mn,item:Ht,renderItem:wn,itemKey:mn,registerSize:dn,display:Zt<=Rn}))},xt={order:an?Rn:Number.MAX_SAFE_INTEGER,className:"".concat(Oe,"-rest"),registerSize:at,display:an},St=ve||Je,zt=se?xe.createElement(mt.Provider,{value:(0,je.Z)((0,je.Z)({},rn),xt)},se(qt)):xe.createElement(vt,(0,pe.Z)({},rn,xt),typeof St=="function"?St(qt):St),Ot=xe.createElement(le,(0,pe.Z)({className:Ae()(!pt&&ht,Vt),style:Gt,ref:Be},Kt),oe&&xe.createElement(vt,(0,pe.Z)({},rn,{responsive:Pe,responsiveDisabled:!Qe,order:-1,className:"".concat(Oe,"-prefix"),registerSize:Mt,display:!0}),oe),$t.map($e),Yt?zt:null,de&&xe.createElement(vt,(0,pe.Z)({},rn,{responsive:Pe,responsiveDisabled:!Qe,order:Rn,className:"".concat(Oe,"-suffix"),registerSize:Pt,display:!0,style:Tt}),de));return Pe?xe.createElement(Se.Z,{onResize:Bt,disabled:!Qe},Ot):Ot}var ft=xe.forwardRef(Ut);ft.displayName="Overflow",ft.Item=Ge,ft.RESPONSIVE=et,ft.INVALIDATE=kt;var Dt=ft,Et=Dt},17115:function(Mn,sn,ue){"use strict";ue.d(sn,{ZP:function(){return Ae}});var pe=ue(42978),je=ue(59301),Fe=ue(47273),tt=0,xe=(0,Fe.Z)();function _e(){var Se;return xe?(Se=tt,tt+=1):Se="TEST_OR_SSR",Se}function Ae(Se){var Me=je.useState(),Ke=(0,pe.Z)(Me,2),ct=Ke[0],De=Ke[1];return je.useEffect(function(){De("rc_select_".concat(_e()))},[]),Se||ct}},77861:function(Mn,sn,ue){"use strict";ue.d(sn,{Ac:function(){return pn},Xo:function(){return _n},Wx:function(){return jn},ZP:function(){return Oe},lk:function(){return mt}});var pe=ue(54476),je=ue(94480),Fe=ue(20068),tt=ue(33885),xe=ue(42978),_e=ue(75931),Ae=ue(76190),Se=ue(18929),Me=ue(48736),Ke=ue(59301),ct=ue(92310),De=ue.n(ct),We=ue(34280),vt=ue(49658),nt=ue(10228),dt=ue(8654),st=function(Pe){var Qe=Pe.className,pt=Pe.customizeIcon,Yt=Pe.customizeIconProps,$t=Pe.onMouseDown,qt=Pe.onClick,vn=Pe.children,wn;return typeof pt=="function"?wn=pt(Yt):wn=pt,Ke.createElement("span",{className:Qe,onMouseDown:function(Bt){Bt.preventDefault(),$t&&$t(Bt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:qt,"aria-hidden":!0},wn!==void 0?wn:Ke.createElement("span",{className:De()(Qe.split(/\s+/).map(function(Sn){return"".concat(Sn,"-icon")}))},vn))},wt=st;function en(Te,Pe,Qe,pt,Yt){var $t=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,qt=arguments.length>6?arguments[6]:void 0,vn=arguments.length>7?arguments[7]:void 0,wn=Ke.useMemo(function(){if((0,Ae.Z)(pt)==="object")return pt.clearIcon;if(Yt)return Yt},[pt,Yt]),Sn=Ke.useMemo(function(){return!!(!$t&&pt&&(Qe.length||qt)&&!(vn==="combobox"&&qt===""))},[pt,$t,Qe.length,qt,vn]);return{allowClear:Sn,clearIcon:Ke.createElement(wt,{className:"".concat(Te,"-clear"),onMouseDown:Pe,customizeIcon:wn},"\xD7")}}var it=Ke.createContext(null);function mt(){return Ke.useContext(it)}function Ze(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Pe=Ke.useState(!1),Qe=(0,xe.Z)(Pe,2),pt=Qe[0],Yt=Qe[1],$t=Ke.useRef(null),qt=function(){window.clearTimeout($t.current)};Ke.useEffect(function(){return qt},[]);var vn=function(Sn,Bt){qt(),$t.current=window.setTimeout(function(){Yt(Sn),Bt&&Bt()},Te)};return[pt,vn,qt]}function Ee(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Pe=Ke.useRef(null),Qe=Ke.useRef(null);Ke.useEffect(function(){return function(){window.clearTimeout(Qe.current)}},[]);function pt(Yt){(Yt||Pe.current===null)&&(Pe.current=Yt),window.clearTimeout(Qe.current),Qe.current=window.setTimeout(function(){Pe.current=null},Te)}return[function(){return Pe.current},pt]}function He(Te,Pe,Qe,pt){var Yt=Ke.useRef(null);Yt.current={open:Pe,triggerOpen:Qe,customizedTrigger:pt},Ke.useEffect(function(){function $t(qt){var vn;if(!((vn=Yt.current)!==null&&vn!==void 0&&vn.customizedTrigger)){var wn=qt.target;wn.shadowRoot&&qt.composed&&(wn=qt.composedPath()[0]||wn),Yt.current.open&&Te().filter(function(Sn){return Sn}).every(function(Sn){return!Sn.contains(wn)&&Sn!==wn})&&Yt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",$t),function(){return window.removeEventListener("mousedown",$t)}},[])}var Ue=ue(26112),Ct=ue(83836),Ge=function(Pe,Qe){var pt,Yt,$t=Pe.prefixCls,qt=Pe.id,vn=Pe.inputElement,wn=Pe.disabled,Sn=Pe.tabIndex,Bt=Pe.autoFocus,dn=Pe.autoComplete,at=Pe.editable,Mt=Pe.activeDescendantId,Pt=Pe.value,Rt=Pe.maxLength,an=Pe.onKeyDown,Tt=Pe.onMouseDown,rn=Pe.onChange,$e=Pe.onPaste,xt=Pe.onCompositionStart,St=Pe.onCompositionEnd,zt=Pe.open,Ot=Pe.attrs,Ht=vn||Ke.createElement("input",null),Zt=Ht,mn=Zt.ref,xn=Zt.props,Ln=xn.onKeyDown,zn=xn.onChange,er=xn.onMouseDown,cr=xn.onCompositionStart,Un=xn.onCompositionEnd,In=xn.style;return(0,Me.Kp)(!("maxLength"in Ht.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ht=Ke.cloneElement(Ht,(0,tt.Z)((0,tt.Z)((0,tt.Z)({type:"search"},xn),{},{id:qt,ref:(0,dt.sQ)(Qe,mn),disabled:wn,tabIndex:Sn,autoComplete:dn||"off",autoFocus:Bt,className:De()("".concat($t,"-selection-search-input"),(pt=Ht)===null||pt===void 0||(Yt=pt.props)===null||Yt===void 0?void 0:Yt.className),role:"combobox","aria-label":"Search","aria-expanded":zt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(qt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(qt,"_list"),"aria-activedescendant":zt?Mt:void 0},Ot),{},{value:at?Pt:"",maxLength:Rt,readOnly:!at,unselectable:at?null:"on",style:(0,tt.Z)((0,tt.Z)({},In),{},{opacity:at?null:0}),onKeyDown:function(tr){an(tr),Ln&&Ln(tr)},onMouseDown:function(tr){Tt(tr),er&&er(tr)},onChange:function(tr){rn(tr),zn&&zn(tr)},onCompositionStart:function(tr){xt(tr),cr&&cr(tr)},onCompositionEnd:function(tr){St(tr),Un&&Un(tr)},onPaste:$e})),Ht},It=Ke.forwardRef(Ge);It.displayName="Input";var et=It;function kt(Te){return Array.isArray(Te)?Te:Te!==void 0?[Te]:[]}var Je=typeof window!="undefined"&&window.document&&window.document.documentElement,Ut=Je;function ft(Te){return Te!=null}function Dt(Te){return!Te&&Te!==0}function Et(Te){return["string","number"].includes((0,Ae.Z)(Te))}function ut(Te){var Pe=void 0;return Te&&(Et(Te.title)?Pe=Te.title.toString():Et(Te.label)&&(Pe=Te.label.toString())),Pe}function Be(Te,Pe){Ut?Ke.useLayoutEffect(Te,Pe):Ke.useEffect(Te,Pe)}function be(Te){var Pe;return(Pe=Te.key)!==null&&Pe!==void 0?Pe:Te.value}var ht=function(Pe){Pe.preventDefault(),Pe.stopPropagation()},nn=function(Pe){var Qe=Pe.id,pt=Pe.prefixCls,Yt=Pe.values,$t=Pe.open,qt=Pe.searchValue,vn=Pe.autoClearSearchValue,wn=Pe.inputRef,Sn=Pe.placeholder,Bt=Pe.disabled,dn=Pe.mode,at=Pe.showSearch,Mt=Pe.autoFocus,Pt=Pe.autoComplete,Rt=Pe.activeDescendantId,an=Pe.tabIndex,Tt=Pe.removeIcon,rn=Pe.maxTagCount,$e=Pe.maxTagTextLength,xt=Pe.maxTagPlaceholder,St=xt===void 0?function(Lr){return"+ ".concat(Lr.length," ...")}:xt,zt=Pe.tagRender,Ot=Pe.onToggleOpen,Ht=Pe.onRemove,Zt=Pe.onInputChange,mn=Pe.onInputPaste,xn=Pe.onInputKeyDown,Ln=Pe.onInputMouseDown,zn=Pe.onInputCompositionStart,er=Pe.onInputCompositionEnd,cr=Ke.useRef(null),Un=(0,Ke.useState)(0),In=(0,xe.Z)(Un,2),fr=In[0],tr=In[1],yr=(0,Ke.useState)(!1),Gn=(0,xe.Z)(yr,2),Xn=Gn[0],br=Gn[1],ur="".concat(pt,"-selection"),Br=$t||dn==="multiple"&&vn===!1||dn==="tags"?qt:"",Gr=dn==="tags"||dn==="multiple"&&vn===!1||at&&($t||Xn);Be(function(){tr(cr.current.scrollWidth)},[Br]);function ar(Lr,Ir,pr,Sr,ii){return Ke.createElement("span",{className:De()("".concat(ur,"-item"),(0,Fe.Z)({},"".concat(ur,"-item-disabled"),pr)),title:ut(Lr)},Ke.createElement("span",{className:"".concat(ur,"-item-content")},Ir),Sr&&Ke.createElement(wt,{className:"".concat(ur,"-item-remove"),onMouseDown:ht,onClick:ii,customizeIcon:Tt},"\xD7"))}function kn(Lr,Ir,pr,Sr,ii){var Hn=function(Dr){ht(Dr),Ot(!$t)};return Ke.createElement("span",{onMouseDown:Hn},zt({label:Ir,value:Lr,disabled:pr,closable:Sr,onClose:ii}))}function En(Lr){var Ir=Lr.disabled,pr=Lr.label,Sr=Lr.value,ii=!Bt&&!Ir,Hn=pr;if(typeof $e=="number"&&(typeof pr=="string"||typeof pr=="number")){var qn=String(Hn);qn.length>$e&&(Hn="".concat(qn.slice(0,$e),"..."))}var Dr=function(li){li&&li.stopPropagation(),Ht(Lr)};return typeof zt=="function"?kn(Sr,Hn,Ir,ii,Dr):ar(Lr,Hn,Ir,ii,Dr)}function gr(Lr){var Ir=typeof St=="function"?St(Lr):St;return ar({title:Ir},Ir,!1)}var nr=Ke.createElement("div",{className:"".concat(ur,"-search"),style:{width:fr},onFocus:function(){br(!0)},onBlur:function(){br(!1)}},Ke.createElement(et,{ref:wn,open:$t,prefixCls:pt,id:Qe,inputElement:null,disabled:Bt,autoFocus:Mt,autoComplete:Pt,editable:Gr,activeDescendantId:Rt,value:Br,onKeyDown:xn,onMouseDown:Ln,onChange:Zt,onPaste:mn,onCompositionStart:zn,onCompositionEnd:er,tabIndex:an,attrs:(0,Ue.Z)(Pe,!0)}),Ke.createElement("span",{ref:cr,className:"".concat(ur,"-search-mirror"),"aria-hidden":!0},Br,"\xA0")),Er=Ke.createElement(Ct.Z,{prefixCls:"".concat(ur,"-overflow"),data:Yt,renderItem:En,renderRest:gr,suffix:nr,itemKey:be,maxCount:rn});return Ke.createElement(Ke.Fragment,null,Er,!Yt.length&&!Br&&Ke.createElement("span",{className:"".concat(ur,"-placeholder")},Sn))},Wt=nn,Ve=function(Pe){var Qe=Pe.inputElement,pt=Pe.prefixCls,Yt=Pe.id,$t=Pe.inputRef,qt=Pe.disabled,vn=Pe.autoFocus,wn=Pe.autoComplete,Sn=Pe.activeDescendantId,Bt=Pe.mode,dn=Pe.open,at=Pe.values,Mt=Pe.placeholder,Pt=Pe.tabIndex,Rt=Pe.showSearch,an=Pe.searchValue,Tt=Pe.activeValue,rn=Pe.maxLength,$e=Pe.onInputKeyDown,xt=Pe.onInputMouseDown,St=Pe.onInputChange,zt=Pe.onInputPaste,Ot=Pe.onInputCompositionStart,Ht=Pe.onInputCompositionEnd,Zt=Pe.title,mn=Ke.useState(!1),xn=(0,xe.Z)(mn,2),Ln=xn[0],zn=xn[1],er=Bt==="combobox",cr=er||Rt,Un=at[0],In=an||"";er&&Tt&&!Ln&&(In=Tt),Ke.useEffect(function(){er&&zn(!1)},[er,Tt]);var fr=Bt!=="combobox"&&!dn&&!Rt?!1:!!In,tr=Zt===void 0?ut(Un):Zt,yr=function(){if(Un)return null;var Xn=fr?{visibility:"hidden"}:void 0;return Ke.createElement("span",{className:"".concat(pt,"-selection-placeholder"),style:Xn},Mt)};return Ke.createElement(Ke.Fragment,null,Ke.createElement("span",{className:"".concat(pt,"-selection-search")},Ke.createElement(et,{ref:$t,prefixCls:pt,id:Yt,open:dn,inputElement:Qe,disabled:qt,autoFocus:vn,autoComplete:wn,editable:cr,activeDescendantId:Sn,value:In,onKeyDown:$e,onMouseDown:xt,onChange:function(Xn){zn(!0),St(Xn)},onPaste:zt,onCompositionStart:Ot,onCompositionEnd:Ht,tabIndex:Pt,attrs:(0,Ue.Z)(Pe,!0),maxLength:er?rn:void 0})),!er&&Un?Ke.createElement("span",{className:"".concat(pt,"-selection-item"),title:tr,style:fr?{visibility:"hidden"}:void 0},Un.label):null,yr())},Ye=Ve;function At(Te){return![nt.Z.ESC,nt.Z.SHIFT,nt.Z.BACKSPACE,nt.Z.TAB,nt.Z.WIN_KEY,nt.Z.ALT,nt.Z.META,nt.Z.WIN_KEY_RIGHT,nt.Z.CTRL,nt.Z.SEMICOLON,nt.Z.EQUALS,nt.Z.CAPS_LOCK,nt.Z.CONTEXT_MENU,nt.Z.F1,nt.Z.F2,nt.Z.F3,nt.Z.F4,nt.Z.F5,nt.Z.F6,nt.Z.F7,nt.Z.F8,nt.Z.F9,nt.Z.F10,nt.Z.F11,nt.Z.F12].includes(Te)}var gn=function(Pe,Qe){var pt=(0,Ke.useRef)(null),Yt=(0,Ke.useRef)(!1),$t=Pe.prefixCls,qt=Pe.open,vn=Pe.mode,wn=Pe.showSearch,Sn=Pe.tokenWithEnter,Bt=Pe.autoClearSearchValue,dn=Pe.onSearch,at=Pe.onSearchSubmit,Mt=Pe.onToggleOpen,Pt=Pe.onInputKeyDown,Rt=Pe.domRef;Ke.useImperativeHandle(Qe,function(){return{focus:function(){pt.current.focus()},blur:function(){pt.current.blur()}}});var an=Ee(0),Tt=(0,xe.Z)(an,2),rn=Tt[0],$e=Tt[1],xt=function(In){var fr=In.which;(fr===nt.Z.UP||fr===nt.Z.DOWN)&&In.preventDefault(),Pt&&Pt(In),fr===nt.Z.ENTER&&vn==="tags"&&!Yt.current&&!qt&&(at==null||at(In.target.value)),At(fr)&&Mt(!0)},St=function(){$e(!0)},zt=(0,Ke.useRef)(null),Ot=function(In){dn(In,!0,Yt.current)!==!1&&Mt(!0)},Ht=function(){Yt.current=!0},Zt=function(In){Yt.current=!1,vn!=="combobox"&&Ot(In.target.value)},mn=function(In){var fr=In.target.value;if(Sn&&zt.current&&/[\r\n]/.test(zt.current)){var tr=zt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");fr=fr.replace(tr,zt.current)}zt.current=null,Ot(fr)},xn=function(In){var fr=In.clipboardData,tr=fr.getData("text");zt.current=tr},Ln=function(In){var fr=In.target;if(fr!==pt.current){var tr=document.body.style.msTouchAction!==void 0;tr?setTimeout(function(){pt.current.focus()}):pt.current.focus()}},zn=function(In){var fr=rn();In.target!==pt.current&&!fr&&vn!=="combobox"&&In.preventDefault(),(vn!=="combobox"&&(!wn||!fr)||!qt)&&(qt&&Bt!==!1&&dn("",!0,!1),Mt())},er={inputRef:pt,onInputKeyDown:xt,onInputMouseDown:St,onInputChange:mn,onInputPaste:xn,onInputCompositionStart:Ht,onInputCompositionEnd:Zt},cr=vn==="multiple"||vn==="tags"?Ke.createElement(Wt,(0,pe.Z)({},Pe,er)):Ke.createElement(Ye,(0,pe.Z)({},Pe,er));return Ke.createElement("div",{ref:Rt,className:"".concat($t,"-selector"),onClick:Ln,onMouseDown:zn},cr)},Jt=Ke.forwardRef(gn);Jt.displayName="Selector";var un=Jt,Gt=ue(35593),Vt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Nt=function(Pe){var Qe=Pe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"}}},ve=function(Pe,Qe){var pt=Pe.prefixCls,Yt=Pe.disabled,$t=Pe.visible,qt=Pe.children,vn=Pe.popupElement,wn=Pe.animation,Sn=Pe.transitionName,Bt=Pe.dropdownStyle,dn=Pe.dropdownClassName,at=Pe.direction,Mt=at===void 0?"ltr":at,Pt=Pe.placement,Rt=Pe.builtinPlacements,an=Pe.dropdownMatchSelectWidth,Tt=Pe.dropdownRender,rn=Pe.dropdownAlign,$e=Pe.getPopupContainer,xt=Pe.empty,St=Pe.getTriggerDOMNode,zt=Pe.onPopupVisibleChange,Ot=Pe.onPopupMouseEnter,Ht=(0,_e.Z)(Pe,Vt),Zt="".concat(pt,"-dropdown"),mn=vn;Tt&&(mn=Tt(vn));var xn=Ke.useMemo(function(){return Rt||Nt(an)},[Rt,an]),Ln=wn?"".concat(Zt,"-").concat(wn):Sn,zn=typeof an=="number",er=Ke.useMemo(function(){return zn?null:an===!1?"minWidth":"width"},[an,zn]),cr=Bt;zn&&(cr=(0,tt.Z)((0,tt.Z)({},cr),{},{width:an}));var Un=Ke.useRef(null);return Ke.useImperativeHandle(Qe,function(){return{getPopupElement:function(){return Un.current}}}),Ke.createElement(Gt.Z,(0,pe.Z)({},Ht,{showAction:zt?["click"]:[],hideAction:zt?["click"]:[],popupPlacement:Pt||(Mt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:xn,prefixCls:Zt,popupTransitionName:Ln,popup:Ke.createElement("div",{ref:Un,onMouseEnter:Ot},mn),stretch:er,popupAlign:rn,popupVisible:$t,getPopupContainer:$e,popupClassName:De()(dn,(0,Fe.Z)({},"".concat(Zt,"-empty"),xt)),popupStyle:cr,getTriggerDOMNode:St,onPopupVisibleChange:zt}),qt)},se=Ke.forwardRef(ve);se.displayName="SelectTrigger";var oe=se,de=ue(66712);function fe(Te,Pe){var Qe=Te.key,pt;return"value"in Te&&(pt=Te.value),Qe!=null?Qe:pt!==void 0?pt:"rc-index-key-".concat(Pe)}function le(Te,Pe){var Qe=Te||{},pt=Qe.label,Yt=Qe.value,$t=Qe.options,qt=Qe.groupLabel,vn=pt||(Pe?"children":"label");return{label:vn,value:Yt||"value",options:$t||"options",groupLabel:qt||vn}}function Ie(Te){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qe=Pe.fieldNames,pt=Pe.childrenAsData,Yt=[],$t=le(Qe,!1),qt=$t.label,vn=$t.value,wn=$t.options,Sn=$t.groupLabel;function Bt(dn,at){dn.forEach(function(Mt){if(at||!(wn in Mt)){var Pt=Mt[vn];Yt.push({key:fe(Mt,Yt.length),groupOption:at,data:Mt,label:Mt[qt],value:Pt})}else{var Rt=Mt[Sn];Rt===void 0&&pt&&(Rt=Mt.label),Yt.push({key:fe(Mt,Yt.length),group:!0,data:Mt,label:Rt}),Bt(Mt[wn],!0)}})}return Bt(Te,!1),Yt}function ot(Te){var Pe=(0,tt.Z)({},Te);return"props"in Pe||Object.defineProperty(Pe,"props",{get:function(){return(0,Me.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Pe}}),Pe}function Kt(Te,Pe){if(!Pe||!Pe.length)return null;var Qe=!1;function pt($t,qt){var vn=(0,de.Z)(qt),wn=vn[0],Sn=vn.slice(1);if(!wn)return[$t];var Bt=$t.split(wn);return Qe=Qe||Bt.length>1,Bt.reduce(function(dn,at){return[].concat((0,je.Z)(dn),(0,je.Z)(pt(at,Sn)))},[]).filter(function(dn){return dn})}var Yt=pt(Te,Pe);return Qe?Yt:null}var Ft=["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"],Xt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Qt(Te){return Te==="tags"||Te==="multiple"}var on=Ke.forwardRef(function(Te,Pe){var Qe,pt,Yt=Te.id,$t=Te.prefixCls,qt=Te.className,vn=Te.showSearch,wn=Te.tagRender,Sn=Te.direction,Bt=Te.omitDomProps,dn=Te.displayValues,at=Te.onDisplayValuesChange,Mt=Te.emptyOptions,Pt=Te.notFoundContent,Rt=Pt===void 0?"Not Found":Pt,an=Te.onClear,Tt=Te.mode,rn=Te.disabled,$e=Te.loading,xt=Te.getInputElement,St=Te.getRawInputElement,zt=Te.open,Ot=Te.defaultOpen,Ht=Te.onDropdownVisibleChange,Zt=Te.activeValue,mn=Te.onActiveValueChange,xn=Te.activeDescendantId,Ln=Te.searchValue,zn=Te.autoClearSearchValue,er=Te.onSearch,cr=Te.onSearchSplit,Un=Te.tokenSeparators,In=Te.allowClear,fr=Te.suffixIcon,tr=Te.clearIcon,yr=Te.OptionList,Gn=Te.animation,Xn=Te.transitionName,br=Te.dropdownStyle,ur=Te.dropdownClassName,Br=Te.dropdownMatchSelectWidth,Gr=Te.dropdownRender,ar=Te.dropdownAlign,kn=Te.placement,En=Te.builtinPlacements,gr=Te.getPopupContainer,nr=Te.showAction,Er=nr===void 0?[]:nr,Lr=Te.onFocus,Ir=Te.onBlur,pr=Te.onKeyUp,Sr=Te.onKeyDown,ii=Te.onMouseDown,Hn=(0,_e.Z)(Te,Ft),qn=Qt(Tt),Dr=(vn!==void 0?vn:qn)||Tt==="combobox",$r=(0,tt.Z)({},Hn);Xt.forEach(function(_i){delete $r[_i]}),Bt==null||Bt.forEach(function(_i){delete $r[_i]});var li=Ke.useState(!1),di=(0,xe.Z)(li,2),ri=di[0],Jr=di[1];Ke.useEffect(function(){Jr((0,vt.Z)())},[]);var yi=Ke.useRef(null),bi=Ke.useRef(null),Yn=Ke.useRef(null),Vn=Ke.useRef(null),Zn=Ke.useRef(null),mr=Ze(),ni=(0,xe.Z)(mr,3),xi=ni[0],Mi=ni[1],gi=ni[2];Ke.useImperativeHandle(Pe,function(){var _i,mi;return{focus:(_i=Vn.current)===null||_i===void 0?void 0:_i.focus,blur:(mi=Vn.current)===null||mi===void 0?void 0:mi.blur,scrollTo:function(La){var Xi;return(Xi=Zn.current)===null||Xi===void 0?void 0:Xi.scrollTo(La)}}});var ci=Ke.useMemo(function(){var _i;if(Tt!=="combobox")return Ln;var mi=(_i=dn[0])===null||_i===void 0?void 0:_i.value;return typeof mi=="string"||typeof mi=="number"?String(mi):""},[Ln,Tt,dn]),ki=Tt==="combobox"&&typeof xt=="function"&&xt()||null,Hi=typeof St=="function"&&St(),Ni=(0,dt.x1)(bi,Hi==null||(Qe=Hi.props)===null||Qe===void 0?void 0:Qe.ref),oa=Ke.useState(!1),Xr=(0,xe.Z)(oa,2),ei=Xr[0],Ai=Xr[1];(0,We.Z)(function(){Ai(!0)},[]);var ai=(0,Se.Z)(!1,{defaultValue:Ot,value:zt}),fi=(0,xe.Z)(ai,2),Ei=fi[0],pi=fi[1],Pr=ei?Ei:!1,Yr=!Rt&&Mt;(rn||Yr&&Pr&&Tt==="combobox")&&(Pr=!1);var Ur=Yr?!1:Pr,zr=Ke.useCallback(function(_i){var mi=_i!==void 0?_i:!Pr;rn||(pi(mi),Pr!==mi&&(Ht==null||Ht(mi)))},[rn,Pr,pi,Ht]),ui=Ke.useMemo(function(){return(Un||[]).some(function(_i){return[`
|
|
|
`,`\r
|
|
|
`].includes(_i)})},[Un]),oi=function(mi,Ki,La){var Xi=!0,$a=mi;mn==null||mn(null);var Fa=La?null:Kt(mi,Un);return Tt!=="combobox"&&Fa&&($a="",cr==null||cr(Fa),zr(!1),Xi=!1),er&&ci!==$a&&er($a,{source:Ki?"typing":"effect"}),Xi},zi=function(mi){!mi||!mi.trim()||er(mi,{source:"submit"})};Ke.useEffect(function(){!Pr&&!qn&&Tt!=="combobox"&&oi("",!1,!1)},[Pr]),Ke.useEffect(function(){Ei&&rn&&pi(!1),rn&&Mi(!1)},[rn]);var Wi=Ee(),Zi=(0,xe.Z)(Wi,2),na=Zi[0],wi=Zi[1],vi=function(mi){var Ki=na(),La=mi.which;if(La===nt.Z.ENTER&&(Tt!=="combobox"&&mi.preventDefault(),Pr||zr(!0)),wi(!!ci),La===nt.Z.BACKSPACE&&!Ki&&qn&&!ci&&dn.length){for(var Xi=(0,je.Z)(dn),$a=null,Fa=Xi.length-1;Fa>=0;Fa-=1){var to=Xi[Fa];if(!to.disabled){Xi.splice(Fa,1),$a=to;break}}$a&&at(Xi,{type:"remove",values:[$a]})}for(var Ra=arguments.length,so=new Array(Ra>1?Ra-1:0),lo=1;lo<Ra;lo++)so[lo-1]=arguments[lo];if(Pr&&Zn.current){var Da;(Da=Zn.current).onKeyDown.apply(Da,[mi].concat(so))}Sr==null||Sr.apply(void 0,[mi].concat(so))},Gi=function(mi){for(var Ki=arguments.length,La=new Array(Ki>1?Ki-1:0),Xi=1;Xi<Ki;Xi++)La[Xi-1]=arguments[Xi];if(Pr&&Zn.current){var $a;($a=Zn.current).onKeyUp.apply($a,[mi].concat(La))}pr==null||pr.apply(void 0,[mi].concat(La))},ca=function(mi){var Ki=dn.filter(function(La){return La!==mi});at(Ki,{type:"remove",values:[mi]})},sa=Ke.useRef(!1),ta=function(){Mi(!0),rn||(Lr&&!sa.current&&Lr.apply(void 0,arguments),Er.includes("focus")&&zr(!0)),sa.current=!0},ts=function(){Mi(!1,function(){sa.current=!1,zr(!1)}),!rn&&(ci&&(Tt==="tags"?er(ci,{source:"submit"}):Tt==="multiple"&&er("",{source:"blur"})),Ir&&Ir.apply(void 0,arguments))},ao=[];Ke.useEffect(function(){return function(){ao.forEach(function(_i){return clearTimeout(_i)}),ao.splice(0,ao.length)}},[]);var oo=function(mi){var Ki,La=mi.target,Xi=(Ki=Yn.current)===null||Ki===void 0?void 0:Ki.getPopupElement();if(Xi&&Xi.contains(La)){var $a=setTimeout(function(){var so=ao.indexOf($a);if(so!==-1&&ao.splice(so,1),gi(),!ri&&!Xi.contains(document.activeElement)){var lo;(lo=Vn.current)===null||lo===void 0||lo.focus()}});ao.push($a)}for(var Fa=arguments.length,to=new Array(Fa>1?Fa-1:0),Ra=1;Ra<Fa;Ra++)to[Ra-1]=arguments[Ra];ii==null||ii.apply(void 0,[mi].concat(to))},eo=Ke.useState({}),Ss=(0,xe.Z)(eo,2),fo=Ss[1];function _a(){fo({})}var fa;Hi&&(fa=function(mi){zr(mi)}),He(function(){var _i;return[yi.current,(_i=Yn.current)===null||_i===void 0?void 0:_i.getPopupElement()]},Ur,zr,!!Hi);var bo=Ke.useMemo(function(){return(0,tt.Z)((0,tt.Z)({},Te),{},{notFoundContent:Rt,open:Pr,triggerOpen:Ur,id:Yt,showSearch:Dr,multiple:qn,toggleOpen:zr})},[Te,Rt,Ur,Pr,Yt,Dr,qn,zr]),ko=!!fr||$e,_o;ko&&(_o=Ke.createElement(wt,{className:De()("".concat($t,"-arrow"),(0,Fe.Z)({},"".concat($t,"-arrow-loading"),$e)),customizeIcon:fr,customizeIconProps:{loading:$e,searchValue:ci,open:Pr,focused:xi,showSearch:Dr}}));var ns=function(){var mi;an==null||an(),(mi=Vn.current)===null||mi===void 0||mi.focus(),at([],{type:"clear",values:dn}),oi("",!1,!1)},$o=en($t,ns,dn,In,tr,rn,ci,Tt),Xa=$o.allowClear,Oa=$o.clearIcon,Oi=Ke.createElement(yr,{ref:Zn}),Lo=De()($t,qt,(pt={},(0,Fe.Z)(pt,"".concat($t,"-focused"),xi),(0,Fe.Z)(pt,"".concat($t,"-multiple"),qn),(0,Fe.Z)(pt,"".concat($t,"-single"),!qn),(0,Fe.Z)(pt,"".concat($t,"-allow-clear"),In),(0,Fe.Z)(pt,"".concat($t,"-show-arrow"),ko),(0,Fe.Z)(pt,"".concat($t,"-disabled"),rn),(0,Fe.Z)(pt,"".concat($t,"-loading"),$e),(0,Fe.Z)(pt,"".concat($t,"-open"),Pr),(0,Fe.Z)(pt,"".concat($t,"-customize-input"),ki),(0,Fe.Z)(pt,"".concat($t,"-show-search"),Dr),pt)),rs=Ke.createElement(oe,{ref:Yn,disabled:rn,prefixCls:$t,visible:Ur,popupElement:Oi,animation:Gn,transitionName:Xn,dropdownStyle:br,dropdownClassName:ur,direction:Sn,dropdownMatchSelectWidth:Br,dropdownRender:Gr,dropdownAlign:ar,placement:kn,builtinPlacements:En,getPopupContainer:gr,empty:Mt,getTriggerDOMNode:function(){return bi.current},onPopupVisibleChange:fa,onPopupMouseEnter:_a},Hi?Ke.cloneElement(Hi,{ref:Ni}):Ke.createElement(un,(0,pe.Z)({},Te,{domRef:bi,prefixCls:$t,inputElement:ki,ref:Vn,id:Yt,showSearch:Dr,autoClearSearchValue:zn,mode:Tt,activeDescendantId:xn,tagRender:wn,values:dn,open:Pr,onToggleOpen:zr,activeValue:Zt,searchValue:ci,onSearch:oi,onSearchSubmit:zi,onRemove:ca,tokenWithEnter:ui}))),Do;return Hi?Do=rs:Do=Ke.createElement("div",(0,pe.Z)({className:Lo},$r,{ref:yi,onMouseDown:oo,onKeyDown:vi,onKeyUp:Gi,onFocus:ta,onBlur:ts}),xi&&!Pr&&Ke.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(dn.map(function(_i){var mi=_i.label,Ki=_i.value;return["number","string"].includes((0,Ae.Z)(mi))?mi:Ki}).join(", "))),rs,_o,Xa&&Oa),Ke.createElement(it.Provider,{value:bo},Do)}),pn=on,Cn=function(Te,Pe){var Qe=Ke.useRef({values:new Map,options:new Map}),pt=Ke.useMemo(function(){var $t=Qe.current,qt=$t.values,vn=$t.options,wn=Te.map(function(dn){if(dn.label===void 0){var at;return(0,tt.Z)((0,tt.Z)({},dn),{},{label:(at=qt.get(dn.value))===null||at===void 0?void 0:at.label})}return dn}),Sn=new Map,Bt=new Map;return wn.forEach(function(dn){Sn.set(dn.value,dn),Bt.set(dn.value,Pe.get(dn.value)||vn.get(dn.value))}),Qe.current.values=Sn,Qe.current.options=Bt,wn},[Te,Pe]),Yt=Ke.useCallback(function($t){return Pe.get($t)||Qe.current.options.get($t)},[Pe]);return[pt,Yt]};function bt(Te,Pe){return kt(Te).join("").toUpperCase().includes(Pe)}var hn=function(Te,Pe,Qe,pt,Yt){return Ke.useMemo(function(){if(!Qe||pt===!1)return Te;var $t=Pe.options,qt=Pe.label,vn=Pe.value,wn=[],Sn=typeof pt=="function",Bt=Qe.toUpperCase(),dn=Sn?pt:function(Mt,Pt){return Yt?bt(Pt[Yt],Bt):Pt[$t]?bt(Pt[qt!=="children"?qt:"label"],Bt):bt(Pt[vn],Bt)},at=Sn?function(Mt){return ot(Mt)}:function(Mt){return Mt};return Te.forEach(function(Mt){if(Mt[$t]){var Pt=dn(Qe,at(Mt));if(Pt)wn.push(Mt);else{var Rt=Mt[$t].filter(function(an){return dn(Qe,at(an))});Rt.length&&wn.push((0,tt.Z)((0,tt.Z)({},Mt),{},(0,Fe.Z)({},$t,Rt)))}return}dn(Qe,at(Mt))&&wn.push(Mt)}),wn},[Te,pt,Yt,Qe,Pe])},On=ue(17115),rt=ue(11592),ze=["children","value"],Xe=["children"];function jt(Te){var Pe=Te,Qe=Pe.key,pt=Pe.props,Yt=pt.children,$t=pt.value,qt=(0,_e.Z)(pt,ze);return(0,tt.Z)({key:Qe,value:$t!==void 0?$t:Qe,children:Yt},qt)}function tn(Te){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,rt.Z)(Te).map(function(Qe,pt){if(!Ke.isValidElement(Qe)||!Qe.type)return null;var Yt=Qe,$t=Yt.type.isSelectOptGroup,qt=Yt.key,vn=Yt.props,wn=vn.children,Sn=(0,_e.Z)(vn,Xe);return Pe||!$t?jt(Qe):(0,tt.Z)((0,tt.Z)({key:"__RC_SELECT_GRP__".concat(qt===null?pt:qt,"__"),label:qt},Sn),{},{options:tn(wn)})}).filter(function(Qe){return Qe})}function cn(Te,Pe,Qe,pt,Yt){return Ke.useMemo(function(){var $t=Te,qt=!Te;qt&&($t=tn(Pe));var vn=new Map,wn=new Map,Sn=function(at,Mt,Pt){Pt&&typeof Pt=="string"&&at.set(Mt[Pt],Mt)};function Bt(dn){for(var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Mt=0;Mt<dn.length;Mt+=1){var Pt=dn[Mt];!Pt[Qe.options]||at?(vn.set(Pt[Qe.value],Pt),Sn(wn,Pt,Qe.label),Sn(wn,Pt,pt),Sn(wn,Pt,Yt)):Bt(Pt[Qe.options],!0)}}return Bt($t),{options:$t,valueOptions:vn,labelOptions:wn}},[Te,Pe,Qe,pt,Yt])}function Dn(Te){var Pe=Ke.useRef();Pe.current=Te;var Qe=Ke.useCallback(function(){return Pe.current.apply(Pe,arguments)},[]);return Qe}var Tn=function(){return null};Tn.isSelectOptGroup=!0;var _n=Tn,Fn=function(){return null};Fn.isSelectOption=!0;var jn=Fn,An=ue(80547),hr=ue(2738),kr=ue(48911),Tr=Ke.createContext(null),Hr=Tr;function sr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Mr=["disabled","title","children","style","className"];function rr(Te){return typeof Te=="string"||typeof Te=="number"}var Or=function(Pe,Qe){var pt=mt(),Yt=pt.prefixCls,$t=pt.id,qt=pt.open,vn=pt.multiple,wn=pt.mode,Sn=pt.searchValue,Bt=pt.toggleOpen,dn=pt.notFoundContent,at=pt.onPopupScroll,Mt=Ke.useContext(Hr),Pt=Mt.flattenOptions,Rt=Mt.onActiveValue,an=Mt.defaultActiveFirstOption,Tt=Mt.onSelect,rn=Mt.menuItemSelectedIcon,$e=Mt.rawValues,xt=Mt.fieldNames,St=Mt.virtual,zt=Mt.direction,Ot=Mt.listHeight,Ht=Mt.listItemHeight,Zt="".concat(Yt,"-item"),mn=(0,An.Z)(function(){return Pt},[qt,Pt],function(ar,kn){return kn[0]&&ar[1]!==kn[1]}),xn=Ke.useRef(null),Ln=function(kn){kn.preventDefault()},zn=function(kn){xn.current&&xn.current.scrollTo(typeof kn=="number"?{index:kn}:kn)},er=function(kn){for(var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,gr=mn.length,nr=0;nr<gr;nr+=1){var Er=(kn+nr*En+gr)%gr,Lr=mn[Er],Ir=Lr.group,pr=Lr.data;if(!Ir&&!pr.disabled)return Er}return-1},cr=Ke.useState(function(){return er(0)}),Un=(0,xe.Z)(cr,2),In=Un[0],fr=Un[1],tr=function(kn){var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fr(kn);var gr={source:En?"keyboard":"mouse"},nr=mn[kn];if(!nr){Rt(null,-1,gr);return}Rt(nr.value,kn,gr)};(0,Ke.useEffect)(function(){tr(an!==!1?er(0):-1)},[mn.length,Sn]);var yr=Ke.useCallback(function(ar){return $e.has(ar)&&wn!=="combobox"},[wn,(0,je.Z)($e).toString(),$e.size]);(0,Ke.useEffect)(function(){var ar=setTimeout(function(){if(!vn&&qt&&$e.size===1){var En=Array.from($e)[0],gr=mn.findIndex(function(nr){var Er=nr.data;return Er.value===En});gr!==-1&&(tr(gr),zn(gr))}});if(qt){var kn;(kn=xn.current)===null||kn===void 0||kn.scrollTo(void 0)}return function(){return clearTimeout(ar)}},[qt,Sn,Pt.length]);var Gn=function(kn){kn!==void 0&&Tt(kn,{selected:!$e.has(kn)}),vn||Bt(!1)};if(Ke.useImperativeHandle(Qe,function(){return{onKeyDown:function(kn){var En=kn.which,gr=kn.ctrlKey;switch(En){case nt.Z.N:case nt.Z.P:case nt.Z.UP:case nt.Z.DOWN:{var nr=0;if(En===nt.Z.UP?nr=-1:En===nt.Z.DOWN?nr=1:sr()&&gr&&(En===nt.Z.N?nr=1:En===nt.Z.P&&(nr=-1)),nr!==0){var Er=er(In+nr,nr);zn(Er),tr(Er,!0)}break}case nt.Z.ENTER:{var Lr=mn[In];Lr&&!Lr.data.disabled?Gn(Lr.value):Gn(void 0),qt&&kn.preventDefault();break}case nt.Z.ESC:Bt(!1),qt&&kn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(kn){zn(kn)}}}),mn.length===0)return Ke.createElement("div",{role:"listbox",id:"".concat($t,"_list"),className:"".concat(Zt,"-empty"),onMouseDown:Ln},dn);var Xn=Object.keys(xt).map(function(ar){return xt[ar]}),br=function(kn){return kn.label};function ur(ar,kn){var En=ar.group;return{role:En?"presentation":"option",id:"".concat($t,"_list_").concat(kn)}}var Br=function(kn){var En=mn[kn];if(!En)return null;var gr=En.data||{},nr=gr.value,Er=En.group,Lr=(0,Ue.Z)(gr,!0),Ir=br(En);return En?Ke.createElement("div",(0,pe.Z)({"aria-label":typeof Ir=="string"&&!Er?Ir:null},Lr,{key:kn},ur(En,kn),{"aria-selected":yr(nr)}),nr):null},Gr={role:"listbox",id:"".concat($t,"_list")};return Ke.createElement(Ke.Fragment,null,St&&Ke.createElement("div",(0,pe.Z)({},Gr,{style:{height:0,width:0,overflow:"hidden"}}),Br(In-1),Br(In),Br(In+1)),Ke.createElement(kr.Z,{itemKey:"key",ref:xn,data:mn,height:Ot,itemHeight:Ht,fullHeight:!1,onMouseDown:Ln,onScroll:at,virtual:St,direction:zt,innerProps:St?null:Gr},function(ar,kn){var En,gr=ar.group,nr=ar.groupOption,Er=ar.data,Lr=ar.label,Ir=ar.value,pr=Er.key;if(gr){var Sr,ii=(Sr=Er.title)!==null&&Sr!==void 0?Sr:rr(Lr)?Lr.toString():void 0;return Ke.createElement("div",{className:De()(Zt,"".concat(Zt,"-group")),title:ii},Lr!==void 0?Lr:pr)}var Hn=Er.disabled,qn=Er.title,Dr=Er.children,$r=Er.style,li=Er.className,di=(0,_e.Z)(Er,Mr),ri=(0,hr.Z)(di,Xn),Jr=yr(Ir),yi="".concat(Zt,"-option"),bi=De()(Zt,yi,li,(En={},(0,Fe.Z)(En,"".concat(yi,"-grouped"),nr),(0,Fe.Z)(En,"".concat(yi,"-active"),In===kn&&!Hn),(0,Fe.Z)(En,"".concat(yi,"-disabled"),Hn),(0,Fe.Z)(En,"".concat(yi,"-selected"),Jr),En)),Yn=br(ar),Vn=!rn||typeof rn=="function"||Jr,Zn=typeof Yn=="number"?Yn:Yn||Ir,mr=rr(Zn)?Zn.toString():void 0;return qn!==void 0&&(mr=qn),Ke.createElement("div",(0,pe.Z)({},(0,Ue.Z)(ri),St?{}:ur(ar,kn),{"aria-selected":Jr,className:bi,title:mr,onMouseMove:function(){In===kn||Hn||tr(kn)},onClick:function(){Hn||Gn(Ir)},style:$r}),Ke.createElement("div",{className:"".concat(yi,"-content")},Zn),Ke.isValidElement(rn)||Jr,Vn&&Ke.createElement(wt,{className:"".concat(Zt,"-option-state"),customizeIcon:rn,customizeIconProps:{isSelected:Jr}},Jr?"\u2713":null))}))},Fr=Ke.forwardRef(Or);Fr.displayName="OptionList";var _r=Fr;function jr(Te){var Pe=Te.mode,Qe=Te.options,pt=Te.children,Yt=Te.backfill,$t=Te.allowClear,qt=Te.placeholder,vn=Te.getInputElement,wn=Te.showSearch,Sn=Te.onSearch,Bt=Te.defaultOpen,dn=Te.autoFocus,at=Te.labelInValue,Mt=Te.value,Pt=Te.inputValue,Rt=Te.optionLabelProp,an=isMultiple(Pe),Tt=wn!==void 0?wn:an||Pe==="combobox",rn=Qe||convertChildrenToData(pt);if(warning(Pe!=="tags"||rn.every(function(zt){return!zt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Pe==="tags"||Pe==="combobox"){var $e=rn.some(function(zt){return zt.options?zt.options.some(function(Ot){return typeof("value"in Ot?Ot.value:Ot.key)=="number"}):typeof("value"in zt?zt.value:zt.key)=="number"});warning(!$e,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Pe!=="combobox"||!Rt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Pe==="combobox"||!Yt,"`backfill` only works with `combobox` mode."),warning(Pe==="combobox"||!vn,"`getInputElement` only work with `combobox` mode."),noteOnce(Pe!=="combobox"||!vn||!$t||!qt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Sn&&!Tt&&Pe!=="combobox"&&Pe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Bt||dn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Mt!=null){var xt=toArray(Mt);warning(!at||xt.every(function(zt){return _typeof(zt)==="object"&&("key"in zt||"value"in zt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!an||Array.isArray(Mt),"`value` should be array when `mode` is `multiple` or `tags`")}if(pt){var St=null;toNodeArray(pt).some(function(zt){if(!React.isValidElement(zt)||!zt.type)return!1;var Ot=zt,Ht=Ot.type;if(Ht.isSelectOption)return!1;if(Ht.isSelectOptGroup){var Zt=toNodeArray(zt.props.children).every(function(mn){return!React.isValidElement(mn)||!zt.type||mn.type.isSelectOption?!0:(St=mn.type,!1)});return!Zt}return St=Ht,!0}),St&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(St.displayName||St.name||St,"`.")),warning(Pt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Nr(Te,Pe){if(Te){var Qe=function pt(Yt){for(var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qt=0;qt<Yt.length;qt++){var vn=Yt[qt];if(vn[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!$t&&Array.isArray(vn[Pe==null?void 0:Pe.options])&&pt(vn[Pe==null?void 0:Pe.options],!0))break}};Qe(Te)}}var Jn=null,lr=["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"],Rn=["inputValue"];function $n(Te){return!Te||(0,Ae.Z)(Te)!=="object"}var wr=Ke.forwardRef(function(Te,Pe){var Qe=Te.id,pt=Te.mode,Yt=Te.prefixCls,$t=Yt===void 0?"rc-select":Yt,qt=Te.backfill,vn=Te.fieldNames,wn=Te.inputValue,Sn=Te.searchValue,Bt=Te.onSearch,dn=Te.autoClearSearchValue,at=dn===void 0?!0:dn,Mt=Te.onSelect,Pt=Te.onDeselect,Rt=Te.dropdownMatchSelectWidth,an=Rt===void 0?!0:Rt,Tt=Te.filterOption,rn=Te.filterSort,$e=Te.optionFilterProp,xt=Te.optionLabelProp,St=Te.options,zt=Te.children,Ot=Te.defaultActiveFirstOption,Ht=Te.menuItemSelectedIcon,Zt=Te.virtual,mn=Te.direction,xn=Te.listHeight,Ln=xn===void 0?200:xn,zn=Te.listItemHeight,er=zn===void 0?20:zn,cr=Te.value,Un=Te.defaultValue,In=Te.labelInValue,fr=Te.onChange,tr=(0,_e.Z)(Te,lr),yr=(0,On.ZP)(Qe),Gn=Qt(pt),Xn=!!(!St&&zt),br=Ke.useMemo(function(){return Tt===void 0&&pt==="combobox"?!1:Tt},[Tt,pt]),ur=Ke.useMemo(function(){return le(vn,Xn)},[JSON.stringify(vn),Xn]),Br=(0,Se.Z)("",{value:Sn!==void 0?Sn:wn,postState:function(Yr){return Yr||""}}),Gr=(0,xe.Z)(Br,2),ar=Gr[0],kn=Gr[1],En=cn(St,zt,ur,$e,xt),gr=En.valueOptions,nr=En.labelOptions,Er=En.options,Lr=Ke.useCallback(function(Pr){var Yr=kt(Pr);return Yr.map(function(Ur){var zr,ui,oi,zi,Wi;if($n(Ur))zr=Ur;else{var Zi;oi=Ur.key,ui=Ur.label,zr=(Zi=Ur.value)!==null&&Zi!==void 0?Zi:oi}var na=gr.get(zr);if(na){var wi;if(ui===void 0&&(ui=na==null?void 0:na[xt||ur.label]),oi===void 0&&(oi=(wi=na==null?void 0:na.key)!==null&&wi!==void 0?wi:zr),zi=na==null?void 0:na.disabled,Wi=na==null?void 0:na.title,0)var vi}return{label:ui,value:zr,key:oi,disabled:zi,title:Wi}})},[ur,xt,gr]),Ir=(0,Se.Z)(Un,{value:cr}),pr=(0,xe.Z)(Ir,2),Sr=pr[0],ii=pr[1],Hn=Ke.useMemo(function(){var Pr,Yr=Lr(Sr);return pt==="combobox"&&Dt((Pr=Yr[0])===null||Pr===void 0?void 0:Pr.value)?[]:Yr},[Sr,Lr,pt]),qn=Cn(Hn,gr),Dr=(0,xe.Z)(qn,2),$r=Dr[0],li=Dr[1],di=Ke.useMemo(function(){if(!pt&&$r.length===1){var Pr=$r[0];if(Pr.value===null&&(Pr.label===null||Pr.label===void 0))return[]}return $r.map(function(Yr){var Ur;return(0,tt.Z)((0,tt.Z)({},Yr),{},{label:(Ur=Yr.label)!==null&&Ur!==void 0?Ur:Yr.value})})},[pt,$r]),ri=Ke.useMemo(function(){return new Set($r.map(function(Pr){return Pr.value}))},[$r]);Ke.useEffect(function(){if(pt==="combobox"){var Pr,Yr=(Pr=$r[0])===null||Pr===void 0?void 0:Pr.value;kn(ft(Yr)?String(Yr):"")}},[$r]);var Jr=Dn(function(Pr,Yr){var Ur,zr=Yr!=null?Yr:Pr;return Ur={},(0,Fe.Z)(Ur,ur.value,Pr),(0,Fe.Z)(Ur,ur.label,zr),Ur}),yi=Ke.useMemo(function(){if(pt!=="tags")return Er;var Pr=(0,je.Z)(Er),Yr=function(zr){return gr.has(zr)};return(0,je.Z)($r).sort(function(Ur,zr){return Ur.value<zr.value?-1:1}).forEach(function(Ur){var zr=Ur.value;Yr(zr)||Pr.push(Jr(zr,Ur.label))}),Pr},[Jr,Er,gr,$r,pt]),bi=hn(yi,ur,ar,br,$e),Yn=Ke.useMemo(function(){return pt!=="tags"||!ar||bi.some(function(Pr){return Pr[$e||"value"]===ar})||bi.some(function(Pr){return Pr[ur.value]===ar})?bi:[Jr(ar)].concat((0,je.Z)(bi))},[Jr,$e,pt,bi,ar,ur]),Vn=Ke.useMemo(function(){return rn?(0,je.Z)(Yn).sort(function(Pr,Yr){return rn(Pr,Yr)}):Yn},[Yn,rn]),Zn=Ke.useMemo(function(){return Ie(Vn,{fieldNames:ur,childrenAsData:Xn})},[Vn,ur,Xn]),mr=function(Yr){var Ur=Lr(Yr);if(ii(Ur),fr&&(Ur.length!==$r.length||Ur.some(function(oi,zi){var Wi;return((Wi=$r[zi])===null||Wi===void 0?void 0:Wi.value)!==(oi==null?void 0:oi.value)}))){var zr=In?Ur:Ur.map(function(oi){return oi.value}),ui=Ur.map(function(oi){return ot(li(oi.value))});fr(Gn?zr:zr[0],Gn?ui:ui[0])}},ni=Ke.useState(null),xi=(0,xe.Z)(ni,2),Mi=xi[0],gi=xi[1],ci=Ke.useState(0),ki=(0,xe.Z)(ci,2),Hi=ki[0],Ni=ki[1],oa=Ot!==void 0?Ot:pt!=="combobox",Xr=Ke.useCallback(function(Pr,Yr){var Ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},zr=Ur.source,ui=zr===void 0?"keyboard":zr;Ni(Yr),qt&&pt==="combobox"&&Pr!==null&&ui==="keyboard"&&gi(String(Pr))},[qt,pt]),ei=function(Yr,Ur,zr){var ui=function(){var sa,ta=li(Yr);return[In?{label:ta==null?void 0:ta[ur.label],value:Yr,key:(sa=ta==null?void 0:ta.key)!==null&&sa!==void 0?sa:Yr}:Yr,ot(ta)]};if(Ur&&Mt){var oi=ui(),zi=(0,xe.Z)(oi,2),Wi=zi[0],Zi=zi[1];Mt(Wi,Zi)}else if(!Ur&&Pt&&zr!=="clear"){var na=ui(),wi=(0,xe.Z)(na,2),vi=wi[0],Gi=wi[1];Pt(vi,Gi)}},Ai=Dn(function(Pr,Yr){var Ur,zr=Gn?Yr.selected:!0;zr?Ur=Gn?[].concat((0,je.Z)($r),[Pr]):[Pr]:Ur=$r.filter(function(ui){return ui.value!==Pr}),mr(Ur),ei(Pr,zr),pt==="combobox"?gi(""):(!Qt||at)&&(kn(""),gi(""))}),ai=function(Yr,Ur){mr(Yr);var zr=Ur.type,ui=Ur.values;(zr==="remove"||zr==="clear")&&ui.forEach(function(oi){ei(oi.value,!1,zr)})},fi=function(Yr,Ur){if(kn(Yr),gi(null),Ur.source==="submit"){var zr=(Yr||"").trim();if(zr){var ui=Array.from(new Set([].concat((0,je.Z)(ri),[zr])));mr(ui),ei(zr,!0),kn("")}return}Ur.source!=="blur"&&(pt==="combobox"&&mr(Yr),Bt==null||Bt(Yr))},Ei=function(Yr){var Ur=Yr;pt!=="tags"&&(Ur=Yr.map(function(ui){var oi=nr.get(ui);return oi==null?void 0:oi.value}).filter(function(ui){return ui!==void 0}));var zr=Array.from(new Set([].concat((0,je.Z)(ri),(0,je.Z)(Ur))));mr(zr),zr.forEach(function(ui){ei(ui,!0)})},pi=Ke.useMemo(function(){var Pr=Zt!==!1&&an!==!1;return(0,tt.Z)((0,tt.Z)({},En),{},{flattenOptions:Zn,onActiveValue:Xr,defaultActiveFirstOption:oa,onSelect:Ai,menuItemSelectedIcon:Ht,rawValues:ri,fieldNames:ur,virtual:Pr,direction:mn,listHeight:Ln,listItemHeight:er,childrenAsData:Xn})},[En,Zn,Xr,oa,Ai,Ht,ri,ur,Zt,an,Ln,er,Xn]);return Ke.createElement(Hr.Provider,{value:pi},Ke.createElement(pn,(0,pe.Z)({},tr,{id:yr,prefixCls:$t,ref:Pe,omitDomProps:Rn,mode:pt,displayValues:di,onDisplayValuesChange:ai,direction:mn,searchValue:ar,onSearch:fi,autoClearSearchValue:at,onSearchSplit:Ei,dropdownMatchSelectWidth:an,OptionList:_r,emptyOptions:!Zn.length,activeValue:Mi,activeDescendantId:"".concat(yr,"_list_").concat(Hi)})))}),lt=wr;lt.Option=jn,lt.OptGroup=_n;var ke=lt,Oe=ke},9296:function(Mn,sn,ue){"use strict";ue.r(sn),ue.d(sn,{ResizableTextArea:function(){return It},default:function(){return Dt}});var pe=ue(54476),je=ue(33885),Fe=ue(20068),tt=ue(76190),xe=ue(42978),_e=ue(75931),Ae=ue(94480),Se=ue(92310),Me=ue.n(Se),Ke=ue(93681),ct=ue(5643),De=ue(18929),We=ue(59301),vt=ue(29301),nt=ue(34280),dt=ue(16089),st=`
|
|
|
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;
|
|
|
`,wt=["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"],en={},it;function mt(Et){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Be=Et.getAttribute("id")||Et.getAttribute("data-reactid")||Et.getAttribute("name");if(ut&&en[Be])return en[Be];var be=window.getComputedStyle(Et),ht=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),nn=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),Wt=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),Ve=wt.map(function(At){return"".concat(At,":").concat(be.getPropertyValue(At))}).join(";"),Ye={sizingStyle:Ve,paddingSize:nn,borderSize:Wt,boxSizing:ht};return ut&&Be&&(en[Be]=Ye),Ye}function Ze(Et){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;it||(it=document.createElement("textarea"),it.setAttribute("tab-index","-1"),it.setAttribute("aria-hidden","true"),document.body.appendChild(it)),Et.getAttribute("wrap")?it.setAttribute("wrap",Et.getAttribute("wrap")):it.removeAttribute("wrap");var ht=mt(Et,ut),nn=ht.paddingSize,Wt=ht.borderSize,Ve=ht.boxSizing,Ye=ht.sizingStyle;it.setAttribute("style","".concat(Ye,";").concat(st)),it.value=Et.value||Et.placeholder||"";var At=void 0,gn=void 0,Jt,un=it.scrollHeight;if(Ve==="border-box"?un+=Wt:Ve==="content-box"&&(un-=nn),Be!==null||be!==null){it.value=" ";var Gt=it.scrollHeight-nn;Be!==null&&(At=Gt*Be,Ve==="border-box"&&(At=At+nn+Wt),un=Math.max(At,un)),be!==null&&(gn=Gt*be,Ve==="border-box"&&(gn=gn+nn+Wt),Jt=un>gn?"":"hidden",un=Math.min(gn,un))}var Vt={height:un,overflowY:Jt,resize:"none"};return At&&(Vt.minHeight=At),gn&&(Vt.maxHeight=gn),Vt}var Ee=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],He=0,Ue=1,Ct=2,Ge=We.forwardRef(function(Et,ut){var Be=Et,be=Be.prefixCls,ht=Be.onPressEnter,nn=Be.defaultValue,Wt=Be.value,Ve=Be.autoSize,Ye=Be.onResize,At=Be.className,gn=Be.style,Jt=Be.disabled,un=Be.onChange,Gt=Be.onInternalAutoSize,Vt=(0,_e.Z)(Be,Ee),Nt=(0,De.Z)(nn,{value:Wt,postState:function(_n){return _n!=null?_n:""}}),ve=(0,xe.Z)(Nt,2),se=ve[0],oe=ve[1],de=function(_n){oe(_n.target.value),un==null||un(_n)},fe=We.useRef();We.useImperativeHandle(ut,function(){return{textArea:fe.current}});var le=We.useMemo(function(){return Ve&&(0,tt.Z)(Ve)==="object"?[Ve.minRows,Ve.maxRows]:[]},[Ve]),Ie=(0,xe.Z)(le,2),ot=Ie[0],Kt=Ie[1],Ft=!!Ve,Xt=function(){try{if(document.activeElement===fe.current){var _n=fe.current,Fn=_n.selectionStart,jn=_n.selectionEnd,An=_n.scrollTop;fe.current.setSelectionRange(Fn,jn),fe.current.scrollTop=An}}catch(hr){}},Qt=We.useState(Ct),on=(0,xe.Z)(Qt,2),pn=on[0],Cn=on[1],bt=We.useState(),hn=(0,xe.Z)(bt,2),On=hn[0],rt=hn[1],ze=function(){Cn(He)};(0,nt.Z)(function(){Ft&&ze()},[Wt,ot,Kt,Ft]),(0,nt.Z)(function(){if(pn===He)Cn(Ue);else if(pn===Ue){var Tn=Ze(fe.current,!1,ot,Kt);Cn(Ct),rt(Tn)}else Xt()},[pn]);var Xe=We.useRef(),jt=function(){dt.Z.cancel(Xe.current)},tn=function(_n){pn===Ct&&(Ye==null||Ye(_n),Ve&&(jt(),Xe.current=(0,dt.Z)(function(){ze()})))};We.useEffect(function(){return jt},[]);var cn=Ft?On:null,Dn=(0,je.Z)((0,je.Z)({},gn),cn);return(pn===He||pn===Ue)&&(Dn.overflowY="hidden",Dn.overflowX="hidden"),We.createElement(vt.Z,{onResize:tn,disabled:!(Ve||Ye)},We.createElement("textarea",(0,pe.Z)({},Vt,{ref:fe,style:Dn,className:Me()(be,At,(0,Fe.Z)({},"".concat(be,"-disabled"),Jt)),disabled:Jt,value:se,onChange:de})))}),It=Ge,et=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function kt(Et,ut){return(0,Ae.Z)(Et||"").slice(0,ut).join("")}function Je(Et,ut,Be,be){var ht=Be;return Et?ht=kt(Be,be):(0,Ae.Z)(ut||"").length<Be.length&&(0,Ae.Z)(Be||"").length>be&&(ht=ut),ht}var Ut=We.forwardRef(function(Et,ut){var Be,be=Et.defaultValue,ht=Et.value,nn=Et.onFocus,Wt=Et.onBlur,Ve=Et.onChange,Ye=Et.allowClear,At=Et.maxLength,gn=Et.onCompositionStart,Jt=Et.onCompositionEnd,un=Et.suffix,Gt=Et.prefixCls,Vt=Gt===void 0?"rc-textarea":Gt,Nt=Et.classes,ve=Et.showCount,se=Et.className,oe=Et.style,de=Et.disabled,fe=Et.hidden,le=Et.classNames,Ie=Et.styles,ot=Et.onResize,Kt=(0,_e.Z)(Et,et),Ft=(0,De.Z)(be,{value:ht,defaultValue:be}),Xt=(0,xe.Z)(Ft,2),Qt=Xt[0],on=Xt[1],pn=(0,We.useRef)(null),Cn=We.useState(!1),bt=(0,xe.Z)(Cn,2),hn=bt[0],On=bt[1],rt=We.useState(!1),ze=(0,xe.Z)(rt,2),Xe=ze[0],jt=ze[1],tn=We.useRef(),cn=We.useRef(0),Dn=We.useState(null),Tn=(0,xe.Z)(Dn,2),_n=Tn[0],Fn=Tn[1],jn=function(){var $n;($n=pn.current)===null||$n===void 0||$n.textArea.focus()};(0,We.useImperativeHandle)(ut,function(){return{resizableTextArea:pn.current,focus:jn,blur:function(){var $n;($n=pn.current)===null||$n===void 0||$n.textArea.blur()}}}),(0,We.useEffect)(function(){On(function(Rn){return!de&&Rn})},[de]);var An=Number(At)>0,hr=function($n){jt(!0),tn.current=Qt,cn.current=$n.currentTarget.selectionStart,gn==null||gn($n)},kr=function($n){jt(!1);var wr=$n.currentTarget.value;if(An){var lt,ke=cn.current>=At+1||cn.current===((lt=tn.current)===null||lt===void 0?void 0:lt.length);wr=Je(ke,tn.current,wr,At)}wr!==Qt&&(on(wr),(0,ct.rJ)($n.currentTarget,$n,Ve,wr)),Jt==null||Jt($n)},Tr=function($n){var wr=$n.target.value;if(!Xe&&An){var lt=$n.target.selectionStart>=At+1||$n.target.selectionStart===wr.length||!$n.target.selectionStart;wr=Je(lt,Qt,wr,At)}on(wr),(0,ct.rJ)($n.currentTarget,$n,Ve,wr)},Hr=function($n){var wr=Kt.onPressEnter,lt=Kt.onKeyDown;$n.key==="Enter"&&wr&&wr($n),lt==null||lt($n)},sr=function($n){On(!0),nn==null||nn($n)},Mr=function($n){On(!1),Wt==null||Wt($n)},rr=function($n){var wr;on(""),jn(),(0,ct.rJ)((wr=pn.current)===null||wr===void 0?void 0:wr.textArea,$n,Ve)},Or=(0,ct.D7)(Qt);!Xe&&An&&ht==null&&(Or=kt(Or,At));var Fr=un,_r;if(ve){var jr=(0,Ae.Z)(Or).length;(0,tt.Z)(ve)==="object"?_r=ve.formatter({value:Or,count:jr,maxLength:At}):_r="".concat(jr).concat(An?" / ".concat(At):""),Fr=We.createElement(We.Fragment,null,Fr,We.createElement("span",{className:Me()("".concat(Vt,"-data-count"),le==null?void 0:le.count),style:Ie==null?void 0:Ie.count},_r))}var Nr=function($n){var wr;ot==null||ot($n),(wr=pn.current)!==null&&wr!==void 0&&wr.textArea.style.height&&Fn(!0)},Jn=!Kt.autoSize&&!ve&&!Ye,lr=We.createElement(Ke.BaseInput,{value:Or,allowClear:Ye,handleReset:rr,suffix:Fr,prefixCls:Vt,classes:{affixWrapper:Me()(Nt==null?void 0:Nt.affixWrapper,(Be={},(0,Fe.Z)(Be,"".concat(Vt,"-show-count"),ve),(0,Fe.Z)(Be,"".concat(Vt,"-textarea-allow-clear"),Ye),Be))},disabled:de,focused:hn,className:se,style:(0,je.Z)((0,je.Z)({},oe),_n&&!Jn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof _r=="string"?_r:void 0}},hidden:fe,inputElement:We.createElement(It,(0,pe.Z)({},Kt,{onKeyDown:Hr,onChange:Tr,onFocus:sr,onBlur:Mr,onCompositionStart:hr,onCompositionEnd:kr,className:le==null?void 0:le.textarea,style:(0,je.Z)((0,je.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:oe==null?void 0:oe.resize}),disabled:de,prefixCls:Vt,onResize:Nr,ref:pn}))});return lr}),ft=Ut,Dt=ft},48911:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Nt}});var pe=ue(54476),je=ue(76190),Fe=ue(33885),tt=ue(20068),xe=ue(42978),_e=ue(75931),Ae=ue(92310),Se=ue.n(Ae),Me=ue(29301),Ke=ue(70425),ct=ue(34280),De=ue(59301),We=ue(4676),vt=De.forwardRef(function(ve,se){var oe=ve.height,de=ve.offsetY,fe=ve.offsetX,le=ve.children,Ie=ve.prefixCls,ot=ve.onInnerResize,Kt=ve.innerProps,Ft=ve.rtl,Xt=ve.extra,Qt={},on={display:"flex",flexDirection:"column"};return de!==void 0&&(Qt={height:oe,position:"relative",overflow:"hidden"},on=(0,Fe.Z)((0,Fe.Z)({},on),{},(0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)({transform:"translateY(".concat(de,"px)")},Ft?"marginRight":"marginLeft",-fe),"position","absolute"),"left",0),"right",0),"top",0))),De.createElement("div",{style:Qt},De.createElement(Me.Z,{onResize:function(Cn){var bt=Cn.offsetHeight;bt&&ot&&ot()}},De.createElement("div",(0,pe.Z)({style:on,className:Se()((0,tt.Z)({},"".concat(Ie,"-holder-inner"),Ie)),ref:se},Kt),le,Xt)))});vt.displayName="Filler";var nt=vt;function dt(ve){var se=ve.children,oe=ve.setRef,de=De.useCallback(function(fe){oe(fe)},[]);return De.cloneElement(se,{ref:de})}function st(ve,se,oe,de,fe,le,Ie,ot){var Kt=ot.getKey;return ve.slice(se,oe+1).map(function(Ft,Xt){var Qt=se+Xt,on=Ie(Ft,Qt,{style:{width:de},offsetX:fe}),pn=Kt(Ft);return De.createElement(dt,{key:pn,setRef:function(bt){return le(Ft,bt)}},on)})}function wt(ve,se,oe,de){var fe=oe-ve,le=se-oe,Ie=Math.min(fe,le)*2;if(de<=Ie){var ot=Math.floor(de/2);return de%2?oe+ot+1:oe-ot}return fe>le?oe-(de-le):oe+(de-fe)}function en(ve,se,oe){var de=ve.length,fe=se.length,le,Ie;if(de===0&&fe===0)return null;de<fe?(le=ve,Ie=se):(le=se,Ie=ve);var ot={__EMPTY_ITEM__:!0};function Kt(Cn){return Cn!==void 0?oe(Cn):ot}for(var Ft=null,Xt=Math.abs(de-fe)!==1,Qt=0;Qt<Ie.length;Qt+=1){var on=Kt(le[Qt]),pn=Kt(Ie[Qt]);if(on!==pn){Ft=Qt,Xt=Xt||on!==Kt(Ie[Qt+1]);break}}return Ft===null?null:{index:Ft,multiple:Xt}}function it(ve,se,oe){var de=De.useState(ve),fe=(0,xe.Z)(de,2),le=fe[0],Ie=fe[1],ot=De.useState(null),Kt=(0,xe.Z)(ot,2),Ft=Kt[0],Xt=Kt[1];return De.useEffect(function(){var Qt=en(le||[],ve||[],se);(Qt==null?void 0:Qt.index)!==void 0&&(oe==null||oe(Qt.index),Xt(ve[Qt.index])),Ie(ve)},[ve]),[Ft]}var mt=ue(16089),Ze=(typeof navigator=="undefined"?"undefined":(0,je.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ee=Ze,He=function(ve,se,oe,de){var fe=(0,De.useRef)(!1),le=(0,De.useRef)(null);function Ie(){clearTimeout(le.current),fe.current=!0,le.current=setTimeout(function(){fe.current=!1},50)}var ot=(0,De.useRef)({top:ve,bottom:se,left:oe,right:de});return ot.current.top=ve,ot.current.bottom=se,ot.current.left=oe,ot.current.right=de,function(Kt,Ft){var Xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Qt=Kt?Ft<0&&ot.current.left||Ft>0&&ot.current.right:Ft<0&&ot.current.top||Ft>0&&ot.current.bottom;return Xt&&Qt?(clearTimeout(le.current),fe.current=!1):(!Qt||fe.current)&&Ie(),!fe.current&&Qt}};function Ue(ve,se,oe,de,fe,le,Ie){var ot=(0,De.useRef)(0),Kt=(0,De.useRef)(null),Ft=(0,De.useRef)(null),Xt=(0,De.useRef)(!1),Qt=He(se,oe,de,fe);function on(rt,ze){if(mt.Z.cancel(Kt.current),!Qt(!1,ze)){var Xe=rt;if(!Xe._virtualHandled)Xe._virtualHandled=!0;else return;ot.current+=ze,Ft.current=ze,Ee||Xe.preventDefault(),Kt.current=(0,mt.Z)(function(){var jt=Xt.current?10:1;Ie(ot.current*jt,!1),ot.current=0})}}function pn(rt,ze){Ie(ze,!0),Ee||rt.preventDefault()}var Cn=(0,De.useRef)(null),bt=(0,De.useRef)(null);function hn(rt){if(ve){mt.Z.cancel(bt.current),bt.current=(0,mt.Z)(function(){Cn.current=null},2);var ze=rt.deltaX,Xe=rt.deltaY,jt=rt.shiftKey,tn=ze,cn=Xe;(Cn.current==="sx"||!Cn.current&&jt&&Xe&&!ze)&&(tn=Xe,cn=0,Cn.current="sx");var Dn=Math.abs(tn),Tn=Math.abs(cn);Cn.current===null&&(Cn.current=le&&Dn>Tn?"x":"y"),Cn.current==="y"?on(rt,cn):pn(rt,tn)}}function On(rt){ve&&(Xt.current=rt.detail===Ft.current)}return[hn,On]}function Ct(ve,se,oe,de){var fe=De.useMemo(function(){return[new Map,[]]},[ve,oe.id,de]),le=(0,xe.Z)(fe,2),Ie=le[0],ot=le[1],Kt=function(Xt){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xt,on=Ie.get(Xt),pn=Ie.get(Qt);if(on===void 0||pn===void 0)for(var Cn=ve.length,bt=ot.length;bt<Cn;bt+=1){var hn,On=ve[bt],rt=se(On);Ie.set(rt,bt);var ze=(hn=oe.get(rt))!==null&&hn!==void 0?hn:de;if(ot[bt]=(ot[bt-1]||0)+ze,rt===Xt&&(on=bt),rt===Qt&&(pn=bt),on!==void 0&&pn!==void 0)break}return{top:ot[on-1]||0,bottom:ot[pn]}};return Kt}var Ge=ue(67732),It=ue(83652),et=function(){function ve(){(0,Ge.Z)(this,ve),(0,tt.Z)(this,"maps",void 0),(0,tt.Z)(this,"id",0),(0,tt.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,It.Z)(ve,[{key:"set",value:function(oe,de){this.diffRecords.set(oe,this.maps[oe]),this.maps[oe]=de,this.id+=1}},{key:"get",value:function(oe){return this.maps[oe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ve}(),kt=et;function Je(ve){var se=parseFloat(ve);return isNaN(se)?0:se}function Ut(ve,se,oe){var de=De.useState(0),fe=(0,xe.Z)(de,2),le=fe[0],Ie=fe[1],ot=(0,De.useRef)(new Map),Kt=(0,De.useRef)(new kt),Ft=(0,De.useRef)(0);function Xt(){Ft.current+=1}function Qt(){var pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Xt();var Cn=function(){var On=!1;ot.current.forEach(function(rt,ze){if(rt&&rt.offsetParent){var Xe=rt.offsetHeight,jt=getComputedStyle(rt),tn=jt.marginTop,cn=jt.marginBottom,Dn=Je(tn),Tn=Je(cn),_n=Xe+Dn+Tn;Kt.current.get(ze)!==_n&&(Kt.current.set(ze,_n),On=!0)}}),On&&Ie(function(rt){return rt+1})};if(pn)Cn();else{Ft.current+=1;var bt=Ft.current;Promise.resolve().then(function(){bt===Ft.current&&Cn()})}}function on(pn,Cn){var bt=ve(pn),hn=ot.current.get(bt);Cn?(ot.current.set(bt,Cn),Qt()):ot.current.delete(bt),!hn!=!Cn&&(Cn?se==null||se(pn):oe==null||oe(pn))}return(0,De.useEffect)(function(){return Xt},[]),[on,Qt,Kt.current,le]}var ft=14/15;function Dt(ve,se,oe){var de=(0,De.useRef)(!1),fe=(0,De.useRef)(0),le=(0,De.useRef)(0),Ie=(0,De.useRef)(null),ot=(0,De.useRef)(null),Kt,Ft=function(pn){if(de.current){var Cn=Math.ceil(pn.touches[0].pageX),bt=Math.ceil(pn.touches[0].pageY),hn=fe.current-Cn,On=le.current-bt,rt=Math.abs(hn)>Math.abs(On);rt?fe.current=Cn:le.current=bt;var ze=oe(rt,rt?hn:On,!1,pn);ze&&pn.preventDefault(),clearInterval(ot.current),ze&&(ot.current=setInterval(function(){rt?hn*=ft:On*=ft;var Xe=Math.floor(rt?hn:On);(!oe(rt,Xe,!0)||Math.abs(Xe)<=.1)&&clearInterval(ot.current)},16))}},Xt=function(){de.current=!1,Kt()},Qt=function(pn){Kt(),pn.touches.length===1&&!de.current&&(de.current=!0,fe.current=Math.ceil(pn.touches[0].pageX),le.current=Math.ceil(pn.touches[0].pageY),Ie.current=pn.target,Ie.current.addEventListener("touchmove",Ft,{passive:!1}),Ie.current.addEventListener("touchend",Xt,{passive:!0}))};Kt=function(){Ie.current&&(Ie.current.removeEventListener("touchmove",Ft),Ie.current.removeEventListener("touchend",Xt))},(0,ct.Z)(function(){return ve&&se.current.addEventListener("touchstart",Qt,{passive:!0}),function(){var on;(on=se.current)===null||on===void 0||on.removeEventListener("touchstart",Qt),Kt(),clearInterval(ot.current)}},[ve])}function Et(ve){return Math.floor(Math.pow(ve,.5))}function ut(ve,se){var oe="touches"in ve?ve.touches[0]:ve;return oe[se?"pageX":"pageY"]-window[se?"scrollX":"scrollY"]}function Be(ve,se,oe){De.useEffect(function(){var de=se.current;if(ve&&de){var fe=!1,le,Ie,ot=function(){mt.Z.cancel(le)},Kt=function on(){ot(),le=(0,mt.Z)(function(){oe(Ie),on()})},Ft=function(){fe=!1,ot()},Xt=function(pn){if(!(pn.target.draggable||pn.button!==0)){var Cn=pn;Cn._virtualHandled||(Cn._virtualHandled=!0,fe=!0)}},Qt=function(pn){if(fe){var Cn=ut(pn,!1),bt=de.getBoundingClientRect(),hn=bt.top,On=bt.bottom;if(Cn<=hn){var rt=hn-Cn;Ie=-Et(rt),Kt()}else if(Cn>=On){var ze=Cn-On;Ie=Et(ze),Kt()}else ot()}};return de.addEventListener("mousedown",Xt),de.ownerDocument.addEventListener("mouseup",Ft),de.ownerDocument.addEventListener("mousemove",Qt),de.ownerDocument.addEventListener("dragend",Ft),function(){de.removeEventListener("mousedown",Xt),de.ownerDocument.removeEventListener("mouseup",Ft),de.ownerDocument.removeEventListener("mousemove",Qt),de.ownerDocument.removeEventListener("dragend",Ft),ot()}}},[ve])}var be=10;function ht(ve,se,oe,de,fe,le,Ie,ot){var Kt=De.useRef(),Ft=De.useState(null),Xt=(0,xe.Z)(Ft,2),Qt=Xt[0],on=Xt[1];return(0,ct.Z)(function(){if(Qt&&Qt.times<be){if(!ve.current){on(function(Mr){return(0,Fe.Z)({},Mr)});return}le();var pn=Qt.targetAlign,Cn=Qt.originAlign,bt=Qt.index,hn=Qt.offset,On=ve.current.clientHeight,rt=!1,ze=pn,Xe=null;if(On){for(var jt=pn||Cn,tn=0,cn=0,Dn=0,Tn=Math.min(se.length-1,bt),_n=0;_n<=Tn;_n+=1){var Fn=fe(se[_n]);cn=tn;var jn=oe.get(Fn);Dn=cn+(jn===void 0?de:jn),tn=Dn}for(var An=jt==="top"?hn:On-hn,hr=Tn;hr>=0;hr-=1){var kr=fe(se[hr]),Tr=oe.get(kr);if(Tr===void 0){rt=!0;break}if(An-=Tr,An<=0)break}switch(jt){case"top":Xe=cn-hn;break;case"bottom":Xe=Dn-On+hn;break;default:{var Hr=ve.current.scrollTop,sr=Hr+On;cn<Hr?ze="top":Dn>sr&&(ze="bottom")}}Xe!==null&&Ie(Xe),Xe!==Qt.lastTop&&(rt=!0)}rt&&on((0,Fe.Z)((0,Fe.Z)({},Qt),{},{times:Qt.times+1,targetAlign:ze,lastTop:Xe}))}},[Qt,ve.current]),function(pn){if(pn==null){ot();return}if(mt.Z.cancel(Kt.current),typeof pn=="number")Ie(pn);else if(pn&&(0,je.Z)(pn)==="object"){var Cn,bt=pn.align;"index"in pn?Cn=pn.index:Cn=se.findIndex(function(rt){return fe(rt)===pn.key});var hn=pn.offset,On=hn===void 0?0:hn;on({times:0,index:Cn,offset:On,originAlign:bt})}}}var nn=De.forwardRef(function(ve,se){var oe=ve.prefixCls,de=ve.rtl,fe=ve.scrollOffset,le=ve.scrollRange,Ie=ve.onStartMove,ot=ve.onStopMove,Kt=ve.onScroll,Ft=ve.horizontal,Xt=ve.spinSize,Qt=ve.containerSize,on=ve.style,pn=ve.thumbStyle,Cn=ve.showScrollBar,bt=De.useState(!1),hn=(0,xe.Z)(bt,2),On=hn[0],rt=hn[1],ze=De.useState(null),Xe=(0,xe.Z)(ze,2),jt=Xe[0],tn=Xe[1],cn=De.useState(null),Dn=(0,xe.Z)(cn,2),Tn=Dn[0],_n=Dn[1],Fn=!de,jn=De.useRef(),An=De.useRef(),hr=De.useState(Cn),kr=(0,xe.Z)(hr,2),Tr=kr[0],Hr=kr[1],sr=De.useRef(),Mr=function(){Cn===!0||Cn===!1||(clearTimeout(sr.current),Hr(!0),sr.current=setTimeout(function(){Hr(!1)},3e3))},rr=le-Qt||0,Or=Qt-Xt||0,Fr=De.useMemo(function(){if(fe===0||rr===0)return 0;var lt=fe/rr;return lt*Or},[fe,rr,Or]),_r=function(ke){ke.stopPropagation(),ke.preventDefault()},jr=De.useRef({top:Fr,dragging:On,pageY:jt,startTop:Tn});jr.current={top:Fr,dragging:On,pageY:jt,startTop:Tn};var Nr=function(ke){rt(!0),tn(ut(ke,Ft)),_n(jr.current.top),Ie(),ke.stopPropagation(),ke.preventDefault()};De.useEffect(function(){var lt=function(Pe){Pe.preventDefault()},ke=jn.current,Oe=An.current;return ke.addEventListener("touchstart",lt,{passive:!1}),Oe.addEventListener("touchstart",Nr,{passive:!1}),function(){ke.removeEventListener("touchstart",lt),Oe.removeEventListener("touchstart",Nr)}},[]);var Jn=De.useRef();Jn.current=rr;var lr=De.useRef();lr.current=Or,De.useEffect(function(){if(On){var lt,ke=function(Pe){var Qe=jr.current,pt=Qe.dragging,Yt=Qe.pageY,$t=Qe.startTop;mt.Z.cancel(lt);var qt=jn.current.getBoundingClientRect(),vn=Qt/(Ft?qt.width:qt.height);if(pt){var wn=(ut(Pe,Ft)-Yt)*vn,Sn=$t;!Fn&&Ft?Sn-=wn:Sn+=wn;var Bt=Jn.current,dn=lr.current,at=dn?Sn/dn:0,Mt=Math.ceil(at*Bt);Mt=Math.max(Mt,0),Mt=Math.min(Mt,Bt),lt=(0,mt.Z)(function(){Kt(Mt,Ft)})}},Oe=function(){rt(!1),ot()};return window.addEventListener("mousemove",ke,{passive:!0}),window.addEventListener("touchmove",ke,{passive:!0}),window.addEventListener("mouseup",Oe,{passive:!0}),window.addEventListener("touchend",Oe,{passive:!0}),function(){window.removeEventListener("mousemove",ke),window.removeEventListener("touchmove",ke),window.removeEventListener("mouseup",Oe),window.removeEventListener("touchend",Oe),mt.Z.cancel(lt)}}},[On]),De.useEffect(function(){return Mr(),function(){clearTimeout(sr.current)}},[fe]),De.useImperativeHandle(se,function(){return{delayHidden:Mr}});var Rn="".concat(oe,"-scrollbar"),$n={position:"absolute",visibility:Tr?null:"hidden"},wr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ft?(Object.assign($n,{height:8,left:0,right:0,bottom:0}),Object.assign(wr,(0,tt.Z)({height:"100%",width:Xt},Fn?"left":"right",Fr))):(Object.assign($n,(0,tt.Z)({width:8,top:0,bottom:0},Fn?"right":"left",0)),Object.assign(wr,{width:"100%",height:Xt,top:Fr})),De.createElement("div",{ref:jn,className:Se()(Rn,(0,tt.Z)((0,tt.Z)((0,tt.Z)({},"".concat(Rn,"-horizontal"),Ft),"".concat(Rn,"-vertical"),!Ft),"".concat(Rn,"-visible"),Tr)),style:(0,Fe.Z)((0,Fe.Z)({},$n),on),onMouseDown:_r,onMouseMove:Mr},De.createElement("div",{ref:An,className:Se()("".concat(Rn,"-thumb"),(0,tt.Z)({},"".concat(Rn,"-thumb-moving"),On)),style:(0,Fe.Z)((0,Fe.Z)({},wr),pn),onMouseDown:Nr}))}),Wt=nn,Ve=20;function Ye(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,oe=ve/se*ve;return isNaN(oe)&&(oe=0),oe=Math.max(oe,Ve),Math.floor(oe)}var At=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],gn=[],Jt={overflowY:"auto",overflowAnchor:"none"};function un(ve,se){var oe=ve.prefixCls,de=oe===void 0?"rc-virtual-list":oe,fe=ve.className,le=ve.height,Ie=ve.itemHeight,ot=ve.fullHeight,Kt=ot===void 0?!0:ot,Ft=ve.style,Xt=ve.data,Qt=ve.children,on=ve.itemKey,pn=ve.virtual,Cn=ve.direction,bt=ve.scrollWidth,hn=ve.component,On=hn===void 0?"div":hn,rt=ve.onScroll,ze=ve.onVirtualScroll,Xe=ve.onVisibleChange,jt=ve.innerProps,tn=ve.extraRender,cn=ve.styles,Dn=ve.showScrollBar,Tn=Dn===void 0?"optional":Dn,_n=(0,_e.Z)(ve,At),Fn=De.useCallback(function(Hn){return typeof on=="function"?on(Hn):Hn==null?void 0:Hn[on]},[on]),jn=Ut(Fn,null,null),An=(0,xe.Z)(jn,4),hr=An[0],kr=An[1],Tr=An[2],Hr=An[3],sr=!!(pn!==!1&&le&&Ie),Mr=De.useMemo(function(){return Object.values(Tr.maps).reduce(function(Hn,qn){return Hn+qn},0)},[Tr.id,Tr.maps]),rr=sr&&Xt&&(Math.max(Ie*Xt.length,Mr)>le||!!bt),Or=Cn==="rtl",Fr=Se()(de,(0,tt.Z)({},"".concat(de,"-rtl"),Or),fe),_r=Xt||gn,jr=(0,De.useRef)(),Nr=(0,De.useRef)(),Jn=(0,De.useRef)(),lr=(0,De.useState)(0),Rn=(0,xe.Z)(lr,2),$n=Rn[0],wr=Rn[1],lt=(0,De.useState)(0),ke=(0,xe.Z)(lt,2),Oe=ke[0],Te=ke[1],Pe=(0,De.useState)(!1),Qe=(0,xe.Z)(Pe,2),pt=Qe[0],Yt=Qe[1],$t=function(){Yt(!0)},qt=function(){Yt(!1)},vn={getKey:Fn};function wn(Hn){wr(function(qn){var Dr;typeof Hn=="function"?Dr=Hn(qn):Dr=Hn;var $r=er(Dr);return jr.current.scrollTop=$r,$r})}var Sn=(0,De.useRef)({start:0,end:_r.length}),Bt=(0,De.useRef)(),dn=it(_r,Fn),at=(0,xe.Z)(dn,1),Mt=at[0];Bt.current=Mt;var Pt=De.useMemo(function(){if(!sr)return{scrollHeight:void 0,start:0,end:_r.length-1,offset:void 0};if(!rr){var Hn;return{scrollHeight:((Hn=Nr.current)===null||Hn===void 0?void 0:Hn.offsetHeight)||0,start:0,end:_r.length-1,offset:void 0}}for(var qn=0,Dr,$r,li,di=_r.length,ri=0;ri<di;ri+=1){var Jr=_r[ri],yi=Fn(Jr),bi=Tr.get(yi),Yn=qn+(bi===void 0?Ie:bi);Yn>=$n&&Dr===void 0&&(Dr=ri,$r=qn),Yn>$n+le&&li===void 0&&(li=ri),qn=Yn}return Dr===void 0&&(Dr=0,$r=0,li=Math.ceil(le/Ie)),li===void 0&&(li=_r.length-1),li=Math.min(li+1,_r.length-1),{scrollHeight:qn,start:Dr,end:li,offset:$r}},[rr,sr,$n,_r,Hr,le]),Rt=Pt.scrollHeight,an=Pt.start,Tt=Pt.end,rn=Pt.offset;Sn.current.start=an,Sn.current.end=Tt,De.useLayoutEffect(function(){var Hn=Tr.getRecord();if(Hn.size===1){var qn=Array.from(Hn.keys())[0],Dr=Hn.get(qn),$r=_r[an];if($r&&Dr===void 0){var li=Fn($r);if(li===qn){var di=Tr.get(qn),ri=di-Ie;wn(function(Jr){return Jr+ri})}}}Tr.resetRecord()},[Rt]);var $e=De.useState({width:0,height:le}),xt=(0,xe.Z)($e,2),St=xt[0],zt=xt[1],Ot=function(qn){zt({width:qn.offsetWidth,height:qn.offsetHeight})},Ht=(0,De.useRef)(),Zt=(0,De.useRef)(),mn=De.useMemo(function(){return Ye(St.width,bt)},[St.width,bt]),xn=De.useMemo(function(){return Ye(St.height,Rt)},[St.height,Rt]),Ln=Rt-le,zn=(0,De.useRef)(Ln);zn.current=Ln;function er(Hn){var qn=Hn;return Number.isNaN(zn.current)||(qn=Math.min(qn,zn.current)),qn=Math.max(qn,0),qn}var cr=$n<=0,Un=$n>=Ln,In=Oe<=0,fr=Oe>=bt,tr=He(cr,Un,In,fr),yr=function(){return{x:Or?-Oe:Oe,y:$n}},Gn=(0,De.useRef)(yr()),Xn=(0,Ke.useEvent)(function(Hn){if(ze){var qn=(0,Fe.Z)((0,Fe.Z)({},yr()),Hn);(Gn.current.x!==qn.x||Gn.current.y!==qn.y)&&(ze(qn),Gn.current=qn)}});function br(Hn,qn){var Dr=Hn;qn?((0,We.flushSync)(function(){Te(Dr)}),Xn()):wn(Dr)}function ur(Hn){var qn=Hn.currentTarget.scrollTop;qn!==$n&&wn(qn),rt==null||rt(Hn),Xn()}var Br=function(qn){var Dr=qn,$r=bt?bt-St.width:0;return Dr=Math.max(Dr,0),Dr=Math.min(Dr,$r),Dr},Gr=(0,Ke.useEvent)(function(Hn,qn){qn?((0,We.flushSync)(function(){Te(function(Dr){var $r=Dr+(Or?-Hn:Hn);return Br($r)})}),Xn()):wn(function(Dr){var $r=Dr+Hn;return $r})}),ar=Ue(sr,cr,Un,In,fr,!!bt,Gr),kn=(0,xe.Z)(ar,2),En=kn[0],gr=kn[1];Dt(sr,jr,function(Hn,qn,Dr,$r){var li=$r;return tr(Hn,qn,Dr)?!1:!li||!li._virtualHandled?(li&&(li._virtualHandled=!0),En({preventDefault:function(){},deltaX:Hn?qn:0,deltaY:Hn?0:qn}),!0):!1}),Be(rr,jr,function(Hn){wn(function(qn){return qn+Hn})}),(0,ct.Z)(function(){function Hn(Dr){var $r=cr&&Dr.detail<0,li=Un&&Dr.detail>0;sr&&!$r&&!li&&Dr.preventDefault()}var qn=jr.current;return qn.addEventListener("wheel",En,{passive:!1}),qn.addEventListener("DOMMouseScroll",gr,{passive:!0}),qn.addEventListener("MozMousePixelScroll",Hn,{passive:!1}),function(){qn.removeEventListener("wheel",En),qn.removeEventListener("DOMMouseScroll",gr),qn.removeEventListener("MozMousePixelScroll",Hn)}},[sr,cr,Un]),(0,ct.Z)(function(){if(bt){var Hn=Br(Oe);Te(Hn),Xn({x:Hn})}},[St.width,bt]);var nr=function(){var qn,Dr;(qn=Ht.current)===null||qn===void 0||qn.delayHidden(),(Dr=Zt.current)===null||Dr===void 0||Dr.delayHidden()},Er=ht(jr,_r,Tr,Ie,Fn,function(){return kr(!0)},wn,nr);De.useImperativeHandle(se,function(){return{nativeElement:Jn.current,getScrollInfo:yr,scrollTo:function(qn){function Dr($r){return $r&&(0,je.Z)($r)==="object"&&("left"in $r||"top"in $r)}Dr(qn)?(qn.left!==void 0&&Te(Br(qn.left)),Er(qn.top)):Er(qn)}}}),(0,ct.Z)(function(){if(Xe){var Hn=_r.slice(an,Tt+1);Xe(Hn,_r)}},[an,Tt,_r]);var Lr=Ct(_r,Fn,Tr,Ie),Ir=tn==null?void 0:tn({start:an,end:Tt,virtual:rr,offsetX:Oe,offsetY:rn,rtl:Or,getSize:Lr}),pr=st(_r,an,Tt,bt,Oe,hr,Qt,vn),Sr=null;le&&(Sr=(0,Fe.Z)((0,tt.Z)({},Kt?"height":"maxHeight",le),Jt),sr&&(Sr.overflowY="hidden",bt&&(Sr.overflowX="hidden"),pt&&(Sr.pointerEvents="none")));var ii={};return Or&&(ii.dir="rtl"),De.createElement("div",(0,pe.Z)({ref:Jn,style:(0,Fe.Z)((0,Fe.Z)({},Ft),{},{position:"relative"}),className:Fr},ii,_n),De.createElement(Me.Z,{onResize:Ot},De.createElement(On,{className:"".concat(de,"-holder"),style:Sr,ref:jr,onScroll:ur,onMouseEnter:nr},De.createElement(nt,{prefixCls:de,height:Rt,offsetX:Oe,offsetY:rn,scrollWidth:bt,onInnerResize:kr,ref:Nr,innerProps:jt,rtl:Or,extra:Ir},pr))),rr&&Rt>le&&De.createElement(Wt,{ref:Ht,prefixCls:de,scrollOffset:$n,scrollRange:Rt,rtl:Or,onScroll:br,onStartMove:$t,onStopMove:qt,spinSize:xn,containerSize:St.height,style:cn==null?void 0:cn.verticalScrollBar,thumbStyle:cn==null?void 0:cn.verticalScrollBarThumb,showScrollBar:Tn}),rr&&bt>St.width&&De.createElement(Wt,{ref:Zt,prefixCls:de,scrollOffset:Oe,scrollRange:bt,rtl:Or,onScroll:br,onStartMove:$t,onStopMove:qt,spinSize:mn,containerSize:St.width,horizontal:!0,style:cn==null?void 0:cn.horizontalScrollBar,thumbStyle:cn==null?void 0:cn.horizontalScrollBarThumb,showScrollBar:Tn}))}var Gt=De.forwardRef(un);Gt.displayName="List";var Vt=Gt,Nt=Vt},48136:function(Mn,sn,ue){"use strict";var pe=Object.defineProperty,je=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ae=(a,y,b)=>y in a?pe(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,Se=(a,y)=>{for(var b in y||(y={}))xe.call(y,b)&&Ae(a,b,y[b]);if(tt)for(var b of tt(y))_e.call(y,b)&&Ae(a,b,y[b]);return a},Me=(a,y)=>je(a,Fe(y)),Ke=a=>typeof a=="symbol"?a:a+"",ct=(a,y)=>{var b={};for(var E in a)xe.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&tt)for(var E of tt(a))y.indexOf(E)<0&&_e.call(a,E)&&(b[E]=a[E]);return b};function De(a){return Array.isArray(a)}var We={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 vt(){return"window"in globalThis&&"document"in globalThis}function nt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function dt(){return typeof navigator.vibrate=="function"}function st(){var a,y;if(!vt())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 wt(){if(!vt())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 en(){return HTMLElement.prototype.hasOwnProperty("popover")}var it={strings:We,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return it._locale||(it._locale=vt()?navigator.language.slice(0,5):"en-US"),it._locale},set locale(a){it._locale=a,it._numberFormatter=void 0,it.dirty=!0},get numberFormatter(){return it._numberFormatter||(it._numberFormatter=new Intl.NumberFormat(it.locale)),it._numberFormatter},merge(a,y){if(typeof a=="string"&&y)it.strings[a]=Se(Se({},it.strings[a]),y),it.dirty=!0;else for(const b of Object.keys(a))it.merge(b,a[b])},get dirty(){return it._dirty},set dirty(a){it._dirty||it._dirty===a||(it._dirty=!0,setTimeout(()=>{it._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return it._subscribers.push(a),it._subscribers.length-1},unsubscribe(a){a<0||a>=it._subscribers.length||(it._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=mt(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=mt(E);ee&&b.setAttribute("aria-label",ee)}}}};function mt(a,...y){if(a===void 0)return;let b="";const E=it.locale;it.strings[E]&&(b=it.strings[E][a]);const ee=E.slice(0,2);if(!b&&it.strings[ee]&&(b=it.strings[ee][a]),b||(b=it.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(b),he=0;for(;ae;){if(y[he++]){const ye=ae[2]?parseInt(ae[2],10)-1:he-1;let we=y[ye];typeof we=="number"&&(we=it.numberFormatter.format(we)),b=b.replace(ae[1],we)}ae=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var Ze={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"},He={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"},Ue={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"},Ct={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"},Ge={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 It(a){var y,b,E,ee,re,ae;const he=a.split("!");let me,ye,we,Ne=255,qe=255,yt=255,_t=-1;const bn=he.length>0&&he[0].startsWith("-");bn&&(he[0]=he[0].slice(1));for(let ir=0;ir<he.length;ir++){me=Ne,ye=qe,we=yt;const yn=(y=he[ir].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],Nn=yn==null?void 0:yn.toLowerCase(),dr=yn&&(ae=(re=(ee=(E=(b=Ue[Nn])!=null?b:Ue[Ct[yn]])!=null?E:Ee[yn])!=null?ee:Ge[yn])!=null?re:Ze[yn])!=null?ae:he[ir].trim();let Kn=dr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Kn!=null&&Kn[1]&&Kn[2]&&Kn[3])Ne=Math.max(0,Math.min(255,Number.parseInt(Kn[1],16))),qe=Math.max(0,Math.min(255,Number.parseInt(Kn[2],16))),yt=Math.max(0,Math.min(255,Number.parseInt(Kn[3],16)));else if(Kn=dr.match(/^#([\da-f]{3})$/i),Kn!=null&&Kn[1]){const Zr=Number.parseInt(Kn[1][0],16),qr=Number.parseInt(Kn[1][1],16),Vr=Number.parseInt(Kn[1][2],16);Ne=Math.max(0,Math.min(255,Zr*16+Zr)),qe=Math.max(0,Math.min(255,qr*16+qr)),yt=Math.max(0,Math.min(255,Vr*16+Vr))}else if(Kn=dr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Kn!=null&&Kn[1]&&Kn[2]&&Kn[3])Ne=Math.max(0,Math.min(255,Number.parseInt(Kn[1]))),qe=Math.max(0,Math.min(255,Number.parseInt(Kn[2]))),yt=Math.max(0,Math.min(255,Number.parseInt(Kn[3])));else return;_t>=0&&(Ne=(1-_t)*Ne+_t*me,qe=(1-_t)*qe+_t*ye,yt=(1-_t)*yt+_t*we,_t=-1),ir+1<he.length&&(_t=Math.max(0,Math.min(100,Number.parseInt(he[++ir])))/100)}return _t>=0&&(Ne=_t*Ne+(1-_t)*me,qe=_t*qe+(1-_t)*ye,yt=_t*yt+(1-_t)*we),bn&&(Ne=255-Ne,qe=255-qe,yt=255-yt),"#"+("00"+Math.round(Ne).toString(16)).slice(-2)+("00"+Math.round(qe).toString(16)).slice(-2)+("00"+Math.round(yt).toString(16)).slice(-2)}function et(a){var y,b;return a=a.trim(),(b=(y=He[a.toLowerCase()])!=null?y:He[Ct[a]])!=null?b:It(a)}function kt(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 Je(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 Ut(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*Je(re,ee,y+2)),g:Math.round(255*Je(re,ee,y)),b:Math.round(255*Je(re,ee,y-2))}}function ft(a){return a<0?0:a>255?255:Math.round(a)}function Dt(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(ft(y)<<16)+(ft(b)<<8)+ft(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 Et(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 he,me;re===ee?he=0:y===re?he=(b-E)/ae:b===re?he=2+(E-y)/ae:E===re&&(he=4+(y-b)/ae),he=Math.min(he*60,360),he<0&&(he+=360);const ye=(ee+re)/2;return re===ee?me=0:ye<=.5?me=ae/(re+ee):me=ae/(2-re-ee),{h:he,s:me,l:ye}}function ut(a){let y=kt(a);if(!y)return a;let{h:b,s:E,l:ee}=Et(y);return E+=.1,ee-=.1,Dt(Ut({h:b,s:E,l:ee}))}var Be={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"},be={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},ht=[{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 nn(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 ht)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(be[re]||re)}return a}function Wt(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in be)if(be[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of ht)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 Ve(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=Be[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:ae,variant:he,style:me}=Wt(ee);switch(re=ae,he){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(me){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function Ye(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var At={},gn=Se({},Be),Jt={},un={},Gt={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}"},Vt={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}},Nt={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}},ve={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:Nt},"amsmath.sty":{package:Vt,primitive:!0},"texvc.sty":{package:Gt,primitive:!1}},se={" ":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},oe=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,de,fe;wt()?(de=new RegExp("\\p{Letter}","u"),fe=new RegExp("[0-9\\p{Letter}]","u")):(de=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,fe=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function le(a,y,b="mord",E){y!==void 0&&(At[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},gn[y]||(gn[y]=a))}function Ie(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);le(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)le(E,ee,re!=null?re:y,ae!=null?ae:b)}function ot(a,y){for(let b=a;b<=y;b++)le(String.fromCodePoint(b),b)}function Kt(a){var y;return(y=un[a])!=null?y:null}function Ft(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const ae in Jt)ae.startsWith(y)&&!Jt[ae].infix&&ee.push({match:ae,frequency:(b=Jt[ae].frequency)!=null?b:0});for(const ae in At)ae.startsWith(y)&&ee.push({match:ae,frequency:(E=At[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,he)=>{var me,ye;return ae.frequency===he.frequency?ae.match.length===he.match.length?ae.match<he.match?-1:1:ae.match.length-he.match.length:((me=he.frequency)!=null?me:0)-((ye=ae.frequency)!=null?ye:0)}),ee.map(ae=>ae.match)}function Xt(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function Qt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Xt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Qt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Xt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Qt(b[E]))}return y}function on(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 pn(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)un[E]=b}function Cn(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:Qt(y),createAtom:b};for(const re of a)un[re]=ee}function bt(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:Qt(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")Jt["\\"+a]=re;else for(const ae of a)Jt["\\"+ae]=re}var hn;function On(a){return hn||(hn=ze(ve)),a?ze(Se(Se({},hn),a)):hn}function rt(a,y){var b,E,ee,re;if(typeof a=="string"){let ae=0;const he=a;return/(^|[^\\])#1/.test(he)&&(ae=1),/(^|[^\\])#2/.test(he)&&(ae=2),/(^|[^\\])#3/.test(he)&&(ae=3),/(^|[^\\])#4/.test(he)&&(ae=4),/(^|[^\\])#5/.test(he)&&(ae=5),/(^|[^\\])#6/.test(he)&&(ae=6),/(^|[^\\])#7/.test(he)&&(ae=7),/(^|[^\\])#8/.test(he)&&(ae=8),/(^|[^\\])#9/.test(he)&&(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:he}}return Se({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 ze(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]=rt(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=rt(E)}return y}function Xe(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=Jt[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=At[a]:se[a]&&(b={definitionType:"symbol",type:"mord",codepoint:se[a]})}else if(y==="math"){if(b=At[a],!b&&a.length===1){const E=tn("math",a.codePointAt(0));return E.startsWith("\\")?Me(Se({},Xe(E,"math")),{command:E}):null}}else se[a]?b={definitionType:"symbol",type:"mord",codepoint:se[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function jt(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function tn(a,y){if(y===void 0)return"";if(a==="math"&&gn[y])return gn[y];if(a==="text"){const b=Object.keys(se).find(E=>se[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var cn=[0,.68889,0,0,.72222],Dn=[0,.68889,0,0,.66667],Tn=[0,.68889,0,0,.77778],_n=[0,.68889,0,0,.61111],Fn=[.16667,.68889,0,0,.77778],jn=[0,.68889,0,0,.55556],An=[0,0,0,0,.25],hr=[0,.825,0,0,2.33334],kr=[0,.9,0,0,2.33334],Tr=[0,.68889,0,0,.54028],Hr=[-.03598,.46402,0,0,.5],sr=[-.13313,.36687,0,0,1],Mr=[.01354,.52239,0,0,1],rr=[.01354,.52239,0,0,1.11111],Or=[0,.54986,0,0,1],Fr=[0,.69224,0,0,.5],_r=[0,.43056,0,0,1],jr=[.08198,.58198,0,0,.77778],Nr=[.19444,.69224,0,0,.41667],Jn=[.1808,.675,0,0,1],lr=[.19444,.69224,0,0,.83334],Rn=[.13667,.63667,0,0,1],$n=[-.064,.437,0,0,1.334],wr=[.08167,.58167,0,0,.77778],lt=[0,.69224,0,0,.72222],ke=[0,.69224,0,0,.66667],Oe=[-.13313,.36687,0,0,.77778],Te=[.06062,.54986,0,0,.77778],Pe=[0,.69224,0,0,.77778],Qe=[.25583,.75583,0,0,.77778],pt=[.25142,.75726,0,0,.77778],Yt=[.20576,.70576,0,0,.77778],$t=[.30274,.79383,0,0,.77778],qt=[.22958,.72958,0,0,.77778],vn=[.1808,.675,0,0,.77778],wn=[.13667,.63667,0,0,.77778],Sn=[.13597,.63597,0,0,.77778],Bt=[.03517,.54986,0,0,.77778],dn=[0,.675,0,0,.77778],at=[.19444,.69224,0,0,.61111],Mt=[0,.54986,0,0,.76042],Pt=[0,.54986,0,0,.66667],Rt=[.0391,.5391,0,0,.77778],an=[.03517,.54986,0,0,1.33334],Tt=[.38569,.88569,0,0,.77778],rn=[.23222,.74111,0,0,.77778],$e=[.19444,.69224,0,0,.77778],xt=[0,.37788,0,0,.5],St=[0,.54986,0,0,.72222],zt=[0,.69224,0,0,.83334],Ot=[.11111,.69224,0,0,.66667],Ht=[.26167,.75726,0,0,.77778],Zt=[.48256,.98256,0,0,.77778],mn=[.28481,.79383,0,0,.77778],xn=[.08167,.58167,0,0,.22222],Ln=[.08167,.58167,0,0,.38889],zn=[0,.43056,.04028,0,.66667],er=[.41951,.91951,0,0,.77778],cr=[.24982,.74947,0,0,.38865],Un=[.08319,.58283,0,0,.75623],In=[0,.10803,0,0,.27764],fr=[0,.47534,0,0,.50181],tr=[.18906,.47534,0,0,.50181],yr=[0,.69141,0,0,.50181],Gn=[.24982,.74947,0,0,.27764],Xn=[0,.69141,0,0,.21471],br=[.25,.75,0,0,.44722],ur=[0,.64444,0,0,.575],Br=[.08556,.58556,0,0,.89444],Gr=[0,.69444,0,0,.89444],ar=[0,.68611,0,0,.9],kn=[0,.68611,0,0,.86944],En=[.25,.75,0,0,.575],gr=[.25,.75,0,0,.31944],nr=[0,.69444,0,0,.63889],Er=[0,.69444,0,0,.31944],Lr=[0,.44444,0,0,.63889],Ir=[0,.44444,0,0,.51111],pr=[0,.69444,0,0,.575],Sr=[.13333,.63333,0,0,.89444],ii=[0,.44444,0,0,.31944],Hn=[0,.69444,0,0,.86944],qn=[0,.68611,0,0,.69166],Dr=[0,.68611,0,0,.83055],$r=[0,.68611,0,0,.89444],li=[0,.69444,0,0,.60278],di=[.19444,.69444,0,0,.51111],ri=[0,.69444,0,0,.83055],Jr=[-.10889,.39111,0,0,1.14999],yi=[.19444,.69444,0,0,.575],bi=[.19444,.69444,0,0,1.14999],Yn=[.19444,.69444,0,0,.70277],Vn=[.05556,.75,0,0,.575],Zn=[0,.68611,0,0,.95833],mr=[.08556,.58556,0,0,.76666],ni=[-.02639,.47361,0,0,.575],xi=[0,.44444,0,0,.89444],Mi=[0,.55556,0,0,.76666],gi=[-.10889,.39111,0,0,.89444],ci=[.00222,.50222,0,0,.89444],ki=[.19667,.69667,0,0,.89444],Hi=[.08556,.58556,0,0,1.14999],Ni=[0,.69444,0,0,.70277],oa=[-.02778,.47222,0,0,.575],Xr=[.25,.75,0,0,.51111],ei=[-.13889,.36111,0,0,1.14999],Ai=[.19444,.69444,0,0,1.02222],ai=[.12963,.69444,0,0,.89444],fi=[.19444,.69444,0,0,.44722],Ei=[0,.64444,.13167,0,.59111],pi=[.19444,.64444,.13167,0,.59111],Pr=[0,.68611,.17208,0,.8961],Yr=[.19444,.44444,.105,0,.53222],Ur=[0,.44444,.085,0,.82666],zr=[0,.69444,.06709,0,.59111],ui=[0,.69444,.12945,0,.35555],oi=[0,.69444,0,0,.94888],zi=[0,.69444,.11472,0,.59111],Wi=[0,.68611,.10778,0,.88555],Zi=[0,.69444,.07939,0,.62055],na=[0,.69444,.12417,0,.30667],wi=[0,.64444,.13556,0,.51111],vi=[.19444,.64444,.13556,0,.51111],Gi=[0,.68333,.16389,0,.74333],ca=[.19444,.43056,.08847,0,.46],sa=[0,.43056,.07514,0,.71555],ta=[0,.69444,.06646,0,.51111],ts=[0,.69444,0,0,.83129],ao=[0,.69444,.1225,0,.51111],oo=[0,.68333,.09403,0,.76666],eo=[0,.68333,.11111,0,.76666],Ss=[0,.69444,.06961,0,.51444],fo=[0,.69444,0,0,.27778],_a=[.25,.75,0,0,.38889],fa=[0,.64444,0,0,.5],bo=[0,.69444,0,0,.77778],ko=[0,.68333,0,0,.75],_o=[0,.68333,0,0,.77778],ns=[0,.68333,0,0,.68056],$o=[0,.68333,0,0,.72222],Xa=[.25,.75,0,0,.5],Oa=[.25,.75,0,0,.27778],Oi=[0,.69444,0,0,.5],Lo=[0,.69444,0,0,.55556],rs=[0,.43056,0,0,.44445],Do=[0,.43056,0,0,.5],_i=[.19444,.43056,0,0,.55556],mi=[0,.43056,0,0,.55556],Ki=[.08333,.58333,0,0,.77778],La=[0,.43056,0,0,.27778],Xi=[0,.66786,0,0,.27778],$a=[0,.69444,0,0,.75],Fa=[0,.66786,0,0,.5],to=[0,.68333,0,0,.625],Ra=[.19444,.69444,0,0,.44445],so=[0,.69444,0,0,.72222],lo=[.19444,.69444,0,0,.5],Da=[.19444,.69444,0,0,1],bl=[.011,.511,0,0,1.126],jo=[.19444,.69444,0,0,.61111],Js=[.05556,.75,0,0,.5],Kl=[0,.68333,0,0,.83334],Hl=[.0391,.5391,0,0,.66667],Cs=[-.05555,.44445,0,0,.5],Ec=[0,.43056,0,0,.77778],is=[0,.55556,0,0,.66667],xl=[-.03625,.46375,0,0,.77778],Vo=[-.01688,.48312,0,0,.77778],as=[.0391,.5391,0,0,1],Ii=[0,.69444,0,0,.61111],Bi=[-.03472,.46528,0,0,.5],ji=[.25,.75,0,0,.44445],Ya=[-.14236,.35764,0,0,1],Aa=[.244,.744,0,0,.412],xo=[.19444,.69444,0,0,.88889],po=[.12963,.69444,0,0,.77778],za=[.19444,.69444,0,0,.38889],Ao=[.011,.511,0,0,1.638],To=[.19444,.69444,0,0,0],wo=[0,.44444,0,0,.575],os=[.19444,.44444,0,0,.575],Wl=[0,.68611,0,0,.75555],wl=[0,.69444,0,0,.66759],Eu=[0,.68611,0,0,.80555],ku=[0,.68611,.08229,0,.98229],Zl=[0,.68611,0,0,.76666],Od=[0,.44444,0,0,.58472],kc=[.19444,.44444,0,0,.6118],Sl=[.19444,.43056,0,0,.5],_u=[0,.68333,.02778,.08334,.76278],_c=[0,.68333,.08125,.05556,.83125],qs=[0,.43056,0,.05556,.48472],jl=[.19444,.43056,0,.08334,.51702],Lu=[.25,.75,0,0,.42778],Ta=[0,.69444,0,0,.55],ss=[0,.69444,0,0,.73334],Ms=[0,.69444,0,0,.79445],$d=[0,.69444,0,0,.51945],Vl=[0,.69444,0,0,.70278],Lc=[0,.69444,0,0,.76389],Qs=[.25,.75,0,0,.34306],el=[0,.69444,0,0,.56111],Rd=[0,.69444,0,0,.25556],Ul=[.19444,.45833,0,0,.56111],Du=[0,.45833,0,0,.56111],Es=[0,.69444,0,0,.30556],Au=[0,.69444,0,0,.58056],ks=[0,.69444,0,0,.67223],tl=[0,.69444,0,0,.85556],ls=[0,.69444,0,0,.55834],mo=[0,.65556,.11156,0,.5],_s=[0,.69444,.08094,0,.70834],Dc=[.17014,0,0,0,.44445],Tu=[0,.69444,.0799,0,.5],Iu=[0,.69444,0,0,.73752],Nd=[0,.69444,.09205,0,.5],Ls=[0,.69444,.09031,0,.77778],cs=[0,.69444,.07816,0,.27778],Fd=[0,.69444,.00316,0,.5],zd=[.19444,.69444,0,0,.83334],Kd=[.05556,.75,0,0,.83334],Hd=[0,.75,0,0,.5],Wd=[.125,.08333,0,0,.27778],Zd=[0,.08333,0,0,.27778],pa=[0,.65556,0,0,.5],Sa=[0,.69444,0,0,.47222],ua=[0,.69444,0,0,.66667],Ia=[0,.69444,0,0,.59722],nl=[0,.69444,0,0,.54167],Pu=[0,.69444,0,0,.70834],Gl=[.25,.75,0,0,.28889],Bu=[0,.69444,0,0,.51667],jd=[0,.44444,0,0,.44445],Vd=[.19444,.44444,0,0,.51667],Ac=[0,.44444,0,0,.38333],Ou=[0,.44444,0,0,.51667],Tc=[0,.69444,0,0,.83334],Ud=[.35001,.85,0,0,.45834],Ic=[.35001,.85,0,0,.57778],Pc=[.35001,.85,0,0,.41667],$u=[.35001,.85,0,0,.58334],Xl=[0,.72222,0,0,.55556],Bc=[1e-5,.6,0,0,.66667],Ru=[1e-5,.6,0,0,.77778],Cl=[.25001,.75,0,0,.94445],Gd=[.306,.805,.19445,0,.47222],Yl=[.30612,.805,.19445,0,.47222],Ka=[.25001,.75,0,0,.83334],rl=[.35001,.85,0,0,.47222],Nu=[.25001,.75,0,0,1.11111],Fu=[.65002,1.15,0,0,.59722],go=[.65002,1.15,0,0,.81111],Fi=[.65002,1.15,0,0,.47222],Io=[.65002,1.15,0,0,.66667],Ro=[0,.75,0,0,1],us=[.55001,1.05,0,0,1.27778],zu=[.862,1.36,.44445,0,.55556],Oc=[.86225,1.36,.44445,0,.55556],il=[.55001,1.05,0,0,1.11111],$c=[.65002,1.15,0,0,.52778],Rc=[.65002,1.15,0,0,.61111],al=[.55001,1.05,0,0,1.51112],Ku=[.95003,1.45,0,0,.73611],Nc=[.95003,1.45,0,0,1.04445],ds=[.95003,1.45,0,0,.52778],Jl=[.95003,1.45,0,0,.75],ql=[0,.75,0,0,1.44445],Fc=[.95003,1.45,0,0,.58334],Ql=[1.25003,1.75,0,0,.79167],zc=[1.25003,1.75,0,0,1.27778],Hu=[1.25003,1.75,0,0,.58334],Kc=[1.25003,1.75,0,0,.80556],ec=[0,.825,0,0,1.8889],Hc=[1.25003,1.75,0,0,.63889],Wc=[.64502,1.155,0,0,.875],tc=[1e-5,.6,0,0,.875],Zc=[-99e-5,.601,0,0,.66667],jc=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Wu=[.65002,1.15,0,0,.88889],ol=[.90001,0,0,0,.88889],Vc=[-.00499,.605,0,0,1.05556],sl=[0,.12,0,0,.45],Wr=[0,.61111,0,0,.525],So=[.08333,.69444,0,0,.525],Zu=[-.08056,.53055,0,0,.525],Yd=[-.05556,.55556,0,0,.525],no=[0,.43056,0,0,.525],Ca=[.22222,.43056,0,0,.525],nc=[0,0,0,0,.525],Jd={"AMS-Regular":{32:An,65:cn,66:Dn,67:cn,68:cn,69:Dn,70:_n,71:Tn,72:Tn,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Tn,76:Dn,77:[0,.68889,0,0,.94445],78:cn,79:Fn,80:_n,81:Fn,82:cn,83:jn,84:Dn,85:cn,86:cn,87:[0,.68889,0,0,1],88:cn,89:cn,90:Dn,107:jn,160:An,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:jn,295:Tr,710:hr,732:kr,770:hr,771:kr,989:wr,1008:zn,8245:[0,.54986,0,0,.275],8463:Tr,8487:cn,8498:jn,8502:Dn,8503:[0,.68889,0,0,.44445],8504:Dn,8513:[0,.68889,0,0,.63889],8592:Hr,8594:Hr,8602:sr,8603:sr,8606:Mr,8608:Mr,8610:rr,8611:rr,8619:Or,8620:Or,8621:[-.13313,.37788,0,0,1.38889],8622:sr,8624:Fr,8625:Fr,8630:_r,8631:_r,8634:jr,8635:jr,8638:Nr,8639:Nr,8642:Nr,8643:Nr,8644:Jn,8646:Jn,8647:Jn,8648:lr,8649:Jn,8650:lr,8651:Mr,8652:Mr,8653:sr,8654:sr,8655:sr,8666:Rn,8667:Rn,8669:[-.13313,.37788,0,0,1],8672:$n,8674:$n,8705:[0,.825,0,0,.5],8708:jn,8709:wr,8717:[0,.43056,0,0,.42917],8722:Hr,8724:[.08198,.69224,0,0,.77778],8726:wr,8733:Pe,8736:lt,8737:lt,8738:[.03517,.52239,0,0,.72222],8739:xn,8740:[.25142,.74111,0,0,.27778],8741:Ln,8742:[.25142,.74111,0,0,.5],8756:ke,8757:ke,8764:Oe,8765:[-.13313,.37788,0,0,.77778],8769:Oe,8770:xl,8774:$t,8776:Vo,8778:wr,8782:Te,8783:Te,8785:jr,8786:jr,8787:jr,8790:Pe,8791:qt,8796:[.08198,.91667,0,0,.77778],8806:Qe,8807:Qe,8808:pt,8809:pt,8812:[.25583,.75583,0,0,.5],8814:Yt,8815:Yt,8816:$t,8817:$t,8818:qt,8819:qt,8822:vn,8823:vn,8828:wn,8829:wn,8830:qt,8831:qt,8832:Yt,8833:Yt,8840:$t,8841:$t,8842:Sn,8843:Sn,8847:Bt,8848:Bt,8858:jr,8859:jr,8861:jr,8862:dn,8863:dn,8864:dn,8865:dn,8872:[0,.69224,0,0,.61111],8873:lt,8874:[0,.69224,0,0,.88889],8876:_n,8877:_n,8878:cn,8879:cn,8882:Bt,8883:Bt,8884:wn,8885:wn,8888:[0,.54986,0,0,1.11111],8890:_i,8891:at,8892:at,8901:[0,.54986,0,0,.27778],8903:wr,8905:wr,8906:wr,8907:Pe,8908:Pe,8909:[-.03598,.46402,0,0,.77778],8910:Mt,8911:Mt,8912:Bt,8913:Bt,8914:Pt,8915:Pt,8916:ke,8918:Rt,8919:Rt,8920:an,8921:an,8922:Tt,8923:Tt,8926:wn,8927:wn,8928:$t,8929:$t,8934:rn,8935:rn,8936:rn,8937:rn,8938:Yt,8939:Yt,8940:$t,8941:$t,8994:$e,8995:$e,9416:[.15559,.69224,0,0,.90222],9484:Fr,9488:Fr,9492:xt,9496:xt,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:dn,9633:dn,9650:St,9651:St,9654:Bt,9660:St,9661:St,9664:Bt,9674:Ot,9733:[.19444,.69224,0,0,.94445],10003:zt,10016:zt,10731:Ot,10846:[.19444,.75583,0,0,.61111],10877:wn,10878:wn,10885:Qe,10886:Qe,10887:Sn,10888:Sn,10889:Ht,10890:Ht,10891:Zt,10892:Zt,10901:wn,10902:wn,10933:pt,10934:pt,10935:Ht,10936:Ht,10937:Ht,10938:Ht,10949:Qe,10950:Qe,10955:mn,10956:mn,57350:xn,57351:Ln,57352:wr,57353:zn,57356:pt,57357:pt,57358:er,57359:$t,57360:$t,57361:er,57366:pt,57367:pt,57368:pt,57369:pt,57370:Sn,57371:Sn},"Caligraphic-Regular":{32:An,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:An},"Fraktur-Regular":{32:An,33:[0,.69141,0,0,.29574],34:Xn,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:cr,41:cr,42:[0,.62119,0,0,.27764],43:Un,44:In,45:Un,46:In,47:[.24982,.74947,0,0,.50181],48:fr,49:fr,50:fr,51:tr,52:tr,53:tr,54:yr,55:tr,56:yr,57:tr,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:Gn,93:Gn,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:An,8216:Xn,8217:Xn,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:An,33:[0,.69444,0,0,.35],34:li,35:[.19444,.69444,0,0,.95833],36:Vn,37:[.05556,.75,0,0,.95833],38:Gr,39:Er,40:br,41:br,42:[0,.75,0,0,.575],43:Sr,44:[.19444,.15556,0,0,.31944],45:Ac,46:[0,.15556,0,0,.31944],47:En,48:ur,49:ur,50:ur,51:ur,52:ur,53:ur,54:ur,55:ur,56:ur,57:ur,58:ii,59:[.19444,.44444,0,0,.31944],60:Br,61:gi,62:Br,63:[0,.69444,0,0,.54305],64:Gr,65:kn,66:[0,.68611,0,0,.81805],67:Dr,68:[0,.68611,0,0,.88194],69:Wl,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:ar,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:qn,77:[0,.68611,0,0,1.09166],78:ar,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:kn,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:gr,92:En,93:gr,94:pr,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:nr,99:Ir,100:nr,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:nr,105:Er,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Er,109:[0,.44444,0,0,.95833],110:Lr,111:wo,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:Lr,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:Ir,123:En,124:gr,125:En,126:[.35,.34444,0,0,.575],160:An,163:[0,.69444,0,0,.86853],168:pr,172:[0,.44444,0,0,.76666],176:Hn,177:Sr,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Sr,216:[.04861,.73472,0,0,.89444],223:Ia,230:[0,.44444,0,0,.83055],247:Sr,248:[.09722,.54167,0,0,.575],305:ii,338:[0,.68611,0,0,1.16944],339:xi,567:[.19444,.44444,0,0,.35139],710:pr,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:pr,715:pr,728:pr,729:Er,730:Hn,732:pr,733:pr,915:qn,916:Zn,920:$r,923:Eu,926:Zl,928:ar,931:Dr,933:$r,934:Dr,936:$r,937:Dr,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Er,8217:Er,8220:li,8221:li,8224:di,8225:di,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:wl,8465:ri,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:ri,8501:Ni,8592:Jr,8593:yi,8594:Jr,8595:yi,8596:Jr,8597:En,8598:bi,8599:bi,8600:bi,8601:bi,8636:Jr,8637:Jr,8640:Jr,8641:Jr,8656:Jr,8657:Yn,8658:Jr,8659:Yn,8660:Jr,8661:[.25,.75,0,0,.70277],8704:nr,8706:[0,.69444,.06389,0,.62847],8707:nr,8709:Vn,8711:Zn,8712:mr,8715:mr,8722:Sr,8723:Sr,8725:En,8726:En,8727:oa,8728:ni,8729:ni,8730:[.18,.82,0,0,.95833],8733:xi,8734:[0,.44444,0,0,1.14999],8736:lt,8739:gr,8741:En,8743:Mi,8744:Mi,8745:Mi,8746:Mi,8747:[.19444,.69444,.12778,0,.56875],8764:gi,8768:[.19444,.69444,0,0,.31944],8771:ci,8776:[.02444,.52444,0,0,.89444],8781:ci,8801:ci,8804:ki,8805:ki,8810:Hi,8811:Hi,8826:Br,8827:Br,8834:Br,8835:Br,8838:ki,8839:ki,8846:Mi,8849:ki,8850:ki,8851:Mi,8852:Mi,8853:Sr,8854:Sr,8855:Sr,8856:Sr,8857:Sr,8866:Ni,8867:Ni,8868:Gr,8869:Gr,8900:ni,8901:[-.02639,.47361,0,0,.31944],8902:oa,8968:Xr,8969:Xr,8970:Xr,8971:Xr,8994:ei,8995:ei,9651:Ai,9657:oa,9661:Ai,9667:oa,9711:bi,9824:ai,9825:ai,9826:ai,9827:ai,9837:[0,.75,0,0,.44722],9838:fi,9839:fi,10216:br,10217:br,10815:ar,10927:ki,10928:ki,57376:To},"Main-BoldItalic":{32:An,33:[0,.69444,.11417,0,.38611],34:Zi,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:ui,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:Ei,49:Ei,50:Ei,51:Ei,52:pi,53:Ei,54:Ei,55:pi,56:Ei,57:Ei,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:zi,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:Pr,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:Pr,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:zr,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:Yr,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:Yr,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:An,168:[0,.69444,.11473,0,.59111],176:oi,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:Ur,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Ur,567:[.19444,.44444,.04611,0,.385],710:zr,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:ui,730:oi,732:zi,733:zi,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:Pr,931:[0,.68611,.11431,0,.82666],933:Wi,934:[0,.68611,.05632,0,.82666],936:Wi,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:ui,8217:ui,8220:[0,.69444,.16772,0,.62055],8221:Zi},"Main-Italic":{32:An,33:na,34:Ss,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:na,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:wi,49:wi,50:wi,51:wi,52:vi,53:wi,54:wi,55:vi,56:wi,57:wi,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:ao,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:Gi,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:Gi,79:oo,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:Gi,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:ta,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:ca,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:ca,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:An,168:[0,.66786,.10474,0,.51111],176:ts,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:sa,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:sa,710:ta,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:ts,732:[0,.66786,.11585,0,.51111],733:ao,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:oo,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Gi,931:[0,.68333,.12028,0,.71555],933:eo,934:[0,.68333,.05986,0,.71555],936:eo,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:na,8217:na,8220:[0,.69444,.1685,0,.51444],8221:Ss,8463:Tr},"Main-Regular":{32:An,33:fo,34:Oi,35:zd,36:Js,37:Kd,38:bo,39:fo,40:_a,41:_a,42:Hd,43:Ki,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Xa,48:fa,49:fa,50:fa,51:fa,52:fa,53:fa,54:fa,55:fa,56:fa,57:fa,58:La,59:[.19444,.43056,0,0,.27778],60:Rt,61:Oe,62:Rt,63:Sa,64:bo,65:ko,66:[0,.68333,0,0,.70834],67:$o,68:[0,.68333,0,0,.76389],69:ns,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:ko,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:_o,76:to,77:[0,.68333,0,0,.91667],78:ko,79:_o,80:ns,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:$o,85:ko,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:ko,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Oa,92:Xa,93:Oa,94:Oi,95:[.31,.12056,.02778,0,.5],97:Do,98:Lo,99:rs,100:Lo,101:rs,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Lo,105:Xi,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:fo,109:[0,.43056,0,0,.83334],110:mi,111:Do,112:_i,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:mi,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:rs,123:Xa,124:Oa,125:Xa,126:[.35,.31786,0,0,.5],160:An,163:[0,.69444,0,0,.76909],167:Ra,168:Fa,172:[0,.43056,0,0,.66667],176:$a,177:Ki,182:jo,184:Dc,198:[0,.68333,0,0,.90278],215:Ki,216:[.04861,.73194,0,0,.77778],223:Oi,230:[0,.43056,0,0,.72222],247:Ki,248:[.09722,.52778,0,0,.5],305:La,338:[0,.68333,0,0,1.01389],339:Ec,567:[.19444,.43056,0,0,.30556],710:Oi,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Oi,715:Oi,728:Oi,729:Xi,730:$a,732:Fa,733:Oi,915:to,916:Kl,920:_o,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:ko,931:$o,933:_o,934:$o,936:_o,937:$o,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:fo,8217:fo,8220:Oi,8221:Oi,8224:Ra,8225:Ra,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Tr,8465:so,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:so,8501:Ii,8592:sr,8593:lo,8594:sr,8595:lo,8596:sr,8597:Xa,8598:Da,8599:Da,8600:Da,8601:Da,8614:[.011,.511,0,0,1],8617:bl,8618:bl,8636:sr,8637:sr,8640:sr,8641:sr,8652:[.011,.671,0,0,1],8656:sr,8657:jo,8658:sr,8659:jo,8660:sr,8661:[.25,.75,0,0,.61111],8704:Lo,8706:[0,.69444,.05556,.08334,.5309],8707:Lo,8709:Js,8711:Kl,8712:Hl,8715:Hl,8722:Ki,8723:Ki,8725:Xa,8726:Xa,8727:Bi,8728:Cs,8729:Cs,8730:[.2,.8,0,0,.83334],8733:Ec,8734:_r,8736:lt,8739:Oa,8741:Xa,8743:is,8744:is,8745:is,8746:is,8747:[.19444,.69444,.11111,0,.41667],8764:Oe,8768:[.19444,.69444,0,0,.27778],8771:xl,8773:[-.022,.589,0,0,1],8776:Vo,8781:xl,8784:[-.133,.67,0,0,.778],8801:xl,8804:Sn,8805:Sn,8810:as,8811:as,8826:Rt,8827:Rt,8834:Rt,8835:Rt,8838:Sn,8839:Sn,8846:is,8849:Sn,8850:Sn,8851:is,8852:is,8853:Ki,8854:Ki,8855:Ki,8856:Ki,8857:Ki,8866:Ii,8867:Ii,8868:bo,8869:bo,8872:[.249,.75,0,0,.867],8900:Cs,8901:[-.05555,.44445,0,0,.27778],8902:Bi,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:ji,8969:ji,8970:ji,8971:ji,8994:Ya,8995:Ya,9136:Aa,9137:Aa,9651:xo,9657:Bi,9661:xo,9667:Bi,9711:Da,9824:po,9825:po,9826:po,9827:po,9837:[0,.75,0,0,.38889],9838:za,9839:za,10216:_a,10217:_a,10222:Aa,10223:Aa,10229:[.011,.511,0,0,1.609],10230:Ao,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:Ao,10815:ko,10927:Sn,10928:Sn,57376:To},"Math-BoldItalic":{32:An,48:wo,49:wo,50:wo,51:os,52:os,53:os,54:ur,55:os,56:ur,57:os,65:kn,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:ku,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Wl,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:wl,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:Od,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:An,915:[0,.68611,.15972,0,.65694],916:Zn,920:[0,.68611,.03194,0,.86722],923:Eu,926:[0,.68611,.07458,0,.84125],928:ku,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Zl,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:Od,960:[0,.44444,.03704,0,.68241],961:kc,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:kc,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:An,48:Do,49:Do,50:Do,51:Sl,52:Sl,53:Sl,54:fa,55:Sl,56:fa,57:Sl,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:_c,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:_u,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:qs,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:An,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:_u,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:_c,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:qs,960:[0,.43056,.03588,0,.57003],961:jl,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:jl,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:An,33:[0,.69444,0,0,.36667],34:ls,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:Es,40:Lu,41:Lu,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:Ta,49:Ta,50:Ta,51:Ta,52:Ta,53:Ta,54:Ta,55:Ta,56:Ta,57:Ta,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:$d,64:ss,65:ss,66:ss,67:Vl,68:Ms,69:[0,.69444,0,0,.64167],70:Ii,71:ss,72:Ms,73:[0,.69444,0,0,.33056],74:$d,75:Lc,76:Au,77:[0,.69444,0,0,.97778],78:Ms,79:Ms,80:Vl,81:[.10556,.69444,0,0,.79445],82:Vl,83:Ii,84:ss,85:Lc,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:ss,89:[0,.69444,.0275,0,.73334],90:ks,91:Qs,93:Qs,94:Ta,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:el,99:[0,.45833,0,0,.48889],100:el,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:el,105:Rd,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Rd,109:[0,.45833,0,0,.86667],110:Du,111:[0,.45833,0,0,.55],112:Ul,113:Ul,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Du,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:An,168:Ta,176:ss,180:Ta,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Ta,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Ta,729:Es,730:ss,732:Ta,733:Ta,915:Au,916:[0,.69444,0,0,.91667],920:tl,923:ks,926:ss,928:Ms,931:Ms,933:tl,934:Ms,936:tl,937:Ms,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Es,8217:Es,8220:ls,8221:ls},"SansSerif-Italic":{32:An,33:[0,.69444,.05733,0,.31945],34:Fd,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:cs,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:Wd,45:[0,.44444,.01946,0,.33333],46:Zd,47:[.25,.75,.13164,0,.5],48:mo,49:mo,50:mo,51:mo,52:mo,53:mo,54:mo,55:mo,56:mo,57:mo,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:ua,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:_s,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:nl,77:[0,.69444,.08094,0,.875],78:_s,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:Tu,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:An,168:[0,.67937,.06385,0,.5],176:Iu,184:Dc,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Tu,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Nd,715:Oi,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Iu,732:[0,.67659,.08826,0,.5],733:Nd,915:[0,.69444,.13372,0,.54167],916:Tc,920:[0,.69444,.07555,0,.77778],923:Ii,926:[0,.69444,.12816,0,.66667],928:_s,931:[0,.69444,.11983,0,.72222],933:Ls,934:[0,.69444,.04603,0,.72222],936:Ls,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:cs,8217:cs,8220:[0,.69444,.14205,0,.5],8221:Fd},"SansSerif-Regular":{32:An,33:[0,.69444,0,0,.31945],34:Oi,35:zd,36:Js,37:Kd,38:[0,.69444,0,0,.75834],39:fo,40:_a,41:_a,42:Hd,43:Ki,44:Wd,45:[0,.44444,0,0,.33333],46:Zd,47:Xa,48:pa,49:pa,50:pa,51:pa,52:pa,53:pa,54:pa,55:pa,56:pa,57:pa,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:Sa,64:ua,65:ua,66:ua,67:nr,68:[0,.69444,0,0,.72223],69:Ia,70:[0,.69444,0,0,.56945],71:ua,72:Pu,73:fo,74:Sa,75:[0,.69444,0,0,.69445],76:nl,77:[0,.69444,0,0,.875],78:Pu,79:[0,.69444,0,0,.73611],80:nr,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Lo,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:ua,89:[0,.69444,.025,0,.66667],90:Ii,91:Gl,93:Gl,94:Oi,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Bu,99:jd,100:Bu,101:jd,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Bu,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:Ou,111:[0,.44444,0,0,.5],112:Vd,113:Vd,114:[0,.44444,.01389,0,.34167],115:Ac,116:[0,.57143,0,0,.36111],117:Ou,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:An,168:[0,.67937,0,0,.5],176:ua,184:Dc,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Oi,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Oi,715:Oi,728:Oi,729:[0,.67937,0,0,.27778],730:ua,732:[0,.67659,0,0,.5],733:Oi,915:nl,916:Tc,920:bo,923:Ii,926:ua,928:Pu,931:so,933:bo,934:so,936:bo,937:so,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:fo,8217:fo,8220:Oi,8221:Oi},"Script-Regular":{32:An,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:An},"Size1-Regular":{32:An,40:Ud,41:Ud,47:Ic,91:Pc,92:Ic,93:Pc,123:$u,125:$u,160:An,710:Xl,732:Xl,770:Xl,771:Xl,8214:[-99e-5,.601,0,0,.77778],8593:Bc,8595:Bc,8657:Ru,8659:Ru,8719:Cl,8720:Cl,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:Yl,8748:Gd,8749:Gd,8750:Yl,8896:Ka,8897:Ka,8898:Ka,8899:Ka,8968:rl,8969:rl,8970:rl,8971:rl,9168:Zc,10216:rl,10217:rl,10752:Nu,10753:Nu,10754:Nu,10756:Ka,10758:Ka},"Size2-Regular":{32:An,40:Fu,41:Fu,47:go,91:Fi,92:go,93:Fi,123:Io,125:Io,160:An,710:Ro,732:Ro,770:Ro,771:Ro,8719:us,8720:us,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:Oc,8748:zu,8749:zu,8750:Oc,8896:il,8897:il,8898:il,8899:il,8968:$c,8969:$c,8970:$c,8971:$c,10216:Rc,10217:Rc,10752:al,10753:al,10754:al,10756:il,10758:il},"Size3-Regular":{32:An,40:Ku,41:Ku,47:Nc,91:ds,92:Nc,93:ds,123:Jl,125:Jl,160:An,710:ql,732:ql,770:ql,771:ql,8730:[.95003,1.45,0,0,1],8968:Fc,8969:Fc,8970:Fc,8971:Fc,10216:Jl,10217:Jl},"Size4-Regular":{32:An,40:Ql,41:Ql,47:zc,91:Hu,92:zc,93:Hu,123:Kc,125:Kc,160:An,710:ec,732:ec,770:ec,771:ec,8730:[1.25003,1.75,0,0,1],8968:Hc,8969:Hc,8970:Hc,8971:Hc,9115:Wc,9116:tc,9117:Wc,9118:Wc,9119:tc,9120:Wc,9121:jc,9122:Zc,9123:jc,9124:jc,9125:Zc,9126:jc,9127:Xd,9128:Wu,9129:ol,9130:[0,.3,0,0,.88889],9131:Xd,9132:Wu,9133:ol,9143:[.88502,.915,0,0,1.05556],10216:Kc,10217:Kc,57344:Vc,57345:Vc,57680:sl,57681:sl,57682:sl,57683:sl},"Typewriter-Regular":{32:nc,33:Wr,34:Wr,35:Wr,36:So,37:So,38:Wr,39:Wr,40:So,41:So,42:[0,.52083,0,0,.525],43:Zu,44:[.13889,.125,0,0,.525],45:Zu,46:[0,.125,0,0,.525],47:So,48:Wr,49:Wr,50:Wr,51:Wr,52:Wr,53:Wr,54:Wr,55:Wr,56:Wr,57:Wr,58:no,59:[.13889,.43056,0,0,.525],60:Yd,61:[-.19549,.41562,0,0,.525],62:Yd,63:Wr,64:Wr,65:Wr,66:Wr,67:Wr,68:Wr,69:Wr,70:Wr,71:Wr,72:Wr,73:Wr,74:Wr,75:Wr,76:Wr,77:Wr,78:Wr,79:Wr,80:Wr,81:[.13889,.61111,0,0,.525],82:Wr,83:Wr,84:Wr,85:Wr,86:Wr,87:Wr,88:Wr,89:Wr,90:Wr,91:So,92:So,93:So,94:Wr,95:[.09514,0,0,0,.525],96:Wr,97:no,98:Wr,99:no,100:Wr,101:no,102:Wr,103:Ca,104:Wr,105:Wr,106:[.22222,.61111,0,0,.525],107:Wr,108:Wr,109:no,110:no,111:no,112:Ca,113:Ca,114:no,115:no,116:[0,.55358,0,0,.525],117:no,118:no,119:no,120:no,121:Ca,122:no,123:So,124:So,125:So,126:Wr,127:Wr,160:nc,176:Wr,184:[.19445,0,0,0,.525],305:no,567:Ca,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:Wr,715:Wr,728:Wr,730:Wr,770:Wr,771:Wr,776:Wr,915:Wr,916:Wr,920:Wr,923:Wr,926:Wr,928:Wr,931:Wr,933:Wr,934:Wr,936:Wr,937:Wr,8216:Wr,8217:Wr,8242:Wr,9251:[.11111,.21944,0,0,.525]}},qd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,ll=10,ro=.25,Uc=1.2,hs=.431,ju={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[hs,hs,hs],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:[ro,ro,ro],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]},Gc=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ds=5,Vu={"\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 fs(a,y){a===void 0&&(a=77);const b=Jd[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 Vu)a=Vu[E].codePointAt(0);else if(qd.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 Xc={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]},cl={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 Ml(a){if(cl[a]){const[ye,we,Ne]=cl[a],qe=`<span class="stretchy" style="height:${Ne}em"><svg width="100%" height="${Ne}em" viewBox="0 0 ${ye} ${we}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Qd[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*Ne/2)/100}em;min-width:0">${qe}</span>`}const[y,b,E,ee]=Xc[a];let re,ae;const he=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 me=y.map((ye,we)=>`<span class="${re[we]}" style=height:${he}em><svg width=400em height=${he}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[we]} slice"><path fill="currentcolor" d="${Qd[ye]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${he}em;min-width:${b}em;">${me}</span>`}function eh(a){return Xc[a]?Xc[a][2]/1e3:cl[a][2]}function th(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=Ys(2,16)+re*Ys(2,10)+ae,b++}}y.push(E)}return y}var rc=8205,ic=[[rc,1],[65038,2],[127995,5],[129456,4],[917536,96]],As,El=[127462,127487];function kl(a){var y;if(As===void 0){As={};for(const b of ic)for(let E=b[0];E<=b[0]+b[1]-1;E++)As[E]=!0}return(y=As[a])!=null?y:!1}function nh(a){return a>=El[0]&&a<=El[1]}function rh(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=th(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===rc){const ae=E-1;for(E+=2;b[E]===rc;)E+=2;y.push(String.fromCodePoint(...b.slice(ae,E-ae+1)))}else if(kl(re)){const ae=E-1;for(;kl(b[E]);)E+=b[E]===rc?2:1;y.push(String.fromCodePoint(...b.slice(ae,2*E-ae-1)))}else nh(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var ih=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rh(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 Ts(a,y){var b,E,ee,re;const ae=[];let he=a.next();if(he&&he!=="\\relax"){if(he==="\\noexpand")he=a.next(),he&&ae.push(he);else if(he==="\\obeyspaces")a.obeyspaces=!0;else if(he==="\\bgroup")ae.push("<{>");else if(he==="\\egroup")ae.push("<}>");else if(he==="\\string"){if(he=a.next(),he)if(he.startsWith("\\"))for(const me of he)ae.push(me==="\\"?"\\backslash":me);else he==="<{>"?ae.push("\\{"):he==="<space>"?ae.push("~"):he==="<}>"&&ae.push("\\}")}else if(he==="\\csname"){for(;a.peek()==="<space>";)a.next();let me="",ye=!1,we=[];do{if(we.length===0)if(/^#[\d?@]$/.test(a.peek())){const Ne=a.get().slice(1);we=ps((E=(b=y==null?void 0:y(Ne))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),he=we[0]}else he=a.next(),we=he?[he]:[];ye=we.length===0,!ye&&he==="\\endcsname"&&(ye=!0,we.shift()),ye||(ye=he==="<$>"||he==="<$$>"||he==="<{>"||he==="<}>"||typeof he=="string"&&he.length>1&&he.startsWith("\\")),ye||(me+=we.shift())}while(!ye);me&&ae.push("\\"+me),ae.push(...we)}else if(he!=="\\endcsname")if(he.length>1&&he.startsWith("#")){const me=he.slice(1);ae.push(...ps((re=(ee=y==null?void 0:y(me))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else ae.push(he)}return ae}function ps(a,y=null){const b=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const he=ae.match(/((?:\\%)|[^%])*/);he!==null&&b.push(he[0])}const ee=new ih(Ve(b.join(""))),re=[];do re.push(...Ts(ee,y));while(!ee.end());return re}function Si(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 ra(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:Si([a,...y.map(b=>`{${b}}`)])}function Is(a){return Si(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var ah=class Bd{constructor(y){Bd._registry[y]=this}static createAtom(y,b,E){return Bd._registry[y].createAtom(b,Xe(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 oh(y)){const ae=Bd._registry[re[0].mode];ee.push(...ae.serialize(re,b))}return Si(ee)}return Si(ef(y,b))}static getFont(y,b,E){return Bd._registry[y].getFont(b,E)}};ah._registry={};var Co=ah;function oh(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 ya(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 Uu(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of oh(a)){const he=y.defaultMode;for(const me of ya(ae,"color")){const ye=me[0].computedStyle,we=Co._registry[me[0].mode].serialize(me,Me(Se({},y),{defaultMode:he==="text"?"text":"math"}));!y.skipStyles&&ye.color&&ye.color!=="none"&&(!E||ee!==ye.color)?re.push(ra("\\textcolor",(b=ye.verbatimColor)!=null?b:ye.color,Si(we))):re.push(Si(we))}}return re}function Qh(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return ya(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 ra("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,Si(Uu(ee,Me(Se({},y),{defaultMode:"text"}))))}return Si(Uu(ee,y))})}function ef(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 ya(a,"fontSize")){const ae=re[0].computedStyle.fontSize,he=Qh(re,y);he&&(ae&&ae!=="auto"&&(!b||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...he):ee.push(...he))}return ee}function Gu(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 _l(a){if(a.length===0)return"ord";const y=Gu(a[0].type),b=Gu(a[a.length-1].type);return y&&y===b?y:"ord"}function Ll(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 or=class Mp{constructor(y,b){var E,ee,re,ae,he;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:De(y)?this.children=y.filter(ye=>ye!==null):y&&y instanceof Mp&&(this.children=[y]),this.children)for(const ye of this.children)ye.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 me=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(me=(he=Co.getFont((ae=b.mode)!=null?ae:"math",this,Me(Se({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?he:void 0),me||(me="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),ac(this,me)}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=Ll(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=Ll(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"]=Ll(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"]=Ll(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"]=Ll(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=ut(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 yt of this.children)re+=yt.toMarkup();let ae="";if(this.svgBody)ae=Ml(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 yt=(b=this.cssProperties)==null?void 0:b.padding;yt?(ae+=`top:${yt};`,ae+=`left:${yt};`,ae+=`width:calc(100% - 2 * ${yt} );`):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 he="";const me=this.classes.split(" ");me.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&me.push("ML__latex-caret"),this.isSelected&&me.push("ML__selected");const ye=me.length===1?me[0]:me.filter((yt,_t,bn)=>yt.length>0&&bn.indexOf(yt)===_t).join(" ");if(ye.length>0&&(he+=` class="${ye}"`),this.id&&(he+=` data-atom-id=${this.id}`),this.cssId&&(he+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(he+=" "+Object.keys(this.attributes).map(yt=>`${yt}="${this.attributes[yt]}"`).join(" ")),this.htmlData){const yt=this.htmlData.split(",");for(const _t of yt){const bn=_t.match(/([^=]+)=(.+$)/);if(bn){const ir=bn[1].trim().replace(/ /g,"-");ir&&(he+=` data-${ir}="${bn[2]}" `)}else{const ir=_t.trim().replace(/ /g,"-");ir&&(he+=` data-${ir} `)}}}const we=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&we.width===void 0&&(we.width=`${Math.ceil(this._width*100)/100}em`);const Ne=Object.keys(we).map(yt=>`${yt}:${we[yt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&Ne.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const yt=this.htmlStyle.split(";");let _t="";for(const bn of yt){const ir=bn.match(/([^=]+):(.+$)/);if(ir){const yn=ir[1].trim().replace(/ /g,"-");yn&&(_t+=`${yn}:${ir[2]};`)}}_t&&(he+=` style="${_t}"`)}Ne.length>0&&(he+=` style="${Ne.join(";")}"`);let qe="";return he.length>0||ae.length>0?qe=`<span${he}>${re}${ae}</span>`:qe=re,this.caret==="text"?qe+='<span class="ML__text-caret"></span>':this.caret==="math"&&(qe+='<span class="ML__caret"></span>'),qe}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 me of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&me in y.cssProperties||this.cssProperties&&me 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 me of Object.keys(this.cssProperties))if(this.cssProperties[me]!==y.cssProperties[me])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),he=y.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==he.length)return!1;ae.sort(),he.sort();for(const[me,ye]of ae.entries())if(ye==="vertical-separator"||ye!==he[me])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 Xu(a){if(!a||a.length===0)return[];a[0].children=Xu(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=Xu(a[b].children),y.push(a[b]));return y}function Yc(a){return a.children&&(a.children=Xu(a.children)),a}function Jc(a,y){if(!a)return new or(null,y);const b=new or(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 or(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 or(E,Me(Se({},y),{type:"lift"}))}function No(a){const y=eh(a)/2,b=new or(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function ac(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=fs(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,he)=>ae+he.width,0),a.maxFontSize=re}}function qc(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 he=y[ae],me=-he.shift-re-he.box.depth,ye=me-(b.box.height+b.box.depth);re=re+me,E.push(ye),E.push(he),b=he}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 oc(a){var y;const[b,E]=qc(a);if(!b)return[[],0,0];const ee=new or(null,{classes:"pstrut"});let re=0;for(const _t of b)if(typeof _t!="number"){const bn=_t.box;re=Math.max(re,bn.maxFontSize,bn.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let he=E,me=E,ye=E,we=0;for(const _t of b){if(typeof _t=="number")ye+=_t;else{const bn=_t.box,ir=(y=_t.classes)!=null?y:[],yn=new or([ee,bn],{classes:ir.join(" "),style:_t.style});bn.setStyle("height",bn.height+bn.depth,"em"),bn.setStyle("display","inline-block"),yn.setStyle("top",-re-ye-bn.depth,"em"),_t.marginLeft&&yn.setStyle("margin-left",_t.marginLeft,"em"),_t.marginRight&&yn.setStyle("margin-right",_t.marginRight,"em"),ae.push(yn),ye+=bn.height+bn.depth,we=Math.max(we,yn.width)}he=Math.min(he,ye),me=Math.max(me,ye)}ae.forEach(_t=>{_t.softWidth=we});const Ne=new or(ae,{classes:"vlist"});if(Ne.softWidth=we,Ne.height=me,Ne.setStyle("height",me,"em"),he>=0)return[[new or(Ne,{classes:"vlist-r"})],me,-he];const qe=new or(new or(null),{classes:"vlist"});qe.height=-he,qe.setStyle("height",-he,"em");const yt=new or(8203,{classes:"vlist-s",maxFontSize:0});return yt.softWidth=0,yt.height=0,yt.depth=0,[[new or([Ne,yt],{classes:"vlist-r"}),new or(qe,{classes:"vlist-r"})],me,-he]}var Yi=class extends or{constructor(a,y){var b;const[E,ee,re]=oc(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,he)=>Math.max(ae,he.width),0)}};function tf(a,y){var b,E,ee,re,ae;const he=a.metrics,me=new or(y.base),ye=(b=y.baseShift)!=null?b:0,we=(E=y.slant)!=null?E:0;let Ne=0,qe=0;y.above&&(Ne=(ee=y.aboveShift)!=null?ee:Math.max(he.bigOpSpacing1,he.bigOpSpacing3-y.above.depth)),y.below&&(qe=(re=y.belowShift)!=null?re:Math.max(he.bigOpSpacing2,he.bigOpSpacing4-y.below.height));let yt=null;if(y.below&&y.above){const _t=he.bigOpSpacing5+y.below.height+y.below.depth+qe+me.depth+ye;yt=new Yi({bottom:_t,children:[he.bigOpSpacing5,{box:y.below,marginLeft:-we,classes:["ML__center"]},qe,{box:me,classes:["ML__center"]},Ne,{box:y.above,marginLeft:we,classes:["ML__center"]},he.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)yt=new Yi({top:me.height-ye,children:[he.bigOpSpacing5,{box:y.below,marginLeft:-we,classes:["ML__center"]},qe,{box:me,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const _t=me.depth+ye;yt=new Yi({bottom:_t,children:[{box:me,classes:["ML__center"]},Ne,{box:y.above,marginLeft:we,classes:["ML__center"]},he.bigOpSpacing5]}).wrap(a)}else{const _t=me.depth+ye;yt=new Yi({bottom:_t,children:[{box:me},he.bigOpSpacing5]}).wrap(a)}return new or(yt,{type:(ae=y.type)!=null?ae:"op"})}var Yu=7,ms=6,sc=5,Ps=4,ul=3,io=2,Po=1,Ha=0,Uo=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(ju).reduce((ee,re)=>Me(Se({},ee),{[re]:ju[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Go[[Ha,Po,Ha,Po,io,ul,io,ul][this.id]]}get sub(){return Go[[Ha,Ha,Ha,Ha,io,io,io,io][this.id]]}get fracNum(){return Go[[Ha,Po,Ha,Po,io,ul,Ps,sc][this.id]]}get fracDen(){return Go[[Ha,Ha,Ha,Ha,io,io,Ps,Ps][this.id]]}get cramp(){return Go[[Ha,Ha,io,io,Ps,Ps,ms,ms][this.id]]}get isTight(){return this.sizeDelta<0}},dl={7:new Uo(Yu,0,!1),6:new Uo(ms,0,!0),5:new Uo(sc,0,!1),4:new Uo(Ps,0,!0),3:new Uo(ul,-3,!1),2:new Uo(io,-3,!0),1:new Uo(Po,-4,!1),0:new Uo(Ha,-4,!0)},Go=Me(Se({},dl),{displaystyle:dl[Yu],textstyle:dl[sc],scriptstyle:dl[ul],scriptscriptstyle:dl[Po]});function Dl(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:ll,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=Ys(10,y);return Math.round(a.dimension/ll*E*ee)/ee}return a.dimension*E}function Ju(a,y){if(a===null)return 0;const b=Dl(a)/ll;if(Number.isFinite(y)){const E=Ys(10,y);return Math.round(b*E)/E}return b}function qu(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function sh(a){let y=qu(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${qu(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${qu(a.shrink)}`),y}function Ma(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=sh(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 Xo(a,y){return a==null?null:"number"in a?Me(Se({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?Me(Se({},a),{factor:a.factor*y}):Me(Se({},a),{factor:y}):"dimension"in a?Me(Se({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:Xo(a.glue,y),shrink:Xo(a.shrink,y),grow:Xo(a.grow,y)}:a.shrink?{glue:Xo(a.glue,y),shrink:Xo(a.shrink,y)}:a.grow?{glue:Xo(a.glue,y),grow:Xo(a.grow,y)}:{glue:Xo(a.glue,y)}:null}var nf={"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 Al(){return Se({},nf)}function Qc(){return{registers:Al(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:it.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:It,backgroundColorMap:et,getMacro:a=>jt(a,On())}}var Di=class Ep{constructor(y,b){var E,ee,re,ae,he,me,ye,we,Ne,qe,yt,_t,bn,ir,yn;let Nn;y!=null&&y.parent?(this.parent=y.parent,Nn=y.parent,this.registers={}):(Nn=Se(Se({},Qc()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=Nn.registers),Nn.atomIdsSettings&&(this.atomIdsSettings=Se({},Nn.atomIdsSettings)),this.renderPlaceholder=Nn.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=Nn.letterShapeStyle,this.minFontScale=Nn.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(me=(he=this.parent)==null?void 0:he.color)!=null?me:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(we=(ye=this.parent)==null?void 0:ye.backgroundColor)!=null?we:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((Ne=this.parent)==null?void 0:Ne.size)?this.size=b.fontSize:this.size=(yt=(qe=this.parent)==null?void 0:qe.size)!=null?yt:Ds;let dr=(bn=(_t=this.parent)==null?void 0:_t.mathstyle)!=null?bn:Go.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(Nn instanceof Ep)switch(y.mathstyle){case"cramp":dr=dr.cramp;break;case"superscript":dr=dr.sup;break;case"subscript":dr=dr.sub;break;case"numerator":dr=dr.fracNum;break;case"denominator":dr=dr.fracDen;break}switch(y.mathstyle){case"textstyle":dr=Go.textstyle;break;case"displaystyle":dr=Go.displaystyle;break;case"scriptstyle":dr=Go.scriptstyle;break;case"scriptscriptstyle":dr=Go.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=dr,this.smartFence=Nn.smartFence,this.placeholderSymbol=Nn.placeholderSymbol,this.colorMap=(ir=Nn.colorMap)!=null?ir:Kn=>Kn,this.backgroundColorMap=(yn=Nn.backgroundColorMap)!=null?yn:Kn=>Kn,this.getMacro=Nn.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===Yu||this.mathstyle.id===ms}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(Gc[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 Ju(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(Se({},re),{dimension:E*re.dimension}):"glue"in re?Me(Se({},re),{glue:Me(Se({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?Me(Se({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?Me(Se({},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:Dl(E,b)/ll}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}},Tl=["body","above","below","superscript","subscript"];function gs(a){return typeof a=="string"&&Tl.includes(a)}function lc(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Pn=class vl{constructor(y){var b,E,ee,re,ae,he;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=Se({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=y.captureSelection)!=null?ae:!1,this.skipBoundary=(he=y.skipBoundary)!=null?he:!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=lh(b),ae=[];for(const me of re){const ye=me[0].style,we=ch(y,me,{style:{color:ye.color,backgroundColor:ye.backgroundColor,fontSize:ye.fontSize}});we&&ae.push(we)}if(ae.length===0)return null;const he=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!he&&!(E!=null&&E.type)?ae[0].wrap(y):new or(ae,{classes:he,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return Co.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 vl({type:"mord",value:y,mode:"math"}):new vl(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=Se({},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=ed(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=Xe(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?Si([ra(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?Si([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return Co.serialize(this.body,Me(Se({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return Co.serialize(this.above,y)}belowToLatex(y){return Co.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=Me(Se({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Co.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=Co.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(gs(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of Tl)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(gs(y)),gs(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 lc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return lc(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=Se(Se({},(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=Se(Se({},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(gs(b)),!gs(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 vl({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(gs(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 Tl)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=Xe(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new Di({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 he=null,me=null;const ye=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let we=0;if(re){const bn=new Di({parent:y,mathstyle:"superscript"});he=vl.createBox(bn,re),ye||(we=ee.height-y.metrics.supDrop*bn.scalingFactor)}let Ne=0;if(ae){const bn=new Di({parent:y,mathstyle:"subscript"});me=vl.createBox(bn,ae),ye||(Ne=ee.depth+y.metrics.subDrop*bn.scalingFactor)}let qe;y.isDisplayStyle?qe=y.metrics.sup1:y.isCramped?qe=y.metrics.sup3:qe=y.metrics.sup2;const yt=.5/ll/y.scalingFactor;let _t=null;if(me&&he){we=Math.max(we,qe,he.depth+.25*y.metrics.xHeight),Ne=Math.max(Ne,y.metrics.sub2);const bn=y.metrics.defaultRuleThickness;if(we-he.depth-(me.height-Ne)<4*bn){Ne=4*bn-(we-he.depth)+me.height;const yn=.8*y.metrics.xHeight-(we-he.depth);yn>0&&(we+=yn,Ne-=yn)}const ir=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;_t=new Yi({individualShift:[{box:me,shift:Ne,marginLeft:ir},{box:he,shift:-we}]}).wrap(y)}else me&&!he?(Ne=Math.max(Ne,y.metrics.sub1,me.height-.8*hs),_t=new Yi({shift:Ne,children:[{box:me,marginRight:yt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!me&&he&&(we=Math.max(we,qe,he.depth+.25*hs),_t=new Yi({shift:-we,children:[{box:he,marginRight:yt}]}));return new or([ee,new or(_t,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?vl.createBox(new Di({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?vl.createBox(new Di({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):tf(y,Me(Se({},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 he=(E=this.value)!=null?E:this.body,me=(ee=b==null?void 0:b.boxType)!=null?ee:Gu(this.type);let ye=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(ye+=" ML__text");const we=typeof he=="string"||he===void 0?new or(he!=null?he:null,{type:me,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:Me(Se({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:ye}):(ae=vl.createBox(y,he,{type:me,classes:ye}))!=null?ae:new or(null);return y.isTight&&(we.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(we.italic=0),we.right=we.italic,this.bind(y,we),this.caret&&!this.superscript&&!this.subscript&&(we.caret=this.caret),we}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 lh(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 ch(a,y,b){var E,ee,re,ae,he;if(!y||y.length===0)return null;const me=new Di({parent:a},b.style),ye=!((E=me.atomIdsSettings)!=null&&E.groupNumbers);let we=[];if(y.length===1){const qe=y[0],yt=qe.render(me);yt&&(ye&&qe.isSelected&&yt.selected(!0),we=[yt])}else{let qe="",yt=!0;for(const _t of y){(ee=me.atomIdsSettings)!=null&&ee.groupNumbers&&qe&&(yt&&_t.isDigit()||!yt&&Qu(_t))&&(me.atomIdsSettings.overrideID=qe);const bn=_t.render(me);me.atomIdsSettings&&(me.atomIdsSettings.overrideID=void 0),bn&&((re=me.atomIdsSettings)!=null&&re.groupNumbers&&((_t.isDigit()||Qu(_t))&&(!qe||yt!==_t.isDigit())&&(yt=_t.isDigit(),qe=(ae=_t.id)!=null?ae:""),qe&&(!(_t.isDigit()||Qu(_t))||!_t.hasEmptyBranch("superscript")||!_t.hasEmptyBranch("subscript"))&&(qe="")),ye&&_t.isSelected&&bn.selected(!0),we.push(bn))}}if(we.length===0)return null;const Ne=new or(we,Me(Se({isTight:me.isTight},b),{type:(he=b.type)!=null?he:"lift"}));return Ne.isSelected=we.every(qe=>qe.isSelected),Ne.wrap(me)}function Qu(a){return a.mode==="text"}function ed(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof Pn?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var vs=class kp extends Pn{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 kp(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:tn("text",this.value.codePointAt(0))}};function cc(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&rf(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function rf(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Wa(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 Bs(a){return typeof a=="number"&&!Number.isNaN(a)}function eu(a){return Array.isArray(a)&&a.length===2}function tu(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function af(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 uh(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,he=!1,me=!1,ye=!1,we=!1,Ne=!1,qe=!1,yt=!1,_t=!1,bn=!1,ir=!1,yn=a[0],Nn=0;for(;yn!=null&&yn.type&&/^(subsup|placeholder)$/.test(yn.type);)Nn+=1,yn=a[Nn];return b=!yn||yn.type==="first",yn&&(bn=yn.mode==="text",E=!bn&&yn.type==="mord"&&de.test(yn.value),ee=!bn&&yn.type==="mord"&&/\d+$/.test(yn.value),re=!bn&&yn.isFunction,ae=yn.type==="genfrac",he=yn.type==="surd",me=yn.type==="mbin",ye=yn.type==="mrel",we=yn.type==="mop"||yn.type==="operator"||yn.type==="extensible-symbol",Ne=yn.type==="mpunct"||yn.type==="minner",qe=yn.type==="array",yt=yn.type==="mopen",_t=yn.type==="mclose"||yn.type==="leftright",ir=yn.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")&&he||y.after.includes("binop")&&me||y.after.includes("relop")&&ye||y.after.includes("operator")&&we||y.after.includes("punct")&&Ne||y.after.includes("array")&&qe||y.after.includes("openfence")&&yt||y.after.includes("closefence")&&_t||y.after.includes("text")&&bn||y.after.includes("space")&&ir?y.value:""}function td(a,y,b){return b?uh(a,b[y]):""}var dh={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 uc(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=fh(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",Ja(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function Ja(a,y){var b,E,ee;if(!a)return"";let re=!1,ae;const he=(b=y.inlineShortcuts)!=null?b:dh;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=Os(a.slice(1),{inlineShortcuts:he,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=Ja(ae.rest,y),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=Os(ae[2],{inlineShortcuts:he,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=Ja(ae.rest,y),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=Os(ae[2],{inlineShortcuts:he,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=Ja(ae.rest,y),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=Os(ae[1],{inlineShortcuts:he,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=Ja(ae.rest,y),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=Ja(ae[2],y),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hh(ae[1],he),a+=Ja(ae[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=Os(a.slice(1),{inlineShortcuts:he,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=Ja(ae.rest,y),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hh(ae[1],he),a+=Ja(ae[2],y),re=!0)),!re)if(ae=Os(a,{inlineShortcuts:he,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const me=Os(ae.rest.slice(1),{inlineShortcuts:he,noWrap:!0});me.match&&(a="\\frac{"+ae.match+"}{"+me.match+"}"+Ja(me.rest,y)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+Ja(ae.rest,y):ae.match+Ja(ae.rest,y),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+Ja(ae[2],y),re=!0)),a}function Os(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,he=1;for(;he<a.length&&ae>0;)a[he]===ee&&ae++,a[he]===re&&ae--,he++;ae===0?(y.noWrap&&ee==="("?b=Ja(a.substring(1,he-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+Ja(a.substring(1,he-1),y)+"\\right"+re),E=a.slice(Math.max(0,he))):(b=a.substring(1,he),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let he=td(null,a,y.inlineShortcuts);if(he)return he=he.replace("_{#?}",""),he=he.replace("^{#?}",""),{match:he,rest:a.slice(he.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 hh(a,y){let b=td(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var nd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function $s(a){const y=a.trim();for(const b of nd)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 fh(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=$s(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 nu="$$",of="$$",sf=(a,y,b)=>(nd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${nu} ${y} ${of}`),y),ph=class qh{constructor(y){qh._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)?qh._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]:Wa(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]:Wa(ee.selection);let ae=ee.getAtoms(re);if(ae.every(he=>he.mode==="text"||!he.mode))b.clipboardData.setData("text/plain",ae.filter(he=>he instanceof vs).map(he=>he.value).join(""));else if(ae.every(he=>he.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(he=>{var me;return(me=he.value)!=null?me:""}).join(""));else{let he;ae.length===1&&ae[0].verbatimLatex!==void 0?he=ae[0].verbatimLatex:he=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",he);try{b.clipboardData.setData("text/plain",y.options.onExport(y,he,re))}catch(me){}if(ae.length===1){const me=ae[0];(me.type==="root"||me.type==="group")&&(ae=me.body.filter(ye=>ye.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(me=>me.toJson())))}catch(me){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const me=window.MathfieldElement.computeEngine;if(me)try{const ye=me.jsonSerializationOptions;me.jsonSerializationOptions={metadata:["latex"]};const we=me.parse(ee.getValue(re,"latex-unstyled"));me.jsonSerializationOptions=ye;const Ne=JSON.stringify(we.json);Ne&&b.clipboardData.setData("application/json",Ne)}catch(ye){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return qh._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};ph._modes={};var si=ph,lf=[{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","^"]}],rd={"\\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 Fo(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function zo(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 Rs(a){const y=zo(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function id(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 ad(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),he=Math.ceil(y.top-E.top);return{left:ae,right:ae+ee,top:he,bottom:he+re}}function od(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=od(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 Il(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?od(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function mh(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 me=Math.floor(re.getBoundingClientRect().width)/ae;me=isNaN(me)?1:me;const ye=ad(a,Il(a,ee),me);if(ye){const we=id(ee);if(E.has(we)){const Ne=E.get(we);E.set(we,{left:Math.min(Ne.left,ye.left),right:Math.max(Ne.right,ye.right),top:Math.min(Ne.top,ye.top),bottom:Math.max(Ne.bottom,ye.bottom)})}else E.set(we,ye)}}return[...E.values()]}function sd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...mh(a,E,y)),[])}function ld(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function ru(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 gh=`@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;
|
|
|
}
|
|
|
`,Vi=`.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);
|
|
|
}
|
|
|
`,vh=`#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);
|
|
|
}
|
|
|
`,cf=`/* 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;
|
|
|
}
|
|
|
`,Pl=`/* 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);*/
|
|
|
}
|
|
|
`,uf=`.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));
|
|
|
}
|
|
|
`,iu=`: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;
|
|
|
}
|
|
|
`,df=`.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;
|
|
|
}
|
|
|
`,Ji;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=Vi;break;case"mathfield":y=gh;break;case"environment-popover":y=vh;break;case"suggestion-popover":y=cf;break;case"keystroke-caption":y=Pl;break;case"virtual-keyboard":y=uf;break;case"ui":y=iu;break;case"menu":y=df;break;default:debugger}return y}function Bl(a){return Ji||(Ji={}),Ji[a]||(Ji[a]=new CSSStyleSheet,Ji[a].replaceSync(hl(a))),Ji[a]}var ys;function Bo(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(ys||(ys={}),((y=ys[a])!=null?y:0)!==0)ys[a]+=1;else{const b=Bl(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],ys[a]=1}}function x(a){if("adoptedStyleSheets"in document&&ys!=null&&ys[a]&&(ys[a]-=1,ys[a]<=0)){const y=Ji[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class _p extends Pn{constructor(y){var b;super(Me(Se({},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 _p(y)}toJson(){return Me(Se({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new Di({parent:y,mathstyle:"cramp"},this.style),ee=(b=Pn.createBox(E,this.body))!=null?b:new or("\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,hs),he;if(this.svgAccent)he=No(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const ye=new or(this.accent,{fontFamily:"Main-Regular"});ye.italic=0;const we=this.accent===8407?" ML__accent-vec":"";he=new or(new or(ye),{classes:"ML__accent-body"+we})}he=new Yi({shift:0,children:[{box:new or(ee)},-ae,{box:he,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const me=new or(he,{type:"lift"});return this.caret&&(me.caret=this.caret),this.bind(E,me.wrap(E)),this.attachSupsub(E,{base:me})}},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 ce(a,y,b,E){var ee;const ae=new or(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)*ro),ae}function ge(a,y,b,E,ee){var re,ae;const he=new Di({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),me=new or(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(he);return b&&me.setTop((1-he.scalingFactor)*ro),me}function Ce(a,y,b,E,ee){var re;let ae,he,me,ye;ae=me=ye=ie(a),he=null;let we="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?me=ae=ye=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?me=ae=ye=8741:a==="\\uparrow"?me=ye=9168:a==="\\Uparrow"?me=ye=8214:a==="\\downarrow"?ae=me=9168:a==="\\Downarrow"?ae=me=8214:a==="\\updownarrow"?(ae=8593,me=9168,ye=8595):a==="\\Updownarrow"?(ae=8657,me=8214,ye=8659):a==="["||a==="\\lbrack"?(ae=9121,me=9122,ye=9123,we="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,me=9125,ye=9126,we="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(me=ae=9122,ye=9123,we="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,me=ye=9122,we="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(me=ae=9125,ye=9126,we="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,me=ye=9125,we="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,me=9116,ye=9117,we="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,me=9119,ye=9120,we="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,he=9128,ye=9129,me=9130,we="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,he=9132,ye=9133,me=9130,we="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,ye=9129,me=9130,we="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,ye=9133,me=9130,we="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,ye=9133,me=9130,we="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,ye=9129,me=9130,we="Size4-Regular"):a==="\\surd"?(ae=57345,ye=9143,me=57344,we="Size4-Regular"):a==="\\ulcorner"?(ae=9484,me=ye=32):a==="\\urcorner"?(ae=9488,me=ye=32):a==="\\llcorner"?(ye=9492,me=ae=32):a==="\\lrcorner"&&(ae=9496,me=ae=32);const Ne=fs(ae,we),qe=Ne.height+Ne.depth,yt=fs(me,we),_t=yt.height+yt.depth,bn=fs(ye,we),ir=bn.height+bn.depth;let yn=0,Nn=1;if(he!==null){const Ua=fs(he,we);yn=Ua.height+Ua.depth,Nn=2}const dr=qe+ir+yn,Kn=Math.max(0,Math.ceil((y-dr)/(Nn*_t))),Zr=dr+Kn*Nn*_t;let qr=ro;b&&(qr=qr*E.scalingFactor);const Vr=Zr/2-qr,Ti=.008,Ui=[];Ui.push({box:new or(ye,{fontFamily:we})}),Ui.push(-Ti);const xr=new or(me,{fontFamily:we});if(he===null)for(let Ua=0;Ua<Kn;Ua++)Ui.push({box:xr});else{for(let Ua=0;Ua<Kn;Ua++)Ui.push({box:xr});Ui.push(-Ti),Ui.push({box:new or(he,{fontFamily:we})}),Ui.push(-Ti);for(let Ua=0;Ua<Kn;Ua++)Ui.push({box:xr})}Ui.push(-Ti),Ui.push({box:new or(ae,{fontFamily:we})});let Wo="";we==="Size1-Regular"?Wo=" delim-size1":we==="Size4-Regular"&&(Wo=" delim-size4");const js=new Yi({bottom:Vr,children:Ui},{classes:Wo});return new or(js,Me(Se({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Le=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Re=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),gt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Lt=[0,1.2,1.8,2.4,3];function fn(a,y,b,E){return a===void 0||a==="."?Kr(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Le.has(a)||gt.has(a)?ge(a,y,!1,b,E):Re.has(a)?Ce(a,Lt[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var ln=[{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}],Bn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Wn=[{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 vr(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function Ar(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=fs(a,vr(b[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let he=ae.height+ae.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?he*=Math.max(Gc[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(he*=Math.max(Gc[Math.max(1,E.size-1)],E.minFontScale))),he>y)return b[re]}return b[b.length-1]}function Rr(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return Kr(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let ae;gt.has(y)?ae=ln:Le.has(y)?ae=Wn:ae=Bn;const he=Ar(ie(y),b,ae,ee),me=new Di({parent:ee,mathstyle:he.mathstyle},re==null?void 0:re.style);return he.type==="small"?ce(y,me,E,Me(Se({},re),{type:a})):he.type==="large"?ge(y,he.size,E,me,Me(Se({},re),{type:a})):(console.assert(he.type==="stack"),Ce(y,b,E,me,Me(Se({},re),{type:a})))}function Cr(a,y,b,E,ee,re){if(y===".")return Kr(ee,re==null?void 0:re.classes);const ae=ro*ee.scalingFactor,he=901,me=5/ll,ye=Math.max(b-ae,E+ae),we=Math.max(ye/500*he,2*ye-me);return Rr(a,y,we,!0,ee,re)}function Kr(a,y){const b=new or(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new Di({parent:a,mathstyle:"textstyle"}))}var Qr=class Lp extends Pn{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{}"}},ti=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Ci=["cases","dcases","rcases"],qi=["align","align*","aligned","gather","gathered","split"],Na=["array","subequations","eqnarray"];function da(a){return Na.concat(qi).concat(Ci).concat(ti).includes(a)}function co(a){return ti.includes(a)}function uo(a){return Ci.includes(a)}function Ea(a){return qi.includes(a)}function ho(a,y,b){let E=0;for(const ye of b)"align"in ye&&(E+=1);let ee=0;const re=[];for(const ye of y){let we=0;for(ee=Math.max(ee,Math.min(ye.length,E));we<ye.length;){const Ne=[],qe=Math.min(ye.length,we+E);for(;we<qe;){const yt=ye[we];yt.length===0?Ne.push([new Pn({type:"first",mode:a.mode})]):yt[0].type!=="first"?Ne.push([new Pn({type:"first",mode:a.mode}),...yt]):(console.assert(!yt.slice(1).some(_t=>_t.type==="first")),Ne.push(yt)),we+=1}re.push(Ne)}}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 ye of re){if(ye.length!==ee)for(let we=ye.length;we<ee;we++)ye.push([new Pn({type:"first",mode:a.mode}),new Qr]);ae.push(ye)}let he=0,me=0;for(const ye of ae){me=0;for(const we of ye){for(const Ne of we)Ne.parent=a,Ne.parentBranch=[he,me];me+=1}he+=1}return a.isDirty=!0,ae}var hi=class Dp extends Pn{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=ho(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 Dp(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=Me(Se({},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(lc(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return lc(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(gs(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,he;const me=new Di({parent:y,mathstyle:this.mathstyleName},this.style),ye=me.getRegisterAsEm("arrayrulewidth"),we=me.getRegisterAsEm("arraycolsep"),Ne=me.getRegisterAsEm("doublerulesep"),qe=(E=(b=this.arraystretch)!=null?b:me.getRegisterAsNumber("arraystretch"))!=null?E:1;let yt=typeof this.arraycolsep=="number"?this.arraycolsep:we;this.colSeparationType==="small"&&(yt=.2778*(new Di({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const _t=qe*Uc,bn=.7*_t,ir=.3*_t;let yn=0;const Nn=[];let dr=0;const Kn=this.array.length;for(let ea=0;ea<Kn;++ea){const wa=this.array[ea];dr=Math.max(dr,wa.length);const Ga=new Di({parent:me,mathstyle:this.mathstyleName},this.style);let Vs=bn/Ga.scalingFactor,Us=ir/Ga.scalingFactor;const Gs={cells:[],height:0,depth:0,pos:0};for(const ws of wa){const e0=(ee=Pn.createBox(Ga,ws,{type:"ignore"}))!=null?ee:new or(null,{type:"ignore"});Us=Math.max(Us,e0.depth),Vs=Math.max(Vs,e0.height),Gs.cells.push(e0)}let Xs=(re=Ju(this.rowGaps[ea]))!=null?re:0;Xs>0&&(Xs+=ir,Us=Math.max(Us,Xs),Xs=0),ea<Kn-1&&!co(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Us+=me.getRegisterAsEm("jot")),Gs.height=Vs,Gs.depth=Us,yn+=Vs,Gs.pos=yn,yn+=Us+Xs,Nn.push(Gs)}const Zr=yn/2+ro,qr=[];for(let ea=0;ea<dr;ea++){const wa=[];for(const Ga of Nn){const Vs=Ga.cells[ea];Vs.depth=Ga.depth,Vs.height=Ga.height,wa.push({box:Vs,shift:Ga.pos-Zr})}wa.length>0&&qr.push(new Yi({individualShift:wa}))}const Vr=[];let Ti=!1,Ui=!1,xr=0,Wo=!this.leftDelim;const{colFormat:js}=this;for(const ea of js){if("align"in ea&&xr>=qr.length)break;if("align"in ea)Ti?Vr.push(ha(2*yt)):(Ui||Wo)&&Vr.push(ha(yt)),Vr.push(new or(qr[xr],{classes:"col-align-"+ea.align})),xr++,Ti=!0,Ui=!1,Wo=!1;else if("gap"in ea){if(typeof ea.gap=="number")Vr.push(ha(ea.gap));else{const wa=ga(y,Nn,Zr,ea.gap);wa&&Vr.push(wa)}Ti=!1,Ui=!1,Wo=!1}else if("separator"in ea){const wa=new or(null,{classes:"vertical-separator"});wa.height=yn,wa.setStyle("height",yn,"em"),wa.setStyle("border-right",`${ye}em ${ea.separator} currentColor`),wa.setStyle("vertical-align",-(yn-Zr),"em");let Ga=0;Ui?Ga=Ne-ye:Ti&&(Ga=yt-ye),wa.left=Ga,Vr.push(wa),Ti=!1,Ui=!0,Wo=!1}}Ti&&!this.rightDelim&&Vr.push(ha(yt));const Qo=new or(Vr,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Qo.caret=this.caret),this.bind(y,Qo);const Ua=Qo.height,Zo=Qo.depth,Eo=this.bind(y,new or([this.bind(y,Cr("open",(ae=this.leftDelim)!=null?ae:".",Ua,Zo,me,{isSelected:this.isSelected})),Qo,this.bind(y,Cr("close",(he=this.rightDelim)!=null?he:".",Ua,Zo,me,{isSelected:this.isSelected}))],{type:"ord"}));return Eo?(Eo.setStyle("display","inline-block"),this.caret&&(Eo.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Eo}))):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(Pn.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}}`),Si(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 Pn({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(ma(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(ma(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,ma(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,ma(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 ma(a){const y=new Pn({type:"first",mode:a.mode});y.parent=a;const b=new Qr;return b.parent=a,[y,b]}function ha(a){const y=new or(null,{classes:"arraycolsep"});return y.width=a,y}function ga(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const ae=Pn.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-b}))}return new Yi({individualShift:ee}).wrap(a)}var ba=class Ap extends Pn{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 Ap(y)}toJson(){return Me(Se({},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=Pn.createBox(y,this.body,{type:"lift"});if(!ae)return null;const he=y.toEm((b=this.offset)!=null?b:{dimension:0});ae.depth+=he,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 me=new Di({parent:y},this.style),ye=me.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),we=new or(null,{classes:"ML__box"});we.height=ae.height+ye,we.depth=ae.depth+ye,we.setStyle("box-sizing","border-box"),we.setStyle("position","absolute"),we.setStyle("top",-ye+.3,"em"),we.setStyle("left",0),we.setStyle("height",we.height+we.depth,"em"),we.setStyle("width","100%"),this.backgroundcolor&&we.setStyle("background-color",(ee=me.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&we.setStyle("border",`${me.getRegisterAsEm("fboxrule",2)}em solid ${(re=me.toColor(this.framecolor))!=null?re:"black"}`),this.border&&we.setStyle("border",this.border);const Ne=new or([we,ae],{type:"lift"});return Ne.setStyle("display","inline-block"),Ne.setStyle("position","relative"),Ne.setStyle("line-height",0),Ne.height=ae.height+ye+(he>0?he:0),Ne.depth=ae.depth+ye+(he<0?-he:0),Ne.setStyle("padding-left",ye,"em"),Ne.setStyle("padding-right",ye,"em"),Ne.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*ye+Math.abs(he)))/100,"em"),Ne.setStyle("margin-top",-ye,"em"),Ne.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*ye-he))/100,"em"),Ne.setStyle("vertical-align",Math.floor(100*(ae.depth+2*ye))/100,"em"),this.caret&&(Ne.caret=this.caret),this.attachSupsub(y,{base:Ne})}_serialize(y){return y.skipStyles?Si([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},fl=class Tp extends Pn{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 Tp(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new or(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},vo=class Ip extends Pn{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Ip(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Za=class Pp extends Pn{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=Pn.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=Xe(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},$i=class Bp extends Pn{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"?Si(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?Si(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):Si([!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 Di({parent:y},this.style);console.assert(this.body!==void 0);const re=new Di({parent:y,mathstyle:"textstyle"},this.style),ae=(b=Pn.createBox(ee,this.body,{type:"inner"}))!=null?b:new or(null,{type:"inner"}),he=ae.height/re.scalingFactor,me=ae.depth/re.scalingFactor,ye=[];if(this.leftDelim&&ye.push(this.bind(re,Cr("open",this.leftDelim,he,me,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&(Pa(ae.children,this,ee,he,me),ye.push(ae)),this.rightDelim){let yt=this.containsCaret?" ML__contains-caret":"",_t=this.rightDelim;_t==="?"&&(ee.smartFence?(_t=this.matchingRightDelim(),yt+=" ML__smart-fence__close"):_t="."),ye.push(this.bind(re,Cr("close",_t,he,me,re,{isSelected:this.isSelected,classes:yt+" ML__close",mode:this.mode,style:this.style})))}let we=this.variant==="mleft...mright";const Ne=this.leftSibling;Ne&&(!we&&Ne.isFunction&&(we=!0),!we&&Ne.type==="subsup"&&((E=Ne.leftSibling)!=null&&E.isFunction)&&(we=!0));const qe=new or(ye,{type:we?"close":"inner",classes:"left-right"});return qe.setStyle("margin-top",`${-ae.depth}em`),qe.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(qe.caret=this.caret),this.bind(ee,qe.wrap(ee))}};function Pa(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,Cr("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&&Pa(ae.children,y,b,E,ee)}}var au=class Op extends Pn{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=Pn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},bs=class $p extends Pn{constructor(){super({type:"macro-argument"})}static fromJson(y){return new $p}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},Ns=class Rp extends Pn{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 Di({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Pn.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 he=new or(ae,{type:"ord"});he.setStyle("display","inline-block"),he.setStyle("height",ae.height+ae.depth,"em"),he.setStyle("vertical-align",-re,"em");let me="ML__prompt ";this.locked?me+=" ML__lockedPromptBox ":me+=" ML__editablePromptBox ",this.correctness==="correct"?me+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(me+=" ML__incorrectPromptBox "),this.containsCaret&&(me+=" ML__focusedPromptBox ");const ye=new or(null,{classes:me,attributes:{part:"prompt"}});ye.height=he.height+re,ye.depth=he.depth+re,ye.width=he.width+2*ee,ye.setStyle("box-sizing","border-box"),ye.setStyle("position","absolute"),ye.setStyle("height",he.height+he.depth+2*re,"em"),ee===0&&ye.setStyle("width","100%"),ee!==0&&(ye.setStyle("width",`calc(100% + ${2*ee}em)`),ye.setStyle("top",E,"em"),ye.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(ye.width=3*ee,ye.setStyle("width",`calc(100% + ${3*ee}em)`),ye.setStyle("left",-1.5*ee,"em"));let we="";this.correctness==="incorrect"&&(we+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),we&&(ye.svgOverlay=we);const Ne=new or([ye,he],{classes:"ML__prompt-atom"});return Ne.setStyle("position","relative"),Ne.setStyle("display","inline-block"),Ne.setStyle("line-height",0),Ne.height=he.height+re+.2,Ne.depth=he.depth+re,Ne.left=ee,Ne.right=ee,Ne.setStyle("height",he.height+re,"em"),Ne.setStyle("top",he.depth-he.height,"em"),Ne.setStyle("vertical-align",he.depth+re,"em"),Ne.setStyle("margin-left",.5,"em"),Ne.setStyle("margin-right",.5,"em"),this.caret&&(Ne.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:Ne}))}_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]"),ra(ee,E)}},Yo=class Np extends Pn{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new Np(y);for(const E of Tl)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new Di({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new or(null),ae=new or(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 ka(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var pl=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 Di&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new Di({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:Se({},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(Se({before:Is(this.tokens.slice(this.index,this.index+10)),after:Is(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 Se({},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 Yo({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=Xe(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?ja(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Qr({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();ka(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(ka(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 he="";for(;this.hasPattern(ae);)he+=this.get();if(!a&&(this.match(".")||this.match(",")))for(he+=".";this.hasPattern(ae);)he+=this.get();const me=a?Number.parseInt(he,re):Number.parseFloat(he);return Number.isNaN(me)?null:{number:E?-me:me,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()||!ka(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=Kt(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const he of y.params)if(he.isOptional)b.push(this.scanOptionalArgument(he.type));else{const me=this.scanArgument(he.type);me||this.onError({code:"missing-argument",arg:a}),b.push(me)}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 he=null;this.skipWhitespace(),this.match("[")&&(he=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(he!=null?he:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(he=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(he)));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=Xe(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 Za(y,this.parseMode,this.style);return b.verbatimLatex=Is(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 $i("",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(!ka(a)&&!a.startsWith("\\"))return null;this.next();const y=Xe(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 vo("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new vo("\\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 vo(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 $i(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 Pn({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new Pn({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(Ye(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(ka(a)){const b=Co.createAtom(this.parseMode,a,Se({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=Xe(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new vo(a)];if(b.definitionType==="symbol"){const E=Se({},this.style);b.variant&&(E.variant=b.variant),y=new Pn({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 vo(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 he=this.scanOptionalArgument("string"),me=this.scanOptionalArgument("math"),ye=Pn.serialize(me,{defaultMode:"math"});let we=[],Ne;!Ne&&ye==="correct"?Ne="correct":!Ne&&ye==="incorrect"?Ne="incorrect":ye!==""&&(we=me);const qe=this.scanOptionalArgument("string")==="locked",yt=this.scanArgument("auto");let _t;return yt&&Array.isArray(yt)&&yt.length>0?_t=yt:yt&&typeof yt=="object"&&"group"in yt?_t=yt.group:_t=we,he?[new Ns(he,Ne,qe,_t!=null?_t:we,{mode:this.parseMode,style:this.style})]:[new Qr({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const he=this.index,me=this.scanLiteralGroup()||this.next();if(!me)return null;if(this.context.registers[me.substring(1)]){const ye=this.scanArgument("string");ye!==null&&(this.context.registers[me.substring(1)]=ye);const we=Si([a,Is(this.tokens.slice(he,this.index))]);return[new Pn({type:"text",value:"",verbatimLatex:we})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=Xe(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(he=>new Pn({type:"text",value:he,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new vo(a)]);const ae=this.index;if(re.definitionType==="symbol"){const he=Se({},this.style);re.variant&&(he.variant=re.variant),ee=new Pn({type:re.type,command:a,style:he,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const he=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let me,ye=[];if(re.parse?ye=re.parse(this):[me,ye]=this.scanArguments(re),this.parseMode=he,re.applyMode&&!re.applyStyle&&!re.createAtom)return Ye(ye[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:ye,style:this.style,mode:this.parseMode}),me&&(ee.body=Ye(this.scanArgument(me)));else if(typeof re.applyStyle=="function"){const we=Se(Se({},this.style),re.applyStyle(a,ye,this.context)),Ne=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),me){const qe=this.style;this.style=we;const yt=this.scanArgument(me);return this.style=qe,this.parseMode=Ne,Ye(yt)}this.style=we}else ee=new Pn({type:"mord",command:(b=re.command)!=null?b:a,style:Se({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof Pn&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const he=Si([a,Is(this.tokens.slice(ae,this.index))]);he&&(ee.verbatimLatex=he)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const he=this.scanSmartFence();if(he)return[ee,he]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(ka(a)){const y=Co.createAtom(this.parseMode,a,Se({},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 vs(" "," ",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 he=this.scanLiteralGroup();if(!he){const me=this.index;this.scanExpression(),he=Is(this.tokens.slice(me,this.index))}re[ae]=he}return new au(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:Is(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:ja(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 ja(a,y){var b,E,ee,re;const ae=(b=y==null?void 0:y.args)!=null?b:void 0,he=new pl(ps(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:{}}),me=[];for(;!he.end();)me.push(...he.scan(()=>!1));return me}function t0(a,y){var b;const E=new pl(ps(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 Pn{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=la.go(Qn.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=ja(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(Se({},super.toJson()),{arg:this.arg})}render(y){const b=Pn.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}};bt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var Qn={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 he=Qn.stateMachines[y],me=he.transitions[b]||he.transitions["*"];e:for(var ye=0;ye<me.length;ye++){var we=Qn.patterns.match_(me[ye].pattern,a);if(we){for(var Ne=me[ye].task,qe=0;qe<Ne.action_.length;qe++){var yt;if(he.actions[Ne.action_[qe].type_])yt=he.actions[Ne.action_[qe].type_](E,we.match_,Ne.action_[qe].option);else if(Qn.actions[Ne.action_[qe].type_])yt=Qn.actions[Ne.action_[qe].type_](E,we.match_,Ne.action_[qe].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Ne.action_[qe].type_+")"];Qn.concatArray(ae,yt)}if(b=Ne.nextState||b,a.length>0){if(Ne.revisit||(a=we.remainder),!Ne.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=Qn.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 Qn.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return Qn.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return Qn.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return Qn.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return Qn.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return Qn.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return Qn.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return Qn.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return Qn.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return Qn.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return Qn.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 Qn.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return Qn.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return Qn.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return Qn.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 Qn.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return Qn.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return Qn.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return Qn.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return Qn.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return Qn.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=Qn.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,he,me,ye){var we=function(yn,Nn){if(typeof Nn=="string")return yn.indexOf(Nn)!==0?null:Nn;var dr=yn.match(Nn);return dr?dr[0]:null},Ne=function(yn,Nn,dr){for(var Kn=0;Nn<yn.length;){var Zr=yn.charAt(Nn),qr=we(yn.substr(Nn),dr);if(qr!==null&&Kn===0)return{endMatchBegin:Nn,endMatchEnd:Nn+qr.length};if(Zr==="{")Kn++;else if(Zr==="}"){if(Kn===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Kn--}Nn++}return Kn>0,null},qe=we(a,y);if(qe===null||(a=a.substr(qe.length),qe=we(a,b),qe===null))return null;var yt=Ne(a,qe.length,E||ee);if(yt===null)return null;var _t=a.substring(0,E?yt.endMatchEnd:yt.endMatchBegin);if(re||ae){var bn=this.findObserveGroups(a.substr(yt.endMatchEnd),re,ae,he,me);if(bn===null)return null;var ir=[_t,bn.match_];return{match_:ye?ir.join(""):ir,remainder:bn.remainder}}else return{match_:_t,remainder:a.substr(yt.endMatchEnd)}},match_:function(a,y){var b=Qn.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return Qn.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 Qn.go(y,"text")},"{text}":function(a,y){var b=["{"];return Qn.concatArray(b,Qn.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return Qn.go(y,"tex-math")},"tex-math tight":function(a,y){return Qn.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 Qn.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 Qn.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 he=0;he<ae.action_.length;he++)typeof ae.action_[he]=="string"&&(ae.action_[he]={type_:ae.action_[he]})}else ae.action_=[];for(var me=y.split("|"),ye=0;ye<me.length;ye++)if(E[ee]==="*")for(var we in re)re[we].push({pattern:me[ye],task:ae});else re[E[ee]].push({pattern:me[ye],task:ae})}return re},stateMachines:{}};Qn.stateMachines={ce:{transitions:Qn.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 Qn.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 Qn.concatArray(b,this.output(a)),Qn.concatArray(b,Qn.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=Qn.patterns.match_("orbital",a.o||""),ee=Qn.patterns.match_("one lowercase greek letter $",a.o||""),re=Qn.patterns.match_("one lowercase latin letter $",a.o||""),ae=Qn.patterns.match_("$one lowercase latin letter$ $",a.o||""),he=y==="-"&&(E&&E.remainder===""||ee||re||ae);he&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var me=[];return he?(Qn.concatArray(me,this.output(a)),me.push({type_:"hyphen"})):(E=Qn.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(Qn.concatArray(me,Qn.actions["d="](a,y)),Qn.concatArray(me,this.output(a))):(Qn.concatArray(me,this.output(a)),Qn.concatArray(me,Qn.actions.bond(a,y,"-")))),me},"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:Qn.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"&&Qn.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:Qn.go(a.a,"a"),b:Qn.go(a.b,"bd"),p:Qn.go(a.p,"pq"),o:Qn.go(a.o,"o"),q:Qn.go(a.q,"pq"),d:Qn.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=Qn.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=Qn.go(a.rd);var re;a.rqt==="M"?re=Qn.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=Qn.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 Qn.concatArray(b,Qn.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:Qn.go(y[0]),p2:Qn.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:Qn.go(y[0]),p2:Qn.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:Qn.go(y[0]),p2:Qn.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:Qn.go(y[0]),p2:Qn.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Qn.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:Qn.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:Qn.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:Qn.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:Qn.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:Qn.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Qn.go(y[1],"pq")}}}},bd:{transitions:Qn.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:Qn.go(y[1],"bd")}}}},oxidation:{transitions:Qn.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:Qn.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:Qn.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:Qn.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Qn.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]&&(Qn.concatArray(b,Qn.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?Qn.concatArray(b,Qn.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]),Qn.concatArray(b,Qn.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=Qn.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=Qn.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:Qn.go(a.d,"pu"),q:Qn.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_:"/"}),Qn.concatArray(y,ee.q))}else y=Qn.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:Qn.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=Qn.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=Qn.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:Qn.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 la={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+=la._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&la.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:la._goInner(a.a),b:la._goInner(a.b),p:la._goInner(a.p),o:la._goInner(a.o),q:la._goInner(a.q),d:la._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 "+la._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+la._goInner(a.p1);break;case"bond":if(y=la._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{"+la._goInner(a.p1)+"}{"+la._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+la._goInner(a.p1)+"}{"+la._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+la._goInner(a.p1)+"}{"+la._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+la._goInner(a.p1)+"}{"+la._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+la._goInner(a.p1)+"}_{"+la._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+la._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:la._goInner(a.rd),rq:la._goInner(a.rq)},ae=la._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=la._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 E1(a){}function k1(a){}var r0=class zp extends Pn{constructor(y){super(Me(Se({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new zp(y)}toJson(){return Me(Se({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new or(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Xe(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):ra(this.command,this.value)}},i0=class Kp extends Pn{constructor(y){super(Me(Se({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new Kp(y)}toJson(){return Me(Se({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=fn(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=Xe(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):ra(this.command,this.value)}},cd=class Hp extends Pn{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(Se({},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=Xe(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 ra(ee,this.bodyToLatex(y))}render(y){const b=new Di({parent:y},this.style),E=Pn.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 or(null,{classes:"ML__notation"});let he=E.height+E.depth+2*re;const me=E.width+2*re;let ye="";if(this.notation.horizontalstrike&&(ye+=this.line(3,50,97,50)),this.notation.verticalstrike&&(ye+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(ye+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(ye+=this.line(3,3,97,97)),this.notation.updiagonalarrow){ye+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const _t=.03*Math.sqrt(me*me+he*he)*1,bn=E.width*_t,ir=(E.depth+E.height)*_t,yn=re+E.width;let Nn=re;Nn+ir-.4*bn<0&&(Nn=.4*bn-ir),ye+='<polygon points="',ye+=`${yn},${Nn} ${yn-bn-.4*ir},${Nn+ir-.4*bn} `,ye+=`${yn-.7*bn},${Nn+.7*ir} ${yn-bn+.4*ir},${Nn+ir+.4*bn} `,ye+=`${yn},${Nn}`,ye+=`" stroke='none' fill="${this.strokeColor}"`,ye+="/>"}let we=0;if(this.notation.phasorangle){const qe=a0(b),yt=(E.height+E.depth+2*qe+re).toString(),_t=(E.height+E.depth)/2;ye+=this.line(re.toString(),yt,(re+_t+E.width).toString(),yt),ye+=this.line(re.toString(),yt,(re+_t).toString(),(re-qe).toString()),he+=qe,we=_t,E.left+=he/2-re}if(this.notation.longdiv){const qe=a0(b);he+=qe,ye+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const yt=.3;we=yt+qe,E.left+=yt+qe,E.setTop(re+qe),ye+='<path d="',ye+=`M ${re} ${re} a${yt} ${(E.depth+E.height+2*qe)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*qe} "`,ye+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,ye+="/>"}if(ae.width=E.width+2*re+we,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*he)/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),ye){let qe="";this.shadow==="auto"&&(qe+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(qe+=`filter: drop-shadow(${this.shadow})`),qe+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,qe+=' stroke-linecap="round"',this.svgStrokeStyle&&(qe+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=qe,ae.svgOverlay=ye}const Ne=new or([ae,E]);return Ne.setStyle("position","relative"),Ne.setStyle("vertical-align",re,"em"),Ne.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),Ne.setStyle("display","inline-block"),Ne.height=ae.height,Ne.depth=ae.depth,Ne.width=ae.width-2*re,Ne.left=re,Ne.right=re,this.caret&&(Ne.caret=this.caret),Ne.wrap(b)}line(y,b,E,ee){return`<line x1="${yh(y)}" y1="${yh(b)}" x2="${yh(E)}" y2="${yh(ee)}" vector-effect="non-scaling-stroke"></line>`}};function yh(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?hs:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var ou=class Wp extends Pn{constructor(y,b,E){var ee,re;super(Me(Se({},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),Se(Se({},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 Di({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new Di({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),he=this.numerPrefix?new or([new or(this.numerPrefix),Pn.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(b=Pn.createBox(ae,this.above,{type:"ignore"}))!=null?b:new or(null,{type:"ignore"}),me=new Di({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),ye=this.denomPrefix?new or([new or(this.denomPrefix),Pn.createBox(me,this.below,{type:"ignore"})]):(E=Pn.createBox(me,this.below,{type:"ignore"}))!=null?E:new or(null,{type:"ignore"}),we=this.hasBarLine?re.defaultRuleThickness:0;let Ne,qe=0,yt;ee.isDisplayStyle?(Ne=ae.metrics.num1,qe=we>0?3*we:7*we,yt=me.metrics.denom1):(we>0?(Ne=ae.metrics.num2,qe=we):(Ne=ae.metrics.num3,qe=3*re.defaultRuleThickness),yt=me.metrics.denom2);const _t=[];this.isSelected&&_t.push("ML__selected");const bn=he.depth,ir=ye.height;let yn;if(we<=0){const Vr=Ne-bn-(ir-yt);Vr<qe&&(Ne+=(qe-Vr)/2,yt+=(qe-Vr)/2),yn=new Yi({individualShift:[{box:he,shift:-Ne,classes:[..._t,"ML__center"]},{box:ye,shift:yt,classes:[..._t,"ML__center"]}]}).wrap(ee)}else{const Vr=new or(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Vr.softWidth=Math.max(he.width,ye.width),Vr.height=we/2,Vr.depth=we/2;const Ti=ro+we/2;Ne<qe+bn+Ti&&(Ne=qe+bn+Ti);const Ui=ro-we/2;yt<qe+ir-Ui&&(yt=qe+ir-Ui),yn=new Yi({individualShift:[{box:ye,shift:yt,classes:[..._t,"ML__center"]},{box:Vr,shift:-Ui,classes:_t},{box:he,shift:-Ne,classes:[..._t,"ML__center"]}]}).wrap(ee)}const Nn=ee.isDisplayStyle?re.delim1:re.delim2,dr=this.leftDelim?this.bind(y,Rr("open",this.leftDelim,Nn,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Kr(ee,"open");let Kn=null;this.continuousFraction?Kn=new or(null,{type:"close"}):this.rightDelim?Kn=this.bind(y,Rr("close",this.rightDelim,Nn,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Kn=Kr(ee,"close");const Zr=new or([dr,yn,Kn],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),qr=this.bind(y,Zr);return this.caret&&(qr.caret=this.caret),this.attachSupsub(y,{base:qr})}},qa=class Zp extends Pn{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),Se({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new or(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}},ud=class jp extends Pn{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new qa(b)),this.skipBoundary=!1}static fromJson(y){return new jp("")}toJson(){return super.toJson()}render(y){const b=Pn.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:""}},hf=class Vp extends Pn{constructor(y,b){super(Me(Se({},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 or(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-ro*y.scalingFactor,ae=ee.italic;ee.setTop(re);let he=ee;if(this.superscript||this.subscript){const me=(b=this.subsupPlacement)!=null?b:"auto";he=me==="over-under"||me==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(y,{base:ee})}return new or(this.bind(y,he),{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=Xe(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)),Si(E)}},dc=class Up extends Pn{constructor(y){const b=y.body;super(Me(Se({},y),{type:"overlap",body:typeof b=="string"?[new Pn({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),Se(Se({},super.toJson()),y)}render(y){const b=Pn.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new or([b,new or(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Jo=class Gp extends Pn{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?No(this.svgBody):Pn.createBox(y,this.body,{type:"ignore"});const E=new Di({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=No(this.svgAbove):this.above&&(ee=Pn.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=No(this.svgBelow):this.below&&(re=Pn.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new or([Kr(y,"open"),b,Kr(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 he=new or(y.base,{type:y.type});return he.setStyle("position","relative"),he}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 he=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Yi({bottom:he,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 Yi({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Yi({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]}));return new or(E,{type:y.type})}var dd=class Xp extends Pn{constructor(y){var b,E,ee,re;super(Me(Se({},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),Se(Se({},super.toJson()),y)}render(y){const b=new Di({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Pn.createBox(b,this.body,{classes:"inner"});const E=Pn.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new or(null,{classes:"fix"});return new or([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 Yi({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},hd=class Yp extends Pn{constructor(y){var b;super(Se({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 Yp(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 or(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new or(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 or(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=Xe(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}{${Ma(this.width)}}`:`${ee}${Ma(this.width)}`}},o0=class Jp extends Pn{constructor(y){var b;super(Me(Se({},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 Jp(Me(Se({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Xe(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")?ra(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:ra(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 Di({parent:y,mathstyle:"cramp"},this.style),ee=(b=Pn.createBox(E,this.body,{type:"inner"}))!=null?b:new or(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,he=y.isDisplayStyle?hs:ae,me=new or(null,{classes:"ML__sqrt-line",style:this.style});me.height=ae,me.softWidth=ee.width;let ye=re*(ae+he/4);const Ne=Math.max(re*2*he,ee.height+ee.depth)+ye+ae,qe=new Di({parent:y},this.style),yt=this.bind(qe,new or(Rr("inner","\\surd",Ne,!1,qe,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!yt)return null;const _t=yt.height+yt.depth-ae;_t>ee.height+ee.depth+ye&&(ye=(ye+_t-(ee.height+ee.depth))/2),yt.setTop(yt.height-ee.height-ye);const bn=this.bind(y,new Yi({firstBaseline:[{box:new or(ee)},ye-2*ae,{box:me},ae]})),ir=Pn.createBox(new Di({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!ir){const dr=new or([yt,bn],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return dr.setStyle("display","inline-block"),dr.setStyle("height",dr.height+dr.depth,"em"),this.caret&&(dr.caret=this.caret),this.bind(y,dr)}const yn=new Yi({shift:-.6*(Math.max(yt.height,bn.height)-Math.max(yt.depth,bn.depth)),children:[{box:ir}]}),Nn=new or([new or(yn,{classes:"ML__sqrt-index",type:"ignore"}),yt,bn],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return Nn.height=yt.height,Nn.depth=yt.depth,this.caret&&(Nn.caret=this.caret),this.bind(y,Nn)}},sm=class extends or{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 bh(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"){bh(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}},cm={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function um(a){pd(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 fd(a,y){if(!a.children)return a;const b=a.children;um(b);const E=y.getRegisterAsEm("thinmuskip"),ee=y.getRegisterAsEm("medmuskip"),re=y.getRegisterAsEm("thickmuskip");return pd(b,(ae,he)=>{var me,ye,we;if(!ae)return;const Ne=ae.type,qe=he.isTight?(me=cm[Ne])!=null?me:null:(ye=lm[Ne])!=null?ye:null,yt=(we=qe==null?void 0:qe[he.type])!=null?we:null;yt===3&&bh(he,E),yt===4&&bh(he,ee),yt===5&&bh(he,re)}),a}function pd(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=pd(E.children,y,b):E.type==="ignore"?pd(E.children,y):(y(b,E),pd(E.children,y),b=E);return b}var ff=class qp extends Pn{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new Pn({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new qp(Me(Se({},y),{tooltip:Ol(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(Se({},super.toJson()),{tooltip:b})}render(y){const b=Pn.createBox(new Di,this.body);if(!b)return null;const E=new Di({parent:y,mathstyle:"displaystyle"},{fontSize:Ds}),ee=Yc(fd(new or(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new or([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},hc=class Qp extends Pn{constructor(y,b){super(Me(Se({},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 or(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 or(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=Xe(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)),Si(E)}};function Ol(a){if(De(a))return a.map(E=>Ol(E));if(typeof a=="string")return Pn.fromJson(a);a=Se({},a);for(const E of Tl)a[E]&&(a[E]=Ol(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=Ol(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=hi.fromJson(a)),y==="box"&&(b=ba.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=fl.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=cd.fromJson(a)),y==="error"&&(b=vo.fromJson(a)),y==="extensible-symbol"&&(b=hf.fromJson(a)),y==="genfrac"&&(b=ou.fromJson(a)),y==="group"&&(b=Za.fromJson(a)),y==="latex"&&(b=qa.fromJson(a)),y==="latexgroup"&&(b=ud.fromJson(a)),y==="leftright"&&(b=$i.fromJson(a)),y==="macro"&&(b=au.fromJson(a)),y==="macro-argument"&&(b=bs.fromJson(a)),y==="operator"&&(b=hc.fromJson(a)),y==="overlap"&&(b=dc.fromJson(a)),y==="overunder"&&(b=Jo.fromJson(a)),y==="placeholder"&&(b=Qr.fromJson(a)),y==="prompt"&&(b=Ns.fromJson(a)),y==="phantom"&&(b=dd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=hd.fromJson(a)),y==="subsup"&&(b=Yo.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=vs.fromJson(a)),y==="tooltip"&&(b=ff.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=Pn.fromJson(a));for(const E of Tl)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=>Ol(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>Ol(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"]},pf={"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]$/,hm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,fm=[/^[a-z]$/,/^[A-Z]$/,l0,hm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends Co{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,ae;if(y===null)return new Pn({type:"mord",mode:"math",command:a,value:a,style:b});const he=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const ye=new Pn({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return he&&(ye.isFunction=!0),a.startsWith("\\")&&(ye.verbatimLatex=a),ye}const me=new Pn({type:"mord",mode:"math",command:(ae=y.command)!=null?ae:a,value:a,style:b});return he&&(me.isFunction=!0),a.startsWith("\\")&&(me.verbatimLatex=a),me}serialize(a,y){const b=gm(a,Me(Se({},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&&fm.forEach((he,me)=>{var ye;he.test(a.value)&&pm[(ye=y.letterShapeStyle)!=null?ye:"tex"][me]==="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 pf[b]&&!pf[b].test(a.value)?(a.value=nn(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=c0(b);return ya(a,"variant").map(ee=>{const re=c0(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 he=Si(ee.map(me=>me._serialize(y)));return ae?ra(ae,he):he})}function c0(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 ya(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?`{${ra("\\fontshape",ee)}${Si(E)}}`:re?ra(re,Si(E)):Si(E)})}function bm(a,y){return ya(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?`{${ra("\\fontseries",ee)}${Si(E)}}`:re?ra(re,Si(E)):Si(E)})}function xm(a,y){return ya(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} ${Si(re)}`:Si(re)})}function wm(a,y,b){return ya(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,y),he=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return he?`\\${he}{${Si(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${Si(ae)}}`:b?`\\text{${Si(ae)}}`:Si(ae)})}var u0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends Co{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new vs(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return wm(a,Me(Se({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,ae;const{fontFamily:he}=y;if(u0[he]?a.classes+=" "+u0[he]:he&&a.setStyle("font-family",he),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 me=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);me&&(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=me[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=me[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new Sm;var Cm=class extends Co{constructor(){super("latex")}createAtom(a){return new qa(a)}serialize(a,y){return a.filter(b=>b instanceof qa&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var Mm={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:["","=","","="]}},mf={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:["\\","|","",""]}},h0={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:[")",")",")",")"]}},Em={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:["=","=","=","="]}},km={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:["<",">","",""]}},_m={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:["=","=","=","="]}},Dm={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:["<",">","|",""]}},Am={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:[".",".",".","."]}},Tm={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"]}},Im={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 f0(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 su(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=[],gd;function gf(){switch(st()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Ko(a){(!a.platform||a.platform===gf())&&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 $m(a){if(a.code)return a;const y=Object.entries(vd().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,he]of y)if(he[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(Se({},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 Nm(a){gd=md.find(y=>a.startsWith(y.locale))}function vd(){return gd!=null?gd:md[0]}function Fm(){switch(gf()){case"apple":return mf;case"windows":return d0;case"linux":return h0}return mf}switch(gf()){case"apple":Ko(mf),Ko(Em),Ko(Tm),Ko(Lm);break;case"windows":Ko(d0),Ko(km),Ko(Im),Ko(Dm);break;case"linux":Ko(h0),Ko(_m),Ko(Pm),Ko(Am);break}Ko(Mm);function vf(a){var y;const b=/macos|ios/.test(st()),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 xh(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 fc(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 wh(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Sh(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var Fs=class yl{static get scrim(){return yl._scrim||(yl._scrim=new yl),yl._scrim}static open(y){yl.scrim.open(y)}static close(){yl.scrim.close()}static get state(){return yl.scrim.state}static get element(){return yl.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=Sh();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:"",Sh()!==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,he=!1;const me=new AbortController,ye=me.signal;return a.addEventListener("keydown",we=>{if(re||we.key==="Process"||we.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(we.code)){E=null;return}E=we,ee=null,b.onKeystroke(we)?a.textContent="":E=null},{capture:!0,signal:ye}),a.addEventListener("keypress",we=>{re||(E&&ee&&b.onKeystroke(E),ee=we)},{capture:!0,signal:ye}),a.addEventListener("compositionstart",we=>{a.textContent="",re=!0,b.onCompositionStart(we.data)},{capture:!0,signal:ye}),a.addEventListener("compositionupdate",we=>{re&&b.onCompositionUpdate(we.data)},{capture:!0,signal:ye}),a.addEventListener("compositionend",we=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(we.data))},{capture:!0,signal:ye}),a.addEventListener("beforeinput",we=>we.stopImmediatePropagation(),{signal:ye}),a.addEventListener("input",we=>{var Ne;if(!re&&(a.textContent="",we.inputType!=="insertCompositionText")){if(we.inputType==="insertFromPaste"){we.preventDefault(),we.stopPropagation();return}b.onInput((Ne=we.data)!=null?Ne:""),we.preventDefault(),we.stopPropagation()}},{signal:ye}),a.addEventListener("paste",we=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(we)||we.preventDefault(),we.stopImmediatePropagation()},{signal:ye}),a.addEventListener("cut",we=>b.onCut(we),{capture:!0,signal:ye}),a.addEventListener("copy",we=>b.onCopy(we),{capture:!0,signal:ye}),a.addEventListener("blur",we=>{var Ne,qe;if(((qe=(Ne=we.relatedTarget)==null?void 0:Ne._mathfield)==null?void 0:qe.element)===y){a.focus({preventScroll:!0}),we.preventDefault(),we.stopPropagation();return}const yt=Fs.state;if(yt==="open"||yt==="opening"){we.preventDefault(),we.stopPropagation();return}if(we.relatedTarget===we.target.getRootNode().host){we.preventDefault(),we.stopPropagation();return}he||ae||(he=!0,E=null,ee=null,b.onBlur(),he=!1)},{capture:!0,signal:ye}),a.addEventListener("focus",we=>{he||ae||(ae=!0,b.onFocus(),ae=!1)},{capture:!0,signal:ye}),{dispose:()=>me.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:()=>Sh()===a,setAriaLabel:we=>a.setAttribute("aria-label",we),setValue:we=>{var Ne;a.textContent=we,a.style.left="-1000px",(Ne=window.getSelection())==null||Ne.selectAllChildren(a)},moveTo:(we,Ne)=>{a.style.top=`${Ne}px`,a.style.left=`${we}px`}}}function lu(a){var y;if(!a||!wh(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=$m(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(vt()){const y=st(),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=su(f0(p0(b))),ee=su({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(st()),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 De(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function jm(a,y){let b=[];if(typeof y=="string"){const re=rd[y];De(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(vf)}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=f0(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=st()==="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(Se({},a),{key:su(b)});const ee=Om(b.key,y);if(!ee)return Me(Se({},a),{key:su(b)});if(ee.shift&&b.shift||ee.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yf(a.command)}) is conflicting with the key combination ${su(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(Se({},a),{key:su(ee)})}function yf(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(he=>he.key===re.key&&he.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${yf(ee.command)}) matches ${ae.key} (${yf(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 si{constructor(){super("latex")}createAtom(a){return new qa(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"}),va(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(Wa(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 me of y)oe.test(me)&&re.push(new qa(me));let ae=a.at(a.position);if(ae instanceof ud&&(ae=ae.lastChild),!(ae.parent instanceof ud)){const me=new ud("");ae.parent.addChildAfter(me,ae),ae=me.firstChild}const he=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(he)):he&&(a.position=a.offsetOf(he))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function yd(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 me=a.at(E);ee=me instanceof qa&&me.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,he=!1;for(;ae<=re&&!he;){const me=a.at(ae);he=!(me instanceof qa&&me.isSuggestion),he||ae++}return[E-1,ae-1]}new Gm;function Ch(a){const y=yd(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 bd(a,y){var b;const{model:E}=a;Ch(a);for(const we of yd(E))we.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){uu(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof qa&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof qa&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof qa&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(we=>we.value).join(""),he=Ft(a,ae);if(he.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const we of ee)we.isError=!0;uu(a);return}const me=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=me<0?he.length-1:me%he.length;const ye=he[a.suggestionIndex];if(ye!==ae){const we=ee[ee.length-1];we.parent.addChildrenAfter([...ye.slice(ae.length-ye.length)].map(Ne=>new qa(Ne,{isSuggestion:!0})),we),pc(a,{interactive:!0})}Jm(a,he)}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 cu(a,y="accept",b){var E,ee;uu(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const ye=yd(a.model).filter(we=>we.isSuggestion);if(ye.length!==0){for(const we of ye)we.isSuggestion=!1;a.model.position=a.model.offsetOf(ye[ye.length-1])}if(y==="accept-suggestion")return ye.length!==0}const he=yd(a.model).filter(ye=>!ye.isSuggestion).map(ye=>ye.value).join(""),me=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(me),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(si.insert(a.model,he,{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 Mh(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 bf(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 Ym(a,y){const b=new Di({from:a.context}),E=new Pn({mode:"math",type:"root",body:ja(y,{context:b})}),ee=Yc(fd(new or(E.render(b),{classes:"ML__base"}),b));return Jc(ee,{classes:"ML__latex"}).toMarkup()}function Jm(a,y){var b;if(y.length===0){uu(a);return}let E="";for(const[re,ae]of y.entries()){const he=ae,me=Ym(a,ae),ye=jm(a.keybindings,he).join("<br>");E+=`<li role="button" data-command="${he}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${he}</span><span class="ML__popover__command">${me}</span>`,ye&&(E+=`<span class="ML__popover__keybinding">${ye}</span>`),E+="</li>"}const ee=qm(a,`<ul>${E}</ul>`);xf()&&((b=ee.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xf()&&(ee.classList.add("is-visible"),Eh(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xf(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function Eh(a,y){var b;if(!a.element||a.element.mathfield!==a||!xf())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){uu(a);return}if(y!=null&&y.deferred){setTimeout(()=>Eh(a),32);return}const E=Rs(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,he=window.innerHeight-document.documentElement.clientHeight,me=window.mathVirtualKeyboard.boundingRect.height,ye=document.getElementById("mathlive-suggestion-popover");E.x+ye.offsetWidth/2>re-ae?ye.style.left=`${re-ye.offsetWidth-ae}px`:E.x-ye.offsetWidth/2<0?ye.style.left="0":ye.style.left=`${E.x-ye.offsetWidth/2}px`;const we=E.y-E.height;ee-he-me-E.y<we?(ye.classList.add("ML__popover--reverse-direction"),ye.classList.remove("top-tip"),ye.classList.add("bottom-tip"),ye.style.top=`${E.y-E.height-ye.offsetHeight-15}px`):(ye.classList.remove("ML__popover--reverse-direction"),ye.classList.add("top-tip"),ye.classList.remove("bottom-tip"),ye.style.top=`${E.y+15}px`)}function uu(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function qm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Mh("mathlive-suggestion-popover"),Bo("suggestion-popover"),Bo("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(cu(a,"reject"),si.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")&&(bf("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 kh=null,y0,b0,wf=((b0=(y0=globalThis==null?void 0:globalThis.document)==null?void 0:y0.currentScript)==null?void 0:b0.src)||eg();function x0(a){return zl(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(kh===null)try{const y=yield fetch(wf,{method:"HEAD"});y.status===200&&(kh=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${wf}")`)}return new URL(a,kh!=null?kh:wf).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var Ho="not-loaded";function ng(){return zl(this,null,function*(){return Ho="not-loaded",_h()})}function _h(){return zl(this,null,function*(){var a;if(Ho!=="not-loaded")return;if(Ho="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){Ho="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))){Ho="ready";return}if(!window.MathfieldElement.fontsDirectory){Ho="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),Ho="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(he=>{try{return he.load()}catch(me){}}))).forEach(he=>document.fonts.add(he)),Ho="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")}Ho="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 va(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Fo(a)&&a.dirty&&(a.atomBoundsCache=new Map,pc(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new Di({from:Me(Se({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(Pn.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 Jc(fd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function w0(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 pc(a,y){if(!Fo(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=w0(a,y);const he=a.element.querySelector("[part=menu-toggle]");if(he&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?he.style.display="none":he.style.display=""),a.model.atoms.length<=1){const me=a.options.contentPlaceholder;me&&(ae+=`<span part=placeholder class="ML__content-placeholder">${Va(me)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Lh(a,y.interactive),a.dirty=!1}function Lh(a,y){const b=a.field;if(!b)return;for(const he of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))he.remove();!(y!=null&&y)&&Ho!=="error"&&Ho!=="ready"&&setTimeout(()=>{Ho==="ready"?Lh(a):setTimeout(()=>Lh(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){Eh(a,{deferred:!0});let he=E.at(E.position);for(;he&&he.type!=="prompt"&&!(he.containsCaret&&he.displayContainsHighlight);)he=he.parent;if(he!=null&&he.containsCaret&&he.displayContainsHighlight){const me=ad(a,Il(a,he),ae);if(me){me.left/=ae,me.right/=ae,me.top/=ae,me.bottom/=ae;const ye=document.createElement("div");ye.classList.add("ML__contains-highlight"),ye.style.position="absolute",ye.style.left=`${me.left+1}px`,ye.style.top=`${Math.ceil(me.top)}px`,ye.style.width=`${Math.ceil(me.right-me.left)}px`,ye.style.height=`${Math.ceil(me.bottom-me.top)}px`,b.insertBefore(ye,b.childNodes[0])}}return}for(const he of ag(sd(a,{excludeAtomsWithBackground:!0}))){he.left/=ae,he.right/=ae,he.top/=ae,he.bottom/=ae;const me=document.createElement("div");me.classList.add("ML__selection"),me.style.position="absolute",me.style.left=`${he.left}px`,me.style.top=`${he.top}px`,me.style.width=`${Math.ceil(he.right-he.left)}px`,me.style.height=`${Math.ceil(he.bottom-he.top-1)}px`,b.insertBefore(me,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 S0=3,zs;function Oo(a,y){y=Se({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),zs||(zs={});for(const b of Object.keys(a))console.assert(!zs[b],"Selector already defined: ",b),zs[b]=Me(Se({},y),{fn:a[b]})}function Sf(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sf(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),zs[y]}function du(a){var y;return(y=Sf(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,ae=!1;De(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,ye=>ye[1].toUpperCase());const he=zs[E],me=he==null?void 0:he.target;if(me==="model"){if(!a.isSelectionEditable&&(he!=null&&he.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Ch(a),zs[E].fn(a.model,...ee),bd(a),ae=!0,re=!0}else if(me==="virtual-keyboard")ae=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(zs[E]){if(!a.isSelectionEditable&&(he!=null&&he.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=zs[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return me!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||he!=null&&he.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),he!=null&&he.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&va(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&dt()&&navigator.vibrate(S0);const E=Sf(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}Oo({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return bd(a,{atIndex:a.suggestionIndex+1}),!1}function cg(a){return bd(a,{atIndex:a.suggestionIndex-1}),!1}Oo({complete:cu},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Oo({nextSuggestion:lg,previousSuggestion:cg},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Dh="mathlive#virtual-keyboard-message";function Cf(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Dh}var ug=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(Cf(y)){if(!ld(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;du(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(Se({type:Dh,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]"]]}},Ah={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"}]},xd;function M0(a,y){var b,E,ee;const re=$l.singleton;if(!re)return;const ae=hu(a),he=(E=(b=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:b.variants)!=null?E:"";if(typeof he=="string"&&!E0(he)||Array.isArray(he)&&he.length===0){y==null||y();return}const me={};let ye="";for(const bn of hg(he)){const ir=_0(bn),yn=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);me[yn]=ir;const[Nn,dr]=Th(ir);ye+=`<div id=${yn} class="item ${dr}">${Nn}</div>`}const we=document.createElement("div");we.setAttribute("aria-hidden","true"),we.className="MLK__variant-panel",we.style.height="auto";const Ne=Object.keys(me).length;let qe=5;Ne===1?qe=1:Ne===2||Ne===4?qe=2:Ne===3||Ne===5||Ne===6?qe=3:Ne>=7&&Ne<14&&(qe=4),we.style.width=`calc(var(--variant-keycap-length) * ${qe} + 12px)`,we.innerHTML=vp.createHTML(ye),Fs.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:we}),xd=new AbortController;const{signal:yt}=xd,_t=a==null?void 0:a.getBoundingClientRect();if(_t){_t.top-we.clientHeight<0&&(we.style.width="auto",Ne<=6?we.style.height="56px":Ne<=12?we.style.height="108px":Ne<=18?we.style.height="205px":we.classList.add("compact"));const bn=Math.max(0,Math.min(window.innerWidth-we.offsetWidth,(_t.left+_t.right-we.offsetWidth)/2)),ir=_t.top-we.clientHeight+5;we.style.transform=`translate(${bn}px, ${ir}px)`,we.classList.add("is-visible"),requestAnimationFrame(()=>{we.addEventListener("pointerup",yn=>{const Nn=hu(yn.target);!(Nn!=null&&Nn.id)||!me[Nn.id]||(Mf(me[Nn.id]),wd(),y==null||y(),yn.preventDefault())},{capture:!0,passive:!1,signal:yt}),we.addEventListener("pointerenter",yn=>{const Nn=hu(yn.target);!(Nn!=null&&Nn.id)||!me[Nn.id]||Nn.classList.add("is-active")},{capture:!0,signal:yt}),we.addEventListener("pointerleave",yn=>{const Nn=hu(yn.target);!(Nn!=null&&Nn.id)||!me[Nn.id]||Nn.classList.remove("is-active")},{capture:!0,signal:yt}),window.addEventListener("pointercancel",()=>{wd(),y==null||y()},{signal:yt}),window.addEventListener("pointerup",()=>{wd(),y==null||y()},{signal:yt})})}}function wd(){xd==null||xd.abort(),xd=null,Fs.state==="open"&&Fs.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(Ue))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ue[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(He))y.push({class:"swatch-button",label:'<span style="background:'+He[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function E0(a){return Ah[a]!==void 0}function hg(a){var y;return typeof a!="string"?a:(Ah[a]||(Ah[a]=(y=dg(a))!=null?y:[]),Ah[a])}function fg(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} {${fg(a[y])}}`).join("")}function Sd(a){if(!a)return"";const y=new Di,b=new Pn({mode:"math",type:"root",body:ja(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=Yc(fd(new or(b.render(y),{classes:"ML__base"}),y));return Jc(E,{classes:"ML__latex"}).toMarkup()}function Cd(a){var y;if(Array.isArray(a))return a.map(E=>Cd(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=>_0(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 he=vd();he&&(E=he.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[it.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 he of re){const me=[];for(const ye of he)/[a-z]/.test(ye)?me.push({label:ye,class:"hide-shift",shift:{label:ye.toUpperCase()},variants:E0(ye)?ye:void 0}):ye==="~"?E!=="dvorak"?me.push("[backspace]"):me.push({label:"[backspace]",width:1}):ye==="^"?me.push("[shift]"):ye===" "&&me.push("[separator-5]");ae.push(me)}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:Cd({rows:ae})}}function k0(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}"`),k0(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=ct(ee,["rows"]);y=Me(Se({},ae),{layers:Cd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=ct(ee,["markup"]);y=Me(Se({},ae),{layers:Cd(a.markup)})}else y=Se({},a),"layers"in a?y.layers=Cd(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()){fu(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 he=ae,me=[re===y?"selected":"layer-switch"];he.tooltip&&me.push("MLK__tooltip"),he.labelClass&&me.push(...he.labelClass.split(" ")),ee+=`<div class="${me.join(" ")}"`,he.tooltip&&(ee+=" data-tooltip='"+((b=mt(he.tooltip))!=null?b:he.tooltip)+"' "),re!==y&&(ee+=`data-layer="${he.layers[0].id}"`),ee+=`>${(E=he.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='${mt("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${mt("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${mt("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${mt("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${mt("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=$l.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]=Th(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){Bo("virtual-keyboard"),Bo("core"),_h()}function wg(){x("core"),x("virtual-keyboard")}var Sg=`<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(Sg+a.normalizedLayouts.map((ae,he)=>Mg(a,ae,he)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",kg,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",he=>{var me,ye;let we=he.target,Ne="";for(;we&&!Ne;)Ne=(me=we==null?void 0:we.getAttribute("data-command"))!=null?me:"",we=(ye=we==null?void 0:we.parentElement)!=null?ye:null;Ne&&a.executeCommand(JSON.parse(Ne))});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",he=>he.preventDefault());return a.currentLayer=a.latentLayer,y}function Mg(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(Eg(a,ee)),E.push("</div>");return E.join("")}function Eg(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,he]=Th(ee);/(^|\s)separator/.test(he)?b+=`<div class="${he}"`:b+=`<div tabindex="-1" id="${re}" class="${he}"`,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 Th(a,y={shifted:!1}){var b,E,ee,re,ae,he,me;let ye="",we=(b=a.class)!=null?b:"";if(y.shifted&&fu(a)&&(we+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?ye=Sd(a.shift):typeof a.shift=="object"&&(ye=a.shift.label?a.shift.label:(E=Sd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(we=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(ye=a.label?a.label:(ae=Sd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let Ne;typeof a.shift=="string"?Ne=Sd(a.shift):a.shift.label?Ne=a.shift.label:Ne=(he=Sd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?he:"",ye+=`<span class="MLK__shift">${Ne}</span>`}a.aside&&(ye+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(we)&&(we+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(we)||(we+=" MLK__keycap"),!/\bw[0-9]+\b/.test(we)&&a.width&&(we+=(me={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?me:""),[ye,we||"MLK__keycap"]}var mc={"[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 _0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!mc[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&mc[a.label]&&(b=Me(Se(Se({},mc[a.label]),a),{label:mc[a.label].label})),"key"in a&&a.key&&mc[a.key]&&(b=Me(Se(Se({},mc[a.key]),a),{key:mc[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var Md;function kg(a){var y;if(a.button!==0)return;const b=$l.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=hu(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,he=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Ih(ae),{capture:!0,signal:he}),ee.addEventListener("pointerleave",Ih(ae),{capture:!0,signal:he}),ee.addEventListener("pointercancel",Ih(ae),{signal:he}),ee.addEventListener("pointerup",Ih(ae),{signal:he}),fu(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(Md&&clearTimeout(Md),Md=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),M0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Ih(a){return y=>{const b=hu(y.target);if(!(b!=null&&b.id))return;const E=$l.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"),fu(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"),fu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){Md&&clearTimeout(Md),fu(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"}]):Mf(ee.shift):Mf(ee),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function Mf(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=$l.singleton)==null||y.executeCommand(b)}function _g(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 hu(a){if(!a)return;let y=a;for(;y&&!_g(y);)y=y.parentElement;return y!=null?y:void 0}function fu(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var $l=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"&&nt()&&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=>k0(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]=Th(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}),wd(),wg(),(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)&&M0(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Cf(y)){if(!ld(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=du(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:Se({type:Dh,action:y},b)}));return}if(E)E.postMessage(Se({type:Dh,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=du(y);return De(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=du(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?zs[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=Sh(),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(vt()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=$l.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ug.singleton,configurable:!0});function Ph(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(De(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(he=>parseInt(he.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=$l.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?it.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=ze(a.macros);break;default:De(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=Se({},a[b]):y[b]=a[b]}return y}function gc(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:De(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=Se({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Bh(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:It,backgroundColorMap:et,letterShapeStyle:it.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:lf,inlineShortcuts:dh,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sf,value:""}}function D0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function Rl(a,y){!a||!y||(De(a)?a.forEach(b=>Rl(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),Rl(a.body,y),Rl(a.above,y),Rl(a.below,y),Rl(a.subscript,y),Rl(a.superscript,y)))}function Ef(a,y,b,E){function ee(ae,he){for(const me of re)if(me.style[ae]!==he)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=Ds),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 fl(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Dg(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}pn(["math","displaymath"],qo),pn("center",qo),bt("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 hi("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Cn("array","{columns:colspec}",(a,y,b,E)=>new hi(a,kf(y),b,{columns:E[0],mathstyleName:"textstyle"})),Cn(["equation","equation*","subequations"],"",(a,y,b)=>new hi(a,kf(y),b,{columns:[{align:"c"}]})),Cn(["multline","multline*"],"",qo),Cn(["align","align*","aligned","eqnarray"],"",qo),Cn("split","",qo),Cn(["gather","gathered"],"",qo),Cn(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",qo),Cn(["smallmatrix","smallmatrix*"],"[columns:colspec]",qo),Cn(["cases","dcases","rcases"],"",qo);function Ag(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function kf(a,y=1){return Ag(a)?Array(y).fill([[new Pn({type:"first"}),new Qr]]):a.map(b=>b.length===0?[[new Pn({type:"first"})]]:b.map(E=>E.length===0?[new Pn({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Pn({type:"first"})),E)))}function qo(a,y=[[[]]],b=[],E=[]){switch(y=kf(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new hi(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new hi(a,y,b,{mathstyleName:"textstyle"});case"center":return new hi(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new hi(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new hi(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new hi(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new hi(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:vc(E[0])});case"bmatrix":case"bmatrix*":return new hi(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:vc(E[0])});case"Bmatrix":case"Bmatrix*":return new hi(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:vc(E[0])});case"vmatrix":case"vmatrix*":return new hi(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:vc(E[0])});case"Vmatrix":case"Vmatrix*":return new hi(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:vc(E[0])});case"matrix":case"matrix*":return new hi(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:vc(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new hi(a,y,b,{mathstyleName:"scriptstyle",columns:vc(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new hi(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 hi(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new hi(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const he of y)ee=Math.max(ee,he.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 hi(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new hi(a,y,b,{mathstyleName:"textstyle"})}function vc(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 Tg(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof hi);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof hi)){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=Rh()),ee.length===0&&(ee=Rh());let ae;return y.endsWith("column")?(ae=qo("split",[[re,ee]]),a.root=ae,yc(ae,0,0)?bc(a,ae,0,0):yc(ae,0,1)?bc(a,ae,0,1):a.position=a.offsetOf(E)):(ae=qo("lines",[[re],[ee]]),a.root=ae,yc(ae,0,0)?bc(a,ae,0,0):yc(ae,1,0)?bc(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof $i){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=Rh()),re.length===0&&(re=Rh());let he="pmatrix";const me=ee.leftDelim,ye=ee.rightDelim;me==="("&&(ye===")"||ye==="?")?he="pmatrix":(me==="["||me==="\\lbrack")&&(ye==="]"||ye==="\\rbrack"||ye==="?")?he="bmatrix":me==="\\vert"&&ye==="\\vert"?he="vmatrix":me==="\\Vert"&&ye==="\\Vert"?he="Vmatrix":(me==="{"||me==="\\lbrace")&&(ye==="."||ye==="?")&&(he="cases");const we=qo(he,y.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(we,ee),ee.parent.removeChild(ee),yc(we,0,0)?bc(a,we,0,0):y.endsWith("column")?yc(we,0,1)?bc(a,we,0,1):a.position=a.offsetOf(b):yc(we,1,0)?bc(a,we,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof hi?[b.parent,b.parentBranch]:[void 0,[0,0]]}function yc(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Ig(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function bc(a,y,b,E){const ee=Ig(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Oh(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function $h(a,y){const[b,[E,ee]]=Tg(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Oh(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Oh(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Oh(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Oh(a,b,E,ee,"start");break}}function A0(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function T0(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Bg(a){return a.contentWillChange({inputType:"insertText"})?($h(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(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 hi);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof hi){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 $g(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Oo({addRowAfter:A0,addColumnAfter:T0,addRowBefore:Pg,addColumnBefore:Bg,removeRow:Og,removeColumn:$g,setEnvironment:I0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Rh(){return[new Qr]}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 _f(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ee;if(fe.test(a.at(y).value)){let re=y,ae;do ae=a.at(re).mode==="text"&&fe.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 pu(a,y,b){var E,ee,re,ae,he,me,ye;const we=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let Ne=a.at(a.position);if(y==="forward"&&(Ne.type==="subsup"?(Ne=Ne.rightSibling,Ne||(Ne=a.at(a.position+1))):Ne=a.at(a.position+1)),!Ne)return a.announce("plonk"),!1;let qe=a.offsetOf(Ne);if(Ne instanceof vs)qe=_f(a,qe,y);else if(Ne instanceof qa)if(Ne.isSuggestion)for(console.assert(y==="forward");Ne&&Ne instanceof qa;)Ne.isSuggestion=!1,qe=a.offsetOf(Ne),Ne=Ne.rightSibling;else if(y==="forward"){if(Ne=Ne.rightSibling,!Ne||!(Ne instanceof qa))return a.announce("plonk"),!1;for(;Ne&&Ne instanceof qa&&/[a-zA-Z\*]/.test(Ne.value);)qe=a.offsetOf(Ne),Ne=Ne.rightSibling}else{if(Ne=Ne.leftSibling,!Ne||!(Ne instanceof qa))return a.announce("plonk"),!1;for(;Ne&&Ne instanceof qa&&/[a-zA-Z\*]/.test(Ne.value);)qe=a.offsetOf(Ne),Ne=Ne.leftSibling}else if(y==="forward"&&Ne.type==="mopen"){let yt=0;do Ne.type==="mopen"?yt+=1:Ne.type==="mclose"&&(yt-=1),Ne=Ne.rightSibling;while(!Ne.isLastSibling&&yt!==0);qe=a.offsetOf(Ne.leftSibling)}else if(y==="backward"&&Ne.type==="mclose"){let yt=0;do Ne.type==="mopen"?yt+=1:Ne.type==="mclose"&&(yt-=1),Ne=Ne.leftSibling;while(!Ne.isFirstSibling&&yt!==0);qe=a.offsetOf(Ne)}else if(y==="backward")if(Ne.type==="first")for(;qe>0&&Ne.type==="first";)qe-=1,Ne=a.at(qe);else{const yt=Ne.type;Ne.type==="subsup"&&(qe=a.offsetOf(a.at(qe).leftSibling)),qe-=1;let _t=(ee=a.at(qe))==null?void 0:ee.type;for(;qe>=0&&_t===yt;)((re=a.at(qe))==null?void 0:re.type)==="subsup"?qe=a.offsetOf(a.at(qe).leftSibling):qe-=1,_t=a.at(qe).type}else{const{type:yt}=Ne;let _t=(ae=a.at(qe))==null?void 0:ae.type;const{lastOffset:bn}=a;for(;qe<=bn&&(_t===yt||_t==="subsup");){for(;((he=a.at(qe).rightSibling)==null?void 0:he.type)==="subsup";)qe=a.offsetOf(a.at(qe).rightSibling);qe+=1,_t=(me=a.at(qe))==null?void 0:me.type}qe-=1}if((ye=b==null?void 0:b.extend)!=null&&ye){if(!a.setSelection(a.anchor,qe))return a.announce("plonk"),!1}else{if(qe===a.position)return a.announce("plonk"),!1;a.position=qe}return a.announce("move",we),a.mathfield.stopCoalescingUndo(),!0}function Ks(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[he,me]=g0(a);he!==void 0&&me!==void 0&&a.deleteAtoms([he,me])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let he=Nh(a,a.position,y);he<0&&(he=0),he>a.lastOffset&&(he=a.lastOffset);const me=a.setSelection(a.anchor,he);return a.mathfield.stopCoalescingUndo(),me}if(a.selectionIsPlaceholder){a.collapseSelection(y);const he=Ks(a,y);return a.mathfield.stopCoalescingUndo(),he}let re=a.position;const ae=re;if(a.collapseSelection(y)?(re=a.position,O0(a,re)||(re=Nh(a,re,y))):re=Nh(a,re,y),re<0||re>a.lastOffset){let he=!0;return a.silenceNotifications||(he=(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),he&&a.announce("plonk"),he}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Nh(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||O0(a,y)?y:Nh(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 Ng(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=ru(a.getHTMLElement(y[ee])).right,ae=Math.abs(b-re);if(ae<=E)E=ae;else break}return y[ee-1]}function Fh(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?b.filter(ye=>ye.type==="prompt"&&!ye.captureSelection):b,he=ru(a.mathfield.getHTMLElement(y)).right,me=a.offsetOf(Ng(a.mathfield,ae,he))-(re?1:0);if(E){const[ye,we]=a.selection.ranges[0];let Ne;me<(ee==="up"?ye:we)?Ne={ranges:[[me,we]],direction:"backward"}:Ne={ranges:[[ye,me]],direction:"forward"},a.setSelection(Ne)}else a.setPositionHandlingPlaceholder(me);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 me,ye;let we=!0;return a.silenceNotifications||(we=(ye=(me=a.mathfield.host)==null?void 0:me.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?ye:!0),a.announce(we?"plonk":"line"),we},ae=a.at(a.position);let he=ae;for(;he&&he.parentBranch!=="below"&&!(Array.isArray(he.parentBranch)&&he.parent instanceof hi);)he=he.parent;if(Array.isArray(he==null?void 0:he.parentBranch)&&he.parent instanceof hi){const me=he.parent;if(he.parentBranch[0]<1)return re();const ye=he.parentBranch[0]-1,we=me.array[ye][he.parentBranch[1]];if(!we.some(qe=>qe.type==="prompt"&&!qe.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Fh(a,ae,we,ee,"up")}else if(he){const me=(E=he.parent.branch("above"))!=null?E:he.parent.createBranch("above");if(!me.some(we=>we.type==="prompt"&&we.placeholderId)&&a.mathfield.hasEditablePrompts)return re();Fh(a,ae,me,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 me,ye;let we=!0;return a.silenceNotifications||(we=(ye=(me=a.mathfield.host)==null?void 0:me.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?ye:!0),a.announce(we?"plonk":"line"),we},ae=a.at(a.position);let he=ae;for(;he&&he.parentBranch!=="above"&&!(Array.isArray(he.parentBranch)&&he.parent instanceof hi);)he=he.parent;if(Array.isArray(he==null?void 0:he.parentBranch)&&he.parent instanceof hi){const me=he.parent;if(he.parentBranch[0]+1>me.array.length-1)return re();const ye=he.parentBranch[0]+1,we=me.array[ye][he.parentBranch[1]];if(!we.some(qe=>qe.type==="prompt"&&!qe.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Fh(a,ae,we,ee,"down")}else if(he){const me=(E=he.parent.branch("below"))!=null?E:he.parent.createBranch("below");if(!me.some(we=>we.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();Fh(a,ae,me,ee,"down")}else return re();return!0}function $0(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 Yo({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function N0(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 Yo({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(me){const ye=[],we=[];return[...me.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((qe,yt)=>{const _t=E(qe);_t===0?ye.push(qe):we.push({documentOrder:yt,tabIndex:_t,node:qe})}),we.sort((qe,yt)=>qe.tabIndex===yt.tabIndex?qe.documentOrder-yt.documentOrder:qe.tabIndex-yt.tabIndex).map(qe=>qe.node).concat(ye)}function y(me){return!(!b(me)||ee(me)||E(me)<0)}function b(me){return!(me.disabled||me.type==="hidden"&&me.tagName.toUpperCase()==="INPUT"||he(me))}function E(me){var ye;const we=Number.parseInt((ye=me.getAttribute("tabindex"))!=null?ye:"NaN",10);return Number.isNaN(we)?me.contentEditable==="true"||(me.nodeName==="AUDIO"||me.nodeName==="VIDEO")&&me.getAttribute("tabindex")===null?0:me.tabIndex:we}function ee(me){return me.tagName.toUpperCase()==="INPUT"&&me.type==="radio"&&!ae(me)}function re(me,ye){for(const we of me)if(we.checked&&we.form===ye)return we;return null}function ae(me){var ye;if(!me.name)return!0;const Ne=((ye=me.form)!=null?ye:me.ownerDocument).querySelectorAll('input[type="radio"][name="'+me.name+'"]'),qe=re(Ne,me.form);return!qe||qe===me}function he(me){if(!vt()||me===document.activeElement||me.contains(document.activeElement))return!1;if(getComputedStyle(me).visibility==="hidden")return!0;const ye=me.getBoundingClientRect();if(ye.width===0||ye.height===0)return!0;for(;me;){if(getComputedStyle(me).display==="none")return!0;me=me.parentElement}return!1}return vt()?a(document.body):[]}function yo(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"?yo(a,[y.leftSibling,y]):yo(a,[y,y.leftSibling])}function xs(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 zh(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Ks(a,y);let ae;const he=a.at(a.anchor).parentPrompt;he?y==="forward"?ae=a.offsetOf(he)+1:ae=a.offsetOf(he.leftSibling):ae=Math.max(a.position+re,0);const me=Lf(a,ae,y);if(!me||y==="forward"&&a.offsetOf(me)<ae||y==="backward"&&a.offsetOf(me)>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 we=Wg();if(!document.activeElement||we.length<=1)return a.announce("plonk"),!1;let Ne=we.indexOf(document.activeElement)+re;return Ne<0&&(Ne=we.length-1),Ne>=we.length&&(Ne=0),we[Ne].focus(),a.mathfield.stopCoalescingUndo(),!0}return xs(a,me),!0}function Lf(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)}Oo({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 he=b.subsupPlacement?N0(a):R0(a);return a.mathfield.stopCoalescingUndo(),he}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=>$0(a),moveToNextChar:a=>Ks(a,"forward"),moveToPreviousChar:a=>Ks(a,"backward"),moveUp:a=>Ks(a,"upward"),moveDown:a=>Ks(a,"downward"),moveToNextWord:a=>pu(a,"forward"),moveToPreviousWord:a=>pu(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 zh(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let qe=re;for(;qe&&qe.mode==="text";)qe=qe.leftSibling;let yt=re;for(;((y=yt.rightSibling)==null?void 0:y.mode)==="text";)yt=yt.rightSibling;if(qe&&yt)return yo(a,[qe,yt])}if(re.rightSibling.mode==="text"){let qe=re;for(;qe&&qe.mode==="text";)qe=qe.rightSibling;return qe?(xs(a,(b=qe.leftSibling)!=null?b:qe),a.mathfield.switchMode("math"),!0):xs(a,a.lastOffset)}}const he=a.at(a.anchor).parentPrompt,me=he?a.offsetOf(he)+1:Math.max(a.position+1,0),ye=Lf(a,me,"forward");if(ye)return xs(a,ye);const we=F0(a,re,qe=>qe.type==="leftright"||qe.type==="text","forward");if(we){if(we.mode==="text"){let qe=we;for(;qe&&qe.mode==="text";)qe=qe.rightSibling;return yo(a,[(E=we.leftSibling)!=null?E:we,(ee=qe.leftSibling)!=null?ee:qe])}return yo(a,we)}const Ne=re.parent;if(Ne){if(Ne.type==="leftright"||Ne.type==="surd")return yo(a,Ne);if(re.parentBranch==="superscript"&&Ne.subscript)return yo(a,Ne.subscript);if(re.parentBranch==="above"&&Ne.below)return yo(a,Ne.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return xs(a,Ne);if(re.parentBranch==="above"||re.parentBranch==="below")return yo(a,Ne)}return xs(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return zh(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let he=b;for(;he&&he.mode==="text";)he=he.leftSibling;let me=b;for(;((y=me.rightSibling)==null?void 0:y.mode)==="text";)me=me.rightSibling;if(he&&me)return yo(a,[he,me])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?xs(a,b):xs(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Lf(a,re,"backward");if(ae)return xs(a,ae);if(E==="math"){const he=F0(a,b,ye=>ye.type==="leftright"||ye.type==="text","backward");if(he){if(he.mode==="text"){let ye=he;for(;ye&&ye.mode==="text";)ye=ye.leftSibling;return yo(a,[he,ye])}return yo(a,he)}const me=b.parent;if(me){if(me.type==="leftright"||me.type==="surd")return yo(a,me);if(b.parentBranch==="subscript"&&me.superscript)return yo(a,me.superscript);if(b.parentBranch==="below"&&me.above)return yo(a,me.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return xs(a,me);if(b.parentBranch==="above"||b.parentBranch==="below")return yo(a,me)}return xs(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:N0},{target:"model",changeSelection:!0}),Oo({moveToNextPlaceholder:a=>zh(a,"forward"),moveToPreviousPlaceholder:a=>zh(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 Kh(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 xc(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(Pn.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,y-=1}Df(a),a.contentDidChange({data:Si(re),inputType:"insertText"})}function Df(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||!wh(b))return!1;const ee=lu(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)&&xc(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:he}=E.at(E.position);if(ae&&he instanceof $i&&he.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 xc(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){xc(E,1);const me=E.at(E.position);return me.value="\u22C5",me.style.variant="normal",me.command="\\cdot",me.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 xc(E,1),!0;if(/\([a-z][,;]$/.test(re))return xc(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Df(E),!0}else{if(y==="[Space]")return Kh(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Kh(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Kh(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 Kh(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>"+(vf(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=Mh("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(Bo("keystroke-caption"),Bo("core"),Mh("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bf("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 yt=vd();a.keyboardLayout!==yt.id&&(a.keyboardLayout=yt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Vg(a,ae),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let he,me="",ye;const we=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")we.pop();else if(!wh(y))a.flushInlineShortcutBuffer();else{const yt=lu(y),_t=[...(E=(b=we[we.length-1])==null?void 0:b.keystrokes)!=null?E:[],yt];we.push({state:re.getState(),keystrokes:_t,leftSiblings:Xg(a)});let bn=0,ir="";for(;!he&&bn<_t.length;)ye=we.length-(_t.length-bn),ir=_t.slice(bn).join(""),he=td(we[ye].leftSiblings,ir,a.options.inlineShortcuts),!he&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(ir)&&(he=a.options.onInlineShortcut(a,ir)),bn+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(he?a.switchMode("math"):jg(a,ae,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),me=""))}if(!he){if(me||(me=Zm(a.keybindings,re.mode,y)),!me&&(ae==="[Enter]"||ae==="[Return]")){let yt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(yt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),yt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),yt}if((!me||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return si.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),me="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const yt=re.at(re.position+1),_t=re.at(re.position-1);if((yt==null?void 0:yt.mode)==="text"||(_t==null?void 0:_t.mode)==="text")return si.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===","&&lu(y)===","&&(me="insertDecimalSeparator")}}if(!he&&!me){if(re.mathfield.smartFence){if(Tf(re,lu(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:yt}=re.at(re.position);if(yt instanceof $i&&yt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),yt.isDirty=!0,yt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:lu(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const _t=lu(y);if(_t==="("||_t==="{"||_t==="["){const bn={"(":"(","{":"\\lbrace","[":"\\lbrack"}[_t],ir={"(":")","{":"\\rbrace","[":"\\rbrack"}[_t],[yn,Nn]=Wa(re.selection);return a.snapshot(),re.position=Nn,si.insert(re,ir,{format:"latex"}),re.position=yn,si.insert(re,bn,{format:"latex"}),re.setSelection(yn+1,Nn+1),re.contentDidChange({data:_t,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const Ne=re.at(Math.max(re.position,re.anchor)),{parent:qe}=Ne;if(me==="moveAfterParent"&&(qe==null?void 0:qe.type)==="leftright"&&Ne.isLastSibling&&a.options.smartFence&&Tf(re,".",a.defaultStyle)&&(me="",va(a)),a.keyboardDelegate.cancelComposition(),me)a.executeCommand(me);else if(he){const yt=a.effectiveStyle;re.setState(we[ye].state);const _t=we[we.length-1].keystrokes;for(const bn of _t)si.insert(re,bn,{silenceNotifications:!0,style:yt});a.snapshot("insert-shortcut"),re.setState(we[ye].state),re.deferNotifications({content:!0,selection:!0,data:he,type:"insertText"},()=>(si.insert(re,he,{format:"latex",style:yt}),Df(a.model),he.endsWith(" ")&&(a.switchMode("text"),si.insert(re," ",{style:yt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Af(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=rh(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(me=>me.toUpperCase())),b.simulateKeystroke){let me=!0;for(const ye of ee)K0(a,new KeyboardEvent("keypress",{key:ye}))&&(me=!1);if(me)return}const ae=E.at(E.position),he=Se(Se({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Wa(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Ch(a);for(const me of ee)si.insert(E,me);a.snapshot("insert-latex"),bd(a)});else if(E.mode==="text"){for(const me of ee)si.insert(E,me,{style:he});a.snapshot("insert-text")}else if(E.mode==="math")for(const me of ee)Yg(a,me,he,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 Yg(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){Jg(ee),si.insert(ee,y,{style:b}),a.snapshot(),$0(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=Se({},b),ae.style.variant&&(b.variant=ae.style.variant),ae.style.variantStyle&&(b.variantStyle=ae.style.variantStyle))}si.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function Jg(a){a.selectionIsCollapsed||(a.deleteAtoms(Wa(a.selection)),a.mathfield.snapshot("delete"))}function Tf(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],he=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[me,ye]=Wa(a.selection),we=a.extractAtoms([me,ye]),Ne=ee.addChildrenAfter([new $i("left...right",we,{leftDelim:re,rightDelim:he})],a.at(me));return a.setSelection(a.offsetOf(Ne.firstChild),a.offsetOf(Ne.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const me=ee instanceof $i?ee.leftDelim+ee.rightDelim:"";if(me==="\\lbrace\\rbrace"||me==="\\{\\}"||me==="\\lbrace?")return a.mathfield.snapshot(),si.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(he){if(ee instanceof $i&&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 $i)){let Ne=E;for(;Ne&&!(Ne.type==="mclose"&&Ne.value===he);)Ne=Ne.rightSibling;if(Ne){a.mathfield.snapshot();const qe=a.extractAtoms([a.offsetOf(E),a.offsetOf(Ne)]);return qe.pop(),ee.addChildrenAfter([new $i("left...right",qe,{leftDelim:re,rightDelim:he})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const me=a.offsetOf(E.lastSibling);let ye;for(ye=a.position;ye<=me;ye++){const Ne=a.at(ye);if(Ne instanceof $i&&(Ne.leftDelim==="?"||Ne.leftDelim===".")&&H0(re,Ne.rightDelim))break}const we=a.at(ye);if(ye<=me&&we instanceof $i){we.leftDelim=re,a.mathfield.snapshot();let Ne=a.extractAtoms([a.position,ye-1]);return Ne=Ne.filter(qe=>qe.type!=="first"),we.addChildren(Ne,we.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof $i&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const Ne=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const qe of Ne)ee.parent.addChildBefore(qe,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof $i&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),si.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const Ne=a.offsetOf(E.lastSibling),qe=a.extractAtoms([a.position,Ne]);a.at(a.position).body=qe,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let me=E;for(;me;){if(me.type==="mopen"&&me.value===ae){a.mathfield.snapshot();const yt=me.leftSibling,_t=a.extractAtoms([a.offsetOf(me.leftSibling),a.offsetOf(E)]);_t.shift();const bn=new $i("left...right",_t,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([bn],yt),a.position=a.offsetOf(bn),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}me=me.leftSibling}if(ee instanceof $i&&E.isLastSibling&&If(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 ye=a.offsetOf(E.firstSibling);let we;for(we=a.position;we>=ye;we--){const yt=a.at(we);if(yt instanceof $i&&(yt.rightDelim==="?"||yt.rightDelim===".")&&If(yt.leftDelim,re))break}const Ne=a.at(we);if(we>=ye&&Ne instanceof $i)return a.mathfield.snapshot(),Ne.rightDelim=re,Ne.addChildren(a.extractAtoms([we,a.position]),Ne.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof $i&&(ee.rightDelim==="?"||ee.rightDelim===".")&&If(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 qe=ee.parent;return qe instanceof $i&&(qe.rightDelim==="?"||qe.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(qe),Tf(a,re,b)):!1}return!1}function If(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}Oo({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)=>(Af(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}}),Oo({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"}),Oo({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})&&(bd(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),va(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function qg(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Pf(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=Se(Se({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Ef(E,ee,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Oo({applyStyle:qg},{target:"mathfield",canUndo:!0,changeContent:!0});function Pf(a,y){var b,E,ee,re,ae,he,me,ye,we,Ne;const qe={};if(typeof y.color=="string"){const _t=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";_t!==y.color&&(qe.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),qe.color=_t}if(typeof y.backgroundColor=="string"){const _t=(ae=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?ae:"none";_t!==y.backgroundColor&&(qe.verbatimBackgroundColor=(he=y.verbatimBackgroundColor)!=null?he:y.backgroundColor),qe.backgroundColor=_t}typeof y.fontFamily=="string"&&(qe.fontFamily=y.fontFamily),typeof y.series=="string"&&(qe.fontSeries=y.series),typeof y.fontSeries=="string"&&(qe.fontSeries=y.fontSeries.toLowerCase()),qe.fontSeries&&(qe.fontSeries=(me={bold:"b",medium:"m",normal:"m"}[qe.fontSeries])!=null?me:qe.fontSeries),typeof y.shape=="string"&&(qe.fontShape=y.shape),typeof y.fontShape=="string"&&(qe.fontShape=y.fontShape.toLowerCase()),qe.fontShape&&(qe.fontShape=(ye={italic:"it",up:"n",upright:"n",normal:"n"}[qe.fontShape])!=null?ye:qe.fontShape),y.variant&&(qe.variant=y.variant.toLowerCase()),y.variantStyle&&(qe.variantStyle=y.variantStyle.toLowerCase());const yt=(we=y.size)!=null?we:y.fontSize;return typeof yt=="number"?qe.fontSize=Math.max(1,Math.min(10,yt)):typeof yt=="string"&&(qe.fontSize=(Ne={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[yt.toLowerCase()])!=null?Ne:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[yt]),qe}function Bf(a){let[y,b]=Wa(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 he=b==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!fe.test(ae.value));)y+=he,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+=he,ae=a.at(y);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)y+=he,ae=a.at(y);else if(ae.value==="{"){if(b==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)y+=he,ae=a.at(y);return y}return y-1}else if(ae.value==="}"){if(b==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)y+=he,ae=a.at(y);return y-1}return y}return y-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(y+he))!=null&&E.isDigit();)y+=he;return b==="backward"?y-1:y}if(ae.style.variant||ae.style.variantStyle){let me=(ee=a.at(y))==null?void 0:ee.style;for(;me&&me.variant===ae.style.variant&&me.variantStyle===ae.style.variantStyle;)me=(re=a.at(y+he))==null?void 0:re.style,y+=he;return b==="backward"?y-1:y}return y}return y}Oo({selectGroup:a=>{const y=Bf(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Ks(a,"forward",{extend:!0}),extendSelectionBackward:a=>Ks(a,"backward",{extend:!0}),extendToNextWord:a=>pu(a,"forward",{extend:!0}),extendToPreviousWord:a=>pu(a,"backward",{extend:!0}),extendSelectionUpward:a=>Ks(a,"upward",{extend:!0}),extendSelectionDownward:a=>Ks(a,"downward",{extend:!0}),extendToNextBoundary:a=>pu(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>pu(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 wc=null,Ed=0,Hh=class es{static start(y,b,E,ee){var re;es.element=y,(re=es.controller)==null||re.abort(),es.controller=new AbortController;const ae={signal:es.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,ae),y.addEventListener("pointerup",ee,ae),y.addEventListener("pointercancel",ee,ae),Of(b)&&(es.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=es.controller)==null||y.abort(),es.controller=void 0,typeof es.pointerId=="number"&&(es.element.releasePointerCapture(es.pointerId),es.pointerId=void 0)}};function Of(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,he="none",me=!1,ye=!1;const we=y.clientX,Ne=y.clientY,qe=Date.now(),yt=E.field,_t=setInterval(()=>{me?yt.scroll({top:0,left:yt.scrollLeft-16}):ye&&yt.scroll({top:0,left:yt.scrollLeft+16})},32);function bn(){Hh.stop(),re=!1,clearInterval(_t),a.element.classList.remove("tracking"),y&&y.preventDefault()}function ir(Nn){if(!E.hasFocus()){bn();return}const dr=Nn.clientX,Kn=Nn.clientY,Zr=Of(Nn)&&Nn.pointerType==="touch"?20:5;if(Date.now()<qe+500&&Math.abs(we-dr)<Zr&&Math.abs(Ne-Kn)<Zr){Nn.preventDefault(),Nn.stopPropagation();return}const qr=yt.getBoundingClientRect();ye=dr>qr.right,me=dr<qr.left;let Vr=ee;Of(Nn)&&(Nn.isPrimary||(Vr=kd(E,Nn.clientX,Nn.clientY,{bias:0})));const Ti=kd(E,dr,Kn,{bias:dr<=we?dr===we?0:-1:1});Vr>=0&&Ti>=0&&(E.model.extendSelectionTo(Vr,Ti),va(a)),ae&&Bf(E.model)}wc&&Math.abs(wc.x-we)<5&&Math.abs(wc.y-Ne)<5&&Date.now()<wc.time+500?(Ed+=1,wc.time=qe):(wc={x:we,y:Ne,time:qe},Ed=1);const yn=yt.getBoundingClientRect();if(we>=yn.left&&we<=yn.right&&Ne>=yn.top&&Ne<=yn.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=kd(a,we,Ne,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const Nn=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||Nn?he="all":he="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),he="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),he="selection"):(a.model.position=ee,v0(a.model)?he="all":he="selection");a.defaultStyle={},y.detail===3||Ed>2?(bn(),(y.detail===3||Ed===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},he="all")):re||(re=!0,Hh.start(yt,y,ir,bn),(y.detail===2||Ed===2)&&(ae=!0,Bf(a.model),he="all"))}a.hasFocus()||(he="none",a.focus({preventScroll:!0}))}else wc=null;a.stopCoalescingUndo(),he!=="none"&&(a.model.selectionIsCollapsed&&(he="all"),va(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=Il(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 he of b.children){const me=j0(a,y,he,E,ee);me[0]<=ae[0]&&(ae=me)}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 kd(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 he=[];let me=ae;for(;me;)he.unshift(me),me=me.parent;for(const we of he)if(we.captureSelection){ae=we;break}let ye=a.model.offsetOf(ae);if(ye<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const we=Il(a,ae);we&&y<(we.left+we.right)/2&&(ye=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(ye=a.model.offsetOf(ae.leftSibling));return ye}var tv=class extends si{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=Ol(re),{model:he}=a;he.selectionIsCollapsed||he.deleteAtoms(Wa(he.selection));const me=he.at(he.position);if(me.parent instanceof hi){console.assert(me.parentBranch!==void 0);const ye=[];let we=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const _t of ae)_t.type==="first"&&we.length>0?(ye.push(we),we=[_t]):we.push(_t);we.length>0&&ye.push(we);let Ne=Number(me.parentBranch[0]),qe=Number(me.parentBranch[1]);const yt=me.parent.maxColumns;for(;me.parent.colCount-qe<ye.length&&me.parent.colCount<yt;)me.parent.addColumn();me.parent.addChildrenAfter(ye[0],me);for(let _t=1;_t<ye.length;_t++)qe++,qe>=yt&&(qe=0,me.parent.addRowAfter(Ne),Ne++),me.parent.setCell(Ne,qe,ye[_t])}else me.parent.addChildrenAfter(ae.filter(ye=>ye.type!=="first"),me);return he.position=he.offsetOf(ae[ae.length-1]),he.contentDidChange({inputType:"insertFromPaste"}),va(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]=$s(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),va(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 he=a.silenceNotifications;a.silenceNotifications=!0;const me={"?":"\\placeholder{}","@":"\\placeholder{}"};me[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Wa(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 ye=-1;me[0]?me["@"]=me[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(ye=rv(a),ye>=0&&(me["@"]=a.getValue(ye,a.position,"latex"))),me[0]||(me[0]=me["?"]);let we=!1;const Ne=dr=>(we=!0,me[dr]);let[qe,yt]=V0(a,y,Ne,b);if(!yt)return!1;const _t=yt.length===1&&yt[0].type==="genfrac";_t&&ye>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(me["@"]=me["?"],we=!1,[qe,yt]=V0(a,y,Ne,b)):ye>=0&&a.deleteAtoms([ye,a.position]);const{parent:bn}=a.at(a.position),ir=bn.hasEmptyBranch("body");if(_t&&qe!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&bn instanceof $i&&bn.leftDelim==="("&&ir){const dr=bn.parent,Kn=bn.parentBranch;dr.removeChild(bn),dr.setChildren(yt,Kn)}const yn=a.at(a.position);yn.parent.addChildrenAfter(yt,yn),qe==="latex"&&typeof y=="string"&&(bn==null?void 0:bn.type)==="root"&&ir&&!we&&(bn.verbatimLatex=y),a.silenceNotifications=he;const Nn=yt[yt.length-1];if(b.selectionMode==="placeholder"){const dr=yt.flatMap(Kn=>[Kn,...Kn.children]).find(Kn=>Kn.type==="placeholder");if(dr){const Kn=a.offsetOf(dr);a.setSelection(Kn-1,Kn),a.announce("move")}else Nn&&(a.position=a.offsetOf(Nn))}else b.selectionMode==="before"||(b.selectionMode==="after"?Nn&&(a.position=a.offsetOf(Nn)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(Nn)));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 he=window.MathfieldElement.computeEngine;if(!he)return["math-json",[]];[re,y]=["latex",he.box(y).latex],ae=ja(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=uc(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=ja(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Wh(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=uc(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=$s(y)),ae=ja(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Wh(ae));return Rl(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 $i&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Wh(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof $i&&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)){Wh(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof hi)for(const b of y.cells)Wh(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 si{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"),va(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(Wa(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(Rl(re,b.style),!re)return!1;const ae=a.at(a.position),he=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(he)):he&&(a.position=a.offsetOf(he))),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 "),ja(a,{context:y,parseMode:"text"})}new iv;function Hs(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var ia=4,Mo=20,Ba=2*(Mo+ia),Zh=(a,y)=>`
|
|
|
<line x1="${a+Mo}" y1="${y+Mo}"
|
|
|
x2="${a>y?a+Mo:7*Mo+10*ia}"
|
|
|
y2="${a<y?y+Mo:7*Mo+10*ia}"/>
|
|
|
<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+Mo}" y1="${y+Mo}"
|
|
|
x2="${a>y?a+Mo:7*Mo+10*ia}"
|
|
|
y2="${a<y?y+Mo:7*Mo+10*ia}"/>
|
|
|
<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>`,jh=(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*Mo+10*ia+5} ${8*Mo+10*ia+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${Ba+ia}"
|
|
|
height="${3*Ba}"
|
|
|
width="${Ba}"
|
|
|
rx="${Ba/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${Ba+ia}"
|
|
|
y="0"
|
|
|
height="${Ba}"
|
|
|
width="${3*Ba}"
|
|
|
rx="${Ba/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${jh(2*(ia+Ba),2*ia+3*Ba,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${jh(2*(ia+Ba),2*ia+Ba,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${jh(2*ia+3*Ba,2*(ia+Ba),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${jh(2*ia+Ba,2*(ia+Ba),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${Zh(2*ia+Ba,ia)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${G0(2*ia+2*Ba,ia)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${Zh(2*ia+3*Ba,ia)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${Zh(ia,2*ia+Ba)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${G0(ia,2*ia+2*Ba)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${Zh(ia,2*ia+3*Ba)}
|
|
|
</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>`,cv=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>`,uv=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>`,hv=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>`,fv=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>`,$f={matrix:sv,pmatrix:lv,bmatrix:cv,Bmatrix:X0,vmatrix:uv,Vmatrix:dv},Rf={cases:hv,rcases:fv,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(_t=>{(!ee||_t.length>ee)&&(ee=_t.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Mh("mathlive-environment-popover"),Bo("environment-popover"),Bo("core"),re.setAttribute("aria-hidden","true"));let ae;const he=re.querySelector(".MLEP__environment-controls");he?ae=he:(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 me=[],ye="";const we=a.model.parentEnvironment.environmentName;if(co(we)){const _t=gv(we);ye=$f[_t]("active");const bn=$f,{[_t]:ir}=bn,yn=ct(bn,[Ke(_t)]);me=Object.values(yn).map(Nn=>Nn("inactive"))}else if(uo(we)){const _t=vv(we);ye=Rf[_t]("active");const bn=Rf,{[_t]:ir}=bn,yn=ct(bn,[Ke(_t)]);me=Object.values(yn).map(Nn=>Nn("inactive"))}else Ea(we)&&(ye=$f.matrix("active"),me=Object.values(Rf).map(_t=>_t("inactive")));const Ne=document.createElement("div");Ne.className="MLEP__environment-delimiter-controls",Ne.style.display="flex",Ne.style.flexDirection="column",Ne.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${ye}
|
|
|
${me.join("")}
|
|
|
</div>`,ye&&ae.appendChild(Ne),ae.querySelectorAll("[data-command]").forEach(_t=>{const bn=_t.dataset.command;let ir=bn;try{ir=JSON.parse(bn)}catch(yn){}_t.addEventListener("mousedown",yn=>yn.preventDefault()),ir&&_t.addEventListener("click",()=>a.executeCommand(ir))});const yt=(b=a.field)==null?void 0:b.getBoundingClientRect();yt&&(re.style.top=`${window.scrollY+(yt.top-re.clientHeight-15)}px`,re.style.left=`${yt.left+20}px`,re.classList.add("is-visible"))}function Nf(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mv(){document.getElementById("mathlive-environment-popover")&&(bf("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Vh(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&da(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):Nf()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function Y0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function J0(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function Ff(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=Y0(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(),he=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let me=Math.min(he,(E=y.height)!=null?E:ae.height),ye=Ff(y.location.y,me,y.verticalPos,re);ye+me>window.innerHeight-8&&(y.alternateLocation?(ye=Ff(y.alternateLocation.y,me,y.verticalPos,re),ye+me>window.innerHeight-8&&(ye=void 0)):ye=void 0),Number.isFinite(ye)||(ye=Math.max(8,window.innerHeight-8-me),8+me>window.innerHeight-8&&(a.style.bottom="8px")),me=Math.min(ye+me,window.innerHeight-8)-ye;const we=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let Ne=Math.min(we,(ee=y.width)!=null?ee:ae.width),qe=Ff(y.location.x,Ne,y.horizontalPos,re);qe+Ne>window.innerWidth-8&&(y.alternateLocation?(qe=yv(y.alternateLocation.x,Ne,y.verticalPos,re),qe+Ne>window.innerWidth-8&&(qe=void 0)):qe=void 0),Number.isFinite(qe)||(qe=Math.max(8,window.innerWidth-8-Ne),8+Ne>window.innerWidth-8&&(a.style.right="8px")),Ne=Math.min(qe+Ne,window.innerWidth-8)-qe,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-qe-Ne).toString()}px`:a.style.left=`${Math.ceil(qe).toString()}px`,a.style.top=`${Math.ceil(ye).toString()}px`,me!==ae.height&&(a.style.height=`${Math.ceil(me).toString()}px`),Ne!==ae.width&&(a.style.width=`${Math.ceil(Ne).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function mu(a){return"submenu"in a}function Ws(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zf(a){return"type"in a&&a.type==="divider"}function Kf(a){return"type"in a&&a.type==="heading"}var q0={};function Hf(a){let y=q0[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,q0[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,mu(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=Ws(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(zf(ee)){this.enabled=!1,this.checked=!1;return}Kf(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Ws(ee)&&(this.checked=Ws(ee)&&((y=gu(ee.checked,a))!=null?y:!1)),(Ws(ee)||mu(ee))&&(this.enabled=(b=gu(ee.enabled,a))!=null?b:!0,this.visible=(E=gu(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Ws(ee)||Kf(ee)||mu(ee))&&(this.label=gu(ee.label,a),this.tooltip=gu(ee.tooltip,a),this.ariaLabel=gu(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(Hf("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hf("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),Ws(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vf(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hf("trailing-chevron"))}get element(){if(this._element)return this._element;if(zf(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,(Ws(this._declaration)||Kf(this._declaration)||mu(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(!Ws(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=Y0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:J0(b,"trailing",E),y:b.top-4},alternateLocation:{x:J0(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(wv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),he=this.element.getBoundingClientRect();ae.left<he.left+he.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wv(a,y,b){return Math.hypot(a,y)/b}function gu(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 Mu{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(ye=>ye.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(ye=>ye.visible&&ye.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(ye=>ye.updateState(y));let ae,he=0;for(const ye of this._menuItems)ye.type==="heading"?(ae&&he===0&&(ae.visible=!1),ae=ye,he=0):ye.type==="divider"&&ae?(ae.visible=he>0,ae=void 0,he=0):ae&&ye.visible&&(he+=1);ae&&(ae.visible=he>0);let me=!0;for(const ye of this._menuItems)ye.type==="divider"?(ye.visible=!me,me=!0):ye.visible&&(me=!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 Mu._collator||(Mu._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Mu._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(he=>he.type!=="divider"&&he.visible&&he.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(he=>he.label.length))-y.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(b=E.find(he=>Mu.collator.compare(y,he.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),en()&&(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),en()&&((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=fc(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=fc(y));let re=!0;const ae=this.activeSubmenu,he=ae.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":he==null||he.select(fc(y));break;case"ArrowRight":if((he==null?void 0:he.type)==="submenu")he.select(fc(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!he)ae.activeMenuItem=ae.firstMenuItem;else{const me=(b=ae.getMenuItemColumn(he))!=null?b:-1;if(me>=0&&me<((E=ae.columnCount)!=null?E:1)-1){const ye=ae.nextMenuItem(1);ye&&(ae.activeMenuItem=ye)}}break;case"ArrowLeft":if(ae===this.rootMenu)he||(ae.activeMenuItem=ae.firstMenuItem);else if((he&&(ee=ae.getMenuItemColumn(he))!=null?ee:-1)<=0||!he){ae.hide();const ye=ae.parentMenu.activeMenuItem;if(ye){const{element:we}=ye;we==null||we.focus(),we==null||we.classList.remove("is-submenu-open")}}else{const ye=ae.nextMenuItem(-1);ye&&(ae.activeMenuItem=ye)}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 me=ae.findMenuItem(this.typingBuffer);me&&(ae.activeMenuItem=me),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(wh(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const me=ae.findMenuItem(this.typingBuffer);me&&(ae.activeMenuItem=me),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 Fs.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),Fs.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),Fs.state==="open"&&Fs.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(Se({},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,Fs.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 Sv=np;function rp(a){return zf(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Ws(a)||mu(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Ws(a)&&typeof a.checked=="function"?!0:mu(a)?a.submenu.some(rp):!1}var Uh=class{};Uh.DELAY=300,Uh.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=xh(a);E||y(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),y(xv(ee,E)<Uh.MAX_DISTANCE)},Uh.DELAY),ae=new AbortController,he=ae.signal;for(const me of["pointermove","pointerup","pointercancel"])window.addEventListener(me,ye=>{if(ye.type==="pointerup"||ye.type==="pointercancel")clearTimeout(re),ae.abort(),y(!1);else if(ye.type==="pointermove"){const we=xh(ye);we&&(ee=we)}},{passive:!0,signal:he})})}function ip(a,y,b){return zl(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:xh(E),modifiers:fc(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:fc(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=xh(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};bt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(Me(Se({},a),{body:Ye(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),bt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=on(Ye(a.args[0]));return new z(Me(Se({},a),{body:Ye(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),bt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(Me(Se({},a),{body:Ye(a.args[0]),svgAccent:"overarc"}))}),bt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Jo(Me(Se({},a),{body:Ye(a.args[0]),svgBelow:"underarc"}))}),bt("utilde","{body:auto}",{createAtom:a=>{const y=Ye(a.args[0]),b=on(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new Jo(Me(Se({},a),{body:y,svgBelow:E,boxType:_l(y)}))}}),bt("^","{:string}",{createAtom:a=>{var y;return new Pn(Me(Se({},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:"^"}))}}),bt("`","{:string}",{createAtom:a=>{var y;return new Pn(Me(Se({},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:"`"}))}}),bt("'","{:string}",{createAtom:a=>{var y;return new Pn(Me(Se({},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:"'"}))}}),bt('"',"{:string}",{createAtom:a=>{var y,b;return new Pn(Me(Se({},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]:'"'}))}}),bt(".","{:string}",{createAtom:a=>{var y,b;return new Pn(Me(Se({},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]:"."}))}}),bt("=","{:string}",{createAtom:a=>{var y,b;return new Pn(Me(Se({},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]:"="}))}}),bt("~","{:string}",{createAtom:a=>{var y;return new Pn(Me(Se({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"}))}}),bt("c","{:string}",{createAtom:a=>{var y;return new Pn(Me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),bt("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 he of ae){const me=he.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(me)ee.strokeWidth=me[1],ee.strokeStyle=me[2],ee.strokeColor=me[3];else{const ye=he.match(/\s*([a-z]*)\s*=\s*"(.*)"/);ye&&(ye[1]==="mathbackground"?ee.backgroundcolor=ye[2]:ye[1]==="mathcolor"?ee.strokeColor=ye[2]:ye[1]==="padding"?ee.padding=ye[2]:ye[1]==="shadow"&&(ee.shadow=ye[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 cd(a.command,Ye(E[2]),re,ee)}}),bt("cancel","{body:auto}",{createAtom:a=>{var y;return new cd(a.command,Ye(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:{}})}}),bt("bcancel","{body:auto}",{createAtom:a=>{var y;return new cd(a.command,Ye(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:{}})}}),bt("xcancel","{body:auto}",{createAtom:a=>{var y;return new cd(a.command,Ye(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:{}})}}),bt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new Jo(Me(Se({},a),{body:Ye((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),bt("overbrace","{:auto}",{createAtom:a=>new Jo(Me(Se({},a),{body:Ye(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),bt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Jo(Me(Se({},a),{body:Ye(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),bt(["underbrace"],"{:auto}",{createAtom:a=>new Jo(Me(Se({},a),{body:Ye(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),bt(["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 Jo(Me(Se({},a),{svgBody:a.command.slice(1),above:((b=Ye((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:Ye((E=a.args)==null?void 0:E[1]),below:(re=Ye((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)}`}),bt(["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 hc(a.command.slice(1),Me(Se({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),bt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new hc({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],Me(Se({},a),{limits:"over-under",variant:"main"}))}),bt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new hc(a.command.slice(1),Me(Se({},a),{limits:"over-under",variant:"main"}))}),bt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new hc(a.command.slice(1),Me(Se({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),bt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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 or("\xB0",{style:Me(Se({},a.style),{variant:"normal",variantStyle:"up"})});return new or([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),bt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(Me(Se({},a),{body:Ye(a.args[1]),index:a.args[0]?Ye(a.args[0]):void 0}))}),bt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=Se({},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 ou(E[0]?Ye(E[0]):[new Qr],E[1]?Ye(E[1]):[new Qr],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}`:ra(a.command,b,E)}}),bt(["brace","brack"],"",{infix:!0,createAtom:a=>new ou(Ye(a.args[0]),Ye(a.args[1]),Me(Se({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>Si([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),bt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new ou(Ye(E[0]),Ye(E[1]),Me(Se({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>Si([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),bt(["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 ou(Ye(E[0]),Ye(E[1]),Me(Se({},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)}`}),bt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new ou(Ye(a.args[0]),Ye(a.args[1]),Me(Se({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),bt(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new hf({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(Se({},a),{limits:"auto",variant:"main"}))}),bt("smallint","",{ifMode:"math",createAtom:a=>new hc("\u222B",Me(Se({},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"};bt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new hf(b,Me(Se({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),bt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new hc({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],Me(Se({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),bt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(Me(Se({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),bt("the","{:value}",{createAtom:a=>new Pn(Me(Se({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new Di({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new or(((b=Ma(re))!=null?b:"").split("").map(ae=>new or(ae,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:Se({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=Ma(a.args[0]))!=null?y:"\\relax"}`}}),bt("mathtip","{:auto}{:math}",{createAtom:a=>new ff(Me(Se({},a),{body:Ye(a.args[0]),tooltip:Ye(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Pn.serialize([a.tooltip],Me(Se({},y),{defaultMode:"math"}))}}`}),bt("texttip","{:auto}{:text}",{createAtom:a=>new ff(Me(Se({},a),{body:Ye(a.args[0]),tooltip:Ye(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Pn.serialize([a.tooltip],Me(Se({},y),{defaultMode:"text"}))}}`}),bt("error","{:math}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),bt("ensuremath","{:math}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(Me(Se({},y),{defaultMode:"math"}))}}`}),bt("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Ma(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),bt("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Ma(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),bt("boxed","{content:math}",{createAtom:a=>new ba(Me(Se({},a),{body:Ye(a.args[0]),framecolor:{string:"black"}}))}),bt("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=Ma(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),bt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new ba(Me(Se({},a),{body:Ye(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(Se({},y),{defaultMode:"text"})):ra(a.command,(b=Ma(a.framecolor))!=null?b:"",(E=Ma(a.backgroundcolor))!=null?E:"",a.bodyToLatex(Me(Se({},y),{defaultMode:"text"})))}}),bt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=Ye(a.args[1]);return b?new ba(Me(Se({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new ba(Me(Se({},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=Ma(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Ma(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return ra(ee,a.bodyToLatex(y))}}),bt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(a.args[0])})),render:(a,y)=>{const b=new Di({parent:y,mathstyle:a.command.slice(1)},a.style),E=Pn.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):`{${Si([a.command,a.bodyToLatex(y)])}}`}),bt(["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]})}),bt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),bt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),bt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),bt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),bt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),bt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Pn(Me(Se({},a),{body:Ye(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),bt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),bt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),bt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),bt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),bt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),bt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),bt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),bt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),bt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),bt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),bt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),bt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),bt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),bt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),bt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),bt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),bt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),bt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),bt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),bt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),bt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),bt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),bt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),bt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),bt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),bt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),bt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),bt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),bt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),bt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),bt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),bt("mbox","{:text}",{ifMode:"math",createAtom:a=>new Pn(Me(Se({},a),{type:"mord",body:Ye(a.args[0]),mode:"math"})),serialize:(a,y)=>ra("\\mbox",a.bodyToLatex(Me(Se({},y),{defaultMode:"text"})))}),bt("text","{:text}",{ifMode:"math",applyMode:"text"}),bt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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:""})}}),bt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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}}),bt("htmlData","{data:string}{content:auto}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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}}),bt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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}}),bt("em","{:rest}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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"})}),bt("emph","{:auto}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(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}};bt(["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(Se({},a),{delim:(y=a.args[0])!=null?y:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),bt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new hd(Me(Se({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),bt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new hd(Me(Se({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),bt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Pn(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===sc||E===Ps)&&(b=1),(E===ul||E===io)&&(b=2),(E===Po||E===Ha)&&(b=3);const ee=Ye(a.args[b]);return Pn.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${Pn.serialize(a.args[0],y)}}{${Pn.serialize(a.args[1],y)}}{${Pn.serialize(a.args[2],y)}}{${Pn.serialize(a.args[3],y)}}`}),bt("mathop","{:auto}",{createAtom:a=>new Pn(Me(Se({},a),{type:"mop",body:Ye(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=Pn.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 or(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[ra(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)),Si(b)}}),bt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Pn(Me(Se({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:Ye(a.args[0])}))}),bt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=Ye(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 Pn(Me(Se({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=Pn.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 or(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[ra(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)),Si(b)}}),bt(["char","unicode"],"{charcode:value}",{createAtom:a=>new Pn(Me(Se({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Ma((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)}}),bt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Pn(a),render:(a,y)=>{var b,E,ee;const re=new Di({parent:y,mathstyle:"textstyle"},a.style),ae=re.toEm((b=a.args[0])!=null?b:{dimension:0}),he=re.toEm((E=a.args[1])!=null?E:{dimension:10}),me=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),ye=new or(null,{classes:"rule",type:"ord"});return ye.width=he,ye.height=me+ae,ye.depth=-ae,ye.setStyle("border-right-width",he,"em"),ye.setStyle("border-top-width",me,"em"),ye.setStyle("border-color",a.style.color),ye.setStyle("vertical-align",ae,"em"),a.isSelected&&ye.setStyle("opacity","50%"),a.bind(re,ye),a.caret&&(ye.caret=a.caret),ye.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Ma(a.args[0])}]`:""}{${Ma(a.args[1])}}{${Ma(a.args[2])}}`}),bt(["overline","underline"],"{:auto}",{createAtom:a=>new Pn(Me(Se({},a),{body:Ye(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new Di({parent:y,mathstyle:"cramp"},a.style),ee=Pn.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new or(null,{classes:b+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let he;return b==="overline"?he=new Yi({shift:0,children:[{box:ee},3*re,{box:ae},re]}):he=new Yi({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(he.caret=a.caret),new or(he,{classes:b,type:"ignore"})}}),bt("overset","{:auto}{base:auto}",{createAtom:a=>{const y=Ye(a.args[1]);return new Jo(Me(Se({},a),{above:Ye(a.args[0]),body:y,skipBoundary:!1,boxType:_l(y)}))},serialize:(a,y)=>ra(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),bt("underset","{:auto}{base:auto}",{createAtom:a=>{const y=Ye(a.args[1]);return new Jo(Me(Se({},a),{below:Ye(a.args[0]),body:y,skipBoundary:!1,boxType:_l(y)}))},serialize:(a,y)=>ra(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),bt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=Ye(a.args[2]);return new Jo(Me(Se({},a),{above:Ye(a.args[0]),below:Ye(a.args[1]),body:y,skipBoundary:!1,boxType:_l(y)}))},serialize:(a,y)=>ra(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),bt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Jo(Me(Se({},a),{body:Ye(a.args[2]),above:Ye(a.args[1]),below:Ye(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>ra(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),bt("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new dd(Me(Se({},a),{body:Ye(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}))}}),bt(["vphantom"],"{:auto}",{createAtom:a=>new dd(Me(Se({},a),{body:Ye(a.args[0]),isInvisible:!0,smashWidth:!0}))}),bt(["hphantom"],"{:auto}",{createAtom:a=>new dd(Me(Se({},a),{body:Ye(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),bt(["phantom"],"{:auto}",{createAtom:a=>new dd(Me(Se({},a),{body:Ye(a.args[0]),isInvisible:!0}))}),bt("not","{:math}",{createAtom:a=>{const y=Ye(a.args[0]);return y.length===0?new Pn(Me(Se({},a),{type:"mrel",value:"\uE020"})):new Pn(Me(Se({},a),{body:[new dc(Me(Se({},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{${Pn.serialize(b.group,y)}}`:`\\not${Pn.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":_l(Ye(a.args[0])),ee=Pn.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),bt(["ne","neq"],"",{createAtom:a=>new Pn(Me(Se({},a),{type:"mrel",body:[new dc(Me(Se({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Pn(Me(Se({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),bt("rlap","{:auto}",{createAtom:a=>new dc(Me(Se({},a),{body:Ye(a.args[0]),align:"right"}))}),bt("llap","{:auto}",{createAtom:a=>new dc(Me(Se({},a),{body:Ye(a.args[0]),align:"left"}))}),bt("mathrlap","{:math}",{createAtom:a=>new dc(Me(Se({},a),{body:Ye(a.args[0]),align:"left"}))}),bt("mathllap","{:math}",{createAtom:a=>new dc(Me(Se({},a),{body:Ye(a.args[0]),align:"left"}))}),bt("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new ba(Me(Se({},a),{body:Ye(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return ra("\\raisebox",(b=Ma(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),bt("raise","{:value}{:auto}",{createAtom:a=>{var y;return new ba(Me(Se({},a),{body:Ye(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return ra("\\raise",(b=Ma(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),bt("lower","{:value}{:auto}",{createAtom:a=>{var y;return new ba(Me(Se({},a),{body:Ye(a.args[1]),padding:{dimension:0},offset:(y=Xo(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return ra("\\lower",(E=Ma(Xo((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Ie("0123456789/@.?!"),ot(65,90),ot(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"),bt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new hd(a)}),bt("space","",{createAtom:a=>new hd(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>",Gh="<mo>⁢</mo>";function Xh(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Qi(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Mv(a,y,b){var E,ee,re,ae,he,me,ye,we,Ne,qe,yt;let _t=!1;y=y!=null?y:a.atoms.length;let bn="",ir="",yn=a.atoms[a.index];const Nn=(ee=(E=yn.style)==null?void 0:E.variant)!=null?ee:"",dr=(ae=(re=yn.style)==null?void 0:re.variantStyle)!=null?ae:"";let Kn="";if(Nn||dr){const qr=nn(yn.value,(he=yn.style)==null?void 0:he.variant,(me=yn.style)==null?void 0:me.variantStyle);if(qr!==yn.value)return a.index+=1,bn=`<mi${Qi(yn.id,b)}>${qr}</mi>`,ml(bn,a,b)||(a.mathML+=bn,a.lastType="mi"),!0;Kn=(ye={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"}[dr+Nn])!=null?ye:"",Kn=` mathvariant="${Kn}"`}const Zr={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(yn.command==="!")return a.index+=1,bn="<mo>!</mo>",ml(bn,a,b)||(a.mathML+=bn,a.lastType="mo"),!0;if(Zr[yn.command]){a.index+=1;let qr=`<mi${Qi(yn.id,b)}${Kn}>${Zr[yn.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(qr=Gh+qr),ml(qr,a,b)||(a.mathML+=qr,a.lastType="mi"),!0}if(yn.command==="\\operatorname")ir=vu(yn.body),a.index+=1;else if(Nn||dr)for(;a.index<y&&(yn.type==="mord"||yn.type==="macro")&&!yn.isDigit()&&Nn===((Ne=(we=yn.style)==null?void 0:we.variant)!=null?Ne:"")&&dr===((yt=(qe=yn.style)==null?void 0:qe.variantStyle)!=null?yt:"");)ir+=vu([yn]),a.index+=1,yn=a.atoms[a.index];else(yn.type==="mord"||yn.type==="macro")&&!yn.isDigit()&&(ir+=vu([yn]),a.index+=1);if(ir.length>0){_t=!0,bn=`<mi${Kn}>${ir}</mi>`;const qr=a.lastType;bn.endsWith(">f</mi>")||bn.endsWith(">g</mi>")?(bn+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(bn)?"mo":"mi",ml(bn,a,b)||((qr==="mi"||qr==="mn"||qr==="mtext"||qr==="fence")&&(bn=Gh+bn),a.mathML+=bn)}return _t}function Ev(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function kv(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 ml(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=Ri(ee.superscript,b);y.lastType="";const he=Ri(ee.subscript,b);if(y.lastType=re,!ae&&!he)return!1;let me="";return ae&&he?me=`<msubsup>${a}${he}${ae}</msubsup>`:ae?me=`<msup>${a}${ae}</msup>`:he&&(me=`<msub>${a}${he}</msub>`),y.mathML+=me,y.lastType="",!0}function _v(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 ${Qi(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=kv(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"+Qi(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Ev(a)&&(re=a.index,a.index+=1),ml(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Dv(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,he=0;const me=a.index;let ye=-1,we=me+1;for(;we<y&&!ae;)a.atoms[we].type==="mopen"?he+=1:a.atoms[we].type==="mclose"&&(he-=1),he===-1&&(ae=!0,ye=we),we+=1;ae&&(ee="<mrow>",ee+=Sc(a.atoms[me],b),ee+=Ri(a.atoms,b,me+1,ye),ee+=Sc(a.atoms[ye],b),ee+="</mrow>",a.index=ye+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Gh),ml(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Av(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 he={"\\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(he[ae.command]){a.index+=1;const me=`<mo${Qi(ae.id,b)}>${he[ae.command]}</mo>`;return ml(me,a,b)||(a.mathML+=me,a.lastType="mo"),!0}if(a.index<y&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wf(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 me=Sc(ae,b);return ae.superscript&&ae.subscript?(ee+="<munderover>"+me,ee+=Ri(ae.subscript,b),ee+=Ri(ae.superscript,b),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+me,ee+=Ri(ae.superscript,b),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+me,ee+=Ri(ae.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const me=a.atoms[a.index],ye=me.value==="\\operatorname",we=ye?'<mi class="MathML-Unit"'+Qi(me.id,b)+">"+vu(me.value)+"</mi>":Sc(me,b);ee+=we,!ye&&!/^<mo>(.*)<\/mo>$/.test(we)?(ee+=lp,re="applyfunction"):re=ye?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Gh+ee),a.index+=1}return ee.length>0&&(E=!0,ml(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Ri(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 Pn)ee.mathML=Wf(a,y);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(_v(ee,E,y)||Lv(ee,E,y)||Mv(ee,E,y)||Av(ee,E,y)||Dv(ee,E,y))re+=1;else if(ee.index<E){let ae=Wf(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,ml(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 Sc(a,y){let b="";const E=vu(a.value);return E&&(b="<mo"+Qi(a.id,y)+">"+E+"</mo>"),b}function vu(a){if(!a)return"";if(typeof a=="string")return Xh(a);if(!Array.isArray(a)&&typeof a.body=="string")return Xh(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return Xh(y)}function Wf(a,y){var b,E,ee,re,ae,he,me,ye,we,Ne,qe,yt,_t,bn,ir,yn,Nn,dr,Kn,Zr,qr,Vr;if(a.mode==="text")return`<mi${Qi(a.id,y)}>${a.value}</mi>`;const Ti={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"},Ui={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let xr="",Wo="",js,Qo,Ua,Zo,Eo,ea;const{command:wa}=a;if(a.command==="\\error")return`<merror${Qi(a.id,y)}>${Ri(a.body,y)}</merror>`;const Ga={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Vs={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":xr=Ri(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(xr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(xr+="<mo>"+(Ga[a.leftDelim]||a.leftDelim)+"</mo>")),xr+="<mtable",a.colFormat){for(xr+=' columnalign="',Ua=0;Ua<a.colFormat.length;Ua++)a.colFormat[Ua].align&&(xr+={l:"left",c:"center",r:"right"}[a.colFormat[Ua].align]+" ");xr+='"'}for(xr+=">",Qo=0;Qo<a.array.length;Qo++){for(xr+="<mtr>",js=0;js<a.array[Qo].length;js++)xr+="<mtd>"+Ri(a.array[Qo][js],y)+"</mtd>";xr+="</mtr>"}xr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(xr+="<mo>"+(Ga[a.leftDelim]||a.rightDelim)+"</mo>"),xr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(xr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(xr+="<mo"+Qi(a.id,y)+">"+(Ga[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(xr+="<mfrac>",xr+=Ri(a.above,y)||"<mi> </mi>",xr+=Ri(a.below,y)||"<mi> </mi>",xr+="</mfrac>"):(xr+="<mtable"+Qi(a.id,y)+">",xr+="<mtr>"+Ri(a.above,y)+"</mtr>",xr+="<mtr>"+Ri(a.below,y)+"</mtr>",xr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(xr+="<mo"+Qi(a.id,y)+">"+(Ga[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(xr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(xr+="<msqrt"+Qi(a.id,y)+">",xr+=Ri(a.body,y),xr+="</msqrt>"):(xr+="<mroot"+Qi(a.id,y)+">",xr+=Ri(a.body,y),xr+=Ri(a.above,y),xr+="</mroot>");break;case"leftright":const Us=a,Gs=Us.leftDelim;xr="<mrow>",Gs&&Gs!=="."&&(xr+=`<mo${Qi(a.id,y)}>${(b=Ga[Gs])!=null?b:Gs}</mo>`),a.body&&(xr+=Ri(a.body,y));const Xs=Us.matchingRightDelim();Xs&&Xs!=="."&&(xr+=`<mo${Qi(a.id,y)}>${(E=Ga[Xs])!=null?E:Xs}</mo>`),xr+="</mrow>";break;case"sizeddelim":case"delim":xr+=`<mo${Qi(a.id,y)}>${Ga[a.value]||a.value}</mo>`;break;case"accent":xr+='<mover accent="true"'+Qi(a.id,y)+">",xr+=Ri(a.body,y),xr+="<mo>"+(Vs[wa]||a.accent)+"</mo>",xr+="</mover>";break;case"line":case"overlap":break;case"overunder":Eo=a.above,Zo=a.below,(a.svgAbove||Eo)&&(a.svgBelow||Zo)?ea=a.body:Eo&&Eo.length>0?(ea=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(Zo=a.body[0].below,ea=a.body[0].body):((he=(ae=a.body)==null?void 0:ae[0])==null?void 0:he.type)==="first"&&((ye=(me=a.body)==null?void 0:me[1])!=null&&ye.below)&&(Zo=a.body[1].below,ea=a.body[1].body)):Zo&&Zo.length>0&&(ea=a.body,(Ne=(we=a.body)==null?void 0:we[0])!=null&&Ne.above?(Eo=a.body[0].above,ea=a.body[0].body):((yt=(qe=a.body)==null?void 0:qe[0])==null?void 0:yt.type)==="first"&&((bn=(_t=a.body)==null?void 0:_t[1])!=null&&bn.above)&&(Eo=a.body[1].overscript,ea=a.body[1].body)),(a.svgAbove||Eo)&&(a.svgBelow||Zo)?(xr+=`<munderover ${Qi(a.id,y)}>`,xr+=(ir=Ti[a.svgBody])!=null?ir:Ri(ea,y),xr+=(yn=Ti[a.svgBelow])!=null?yn:Ri(Zo,y),xr+=(Nn=Ti[a.svgAbove])!=null?Nn:Ri(Eo,y),xr+="</munderover>"):a.svgAbove||Eo?(xr+=`<mover ${Qi(a.id,y)}>`+((dr=Ti[a.svgBody])!=null?dr:Ri(ea,y)),xr+=(Kn=Ti[a.svgAbove])!=null?Kn:Ri(Eo,y),xr+="</mover>"):(a.svgBelow||Zo)&&(xr+=`<munder ${Qi(a.id,y)}>`+((Zr=Ti[a.svgBody])!=null?Zr:Ri(ea,y)),xr+=(qr=Ti[a.svgBelow])!=null?qr:Ri(Zo,y),xr+="</munder>");break;case"placeholder":xr+="?";break;case"mord":{xr=typeof a.value=="string"?a.value:wa,wa==="\\char"?xr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":xr.length>0&&xr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?xr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?xr=a.value.charAt(0):(console.error("Did not expect this"),xr=""));const ws=/\d/.test(xr)?"mn":"mi";xr=`<${ws}${Qi(a.id,y)}>${Xh(xr)}</${ws}>`;break}case"mbin":case"mrel":case"minner":xr=Sc(a,y);break;case"mpunct":xr='<mo separator="true"'+Qi(a.id,y)+">"+wa+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(xr="<mo"+Qi(a.id,y)+">",xr+=wa==="\\operatorname"?a.body:wa||a.body,xr+="</mo>");break;case"box":xr='<menclose notation="box"',a.backgroundcolor&&(xr+=' mathbackground="'+a.backgroundcolor+'"'),xr+=Qi(a.id,y)+">"+Ri(a.body,y)+"</menclose>";break;case"spacing":xr+='<mspace width="'+((Vr=Ui[wa])!=null?Vr:0)+'em"/>';break;case"enclose":xr='<menclose notation="';for(const ws in a.notation)Object.prototype.hasOwnProperty.call(a.notation,ws)&&a.notation[ws]&&(xr+=Wo+ws,Wo=" ");xr+=Qi(a.id,y)+'">'+Ri(a.body,y)+"</menclose>";break;case"prompt":xr='<menclose notation="roundexbox""">'+Ri(a.body,y)+"</menclose>";break;case"space":xr+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":xr+=Sc(a,y);break;case"mclose":xr+=Sc(a,y);break;case"macro":{const ws=a.command+vu(a.macroArgs);ws&&(xr+=`<mo ${Qi(a.id,y)}>${ws}</mo>`)}break;case"latexgroup":xr+=Ri(a.body,y);break;case"latex":xr+="<mtext"+Qi(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":xr+=Ri(a.body,y);break;case"text":xr+=`<mtext ${Qi(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${Qi(a.id,y)} displaystyle="true">${Ri(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${Qi(a.id,y)} displaystyle="false">${Ri(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return xr}var yu={"\\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"},Zf={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 Tv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function _d(a){let y=0;if(De(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Iv(a){if(De(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function cp(a){let y="";if(De(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 Li(a,y){var b,E,ee,re,ae;function he(we){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(we)?` <say-as interpret-as="character">${we}</say-as>`:/[A-Z]/.test(we)?`capital <say-as interpret-as="character">${we.toLowerCase()}</say-as>`:we:/[a-z]/.test(we)?" '"+we.toUpperCase()+"'":/[A-Z]/.test(we)?" 'capital "+we.toUpperCase()+"'":we}function me(we){return"<emphasis>"+we+"</emphasis>"}if(!y)return"";let ye="";if(De(y)){let we=!1,Ne=!1;for(let qe=0;qe<y.length;qe++)y[qe].type!=="first"&&(y[qe].mode!=="text"&&(Ne=!1),qe<y.length-2&&y[qe].type==="mopen"&&y[qe+2].type==="mclose"&&y[qe+1].type==="mord"?(ye+=" of ",ye+=me(Li(a,y[qe+1])),qe+=2):y[qe].mode==="text"?Ne?ye+=(b=y[qe].value)!=null?b:" ":(Ne=!0,ye+=Li("text",y[qe])):y[qe].isDigit()?we?ye+=y[qe].asDigit():(we=!0,ye+=Li(a,y[qe])):(we=!1,ye+=Li(a,y[qe])))}else if(y.mode==="text")y.id&&a==="math"&&(ye+='<mark name="'+y.id.toString()+'"/>'),ye+=y.value;else{y.id&&a==="math"&&(ye+='<mark name="'+y.id.toString()+'"/>');let we="",Ne="",qe="",yt=!1;const{command:_t}=y;switch(_t){case"\\vec":return"vector "+Li(a,y.body);case"\\acute":return Li(a,y.body)+" acute";case"\\grave":return Li(a,y.body)+" grave";case"\\dot":return"dot over"+Li(a,y.body);case"\\ddot":return"double dot over"+Li(a,y.body);case"\\mathring":return"ring over"+Li(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+Li(a,y.body);case"\\bar":return Li(a,y.body)+" bar";case"\\breve":return Li(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Li(a,y.body);case"\\hat":case"\\widehat":return"hat over"+Li(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Li(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+Li(a,y.body)}switch(y.type){case"prompt":const bn=y.body.length>1?'start input . <break time="500ms"/> '+Li(a,y.body)+'. <break time="500ms"/> end input':"blank";ye+=' <break time="300ms"/> '+bn+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const ir=y.array,yn=y.environmentName;if(Object.keys(Zf).includes(yn)){ye+=` begin ${Zf[yn]} `;for(let Kn=0;Kn<ir.length;Kn++){Kn>0&&(ye+=","),ye+=` row ${Kn+1} `;for(let Zr=0;Zr<ir[Kn].length;Zr++)Zr>0&&(ye+=","),ye+=` column ${Zr+1}: `,ye+=Li("math",ir[Kn][Zr])}ye+=` end ${Zf[yn]} `}break;case"group":_t==="\\ne"?ye+=" not equal ":(_t==="\\not"&&(ye+=" not "),ye+=Li("math",y.body));break;case"root":ye+=Li("math",y.body);break;case"genfrac":if(we=Li("math",y.above),Ne=Li("math",y.below),_d(y.above)&&_d(y.below)){const Zr={"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 "}[cp(y.above)+"/"+cp(y.below)];Zr?ye=Zr:ye+=we+" over "+Ne}else ye+=' the fraction <break time="150ms"/>'+we+' over <break time="150ms"/>'+Ne+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(qe=Li("math",y.body),y.hasEmptyBranch("above"))ye+=_d(y.body)?" the square root of "+qe+" , ":' the square root of <break time="200ms"/>'+qe+'. <break time="200ms"/> End square root';else{let Kn=Li("math",y.above);Kn=Kn.trim();const Zr=Kn.replace(/<mark([^/]*)\/>/g,"");Zr==="3"?ye+=' the cube root of <break time="200ms"/>'+qe+'. <break time="200ms"/> End cube root':Zr==="n"?ye+=' the nth root of <break time="200ms"/>'+qe+'. <break time="200ms"/> End root':ye+=' the root with index: <break time="200ms"/>'+Kn+', of <break time="200ms"/>'+qe+'. <break time="200ms"/> End root'}break;case"leftright":{const Kn=y;ye+=(ee=Kn.leftDelim?yu[Kn.leftDelim]:void 0)!=null?ee:Kn.leftDelim,ye+=Li("math",y.body),ye+=(re=Kn.rightDelim?yu[Kn.rightDelim]:void 0)!=null?re:Kn.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const Nn=_t.replace(/^\\/g,""),dr=On()[Nn];dr&&(dr!=null&&dr.expand?ye+=Li("math",y.body):ye+=`${Nn} `);break;case"placeholder":ye+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(_t==="\\mathbin"||_t==="\\mathrel"||_t==="\\mathopen"||_t==="\\mathclose"||_t==="\\mathpunct"||_t==="\\mathord"||_t==="\\mathinner"){ye=Li(a,y.body);break}let Kn=y.isDigit()?y.asDigit():y.value,Zr=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(Zr=y.value,Kn=Zr),a==="text")ye+=Kn;else{if(y.type==="mbin"&&(ye+='<break time="150ms"/>'),Kn){const qr=yu[Kn]||(Zr?yu[Zr.trim()]:"");if(qr)ye+=" "+qr;else{const Vr=Zr?Tv(Zr.trim()):"";ye+=Vr||he(Kn)}}else ye+=Li("math",y.body);y.type==="mbin"&&(ye+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const Kn=y.command;if(Kn==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Zr=Li("math",y.superscript);Zr=Zr.trim();let qr=Li("math",y.subscript);qr=qr.trim(),ye+=' the summation from <break time="200ms"/>'+qr+'<break time="200ms"/> to <break time="200ms"/>'+Zr+'<break time="200ms"/> of <break time="150ms"/>',yt=!0}else if(y.hasEmptyBranch("subscript"))ye+=" the summation of";else{let Zr=Li("math",y.subscript);Zr=Zr.trim(),ye+=' the summation from <break time="200ms"/>'+Zr+'<break time="200ms"/> of <break time="150ms"/>',yt=!0}else if(Kn==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Zr=Li("math",y.superscript);Zr=Zr.trim();let qr=Li("math",y.subscript);qr=qr.trim(),ye+=' the product from <break time="200ms"/>'+qr+'<break time="200ms"/> to <break time="200ms"/>'+Zr+'<break time="200ms"/> of <break time="150ms"/>',yt=!0}else if(y.hasEmptyBranch("subscript"))ye+=" the product of ";else{let Zr=Li("math",y.subscript);Zr=Zr.trim(),ye+=' the product from <break time="200ms"/>'+Zr+'<break time="200ms"/> of <break time="150ms"/>',yt=!0}else if(Kn==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Zr=Li("math",y.superscript);Zr=Zr.trim();let qr=Li("math",y.subscript);qr=qr.trim(),ye+=' the integral from <break time="200ms"/>'+me(qr)+'<break time="200ms"/> to <break time="200ms"/>'+me(Zr)+' <break time="200ms"/> of ',yt=!0}else ye+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const Zr=(ae=yu[y.value])!=null?ae:y.command?yu[y.command]:void 0;ye+=Zr||" "+y.value}else y.command&&(y.command==="\\mathop"?ye+=Li("math",y.body):y.command==="\\operatorname"?ye+=Pv(y.body):ye+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":qe=Li("math",y.body),ye+=" crossed out "+qe+". End crossed out.";break;case"space":case"spacing":break}if(!yt&&!y.hasEmptyBranch("superscript")){let bn=Li(a,y.superscript);bn=bn.trim();const ir=bn.replace(/<[^>]*>/g,"");if(_d(y.superscript)){if(a==="math"){const yn=Iv(y.superscript);yn&&(ye+='<mark name="'+yn+'"/>')}ir==="\u2032"?ye+=" prime ":ir==="2"?ye+=" squared ":ir==="3"?ye+=" cubed ":Number.isNaN(Number.parseInt(ir))?ye+=" to the "+bn+"; ":ye+=' to the <say-as interpret-as="ordinal">'+ir+"</say-as> power; "}else Number.isNaN(Number.parseInt(ir))?ye+=" raised to the "+bn+"; ":ye+=' raised to the <say-as interpret-as="ordinal">'+ir+"</say-as> power; "}if(!yt&&!y.hasEmptyBranch("subscript")){let bn=Li("math",y.subscript);bn=bn.trim(),ye+=_d(y.subscript)?" sub "+bn:" subscript "+bn+". End subscript. "}}return ye}function bu(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Ri(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=Me(Se({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=Me(Se({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=Me(Se({},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(he){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",he)}return ae}return""}let E=Li("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"&&st()==="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 Ld={"\\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"},Dd={"\\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 xa(a){var y,b,E,ee,re,ae,he,me,ye,we,Ne,qe,yt;if(!a)return"";if(De(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(xa).join("");if(a[0].mode==="text"){let dr=0,Kn="";for(;((y=a[dr])==null?void 0:y.mode)==="text";)Kn+=a[dr].body?xa(a[dr].body):a[dr].value,dr++;return`"${Kn}" ${xa(a.slice(dr))}`}let yn=0;const Nn=[];for(;a[yn]&&a[yn].mode==="math";){let dr="";for(;a[yn]&&a[yn].type==="mord"&&/\d/.test(a[yn].value);)dr+=a[yn++].value;dr?Nn.push(dr):Nn.push(xa(a[yn++]))}return Nn.push(xa(a.slice(yn))),Bv(Nn)}if(a.mode==="text")return`"${a.value}"`;let _t="";const{command:bn}=a;let ir;if(bn==="\\placeholder")return`(${xa(a.body)})`;switch(a.type){case"accent":const yn={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[bn];_t=`${yn!=null?yn:""} ${xa(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(Vr=>Vr.value).join("");case"group":case"root":_t=(b=Ld[bn])!=null?b:xa(a.body);break;case"genfrac":{const Vr=a;(Vr.leftDelim||Vr.rightDelim)&&(_t=Vr.leftDelim==="."||!Vr.leftDelim?"{:":Vr.leftDelim),Vr.hasBarLine?(_t+="(",_t+=xa(Vr.above),_t+=")/(",_t+=xa(Vr.below),_t+=")"):(_t+="("+xa(Vr.above)+"),",_t+="("+xa(Vr.below)+")"),(Vr.leftDelim||Vr.rightDelim)&&(_t+=Vr.rightDelim==="."||!Vr.rightDelim?"{:":Vr.rightDelim)}break;case"surd":_t+=a.hasEmptyBranch("above")?"sqrt("+xa(a.body)+")":"root("+xa(a.above)+")("+xa(a.body)+")";break;case"latex":_t=a.value;break;case"leftright":{const Vr=a,Ti=Vr.leftDelim;_t+=Ti==="."||!Ti?"{:":Ti,_t+=xa(Vr.body);const Ui=Vr.matchingRightDelim();_t+=Ui==="."||!Ui?":}":Ui}break;case"sizeddelim":case"delim":_t=a.value;break;case"overlap":break;case"overunder":break;case"mord":_t=(ee=(E=Ld[bn])!=null?E:bn)!=null?ee:typeof a.value=="string"?a.value:"",_t.startsWith("\\")&&(_t+=" "),ir=bn?bn.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,ir?_t=String.fromCodePoint(Number.parseInt("0x"+ir[1])):_t.length>0&&_t.startsWith("\\")&&(_t=typeof a.value=="string"?a.value.charAt(0):a.command),_t=Ov(_t,a.style);break;case"mbin":case"mrel":case"minner":_t=(ae=(re=Ld[bn])!=null?re:Dd[bn])!=null?ae:a.value;break;case"mopen":case"mclose":_t=a.value;break;case"mpunct":_t=(he=Dd[bn])!=null?he:bn;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Dd[bn]?_t=Dd[bn]:_t=bn==="\\operatorname"?xa(a.body):(me=a.value)!=null?me:bn,_t+=" ");break;case"array":const Nn=a.array,dr=a.environmentName,Kn=(ye={bmatrix:["[","]"],"bmatrix*":["[","]"]}[dr])!=null?ye:["(",")"],Zr=[];for(const Vr of Nn){const Ti=[];for(const Ui of Vr)Ti.push(Kn[0]+xa(Ui)+Kn[1]);Zr.push(Ti.join(","))}const qr=(we={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[dr])!=null?we:["(",")"];_t=qr[0]+Zr.join(",")+qr[1];break;case"box":break;case"spacing":_t=(Ne=Ld[bn])!=null?Ne:" ";break;case"enclose":_t="("+xa(a.body)+")";break;case"space":_t=" ";break;case"subsup":_t="";break;case"macro":_t=(yt=(qe=Ld[bn])!=null?qe:Dd[bn])!=null?yt:xa(a.body);break}if(!a.hasEmptyBranch("subscript")){_t+="_";const yn=xa(a.subscript);_t+=yn.length!==1?`(${yn})`:yn}if(!a.hasEmptyBranch("superscript")){_t+="^";const yn=xa(a.superscript);_t+=yn.length!==1?`(${yn})`:yn}return _t}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 Va(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new Di({from:Me(Se({},Qc()),{renderPlaceholder:()=>new or(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),ae=new Pn({mode:"math",type:"root",body:ja(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return ae?(Yc(fd(ae,ee)),Jc(ae,{classes:"ML__latex"}).toMarkup()):""}function _1(a){return t0(a,{context:Qc()})}function $v(a,y={}){return Ri(ja(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Rv(a){const y=ja(a,{parseMode:"math",mathstyle:"displaystyle"});return bu(y)}var Yh;function Nv(a){var y,b;if(!Yh){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?Yh=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=Yh==null?void 0:Yh.box(a).latex)!=null?b:""}function L1(a,y="math"){return xa(new Pn({type:"root",body:ja(a,{parseMode:y})}))}function D1(a){return uc(a,{format:"ascii-math"})[1]}function jf(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?up(a):a}function xu(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 Vf(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,he={L:y,C:ee,H:ae};return a.alpha!==void 0&&(he.alpha=a.alpha),he}function Uf(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),he=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,me=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,ye=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,we=Ne=>{const qe=Math.abs(Ne);return qe<=.0031308?Ne*12.92:(Math.sign(Ne)||1)*(1.055*Math.pow(qe,1/2.4)-.055)};return[we(he),we(me),we(ye)]}function Gf(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xf(a,y){let[b,E,ee]=a;return b=xu(b*255),E=xu(E*255),ee=xu(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function up(a){let[y,b,E]=Uf(a);if(Gf([y,b,E]))return Xf([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=Uf(Vf(ee)),!Gf([y,b,E]))return Xf([y,b,E],a.alpha);let re=0,ae=a.L,he=(re+ae)/2;ee.C=he;const me=.36/Math.pow(2,12);for(;ae-re>me;)he=(re+ae)/2,ee.C=he,[y,b,E]=Uf(Vf(ee)),Gf([y,b,E])?re=he:ae=he;return Xf([y,b,E],a.alpha)}function Kv(a){return up(Vf(a))}function dp(a,y){const b=jf(a),E=jf(y),ee=.56,re=.57,ae=.62,he=.65,me=.022,ye=1.414,we=.1,Ne=5e-4,qe=1.14,yt=.027,_t=1.14,bn=.027;function ir(Vr){return Vr>=me?Vr:Vr+Ys(me-Vr,ye)}function yn(Vr){return(Vr<0?-1:1)*Math.pow(Math.abs(Vr),2.4)}const Nn=ir(yn(E.r/255)*.2126729+yn(E.g/255)*.7151522+yn(E.b/255)*.072175),dr=ir(yn(b.r/255)*.2126729+yn(b.g/255)*.7151522+yn(b.b/255)*.072175);let Kn,Zr,qr;return Math.abs(dr-Nn)<Ne?Zr=0:dr>Nn?(Kn=Ys(dr,ee)-Ys(Nn,re),Zr=Kn*qe):(Kn=Ys(dr,he)-Ys(Nn,ae),Zr=Kn*_t),Math.abs(Zr)<we?qr=0:Zr>0?qr=Zr-bn:qr=Zr+yt,qr*100}function hp(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=jf(a);let b=((1<<24)+(xu(y.r)<<16)+(xu(y.g)<<8)+xu(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 aa(a){const y=fp(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function fp(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=fp(a);if(b.length!==1)return!1;const E=pf[y];return E?!!E.test(b[0].value):!1}function Zv(a,y){return aa(a).length>0}function jv(a){return[Yf(a,"double-struck","mathbb","tooltip.blackboard"),Yf(a,"fraktur","mathfrak","tooltip.fraktur"),Yf(a,"calligraphic","mathcal","tooltip.caligraphic"),Jf(a,"up","mathrm","tooltip.roman-upright"),Jf(a,"bold","mathbf","tooltip.bold"),Jf(a,"italic","mathit","tooltip.italic")]}function Vv(a){return[{label:()=>Va(`\\vec{${aa(a)}}`),visible:()=>aa(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overrightarrow{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overleftarrow{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Va(`\\dot{${aa(a)}}`),visible:()=>aa(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Va(`\\ddot{${aa(a)}}`),visible:()=>aa(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Va(`\\bar{${aa(a)}}`),visible:()=>aa(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overline{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overgroup{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Va(`\\overbrace{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Va(`\\underline{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Va(`\\undergroup{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Va(`\\underbrace{${aa(a)}}`),visible:()=>aa(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Uv(a){return[{label:()=>Va(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Va(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Va(`\\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(He))y.push({class:(Hv(hp(He[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${He[b]} "></span>`,ariaLabel:()=>{var E;return(E=mt(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(Ue))y.push({class:(hp(Ue[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ue[b]} "></span>`,ariaLabel:()=>{var E;return(E=mt(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 Yv=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 Jv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new Yv(ee,re,b,E),label:"\u2610",tooltip:()=>mt("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 qv(a){return[{label:()=>mt("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Cc(a)},{label:()=>mt("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Cc(a)},{label:()=>mt("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Cc(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>mt("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Cc(a)},{type:"divider"},{label:()=>mt("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Cc(a)},{label:()=>mt("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Cc(a)},{type:"divider"},{label:()=>mt("menu.borders"),visible:()=>(Qv(a)||Cc(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>Ad(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>Ad(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>Ad(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>Ad(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>Ad(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>mt("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Jv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>mt("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>mt("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{cu(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>mt("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{cu(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>mt("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>mt("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:jv(a),submenuClass:"variant-submenu"},{label:()=>mt("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>mt("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>mt("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Vv(a),submenuClass:"variant-submenu"},{label:()=>mt("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&aa(a).length>0,submenu:Uv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>mt("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:()=>mt("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?mt("menu.solve-for",Va(b)):mt("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:()=>mt("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>mt("menu.copy"),id:"copy",submenu:[{label:()=>mt("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>si.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>mt("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>si.copyToClipboard(a,"ascii-math")},{label:()=>mt("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>si.copyToClipboard(a,"math-ml")}]},{label:()=>mt("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>mt("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Cc(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 Ad(a,y){Ch(a),a.flushInlineShortcutBuffer(),I0(a.model,y),va(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 Yf(a,y,b,E){return{label:()=>Va(`\\${b}{${aa(a)}}`),tooltip:()=>{var ee;return(ee=mt(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 Jf(a,y,b,E){return{label:()=>Va(`\\${b}{${aa(a)}}`),tooltip:()=>{var ee;return(ee=mt(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 wu(a,y){return a+bu(y)}Oo({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(we){let Ne=null;switch(we){case"all":Ne=re.root;break;case"selection":Ne=re.getAtoms(re.selection);break;case"left":{Ne=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{Ne=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":Ne=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:qe}=re.at(re.position);qe!=null&&qe.parent?Ne=qe:Ne=re.root;break}default:Ne=re.root}return Ne}function he(we){let Ne="";switch(we){case"all":console.log("Internal failure: speak all failed");break;case"selection":Ne="no selection";break;case"left":Ne="at start";break;case"right":Ne="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Ne="no parent";break;default:console.log('unknown speak_ param value: "'+we+'"');break}return Ne}const me=ae(y);if(me===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,he(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const ye=bu(me);return vt()&&b.withHighlighting?(Fl().readAloudMathfield=a,pc(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,ye)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(ye),!1}function r1(a){var y,b;if(!vt()){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 he=new Uint8Array(ae.AudioStream),me=new Blob([he.buffer],{type:"audio/mpeg"}),ye=URL.createObjectURL(me);new Audio(ye).play().catch(Ne=>console.log(Ne))}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=wu("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=wu("",a.model.at(a.model.position));else if(y==="line"){const re=wu("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?wu(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 wu("",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+=wu("",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=Ol(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 we=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(we))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(we-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(we-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(we+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(we+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=we,this._position=we,this._selection=re;return}const ae=Wa(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const he=this.at(ae[0]+1),me=this.at(ae[1]),ye=Pn.commonAncestor(he,me);(ye==null?void 0:ye.type)==="array"&&he.parent===ye&&me.parent===ye?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 qa&&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(tu(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((ye,we)=>[...ye,...this.getAtoms(we,E)],[]);a=a.ranges[0]}let ee,re;if(Bs(a)){if(ee=a,!Bs(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,he=Math.max(ee,re);if(!E.includeChildren&&ae===1&&he===this.lastOffset)return[this.root];let me=[];for(let ye=ae;ye<=he;ye++){const we=this.atoms[ye];mp(this,we,ae,he)&&me.push(we)}return E.includeChildren||(me=me.filter(ye=>{let we=!1,{parent:Ne}=ye;for(;Ne&&!we;)we=mp(this,Ne,ae,he),Ne=Ne.parent;return!we})),me}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 Pn({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 Pn.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 Ri(a);if(b==="spoken")return bu(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=bu(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=bu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?xa(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(Bs(a)&&Bs(y)?(E=[this.normalizeRange([a,y])],ee=b):eu(a)?(E=[this.normalizeRange(a)],ee=y):tu(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 Si(E.map(ae=>Pn.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&&qf(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&qf(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&&qf(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 he=this.root.changeCounter!==ae,me=E!==this._anchor||ee!==this._position||cc(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&he&&this.contentDidChange({inputType:a.type}),a.selection&&me&&this.selectionDidChange(),he||me}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(Bs(a)){const ee=this.normalizeOffset(a);if(Bs(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(eu(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 tu(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(Hs(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(Se({},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(Hs(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 qf(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 Td(a,y,b,E){var ee,re,ae,he,me,ye;const we=b.parent;if(we&&b instanceof $i){const Ne=!E&&y==="forward"||E==="body"&&y==="backward";let qe=Ne?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return Ne?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),qe--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),qe--),a.position=qe,!0}if(we&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const Ne=b.leftSibling;b.hasChildren&&we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),a.position=a.offsetOf(Ne)}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),we.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(we&&(b.type==="box"||b.type==="enclose")){const Ne=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),a.position=a.offsetOf(Ne),!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 Ne=Id.fractionNavigationOrder==="numerator-denominator"?"above":"below",qe=Ne==="above"?"below":"above";if(we&&(y==="forward"&&E===Ne||y==="backward"&&E===qe)){const yt=b.removeBranch(Ne),_t=b.removeBranch(qe);return we.addChildrenAfter([...yt,..._t],b),we.removeChild(b),a.position=a.offsetOf(yt.length>0?yt[yt.length-1]:_t[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 Ne=y==="forward"?(ae=(ee=b.superscript)==null?void 0:ee[0])!=null?ae:(re=b.subscript)==null?void 0:re[0]:(ye=(he=b.subscript)==null?void 0:he[0].lastSibling)!=null?ye:(me=b.superscript)==null?void 0:me[0].lastSibling;return Ne&&(a.position=a.offsetOf(Ne)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const Ne=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=Ne,!0}if(E==="superscript")if(y==="backward"){const Ne=a.offsetOf(b.firstChild)-1;console.assert(Ne>=0),a.position=Ne}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 Ne=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=Ne}return!0}if((we==null?void 0:we.type)==="genfrac"&&!E&&b.type!=="first"){let Ne=a.offsetOf(b.leftSibling);return we.removeChild(b),we.hasEmptyBranch("above")&&we.hasEmptyBranch("below")?(Ne=a.offsetOf(we.leftSibling),we.parent.removeChild(we),a.announce("delete",void 0,[we]),a.position=Ne,!0):(a.announce("delete",void 0,[b]),a.position=Ne,!0)}if(y==="backward"&&((we==null?void 0:we.command)==="\\ln"||(we==null?void 0:we.command)==="\\log")&&b.parentBranch!=="body"){const Ne=a.offsetOf(we.leftSibling);return we.parent.removeChild(we),a.announce("delete",void 0,[we]),a.position=Ne,!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&&Td(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Td(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])}}):Zs(a,Wa(a.selection),"deleteContentBackward")}function c1(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&&Td(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Td(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Td(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])}):Zs(a,Wa(a.selection),"deleteContentForward")}function Zs(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 he=E[E.length-1];if(ae===ee&&he===re){const me=E[0].parent;me.parent&&me.type!=="prompt"&&(y=[a.offsetOf(me.leftSibling),a.offsetOf(me)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const me=E[0].parent,ye=E[0].parentBranch==="below"?"above":"below",we=a.offsetOf(me.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var Ne,qe;const yt=me.removeBranch(ye);if(yt.length===1&&yt[0].type==="placeholder")(qe=me.parent)==null||qe.removeChild(me),a.position=Math.max(0,we);else{const _t=me.parent.addChildrenAfter(yt,me);(Ne=me.parent)==null||Ne.removeChild(me),a.position=a.offsetOf(_t)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Oo({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&Zs(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&Zs(a,[a.anchor,_f(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&Zs(a,[a.anchor,_f(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&Zs(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&Zs(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&Zs(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&Zs(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var u1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${mt("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="${mt("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>`,h1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=Se(Me(Se({},Bh()),{macros:On(),registers:Al()}),Ph(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 he=D0(this.options),me=new Pn({type:"root",mode:he,body:ja(ae,{context:this.context})});this.model=new s1(this,he,me),this.undoManager=new Rg(this.model);const ye=[];if(ye.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>"),ye.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),ye.push("<span part=content class=ML__content>"),ye.push(w0(this)),ye.push("</span>"),window.mathVirtualKeyboard&&(ye.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">`),ye.push(u1),ye.push("</div>")),ye.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),ye.push(d1),ye.push("</div>"),ye.push("</span>"),ye.push("<span class=ML__sr-only>"),ye.push("<span role=status aria-live=assertive aria-atomic=true></span>"),ye.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(ye.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=it.subscribe(()=>it.update(this.element)),it.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",Ne=>Ne.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(Hs(this)))},{signal:re}),this._menu=new Sv(qv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const we=this.element.querySelector("[part=menu-toggle]");we==null||we.addEventListener("pointerdown",Ne=>{if(Ne.currentTarget!==we||this._menu.state!=="closed")return;this.element.classList.add("tracking");const qe=we.getBoundingClientRect();this._menu.modifiers=fc(Ne),this._menu.show({target:we,location:{x:qe.left,y:qe.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Ne.preventDefault(),Ne.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(we.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(()=>va(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),gd&&!it.locale.startsWith(gd.locale)&&Nm(it.locale),Ho!=="ready"&&document.fonts.ready.then(()=>Lh(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(Hs(this)),Vh(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Nf())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:Rs(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:It(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:et(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=Pn.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=Se({},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=Pf(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 me of Object.keys(y)){const ye=this.queryStyle({[me]:y[me]});if(ye==="none")return"none";if(ye==="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 he=0;for(const me of re){if(me.type==="first"){ae-=1;continue}me.style[E]===ee&&(he+=1)}return he===0?"none":he===ae?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Um(this.options.keybindings,(a=vd())!=null?a:Fm());return((y=vd())==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=Se(Se({},this.options),Ph(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=Pn.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&si.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)&&va(this)}getOptions(a){return gc(this.options,a)}getOption(a){return gc(this.options,a)}handleEvent(a){return zl(this,null,function*(){var y;if(Fo(this)){if(Cf(a)){if(!ld(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(du(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))&&Hh.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Hh.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Vh(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Fo(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Fo(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Fo(this))return;it.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 du(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Hs(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=af(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();si.insert(this.model,a,y)&&(va(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&&pc(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=Rs(this.field);else{const E=sd(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&&dt()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?A0(this.model):a==="&"?T0(this.model):this.model.selectionIsCollapsed?si.insert(this.model,a,Se({style:this.model.at(this.model.position).computedStyle},y)):si.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),va(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 he=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const me=ja(y,{context:this.context,parseMode:a});ae.collapseSelection("forward");const ye=ae.at(ae.position);ae.position=ae.offsetOf(ye.parent.addChildrenAfter(me,ye)),he=!0}if(this.model.mode=a,a==="latex"){let me=ae.selectionIsCollapsed;cu(this,"accept");let ye,we=ae.at(ae.position);if(me)ye="\\";else{const qe=Wa(ae.selection);ye=this.model.getValue(qe,"latex");const yt=this.model.extractAtoms(qe);yt.length===1&&yt[0].type==="placeholder"&&(ye=y,me=!0),we=ae.at(qe[0])}const Ne=new ud(ye);we.parent.addChildAfter(Ne,we),me?ae.position=ae.offsetOf(Ne.lastChild):ae.setSelection(ae.offsetOf(Ne.firstChild),ae.offsetOf(Ne.lastChild))}else yd(ae).forEach(me=>{me.isError=!1});if(b){const me=ja(b,{context:this.context,parseMode:re});ae.collapseSelection("forward");const ye=ae.at(ae.position);ae.position=ae.offsetOf(ye.parent.addChildrenAfter(me,ye)),he=!0}return va(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),he}),this.model.mode=a,window.mathVirtualKeyboard.update(Hs(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};eu(y)?ee.range=y:(y.operation==="toggle"&&(ee.operation="toggle"),ee.range=y.range,ee.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const re=Pf(this,a),ae=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(ae==="set"){this.defaultStyle=Se(Se({},this.defaultStyle),re);return}const he=Se({},this.defaultStyle);for(const me of Object.keys(re))he[me]===re[me]?(me==="color"&&delete he.verbatimColor,me==="backgroundColor"&&delete he.verbatimBackgroundColor,delete he[me]):he[me]=re[me];this.defaultStyle=he;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const he of this.model.selection.ranges)Ef(this.model,he,re,{operation:ae});else Ef(this.model,ee.range,re,{operation:ae})}),va(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=Rs(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=kd(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),va(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(Se({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),va(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),va(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(Hs(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(Hs(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(Hs(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:D0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(cu(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(Hs(this)),Vh(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",Me(Se({},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(),pc(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="",uu(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})),va(this),this.focusBlurInProgress=!1,Nf();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Fo(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Af(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(Wa(this.model.selection));const y=Rs(this.field);y&&requestAnimationFrame(()=>{pc(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),va(this)}onCompositionEnd(a){Dg(this.model),Af(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),si.onCopy(this,a),Zs(this.model,Wa(this.model.selection),"deleteByCut"),this.snapshot("cut"),va(this))}onCopy(a){si.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=si.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(),Eh(this),Vh(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=>jt(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 Qf(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&&Qf(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qf(E,y)})))}function f1(a,y){var b;if(!vt())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"]};Fl().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 he=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));Fl().readAloudMarks=he.split(`
|
|
|
`).map(me=>me?JSON.parse(me):{}),Fl().readAloudTokens=[];for(const me of Fl().readAloudMarks)me.value&&Fl().readAloudTokens.push(me.value);Fl().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(me,ye)=>{if(me){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${me}`);return}if(!(ye!=null&&ye.AudioStream))return;const we=new Uint8Array(ye.AudioStream),Ne=new Blob([we.buffer],{type:"audio/mpeg"}),qe=URL.createObjectURL(Ne),yt=Fl();yt.readAloudAudio?yt.readAloudAudio.pause():(yt.readAloudAudio=new Audio,yt.readAloudAudio.addEventListener("ended",()=>{const _t=yt.readAloudMathfield;yt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),_t?(pc(_t),yt.readAloudElement=null,yt.readAloudMathfield=null,yt.readAloudTokens=[],yt.readAloudMarks=[],yt.readAloudCurrentMark=""):gp(yt.readAloudElement)}),yt.readAloudAudio.addEventListener("timeupdate",()=>{let _t="";const bn=yt.readAloudAudio.currentTime*1e3+100;for(const ir of yt.readAloudMarks)ir.time<bn&&(_t=ir.value);yt.readAloudCurrentMark!==_t&&(yt.readAloudCurrentToken=_t,_t&&_t===yt.readAloudFinalToken?yt.readAloudAudio.pause():(yt.readAloudCurrentMark=_t,Qf(yt.readAloudElement,yt.readAloudCurrentMark)))})),yt.readAloudAudio.src=qe,yt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),yt.readAloudAudio.play()})})}vt()||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 Pi=new WeakMap,p1=.5,Nl={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 = ..."},Qa=class Mc extends HTMLElement{static get formAssociated(){return Su()}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 it.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),it.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 it.strings}static set strings(y){it.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 zl(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 zl(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(Nl[E])if(Nl[E].startsWith("mf."))if(Nl[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Nl[E]}`);else{const ee=Nl[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 ${Nl[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(Su()&&(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=[Bl("core"),Bl("mathfield"),Bl("mathfield-element"),Bl("ui"),Bl("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=Mc.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?gc(this._mathfield.options,y):Pi.has(this)?Se({},gc(Se(Se({},Bh()),Ph(Pi.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?gc(this._mathfield.options,y):Pi.has(this)?gc(Se(Se({},Bh()),Ph(Pi.get(this).options)),y):null}reflectAttributes(){const y=Bh(),b=this._getOptions();Object.keys(Mc.optionsAttributes).forEach(E=>{const ee=gl(E);Mc.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Mc.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(Pi.has(this)){const b=Se(Se({},Pi.get(this).options),y);Pi.set(this,Me(Se({},Pi.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Pi.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))Nl[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${Nl[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(Pi.has(this)){let ae,he,me;if(tu(y)?([ae,he]=y.ranges[0],me=b):eu(y)?([ae,he]=y,me=b):Bs(y)&&Bs(b)?(ae=y,he=b,me=E):(ae=0,he=-1,me=y),(me===void 0||me==="latex")&&ae===0&&he===-1)return(re=(ee=Pi.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(Pi.has(this)){const ee=Pi.get(this).options;Pi.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Pd(this);Pi.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?kd(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=Il(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;Fs.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,he=re.userSelect!=="none";if(he)ae.host.addEventListener("pointerdown",this,!0);else{const we=ae.querySelector("span");we.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),Su()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),he&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const me=ae.querySelector("slot:not([name])");if(me)try{this._style=me.assignedElements().filter(we=>we.tagName.toLowerCase()==="style").map(we=>we.textContent).join("")}catch(we){console.error(we)}if(this._style){const we=document.createElement("style");we.textContent=this._style,ae.appendChild(we)}let ye="";if(this.hasAttribute("value")?ye=this.getAttribute("value"):ye=(y=me==null?void 0:me.assignedNodes().map(we=>we.nodeType===3?we.textContent:"").join("").trim())!=null?y:"",this._mathfield=new h1(ae.querySelector(":host > span"),Me(Se({},(E=(b=Pi.get(this))==null?void 0:b.options)!=null?E:Pd(this)),{eventSink:this,value:ye})),!Pi.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const we of Object.keys(Mc.optionsAttributes))this.upgradeProperty(gl(we))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Pi.has(this)){const we=this._mathfield,Ne=Pi.get(this),qe=Ne.menuItems;we.model.deferNotifications({content:!1,selection:!1},()=>{const yt=Ne.value;yt!==void 0&&we.setValue(yt),we.model.selection=Ne.selection,Pi.delete(this)}),qe&&(this.menuItems=qe)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),_h()}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=gc(this._mathfield.options,Object.keys(Mc.optionsAttributes).map(ee=>gl(ee)));Pi.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":va(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",""),Su()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Su()?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"),Su()?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(Se({},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=Pi.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}Pi.has(this)?Pi.set(this,Me(Se({},Pi.get(this)),{menuItems:y})):Pi.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Pd(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:Pi.has(this)?Pi.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,va(this._mathfield);return}if(Pi.has(this)){Pi.set(this,Me(Se({},Pi.get(this)),{selection:y}));return}Pi.set(this,{value:void 0,selection:y,options:Pd(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:Pi.has(this)?Pi.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,va(this._mathfield)),Pi.has(this)){Pi.set(this,Me(Se({},Pi.get(this)),{selection:{ranges:[[y,y]]}}));return}Pi.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Pd(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}};Qa.version="0.98.5",Qa._fontsDirectory="./fonts",Qa._soundsDirectory="./sounds",Qa.keypressVibration=!0,Qa._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},Qa._plonkSound="plonk.wav",Qa.audioBuffers={},Qa.createHTML=a=>a,Qa._speechEngineRate="100%",Qa._speechEngineVoice="Joanna",Qa._textToSpeechMarkup="",Qa._textToSpeechRules="mathlive",Qa._textToSpeechRulesOptions={},Qa.speakHook=r1,Qa.readAloudHook=f1,Qa._decimalSeparator=".",Qa.fractionNavigationOrder="numerator-denominator",Qa._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 Id=Qa;function gl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Pd(a){const y={readOnly:!1},b=Id.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[gl(E)]=!0:b[E]==="on/off"?ee==="on"?y[gl(E)]=!0:ee==="off"?y[gl(E)]=!1:y[gl(E)]=void 0:b[E]==="number"?y[gl(E)]=Number.parseFloat(ee!=null?ee:"0"):y[gl(E)]=ee}}),y}function Su(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=Id,yp,bp,xp,wp;if(vt()&&!((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=Id,(wp=window.customElements)==null||wp.define("math-field",Id)}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 Jh(a,y,b,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const he=ae.data;let me=!0,ye=0,we;we=he.indexOf(y),we!==-1&&(ye=we,ye>0&&re.push({type:"text",data:he.slice(0,ye)}),me=!1);let Ne=!1;for(;!Ne;){if(me){if(we=he.indexOf(y,ye),we===-1){Ne=!0;break}ye!==we&&re.push({type:"text",data:he.slice(ye,we)}),ye=we}else{if(we=m1(b,he,ye+y.length),we===-1){Ne=!0;break}let qe=he.slice(ye+y.length,we);ee==="ascii-math"&&([,qe]=uc(qe,{format:"ascii-math"})),re.push({type:"math",data:qe,rawData:he.slice(ye,we+b.length),mathstyle:E}),ye=we+b.length}me=!me}ye<he.length&&re.push({type:"text",data:he.slice(ye)})}else re.push(ae);return re}function Sp(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jh(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jh(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jh(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jh(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 Cu(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 he=document.createElement("span");if(/\bmathml\b/i.test(ae)&&b.renderToMathML&&he.append(g1(a,b)),/\bspeakable-text\b/i.test(ae)&&b.renderToSpeakableText){const me=document.createElement("span");me.setAttribute("translate","no");const ye=b.renderToSpeakableText(a);me.innerHTML=window.MathfieldElement.createHTML(ye),me.className="ML__sr-only",he.append(me)}return he.append(re),he}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=Cu(a,"",y,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=Sp(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 he of ae)if(he.type==="text")re.appendChild(document.createTextNode(he.data));else{const me=Cu(he.data,he.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);me&&re.appendChild(me)}}return re}function Cp(a,y){var b,E,ee,re,ae,he,me,ye,we,Ne,qe,yt,_t,bn,ir,yn;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Nn=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(Nn)){a.textContent="";const Kn=Cu(Nn,"",y,!0);Kn&&a.append(Kn);return}const dr=Sp(Nn,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(dr.length===1&&dr[0].type==="math"){a.textContent="";const Kn=Cu(dr[0].data,dr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Kn&&a.append(Kn);return}if(dr.length===1&&dr[0].type==="text")return}for(let Nn=a.childNodes.length-1;Nn>=0;Nn--){const dr=a.childNodes[Nn];if(dr.nodeType===3){const Kn=y1((ae=dr.textContent)!=null?ae:"",y);Kn&&(Nn+=Kn.childNodes.length-1,dr.replaceWith(Kn))}else if(dr.nodeType===1){const Kn=dr,Zr=dr.nodeName.toLowerCase();if(Zr==="script"){const qr=dr;let Vr;if((he=y.processScriptTypePattern)!=null&&he.test(qr.type))Vr=(me=qr.textContent)!=null?me:"";else if((ye=y.processMathJSONScriptTypePattern)!=null&&ye.test(qr.type))try{Vr=(Ne=y.serializeToLatex)==null?void 0:Ne.call(y,JSON.parse((we=qr.textContent)!=null?we:""))}catch(Ti){console.error(Ti)}if(Vr){let Ti="textstyle";for(const xr of qr.type.split(";")){const[Wo,js]=xr.toLowerCase().split("=");Wo.trim()==="mode"&&(Ti=js.trim()==="display"?"displaystyle":"textstyle")}const Ui=Cu(Vr,Ti,y,!0);Ui&&qr.parentNode.replaceChild(Ui,qr)}}else if(((yt=(qe=y.processClassPattern)==null?void 0:qe.test(Kn.className))!=null?yt:!1)||!((bn=(_t=y.skipTags)==null?void 0:_t.includes(Zr))!=null&&bn||(yn=(ir=y.ignoreClassPattern)==null?void 0:ir.test(Kn.className))!=null&&yn))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Vr=a.textContent;a.textContent="";const Ti=Cu(Vr!=null?Vr:"","displaystyle",y,!0);Ti&&a.append(Ti)}else Cp(Kn,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=Se(Se({},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:""),_h(),Bo("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 w1(a,y){const b=$l.singleton;return b?(b.show(),wd(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function S1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}Oo({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function Fl(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function A1(){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 T1(a){M1(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 M1(a,y){var b,E,ee,re;const ae=C1(a);if(!ae)return;const he=y!=null?y:{};(b=he.renderToMarkup)!=null||(he.renderToMarkup=Va),(E=he.renderToMathML)!=null||(he.renderToMathML=$v),(ee=he.renderToSpeakableText)!=null||(he.renderToSpeakableText=Rv),(re=he.serializeToLatex)!=null||(he.serializeToLatex=Nv),x1(ae,he)}var I1={mathlive:"0.98.5"}},16722:function(Mn,sn,ue){"use strict";ue.d(sn,{Z:function(){return Se}});const pe=Me=>typeof Me=="object"&&Me!=null&&Me.nodeType===1,je=(Me,Ke)=>(!Ke||Me!=="hidden")&&Me!=="visible"&&Me!=="clip",Fe=(Me,Ke)=>{if(Me.clientHeight<Me.scrollHeight||Me.clientWidth<Me.scrollWidth){const ct=getComputedStyle(Me,null);return je(ct.overflowY,Ke)||je(ct.overflowX,Ke)||(De=>{const We=(vt=>{if(!vt.ownerDocument||!vt.ownerDocument.defaultView)return null;try{return vt.ownerDocument.defaultView.frameElement}catch(nt){return null}})(De);return!!We&&(We.clientHeight<De.scrollHeight||We.clientWidth<De.scrollWidth)})(Me)}return!1},tt=(Me,Ke,ct,De,We,vt,nt,dt)=>vt<Me&&nt>Ke||vt>Me&&nt<Ke?0:vt<=Me&&dt<=ct||nt>=Ke&&dt>=ct?vt-Me-De:nt>Ke&&dt<ct||vt<Me&&dt>ct?nt-Ke+We:0,xe=Me=>{const Ke=Me.parentElement;return Ke==null?Me.getRootNode().host||null:Ke},_e=(Me,Ke)=>{var ct,De,We,vt;if(typeof document=="undefined")return[];const{scrollMode:nt,block:dt,inline:st,boundary:wt,skipOverflowHiddenElements:en}=Ke,it=typeof wt=="function"?wt:Wt=>Wt!==wt;if(!pe(Me))throw new TypeError("Invalid target");const mt=document.scrollingElement||document.documentElement,Ze=[];let Ee=Me;for(;pe(Ee)&&it(Ee);){if(Ee=xe(Ee),Ee===mt){Ze.push(Ee);break}Ee!=null&&Ee===document.body&&Fe(Ee)&&!Fe(document.documentElement)||Ee!=null&&Fe(Ee,en)&&Ze.push(Ee)}const He=(De=(ct=window.visualViewport)==null?void 0:ct.width)!=null?De:innerWidth,Ue=(vt=(We=window.visualViewport)==null?void 0:We.height)!=null?vt:innerHeight,{scrollX:Ct,scrollY:Ge}=window,{height:It,width:et,top:kt,right:Je,bottom:Ut,left:ft}=Me.getBoundingClientRect(),{top:Dt,right:Et,bottom:ut,left:Be}=(Wt=>{const Ve=window.getComputedStyle(Wt);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(Me);let be=dt==="start"||dt==="nearest"?kt-Dt:dt==="end"?Ut+ut:kt+It/2-Dt+ut,ht=st==="center"?ft+et/2-Be+Et:st==="end"?Je+Et:ft-Be;const nn=[];for(let Wt=0;Wt<Ze.length;Wt++){const Ve=Ze[Wt],{height:Ye,width:At,top:gn,right:Jt,bottom:un,left:Gt}=Ve.getBoundingClientRect();if(nt==="if-needed"&&kt>=0&&ft>=0&&Ut<=Ue&&Je<=He&&(Ve===mt&&!Fe(Ve)||kt>=gn&&Ut<=un&&ft>=Gt&&Je<=Jt))return nn;const Vt=getComputedStyle(Ve),Nt=parseInt(Vt.borderLeftWidth,10),ve=parseInt(Vt.borderTopWidth,10),se=parseInt(Vt.borderRightWidth,10),oe=parseInt(Vt.borderBottomWidth,10);let de=0,fe=0;const le="offsetWidth"in Ve?Ve.offsetWidth-Ve.clientWidth-Nt-se:0,Ie="offsetHeight"in Ve?Ve.offsetHeight-Ve.clientHeight-ve-oe:0,ot="offsetWidth"in Ve?Ve.offsetWidth===0?0:At/Ve.offsetWidth:0,Kt="offsetHeight"in Ve?Ve.offsetHeight===0?0:Ye/Ve.offsetHeight:0;if(mt===Ve)de=dt==="start"?be:dt==="end"?be-Ue:dt==="nearest"?tt(Ge,Ge+Ue,Ue,ve,oe,Ge+be,Ge+be+It,It):be-Ue/2,fe=st==="start"?ht:st==="center"?ht-He/2:st==="end"?ht-He:tt(Ct,Ct+He,He,Nt,se,Ct+ht,Ct+ht+et,et),de=Math.max(0,de+Ge),fe=Math.max(0,fe+Ct);else{de=dt==="start"?be-gn-ve:dt==="end"?be-un+oe+Ie:dt==="nearest"?tt(gn,un,Ye,ve,oe+Ie,be,be+It,It):be-(gn+Ye/2)+Ie/2,fe=st==="start"?ht-Gt-Nt:st==="center"?ht-(Gt+At/2)+le/2:st==="end"?ht-Jt+se+le:tt(Gt,Jt,At,Nt,se+le,ht,ht+et,et);const{scrollLeft:Ft,scrollTop:Xt}=Ve;de=Kt===0?0:Math.max(0,Math.min(Xt+de/Kt,Ve.scrollHeight-Ye/Kt+Ie)),fe=ot===0?0:Math.max(0,Math.min(Ft+fe/ot,Ve.scrollWidth-At/ot+le)),be+=Xt-de,ht+=Ft-fe}nn.push({el:Ve,top:de,left:fe})}return nn},Ae=Me=>Me===!1?{block:"end",inline:"nearest"}:(Ke=>Ke===Object(Ke)&&Object.keys(Ke).length!==0)(Me)?Me:{block:"start",inline:"nearest"};function Se(Me,Ke){if(!Me.isConnected||!(We=>{let vt=We;for(;vt&&vt.parentNode;){if(vt.parentNode===document)return!0;vt=vt.parentNode instanceof ShadowRoot?vt.parentNode.host:vt.parentNode}return!1})(Me))return;const ct=(We=>{const vt=window.getComputedStyle(We);return{top:parseFloat(vt.scrollMarginTop)||0,right:parseFloat(vt.scrollMarginRight)||0,bottom:parseFloat(vt.scrollMarginBottom)||0,left:parseFloat(vt.scrollMarginLeft)||0}})(Me);if((We=>typeof We=="object"&&typeof We.behavior=="function")(Ke))return Ke.behavior(_e(Me,Ke));const De=typeof Ke=="boolean"||Ke==null?void 0:Ke.behavior;for(const{el:We,top:vt,left:nt}of _e(Me,Ae(Ke))){const dt=vt-ct.top+ct.bottom,st=nt-ct.left+ct.right;We.scroll({top:dt,left:st,behavior:De})}}}}]);
|
|
|
}()); |