|
|
!(function(){var Dl=Math.pow;var gu=(mn,Vt,le)=>new Promise((be,Ve)=>{var $e=Te=>{try{ge(le.next(Te))}catch(Le){Ve(Le)}},et=Te=>{try{ge(le.throw(Te))}catch(Le){Ve(Le)}},ge=Te=>Te.done?be(Te.value):Promise.resolve(Te.value).then($e,et);ge((le=le.apply(mn,Vt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[7642],{18299:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},42922:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},25877:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},63237:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},99569:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},22751:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},38308:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},17663:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},91034:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},72395:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},53978:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Le}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(me,Pe){return Ve.createElement(ge.Z,(0,be.Z)({},me,{ref:Pe,icon:et}))},Le=Ve.forwardRef(Te)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(mn,Vt){"use strict";Vt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},69925:function(){"use strict"},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var mn={},Vt="5.0",le={},be=null,Ve=!1,$e=!1,et=null,ge=!1,Te=null,Le=null,Se=0;Se<arguments.length;Se++){var me=arguments[Se];if(me!==null)switch(typeof me){case"number":Vt=me.toFixed(1);break;case"string":me.match(new RegExp("^[0-9]\\.[0-9]+$"))?Vt=me:et=me;break;case"object":typeof me.is3D!="undefined"?be=me:le=me;break;case"boolean":Ve=me,$e=!0;break}}be===null&&(be={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},le.material_id!==void 0&&!$e&&(Ve=!0)),et!==null&&le.id===void 0&&(le.id=et);var Pe="",at="",Oe=!1,ht=null,nt=null,rt=null,Je=!1,Ee=null,pt=null,Kt=null,Ye=null,lt=null;le.height!==void 0&&(le.height=Math.round(le.height)),le.width!==void 0&&(le.width=Math.round(le.width));var Me=function(tt){return parseFloat(tt)>4?parseFloat(tt):5};mn.setHTML5Codebase=function(tt,ot){Le=tt,Pt(tt,ot)},mn.setJavaCodebase=mn.setJavaCodebaseVersion=mn.isCompiledInstalled=mn.setPreCompiledScriptPath=mn.setPreCompiledResourcePath=function(){},mn.setHTML5CodebaseVersion=function(tt,ot){var Ht=parseFloat(tt);if(Ht!==NaN&&Ht<5){console.log("The GeoGebra HTML5 codebase version "+Ht+" is deprecated. Using version latest instead.");return}Te=tt,Ae(tt,ot)},mn.getHTML5CodebaseVersion=function(){return nt},mn.getParameters=function(){return le},mn.setFontsCSSURL=function(tt){Ye=tt},mn.setGiacJSURL=function(tt){},mn.setJNLPFile=function(tt){Pe=tt},mn.setJNLPBaseDir=function(tt){},mn.inject=function(){function tt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ot="auto",Ht=le.id,En,fn=!1,Gt=0;Gt<arguments.length;Gt++){var Ft=arguments[Gt];typeof Ft=="string"?(Ft=Ft.toLowerCase(),Ft.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ot=Ft:Ht=arguments[Gt]):typeof Ft=="boolean"?fn=Ft:Ft instanceof HTMLElement&&(En=Ft)}xn();function xn(){if(!ge){setTimeout(xn,200);return}ot=un(ot);var gn=En||document.getElementById(Ht);if(!gn){console.log("possibly bug on ajax loading? ");return}if(mn.removeExistingApplet(gn,!1),le.width===void 0&&gn.clientWidth&&(le.width=gn.clientWidth),le.height===void 0&&gn.clientHeight&&(le.height=gn.clientHeight),!(le.width&&le.height)&&ot==="html5"&&(delete le.width,delete le.height),ht=ot,ot==="screenshot")Lt(gn,le);else{var _e=!1;le.hasOwnProperty("playButton")&&le.playButton||le.hasOwnProperty("clickToLoad")&&le.clickToLoad?_e=!0:le.hasOwnProperty("playButtonAutoDecide")&&le.playButtonAutoDecide&&(_e=(!xe()||tt())&&We()),_e?(ht="screenshot",ut(gn,le,fn,ot)):Bt(gn,le,fn)}}};function xe(){try{return window.self!==window.top}catch(tt){return!0}}function We(){return le.hasOwnProperty("screenshotGenerator")&&le.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}mn.getViews=function(){return be},mn.isJavaInstalled=function(){return!1};var je=function(tt){var ot=function(Gt){var Ft=JSON.parse(Gt),xn=function(ce){return ce.type=="G"||ce.type=="E"},gn=Ft.elements?Ft.elements.filter(xn)[0]:Ft;if(!gn||!gn.url){Ht();return}le.fileName=gn.url,Et(gn.settings||{}),be.is3D=!0;var _e="https://www.geogebra.org/images/";mn.setPreviewImage(Ee||gn.previewUrl,_e+"GeoGebra_loading.png",_e+"applet_play.png"),tt()},Ht=function(){le.onError&&le.onError(),bn("Error: Fetching material (id "+le.material_id+") failed.",le)},En=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",fn="/materials/"+le.material_id+"?scope=basic";vt("https://"+En+"/api/proxy.php?path="+encodeURIComponent(fn),ot,Ht)};function Et(tt){var ot=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ht){tt[Ht]=!!tt[Ht]}),ot.forEach(function(Ht){le[Ht]===void 0&&tt[Ht]!==void 0&&(le[Ht]=tt[Ht])}),le.showToolBarHelp===void 0&&(le.showToolBarHelp=le.showToolBar)}function vt(tt,ot,Ht){var En=new XMLHttpRequest;En.open("GET",tt),En.onload=function(){ot(En.responseText)},En.onerror=Ht,En.send()}mn.isHTML5Installed=function(){return!0},mn.getLoadedAppletType=function(){return ht},mn.setPreviewImage=function(tt,ot,Ht){Ee=tt,pt=ot,Kt=Ht},mn.removeExistingApplet=function(tt,ot){var Ht;typeof tt=="string"&&(tt=document.getElementById(tt)),ht=null;var En=null;for(Ht=0;Ht<tt.childNodes.length;Ht++){var fn=tt.childNodes[Ht],Gt=fn.className;Gt==="applet_screenshot"?ot?(fn.style.display="block",ht="screenshot"):fn.style.display="none":Gt!=="applet_scaler prerender"&&(tt.removeChild(fn),En=Gt&&Gt.indexOf("appletParameters")!=-1?fn.id:null,Ht--)}var Ft=le.id!==void 0?le.id:En,xn=window[Ft];xn&&typeof xn.getBase64=="function"&&(xn.remove(),window[Ft]=null)},mn.refreshHitPoints=function(){if(Me(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var tt=mn.getAppletObject();return tt&&typeof tt.recalculateEnvironments=="function"?(tt.recalculateEnvironments(),!0):!1},mn.startAnimation=function(){var tt=mn.getAppletObject();return tt&&typeof tt.startAnimation=="function"?(tt.startAnimation(),!0):!1},mn.stopAnimation=function(){var tt=mn.getAppletObject();return tt&&typeof tt.stopAnimation=="function"?(tt.stopAnimation(),!0):!1},mn.getAppletObject=function(){var tt=le.id!==void 0?le.id:"ggbApplet";return window[tt]},mn.resize=function(){};var At=function(tt,ot,Ht){var En=document.createElement("param");En.setAttribute("name",ot),En.setAttribute("value",Ht),tt.appendChild(En)},Qe=function(tt){return tt&&tt!=="false"},Bt=function(tt,ot,Ht){Me(nt)<=4.2&&(Ht=!0);var En=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==nt||ggbHTML5LoadedCodebaseIsWebSimple&&!Je)&&(En=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var fn=document.createElement("div");fn.classList.add("appletParameters","notranslate");var Gt=ot.width,Ft=ot.height;if(ot.disableAutoScale=ot.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ot.disableAutoScale,ot.width!==void 0)if(Me(nt)<=4.4)Qe(ot.showToolBar)&&(ot.height-=7),Qe(ot.showAlgebraInput)&&(ot.height-=37),ot.width<605&&Qe(ot.showToolBar)&&(ot.width=605,Gt=605);else{var xn=100;(Qe(ot.showToolBar)||Qe(ot.showMenuBar))&&(ot.hasOwnProperty("customToolBar")&&(ot.customToolbar=ot.customToolBar),xn=Qe(ot.showMenuBar)?245:155),Gt<xn&&(ot.width=xn,Gt=xn)}fn.style.border="none",fn.style.display="inline-block";for(var gn in ot)ot.hasOwnProperty(gn)&&gn!=="appletOnLoad"&&fn.setAttribute("data-param-"+gn,ot[gn]);Ye&&fn.setAttribute("data-param-fontscssurl",Ye),mn.resize=function(){GGBAppletUtils.responsiveResize(tt,ot)},window.addEventListener("resize",function($t){mn.resize()});var _e=typeof ot.appletOnLoad=="function"?ot.appletOnLoad:function(){};if(!Ht&&ot.width!==void 0){ot.hasOwnProperty("showSplash")||fn.setAttribute("data-param-showSplash","false");var ce=tt.querySelector(".applet_scaler.prerender"),se=ce!==null;if(se)var he=ce.querySelector(".ggb_preview");else{var he=vn(Gt,Ft,ot.borderColor,!1);ce=document.createElement("div"),ce.className="applet_scaler",ce.style.position="relative",ce.style.display="block",ce.style.width=Gt+"px",ce.style.height=Ft+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ce,"66%"),Me(nt)>=5?(ot.appletOnLoad=function($t){var Gn=tt.querySelector(".ggb_preview");Gn&&Gn.parentNode.removeChild(Gn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ce),window.GGBT_wsf_view&&$(window).trigger("resize"),_e($t)},se||ce.appendChild(he)):fn.appendChild(he),ce.appendChild(fn),se||tt.appendChild(ce),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(fn),tt.appendChild(fe),ot.appletOnLoad=function($t){mn.resize(),_e($t)}}function oe($t,Gn){Gn&&typeof Gn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement($t,Gn.appletOnLoad):renderGGBElement($t),bn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Gn)}function ke($t,Gn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:$t,params:Gn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ar){oe(ar.article,ar.params)}),html5AppletsToProcess=null)},Me(nt)<5&&($t.className+=" geogebraweb")):oe($t,Gn)}if(En){scriptLoadStarted=!0;for(var Ge=0;Ge<fn.childNodes.length;Ge++){var St=fn.childNodes[Ge].tagName;St==="TABLE"&&(fn.removeChild(fn.childNodes[Ge]),Ge--)}if(ggbHTML5LoadedScript!==null){var Tt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Tt!=null&&Tt.parentNode.removeChild(Tt)}var Ot=document.createElement("script"),Wt=function(){ke(fn,ot)};Ot.src=at+rt,ggbHTML5LoadedCodebaseIsWebSimple=Je,ggbHTML5LoadedCodebaseVersion=nt,ggbHTML5LoadedScript=Ot.src,bn("GeoGebra HTML5 codebase loaded: '"+at+"'.",ot),!Le&&(!Te||Te=="5.0")?(Je?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Wt()):at.requirejs?__webpack_require__.e(12).then(function(){var $t=[__webpack_require__(12)];Wt.apply(null,$t)}.bind(this)).catch(__webpack_require__.oe):(Ot.onload=Wt,tt.appendChild(Ot))}else ke(fn,ot);ot.height=Ft,ot.width=Gt},Lt=function(tt,ot,Ht){var En=vn(ot.width,ot.height,ot.borderColor,Ht),fn=document.createElement("div");fn.style.position="relative",fn.style.display="block",fn.style.width=ot.width+"px",fn.style.height=ot.height+"px",fn.className="applet_screenshot applet_scaler"+(Ht?" applet_screenshot_play":""),fn.appendChild(En);var Gt=GGBAppletUtils.getScale(ot,tt,Ht);Ht?(tt.appendChild(Yt()),window.GGBT_wsf_view||(tt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(fn,"66%"),tt.appendChild(fn),Gt!==1&&!isNaN(Gt)&&(GGBAppletUtils.scaleElement(fn,Gt),fn.style.width=ot.width+"px",fn.style.height=ot.height+"px",fn.parentNode.style.width=ot.width*Gt+"px",fn.parentNode.style.height=ot.height*Gt+"px"),mn.resize=function(){hn(tt,En,fn,Ht)},window.addEventListener("resize",function(Ft){mn.resize()}),mn.resize()};function hn(tt,ot,Ht,En){if(tt.contains(ot)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(tt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(tt)}var fn=GGBAppletUtils.getScale(le,tt,En);Ht.parentNode!==null&&(!isNaN(fn)&&fn!==1?(GGBAppletUtils.scaleElement(Ht,fn),Ht.parentNode.style.width=le.width*fn+"px",Ht.parentNode.style.height=le.height*fn+"px"):(GGBAppletUtils.scaleElement(Ht,1),Ht.parentNode.style.width=le.width+"px",Ht.parentNode.style.height=le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(tt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}mn.onExitFullscreen=function(tt,ot){ot.appendChild(tt)};var ut=function(tt,ot,Ht,En){Lt(tt,ot,!0);for(var fn=function(){var xn=[];for(Ft=0;Ft<tt.childNodes.length;Ft++)xn.push(tt.childNodes[Ft]);if(window.GGBT_wsf_view){var gn=window.GGBT_wsf_view.renderFullScreen(tt,ot.id),_e=document.getElementById("fullscreencontainer"),ce=jQuery(tt).find(".fullscreencontent");ce.length>0?(gn.remove(),ce.attr("id","fullscreencontent").show(),jQuery(_e).append(ce),window.dispatchEvent(new Event("resize"))):Bt(gn,ot,!1),window.GGBT_wsf_view.launchFullScreen(_e)}else ht=En,Bt(tt,ot,!1);if(!window.GGBT_wsf_view)for(Ft=0;Ft<xn.length;Ft++)tt.removeChild(xn[Ft])},Gt=tt.getElementsByClassName("ggb_preview_play"),Ft=0;Ft<Gt.length;Ft++)Gt[Ft].addEventListener("click",fn,!1),Gt[Ft].addEventListener("ontouchstart",fn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(tt),We()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Yt=function(){var tt=document.createElement("div");if(tt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ot='.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");}',Ht=document.createElement("style");Ht.styleSheet?Ht.styleSheet.cssText=ot:Ht.appendChild(document.createTextNode(ot)),document.getElementsByTagName("head")[0].appendChild(Ht)}return tt},vn=function(tt,ot,Ht,En){var fn=document.createElement("div");fn.className="ggb_preview",fn.style.position="absolute",fn.style.zIndex="90",fn.style.width=tt-2+"px",fn.style.height=ot-2+"px",fn.style.top="0px",fn.style.left="0px",fn.style.overflow="hidden",fn.style.backgroundColor="white";var Gt="lightgrey";Ht!==void 0&&(Ht==="none"?Gt="transparent":Gt=Ht),fn.style.border="1px solid "+Gt;var Ft=document.createElement("img");if(Ft.style.position="relative",Ft.style.zIndex="1000",Ft.style.top="-1px",Ft.style.left="-1px",Ee!==null&&Ft.setAttribute("src",Ee),Ft.style.opacity=.7,pt!==null){var xn,gn,_e;if(!En){xn=document.createElement("img"),xn.style.position="absolute",xn.style.zIndex="1001",xn.style.opacity=1,Ft.style.opacity=.3,gn=360,gn>tt/4*3&&(gn=tt/4*3),_e=gn/5.8,xn.setAttribute("src",pt),xn.setAttribute("width",gn),xn.setAttribute("height",_e);var ce=(tt-gn)/2,se=(ot-_e)/2;xn.style.left=ce+"px",xn.style.top=se+"px",fn.appendChild(xn)}}return fn.appendChild(Ft),fn},un=function(tt){return tt=tt.toLowerCase(),tt==="html5"||tt==="screenshot"?tt:"html5"},Ze=["web","webSimple","web3d","tablet","tablet3d","phone"],Ae=function(tt,ot){if(nt=tt,ot){Pt(nt,!0);return}var Ht=!Ve;if(Ht){var En=Me(nt);!isNaN(En)&&En<4.4&&(Ht=!1)}var fn,Gt;window.location.protocol.substr(0,4)==="http"?fn=window.location.protocol:fn="http:";var Ft=nt.indexOf("//");Ft>0?Gt=nt:Ft===0?Gt=fn+nt:Gt="https://www.geogebra.org/apps/5.2.814.0/";for(var xn in Ze)if(nt.slice(Ze[xn].length*-1)===Ze[xn]||nt.slice((Ze[xn].length+1)*-1)===Ze[xn]+"/"){Pt(Gt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ht&&!be.is3D&&!be.AV&&!be.SV&&!be.CV&&!be.EV2&&!be.CP&&!be.PC&&!be.DA&&!be.FI&&!be.PV&&!Qe(le.showToolBar)&&!Qe(le.showMenuBar)&&!Qe(le.showAlgebraInput)&&!Qe(le.enableRightClick)&&(!le.appName||le.appName=="classic")?Gt+="webSimple/":Gt+="web3d/",Pt(Gt,!1)},Pt=function(tt,ot){if(tt.requirejs){at=tt;return}tt.slice(-1)!=="/"&&(tt+="/"),at=tt,ot===null&&(ot=tt.indexOf("http")===-1),Oe=ot,rt="web.nocache.js",Je=!1;var Ht=at.split("/");Ht.length>1&&(!ot&&Ht[Ht.length-2]==="webSimple"?(rt="webSimple.nocache.js",Je=!0):Ze.indexOf(Ht[Ht.length-2])>=0&&(rt=Ht[Ht.length-2]+".nocache.js")),Ht=tt.split("/"),nt=Ht[Ht.length-3],nt.substr(0,4)==="test"?nt=nt.substr(4,1)+"."+nt.substr(5,1):(nt.substr(0,3)==="war"||nt.substr(0,4)==="beta")&&(nt="5.0");var En=parseFloat(nt);En!==NaN&&En<5&&tt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+En+" is deprecated. Using version latest instead."),Ae("5.0",ot))},bn=function(tt,ot){window.console&&window.console.log&&(!ot||typeof ot.showLogging=="undefined"||ot.showLogging&&ot.showLogging!=="false")&&console.log(tt)};le.material_id!==void 0?je(nn):nn();function nn(){var tt=Vt;Te!==null?tt=Te:parseFloat(tt)<5&&(tt="5.0"),Ae(tt,!1),Le!==null&&Pt(Le,Oe),ge=!0}return mn},GGBAppletUtils=function(){"use strict";function mn(){return window.GGBT_wsf_edit!==void 0}function Vt(ge,Te){Te!=1?(ge.style.transformOrigin="0% 0% 0px",ge.style.webkitTransformOrigin="0% 0% 0px",ge.style.transform="scale("+Te+","+Te+")",ge.style.webkitTransform="scale("+Te+","+Te+")",ge.style.maxWidth="initial",ge.querySelector(".ggb_preview")!==null&&(ge.querySelector(".ggb_preview").style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ge.style.transform="none",ge.style.webkitTransform="none")}function le(ge,Te,Le,Se,me,Pe){var at=null;if(Pe!=null&&Pe!="")for(var Oe=ge.parentNode;Oe!=null;)if((" "+Oe.className+" ").indexOf(" "+Pe+" ")>-1){at=Oe;break}else Oe=Oe.parentNode;var ht=0,nt=0,rt=0,Je=0,Ee=0,pt=0,Kt=0;if(at)ht=at.offsetWidth,nt=Math.max(Se?at.offsetWidth:0,at.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ht=Math.min(window.innerWidth,document.documentElement.clientWidth),nt=Math.min(window.innerHeight,document.documentElement.clientHeight),rt=ht):(ht=window.innerWidth,nt=window.innerHeight,rt=window.innerWidth),ge){var Ye=ge.getBoundingClientRect();Ye.left>0&&Ye.left<=ht&&(me===void 0||!me)&&(document.dir==="rtl"?(Ee=ht-Ye.width-Ye.left,pt=rt<=480?10:30):(pt=Ye.left,Ee=rt<=480?10:30),Je=pt+Ee)}if(ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var lt=ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Je=40,Kt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Je=0,Kt=40)}}return ge&&((Le===void 0||!Le)&&Te>0&&Te+Je<ht?ht=Te:ht-=Je,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Le===void 0||!Le)&&(nt-=Kt)),{width:ht,height:nt}}function be(ge,Te,Le,Se,me){if(ge.isScreenshoGenerator)return 1;var Pe=Se!==void 0&&Se,at=ge.noScaleMargin!=null&&ge.noScaleMargin,Oe=function(lt){return lt&<!=="false"},ht=Oe(ge.autoHeight),nt=le(Te,ge.width,Le,ht,Pe&&window.GGBT_wsf_view||at,me),rt=parseInt(nt.width),Je=ge.width,Ee=ge.height;if(Je===void 0){var pt=Te.querySelector(".appletParameters");pt&&(Je=pt.offsetWidth,Ee=pt.offsetHeight)}var Kt=rt/Je,Ye=Pe?1:nt.height/Ee;return Le!==void 0&&!Le&&(Kt=Math.min(1,Kt),Ye=Math.min(1,Ye)),Math.min(Kt,Ye)}function Ve(ge,Te,Le){var Se=1,me,Pe=!1;if(ge.hasOwnProperty("allowUpscale")&&(Pe=ge.allowUpscale),ge.hasOwnProperty("scale")&&(Se=parseFloat(ge.scale),(isNaN(Se)||Se===null||Se===0)&&(Se=1),Se>1&&(Pe=!0)),Te&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Pe=!0),!(ge.hasOwnProperty("disableAutoScale")&&ge.disableAutoScale))me=be(ge,Te,Pe,Le,ge.scaleContainerClass);else return Se;return Pe&&(!ge.hasOwnProperty("scale")||Se===1)?me:Math.min(Se,me)}function $e(ge){var Te=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Se=ge.getBoundingClientRect(),me=(Te-Se.width)/2,Pe=(Le-Se.height)/2;Pe<0&&(Pe=0),ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(me<40?ge.style.left="40px":ge.style.left=me+"px",ge.style.top=Pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Pe<40?ge.style.top="40px":ge.style.top=Pe+"px",ge.style.left=me+"px")}function et(ge,Te){var Le=ge.querySelector(".appletParameters");if(Le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Te.id!==Le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ge)}if(Le.parentElement&&/fullscreen/.test(Le.parentElement.className))return;var Se=Ve(Te,ge);mn()&&Le.setAttribute("data-param-scale",Se);for(var me=null,Pe=0;Pe<ge.childNodes.length;Pe++)if(ge.childNodes[Pe].className!==void 0&&ge.childNodes[Pe].className.match(/^applet_scaler/)){me=ge.childNodes[Pe];break}if(me!==null&&me.querySelector(".noscale")!==null)return;var at=Te.id!==void 0?Te.id:"ggbApplet",Oe=window[at];(Oe==null||!Oe.recalculateEnvironments)&&me!==null&&!me.className.match(/fullscreen/)&&(me.parentNode.style.transform="",!isNaN(Se)&&Se!==1?(me.parentNode.style.width=Te.width*Se+"px",me.parentNode.style.height=Te.height*Se+"px",Vt(me,Se)):(Vt(me,1),me.parentNode.style.width=Te.width+"px",me.parentNode.style.height=Te.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&$e(ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Le).parents(".content-added-content"))}}return{responsiveResize:et,isFlexibleWorksheetEditor:mn,positionCenter:$e,getScale:Ve,scaleElement:Vt}}();__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,Vt){}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 Vt=s[L].bindings;s[L].bindings=function(){for(var le=Vt?Vt():{},be=mn[webModule.__softPermutationId],Ve=O;Ve<be.length;Ve++){var $e=be[Ve];le[$e[O]]=$e[P]}return le}};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 Vt=document.compatMode==U?V:W;t.write(Vt+X),t.close()}}}function w(mn){function Vt(be){function Ve(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var $e=Ve();if($e){be();return}function et(){if(!$e){if(!Ve())return;$e=!0,be(),o.removeEventListener&&o.removeEventListener(Z,et,!1),ge&&clearInterval(ge)}}o.addEventListener&&o.addEventListener(Z,et,!1);var ge=setInterval(function(){et()},$)}function le(be){var Ve=u(),$e=Ve.body,et=Ve.createElement(_);et.language=ab,et.crossOrigin=W,et.src=be,webModule.__errFn&&(et.onerror=function(){webModule.__errFn(L,new Error(bb+be))}),$e.appendChild(et)}Vt(function(){le(mn)})}webModule.__startLoadingFragment=function(mn){return C(mn)},webModule.__installRunAsyncCode=function(mn){var Vt=u(),le=Vt.body,be=Vt.createElement(_);be.language=ab,be.text=mn,le.appendChild(be),le.removeChild(be)};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 Vt=c[mn];return Vt==null?null:Vt},r=d,webModule.__errFn=e}function B(){function mn(ge){var Te=ge.lastIndexOf(rb);Te==-1&&(Te=ge.length);var Le=ge.indexOf(sb);Le==-1&&(Le=ge.length);var Se=ge.lastIndexOf(tb,Math.min(Le,Te));return Se>=O?ge.substring(O,Se+P):W}function Vt(ge){if(!ge.match(/^\w+:\/\//)){var Te=o.createElement(ub);Te.src=ge+vb,ge=mn(Te.src)}return ge}function le(){var ge=__gwt_getMetaProperty(wb);return ge!=null?ge:W}function be(){for(var ge=o.getElementsByTagName(_),Te=O;Te<ge.length;++Te)if(ge[Te].src.indexOf(xb)!=-1)return mn(ge[Te].src);return W}function Ve(){var ge=o.getElementsByTagName(yb);return ge.length>O?ge[ge.length-P].href:W}function $e(){var ge=o.location;return ge.href==ge.protocol+zb+ge.host+ge.pathname+ge.search+ge.hash}var et=le();return et==W&&(et=be()),et==W&&(et=Ve()),et==W&&$e()&&(et=mn(o.location.href)),et=Vt(et),et}function C(mn){return mn.match(/^\//)||mn.match(/^[a-zA-Z]+:\/\//)?mn:webModule.__moduleBase+mn}function D(){var mn=[],Vt=O,le=[],be=[];function Ve(ge){var Te=be[ge](),Le=le[ge];if(Te in Le)return Te;var Se=[];for(var me in Le)Se[Le[me]]=me;throw r&&r(ge,Se,Te),null}if(__gwt_isKnownPropertyValue=function(ge,Te){return Te in le[ge]},webModule.__getPropMap=function(){var ge={};for(var Te in le)le.hasOwnProperty(Te)&&(ge[Te]=Ve(Te));return ge},webModule.__computePropValue=Ve,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var $e;try{$e=Cb;var et=$e.indexOf(Db);et!=-1&&(Vt=parseInt($e.substring(et+P),$),$e=$e.substring(O,et))}catch(ge){}return webModule.__softPermutationId=Vt,C($e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase=window.ENV==="build"?"/react/build/js/mathematicalGraphics/"+name+"/":"/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(mn,Vt,le){"use strict";le.d(Vt,{Ax:function(){return et},Ds:function(){return ge},KI:function(){return Le},SI:function(){return $e},f1:function(){return Ve}});var be=le(11320);function Ve(Se){let me=!0;if(Se.length>0){for(let Pe=0;Pe<Se.length;Pe++)if(Se[Pe].compile_success==0||!Se[Pe].compile_success){me=!1;break}}else me=!1;return me}function $e(Se,me=""){let Pe=[];for(let at=0;at<Se.length;at++){let Oe=Se[at],ht=me?`${me}/${Oe.name}`:`${Oe.name}`;Pe.push({title:Oe.name,type:Oe.type,isLeaf:Oe.type!=="tree",key:ht})}return Pe}function et(Se,me,Pe){for(let at=0;at<Se.length;at++){let Oe=Se[at];if(Oe.key===me){Oe.children=Pe;break}Oe.children&&et(Oe.children,me,Pe)}return Se}function ge(Se,me,Pe){let at;return function(){let Oe=this,ht=arguments,nt=function(){at=null,Pe||Se.apply(Oe,ht)},rt=Pe&&!at;clearTimeout(at),at=setTimeout(nt,me),rt&&Se.apply(Oe,ht)}}const Te=!0,Le=be.Z.API_SERVER},63205:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return at}});var be=le(67294),Ve={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},$e=le(94184),et=le.n($e),ge=le(57953),Te=le(15979),Le=le(33170),Se=le(28706),me=(Oe,ht,nt)=>new Promise((rt,Je)=>{var Ee=Ye=>{try{Kt(nt.next(Ye))}catch(lt){Je(lt)}},pt=Ye=>{try{Kt(nt.throw(Ye))}catch(lt){Je(lt)}},Kt=Ye=>Ye.done?rt(Ye.value):Promise.resolve(Ye.value).then(Ee,pt);Kt((nt=nt.apply(Oe,ht)).next())}),at=({data:Oe,className:ht,fullWidth:nt,style:rt={},onClose:Je,onOk:Ee,showFullTools:pt,noAssociationId:Kt})=>{const Ye=(0,be.useRef)(null),lt=(0,be.useRef)(null),Me=(0,be.useRef)(null),xe=(0,be.useRef)(null),[We,je]=(0,be.useState)(!1),[Et,vt]=(0,be.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,be.useEffect)(()=>{Me.current||(Me.current=document.createElement("style"),document.head.appendChild(Me.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),Me.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&At()):(document.body.removeAttribute("data-custom"),Me.current&&(document.head.removeChild(Me.current),Me.current=null))},[Oe==null?void 0:Oe.visible]);const At=()=>me(void 0,null,function*(){je(!0),vt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ut=yield(0,Se.ZJ)(Oe==null?void 0:Oe.src);Ye.current.src="",Ye.current.src=ut,Ye.current.onload=function(){hn()},je(!1),vt("")}),Qe=()=>{document.body.removeAttribute("data-custom"),Me.current.innerHTML=" ",Je()},Bt=ut=>me(void 0,null,function*(){je(!0),vt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Yt=yield(0,Le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:ut.dataUrl}});Yt!=null&&Yt.id&&!Kt?(yield(0,Le.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Yt==null?void 0:Yt.id,settings:JSON.stringify(ut.state)}})).status===0&&Ee():Yt!=null&&Yt.id&&Ee(Yt),document.body.removeAttribute("data-custom"),Me.current.innerHTML=" ",je(!1),vt("")}),Lt=()=>{const ut=document.querySelector('a[href="https://markerjs.com/"]');ut&&ut.parentNode&&(ut.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(vn=>{const un=document.querySelector(vn.name);un&&un.setAttribute("title",vn.title)})},hn=()=>{lt.current=new Te.hP(Ye.current),lt.current.targetRoot=xe.current,lt.current.addEventListener("render",Bt),lt.current.addEventListener("beforeclose",Qe),pt&&(lt.current.availableMarkerTypes=lt.current.ALL_MARKER_TYPES,lt.current.uiStyleSettings.redoButtonVisible=!0,lt.current.uiStyleSettings.notesButtonVisible=!0,lt.current.uiStyleSettings.zoomButtonVisible=!0,lt.current.uiStyleSettings.zoomOutButtonVisible=!0,lt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=lt.current.uiStyleSettings,lt.current.show(),Oe!=null&&Oe.snapshotData&<.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Lt()},300)};return be.createElement(be.Fragment,null,(Oe==null?void 0:Oe.visible)&&be.createElement(ge.Z,{spinning:We,tip:Et,style:{position:"absolute"}},be.createElement("div",{ref:xe,className:et()(Ve.imageDimensions,ht,nt?Ve.fullWidth:""),style:rt},be.createElement("img",{className:Ve.img,ref:Ye}))))}},36527:function(mn,Vt,le){"use strict";var be=le(67294),Ve=le(71230),$e=le(15746),et=le(66368),ge=le(71577),Te=le(35598),Le=le(71736),Se=le(84279),me=le(67294);const Pe=(0,be.forwardRef)(({callback:at,showSaveButton:Oe,value:ht=""},nt)=>{const rt=(0,be.useRef)(),Je=[{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 "}]}]}],Ee=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],pt=lt=>{rt.current.setValue(rt.current.getValue()+" "+lt.value+" ")},Kt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:me.createElement(Ve.Z,{className:Le.Z.lists,gutter:[10,10]},Je.map((lt,Me)=>me.createElement($e.Z,{flex:"110px",className:Le.Z.item},me.createElement("div",null,me.createElement(Te.Z,{value:`$$${lt.value}$$`}),lt.name),me.createElement("div",{className:Le.Z.children},lt.children.map((xe,We)=>me.createElement("div",{key:We},me.createElement("h1",null,xe.name),me.createElement(Ve.Z,{gutter:[10,10]},xe.data.map((je,Et)=>me.createElement($e.Z,{key:Et,onClick:()=>pt(je),className:Le.Z.diamond},me.createElement(Te.Z,{value:"`$$"+je.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:me.createElement(Ve.Z,{className:Le.Z.lists,gutter:[10,10]},Ee.map((lt,Me)=>me.createElement($e.Z,{flex:"110px",className:Le.Z.item},me.createElement("div",null,me.createElement(Te.Z,{value:"`$$"+lt.value+"$$`"}),lt.name),me.createElement("div",{className:Le.Z.children},lt.children.map((xe,We)=>me.createElement("div",{key:We},xe.name&&me.createElement("h1",null,xe.name),me.createElement(Ve.Z,{gutter:[10,10]},xe.data.map((je,Et)=>me.createElement($e.Z,{key:Et,onClick:()=>pt(je),className:Le.Z.diamond},me.createElement(Te.Z,{value:"`$$"+je.value+"$$`"}))))))))))}],Ye=()=>{var lt=document.createElement("div");lt.innerHTML=rt.current.getValue();var Me=lt.innerText;return at&&at(Me),Me};return(0,be.useImperativeHandle)(nt,()=>({getData:Ye})),me.createElement("div",{className:Le.Z.mathWrap},me.createElement(et.default,{defaultActiveKey:"1",items:Kt}),me.createElement("math-field",{locale:"zh_cn",className:Le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:rt,style:{width:800,marginTop:30,fontSize:18}},ht||""),Oe&&me.createElement("div",{className:Le.Z.button},me.createElement(ge.ZP,{size:"large",onClick:Ye,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Vt.Z=Pe},57444:function(mn,Vt,le){"use strict";le.d(Vt,{h:function(){return lt}});var be=le(67294),Ve=le(11713),$e=le(22150),et=le(71577),ge=le(4631),Te=le.n(ge),Le=le(71749),Se=le(30483),me=Object.defineProperty,Pe=Object.defineProperties,at=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,rt=(Me,xe,We)=>xe in Me?me(Me,xe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Me[xe]=We,Je=(Me,xe)=>{for(var We in xe||(xe={}))ht.call(xe,We)&&rt(Me,We,xe[We]);if(Oe)for(var We of Oe(xe))nt.call(xe,We)&&rt(Me,We,xe[We]);return Me},Ee=(Me,xe)=>Pe(Me,at(xe));const pt=Ve.default.Option,Kt={labelCol:{span:4},wrapperCol:{span:20}},Ye={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"]};Vt.Z=({callback:Me,onCancel:xe})=>{const[We,je]=(0,be.useState)("python");function Et(At){je(Ye[At][1])}function vt(At){Me(At)}return be.createElement($e.default,Ee(Je({},Kt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:vt,style:{width:500}}),be.createElement($e.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},be.createElement(Ve.default,{getPopupContainer:At=>At.parentNode,onChange:Et},Object.keys(Ye).map(At=>be.createElement(pt,{key:At,value:At},Ye[At][0])))),be.createElement($e.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},be.createElement(lt,{mode:We})),be.createElement("div",{className:"flex-container flex-end"},be.createElement(et.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(et.ZP,{type:"ghost",onClick:xe},"\u53D6\u6D88")))};function lt({value:Me,onChange:xe,mode:We,options:je={}}){const Et=(0,be.useRef)(),[vt,At]=(0,be.useState)();return(0,be.useEffect)(()=>{if(vt){let Qe=function(Bt){const Lt=Bt.getValue();xe&&xe(Lt)};return vt.on("change",Qe),()=>{vt.off("change",Qe)}}},[vt,xe]),(0,be.useEffect)(()=>{vt&&vt.setOption("mode",We)},[vt,We]),(0,be.useEffect)(()=>{vt&&(Me!==vt.getValue()||Me==="")&&setTimeout(()=>{vt.setValue(Me||"")},300)},[vt,Me]),(0,be.useEffect)(()=>{if(Et.current&&!vt){const Qe=Te().fromTextArea(Et.current,Je({mode:We,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},je));At(Qe)}},[Et.current,vt]),be.createElement("div",{className:"my-codemirror-container"},be.createElement("textarea",{ref:Et}))}},91304:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return sr}});var be=le(67294),Ve=le(4631),$e=le.n(Ve),et=le(91033),ge=le(71749),Te=le(57341),Le=le(82801),Se=le(88386),me=le(49047),Pe=le(80785),at=le(35598),Oe=({value:On="",className:qe,showTextOnly:st,showLines:_t,style:Nt={}})=>{const He=(0,be.useMemo)(()=>"",[On]);return be.createElement(be.Fragment,null,be.createElement("div",{dangerouslySetInnerHTML:{__html:He}}))},ht=le(67294),nt=Object.defineProperty,rt=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,Ye=(On,qe,st)=>qe in On?nt(On,qe,{enumerable:!0,configurable:!0,writable:!0,value:st}):On[qe]=st,lt=(On,qe)=>{for(var st in qe||(qe={}))pt.call(qe,st)&&Ye(On,st,qe[st]);if(Ee)for(var st of Ee(qe))Kt.call(qe,st)&&Ye(On,st,qe[st]);return On},Me=(On,qe)=>rt(On,Je(qe));let xe=[{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 We({onActionCallback:On,title:qe,icon:st,actionName:_t,className:Nt="",children:He}){function gt(){On(_t)}return ht.createElement("a",{title:qe,className:Nt,onClick:gt},ht.createElement("i",{className:`${st}`}),He)}var je=({watch:On,showNullButton:qe,showNullProgramButton:st,onActionCallback:_t,fullScreen:Nt,insertTemp:He,hidetoolBar:gt,extraUse:Rt})=>{const It=[...xe,{title:`${On?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${On?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ht.createElement("ul",{className:"markdown-toolbar-container"},!gt&&It.map((Zt,Ut)=>ht.createElement("li",{key:Ut},Zt.actionName?ht.createElement(We,Me(lt({},Zt),{onActionCallback:_t})):ht.createElement("span",{className:"v-line"}))),qe?ht.createElement("li",null,ht.createElement(We,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:_t},ht.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,st?ht.createElement(ht.Fragment,null,ht.createElement("li",null,ht.createElement(We,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:_t},ht.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),ht.createElement("li",null,ht.createElement(We,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:_t},ht.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,He&&ht.createElement("li",null,ht.createElement(We,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${He}`,onActionCallback:_t},ht.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Rt&&ht.createElement("li",null,Rt),ht.createElement("li",{className:"btn-full-screen"},ht.createElement(We,{icon:`${Nt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:_t})))},Et=le(76621),vt=le(22150),At=le(69677),Qe=le(71577),Bt=Object.defineProperty,Lt=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,Yt=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,un=(On,qe,st)=>qe in On?Bt(On,qe,{enumerable:!0,configurable:!0,writable:!0,value:st}):On[qe]=st,Ze=(On,qe)=>{for(var st in qe||(qe={}))Yt.call(qe,st)&&un(On,st,qe[st]);if(ut)for(var st of ut(qe))vn.call(qe,st)&&un(On,st,qe[st]);return On},Ae=(On,qe)=>Lt(On,hn(qe));const Pt={labelCol:{span:4},wrapperCol:{span:20}};var bn=({callback:On,onCancel:qe})=>{function st(_t){On(_t)}return be.createElement(vt.default,Ae(Ze({},Pt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:st,style:{width:500}}),be.createElement(vt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},be.createElement(At.default,null)),be.createElement(vt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},be.createElement(At.default,null)),be.createElement("div",{className:"flex-container flex-end"},be.createElement(Qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(Qe.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},nn=le(57444),tt=le(70859),ot=le(14446),Ht=le(71230),En=le(63205),fn=le(67294),Gt=({callback:On,onCancel:qe})=>{const st=document.createElement("canvas"),_t=st.getContext("2d");st.width=1e3,st.height=800,_t.fillStyle="#ffffff",_t.fillRect(0,0,st.width,st.height);const Nt=st.toDataURL("image/png");return fn.createElement(ot.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},fn.createElement(Ht.Z,{style:{height:"100vh"}},fn.createElement(En.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Nt,visible:!0,title:String(Date.now())},onOk:He=>{On({src:He.url})},onClose:qe})))},Ft=le(72565),xn=le(15746),gn=le(2453),_e={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ce=le(67294),he=(0,be.forwardRef)(({onCancel:On,editImgId:qe,callback:st},_t)=>{let Nt=(0,be.useRef)(),He=(0,be.useRef)(),gt=(0,be.useRef)(),Rt=(0,be.useRef)(!1);const It=(0,be.useRef)(!1);console.log("ref:",_t);const[Zt,Ut]=(0,be.useState)(0),[Nn,hr]=(0,be.useState)("100vh");return(0,be.useEffect)(()=>{Ut(1);try{indexedDB.databases().then(Vn=>{Vn.forEach(jn=>indexedDB.deleteDatabase(jn.name))})}catch(Vn){}},[]),(0,be.useImperativeHandle)(_t,()=>({setHeight:hr})),ce.createElement("div",{ref:It,className:"body-overflow-initial"},ce.createElement(Ft.Z,{width:"100vw",height:Nn,footer:null,closable:!0,placement:"bottom",open:!!Zt,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${_e.drawerWrap}`,onClose:()=>{window.saveDrawData(Vn=>{st({src:`/api/attachments/${Vn}`,id:Vn})})},title:ce.createElement(Ht.Z,{align:"middle"},ce.createElement(xn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ce.createElement(xn.Z,{onClick:()=>{hr(Nn==="60px"?"100vh":"60px")}},ce.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ce.createElement(xn.Z,{onClick:()=>{window.saveDrawData(Vn=>{if(Vn===null){gn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}gn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),st({src:`/api/attachments/${Vn}`,id:Vn,disabledClose:!0})})}},ce.createElement(Qe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ce.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${qe||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:He})))}),fe=le(11320),oe=le(78045),ke=le(31795);const Ge=oe.ZP.Group,St={margin:"0 8px"};var Tt=({callback:On,onCancel:qe})=>{function st(_t){On(_t)}return be.createElement(vt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:st},be.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},be.createElement("span",{style:St},"\u5355\u5143\u683C\u6570\uFF1A"),be.createElement("span",{style:St},"\u884C\u6570"),be.createElement(vt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},be.createElement(ke.Z,null)),be.createElement("span",{style:St},"\u5217\u6570"),be.createElement(vt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},be.createElement(ke.Z,null))),be.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},be.createElement("span",{style:St},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),be.createElement(vt.default.Item,{name:"align"},be.createElement(Ge,null,be.createElement(oe.ZP,{value:"default"},be.createElement("i",{className:"fa fa-align-justify"})),be.createElement(oe.ZP,{value:"left"},be.createElement("i",{className:"fa fa-align-left"})),be.createElement(oe.ZP,{value:"center"},be.createElement("i",{className:"fa fa-align-center"})),be.createElement(oe.ZP,{value:"right"},be.createElement("i",{className:"fa fa-align-right"}))))),be.createElement("div",{className:"flex-container flex-end"},be.createElement(Qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(Qe.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Ot=le(47897),Wt=le(61016),$t=le.n(Wt),ar=(0,be.forwardRef)(({use3d:On,width:qe,height:st,callback:_t,showSaveButton:Nt},He)=>{const gt=(0,be.useRef)(),Rt=(0,be.useRef)(),[It,Zt]=(0,be.useState)(!1),Ut=(0,be.useRef)({id:gt,appName:"graphing",width:qe||1e3,height:st||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,be.useEffect)(()=>{Rt.current=new($t())(Ut.current,!0),window.onload=function(){Rt.current.inject("applet_container")}},[]);const Nn=()=>{var hr=window.ggbApplet.getPNGBase64(1,!0,72);return _t&&_t(hr),hr};return(0,be.useEffect)(()=>{Ut.current.appName=It?"3D":"graphing",Rt.current.inject("applet_container")},[It]),(0,be.useEffect)(()=>{Zt(On)},[On]),(0,be.useImperativeHandle)(He,()=>({getImgData:Nn})),be.createElement(be.Fragment,null,be.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:gt}),be.createElement(Ht.Z,{align:"middle"},be.createElement(xn.Z,{flex:1},be.createElement(Ot.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:It,onChange:hr=>Zt(hr)})),be.createElement(xn.Z,null,be.createElement(Qe.ZP,{size:"large",onClick:Nn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Dt=le(36527),tn=le(25934);const qn="link",Er="upload-image",kn="add-flowchart",gr="draw-image",Di="add-flowchart",ni="code-block",Xr="add-table",Vr="------------",Si={default:Vr,left:`:${Vr}`,center:`:${Vr}:`,right:`${Vr}:`};var hi=le(99914),Ti=(On,qe,st)=>new Promise((_t,Nt)=>{var He=It=>{try{Rt(st.next(It))}catch(Zt){Nt(Zt)}},gt=It=>{try{Rt(st.throw(It))}catch(Zt){Nt(Zt)}},Rt=It=>It.done?_t(It.value):Promise.resolve(It.value).then(He,gt);Rt((st=st.apply(On,qe)).next())});function Ii(){}let Lr=0;const Xi=1e4,la="\u2581",va="@\u2581\u2581@",ya="@\u2581@",$i=`
|
|
|
**\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`,Mt=["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 Cn(On){return/^\d+$/.test(On)?`${On}px`:On}const In=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",mr={[In+"-B"]:"bold",[In+"-I"]:"italic"},Xn={[qn]:"\u6DFB\u52A0\u94FE\u63A5",[ni]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Er]:"\u6DFB\u52A0\u56FE\u7247",[gr]:"\u6DFB\u52A0\u753B\u56FE",[kn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Xr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var sr=({defaultValue:On="",onChange:qe,width:st="100%",height:_t=400,miniToolbar:Nt=!1,isFocus:He=!1,watch:gt,insertTemp:Rt,mode:It="markdown",id:Zt="markdown-editor-id",showResizeBar:Ut=!1,noStorage:Nn=!1,showNullButton:hr=!1,showNullProgramButton:Vn=!1,hidetoolBar:jn=!1,fullScreen:Qn=!1,onBlur:tr,onCMBeforeChange:Ar,onFullScreen:cn,className:Kn="",disablePaste:pi=!1,disabled:xi=!1,disabledFill:Zr=!1,placeholder:Rr="",values:_i="",extraUse:cr,onAddBlank:ui})=>{const[wn,Yi]=(0,be.useState)(null),[ki,wa]=(0,be.useState)(On),[qi,Pi]=(0,be.useState)(gt),[fa,ji]=(0,be.useState)(Qn),[Ci,ta]=(0,be.useState)(""),[_a,na]=(0,be.useState)(0),[Ni,ka]=(0,be.useState)(_t),[Pa,ha]=(0,be.useState)(!1),ai=(0,be.useRef)((0,tn.Z)()),bt=(0,be.useRef)(!1),mt=(0,be.useRef)(),[zt,an]=(0,be.useState)(0),[An,Sr]=(0,be.useState)(0),wr=(0,be.useRef)(),Tr=(0,be.useRef)(),$r=(0,be.useRef)(),Dr=(0,be.useRef)(),ei=(0,be.useRef)(),ci=(0,be.useRef)(),Mi=()=>Ti(void 0,null,function*(){var on;const rn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ai.current}});(on=rn==null?void 0:rn.attachments)!=null&&on.length&&(console.log("cm:",wn,wr),rn.attachments.map(yn=>{yn.content_type.indexOf("image")>-1?wn.replaceSelection(``):yn.content_type.indexOf("video")>-1?wn.replaceSelection(`<video width="100%" controls src="${fe.Z.API_SERVER}/api/attachments/${data.id}"></video>`):yn.content_type.indexOf("pdf")>-1?wn.replaceSelection(`<a href="${fe.Z.API_SERVER}/api/attachments/${yn.id}?type=${yn.content_type}&disposition=inline" target="_blank">${yn.name}</a>`):wn.replaceSelection(`[${yn.name}](${fe.Z.API_SERVER}/api/attachments/${yn.id}?type=${yn.content_type})`)}))});(0,be.useEffect)(()=>{const on=window.scrollY||window.pageYOffset;wa(_i),wn==null||wn.setValue(_i),window.scrollTo(0,on)},[_i]),(0,be.useEffect)(()=>{cn==null||cn(fa)},[fa]),(0,be.useEffect)(()=>{if(wr.current){let on=function(yn,Mn){var er;if(pi){Mn.preventDefault();return}const Hn=Mn.clipboardData;if(Hn){const $n=Hn.types.toString(),Un=Hn.items;if($n==="Files"||Hn.types.indexOf("Files")>-1){if(Mn.preventDefault(),It=="stex")return;try{let Wn=Un[1];((er=Un[0])==null?void 0:er.kind)==="file"&&(Wn=Un[0]);const ir=Wn.getAsFile(),ze=ir.name.split(".").pop();(0,tt.I)(ir,Ke=>{var kt,yt,qt;Ke.id?((kt=ir==null?void 0:ir.type)==null?void 0:kt.indexOf("image"))>-1?rn.replaceSelection(`<img width="100%" src="/api/attachments/${Ke.id}?type=${Ke.content_type})" alt="" />`):((yt=ir==null?void 0:ir.type)==null?void 0:yt.indexOf("video"))>-1?rn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ke.id}"></video>`):((qt=ir==null?void 0:ir.type)==null?void 0:qt.indexOf("pdf"))>-1?rn.replaceSelection(`<a href="/api/attachments/${Ke.id}?type=${ir.type}&disposition=inline" target="_blank">${ir.name}</a>`):Mt.includes(ze)?rn.replaceSelection(`<a href="/api/attachments/${Ke.id}?type=office&disposition=inline" target="_blank">${ir.name}</a>`):rn.replaceSelection(`[${ir.name}](/api/attachments/${Ke.id}?type=${Ke.content_type})`):(Ke==null?void 0:Ke.status)===401&&(gn.ZP.warning((Ke==null?void 0:Ke.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(Wn){gn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const rn=$e().fromTextArea(wr.current,{mode:It,lineNumbers:!Nt,lineWrapping:!0,value:On,autoCloseTags:!Vn,autoCloseBrackets:!0});return rn.on("keyup",function(yn,Mn){Mn.keyCode===8&&(yn.getValue()==""?rn.setOption("placeholder",Rr):rn.setOption("placeholder",null))}),rn.on("keydown",function(yn,Mn){if(Mn.keyCode===8){var er=Wi(yn);er&&Mn.preventDefault()}}),He&&rn.focus(),rn.on("paste",on),rn.on("dragleave",function(yn,Mn){Tr.current.classList.remove("mouse-hover-md")}),xi&&rn.on("beforeChange",function(yn,Mn){(Mn.origin==="paste"||Mn.origin==="+input")&&Mn.cancel()}),Yi(rn),()=>{rn.off("paste",on)}}},[]);const Gi=(0,be.useCallback)(()=>{if(Tr.current)try{}catch(on){console.log(on,"---- to set md editor body height")}},[Ni,Tr,fa]);(0,be.useEffect)(()=>{function on(){let rn=new et.Z(yn=>{for(let Mn of yn)(Mn.target.offsetHeight>0||Mn.target.offsetWidth>0)&&(Gi(),wn.setSize("100%","100%"),wn.refresh())});return rn.observe(wr.current.parentElement),rn}if(wn){const rn=on();return()=>{var yn,Mn;(yn=wr.current)!=null&&yn.parentElement&&rn.unobserve((Mn=wr.current)==null?void 0:Mn.parentElement)}}},[wn,Gi]),(0,be.useEffect)(()=>{if(wn){let on=[];for(const[rn,yn]of Object.entries(mr)){let Mn={[rn]:()=>{Fi(yn)}};on.push(Mn),wn.addKeyMap(Mn)}return mt.current=setInterval(()=>{bt.current&&Mi()},4e3),()=>{clearInterval(mt.current);for(let rn of on)wn.removeKeyMap(rn)}}},[wn]),(0,be.useEffect)(()=>{Qn!==fa&&ji(Qn)},[Qn]),(0,hi.Z)(()=>{if(!Nn&&_a>0){let on=new Date().getTime(),rn=window.sessionStorage.getItem(Zt);on>=_a+Xi&&(!rn||rn!==ki)&&(window.sessionStorage.setItem(Zt,ki),ha(!0))}},Xi),(0,be.useEffect)(()=>{Pi(gt)},[wn,gt]),(0,be.useEffect)(()=>{wn&&He&&wn.focus()},[wn,He]),(0,be.useEffect)(()=>{if(qi&&wn){let on=function(yn){let Mn=yn.target;if(Dr.current){let er=Mn.scrollTop/Mn.scrollHeight;Dr.current.scrollTop=Dr.current.scrollHeight*er}};const rn=wn.getScrollerElement();return rn.addEventListener("scroll",on),()=>{rn.removeEventListener("scroll",on)}}},[wn,qi]),(0,be.useEffect)(()=>{if(wn&&Ar){let on=function(rn,yn){Ar(rn,yn)};return wn.on("beforeChange",on),()=>{wn.off("beforeChange",on)}}},[wn,Ar]),(0,be.useEffect)(()=>{if(wn&&tr){let on=function(){tr(wn.getValue())};return wn.on("blur",on),()=>{wn.off("blur",on)}}},[wn,tr]);function Wi(on,rn){var yn=on.getDoc(),Mn=yn.getCursor(),er=yn.getLine(Mn.line),Hn=er.charAt(Mn.ch-1),$n=er.lastIndexOf("@\u2581@",Mn.ch),Un=er.lastIndexOf("@\u2581\u2581@",Mn.ch),Wn=$n>Un?$n:Un,ir=$n>Un?3:4;if(va.indexOf(Hn)===-1)return null;if(console.log("change1:",rn,on,er,Mn,Wn,$n,Un,Hn),Wn>=0&&Mn.ch-Wn<5){var ze=Wn+ir;return yn.replaceRange("",{line:Mn.line,ch:Wn},{line:Mn.line,ch:ze}),{line:Mn.line,ch:ze}}return null}(0,be.useEffect)(()=>{if(wn){let on=function(rn,yn){const Mn=rn.getValue();wa(Mn),na(new Date().getTime()),rn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qe&&(Vn?qe(Mn,Xt(Mn)):qe(Mn))};return wn.on("change",on),()=>{wn.off("change",on)}}},[wn,qe]),(0,be.useEffect)(()=>{if(wn)if(On==null)wn.setValue(""),wa("");else{const on=window.scrollY||window.pageYOffset;On!==wn.getValue()&&(wn.setValue(On),wa(On),wn.setCursor(xi?1:wn.lineCount(),0),window.scrollTo(0,on))}},[wn,On]);const Fi=(0,be.useCallback)(on=>{const rn=wn.getCursor(),yn=wn.getSelection();let Mn=yn.split(`
|
|
|
`);switch(on){case"bold":return wn.replaceSelection("**"+yn+"**"),yn===""&&wn.setCursor(rn.line,rn.ch+2),wn.focus();case"italic":return wn.replaceSelection("*"+yn+"*"),yn===""&&wn.setCursor(rn.line,rn.ch+1),wn.focus();case"code":return wn.replaceSelection("`"+yn+"`"),yn===""&&wn.setCursor(rn.line,rn.ch+1),wn.focus();case"inline-latex":return ta("inline-latex"),wn.focus();case"latex":return wn.replaceSelection("```latex\n"+yn+"\n```"),wn.setCursor(rn.line+1,yn.length+1),wn.focus();case"line-break":return wn.replaceSelection(`<br/>
|
|
|
`),wn.focus();case"list-ul":return yn===""?wn.replaceSelection("- "+yn):wn.replaceSelection(Mn.map(er=>er===""?"":`- ${er}`).join(`
|
|
|
`)),wn.focus();case"list-ol":return yn===""?wn.replaceSelection("1. "+yn):wn.replaceSelection(Mn.map((er,Hn)=>er===""?"":`${Hn+1}. ${er}`).join(`
|
|
|
`)),wn.focus();case"add-null-ch":ui==null||ui();return;case"add-signal":return yn===""&&wn.setCursor(rn.line,rn.ch),wn.replaceSelection(ya),wn.focus();case"add-multiple":return yn===""&&wn.setCursor(rn.line,rn.ch),wn.replaceSelection(va),wn.focus();case"inster-template-1":return yn===""&&wn.setCursor(rn.line,rn.ch),wn.replaceSelection($i),wn.focus();case"eraser":return wn.setValue(""),wn.focus();case"trigger-watch":return Pi(!qi),wn.focus();case"trigger-full-screen":return ji(!fa),wn.focus();case qn:ta(qn);return;case ni:ta(ni);return;case Er:ta(Er);return;case gr:ta(gr);return;case"maths-latex":ta("maths-latex");return;case kn:ei.current="",sessionStorage.removeItem("file_id"),ta(kn);return;case Xr:ta(Xr);return;default:throw new Error}},[wn,qi,fa]),Ie=(0,be.useCallback)((on,rn)=>{var yn,Mn,er,Hn,$n,Un;ta("");const{src:Wn,alt:ir,id:ze}=on||{};switch(Ci){case qn:const{title:dn,link:sn}=on;return wn.replaceSelection(`[${dn}](${sn})`),wn.focus();case ni:const{language:Dn,content:Sn}=on;return wn.replaceSelection(["```"+Dn,Sn,"```"].join(`
|
|
|
`)),wn.focus();case"maths-latex":for(var Ke=atob(on),kt=new Uint8Array(Ke.length),yt=0;yt<Ke.length;yt++)kt[yt]=Ke.charCodeAt(yt);var qt=new Blob([kt],{type:"image/png"});(0,tt.I)(qt,Pr=>{Pr.id?wn.replaceSelection(``):(Pr==null?void 0:Pr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":wn.replaceSelection("`$$"+on+"$$`");break;case Di:if(!ze)return;wn.focus(),wn.getValue().indexOf(Wn)===-1?wn.replaceSelection(`<center><img id="${ze}" width="80%" src="${Wn}" class="draw-flowchart" alt="${ir||""}" /></center>`):document.getElementById(ze).src=fe.Z.API_SERVER+Wn+"?t="+Date.now();try{setTimeout(()=>{tr(wn.getValue())},100)}catch(Pr){}break;case Er:case gr:const Jt=rn,Ln=(er=(Mn=(yn=Jt==null?void 0:Jt.name)==null?void 0:yn.split("."))==null?void 0:Mn.pop)==null?void 0:er.call(Mn);return((Hn=Jt==null?void 0:Jt.type)==null?void 0:Hn.indexOf("image"))>-1||!(Jt!=null&&Jt.type)?Jt!=null&&Jt.align||Jt!=null&&Jt.width?wn.replaceSelection(`<p style="text-align:${Jt.align||"initial"}"><img width="${Jt.width?Jt.width+"%":"initial"}" src="${Wn}" alt="${ir||""}" /></p>`):wn.replaceSelection(`<img width="100%" src="${Wn}" alt="${ir||""}" />`):(($n=Jt==null?void 0:Jt.type)==null?void 0:$n.indexOf("video"))>-1?wn.replaceSelection(`<video width="100%" controls src="${Wn}"></video>`):((Un=Jt==null?void 0:Jt.type)==null?void 0:Un.indexOf("pdf"))>-1?wn.replaceSelection(`<a href="${Wn}?type=${Jt.type}&disposition=inline" target="_blank">${Jt.name}</a>`):Mt.includes(Ln)?wn.replaceSelection(`<a href="${Wn}?type=office&disposition=inline" target="_blank">${Jt.name}</a>`):wn.replaceSelection(`[${Jt.name}](${Wn})`),wn.focus();case Xr:const{row:Pn,col:rr,align:Tn}=on;let pr=`
|
|
|
`;for(let Pr=0;Pr<Pn;Pr++){let br=[],_r=[];for(let lr=0;lr<rr;lr++)Pr===1&&_r.push(Si[Tn]),br.push(" ");Pr===1&&(pr+=`| ${_r.join(" | ")} |
|
|
|
`),pr+=`| ${br.join(rr===1?"":" | ")} |
|
|
|
`}return wn.replaceSelection(pr+`
|
|
|
`),wn.focus();default:throw new Error}},[wn,Ci]),Fe=(0,be.useMemo)(()=>{switch(Ci){case qn:return be.createElement(bn,{callback:Ie,onCancel:Ne});case ni:return be.createElement(nn.Z,{callback:Ie,onCancel:Ne});case Er:return be.createElement(tt.Z,{callback:Ie,onCancel:Ne});case kn:return be.createElement(he,{editImgId:ei.current,callback:Ie,onCancel:Ne});case Xr:return be.createElement(Tt,{callback:Ie,onCancel:Ne});case"maths-latex":return be.createElement(ar,{showSaveButton:!0,callback:Ie});case"inline-latex":return be.createElement(Dt.Z,{showSaveButton:!0,callback:Ie});default:return null}},[Ci]);function Ne(){ta("")}(0,be.useEffect)(()=>{if($r.current){let on=function($n){er=!0,Hn=$n.pageY},rn=function(){er=!1},yn=function($n){if(er){let Un=$n.pageY-Hn;Un<0&&(Un=0),Un>300&&(Un=300);let Wn=_t+Un+"px";ka(Wn)}},Mn=$r.current,er=!1,Hn=0;return Mn.addEventListener("mousedown",on),document.addEventListener("mousemove",yn),document.addEventListener("mouseup",rn),()=>{Mn.removeEventListener("mousedown",on),document.removeEventListener("mousemove",yn),document.removeEventListener("mouseup",rn)}}},[wn,$r]),(0,be.useEffect)(()=>{ka(_t)},[_t]);const Ue=Cn(st),it=Cn(Ni),ft={width:Ue,height:it},xt=(0,be.useMemo)(()=>{if(_a){let on=new Date(_a),rn=on.getHours(),yn=on.getMinutes(),Mn=on.getSeconds();return rn=rn<10?"0"+rn:rn,yn=yn<10?"0"+yn:yn,Mn=Mn<10?"0"+Mn:Mn,`${rn}:${yn}:${Mn}`}return 0},[_a]),Xt=on=>{const rn=[];if(Vn){let yn=-1;on=on.replace(/(@▁▁@|@▁@)/g,function(Mn,er,Hn){rn.push({multiLine:Mn!==ya})})}return rn};function Qt(){window.sessionStorage.removeItem(Zt),ha(!1),na(0)}function zn(){ha(!1),na(0),wn.setValue(window.sessionStorage.getItem(Zt))}(0,be.useEffect)(()=>{Xn[Ci]&&Ci!==gr&&Ci!==kn&&setTimeout(()=>{const on=document.getElementsByClassName("markdown-popup-form")[0],rn=window.innerWidth/2-on.offsetWidth/2,yn=window.innerHeight/2-on.offsetHeight/2;an(rn),Sr(yn)},0)},[Ci]);const nr=on=>{on.preventDefault();const rn=on.clientX-zt,yn=on.clientY-An;document.body.onmousemove=Mn=>{let er=Mn.clientX-rn,Hn=Mn.clientY-yn;const $n=document.getElementsByClassName("markdown-popup-form")[0],Un=window.innerWidth-$n.offsetWidth,Wn=window.innerHeight-$n.offsetHeight;er=Math.max(0,Math.min(er,Un)),Hn=Math.max(0,Math.min(Hn,Wn)),Rn(Mn.clientX,Mn.clientY,rn,yn)&&(an(er),Sr(Hn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Rn=(on,rn,yn,Mn)=>{const er=document.body.clientHeight,Hn=document.body.clientWidth;return on<20&&yn>on||on>Hn-20&&yn<on||rn<20&&Mn>rn||rn>er-20&&Mn<rn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return be.createElement(be.Fragment,null,be.createElement("div",{className:"markdown-editor-wrapper",ref:Tr},be.createElement("div",{className:`markdown-editor-container ${Kn} ${qi?"on-preview":""} ${Nt?"mini":""} ${fa?"full-screen":""}`,style:ft},be.createElement(je,{insertTemp:Rt,watch:qi,fullScreen:fa,showNullButton:hr,showNullProgramButton:Vn,onActionCallback:Fi,hidetoolBar:jn,extraUse:cr}),be.createElement("div",{className:"markdown-editor-body"},be.createElement("div",{className:"codemirror-container"},be.createElement("textarea",{ref:wr,placeholder:Rr})),qi?be.createElement("div",{ref:Dr,className:"preview-container"},It==="stex"&&be.createElement(Oe,{value:ki}),It!=="stex"&&be.createElement(at.Z,{edit:!0,disabledFill:Zr,showProgramFill:Vn,value:ki,openEditor:on=>{var rn;ei.current=on,(rn=ci.current)==null||rn.setHeight("100vh"),setTimeout(()=>{ta("add-flowchart")},150)}})):null))),Ut?be.createElement("a",{ref:$r,className:"editor-resize"}):null,Ci===gr&&be.createElement(Gt,{callback:Ie,onCancel:Ne}),Ci===kn&&be.createElement(he,{ref:ci,editImgId:ei.current,callback:Ie,onCancel:Ne}),be.createElement(Et.Z,null,Xn[Ci]&&Ci!==gr&&Ci!==kn?be.createElement(ot.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:zt,top:An},title:be.createElement("div",{style:{cursor:"move"},onMouseDown:nr},Xn[Ci]),open:!0,onCancel:Ne,footer:null,destroyOnClose:!0,width:Ci===kn?"1200px":null,height:Ci===kn?"80vh":null,className:"markdown-popup-form"},Fe):null))}},70859:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return We},I:function(){return Et}});var be=le(22150),Ve=le(2453),$e=le(69677),et=le(93421),ge=le(31795),Te=le(78045),Le=le(71577),Se=le(15476),me=le(67294),Pe=le(52262),at=le(67294),Oe=Object.defineProperty,ht=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,pt=(vt,At,Qe)=>At in vt?Oe(vt,At,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):vt[At]=Qe,Kt=(vt,At)=>{for(var Qe in At||(At={}))Je.call(At,Qe)&&pt(vt,Qe,At[Qe]);if(rt)for(var Qe of rt(At))Ee.call(At,Qe)&&pt(vt,Qe,At[Qe]);return vt},Ye=(vt,At)=>ht(vt,nt(At));const{useForm:lt}=be.default,Me={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var We=({callback:vt,onCancel:At})=>{const[Qe]=lt();let Bt=(0,me.useRef)();function Lt(Yt){Bt.current.width=Qe.getFieldValue("width"),Bt.current.align=Qe.getFieldValue("align"),vt(Yt,Bt.current)}function hn(Yt,vn){if(Yt.status===-1){Ve.ZP.error(Yt.message);return}Qe.setFieldsValue({src:`/api/attachments/${Yt.id}`,type:vn.type})}function ut(Yt){let vn=Yt.target.files[0];Bt.current=vn,Et(vn,hn)}return at.createElement(be.default,Ye(Kt({form:Qe},xe),{className:"upload-image-panel",onFinish:Lt,style:{width:470,overflow:"hidden"}}),at.createElement(be.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},at.createElement("div",{className:"flex-container"},at.createElement(be.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},at.createElement($e.default,{style:Me})),at.createElement(je,{onFileChange:ut}))),at.createElement(be.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},at.createElement($e.default,{style:{width:264}})),at.createElement(be.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},at.createElement(et.Z,null,at.createElement(be.default.Item,{name:"width",style:{margin:0}},at.createElement(ge.Z,{style:{width:264}})),at.createElement("span",{className:"ml8"},"%"))),at.createElement(be.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},at.createElement(Te.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"}]})),at.createElement("aside",null,at.createElement(be.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},at.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),at.createElement(Le.ZP,{type:"default",onClick:At},"\u53D6\u6D88"))))};function je({onFileChange:vt}){return at.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",at.createElement("input",{type:"file",onChange:vt}))}function Et(vt,At){if(!vt)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Pe.bg)())throw Ve.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Qe=new FormData;Qe.append("editormd-image-file",vt),Qe.append("file_param_name","editormd-image-file"),Qe.append("byxhr","true");var Bt=new window.XMLHttpRequest;Bt.withCredentials=!0,Bt.addEventListener("load",function(Lt){At(JSON.parse(Lt.target.responseText),vt)},!1),Bt.addEventListener("error",function(Lt){console.error(Lt)},!1),Bt.open("POST",`${Se.KI}/api/attachments.json`),Bt.send(Qe)}},76621:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return $e}});var be=le(67294),Ve=le(73935);class $e extends be.Component{constructor(ge){super(ge);const Te=window.document;this.node=Te.createElement("div"),Te.body.appendChild(this.node)}render(){const{children:ge}=this.props;return(0,Ve.createPortal)(ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ve}});var be=le(67294);function Ve($e,et){const ge=(0,be.useRef)();(0,be.useEffect)(()=>{ge.current=$e}),(0,be.useEffect)(()=>{function Te(){ge.current()}if(et!==null){let Le=setInterval(Te,et);return()=>clearInterval(Le)}},[et])}},12051:function(mn,Vt,le){"use strict";le.d(Vt,{BE:function(){return Te},EW:function(){return Oe},Pt:function(){return at},QB:function(){return ge},R4:function(){return Se},WF:function(){return et},cq:function(){return Pe},jA:function(){return $e},kG:function(){return Ve},lP:function(){return Le},r_:function(){return me}});var be=le(33170);function Ve(ht){return(0,be.U2)("lab_templates.json",ht)}function $e(ht,nt){return(0,be.IV)(`lab_templates/${ht}.json`,{course_id:nt})}function et(ht){return(0,be.v_)("lab_templates.json",ht)}function ge(ht,nt){return(0,be.gz)(`lab_templates/${ht}.json`,nt)}function Te(ht,nt){return(0,be.U2)(`lab_templates/${nt}/view.json`,{course_id:ht})}function Le(ht){return(0,be.U2)("lab_templates/demo.json",{course_id:ht})}function Se(ht){return(0,be.U2)("lab_templates/template_content.json",{course_id:ht,clazz:"normal"})}function me(ht){return(0,be.U2)(`lab_reports/${ht}/detail.json`)}function Pe(ht){return(0,be.v_)("lab_reports.json",ht)}function at(ht,nt){return(0,be.gz)(`lab_reports/${ht}.json`,nt)}function Oe(ht,nt){return(0,be.U2)("lab_reports/view.json",{course_id:ht,student_work_id:nt})}},9708:function(mn,Vt,le){"use strict";le.d(Vt,{F:function(){return ge},Z:function(){return et}});var be=le(94184),Ve=le.n(be);const $e=null;function et(Te,Le,Se){return Ve()({[`${Te}-status-success`]:Le==="success",[`${Te}-status-warning`]:Le==="warning",[`${Te}-status-error`]:Le==="error",[`${Te}-status-validating`]:Le==="validating",[`${Te}-has-feedback`]:Se})}const ge=(Te,Le)=>Le||Te},85673:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return hn}});var be=le(94184),Ve=le.n(be),$e=le(37419),et=le(1337),ge=le(67294),Te=le(96159),Le=le(53124),Se=le(42922),me=le(35874);const Pe=ut=>{let{children:Yt}=ut;const{getPrefixCls:vn}=ge.useContext(Le.E_),un=vn("breadcrumb");return ge.createElement("li",{className:`${un}-separator`,"aria-hidden":"true"},Yt===""?Yt:Yt||"/")};Pe.__ANT_BREADCRUMB_SEPARATOR=!0;var at=Pe,Oe=function(ut,Yt){var vn={};for(var un in ut)Object.prototype.hasOwnProperty.call(ut,un)&&Yt.indexOf(un)<0&&(vn[un]=ut[un]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,un=Object.getOwnPropertySymbols(ut);Ze<un.length;Ze++)Yt.indexOf(un[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ut,un[Ze])&&(vn[un[Ze]]=ut[un[Ze]]);return vn};function ht(ut,Yt){if(ut.title===void 0||ut.title===null)return null;const vn=Object.keys(Yt).join("|");return typeof ut.title=="object"?ut.title:String(ut.title).replace(new RegExp(`:(${vn})`,"g"),(un,Ze)=>Yt[Ze]||un)}function nt(ut,Yt,vn,un){if(vn==null)return null;const{className:Ze,onClick:Ae}=Yt,Pt=Oe(Yt,["className","onClick"]),bn=Object.assign(Object.assign({},(0,et.Z)(Pt,{data:!0,aria:!0})),{onClick:Ae});return un!==void 0?ge.createElement("a",Object.assign({},bn,{className:Ve()(`${ut}-link`,Ze),href:un}),vn):ge.createElement("span",Object.assign({},bn,{className:Ve()(`${ut}-link`,Ze)}),vn)}function rt(ut,Yt){return(un,Ze,Ae,Pt,bn)=>{if(Yt)return Yt(un,Ze,Ae,Pt);const nn=ht(un,Ze);return nt(ut,un,nn,bn)}}var Je=function(ut,Yt){var vn={};for(var un in ut)Object.prototype.hasOwnProperty.call(ut,un)&&Yt.indexOf(un)<0&&(vn[un]=ut[un]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,un=Object.getOwnPropertySymbols(ut);Ze<un.length;Ze++)Yt.indexOf(un[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ut,un[Ze])&&(vn[un[Ze]]=ut[un[Ze]]);return vn};const Ee=ut=>{const{prefixCls:Yt,separator:vn="/",children:un,menu:Ze,overlay:Ae,dropdownProps:Pt,href:bn}=ut,tt=(ot=>{if(Ze||Ae){const Ht=Object.assign({},Pt);if(Ze){const En=Ze||{},{items:fn}=En,Gt=Je(En,["items"]);Ht.menu=Object.assign(Object.assign({},Gt),{items:fn==null?void 0:fn.map((Ft,xn)=>{var{key:gn,title:_e,label:ce,path:se}=Ft,he=Je(Ft,["key","title","label","path"]);let fe=ce!=null?ce:_e;return se&&(fe=ge.createElement("a",{href:`${bn}${se}`},fe)),Object.assign(Object.assign({},he),{key:gn!=null?gn:xn,label:fe})})})}else Ae&&(Ht.overlay=Ae);return ge.createElement(me.Z,Object.assign({placement:"bottom"},Ht),ge.createElement("span",{className:`${Yt}-overlay-link`},ot,ge.createElement(Se.Z,null)))}return ot})(un);return tt!=null?ge.createElement(ge.Fragment,null,ge.createElement("li",null,tt),vn&&ge.createElement(at,null,vn)):null},pt=ut=>{const{prefixCls:Yt,children:vn,href:un}=ut,Ze=Je(ut,["prefixCls","children","href"]),{getPrefixCls:Ae}=ge.useContext(Le.E_),Pt=Ae("breadcrumb",Yt);return ge.createElement(Ee,Object.assign({},Ze,{prefixCls:Pt}),nt(Pt,Ze,vn,un))};pt.__ANT_BREADCRUMB_ITEM=!0;var Kt=pt,Ye=le(14747),lt=le(67968),Me=le(45503);const xe=ut=>{const{componentCls:Yt,iconCls:vn}=ut;return{[Yt]:Object.assign(Object.assign({},(0,Ye.Wf)(ut)),{color:ut.itemColor,fontSize:ut.fontSize,[vn]:{fontSize:ut.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:ut.linkColor,transition:`color ${ut.motionDurationMid}`,padding:`0 ${ut.paddingXXS}px`,borderRadius:ut.borderRadiusSM,height:ut.lineHeight*ut.fontSize,display:"inline-block",marginInline:-ut.marginXXS,"&:hover":{color:ut.linkHoverColor,backgroundColor:ut.colorBgTextHover}},(0,Ye.Qy)(ut)),"li:last-child":{color:ut.lastItemColor},[`${Yt}-separator`]:{marginInline:ut.separatorMargin,color:ut.separatorColor},[`${Yt}-link`]:{[`
|
|
|
> ${vn} + span,
|
|
|
> ${vn} + a
|
|
|
`]:{marginInlineStart:ut.marginXXS}},[`${Yt}-overlay-link`]:{borderRadius:ut.borderRadiusSM,height:ut.lineHeight*ut.fontSize,display:"inline-block",padding:`0 ${ut.paddingXXS}px`,marginInline:-ut.marginXXS,[`> ${vn}`]:{marginInlineStart:ut.marginXXS,fontSize:ut.fontSizeIcon},"&:hover":{color:ut.linkHoverColor,backgroundColor:ut.colorBgTextHover,a:{color:ut.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${ut.componentCls}-rtl`]:{direction:"rtl"}})}};var We=(0,lt.Z)("Breadcrumb",ut=>{const Yt=(0,Me.TS)(ut,{});return[xe(Yt)]},ut=>({itemColor:ut.colorTextDescription,lastItemColor:ut.colorText,iconFontSize:ut.fontSize,linkColor:ut.colorTextDescription,linkHoverColor:ut.colorText,separatorColor:ut.colorTextDescription,separatorMargin:ut.marginXS})),je=function(ut,Yt){var vn={};for(var un in ut)Object.prototype.hasOwnProperty.call(ut,un)&&Yt.indexOf(un)<0&&(vn[un]=ut[un]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,un=Object.getOwnPropertySymbols(ut);Ze<un.length;Ze++)Yt.indexOf(un[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ut,un[Ze])&&(vn[un[Ze]]=ut[un[Ze]]);return vn};function Et(ut){const{breadcrumbName:Yt,children:vn}=ut,un=je(ut,["breadcrumbName","children"]),Ze=Object.assign({title:Yt},un);return vn&&(Ze.menu={items:vn.map(Ae=>{var{breadcrumbName:Pt}=Ae,bn=je(Ae,["breadcrumbName"]);return Object.assign(Object.assign({},bn),{title:Pt})})}),Ze}function vt(ut,Yt){return(0,ge.useMemo)(()=>ut||(Yt?Yt.map(Et):null),[ut,Yt])}var At=function(ut,Yt){var vn={};for(var un in ut)Object.prototype.hasOwnProperty.call(ut,un)&&Yt.indexOf(un)<0&&(vn[un]=ut[un]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,un=Object.getOwnPropertySymbols(ut);Ze<un.length;Ze++)Yt.indexOf(un[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ut,un[Ze])&&(vn[un[Ze]]=ut[un[Ze]]);return vn};const Qe=(ut,Yt)=>{if(Yt===void 0)return Yt;let vn=(Yt||"").replace(/^\//,"");return Object.keys(ut).forEach(un=>{vn=vn.replace(`:${un}`,ut[un])}),vn},Bt=ut=>{const{prefixCls:Yt,separator:vn="/",style:un,className:Ze,rootClassName:Ae,routes:Pt,items:bn,children:nn,itemRender:tt,params:ot={}}=ut,Ht=At(ut,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:En,direction:fn,breadcrumb:Gt}=ge.useContext(Le.E_);let Ft;const xn=En("breadcrumb",Yt),[gn,_e]=We(xn),ce=vt(bn,Pt),se=rt(xn,tt);if(ce&&ce.length>0){const oe=[],ke=bn||Pt;Ft=ce.map((Ge,St)=>{const{path:Tt,key:Ot,type:Wt,menu:$t,overlay:Gn,onClick:ar,className:Dt,separator:tn,dropdownProps:qn}=Ge,Er=Qe(ot,Tt);Er!==void 0&&oe.push(Er);const kn=Ot!=null?Ot:St;if(Wt==="separator")return ge.createElement(at,{key:kn},tn);const gr={},Di=St===ce.length-1;$t?gr.menu=$t:Gn&&(gr.overlay=Gn);let{href:ni}=Ge;return oe.length&&Er!==void 0&&(ni=`#/${oe.join("/")}`),ge.createElement(Ee,Object.assign({key:kn},gr,(0,et.Z)(Ge,{data:!0,aria:!0}),{className:Dt,dropdownProps:qn,href:ni,separator:Di?"":vn,onClick:ar,prefixCls:xn}),se(Ge,ot,ke,oe,ni))})}else if(nn){const oe=(0,$e.Z)(nn).length;Ft=(0,$e.Z)(nn).map((ke,Ge)=>{if(!ke)return ke;const St=Ge===oe-1;return(0,Te.Tm)(ke,{separator:St?"":vn,key:Ge})})}const he=Ve()(xn,Gt==null?void 0:Gt.className,{[`${xn}-rtl`]:fn==="rtl"},Ze,Ae,_e),fe=Object.assign(Object.assign({},Gt==null?void 0:Gt.style),un);return gn(ge.createElement("nav",Object.assign({className:he,style:fe},Ht),ge.createElement("ol",null,Ft)))};Bt.Item=Kt,Bt.Separator=at;var Lt=Bt,hn=Lt},88258:function(mn,Vt,le){"use strict";var be=le(67294),Ve=le(53124),$e=le(32983);const et=ge=>{const{componentName:Te}=ge,{getPrefixCls:Le}=(0,be.useContext)(Ve.E_),Se=Le("empty");switch(Te){case"Table":case"List":return be.createElement($e.Z,{image:$e.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return be.createElement($e.Z,{image:$e.Z.PRESENTED_IMAGE_SIMPLE,className:`${Se}-small`});default:return be.createElement($e.Z,null)}};Vt.Z=et},72565:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return ai}});var be=le(94184),Ve=le.n(be),$e=le(1413),et=le(97685),ge=le(67294),Te=le(73935);function Le(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Se={};function me(bt,mt){}function Pe(bt,mt){}function at(){Se={}}function Oe(bt,mt,zt){!mt&&!Se[zt]&&(bt(!1,zt),Se[zt]=!0)}function ht(bt,mt){Oe(me,bt,mt)}function nt(bt,mt){Oe(Pe,bt,mt)}var rt=null,Je=le(71002),Ee=le(18459);function pt(bt,mt,zt){var an=ge.useRef({});return(!("value"in an.current)||zt(an.current.condition,mt))&&(an.current.value=bt(),an.current.condition=mt),an.current.value}function Kt(bt,mt){typeof bt=="function"?bt(mt):(0,Je.Z)(bt)==="object"&&bt&&"current"in bt&&(bt.current=mt)}function Ye(){for(var bt=arguments.length,mt=new Array(bt),zt=0;zt<bt;zt++)mt[zt]=arguments[zt];var an=mt.filter(function(An){return An});return an.length<=1?an[0]:function(An){mt.forEach(function(Sr){Kt(Sr,An)})}}function lt(){for(var bt=arguments.length,mt=new Array(bt),zt=0;zt<bt;zt++)mt[zt]=arguments[zt];return pt(function(){return Ye.apply(void 0,mt)},mt,function(an,An){return an.length===An.length&&an.every(function(Sr,wr){return Sr===An[wr]})})}function Me(bt){var mt,zt,an=(0,Ee.isMemo)(bt)?bt.type.type:bt.type;return!(typeof an=="function"&&!((mt=an.prototype)!==null&&mt!==void 0&&mt.render)||typeof bt=="function"&&!((zt=bt.prototype)!==null&&zt!==void 0&&zt.render))}var xe=ge.createContext(null),We=xe,je=le(74902),Et=Le()?ge.useLayoutEffect:ge.useEffect,vt=Et,At=function(mt,zt){var an=React.useRef(!0);Et(function(){if(!an.current)return mt()},zt),Et(function(){return an.current=!1,function(){an.current=!0}},[])},Qe=[];function Bt(bt,mt){var zt=ge.useState(function(){if(!Le())return null;var Wi=document.createElement("div");return Wi}),an=(0,et.Z)(zt,1),An=an[0],Sr=ge.useRef(!1),wr=ge.useContext(We),Tr=ge.useState(Qe),$r=(0,et.Z)(Tr,2),Dr=$r[0],ei=$r[1],ci=wr||(Sr.current?void 0:function(Wi){ei(function(Fi){var Ie=[Wi].concat((0,je.Z)(Fi));return Ie})});function Mi(){An.parentElement||document.body.appendChild(An),Sr.current=!0}function Gi(){var Wi;(Wi=An.parentElement)===null||Wi===void 0||Wi.removeChild(An),Sr.current=!1}return vt(function(){return bt?wr?wr(Mi):Mi():Gi(),Gi},[bt]),vt(function(){Dr.length&&(Dr.forEach(function(Wi){return Wi()}),ei(Qe))},[Dr]),[An,ci]}function Lt(bt,mt){if(!bt)return!1;if(bt.contains)return bt.contains(mt);for(var zt=mt;zt;){if(zt===bt)return!0;zt=zt.parentNode}return!1}var hn="data-rc-order",ut="rc-util-key",Yt=new Map;function vn(){var bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},mt=bt.mark;return mt?mt.startsWith("data-")?mt:"data-".concat(mt):ut}function un(bt){if(bt.attachTo)return bt.attachTo;var mt=document.querySelector("head");return mt||document.body}function Ze(bt){return bt==="queue"?"prependQueue":bt?"prepend":"append"}function Ae(bt){return Array.from((Yt.get(bt)||bt).children).filter(function(mt){return mt.tagName==="STYLE"})}function Pt(bt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Le())return null;var zt=mt.csp,an=mt.prepend,An=document.createElement("style");An.setAttribute(hn,Ze(an)),zt!=null&&zt.nonce&&(An.nonce=zt==null?void 0:zt.nonce),An.innerHTML=bt;var Sr=un(mt),wr=Sr.firstChild;if(an){if(an==="queue"){var Tr=Ae(Sr).filter(function($r){return["prepend","prependQueue"].includes($r.getAttribute(hn))});if(Tr.length)return Sr.insertBefore(An,Tr[Tr.length-1].nextSibling),An}Sr.insertBefore(An,wr)}else Sr.appendChild(An);return An}function bn(bt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},zt=un(mt);return Ae(zt).find(function(an){return an.getAttribute(vn(mt))===bt})}function nn(bt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},zt=bn(bt,mt);if(zt){var an=un(mt);an.removeChild(zt)}}function tt(bt,mt){var zt=Yt.get(bt);if(!zt||!Lt(document,zt)){var an=Pt("",mt),An=an.parentNode;Yt.set(bt,An),bt.removeChild(an)}}function ot(){Yt.clear()}function Ht(bt,mt){var zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},an=un(zt);tt(an,zt);var An=bn(mt,zt);if(An){var Sr,wr;if((Sr=zt.csp)!==null&&Sr!==void 0&&Sr.nonce&&An.nonce!==((wr=zt.csp)===null||wr===void 0?void 0:wr.nonce)){var Tr;An.nonce=(Tr=zt.csp)===null||Tr===void 0?void 0:Tr.nonce}return An.innerHTML!==bt&&(An.innerHTML=bt),An}var $r=Pt(bt,zt);return $r.setAttribute(vn(zt),mt),$r}var En;function fn(bt){if(typeof document=="undefined")return 0;if(bt||En===void 0){var mt=document.createElement("div");mt.style.width="100%",mt.style.height="200px";var zt=document.createElement("div"),an=zt.style;an.position="absolute",an.top="0",an.left="0",an.pointerEvents="none",an.visibility="hidden",an.width="200px",an.height="150px",an.overflow="hidden",zt.appendChild(mt),document.body.appendChild(zt);var An=mt.offsetWidth;zt.style.overflow="scroll";var Sr=mt.offsetWidth;An===Sr&&(Sr=zt.clientWidth),document.body.removeChild(zt),En=An-Sr}return En}function Gt(bt){var mt=bt.match(/^(.*)px$/),zt=Number(mt==null?void 0:mt[1]);return Number.isNaN(zt)?fn():zt}function Ft(bt){if(typeof document=="undefined"||!bt||!(bt instanceof Element))return{width:0,height:0};var mt=getComputedStyle(bt,"::-webkit-scrollbar"),zt=mt.width,an=mt.height;return{width:Gt(zt),height:Gt(an)}}function xn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var gn="rc-util-locker-".concat(Date.now()),_e=0;function ce(bt){var mt=!!bt,zt=ge.useState(function(){return _e+=1,"".concat(gn,"_").concat(_e)}),an=(0,et.Z)(zt,1),An=an[0];vt(function(){if(mt){var Sr=Ft(document.body).width,wr=xn();Ht(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(wr?"width: calc(100% - ".concat(Sr,"px);"):"",`
|
|
|
}`),An)}else nn(An);return function(){nn(An)}},[mt,An])}var se=!1;function he(bt){return typeof bt=="boolean"&&(se=bt),se}var fe=function(mt){return mt===!1?!1:!Le()||!mt?null:typeof mt=="string"?document.querySelector(mt):typeof mt=="function"?mt():mt},oe=ge.forwardRef(function(bt,mt){var zt=bt.open,an=bt.autoLock,An=bt.getContainer,Sr=bt.debug,wr=bt.autoDestroy,Tr=wr===void 0?!0:wr,$r=bt.children,Dr=ge.useState(zt),ei=(0,et.Z)(Dr,2),ci=ei[0],Mi=ei[1],Gi=ci||zt;ge.useEffect(function(){(Tr||zt)&&Mi(zt)},[zt,Tr]);var Wi=ge.useState(function(){return fe(An)}),Fi=(0,et.Z)(Wi,2),Ie=Fi[0],Fe=Fi[1];ge.useEffect(function(){var on=fe(An);Fe(on!=null?on:null)});var Ne=Bt(Gi&&!Ie,Sr),Ue=(0,et.Z)(Ne,2),it=Ue[0],ft=Ue[1],xt=Ie!=null?Ie:it;ce(an&&zt&&Le()&&(xt===it||xt===document.body));var Xt=null;if($r&&Me($r)&&mt){var Qt=$r;Xt=Qt.ref}var zn=lt(Xt,mt);if(!Gi||!Le()||Ie===void 0)return null;var nr=xt===!1||he(),Rn=$r;return mt&&(Rn=ge.cloneElement($r,{ref:zn})),ge.createElement(We.Provider,{value:ft},nr?Rn:(0,Te.createPortal)(Rn,xt))}),ke=oe,Ge=ke;function St(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Tt=St()?ge.useLayoutEffect:ge.useEffect,Ot=function(mt,zt){var an=ge.useRef(!0);Tt(function(){return mt(an.current)},zt),Tt(function(){return an.current=!1,function(){an.current=!0}},[])},Wt=function(mt,zt){Ot(function(an){if(!an)return mt()},zt)},$t=Ot,Gn=ge.createContext(null),ar=ge.createContext({}),Dt=Gn,tn=le(4942),qn=le(87462),Er=le(62874),kn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(mt){var zt=mt.keyCode;if(mt.altKey&&!mt.ctrlKey||mt.metaKey||zt>=kn.F1&&zt<=kn.F12)return!1;switch(zt){case kn.ALT:case kn.CAPS_LOCK:case kn.CONTEXT_MENU:case kn.CTRL:case kn.DOWN:case kn.END:case kn.ESC:case kn.HOME:case kn.INSERT:case kn.LEFT:case kn.MAC_FF_META:case kn.META:case kn.NUMLOCK:case kn.NUM_CENTER:case kn.PAGE_DOWN:case kn.PAGE_UP:case kn.PAUSE:case kn.PRINT_SCREEN:case kn.RIGHT:case kn.SHIFT:case kn.UP:case kn.WIN_KEY:case kn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(mt){if(mt>=kn.ZERO&&mt<=kn.NINE||mt>=kn.NUM_ZERO&&mt<=kn.NUM_MULTIPLY||mt>=kn.A&&mt<=kn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&mt===0)return!0;switch(mt){case kn.SPACE:case kn.QUESTION_MARK:case kn.NUM_PLUS:case kn.NUM_MINUS:case kn.NUM_PERIOD:case kn.NUM_DIVISION:case kn.SEMICOLON:case kn.DASH:case kn.EQUALS:case kn.COMMA:case kn.PERIOD:case kn.SLASH:case kn.APOSTROPHE:case kn.SINGLE_QUOTE:case kn.OPEN_SQUARE_BRACKET:case kn.BACKSLASH:case kn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},gr=kn,Di=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,ni=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Xr="".concat(Di," ").concat(ni).split(/[\s\n]+/),Vr="aria-",Si="data-";function hi(bt,mt){return bt.indexOf(mt)===0}function Ti(bt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zt;mt===!1?zt={aria:!0,data:!0,attr:!0}:mt===!0?zt={aria:!0}:zt=(0,$e.Z)({},mt);var an={};return Object.keys(bt).forEach(function(An){(zt.aria&&(An==="role"||hi(An,Vr))||zt.data&&hi(An,Si)||zt.attr&&Xr.includes(An))&&(an[An]=bt[An])}),an}function Ii(bt){var mt=React.useRef();mt.current=bt;var zt=React.useCallback(function(){for(var an,An=arguments.length,Sr=new Array(An),wr=0;wr<An;wr++)Sr[wr]=arguments[wr];return(an=mt.current)===null||an===void 0?void 0:an.call.apply(an,[mt].concat(Sr))},[]);return zt}function Lr(bt){var mt=React.useRef(!1),zt=React.useState(bt),an=_slicedToArray(zt,2),An=an[0],Sr=an[1];React.useEffect(function(){return mt.current=!1,function(){mt.current=!0}},[]);function wr(Tr,$r){$r&&mt.current||Sr(Tr)}return[An,wr]}function Xi(bt){return bt!==void 0}function la(bt,mt){var zt=mt||{},an=zt.defaultValue,An=zt.value,Sr=zt.onChange,wr=zt.postState,Tr=useState(function(){return Xi(An)?An:Xi(an)?typeof an=="function"?an():an:typeof bt=="function"?bt():bt}),$r=_slicedToArray(Tr,2),Dr=$r[0],ei=$r[1],ci=An!==void 0?An:Dr,Mi=wr?wr(ci):ci,Gi=useEvent(Sr),Wi=useState([ci]),Fi=_slicedToArray(Wi,2),Ie=Fi[0],Fe=Fi[1];useLayoutUpdateEffect(function(){var Ue=Ie[0];Dr!==Ue&&Gi(Dr,Ue)},[Ie]),useLayoutUpdateEffect(function(){Xi(An)||ei(An)},[An]);var Ne=useEvent(function(Ue,it){ei(Ue,it),Fe([ci],it)});return[Mi,Ne]}var va=le(33993);function ya(bt,mt,zt){var an=ge.useRef({});return(!("value"in an.current)||zt(an.current.condition,mt))&&(an.current.value=bt(),an.current.condition=mt),an.current.value}function $i(bt,mt){typeof bt=="function"?bt(mt):(0,Je.Z)(bt)==="object"&&bt&&"current"in bt&&(bt.current=mt)}function Mt(){for(var bt=arguments.length,mt=new Array(bt),zt=0;zt<bt;zt++)mt[zt]=arguments[zt];var an=mt.filter(function(An){return An});return an.length<=1?an[0]:function(An){mt.forEach(function(Sr){$i(Sr,An)})}}function Cn(){for(var bt=arguments.length,mt=new Array(bt),zt=0;zt<bt;zt++)mt[zt]=arguments[zt];return ya(function(){return Mt.apply(void 0,mt)},mt,function(an,An){return an.length!==An.length||an.every(function(Sr,wr){return Sr!==An[wr]})})}function _n(bt){var mt,zt,an=isMemo(bt)?bt.type.type:bt.type;return!(typeof an=="function"&&!((mt=an.prototype)!==null&&mt!==void 0&&mt.render)||typeof bt=="function"&&!((zt=bt.prototype)!==null&&zt!==void 0&&zt.render))}function In(bt){return!isValidElement(bt)||isFragment(bt)?!1:_n(bt)}function mr(bt,mt,zt,an){if(!mt.length)return zt;var An=_toArray(mt),Sr=An[0],wr=An.slice(1),Tr;return!bt&&typeof Sr=="number"?Tr=[]:Array.isArray(bt)?Tr=_toConsumableArray(bt):Tr=_objectSpread({},bt),an&&zt===void 0&&wr.length===1?delete Tr[Sr][wr[0]]:Tr[Sr]=mr(Tr[Sr],wr,zt,an),Tr}function Xn(bt,mt,zt){var an=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return mt.length&&an&&zt===void 0&&!get(bt,mt.slice(0,-1))?bt:mr(bt,mt,zt,an)}function sr(bt){return _typeof(bt)==="object"&&bt!==null&&Object.getPrototypeOf(bt)===Object.prototype}function On(bt){return Array.isArray(bt)?[]:{}}var qe=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function st(){for(var bt=arguments.length,mt=new Array(bt),zt=0;zt<bt;zt++)mt[zt]=arguments[zt];var an=On(mt[0]);return mt.forEach(function(An){function Sr(wr,Tr){var $r=new Set(Tr),Dr=get(An,wr),ei=Array.isArray(Dr);if(ei||sr(Dr)){if(!$r.has(Dr)){$r.add(Dr);var ci=get(an,wr);ei?an=Xn(an,wr,[]):(!ci||_typeof(ci)!=="object")&&(an=Xn(an,wr,On(Dr))),qe(Dr).forEach(function(Mi){Sr([].concat(_toConsumableArray(wr),[Mi]),$r)})}}else an=Xn(an,wr,Dr)}Sr([])}),an}var _t={},Nt=[],He=function(mt){Nt.push(mt)};function gt(bt,mt){if(0)var zt}function Rt(bt,mt){if(0)var zt}function It(){_t={}}function Zt(bt,mt,zt){!mt&&!_t[zt]&&(bt(!1,zt),_t[zt]=!0)}function Ut(bt,mt){Zt(gt,bt,mt)}function Nn(bt,mt){Zt(Rt,bt,mt)}Ut.preMessage=He,Ut.resetWarned=It,Ut.noteOnce=Nn;var hr=Ut,Vn=function(mt){var zt=mt.prefixCls,an=mt.className,An=mt.style,Sr=mt.children,wr=mt.containerRef,Tr=mt.id,$r=mt.onMouseEnter,Dr=mt.onMouseOver,ei=mt.onMouseLeave,ci=mt.onClick,Mi=mt.onKeyDown,Gi=mt.onKeyUp,Wi={onMouseEnter:$r,onMouseOver:Dr,onMouseLeave:ei,onClick:ci,onKeyDown:Mi,onKeyUp:Gi},Fi=ge.useContext(ar),Ie=Fi.panel,Fe=Cn(Ie,wr);return ge.createElement(ge.Fragment,null,ge.createElement("div",(0,qn.Z)({id:Tr,className:Ve()("".concat(zt,"-content"),an),style:(0,$e.Z)({},An),"aria-modal":"true",role:"dialog",ref:Fe},Wi),Sr))},jn=Vn;function Qn(bt){return typeof bt=="string"&&String(Number(bt))===bt?(hr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(bt)):bt}function tr(bt){warning(!("wrapperClassName"in bt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!bt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ar={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function cn(bt,mt){var zt,an,An,Sr,wr=bt.prefixCls,Tr=bt.open,$r=bt.placement,Dr=bt.inline,ei=bt.push,ci=bt.forceRender,Mi=bt.autoFocus,Gi=bt.keyboard,Wi=bt.rootClassName,Fi=bt.rootStyle,Ie=bt.zIndex,Fe=bt.className,Ne=bt.id,Ue=bt.style,it=bt.motion,ft=bt.width,xt=bt.height,Xt=bt.children,Qt=bt.contentWrapperStyle,zn=bt.mask,nr=bt.maskClosable,Rn=bt.maskMotion,on=bt.maskClassName,rn=bt.maskStyle,yn=bt.afterOpenChange,Mn=bt.onClose,er=bt.onMouseEnter,Hn=bt.onMouseOver,$n=bt.onMouseLeave,Un=bt.onClick,Wn=bt.onKeyDown,ir=bt.onKeyUp,ze=ge.useRef(),Ke=ge.useRef(),kt=ge.useRef();ge.useImperativeHandle(mt,function(){return ze.current});var yt=function(Cr){var Br=Cr.keyCode,Kr=Cr.shiftKey;switch(Br){case gr.TAB:{if(Br===gr.TAB){if(!Kr&&document.activeElement===kt.current){var xr;(xr=Ke.current)===null||xr===void 0||xr.focus({preventScroll:!0})}else if(Kr&&document.activeElement===Ke.current){var Ur;(Ur=kt.current)===null||Ur===void 0||Ur.focus({preventScroll:!0})}}break}case gr.ESC:{Mn&&Gi&&(Cr.stopPropagation(),Mn(Cr));break}}};ge.useEffect(function(){if(Tr&&Mi){var lr;(lr=ze.current)===null||lr===void 0||lr.focus({preventScroll:!0})}},[Tr]);var qt=ge.useState(!1),dn=(0,et.Z)(qt,2),sn=dn[0],Dn=dn[1],Sn=ge.useContext(Dt),Jt;ei===!1?Jt={distance:0}:ei===!0?Jt={}:Jt=ei||{};var Ln=(zt=(an=(An=Jt)===null||An===void 0?void 0:An.distance)!==null&&an!==void 0?an:Sn==null?void 0:Sn.pushDistance)!==null&&zt!==void 0?zt:180,Pn=ge.useMemo(function(){return{pushDistance:Ln,push:function(){Dn(!0)},pull:function(){Dn(!1)}}},[Ln]);ge.useEffect(function(){if(Tr){var lr;Sn==null||(lr=Sn.push)===null||lr===void 0||lr.call(Sn)}else{var Cr;Sn==null||(Cr=Sn.pull)===null||Cr===void 0||Cr.call(Sn)}},[Tr]),ge.useEffect(function(){return function(){var lr;Sn==null||(lr=Sn.pull)===null||lr===void 0||lr.call(Sn)}},[]);var rr=zn&&ge.createElement(Er.Z,(0,qn.Z)({key:"mask"},Rn,{visible:Tr}),function(lr,Cr){var Br=lr.className,Kr=lr.style;return ge.createElement("div",{className:Ve()("".concat(wr,"-mask"),Br,on),style:(0,$e.Z)((0,$e.Z)({},Kr),rn),onClick:nr&&Tr?Mn:void 0,ref:Cr})}),Tn=typeof it=="function"?it($r):it,pr={};if(sn&&Ln)switch($r){case"top":pr.transform="translateY(".concat(Ln,"px)");break;case"bottom":pr.transform="translateY(".concat(-Ln,"px)");break;case"left":pr.transform="translateX(".concat(Ln,"px)");break;default:pr.transform="translateX(".concat(-Ln,"px)");break}$r==="left"||$r==="right"?pr.width=Qn(ft):pr.height=Qn(xt);var Pr={onMouseEnter:er,onMouseOver:Hn,onMouseLeave:$n,onClick:Un,onKeyDown:Wn,onKeyUp:ir},br=ge.createElement(Er.Z,(0,qn.Z)({key:"panel"},Tn,{visible:Tr,forceRender:ci,onVisibleChanged:function(Cr){yn==null||yn(Cr)},removeOnLeave:!1,leavedClassName:"".concat(wr,"-content-wrapper-hidden")}),function(lr,Cr){var Br=lr.className,Kr=lr.style;return ge.createElement("div",(0,qn.Z)({className:Ve()("".concat(wr,"-content-wrapper"),Br),style:(0,$e.Z)((0,$e.Z)((0,$e.Z)({},pr),Kr),Qt)},Ti(bt,{data:!0})),ge.createElement(jn,(0,qn.Z)({id:Ne,containerRef:Cr,prefixCls:wr,className:Fe,style:Ue},Pr),Xt))}),_r=(0,$e.Z)({},Fi);return Ie&&(_r.zIndex=Ie),ge.createElement(Dt.Provider,{value:Pn},ge.createElement("div",{className:Ve()(wr,"".concat(wr,"-").concat($r),Wi,(Sr={},(0,tn.Z)(Sr,"".concat(wr,"-open"),Tr),(0,tn.Z)(Sr,"".concat(wr,"-inline"),Dr),Sr)),style:_r,tabIndex:-1,ref:ze,onKeyDown:yt},rr,ge.createElement("div",{tabIndex:0,ref:Ke,style:Ar,"aria-hidden":"true","data-sentinel":"start"}),br,ge.createElement("div",{tabIndex:0,ref:kt,style:Ar,"aria-hidden":"true","data-sentinel":"end"})))}var Kn=ge.forwardRef(cn),pi=Kn,xi=function(mt){var zt=mt.open,an=zt===void 0?!1:zt,An=mt.prefixCls,Sr=An===void 0?"rc-drawer":An,wr=mt.placement,Tr=wr===void 0?"right":wr,$r=mt.autoFocus,Dr=$r===void 0?!0:$r,ei=mt.keyboard,ci=ei===void 0?!0:ei,Mi=mt.width,Gi=Mi===void 0?378:Mi,Wi=mt.mask,Fi=Wi===void 0?!0:Wi,Ie=mt.maskClosable,Fe=Ie===void 0?!0:Ie,Ne=mt.getContainer,Ue=mt.forceRender,it=mt.afterOpenChange,ft=mt.destroyOnClose,xt=mt.onMouseEnter,Xt=mt.onMouseOver,Qt=mt.onMouseLeave,zn=mt.onClick,nr=mt.onKeyDown,Rn=mt.onKeyUp,on=mt.panelRef,rn=ge.useState(!1),yn=(0,et.Z)(rn,2),Mn=yn[0],er=yn[1],Hn=ge.useState(!1),$n=(0,et.Z)(Hn,2),Un=$n[0],Wn=$n[1];$t(function(){Wn(!0)},[]);var ir=Un?an:!1,ze=ge.useRef(),Ke=ge.useRef();$t(function(){ir&&(Ke.current=document.activeElement)},[ir]);var kt=function(Dn){var Sn;if(er(Dn),it==null||it(Dn),!Dn&&Ke.current&&!((Sn=ze.current)!==null&&Sn!==void 0&&Sn.contains(Ke.current))){var Jt;(Jt=Ke.current)===null||Jt===void 0||Jt.focus({preventScroll:!0})}},yt=ge.useMemo(function(){return{panel:on}},[on]);if(!Ue&&!Mn&&!ir&&ft)return null;var qt={onMouseEnter:xt,onMouseOver:Xt,onMouseLeave:Qt,onClick:zn,onKeyDown:nr,onKeyUp:Rn},dn=(0,$e.Z)((0,$e.Z)({},mt),{},{open:ir,prefixCls:Sr,placement:Tr,autoFocus:Dr,keyboard:ci,width:Gi,mask:Fi,maskClosable:Fe,inline:Ne===!1,afterOpenChange:kt,ref:ze},qt);return ge.createElement(ar.Provider,{value:yt},ge.createElement(Ge,{open:ir||Ue||Mn,autoDestroy:!1,getContainer:Ne,autoLock:Fi&&(ir||Mn)},ge.createElement(pi,dn)))},Zr=xi,Rr=Zr,_i=le(33603),cr=le(53124),ui=le(65223),wn=le(69760),ki=bt=>{const{prefixCls:mt,title:zt,footer:an,extra:An,closeIcon:Sr,closable:wr,onClose:Tr,headerStyle:$r,drawerStyle:Dr,bodyStyle:ei,footerStyle:ci,children:Mi}=bt,Gi=ge.useCallback(Ne=>ge.createElement("button",{type:"button",onClick:Tr,"aria-label":"Close",className:`${mt}-close`},Ne),[Tr]),[Wi,Fi]=(0,wn.Z)(wr,Sr,Gi,void 0,!0),Ie=ge.useMemo(()=>!zt&&!Wi?null:ge.createElement("div",{style:$r,className:Ve()(`${mt}-header`,{[`${mt}-header-close-only`]:Wi&&!zt&&!An})},ge.createElement("div",{className:`${mt}-header-title`},Fi,zt&&ge.createElement("div",{className:`${mt}-title`},zt)),An&&ge.createElement("div",{className:`${mt}-extra`},An)),[Wi,Fi,An,$r,mt,zt]),Fe=ge.useMemo(()=>{if(!an)return null;const Ne=`${mt}-footer`;return ge.createElement("div",{className:Ne,style:ci},an)},[an,ci,mt]);return ge.createElement("div",{className:`${mt}-wrapper-body`,style:Dr},Ie,ge.createElement("div",{className:`${mt}-body`,style:ei},Mi),Fe)},wa=le(4173),qi=le(67968),Pi=le(45503),ji=bt=>{const{componentCls:mt,motionDurationSlow:zt}=bt,an={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${zt}`}}};return{[mt]:{[`${mt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${zt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${mt}-panel-motion`]:{"&-left":[an,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[an,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[an,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[an,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Ci=bt=>{const{componentCls:mt,zIndexPopup:zt,colorBgMask:an,colorBgElevated:An,motionDurationSlow:Sr,motionDurationMid:wr,padding:Tr,paddingLG:$r,fontSizeLG:Dr,lineHeightLG:ei,lineWidth:ci,lineType:Mi,colorSplit:Gi,marginSM:Wi,colorIcon:Fi,colorIconHover:Ie,colorText:Fe,fontWeightStrong:Ne,footerPaddingBlock:Ue,footerPaddingInline:it}=bt,ft=`${mt}-content-wrapper`;return{[mt]:{position:"fixed",inset:0,zIndex:zt,pointerEvents:"none","&-pure":{position:"relative",background:An,[`&${mt}-left`]:{boxShadow:bt.boxShadowDrawerLeft},[`&${mt}-right`]:{boxShadow:bt.boxShadowDrawerRight},[`&${mt}-top`]:{boxShadow:bt.boxShadowDrawerUp},[`&${mt}-bottom`]:{boxShadow:bt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${mt}-mask`]:{position:"absolute",inset:0,zIndex:zt,background:an,pointerEvents:"auto"},[ft]:{position:"absolute",zIndex:zt,maxWidth:"100vw",transition:`all ${Sr}`,"&-hidden":{display:"none"}},[`&-left > ${ft}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:bt.boxShadowDrawerLeft},[`&-right > ${ft}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:bt.boxShadowDrawerRight},[`&-top > ${ft}`]:{top:0,insetInline:0,boxShadow:bt.boxShadowDrawerUp},[`&-bottom > ${ft}`]:{bottom:0,insetInline:0,boxShadow:bt.boxShadowDrawerDown},[`${mt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:An,pointerEvents:"auto"},[`${mt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${mt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Tr}px ${$r}px`,fontSize:Dr,lineHeight:ei,borderBottom:`${ci}px ${Mi} ${Gi}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${mt}-extra`]:{flex:"none"},[`${mt}-close`]:{display:"inline-block",marginInlineEnd:Wi,color:Fi,fontWeight:Ne,fontSize:Dr,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${wr}`,textRendering:"auto","&:focus, &:hover":{color:Ie,textDecoration:"none"}},[`${mt}-title`]:{flex:1,margin:0,color:Fe,fontWeight:bt.fontWeightStrong,fontSize:Dr,lineHeight:ei},[`${mt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:$r,overflow:"auto"},[`${mt}-footer`]:{flexShrink:0,padding:`${Ue}px ${it}px`,borderTop:`${ci}px ${Mi} ${Gi}`},"&-rtl":{direction:"rtl"}}}};var ta=(0,qi.Z)("Drawer",bt=>{const mt=(0,Pi.TS)(bt,{});return[Ci(mt),ji(mt)]},bt=>({zIndexPopup:bt.zIndexPopupBase,footerPaddingBlock:bt.paddingXS,footerPaddingInline:bt.padding})),_a=le(16569),na=function(bt,mt){var zt={};for(var an in bt)Object.prototype.hasOwnProperty.call(bt,an)&&mt.indexOf(an)<0&&(zt[an]=bt[an]);if(bt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var An=0,an=Object.getOwnPropertySymbols(bt);An<an.length;An++)mt.indexOf(an[An])<0&&Object.prototype.propertyIsEnumerable.call(bt,an[An])&&(zt[an[An]]=bt[an[An]]);return zt};const Ni=null,ka={distance:180},Pa=bt=>{var mt;const{rootClassName:zt,width:an,height:An,size:Sr="default",mask:wr=!0,push:Tr=ka,open:$r,afterOpenChange:Dr,onClose:ei,prefixCls:ci,getContainer:Mi,style:Gi,className:Wi,visible:Fi,afterVisibleChange:Ie}=bt,Fe=na(bt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Ne,getPrefixCls:Ue,direction:it,drawer:ft}=ge.useContext(cr.E_),xt=Ue("drawer",ci),[Xt,Qt]=ta(xt),zn=Mi===void 0&&Ne?()=>Ne(document.body):Mi,nr=Ve()({"no-mask":!wr,[`${xt}-rtl`]:it==="rtl"},zt,Qt),Rn=ge.useMemo(()=>an!=null?an:Sr==="large"?736:378,[an,Sr]),on=ge.useMemo(()=>An!=null?An:Sr==="large"?736:378,[An,Sr]),rn={motionName:(0,_i.m)(xt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},yn=er=>({motionName:(0,_i.m)(xt,`panel-motion-${er}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Mn=(0,_a.H)();return Xt(ge.createElement(wa.BR,null,ge.createElement(ui.Ux,{status:!0,override:!0},ge.createElement(Rr,Object.assign({prefixCls:xt,onClose:ei,maskMotion:rn,motion:yn},Fe,{open:$r!=null?$r:Fi,mask:wr,push:Tr,width:Rn,height:on,style:Object.assign(Object.assign({},ft==null?void 0:ft.style),Gi),className:Ve()(ft==null?void 0:ft.className,Wi),rootClassName:nr,getContainer:zn,afterOpenChange:Dr!=null?Dr:Ie,panelRef:Mn}),ge.createElement(ki,Object.assign({prefixCls:xt},Fe,{onClose:ei}))))))},ha=bt=>{const{prefixCls:mt,style:zt,className:an,placement:An="right"}=bt,Sr=na(bt,["prefixCls","style","className","placement"]),{getPrefixCls:wr}=ge.useContext(cr.E_),Tr=wr("drawer",mt),[$r,Dr]=ta(Tr),ei=Ve()(Tr,`${Tr}-pure`,`${Tr}-${An}`,Dr,an);return $r(ge.createElement("div",{className:ei,style:zt},ge.createElement(ki,Object.assign({prefixCls:Tr},Sr))))};Pa._InternalPanelDoNotUseOrYouWillBeFired=ha;var ai=Pa},35874:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return fe}});var be=le(67294),Ve=le(91034),$e=le(94184),et=le.n($e),ge=le(87462),Te=le(4942),Le=le(97685),Se=le(45987),me=le(62709),Pe=le(71002),at=le(12060);function Oe(oe,ke,Ge){var St=React.useRef({});return(!("value"in St.current)||Ge(St.current.condition,ke))&&(St.current.value=oe(),St.current.condition=ke),St.current.value}function ht(oe,ke){typeof oe=="function"?oe(ke):(0,Pe.Z)(oe)==="object"&&oe&&"current"in oe&&(oe.current=ke)}function nt(){for(var oe=arguments.length,ke=new Array(oe),Ge=0;Ge<oe;Ge++)ke[Ge]=arguments[Ge];var St=ke.filter(function(Tt){return Tt});return St.length<=1?St[0]:function(Tt){ke.forEach(function(Ot){ht(Ot,Tt)})}}function rt(){for(var oe=arguments.length,ke=new Array(oe),Ge=0;Ge<oe;Ge++)ke[Ge]=arguments[Ge];return useMemo(function(){return nt.apply(void 0,ke)},ke,function(St,Tt){return St.length===Tt.length&&St.every(function(Ot,Wt){return Ot===Tt[Wt]})})}function Je(oe){var ke,Ge,St=(0,at.isMemo)(oe)?oe.type.type:oe.type;return!(typeof St=="function"&&!((ke=St.prototype)!==null&&ke!==void 0&&ke.render)||typeof oe=="function"&&!((Ge=oe.prototype)!==null&&Ge!==void 0&&Ge.render))}var Ee={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ke){var Ge=ke.keyCode;if(ke.altKey&&!ke.ctrlKey||ke.metaKey||Ge>=Ee.F1&&Ge<=Ee.F12)return!1;switch(Ge){case Ee.ALT:case Ee.CAPS_LOCK:case Ee.CONTEXT_MENU:case Ee.CTRL:case Ee.DOWN:case Ee.END:case Ee.ESC:case Ee.HOME:case Ee.INSERT:case Ee.LEFT:case Ee.MAC_FF_META:case Ee.META:case Ee.NUMLOCK:case Ee.NUM_CENTER:case Ee.PAGE_DOWN:case Ee.PAGE_UP:case Ee.PAUSE:case Ee.PRINT_SCREEN:case Ee.RIGHT:case Ee.SHIFT:case Ee.UP:case Ee.WIN_KEY:case Ee.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ke){if(ke>=Ee.ZERO&&ke<=Ee.NINE||ke>=Ee.NUM_ZERO&&ke<=Ee.NUM_MULTIPLY||ke>=Ee.A&&ke<=Ee.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ke===0)return!0;switch(ke){case Ee.SPACE:case Ee.QUESTION_MARK:case Ee.NUM_PLUS:case Ee.NUM_MINUS:case Ee.NUM_PERIOD:case Ee.NUM_DIVISION:case Ee.SEMICOLON:case Ee.DASH:case Ee.EQUALS:case Ee.COMMA:case Ee.PERIOD:case Ee.SLASH:case Ee.APOSTROPHE:case Ee.SINGLE_QUOTE:case Ee.OPEN_SQUARE_BRACKET:case Ee.BACKSLASH:case Ee.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},pt=Ee,Kt=function(ke){return+setTimeout(ke,16)},Ye=function(ke){return clearTimeout(ke)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Kt=function(ke){return window.requestAnimationFrame(ke)},Ye=function(ke){return window.cancelAnimationFrame(ke)});var lt=0,Me=new Map;function xe(oe){Me.delete(oe)}var We=function(ke){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;lt+=1;var St=lt;function Tt(Ot){if(Ot===0)xe(St),ke();else{var Wt=Kt(function(){Tt(Ot-1)});Me.set(St,Wt)}}return Tt(Ge),St};We.cancel=function(oe){var ke=Me.get(oe);return xe(ke),Ye(ke)};var je=We,Et=pt.ESC,vt=pt.TAB;function At(oe){var ke=oe.visible,Ge=oe.triggerRef,St=oe.onVisibleChange,Tt=oe.autoFocus,Ot=oe.overlayRef,Wt=be.useRef(!1),$t=function(){if(ke){var tn,qn;(tn=Ge.current)===null||tn===void 0||(qn=tn.focus)===null||qn===void 0||qn.call(tn),St==null||St(!1)}},Gn=function(){var tn;return(tn=Ot.current)!==null&&tn!==void 0&&tn.focus?(Ot.current.focus(),Wt.current=!0,!0):!1},ar=function(tn){switch(tn.keyCode){case Et:$t();break;case vt:{var qn=!1;Wt.current||(qn=Gn()),qn?tn.preventDefault():$t();break}}};be.useEffect(function(){return ke?(window.addEventListener("keydown",ar),Tt&&je(Gn,3),function(){window.removeEventListener("keydown",ar),Wt.current=!1}):function(){Wt.current=!1}},[ke])}var Qe=(0,be.forwardRef)(function(oe,ke){var Ge=oe.overlay,St=oe.arrow,Tt=oe.prefixCls,Ot=(0,be.useMemo)(function(){var $t;return typeof Ge=="function"?$t=Ge():$t=Ge,$t},[Ge]),Wt=nt(ke,Ot==null?void 0:Ot.ref);return be.createElement(be.Fragment,null,St&&be.createElement("div",{className:"".concat(Tt,"-arrow")}),be.cloneElement(Ot,{ref:Je(Ot)?Wt:void 0}))}),Bt=Qe,Lt={adjustX:1,adjustY:1},hn=[0,0],ut={topLeft:{points:["bl","tl"],overflow:Lt,offset:[0,-4],targetOffset:hn},top:{points:["bc","tc"],overflow:Lt,offset:[0,-4],targetOffset:hn},topRight:{points:["br","tr"],overflow:Lt,offset:[0,-4],targetOffset:hn},bottomLeft:{points:["tl","bl"],overflow:Lt,offset:[0,4],targetOffset:hn},bottom:{points:["tc","bc"],overflow:Lt,offset:[0,4],targetOffset:hn},bottomRight:{points:["tr","br"],overflow:Lt,offset:[0,4],targetOffset:hn}},Yt=ut,vn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function un(oe,ke){var Ge,St=oe.arrow,Tt=St===void 0?!1:St,Ot=oe.prefixCls,Wt=Ot===void 0?"rc-dropdown":Ot,$t=oe.transitionName,Gn=oe.animation,ar=oe.align,Dt=oe.placement,tn=Dt===void 0?"bottomLeft":Dt,qn=oe.placements,Er=qn===void 0?Yt:qn,kn=oe.getPopupContainer,gr=oe.showAction,Di=oe.hideAction,ni=oe.overlayClassName,Xr=oe.overlayStyle,Vr=oe.visible,Si=oe.trigger,hi=Si===void 0?["hover"]:Si,Ti=oe.autoFocus,Ii=oe.overlay,Lr=oe.children,Xi=oe.onVisibleChange,la=(0,Se.Z)(oe,vn),va=be.useState(),ya=(0,Le.Z)(va,2),$i=ya[0],Mt=ya[1],Cn="visible"in oe?Vr:$i,_n=be.useRef(null),In=be.useRef(null),mr=be.useRef(null);be.useImperativeHandle(ke,function(){return _n.current});var Xn=function(Rt){Mt(Rt),Xi==null||Xi(Rt)};At({visible:Cn,triggerRef:mr,onVisibleChange:Xn,autoFocus:Ti,overlayRef:In});var sr=function(Rt){var It=oe.onOverlayClick;Mt(!1),It&&It(Rt)},On=function(){return be.createElement(Bt,{ref:In,overlay:Ii,prefixCls:Wt,arrow:Tt})},qe=function(){return typeof Ii=="function"?On:On()},st=function(){var Rt=oe.minOverlayWidthMatchTrigger,It=oe.alignPoint;return"minOverlayWidthMatchTrigger"in oe?Rt:!It},_t=function(){var Rt=oe.openClassName;return Rt!==void 0?Rt:"".concat(Wt,"-open")},Nt=be.cloneElement(Lr,{className:et()((Ge=Lr.props)===null||Ge===void 0?void 0:Ge.className,Cn&&_t()),ref:Je(Lr)?nt(mr,Lr.ref):void 0}),He=Di;return!He&&hi.indexOf("contextMenu")!==-1&&(He=["click"]),be.createElement(me.Z,(0,ge.Z)({builtinPlacements:Er},la,{prefixCls:Wt,ref:_n,popupClassName:et()(ni,(0,Te.Z)({},"".concat(Wt,"-show-arrow"),Tt)),popupStyle:Xr,action:hi,showAction:gr,hideAction:He,popupPlacement:tn,popupAlign:ar,popupTransitionName:$t,popupAnimation:Gn,popupVisible:Cn,stretch:st()?"minWidth":"",popup:qe(),onPopupVisibleChange:Xn,onPopupClick:sr,getPopupContainer:kn}),Nt)}var Ze=be.forwardRef(un),Ae=Ze,Pt=le(60276),bn=le(5663),nn=le(10366),tt=le(80636),ot=le(8745),Ht=le(96159),En=le(53124),fn=le(68508),Gt=le(76529),Ft=le(46605),xn=le(66748);const gn=null,_e=oe=>{const{menu:ke,arrow:Ge,prefixCls:St,children:Tt,trigger:Ot,disabled:Wt,dropdownRender:$t,getPopupContainer:Gn,overlayClassName:ar,rootClassName:Dt,open:tn,onOpenChange:qn,visible:Er,onVisibleChange:kn,mouseEnterDelay:gr=.15,mouseLeaveDelay:Di=.1,autoAdjustOverflow:ni=!0,placement:Xr="",overlay:Vr,transitionName:Si}=oe,{getPopupContainer:hi,getPrefixCls:Ti,direction:Ii}=be.useContext(En.E_),Lr=be.useMemo(()=>{const Nt=Ti();return Si!==void 0?Si:Xr.includes("top")?`${Nt}-slide-down`:`${Nt}-slide-up`},[Ti,Xr,Si]),Xi=be.useMemo(()=>Xr?Xr.includes("Center")?Xr.slice(0,Xr.indexOf("Center")):Xr:Ii==="rtl"?"bottomRight":"bottomLeft",[Xr,Ii]),la=Ti("dropdown",St),[va,ya]=(0,xn.Z)(la),[,$i]=(0,Ft.Z)(),Mt=be.Children.only(Tt),Cn=(0,Ht.Tm)(Mt,{className:et()(`${la}-trigger`,{[`${la}-rtl`]:Ii==="rtl"},Mt.props.className),disabled:Wt}),_n=Wt?[]:Ot;let In;_n&&_n.includes("contextMenu")&&(In=!0);const[mr,Xn]=(0,bn.Z)(!1,{value:tn!=null?tn:Er}),sr=(0,Pt.useEvent)(Nt=>{qn==null||qn(Nt),kn==null||kn(Nt),Xn(Nt)}),On=et()(ar,Dt,ya,{[`${la}-rtl`]:Ii==="rtl"}),qe=(0,tt.Z)({arrowPointAtCenter:typeof Ge=="object"&&Ge.pointAtCenter,autoAdjustOverflow:ni,offset:$i.marginXXS,arrowWidth:Ge?$i.sizePopupArrow:0,borderRadius:$i.borderRadius}),st=be.useCallback(()=>{Xn(!1)},[]),_t=()=>{let Nt;return ke!=null&&ke.items?Nt=be.createElement(fn.default,Object.assign({},ke)):typeof Vr=="function"?Nt=Vr():Nt=Vr,$t&&(Nt=$t(Nt)),Nt=be.Children.only(typeof Nt=="string"?be.createElement("span",null,Nt):Nt),be.createElement(Gt.J,{prefixCls:`${la}-menu`,expandIcon:be.createElement("span",{className:`${la}-menu-submenu-arrow`},be.createElement(Ve.Z,{className:`${la}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:st,validator:He=>{let{mode:gt}=He}},Nt)};return va(be.createElement(Ae,Object.assign({alignPoint:In},(0,nn.Z)(oe,["rootClassName"]),{mouseEnterDelay:gr,mouseLeaveDelay:Di,visible:mr,builtinPlacements:qe,arrow:!!Ge,overlayClassName:On,prefixCls:la,getPopupContainer:Gn||hi,transitionName:Lr,trigger:_n,overlay:_t,placement:Xi,onVisibleChange:sr}),Cn))};function ce(oe){return Object.assign(Object.assign({},oe),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const se=(0,ot.Z)(_e,"dropdown",oe=>oe,ce),he=oe=>be.createElement(se,Object.assign({},oe),be.createElement("span",null));_e._InternalPanelDoNotUseOrYouWillBeFired=he;var fe=_e},66748:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return at}});var be=le(14747),Ve=le(67771),$e=le(33297),et=le(50438),ge=le(97414),Te=le(67968),Le=le(45503),me=Oe=>{const{componentCls:ht,menuCls:nt,colorError:rt,colorTextLightSolid:Je}=Oe,Ee=`${nt}-item`;return{[`${ht}, ${ht}-menu-submenu`]:{[`${nt} ${Ee}`]:{[`&${Ee}-danger:not(${Ee}-disabled)`]:{color:rt,"&:hover":{color:Je,backgroundColor:rt}}}}}};const Pe=Oe=>{const{componentCls:ht,menuCls:nt,zIndexPopup:rt,dropdownArrowDistance:Je,sizePopupArrow:Ee,antCls:pt,iconCls:Kt,motionDurationMid:Ye,dropdownPaddingVertical:lt,fontSize:Me,dropdownEdgeChildPadding:xe,colorTextDisabled:We,fontSizeIcon:je,controlPaddingHorizontal:Et,colorBgElevated:vt}=Oe;return[{[ht]:Object.assign(Object.assign({},(0,be.Wf)(Oe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:rt,display:"block","&::before":{position:"absolute",insetBlock:-Je+Ee/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${pt}-btn`]:{[`& > ${Kt}-down, & > ${pt}-btn-icon > ${Kt}-down`]:{fontSize:je}},[`${ht}-wrap`]:{position:"relative",[`${pt}-btn > ${Kt}-down`]:{fontSize:je},[`${Kt}-down::before`]:{transition:`transform ${Ye}`}},[`${ht}-wrap-open`]:{[`${Kt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${pt}-slide-down-enter${pt}-slide-down-enter-active${ht}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${ht}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-enter${pt}-slide-down-enter-active${ht}-placement-bottom,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${ht}-placement-bottom,
|
|
|
&${pt}-slide-down-enter${pt}-slide-down-enter-active${ht}-placement-bottomRight,
|
|
|
&${pt}-slide-down-appear${pt}-slide-down-appear-active${ht}-placement-bottomRight`]:{animationName:Ve.fJ},[`&${pt}-slide-up-enter${pt}-slide-up-enter-active${ht}-placement-topLeft,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${ht}-placement-topLeft,
|
|
|
&${pt}-slide-up-enter${pt}-slide-up-enter-active${ht}-placement-top,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${ht}-placement-top,
|
|
|
&${pt}-slide-up-enter${pt}-slide-up-enter-active${ht}-placement-topRight,
|
|
|
&${pt}-slide-up-appear${pt}-slide-up-appear-active${ht}-placement-topRight`]:{animationName:Ve.Qt},[`&${pt}-slide-down-leave${pt}-slide-down-leave-active${ht}-placement-bottomLeft,
|
|
|
&${pt}-slide-down-leave${pt}-slide-down-leave-active${ht}-placement-bottom,
|
|
|
&${pt}-slide-down-leave${pt}-slide-down-leave-active${ht}-placement-bottomRight`]:{animationName:Ve.Uw},[`&${pt}-slide-up-leave${pt}-slide-up-leave-active${ht}-placement-topLeft,
|
|
|
&${pt}-slide-up-leave${pt}-slide-up-leave-active${ht}-placement-top,
|
|
|
&${pt}-slide-up-leave${pt}-slide-up-leave-active${ht}-placement-topRight`]:{animationName:Ve.ly}})},(0,ge.ZP)(Oe,{colorBg:vt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${ht} ${nt}`]:{position:"relative",margin:0},[`${nt}-submenu-popup`]:{position:"absolute",zIndex:rt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${ht}, ${ht}-menu-submenu`]:{[nt]:Object.assign(Object.assign({padding:xe,listStyleType:"none",backgroundColor:vt,backgroundClip:"padding-box",borderRadius:Oe.borderRadiusLG,outline:"none",boxShadow:Oe.boxShadowSecondary},(0,be.Qy)(Oe)),{[`${nt}-item-group-title`]:{padding:`${lt}px ${Et}px`,color:Oe.colorTextDescription,transition:`all ${Ye}`},[`${nt}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${nt}-item-icon`]:{minWidth:Me,marginInlineEnd:Oe.marginXS,fontSize:Oe.fontSizeSM},[`${nt}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Ye}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${nt}-item, ${nt}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${lt}px ${Et}px`,color:Oe.colorText,fontWeight:"normal",fontSize:Me,lineHeight:Oe.lineHeight,cursor:"pointer",transition:`all ${Ye}`,borderRadius:Oe.borderRadiusSM,"&:hover, &-active":{backgroundColor:Oe.controlItemBgHover}},(0,be.Qy)(Oe)),{"&-selected":{color:Oe.colorPrimary,backgroundColor:Oe.controlItemBgActive,"&:hover, &-active":{backgroundColor:Oe.controlItemBgActiveHover}},"&-disabled":{color:We,cursor:"not-allowed","&:hover":{color:We,backgroundColor:vt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Oe.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Oe.colorSplit},[`${ht}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Oe.paddingXS,[`${ht}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Oe.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${nt}-item-group-list`]:{margin:`0 ${Oe.marginXS}px`,padding:0,listStyle:"none"},[`${nt}-submenu-title`]:{paddingInlineEnd:Et+Oe.fontSizeSM},[`${nt}-submenu-vertical`]:{position:"relative"},[`${nt}-submenu${nt}-submenu-disabled ${ht}-menu-submenu-title`]:{[`&, ${ht}-menu-submenu-arrow-icon`]:{color:We,backgroundColor:vt,cursor:"not-allowed"}},[`${nt}-submenu-selected ${ht}-menu-submenu-title`]:{color:Oe.colorPrimary}})}},[(0,Ve.oN)(Oe,"slide-up"),(0,Ve.oN)(Oe,"slide-down"),(0,$e.Fm)(Oe,"move-up"),(0,$e.Fm)(Oe,"move-down"),(0,et._y)(Oe,"zoom-big")]]};var at=(0,Te.Z)("Dropdown",(Oe,ht)=>{let{rootPrefixCls:nt}=ht;const{marginXXS:rt,sizePopupArrow:Je,controlHeight:Ee,fontSize:pt,lineHeight:Kt,paddingXXS:Ye,componentCls:lt,borderRadiusLG:Me}=Oe,xe=(Ee-pt*Kt)/2,{dropdownArrowOffset:We}=(0,ge.fS)({contentRadius:Me}),je=(0,Le.TS)(Oe,{menuCls:`${lt}-menu`,rootPrefixCls:nt,dropdownArrowDistance:Je/2+rt,dropdownArrowOffset:We,dropdownPaddingVertical:xe,dropdownEdgeChildPadding:Ye});return[Pe(je),me(je)]},Oe=>({zIndexPopup:Oe.zIndexPopupBase+50}))},32983:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ye}});var be=le(94184),Ve=le.n(be),$e=le(67294),et=le(53124),ge=le(10110),Te=le(84780),Le=le(46605),me=()=>{const[,lt]=(0,Le.Z)(),xe=new Te.C(lt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return $e.createElement("svg",{style:xe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},$e.createElement("g",{fill:"none",fillRule:"evenodd"},$e.createElement("g",{transform:"translate(24 31.67)"},$e.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),$e.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"}),$e.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)"}),$e.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"}),$e.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"})),$e.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"}),$e.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},$e.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),$e.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},at=()=>{const[,lt]=(0,Le.Z)(),{colorFill:Me,colorFillTertiary:xe,colorFillQuaternary:We,colorBgContainer:je}=lt,{borderColor:Et,shadowColor:vt,contentColor:At}=(0,$e.useMemo)(()=>({borderColor:new Te.C(Me).onBackground(je).toHexShortString(),shadowColor:new Te.C(xe).onBackground(je).toHexShortString(),contentColor:new Te.C(We).onBackground(je).toHexShortString()}),[Me,xe,We,je]);return $e.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},$e.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},$e.createElement("ellipse",{fill:vt,cx:"32",cy:"33",rx:"32",ry:"7"}),$e.createElement("g",{fillRule:"nonzero",stroke:Et},$e.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"}),$e.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:At}))))},Oe=le(67968),ht=le(45503);const nt=lt=>{const{componentCls:Me,margin:xe,marginXS:We,marginXL:je,fontSize:Et,lineHeight:vt}=lt;return{[Me]:{marginInline:We,fontSize:Et,lineHeight:vt,textAlign:"center",[`${Me}-image`]:{height:lt.emptyImgHeight,marginBottom:We,opacity:lt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Me}-description`]:{color:lt.colorText},[`${Me}-footer`]:{marginTop:xe},"&-normal":{marginBlock:je,color:lt.colorTextDisabled,[`${Me}-description`]:{color:lt.colorTextDisabled},[`${Me}-image`]:{height:lt.emptyImgHeightMD}},"&-small":{marginBlock:We,color:lt.colorTextDisabled,[`${Me}-image`]:{height:lt.emptyImgHeightSM}}}}};var rt=(0,Oe.Z)("Empty",lt=>{const{componentCls:Me,controlHeightLG:xe}=lt,We=(0,ht.TS)(lt,{emptyImgCls:`${Me}-img`,emptyImgHeight:xe*2.5,emptyImgHeightMD:xe,emptyImgHeightSM:xe*.875});return[nt(We)]}),Je=function(lt,Me){var xe={};for(var We in lt)Object.prototype.hasOwnProperty.call(lt,We)&&Me.indexOf(We)<0&&(xe[We]=lt[We]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,We=Object.getOwnPropertySymbols(lt);je<We.length;je++)Me.indexOf(We[je])<0&&Object.prototype.propertyIsEnumerable.call(lt,We[je])&&(xe[We[je]]=lt[We[je]]);return xe};const Ee=$e.createElement(me,null),pt=$e.createElement(at,null),Kt=lt=>{var{className:Me,rootClassName:xe,prefixCls:We,image:je=Ee,description:Et,children:vt,imageStyle:At,style:Qe}=lt,Bt=Je(lt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Lt,direction:hn,empty:ut}=$e.useContext(et.E_),Yt=Lt("empty",We),[vn,un]=rt(Yt),[Ze]=(0,ge.Z)("Empty"),Ae=typeof Et!="undefined"?Et:Ze==null?void 0:Ze.description,Pt=typeof Ae=="string"?Ae:"empty";let bn=null;return typeof je=="string"?bn=$e.createElement("img",{alt:Pt,src:je}):bn=je,vn($e.createElement("div",Object.assign({className:Ve()(un,Yt,ut==null?void 0:ut.className,{[`${Yt}-normal`]:je===pt,[`${Yt}-rtl`]:hn==="rtl"},Me,xe),style:Object.assign(Object.assign({},ut==null?void 0:ut.style),Qe)},Bt),$e.createElement("div",{className:`${Yt}-image`,style:At},bn),Ae&&$e.createElement("div",{className:`${Yt}-description`},Ae),vt&&$e.createElement("div",{className:`${Yt}-footer`},vt)))};Kt.PRESENTED_IMAGE_DEFAULT=Ee,Kt.PRESENTED_IMAGE_SIMPLE=pt;var Ye=Kt},22150:function(mn,Vt,le){"use strict";le.d(Vt,{default:function(){return Nt}});var be=le(74902),Ve=le(94184),$e=le.n(Ve),et=le(38379),ge=le(67294),Te=le(33603),Le=le(65223);function Se(He){const[gt,Rt]=ge.useState(He);return ge.useEffect(()=>{const It=setTimeout(()=>{Rt(He)},He.length?0:10);return()=>{clearTimeout(It)}},[He]),gt}var me=le(14747),Pe=le(50438),at=le(33507),Oe=le(45503),ht=le(67968),rt=He=>{const{componentCls:gt}=He,Rt=`${gt}-show-help`,It=`${gt}-show-help-item`;return{[Rt]:{transition:`opacity ${He.motionDurationSlow} ${He.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[It]:{overflow:"hidden",transition:`height ${He.motionDurationSlow} ${He.motionEaseInOut},
|
|
|
opacity ${He.motionDurationSlow} ${He.motionEaseInOut},
|
|
|
transform ${He.motionDurationSlow} ${He.motionEaseInOut} !important`,[`&${It}-appear, &${It}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${It}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Je=He=>({legend:{display:"block",width:"100%",marginBottom:He.marginLG,padding:0,color:He.colorTextDescription,fontSize:He.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`},label:{fontSize:He.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 ${He.controlOutlineWidth}px ${He.controlOutline}`},output:{display:"block",paddingTop:15,color:He.colorText,fontSize:He.fontSize,lineHeight:He.lineHeight}}),Ee=(He,gt)=>{const{formItemCls:Rt}=He;return{[Rt]:{[`${Rt}-label > label`]:{height:gt},[`${Rt}-control-input`]:{minHeight:gt}}}},pt=He=>{const{componentCls:gt}=He;return{[He.componentCls]:Object.assign(Object.assign(Object.assign({},(0,me.Wf)(He)),Je(He)),{[`${gt}-text`]:{display:"inline-block",paddingInlineEnd:He.paddingSM},"&-small":Object.assign({},Ee(He,He.controlHeightSM)),"&-large":Object.assign({},Ee(He,He.controlHeightLG))})}},Kt=He=>{const{formItemCls:gt,iconCls:Rt,componentCls:It,rootPrefixCls:Zt,labelRequiredMarkColor:Ut,labelColor:Nn,labelFontSize:hr,labelHeight:Vn,labelColonMarginInlineStart:jn,labelColonMarginInlineEnd:Qn,itemMarginBottom:tr}=He;return{[gt]:Object.assign(Object.assign({},(0,me.Wf)(He)),{marginBottom:tr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Zt}-row`]:{display:"none"},"&-has-warning":{[`${gt}-split`]:{color:He.colorError}},"&-has-error":{[`${gt}-split`]:{color:He.colorWarning}},[`${gt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${He.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Vn,color:Nn,fontSize:hr,[`> ${Rt}`]:{fontSize:He.fontSize,verticalAlign:"top"},[`&${gt}-required:not(${gt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:He.marginXXS,color:Ut,fontSize:He.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${It}-hide-required-mark &`]:{display:"none"}},[`${gt}-optional`]:{display:"inline-block",marginInlineStart:He.marginXXS,color:He.colorTextDescription,[`${It}-hide-required-mark &`]:{display:"none"}},[`${gt}-tooltip`]:{color:He.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:He.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:jn,marginInlineEnd:Qn},[`&${gt}-no-colon::after`]:{content:'"\\a0"'}}},[`${gt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Zt}-col-'"]):not([class*="' ${Zt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:He.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[gt]:{"&-explain, &-extra":{clear:"both",color:He.colorTextDescription,fontSize:He.fontSize,lineHeight:He.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:He.controlHeightSM,transition:`color ${He.motionDurationMid} ${He.motionEaseOut}`},"&-explain":{"&-error":{color:He.colorError},"&-warning":{color:He.colorWarning}}},[`&-with-help ${gt}-explain`]:{height:"auto",opacity:1},[`${gt}-feedback-icon`]:{fontSize:He.fontSize,textAlign:"center",visibility:"visible",animationName:Pe.kr,animationDuration:He.motionDurationMid,animationTimingFunction:He.motionEaseOutBack,pointerEvents:"none","&-success":{color:He.colorSuccess},"&-error":{color:He.colorError},"&-warning":{color:He.colorWarning},"&-validating":{color:He.colorPrimary}}})}},Ye=He=>{const{componentCls:gt,formItemCls:Rt}=He;return{[`${gt}-horizontal`]:{[`${Rt}-label`]:{flexGrow:0},[`${Rt}-control`]:{flex:"1 1 0",minWidth:0},[`${Rt}-label[class$='-24'], ${Rt}-label[class*='-24 ']`]:{[`& + ${Rt}-control`]:{minWidth:"unset"}}}}},lt=He=>{const{componentCls:gt,formItemCls:Rt}=He;return{[`${gt}-inline`]:{display:"flex",flexWrap:"wrap",[Rt]:{flex:"none",marginInlineEnd:He.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Rt}-label,
|
|
|
> ${Rt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Rt}-label`]:{flex:"none"},[`${gt}-text`]:{display:"inline-block"},[`${Rt}-has-feedback`]:{display:"inline-block"}}}}},Me=He=>({padding:He.verticalLabelPadding,margin:He.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),xe=He=>{const{componentCls:gt,formItemCls:Rt,rootPrefixCls:It}=He;return{[`${Rt} ${Rt}-label`]:Me(He),[gt]:{[Rt]:{flexWrap:"wrap",[`${Rt}-label, ${Rt}-control`]:{[`&:not([class*=" ${It}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},We=He=>{const{componentCls:gt,formItemCls:Rt,rootPrefixCls:It}=He;return{[`${gt}-vertical`]:{[Rt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${gt}-item-control`]:{width:"100%"}}},[`${gt}-vertical ${Rt}-label,
|
|
|
.${It}-col-24${Rt}-label,
|
|
|
.${It}-col-xl-24${Rt}-label`]:Me(He),[`@media (max-width: ${He.screenXSMax}px)`]:[xe(He),{[gt]:{[`.${It}-col-xs-24${Rt}-label`]:Me(He)}}],[`@media (max-width: ${He.screenSMMax}px)`]:{[gt]:{[`.${It}-col-sm-24${Rt}-label`]:Me(He)}},[`@media (max-width: ${He.screenMDMax}px)`]:{[gt]:{[`.${It}-col-md-24${Rt}-label`]:Me(He)}},[`@media (max-width: ${He.screenLGMax}px)`]:{[gt]:{[`.${It}-col-lg-24${Rt}-label`]:Me(He)}}}},je=(He,gt)=>(0,Oe.TS)(He,{formItemCls:`${He.componentCls}-item`,rootPrefixCls:gt});var Et=(0,ht.Z)("Form",(He,gt)=>{let{rootPrefixCls:Rt}=gt;const It=je(He,Rt);return[pt(It),Kt(It),rt(It),Ye(It),lt(It),We(It),(0,at.Z)(It),Pe.kr]},He=>({labelRequiredMarkColor:He.colorError,labelColor:He.colorTextHeading,labelFontSize:He.fontSize,labelHeight:He.controlHeight,labelColonMarginInlineStart:He.marginXXS/2,labelColonMarginInlineEnd:He.marginXS,itemMarginBottom:He.marginLG,verticalLabelPadding:`0 0 ${He.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const vt=[];function At(He,gt,Rt){let It=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof He=="string"?He:`${gt}-${It}`,error:He,errorStatus:Rt}}var Bt=He=>{let{help:gt,helpStatus:Rt,errors:It=vt,warnings:Zt=vt,className:Ut,fieldId:Nn,onVisibleChanged:hr}=He;const{prefixCls:Vn}=ge.useContext(Le.Rk),jn=`${Vn}-item-explain`,[,Qn]=Et(Vn),tr=(0,ge.useMemo)(()=>(0,Te.Z)(Vn),[Vn]),Ar=Se(It),cn=Se(Zt),Kn=ge.useMemo(()=>gt!=null?[At(gt,"help",Rt)]:[].concat((0,be.Z)(Ar.map((xi,Zr)=>At(xi,"error","error",Zr))),(0,be.Z)(cn.map((xi,Zr)=>At(xi,"warning","warning",Zr)))),[gt,Rt,Ar,cn]),pi={};return Nn&&(pi.id=`${Nn}_help`),ge.createElement(et.default,{motionDeadline:tr.motionDeadline,motionName:`${Vn}-show-help`,visible:!!Kn.length,onVisibleChanged:hr},xi=>{const{className:Zr,style:Rr}=xi;return ge.createElement("div",Object.assign({},pi,{className:$e()(jn,Zr,Ut,Qn),style:Rr,role:"alert"}),ge.createElement(et.CSSMotionList,Object.assign({keys:Kn},(0,Te.Z)(Vn),{motionName:`${Vn}-show-help-item`,component:!1}),_i=>{const{key:cr,error:ui,errorStatus:wn,className:Yi,style:ki}=_i;return ge.createElement("div",{key:cr,className:$e()(Yi,{[`${jn}-${wn}`]:wn}),style:ki},ui)}))})},Lt=le(58083),hn=le(53124),ut=le(98866),Yt=le(97647),vn=le(98675),un=le(17423);const Ze=["parentNode"],Ae="form_item";function Pt(He){return He===void 0||He===!1?[]:Array.isArray(He)?He:[He]}function bn(He,gt){if(!He.length)return;const Rt=He.join("_");return gt?`${gt}_${Rt}`:Ze.includes(Rt)?`${Ae}_${Rt}`:Rt}function nn(He,gt,Rt,It,Zt,Ut){let Nn=It;return Ut!==void 0?Nn=Ut:Rt.validating?Nn="validating":He.length?Nn="error":gt.length?Nn="warning":(Rt.touched||Zt&&Rt.validated)&&(Nn="success"),Nn}function tt(He){return Pt(He).join("_")}function ot(He){const[gt]=(0,Lt.useForm)(),Rt=ge.useRef({}),It=ge.useMemo(()=>He!=null?He:Object.assign(Object.assign({},gt),{__INTERNAL__:{itemRef:Zt=>Ut=>{const Nn=tt(Zt);Ut?Rt.current[Nn]=Ut:delete Rt.current[Nn]}},scrollToField:function(Zt){let Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Nn=Pt(Zt),hr=bn(Nn,It.__INTERNAL__.name),Vn=hr?document.getElementById(hr):null;Vn&&(0,un.Z)(Vn,Object.assign({scrollMode:"if-needed",block:"nearest"},Ut))},getFieldInstance:Zt=>{const Ut=tt(Zt);return Rt.current[Ut]}}),[He,gt]);return[It]}var Ht=le(37920),En=function(He,gt){var Rt={};for(var It in He)Object.prototype.hasOwnProperty.call(He,It)&>.indexOf(It)<0&&(Rt[It]=He[It]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,It=Object.getOwnPropertySymbols(He);Zt<It.length;Zt++)gt.indexOf(It[Zt])<0&&Object.prototype.propertyIsEnumerable.call(He,It[Zt])&&(Rt[It[Zt]]=He[It[Zt]]);return Rt};const fn=(He,gt)=>{const Rt=ge.useContext(ut.Z),{getPrefixCls:It,direction:Zt,form:Ut}=ge.useContext(hn.E_),{prefixCls:Nn,className:hr,rootClassName:Vn,size:jn,disabled:Qn=Rt,form:tr,colon:Ar,labelAlign:cn,labelWrap:Kn,labelCol:pi,wrapperCol:xi,hideRequiredMark:Zr,layout:Rr="horizontal",scrollToFirstError:_i,requiredMark:cr,onFinishFailed:ui,name:wn,style:Yi,feedbackIcons:ki}=He,wa=En(He,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),qi=(0,vn.Z)(jn),Pi=ge.useContext(Ht.Z),fa=(0,ge.useMemo)(()=>cr!==void 0?cr:Ut&&Ut.requiredMark!==void 0?Ut.requiredMark:!Zr,[Zr,cr,Ut]),ji=Ar!=null?Ar:Ut==null?void 0:Ut.colon,Ci=It("form",Nn),[ta,_a]=Et(Ci),na=$e()(Ci,`${Ci}-${Rr}`,{[`${Ci}-hide-required-mark`]:fa===!1,[`${Ci}-rtl`]:Zt==="rtl",[`${Ci}-${qi}`]:qi},_a,Ut==null?void 0:Ut.className,hr,Vn),[Ni]=ot(tr),{__INTERNAL__:ka}=Ni;ka.name=wn;const Pa=(0,ge.useMemo)(()=>({name:wn,labelAlign:cn,labelCol:pi,labelWrap:Kn,wrapperCol:xi,vertical:Rr==="vertical",colon:ji,requiredMark:fa,itemRef:ka.itemRef,form:Ni,feedbackIcons:ki}),[wn,cn,pi,xi,Rr,ji,fa,Ni,ki]);ge.useImperativeHandle(gt,()=>Ni);const ha=(bt,mt)=>{if(bt){let zt={block:"nearest"};typeof bt=="object"&&(zt=bt),Ni.scrollToField(mt,zt)}},ai=bt=>{if(ui==null||ui(bt),bt.errorFields.length){const mt=bt.errorFields[0].name;if(_i!==void 0){ha(_i,mt);return}Ut&&Ut.scrollToFirstError!==void 0&&ha(Ut.scrollToFirstError,mt)}};return ta(ge.createElement(ut.n,{disabled:Qn},ge.createElement(Yt.q,{size:qi},ge.createElement(Le.RV,Object.assign({},{validateMessages:Pi}),ge.createElement(Le.q3.Provider,{value:Pa},ge.createElement(Lt.default,Object.assign({id:wn},wa,{name:wn,onFinishFailed:ai,form:Ni,style:Object.assign(Object.assign({},Ut==null?void 0:Ut.style),Yi),className:na})))))))};var Ft=ge.forwardRef(fn),xn=le(9475),gn=le(17799),_e=le(96159),ce=le(37419);function se(He){if(typeof He=="function")return He;const gt=(0,ce.Z)(He);return gt.length<=1?gt[0]:gt}const he=()=>{const{status:He,errors:gt=[],warnings:Rt=[]}=(0,ge.useContext)(Le.aM);return{status:He,errors:gt,warnings:Rt}};he.Context=Le.aM;var fe=he,oe=le(96523);function ke(He){const[gt,Rt]=ge.useState(He),It=(0,ge.useRef)(null),Zt=(0,ge.useRef)([]),Ut=(0,ge.useRef)(!1);ge.useEffect(()=>(Ut.current=!1,()=>{Ut.current=!0,oe.Z.cancel(It.current),It.current=null}),[]);function Nn(hr){Ut.current||(It.current===null&&(Zt.current=[],It.current=(0,oe.Z)(()=>{It.current=null,Rt(Vn=>{let jn=Vn;return Zt.current.forEach(Qn=>{jn=Qn(jn)}),jn})})),Zt.current.push(hr))}return[gt,Nn]}function Ge(){const{itemRef:He}=ge.useContext(Le.q3),gt=ge.useRef({});function Rt(It,Zt){const Ut=Zt&&typeof Zt=="object"&&Zt.ref,Nn=It.join("_");return(gt.current.name!==Nn||gt.current.originRef!==Ut)&&(gt.current.name=Nn,gt.current.originRef=Ut,gt.current.ref=(0,gn.sQ)(He(It),Ut)),gt.current.ref}return Rt}var St=le(48130),Tt=le(14075),Ot=le(10366),Wt=le(92820),$t=le(21584);const Gn=He=>{const{formItemCls:gt}=He;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${gt}-control`]:{display:"flex"}}}};var ar=(0,ht.b)(["Form","item-item"],(He,gt)=>{let{rootPrefixCls:Rt}=gt;const It=je(He,Rt);return[Gn(It)]}),tn=He=>{const{prefixCls:gt,status:Rt,wrapperCol:It,children:Zt,errors:Ut,warnings:Nn,_internalItemRender:hr,extra:Vn,help:jn,fieldId:Qn,marginBottom:tr,onErrorVisibleChanged:Ar}=He,cn=`${gt}-item`,Kn=ge.useContext(Le.q3),pi=It||Kn.wrapperCol||{},xi=$e()(`${cn}-control`,pi.className),Zr=ge.useMemo(()=>Object.assign({},Kn),[Kn]);delete Zr.labelCol,delete Zr.wrapperCol;const Rr=ge.createElement("div",{className:`${cn}-control-input`},ge.createElement("div",{className:`${cn}-control-input-content`},Zt)),_i=ge.useMemo(()=>({prefixCls:gt,status:Rt}),[gt,Rt]),cr=tr!==null||Ut.length||Nn.length?ge.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ge.createElement(Le.Rk.Provider,{value:_i},ge.createElement(Bt,{fieldId:Qn,errors:Ut,warnings:Nn,help:jn,helpStatus:Rt,className:`${cn}-explain-connected`,onVisibleChanged:Ar})),!!tr&&ge.createElement("div",{style:{width:0,height:tr}})):null,ui={};Qn&&(ui.id=`${Qn}_extra`);const wn=Vn?ge.createElement("div",Object.assign({},ui,{className:`${cn}-extra`}),Vn):null,Yi=hr&&hr.mark==="pro_table_render"&&hr.render?hr.render(He,{input:Rr,errorList:cr,extra:wn}):ge.createElement(ge.Fragment,null,Rr,cr,wn);return ge.createElement(Le.q3.Provider,{value:Zr},ge.createElement($t.Z,Object.assign({},pi,{className:xi}),Yi),ge.createElement(ar,{prefixCls:gt}))},qn=le(17663),Er=le(24457),kn=le(10110),gr=le(83062),Di=function(He,gt){var Rt={};for(var It in He)Object.prototype.hasOwnProperty.call(He,It)&>.indexOf(It)<0&&(Rt[It]=He[It]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,It=Object.getOwnPropertySymbols(He);Zt<It.length;Zt++)gt.indexOf(It[Zt])<0&&Object.prototype.propertyIsEnumerable.call(He,It[Zt])&&(Rt[It[Zt]]=He[It[Zt]]);return Rt};function ni(He){return He?typeof He=="object"&&!ge.isValidElement(He)?He:{title:He}:null}var Vr=He=>{let{prefixCls:gt,label:Rt,htmlFor:It,labelCol:Zt,labelAlign:Ut,colon:Nn,required:hr,requiredMark:Vn,tooltip:jn}=He;var Qn;const[tr]=(0,kn.Z)("Form"),{vertical:Ar,labelAlign:cn,labelCol:Kn,labelWrap:pi,colon:xi}=ge.useContext(Le.q3);if(!Rt)return null;const Zr=Zt||Kn||{},Rr=Ut||cn,_i=`${gt}-item-label`,cr=$e()(_i,Rr==="left"&&`${_i}-left`,Zr.className,{[`${_i}-wrap`]:!!pi});let ui=Rt;const wn=Nn===!0||xi!==!1&&Nn!==!1;wn&&!Ar&&typeof Rt=="string"&&Rt.trim()!==""&&(ui=Rt.replace(/[:|:]\s*$/,""));const ki=ni(jn);if(ki){const{icon:fa=ge.createElement(qn.Z,null)}=ki,ji=Di(ki,["icon"]),Ci=ge.createElement(gr.Z,Object.assign({},ji),ge.cloneElement(fa,{className:`${gt}-item-tooltip`,title:""}));ui=ge.createElement(ge.Fragment,null,ui,Ci)}const wa=Vn==="optional",qi=typeof Vn=="function";qi?ui=Vn(ui,{required:!!hr}):wa&&!hr&&(ui=ge.createElement(ge.Fragment,null,ui,ge.createElement("span",{className:`${gt}-item-optional`,title:""},(tr==null?void 0:tr.optional)||((Qn=Er.Z.Form)===null||Qn===void 0?void 0:Qn.optional))));const Pi=$e()({[`${gt}-item-required`]:hr,[`${gt}-item-required-mark-optional`]:wa||qi,[`${gt}-item-no-colon`]:!wn});return ge.createElement($t.Z,Object.assign({},Zr,{className:cr}),ge.createElement("label",{htmlFor:It,className:Pi,title:typeof Rt=="string"?Rt:""},ui))},Si=le(87725),hi=le(16646),Ti=le(87995),Ii=le(3407);const Lr={success:Si.Z,warning:Ti.Z,error:hi.Z,validating:Ii.Z};function Xi(He){let{children:gt,errors:Rt,warnings:It,hasFeedback:Zt,validateStatus:Ut,prefixCls:Nn,meta:hr,noStyle:Vn}=He;const jn=`${Nn}-item`,{feedbackIcons:Qn}=ge.useContext(Le.q3),tr=nn(Rt,It,hr,null,!!Zt,Ut),{isFormItemInput:Ar,status:cn}=ge.useContext(Le.aM),Kn=ge.useMemo(()=>{var pi;let xi;if(Zt){const _i=Zt!==!0&&Zt.icons||Qn,cr=tr&&((pi=_i==null?void 0:_i({status:tr,errors:Rt,warnings:It}))===null||pi===void 0?void 0:pi[tr]),ui=tr&&Lr[tr];xi=cr!==!1&&ui?ge.createElement("span",{className:$e()(`${jn}-feedback-icon`,`${jn}-feedback-icon-${tr}`)},cr||ge.createElement(ui,null)):null}let Zr=!0,Rr=tr||"";return Vn&&(Zr=Ar,Rr=(tr!=null?tr:cn)||""),{status:Rr,errors:Rt,warnings:It,hasFeedback:!!Zt,feedbackIcon:xi,isFormItemInput:Zr}},[tr,Zt,Vn,Ar,cn]);return ge.createElement(Le.aM.Provider,{value:Kn},gt)}var la=function(He,gt){var Rt={};for(var It in He)Object.prototype.hasOwnProperty.call(He,It)&>.indexOf(It)<0&&(Rt[It]=He[It]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,It=Object.getOwnPropertySymbols(He);Zt<It.length;Zt++)gt.indexOf(It[Zt])<0&&Object.prototype.propertyIsEnumerable.call(He,It[Zt])&&(Rt[It[Zt]]=He[It[Zt]]);return Rt};function va(He){const{prefixCls:gt,className:Rt,rootClassName:It,style:Zt,help:Ut,errors:Nn,warnings:hr,validateStatus:Vn,meta:jn,hasFeedback:Qn,hidden:tr,children:Ar,fieldId:cn,required:Kn,isRequired:pi,onSubItemMetaChange:xi}=He,Zr=la(He,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Rr=`${gt}-item`,{requiredMark:_i}=ge.useContext(Le.q3),cr=ge.useRef(null),ui=Se(Nn),wn=Se(hr),Yi=Ut!=null,ki=!!(Yi||Nn.length||hr.length),wa=!!cr.current&&(0,St.Z)(cr.current),[qi,Pi]=ge.useState(null);(0,Tt.Z)(()=>{if(ki&&cr.current){const _a=getComputedStyle(cr.current);Pi(parseInt(_a.marginBottom,10))}},[ki,wa]);const fa=_a=>{_a||Pi(null)},Ci=function(){let _a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const na=_a?ui:jn.errors,Ni=_a?wn:jn.warnings;return nn(na,Ni,jn,"",!!Qn,Vn)}(),ta=$e()(Rr,Rt,It,{[`${Rr}-with-help`]:Yi||ui.length||wn.length,[`${Rr}-has-feedback`]:Ci&&Qn,[`${Rr}-has-success`]:Ci==="success",[`${Rr}-has-warning`]:Ci==="warning",[`${Rr}-has-error`]:Ci==="error",[`${Rr}-is-validating`]:Ci==="validating",[`${Rr}-hidden`]:tr});return ge.createElement("div",{className:ta,style:Zt,ref:cr},ge.createElement(Wt.Z,Object.assign({className:`${Rr}-row`},(0,Ot.Z)(Zr,["_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"])),ge.createElement(Vr,Object.assign({htmlFor:cn},He,{requiredMark:_i,required:Kn!=null?Kn:pi,prefixCls:gt})),ge.createElement(tn,Object.assign({},He,jn,{errors:ui,warnings:wn,prefixCls:gt,status:Ci,help:Ut,marginBottom:qi,onErrorVisibleChanged:fa}),ge.createElement(Le.qI.Provider,{value:xi},ge.createElement(Xi,{prefixCls:gt,meta:jn,errors:jn.errors,warnings:jn.warnings,hasFeedback:Qn,validateStatus:Ci},Ar)))),!!qi&&ge.createElement("div",{className:`${Rr}-margin-offset`,style:{marginBottom:-qi}}))}const ya="__SPLIT__",$i=null,Mt=ge.memo(He=>{let{children:gt}=He;return gt},(He,gt)=>He.value===gt.value&&He.update===gt.update&&He.childProps.length===gt.childProps.length&&He.childProps.every((Rt,It)=>Rt===gt.childProps[It]));function Cn(He){return He!=null}function _n(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function In(He){const{name:gt,noStyle:Rt,className:It,dependencies:Zt,prefixCls:Ut,shouldUpdate:Nn,rules:hr,children:Vn,required:jn,label:Qn,messageVariables:tr,trigger:Ar="onChange",validateTrigger:cn,hidden:Kn,help:pi}=He,{getPrefixCls:xi}=ge.useContext(hn.E_),{name:Zr}=ge.useContext(Le.q3),Rr=se(Vn),_i=typeof Rr=="function",cr=ge.useContext(Le.qI),{validateTrigger:ui}=ge.useContext(Lt.FieldContext),wn=cn!==void 0?cn:ui,Yi=Cn(gt),ki=xi("form",Ut),[wa,qi]=Et(ki),Pi=ge.useContext(Lt.ListContext),fa=ge.useRef(),[ji,Ci]=ke({}),[ta,_a]=(0,xn.Z)(()=>_n()),na=mt=>{const zt=Pi==null?void 0:Pi.getKey(mt.name);if(_a(mt.destroy?_n():mt,!0),Rt&&pi!==!1&&cr){let an=mt.name;if(mt.destroy)an=fa.current||an;else if(zt!==void 0){const[An,Sr]=zt;an=[An].concat((0,be.Z)(Sr)),fa.current=an}cr(mt,an)}},Ni=(mt,zt)=>{Ci(an=>{const An=Object.assign({},an),wr=[].concat((0,be.Z)(mt.name.slice(0,-1)),(0,be.Z)(zt)).join(ya);return mt.destroy?delete An[wr]:An[wr]=mt,An})},[ka,Pa]=ge.useMemo(()=>{const mt=(0,be.Z)(ta.errors),zt=(0,be.Z)(ta.warnings);return Object.values(ji).forEach(an=>{mt.push.apply(mt,(0,be.Z)(an.errors||[])),zt.push.apply(zt,(0,be.Z)(an.warnings||[]))}),[mt,zt]},[ji,ta.errors,ta.warnings]),ha=Ge();function ai(mt,zt,an){return Rt&&!Kn?ge.createElement(Xi,{prefixCls:ki,hasFeedback:He.hasFeedback,validateStatus:He.validateStatus,meta:ta,errors:ka,warnings:Pa,noStyle:!0},mt):ge.createElement(va,Object.assign({key:"row"},He,{className:$e()(It,qi),prefixCls:ki,fieldId:zt,isRequired:an,errors:ka,warnings:Pa,meta:ta,onSubItemMetaChange:Ni}),mt)}if(!Yi&&!_i&&!Zt)return wa(ai(Rr));let bt={};return typeof Qn=="string"?bt.label=Qn:gt&&(bt.label=String(gt)),tr&&(bt=Object.assign(Object.assign({},bt),tr)),wa(ge.createElement(Lt.Field,Object.assign({},He,{messageVariables:bt,trigger:Ar,validateTrigger:wn,onMetaChange:na}),(mt,zt,an)=>{const An=Pt(gt).length&&zt?zt.name:[],Sr=bn(An,Zr),wr=jn!==void 0?jn:!!(hr&&hr.some(Dr=>{if(Dr&&typeof Dr=="object"&&Dr.required&&!Dr.warningOnly)return!0;if(typeof Dr=="function"){const ei=Dr(an);return ei&&ei.required&&!ei.warningOnly}return!1})),Tr=Object.assign({},mt);let $r=null;if(Array.isArray(Rr)&&Yi)$r=Rr;else if(!(_i&&(!(Nn||Zt)||Yi))){if(!(Zt&&!_i&&!Yi))if((0,_e.l$)(Rr)){const Dr=Object.assign(Object.assign({},Rr.props),Tr);if(Dr.id||(Dr.id=Sr),pi||ka.length>0||Pa.length>0||He.extra){const Mi=[];(pi||ka.length>0)&&Mi.push(`${Sr}_help`),He.extra&&Mi.push(`${Sr}_extra`),Dr["aria-describedby"]=Mi.join(" ")}ka.length>0&&(Dr["aria-invalid"]="true"),wr&&(Dr["aria-required"]="true"),(0,gn.Yr)(Rr)&&(Dr.ref=ha(An,Rr)),new Set([].concat((0,be.Z)(Pt(Ar)),(0,be.Z)(Pt(wn)))).forEach(Mi=>{Dr[Mi]=function(){for(var Gi,Wi,Fi,Ie,Fe,Ne=arguments.length,Ue=new Array(Ne),it=0;it<Ne;it++)Ue[it]=arguments[it];(Fi=Tr[Mi])===null||Fi===void 0||(Gi=Fi).call.apply(Gi,[Tr].concat(Ue)),(Fe=(Ie=Rr.props)[Mi])===null||Fe===void 0||(Wi=Fe).call.apply(Wi,[Ie].concat(Ue))}});const ci=[Dr["aria-required"],Dr["aria-invalid"],Dr["aria-describedby"]];$r=ge.createElement(Mt,{value:Tr[He.valuePropName||"value"],update:Rr,childProps:ci},(0,_e.Tm)(Rr,Dr))}else _i&&(Nn||Zt)&&!Yi?$r=Rr(an):$r=Rr}return ai($r,Sr,wr)}))}const mr=In;mr.useStatus=fe;var Xn=mr,sr=function(He,gt){var Rt={};for(var It in He)Object.prototype.hasOwnProperty.call(He,It)&>.indexOf(It)<0&&(Rt[It]=He[It]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,It=Object.getOwnPropertySymbols(He);Zt<It.length;Zt++)gt.indexOf(It[Zt])<0&&Object.prototype.propertyIsEnumerable.call(He,It[Zt])&&(Rt[It[Zt]]=He[It[Zt]]);return Rt},qe=He=>{var{prefixCls:gt,children:Rt}=He,It=sr(He,["prefixCls","children"]);const{getPrefixCls:Zt}=ge.useContext(hn.E_),Ut=Zt("form",gt),Nn=ge.useMemo(()=>({prefixCls:Ut,status:"error"}),[Ut]);return ge.createElement(Lt.List,Object.assign({},It),(hr,Vn,jn)=>ge.createElement(Le.Rk.Provider,{value:Nn},Rt(hr.map(Qn=>Object.assign(Object.assign({},Qn),{fieldKey:Qn.key})),Vn,{errors:jn.errors,warnings:jn.warnings})))};function st(){const{form:He}=(0,ge.useContext)(Le.q3);return He}const _t=Ft;_t.Item=Xn,_t.List=qe,_t.ErrorList=Bt,_t.useForm=ot,_t.useFormInstance=st,_t.useWatch=Lt.useWatch,_t.Provider=Le.RV,_t.create=()=>{};var Nt=_t},31795:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return On}});var be=le(42922),Ve=le(53978),$e=le(94184),et=le.n($e),ge=le(87462),Te=le(4942),Le=le(71002),Se=le(97685),me=le(45987),Pe=le(15671),at=le(43144);function Oe(){return typeof BigInt=="function"}function ht(qe){return!qe&&qe!==0&&!Number.isNaN(qe)||!String(qe).trim()}function nt(qe){var st=qe.trim(),_t=st.startsWith("-");_t&&(st=st.slice(1)),st=st.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),st.startsWith(".")&&(st="0".concat(st));var Nt=st||"0",He=Nt.split("."),gt=He[0]||"0",Rt=He[1]||"0";gt==="0"&&Rt==="0"&&(_t=!1);var It=_t?"-":"";return{negative:_t,negativeStr:It,trimStr:Nt,integerStr:gt,decimalStr:Rt,fullStr:"".concat(It).concat(Nt)}}function rt(qe){var st=String(qe);return!Number.isNaN(Number(st))&&st.includes("e")}function Je(qe){var st=String(qe);if(rt(qe)){var _t=Number(st.slice(st.indexOf("e-")+2)),Nt=st.match(/\.(\d+)/);return Nt!=null&&Nt[1]&&(_t+=Nt[1].length),_t}return st.includes(".")&&pt(st)?st.length-st.indexOf(".")-1:0}function Ee(qe){var st=String(qe);if(rt(qe)){if(qe>Number.MAX_SAFE_INTEGER)return String(Oe()?BigInt(qe).toString():Number.MAX_SAFE_INTEGER);if(qe<Number.MIN_SAFE_INTEGER)return String(Oe()?BigInt(qe).toString():Number.MIN_SAFE_INTEGER);st=qe.toFixed(Je(st))}return nt(st).fullStr}function pt(qe){return typeof qe=="number"?!Number.isNaN(qe):qe?/^\s*-?\d+(\.\d+)?\s*$/.test(qe)||/^\s*-?\d+\.\s*$/.test(qe)||/^\s*-?\.\d+\s*$/.test(qe):!1}var Kt=function(){function qe(st){if((0,Pe.Z)(this,qe),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"negative",void 0),(0,Te.Z)(this,"integer",void 0),(0,Te.Z)(this,"decimal",void 0),(0,Te.Z)(this,"decimalLen",void 0),(0,Te.Z)(this,"empty",void 0),(0,Te.Z)(this,"nan",void 0),ht(st)){this.empty=!0;return}if(this.origin=String(st),st==="-"||Number.isNaN(st)){this.nan=!0;return}var _t=st;if(rt(_t)&&(_t=Number(_t)),_t=typeof _t=="string"?_t:Ee(_t),pt(_t)){var Nt=nt(_t);this.negative=Nt.negative;var He=Nt.trimStr.split(".");this.integer=BigInt(He[0]);var gt=He[1]||"0";this.decimal=BigInt(gt),this.decimalLen=gt.length}else this.nan=!0}return(0,at.Z)(qe,[{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(_t){var Nt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(_t,"0"));return BigInt(Nt)}},{key:"negate",value:function(){var _t=new qe(this.toString());return _t.negative=!_t.negative,_t}},{key:"cal",value:function(_t,Nt,He){var gt=Math.max(this.getDecimalStr().length,_t.getDecimalStr().length),Rt=this.alignDecimal(gt),It=_t.alignDecimal(gt),Zt=Nt(Rt,It).toString(),Ut=He(gt),Nn=nt(Zt),hr=Nn.negativeStr,Vn=Nn.trimStr,jn="".concat(hr).concat(Vn.padStart(Ut+1,"0"));return new qe("".concat(jn.slice(0,-Ut),".").concat(jn.slice(-Ut)))}},{key:"add",value:function(_t){if(this.isInvalidate())return new qe(_t);var Nt=new qe(_t);return Nt.isInvalidate()?this:this.cal(Nt,function(He,gt){return He+gt},function(He){return He})}},{key:"multi",value:function(_t){var Nt=new qe(_t);return this.isInvalidate()||Nt.isInvalidate()?new qe(NaN):this.cal(Nt,function(He,gt){return He*gt},function(He){return He*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(_t){return this.toString()===(_t==null?void 0:_t.toString())}},{key:"lessEquals",value:function(_t){return this.add(_t.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return _t?this.isInvalidate()?"":nt("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),qe}(),Ye=function(){function qe(st){if((0,Pe.Z)(this,qe),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"number",void 0),(0,Te.Z)(this,"empty",void 0),ht(st)){this.empty=!0;return}this.origin=String(st),this.number=Number(st)}return(0,at.Z)(qe,[{key:"negate",value:function(){return new qe(-this.toNumber())}},{key:"add",value:function(_t){if(this.isInvalidate())return new qe(_t);var Nt=Number(_t);if(Number.isNaN(Nt))return this;var He=this.number+Nt;if(He>Number.MAX_SAFE_INTEGER)return new qe(Number.MAX_SAFE_INTEGER);if(He<Number.MIN_SAFE_INTEGER)return new qe(Number.MIN_SAFE_INTEGER);var gt=Math.max(Je(this.number),Je(Nt));return new qe(He.toFixed(gt))}},{key:"multi",value:function(_t){var Nt=Number(_t);if(this.isInvalidate()||Number.isNaN(Nt))return new qe(NaN);var He=this.number*Nt;if(He>Number.MAX_SAFE_INTEGER)return new qe(Number.MAX_SAFE_INTEGER);if(He<Number.MIN_SAFE_INTEGER)return new qe(Number.MIN_SAFE_INTEGER);var gt=Math.max(Je(this.number),Je(Nt));return new qe(He.toFixed(gt))}},{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(_t){return this.toNumber()===(_t==null?void 0:_t.toNumber())}},{key:"lessEquals",value:function(_t){return this.add(_t.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return _t?this.isInvalidate()?"":Ee(this.number):this.origin}}]),qe}();function lt(qe){return Oe()?new Kt(qe):new Ye(qe)}function Me(qe,st,_t){var Nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(qe==="")return"";var He=nt(qe),gt=He.negativeStr,Rt=He.integerStr,It=He.decimalStr,Zt="".concat(st).concat(It),Ut="".concat(gt).concat(Rt);if(_t>=0){var Nn=Number(It[_t]);if(Nn>=5&&!Nt){var hr=lt(qe).add("".concat(gt,"0.").concat("0".repeat(_t)).concat(10-Nn));return Me(hr.toString(),st,_t,Nt)}return _t===0?Ut:"".concat(Ut).concat(st).concat(It.padEnd(_t,"0").slice(0,_t))}return Zt===".0"?Ut:"".concat(Ut).concat(Zt)}var xe=lt,We=le(67656),je=le(67294);function Et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var vt=Et()?je.useLayoutEffect:je.useEffect,At=function(st,_t){var Nt=je.useRef(!0);vt(function(){return st(Nt.current)},_t),vt(function(){return Nt.current=!1,function(){Nt.current=!0}},[])},Qe=function(st,_t){At(function(Nt){if(!Nt)return st()},_t)},Bt=At,Lt=le(27183);function hn(qe,st,_t){var Nt=React.useRef({});return(!("value"in Nt.current)||_t(Nt.current.condition,st))&&(Nt.current.value=qe(),Nt.current.condition=st),Nt.current.value}function ut(qe,st){typeof qe=="function"?qe(st):(0,Le.Z)(qe)==="object"&&qe&&"current"in qe&&(qe.current=st)}function Yt(){for(var qe=arguments.length,st=new Array(qe),_t=0;_t<qe;_t++)st[_t]=arguments[_t];var Nt=st.filter(function(He){return He});return Nt.length<=1?Nt[0]:function(He){st.forEach(function(gt){ut(gt,He)})}}function vn(){for(var qe=arguments.length,st=new Array(qe),_t=0;_t<qe;_t++)st[_t]=arguments[_t];return useMemo(function(){return Yt.apply(void 0,st)},st,function(Nt,He){return Nt.length!==He.length||Nt.every(function(gt,Rt){return gt!==He[Rt]})})}function un(qe){var st,_t,Nt=isMemo(qe)?qe.type.type:qe.type;return!(typeof Nt=="function"&&!((st=Nt.prototype)!==null&&st!==void 0&&st.render)||typeof qe=="function"&&!((_t=qe.prototype)!==null&&_t!==void 0&&_t.render))}function Ze(qe){return!isValidElement(qe)||isFragment(qe)?!1:un(qe)}var Ae={},Pt=[],bn=function(st){Pt.push(st)};function nn(qe,st){if(0)var _t}function tt(qe,st){if(0)var _t}function ot(){Ae={}}function Ht(qe,st,_t){!st&&!Ae[_t]&&(qe(!1,_t),Ae[_t]=!0)}function En(qe,st){Ht(nn,qe,st)}function fn(qe,st){Ht(tt,qe,st)}En.preMessage=bn,En.resetWarned=ot,En.noteOnce=fn;var Gt=En;function Ft(qe,st){var _t=(0,je.useRef)(null);function Nt(){try{var gt=qe.selectionStart,Rt=qe.selectionEnd,It=qe.value,Zt=It.substring(0,gt),Ut=It.substring(Rt);_t.current={start:gt,end:Rt,value:It,beforeTxt:Zt,afterTxt:Ut}}catch(Nn){}}function He(){if(qe&&_t.current&&st)try{var gt=qe.value,Rt=_t.current,It=Rt.beforeTxt,Zt=Rt.afterTxt,Ut=Rt.start,Nn=gt.length;if(gt.endsWith(Zt))Nn=gt.length-_t.current.afterTxt.length;else if(gt.startsWith(It))Nn=It.length;else{var hr=It[Ut-1],Vn=gt.indexOf(hr,Ut-1);Vn!==-1&&(Nn=Vn+1)}qe.setSelectionRange(Nn,Nn)}catch(jn){Gt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(jn.message))}}return[Nt,He]}var xn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var qe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(qe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(qe==null?void 0:qe.substr(0,4))},gn=function(){var st=(0,je.useState)(!1),_t=(0,Se.Z)(st,2),Nt=_t[0],He=_t[1];return Bt(function(){He(xn())},[]),Nt},_e=gn,ce=function(st){return+setTimeout(st,16)},se=function(st){return clearTimeout(st)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ce=function(st){return window.requestAnimationFrame(st)},se=function(st){return window.cancelAnimationFrame(st)});var he=0,fe=new Map;function oe(qe){fe.delete(qe)}var ke=function(st){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;he+=1;var Nt=he;function He(gt){if(gt===0)oe(Nt),st();else{var Rt=ce(function(){He(gt-1)});fe.set(Nt,Rt)}}return He(_t),Nt};ke.cancel=function(qe){var st=fe.get(qe);return oe(st),se(st)};var Ge=ke,St=200,Tt=600;function Ot(qe){var st=qe.prefixCls,_t=qe.upNode,Nt=qe.downNode,He=qe.upDisabled,gt=qe.downDisabled,Rt=qe.onStep,It=je.useRef(),Zt=je.useRef([]),Ut=je.useRef();Ut.current=Rt;var Nn=function(){clearTimeout(It.current)},hr=function(pi,xi){pi.preventDefault(),Nn(),Ut.current(xi);function Zr(){Ut.current(xi),It.current=setTimeout(Zr,St)}It.current=setTimeout(Zr,Tt)};je.useEffect(function(){return function(){Nn(),Zt.current.forEach(function(Kn){return Ge.cancel(Kn)})}},[]);var Vn=_e();if(Vn)return null;var jn="".concat(st,"-handler"),Qn=et()(jn,"".concat(jn,"-up"),(0,Te.Z)({},"".concat(jn,"-up-disabled"),He)),tr=et()(jn,"".concat(jn,"-down"),(0,Te.Z)({},"".concat(jn,"-down-disabled"),gt)),Ar=function(){return Zt.current.push(Ge(Nn))},cn={unselectable:"on",role:"button",onMouseUp:Ar,onMouseLeave:Ar};return je.createElement("div",{className:"".concat(jn,"-wrap")},je.createElement("span",(0,ge.Z)({},cn,{onMouseDown:function(pi){hr(pi,!0)},"aria-label":"Increase Value","aria-disabled":He,className:Qn}),_t||je.createElement("span",{unselectable:"on",className:"".concat(st,"-handler-up-inner")})),je.createElement("span",(0,ge.Z)({},cn,{onMouseDown:function(pi){hr(pi,!1)},"aria-label":"Decrease Value","aria-disabled":gt,className:tr}),Nt||je.createElement("span",{unselectable:"on",className:"".concat(st,"-handler-down-inner")})))}function Wt(qe){var st=typeof qe=="number"?Ee(qe):nt(qe).fullStr,_t=st.includes(".");return _t?nt(st.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:qe+"0"}var $t=le(87887),Gn=function(){var qe=(0,je.useRef)(0),st=function(){Ge.cancel(qe.current)};return(0,je.useEffect)(function(){return st},[]),function(_t){st(),qe.current=Ge(function(){_t()})}},ar=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Dt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],tn=function(st,_t){return st||_t.isEmpty()?_t.toString():_t.toNumber()},qn=function(st){var _t=xe(st);return _t.isInvalidate()?null:_t},Er=je.forwardRef(function(qe,st){var _t,Nt=qe.prefixCls,He=Nt===void 0?"rc-input-number":Nt,gt=qe.className,Rt=qe.style,It=qe.min,Zt=qe.max,Ut=qe.step,Nn=Ut===void 0?1:Ut,hr=qe.defaultValue,Vn=qe.value,jn=qe.disabled,Qn=qe.readOnly,tr=qe.upHandler,Ar=qe.downHandler,cn=qe.keyboard,Kn=qe.controls,pi=Kn===void 0?!0:Kn,xi=qe.classNames,Zr=qe.stringMode,Rr=qe.parser,_i=qe.formatter,cr=qe.precision,ui=qe.decimalSeparator,wn=qe.onChange,Yi=qe.onInput,ki=qe.onPressEnter,wa=qe.onStep,qi=(0,me.Z)(qe,ar),Pi="".concat(He,"-input"),fa=je.useRef(null),ji=je.useState(!1),Ci=(0,Se.Z)(ji,2),ta=Ci[0],_a=Ci[1],na=je.useRef(!1),Ni=je.useRef(!1),ka=je.useRef(!1),Pa=je.useState(function(){return xe(Vn!=null?Vn:hr)}),ha=(0,Se.Z)(Pa,2),ai=ha[0],bt=ha[1];function mt(Hn){Vn===void 0&&bt(Hn)}var zt=je.useCallback(function(Hn,$n){if(!$n)return cr>=0?cr:Math.max(Je(Hn),Je(Nn))},[cr,Nn]),an=je.useCallback(function(Hn){var $n=String(Hn);if(Rr)return Rr($n);var Un=$n;return ui&&(Un=Un.replace(ui,".")),Un.replace(/[^\w.-]+/g,"")},[Rr,ui]),An=je.useRef(""),Sr=je.useCallback(function(Hn,$n){if(_i)return _i(Hn,{userTyping:$n,input:String(An.current)});var Un=typeof Hn=="number"?Ee(Hn):Hn;if(!$n){var Wn=zt(Un,$n);if(pt(Un)&&(ui||Wn>=0)){var ir=ui||".";Un=Me(Un,ir,Wn)}}return Un},[_i,zt,ui]),wr=je.useState(function(){var Hn=hr!=null?hr:Vn;return ai.isInvalidate()&&["string","number"].includes((0,Le.Z)(Hn))?Number.isNaN(Hn)?"":Hn:Sr(ai.toString(),!1)}),Tr=(0,Se.Z)(wr,2),$r=Tr[0],Dr=Tr[1];An.current=$r;function ei(Hn,$n){Dr(Sr(Hn.isInvalidate()?Hn.toString(!1):Hn.toString(!$n),$n))}var ci=je.useMemo(function(){return qn(Zt)},[Zt,cr]),Mi=je.useMemo(function(){return qn(It)},[It,cr]),Gi=je.useMemo(function(){return!ci||!ai||ai.isInvalidate()?!1:ci.lessEquals(ai)},[ci,ai]),Wi=je.useMemo(function(){return!Mi||!ai||ai.isInvalidate()?!1:ai.lessEquals(Mi)},[Mi,ai]),Fi=Ft(fa.current,ta),Ie=(0,Se.Z)(Fi,2),Fe=Ie[0],Ne=Ie[1],Ue=function($n){return ci&&!$n.lessEquals(ci)?ci:Mi&&!Mi.lessEquals($n)?Mi:null},it=function($n){return!Ue($n)},ft=function($n,Un){var Wn=$n,ir=it(Wn)||Wn.isEmpty();if(!Wn.isEmpty()&&!Un&&(Wn=Ue(Wn)||Wn,ir=!0),!Qn&&!jn&&ir){var ze=Wn.toString(),Ke=zt(ze,Un);return Ke>=0&&(Wn=xe(Me(ze,".",Ke)),it(Wn)||(Wn=xe(Me(ze,".",Ke,!0)))),Wn.equals(ai)||(mt(Wn),wn==null||wn(Wn.isEmpty()?null:tn(Zr,Wn)),Vn===void 0&&ei(Wn,Un)),Wn}return ai},xt=Gn(),Xt=function Hn($n){if(Fe(),An.current=$n,Dr($n),!Ni.current){var Un=an($n),Wn=xe(Un);Wn.isNaN()||ft(Wn,!0)}Yi==null||Yi($n),xt(function(){var ir=$n;Rr||(ir=$n.replace(/。/g,".")),ir!==$n&&Hn(ir)})},Qt=function(){Ni.current=!0},zn=function(){Ni.current=!1,Xt(fa.current.value)},nr=function($n){Xt($n.target.value)},Rn=function($n){var Un;if(!($n&&Gi||!$n&&Wi)){na.current=!1;var Wn=xe(ka.current?Wt(Nn):Nn);$n||(Wn=Wn.negate());var ir=(ai||xe(0)).add(Wn.toString()),ze=ft(ir,!1);wa==null||wa(tn(Zr,ze),{offset:ka.current?Wt(Nn):Nn,type:$n?"up":"down"}),(Un=fa.current)===null||Un===void 0||Un.focus()}},on=function($n){var Un=xe(an($r)),Wn=Un;Un.isNaN()?Wn=ft(ai,$n):Wn=ft(Un,$n),Vn!==void 0?ei(ai,!1):Wn.isNaN()||ei(Wn,!1)},rn=function(){na.current=!0},yn=function($n){var Un=$n.key,Wn=$n.shiftKey;na.current=!0,ka.current=Wn,Un==="Enter"&&(Ni.current||(na.current=!1),on(!1),ki==null||ki($n)),cn!==!1&&!Ni.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Un)&&(Rn(Un==="Up"||Un==="ArrowUp"),$n.preventDefault())},Mn=function(){na.current=!1,ka.current=!1},er=function(){on(!1),_a(!1),na.current=!1};return Qe(function(){ai.isInvalidate()||ei(ai,!1)},[cr]),Qe(function(){var Hn=xe(Vn);bt(Hn);var $n=xe(an($r));(!Hn.equals($n)||!na.current||_i)&&ei(Hn,na.current)},[Vn]),Qe(function(){_i&&Ne()},[$r]),je.createElement("div",{className:et()(He,xi==null?void 0:xi.input,gt,(_t={},(0,Te.Z)(_t,"".concat(He,"-focused"),ta),(0,Te.Z)(_t,"".concat(He,"-disabled"),jn),(0,Te.Z)(_t,"".concat(He,"-readonly"),Qn),(0,Te.Z)(_t,"".concat(He,"-not-a-number"),ai.isNaN()),(0,Te.Z)(_t,"".concat(He,"-out-of-range"),!ai.isInvalidate()&&!it(ai)),_t)),style:Rt,onFocus:function(){_a(!0)},onBlur:er,onKeyDown:yn,onKeyUp:Mn,onCompositionStart:Qt,onCompositionEnd:zn,onBeforeInput:rn},pi&&je.createElement(Ot,{prefixCls:He,upNode:tr,downNode:Ar,upDisabled:Gi,downDisabled:Wi,onStep:Rn}),je.createElement("div",{className:"".concat(Pi,"-wrap")},je.createElement("input",(0,ge.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":It,"aria-valuemax":Zt,"aria-valuenow":ai.isInvalidate()?null:ai.toString(),step:Nn},qi,{ref:Yt(fa,st),className:Pi,value:$r,onChange:nr,disabled:jn,readOnly:Qn}))))}),kn=je.forwardRef(function(qe,st){var _t=qe.disabled,Nt=qe.style,He=qe.prefixCls,gt=qe.value,Rt=qe.prefix,It=qe.suffix,Zt=qe.addonBefore,Ut=qe.addonAfter,Nn=qe.classes,hr=qe.className,Vn=qe.classNames,jn=(0,me.Z)(qe,Dt),Qn=je.useRef(null),tr=function(cn){Qn.current&&(0,$t.nH)(Qn.current,cn)};return je.createElement(We.BaseInput,{inputElement:je.createElement(Er,(0,ge.Z)({prefixCls:He,disabled:_t,classNames:Vn,ref:Yt(Qn,st)},jn)),className:hr,triggerFocus:tr,prefixCls:He,value:gt,disabled:_t,style:Nt,prefix:Rt,suffix:It,addonAfter:Ut,addonBefore:Zt,classes:Nn,classNames:Vn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});kn.displayName="InputNumber";var gr=kn,Di=gr,ni=le(9708),Xr=le(53124),Vr=le(46735),Si=le(98866),hi=le(98675),Ti=le(65223),Ii=le(4173),Lr=le(47673),Xi=le(14747),la=le(80110),va=le(67968),ya=le(45503);const $i=(qe,st)=>{let{componentCls:_t,borderRadiusSM:Nt,borderRadiusLG:He}=qe;const gt=st==="lg"?He:Nt;return{[`&-${st}`]:{[`${_t}-handler-wrap`]:{borderStartEndRadius:gt,borderEndEndRadius:gt},[`${_t}-handler-up`]:{borderStartEndRadius:gt},[`${_t}-handler-down`]:{borderEndEndRadius:gt}}}},Mt=qe=>{const{componentCls:st,lineWidth:_t,lineType:Nt,colorBorder:He,borderRadius:gt,fontSizeLG:Rt,controlHeightLG:It,controlHeightSM:Zt,colorError:Ut,paddingInlineSM:Nn,colorTextDescription:hr,motionDurationMid:Vn,handleHoverColor:jn,paddingInline:Qn,paddingBlock:tr,handleBg:Ar,handleActiveBg:cn,colorTextDisabled:Kn,borderRadiusSM:pi,borderRadiusLG:xi,controlWidth:Zr,handleVisible:Rr,handleBorderColor:_i}=qe;return[{[st]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Xi.Wf)(qe)),(0,Lr.ik)(qe)),(0,Lr.bi)(qe,st)),{display:"inline-block",width:Zr,margin:0,padding:0,border:`${_t}px ${Nt} ${He}`,borderRadius:gt,"&-rtl":{direction:"rtl",[`${st}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Rt,borderRadius:xi,[`input${st}-input`]:{height:It-2*_t}},"&-sm":{padding:0,borderRadius:pi,[`input${st}-input`]:{height:Zt-2*_t,padding:`0 ${Nn}px`}},"&:hover":Object.assign({},(0,Lr.pU)(qe)),"&-focused":Object.assign({},(0,Lr.M1)(qe)),"&-out-of-range":{[`${st}-input-wrap`]:{input:{color:Ut}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Xi.Wf)(qe)),(0,Lr.s7)(qe)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${st}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${st}-group-addon`]:{borderRadius:xi,fontSize:qe.fontSizeLG}},"&-sm":{[`${st}-group-addon`]:{borderRadius:pi}},[`${st}-wrapper-disabled > ${st}-group-addon`]:Object.assign({},(0,Lr.Xy)(qe))}}),[`&-disabled ${st}-input`]:{cursor:"not-allowed"},[st]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Xi.Wf)(qe)),{width:"100%",padding:`${tr}px ${Qn}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:gt,outline:0,transition:`all ${Vn} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Lr.nz)(qe.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[st]:Object.assign(Object.assign(Object.assign({[`&:hover ${st}-handler-wrap, &-focused ${st}-handler-wrap`]:{opacity:1},[`${st}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:qe.handleWidth,height:"100%",background:Ar,borderStartStartRadius:0,borderStartEndRadius:gt,borderEndEndRadius:gt,borderEndStartRadius:0,opacity:Rr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Vn} linear ${Vn}`,[`${st}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${st}-handler-up-inner,
|
|
|
${st}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:qe.handleFontSize}}},[`${st}-handler`]:{height:"50%",overflow:"hidden",color:hr,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${_t}px ${Nt} ${_i}`,transition:`all ${Vn} linear`,"&:active":{background:cn},"&:hover":{height:"60%",[`
|
|
|
${st}-handler-up-inner,
|
|
|
${st}-handler-down-inner
|
|
|
`]:{color:jn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Xi.Ro)()),{color:hr,transition:`all ${Vn} linear`,userSelect:"none"})},[`${st}-handler-up`]:{borderStartEndRadius:gt},[`${st}-handler-down`]:{borderBlockStart:`${_t}px ${Nt} ${_i}`,borderEndEndRadius:gt}},$i(qe,"lg")),$i(qe,"sm")),{"&-disabled, &-readonly":{[`${st}-handler-wrap`]:{display:"none"},[`${st}-input`]:{color:"inherit"}},[`
|
|
|
${st}-handler-up-disabled,
|
|
|
${st}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${st}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${st}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Kn}})},{[`${st}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${st}-handler-down`]:{borderBlockStartWidth:0}}}]},Cn=qe=>{const{componentCls:st,paddingBlock:_t,paddingInline:Nt,inputAffixPadding:He,controlWidth:gt,borderRadiusLG:Rt,borderRadiusSM:It}=qe;return{[`${st}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Lr.ik)(qe)),(0,Lr.bi)(qe,`${st}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:gt,padding:0,paddingInlineStart:Nt,"&-lg":{borderRadius:Rt},"&-sm":{borderRadius:It},[`&:not(${st}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Lr.pU)(qe)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${st}-disabled`]:{background:"transparent"},[`> div${st}`]:{width:"100%",border:"none",outline:"none",[`&${st}-focused`]:{boxShadow:"none !important"}},[`input${st}-input`]:{padding:`${_t}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${st}-handler-wrap`]:{zIndex:2},[st]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:He},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Nt,marginInlineStart:He}}})}};var _n=(0,va.Z)("InputNumber",qe=>{const st=(0,ya.TS)(qe,(0,Lr.e5)(qe));return[Mt(st),Cn(st),(0,la.c)(st)]},qe=>Object.assign(Object.assign({},(0,Lr.TM)(qe)),{controlWidth:90,handleWidth:qe.controlHeightSM-qe.lineWidth*2,handleFontSize:qe.fontSize/2,handleVisible:"auto",handleActiveBg:qe.colorFillAlter,handleBg:qe.colorBgContainer,handleHoverColor:qe.colorPrimary,handleBorderColor:qe.colorBorder})),In=function(qe,st){var _t={};for(var Nt in qe)Object.prototype.hasOwnProperty.call(qe,Nt)&&st.indexOf(Nt)<0&&(_t[Nt]=qe[Nt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,Nt=Object.getOwnPropertySymbols(qe);He<Nt.length;He++)st.indexOf(Nt[He])<0&&Object.prototype.propertyIsEnumerable.call(qe,Nt[He])&&(_t[Nt[He]]=qe[Nt[He]]);return _t};const mr=je.forwardRef((qe,st)=>{const{getPrefixCls:_t,direction:Nt}=je.useContext(Xr.E_),He=je.useRef(null);je.useImperativeHandle(st,()=>He.current);const{className:gt,rootClassName:Rt,size:It,disabled:Zt,prefixCls:Ut,addonBefore:Nn,addonAfter:hr,prefix:Vn,bordered:jn=!0,readOnly:Qn,status:tr,controls:Ar}=qe,cn=In(qe,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Kn=_t("input-number",Ut),[pi,xi]=_n(Kn),{compactSize:Zr,compactItemClassnames:Rr}=(0,Ii.ri)(Kn,Nt);let _i=je.createElement(Ve.Z,{className:`${Kn}-handler-up-inner`}),cr=je.createElement(be.Z,{className:`${Kn}-handler-down-inner`});const ui=typeof Ar=="boolean"?Ar:void 0;typeof Ar=="object"&&(_i=typeof Ar.upIcon=="undefined"?_i:je.createElement("span",{className:`${Kn}-handler-up-inner`},Ar.upIcon),cr=typeof Ar.downIcon=="undefined"?cr:je.createElement("span",{className:`${Kn}-handler-down-inner`},Ar.downIcon));const{hasFeedback:wn,status:Yi,isFormItemInput:ki,feedbackIcon:wa}=je.useContext(Ti.aM),qi=(0,ni.F)(Yi,tr),Pi=(0,hi.Z)(na=>{var Ni;return(Ni=It!=null?It:Zr)!==null&&Ni!==void 0?Ni:na}),fa=je.useContext(Si.Z),ji=Zt!=null?Zt:fa,Ci=et()({[`${Kn}-lg`]:Pi==="large",[`${Kn}-sm`]:Pi==="small",[`${Kn}-rtl`]:Nt==="rtl",[`${Kn}-borderless`]:!jn,[`${Kn}-in-form-item`]:ki},(0,ni.Z)(Kn,qi),Rr,xi),ta=`${Kn}-group`,_a=je.createElement(Di,Object.assign({ref:He,disabled:ji,className:et()(gt,Rt),upHandler:_i,downHandler:cr,prefixCls:Kn,readOnly:Qn,controls:ui,prefix:Vn,suffix:wn&&wa,addonAfter:hr&&je.createElement(Ii.BR,null,je.createElement(Ti.Ux,{override:!0,status:!0},hr)),addonBefore:Nn&&je.createElement(Ii.BR,null,je.createElement(Ti.Ux,{override:!0,status:!0},Nn)),classNames:{input:Ci},classes:{affixWrapper:et()((0,ni.Z)(`${Kn}-affix-wrapper`,qi,wn),{[`${Kn}-affix-wrapper-sm`]:Pi==="small",[`${Kn}-affix-wrapper-lg`]:Pi==="large",[`${Kn}-affix-wrapper-rtl`]:Nt==="rtl",[`${Kn}-affix-wrapper-borderless`]:!jn},xi),wrapper:et()({[`${ta}-rtl`]:Nt==="rtl",[`${Kn}-wrapper-disabled`]:ji},xi),group:et()({[`${Kn}-group-wrapper-sm`]:Pi==="small",[`${Kn}-group-wrapper-lg`]:Pi==="large",[`${Kn}-group-wrapper-rtl`]:Nt==="rtl"},(0,ni.Z)(`${Kn}-group-wrapper`,qi,wn),xi)}},cn));return pi(_a)}),Xn=mr,sr=qe=>je.createElement(Vr.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},je.createElement(mr,Object.assign({},qe)));Xn._InternalPanelDoNotUseOrYouWillBeFired=sr;var On=Xn},82586:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Kt},n:function(){return Ee}});var be=le(16646),Ve=le(94184),$e=le.n(Ve),et=le(67656),ge=le(17799),Te=le(67294),Le=le(9708),Se=le(53124),me=le(98866),Pe=le(98675),at=le(65223),Oe=le(4173),ht=le(72922),nt=le(47673);function rt(Ye){return!!(Ye.prefix||Ye.suffix||Ye.allowClear)}var Je=function(Ye,lt){var Me={};for(var xe in Ye)Object.prototype.hasOwnProperty.call(Ye,xe)&<.indexOf(xe)<0&&(Me[xe]=Ye[xe]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,xe=Object.getOwnPropertySymbols(Ye);We<xe.length;We++)lt.indexOf(xe[We])<0&&Object.prototype.propertyIsEnumerable.call(Ye,xe[We])&&(Me[xe[We]]=Ye[xe[We]]);return Me};function Ee(Ye,lt){if(!Ye)return;Ye.focus(lt);const{cursor:Me}=lt||{};if(Me){const xe=Ye.value.length;switch(Me){case"start":Ye.setSelectionRange(0,0);break;case"end":Ye.setSelectionRange(xe,xe);break;default:Ye.setSelectionRange(0,xe);break}}}var Kt=(0,Te.forwardRef)((Ye,lt)=>{var Me;const{prefixCls:xe,bordered:We=!0,status:je,size:Et,disabled:vt,onBlur:At,onFocus:Qe,suffix:Bt,allowClear:Lt,addonAfter:hn,addonBefore:ut,className:Yt,style:vn,styles:un,rootClassName:Ze,onChange:Ae,classNames:Pt}=Ye,bn=Je(Ye,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:nn,direction:tt,input:ot}=Te.useContext(Se.E_),Ht=nn("input",xe),En=(0,Te.useRef)(null),[fn,Gt]=(0,nt.ZP)(Ht),{compactSize:Ft,compactItemClassnames:xn}=(0,Oe.ri)(Ht,tt),gn=(0,Pe.Z)(ar=>{var Dt;return(Dt=Et!=null?Et:Ft)!==null&&Dt!==void 0?Dt:ar}),_e=Te.useContext(me.Z),ce=vt!=null?vt:_e,{status:se,hasFeedback:he,feedbackIcon:fe}=(0,Te.useContext)(at.aM),oe=(0,Le.F)(se,je),ke=rt(Ye)||!!he,Ge=(0,Te.useRef)(ke);(0,Te.useEffect)(()=>{var ar;ke&&Ge.current,Ge.current=ke},[ke]);const St=(0,ht.Z)(En,!0),Tt=ar=>{St(),At==null||At(ar)},Ot=ar=>{St(),Qe==null||Qe(ar)},Wt=ar=>{St(),Ae==null||Ae(ar)},$t=(he||Bt)&&Te.createElement(Te.Fragment,null,Bt,he&&fe);let Gn;return typeof Lt=="object"&&(Lt!=null&&Lt.clearIcon)?Gn=Lt:Lt&&(Gn={clearIcon:Te.createElement(be.Z,null)}),fn(Te.createElement(et.default,Object.assign({ref:(0,ge.sQ)(lt,En),prefixCls:Ht,autoComplete:ot==null?void 0:ot.autoComplete},bn,{disabled:ce,onBlur:Tt,onFocus:Ot,style:Object.assign(Object.assign({},ot==null?void 0:ot.style),vn),styles:Object.assign(Object.assign({},ot==null?void 0:ot.styles),un),suffix:$t,allowClear:Gn,className:$e()(Yt,Ze,xn,ot==null?void 0:ot.className),onChange:Wt,addonAfter:hn&&Te.createElement(Oe.BR,null,Te.createElement(at.Ux,{override:!0,status:!0},hn)),addonBefore:ut&&Te.createElement(Oe.BR,null,Te.createElement(at.Ux,{override:!0,status:!0},ut)),classNames:Object.assign(Object.assign(Object.assign({},Pt),ot==null?void 0:ot.classNames),{input:$e()({[`${Ht}-sm`]:gn==="small",[`${Ht}-lg`]:gn==="large",[`${Ht}-rtl`]:tt==="rtl",[`${Ht}-borderless`]:!We},!ke&&(0,Le.Z)(Ht,oe),Pt==null?void 0:Pt.input,(Me=ot==null?void 0:ot.classNames)===null||Me===void 0?void 0:Me.input,Gt)}),classes:{affixWrapper:$e()({[`${Ht}-affix-wrapper-sm`]:gn==="small",[`${Ht}-affix-wrapper-lg`]:gn==="large",[`${Ht}-affix-wrapper-rtl`]:tt==="rtl",[`${Ht}-affix-wrapper-borderless`]:!We},(0,Le.Z)(`${Ht}-affix-wrapper`,oe,he),Gt),wrapper:$e()({[`${Ht}-group-rtl`]:tt==="rtl"},Gt),group:$e()({[`${Ht}-group-wrapper-sm`]:gn==="small",[`${Ht}-group-wrapper-lg`]:gn==="large",[`${Ht}-group-wrapper-rtl`]:tt==="rtl",[`${Ht}-group-wrapper-disabled`]:ce},(0,Le.Z)(`${Ht}-group-wrapper`,oe,he),Gt)}})))})},96330:function(mn,Vt,le){"use strict";var be=le(16646),Ve=le(94184),$e=le.n(Ve),et=le(64701),ge=le(67294),Te=le(9708),Le=le(53124),Se=le(98866),me=le(98675),Pe=le(65223),at=le(82586),Oe=le(47673),ht=function(rt,Je){var Ee={};for(var pt in rt)Object.prototype.hasOwnProperty.call(rt,pt)&&Je.indexOf(pt)<0&&(Ee[pt]=rt[pt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Kt=0,pt=Object.getOwnPropertySymbols(rt);Kt<pt.length;Kt++)Je.indexOf(pt[Kt])<0&&Object.prototype.propertyIsEnumerable.call(rt,pt[Kt])&&(Ee[pt[Kt]]=rt[pt[Kt]]);return Ee};const nt=(0,ge.forwardRef)((rt,Je)=>{const{prefixCls:Ee,bordered:pt=!0,size:Kt,disabled:Ye,status:lt,allowClear:Me,showCount:xe,classNames:We,rootClassName:je,className:Et}=rt,vt=ht(rt,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:At,direction:Qe}=ge.useContext(Le.E_),Bt=(0,me.Z)(Kt),Lt=ge.useContext(Se.Z),hn=Ye!=null?Ye:Lt,{status:ut,hasFeedback:Yt,feedbackIcon:vn}=ge.useContext(Pe.aM),un=(0,Te.F)(ut,lt),Ze=ge.useRef(null);ge.useImperativeHandle(Je,()=>{var tt;return{resizableTextArea:(tt=Ze.current)===null||tt===void 0?void 0:tt.resizableTextArea,focus:ot=>{var Ht,En;(0,at.n)((En=(Ht=Ze.current)===null||Ht===void 0?void 0:Ht.resizableTextArea)===null||En===void 0?void 0:En.textArea,ot)},blur:()=>{var ot;return(ot=Ze.current)===null||ot===void 0?void 0:ot.blur()}}});const Ae=At("input",Ee);let Pt;typeof Me=="object"&&(Me!=null&&Me.clearIcon)?Pt=Me:Me&&(Pt={clearIcon:ge.createElement(be.Z,null)});const[bn,nn]=(0,Oe.ZP)(Ae);return bn(ge.createElement(et.default,Object.assign({},vt,{disabled:hn,allowClear:Pt,className:$e()(Et,je),classes:{affixWrapper:$e()(`${Ae}-textarea-affix-wrapper`,{[`${Ae}-affix-wrapper-rtl`]:Qe==="rtl",[`${Ae}-affix-wrapper-borderless`]:!pt,[`${Ae}-affix-wrapper-sm`]:Bt==="small",[`${Ae}-affix-wrapper-lg`]:Bt==="large",[`${Ae}-textarea-show-count`]:xe},(0,Te.Z)(`${Ae}-affix-wrapper`,un),nn)},classNames:Object.assign(Object.assign({},We),{textarea:$e()({[`${Ae}-borderless`]:!pt,[`${Ae}-sm`]:Bt==="small",[`${Ae}-lg`]:Bt==="large"},(0,Te.Z)(Ae,un),nn,We==null?void 0:We.textarea)}),prefixCls:Ae,suffix:Yt&&ge.createElement("span",{className:`${Ae}-textarea-suffix`},vn),showCount:xe,ref:Ze})))});Vt.Z=nt},72922:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ve}});var be=le(67294);function Ve($e,et){const ge=(0,be.useRef)([]),Te=()=>{ge.current.push(setTimeout(()=>{var Le,Se,me,Pe;!((Le=$e.current)===null||Le===void 0)&&Le.input&&((Se=$e.current)===null||Se===void 0?void 0:Se.input.getAttribute("type"))==="password"&&(!((me=$e.current)===null||me===void 0)&&me.input.hasAttribute("value"))&&((Pe=$e.current)===null||Pe===void 0||Pe.input.removeAttribute("value"))}))};return(0,be.useEffect)(()=>(et&&Te(),()=>ge.current.forEach(Le=>{Le&&clearTimeout(Le)})),[]),Te}},69677:function(mn,Vt,le){"use strict";le.d(Vt,{default:function(){return Bt}});var be=le(94184),Ve=le.n(be),$e=le(67294),et=le(53124),ge=le(65223),Te=le(47673),Se=Lt=>{const{getPrefixCls:hn,direction:ut}=(0,$e.useContext)(et.E_),{prefixCls:Yt,className:vn}=Lt,un=hn("input-group",Yt),Ze=hn("input"),[Ae,Pt]=(0,Te.ZP)(Ze),bn=Ve()(un,{[`${un}-lg`]:Lt.size==="large",[`${un}-sm`]:Lt.size==="small",[`${un}-compact`]:Lt.compact,[`${un}-rtl`]:ut==="rtl"},Pt,vn),nn=(0,$e.useContext)(ge.aM),tt=(0,$e.useMemo)(()=>Object.assign(Object.assign({},nn),{isFormItemInput:!1}),[nn]);return Ae($e.createElement("span",{className:bn,style:Lt.style,onMouseEnter:Lt.onMouseEnter,onMouseLeave:Lt.onMouseLeave,onFocus:Lt.onFocus,onBlur:Lt.onBlur},$e.createElement(ge.aM.Provider,{value:tt},Lt.children)))},me=le(82586),Pe=le(63237),at=le(99569),Oe=le(10366),ht=le(17799),nt=le(72922),rt=function(Lt,hn){var ut={};for(var Yt in Lt)Object.prototype.hasOwnProperty.call(Lt,Yt)&&hn.indexOf(Yt)<0&&(ut[Yt]=Lt[Yt]);if(Lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,Yt=Object.getOwnPropertySymbols(Lt);vn<Yt.length;vn++)hn.indexOf(Yt[vn])<0&&Object.prototype.propertyIsEnumerable.call(Lt,Yt[vn])&&(ut[Yt[vn]]=Lt[Yt[vn]]);return ut};const Je=Lt=>Lt?$e.createElement(at.Z,null):$e.createElement(Pe.Z,null),Ee={click:"onClick",hover:"onMouseOver"};var Kt=$e.forwardRef((Lt,hn)=>{const{visibilityToggle:ut=!0}=Lt,Yt=typeof ut=="object"&&ut.visible!==void 0,[vn,un]=(0,$e.useState)(()=>Yt?ut.visible:!1),Ze=(0,$e.useRef)(null);$e.useEffect(()=>{Yt&&un(ut.visible)},[Yt,ut]);const Ae=(0,nt.Z)(Ze),Pt=()=>{const{disabled:ce}=Lt;ce||(vn&&Ae(),un(se=>{var he;const fe=!se;return typeof ut=="object"&&((he=ut.onVisibleChange)===null||he===void 0||he.call(ut,fe)),fe}))},bn=ce=>{const{action:se="click",iconRender:he=Je}=Lt,fe=Ee[se]||"",oe=he(vn),ke={[fe]:Pt,className:`${ce}-icon`,key:"passwordIcon",onMouseDown:Ge=>{Ge.preventDefault()},onMouseUp:Ge=>{Ge.preventDefault()}};return $e.cloneElement($e.isValidElement(oe)?oe:$e.createElement("span",null,oe),ke)},{className:nn,prefixCls:tt,inputPrefixCls:ot,size:Ht}=Lt,En=rt(Lt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:fn}=$e.useContext(et.E_),Gt=fn("input",ot),Ft=fn("input-password",tt),xn=ut&&bn(Ft),gn=Ve()(Ft,nn,{[`${Ft}-${Ht}`]:!!Ht}),_e=Object.assign(Object.assign({},(0,Oe.Z)(En,["suffix","iconRender","visibilityToggle"])),{type:vn?"text":"password",className:gn,prefixCls:Gt,suffix:xn});return Ht&&(_e.size=Ht),$e.createElement(me.Z,Object.assign({ref:(0,ht.sQ)(hn,Ze)},_e))}),Ye=le(72395),lt=le(96159),Me=le(71577),xe=le(98675),We=le(4173),je=function(Lt,hn){var ut={};for(var Yt in Lt)Object.prototype.hasOwnProperty.call(Lt,Yt)&&hn.indexOf(Yt)<0&&(ut[Yt]=Lt[Yt]);if(Lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,Yt=Object.getOwnPropertySymbols(Lt);vn<Yt.length;vn++)hn.indexOf(Yt[vn])<0&&Object.prototype.propertyIsEnumerable.call(Lt,Yt[vn])&&(ut[Yt[vn]]=Lt[Yt[vn]]);return ut},vt=$e.forwardRef((Lt,hn)=>{const{prefixCls:ut,inputPrefixCls:Yt,className:vn,size:un,suffix:Ze,enterButton:Ae=!1,addonAfter:Pt,loading:bn,disabled:nn,onSearch:tt,onChange:ot,onCompositionStart:Ht,onCompositionEnd:En}=Lt,fn=je(Lt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Gt,direction:Ft}=$e.useContext(et.E_),xn=$e.useRef(!1),gn=Gt("input-search",ut),_e=Gt("input",Yt),{compactSize:ce}=(0,We.ri)(gn,Ft),se=(0,xe.Z)(tn=>{var qn;return(qn=un!=null?un:ce)!==null&&qn!==void 0?qn:tn}),he=$e.useRef(null),fe=tn=>{tn&&tn.target&&tn.type==="click"&&tt&&tt(tn.target.value,tn,{source:"clear"}),ot&&ot(tn)},oe=tn=>{var qn;document.activeElement===((qn=he.current)===null||qn===void 0?void 0:qn.input)&&tn.preventDefault()},ke=tn=>{var qn,Er;tt&&tt((Er=(qn=he.current)===null||qn===void 0?void 0:qn.input)===null||Er===void 0?void 0:Er.value,tn,{source:"input"})},Ge=tn=>{xn.current||bn||ke(tn)},St=typeof Ae=="boolean"?$e.createElement(Ye.Z,null):null,Tt=`${gn}-button`;let Ot;const Wt=Ae||{},$t=Wt.type&&Wt.type.__ANT_BUTTON===!0;$t||Wt.type==="button"?Ot=(0,lt.Tm)(Wt,Object.assign({onMouseDown:oe,onClick:tn=>{var qn,Er;(Er=(qn=Wt==null?void 0:Wt.props)===null||qn===void 0?void 0:qn.onClick)===null||Er===void 0||Er.call(qn,tn),ke(tn)},key:"enterButton"},$t?{className:Tt,size:se}:{})):Ot=$e.createElement(Me.ZP,{className:Tt,type:Ae?"primary":void 0,size:se,disabled:nn,key:"enterButton",onMouseDown:oe,onClick:ke,loading:bn,icon:St},Ae),Pt&&(Ot=[Ot,(0,lt.Tm)(Pt,{key:"addonAfter"})]);const Gn=Ve()(gn,{[`${gn}-rtl`]:Ft==="rtl",[`${gn}-${se}`]:!!se,[`${gn}-with-button`]:!!Ae},vn),ar=tn=>{xn.current=!0,Ht==null||Ht(tn)},Dt=tn=>{xn.current=!1,En==null||En(tn)};return $e.createElement(me.Z,Object.assign({ref:(0,ht.sQ)(he,hn),onPressEnter:Ge},fn,{size:se,onCompositionStart:ar,onCompositionEnd:Dt,prefixCls:_e,addonAfter:Ot,suffix:Ze,onChange:fe,className:Gn,disabled:nn}))}),At=le(96330);const Qe=me.Z;Qe.Group=Se,Qe.Search=vt,Qe.TextArea=At.Z,Qe.Password=Kt;var Bt=Qe},47673:function(mn,Vt,le){"use strict";le.d(Vt,{M1:function(){return Le},TM:function(){return lt},Xy:function(){return Se},bi:function(){return at},e5:function(){return Ye},ik:function(){return Oe},nz:function(){return ge},pU:function(){return Te},s7:function(){return ht},x0:function(){return Pe}});var be=le(14747),Ve=le(80110),$e=le(45503),et=le(67968);const ge=Me=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Me,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Te=Me=>({borderColor:Me.hoverBorderColor}),Le=Me=>({borderColor:Me.activeBorderColor,boxShadow:Me.activeShadow,outline:0}),Se=Me=>({color:Me.colorTextDisabled,backgroundColor:Me.colorBgContainerDisabled,borderColor:Me.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Te((0,$e.TS)(Me,{hoverBorderColor:Me.colorBorder})))}),me=Me=>{const{paddingBlockLG:xe,fontSizeLG:We,lineHeightLG:je,borderRadiusLG:Et,paddingInlineLG:vt}=Me;return{padding:`${xe}px ${vt}px`,fontSize:We,lineHeight:je,borderRadius:Et}},Pe=Me=>({padding:`${Me.paddingBlockSM}px ${Me.paddingInlineSM}px`,borderRadius:Me.borderRadiusSM}),at=(Me,xe)=>{const{componentCls:We,colorError:je,colorWarning:Et,errorActiveShadow:vt,warningActiveShadow:At,colorErrorBorderHover:Qe,colorWarningBorderHover:Bt}=Me;return{[`&-status-error:not(${xe}-disabled):not(${xe}-borderless)${xe}`]:{borderColor:je,"&:hover":{borderColor:Qe},"&:focus, &-focused":Object.assign({},Le((0,$e.TS)(Me,{activeBorderColor:je,activeShadow:vt}))),[`${We}-prefix, ${We}-suffix`]:{color:je}},[`&-status-warning:not(${xe}-disabled):not(${xe}-borderless)${xe}`]:{borderColor:Et,"&:hover":{borderColor:Bt},"&:focus, &-focused":Object.assign({},Le((0,$e.TS)(Me,{activeBorderColor:Et,activeShadow:At}))),[`${We}-prefix, ${We}-suffix`]:{color:Et}}}},Oe=Me=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Me.paddingBlock}px ${Me.paddingInline}px`,color:Me.colorText,fontSize:Me.fontSize,lineHeight:Me.lineHeight,backgroundColor:Me.colorBgContainer,backgroundImage:"none",borderWidth:Me.lineWidth,borderStyle:Me.lineType,borderColor:Me.colorBorder,borderRadius:Me.borderRadius,transition:`all ${Me.motionDurationMid}`},ge(Me.colorTextPlaceholder)),{"&:hover":Object.assign({},Te(Me)),"&:focus, &-focused":Object.assign({},Le(Me)),"&-disabled, &[disabled]":Object.assign({},Se(Me)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Me.controlHeight,lineHeight:Me.lineHeight,verticalAlign:"bottom",transition:`all ${Me.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},me(Me)),"&-sm":Object.assign({},Pe(Me)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ht=Me=>{const{componentCls:xe,antCls:We}=Me;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Me.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${xe}, &-lg > ${xe}-group-addon`]:Object.assign({},me(Me)),[`&-sm ${xe}, &-sm > ${xe}-group-addon`]:Object.assign({},Pe(Me)),[`&-lg ${We}-select-single ${We}-select-selector`]:{height:Me.controlHeightLG},[`&-sm ${We}-select-single ${We}-select-selector`]:{height:Me.controlHeightSM},[`> ${xe}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${xe}-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 ${Me.paddingInline}px`,color:Me.colorText,fontWeight:"normal",fontSize:Me.fontSize,textAlign:"center",backgroundColor:Me.colorFillAlter,border:`${Me.lineWidth}px ${Me.lineType} ${Me.colorBorder}`,borderRadius:Me.borderRadius,transition:`all ${Me.motionDurationSlow}`,lineHeight:1,[`${We}-select`]:{margin:`-${Me.paddingBlock+1}px -${Me.paddingInline}px`,[`&${We}-select-single:not(${We}-select-customize-input)`]:{[`${We}-select-selector`]:{backgroundColor:"inherit",border:`${Me.lineWidth}px ${Me.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${We}-select-selector`]:{color:Me.colorPrimary}}},[`${We}-cascader-picker`]:{margin:`-9px -${Me.paddingInline}px`,backgroundColor:"transparent",[`${We}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${xe}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${xe}-search-with-button &`]:{zIndex:0}}},[`> ${xe}:first-child, ${xe}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${We}-select ${We}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${xe}-affix-wrapper`]:{[`&:not(:first-child) ${xe}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${xe}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${xe}:last-child, ${xe}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${We}-select ${We}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${xe}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${xe}-search &`]:{borderStartStartRadius:Me.borderRadius,borderEndStartRadius:Me.borderRadius}},[`&:not(:first-child), ${xe}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${xe}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,be.dF)()),{[`${xe}-group-addon, ${xe}-group-wrap, > ${xe}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Me.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${xe}-affix-wrapper,
|
|
|
& > ${xe}-number-affix-wrapper,
|
|
|
& > ${We}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Me.lineWidth,borderInlineEndWidth:Me.lineWidth},[`${xe}`]:{float:"none"},[`& > ${We}-select > ${We}-select-selector,
|
|
|
& > ${We}-select-auto-complete ${xe},
|
|
|
& > ${We}-cascader-picker ${xe},
|
|
|
& > ${xe}-group-wrapper ${xe}`]:{borderInlineEndWidth:Me.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${We}-select-focused`]:{zIndex:1},[`& > ${We}-select > ${We}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${We}-select:first-child > ${We}-select-selector,
|
|
|
& > ${We}-select-auto-complete:first-child ${xe},
|
|
|
& > ${We}-cascader-picker:first-child ${xe}`]:{borderStartStartRadius:Me.borderRadius,borderEndStartRadius:Me.borderRadius},[`& > *:last-child,
|
|
|
& > ${We}-select:last-child > ${We}-select-selector,
|
|
|
& > ${We}-cascader-picker:last-child ${xe},
|
|
|
& > ${We}-cascader-picker-focused:last-child ${xe}`]:{borderInlineEndWidth:Me.lineWidth,borderStartEndRadius:Me.borderRadius,borderEndEndRadius:Me.borderRadius},[`& > ${We}-select-auto-complete ${xe}`]:{verticalAlign:"top"},[`${xe}-group-wrapper + ${xe}-group-wrapper`]:{marginInlineStart:-Me.lineWidth,[`${xe}-affix-wrapper`]:{borderRadius:0}},[`${xe}-group-wrapper:not(:last-child)`]:{[`&${xe}-search > ${xe}-group`]:{[`& > ${xe}-group-addon > ${xe}-search-button`]:{borderRadius:0},[`& > ${xe}`]:{borderStartStartRadius:Me.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Me.borderRadius}}}})}},nt=Me=>{const{componentCls:xe,controlHeightSM:We,lineWidth:je}=Me,vt=(We-je*2-16)/2;return{[xe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,be.Wf)(Me)),Oe(Me)),at(Me,xe)),{'&[type="color"]':{height:Me.controlHeight,[`&${xe}-lg`]:{height:Me.controlHeightLG},[`&${xe}-sm`]:{height:We,paddingTop:vt,paddingBottom:vt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},rt=Me=>{const{componentCls:xe}=Me;return{[`${xe}-clear-icon`]:{margin:0,color:Me.colorTextQuaternary,fontSize:Me.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Me.motionDurationSlow}`,"&:hover":{color:Me.colorTextTertiary},"&:active":{color:Me.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Me.inputAffixPadding}px`}}}},Je=Me=>{const{componentCls:xe,inputAffixPadding:We,colorTextDescription:je,motionDurationSlow:Et,colorIcon:vt,colorIconHover:At,iconCls:Qe}=Me;return{[`${xe}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Oe(Me)),{display:"inline-flex",[`&:not(${xe}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Te(Me)),{zIndex:1,[`${xe}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${xe}[disabled]`]:{background:"transparent"}},[`> input${xe}`]:{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"'},[`${xe}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Me.paddingXS}},"&-show-count-suffix":{color:je},"&-show-count-has-suffix":{marginInlineEnd:Me.paddingXXS},"&-prefix":{marginInlineEnd:We},"&-suffix":{marginInlineStart:We}}}),rt(Me)),{[`${Qe}${xe}-password-icon`]:{color:vt,cursor:"pointer",transition:`all ${Et}`,"&:hover":{color:At}}}),at(Me,`${xe}-affix-wrapper`))}},Ee=Me=>{const{componentCls:xe,colorError:We,colorWarning:je,borderRadiusLG:Et,borderRadiusSM:vt}=Me;return{[`${xe}-group`]:Object.assign(Object.assign(Object.assign({},(0,be.Wf)(Me)),ht(Me)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${xe}-group-addon`]:{borderRadius:Et,fontSize:Me.fontSizeLG}},"&-sm":{[`${xe}-group-addon`]:{borderRadius:vt}},"&-status-error":{[`${xe}-group-addon`]:{color:We,borderColor:We}},"&-status-warning":{[`${xe}-group-addon`]:{color:je,borderColor:je}},"&-disabled":{[`${xe}-group-addon`]:Object.assign({},Se(Me))},[`&:not(${xe}-compact-first-item):not(${xe}-compact-last-item)${xe}-compact-item`]:{[`${xe}, ${xe}-group-addon`]:{borderRadius:0}},[`&:not(${xe}-compact-last-item)${xe}-compact-first-item`]:{[`${xe}, ${xe}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${xe}-compact-first-item)${xe}-compact-last-item`]:{[`${xe}, ${xe}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},pt=Me=>{const{componentCls:xe,antCls:We}=Me,je=`${xe}-search`;return{[je]:{[`${xe}`]:{"&:hover, &:focus":{borderColor:Me.colorPrimaryHover,[`+ ${xe}-group-addon ${je}-button:not(${We}-btn-primary)`]:{borderInlineStartColor:Me.colorPrimaryHover}}},[`${xe}-affix-wrapper`]:{borderRadius:0},[`${xe}-lg`]:{lineHeight:Me.lineHeightLG-2e-4},[`> ${xe}-group`]:{[`> ${xe}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${je}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Me.borderRadius,borderEndEndRadius:Me.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${je}-button:not(${We}-btn-primary)`]:{color:Me.colorTextDescription,"&:hover":{color:Me.colorPrimaryHover},"&:active":{color:Me.colorPrimaryActive},[`&${We}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${je}-button`]:{height:Me.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${je}-button`]:{height:Me.controlHeightLG},[`&-small ${je}-button`]:{height:Me.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${xe}-compact-item`]:{[`&:not(${xe}-compact-last-item)`]:{[`${xe}-group-addon`]:{[`${xe}-search-button`]:{marginInlineEnd:-Me.lineWidth,borderRadius:0}}},[`&:not(${xe}-compact-first-item)`]:{[`${xe},${xe}-affix-wrapper`]:{borderRadius:0}},[`> ${xe}-group-addon ${xe}-search-button,
|
|
|
> ${xe},
|
|
|
${xe}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${xe}-affix-wrapper-focused`]:{zIndex:2}}}}},Kt=Me=>{const{componentCls:xe,paddingLG:We}=Me,je=`${xe}-textarea`;return{[je]:{position:"relative","&-show-count":{[`> ${xe}`]:{height:"100%"},[`${xe}-data-count`]:{position:"absolute",bottom:-Me.fontSize*Me.lineHeight,insetInlineEnd:0,color:Me.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${xe}`]:{paddingInlineEnd:We}},[`&-affix-wrapper${je}-has-feedback`]:{[`${xe}`]:{paddingInlineEnd:We}},[`&-affix-wrapper${xe}-affix-wrapper`]:{padding:0,[`> textarea${xe}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${xe}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${xe}-clear-icon`]:{position:"absolute",insetInlineEnd:Me.paddingXS,insetBlockStart:Me.paddingXS},[`${je}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Me.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Ye(Me){return(0,$e.TS)(Me,{inputAffixPadding:Me.paddingXXS})}const lt=Me=>{const{controlHeight:xe,fontSize:We,lineHeight:je,lineWidth:Et,controlHeightSM:vt,controlHeightLG:At,fontSizeLG:Qe,lineHeightLG:Bt,paddingSM:Lt,controlPaddingHorizontalSM:hn,controlPaddingHorizontal:ut,colorFillAlter:Yt,colorPrimaryHover:vn,controlOutlineWidth:un,controlOutline:Ze,colorErrorOutline:Ae,colorWarningOutline:Pt}=Me;return{paddingBlock:Math.max(Math.round((xe-We*je)/2*10)/10-Et,3),paddingBlockSM:Math.max(Math.round((vt-We*je)/2*10)/10-Et,0),paddingBlockLG:Math.ceil((At-Qe*Bt)/2*10)/10-Et,paddingInline:Lt-Et,paddingInlineSM:hn-Et,paddingInlineLG:ut-Et,addonBg:Yt,activeBorderColor:vn,hoverBorderColor:vn,activeShadow:`0 0 0 ${un}px ${Ze}`,errorActiveShadow:`0 0 0 ${un}px ${Ae}`,warningActiveShadow:`0 0 0 ${un}px ${Pt}`}};Vt.ZP=(0,et.Z)("Input",Me=>{const xe=(0,$e.TS)(Me,Ye(Me));return[nt(xe),Kt(xe),Je(xe),Ee(xe),pt(xe),(0,Ve.c)(xe)]},lt)},71322:function(mn,Vt,le){"use strict";le.d(Vt,{D:function(){return Kt},Z:function(){return Me}});var be=le(87462),Ve=le(67294),$e={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"},et=$e,ge=le(74643),Te=function(We,je){return Ve.createElement(ge.Z,(0,be.Z)({},We,{ref:je,icon:et}))},Le=Ve.forwardRef(Te),Se=le(22751),me=le(91034),Pe=le(94184),at=le.n(Pe),Oe=le(10366),nt=xe=>!isNaN(parseFloat(xe))&&isFinite(xe),rt=le(53124),Je=le(84321),Ee=function(xe,We){var je={};for(var Et in xe)Object.prototype.hasOwnProperty.call(xe,Et)&&We.indexOf(Et)<0&&(je[Et]=xe[Et]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,Et=Object.getOwnPropertySymbols(xe);vt<Et.length;vt++)We.indexOf(Et[vt])<0&&Object.prototype.propertyIsEnumerable.call(xe,Et[vt])&&(je[Et[vt]]=xe[Et[vt]]);return je};const pt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Kt=Ve.createContext({}),Ye=(()=>{let xe=0;return function(){let We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return xe+=1,`${We}${xe}`}})();var Me=Ve.forwardRef((xe,We)=>{const{prefixCls:je,className:Et,trigger:vt,children:At,defaultCollapsed:Qe=!1,theme:Bt="dark",style:Lt={},collapsible:hn=!1,reverseArrow:ut=!1,width:Yt=200,collapsedWidth:vn=80,zeroWidthTriggerStyle:un,breakpoint:Ze,onCollapse:Ae,onBreakpoint:Pt}=xe,bn=Ee(xe,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:nn}=(0,Ve.useContext)(Je.Gs),[tt,ot]=(0,Ve.useState)("collapsed"in xe?xe.collapsed:Qe),[Ht,En]=(0,Ve.useState)(!1);(0,Ve.useEffect)(()=>{"collapsed"in xe&&ot(xe.collapsed)},[xe.collapsed]);const fn=(ce,se)=>{"collapsed"in xe||ot(ce),Ae==null||Ae(ce,se)},Gt=(0,Ve.useRef)();Gt.current=ce=>{En(ce.matches),Pt==null||Pt(ce.matches),tt!==ce.matches&&fn(ce.matches,"responsive")},(0,Ve.useEffect)(()=>{function ce(he){return Gt.current(he)}let se;if(typeof window!="undefined"){const{matchMedia:he}=window;if(he&&Ze&&Ze in pt){se=he(`(max-width: ${pt[Ze]})`);try{se.addEventListener("change",ce)}catch(fe){se.addListener(ce)}ce(se)}}return()=>{try{se==null||se.removeEventListener("change",ce)}catch(he){se==null||se.removeListener(ce)}}},[Ze]),(0,Ve.useEffect)(()=>{const ce=Ye("ant-sider-");return nn.addSider(ce),()=>nn.removeSider(ce)},[]);const Ft=()=>{fn(!tt,"clickTrigger")},{getPrefixCls:xn}=(0,Ve.useContext)(rt.E_),gn=()=>{const ce=xn("layout-sider",je),se=(0,Oe.Z)(bn,["collapsed"]),he=tt?vn:Yt,fe=nt(he)?`${he}px`:String(he),oe=parseFloat(String(vn||0))===0?Ve.createElement("span",{onClick:Ft,className:at()(`${ce}-zero-width-trigger`,`${ce}-zero-width-trigger-${ut?"right":"left"}`),style:un},vt||Ve.createElement(Le,null)):null,St={expanded:ut?Ve.createElement(me.Z,null):Ve.createElement(Se.Z,null),collapsed:ut?Ve.createElement(Se.Z,null):Ve.createElement(me.Z,null)}[tt?"collapsed":"expanded"],Tt=vt!==null?oe||Ve.createElement("div",{className:`${ce}-trigger`,onClick:Ft,style:{width:fe}},vt||St):null,Ot=Object.assign(Object.assign({},Lt),{flex:`0 0 ${fe}`,maxWidth:fe,minWidth:fe,width:fe}),Wt=at()(ce,`${ce}-${Bt}`,{[`${ce}-collapsed`]:!!tt,[`${ce}-has-trigger`]:hn&&vt!==null&&!oe,[`${ce}-below`]:!!Ht,[`${ce}-zero-width`]:parseFloat(fe)===0},Et);return Ve.createElement("aside",Object.assign({className:Wt},se,{style:Ot,ref:We}),Ve.createElement("div",{className:`${ce}-children`},At),hn||Ht&&oe?Tt:null)},_e=Ve.useMemo(()=>({siderCollapsed:tt}),[tt]);return Ve.createElement(Kt.Provider,{value:_e},gn())})},84321:function(mn,Vt,le){"use strict";le.d(Vt,{VY:function(){return Ye},$_:function(){return Kt},h4:function(){return pt},Gs:function(){return ht},ZP:function(){return lt}});var be=le(74902),Ve=le(94184),$e=le.n(Ve),et=le(10366),ge=le(67294),Te=le(53124),Le=le(67968),me=Me=>{const{componentCls:xe,bodyBg:We,lightSiderBg:je,lightTriggerBg:Et,lightTriggerColor:vt}=Me;return{[`${xe}-sider-light`]:{background:je,[`${xe}-sider-trigger`]:{color:vt,background:Et},[`${xe}-sider-zero-width-trigger`]:{color:vt,background:Et,border:`1px solid ${We}`,borderInlineStart:0}}}};const Pe=Me=>{const{antCls:xe,componentCls:We,colorText:je,triggerColor:Et,footerBg:vt,triggerBg:At,headerHeight:Qe,headerPadding:Bt,headerColor:Lt,footerPadding:hn,triggerHeight:ut,zeroTriggerHeight:Yt,zeroTriggerWidth:vn,motionDurationMid:un,motionDurationSlow:Ze,fontSize:Ae,borderRadius:Pt,bodyBg:bn,headerBg:nn,siderBg:tt}=Me;return{[We]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:bn,"&, *":{boxSizing:"border-box"},[`&${We}-has-sider`]:{flexDirection:"row",[`> ${We}, > ${We}-content`]:{width:0}},[`${We}-header, &${We}-footer`]:{flex:"0 0 auto"},[`${We}-sider`]:{position:"relative",minWidth:0,background:tt,transition:`all ${un}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${xe}-menu${xe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:ut},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:ut,color:Et,lineHeight:`${ut}px`,textAlign:"center",background:At,cursor:"pointer",transition:`all ${un}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Qe,insetInlineEnd:-vn,zIndex:1,width:vn,height:Yt,color:Et,fontSize:Me.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:tt,borderStartStartRadius:0,borderStartEndRadius:Pt,borderEndEndRadius:Pt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Ze} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Ze}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-vn,borderStartStartRadius:Pt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Pt}}}}},me(Me)),{"&-rtl":{direction:"rtl"}}),[`${We}-header`]:{height:Qe,padding:Bt,color:Lt,lineHeight:`${Qe}px`,background:nn,[`${xe}-menu`]:{lineHeight:"inherit"}},[`${We}-footer`]:{padding:hn,color:je,fontSize:Ae,background:vt},[`${We}-content`]:{flex:"auto",minHeight:0}}};var at=(0,Le.Z)("Layout",Me=>[Pe(Me)],Me=>{const{colorBgLayout:xe,controlHeight:We,controlHeightLG:je,colorText:Et,controlHeightSM:vt,marginXXS:At,colorTextLightSolid:Qe,colorBgContainer:Bt}=Me,Lt=je*1.25;return{colorBgHeader:"#001529",colorBgBody:xe,colorBgTrigger:"#002140",bodyBg:xe,headerBg:"#001529",headerHeight:We*2,headerPadding:`0 ${Lt}px`,headerColor:Et,footerPadding:`${vt}px ${Lt}px`,footerBg:xe,siderBg:"#001529",triggerHeight:je+At*2,triggerBg:"#002140",triggerColor:Qe,zeroTriggerWidth:je,zeroTriggerHeight:je,lightSiderBg:Bt,lightTriggerBg:Bt,lightTriggerColor:Et}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Oe=function(Me,xe){var We={};for(var je in Me)Object.prototype.hasOwnProperty.call(Me,je)&&xe.indexOf(je)<0&&(We[je]=Me[je]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,je=Object.getOwnPropertySymbols(Me);Et<je.length;Et++)xe.indexOf(je[Et])<0&&Object.prototype.propertyIsEnumerable.call(Me,je[Et])&&(We[je[Et]]=Me[je[Et]]);return We};const ht=ge.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function nt(Me){let{suffixCls:xe,tagName:We,displayName:je}=Me;return Et=>ge.forwardRef((At,Qe)=>ge.createElement(Et,Object.assign({ref:Qe,suffixCls:xe,tagName:We},At)))}const rt=ge.forwardRef((Me,xe)=>{const{prefixCls:We,suffixCls:je,className:Et,tagName:vt}=Me,At=Oe(Me,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Qe}=ge.useContext(Te.E_),Bt=Qe("layout",We),[Lt,hn]=at(Bt),ut=je?`${Bt}-${je}`:Bt;return Lt(ge.createElement(vt,Object.assign({className:$e()(We||ut,Et,hn),ref:xe},At)))}),Je=ge.forwardRef((Me,xe)=>{const{direction:We}=ge.useContext(Te.E_),[je,Et]=ge.useState([]),{prefixCls:vt,className:At,rootClassName:Qe,children:Bt,hasSider:Lt,tagName:hn,style:ut}=Me,Yt=Oe(Me,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),vn=(0,et.Z)(Yt,["suffixCls"]),{getPrefixCls:un,layout:Ze}=ge.useContext(Te.E_),Ae=un("layout",vt),[Pt,bn]=at(Ae),nn=$e()(Ae,{[`${Ae}-has-sider`]:typeof Lt=="boolean"?Lt:je.length>0,[`${Ae}-rtl`]:We==="rtl"},Ze==null?void 0:Ze.className,At,Qe,bn),tt=ge.useMemo(()=>({siderHook:{addSider:ot=>{Et(Ht=>[].concat((0,be.Z)(Ht),[ot]))},removeSider:ot=>{Et(Ht=>Ht.filter(En=>En!==ot))}}}),[]);return Pt(ge.createElement(ht.Provider,{value:tt},ge.createElement(hn,Object.assign({ref:xe,className:nn,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),ut)},vn),Bt)))}),Ee=nt({tagName:"div",displayName:"Layout"})(Je),pt=nt({suffixCls:"header",tagName:"header",displayName:"Header"})(rt),Kt=nt({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(rt),Ye=nt({suffixCls:"content",tagName:"main",displayName:"Content"})(rt);var lt=Ee},76529:function(mn,Vt,le){"use strict";le.d(Vt,{J:function(){return Te}});var be=le(67294),Ve=le(4173),$e=le(60276),et=function(Le,Se){var me={};for(var Pe in Le)Object.prototype.hasOwnProperty.call(Le,Pe)&&Se.indexOf(Pe)<0&&(me[Pe]=Le[Pe]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Pe=Object.getOwnPropertySymbols(Le);at<Pe.length;at++)Se.indexOf(Pe[at])<0&&Object.prototype.propertyIsEnumerable.call(Le,Pe[at])&&(me[Pe[at]]=Le[Pe[at]]);return me};const ge=be.createContext(null),Te=be.forwardRef((Le,Se)=>{const{children:me}=Le,Pe=et(Le,["children"]),at=be.useContext(ge),Oe=be.useMemo(()=>Object.assign(Object.assign({},at),Pe),[at,Pe.prefixCls,Pe.mode,Pe.selectable]);return be.createElement(ge.Provider,{value:Oe},be.createElement(Ve.BR,null,(0,$e.supportNodeRef)(me)?be.cloneElement(me,{ref:Se}):me))});Vt.Z=ge},68508:function(mn,Vt,le){"use strict";le.d(Vt,{default:function(){return ce}});var be=le(78595),Ve=le(67294),$e=le(71322),et=le(94184),ge=le.n(et),Te=le(53124),Le=function(se,he){var fe={};for(var oe in se)Object.prototype.hasOwnProperty.call(se,oe)&&he.indexOf(oe)<0&&(fe[oe]=se[oe]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,oe=Object.getOwnPropertySymbols(se);ke<oe.length;ke++)he.indexOf(oe[ke])<0&&Object.prototype.propertyIsEnumerable.call(se,oe[ke])&&(fe[oe[ke]]=se[oe[ke]]);return fe},me=se=>{const{prefixCls:he,className:fe,dashed:oe}=se,ke=Le(se,["prefixCls","className","dashed"]),{getPrefixCls:Ge}=Ve.useContext(Te.E_),St=Ge("menu",he),Tt=ge()({[`${St}-item-divider-dashed`]:!!oe},fe);return Ve.createElement(be.iz,Object.assign({className:Tt},ke))},Pe=le(37419),at=le(10366),Oe=le(83062),ht=le(96159),rt=(0,Ve.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Ee=se=>{var he;const{className:fe,children:oe,icon:ke,title:Ge,danger:St}=se,{prefixCls:Tt,firstLevel:Ot,direction:Wt,disableMenuItemTitleTooltip:$t,inlineCollapsed:Gn}=Ve.useContext(rt),ar=gr=>{const Di=Ve.createElement("span",{className:`${Tt}-title-content`},oe);return(!ke||(0,ht.l$)(oe)&&oe.type==="span")&&oe&&gr&&Ot&&typeof oe=="string"?Ve.createElement("div",{className:`${Tt}-inline-collapsed-noicon`},oe.charAt(0)):Di},{siderCollapsed:Dt}=Ve.useContext($e.D);let tn=Ge;typeof Ge=="undefined"?tn=Ot?oe:"":Ge===!1&&(tn="");const qn={title:tn};!Dt&&!Gn&&(qn.title=null,qn.open=!1);const Er=(0,Pe.Z)(oe).length;let kn=Ve.createElement(be.ck,Object.assign({},(0,at.Z)(se,["title","icon","danger"]),{className:ge()({[`${Tt}-item-danger`]:St,[`${Tt}-item-only-child`]:(ke?Er+1:Er)===1},fe),title:typeof Ge=="string"?Ge:void 0}),(0,ht.Tm)(ke,{className:ge()((0,ht.l$)(ke)?(he=ke.props)===null||he===void 0?void 0:he.className:"",`${Tt}-item-icon`)}),ar(Gn));return $t||(kn=Ve.createElement(Oe.Z,Object.assign({},qn,{placement:Wt==="rtl"?"left":"right",overlayClassName:`${Tt}-inline-collapsed-tooltip`}),kn)),kn},Kt=se=>{var he;const{popupClassName:fe,icon:oe,title:ke,theme:Ge}=se,St=Ve.useContext(rt),{prefixCls:Tt,inlineCollapsed:Ot,theme:Wt}=St,$t=(0,be.Xl)();let Gn;if(!oe)Gn=Ot&&!$t.length&&ke&&typeof ke=="string"?Ve.createElement("div",{className:`${Tt}-inline-collapsed-noicon`},ke.charAt(0)):Ve.createElement("span",{className:`${Tt}-title-content`},ke);else{const Dt=(0,ht.l$)(ke)&&ke.type==="span";Gn=Ve.createElement(Ve.Fragment,null,(0,ht.Tm)(oe,{className:ge()((0,ht.l$)(oe)?(he=oe.props)===null||he===void 0?void 0:he.className:"",`${Tt}-item-icon`)}),Dt?ke:Ve.createElement("span",{className:`${Tt}-title-content`},ke))}const ar=Ve.useMemo(()=>Object.assign(Object.assign({},St),{firstLevel:!1}),[St]);return Ve.createElement(rt.Provider,{value:ar},Ve.createElement(be.Wd,Object.assign({},(0,at.Z)(se,["icon"]),{title:Gn,popupClassName:ge()(Tt,fe,`${Tt}-${Ge||Wt}`)})))},Ye=le(25877),lt=le(60276),Me=le(33603),xe=le(76529),We=function(se,he){var fe={};for(var oe in se)Object.prototype.hasOwnProperty.call(se,oe)&&he.indexOf(oe)<0&&(fe[oe]=se[oe]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,oe=Object.getOwnPropertySymbols(se);ke<oe.length;ke++)he.indexOf(oe[ke])<0&&Object.prototype.propertyIsEnumerable.call(se,oe[ke])&&(fe[oe[ke]]=se[oe[ke]]);return fe};function je(se){return(se||[]).map((he,fe)=>{if(he&&typeof he=="object"){const oe=he,{label:ke,children:Ge,key:St,type:Tt}=oe,Ot=We(oe,["label","children","key","type"]),Wt=St!=null?St:`tmp-${fe}`;return Ge||Tt==="group"?Tt==="group"?Ve.createElement(be.BW,Object.assign({key:Wt},Ot,{title:ke}),je(Ge)):Ve.createElement(Kt,Object.assign({key:Wt},Ot,{title:ke}),je(Ge)):Tt==="divider"?Ve.createElement(me,Object.assign({key:Wt},Ot)):Ve.createElement(Ee,Object.assign({key:Wt},Ot),ke)}return null}).filter(he=>he)}function Et(se){return Ve.useMemo(()=>se&&je(se),[se])}var vt=le(84780),At=le(14747),Qe=le(33507),Bt=le(67771),Lt=le(50438),hn=le(67968),ut=le(45503),vn=se=>{const{componentCls:he,motionDurationSlow:fe,horizontalLineHeight:oe,colorSplit:ke,lineWidth:Ge,lineType:St,itemPaddingInline:Tt}=se;return{[`${he}-horizontal`]:{lineHeight:oe,border:0,borderBottom:`${Ge}px ${St} ${ke}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${he}-item, ${he}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Tt},[`> ${he}-item:hover,
|
|
|
> ${he}-item-active,
|
|
|
> ${he}-submenu ${he}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${he}-item, ${he}-submenu-title`]:{transition:[`border-color ${fe}`,`background ${fe}`].join(",")},[`${he}-submenu-arrow`]:{display:"none"}}}},Ze=se=>{let{componentCls:he,menuArrowOffset:fe}=se;return{[`${he}-rtl`]:{direction:"rtl"},[`${he}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${he}-rtl${he}-vertical,
|
|
|
${he}-submenu-rtl ${he}-vertical`]:{[`${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${fe})`},"&::after":{transform:`rotate(45deg) translateY(${fe})`}}}}};const Ae=se=>Object.assign({},(0,At.oN)(se));var bn=(se,he)=>{const{componentCls:fe,itemColor:oe,itemSelectedColor:ke,groupTitleColor:Ge,itemBg:St,subMenuItemBg:Tt,itemSelectedBg:Ot,activeBarHeight:Wt,activeBarWidth:$t,activeBarBorderWidth:Gn,motionDurationSlow:ar,motionEaseInOut:Dt,motionEaseOut:tn,itemPaddingInline:qn,motionDurationMid:Er,itemHoverColor:kn,lineType:gr,colorSplit:Di,itemDisabledColor:ni,dangerItemColor:Xr,dangerItemHoverColor:Vr,dangerItemSelectedColor:Si,dangerItemActiveBg:hi,dangerItemSelectedBg:Ti,itemHoverBg:Ii,itemActiveBg:Lr,menuSubMenuBg:Xi,horizontalItemSelectedColor:la,horizontalItemSelectedBg:va,horizontalItemBorderRadius:ya,horizontalItemHoverBg:$i,popupBg:Mt}=se;return{[`${fe}-${he}, ${fe}-${he} > ${fe}`]:{color:oe,background:St,[`&${fe}-root:focus-visible`]:Object.assign({},Ae(se)),[`${fe}-item-group-title`]:{color:Ge},[`${fe}-submenu-selected`]:{[`> ${fe}-submenu-title`]:{color:ke}},[`${fe}-item-disabled, ${fe}-submenu-disabled`]:{color:`${ni} !important`},[`${fe}-item:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{[`&:hover, > ${fe}-submenu-title:hover`]:{color:kn}},[`&:not(${fe}-horizontal)`]:{[`${fe}-item:not(${fe}-item-selected)`]:{"&:hover":{backgroundColor:Ii},"&:active":{backgroundColor:Lr}},[`${fe}-submenu-title`]:{"&:hover":{backgroundColor:Ii},"&:active":{backgroundColor:Lr}}},[`${fe}-item-danger`]:{color:Xr,[`&${fe}-item:hover`]:{[`&:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{color:Vr}},[`&${fe}-item:active`]:{background:hi}},[`${fe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${fe}-item-selected`]:{color:ke,[`&${fe}-item-danger`]:{color:Si},"a, a:hover":{color:"inherit"}},[`& ${fe}-item-selected`]:{backgroundColor:Ot,[`&${fe}-item-danger`]:{backgroundColor:Ti}},[`${fe}-item, ${fe}-submenu-title`]:{[`&:not(${fe}-item-disabled):focus-visible`]:Object.assign({},Ae(se))},[`&${fe}-submenu > ${fe}`]:{backgroundColor:Xi},[`&${fe}-popup > ${fe}`]:{backgroundColor:Mt},[`&${fe}-horizontal`]:Object.assign(Object.assign({},he==="dark"?{borderBottom:0}:{}),{[`> ${fe}-item, > ${fe}-submenu`]:{top:Gn,marginTop:-Gn,marginBottom:0,borderRadius:ya,"&::after":{position:"absolute",insetInline:qn,bottom:0,borderBottom:`${Wt}px solid transparent`,transition:`border-color ${ar} ${Dt}`,content:'""'},"&:hover, &-active, &-open":{background:$i,"&::after":{borderBottomWidth:Wt,borderBottomColor:la}},"&-selected":{color:la,backgroundColor:va,"&:hover":{backgroundColor:va},"&::after":{borderBottomWidth:Wt,borderBottomColor:la}}}}),[`&${fe}-root`]:{[`&${fe}-inline, &${fe}-vertical`]:{borderInlineEnd:`${Gn}px ${gr} ${Di}`}},[`&${fe}-inline`]:{[`${fe}-sub${fe}-inline`]:{background:Tt},[`${fe}-item, ${fe}-submenu-title`]:Gn&&$t?{width:`calc(100% + ${Gn}px)`}:{},[`${fe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${$t}px solid ${ke}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Er} ${tn}`,`opacity ${Er} ${tn}`].join(","),content:'""'},[`&${fe}-item-danger`]:{"&::after":{borderInlineEndColor:Si}}},[`${fe}-selected, ${fe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Er} ${Dt}`,`opacity ${Er} ${Dt}`].join(",")}}}}}};const nn=se=>{const{componentCls:he,itemHeight:fe,itemMarginInline:oe,padding:ke,menuArrowSize:Ge,marginXS:St,itemMarginBlock:Tt}=se,Ot=ke+Ge+St;return{[`${he}-item`]:{position:"relative",overflow:"hidden"},[`${he}-item, ${he}-submenu-title`]:{height:fe,lineHeight:`${fe}px`,paddingInline:ke,overflow:"hidden",textOverflow:"ellipsis",marginInline:oe,marginBlock:Tt,width:`calc(100% - ${oe*2}px)`},[`> ${he}-item,
|
|
|
> ${he}-submenu > ${he}-submenu-title`]:{height:fe,lineHeight:`${fe}px`},[`${he}-item-group-list ${he}-submenu-title,
|
|
|
${he}-submenu-title`]:{paddingInlineEnd:Ot}}};var ot=se=>{const{componentCls:he,iconCls:fe,itemHeight:oe,colorTextLightSolid:ke,dropdownWidth:Ge,controlHeightLG:St,motionDurationMid:Tt,motionEaseOut:Ot,paddingXL:Wt,itemMarginInline:$t,fontSizeLG:Gn,motionDurationSlow:ar,paddingXS:Dt,boxShadowSecondary:tn,collapsedWidth:qn,collapsedIconSize:Er}=se,kn={height:oe,lineHeight:`${oe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[he]:{"&-inline, &-vertical":Object.assign({[`&${he}-root`]:{boxShadow:"none"}},nn(se))},[`${he}-submenu-popup`]:{[`${he}-vertical`]:Object.assign(Object.assign({},nn(se)),{boxShadow:tn})}},{[`${he}-submenu-popup ${he}-vertical${he}-sub`]:{minWidth:Ge,maxHeight:`calc(100vh - ${St*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${he}-inline`]:{width:"100%",[`&${he}-root`]:{[`${he}-item, ${he}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${ar}`,`background ${ar}`,`padding ${Tt} ${Ot}`].join(","),[`> ${he}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${he}-sub${he}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${he}-submenu > ${he}-submenu-title`]:kn,[`& ${he}-item-group-title`]:{paddingInlineStart:Wt}},[`${he}-item`]:kn}},{[`${he}-inline-collapsed`]:{width:qn,[`&${he}-root`]:{[`${he}-item, ${he}-submenu ${he}-submenu-title`]:{[`> ${he}-inline-collapsed-noicon`]:{fontSize:Gn,textAlign:"center"}}},[`> ${he}-item,
|
|
|
> ${he}-item-group > ${he}-item-group-list > ${he}-item,
|
|
|
> ${he}-item-group > ${he}-item-group-list > ${he}-submenu > ${he}-submenu-title,
|
|
|
> ${he}-submenu > ${he}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Gn/2}px - ${$t}px)`,textOverflow:"clip",[`
|
|
|
${he}-submenu-arrow,
|
|
|
${he}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${he}-item-icon, ${fe}`]:{margin:0,fontSize:Er,lineHeight:`${oe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${he}-item-icon, ${fe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${he}-item-icon, ${fe}`]:{display:"none"},"a, a:hover":{color:ke}},[`${he}-item-group-title`]:Object.assign(Object.assign({},At.vS),{paddingInline:Dt})}}]};const Ht=se=>{const{componentCls:he,motionDurationSlow:fe,motionDurationMid:oe,motionEaseInOut:ke,motionEaseOut:Ge,iconCls:St,iconSize:Tt,iconMarginInlineEnd:Ot}=se;return{[`${he}-item, ${he}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${fe}`,`background ${fe}`,`padding ${fe} ${ke}`].join(","),[`${he}-item-icon, ${St}`]:{minWidth:Tt,fontSize:Tt,transition:[`font-size ${oe} ${Ge}`,`margin ${fe} ${ke}`,`color ${fe}`].join(","),"+ span":{marginInlineStart:Ot,opacity:1,transition:[`opacity ${fe} ${ke}`,`margin ${fe}`,`color ${fe}`].join(",")}},[`${he}-item-icon`]:Object.assign({},(0,At.Ro)()),[`&${he}-item-only-child`]:{[`> ${St}, > ${he}-item-icon`]:{marginInlineEnd:0}}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${he}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},En=se=>{const{componentCls:he,motionDurationSlow:fe,motionEaseInOut:oe,borderRadius:ke,menuArrowSize:Ge,menuArrowOffset:St}=se;return{[`${he}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:se.margin,width:Ge,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${fe} ${oe}, opacity ${fe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ge*.6,height:Ge*.15,backgroundColor:"currentcolor",borderRadius:ke,transition:[`background ${fe} ${oe}`,`transform ${fe} ${oe}`,`top ${fe} ${oe}`,`color ${fe} ${oe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${St})`},"&::after":{transform:`rotate(-45deg) translateY(${St})`}}}}},fn=se=>{const{antCls:he,componentCls:fe,fontSize:oe,motionDurationSlow:ke,motionDurationMid:Ge,motionEaseInOut:St,paddingXS:Tt,padding:Ot,colorSplit:Wt,lineWidth:$t,zIndexPopup:Gn,borderRadiusLG:ar,subMenuItemBorderRadius:Dt,menuArrowSize:tn,menuArrowOffset:qn,lineType:Er,menuPanelMaskInset:kn,groupTitleLineHeight:gr,groupTitleFontSize:Di}=se;return[{"":{[`${fe}`]:Object.assign(Object.assign({},(0,At.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,At.Wf)(se)),(0,At.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:oe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ke} 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:se.itemBorderRadius},[`${fe}-item-group-title`]:{padding:`${Tt}px ${Ot}px`,fontSize:Di,lineHeight:gr,transition:`all ${ke}`},[`&-horizontal ${fe}-submenu`]:{transition:[`border-color ${ke} ${St}`,`background ${ke} ${St}`].join(",")},[`${fe}-submenu, ${fe}-submenu-inline`]:{transition:[`border-color ${ke} ${St}`,`background ${ke} ${St}`,`padding ${Ge} ${St}`].join(",")},[`${fe}-submenu ${fe}-sub`]:{cursor:"initial",transition:[`background ${ke} ${St}`,`padding ${ke} ${St}`].join(",")},[`${fe}-title-content`]:{transition:`color ${ke}`},[`${fe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${fe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Wt,borderStyle:Er,borderWidth:0,borderTopWidth:$t,marginBlock:$t,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Ht(se)),{[`${fe}-item-group`]:{[`${fe}-item-group-list`]:{margin:0,padding:0,[`${fe}-item, ${fe}-submenu-title`]:{paddingInline:`${oe*2}px ${Ot}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Gn,borderRadius:ar,boxShadow:"none",transformOrigin:"0 0",[`&${fe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${kn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:kn},"\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:se.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:se.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:se.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:se.paddingXS},[`> ${fe}`]:Object.assign(Object.assign(Object.assign({borderRadius:ar},Ht(se)),En(se)),{[`${fe}-item, ${fe}-submenu > ${fe}-submenu-title`]:{borderRadius:Dt},[`${fe}-submenu-title::after`]:{transition:`transform ${ke} ${St}`}})}}),En(se)),{[`&-inline-collapsed ${fe}-submenu-arrow,
|
|
|
&-inline ${fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${qn})`},"&::after":{transform:`rotate(45deg) translateX(-${qn})`}},[`${fe}-submenu-open${fe}-submenu-inline > ${fe}-submenu-title > ${fe}-submenu-arrow`]:{transform:`translateY(-${tn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${qn})`},"&::before":{transform:`rotate(45deg) translateX(${qn})`}}})},{[`${he}-layout-header`]:{[fe]:{lineHeight:"inherit"}}}]};var Gt=(se,he)=>(0,hn.Z)("Menu",oe=>{if(he===!1)return[];const{colorBgElevated:ke,colorPrimary:Ge,colorTextLightSolid:St,controlHeightLG:Tt,fontSize:Ot,darkItemColor:Wt,darkDangerItemColor:$t,darkItemBg:Gn,darkSubMenuItemBg:ar,darkItemSelectedColor:Dt,darkItemSelectedBg:tn,darkDangerItemSelectedBg:qn,darkItemHoverBg:Er,darkGroupTitleColor:kn,darkItemHoverColor:gr,darkItemDisabledColor:Di,darkDangerItemHoverColor:ni,darkDangerItemSelectedColor:Xr,darkDangerItemActiveBg:Vr}=oe,Si=Ot/7*5,hi=(0,ut.TS)(oe,{menuArrowSize:Si,menuHorizontalHeight:Tt*1.15,menuArrowOffset:`${Si*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:ke}),Ti=(0,ut.TS)(hi,{itemColor:Wt,itemHoverColor:gr,groupTitleColor:kn,itemSelectedColor:Dt,itemBg:Gn,popupBg:Gn,subMenuItemBg:ar,itemActiveBg:"transparent",itemSelectedBg:tn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Er,itemDisabledColor:Di,dangerItemColor:$t,dangerItemHoverColor:ni,dangerItemSelectedColor:Xr,dangerItemActiveBg:Vr,dangerItemSelectedBg:qn,menuSubMenuBg:ar,horizontalItemSelectedColor:St,horizontalItemSelectedBg:Ge});return[fn(hi),vn(hi),ot(hi),bn(hi,"light"),bn(Ti,"dark"),Ze(hi),(0,Qe.Z)(hi),(0,Bt.oN)(hi,"slide-up"),(0,Bt.oN)(hi,"slide-down"),(0,Lt._y)(hi,"zoom-big")]},oe=>{const{colorPrimary:ke,colorError:Ge,colorTextDisabled:St,colorErrorBg:Tt,colorText:Ot,colorTextDescription:Wt,colorBgContainer:$t,colorFillAlter:Gn,colorFillContent:ar,lineWidth:Dt,lineWidthBold:tn,controlItemBgActive:qn,colorBgTextHover:Er,controlHeightLG:kn,lineHeight:gr,colorBgElevated:Di,marginXXS:ni,padding:Xr,fontSize:Vr,controlHeightSM:Si,fontSizeLG:hi,colorTextLightSolid:Ti,colorErrorHover:Ii}=oe,Lr=new vt.C(Ti).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:oe.zIndexPopupBase+50,radiusItem:oe.borderRadiusLG,itemBorderRadius:oe.borderRadiusLG,radiusSubMenuItem:oe.borderRadiusSM,subMenuItemBorderRadius:oe.borderRadiusSM,colorItemText:Ot,itemColor:Ot,colorItemTextHover:Ot,itemHoverColor:Ot,colorItemTextHoverHorizontal:ke,horizontalItemHoverColor:ke,colorGroupTitle:Wt,groupTitleColor:Wt,colorItemTextSelected:ke,itemSelectedColor:ke,colorItemTextSelectedHorizontal:ke,horizontalItemSelectedColor:ke,colorItemBg:$t,itemBg:$t,colorItemBgHover:Er,itemHoverBg:Er,colorItemBgActive:ar,itemActiveBg:qn,colorSubItemBg:Gn,subMenuItemBg:Gn,colorItemBgSelected:qn,itemSelectedBg:qn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:tn,activeBarHeight:tn,colorActiveBarBorderSize:Dt,activeBarBorderWidth:Dt,colorItemTextDisabled:St,itemDisabledColor:St,colorDangerItemText:Ge,dangerItemColor:Ge,colorDangerItemTextHover:Ge,dangerItemHoverColor:Ge,colorDangerItemTextSelected:Ge,dangerItemSelectedColor:Ge,colorDangerItemBgActive:Tt,dangerItemActiveBg:Tt,colorDangerItemBgSelected:Tt,dangerItemSelectedBg:Tt,itemMarginInline:oe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:kn,groupTitleLineHeight:gr,collapsedWidth:kn*2,popupBg:Di,itemMarginBlock:ni,itemPaddingInline:Xr,horizontalLineHeight:`${kn*1.15}px`,iconSize:Vr,iconMarginInlineEnd:Si-Vr,collapsedIconSize:hi,groupTitleFontSize:Vr,darkItemDisabledColor:new vt.C(Ti).setAlpha(.25).toRgbString(),darkItemColor:Lr,darkDangerItemColor:Ge,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Ti,darkItemSelectedBg:ke,darkDangerItemSelectedBg:Ge,darkItemHoverBg:"transparent",darkGroupTitleColor:Lr,darkItemHoverColor:Ti,darkDangerItemHoverColor:Ii,darkDangerItemSelectedColor:Ti,darkDangerItemActiveBg:Ge}},{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"]]})(se),Ft=function(se,he){var fe={};for(var oe in se)Object.prototype.hasOwnProperty.call(se,oe)&&he.indexOf(oe)<0&&(fe[oe]=se[oe]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,oe=Object.getOwnPropertySymbols(se);ke<oe.length;ke++)he.indexOf(oe[ke])<0&&Object.prototype.propertyIsEnumerable.call(se,oe[ke])&&(fe[oe[ke]]=se[oe[ke]]);return fe},gn=(0,Ve.forwardRef)((se,he)=>{var fe,oe;const ke=Ve.useContext(xe.Z),Ge=ke||{},{getPrefixCls:St,getPopupContainer:Tt,direction:Ot,menu:Wt}=Ve.useContext(Te.E_),$t=St(),{prefixCls:Gn,className:ar,style:Dt,theme:tn="light",expandIcon:qn,_internalDisableMenuItemTitleTooltip:Er,inlineCollapsed:kn,siderCollapsed:gr,items:Di,children:ni,rootClassName:Xr,mode:Vr,selectable:Si,onClick:hi,overflowedIndicatorPopupClassName:Ti}=se,Ii=Ft(se,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Lr=(0,at.Z)(Ii,["collapsedWidth"]),Xi=Et(Di)||ni;(fe=Ge.validator)===null||fe===void 0||fe.call(Ge,{mode:Vr});const la=(0,lt.useEvent)(function(){var On;hi==null||hi.apply(void 0,arguments),(On=Ge.onClick)===null||On===void 0||On.call(Ge)}),va=Ge.mode||Vr,ya=Si!=null?Si:Ge.selectable,$i=Ve.useMemo(()=>gr!==void 0?gr:kn,[kn,gr]),Mt={horizontal:{motionName:`${$t}-slide-up`},inline:(0,Me.Z)($t),other:{motionName:`${$t}-zoom-big`}},Cn=St("menu",Gn||Ge.prefixCls),[_n,In]=Gt(Cn,!ke),mr=ge()(`${Cn}-${tn}`,Wt==null?void 0:Wt.className,ar);let Xn;if(typeof qn=="function")Xn=qn;else if(qn===null||qn===!1)Xn=null;else if(Ge.expandIcon===null||Ge.expandIcon===!1)Xn=null;else{const On=qn!=null?qn:Ge.expandIcon;Xn=(0,ht.Tm)(On,{className:ge()(`${Cn}-submenu-expand-icon`,(0,ht.l$)(On)?(oe=On.props)===null||oe===void 0?void 0:oe.className:"")})}const sr=Ve.useMemo(()=>({prefixCls:Cn,inlineCollapsed:$i||!1,direction:Ot,firstLevel:!0,theme:tn,mode:va,disableMenuItemTitleTooltip:Er}),[Cn,$i,Ot,Er,tn]);return _n(Ve.createElement(xe.Z.Provider,{value:null},Ve.createElement(rt.Provider,{value:sr},Ve.createElement(be.ZP,Object.assign({getPopupContainer:Tt,overflowedIndicator:Ve.createElement(Ye.Z,null),overflowedIndicatorPopupClassName:ge()(Cn,`${Cn}-${tn}`,Ti),mode:va,selectable:ya,onClick:la},Lr,{inlineCollapsed:$i,style:Object.assign(Object.assign({},Wt==null?void 0:Wt.style),Dt),className:mr,prefixCls:Cn,direction:Ot,defaultMotions:Mt,expandIcon:Xn,ref:he,rootClassName:ge()(Xr,In)}),Xi))))});const _e=(0,Ve.forwardRef)((se,he)=>{const fe=(0,Ve.useRef)(null),oe=Ve.useContext($e.D);return(0,Ve.useImperativeHandle)(he,()=>({menu:fe.current,focus:ke=>{var Ge;(Ge=fe.current)===null||Ge===void 0||Ge.focus(ke)}})),Ve.createElement(gn,Object.assign({ref:fe},se,oe))});_e.Item=Ee,_e.SubMenu=Kt,_e.Divider=me,_e.ItemGroup=be.BW;var ce=_e},78045:function(mn,Vt,le){"use strict";le.d(Vt,{ZP:function(){return Ze}});var be=le(94184),Ve=le.n(be),$e=le(5663),et=le(1337),ge=le(67294),Te=le(53124),Le=le(98675);const Se=ge.createContext(null),me=Se.Provider;var Pe=Se;const at=ge.createContext(null),Oe=at.Provider;var ht=le(95860),nt=le(17799),rt=le(98866),Je=le(65223),Ee=le(14747),pt=le(67968),Kt=le(45503);const Ye=Ae=>{const{componentCls:Pt,antCls:bn}=Ae,nn=`${Pt}-group`;return{[nn]:Object.assign(Object.assign({},(0,Ee.Wf)(Ae)),{display:"inline-block",fontSize:0,[`&${nn}-rtl`]:{direction:"rtl"},[`${bn}-badge ${bn}-badge-count`]:{zIndex:1},[`> ${bn}-badge:not(:first-child) > ${bn}-button-wrapper`]:{borderInlineStart:"none"}})}},lt=Ae=>{const{componentCls:Pt,wrapperMarginInlineEnd:bn,colorPrimary:nn,radioSize:tt,motionDurationSlow:ot,motionDurationMid:Ht,motionEaseInOutCirc:En,colorBgContainer:fn,colorBorder:Gt,lineWidth:Ft,dotSize:xn,colorBgContainerDisabled:gn,colorTextDisabled:_e,paddingXS:ce,dotColorDisabled:se,lineType:he,radioDotDisabledSize:fe,wireframe:oe,colorWhite:ke}=Ae,Ge=`${Pt}-inner`;return{[`${Pt}-wrapper`]:Object.assign(Object.assign({},(0,Ee.Wf)(Ae)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:bn,cursor:"pointer",[`&${Pt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ae.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${Pt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Ft}px ${he} ${nn}`,borderRadius:"50%",visibility:"hidden",content:'""'},[Pt]:Object.assign(Object.assign({},(0,Ee.Wf)(Ae)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Pt}-wrapper:hover &,
|
|
|
&:hover ${Ge}`]:{borderColor:nn},[`${Pt}-input:focus-visible + ${Ge}`]:Object.assign({},(0,Ee.oN)(Ae)),[`${Pt}:hover::after, ${Pt}-wrapper:hover &::after`]:{visibility:"visible"},[`${Pt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:tt,height:tt,marginBlockStart:tt/-2,marginInlineStart:tt/-2,backgroundColor:oe?nn:ke,borderBlockStart:0,borderInlineStart:0,borderRadius:tt,transform:"scale(0)",opacity:0,transition:`all ${ot} ${En}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:tt,height:tt,backgroundColor:fn,borderColor:Gt,borderStyle:"solid",borderWidth:Ft,borderRadius:"50%",transition:`all ${Ht}`},[`${Pt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Pt}-checked`]:{[Ge]:{borderColor:nn,backgroundColor:oe?fn:nn,"&::after":{transform:`scale(${xn/tt})`,opacity:1,transition:`all ${ot} ${En}`}}},[`${Pt}-disabled`]:{cursor:"not-allowed",[Ge]:{backgroundColor:gn,borderColor:Gt,cursor:"not-allowed","&::after":{backgroundColor:se}},[`${Pt}-input`]:{cursor:"not-allowed"},[`${Pt}-disabled + span`]:{color:_e,cursor:"not-allowed"},[`&${Pt}-checked`]:{[Ge]:{"&::after":{transform:`scale(${fe/tt})`}}}},[`span${Pt} + *`]:{paddingInlineStart:ce,paddingInlineEnd:ce}})}},Me=Ae=>{const{buttonColor:Pt,controlHeight:bn,componentCls:nn,lineWidth:tt,lineType:ot,colorBorder:Ht,motionDurationSlow:En,motionDurationMid:fn,buttonPaddingInline:Gt,fontSize:Ft,buttonBg:xn,fontSizeLG:gn,controlHeightLG:_e,controlHeightSM:ce,paddingXS:se,borderRadius:he,borderRadiusSM:fe,borderRadiusLG:oe,buttonCheckedBg:ke,buttonSolidCheckedColor:Ge,colorTextDisabled:St,colorBgContainerDisabled:Tt,buttonCheckedBgDisabled:Ot,buttonCheckedColorDisabled:Wt,colorPrimary:$t,colorPrimaryHover:Gn,colorPrimaryActive:ar,buttonSolidCheckedBg:Dt,buttonSolidCheckedHoverBg:tn,buttonSolidCheckedActiveBg:qn}=Ae;return{[`${nn}-button-wrapper`]:{position:"relative",display:"inline-block",height:bn,margin:0,paddingInline:Gt,paddingBlock:0,color:Pt,fontSize:Ft,lineHeight:`${bn-tt*2}px`,background:xn,border:`${tt}px ${ot} ${Ht}`,borderBlockStartWidth:tt+.02,borderInlineStartWidth:0,borderInlineEndWidth:tt,cursor:"pointer",transition:[`color ${fn}`,`background ${fn}`,`box-shadow ${fn}`].join(","),a:{color:Pt},[`> ${nn}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-tt,insetInlineStart:-tt,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:tt,paddingInline:0,backgroundColor:Ht,transition:`background-color ${En}`,content:'""'}},"&:first-child":{borderInlineStart:`${tt}px ${ot} ${Ht}`,borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he},"&:first-child:last-child":{borderRadius:he},[`${nn}-group-large &`]:{height:_e,fontSize:gn,lineHeight:`${_e-tt*2}px`,"&:first-child":{borderStartStartRadius:oe,borderEndStartRadius:oe},"&:last-child":{borderStartEndRadius:oe,borderEndEndRadius:oe}},[`${nn}-group-small &`]:{height:ce,paddingInline:se-tt,paddingBlock:0,lineHeight:`${ce-tt*2}px`,"&:first-child":{borderStartStartRadius:fe,borderEndStartRadius:fe},"&:last-child":{borderStartEndRadius:fe,borderEndEndRadius:fe}},"&:hover":{position:"relative",color:$t},"&:has(:focus-visible)":Object.assign({},(0,Ee.oN)(Ae)),[`${nn}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${nn}-button-wrapper-disabled)`]:{zIndex:1,color:$t,background:ke,borderColor:$t,"&::before":{backgroundColor:$t},"&:first-child":{borderColor:$t},"&:hover":{color:Gn,borderColor:Gn,"&::before":{backgroundColor:Gn}},"&:active":{color:ar,borderColor:ar,"&::before":{backgroundColor:ar}}},[`${nn}-group-solid &-checked:not(${nn}-button-wrapper-disabled)`]:{color:Ge,background:Dt,borderColor:Dt,"&:hover":{color:Ge,background:tn,borderColor:tn},"&:active":{color:Ge,background:qn,borderColor:qn}},"&-disabled":{color:St,backgroundColor:Tt,borderColor:Ht,cursor:"not-allowed","&:first-child, &:hover":{color:St,backgroundColor:Tt,borderColor:Ht}},[`&-disabled${nn}-button-wrapper-checked`]:{color:Wt,backgroundColor:Ot,borderColor:Ht,boxShadow:"none"}}}},xe=Ae=>Ae-4*2;var We=(0,pt.Z)("Radio",Ae=>{const{controlOutline:Pt,controlOutlineWidth:bn,radioSize:nn}=Ae,tt=`0 0 0 ${bn}px ${Pt}`,ot=tt,Ht=xe(nn),En=(0,Kt.TS)(Ae,{radioDotDisabledSize:Ht,radioFocusShadow:tt,radioButtonFocusShadow:ot});return[Ye(En),lt(En),Me(En)]},Ae=>{const{wireframe:Pt,padding:bn,marginXS:nn,lineWidth:tt,fontSizeLG:ot,colorText:Ht,colorBgContainer:En,colorTextDisabled:fn,controlItemBgActiveDisabled:Gt,colorTextLightSolid:Ft,colorPrimary:xn,colorPrimaryHover:gn,colorPrimaryActive:_e}=Ae,ce=4,se=ot,he=Pt?xe(se):se-(ce+tt)*2;return{radioSize:se,dotSize:he,dotColorDisabled:fn,buttonSolidCheckedColor:Ft,buttonSolidCheckedBg:xn,buttonSolidCheckedHoverBg:gn,buttonSolidCheckedActiveBg:_e,buttonBg:En,buttonCheckedBg:En,buttonColor:Ht,buttonCheckedBgDisabled:Gt,buttonCheckedColorDisabled:fn,buttonPaddingInline:bn-tt,wrapperMarginInlineEnd:nn}}),je=le(45353),Et=le(92429),vt=function(Ae,Pt){var bn={};for(var nn in Ae)Object.prototype.hasOwnProperty.call(Ae,nn)&&Pt.indexOf(nn)<0&&(bn[nn]=Ae[nn]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,nn=Object.getOwnPropertySymbols(Ae);tt<nn.length;tt++)Pt.indexOf(nn[tt])<0&&Object.prototype.propertyIsEnumerable.call(Ae,nn[tt])&&(bn[nn[tt]]=Ae[nn[tt]]);return bn};const At=(Ae,Pt)=>{var bn,nn;const tt=ge.useContext(Pe),ot=ge.useContext(at),{getPrefixCls:Ht,direction:En,radio:fn}=ge.useContext(Te.E_),Gt=ge.useRef(null),Ft=(0,nt.sQ)(Pt,Gt),{isFormItemInput:xn}=ge.useContext(Je.aM),gn=ar=>{var Dt,tn;(Dt=Ae.onChange)===null||Dt===void 0||Dt.call(Ae,ar),(tn=tt==null?void 0:tt.onChange)===null||tn===void 0||tn.call(tt,ar)},{prefixCls:_e,className:ce,rootClassName:se,children:he,style:fe}=Ae,oe=vt(Ae,["prefixCls","className","rootClassName","children","style"]),ke=Ht("radio",_e),Ge=((tt==null?void 0:tt.optionType)||ot)==="button",St=Ge?`${ke}-button`:ke,[Tt,Ot]=We(ke),Wt=Object.assign({},oe),$t=ge.useContext(rt.Z);tt&&(Wt.name=tt.name,Wt.onChange=gn,Wt.checked=Ae.value===tt.value,Wt.disabled=(bn=Wt.disabled)!==null&&bn!==void 0?bn:tt.disabled),Wt.disabled=(nn=Wt.disabled)!==null&&nn!==void 0?nn:$t;const Gn=Ve()(`${St}-wrapper`,{[`${St}-wrapper-checked`]:Wt.checked,[`${St}-wrapper-disabled`]:Wt.disabled,[`${St}-wrapper-rtl`]:En==="rtl",[`${St}-wrapper-in-form-item`]:xn},fn==null?void 0:fn.className,ce,se,Ot);return Tt(ge.createElement(je.Z,{component:"Radio",disabled:Wt.disabled},ge.createElement("label",{className:Gn,style:Object.assign(Object.assign({},fn==null?void 0:fn.style),fe),onMouseEnter:Ae.onMouseEnter,onMouseLeave:Ae.onMouseLeave},ge.createElement(ht.Z,Object.assign({},Wt,{className:Ve()(Wt.className,!Ge&&Et.A),type:"radio",prefixCls:St,ref:Ft})),he!==void 0?ge.createElement("span",null,he):null)))};var Bt=ge.forwardRef(At);const Lt=ge.forwardRef((Ae,Pt)=>{const{getPrefixCls:bn,direction:nn}=ge.useContext(Te.E_),[tt,ot]=(0,$e.Z)(Ae.defaultValue,{value:Ae.value}),Ht=Dt=>{const tn=tt,qn=Dt.target.value;"value"in Ae||ot(qn);const{onChange:Er}=Ae;Er&&qn!==tn&&Er(Dt)},{prefixCls:En,className:fn,rootClassName:Gt,options:Ft,buttonStyle:xn="outline",disabled:gn,children:_e,size:ce,style:se,id:he,onMouseEnter:fe,onMouseLeave:oe,onFocus:ke,onBlur:Ge}=Ae,St=bn("radio",En),Tt=`${St}-group`,[Ot,Wt]=We(St);let $t=_e;Ft&&Ft.length>0&&($t=Ft.map(Dt=>typeof Dt=="string"||typeof Dt=="number"?ge.createElement(Bt,{key:Dt.toString(),prefixCls:St,disabled:gn,value:Dt,checked:tt===Dt},Dt):ge.createElement(Bt,{key:`radio-group-value-options-${Dt.value}`,prefixCls:St,disabled:Dt.disabled||gn,value:Dt.value,checked:tt===Dt.value,title:Dt.title,style:Dt.style},Dt.label)));const Gn=(0,Le.Z)(ce),ar=Ve()(Tt,`${Tt}-${xn}`,{[`${Tt}-${Gn}`]:Gn,[`${Tt}-rtl`]:nn==="rtl"},fn,Gt,Wt);return Ot(ge.createElement("div",Object.assign({},(0,et.Z)(Ae,{aria:!0,data:!0}),{className:ar,style:se,onMouseEnter:fe,onMouseLeave:oe,onFocus:ke,onBlur:Ge,id:he,ref:Pt}),ge.createElement(me,{value:{onChange:Ht,value:tt,disabled:Ae.disabled,name:Ae.name,optionType:Ae.optionType}},$t)))});var hn=ge.memo(Lt),ut=function(Ae,Pt){var bn={};for(var nn in Ae)Object.prototype.hasOwnProperty.call(Ae,nn)&&Pt.indexOf(nn)<0&&(bn[nn]=Ae[nn]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,nn=Object.getOwnPropertySymbols(Ae);tt<nn.length;tt++)Pt.indexOf(nn[tt])<0&&Object.prototype.propertyIsEnumerable.call(Ae,nn[tt])&&(bn[nn[tt]]=Ae[nn[tt]]);return bn};const Yt=(Ae,Pt)=>{const{getPrefixCls:bn}=ge.useContext(Te.E_),{prefixCls:nn}=Ae,tt=ut(Ae,["prefixCls"]),ot=bn("radio",nn);return ge.createElement(Oe,{value:"button"},ge.createElement(Bt,Object.assign({prefixCls:ot},tt,{type:"radio",ref:Pt})))};var vn=ge.forwardRef(Yt);const un=Bt;un.Button=vn,un.Group=hn,un.__ANT_RADIO=!0;var Ze=un},11713:function(mn,Vt,le){"use strict";le.d(Vt,{default:function(){return ir}});var be=le(94184),Ve=le.n(be),$e=le(87462),et=le(74902),ge=le(4942),Te=le(1413),Le=le(97685),Se=le(45987),me=le(71002),Pe=le(67294);function at(ze){var Ke=Pe.useRef();Ke.current=ze;var kt=Pe.useCallback(function(){for(var yt,qt=arguments.length,dn=new Array(qt),sn=0;sn<qt;sn++)dn[sn]=arguments[sn];return(yt=Ke.current)===null||yt===void 0?void 0:yt.call.apply(yt,[Ke].concat(dn))},[]);return kt}function Oe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ht=Oe()?Pe.useLayoutEffect:Pe.useEffect,nt=ht,rt=function(Ke,kt){var yt=Pe.useRef(!0);ht(function(){if(!yt.current)return Ke()},kt),ht(function(){return yt.current=!1,function(){yt.current=!0}},[])};function Je(ze){var Ke=Pe.useRef(!1),kt=Pe.useState(ze),yt=(0,Le.Z)(kt,2),qt=yt[0],dn=yt[1];Pe.useEffect(function(){return Ke.current=!1,function(){Ke.current=!0}},[]);function sn(Dn,Sn){Sn&&Ke.current||dn(Dn)}return[qt,sn]}function Ee(ze){return ze!==void 0}function pt(ze,Ke){var kt=Ke||{},yt=kt.defaultValue,qt=kt.value,dn=kt.onChange,sn=kt.postState,Dn=Je(function(){return Ee(qt)?qt:Ee(yt)?typeof yt=="function"?yt():yt:typeof ze=="function"?ze():ze}),Sn=(0,Le.Z)(Dn,2),Jt=Sn[0],Ln=Sn[1],Pn=qt!==void 0?qt:Jt,rr=sn?sn(Pn):Pn,Tn=at(dn),pr=Je([Pn]),Pr=(0,Le.Z)(pr,2),br=Pr[0],_r=Pr[1];rt(function(){var Cr=br[0];Jt!==Cr&&Tn(Jt,Cr)},[br]),rt(function(){Ee(qt)||Ln(qt)},[qt]);var lr=at(function(Cr,Br){Ln(Cr,Br),_r([Pn],Br)});return[rr,lr]}var Kt={};function Ye(ze,Ke){}function lt(ze,Ke){}function Me(){Kt={}}function xe(ze,Ke,kt){!Ke&&!Kt[kt]&&(ze(!1,kt),Kt[kt]=!0)}function We(ze,Ke){xe(Ye,ze,Ke)}function je(ze,Ke){xe(lt,ze,Ke)}var Et=We,vt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ze=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ze)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ze==null?void 0:ze.substr(0,4))},At={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ke){var kt=Ke.keyCode;if(Ke.altKey&&!Ke.ctrlKey||Ke.metaKey||kt>=At.F1&&kt<=At.F12)return!1;switch(kt){case At.ALT:case At.CAPS_LOCK:case At.CONTEXT_MENU:case At.CTRL:case At.DOWN:case At.END:case At.ESC:case At.HOME:case At.INSERT:case At.LEFT:case At.MAC_FF_META:case At.META:case At.NUMLOCK:case At.NUM_CENTER:case At.PAGE_DOWN:case At.PAGE_UP:case At.PAUSE:case At.PRINT_SCREEN:case At.RIGHT:case At.SHIFT:case At.UP:case At.WIN_KEY:case At.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ke){if(Ke>=At.ZERO&&Ke<=At.NINE||Ke>=At.NUM_ZERO&&Ke<=At.NUM_MULTIPLY||Ke>=At.A&&Ke<=At.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ke===0)return!0;switch(Ke){case At.SPACE:case At.QUESTION_MARK:case At.NUM_PLUS:case At.NUM_MINUS:case At.NUM_PERIOD:case At.NUM_DIVISION:case At.SEMICOLON:case At.DASH:case At.EQUALS:case At.COMMA:case At.PERIOD:case At.SLASH:case At.APOSTROPHE:case At.SINGLE_QUOTE:case At.OPEN_SQUARE_BRACKET:case At.BACKSLASH:case At.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Qe=At,Bt=le(47655);function Lt(ze,Ke,kt){var yt=Pe.useRef({});return(!("value"in yt.current)||kt(yt.current.condition,Ke))&&(yt.current.value=ze(),yt.current.condition=Ke),yt.current.value}function hn(ze,Ke){typeof ze=="function"?ze(Ke):(0,me.Z)(ze)==="object"&&ze&&"current"in ze&&(ze.current=Ke)}function ut(){for(var ze=arguments.length,Ke=new Array(ze),kt=0;kt<ze;kt++)Ke[kt]=arguments[kt];var yt=Ke.filter(function(qt){return qt});return yt.length<=1?yt[0]:function(qt){Ke.forEach(function(dn){hn(dn,qt)})}}function Yt(){for(var ze=arguments.length,Ke=new Array(ze),kt=0;kt<ze;kt++)Ke[kt]=arguments[kt];return Lt(function(){return ut.apply(void 0,Ke)},Ke,function(yt,qt){return yt.length===qt.length&&yt.every(function(dn,sn){return dn===qt[sn]})})}function vn(ze){var Ke,kt,yt=isMemo(ze)?ze.type.type:ze.type;return!(typeof yt=="function"&&!((Ke=yt.prototype)!==null&&Ke!==void 0&&Ke.render)||typeof ze=="function"&&!((kt=ze.prototype)!==null&&kt!==void 0&&kt.render))}var un=function(Ke){var kt=Ke.className,yt=Ke.customizeIcon,qt=Ke.customizeIconProps,dn=Ke.onMouseDown,sn=Ke.onClick,Dn=Ke.children,Sn;return typeof yt=="function"?Sn=yt(qt):Sn=yt,Pe.createElement("span",{className:kt,onMouseDown:function(Ln){Ln.preventDefault(),dn&&dn(Ln)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:sn,"aria-hidden":!0},Sn!==void 0?Sn:Pe.createElement("span",{className:Ve()(kt.split(/\s+/).map(function(Jt){return"".concat(Jt,"-icon")}))},Dn))},Ze=un;function Ae(ze,Ke,kt,yt,qt){var dn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,sn=arguments.length>6?arguments[6]:void 0,Dn=arguments.length>7?arguments[7]:void 0,Sn=Pe.useMemo(function(){if((0,me.Z)(yt)==="object")return yt.clearIcon;if(qt)return qt},[yt,qt]),Jt=Pe.useMemo(function(){return!!(!dn&&yt&&(kt.length||sn)&&!(Dn==="combobox"&&sn===""))},[yt,dn,kt.length,sn,Dn]);return{allowClear:Jt,clearIcon:Pe.createElement(Ze,{className:"".concat(ze,"-clear"),onMouseDown:Ke,customizeIcon:Sn},"\xD7")}}var Pt=Pe.createContext(null);function bn(){return Pe.useContext(Pt)}function nn(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ke=Pe.useState(!1),kt=(0,Le.Z)(Ke,2),yt=kt[0],qt=kt[1],dn=Pe.useRef(null),sn=function(){window.clearTimeout(dn.current)};Pe.useEffect(function(){return sn},[]);var Dn=function(Jt,Ln){sn(),dn.current=window.setTimeout(function(){qt(Jt),Ln&&Ln()},ze)};return[yt,Dn,sn]}function tt(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ke=Pe.useRef(null),kt=Pe.useRef(null);Pe.useEffect(function(){return function(){window.clearTimeout(kt.current)}},[]);function yt(qt){(qt||Ke.current===null)&&(Ke.current=qt),window.clearTimeout(kt.current),kt.current=window.setTimeout(function(){Ke.current=null},ze)}return[function(){return Ke.current},yt]}function ot(ze,Ke,kt,yt){var qt=Pe.useRef(null);qt.current={open:Ke,triggerOpen:kt,customizedTrigger:yt},Pe.useEffect(function(){function dn(sn){var Dn;if(!((Dn=qt.current)!==null&&Dn!==void 0&&Dn.customizedTrigger)){var Sn=sn.target;Sn.shadowRoot&&sn.composed&&(Sn=sn.composedPath()[0]||Sn),qt.current.open&&ze().filter(function(Jt){return Jt}).every(function(Jt){return!Jt.contains(Sn)&&Jt!==Sn})&&qt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",dn),function(){return window.removeEventListener("mousedown",dn)}},[])}var Ht=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,En=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,fn="".concat(Ht," ").concat(En).split(/[\s\n]+/),Gt="aria-",Ft="data-";function xn(ze,Ke){return ze.indexOf(Ke)===0}function gn(ze){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,kt;Ke===!1?kt={aria:!0,data:!0,attr:!0}:Ke===!0?kt={aria:!0}:kt=(0,Te.Z)({},Ke);var yt={};return Object.keys(ze).forEach(function(qt){(kt.aria&&(qt==="role"||xn(qt,Gt))||kt.data&&xn(qt,Ft)||kt.attr&&fn.includes(qt))&&(yt[qt]=ze[qt])}),yt}var _e=le(48555),ce=le(14075),se=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],he=void 0;function fe(ze,Ke){var kt=ze.prefixCls,yt=ze.invalidate,qt=ze.item,dn=ze.renderItem,sn=ze.responsive,Dn=ze.responsiveDisabled,Sn=ze.registerSize,Jt=ze.itemKey,Ln=ze.className,Pn=ze.style,rr=ze.children,Tn=ze.display,pr=ze.order,Pr=ze.component,br=Pr===void 0?"div":Pr,_r=(0,Se.Z)(ze,se),lr=sn&&!Tn;function Cr(di){Sn(Jt,di)}Pe.useEffect(function(){return function(){Cr(null)}},[]);var Br=dn&&qt!==he?dn(qt):rr,Kr;yt||(Kr={opacity:lr?0:1,height:lr?0:he,overflowY:lr?"hidden":he,order:sn?pr:he,pointerEvents:lr?"none":he,position:lr?"absolute":he});var xr={};lr&&(xr["aria-hidden"]=!0);var Ur=Pe.createElement(br,(0,$e.Z)({className:Ve()(!yt&&kt,Ln),style:(0,Te.Z)((0,Te.Z)({},Kr),Pn)},xr,_r,{ref:Ke}),Br);return sn&&(Ur=Pe.createElement(_e.Z,{onResize:function(zi){var Li=zi.offsetWidth;Cr(Li)},disabled:Dn},Ur)),Ur}var oe=Pe.forwardRef(fe);oe.displayName="Item";var ke=oe,Ge=le(77527),St=le(73935),Tt=le(96523);function Ot(ze){if(typeof MessageChannel=="undefined")(0,Tt.Z)(ze);else{var Ke=new MessageChannel;Ke.port1.onmessage=function(){return ze()},Ke.port2.postMessage(void 0)}}function Wt(){var ze=Pe.useRef(null),Ke=function(yt){ze.current||(ze.current=[],Ot(function(){(0,St.unstable_batchedUpdates)(function(){ze.current.forEach(function(qt){qt()}),ze.current=null})})),ze.current.push(yt)};return Ke}function $t(ze,Ke){var kt=Pe.useState(Ke),yt=(0,Le.Z)(kt,2),qt=yt[0],dn=yt[1],sn=(0,Ge.Z)(function(Dn){ze(function(){dn(Dn)})});return[qt,sn]}var Gn=Pe.createContext(null),ar=["component"],Dt=["className"],tn=["className"],qn=function(Ke,kt){var yt=Pe.useContext(Gn);if(!yt){var qt=Ke.component,dn=qt===void 0?"div":qt,sn=(0,Se.Z)(Ke,ar);return Pe.createElement(dn,(0,$e.Z)({},sn,{ref:kt}))}var Dn=yt.className,Sn=(0,Se.Z)(yt,Dt),Jt=Ke.className,Ln=(0,Se.Z)(Ke,tn);return Pe.createElement(Gn.Provider,{value:null},Pe.createElement(ke,(0,$e.Z)({ref:kt,className:Ve()(Dn,Jt)},Sn,Ln)))},Er=Pe.forwardRef(qn);Er.displayName="RawItem";var kn=Er,gr=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Di="responsive",ni="invalidate";function Xr(ze){return"+ ".concat(ze.length," ...")}function Vr(ze,Ke){var kt=ze.prefixCls,yt=kt===void 0?"rc-overflow":kt,qt=ze.data,dn=qt===void 0?[]:qt,sn=ze.renderItem,Dn=ze.renderRawItem,Sn=ze.itemKey,Jt=ze.itemWidth,Ln=Jt===void 0?10:Jt,Pn=ze.ssr,rr=ze.style,Tn=ze.className,pr=ze.maxCount,Pr=ze.renderRest,br=ze.renderRawRest,_r=ze.suffix,lr=ze.component,Cr=lr===void 0?"div":lr,Br=ze.itemComponent,Kr=ze.onVisibleChange,xr=(0,Se.Z)(ze,gr),Ur=Pn==="full",di=Wt(),zi=$t(di,null),Li=(0,Le.Z)(zi,2),mi=Li[0],Oi=Li[1],Ri=mi||0,Yr=$t(di,new Map),gi=(0,Le.Z)(Yr,2),Or=gi[0],jr=gi[1],oi=$t(di,0),Ai=(0,Le.Z)(oi,2),Na=Ai[0],$a=Ai[1],La=$t(di,0),Ji=(0,Le.Z)(La,2),Bi=Ji[0],ti=Ji[1],Oa=$t(di,0),ri=(0,Le.Z)(Oa,2),Nr=ri[0],yi=ri[1],Qi=(0,Pe.useState)(null),Ei=(0,Le.Z)(Qi,2),Ui=Ei[0],Gr=Ei[1],aa=(0,Pe.useState)(null),pa=(0,Le.Z)(aa,2),ra=pa[0],ma=pa[1],Sa=Pe.useMemo(function(){return ra===null&&Ur?Number.MAX_SAFE_INTEGER:ra||0},[ra,mi]),Za=(0,Pe.useState)(!1),ia=(0,Le.Z)(Za,2),Ca=ia[0],Ja=ia[1],Ga="".concat(yt,"-item"),so=Math.max(Na,Bi),Fa=pr===Di,ba=dn.length&&Fa,ii=pr===ni,bi=ba||typeof pr=="number"&&dn.length>pr,ea=(0,Pe.useMemo)(function(){var Vi=dn;return ba?mi===null&&Ur?Vi=dn:Vi=dn.slice(0,Math.min(dn.length,Ri/Ln)):typeof pr=="number"&&(Vi=dn.slice(0,pr)),Vi},[dn,Ln,mi,pr,ba]),ga=(0,Pe.useMemo)(function(){return ba?dn.slice(Sa+1):dn.slice(ea.length)},[dn,ea,ba,Sa]),Ka=(0,Pe.useCallback)(function(Vi,vr){var Jr;return typeof Sn=="function"?Sn(Vi):(Jr=Sn&&(Vi==null?void 0:Vi[Sn]))!==null&&Jr!==void 0?Jr:vr},[Sn]),io=(0,Pe.useCallback)(sn||function(Vi){return Vi},[sn]);function ho(Vi,vr,Jr){ra===Vi&&(vr===void 0||vr===Ui)||(ma(Vi),Jr||(Ja(Vi<dn.length-1),Kr==null||Kr(Vi)),vr!==void 0&&Gr(vr))}function Oo(Vi,vr){Oi(vr.clientWidth)}function Ro(Vi,vr){jr(function(Jr){var Qr=new Map(Jr);return vr===null?Qr.delete(Vi):Qr.set(Vi,vr),Qr})}function lo(Vi,vr){ti(vr),$a(Bi)}function Ao(Vi,vr){yi(vr)}function Ki(Vi){return Or.get(Ka(ea[Vi],Vi))}(0,ce.Z)(function(){if(Ri&&typeof so=="number"&&ea){var Vi=Nr,vr=ea.length,Jr=vr-1;if(!vr){ho(0,null);return}for(var Qr=0;Qr<vr;Qr+=1){var si=Ki(Qr);if(Ur&&(si=si||0),si===void 0){ho(Qr-1,void 0,!0);break}if(Vi+=si,Jr===0&&Vi<=Ri||Qr===Jr-1&&Vi+Ki(Jr)<=Ri){ho(Jr,null);break}else if(Vi+so>Ri){ho(Qr-1,Vi-si-Nr+Bi);break}}_r&&Ki(0)+Nr>Ri&&Gr(null)}},[Ri,Or,Bi,Nr,Ka,ea]);var fi=Ca&&!!ga.length,Aa={};Ui!==null&&ba&&(Aa={position:"absolute",left:Ui,top:0});var Ma={prefixCls:Ga,responsive:ba,component:Br,invalidate:ii},uo=Dn?function(Vi,vr){var Jr=Ka(Vi,vr);return Pe.createElement(Gn.Provider,{key:Jr,value:(0,Te.Z)((0,Te.Z)({},Ma),{},{order:vr,item:Vi,itemKey:Jr,registerSize:Ro,display:vr<=Sa})},Dn(Vi,vr))}:function(Vi,vr){var Jr=Ka(Vi,vr);return Pe.createElement(ke,(0,$e.Z)({},Ma,{order:vr,key:Jr,item:Vi,renderItem:io,itemKey:Jr,registerSize:Ro,display:vr<=Sa}))},ao,hs={order:fi?Sa:Number.MAX_SAFE_INTEGER,className:"".concat(Ga,"-rest"),registerSize:lo,display:fi};if(br)br&&(ao=Pe.createElement(Gn.Provider,{value:(0,Te.Z)((0,Te.Z)({},Ma),hs)},br(ga)));else{var Qo=Pr||Xr;ao=Pe.createElement(ke,(0,$e.Z)({},Ma,hs),typeof Qo=="function"?Qo(ga):Qo)}var ps=Pe.createElement(Cr,(0,$e.Z)({className:Ve()(!ii&&yt,Tn),style:rr,ref:Ke},xr),ea.map(uo),bi?ao:null,_r&&Pe.createElement(ke,(0,$e.Z)({},Ma,{responsive:Fa,responsiveDisabled:!ba,order:Sa,className:"".concat(Ga,"-suffix"),registerSize:Ao,display:!0,style:Aa}),_r));return Fa&&(ps=Pe.createElement(_e.Z,{onResize:Oo,disabled:!ba},ps)),ps}var Si=Pe.forwardRef(Vr);Si.displayName="Overflow",Si.Item=kn,Si.RESPONSIVE=Di,Si.INVALIDATE=ni;var hi=Si,Ti=hi,Ii=function(Ke,kt){var yt,qt,dn=Ke.prefixCls,sn=Ke.id,Dn=Ke.inputElement,Sn=Ke.disabled,Jt=Ke.tabIndex,Ln=Ke.autoFocus,Pn=Ke.autoComplete,rr=Ke.editable,Tn=Ke.activeDescendantId,pr=Ke.value,Pr=Ke.maxLength,br=Ke.onKeyDown,_r=Ke.onMouseDown,lr=Ke.onChange,Cr=Ke.onPaste,Br=Ke.onCompositionStart,Kr=Ke.onCompositionEnd,xr=Ke.open,Ur=Ke.attrs,di=Dn||Pe.createElement("input",null),zi=di,Li=zi.ref,mi=zi.props,Oi=mi.onKeyDown,Ri=mi.onChange,Yr=mi.onMouseDown,gi=mi.onCompositionStart,Or=mi.onCompositionEnd,jr=mi.style;return"maxLength"in di.props,di=Pe.cloneElement(di,(0,Te.Z)((0,Te.Z)((0,Te.Z)({type:"search"},mi),{},{id:sn,ref:ut(kt,Li),disabled:Sn,tabIndex:Jt,autoComplete:Pn||"off",autoFocus:Ln,className:Ve()("".concat(dn,"-selection-search-input"),(yt=di)===null||yt===void 0||(qt=yt.props)===null||qt===void 0?void 0:qt.className),role:"combobox","aria-label":"Search","aria-expanded":xr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(sn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(sn,"_list"),"aria-activedescendant":xr?Tn:void 0},Ur),{},{value:rr?pr:"",maxLength:Pr,readOnly:!rr,unselectable:rr?null:"on",style:(0,Te.Z)((0,Te.Z)({},jr),{},{opacity:rr?null:0}),onKeyDown:function(Ai){br(Ai),Oi&&Oi(Ai)},onMouseDown:function(Ai){_r(Ai),Yr&&Yr(Ai)},onChange:function(Ai){lr(Ai),Ri&&Ri(Ai)},onCompositionStart:function(Ai){Br(Ai),gi&&gi(Ai)},onCompositionEnd:function(Ai){Kr(Ai),Or&&Or(Ai)},onPaste:Cr})),di},Lr=Pe.forwardRef(Ii);Lr.displayName="Input";var Xi=Lr;function la(ze){return Array.isArray(ze)?ze:ze!==void 0?[ze]:[]}var va=typeof window!="undefined"&&window.document&&window.document.documentElement,ya=va;function $i(ze){return ze!=null}function Mt(ze){return!ze&&ze!==0}function Cn(ze){return["string","number"].includes((0,me.Z)(ze))}function _n(ze){var Ke=void 0;return ze&&(Cn(ze.title)?Ke=ze.title.toString():Cn(ze.label)&&(Ke=ze.label.toString())),Ke}function In(ze,Ke){ya?Pe.useLayoutEffect(ze,Ke):Pe.useEffect(ze,Ke)}function mr(ze){var Ke;return(Ke=ze.key)!==null&&Ke!==void 0?Ke:ze.value}var Xn=function(Ke){Ke.preventDefault(),Ke.stopPropagation()},sr=function(Ke){var kt=Ke.id,yt=Ke.prefixCls,qt=Ke.values,dn=Ke.open,sn=Ke.searchValue,Dn=Ke.autoClearSearchValue,Sn=Ke.inputRef,Jt=Ke.placeholder,Ln=Ke.disabled,Pn=Ke.mode,rr=Ke.showSearch,Tn=Ke.autoFocus,pr=Ke.autoComplete,Pr=Ke.activeDescendantId,br=Ke.tabIndex,_r=Ke.removeIcon,lr=Ke.maxTagCount,Cr=Ke.maxTagTextLength,Br=Ke.maxTagPlaceholder,Kr=Br===void 0?function(Gr){return"+ ".concat(Gr.length," ...")}:Br,xr=Ke.tagRender,Ur=Ke.onToggleOpen,di=Ke.onRemove,zi=Ke.onInputChange,Li=Ke.onInputPaste,mi=Ke.onInputKeyDown,Oi=Ke.onInputMouseDown,Ri=Ke.onInputCompositionStart,Yr=Ke.onInputCompositionEnd,gi=Pe.useRef(null),Or=(0,Pe.useState)(0),jr=(0,Le.Z)(Or,2),oi=jr[0],Ai=jr[1],Na=(0,Pe.useState)(!1),$a=(0,Le.Z)(Na,2),La=$a[0],Ji=$a[1],Bi="".concat(yt,"-selection"),ti=dn||Pn==="multiple"&&Dn===!1||Pn==="tags"?sn:"",Oa=Pn==="tags"||Pn==="multiple"&&Dn===!1||rr&&(dn||La);In(function(){Ai(gi.current.scrollWidth)},[ti]);function ri(Gr,aa,pa,ra,ma){return Pe.createElement("span",{className:Ve()("".concat(Bi,"-item"),(0,ge.Z)({},"".concat(Bi,"-item-disabled"),pa)),title:_n(Gr)},Pe.createElement("span",{className:"".concat(Bi,"-item-content")},aa),ra&&Pe.createElement(Ze,{className:"".concat(Bi,"-item-remove"),onMouseDown:Xn,onClick:ma,customizeIcon:_r},"\xD7"))}function Nr(Gr,aa,pa,ra,ma){var Sa=function(ia){Xn(ia),Ur(!dn)};return Pe.createElement("span",{onMouseDown:Sa},xr({label:aa,value:Gr,disabled:pa,closable:ra,onClose:ma}))}function yi(Gr){var aa=Gr.disabled,pa=Gr.label,ra=Gr.value,ma=!Ln&&!aa,Sa=pa;if(typeof Cr=="number"&&(typeof pa=="string"||typeof pa=="number")){var Za=String(Sa);Za.length>Cr&&(Sa="".concat(Za.slice(0,Cr),"..."))}var ia=function(Ja){Ja&&Ja.stopPropagation(),di(Gr)};return typeof xr=="function"?Nr(ra,Sa,aa,ma,ia):ri(Gr,Sa,aa,ma,ia)}function Qi(Gr){var aa=typeof Kr=="function"?Kr(Gr):Kr;return ri({title:aa},aa,!1)}var Ei=Pe.createElement("div",{className:"".concat(Bi,"-search"),style:{width:oi},onFocus:function(){Ji(!0)},onBlur:function(){Ji(!1)}},Pe.createElement(Xi,{ref:Sn,open:dn,prefixCls:yt,id:kt,inputElement:null,disabled:Ln,autoFocus:Tn,autoComplete:pr,editable:Oa,activeDescendantId:Pr,value:ti,onKeyDown:mi,onMouseDown:Oi,onChange:zi,onPaste:Li,onCompositionStart:Ri,onCompositionEnd:Yr,tabIndex:br,attrs:gn(Ke,!0)}),Pe.createElement("span",{ref:gi,className:"".concat(Bi,"-search-mirror"),"aria-hidden":!0},ti,"\xA0")),Ui=Pe.createElement(Ti,{prefixCls:"".concat(Bi,"-overflow"),data:qt,renderItem:yi,renderRest:Qi,suffix:Ei,itemKey:mr,maxCount:lr});return Pe.createElement(Pe.Fragment,null,Ui,!qt.length&&!ti&&Pe.createElement("span",{className:"".concat(Bi,"-placeholder")},Jt))},On=sr,qe=function(Ke){var kt=Ke.inputElement,yt=Ke.prefixCls,qt=Ke.id,dn=Ke.inputRef,sn=Ke.disabled,Dn=Ke.autoFocus,Sn=Ke.autoComplete,Jt=Ke.activeDescendantId,Ln=Ke.mode,Pn=Ke.open,rr=Ke.values,Tn=Ke.placeholder,pr=Ke.tabIndex,Pr=Ke.showSearch,br=Ke.searchValue,_r=Ke.activeValue,lr=Ke.maxLength,Cr=Ke.onInputKeyDown,Br=Ke.onInputMouseDown,Kr=Ke.onInputChange,xr=Ke.onInputPaste,Ur=Ke.onInputCompositionStart,di=Ke.onInputCompositionEnd,zi=Ke.title,Li=Pe.useState(!1),mi=(0,Le.Z)(Li,2),Oi=mi[0],Ri=mi[1],Yr=Ln==="combobox",gi=Yr||Pr,Or=rr[0],jr=br||"";Yr&&_r&&!Oi&&(jr=_r),Pe.useEffect(function(){Yr&&Ri(!1)},[Yr,_r]);var oi=Ln!=="combobox"&&!Pn&&!Pr?!1:!!jr,Ai=zi===void 0?_n(Or):zi,Na=function(){if(Or)return null;var La=oi?{visibility:"hidden"}:void 0;return Pe.createElement("span",{className:"".concat(yt,"-selection-placeholder"),style:La},Tn)};return Pe.createElement(Pe.Fragment,null,Pe.createElement("span",{className:"".concat(yt,"-selection-search")},Pe.createElement(Xi,{ref:dn,prefixCls:yt,id:qt,open:Pn,inputElement:kt,disabled:sn,autoFocus:Dn,autoComplete:Sn,editable:gi,activeDescendantId:Jt,value:jr,onKeyDown:Cr,onMouseDown:Br,onChange:function(La){Ri(!0),Kr(La)},onPaste:xr,onCompositionStart:Ur,onCompositionEnd:di,tabIndex:pr,attrs:gn(Ke,!0),maxLength:Yr?lr:void 0})),!Yr&&Or?Pe.createElement("span",{className:"".concat(yt,"-selection-item"),title:Ai,style:oi?{visibility:"hidden"}:void 0},Or.label):null,Na())},st=qe;function _t(ze){return![Qe.ESC,Qe.SHIFT,Qe.BACKSPACE,Qe.TAB,Qe.WIN_KEY,Qe.ALT,Qe.META,Qe.WIN_KEY_RIGHT,Qe.CTRL,Qe.SEMICOLON,Qe.EQUALS,Qe.CAPS_LOCK,Qe.CONTEXT_MENU,Qe.F1,Qe.F2,Qe.F3,Qe.F4,Qe.F5,Qe.F6,Qe.F7,Qe.F8,Qe.F9,Qe.F10,Qe.F11,Qe.F12].includes(ze)}var Nt=function(Ke,kt){var yt=(0,Pe.useRef)(null),qt=(0,Pe.useRef)(!1),dn=Ke.prefixCls,sn=Ke.open,Dn=Ke.mode,Sn=Ke.showSearch,Jt=Ke.tokenWithEnter,Ln=Ke.autoClearSearchValue,Pn=Ke.onSearch,rr=Ke.onSearchSubmit,Tn=Ke.onToggleOpen,pr=Ke.onInputKeyDown,Pr=Ke.domRef;Pe.useImperativeHandle(kt,function(){return{focus:function(){yt.current.focus()},blur:function(){yt.current.blur()}}});var br=tt(0),_r=(0,Le.Z)(br,2),lr=_r[0],Cr=_r[1],Br=function(jr){var oi=jr.which;(oi===Qe.UP||oi===Qe.DOWN)&&jr.preventDefault(),pr&&pr(jr),oi===Qe.ENTER&&Dn==="tags"&&!qt.current&&!sn&&(rr==null||rr(jr.target.value)),_t(oi)&&Tn(!0)},Kr=function(){Cr(!0)},xr=(0,Pe.useRef)(null),Ur=function(jr){Pn(jr,!0,qt.current)!==!1&&Tn(!0)},di=function(){qt.current=!0},zi=function(jr){qt.current=!1,Dn!=="combobox"&&Ur(jr.target.value)},Li=function(jr){var oi=jr.target.value;if(Jt&&xr.current&&/[\r\n]/.test(xr.current)){var Ai=xr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oi=oi.replace(Ai,xr.current)}xr.current=null,Ur(oi)},mi=function(jr){var oi=jr.clipboardData,Ai=oi.getData("text");xr.current=Ai},Oi=function(jr){var oi=jr.target;if(oi!==yt.current){var Ai=document.body.style.msTouchAction!==void 0;Ai?setTimeout(function(){yt.current.focus()}):yt.current.focus()}},Ri=function(jr){var oi=lr();jr.target!==yt.current&&!oi&&Dn!=="combobox"&&jr.preventDefault(),(Dn!=="combobox"&&(!Sn||!oi)||!sn)&&(sn&&Ln!==!1&&Pn("",!0,!1),Tn())},Yr={inputRef:yt,onInputKeyDown:Br,onInputMouseDown:Kr,onInputChange:Li,onInputPaste:mi,onInputCompositionStart:di,onInputCompositionEnd:zi},gi=Dn==="multiple"||Dn==="tags"?Pe.createElement(On,(0,$e.Z)({},Ke,Yr)):Pe.createElement(st,(0,$e.Z)({},Ke,Yr));return Pe.createElement("div",{ref:Pr,className:"".concat(dn,"-selector"),onClick:Oi,onMouseDown:Ri},gi)},He=Pe.forwardRef(Nt);He.displayName="Selector";var gt=He,Rt=le(62709),It=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Zt=function(Ke){var kt=Ke===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:kt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:kt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:kt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:kt,adjustY:1},htmlRegion:"scroll"}}},Ut=function(Ke,kt){var yt=Ke.prefixCls,qt=Ke.disabled,dn=Ke.visible,sn=Ke.children,Dn=Ke.popupElement,Sn=Ke.animation,Jt=Ke.transitionName,Ln=Ke.dropdownStyle,Pn=Ke.dropdownClassName,rr=Ke.direction,Tn=rr===void 0?"ltr":rr,pr=Ke.placement,Pr=Ke.builtinPlacements,br=Ke.dropdownMatchSelectWidth,_r=Ke.dropdownRender,lr=Ke.dropdownAlign,Cr=Ke.getPopupContainer,Br=Ke.empty,Kr=Ke.getTriggerDOMNode,xr=Ke.onPopupVisibleChange,Ur=Ke.onPopupMouseEnter,di=(0,Se.Z)(Ke,It),zi="".concat(yt,"-dropdown"),Li=Dn;_r&&(Li=_r(Dn));var mi=Pe.useMemo(function(){return Pr||Zt(br)},[Pr,br]),Oi=Sn?"".concat(zi,"-").concat(Sn):Jt,Ri=typeof br=="number",Yr=Pe.useMemo(function(){return Ri?null:br===!1?"minWidth":"width"},[br,Ri]),gi=Ln;Ri&&(gi=(0,Te.Z)((0,Te.Z)({},gi),{},{width:br}));var Or=Pe.useRef(null);return Pe.useImperativeHandle(kt,function(){return{getPopupElement:function(){return Or.current}}}),Pe.createElement(Rt.Z,(0,$e.Z)({},di,{showAction:xr?["click"]:[],hideAction:xr?["click"]:[],popupPlacement:pr||(Tn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:mi,prefixCls:zi,popupTransitionName:Oi,popup:Pe.createElement("div",{ref:Or,onMouseEnter:Ur},Li),stretch:Yr,popupAlign:lr,popupVisible:dn,getPopupContainer:Cr,popupClassName:Ve()(Pn,(0,ge.Z)({},"".concat(zi,"-empty"),Br)),popupStyle:gi,getTriggerDOMNode:Kr,onPopupVisibleChange:xr}),sn)},Nn=Pe.forwardRef(Ut);Nn.displayName="SelectTrigger";var hr=Nn,Vn=le(84506);function jn(ze,Ke){var kt=ze.key,yt;return"value"in ze&&(yt=ze.value),kt!=null?kt:yt!==void 0?yt:"rc-index-key-".concat(Ke)}function Qn(ze,Ke){var kt=ze||{},yt=kt.label,qt=kt.value,dn=kt.options,sn=kt.groupLabel,Dn=yt||(Ke?"children":"label");return{label:Dn,value:qt||"value",options:dn||"options",groupLabel:sn||Dn}}function tr(ze){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=Ke.fieldNames,yt=Ke.childrenAsData,qt=[],dn=Qn(kt,!1),sn=dn.label,Dn=dn.value,Sn=dn.options,Jt=dn.groupLabel;function Ln(Pn,rr){Pn.forEach(function(Tn){if(rr||!(Sn in Tn)){var pr=Tn[Dn];qt.push({key:jn(Tn,qt.length),groupOption:rr,data:Tn,label:Tn[sn],value:pr})}else{var Pr=Tn[Jt];Pr===void 0&&yt&&(Pr=Tn.label),qt.push({key:jn(Tn,qt.length),group:!0,data:Tn,label:Pr}),Ln(Tn[Sn],!0)}})}return Ln(ze,!1),qt}function Ar(ze){var Ke=(0,Te.Z)({},ze);return"props"in Ke||Object.defineProperty(Ke,"props",{get:function(){return Et(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ke}}),Ke}function cn(ze,Ke){if(!Ke||!Ke.length)return null;var kt=!1;function yt(dn,sn){var Dn=(0,Vn.Z)(sn),Sn=Dn[0],Jt=Dn.slice(1);if(!Sn)return[dn];var Ln=dn.split(Sn);return kt=kt||Ln.length>1,Ln.reduce(function(Pn,rr){return[].concat((0,et.Z)(Pn),(0,et.Z)(yt(rr,Jt)))},[]).filter(function(Pn){return Pn})}var qt=yt(ze,Ke);return kt?qt:null}var Kn=["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"],pi=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xi(ze){return ze==="tags"||ze==="multiple"}var Zr=Pe.forwardRef(function(ze,Ke){var kt,yt,qt=ze.id,dn=ze.prefixCls,sn=ze.className,Dn=ze.showSearch,Sn=ze.tagRender,Jt=ze.direction,Ln=ze.omitDomProps,Pn=ze.displayValues,rr=ze.onDisplayValuesChange,Tn=ze.emptyOptions,pr=ze.notFoundContent,Pr=pr===void 0?"Not Found":pr,br=ze.onClear,_r=ze.mode,lr=ze.disabled,Cr=ze.loading,Br=ze.getInputElement,Kr=ze.getRawInputElement,xr=ze.open,Ur=ze.defaultOpen,di=ze.onDropdownVisibleChange,zi=ze.activeValue,Li=ze.onActiveValueChange,mi=ze.activeDescendantId,Oi=ze.searchValue,Ri=ze.autoClearSearchValue,Yr=ze.onSearch,gi=ze.onSearchSplit,Or=ze.tokenSeparators,jr=ze.allowClear,oi=ze.suffixIcon,Ai=ze.clearIcon,Na=ze.OptionList,$a=ze.animation,La=ze.transitionName,Ji=ze.dropdownStyle,Bi=ze.dropdownClassName,ti=ze.dropdownMatchSelectWidth,Oa=ze.dropdownRender,ri=ze.dropdownAlign,Nr=ze.placement,yi=ze.builtinPlacements,Qi=ze.getPopupContainer,Ei=ze.showAction,Ui=Ei===void 0?[]:Ei,Gr=ze.onFocus,aa=ze.onBlur,pa=ze.onKeyUp,ra=ze.onKeyDown,ma=ze.onMouseDown,Sa=(0,Se.Z)(ze,Kn),Za=xi(_r),ia=(Dn!==void 0?Dn:Za)||_r==="combobox",Ca=(0,Te.Z)({},Sa);pi.forEach(function(Ia){delete Ca[Ia]}),Ln==null||Ln.forEach(function(Ia){delete Ca[Ia]});var Ja=Pe.useState(!1),Ga=(0,Le.Z)(Ja,2),so=Ga[0],Fa=Ga[1];Pe.useEffect(function(){Fa(vt())},[]);var ba=Pe.useRef(null),ii=Pe.useRef(null),bi=Pe.useRef(null),ea=Pe.useRef(null),ga=Pe.useRef(null),Ka=nn(),io=(0,Le.Z)(Ka,3),ho=io[0],Oo=io[1],Ro=io[2];Pe.useImperativeHandle(Ke,function(){var Ia,oa;return{focus:(Ia=ea.current)===null||Ia===void 0?void 0:Ia.focus,blur:(oa=ea.current)===null||oa===void 0?void 0:oa.blur,scrollTo:function(es){var sa;return(sa=ga.current)===null||sa===void 0?void 0:sa.scrollTo(es)}}});var lo=Pe.useMemo(function(){var Ia;if(_r!=="combobox")return Oi;var oa=(Ia=Pn[0])===null||Ia===void 0?void 0:Ia.value;return typeof oa=="string"||typeof oa=="number"?String(oa):""},[Oi,_r,Pn]),Ao=_r==="combobox"&&typeof Br=="function"&&Br()||null,Ki=typeof Kr=="function"&&Kr(),fi=Yt(ii,Ki==null||(kt=Ki.props)===null||kt===void 0?void 0:kt.ref),Aa=Pe.useState(!1),Ma=(0,Le.Z)(Aa,2),uo=Ma[0],ao=Ma[1];nt(function(){ao(!0)},[]);var hs=pt(!1,{defaultValue:Ur,value:xr}),Qo=(0,Le.Z)(hs,2),ps=Qo[0],Vi=Qo[1],vr=uo?ps:!1,Jr=!Pr&&Tn;(lr||Jr&&vr&&_r==="combobox")&&(vr=!1);var Qr=Jr?!1:vr,si=Pe.useCallback(function(Ia){var oa=Ia!==void 0?Ia:!vr;lr||(Vi(oa),vr!==oa&&(di==null||di(oa)))},[lr,vr,Vi,di]),Ha=Pe.useMemo(function(){return(Or||[]).some(function(Ia){return[`
|
|
|
`,`\r
|
|
|
`].includes(Ia)})},[Or]),ja=function(oa,Ho,es){var sa=!0,za=oa;Li==null||Li(null);var Ra=es?null:cn(oa,Or);return _r!=="combobox"&&Ra&&(za="",gi==null||gi(Ra),si(!1),sa=!1),Yr&&lo!==za&&Yr(za,{source:Ho?"typing":"effect"}),sa},Fo=function(oa){!oa||!oa.trim()||Yr(oa,{source:"submit"})};Pe.useEffect(function(){!vr&&!Za&&_r!=="combobox"&&ja("",!1,!1)},[vr]),Pe.useEffect(function(){ps&&lr&&Vi(!1),lr&&Oo(!1)},[lr]);var Uo=tt(),ls=(0,Le.Z)(Uo,2),ua=ls[0],Bo=ls[1],us=function(oa){var Ho=ua(),es=oa.which;if(es===Qe.ENTER&&(_r!=="combobox"&&oa.preventDefault(),vr||si(!0)),Bo(!!lo),es===Qe.BACKSPACE&&!Ho&&Za&&!lo&&Pn.length){for(var sa=(0,et.Z)(Pn),za=null,Ra=sa.length-1;Ra>=0;Ra-=1){var po=sa[Ra];if(!po.disabled){sa.splice(Ra,1),za=po;break}}za&&rr(sa,{type:"remove",values:[za]})}for(var is=arguments.length,Hs=new Array(is>1?is-1:0),gs=1;gs<is;gs++)Hs[gs-1]=arguments[gs];if(vr&&ga.current){var Jl;(Jl=ga.current).onKeyDown.apply(Jl,[oa].concat(Hs))}ra==null||ra.apply(void 0,[oa].concat(Hs))},cl=function(oa){for(var Ho=arguments.length,es=new Array(Ho>1?Ho-1:0),sa=1;sa<Ho;sa++)es[sa-1]=arguments[sa];if(vr&&ga.current){var za;(za=ga.current).onKeyUp.apply(za,[oa].concat(es))}pa==null||pa.apply(void 0,[oa].concat(es))},As=function(oa){var Ho=Pn.filter(function(es){return es!==oa});rr(Ho,{type:"remove",values:[oa]})},ms=Pe.useRef(!1),zo=function(){Oo(!0),lr||(Gr&&!ms.current&&Gr.apply(void 0,arguments),Ui.includes("focus")&&si(!0)),ms.current=!0},Ts=function(){Oo(!1,function(){ms.current=!1,si(!1)}),!lr&&(lo&&(_r==="tags"?Yr(lo,{source:"submit"}):_r==="multiple"&&Yr("",{source:"blur"})),aa&&aa.apply(void 0,arguments))},Is=[];Pe.useEffect(function(){return function(){Is.forEach(function(Ia){return clearTimeout(Ia)}),Is.splice(0,Is.length)}},[]);var Ys=function(oa){var Ho,es=oa.target,sa=(Ho=bi.current)===null||Ho===void 0?void 0:Ho.getPopupElement();if(sa&&sa.contains(es)){var za=setTimeout(function(){var Hs=Is.indexOf(za);if(Hs!==-1&&Is.splice(Hs,1),Ro(),!so&&!sa.contains(document.activeElement)){var gs;(gs=ea.current)===null||gs===void 0||gs.focus()}});Is.push(za)}for(var Ra=arguments.length,po=new Array(Ra>1?Ra-1:0),is=1;is<Ra;is++)po[is-1]=arguments[is];ma==null||ma.apply(void 0,[oa].concat(po))},oo=Pe.useState({}),Ta=(0,Le.Z)(oo,2),Xa=Ta[1];function go(){Xa({})}var yo;Ki&&(yo=function(oa){si(oa)}),ot(function(){var Ia;return[ba.current,(Ia=bi.current)===null||Ia===void 0?void 0:Ia.getPopupElement()]},Qr,si,!!Ki);var Ko=Pe.useMemo(function(){return(0,Te.Z)((0,Te.Z)({},ze),{},{notFoundContent:Pr,open:vr,triggerOpen:Qr,id:qt,showSearch:ia,multiple:Za,toggleOpen:si})},[ze,Pr,Qr,vr,qt,ia,Za,si]),wo=!!oi||Cr,xs;wo&&(xs=Pe.createElement(Ze,{className:Ve()("".concat(dn,"-arrow"),(0,ge.Z)({},"".concat(dn,"-arrow-loading"),Cr)),customizeIcon:oi,customizeIconProps:{loading:Cr,searchValue:lo,open:vr,focused:ho,showSearch:ia}}));var Xl=function(){var oa;br==null||br(),(oa=ea.current)===null||oa===void 0||oa.focus(),rr([],{type:"clear",values:Pn}),ja("",!1,!1)},ql=Ae(dn,Xl,Pn,jr,Ai,lr,lo,_r),vu=ql.allowClear,Xu=ql.clearIcon,Ks=Pe.createElement(Na,{ref:ga}),Ds=Ve()(dn,sn,(yt={},(0,ge.Z)(yt,"".concat(dn,"-focused"),ho),(0,ge.Z)(yt,"".concat(dn,"-multiple"),Za),(0,ge.Z)(yt,"".concat(dn,"-single"),!Za),(0,ge.Z)(yt,"".concat(dn,"-allow-clear"),jr),(0,ge.Z)(yt,"".concat(dn,"-show-arrow"),wo),(0,ge.Z)(yt,"".concat(dn,"-disabled"),lr),(0,ge.Z)(yt,"".concat(dn,"-loading"),Cr),(0,ge.Z)(yt,"".concat(dn,"-open"),vr),(0,ge.Z)(yt,"".concat(dn,"-customize-input"),Ao),(0,ge.Z)(yt,"".concat(dn,"-show-search"),ia),yt)),yu=Pe.createElement(hr,{ref:bi,disabled:lr,prefixCls:dn,visible:Qr,popupElement:Ks,animation:$a,transitionName:La,dropdownStyle:Ji,dropdownClassName:Bi,direction:Jt,dropdownMatchSelectWidth:ti,dropdownRender:Oa,dropdownAlign:ri,placement:Nr,builtinPlacements:yi,getPopupContainer:Qi,empty:Tn,getTriggerDOMNode:function(){return ii.current},onPopupVisibleChange:yo,onPopupMouseEnter:go},Ki?Pe.cloneElement(Ki,{ref:fi}):Pe.createElement(gt,(0,$e.Z)({},ze,{domRef:ii,prefixCls:dn,inputElement:Ao,ref:ea,id:qt,showSearch:ia,autoClearSearchValue:Ri,mode:_r,activeDescendantId:mi,tagRender:Sn,values:Pn,open:vr,onToggleOpen:si,activeValue:zi,searchValue:lo,onSearch:ja,onSearchSubmit:Fo,onRemove:As,tokenWithEnter:Ha}))),Yl;return Ki?Yl=yu:Yl=Pe.createElement("div",(0,$e.Z)({className:Ds},Ca,{ref:ba,onMouseDown:Ys,onKeyDown:us,onKeyUp:cl,onFocus:zo,onBlur:Ts}),ho&&!vr&&Pe.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Pn.map(function(Ia){var oa=Ia.label,Ho=Ia.value;return["number","string"].includes((0,me.Z)(oa))?oa:Ho}).join(", "))),yu,xs,vu&&Xu),Pe.createElement(Pt.Provider,{value:Ko},Yl)}),Rr=Zr,_i=function(ze,Ke){var kt=Pe.useRef({values:new Map,options:new Map}),yt=Pe.useMemo(function(){var dn=kt.current,sn=dn.values,Dn=dn.options,Sn=ze.map(function(Pn){if(Pn.label===void 0){var rr;return(0,Te.Z)((0,Te.Z)({},Pn),{},{label:(rr=sn.get(Pn.value))===null||rr===void 0?void 0:rr.label})}return Pn}),Jt=new Map,Ln=new Map;return Sn.forEach(function(Pn){Jt.set(Pn.value,Pn),Ln.set(Pn.value,Ke.get(Pn.value)||Dn.get(Pn.value))}),kt.current.values=Jt,kt.current.options=Ln,Sn},[ze,Ke]),qt=Pe.useCallback(function(dn){return Ke.get(dn)||kt.current.options.get(dn)},[Ke]);return[yt,qt]};function cr(ze,Ke){return la(ze).join("").toUpperCase().includes(Ke)}var ui=function(ze,Ke,kt,yt,qt){return Pe.useMemo(function(){if(!kt||yt===!1)return ze;var dn=Ke.options,sn=Ke.label,Dn=Ke.value,Sn=[],Jt=typeof yt=="function",Ln=kt.toUpperCase(),Pn=Jt?yt:function(Tn,pr){return qt?cr(pr[qt],Ln):pr[dn]?cr(pr[sn!=="children"?sn:"label"],Ln):cr(pr[Dn],Ln)},rr=Jt?function(Tn){return Ar(Tn)}:function(Tn){return Tn};return ze.forEach(function(Tn){if(Tn[dn]){var pr=Pn(kt,rr(Tn));if(pr)Sn.push(Tn);else{var Pr=Tn[dn].filter(function(br){return Pn(kt,rr(br))});Pr.length&&Sn.push((0,Te.Z)((0,Te.Z)({},Tn),{},(0,ge.Z)({},dn,Pr)))}return}Pn(kt,rr(Tn))&&Sn.push(Tn)}),Sn},[ze,yt,qt,kt,Ke])},wn=0,Yi=Oe();function ki(){var ze;return Yi?(ze=wn,wn+=1):ze="TEST_OR_SSR",ze}function wa(ze){var Ke=Pe.useState(),kt=(0,Le.Z)(Ke,2),yt=kt[0],qt=kt[1];return Pe.useEffect(function(){qt("rc_select_".concat(ki()))},[]),ze||yt}function qi(ze){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=[];return Pe.Children.forEach(ze,function(yt){yt==null&&!Ke.keepEmpty||(Array.isArray(yt)?kt=kt.concat(qi(yt)):(0,Bt.isFragment)(yt)&&yt.props?kt=kt.concat(qi(yt.props.children,Ke)):kt.push(yt))}),kt}var Pi=["children","value"],fa=["children"];function ji(ze){var Ke=ze,kt=Ke.key,yt=Ke.props,qt=yt.children,dn=yt.value,sn=(0,Se.Z)(yt,Pi);return(0,Te.Z)({key:kt,value:dn!==void 0?dn:kt,children:qt},sn)}function Ci(ze){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return qi(ze).map(function(kt,yt){if(!Pe.isValidElement(kt)||!kt.type)return null;var qt=kt,dn=qt.type.isSelectOptGroup,sn=qt.key,Dn=qt.props,Sn=Dn.children,Jt=(0,Se.Z)(Dn,fa);return Ke||!dn?ji(kt):(0,Te.Z)((0,Te.Z)({key:"__RC_SELECT_GRP__".concat(sn===null?yt:sn,"__"),label:sn},Jt),{},{options:Ci(Sn)})}).filter(function(kt){return kt})}function ta(ze,Ke,kt,yt,qt){return Pe.useMemo(function(){var dn=ze,sn=!ze;sn&&(dn=Ci(Ke));var Dn=new Map,Sn=new Map,Jt=function(rr,Tn,pr){pr&&typeof pr=="string"&&rr.set(Tn[pr],Tn)};function Ln(Pn){for(var rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tn=0;Tn<Pn.length;Tn+=1){var pr=Pn[Tn];!pr[kt.options]||rr?(Dn.set(pr[kt.value],pr),Jt(Sn,pr,kt.label),Jt(Sn,pr,yt),Jt(Sn,pr,qt)):Ln(pr[kt.options],!0)}}return Ln(dn),{options:dn,valueOptions:Dn,labelOptions:Sn}},[ze,Ke,kt,yt,qt])}function _a(ze){var Ke=Pe.useRef();Ke.current=ze;var kt=Pe.useCallback(function(){return Ke.current.apply(Ke,arguments)},[]);return kt}var na=function(){return null};na.isSelectOptGroup=!0;var Ni=na,ka=function(){return null};ka.isSelectOption=!0;var Pa=ka;function ha(ze,Ke){var kt=(0,Te.Z)({},ze);return Array.isArray(Ke)&&Ke.forEach(function(yt){delete kt[yt]}),kt}var ai=le(73299),bt=Pe.createContext(null),mt=bt;function zt(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var an=["disabled","title","children","style","className"];function An(ze){return typeof ze=="string"||typeof ze=="number"}var Sr=function(Ke,kt){var yt=bn(),qt=yt.prefixCls,dn=yt.id,sn=yt.open,Dn=yt.multiple,Sn=yt.mode,Jt=yt.searchValue,Ln=yt.toggleOpen,Pn=yt.notFoundContent,rr=yt.onPopupScroll,Tn=Pe.useContext(mt),pr=Tn.flattenOptions,Pr=Tn.onActiveValue,br=Tn.defaultActiveFirstOption,_r=Tn.onSelect,lr=Tn.menuItemSelectedIcon,Cr=Tn.rawValues,Br=Tn.fieldNames,Kr=Tn.virtual,xr=Tn.direction,Ur=Tn.listHeight,di=Tn.listItemHeight,zi="".concat(qt,"-item"),Li=Lt(function(){return pr},[sn,pr],function(ri,Nr){return Nr[0]&&ri[1]!==Nr[1]}),mi=Pe.useRef(null),Oi=function(Nr){Nr.preventDefault()},Ri=function(Nr){mi.current&&mi.current.scrollTo(typeof Nr=="number"?{index:Nr}:Nr)},Yr=function(Nr){for(var yi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Qi=Li.length,Ei=0;Ei<Qi;Ei+=1){var Ui=(Nr+Ei*yi+Qi)%Qi,Gr=Li[Ui],aa=Gr.group,pa=Gr.data;if(!aa&&!pa.disabled)return Ui}return-1},gi=Pe.useState(function(){return Yr(0)}),Or=(0,Le.Z)(gi,2),jr=Or[0],oi=Or[1],Ai=function(Nr){var yi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;oi(Nr);var Qi={source:yi?"keyboard":"mouse"},Ei=Li[Nr];if(!Ei){Pr(null,-1,Qi);return}Pr(Ei.value,Nr,Qi)};(0,Pe.useEffect)(function(){Ai(br!==!1?Yr(0):-1)},[Li.length,Jt]);var Na=Pe.useCallback(function(ri){return Cr.has(ri)&&Sn!=="combobox"},[Sn,(0,et.Z)(Cr).toString(),Cr.size]);(0,Pe.useEffect)(function(){var ri=setTimeout(function(){if(!Dn&&sn&&Cr.size===1){var yi=Array.from(Cr)[0],Qi=Li.findIndex(function(Ei){var Ui=Ei.data;return Ui.value===yi});Qi!==-1&&(Ai(Qi),Ri(Qi))}});if(sn){var Nr;(Nr=mi.current)===null||Nr===void 0||Nr.scrollTo(void 0)}return function(){return clearTimeout(ri)}},[sn,Jt,pr.length]);var $a=function(Nr){Nr!==void 0&&_r(Nr,{selected:!Cr.has(Nr)}),Dn||Ln(!1)};if(Pe.useImperativeHandle(kt,function(){return{onKeyDown:function(Nr){var yi=Nr.which,Qi=Nr.ctrlKey;switch(yi){case Qe.N:case Qe.P:case Qe.UP:case Qe.DOWN:{var Ei=0;if(yi===Qe.UP?Ei=-1:yi===Qe.DOWN?Ei=1:zt()&&Qi&&(yi===Qe.N?Ei=1:yi===Qe.P&&(Ei=-1)),Ei!==0){var Ui=Yr(jr+Ei,Ei);Ri(Ui),Ai(Ui,!0)}break}case Qe.ENTER:{var Gr=Li[jr];Gr&&!Gr.data.disabled?$a(Gr.value):$a(void 0),sn&&Nr.preventDefault();break}case Qe.ESC:Ln(!1),sn&&Nr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Nr){Ri(Nr)}}}),Li.length===0)return Pe.createElement("div",{role:"listbox",id:"".concat(dn,"_list"),className:"".concat(zi,"-empty"),onMouseDown:Oi},Pn);var La=Object.keys(Br).map(function(ri){return Br[ri]}),Ji=function(Nr){return Nr.label};function Bi(ri,Nr){var yi=ri.group;return{role:yi?"presentation":"option",id:"".concat(dn,"_list_").concat(Nr)}}var ti=function(Nr){var yi=Li[Nr];if(!yi)return null;var Qi=yi.data||{},Ei=Qi.value,Ui=yi.group,Gr=gn(Qi,!0),aa=Ji(yi);return yi?Pe.createElement("div",(0,$e.Z)({"aria-label":typeof aa=="string"&&!Ui?aa:null},Gr,{key:Nr},Bi(yi,Nr),{"aria-selected":Na(Ei)}),Ei):null},Oa={role:"listbox",id:"".concat(dn,"_list")};return Pe.createElement(Pe.Fragment,null,Kr&&Pe.createElement("div",(0,$e.Z)({},Oa,{style:{height:0,width:0,overflow:"hidden"}}),ti(jr-1),ti(jr),ti(jr+1)),Pe.createElement(ai.Z,{itemKey:"key",ref:mi,data:Li,height:Ur,itemHeight:di,fullHeight:!1,onMouseDown:Oi,onScroll:rr,virtual:Kr,direction:xr,innerProps:Kr?null:Oa},function(ri,Nr){var yi,Qi=ri.group,Ei=ri.groupOption,Ui=ri.data,Gr=ri.label,aa=ri.value,pa=Ui.key;if(Qi){var ra,ma=(ra=Ui.title)!==null&&ra!==void 0?ra:An(Gr)?Gr.toString():void 0;return Pe.createElement("div",{className:Ve()(zi,"".concat(zi,"-group")),title:ma},Gr!==void 0?Gr:pa)}var Sa=Ui.disabled,Za=Ui.title,ia=Ui.children,Ca=Ui.style,Ja=Ui.className,Ga=(0,Se.Z)(Ui,an),so=ha(Ga,La),Fa=Na(aa),ba="".concat(zi,"-option"),ii=Ve()(zi,ba,Ja,(yi={},(0,ge.Z)(yi,"".concat(ba,"-grouped"),Ei),(0,ge.Z)(yi,"".concat(ba,"-active"),jr===Nr&&!Sa),(0,ge.Z)(yi,"".concat(ba,"-disabled"),Sa),(0,ge.Z)(yi,"".concat(ba,"-selected"),Fa),yi)),bi=Ji(ri),ea=!lr||typeof lr=="function"||Fa,ga=typeof bi=="number"?bi:bi||aa,Ka=An(ga)?ga.toString():void 0;return Za!==void 0&&(Ka=Za),Pe.createElement("div",(0,$e.Z)({},gn(so),Kr?{}:Bi(ri,Nr),{"aria-selected":Fa,className:ii,title:Ka,onMouseMove:function(){jr===Nr||Sa||Ai(Nr)},onClick:function(){Sa||$a(aa)},style:Ca}),Pe.createElement("div",{className:"".concat(ba,"-content")},ga),Pe.isValidElement(lr)||Fa,ea&&Pe.createElement(Ze,{className:"".concat(zi,"-option-state"),customizeIcon:lr,customizeIconProps:{isSelected:Fa}},Fa?"\u2713":null))}))},wr=Pe.forwardRef(Sr);wr.displayName="OptionList";var Tr=wr;function $r(ze){var Ke=ze.mode,kt=ze.options,yt=ze.children,qt=ze.backfill,dn=ze.allowClear,sn=ze.placeholder,Dn=ze.getInputElement,Sn=ze.showSearch,Jt=ze.onSearch,Ln=ze.defaultOpen,Pn=ze.autoFocus,rr=ze.labelInValue,Tn=ze.value,pr=ze.inputValue,Pr=ze.optionLabelProp,br=isMultiple(Ke),_r=Sn!==void 0?Sn:br||Ke==="combobox",lr=kt||convertChildrenToData(yt);if(warning(Ke!=="tags"||lr.every(function(xr){return!xr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ke==="tags"||Ke==="combobox"){var Cr=lr.some(function(xr){return xr.options?xr.options.some(function(Ur){return typeof("value"in Ur?Ur.value:Ur.key)=="number"}):typeof("value"in xr?xr.value:xr.key)=="number"});warning(!Cr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ke!=="combobox"||!Pr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ke==="combobox"||!qt,"`backfill` only works with `combobox` mode."),warning(Ke==="combobox"||!Dn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ke!=="combobox"||!Dn||!dn||!sn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Jt&&!_r&&Ke!=="combobox"&&Ke!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ln||Pn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Tn!=null){var Br=toArray(Tn);warning(!rr||Br.every(function(xr){return _typeof(xr)==="object"&&("key"in xr||"value"in xr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!br||Array.isArray(Tn),"`value` should be array when `mode` is `multiple` or `tags`")}if(yt){var Kr=null;toNodeArray(yt).some(function(xr){if(!React.isValidElement(xr)||!xr.type)return!1;var Ur=xr,di=Ur.type;if(di.isSelectOption)return!1;if(di.isSelectOptGroup){var zi=toNodeArray(xr.props.children).every(function(Li){return!React.isValidElement(Li)||!xr.type||Li.type.isSelectOption?!0:(Kr=Li.type,!1)});return!zi}return Kr=di,!0}),Kr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Kr.displayName||Kr.name||Kr,"`.")),warning(pr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Dr(ze,Ke){if(ze){var kt=function yt(qt){for(var dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,sn=0;sn<qt.length;sn++){var Dn=qt[sn];if(Dn[Ke==null?void 0:Ke.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!dn&&Array.isArray(Dn[Ke==null?void 0:Ke.options])&&yt(Dn[Ke==null?void 0:Ke.options],!0))break}};kt(ze)}}var ei=null,ci=["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"],Mi=["inputValue"];function Gi(ze){return!ze||(0,me.Z)(ze)!=="object"}var Wi=Pe.forwardRef(function(ze,Ke){var kt=ze.id,yt=ze.mode,qt=ze.prefixCls,dn=qt===void 0?"rc-select":qt,sn=ze.backfill,Dn=ze.fieldNames,Sn=ze.inputValue,Jt=ze.searchValue,Ln=ze.onSearch,Pn=ze.autoClearSearchValue,rr=Pn===void 0?!0:Pn,Tn=ze.onSelect,pr=ze.onDeselect,Pr=ze.dropdownMatchSelectWidth,br=Pr===void 0?!0:Pr,_r=ze.filterOption,lr=ze.filterSort,Cr=ze.optionFilterProp,Br=ze.optionLabelProp,Kr=ze.options,xr=ze.children,Ur=ze.defaultActiveFirstOption,di=ze.menuItemSelectedIcon,zi=ze.virtual,Li=ze.direction,mi=ze.listHeight,Oi=mi===void 0?200:mi,Ri=ze.listItemHeight,Yr=Ri===void 0?20:Ri,gi=ze.value,Or=ze.defaultValue,jr=ze.labelInValue,oi=ze.onChange,Ai=(0,Se.Z)(ze,ci),Na=wa(kt),$a=xi(yt),La=!!(!Kr&&xr),Ji=Pe.useMemo(function(){return _r===void 0&&yt==="combobox"?!1:_r},[_r,yt]),Bi=Pe.useMemo(function(){return Qn(Dn,La)},[JSON.stringify(Dn),La]),ti=pt("",{value:Jt!==void 0?Jt:Sn,postState:function(Jr){return Jr||""}}),Oa=(0,Le.Z)(ti,2),ri=Oa[0],Nr=Oa[1],yi=ta(Kr,xr,Bi,Cr,Br),Qi=yi.valueOptions,Ei=yi.labelOptions,Ui=yi.options,Gr=Pe.useCallback(function(vr){var Jr=la(vr);return Jr.map(function(Qr){var si,Ha,ja,Fo,Uo;if(Gi(Qr))si=Qr;else{var ls;ja=Qr.key,Ha=Qr.label,si=(ls=Qr.value)!==null&&ls!==void 0?ls:ja}var ua=Qi.get(si);if(ua){var Bo;if(Ha===void 0&&(Ha=ua==null?void 0:ua[Br||Bi.label]),ja===void 0&&(ja=(Bo=ua==null?void 0:ua.key)!==null&&Bo!==void 0?Bo:si),Fo=ua==null?void 0:ua.disabled,Uo=ua==null?void 0:ua.title,0)var us}return{label:Ha,value:si,key:ja,disabled:Fo,title:Uo}})},[Bi,Br,Qi]),aa=pt(Or,{value:gi}),pa=(0,Le.Z)(aa,2),ra=pa[0],ma=pa[1],Sa=Pe.useMemo(function(){var vr,Jr=Gr(ra);return yt==="combobox"&&Mt((vr=Jr[0])===null||vr===void 0?void 0:vr.value)?[]:Jr},[ra,Gr,yt]),Za=_i(Sa,Qi),ia=(0,Le.Z)(Za,2),Ca=ia[0],Ja=ia[1],Ga=Pe.useMemo(function(){if(!yt&&Ca.length===1){var vr=Ca[0];if(vr.value===null&&(vr.label===null||vr.label===void 0))return[]}return Ca.map(function(Jr){var Qr;return(0,Te.Z)((0,Te.Z)({},Jr),{},{label:(Qr=Jr.label)!==null&&Qr!==void 0?Qr:Jr.value})})},[yt,Ca]),so=Pe.useMemo(function(){return new Set(Ca.map(function(vr){return vr.value}))},[Ca]);Pe.useEffect(function(){if(yt==="combobox"){var vr,Jr=(vr=Ca[0])===null||vr===void 0?void 0:vr.value;Nr($i(Jr)?String(Jr):"")}},[Ca]);var Fa=_a(function(vr,Jr){var Qr,si=Jr!=null?Jr:vr;return Qr={},(0,ge.Z)(Qr,Bi.value,vr),(0,ge.Z)(Qr,Bi.label,si),Qr}),ba=Pe.useMemo(function(){if(yt!=="tags")return Ui;var vr=(0,et.Z)(Ui),Jr=function(si){return Qi.has(si)};return(0,et.Z)(Ca).sort(function(Qr,si){return Qr.value<si.value?-1:1}).forEach(function(Qr){var si=Qr.value;Jr(si)||vr.push(Fa(si,Qr.label))}),vr},[Fa,Ui,Qi,Ca,yt]),ii=ui(ba,Bi,ri,Ji,Cr),bi=Pe.useMemo(function(){return yt!=="tags"||!ri||ii.some(function(vr){return vr[Cr||"value"]===ri})||ii.some(function(vr){return vr[Bi.value]===ri})?ii:[Fa(ri)].concat((0,et.Z)(ii))},[Fa,Cr,yt,ii,ri,Bi]),ea=Pe.useMemo(function(){return lr?(0,et.Z)(bi).sort(function(vr,Jr){return lr(vr,Jr)}):bi},[bi,lr]),ga=Pe.useMemo(function(){return tr(ea,{fieldNames:Bi,childrenAsData:La})},[ea,Bi,La]),Ka=function(Jr){var Qr=Gr(Jr);if(ma(Qr),oi&&(Qr.length!==Ca.length||Qr.some(function(ja,Fo){var Uo;return((Uo=Ca[Fo])===null||Uo===void 0?void 0:Uo.value)!==(ja==null?void 0:ja.value)}))){var si=jr?Qr:Qr.map(function(ja){return ja.value}),Ha=Qr.map(function(ja){return Ar(Ja(ja.value))});oi($a?si:si[0],$a?Ha:Ha[0])}},io=Pe.useState(null),ho=(0,Le.Z)(io,2),Oo=ho[0],Ro=ho[1],lo=Pe.useState(0),Ao=(0,Le.Z)(lo,2),Ki=Ao[0],fi=Ao[1],Aa=Ur!==void 0?Ur:yt!=="combobox",Ma=Pe.useCallback(function(vr,Jr){var Qr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},si=Qr.source,Ha=si===void 0?"keyboard":si;fi(Jr),sn&&yt==="combobox"&&vr!==null&&Ha==="keyboard"&&Ro(String(vr))},[sn,yt]),uo=function(Jr,Qr,si){var Ha=function(){var ms,zo=Ja(Jr);return[jr?{label:zo==null?void 0:zo[Bi.label],value:Jr,key:(ms=zo==null?void 0:zo.key)!==null&&ms!==void 0?ms:Jr}:Jr,Ar(zo)]};if(Qr&&Tn){var ja=Ha(),Fo=(0,Le.Z)(ja,2),Uo=Fo[0],ls=Fo[1];Tn(Uo,ls)}else if(!Qr&&pr&&si!=="clear"){var ua=Ha(),Bo=(0,Le.Z)(ua,2),us=Bo[0],cl=Bo[1];pr(us,cl)}},ao=_a(function(vr,Jr){var Qr,si=$a?Jr.selected:!0;si?Qr=$a?[].concat((0,et.Z)(Ca),[vr]):[vr]:Qr=Ca.filter(function(Ha){return Ha.value!==vr}),Ka(Qr),uo(vr,si),yt==="combobox"?Ro(""):(!xi||rr)&&(Nr(""),Ro(""))}),hs=function(Jr,Qr){Ka(Jr);var si=Qr.type,Ha=Qr.values;(si==="remove"||si==="clear")&&Ha.forEach(function(ja){uo(ja.value,!1,si)})},Qo=function(Jr,Qr){if(Nr(Jr),Ro(null),Qr.source==="submit"){var si=(Jr||"").trim();if(si){var Ha=Array.from(new Set([].concat((0,et.Z)(so),[si])));Ka(Ha),uo(si,!0),Nr("")}return}Qr.source!=="blur"&&(yt==="combobox"&&Ka(Jr),Ln==null||Ln(Jr))},ps=function(Jr){var Qr=Jr;yt!=="tags"&&(Qr=Jr.map(function(Ha){var ja=Ei.get(Ha);return ja==null?void 0:ja.value}).filter(function(Ha){return Ha!==void 0}));var si=Array.from(new Set([].concat((0,et.Z)(so),(0,et.Z)(Qr))));Ka(si),si.forEach(function(Ha){uo(Ha,!0)})},Vi=Pe.useMemo(function(){var vr=zi!==!1&&br!==!1;return(0,Te.Z)((0,Te.Z)({},yi),{},{flattenOptions:ga,onActiveValue:Ma,defaultActiveFirstOption:Aa,onSelect:ao,menuItemSelectedIcon:di,rawValues:so,fieldNames:Bi,virtual:vr,direction:Li,listHeight:Oi,listItemHeight:Yr,childrenAsData:La})},[yi,ga,Ma,Aa,ao,di,so,Bi,zi,br,Oi,Yr,La]);return Pe.createElement(mt.Provider,{value:Vi},Pe.createElement(Rr,(0,$e.Z)({},Ai,{id:Na,prefixCls:dn,ref:Ke,omitDomProps:Mi,mode:yt,displayValues:Ga,onDisplayValuesChange:hs,direction:Li,searchValue:ri,onSearch:Qo,autoClearSearchValue:rr,onSearchSplit:ps,dropdownMatchSelectWidth:br,OptionList:Tr,emptyOptions:!ga.length,activeValue:Oo,activeDescendantId:"".concat(Na,"_list_").concat(Ki)})))}),Fi=Wi;Fi.Option=Pa,Fi.OptGroup=Ni;var Ie=Fi,Fe=Ie,Ne=le(10366),Ue=le(8745),it=le(33603),ft=le(9708),xt=le(53124),Xt=le(98866),Qt=le(88258),zn=le(98675),nr=le(65223),Rn=le(4173),on=le(87244),rn=le(13458),yn=le(78642),Mn=le(46163),er=function(ze,Ke){var kt={};for(var yt in ze)Object.prototype.hasOwnProperty.call(ze,yt)&&Ke.indexOf(yt)<0&&(kt[yt]=ze[yt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,yt=Object.getOwnPropertySymbols(ze);qt<yt.length;qt++)Ke.indexOf(yt[qt])<0&&Object.prototype.propertyIsEnumerable.call(ze,yt[qt])&&(kt[yt[qt]]=ze[yt[qt]]);return kt};const Hn="SECRET_COMBOBOX_MODE_DO_NOT_USE",$n=(ze,Ke)=>{var kt,{prefixCls:yt,bordered:qt=!0,className:dn,rootClassName:sn,getPopupContainer:Dn,popupClassName:Sn,dropdownClassName:Jt,listHeight:Ln=256,placement:Pn,listItemHeight:rr=24,size:Tn,disabled:pr,notFoundContent:Pr,status:br,builtinPlacements:_r,dropdownMatchSelectWidth:lr,popupMatchSelectWidth:Cr,direction:Br,style:Kr,allowClear:xr}=ze,Ur=er(ze,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:di,getPrefixCls:zi,renderEmpty:Li,direction:mi,virtual:Oi,popupMatchSelectWidth:Ri,popupOverflow:Yr,select:gi}=Pe.useContext(xt.E_),Or=zi("select",yt),jr=zi(),oi=Br!=null?Br:mi,{compactSize:Ai,compactItemClassnames:Na}=(0,Rn.ri)(Or,oi),[$a,La]=(0,on.Z)(Or),Ji=Pe.useMemo(()=>{const{mode:ba}=Ur;if(ba!=="combobox")return ba===Hn?"combobox":ba},[Ur.mode]),Bi=Ji==="multiple"||Ji==="tags",ti=(0,yn.Z)(Ur.suffixIcon,Ur.showArrow),Oa=(kt=Cr!=null?Cr:lr)!==null&&kt!==void 0?kt:Ri,{status:ri,hasFeedback:Nr,isFormItemInput:yi,feedbackIcon:Qi}=Pe.useContext(nr.aM),Ei=(0,ft.F)(ri,br);let Ui;Pr!==void 0?Ui=Pr:Ji==="combobox"?Ui=null:Ui=(Li==null?void 0:Li("Select"))||Pe.createElement(Qt.Z,{componentName:"Select"});const{suffixIcon:Gr,itemIcon:aa,removeIcon:pa,clearIcon:ra}=(0,Mn.Z)(Object.assign(Object.assign({},Ur),{multiple:Bi,hasFeedback:Nr,feedbackIcon:Qi,showSuffixIcon:ti,prefixCls:Or,showArrow:Ur.showArrow,componentName:"Select"})),ma=xr===!0?{clearIcon:ra}:xr,Sa=(0,Ne.Z)(Ur,["suffixIcon","itemIcon"]),Za=Ve()(Sn||Jt,{[`${Or}-dropdown-${oi}`]:oi==="rtl"},sn,La),ia=(0,zn.Z)(ba=>{var ii;return(ii=Tn!=null?Tn:Ai)!==null&&ii!==void 0?ii:ba}),Ca=Pe.useContext(Xt.Z),Ja=pr!=null?pr:Ca,Ga=Ve()({[`${Or}-lg`]:ia==="large",[`${Or}-sm`]:ia==="small",[`${Or}-rtl`]:oi==="rtl",[`${Or}-borderless`]:!qt,[`${Or}-in-form-item`]:yi},(0,ft.Z)(Or,Ei,Nr),Na,gi==null?void 0:gi.className,dn,sn,La),so=Pe.useMemo(()=>Pn!==void 0?Pn:oi==="rtl"?"bottomRight":"bottomLeft",[Pn,oi]),Fa=(0,rn.Z)(_r,Yr);return $a(Pe.createElement(Fe,Object.assign({ref:Ke,virtual:Oi,showSearch:gi==null?void 0:gi.showSearch},Sa,{style:Object.assign(Object.assign({},gi==null?void 0:gi.style),Kr),dropdownMatchSelectWidth:Oa,builtinPlacements:Fa,transitionName:(0,it.m)(jr,"slide-up",Ur.transitionName),listHeight:Ln,listItemHeight:rr,mode:Ji,prefixCls:Or,placement:so,direction:oi,suffixIcon:Gr,menuItemSelectedIcon:aa,removeIcon:pa,allowClear:ma,notFoundContent:Ui,className:Ga,getPopupContainer:Dn||di,dropdownClassName:Za,disabled:Ja})))},Un=Pe.forwardRef($n),Wn=(0,Ue.Z)(Un);Un.SECRET_COMBOBOX_MODE_DO_NOT_USE=Hn,Un.Option=Pa,Un.OptGroup=Ni,Un._InternalPanelDoNotUseOrYouWillBeFired=Wn;var ir=Un},87244:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Me}});var be=le(14747),Ve=le(80110),$e=le(45503),et=le(67968),ge=le(67771),Te=le(33297);const Le=xe=>{const{optionHeight:We,optionFontSize:je,optionLineHeight:Et,optionPadding:vt}=xe;return{position:"relative",display:"block",minHeight:We,padding:vt,color:xe.colorText,fontWeight:"normal",fontSize:je,lineHeight:Et,boxSizing:"border-box"}};var me=xe=>{const{antCls:We,componentCls:je}=xe,Et=`${je}-item`,vt=`&${We}-slide-up-enter${We}-slide-up-enter-active`,At=`&${We}-slide-up-appear${We}-slide-up-appear-active`,Qe=`&${We}-slide-up-leave${We}-slide-up-leave-active`,Bt=`${je}-dropdown-placement-`;return[{[`${je}-dropdown`]:Object.assign(Object.assign({},(0,be.Wf)(xe)),{position:"absolute",top:-9999,zIndex:xe.zIndexPopup,boxSizing:"border-box",padding:xe.paddingXXS,overflow:"hidden",fontSize:xe.fontSize,fontVariant:"initial",backgroundColor:xe.colorBgElevated,borderRadius:xe.borderRadiusLG,outline:"none",boxShadow:xe.boxShadowSecondary,[`
|
|
|
${vt}${Bt}bottomLeft,
|
|
|
${At}${Bt}bottomLeft
|
|
|
`]:{animationName:ge.fJ},[`
|
|
|
${vt}${Bt}topLeft,
|
|
|
${At}${Bt}topLeft,
|
|
|
${vt}${Bt}topRight,
|
|
|
${At}${Bt}topRight
|
|
|
`]:{animationName:ge.Qt},[`${Qe}${Bt}bottomLeft`]:{animationName:ge.Uw},[`
|
|
|
${Qe}${Bt}topLeft,
|
|
|
${Qe}${Bt}topRight
|
|
|
`]:{animationName:ge.ly},"&-hidden":{display:"none"},[`${Et}`]:Object.assign(Object.assign({},Le(xe)),{cursor:"pointer",transition:`background ${xe.motionDurationSlow} ease`,borderRadius:xe.borderRadiusSM,"&-group":{color:xe.colorTextDescription,fontSize:xe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},be.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Et}-option-disabled)`]:{backgroundColor:xe.optionActiveBg},[`&-selected:not(${Et}-option-disabled)`]:{color:xe.optionSelectedColor,fontWeight:xe.optionSelectedFontWeight,backgroundColor:xe.optionSelectedBg,[`${Et}-option-state`]:{color:xe.colorPrimary}},"&-disabled":{[`&${Et}-option-selected`]:{backgroundColor:xe.colorBgContainerDisabled},color:xe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:xe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ge.oN)(xe,"slide-up"),(0,ge.oN)(xe,"slide-down"),(0,Te.Fm)(xe,"move-up"),(0,Te.Fm)(xe,"move-down")]};const Pe=2,at=xe=>{let{controlHeightSM:We,controlHeight:je,lineWidth:Et}=xe;const vt=(je-We)/2-Et,At=Math.ceil(vt/2);return[vt,At]};function Oe(xe,We){const{componentCls:je,iconCls:Et}=xe,vt=`${je}-selection-overflow`,At=xe.multipleSelectItemHeight,[Qe]=at(xe),Bt=We?`${je}-${We}`:"";return{[`${je}-multiple${Bt}`]:{fontSize:xe.fontSize,[vt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${je}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Qe-Pe}px ${Pe*2}px`,borderRadius:xe.borderRadius,[`${je}-show-search&`]:{cursor:"text"},[`${je}-disabled&`]:{background:xe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Pe}px 0`,lineHeight:`${At}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${je}-show-arrow ${je}-selector,
|
|
|
&${je}-allow-clear ${je}-selector
|
|
|
`]:{paddingInlineEnd:xe.fontSizeIcon+xe.controlPaddingHorizontal},[`${je}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:At,marginTop:Pe,marginBottom:Pe,lineHeight:`${At-xe.lineWidth*2}px`,background:xe.multipleItemBg,border:`${xe.lineWidth}px ${xe.lineType} ${xe.multipleItemBorderColor}`,borderRadius:xe.borderRadiusSM,cursor:"default",transition:`font-size ${xe.motionDurationSlow}, line-height ${xe.motionDurationSlow}, height ${xe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Pe*2,paddingInlineStart:xe.paddingXS,paddingInlineEnd:xe.paddingXS/2,[`${je}-disabled&`]:{color:xe.multipleItemColorDisabled,borderColor:xe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:xe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,be.Ro)()),{display:"inline-flex",alignItems:"center",color:xe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Et}`]:{verticalAlign:"-0.2em"},"&:hover":{color:xe.colorIconHover}})},[`${vt}-item + ${vt}-item`]:{[`${je}-selection-search`]:{marginInlineStart:0}},[`${je}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:xe.inputPaddingHorizontalBase-Qe,"\n &-input,\n &-mirror\n ":{height:At,fontFamily:xe.fontFamily,lineHeight:`${At}px`,transition:`all ${xe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${je}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:xe.inputPaddingHorizontalBase,insetInlineEnd:xe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${xe.motionDurationSlow}`}}}}var nt=xe=>{const{componentCls:We}=xe,je=(0,$e.TS)(xe,{controlHeight:xe.controlHeightSM,multipleSelectItemHeight:xe.controlHeightXS,borderRadius:xe.borderRadiusSM,borderRadiusSM:xe.borderRadiusXS}),Et=(0,$e.TS)(xe,{fontSize:xe.fontSizeLG,controlHeight:xe.controlHeightLG,multipleSelectItemHeight:xe.multipleItemHeightLG,borderRadius:xe.borderRadiusLG,borderRadiusSM:xe.borderRadius}),[,vt]=at(xe);return[Oe(xe),Oe(je,"sm"),{[`${We}-multiple${We}-sm`]:{[`${We}-selection-placeholder`]:{insetInline:xe.controlPaddingHorizontalSM-xe.lineWidth},[`${We}-selection-search`]:{marginInlineStart:vt}}},Oe(Et,"lg")]};function rt(xe,We){const{componentCls:je,inputPaddingHorizontalBase:Et,borderRadius:vt}=xe,At=xe.controlHeight-xe.lineWidth*2,Qe=Math.ceil(xe.fontSize*1.25),Bt=We?`${je}-${We}`:"";return{[`${je}-single${Bt}`]:{fontSize:xe.fontSize,[`${je}-selector`]:Object.assign(Object.assign({},(0,be.Wf)(xe)),{display:"flex",borderRadius:vt,[`${je}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Et,insetInlineEnd:Et,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${je}-selection-item,
|
|
|
${je}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${At}px`,transition:`all ${xe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${At}px`}},[`${je}-selection-item`]:{position:"relative",userSelect:"none"},[`${je}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${je}-selection-item:after`,`${je}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${je}-show-arrow ${je}-selection-item,
|
|
|
&${je}-show-arrow ${je}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Qe},[`&${je}-open ${je}-selection-item`]:{color:xe.colorTextPlaceholder},[`&:not(${je}-customize-input)`]:{[`${je}-selector`]:{width:"100%",height:xe.controlHeight,padding:`0 ${Et}px`,[`${je}-selection-search-input`]:{height:At},"&:after":{lineHeight:`${At}px`}}},[`&${je}-customize-input`]:{[`${je}-selector`]:{"&:after":{display:"none"},[`${je}-selection-search`]:{position:"static",width:"100%"},[`${je}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Et}px`,"&:after":{display:"none"}}}}}}}function Je(xe){const{componentCls:We}=xe,je=xe.controlPaddingHorizontalSM-xe.lineWidth;return[rt(xe),rt((0,$e.TS)(xe,{controlHeight:xe.controlHeightSM,borderRadius:xe.borderRadiusSM}),"sm"),{[`${We}-single${We}-sm`]:{[`&:not(${We}-customize-input)`]:{[`${We}-selection-search`]:{insetInlineStart:je,insetInlineEnd:je},[`${We}-selector`]:{padding:`0 ${je}px`},[`&${We}-show-arrow ${We}-selection-search`]:{insetInlineEnd:je+xe.fontSize*1.5},[`
|
|
|
&${We}-show-arrow ${We}-selection-item,
|
|
|
&${We}-show-arrow ${We}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:xe.fontSize*1.5}}}},rt((0,$e.TS)(xe,{controlHeight:xe.singleItemHeightLG,fontSize:xe.fontSizeLG,borderRadius:xe.borderRadiusLG}),"lg")]}const Ee=xe=>{const{componentCls:We,selectorBg:je}=xe;return{position:"relative",backgroundColor:je,border:`${xe.lineWidth}px ${xe.lineType} ${xe.colorBorder}`,transition:`all ${xe.motionDurationMid} ${xe.motionEaseInOut}`,input:{cursor:"pointer"},[`${We}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${We}-disabled&`]:{color:xe.colorTextDisabled,background:xe.colorBgContainerDisabled,cursor:"not-allowed",[`${We}-multiple&`]:{background:xe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},pt=function(xe,We){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Et,borderHoverColor:vt,outlineColor:At,antCls:Qe}=We,Bt=je?{[`${Et}-selector`]:{borderColor:vt}}:{};return{[xe]:{[`&:not(${Et}-disabled):not(${Et}-customize-input):not(${Qe}-pagination-size-changer)`]:Object.assign(Object.assign({},Bt),{[`${Et}-focused& ${Et}-selector`]:{borderColor:vt,boxShadow:`0 0 0 ${We.controlOutlineWidth}px ${At}`,outline:0},[`&:hover ${Et}-selector`]:{borderColor:vt}})}}},Kt=xe=>{const{componentCls:We}=xe;return{[`${We}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Ye=xe=>{const{componentCls:We,inputPaddingHorizontalBase:je,iconCls:Et}=xe;return{[We]:Object.assign(Object.assign({},(0,be.Wf)(xe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${We}-customize-input) ${We}-selector`]:Object.assign(Object.assign({},Ee(xe)),Kt(xe)),[`${We}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},be.vS),[`${We}-selection-placeholder`]:Object.assign(Object.assign({},be.vS),{flex:1,color:xe.colorTextPlaceholder,pointerEvents:"none"}),[`${We}-arrow`]:Object.assign(Object.assign({},(0,be.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,height:xe.fontSizeIcon,marginTop:-xe.fontSizeIcon/2,color:xe.colorTextQuaternary,fontSize:xe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Et]:{verticalAlign:"top",transition:`transform ${xe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${We}-suffix)`]:{pointerEvents:"auto"}},[`${We}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${We}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,zIndex:1,display:"inline-block",width:xe.fontSizeIcon,height:xe.fontSizeIcon,marginTop:-xe.fontSizeIcon/2,color:xe.colorTextQuaternary,fontSize:xe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:xe.clearBg,cursor:"pointer",opacity:0,transition:`color ${xe.motionDurationMid} ease, opacity ${xe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:xe.colorTextTertiary}},"&:hover":{[`${We}-clear`]:{opacity:1}}}),[`${We}-has-feedback`]:{[`${We}-clear`]:{insetInlineEnd:je+xe.fontSize+xe.paddingXS}}}},lt=xe=>{const{componentCls:We}=xe;return[{[We]:{[`&-borderless ${We}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${We}-in-form-item`]:{width:"100%"}}},Ye(xe),Je(xe),nt(xe),me(xe),{[`${We}-rtl`]:{direction:"rtl"}},pt(We,(0,$e.TS)(xe,{borderHoverColor:xe.colorPrimaryHover,outlineColor:xe.controlOutline})),pt(`${We}-status-error`,(0,$e.TS)(xe,{borderHoverColor:xe.colorErrorHover,outlineColor:xe.colorErrorOutline}),!0),pt(`${We}-status-warning`,(0,$e.TS)(xe,{borderHoverColor:xe.colorWarningHover,outlineColor:xe.colorWarningOutline}),!0),(0,Ve.c)(xe,{borderElCls:`${We}-selector`,focusElCls:`${We}-focused`})]};var Me=(0,et.Z)("Select",(xe,We)=>{let{rootPrefixCls:je}=We;const Et=(0,$e.TS)(xe,{rootPrefixCls:je,inputPaddingHorizontalBase:xe.paddingSM-1,multipleSelectItemHeight:xe.multipleItemHeight});return[lt(Et)]},xe=>{const{fontSize:We,lineHeight:je,controlHeight:Et,controlPaddingHorizontal:vt,zIndexPopupBase:At,colorText:Qe,fontWeightStrong:Bt,controlItemBgActive:Lt,controlItemBgHover:hn,colorBgContainer:ut,colorFillSecondary:Yt,controlHeightLG:vn,controlHeightSM:un,colorBgContainerDisabled:Ze,colorTextDisabled:Ae}=xe;return{zIndexPopup:At+50,optionSelectedColor:Qe,optionSelectedFontWeight:Bt,optionSelectedBg:Lt,optionActiveBg:hn,optionPadding:`${(Et-We*je)/2}px ${vt}px`,optionFontSize:We,optionLineHeight:je,optionHeight:Et,selectorBg:ut,clearBg:ut,singleItemHeightLG:vn,multipleItemBg:Yt,multipleItemBorderColor:"transparent",multipleItemHeight:un,multipleItemHeightLG:Et,multipleSelectorBgDisabled:Ze,multipleItemColorDisabled:Ae,multipleItemBorderColorDisabled:"transparent"}})},13458:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ve}});const be=$e=>{const ge={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:$e==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ge),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ge),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ge),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ge),{points:["br","tr"],offset:[0,-4]})}};function Ve($e,et){return $e||be(et)}},78642:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return be}});function be(Ve,$e){return $e!==void 0?$e:Ve!==null}},46163:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Se}});var be=le(18299),Ve=le(16646),$e=le(73475),et=le(42922),ge=le(3407),Te=le(72395),Le=le(67294);function Se(me){let{suffixIcon:Pe,clearIcon:at,menuItemSelectedIcon:Oe,removeIcon:ht,loading:nt,multiple:rt,hasFeedback:Je,prefixCls:Ee,showSuffixIcon:pt,feedbackIcon:Kt,showArrow:Ye,componentName:lt}=me;const Me=at!=null?at:Le.createElement(Ve.Z,null),xe=vt=>Pe===null&&!Je&&!Ye?null:Le.createElement(Le.Fragment,null,pt!==!1&&vt,Je&&Kt);let We=null;if(Pe!==void 0)We=xe(Pe);else if(nt)We=xe(Le.createElement(ge.Z,{spin:!0}));else{const vt=`${Ee}-suffix`;We=At=>{let{open:Qe,showSearch:Bt}=At;return xe(Qe&&Bt?Le.createElement(Te.Z,{className:vt}):Le.createElement(et.Z,{className:vt}))}}let je=null;Oe!==void 0?je=Oe:rt?je=Le.createElement(be.Z,null):je=null;let Et=null;return ht!==void 0?Et=ht:Et=Le.createElement($e.Z,null),{clearIcon:Me,suffixIcon:We,itemIcon:je,removeIcon:Et}}},33507:function(mn,Vt){"use strict";const le=be=>({[be.componentCls]:{[`${be.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${be.motionDurationMid} ${be.motionEaseInOut},
|
|
|
opacity ${be.motionDurationMid} ${be.motionEaseInOut} !important`}},[`${be.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${be.motionDurationMid} ${be.motionEaseInOut},
|
|
|
opacity ${be.motionDurationMid} ${be.motionEaseInOut} !important`}}});Vt.Z=le},33297:function(mn,Vt,le){"use strict";le.d(Vt,{Fm:function(){return Oe}});var be=le(45930),Ve=le(93590);const $e=new be.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),et=new be.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ge=new be.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Te=new be.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Le=new be.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 be.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 be.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Pe=new be.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),at={"move-up":{inKeyframes:me,outKeyframes:Pe},"move-down":{inKeyframes:$e,outKeyframes:et},"move-left":{inKeyframes:ge,outKeyframes:Te},"move-right":{inKeyframes:Le,outKeyframes:Se}},Oe=(ht,nt)=>{const{antCls:rt}=ht,Je=`${rt}-${nt}`,{inKeyframes:Ee,outKeyframes:pt}=at[nt];return[(0,Ve.R)(Je,Ee,pt,ht.motionDurationMid),{[`
|
|
|
${Je}-enter,
|
|
|
${Je}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:ht.motionEaseOutCirc},[`${Je}-leave`]:{animationTimingFunction:ht.motionEaseInOutCirc}}]}},67771:function(mn,Vt,le){"use strict";le.d(Vt,{Qt:function(){return ge},Uw:function(){return et},fJ:function(){return $e},ly:function(){return Te},oN:function(){return Oe}});var be=le(45930),Ve=le(93590);const $e=new be.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),et=new be.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ge=new be.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Te=new be.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Le=new be.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Se=new be.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),me=new be.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Pe=new be.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),at={"slide-up":{inKeyframes:$e,outKeyframes:et},"slide-down":{inKeyframes:ge,outKeyframes:Te},"slide-left":{inKeyframes:Le,outKeyframes:Se},"slide-right":{inKeyframes:me,outKeyframes:Pe}},Oe=(ht,nt)=>{const{antCls:rt}=ht,Je=`${rt}-${nt}`,{inKeyframes:Ee,outKeyframes:pt}=at[nt];return[(0,Ve.R)(Je,Ee,pt,ht.motionDurationMid),{[`
|
|
|
${Je}-enter,
|
|
|
${Je}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ht.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Je}-leave`]:{animationTimingFunction:ht.motionEaseInQuint}}]}},47897:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return he}});var be=le(3407),Ve=le(94184),$e=le.n(Ve);function et(){return et=Object.assign?Object.assign.bind():function(fe){for(var oe=1;oe<arguments.length;oe++){var ke=arguments[oe];for(var Ge in ke)Object.prototype.hasOwnProperty.call(ke,Ge)&&(fe[Ge]=ke[Ge])}return fe},et.apply(this,arguments)}function ge(fe){"@babel/helpers - typeof";return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},ge(fe)}function Te(fe,oe){if(ge(fe)!=="object"||fe===null)return fe;var ke=fe[Symbol.toPrimitive];if(ke!==void 0){var Ge=ke.call(fe,oe||"default");if(ge(Ge)!=="object")return Ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(fe)}function Le(fe){var oe=Te(fe,"string");return ge(oe)==="symbol"?oe:String(oe)}function Se(fe,oe,ke){return oe=Le(oe),oe in fe?Object.defineProperty(fe,oe,{value:ke,enumerable:!0,configurable:!0,writable:!0}):fe[oe]=ke,fe}function me(fe){if(Array.isArray(fe))return fe}function Pe(fe,oe){var ke=fe==null?null:typeof Symbol!="undefined"&&fe[Symbol.iterator]||fe["@@iterator"];if(ke!=null){var Ge,St,Tt,Ot,Wt=[],$t=!0,Gn=!1;try{if(Tt=(ke=ke.call(fe)).next,oe===0){if(Object(ke)!==ke)return;$t=!1}else for(;!($t=(Ge=Tt.call(ke)).done)&&(Wt.push(Ge.value),Wt.length!==oe);$t=!0);}catch(ar){Gn=!0,St=ar}finally{try{if(!$t&&ke.return!=null&&(Ot=ke.return(),Object(Ot)!==Ot))return}finally{if(Gn)throw St}}return Wt}}function at(fe,oe){(oe==null||oe>fe.length)&&(oe=fe.length);for(var ke=0,Ge=new Array(oe);ke<oe;ke++)Ge[ke]=fe[ke];return Ge}function Oe(fe,oe){if(fe){if(typeof fe=="string")return at(fe,oe);var ke=Object.prototype.toString.call(fe).slice(8,-1);if(ke==="Object"&&fe.constructor&&(ke=fe.constructor.name),ke==="Map"||ke==="Set")return Array.from(fe);if(ke==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ke))return at(fe,oe)}}function ht(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(fe,oe){return me(fe)||Pe(fe,oe)||Oe(fe,oe)||ht()}function rt(fe,oe){if(fe==null)return{};var ke={},Ge=Object.keys(fe),St,Tt;for(Tt=0;Tt<Ge.length;Tt++)St=Ge[Tt],!(oe.indexOf(St)>=0)&&(ke[St]=fe[St]);return ke}function Je(fe,oe){if(fe==null)return{};var ke=rt(fe,oe),Ge,St;if(Object.getOwnPropertySymbols){var Tt=Object.getOwnPropertySymbols(fe);for(St=0;St<Tt.length;St++)Ge=Tt[St],!(oe.indexOf(Ge)>=0)&&Object.prototype.propertyIsEnumerable.call(fe,Ge)&&(ke[Ge]=fe[Ge])}return ke}var Ee=le(67294);function pt(fe){if(Array.isArray(fe))return fe}function Kt(fe,oe){var ke=fe==null?null:typeof Symbol!="undefined"&&fe[Symbol.iterator]||fe["@@iterator"];if(ke!=null){var Ge,St,Tt,Ot,Wt=[],$t=!0,Gn=!1;try{if(Tt=(ke=ke.call(fe)).next,oe===0){if(Object(ke)!==ke)return;$t=!1}else for(;!($t=(Ge=Tt.call(ke)).done)&&(Wt.push(Ge.value),Wt.length!==oe);$t=!0);}catch(ar){Gn=!0,St=ar}finally{try{if(!$t&&ke.return!=null&&(Ot=ke.return(),Object(Ot)!==Ot))return}finally{if(Gn)throw St}}return Wt}}function Ye(fe,oe){(oe==null||oe>fe.length)&&(oe=fe.length);for(var ke=0,Ge=new Array(oe);ke<oe;ke++)Ge[ke]=fe[ke];return Ge}function lt(fe,oe){if(fe){if(typeof fe=="string")return Ye(fe,oe);var ke=Object.prototype.toString.call(fe).slice(8,-1);if(ke==="Object"&&fe.constructor&&(ke=fe.constructor.name),ke==="Map"||ke==="Set")return Array.from(fe);if(ke==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ke))return Ye(fe,oe)}}function Me(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(fe,oe){return pt(fe)||Kt(fe,oe)||lt(fe,oe)||Me()}function We(fe){var oe=Ee.useRef();oe.current=fe;var ke=Ee.useCallback(function(){for(var Ge,St=arguments.length,Tt=new Array(St),Ot=0;Ot<St;Ot++)Tt[Ot]=arguments[Ot];return(Ge=oe.current)===null||Ge===void 0?void 0:Ge.call.apply(Ge,[oe].concat(Tt))},[]);return ke}function je(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Et=je()?Ee.useLayoutEffect:Ee.useEffect,vt=function(oe,ke){var Ge=Ee.useRef(!0);Et(function(){return oe(Ge.current)},ke),Et(function(){return Ge.current=!1,function(){Ge.current=!0}},[])},At=function(oe,ke){vt(function(Ge){if(!Ge)return oe()},ke)},Qe=null;function Bt(fe){var oe=Ee.useRef(!1),ke=Ee.useState(fe),Ge=xe(ke,2),St=Ge[0],Tt=Ge[1];Ee.useEffect(function(){return oe.current=!1,function(){oe.current=!0}},[]);function Ot(Wt,$t){$t&&oe.current||Tt(Wt)}return[St,Ot]}function Lt(fe){return fe!==void 0}function hn(fe,oe){var ke=oe||{},Ge=ke.defaultValue,St=ke.value,Tt=ke.onChange,Ot=ke.postState,Wt=Bt(function(){return Lt(St)?St:Lt(Ge)?typeof Ge=="function"?Ge():Ge:typeof fe=="function"?fe():fe}),$t=xe(Wt,2),Gn=$t[0],ar=$t[1],Dt=St!==void 0?St:Gn,tn=Ot?Ot(Dt):Dt,qn=We(Tt),Er=Bt([Dt]),kn=xe(Er,2),gr=kn[0],Di=kn[1];At(function(){var Xr=gr[0];Gn!==Xr&&qn(Gn,Xr)},[gr]),At(function(){Lt(St)||ar(St)},[St]);var ni=We(function(Xr,Vr){ar(Xr,Vr),Di([Dt],Vr)});return[tn,ni]}var ut={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(oe){var ke=oe.keyCode;if(oe.altKey&&!oe.ctrlKey||oe.metaKey||ke>=ut.F1&&ke<=ut.F12)return!1;switch(ke){case ut.ALT:case ut.CAPS_LOCK:case ut.CONTEXT_MENU:case ut.CTRL:case ut.DOWN:case ut.END:case ut.ESC:case ut.HOME:case ut.INSERT:case ut.LEFT:case ut.MAC_FF_META:case ut.META:case ut.NUMLOCK:case ut.NUM_CENTER:case ut.PAGE_DOWN:case ut.PAGE_UP:case ut.PAUSE:case ut.PRINT_SCREEN:case ut.RIGHT:case ut.SHIFT:case ut.UP:case ut.WIN_KEY:case ut.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(oe){if(oe>=ut.ZERO&&oe<=ut.NINE||oe>=ut.NUM_ZERO&&oe<=ut.NUM_MULTIPLY||oe>=ut.A&&oe<=ut.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&oe===0)return!0;switch(oe){case ut.SPACE:case ut.QUESTION_MARK:case ut.NUM_PLUS:case ut.NUM_MINUS:case ut.NUM_PERIOD:case ut.NUM_DIVISION:case ut.SEMICOLON:case ut.DASH:case ut.EQUALS:case ut.COMMA:case ut.PERIOD:case ut.SLASH:case ut.APOSTROPHE:case ut.SINGLE_QUOTE:case ut.OPEN_SQUARE_BRACKET:case ut.BACKSLASH:case ut.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Yt=ut,vn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],un=Ee.forwardRef(function(fe,oe){var ke,Ge=fe.prefixCls,St=Ge===void 0?"rc-switch":Ge,Tt=fe.className,Ot=fe.checked,Wt=fe.defaultChecked,$t=fe.disabled,Gn=fe.loadingIcon,ar=fe.checkedChildren,Dt=fe.unCheckedChildren,tn=fe.onClick,qn=fe.onChange,Er=fe.onKeyDown,kn=Je(fe,vn),gr=hn(!1,{value:Ot,defaultValue:Wt}),Di=nt(gr,2),ni=Di[0],Xr=Di[1];function Vr(Ii,Lr){var Xi=ni;return $t||(Xi=Ii,Xr(Xi),qn==null||qn(Xi,Lr)),Xi}function Si(Ii){Ii.which===Yt.LEFT?Vr(!1,Ii):Ii.which===Yt.RIGHT&&Vr(!0,Ii),Er==null||Er(Ii)}function hi(Ii){var Lr=Vr(!ni,Ii);tn==null||tn(Lr,Ii)}var Ti=$e()(St,Tt,(ke={},Se(ke,"".concat(St,"-checked"),ni),Se(ke,"".concat(St,"-disabled"),$t),ke));return Ee.createElement("button",et({},kn,{type:"button",role:"switch","aria-checked":ni,disabled:$t,className:Ti,ref:oe,onKeyDown:Si,onClick:hi}),Gn,Ee.createElement("span",{className:"".concat(St,"-inner")},Ee.createElement("span",{className:"".concat(St,"-inner-checked")},ar),Ee.createElement("span",{className:"".concat(St,"-inner-unchecked")},Dt)))});un.displayName="Switch";var Ze=un,Ae=le(45353),Pt=le(53124),bn=le(98866),nn=le(98675),tt=le(84780),ot=le(14747),Ht=le(67968),En=le(45503);const fn=fe=>{const{componentCls:oe,trackHeightSM:ke,trackPadding:Ge,trackMinWidthSM:St,innerMinMarginSM:Tt,innerMaxMarginSM:Ot,handleSizeSM:Wt}=fe,$t=`${oe}-inner`;return{[oe]:{[`&${oe}-small`]:{minWidth:St,height:ke,lineHeight:`${ke}px`,[`${oe}-inner`]:{paddingInlineStart:Ot,paddingInlineEnd:Tt,[`${$t}-checked`]:{marginInlineStart:`calc(-100% + ${Wt+Ge*2}px - ${Ot*2}px)`,marginInlineEnd:`calc(100% - ${Wt+Ge*2}px + ${Ot*2}px)`},[`${$t}-unchecked`]:{marginTop:-ke,marginInlineStart:0,marginInlineEnd:0}},[`${oe}-handle`]:{width:Wt,height:Wt},[`${oe}-loading-icon`]:{top:(Wt-fe.switchLoadingIconSize)/2,fontSize:fe.switchLoadingIconSize},[`&${oe}-checked`]:{[`${oe}-inner`]:{paddingInlineStart:Tt,paddingInlineEnd:Ot,[`${$t}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${$t}-unchecked`]:{marginInlineStart:`calc(100% - ${Wt+Ge*2}px + ${Ot*2}px)`,marginInlineEnd:`calc(-100% + ${Wt+Ge*2}px - ${Ot*2}px)`}},[`${oe}-handle`]:{insetInlineStart:`calc(100% - ${Wt+Ge}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${$t}`]:{[`${$t}-unchecked`]:{marginInlineStart:fe.marginXXS/2,marginInlineEnd:-fe.marginXXS/2}},[`&${oe}-checked ${$t}`]:{[`${$t}-checked`]:{marginInlineStart:-fe.marginXXS/2,marginInlineEnd:fe.marginXXS/2}}}}}}},Gt=fe=>{const{componentCls:oe,handleSize:ke}=fe;return{[oe]:{[`${oe}-loading-icon${fe.iconCls}`]:{position:"relative",top:(ke-fe.fontSize)/2,color:fe.switchLoadingIconColor,verticalAlign:"top"},[`&${oe}-checked ${oe}-loading-icon`]:{color:fe.switchColor}}}},Ft=fe=>{const{componentCls:oe,motion:ke,trackPadding:Ge,handleBg:St,handleShadow:Tt,handleSize:Ot}=fe,Wt=`${oe}-handle`;return{[oe]:{[Wt]:{position:"absolute",top:Ge,insetInlineStart:Ge,width:Ot,height:Ot,transition:`all ${fe.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:St,borderRadius:Ot/2,boxShadow:Tt,transition:`all ${fe.switchDuration} ease-in-out`,content:'""'}},[`&${oe}-checked ${Wt}`]:{insetInlineStart:`calc(100% - ${Ot+Ge}px)`},[`&:not(${oe}-disabled):active`]:ke?{[`${Wt}::before`]:{insetInlineEnd:fe.switchHandleActiveInset,insetInlineStart:0},[`&${oe}-checked ${Wt}::before`]:{insetInlineEnd:0,insetInlineStart:fe.switchHandleActiveInset}}:{}}}},xn=fe=>{const{componentCls:oe,trackHeight:ke,trackPadding:Ge,innerMinMargin:St,innerMaxMargin:Tt,handleSize:Ot}=fe,Wt=`${oe}-inner`;return{[oe]:{[Wt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Tt,paddingInlineEnd:St,transition:`padding-inline-start ${fe.switchDuration} ease-in-out, padding-inline-end ${fe.switchDuration} ease-in-out`,[`${Wt}-checked, ${Wt}-unchecked`]:{display:"block",color:fe.colorTextLightSolid,fontSize:fe.fontSizeSM,transition:`margin-inline-start ${fe.switchDuration} ease-in-out, margin-inline-end ${fe.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Wt}-checked`]:{marginInlineStart:`calc(-100% + ${Ot+Ge*2}px - ${Tt*2}px)`,marginInlineEnd:`calc(100% - ${Ot+Ge*2}px + ${Tt*2}px)`},[`${Wt}-unchecked`]:{marginTop:-ke,marginInlineStart:0,marginInlineEnd:0}},[`&${oe}-checked ${Wt}`]:{paddingInlineStart:St,paddingInlineEnd:Tt,[`${Wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Wt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ot+Ge*2}px + ${Tt*2}px)`,marginInlineEnd:`calc(-100% + ${Ot+Ge*2}px - ${Tt*2}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${Wt}`]:{[`${Wt}-unchecked`]:{marginInlineStart:Ge*2,marginInlineEnd:-Ge*2}},[`&${oe}-checked ${Wt}`]:{[`${Wt}-checked`]:{marginInlineStart:-Ge*2,marginInlineEnd:Ge*2}}}}}},gn=fe=>{const{componentCls:oe,trackHeight:ke,trackMinWidth:Ge}=fe;return{[oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ot.Wf)(fe)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ge,height:ke,lineHeight:`${ke}px`,verticalAlign:"middle",background:fe.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${fe.motionDurationMid}`,userSelect:"none",[`&:hover:not(${oe}-disabled)`]:{background:fe.colorTextTertiary}}),(0,ot.Qy)(fe)),{[`&${oe}-checked`]:{background:fe.switchColor,[`&:hover:not(${oe}-disabled)`]:{background:fe.colorPrimaryHover}},[`&${oe}-loading, &${oe}-disabled`]:{cursor:"not-allowed",opacity:fe.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${oe}-rtl`]:{direction:"rtl"}})}};var _e=(0,Ht.Z)("Switch",fe=>{const oe=(0,En.TS)(fe,{switchDuration:fe.motionDurationMid,switchColor:fe.colorPrimary,switchDisabledOpacity:fe.opacityLoading,switchLoadingIconSize:fe.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${fe.opacityLoading})`,switchHandleActiveInset:"-30%"});return[gn(oe),xn(oe),Ft(oe),Gt(oe),fn(oe)]},fe=>{const{fontSize:oe,lineHeight:ke,controlHeight:Ge,colorWhite:St}=fe,Tt=oe*ke,Ot=Ge/2,Wt=2,$t=Tt-Wt*2,Gn=Ot-Wt*2;return{trackHeight:Tt,trackHeightSM:Ot,trackMinWidth:$t*2+Wt*4,trackMinWidthSM:Gn*2+Wt*2,trackPadding:Wt,handleBg:St,handleSize:$t,handleSizeSM:Gn,handleShadow:`0 2px 4px 0 ${new tt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:$t/2,innerMaxMargin:$t+Wt+Wt*2,innerMinMarginSM:Gn/2,innerMaxMarginSM:Gn+Wt+Wt*2}}),ce=function(fe,oe){var ke={};for(var Ge in fe)Object.prototype.hasOwnProperty.call(fe,Ge)&&oe.indexOf(Ge)<0&&(ke[Ge]=fe[Ge]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,Ge=Object.getOwnPropertySymbols(fe);St<Ge.length;St++)oe.indexOf(Ge[St])<0&&Object.prototype.propertyIsEnumerable.call(fe,Ge[St])&&(ke[Ge[St]]=fe[Ge[St]]);return ke};const se=Ee.forwardRef((fe,oe)=>{const{prefixCls:ke,size:Ge,disabled:St,loading:Tt,className:Ot,rootClassName:Wt,style:$t}=fe,Gn=ce(fe,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:ar,direction:Dt,switch:tn}=Ee.useContext(Pt.E_),qn=Ee.useContext(bn.Z),Er=(St!=null?St:qn)||Tt,kn=ar("switch",ke),gr=Ee.createElement("div",{className:`${kn}-handle`},Tt&&Ee.createElement(be.Z,{className:`${kn}-loading-icon`})),[Di,ni]=_e(kn),Xr=(0,nn.Z)(Ge),Vr=$e()(tn==null?void 0:tn.className,{[`${kn}-small`]:Xr==="small",[`${kn}-loading`]:Tt,[`${kn}-rtl`]:Dt==="rtl"},Ot,Wt,ni),Si=Object.assign(Object.assign({},tn==null?void 0:tn.style),$t);return Di(Ee.createElement(Ae.Z,{component:"Switch"},Ee.createElement(Ze,Object.assign({},Gn,{prefixCls:kn,className:Vr,style:Si,disabled:Er,ref:oe,loadingIcon:gr}))))});se.__ANT_SWITCH=!0;var he=se},66368:function(mn,Vt,le){"use strict";le.d(Vt,{default:function(){return Fi}});var be=le(73475),Ve=le(25877),$e=le(38308),et=le(94184),ge=le.n(et),Te=le(87462),Le=le(4942),Se=le(1413),me=le(97685),Pe=le(71002),at=le(45987),Oe=le(67294),ht=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ie=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Ie)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Ie==null?void 0:Ie.substr(0,4))};function nt(Ie){var Fe=Oe.useRef();Fe.current=Ie;var Ne=Oe.useCallback(function(){for(var Ue,it=arguments.length,ft=new Array(it),xt=0;xt<it;xt++)ft[xt]=arguments[xt];return(Ue=Fe.current)===null||Ue===void 0?void 0:Ue.call.apply(Ue,[Fe].concat(ft))},[]);return Ne}function rt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Je=rt()?Oe.useLayoutEffect:Oe.useEffect,Ee=function(Fe,Ne){var Ue=Oe.useRef(!0);Je(function(){return Fe(Ue.current)},Ne),Je(function(){return Ue.current=!1,function(){Ue.current=!0}},[])},pt=function(Fe,Ne){Ee(function(Ue){if(!Ue)return Fe()},Ne)},Kt=null;function Ye(Ie){var Fe=Oe.useRef(!1),Ne=Oe.useState(Ie),Ue=(0,me.Z)(Ne,2),it=Ue[0],ft=Ue[1];Oe.useEffect(function(){return Fe.current=!1,function(){Fe.current=!0}},[]);function xt(Xt,Qt){Qt&&Fe.current||ft(Xt)}return[it,xt]}function lt(Ie){return Ie!==void 0}function Me(Ie,Fe){var Ne=Fe||{},Ue=Ne.defaultValue,it=Ne.value,ft=Ne.onChange,xt=Ne.postState,Xt=Ye(function(){return lt(it)?it:lt(Ue)?typeof Ue=="function"?Ue():Ue:typeof Ie=="function"?Ie():Ie}),Qt=(0,me.Z)(Xt,2),zn=Qt[0],nr=Qt[1],Rn=it!==void 0?it:zn,on=xt?xt(Rn):Rn,rn=nt(ft),yn=Ye([Rn]),Mn=(0,me.Z)(yn,2),er=Mn[0],Hn=Mn[1];pt(function(){var Un=er[0];zn!==Un&&rn(zn,Un)},[er]),pt(function(){lt(it)||nr(it)},[it]);var $n=nt(function(Un,Wn){nr(Un,Wn),Hn([Rn],Wn)});return[on,$n]}var xe=le(62874),We=(0,Oe.createContext)(null),je=Oe.forwardRef(function(Ie,Fe){var Ne=Ie.prefixCls,Ue=Ie.className,it=Ie.style,ft=Ie.id,xt=Ie.active,Xt=Ie.tabKey,Qt=Ie.children;return Oe.createElement("div",{id:ft&&"".concat(ft,"-panel-").concat(Xt),role:"tabpanel",tabIndex:xt?0:-1,"aria-labelledby":ft&&"".concat(ft,"-tab-").concat(Xt),"aria-hidden":!xt,style:it,className:ge()(Ne,xt&&"".concat(Ne,"-active"),Ue),ref:Fe},Qt)}),Et=je,vt=["key","forceRender","style","className"];function At(Ie){var Fe=Ie.id,Ne=Ie.activeKey,Ue=Ie.animated,it=Ie.tabPosition,ft=Ie.destroyInactiveTabPane,xt=Oe.useContext(We),Xt=xt.prefixCls,Qt=xt.tabs,zn=Ue.tabPane,nr="".concat(Xt,"-tabpane");return Oe.createElement("div",{className:ge()("".concat(Xt,"-content-holder"))},Oe.createElement("div",{className:ge()("".concat(Xt,"-content"),"".concat(Xt,"-content-").concat(it),(0,Le.Z)({},"".concat(Xt,"-content-animated"),zn))},Qt.map(function(Rn){var on=Rn.key,rn=Rn.forceRender,yn=Rn.style,Mn=Rn.className,er=(0,at.Z)(Rn,vt),Hn=on===Ne;return Oe.createElement(xe.Z,(0,Te.Z)({key:on,visible:Hn,forceRender:rn,removeOnLeave:!!ft,leavedClassName:"".concat(nr,"-hidden")},Ue.tabPaneMotion),function($n,Un){var Wn=$n.style,ir=$n.className;return Oe.createElement(Et,(0,Te.Z)({},er,{prefixCls:nr,id:Fe,tabKey:on,animated:zn,active:Hn,style:(0,Se.Z)((0,Se.Z)({},yn),Wn),className:ge()(Mn,ir),ref:Un}))})})))}var Qe=le(74902),Bt=le(48555),Lt=le(59864);function hn(Ie,Fe,Ne){var Ue=Oe.useRef({});return(!("value"in Ue.current)||Ne(Ue.current.condition,Fe))&&(Ue.current.value=Ie(),Ue.current.condition=Fe),Ue.current.value}function ut(Ie,Fe){typeof Ie=="function"?Ie(Fe):(0,Pe.Z)(Ie)==="object"&&Ie&&"current"in Ie&&(Ie.current=Fe)}function Yt(){for(var Ie=arguments.length,Fe=new Array(Ie),Ne=0;Ne<Ie;Ne++)Fe[Ne]=arguments[Ne];var Ue=Fe.filter(function(it){return it});return Ue.length<=1?Ue[0]:function(it){Fe.forEach(function(ft){ut(ft,it)})}}function vn(){for(var Ie=arguments.length,Fe=new Array(Ie),Ne=0;Ne<Ie;Ne++)Fe[Ne]=arguments[Ne];return hn(function(){return Yt.apply(void 0,Fe)},Fe,function(Ue,it){return Ue.length===it.length&&Ue.every(function(ft,xt){return ft===it[xt]})})}function un(Ie){var Fe,Ne,Ue=isMemo(Ie)?Ie.type.type:Ie.type;return!(typeof Ue=="function"&&!((Fe=Ue.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof Ie=="function"&&!((Ne=Ie.prototype)!==null&&Ne!==void 0&&Ne.render))}var Ze={width:0,height:0,left:0,top:0};function Ae(Ie,Fe,Ne){return(0,Oe.useMemo)(function(){for(var Ue,it=new Map,ft=Fe.get((Ue=Ie[0])===null||Ue===void 0?void 0:Ue.key)||Ze,xt=ft.left+ft.width,Xt=0;Xt<Ie.length;Xt+=1){var Qt=Ie[Xt].key,zn=Fe.get(Qt);if(!zn){var nr;zn=Fe.get((nr=Ie[Xt-1])===null||nr===void 0?void 0:nr.key)||Ze}var Rn=it.get(Qt)||(0,Se.Z)({},zn);Rn.right=xt-Rn.left-Rn.width,it.set(Qt,Rn)}return it},[Ie.map(function(Ue){return Ue.key}).join("_"),Fe,Ne])}function Pt(Ie,Fe){var Ne=Oe.useRef(Ie),Ue=Oe.useState({}),it=(0,me.Z)(Ue,2),ft=it[1];function xt(Xt){var Qt=typeof Xt=="function"?Xt(Ne.current):Xt;Qt!==Ne.current&&Fe(Qt,Ne.current),Ne.current=Qt,ft({})}return[Ne.current,xt]}var bn=.1,nn=.01,tt=20,ot=Math.pow(.995,tt);function Ht(Ie,Fe){var Ne=(0,Oe.useState)(),Ue=(0,me.Z)(Ne,2),it=Ue[0],ft=Ue[1],xt=(0,Oe.useState)(0),Xt=(0,me.Z)(xt,2),Qt=Xt[0],zn=Xt[1],nr=(0,Oe.useState)(0),Rn=(0,me.Z)(nr,2),on=Rn[0],rn=Rn[1],yn=(0,Oe.useState)(),Mn=(0,me.Z)(yn,2),er=Mn[0],Hn=Mn[1],$n=(0,Oe.useRef)();function Un(yt){var qt=yt.touches[0],dn=qt.screenX,sn=qt.screenY;ft({x:dn,y:sn}),window.clearInterval($n.current)}function Wn(yt){if(it){yt.preventDefault();var qt=yt.touches[0],dn=qt.screenX,sn=qt.screenY;ft({x:dn,y:sn});var Dn=dn-it.x,Sn=sn-it.y;Fe(Dn,Sn);var Jt=Date.now();zn(Jt),rn(Jt-Qt),Hn({x:Dn,y:Sn})}}function ir(){if(it&&(ft(null),Hn(null),er)){var yt=er.x/on,qt=er.y/on,dn=Math.abs(yt),sn=Math.abs(qt);if(Math.max(dn,sn)<bn)return;var Dn=yt,Sn=qt;$n.current=window.setInterval(function(){if(Math.abs(Dn)<nn&&Math.abs(Sn)<nn){window.clearInterval($n.current);return}Dn*=ot,Sn*=ot,Fe(Dn*tt,Sn*tt)},tt)}}var ze=(0,Oe.useRef)();function Ke(yt){var qt=yt.deltaX,dn=yt.deltaY,sn=0,Dn=Math.abs(qt),Sn=Math.abs(dn);Dn===Sn?sn=ze.current==="x"?qt:dn:Dn>Sn?(sn=qt,ze.current="x"):(sn=dn,ze.current="y"),Fe(-sn,-sn)&&yt.preventDefault()}var kt=(0,Oe.useRef)(null);kt.current={onTouchStart:Un,onTouchMove:Wn,onTouchEnd:ir,onWheel:Ke},Oe.useEffect(function(){function yt(Dn){kt.current.onTouchStart(Dn)}function qt(Dn){kt.current.onTouchMove(Dn)}function dn(Dn){kt.current.onTouchEnd(Dn)}function sn(Dn){kt.current.onWheel(Dn)}return document.addEventListener("touchmove",qt,{passive:!1}),document.addEventListener("touchend",dn,{passive:!1}),Ie.current.addEventListener("touchstart",yt,{passive:!1}),Ie.current.addEventListener("wheel",sn),function(){document.removeEventListener("touchmove",qt),document.removeEventListener("touchend",dn)}},[])}function En(Ie){var Fe=(0,Oe.useState)(0),Ne=(0,me.Z)(Fe,2),Ue=Ne[0],it=Ne[1],ft=(0,Oe.useRef)(0),xt=(0,Oe.useRef)();return xt.current=Ie,pt(function(){var Xt;(Xt=xt.current)===null||Xt===void 0||Xt.call(xt)},[Ue]),function(){ft.current===Ue&&(ft.current+=1,it(ft.current))}}function fn(Ie){var Fe=(0,Oe.useRef)([]),Ne=(0,Oe.useState)({}),Ue=(0,me.Z)(Ne,2),it=Ue[1],ft=(0,Oe.useRef)(typeof Ie=="function"?Ie():Ie),xt=En(function(){var Qt=ft.current;Fe.current.forEach(function(zn){Qt=zn(Qt)}),Fe.current=[],ft.current=Qt,it({})});function Xt(Qt){Fe.current.push(Qt),xt()}return[ft.current,Xt]}var Gt={width:0,height:0,left:0,top:0,right:0};function Ft(Ie,Fe,Ne,Ue,it,ft,xt){var Xt=xt.tabs,Qt=xt.tabPosition,zn=xt.rtl,nr,Rn,on;return["top","bottom"].includes(Qt)?(nr="width",Rn=zn?"right":"left",on=Math.abs(Ne)):(nr="height",Rn="top",on=-Ne),(0,Oe.useMemo)(function(){if(!Xt.length)return[0,0];for(var rn=Xt.length,yn=rn,Mn=0;Mn<rn;Mn+=1){var er=Ie.get(Xt[Mn].key)||Gt;if(er[Rn]+er[nr]>on+Fe){yn=Mn-1;break}}for(var Hn=0,$n=rn-1;$n>=0;$n-=1){var Un=Ie.get(Xt[$n].key)||Gt;if(Un[Rn]<on){Hn=$n+1;break}}return Hn>=yn?[0,0]:[Hn,yn]},[Ie,Fe,Ue,it,ft,on,Qt,Xt.map(function(rn){return rn.key}).join("_"),zn])}function xn(Ie){var Fe;return Ie instanceof Map?(Fe={},Ie.forEach(function(Ne,Ue){Fe[Ue]=Ne})):Fe=Ie,JSON.stringify(Fe)}var gn="TABS_DQ";function _e(Ie){return String(Ie).replace(/"/g,gn)}function ce(Ie,Fe,Ne,Ue){return!(!Ne||Ue||Ie===!1||Ie===void 0&&(Fe===!1||Fe===null))}function se(Ie,Fe){var Ne=Ie.prefixCls,Ue=Ie.editable,it=Ie.locale,ft=Ie.style;return!Ue||Ue.showAdd===!1?null:Oe.createElement("button",{ref:Fe,type:"button",className:"".concat(Ne,"-nav-add"),style:ft,"aria-label":(it==null?void 0:it.addAriaLabel)||"Add tab",onClick:function(Xt){Ue.onEdit("add",{event:Xt})}},Ue.addIcon||"+")}var he=Oe.forwardRef(se),fe=Oe.forwardRef(function(Ie,Fe){var Ne=Ie.position,Ue=Ie.prefixCls,it=Ie.extra;if(!it)return null;var ft,xt={};return(0,Pe.Z)(it)==="object"&&!Oe.isValidElement(it)?xt=it:xt.right=it,Ne==="right"&&(ft=xt.right),Ne==="left"&&(ft=xt.left),ft?Oe.createElement("div",{className:"".concat(Ue,"-extra-content"),ref:Fe},ft):null}),oe=fe,ke=le(62709);function Ge(Ie,Fe,Ne){var Ue=React.useRef({});return(!("value"in Ue.current)||Ne(Ue.current.condition,Fe))&&(Ue.current.value=Ie(),Ue.current.condition=Fe),Ue.current.value}function St(Ie,Fe){typeof Ie=="function"?Ie(Fe):(0,Pe.Z)(Ie)==="object"&&Ie&&"current"in Ie&&(Ie.current=Fe)}function Tt(){for(var Ie=arguments.length,Fe=new Array(Ie),Ne=0;Ne<Ie;Ne++)Fe[Ne]=arguments[Ne];var Ue=Fe.filter(function(it){return it});return Ue.length<=1?Ue[0]:function(it){Fe.forEach(function(ft){St(ft,it)})}}function Ot(){for(var Ie=arguments.length,Fe=new Array(Ie),Ne=0;Ne<Ie;Ne++)Fe[Ne]=arguments[Ne];return useMemo(function(){return Tt.apply(void 0,Fe)},Fe,function(Ue,it){return Ue.length===it.length&&Ue.every(function(ft,xt){return ft===it[xt]})})}function Wt(Ie){var Fe,Ne,Ue=(0,Lt.isMemo)(Ie)?Ie.type.type:Ie.type;return!(typeof Ue=="function"&&!((Fe=Ue.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof Ie=="function"&&!((Ne=Ie.prototype)!==null&&Ne!==void 0&&Ne.render))}var $t={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Fe){var Ne=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||Ne>=$t.F1&&Ne<=$t.F12)return!1;switch(Ne){case $t.ALT:case $t.CAPS_LOCK:case $t.CONTEXT_MENU:case $t.CTRL:case $t.DOWN:case $t.END:case $t.ESC:case $t.HOME:case $t.INSERT:case $t.LEFT:case $t.MAC_FF_META:case $t.META:case $t.NUMLOCK:case $t.NUM_CENTER:case $t.PAGE_DOWN:case $t.PAGE_UP:case $t.PAUSE:case $t.PRINT_SCREEN:case $t.RIGHT:case $t.SHIFT:case $t.UP:case $t.WIN_KEY:case $t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=$t.ZERO&&Fe<=$t.NINE||Fe>=$t.NUM_ZERO&&Fe<=$t.NUM_MULTIPLY||Fe>=$t.A&&Fe<=$t.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case $t.SPACE:case $t.QUESTION_MARK:case $t.NUM_PLUS:case $t.NUM_MINUS:case $t.NUM_PERIOD:case $t.NUM_DIVISION:case $t.SEMICOLON:case $t.DASH:case $t.EQUALS:case $t.COMMA:case $t.PERIOD:case $t.SLASH:case $t.APOSTROPHE:case $t.SINGLE_QUOTE:case $t.OPEN_SQUARE_BRACKET:case $t.BACKSLASH:case $t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Gn=$t,ar=function(Fe){return+setTimeout(Fe,16)},Dt=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ar=function(Fe){return window.requestAnimationFrame(Fe)},Dt=function(Fe){return window.cancelAnimationFrame(Fe)});var tn=0,qn=new Map;function Er(Ie){qn.delete(Ie)}var kn=function(Fe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;tn+=1;var Ue=tn;function it(ft){if(ft===0)Er(Ue),Fe();else{var xt=ar(function(){it(ft-1)});qn.set(Ue,xt)}}return it(Ne),Ue};kn.cancel=function(Ie){var Fe=qn.get(Ie);return Er(Fe),Dt(Fe)};var gr=kn,Di=Gn.ESC,ni=Gn.TAB;function Xr(Ie){var Fe=Ie.visible,Ne=Ie.triggerRef,Ue=Ie.onVisibleChange,it=Ie.autoFocus,ft=Ie.overlayRef,xt=Oe.useRef(!1),Xt=function(){if(Fe){var Rn,on;(Rn=Ne.current)===null||Rn===void 0||(on=Rn.focus)===null||on===void 0||on.call(Rn),Ue==null||Ue(!1)}},Qt=function(){var Rn;return(Rn=ft.current)!==null&&Rn!==void 0&&Rn.focus?(ft.current.focus(),xt.current=!0,!0):!1},zn=function(Rn){switch(Rn.keyCode){case Di:Xt();break;case ni:{var on=!1;xt.current||(on=Qt()),on?Rn.preventDefault():Xt();break}}};Oe.useEffect(function(){return Fe?(window.addEventListener("keydown",zn),it&&gr(Qt,3),function(){window.removeEventListener("keydown",zn),xt.current=!1}):function(){xt.current=!1}},[Fe])}var Vr=(0,Oe.forwardRef)(function(Ie,Fe){var Ne=Ie.overlay,Ue=Ie.arrow,it=Ie.prefixCls,ft=(0,Oe.useMemo)(function(){var Xt;return typeof Ne=="function"?Xt=Ne():Xt=Ne,Xt},[Ne]),xt=Tt(Fe,ft==null?void 0:ft.ref);return Oe.createElement(Oe.Fragment,null,Ue&&Oe.createElement("div",{className:"".concat(it,"-arrow")}),Oe.cloneElement(ft,{ref:Wt(ft)?xt:void 0}))}),Si=Vr,hi={adjustX:1,adjustY:1},Ti=[0,0],Ii={topLeft:{points:["bl","tl"],overflow:hi,offset:[0,-4],targetOffset:Ti},top:{points:["bc","tc"],overflow:hi,offset:[0,-4],targetOffset:Ti},topRight:{points:["br","tr"],overflow:hi,offset:[0,-4],targetOffset:Ti},bottomLeft:{points:["tl","bl"],overflow:hi,offset:[0,4],targetOffset:Ti},bottom:{points:["tc","bc"],overflow:hi,offset:[0,4],targetOffset:Ti},bottomRight:{points:["tr","br"],overflow:hi,offset:[0,4],targetOffset:Ti}},Lr=Ii,Xi=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function la(Ie,Fe){var Ne,Ue=Ie.arrow,it=Ue===void 0?!1:Ue,ft=Ie.prefixCls,xt=ft===void 0?"rc-dropdown":ft,Xt=Ie.transitionName,Qt=Ie.animation,zn=Ie.align,nr=Ie.placement,Rn=nr===void 0?"bottomLeft":nr,on=Ie.placements,rn=on===void 0?Lr:on,yn=Ie.getPopupContainer,Mn=Ie.showAction,er=Ie.hideAction,Hn=Ie.overlayClassName,$n=Ie.overlayStyle,Un=Ie.visible,Wn=Ie.trigger,ir=Wn===void 0?["hover"]:Wn,ze=Ie.autoFocus,Ke=Ie.overlay,kt=Ie.children,yt=Ie.onVisibleChange,qt=(0,at.Z)(Ie,Xi),dn=Oe.useState(),sn=(0,me.Z)(dn,2),Dn=sn[0],Sn=sn[1],Jt="visible"in Ie?Un:Dn,Ln=Oe.useRef(null),Pn=Oe.useRef(null),rr=Oe.useRef(null);Oe.useImperativeHandle(Fe,function(){return Ln.current});var Tn=function(xr){Sn(xr),yt==null||yt(xr)};Xr({visible:Jt,triggerRef:rr,onVisibleChange:Tn,autoFocus:ze,overlayRef:Pn});var pr=function(xr){var Ur=Ie.onOverlayClick;Sn(!1),Ur&&Ur(xr)},Pr=function(){return Oe.createElement(Si,{ref:Pn,overlay:Ke,prefixCls:xt,arrow:it})},br=function(){return typeof Ke=="function"?Pr:Pr()},_r=function(){var xr=Ie.minOverlayWidthMatchTrigger,Ur=Ie.alignPoint;return"minOverlayWidthMatchTrigger"in Ie?xr:!Ur},lr=function(){var xr=Ie.openClassName;return xr!==void 0?xr:"".concat(xt,"-open")},Cr=Oe.cloneElement(kt,{className:ge()((Ne=kt.props)===null||Ne===void 0?void 0:Ne.className,Jt&&lr()),ref:Wt(kt)?Tt(rr,kt.ref):void 0}),Br=er;return!Br&&ir.indexOf("contextMenu")!==-1&&(Br=["click"]),Oe.createElement(ke.Z,(0,Te.Z)({builtinPlacements:rn},qt,{prefixCls:xt,ref:Ln,popupClassName:ge()(Hn,(0,Le.Z)({},"".concat(xt,"-show-arrow"),it)),popupStyle:$n,action:ir,showAction:Mn,hideAction:Br,popupPlacement:Rn,popupAlign:zn,popupTransitionName:Xt,popupAnimation:Qt,popupVisible:Jt,stretch:_r()?"minWidth":"",popup:br(),onPopupVisibleChange:Tn,onPopupClick:pr,getPopupContainer:yn}),Cr)}var va=Oe.forwardRef(la),ya=va,$i=le(78595),Mt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Fe){var Ne=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||Ne>=Mt.F1&&Ne<=Mt.F12)return!1;switch(Ne){case Mt.ALT:case Mt.CAPS_LOCK:case Mt.CONTEXT_MENU:case Mt.CTRL:case Mt.DOWN:case Mt.END:case Mt.ESC:case Mt.HOME:case Mt.INSERT:case Mt.LEFT:case Mt.MAC_FF_META:case Mt.META:case Mt.NUMLOCK:case Mt.NUM_CENTER:case Mt.PAGE_DOWN:case Mt.PAGE_UP:case Mt.PAUSE:case Mt.PRINT_SCREEN:case Mt.RIGHT:case Mt.SHIFT:case Mt.UP:case Mt.WIN_KEY:case Mt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=Mt.ZERO&&Fe<=Mt.NINE||Fe>=Mt.NUM_ZERO&&Fe<=Mt.NUM_MULTIPLY||Fe>=Mt.A&&Fe<=Mt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case Mt.SPACE:case Mt.QUESTION_MARK:case Mt.NUM_PLUS:case Mt.NUM_MINUS:case Mt.NUM_PERIOD:case Mt.NUM_DIVISION:case Mt.SEMICOLON:case Mt.DASH:case Mt.EQUALS:case Mt.COMMA:case Mt.PERIOD:case Mt.SLASH:case Mt.APOSTROPHE:case Mt.SINGLE_QUOTE:case Mt.OPEN_SQUARE_BRACKET:case Mt.BACKSLASH:case Mt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Cn=Mt;function _n(Ie,Fe){var Ne=Ie.prefixCls,Ue=Ie.id,it=Ie.tabs,ft=Ie.locale,xt=Ie.mobile,Xt=Ie.moreIcon,Qt=Xt===void 0?"More":Xt,zn=Ie.moreTransitionName,nr=Ie.style,Rn=Ie.className,on=Ie.editable,rn=Ie.tabBarGutter,yn=Ie.rtl,Mn=Ie.removeAriaLabel,er=Ie.onTabClick,Hn=Ie.getPopupContainer,$n=Ie.popupClassName,Un=(0,Oe.useState)(!1),Wn=(0,me.Z)(Un,2),ir=Wn[0],ze=Wn[1],Ke=(0,Oe.useState)(null),kt=(0,me.Z)(Ke,2),yt=kt[0],qt=kt[1],dn="".concat(Ue,"-more-popup"),sn="".concat(Ne,"-dropdown"),Dn=yt!==null?"".concat(dn,"-").concat(yt):null,Sn=ft==null?void 0:ft.dropdownAriaLabel;function Jt(br,_r){br.preventDefault(),br.stopPropagation(),on.onEdit("remove",{key:_r,event:br})}var Ln=Oe.createElement($i.ZP,{onClick:function(_r){var lr=_r.key,Cr=_r.domEvent;er(lr,Cr),ze(!1)},prefixCls:"".concat(sn,"-menu"),id:dn,tabIndex:-1,role:"listbox","aria-activedescendant":Dn,selectedKeys:[yt],"aria-label":Sn!==void 0?Sn:"expanded dropdown"},it.map(function(br){var _r=br.closable,lr=br.disabled,Cr=br.closeIcon,Br=br.key,Kr=br.label,xr=ce(_r,Cr,on,lr);return Oe.createElement($i.sN,{key:Br,id:"".concat(dn,"-").concat(Br),role:"option","aria-controls":Ue&&"".concat(Ue,"-panel-").concat(Br),disabled:lr},Oe.createElement("span",null,Kr),xr&&Oe.createElement("button",{type:"button","aria-label":Mn||"remove",tabIndex:0,className:"".concat(sn,"-menu-item-remove"),onClick:function(di){di.stopPropagation(),Jt(di,Br)}},Cr||on.removeIcon||"\xD7"))}));function Pn(br){for(var _r=it.filter(function(xr){return!xr.disabled}),lr=_r.findIndex(function(xr){return xr.key===yt})||0,Cr=_r.length,Br=0;Br<Cr;Br+=1){lr=(lr+br+Cr)%Cr;var Kr=_r[lr];if(!Kr.disabled){qt(Kr.key);return}}}function rr(br){var _r=br.which;if(!ir){[Cn.DOWN,Cn.SPACE,Cn.ENTER].includes(_r)&&(ze(!0),br.preventDefault());return}switch(_r){case Cn.UP:Pn(-1),br.preventDefault();break;case Cn.DOWN:Pn(1),br.preventDefault();break;case Cn.ESC:ze(!1);break;case Cn.SPACE:case Cn.ENTER:yt!==null&&er(yt,br);break}}(0,Oe.useEffect)(function(){var br=document.getElementById(Dn);br&&br.scrollIntoView&&br.scrollIntoView(!1)},[yt]),(0,Oe.useEffect)(function(){ir||qt(null)},[ir]);var Tn=(0,Le.Z)({},yn?"marginRight":"marginLeft",rn);it.length||(Tn.visibility="hidden",Tn.order=1);var pr=ge()((0,Le.Z)({},"".concat(sn,"-rtl"),yn)),Pr=xt?null:Oe.createElement(ya,{prefixCls:sn,overlay:Ln,trigger:["hover"],visible:it.length?ir:!1,transitionName:zn,onVisibleChange:ze,overlayClassName:ge()(pr,$n),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Hn},Oe.createElement("button",{type:"button",className:"".concat(Ne,"-nav-more"),style:Tn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":dn,id:"".concat(Ue,"-more"),"aria-expanded":ir,onKeyDown:rr},Qt));return Oe.createElement("div",{className:ge()("".concat(Ne,"-nav-operations"),Rn),style:nr,ref:Fe},Pr,Oe.createElement(he,{prefixCls:Ne,locale:ft,editable:on}))}var In=Oe.memo(Oe.forwardRef(_n),function(Ie,Fe){return Fe.tabMoving});function mr(Ie){var Fe,Ne=Ie.prefixCls,Ue=Ie.id,it=Ie.active,ft=Ie.tab,xt=ft.key,Xt=ft.label,Qt=ft.disabled,zn=ft.closeIcon,nr=Ie.closable,Rn=Ie.renderWrapper,on=Ie.removeAriaLabel,rn=Ie.editable,yn=Ie.onClick,Mn=Ie.onFocus,er=Ie.style,Hn="".concat(Ne,"-tab"),$n=ce(nr,zn,rn,Qt);function Un(ze){Qt||yn(ze)}function Wn(ze){ze.preventDefault(),ze.stopPropagation(),rn.onEdit("remove",{key:xt,event:ze})}var ir=Oe.createElement("div",{key:xt,"data-node-key":_e(xt),className:ge()(Hn,(Fe={},(0,Le.Z)(Fe,"".concat(Hn,"-with-remove"),$n),(0,Le.Z)(Fe,"".concat(Hn,"-active"),it),(0,Le.Z)(Fe,"".concat(Hn,"-disabled"),Qt),Fe)),style:er,onClick:Un},Oe.createElement("div",{role:"tab","aria-selected":it,id:Ue&&"".concat(Ue,"-tab-").concat(xt),className:"".concat(Hn,"-btn"),"aria-controls":Ue&&"".concat(Ue,"-panel-").concat(xt),"aria-disabled":Qt,tabIndex:Qt?null:0,onClick:function(Ke){Ke.stopPropagation(),Un(Ke)},onKeyDown:function(Ke){[Cn.SPACE,Cn.ENTER].includes(Ke.which)&&(Ke.preventDefault(),Un(Ke))},onFocus:Mn},Xt),$n&&Oe.createElement("button",{type:"button","aria-label":on||"remove",tabIndex:0,className:"".concat(Hn,"-remove"),onClick:function(Ke){Ke.stopPropagation(),Wn(Ke)}},zn||rn.removeIcon||"\xD7"));return Rn?Rn(ir):ir}var Xn=mr,sr=function(Fe){return+setTimeout(Fe,16)},On=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(sr=function(Fe){return window.requestAnimationFrame(Fe)},On=function(Fe){return window.cancelAnimationFrame(Fe)});var qe=0,st=new Map;function _t(Ie){st.delete(Ie)}var Nt=function(Fe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;qe+=1;var Ue=qe;function it(ft){if(ft===0)_t(Ue),Fe();else{var xt=sr(function(){it(ft-1)});st.set(Ue,xt)}}return it(Ne),Ue};Nt.cancel=function(Ie){var Fe=st.get(Ie);return _t(Fe),On(Fe)};var He=Nt,gt=function(Fe){var Ne=Fe.activeTabOffset,Ue=Fe.horizontal,it=Fe.rtl,ft=Fe.indicatorSize,xt=(0,Oe.useState)(),Xt=(0,me.Z)(xt,2),Qt=Xt[0],zn=Xt[1],nr=(0,Oe.useRef)(),Rn=function(yn){return typeof ft=="function"?ft(yn):typeof ft=="number"?ft:yn};function on(){He.cancel(nr.current)}return(0,Oe.useEffect)(function(){var rn={};return Ne&&(Ue?(it?(rn.right=Ne.right+Ne.width/2,rn.transform="translateX(50%)"):(rn.left=Ne.left+Ne.width/2,rn.transform="translateX(-50%)"),rn.width=Rn(Ne.width)):(rn.top=Ne.top+Ne.height/2,rn.transform="translateY(-50%)",rn.height=Rn(Ne.height))),on(),nr.current=He(function(){zn(rn)}),on},[Ne,Ue,it,ft]),{style:Qt}},Rt=gt,It=function(Fe){var Ne=Fe.current||{},Ue=Ne.offsetWidth,it=Ue===void 0?0:Ue,ft=Ne.offsetHeight,xt=ft===void 0?0:ft;return[it,xt]},Zt=function(Fe,Ne){return Fe[Ne?0:1]};function Ut(Ie,Fe){var Ne,Ue=Oe.useContext(We),it=Ue.prefixCls,ft=Ue.tabs,xt=Ie.className,Xt=Ie.style,Qt=Ie.id,zn=Ie.animated,nr=Ie.activeKey,Rn=Ie.rtl,on=Ie.extra,rn=Ie.editable,yn=Ie.locale,Mn=Ie.tabPosition,er=Ie.tabBarGutter,Hn=Ie.children,$n=Ie.onTabClick,Un=Ie.onTabScroll,Wn=Ie.indicatorSize,ir=(0,Oe.useRef)(),ze=(0,Oe.useRef)(),Ke=(0,Oe.useRef)(),kt=(0,Oe.useRef)(),yt=(0,Oe.useRef)(),qt=(0,Oe.useRef)(),dn=(0,Oe.useRef)(),sn=Mn==="top"||Mn==="bottom",Dn=Pt(0,function(Ki,fi){sn&&Un&&Un({direction:Ki>fi?"left":"right"})}),Sn=(0,me.Z)(Dn,2),Jt=Sn[0],Ln=Sn[1],Pn=Pt(0,function(Ki,fi){!sn&&Un&&Un({direction:Ki>fi?"top":"bottom"})}),rr=(0,me.Z)(Pn,2),Tn=rr[0],pr=rr[1],Pr=(0,Oe.useState)([0,0]),br=(0,me.Z)(Pr,2),_r=br[0],lr=br[1],Cr=(0,Oe.useState)([0,0]),Br=(0,me.Z)(Cr,2),Kr=Br[0],xr=Br[1],Ur=(0,Oe.useState)([0,0]),di=(0,me.Z)(Ur,2),zi=di[0],Li=di[1],mi=(0,Oe.useState)([0,0]),Oi=(0,me.Z)(mi,2),Ri=Oi[0],Yr=Oi[1],gi=fn(new Map),Or=(0,me.Z)(gi,2),jr=Or[0],oi=Or[1],Ai=Ae(ft,jr,Kr[0]),Na=Zt(_r,sn),$a=Zt(Kr,sn),La=Zt(zi,sn),Ji=Zt(Ri,sn),Bi=Na<$a+La,ti=Bi?Na-Ji:Na-La,Oa="".concat(it,"-nav-operations-hidden"),ri=0,Nr=0;sn&&Rn?(ri=0,Nr=Math.max(0,$a-ti)):(ri=Math.min(0,ti-$a),Nr=0);function yi(Ki){return Ki<ri?ri:Ki>Nr?Nr:Ki}var Qi=(0,Oe.useRef)(),Ei=(0,Oe.useState)(),Ui=(0,me.Z)(Ei,2),Gr=Ui[0],aa=Ui[1];function pa(){aa(Date.now())}function ra(){window.clearTimeout(Qi.current)}Ht(kt,function(Ki,fi){function Aa(Ma,uo){Ma(function(ao){var hs=yi(ao+uo);return hs})}return Bi?(sn?Aa(Ln,Ki):Aa(pr,fi),ra(),pa(),!0):!1}),(0,Oe.useEffect)(function(){return ra(),Gr&&(Qi.current=window.setTimeout(function(){aa(0)},100)),ra},[Gr]);var ma=Ft(Ai,ti,sn?Jt:Tn,$a,La,Ji,(0,Se.Z)((0,Se.Z)({},Ie),{},{tabs:ft})),Sa=(0,me.Z)(ma,2),Za=Sa[0],ia=Sa[1],Ca=nt(function(){var Ki=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nr,fi=Ai.get(Ki)||{width:0,height:0,left:0,right:0,top:0};if(sn){var Aa=Jt;Rn?fi.right<Jt?Aa=fi.right:fi.right+fi.width>Jt+ti&&(Aa=fi.right+fi.width-ti):fi.left<-Jt?Aa=-fi.left:fi.left+fi.width>-Jt+ti&&(Aa=-(fi.left+fi.width-ti)),pr(0),Ln(yi(Aa))}else{var Ma=Tn;fi.top<-Tn?Ma=-fi.top:fi.top+fi.height>-Tn+ti&&(Ma=-(fi.top+fi.height-ti)),Ln(0),pr(yi(Ma))}}),Ja={};Mn==="top"||Mn==="bottom"?Ja[Rn?"marginRight":"marginLeft"]=er:Ja.marginTop=er;var Ga=ft.map(function(Ki,fi){var Aa=Ki.key;return Oe.createElement(Xn,{id:Qt,prefixCls:it,key:Aa,tab:Ki,style:fi===0?void 0:Ja,closable:Ki.closable,editable:rn,active:Aa===nr,renderWrapper:Hn,removeAriaLabel:yn==null?void 0:yn.removeAriaLabel,onClick:function(uo){$n(Aa,uo)},onFocus:function(){Ca(Aa),pa(),kt.current&&(Rn||(kt.current.scrollLeft=0),kt.current.scrollTop=0)}})}),so=function(){return oi(function(){var fi=new Map;return ft.forEach(function(Aa){var Ma,uo=Aa.key,ao=(Ma=yt.current)===null||Ma===void 0?void 0:Ma.querySelector('[data-node-key="'.concat(_e(uo),'"]'));ao&&fi.set(uo,{width:ao.offsetWidth,height:ao.offsetHeight,left:ao.offsetLeft,top:ao.offsetTop})}),fi})};(0,Oe.useEffect)(function(){so()},[ft.map(function(Ki){return Ki.key}).join("_")]);var Fa=En(function(){var Ki=It(ir),fi=It(ze),Aa=It(Ke);lr([Ki[0]-fi[0]-Aa[0],Ki[1]-fi[1]-Aa[1]]);var Ma=It(dn);Li(Ma);var uo=It(qt);Yr(uo);var ao=It(yt);xr([ao[0]-Ma[0],ao[1]-Ma[1]]),so()}),ba=ft.slice(0,Za),ii=ft.slice(ia+1),bi=[].concat((0,Qe.Z)(ba),(0,Qe.Z)(ii)),ea=Ai.get(nr),ga=Rt({activeTabOffset:ea,horizontal:sn,rtl:Rn,indicatorSize:Wn}),Ka=ga.style;(0,Oe.useEffect)(function(){Ca()},[nr,ri,Nr,xn(ea),xn(Ai),sn]),(0,Oe.useEffect)(function(){Fa()},[Rn]);var io=!!bi.length,ho="".concat(it,"-nav-wrap"),Oo,Ro,lo,Ao;return sn?Rn?(Ro=Jt>0,Oo=Jt!==Nr):(Oo=Jt<0,Ro=Jt!==ri):(lo=Tn<0,Ao=Tn!==ri),Oe.createElement(Bt.Z,{onResize:Fa},Oe.createElement("div",{ref:vn(Fe,ir),role:"tablist",className:ge()("".concat(it,"-nav"),xt),style:Xt,onKeyDown:function(){pa()}},Oe.createElement(oe,{ref:ze,position:"left",extra:on,prefixCls:it}),Oe.createElement(Bt.Z,{onResize:Fa},Oe.createElement("div",{className:ge()(ho,(Ne={},(0,Le.Z)(Ne,"".concat(ho,"-ping-left"),Oo),(0,Le.Z)(Ne,"".concat(ho,"-ping-right"),Ro),(0,Le.Z)(Ne,"".concat(ho,"-ping-top"),lo),(0,Le.Z)(Ne,"".concat(ho,"-ping-bottom"),Ao),Ne)),ref:kt},Oe.createElement(Bt.Z,{onResize:Fa},Oe.createElement("div",{ref:yt,className:"".concat(it,"-nav-list"),style:{transform:"translate(".concat(Jt,"px, ").concat(Tn,"px)"),transition:Gr?"none":void 0}},Ga,Oe.createElement(he,{ref:dn,prefixCls:it,locale:yn,editable:rn,style:(0,Se.Z)((0,Se.Z)({},Ga.length===0?void 0:Ja),{},{visibility:io?"hidden":null})}),Oe.createElement("div",{className:ge()("".concat(it,"-ink-bar"),(0,Le.Z)({},"".concat(it,"-ink-bar-animated"),zn.inkBar)),style:Ka}))))),Oe.createElement(In,(0,Te.Z)({},Ie,{removeAriaLabel:yn==null?void 0:yn.removeAriaLabel,ref:qt,prefixCls:it,tabs:bi,className:!io&&Oa,tabMoving:!!Gr})),Oe.createElement(oe,{ref:Ke,position:"right",extra:on,prefixCls:it})))}var Nn=Oe.forwardRef(Ut),hr=["renderTabBar"],Vn=["label","key"];function jn(Ie){var Fe=Ie.renderTabBar,Ne=(0,at.Z)(Ie,hr),Ue=Oe.useContext(We),it=Ue.tabs;if(Fe){var ft=(0,Se.Z)((0,Se.Z)({},Ne),{},{panes:it.map(function(xt){var Xt=xt.label,Qt=xt.key,zn=(0,at.Z)(xt,Vn);return Oe.createElement(Et,(0,Te.Z)({tab:Xt,key:Qt,tabKey:Qt},zn))})});return Fe(ft,Nn)}return Oe.createElement(Nn,Ne)}var Qn={},tr=[],Ar=function(Fe){tr.push(Fe)};function cn(Ie,Fe){if(0)var Ne}function Kn(Ie,Fe){if(0)var Ne}function pi(){Qn={}}function xi(Ie,Fe,Ne){!Fe&&!Qn[Ne]&&(Ie(!1,Ne),Qn[Ne]=!0)}function Zr(Ie,Fe){xi(cn,Ie,Fe)}function Rr(Ie,Fe){xi(Kn,Ie,Fe)}Zr.preMessage=Ar,Zr.resetWarned=pi,Zr.noteOnce=Rr;var _i=null;function cr(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Fe;return Ie===!1?Fe={inkBar:!1,tabPane:!1}:Ie===!0?Fe={inkBar:!0,tabPane:!1}:Fe=(0,Se.Z)({inkBar:!0},(0,Pe.Z)(Ie)==="object"?Ie:{}),Fe.tabPaneMotion&&Fe.tabPane===void 0&&(Fe.tabPane=!0),!Fe.tabPaneMotion&&Fe.tabPane&&(Fe.tabPane=!1),Fe}var ui=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],wn=0;function Yi(Ie,Fe){var Ne,Ue=Ie.id,it=Ie.prefixCls,ft=it===void 0?"rc-tabs":it,xt=Ie.className,Xt=Ie.items,Qt=Ie.direction,zn=Ie.activeKey,nr=Ie.defaultActiveKey,Rn=Ie.editable,on=Ie.animated,rn=Ie.tabPosition,yn=rn===void 0?"top":rn,Mn=Ie.tabBarGutter,er=Ie.tabBarStyle,Hn=Ie.tabBarExtraContent,$n=Ie.locale,Un=Ie.moreIcon,Wn=Ie.moreTransitionName,ir=Ie.destroyInactiveTabPane,ze=Ie.renderTabBar,Ke=Ie.onChange,kt=Ie.onTabClick,yt=Ie.onTabScroll,qt=Ie.getPopupContainer,dn=Ie.popupClassName,sn=Ie.indicatorSize,Dn=(0,at.Z)(Ie,ui),Sn=Oe.useMemo(function(){return(Xt||[]).filter(function(Yr){return Yr&&(0,Pe.Z)(Yr)==="object"&&"key"in Yr})},[Xt]),Jt=Qt==="rtl",Ln=cr(on),Pn=(0,Oe.useState)(!1),rr=(0,me.Z)(Pn,2),Tn=rr[0],pr=rr[1];(0,Oe.useEffect)(function(){pr(ht())},[]);var Pr=Me(function(){var Yr;return(Yr=Sn[0])===null||Yr===void 0?void 0:Yr.key},{value:zn,defaultValue:nr}),br=(0,me.Z)(Pr,2),_r=br[0],lr=br[1],Cr=(0,Oe.useState)(function(){return Sn.findIndex(function(Yr){return Yr.key===_r})}),Br=(0,me.Z)(Cr,2),Kr=Br[0],xr=Br[1];(0,Oe.useEffect)(function(){var Yr=Sn.findIndex(function(Or){return Or.key===_r});if(Yr===-1){var gi;Yr=Math.max(0,Math.min(Kr,Sn.length-1)),lr((gi=Sn[Yr])===null||gi===void 0?void 0:gi.key)}xr(Yr)},[Sn.map(function(Yr){return Yr.key}).join("_"),_r,Kr]);var Ur=Me(null,{value:Ue}),di=(0,me.Z)(Ur,2),zi=di[0],Li=di[1];(0,Oe.useEffect)(function(){Ue||(Li("rc-tabs-".concat(wn)),wn+=1)},[]);function mi(Yr,gi){kt==null||kt(Yr,gi);var Or=Yr!==_r;lr(Yr),Or&&(Ke==null||Ke(Yr))}var Oi={id:zi,activeKey:_r,animated:Ln,tabPosition:yn,rtl:Jt,mobile:Tn},Ri=(0,Se.Z)((0,Se.Z)({},Oi),{},{editable:Rn,locale:$n,moreIcon:Un,moreTransitionName:Wn,tabBarGutter:Mn,onTabClick:mi,onTabScroll:yt,extra:Hn,style:er,panes:null,getPopupContainer:qt,popupClassName:dn,indicatorSize:sn});return Oe.createElement(We.Provider,{value:{tabs:Sn,prefixCls:ft}},Oe.createElement("div",(0,Te.Z)({ref:Fe,id:Ue,className:ge()(ft,"".concat(ft,"-").concat(yn),(Ne={},(0,Le.Z)(Ne,"".concat(ft,"-mobile"),Tn),(0,Le.Z)(Ne,"".concat(ft,"-editable"),Rn),(0,Le.Z)(Ne,"".concat(ft,"-rtl"),Jt),Ne),xt)},Dn),Oe.createElement(jn,(0,Te.Z)({},Ri,{renderTabBar:ze})),Oe.createElement(At,(0,Te.Z)({destroyInactiveTabPane:ir},Oi,{animated:Ln}))))}var ki=Oe.forwardRef(Yi),wa=ki,qi=wa,Pi=le(53124),fa=le(98675),Ci=()=>null,ta=le(33603);const _a={motionAppear:!1,motionEnter:!0,motionLeave:!0};function na(Ie){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Ne;return Fe===!1?Ne={inkBar:!1,tabPane:!1}:Fe===!0?Ne={inkBar:!0,tabPane:!0}:Ne=Object.assign({inkBar:!0},typeof Fe=="object"?Fe:{}),Ne.tabPane&&(Ne.tabPaneMotion=Object.assign(Object.assign({},_a),{motionName:(0,ta.m)(Ie,"switch")})),Ne}var Ni=le(37419),ka=function(Ie,Fe){var Ne={};for(var Ue in Ie)Object.prototype.hasOwnProperty.call(Ie,Ue)&&Fe.indexOf(Ue)<0&&(Ne[Ue]=Ie[Ue]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ue=Object.getOwnPropertySymbols(Ie);it<Ue.length;it++)Fe.indexOf(Ue[it])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ue[it])&&(Ne[Ue[it]]=Ie[Ue[it]]);return Ne};function Pa(Ie){return Ie.filter(Fe=>Fe)}function ha(Ie,Fe){if(Ie)return Ie;const Ne=(0,Ni.Z)(Fe).map(Ue=>{if(Oe.isValidElement(Ue)){const{key:it,props:ft}=Ue,xt=ft||{},{tab:Xt}=xt,Qt=ka(xt,["tab"]);return Object.assign(Object.assign({key:String(it)},Qt),{label:Xt})}return null});return Pa(Ne)}var ai=le(14747),bt=le(67968),mt=le(45503),zt=le(67771),An=Ie=>{const{componentCls:Fe,motionDurationSlow:Ne}=Ie;return[{[Fe]:{[`${Fe}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Ne}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Ne}`}}}}},[(0,zt.oN)(Ie,"slide-up"),(0,zt.oN)(Ie,"slide-down")]]};const Sr=Ie=>{const{componentCls:Fe,tabsCardPadding:Ne,cardBg:Ue,cardGutter:it,colorBorderSecondary:ft,itemSelectedColor:xt}=Ie;return{[`${Fe}-card`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{margin:0,padding:Ne,background:Ue,border:`${Ie.lineWidth}px ${Ie.lineType} ${ft}`,transition:`all ${Ie.motionDurationSlow} ${Ie.motionEaseInOut}`},[`${Fe}-tab-active`]:{color:xt,background:Ie.colorBgContainer},[`${Fe}-ink-bar`]:{visibility:"hidden"}},[`&${Fe}-top, &${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginLeft:{_skip_check_:!0,value:`${it}px`}}}},[`&${Fe}-top`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px 0 0`},[`${Fe}-tab-active`]:{borderBottomColor:Ie.colorBgContainer}}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`0 0 ${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px`},[`${Fe}-tab-active`]:{borderTopColor:Ie.colorBgContainer}}},[`&${Fe}-left, &${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginTop:`${it}px`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Ie.borderRadiusLG}px 0 0 ${Ie.borderRadiusLG}px`}},[`${Fe}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:Ie.colorBgContainer}}}},[`&${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px 0`}},[`${Fe}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:Ie.colorBgContainer}}}}}}},wr=Ie=>{const{componentCls:Fe,itemHoverColor:Ne,dropdownEdgeChildVerticalPadding:Ue}=Ie;return{[`${Fe}-dropdown`]:Object.assign(Object.assign({},(0,ai.Wf)(Ie)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Ie.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Fe}-dropdown-menu`]:{maxHeight:Ie.tabsDropdownHeight,margin:0,padding:`${Ue}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:Ie.colorBgContainer,backgroundClip:"padding-box",borderRadius:Ie.borderRadiusLG,outline:"none",boxShadow:Ie.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ai.vS),{display:"flex",alignItems:"center",minWidth:Ie.tabsDropdownWidth,margin:0,padding:`${Ie.paddingXXS}px ${Ie.paddingSM}px`,color:Ie.colorText,fontWeight:"normal",fontSize:Ie.fontSize,lineHeight:Ie.lineHeight,cursor:"pointer",transition:`all ${Ie.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:Ie.marginSM},color:Ie.colorTextDescription,fontSize:Ie.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Ne}},"&:hover":{background:Ie.controlItemBgHover},"&-disabled":{"&, &:hover":{color:Ie.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Tr=Ie=>{const{componentCls:Fe,margin:Ne,colorBorderSecondary:Ue,horizontalMargin:it,verticalItemPadding:ft,verticalItemMargin:xt}=Ie;return{[`${Fe}-top, ${Fe}-bottom`]:{flexDirection:"column",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{margin:it,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Ie.lineWidth}px ${Ie.lineType} ${Ue}`,content:"''"},[`${Fe}-ink-bar`]:{height:Ie.lineWidthBold,"&-animated":{transition:`width ${Ie.motionDurationSlow}, left ${Ie.motionDurationSlow},
|
|
|
right ${Ie.motionDurationSlow}`}},[`${Fe}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:Ie.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:Ie.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:Ie.boxShadowTabsOverflowRight},[`&${Fe}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Fe}-top`]:{[`> ${Fe}-nav,
|
|
|
> div > ${Fe}-nav`]:{"&::before":{bottom:0},[`${Fe}-ink-bar`]:{bottom:0}}},[`${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,marginTop:`${Ne}px`,marginBottom:0,"&::before":{top:0},[`${Fe}-ink-bar`]:{top:0}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0}},[`${Fe}-left, ${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{flexDirection:"column",minWidth:Ie.controlHeight*1.25,[`${Fe}-tab`]:{padding:ft,textAlign:"center"},[`${Fe}-tab + ${Fe}-tab`]:{margin:xt},[`${Fe}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:Ie.controlHeight},"&::before":{top:0,boxShadow:Ie.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:Ie.boxShadowTabsOverflowBottom},[`&${Fe}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Fe}-ink-bar`]:{width:Ie.lineWidthBold,"&-animated":{transition:`height ${Ie.motionDurationSlow}, top ${Ie.motionDurationSlow}`}},[`${Fe}-nav-list, ${Fe}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${Ie.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:Ie.paddingLG}}}},[`${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,[`${Fe}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-Ie.lineWidth},borderRight:{_skip_check_:!0,value:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingRight:{_skip_check_:!0,value:Ie.paddingLG}}}}}},$r=Ie=>{const{componentCls:Fe,cardPaddingSM:Ne,cardPaddingLG:Ue,horizontalItemPaddingSM:it,horizontalItemPaddingLG:ft}=Ie;return{[Fe]:{"&-small":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:it,fontSize:Ie.titleFontSizeSM}}},"&-large":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:ft,fontSize:Ie.titleFontSizeLG}}}},[`${Fe}-card`]:{[`&${Fe}-small`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:Ne}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`0 0 ${Ie.borderRadius}px ${Ie.borderRadius}px`}},[`&${Fe}-top`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`${Ie.borderRadius}px ${Ie.borderRadius}px 0 0`}},[`&${Fe}-right`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Ie.borderRadius}px ${Ie.borderRadius}px 0`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Ie.borderRadius}px 0 0 ${Ie.borderRadius}px`}}}},[`&${Fe}-large`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:Ue}}}}}},Dr=Ie=>{const{componentCls:Fe,itemActiveColor:Ne,itemHoverColor:Ue,iconCls:it,tabsHorizontalItemMargin:ft,horizontalItemPadding:xt,itemSelectedColor:Xt,itemColor:Qt}=Ie,zn=`${Fe}-tab`;return{[zn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:xt,fontSize:Ie.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Qt,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Ne}},(0,ai.Qy)(Ie)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-Ie.marginXXS},marginLeft:{_skip_check_:!0,value:Ie.marginXS},color:Ie.colorTextDescription,fontSize:Ie.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${Ie.motionDurationSlow}`,"&:hover":{color:Ie.colorTextHeading}},"&:hover":{color:Ue},[`&${zn}-active ${zn}-btn`]:{color:Xt,textShadow:Ie.tabsActiveTextShadow},[`&${zn}-disabled`]:{color:Ie.colorTextDisabled,cursor:"not-allowed"},[`&${zn}-disabled ${zn}-btn, &${zn}-disabled ${Fe}-remove`]:{"&:focus, &:active":{color:Ie.colorTextDisabled}},[`& ${zn}-remove ${it}`]:{margin:0},[it]:{marginRight:{_skip_check_:!0,value:Ie.marginSM}}},[`${zn} + ${zn}`]:{margin:{_skip_check_:!0,value:ft}}}},ei=Ie=>{const{componentCls:Fe,tabsHorizontalItemMarginRTL:Ne,iconCls:Ue,cardGutter:it}=Ie;return{[`${Fe}-rtl`]:{direction:"rtl",[`${Fe}-nav`]:{[`${Fe}-tab`]:{margin:{_skip_check_:!0,value:Ne},[`${Fe}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Ue]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${Ie.marginSM}px`}},[`${Fe}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${Ie.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${Ie.marginXXS}px`},[Ue]:{margin:0}}}},[`&${Fe}-left`]:{[`> ${Fe}-nav`]:{order:1},[`> ${Fe}-content-holder`]:{order:0}},[`&${Fe}-right`]:{[`> ${Fe}-nav`]:{order:0},[`> ${Fe}-content-holder`]:{order:1}},[`&${Fe}-card${Fe}-top, &${Fe}-card${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginRight:{_skip_check_:!0,value:it},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Fe}-dropdown-rtl`]:{direction:"rtl"},[`${Fe}-menu-item`]:{[`${Fe}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},ci=Ie=>{const{componentCls:Fe,tabsCardPadding:Ne,cardHeight:Ue,cardGutter:it,itemHoverColor:ft,itemActiveColor:xt,colorBorderSecondary:Xt}=Ie;return{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ai.Wf)(Ie)),{display:"flex",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Fe}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${Ie.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Fe}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${Ie.motionDurationSlow}`},[`${Fe}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Fe}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Fe}-nav-more`]:{position:"relative",padding:Ne,background:"transparent",border:0,color:Ie.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:Ie.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Fe}-nav-add`]:Object.assign({minWidth:Ue,marginLeft:{_skip_check_:!0,value:it},padding:`0 ${Ie.paddingXS}px`,background:"transparent",border:`${Ie.lineWidth}px ${Ie.lineType} ${Xt}`,borderRadius:`${Ie.borderRadiusLG}px ${Ie.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:Ie.colorText,transition:`all ${Ie.motionDurationSlow} ${Ie.motionEaseInOut}`,"&:hover":{color:ft},"&:active, &:focus:not(:focus-visible)":{color:xt}},(0,ai.Qy)(Ie))},[`${Fe}-extra-content`]:{flex:"none"},[`${Fe}-ink-bar`]:{position:"absolute",background:Ie.inkBarColor,pointerEvents:"none"}}),Dr(Ie)),{[`${Fe}-content`]:{position:"relative",width:"100%"},[`${Fe}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Fe}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Fe}-centered`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-nav-wrap`]:{[`&:not([class*='${Fe}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Mi=(0,bt.Z)("Tabs",Ie=>{const Fe=(0,mt.TS)(Ie,{tabsCardPadding:Ie.cardPadding||`${(Ie.cardHeight-Math.round(Ie.fontSize*Ie.lineHeight))/2-Ie.lineWidth}px ${Ie.padding}px`,dropdownEdgeChildVerticalPadding:Ie.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Ie.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${Ie.horizontalItemGutter}px`});return[$r(Fe),ei(Fe),Tr(Fe),wr(Fe),Sr(Fe),ci(Fe),An(Fe)]},Ie=>{const Fe=Ie.controlHeightLG;return{zIndexPopup:Ie.zIndexPopupBase+50,cardBg:Ie.colorFillAlter,cardHeight:Fe,cardPadding:"",cardPaddingSM:`${Ie.paddingXXS*1.5}px ${Ie.padding}px`,cardPaddingLG:`${Ie.paddingXS}px ${Ie.padding}px ${Ie.paddingXXS*1.5}px`,titleFontSize:Ie.fontSize,titleFontSizeLG:Ie.fontSizeLG,titleFontSizeSM:Ie.fontSize,inkBarColor:Ie.colorPrimary,horizontalMargin:`0 0 ${Ie.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${Ie.paddingSM}px 0`,horizontalItemPaddingSM:`${Ie.paddingXS}px 0`,horizontalItemPaddingLG:`${Ie.padding}px 0`,verticalItemPadding:`${Ie.paddingXS}px ${Ie.paddingLG}px`,verticalItemMargin:`${Ie.margin}px 0 0 0`,itemColor:Ie.colorText,itemSelectedColor:Ie.colorPrimary,itemHoverColor:Ie.colorPrimaryHover,itemActiveColor:Ie.colorPrimaryActive,cardGutter:Ie.marginXXS/2}}),Gi=function(Ie,Fe){var Ne={};for(var Ue in Ie)Object.prototype.hasOwnProperty.call(Ie,Ue)&&Fe.indexOf(Ue)<0&&(Ne[Ue]=Ie[Ue]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ue=Object.getOwnPropertySymbols(Ie);it<Ue.length;it++)Fe.indexOf(Ue[it])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ue[it])&&(Ne[Ue[it]]=Ie[Ue[it]]);return Ne};const Wi=Ie=>{const{type:Fe,className:Ne,rootClassName:Ue,size:it,onEdit:ft,hideAdd:xt,centered:Xt,addIcon:Qt,popupClassName:zn,children:nr,items:Rn,animated:on,style:rn,indicatorSize:yn}=Ie,Mn=Gi(Ie,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:er,moreIcon:Hn=Oe.createElement(Ve.Z,null)}=Mn,{direction:$n,tabs:Un,getPrefixCls:Wn,getPopupContainer:ir}=Oe.useContext(Pi.E_),ze=Wn("tabs",er),[Ke,kt]=Mi(ze);let yt;Fe==="editable-card"&&(yt={onEdit:(Jt,Ln)=>{let{key:Pn,event:rr}=Ln;ft==null||ft(Jt==="add"?rr:Pn,Jt)},removeIcon:Oe.createElement(be.Z,null),addIcon:Qt||Oe.createElement($e.Z,null),showAdd:xt!==!0});const qt=Wn(),dn=ha(Rn,nr),sn=na(ze,on),Dn=(0,fa.Z)(it),Sn=Object.assign(Object.assign({},Un==null?void 0:Un.style),rn);return Ke(Oe.createElement(qi,Object.assign({direction:$n,getPopupContainer:ir,moreTransitionName:`${qt}-slide-up`},Mn,{items:dn,className:ge()({[`${ze}-${Dn}`]:Dn,[`${ze}-card`]:["card","editable-card"].includes(Fe),[`${ze}-editable-card`]:Fe==="editable-card",[`${ze}-centered`]:Xt},Un==null?void 0:Un.className,Ne,Ue,kt),popupClassName:ge()(zn,kt),style:Sn,editable:yt,moreIcon:Hn,prefixCls:ze,animated:sn,indicatorSize:yn!=null?yn:Un==null?void 0:Un.indicatorSize})))};Wi.TabPane=Ci;var Fi=Wi},72665:function(mn,Vt){"use strict";var le;var be=typeof Symbol=="function"&&Symbol.for,Ve=be?Symbol.for("react.element"):60103,$e=be?Symbol.for("react.portal"):60106,et=be?Symbol.for("react.fragment"):60107,ge=be?Symbol.for("react.strict_mode"):60108,Te=be?Symbol.for("react.profiler"):60114,Le=be?Symbol.for("react.provider"):60109,Se=be?Symbol.for("react.context"):60110,me=be?Symbol.for("react.async_mode"):60111,Pe=be?Symbol.for("react.concurrent_mode"):60111,at=be?Symbol.for("react.forward_ref"):60112,Oe=be?Symbol.for("react.suspense"):60113,ht=be?Symbol.for("react.suspense_list"):60120,nt=be?Symbol.for("react.memo"):60115,rt=be?Symbol.for("react.lazy"):60116,Je=be?Symbol.for("react.block"):60121,Ee=be?Symbol.for("react.fundamental"):60117,pt=be?Symbol.for("react.responder"):60118,Kt=be?Symbol.for("react.scope"):60119;function Ye(Me){if(typeof Me=="object"&&Me!==null){var xe=Me.$$typeof;switch(xe){case Ve:switch(Me=Me.type,Me){case me:case Pe:case et:case Te:case ge:case Oe:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case Se:case at:case rt:case nt:case Le:return Me;default:return xe}}case $e:return xe}}}function lt(Me){return Ye(Me)===Pe}le=me,le=Pe,le=Se,le=Le,le=Ve,le=at,le=et,le=rt,le=nt,le=$e,le=Te,le=ge,le=Oe,le=function(Me){return lt(Me)||Ye(Me)===me},le=lt,le=function(Me){return Ye(Me)===Se},le=function(Me){return Ye(Me)===Le},le=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===Ve},le=function(Me){return Ye(Me)===at},le=function(Me){return Ye(Me)===et},le=function(Me){return Ye(Me)===rt},Vt.isMemo=function(Me){return Ye(Me)===nt},le=function(Me){return Ye(Me)===$e},le=function(Me){return Ye(Me)===Te},le=function(Me){return Ye(Me)===ge},le=function(Me){return Ye(Me)===Oe},le=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===et||Me===Pe||Me===Te||Me===ge||Me===Oe||Me===ht||typeof Me=="object"&&Me!==null&&(Me.$$typeof===rt||Me.$$typeof===nt||Me.$$typeof===Le||Me.$$typeof===Se||Me.$$typeof===at||Me.$$typeof===Ee||Me.$$typeof===pt||Me.$$typeof===Kt||Me.$$typeof===Je)},le=Ye},12060:function(mn,Vt,le){"use strict";mn.exports=le(72665)},41771:function(mn,Vt){"use strict";var le;var be=typeof Symbol=="function"&&Symbol.for,Ve=be?Symbol.for("react.element"):60103,$e=be?Symbol.for("react.portal"):60106,et=be?Symbol.for("react.fragment"):60107,ge=be?Symbol.for("react.strict_mode"):60108,Te=be?Symbol.for("react.profiler"):60114,Le=be?Symbol.for("react.provider"):60109,Se=be?Symbol.for("react.context"):60110,me=be?Symbol.for("react.async_mode"):60111,Pe=be?Symbol.for("react.concurrent_mode"):60111,at=be?Symbol.for("react.forward_ref"):60112,Oe=be?Symbol.for("react.suspense"):60113,ht=be?Symbol.for("react.suspense_list"):60120,nt=be?Symbol.for("react.memo"):60115,rt=be?Symbol.for("react.lazy"):60116,Je=be?Symbol.for("react.block"):60121,Ee=be?Symbol.for("react.fundamental"):60117,pt=be?Symbol.for("react.responder"):60118,Kt=be?Symbol.for("react.scope"):60119;function Ye(Me){if(typeof Me=="object"&&Me!==null){var xe=Me.$$typeof;switch(xe){case Ve:switch(Me=Me.type,Me){case me:case Pe:case et:case Te:case ge:case Oe:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case Se:case at:case rt:case nt:case Le:return Me;default:return xe}}case $e:return xe}}}function lt(Me){return Ye(Me)===Pe}le=me,le=Pe,le=Se,le=Le,le=Ve,le=at,le=et,le=rt,le=nt,le=$e,le=Te,le=ge,le=Oe,le=function(Me){return lt(Me)||Ye(Me)===me},le=lt,le=function(Me){return Ye(Me)===Se},le=function(Me){return Ye(Me)===Le},le=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===Ve},le=function(Me){return Ye(Me)===at},Vt.isFragment=function(Me){return Ye(Me)===et},le=function(Me){return Ye(Me)===rt},le=function(Me){return Ye(Me)===nt},le=function(Me){return Ye(Me)===$e},le=function(Me){return Ye(Me)===Te},le=function(Me){return Ye(Me)===ge},le=function(Me){return Ye(Me)===Oe},le=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===et||Me===Pe||Me===Te||Me===ge||Me===Oe||Me===ht||typeof Me=="object"&&Me!==null&&(Me.$$typeof===rt||Me.$$typeof===nt||Me.$$typeof===Le||Me.$$typeof===Se||Me.$$typeof===at||Me.$$typeof===Ee||Me.$$typeof===pt||Me.$$typeof===Kt||Me.$$typeof===Je)},le=Ye},47655:function(mn,Vt,le){"use strict";mn.exports=le(41771)},64701:function(mn,Vt,le){"use strict";le.r(Vt),le.d(Vt,{ResizableTextArea:function(){return bn},default:function(){return fn}});var be=le(87462),Ve=le(1413),$e=le(4942),et=le(71002),ge=le(97685),Te=le(45987),Le=le(74902),Se=le(94184),me=le.n(Se),Pe=le(67656),at=le(87887),Oe=le(67294);function ht(Gt){var Ft=Oe.useRef();Ft.current=Gt;var xn=Oe.useCallback(function(){for(var gn,_e=arguments.length,ce=new Array(_e),se=0;se<_e;se++)ce[se]=arguments[se];return(gn=Ft.current)===null||gn===void 0?void 0:gn.call.apply(gn,[Ft].concat(ce))},[]);return xn}function nt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var rt=nt()?Oe.useLayoutEffect:Oe.useEffect,Je=rt,Ee=function(Ft,xn){var gn=Oe.useRef(!0);rt(function(){if(!gn.current)return Ft()},xn),rt(function(){return gn.current=!1,function(){gn.current=!0}},[])};function pt(Gt){var Ft=Oe.useRef(!1),xn=Oe.useState(Gt),gn=(0,ge.Z)(xn,2),_e=gn[0],ce=gn[1];Oe.useEffect(function(){return Ft.current=!1,function(){Ft.current=!0}},[]);function se(he,fe){fe&&Ft.current||ce(he)}return[_e,se]}function Kt(Gt){return Gt!==void 0}function Ye(Gt,Ft){var xn=Ft||{},gn=xn.defaultValue,_e=xn.value,ce=xn.onChange,se=xn.postState,he=pt(function(){return Kt(_e)?_e:Kt(gn)?typeof gn=="function"?gn():gn:typeof Gt=="function"?Gt():Gt}),fe=(0,ge.Z)(he,2),oe=fe[0],ke=fe[1],Ge=_e!==void 0?_e:oe,St=se?se(Ge):Ge,Tt=ht(ce),Ot=pt([Ge]),Wt=(0,ge.Z)(Ot,2),$t=Wt[0],Gn=Wt[1];Ee(function(){var Dt=$t[0];oe!==Dt&&Tt(oe,Dt)},[$t]),Ee(function(){Kt(_e)||ke(_e)},[_e]);var ar=ht(function(Dt,tn){ke(Dt,tn),Gn([Ge],tn)});return[St,ar]}var lt=le(48555),Me=function(Ft){return+setTimeout(Ft,16)},xe=function(Ft){return clearTimeout(Ft)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Me=function(Ft){return window.requestAnimationFrame(Ft)},xe=function(Ft){return window.cancelAnimationFrame(Ft)});var We=0,je=new Map;function Et(Gt){je.delete(Gt)}var vt=function(Ft){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;We+=1;var gn=We;function _e(ce){if(ce===0)Et(gn),Ft();else{var se=Me(function(){_e(ce-1)});je.set(gn,se)}}return _e(xn),gn};vt.cancel=function(Gt){var Ft=je.get(Gt);return Et(Ft),xe(Ft)};var At=vt,Qe=`
|
|
|
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;
|
|
|
`,Bt=["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"],Lt={},hn;function ut(Gt){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xn=Gt.getAttribute("id")||Gt.getAttribute("data-reactid")||Gt.getAttribute("name");if(Ft&&Lt[xn])return Lt[xn];var gn=window.getComputedStyle(Gt),_e=gn.getPropertyValue("box-sizing")||gn.getPropertyValue("-moz-box-sizing")||gn.getPropertyValue("-webkit-box-sizing"),ce=parseFloat(gn.getPropertyValue("padding-bottom"))+parseFloat(gn.getPropertyValue("padding-top")),se=parseFloat(gn.getPropertyValue("border-bottom-width"))+parseFloat(gn.getPropertyValue("border-top-width")),he=Bt.map(function(oe){return"".concat(oe,":").concat(gn.getPropertyValue(oe))}).join(";"),fe={sizingStyle:he,paddingSize:ce,borderSize:se,boxSizing:_e};return Ft&&xn&&(Lt[xn]=fe),fe}function Yt(Gt){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,gn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;hn||(hn=document.createElement("textarea"),hn.setAttribute("tab-index","-1"),hn.setAttribute("aria-hidden","true"),document.body.appendChild(hn)),Gt.getAttribute("wrap")?hn.setAttribute("wrap",Gt.getAttribute("wrap")):hn.removeAttribute("wrap");var _e=ut(Gt,Ft),ce=_e.paddingSize,se=_e.borderSize,he=_e.boxSizing,fe=_e.sizingStyle;hn.setAttribute("style","".concat(fe,";").concat(Qe)),hn.value=Gt.value||Gt.placeholder||"";var oe=void 0,ke=void 0,Ge,St=hn.scrollHeight;if(he==="border-box"?St+=se:he==="content-box"&&(St-=ce),xn!==null||gn!==null){hn.value=" ";var Tt=hn.scrollHeight-ce;xn!==null&&(oe=Tt*xn,he==="border-box"&&(oe=oe+ce+se),St=Math.max(oe,St)),gn!==null&&(ke=Tt*gn,he==="border-box"&&(ke=ke+ce+se),Ge=St>ke?"":"hidden",St=Math.min(ke,St))}var Ot={height:St,overflowY:Ge,resize:"none"};return oe&&(Ot.minHeight=oe),ke&&(Ot.maxHeight=ke),Ot}var vn=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],un=0,Ze=1,Ae=2,Pt=Oe.forwardRef(function(Gt,Ft){var xn=Gt,gn=xn.prefixCls,_e=xn.onPressEnter,ce=xn.defaultValue,se=xn.value,he=xn.autoSize,fe=xn.onResize,oe=xn.className,ke=xn.style,Ge=xn.disabled,St=xn.onChange,Tt=xn.onInternalAutoSize,Ot=(0,Te.Z)(xn,vn),Wt=Ye(ce,{value:se,postState:function(In){return In!=null?In:""}}),$t=(0,ge.Z)(Wt,2),Gn=$t[0],ar=$t[1],Dt=function(In){ar(In.target.value),St==null||St(In)},tn=Oe.useRef();Oe.useImperativeHandle(Ft,function(){return{textArea:tn.current}});var qn=Oe.useMemo(function(){return he&&(0,et.Z)(he)==="object"?[he.minRows,he.maxRows]:[]},[he]),Er=(0,ge.Z)(qn,2),kn=Er[0],gr=Er[1],Di=!!he,ni=function(){try{if(document.activeElement===tn.current){var In=tn.current,mr=In.selectionStart,Xn=In.selectionEnd,sr=In.scrollTop;tn.current.setSelectionRange(mr,Xn),tn.current.scrollTop=sr}}catch(On){}},Xr=Oe.useState(Ae),Vr=(0,ge.Z)(Xr,2),Si=Vr[0],hi=Vr[1],Ti=Oe.useState(),Ii=(0,ge.Z)(Ti,2),Lr=Ii[0],Xi=Ii[1],la=function(){hi(un)};Je(function(){Di&&la()},[se,kn,gr,Di]),Je(function(){if(Si===un)hi(Ze);else if(Si===Ze){var _n=Yt(tn.current,!1,kn,gr);hi(Ae),Xi(_n)}else ni()},[Si]);var va=Oe.useRef(),ya=function(){At.cancel(va.current)},$i=function(In){Si===Ae&&(fe==null||fe(In),he&&(ya(),va.current=At(function(){la()})))};Oe.useEffect(function(){return ya},[]);var Mt=Di?Lr:null,Cn=(0,Ve.Z)((0,Ve.Z)({},ke),Mt);return(Si===un||Si===Ze)&&(Cn.overflowY="hidden",Cn.overflowX="hidden"),Oe.createElement(lt.Z,{onResize:$i,disabled:!(he||fe)},Oe.createElement("textarea",(0,be.Z)({},Ot,{ref:tn,style:Cn,className:me()(gn,oe,(0,$e.Z)({},"".concat(gn,"-disabled"),Ge)),disabled:Ge,value:Gn,onChange:Dt})))}),bn=Pt,nn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function tt(Gt,Ft){return(0,Le.Z)(Gt||"").slice(0,Ft).join("")}function ot(Gt,Ft,xn,gn){var _e=xn;return Gt?_e=tt(xn,gn):(0,Le.Z)(Ft||"").length<xn.length&&(0,Le.Z)(xn||"").length>gn&&(_e=Ft),_e}var Ht=Oe.forwardRef(function(Gt,Ft){var xn,gn=Gt.defaultValue,_e=Gt.value,ce=Gt.onFocus,se=Gt.onBlur,he=Gt.onChange,fe=Gt.allowClear,oe=Gt.maxLength,ke=Gt.onCompositionStart,Ge=Gt.onCompositionEnd,St=Gt.suffix,Tt=Gt.prefixCls,Ot=Tt===void 0?"rc-textarea":Tt,Wt=Gt.classes,$t=Gt.showCount,Gn=Gt.className,ar=Gt.style,Dt=Gt.disabled,tn=Gt.hidden,qn=Gt.classNames,Er=Gt.styles,kn=Gt.onResize,gr=(0,Te.Z)(Gt,nn),Di=Ye(gn,{value:_e,defaultValue:gn}),ni=(0,ge.Z)(Di,2),Xr=ni[0],Vr=ni[1],Si=(0,Oe.useRef)(null),hi=Oe.useState(!1),Ti=(0,ge.Z)(hi,2),Ii=Ti[0],Lr=Ti[1],Xi=Oe.useState(!1),la=(0,ge.Z)(Xi,2),va=la[0],ya=la[1],$i=Oe.useRef(),Mt=Oe.useRef(0),Cn=Oe.useState(null),_n=(0,ge.Z)(Cn,2),In=_n[0],mr=_n[1],Xn=function(){var Qn;(Qn=Si.current)===null||Qn===void 0||Qn.textArea.focus()};(0,Oe.useImperativeHandle)(Ft,function(){return{resizableTextArea:Si.current,focus:Xn,blur:function(){var Qn;(Qn=Si.current)===null||Qn===void 0||Qn.textArea.blur()}}}),(0,Oe.useEffect)(function(){Lr(function(jn){return!Dt&&jn})},[Dt]);var sr=Number(oe)>0,On=function(Qn){ya(!0),$i.current=Xr,Mt.current=Qn.currentTarget.selectionStart,ke==null||ke(Qn)},qe=function(Qn){ya(!1);var tr=Qn.currentTarget.value;if(sr){var Ar,cn=Mt.current>=oe+1||Mt.current===((Ar=$i.current)===null||Ar===void 0?void 0:Ar.length);tr=ot(cn,$i.current,tr,oe)}tr!==Xr&&(Vr(tr),(0,at.rJ)(Qn.currentTarget,Qn,he,tr)),Ge==null||Ge(Qn)},st=function(Qn){var tr=Qn.target.value;if(!va&&sr){var Ar=Qn.target.selectionStart>=oe+1||Qn.target.selectionStart===tr.length||!Qn.target.selectionStart;tr=ot(Ar,Xr,tr,oe)}Vr(tr),(0,at.rJ)(Qn.currentTarget,Qn,he,tr)},_t=function(Qn){var tr=gr.onPressEnter,Ar=gr.onKeyDown;Qn.key==="Enter"&&tr&&tr(Qn),Ar==null||Ar(Qn)},Nt=function(Qn){Lr(!0),ce==null||ce(Qn)},He=function(Qn){Lr(!1),se==null||se(Qn)},gt=function(Qn){var tr;Vr(""),Xn(),(0,at.rJ)((tr=Si.current)===null||tr===void 0?void 0:tr.textArea,Qn,he)},Rt=(0,at.D7)(Xr);!va&&sr&&_e==null&&(Rt=tt(Rt,oe));var It=St,Zt;if($t){var Ut=(0,Le.Z)(Rt).length;(0,et.Z)($t)==="object"?Zt=$t.formatter({value:Rt,count:Ut,maxLength:oe}):Zt="".concat(Ut).concat(sr?" / ".concat(oe):""),It=Oe.createElement(Oe.Fragment,null,It,Oe.createElement("span",{className:me()("".concat(Ot,"-data-count"),qn==null?void 0:qn.count),style:Er==null?void 0:Er.count},Zt))}var Nn=function(Qn){var tr;kn==null||kn(Qn),(tr=Si.current)!==null&&tr!==void 0&&tr.textArea.style.height&&mr(!0)},hr=!gr.autoSize&&!$t&&!fe,Vn=Oe.createElement(Pe.BaseInput,{value:Rt,allowClear:fe,handleReset:gt,suffix:It,prefixCls:Ot,classes:{affixWrapper:me()(Wt==null?void 0:Wt.affixWrapper,(xn={},(0,$e.Z)(xn,"".concat(Ot,"-show-count"),$t),(0,$e.Z)(xn,"".concat(Ot,"-textarea-allow-clear"),fe),xn))},disabled:Dt,focused:Ii,className:Gn,style:(0,Ve.Z)((0,Ve.Z)({},ar),In&&!hr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Zt=="string"?Zt:void 0}},hidden:tn,inputElement:Oe.createElement(bn,(0,be.Z)({},gr,{onKeyDown:_t,onChange:st,onFocus:Nt,onBlur:He,onCompositionStart:On,onCompositionEnd:qe,className:qn==null?void 0:qn.textarea,style:(0,Ve.Z)((0,Ve.Z)({},Er==null?void 0:Er.textarea),{},{resize:ar==null?void 0:ar.resize}),disabled:Dt,prefixCls:Ot,onResize:Nn,ref:Si}))});return Vn}),En=Ht,fn=En},1337:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Se}});var be=le(1413),Ve=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,$e=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,et="".concat(Ve," ").concat($e).split(/[\s\n]+/),ge="aria-",Te="data-";function Le(me,Pe){return me.indexOf(Pe)===0}function Se(me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,at;Pe===!1?at={aria:!0,data:!0,attr:!0}:Pe===!0?at={aria:!0}:at=(0,be.Z)({},Pe);var Oe={};return Object.keys(me).forEach(function(ht){(at.aria&&(ht==="role"||Le(ht,ge))||at.data&&Le(ht,Te)||at.attr&&et.includes(ht))&&(Oe[ht]=me[ht])}),Oe}},88386:function(mn,Vt,le){(function(be){be(le(4631))})(function(be){be.defineOption("placeholder","",function(Se,me,Pe){var at=Pe&&Pe!=be.Init;if(me&&!at)Se.on("blur",ge),Se.on("change",Te),Se.on("swapDoc",Te),be.on(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose=function(){et(Se)}),Te(Se);else if(!me&&at){Se.off("blur",ge),Se.off("change",Te),Se.off("swapDoc",Te),be.off(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose),Ve(Se);var Oe=Se.getWrapperElement();Oe.className=Oe.className.replace(" CodeMirror-empty","")}me&&!Se.hasFocus()&&ge(Se)});function Ve(Se){Se.state.placeholder&&(Se.state.placeholder.parentNode.removeChild(Se.state.placeholder),Se.state.placeholder=null)}function $e(Se){Ve(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 Pe=Se.getOption("placeholder");typeof Pe=="string"&&(Pe=document.createTextNode(Pe)),me.appendChild(Pe),Se.display.lineSpace.insertBefore(me,Se.display.lineSpace.firstChild)}function et(Se){setTimeout(function(){var me=!1,Pe=Se.getInputField();Pe.nodeName=="TEXTAREA"?me=!Pe.value:Se.lineCount()==1&&(me=!/[^\u200b]/.test(Pe.querySelector(".CodeMirror-line").textContent)),me?$e(Se):Ve(Se)},20)}function ge(Se){Le(Se)&&$e(Se)}function Te(Se){var me=Se.getWrapperElement(),Pe=Le(Se);me.className=me.className.replace(" CodeMirror-empty","")+(Pe?" CodeMirror-empty":""),Pe?$e(Se):Ve(Se)}function Le(Se){return Se.lineCount()===1&&Se.getLine(0)===""}})},82801:function(mn,Vt,le){(function(be){be(le(4631))})(function(be){var Ve={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},$e=be.Pos;be.defineOption("autoCloseBrackets",!1,function(rt,Je,Ee){Ee&&Ee!=be.Init&&(rt.removeKeyMap(ge),rt.state.closeBrackets=null),Je&&(Te(et(Je,"pairs")),rt.state.closeBrackets=Je,rt.addKeyMap(ge))});function et(rt,Je){return Je=="pairs"&&typeof rt=="string"?rt:typeof rt=="object"&&rt[Je]!=null?rt[Je]:Ve[Je]}var ge={Backspace:me,Enter:Pe};function Te(rt){for(var Je=0;Je<rt.length;Je++){var Ee=rt.charAt(Je),pt="'"+Ee+"'";ge[pt]||(ge[pt]=Le(Ee))}}Te(Ve.pairs+"`");function Le(rt){return function(Je){return Oe(Je,rt)}}function Se(rt){var Je=rt.state.closeBrackets;if(!Je||Je.override)return Je;var Ee=rt.getModeAt(rt.getCursor());return Ee.closeBrackets||Je}function me(rt){var Je=Se(rt);if(!Je||rt.getOption("disableInput"))return be.Pass;for(var Ee=et(Je,"pairs"),pt=rt.listSelections(),Kt=0;Kt<pt.length;Kt++){if(!pt[Kt].empty())return be.Pass;var Ye=ht(rt,pt[Kt].head);if(!Ye||Ee.indexOf(Ye)%2!=0)return be.Pass}for(var Kt=pt.length-1;Kt>=0;Kt--){var lt=pt[Kt].head;rt.replaceRange("",$e(lt.line,lt.ch-1),$e(lt.line,lt.ch+1),"+delete")}}function Pe(rt){var Je=Se(rt),Ee=Je&&et(Je,"explode");if(!Ee||rt.getOption("disableInput"))return be.Pass;for(var pt=rt.listSelections(),Kt=0;Kt<pt.length;Kt++){if(!pt[Kt].empty())return be.Pass;var Ye=ht(rt,pt[Kt].head);if(!Ye||Ee.indexOf(Ye)%2!=0)return be.Pass}rt.operation(function(){var lt=rt.lineSeparator()||`
|
|
|
`;rt.replaceSelection(lt+lt,null),rt.execCommand("goCharLeft"),pt=rt.listSelections();for(var Me=0;Me<pt.length;Me++){var xe=pt[Me].head.line;rt.indentLine(xe,null,!0),rt.indentLine(xe+1,null,!0)}})}function at(rt){var Je=be.cmpPos(rt.anchor,rt.head)>0;return{anchor:new $e(rt.anchor.line,rt.anchor.ch+(Je?-1:1)),head:new $e(rt.head.line,rt.head.ch+(Je?1:-1))}}function Oe(rt,Je){var Ee=Se(rt);if(!Ee||rt.getOption("disableInput"))return be.Pass;var pt=et(Ee,"pairs"),Kt=pt.indexOf(Je);if(Kt==-1)return be.Pass;for(var Ye=et(Ee,"closeBefore"),lt=et(Ee,"triples"),Me=pt.charAt(Kt+1)==Je,xe=rt.listSelections(),We=Kt%2==0,je,Et=0;Et<xe.length;Et++){var vt=xe[Et],At=vt.head,Qe,Bt=rt.getRange(At,$e(At.line,At.ch+1));if(We&&!vt.empty())Qe="surround";else if((Me||!We)&&Bt==Je)Me&&nt(rt,At)?Qe="both":lt.indexOf(Je)>=0&&rt.getRange(At,$e(At.line,At.ch+3))==Je+Je+Je?Qe="skipThree":Qe="skip";else if(Me&&At.ch>1&<.indexOf(Je)>=0&&rt.getRange($e(At.line,At.ch-2),At)==Je+Je){if(At.ch>2&&/\bstring/.test(rt.getTokenTypeAt($e(At.line,At.ch-2))))return be.Pass;Qe="addFour"}else if(Me){var Lt=At.ch==0?" ":rt.getRange($e(At.line,At.ch-1),At);if(!be.isWordChar(Bt)&&Lt!=Je&&!be.isWordChar(Lt))Qe="both";else return be.Pass}else if(We&&(Bt.length===0||/\s/.test(Bt)||Ye.indexOf(Bt)>-1))Qe="both";else return be.Pass;if(!je)je=Qe;else if(je!=Qe)return be.Pass}var hn=Kt%2?pt.charAt(Kt-1):Je,ut=Kt%2?Je:pt.charAt(Kt+1);rt.operation(function(){if(je=="skip")rt.execCommand("goCharRight");else if(je=="skipThree")for(var Yt=0;Yt<3;Yt++)rt.execCommand("goCharRight");else if(je=="surround"){for(var vn=rt.getSelections(),Yt=0;Yt<vn.length;Yt++)vn[Yt]=hn+vn[Yt]+ut;rt.replaceSelections(vn,"around"),vn=rt.listSelections().slice();for(var Yt=0;Yt<vn.length;Yt++)vn[Yt]=at(vn[Yt]);rt.setSelections(vn)}else je=="both"?(rt.replaceSelection(hn+ut,null),rt.triggerElectric(hn+ut),rt.execCommand("goCharLeft")):je=="addFour"&&(rt.replaceSelection(hn+hn+hn+hn,"before"),rt.execCommand("goCharRight"))})}function ht(rt,Je){var Ee=rt.getRange($e(Je.line,Je.ch-1),$e(Je.line,Je.ch+1));return Ee.length==2?Ee:null}function nt(rt,Je){var Ee=rt.getTokenAt($e(Je.line,Je.ch+1));return/\bstring/.test(Ee.type)&&Ee.start==Je.ch&&(Je.ch==0||!/\bstring/.test(rt.getTokenTypeAt(Je)))}})},57341:function(mn,Vt,le){(function(be){be(le(4631),le(4786))})(function(be){be.defineOption("autoCloseTags",!1,function(me,Pe,at){if(at!=be.Init&&at&&me.removeKeyMap("autoCloseTags"),!!Pe){var Oe={name:"autoCloseTags"};(typeof Pe!="object"||Pe.whenClosing!==!1)&&(Oe["'/'"]=function(ht){return Te(ht)}),(typeof Pe!="object"||Pe.whenOpening!==!1)&&(Oe["'>'"]=function(ht){return et(ht)}),me.addKeyMap(Oe)}});var Ve=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],$e=["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 et(me){if(me.getOption("disableInput"))return be.Pass;for(var Pe=me.listSelections(),at=[],Oe=me.getOption("autoCloseTags"),ht=0;ht<Pe.length;ht++){if(!Pe[ht].empty())return be.Pass;var nt=Pe[ht].head,rt=me.getTokenAt(nt),Je=be.innerMode(me.getMode(),rt.state),Ee=Je.state,pt=Je.mode.xmlCurrentTag&&Je.mode.xmlCurrentTag(Ee),Kt=pt&&pt.name;if(!Kt)return be.Pass;var Ye=Je.mode.configuration=="html",lt=typeof Oe=="object"&&Oe.dontCloseTags||Ye&&Ve,Me=typeof Oe=="object"&&Oe.indentTags||Ye&&$e;rt.end>nt.ch&&(Kt=Kt.slice(0,Kt.length-rt.end+nt.ch));var xe=Kt.toLowerCase();if(!Kt||rt.type=="string"&&(rt.end!=nt.ch||!/[\"\']/.test(rt.string.charAt(rt.string.length-1))||rt.string.length==1)||rt.type=="tag"&&pt.close||rt.string.indexOf("/")==nt.ch-rt.start-1||lt&&Le(lt,xe)>-1||Se(me,Je.mode.xmlCurrentContext&&Je.mode.xmlCurrentContext(Ee)||[],Kt,nt,!0))return be.Pass;var We=typeof Oe=="object"&&Oe.emptyTags;if(We&&Le(We,Kt)>-1){at[ht]={text:"/>",newPos:be.Pos(nt.line,nt.ch+2)};continue}var je=Me&&Le(Me,xe)>-1;at[ht]={indent:je,text:">"+(je?`
|
|
|
|
|
|
`:"")+"</"+Kt+">",newPos:je?be.Pos(nt.line+1,0):be.Pos(nt.line,nt.ch+1)}}for(var Et=typeof Oe=="object"&&Oe.dontIndentOnAutoClose,ht=Pe.length-1;ht>=0;ht--){var vt=at[ht];me.replaceRange(vt.text,Pe[ht].head,Pe[ht].anchor,"+insert");var At=me.listSelections().slice(0);At[ht]={head:vt.newPos,anchor:vt.newPos},me.setSelections(At),!Et&&vt.indent&&(me.indentLine(vt.newPos.line,null,!0),me.indentLine(vt.newPos.line+1,null,!0))}}function ge(me,Pe){for(var at=me.listSelections(),Oe=[],ht=Pe?"/":"</",nt=me.getOption("autoCloseTags"),rt=typeof nt=="object"&&nt.dontIndentOnSlash,Je=0;Je<at.length;Je++){if(!at[Je].empty())return be.Pass;var Ee=at[Je].head,pt=me.getTokenAt(Ee),Kt=be.innerMode(me.getMode(),pt.state),Ye=Kt.state;if(Pe&&(pt.type=="string"||pt.string.charAt(0)!="<"||pt.start!=Ee.ch-1))return be.Pass;var lt,Me=Kt.mode.name!="xml"&&me.getMode().name=="htmlmixed";if(Me&&Kt.mode.name=="javascript")lt=ht+"script";else if(Me&&Kt.mode.name=="css")lt=ht+"style";else{var xe=Kt.mode.xmlCurrentContext&&Kt.mode.xmlCurrentContext(Ye);if(!xe||xe.length&&Se(me,xe,xe[xe.length-1],Ee))return be.Pass;lt=ht+xe[xe.length-1]}me.getLine(Ee.line).charAt(pt.end)!=">"&&(lt+=">"),Oe[Je]=lt}if(me.replaceSelections(Oe),at=me.listSelections(),!rt)for(var Je=0;Je<at.length;Je++)(Je==at.length-1||at[Je].head.line<at[Je+1].head.line)&&me.indentLine(at[Je].head.line)}function Te(me){return me.getOption("disableInput")?be.Pass:ge(me,!0)}be.commands.closeTag=function(me){return ge(me)};function Le(me,Pe){if(me.indexOf)return me.indexOf(Pe);for(var at=0,Oe=me.length;at<Oe;++at)if(me[at]==Pe)return at;return-1}function Se(me,Pe,at,Oe,ht){if(!be.scanForClosingTag)return!1;var nt=Math.min(me.lastLine()+1,Oe.line+500),rt=be.scanForClosingTag(me,Oe,null,nt);if(!rt||rt.tag!=at)return!1;for(var Je=ht?1:0,Ee=Pe.length-1;Ee>=0&&Pe[Ee]==at;Ee--)++Je;Oe=rt.to;for(var Ee=1;Ee<Je;Ee++){var pt=be.scanForClosingTag(me,Oe,null,nt);if(!pt||pt.tag!=at)return!1;Oe=pt.to}return!0}})},4786:function(mn,Vt,le){(function(be){be(le(4631))})(function(be){"use strict";var Ve=be.Pos;function $e(Ee,pt){return Ee.line-pt.line||Ee.ch-pt.ch}var et="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",ge=et+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Te=new RegExp("<(/?)(["+et+"]["+ge+"]*)","g");function Le(Ee,pt,Kt,Ye){this.line=pt,this.ch=Kt,this.cm=Ee,this.text=Ee.getLine(pt),this.min=Ye?Math.max(Ye.from,Ee.firstLine()):Ee.firstLine(),this.max=Ye?Math.min(Ye.to-1,Ee.lastLine()):Ee.lastLine()}function Se(Ee,pt){var Kt=Ee.cm.getTokenTypeAt(Ve(Ee.line,pt));return Kt&&/\btag\b/.test(Kt)}function me(Ee){if(!(Ee.line>=Ee.max))return Ee.ch=0,Ee.text=Ee.cm.getLine(++Ee.line),!0}function Pe(Ee){if(!(Ee.line<=Ee.min))return Ee.text=Ee.cm.getLine(--Ee.line),Ee.ch=Ee.text.length,!0}function at(Ee){for(;;){var pt=Ee.text.indexOf(">",Ee.ch);if(pt==-1){if(me(Ee))continue;return}if(!Se(Ee,pt+1)){Ee.ch=pt+1;continue}var Kt=Ee.text.lastIndexOf("/",pt),Ye=Kt>-1&&!/\S/.test(Ee.text.slice(Kt+1,pt));return Ee.ch=pt+1,Ye?"selfClose":"regular"}}function Oe(Ee){for(;;){var pt=Ee.ch?Ee.text.lastIndexOf("<",Ee.ch-1):-1;if(pt==-1){if(Pe(Ee))continue;return}if(!Se(Ee,pt+1)){Ee.ch=pt;continue}Te.lastIndex=pt,Ee.ch=pt;var Kt=Te.exec(Ee.text);if(Kt&&Kt.index==pt)return Kt}}function ht(Ee){for(;;){Te.lastIndex=Ee.ch;var pt=Te.exec(Ee.text);if(!pt){if(me(Ee))continue;return}if(!Se(Ee,pt.index+1)){Ee.ch=pt.index+1;continue}return Ee.ch=pt.index+pt[0].length,pt}}function nt(Ee){for(;;){var pt=Ee.ch?Ee.text.lastIndexOf(">",Ee.ch-1):-1;if(pt==-1){if(Pe(Ee))continue;return}if(!Se(Ee,pt+1)){Ee.ch=pt;continue}var Kt=Ee.text.lastIndexOf("/",pt),Ye=Kt>-1&&!/\S/.test(Ee.text.slice(Kt+1,pt));return Ee.ch=pt+1,Ye?"selfClose":"regular"}}function rt(Ee,pt){for(var Kt=[];;){var Ye=ht(Ee),lt,Me=Ee.line,xe=Ee.ch-(Ye?Ye[0].length:0);if(!Ye||!(lt=at(Ee)))return;if(lt!="selfClose")if(Ye[1]){for(var We=Kt.length-1;We>=0;--We)if(Kt[We]==Ye[2]){Kt.length=We;break}if(We<0&&(!pt||pt==Ye[2]))return{tag:Ye[2],from:Ve(Me,xe),to:Ve(Ee.line,Ee.ch)}}else Kt.push(Ye[2])}}function Je(Ee,pt){for(var Kt=[];;){var Ye=nt(Ee);if(!Ye)return;if(Ye=="selfClose"){Oe(Ee);continue}var lt=Ee.line,Me=Ee.ch,xe=Oe(Ee);if(!xe)return;if(xe[1])Kt.push(xe[2]);else{for(var We=Kt.length-1;We>=0;--We)if(Kt[We]==xe[2]){Kt.length=We;break}if(We<0&&(!pt||pt==xe[2]))return{tag:xe[2],from:Ve(Ee.line,Ee.ch),to:Ve(lt,Me)}}}}be.registerHelper("fold","xml",function(Ee,pt){for(var Kt=new Le(Ee,pt.line,0);;){var Ye=ht(Kt);if(!Ye||Kt.line!=pt.line)return;var lt=at(Kt);if(!lt)return;if(!Ye[1]&<!="selfClose"){var Me=Ve(Kt.line,Kt.ch),xe=rt(Kt,Ye[2]);return xe&&$e(xe.from,Me)>0?{from:Me,to:xe.from}:null}}}),be.findMatchingTag=function(Ee,pt,Kt){var Ye=new Le(Ee,pt.line,pt.ch,Kt);if(!(Ye.text.indexOf(">")==-1&&Ye.text.indexOf("<")==-1)){var lt=at(Ye),Me=lt&&Ve(Ye.line,Ye.ch),xe=lt&&Oe(Ye);if(!(!lt||!xe||$e(Ye,pt)>0)){var We={from:Ve(Ye.line,Ye.ch),to:Me,tag:xe[2]};return lt=="selfClose"?{open:We,close:null,at:"open"}:xe[1]?{open:Je(Ye,xe[2]),close:We,at:"close"}:(Ye=new Le(Ee,Me.line,Me.ch,Kt),{open:We,close:rt(Ye,xe[2]),at:"open"})}}},be.findEnclosingTag=function(Ee,pt,Kt,Ye){for(var lt=new Le(Ee,pt.line,pt.ch,Kt);;){var Me=Je(lt,Ye);if(!Me)break;var xe=new Le(Ee,pt.line,pt.ch,Kt),We=rt(xe,Me.tag);if(We)return{open:Me,close:We}}},be.scanForClosingTag=function(Ee,pt,Kt,Ye){var lt=new Le(Ee,pt.line,pt.ch,Ye?{from:0,to:Ye}:null);return rt(lt,Kt)}})},4631:function(mn){(function(Vt,le){mn.exports=le()})(this,function(){"use strict";var Vt=navigator.userAgent,le=navigator.platform,be=/gecko\/\d/i.test(Vt),Ve=/MSIE \d/.test(Vt),$e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vt),et=/Edge\/(\d+)/.exec(Vt),ge=Ve||$e||et,Te=ge&&(Ve?document.documentMode||6:+(et||$e)[1]),Le=!et&&/WebKit\//.test(Vt),Se=Le&&/Qt\/\d+\.\d+/.test(Vt),me=!et&&/Chrome\//.test(Vt),Pe=/Opera\//.test(Vt),at=/Apple Computer/.test(navigator.vendor),Oe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Vt),ht=/PhantomJS/.test(Vt),nt=!et&&/AppleWebKit/.test(Vt)&&/Mobile\/\w+/.test(Vt),rt=/Android/.test(Vt),Je=nt||rt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Vt),Ee=nt||/Mac/.test(le),pt=/\bCrOS\b/.test(Vt),Kt=/win/i.test(le),Ye=Pe&&Vt.match(/Version\/(\d*\.\d*)/);Ye&&(Ye=Number(Ye[1])),Ye&&Ye>=15&&(Pe=!1,Le=!0);var lt=Ee&&(Se||Pe&&(Ye==null||Ye<12.11)),Me=be||ge&&Te>=9;function xe(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var We=function(x,z){var ne=x.className,te=xe(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 je(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function Et(x,z){return je(x).appendChild(z)}function vt(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 ue=0;ue<z.length;++ue)ie.appendChild(z[ue]);return ie}function At(x,z,ne,te){var ie=vt(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var Qe;document.createRange?Qe=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:Qe=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 Bt(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 Lt(){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 hn(x,z){var ne=x.className;xe(z).test(ne)||(x.className+=(ne?" ":"")+z)}function ut(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!xe(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var Yt=function(x){x.select()};nt?Yt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ge&&(Yt=function(x){try{x.select()}catch(z){}});function vn(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function un(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 Ze(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ue=te||0,ve=ie||0;;){var Ce=x.indexOf(" ",ue);if(Ce<0||Ce>=z)return ve+(z-ue);ve+=Ce-ue,ve+=ne-ve%ne,ue=Ce+1}}var Ae=function(){this.id=null,this.f=null,this.time=0,this.handler=vn(this.onTimeout,this)};Ae.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Ae.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 Pt(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var bn=50,nn={toString:function(){return"CodeMirror.Pass"}},tt={scroll:!1},ot={origin:"*mouse"},Ht={origin:"+move"};function En(x,z,ne){for(var te=0,ie=0;;){var ue=x.indexOf(" ",te);ue==-1&&(ue=x.length);var ve=ue-te;if(ue==x.length||ie+ve>=z)return te+Math.min(ve,z-ie);if(ie+=ue-te,ie+=ne-ie%ne,te=ue+1,ie>=z)return te}}var fn=[""];function Gt(x){for(;fn.length<=x;)fn.push(Ft(fn)+" ");return fn[x]}function Ft(x){return x[x.length-1]}function xn(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function gn(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function _e(){}function ce(x,z){var ne;return Object.create?ne=Object.create(x):(_e.prototype=x,ne=new _e),z&&un(z,ne),ne}var se=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function he(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||se.test(x))}function fe(x,z){return z?z.source.indexOf("\\w")>-1&&he(x)?!0:z.test(x):he(x)}function oe(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var ke=/[\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 Ge(x){return x.charCodeAt(0)>=768&&ke.test(x)}function St(x,z,ne){for(;(ne<0?z>0:z<x.length)&&Ge(x.charAt(z));)z+=ne;return z}function Tt(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,ue=te<0?Math.ceil(ie):Math.floor(ie);if(ue==z)return x(ue)?z:ne;x(ue)?ne=ue:z=ue+te}}function Ot(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ue=0;ue<x.length;++ue){var ve=x[ue];(ve.from<ne&&ve.to>z||z==ne&&ve.to==z)&&(te(Math.max(ve.from,z),Math.min(ve.to,ne),ve.level==1?"rtl":"ltr",ue),ie=!0)}ie||te(z,ne,"ltr")}var Wt=null;function $t(x,z,ne){var te;Wt=null;for(var ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.from<z&&ue.to>z)return ie;ue.to==z&&(ue.from!=ue.to&&ne=="before"?te=ie:Wt=ie),ue.from==z&&(ue.from!=ue.to&&ne!="before"?te=ie:Wt=ie)}return te!=null?te:Wt}var Gn=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]/,ue=/[LRr]/,ve=/[Lb1n]/,Ce=/[1n]/;function De(Re,ct,Ct){this.level=Re,this.from=ct,this.to=Ct}return function(Re,ct){var Ct=ct=="ltr"?"L":"R";if(Re.length==0||ct=="ltr"&&!te.test(Re))return!1;for(var en=Re.length,jt=[],Fn=0;Fn<en;++Fn)jt.push(ne(Re.charCodeAt(Fn)));for(var Jn=0,yr=Ct;Jn<en;++Jn){var Ir=jt[Jn];Ir=="m"?jt[Jn]=yr:yr=Ir}for(var Fr=0,kr=Ct;Fr<en;++Fr){var zr=jt[Fr];zr=="1"&&kr=="r"?jt[Fr]="n":ue.test(zr)&&(kr=zr,zr=="r"&&(jt[Fr]="R"))}for(var vi=1,wi=jt[0];vi<en-1;++vi){var da=jt[vi];da=="+"&&wi=="1"&&jt[vi+1]=="1"?jt[vi]="1":da==","&&wi==jt[vi+1]&&(wi=="1"||wi=="n")&&(jt[vi]=wi),wi=da}for(var to=0;to<en;++to){var Wo=jt[to];if(Wo==",")jt[to]="N";else if(Wo=="%"){var bo=void 0;for(bo=to+1;bo<en&&jt[bo]=="%";++bo);for(var cs=to&&jt[to-1]=="!"||bo<en&&jt[bo]=="1"?"1":"N",ds=to;ds<bo;++ds)jt[ds]=cs;to=bo-1}}for(var Do=0,fs=Ct;Do<en;++Do){var Zi=jt[Do];fs=="L"&&Zi=="1"?jt[Do]="L":ue.test(Zi)&&(fs=Zi)}for(var So=0;So<en;++So)if(ie.test(jt[So])){var xo=void 0;for(xo=So+1;xo<en&&ie.test(jt[xo]);++xo);for(var Co=(So?jt[So-1]:Ct)=="L",_o=(xo<en?jt[xo]:Ct)=="L",Wl=Co==_o?Co?"L":"R":Ct,ys=So;ys<xo;++ys)jt[ys]=Wl;So=xo-1}for(var Go=[],Wa,No=0;No<en;)if(ve.test(jt[No])){var Ec=No;for(++No;No<en&&ve.test(jt[No]);++No);Go.push(new De(0,Ec,No))}else{var sl=No,xl=Go.length,Zs=ct=="rtl"?1:0;for(++No;No<en&&jt[No]!="L";++No);for(var Po=sl;Po<No;)if(Ce.test(jt[Po])){sl<Po&&(Go.splice(xl,0,new De(1,sl,Po)),xl+=Zs);var Ul=Po;for(++Po;Po<No&&Ce.test(jt[Po]);++Po);Go.splice(xl,0,new De(2,Ul,Po)),xl+=Zs,sl=Po}else++Po;sl<No&&Go.splice(xl,0,new De(1,sl,No))}return ct=="ltr"&&(Go[0].level==1&&(Wa=Re.match(/^\s+/))&&(Go[0].from=Wa[0].length,Go.unshift(new De(0,0,Wa[0].length))),Ft(Go).level==1&&(Wa=Re.match(/\s+$/))&&(Ft(Go).to-=Wa[0].length,Go.push(new De(0,en-Wa[0].length,en)))),ct=="rtl"?Go.reverse():Go}}();function ar(x,z){var ne=x.order;return ne==null&&(ne=x.order=Gn(x.text,z)),ne}var Dt=[],tn=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]||Dt).concat(ne)}};function qn(x,z){return x._handlers&&x._handlers[z]||Dt}function Er(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 ue=Pt(ie,ne);ue>-1&&(te[z]=ie.slice(0,ue).concat(ie.slice(ue+1)))}}}function kn(x,z){var ne=qn(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 gr(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),kn(x,ne||z.type,x,z),hi(z)||z.codemirrorIgnore}function Di(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)Pt(ne,z[te])==-1&&ne.push(z[te])}function ni(x,z){return qn(x,z).length>0}function Xr(x){x.prototype.on=function(z,ne){tn(this,z,ne)},x.prototype.off=function(z,ne){Er(this,z,ne)}}function Vr(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Si(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function hi(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Ti(x){Vr(x),Si(x)}function Ii(x){return x.target||x.srcElement}function Lr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),Ee&&x.ctrlKey&&z==1&&(z=3),z}var Xi=function(){if(ge&&Te<9)return!1;var x=vt("div");return"draggable"in x||"dragDrop"in x}(),la;function va(x){if(la==null){var z=vt("span","\u200B");Et(x,vt("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(la=z.offsetWidth<=1&&z.offsetHeight>2&&!(ge&&Te<8))}var ne=la?vt("span","\u200B"):vt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var ya;function $i(x){if(ya!=null)return ya;var z=Et(x,document.createTextNode("A\u062EA")),ne=Qe(z,0,1).getBoundingClientRect(),te=Qe(z,1,2).getBoundingClientRect();return je(x),!ne||ne.left==ne.right?!1:ya=te.right-ne.right<3}var Mt=`
|
|
|
|
|
|
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 ue=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),ve=ue.indexOf("\r");ve!=-1?(ne.push(ue.slice(0,ve)),z+=ve+1):(ne.push(ue),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},Cn=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},_n=function(){var x=vt("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),In=null;function mr(x){if(In!=null)return In;var z=Et(x,vt("span","x")),ne=z.getBoundingClientRect(),te=Qe(z,0,1).getBoundingClientRect();return In=Math.abs(ne.left-te.left)>1}var Xn={},sr={};function On(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),Xn[x]=z}function qe(x,z){sr[x]=z}function st(x){if(typeof x=="string"&&sr.hasOwnProperty(x))x=sr[x];else if(x&&typeof x.name=="string"&&sr.hasOwnProperty(x.name)){var z=sr[x.name];typeof z=="string"&&(z={name:z}),x=ce(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return st("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return st("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function _t(x,z){z=st(z);var ne=Xn[z.name];if(!ne)return _t(x,"text/plain");var te=ne(x,z);if(Nt.hasOwnProperty(z.name)){var ie=Nt[z.name];for(var ue in ie)ie.hasOwnProperty(ue)&&(te.hasOwnProperty(ue)&&(te["_"+ue]=te[ue]),te[ue]=ie[ue])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var ve in z.modeProps)te[ve]=z.modeProps[ve];return te}var Nt={};function He(x,z){var ne=Nt.hasOwnProperty(x)?Nt[x]:Nt[x]={};un(z,ne)}function gt(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 Rt(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 It(x,z,ne){return x.startState?x.startState(z,ne):!0}var Zt=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};Zt.prototype.eol=function(){return this.pos>=this.string.length},Zt.prototype.sol=function(){return this.pos==this.lineStart},Zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Zt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Zt.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},Zt.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},Zt.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},Zt.prototype.skipToEnd=function(){this.pos=this.string.length},Zt.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},Zt.prototype.backUp=function(x){this.pos-=x},Zt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ze(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ze(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.indentation=function(){return Ze(this.string,null,this.tabSize)-(this.lineStart?Ze(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(ve){return ne?ve.toLowerCase():ve},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var ue=this.string.slice(this.pos).match(x);return ue&&ue.index>0?null:(ue&&z!==!1&&(this.pos+=ue[0].length),ue)}},Zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Zt.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},Zt.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},Zt.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function Ut(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],ue=ie.chunkSize();if(z<ue){ne=ie;break}z-=ue}return ne.lines[z]}function Nn(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ue){var ve=ue.text;ie==ne.line&&(ve=ve.slice(0,ne.ch)),ie==z.line&&(ve=ve.slice(z.ch)),te.push(ve),++ie}),te}function hr(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function Vn(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function jn(x){if(x.parent==null)return null;for(var z=x.parent,ne=Pt(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 Qn(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],ue=ie.height;if(z<ue){x=ie;continue e}z-=ue,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var ve=0;ve<x.lines.length;++ve){var Ce=x.lines[ve],De=Ce.height;if(z<De)break;z-=De}return ne+ve}function tr(x,z){return z>=x.first&&z<x.first+x.size}function Ar(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function cn(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof cn))return new cn(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function Kn(x,z){return x.line-z.line||x.ch-z.ch}function pi(x,z){return x.sticky==z.sticky&&Kn(x,z)==0}function xi(x){return cn(x.line,x.ch)}function Zr(x,z){return Kn(x,z)<0?z:x}function Rr(x,z){return Kn(x,z)<0?x:z}function _i(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function cr(x,z){if(z.line<x.first)return cn(x.first,0);var ne=x.first+x.size-1;return z.line>ne?cn(ne,Ut(x,ne).text.length):ui(z,Ut(x,z.line).text.length)}function ui(x,z){var ne=x.ch;return ne==null||ne>z?cn(x.line,z):ne<0?cn(x.line,0):x}function wn(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=cr(x,z[te]);return ne}var Yi=function(x,z){this.state=x,this.lookAhead=z},ki=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};ki.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},ki.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}},ki.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ki.fromSaved=function(x,z,ne){return z instanceof Yi?new ki(x,gt(x.mode,z.state),ne,z.lookAhead):new ki(x,gt(x.mode,z),ne)},ki.prototype.save=function(x){var z=x!==!1?gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Yi(z,this.maxLookAhead):z};function wa(x,z,ne,te){var ie=[x.state.modeGen],ue={};Ni(x,z.text,x.doc.mode,ne,function(Re,ct){return ie.push(Re,ct)},ue,te);for(var ve=ne.state,Ce=function(Re){ne.baseTokens=ie;var ct=x.state.overlays[Re],Ct=1,en=0;ne.state=!0,Ni(x,z.text,ct.mode,ne,function(jt,Fn){for(var Jn=Ct;en<jt;){var yr=ie[Ct];yr>jt&&ie.splice(Ct,1,jt,ie[Ct+1],yr),Ct+=2,en=Math.min(jt,yr)}if(Fn)if(ct.opaque)ie.splice(Jn,Ct-Jn,jt,"overlay "+Fn),Ct=Jn+2;else for(;Jn<Ct;Jn+=2){var Ir=ie[Jn+1];ie[Jn+1]=(Ir?Ir+" ":"")+"overlay "+Fn}},ue),ne.state=ve,ne.baseTokens=null,ne.baseTokenPos=1},De=0;De<x.state.overlays.length;++De)Ce(De);return{styles:ie,classes:ue.bgClass||ue.textClass?ue:null}}function qi(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=Pi(x,jn(z)),ie=z.text.length>x.options.maxHighlightLength&>(x.doc.mode,te.state),ue=wa(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=ue.styles,ue.classes?z.styleClasses=ue.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 Pi(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new ki(te,!0,z);var ue=ka(x,z,ne),ve=ue>te.first&&Ut(te,ue-1).stateAfter,Ce=ve?ki.fromSaved(te,ve,ue):new ki(te,It(te.mode),ue);return te.iter(ue,z,function(De){fa(x,De.text,Ce);var Re=Ce.line;De.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 fa(x,z,ne,te){var ie=x.doc.mode,ue=new Zt(z,x.options.tabSize,ne);for(ue.start=ue.pos=te||0,z==""&&ji(ie,ne.state);!ue.eol();)Ci(ie,ue,ne.state),ue.start=ue.pos}function ji(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=Rt(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function Ci(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=Rt(x,ne).mode);var ue=x.token(z,ne);if(z.pos>z.start)return ue}throw new Error("Mode "+x.name+" failed to advance stream.")}var ta=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function _a(x,z,ne,te){var ie=x.doc,ue=ie.mode,ve;z=cr(ie,z);var Ce=Ut(ie,z.line),De=Pi(x,z.line,ne),Re=new Zt(Ce.text,x.options.tabSize,De),ct;for(te&&(ct=[]);(te||Re.pos<z.ch)&&!Re.eol();)Re.start=Re.pos,ve=Ci(ue,Re,De.state),te&&ct.push(new ta(Re,ve,gt(ie.mode,De.state)));return te?ct:new ta(Re,ve,De.state)}function na(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 Ni(x,z,ne,te,ie,ue,ve){var Ce=ne.flattenSpans;Ce==null&&(Ce=x.options.flattenSpans);var De=0,Re=null,ct=new Zt(z,x.options.tabSize,te),Ct,en=x.options.addModeClass&&[null];for(z==""&&na(ji(ne,te.state),ue);!ct.eol();){if(ct.pos>x.options.maxHighlightLength?(Ce=!1,ve&&fa(x,z,te,ct.pos),ct.pos=z.length,Ct=null):Ct=na(Ci(ne,ct,te.state,en),ue),en){var jt=en[0].name;jt&&(Ct="m-"+(Ct?jt+" "+Ct:jt))}if(!Ce||Re!=Ct){for(;De<ct.start;)De=Math.min(ct.start,De+5e3),ie(De,Re);Re=Ct}ct.start=ct.pos}for(;De<ct.pos;){var Fn=Math.min(ct.pos,De+5e3);ie(Fn,Re),De=Fn}}function ka(x,z,ne){for(var te,ie,ue=x.doc,ve=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Ce=z;Ce>ve;--Ce){if(Ce<=ue.first)return ue.first;var De=Ut(ue,Ce-1),Re=De.stateAfter;if(Re&&(!ne||Ce+(Re instanceof Yi?Re.lookAhead:0)<=ue.modeFrontier))return Ce;var ct=Ze(De.text,null,x.options.tabSize);(ie==null||te>ct)&&(ie=Ce-1,te=ct)}return ie}function Pa(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=Ut(x,te).stateAfter;if(ie&&(!(ie instanceof Yi)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var ha=!1,ai=!1;function bt(){ha=!0}function mt(){ai=!0}function zt(x,z,ne){this.marker=x,this.from=z,this.to=ne}function an(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function An(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function Sr(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function wr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],ve=ue.marker,Ce=ue.from==null||(ve.inclusiveLeft?ue.from<=z:ue.from<z);if(Ce||ue.from==z&&ve.type=="bookmark"&&(!ne||!ue.marker.insertLeft)){var De=ue.to==null||(ve.inclusiveRight?ue.to>=z:ue.to>z);(te||(te=[])).push(new zt(ve,ue.from,De?null:ue.to))}}return te}function Tr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],ve=ue.marker,Ce=ue.to==null||(ve.inclusiveRight?ue.to>=z:ue.to>z);if(Ce||ue.from==z&&ve.type=="bookmark"&&(!ne||ue.marker.insertLeft)){var De=ue.from==null||(ve.inclusiveLeft?ue.from<=z:ue.from<z);(te||(te=[])).push(new zt(ve,De?null:ue.from-z,ue.to==null?null:ue.to-z))}}return te}function $r(x,z){if(z.full)return null;var ne=tr(x,z.from.line)&&Ut(x,z.from.line).markedSpans,te=tr(x,z.to.line)&&Ut(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ue=z.to.ch,ve=Kn(z.from,z.to)==0,Ce=wr(ne,ie,ve),De=Tr(te,ue,ve),Re=z.text.length==1,ct=Ft(z.text).length+(Re?ie:0);if(Ce)for(var Ct=0;Ct<Ce.length;++Ct){var en=Ce[Ct];if(en.to==null){var jt=an(De,en.marker);jt?Re&&(en.to=jt.to==null?null:jt.to+ct):en.to=ie}}if(De)for(var Fn=0;Fn<De.length;++Fn){var Jn=De[Fn];if(Jn.to!=null&&(Jn.to+=ct),Jn.from==null){var yr=an(Ce,Jn.marker);yr||(Jn.from=ct,Re&&(Ce||(Ce=[])).push(Jn))}else Jn.from+=ct,Re&&(Ce||(Ce=[])).push(Jn)}Ce&&(Ce=Dr(Ce)),De&&De!=Ce&&(De=Dr(De));var Ir=[Ce];if(!Re){var Fr=z.text.length-2,kr;if(Fr>0&&Ce)for(var zr=0;zr<Ce.length;++zr)Ce[zr].to==null&&(kr||(kr=[])).push(new zt(Ce[zr].marker,null,null));for(var vi=0;vi<Fr;++vi)Ir.push(kr);Ir.push(De)}return Ir}function Dr(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 ei(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(jt){if(jt.markedSpans)for(var Fn=0;Fn<jt.markedSpans.length;++Fn){var Jn=jt.markedSpans[Fn].marker;Jn.readOnly&&(!te||Pt(te,Jn)==-1)&&(te||(te=[])).push(Jn)}}),!te)return null;for(var ie=[{from:z,to:ne}],ue=0;ue<te.length;++ue)for(var ve=te[ue],Ce=ve.find(0),De=0;De<ie.length;++De){var Re=ie[De];if(!(Kn(Re.to,Ce.from)<0||Kn(Re.from,Ce.to)>0)){var ct=[De,1],Ct=Kn(Re.from,Ce.from),en=Kn(Re.to,Ce.to);(Ct<0||!ve.inclusiveLeft&&!Ct)&&ct.push({from:Re.from,to:Ce.from}),(en>0||!ve.inclusiveRight&&!en)&&ct.push({from:Ce.to,to:Re.to}),ie.splice.apply(ie,ct),De+=ct.length-3}}return ie}function ci(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Mi(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function Gi(x){return x.inclusiveLeft?-1:0}function Wi(x){return x.inclusiveRight?1:0}function Fi(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ue=Kn(te.from,ie.from)||Gi(x)-Gi(z);if(ue)return-ue;var ve=Kn(te.to,ie.to)||Wi(x)-Wi(z);return ve||z.id-x.id}function Ie(x,z){var ne=ai&&x.markedSpans,te;if(ne)for(var ie=void 0,ue=0;ue<ne.length;++ue)ie=ne[ue],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||Fi(te,ie.marker)<0)&&(te=ie.marker);return te}function Fe(x){return Ie(x,!0)}function Ne(x){return Ie(x,!1)}function Ue(x,z){var ne=ai&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var ue=ne[ie];ue.marker.collapsed&&(ue.from==null||ue.from<z)&&(ue.to==null||ue.to>z)&&(!te||Fi(te,ue.marker)<0)&&(te=ue.marker)}return te}function it(x,z,ne,te,ie){var ue=Ut(x,z),ve=ai&&ue.markedSpans;if(ve)for(var Ce=0;Ce<ve.length;++Ce){var De=ve[Ce];if(De.marker.collapsed){var Re=De.marker.find(0),ct=Kn(Re.from,ne)||Gi(De.marker)-Gi(ie),Ct=Kn(Re.to,te)||Wi(De.marker)-Wi(ie);if(!(ct>=0&&Ct<=0||ct<=0&&Ct>=0)&&(ct<=0&&(De.marker.inclusiveRight&&ie.inclusiveLeft?Kn(Re.to,ne)>=0:Kn(Re.to,ne)>0)||ct>=0&&(De.marker.inclusiveRight&&ie.inclusiveLeft?Kn(Re.from,te)<=0:Kn(Re.from,te)<0)))return!0}}}function ft(x){for(var z;z=Fe(x);)x=z.find(-1,!0).line;return x}function xt(x){for(var z;z=Ne(x);)x=z.find(1,!0).line;return x}function Xt(x){for(var z,ne;z=Ne(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function Qt(x,z){var ne=Ut(x,z),te=ft(ne);return ne==te?z:jn(te)}function zn(x,z){if(z>x.lastLine())return z;var ne=Ut(x,z),te;if(!nr(x,ne))return z;for(;te=Ne(ne);)ne=te.find(1,!0).line;return jn(ne)+1}function nr(x,z){var ne=ai&&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&&Rn(x,z,te))return!0}}}function Rn(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return Rn(x,te.line,an(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,ue=0;ue<z.markedSpans.length;++ue)if(ie=z.markedSpans[ue],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&Rn(x,z,ie))return!0}function on(x){x=ft(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 ue=ne.parent;ue;ne=ue,ue=ne.parent)for(var ve=0;ve<ue.children.length;++ve){var Ce=ue.children[ve];if(Ce==ne)break;z+=Ce.height}return z}function rn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Fe(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=Ne(te);){var ue=ne.find(0,!0);z-=te.text.length-ue.from.ch,te=ue.to.line,z+=te.text.length-ue.to.ch}return z}function yn(x){var z=x.display,ne=x.doc;z.maxLine=Ut(ne,ne.first),z.maxLineLength=rn(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=rn(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var Mn=function(x,z,ne){this.text=x,Mi(this,z),this.height=ne?ne(this):1};Mn.prototype.lineNo=function(){return jn(this)},Xr(Mn);function er(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),ci(x),Mi(x,ne);var ie=te?te(x):1;ie!=x.height&&Vn(x,ie)}function Hn(x){x.parent=null,ci(x)}var $n={},Un={};function Wn(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?Un:$n;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function ir(x,z){var ne=At("span",null,null,Le?"padding-right: .1px":null),te={pre:At("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 ue=ie?z.rest[ie-1]:z.line,ve=void 0;te.pos=0,te.addToken=Ke,$i(x.display.measure)&&(ve=ar(ue,x.doc.direction))&&(te.addToken=yt(te.addToken,ve)),te.map=[];var Ce=z!=x.display.externalMeasured&&jn(ue);dn(ue,te,qi(x,ue,Ce)),ue.styleClasses&&(ue.styleClasses.bgClass&&(te.bgClass=ut(ue.styleClasses.bgClass,te.bgClass||"")),ue.styleClasses.textClass&&(te.textClass=ut(ue.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(va(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(Le){var De=te.content.lastChild;(/\bcm-tab\b/.test(De.className)||De.querySelector&&De.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return kn(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=ut(te.pre.className,te.textClass||"")),te}function ze(x){var z=vt("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ke(x,z,ne,te,ie,ue,ve){if(z){var Ce=x.splitSpaces?kt(z,x.trailingSpace):z,De=x.cm.state.specialChars,Re=!1,ct;if(!De.test(z))x.col+=z.length,ct=document.createTextNode(Ce),x.map.push(x.pos,x.pos+z.length,ct),ge&&Te<9&&(Re=!0),x.pos+=z.length;else{ct=document.createDocumentFragment();for(var Ct=0;;){De.lastIndex=Ct;var en=De.exec(z),jt=en?en.index-Ct:z.length-Ct;if(jt){var Fn=document.createTextNode(Ce.slice(Ct,Ct+jt));ge&&Te<9?ct.appendChild(vt("span",[Fn])):ct.appendChild(Fn),x.map.push(x.pos,x.pos+jt,Fn),x.col+=jt,x.pos+=jt}if(!en)break;Ct+=jt+1;var Jn=void 0;if(en[0]==" "){var yr=x.cm.options.tabSize,Ir=yr-x.col%yr;Jn=ct.appendChild(vt("span",Gt(Ir),"cm-tab")),Jn.setAttribute("role","presentation"),Jn.setAttribute("cm-text"," "),x.col+=Ir}else en[0]=="\r"||en[0]==`
|
|
|
`?(Jn=ct.appendChild(vt("span",en[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Jn.setAttribute("cm-text",en[0]),x.col+=1):(Jn=x.cm.options.specialCharPlaceholder(en[0]),Jn.setAttribute("cm-text",en[0]),ge&&Te<9?ct.appendChild(vt("span",[Jn])):ct.appendChild(Jn),x.col+=1);x.map.push(x.pos,x.pos+1,Jn),x.pos++}}if(x.trailingSpace=Ce.charCodeAt(z.length-1)==32,ne||te||ie||Re||ue||ve){var Fr=ne||"";te&&(Fr+=te),ie&&(Fr+=ie);var kr=vt("span",[ct],Fr,ue);if(ve)for(var zr in ve)ve.hasOwnProperty(zr)&&zr!="style"&&zr!="class"&&kr.setAttribute(zr,ve[zr]);return x.content.appendChild(kr)}x.content.appendChild(ct)}}function kt(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var ue=x.charAt(ie);ue==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(ue="\xA0"),te+=ue,ne=ue==" "}return te}function yt(x,z){return function(ne,te,ie,ue,ve,Ce,De){ie=ie?ie+" cm-force-border":"cm-force-border";for(var Re=ne.pos,ct=Re+te.length;;){for(var Ct=void 0,en=0;en<z.length&&(Ct=z[en],!(Ct.to>Re&&Ct.from<=Re));en++);if(Ct.to>=ct)return x(ne,te,ie,ue,ve,Ce,De);x(ne,te.slice(0,Ct.to-Re),ie,ue,null,Ce,De),ue=null,te=te.slice(Ct.to-Re),Re=Ct.to}}}function qt(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 dn(x,z,ne){var te=x.markedSpans,ie=x.text,ue=0;if(!te){for(var ve=1;ve<ne.length;ve+=2)z.addToken(z,ie.slice(ue,ue=ne[ve]),Wn(ne[ve+1],z.cm.options));return}for(var Ce=ie.length,De=0,Re=1,ct="",Ct,en,jt=0,Fn,Jn,yr,Ir,Fr;;){if(jt==De){Fn=Jn=yr=en="",Fr=null,Ir=null,jt=1/0;for(var kr=[],zr=void 0,vi=0;vi<te.length;++vi){var wi=te[vi],da=wi.marker;if(da.type=="bookmark"&&wi.from==De&&da.widgetNode)kr.push(da);else if(wi.from<=De&&(wi.to==null||wi.to>De||da.collapsed&&wi.to==De&&wi.from==De)){if(wi.to!=null&&wi.to!=De&&jt>wi.to&&(jt=wi.to,Jn=""),da.className&&(Fn+=" "+da.className),da.css&&(en=(en?en+";":"")+da.css),da.startStyle&&wi.from==De&&(yr+=" "+da.startStyle),da.endStyle&&wi.to==jt&&(zr||(zr=[])).push(da.endStyle,wi.to),da.title&&((Fr||(Fr={})).title=da.title),da.attributes)for(var to in da.attributes)(Fr||(Fr={}))[to]=da.attributes[to];da.collapsed&&(!Ir||Fi(Ir.marker,da)<0)&&(Ir=wi)}else wi.from>De&&jt>wi.from&&(jt=wi.from)}if(zr)for(var Wo=0;Wo<zr.length;Wo+=2)zr[Wo+1]==jt&&(Jn+=" "+zr[Wo]);if(!Ir||Ir.from==De)for(var bo=0;bo<kr.length;++bo)qt(z,0,kr[bo]);if(Ir&&(Ir.from||0)==De){if(qt(z,(Ir.to==null?Ce+1:Ir.to)-De,Ir.marker,Ir.from==null),Ir.to==null)return;Ir.to==De&&(Ir=!1)}}if(De>=Ce)break;for(var cs=Math.min(Ce,jt);;){if(ct){var ds=De+ct.length;if(!Ir){var Do=ds>cs?ct.slice(0,cs-De):ct;z.addToken(z,Do,Ct?Ct+Fn:Fn,yr,De+Do.length==jt?Jn:"",en,Fr)}if(ds>=cs){ct=ct.slice(cs-De),De=cs;break}De=ds,yr=""}ct=ie.slice(ue,ue=ne[Re++]),Ct=Wn(ne[Re++],z.cm.options)}}}function sn(x,z,ne){this.line=z,this.rest=Xt(z),this.size=this.rest?jn(Ft(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=nr(x,z)}function Dn(x,z,ne){for(var te=[],ie,ue=z;ue<ne;ue=ie){var ve=new sn(x.doc,Ut(x.doc,ue),ue);ie=ue+ve.size,te.push(ve)}return te}var Sn=null;function Jt(x){Sn?Sn.ops.push(x):x.ownsGroup=Sn={ops:[x],delayedCallbacks:[]}}function Ln(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 Pn(x,z){var ne=x.ownsGroup;if(ne)try{Ln(ne)}finally{Sn=null,z(ne)}}var rr=null;function Tn(x,z){var ne=qn(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;Sn?ie=Sn.delayedCallbacks:rr?ie=rr:(ie=rr=[],setTimeout(pr,0));for(var ue=function(Ce){ie.push(function(){return ne[Ce].apply(null,te)})},ve=0;ve<ne.length;++ve)ue(ve)}}function pr(){var x=rr;rr=null;for(var z=0;z<x.length;++z)x[z]()}function Pr(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ue=z.changes[ie];ue=="text"?Cr(x,z):ue=="gutter"?Kr(x,z,ne,te):ue=="class"?Br(x,z):ue=="widget"&&xr(x,z,te)}z.changes=null}function br(x){return x.node==x.text&&(x.node=vt("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ge&&Te<8&&(x.node.style.zIndex=2)),x.node}function _r(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=br(z);z.background=te.insertBefore(vt("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function lr(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):ir(x,z)}function Cr(x,z){var ne=z.text.className,te=lr(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,Br(x,z)):ne&&(z.text.className=ne)}function Br(x,z){_r(x,z),z.line.wrapClass?br(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 Kr(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=br(z);z.gutterBackground=vt("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 ue=z.line.gutterMarkers;if(x.options.lineNumbers||ue){var ve=br(z),Ce=z.gutter=vt("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Ce),ve.insertBefore(Ce,z.text),z.line.gutterClass&&(Ce.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ue||!ue["CodeMirror-linenumbers"])&&(z.lineNumber=Ce.appendChild(vt("div",Ar(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ue)for(var De=0;De<x.display.gutterSpecs.length;++De){var Re=x.display.gutterSpecs[De].className,ct=ue.hasOwnProperty(Re)&&ue[Re];ct&&Ce.appendChild(vt("div",[ct],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Re]+"px; width: "+te.gutterWidth[Re]+"px"))}}}function xr(x,z,ne){z.alignable&&(z.alignable=null);for(var te=xe("CodeMirror-linewidget"),ie=z.node.firstChild,ue=void 0;ie;ie=ue)ue=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);di(x,z,ne)}function Ur(x,z,ne,te){var ie=lr(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),Br(x,z),Kr(x,z,ne,te),di(x,z,te),z.node}function di(x,z,ne){if(zi(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)zi(x,z.rest[te],z,ne,!1)}function zi(x,z,ne,te,ie){if(z.widgets)for(var ue=br(ne),ve=0,Ce=z.widgets;ve<Ce.length;++ve){var De=Ce[ve],Re=vt("div",[De.node],"CodeMirror-linewidget"+(De.className?" "+De.className:""));De.handleMouseEvents||Re.setAttribute("cm-ignore-events","true"),Li(De,Re,ne,te),x.display.input.setUneditable(Re),ie&&De.above?ue.insertBefore(Re,ne.gutter||ne.text):ue.appendChild(Re),Tn(De,"redraw")}}function Li(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 mi(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Bt(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;"),Et(z.display.measure,vt("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function Oi(x,z){for(var ne=Ii(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 Ri(x){return x.lineSpace.offsetTop}function Yr(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function gi(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=Et(x.measure,vt("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 Or(x){return bn-x.display.nativeBarWidth}function jr(x){return x.display.scroller.clientWidth-Or(x)-x.display.barWidth}function oi(x){return x.display.scroller.clientHeight-Or(x)-x.display.barHeight}function Ai(x,z,ne){var te=x.options.lineWrapping,ie=te&&jr(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ue=z.measure.heights=[];if(te){z.measure.width=ie;for(var ve=z.text.firstChild.getClientRects(),Ce=0;Ce<ve.length-1;Ce++){var De=ve[Ce],Re=ve[Ce+1];Math.abs(De.bottom-Re.bottom)>2&&ue.push((De.bottom+Re.top)/2-ne.top)}}ue.push(ne.bottom-ne.top)}}function Na(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(jn(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function $a(x,z){z=ft(z);var ne=jn(z),te=x.display.externalMeasured=new sn(x.doc,z,ne);te.lineN=ne;var ie=te.built=ir(x,te);return te.text=ie.pre,Et(x.display.lineMeasure,ie.pre),te}function La(x,z,ne,te){return ti(x,Bi(x,z),ne,te)}function Ji(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[Ki(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function Bi(x,z){var ne=jn(z),te=Ji(x,ne);te&&!te.text?te=null:te&&te.changes&&(Pr(x,te,ne,ho(x)),x.curOp.forceUpdate=!0),te||(te=$a(x,z));var ie=Na(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function ti(x,z,ne,te,ie){z.before&&(ne=-1);var ue=ne+(te||""),ve;return z.cache.hasOwnProperty(ue)?ve=z.cache[ue]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(Ai(x,z.view,z.rect),z.hasHeights=!0),ve=yi(x,z,ne,te),ve.bogus||(z.cache[ue]=ve)),{left:ve.left,right:ve.right,top:ie?ve.rtop:ve.top,bottom:ie?ve.rbottom:ve.bottom}}var Oa={left:0,right:0,top:0,bottom:0};function ri(x,z,ne){for(var te,ie,ue,ve,Ce,De,Re=0;Re<x.length;Re+=3)if(Ce=x[Re],De=x[Re+1],z<Ce?(ie=0,ue=1,ve="left"):z<De?(ie=z-Ce,ue=ie+1):(Re==x.length-3||z==De&&x[Re+3]>z)&&(ue=De-Ce,ie=ue-1,z>=De&&(ve="right")),ie!=null){if(te=x[Re+2],Ce==De&&ne==(te.insertLeft?"left":"right")&&(ve=ne),ne=="left"&&ie==0)for(;Re&&x[Re-2]==x[Re-3]&&x[Re-1].insertLeft;)te=x[(Re-=3)+2],ve="left";if(ne=="right"&&ie==De-Ce)for(;Re<x.length-3&&x[Re+3]==x[Re+4]&&!x[Re+5].insertLeft;)te=x[(Re+=3)+2],ve="right";break}return{node:te,start:ie,end:ue,collapse:ve,coverStart:Ce,coverEnd:De}}function Nr(x,z){var ne=Oa;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 yi(x,z,ne,te){var ie=ri(z.map,ne,te),ue=ie.node,ve=ie.start,Ce=ie.end,De=ie.collapse,Re;if(ue.nodeType==3){for(var ct=0;ct<4;ct++){for(;ve&&Ge(z.line.text.charAt(ie.coverStart+ve));)--ve;for(;ie.coverStart+Ce<ie.coverEnd&&Ge(z.line.text.charAt(ie.coverStart+Ce));)++Ce;if(ge&&Te<9&&ve==0&&Ce==ie.coverEnd-ie.coverStart?Re=ue.parentNode.getBoundingClientRect():Re=Nr(Qe(ue,ve,Ce).getClientRects(),te),Re.left||Re.right||ve==0)break;Ce=ve,ve=ve-1,De="right"}ge&&Te<11&&(Re=Qi(x.display.measure,Re))}else{ve>0&&(De=te="right");var Ct;x.options.lineWrapping&&(Ct=ue.getClientRects()).length>1?Re=Ct[te=="right"?Ct.length-1:0]:Re=ue.getBoundingClientRect()}if(ge&&Te<9&&!ve&&(!Re||!Re.left&&!Re.right)){var en=ue.parentNode.getClientRects()[0];en?Re={left:en.left,right:en.left+io(x.display),top:en.top,bottom:en.bottom}:Re=Oa}for(var jt=Re.top-z.rect.top,Fn=Re.bottom-z.rect.top,Jn=(jt+Fn)/2,yr=z.view.measure.heights,Ir=0;Ir<yr.length-1&&!(Jn<yr[Ir]);Ir++);var Fr=Ir?yr[Ir-1]:0,kr=yr[Ir],zr={left:(De=="right"?Re.right:Re.left)-z.rect.left,right:(De=="left"?Re.left:Re.right)-z.rect.left,top:Fr,bottom:kr};return!Re.left&&!Re.right&&(zr.bogus=!0),x.options.singleCursorHeightPerLine||(zr.rtop=jt,zr.rbottom=Fn),zr}function Qi(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!mr(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 Ei(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 Ui(x){x.display.externalMeasure=null,je(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)Ei(x.display.view[z])}function Gr(x){Ui(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function aa(){return me&&rt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pa(){return me&&rt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ra(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=mi(x.widgets[ne]));return z}function ma(x,z,ne,te,ie){if(!ie){var ue=ra(z);ne.top+=ue,ne.bottom+=ue}if(te=="line")return ne;te||(te="local");var ve=on(z);if(te=="local"?ve+=Ri(x.display):ve-=x.display.viewOffset,te=="page"||te=="window"){var Ce=x.display.lineSpace.getBoundingClientRect();ve+=Ce.top+(te=="window"?0:pa());var De=Ce.left+(te=="window"?0:aa());ne.left+=De,ne.right+=De}return ne.top+=ve,ne.bottom+=ve,ne}function Sa(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=aa(),ie-=pa();else if(ne=="local"||!ne){var ue=x.display.sizer.getBoundingClientRect();te+=ue.left,ie+=ue.top}var ve=x.display.lineSpace.getBoundingClientRect();return{left:te-ve.left,top:ie-ve.top}}function Za(x,z,ne,te,ie){return te||(te=Ut(x.doc,z.line)),ma(x,te,La(x,te,z.ch,ie),ne)}function ia(x,z,ne,te,ie,ue){te=te||Ut(x.doc,z.line),ie||(ie=Bi(x,te));function ve(Fn,Jn){var yr=ti(x,ie,Fn,Jn?"right":"left",ue);return Jn?yr.left=yr.right:yr.right=yr.left,ma(x,te,yr,ne)}var Ce=ar(te,x.doc.direction),De=z.ch,Re=z.sticky;if(De>=te.text.length?(De=te.text.length,Re="before"):De<=0&&(De=0,Re="after"),!Ce)return ve(Re=="before"?De-1:De,Re=="before");function ct(Fn,Jn,yr){var Ir=Ce[Jn],Fr=Ir.level==1;return ve(yr?Fn-1:Fn,Fr!=yr)}var Ct=$t(Ce,De,Re),en=Wt,jt=ct(De,Ct,Re=="before");return en!=null&&(jt.other=ct(De,en,Re!="before")),jt}function Ca(x,z){var ne=0;z=cr(x.doc,z),x.options.lineWrapping||(ne=io(x.display)*z.ch);var te=Ut(x.doc,z.line),ie=on(te)+Ri(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function Ja(x,z,ne,te,ie){var ue=cn(x,z,ne);return ue.xRel=ie,te&&(ue.outside=te),ue}function Ga(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return Ja(te.first,0,null,-1,-1);var ie=Qn(te,ne),ue=te.first+te.size-1;if(ie>ue)return Ja(te.first+te.size-1,Ut(te,ue).text.length,null,1,1);z<0&&(z=0);for(var ve=Ut(te,ie);;){var Ce=ii(x,ve,ie,z,ne),De=Ue(ve,Ce.ch+(Ce.xRel>0||Ce.outside>0?1:0));if(!De)return Ce;var Re=De.find(1);if(Re.line==ie)return Re;ve=Ut(te,ie=Re.line)}}function so(x,z,ne,te){te-=ra(z);var ie=z.text.length,ue=Tt(function(ve){return ti(x,ne,ve-1).bottom<=te},ie,0);return ie=Tt(function(ve){return ti(x,ne,ve).top>te},ue,ie),{begin:ue,end:ie}}function Fa(x,z,ne,te){ne||(ne=Bi(x,z));var ie=ma(x,z,ti(x,ne,te),"line").top;return so(x,z,ne,ie)}function ba(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function ii(x,z,ne,te,ie){ie-=on(z);var ue=Bi(x,z),ve=ra(z),Ce=0,De=z.text.length,Re=!0,ct=ar(z,x.doc.direction);if(ct){var Ct=(x.options.lineWrapping?ea:bi)(x,z,ne,ue,ct,te,ie);Re=Ct.level!=1,Ce=Re?Ct.from:Ct.to-1,De=Re?Ct.to:Ct.from-1}var en=null,jt=null,Fn=Tt(function(vi){var wi=ti(x,ue,vi);return wi.top+=ve,wi.bottom+=ve,ba(wi,te,ie,!1)?(wi.top<=ie&&wi.left<=te&&(en=vi,jt=wi),!0):!1},Ce,De),Jn,yr,Ir=!1;if(jt){var Fr=te-jt.left<jt.right-te,kr=Fr==Re;Fn=en+(kr?0:1),yr=kr?"after":"before",Jn=Fr?jt.left:jt.right}else{!Re&&(Fn==De||Fn==Ce)&&Fn++,yr=Fn==0?"after":Fn==z.text.length?"before":ti(x,ue,Fn-(Re?1:0)).bottom+ve<=ie==Re?"after":"before";var zr=ia(x,cn(ne,Fn,yr),"line",z,ue);Jn=zr.left,Ir=ie<zr.top?-1:ie>=zr.bottom?1:0}return Fn=St(z.text,Fn,1),Ja(ne,Fn,yr,Ir,te-Jn)}function bi(x,z,ne,te,ie,ue,ve){var Ce=Tt(function(Ct){var en=ie[Ct],jt=en.level!=1;return ba(ia(x,cn(ne,jt?en.to:en.from,jt?"before":"after"),"line",z,te),ue,ve,!0)},0,ie.length-1),De=ie[Ce];if(Ce>0){var Re=De.level!=1,ct=ia(x,cn(ne,Re?De.from:De.to,Re?"after":"before"),"line",z,te);ba(ct,ue,ve,!0)&&ct.top>ve&&(De=ie[Ce-1])}return De}function ea(x,z,ne,te,ie,ue,ve){var Ce=so(x,z,te,ve),De=Ce.begin,Re=Ce.end;/\s/.test(z.text.charAt(Re-1))&&Re--;for(var ct=null,Ct=null,en=0;en<ie.length;en++){var jt=ie[en];if(!(jt.from>=Re||jt.to<=De)){var Fn=jt.level!=1,Jn=ti(x,te,Fn?Math.min(Re,jt.to)-1:Math.max(De,jt.from)).right,yr=Jn<ue?ue-Jn+1e9:Jn-ue;(!ct||Ct>yr)&&(ct=jt,Ct=yr)}}return ct||(ct=ie[ie.length-1]),ct.from<De&&(ct={from:De,to:ct.to,level:ct.level}),ct.to>Re&&(ct={from:ct.from,to:Re,level:ct.level}),ct}var ga;function Ka(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(ga==null){ga=vt("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)ga.appendChild(document.createTextNode("x")),ga.appendChild(vt("br"));ga.appendChild(document.createTextNode("x"))}Et(x.measure,ga);var ne=ga.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),je(x.measure),ne||1}function io(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=vt("span","xxxxxxxxxx"),ne=vt("pre",[z],"CodeMirror-line-like");Et(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function ho(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ue=z.gutters.firstChild,ve=0;ue;ue=ue.nextSibling,++ve){var Ce=x.display.gutterSpecs[ve].className;ne[Ce]=ue.offsetLeft+ue.clientLeft+ie,te[Ce]=ue.clientWidth}return{fixedPos:Oo(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Oo(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Ro(x){var z=Ka(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/io(x.display)-3);return function(ie){if(nr(x.doc,ie))return 0;var ue=0;if(ie.widgets)for(var ve=0;ve<ie.widgets.length;ve++)ie.widgets[ve].height&&(ue+=ie.widgets[ve].height);return ne?ue+(Math.ceil(ie.text.length/te)||1)*z:ue+z}}function lo(x){var z=x.doc,ne=Ro(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&Vn(te,ie)})}function Ao(x,z,ne,te){var ie=x.display;if(!ne&&Ii(z).getAttribute("cm-not-content")=="true")return null;var ue,ve,Ce=ie.lineSpace.getBoundingClientRect();try{ue=z.clientX-Ce.left,ve=z.clientY-Ce.top}catch(Ct){return null}var De=Ga(x,ue,ve),Re;if(te&&De.xRel>0&&(Re=Ut(x.doc,De.line).text).length==De.ch){var ct=Ze(Re,Re.length,x.options.tabSize)-Re.length;De=cn(De.line,Math.max(0,Math.round((ue-gi(x.display).left)/io(x.display))-ct))}return De}function Ki(x,z){if(z>=x.display.viewTo||(z-=x.display.viewFrom,z<0))return null;for(var ne=x.display.view,te=0;te<ne.length;te++)if(z-=ne[te].size,z<0)return te}function fi(x,z,ne,te){z==null&&(z=x.doc.first),ne==null&&(ne=x.doc.first+x.doc.size),te||(te=0);var ie=x.display;if(te&&ne<ie.viewTo&&(ie.updateLineNumbers==null||ie.updateLineNumbers>z)&&(ie.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=ie.viewTo)ai&&Qt(x.doc,z)<ie.viewTo&&Ma(x);else if(ne<=ie.viewFrom)ai&&zn(x.doc,ne+te)>ie.viewFrom?Ma(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)Ma(x);else if(z<=ie.viewFrom){var ue=uo(x,ne,ne+te,1);ue?(ie.view=ie.view.slice(ue.index),ie.viewFrom=ue.lineN,ie.viewTo+=te):Ma(x)}else if(ne>=ie.viewTo){var ve=uo(x,z,z,-1);ve?(ie.view=ie.view.slice(0,ve.index),ie.viewTo=ve.lineN):Ma(x)}else{var Ce=uo(x,z,z,-1),De=uo(x,ne,ne+te,1);Ce&&De?(ie.view=ie.view.slice(0,Ce.index).concat(Dn(x,Ce.lineN,De.lineN)).concat(ie.view.slice(De.index)),ie.viewTo+=te):Ma(x)}var Re=ie.externalMeasured;Re&&(ne<Re.lineN?Re.lineN+=te:z<Re.lineN+Re.size&&(ie.externalMeasured=null))}function Aa(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 ue=te.view[Ki(x,z)];if(ue.node!=null){var ve=ue.changes||(ue.changes=[]);Pt(ve,ne)==-1&&ve.push(ne)}}}function Ma(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function uo(x,z,ne,te){var ie=Ki(x,z),ue,ve=x.display.view;if(!ai||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var Ce=x.display.viewFrom,De=0;De<ie;De++)Ce+=ve[De].size;if(Ce!=z){if(te>0){if(ie==ve.length-1)return null;ue=Ce+ve[ie].size-z,ie++}else ue=Ce-z;z+=ue,ne+=ue}for(;Qt(x.doc,ne)!=ne;){if(ie==(te<0?0:ve.length-1))return null;ne+=te*ve[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function ao(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=Dn(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=Dn(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(Ki(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(Dn(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,Ki(x,ne)))),te.viewTo=ne}function hs(x){for(var z=x.display.view,ne=0,te=0;te<z.length;te++){var ie=z[te];!ie.hidden&&(!ie.node||ie.changes)&&++ne}return ne}function Qo(x){x.display.input.showSelection(x.display.input.prepareSelection())}function ps(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ue=te.selection=document.createDocumentFragment(),ve=0;ve<ne.sel.ranges.length;ve++)if(!(!z&&ve==ne.sel.primIndex)){var Ce=ne.sel.ranges[ve];if(!(Ce.from().line>=x.display.viewTo||Ce.to().line<x.display.viewFrom)){var De=Ce.empty();(De||x.options.showCursorWhenSelecting)&&Vi(x,Ce.head,ie),De||Jr(x,Ce,ue)}}return te}function Vi(x,z,ne){var te=ia(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(vt("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 ue=ne.appendChild(vt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ue.style.display="",ue.style.left=te.other.left+"px",ue.style.top=te.other.top+"px",ue.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function vr(x,z){return x.top-z.top||x.left-z.left}function Jr(x,z,ne){var te=x.display,ie=x.doc,ue=document.createDocumentFragment(),ve=gi(x.display),Ce=ve.left,De=Math.max(te.sizerWidth,jr(x)-te.sizer.offsetLeft)-ve.right,Re=ie.direction=="ltr";function ct(kr,zr,vi,wi){zr<0&&(zr=0),zr=Math.round(zr),wi=Math.round(wi),ue.appendChild(vt("div",null,"CodeMirror-selected","position: absolute; left: "+kr+`px;
|
|
|
top: `+zr+"px; width: "+(vi==null?De-kr:vi)+`px;
|
|
|
height: `+(wi-zr)+"px"))}function Ct(kr,zr,vi){var wi=Ut(ie,kr),da=wi.text.length,to,Wo;function bo(Do,fs){return Za(x,cn(kr,Do),"div",wi,fs)}function cs(Do,fs,Zi){var So=Fa(x,wi,null,Do),xo=fs=="ltr"==(Zi=="after")?"left":"right",Co=Zi=="after"?So.begin:So.end-(/\s/.test(wi.text.charAt(So.end-1))?2:1);return bo(Co,xo)[xo]}var ds=ar(wi,ie.direction);return Ot(ds,zr||0,vi==null?da:vi,function(Do,fs,Zi,So){var xo=Zi=="ltr",Co=bo(Do,xo?"left":"right"),_o=bo(fs-1,xo?"right":"left"),Wl=zr==null&&Do==0,ys=vi==null&&fs==da,Go=So==0,Wa=!ds||So==ds.length-1;if(_o.top-Co.top<=3){var No=(Re?Wl:ys)&&Go,Ec=(Re?ys:Wl)&&Wa,sl=No?Ce:(xo?Co:_o).left,xl=Ec?De:(xo?_o:Co).right;ct(sl,Co.top,xl-sl,Co.bottom)}else{var Zs,Po,Ul,Xo;xo?(Zs=Re&&Wl&&Go?Ce:Co.left,Po=Re?De:cs(Do,Zi,"before"),Ul=Re?Ce:cs(fs,Zi,"after"),Xo=Re&&ys&&Wa?De:_o.right):(Zs=Re?cs(Do,Zi,"before"):Ce,Po=!Re&&Wl&&Go?De:Co.right,Ul=!Re&&ys&&Wa?Ce:_o.left,Xo=Re?cs(fs,Zi,"after"):De),ct(Zs,Co.top,Po-Zs,Co.bottom),Co.bottom<_o.top&&ct(Ce,Co.bottom,null,_o.top),ct(Ul,_o.top,Xo-Ul,_o.bottom)}(!to||vr(Co,to)<0)&&(to=Co),vr(_o,to)<0&&(to=_o),(!Wo||vr(Co,Wo)<0)&&(Wo=Co),vr(_o,Wo)<0&&(Wo=_o)}),{start:to,end:Wo}}var en=z.from(),jt=z.to();if(en.line==jt.line)Ct(en.line,en.ch,jt.ch);else{var Fn=Ut(ie,en.line),Jn=Ut(ie,jt.line),yr=ft(Fn)==ft(Jn),Ir=Ct(en.line,en.ch,yr?Fn.text.length+1:null).end,Fr=Ct(jt.line,yr?0:null,jt.ch).start;yr&&(Ir.top<Fr.top-2?(ct(Ir.right,Ir.top,null,Ir.bottom),ct(Ce,Fr.top,Fr.left,Fr.bottom)):ct(Ir.right,Ir.top,Fr.left-Ir.right,Ir.bottom)),Ir.bottom<Fr.top&&ct(Ce,Ir.bottom,null,Fr.top)}ne.appendChild(ue)}function Qr(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var ne=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||Fo(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function si(x){x.state.focused||(x.display.input.focus(),ja(x))}function Ha(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Fo(x))},100)}function ja(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(kn(x,"focus",x,z),x.state.focused=!0,hn(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),Le&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Qr(x))}function Fo(x,z){x.state.delayingBlurEvent||(x.state.focused&&(kn(x,"blur",x,z),x.state.focused=!1,We(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function Uo(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ue=x.options.lineWrapping,ve=void 0,Ce=0;if(!ie.hidden){if(ge&&Te<8){var De=ie.node.offsetTop+ie.node.offsetHeight;ve=De-ne,ne=De}else{var Re=ie.node.getBoundingClientRect();ve=Re.bottom-Re.top,!ue&&ie.text.firstChild&&(Ce=ie.text.firstChild.getBoundingClientRect().right-Re.left-1)}var ct=ie.line.height-ve;if((ct>.005||ct<-.005)&&(Vn(ie.line,ve),ls(ie.line),ie.rest))for(var Ct=0;Ct<ie.rest.length;Ct++)ls(ie.rest[Ct]);if(Ce>x.display.sizerWidth){var en=Math.ceil(Ce/io(x.display));en>x.display.maxLineLength&&(x.display.maxLineLength=en,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function ls(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var ne=x.widgets[z],te=ne.node.parentNode;te&&(ne.height=te.offsetHeight)}}function ua(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-Ri(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ue=Qn(z,te),ve=Qn(z,ie);if(ne&&ne.ensure){var Ce=ne.ensure.from.line,De=ne.ensure.to.line;Ce<ue?(ue=Ce,ve=Qn(z,on(Ut(z,Ce))+x.wrapper.clientHeight)):Math.min(De,z.lastLine())>=ve&&(ue=Qn(z,on(Ut(z,De))-x.wrapper.clientHeight),ve=De)}return{from:ue,to:Math.max(ve,ue+1)}}function Bo(x,z){if(!gr(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&&!ht){var ue=vt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-Ri(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+Or(x)+ne.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(ue),ue.scrollIntoView(ie),x.display.lineSpace.removeChild(ue)}}}function us(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?cn(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?cn(z.line,z.ch+1,"before"):z);for(var ue=0;ue<5;ue++){var ve=!1,Ce=ia(x,z),De=!ne||ne==z?Ce:ia(x,ne);ie={left:Math.min(Ce.left,De.left),top:Math.min(Ce.top,De.top)-te,right:Math.max(Ce.left,De.left),bottom:Math.max(Ce.bottom,De.bottom)+te};var Re=As(x,ie),ct=x.doc.scrollTop,Ct=x.doc.scrollLeft;if(Re.scrollTop!=null&&(Ta(x,Re.scrollTop),Math.abs(x.doc.scrollTop-ct)>1&&(ve=!0)),Re.scrollLeft!=null&&(go(x,Re.scrollLeft),Math.abs(x.doc.scrollLeft-Ct)>1&&(ve=!0)),!ve)break}return ie}function cl(x,z){var ne=As(x,z);ne.scrollTop!=null&&Ta(x,ne.scrollTop),ne.scrollLeft!=null&&go(x,ne.scrollLeft)}function As(x,z){var ne=x.display,te=Ka(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ue=oi(x),ve={};z.bottom-z.top>ue&&(z.bottom=z.top+ue);var Ce=x.doc.height+Yr(ne),De=z.top<te,Re=z.bottom>Ce-te;if(z.top<ie)ve.scrollTop=De?0:z.top;else if(z.bottom>ie+ue){var ct=Math.min(z.top,(Re?Ce:z.bottom)-ue);ct!=ie&&(ve.scrollTop=ct)}var Ct=x.options.fixedGutter?0:ne.gutters.offsetWidth,en=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Ct,jt=jr(x)-ne.gutters.offsetWidth,Fn=z.right-z.left>jt;return Fn&&(z.right=z.left+jt),z.left<10?ve.scrollLeft=0:z.left<en?ve.scrollLeft=Math.max(0,z.left+Ct-(Fn?0:10)):z.right>jt+en-3&&(ve.scrollLeft=z.right+(Fn?0:10)-jt),ve}function ms(x,z){z!=null&&(Ys(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function zo(x){Ys(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ts(x,z,ne){(z!=null||ne!=null)&&Ys(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Is(x,z){Ys(x),x.curOp.scrollToPos=z}function Ys(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=Ca(x,z.from),te=Ca(x,z.to);oo(x,ne,te,z.margin)}}function oo(x,z,ne,te){var ie=As(x,{left:Math.min(z.left,ne.left),top:Math.min(z.top,ne.top)-te,right:Math.max(z.right,ne.right),bottom:Math.max(z.bottom,ne.bottom)+te});Ts(x,ie.scrollLeft,ie.scrollTop)}function Ta(x,z){Math.abs(x.doc.scrollTop-z)<2||(be||Yu(x,{top:z}),Xa(x,z,!0),be&&Yu(x),is(x,100))}function Xa(x,z,ne){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!ne)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function go(x,z,ne,te){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ne?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!te)&&(x.doc.scrollLeft=z,Zc(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function yo(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+Yr(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+Or(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var Ko=function(x,z,ne){this.cm=ne;var te=this.vert=vt("div",[vt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=vt("div",[vt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),tn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),tn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ge&&Te<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ko.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ne=x.scrollHeight>x.clientHeight+1,te=x.nativeBarWidth;if(ne){this.vert.style.display="block",this.vert.style.bottom=z?te+"px":"0";var ie=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ne?te+"px":"0",this.horiz.style.left=x.barLeft+"px";var ue=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+ue)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(te==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ne?te:0,bottom:z?te:0}},Ko.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ko.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ko.prototype.zeroWidthHack=function(){var x=Ee&&!Oe?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ae,this.disableVert=new Ae},Ko.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),ue=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);ue!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},Ko.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var wo=function(){};wo.prototype.update=function(){return{bottom:0,right:0}},wo.prototype.setScrollLeft=function(){},wo.prototype.setScrollTop=function(){},wo.prototype.clear=function(){};function xs(x,z){z||(z=yo(x));var ne=x.display.barWidth,te=x.display.barHeight;Xl(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&Uo(x),Xl(x,yo(x)),ne=x.display.barWidth,te=x.display.barHeight}function Xl(x,z){var ne=x.display,te=ne.scrollbars.update(z);ne.sizer.style.paddingRight=(ne.barWidth=te.right)+"px",ne.sizer.style.paddingBottom=(ne.barHeight=te.bottom)+"px",ne.heightForcer.style.borderBottom=te.bottom+"px solid transparent",te.right&&te.bottom?(ne.scrollbarFiller.style.display="block",ne.scrollbarFiller.style.height=te.bottom+"px",ne.scrollbarFiller.style.width=te.right+"px"):ne.scrollbarFiller.style.display="",te.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(ne.gutterFiller.style.display="block",ne.gutterFiller.style.height=te.bottom+"px",ne.gutterFiller.style.width=z.gutterWidth+"px"):ne.gutterFiller.style.display=""}var ql={native:Ko,null:wo};function vu(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&We(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new ql[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),tn(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,ne){ne=="horizontal"?go(x,z):Ta(x,z)},x),x.display.scrollbars.addClass&&hn(x.display.wrapper,x.display.scrollbars.addClass)}var Xu=0;function Ks(x){x.curOp={cm:x,viewChanged:!1,startHeight:x.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xu},Jt(x.curOp)}function Ds(x){var z=x.curOp;z&&Pn(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;yu(ne)})}function yu(x){for(var z=x.ops,ne=0;ne<z.length;ne++)Yl(z[ne]);for(var te=0;te<z.length;te++)Ia(z[te]);for(var ie=0;ie<z.length;ie++)oa(z[ie]);for(var ue=0;ue<z.length;ue++)Ho(z[ue]);for(var ve=0;ve<z.length;ve++)es(z[ve])}function Yl(x){var z=x.cm,ne=z.display;Jl(z),x.updateMaxLine&&yn(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<ne.viewFrom||x.scrollToPos.to.line>=ne.viewTo)||ne.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new gs(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function Ia(x){x.updatedDisplay=x.mustUpdate&&qu(x.cm,x.update)}function oa(x){var z=x.cm,ne=z.display;x.updatedDisplay&&Uo(z),x.barMeasure=yo(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=La(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+Or(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-jr(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Ho(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&go(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==Lt();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&xs(z,x.barMeasure),x.updatedDisplay&&Qu(z,x.barMeasure),x.selectionChanged&&Qr(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&si(x.cm)}function es(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&Vc(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Xa(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&go(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=us(z,cr(te,x.scrollToPos.from),cr(te,x.scrollToPos.to),x.scrollToPos.margin);Bo(z,ie)}var ue=x.maybeHiddenMarkers,ve=x.maybeUnhiddenMarkers;if(ue)for(var Ce=0;Ce<ue.length;++Ce)ue[Ce].lines.length||kn(ue[Ce],"hide");if(ve)for(var De=0;De<ve.length;++De)ve[De].lines.length&&kn(ve[De],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&kn(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function sa(x,z){if(x.curOp)return z();Ks(x);try{return z()}finally{Ds(x)}}function za(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ks(x);try{return z.apply(x,arguments)}finally{Ds(x)}}}function Ra(x){return function(){if(this.curOp)return x.apply(this,arguments);Ks(this);try{return x.apply(this,arguments)}finally{Ds(this)}}}function po(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ks(z);try{return x.apply(this,arguments)}finally{Ds(z)}}}function is(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,vn(Hs,x))}function Hs(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=Pi(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(ue){if(te.line>=x.display.viewFrom){var ve=ue.styles,Ce=ue.text.length>x.options.maxHighlightLength?gt(z.mode,te.state):null,De=wa(x,ue,te,!0);Ce&&(te.state=Ce),ue.styles=De.styles;var Re=ue.styleClasses,ct=De.classes;ct?ue.styleClasses=ct:Re&&(ue.styleClasses=null);for(var Ct=!ve||ve.length!=ue.styles.length||Re!=ct&&(!Re||!ct||Re.bgClass!=ct.bgClass||Re.textClass!=ct.textClass),en=0;!Ct&&en<ve.length;++en)Ct=ve[en]!=ue.styles[en];Ct&&ie.push(te.line),ue.stateAfter=te.save(),te.nextLine()}else ue.text.length<=x.options.maxHighlightLength&&fa(x,ue.text,te),ue.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return is(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&sa(x,function(){for(var ue=0;ue<ie.length;ue++)Aa(x,ie[ue],"text")})}}var gs=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=ua(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=jr(x),this.force=ne,this.dims=ho(x),this.events=[]};gs.prototype.signal=function(x,z){ni(x,z)&&this.events.push(arguments)},gs.prototype.finish=function(){for(var x=0;x<this.events.length;x++)kn.apply(null,this.events[x])};function Jl(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=Or(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=Or(x)+"px",z.scrollbarsClipped=!0)}function Vd(x){if(x.hasFocus())return null;var z=Lt();if(!z||!Bt(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&Bt(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function Zd(x){if(!(!x||!x.activeElt||x.activeElt==Lt())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Bt(document.body,x.anchorNode)&&Bt(document.body,x.focusNode))){var z=window.getSelection(),ne=document.createRange();ne.setEnd(x.anchorNode,x.anchorOffset),ne.collapse(!1),z.removeAllRanges(),z.addRange(ne),z.extend(x.focusNode,x.focusOffset)}}function qu(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return Ma(x),!1;if(!z.force&&z.visible.from>=ne.viewFrom&&z.visible.to<=ne.viewTo&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo)&&ne.renderedView==ne.view&&hs(x)==0)return!1;bu(x)&&(Ma(x),z.dims=ho(x));var ie=te.first+te.size,ue=Math.max(z.visible.from-x.options.viewportMargin,te.first),ve=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<ue&&ue-ne.viewFrom<20&&(ue=Math.max(te.first,ne.viewFrom)),ne.viewTo>ve&&ne.viewTo-ve<20&&(ve=Math.min(ie,ne.viewTo)),ai&&(ue=Qt(x.doc,ue),ve=zn(x.doc,ve));var Ce=ue!=ne.viewFrom||ve!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;ao(x,ue,ve),ne.viewOffset=on(Ut(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var De=hs(x);if(!Ce&&De==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Re=Vd(x);return De>4&&(ne.lineDiv.style.display="none"),jd(x,ne.updateLineNumbers,z.dims),De>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Zd(Re),je(ne.cursorDiv),je(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Ce&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,is(x,400)),ne.updateLineNumbers=null,!0}function Vc(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==jr(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+Yr(x.display)-oi(x),ne.top)}),z.visible=ua(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=ua(x.display,x.doc,ne));if(!qu(x,z))break;Uo(x);var ie=yo(x);Qo(x),xs(x,ie),Qu(x,ie),z.force=!1}z.signal(x,"update",x),(x.display.viewFrom!=x.display.reportedViewFrom||x.display.viewTo!=x.display.reportedViewTo)&&(z.signal(x,"viewportChange",x,x.display.viewFrom,x.display.viewTo),x.display.reportedViewFrom=x.display.viewFrom,x.display.reportedViewTo=x.display.viewTo)}function Yu(x,z){var ne=new gs(x,z);if(qu(x,ne)){Uo(x),Vc(x,ne);var te=yo(x);Qo(x),xs(x,te),Qu(x,te),ne.finish()}}function jd(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ue=te.lineDiv,ve=ue.firstChild;function Ce(Fn){var Jn=Fn.nextSibling;return Le&&Ee&&x.display.currentWheelTarget==Fn?Fn.style.display="none":Fn.parentNode.removeChild(Fn),Jn}for(var De=te.view,Re=te.viewFrom,ct=0;ct<De.length;ct++){var Ct=De[ct];if(!Ct.hidden)if(!Ct.node||Ct.node.parentNode!=ue){var en=Ur(x,Ct,Re,ne);ue.insertBefore(en,ve)}else{for(;ve!=Ct.node;)ve=Ce(ve);var jt=ie&&z!=null&&z<=Re&&Ct.lineNumber;Ct.changes&&(Pt(Ct.changes,"gutter")>-1&&(jt=!1),Pr(x,Ct,Re,ne)),jt&&(je(Ct.lineNumber),Ct.lineNumber.appendChild(document.createTextNode(Ar(x.options,Re)))),ve=Ct.node.nextSibling}Re+=Ct.size}for(;ve;)ve=Ce(ve)}function Ju(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Qu(x,z){x.display.sizer.style.minHeight=z.docHeight+"px",x.display.heightForcer.style.top=z.docHeight+"px",x.display.gutters.style.height=z.docHeight+x.display.barHeight+Or(x)+"px"}function Zc(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Oo(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ue=te+"px",ve=0;ve<ne.length;ve++)if(!ne[ve].hidden){x.options.fixedGutter&&(ne[ve].gutter&&(ne[ve].gutter.style.left=ue),ne[ve].gutterBackground&&(ne[ve].gutterBackground.style.left=ue));var Ce=ne[ve].alignable;if(Ce)for(var De=0;De<Ce.length;De++)Ce[De].style.left=ue}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function bu(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=Ar(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(vt("div",[vt("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ue=ie.firstChild.offsetWidth,ve=ie.offsetWidth-ue;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ue,te.lineGutter.offsetWidth-ve)+1,te.lineNumWidth=te.lineNumInnerWidth+ve,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Ju(x.display),!0}return!1}function ec(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ue=x[ie],ve=null;if(typeof ue!="string"&&(ve=ue.style,ue=ue.className),ue=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ue,style:ve})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function jc(x){var z=x.gutters,ne=x.gutterSpecs;je(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ue=ie.className,ve=ie.style,Ce=z.appendChild(vt("div",null,"CodeMirror-gutter "+ue));ve&&(Ce.style.cssText=ve),ue=="CodeMirror-linenumbers"&&(x.lineGutter=Ce,Ce.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Ju(x)}function Ql(x){jc(x.display),fi(x),Zc(x)}function Gd(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=vt("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=vt("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=At("div",null,"CodeMirror-code"),ie.selectionDiv=vt("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=vt("div",null,"CodeMirror-cursors"),ie.measure=vt("div",null,"CodeMirror-measure"),ie.lineMeasure=vt("div",null,"CodeMirror-measure"),ie.lineSpace=At("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ue=At("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=vt("div",[ue],null,"position: relative"),ie.sizer=vt("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=vt("div",null,null,"position: absolute; height: "+bn+"px; width: 1px;"),ie.gutters=vt("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=vt("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=vt("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),ge&&Te<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Le&&!(be&&Je)&&(ie.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(ie.wrapper):x(ie.wrapper)),ie.viewFrom=ie.viewTo=z.first,ie.reportedViewFrom=ie.reportedViewTo=z.first,ie.view=[],ie.renderedView=null,ie.externalMeasured=null,ie.viewOffset=0,ie.lastWrapHeight=ie.lastWrapWidth=0,ie.updateLineNumbers=null,ie.nativeBarWidth=ie.barHeight=ie.barWidth=0,ie.scrollbarsClipped=!1,ie.lineNumWidth=ie.lineNumInnerWidth=ie.lineNumChars=null,ie.alignWidgets=!1,ie.cachedCharWidth=ie.cachedTextHeight=ie.cachedPaddingH=null,ie.maxLine=null,ie.maxLineLength=0,ie.maxLineChanged=!1,ie.wheelDX=ie.wheelDY=ie.wheelStartX=ie.wheelStartY=null,ie.shift=!1,ie.selForContextMenu=null,ie.activeTouch=null,ie.gutterSpecs=ec(te.gutters,te.lineNumbers),jc(ie),ne.init(ie)}var xu=0,Vo=null;ge?Vo=-.53:be?Vo=15:me?Vo=-.7:at&&(Vo=-1/3);function Pl(x){var z=x.wheelDeltaX,ne=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),ne==null&&x.detail&&x.axis==x.VERTICAL_AXIS?ne=x.detail:ne==null&&(ne=x.wheelDelta),{x:z,y:ne}}function Gc(x){var z=Pl(x);return z.x*=Vo,z.y*=Vo,z}function Xc(x,z){var ne=Pl(z),te=ne.x,ie=ne.y,ue=x.display,ve=ue.scroller,Ce=ve.scrollWidth>ve.clientWidth,De=ve.scrollHeight>ve.clientHeight;if(te&&Ce||ie&&De){if(ie&&Ee&&Le){e:for(var Re=z.target,ct=ue.view;Re!=ve;Re=Re.parentNode)for(var Ct=0;Ct<ct.length;Ct++)if(ct[Ct].node==Re){x.display.currentWheelTarget=Re;break e}}if(te&&!be&&!Pe&&Vo!=null){ie&&De&&Ta(x,Math.max(0,ve.scrollTop+ie*Vo)),go(x,Math.max(0,ve.scrollLeft+te*Vo)),(!ie||ie&&De)&&Vr(z),ue.wheelStartX=null;return}if(ie&&Vo!=null){var en=ie*Vo,jt=x.doc.scrollTop,Fn=jt+ue.wrapper.clientHeight;en<0?jt=Math.max(0,jt+en-50):Fn=Math.min(x.doc.height,Fn+en+50),Yu(x,{top:jt,bottom:Fn})}xu<20&&(ue.wheelStartX==null?(ue.wheelStartX=ve.scrollLeft,ue.wheelStartY=ve.scrollTop,ue.wheelDX=te,ue.wheelDY=ie,setTimeout(function(){if(ue.wheelStartX!=null){var Jn=ve.scrollLeft-ue.wheelStartX,yr=ve.scrollTop-ue.wheelStartY,Ir=yr&&ue.wheelDY&&yr/ue.wheelDY||Jn&&ue.wheelDX&&Jn/ue.wheelDX;ue.wheelStartX=ue.wheelStartY=null,Ir&&(Vo=(Vo*xu+Ir)/(xu+1),++xu)}},200)):(ue.wheelDX+=te,ue.wheelDY+=ie))}}var vs=function(x,z){this.ranges=x,this.primIndex=z};vs.prototype.primary=function(){return this.ranges[this.primIndex]},vs.prototype.equals=function(x){if(x==this)return!0;if(x.primIndex!=this.primIndex||x.ranges.length!=this.ranges.length)return!1;for(var z=0;z<this.ranges.length;z++){var ne=this.ranges[z],te=x.ranges[z];if(!pi(ne.anchor,te.anchor)||!pi(ne.head,te.head))return!1}return!0},vs.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new Va(xi(this.ranges[z].anchor),xi(this.ranges[z].head));return new vs(x,this.primIndex)},vs.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},vs.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(Kn(z,te.from())>=0&&Kn(x,te.to())<=0)return ne}return-1};var Va=function(x,z){this.anchor=x,this.head=z};Va.prototype.from=function(){return Rr(this.anchor,this.head)},Va.prototype.to=function(){return Zr(this.anchor,this.head)},Va.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Es(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(en,jt){return Kn(en.from(),jt.from())}),ne=Pt(z,ie);for(var ue=1;ue<z.length;ue++){var ve=z[ue],Ce=z[ue-1],De=Kn(Ce.to(),ve.from());if(te&&!ve.empty()?De>0:De>=0){var Re=Rr(Ce.from(),ve.from()),ct=Zr(Ce.to(),ve.to()),Ct=Ce.empty()?ve.from()==ve.head:Ce.from()==Ce.head;ue<=ne&&--ne,z.splice(--ue,2,new Va(Ct?ct:Re,Ct?Re:ct))}}return new vs(z,ne)}function Ps(x,z){return new vs([new Va(x,z||x)],0)}function Js(x){return x.text?cn(x.from.line+x.text.length-1,Ft(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function qc(x,z){if(Kn(x,z.from)<0)return x;if(Kn(x,z.to)<=0)return Js(z);var ne=x.line+z.text.length-(z.to.line-z.from.line)-1,te=x.ch;return x.line==z.to.line&&(te+=Js(z).ch-z.to.ch),cn(ne,te)}function tc(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new Va(qc(ie.anchor,z),qc(ie.head,z)))}return Es(x.cm,ne,x.sel.primIndex)}function Ol(x,z,ne){return x.line==z.line?cn(ne.line,x.ch-z.ch+ne.ch):cn(ne.line+(x.line-z.line),x.ch)}function nc(x,z,ne){for(var te=[],ie=cn(x.first,0),ue=ie,ve=0;ve<z.length;ve++){var Ce=z[ve],De=Ol(Ce.from,ie,ue),Re=Ol(Js(Ce),ie,ue);if(ie=Ce.to,ue=Re,ne=="around"){var ct=x.sel.ranges[ve],Ct=Kn(ct.head,ct.anchor)<0;te[ve]=new Va(Ct?Re:De,Ct?De:Re)}else te[ve]=new Va(De,De)}return new vs(te,x.sel.primIndex)}function rc(x){x.doc.mode=_t(x.options,x.doc.modeOption),Rl(x)}function Rl(x){x.doc.iter(function(z){z.stateAfter&&(z.stateAfter=null),z.styles&&(z.styles=null)}),x.doc.modeFrontier=x.doc.highlightFrontier=x.doc.first,is(x,100),x.state.modeGen++,x.curOp&&fi(x)}function Yc(x,z){return z.from.ch==0&&z.to.ch==0&&Ft(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function ic(x,z,ne,te){function ie(Fr){return ne?ne[Fr]:null}function ue(Fr,kr,zr){er(Fr,kr,zr,te),Tn(Fr,"change",Fr,z)}function ve(Fr,kr){for(var zr=[],vi=Fr;vi<kr;++vi)zr.push(new Mn(Re[vi],ie(vi),te));return zr}var Ce=z.from,De=z.to,Re=z.text,ct=Ut(x,Ce.line),Ct=Ut(x,De.line),en=Ft(Re),jt=ie(Re.length-1),Fn=De.line-Ce.line;if(z.full)x.insert(0,ve(0,Re.length)),x.remove(Re.length,x.size-Re.length);else if(Yc(x,z)){var Jn=ve(0,Re.length-1);ue(Ct,Ct.text,jt),Fn&&x.remove(Ce.line,Fn),Jn.length&&x.insert(Ce.line,Jn)}else if(ct==Ct)if(Re.length==1)ue(ct,ct.text.slice(0,Ce.ch)+en+ct.text.slice(De.ch),jt);else{var yr=ve(1,Re.length-1);yr.push(new Mn(en+ct.text.slice(De.ch),jt,te)),ue(ct,ct.text.slice(0,Ce.ch)+Re[0],ie(0)),x.insert(Ce.line+1,yr)}else if(Re.length==1)ue(ct,ct.text.slice(0,Ce.ch)+Re[0]+Ct.text.slice(De.ch),ie(0)),x.remove(Ce.line+1,Fn);else{ue(ct,ct.text.slice(0,Ce.ch)+Re[0],ie(0)),ue(Ct,en+Ct.text.slice(De.ch),jt);var Ir=ve(1,Re.length-1);Fn>1&&x.remove(Ce.line+1,Fn-1),x.insert(Ce.line+1,Ir)}Tn(x,"change",x,z)}function Qs(x,z,ne){function te(ie,ue,ve){if(ie.linked)for(var Ce=0;Ce<ie.linked.length;++Ce){var De=ie.linked[Ce];if(De.doc!=ue){var Re=ve&&De.sharedHist;ne&&!Re||(z(De.doc,Re),te(De.doc,ie,Re))}}}te(x,null,!0)}function wu(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,lo(x),rc(x),Su(x),x.options.lineWrapping||yn(x),x.options.mode=z.modeOption,fi(x)}function Su(x){(x.doc.direction=="rtl"?hn:We)(x.display.lineDiv,"CodeMirror-rtl")}function ac(x){sa(x,function(){Su(x),fi(x)})}function Cu(x){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=x||1}function oc(x,z){var ne={from:xi(z.from),to:Js(z),text:Nn(x,z.from,z.to)};return cc(x,ne,z.from.line,z.to.line+1),Qs(x,function(te){return cc(te,ne,z.from.line,z.to.line+1)},!0),ne}function Jc(x){for(;x.length;){var z=Ft(x);if(z.ranges)x.pop();else break}}function sc(x,z){if(z)return Jc(x.done),Ft(x.done);if(x.done.length&&!Ft(x.done).ranges)return Ft(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),Ft(x.done)}function Mu(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ue=+new Date,ve,Ce;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>ue-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(ve=sc(ie,ie.lastOp==te)))Ce=Ft(ve.changes),Kn(z.from,z.to)==0&&Kn(z.from,Ce.to)==0?Ce.to=Js(z):ve.changes.push(oc(x,z));else{var De=Ft(ie.done);for((!De||!De.ranges)&&Eu(x.sel,ie.done),ve={changes:[oc(x,z)],generation:ie.generation},ie.done.push(ve);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=ue,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,Ce||kn(x,"historyAdded")}function lc(x,z,ne,te){var ie=z.charAt(0);return ie=="*"||ie=="+"&&ne.ranges.length==te.ranges.length&&ne.somethingSelected()==te.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function uc(x,z,ne,te){var ie=x.history,ue=te&&te.origin;ne==ie.lastSelOp||ue&&ie.lastSelOrigin==ue&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==ue||lc(x,ue,Ft(ie.done),z))?ie.done[ie.done.length-1]=z:Eu(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ue,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Jc(ie.undone)}function Eu(x,z){var ne=Ft(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function cc(x,z,ne,te){var ie=z["spans_"+x.id],ue=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(ve){ve.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ue]=ve.markedSpans),++ue})}function dc(x){if(!x)return null;for(var z,ne=0;ne<x.length;++ne)x[ne].marker.explicitlyCleared?z||(z=x.slice(0,ne)):z&&z.push(x[ne]);return z?z.length?z:null:x}function Xd(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(dc(ne[ie]));return te}function Qc(x,z){var ne=Xd(x,z),te=$r(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ue=ne[ie],ve=te[ie];if(ue&&ve)e:for(var Ce=0;Ce<ve.length;++Ce){for(var De=ve[Ce],Re=0;Re<ue.length;++Re)if(ue[Re].marker==De.marker)continue e;ue.push(De)}else ve&&(ne[ie]=ve)}return ne}function Bl(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.ranges){te.push(ne?vs.prototype.deepCopy.call(ue):ue);continue}var ve=ue.changes,Ce=[];te.push({changes:Ce});for(var De=0;De<ve.length;++De){var Re=ve[De],ct=void 0;if(Ce.push({from:Re.from,to:Re.to,text:Re.text}),z)for(var Ct in Re)(ct=Ct.match(/^spans_(\d+)$/))&&Pt(z,Number(ct[1]))>-1&&(Ft(Ce)[Ct]=Re[Ct],delete Re[Ct])}}return te}function fc(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ue=Kn(z,ie)<0;ue!=Kn(ne,ie)<0?(ie=z,z=ne):ue!=Kn(z,ne)<0&&(z=ne)}return new Va(ie,z)}else return new Va(ne||z,z)}function Nl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),To(x,new vs([fc(x.sel.primary(),z,ne,ie)],0),te)}function Hr(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),ue=0;ue<x.sel.ranges.length;ue++)te[ue]=fc(x.sel.ranges[ue],z[ue],null,ie);var ve=Es(x.cm,te,x.sel.primIndex);To(x,ve,ne)}function ws(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,To(x,Es(x.cm,ie,x.sel.primIndex),te)}function ed(x,z,ne,te){To(x,Ps(z,ne),te)}function qd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ue=0;ue<ie.length;ue++)this.ranges[ue]=new Va(cr(x,ie[ue].anchor),cr(x,ie[ue].head))},origin:ne&&ne.origin};return kn(x,"beforeSelectionChange",x,te),x.cm&&kn(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?Es(x.cm,te.ranges,te.ranges.length-1):z}function as(x,z,ne){var te=x.history.done,ie=Ft(te);ie&&ie.ranges?(te[te.length-1]=z,_u(x,z,ne)):To(x,z,ne)}function To(x,z,ne){_u(x,z,ne),uc(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function _u(x,z,ne){(ni(x,"beforeSelectionChange")||x.cm&&ni(x.cm,"beforeSelectionChange"))&&(z=qd(x,z,ne));var te=ne&&ne.bias||(Kn(z.primary().head,x.sel.primary().head)<0?-1:1);Yd(x,$l(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&zo(x.cm)}function Yd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Di(x.cm)),Tn(x,"cursorActivity",x))}function Jd(x){Yd(x,$l(x,x.sel,null,!1))}function $l(x,z,ne,te){for(var ie,ue=0;ue<z.ranges.length;ue++){var ve=z.ranges[ue],Ce=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ue],De=hc(x,ve.anchor,Ce&&Ce.anchor,ne,te),Re=hc(x,ve.head,Ce&&Ce.head,ne,te);(ie||De!=ve.anchor||Re!=ve.head)&&(ie||(ie=z.ranges.slice(0,ue)),ie[ue]=new Va(De,Re))}return ie?Es(x.cm,ie,z.primIndex):z}function os(x,z,ne,te,ie){var ue=Ut(x,z.line);if(ue.markedSpans)for(var ve=0;ve<ue.markedSpans.length;++ve){var Ce=ue.markedSpans[ve],De=Ce.marker,Re="selectLeft"in De?!De.selectLeft:De.inclusiveLeft,ct="selectRight"in De?!De.selectRight:De.inclusiveRight;if((Ce.from==null||(Re?Ce.from<=z.ch:Ce.from<z.ch))&&(Ce.to==null||(ct?Ce.to>=z.ch:Ce.to>z.ch))){if(ie&&(kn(De,"beforeCursorEnter"),De.explicitlyCleared))if(ue.markedSpans){--ve;continue}else break;if(!De.atomic)continue;if(ne){var Ct=De.find(te<0?1:-1),en=void 0;if((te<0?ct:Re)&&(Ct=el(x,Ct,-te,Ct&&Ct.line==z.line?ue:null)),Ct&&Ct.line==z.line&&(en=Kn(Ct,ne))&&(te<0?en<0:en>0))return os(x,Ct,z,te,ie)}var jt=De.find(te<0?-1:1);return(te<0?Re:ct)&&(jt=el(x,jt,te,jt.line==z.line?ue:null)),jt?os(x,jt,z,te,ie):null}}return z}function hc(x,z,ne,te,ie){var ue=te||1,ve=os(x,z,ne,ue,ie)||!ie&&os(x,z,ne,ue,!0)||os(x,z,ne,-ue,ie)||!ie&&os(x,z,ne,-ue,!0);return ve||(x.cantEdit=!0,cn(x.first,0))}function el(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?cr(x,cn(z.line-1)):null:ne>0&&z.ch==(te||Ut(x,z.line)).text.length?z.line<x.first+x.size-1?cn(z.line+1,0):null:new cn(z.line,z.ch+ne)}function td(x){x.setSelection(cn(x.firstLine(),0),cn(x.lastLine()),tt)}function pc(x,z,ne){var te={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return te.canceled=!0}};return ne&&(te.update=function(ie,ue,ve,Ce){ie&&(te.from=cr(x,ie)),ue&&(te.to=cr(x,ue)),ve&&(te.text=ve),Ce!==void 0&&(te.origin=Ce)}),kn(x,"beforeChange",x,te),x.cm&&kn(x.cm,"beforeChange",x.cm,te),te.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:te.from,to:te.to,text:te.text,origin:te.origin}}function dl(x,z,ne){if(x.cm){if(!x.cm.curOp)return za(x.cm,dl)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((ni(x,"beforeChange")||x.cm&&ni(x.cm,"beforeChange"))&&(z=pc(x,z,!0),!z))){var te=ha&&!ne&&ei(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)nd(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else nd(x,z)}}function nd(x,z){if(!(z.text.length==1&&z.text[0]==""&&Kn(z.from,z.to)==0)){var ne=tc(x,z);Mu(x,z,ne,x.cm?x.cm.curOp.id:NaN),Fl(x,z,ne,$r(x,z));var te=[];Qs(x,function(ie,ue){!ue&&Pt(te,ie.history)==-1&&(ku(ie.history,z),te.push(ie.history)),Fl(ie,z,null,$r(ie,z))})}}function tl(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ue,ve=x.sel,Ce=z=="undo"?ie.done:ie.undone,De=z=="undo"?ie.undone:ie.done,Re=0;Re<Ce.length&&(ue=Ce[Re],!(ne?ue.ranges&&!ue.equals(x.sel):!ue.ranges));Re++);if(Re!=Ce.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ue=Ce.pop(),ue.ranges){if(Eu(ue,De),ne&&!ue.equals(x.sel)){To(x,ue,{clearRedo:!1});return}ve=ue}else if(te){Ce.push(ue);return}else break;var ct=[];Eu(ve,De),De.push({changes:ct,generation:ie.generation}),ie.generation=ue.generation||++ie.maxGeneration;for(var Ct=ni(x,"beforeChange")||x.cm&&ni(x.cm,"beforeChange"),en=function(Jn){var yr=ue.changes[Jn];if(yr.origin=z,Ct&&!pc(x,yr,!1))return Ce.length=0,{};ct.push(oc(x,yr));var Ir=Jn?tc(x,yr):Ft(Ce);Fl(x,yr,Ir,Qc(x,yr)),!Jn&&x.cm&&x.cm.scrollIntoView({from:yr.from,to:Js(yr)});var Fr=[];Qs(x,function(kr,zr){!zr&&Pt(Fr,kr.history)==-1&&(ku(kr.history,yr),Fr.push(kr.history)),Fl(kr,yr,null,Qc(kr,yr))})},jt=ue.changes.length-1;jt>=0;--jt){var Fn=en(jt);if(Fn)return Fn.v}}}}function mc(x,z){if(z!=0&&(x.first+=z,x.sel=new vs(xn(x.sel.ranges,function(ie){return new Va(cn(ie.anchor.line+z,ie.anchor.ch),cn(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){fi(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Aa(x.cm,te,"gutter")}}function Fl(x,z,ne,te){if(x.cm&&!x.cm.curOp)return za(x.cm,Fl)(x,z,ne,te);if(z.to.line<x.first){mc(x,z.text.length-1-(z.to.line-z.from.line));return}if(!(z.from.line>x.lastLine())){if(z.from.line<x.first){var ie=z.text.length-1-(x.first-z.from.line);mc(x,ie),z={from:cn(x.first,0),to:cn(z.to.line+ie,z.to.ch),text:[Ft(z.text)],origin:z.origin}}var ue=x.lastLine();z.to.line>ue&&(z={from:z.from,to:cn(ue,Ut(x,ue).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Nn(x,z.from,z.to),ne||(ne=tc(x,z)),x.cm?Qd(x.cm,z,te):ic(x,z,te),_u(x,ne,tt),x.cantEdit&&hc(x,cn(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,ue=z.from,ve=z.to,Ce=!1,De=ue.line;x.options.lineWrapping||(De=jn(ft(Ut(te,ue.line))),te.iter(De,ve.line+1,function(jt){if(jt==ie.maxLine)return Ce=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Di(x),ic(te,z,ne,Ro(x)),x.options.lineWrapping||(te.iter(De,ue.line+z.text.length,function(jt){var Fn=rn(jt);Fn>ie.maxLineLength&&(ie.maxLine=jt,ie.maxLineLength=Fn,ie.maxLineChanged=!0,Ce=!1)}),Ce&&(x.curOp.updateMaxLine=!0)),Pa(te,ue.line),is(x,400);var Re=z.text.length-(ve.line-ue.line)-1;z.full?fi(x):ue.line==ve.line&&z.text.length==1&&!Yc(x.doc,z)?Aa(x,ue.line,"text"):fi(x,ue.line,ve.line+1,Re);var ct=ni(x,"changes"),Ct=ni(x,"change");if(Ct||ct){var en={from:ue,to:ve,text:z.text,removed:z.removed,origin:z.origin};Ct&&Tn(x,"change",x,en),ct&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(en)}x.display.selForContextMenu=null}function eu(x,z,ne,te,ie){var ue;te||(te=ne),Kn(te,ne)<0&&(ue=[te,ne],ne=ue[0],te=ue[1]),typeof z=="string"&&(z=x.splitLines(z)),dl(x,{from:ne,to:te,text:z,origin:ie})}function ef(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function tf(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ue=x[ie],ve=!0;if(ue.ranges){ue.copied||(ue=x[ie]=ue.deepCopy(),ue.copied=!0);for(var Ce=0;Ce<ue.ranges.length;Ce++)ef(ue.ranges[Ce].anchor,z,ne,te),ef(ue.ranges[Ce].head,z,ne,te);continue}for(var De=0;De<ue.changes.length;++De){var Re=ue.changes[De];if(ne<Re.from.line)Re.from=cn(Re.from.line+te,Re.from.ch),Re.to=cn(Re.to.line+te,Re.to.ch);else if(z<=Re.to.line){ve=!1;break}}ve||(x.splice(0,ie+1),ie=0)}}function ku(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;tf(x.done,ne,te,ie),tf(x.undone,ne,te,ie)}function Lu(x,z,ne,te){var ie=z,ue=z;return typeof z=="number"?ue=Ut(x,_i(x,z)):ie=jn(z),ie==null?null:(te(ue,ie)&&x.cm&&Aa(x.cm,ie,ne),ue)}function fl(x){this.lines=x,this.parent=null;for(var z=0,ne=0;ne<x.length;++ne)x[ne].parent=this,z+=x[ne].height;this.height=z}fl.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ne=x,te=x+z;ne<te;++ne){var ie=this.lines[ne];this.height-=ie.height,Hn(ie),Tn(ie,"delete")}this.lines.splice(x,z)},collapse:function(x){x.push.apply(x,this.lines)},insertInner:function(x,z,ne){this.height+=ne,this.lines=this.lines.slice(0,x).concat(z).concat(this.lines.slice(x));for(var te=0;te<z.length;++te)z[te].parent=this},iterN:function(x,z,ne){for(var te=x+z;x<te;++x)if(ne(this.lines[x]))return!0}};function tu(x){this.children=x;for(var z=0,ne=0,te=0;te<x.length;++te){var ie=x[te];z+=ie.chunkSize(),ne+=ie.height,ie.parent=this}this.size=z,this.height=ne,this.parent=null}tu.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var ne=0;ne<this.children.length;++ne){var te=this.children[ne],ie=te.chunkSize();if(x<ie){var ue=Math.min(z,ie-x),ve=te.height;if(te.removeInner(x,ue),this.height-=ve-te.height,ie==ue&&(this.children.splice(ne--,1),te.parent=null),(z-=ue)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof fl))){var Ce=[];this.collapse(Ce),this.children=[new fl(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],ue=ie.chunkSize();if(x<=ue){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var ve=ie.lines.length%25+25,Ce=ve;Ce<ie.lines.length;){var De=new fl(ie.lines.slice(Ce,Ce+=25));ie.height-=De.height,this.children.splice(++te,0,De),De.parent=this}ie.lines=ie.lines.slice(0,ve),this.maybeSpill()}break}x-=ue}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new tu(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=Pt(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new tu(x.children);te.parent=x,x.children=[te,ne],x=te}ne.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,ne){for(var te=0;te<this.children.length;++te){var ie=this.children[te],ue=ie.chunkSize();if(x<ue){var ve=Math.min(z,ue-x);if(ie.iterN(x,ve,ne))return!0;if((z-=ve)==0)break;x=0}else x-=ue}}};var nu=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};nu.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=jn(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 ue=mi(this);Vn(ne,Math.max(0,ne.height-ue)),x&&(sa(x,function(){nf(x,ne,-ue),Aa(x,te,"widget")}),Tn(x,"lineWidgetCleared",x,this,te))}},nu.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=mi(this)-z;ie&&(nr(this.doc,te)||Vn(te,te.height+ie),ne&&sa(ne,function(){ne.curOp.forceUpdate=!0,nf(ne,te,ie),Tn(ne,"lineWidgetChanged",ne,x,jn(te))}))},Xr(nu);function nf(x,z,ne){on(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&ms(x,ne)}function rf(x,z,ne,te){var ie=new nu(x,ne,te),ue=x.cm;return ue&&ie.noHScroll&&(ue.display.alignWidgets=!0),Lu(x,z,"widget",function(ve){var Ce=ve.widgets||(ve.widgets=[]);if(ie.insertAt==null?Ce.push(ie):Ce.splice(Math.min(Ce.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ve,ue&&!nr(x,ve)){var De=on(ve)<x.scrollTop;Vn(ve,ve.height+mi(ie)),De&&ms(ue,ie.height),ue.curOp.forceUpdate=!0}return!0}),ue&&Tn(ue,"lineWidgetAdded",ue,ie,typeof z=="number"?z:jn(z)),ie}var af=0,hl=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++af};hl.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ks(x),ni(this,"clear")){var ne=this.find();ne&&Tn(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ue=0;ue<this.lines.length;++ue){var ve=this.lines[ue],Ce=an(ve.markedSpans,this);x&&!this.collapsed?Aa(x,jn(ve),"text"):x&&(Ce.to!=null&&(ie=jn(ve)),Ce.from!=null&&(te=jn(ve))),ve.markedSpans=An(ve.markedSpans,Ce),Ce.from==null&&this.collapsed&&!nr(this.doc,ve)&&x&&Vn(ve,Ka(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var De=0;De<this.lines.length;++De){var Re=ft(this.lines[De]),ct=rn(Re);ct>x.display.maxLineLength&&(x.display.maxLine=Re,x.display.maxLineLength=ct,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&fi(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&Jd(x.doc)),x&&Tn(x,"markerCleared",x,this,te,ie),z&&Ds(x),this.parent&&this.parent.clear()}},hl.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ue=this.lines[ie],ve=an(ue.markedSpans,this);if(ve.from!=null&&(ne=cn(z?ue:jn(ue),ve.from),x==-1))return ne;if(ve.to!=null&&(te=cn(z?ue:jn(ue),ve.to),x==1))return te}return ne&&{from:ne,to:te}},hl.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||sa(te,function(){var ie=z.line,ue=jn(z.line),ve=Ji(te,ue);if(ve&&(Ei(ve),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!nr(ne.doc,ie)&&ne.height!=null){var Ce=ne.height;ne.height=null;var De=mi(ne)-Ce;De&&Vn(ie,ie.height+De)}Tn(te,"markerChanged",te,x)})},hl.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||Pt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},hl.prototype.detachLine=function(x){if(this.lines.splice(Pt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},Xr(hl);function nl(x,z,ne,te,ie){if(te&&te.shared)return co(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return za(x.cm,nl)(x,z,ne,te,ie);var ue=new hl(x,ie),ve=Kn(z,ne);if(te&&un(te,ue,!1),ve>0||ve==0&&ue.clearWhenEmpty!==!1)return ue;if(ue.replacedWith&&(ue.collapsed=!0,ue.widgetNode=At("span",[ue.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ue.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ue.widgetNode.insertLeft=!0)),ue.collapsed){if(it(x,z.line,z,ne,ue)||z.line!=ne.line&&it(x,ne.line,z,ne,ue))throw new Error("Inserting collapsed marker partially overlapping an existing one");mt()}ue.addToHistory&&Mu(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Ce=z.line,De=x.cm,Re;if(x.iter(Ce,ne.line+1,function(Ct){De&&ue.collapsed&&!De.options.lineWrapping&&ft(Ct)==De.display.maxLine&&(Re=!0),ue.collapsed&&Ce!=z.line&&Vn(Ct,0),Sr(Ct,new zt(ue,Ce==z.line?z.ch:null,Ce==ne.line?ne.ch:null)),++Ce}),ue.collapsed&&x.iter(z.line,ne.line+1,function(Ct){nr(x,Ct)&&Vn(Ct,0)}),ue.clearOnEnter&&tn(ue,"beforeCursorEnter",function(){return ue.clear()}),ue.readOnly&&(bt(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ue.collapsed&&(ue.id=++af,ue.atomic=!0),De){if(Re&&(De.curOp.updateMaxLine=!0),ue.collapsed)fi(De,z.line,ne.line+1);else if(ue.className||ue.startStyle||ue.endStyle||ue.css||ue.attributes||ue.title)for(var ct=z.line;ct<=ne.line;ct++)Aa(De,ct,"text");ue.atomic&&Jd(De.doc),Tn(De,"markerAdded",De,ue)}return ue}var ca=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Tn(this,"clear")}},ca.prototype.find=function(x,z){return this.primary.find(x,z)},Xr(ca);function co(x,z,ne,te,ie){te=un(te),te.shared=!1;var ue=[nl(x,z,ne,te,ie)],ve=ue[0],Ce=te.widgetNode;return Qs(x,function(De){Ce&&(te.widgetNode=Ce.cloneNode(!0)),ue.push(nl(De,cr(De,z),cr(De,ne),te,ie));for(var Re=0;Re<De.linked.length;++Re)if(De.linked[Re].isParent)return;ve=Ft(ue)}),new ca(ue,ve)}function pl(x){return x.findMarks(cn(x.first,0),x.clipPos(cn(x.lastLine())),function(z){return z.parent})}function of(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),ue=x.clipPos(ie.from),ve=x.clipPos(ie.to);if(Kn(ue,ve)){var Ce=nl(x,ue,ve,te.primary,te.primary.type);te.markers.push(Ce),Ce.parent=te}}}function Ss(x){for(var z=function(te){var ie=x[te],ue=[ie.primary.doc];Qs(ie.primary.doc,function(De){return ue.push(De)});for(var ve=0;ve<ie.markers.length;ve++){var Ce=ie.markers[ve];Pt(ue,Ce.doc)==-1&&(Ce.parent=null,ie.markers.splice(ve--,1))}},ne=0;ne<x.length;ne++)z(ne)}var sf=0,Eo=function(x,z,ne,te,ie){if(!(this instanceof Eo))return new Eo(x,z,ne,te,ie);ne==null&&(ne=0),tu.call(this,[new fl([new Mn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ue=cn(ne,0);this.sel=Ps(ue),this.history=new Cu(null),this.id=++sf,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),ic(this,{from:ue,to:ue,text:x}),To(this,Ps(ue),tt)};Eo.prototype=ce(tu.prototype,{constructor:Eo,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=hr(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:po(function(x){var z=cn(this.first,0),ne=this.first+this.size-1;dl(this,{from:z,to:cn(ne,Ut(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ts(this.cm,0,0),To(this,Ps(z),tt)}),replaceRange:function(x,z,ne,te){z=cr(this,z),ne=ne?cr(this,ne):z,eu(this,x,z,ne,te)},getRange:function(x,z,ne){var te=Nn(this,cr(this,x),cr(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(tr(this,x))return Ut(this,x)},getLineNumber:function(x){return jn(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=Ut(this,x)),ft(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return cr(this,x)},getCursor:function(x){var z=this.sel.primary(),ne;return x==null||x=="head"?ne=z.head:x=="anchor"?ne=z.anchor:x=="end"||x=="to"||x===!1?ne=z.to():ne=z.from(),ne},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:po(function(x,z,ne){ed(this,cr(this,typeof x=="number"?cn(x,z||0):x),null,ne)}),setSelection:po(function(x,z,ne){ed(this,cr(this,x),cr(this,z||x),ne)}),extendSelection:po(function(x,z,ne){Nl(this,cr(this,x),z&&cr(this,z),ne)}),extendSelections:po(function(x,z){Hr(this,wn(this,x),z)}),extendSelectionsBy:po(function(x,z){var ne=xn(this.sel.ranges,x);Hr(this,wn(this,ne),z)}),setSelections:po(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new Va(cr(this,x[ie].anchor),cr(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),To(this,Es(this.cm,te,z),ne)}}),addSelection:po(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new Va(cr(this,x),cr(this,z||x))),To(this,Es(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=Nn(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=Nn(this,ne[te].from(),ne[te].to());x!==!1&&(ie=ie.join(x||this.lineSeparator())),z[te]=ie}return z},replaceSelection:function(x,z,ne){for(var te=[],ie=0;ie<this.sel.ranges.length;ie++)te[ie]=x;this.replaceSelections(te,z,ne||"+input")},replaceSelections:po(function(x,z,ne){for(var te=[],ie=this.sel,ue=0;ue<ie.ranges.length;ue++){var ve=ie.ranges[ue];te[ue]={from:ve.from(),to:ve.to(),text:this.splitLines(x[ue]),origin:ne}}for(var Ce=z&&z!="end"&&nc(this,te,z),De=te.length-1;De>=0;De--)dl(this,te[De]);Ce?as(this,Ce):this.cm&&zo(this.cm)}),undo:po(function(){tl(this,"undo")}),redo:po(function(){tl(this,"redo")}),undoSelection:po(function(){tl(this,"undo",!0)}),redoSelection:po(function(){tl(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,ne=0,te=0;te<x.done.length;te++)x.done[te].ranges||++z;for(var ie=0;ie<x.undone.length;ie++)x.undone[ie].ranges||++ne;return{undo:z,redo:ne}},clearHistory:function(){var x=this;this.history=new Cu(this.history.maxGeneration),Qs(this,function(z){return z.history=x.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(x){return x&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(x){return this.history.generation==(x||this.cleanGeneration)},getHistory:function(){return{done:Bl(this.history.done),undone:Bl(this.history.undone)}},setHistory:function(x){var z=this.history=new Cu(this.history.maxGeneration);z.done=Bl(x.done.slice(0),null,!0),z.undone=Bl(x.undone.slice(0),null,!0)},setGutterMarker:po(function(x,z,ne){return Lu(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&oe(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:po(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Lu(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,oe(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!tr(this,x)||(z=x,x=Ut(this,x),!x))return null}else if(z=jn(x),z==null)return null;return{line:z,handle:x,text:x.text,gutterMarkers:x.gutterMarkers,textClass:x.textClass,bgClass:x.bgClass,wrapClass:x.wrapClass,widgets:x.widgets}},addLineClass:po(function(x,z,ne){return Lu(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!te[ie])te[ie]=ne;else{if(xe(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:po(function(x,z,ne){return Lu(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",ue=te[ie];if(ue)if(ne==null)te[ie]=null;else{var ve=ue.match(xe(ne));if(!ve)return!1;var Ce=ve.index+ve[0].length;te[ie]=ue.slice(0,ve.index)+(!ve.index||Ce==ue.length?"":" ")+ue.slice(Ce)||null}else return!1;return!0})}),addLineWidget:po(function(x,z,ne){return rf(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return nl(this,cr(this,x),cr(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=cr(this,x),nl(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=cr(this,x);var z=[],ne=Ut(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=cr(this,x),z=cr(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ue){var ve=ue.markedSpans;if(ve)for(var Ce=0;Ce<ve.length;Ce++){var De=ve[Ce];!(De.to!=null&&ie==x.line&&x.ch>=De.to||De.from==null&&ie!=x.line||De.from!=null&&ie==z.line&&De.from>=z.ch)&&(!ne||ne(De.marker))&&te.push(De.marker.parent||De.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 ue=ie.text.length+te;if(ue>x)return z=x,!0;x-=ue,++ne}),cr(this,cn(ne,z))},indexFromPos:function(x){x=cr(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 Eo(hr(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 Eo(hr(this,z,ne),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(te.history=this.history),(this.linked||(this.linked=[])).push({doc:te,sharedHist:x.sharedHist}),te.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],of(te,pl(this)),te},unlinkDoc:function(x){if(x instanceof Hi&&(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),Ss(pl(this));break}}if(x.history==this.history){var te=[x.id];Qs(x,function(ie){return te.push(ie.id)},!0),x.history=new Cu(null),x.history.done=Bl(this.history.done,te),x.history.undone=Bl(this.history.undone,te)}},iterLinkedDocs:function(x){Qs(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):Mt(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:po(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&ac(this.cm))})}),Eo.prototype.eachLine=Eo.prototype.iter;var rd=0;function eh(x){var z=this;if(ru(z),!(gr(z,x)||Oi(z.display,x))){Vr(x),ge&&(rd=+new Date);var ne=Ao(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ue=Array(ie),ve=0,Ce=function(){++ve==ie&&za(z,function(){ne=cr(z.doc,ne);var jt={from:ne,to:ne,text:z.doc.splitLines(ue.filter(function(Fn){return Fn!=null}).join(z.doc.lineSeparator())),origin:"paste"};dl(z.doc,jt),as(z.doc,Ps(cr(z.doc,ne),cr(z.doc,Js(jt))))})()},De=function(jt,Fn){if(z.options.allowDropFileTypes&&Pt(z.options.allowDropFileTypes,jt.type)==-1){Ce();return}var Jn=new FileReader;Jn.onerror=function(){return Ce()},Jn.onload=function(){var yr=Jn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(yr)){Ce();return}ue[Fn]=yr,Ce()},Jn.readAsText(jt)},Re=0;Re<te.length;Re++)De(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 ct=x.dataTransfer.getData("Text");if(ct){var Ct;if(z.state.draggingText&&!z.state.draggingText.copy&&(Ct=z.listSelections()),_u(z.doc,Ps(ne,ne)),Ct)for(var en=0;en<Ct.length;++en)eu(z.doc,"",Ct[en].anchor,Ct[en].head,"drag");z.replaceSelection(ct,"around","paste"),z.display.input.focus()}}catch(jt){}}}}function th(x,z){if(ge&&(!x.state.draggingText||+new Date-rd<100)){Ti(z);return}if(!(gr(x,z)||Oi(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!at)){var ne=vt("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Pe&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Pe&&ne.parentNode.removeChild(ne)}}function id(x,z){var ne=Ao(x,z);if(ne){var te=document.createDocumentFragment();Vi(x,ne,te),x.display.dragCursor||(x.display.dragCursor=vt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),Et(x.display.dragCursor,te)}}function ru(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function iu(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ne=[],te=0;te<z.length;te++){var ie=z[te].CodeMirror;ie&&ne.push(ie)}ne.length&&ne[0].operation(function(){for(var ue=0;ue<ne.length;ue++)x(ne[ue])})}}var dr=!1;function ad(){dr||(gc(),dr=!0)}function gc(){var x;tn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,iu(vc)},100))}),tn(window,"blur",function(){return iu(Fo)})}function vc(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Os={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Au=0;Au<10;Au++)Os[Au+48]=Os[Au+96]=String(Au);for(var yc=65;yc<=90;yc++)Os[yc]=String.fromCharCode(yc);for(var Tu=1;Tu<=12;Tu++)Os[Tu+111]=Os[Tu+63235]="F"+Tu;var Qa={};Qa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Qa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Qa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Qa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Qa.default=Ee?Qa.macDefault:Qa.pcDefault;function nh(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ue,ve=0;ve<z.length-1;ve++){var Ce=z[ve];if(/^(cmd|meta|m)$/i.test(Ce))ue=!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),ue&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function od(x){var z={};for(var ne in x)if(x.hasOwnProperty(ne)){var te=x[ne];if(/^(name|fallthrough|(de|at)tach)$/.test(ne))continue;if(te=="..."){delete x[ne];continue}for(var ie=xn(ne.split(" "),nh),ue=0;ue<ie.length;ue++){var ve=void 0,Ce=void 0;ue==ie.length-1?(Ce=ie.join(" "),ve=te):(Ce=ie.slice(0,ue+1).join(" "),ve="...");var De=z[Ce];if(!De)z[Ce]=ve;else if(De!=ve)throw new Error("Inconsistent bindings for "+Ce)}delete x[ne]}for(var Re in z)x[Re]=z[Re];return x}function rl(x,z,ne,te){z=ss(z);var ie=z.call?z.call(x,te):z[x];if(ie===!1)return"nothing";if(ie==="...")return"multi";if(ie!=null&&ne(ie))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return rl(x,z.fallthrough,ne,te);for(var ue=0;ue<z.fallthrough.length;ue++){var ve=rl(x,z.fallthrough[ue],ne,te);if(ve)return ve}}}function Iu(x){var z=typeof x=="string"?x:Os[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function ml(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(lt?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(lt?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function zl(x,z){if(Pe&&x.keyCode==34&&x.char)return!1;var ne=Os[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),ml(ne,x,z))}function ss(x){return typeof x=="string"?Qa[x]:x}function _s(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ue=z(ne[ie]);te.length&&Kn(ue.from,Ft(te).to)<=0;){var ve=te.pop();if(Kn(ve.from,ue.from)<0){ue.from=ve.from;break}}te.push(ue)}sa(x,function(){for(var Ce=te.length-1;Ce>=0;Ce--)eu(x.doc,"",te[Ce].from,te[Ce].to,"+delete");zo(x)})}function Zo(x,z,ne){var te=St(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Ws(x,z,ne){var te=Zo(x,z.ch,ne);return te==null?null:new cn(z.line,te,ne<0?"after":"before")}function Kl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ue=ar(ne,z.doc.direction);if(ue){var ve=ie<0?Ft(ue):ue[0],Ce=ie<0==(ve.level==1),De=Ce?"after":"before",Re;if(ve.level>0||z.doc.direction=="rtl"){var ct=Bi(z,ne);Re=ie<0?ne.text.length-1:0;var Ct=ti(z,ct,Re).top;Re=Tt(function(en){return ti(z,ct,en).top==Ct},ie<0==(ve.level==1)?ve.from:ve.to-1,Re),De=="before"&&(Re=Zo(ne,Re,1))}else Re=ie<0?ve.to:ve.from;return new cn(te,Re,De)}}return new cn(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Us(x,z,ne,te){var ie=ar(z,x.doc.direction);if(!ie)return Ws(z,ne,te);ne.ch>=z.text.length?(ne.ch=z.text.length,ne.sticky="before"):ne.ch<=0&&(ne.ch=0,ne.sticky="after");var ue=$t(ie,ne.ch,ne.sticky),ve=ie[ue];if(x.doc.direction=="ltr"&&ve.level%2==0&&(te>0?ve.to>ne.ch:ve.from<ne.ch))return Ws(z,ne,te);var Ce=function(Ir,Fr){return Zo(z,Ir instanceof cn?Ir.ch:Ir,Fr)},De,Re=function(Ir){return x.options.lineWrapping?(De=De||Bi(x,z),Fa(x,z,De,Ir)):{begin:0,end:z.text.length}},ct=Re(ne.sticky=="before"?Ce(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ve.level==1){var Ct=ve.level==1==te<0,en=Ce(ne,Ct?1:-1);if(en!=null&&(Ct?en<=ve.to&&en<=ct.end:en>=ve.from&&en>=ct.begin)){var jt=Ct?"before":"after";return new cn(ne.line,en,jt)}}var Fn=function(Ir,Fr,kr){for(var zr=function(to,Wo){return Wo?new cn(ne.line,Ce(to,1),"before"):new cn(ne.line,to,"after")};Ir>=0&&Ir<ie.length;Ir+=Fr){var vi=ie[Ir],wi=Fr>0==(vi.level!=1),da=wi?kr.begin:Ce(kr.end,-1);if(vi.from<=da&&da<vi.to||(da=wi?vi.from:Ce(vi.to,-1),kr.begin<=da&&da<kr.end))return zr(da,wi)}},Jn=Fn(ue+te,te,ct);if(Jn)return Jn;var yr=te>0?ct.end:Ce(ct.begin,-1);return yr!=null&&!(te>0&&yr==z.text.length)&&(Jn=Fn(te>0?0:ie.length-1,te,Re(yr)),Jn)?Jn:null}var au={selectAll:td,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),tt)},killLine:function(x){return _s(x,function(z){if(z.empty()){var ne=Ut(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:cn(z.head.line+1,0)}:{from:z.head,to:cn(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return _s(x,function(z){return{from:cn(z.from().line,0),to:cr(x.doc,cn(z.to().line+1,0))}})},delLineLeft:function(x){return _s(x,function(z){return{from:cn(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return _s(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return{from:te,to:z.from()}})},delWrappedLineRight:function(x){return _s(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div");return{from:z.from(),to:te}})},undo:function(x){return x.undo()},redo:function(x){return x.redo()},undoSelection:function(x){return x.undoSelection()},redoSelection:function(x){return x.redoSelection()},goDocStart:function(x){return x.extendSelection(cn(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(cn(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return sd(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return lf(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return ld(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div")},Ht)},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")},Ht)},goLineLeftSmart:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return te.ch<x.getLine(te.line).search(/\S/)?lf(x,z.head):te},Ht)},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 ue=ne[ie].from(),ve=Ze(x.getLine(ue.line),ue.ch,te);z.push(Gt(te-ve%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return sa(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ue=Ut(x.doc,ie.line).text;if(ue){if(ie.ch==ue.length&&(ie=new cn(ie.line,ie.ch-1)),ie.ch>0)ie=new cn(ie.line,ie.ch+1),x.replaceRange(ue.charAt(ie.ch-1)+ue.charAt(ie.ch-2),cn(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ve=Ut(x.doc,ie.line-1).text;ve&&(ie=new cn(ie.line,1),x.replaceRange(ue.charAt(0)+x.doc.lineSeparator()+ve.charAt(ve.length-1),cn(ie.line-1,ve.length-1),ie,"+transpose"))}}ne.push(new Va(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return sa(x,function(){for(var z=x.listSelections(),ne=z.length-1;ne>=0;ne--)x.replaceRange(x.doc.lineSeparator(),z[ne].anchor,z[ne].head,"+input");z=x.listSelections();for(var te=0;te<z.length;te++)x.indentLine(z[te].from().line,null,!0);zo(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function sd(x,z){var ne=Ut(x.doc,z),te=ft(ne);return te!=ne&&(z=jn(te)),Kl(!0,x,te,z,1)}function ld(x,z){var ne=Ut(x.doc,z),te=xt(ne);return te!=ne&&(z=jn(te)),Kl(!0,x,ne,z,-1)}function lf(x,z){var ne=sd(x,z.line),te=Ut(x.doc,ne.line),ie=ar(te,x.doc.direction);if(!ie||ie[0].level==0){var ue=Math.max(ne.ch,te.text.search(/\S/)),ve=z.line==ne.line&&z.ch<=ue&&z.ch;return cn(ne.line,ve?0:ue,ne.sticky)}return ne}function Io(x,z,ne){if(typeof z=="string"&&(z=au[z],!z))return!1;x.display.input.ensurePolled();var te=x.display.shift,ie=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ne&&(x.display.shift=!1),ie=z(x)!=nn}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function Vs(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=rl(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&rl(z,x.options.extraKeys,ne,x)||rl(z,x.options.keyMap,ne,x)}var rh=new Ae;function ou(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(Iu(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:rh.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),bc(x,ie+" "+z,ne,te))return!0}return bc(x,z,ne,te)}function bc(x,z,ne,te){var ie=Vs(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Tn(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Vr(ne),Qr(x)),!!ie}function Ea(x,z){var ne=zl(z,!0);return ne?z.shiftKey&&!x.state.keySeq?ou(x,"Shift-"+ne,z,function(te){return Io(x,te,!0)})||ou(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Io(x,te)}):ou(x,ne,z,function(te){return Io(x,te)}):!1}function su(x,z,ne){return ou(x,"'"+ne+"'",z,function(te){return Io(x,te,!0)})}var il=null;function Du(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=Lt(),!gr(z,x))){ge&&Te<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=Ea(z,x);Pe&&(il=te?ne:null,!te&&ne==88&&!_n&&(Ee?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),be&&!Ee&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&Bn(z)}}function Bn(x){var z=x.display.lineDiv;hn(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(We(z,"CodeMirror-crosshair"),Er(document,"keyup",ne),Er(document,"mouseover",ne))}tn(document,"keyup",ne),tn(document,"mouseover",ne)}function uf(x){x.keyCode==16&&(this.doc.sel.shift=!1),gr(this,x)}function cf(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(Oi(z.display,x)||gr(z,x)||x.ctrlKey&&!x.altKey||Ee&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Pe&&ne==il){il=null,Vr(x);return}if(!(Pe&&(!x.which||x.which<10)&&Ea(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(su(z,x,ie)||z.display.input.onKeyPress(x))}}}var ud=400,cd=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};cd.prototype.compare=function(x,z,ne){return this.time+ud>x&&Kn(z,this.pos)==0&&ne==this.button};var al,Pu;function ih(x,z){var ne=+new Date;return Pu&&Pu.compare(ne,x,z)?(al=Pu=null,"triple"):al&&al.compare(ne,x,z)?(Pu=new cd(ne,x,z),al=null,"double"):(al=new cd(ne,x,z),Pu=null,"single")}function jo(x){var z=this,ne=z.display;if(!(gr(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,Oi(ne,x)){Le||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!ts(z,x)){var te=Ao(z,x),ie=Lr(x),ue=te?ih(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&gl(z,ie,te,ue,x))&&(ie==1?te?wc(z,te,ue,x):Ii(x)==ne.scroller&&Vr(x):ie==2?(te&&Nl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(Me?z.display.input.onContextMenu(x):Ha(z)))}}}function gl(x,z,ne,te,ie){var ue="Click";return te=="double"?ue="Double"+ue:te=="triple"&&(ue="Triple"+ue),ue=(z==1?"Left":z==2?"Middle":"Right")+ue,ou(x,ml(ue,ie),ie,function(ve){if(typeof ve=="string"&&(ve=au[ve]),!ve)return!1;var Ce=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Ce=ve(x,ne)!=nn}finally{x.state.suppressEdits=!1}return Ce})}function xc(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ue=pt?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=ue?"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=Ee?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(Ee?ne.altKey:ne.ctrlKey)),ie}function wc(x,z,ne,te){ge?setTimeout(vn(si,x),0):x.curOp.focus=Lt();var ie=xc(x,ne,te),ue=x.doc.sel,ve;x.options.dragDrop&&Xi&&!x.isReadOnly()&&ne=="single"&&(ve=ue.contains(z))>-1&&(Kn((ve=ue.ranges[ve]).from(),z)<0||z.xRel>0)&&(Kn(ve.to(),z)>0||z.xRel<0)?ah(x,te,z,ie):dd(x,te,z,ie)}function ah(x,z,ne,te){var ie=x.display,ue=!1,ve=za(x,function(Re){Le&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Er(ie.wrapper.ownerDocument,"mouseup",ve),Er(ie.wrapper.ownerDocument,"mousemove",Ce),Er(ie.scroller,"dragstart",De),Er(ie.scroller,"drop",ve),ue||(Vr(Re),te.addNew||Nl(x.doc,ne,null,null,te.extend),Le&&!at||ge&&Te==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),Ce=function(Re){ue=ue||Math.abs(z.clientX-Re.clientX)+Math.abs(z.clientY-Re.clientY)>=10},De=function(){return ue=!0};Le&&(ie.scroller.draggable=!0),x.state.draggingText=ve,ve.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),tn(ie.wrapper.ownerDocument,"mouseup",ve),tn(ie.wrapper.ownerDocument,"mousemove",Ce),tn(ie.scroller,"dragstart",De),tn(ie.scroller,"drop",ve),Ha(x),setTimeout(function(){return ie.input.focus()},20)}function df(x,z,ne){if(ne=="char")return new Va(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new Va(cn(z.line,0),cr(x.doc,cn(z.line+1,0)));var te=ne(x,z);return new Va(te.from,te.to)}function dd(x,z,ne,te){var ie=x.display,ue=x.doc;Vr(z);var ve,Ce,De=ue.sel,Re=De.ranges;if(te.addNew&&!te.extend?(Ce=ue.sel.contains(ne),Ce>-1?ve=Re[Ce]:ve=new Va(ne,ne)):(ve=ue.sel.primary(),Ce=ue.sel.primIndex),te.unit=="rectangle")te.addNew||(ve=new Va(ne,ne)),ne=Ao(x,z,!0,!0),Ce=-1;else{var ct=df(x,ne,te.unit);te.extend?ve=fc(ve,ct.anchor,ct.head,te.extend):ve=ct}te.addNew?Ce==-1?(Ce=Re.length,To(ue,Es(x,Re.concat([ve]),Ce),{scroll:!1,origin:"*mouse"})):Re.length>1&&Re[Ce].empty()&&te.unit=="char"&&!te.extend?(To(ue,Es(x,Re.slice(0,Ce).concat(Re.slice(Ce+1)),0),{scroll:!1,origin:"*mouse"}),De=ue.sel):ws(ue,Ce,ve,ot):(Ce=0,To(ue,new vs([ve],0),ot),De=ue.sel);var Ct=ne;function en(kr){if(Kn(Ct,kr)!=0)if(Ct=kr,te.unit=="rectangle"){for(var zr=[],vi=x.options.tabSize,wi=Ze(Ut(ue,ne.line).text,ne.ch,vi),da=Ze(Ut(ue,kr.line).text,kr.ch,vi),to=Math.min(wi,da),Wo=Math.max(wi,da),bo=Math.min(ne.line,kr.line),cs=Math.min(x.lastLine(),Math.max(ne.line,kr.line));bo<=cs;bo++){var ds=Ut(ue,bo).text,Do=En(ds,to,vi);to==Wo?zr.push(new Va(cn(bo,Do),cn(bo,Do))):ds.length>Do&&zr.push(new Va(cn(bo,Do),cn(bo,En(ds,Wo,vi))))}zr.length||zr.push(new Va(ne,ne)),To(ue,Es(x,De.ranges.slice(0,Ce).concat(zr),Ce),{origin:"*mouse",scroll:!1}),x.scrollIntoView(kr)}else{var fs=ve,Zi=df(x,kr,te.unit),So=fs.anchor,xo;Kn(Zi.anchor,So)>0?(xo=Zi.head,So=Rr(fs.from(),Zi.anchor)):(xo=Zi.anchor,So=Zr(fs.to(),Zi.head));var Co=De.ranges.slice(0);Co[Ce]=ff(x,new Va(cr(ue,So),xo)),To(ue,Es(x,Co,Ce),ot)}}var jt=ie.wrapper.getBoundingClientRect(),Fn=0;function Jn(kr){var zr=++Fn,vi=Ao(x,kr,!0,te.unit=="rectangle");if(vi)if(Kn(vi,Ct)!=0){x.curOp.focus=Lt(),en(vi);var wi=ua(ie,ue);(vi.line>=wi.to||vi.line<wi.from)&&setTimeout(za(x,function(){Fn==zr&&Jn(kr)}),150)}else{var da=kr.clientY<jt.top?-20:kr.clientY>jt.bottom?20:0;da&&setTimeout(za(x,function(){Fn==zr&&(ie.scroller.scrollTop+=da,Jn(kr))}),50)}}function yr(kr){x.state.selectingText=!1,Fn=1/0,kr&&(Vr(kr),ie.input.focus()),Er(ie.wrapper.ownerDocument,"mousemove",Ir),Er(ie.wrapper.ownerDocument,"mouseup",Fr),ue.history.lastSelOrigin=null}var Ir=za(x,function(kr){kr.buttons===0||!Lr(kr)?yr(kr):Jn(kr)}),Fr=za(x,yr);x.state.selectingText=Fr,tn(ie.wrapper.ownerDocument,"mousemove",Ir),tn(ie.wrapper.ownerDocument,"mouseup",Fr)}function ff(x,z){var ne=z.anchor,te=z.head,ie=Ut(x.doc,ne.line);if(Kn(ne,te)==0&&ne.sticky==te.sticky)return z;var ue=ar(ie);if(!ue)return z;var ve=$t(ue,ne.ch,ne.sticky),Ce=ue[ve];if(Ce.from!=ne.ch&&Ce.to!=ne.ch)return z;var De=ve+(Ce.from==ne.ch==(Ce.level!=1)?0:1);if(De==0||De==ue.length)return z;var Re;if(te.line!=ne.line)Re=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var ct=$t(ue,te.ch,te.sticky),Ct=ct-ve||(te.ch-ne.ch)*(Ce.level==1?-1:1);ct==De-1||ct==De?Re=Ct<0:Re=Ct>0}var en=ue[De+(Re?-1:0)],jt=Re==(en.level==1),Fn=jt?en.from:en.to,Jn=jt?"after":"before";return ne.ch==Fn&&ne.sticky==Jn?z:new Va(new cn(ne.line,Fn,Jn),te)}function Ou(x,z,ne,te){var ie,ue;if(z.touches)ie=z.touches[0].clientX,ue=z.touches[0].clientY;else try{ie=z.clientX,ue=z.clientY}catch(en){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Vr(z);var ve=x.display,Ce=ve.lineDiv.getBoundingClientRect();if(ue>Ce.bottom||!ni(x,ne))return hi(z);ue-=Ce.top-ve.viewOffset;for(var De=0;De<x.display.gutterSpecs.length;++De){var Re=ve.gutters.childNodes[De];if(Re&&Re.getBoundingClientRect().right>=ie){var ct=Qn(x.doc,ue),Ct=x.display.gutterSpecs[De];return kn(x,ne,x,ct,Ct.className,z),hi(z)}}}function ts(x,z){return Ou(x,z,"gutterClick",!0)}function vl(x,z){Oi(x.display,z)||hf(x,z)||gr(x,z,"contextmenu")||Me||x.display.input.onContextMenu(z)}function hf(x,z){return ni(x,"gutterContextMenu")?Ou(x,z,"gutterContextMenu",!1):!1}function fd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Gr(x)}var yl={toString:function(){return"CodeMirror.Init"}},pf={},Sc={};function oh(x){var z=x.optionHandlers;function ne(te,ie,ue,ve){x.defaults[te]=ie,ue&&(z[te]=ve?function(Ce,De,Re){Re!=yl&&ue(Ce,De,Re)}:ue)}x.defineOption=ne,x.Init=yl,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,rc(te)},!0),ne("indentUnit",2,rc,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Rl(te),Gr(te),fi(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ue=[],ve=te.doc.first;te.doc.iter(function(De){for(var Re=0;;){var ct=De.text.indexOf(ie,Re);if(ct==-1)break;Re=ct+ie.length,ue.push(cn(ve,ct))}ve++});for(var Ce=ue.length-1;Ce>=0;Ce--)eu(te.doc,ie,ue[Ce],cn(ue[Ce].line,ue[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,ue){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),ue!=yl&&te.refresh()}),ne("specialCharPlaceholder",ze,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",Je?"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",!Kt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){fd(te),Ql(te)},!0),ne("keyMap","default",function(te,ie,ue){var ve=ss(ie),Ce=ue!=yl&&ss(ue);Ce&&Ce.detach&&Ce.detach(te,ve),ve.attach&&ve.attach(te,Ce||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,mf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=ec(ie,te.options.lineNumbers),Ql(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?Oo(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return xs(te)},!0),ne("scrollbarStyle","native",function(te){vu(te),xs(te),te.display.scrollbars.setScrollTop(te.doc.scrollTop),te.display.scrollbars.setScrollLeft(te.doc.scrollLeft)},!0),ne("lineNumbers",!1,function(te,ie){te.display.gutterSpecs=ec(te.options.gutters,ie),Ql(te)},!0),ne("firstLineNumber",1,Ql,!0),ne("lineNumberFormatter",function(te){return te},Ql,!0),ne("showCursorWhenSelecting",!1,Qo,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(Fo(te),te.display.input.blur()),te.display.input.readOnlyChanged(ie)}),ne("screenReaderLabel",null,function(te,ie){ie=ie===""?null:ie,te.display.input.screenReaderLabelChanged(ie)}),ne("disableInput",!1,function(te,ie){ie||te.display.input.reset()},!0),ne("dragDrop",!0,sh),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,Qo,!0),ne("singleCursorHeightPerLine",!0,Qo,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Rl,!0),ne("addModeClass",!1,Rl,!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,Rl,!0),ne("moveInputWithCursor",!0,function(te,ie){ie||te.display.input.resetPosition()}),ne("tabindex",null,function(te,ie){return te.display.input.getField().tabIndex=ie||""}),ne("autofocus",null),ne("direction","ltr",function(te,ie){return te.doc.setDirection(ie)},!0),ne("phrases",null)}function sh(x,z,ne){var te=ne&&ne!=yl;if(!z!=!te){var ie=x.display.dragFunctions,ue=z?tn:Er;ue(x.display.scroller,"dragstart",ie.start),ue(x.display.scroller,"dragenter",ie.enter),ue(x.display.scroller,"dragover",ie.over),ue(x.display.scroller,"dragleave",ie.leave),ue(x.display.scroller,"drop",ie.drop)}}function mf(x){x.options.lineWrapping?(hn(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(We(x.display.wrapper,"CodeMirror-wrap"),yn(x)),lo(x),fi(x),Gr(x),setTimeout(function(){return xs(x)},100)}function Hi(x,z){var ne=this;if(!(this instanceof Hi))return new Hi(x,z);this.options=z=z?un(z):{},un(pf,z,!1);var te=z.value;typeof te=="string"?te=new Eo(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new Hi.inputStyles[z.inputStyle](this),ue=this.display=new Gd(x,te,ie,z);ue.wrapper.CodeMirror=this,fd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ae,keySeq:null,specialChars:null},z.autofocus&&!Je&&ue.input.focus(),ge&&Te<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),ad(),Ks(this),this.curOp.forceUpdate=!0,wu(this,te),z.autofocus&&!Je||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&ja(ne)},20):Fo(this);for(var ve in Sc)Sc.hasOwnProperty(ve)&&Sc[ve](this,z[ve],yl);bu(this),z.finishInit&&z.finishInit(this);for(var Ce=0;Ce<hd.length;++Ce)hd[Ce](this);Ds(this),Le&&z.lineWrapping&&getComputedStyle(ue.lineDiv).textRendering=="optimizelegibility"&&(ue.lineDiv.style.textRendering="auto")}Hi.defaults=pf,Hi.optionHandlers=Sc;function lh(x){var z=x.display;tn(z.scroller,"mousedown",za(x,jo)),ge&&Te<11?tn(z.scroller,"dblclick",za(x,function(De){if(!gr(x,De)){var Re=Ao(x,De);if(!(!Re||ts(x,De)||Oi(x.display,De))){Vr(De);var ct=x.findWordAt(Re);Nl(x.doc,ct.anchor,ct.head)}}})):tn(z.scroller,"dblclick",function(De){return gr(x,De)||Vr(De)}),tn(z.scroller,"contextmenu",function(De){return vl(x,De)}),tn(z.input.getField(),"contextmenu",function(De){z.scroller.contains(De.target)||vl(x,De)});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 ue(De){if(De.touches.length!=1)return!1;var Re=De.touches[0];return Re.radiusX<=1&&Re.radiusY<=1}function ve(De,Re){if(Re.left==null)return!0;var ct=Re.left-De.left,Ct=Re.top-De.top;return ct*ct+Ct*Ct>20*20}tn(z.scroller,"touchstart",function(De){if(!gr(x,De)&&!ue(De)&&!ts(x,De)){z.input.ensurePolled(),clearTimeout(ne);var Re=+new Date;z.activeTouch={start:Re,moved:!1,prev:Re-te.end<=300?te:null},De.touches.length==1&&(z.activeTouch.left=De.touches[0].pageX,z.activeTouch.top=De.touches[0].pageY)}}),tn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),tn(z.scroller,"touchend",function(De){var Re=z.activeTouch;if(Re&&!Oi(z,De)&&Re.left!=null&&!Re.moved&&new Date-Re.start<300){var ct=x.coordsChar(z.activeTouch,"page"),Ct;!Re.prev||ve(Re,Re.prev)?Ct=new Va(ct,ct):!Re.prev.prev||ve(Re,Re.prev.prev)?Ct=x.findWordAt(ct):Ct=new Va(cn(ct.line,0),cr(x.doc,cn(ct.line+1,0))),x.setSelection(Ct.anchor,Ct.head),x.focus(),Vr(De)}ie()}),tn(z.scroller,"touchcancel",ie),tn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Ta(x,z.scroller.scrollTop),go(x,z.scroller.scrollLeft,!0),kn(x,"scroll",x))}),tn(z.scroller,"mousewheel",function(De){return Xc(x,De)}),tn(z.scroller,"DOMMouseScroll",function(De){return Xc(x,De)}),tn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(De){gr(x,De)||Ti(De)},over:function(De){gr(x,De)||(id(x,De),Ti(De))},start:function(De){return th(x,De)},drop:za(x,eh),leave:function(De){gr(x,De)||ru(x)}};var Ce=z.input.getField();tn(Ce,"keyup",function(De){return uf.call(x,De)}),tn(Ce,"keydown",za(x,Du)),tn(Ce,"keypress",za(x,cf)),tn(Ce,"focus",function(De){return ja(x,De)}),tn(Ce,"blur",function(De){return Fo(x,De)})}var hd=[];Hi.defineInitHook=function(x){return hd.push(x)};function Rs(x,z,ne,te){var ie=x.doc,ue;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ue=Pi(x,z).state:ne="prev");var ve=x.options.tabSize,Ce=Ut(ie,z),De=Ze(Ce.text,null,ve);Ce.stateAfter&&(Ce.stateAfter=null);var Re=Ce.text.match(/^\s*/)[0],ct;if(!te&&!/\S/.test(Ce.text))ct=0,ne="not";else if(ne=="smart"&&(ct=ie.mode.indent(ue,Ce.text.slice(Re.length),Ce.text),ct==nn||ct>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?ct=Ze(Ut(ie,z-1).text,null,ve):ct=0:ne=="add"?ct=De+x.options.indentUnit:ne=="subtract"?ct=De-x.options.indentUnit:typeof ne=="number"&&(ct=De+ne),ct=Math.max(0,ct);var Ct="",en=0;if(x.options.indentWithTabs)for(var jt=Math.floor(ct/ve);jt;--jt)en+=ve,Ct+=" ";if(en<ct&&(Ct+=Gt(ct-en)),Ct!=Re)return eu(ie,Ct,cn(z,0),cn(z,Re.length),"+input"),Ce.stateAfter=null,!0;for(var Fn=0;Fn<ie.sel.ranges.length;Fn++){var Jn=ie.sel.ranges[Fn];if(Jn.head.line==z&&Jn.head.ch<Re.length){var yr=cn(z,Re.length);ws(ie,Fn,new Va(yr,yr));break}}}var Bs=null;function bl(x){Bs=x}function pd(x,z,ne,te,ie){var ue=x.doc;x.display.shift=!1,te||(te=ue.sel);var ve=+new Date-200,Ce=ie=="paste"||x.state.pasteIncoming>ve,De=Mt(z),Re=null;if(Ce&&te.ranges.length>1)if(Bs&&Bs.text.join(`
|
|
|
`)==z){if(te.ranges.length%Bs.text.length==0){Re=[];for(var ct=0;ct<Bs.text.length;ct++)Re.push(ue.splitLines(Bs.text[ct]))}}else De.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Re=xn(De,function(Ir){return[Ir]}));for(var Ct=x.curOp.updateInput,en=te.ranges.length-1;en>=0;en--){var jt=te.ranges[en],Fn=jt.from(),Jn=jt.to();jt.empty()&&(ne&&ne>0?Fn=cn(Fn.line,Fn.ch-ne):x.state.overwrite&&!Ce?Jn=cn(Jn.line,Math.min(Ut(ue,Jn.line).text.length,Jn.ch+Ft(De).length)):Ce&&Bs&&Bs.lineWise&&Bs.text.join(`
|
|
|
`)==De.join(`
|
|
|
`)&&(Fn=Jn=cn(Fn.line,0)));var yr={from:Fn,to:Jn,text:Re?Re[en%Re.length]:De,origin:ie||(Ce?"paste":x.state.cutIncoming>ve?"cut":"+input")};dl(x.doc,yr),Tn(x,"inputRead",x,yr)}z&&!Ce&&gd(x,z),zo(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Ct),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function md(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&sa(z,function(){return pd(z,ne,0,null,"paste")}),!0}function gd(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ie=ne.ranges[te];if(!(ie.head.ch>100||te&&ne.ranges[te-1].head.line==ie.head.line)){var ue=x.getModeAt(ie.head),ve=!1;if(ue.electricChars){for(var Ce=0;Ce<ue.electricChars.length;Ce++)if(z.indexOf(ue.electricChars.charAt(Ce))>-1){ve=Rs(x,ie.head.line,"smart");break}}else ue.electricInput&&ue.electricInput.test(Ut(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ve=Rs(x,ie.head.line,"smart"));ve&&Tn(x,"electricInput",x,ie.head.line)}}}function lu(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,ue={anchor:cn(ie,0),head:cn(ie+1,0)};ne.push(ue),z.push(x.getRange(ue.anchor,ue.head))}return{text:z,ranges:ne}}function gf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function vd(){var x=vt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=vt("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Le?x.style.width="1000px":x.setAttribute("wrap","off"),nt&&(x.style.border="1px solid black"),gf(x),z}function yd(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ie){var ue=this.options,ve=ue[te];ue[te]==ie&&te!="mode"||(ue[te]=ie,z.hasOwnProperty(te)&&za(this,z[te])(this,ie,ve),kn(this,"optionChange",this,te))},getOption:function(te){return this.options[te]},getDoc:function(){return this.doc},addKeyMap:function(te,ie){this.state.keyMaps[ie?"push":"unshift"](ss(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ue=0;ue<ie.length;++ue)if(ie[ue]==te||ie[ue].name==te)return ie.splice(ue,1),!0},addOverlay:Ra(function(te,ie){var ue=te.token?te:x.getMode(this.options,te);if(ue.startState)throw new Error("Overlays may not be stateful.");gn(this.state.overlays,{mode:ue,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ve){return ve.priority}),this.state.modeGen++,fi(this)}),removeOverlay:Ra(function(te){for(var ie=this.state.overlays,ue=0;ue<ie.length;++ue){var ve=ie[ue].modeSpec;if(ve==te||typeof te=="string"&&ve.name==te){ie.splice(ue,1),this.state.modeGen++,fi(this);return}}}),indentLine:Ra(function(te,ie,ue){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),tr(this.doc,te)&&Rs(this,te,ie,ue)}),indentSelection:Ra(function(te){for(var ie=this.doc.sel.ranges,ue=-1,ve=0;ve<ie.length;ve++){var Ce=ie[ve];if(Ce.empty())Ce.head.line>ue&&(Rs(this,Ce.head.line,te,!0),ue=Ce.head.line,ve==this.doc.sel.primIndex&&zo(this));else{var De=Ce.from(),Re=Ce.to(),ct=Math.max(ue,De.line);ue=Math.min(this.lastLine(),Re.line-(Re.ch?0:1))+1;for(var Ct=ct;Ct<ue;++Ct)Rs(this,Ct,te);var en=this.doc.sel.ranges;De.ch==0&&ie.length==en.length&&en[ve].from().ch>0&&ws(this.doc,ve,new Va(De,en[ve].to()),tt)}}}),getTokenAt:function(te,ie){return _a(this,te,ie)},getLineTokens:function(te,ie){return _a(this,cn(te),ie,!0)},getTokenTypeAt:function(te){te=cr(this.doc,te);var ie=qi(this,Ut(this.doc,te.line)),ue=0,ve=(ie.length-1)/2,Ce=te.ch,De;if(Ce==0)De=ie[2];else for(;;){var Re=ue+ve>>1;if((Re?ie[Re*2-1]:0)>=Ce)ve=Re;else if(ie[Re*2+1]<Ce)ue=Re+1;else{De=ie[Re*2+2];break}}var ct=De?De.indexOf("overlay "):-1;return ct<0?De:ct==0?null:De.slice(0,ct-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 ue=[];if(!ne.hasOwnProperty(ie))return ue;var ve=ne[ie],Ce=this.getModeAt(te);if(typeof Ce[ie]=="string")ve[Ce[ie]]&&ue.push(ve[Ce[ie]]);else if(Ce[ie])for(var De=0;De<Ce[ie].length;De++){var Re=ve[Ce[ie][De]];Re&&ue.push(Re)}else Ce.helperType&&ve[Ce.helperType]?ue.push(ve[Ce.helperType]):ve[Ce.name]&&ue.push(ve[Ce.name]);for(var ct=0;ct<ve._global.length;ct++){var Ct=ve._global[ct];Ct.pred(Ce,this)&&Pt(ue,Ct.val)==-1&&ue.push(Ct.val)}return ue},getStateAfter:function(te,ie){var ue=this.doc;return te=_i(ue,te==null?ue.first+ue.size-1:te),Pi(this,te+1,ie).state},cursorCoords:function(te,ie){var ue,ve=this.doc.sel.primary();return te==null?ue=ve.head:typeof te=="object"?ue=cr(this.doc,te):ue=te?ve.from():ve.to(),ia(this,ue,ie||"page")},charCoords:function(te,ie){return Za(this,cr(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=Sa(this,te,ie||"page"),Ga(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=Sa(this,{top:te,left:0},ie||"page").top,Qn(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ue){var ve=!1,Ce;if(typeof te=="number"){var De=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>De&&(te=De,ve=!0),Ce=Ut(this.doc,te)}else Ce=te;return ma(this,Ce,{top:0,left:0},ie||"page",ue||ve).top+(ve?this.doc.height-on(Ce):0)},defaultTextHeight:function(){return Ka(this.display)},defaultCharWidth:function(){return io(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ue,ve,Ce){var De=this.display;te=ia(this,cr(this.doc,te));var Re=te.bottom,ct=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),De.sizer.appendChild(ie),ve=="over")Re=te.top;else if(ve=="above"||ve=="near"){var Ct=Math.max(De.wrapper.clientHeight,this.doc.height),en=Math.max(De.sizer.clientWidth,De.lineSpace.clientWidth);(ve=="above"||te.bottom+ie.offsetHeight>Ct)&&te.top>ie.offsetHeight?Re=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=Ct&&(Re=te.bottom),ct+ie.offsetWidth>en&&(ct=en-ie.offsetWidth)}ie.style.top=Re+"px",ie.style.left=ie.style.right="",Ce=="right"?(ct=De.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(Ce=="left"?ct=0:Ce=="middle"&&(ct=(De.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=ct+"px"),ue&&cl(this,{left:ct,top:Re,right:ct+ie.offsetWidth,bottom:Re+ie.offsetHeight})},triggerOnKeyDown:Ra(Du),triggerOnKeyPress:Ra(cf),triggerOnKeyUp:uf,triggerOnMouseDown:Ra(jo),execCommand:function(te){if(au.hasOwnProperty(te))return au[te].call(null,this)},triggerElectric:Ra(function(te){gd(this,te)}),findPosH:function(te,ie,ue,ve){var Ce=1;ie<0&&(Ce=-1,ie=-ie);for(var De=cr(this.doc,te),Re=0;Re<ie&&(De=Cc(this.doc,De,Ce,ue,ve),!De.hitSide);++Re);return De},moveH:Ra(function(te,ie){var ue=this;this.extendSelectionsBy(function(ve){return ue.display.shift||ue.doc.extend||ve.empty()?Cc(ue.doc,ve.head,te,ie,ue.options.rtlMoveVisually):te<0?ve.from():ve.to()},Ht)}),deleteH:Ra(function(te,ie){var ue=this.doc.sel,ve=this.doc;ue.somethingSelected()?ve.replaceSelection("",null,"+delete"):_s(this,function(Ce){var De=Cc(ve,Ce.head,te,ie,!1);return te<0?{from:De,to:Ce.head}:{from:Ce.head,to:De}})}),findPosV:function(te,ie,ue,ve){var Ce=1,De=ve;ie<0&&(Ce=-1,ie=-ie);for(var Re=cr(this.doc,te),ct=0;ct<ie;++ct){var Ct=ia(this,Re,"div");if(De==null?De=Ct.left:Ct.left=De,Re=vf(this,Ct,Ce,ue),Re.hitSide)break}return Re},moveV:Ra(function(te,ie){var ue=this,ve=this.doc,Ce=[],De=!this.display.shift&&!ve.extend&&ve.sel.somethingSelected();if(ve.extendSelectionsBy(function(ct){if(De)return te<0?ct.from():ct.to();var Ct=ia(ue,ct.head,"div");ct.goalColumn!=null&&(Ct.left=ct.goalColumn),Ce.push(Ct.left);var en=vf(ue,Ct,te,ie);return ie=="page"&&ct==ve.sel.primary()&&ms(ue,Za(ue,en,"div").top-Ct.top),en},Ht),Ce.length)for(var Re=0;Re<ve.sel.ranges.length;Re++)ve.sel.ranges[Re].goalColumn=Ce[Re]}),findWordAt:function(te){var ie=this.doc,ue=Ut(ie,te.line).text,ve=te.ch,Ce=te.ch;if(ue){var De=this.getHelper(te,"wordChars");(te.sticky=="before"||Ce==ue.length)&&ve?--ve:++Ce;for(var Re=ue.charAt(ve),ct=fe(Re,De)?function(Ct){return fe(Ct,De)}:/\s/.test(Re)?function(Ct){return/\s/.test(Ct)}:function(Ct){return!/\s/.test(Ct)&&!fe(Ct)};ve>0&&ct(ue.charAt(ve-1));)--ve;for(;Ce<ue.length&&ct(ue.charAt(Ce));)++Ce}return new Va(cn(te.line,ve),cn(te.line,Ce))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?hn(this.display.cursorDiv,"CodeMirror-overwrite"):We(this.display.cursorDiv,"CodeMirror-overwrite"),kn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Lt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ra(function(te,ie){Ts(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-Or(this)-this.display.barHeight,width:te.scrollWidth-Or(this)-this.display.barWidth,clientHeight:oi(this),clientWidth:jr(this)}},scrollIntoView:Ra(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:cn(te,0),to:null}:te.from==null&&(te={from:te,to:null}),te.to||(te.to=te.from),te.margin=ie||0,te.from.line!=null?Is(this,te):oo(this,te.from,te.to,te.margin)}),setSize:Ra(function(te,ie){var ue=this,ve=function(De){return typeof De=="number"||/^\d+$/.test(String(De))?De+"px":De};te!=null&&(this.display.wrapper.style.width=ve(te)),ie!=null&&(this.display.wrapper.style.height=ve(ie)),this.options.lineWrapping&&Ui(this);var Ce=this.display.viewFrom;this.doc.iter(Ce,this.display.viewTo,function(De){if(De.widgets){for(var Re=0;Re<De.widgets.length;Re++)if(De.widgets[Re].noHScroll){Aa(ue,Ce,"widget");break}}++Ce}),this.curOp.forceUpdate=!0,kn(this,"refresh",this)}),operation:function(te){return sa(this,te)},startOperation:function(){return Ks(this)},endOperation:function(){return Ds(this)},refresh:Ra(function(){var te=this.display.cachedTextHeight;fi(this),this.curOp.forceUpdate=!0,Gr(this),Ts(this,this.doc.scrollLeft,this.doc.scrollTop),Ju(this.display),(te==null||Math.abs(te-Ka(this.display))>.5||this.options.lineWrapping)&&lo(this),kn(this,"refresh",this)}),swapDoc:Ra(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),wu(this,te),Gr(this),this.display.input.reset(),Ts(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Tn(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}},Xr(x),x.registerHelper=function(te,ie,ue){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=ue},x.registerGlobalHelper=function(te,ie,ue,ve){x.registerHelper(te,ie,ve),ne[te]._global.push({pred:ue,val:ve})}}function Cc(x,z,ne,te,ie){var ue=z,ve=ne,Ce=Ut(x,z.line),De=ie&&x.direction=="rtl"?-ne:ne;function Re(){var Fr=z.line+De;return Fr<x.first||Fr>=x.first+x.size?!1:(z=new cn(Fr,z.ch,z.sticky),Ce=Ut(x,Fr))}function ct(Fr){var kr;if(te=="codepoint"){var zr=Ce.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(zr)?kr=null:kr=new cn(z.line,Math.max(0,Math.min(Ce.text.length,z.ch+ne*(zr>=55296&&zr<56320?2:1))),-ne)}else ie?kr=Us(x.cm,Ce,z,ne):kr=Ws(Ce,z,ne);if(kr==null)if(!Fr&&Re())z=Kl(ie,x.cm,Ce,z.line,De);else return!1;else z=kr;return!0}if(te=="char"||te=="codepoint")ct();else if(te=="column")ct(!0);else if(te=="word"||te=="group")for(var Ct=null,en=te=="group",jt=x.cm&&x.cm.getHelper(z,"wordChars"),Fn=!0;!(ne<0&&!ct(!Fn));Fn=!1){var Jn=Ce.text.charAt(z.ch)||`
|
|
|
`,yr=fe(Jn,jt)?"w":en&&Jn==`
|
|
|
`?"n":!en||/\s/.test(Jn)?null:"p";if(en&&!Fn&&!yr&&(yr="s"),Ct&&Ct!=yr){ne<0&&(ne=1,ct(),z.sticky="after");break}if(yr&&(Ct=yr),ne>0&&!ct(!Fn))break}var Ir=hc(x,z,ue,ve,!0);return pi(ue,Ir)&&(Ir.hitSide=!0),Ir}function vf(x,z,ne,te){var ie=x.doc,ue=z.left,ve;if(te=="page"){var Ce=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),De=Math.max(Ce-.5*Ka(x.display),3);ve=(ne>0?z.bottom:z.top)+ne*De}else te=="line"&&(ve=ne>0?z.bottom+3:z.top-3);for(var Re;Re=Ga(x,ue,ve),!!Re.outside;){if(ne<0?ve<=0:ve>=ie.height){Re.hitSide=!0;break}ve+=ne*5}return Re}var qa=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};qa.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;gf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ue(Ce){for(var De=Ce.target;De;De=De.parentNode){if(De==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(De.className))break}return!1}tn(ie,"paste",function(Ce){!ue(Ce)||gr(te,Ce)||md(Ce,te)||Te<=11&&setTimeout(za(te,function(){return z.updateFromDOM()}),20)}),tn(ie,"compositionstart",function(Ce){z.composing={data:Ce.data,done:!1}}),tn(ie,"compositionupdate",function(Ce){z.composing||(z.composing={data:Ce.data,done:!1})}),tn(ie,"compositionend",function(Ce){z.composing&&(Ce.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),tn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),tn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ve(Ce){if(!(!ue(Ce)||gr(te,Ce))){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()}),Ce.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var De=lu(te);bl({lineWise:!0,text:De.text}),Ce.type=="cut"&&te.operation(function(){te.setSelections(De.ranges,0,tt),te.replaceSelection("",null,"cut")})}else return;if(Ce.clipboardData){Ce.clipboardData.clearData();var Re=Bs.text.join(`
|
|
|
`);if(Ce.clipboardData.setData("Text",Re),Ce.clipboardData.getData("Text")==Re){Ce.preventDefault();return}}var ct=vd(),Ct=ct.firstChild;te.display.lineSpace.insertBefore(ct,te.display.lineSpace.firstChild),Ct.value=Bs.text.join(`
|
|
|
`);var en=document.activeElement;Yt(Ct),setTimeout(function(){te.display.lineSpace.removeChild(ct),en.focus(),en==ie&&ne.showPrimarySelection()},50)}}tn(ie,"copy",ve),tn(ie,"cut",ve)},qa.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var x=ps(this.cm,!1);return x.focus=document.activeElement==this.div,x},qa.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qa.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ne=z.doc.sel.primary(),te=ne.from(),ie=ne.to();if(z.display.viewTo==z.display.viewFrom||te.line>=z.display.viewTo||ie.line<z.display.viewFrom){x.removeAllRanges();return}var ue=Mc(z,x.anchorNode,x.anchorOffset),ve=Mc(z,x.focusNode,x.focusOffset);if(!(ue&&!ue.bad&&ve&&!ve.bad&&Kn(Rr(ue,ve),te)==0&&Kn(Zr(ue,ve),ie)==0)){var Ce=z.display.view,De=te.line>=z.display.viewFrom&&yf(z,te)||{node:Ce[0].measure.map[2],offset:0},Re=ie.line<z.display.viewTo&&yf(z,ie);if(!Re){var ct=Ce[Ce.length-1].measure,Ct=ct.maps?ct.maps[ct.maps.length-1]:ct.map;Re={node:Ct[Ct.length-1],offset:Ct[Ct.length-2]-Ct[Ct.length-3]}}if(!De||!Re){x.removeAllRanges();return}var en=x.rangeCount&&x.getRangeAt(0),jt;try{jt=Qe(De.node,De.offset,Re.offset,Re.node)}catch(Fn){}jt&&(!be&&z.state.focused?(x.collapse(De.node,De.offset),jt.collapsed||(x.removeAllRanges(),x.addRange(jt))):(x.removeAllRanges(),x.addRange(jt)),en&&x.anchorNode==null?x.addRange(en):be&&this.startGracePeriod()),this.rememberSelection()}},qa.prototype.startGracePeriod=function(){var x=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){x.gracePeriod=!1,x.selectionChanged()&&x.cm.operation(function(){return x.cm.curOp.selectionChanged=!0})},20)},qa.prototype.showMultipleSelections=function(x){Et(this.cm.display.cursorDiv,x.cursors),Et(this.cm.display.selectionDiv,x.selection)},qa.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},qa.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Bt(this.div,z)},qa.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},qa.prototype.blur=function(){this.div.blur()},qa.prototype.getField=function(){return this.div},qa.prototype.supportsTouch=function(){return!0},qa.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():sa(this.cm,function(){return x.cm.curOp.selectionChanged=!0});function z(){x.cm.state.focused&&(x.pollSelection(),x.polling.set(x.cm.options.pollInterval,z))}this.polling.set(this.cm.options.pollInterval,z)},qa.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},qa.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(rt&&me&&this.cm.display.gutterSpecs.length&&uh(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=Mc(z,x.anchorNode,x.anchorOffset),te=Mc(z,x.focusNode,x.focusOffset);ne&&te&&sa(z,function(){To(z.doc,Ps(ne,te),tt),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},qa.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var x=this.cm,z=x.display,ne=x.doc.sel.primary(),te=ne.from(),ie=ne.to();if(te.ch==0&&te.line>x.firstLine()&&(te=cn(te.line-1,Ut(x.doc,te.line-1).length)),ie.ch==Ut(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=cn(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ue,ve,Ce;te.line==z.viewFrom||(ue=Ki(x,te.line))==0?(ve=jn(z.view[0].line),Ce=z.view[0].node):(ve=jn(z.view[ue].line),Ce=z.view[ue-1].node.nextSibling);var De=Ki(x,ie.line),Re,ct;if(De==z.view.length-1?(Re=z.viewTo-1,ct=z.lineDiv.lastChild):(Re=jn(z.view[De+1].line)-1,ct=z.view[De+1].node.previousSibling),!Ce)return!1;for(var Ct=x.doc.splitLines(ch(x,Ce,ct,ve,Re)),en=Nn(x.doc,cn(ve,0),cn(Re,Ut(x.doc,Re).text.length));Ct.length>1&&en.length>1;)if(Ft(Ct)==Ft(en))Ct.pop(),en.pop(),Re--;else if(Ct[0]==en[0])Ct.shift(),en.shift(),ve++;else break;for(var jt=0,Fn=0,Jn=Ct[0],yr=en[0],Ir=Math.min(Jn.length,yr.length);jt<Ir&&Jn.charCodeAt(jt)==yr.charCodeAt(jt);)++jt;for(var Fr=Ft(Ct),kr=Ft(en),zr=Math.min(Fr.length-(Ct.length==1?jt:0),kr.length-(en.length==1?jt:0));Fn<zr&&Fr.charCodeAt(Fr.length-Fn-1)==kr.charCodeAt(kr.length-Fn-1);)++Fn;if(Ct.length==1&&en.length==1&&ve==te.line)for(;jt&&jt>te.ch&&Fr.charCodeAt(Fr.length-Fn-1)==kr.charCodeAt(kr.length-Fn-1);)jt--,Fn++;Ct[Ct.length-1]=Fr.slice(0,Fr.length-Fn).replace(/^\u200b+/,""),Ct[0]=Ct[0].slice(jt).replace(/\u200b+$/,"");var vi=cn(ve,jt),wi=cn(Re,en.length?Ft(en).length-Fn:0);if(Ct.length>1||Ct[0]||Kn(vi,wi))return eu(x.doc,Ct,vi,wi,"+input"),!0},qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},qa.prototype.reset=function(){this.forceCompositionEnd()},qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},qa.prototype.readFromDOMSoon=function(){var x=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(x.readDOMTimeout=null,x.composing)if(x.composing.done)x.composing=null;else return;x.updateFromDOM()},80))},qa.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&sa(this.cm,function(){return fi(x.cm)})},qa.prototype.setUneditable=function(x){x.contentEditable="false"},qa.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||za(this.cm,pd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},qa.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},qa.prototype.onContextMenu=function(){},qa.prototype.resetPosition=function(){},qa.prototype.needsContentAttribute=!0;function yf(x,z){var ne=Ji(x,z.line);if(!ne||ne.hidden)return null;var te=Ut(x.doc,z.line),ie=Na(ne,te,z.line),ue=ar(te,x.doc.direction),ve="left";if(ue){var Ce=$t(ue,z.ch);ve=Ce%2?"right":"left"}var De=ri(ie.map,z.ch,ve);return De.offset=De.collapse=="right"?De.end:De.start,De}function uh(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function uu(x,z){return z&&(x.bad=!0),x}function ch(x,z,ne,te,ie){var ue="",ve=!1,Ce=x.doc.lineSeparator(),De=!1;function Re(jt){return function(Fn){return Fn.id==jt}}function ct(){ve&&(ue+=Ce,De&&(ue+=Ce),ve=De=!1)}function Ct(jt){jt&&(ct(),ue+=jt)}function en(jt){if(jt.nodeType==1){var Fn=jt.getAttribute("cm-text");if(Fn){Ct(Fn);return}var Jn=jt.getAttribute("cm-marker"),yr;if(Jn){var Ir=x.findMarks(cn(te,0),cn(ie+1,0),Re(+Jn));Ir.length&&(yr=Ir[0].find(0))&&Ct(Nn(x.doc,yr.from,yr.to).join(Ce));return}if(jt.getAttribute("contenteditable")=="false")return;var Fr=/^(pre|div|p|li|table|br)$/i.test(jt.nodeName);if(!/^br$/i.test(jt.nodeName)&&jt.textContent.length==0)return;Fr&&ct();for(var kr=0;kr<jt.childNodes.length;kr++)en(jt.childNodes[kr]);/^(pre|p)$/i.test(jt.nodeName)&&(De=!0),Fr&&(ve=!0)}else jt.nodeType==3&&Ct(jt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;en(z),z!=ne;)z=z.nextSibling,De=!1;return ue}function Mc(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return uu(x.clipPos(cn(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 ue=x.display.view[ie];if(ue.node==te)return dh(ue,z,ne)}}function dh(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!Bt(te,z))return uu(cn(jn(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ue=x.rest?Ft(x.rest):x.line;return uu(cn(jn(ue),ue.text.length),ie)}var ve=z.nodeType==3?z:null,Ce=z;for(!ve&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ve=z.firstChild,ne&&(ne=ve.nodeValue.length));Ce.parentNode!=te;)Ce=Ce.parentNode;var De=x.measure,Re=De.maps;function ct(yr,Ir,Fr){for(var kr=-1;kr<(Re?Re.length:0);kr++)for(var zr=kr<0?De.map:Re[kr],vi=0;vi<zr.length;vi+=3){var wi=zr[vi+2];if(wi==yr||wi==Ir){var da=jn(kr<0?x.line:x.rest[kr]),to=zr[vi]+Fr;return(Fr<0||wi!=yr)&&(to=zr[vi+(Fr?1:0)]),cn(da,to)}}}var Ct=ct(ve,Ce,ne);if(Ct)return uu(Ct,ie);for(var en=Ce.nextSibling,jt=ve?ve.nodeValue.length-ne:0;en;en=en.nextSibling){if(Ct=ct(en,en.firstChild,0),Ct)return uu(cn(Ct.line,Ct.ch-jt),ie);jt+=en.textContent.length}for(var Fn=Ce.previousSibling,Jn=ne;Fn;Fn=Fn.previousSibling){if(Ct=ct(Fn,Fn.firstChild,-1),Ct)return uu(cn(Ct.line,Ct.ch+Jn),ie);Jn+=Fn.textContent.length}}var eo=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Ae,this.hasSelection=!1,this.composing=null};eo.prototype.init=function(x){var z=this,ne=this,te=this.cm;this.createField(x);var ie=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),nt&&(ie.style.width="0px"),tn(ie,"input",function(){ge&&Te>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),tn(ie,"paste",function(ve){gr(te,ve)||md(ve,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ue(ve){if(!gr(te,ve)){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Ce=lu(te);bl({lineWise:!0,text:Ce.text}),ve.type=="cut"?te.setSelections(Ce.ranges,null,tt):(ne.prevInput="",ie.value=Ce.text.join(`
|
|
|
`),Yt(ie))}else return;ve.type=="cut"&&(te.state.cutIncoming=+new Date)}}tn(ie,"cut",ue),tn(ie,"copy",ue),tn(x.scroller,"paste",function(ve){if(!(Oi(x,ve)||gr(te,ve))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Ce=new Event("paste");Ce.clipboardData=ve.clipboardData,ie.dispatchEvent(Ce)}}),tn(x.lineSpace,"selectstart",function(ve){Oi(x,ve)||Vr(ve)}),tn(ie,"compositionstart",function(){var ve=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:ve,range:te.markText(ve,te.getCursor("to"),{className:"CodeMirror-composing"})}}),tn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},eo.prototype.createField=function(x){this.wrapper=vd(),this.textarea=this.wrapper.firstChild},eo.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},eo.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=ps(x);if(x.options.moveInputWithCursor){var ie=ia(x,ne.sel.primary().head,"div"),ue=z.wrapper.getBoundingClientRect(),ve=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+ve.top-ue.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+ve.left-ue.left))}return te},eo.prototype.showSelection=function(x){var z=this.cm,ne=z.display;Et(ne.cursorDiv,x.cursors),Et(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},eo.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var ne=z.getSelection();this.textarea.value=ne,z.state.focused&&Yt(this.textarea),ge&&Te>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ge&&Te>=9&&(this.hasSelection=null))}},eo.prototype.getField=function(){return this.textarea},eo.prototype.supportsTouch=function(){return!1},eo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Je||Lt()!=this.textarea))try{this.textarea.focus()}catch(x){}},eo.prototype.blur=function(){this.textarea.blur()},eo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},eo.prototype.receivedFocus=function(){this.slowPoll()},eo.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},eo.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function ne(){var te=z.poll();!te&&!x?(x=!0,z.polling.set(60,ne)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,ne)},eo.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||Cn(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(ge&&Te>=9&&this.hasSelection===ie||Ee&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var ue=ie.charCodeAt(0);if(ue==8203&&!te&&(te="\u200B"),ue==8666)return this.reset(),this.cm.execCommand("undo")}for(var ve=0,Ce=Math.min(te.length,ie.length);ve<Ce&&te.charCodeAt(ve)==ie.charCodeAt(ve);)++ve;return sa(z,function(){pd(z,ie.slice(ve),te.length-ve,null,x.composing?"*compose":null),ie.length>1e3||ie.indexOf(`
|
|
|
`)>-1?ne.value=x.prevInput="":x.prevInput=ie,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},eo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},eo.prototype.onKeyPress=function(){ge&&Te>=9&&(this.hasSelection=null),this.fastPoll()},eo.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ue=Ao(ne,x),ve=te.scroller.scrollTop;if(!ue||Pe)return;var Ce=ne.options.resetSelectionOnContextMenu;Ce&&ne.doc.sel.contains(ue)==-1&&za(ne,To)(ne.doc,Ps(ue),tt);var De=ie.style.cssText,Re=z.wrapper.style.cssText,ct=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-ct.top-5)+"px; left: "+(x.clientX-ct.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ge?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ct;Le&&(Ct=window.scrollY),te.input.focus(),Le&&window.scrollTo(null,Ct),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=jt,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function en(){if(ie.selectionStart!=null){var Jn=ne.somethingSelected(),yr="\u200B"+(Jn?ie.value:"");ie.value="\u21DA",ie.value=yr,z.prevInput=Jn?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=yr.length,te.selForContextMenu=ne.doc.sel}}function jt(){if(z.contextMenuPending==jt&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Re,ie.style.cssText=De,ge&&Te<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ve),ie.selectionStart!=null)){(!ge||ge&&Te<9)&&en();var Jn=0,yr=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?za(ne,td)(ne):Jn++<10?te.detectingSelectAll=setTimeout(yr,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(yr,200)}}if(ge&&Te>=9&&en(),Me){Ti(x);var Fn=function(){Er(window,"mouseup",Fn),setTimeout(jt,20)};tn(window,"mouseup",Fn)}else setTimeout(jt,50)},eo.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},eo.prototype.setUneditable=function(){},eo.prototype.needsContentAttribute=!1;function Hl(x,z){if(z=z?un(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=Lt();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Ce.getValue()}var ie;if(x.form&&(tn(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ue=x.form;ie=ue.submit;try{var ve=ue.submit=function(){te(),ue.submit=ie,ue.submit(),ue.submit=ve}}catch(De){}}z.finishInit=function(De){De.save=te,De.getTextArea=function(){return x},De.toTextArea=function(){De.toTextArea=isNaN,te(),x.parentNode.removeChild(De.getWrapperElement()),x.style.display="",x.form&&(Er(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var Ce=Hi(function(De){return x.parentNode.insertBefore(De,x.nextSibling)},z);return Ce}function cu(x){x.off=Er,x.on=tn,x.wheelEventPixels=Gc,x.Doc=Eo,x.splitLines=Mt,x.countColumn=Ze,x.findColumn=En,x.isWordChar=he,x.Pass=nn,x.signal=kn,x.Line=Mn,x.changeEnd=Js,x.scrollbarModel=ql,x.Pos=cn,x.cmpPos=Kn,x.modes=Xn,x.mimeModes=sr,x.resolveMode=st,x.getMode=_t,x.modeExtensions=Nt,x.extendMode=He,x.copyState=gt,x.startState=It,x.innerMode=Rt,x.commands=au,x.keyMap=Qa,x.keyName=zl,x.isModifierKey=Iu,x.lookupKey=rl,x.normalizeKeyMap=od,x.StringStream=Zt,x.SharedTextMarker=ca,x.TextMarker=hl,x.LineWidget=nu,x.e_preventDefault=Vr,x.e_stopPropagation=Si,x.e_stop=Ti,x.addClass=hn,x.contains=Bt,x.rmClass=We,x.keyNames=Os}oh(Hi),yd(Hi);var ol="iter insert remove copy getEditor constructor".split(" ");for(var ks in Eo.prototype)Eo.prototype.hasOwnProperty(ks)&&Pt(ol,ks)<0&&(Hi.prototype[ks]=function(x){return function(){return x.apply(this.doc,arguments)}}(Eo.prototype[ks]));return Xr(Eo),Hi.inputStyles={textarea:eo,contenteditable:qa},Hi.defineMode=function(x){!Hi.defaults.mode&&x!="null"&&(Hi.defaults.mode=x),On.apply(this,arguments)},Hi.defineMIME=qe,Hi.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),Hi.defineMIME("text/plain","null"),Hi.defineExtension=function(x,z){Hi.prototype[x]=z},Hi.defineDocExtension=function(x,z){Eo.prototype[x]=z},Hi.fromTextArea=Hl,cu(Hi),Hi.version="5.58.2",Hi})},49047:function(mn,Vt,le){(function(be){be(le(4631),le(29589),le(52539))})(function(be){"use strict";be.defineMode("markdown",function(Ve,$e){var et=be.getMode(Ve,"text/html"),ge=et.name=="null";function Te(Ze){if(be.findModeByName){var Ae=be.findModeByName(Ze);Ae&&(Ze=Ae.mime||Ae.mimes[0])}var Pt=be.getMode(Ve,Ze);return Pt.name=="null"?null:Pt}$e.highlightFormatting===void 0&&($e.highlightFormatting=!1),$e.maxBlockquoteDepth===void 0&&($e.maxBlockquoteDepth=0),$e.taskLists===void 0&&($e.taskLists=!1),$e.strikethrough===void 0&&($e.strikethrough=!1),$e.emoji===void 0&&($e.emoji=!1),$e.fencedCodeBlockHighlighting===void 0&&($e.fencedCodeBlockHighlighting=!0),$e.fencedCodeBlockDefaultMode===void 0&&($e.fencedCodeBlockDefaultMode="text/plain"),$e.xml===void 0&&($e.xml=!0),$e.tokenTypeOverrides===void 0&&($e.tokenTypeOverrides={});var Le={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 Le)Le.hasOwnProperty(Se)&&$e.tokenTypeOverrides[Se]&&(Le[Se]=$e.tokenTypeOverrides[Se]);var me=/^([*\-_])(?:\s*\1){2,}\s*$/,Pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,at=/^\[(x| )\](?=\s)/i,Oe=$e.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ht=/^ {0,3}(?:\={1,}|-{2,})\s*$/,nt=/^[^#!\[\]*_\\<>` "'(~:]+/,rt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Je=/^\s*\[[^\]]+?\]:.*$/,Ee=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,pt=" ";function Kt(Ze,Ae,Pt){return Ae.f=Ae.inline=Pt,Pt(Ze,Ae)}function Ye(Ze,Ae,Pt){return Ae.f=Ae.block=Pt,Pt(Ze,Ae)}function lt(Ze){return!Ze||!/\S/.test(Ze.string)}function Me(Ze){if(Ze.linkTitle=!1,Ze.linkHref=!1,Ze.linkText=!1,Ze.em=!1,Ze.strong=!1,Ze.strikethrough=!1,Ze.quote=0,Ze.indentedCode=!1,Ze.f==We){var Ae=ge;if(!Ae){var Pt=be.innerMode(et,Ze.htmlState);Ae=Pt.mode.name=="xml"&&Pt.state.tagStart===null&&!Pt.state.context&&Pt.state.tokenize.isInText}Ae&&(Ze.f=At,Ze.block=xe,Ze.htmlState=null)}return Ze.trailingSpace=0,Ze.trailingSpaceNewLine=!1,Ze.prevLine=Ze.thisLine,Ze.thisLine={stream:null},null}function xe(Ze,Ae){var Pt=Ze.column()===Ae.indentation,bn=lt(Ae.prevLine.stream),nn=Ae.indentedCode,tt=Ae.prevLine.hr,ot=Ae.list!==!1,Ht=(Ae.listStack[Ae.listStack.length-1]||0)+3;Ae.indentedCode=!1;var En=Ae.indentation;if(Ae.indentationDiff===null&&(Ae.indentationDiff=Ae.indentation,ot)){for(Ae.list=null;En<Ae.listStack[Ae.listStack.length-1];)Ae.listStack.pop(),Ae.listStack.length?Ae.indentation=Ae.listStack[Ae.listStack.length-1]:Ae.list=!1;Ae.list!==!1&&(Ae.indentationDiff=En-Ae.listStack[Ae.listStack.length-1])}var fn=!bn&&!tt&&!Ae.prevLine.header&&(!ot||!nn)&&!Ae.prevLine.fencedCodeEnd,Gt=(Ae.list===!1||tt||bn)&&Ae.indentation<=Ht&&Ze.match(me),Ft=null;if(Ae.indentationDiff>=4&&(nn||Ae.prevLine.fencedCodeEnd||Ae.prevLine.header||bn))return Ze.skipToEnd(),Ae.indentedCode=!0,Le.code;if(Ze.eatSpace())return null;if(Pt&&Ae.indentation<=Ht&&(Ft=Ze.match(Oe))&&Ft[1].length<=6)return Ae.quote=0,Ae.header=Ft[1].length,Ae.thisLine.header=!0,$e.highlightFormatting&&(Ae.formatting="header"),Ae.f=Ae.inline,Et(Ae);if(Ae.indentation<=Ht&&Ze.eat(">"))return Ae.quote=Pt?1:Ae.quote+1,$e.highlightFormatting&&(Ae.formatting="quote"),Ze.eatSpace(),Et(Ae);if(!Gt&&!Ae.setext&&Pt&&Ae.indentation<=Ht&&(Ft=Ze.match(Pe))){var xn=Ft[1]?"ol":"ul";return Ae.indentation=En+Ze.current().length,Ae.list=!0,Ae.quote=0,Ae.listStack.push(Ae.indentation),Ae.em=!1,Ae.strong=!1,Ae.code=!1,Ae.strikethrough=!1,$e.taskLists&&Ze.match(at,!1)&&(Ae.taskList=!0),Ae.f=Ae.inline,$e.highlightFormatting&&(Ae.formatting=["list","list-"+xn]),Et(Ae)}else{if(Pt&&Ae.indentation<=Ht&&(Ft=Ze.match(rt,!0)))return Ae.quote=0,Ae.fencedEndRE=new RegExp(Ft[1]+"+ *$"),Ae.localMode=$e.fencedCodeBlockHighlighting&&Te(Ft[2]||$e.fencedCodeBlockDefaultMode),Ae.localMode&&(Ae.localState=be.startState(Ae.localMode)),Ae.f=Ae.block=je,$e.highlightFormatting&&(Ae.formatting="code-block"),Ae.code=-1,Et(Ae);if(Ae.setext||(!fn||!ot)&&!Ae.quote&&Ae.list===!1&&!Ae.code&&!Gt&&!Je.test(Ze.string)&&(Ft=Ze.lookAhead(1))&&(Ft=Ft.match(ht)))return Ae.setext?(Ae.header=Ae.setext,Ae.setext=0,Ze.skipToEnd(),$e.highlightFormatting&&(Ae.formatting="header")):(Ae.header=Ft[0].charAt(0)=="="?1:2,Ae.setext=Ae.header),Ae.thisLine.header=!0,Ae.f=Ae.inline,Et(Ae);if(Gt)return Ze.skipToEnd(),Ae.hr=!0,Ae.thisLine.hr=!0,Le.hr;if(Ze.peek()==="[")return Kt(Ze,Ae,ut)}return Kt(Ze,Ae,Ae.inline)}function We(Ze,Ae){var Pt=et.token(Ze,Ae.htmlState);if(!ge){var bn=be.innerMode(et,Ae.htmlState);(bn.mode.name=="xml"&&bn.state.tagStart===null&&!bn.state.context&&bn.state.tokenize.isInText||Ae.md_inside&&Ze.current().indexOf(">")>-1)&&(Ae.f=At,Ae.block=xe,Ae.htmlState=null)}return Pt}function je(Ze,Ae){var Pt=Ae.listStack[Ae.listStack.length-1]||0,bn=Ae.indentation<Pt,nn=Pt+3;if(Ae.fencedEndRE&&Ae.indentation<=nn&&(bn||Ze.match(Ae.fencedEndRE))){$e.highlightFormatting&&(Ae.formatting="code-block");var tt;return bn||(tt=Et(Ae)),Ae.localMode=Ae.localState=null,Ae.block=xe,Ae.f=At,Ae.fencedEndRE=null,Ae.code=0,Ae.thisLine.fencedCodeEnd=!0,bn?Ye(Ze,Ae,Ae.block):tt}else return Ae.localMode?Ae.localMode.token(Ze,Ae.localState):(Ze.skipToEnd(),Le.code)}function Et(Ze){var Ae=[];if(Ze.formatting){Ae.push(Le.formatting),typeof Ze.formatting=="string"&&(Ze.formatting=[Ze.formatting]);for(var Pt=0;Pt<Ze.formatting.length;Pt++)Ae.push(Le.formatting+"-"+Ze.formatting[Pt]),Ze.formatting[Pt]==="header"&&Ae.push(Le.formatting+"-"+Ze.formatting[Pt]+"-"+Ze.header),Ze.formatting[Pt]==="quote"&&(!$e.maxBlockquoteDepth||$e.maxBlockquoteDepth>=Ze.quote?Ae.push(Le.formatting+"-"+Ze.formatting[Pt]+"-"+Ze.quote):Ae.push("error"))}if(Ze.taskOpen)return Ae.push("meta"),Ae.length?Ae.join(" "):null;if(Ze.taskClosed)return Ae.push("property"),Ae.length?Ae.join(" "):null;if(Ze.linkHref?Ae.push(Le.linkHref,"url"):(Ze.strong&&Ae.push(Le.strong),Ze.em&&Ae.push(Le.em),Ze.strikethrough&&Ae.push(Le.strikethrough),Ze.emoji&&Ae.push(Le.emoji),Ze.linkText&&Ae.push(Le.linkText),Ze.code&&Ae.push(Le.code),Ze.image&&Ae.push(Le.image),Ze.imageAltText&&Ae.push(Le.imageAltText,"link"),Ze.imageMarker&&Ae.push(Le.imageMarker)),Ze.header&&Ae.push(Le.header,Le.header+"-"+Ze.header),Ze.quote&&(Ae.push(Le.quote),!$e.maxBlockquoteDepth||$e.maxBlockquoteDepth>=Ze.quote?Ae.push(Le.quote+"-"+Ze.quote):Ae.push(Le.quote+"-"+$e.maxBlockquoteDepth)),Ze.list!==!1){var bn=(Ze.listStack.length-1)%3;bn?bn===1?Ae.push(Le.list2):Ae.push(Le.list3):Ae.push(Le.list1)}return Ze.trailingSpaceNewLine?Ae.push("trailing-space-new-line"):Ze.trailingSpace&&Ae.push("trailing-space-"+(Ze.trailingSpace%2?"a":"b")),Ae.length?Ae.join(" "):null}function vt(Ze,Ae){if(Ze.match(nt,!0))return Et(Ae)}function At(Ze,Ae){var Pt=Ae.text(Ze,Ae);if(typeof Pt!="undefined")return Pt;if(Ae.list)return Ae.list=null,Et(Ae);if(Ae.taskList){var bn=Ze.match(at,!0)[1]===" ";return bn?Ae.taskOpen=!0:Ae.taskClosed=!0,$e.highlightFormatting&&(Ae.formatting="task"),Ae.taskList=!1,Et(Ae)}if(Ae.taskOpen=!1,Ae.taskClosed=!1,Ae.header&&Ze.match(/^#+$/,!0))return $e.highlightFormatting&&(Ae.formatting="header"),Et(Ae);var nn=Ze.next();if(Ae.linkTitle){Ae.linkTitle=!1;var tt=nn;nn==="("&&(tt=")"),tt=(tt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ot="^\\s*(?:[^"+tt+"\\\\]+|\\\\\\\\|\\\\.)"+tt;if(Ze.match(new RegExp(ot),!0))return Le.linkHref}if(nn==="`"){var Ht=Ae.formatting;$e.highlightFormatting&&(Ae.formatting="code"),Ze.eatWhile("`");var En=Ze.current().length;if(Ae.code==0&&(!Ae.quote||En==1))return Ae.code=En,Et(Ae);if(En==Ae.code){var fn=Et(Ae);return Ae.code=0,fn}else return Ae.formatting=Ht,Et(Ae)}else if(Ae.code)return Et(Ae);if(nn==="\\"&&(Ze.next(),$e.highlightFormatting)){var Gt=Et(Ae),Ft=Le.formatting+"-escape";return Gt?Gt+" "+Ft:Ft}if(nn==="!"&&Ze.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ae.imageMarker=!0,Ae.image=!0,$e.highlightFormatting&&(Ae.formatting="image"),Et(Ae);if(nn==="["&&Ae.imageMarker&&Ze.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ae.imageMarker=!1,Ae.imageAltText=!0,$e.highlightFormatting&&(Ae.formatting="image"),Et(Ae);if(nn==="]"&&Ae.imageAltText){$e.highlightFormatting&&(Ae.formatting="image");var Gt=Et(Ae);return Ae.imageAltText=!1,Ae.image=!1,Ae.inline=Ae.f=Bt,Gt}if(nn==="["&&!Ae.image)return Ae.linkText&&Ze.match(/^.*?\]/)||(Ae.linkText=!0,$e.highlightFormatting&&(Ae.formatting="link")),Et(Ae);if(nn==="]"&&Ae.linkText){$e.highlightFormatting&&(Ae.formatting="link");var Gt=Et(Ae);return Ae.linkText=!1,Ae.inline=Ae.f=Ze.match(/\(.*?\)| ?\[.*?\]/,!1)?Bt:At,Gt}if(nn==="<"&&Ze.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ae.f=Ae.inline=Qe,$e.highlightFormatting&&(Ae.formatting="link");var Gt=Et(Ae);return Gt?Gt+=" ":Gt="",Gt+Le.linkInline}if(nn==="<"&&Ze.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ae.f=Ae.inline=Qe,$e.highlightFormatting&&(Ae.formatting="link");var Gt=Et(Ae);return Gt?Gt+=" ":Gt="",Gt+Le.linkEmail}if($e.xml&&nn==="<"&&Ze.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var xn=Ze.string.indexOf(">",Ze.pos);if(xn!=-1){var gn=Ze.string.substring(Ze.start,xn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(gn)&&(Ae.md_inside=!0)}return Ze.backUp(1),Ae.htmlState=be.startState(et),Ye(Ze,Ae,We)}if($e.xml&&nn==="<"&&Ze.match(/^\/\w*?>/))return Ae.md_inside=!1,"tag";if(nn==="*"||nn==="_"){for(var _e=1,ce=Ze.pos==1?" ":Ze.string.charAt(Ze.pos-2);_e<3&&Ze.eat(nn);)_e++;var se=Ze.peek()||" ",he=!/\s/.test(se)&&(!Ee.test(se)||/\s/.test(ce)||Ee.test(ce)),fe=!/\s/.test(ce)&&(!Ee.test(ce)||/\s/.test(se)||Ee.test(se)),oe=null,ke=null;if(_e%2&&(!Ae.em&&he&&(nn==="*"||!fe||Ee.test(ce))?oe=!0:Ae.em==nn&&fe&&(nn==="*"||!he||Ee.test(se))&&(oe=!1)),_e>1&&(!Ae.strong&&he&&(nn==="*"||!fe||Ee.test(ce))?ke=!0:Ae.strong==nn&&fe&&(nn==="*"||!he||Ee.test(se))&&(ke=!1)),ke!=null||oe!=null){$e.highlightFormatting&&(Ae.formatting=oe==null?"strong":ke==null?"em":"strong em"),oe===!0&&(Ae.em=nn),ke===!0&&(Ae.strong=nn);var fn=Et(Ae);return oe===!1&&(Ae.em=!1),ke===!1&&(Ae.strong=!1),fn}}else if(nn===" "&&(Ze.eat("*")||Ze.eat("_"))){if(Ze.peek()===" ")return Et(Ae);Ze.backUp(1)}if($e.strikethrough){if(nn==="~"&&Ze.eatWhile(nn)){if(Ae.strikethrough){$e.highlightFormatting&&(Ae.formatting="strikethrough");var fn=Et(Ae);return Ae.strikethrough=!1,fn}else if(Ze.match(/^[^\s]/,!1))return Ae.strikethrough=!0,$e.highlightFormatting&&(Ae.formatting="strikethrough"),Et(Ae)}else if(nn===" "&&Ze.match(/^~~/,!0)){if(Ze.peek()===" ")return Et(Ae);Ze.backUp(2)}}if($e.emoji&&nn===":"&&Ze.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ae.emoji=!0,$e.highlightFormatting&&(Ae.formatting="emoji");var Ge=Et(Ae);return Ae.emoji=!1,Ge}return nn===" "&&(Ze.match(/^ +$/,!1)?Ae.trailingSpace++:Ae.trailingSpace&&(Ae.trailingSpaceNewLine=!0)),Et(Ae)}function Qe(Ze,Ae){var Pt=Ze.next();if(Pt===">"){Ae.f=Ae.inline=At,$e.highlightFormatting&&(Ae.formatting="link");var bn=Et(Ae);return bn?bn+=" ":bn="",bn+Le.linkInline}return Ze.match(/^[^>]+/,!0),Le.linkInline}function Bt(Ze,Ae){if(Ze.eatSpace())return null;var Pt=Ze.next();return Pt==="("||Pt==="["?(Ae.f=Ae.inline=hn(Pt==="("?")":"]"),$e.highlightFormatting&&(Ae.formatting="link-string"),Ae.linkHref=!0,Et(Ae)):"error"}var Lt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function hn(Ze){return function(Ae,Pt){var bn=Ae.next();if(bn===Ze){Pt.f=Pt.inline=At,$e.highlightFormatting&&(Pt.formatting="link-string");var nn=Et(Pt);return Pt.linkHref=!1,nn}return Ae.match(Lt[Ze]),Pt.linkHref=!0,Et(Pt)}}function ut(Ze,Ae){return Ze.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ae.f=Yt,Ze.next(),$e.highlightFormatting&&(Ae.formatting="link"),Ae.linkText=!0,Et(Ae)):Kt(Ze,Ae,At)}function Yt(Ze,Ae){if(Ze.match(/^\]:/,!0)){Ae.f=Ae.inline=vn,$e.highlightFormatting&&(Ae.formatting="link");var Pt=Et(Ae);return Ae.linkText=!1,Pt}return Ze.match(/^([^\]\\]|\\.)+/,!0),Le.linkText}function vn(Ze,Ae){return Ze.eatSpace()?null:(Ze.match(/^[^\s]+/,!0),Ze.peek()===void 0?Ae.linkTitle=!0:Ze.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ae.f=Ae.inline=At,Le.linkHref+" url")}var un={startState:function(){return{f:xe,prevLine:{stream:null},thisLine:{stream:null},block:xe,htmlState:null,indentation:0,inline:At,text:vt,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(Ze){return{f:Ze.f,prevLine:Ze.prevLine,thisLine:Ze.thisLine,block:Ze.block,htmlState:Ze.htmlState&&be.copyState(et,Ze.htmlState),indentation:Ze.indentation,localMode:Ze.localMode,localState:Ze.localMode?be.copyState(Ze.localMode,Ze.localState):null,inline:Ze.inline,text:Ze.text,formatting:!1,linkText:Ze.linkText,linkTitle:Ze.linkTitle,linkHref:Ze.linkHref,code:Ze.code,em:Ze.em,strong:Ze.strong,strikethrough:Ze.strikethrough,emoji:Ze.emoji,header:Ze.header,setext:Ze.setext,hr:Ze.hr,taskList:Ze.taskList,list:Ze.list,listStack:Ze.listStack.slice(0),quote:Ze.quote,indentedCode:Ze.indentedCode,trailingSpace:Ze.trailingSpace,trailingSpaceNewLine:Ze.trailingSpaceNewLine,md_inside:Ze.md_inside,fencedEndRE:Ze.fencedEndRE}},token:function(Ze,Ae){if(Ae.formatting=!1,Ze!=Ae.thisLine.stream){if(Ae.header=0,Ae.hr=!1,Ze.match(/^\s*$/,!0))return Me(Ae),null;if(Ae.prevLine=Ae.thisLine,Ae.thisLine={stream:Ze},Ae.taskList=!1,Ae.trailingSpace=0,Ae.trailingSpaceNewLine=!1,!Ae.localState&&(Ae.f=Ae.block,Ae.f!=We)){var Pt=Ze.match(/^\s*/,!0)[0].replace(/\t/g,pt).length;if(Ae.indentation=Pt,Ae.indentationDiff=null,Pt>0)return null}}return Ae.f(Ze,Ae)},innerMode:function(Ze){return Ze.block==We?{state:Ze.htmlState,mode:et}:Ze.localState?{state:Ze.localState,mode:Ze.localMode}:{state:Ze,mode:un}},indent:function(Ze,Ae,Pt){return Ze.block==We&&et.indent?et.indent(Ze.htmlState,Ae,Pt):Ze.localState&&Ze.localMode.indent?Ze.localMode.indent(Ze.localState,Ae,Pt):be.Pass},blankLine:Me,getType:Et,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return un},"xml"),be.defineMIME("text/markdown","markdown"),be.defineMIME("text/x-markdown","markdown")})},52539:function(mn,Vt,le){(function(be){be(le(4631))})(function(be){"use strict";be.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 Ve=0;Ve<be.modeInfo.length;Ve++){var $e=be.modeInfo[Ve];$e.mimes&&($e.mime=$e.mimes[0])}be.findModeByMIME=function(et){et=et.toLowerCase();for(var ge=0;ge<be.modeInfo.length;ge++){var Te=be.modeInfo[ge];if(Te.mime==et)return Te;if(Te.mimes){for(var Le=0;Le<Te.mimes.length;Le++)if(Te.mimes[Le]==et)return Te}}if(/\+xml$/.test(et))return be.findModeByMIME("application/xml");if(/\+json$/.test(et))return be.findModeByMIME("application/json")},be.findModeByExtension=function(et){et=et.toLowerCase();for(var ge=0;ge<be.modeInfo.length;ge++){var Te=be.modeInfo[ge];if(Te.ext){for(var Le=0;Le<Te.ext.length;Le++)if(Te.ext[Le]==et)return Te}}},be.findModeByFileName=function(et){for(var ge=0;ge<be.modeInfo.length;ge++){var Te=be.modeInfo[ge];if(Te.file&&Te.file.test(et))return Te}var Le=et.lastIndexOf("."),Se=Le>-1&&et.substring(Le+1,et.length);if(Se)return be.findModeByExtension(Se)},be.findModeByName=function(et){et=et.toLowerCase();for(var ge=0;ge<be.modeInfo.length;ge++){var Te=be.modeInfo[ge];if(Te.name.toLowerCase()==et)return Te;if(Te.alias){for(var Le=0;Le<Te.alias.length;Le++)if(Te.alias[Le].toLowerCase()==et)return Te}}}})},80785:function(mn,Vt,le){(function(be){be(le(4631))})(function(be){"use strict";be.defineMode("stex",function(Ve,$e){"use strict";function et(nt,rt){nt.cmdState.push(rt)}function ge(nt){return nt.cmdState.length>0?nt.cmdState[nt.cmdState.length-1]:null}function Te(nt){var rt=nt.cmdState.pop();rt&&rt.closeBracket()}function Le(nt){for(var rt=nt.cmdState,Je=rt.length-1;Je>=0;Je--){var Ee=rt[Je];if(Ee.name!="DEFAULT")return Ee}return{styleIdentifier:function(){return null}}}function Se(nt,rt,Je){return function(){this.name=nt,this.bracketNo=0,this.style=rt,this.styles=Je,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 Pe(nt,rt){nt.f=rt}function at(nt,rt){var Je;if(nt.match(/^\\[a-zA-Z@]+/)){var Ee=nt.current().slice(1);return Je=me.hasOwnProperty(Ee)?me[Ee]:me.DEFAULT,Je=new Je,et(rt,Je),Pe(rt,ht),Je.style}if(nt.match(/^\\[$&%#{}_]/)||nt.match(/^\\[,;!\/\\]/))return"tag";if(nt.match("\\["))return Pe(rt,function(Kt,Ye){return Oe(Kt,Ye,"\\]")}),"keyword";if(nt.match("\\("))return Pe(rt,function(Kt,Ye){return Oe(Kt,Ye,"\\)")}),"keyword";if(nt.match("$$"))return Pe(rt,function(Kt,Ye){return Oe(Kt,Ye,"$$")}),"keyword";if(nt.match("$"))return Pe(rt,function(Kt,Ye){return Oe(Kt,Ye,"$")}),"keyword";var pt=nt.next();if(pt=="%")return nt.skipToEnd(),"comment";if(pt=="}"||pt=="]"){if(Je=ge(rt),Je)Je.closeBracket(pt),Pe(rt,ht);else return"error";return"bracket"}else return pt=="{"||pt=="["?(Je=me.DEFAULT,Je=new Je,et(rt,Je),"bracket"):/\d/.test(pt)?(nt.eatWhile(/[\w.%]/),"atom"):(nt.eatWhile(/[\w\-_]/),Je=Le(rt),Je.name=="begin"&&(Je.argument=nt.current()),Je.styleIdentifier())}function Oe(nt,rt,Je){if(nt.eatSpace())return null;if(Je&&nt.match(Je))return Pe(rt,at),"keyword";if(nt.match(/^\\[a-zA-Z@]+/))return"tag";if(nt.match(/^[a-zA-Z]+/))return"variable-2";if(nt.match(/^\\[$&%#{}_]/)||nt.match(/^\\[,;!\/]/)||nt.match(/^[\^_&]/))return"tag";if(nt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(nt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ee=nt.next();return Ee=="{"||Ee=="}"||Ee=="["||Ee=="]"||Ee=="("||Ee==")"?"bracket":Ee=="%"?(nt.skipToEnd(),"comment"):"error"}function ht(nt,rt){var Je=nt.peek(),Ee;return Je=="{"||Je=="["?(Ee=ge(rt),Ee.openBracket(Je),nt.eat(Je),Pe(rt,at),"bracket"):/[ \t\r]/.test(Je)?(nt.eat(Je),null):(Pe(rt,at),Te(rt),at(nt,rt))}return{startState:function(){var nt=$e.inMathMode?function(rt,Je){return Oe(rt,Je)}:at;return{cmdState:[],f:nt}},copyState:function(nt){return{cmdState:nt.cmdState.slice(),f:nt.f}},token:function(nt,rt){return rt.f(nt,rt)},blankLine:function(nt){nt.f=at,nt.cmdState.length=0},lineComment:"%"}}),be.defineMIME("text/x-stex","stex"),be.defineMIME("text/x-latex","stex")})},29589:function(mn,Vt,le){(function(be){be(le(4631))})(function(be){"use strict";var Ve={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},$e={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};be.defineMode("xml",function(et,ge){var Te=et.indentUnit,Le={},Se=ge.htmlMode?Ve:$e;for(var me in Se)Le[me]=Se[me];for(var me in ge)Le[me]=ge[me];var Pe,at;function Oe(Qe,Bt){function Lt(Yt){return Bt.tokenize=Yt,Yt(Qe,Bt)}var hn=Qe.next();if(hn=="<")return Qe.eat("!")?Qe.eat("[")?Qe.match("CDATA[")?Lt(rt("atom","]]>")):null:Qe.match("--")?Lt(rt("comment","-->")):Qe.match("DOCTYPE",!0,!0)?(Qe.eatWhile(/[\w\._\-]/),Lt(Je(1))):null:Qe.eat("?")?(Qe.eatWhile(/[\w\._\-]/),Bt.tokenize=rt("meta","?>"),"meta"):(Pe=Qe.eat("/")?"closeTag":"openTag",Bt.tokenize=ht,"tag bracket");if(hn=="&"){var ut;return Qe.eat("#")?Qe.eat("x")?ut=Qe.eatWhile(/[a-fA-F\d]/)&&Qe.eat(";"):ut=Qe.eatWhile(/[\d]/)&&Qe.eat(";"):ut=Qe.eatWhile(/[\w\.\-:]/)&&Qe.eat(";"),ut?"atom":"error"}else return Qe.eatWhile(/[^&<]/),null}Oe.isInText=!0;function ht(Qe,Bt){var Lt=Qe.next();if(Lt==">"||Lt=="/"&&Qe.eat(">"))return Bt.tokenize=Oe,Pe=Lt==">"?"endTag":"selfcloseTag","tag bracket";if(Lt=="=")return Pe="equals",null;if(Lt=="<"){Bt.tokenize=Oe,Bt.state=Ye,Bt.tagName=Bt.tagStart=null;var hn=Bt.tokenize(Qe,Bt);return hn?hn+" tag error":"tag error"}else return/[\'\"]/.test(Lt)?(Bt.tokenize=nt(Lt),Bt.stringStartCol=Qe.column(),Bt.tokenize(Qe,Bt)):(Qe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function nt(Qe){var Bt=function(Lt,hn){for(;!Lt.eol();)if(Lt.next()==Qe){hn.tokenize=ht;break}return"string"};return Bt.isInAttribute=!0,Bt}function rt(Qe,Bt){return function(Lt,hn){for(;!Lt.eol();){if(Lt.match(Bt)){hn.tokenize=Oe;break}Lt.next()}return Qe}}function Je(Qe){return function(Bt,Lt){for(var hn;(hn=Bt.next())!=null;){if(hn=="<")return Lt.tokenize=Je(Qe+1),Lt.tokenize(Bt,Lt);if(hn==">")if(Qe==1){Lt.tokenize=Oe;break}else return Lt.tokenize=Je(Qe-1),Lt.tokenize(Bt,Lt)}return"meta"}}function Ee(Qe,Bt,Lt){this.prev=Qe.context,this.tagName=Bt,this.indent=Qe.indented,this.startOfLine=Lt,(Le.doNotIndent.hasOwnProperty(Bt)||Qe.context&&Qe.context.noIndent)&&(this.noIndent=!0)}function pt(Qe){Qe.context&&(Qe.context=Qe.context.prev)}function Kt(Qe,Bt){for(var Lt;;){if(!Qe.context||(Lt=Qe.context.tagName,!Le.contextGrabbers.hasOwnProperty(Lt)||!Le.contextGrabbers[Lt].hasOwnProperty(Bt)))return;pt(Qe)}}function Ye(Qe,Bt,Lt){return Qe=="openTag"?(Lt.tagStart=Bt.column(),lt):Qe=="closeTag"?Me:Ye}function lt(Qe,Bt,Lt){return Qe=="word"?(Lt.tagName=Bt.current(),at="tag",je):Le.allowMissingTagName&&Qe=="endTag"?(at="tag bracket",je(Qe,Bt,Lt)):(at="error",lt)}function Me(Qe,Bt,Lt){if(Qe=="word"){var hn=Bt.current();return Lt.context&&Lt.context.tagName!=hn&&Le.implicitlyClosed.hasOwnProperty(Lt.context.tagName)&&pt(Lt),Lt.context&&Lt.context.tagName==hn||Le.matchClosing===!1?(at="tag",xe):(at="tag error",We)}else return Le.allowMissingTagName&&Qe=="endTag"?(at="tag bracket",xe(Qe,Bt,Lt)):(at="error",We)}function xe(Qe,Bt,Lt){return Qe!="endTag"?(at="error",xe):(pt(Lt),Ye)}function We(Qe,Bt,Lt){return at="error",xe(Qe,Bt,Lt)}function je(Qe,Bt,Lt){if(Qe=="word")return at="attribute",Et;if(Qe=="endTag"||Qe=="selfcloseTag"){var hn=Lt.tagName,ut=Lt.tagStart;return Lt.tagName=Lt.tagStart=null,Qe=="selfcloseTag"||Le.autoSelfClosers.hasOwnProperty(hn)?Kt(Lt,hn):(Kt(Lt,hn),Lt.context=new Ee(Lt,hn,ut==Lt.indented)),Ye}return at="error",je}function Et(Qe,Bt,Lt){return Qe=="equals"?vt:(Le.allowMissing||(at="error"),je(Qe,Bt,Lt))}function vt(Qe,Bt,Lt){return Qe=="string"?At:Qe=="word"&&Le.allowUnquoted?(at="string",je):(at="error",je(Qe,Bt,Lt))}function At(Qe,Bt,Lt){return Qe=="string"?At:je(Qe,Bt,Lt)}return{startState:function(Qe){var Bt={tokenize:Oe,state:Ye,indented:Qe||0,tagName:null,tagStart:null,context:null};return Qe!=null&&(Bt.baseIndent=Qe),Bt},token:function(Qe,Bt){if(!Bt.tagName&&Qe.sol()&&(Bt.indented=Qe.indentation()),Qe.eatSpace())return null;Pe=null;var Lt=Bt.tokenize(Qe,Bt);return(Lt||Pe)&&Lt!="comment"&&(at=null,Bt.state=Bt.state(Pe||Lt,Qe,Bt),at&&(Lt=at=="error"?Lt+" error":at)),Lt},indent:function(Qe,Bt,Lt){var hn=Qe.context;if(Qe.tokenize.isInAttribute)return Qe.tagStart==Qe.indented?Qe.stringStartCol+1:Qe.indented+Te;if(hn&&hn.noIndent)return be.Pass;if(Qe.tokenize!=ht&&Qe.tokenize!=Oe)return Lt?Lt.match(/^(\s*)/)[0].length:0;if(Qe.tagName)return Le.multilineTagIndentPastTag!==!1?Qe.tagStart+Qe.tagName.length+2:Qe.tagStart+Te*(Le.multilineTagIndentFactor||1);if(Le.alignCDATA&&/<!\[CDATA\[/.test(Bt))return 0;var ut=Bt&&/^<(\/)?([\w_:\.-]*)/.exec(Bt);if(ut&&ut[1])for(;hn;)if(hn.tagName==ut[2]){hn=hn.prev;break}else if(Le.implicitlyClosed.hasOwnProperty(hn.tagName))hn=hn.prev;else break;else if(ut)for(;hn;){var Yt=Le.contextGrabbers[hn.tagName];if(Yt&&Yt.hasOwnProperty(ut[2]))hn=hn.prev;else break}for(;hn&&hn.prev&&!hn.startOfLine;)hn=hn.prev;return hn?hn.indent+Te:Qe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Le.htmlMode?"html":"xml",helperType:Le.htmlMode?"html":"xml",skipAttribute:function(Qe){Qe.state==vt&&(Qe.state=je)},xmlCurrentTag:function(Qe){return Qe.tagName?{name:Qe.tagName,close:Qe.type=="closeTag"}:null},xmlCurrentContext:function(Qe){for(var Bt=[],Lt=Qe.context;Lt;Lt=Lt.prev)Lt.tagName&&Bt.push(Lt.tagName);return Bt.reverse()}}}),be.defineMIME("text/xml","xml"),be.defineMIME("application/xml","xml"),be.mimeModes.hasOwnProperty("text/html")||be.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(mn,Vt,le){"use strict";le.d(Vt,{hP:function(){return gn}});var be=function(_e,ce){return(be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,he){se.__proto__=he}||function(se,he){for(var fe in he)Object.prototype.hasOwnProperty.call(he,fe)&&(se[fe]=he[fe])})(_e,ce)};function Ve(_e,ce){function se(){this.constructor=_e}be(_e,ce),_e.prototype=ce===null?Object.create(ce):(se.prototype=ce.prototype,new se)}function $e(_e,ce,se,he){return new(se||(se=Promise))(function(fe,oe){function ke(Tt){try{St(he.next(Tt))}catch(Ot){oe(Ot)}}function Ge(Tt){try{St(he.throw(Tt))}catch(Ot){oe(Ot)}}function St(Tt){var Ot;Tt.done?fe(Tt.value):(Ot=Tt.value,Ot instanceof se?Ot:new se(function(Wt){Wt(Ot)})).then(ke,Ge)}St((he=he.apply(_e,ce||[])).next())})}function et(_e,ce){var se,he,fe,oe,ke={label:0,sent:function(){if(1&fe[0])throw fe[1];return fe[1]},trys:[],ops:[]};return oe={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Ge(St){return function(Tt){return function(Ot){if(se)throw new TypeError("Generator is already executing.");for(;ke;)try{if(se=1,he&&(fe=2&Ot[0]?he.return:Ot[0]?he.throw||((fe=he.return)&&fe.call(he),0):he.next)&&!(fe=fe.call(he,Ot[1])).done)return fe;switch(he=0,fe&&(Ot=[2&Ot[0],fe.value]),Ot[0]){case 0:case 1:fe=Ot;break;case 4:return ke.label++,{value:Ot[1],done:!1};case 5:ke.label++,he=Ot[1],Ot=[0];continue;case 7:Ot=ke.ops.pop(),ke.trys.pop();continue;default:if(fe=ke.trys,!((fe=fe.length>0&&fe[fe.length-1])||Ot[0]!==6&&Ot[0]!==2)){ke=0;continue}if(Ot[0]===3&&(!fe||Ot[1]>fe[0]&&Ot[1]<fe[3])){ke.label=Ot[1];break}if(Ot[0]===6&&ke.label<fe[1]){ke.label=fe[1],fe=Ot;break}if(fe&&ke.label<fe[2]){ke.label=fe[2],ke.ops.push(Ot);break}fe[2]&&ke.ops.pop(),ke.trys.pop();continue}Ot=ce.call(_e,ke)}catch(Wt){Ot=[6,Wt],he=0}finally{se=fe=0}if(5&Ot[0])throw Ot[1];return{value:Ot[0]?Ot[1]:void 0,done:!0}}([St,Tt])}}}function ge(){for(var _e=0,ce=0,se=arguments.length;ce<se;ce++)_e+=arguments[ce].length;var he=Array(_e),fe=0;for(ce=0;ce<se;ce++)for(var oe=arguments[ce],ke=0,Ge=oe.length;ke<Ge;ke++,fe++)he[fe]=oe[ke];return he}var Te=function(){function _e(){}return _e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},_e.setAttributes=function(ce,se){for(var he=0,fe=se;he<fe.length;he++){var oe=fe[he],ke=oe[0],Ge=oe[1];ce.setAttribute(ke,Ge)}},_e.createRect=function(ce,se,he){var fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return fe.setAttribute("width",ce.toString()),fe.setAttribute("height",se.toString()),he&&_e.setAttributes(fe,he),fe},_e.createLine=function(ce,se,he,fe,oe){var ke=document.createElementNS("http://www.w3.org/2000/svg","line");return ke.setAttribute("x1",ce.toString()),ke.setAttribute("y1",se.toString()),ke.setAttribute("x2",he.toString()),ke.setAttribute("y2",fe.toString()),oe&&_e.setAttributes(ke,oe),ke},_e.createPolygon=function(ce,se){var he=document.createElementNS("http://www.w3.org/2000/svg","polygon");return he.setAttribute("points",ce),se&&_e.setAttributes(he,se),he},_e.createCircle=function(ce,se){var he=document.createElementNS("http://www.w3.org/2000/svg","circle");return he.setAttribute("cx",(ce/2).toString()),he.setAttribute("cy",(ce/2).toString()),he.setAttribute("r",ce.toString()),se&&_e.setAttributes(he,se),he},_e.createEllipse=function(ce,se,he){var fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return fe.setAttribute("cx",(ce/2).toString()),fe.setAttribute("cy",(se/2).toString()),fe.setAttribute("rx",(ce/2).toString()),fe.setAttribute("ry",(se/2).toString()),he&&_e.setAttributes(fe,he),fe},_e.createGroup=function(ce){var se=document.createElementNS("http://www.w3.org/2000/svg","g");return ce&&_e.setAttributes(se,ce),se},_e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},_e.createMarker=function(ce,se,he,fe,oe,ke,Ge){var St=document.createElementNS("http://www.w3.org/2000/svg","marker");return _e.setAttributes(St,[["id",ce],["orient",se],["markerWidth",he.toString()],["markerHeight",fe.toString()],["refX",oe.toString()],["refY",ke.toString()]]),St.appendChild(Ge),St},_e.createText=function(ce){var se=document.createElementNS("http://www.w3.org/2000/svg","text");return se.setAttribute("x","0"),se.setAttribute("y","0"),ce&&_e.setAttributes(se,ce),se},_e.createTSpan=function(ce,se){var he=document.createElementNS("http://www.w3.org/2000/svg","tspan");return he.textContent=ce,se&&_e.setAttributes(he,se),he},_e.createImage=function(ce){var se=document.createElementNS("http://www.w3.org/2000/svg","image");return ce&&_e.setAttributes(se,ce),se},_e.createPoint=function(ce,se){var he=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return he.x=ce,he.y=se,he},_e.createPath=function(ce,se){var he=document.createElementNS("http://www.w3.org/2000/svg","path");return he.setAttribute("d",ce),se&&_e.setAttributes(he,se),he},_e}(),Le=function(){function _e(){}return _e.addKey=function(ce){_e.key=ce},Object.defineProperty(_e,"isLicensed",{get:function(){return!!_e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(_e.key)},enumerable:!1,configurable:!0}),_e}(),Se=function(){function _e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return _e.prototype.rasterize=function(ce,se,he){var fe=this;return new Promise(function(oe){var ke=he!==void 0?he:document.createElement("canvas");ce===null&&(fe.markersOnly=!0,fe.naturalSize=!1);var Ge=document.createElementNS("http://www.w3.org/2000/svg","svg");Ge.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ge.setAttribute("width",se.width.baseVal.valueAsString),Ge.setAttribute("height",se.height.baseVal.valueAsString),Ge.setAttribute("viewBox","0 0 "+se.viewBox.baseVal.width.toString()+" "+se.viewBox.baseVal.height.toString()),Ge.innerHTML=se.innerHTML,fe.naturalSize===!0?(Ge.width.baseVal.value=ce.naturalWidth,Ge.height.baseVal.value=ce.naturalHeight):fe.width!==void 0&&fe.height!==void 0&&(Ge.width.baseVal.value=fe.width,Ge.height.baseVal.value=fe.height),ke.width=Ge.width.baseVal.value,ke.height=Ge.height.baseVal.value;var St=Ge.outerHTML,Tt=ke.getContext("2d");fe.markersOnly!==!0&&Tt.drawImage(ce,0,0,ke.width,ke.height);var Ot=window.URL,Wt=new Image(ke.width,ke.height);Wt.setAttribute("crossOrigin","anonymous");var $t=new Blob([St],{type:"image/svg+xml"}),Gn=Ot.createObjectURL($t);Wt.onload=function(){Tt.drawImage(Wt,0,0),Ot.revokeObjectURL(Gn);var ar=ke.toDataURL(fe.imageType,fe.imageQuality);oe(ar)},Wt.src=Gn})},_e}(),me=function(){},Pe=function(){function _e(ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ce+"_"}return Object.defineProperty(_e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(_e.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(_e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),_e.prototype.addClass=function(ce){return this.styleSheet===void 0&&this.addStyleSheet(),ce.name=""+this.classNamePrefix+ce.localName,this.classes.push(ce),this.styleSheet.sheet.insertRule("."+ce.name+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length),ce},_e.prototype.addRule=function(ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ce),this.styleSheet.sheet.insertRule(ce.selector+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length)},_e.prototype.addStyleSheet=function(){var ce;this.styleSheet=document.createElement("style"),((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).appendChild(this.styleSheet),this.addRule(new at("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new at("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new at("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Oe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Oe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},_e.prototype.removeStyleSheet=function(){var ce;this.styleSheet&&(((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},_e}(),at=function(_e,ce){this.selector=_e,this.style=ce},Oe=function(_e,ce){this.localName=_e,this.style=ce},ht=function(){function _e(ce,se,he,fe,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ce,this.displayMode=se,this.markerItems=he,this.uiStyleSettings=fe,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return _e.prototype.show=function(ce){var se=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ce,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var he=document.createElement("div");he.className=this.toolbarBlockStyleClass.name,he.style.whiteSpace="nowrap",this.uiContainer.appendChild(he),this.addActionButton(he,'<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(he,'<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(he,'<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(he,'<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(he,'<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(he,'<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(he,'<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(he,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var ke=document.createElement("div");ke.className=""+se.toolbarButtonStyleClass.name,ke.setAttribute("data-type-name",oe.typeName),ke.innerHTML=oe.icon,ke.addEventListener("click",function(){se.markerToolbarButtonClicked(ke,oe)}),se.buttons.push(ke),se.markerButtons.push(ke)}),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()},_e.prototype.addButtonClickListener=function(ce){this.buttonClickListeners.push(ce)},_e.prototype.removeButtonClickListener=function(ce){this.buttonClickListeners.indexOf(ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ce),1)},_e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},_e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ce=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var se=0;se<this.markerButtons.length;se++)se<ce||se===ce&&this.markerButtons.length-1===ce?this.markerButtonBlock.appendChild(this.markerButtons[se]):(se===ce&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[se]))}},_e.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")},_e.prototype.resetButtonStyles=function(){var ce=this;this.buttons.forEach(function(se){se.className=se.className.replace(ce.uiStyleSettings.toolbarButtonStyleColorsClassName?ce.uiStyleSettings.toolbarButtonStyleColorsClassName:ce.toolbarButtonStyleColorsClass.name,"").trim(),se.className=se.className.replace(ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),se.className+=" "+(ce.uiStyleSettings.toolbarButtonStyleColorsClassName?ce.uiStyleSettings.toolbarButtonStyleColorsClassName:ce.toolbarButtonStyleColorsClass.name)})},_e.prototype.addActionButton=function(ce,se,he){var fe=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=se,oe.setAttribute("data-action",he),oe.addEventListener("click",function(){fe.actionToolbarButtonClicked(oe,he)}),he){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}ce.appendChild(oe),this.buttons.push(oe)},_e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Oe("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Oe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Oe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Oe("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Oe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Oe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ce)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ce)+`px;
|
|
|
padding: `+ce+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new at("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new at("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},_e.prototype.markerToolbarButtonClicked=function(ce,se){this.setActiveButton(ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(he){return he("marker",se)}),this.markerButtonOverflowBlock.style.display="none"},_e.prototype.actionToolbarButtonClicked=function(ce,se){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(he){return he("action",se)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},_e.prototype.setActiveButton=function(ce){this.resetButtonStyles(),ce.className=ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},_e.prototype.setActiveMarkerButton=function(ce){var se=this.markerButtons.find(function(he){return he.getAttribute("data-type-name")===ce});se&&this.setActiveButton(se)},_e.prototype.setCurrentMarker=function(ce){var se=this;this.currentMarker=ce,this.buttons.filter(function(he){return/delete|notes/.test(he.getAttribute("data-action"))}).forEach(function(he){se.currentMarker===void 0?(he.style.fillOpacity="0.4",he.style.pointerEvents="none"):(he.style.fillOpacity="1",he.style.pointerEvents="all")})},_e}(),nt=function(){function _e(ce,se,he,fe){this.panels=[],this.panelButtons=[],this.markerjsContainer=ce,this.displayMode=se,this.uiStyleSettings=he,this.styles=fe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return _e.prototype.addStyles=function(){var ce;this.toolboxStyleClass=this.styles.addClass(new Oe("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Oe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var se=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Oe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Oe("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ce!==void 0?ce:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Oe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*se)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*se)+`px;
|
|
|
padding: `+se+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new at("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},_e.prototype.show=function(ce){var se;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ce,this.uiContainer.className=this.toolboxStyleClass.name+" "+((se=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&se!==void 0?se:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},_e.prototype.setPanelButtons=function(ce){var se,he,fe=this;this.panels=ce,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((se=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&se!==void 0?se:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((he=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&he!==void 0?he:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var ke;oe.uiStyleSettings=fe.uiStyleSettings;var Ge=document.createElement("div");Ge.className=fe.toolboxButtonStyleClass.name+" "+((ke=fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ke!==void 0?ke:fe.toolboxButtonStyleColorsClass.name),Ge.innerHTML=oe.icon,Ge.title=oe.title,Ge.addEventListener("click",function(){fe.panelButtonClick(oe)}),fe.panelButtons.push(Ge),fe.buttonRow.appendChild(Ge)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},_e.prototype.panelButtonClick=function(ce){var se=this,he=-1;if(ce!==this.activePanel){he=this.panels.indexOf(ce),this.panelRow.innerHTML="";var fe=ce.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=ce}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){se.displayMode==="inline"?se.panelRow.style.display="none":se.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,ke){var Ge,St;oe.className=se.toolboxButtonStyleClass.name+" "+(ke===he?""+((Ge=se.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ge!==void 0?Ge:se.toolboxActiveButtonStyleColorsClass.name):""+((St=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&St!==void 0?St:se.toolboxButtonStyleColorsClass.name))})},_e}(),rt=function(_e,ce){this.title=_e,this.icon=ce},Je=function(_e){function ce(se,he,fe,oe){var ke=_e.call(this,se,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ke.colors=[],ke.addTransparent=!1,ke.colorBoxes=[],ke.colors=he,ke.currentColor=fe,ke.setCurrentColor=ke.setCurrentColor.bind(ke),ke.getColorBox=ke.getColorBox.bind(ke),ke}return Ve(ce,_e),ce.prototype.getUi=function(){var se=this,he=document.createElement("div");return he.style.overflow="hidden",he.style.whiteSpace="nowrap",this.colors.forEach(function(fe){var oe=se.getColorBox(fe);he.appendChild(oe),se.colorBoxes.push(oe)}),he},ce.prototype.getColorBox=function(se){var he=this,fe=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-fe,ke=document.createElement("div");ke.style.display="inline-block",ke.style.boxSizing="content-box",ke.style.width=oe-2+"px",ke.style.height=oe-2+"px",ke.style.padding="1px",ke.style.marginRight="2px",ke.style.marginBottom="2px",ke.style.borderWidth="2px",ke.style.borderStyle="solid",ke.style.borderRadius=(oe+2)/2+"px",ke.style.borderColor=se===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ke.addEventListener("click",function(){he.setCurrentColor(se,ke)});var Ge=document.createElement("div");return Ge.style.display="inline-block",Ge.style.width=oe-2+"px",Ge.style.height=oe-2+"px",Ge.style.backgroundColor=se,Ge.style.borderRadius=oe/2+"px",se==="transparent"&&(Ge.style.fill=this.uiStyleSettings.toolboxAccentColor,Ge.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>`),ke.appendChild(Ge),ke},ce.prototype.setCurrentColor=function(se,he){var fe=this;this.currentColor=se,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===he?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(se)},ce}(rt),Ee=function(){function _e(ce,se,he){this._state="new",this._isSelected=!1,this._container=ce,this._overlayContainer=se,this.globalSettings=he,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(_e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),_e.prototype.ownsTarget=function(ce){return!1},Object.defineProperty(_e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),_e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},_e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},_e.prototype.pointerDown=function(ce,se){},_e.prototype.dblClick=function(ce,se){},_e.prototype.manipulate=function(ce){},_e.prototype.pointerUp=function(ce){this.stateChanged()},_e.prototype.dispose=function(){},_e.prototype.addMarkerVisualToContainer=function(ce){this.container.childNodes.length>0?this.container.insertBefore(ce,this.container.childNodes[0]):this.container.appendChild(ce)},_e.prototype.getState=function(){return{typeName:_e.typeName,state:this.state,notes:this.notes}},_e.prototype.restoreState=function(ce){this._state=ce.state,this.notes=ce.notes},_e.prototype.scale=function(ce,se){},_e.prototype.colorChanged=function(ce){this.onColorChanged&&this.onColorChanged(ce),this.stateChanged()},_e.prototype.fillColorChanged=function(ce){this.onFillColorChanged&&this.onFillColorChanged(ce),this.stateChanged()},_e.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ce)&&this.onStateChanged(this)}},_e.typeName="MarkerBase",_e}(),pt=function(){function _e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return _e.prototype.findGripByVisual=function(ce){return this.topLeft.ownsTarget(ce)?this.topLeft:this.topCenter.ownsTarget(ce)?this.topCenter:this.topRight.ownsTarget(ce)?this.topRight:this.centerLeft.ownsTarget(ce)?this.centerLeft:this.centerRight.ownsTarget(ce)?this.centerRight:this.bottomLeft.ownsTarget(ce)?this.bottomLeft:this.bottomCenter.ownsTarget(ce)?this.bottomCenter:this.bottomRight.ownsTarget(ce)?this.bottomRight:void 0},_e}(),Kt=function(){function _e(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return _e.prototype.ownsTarget=function(ce){return ce===this.visual||ce===this.visual.childNodes[0]||ce===this.visual.childNodes[1]},_e}(),Ye=function(){function _e(){}return _e.toITransformMatrix=function(ce){return{a:ce.a,b:ce.b,c:ce.c,d:ce.d,e:ce.e,f:ce.f}},_e.toSVGMatrix=function(ce,se){return ce.a=se.a,ce.b=se.b,ce.c=se.c,ce.d=se.d,ce.e=se.e,ce.f=se.f,ce},_e}(),lt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(Te.createTransform()),oe.setupControlBox(),oe}return Ve(ce,_e),Object.defineProperty(ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"visual",{get:function(){return this._visual},set:function(se){this._visual=se;var he=Te.createTransform();this._visual.transform.baseVal.appendItem(he)},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(se){return!!_e.prototype.ownsTarget.call(this,se)||!!(this.controlGrips.findGripByVisual(se)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(se))},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.state==="new"&&(this.left=se.x,this.top=se.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var fe=this.unrotatePoint(se);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(he),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(he)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ke=this.container.transform.baseVal.getItem(0);ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ce.prototype.pointerUp=function(se){var he=this.state;_e.prototype.pointerUp.call(this,se),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(se),this._state="select",he==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ce.prototype.moveVisual=function(se){this.visual.style.transform="translate("+se.x+"px, "+se.y+"px)"},ce.prototype.manipulate=function(se){var he=this.unrotatePoint(se);this.state==="creating"?this.resize(se):this.state==="move"?(this.left=this.manipulationStartLeft+(he.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(he.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(he):this.state==="rotate"&&this.rotate(se)},ce.prototype.resize=function(se){var he=this.manipulationStartLeft,fe=this.manipulationStartWidth,oe=this.manipulationStartTop,ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:he=this.manipulationStartLeft+se.x-this.manipulationStartX,fe=this.manipulationStartWidth+this.manipulationStartLeft-he;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:fe=this.manipulationStartWidth+se.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+se.y-this.manipulationStartY,ke=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ke=this.manipulationStartHeight+se.y-this.manipulationStartY}fe>=0?(this.left=he,this.width=fe):(this.left=he+fe,this.width=-fe),ke>=0?(this.top=oe,this.height=ke):(this.top=oe+ke,this.height=-ke),this.setSize()},ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ce.prototype.rotate=function(se){if(Math.abs(se.x-this.centerX)>.1){var he=Math.sign(se.x-this.centerX);this.rotationAngle=180*Math.atan((se.y-this.centerY)/(se.x-this.centerX))/Math.PI+90*he,this.applyRotation()}},ce.prototype.applyRotation=function(){var se=this.container.transform.baseVal.getItem(0);se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(se,0)},ce.prototype.rotatePoint=function(se){if(this.rotationAngle===0)return se;var he=this.container.getCTM(),fe=Te.createPoint(se.x,se.y);return{x:(fe=fe.matrixTransform(he)).x,y:fe.y}},ce.prototype.unrotatePoint=function(se){if(this.rotationAngle===0)return se;var he=this.container.getCTM();he=he.inverse();var fe=Te.createPoint(se.x,se.y);return{x:(fe=fe.matrixTransform(he)).x,y:fe.y}},ce.prototype.select=function(){_e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ce.prototype.deselect=function(){_e.prototype.deselect.call(this),this.controlBox.style.display="none"},ce.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var se=Te.createTransform();se.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(se),this.container.appendChild(this.controlBox),this.controlRect=Te.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=Te.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new pt,this.addControlGrips(),this.controlBox.style.display="none"},ce.prototype.adjustControlBox=function(){var se=this.controlBox.transform.baseVal.getItem(0);se.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(se,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},ce.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},ce.prototype.createGrip=function(){var se=new Kt;return se.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(se.visual),se},ce.prototype.positionGrips=function(){var se=this.controlGrips.topLeft.GRIP_SIZE,he=-se/2,fe=he,oe=(this.width+this.CB_DISTANCE)/2-se/2,ke=(this.height+this.CB_DISTANCE)/2-se/2,Ge=this.height+this.CB_DISTANCE-se/2,St=this.width+this.CB_DISTANCE-se/2;this.positionGrip(this.controlGrips.topLeft.visual,he,fe),this.positionGrip(this.controlGrips.topCenter.visual,oe,fe),this.positionGrip(this.controlGrips.topRight.visual,St,fe),this.positionGrip(this.controlGrips.centerLeft.visual,he,ke),this.positionGrip(this.controlGrips.centerRight.visual,St,ke),this.positionGrip(this.controlGrips.bottomLeft.visual,he,Ge),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Ge),this.positionGrip(this.controlGrips.bottomRight.visual,St,Ge),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,fe-3*this.CB_DISTANCE)},ce.prototype.positionGrip=function(se,he,fe){var oe=se.transform.baseVal.getItem(0);oe.setTranslate(he,fe),se.transform.baseVal.replaceItem(oe,0)},ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ce.prototype.showControlBox=function(){this.controlBox.style.display=""},ce.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ye.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ye.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},_e.prototype.getState.call(this))},ce.prototype.restoreState=function(se){_e.prototype.restoreState.call(this,se);var he=se;this.left=he.left,this.top=he.top,this.width=he.width,this.height=he.height,this.rotationAngle=he.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ye.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,he.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ye.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,he.containerTransformMatrix))},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he);var fe=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:fe.x*se,y:fe.y*he});this.left=oe.x,this.top=oe.y,this.width=this.width*se,this.height=this.height*he,this.adjustControlBox()},ce}(Ee),Me=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.visual)},ce.prototype.createVisual=function(){this.visual=Te.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.state==="new"&&(this.createVisual(),this.moveVisual(se),this._state="creating")},ce.prototype.manipulate=function(se){_e.prototype.manipulate.call(this,se)},ce.prototype.resize=function(se){_e.prototype.resize.call(this,se),this.setSize()},ce.prototype.setSize=function(){_e.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ce.prototype.pointerUp=function(se){_e.prototype.pointerUp.call(this,se),this.setSize()},ce.prototype.setStrokeColor=function(se){this.strokeColor=se,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(se),this.stateChanged()},ce.prototype.setFillColor=function(se){this.fillColor=se,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ce.prototype.setStrokeWidth=function(se){this.strokeWidth=se,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(se){this.strokeDasharray=se,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ce.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},_e.prototype.getState.call(this))},ce.prototype.restoreState=function(se){var he=se;this.fillColor=he.fillColor,this.strokeColor=he.strokeColor,this.strokeWidth=he.strokeWidth,this.strokeDasharray=he.strokeDasharray,this.opacity=he.opacity,this.createVisual(),_e.prototype.restoreState.call(this,se),this.setSize()},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.setSize()},ce.title="Rectangle marker",ce}(lt),xe=function(_e){function ce(se,he,fe,oe){var ke=_e.call(this,se,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ke.widths=[],ke.widthBoxes=[],ke.widths=he,ke.currentWidth=fe,ke.setCurrentWidth=ke.setCurrentWidth.bind(ke),ke}return Ve(ce,_e),ce.prototype.getUi=function(){var se=this,he=document.createElement("div");return he.style.display="flex",he.style.overflow="hidden",he.style.flexGrow="2",this.widths.forEach(function(fe){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=fe===se.currentWidth?se.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){se.setCurrentWidth(fe,oe)}),he.appendChild(oe);var ke=document.createElement("div");ke.innerText=fe.toString(),ke.style.marginRight="5px",oe.appendChild(ke);var Ge=document.createElement("div");Ge.style.minHeight="20px",Ge.style.flexGrow="2",Ge.style.display="flex",Ge.style.alignItems="center";var St=document.createElement("hr");St.style.minWidth="20px",St.style.border="0px",St.style.borderTop=fe+"px solid "+se.uiStyleSettings.toolboxColor,St.style.flexGrow="2",Ge.appendChild(St),oe.appendChild(Ge),se.widthBoxes.push(oe)}),he},ce.prototype.setCurrentWidth=function(se,he){var fe=this;this.currentWidth=se,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===he?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ce}(rt),We=function(_e){function ce(se,he,fe,oe){var ke=_e.call(this,se,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ke.styles=[],ke.styleBoxes=[],ke.styles=he,ke.currentStyle=fe,ke.setCurrentStyle=ke.setCurrentStyle.bind(ke),ke}return Ve(ce,_e),ce.prototype.getUi=function(){var se=this,he=document.createElement("div");return he.style.display="flex",he.style.overflow="hidden",he.style.flexGrow="2",this.styles.forEach(function(fe){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/se.styles.length-5+"%",oe.style.borderColor=fe===se.currentStyle?se.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){se.setCurrentStyle(fe,oe)}),he.appendChild(oe);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.overflow="hidden";var Ge=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+se.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(fe!==""?'stroke-dasharray="'+fe+'"':"")+` />
|
|
|
</svg>`;ke.innerHTML=Ge,oe.appendChild(ke),se.styleBoxes.push(oe)}),he},ce.prototype.setCurrentStyle=function(se,he){var fe=this;this.currentStyle=se,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===he?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ce}(rt),je=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.strokeColor=fe.defaultColor,oe.strokeWidth=fe.defaultStrokeWidth,oe.strokeDasharray=fe.defaultStrokeDasharray,oe.strokePanel=new Je("Line color",fe.defaultColorSet,fe.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new xe("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new We("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Ve(ce,_e),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=_e.prototype.getState.call(this);return se.typeName=ce.typeName,se},ce.typeName="FrameMarker",ce.title="Frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ce}(Me),Et=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"},vt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!!_e.prototype.ownsTarget.call(this,se)||!(!this.grip1.ownsTarget(se)&&!this.grip2.ownsTarget(se))},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.state==="new"&&(this.x1=se.x,this.y1=se.y,this.x2=se.x,this.y2=se.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(he)?this.activeGrip=this.grip1:this.grip2.ownsTarget(he)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ce.prototype.pointerUp=function(se){var he=this.state;_e.prototype.pointerUp.call(this,se),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(se),this._state="select",he==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ce.prototype.adjustVisual=function(){},ce.prototype.manipulate=function(se){this.state==="creating"?this.resize(se):this.state==="move"?(this.x1=this.manipulationStartX1+se.x-this.manipulationStartX,this.y1=this.manipulationStartY1+se.y-this.manipulationStartY,this.x2=this.manipulationStartX2+se.x-this.manipulationStartX,this.y2=this.manipulationStartY2+se.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(se)},ce.prototype.resize=function(se){switch(this.activeGrip){case this.grip1:this.x1=se.x,this.y1=se.y;break;case this.grip2:case void 0:this.x2=se.x,this.y2=se.y}this.adjustVisual(),this.adjustControlBox()},ce.prototype.select=function(){_e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ce.prototype.deselect=function(){_e.prototype.deselect.call(this),this.controlBox.style.display="none"},ce.prototype.setupControlBox=function(){this.controlBox=Te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ce.prototype.adjustControlBox=function(){this.positionGrips()},ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ce.prototype.createGrip=function(){var se=new Kt;return se.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(se.visual),se},ce.prototype.positionGrips=function(){var se=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-se/2,this.y1-se/2),this.positionGrip(this.grip2.visual,this.x2-se/2,this.y2-se/2)},ce.prototype.positionGrip=function(se,he,fe){var oe=se.transform.baseVal.getItem(0);oe.setTranslate(he,fe),se.transform.baseVal.replaceItem(oe,0)},ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},_e.prototype.getState.call(this))},ce.prototype.restoreState=function(se){_e.prototype.restoreState.call(this,se);var he=se;this.x1=he.x1,this.y1=he.y1,this.x2=he.x2,this.y2=he.y2},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.x1=this.x1*se,this.y1=this.y1*he,this.x2=this.x2*se,this.y2=this.y2*he,this.adjustVisual(),this.adjustControlBox()},ce}(Ee),At=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=fe.defaultColor,oe.strokeWidth=fe.defaultStrokeWidth,oe.strokeDasharray=fe.defaultStrokeDasharray,oe.strokePanel=new Je("Line color",fe.defaultColorSet,fe.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new xe("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new We("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.visual&&se!==this.selectorLine&&se!==this.visibleLine)},ce.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ce.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ce.prototype.setStrokeColor=function(se){this.strokeColor=se,this.adjustVisual(),this.colorChanged(se)},ce.prototype.setStrokeWidth=function(se){this.strokeWidth=se,this.adjustVisual()},ce.prototype.setStrokeDasharray=function(se){this.strokeDasharray=se,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){_e.prototype.restoreState.call(this,se);var he=se;this.strokeColor=he.strokeColor,this.strokeWidth=he.strokeWidth,this.strokeDasharray=he.strokeDasharray,this.createVisual(),this.adjustVisual()},ce.typeName="LineMarker",ce.title="Line marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ce}(vt),Qe=function(_e){function ce(se,he,fe,oe){var ke=_e.call(this,se,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ke.fonts=[],ke.fontBoxes=[],ke.fonts=he,ke.currentFont=fe,ke.setCurrentFont=ke.setCurrentFont.bind(ke),ke}return Ve(ce,_e),ce.prototype.getUi=function(){var se=this,he=document.createElement("div");return he.style.overflow="hidden",he.style.flexGrow="2",this.fonts.forEach(function(fe){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/se.fonts.length-5+"%",oe.style.borderColor=fe===se.currentFont?se.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){se.setCurrentFont(fe,oe)}),he.appendChild(oe);var ke=document.createElement("div");ke.style.display="flex",ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.fontFamily=fe,ke.style.overflow="hidden";var Ge=document.createElement("div");Ge.style.whiteSpace="nowrap",Ge.style.overflow="hidden",Ge.style.textOverflow="ellipsis",Ge.innerHTML="The quick brown fox jumps over the lazy dog",ke.appendChild(Ge),oe.appendChild(ke),se.fontBoxes.push(oe)}),he},ce.prototype.setCurrentFont=function(se,he){var fe=this;this.currentFont=se,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===he?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ce}(rt),Bt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=fe.defaultColor,oe.fontFamily=fe.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new Je("Color",fe.defaultColorSet,fe.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Qe("Font",fe.defaultFontFamilies,fe.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){if(_e.prototype.ownsTarget.call(this,se)||se===this.visual||se===this.textElement||se===this.bgRectangle)return!0;var he=!1;return this.textElement.childNodes.forEach(function(fe){fe===se&&(he=!0)}),he},ce.prototype.createVisual=function(){this.visual=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.isMoved=!1,this.pointerDownPoint=se,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(se),this._state="creating")},ce.prototype.renderText=function(){var se=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(he){se.textElement.appendChild(Te.createTSpan(he.trim()===""?" ":he.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ce.prototype.getTextScale=function(){var se=this.textElement.getBBox(),he=1;if(se.width>0&&se.height>0){var fe=(1*this.width-this.width*this.padding*2/100)/se.width,oe=(1*this.height-this.height*this.padding*2/100)/se.height;he=Math.min(fe,oe)}return he},ce.prototype.getTextPosition=function(se){var he=this.textElement.getBBox(),fe=0,oe=0;return he.width>0&&he.height>0&&(fe=(this.width-he.width*se)/2,oe=this.height/2-he.height*se/2),{x:fe,y:oe}},ce.prototype.sizeText=function(){var se=this.textElement.getBBox(),he=this.getTextScale(),fe=this.getTextPosition(he);fe.y-=se.y*he,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+fe.x+"px, "+fe.y+"px) scale("+he+", "+he+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(fe.x,fe.y),this.textElement.transform.baseVal.getItem(1).setScale(he,he))},ce.prototype.manipulate=function(se){_e.prototype.manipulate.call(this,se),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(se.x-this.pointerDownPoint.x)>5||Math.abs(se.y-this.pointerDownPoint.y)>5)},ce.prototype.resize=function(se){_e.prototype.resize.call(this,se),this.isMoved=!0,this.setSize(),this.sizeText()},ce.prototype.setSize=function(){_e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ce.prototype.pointerUp=function(se){var he=this.state;he==="creating"&&(this._suppressMarkerCreateEvent=!0),_e.prototype.pointerUp.call(this,se),this.setSize(),(he==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ce.prototype.showTextEditor=function(){var se=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(he){he.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var he=Number.parseFloat(se.textEditor.style.fontSize);se.textEditor.clientWidth>=Number.parseInt(se.textEditor.style.maxWidth)&&he>.9;)he-=.1,se.textEditor.style.fontSize=Math.max(he,.9)+"em"}),this.textEditor.addEventListener("keyup",function(he){he.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(he){if(he.clipboardData){var fe=he.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(fe)),he.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){se.textEditDivClicked(se.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ce.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var se=this.getTextScale(),he=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),fe=this.textElement.getBBox(),oe={x:fe.width*se,y:fe.height*se};he.x-=oe.x/2,he.y-=oe.y/2,this.textEditor.style.top=he.y+"px",this.textEditor.style.left=he.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-he.x+"px",this.textEditor.style.fontSize=Math.max(16*se,12)+"px",this.textElement.style.display="none"}},ce.prototype.textEditDivClicked=function(se){this.text=se.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ce.prototype.select=function(){_e.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),_e.prototype.deselect.call(this)},ce.prototype.dblClick=function(se,he){_e.prototype.dblClick.call(this,se,he),this.showTextEditor()},ce.prototype.setColor=function(se){this.textElement&&Te.setAttributes(this.textElement,[["fill",se]]),this.color=se,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(se)},ce.prototype.setFont=function(se){this.textElement&&Te.setAttributes(this.textElement,[["font-family",se]]),this.fontFamily=se,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){var he=se;this.color=he.color,this.fontFamily=he.fontFamily,this.padding=he.padding,this.text=he.text,this.createVisual(),_e.prototype.restoreState.call(this,se),this.setSize()},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.setSize(),this.sizeText(),this.positionTextEditor()},ce.typeName="TextMarker",ce.title="Text marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',ce}(lt),Lt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=fe.defaultColor,oe.lineWidth=fe.defaultStrokeWidth,oe.pixelRatio=fe.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new Je("Color",fe.defaultColorSet,fe.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new xe("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.visual&&se!==this.drawingImage)},ce.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var se=Te.createTransform();this.visual.transform.baseVal.appendItem(se),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(se,he){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(se.x,se.y),this.drawing=!0):_e.prototype.pointerDown.call(this,se,he)},ce.prototype.manipulate=function(se){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(se.x,se.y),this.canvasContext.stroke()):_e.prototype.manipulate.call(this,se)},ce.prototype.resize=function(se){_e.prototype.resize.call(this,se),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ce.prototype.pointerUp=function(se){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):_e.prototype.pointerUp.call(this,se)},ce.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),_e.prototype.select.call(this)},ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),_e.prototype.deselect.call(this)},ce.prototype.finishCreation=function(){for(var se=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),he=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],fe=he[0],oe=he[1],ke=he[2],Ge=he[3],St=!1,Tt=0;Tt<this.canvasElement.height;Tt++)for(var Ot=0;Ot<this.canvasElement.width;Ot++)se.data[Tt*this.canvasElement.width*4+4*Ot+3]>0&&(St=!0,Tt<oe&&(oe=Tt),Ot<fe&&(fe=Ot),Tt>Ge&&(Ge=Tt),Ot>ke&&(ke=Ot));if(St){this.left=fe/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(ke-fe)/this.pixelRatio,this.height=(Ge-oe)/this.pixelRatio;var Wt=document.createElement("canvas");Wt.width=ke-fe,Wt.height=Ge-oe,Wt.getContext("2d").putImageData(this.canvasContext.getImageData(fe,oe,ke-fe,Ge-oe),0,0),this.drawingImgUrl=Wt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ce.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ce.prototype.setColor=function(se){this.color=se,this.colorChanged(se)},ce.prototype.setLineWidth=function(se){this.lineWidth=se},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=Object.assign({drawingImgUrl:this.drawingImgUrl},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){this.createVisual(),_e.prototype.restoreState.call(this,se),this.drawingImgUrl=se.drawingImgUrl,this.setDrawingImage()},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.setDrawingImage()},ce.typeName="FreehandMarker",ce.title="Freehand marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',ce}(lt),hn=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,fe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=he,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return Ve(ce,_e),ce.prototype.getUi=function(){var se=this,he=document.createElement("div");he.style.display="flex",he.style.overflow="hidden",he.style.flexGrow="2";for(var fe=function(Ge){var St="both";switch(Ge){case 0:St="both";break;case 1:St="start";break;case 2:St="end";break;case 3:St="none"}var Tt=document.createElement("div");if(Tt.style.display="flex",Tt.style.flexGrow="2",Tt.style.alignItems="center",Tt.style.justifyContent="space-between",Tt.style.padding="5px",Tt.style.borderWidth="2px",Tt.style.borderStyle="solid",Tt.style.borderColor=St===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Tt.addEventListener("click",function(){se.setCurrentType(St,Tt)}),he.appendChild(Tt),St==="both"||St==="start"){var Ot=document.createElement("div");Ot.style.display="flex",Ot.style.alignItems="center",Ot.style.minHeight="20px",Ot.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ot.style.marginLeft="5px",Tt.appendChild(Ot)}var Wt=document.createElement("div");Wt.style.display="flex",Wt.style.alignItems="center",Wt.style.minHeight="20px",Wt.style.flexGrow="2";var $t=document.createElement("hr");if($t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),$t.style.flexGrow="2",Wt.appendChild($t),Tt.appendChild(Wt),St==="both"||St==="end"){var Gn=document.createElement("div");Gn.style.display="flex",Gn.style.alignItems="center",Gn.style.minHeight="20px",Gn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Gn.style.marginRight="5px",Tt.appendChild(Gn)}oe.typeBoxes.push(Tt)},oe=this,ke=0;ke<4;ke++)fe(ke);return he},ce.prototype.setCurrentType=function(se,he){var fe=this;this.currentType=se,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===he?fe.uiStyleSettings!==void 0?fe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ce}(rt),ut=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new hn("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.arrow1&&se!==this.arrow2)},ce.prototype.getArrowPoints=function(se,he){var fe=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return se-fe/2+","+(he+oe/2)+" "+se+","+(he-oe/2)+" "+(se+fe/2)+","+(he+oe/2)},ce.prototype.createTips=function(){this.arrow1=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.state==="creating"&&this.createTips()},ce.prototype.adjustVisual=function(){if(_e.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",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var se=0;Math.abs(this.x1-this.x2)>.1&&(se=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var he=this.arrow1.transform.baseVal.getItem(0);he.setRotate(se,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(he,0);var fe=this.arrow2.transform.baseVal.getItem(0);fe.setRotate(se+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(fe,0)}},ce.prototype.setArrowType=function(se){this.arrowType=se,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=Object.assign({arrowType:this.arrowType},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){_e.prototype.restoreState.call(this,se);var he=se;this.arrowType=he.arrowType,this.createTips(),this.adjustVisual()},ce.typeName="ArrowMarker",ce.title="Arrow marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ce}(At),Yt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.fillColor=fe.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new Je("Color",fe.defaultColorSet,fe.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return Ve(ce,_e),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=_e.prototype.getState.call(this);return se.typeName=ce.typeName,se},ce.typeName="CoverMarker",ce.title="Cover marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ce}(Me),vn=function(_e){function ce(se,he,fe,oe){var ke=_e.call(this,se,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ke.opacities=[],ke.opacityBoxes=[],ke.opacities=he,ke.currentOpacity=fe,ke.setCurrentOpacity=ke.setCurrentOpacity.bind(ke),ke}return Ve(ce,_e),ce.prototype.getUi=function(){var se=this,he=document.createElement("div");return he.style.display="flex",he.style.overflow="hidden",he.style.flexGrow="2",he.style.justifyContent="space-between",this.opacities.forEach(function(fe){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=fe===se.currentOpacity?se.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){se.setCurrentOpacity(fe,oe)}),he.appendChild(oe);var ke=document.createElement("div");ke.innerText=100*fe+"%",oe.appendChild(ke),se.opacityBoxes.push(oe)}),he},ce.prototype.setCurrentOpacity=function(se,he){var fe=this;this.currentOpacity=se,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===he?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ce}(rt),un=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=fe.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=fe.defaultHighlightOpacity,oe.fillPanel=new Je("Color",fe.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new vn("Opacity",fe.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Ve(ce,_e),ce.prototype.setOpacity=function(se){this.opacity=se,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=_e.prototype.getState.call(this);return se.typeName=ce.typeName,se},ce.typeName="HighlightMarker",ce.title="Highlight marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',ce}(Yt),Ze='<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>',Ae='<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>',Pt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=fe.defaultStrokeColor,oe.bgColor=fe.defaultFillColor,oe.fontFamily=fe.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new Je("Text color",fe.defaultColorSet,oe.color,Ze),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new Je("Fill color",fe.defaultColorSet,oe.bgColor,Ae),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Qe("Font",fe.defaultFontFamilies,fe.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Kt,oe.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return _e.prototype.ownsTarget.call(this,se)||this.tipGrip.ownsTarget(se)||this.tip===se},ce.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ce.prototype.pointerDown=function(se,he){this.state==="new"&&_e.prototype.pointerDown.call(this,se,he),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(he)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):_e.prototype.pointerDown.call(this,se,he)},ce.prototype.pointerUp=function(se){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,_e.prototype.pointerUp.call(this,se);else{var he=this.state==="creating";_e.prototype.pointerUp.call(this,se),this.setTipPoints(he),this.positionTip()}},ce.prototype.manipulate=function(se){if(this.tipMoving){var he=this.unrotatePoint(se);this.tipPosition={x:he.x-this.manipulationStartLeft,y:he.y-this.manipulationStartTop},this.positionTip()}else _e.prototype.manipulate.call(this,se)},ce.prototype.setBgColor=function(se){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",se]]),Te.setAttributes(this.tip,[["fill",se]])),this.bgColor=se,this.fillColorChanged(se)},ce.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},ce.prototype.setTipPoints=function(se){se===void 0&&(se=!1);var he=Math.min(this.height/2,15),fe=this.height/5;se&&(this.tipPosition={x:he+fe/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,he=Math.min(this.width/2,15),this.tipBase1Position={x:he,y:0},this.tipBase2Position={x:he+fe,y:0}):(this.tipBase1Position={x:0,y:he},this.tipBase2Position={x:0,y:he+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,he=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-he-fe,y:0},this.tipBase2Position={x:this.width-he,y:0}):(this.tipBase1Position={x:this.width,y:he},this.tipBase2Position={x:this.width,y:he+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,he=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-he-fe,y:this.height},this.tipBase2Position={x:this.width-he,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-he-fe},this.tipBase2Position={x:this.width,y:this.height-he}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,he=Math.min(this.width/2,15),this.tipBase1Position={x:he,y:this.height},this.tipBase2Position={x:he+fe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-he},this.tipBase2Position={x:0,y:this.height-he-fe})},ce.prototype.resize=function(se){_e.prototype.resize.call(this,se),this.positionTip()},ce.prototype.positionTip=function(){Te.setAttributes(this.tip,[["points",this.getTipPoints()]]);var se=this.tipGrip.visual.transform.baseVal.getItem(0);se.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(se,0)},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.positionTip(),_e.prototype.select.call(this)},ce.prototype.getState=function(){var se=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){var he=se;this.bgColor=he.bgColor,this.tipPosition=he.tipPosition,_e.prototype.restoreState.call(this,se),this.createTip(),this.setTipPoints()},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.tipPosition={x:this.tipPosition.x*se,y:this.tipPosition.y*he},this.positionTip()},ce.typeName="CalloutMarker",ce.title="Callout marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',ce}(Bt),bn=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=fe.defaultColor,oe.strokeWidth=fe.defaultStrokeWidth,oe.strokeDasharray=fe.defaultStrokeDasharray,oe.fillColor=fe.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new Je("Line color",ge(fe.defaultColorSet,["transparent"]),fe.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Je("Fill color",ge(fe.defaultColorSet,["transparent"]),oe.fillColor,Ae),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new xe("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new We("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new vn("Opacity",fe.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.visual)},ce.prototype.createVisual=function(){this.visual=Te.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.state==="new"&&(this.createVisual(),this.moveVisual(se),this._state="creating")},ce.prototype.manipulate=function(se){_e.prototype.manipulate.call(this,se)},ce.prototype.resize=function(se){_e.prototype.resize.call(this,se),this.setSize()},ce.prototype.setSize=function(){_e.prototype.setSize.call(this),Te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ce.prototype.pointerUp=function(se){_e.prototype.pointerUp.call(this,se),this.setSize()},ce.prototype.setStrokeColor=function(se){this.strokeColor=se,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(se),this.stateChanged()},ce.prototype.setFillColor=function(se){this.fillColor=se,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(se),this.stateChanged()},ce.prototype.setStrokeWidth=function(se){this.strokeWidth=se,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(se){this.strokeDasharray=se,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ce.prototype.setOpacity=function(se){this.opacity=se,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){var he=se;this.fillColor=he.fillColor,this.strokeColor=he.strokeColor,this.strokeWidth=he.strokeWidth,this.strokeDasharray=he.strokeDasharray,this.opacity=he.opacity,this.createVisual(),_e.prototype.restoreState.call(this,se),this.setSize()},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.setSize()},ce.typeName="EllipseMarker",ce.title="Ellipse marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',ce}(lt),nn=function(_e){function ce(se,he,fe){return _e.call(this,se,he,fe)||this}return Ve(ce,_e),Object.defineProperty(ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.tip1&&se!==this.tip2)},ce.prototype.createTips=function(){this.tip1=Te.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(Te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Te.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(Te.createTransform()),this.visual.appendChild(this.tip2)},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.state==="creating"&&this.createTips()},ce.prototype.adjustVisual=function(){if(_e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Te.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()]]),Te.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 se=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),he=this.tip1.transform.baseVal.getItem(0);he.setRotate(se,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(he,0);var fe=this.tip2.transform.baseVal.getItem(0);fe.setRotate(se+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(fe,0)}},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=_e.prototype.getState.call(this);return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){_e.prototype.restoreState.call(this,se),this.createTips(),this.adjustVisual()},ce.typeName="MeasurementMarker",ce.title="Measurement marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',ce}(At),tt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.strokePanel.colors=fe.defaultColorSet,oe.fillColor="transparent",oe}return Ve(ce,_e),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=_e.prototype.getState.call(this);return se.typeName=ce.typeName,se},ce.typeName="EllipseFrameMarker",ce.title="Ellipse frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',ce}(bn),ot=function(){function _e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(_e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),_e.prototype.addUndoStep=function(ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ce)||(this.undoStack.push(ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ce)&&this.redoStack.splice(0,this.redoStack.length))},_e.prototype.replaceLastUndoStep=function(ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ce)},_e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},_e.prototype.undo=function(){if(this.undoStack.length>1){var ce=this.undoStack.pop();return ce!==void 0&&this.redoStack.push(ce),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},_e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},_e}(),Ht=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=fe.defaultColor,oe.strokeWidth=fe.defaultStrokeWidth,oe.strokeDasharray=fe.defaultStrokeDasharray,oe.strokePanel=new Je("Line color",fe.defaultColorSet,fe.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new xe("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new We("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.visual&&se!==this.selectorCurve&&se!==this.visibleCurve&&!this.curveGrip.ownsTarget(se))},ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ce.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=se.x,this.curveY=se.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(he)&&(this.activeGrip=this.curveGrip,this._state="resize")},ce.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ce.prototype.setupControlBox=function(){_e.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,_e.prototype.addControlGrips.call(this)},ce.prototype.positionGrips=function(){_e.prototype.positionGrips.call(this);var se=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-se/2,this.curveY-se/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},ce.prototype.manipulate=function(se){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+se.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+se.y-this.manipulationStartY),_e.prototype.manipulate.call(this,se)},ce.prototype.resize=function(se){this.activeGrip===this.curveGrip&&(this.curveX=se.x,this.curveY=se.y),_e.prototype.resize.call(this,se),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ce.prototype.setStrokeColor=function(se){this.strokeColor=se,this.adjustVisual(),this.colorChanged(se)},ce.prototype.setStrokeWidth=function(se){this.strokeWidth=se,this.adjustVisual()},ce.prototype.setStrokeDasharray=function(se){this.strokeDasharray=se,this.adjustVisual()},ce.prototype.scale=function(se,he){this.curveX=this.curveX*se,this.curveY=this.curveY*he,_e.prototype.scale.call(this,se,he)},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},_e.prototype.getState.call(this));return se.typeName=ce.typeName,se},ce.prototype.restoreState=function(se){_e.prototype.restoreState.call(this,se);var he=se;this.strokeColor=he.strokeColor,this.strokeWidth=he.strokeWidth,this.strokeDasharray=he.strokeDasharray,this.curveX=he.curveX,this.curveY=he.curveY,this.createVisual(),this.adjustVisual()},ce.typeName="CurveMarker",ce.title="Curve marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',ce}(vt),En=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,he,fe)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=fe.defaultColor,oe.strokeWidth=fe.defaultStrokeWidth,oe.strokeDasharray=fe.defaultStrokeDasharray,oe.fillColor=fe.defaultFillColor,oe.textColor=fe.defaultStrokeColor,oe.fontFamily=fe.defaultFontFamily,oe.fontSize=fe.defaultCaptionFontSize,oe.captionText=fe.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new Je("Line color",ge(fe.defaultColorSet,["transparent"]),oe.strokeColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Je("Fill color",ge(fe.defaultColorSet,["transparent"]),oe.fillColor,Ae),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new xe("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new We("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new Qe("Font",fe.defaultFontFamilies,fe.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new Je("Text color",fe.defaultColorSet,oe.textColor,Ze),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return Ve(ce,_e),ce.prototype.ownsTarget=function(se){return!(!_e.prototype.ownsTarget.call(this,se)&&se!==this.visual&&se!==this.frame&&se!==this.captionBg&&se!==this.captionElement)},ce.prototype.createVisual=function(){this.visual=Te.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Te.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Te.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=Te.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},ce.prototype.setCaptionText=function(se){this.captionText=se,this.captionElement.textContent=this.captionText,this.sizeCaption()},ce.prototype.pointerDown=function(se,he){_e.prototype.pointerDown.call(this,se,he),this.isMoved=!1,this.pointerDownPoint=se,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(se),this._state="creating")},ce.prototype.manipulate=function(se){_e.prototype.manipulate.call(this,se),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(se.x-this.pointerDownPoint.x)>5||Math.abs(se.y-this.pointerDownPoint.y)>5)},ce.prototype.resize=function(se){_e.prototype.resize.call(this,se),this.setSize()},ce.prototype.sizeCaption=function(){var se=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=se.width+2*this.PADDING,this.captionBoxHeight=se.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Te.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')"]]),Te.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},ce.prototype.showTextEditor=function(){var se=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(he){he.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(he){he.key==="Enter"&&se.finishTextEditing(se.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(he){he.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){se.finishTextEditing(se.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){se.finishTextEditing(se.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ce.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},ce.prototype.finishTextEditing=function(se){this.setCaptionText(se.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ce.prototype.setFont=function(se){this.captionElement&&Te.setAttributes(this.captionElement,[["font-family",se]]),this.fontFamily=se,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ce.prototype.setTextColor=function(se){this.captionElement&&Te.setAttributes(this.captionElement,[["fill",se]]),this.textColor=se,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ce.prototype.setSize=function(){_e.prototype.setSize.call(this),Te.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ce.prototype.pointerUp=function(se){_e.prototype.pointerUp.call(this,se),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ce.prototype.dblClick=function(se,he){_e.prototype.dblClick.call(this,se,he),this.showTextEditor()},ce.prototype.setStrokeColor=function(se){this.strokeColor=se,this.frame&&Te.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(se),this.stateChanged()},ce.prototype.setFillColor=function(se){this.fillColor=se,this.captionBg&&Te.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(se),this.stateChanged()},ce.prototype.setStrokeWidth=function(se){this.strokeWidth=se,this.frame&&Te.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(se){this.strokeDasharray=se,this.frame&&Te.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var se=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},_e.prototype.getState.call(this));return se.typeName=this.typeName,se},ce.prototype.restoreState=function(se){var he=se;this.fillColor=he.fillColor,this.strokeColor=he.strokeColor,this.strokeWidth=he.strokeWidth,this.strokeDasharray=he.strokeDasharray,this.textColor=he.textColor,this.fontFamily=he.fontFamily,this.captionText=he.captionText,this.fontSize=he.fontSize,this.createVisual(),_e.prototype.restoreState.call(this,se),this.setSize()},ce.prototype.scale=function(se,he){_e.prototype.scale.call(this,se,he),this.setSize()},ce.typeName="CaptionFrameMarker",ce.title="Caption frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',ce}(lt),fn=function(){function _e(ce,se){se===void 0&&(se=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ce,this.cancelable=se}return Object.defineProperty(_e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),_e.prototype.preventDefault=function(){this._defaultPrevented=!0},_e}(),Gt=function(_e){function ce(se,he,fe){var oe=_e.call(this,se,!1)||this;return oe.dataUrl=he,oe.state=fe,oe}return Ve(ce,_e),ce}(fn),Ft=function(_e){function ce(se,he,fe){fe===void 0&&(fe=!1);var oe=_e.call(this,se,fe)||this;return oe.marker=he,oe}return Ve(ce,_e),ce}(fn),xn=function(){function _e(){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 _e.prototype.addEventListener=function(ce,se){this[ce].push(se)},_e.prototype.removeEventListener=function(ce,se){var he=this[ce].indexOf(se);he>-1&&this[ce].splice(he,1)},_e}(),gn=function(){function _e(ce){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Et,this._isOpen=!1,this.undoRedoManager=new ot,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 xn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=_e.instanceCounter++,this.styles=new Pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ce,this.targetRoot=document.body,this.width=ce.clientWidth,this.height=ce.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(_e.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,Lt,ut,Bt,tt,bn,un,Pt,nn,Yt,At,Ht,En]},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,Lt,ut,Bt,bn,un,Pt]},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,Lt,ut,Bt,un]},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ce){var se=this;this._availableMarkerTypes.splice(0),ce.forEach(function(he){if(typeof he=="string"){var fe=se.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===he});fe!==void 0&&se._availableMarkerTypes.push(fe)}else se._availableMarkerTypes.push(he)})},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ce){this._zoomLevel=ce,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),_e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},_e.prototype.show=function(){var ce=this;this.styles.styleSheetRoot===void 0&&me.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=me.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(se){return se(new fn(ce))})},_e.prototype.render=function(){return $e(this,void 0,void 0,function(){var ce;return et(this,function(se){switch(se.label){case 0:return this.setCurrentMarker(),(ce=new Se).naturalSize=this.renderAtNaturalSize,ce.imageType=this.renderImageType,ce.imageQuality=this.renderImageQuality,ce.markersOnly=this.renderMarkersOnly,ce.width=this.renderWidth,ce.height=this.renderHeight,[4,ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return se.sent(),[4,ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,se.sent()]}})})},_e.prototype.close=function(ce){var se=this;if(ce===void 0&&(ce=!1),this.isOpen){var he=!1;ce||this.eventListeners.beforeclose.forEach(function(fe){var oe=new fn(se,!0);fe(oe),oe.defaultPrevented&&(he=!0)}),he||(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 fn(se))}),this.detachEvents(),this._isOpen=!1)}},_e.prototype.addMarkersToToolbar=function(){for(var ce,se=[],he=0;he<arguments.length;he++)se[he]=arguments[he];(ce=this._availableMarkerTypes).push.apply(ce,se)},_e.prototype.addRenderEventListener=function(ce){this.addEventListener("render",function(se){ce(se.dataUrl,se.state)})},_e.prototype.removeRenderEventListener=function(ce){},_e.prototype.addCloseEventListener=function(ce){this.addEventListener("close",function(){ce()})},_e.prototype.removeCloseEventListener=function(ce){},_e.prototype.setupResizeObserver=function(){var ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ce.resize(ce.target.clientWidth,ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},_e.prototype.onPopupTargetResize=function(){var ce=1*this.target.clientWidth/this.target.clientHeight,se=this.editorCanvas.clientWidth/ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ce:this.editorCanvas.clientWidth,he=se<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ce;this.resize(se,he)},_e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},_e.prototype.resize=function(ce,se){this._isResizing=!0;var he=ce/this.imageWidth,fe=se/this.imageHeight;this.imageWidth=Math.round(ce),this.imageHeight=Math.round(se),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(he,fe),this._isResizing=!1},_e.prototype.scaleMarkers=function(ce,se){var he,fe=this;this._currentMarker&&this._currentMarker instanceof Bt?this._currentMarker.scale(ce,se):(he=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==fe._currentMarker&&oe.scale(ce,se)}),he!==void 0&&this.setCurrentMarker(he)},_e.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"},_e.prototype.setTopLeft=function(){var ce=this.editingTarget.getBoundingClientRect(),se=this.editorCanvas.getBoundingClientRect();this.left=ce.left-se.left,this.top=ce.top-se.top},_e.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)},_e.prototype.addDefs=function(){for(var ce,se=[],he=0;he<arguments.length;he++)se[he]=arguments[he];this.defs=Te.createDefs(),this.addDefsToImage(),(ce=this.defs).append.apply(ce,se)},_e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},_e.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)},_e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},_e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},_e.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)},_e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},_e.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)},_e.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var ce=document.createElement("a");ce.href="https://markerjs.com/",ce.target="_blank",ce.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',ce.title="Powered by marker.js",ce.style.display="grid",ce.style.alignItems="center",ce.style.justifyItems="center",ce.style.padding="3px",ce.style.width="20px",ce.style.height="20px",this.logoUI.appendChild(ce),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},_e.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")},_e.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"},_e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},_e.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var ce=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ce+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ht(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 nt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},_e.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},_e.prototype.removeMarker=function(ce){this.markerImage.removeChild(ce.container),this.markers.indexOf(ce)>-1&&this.markers.splice(this.markers.indexOf(ce),1),ce.dispose()},_e.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())},_e.prototype.toolbarButtonClicked=function(ce,se){if(ce==="marker"&&se!==void 0)this.createNewMarker(se);else if(ce==="action")switch(se){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()}},_e.prototype.deleteSelectedMarker=function(){var ce=this;if(this._currentMarker!==void 0){var se=!1;if(this.eventListeners.markerbeforedelete.forEach(function(fe){var oe=new Ft(ce,ce._currentMarker,!0);fe(oe),oe.defaultPrevented&&(se=!0)}),!se){var he=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 Ft(ce,he))})}}},_e.prototype.clear=function(){var ce=this,se=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ke){var Ge=new Ft(ce,void 0,!0);ke(Ge),Ge.defaultPrevented&&(se=!0)}),!se)){this.setCurrentMarker();for(var he=function(ke){var Ge=fe.markers[ke];fe.setCurrentMarker(fe.markers[ke]),fe._currentMarker.dispose(),fe.markerImage.removeChild(fe._currentMarker.container),fe.markers.splice(fe.markers.indexOf(fe._currentMarker),1),fe.eventListeners.markerdelete.forEach(function(St){return St(new Ft(ce,Ge))})},fe=this,oe=this.markers.length-1;oe>=0;oe--)he(oe);this.addUndoStep()}},Object.defineProperty(_e.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),_e.prototype.showNotesEditor=function(){var ce;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(ce=this._currentMarker.notes)!==null&&ce!==void 0?ce:"",this.overlayContainer.appendChild(this.notesArea))},_e.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)},_e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},_e.prototype.addUndoStep=function(){var ce=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var se=this.getState(),he=this.undoRedoManager.getLastUndoStep();if(!he||he.width===se.width&&he.height===se.height){var fe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(se),fe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new fn(ce))})}else this.undoRedoManager.replaceLastUndoStep(se),this.eventListeners.statechange.forEach(function(oe){return oe(new fn(ce))})}},_e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},_e.prototype.undoStep=function(){var ce=this,se=this.undoRedoManager.undo();se!==void 0&&(this.restoreState(se),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(he){return he(new fn(ce))}))},_e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},_e.prototype.redoStep=function(){var ce=this,se=this.undoRedoManager.redo();se!==void 0&&(this.restoreState(se),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(he){return he(new fn(ce))}))},_e.prototype.stepZoom=function(){var ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ce<this.zoomSteps.length-1?this.zoomSteps[ce+1]:this.zoomSteps[0]},_e.prototype.panTo=function(ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ce.x,top:this.prevPanPoint.y-ce.y}),this.prevPanPoint=ce},_e.prototype.startRenderAndClose=function(){return $e(this,void 0,void 0,function(){var ce,se,he=this;return et(this,function(fe){switch(fe.label){case 0:return[4,this.render()];case 1:return ce=fe.sent(),se=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new Gt(he,ce,se))}),this.close(!0),[2]}})})},_e.prototype.getState=function(ce){ce===!0&&this.setCurrentMarker();var se={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(he){return se.markers.push(he.getState())}),se},_e.prototype.restoreState=function(ce){var se=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ce.markers.forEach(function(he){var fe=se._availableMarkerTypes.find(function(ke){return ke.typeName===he.typeName});if(fe!==void 0){var oe=se.addNewMarker(fe);oe.restoreState(he),se.markers.push(oe)}}),ce.width&&ce.height&&(ce.width!==this.imageWidth||ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ce.width,this.imageHeight/ce.height),this.eventListeners.restorestate.forEach(function(he){return he(new fn(se))})},_e.prototype.addNewMarker=function(ce){var se=Te.createGroup();return this.markerImage.appendChild(se),new ce(se,this.overlayContainer,this.settings)},_e.prototype.createNewMarker=function(ce){var se,he=this;(se=typeof ce=="string"?this._availableMarkerTypes.find(function(fe){return fe.typeName===ce}):ce)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(se),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(se.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(fe){return fe(new Ft(he,he._currentMarker))}))},_e.prototype.markerCreated=function(ce){var se=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ce),this.setCurrentMarker(ce),ce instanceof Lt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Lt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(he){return he(new Ft(se,se._currentMarker))})},_e.prototype.colorChanged=function(ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ce,this.settings.defaultStrokeColor=ce)},_e.prototype.fillColorChanged=function(ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ce)},_e.prototype.markerStateChanged=function(ce){var se=this;this.eventListeners.markerchange.forEach(function(he){return he(new Ft(se,ce))})},_e.prototype.setCurrentMarker=function(ce){var se=this;this._currentMarker!==ce&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(he){return he(new Ft(se,se._currentMarker))})),this._currentMarker=ce,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(he){return he(new Ft(se,se._currentMarker))}))},_e.prototype.onPointerDown=function(ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ce.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var se=this.markers.find(function(he){return he.ownsTarget(ce.target)});se!==void 0?(this.setCurrentMarker(se),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ce.clientX,ce.clientY),ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ce.clientX,y:ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ce.clientX,ce.clientY))},_e.prototype.onDblClick=function(ce){if(this._isFocused||this.focus(),this.mode==="select"){var se=this.markers.find(function(he){return he.ownsTarget(ce.target)});se!==void 0&&se!==this._currentMarker&&this.setCurrentMarker(se),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ce.clientX,ce.clientY),ce.target):this.setCurrentMarker()}},_e.prototype.onPointerMove=function(ce){this.touchPoints!==1&&ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ce.clientX,ce.clientY)):this.zoomLevel>1&&this.panTo({x:ce.clientX,y:ce.clientY}))},_e.prototype.onPointerUp=function(ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ce.clientX,ce.clientY)),this.isDragging=!1,this.addUndoStep()},_e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},_e.prototype.onKeyUp=function(ce){this._currentMarker===void 0||this.notesArea!==void 0||ce.key!=="Delete"&&ce.key!=="Backspace"||this.deleteSelectedMarker()},_e.prototype.clientToLocalCoordinates=function(ce,se){var he=this.markerImage.getBoundingClientRect();return{x:(ce-he.left)/this.zoomLevel,y:(se-he.top)/this.zoomLevel}},_e.prototype.onWindowResize=function(){this.positionUI()},_e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ce+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},_e.prototype.addLicenseKey=function(ce){Le.addKey(ce)},_e.prototype.addEventListener=function(ce,se){this.eventListeners.addEventListener(ce,se)},_e.prototype.removeEventListener=function(ce,se){this.eventListeners.removeEventListener(ce,se)},_e.prototype.renderState=function(ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(_e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),_e.prototype.focus=function(){var ce=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(se){return se(new fn(ce))}))},_e.prototype.blur=function(){var ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(se){return se(new fn(ce))}))},_e.instanceCounter=0,_e}()},95860:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ye}});var be=le(87462),Ve=le(1413),$e=le(4942),et=le(97685),ge=le(45987),Te=le(94184),Le=le.n(Te),Se=le(67294);function me(lt){var Me=Se.useRef();Me.current=lt;var xe=Se.useCallback(function(){for(var We,je=arguments.length,Et=new Array(je),vt=0;vt<je;vt++)Et[vt]=arguments[vt];return(We=Me.current)===null||We===void 0?void 0:We.call.apply(We,[Me].concat(Et))},[]);return xe}function Pe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var at=Pe()?Se.useLayoutEffect:Se.useEffect,Oe=function(Me,xe){var We=Se.useRef(!0);at(function(){return Me(We.current)},xe),at(function(){return We.current=!1,function(){We.current=!0}},[])},ht=function(Me,xe){Oe(function(We){if(!We)return Me()},xe)},nt=null;function rt(lt){var Me=Se.useRef(!1),xe=Se.useState(lt),We=(0,et.Z)(xe,2),je=We[0],Et=We[1];Se.useEffect(function(){return Me.current=!1,function(){Me.current=!0}},[]);function vt(At,Qe){Qe&&Me.current||Et(At)}return[je,vt]}function Je(lt){return lt!==void 0}function Ee(lt,Me){var xe=Me||{},We=xe.defaultValue,je=xe.value,Et=xe.onChange,vt=xe.postState,At=rt(function(){return Je(je)?je:Je(We)?typeof We=="function"?We():We:typeof lt=="function"?lt():lt}),Qe=(0,et.Z)(At,2),Bt=Qe[0],Lt=Qe[1],hn=je!==void 0?je:Bt,ut=vt?vt(hn):hn,Yt=me(Et),vn=rt([hn]),un=(0,et.Z)(vn,2),Ze=un[0],Ae=un[1];ht(function(){var bn=Ze[0];Bt!==bn&&Yt(Bt,bn)},[Ze]),ht(function(){Je(je)||Lt(je)},[je]);var Pt=me(function(bn,nn){Lt(bn,nn),Ae([hn],nn)});return[ut,Pt]}var pt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Kt=(0,Se.forwardRef)(function(lt,Me){var xe,We=lt.prefixCls,je=We===void 0?"rc-checkbox":We,Et=lt.className,vt=lt.style,At=lt.checked,Qe=lt.disabled,Bt=lt.defaultChecked,Lt=Bt===void 0?!1:Bt,hn=lt.type,ut=hn===void 0?"checkbox":hn,Yt=lt.title,vn=lt.onChange,un=(0,ge.Z)(lt,pt),Ze=(0,Se.useRef)(null),Ae=Ee(Lt,{value:At}),Pt=(0,et.Z)(Ae,2),bn=Pt[0],nn=Pt[1];(0,Se.useImperativeHandle)(Me,function(){return{focus:function(){var En;(En=Ze.current)===null||En===void 0||En.focus()},blur:function(){var En;(En=Ze.current)===null||En===void 0||En.blur()},input:Ze.current}});var tt=Le()(je,Et,(xe={},(0,$e.Z)(xe,"".concat(je,"-checked"),bn),(0,$e.Z)(xe,"".concat(je,"-disabled"),Qe),xe)),ot=function(En){Qe||("checked"in lt||nn(En.target.checked),vn==null||vn({target:(0,Ve.Z)((0,Ve.Z)({},lt),{},{type:ut,checked:En.target.checked}),stopPropagation:function(){En.stopPropagation()},preventDefault:function(){En.preventDefault()},nativeEvent:En.nativeEvent}))};return Se.createElement("span",{className:tt,title:Yt,style:vt},Se.createElement("input",(0,be.Z)({},un,{className:"".concat(je,"-input"),ref:Ze,onChange:ot,disabled:Qe,checked:!!bn,type:ut})),Se.createElement("span",{className:"".concat(je,"-inner")}))}),Ye=Kt},26819:function(mn,Vt){"use strict";var le;var be=typeof Symbol=="function"&&Symbol.for,Ve=be?Symbol.for("react.element"):60103,$e=be?Symbol.for("react.portal"):60106,et=be?Symbol.for("react.fragment"):60107,ge=be?Symbol.for("react.strict_mode"):60108,Te=be?Symbol.for("react.profiler"):60114,Le=be?Symbol.for("react.provider"):60109,Se=be?Symbol.for("react.context"):60110,me=be?Symbol.for("react.async_mode"):60111,Pe=be?Symbol.for("react.concurrent_mode"):60111,at=be?Symbol.for("react.forward_ref"):60112,Oe=be?Symbol.for("react.suspense"):60113,ht=be?Symbol.for("react.suspense_list"):60120,nt=be?Symbol.for("react.memo"):60115,rt=be?Symbol.for("react.lazy"):60116,Je=be?Symbol.for("react.block"):60121,Ee=be?Symbol.for("react.fundamental"):60117,pt=be?Symbol.for("react.responder"):60118,Kt=be?Symbol.for("react.scope"):60119;function Ye(Me){if(typeof Me=="object"&&Me!==null){var xe=Me.$$typeof;switch(xe){case Ve:switch(Me=Me.type,Me){case me:case Pe:case et:case Te:case ge:case Oe:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case Se:case at:case rt:case nt:case Le:return Me;default:return xe}}case $e:return xe}}}function lt(Me){return Ye(Me)===Pe}le=me,le=Pe,le=Se,le=Le,le=Ve,le=at,le=et,le=rt,le=nt,le=$e,le=Te,le=ge,le=Oe,le=function(Me){return lt(Me)||Ye(Me)===me},le=lt,le=function(Me){return Ye(Me)===Se},le=function(Me){return Ye(Me)===Le},le=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===Ve},le=function(Me){return Ye(Me)===at},le=function(Me){return Ye(Me)===et},le=function(Me){return Ye(Me)===rt},Vt.isMemo=function(Me){return Ye(Me)===nt},le=function(Me){return Ye(Me)===$e},le=function(Me){return Ye(Me)===Te},le=function(Me){return Ye(Me)===ge},le=function(Me){return Ye(Me)===Oe},le=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===et||Me===Pe||Me===Te||Me===ge||Me===Oe||Me===ht||typeof Me=="object"&&Me!==null&&(Me.$$typeof===rt||Me.$$typeof===nt||Me.$$typeof===Le||Me.$$typeof===Se||Me.$$typeof===at||Me.$$typeof===Ee||Me.$$typeof===pt||Me.$$typeof===Kt||Me.$$typeof===Je)},le=Ye},18459:function(mn,Vt,le){"use strict";mn.exports=le(26819)},16651:function(mn,Vt){"use strict";var le;var be=Symbol.for("react.element"),Ve=Symbol.for("react.portal"),$e=Symbol.for("react.fragment"),et=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),Le=Symbol.for("react.context"),Se=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),ht=Symbol.for("react.lazy"),nt=Symbol.for("react.offscreen"),rt;rt=Symbol.for("react.module.reference");function Je(Ee){if(typeof Ee=="object"&&Ee!==null){var pt=Ee.$$typeof;switch(pt){case be:switch(Ee=Ee.type,Ee){case $e:case ge:case et:case Pe:case at:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case Se:case Le:case me:case ht:case Oe:case Te:return Ee;default:return pt}}case Ve:return pt}}}le=Le,le=Te,le=be,le=me,le=$e,le=ht,le=Oe,le=Ve,le=ge,le=et,le=Pe,le=at,le=function(){return!1},le=function(){return!1},le=function(Ee){return Je(Ee)===Le},le=function(Ee){return Je(Ee)===Te},le=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===be},le=function(Ee){return Je(Ee)===me},le=function(Ee){return Je(Ee)===$e},le=function(Ee){return Je(Ee)===ht},le=function(Ee){return Je(Ee)===Oe},le=function(Ee){return Je(Ee)===Ve},le=function(Ee){return Je(Ee)===ge},le=function(Ee){return Je(Ee)===et},le=function(Ee){return Je(Ee)===Pe},le=function(Ee){return Je(Ee)===at},le=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===$e||Ee===ge||Ee===et||Ee===Pe||Ee===at||Ee===nt||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===ht||Ee.$$typeof===Oe||Ee.$$typeof===Te||Ee.$$typeof===Le||Ee.$$typeof===me||Ee.$$typeof===rt||Ee.getModuleId!==void 0)},le=Je},33993:function(mn,Vt,le){"use strict";le(16651)},82523:function(mn,Vt){"use strict";var le;var be=Symbol.for("react.element"),Ve=Symbol.for("react.portal"),$e=Symbol.for("react.fragment"),et=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),Le=Symbol.for("react.context"),Se=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),ht=Symbol.for("react.lazy"),nt=Symbol.for("react.offscreen"),rt;rt=Symbol.for("react.module.reference");function Je(Ee){if(typeof Ee=="object"&&Ee!==null){var pt=Ee.$$typeof;switch(pt){case be:switch(Ee=Ee.type,Ee){case $e:case ge:case et:case Pe:case at:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case Se:case Le:case me:case ht:case Oe:case Te:return Ee;default:return pt}}case Ve:return pt}}}le=Le,le=Te,le=be,le=me,le=$e,le=ht,le=Oe,le=Ve,le=ge,le=et,le=Pe,le=at,le=function(){return!1},le=function(){return!1},le=function(Ee){return Je(Ee)===Le},le=function(Ee){return Je(Ee)===Te},le=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===be},le=function(Ee){return Je(Ee)===me},le=function(Ee){return Je(Ee)===$e},le=function(Ee){return Je(Ee)===ht},le=function(Ee){return Je(Ee)===Oe},le=function(Ee){return Je(Ee)===Ve},le=function(Ee){return Je(Ee)===ge},le=function(Ee){return Je(Ee)===et},le=function(Ee){return Je(Ee)===Pe},le=function(Ee){return Je(Ee)===at},le=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===$e||Ee===ge||Ee===et||Ee===Pe||Ee===at||Ee===nt||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===ht||Ee.$$typeof===Oe||Ee.$$typeof===Te||Ee.$$typeof===Le||Ee.$$typeof===me||Ee.$$typeof===rt||Ee.getModuleId!==void 0)},le=Je},27183:function(mn,Vt,le){"use strict";le(82523)},67656:function(mn,Vt,le){"use strict";le.r(Vt),le.d(Vt,{BaseInput:function(){return Pe},default:function(){return Kt}});var be=le(87462),Ve=le(1413),$e=le(4942),et=le(71002),ge=le(94184),Te=le.n(ge),Le=le(67294),Se=le(87887),me=function(lt){var Me,xe,We=lt.inputElement,je=lt.prefixCls,Et=lt.prefix,vt=lt.suffix,At=lt.addonBefore,Qe=lt.addonAfter,Bt=lt.className,Lt=lt.style,hn=lt.disabled,ut=lt.readOnly,Yt=lt.focused,vn=lt.triggerFocus,un=lt.allowClear,Ze=lt.value,Ae=lt.handleReset,Pt=lt.hidden,bn=lt.classes,nn=lt.classNames,tt=lt.dataAttrs,ot=lt.styles,Ht=lt.components,En=(Ht==null?void 0:Ht.affixWrapper)||"span",fn=(Ht==null?void 0:Ht.groupWrapper)||"span",Gt=(Ht==null?void 0:Ht.wrapper)||"span",Ft=(Ht==null?void 0:Ht.groupAddon)||"span",xn=(0,Le.useRef)(null),gn=function(Wt){var $t;($t=xn.current)!==null&&$t!==void 0&&$t.contains(Wt.target)&&(vn==null||vn())},_e=function(){var Wt;if(!un)return null;var $t=!hn&&!ut&&Ze,Gn="".concat(je,"-clear-icon"),ar=(0,et.Z)(un)==="object"&&un!==null&&un!==void 0&&un.clearIcon?un.clearIcon:"\u2716";return Le.createElement("span",{onClick:Ae,onMouseDown:function(tn){return tn.preventDefault()},className:Te()(Gn,(Wt={},(0,$e.Z)(Wt,"".concat(Gn,"-hidden"),!$t),(0,$e.Z)(Wt,"".concat(Gn,"-has-suffix"),!!vt),Wt)),role:"button",tabIndex:-1},ar)},ce=(0,Le.cloneElement)(We,{value:Ze,hidden:Pt,className:Te()((Me=We.props)===null||Me===void 0?void 0:Me.className,!(0,Se.X3)(lt)&&!(0,Se.He)(lt)&&Bt)||null,style:(0,Ve.Z)((0,Ve.Z)({},(xe=We.props)===null||xe===void 0?void 0:xe.style),!(0,Se.X3)(lt)&&!(0,Se.He)(lt)?Lt:{})});if((0,Se.X3)(lt)){var se,he="".concat(je,"-affix-wrapper"),fe=Te()(he,(se={},(0,$e.Z)(se,"".concat(he,"-disabled"),hn),(0,$e.Z)(se,"".concat(he,"-focused"),Yt),(0,$e.Z)(se,"".concat(he,"-readonly"),ut),(0,$e.Z)(se,"".concat(he,"-input-with-clear-btn"),vt&&un&&Ze),se),!(0,Se.He)(lt)&&Bt,bn==null?void 0:bn.affixWrapper,nn==null?void 0:nn.affixWrapper),oe=(vt||un)&&Le.createElement("span",{className:Te()("".concat(je,"-suffix"),nn==null?void 0:nn.suffix),style:ot==null?void 0:ot.suffix},_e(),vt);ce=Le.createElement(En,(0,be.Z)({className:fe,style:(0,Ve.Z)((0,Ve.Z)({},(0,Se.He)(lt)?void 0:Lt),ot==null?void 0:ot.affixWrapper),hidden:!(0,Se.He)(lt)&&Pt,onClick:gn},tt==null?void 0:tt.affixWrapper,{ref:xn}),Et&&Le.createElement("span",{className:Te()("".concat(je,"-prefix"),nn==null?void 0:nn.prefix),style:ot==null?void 0:ot.prefix},Et),(0,Le.cloneElement)(We,{value:Ze,hidden:null}),oe)}if((0,Se.He)(lt)){var ke="".concat(je,"-group"),Ge="".concat(ke,"-addon"),St=Te()("".concat(je,"-wrapper"),ke,bn==null?void 0:bn.wrapper),Tt=Te()("".concat(je,"-group-wrapper"),Bt,bn==null?void 0:bn.group);return Le.createElement(fn,{className:Tt,style:Lt,hidden:Pt},Le.createElement(Gt,{className:St},At&&Le.createElement(Ft,{className:Ge},At),(0,Le.cloneElement)(ce,{hidden:null}),Qe&&Le.createElement(Ft,{className:Ge},Qe)))}return ce},Pe=me,at=le(74902),Oe=le(97685),ht=le(45987),nt=le(21770),rt=le(98423),Je=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Ee=(0,Le.forwardRef)(function(Ye,lt){var Me=Ye.autoComplete,xe=Ye.onChange,We=Ye.onFocus,je=Ye.onBlur,Et=Ye.onPressEnter,vt=Ye.onKeyDown,At=Ye.prefixCls,Qe=At===void 0?"rc-input":At,Bt=Ye.disabled,Lt=Ye.htmlSize,hn=Ye.className,ut=Ye.maxLength,Yt=Ye.suffix,vn=Ye.showCount,un=Ye.type,Ze=un===void 0?"text":un,Ae=Ye.classes,Pt=Ye.classNames,bn=Ye.styles,nn=(0,ht.Z)(Ye,Je),tt=(0,nt.Z)(Ye.defaultValue,{value:Ye.value}),ot=(0,Oe.Z)(tt,2),Ht=ot[0],En=ot[1],fn=(0,Le.useState)(!1),Gt=(0,Oe.Z)(fn,2),Ft=Gt[0],xn=Gt[1],gn=(0,Le.useRef)(null),_e=function(Tt){gn.current&&(0,Se.nH)(gn.current,Tt)};(0,Le.useImperativeHandle)(lt,function(){return{focus:_e,blur:function(){var Tt;(Tt=gn.current)===null||Tt===void 0||Tt.blur()},setSelectionRange:function(Tt,Ot,Wt){var $t;($t=gn.current)===null||$t===void 0||$t.setSelectionRange(Tt,Ot,Wt)},select:function(){var Tt;(Tt=gn.current)===null||Tt===void 0||Tt.select()},input:gn.current}}),(0,Le.useEffect)(function(){xn(function(St){return St&&Bt?!1:St})},[Bt]);var ce=function(Tt){Ye.value===void 0&&En(Tt.target.value),gn.current&&(0,Se.rJ)(gn.current,Tt,xe)},se=function(Tt){Et&&Tt.key==="Enter"&&Et(Tt),vt==null||vt(Tt)},he=function(Tt){xn(!0),We==null||We(Tt)},fe=function(Tt){xn(!1),je==null||je(Tt)},oe=function(Tt){En(""),_e(),gn.current&&(0,Se.rJ)(gn.current,Tt,xe)},ke=function(){var Tt=(0,rt.Z)(Ye,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Le.createElement("input",(0,be.Z)({autoComplete:Me},Tt,{onChange:ce,onFocus:he,onBlur:fe,onKeyDown:se,className:Te()(Qe,(0,$e.Z)({},"".concat(Qe,"-disabled"),Bt),Pt==null?void 0:Pt.input),style:bn==null?void 0:bn.input,ref:gn,size:Lt,type:Ze}))},Ge=function(){var Tt=Number(ut)>0;if(Yt||vn){var Ot=(0,Se.D7)(Ht),Wt=(0,at.Z)(Ot).length,$t=(0,et.Z)(vn)==="object"?vn.formatter({value:Ot,count:Wt,maxLength:ut}):"".concat(Wt).concat(Tt?" / ".concat(ut):"");return Le.createElement(Le.Fragment,null,!!vn&&Le.createElement("span",{className:Te()("".concat(Qe,"-show-count-suffix"),(0,$e.Z)({},"".concat(Qe,"-show-count-has-suffix"),!!Yt),Pt==null?void 0:Pt.count),style:(0,Ve.Z)({},bn==null?void 0:bn.count)},$t),Yt)}return null};return Le.createElement(Pe,(0,be.Z)({},nn,{prefixCls:Qe,className:hn,inputElement:ke(),handleReset:oe,value:(0,Se.D7)(Ht),focused:Ft,triggerFocus:_e,suffix:Ge(),disabled:Bt,classes:Ae,classNames:Pt,styles:bn}))}),pt=Ee,Kt=pt},87887:function(mn,Vt,le){"use strict";le.d(Vt,{D7:function(){return ge},He:function(){return be},X3:function(){return Ve},nH:function(){return et},rJ:function(){return $e}});function be(Te){return!!(Te.addonBefore||Te.addonAfter)}function Ve(Te){return!!(Te.prefix||Te.suffix||Te.allowClear)}function $e(Te,Le,Se,me){if(Se){var Pe=Le;if(Le.type==="click"){var at=Te.cloneNode(!0);Pe=Object.create(Le,{target:{value:at},currentTarget:{value:at}}),at.value="",Se(Pe);return}if(me!==void 0){Pe=Object.create(Le,{target:{value:Te},currentTarget:{value:Te}}),Te.value=me,Se(Pe);return}Se(Pe)}}function et(Te,Le){if(Te){Te.focus(Le);var Se=Le||{},me=Se.cursor;if(me){var Pe=Te.value.length;switch(me){case"start":Te.setSelectionRange(0,0);break;case"end":Te.setSelectionRange(Pe,Pe);break;default:Te.setSelectionRange(0,Pe)}}}}function ge(Te){return typeof Te=="undefined"||Te===null?"":String(Te)}},78595:function(mn,Vt,le){"use strict";le.d(Vt,{iz:function(){return $r},ck:function(){return ui},BW:function(){return Tr},sN:function(){return ui},Wd:function(){return zt},ZP:function(){return Fe},Xl:function(){return $t}});var be=le(87462),Ve=le(4942),$e=le(1413),et=le(74902),ge=le(97685),Te=le(45987),Le=le(94184),Se=le.n(Le),me=le(67294),Pe=le(48555);function at(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Oe=at()?me.useLayoutEffect:me.useEffect,ht=function(Ue,it){var ft=me.useRef(!0);Oe(function(){return Ue(ft.current)},it),Oe(function(){return ft.current=!1,function(){ft.current=!0}},[])},nt=function(Ue,it){ht(function(ft){if(!ft)return Ue()},it)},rt=ht,Je=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ee=void 0;function pt(Ne,Ue){var it=Ne.prefixCls,ft=Ne.invalidate,xt=Ne.item,Xt=Ne.renderItem,Qt=Ne.responsive,zn=Ne.responsiveDisabled,nr=Ne.registerSize,Rn=Ne.itemKey,on=Ne.className,rn=Ne.style,yn=Ne.children,Mn=Ne.display,er=Ne.order,Hn=Ne.component,$n=Hn===void 0?"div":Hn,Un=(0,Te.Z)(Ne,Je),Wn=Qt&&!Mn;function ir(qt){nr(Rn,qt)}me.useEffect(function(){return function(){ir(null)}},[]);var ze=Xt&&xt!==Ee?Xt(xt):yn,Ke;ft||(Ke={opacity:Wn?0:1,height:Wn?0:Ee,overflowY:Wn?"hidden":Ee,order:Qt?er:Ee,pointerEvents:Wn?"none":Ee,position:Wn?"absolute":Ee});var kt={};Wn&&(kt["aria-hidden"]=!0);var yt=me.createElement($n,(0,be.Z)({className:Se()(!ft&&it,on),style:(0,$e.Z)((0,$e.Z)({},Ke),rn)},kt,Un,{ref:Ue}),ze);return Qt&&(yt=me.createElement(Pe.Z,{onResize:function(dn){var sn=dn.offsetWidth;ir(sn)},disabled:zn},yt)),yt}var Kt=me.forwardRef(pt);Kt.displayName="Item";var Ye=Kt;function lt(Ne){var Ue=me.useRef();Ue.current=Ne;var it=me.useCallback(function(){for(var ft,xt=arguments.length,Xt=new Array(xt),Qt=0;Qt<xt;Qt++)Xt[Qt]=arguments[Qt];return(ft=Ue.current)===null||ft===void 0?void 0:ft.call.apply(ft,[Ue].concat(Xt))},[]);return it}var Me=le(73935),xe=function(Ue){return+setTimeout(Ue,16)},We=function(Ue){return clearTimeout(Ue)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(xe=function(Ue){return window.requestAnimationFrame(Ue)},We=function(Ue){return window.cancelAnimationFrame(Ue)});var je=0,Et=new Map;function vt(Ne){Et.delete(Ne)}var At=function(Ue){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;je+=1;var ft=je;function xt(Xt){if(Xt===0)vt(ft),Ue();else{var Qt=xe(function(){xt(Xt-1)});Et.set(ft,Qt)}}return xt(it),ft};At.cancel=function(Ne){var Ue=Et.get(Ne);return vt(Ue),We(Ue)};var Qe=At;function Bt(Ne){if(typeof MessageChannel=="undefined")Qe(Ne);else{var Ue=new MessageChannel;Ue.port1.onmessage=function(){return Ne()},Ue.port2.postMessage(void 0)}}function Lt(){var Ne=me.useRef(null),Ue=function(ft){Ne.current||(Ne.current=[],Bt(function(){(0,Me.unstable_batchedUpdates)(function(){Ne.current.forEach(function(xt){xt()}),Ne.current=null})})),Ne.current.push(ft)};return Ue}function hn(Ne,Ue){var it=me.useState(Ue),ft=(0,ge.Z)(it,2),xt=ft[0],Xt=ft[1],Qt=lt(function(zn){Ne(function(){Xt(zn)})});return[xt,Qt]}var ut=me.createContext(null),Yt=["component"],vn=["className"],un=["className"],Ze=function(Ue,it){var ft=me.useContext(ut);if(!ft){var xt=Ue.component,Xt=xt===void 0?"div":xt,Qt=(0,Te.Z)(Ue,Yt);return me.createElement(Xt,(0,be.Z)({},Qt,{ref:it}))}var zn=ft.className,nr=(0,Te.Z)(ft,vn),Rn=Ue.className,on=(0,Te.Z)(Ue,un);return me.createElement(ut.Provider,{value:null},me.createElement(Ye,(0,be.Z)({ref:it,className:Se()(zn,Rn)},nr,on)))},Ae=me.forwardRef(Ze);Ae.displayName="RawItem";var Pt=Ae,bn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],nn="responsive",tt="invalidate";function ot(Ne){return"+ ".concat(Ne.length," ...")}function Ht(Ne,Ue){var it=Ne.prefixCls,ft=it===void 0?"rc-overflow":it,xt=Ne.data,Xt=xt===void 0?[]:xt,Qt=Ne.renderItem,zn=Ne.renderRawItem,nr=Ne.itemKey,Rn=Ne.itemWidth,on=Rn===void 0?10:Rn,rn=Ne.ssr,yn=Ne.style,Mn=Ne.className,er=Ne.maxCount,Hn=Ne.renderRest,$n=Ne.renderRawRest,Un=Ne.suffix,Wn=Ne.component,ir=Wn===void 0?"div":Wn,ze=Ne.itemComponent,Ke=Ne.onVisibleChange,kt=(0,Te.Z)(Ne,bn),yt=rn==="full",qt=Lt(),dn=hn(qt,null),sn=(0,ge.Z)(dn,2),Dn=sn[0],Sn=sn[1],Jt=Dn||0,Ln=hn(qt,new Map),Pn=(0,ge.Z)(Ln,2),rr=Pn[0],Tn=Pn[1],pr=hn(qt,0),Pr=(0,ge.Z)(pr,2),br=Pr[0],_r=Pr[1],lr=hn(qt,0),Cr=(0,ge.Z)(lr,2),Br=Cr[0],Kr=Cr[1],xr=hn(qt,0),Ur=(0,ge.Z)(xr,2),di=Ur[0],zi=Ur[1],Li=(0,me.useState)(null),mi=(0,ge.Z)(Li,2),Oi=mi[0],Ri=mi[1],Yr=(0,me.useState)(null),gi=(0,ge.Z)(Yr,2),Or=gi[0],jr=gi[1],oi=me.useMemo(function(){return Or===null&&yt?Number.MAX_SAFE_INTEGER:Or||0},[Or,Dn]),Ai=(0,me.useState)(!1),Na=(0,ge.Z)(Ai,2),$a=Na[0],La=Na[1],Ji="".concat(ft,"-item"),Bi=Math.max(br,Br),ti=er===nn,Oa=Xt.length&&ti,ri=er===tt,Nr=Oa||typeof er=="number"&&Xt.length>er,yi=(0,me.useMemo)(function(){var ii=Xt;return Oa?Dn===null&&yt?ii=Xt:ii=Xt.slice(0,Math.min(Xt.length,Jt/on)):typeof er=="number"&&(ii=Xt.slice(0,er)),ii},[Xt,on,Dn,er,Oa]),Qi=(0,me.useMemo)(function(){return Oa?Xt.slice(oi+1):Xt.slice(yi.length)},[Xt,yi,Oa,oi]),Ei=(0,me.useCallback)(function(ii,bi){var ea;return typeof nr=="function"?nr(ii):(ea=nr&&(ii==null?void 0:ii[nr]))!==null&&ea!==void 0?ea:bi},[nr]),Ui=(0,me.useCallback)(Qt||function(ii){return ii},[Qt]);function Gr(ii,bi,ea){Or===ii&&(bi===void 0||bi===Oi)||(jr(ii),ea||(La(ii<Xt.length-1),Ke==null||Ke(ii)),bi!==void 0&&Ri(bi))}function aa(ii,bi){Sn(bi.clientWidth)}function pa(ii,bi){Tn(function(ea){var ga=new Map(ea);return bi===null?ga.delete(ii):ga.set(ii,bi),ga})}function ra(ii,bi){Kr(bi),_r(Br)}function ma(ii,bi){zi(bi)}function Sa(ii){return rr.get(Ei(yi[ii],ii))}rt(function(){if(Jt&&typeof Bi=="number"&&yi){var ii=di,bi=yi.length,ea=bi-1;if(!bi){Gr(0,null);return}for(var ga=0;ga<bi;ga+=1){var Ka=Sa(ga);if(yt&&(Ka=Ka||0),Ka===void 0){Gr(ga-1,void 0,!0);break}if(ii+=Ka,ea===0&&ii<=Jt||ga===ea-1&&ii+Sa(ea)<=Jt){Gr(ea,null);break}else if(ii+Bi>Jt){Gr(ga-1,ii-Ka-di+Br);break}}Un&&Sa(0)+di>Jt&&Ri(null)}},[Jt,rr,Br,di,Ei,yi]);var Za=$a&&!!Qi.length,ia={};Oi!==null&&Oa&&(ia={position:"absolute",left:Oi,top:0});var Ca={prefixCls:Ji,responsive:Oa,component:ze,invalidate:ri},Ja=zn?function(ii,bi){var ea=Ei(ii,bi);return me.createElement(ut.Provider,{key:ea,value:(0,$e.Z)((0,$e.Z)({},Ca),{},{order:bi,item:ii,itemKey:ea,registerSize:pa,display:bi<=oi})},zn(ii,bi))}:function(ii,bi){var ea=Ei(ii,bi);return me.createElement(Ye,(0,be.Z)({},Ca,{order:bi,key:ea,item:ii,renderItem:Ui,itemKey:ea,registerSize:pa,display:bi<=oi}))},Ga,so={order:Za?oi:Number.MAX_SAFE_INTEGER,className:"".concat(Ji,"-rest"),registerSize:ra,display:Za};if($n)$n&&(Ga=me.createElement(ut.Provider,{value:(0,$e.Z)((0,$e.Z)({},Ca),so)},$n(Qi)));else{var Fa=Hn||ot;Ga=me.createElement(Ye,(0,be.Z)({},Ca,so),typeof Fa=="function"?Fa(Qi):Fa)}var ba=me.createElement(ir,(0,be.Z)({className:Se()(!ri&&ft,Mn),style:yn,ref:Ue},kt),yi.map(Ja),Nr?Ga:null,Un&&me.createElement(Ye,(0,be.Z)({},Ca,{responsive:ti,responsiveDisabled:!Oa,order:oi,className:"".concat(Ji,"-suffix"),registerSize:ma,display:!0,style:ia}),Un));return ti&&(ba=me.createElement(Pe.Z,{onResize:aa,disabled:!Oa},ba)),ba}var En=me.forwardRef(Ht);En.displayName="Overflow",En.Item=Pt,En.RESPONSIVE=nn,En.INVALIDATE=tt;var fn=En,Gt=fn,Ft=le(21770),xn=le(80334),gn=le(91881),_e=me.createContext(null);function ce(Ne,Ue){return Ne===void 0?null:"".concat(Ne,"-").concat(Ue)}function se(Ne){var Ue=me.useContext(_e);return ce(Ue,Ne)}var he=le(56982),fe=["children","locked"],oe=me.createContext(null);function ke(Ne,Ue){var it=(0,$e.Z)({},Ne);return Object.keys(Ue).forEach(function(ft){var xt=Ue[ft];xt!==void 0&&(it[ft]=xt)}),it}function Ge(Ne){var Ue=Ne.children,it=Ne.locked,ft=(0,Te.Z)(Ne,fe),xt=me.useContext(oe),Xt=(0,he.Z)(function(){return ke(xt,ft)},[xt,ft],function(Qt,zn){return!it&&(Qt[0]!==zn[0]||!(0,gn.Z)(Qt[1],zn[1],!0))});return me.createElement(oe.Provider,{value:Xt},Ue)}var St=[],Tt=me.createContext(null);function Ot(){return me.useContext(Tt)}var Wt=me.createContext(St);function $t(Ne){var Ue=me.useContext(Wt);return me.useMemo(function(){return Ne!==void 0?[].concat((0,et.Z)(Ue),[Ne]):Ue},[Ue,Ne])}var Gn=me.createContext(null),ar=me.createContext({}),Dt=ar,tn=le(15105),qn=le(75164),Er=function(Ne){if(!Ne)return!1;if(Ne instanceof Element){if(Ne.offsetParent)return!0;if(Ne.getBBox){var Ue=Ne.getBBox(),it=Ue.width,ft=Ue.height;if(it||ft)return!0}if(Ne.getBoundingClientRect){var xt=Ne.getBoundingClientRect(),Xt=xt.width,Qt=xt.height;if(Xt||Qt)return!0}}return!1};function kn(Ne){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Er(Ne)){var it=Ne.nodeName.toLowerCase(),ft=["input","select","textarea","button"].includes(it)||Ne.isContentEditable||it==="a"&&!!Ne.getAttribute("href"),xt=Ne.getAttribute("tabindex"),Xt=Number(xt),Qt=null;return xt&&!Number.isNaN(Xt)?Qt=Xt:ft&&Qt===null&&(Qt=0),ft&&Ne.disabled&&(Qt=null),Qt!==null&&(Qt>=0||Ue&&Qt<0)}return!1}function gr(Ne){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,it=(0,et.Z)(Ne.querySelectorAll("*")).filter(function(ft){return kn(ft,Ue)});return kn(Ne,Ue)&&it.unshift(Ne),it}var Di=null;function ni(){Di=document.activeElement}function Xr(){Di=null}function Vr(){if(Di)try{Di.focus()}catch(Ne){}}function Si(Ne,Ue){if(Ue.keyCode===9){var it=gr(Ne),ft=it[Ue.shiftKey?0:it.length-1],xt=ft===document.activeElement||Ne===document.activeElement;if(xt){var Xt=it[Ue.shiftKey?it.length-1:0];Xt.focus(),Ue.preventDefault()}}}var hi=tn.Z.LEFT,Ti=tn.Z.RIGHT,Ii=tn.Z.UP,Lr=tn.Z.DOWN,Xi=tn.Z.ENTER,la=tn.Z.ESC,va=tn.Z.HOME,ya=tn.Z.END,$i=[Ii,Lr,hi,Ti];function Mt(Ne,Ue,it,ft){var xt,Xt,Qt,zn,nr="prev",Rn="next",on="children",rn="parent";if(Ne==="inline"&&ft===Xi)return{inlineTrigger:!0};var yn=(xt={},(0,Ve.Z)(xt,Ii,nr),(0,Ve.Z)(xt,Lr,Rn),xt),Mn=(Xt={},(0,Ve.Z)(Xt,hi,it?Rn:nr),(0,Ve.Z)(Xt,Ti,it?nr:Rn),(0,Ve.Z)(Xt,Lr,on),(0,Ve.Z)(Xt,Xi,on),Xt),er=(Qt={},(0,Ve.Z)(Qt,Ii,nr),(0,Ve.Z)(Qt,Lr,Rn),(0,Ve.Z)(Qt,Xi,on),(0,Ve.Z)(Qt,la,rn),(0,Ve.Z)(Qt,hi,it?on:rn),(0,Ve.Z)(Qt,Ti,it?rn:on),Qt),Hn={inline:yn,horizontal:Mn,vertical:er,inlineSub:yn,horizontalSub:er,verticalSub:er},$n=(zn=Hn["".concat(Ne).concat(Ue?"":"Sub")])===null||zn===void 0?void 0:zn[ft];switch($n){case nr:return{offset:-1,sibling:!0};case Rn:return{offset:1,sibling:!0};case rn:return{offset:-1,sibling:!1};case on:return{offset:1,sibling:!1};default:return null}}function Cn(Ne){for(var Ue=Ne;Ue;){if(Ue.getAttribute("data-menu-list"))return Ue;Ue=Ue.parentElement}return null}function _n(Ne,Ue){for(var it=Ne||document.activeElement;it;){if(Ue.has(it))return it;it=it.parentElement}return null}function In(Ne,Ue){var it=gr(Ne,!0);return it.filter(function(ft){return Ue.has(ft)})}function mr(Ne,Ue,it){var ft=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Ne)return null;var xt=In(Ne,Ue),Xt=xt.length,Qt=xt.findIndex(function(zn){return it===zn});return ft<0?Qt===-1?Qt=Xt-1:Qt-=1:ft>0&&(Qt+=1),Qt=(Qt+Xt)%Xt,xt[Qt]}function Xn(Ne,Ue,it,ft,xt,Xt,Qt,zn,nr,Rn){var on=me.useRef(),rn=me.useRef();rn.current=Ue;var yn=function(){qn.Z.cancel(on.current)};return me.useEffect(function(){return function(){yn()}},[]),function(Mn){var er=Mn.which;if([].concat($i,[Xi,la,va,ya]).includes(er)){var Hn,$n,Un,Wn=function(){Hn=new Set,$n=new Map,Un=new Map;var Pn=Xt();return Pn.forEach(function(rr){var Tn=document.querySelector("[data-menu-id='".concat(ce(ft,rr),"']"));Tn&&(Hn.add(Tn),Un.set(Tn,rr),$n.set(rr,Tn))}),Hn};Wn();var ir=$n.get(Ue),ze=_n(ir,Hn),Ke=Un.get(ze),kt=Mt(Ne,Qt(Ke,!0).length===1,it,er);if(!kt&&er!==va&&er!==ya)return;($i.includes(er)||[va,ya].includes(er))&&Mn.preventDefault();var yt=function(Pn){if(Pn){var rr=Pn,Tn=Pn.querySelector("a");Tn!=null&&Tn.getAttribute("href")&&(rr=Tn);var pr=Un.get(Pn);zn(pr),yn(),on.current=(0,qn.Z)(function(){rn.current===pr&&rr.focus()})}};if([va,ya].includes(er)||kt.sibling||!ze){var qt;!ze||Ne==="inline"?qt=xt.current:qt=Cn(ze);var dn,sn=In(qt,Hn);er===va?dn=sn[0]:er===ya?dn=sn[sn.length-1]:dn=mr(qt,Hn,ze,kt.offset),yt(dn)}else if(kt.inlineTrigger)nr(Ke);else if(kt.offset>0)nr(Ke,!0),yn(),on.current=(0,qn.Z)(function(){Wn();var Ln=ze.getAttribute("aria-controls"),Pn=document.getElementById(Ln),rr=mr(Pn,Hn);yt(rr)},5);else if(kt.offset<0){var Dn=Qt(Ke,!0),Sn=Dn[Dn.length-2],Jt=$n.get(Sn);nr(Sn,!1),yt(Jt)}}Rn==null||Rn(Mn)}}function sr(Ne){Promise.resolve().then(Ne)}var On="__RC_UTIL_PATH_SPLIT__",qe=function(Ue){return Ue.join(On)},st=function(Ue){return Ue.split(On)},_t="rc-menu-more";function Nt(){var Ne=me.useState({}),Ue=(0,ge.Z)(Ne,2),it=Ue[1],ft=(0,me.useRef)(new Map),xt=(0,me.useRef)(new Map),Xt=me.useState([]),Qt=(0,ge.Z)(Xt,2),zn=Qt[0],nr=Qt[1],Rn=(0,me.useRef)(0),on=(0,me.useRef)(!1),rn=function(){on.current||it({})},yn=(0,me.useCallback)(function(ir,ze){var Ke=qe(ze);xt.current.set(Ke,ir),ft.current.set(ir,Ke),Rn.current+=1;var kt=Rn.current;sr(function(){kt===Rn.current&&rn()})},[]),Mn=(0,me.useCallback)(function(ir,ze){var Ke=qe(ze);xt.current.delete(Ke),ft.current.delete(ir)},[]),er=(0,me.useCallback)(function(ir){nr(ir)},[]),Hn=(0,me.useCallback)(function(ir,ze){var Ke=ft.current.get(ir)||"",kt=st(Ke);return ze&&zn.includes(kt[0])&&kt.unshift(_t),kt},[zn]),$n=(0,me.useCallback)(function(ir,ze){return ir.some(function(Ke){var kt=Hn(Ke,!0);return kt.includes(ze)})},[Hn]),Un=function(){var ze=(0,et.Z)(ft.current.keys());return zn.length&&ze.push(_t),ze},Wn=(0,me.useCallback)(function(ir){var ze="".concat(ft.current.get(ir)).concat(On),Ke=new Set;return(0,et.Z)(xt.current.keys()).forEach(function(kt){kt.startsWith(ze)&&Ke.add(xt.current.get(kt))}),Ke},[]);return me.useEffect(function(){return function(){on.current=!0}},[]),{registerPath:yn,unregisterPath:Mn,refreshOverflowKeys:er,isSubPathKey:$n,getKeyPath:Hn,getKeys:Un,getSubPathKeys:Wn}}function He(Ne){var Ue=me.useRef(Ne);Ue.current=Ne;var it=me.useCallback(function(){for(var ft,xt=arguments.length,Xt=new Array(xt),Qt=0;Qt<xt;Qt++)Xt[Qt]=arguments[Qt];return(ft=Ue.current)===null||ft===void 0?void 0:ft.call.apply(ft,[Ue].concat(Xt))},[]);return Ne?it:void 0}var gt=Math.random().toFixed(5).toString().slice(2),Rt=0;function It(Ne){var Ue=(0,Ft.Z)(Ne,{value:Ne}),it=(0,ge.Z)(Ue,2),ft=it[0],xt=it[1];return me.useEffect(function(){Rt+=1;var Xt="".concat(gt,"-").concat(Rt);xt("rc-menu-uuid-".concat(Xt))},[]),ft}var Zt=le(15671),Ut=le(43144),Nn=le(60136),hr=le(51630),Vn=le(98423),jn=le(42550);function Qn(Ne,Ue,it,ft){var xt=me.useContext(oe),Xt=xt.activeKey,Qt=xt.onActive,zn=xt.onInactive,nr={active:Xt===Ne};return Ue||(nr.onMouseEnter=function(Rn){it==null||it({key:Ne,domEvent:Rn}),Qt(Ne)},nr.onMouseLeave=function(Rn){ft==null||ft({key:Ne,domEvent:Rn}),zn(Ne)}),nr}function tr(Ne){var Ue=me.useContext(oe),it=Ue.mode,ft=Ue.rtl,xt=Ue.inlineIndent;if(it!=="inline")return null;var Xt=Ne;return ft?{paddingRight:Xt*xt}:{paddingLeft:Xt*xt}}function Ar(Ne){var Ue=Ne.icon,it=Ne.props,ft=Ne.children,xt;return Ue===null||Ue===!1?null:(typeof Ue=="function"?xt=me.createElement(Ue,(0,$e.Z)({},it)):typeof Ue!="boolean"&&(xt=Ue),xt||ft||null)}var cn=["item"];function Kn(Ne){var Ue=Ne.item,it=(0,Te.Z)(Ne,cn);return Object.defineProperty(it,"item",{get:function(){return(0,xn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ue}}),it}var pi=["title","attribute","elementRef"],xi=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Zr=["active"],Rr=function(Ne){(0,Nn.Z)(it,Ne);var Ue=(0,hr.Z)(it);function it(){return(0,Zt.Z)(this,it),Ue.apply(this,arguments)}return(0,Ut.Z)(it,[{key:"render",value:function(){var xt=this.props,Xt=xt.title,Qt=xt.attribute,zn=xt.elementRef,nr=(0,Te.Z)(xt,pi),Rn=(0,Vn.Z)(nr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,xn.ZP)(!Qt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),me.createElement(Gt.Item,(0,be.Z)({},Qt,{title:typeof Xt=="string"?Xt:void 0},Rn,{ref:zn}))}}]),it}(me.Component),_i=me.forwardRef(function(Ne,Ue){var it,ft=Ne.style,xt=Ne.className,Xt=Ne.eventKey,Qt=Ne.warnKey,zn=Ne.disabled,nr=Ne.itemIcon,Rn=Ne.children,on=Ne.role,rn=Ne.onMouseEnter,yn=Ne.onMouseLeave,Mn=Ne.onClick,er=Ne.onKeyDown,Hn=Ne.onFocus,$n=(0,Te.Z)(Ne,xi),Un=se(Xt),Wn=me.useContext(oe),ir=Wn.prefixCls,ze=Wn.onItemClick,Ke=Wn.disabled,kt=Wn.overflowDisabled,yt=Wn.itemIcon,qt=Wn.selectedKeys,dn=Wn.onActive,sn=me.useContext(Dt),Dn=sn._internalRenderMenuItem,Sn="".concat(ir,"-item"),Jt=me.useRef(),Ln=me.useRef(),Pn=Ke||zn,rr=(0,jn.x1)(Ue,Ln),Tn=$t(Xt),pr=function(mi){return{key:Xt,keyPath:(0,et.Z)(Tn).reverse(),item:Jt.current,domEvent:mi}},Pr=nr||yt,br=Qn(Xt,Pn,rn,yn),_r=br.active,lr=(0,Te.Z)(br,Zr),Cr=qt.includes(Xt),Br=tr(Tn.length),Kr=function(mi){if(!Pn){var Oi=pr(mi);Mn==null||Mn(Kn(Oi)),ze(Oi)}},xr=function(mi){if(er==null||er(mi),mi.which===tn.Z.ENTER){var Oi=pr(mi);Mn==null||Mn(Kn(Oi)),ze(Oi)}},Ur=function(mi){dn(Xt),Hn==null||Hn(mi)},di={};Ne.role==="option"&&(di["aria-selected"]=Cr);var zi=me.createElement(Rr,(0,be.Z)({ref:Jt,elementRef:rr,role:on===null?"none":on||"menuitem",tabIndex:zn?null:-1,"data-menu-id":kt&&Un?null:Un},$n,lr,di,{component:"li","aria-disabled":zn,style:(0,$e.Z)((0,$e.Z)({},Br),ft),className:Se()(Sn,(it={},(0,Ve.Z)(it,"".concat(Sn,"-active"),_r),(0,Ve.Z)(it,"".concat(Sn,"-selected"),Cr),(0,Ve.Z)(it,"".concat(Sn,"-disabled"),Pn),it),xt),onClick:Kr,onKeyDown:xr,onFocus:Ur}),Rn,me.createElement(Ar,{props:(0,$e.Z)((0,$e.Z)({},Ne),{},{isSelected:Cr}),icon:Pr}));return Dn&&(zi=Dn(zi,Ne,{selected:Cr})),zi});function cr(Ne,Ue){var it=Ne.eventKey,ft=Ot(),xt=$t(it);return me.useEffect(function(){if(ft)return ft.registerPath(it,xt),function(){ft.unregisterPath(it,xt)}},[xt]),ft?null:me.createElement(_i,(0,be.Z)({},Ne,{ref:Ue}))}var ui=me.forwardRef(cr),wn=["className","children"],Yi=function(Ue,it){var ft=Ue.className,xt=Ue.children,Xt=(0,Te.Z)(Ue,wn),Qt=me.useContext(oe),zn=Qt.prefixCls,nr=Qt.mode,Rn=Qt.rtl;return me.createElement("ul",(0,be.Z)({className:Se()(zn,Rn&&"".concat(zn,"-rtl"),"".concat(zn,"-sub"),"".concat(zn,"-").concat(nr==="inline"?"inline":"vertical"),ft),role:"menu"},Xt,{"data-menu-list":!0,ref:it}),xt)},ki=me.forwardRef(Yi);ki.displayName="SubMenuList";var wa=ki,qi=le(50344);function Pi(Ne,Ue){return(0,qi.Z)(Ne).map(function(it,ft){if(me.isValidElement(it)){var xt,Xt,Qt=it.key,zn=(xt=(Xt=it.props)===null||Xt===void 0?void 0:Xt.eventKey)!==null&&xt!==void 0?xt:Qt,nr=zn==null;nr&&(zn="tmp_key-".concat([].concat((0,et.Z)(Ue),[ft]).join("-")));var Rn={key:zn,eventKey:zn};return me.cloneElement(it,Rn)}return it})}var fa=le(62709),ji={adjustX:1,adjustY:1},Ci={topLeft:{points:["bl","tl"],overflow:ji},topRight:{points:["br","tr"],overflow:ji},bottomLeft:{points:["tl","bl"],overflow:ji},bottomRight:{points:["tr","br"],overflow:ji},leftTop:{points:["tr","tl"],overflow:ji},leftBottom:{points:["br","bl"],overflow:ji},rightTop:{points:["tl","tr"],overflow:ji},rightBottom:{points:["bl","br"],overflow:ji}},ta={topLeft:{points:["bl","tl"],overflow:ji},topRight:{points:["br","tr"],overflow:ji},bottomLeft:{points:["tl","bl"],overflow:ji},bottomRight:{points:["tr","br"],overflow:ji},rightTop:{points:["tr","tl"],overflow:ji},rightBottom:{points:["br","bl"],overflow:ji},leftTop:{points:["tl","tr"],overflow:ji},leftBottom:{points:["bl","br"],overflow:ji}},_a=null;function na(Ne,Ue,it){if(Ue)return Ue;if(it)return it[Ne]||it.other}var Ni={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ka(Ne){var Ue=Ne.prefixCls,it=Ne.visible,ft=Ne.children,xt=Ne.popup,Xt=Ne.popupStyle,Qt=Ne.popupClassName,zn=Ne.popupOffset,nr=Ne.disabled,Rn=Ne.mode,on=Ne.onVisibleChange,rn=me.useContext(oe),yn=rn.getPopupContainer,Mn=rn.rtl,er=rn.subMenuOpenDelay,Hn=rn.subMenuCloseDelay,$n=rn.builtinPlacements,Un=rn.triggerSubMenuAction,Wn=rn.forceSubMenuRender,ir=rn.rootClassName,ze=rn.motion,Ke=rn.defaultMotions,kt=me.useState(!1),yt=(0,ge.Z)(kt,2),qt=yt[0],dn=yt[1],sn=Mn?(0,$e.Z)((0,$e.Z)({},ta),$n):(0,$e.Z)((0,$e.Z)({},Ci),$n),Dn=Ni[Rn],Sn=na(Rn,ze,Ke),Jt=me.useRef(Sn);Rn!=="inline"&&(Jt.current=Sn);var Ln=(0,$e.Z)((0,$e.Z)({},Jt.current),{},{leavedClassName:"".concat(Ue,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Pn=me.useRef();return me.useEffect(function(){return Pn.current=(0,qn.Z)(function(){dn(it)}),function(){qn.Z.cancel(Pn.current)}},[it]),me.createElement(fa.Z,{prefixCls:Ue,popupClassName:Se()("".concat(Ue,"-popup"),(0,Ve.Z)({},"".concat(Ue,"-rtl"),Mn),Qt,ir),stretch:Rn==="horizontal"?"minWidth":null,getPopupContainer:yn,builtinPlacements:sn,popupPlacement:Dn,popupVisible:qt,popup:xt,popupStyle:Xt,popupAlign:zn&&{offset:zn},action:nr?[]:[Un],mouseEnterDelay:er,mouseLeaveDelay:Hn,onPopupVisibleChange:on,forceRender:Wn,popupMotion:Ln,fresh:!0},ft)}var Pa=le(62874);function ha(Ne){var Ue=Ne.id,it=Ne.open,ft=Ne.keyPath,xt=Ne.children,Xt="inline",Qt=me.useContext(oe),zn=Qt.prefixCls,nr=Qt.forceSubMenuRender,Rn=Qt.motion,on=Qt.defaultMotions,rn=Qt.mode,yn=me.useRef(!1);yn.current=rn===Xt;var Mn=me.useState(!yn.current),er=(0,ge.Z)(Mn,2),Hn=er[0],$n=er[1],Un=yn.current?it:!1;me.useEffect(function(){yn.current&&$n(!1)},[rn]);var Wn=(0,$e.Z)({},na(Xt,Rn,on));ft.length>1&&(Wn.motionAppear=!1);var ir=Wn.onVisibleChanged;return Wn.onVisibleChanged=function(ze){return!yn.current&&!ze&&$n(!0),ir==null?void 0:ir(ze)},Hn?null:me.createElement(Ge,{mode:Xt,locked:!yn.current},me.createElement(Pa.Z,(0,be.Z)({visible:Un},Wn,{forceRender:nr,removeOnLeave:!1,leavedClassName:"".concat(zn,"-hidden")}),function(ze){var Ke=ze.className,kt=ze.style;return me.createElement(wa,{id:Ue,className:Ke,style:kt},xt)}))}var ai=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],bt=["active"],mt=function(Ue){var it,ft=Ue.style,xt=Ue.className,Xt=Ue.title,Qt=Ue.eventKey,zn=Ue.warnKey,nr=Ue.disabled,Rn=Ue.internalPopupClose,on=Ue.children,rn=Ue.itemIcon,yn=Ue.expandIcon,Mn=Ue.popupClassName,er=Ue.popupOffset,Hn=Ue.popupStyle,$n=Ue.onClick,Un=Ue.onMouseEnter,Wn=Ue.onMouseLeave,ir=Ue.onTitleClick,ze=Ue.onTitleMouseEnter,Ke=Ue.onTitleMouseLeave,kt=(0,Te.Z)(Ue,ai),yt=se(Qt),qt=me.useContext(oe),dn=qt.prefixCls,sn=qt.mode,Dn=qt.openKeys,Sn=qt.disabled,Jt=qt.overflowDisabled,Ln=qt.activeKey,Pn=qt.selectedKeys,rr=qt.itemIcon,Tn=qt.expandIcon,pr=qt.onItemClick,Pr=qt.onOpenChange,br=qt.onActive,_r=me.useContext(Dt),lr=_r._internalRenderSubMenuItem,Cr=me.useContext(Gn),Br=Cr.isSubPathKey,Kr=$t(),xr="".concat(dn,"-submenu"),Ur=Sn||nr,di=me.useRef(),zi=me.useRef(),Li=rn!=null?rn:rr,mi=yn!=null?yn:Tn,Oi=Dn.includes(Qt),Ri=!Jt&&Oi,Yr=Br(Pn,Qt),gi=Qn(Qt,Ur,ze,Ke),Or=gi.active,jr=(0,Te.Z)(gi,bt),oi=me.useState(!1),Ai=(0,ge.Z)(oi,2),Na=Ai[0],$a=Ai[1],La=function(ma){Ur||$a(ma)},Ji=function(ma){La(!0),Un==null||Un({key:Qt,domEvent:ma})},Bi=function(ma){La(!1),Wn==null||Wn({key:Qt,domEvent:ma})},ti=me.useMemo(function(){return Or||(sn!=="inline"?Na||Br([Ln],Qt):!1)},[sn,Or,Ln,Na,Qt,Br]),Oa=tr(Kr.length),ri=function(ma){Ur||(ir==null||ir({key:Qt,domEvent:ma}),sn==="inline"&&Pr(Qt,!Oi))},Nr=He(function(ra){$n==null||$n(Kn(ra)),pr(ra)}),yi=function(ma){sn!=="inline"&&Pr(Qt,ma)},Qi=function(){br(Qt)},Ei=yt&&"".concat(yt,"-popup"),Ui=me.createElement("div",(0,be.Z)({role:"menuitem",style:Oa,className:"".concat(xr,"-title"),tabIndex:Ur?null:-1,ref:di,title:typeof Xt=="string"?Xt:null,"data-menu-id":Jt&&yt?null:yt,"aria-expanded":Ri,"aria-haspopup":!0,"aria-controls":Ei,"aria-disabled":Ur,onClick:ri,onFocus:Qi},jr),Xt,me.createElement(Ar,{icon:sn!=="horizontal"?mi:void 0,props:(0,$e.Z)((0,$e.Z)({},Ue),{},{isOpen:Ri,isSubMenu:!0})},me.createElement("i",{className:"".concat(xr,"-arrow")}))),Gr=me.useRef(sn);if(sn!=="inline"&&Kr.length>1?Gr.current="vertical":Gr.current=sn,!Jt){var aa=Gr.current;Ui=me.createElement(ka,{mode:aa,prefixCls:xr,visible:!Rn&&Ri&&sn!=="inline",popupClassName:Mn,popupOffset:er,popupStyle:Hn,popup:me.createElement(Ge,{mode:aa==="horizontal"?"vertical":aa},me.createElement(wa,{id:Ei,ref:zi},on)),disabled:Ur,onVisibleChange:yi},Ui)}var pa=me.createElement(Gt.Item,(0,be.Z)({role:"none"},kt,{component:"li",style:ft,className:Se()(xr,"".concat(xr,"-").concat(sn),xt,(it={},(0,Ve.Z)(it,"".concat(xr,"-open"),Ri),(0,Ve.Z)(it,"".concat(xr,"-active"),ti),(0,Ve.Z)(it,"".concat(xr,"-selected"),Yr),(0,Ve.Z)(it,"".concat(xr,"-disabled"),Ur),it)),onMouseEnter:Ji,onMouseLeave:Bi}),Ui,!Jt&&me.createElement(ha,{id:Ei,open:Ri,keyPath:Kr},on));return lr&&(pa=lr(pa,Ue,{selected:Yr,active:ti,open:Ri,disabled:Ur})),me.createElement(Ge,{onItemClick:Nr,mode:sn==="horizontal"?"vertical":sn,itemIcon:Li,expandIcon:mi},pa)};function zt(Ne){var Ue=Ne.eventKey,it=Ne.children,ft=$t(Ue),xt=Pi(it,ft),Xt=Ot();me.useEffect(function(){if(Xt)return Xt.registerPath(Ue,ft),function(){Xt.unregisterPath(Ue,ft)}},[ft]);var Qt;return Xt?Qt=xt:Qt=me.createElement(mt,Ne,xt),me.createElement(Wt.Provider,{value:ft},Qt)}var an=le(71002),An=["className","title","eventKey","children"],Sr=["children"],wr=function(Ue){var it=Ue.className,ft=Ue.title,xt=Ue.eventKey,Xt=Ue.children,Qt=(0,Te.Z)(Ue,An),zn=me.useContext(oe),nr=zn.prefixCls,Rn="".concat(nr,"-item-group");return me.createElement("li",(0,be.Z)({role:"presentation"},Qt,{onClick:function(rn){return rn.stopPropagation()},className:Se()(Rn,it)}),me.createElement("div",{role:"presentation",className:"".concat(Rn,"-title"),title:typeof ft=="string"?ft:void 0},ft),me.createElement("ul",{role:"group",className:"".concat(Rn,"-list")},Xt))};function Tr(Ne){var Ue=Ne.children,it=(0,Te.Z)(Ne,Sr),ft=$t(it.eventKey),xt=Pi(Ue,ft),Xt=Ot();return Xt?xt:me.createElement(wr,(0,Vn.Z)(it,["warnKey"]),xt)}function $r(Ne){var Ue=Ne.className,it=Ne.style,ft=me.useContext(oe),xt=ft.prefixCls,Xt=Ot();return Xt?null:me.createElement("li",{role:"separator",className:Se()("".concat(xt,"-item-divider"),Ue),style:it})}var Dr=["label","children","key","type"];function ei(Ne){return(Ne||[]).map(function(Ue,it){if(Ue&&(0,an.Z)(Ue)==="object"){var ft=Ue,xt=ft.label,Xt=ft.children,Qt=ft.key,zn=ft.type,nr=(0,Te.Z)(ft,Dr),Rn=Qt!=null?Qt:"tmp-".concat(it);return Xt||zn==="group"?zn==="group"?me.createElement(Tr,(0,be.Z)({key:Rn},nr,{title:xt}),ei(Xt)):me.createElement(zt,(0,be.Z)({key:Rn},nr,{title:xt}),ei(Xt)):zn==="divider"?me.createElement($r,(0,be.Z)({key:Rn},nr)):me.createElement(ui,(0,be.Z)({key:Rn},nr),xt)}return null}).filter(function(Ue){return Ue})}function ci(Ne,Ue,it){var ft=Ne;return Ue&&(ft=ei(Ue)),Pi(ft,it)}var Mi=["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"],Gi=[],Wi=me.forwardRef(function(Ne,Ue){var it,ft,xt=Ne,Xt=xt.prefixCls,Qt=Xt===void 0?"rc-menu":Xt,zn=xt.rootClassName,nr=xt.style,Rn=xt.className,on=xt.tabIndex,rn=on===void 0?0:on,yn=xt.items,Mn=xt.children,er=xt.direction,Hn=xt.id,$n=xt.mode,Un=$n===void 0?"vertical":$n,Wn=xt.inlineCollapsed,ir=xt.disabled,ze=xt.disabledOverflow,Ke=xt.subMenuOpenDelay,kt=Ke===void 0?.1:Ke,yt=xt.subMenuCloseDelay,qt=yt===void 0?.1:yt,dn=xt.forceSubMenuRender,sn=xt.defaultOpenKeys,Dn=xt.openKeys,Sn=xt.activeKey,Jt=xt.defaultActiveFirst,Ln=xt.selectable,Pn=Ln===void 0?!0:Ln,rr=xt.multiple,Tn=rr===void 0?!1:rr,pr=xt.defaultSelectedKeys,Pr=xt.selectedKeys,br=xt.onSelect,_r=xt.onDeselect,lr=xt.inlineIndent,Cr=lr===void 0?24:lr,Br=xt.motion,Kr=xt.defaultMotions,xr=xt.triggerSubMenuAction,Ur=xr===void 0?"hover":xr,di=xt.builtinPlacements,zi=xt.itemIcon,Li=xt.expandIcon,mi=xt.overflowedIndicator,Oi=mi===void 0?"...":mi,Ri=xt.overflowedIndicatorPopupClassName,Yr=xt.getPopupContainer,gi=xt.onClick,Or=xt.onOpenChange,jr=xt.onKeyDown,oi=xt.openAnimation,Ai=xt.openTransitionName,Na=xt._internalRenderMenuItem,$a=xt._internalRenderSubMenuItem,La=(0,Te.Z)(xt,Mi),Ji=me.useMemo(function(){return ci(Mn,yn,Gi)},[Mn,yn]),Bi=me.useState(!1),ti=(0,ge.Z)(Bi,2),Oa=ti[0],ri=ti[1],Nr=me.useRef(),yi=It(Hn),Qi=er==="rtl",Ei=(0,Ft.Z)(sn,{value:Dn,postState:function(Ta){return Ta||Gi}}),Ui=(0,ge.Z)(Ei,2),Gr=Ui[0],aa=Ui[1],pa=function(Ta){var Xa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function go(){aa(Ta),Or==null||Or(Ta)}Xa?(0,Me.flushSync)(go):go()},ra=me.useState(Gr),ma=(0,ge.Z)(ra,2),Sa=ma[0],Za=ma[1],ia=me.useRef(!1),Ca=me.useMemo(function(){return(Un==="inline"||Un==="vertical")&&Wn?["vertical",Wn]:[Un,!1]},[Un,Wn]),Ja=(0,ge.Z)(Ca,2),Ga=Ja[0],so=Ja[1],Fa=Ga==="inline",ba=me.useState(Ga),ii=(0,ge.Z)(ba,2),bi=ii[0],ea=ii[1],ga=me.useState(so),Ka=(0,ge.Z)(ga,2),io=Ka[0],ho=Ka[1];me.useEffect(function(){ea(Ga),ho(so),ia.current&&(Fa?aa(Sa):pa(Gi))},[Ga,so]);var Oo=me.useState(0),Ro=(0,ge.Z)(Oo,2),lo=Ro[0],Ao=Ro[1],Ki=lo>=Ji.length-1||bi!=="horizontal"||ze;me.useEffect(function(){Fa&&Za(Gr)},[Gr]),me.useEffect(function(){return ia.current=!0,function(){ia.current=!1}},[]);var fi=Nt(),Aa=fi.registerPath,Ma=fi.unregisterPath,uo=fi.refreshOverflowKeys,ao=fi.isSubPathKey,hs=fi.getKeyPath,Qo=fi.getKeys,ps=fi.getSubPathKeys,Vi=me.useMemo(function(){return{registerPath:Aa,unregisterPath:Ma}},[Aa,Ma]),vr=me.useMemo(function(){return{isSubPathKey:ao}},[ao]);me.useEffect(function(){uo(Ki?Gi:Ji.slice(lo+1).map(function(oo){return oo.key}))},[lo,Ki]);var Jr=(0,Ft.Z)(Sn||Jt&&((it=Ji[0])===null||it===void 0?void 0:it.key),{value:Sn}),Qr=(0,ge.Z)(Jr,2),si=Qr[0],Ha=Qr[1],ja=He(function(oo){Ha(oo)}),Fo=He(function(){Ha(void 0)});(0,me.useImperativeHandle)(Ue,function(){return{list:Nr.current,focus:function(Ta){var Xa,go=si!=null?si:(Xa=Ji.find(function(xs){return!xs.props.disabled}))===null||Xa===void 0?void 0:Xa.key;if(go){var yo,Ko,wo;(yo=Nr.current)===null||yo===void 0||(Ko=yo.querySelector("li[data-menu-id='".concat(ce(yi,go),"']")))===null||Ko===void 0||(wo=Ko.focus)===null||wo===void 0||wo.call(Ko,Ta)}}}});var Uo=(0,Ft.Z)(pr||[],{value:Pr,postState:function(Ta){return Array.isArray(Ta)?Ta:Ta==null?Gi:[Ta]}}),ls=(0,ge.Z)(Uo,2),ua=ls[0],Bo=ls[1],us=function(Ta){if(Pn){var Xa=Ta.key,go=ua.includes(Xa),yo;Tn?go?yo=ua.filter(function(wo){return wo!==Xa}):yo=[].concat((0,et.Z)(ua),[Xa]):yo=[Xa],Bo(yo);var Ko=(0,$e.Z)((0,$e.Z)({},Ta),{},{selectedKeys:yo});go?_r==null||_r(Ko):br==null||br(Ko)}!Tn&&Gr.length&&bi!=="inline"&&pa(Gi)},cl=He(function(oo){gi==null||gi(Kn(oo)),us(oo)}),As=He(function(oo,Ta){var Xa=Gr.filter(function(yo){return yo!==oo});if(Ta)Xa.push(oo);else if(bi!=="inline"){var go=ps(oo);Xa=Xa.filter(function(yo){return!go.has(yo)})}(0,gn.Z)(Gr,Xa,!0)||pa(Xa,!0)}),ms=function(Ta,Xa){var go=Xa!=null?Xa:!Gr.includes(Ta);As(Ta,go)},zo=Xn(bi,si,Qi,yi,Nr,Qo,hs,Ha,ms,jr);me.useEffect(function(){ri(!0)},[]);var Ts=me.useMemo(function(){return{_internalRenderMenuItem:Na,_internalRenderSubMenuItem:$a}},[Na,$a]),Is=bi!=="horizontal"||ze?Ji:Ji.map(function(oo,Ta){return me.createElement(Ge,{key:oo.key,overflowDisabled:Ta>lo},oo)}),Ys=me.createElement(Gt,(0,be.Z)({id:Hn,ref:Nr,prefixCls:"".concat(Qt,"-overflow"),component:"ul",itemComponent:ui,className:Se()(Qt,"".concat(Qt,"-root"),"".concat(Qt,"-").concat(bi),Rn,(ft={},(0,Ve.Z)(ft,"".concat(Qt,"-inline-collapsed"),io),(0,Ve.Z)(ft,"".concat(Qt,"-rtl"),Qi),ft),zn),dir:er,style:nr,role:"menu",tabIndex:rn,data:Is,renderRawItem:function(Ta){return Ta},renderRawRest:function(Ta){var Xa=Ta.length,go=Xa?Ji.slice(-Xa):null;return me.createElement(zt,{eventKey:_t,title:Oi,disabled:Ki,internalPopupClose:Xa===0,popupClassName:Ri},go)},maxCount:bi!=="horizontal"||ze?Gt.INVALIDATE:Gt.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ta){Ao(Ta)},onKeyDown:zo},La));return me.createElement(Dt.Provider,{value:Ts},me.createElement(_e.Provider,{value:yi},me.createElement(Ge,{prefixCls:Qt,rootClassName:zn,mode:bi,openKeys:Gr,rtl:Qi,disabled:ir,motion:Oa?Br:null,defaultMotions:Oa?Kr:null,activeKey:si,onActive:ja,onInactive:Fo,selectedKeys:ua,inlineIndent:Cr,subMenuOpenDelay:kt,subMenuCloseDelay:qt,forceSubMenuRender:dn,builtinPlacements:di,triggerSubMenuAction:Ur,getPopupContainer:Yr,itemIcon:zi,expandIcon:Li,onItemClick:cl,onOpenChange:As},me.createElement(Gn.Provider,{value:vr},Ys),me.createElement("div",{style:{display:"none"},"aria-hidden":!0},me.createElement(Tt.Provider,{value:Vi},Ji)))))}),Fi=Wi,Ie=Fi;Ie.Item=ui,Ie.SubMenu=zt,Ie.ItemGroup=Tr,Ie.Divider=$r;var Fe=Ie},66680:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ve}});var be=le(67294);function Ve($e){var et=be.useRef();et.current=$e;var ge=be.useCallback(function(){for(var Te,Le=arguments.length,Se=new Array(Le),me=0;me<Le;me++)Se[me]=arguments[me];return(Te=et.current)===null||Te===void 0?void 0:Te.call.apply(Te,[et].concat(Se))},[]);return ge}},21770:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Te}});var be=le(97685),Ve=le(66680),$e=le(8410),et=le(63896);function ge(Le){return Le!==void 0}function Te(Le,Se){var me=Se||{},Pe=me.defaultValue,at=me.value,Oe=me.onChange,ht=me.postState,nt=(0,et.Z)(function(){return ge(at)?at:ge(Pe)?typeof Pe=="function"?Pe():Pe:typeof Le=="function"?Le():Le}),rt=(0,be.Z)(nt,2),Je=rt[0],Ee=rt[1],pt=at!==void 0?at:Je,Kt=ht?ht(pt):pt,Ye=(0,Ve.Z)(Oe),lt=(0,et.Z)([pt]),Me=(0,be.Z)(lt,2),xe=Me[0],We=Me[1];(0,$e.o)(function(){var Et=xe[0];Je!==Et&&Ye(Je,Et)},[xe]),(0,$e.o)(function(){ge(at)||Ee(at)},[at]);var je=(0,Ve.Z)(function(Et,vt){Ee(Et,vt),We([pt],vt)});return[Kt,je]}},91881:function(mn,Vt,le){"use strict";var be=le(71002),Ve=le(80334);function $e(et,ge){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Le=new Set;function Se(me,Pe){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Oe=Le.has(me);if((0,Ve.ZP)(!Oe,"Warning: There may be circular references"),Oe)return!1;if(me===Pe)return!0;if(Te&&at>1)return!1;Le.add(me);var ht=at+1;if(Array.isArray(me)){if(!Array.isArray(Pe)||me.length!==Pe.length)return!1;for(var nt=0;nt<me.length;nt++)if(!Se(me[nt],Pe[nt],ht))return!1;return!0}if(me&&Pe&&(0,be.Z)(me)==="object"&&(0,be.Z)(Pe)==="object"){var rt=Object.keys(me);return rt.length!==Object.keys(Pe).length?!1:rt.every(function(Je){return Se(me[Je],Pe[Je],ht)})}return!1}return Se(et,ge)}Vt.Z=$e},98423:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Ve}});var be=le(1413);function Ve($e,et){var ge=(0,be.Z)({},$e);return Array.isArray(et)&&et.forEach(function(Te){delete ge[Te]}),ge}},73299:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return $i}});var be=le(87462),Ve=le(1413),$e=le(71002),et=le(97685),ge=le(4942),Te=le(45987),Le=le(67294),Se=le(73935),me=le(94184),Pe=le.n(me),at=le(48555),Oe=Le.forwardRef(function(Mt,Cn){var _n=Mt.height,In=Mt.offsetY,mr=Mt.offsetX,Xn=Mt.children,sr=Mt.prefixCls,On=Mt.onInnerResize,qe=Mt.innerProps,st=Mt.rtl,_t=Mt.extra,Nt={},He={display:"flex",flexDirection:"column"};if(In!==void 0){var gt;Nt={height:_n,position:"relative",overflow:"hidden"},He=(0,Ve.Z)((0,Ve.Z)({},He),{},(gt={transform:"translateY(".concat(In,"px)")},(0,ge.Z)(gt,st?"marginRight":"marginLeft",-mr),(0,ge.Z)(gt,"position","absolute"),(0,ge.Z)(gt,"left",0),(0,ge.Z)(gt,"right",0),(0,ge.Z)(gt,"top",0),gt))}return Le.createElement("div",{style:Nt},Le.createElement(at.Z,{onResize:function(It){var Zt=It.offsetHeight;Zt&&On&&On()}},Le.createElement("div",(0,be.Z)({style:He,className:Pe()((0,ge.Z)({},"".concat(sr,"-holder-inner"),sr)),ref:Cn},qe),Xn,_t)))});Oe.displayName="Filler";var ht=Oe,nt=function(Cn){return+setTimeout(Cn,16)},rt=function(Cn){return clearTimeout(Cn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(nt=function(Cn){return window.requestAnimationFrame(Cn)},rt=function(Cn){return window.cancelAnimationFrame(Cn)});var Je=0,Ee=new Map;function pt(Mt){Ee.delete(Mt)}var Kt=function(Cn){var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Je+=1;var In=Je;function mr(Xn){if(Xn===0)pt(In),Cn();else{var sr=nt(function(){mr(Xn-1)});Ee.set(In,sr)}}return mr(_n),In};Kt.cancel=function(Mt){var Cn=Ee.get(Mt);return pt(Cn),rt(Cn)};var Ye=Kt;function lt(Mt,Cn){var _n="touches"in Mt?Mt.touches[0]:Mt;return _n[Cn?"pageX":"pageY"]}var Me=Le.forwardRef(function(Mt,Cn){var _n,In=Mt.prefixCls,mr=Mt.rtl,Xn=Mt.scrollOffset,sr=Mt.scrollRange,On=Mt.onStartMove,qe=Mt.onStopMove,st=Mt.onScroll,_t=Mt.horizontal,Nt=Mt.spinSize,He=Mt.containerSize,gt=Mt.style,Rt=Mt.thumbStyle,It=Le.useState(!1),Zt=(0,et.Z)(It,2),Ut=Zt[0],Nn=Zt[1],hr=Le.useState(null),Vn=(0,et.Z)(hr,2),jn=Vn[0],Qn=Vn[1],tr=Le.useState(null),Ar=(0,et.Z)(tr,2),cn=Ar[0],Kn=Ar[1],pi=!mr,xi=Le.useRef(),Zr=Le.useRef(),Rr=Le.useState(!1),_i=(0,et.Z)(Rr,2),cr=_i[0],ui=_i[1],wn=Le.useRef(),Yi=function(){clearTimeout(wn.current),ui(!0),wn.current=setTimeout(function(){ui(!1)},3e3)},ki=sr-He||0,wa=He-Nt||0,qi=ki>0,Pi=Le.useMemo(function(){if(Xn===0||ki===0)return 0;var Pa=Xn/ki;return Pa*wa},[Xn,ki,wa]),fa=function(ha){ha.stopPropagation(),ha.preventDefault()},ji=Le.useRef({top:Pi,dragging:Ut,pageY:jn,startTop:cn});ji.current={top:Pi,dragging:Ut,pageY:jn,startTop:cn};var Ci=function(ha){Nn(!0),Qn(lt(ha,_t)),Kn(ji.current.top),On(),ha.stopPropagation(),ha.preventDefault()};Le.useEffect(function(){var Pa=function(mt){mt.preventDefault()},ha=xi.current,ai=Zr.current;return ha.addEventListener("touchstart",Pa),ai.addEventListener("touchstart",Ci),function(){ha.removeEventListener("touchstart",Pa),ai.removeEventListener("touchstart",Ci)}},[]);var ta=Le.useRef();ta.current=ki;var _a=Le.useRef();_a.current=wa,Le.useEffect(function(){if(Ut){var Pa,ha=function(mt){var zt=ji.current,an=zt.dragging,An=zt.pageY,Sr=zt.startTop;if(Ye.cancel(Pa),an){var wr=lt(mt,_t)-An,Tr=Sr;!pi&&_t?Tr-=wr:Tr+=wr;var $r=ta.current,Dr=_a.current,ei=Dr?Tr/Dr:0,ci=Math.ceil(ei*$r);ci=Math.max(ci,0),ci=Math.min(ci,$r),Pa=Ye(function(){st(ci,_t)})}},ai=function(){Nn(!1),qe()};return window.addEventListener("mousemove",ha),window.addEventListener("touchmove",ha),window.addEventListener("mouseup",ai),window.addEventListener("touchend",ai),function(){window.removeEventListener("mousemove",ha),window.removeEventListener("touchmove",ha),window.removeEventListener("mouseup",ai),window.removeEventListener("touchend",ai),Ye.cancel(Pa)}}},[Ut]),Le.useEffect(function(){Yi()},[Xn]),Le.useImperativeHandle(Cn,function(){return{delayHidden:Yi}});var na="".concat(In,"-scrollbar"),Ni={position:"absolute",visibility:cr&&qi?null:"hidden"},ka={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return _t?(Ni.height=8,Ni.left=0,Ni.right=0,Ni.bottom=0,ka.height="100%",ka.width=Nt,pi?ka.left=Pi:ka.right=Pi):(Ni.width=8,Ni.top=0,Ni.bottom=0,pi?Ni.right=0:Ni.left=0,ka.width="100%",ka.height=Nt,ka.top=Pi),Le.createElement("div",{ref:xi,className:Pe()(na,(_n={},(0,ge.Z)(_n,"".concat(na,"-horizontal"),_t),(0,ge.Z)(_n,"".concat(na,"-vertical"),!_t),(0,ge.Z)(_n,"".concat(na,"-visible"),cr),_n)),style:(0,Ve.Z)((0,Ve.Z)({},Ni),gt),onMouseDown:fa,onMouseMove:Yi},Le.createElement("div",{ref:Zr,className:Pe()("".concat(na,"-thumb"),(0,ge.Z)({},"".concat(na,"-thumb-moving"),Ut)),style:(0,Ve.Z)((0,Ve.Z)({},ka),Rt),onMouseDown:Ci}))}),xe=Me;function We(Mt){var Cn=Mt.children,_n=Mt.setRef,In=Le.useCallback(function(mr){_n(mr)},[]);return Le.cloneElement(Cn,{ref:In})}function je(Mt,Cn,_n,In,mr,Xn,sr){var On=sr.getKey;return Mt.slice(Cn,_n+1).map(function(qe,st){var _t=Cn+st,Nt=Xn(qe,_t,{style:{width:In}}),He=On(qe);return Le.createElement(We,{key:He,setRef:function(Rt){return mr(qe,Rt)}},Nt)})}function Et(Mt){return Mt instanceof HTMLElement||Mt instanceof SVGElement}function vt(Mt){return Et(Mt)?Mt:Mt instanceof Le.Component?Se.findDOMNode(Mt):null}var At=le(15671),Qe=le(43144),Bt=function(){function Mt(){(0,At.Z)(this,Mt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Qe.Z)(Mt,[{key:"set",value:function(_n,In){this.maps[_n]=In,this.id+=1}},{key:"get",value:function(_n){return this.maps[_n]}}]),Mt}(),Lt=Bt;function hn(Mt,Cn,_n){var In=Le.useState(0),mr=(0,et.Z)(In,2),Xn=mr[0],sr=mr[1],On=(0,Le.useRef)(new Map),qe=(0,Le.useRef)(new Lt),st=(0,Le.useRef)();function _t(){Ye.cancel(st.current)}function Nt(){var gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;_t();var Rt=function(){On.current.forEach(function(Zt,Ut){if(Zt&&Zt.offsetParent){var Nn=vt(Zt),hr=Nn.offsetHeight;qe.current.get(Ut)!==hr&&qe.current.set(Ut,Nn.offsetHeight)}}),sr(function(Zt){return Zt+1})};gt?Rt():st.current=Ye(Rt)}function He(gt,Rt){var It=Mt(gt),Zt=On.current.get(It);Rt?(On.current.set(It,Rt),Nt()):On.current.delete(It),!Zt!=!Rt&&(Rt?Cn==null||Cn(gt):_n==null||_n(gt))}return(0,Le.useEffect)(function(){return _t},[]),[He,Nt,qe.current,Xn]}function ut(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Yt=ut()?Le.useLayoutEffect:Le.useEffect,vn=function(Cn,_n){var In=Le.useRef(!0);Yt(function(){return Cn(In.current)},_n),Yt(function(){return In.current=!1,function(){In.current=!0}},[])},un=function(Cn,_n){vn(function(In){if(!In)return Cn()},_n)},Ze=vn;function Ae(Mt){var Cn=Le.useRef();Cn.current=Mt;var _n=Le.useCallback(function(){for(var In,mr=arguments.length,Xn=new Array(mr),sr=0;sr<mr;sr++)Xn[sr]=arguments[sr];return(In=Cn.current)===null||In===void 0?void 0:In.call.apply(In,[Cn].concat(Xn))},[]);return _n}function Pt(Mt){var Cn=React.useRef(!1),_n=React.useState(Mt),In=_slicedToArray(_n,2),mr=In[0],Xn=In[1];React.useEffect(function(){return Cn.current=!1,function(){Cn.current=!0}},[]);function sr(On,qe){qe&&Cn.current||Xn(On)}return[mr,sr]}function bn(Mt){return Mt!==void 0}function nn(Mt,Cn){var _n=Cn||{},In=_n.defaultValue,mr=_n.value,Xn=_n.onChange,sr=_n.postState,On=useState(function(){return bn(mr)?mr:bn(In)?typeof In=="function"?In():In:typeof Mt=="function"?Mt():Mt}),qe=_slicedToArray(On,2),st=qe[0],_t=qe[1],Nt=mr!==void 0?mr:st,He=sr?sr(Nt):Nt,gt=useEvent(Xn),Rt=useState([Nt]),It=_slicedToArray(Rt,2),Zt=It[0],Ut=It[1];useLayoutUpdateEffect(function(){var hr=Zt[0];st!==hr&>(st,hr)},[Zt]),useLayoutUpdateEffect(function(){bn(mr)||_t(mr)},[mr]);var Nn=useEvent(function(hr,Vn){_t(hr,Vn),Ut([Nt],Vn)});return[He,Nn]}var tt=le(31461);function ot(Mt,Cn,_n){var In=React.useRef({});return(!("value"in In.current)||_n(In.current.condition,Cn))&&(In.current.value=Mt(),In.current.condition=Cn),In.current.value}function Ht(Mt,Cn){typeof Mt=="function"?Mt(Cn):_typeof(Mt)==="object"&&Mt&&"current"in Mt&&(Mt.current=Cn)}function En(){for(var Mt=arguments.length,Cn=new Array(Mt),_n=0;_n<Mt;_n++)Cn[_n]=arguments[_n];var In=Cn.filter(function(mr){return mr});return In.length<=1?In[0]:function(mr){Cn.forEach(function(Xn){Ht(Xn,mr)})}}function fn(){for(var Mt=arguments.length,Cn=new Array(Mt),_n=0;_n<Mt;_n++)Cn[_n]=arguments[_n];return useMemo(function(){return En.apply(void 0,Cn)},Cn,function(In,mr){return In.length!==mr.length||In.every(function(Xn,sr){return Xn!==mr[sr]})})}function Gt(Mt){var Cn,_n,In=isMemo(Mt)?Mt.type.type:Mt.type;return!(typeof In=="function"&&!((Cn=In.prototype)!==null&&Cn!==void 0&&Cn.render)||typeof Mt=="function"&&!((_n=Mt.prototype)!==null&&_n!==void 0&&_n.render))}function Ft(Mt){return!isValidElement(Mt)||isFragment(Mt)?!1:Gt(Mt)}function xn(Mt,Cn,_n,In){if(!Cn.length)return _n;var mr=_toArray(Cn),Xn=mr[0],sr=mr.slice(1),On;return!Mt&&typeof Xn=="number"?On=[]:Array.isArray(Mt)?On=_toConsumableArray(Mt):On=_objectSpread({},Mt),In&&_n===void 0&&sr.length===1?delete On[Xn][sr[0]]:On[Xn]=xn(On[Xn],sr,_n,In),On}function gn(Mt,Cn,_n){var In=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Cn.length&&In&&_n===void 0&&!get(Mt,Cn.slice(0,-1))?Mt:xn(Mt,Cn,_n,In)}function _e(Mt){return _typeof(Mt)==="object"&&Mt!==null&&Object.getPrototypeOf(Mt)===Object.prototype}function ce(Mt){return Array.isArray(Mt)?[]:{}}var se=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function he(){for(var Mt=arguments.length,Cn=new Array(Mt),_n=0;_n<Mt;_n++)Cn[_n]=arguments[_n];var In=ce(Cn[0]);return Cn.forEach(function(mr){function Xn(sr,On){var qe=new Set(On),st=get(mr,sr),_t=Array.isArray(st);if(_t||_e(st)){if(!qe.has(st)){qe.add(st);var Nt=get(In,sr);_t?In=gn(In,sr,[]):(!Nt||_typeof(Nt)!=="object")&&(In=gn(In,sr,ce(st))),se(st).forEach(function(He){Xn([].concat(_toConsumableArray(sr),[He]),qe)})}}else In=gn(In,sr,st)}Xn([])}),In}var fe={},oe=[],ke=function(Cn){oe.push(Cn)};function Ge(Mt,Cn){if(0)var _n}function St(Mt,Cn){if(0)var _n}function Tt(){fe={}}function Ot(Mt,Cn,_n){!Cn&&!fe[_n]&&(Mt(!1,_n),fe[_n]=!0)}function Wt(Mt,Cn){Ot(Ge,Mt,Cn)}function $t(Mt,Cn){Ot(St,Mt,Cn)}Wt.preMessage=ke,Wt.resetWarned=Tt,Wt.noteOnce=$t;var Gn=null,ar=10;function Dt(Mt,Cn,_n,In,mr,Xn,sr,On){var qe=Le.useRef(),st=Le.useState(null),_t=(0,et.Z)(st,2),Nt=_t[0],He=_t[1];return Ze(function(){if(Nt&&Nt.times<ar){if(!Mt.current){He(function(Yi){return(0,Ve.Z)({},Yi)});return}Xn();var gt=Nt.targetAlign,Rt=Nt.originAlign,It=Nt.index,Zt=Nt.offset,Ut=Mt.current.clientHeight,Nn=!1,hr=gt,Vn=null;if(Ut){for(var jn=gt||Rt,Qn=0,tr=0,Ar=0,cn=Math.min(Cn.length-1,It),Kn=0;Kn<=cn;Kn+=1){var pi=mr(Cn[Kn]);tr=Qn;var xi=_n.get(pi);Ar=tr+(xi===void 0?In:xi),Qn=Ar}for(var Zr=jn==="top"?Zt:Ut-Zt,Rr=cn;Rr>=0;Rr-=1){var _i=mr(Cn[Rr]),cr=_n.get(_i);if(cr===void 0){Nn=!0;break}if(Zr-=cr,Zr<=0)break}switch(jn){case"top":Vn=tr-Zt;break;case"bottom":Vn=Ar-Ut+Zt;break;default:{var ui=Mt.current.scrollTop,wn=ui+Ut;tr<ui?hr="top":Ar>wn&&(hr="bottom")}}Vn!==null&&sr(Vn),Vn!==Nt.lastTop&&(Nn=!0)}Nn&&He(function(Yi){return(0,Ve.Z)((0,Ve.Z)({},Yi),{},{times:Yi.times+1,targetAlign:hr,lastTop:Vn})})}},[Nt,Mt.current]),function(gt){if(gt==null){On();return}if(Ye.cancel(qe.current),typeof gt=="number")sr(gt);else if(gt&&(0,$e.Z)(gt)==="object"){var Rt,It=gt.align;"index"in gt?Rt=gt.index:Rt=Cn.findIndex(function(Nn){return mr(Nn)===gt.key});var Zt=gt.offset,Ut=Zt===void 0?0:Zt;He({times:0,index:Rt,offset:Ut,originAlign:It})}}}function tn(Mt,Cn,_n,In){var mr=_n-Mt,Xn=Cn-_n,sr=Math.min(mr,Xn)*2;if(In<=sr){var On=Math.floor(In/2);return In%2?_n+On+1:_n-On}return mr>Xn?_n-(In-Xn):_n+(In-mr)}function qn(Mt,Cn,_n){var In=Mt.length,mr=Cn.length,Xn,sr;if(In===0&&mr===0)return null;In<mr?(Xn=Mt,sr=Cn):(Xn=Cn,sr=Mt);var On={__EMPTY_ITEM__:!0};function qe(Rt){return Rt!==void 0?_n(Rt):On}for(var st=null,_t=Math.abs(In-mr)!==1,Nt=0;Nt<sr.length;Nt+=1){var He=qe(Xn[Nt]),gt=qe(sr[Nt]);if(He!==gt){st=Nt,_t=_t||He!==qe(sr[Nt+1]);break}}return st===null?null:{index:st,multiple:_t}}function Er(Mt,Cn,_n){var In=Le.useState(Mt),mr=(0,et.Z)(In,2),Xn=mr[0],sr=mr[1],On=Le.useState(null),qe=(0,et.Z)(On,2),st=qe[0],_t=qe[1];return Le.useEffect(function(){var Nt=qn(Xn||[],Mt||[],Cn);(Nt==null?void 0:Nt.index)!==void 0&&(_n==null||_n(Nt.index),_t(Mt[Nt.index])),sr(Mt)},[Mt]),[st]}var kn=(typeof navigator=="undefined"?"undefined":(0,$e.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),gr=kn,Di=function(Mt,Cn){var _n=(0,Le.useRef)(!1),In=(0,Le.useRef)(null);function mr(){clearTimeout(In.current),_n.current=!0,In.current=setTimeout(function(){_n.current=!1},50)}var Xn=(0,Le.useRef)({top:Mt,bottom:Cn});return Xn.current.top=Mt,Xn.current.bottom=Cn,function(sr){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=sr<0&&Xn.current.top||sr>0&&Xn.current.bottom;return On&&qe?(clearTimeout(In.current),_n.current=!1):(!qe||_n.current)&&mr(),!_n.current&&qe}};function ni(Mt,Cn,_n,In,mr){var Xn=(0,Le.useRef)(0),sr=(0,Le.useRef)(null),On=(0,Le.useRef)(null),qe=(0,Le.useRef)(!1),st=Di(Cn,_n);function _t(Zt,Ut){Ye.cancel(sr.current),Xn.current+=Ut,On.current=Ut,!st(Ut)&&(gr||Zt.preventDefault(),sr.current=Ye(function(){var Nn=qe.current?10:1;mr(Xn.current*Nn),Xn.current=0}))}function Nt(Zt,Ut){mr(Ut,!0),gr||Zt.preventDefault()}var He=(0,Le.useRef)(null),gt=(0,Le.useRef)(null);function Rt(Zt){if(Mt){Ye.cancel(gt.current),gt.current=Ye(function(){He.current=null},2);var Ut=Zt.deltaX,Nn=Zt.deltaY,hr=Zt.shiftKey,Vn=Ut,jn=Nn;(He.current==="sx"||!He.current&&hr&&Nn&&!Ut)&&(Vn=Nn,jn=0,He.current="sx");var Qn=Math.abs(Vn),tr=Math.abs(jn);He.current===null&&(He.current=In&&Qn>tr?"x":"y"),He.current==="y"?_t(Zt,jn):Nt(Zt,Vn)}}function It(Zt){Mt&&(qe.current=Zt.detail===On.current)}return[Rt,It]}var Xr=14/15;function Vr(Mt,Cn,_n){var In=(0,Le.useRef)(!1),mr=(0,Le.useRef)(0),Xn=(0,Le.useRef)(null),sr=(0,Le.useRef)(null),On,qe=function(He){if(In.current){var gt=Math.ceil(He.touches[0].pageY),Rt=mr.current-gt;mr.current=gt,_n(Rt)&&He.preventDefault(),clearInterval(sr.current),sr.current=setInterval(function(){Rt*=Xr,(!_n(Rt,!0)||Math.abs(Rt)<=.1)&&clearInterval(sr.current)},16)}},st=function(){In.current=!1,On()},_t=function(He){On(),He.touches.length===1&&!In.current&&(In.current=!0,mr.current=Math.ceil(He.touches[0].pageY),Xn.current=He.target,Xn.current.addEventListener("touchmove",qe),Xn.current.addEventListener("touchend",st))};On=function(){Xn.current&&(Xn.current.removeEventListener("touchmove",qe),Xn.current.removeEventListener("touchend",st))},Ze(function(){return Mt&&Cn.current.addEventListener("touchstart",_t),function(){var Nt;(Nt=Cn.current)===null||Nt===void 0||Nt.removeEventListener("touchstart",_t),On(),clearInterval(sr.current)}},[Mt])}var Si=20;function hi(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_n=Mt/Cn*100;return isNaN(_n)&&(_n=0),_n=Math.max(_n,Si),_n=Math.min(_n,Mt/2),Math.floor(_n)}function Ti(Mt,Cn,_n,In){var mr=Le.useMemo(function(){return[new Map,[]]},[Mt,_n.id,In]),Xn=(0,et.Z)(mr,2),sr=Xn[0],On=Xn[1],qe=function(_t){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_t,He=sr.get(_t),gt=sr.get(Nt);if(He===void 0||gt===void 0)for(var Rt=Mt.length,It=On.length;It<Rt;It+=1){var Zt,Ut=Mt[It],Nn=Cn(Ut);sr.set(Nn,It);var hr=(Zt=_n.get(Nn))!==null&&Zt!==void 0?Zt:In;if(On[It]=(On[It-1]||0)+hr,Nn===_t&&(He=It),Nn===Nt&&(gt=It),He!==void 0&>!==void 0)break}return{top:On[He-1]||0,bottom:On[gt]}};return qe}var Ii=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Lr=[],Xi={overflowY:"auto",overflowAnchor:"none"};function la(Mt,Cn){var _n=Mt.prefixCls,In=_n===void 0?"rc-virtual-list":_n,mr=Mt.className,Xn=Mt.height,sr=Mt.itemHeight,On=Mt.fullHeight,qe=On===void 0?!0:On,st=Mt.style,_t=Mt.data,Nt=Mt.children,He=Mt.itemKey,gt=Mt.virtual,Rt=Mt.direction,It=Mt.scrollWidth,Zt=Mt.component,Ut=Zt===void 0?"div":Zt,Nn=Mt.onScroll,hr=Mt.onVirtualScroll,Vn=Mt.onVisibleChange,jn=Mt.innerProps,Qn=Mt.extraRender,tr=Mt.styles,Ar=(0,Te.Z)(Mt,Ii),cn=!!(gt!==!1&&Xn&&sr),Kn=cn&&_t&&(sr*_t.length>Xn||!!It),pi=Rt==="rtl",xi=Pe()(In,(0,ge.Z)({},"".concat(In,"-rtl"),pi),mr),Zr=_t||Lr,Rr=(0,Le.useRef)(),_i=(0,Le.useRef)(),cr=(0,Le.useState)(0),ui=(0,et.Z)(cr,2),wn=ui[0],Yi=ui[1],ki=(0,Le.useState)(0),wa=(0,et.Z)(ki,2),qi=wa[0],Pi=wa[1],fa=(0,Le.useState)(!1),ji=(0,et.Z)(fa,2),Ci=ji[0],ta=ji[1],_a=function(){ta(!0)},na=function(){ta(!1)},Ni=Le.useCallback(function(Jt){return typeof He=="function"?He(Jt):Jt==null?void 0:Jt[He]},[He]),ka={getKey:Ni};function Pa(Jt){Yi(function(Ln){var Pn;typeof Jt=="function"?Pn=Jt(Ln):Pn=Jt;var rr=zn(Pn);return Rr.current.scrollTop=rr,rr})}var ha=(0,Le.useRef)({start:0,end:Zr.length}),ai=(0,Le.useRef)(),bt=Er(Zr,Ni),mt=(0,et.Z)(bt,1),zt=mt[0];ai.current=zt;var an=hn(Ni,null,null),An=(0,et.Z)(an,4),Sr=An[0],wr=An[1],Tr=An[2],$r=An[3],Dr=Le.useMemo(function(){if(!cn)return{scrollHeight:void 0,start:0,end:Zr.length-1,offset:void 0};if(!Kn){var Jt;return{scrollHeight:((Jt=_i.current)===null||Jt===void 0?void 0:Jt.offsetHeight)||0,start:0,end:Zr.length-1,offset:void 0}}for(var Ln=0,Pn,rr,Tn,pr=Zr.length,Pr=0;Pr<pr;Pr+=1){var br=Zr[Pr],_r=Ni(br),lr=Tr.get(_r),Cr=Ln+(lr===void 0?sr:lr);Cr>=wn&&Pn===void 0&&(Pn=Pr,rr=Ln),Cr>wn+Xn&&Tn===void 0&&(Tn=Pr),Ln=Cr}return Pn===void 0&&(Pn=0,rr=0,Tn=Math.ceil(Xn/sr)),Tn===void 0&&(Tn=Zr.length-1),Tn=Math.min(Tn+1,Zr.length-1),{scrollHeight:Ln,start:Pn,end:Tn,offset:rr}},[Kn,cn,wn,Zr,$r,Xn]),ei=Dr.scrollHeight,ci=Dr.start,Mi=Dr.end,Gi=Dr.offset;ha.current.start=ci,ha.current.end=Mi;var Wi=Le.useState({width:0,height:Xn}),Fi=(0,et.Z)(Wi,2),Ie=Fi[0],Fe=Fi[1],Ne=function(Ln){Fe({width:Ln.width||Ln.offsetWidth,height:Ln.height||Ln.offsetHeight})},Ue=(0,Le.useRef)(),it=(0,Le.useRef)(),ft=Le.useMemo(function(){return hi(Ie.width,It)},[Ie.width,It]),xt=Le.useMemo(function(){return hi(Ie.height,ei)},[Ie.height,ei]),Xt=ei-Xn,Qt=(0,Le.useRef)(Xt);Qt.current=Xt;function zn(Jt){var Ln=Jt;return Number.isNaN(Qt.current)||(Ln=Math.min(Ln,Qt.current)),Ln=Math.max(Ln,0),Ln}var nr=wn<=0,Rn=wn>=Xt,on=Di(nr,Rn),rn=function(){return{x:pi?-qi:qi,y:wn}},yn=(0,Le.useRef)(rn()),Mn=Ae(function(){if(hr){var Jt=rn();(yn.current.x!==Jt.x||yn.current.y!==Jt.y)&&(hr(Jt),yn.current=Jt)}});function er(Jt,Ln){var Pn=Jt;Ln?((0,Se.flushSync)(function(){Pi(Pn)}),Mn()):Pa(Pn)}function Hn(Jt){var Ln=Jt.currentTarget.scrollTop;Ln!==wn&&Pa(Ln),Nn==null||Nn(Jt),Mn()}var $n=function(Ln){var Pn=Ln,rr=It-Ie.width;return Pn=Math.max(Pn,0),Pn=Math.min(Pn,rr),Pn},Un=Ae(function(Jt,Ln){Ln?((0,Se.flushSync)(function(){Pi(function(Pn){var rr=Pn+(pi?-Jt:Jt);return $n(rr)})}),Mn()):Pa(function(Pn){var rr=Pn+Jt;return rr})}),Wn=ni(cn,nr,Rn,!!It,Un),ir=(0,et.Z)(Wn,2),ze=ir[0],Ke=ir[1];Vr(cn,Rr,function(Jt,Ln){return on(Jt,Ln)?!1:(ze({preventDefault:function(){},deltaY:Jt}),!0)}),Ze(function(){function Jt(Pn){cn&&Pn.preventDefault()}var Ln=Rr.current;return Ln.addEventListener("wheel",ze),Ln.addEventListener("DOMMouseScroll",Ke),Ln.addEventListener("MozMousePixelScroll",Jt),function(){Ln.removeEventListener("wheel",ze),Ln.removeEventListener("DOMMouseScroll",Ke),Ln.removeEventListener("MozMousePixelScroll",Jt)}},[cn]),Ze(function(){It&&Pi(function(Jt){return $n(Jt)})},[Ie.width,It]);var kt=function(){var Ln,Pn;(Ln=Ue.current)===null||Ln===void 0||Ln.delayHidden(),(Pn=it.current)===null||Pn===void 0||Pn.delayHidden()},yt=Dt(Rr,Zr,Tr,sr,Ni,function(){return wr(!0)},Pa,kt);Le.useImperativeHandle(Cn,function(){return{getScrollInfo:rn,scrollTo:function(Ln){function Pn(rr){return rr&&(0,$e.Z)(rr)==="object"&&("left"in rr||"top"in rr)}Pn(Ln)?(Ln.left!==void 0&&Pi($n(Ln.left)),yt(Ln.top)):yt(Ln)}}}),Ze(function(){if(Vn){var Jt=Zr.slice(ci,Mi+1);Vn(Jt,Zr)}},[ci,Mi,Zr]);var qt=Ti(Zr,Ni,Tr,sr),dn=Qn==null?void 0:Qn({start:ci,end:Mi,virtual:Kn,offsetX:qi,offsetY:Gi,rtl:pi,getSize:qt}),sn=je(Zr,ci,Mi,It,Sr,Nt,ka),Dn=null;Xn&&(Dn=(0,Ve.Z)((0,ge.Z)({},qe?"height":"maxHeight",Xn),Xi),cn&&(Dn.overflowY="hidden",It&&(Dn.overflowX="hidden"),Ci&&(Dn.pointerEvents="none")));var Sn={};return pi&&(Sn.dir="rtl"),Le.createElement("div",(0,be.Z)({style:(0,Ve.Z)((0,Ve.Z)({},st),{},{position:"relative"}),className:xi},Sn,Ar),Le.createElement(at.Z,{onResize:Ne},Le.createElement(Ut,{className:"".concat(In,"-holder"),style:Dn,ref:Rr,onScroll:Hn,onMouseEnter:kt},Le.createElement(ht,{prefixCls:In,height:ei,offsetX:qi,offsetY:Gi,scrollWidth:It,onInnerResize:wr,ref:_i,innerProps:jn,rtl:pi,extra:dn},sn))),Kn&&ei>Xn&&Le.createElement(xe,{ref:Ue,prefixCls:In,scrollOffset:wn,scrollRange:ei,rtl:pi,onScroll:er,onStartMove:_a,onStopMove:na,spinSize:xt,containerSize:Ie.height,style:tr==null?void 0:tr.verticalScrollBar,thumbStyle:tr==null?void 0:tr.verticalScrollBarThumb}),Kn&&It&&Le.createElement(xe,{ref:it,prefixCls:In,scrollOffset:qi,scrollRange:It,rtl:pi,onScroll:er,onStartMove:_a,onStopMove:na,spinSize:ft,containerSize:Ie.width,horizontal:!0,style:tr==null?void 0:tr.horizontalScrollBar,thumbStyle:tr==null?void 0:tr.horizontalScrollBarThumb}))}var va=Le.forwardRef(la);va.displayName="List";var ya=va,$i=ya},66392:function(mn,Vt){"use strict";var le;var be=Symbol.for("react.element"),Ve=Symbol.for("react.portal"),$e=Symbol.for("react.fragment"),et=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),Le=Symbol.for("react.context"),Se=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),ht=Symbol.for("react.lazy"),nt=Symbol.for("react.offscreen"),rt;rt=Symbol.for("react.module.reference");function Je(Ee){if(typeof Ee=="object"&&Ee!==null){var pt=Ee.$$typeof;switch(pt){case be:switch(Ee=Ee.type,Ee){case $e:case ge:case et:case Pe:case at:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case Se:case Le:case me:case ht:case Oe:case Te:return Ee;default:return pt}}case Ve:return pt}}}le=Le,le=Te,le=be,le=me,le=$e,le=ht,le=Oe,le=Ve,le=ge,le=et,le=Pe,le=at,le=function(){return!1},le=function(){return!1},le=function(Ee){return Je(Ee)===Le},le=function(Ee){return Je(Ee)===Te},le=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===be},le=function(Ee){return Je(Ee)===me},le=function(Ee){return Je(Ee)===$e},le=function(Ee){return Je(Ee)===ht},le=function(Ee){return Je(Ee)===Oe},le=function(Ee){return Je(Ee)===Ve},le=function(Ee){return Je(Ee)===ge},le=function(Ee){return Je(Ee)===et},le=function(Ee){return Je(Ee)===Pe},le=function(Ee){return Je(Ee)===at},le=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===$e||Ee===ge||Ee===et||Ee===Pe||Ee===at||Ee===nt||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===ht||Ee.$$typeof===Oe||Ee.$$typeof===Te||Ee.$$typeof===Le||Ee.$$typeof===me||Ee.$$typeof===rt||Ee.getModuleId!==void 0)},le=Je},31461:function(mn,Vt,le){"use strict";le(66392)},84279:function(mn,Vt,le){"use strict";var be=Object.defineProperty,Ve=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Le=(a,y,b)=>y in a?be(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,Se=(a,y)=>{for(var b in y||(y={}))ge.call(y,b)&&Le(a,b,y[b]);if(et)for(var b of et(y))Te.call(y,b)&&Le(a,b,y[b]);return a},me=(a,y)=>Ve(a,$e(y)),Pe=a=>typeof a=="symbol"?a:a+"",at=(a,y)=>{var b={};for(var E in a)ge.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&et)for(var E of et(a))y.indexOf(E)<0&&Te.call(a,E)&&(b[E]=a[E]);return b};function Oe(a){return Array.isArray(a)}var ht={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 nt(){return"window"in globalThis&&"document"in globalThis}function rt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function Je(){return typeof navigator.vibrate=="function"}function Ee(){var a,y;if(!nt())return"other";const b=(y=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?y:navigator.platform;return/^mac/i.test(b)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(b)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function pt(){if(!nt())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 Kt(){return HTMLElement.prototype.hasOwnProperty("popover")}var Ye={strings:ht,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Ye._locale||(Ye._locale=nt()?navigator.language.slice(0,5):"en-US"),Ye._locale},set locale(a){Ye._locale=a,Ye._numberFormatter=void 0,Ye.dirty=!0},get numberFormatter(){return Ye._numberFormatter||(Ye._numberFormatter=new Intl.NumberFormat(Ye.locale)),Ye._numberFormatter},merge(a,y){if(typeof a=="string"&&y)Ye.strings[a]=Se(Se({},Ye.strings[a]),y),Ye.dirty=!0;else for(const b of Object.keys(a))Ye.merge(b,a[b])},get dirty(){return Ye._dirty},set dirty(a){Ye._dirty||Ye._dirty===a||(Ye._dirty=!0,setTimeout(()=>{Ye._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return Ye._subscribers.push(a),Ye._subscribers.length-1},unsubscribe(a){a<0||a>=Ye._subscribers.length||(Ye._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=lt(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=lt(E);ee&&b.setAttribute("aria-label",ee)}}}};function lt(a,...y){if(a===void 0)return;let b="";const E=Ye.locale;Ye.strings[E]&&(b=Ye.strings[E][a]);const ee=E.slice(0,2);if(!b&&Ye.strings[ee]&&(b=Ye.strings[ee][a]),b||(b=Ye.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(b),de=0;for(;ae;){if(y[de++]){const ye=ae[2]?parseInt(ae[2],10)-1:de-1;let we=y[ye];typeof we=="number"&&(we=Ye.numberFormatter.format(we)),b=b.replace(ae[1],we)}ae=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var Me={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},xe={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},We={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"},je={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},Et={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},vt={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 At(a){var y,b,E,ee,re,ae;const de=a.split("!");let pe,ye,we,Be=255,Xe=255,dt=255,wt=-1;const pn=de.length>0&&de[0].startsWith("-");pn&&(de[0]=de[0].slice(1));for(let ur=0;ur<de.length;ur++){pe=Be,ye=Xe,we=dt;const ln=(y=de[ur].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],Zn=ln==null?void 0:ln.toLowerCase(),fr=ln&&(ae=(re=(ee=(E=(b=je[Zn])!=null?b:je[Et[ln]])!=null?E:xe[ln])!=null?ee:vt[ln])!=null?re:Me[ln])!=null?ae:de[ur].trim();let Yn=fr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Yn!=null&&Yn[1]&&Yn[2]&&Yn[3])Be=Math.max(0,Math.min(255,Number.parseInt(Yn[1],16))),Xe=Math.max(0,Math.min(255,Number.parseInt(Yn[2],16))),dt=Math.max(0,Math.min(255,Number.parseInt(Yn[3],16)));else if(Yn=fr.match(/^#([\da-f]{3})$/i),Yn!=null&&Yn[1]){const Wr=Number.parseInt(Yn[1][0],16),li=Number.parseInt(Yn[1][1],16),qr=Number.parseInt(Yn[1][2],16);Be=Math.max(0,Math.min(255,Wr*16+Wr)),Xe=Math.max(0,Math.min(255,li*16+li)),dt=Math.max(0,Math.min(255,qr*16+qr))}else if(Yn=fr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Yn!=null&&Yn[1]&&Yn[2]&&Yn[3])Be=Math.max(0,Math.min(255,Number.parseInt(Yn[1]))),Xe=Math.max(0,Math.min(255,Number.parseInt(Yn[2]))),dt=Math.max(0,Math.min(255,Number.parseInt(Yn[3])));else return;wt>=0&&(Be=(1-wt)*Be+wt*pe,Xe=(1-wt)*Xe+wt*ye,dt=(1-wt)*dt+wt*we,wt=-1),ur+1<de.length&&(wt=Math.max(0,Math.min(100,Number.parseInt(de[++ur])))/100)}return wt>=0&&(Be=wt*Be+(1-wt)*pe,Xe=wt*Xe+(1-wt)*ye,dt=wt*dt+(1-wt)*we),pn&&(Be=255-Be,Xe=255-Xe,dt=255-dt),"#"+("00"+Math.round(Be).toString(16)).slice(-2)+("00"+Math.round(Xe).toString(16)).slice(-2)+("00"+Math.round(dt).toString(16)).slice(-2)}function Qe(a){var y,b;return a=a.trim(),(b=(y=We[a.toLowerCase()])!=null?y:We[Et[a]])!=null?b:At(a)}function Bt(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 Lt(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 hn(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*Lt(re,ee,y+2)),g:Math.round(255*Lt(re,ee,y)),b:Math.round(255*Lt(re,ee,y-2))}}function ut(a){return a<0?0:a>255?255:Math.round(a)}function Yt(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(ut(y)<<16)+(ut(b)<<8)+ut(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 vn(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 de,pe;re===ee?de=0:y===re?de=(b-E)/ae:b===re?de=2+(E-y)/ae:E===re&&(de=4+(y-b)/ae),de=Math.min(de*60,360),de<0&&(de+=360);const ye=(ee+re)/2;return re===ee?pe=0:ye<=.5?pe=ae/(re+ee):pe=ae/(2-re-ee),{h:de,s:pe,l:ye}}function un(a){let y=Bt(a);if(!y)return a;let{h:b,s:E,l:ee}=vn(y);return E+=.1,ee-=.1,Yt(hn({h:b,s:E,l:ee}))}var Ze={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"},Ae={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},Pt=[{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 bn(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 Pt)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(Ae[re]||re)}return a}function nn(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Ae)if(Ae[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of Pt)if(a>=b.start&&a<b.start+b.len)return{char:String.fromCodePoint(a-b.start+b.offset),variant:b.variant,style:b.style};return{char:String.fromCodePoint(a)}}function tt(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const ee=(y=E.codePointAt(0))!=null?y:0;let re=Ze[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:ae,variant:de,style:pe}=nn(ee);switch(re=ae,de){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(pe){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function ot(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Ht={},En=Se({},Ze),fn={},Gt={},Ft={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}"},xn={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}},gn={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}},_e={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:gn},"amsmath.sty":{package:xn,primitive:!0},"texvc.sty":{package:Ft,primitive:!1}},ce={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},se=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,he,fe;pt()?(he=new RegExp("\\p{Letter}","u"),fe=new RegExp("[0-9\\p{Letter}]","u")):(he=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,fe=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function oe(a,y,b="mord",E){y!==void 0&&(Ht[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},En[y]||(En[y]=a))}function ke(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);oe(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)oe(E,ee,re!=null?re:y,ae!=null?ae:b)}function Ge(a,y){for(let b=a;b<=y;b++)oe(String.fromCodePoint(b),b)}function St(a){var y;return(y=Gt[a])!=null?y:null}function Tt(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const ae in fn)ae.startsWith(y)&&!fn[ae].infix&&ee.push({match:ae,frequency:(b=fn[ae].frequency)!=null?b:0});for(const ae in Ht)ae.startsWith(y)&&ee.push({match:ae,frequency:(E=Ht[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,de)=>{var pe,ye;return ae.frequency===de.frequency?ae.match.length===de.match.length?ae.match<de.match?-1:1:ae.match.length-de.match.length:((pe=de.frequency)!=null?pe:0)-((ye=ae.frequency)!=null?ye:0)}),ee.map(ae=>ae.match)}function Ot(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function Wt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Ot(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Wt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Ot(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Wt(b[E]))}return y}function $t(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 Gn(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)Gt[E]=b}function ar(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:Wt(y),createAtom:b};for(const re of a)Gt[re]=ee}function Dt(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:Wt(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")fn["\\"+a]=re;else for(const ae of a)fn["\\"+ae]=re}var tn;function qn(a){return tn||(tn=kn(_e)),a?kn(Se(Se({},tn),a)):tn}function Er(a,y){var b,E,ee,re;if(typeof a=="string"){let ae=0;const de=a;return/(^|[^\\])#1/.test(de)&&(ae=1),/(^|[^\\])#2/.test(de)&&(ae=2),/(^|[^\\])#3/.test(de)&&(ae=3),/(^|[^\\])#4/.test(de)&&(ae=4),/(^|[^\\])#5/.test(de)&&(ae=5),/(^|[^\\])#6/.test(de)&&(ae=6),/(^|[^\\])#7/.test(de)&&(ae=7),/(^|[^\\])#8/.test(de)&&(ae=8),/(^|[^\\])#9/.test(de)&&(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:de}}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 kn(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]=Er(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Er(E)}return y}function gr(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=fn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Ht[a]:ce[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ce[a]})}else if(y==="math"){if(b=Ht[a],!b&&a.length===1){const E=ni("math",a.codePointAt(0));return E.startsWith("\\")?me(Se({},gr(E,"math")),{command:E}):null}}else ce[a]?b={definitionType:"symbol",type:"mord",codepoint:ce[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Di(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function ni(a,y){if(y===void 0)return"";if(a==="math"&&En[y])return En[y];if(a==="text"){const b=Object.keys(ce).find(E=>ce[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var Xr=[0,.68889,0,0,.72222],Vr=[0,.68889,0,0,.66667],Si=[0,.68889,0,0,.77778],hi=[0,.68889,0,0,.61111],Ti=[.16667,.68889,0,0,.77778],Ii=[0,.68889,0,0,.55556],Lr=[0,0,0,0,.25],Xi=[0,.825,0,0,2.33334],la=[0,.9,0,0,2.33334],va=[0,.68889,0,0,.54028],ya=[-.03598,.46402,0,0,.5],$i=[-.13313,.36687,0,0,1],Mt=[.01354,.52239,0,0,1],Cn=[.01354,.52239,0,0,1.11111],_n=[0,.54986,0,0,1],In=[0,.69224,0,0,.5],mr=[0,.43056,0,0,1],Xn=[.08198,.58198,0,0,.77778],sr=[.19444,.69224,0,0,.41667],On=[.1808,.675,0,0,1],qe=[.19444,.69224,0,0,.83334],st=[.13667,.63667,0,0,1],_t=[-.064,.437,0,0,1.334],Nt=[.08167,.58167,0,0,.77778],He=[0,.69224,0,0,.72222],gt=[0,.69224,0,0,.66667],Rt=[-.13313,.36687,0,0,.77778],It=[.06062,.54986,0,0,.77778],Zt=[0,.69224,0,0,.77778],Ut=[.25583,.75583,0,0,.77778],Nn=[.25142,.75726,0,0,.77778],hr=[.20576,.70576,0,0,.77778],Vn=[.30274,.79383,0,0,.77778],jn=[.22958,.72958,0,0,.77778],Qn=[.1808,.675,0,0,.77778],tr=[.13667,.63667,0,0,.77778],Ar=[.13597,.63597,0,0,.77778],cn=[.03517,.54986,0,0,.77778],Kn=[0,.675,0,0,.77778],pi=[.19444,.69224,0,0,.61111],xi=[0,.54986,0,0,.76042],Zr=[0,.54986,0,0,.66667],Rr=[.0391,.5391,0,0,.77778],_i=[.03517,.54986,0,0,1.33334],cr=[.38569,.88569,0,0,.77778],ui=[.23222,.74111,0,0,.77778],wn=[.19444,.69224,0,0,.77778],Yi=[0,.37788,0,0,.5],ki=[0,.54986,0,0,.72222],wa=[0,.69224,0,0,.83334],qi=[.11111,.69224,0,0,.66667],Pi=[.26167,.75726,0,0,.77778],fa=[.48256,.98256,0,0,.77778],ji=[.28481,.79383,0,0,.77778],Ci=[.08167,.58167,0,0,.22222],ta=[.08167,.58167,0,0,.38889],_a=[0,.43056,.04028,0,.66667],na=[.41951,.91951,0,0,.77778],Ni=[.24982,.74947,0,0,.38865],ka=[.08319,.58283,0,0,.75623],Pa=[0,.10803,0,0,.27764],ha=[0,.47534,0,0,.50181],ai=[.18906,.47534,0,0,.50181],bt=[0,.69141,0,0,.50181],mt=[.24982,.74947,0,0,.27764],zt=[0,.69141,0,0,.21471],an=[.25,.75,0,0,.44722],An=[0,.64444,0,0,.575],Sr=[.08556,.58556,0,0,.89444],wr=[0,.69444,0,0,.89444],Tr=[0,.68611,0,0,.9],$r=[0,.68611,0,0,.86944],Dr=[.25,.75,0,0,.575],ei=[.25,.75,0,0,.31944],ci=[0,.69444,0,0,.63889],Mi=[0,.69444,0,0,.31944],Gi=[0,.44444,0,0,.63889],Wi=[0,.44444,0,0,.51111],Fi=[0,.69444,0,0,.575],Ie=[.13333,.63333,0,0,.89444],Fe=[0,.44444,0,0,.31944],Ne=[0,.69444,0,0,.86944],Ue=[0,.68611,0,0,.69166],it=[0,.68611,0,0,.83055],ft=[0,.68611,0,0,.89444],xt=[0,.69444,0,0,.60278],Xt=[.19444,.69444,0,0,.51111],Qt=[0,.69444,0,0,.83055],zn=[-.10889,.39111,0,0,1.14999],nr=[.19444,.69444,0,0,.575],Rn=[.19444,.69444,0,0,1.14999],on=[.19444,.69444,0,0,.70277],rn=[.05556,.75,0,0,.575],yn=[0,.68611,0,0,.95833],Mn=[.08556,.58556,0,0,.76666],er=[-.02639,.47361,0,0,.575],Hn=[0,.44444,0,0,.89444],$n=[0,.55556,0,0,.76666],Un=[-.10889,.39111,0,0,.89444],Wn=[.00222,.50222,0,0,.89444],ir=[.19667,.69667,0,0,.89444],ze=[.08556,.58556,0,0,1.14999],Ke=[0,.69444,0,0,.70277],kt=[-.02778,.47222,0,0,.575],yt=[.25,.75,0,0,.51111],qt=[-.13889,.36111,0,0,1.14999],dn=[.19444,.69444,0,0,1.02222],sn=[.12963,.69444,0,0,.89444],Dn=[.19444,.69444,0,0,.44722],Sn=[0,.64444,.13167,0,.59111],Jt=[.19444,.64444,.13167,0,.59111],Ln=[0,.68611,.17208,0,.8961],Pn=[.19444,.44444,.105,0,.53222],rr=[0,.44444,.085,0,.82666],Tn=[0,.69444,.06709,0,.59111],pr=[0,.69444,.12945,0,.35555],Pr=[0,.69444,0,0,.94888],br=[0,.69444,.11472,0,.59111],_r=[0,.68611,.10778,0,.88555],lr=[0,.69444,.07939,0,.62055],Cr=[0,.69444,.12417,0,.30667],Br=[0,.64444,.13556,0,.51111],Kr=[.19444,.64444,.13556,0,.51111],xr=[0,.68333,.16389,0,.74333],Ur=[.19444,.43056,.08847,0,.46],di=[0,.43056,.07514,0,.71555],zi=[0,.69444,.06646,0,.51111],Li=[0,.69444,0,0,.83129],mi=[0,.69444,.1225,0,.51111],Oi=[0,.68333,.09403,0,.76666],Ri=[0,.68333,.11111,0,.76666],Yr=[0,.69444,.06961,0,.51444],gi=[0,.69444,0,0,.27778],Or=[.25,.75,0,0,.38889],jr=[0,.64444,0,0,.5],oi=[0,.69444,0,0,.77778],Ai=[0,.68333,0,0,.75],Na=[0,.68333,0,0,.77778],$a=[0,.68333,0,0,.68056],La=[0,.68333,0,0,.72222],Ji=[.25,.75,0,0,.5],Bi=[.25,.75,0,0,.27778],ti=[0,.69444,0,0,.5],Oa=[0,.69444,0,0,.55556],ri=[0,.43056,0,0,.44445],Nr=[0,.43056,0,0,.5],yi=[.19444,.43056,0,0,.55556],Qi=[0,.43056,0,0,.55556],Ei=[.08333,.58333,0,0,.77778],Ui=[0,.43056,0,0,.27778],Gr=[0,.66786,0,0,.27778],aa=[0,.69444,0,0,.75],pa=[0,.66786,0,0,.5],ra=[0,.68333,0,0,.625],ma=[.19444,.69444,0,0,.44445],Sa=[0,.69444,0,0,.72222],Za=[.19444,.69444,0,0,.5],ia=[.19444,.69444,0,0,1],Ca=[.011,.511,0,0,1.126],Ja=[.19444,.69444,0,0,.61111],Ga=[.05556,.75,0,0,.5],so=[0,.68333,0,0,.83334],Fa=[.0391,.5391,0,0,.66667],ba=[-.05555,.44445,0,0,.5],ii=[0,.43056,0,0,.77778],bi=[0,.55556,0,0,.66667],ea=[-.03625,.46375,0,0,.77778],ga=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],io=[0,.69444,0,0,.61111],ho=[-.03472,.46528,0,0,.5],Oo=[.25,.75,0,0,.44445],Ro=[-.14236,.35764,0,0,1],lo=[.244,.744,0,0,.412],Ao=[.19444,.69444,0,0,.88889],Ki=[.12963,.69444,0,0,.77778],fi=[.19444,.69444,0,0,.38889],Aa=[.011,.511,0,0,1.638],Ma=[.19444,.69444,0,0,0],uo=[0,.44444,0,0,.575],ao=[.19444,.44444,0,0,.575],hs=[0,.68611,0,0,.75555],Qo=[0,.69444,0,0,.66759],ps=[0,.68611,0,0,.80555],Vi=[0,.68611,.08229,0,.98229],vr=[0,.68611,0,0,.76666],Jr=[0,.44444,0,0,.58472],Qr=[.19444,.44444,0,0,.6118],si=[.19444,.43056,0,0,.5],Ha=[0,.68333,.02778,.08334,.76278],ja=[0,.68333,.08125,.05556,.83125],Fo=[0,.43056,0,.05556,.48472],Uo=[.19444,.43056,0,.08334,.51702],ls=[.25,.75,0,0,.42778],ua=[0,.69444,0,0,.55],Bo=[0,.69444,0,0,.73334],us=[0,.69444,0,0,.79445],cl=[0,.69444,0,0,.51945],As=[0,.69444,0,0,.70278],ms=[0,.69444,0,0,.76389],zo=[.25,.75,0,0,.34306],Ts=[0,.69444,0,0,.56111],Is=[0,.69444,0,0,.25556],Ys=[.19444,.45833,0,0,.56111],oo=[0,.45833,0,0,.56111],Ta=[0,.69444,0,0,.30556],Xa=[0,.69444,0,0,.58056],go=[0,.69444,0,0,.67223],yo=[0,.69444,0,0,.85556],Ko=[0,.69444,0,0,.55834],wo=[0,.65556,.11156,0,.5],xs=[0,.69444,.08094,0,.70834],Xl=[.17014,0,0,0,.44445],ql=[0,.69444,.0799,0,.5],vu=[0,.69444,0,0,.73752],Xu=[0,.69444,.09205,0,.5],Ks=[0,.69444,.09031,0,.77778],Ds=[0,.69444,.07816,0,.27778],yu=[0,.69444,.00316,0,.5],Yl=[.19444,.69444,0,0,.83334],Ia=[.05556,.75,0,0,.83334],oa=[0,.75,0,0,.5],Ho=[.125,.08333,0,0,.27778],es=[0,.08333,0,0,.27778],sa=[0,.65556,0,0,.5],za=[0,.69444,0,0,.47222],Ra=[0,.69444,0,0,.66667],po=[0,.69444,0,0,.59722],is=[0,.69444,0,0,.54167],Hs=[0,.69444,0,0,.70834],gs=[.25,.75,0,0,.28889],Jl=[0,.69444,0,0,.51667],Vd=[0,.44444,0,0,.44445],Zd=[.19444,.44444,0,0,.51667],qu=[0,.44444,0,0,.38333],Vc=[0,.44444,0,0,.51667],Yu=[0,.69444,0,0,.83334],jd=[.35001,.85,0,0,.45834],Ju=[.35001,.85,0,0,.57778],Qu=[.35001,.85,0,0,.41667],Zc=[.35001,.85,0,0,.58334],bu=[0,.72222,0,0,.55556],ec=[1e-5,.6,0,0,.66667],jc=[1e-5,.6,0,0,.77778],Ql=[.25001,.75,0,0,.94445],Gd=[.306,.805,.19445,0,.47222],xu=[.30612,.805,.19445,0,.47222],Vo=[.25001,.75,0,0,.83334],Pl=[.35001,.85,0,0,.47222],Gc=[.25001,.75,0,0,1.11111],Xc=[.65002,1.15,0,0,.59722],vs=[.65002,1.15,0,0,.81111],Va=[.65002,1.15,0,0,.47222],Es=[.65002,1.15,0,0,.66667],Ps=[0,.75,0,0,1],Js=[.55001,1.05,0,0,1.27778],qc=[.862,1.36,.44445,0,.55556],tc=[.86225,1.36,.44445,0,.55556],Ol=[.55001,1.05,0,0,1.11111],nc=[.65002,1.15,0,0,.52778],rc=[.65002,1.15,0,0,.61111],Rl=[.55001,1.05,0,0,1.51112],Yc=[.95003,1.45,0,0,.73611],ic=[.95003,1.45,0,0,1.04445],Qs=[.95003,1.45,0,0,.52778],wu=[.95003,1.45,0,0,.75],Su=[0,.75,0,0,1.44445],ac=[.95003,1.45,0,0,.58334],Cu=[1.25003,1.75,0,0,.79167],oc=[1.25003,1.75,0,0,1.27778],Jc=[1.25003,1.75,0,0,.58334],sc=[1.25003,1.75,0,0,.80556],Mu=[0,.825,0,0,1.8889],lc=[1.25003,1.75,0,0,.63889],uc=[.64502,1.155,0,0,.875],Eu=[1e-5,.6,0,0,.875],cc=[-99e-5,.601,0,0,.66667],dc=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Qc=[.65002,1.15,0,0,.88889],Bl=[.90001,0,0,0,.88889],fc=[-.00499,.605,0,0,1.05556],Nl=[0,.12,0,0,.45],Hr=[0,.61111,0,0,.525],ws=[.08333,.69444,0,0,.525],ed=[-.08056,.53055,0,0,.525],qd=[-.05556,.55556,0,0,.525],as=[0,.43056,0,0,.525],To=[.22222,.43056,0,0,.525],_u=[0,0,0,0,.525],Yd={"AMS-Regular":{32:Lr,65:Xr,66:Vr,67:Xr,68:Xr,69:Vr,70:hi,71:Si,72:Si,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Si,76:Vr,77:[0,.68889,0,0,.94445],78:Xr,79:Ti,80:hi,81:Ti,82:Xr,83:Ii,84:Vr,85:Xr,86:Xr,87:[0,.68889,0,0,1],88:Xr,89:Xr,90:Vr,107:Ii,160:Lr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Ii,295:va,710:Xi,732:la,770:Xi,771:la,989:Nt,1008:_a,8245:[0,.54986,0,0,.275],8463:va,8487:Xr,8498:Ii,8502:Vr,8503:[0,.68889,0,0,.44445],8504:Vr,8513:[0,.68889,0,0,.63889],8592:ya,8594:ya,8602:$i,8603:$i,8606:Mt,8608:Mt,8610:Cn,8611:Cn,8619:_n,8620:_n,8621:[-.13313,.37788,0,0,1.38889],8622:$i,8624:In,8625:In,8630:mr,8631:mr,8634:Xn,8635:Xn,8638:sr,8639:sr,8642:sr,8643:sr,8644:On,8646:On,8647:On,8648:qe,8649:On,8650:qe,8651:Mt,8652:Mt,8653:$i,8654:$i,8655:$i,8666:st,8667:st,8669:[-.13313,.37788,0,0,1],8672:_t,8674:_t,8705:[0,.825,0,0,.5],8708:Ii,8709:Nt,8717:[0,.43056,0,0,.42917],8722:ya,8724:[.08198,.69224,0,0,.77778],8726:Nt,8733:Zt,8736:He,8737:He,8738:[.03517,.52239,0,0,.72222],8739:Ci,8740:[.25142,.74111,0,0,.27778],8741:ta,8742:[.25142,.74111,0,0,.5],8756:gt,8757:gt,8764:Rt,8765:[-.13313,.37788,0,0,.77778],8769:Rt,8770:ea,8774:Vn,8776:ga,8778:Nt,8782:It,8783:It,8785:Xn,8786:Xn,8787:Xn,8790:Zt,8791:jn,8796:[.08198,.91667,0,0,.77778],8806:Ut,8807:Ut,8808:Nn,8809:Nn,8812:[.25583,.75583,0,0,.5],8814:hr,8815:hr,8816:Vn,8817:Vn,8818:jn,8819:jn,8822:Qn,8823:Qn,8828:tr,8829:tr,8830:jn,8831:jn,8832:hr,8833:hr,8840:Vn,8841:Vn,8842:Ar,8843:Ar,8847:cn,8848:cn,8858:Xn,8859:Xn,8861:Xn,8862:Kn,8863:Kn,8864:Kn,8865:Kn,8872:[0,.69224,0,0,.61111],8873:He,8874:[0,.69224,0,0,.88889],8876:hi,8877:hi,8878:Xr,8879:Xr,8882:cn,8883:cn,8884:tr,8885:tr,8888:[0,.54986,0,0,1.11111],8890:yi,8891:pi,8892:pi,8901:[0,.54986,0,0,.27778],8903:Nt,8905:Nt,8906:Nt,8907:Zt,8908:Zt,8909:[-.03598,.46402,0,0,.77778],8910:xi,8911:xi,8912:cn,8913:cn,8914:Zr,8915:Zr,8916:gt,8918:Rr,8919:Rr,8920:_i,8921:_i,8922:cr,8923:cr,8926:tr,8927:tr,8928:Vn,8929:Vn,8934:ui,8935:ui,8936:ui,8937:ui,8938:hr,8939:hr,8940:Vn,8941:Vn,8994:wn,8995:wn,9416:[.15559,.69224,0,0,.90222],9484:In,9488:In,9492:Yi,9496:Yi,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Kn,9633:Kn,9650:ki,9651:ki,9654:cn,9660:ki,9661:ki,9664:cn,9674:qi,9733:[.19444,.69224,0,0,.94445],10003:wa,10016:wa,10731:qi,10846:[.19444,.75583,0,0,.61111],10877:tr,10878:tr,10885:Ut,10886:Ut,10887:Ar,10888:Ar,10889:Pi,10890:Pi,10891:fa,10892:fa,10901:tr,10902:tr,10933:Nn,10934:Nn,10935:Pi,10936:Pi,10937:Pi,10938:Pi,10949:Ut,10950:Ut,10955:ji,10956:ji,57350:Ci,57351:ta,57352:Nt,57353:_a,57356:Nn,57357:Nn,57358:na,57359:Vn,57360:Vn,57361:na,57366:Nn,57367:Nn,57368:Nn,57369:Nn,57370:Ar,57371:Ar},"Caligraphic-Regular":{32:Lr,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:Lr},"Fraktur-Regular":{32:Lr,33:[0,.69141,0,0,.29574],34:zt,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:Ni,41:Ni,42:[0,.62119,0,0,.27764],43:ka,44:Pa,45:ka,46:Pa,47:[.24982,.74947,0,0,.50181],48:ha,49:ha,50:ha,51:ai,52:ai,53:ai,54:bt,55:ai,56:bt,57:ai,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:mt,93:mt,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:Lr,8216:zt,8217:zt,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:Lr,33:[0,.69444,0,0,.35],34:xt,35:[.19444,.69444,0,0,.95833],36:rn,37:[.05556,.75,0,0,.95833],38:wr,39:Mi,40:an,41:an,42:[0,.75,0,0,.575],43:Ie,44:[.19444,.15556,0,0,.31944],45:qu,46:[0,.15556,0,0,.31944],47:Dr,48:An,49:An,50:An,51:An,52:An,53:An,54:An,55:An,56:An,57:An,58:Fe,59:[.19444,.44444,0,0,.31944],60:Sr,61:Un,62:Sr,63:[0,.69444,0,0,.54305],64:wr,65:$r,66:[0,.68611,0,0,.81805],67:it,68:[0,.68611,0,0,.88194],69:hs,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Tr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:Ue,77:[0,.68611,0,0,1.09166],78:Tr,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:$r,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:ei,92:Dr,93:ei,94:Fi,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:ci,99:Wi,100:ci,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:ci,105:Mi,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Mi,109:[0,.44444,0,0,.95833],110:Gi,111:uo,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:Gi,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:Wi,123:Dr,124:ei,125:Dr,126:[.35,.34444,0,0,.575],160:Lr,163:[0,.69444,0,0,.86853],168:Fi,172:[0,.44444,0,0,.76666],176:Ne,177:Ie,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Ie,216:[.04861,.73472,0,0,.89444],223:po,230:[0,.44444,0,0,.83055],247:Ie,248:[.09722,.54167,0,0,.575],305:Fe,338:[0,.68611,0,0,1.16944],339:Hn,567:[.19444,.44444,0,0,.35139],710:Fi,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Fi,715:Fi,728:Fi,729:Mi,730:Ne,732:Fi,733:Fi,915:Ue,916:yn,920:ft,923:ps,926:vr,928:Tr,931:it,933:ft,934:it,936:ft,937:it,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Mi,8217:Mi,8220:xt,8221:xt,8224:Xt,8225:Xt,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:Qo,8465:Qt,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Qt,8501:Ke,8592:zn,8593:nr,8594:zn,8595:nr,8596:zn,8597:Dr,8598:Rn,8599:Rn,8600:Rn,8601:Rn,8636:zn,8637:zn,8640:zn,8641:zn,8656:zn,8657:on,8658:zn,8659:on,8660:zn,8661:[.25,.75,0,0,.70277],8704:ci,8706:[0,.69444,.06389,0,.62847],8707:ci,8709:rn,8711:yn,8712:Mn,8715:Mn,8722:Ie,8723:Ie,8725:Dr,8726:Dr,8727:kt,8728:er,8729:er,8730:[.18,.82,0,0,.95833],8733:Hn,8734:[0,.44444,0,0,1.14999],8736:He,8739:ei,8741:Dr,8743:$n,8744:$n,8745:$n,8746:$n,8747:[.19444,.69444,.12778,0,.56875],8764:Un,8768:[.19444,.69444,0,0,.31944],8771:Wn,8776:[.02444,.52444,0,0,.89444],8781:Wn,8801:Wn,8804:ir,8805:ir,8810:ze,8811:ze,8826:Sr,8827:Sr,8834:Sr,8835:Sr,8838:ir,8839:ir,8846:$n,8849:ir,8850:ir,8851:$n,8852:$n,8853:Ie,8854:Ie,8855:Ie,8856:Ie,8857:Ie,8866:Ke,8867:Ke,8868:wr,8869:wr,8900:er,8901:[-.02639,.47361,0,0,.31944],8902:kt,8968:yt,8969:yt,8970:yt,8971:yt,8994:qt,8995:qt,9651:dn,9657:kt,9661:dn,9667:kt,9711:Rn,9824:sn,9825:sn,9826:sn,9827:sn,9837:[0,.75,0,0,.44722],9838:Dn,9839:Dn,10216:an,10217:an,10815:Tr,10927:ir,10928:ir,57376:Ma},"Main-BoldItalic":{32:Lr,33:[0,.69444,.11417,0,.38611],34:lr,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:pr,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:Sn,49:Sn,50:Sn,51:Sn,52:Jt,53:Sn,54:Sn,55:Jt,56:Sn,57:Sn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:br,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:Ln,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:Ln,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:Tn,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:Pn,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:Pn,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:Lr,168:[0,.69444,.11473,0,.59111],176:Pr,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:rr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:rr,567:[.19444,.44444,.04611,0,.385],710:Tn,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:pr,730:Pr,732:br,733:br,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:Ln,931:[0,.68611,.11431,0,.82666],933:_r,934:[0,.68611,.05632,0,.82666],936:_r,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:pr,8217:pr,8220:[0,.69444,.16772,0,.62055],8221:lr},"Main-Italic":{32:Lr,33:Cr,34:Yr,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Cr,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:Br,49:Br,50:Br,51:Br,52:Kr,53:Br,54:Br,55:Kr,56:Br,57:Br,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:mi,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:xr,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:xr,79:Oi,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:xr,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:zi,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:Ur,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:Ur,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:Lr,168:[0,.66786,.10474,0,.51111],176:Li,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:di,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:di,710:zi,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:Li,732:[0,.66786,.11585,0,.51111],733:mi,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Oi,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:xr,931:[0,.68333,.12028,0,.71555],933:Ri,934:[0,.68333,.05986,0,.71555],936:Ri,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Cr,8217:Cr,8220:[0,.69444,.1685,0,.51444],8221:Yr,8463:va},"Main-Regular":{32:Lr,33:gi,34:ti,35:Yl,36:Ga,37:Ia,38:oi,39:gi,40:Or,41:Or,42:oa,43:Ei,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Ji,48:jr,49:jr,50:jr,51:jr,52:jr,53:jr,54:jr,55:jr,56:jr,57:jr,58:Ui,59:[.19444,.43056,0,0,.27778],60:Rr,61:Rt,62:Rr,63:za,64:oi,65:Ai,66:[0,.68333,0,0,.70834],67:La,68:[0,.68333,0,0,.76389],69:$a,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Ai,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:Na,76:ra,77:[0,.68333,0,0,.91667],78:Ai,79:Na,80:$a,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:La,85:Ai,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Ai,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Bi,92:Ji,93:Bi,94:ti,95:[.31,.12056,.02778,0,.5],97:Nr,98:Oa,99:ri,100:Oa,101:ri,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Oa,105:Gr,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:gi,109:[0,.43056,0,0,.83334],110:Qi,111:Nr,112:yi,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:Qi,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:ri,123:Ji,124:Bi,125:Ji,126:[.35,.31786,0,0,.5],160:Lr,163:[0,.69444,0,0,.76909],167:ma,168:pa,172:[0,.43056,0,0,.66667],176:aa,177:Ei,182:Ja,184:Xl,198:[0,.68333,0,0,.90278],215:Ei,216:[.04861,.73194,0,0,.77778],223:ti,230:[0,.43056,0,0,.72222],247:Ei,248:[.09722,.52778,0,0,.5],305:Ui,338:[0,.68333,0,0,1.01389],339:ii,567:[.19444,.43056,0,0,.30556],710:ti,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:ti,715:ti,728:ti,729:Gr,730:aa,732:pa,733:ti,915:ra,916:so,920:Na,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Ai,931:La,933:Na,934:La,936:Na,937:La,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:gi,8217:gi,8220:ti,8221:ti,8224:ma,8225:ma,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:va,8465:Sa,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Sa,8501:io,8592:$i,8593:Za,8594:$i,8595:Za,8596:$i,8597:Ji,8598:ia,8599:ia,8600:ia,8601:ia,8614:[.011,.511,0,0,1],8617:Ca,8618:Ca,8636:$i,8637:$i,8640:$i,8641:$i,8652:[.011,.671,0,0,1],8656:$i,8657:Ja,8658:$i,8659:Ja,8660:$i,8661:[.25,.75,0,0,.61111],8704:Oa,8706:[0,.69444,.05556,.08334,.5309],8707:Oa,8709:Ga,8711:so,8712:Fa,8715:Fa,8722:Ei,8723:Ei,8725:Ji,8726:Ji,8727:ho,8728:ba,8729:ba,8730:[.2,.8,0,0,.83334],8733:ii,8734:mr,8736:He,8739:Bi,8741:Ji,8743:bi,8744:bi,8745:bi,8746:bi,8747:[.19444,.69444,.11111,0,.41667],8764:Rt,8768:[.19444,.69444,0,0,.27778],8771:ea,8773:[-.022,.589,0,0,1],8776:ga,8781:ea,8784:[-.133,.67,0,0,.778],8801:ea,8804:Ar,8805:Ar,8810:Ka,8811:Ka,8826:Rr,8827:Rr,8834:Rr,8835:Rr,8838:Ar,8839:Ar,8846:bi,8849:Ar,8850:Ar,8851:bi,8852:bi,8853:Ei,8854:Ei,8855:Ei,8856:Ei,8857:Ei,8866:io,8867:io,8868:oi,8869:oi,8872:[.249,.75,0,0,.867],8900:ba,8901:[-.05555,.44445,0,0,.27778],8902:ho,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Oo,8969:Oo,8970:Oo,8971:Oo,8994:Ro,8995:Ro,9136:lo,9137:lo,9651:Ao,9657:ho,9661:Ao,9667:ho,9711:ia,9824:Ki,9825:Ki,9826:Ki,9827:Ki,9837:[0,.75,0,0,.38889],9838:fi,9839:fi,10216:Or,10217:Or,10222:lo,10223:lo,10229:[.011,.511,0,0,1.609],10230:Aa,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:Aa,10815:Ai,10927:Ar,10928:Ar,57376:Ma},"Math-BoldItalic":{32:Lr,48:uo,49:uo,50:uo,51:ao,52:ao,53:ao,54:An,55:ao,56:An,57:ao,65:$r,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:Vi,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:hs,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:Qo,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Jr,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:Lr,915:[0,.68611,.15972,0,.65694],916:yn,920:[0,.68611,.03194,0,.86722],923:ps,926:[0,.68611,.07458,0,.84125],928:Vi,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:vr,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:Jr,960:[0,.44444,.03704,0,.68241],961:Qr,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:Qr,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Lr,48:Nr,49:Nr,50:Nr,51:si,52:si,53:si,54:jr,55:si,56:jr,57:si,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:ja,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Ha,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:Fo,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:Lr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ha,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:ja,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:Fo,960:[0,.43056,.03588,0,.57003],961:Uo,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:Uo,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Lr,33:[0,.69444,0,0,.36667],34:Ko,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Ta,40:ls,41:ls,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:ua,49:ua,50:ua,51:ua,52:ua,53:ua,54:ua,55:ua,56:ua,57:ua,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:cl,64:Bo,65:Bo,66:Bo,67:As,68:us,69:[0,.69444,0,0,.64167],70:io,71:Bo,72:us,73:[0,.69444,0,0,.33056],74:cl,75:ms,76:Xa,77:[0,.69444,0,0,.97778],78:us,79:us,80:As,81:[.10556,.69444,0,0,.79445],82:As,83:io,84:Bo,85:ms,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Bo,89:[0,.69444,.0275,0,.73334],90:go,91:zo,93:zo,94:ua,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ts,99:[0,.45833,0,0,.48889],100:Ts,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ts,105:Is,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Is,109:[0,.45833,0,0,.86667],110:oo,111:[0,.45833,0,0,.55],112:Ys,113:Ys,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:oo,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:Lr,168:ua,176:Bo,180:ua,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:ua,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:ua,729:Ta,730:Bo,732:ua,733:ua,915:Xa,916:[0,.69444,0,0,.91667],920:yo,923:go,926:Bo,928:us,931:us,933:yo,934:us,936:yo,937:us,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ta,8217:Ta,8220:Ko,8221:Ko},"SansSerif-Italic":{32:Lr,33:[0,.69444,.05733,0,.31945],34:yu,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:Ds,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Ho,45:[0,.44444,.01946,0,.33333],46:es,47:[.25,.75,.13164,0,.5],48:wo,49:wo,50:wo,51:wo,52:wo,53:wo,54:wo,55:wo,56:wo,57:wo,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:Ra,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:xs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:is,77:[0,.69444,.08094,0,.875],78:xs,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:ql,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:Lr,168:[0,.67937,.06385,0,.5],176:vu,184:Xl,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:ql,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Xu,715:ti,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:vu,732:[0,.67659,.08826,0,.5],733:Xu,915:[0,.69444,.13372,0,.54167],916:Yu,920:[0,.69444,.07555,0,.77778],923:io,926:[0,.69444,.12816,0,.66667],928:xs,931:[0,.69444,.11983,0,.72222],933:Ks,934:[0,.69444,.04603,0,.72222],936:Ks,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ds,8217:Ds,8220:[0,.69444,.14205,0,.5],8221:yu},"SansSerif-Regular":{32:Lr,33:[0,.69444,0,0,.31945],34:ti,35:Yl,36:Ga,37:Ia,38:[0,.69444,0,0,.75834],39:gi,40:Or,41:Or,42:oa,43:Ei,44:Ho,45:[0,.44444,0,0,.33333],46:es,47:Ji,48:sa,49:sa,50:sa,51:sa,52:sa,53:sa,54:sa,55:sa,56:sa,57:sa,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:za,64:Ra,65:Ra,66:Ra,67:ci,68:[0,.69444,0,0,.72223],69:po,70:[0,.69444,0,0,.56945],71:Ra,72:Hs,73:gi,74:za,75:[0,.69444,0,0,.69445],76:is,77:[0,.69444,0,0,.875],78:Hs,79:[0,.69444,0,0,.73611],80:ci,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Oa,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:Ra,89:[0,.69444,.025,0,.66667],90:io,91:gs,93:gs,94:ti,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Jl,99:Vd,100:Jl,101:Vd,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Jl,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:Vc,111:[0,.44444,0,0,.5],112:Zd,113:Zd,114:[0,.44444,.01389,0,.34167],115:qu,116:[0,.57143,0,0,.36111],117:Vc,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:Lr,168:[0,.67937,0,0,.5],176:Ra,184:Xl,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:ti,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:ti,715:ti,728:ti,729:[0,.67937,0,0,.27778],730:Ra,732:[0,.67659,0,0,.5],733:ti,915:is,916:Yu,920:oi,923:io,926:Ra,928:Hs,931:Sa,933:oi,934:Sa,936:oi,937:Sa,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:gi,8217:gi,8220:ti,8221:ti},"Script-Regular":{32:Lr,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:Lr},"Size1-Regular":{32:Lr,40:jd,41:jd,47:Ju,91:Qu,92:Ju,93:Qu,123:Zc,125:Zc,160:Lr,710:bu,732:bu,770:bu,771:bu,8214:[-99e-5,.601,0,0,.77778],8593:ec,8595:ec,8657:jc,8659:jc,8719:Ql,8720:Ql,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:xu,8748:Gd,8749:Gd,8750:xu,8896:Vo,8897:Vo,8898:Vo,8899:Vo,8968:Pl,8969:Pl,8970:Pl,8971:Pl,9168:cc,10216:Pl,10217:Pl,10752:Gc,10753:Gc,10754:Gc,10756:Vo,10758:Vo},"Size2-Regular":{32:Lr,40:Xc,41:Xc,47:vs,91:Va,92:vs,93:Va,123:Es,125:Es,160:Lr,710:Ps,732:Ps,770:Ps,771:Ps,8719:Js,8720:Js,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:tc,8748:qc,8749:qc,8750:tc,8896:Ol,8897:Ol,8898:Ol,8899:Ol,8968:nc,8969:nc,8970:nc,8971:nc,10216:rc,10217:rc,10752:Rl,10753:Rl,10754:Rl,10756:Ol,10758:Ol},"Size3-Regular":{32:Lr,40:Yc,41:Yc,47:ic,91:Qs,92:ic,93:Qs,123:wu,125:wu,160:Lr,710:Su,732:Su,770:Su,771:Su,8730:[.95003,1.45,0,0,1],8968:ac,8969:ac,8970:ac,8971:ac,10216:wu,10217:wu},"Size4-Regular":{32:Lr,40:Cu,41:Cu,47:oc,91:Jc,92:oc,93:Jc,123:sc,125:sc,160:Lr,710:Mu,732:Mu,770:Mu,771:Mu,8730:[1.25003,1.75,0,0,1],8968:lc,8969:lc,8970:lc,8971:lc,9115:uc,9116:Eu,9117:uc,9118:uc,9119:Eu,9120:uc,9121:dc,9122:cc,9123:dc,9124:dc,9125:cc,9126:dc,9127:Xd,9128:Qc,9129:Bl,9130:[0,.3,0,0,.88889],9131:Xd,9132:Qc,9133:Bl,9143:[.88502,.915,0,0,1.05556],10216:sc,10217:sc,57344:fc,57345:fc,57680:Nl,57681:Nl,57682:Nl,57683:Nl},"Typewriter-Regular":{32:_u,33:Hr,34:Hr,35:Hr,36:ws,37:ws,38:Hr,39:Hr,40:ws,41:ws,42:[0,.52083,0,0,.525],43:ed,44:[.13889,.125,0,0,.525],45:ed,46:[0,.125,0,0,.525],47:ws,48:Hr,49:Hr,50:Hr,51:Hr,52:Hr,53:Hr,54:Hr,55:Hr,56:Hr,57:Hr,58:as,59:[.13889,.43056,0,0,.525],60:qd,61:[-.19549,.41562,0,0,.525],62:qd,63:Hr,64:Hr,65:Hr,66:Hr,67:Hr,68:Hr,69:Hr,70:Hr,71:Hr,72:Hr,73:Hr,74:Hr,75:Hr,76:Hr,77:Hr,78:Hr,79:Hr,80:Hr,81:[.13889,.61111,0,0,.525],82:Hr,83:Hr,84:Hr,85:Hr,86:Hr,87:Hr,88:Hr,89:Hr,90:Hr,91:ws,92:ws,93:ws,94:Hr,95:[.09514,0,0,0,.525],96:Hr,97:as,98:Hr,99:as,100:Hr,101:as,102:Hr,103:To,104:Hr,105:Hr,106:[.22222,.61111,0,0,.525],107:Hr,108:Hr,109:as,110:as,111:as,112:To,113:To,114:as,115:as,116:[0,.55358,0,0,.525],117:as,118:as,119:as,120:as,121:To,122:as,123:ws,124:ws,125:ws,126:Hr,127:Hr,160:_u,176:Hr,184:[.19445,0,0,0,.525],305:as,567:To,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:Hr,715:Hr,728:Hr,730:Hr,770:Hr,771:Hr,776:Hr,915:Hr,916:Hr,920:Hr,923:Hr,926:Hr,928:Hr,931:Hr,933:Hr,934:Hr,936:Hr,937:Hr,8216:Hr,8217:Hr,8242:Hr,9251:[.11111,.21944,0,0,.525]}},Jd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,$l=10,os=.25,hc=1.2,el=.431,td={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[el,el,el],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[os,os,os],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},pc=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dl=5,nd={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function tl(a,y){a===void 0&&(a=77);const b=Yd[y][a];if(b)return{defaultMetrics:!1,depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]};if(a===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const E=String.fromCodePoint(a);if(E in nd)a=nd[E].codePointAt(0);else if(Jd.test(E))return a=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var mc={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Fl={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Qd={doubleleftarrow:`M262 157
|
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
|
|
|
c -179 0 -524 -115 -524 -115
|
|
|
c -5 -1 -9 -5 -9 -10
|
|
|
c 0 -1 1 -2 1 -3
|
|
|
l 4 -22
|
|
|
c 1 -5 5 -9 11 -9
|
|
|
h 2
|
|
|
s 338 93 512 92
|
|
|
c 174 0 513 -92 513 -92
|
|
|
h 2
|
|
|
c 5 0 9 4 11 9
|
|
|
l 5 22
|
|
|
c 1 6 -2 12 -8 13
|
|
|
c 0 0 -342 115 -520 115
|
|
|
z
|
|
|
`,leftgroup:`M400000 80
|
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function eu(a){if(Fl[a]){const[ye,we,Be]=Fl[a],Xe=`<span class="stretchy" style="height:${Be}em"><svg width="100%" height="${Be}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*Be/2)/100}em;min-width:0">${Xe}</span>`}const[y,b,E,ee]=mc[a];let re,ae;const de=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 pe=y.map((ye,we)=>`<span class="${re[we]}" style=height:${de}em><svg width=400em height=${de}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:${de}em;min-width:${b}em;">${pe}</span>`}function ef(a){return mc[a]?mc[a][2]/1e3:Fl[a][2]}function tf(a){const y=[];for(let b=0;b<a.length;b++){let E=a.charCodeAt(b);if(E===13&&a.charCodeAt(b+1)===10&&(E=10,b++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(b+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Dl(2,16)+re*Dl(2,10)+ae,b++}}y.push(E)}return y}var ku=8205,Lu=[[ku,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,tu=[127462,127487];function nu(a){var y;if(fl===void 0){fl={};for(const b of Lu)for(let E=b[0];E<=b[0]+b[1]-1;E++)fl[E]=!0}return(y=fl[a])!=null?y:!1}function nf(a){return a>=tu[0]&&a<=tu[1]}function rf(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=tf(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===ku){const ae=E-1;for(E+=2;b[E]===ku;)E+=2;y.push(String.fromCodePoint(...b.slice(ae,E-ae+1)))}else if(nu(re)){const ae=E-1;for(;nu(b[E]);)E+=b[E]===ku?2:1;y.push(String.fromCodePoint(...b.slice(ae,2*E-ae-1)))}else nf(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var af=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rf(a)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(a){const y=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return y!=null&&y[0]?(this.pos+=y[0].length,y[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const a=this.get();if(a==="\\"){if(!this.end()){let y=this.match(/^[a-zA-Z\*]+/);return y?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):y=this.get(),"\\"+y}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const y=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(y)return String.fromCodePoint(Number.parseInt(y.slice(y.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let y=!1;if(/[\d?@]/.test(this.peek())&&(y=!0,this.pos+1<this.s.length)){const b=this.s[this.pos+1];y=/[^\dA-Za-z]/.test(b)}return y?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function hl(a,y){var b,E,ee,re;const ae=[];let de=a.next();if(de&&de!=="\\relax"){if(de==="\\noexpand")de=a.next(),de&&ae.push(de);else if(de==="\\obeyspaces")a.obeyspaces=!0;else if(de==="\\bgroup")ae.push("<{>");else if(de==="\\egroup")ae.push("<}>");else if(de==="\\string"){if(de=a.next(),de)if(de.startsWith("\\"))for(const pe of de)ae.push(pe==="\\"?"\\backslash":pe);else de==="<{>"?ae.push("\\{"):de==="<space>"?ae.push("~"):de==="<}>"&&ae.push("\\}")}else if(de==="\\csname"){for(;a.peek()==="<space>";)a.next();let pe="",ye=!1,we=[];do{if(we.length===0)if(/^#[\d?@]$/.test(a.peek())){const Be=a.get().slice(1);we=nl((E=(b=y==null?void 0:y(Be))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),de=we[0]}else de=a.next(),we=de?[de]:[];ye=we.length===0,!ye&&de==="\\endcsname"&&(ye=!0,we.shift()),ye||(ye=de==="<$>"||de==="<$$>"||de==="<{>"||de==="<}>"||typeof de=="string"&&de.length>1&&de.startsWith("\\")),ye||(pe+=we.shift())}while(!ye);pe&&ae.push("\\"+pe),ae.push(...we)}else if(de!=="\\endcsname")if(de.length>1&&de.startsWith("#")){const pe=de.slice(1);ae.push(...nl((re=(ee=y==null?void 0:y(pe))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else ae.push(de)}return ae}function nl(a,y=null){const b=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const de=ae.match(/((?:\\%)|[^%])*/);de!==null&&b.push(de[0])}const ee=new af(tt(b.join(""))),re=[];do re.push(...hl(ee,y));while(!ee.end());return re}function ca(a){let y="";const b=[];for(const E of a)E&&(y&&/^[a-zA-Z\*]/.test(E)&&b.push(y),b.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&b.push(" "),y=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return b.join("")}function co(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ca([a,...y.map(b=>`{${b}}`)])}function pl(a){return ca(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var of=class Ud{constructor(y){Ud._registry[y]=this}static createAtom(y,b,E){return Ud._registry[y].createAtom(b,gr(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ee=[];for(const re of sf(y)){const ae=Ud._registry[re[0].mode];ee.push(...ae.serialize(re,b))}return ca(ee)}return ca(th(y,b))}static getFont(y,b,E){return Ud._registry[y].getFont(b,E)}};of._registry={};var Ss=of;function sf(a){const y=[];let b=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(b.length>0&&y.push(b),b=[ee],E=ee.mode):b.push(ee));return b.length>0&&y.push(b),y}function Eo(a,y){const b=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;y==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[y],ae===ee?E.push(re):(E.length>0&&b.push(E),E=[re],ee=ae)}return E.length>0&&b.push(E),b}function rd(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of sf(a)){const de=y.defaultMode;for(const pe of Eo(ae,"color")){const ye=pe[0].computedStyle,we=Ss._registry[pe[0].mode].serialize(pe,me(Se({},y),{defaultMode:de==="text"?"text":"math"}));!y.skipStyles&&ye.color&&ye.color!=="none"&&(!E||ee!==ye.color)?re.push(co("\\textcolor",(b=ye.verbatimColor)!=null?b:ye.color,ca(we))):re.push(ca(we))}}return re}function eh(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Eo(a,"backgroundColor").map(ee=>{var re;if(ee.length>0||ee[0].type!=="box"){const ae=ee[0].computedStyle;if(ae.backgroundColor&&ae.backgroundColor!=="none"&&(!b||E!==ae.backgroundColor))return co("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,ca(rd(ee,me(Se({},y),{defaultMode:"text"}))))}return ca(rd(ee,y))})}function th(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,ee=[];for(const re of Eo(a,"fontSize")){const ae=re[0].computedStyle.fontSize,de=eh(re,y);de&&(ae&&ae!=="auto"&&(!b||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...de):ee.push(...de))}return ee}function id(a){return a?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[a]:void 0}function ru(a){if(a.length===0)return"ord";const y=id(a[0].type),b=id(a[a.length-1].type);return y&&y===b?y:"ord"}function iu(a,y){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const b=Math.ceil(100*a)/100;return b===0?"0":b.toString()+(y!=null?y:"")}return""}var dr=class Mp{constructor(y,b){var E,ee,re,ae,de;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:Oe(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 pe=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(pe=(de=Ss.getFont((ae=b.mode)!=null?ae:"math",this,me(Se({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?de:void 0),pe||(pe="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(b==null?void 0:b.maxFontSize)!==void 0&&(this.maxFontSize=b.maxFontSize),Au(this,pe)}set atomID(y){y===void 0||y.length===0||(this.id=y)}selected(y){if(this.isSelected!==y&&(this.isSelected=y,this.children))for(const b of this.children)b.selected(y)}setStyle(y,b,E){if(b===void 0)return;const ee=iu(b,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=ee)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=iu(y,"em"),this.height-=y,this.depth+=y)}get left(){var y;return(y=this.cssProperties)!=null&&y["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=iu(y,"em")))}set right(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=iu(y,"em")))}set bottom(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=iu(y,"em")))}get width(){return this._width*this.scale}set width(y){this._width=y,this.hasExplicitWidth=!0}set softWidth(y){}get height(){return this._height*this.scale}set height(y){this._height=y}get depth(){return this._depth*this.scale}set depth(y){this._depth=y}wrap(y){const b=y.parent;if(!b)return this;y.isPhantom&&this.setStyle("opacity",0);const E=y.color;E&&E!==b.color&&this.setStyle("color",E);let ee=y.backgroundColor;this.isSelected&&(ee=un(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 dt of this.children)re+=dt.toMarkup();let ae="";if(this.svgBody)ae=eu(this.svgBody);else if(this.svgOverlay){ae='<span style="',ae+="display: inline-block;",ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,ae+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,ae+='">',ae+=re,ae+="</span>",ae+='<svg style="position:absolute;overflow:visible;',ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const dt=(b=this.cssProperties)==null?void 0:b.padding;dt?(ae+=`top:${dt};`,ae+=`left:${dt};`,ae+=`width:calc(100% - 2 * ${dt} );`):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 de="";const pe=this.classes.split(" ");pe.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&pe.push("ML__latex-caret"),this.isSelected&&pe.push("ML__selected");const ye=pe.length===1?pe[0]:pe.filter((dt,wt,pn)=>dt.length>0&&pn.indexOf(dt)===wt).join(" ");if(ye.length>0&&(de+=` class="${ye}"`),this.id&&(de+=` data-atom-id=${this.id}`),this.cssId&&(de+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(de+=" "+Object.keys(this.attributes).map(dt=>`${dt}="${this.attributes[dt]}"`).join(" ")),this.htmlData){const dt=this.htmlData.split(",");for(const wt of dt){const pn=wt.match(/([^=]+)=(.+$)/);if(pn){const ur=pn[1].trim().replace(/ /g,"-");ur&&(de+=` data-${ur}="${pn[2]}" `)}else{const ur=wt.trim().replace(/ /g,"-");ur&&(de+=` data-${ur} `)}}}const we=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&we.width===void 0&&(we.width=`${Math.ceil(this._width*100)/100}em`);const Be=Object.keys(we).map(dt=>`${dt}:${we[dt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&Be.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const dt=this.htmlStyle.split(";");let wt="";for(const pn of dt){const ur=pn.match(/([^=]+):(.+$)/);if(ur){const ln=ur[1].trim().replace(/ /g,"-");ln&&(wt+=`${ln}:${ur[2]};`)}}wt&&(de+=` style="${wt}"`)}Be.length>0&&(de+=` style="${Be.join(";")}"`);let Xe="";return de.length>0||ae.length>0?Xe=`<span${de}>${re}${ae}</span>`:Xe=re,this.caret==="text"?Xe+='<span class="ML__text-caret"></span>':this.caret==="math"&&(Xe+='<span class="ML__caret"></span>'),Xe}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 pe of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&pe in y.cssProperties||this.cssProperties&&pe 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 pe of Object.keys(this.cssProperties))if(this.cssProperties[pe]!==y.cssProperties[pe])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),de=y.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==de.length)return!1;ae.sort(),de.sort();for(const[pe,ye]of ae.entries())if(ye==="vertical-separator"||ye!==de[pe])return!1;return this.value+=y.value,this.height=Math.max(this.height,y.height),this.depth=Math.max(this.depth,y.depth),this._width=this._width+y._width,this.maxFontSize=Math.max(this.maxFontSize,y.maxFontSize),this.italic=y.italic,!0}};function ad(a){if(!a||a.length===0)return[];a[0].children=ad(a[0].children);const y=[a[0]];for(let b=1;b<a.length;b++)y[y.length-1].tryCoalesceWith(a[b])||(a[b].children=ad(a[b].children),y.push(a[b]));return y}function gc(a){return a.children&&(a.children=ad(a.children)),a}function vc(a,y){if(!a)return new dr(null,y);const b=new dr(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 dr(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 dr(E,me(Se({},y),{type:"lift"}))}function Os(a){const y=ef(a)/2,b=new dr(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function Au(a,y){var b;if(a.type==="latex"){a.height=.9,a.depth=.2,a._width=1;return}if(a.value){a.height=-1/0,a.depth=-1/0,a._width=0,a.skew=-1/0,a.italic=-1/0;for(let E=0;E<a.value.length;E++){const ee=tl(a.value.codePointAt(E),y);a.height=Math.max(a.height,ee.height),a.depth=Math.max(a.depth,ee.depth),a._width+=ee.width,a.skew=ee.skew,a.italic=ee.italic}return}if(a.children&&a.children.length>0){let E=-1/0,ee=-1/0,re=0;for(const ae of a.children)ae.height>E&&(E=ae.height),ae.depth>ee&&(ee=ae.depth),re=Math.max(re,(b=ae.maxFontSize)!=null?b:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,de)=>ae+de.width,0),a.maxFontSize=re}}function yc(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],ee=-b.shift-b.box.depth;let re=ee;for(let ae=1;ae<y.length;ae++){const de=y[ae],pe=-de.shift-re-de.box.depth,ye=pe-(b.box.height+b.box.depth);re=re+pe,E.push(ye),E.push(de),b=de}return[E,ee]}if("top"in a){let y=a.top;for(const b of a.children)y-=typeof b=="number"?b:b.box.height+b.box.depth;return[a.children,y]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const y=a.firstBaseline[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-y.box.depth]}else if("shift"in a){const y=a.children[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.children,-y.box.depth-a.shift]}}return[null,0]}function Tu(a){var y;const[b,E]=yc(a);if(!b)return[[],0,0];const ee=new dr(null,{classes:"pstrut"});let re=0;for(const wt of b)if(typeof wt!="number"){const pn=wt.box;re=Math.max(re,pn.maxFontSize,pn.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let de=E,pe=E,ye=E,we=0;for(const wt of b){if(typeof wt=="number")ye+=wt;else{const pn=wt.box,ur=(y=wt.classes)!=null?y:[],ln=new dr([ee,pn],{classes:ur.join(" "),style:wt.style});pn.setStyle("height",pn.height+pn.depth,"em"),pn.setStyle("display","inline-block"),ln.setStyle("top",-re-ye-pn.depth,"em"),wt.marginLeft&&ln.setStyle("margin-left",wt.marginLeft,"em"),wt.marginRight&&ln.setStyle("margin-right",wt.marginRight,"em"),ae.push(ln),ye+=pn.height+pn.depth,we=Math.max(we,ln.width)}de=Math.min(de,ye),pe=Math.max(pe,ye)}ae.forEach(wt=>{wt.softWidth=we});const Be=new dr(ae,{classes:"vlist"});if(Be.softWidth=we,Be.height=pe,Be.setStyle("height",pe,"em"),de>=0)return[[new dr(Be,{classes:"vlist-r"})],pe,-de];const Xe=new dr(new dr(null),{classes:"vlist"});Xe.height=-de,Xe.setStyle("height",-de,"em");const dt=new dr(8203,{classes:"vlist-s",maxFontSize:0});return dt.softWidth=0,dt.height=0,dt.depth=0,[[new dr([Be,dt],{classes:"vlist-r"}),new dr(Xe,{classes:"vlist-r"})],pe,-de]}var Qa=class extends dr{constructor(a,y){var b;const[E,ee,re]=Tu(a);super(E.length===1?E[0]:E,{type:y==null?void 0:y.type,classes:((b=y==null?void 0:y.classes)!=null?b:"")+" vlist-t"+(E.length===2?" vlist-t2":"")}),this.height=ee,this.depth=re,this.softWidth=E.reduce((ae,de)=>Math.max(ae,de.width),0)}};function nh(a,y){var b,E,ee,re,ae;const de=a.metrics,pe=new dr(y.base),ye=(b=y.baseShift)!=null?b:0,we=(E=y.slant)!=null?E:0;let Be=0,Xe=0;y.above&&(Be=(ee=y.aboveShift)!=null?ee:Math.max(de.bigOpSpacing1,de.bigOpSpacing3-y.above.depth)),y.below&&(Xe=(re=y.belowShift)!=null?re:Math.max(de.bigOpSpacing2,de.bigOpSpacing4-y.below.height));let dt=null;if(y.below&&y.above){const wt=de.bigOpSpacing5+y.below.height+y.below.depth+Xe+pe.depth+ye;dt=new Qa({bottom:wt,children:[de.bigOpSpacing5,{box:y.below,marginLeft:-we,classes:["ML__center"]},Xe,{box:pe,classes:["ML__center"]},Be,{box:y.above,marginLeft:we,classes:["ML__center"]},de.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)dt=new Qa({top:pe.height-ye,children:[de.bigOpSpacing5,{box:y.below,marginLeft:-we,classes:["ML__center"]},Xe,{box:pe,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const wt=pe.depth+ye;dt=new Qa({bottom:wt,children:[{box:pe,classes:["ML__center"]},Be,{box:y.above,marginLeft:we,classes:["ML__center"]},de.bigOpSpacing5]}).wrap(a)}else{const wt=pe.depth+ye;dt=new Qa({bottom:wt,children:[{box:pe},de.bigOpSpacing5]}).wrap(a)}return new dr(dt,{type:(ae=y.type)!=null?ae:"op"})}var od=7,rl=6,Iu=5,ml=4,zl=3,ss=2,_s=1,Zo=0,Ws=class{constructor(a,y,b){this.id=a,this.sizeDelta=y,this.cramped=b;const E={"-4":2,"-3":1,0:0}[y];this.metrics=Object.keys(td).reduce((ee,re)=>me(Se({},ee),{[re]:td[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Us[[Zo,_s,Zo,_s,ss,zl,ss,zl][this.id]]}get sub(){return Us[[Zo,Zo,Zo,Zo,ss,ss,ss,ss][this.id]]}get fracNum(){return Us[[Zo,_s,Zo,_s,ss,zl,ml,Iu][this.id]]}get fracDen(){return Us[[Zo,Zo,Zo,Zo,ss,ss,ml,ml][this.id]]}get cramp(){return Us[[Zo,Zo,ss,ss,ml,ml,rl,rl][this.id]]}get isTight(){return this.sizeDelta<0}},Kl={7:new Ws(od,0,!1),6:new Ws(rl,0,!0),5:new Ws(Iu,0,!1),4:new Ws(ml,0,!0),3:new Ws(zl,-3,!1),2:new Ws(ss,-3,!0),1:new Ws(_s,-4,!1),0:new Ws(Zo,-4,!0)},Us=me(Se({},Kl),{displaystyle:Kl[od],textstyle:Kl[Iu],scriptstyle:Kl[zl],scriptscriptstyle:Kl[_s]});function au(a,y){var b;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:$l,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(b=a.unit)!=null?b:"pt"];if(Number.isFinite(y)){const ee=Dl(10,y);return Math.round(a.dimension/$l*E*ee)/ee}return a.dimension*E}function sd(a,y){if(a===null)return 0;const b=au(a)/$l;if(Number.isFinite(y)){const E=Dl(10,y);return Math.round(b*E)/E}return b}function ld(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function lf(a){let y=ld(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${ld(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${ld(a.shrink)}`),y}function Io(a){var y,b;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(y=a.unit)!=null?y:"pt"}`),"glue"in a&&(E=lf(a)),"number"in a)if(!("base"in a)||a.base==="decimal")E=Number(a.number).toString();else if(a.base==="alpha")E=`\`${String.fromCodePoint(a.number)}`;else{const ee=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(ee).toString(16).toUpperCase(),ee<=255?E=E.padStart(2,"0"):ee<=65535?E=E.padStart(4,"0"):ee<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(ee).toString(8),ee<=63?E=E.padStart(2,"0"):ee<=30583?E=E.padStart(4,"0"):E=E.padStart(8,"0"),E=`'${E}`)}return"register"in a&&("factor"in a&&(a.factor===-1?E="-":a.factor!==1&&(E=Number(a.factor).toString())),"global"in a&&a.global&&(E+="\\global"),E+=`\\${a.register}`),"string"in a&&(E=a.string),(b=a.relax)!=null&&b&&(E+="\\relax"),E}function Vs(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:Vs(a.glue,y),shrink:Vs(a.shrink,y),grow:Vs(a.grow,y)}:a.shrink?{glue:Vs(a.glue,y),shrink:Vs(a.shrink,y)}:a.grow?{glue:Vs(a.glue,y),grow:Vs(a.grow,y)}:{glue:Vs(a.glue,y)}:null}var rh={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function ou(){return Se({},rh)}function bc(){return{registers:ou(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Ye.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:At,backgroundColorMap:Qe,getMacro:a=>Di(a,qn())}}var Ea=class Ep{constructor(y,b){var E,ee,re,ae,de,pe,ye,we,Be,Xe,dt,wt,pn,ur,ln;let Zn;y!=null&&y.parent?(this.parent=y.parent,Zn=y.parent,this.registers={}):(Zn=Se(Se({},bc()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=Zn.registers),Zn.atomIdsSettings&&(this.atomIdsSettings=Se({},Zn.atomIdsSettings)),this.renderPlaceholder=Zn.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=Zn.letterShapeStyle,this.minFontScale=Zn.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(pe=(de=this.parent)==null?void 0:de.color)!=null?pe:"",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!==((Be=this.parent)==null?void 0:Be.size)?this.size=b.fontSize:this.size=(dt=(Xe=this.parent)==null?void 0:Xe.size)!=null?dt:dl;let fr=(pn=(wt=this.parent)==null?void 0:wt.mathstyle)!=null?pn:Us.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(Zn instanceof Ep)switch(y.mathstyle){case"cramp":fr=fr.cramp;break;case"superscript":fr=fr.sup;break;case"subscript":fr=fr.sub;break;case"numerator":fr=fr.fracNum;break;case"denominator":fr=fr.fracDen;break}switch(y.mathstyle){case"textstyle":fr=Us.textstyle;break;case"displaystyle":fr=Us.displaystyle;break;case"scriptstyle":fr=Us.scriptstyle;break;case"scriptscriptstyle":fr=Us.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=fr,this.smartFence=Zn.smartFence,this.placeholderSymbol=Zn.placeholderSymbol,this.colorMap=(ur=Zn.colorMap)!=null?ur:Yn=>Yn,this.backgroundColorMap=(ln=Zn.backgroundColorMap)!=null?ln:Yn=>Yn,this.getMacro=Zn.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const y=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,y}scale(y){return y*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===od||this.mathstyle.id===rl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(pc[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(y){var b;if((b=this.registers)!=null&&b[y])return this.registers[y];if(this.parent)return this.parent.getRegister(y)}getRegisterAsNumber(y){const b=this.getRegister(y);if(typeof b=="number")return b;if(typeof b=="string")return Number(b)}getRegisterAsGlue(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E:typeof E=="object"&&"dimension"in E?{glue:{dimension:E.dimension}}:typeof E=="number"?{glue:{dimension:E}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(y)}getRegisterAsEm(y,b){return sd(this.getRegisterAsDimension(y),b)}getRegisterAsDimension(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E.glue:typeof E=="object"&&"dimension"in E?E:typeof E=="number"?{dimension:E}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(y)}setRegister(y,b){if(b===void 0){delete this.registers[y];return}this.registers[y]=b}evaluate(y){if(!y||!("register"in y))return y;let b=this;if("global"in y&&y.global)for(;b.parent;)b=b.parent;let E=1;"factor"in y&&y.factor!==1&&y.factor!==void 0&&(E=y.factor);const ee=b.getRegister(y.register);if(ee===void 0)return;if(typeof ee=="string")return{string:Number(ee).toString()+ee};if(typeof ee=="number")return{number:E*ee};const re=b.evaluate(ee);if(re!==void 0)return"string"in re?{string:Number(ee).toString()+re.string}:"number"in re?{number:E*re.number}:"dimension"in re?me(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:au(E,b)/$l}toNumber(y){if(y===null)return null;const b=this.evaluate(y);return b===void 0?null:"number"in b?b.number:"dimension"in b?b.dimension:"glue"in b?b.glue.dimension:"string"in b?Number(b.string):null}toColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.colorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}},su=["body","above","below","superscript","subscript"];function il(a){return typeof a=="string"&&su.includes(a)}function Du(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Bn=class jl{constructor(y){var b,E,ee,re,ae,de;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=(de=y.skipBoundary)!=null?de:!1,y.verbatimLatex!==void 0&&y.verbatimLatex!==null&&(this.verbatimLatex=y.verbatimLatex),y.args&&(this.args=y.args),y.body&&(this.body=y.body),this._changeCounter=0}static createBox(y,b,E){var ee;if(!b)return null;const re=uf(b),ae=[];for(const pe of re){const ye=pe[0].style,we=cf(y,pe,{style:{color:ye.color,backgroundColor:ye.backgroundColor,fontSize:ye.fontSize}});we&&ae.push(we)}if(ae.length===0)return null;const de=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!de&&!(E!=null&&E.type)?ae[0].wrap(y):new dr(ae,{classes:de,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return Ss.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 jl({type:"mord",value:y,mode:"math"}):new jl(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=cd(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=gr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ca([co(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ca([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return Ss.serialize(this.body,me(Se({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return Ss.serialize(this.above,y)}belowToLatex(y){return Ss.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=me(Se({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Ss.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=Ss.serialize(this.superscript,y);E.length===0?b+="^{}":E.length===1?E==="\u2032"?b+="^\\prime ":E==="\u2033"?b+="^\\doubleprime ":/^[0-9]$/.test(E)?b+=`^${E}`:b+=`^{${E}}`:b+=`^{${E}}`}return b}get treeDepth(){let y=1,b=this.parent;for(;b;)b=b.parent,y+=1;return y}get inCaptureSelection(){let y=this;for(;y;){if(y.captureSelection)return!0;y=y.parent}return!1}get parentPrompt(){let y=this.parent;for(;y;){if(y.type==="prompt"&&!y.captureSelection)return y;y=y.parent}return null}branch(y){if(il(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of su)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(il(y)),il(y)?(this._branches?this._branches[y]||(this._branches[y]=[this.makeFirstAtom(y)]):this._branches={[y]:[this.makeFirstAtom(y)]},this.isDirty=!0,this._branches[y]):[]}get row(){return Du(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Du(this.parentBranch)?this.parentBranch[1]:-1}get body(){var y;return(y=this._branches)==null?void 0:y.body}set body(y){this.setChildren(y,"body")}get superscript(){var y;return(y=this._branches)==null?void 0:y.superscript}set superscript(y){this.setChildren(y,"superscript")}get subscript(){var y;return(y=this._branches)==null?void 0:y.subscript}set subscript(y){this.setChildren(y,"subscript")}get above(){var y;return(y=this._branches)==null?void 0:y.above}set above(y){this.setChildren(y,"above")}get below(){var y;return(y=this._branches)==null?void 0:y.below}set below(y){this.setChildren(y,"below")}get computedStyle(){var y,b;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=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(il(b)),!il(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=ee:this._branches={[b]:ee};for(const re of y)re.parent=this,re.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new jl({type:"first",mode:this.mode});return b.parent=this,b.parentBranch=y,b}addChild(y,b){console.assert(y.type!=="first"),this.createBranch(b).push(y),this.isDirty=!0,y.parent=this,y.parentBranch=b}addChildBefore(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b),0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildAfter(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildren(y,b){const E=this.createBranch(b);for(const ee of y)ee.parent=this,ee.parentBranch=b,E.push(ee);this.isDirty=!0}addChildrenAfter(y,b){console.assert(y.length===0||y[0].type!=="first"),console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,...y),this.isDirty=!0;for(const ee of y)ee.parent=this,ee.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(il(y)&&(this._branches[y]=void 0),!b)return[];for(const E of b)E.parent=void 0,E.parentBranch=void 0;return console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}removeChild(y){if(console.assert(y.parent===this),y.type==="first")return;const b=this.branch(y.parentBranch),E=b.indexOf(y);console.assert(E>=0),b.splice(E,1),this.isDirty=!0,y.parent=void 0,y.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:y}=this;return y[y.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:y}=this;return y[y.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const y=[];for(const b of su)if(this._branches[b])for(const E of this._branches[b])y.push(...E.children),y.push(E);return this._children=y,y}render(y){if(this.type==="first"&&!y.atomIdsSettings)return null;const b=gr(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new Ea({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 de=null,pe=null;const ye=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let we=0;if(re){const pn=new Ea({parent:y,mathstyle:"superscript"});de=jl.createBox(pn,re),ye||(we=ee.height-y.metrics.supDrop*pn.scalingFactor)}let Be=0;if(ae){const pn=new Ea({parent:y,mathstyle:"subscript"});pe=jl.createBox(pn,ae),ye||(Be=ee.depth+y.metrics.subDrop*pn.scalingFactor)}let Xe;y.isDisplayStyle?Xe=y.metrics.sup1:y.isCramped?Xe=y.metrics.sup3:Xe=y.metrics.sup2;const dt=.5/$l/y.scalingFactor;let wt=null;if(pe&&de){we=Math.max(we,Xe,de.depth+.25*y.metrics.xHeight),Be=Math.max(Be,y.metrics.sub2);const pn=y.metrics.defaultRuleThickness;if(we-de.depth-(pe.height-Be)<4*pn){Be=4*pn-(we-de.depth)+pe.height;const ln=.8*y.metrics.xHeight-(we-de.depth);ln>0&&(we+=ln,Be-=ln)}const ur=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;wt=new Qa({individualShift:[{box:pe,shift:Be,marginLeft:ur},{box:de,shift:-we}]}).wrap(y)}else pe&&!de?(Be=Math.max(Be,y.metrics.sub1,pe.height-.8*el),wt=new Qa({shift:Be,children:[{box:pe,marginRight:dt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!pe&&de&&(we=Math.max(we,Xe,de.depth+.25*el),wt=new Qa({shift:-we,children:[{box:de,marginRight:dt}]}));return new dr([ee,new dr(wt,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?jl.createBox(new Ea({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?jl.createBox(new Ea({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):nh(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 de=(E=this.value)!=null?E:this.body,pe=(ee=b==null?void 0:b.boxType)!=null?ee:id(this.type);let ye=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(ye+=" ML__text");const we=typeof de=="string"||de===void 0?new dr(de!=null?de:null,{type:pe,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=jl.createBox(y,de,{type:pe,classes:ye}))!=null?ae:new dr(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 uf(a){let y;const b=[];let E=[];for(const ee of a)if(!y&&!ee.style)E.push(ee);else{const re=ee.computedStyle;y&&re.color===y.color&&re.backgroundColor===y.backgroundColor&&re.fontSize===y.fontSize?E.push(ee):(E.length>0&&b.push(E),E=[ee],y=re)}return E.length>0&&b.push(E),b}function cf(a,y,b){var E,ee,re,ae,de;if(!y||y.length===0)return null;const pe=new Ea({parent:a},b.style),ye=!((E=pe.atomIdsSettings)!=null&&E.groupNumbers);let we=[];if(y.length===1){const Xe=y[0],dt=Xe.render(pe);dt&&(ye&&Xe.isSelected&&dt.selected(!0),we=[dt])}else{let Xe="",dt=!0;for(const wt of y){(ee=pe.atomIdsSettings)!=null&&ee.groupNumbers&&Xe&&(dt&&wt.isDigit()||!dt&&ud(wt))&&(pe.atomIdsSettings.overrideID=Xe);const pn=wt.render(pe);pe.atomIdsSettings&&(pe.atomIdsSettings.overrideID=void 0),pn&&((re=pe.atomIdsSettings)!=null&&re.groupNumbers&&((wt.isDigit()||ud(wt))&&(!Xe||dt!==wt.isDigit())&&(dt=wt.isDigit(),Xe=(ae=wt.id)!=null?ae:""),Xe&&(!(wt.isDigit()||ud(wt))||!wt.hasEmptyBranch("superscript")||!wt.hasEmptyBranch("subscript"))&&(Xe="")),ye&&wt.isSelected&&pn.selected(!0),we.push(pn))}}if(we.length===0)return null;const Be=new dr(we,me(Se({isTight:pe.isTight},b),{type:(de=b.type)!=null?de:"lift"}));return Be.isSelected=we.every(Xe=>Xe.isSelected),Be.wrap(pe)}function ud(a){return a.mode==="text"}function cd(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof Bn?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var al=class _p extends Bn{constructor(y,b,E){super({type:"text",command:y,mode:"text",displayContainsHighlight:!0}),this.value=b,this.verbatimLatex=b,this.applyStyle(E)}static fromJson(y){return new _p(y.command,y.value,y.style)}render(y){const b=this.createBox(y);return this.caret&&(b.caret=this.caret),b}_serialize(y){var b;return(b=this.verbatimLatex)!=null?b:ni("text",this.value.codePointAt(0))}};function Pu(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&ih(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function ih(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function jo(a){let y=1/0,b=-1/0;for(const E of a.ranges)y=Math.min(y,E[0],E[1]),b=Math.max(b,E[0],E[1]);return[y,b]}function gl(a){return typeof a=="number"&&!Number.isNaN(a)}function xc(a){return Array.isArray(a)&&a.length===2}function wc(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ah(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ee=b.parent;for(;!E&ⅇ)ee&&(E=ee.mode),ee=ee.parent}return E}function df(a,y){if(!y)return"";if(typeof y=="string")return y;if(!a||y.after===void 0)return y.value;let b=!1,E=!1,ee=!1,re=!1,ae=!1,de=!1,pe=!1,ye=!1,we=!1,Be=!1,Xe=!1,dt=!1,wt=!1,pn=!1,ur=!1,ln=a[0],Zn=0;for(;ln!=null&&ln.type&&/^(subsup|placeholder)$/.test(ln.type);)Zn+=1,ln=a[Zn];return b=!ln||ln.type==="first",ln&&(pn=ln.mode==="text",E=!pn&&ln.type==="mord"&&he.test(ln.value),ee=!pn&&ln.type==="mord"&&/\d+$/.test(ln.value),re=!pn&&ln.isFunction,ae=ln.type==="genfrac",de=ln.type==="surd",pe=ln.type==="mbin",ye=ln.type==="mrel",we=ln.type==="mop"||ln.type==="operator"||ln.type==="extensible-symbol",Be=ln.type==="mpunct"||ln.type==="minner",Xe=ln.type==="array",dt=ln.type==="mopen",wt=ln.type==="mclose"||ln.type==="leftright",ur=ln.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")&&de||y.after.includes("binop")&&pe||y.after.includes("relop")&&ye||y.after.includes("operator")&&we||y.after.includes("punct")&&Be||y.after.includes("array")&&Xe||y.after.includes("openfence")&&dt||y.after.includes("closefence")&&wt||y.after.includes("text")&&pn||y.after.includes("space")&&ur?y.value:""}function dd(a,y,b){return b?df(a,b[y]):""}var ff={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function Ou(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=pf(a)),E==="ascii-math"?(a=a.replace(/\u2061/gu,""),a=a.replace(/\u3016/gu,"{"),a=a.replace(/\u3017/gu,"}"),a=a.replace(/([^\\])sinx/g,"$1\\sin x"),a=a.replace(/([^\\])cosx/g,"$1\\cos x "),a=a.replace(/\u2013/g,"-"),["ascii-math",ts(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function ts(a,y){var b,E,ee;if(!a)return"";let re=!1,ae;const de=(b=y.inlineShortcuts)!=null?b:ff;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=vl(a.slice(1),{inlineShortcuts:de,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:de,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:de,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=vl(ae[1],{inlineShortcuts:de,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=ts(ae[2],y),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hf(ae[1],de),a+=ts(ae[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=vl(a.slice(1),{inlineShortcuts:de,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hf(ae[1],de),a+=ts(ae[2],y),re=!0)),!re)if(ae=vl(a,{inlineShortcuts:de,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const pe=vl(ae.rest.slice(1),{inlineShortcuts:de,noWrap:!0});pe.match&&(a="\\frac{"+ae.match+"}{"+pe.match+"}"+ts(pe.rest,y)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+ts(ae.rest,y):ae.match+ts(ae.rest,y),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+ts(ae[2],y),re=!0)),a}function vl(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,de=1;for(;de<a.length&&ae>0;)a[de]===ee&&ae++,a[de]===re&&ae--,de++;ae===0?(y.noWrap&&ee==="("?b=ts(a.substring(1,de-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+ts(a.substring(1,de-1),y)+"\\right"+re),E=a.slice(Math.max(0,de))):(b=a.substring(1,de),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let de=dd(null,a,y.inlineShortcuts);if(de)return de=de.replace("_{#?}",""),de=de.replace("^{#?}",""),{match:de,rest:a.slice(de.length)}}if(ae=a.match(/^([a-zA-Z])/),ae)return{match:ae[1],rest:a.slice(1)};if(ae=a.match(/^(-)?\d+(\.\d*)?/),ae)return{match:ae[0],rest:a.slice(ae[0].length)};/^\\(left|right)/.test(a)||(ae=a.match(/^(\\[a-zA-Z]+)/),ae&&(E=a.slice(ae[1].length),b=ae[1]))}return{match:b,rest:E}}function hf(a,y){let b=dd(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var fd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function yl(a){const y=a.trim();for(const b of fd)if(y.startsWith(b[0])&&y.endsWith(b[1]))return[!0,y.substring(b[0].length,y.length-b[1].length)];return[!1,a]}function pf(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=yl(a),y?["latex",a]:a.startsWith("`")&&a.endsWith("`")?(a=a.substring(1,a.length-1),["ascii-math",a]):a.includes("\\")?["latex",a]:/\$.+\$/.test(a)?["latex",`\\text{${a}}`]:[void 0,a]}var Sc="$$",oh="$$",sh=(a,y,b)=>(fd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${Sc} ${y} ${oh}`),y),mf=class Qf{constructor(y){Qf._modes[y]=this}static onPaste(y,b,E){var ee;if(!b.contentEditable&&b.userSelect==="none")return b.model.announce("plonk"),!1;if(typeof E=="string"){const ae=new DataTransfer;ae.setData("text/plain",E),E=ae}const re=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ee=b.host)!=null&&ee.dispatchEvent(re)?Qf._modes[y].onPaste(b,E):!1}static copyToClipboard(y,b){if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const E=y.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:jo(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]:jo(ee.selection);let ae=ee.getAtoms(re);if(ae.every(de=>de.mode==="text"||!de.mode))b.clipboardData.setData("text/plain",ae.filter(de=>de instanceof al).map(de=>de.value).join(""));else if(ae.every(de=>de.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(de=>{var pe;return(pe=de.value)!=null?pe:""}).join(""));else{let de;ae.length===1&&ae[0].verbatimLatex!==void 0?de=ae[0].verbatimLatex:de=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",de);try{b.clipboardData.setData("text/plain",y.options.onExport(y,de,re))}catch(pe){}if(ae.length===1){const pe=ae[0];(pe.type==="root"||pe.type==="group")&&(ae=pe.body.filter(ye=>ye.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(pe=>pe.toJson())))}catch(pe){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const pe=window.MathfieldElement.computeEngine;if(pe)try{const ye=pe.jsonSerializationOptions;pe.jsonSerializationOptions={metadata:["latex"]};const we=pe.parse(ee.getValue(re,"latex-unstyled"));pe.jsonSerializationOptions=ye;const Be=JSON.stringify(we.json);Be&&b.clipboardData.setData("application/json",Be)}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 Qf._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};mf._modes={};var Hi=mf,lh=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],hd={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Rs(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function Bs(a){var y,b;return(b=(y=a.querySelector(".ML__caret"))!=null?y:a.querySelector(".ML__text-caret"))!=null?b:a.querySelector(".ML__latex-caret")}function bl(a){const y=Bs(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function pd(a){var y;if(!a.parent)return"root";let b=(y=a.parent.id)!=null?y:"";return b+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,b}function md(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ee=y.right-y.left,re=y.bottom-y.top,ae=Math.ceil(y.left-E.left+a.field.scrollLeft*b),de=Math.ceil(y.top-E.top);return{left:ae,right:ae+ee,top:de,bottom:de+re}}function gd(a){const y=a.getBoundingClientRect(),b=parseInt(getComputedStyle(a).marginRight),E={top:y.top-1,bottom:y.bottom,left:y.left,right:y.right-1+b};if(a.children.length===0||a.tagName.toUpperCase()==="SVG")return E;for(const ee of a.children)if(ee.nodeType===1&&"atomId"in ee.dataset&&!ee.classList.contains("pstrut")){const re=gd(ee);E.left=Math.min(E.left,re.left),E.right=Math.max(E.right,re.right),E.top=Math.min(E.top,re.top),E.bottom=Math.max(E.bottom,re.bottom)}return E}function lu(a,y){var b,E;if(!y.id)return null;let ee=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${y.id}"]`);return ee=re?gd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function gf(a,y,b){const E=new Map;for(const ee of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let pe=Math.floor(re.getBoundingClientRect().width)/ae;pe=isNaN(pe)?1:pe;const ye=md(a,lu(a,ee),pe);if(ye){const we=pd(ee);if(E.has(we)){const Be=E.get(we);E.set(we,{left:Math.min(Be.left,ye.left),right:Math.max(Be.right,ye.right),top:Math.min(Be.top,ye.top),bottom:Math.max(Be.bottom,ye.bottom)})}else E.set(we,ye)}}return[...E.values()]}function vd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...gf(a,E,y)),[])}function yd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function Cc(a){let y=0,b=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,ee)}var vf=`@keyframes ML__caret-blink {
|
|
|
0%,
|
|
|
100% {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
50% {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
}
|
|
|
.ML__container {
|
|
|
display: inline-flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
min-height: 39px;
|
|
|
/* Need some room for the virtual keyboard toggle */
|
|
|
width: 100%;
|
|
|
/* Encourage browsers to consider allocating a hardware accelerated
|
|
|
layer for this element. */
|
|
|
isolation: isolate;
|
|
|
/* Prevent the browser from trying to interpret touch gestures in the field */
|
|
|
/* "Disabling double-tap to zoom removes the need for browsers to
|
|
|
delay the generation of click events when the user taps the screen." */
|
|
|
touch-action: none;
|
|
|
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_selection-color: var(--selection-color, #000);
|
|
|
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
|
|
|
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
|
|
|
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
|
|
|
--_smart-fence-color: var(--smart-fence-color, currentColor);
|
|
|
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
|
|
|
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
|
|
|
--_correct-color: var(--correct-color, #10a000);
|
|
|
--_incorrect-color: var(--incorrect-color, #a01b00);
|
|
|
--_composition-background-color: var(--composition-background-color, #fff1c2);
|
|
|
--_composition-text-color: var(--composition-text-color, black);
|
|
|
--_composition-underline-color: var(--composition-underline-color, transparent);
|
|
|
}
|
|
|
/* This is the actual field content (formula) */
|
|
|
.ML__content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
align-self: center;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 2px 3px 2px 1px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle,
|
|
|
.ML__menu-toggle {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
flex-shrink: 0;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
padding: 0;
|
|
|
margin-right: 4px;
|
|
|
cursor: pointer;
|
|
|
/* Avoid some weird blinking with :hover */
|
|
|
border-radius: 8px;
|
|
|
border: 1px solid transparent;
|
|
|
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
color: hsl(var(--_hue), 40%, 50%);
|
|
|
fill: currentColor;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:hover,
|
|
|
.ML__menu-toggle:hover {
|
|
|
background: hsla(0, 0%, 70%, 0.3);
|
|
|
color: #333;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle > span,
|
|
|
.ML__menu-toggle > span {
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
/* The invisible element used to capture keyboard events. We're just trying
|
|
|
really hard to make sure it doesn't show. */
|
|
|
.ML__keyboard-sink {
|
|
|
display: inline-block;
|
|
|
resize: none;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
/* Need these for Microsoft Edge */
|
|
|
position: fixed;
|
|
|
clip: rect(0 0 0 0);
|
|
|
/* Need this to prevent iOS Safari from auto-zooming */
|
|
|
font-size: 1em;
|
|
|
font-family: KaTeX_Main;
|
|
|
line-height: 0.5;
|
|
|
/* On Chromium, if this is 0, no keyboard events are received */
|
|
|
}
|
|
|
[part="placeholder"] {
|
|
|
color: var(--neutral-400);
|
|
|
}
|
|
|
.ML__composition {
|
|
|
background: var(--_composition-background-color);
|
|
|
color: var(--_composition-text-color);
|
|
|
text-decoration: underline var(--_composition-underline-color);
|
|
|
}
|
|
|
.ML__caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__text-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__latex-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_latex-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.019em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__focused .ML__latex-caret::after,
|
|
|
.ML__focused .ML__text-caret::after,
|
|
|
.ML__focused .ML__caret::after {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.ML__focused .ML__text {
|
|
|
background: var(--_text-highlight-background-color);
|
|
|
}
|
|
|
/* When using smartFence, the anticipated closing fence is displayed
|
|
|
with this style */
|
|
|
.ML__smart-fence__close {
|
|
|
opacity: var(--_smart-fence-opacity);
|
|
|
color: var(--_smart-fence-color);
|
|
|
}
|
|
|
.ML__selected,
|
|
|
.ML__focused .ML__selected .ML__contains-caret,
|
|
|
.ML__focused .ML__selected .ML__smart-fence__close,
|
|
|
.ML__focused .ML__selected .ML__placeholder {
|
|
|
color: var(--_selection-color);
|
|
|
opacity: 1;
|
|
|
}
|
|
|
.ML__selection {
|
|
|
box-sizing: border-box;
|
|
|
background: var(--_selection-background-color) !important;
|
|
|
}
|
|
|
.ML__contains-caret.ML__close,
|
|
|
.ML__contains-caret.ML__open,
|
|
|
.ML__contains-caret > .ML__close,
|
|
|
.ML__contains-caret > .ML__open,
|
|
|
.ML__contains-caret .ML__sqrt-sign,
|
|
|
.ML__contains-caret .ML__sqrt-line {
|
|
|
color: var(--_caret-color);
|
|
|
}
|
|
|
.ML__contains-highlight {
|
|
|
box-sizing: border-box;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__focused .ML__contains-highlight {
|
|
|
background: var(--_contains-highlight-background-color);
|
|
|
}
|
|
|
.ML__raw-latex {
|
|
|
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
font-weight: 400;
|
|
|
font-size: 0.8em;
|
|
|
letter-spacing: -0.05em;
|
|
|
color: var(--_latex-color);
|
|
|
}
|
|
|
.ML__suggestion {
|
|
|
color: var(--neutral-500);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:focus {
|
|
|
outline: none;
|
|
|
border-radius: 8px;
|
|
|
border: 2px solid hsl(var(--_hue), 40%, 50%);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-pressed,
|
|
|
.ML__virtual-keyboard-toggle.is-active:hover,
|
|
|
.ML__virtual-keyboard-toggle.is-active {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to automatically show a
|
|
|
tooltip over a element on hover.
|
|
|
*/
|
|
|
[data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
[data-tooltip]::after {
|
|
|
content: attr(data-tooltip);
|
|
|
position: absolute;
|
|
|
display: block;
|
|
|
z-index: 2;
|
|
|
pointer-events: none;
|
|
|
right: auto;
|
|
|
top: calc(-100% - 4px);
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
border-radius: 4px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
text-align: center;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
/* Phone */
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
[data-tooltip]::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
menu [data-tooltip]::after {
|
|
|
left: 100%;
|
|
|
top: 0%;
|
|
|
}
|
|
|
menu .ML__base {
|
|
|
cursor: default;
|
|
|
}
|
|
|
/** Don't display if we're tracking, i.e. have the pointer down */
|
|
|
.tracking [data-tooltip]:hover::after {
|
|
|
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
/** But do display if tracking and inside a menu */
|
|
|
.tracking menu li[data-tooltip]:hover::after,
|
|
|
[data-tooltip]:hover::after {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
transition-property: opacity, scale;
|
|
|
transition-duration: 0.15s;
|
|
|
transition-delay: 1s;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__prompt {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.ML__editablePromptBox {
|
|
|
outline: 1px solid #acacac;
|
|
|
border-radius: 2px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__focusedPromptBox {
|
|
|
outline: highlight auto 1px;
|
|
|
}
|
|
|
.ML__lockedPromptBox {
|
|
|
background-color: rgba(142, 142, 141, 0.4);
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__correctPromptBox {
|
|
|
outline: 1px solid var(--_correct-color);
|
|
|
box-shadow: 0 0 5px var(--_correct-color);
|
|
|
}
|
|
|
.ML__incorrectPromptBox {
|
|
|
outline: 1px solid var(--_incorrect-color);
|
|
|
box-shadow: 0 0 5px var(--_incorrect-color);
|
|
|
}
|
|
|
.variant-submenu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding: 8px;
|
|
|
}
|
|
|
.variant-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
text-align: center;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.insert-matrix-submenu {
|
|
|
display: grid;
|
|
|
padding: 8px;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
}
|
|
|
.insert-matrix-submenu [part=menu-item] {
|
|
|
font-size: 21px;
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
line-height: 21px;
|
|
|
text-align: center;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.border-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
line-height: 1.2;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.swatches-submenu {
|
|
|
--_swatch-size: 2rem;
|
|
|
--_columns: 4;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
padding: 8px;
|
|
|
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.menu-swatch {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
box-sizing: border-box;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
margin: 2px;
|
|
|
padding: 0;
|
|
|
background: var(--neutral-200);
|
|
|
}
|
|
|
.menu-swatch > .label {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
.menu-swatch > .label > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
min-width: var(--_swatch-size);
|
|
|
min-height: var(--_swatch-size);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.menu-swatch.active {
|
|
|
background: var(--neutral-100);
|
|
|
scale: 1.4;
|
|
|
}
|
|
|
.menu-swatch.active > .label > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.menu-swatch .ui-checkmark,
|
|
|
.menu-swatch .ui-mixedmark {
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: white;
|
|
|
}
|
|
|
.menu-swatch.dark-contrast .ui-checkmark,
|
|
|
.menu-swatch.dark-contrast .ui-mixedmark {
|
|
|
color: #000;
|
|
|
}
|
|
|
`,qa=`.ML__container {
|
|
|
min-height: auto !important;
|
|
|
--_hue: var(--hue, 212);
|
|
|
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
|
|
|
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
|
|
|
}
|
|
|
.ML__sr-only {
|
|
|
position: absolute;
|
|
|
width: 1px;
|
|
|
height: 1px;
|
|
|
margin: -1px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
clip-path: inset(50%);
|
|
|
white-space: nowrap;
|
|
|
border: 0;
|
|
|
}
|
|
|
.ML__is-inline {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__base {
|
|
|
visibility: inherit;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: text;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
box-sizing: content-box;
|
|
|
border: 0;
|
|
|
outline: 0;
|
|
|
vertical-align: baseline;
|
|
|
font-weight: inherit;
|
|
|
font-family: inherit;
|
|
|
font-style: inherit;
|
|
|
text-decoration: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__strut,
|
|
|
.ML__strut--bottom {
|
|
|
display: inline-block;
|
|
|
min-height: 0.5em;
|
|
|
}
|
|
|
.ML__small-delim {
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
/* Text mode */
|
|
|
.ML__text {
|
|
|
font-family: var(--_text-font-family);
|
|
|
white-space: pre;
|
|
|
}
|
|
|
/* Use cmr for 'math upright' */
|
|
|
.ML__cmr {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.ML__mathit {
|
|
|
font-family: KaTeX_Math;
|
|
|
/* The KaTeX_Math font is italic by default, so the font-style below is only
|
|
|
useful when a fallback font is used
|
|
|
*/
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__mathbf {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
|
|
|
to match TeX idiosyncratic behavior */
|
|
|
.lcGreek.ML__mathbf {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.ML__mathbfit {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: bold;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__ams {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
/* Blackboard */
|
|
|
.ML__bb {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
.ML__cal {
|
|
|
font-family: KaTeX_Caligraphic;
|
|
|
}
|
|
|
.ML__frak {
|
|
|
font-family: KaTeX_Fraktur;
|
|
|
}
|
|
|
.ML__tt {
|
|
|
font-family: KaTeX_Typewriter;
|
|
|
}
|
|
|
.ML__script {
|
|
|
font-family: KaTeX_Script;
|
|
|
}
|
|
|
.ML__sans {
|
|
|
font-family: KaTeX_SansSerif;
|
|
|
}
|
|
|
.ML__series_ul {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_el {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_l {
|
|
|
font-weight: 200;
|
|
|
}
|
|
|
.ML__series_sl {
|
|
|
font-weight: 300;
|
|
|
}
|
|
|
.ML__series_sb {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
.ML__bold,
|
|
|
.ML__boldsymbol {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
.ML__series_eb {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
.ML__series_ub {
|
|
|
font-weight: 900;
|
|
|
}
|
|
|
.ML__series_uc {
|
|
|
font-stretch: ultra-condensed;
|
|
|
}
|
|
|
.ML__series_ec {
|
|
|
font-stretch: extra-condensed;
|
|
|
}
|
|
|
.ML__series_c {
|
|
|
font-stretch: condensed;
|
|
|
}
|
|
|
.ML__series_sc {
|
|
|
font-stretch: semi-condensed;
|
|
|
}
|
|
|
.ML__series_sx {
|
|
|
font-stretch: semi-expanded;
|
|
|
}
|
|
|
.ML__series_x {
|
|
|
font-stretch: expanded;
|
|
|
}
|
|
|
.ML__series_ex {
|
|
|
font-stretch: extra-expanded;
|
|
|
}
|
|
|
.ML__series_ux {
|
|
|
font-stretch: ultra-expanded;
|
|
|
}
|
|
|
.ML__it {
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__shape_ol {
|
|
|
-webkit-text-stroke: 1px black;
|
|
|
text-stroke: 1px black;
|
|
|
color: transparent;
|
|
|
}
|
|
|
.ML__shape_sc {
|
|
|
font-variant: small-caps;
|
|
|
}
|
|
|
.ML__shape_sl {
|
|
|
font-style: oblique;
|
|
|
}
|
|
|
/* First level emphasis */
|
|
|
.ML__emph {
|
|
|
color: #bc2612;
|
|
|
}
|
|
|
/* Second level emphasis */
|
|
|
.ML__emph .ML__emph {
|
|
|
color: #0c7f99;
|
|
|
}
|
|
|
.ML__highlight {
|
|
|
color: #007cb2;
|
|
|
background: #edd1b0;
|
|
|
}
|
|
|
.ML__center {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__label_padding {
|
|
|
padding: 0 0.5em;
|
|
|
}
|
|
|
.ML__frac-line {
|
|
|
width: 100%;
|
|
|
min-height: 1px;
|
|
|
}
|
|
|
.ML__frac-line:after {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: max(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
/* There's a bug since Chrome 62 where
|
|
|
sub-pixel border lines don't draw at some zoom
|
|
|
levels (110%, 90%).
|
|
|
Setting the min-height used to work around it, but that workaround
|
|
|
broke in Chrome 84 or so.
|
|
|
Setting the background (and the min-height) seems to work for now.
|
|
|
*/
|
|
|
background: currentColor;
|
|
|
box-sizing: content-box;
|
|
|
/* Vuetify sets the box-sizing to inherit
|
|
|
causes the fraction line to not draw at all sizes (see #26) */
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__sqrt-sign {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__sqrt-line {
|
|
|
display: inline-block;
|
|
|
height: max(1px, 0.04em);
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__sqrt-line:before {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: min(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
background: currentColor;
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt-line:after {
|
|
|
border-bottom-width: 1px;
|
|
|
content: ' ';
|
|
|
display: block;
|
|
|
margin-top: -0.1em;
|
|
|
}
|
|
|
.ML__sqrt-index {
|
|
|
margin-left: 0.27777778em;
|
|
|
margin-right: -0.55555556em;
|
|
|
}
|
|
|
.ML__delim-size1 {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-size2 {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__delim-size3 {
|
|
|
font-family: KaTeX_Size3;
|
|
|
}
|
|
|
.ML__delim-size4 {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size1 > span {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size4 > span {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__accent-body > span {
|
|
|
font-family: KaTeX_Main;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__accent-vec {
|
|
|
position: relative;
|
|
|
left: 0.24em;
|
|
|
}
|
|
|
/** The markup for a LaTeX formula, either in an editable mathfield or
|
|
|
in a static display.
|
|
|
*/
|
|
|
.ML__latex {
|
|
|
display: inline-block;
|
|
|
direction: ltr;
|
|
|
text-align: left;
|
|
|
text-indent: 0;
|
|
|
text-rendering: auto;
|
|
|
font-family: KaTeX_Main, 'Times New Roman', serif;
|
|
|
font-style: normal;
|
|
|
font-size-adjust: none;
|
|
|
font-stretch: normal;
|
|
|
font-variant-caps: normal;
|
|
|
letter-spacing: normal;
|
|
|
line-height: 1.2;
|
|
|
word-wrap: normal;
|
|
|
word-spacing: normal;
|
|
|
white-space: nowrap;
|
|
|
text-shadow: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__latex .style-wrap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .mfrac {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .left-right {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist-t {
|
|
|
display: inline-table;
|
|
|
table-layout: fixed;
|
|
|
border-collapse: collapse;
|
|
|
}
|
|
|
.ML__latex .vlist-r {
|
|
|
display: table-row;
|
|
|
}
|
|
|
.ML__latex .vlist {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span {
|
|
|
display: block;
|
|
|
height: 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span > span {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist > span > .pstrut {
|
|
|
overflow: hidden;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__latex .vlist-t2 {
|
|
|
margin-right: -2px;
|
|
|
}
|
|
|
.ML__latex .vlist-s {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
font-size: 1px;
|
|
|
width: 2px;
|
|
|
min-width: 2px;
|
|
|
}
|
|
|
.ML__latex .msubsup {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .negativethinspace {
|
|
|
display: inline-block;
|
|
|
margin-left: -0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thinspace {
|
|
|
display: inline-block;
|
|
|
width: 0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .mediumspace {
|
|
|
display: inline-block;
|
|
|
width: 0.22222em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thickspace {
|
|
|
display: inline-block;
|
|
|
width: 0.27778em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .enspace {
|
|
|
display: inline-block;
|
|
|
width: 0.5em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .quad {
|
|
|
display: inline-block;
|
|
|
width: 1em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .qquad {
|
|
|
display: inline-block;
|
|
|
width: 2em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .llap,
|
|
|
.ML__latex .rlap {
|
|
|
width: 0;
|
|
|
position: relative;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner,
|
|
|
.ML__latex .rlap > .inner {
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__latex .llap > .fix,
|
|
|
.ML__latex .rlap > .fix {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner {
|
|
|
right: 0;
|
|
|
}
|
|
|
.ML__latex .rlap > .inner {
|
|
|
left: 0;
|
|
|
}
|
|
|
.ML__latex .rule {
|
|
|
display: inline-block;
|
|
|
border: solid 0;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line,
|
|
|
.ML__latex .underline .underline-line {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:before,
|
|
|
.ML__latex .underline .underline-line:before {
|
|
|
content: '';
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:after,
|
|
|
.ML__latex .underline .underline-line:after {
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: -1px;
|
|
|
}
|
|
|
.ML__latex .stretchy {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .stretchy:before,
|
|
|
.ML__latex .stretchy:after {
|
|
|
content: '';
|
|
|
}
|
|
|
.ML__latex .stretchy svg {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: inherit;
|
|
|
fill: currentColor;
|
|
|
stroke: currentColor;
|
|
|
fill-rule: nonzero;
|
|
|
fill-opacity: 1;
|
|
|
stroke-width: 1;
|
|
|
stroke-linecap: butt;
|
|
|
stroke-linejoin: miter;
|
|
|
stroke-miterlimit: 4;
|
|
|
stroke-dasharray: none;
|
|
|
stroke-dashoffset: 0;
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
width: 50%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-3-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-1 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .nulldelimiter {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-group {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-symbol {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .op-symbol.small-op {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__latex .op-symbol.large-op {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__latex .mtable .vertical-separator {
|
|
|
display: inline-block;
|
|
|
min-width: 1px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .mtable .arraycolsep {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-m > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-c > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-l > .vlist-t {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-r > .vlist-t {
|
|
|
text-align: right;
|
|
|
}
|
|
|
.ML__error {
|
|
|
display: inline-block;
|
|
|
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
|
|
|
background-color: hsla(341, 100%, 40%, 0.1);
|
|
|
background-repeat: repeat-x;
|
|
|
background-size: 3px 3px;
|
|
|
padding-bottom: 3px;
|
|
|
background-position: 0 100%;
|
|
|
}
|
|
|
.ML__error > .ML__error {
|
|
|
background: transparent;
|
|
|
padding: 0;
|
|
|
}
|
|
|
.ML__placeholder {
|
|
|
color: var(--_placeholder-color);
|
|
|
opacity: var(--_placeholder-opacity);
|
|
|
padding-left: 0.4ex;
|
|
|
padding-right: 0.4ex;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
}
|
|
|
.ML__notation {
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
|
|
|
For UI elements, see \`[data-ML__tooltip]\`
|
|
|
*/
|
|
|
.ML__tooltip-container {
|
|
|
position: relative;
|
|
|
transform: scale(0);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content {
|
|
|
position: fixed;
|
|
|
display: inline-table;
|
|
|
visibility: hidden;
|
|
|
z-index: 2;
|
|
|
width: max-content;
|
|
|
max-width: 400px;
|
|
|
padding: 12px 12px;
|
|
|
border-radius: 8px;
|
|
|
background: #616161;
|
|
|
--_selection-color: #fff;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
opacity: 0;
|
|
|
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__text {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__base {
|
|
|
display: contents;
|
|
|
}
|
|
|
.ML__tooltip-container:hover .ML__tooltip-content {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
font-size: 0.75em;
|
|
|
transform: scale(1) translate(0, 3em);
|
|
|
}
|
|
|
`,yf=`#mathlive-environment-popover.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
#mathlive-environment-popover {
|
|
|
--_environment-panel-height: var(--environment-panel-height, 70px);
|
|
|
--_accent-color: var(--accent-color, #aaa);
|
|
|
--_background: var(--environment-panel-background, #fff);
|
|
|
--_button-background: var(--environment-panel-button-background, white);
|
|
|
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
|
|
|
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
|
|
|
--_button-text: var(--environment-panel-button-text, #e3e4e8);
|
|
|
position: absolute;
|
|
|
width: calc(var(--_environment-panel-height) * 2);
|
|
|
height: var(--_environment-panel-height);
|
|
|
border-radius: 4px;
|
|
|
border: 1.5px solid var(--_accent-color);
|
|
|
background-color: var(--_background);
|
|
|
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
|
|
|
pointer-events: all;
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons {
|
|
|
height: calc(var(--_environment-panel-height) * 5/4);
|
|
|
width: calc(var(--_environment-panel-height) * 5/4);
|
|
|
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
|
|
|
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .font {
|
|
|
fill: white;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons circle {
|
|
|
fill: #7f7f7f;
|
|
|
transition: fill 300ms;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
|
|
|
fill-opacity: 1;
|
|
|
fill: var(--_background);
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-width: 3px;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons line {
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-opacity: 0;
|
|
|
stroke-width: 40;
|
|
|
pointer-events: none;
|
|
|
transition: stroke-opacity 300ms;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
|
|
|
height: 100%;
|
|
|
width: 50%;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
|
|
|
width: var(--_environment-panel-height);
|
|
|
height: var(--_environment-panel-height);
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
|
|
|
pointer-events: all;
|
|
|
margin-top: 2px;
|
|
|
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
|
|
|
height: calc(var(--_environment-panel-height) / 3 - 2px);
|
|
|
border-radius: calc(var(--_environment-panel-height) / 25);
|
|
|
background-color: var(--_button-background);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
|
|
|
background-color: var(--_button-background-hover);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
|
|
|
stroke: var(--_button-text);
|
|
|
stroke-width: 2;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
|
|
|
fill-opacity: 0;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
|
|
|
pointer-events: none;
|
|
|
background-color: var(--_button-background-active);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
|
|
|
stroke: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
`,uh=`/* The element that display info while in latex mode */
|
|
|
#mathlive-suggestion-popover {
|
|
|
background-color: rgba(97, 97, 97);
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
border-radius: 8px;
|
|
|
position: fixed;
|
|
|
z-index: 1;
|
|
|
display: none;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
}
|
|
|
#mathlive-suggestion-popover.top-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
top: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-bottom: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.bottom-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
bottom: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-top: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-animated {
|
|
|
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-visible {
|
|
|
display: flex;
|
|
|
}
|
|
|
@keyframes ML__fade-in {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
/* The wrapper class for the entire content of the popover panel */
|
|
|
#mathlive-suggestion-popover ul {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
align-items: flex-start;
|
|
|
max-height: 400px;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
margin: 8px;
|
|
|
padding: 8px;
|
|
|
width: calc(100% - 16px - 16px);
|
|
|
column-gap: 1em;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|
|
|
/* Since the content can be clicked on, provide feedback on hover */
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a {
|
|
|
color: #5ea6fd;
|
|
|
padding-top: 0.3em;
|
|
|
margin-top: 0.4em;
|
|
|
display: block;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a:hover {
|
|
|
color: #5ea6fd;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li:hover,
|
|
|
#mathlive-suggestion-popover li.is-pressed,
|
|
|
#mathlive-suggestion-popover li.is-active {
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
}
|
|
|
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
|
|
|
.ML__popover__command {
|
|
|
font-size: 1.6rem;
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
.ML__popover__current {
|
|
|
background: #5ea6fd;
|
|
|
color: #fff;
|
|
|
}
|
|
|
.ML__popover__latex {
|
|
|
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
align-self: center;
|
|
|
}
|
|
|
/* The keyboard shortcuts for a symbol as displayed in the popover */
|
|
|
.ML__popover__keybinding {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 0.8em;
|
|
|
opacity: 0.7;
|
|
|
}
|
|
|
/* Style for the character that joins the modifiers of a keyboard shortcut
|
|
|
(usually a "+" sign)*/
|
|
|
.ML__shortcut-join {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
`,uu=`/* The element that displays the keys as the user type them */
|
|
|
#mathlive-keystroke-caption-panel {
|
|
|
visibility: hidden;
|
|
|
/*min-width: 160px;*/
|
|
|
/*background-color: rgba(97, 97, 200, .95);*/
|
|
|
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
|
|
|
border-color: var(--secondary-border, hsl(0, 0%, 91%));
|
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 16px;
|
|
|
position: absolute;
|
|
|
z-index: 1;
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse;
|
|
|
justify-content: center;
|
|
|
--keystroke: white;
|
|
|
--on-keystroke: #555;
|
|
|
--keystroke-border: #f7f7f7;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
body:not([theme='light']) #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
}
|
|
|
body[theme='dark'] #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
#mathlive-keystroke-caption-panel > span {
|
|
|
min-width: 14px;
|
|
|
/*height: 8px;*/
|
|
|
margin: 0 8px 0 0;
|
|
|
padding: 4px;
|
|
|
background-color: var(--keystroke);
|
|
|
color: var(--on-keystroke);
|
|
|
fill: currentColor;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 1em;
|
|
|
border-radius: 6px;
|
|
|
border: 2px solid var(--keystroke-border);
|
|
|
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
|
|
|
}
|
|
|
`,ch=`.ML__keyboard {
|
|
|
--_keyboard-height: 0;
|
|
|
--_keyboard-zindex: var(--keyboard-zindex, 105);
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
|
|
|
--_padding-top: var(--keyboard-padding-top, 5px);
|
|
|
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
|
|
|
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
|
|
|
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
|
|
|
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
|
|
|
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_keycap-height: var(--keycap-height, 60px);
|
|
|
/* Keycap width (incl. margin) */
|
|
|
--_keycap-max-width: var(--keycap-max-width, 100px);
|
|
|
--_keycap-gap: var(--keycap-gap, 8px);
|
|
|
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
|
|
|
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
|
|
|
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 70px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
|
|
|
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
|
|
|
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
|
|
|
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
|
|
|
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
|
|
|
}
|
|
|
.is-math-mode .MLK__rows .if-text-mode,
|
|
|
.is-text-mode .MLK__rows .if-math-mode {
|
|
|
display: none;
|
|
|
}
|
|
|
.if-can-undo,
|
|
|
.if-can-redo,
|
|
|
.if-can-copy,
|
|
|
.if-can-cut,
|
|
|
.if-can-paste {
|
|
|
opacity: 0.4;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.can-undo .if-can-undo,
|
|
|
.can-redo .if-can-redo,
|
|
|
.can-copy .if-can-copy,
|
|
|
.can-cut .if-can-cut,
|
|
|
.can-paste .if-can-paste {
|
|
|
opacity: 1;
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
body > .ML__keyboard {
|
|
|
position: fixed;
|
|
|
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
|
|
|
border-top: 1px solid var(--_border);
|
|
|
}
|
|
|
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
|
|
|
box-shadow: none;
|
|
|
border: none;
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
|
|
|
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
|
|
|
transition-property: transform, opacity;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__keyboard {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
z-index: var(--_keyboard-zindex);
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
opacity: 1;
|
|
|
transform: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.ML__keyboard :where(div) {
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
transform: none;
|
|
|
}
|
|
|
.MLK__backdrop {
|
|
|
position: absolute;
|
|
|
bottom: calc(-1 * var(--_keyboard-height));
|
|
|
width: 100%;
|
|
|
height: var(--_keyboard-height);
|
|
|
box-sizing: border-box;
|
|
|
padding-top: var(--_padding-top);
|
|
|
padding-bottom: var(--_padding-bottom);
|
|
|
padding-left: var(--_padding-horizontal);
|
|
|
padding-right: var(--_padding-horizontal);
|
|
|
opacity: 0;
|
|
|
visibility: hidden;
|
|
|
transform: translate(0, 0);
|
|
|
background: var(--_background);
|
|
|
}
|
|
|
.backdrop-is-transparent .MLK__backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop
|
|
|
(backdrop-is-transparent), make sure to let pointer event go through. */
|
|
|
.backdrop-is-transparent .MLK__plate {
|
|
|
background: transparent;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop, make sure to
|
|
|
allow pointer events on it. */
|
|
|
.backdrop-is-transparent .MLK__layer > div > div {
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
.ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
transform: translate(0, calc(-1 * var(--_keyboard-height)));
|
|
|
opacity: 1;
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.caps-lock-indicator {
|
|
|
display: none;
|
|
|
width: 8px;
|
|
|
height: 8px;
|
|
|
background: #0cbc0c;
|
|
|
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
|
|
|
border-radius: 8px;
|
|
|
right: 8px;
|
|
|
top: 8px;
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .caps-lock-indicator {
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .shift {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
}
|
|
|
.MLK__plate {
|
|
|
position: absolute;
|
|
|
top: var(--_padding-top);
|
|
|
left: var(--_padding-horizontal);
|
|
|
width: calc(100% - 2 * var(--_padding-horizontal));
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
box-sizing: border-box;
|
|
|
container-type: inline-size;
|
|
|
touch-action: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
pointer-events: all;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 16px;
|
|
|
/* Size of toolbar labels */
|
|
|
font-weight: 400;
|
|
|
text-shadow: none;
|
|
|
}
|
|
|
.ML__box-placeholder {
|
|
|
color: var(--_box-placeholder-color);
|
|
|
}
|
|
|
.MLK__tex {
|
|
|
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__tex-math {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.MLK__layer {
|
|
|
display: none;
|
|
|
outline: none;
|
|
|
}
|
|
|
.MLK__layer.is-visible {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
}
|
|
|
/* Keyboard layouts are made or rows of keys... */
|
|
|
.MLK__rows {
|
|
|
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
border-collapse: separate;
|
|
|
clear: both;
|
|
|
border: 0;
|
|
|
margin: 0;
|
|
|
margin-bottom: var(--_keycap-gap);
|
|
|
gap: var(--_keycap-gap);
|
|
|
/* If the styling include, e.g., some shadows, they will be
|
|
|
cut off by the overflow. In that case, set the padding to
|
|
|
compensate. */
|
|
|
padding-left: var(--_row-padding-left);
|
|
|
padding-right: var(--_row-padding-right);
|
|
|
overflow: visible;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: center;
|
|
|
width: 100%;
|
|
|
gap: var(--_keycap-gap);
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
/* For the alignment of the text on some modifiers (e.g. shift) */
|
|
|
/* Extra spacing between two adjacent keys */
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex-math {
|
|
|
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .big-op {
|
|
|
font-size: calc(1.25 * var(--_keycap-font-size));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bottom {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .left {
|
|
|
align-items: flex-start;
|
|
|
padding-left: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .right {
|
|
|
align-items: flex-end;
|
|
|
padding-right: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w0 {
|
|
|
width: 0;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w5 {
|
|
|
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w15 {
|
|
|
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w20 {
|
|
|
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w40 {
|
|
|
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w50 {
|
|
|
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .MLK__keycap.w50 {
|
|
|
font-size: 80%;
|
|
|
padding-top: 10px;
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .separator {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .horizontal-rule {
|
|
|
height: 6px;
|
|
|
margin-top: 3px;
|
|
|
margin-bottom: 0;
|
|
|
width: 100%;
|
|
|
border-radius: 0;
|
|
|
border-top: var(--_horizontal-rule);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost {
|
|
|
background: var(--_toolbar-background);
|
|
|
border: none;
|
|
|
color: var(--_toolbar-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost:hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bigfnbutton {
|
|
|
font-size: var(--_keycap-extra-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift,
|
|
|
.MLK__rows > .MLK__row .action {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
background: var(--_keycap-secondary-background);
|
|
|
border-color: var(--_keycap-secondary-border);
|
|
|
border-bottom-color: var(--_keycap-secondary-border-bottom);
|
|
|
line-height: 0.8;
|
|
|
font-size: min(1rem, var(--_keycap-small-font-size));
|
|
|
font-weight: 600;
|
|
|
padding: 8px 12px 8px 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift:hover,
|
|
|
.MLK__rows > .MLK__row .action:hover {
|
|
|
background: var(--_keycap-secondary-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary {
|
|
|
background: var(--_keycap-primary-background);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary:hover {
|
|
|
background: var(--_keycap-primary-background-hover);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected,
|
|
|
.MLK__rows > .MLK__row .action.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-active,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-active {
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning {
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning svg.svg-glyph {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
/** A regular keycap
|
|
|
* Use the :where() pseudo-class to give it a very low specifity,
|
|
|
* so that it can be overriden by custom style.
|
|
|
*/
|
|
|
:where(.MLK__rows > .MLK__row div) {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: space-evenly;
|
|
|
width: calc(var(--_keycap-width) - var(--_keycap-gap));
|
|
|
height: var(--_keycap-height);
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
vertical-align: top;
|
|
|
text-align: center;
|
|
|
float: left;
|
|
|
color: var(--_keycap-text);
|
|
|
fill: currentColor;
|
|
|
font-size: var(--_keycap-font-size);
|
|
|
background: var(--_keycap-background);
|
|
|
border: 1px solid var(--_keycap-border);
|
|
|
border-bottom-color: var(--_keycap-border-bottom);
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
|
touch-action: none;
|
|
|
/* Keys with a variants panel */
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div):hover {
|
|
|
overflow: visible;
|
|
|
background: var(--_keycap-background-hover);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) .ML__latex {
|
|
|
pointer-events: none;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
|
|
|
margin: 8px 0;
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
|
min-height: 20px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
|
|
|
margin: 8px 0;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
|
|
|
font-size: 25px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
z-index: calc(var(--_keyboard-zindex) - 5);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) small {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) aside {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 10px;
|
|
|
line-height: 10px;
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
|
|
|
Note there are a different set of tooltip rules for the keyboard toggle
|
|
|
(it's in a different CSS tree) */
|
|
|
.ML__keyboard [data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]::after {
|
|
|
position: absolute;
|
|
|
display: inline-table;
|
|
|
content: attr(data-tooltip);
|
|
|
top: inherit;
|
|
|
bottom: 100%;
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
z-index: 2;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
border-radius: 2px;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-weight: 400;
|
|
|
font-size: 12px;
|
|
|
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover::after {
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
}
|
|
|
.MLK__toolbar {
|
|
|
align-self: center;
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
width: 100%;
|
|
|
max-width: 996px;
|
|
|
min-height: 32px;
|
|
|
/* Icons for undo/redo, etc. */
|
|
|
}
|
|
|
.MLK__toolbar svg {
|
|
|
height: 20px;
|
|
|
width: 20px;
|
|
|
}
|
|
|
.MLK__toolbar > .left {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > .right {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
/* "button" in the toolbar */
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
color: var(--_toolbar-text);
|
|
|
fill: currentColor;
|
|
|
background: var(--_toolbar-background);
|
|
|
font-size: var(--_toolbar-font-size);
|
|
|
padding: 4px 15px;
|
|
|
cursor: pointer;
|
|
|
width: max-content;
|
|
|
min-width: 42px;
|
|
|
min-height: 34px;
|
|
|
border: none;
|
|
|
padding-left: 10px;
|
|
|
padding-right: 10px;
|
|
|
padding-bottom: 8px;
|
|
|
padding-top: 8px;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 4px;
|
|
|
margin-left: 4px;
|
|
|
margin-right: 4px;
|
|
|
border-radius: 8px;
|
|
|
box-shadow: none;
|
|
|
border-bottom: 2px solid transparent;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.disabled svg,
|
|
|
.MLK__toolbar > div > div.disabled:hover svg,
|
|
|
.MLK__toolbar > div > div.disabled.is-pressed svg {
|
|
|
color: var(--_toolbar-text);
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:hover,
|
|
|
.MLK__toolbar > div > div:active,
|
|
|
.MLK__toolbar > div > div.is-pressed,
|
|
|
.MLK__toolbar > div > div.is-active {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
background: var(--_toolbar-background-selected);
|
|
|
border-radius: 0;
|
|
|
border-bottom-color: var(--_toolbar-text-active);
|
|
|
padding-bottom: 4px;
|
|
|
margin-bottom: 8px;
|
|
|
}
|
|
|
/* This is the element that displays variants on press+hold */
|
|
|
.MLK__variant-panel {
|
|
|
visibility: hidden;
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
|
flex-flow: row wrap-reverse;
|
|
|
justify-content: center;
|
|
|
align-content: center;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
bottom: auto;
|
|
|
top: 0;
|
|
|
box-sizing: content-box;
|
|
|
transform: none;
|
|
|
z-index: calc(var(--_keyboard-zindex) + 1);
|
|
|
touch-action: none;
|
|
|
max-width: 350px;
|
|
|
background: var(--_variant-panel-background);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 6px;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
transition: none;
|
|
|
}
|
|
|
.MLK__variant-panel.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.MLK__variant-panel.compact {
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
|
|
|
}
|
|
|
.MLK__variant-panel .item {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
font-size: var(--_variant-keycap-font-size);
|
|
|
height: var(--_variant-keycap-length);
|
|
|
width: var(--_variant-keycap-length);
|
|
|
margin: 0;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
border: 1px solid transparent;
|
|
|
background: transparent;
|
|
|
pointer-events: all;
|
|
|
cursor: pointer;
|
|
|
color: var(--_variant-keycap-text);
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
@media (max-height: 412px) {
|
|
|
.MLK__variant-panel .item {
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
.MLK__variant-panel .item .ML__latex {
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-active {
|
|
|
background: var(--_variant-keycap-background-active);
|
|
|
color: var(--_variant-keycap-text-active);
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-pressed {
|
|
|
background: var(--_variant-keycap-background-pressed);
|
|
|
color: var(--_variant-keycap-text-pressed);
|
|
|
}
|
|
|
.MLK__variant-panel .item.small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button {
|
|
|
box-sizing: border-box;
|
|
|
background: #fbfbfb;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
width: calc(100% - 12px);
|
|
|
height: calc(100% - 12px);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover {
|
|
|
background: #f0f0f0;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.MLK__variant-panel .item.box > div,
|
|
|
.MLK__variant-panel .item.box > span {
|
|
|
border: 1px dashed rgba(0, 0, 0, 0.24);
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning {
|
|
|
min-height: 60px;
|
|
|
min-width: 60px;
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
padding: 5px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 5px;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning.is-pressed,
|
|
|
.MLK__variant-panel .item .warning.is-active {
|
|
|
background: red;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning svg.svg-glyph {
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
.MLK__variant-panel .item aside {
|
|
|
font-size: var(--_variant-keycap-aside-font-size);
|
|
|
line-height: 12px;
|
|
|
opacity: 0.78;
|
|
|
padding-top: 2px;
|
|
|
}
|
|
|
.MLK__keycap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
right: 4px;
|
|
|
top: 4px;
|
|
|
font-size: var(--_keycap-shift-font-size);
|
|
|
color: var(--_keycap-shift-color);
|
|
|
}
|
|
|
.hide-shift .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
@media (max-width: 414px) {
|
|
|
.MLK__variant-panel {
|
|
|
max-width: 350px;
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
/* @xs breakpoint: iPhone 5 */
|
|
|
@container (max-width: 414px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--_keycap-height), 42px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
font-size: 100%;
|
|
|
margin-left: 2px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
.MLK__rows .shift,
|
|
|
.MLK__rows .action {
|
|
|
font-size: 65%;
|
|
|
}
|
|
|
.MLK__rows .warning svg.svg-glyph {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
min-height: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 744px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--keycap-height, 52px), 52px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
padding-left: 0;
|
|
|
padding-right: 0;
|
|
|
}
|
|
|
.MLK__tooltip::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.fnbutton {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.bigfnbutton {
|
|
|
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.small {
|
|
|
font-size: 13px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > aside {
|
|
|
display: none;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
/* Medium breakpoint: larger phones */
|
|
|
@container (max-width: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@media (max-height: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 1444px) {
|
|
|
.MLK__rows .if-wide {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
.ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
}
|
|
|
/* Same as the media query, but with a class */
|
|
|
[theme='dark'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
[theme='light'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--_keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
}
|
|
|
`,Mc=`:host {
|
|
|
--primary-color: #5898ff;
|
|
|
--primary-color-dimmed: #c0c0f0;
|
|
|
--primary-color-dark: var(--blue-500);
|
|
|
--primary-color-light: var(--blue-100);
|
|
|
--primary-color-reverse: #ffffff;
|
|
|
--secondary-color: #ff8a65;
|
|
|
--secondary-color-dimmed: #f0d5c5;
|
|
|
--secondary-color-dark: var(--orange-500);
|
|
|
--secondary-color-light: var(--orange-100);
|
|
|
--secondary-color-reverse: #ffffff;
|
|
|
--link-color: #5898ff;
|
|
|
--link-color-dimmed: #c5c5c5;
|
|
|
--link-color-dark: #121212;
|
|
|
--link-color-light: #e2e2e2;
|
|
|
--link-color-reverse: #ffffff;
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--neutral-100: #f5f5f5;
|
|
|
--neutral-200: #eeeeee;
|
|
|
--neutral-300: #e0e0e0;
|
|
|
--neutral-400: #bdbdbd;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #757575;
|
|
|
--neutral-700: #616161;
|
|
|
--neutral-800: #424242;
|
|
|
--neutral-900: #212121;
|
|
|
--red-25: #fff8f7;
|
|
|
--red-50: #fff1ef;
|
|
|
--red-100: #ffeae6;
|
|
|
--red-200: #ffcac1;
|
|
|
--red-300: #ffa495;
|
|
|
--red-400: #ff7865;
|
|
|
--red-500: #f21c0d;
|
|
|
--red-600: #e50018;
|
|
|
--red-700: #d30024;
|
|
|
--red-800: #bd002c;
|
|
|
--red-900: #a1002f;
|
|
|
--orange-25: #fffbf8;
|
|
|
--orange-50: #fff7f1;
|
|
|
--orange-100: #fff3ea;
|
|
|
--orange-200: #ffe1c9;
|
|
|
--orange-300: #ffcca2;
|
|
|
--orange-400: #ffb677;
|
|
|
--orange-500: #fe9310;
|
|
|
--orange-600: #f58700;
|
|
|
--orange-700: #ea7c00;
|
|
|
--orange-800: #dc6d00;
|
|
|
--orange-900: #ca5b00;
|
|
|
--brown-25: #fff8ef;
|
|
|
--brown-50: #fff1df;
|
|
|
--brown-100: #ffe9ce;
|
|
|
--brown-200: #ebcca6;
|
|
|
--brown-300: #cdaf8a;
|
|
|
--brown-400: #af936f;
|
|
|
--brown-500: #856a47;
|
|
|
--brown-600: #7f5e34;
|
|
|
--brown-700: #78511f;
|
|
|
--brown-800: #6e4200;
|
|
|
--brown-900: #593200;
|
|
|
--yellow-25: #fffdf9;
|
|
|
--yellow-50: #fffcf2;
|
|
|
--yellow-100: #fffaec;
|
|
|
--yellow-200: #fff2ce;
|
|
|
--yellow-300: #ffe8ab;
|
|
|
--yellow-400: #ffdf85;
|
|
|
--yellow-500: #ffcf33;
|
|
|
--yellow-600: #f1c000;
|
|
|
--yellow-700: #dfb200;
|
|
|
--yellow-800: #c9a000;
|
|
|
--yellow-900: #ad8a00;
|
|
|
--lime-25: #f4ffee;
|
|
|
--lime-50: #e9ffdd;
|
|
|
--lime-100: #ddffca;
|
|
|
--lime-200: #a8fb6f;
|
|
|
--lime-300: #94e659;
|
|
|
--lime-400: #80d142;
|
|
|
--lime-500: #63b215;
|
|
|
--lime-600: #45a000;
|
|
|
--lime-700: #268e00;
|
|
|
--lime-800: #007417;
|
|
|
--lime-900: #005321;
|
|
|
--green-25: #f5fff5;
|
|
|
--green-50: #ebffea;
|
|
|
--green-100: #e0ffdf;
|
|
|
--green-200: #a7ffa7;
|
|
|
--green-300: #5afa65;
|
|
|
--green-400: #45e953;
|
|
|
--green-500: #17cf36;
|
|
|
--green-600: #00b944;
|
|
|
--green-700: #00a34a;
|
|
|
--green-800: #008749;
|
|
|
--green-900: #00653e;
|
|
|
--teal-25: #f3ffff;
|
|
|
--teal-50: #e6fffe;
|
|
|
--teal-100: #d9fffe;
|
|
|
--teal-200: #8dfffe;
|
|
|
--teal-300: #57f4f4;
|
|
|
--teal-400: #43e5e5;
|
|
|
--teal-500: #17cfcf;
|
|
|
--teal-600: #00c2c0;
|
|
|
--teal-700: #00b5b1;
|
|
|
--teal-800: #00a49e;
|
|
|
--teal-900: #009087;
|
|
|
--cyan-25: #f7fcff;
|
|
|
--cyan-50: #eff8ff;
|
|
|
--cyan-100: #e7f5ff;
|
|
|
--cyan-200: #c2e6ff;
|
|
|
--cyan-300: #95d5ff;
|
|
|
--cyan-400: #61c4ff;
|
|
|
--cyan-500: #13a7ec;
|
|
|
--cyan-600: #069eda;
|
|
|
--cyan-700: #0095c9;
|
|
|
--cyan-800: #0088b2;
|
|
|
--cyan-900: #0a7897;
|
|
|
--blue-25: #f7faff;
|
|
|
--blue-50: #eef5ff;
|
|
|
--blue-100: #e5f1ff;
|
|
|
--blue-200: #bfdbff;
|
|
|
--blue-300: #92c2ff;
|
|
|
--blue-400: #63a8ff;
|
|
|
--blue-500: #0d80f2;
|
|
|
--blue-600: #0077db;
|
|
|
--blue-700: #006dc4;
|
|
|
--blue-800: #0060a7;
|
|
|
--blue-900: #005086;
|
|
|
--indigo-25: #f8f7ff;
|
|
|
--indigo-50: #f1efff;
|
|
|
--indigo-100: #eae7ff;
|
|
|
--indigo-200: #ccc3ff;
|
|
|
--indigo-300: #ac99ff;
|
|
|
--indigo-400: #916aff;
|
|
|
--indigo-500: #63c;
|
|
|
--indigo-600: #5a21b2;
|
|
|
--indigo-700: #4e0b99;
|
|
|
--indigo-800: #3b0071;
|
|
|
--indigo-900: #220040;
|
|
|
--purple-25: #fbf7ff;
|
|
|
--purple-50: #f8f0ff;
|
|
|
--purple-100: #f4e8ff;
|
|
|
--purple-200: #e4c4ff;
|
|
|
--purple-300: #d49aff;
|
|
|
--purple-400: #c36aff;
|
|
|
--purple-500: #a219e6;
|
|
|
--purple-600: #9000c4;
|
|
|
--purple-700: #7c009f;
|
|
|
--purple-800: #600073;
|
|
|
--purple-900: #3d0043;
|
|
|
--magenta-25: #fff8fb;
|
|
|
--magenta-50: #fff2f6;
|
|
|
--magenta-100: #ffebf2;
|
|
|
--magenta-200: #ffcddf;
|
|
|
--magenta-300: #ffa8cb;
|
|
|
--magenta-400: #ff7fb7;
|
|
|
--magenta-500: #eb4799;
|
|
|
--magenta-600: #da3689;
|
|
|
--magenta-700: #c82179;
|
|
|
--magenta-800: #b00065;
|
|
|
--magenta-900: #8a004c;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
/* @media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--label-color: #fff;
|
|
|
--active-label-color: #000;
|
|
|
--menu-bg: #525252;
|
|
|
--active-bg: #5898ff;
|
|
|
--active-bg-dimmed: #5c5c5c;
|
|
|
}
|
|
|
} */
|
|
|
:host {
|
|
|
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
|
|
|
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
|
--ui-font-size: 14px;
|
|
|
--ui-line-height: 1.5;
|
|
|
--ui-letter-spacing: 0.007em;
|
|
|
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
|
|
|
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
|
--ui-layer-1: var(--neutral-100);
|
|
|
--ui-layer-2: var(--neutral-200);
|
|
|
--ui-layer-3: var(--neutral-300);
|
|
|
--ui-layer-4: var(--neutral-400);
|
|
|
--ui-layer-5: var(--neutral-500);
|
|
|
--ui-layer-6: var(--neutral-600);
|
|
|
--ui-border-color: var(--primary-color);
|
|
|
--ui-border-radius: 4px;
|
|
|
--ui-text: var(--neutral-900);
|
|
|
--ui-text-secondary: var(--neutral-700);
|
|
|
--ui-text-placeholder: var(--neutral-500);
|
|
|
--ui-text-muted: var(--neutral-300);
|
|
|
/** A field is a UI element in which a user can type data, for
|
|
|
* example an input or textarea element.
|
|
|
*/
|
|
|
--ui-field-bg: var(--neutral-100);
|
|
|
--ui-field-bg-hover: var(--neutral-100);
|
|
|
--ui-field-bg-disabled: var(--neutral-300);
|
|
|
--ui-field-bg-invalid: var(--red-100);
|
|
|
--ui-field-bg-focus: var(--neutral-100);
|
|
|
--ui-field-border: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-hover: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-disabled: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-invalid: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-focus: 0.5px solid var(--border-color);
|
|
|
--ui-menu-bg: var(--neutral-100);
|
|
|
--ui-menu-text: var(--neutral-900);
|
|
|
--ui-menu-bg-hover: var(--neutral-200);
|
|
|
--ui-menu-text-hover: var(--neutral-900);
|
|
|
/** The \`active\` state is used for the state of menu items
|
|
|
* when they are selected.
|
|
|
*/
|
|
|
--ui-menu-bg-active: var(--primary-color);
|
|
|
--ui-menu-text-active: var(--primary-color-reverse);
|
|
|
/** The \`active-muted\` set is used for the state of
|
|
|
* submenus when they are open.
|
|
|
*/
|
|
|
--ui-menu-bg-active-muted: var(--neutral-300);
|
|
|
--ui-menu-text-active-muted: var(--neutral-900);
|
|
|
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
|
|
|
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
|
|
|
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
|
|
|
--ui-menu-divider: 0.5px solid #c7c7c7;
|
|
|
/* var(--neutral-300); */
|
|
|
--ui-menu-z-index: 10000;
|
|
|
--page-bg: var(--neutral-100);
|
|
|
--content-bg: var(--neutral-200);
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
|
|
|
Noto is a Linux/Android font.
|
|
|
*/
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
|
|
|
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
|
|
|
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
|
|
|
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
|
|
|
}
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
|
|
|
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
|
|
|
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
|
|
|
}
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
|
|
|
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
|
|
|
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
|
|
|
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
|
|
|
}
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
|
|
|
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
|
|
|
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh),
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo),
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac),
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std),
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-size: 1rem;
|
|
|
--ui-line-height: 1.7;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
:dir(rtl) {
|
|
|
--ui-line-height: auto;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
`,dh=`.ui-menu *,
|
|
|
.ui-menu ::before,
|
|
|
.ui-menu ::after {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ui-menu {
|
|
|
display: none;
|
|
|
color-scheme: light dark;
|
|
|
-webkit-user-select: none;
|
|
|
/* Important: Safari iOS doesn't respect user-select */
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0 0 0 0);
|
|
|
--active-label-color: #fff;
|
|
|
/* ui-menu-text-active */
|
|
|
--label-color: #121212;
|
|
|
/* ui-menu-text */
|
|
|
--menu-bg: #e2e2e2;
|
|
|
/* ui-menu-background */
|
|
|
--active-bg: #5898ff;
|
|
|
/* ui-menu-background-active */
|
|
|
--active-bg-dimmed: #c5c5c5;
|
|
|
/* ui-menu-background-active-muted */
|
|
|
}
|
|
|
/** Use the :where pseudo selector to make the specificity of the
|
|
|
* selector 0, so that it can be overridden by the user.
|
|
|
*/
|
|
|
:where(.ui-menu-container) {
|
|
|
position: absolute;
|
|
|
overflow: visible;
|
|
|
width: auto;
|
|
|
height: auto;
|
|
|
z-index: 10000;
|
|
|
border-radius: 8px;
|
|
|
background: var(--ui-menu-bg);
|
|
|
box-shadow: var(--ui-menu-shadow);
|
|
|
list-style: none;
|
|
|
padding: 6px 0 6px 0;
|
|
|
margin: 0;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
color: var(--ui-menu-text);
|
|
|
font-weight: normal;
|
|
|
font-style: normal;
|
|
|
text-shadow: none;
|
|
|
text-transform: none;
|
|
|
letter-spacing: 0;
|
|
|
outline: none;
|
|
|
opacity: 1;
|
|
|
/* The [popover] elements have a 1px solid black border. Ugh. */
|
|
|
border: none;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:where(.ui-menu-container > li) {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
align-items: center;
|
|
|
padding: 1px 7px 1px 7px;
|
|
|
margin-top: 0;
|
|
|
margin-left: 6px;
|
|
|
margin-right: 6px;
|
|
|
border-radius: 4px;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
outline: none;
|
|
|
fill: currentColor;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
text-align: left;
|
|
|
color: inherit;
|
|
|
font-family: var(--ui-font-family);
|
|
|
font-size: var(--ui-font-size);
|
|
|
line-height: var(--ui-line-height);
|
|
|
letter-spacing: var(--ui-letter-spacing);
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label) {
|
|
|
appearance: none;
|
|
|
background: none;
|
|
|
outline: none;
|
|
|
width: 100%;
|
|
|
margin: 0;
|
|
|
padding: 1px 2px 1px 1px;
|
|
|
overflow: visible;
|
|
|
border: 1px solid transparent;
|
|
|
white-space: nowrap;
|
|
|
text-align: start;
|
|
|
}
|
|
|
:where(.ui-menu-container > li:has(.heading)) {
|
|
|
margin-top: 0.5em;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.heading) {
|
|
|
font-weight: bold;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.indent > .label) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.indent) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[role='divider']) {
|
|
|
border-bottom: 1px solid var(--ui-menu-divider);
|
|
|
border-radius: 0;
|
|
|
padding: 0;
|
|
|
margin-left: 15px;
|
|
|
margin-right: 15px;
|
|
|
padding-top: 5px;
|
|
|
margin-bottom: 5px;
|
|
|
width: calc(100% - 30px);
|
|
|
/** 100% - (margin-left + margin-right) */
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-disabled='true']) {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active) {
|
|
|
background: var(--ui-menu-bg-active);
|
|
|
background: -apple-system-control-accent;
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active.is-submenu-open) {
|
|
|
background: var(--ui-menu-bg-active-muted);
|
|
|
color: inherit;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
|
|
|
padding-inline-end: 0;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
/** Keyboard shortcut */
|
|
|
:where(.ui-menu-container > li > kbd) {
|
|
|
font-family: var(--ui-font-family);
|
|
|
margin-inline-start: 12px;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active > kbd) {
|
|
|
opacity: 0.85;
|
|
|
}
|
|
|
.ui-trailing-chevron {
|
|
|
display: flex;
|
|
|
margin-inline-start: 24px;
|
|
|
width: 10px;
|
|
|
height: 10px;
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
.ui-trailing-chevron:dir(rtl) {
|
|
|
transform: scaleX(-1);
|
|
|
}
|
|
|
.ui-checkmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
.ui-mixedmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
`,eo;function Hl(a){let y="";switch(a){case"mathfield-element":y=`
|
|
|
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
|
|
|
:host([hidden]) { display: none; }
|
|
|
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
|
|
|
:host(:focus), :host(:focus-within) {
|
|
|
outline: Highlight auto 1px; /* For Firefox */
|
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
|
}
|
|
|
:host([readonly]:focus), :host([readonly]:focus-within),
|
|
|
:host([read-only]:focus), :host([read-only]:focus-within) {
|
|
|
outline: none;
|
|
|
}
|
|
|
@media (hover: none) and (pointer: coarse) {
|
|
|
:host(:not(:focus)) :first-child { pointer-events: none !important; }
|
|
|
}`;break;case"core":y=qa;break;case"mathfield":y=vf;break;case"environment-popover":y=yf;break;case"suggestion-popover":y=uh;break;case"keystroke-caption":y=uu;break;case"virtual-keyboard":y=ch;break;case"ui":y=Mc;break;case"menu":y=dh;break;default:debugger}return y}function cu(a){return eo||(eo={}),eo[a]||(eo[a]=new CSSStyleSheet,eo[a].replaceSync(Hl(a))),eo[a]}var ol;function ks(a){var y;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const b=window.document.createElement("style");b.id=`mathlive-style-${a}`,b.append(window.document.createTextNode(Hl(a))),window.document.head.appendChild(b);return}if(ol||(ol={}),((y=ol[a])!=null?y:0)!==0)ol[a]+=1;else{const b=cu(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],ol[a]=1}}function x(a){if("adoptedStyleSheets"in document&&ol!=null&&ol[a]&&(ol[a]-=1,ol[a]<=0)){const y=eo[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class kp extends Bn{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 kp(y)}toJson(){return me(Se({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new Ea({parent:y,mathstyle:"cramp"},this.style),ee=(b=Bn.createBox(E,this.body))!=null?b:new dr("\u25A2",{style:this.style});let re=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(re=ee.skew);let ae=Math.min(ee.height,el),de;if(this.svgAccent)de=Os(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const ye=new dr(this.accent,{fontFamily:"Main-Regular"});ye.italic=0;const we=this.accent===8407?" ML__accent-vec":"";de=new dr(new dr(ye),{classes:"ML__accent-body"+we})}de=new Qa({shift:0,children:[{box:new dr(ee)},-ae,{box:de,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const pe=new dr(de,{type:"lift"});return this.caret&&(pe.caret=this.caret),this.bind(E,pe.wrap(E)),this.attachSupsub(E,{base:pe})}},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 ue(a,y,b,E){var ee;const ae=new dr(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(y);return b&&ae.setTop((1-y.scalingFactor)*os),ae}function ve(a,y,b,E,ee){var re,ae;const de=new Ea({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),pe=new dr(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(de);return b&&pe.setTop((1-de.scalingFactor)*os),pe}function Ce(a,y,b,E,ee){var re;let ae,de,pe,ye;ae=pe=ye=ie(a),de=null;let we="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?pe=ae=ye=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?pe=ae=ye=8741:a==="\\uparrow"?pe=ye=9168:a==="\\Uparrow"?pe=ye=8214:a==="\\downarrow"?ae=pe=9168:a==="\\Downarrow"?ae=pe=8214:a==="\\updownarrow"?(ae=8593,pe=9168,ye=8595):a==="\\Updownarrow"?(ae=8657,pe=8214,ye=8659):a==="["||a==="\\lbrack"?(ae=9121,pe=9122,ye=9123,we="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,pe=9125,ye=9126,we="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(pe=ae=9122,ye=9123,we="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,pe=ye=9122,we="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(pe=ae=9125,ye=9126,we="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,pe=ye=9125,we="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,pe=9116,ye=9117,we="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,pe=9119,ye=9120,we="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,de=9128,ye=9129,pe=9130,we="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,de=9132,ye=9133,pe=9130,we="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,ye=9129,pe=9130,we="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,ye=9133,pe=9130,we="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,ye=9133,pe=9130,we="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,ye=9129,pe=9130,we="Size4-Regular"):a==="\\surd"?(ae=57345,ye=9143,pe=57344,we="Size4-Regular"):a==="\\ulcorner"?(ae=9484,pe=ye=32):a==="\\urcorner"?(ae=9488,pe=ye=32):a==="\\llcorner"?(ye=9492,pe=ae=32):a==="\\lrcorner"&&(ae=9496,pe=ae=32);const Be=tl(ae,we),Xe=Be.height+Be.depth,dt=tl(pe,we),wt=dt.height+dt.depth,pn=tl(ye,we),ur=pn.height+pn.depth;let ln=0,Zn=1;if(de!==null){const Yo=tl(de,we);ln=Yo.height+Yo.depth,Zn=2}const fr=Xe+ur+ln,Yn=Math.max(0,Math.ceil((y-fr)/(Zn*wt))),Wr=fr+Yn*Zn*wt;let li=os;b&&(li=li*E.scalingFactor);const qr=Wr/2-li,Da=.008,Ya=[];Ya.push({box:new dr(ye,{fontFamily:we})}),Ya.push(-Da);const Mr=new dr(pe,{fontFamily:we});if(de===null)for(let Yo=0;Yo<Yn;Yo++)Ya.push({box:Mr});else{for(let Yo=0;Yo<Yn;Yo++)Ya.push({box:Mr});Ya.push(-Da),Ya.push({box:new dr(de,{fontFamily:we})}),Ya.push(-Da);for(let Yo=0;Yo<Yn;Yo++)Ya.push({box:Mr})}Ya.push(-Da),Ya.push({box:new dr(ae,{fontFamily:we})});let Fs="";we==="Size1-Regular"?Fs=" delim-size1":we==="Size4-Regular"&&(Fs=" delim-size4");const kl=new Qa({bottom:qr,children:Ya},{classes:Fs});return new dr(kl,me(Se({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var De=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"]),ct=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Ct=[0,1.2,1.8,2.4,3];function en(a,y,b,E){return a===void 0||a==="."?zr(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),De.has(a)||ct.has(a)?ve(a,y,!1,b,E):Re.has(a)?Ce(a,Ct[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var jt=[{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}],Fn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Jn=[{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 yr(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function Ir(a,y,b,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<b.length&&b[re].type!=="stack";re++){const ae=tl(a,yr(b[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let de=ae.height+ae.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?de*=Math.max(pc[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(de*=Math.max(pc[Math.max(1,E.size-1)],E.minFontScale))),de>y)return b[re]}return b[b.length-1]}function Fr(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return zr(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let ae;ct.has(y)?ae=jt:De.has(y)?ae=Jn:ae=Fn;const de=Ir(ie(y),b,ae,ee),pe=new Ea({parent:ee,mathstyle:de.mathstyle},re==null?void 0:re.style);return de.type==="small"?ue(y,pe,E,me(Se({},re),{type:a})):de.type==="large"?ve(y,de.size,E,pe,me(Se({},re),{type:a})):(console.assert(de.type==="stack"),Ce(y,b,E,pe,me(Se({},re),{type:a})))}function kr(a,y,b,E,ee,re){if(y===".")return zr(ee,re==null?void 0:re.classes);const ae=os*ee.scalingFactor,de=901,pe=5/$l,ye=Math.max(b-ae,E+ae),we=Math.max(ye/500*de,2*ye-pe);return Fr(a,y,we,!0,ee,re)}function zr(a,y){const b=new dr(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new Ea({parent:a,mathstyle:"textstyle"}))}var vi=class Lp extends Bn{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{}"}},wi=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],da=["cases","dcases","rcases"],to=["align","align*","aligned","gather","gathered","split"],Wo=["array","subequations","eqnarray"];function bo(a){return Wo.concat(to).concat(da).concat(wi).includes(a)}function cs(a){return wi.includes(a)}function ds(a){return da.includes(a)}function Do(a){return to.includes(a)}function fs(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 Be=[],Xe=Math.min(ye.length,we+E);for(;we<Xe;){const dt=ye[we];dt.length===0?Be.push([new Bn({type:"first",mode:a.mode})]):dt[0].type!=="first"?Be.push([new Bn({type:"first",mode:a.mode}),...dt]):(console.assert(!dt.slice(1).some(wt=>wt.type==="first")),Be.push(dt)),we+=1}re.push(Be)}}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 Bn({type:"first",mode:a.mode}),new vi]);ae.push(ye)}let de=0,pe=0;for(const ye of ae){pe=0;for(const we of ye){for(const Be of we)Be.parent=a,Be.parentBranch=[de,pe];pe+=1}de+=1}return a.isDirty=!0,ae}var Zi=class Ap extends Bn{constructor(y,b,E,ee={}){var re;super({type:"array"}),this.environmentName=y,this.rowGaps=E,ee.mathstyleName&&(this.mathstyleName=ee.mathstyleName),ee.columns&&(ee.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=ee.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=fs(this,b,this.colFormat),ee.leftDelim&&(this.leftDelim=ee.leftDelim),ee.rightDelim&&(this.rightDelim=ee.rightDelim),ee.arraycolsep!==void 0&&(this.arraycolsep=ee.arraycolsep),this.colSeparationType=ee.colSeparationType,ee.arraystretch!==void 0&&(this.arraystretch=ee.arraystretch),this.minColumns=(re=ee.minColumns)!=null?re:1}static fromJson(y){return new Ap(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=me(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(Du(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Du(y)?(this.isDirty=!0,(b=this.branch(y))!=null?b:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(y=>!!y.align).length}removeBranch(y){if(il(y))return super.removeBranch(y);const b=this.branch(y);return this.array[y[0]][y[1]]=void 0,b.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}get hasChildren(){return this.children.length>0}get children(){const y=[];for(const b of this.array)for(const E of b)if(E)for(const ee of E)y.push(...ee.children),y.push(ee);return[...y,...super.children]}render(y){var b,E,ee,re,ae,de;const pe=new Ea({parent:y,mathstyle:this.mathstyleName},this.style),ye=pe.getRegisterAsEm("arrayrulewidth"),we=pe.getRegisterAsEm("arraycolsep"),Be=pe.getRegisterAsEm("doublerulesep"),Xe=(E=(b=this.arraystretch)!=null?b:pe.getRegisterAsNumber("arraystretch"))!=null?E:1;let dt=typeof this.arraycolsep=="number"?this.arraycolsep:we;this.colSeparationType==="small"&&(dt=.2778*(new Ea({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const wt=Xe*hc,pn=.7*wt,ur=.3*wt;let ln=0;const Zn=[];let fr=0;const Yn=this.array.length;for(let ro=0;ro<Yn;++ro){const Lo=this.array[ro];fr=Math.max(fr,Lo.length);const Jo=new Ea({parent:pe,mathstyle:this.mathstyleName},this.style);let Ll=pn/Jo.scalingFactor,Al=ur/Jo.scalingFactor;const Tl={cells:[],height:0,depth:0,pos:0};for(const ul of Lo){const e0=(ee=Bn.createBox(Jo,ul,{type:"ignore"}))!=null?ee:new dr(null,{type:"ignore"});Al=Math.max(Al,e0.depth),Ll=Math.max(Ll,e0.height),Tl.cells.push(e0)}let Il=(re=sd(this.rowGaps[ro]))!=null?re:0;Il>0&&(Il+=ur,Al=Math.max(Al,Il),Il=0),ro<Yn-1&&!cs(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Al+=pe.getRegisterAsEm("jot")),Tl.height=Ll,Tl.depth=Al,ln+=Ll,Tl.pos=ln,ln+=Al+Il,Zn.push(Tl)}const Wr=ln/2+os,li=[];for(let ro=0;ro<fr;ro++){const Lo=[];for(const Jo of Zn){const Ll=Jo.cells[ro];Ll.depth=Jo.depth,Ll.height=Jo.height,Lo.push({box:Ll,shift:Jo.pos-Wr})}Lo.length>0&&li.push(new Qa({individualShift:Lo}))}const qr=[];let Da=!1,Ya=!1,Mr=0,Fs=!this.leftDelim;const{colFormat:kl}=this;for(const ro of kl){if("align"in ro&&Mr>=li.length)break;if("align"in ro)Da?qr.push(xo(2*dt)):(Ya||Fs)&&qr.push(xo(dt)),qr.push(new dr(li[Mr],{classes:"col-align-"+ro.align})),Mr++,Da=!0,Ya=!1,Fs=!1;else if("gap"in ro){if(typeof ro.gap=="number")qr.push(xo(ro.gap));else{const Lo=Co(y,Zn,Wr,ro.gap);Lo&&qr.push(Lo)}Da=!1,Ya=!1,Fs=!1}else if("separator"in ro){const Lo=new dr(null,{classes:"vertical-separator"});Lo.height=ln,Lo.setStyle("height",ln,"em"),Lo.setStyle("border-right",`${ye}em ${ro.separator} currentColor`),Lo.setStyle("vertical-align",-(ln-Wr),"em");let Jo=0;Ya?Jo=Be-ye:Da&&(Jo=dt-ye),Lo.left=Jo,qr.push(Lo),Da=!1,Ya=!0,Fs=!1}}Da&&!this.rightDelim&&qr.push(xo(dt));const Xs=new dr(qr,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Xs.caret=this.caret),this.bind(y,Xs);const Yo=Xs.height,zs=Xs.depth,Ms=this.bind(y,new dr([this.bind(y,kr("open",(ae=this.leftDelim)!=null?ae:".",Yo,zs,pe,{isSelected:this.isSelected})),Xs,this.bind(y,kr("close",(de=this.rightDelim)!=null?de:".",Yo,zs,pe,{isSelected:this.isSelected}))],{type:"ord"}));return Ms?(Ms.setStyle("display","inline-block"),this.caret&&(Ms.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Ms}))):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(Bn.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}}`),ca(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 Bn({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(So(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(So(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,So(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,So(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 So(a){const y=new Bn({type:"first",mode:a.mode});y.parent=a;const b=new vi;return b.parent=a,[y,b]}function xo(a){const y=new dr(null,{classes:"arraycolsep"});return y.width=a,y}function Co(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const ae=Bn.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-b}))}return new Qa({individualShift:ee}).wrap(a)}var _o=class Tp extends Bn{constructor(y){super({mode:y.mode,command:y.command,style:y.style,body:y.body,type:"box"}),this.framecolor=y.framecolor,this.backgroundcolor=y.backgroundcolor,this.padding=y.padding,this.offset=y.offset,this.border=y.border}static fromJson(y){return new Tp(y)}toJson(){return me(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=Bn.createBox(y,this.body,{type:"lift"});if(!ae)return null;const de=y.toEm((b=this.offset)!=null?b:{dimension:0});ae.depth+=de,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 pe=new Ea({parent:y},this.style),ye=pe.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),we=new dr(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=pe.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&we.setStyle("border",`${pe.getRegisterAsEm("fboxrule",2)}em solid ${(re=pe.toColor(this.framecolor))!=null?re:"black"}`),this.border&&we.setStyle("border",this.border);const Be=new dr([we,ae],{type:"lift"});return Be.setStyle("display","inline-block"),Be.setStyle("position","relative"),Be.setStyle("line-height",0),Be.height=ae.height+ye+(de>0?de:0),Be.depth=ae.depth+ye+(de<0?-de:0),Be.setStyle("padding-left",ye,"em"),Be.setStyle("padding-right",ye,"em"),Be.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*ye+Math.abs(de)))/100,"em"),Be.setStyle("margin-top",-ye,"em"),Be.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*ye-de))/100,"em"),Be.setStyle("vertical-align",Math.floor(100*(ae.depth+2*ye))/100,"em"),this.caret&&(Be.caret=this.caret),this.attachSupsub(y,{base:Be})}_serialize(y){return y.skipStyles?ca([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},Wl=class Ip extends Bn{constructor(y,b){var E;super({type:"composition",mode:(E=b==null?void 0:b.mode)!=null?E:"math",value:y})}static fromJson(y){return new Ip(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new dr(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},ys=class Dp extends Bn{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Dp(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Go=class Pp extends Bn{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=Bn.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=gr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Wa=class Op extends Bn{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 Op((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"?ca(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?ca(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):ca([!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 Ea({parent:y},this.style);console.assert(this.body!==void 0);const re=new Ea({parent:y,mathstyle:"textstyle"},this.style),ae=(b=Bn.createBox(ee,this.body,{type:"inner"}))!=null?b:new dr(null,{type:"inner"}),de=ae.height/re.scalingFactor,pe=ae.depth/re.scalingFactor,ye=[];if(this.leftDelim&&ye.push(this.bind(re,kr("open",this.leftDelim,de,pe,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&(No(ae.children,this,ee,de,pe),ye.push(ae)),this.rightDelim){let dt=this.containsCaret?" ML__contains-caret":"",wt=this.rightDelim;wt==="?"&&(ee.smartFence?(wt=this.matchingRightDelim(),dt+=" ML__smart-fence__close"):wt="."),ye.push(this.bind(re,kr("close",wt,de,pe,re,{isSelected:this.isSelected,classes:dt+" ML__close",mode:this.mode,style:this.style})))}let we=this.variant==="mleft...mright";const Be=this.leftSibling;Be&&(!we&&Be.isFunction&&(we=!0),!we&&Be.type==="subsup"&&((E=Be.leftSibling)!=null&&E.isFunction)&&(we=!0));const Xe=new dr(ye,{type:we?"close":"inner",classes:"left-right"});return Xe.setStyle("margin-top",`${-ae.depth}em`),Xe.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(Xe.caret=this.caret),this.bind(ee,Xe.wrap(ee))}};function No(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,kr("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&&No(ae.children,y,b,E,ee)}}var Ec=class Rp extends Bn{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 Rp(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=Bn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},sl=class Bp extends Bn{constructor(){super({type:"macro-argument"})}static fromJson(y){return new Bp}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},xl=class Np extends Bn{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 Np(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 Ea({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Bn.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 de=new dr(ae,{type:"ord"});de.setStyle("display","inline-block"),de.setStyle("height",ae.height+ae.depth,"em"),de.setStyle("vertical-align",-re,"em");let pe="ML__prompt ";this.locked?pe+=" ML__lockedPromptBox ":pe+=" ML__editablePromptBox ",this.correctness==="correct"?pe+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(pe+=" ML__incorrectPromptBox "),this.containsCaret&&(pe+=" ML__focusedPromptBox ");const ye=new dr(null,{classes:pe,attributes:{part:"prompt"}});ye.height=de.height+re,ye.depth=de.depth+re,ye.width=de.width+2*ee,ye.setStyle("box-sizing","border-box"),ye.setStyle("position","absolute"),ye.setStyle("height",de.height+de.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 Be=new dr([ye,de],{classes:"ML__prompt-atom"});return Be.setStyle("position","relative"),Be.setStyle("display","inline-block"),Be.setStyle("line-height",0),Be.height=de.height+re+.2,Be.depth=de.depth+re,Be.left=ee,Be.right=ee,Be.setStyle("height",de.height+re,"em"),Be.setStyle("top",de.depth-de.height,"em"),Be.setStyle("vertical-align",de.depth+re,"em"),Be.setStyle("margin-left",.5,"em"),Be.setStyle("margin-right",.5,"em"),this.caret&&(Be.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:Be}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.skipPlaceholders)return E;let ee="\\placeholder";return this.placeholderId&&(ee+=`[${this.placeholderId}]`),this.correctness==="correct"?ee+="[correct]":this.correctness==="incorrect"&&(ee+="[incorrect]"),this.locked&&(ee+="[locked]"),co(ee,E)}},Zs=class $p extends Bn{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new $p(y);for(const E of su)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new Ea({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new dr(null),ae=new dr(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(y,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Po(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Ul=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 Ea&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new Ea({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:pl(this.tokens.slice(this.index,this.index+10)),after:pl(this.tokens.slice(Math.max(0,this.index-10),this.index))},a))}get mathlist(){return this.parsingContext.mathlist}set mathlist(a){this.parsingContext.mathlist=a}get parseMode(){return this.parsingContext.parseMode}set parseMode(a){this.parsingContext.parseMode=a}get tabularMode(){return this.parsingContext.tabular}get style(){let a=this.parsingContext;for(;a;){if(a.style)return 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 Zs({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=gr(this.tokens[y],this.parseMode);return!b||b.definitionType==="symbol"||b.ifMode&&!b.ifMode.includes(this.parseMode)?!1:(a=b.infix)!=null?a:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const a=this.peek();return a!=="\\\\"&&a!=="\\cr"&&a!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var a;const y=(a=this.args)==null?void 0:a.call(this,"?");return y?Xo(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new vi({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let y=this.tokens[this.index];for(;y&&y!==a;)y=this.tokens[++this.index];y===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const y=this.index;let b=this.end(),E="";for(;!b;){const re=this.get();Po(re)?(E+=re,b=this.end()||E.length>=a.length):b=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=y),ee}scanString(){let a="";for(;!this.end();){const y=this.peek();if(y==="]")return a;if(y==="<space>")a+=" ";else if(y.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=y.substring(1);else if(Po(y))a+=y;else return a;this.next()}return a}scanBalancedString(){let a="",y=this.end(),b=1;for(;!y;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",b+=1):E==="<}>"?(b-=1,b>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,y=b===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let y="",b=1;for(;b>0&&!this.end();){const E=this.get();E==="<}>"?(b-=1,b>0&&(y+="}")):E==="<{>"?(b+=1,y+="{"):(/\\[a-zA-Z]+$/.test(y)&&/^[a-zA-Z]/.test(E)&&(y+=" "),y+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return y}scanNumber(a=!0){var y,b;let E=!1,ee=this.peek();for(;ee==="<space>"||ee==="+"||ee==="-";)this.get(),ee==="-"&&(E=!E),ee=this.peek();a=!!a;let re=10,ae=/\d/;if(this.match("'"))re=8,ae=/[0-7]/,a=!0;else if(this.match('"'))re=16,ae=/[\dA-F]/,a=!0;else if(this.match("x"))re=16,ae=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return ee=this.get(),ee?ee.length===2&&ee.startsWith("\\")?{number:(E?-1:1)*((y=ee.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=ee.codePointAt(0))!=null?b:0),base:"alpha"}:null;let de="";for(;this.hasPattern(ae);)de+=this.get();if(!a&&(this.match(".")||this.match(",")))for(de+=".";this.hasPattern(ae);)de+=this.get();const pe=a?Number.parseInt(de,re):Number.parseFloat(de);return Number.isNaN(pe)?null:{number:E?-pe:pe,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const y=this.index,b=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return b;let E=!1;if(b===null)for(;;){const re=this.peek();if(re==="-")E=!E;else if(re!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const re=this.get();return re.startsWith("\\")?b?{register:re,global:!0,factor:(E?-1:1)*b.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=y,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||b!==null?{register:ee,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:ee}:(this.index=y,null)):(this.index=y,null)}scanValue(){const a=this.scanRegister();if(a)return a;const y=this.index,b=this.scanGlueOrDimen();if(b&&("unit"in b||"glue"in b&&"unit"in b.glue))return b;this.index=y;const E=this.scanNumber();if(E)return E;if(this.end()||!Po(this.peek()))return null;const ee=this.scanString();return ee.length>0?{string:ee}:null}scanDimen(){const a=this.scanNumber(!1);if(a===null)return null;const y=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let b;return this.matchKeyword("pt")?b="pt":this.matchKeyword("mm")?b="mm":this.matchKeyword("cm")?b="cm":this.matchKeyword("ex")?b="ex":this.matchKeyword("px")?b="px":this.matchKeyword("em")?b="em":this.matchKeyword("bp")?b="bp":this.matchKeyword("dd")?b="dd":this.matchKeyword("pc")?b="pc":this.matchKeyword("in")?b="in":this.matchKeyword("mu")&&(b="mu"),b?{dimension:y,unit:b}:{dimension:y}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const y={glue:a};if(this.matchKeyword("plus")){const b=this.scanDimen();if(b)y.grow=b;else return y}if(this.skipWhitespace(),this.match("\\relax"))return y;if(this.skipWhitespace(),this.matchKeyword("minus")){const b=this.scanDimen();if(b)y.shrink=b;else return y}return!y.grow&&!y.shrink?a:y}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const y=this.get();y==="c"||y==="r"||y==="l"?a.push({align:y}):y==="|"?a.push({separator:"solid"}):y===":"?a.push({separator:"dashed"}):y==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(b=>b==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return a}scanModeSet(){let a;if(this.match("\\(")&&(a="textstyle"),!a&&this.match("\\[")&&(a="displaystyle"),!a)return null;this.beginContext({mode:"math",mathstyle:a});const y=this.scan(b=>b===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const y=this.scan(b=>b===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const y=St(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const de of y.params)if(de.isOptional)b.push(this.scanOptionalArgument(de.type));else{const pe=this.scanArgument(de.type);pe||this.onError({code:"missing-argument",arg:a}),b.push(pe)}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 de=null;this.skipWhitespace(),this.match("[")&&(de=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(de!=null?de:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(de=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(de)));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=gr(y,"math"),b&&(E=this.scanArguments(b)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return y?(console.assert(!!b),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):re=this.mathlist,this.endContext(),re}scanGroup(){const a=this.index;if(!this.match("<{>"))return null;const y=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const b=new Go(y,this.parseMode,this.style);return b.verbatimLatex=pl(this.tokens.slice(a,this.index)),b}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let a=1;for(;!this.end()&&a!==0;)this.match("(")&&(a+=1),this.match(")")&&(a-=1),a!==0&&this.parseExpression();const y=new Wa("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),y}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Po(a)&&!a.startsWith("\\"))return null;this.next();const y=gr(a,"math");return y?y.definitionType==="function"&&y.ifMode&&!y.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):y.definitionType==="symbol"&&(y.type==="mopen"||y.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(a)?a:(this.onError({code:"unexpected-delimiter",arg:a}),null):(this.onError({code:"unknown-command",arg:a}),null)}scanLeftRight(){var a;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new ys("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new ys("\\mright");let y="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;y="\\mright"}const b=this.scanDelim();if(!b)return this.onError({code:"unexpected-delimiter"}),new ys(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Wa(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const y=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?y.addChild(new Bn({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new Bn({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(ot(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),y=!a&&this.match("\\nolimits"),b=!y&&!a&&this.match("\\displaylimits");if(!a&&!y&&!b)return!1;const E=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return E===null?!1:(E.explicitSubsupPlacement=!0,a&&(E.subsupPlacement="over-under"),y&&(E.subsupPlacement="adjacent"),b&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let y;const b=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?b.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?b.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?y=ee.type.slice(0,-1):b.push(this.scanArgument(ee.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(Po(a)){const b=Ss.createAtom(this.parseMode,a,Se({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=gr(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new ys(a)];if(b.definitionType==="symbol"){const E=Se({},this.style);b.variant&&(E.variant=b.variant),y=new Bn({type:b.type,command:a,style:E,value:String.fromCodePoint(b.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(b.applyMode||b.applyStyle||b.infix)return this.onError({code:"invalid-command",arg:a}),[new ys(a)];b.createAtom&&(y=b.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return y?[y]:null}scanArgument(a){var y;this.skipFiller();const b=this.parseMode;if(a==="auto"&&(a=b),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(y=this.scanDelim())!=null?y:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==b&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}return a==="balanced-string"||console.assert(!1),null}if(a==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}return a==="string"?E=this.scanString():a==="balanced-string"?E=this.scanBalancedString():a==="colspec"?E=this.scanColspec():a==="value"&&(E=this.scanValue()),this.skipUntilToken("<}>"),E}scanOptionalArgument(a){if(a=a==="auto"?this.parseMode:a,this.skipFiller(),!this.match("["))return null;let y=null;for(;!this.end()&&!this.match("]");)if(a==="string")y=this.scanString();else if(a==="value")y=this.scanValue();else if(a==="colspec")y=this.scanColspec();else if(a==="bbox"){const b={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)b.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?b.border=ae[1]:b.backgroundcolor={string:ee}}}y=b}else a==="math"&&(this.beginContext({mode:"math"}),y=this.mathlist.concat(this.scan(b=>b==="]")),this.endContext());return y}scanSymbolOrCommand(a){var y,b,E;if(a==="\\placeholder"){const de=this.scanOptionalArgument("string"),pe=this.scanOptionalArgument("math"),ye=Bn.serialize(pe,{defaultMode:"math"});let we=[],Be;!Be&&ye==="correct"?Be="correct":!Be&&ye==="incorrect"?Be="incorrect":ye!==""&&(we=pe);const Xe=this.scanOptionalArgument("string")==="locked",dt=this.scanArgument("auto");let wt;return dt&&Array.isArray(dt)&&dt.length>0?wt=dt:dt&&typeof dt=="object"&&"group"in dt?wt=dt.group:wt=we,de?[new xl(de,Be,Xe,wt!=null?wt:we,{mode:this.parseMode,style:this.style})]:[new vi({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const de=this.index,pe=this.scanLiteralGroup()||this.next();if(!pe)return null;if(this.context.registers[pe.substring(1)]){const ye=this.scanArgument("string");ye!==null&&(this.context.registers[pe.substring(1)]=ye);const we=ca([a,pl(this.tokens.slice(de,this.index))]);return[new Bn({type:"text",value:"",verbatimLatex:we})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=gr(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(de=>new Bn({type:"text",value:de,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new ys(a)]);const ae=this.index;if(re.definitionType==="symbol"){const de=Se({},this.style);re.variant&&(de.variant=re.variant),ee=new Bn({type:re.type,command:a,style:de,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const de=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let pe,ye=[];if(re.parse?ye=re.parse(this):[pe,ye]=this.scanArguments(re),this.parseMode=de,re.applyMode&&!re.applyStyle&&!re.createAtom)return ot(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}),pe&&(ee.body=ot(this.scanArgument(pe)));else if(typeof re.applyStyle=="function"){const we=Se(Se({},this.style),re.applyStyle(a,ye,this.context)),Be=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),pe){const Xe=this.style;this.style=we;const dt=this.scanArgument(pe);return this.style=Xe,this.parseMode=Be,ot(dt)}this.style=we}else ee=new Bn({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 Bn&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const de=ca([a,pl(this.tokens.slice(ae,this.index))]);de&&(ee.verbatimLatex=de)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const de=this.scanSmartFence();if(de)return[ee,de]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Po(a)){const y=Ss.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 al(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var y;const b=this.context.getMacro(a);if(!b)return null;const E=this.index,ee=b.args,re={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let ae=1;ae<=ee;ae++){let de=this.scanLiteralGroup();if(!de){const pe=this.index;this.scanExpression(),de=pl(this.tokens.slice(pe,this.index))}re[ae]=de}return new Ec(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:pl(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:Xo(b.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let ee=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b:this.scanGroup())!=null?E:this.scanLeftRight();if(ee===null){if(this.parseSupSub()||this.parseLimits())return!0;ee=this.scanSymbolCommandOrLiteral()}return ee?(Array.isArray(ee)?this.mathlist.push(...ee):this.mathlist.push(ee),!0):!1}};function Xo(a,y){var b,E,ee,re;const ae=(b=y==null?void 0:y.args)!=null?b:void 0,de=new Ul(nl(a,ae),y==null?void 0:y.context,{args:ae,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(ee=y==null?void 0:y.parseMode)!=null?ee:"math",style:(re=y==null?void 0:y.style)!=null?re:{}}),pe=[];for(;!de.end();)pe.push(...de.scan(()=>!1));return pe}function t0(a,y){var b;const E=new Ul(nl(a,null),y==null?void 0:y.context,{mathstyle:"displaystyle",parseMode:(b=y==null?void 0:y.parseMode)!=null?b:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class Fp extends Bn{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=vo.go(or.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=Xo(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new Fp(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return me(Se({},super.toJson()),{arg:this.arg})}render(y){const b=Bn.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}};Dt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var or={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 de=or.stateMachines[y],pe=de.transitions[b]||de.transitions["*"];e:for(var ye=0;ye<pe.length;ye++){var we=or.patterns.match_(pe[ye].pattern,a);if(we){for(var Be=pe[ye].task,Xe=0;Xe<Be.action_.length;Xe++){var dt;if(de.actions[Be.action_[Xe].type_])dt=de.actions[Be.action_[Xe].type_](E,we.match_,Be.action_[Xe].option);else if(or.actions[Be.action_[Xe].type_])dt=or.actions[Be.action_[Xe].type_](E,we.match_,Be.action_[Xe].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Be.action_[Xe].type_+")"];or.concatArray(ae,dt)}if(b=Be.nextState||b,a.length>0){if(Be.revisit||(a=we.remainder),!Be.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=or.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 or.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return or.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return or.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return or.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return or.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return or.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return or.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return or.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return or.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return or.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return or.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return or.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return or.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 or.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return or.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return or.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return or.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 or.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return or.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return or.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return or.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return or.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return or.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return or.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return or.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=or.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,de,pe,ye){var we=function(ln,Zn){if(typeof Zn=="string")return ln.indexOf(Zn)!==0?null:Zn;var fr=ln.match(Zn);return fr?fr[0]:null},Be=function(ln,Zn,fr){for(var Yn=0;Zn<ln.length;){var Wr=ln.charAt(Zn),li=we(ln.substr(Zn),fr);if(li!==null&&Yn===0)return{endMatchBegin:Zn,endMatchEnd:Zn+li.length};if(Wr==="{")Yn++;else if(Wr==="}"){if(Yn===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Yn--}Zn++}return Yn>0,null},Xe=we(a,y);if(Xe===null||(a=a.substr(Xe.length),Xe=we(a,b),Xe===null))return null;var dt=Be(a,Xe.length,E||ee);if(dt===null)return null;var wt=a.substring(0,E?dt.endMatchEnd:dt.endMatchBegin);if(re||ae){var pn=this.findObserveGroups(a.substr(dt.endMatchEnd),re,ae,de,pe);if(pn===null)return null;var ur=[wt,pn.match_];return{match_:ye?ur.join(""):ur,remainder:pn.remainder}}else return{match_:wt,remainder:a.substr(dt.endMatchEnd)}},match_:function(a,y){var b=or.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return or.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 or.go(y,"text")},"{text}":function(a,y){var b=["{"];return or.concatArray(b,or.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return or.go(y,"tex-math")},"tex-math tight":function(a,y){return or.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 or.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 or.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 de=0;de<ae.action_.length;de++)typeof ae.action_[de]=="string"&&(ae.action_[de]={type_:ae.action_[de]})}else ae.action_=[];for(var pe=y.split("|"),ye=0;ye<pe.length;ye++)if(E[ee]==="*")for(var we in re)re[we].push({pattern:pe[ye],task:ae});else re[E[ee]].push({pattern:pe[ye],task:ae})}return re},stateMachines:{}};or.stateMachines={ce:{transitions:or.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 or.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 or.concatArray(b,this.output(a)),or.concatArray(b,or.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=or.patterns.match_("orbital",a.o||""),ee=or.patterns.match_("one lowercase greek letter $",a.o||""),re=or.patterns.match_("one lowercase latin letter $",a.o||""),ae=or.patterns.match_("$one lowercase latin letter$ $",a.o||""),de=y==="-"&&(E&&E.remainder===""||ee||re||ae);de&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var pe=[];return de?(or.concatArray(pe,this.output(a)),pe.push({type_:"hyphen"})):(E=or.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(or.concatArray(pe,or.actions["d="](a,y)),or.concatArray(pe,this.output(a))):(or.concatArray(pe,this.output(a)),or.concatArray(pe,or.actions.bond(a,y,"-")))),pe},"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:or.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"&&or.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:or.go(a.a,"a"),b:or.go(a.b,"bd"),p:or.go(a.p,"pq"),o:or.go(a.o,"o"),q:or.go(a.q,"pq"),d:or.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=or.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=or.go(a.rd);var re;a.rqt==="M"?re=or.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=or.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 or.concatArray(b,or.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:or.go(y[0]),p2:or.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:or.go(y[0]),p2:or.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:or.go(y[0]),p2:or.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:or.go(y[0]),p2:or.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:or.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:or.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:or.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:or.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:or.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:or.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:or.go(y[1],"pq")}}}},bd:{transitions:or.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:or.go(y[1],"bd")}}}},oxidation:{transitions:or.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:or.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:or.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:or.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:or.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]&&(or.concatArray(b,or.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?or.concatArray(b,or.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]),or.concatArray(b,or.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=or.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=or.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:or.go(a.d,"pu"),q:or.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_:"/"}),or.concatArray(y,ee.q))}else y=or.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:or.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=or.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=or.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:or.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){var b=a.text_.length%3;b===0&&(b=3);for(var E=a.text_.length-3;E>0;E-=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(0,b)),y.reverse()}else y.push(a.text_);for(var ee in a)delete a[ee];return y},"output-o":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){for(var b=a.text_.length-3,E=0;E<b;E+=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(E))}else y.push(a.text_);for(var ee in a)delete a[ee];return y}}}};var vo={go:function(a,y){if(!a)return"";for(var b="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?b+=re:(b+=vo._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&vo.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:vo._goInner(a.a),b:vo._goInner(a.b),p:vo._goInner(a.p),o:vo._goInner(a.o),q:vo._goInner(a.q),d:vo._goInner(a.d)};b.a&&(b.a.match(/^[+\-]/)&&(b.a="{"+b.a+"}"),y+=b.a+"\\,"),(b.b||b.p)&&(y+="{\\vphantom{X}}",y+="^{\\hphantom{"+(b.b||"")+"}}_{\\hphantom{"+(b.p||"")+"}}",y+="{\\vphantom{X}}",y+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(b.b||"")+"}}",y+="_{\\vphantom{2}\\llap{\\smash[t]{"+(b.p||"")+"}}}"),b.o&&(b.o.match(/^[+\-]/)&&(b.o="{"+b.o+"}"),y+=b.o),a.dType==="kv"?((b.d||b.q)&&(y+="{\\vphantom{X}}"),b.d&&(y+="^{"+b.d+"}"),b.q&&(y+="_{\\smash[t]{"+b.q+"}}")):a.dType==="oxidation"?(b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"),b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}")):(b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}"),b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"));break;case"rm":y="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),y="\\mathrm{"+a.p1+"}"):y="\\text{"+a.p1+"}";break;case"roman numeral":y="\\mathrm{"+a.p1+"}";break;case"state of aggregation":y="\\mskip2mu "+vo._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+vo._goInner(a.p1);break;case"bond":if(y=vo._getBond(a.kind_),!y)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";y="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+vo._goInner(a.p1)+"}_{"+vo._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+vo._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:vo._goInner(a.rd),rq:vo._goInner(a.rq)},ae=vo._getArrow(a.r);re.rd||re.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(ae="\\long"+ae,re.rd&&(ae="\\overset{"+re.rd+"}{"+ae+"}"),re.rq&&(a.r==="<-->"?ae="\\underset{\\lower2mu{"+re.rq+"}}{"+ae+"}":ae="\\underset{\\lower6mu{"+re.rq+"}}{"+ae+"}"),ae=" {}\\mathrel{"+ae+"}{} "):(re.rq&&(ae+="[{"+re.rq+"}]"),ae+="{"+re.rd+"}",ae=" {}\\mathrel{\\x"+ae+"}{} "):ae=" {}\\mathrel{\\long"+ae+"}{} ",y=ae;break;case"operator":y=vo._getOperator(a.kind_);break;case"1st-level escape":y=a.p1+" ";break;case"space":y=" ";break;case"entitySkip":y="~";break;case"pu-space-1":y="~";break;case"pu-space-2":y="\\mkern3mu ";break;case"1000 separator":y="\\mkern2mu ";break;case"commaDecimal":y="{,}";break;case"comma enumeration L":y="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":y="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":y="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":y="\\text{-}";break;case"addition compound":y="\\,{\\cdot}\\,";break;case"electron dot":y="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":y="{\\times}";break;case"prime":y="\\prime ";break;case"cdot":y="\\cdot ";break;case"tight cdot":y="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":y="\\times ";break;case"circa":y="{\\sim}";break;case"^":y="uparrow";break;case"v":y="downarrow";break;case"ellipsis":y="\\ldots ";break;case"/":y="/";break;case" / ":y="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return y},_getArrow:function(a){switch(a){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(a){switch(a){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(a){switch(a){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function E1(a){}function _1(a){}var r0=class zp extends Bn{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 dr(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=gr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):co(this.command,this.value)}},i0=class Kp extends Bn{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=en(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=gr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):co(this.command,this.value)}},bd=class Hp extends Bn{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=gr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ee=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){ee+="{"+Object.keys(this.notation).join(" ")+"}";let re="",ae="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(re+=ae+'mathbackground="'+this.backgroundcolor+'"',ae=","),this.shadow&&this.shadow!=="auto"&&(re+=ae+'shadow="'+this.shadow+'"',ae=","),this.strokeWidth||this.strokeStyle!=="solid"?(re+=ae+this.borderStyle,ae=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(re+=ae+'mathcolor="'+this.strokeColor+'"',ae=","),re&&(ee+=`[${re}]`)}return co(ee,this.bodyToLatex(y))}render(y){const b=new Ea({parent:y},this.style),E=Bn.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 dr(null,{classes:"ML__notation"});let de=E.height+E.depth+2*re;const pe=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 wt=.03*Math.sqrt(pe*pe+de*de)*1,pn=E.width*wt,ur=(E.depth+E.height)*wt,ln=re+E.width;let Zn=re;Zn+ur-.4*pn<0&&(Zn=.4*pn-ur),ye+='<polygon points="',ye+=`${ln},${Zn} ${ln-pn-.4*ur},${Zn+ur-.4*pn} `,ye+=`${ln-.7*pn},${Zn+.7*ur} ${ln-pn+.4*ur},${Zn+ur+.4*pn} `,ye+=`${ln},${Zn}`,ye+=`" stroke='none' fill="${this.strokeColor}"`,ye+="/>"}let we=0;if(this.notation.phasorangle){const Xe=a0(b),dt=(E.height+E.depth+2*Xe+re).toString(),wt=(E.height+E.depth)/2;ye+=this.line(re.toString(),dt,(re+wt+E.width).toString(),dt),ye+=this.line(re.toString(),dt,(re+wt).toString(),(re-Xe).toString()),de+=Xe,we=wt,E.left+=de/2-re}if(this.notation.longdiv){const Xe=a0(b);de+=Xe,ye+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const dt=.3;we=dt+Xe,E.left+=dt+Xe,E.setTop(re+Xe),ye+='<path d="',ye+=`M ${re} ${re} a${dt} ${(E.depth+E.height+2*Xe)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*Xe} "`,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*de)/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 Xe="";this.shadow==="auto"&&(Xe+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(Xe+=`filter: drop-shadow(${this.shadow})`),Xe+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,Xe+=' stroke-linecap="round"',this.svgStrokeStyle&&(Xe+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=Xe,ae.svgOverlay=ye}const Be=new dr([ae,E]);return Be.setStyle("position","relative"),Be.setStyle("vertical-align",re,"em"),Be.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),Be.setStyle("display","inline-block"),Be.height=ae.height,Be.depth=ae.depth,Be.width=ae.width-2*re,Be.left=re,Be.right=re,this.caret&&(Be.caret=this.caret),Be.wrap(b)}line(y,b,E,ee){return`<line x1="${bf(y)}" y1="${bf(b)}" x2="${bf(E)}" y2="${bf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function bf(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const y=a.match(/([0-9][a-zA-Z\%]+)/);return y===null?"1px":y[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const y=a.isDisplayStyle?el:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var _c=class Wp extends Bn{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 Ea({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new Ea({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),de=this.numerPrefix?new dr([new dr(this.numerPrefix),Bn.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(b=Bn.createBox(ae,this.above,{type:"ignore"}))!=null?b:new dr(null,{type:"ignore"}),pe=new Ea({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),ye=this.denomPrefix?new dr([new dr(this.denomPrefix),Bn.createBox(pe,this.below,{type:"ignore"})]):(E=Bn.createBox(pe,this.below,{type:"ignore"}))!=null?E:new dr(null,{type:"ignore"}),we=this.hasBarLine?re.defaultRuleThickness:0;let Be,Xe=0,dt;ee.isDisplayStyle?(Be=ae.metrics.num1,Xe=we>0?3*we:7*we,dt=pe.metrics.denom1):(we>0?(Be=ae.metrics.num2,Xe=we):(Be=ae.metrics.num3,Xe=3*re.defaultRuleThickness),dt=pe.metrics.denom2);const wt=[];this.isSelected&&wt.push("ML__selected");const pn=de.depth,ur=ye.height;let ln;if(we<=0){const qr=Be-pn-(ur-dt);qr<Xe&&(Be+=(Xe-qr)/2,dt+=(Xe-qr)/2),ln=new Qa({individualShift:[{box:de,shift:-Be,classes:[...wt,"ML__center"]},{box:ye,shift:dt,classes:[...wt,"ML__center"]}]}).wrap(ee)}else{const qr=new dr(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});qr.softWidth=Math.max(de.width,ye.width),qr.height=we/2,qr.depth=we/2;const Da=os+we/2;Be<Xe+pn+Da&&(Be=Xe+pn+Da);const Ya=os-we/2;dt<Xe+ur-Ya&&(dt=Xe+ur-Ya),ln=new Qa({individualShift:[{box:ye,shift:dt,classes:[...wt,"ML__center"]},{box:qr,shift:-Ya,classes:wt},{box:de,shift:-Be,classes:[...wt,"ML__center"]}]}).wrap(ee)}const Zn=ee.isDisplayStyle?re.delim1:re.delim2,fr=this.leftDelim?this.bind(y,Fr("open",this.leftDelim,Zn,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):zr(ee,"open");let Yn=null;this.continuousFraction?Yn=new dr(null,{type:"close"}):this.rightDelim?Yn=this.bind(y,Fr("close",this.rightDelim,Zn,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Yn=zr(ee,"close");const Wr=new dr([fr,ln,Yn],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),li=this.bind(y,Wr);return this.caret&&(li.caret=this.caret),this.attachSupsub(y,{base:li})}},ns=class Up extends Bn{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 Up(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 dr(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},xd=class Vp extends Bn{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new ns(b)),this.skipBoundary=!1}static fromJson(y){return new Vp("")}toJson(){return super.toJson()}render(y){const b=Bn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){var b,E;return(E=(b=this.body)==null?void 0:b.map(ee=>ee.value).join(""))!=null?E:""}},fh=class Zp extends Bn{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 Zp(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 dr(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:y.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-os*y.scalingFactor,ae=ee.italic;ee.setTop(re);let de=ee;if(this.superscript||this.subscript){const pe=(b=this.subsupPlacement)!=null?b:"auto";de=pe==="over-under"||pe==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(y,{base:ee})}return new dr(this.bind(y,de),{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=gr(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)),ca(E)}},Ru=class jp extends Bn{constructor(y){const b=y.body;super(me(Se({},y),{type:"overlap",body:typeof b=="string"?[new Bn({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 jp(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=Bn.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new dr([b,new dr(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},js=class Gp extends Bn{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?Os(this.svgBody):Bn.createBox(y,this.body,{type:"ignore"});const E=new Ea({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Os(this.svgAbove):this.above&&(ee=Bn.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Os(this.svgBelow):this.below&&(re=Bn.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new dr([zr(y,"open"),b,zr(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 de=new dr(y.base,{type:y.type});return de.setStyle("position","relative"),de}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 de=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Qa({bottom:de,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]})}else y.below?E=new Qa({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Qa({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]}));return new dr(E,{type:y.type})}var wd=class Xp extends Bn{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 Ea({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Bn.createBox(b,this.body,{classes:"inner"});const E=Bn.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new dr(null,{classes:"fix"});return new dr([E,ee],{classes:"rlap"}).wrap(y)}if(!this.smashHeight&&!this.smashDepth)return E;if(this.smashHeight&&(E.height=0),this.smashDepth&&(E.depth=0),E.children)for(const ee of E.children)this.smashHeight&&(ee.height=0),this.smashDepth&&(ee.depth=0);return new Qa({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},Sd=class qp extends Bn{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 qp(y)}toJson(){const y=super.toJson();return this.width!==void 0&&(y.width=this.width),this._braced&&(y.braced=!0),y}render(y){var b;if(this.command==="space")return new dr(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new dr(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 dr(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=gr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ee=(b=this.command)!=null?b:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Io(this.width)}}`:`${ee}${Io(this.width)}`}},o0=class Yp extends Bn{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 Yp(me(Se({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=gr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ee=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?co(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:co(E,ee)}get children(){if(this._children)return this._children;const y=[];if(this.above)for(const b of this.above)y.push(...b.children),y.push(b);if(this.body)for(const b of this.body)y.push(...b.children),y.push(b);return this._children=y,y}render(y){var b;const E=new Ea({parent:y,mathstyle:"cramp"},this.style),ee=(b=Bn.createBox(E,this.body,{type:"inner"}))!=null?b:new dr(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,de=y.isDisplayStyle?el:ae,pe=new dr(null,{classes:"ML__sqrt-line",style:this.style});pe.height=ae,pe.softWidth=ee.width;let ye=re*(ae+de/4);const Be=Math.max(re*2*de,ee.height+ee.depth)+ye+ae,Xe=new Ea({parent:y},this.style),dt=this.bind(Xe,new dr(Fr("inner","\\surd",Be,!1,Xe,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!dt)return null;const wt=dt.height+dt.depth-ae;wt>ee.height+ee.depth+ye&&(ye=(ye+wt-(ee.height+ee.depth))/2),dt.setTop(dt.height-ee.height-ye);const pn=this.bind(y,new Qa({firstBaseline:[{box:new dr(ee)},ye-2*ae,{box:pe},ae]})),ur=Bn.createBox(new Ea({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!ur){const fr=new dr([dt,pn],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return fr.setStyle("display","inline-block"),fr.setStyle("height",fr.height+fr.depth,"em"),this.caret&&(fr.caret=this.caret),this.bind(y,fr)}const ln=new Qa({shift:-.6*(Math.max(dt.height,pn.height)-Math.max(dt.depth,pn.depth)),children:[{box:ur}]}),Zn=new dr([new dr(ln,{classes:"ML__sqrt-index",type:"ignore"}),dt,pn],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return Zn.height=dt.height,Zn.depth=dt.depth,this.caret&&(Zn.caret=this.caret),this.bind(y,Zn)}},sm=class extends dr{constructor(a){super(null,{type:"skip"}),this._width=a}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function xf(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let ee=E-1;for(;ee>=0&&b[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){xf(a.parent,y);return}E>0&&b[E-1].type==="skip"?b[E-1].width+=y:b.splice(E,0,new sm(y))}var lm={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},um={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function cm(a){Md(a,(y,b)=>{b.type==="bin"&&(!y||/^(middle|bin|op|rel|open|punct)$/.test(y.type))&&(b.type="ord"),(y==null?void 0:y.type)==="bin"&&/^(rel|close|punct)$/.test(b.type)&&(y.type="ord"),b.type!=="ignore"&&(y=b)})}function Cd(a,y){if(!a.children)return a;const b=a.children;cm(b);const E=y.getRegisterAsEm("thinmuskip"),ee=y.getRegisterAsEm("medmuskip"),re=y.getRegisterAsEm("thickmuskip");return Md(b,(ae,de)=>{var pe,ye,we;if(!ae)return;const Be=ae.type,Xe=de.isTight?(pe=um[Be])!=null?pe:null:(ye=lm[Be])!=null?ye:null,dt=(we=Xe==null?void 0:Xe[de.type])!=null?we:null;dt===3&&xf(de,E),dt===4&&xf(de,ee),dt===5&&xf(de,re)}),a}function Md(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Md(E.children,y,b):E.type==="ignore"?Md(E.children,y):(y(b,E),Md(E.children,y),b=E);return b}var hh=class Jp extends Bn{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new Bn({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new Jp(me(Se({},y),{tooltip:du(y.tooltip)}))}toJson(){var y;const b=(y=this.tooltip.body)==null?void 0:y.filter(E=>E.type!=="first").map(E=>E.toJson());return me(Se({},super.toJson()),{tooltip:b})}render(y){const b=Bn.createBox(new Ea,this.body);if(!b)return null;const E=new Ea({parent:y,mathstyle:"displaystyle"},{fontSize:dl}),ee=gc(Cd(new dr(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new dr([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},Bu=class Qp extends Bn{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 dr(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 dr(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=gr(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)),ca(E)}};function du(a){if(Oe(a))return a.map(E=>du(E));if(typeof a=="string")return Bn.fromJson(a);a=Se({},a);for(const E of su)a[E]&&(a[E]=du(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=du(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=Zi.fromJson(a)),y==="box"&&(b=_o.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=Wl.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=bd.fromJson(a)),y==="error"&&(b=ys.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=_c.fromJson(a)),y==="group"&&(b=Go.fromJson(a)),y==="latex"&&(b=ns.fromJson(a)),y==="latexgroup"&&(b=xd.fromJson(a)),y==="leftright"&&(b=Wa.fromJson(a)),y==="macro"&&(b=Ec.fromJson(a)),y==="macro-argument"&&(b=sl.fromJson(a)),y==="operator"&&(b=Bu.fromJson(a)),y==="overlap"&&(b=Ru.fromJson(a)),y==="overunder"&&(b=js.fromJson(a)),y==="placeholder"&&(b=vi.fromJson(a)),y==="prompt"&&(b=xl.fromJson(a)),y==="phantom"&&(b=wd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=Sd.fromJson(a)),y==="subsup"&&(b=Zs.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=al.fromJson(a)),y==="tooltip"&&(b=hh.fromJson(a)),b||(console.assert(!y||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(y),`MathLive 0.98.5: an unexpected atom type "${y}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),b=Bn.fromJson(a));for(const E of su)a[E]&&b.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(b.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(b.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),a.isFunction&&(b.isFunction=!0),a.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),a.skipBoundary&&(b.skipBoundary=!0),a.captureSelection&&(b.captureSelection=!0),b}function dm(a){if(a&&Array.isArray(a))return a.map(y=>y==="<null>"?null:typeof y=="object"&&"group"in y?{group:y.group.map(b=>du(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>du(b)):y)}var s0={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},ph={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},l0=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,fm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,hm=[/^[a-z]$/,/^[A-Z]$/,l0,fm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends Ss{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,ae;if(y===null)return new Bn({type:"mord",mode:"math",command:a,value:a,style:b});const de=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const ye=new Bn({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return de&&(ye.isFunction=!0),a.startsWith("\\")&&(ye.verbatimLatex=a),ye}const pe=new Bn({type:"mord",mode:"math",command:(ae=y.command)!=null?ae:a,value:a,style:b});return de&&(pe.isFunction=!0),a.startsWith("\\")&&(pe.verbatimLatex=a),pe}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&&hm.forEach((de,pe)=>{var ye;de.test(a.value)&&pm[(ye=y.letterShapeStyle)!=null?ye:"tex"][pe]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=bn(a.value,b,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function gm(a,y){const{parent:b}=a[0],E=u0(b);return Eo(a,"variant").map(ee=>{const re=u0(ee[0]);let ae="";re&&re!==E&&(ae={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[re],console.assert(ae!==void 0));const de=ca(ee.map(pe=>pe._serialize(y)));return ae?co(ae,de):de})}function u0(a){if(!a)return"";const{style:y}=a;if(y.variant===void 0)return"";let b=y.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(y.variant)&&y.variantStyle&&y.variantStyle!=="up"&&(b+="-"+y.variantStyle),b}new mm;function vm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Eo(a,"fontShape").map(b=>{const E=vm(b,y),{fontShape:ee}=b[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${co("\\fontshape",ee)}${ca(E)}}`:re?co(re,ca(E)):ca(E)})}function bm(a,y){return Eo(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:ee}=b[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${co("\\fontseries",ee)}${ca(E)}}`:re?co(re,ca(E)):ca(E)})}function xm(a,y){return Eo(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} ${ca(re)}`:ca(re)})}function wm(a,y,b){return Eo(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,y),de=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return de?`\\${de}{${ca(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ca(ae)}}`:b?`\\text{${ca(ae)}}`:ca(ae)})}var c0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends Ss{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new al(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return wm(a,me(Se({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,ae;const{fontFamily:de}=y;if(c0[de]?a.classes+=" "+c0[de]:de&&a.setStyle("font-family",de),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 pe=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);pe&&(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=pe[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=pe[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new Sm;var Cm=class extends Ss{constructor(){super("latex")}createAtom(a){return new ns(a)}serialize(a,y){return a.filter(b=>b instanceof ns&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var 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:["","=","","="]}},mh={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},d0={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},f0={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},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:["=","=","=","="]}},_m={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},km={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Lm={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Am={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Tm={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Im={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Dm={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pm={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function h0(a){const y=a.split("+"),b={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:y.pop()};return y.includes("shift")&&(b.shift=!0),y.includes("alt")&&(b.alt=!0),y.includes("ctrl")&&(b.ctrl=!0),y.includes("cmd")&&(b.cmd=!0),y.includes("win")&&(b.win=!0),y.includes("meta")&&(b.meta=!0),b}function kc(a){let y="";return a.shift&&(y+="shift+"),a.alt&&(y+="alt+"),a.ctrl&&(y+="ctrl+"),a.cmd&&(y+="cmd+"),a.win&&(y+="win+"),a.meta&&(y+="meta+"),y+a.key}var Om={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]"},Ed=[],_d;function gh(){switch(Ee()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Ns(a){(!a.platform||a.platform===gh())&&Ed.push(a)}function Rm(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=Om[a])!=null?b:"",E}function Bm(a){if(a.code)return a;const y=Object.entries(kd().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,de]of y)if(de[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 Nm(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 Ed)((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);Ed.sort((ee,re)=>re.score-ee.score)}function $m(a){_d=Ed.find(y=>a.startsWith(y.locale))}function kd(){return _d!=null?_d:Ed[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(gh()){case"apple":Ns(mh),Ns(Em),Ns(Im),Ns(Lm);break;case"windows":Ns(d0),Ns(_m),Ns(Dm),Ns(Am);break;case"linux":Ns(f0),Ns(km),Ns(Pm),Ns(Tm);break}Ns(Mm);function vh(a){var y;const b=/macos|ios/.test(Ee()),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 wf(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 Nu(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 Sf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Cf(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var wl=class Gl{static get scrim(){return Gl._scrim||(Gl._scrim=new Gl),Gl._scrim}static open(y){Gl.scrim.open(y)}static close(){Gl.scrim.close()}static get state(){return Gl.scrim.state}static get element(){return Gl.scrim.element}constructor(y){var b,E;this.lightDismiss=(b=y==null?void 0:y.lightDismiss)!=null?b:!0,this.translucent=(E=y==null?void 0:y.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const y=document.createElement("div");return y.setAttribute("role","presentation"),y.style.position="fixed",y.style.contain="content",y.style.top="0",y.style.left="0",y.style.right="0",y.style.bottom="0",y.style.zIndex="var(--scrim-zindex, 10099)",y.style.outline="none",this.translucent?(y.style.background="rgba(255, 255, 255, .2)",y.style.backdropFilter="contrast(40%)"):y.style.background="transparent",this._element=y,y}open(y){var b;if(this.state!=="closed")return;this.state="opening",this.onDismiss=y==null?void 0:y.onDismiss,this.savedActiveElement=Cf();const{element:E}=this;((b=y==null?void 0:y.root)!=null?b:document.body).appendChild(E),E.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const ee=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const re=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${re+ee}px`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,E,ee;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:re}=this;re.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),re.remove(),document.body.style.overflow=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Cf()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(y){this.lightDismiss&&(y.target===this._element&&y.type==="click"?(this.close(),y.preventDefault(),y.stopPropagation()):y.target===document&&(y.type==="touchmove"||y.type==="scroll")&&(this.close(),y.preventDefault(),y.stopPropagation()))}};function Hm(a,y,b){let E=null,ee=null,re=!1,ae=!1,de=!1;const pe=new AbortController,ye=pe.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 Be;if(!re&&(a.textContent="",we.inputType!=="insertCompositionText")){if(we.inputType==="insertFromPaste"){we.preventDefault(),we.stopPropagation();return}b.onInput((Be=we.data)!=null?Be:""),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 Be,Xe;if(((Xe=(Be=we.relatedTarget)==null?void 0:Be._mathfield)==null?void 0:Xe.element)===y){a.focus({preventScroll:!0}),we.preventDefault(),we.stopPropagation();return}const dt=wl.state;if(dt==="open"||dt==="opening"){we.preventDefault(),we.stopPropagation();return}if(we.relatedTarget===we.target.getRootNode().host){we.preventDefault(),we.stopPropagation();return}de||ae||(de=!0,E=null,ee=null,b.onBlur(),de=!1)},{capture:!0,signal:ye}),a.addEventListener("focus",we=>{de||ae||(ae=!0,b.onFocus(),ae=!1)},{capture:!0,signal:ye}),{dispose:()=>pe.abort(),cancelComposition:()=>{re&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!ae&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Cf()===a,setAriaLabel:we=>a.setAttribute("aria-label",we),setValue:we=>{var Be;a.textContent=we,a.style.left="-1000px",(Be=window.getSelection())==null||Be.selectAllChildren(a)},moveTo:(we,Be)=>{a.style.top=`${Be}px`,a.style.left=`${we}px`}}}function Lc(a){var y;if(!a||!Sf(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=Bm(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(nt()){const y=Ee(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Um(a,y,b){if(a.length===0)return"";const E=kc(h0(p0(b))),ee=kc({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(Ee()),cmd:!1,win:!1});for(let re=a.length-1;re>=0;re--)if((a[re].key===E||a[re].key===ee)&&(!a[re].ifMode||a[re].ifMode===y))return a[re].command;return""}function m0(a){let y=a;return Oe(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function Vm(a,y){let b=[];if(typeof y=="string"){const re=hd[y];Oe(re)?b=re.slice():re&&b.push(re)}const E=m0(y),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&b.push(re.key);return b.map(vh)}function Zm(a,y){if(a.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(a.ifPlatform))throw new Error(`Unexpected platform "${a.ifPlatform}" for keybinding ${a.key}`);if(a.ifLayout!==void 0&&(y.score===0||!a.ifLayout.includes(y.id)))return;const b=h0(a.key);let E=a.ifPlatform;if(b.cmd){if(E&&E!=="macos"&&E!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+E+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);E||(E=Ee()==="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:kc(b)});const ee=Rm(b.key,y);if(!ee)return me(Se({},a),{key:kc(b)});if(ee.shift&&b.shift||ee.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yh(a.command)}) is conflicting with the key combination ${kc(ee)} using the ${y.displayName} keyboard layout`);return ee.shift=ee.shift||b.shift,ee.alt=ee.alt||b.alt,ee.meta=b.meta,ee.ctrl=b.ctrl,me(Se({},a),{key:kc(ee)})}function yh(a){if(Array.isArray(a)){const y=[...a];return y.shift()+"("+y.map(b=>typeof b=="string"?`"${b}"`:b.toString()).join(", ")+")"}return a}function jm(a,y){const b=[],E=[];for(const ee of a)try{const re=Zm(ee,y);if(!re)continue;const ae=E.find(de=>de.key===re.key&&de.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${yh(ee.command)}) matches ${ae.key} (${yh(ae.command)}) with the ${y.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&b.push(re.message)}return[E,b]}var Gm=class extends Hi{constructor(){super("latex")}createAtom(a){return new ns(a)}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("application/x-latex")||y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Mo(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(jo(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 pe of y)se.test(pe)&&re.push(new ns(pe));let ae=a.at(a.position);if(ae instanceof xd&&(ae=ae.lastChild),!(ae.parent instanceof xd)){const pe=new xd("");ae.parent.addChildAfter(pe,ae),ae=pe.firstChild}const de=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(de)):de&&(a.position=a.offsetOf(de))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function Ld(a){var y,b;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(ee=>ee.type==="latex"))!=null?b:[]:[]}function g0(a,y){var b;let E=0,ee=!1;const re=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=re&&!ee;){const pe=a.at(E);ee=pe instanceof ns&&pe.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,de=!1;for(;ae<=re&&!de;){const pe=a.at(ae);de=!(pe instanceof ns&&pe.isSuggestion),de||ae++}return[E-1,ae-1]}new Gm;function Mf(a){const y=Ld(a.model).filter(b=>b.isSuggestion);if(y.length!==0){a.model.position=a.model.offsetOf(y[0].leftSibling);for(const b of y)b.parent.removeChild(b)}}function Ad(a,y){var b;const{model:E}=a;Mf(a);for(const we of Ld(E))we.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Tc(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof ns&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(we=>we.value).join(""),de=Tt(a,ae);if(de.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const we of ee)we.isError=!0;Tc(a);return}const pe=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=pe<0?de.length-1:pe%de.length;const ye=de[a.suggestionIndex];if(ye!==ae){const we=ee[ee.length-1];we.parent.addChildrenAfter([...ye.slice(ae.length-ye.length)].map(Be=>new ns(Be,{isSuggestion:!0})),we),$u(a,{interactive:!0})}Ym(a,de)}function v0(a){const[y,b]=g0(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function Ac(a,y="accept",b){var E,ee;Tc(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const ye=Ld(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 de=Ld(a.model).filter(ye=>!ye.isSuggestion).map(ye=>ye.value).join(""),pe=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(pe),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(Hi.insert(a.model,de,{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 Ef(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function qm(a,y){const b=new Ea({from:a.context}),E=new Bn({mode:"math",type:"root",body:Xo(y,{context:b})}),ee=gc(Cd(new dr(E.render(b),{classes:"ML__base"}),b));return vc(ee,{classes:"ML__latex"}).toMarkup()}function Ym(a,y){var b;if(y.length===0){Tc(a);return}let E="";for(const[re,ae]of y.entries()){const de=ae,pe=qm(a,ae),ye=Vm(a.keybindings,de).join("<br>");E+=`<li role="button" data-command="${de}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${de}</span><span class="ML__popover__command">${pe}</span>`,ye&&(E+=`<span class="ML__popover__keybinding">${ye}</span>`),E+="</li>"}const ee=Jm(a,`<ul>${E}</ul>`);xh()&&((b=ee.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xh()&&(ee.classList.add("is-visible"),_f(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xh(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function _f(a,y){var b;if(!a.element||a.element.mathfield!==a||!xh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){Tc(a);return}if(y!=null&&y.deferred){setTimeout(()=>_f(a),32);return}const E=bl(a.field);if(!E)return;const ee=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,re=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ae=window.innerWidth-document.documentElement.clientWidth,de=window.innerHeight-document.documentElement.clientHeight,pe=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-de-pe-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 Tc(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function Jm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Ef("mathlive-suggestion-popover"),ks("suggestion-popover"),ks("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Ac(a,"reject"),Hi.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),b.innerHTML=window.MathfieldElement.createHTML(y),b}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(bh("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function eg(){const a=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(a.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let y=a[1],b=y.match(/http.*\.ts[\?:]/);return b&&(y=a[2]),b=y.match(/(https?:.*):[0-9]+:[0-9]+/),b||(b=y.match(/at (.*(\.ts))[\?:]/),b||(b=y.match(/at (.*(\.mjs|\.js))[\?:]/))),b?b[1]:(console.error(a),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${y}").`),"")}var kf=null,y0,b0,wh=((b0=(y0=globalThis==null?void 0:globalThis.document)==null?void 0:y0.currentScript)==null?void 0:b0.src)||eg();function x0(a){return gu(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(kf===null)try{const y=yield fetch(wh,{method:"HEAD"});y.status===200&&(kf=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${wh}")`)}return new URL(a,kf!=null?kf:wh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var $s="not-loaded";function ng(){return gu(this,null,function*(){return $s="not-loaded",Lf()})}function Lf(){return gu(this,null,function*(){var a;if($s!=="not-loaded")return;if($s="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){$s="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const b=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],E=Array.from(document.fonts).map(ae=>ae.family);if(b.every(ae=>E.includes(ae))){$s="ready";return}if(!window.MathfieldElement.fontsDirectory){$s="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),$s="error";return}const re=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(ae=>tg(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(de=>{try{return de.load()}catch(pe){}}))).forEach(de=>document.fonts.add(de)),$s="ready";return}catch(ae){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${ee}"`,{cause:ae}),document.body.classList.add("ML__fonts-did-not-load")}$s="error"}})}function rg(a){let y=0;for(let b=0;b<a.length;b++)y=y*31+a.charCodeAt(b),y=y|0;return Math.abs(y)}function Mo(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Rs(a)&&a.dirty&&(a.atomBoundsCache=new Map,$u(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new Ea({from:me(Se({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(Bn.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(b=y.forHighlighting)!=null?b:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return vc(Cd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function 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 $u(a,y){if(!Rs(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 de=a.element.querySelector("[part=menu-toggle]");if(de&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?de.style.display="none":de.style.display=""),a.model.atoms.length<=1){const pe=a.options.contentPlaceholder;pe&&(ae+=`<span part=placeholder class="ML__content-placeholder">${qo(pe)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Af(a,y.interactive),a.dirty=!1}function Af(a,y){const b=a.field;if(!b)return;for(const de of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))de.remove();!(y!=null&&y)&&$s!=="error"&&$s!=="ready"&&setTimeout(()=>{$s==="ready"?Af(a):setTimeout(()=>Af(a),128)},32);const E=a.model,ee=b.offsetWidth,re=b.getBoundingClientRect().width;let ae=Math.floor(re)/ee;if(ae=isNaN(ae)?1:ae,E.selectionIsCollapsed){_f(a,{deferred:!0});let de=E.at(E.position);for(;de&&de.type!=="prompt"&&!(de.containsCaret&&de.displayContainsHighlight);)de=de.parent;if(de!=null&&de.containsCaret&&de.displayContainsHighlight){const pe=md(a,lu(a,de),ae);if(pe){pe.left/=ae,pe.right/=ae,pe.top/=ae,pe.bottom/=ae;const ye=document.createElement("div");ye.classList.add("ML__contains-highlight"),ye.style.position="absolute",ye.style.left=`${pe.left+1}px`,ye.style.top=`${Math.ceil(pe.top)}px`,ye.style.width=`${Math.ceil(pe.right-pe.left)}px`,ye.style.height=`${Math.ceil(pe.bottom-pe.top)}px`,b.insertBefore(ye,b.childNodes[0])}}return}for(const de of ag(vd(a,{excludeAtomsWithBackground:!0}))){de.left/=ae,de.right/=ae,de.top/=ae,de.bottom/=ae;const pe=document.createElement("div");pe.classList.add("ML__selection"),pe.style.position="absolute",pe.style.left=`${de.left}px`,pe.style.top=`${de.top}px`,pe.style.width=`${Math.ceil(de.right-de.left)}px`,pe.style.height=`${Math.ceil(de.bottom-de.top-1)}px`,b.insertBefore(pe,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,Sl;function Ls(a,y){y=Se({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Sl||(Sl={});for(const b of Object.keys(a))console.assert(!Sl[b],"Selector already defined: ",b),Sl[b]=me(Se({},y),{fn:a[b]})}function Sh(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sh(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Sl[y]}function Ic(a){var y;return(y=Sh(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,ae=!1;Oe(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,ye=>ye[1].toUpperCase());const de=Sl[E],pe=de==null?void 0:de.target;if(pe==="model"){if(!a.isSelectionEditable&&(de!=null&&de.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Mf(a),Sl[E].fn(a.model,...ee),Ad(a),ae=!0,re=!0}else if(pe==="virtual-keyboard")ae=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(Sl[E]){if(!a.isSelectionEditable&&(de!=null&&de.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=Sl[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return pe!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||de!=null&&de.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),de!=null&&de.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&Mo(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&Je()&&navigator.vibrate(S0);const E=Sh(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}Ls({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return Ad(a,{atIndex:a.suggestionIndex+1}),!1}function ug(a){return Ad(a,{atIndex:a.suggestionIndex-1}),!1}Ls({complete:Ac},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ls({nextSuggestion:lg,previousSuggestion:ug},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Tf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Tf}var cg=class em{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new em),this._singleton}set alphabeticLayout(y){this.sendMessage("update-setting",{alphabeticLayout:y})}set layouts(y){this.sendMessage("update-setting",{layouts:y})}get normalizedLayouts(){return[]}set editToolbar(y){this.sendMessage("update-setting",{editToolbar:y})}set actionKeycap(y){this.sendMessage("update-setting",{actionKeycap:y})}set shiftKeycap(y){this.sendMessage("update-setting",{shiftKeycap:y})}set backspaceKeycap(y){this.sendMessage("update-setting",{backspaceKeycap:y})}set tabKeycap(y){this.sendMessage("update-setting",{tabKeycap:y})}set container(y){throw new Error("Container inside an iframe cannot be changed")}show(y){this.sendMessage("show",y)}hide(y){this.sendMessage("hide",y)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(y){y?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(y){return this.sendMessage("execute-command",{command:y}),!0}updateToolbar(y){this.sendMessage("update-toolbar",y)}update(y){this.sendMessage("update-setting",y)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");this.handleMessage(y.data)}}handleMessage(y){const{action:b}=y;if(b==="execute-command"){const{command:E}=y;Ic(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(b==="synchronize-proxy"){this._boundingRect=y.boundingRect,this._isShifted=y.isShifted;return}if(b==="geometry-changed"){this._boundingRect=y.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(y,b={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(Se({type:Tf,action:y},b),this.targetOrigin)}},C0={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
|
|
|
.minimalist-backdrop {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
.minimalist-container {
|
|
|
--keycap-height: 40px;
|
|
|
--keycap-max-width: 53px;
|
|
|
--keycap-small-font-size: 12px;
|
|
|
background: var(--keyboard-background);
|
|
|
padding: 20px;
|
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
|
border: 1px solid var(--keyboard-border);
|
|
|
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
|
|
|
}
|
|
|
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},If={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},Td;function M0(a,y){var b,E,ee;const re=fu.singleton;if(!re)return;const ae=Dc(a),de=(E=(b=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:b.variants)!=null?E:"";if(typeof de=="string"&&!E0(de)||Array.isArray(de)&&de.length===0){y==null||y();return}const pe={};let ye="";for(const pn of fg(de)){const ur=k0(pn),ln=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);pe[ln]=ur;const[Zn,fr]=Df(ur);ye+=`<div id=${ln} class="item ${fr}">${Zn}</div>`}const we=document.createElement("div");we.setAttribute("aria-hidden","true"),we.className="MLK__variant-panel",we.style.height="auto";const Be=Object.keys(pe).length;let Xe=5;Be===1?Xe=1:Be===2||Be===4?Xe=2:Be===3||Be===5||Be===6?Xe=3:Be>=7&&Be<14&&(Xe=4),we.style.width=`calc(var(--variant-keycap-length) * ${Xe} + 12px)`,we.innerHTML=vp.createHTML(ye),wl.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:we}),Td=new AbortController;const{signal:dt}=Td,wt=a==null?void 0:a.getBoundingClientRect();if(wt){wt.top-we.clientHeight<0&&(we.style.width="auto",Be<=6?we.style.height="56px":Be<=12?we.style.height="108px":Be<=18?we.style.height="205px":we.classList.add("compact"));const pn=Math.max(0,Math.min(window.innerWidth-we.offsetWidth,(wt.left+wt.right-we.offsetWidth)/2)),ur=wt.top-we.clientHeight+5;we.style.transform=`translate(${pn}px, ${ur}px)`,we.classList.add("is-visible"),requestAnimationFrame(()=>{we.addEventListener("pointerup",ln=>{const Zn=Dc(ln.target);!(Zn!=null&&Zn.id)||!pe[Zn.id]||(Mh(pe[Zn.id]),Id(),y==null||y(),ln.preventDefault())},{capture:!0,passive:!1,signal:dt}),we.addEventListener("pointerenter",ln=>{const Zn=Dc(ln.target);!(Zn!=null&&Zn.id)||!pe[Zn.id]||Zn.classList.add("is-active")},{capture:!0,signal:dt}),we.addEventListener("pointerleave",ln=>{const Zn=Dc(ln.target);!(Zn!=null&&Zn.id)||!pe[Zn.id]||Zn.classList.remove("is-active")},{capture:!0,signal:dt}),window.addEventListener("pointercancel",()=>{Id(),y==null||y()},{signal:dt}),window.addEventListener("pointerup",()=>{Id(),y==null||y()},{signal:dt})})}}function Id(){Td==null||Td.abort(),Td=null,wl.state==="open"&&wl.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(je))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+je[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(We))y.push({class:"swatch-button",label:'<span style="background:'+We[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function E0(a){return If[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(If[a]||(If[a]=(y=dg(a))!=null?y:[]),If[a])}function hg(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pg(a){return Object.keys(a).map(y=>`${y} {${hg(a[y])}}`).join("")}function Dd(a){if(!a)return"";const y=new Ea,b=new Bn({mode:"math",type:"root",body:Xo(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=gc(Cd(new dr(b.render(y),{classes:"ML__base"}),y));return vc(E,{classes:"ML__latex"}).toMarkup()}function Pd(a){var y;if(Array.isArray(a))return a.map(E=>Pd(E)).flat();const b=typeof a=="string"?{markup:a}:a;return"rows"in b&&Array.isArray(b.rows)&&(b.rows=b.rows.map(E=>E.map(ee=>k0(ee)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mg(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const de=kd();de&&(E=de.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Ye.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 de of re){const pe=[];for(const ye of de)/[a-z]/.test(ye)?pe.push({label:ye,class:"hide-shift",shift:{label:ye.toUpperCase()},variants:E0(ye)?ye:void 0}):ye==="~"?E!=="dvorak"?pe.push("[backspace]"):pe.push({label:"[backspace]",width:1}):ye==="^"?pe.push("[shift]"):ye===" "&&pe.push("[separator-5]");ae.push(pe)}return ae.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Pd({rows:ae})}}function _0(a){if(a==="alphabetic")return mg();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),_0(C0[a]);let y;if("rows"in a&&Array.isArray(a.rows)){console.assert(!("layers"in a||"markup"in a),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const ee=a,{rows:re}=ee,ae=at(ee,["rows"]);y=me(Se({},ae),{layers:Pd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=at(ee,["markup"]);y=me(Se({},ae),{layers:Pd(a.markup)})}else y=Se({},a),"layers"in a?y.layers=Pd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let b=!1,E=!1;for(const ee of y.layers)if(ee.rows)for(const re of ee.rows.flat()){Pc(re)&&(b=!0);const ae=re.command;typeof ae=="string"&&["undo","redo","cut","copy","paste"].includes(ae)&&(E=!0)}return(!("displayShiftedKeycaps"in a)||a.displayShiftedKeycaps===void 0)&&(y.displayShiftedKeycaps=b),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(y.displayEditToolbar=!E),y}function gg(a,y){var b,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const de=ae,pe=[re===y?"selected":"layer-switch"];de.tooltip&&pe.push("MLK__tooltip"),de.labelClass&&pe.push(...de.labelClass.split(" ")),ee+=`<div class="${pe.join(" ")}"`,de.tooltip&&(ee+=" data-tooltip='"+((b=lt(de.tooltip))!=null?b:de.tooltip)+"' "),re!==y&&(ee+=`data-layer="${de.layers[0].id}"`),ee+=`>${(E=de.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='${lt("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${lt("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${lt("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${lt("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${lt("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return b+=ee.map(ae=>re[ae]).join(""),b}function yg(a){for(const y of a)bg(y)}function bg(a){const y=fu.singleton;if(!y)return;const b={};if(!a.id){if(a.hasAttribute("data-label")&&(b.label=a.dataset.label),a.hasAttribute("data-latex")&&(b.latex=a.dataset.latex),a.hasAttribute("data-key")&&(b.key=a.dataset.key),a.hasAttribute("data-insert")&&(b.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(b.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(b.aside=a.dataset.aside),a.className&&(b.class=a.className),!b.label&&!b.latex&&!b.key&&!b.insert&&(b.latex=a.innerText,b.label=a.innerHTML),a.hasAttribute("data-command"))try{b.command=JSON.parse(a.dataset.command)}catch(E){}a.id=y.registerKeycap(b)}if(!a.innerHTML){const[E,ee]=Df(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){ks("virtual-keyboard"),ks("core"),Lf()}function 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,de)=>Mg(a,ae,de)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",_g,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",de=>{var pe,ye;let we=de.target,Be="";for(;we&&!Be;)Be=(pe=we==null?void 0:we.getAttribute("data-command"))!=null?pe:"",we=(ye=we==null?void 0:we.parentElement)!=null?ye:null;Be&&a.executeCommand(JSON.parse(Be))});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",de=>de.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,de]=Df(ee);/(^|\s)separator/.test(de)?b+=`<div class="${de}"`:b+=`<div tabindex="-1" id="${re}" class="${de}"`,ee.tooltip&&(b+=` data-tooltip="${ee.tooltip}"`),b+=`>${ae}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Df(a,y={shifted:!1}){var b,E,ee,re,ae,de,pe;let ye="",we=(b=a.class)!=null?b:"";if(y.shifted&&Pc(a)&&(we+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?ye=Dd(a.shift):typeof a.shift=="object"&&(ye=a.shift.label?a.shift.label:(E=Dd(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=Dd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let Be;typeof a.shift=="string"?Be=Dd(a.shift):a.shift.label?Be=a.shift.label:Be=(de=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?de:"",ye+=`<span class="MLK__shift">${Be}</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+=(pe={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?pe:""),[ye,we||"MLK__keycap"]}var Fu={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function k0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Fu[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Fu[a.label]&&(b=me(Se(Se({},Fu[a.label]),a),{label:Fu[a.label].label})),"key"in a&&a.key&&Fu[a.key]&&(b=me(Se(Se({},Fu[a.key]),a),{key:Fu[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=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 Od;function _g(a){var y;if(a.button!==0)return;const b=fu.singleton;if(!b)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){b.currentLayer=(y=E.getAttribute("data-layer"))!=null?y:"",a.preventDefault();return}const ee=Dc(a.target);if(!(ee!=null&&ee.id))return;const re=b.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const ae=new AbortController,de=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Pf(ae),{capture:!0,signal:de}),ee.addEventListener("pointerleave",Pf(ae),{capture:!0,signal:de}),ee.addEventListener("pointercancel",Pf(ae),{signal:de}),ee.addEventListener("pointerup",Pf(ae),{signal:de}),Pc(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(Od&&clearTimeout(Od),Od=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 Pf(a){return y=>{const b=Dc(y.target);if(!(b!=null&&b.id))return;const E=fu.singleton;if(!E)return;const ee=E.getKeycap(b.id);if(ee){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),Pc(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted)),a.abort();return}if(y.type==="pointerleave"&&y.target===b){b.classList.remove("is-pressed"),Pc(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){Od&&clearTimeout(Od),Pc(ee)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.classList.remove("is-pressed"),E.isShifted&&ee.shift?typeof ee.shift=="string"?E.executeCommand(["insert",ee.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Mh(ee.shift):Mh(ee),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function Mh(a){var y;let b=a.command;!b&&a.insert&&(b=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!b&&a.key&&(b=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!b&&a.latex&&(b=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),b||(b=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(y=fu.singleton)==null||y.executeCommand(b)}function kg(a){if(a.nodeType!==1)return!1;const y=a.classList;return y.contains("MLK__keycap")||y.contains("shift")||y.contains("action")||y.contains("fnbutton")||y.contains("bigfnbutton")}function Dc(a){if(!a)return;let y=a;for(;y&&!kg(y);)y=y.parentElement;return y!=null?y:void 0}function Pc(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var fu=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var y,b,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(b=(y=window.document)==null?void 0:y.body)!=null?b:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(ee=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(E=window.top)==null||E.addEventListener("message",this)}catch(ee){window.addEventListener("message",this)}document.body.addEventListener("focusin",ee=>{const re=ee.target;re!=null&&re.isConnected&&setTimeout(()=>{const ae=L0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&&rt()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{L0()||this.hide()},300)})}get currentLayer(){var y,b,E;return(E=(b=(y=this._element)==null?void 0:y.querySelector(".MLK__layer.is-visible"))==null?void 0:b.id)!=null?E:""}set currentLayer(y){var b;if(!this._element){this.latentLayer=y;return}let E=y?this._element.querySelector(`#${y}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((b=this._element.querySelector(".MLK__layer.is-visible"))==null||b.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(y){var b;this._shiftPressCount=y>2||y<0?0:y,(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(y){const b="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[b]=y,b}getKeycap(y){return y?this.keycapRegistry[y]:void 0}getLayer(y){const b=this.normalizedLayouts;for(const E of b)for(const ee of E.layers)if(ee.id===y)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(y){this._alphabeticLayout=y,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(y){this._actionKeycap=typeof y=="string"?{label:y}:y}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(y){this._shiftKeycap=typeof y=="string"?{label:y}:y}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(y){this._backspaceKeycap=typeof y=="string"?{label:y}:y}get tabKeycap(){return this._tabKeycap}set tabKeycap(y){this._tabKeycap=typeof y=="string"?{label:y}:y}get layouts(){return this._layouts}set layouts(y){this.updateNormalizedLayouts(y),this.rebuild()}updateNormalizedLayouts(y){const b=Array.isArray(y)?[...y]:[y],E=b.findIndex(ee=>ee==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(ee=>_0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(y){this._editToolbar=y,this.rebuild()}get container(){return this._container}set container(y){this._container=y,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(y){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}get element(){return this._element}set element(y){var b;this._element!==y&&((b=this._element)==null||b.remove(),this._element=y)}get visible(){return this._visible}set visible(y){y?this.show():this.hide()}get boundingRect(){var y;if(!this._visible)return new DOMRect;const b=(y=this._element)==null?void 0:y.getElementsByClassName("MLK__plate")[0];return b?b.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var y,b;const E=this.boundingRect.height;if(this.container===document.body){(y=this._element)==null||y.style.setProperty("--_keyboard-height",`calc(${E}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const ee=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${ee}px)`:`${ee}px`}else(b=this._element)==null||b.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const y=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=y,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const y=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(y&&(y.backdrop||y.container)));const b=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(b)for(const E of b){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=Df(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(y){var b;if(this._visible)return;const E=this.container;if(E&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const ee=this._element.getElementsByClassName("MLK__plate")[0];if(ee&&this.observer.observe(ee),E===window.document.body){const re=E.style.paddingBottom;this.originalContainerBottomPadding=re;const ae=ee.offsetHeight-1;E.style.paddingBottom=re?`calc(${re} + ${ae}px)`:`${ae}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,y!=null&&y.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var ee;return(ee=this._element)==null?void 0:ee.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(y){var b;const E=this.container;if(E&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const ee=this._element.getElementsByClassName("MLK__plate")[0];ee&&this.observer.unobserve(ee),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),Id(),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(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");y.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:y.data.action!=="update-setting"&&y.data.action!=="proxy-created"&&y.data.action!=="execute-command"&&(console.assert(y.source!==void 0),this.connectedMathfieldWindow=y.source),this.handleMessage(y.data,y.source)}if(this._element)switch(y.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":y.button!==2&&y.preventDefault();break;case"keydown":{y.key==="Shift"&&!y.repeat&&(this.shiftPressCount=1);break}case"keyup":{(y.key==="Shift"||!y.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(y,b){const{action:E}=y;if(E==="execute-command"){const{command:ee}=y,re=Ic(ee);if(window.top!==void 0&&re!=="virtual-keyboard")return;this.executeCommand(ee);return}if((E==="connect"||E==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b),E!=="disconnect"&&window===window.top){if(E==="show"){typeof y.animate!="undefined"?this.show({animate:y.animate}):this.show();return}if(E==="hide"){typeof y.animate!="undefined"?this.hide({animate:y.animate}):this.hide();return}if(E==="update-setting"){y.alphabeticLayout&&(this.alphabeticLayout=y.alphabeticLayout),y.layouts&&(this.layouts=y.layouts),y.editToolbar&&(this.editToolbar=y.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b);return}}}sendMessage(y,b,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:Se({type:Tf,action:y},b)}));return}if(E)E.postMessage(Se({type:Tf,action:y},b),{targetOrigin:this.targetOrigin});else if(b.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:b.command})),y==="execute-command"&&Array.isArray(b.command)&&b.command[0]==="insert"){const ee=b.command[1].split("");for(const re of ee)this.dispatchEvent(new KeyboardEvent("keydown",{key:re,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:re,bubbles:!0}))}}stateWillChange(y){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:y},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(y){const b=this._element;if(!b)return;b.classList.toggle("is-math-mode",y.mode==="math"),b.classList.toggle("is-text-mode",y.mode==="text"),b.classList.toggle("can-undo",y.canUndo),b.classList.toggle("can-redo",y.canRedo),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-paste",!0);const E=b.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=vg(this,y)}update(y){this._style=y.style,this.updateToolbar(y)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(y){let b,E=[],ee=Ic(y);return Oe(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Ic(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Sl[b].fn(void 0,...E):(this.sendMessage("execute-command",{command:y}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function L0(){var a,y;let b=Cf(),E=null;for(;b;){if("host"in b&&((y=(a=b.host)==null?void 0:a.tagName)==null?void 0:y.toLowerCase())==="math-field"){E=b.host;break}b=b.parentNode}return E}if(nt()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=fu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>cg.singleton,configurable:!0});function Of(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(Oe(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(de=>parseInt(de.trim()));y.scriptDepth=[re,ae]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let ee=a.mathVirtualKeyboardPolicy.toLowerCase();if(ee==="sandboxed"){if(window!==window.top){const re=fu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?Ye.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=kn(a.macros);break;default:Oe(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 zu(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const ee of b)a[ee]===null?E[ee]=null:Oe(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=Se({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Rf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:At,backgroundColorMap:Qe,letterShapeStyle:Ye.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:a=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(a),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:lh,inlineShortcuts:ff,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sh,value:""}}function A0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function hu(a,y){!a||!y||(Oe(a)?a.forEach(b=>hu(b,y)):typeof a=="object"&&!a.style.color&&!a.style.backgroundColor&&!a.style.fontFamily&&!a.style.fontShape&&!a.style.fontSeries&&!a.style.fontSize&&!a.style.variant&&!a.style.variantStyle&&(a.applyStyle(y),hu(a.body,y),hu(a.above,y),hu(a.below,y),hu(a.subscript,y),hu(a.superscript,y)))}function Eh(a,y,b,E){function ee(ae,de){for(const pe of re)if(pe.style[ae]!==de)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const re=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&ee("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&ee("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&ee("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&ee("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&ee("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&ee("fontSize",b.fontSize)&&(b.fontSize=dl),b.variant&&ee("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ee("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const ae of re)ae.applyStyle(b);return!0}function Lg(a,y){const b=a.at(a.position);if(b.type==="composition")b.value=y;else{const{caret:E}=b;b.caret=void 0;const ee=new Wl(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Ag(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}Gn(["math","displaymath"],Gs),Gn("center",Gs),Dt("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 Zi("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),ar("array","{columns:colspec}",(a,y,b,E)=>new Zi(a,_h(y),b,{columns:E[0],mathstyleName:"textstyle"})),ar(["equation","equation*","subequations"],"",(a,y,b)=>new Zi(a,_h(y),b,{columns:[{align:"c"}]})),ar(["multline","multline*"],"",Gs),ar(["align","align*","aligned","eqnarray"],"",Gs),ar("split","",Gs),ar(["gather","gathered"],"",Gs),ar(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Gs),ar(["smallmatrix","smallmatrix*"],"[columns:colspec]",Gs),ar(["cases","dcases","rcases"],"",Gs);function Tg(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function _h(a,y=1){return Tg(a)?Array(y).fill([[new Bn({type:"first"}),new vi]]):a.map(b=>b.length===0?[[new Bn({type:"first"})]]:b.map(E=>E.length===0?[new Bn({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Bn({type:"first"})),E)))}function Gs(a,y=[[[]]],b=[],E=[]){switch(y=_h(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new Zi(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new Zi(a,y,b,{mathstyleName:"textstyle"});case"center":return new Zi(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new Zi(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Zi(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Zi(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Zi(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Ku(E[0])});case"bmatrix":case"bmatrix*":return new Zi(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Ku(E[0])});case"Bmatrix":case"Bmatrix*":return new Zi(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Ku(E[0])});case"vmatrix":case"vmatrix*":return new Zi(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Ku(E[0])});case"Vmatrix":case"Vmatrix*":return new Zi(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Ku(E[0])});case"matrix":case"matrix*":return new Zi(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Ku(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new Zi(a,y,b,{mathstyleName:"scriptstyle",columns:Ku(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Zi(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 Zi(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Zi(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const de of y)ee=Math.max(ee,de.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 Zi(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new Zi(a,y,b,{mathstyleName:"textstyle"})}function Ku(a){return a!=null?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Ig(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof Zi);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof Zi)){const E=a.at(a.position);if(b=E,!b.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=$f()),ee.length===0&&(ee=$f());let ae;return y.endsWith("column")?(ae=Gs("split",[[re,ee]]),a.root=ae,Hu(ae,0,0)?Wu(a,ae,0,0):Hu(ae,0,1)?Wu(a,ae,0,1):a.position=a.offsetOf(E)):(ae=Gs("lines",[[re],[ee]]),a.root=ae,Hu(ae,0,0)?Wu(a,ae,0,0):Hu(ae,1,0)?Wu(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Wa){const ee=b.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=$f()),re.length===0&&(re=$f());let de="pmatrix";const pe=ee.leftDelim,ye=ee.rightDelim;pe==="("&&(ye===")"||ye==="?")?de="pmatrix":(pe==="["||pe==="\\lbrack")&&(ye==="]"||ye==="\\rbrack"||ye==="?")?de="bmatrix":pe==="\\vert"&&ye==="\\vert"?de="vmatrix":pe==="\\Vert"&&ye==="\\Vert"?de="Vmatrix":(pe==="{"||pe==="\\lbrace")&&(ye==="."||ye==="?")&&(de="cases");const we=Gs(de,y.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(we,ee),ee.parent.removeChild(ee),Hu(we,0,0)?Wu(a,we,0,0):y.endsWith("column")?Hu(we,0,1)?Wu(a,we,0,1):a.position=a.offsetOf(b):Hu(we,1,0)?Wu(a,we,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof Zi?[b.parent,b.parentBranch]:[void 0,[0,0]]}function Hu(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Dg(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function Wu(a,y,b,E){const ee=Dg(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Bf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Nf(a,y){const[b,[E,ee]]=Ig(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Bf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Bf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Bf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Bf(a,b,E,ee,"start");break}}function T0(a){return a.contentWillChange({inputType:"insertText"})?(Nf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?(Nf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(a){return a.contentWillChange({inputType:"insertText"})?(Nf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Og(a){return a.contentWillChange({inputType:"insertText"})?(Nf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function D0(a,y){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let b=".",E=".";switch(y){case"pmatrix":case"pmatrix*":b="(",E=")";break;case"bmatrix":case"bmatrix*":b="[",E="]";break;case"Bmatrix":case"Bmatrix*":b="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":b="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":b="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":b=".",E=".";break;case"cases":case"dcases":b="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=y,re.leftDelim=b,re.rightDelim=E,a.contentDidChange({}),!0}function P0(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof Zi);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof Zi){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 Rg(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Bg(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Ls({addRowAfter:T0,addColumnAfter:I0,addRowBefore:Pg,addColumnBefore:Og,removeRow:Rg,removeColumn:Bg,setEnvironment:D0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function $f(){return[new vi]}var O0=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}};O0.maximumDepth=1e3;var Ng=O0;function kh(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 Oc(a,y,b){var E,ee,re,ae,de,pe,ye;const we=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let Be=a.at(a.position);if(y==="forward"&&(Be.type==="subsup"?(Be=Be.rightSibling,Be||(Be=a.at(a.position+1))):Be=a.at(a.position+1)),!Be)return a.announce("plonk"),!1;let Xe=a.offsetOf(Be);if(Be instanceof al)Xe=kh(a,Xe,y);else if(Be instanceof ns)if(Be.isSuggestion)for(console.assert(y==="forward");Be&&Be instanceof ns;)Be.isSuggestion=!1,Xe=a.offsetOf(Be),Be=Be.rightSibling;else if(y==="forward"){if(Be=Be.rightSibling,!Be||!(Be instanceof ns))return a.announce("plonk"),!1;for(;Be&&Be instanceof ns&&/[a-zA-Z\*]/.test(Be.value);)Xe=a.offsetOf(Be),Be=Be.rightSibling}else{if(Be=Be.leftSibling,!Be||!(Be instanceof ns))return a.announce("plonk"),!1;for(;Be&&Be instanceof ns&&/[a-zA-Z\*]/.test(Be.value);)Xe=a.offsetOf(Be),Be=Be.leftSibling}else if(y==="forward"&&Be.type==="mopen"){let dt=0;do Be.type==="mopen"?dt+=1:Be.type==="mclose"&&(dt-=1),Be=Be.rightSibling;while(!Be.isLastSibling&&dt!==0);Xe=a.offsetOf(Be.leftSibling)}else if(y==="backward"&&Be.type==="mclose"){let dt=0;do Be.type==="mopen"?dt+=1:Be.type==="mclose"&&(dt-=1),Be=Be.leftSibling;while(!Be.isFirstSibling&&dt!==0);Xe=a.offsetOf(Be)}else if(y==="backward")if(Be.type==="first")for(;Xe>0&&Be.type==="first";)Xe-=1,Be=a.at(Xe);else{const dt=Be.type;Be.type==="subsup"&&(Xe=a.offsetOf(a.at(Xe).leftSibling)),Xe-=1;let wt=(ee=a.at(Xe))==null?void 0:ee.type;for(;Xe>=0&&wt===dt;)((re=a.at(Xe))==null?void 0:re.type)==="subsup"?Xe=a.offsetOf(a.at(Xe).leftSibling):Xe-=1,wt=a.at(Xe).type}else{const{type:dt}=Be;let wt=(ae=a.at(Xe))==null?void 0:ae.type;const{lastOffset:pn}=a;for(;Xe<=pn&&(wt===dt||wt==="subsup");){for(;((de=a.at(Xe).rightSibling)==null?void 0:de.type)==="subsup";)Xe=a.offsetOf(a.at(Xe).rightSibling);Xe+=1,wt=(pe=a.at(Xe))==null?void 0:pe.type}Xe-=1}if((ye=b==null?void 0:b.extend)!=null&&ye){if(!a.setSelection(a.anchor,Xe))return a.announce("plonk"),!1}else{if(Xe===a.position)return a.announce("plonk"),!1;a.position=Xe}return a.announce("move",we),a.mathfield.stopCoalescingUndo(),!0}function Cl(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[de,pe]=g0(a);de!==void 0&&pe!==void 0&&a.deleteAtoms([de,pe])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let de=Ff(a,a.position,y);de<0&&(de=0),de>a.lastOffset&&(de=a.lastOffset);const pe=a.setSelection(a.anchor,de);return a.mathfield.stopCoalescingUndo(),pe}if(a.selectionIsPlaceholder){a.collapseSelection(y);const de=Cl(a,y);return a.mathfield.stopCoalescingUndo(),de}let re=a.position;const ae=re;if(a.collapseSelection(y)?(re=a.position,R0(a,re)||(re=Ff(a,re,y))):re=Ff(a,re,y),re<0||re>a.lastOffset){let de=!0;return a.silenceNotifications||(de=(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),de&&a.announce("plonk"),de}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Ff(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||R0(a,y)?y:Ff(a,y,b)}function R0(a,y){var b;const E=a.at(y);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function $g(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=Cc(a.getHTMLElement(y[ee])).right,ae=Math.abs(b-re);if(ae<=E)E=ae;else break}return y[ee-1]}function zf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?b.filter(ye=>ye.type==="prompt"&&!ye.captureSelection):b,de=Cc(a.mathfield.getHTMLElement(y)).right,pe=a.offsetOf($g(a.mathfield,ae,de))-(re?1:0);if(E){const[ye,we]=a.selection.ranges[0];let Be;pe<(ee==="up"?ye:we)?Be={ranges:[[pe,we]],direction:"backward"}:Be={ranges:[[ye,pe]],direction:"forward"},a.setSelection(Be)}else a.setPositionHandlingPlaceholder(pe);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 pe,ye;let we=!0;return a.silenceNotifications||(we=(ye=(pe=a.mathfield.host)==null?void 0:pe.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 de=ae;for(;de&&de.parentBranch!=="below"&&!(Array.isArray(de.parentBranch)&&de.parent instanceof Zi);)de=de.parent;if(Array.isArray(de==null?void 0:de.parentBranch)&&de.parent instanceof Zi){const pe=de.parent;if(de.parentBranch[0]<1)return re();const ye=de.parentBranch[0]-1,we=pe.array[ye][de.parentBranch[1]];if(!we.some(Xe=>Xe.type==="prompt"&&!Xe.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,we,ee,"up")}else if(de){const pe=(E=de.parent.branch("above"))!=null?E:de.parent.createBranch("above");if(!pe.some(we=>we.type==="prompt"&&we.placeholderId)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,pe,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 pe,ye;let we=!0;return a.silenceNotifications||(we=(ye=(pe=a.mathfield.host)==null?void 0:pe.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 de=ae;for(;de&&de.parentBranch!=="above"&&!(Array.isArray(de.parentBranch)&&de.parent instanceof Zi);)de=de.parent;if(Array.isArray(de==null?void 0:de.parentBranch)&&de.parent instanceof Zi){const pe=de.parent;if(de.parentBranch[0]+1>pe.array.length-1)return re();const ye=de.parentBranch[0]+1,we=pe.array[ye][de.parentBranch[1]];if(!we.some(Xe=>Xe.type==="prompt"&&!Xe.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,we,ee,"down")}else if(de){const pe=(E=de.parent.branch("below"))!=null?E:de.parent.createBranch("below");if(!pe.some(we=>we.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,pe,ee,"down")}else return re();return!0}function B0(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 N0(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 Zs({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function $0(a){var y;if(a.collapseSelection(),Hg(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=a.at(a.position+1))==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Zs({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(pe){const ye=[],we=[];return[...pe.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((Xe,dt)=>{const wt=E(Xe);wt===0?ye.push(Xe):we.push({documentOrder:dt,tabIndex:wt,node:Xe})}),we.sort((Xe,dt)=>Xe.tabIndex===dt.tabIndex?Xe.documentOrder-dt.documentOrder:Xe.tabIndex-dt.tabIndex).map(Xe=>Xe.node).concat(ye)}function y(pe){return!(!b(pe)||ee(pe)||E(pe)<0)}function b(pe){return!(pe.disabled||pe.type==="hidden"&&pe.tagName.toUpperCase()==="INPUT"||de(pe))}function E(pe){var ye;const we=Number.parseInt((ye=pe.getAttribute("tabindex"))!=null?ye:"NaN",10);return Number.isNaN(we)?pe.contentEditable==="true"||(pe.nodeName==="AUDIO"||pe.nodeName==="VIDEO")&&pe.getAttribute("tabindex")===null?0:pe.tabIndex:we}function ee(pe){return pe.tagName.toUpperCase()==="INPUT"&&pe.type==="radio"&&!ae(pe)}function re(pe,ye){for(const we of pe)if(we.checked&&we.form===ye)return we;return null}function ae(pe){var ye;if(!pe.name)return!0;const Be=((ye=pe.form)!=null?ye:pe.ownerDocument).querySelectorAll('input[type="radio"][name="'+pe.name+'"]'),Xe=re(Be,pe.form);return!Xe||Xe===pe}function de(pe){if(!nt()||pe===document.activeElement||pe.contains(document.activeElement))return!1;if(getComputedStyle(pe).visibility==="hidden")return!0;const ye=pe.getBoundingClientRect();if(ye.width===0||ye.height===0)return!0;for(;pe;){if(getComputedStyle(pe).display==="none")return!0;pe=pe.parentElement}return!1}return nt()?a(document.body):[]}function bs(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const ee=a.offsetOf(y[0]),re=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?bs(a,[y.leftSibling,y]):bs(a,[y,y.leftSibling])}function ll(a,y){const b=a.position;if(typeof y=="number"&&(y=a.at(y)),y.type==="prompt")a.setSelection(a.offsetOf(y.firstChild),a.offsetOf(y.lastChild));else{const E=a.offsetOf(y);y.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",b),a.mathfield.stopCoalescingUndo(),!0}function Kf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Cl(a,y);let ae;const de=a.at(a.anchor).parentPrompt;de?y==="forward"?ae=a.offsetOf(de)+1:ae=a.offsetOf(de.leftSibling):ae=Math.max(a.position+re,0);const pe=Lh(a,ae,y);if(!pe||y==="forward"&&a.offsetOf(pe)<ae||y==="backward"&&a.offsetOf(pe)>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 Be=we.indexOf(document.activeElement)+re;return Be<0&&(Be=we.length-1),Be>=we.length&&(Be=0),we[Be].focus(),a.mathfield.stopCoalescingUndo(),!0}return ll(a,pe),!0}function Lh(a,y=0,b="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,y,b)}Ls({moveToOpposite:a=>{const y={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},b=a.at(a.position),{parent:E}=b;if(!E)return a.announce("plonk"),!1;const ee=b.parentBranch;let re;if(typeof ee=="string"&&(re=y[ee]),!re){const de=b.subsupPlacement?$0(a):N0(a);return a.mathfield.stopCoalescingUndo(),de}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=>B0(a),moveToNextChar:a=>Cl(a,"forward"),moveToPreviousChar:a=>Cl(a,"backward"),moveUp:a=>Cl(a,"upward"),moveDown:a=>Cl(a,"downward"),moveToNextWord:a=>Oc(a,"forward"),moveToPreviousWord:a=>Oc(a,"backward"),moveToGroupStart:a=>{const y=a.offsetOf(a.at(a.position).firstSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const y=a.offsetOf(a.at(a.position).lastSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var y,b,E,ee;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Kf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let Xe=re;for(;Xe&&Xe.mode==="text";)Xe=Xe.leftSibling;let dt=re;for(;((y=dt.rightSibling)==null?void 0:y.mode)==="text";)dt=dt.rightSibling;if(Xe&&dt)return bs(a,[Xe,dt])}if(re.rightSibling.mode==="text"){let Xe=re;for(;Xe&&Xe.mode==="text";)Xe=Xe.rightSibling;return Xe?(ll(a,(b=Xe.leftSibling)!=null?b:Xe),a.mathfield.switchMode("math"),!0):ll(a,a.lastOffset)}}const de=a.at(a.anchor).parentPrompt,pe=de?a.offsetOf(de)+1:Math.max(a.position+1,0),ye=Lh(a,pe,"forward");if(ye)return ll(a,ye);const we=F0(a,re,Xe=>Xe.type==="leftright"||Xe.type==="text","forward");if(we){if(we.mode==="text"){let Xe=we;for(;Xe&&Xe.mode==="text";)Xe=Xe.rightSibling;return bs(a,[(E=we.leftSibling)!=null?E:we,(ee=Xe.leftSibling)!=null?ee:Xe])}return bs(a,we)}const Be=re.parent;if(Be){if(Be.type==="leftright"||Be.type==="surd")return bs(a,Be);if(re.parentBranch==="superscript"&&Be.subscript)return bs(a,Be.subscript);if(re.parentBranch==="above"&&Be.below)return bs(a,Be.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return ll(a,Be);if(re.parentBranch==="above"||re.parentBranch==="below")return bs(a,Be)}return ll(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Kf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let de=b;for(;de&&de.mode==="text";)de=de.leftSibling;let pe=b;for(;((y=pe.rightSibling)==null?void 0:y.mode)==="text";)pe=pe.rightSibling;if(de&&pe)return bs(a,[de,pe])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?ll(a,b):ll(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Lh(a,re,"backward");if(ae)return ll(a,ae);if(E==="math"){const de=F0(a,b,ye=>ye.type==="leftright"||ye.type==="text","backward");if(de){if(de.mode==="text"){let ye=de;for(;ye&&ye.mode==="text";)ye=ye.leftSibling;return bs(a,[de,ye])}return bs(a,de)}const pe=b.parent;if(pe){if(pe.type==="leftright"||pe.type==="surd")return bs(a,pe);if(b.parentBranch==="subscript"&&pe.superscript)return bs(a,pe.superscript);if(b.parentBranch==="below"&&pe.above)return bs(a,pe.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return ll(a,pe);if(b.parentBranch==="above"||b.parentBranch==="below")return bs(a,pe)}return ll(a,0)}return!1},moveToMathfieldStart:a=>a.selectionIsCollapsed&&a.position===0?(a.announce("plonk"),!1):(a.position=0,a.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:a=>a.selectionIsCollapsed&&a.position===a.lastOffset?(a.announce("plonk"),!1):(a.position=a.lastOffset,a.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:N0,moveToSubscript:$0},{target:"model",changeSelection:!0}),Ls({moveToNextPlaceholder:a=>Kf(a,"forward"),moveToPreviousPlaceholder:a=>Kf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function F0(a,y,b,E){if(E==="forward"){let re=y.rightSibling;for(;re&&!b(re);)re=re.rightSibling;return re}let ee=y.leftSibling;for(;ee&&!b(ee);)ee=ee.leftSibling;return ee}function Hf(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=y===0||ae===void 0||ae.type==="first"||ae.mode!=="math"||!(ae.type&&/mord|mpunct|operator/.test(ae.type)||ae.type==="mop"&&/[a-zA-Z ]+/.test(ae.value))||!ae.hasEmptyBranch("superscript")||!ae.hasEmptyBranch("subscript")||typeof b=="function"&&!b(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,y-=1}a.contentDidChange({data:re,inputType:"insertText"})}function Uu(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(Bn.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,y-=1}Ah(a),a.contentDidChange({data:ca(re),inputType:"insertText"})}function Ah(a){var y;let b=a.position-1;for(;b>=0&&((y=a.at(b))==null?void 0:y.mode)==="math";)b-=1;if(!(b<0)&&a.at(b).mode==="text"&&a.at(b).value===" "&&a.at(b-1).mode==="math"){a.at(b-1).parent.removeChild(a.at(b-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Ug(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 Vg(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Sf(b))return!1;const ee=Lc(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Ug(E)+ee;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&Uu(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:de}=E.at(E.position);if(ae&&de instanceof Wa&&de.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 Uu(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){Uu(E,1);const pe=E.at(E.position);return pe.value="\u22C5",pe.style.variant="normal",pe.command="\\cdot",pe.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 Uu(E,1),!0;if(/\([a-z][,;]$/.test(re))return Uu(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Ah(E),!0}else{if(y==="[Space]")return Hf(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Hf(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Hf(E,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(re)&&!/(αβγ)$/.test(re))return Hf(E,void 0,ae=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(ae.value)),!0;if(ee==="?"||ee==="."&&!/[\d-+]\.$/.test(re))return!0}return!1}function Zg(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=z0(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(vh(y)||y)+"</span>"+b.innerHTML),b.style.visibility="visible",setTimeout(()=>{b.childNodes.length>0&&b.childNodes[b.childNodes.length-1].remove(),b.childNodes.length===0&&(b.style.visibility="hidden")},3e3)}function jg(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=z0();y.innerHTML=""}else{const y=Ef("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(ks("keystroke-caption"),ks("core"),Ef("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,y){var b,E,ee;const{model:re}=a,ae=p0(y);if(y.isTrusted){Nm(y);const dt=kd();a.keyboardLayout!==dt.id&&(a.keyboardLayout=dt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Zg(a,ae),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let de,pe="",ye;const we=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")we.pop();else if(!Sf(y))a.flushInlineShortcutBuffer();else{const dt=Lc(y),wt=[...(E=(b=we[we.length-1])==null?void 0:b.keystrokes)!=null?E:[],dt];we.push({state:re.getState(),keystrokes:wt,leftSiblings:Xg(a)});let pn=0,ur="";for(;!de&&pn<wt.length;)ye=we.length-(wt.length-pn),ur=wt.slice(pn).join(""),de=dd(we[ye].leftSiblings,ur,a.options.inlineShortcuts),!de&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(ur)&&(de=a.options.onInlineShortcut(a,ur)),pn+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(de?a.switchMode("math"):Vg(a,ae,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),pe=""))}if(!de){if(pe||(pe=Um(a.keybindings,re.mode,y)),!pe&&(ae==="[Enter]"||ae==="[Return]")){let dt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(dt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),dt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),dt}if((!pe||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return Hi.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),pe="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const dt=re.at(re.position+1),wt=re.at(re.position-1);if((dt==null?void 0:dt.mode)==="text"||(wt==null?void 0:wt.mode)==="text")return Hi.insert(re," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(ee=re.at(re.position))!=null&&ee.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Lc(y)===","&&(pe="insertDecimalSeparator")}}if(!de&&!pe){if(re.mathfield.smartFence){if(Ih(re,Lc(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:dt}=re.at(re.position);if(dt instanceof Wa&&dt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),dt.isDirty=!0,dt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Lc(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const wt=Lc(y);if(wt==="("||wt==="{"||wt==="["){const pn={"(":"(","{":"\\lbrace","[":"\\lbrack"}[wt],ur={"(":")","{":"\\rbrace","[":"\\rbrack"}[wt],[ln,Zn]=jo(re.selection);return a.snapshot(),re.position=Zn,Hi.insert(re,ur,{format:"latex"}),re.position=ln,Hi.insert(re,pn,{format:"latex"}),re.setSelection(ln+1,Zn+1),re.contentDidChange({data:wt,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const Be=re.at(Math.max(re.position,re.anchor)),{parent:Xe}=Be;if(pe==="moveAfterParent"&&(Xe==null?void 0:Xe.type)==="leftright"&&Be.isLastSibling&&a.options.smartFence&&Ih(re,".",a.defaultStyle)&&(pe="",Mo(a)),a.keyboardDelegate.cancelComposition(),pe)a.executeCommand(pe);else if(de){const dt=a.effectiveStyle;re.setState(we[ye].state);const wt=we[we.length-1].keystrokes;for(const pn of wt)Hi.insert(re,pn,{silenceNotifications:!0,style:dt});a.snapshot("insert-shortcut"),re.setState(we[ye].state),re.deferNotifications({content:!0,selection:!0,data:de,type:"insertText"},()=>(Hi.insert(re,de,{format:"latex",style:dt}),Ah(a.model),de.endsWith(" ")&&(a.switchMode("text"),Hi.insert(re," ",{style:dt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Th(a,y,b){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}b!=null||(b={}),b.focus&&a.focus(),b.feedback&&window.MathfieldElement.playSound("keypress"),typeof b.mode=="string"&&(a.switchMode(b.mode),a.snapshot());let ee=rf(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(pe=>pe.toUpperCase())),b.simulateKeystroke){let pe=!0;for(const ye of ee)K0(a,new KeyboardEvent("keypress",{key:ye}))&&(pe=!1);if(pe)return}const ae=E.at(E.position),de=Se(Se({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(jo(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Mf(a);for(const pe of ee)Hi.insert(E,pe);a.snapshot("insert-latex"),Ad(a)});else if(E.mode==="text"){for(const pe of ee)Hi.insert(E,pe,{style:de});a.snapshot("insert-text")}else if(E.mode==="math")for(const pe of ee)qg(a,pe,de,ae);a.dirty=!0,a.scrollIntoView()}function Xg(a){const y=a.model,b=[];let E=y.at(Math.min(y.position,y.anchor));for(;E.type!=="first";)b.push(E),E=E.leftSibling;return b}function qg(a,y,b,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(y)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){Yg(ee),Hi.insert(ee,y,{style:b}),a.snapshot(),B0(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))}Hi.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function Yg(a){a.selectionIsCollapsed||(a.deleteAtoms(jo(a.selection)),a.mathfield.snapshot("delete"))}function Ih(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!re)return!1;const ae=te[re],de=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[pe,ye]=jo(a.selection),we=a.extractAtoms([pe,ye]),Be=ee.addChildrenAfter([new Wa("left...right",we,{leftDelim:re,rightDelim:de})],a.at(pe));return a.setSelection(a.offsetOf(Be.firstChild),a.offsetOf(Be.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const pe=ee instanceof Wa?ee.leftDelim+ee.rightDelim:"";if(pe==="\\lbrace\\rbrace"||pe==="\\{\\}"||pe==="\\lbrace?")return a.mathfield.snapshot(),Hi.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(de){if(ee instanceof Wa&&ee.firstChild===E&&(ee.leftDelim==="?"||ee.leftDelim==="."))return ee.leftDelim=re,ee.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(ee instanceof Wa)){let Be=E;for(;Be&&!(Be.type==="mclose"&&Be.value===de);)Be=Be.rightSibling;if(Be){a.mathfield.snapshot();const Xe=a.extractAtoms([a.offsetOf(E),a.offsetOf(Be)]);return Xe.pop(),ee.addChildrenAfter([new Wa("left...right",Xe,{leftDelim:re,rightDelim:de})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const pe=a.offsetOf(E.lastSibling);let ye;for(ye=a.position;ye<=pe;ye++){const Be=a.at(ye);if(Be instanceof Wa&&(Be.leftDelim==="?"||Be.leftDelim===".")&&H0(re,Be.rightDelim))break}const we=a.at(ye);if(ye<=pe&&we instanceof Wa){we.leftDelim=re,a.mathfield.snapshot();let Be=a.extractAtoms([a.position,ye-1]);return Be=Be.filter(Xe=>Xe.type!=="first"),we.addChildren(Be,we.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Wa&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const Be=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const Xe of Be)ee.parent.addChildBefore(Xe,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Wa&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),Hi.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const Be=a.offsetOf(E.lastSibling),Xe=a.extractAtoms([a.position,Be]);a.at(a.position).body=Xe,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let pe=E;for(;pe;){if(pe.type==="mopen"&&pe.value===ae){a.mathfield.snapshot();const dt=pe.leftSibling,wt=a.extractAtoms([a.offsetOf(pe.leftSibling),a.offsetOf(E)]);wt.shift();const pn=new Wa("left...right",wt,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([pn],dt),a.position=a.offsetOf(pn),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}pe=pe.leftSibling}if(ee instanceof Wa&&E.isLastSibling&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const ye=a.offsetOf(E.firstSibling);let we;for(we=a.position;we>=ye;we--){const dt=a.at(we);if(dt instanceof Wa&&(dt.rightDelim==="?"||dt.rightDelim===".")&&Dh(dt.leftDelim,re))break}const Be=a.at(we);if(we>=ye&&Be instanceof Wa)return a.mathfield.snapshot(),Be.rightDelim=re,Be.addChildren(a.extractAtoms([we,a.position]),Be.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Wa&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,ee.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ee.parentBranch),a.position=a.offsetOf(ee),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const Xe=ee.parent;return Xe instanceof Wa&&(Xe.rightDelim==="?"||Xe.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(Xe),Ih(a,re,b)):!1}return!1}function Dh(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function H0(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}Ls({undo:a=>(a.undo(),!0),redo:a=>(a.redo(),!0),scrollIntoView:a=>(a.scrollIntoView(),!0),scrollToStart:a=>(a.field.scroll(0,0),!0),scrollToEnd:a=>{const y=a.field.getBoundingClientRect();return a.field.scroll(y.left-window.scrollX,0),!0},toggleKeystrokeCaption:jg,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(Th(a,y,b),!0),insertDecimalSeparator:a=>{const y=a.model;return y.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&y.at(Math.max(y.position,y.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var y;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((y=a.host)==null||y.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,y,b)=>{const E=a.getPrompts();let ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re=0;for(;E.includes(ee)&&re<100;){if(re===99)return console.error("could not find a unique ID after 100 tries"),!1;ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re++}return a.insert(`\\placeholder[${y!=null?y:ee}]{}`,b),!0}}),Ls({copyToClipboard:a=>(a.focus(),a.model.selectionIsCollapsed&&a.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Ls({cutToClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(y=>{y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(y,{mode:a.model.mode})&&(Ad(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Mo(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jg(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Ph(a,y),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&b.fontSeries===a.defaultStyle.fontSeries&&(b.fontSeries="auto"),b.fontShape&&b.fontShape===a.defaultStyle.fontShape&&(b.fontShape="auto"),b.color&&b.color===a.defaultStyle.color&&(b.color="none"),b.backgroundColor&&b.backgroundColor===a.defaultStyle.backgroundColor&&(b.backgroundColor="none"),b.fontSize&&b.fontSize===a.defaultStyle.fontSize&&(b.fontSize="auto"),a.defaultStyle=Se(Se({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Eh(E,ee,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Ls({applyStyle:Jg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,ae,de,pe,ye,we,Be;const Xe={};if(typeof y.color=="string"){const wt=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";wt!==y.color&&(Xe.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),Xe.color=wt}if(typeof y.backgroundColor=="string"){const wt=(ae=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?ae:"none";wt!==y.backgroundColor&&(Xe.verbatimBackgroundColor=(de=y.verbatimBackgroundColor)!=null?de:y.backgroundColor),Xe.backgroundColor=wt}typeof y.fontFamily=="string"&&(Xe.fontFamily=y.fontFamily),typeof y.series=="string"&&(Xe.fontSeries=y.series),typeof y.fontSeries=="string"&&(Xe.fontSeries=y.fontSeries.toLowerCase()),Xe.fontSeries&&(Xe.fontSeries=(pe={bold:"b",medium:"m",normal:"m"}[Xe.fontSeries])!=null?pe:Xe.fontSeries),typeof y.shape=="string"&&(Xe.fontShape=y.shape),typeof y.fontShape=="string"&&(Xe.fontShape=y.fontShape.toLowerCase()),Xe.fontShape&&(Xe.fontShape=(ye={italic:"it",up:"n",upright:"n",normal:"n"}[Xe.fontShape])!=null?ye:Xe.fontShape),y.variant&&(Xe.variant=y.variant.toLowerCase()),y.variantStyle&&(Xe.variantStyle=y.variantStyle.toLowerCase());const dt=(we=y.size)!=null?we:y.fontSize;return typeof dt=="number"?Xe.fontSize=Math.max(1,Math.min(10,dt)):typeof dt=="string"&&(Xe.fontSize=(Be={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[dt.toLowerCase()])!=null?Be:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[dt]),Xe}function Oh(a){let[y,b]=jo(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 de=b==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!fe.test(ae.value));)y+=de,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+=de,ae=a.at(y);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)y+=de,ae=a.at(y);else if(ae.value==="{"){if(b==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)y+=de,ae=a.at(y);return y}return y-1}else if(ae.value==="}"){if(b==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)y+=de,ae=a.at(y);return y-1}return y}return y-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(y+de))!=null&&E.isDigit();)y+=de;return b==="backward"?y-1:y}if(ae.style.variant||ae.style.variantStyle){let pe=(ee=a.at(y))==null?void 0:ee.style;for(;pe&&pe.variant===ae.style.variant&&pe.variantStyle===ae.style.variantStyle;)pe=(re=a.at(y+de))==null?void 0:re.style,y+=de;return b==="backward"?y-1:y}return y}return y}Ls({selectGroup:a=>{const y=Oh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Cl(a,"forward",{extend:!0}),extendSelectionBackward:a=>Cl(a,"backward",{extend:!0}),extendToNextWord:a=>Oc(a,"forward",{extend:!0}),extendToPreviousWord:a=>Oc(a,"backward",{extend:!0}),extendSelectionUpward:a=>Cl(a,"upward",{extend:!0}),extendSelectionDownward:a=>Cl(a,"downward",{extend:!0}),extendToNextBoundary:a=>Oc(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Oc(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 Vu=null,Rd=0,Wf=class qs{static start(y,b,E,ee){var re;qs.element=y,(re=qs.controller)==null||re.abort(),qs.controller=new AbortController;const ae={signal:qs.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,ae),y.addEventListener("pointerup",ee,ae),y.addEventListener("pointercancel",ee,ae),Rh(b)&&(qs.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var y;(y=qs.controller)==null||y.abort(),qs.controller=void 0,typeof qs.pointerId=="number"&&(qs.element.releasePointerCapture(qs.pointerId),qs.pointerId=void 0)}};function Rh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function U0(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,de="none",pe=!1,ye=!1;const we=y.clientX,Be=y.clientY,Xe=Date.now(),dt=E.field,wt=setInterval(()=>{pe?dt.scroll({top:0,left:dt.scrollLeft-16}):ye&&dt.scroll({top:0,left:dt.scrollLeft+16})},32);function pn(){Wf.stop(),re=!1,clearInterval(wt),a.element.classList.remove("tracking"),y&&y.preventDefault()}function ur(Zn){if(!E.hasFocus()){pn();return}const fr=Zn.clientX,Yn=Zn.clientY,Wr=Rh(Zn)&&Zn.pointerType==="touch"?20:5;if(Date.now()<Xe+500&&Math.abs(we-fr)<Wr&&Math.abs(Be-Yn)<Wr){Zn.preventDefault(),Zn.stopPropagation();return}const li=dt.getBoundingClientRect();ye=fr>li.right,pe=fr<li.left;let qr=ee;Rh(Zn)&&(Zn.isPrimary||(qr=Bd(E,Zn.clientX,Zn.clientY,{bias:0})));const Da=Bd(E,fr,Yn,{bias:fr<=we?fr===we?0:-1:1});qr>=0&&Da>=0&&(E.model.extendSelectionTo(qr,Da),Mo(a)),ae&&Oh(E.model)}Vu&&Math.abs(Vu.x-we)<5&&Math.abs(Vu.y-Be)<5&&Date.now()<Vu.time+500?(Rd+=1,Vu.time=Xe):(Vu={x:we,y:Be,time:Xe},Rd=1);const ln=dt.getBoundingClientRect();if(we>=ln.left&&we<=ln.right&&Be>=ln.top&&Be<=ln.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=Bd(a,we,Be,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const Zn=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||Zn?de="all":de="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),de="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),de="selection"):(a.model.position=ee,v0(a.model)?de="all":de="selection");a.defaultStyle={},y.detail===3||Rd>2?(pn(),(y.detail===3||Rd===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},de="all")):re||(re=!0,Wf.start(dt,y,ur,pn),(y.detail===2||Rd===2)&&(ae=!0,Oh(a.model),de="all"))}a.hasFocus()||(de="none",a.focus({preventScroll:!0}))}else Vu=null;a.stopCoalescingUndo(),de!=="none"&&(a.model.selectionIsCollapsed&&(de="all"),Mo(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 V0(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=lu(a,b);if(!re)return[1/0,null];let ae=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=re.left&&E<=re.right)for(const de of b.children){const pe=V0(a,y,de,E,ee);pe[0]<=ae[0]&&(ae=pe)}return ae[1]||(ae=[Qg(E,ee,re),b]),y.set(b.id,ae),ae}function ev(a,y,b){const[,E]=V0(a,new Map,a.model.root,y,b);return E}function Bd(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 de=[];let pe=ae;for(;pe;)de.unshift(pe),pe=pe.parent;for(const we of de)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=lu(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 Hi{constructor(){super("math")}onPaste(a,y){if(!y||!a.model.contentWillChange({data:typeof y=="string"?y:null,dataTransfer:typeof y=="string"?null:y,inputType:"insertFromPaste"}))return!1;let b="",E="auto",ee=typeof y!="string"?y.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=du(re),{model:de}=a;de.selectionIsCollapsed||de.deleteAtoms(jo(de.selection));const pe=de.at(de.position);if(pe.parent instanceof Zi){console.assert(pe.parentBranch!==void 0);const ye=[];let we=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const wt of ae)wt.type==="first"&&we.length>0?(ye.push(we),we=[wt]):we.push(wt);we.length>0&&ye.push(we);let Be=Number(pe.parentBranch[0]),Xe=Number(pe.parentBranch[1]);const dt=pe.parent.maxColumns;for(;pe.parent.colCount-Xe<ye.length&&pe.parent.colCount<dt;)pe.parent.addColumn();pe.parent.addChildrenAfter(ye[0],pe);for(let wt=1;wt<ye.length;wt++)Xe++,Xe>=dt&&(Xe=0,pe.parent.addRowAfter(Be),Be++),pe.parent.setCell(Be,Xe,ye[wt])}else pe.parent.addChildrenAfter(ae.filter(ye=>ye.type!=="first"),pe);return de.position=de.offsetOf(ae[ae.length-1]),de.contentDidChange({inputType:"insertFromPaste"}),Mo(a),!0}}catch(re){}if(ee=typeof y!="string"?y.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(b=re.latex),!b){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(b=ae.latex)}b||(E="latex")}catch(re){}if(!b&&typeof y!="string"&&(b=y.getData("application/x-latex"),b&&(E="latex")),b||(b=typeof y=="string"?y:y.getData("text/plain")),b){let re;return[re,b]=yl(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),Mo(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 de=a.silenceNotifications;a.silenceNotifications=!0;const pe={"?":"\\placeholder{}","@":"\\placeholder{}"};pe[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(jo(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;pe[0]?pe["@"]=pe[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(ye=rv(a),ye>=0&&(pe["@"]=a.getValue(ye,a.position,"latex"))),pe[0]||(pe[0]=pe["?"]);let we=!1;const Be=fr=>(we=!0,pe[fr]);let[Xe,dt]=Z0(a,y,Be,b);if(!dt)return!1;const wt=dt.length===1&&dt[0].type==="genfrac";wt&&ye>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(pe["@"]=pe["?"],we=!1,[Xe,dt]=Z0(a,y,Be,b)):ye>=0&&a.deleteAtoms([ye,a.position]);const{parent:pn}=a.at(a.position),ur=pn.hasEmptyBranch("body");if(wt&&Xe!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&pn instanceof Wa&&pn.leftDelim==="("&&ur){const fr=pn.parent,Yn=pn.parentBranch;fr.removeChild(pn),fr.setChildren(dt,Yn)}const ln=a.at(a.position);ln.parent.addChildrenAfter(dt,ln),Xe==="latex"&&typeof y=="string"&&(pn==null?void 0:pn.type)==="root"&&ur&&!we&&(pn.verbatimLatex=y),a.silenceNotifications=de;const Zn=dt[dt.length-1];if(b.selectionMode==="placeholder"){const fr=dt.flatMap(Yn=>[Yn,...Yn.children]).find(Yn=>Yn.type==="placeholder");if(fr){const Yn=a.offsetOf(fr);a.setSelection(Yn-1,Yn),a.announce("move")}else Zn&&(a.position=a.offsetOf(Zn))}else b.selectionMode==="before"||(b.selectionMode==="after"?Zn&&(a.position=a.offsetOf(Zn)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(Zn)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function Z0(a,y,b,E){var ee;let re,ae=[];if(typeof y!="string"||E.format==="math-json"){const de=window.MathfieldElement.computeEngine;if(!de)return["math-json",[]];[re,y]=["latex",de.box(y).latex],ae=Xo(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Ou(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=Xo(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Uf(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Ou(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=yl(y)),ae=Xo(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Uf(ae));return hu(ae,E.style),[re!=null?re:"latex",ae]}function nv(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof Wa&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Uf(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof Wa&&b.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;b.body[ae];ae++)b.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[y]=b.body[ee])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){Uf(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof Zi)for(const b of y.cells)Uf(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||j0(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(j0(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 j0(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 Hi{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"),Mo(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(jo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=av(y,a.mathfield.context);if(hu(re,b.style),!re)return!1;const ae=a.at(a.position),de=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(de)):de&&(a.position=a.offsetOf(de))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function av(a,y){return a=a.replace(/\\/g,"\\textbackslash "),a=a.replace(/#/g,"\\#"),a=a.replace(/\$/g,"\\$"),a=a.replace(/%/g,"\\%"),a=a.replace(/&/g,"\\&"),a=a.replace(/_/g,"\\_"),a=a.replace(/{/g,"\\textbraceleft "),a=a.replace(/}/g,"\\textbraceright "),a=a.replace(/lbrace/g,"\\textbraceleft "),a=a.replace(/rbrace/g,"\\textbraceright "),a=a.replace(/\^/g,"\\textasciicircum "),a=a.replace(/~/g,"\\textasciitilde "),a=a.replace(/£/g,"\\textsterling "),Xo(a,{context:y,parseMode:"text"})}new iv;function Ml(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var fo=4,Cs=20,$o=2*(Cs+fo),Vf=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
|
|
|
</svg>`,G0=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
|
|
|
</svg>`,Zf=(a,y,b)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${b})" transform-origin="20 20">
|
|
|
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
|
|
|
</g>
|
|
|
</svg>`,ov=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*Cs+10*fo+5} ${8*Cs+10*fo+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${$o+fo}"
|
|
|
height="${3*$o}"
|
|
|
width="${$o}"
|
|
|
rx="${$o/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${$o+fo}"
|
|
|
y="0"
|
|
|
height="${$o}"
|
|
|
width="${3*$o}"
|
|
|
rx="${$o/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${Zf(2*(fo+$o),2*fo+3*$o,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${Zf(2*(fo+$o),2*fo+$o,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${Zf(2*fo+3*$o,2*(fo+$o),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${Zf(2*fo+$o,2*(fo+$o),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${Vf(2*fo+$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${G0(2*fo+2*$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${Vf(2*fo+3*$o,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${Vf(fo,2*fo+$o)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${G0(fo,2*fo+2*$o)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${Vf(fo,2*fo+3*$o)}
|
|
|
</g>
|
|
|
</svg>`,sv=a=>`
|
|
|
<svg id="matrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","matrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,lv=a=>`
|
|
|
<svg id="pmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","pmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
|
|
|
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,X0=a=>`
|
|
|
<svg id="Bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","Bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,uv=a=>`
|
|
|
<svg id="bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4h-3v16h3"/>
|
|
|
<path class="cls-2" d="m22,4h3v16h-3"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,cv=a=>`
|
|
|
<svg id="vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
|
|
|
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
|
|
|
</svg>`,dv=a=>`
|
|
|
<svg id="Vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
|
|
|
data-command='["setEnvironment","Vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
|
|
|
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
|
|
|
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
|
|
|
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
|
|
|
</svg>`,fv=a=>`
|
|
|
<svg id="cases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","cases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<circle cx="13" cy="8" r="1"/>
|
|
|
<circle cx="13" cy="16" r="1"/>
|
|
|
<circle cx="21" cy="8" r="1"/>
|
|
|
<circle cx="21" cy="16" r="1"/>
|
|
|
</svg>`,hv=a=>`
|
|
|
<svg id="rcases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","rcases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
|
|
|
<circle cx="15" cy="8" r="1"/>
|
|
|
<circle cx="15" cy="16" r="1"/>
|
|
|
<circle cx="7" cy="8" r="1"/>
|
|
|
<circle cx="7" cy="16" r="1"/>
|
|
|
</svg>`,Bh={matrix:sv,pmatrix:lv,bmatrix:uv,Bmatrix:X0,vmatrix:cv,Vmatrix:dv},Nh={cases:fv,rcases:hv,Bmatrix:X0};function pv(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let ee=0;E.forEach(wt=>{(!ee||wt.length>ee)&&(ee=wt.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Ef("mathlive-environment-popover"),ks("environment-popover"),ks("core"),re.setAttribute("aria-hidden","true"));let ae;const de=re.querySelector(".MLEP__environment-controls");de?ae=de:(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 pe=[],ye="";const we=a.model.parentEnvironment.environmentName;if(cs(we)){const wt=gv(we);ye=Bh[wt]("active");const pn=Bh,{[wt]:ur}=pn,ln=at(pn,[Pe(wt)]);pe=Object.values(ln).map(Zn=>Zn("inactive"))}else if(ds(we)){const wt=vv(we);ye=Nh[wt]("active");const pn=Nh,{[wt]:ur}=pn,ln=at(pn,[Pe(wt)]);pe=Object.values(ln).map(Zn=>Zn("inactive"))}else Do(we)&&(ye=Bh.matrix("active"),pe=Object.values(Nh).map(wt=>wt("inactive")));const Be=document.createElement("div");Be.className="MLEP__environment-delimiter-controls",Be.style.display="flex",Be.style.flexDirection="column",Be.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${ye}
|
|
|
${pe.join("")}
|
|
|
</div>`,ye&&ae.appendChild(Be),ae.querySelectorAll("[data-command]").forEach(wt=>{const pn=wt.dataset.command;let ur=pn;try{ur=JSON.parse(pn)}catch(ln){}wt.addEventListener("mousedown",ln=>ln.preventDefault()),ur&&wt.addEventListener("click",()=>a.executeCommand(ur))});const dt=(b=a.field)==null?void 0:b.getBoundingClientRect();dt&&(re.style.top=`${window.scrollY+(dt.top-re.clientHeight-15)}px`,re.style.left=`${dt.left+20}px`,re.classList.add("is-visible"))}function $h(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mv(){document.getElementById("mathlive-environment-popover")&&(bh("mathlive-environment-popover"),x("environment-popover"),x("core"))}function jf(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&bo(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):$h()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function q0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function Y0(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function Fh(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="rtl"||b==="end"&&E==="ltr"||b==="top"||b==="right"?Math.max(0,a-y):a}function yv(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="ltr"||b==="end"&&E==="rtl"||b==="top"||b==="right"?a:a-y}function bv(a,y){var b,E,ee;const re=(b=q0(a))!=null?b:"ltr";a.style.position="fixed",a.style.left="",a.style.top="",a.style.right="",a.style.bottom="",a.style.height="",a.style.width="";const ae=a.getBoundingClientRect(),de=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let pe=Math.min(de,(E=y.height)!=null?E:ae.height),ye=Fh(y.location.y,pe,y.verticalPos,re);ye+pe>window.innerHeight-8&&(y.alternateLocation?(ye=Fh(y.alternateLocation.y,pe,y.verticalPos,re),ye+pe>window.innerHeight-8&&(ye=void 0)):ye=void 0),Number.isFinite(ye)||(ye=Math.max(8,window.innerHeight-8-pe),8+pe>window.innerHeight-8&&(a.style.bottom="8px")),pe=Math.min(ye+pe,window.innerHeight-8)-ye;const we=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let Be=Math.min(we,(ee=y.width)!=null?ee:ae.width),Xe=Fh(y.location.x,Be,y.horizontalPos,re);Xe+Be>window.innerWidth-8&&(y.alternateLocation?(Xe=yv(y.alternateLocation.x,Be,y.verticalPos,re),Xe+Be>window.innerWidth-8&&(Xe=void 0)):Xe=void 0),Number.isFinite(Xe)||(Xe=Math.max(8,window.innerWidth-8-Be),8+Be>window.innerWidth-8&&(a.style.right="8px")),Be=Math.min(Xe+Be,window.innerWidth-8)-Xe,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-Xe-Be).toString()}px`:a.style.left=`${Math.ceil(Xe).toString()}px`,a.style.top=`${Math.ceil(ye).toString()}px`,pe!==ae.height&&(a.style.height=`${Math.ceil(pe).toString()}px`),Be!==ae.width&&(a.style.width=`${Math.ceil(Be).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Rc(a){return"submenu"in a}function El(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zh(a){return"type"in a&&a.type==="divider"}function Kh(a){return"type"in a&&a.type==="heading"}var J0={};function Hh(a){let y=J0[a];if(!y){let b;switch(a){case"checkmark":b=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
|
|
|
</span>`;break;case"trailing-chevron":b='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":b='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(b){const E=document.createElement("template");E.innerHTML=b,J0[a]=E,y=E}}if(y){if("content"in y)return y.content.cloneNode(!0);const b=document.createElement("svg");return b.innerHTML=y.innerHTML,b}}var Q0=80,ep=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,Rc(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=El(a)&&a.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var a,y;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(y=this._element)==null||y.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var a;return(a=this._label)!=null?a:""}set label(a){a===void 0&&(a=""),a!==this._label&&(this._label=a,this.dirty=!0)}get visible(){return this._visible}set visible(a){a!==this._visible&&(this._visible=a,this.dirty=!0)}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.element&&(a?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(a){this._checked=a,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(a){a!==this._tooltip&&(this._tooltip=a,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){a!==this._ariaLabel&&(this._ariaLabel=a,this.dirty=!0)}get active(){var a,y;return(y=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?y:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var y,b,E;const ee=this._declaration;if(zh(ee)){this.enabled=!1,this.checked=!1;return}Kh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),El(ee)&&(this.checked=El(ee)&&((y=Bc(ee.checked,a))!=null?y:!1)),(El(ee)||Rc(ee))&&(this.enabled=(b=Bc(ee.enabled,a))!=null?b:!0,this.visible=(E=Bc(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(El(ee)||Kh(ee)||Rc(ee))&&(this.label=Bc(ee.label,a),this.tooltip=Bc(ee.tooltip,a),this.ariaLabel=Bc(ee.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hh("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const y=document.createElement("span");if(y.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&y.classList.add("heading"),y.innerHTML=this.label,a.append(y),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),El(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const b=document.createElement("li");return b.setAttribute("part","menu-divider"),b.setAttribute("role","divider"),this._element=b,b}const a=document.createElement("li");this._element=a,(El(this._declaration)||Kh(this._declaration)||Rc(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(!El(this._declaration))return;const a=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(a)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(a){var y;if(!(!this.visible||!this.enabled)){if(a.type==="click"){this.rootMenu.state==="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}if(a.type==="pointerenter"){const b=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((y=this.parentMenu.activeMenuItem)!=null&&y.movingTowardSubmenu(b))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(a.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(a.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Q0)},Q0)}openSubmenu(a){var y;if(this.type!=="submenu"||!this.element)return;if((y=a==null?void 0:a.withDelay)!=null&&y){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const b=this.element.getBoundingClientRect(),E=q0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Y0(b,"trailing",E),y:b.top-4},alternateLocation:{x:Y0(b,"leading",E),y:b.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const y=this.rootMenu.lastMoveEvent;if(!y)return!1;const b=a.timeStamp-y.timeStamp;if(b>500)return!1;const E=a.clientX-y.clientX;if(wv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),de=this.element.getBoundingClientRect();ae.left<de.left+de.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wv(a,y,b){return Math.hypot(a,y)/b}function Bc(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 Uc{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,de=0;for(const ye of this._menuItems)ye.type==="heading"?(ae&&de===0&&(ae.visible=!1),ae=ye,de=0):ye.type==="divider"&&ae?(ae.visible=de>0,ae=void 0,de=0):ae&&ye.visible&&(de+=1);ae&&(ae.visible=de>0);let pe=!0;for(const ye of this._menuItems)ye.type==="divider"?(ye.visible=!pe,pe=!0):ye.visible&&(pe=!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 Uc._collator||(Uc._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Uc._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(de=>de.type!=="divider"&&de.visible&&de.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(de=>de.label.length))-y.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(b=E.find(de=>Uc.collator.compare(y,de.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),Kt()&&(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),Kt()&&((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=Nu(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Nu(y));let re=!0;const ae=this.activeSubmenu,de=ae.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":de==null||de.select(Nu(y));break;case"ArrowRight":if((de==null?void 0:de.type)==="submenu")de.select(Nu(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!de)ae.activeMenuItem=ae.firstMenuItem;else{const pe=(b=ae.getMenuItemColumn(de))!=null?b:-1;if(pe>=0&&pe<((E=ae.columnCount)!=null?E:1)-1){const ye=ae.nextMenuItem(1);ye&&(ae.activeMenuItem=ye)}}break;case"ArrowLeft":if(ae===this.rootMenu)de||(ae.activeMenuItem=ae.firstMenuItem);else if((de&&(ee=ae.getMenuItemColumn(de))!=null?ee:-1)<=0||!de){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 pe=ae.findMenuItem(this.typingBuffer);pe&&(ae.activeMenuItem=pe),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Sf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const pe=ae.findMenuItem(this.typingBuffer);pe&&(ae.activeMenuItem=pe),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 wl.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),wl.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),wl.state==="open"&&wl.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,wl.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 zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(El(a)||Rc(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||El(a)&&typeof a.checked=="function"?!0:Rc(a)?a.submenu.some(rp):!1}var Gf=class{};Gf.DELAY=300,Gf.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=wf(a);E||y(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),y(xv(ee,E)<Gf.MAX_DISTANCE)},Gf.DELAY),ae=new AbortController,de=ae.signal;for(const pe of["pointermove","pointerup","pointercancel"])window.addEventListener(pe,ye=>{if(ye.type==="pointerup"||ye.type==="pointercancel")clearTimeout(re),ae.abort(),y(!1);else if(ye.type==="pointermove"){const we=wf(ye);we&&(ee=we)}},{passive:!0,signal:de})})}function ip(a,y,b){return gu(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:wf(E),modifiers:Nu(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:Nu(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=wf(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};Dt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(me(Se({},a),{body:ot(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Dt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=$t(ot(a.args[0]));return new z(me(Se({},a),{body:ot(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Dt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(me(Se({},a),{body:ot(a.args[0]),svgAccent:"overarc"}))}),Dt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new js(me(Se({},a),{body:ot(a.args[0]),svgBelow:"underarc"}))}),Dt("utilde","{body:auto}",{createAtom:a=>{const y=ot(a.args[0]),b=$t(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new js(me(Se({},a),{body:y,svgBelow:E,boxType:ru(y)}))}}),Dt("^","{:string}",{createAtom:a=>{var y;return new Bn(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:"^"}))}}),Dt("`","{:string}",{createAtom:a=>{var y;return new Bn(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:"`"}))}}),Dt("'","{:string}",{createAtom:a=>{var y;return new Bn(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:"'"}))}}),Dt('"',"{:string}",{createAtom:a=>{var y,b;return new Bn(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]:'"'}))}}),Dt(".","{:string}",{createAtom:a=>{var y,b;return new Bn(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]:"."}))}}),Dt("=","{:string}",{createAtom:a=>{var y,b;return new Bn(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]:"="}))}}),Dt("~","{:string}",{createAtom:a=>{var y;return new Bn(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"}))}}),Dt("c","{:string}",{createAtom:a=>{var y;return new Bn(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Dt("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 de of ae){const pe=de.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(pe)ee.strokeWidth=pe[1],ee.strokeStyle=pe[2],ee.strokeColor=pe[3];else{const ye=de.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 bd(a.command,ot(E[2]),re,ee)}}),Dt("cancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ot(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:{}})}}),Dt("bcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ot(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:{}})}}),Dt("xcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ot(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:{}})}}),Dt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new js(me(Se({},a),{body:ot((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Dt("overbrace","{:auto}",{createAtom:a=>new js(me(Se({},a),{body:ot(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Dt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new js(me(Se({},a),{body:ot(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Dt(["underbrace"],"{:auto}",{createAtom:a=>new js(me(Se({},a),{body:ot(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Dt(["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 js(me(Se({},a),{svgBody:a.command.slice(1),above:((b=ot((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:ot((E=a.args)==null?void 0:E[1]),below:(re=ot((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)}`}),Dt(["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 Bu(a.command.slice(1),me(Se({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Dt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Bu({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],me(Se({},a),{limits:"over-under",variant:"main"}))}),Dt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Bu(a.command.slice(1),me(Se({},a),{limits:"over-under",variant:"main"}))}),Dt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Bu(a.command.slice(1),me(Se({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Dt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Bn(me(Se({},a),{body:ot(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 dr("\xB0",{style:me(Se({},a.style),{variant:"normal",variantStyle:"up"})});return new dr([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Dt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(me(Se({},a),{body:ot(a.args[1]),index:a.args[0]?ot(a.args[0]):void 0}))}),Dt(["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 _c(E[0]?ot(E[0]):[new vi],E[1]?ot(E[1]):[new vi],y)},serialize:(a,y)=>{const b=a.aboveToLatex(y),E=a.belowToLatex(y);return/^[0-9]$/.test(b)&&/^[0-9]$/.test(E)?`${a.command}${b}${E}`:co(a.command,b,E)}}),Dt(["brace","brack"],"",{infix:!0,createAtom:a=>new _c(ot(a.args[0]),ot(a.args[1]),me(Se({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ca([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Dt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new _c(ot(E[0]),ot(E[1]),me(Se({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ca([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Dt(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var y,b;const E=a.args;return new _c(ot(E[0]),ot(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)}`}),Dt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new _c(ot(a.args[0]),ot(a.args[1]),me(Se({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Dt(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new fh({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[a.command.slice(1)],me(Se({},a),{limits:"auto",variant:"main"}))}),Dt("smallint","",{ifMode:"math",createAtom:a=>new Bu("\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"};Dt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new fh(b,me(Se({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Dt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Bu({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],me(Se({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Dt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(me(Se({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Dt("the","{:value}",{createAtom:a=>new Bn(me(Se({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new Ea({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new dr(((b=Io(re))!=null?b:"").split("").map(ae=>new dr(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=Io(a.args[0]))!=null?y:"\\relax"}`}}),Dt("mathtip","{:auto}{:math}",{createAtom:a=>new hh(me(Se({},a),{body:ot(a.args[0]),tooltip:ot(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Bn.serialize([a.tooltip],me(Se({},y),{defaultMode:"math"}))}}`}),Dt("texttip","{:auto}{:text}",{createAtom:a=>new hh(me(Se({},a),{body:ot(a.args[0]),tooltip:ot(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Bn.serialize([a.tooltip],me(Se({},y),{defaultMode:"text"}))}}`}),Dt("error","{:math}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Dt("ensuremath","{:math}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(me(Se({},y),{defaultMode:"math"}))}}`}),Dt("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Dt("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Dt("boxed","{content:math}",{createAtom:a=>new _o(me(Se({},a),{body:ot(a.args[0]),framecolor:{string:"black"}}))}),Dt("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=Io(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Dt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new _o(me(Se({},a),{body:ot(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"})):co(a.command,(b=Io(a.framecolor))!=null?b:"",(E=Io(a.backgroundcolor))!=null?E:"",a.bodyToLatex(me(Se({},y),{defaultMode:"text"})))}}),Dt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=ot(a.args[1]);return b?new _o(me(Se({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new _o(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=Io(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Io(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return co(ee,a.bodyToLatex(y))}}),Dt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(a.args[0])})),render:(a,y)=>{const b=new Ea({parent:y,mathstyle:a.command.slice(1)},a.style),E=Bn.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):`{${ca([a.command,a.bodyToLatex(y)])}}`}),Dt(["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]})}),Dt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Dt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Dt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Dt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Dt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Dt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Bn(me(Se({},a),{body:ot(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Dt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Dt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Dt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Dt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Dt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Dt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Dt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Dt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Dt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Dt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Dt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Dt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Dt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Dt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Dt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Dt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Dt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Dt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Dt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Dt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Dt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Dt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Dt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Dt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Dt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Dt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Dt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Dt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Dt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Dt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Dt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Dt("mbox","{:text}",{ifMode:"math",createAtom:a=>new Bn(me(Se({},a),{type:"mord",body:ot(a.args[0]),mode:"math"})),serialize:(a,y)=>co("\\mbox",a.bodyToLatex(me(Se({},y),{defaultMode:"text"})))}),Dt("text","{:text}",{ifMode:"math",applyMode:"text"}),Dt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(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:""})}}),Dt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(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}}),Dt("htmlData","{data:string}{content:auto}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(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}}),Dt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(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}}),Dt("em","{:rest}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(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"})}),Dt("emph","{:auto}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(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}};Dt(["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}))}}),Dt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(Se({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Dt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(Se({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Dt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Bn(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Iu||E===ml)&&(b=1),(E===zl||E===ss)&&(b=2),(E===_s||E===Zo)&&(b=3);const ee=ot(a.args[b]);return Bn.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${Bn.serialize(a.args[0],y)}}{${Bn.serialize(a.args[1],y)}}{${Bn.serialize(a.args[2],y)}}{${Bn.serialize(a.args[3],y)}}`}),Dt("mathop","{:auto}",{createAtom:a=>new Bn(me(Se({},a),{type:"mop",body:ot(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=Bn.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 dr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[co(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ca(b)}}),Dt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Bn(me(Se({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:ot(a.args[0])}))}),Dt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=ot(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 Bn(me(Se({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=Bn.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 dr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[co(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ca(b)}}),Dt(["char","unicode"],"{charcode:value}",{createAtom:a=>new Bn(me(Se({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Io((y=a.args[0])!=null?y:{number:10067,base:"hexadecimal"})}`},render:(a,y)=>{let b=y.evaluate(a.args[0]);return(!b||!("number"in b))&&(b={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(b.number),a.createBox(y)}}),Dt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Bn(a),render:(a,y)=>{var b,E,ee;const re=new Ea({parent:y,mathstyle:"textstyle"},a.style),ae=re.toEm((b=a.args[0])!=null?b:{dimension:0}),de=re.toEm((E=a.args[1])!=null?E:{dimension:10}),pe=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),ye=new dr(null,{classes:"rule",type:"ord"});return ye.width=de,ye.height=pe+ae,ye.depth=-ae,ye.setStyle("border-right-width",de,"em"),ye.setStyle("border-top-width",pe,"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]?`[${Io(a.args[0])}]`:""}{${Io(a.args[1])}}{${Io(a.args[2])}}`}),Dt(["overline","underline"],"{:auto}",{createAtom:a=>new Bn(me(Se({},a),{body:ot(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new Ea({parent:y,mathstyle:"cramp"},a.style),ee=Bn.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new dr(null,{classes:b+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let de;return b==="overline"?de=new Qa({shift:0,children:[{box:ee},3*re,{box:ae},re]}):de=new Qa({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(de.caret=a.caret),new dr(de,{classes:b,type:"ignore"})}}),Dt("overset","{:auto}{base:auto}",{createAtom:a=>{const y=ot(a.args[1]);return new js(me(Se({},a),{above:ot(a.args[0]),body:y,skipBoundary:!1,boxType:ru(y)}))},serialize:(a,y)=>co(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Dt("underset","{:auto}{base:auto}",{createAtom:a=>{const y=ot(a.args[1]);return new js(me(Se({},a),{below:ot(a.args[0]),body:y,skipBoundary:!1,boxType:ru(y)}))},serialize:(a,y)=>co(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Dt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=ot(a.args[2]);return new js(me(Se({},a),{above:ot(a.args[0]),below:ot(a.args[1]),body:y,skipBoundary:!1,boxType:ru(y)}))},serialize:(a,y)=>co(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Dt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new js(me(Se({},a),{body:ot(a.args[2]),above:ot(a.args[1]),below:ot(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>co(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Dt("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new wd(me(Se({},a),{body:ot(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}))}}),Dt(["vphantom"],"{:auto}",{createAtom:a=>new wd(me(Se({},a),{body:ot(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Dt(["hphantom"],"{:auto}",{createAtom:a=>new wd(me(Se({},a),{body:ot(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Dt(["phantom"],"{:auto}",{createAtom:a=>new wd(me(Se({},a),{body:ot(a.args[0]),isInvisible:!0}))}),Dt("not","{:math}",{createAtom:a=>{const y=ot(a.args[0]);return y.length===0?new Bn(me(Se({},a),{type:"mrel",value:"\uE020"})):new Bn(me(Se({},a),{body:[new Ru(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{${Bn.serialize(b.group,y)}}`:`\\not${Bn.serialize(b,y)}`:E?"\\not{}":"\\not"},render:(a,y)=>{if(a.value)return a.createBox(y);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":ru(ot(a.args[0])),ee=Bn.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Dt(["ne","neq"],"",{createAtom:a=>new Bn(me(Se({},a),{type:"mrel",body:[new Ru(me(Se({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Bn(me(Se({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Dt("rlap","{:auto}",{createAtom:a=>new Ru(me(Se({},a),{body:ot(a.args[0]),align:"right"}))}),Dt("llap","{:auto}",{createAtom:a=>new Ru(me(Se({},a),{body:ot(a.args[0]),align:"left"}))}),Dt("mathrlap","{:math}",{createAtom:a=>new Ru(me(Se({},a),{body:ot(a.args[0]),align:"left"}))}),Dt("mathllap","{:math}",{createAtom:a=>new Ru(me(Se({},a),{body:ot(a.args[0]),align:"left"}))}),Dt("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new _o(me(Se({},a),{body:ot(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return co("\\raisebox",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Dt("raise","{:value}{:auto}",{createAtom:a=>{var y;return new _o(me(Se({},a),{body:ot(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return co("\\raise",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Dt("lower","{:value}{:auto}",{createAtom:a=>{var y;return new _o(me(Se({},a),{body:ot(a.args[1]),padding:{dimension:0},offset:(y=Vs(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return co("\\lower",(E=Io(Vs((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),ke("0123456789/@.?!"),Ge(65,90),Ge(97,122),ke([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),ke([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),ke([["\\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]]),ke([["\\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"),ke([["\\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"]]),ke([["\\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"]]),ke([["\\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"),ke([["+",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"),ke([["\\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"),ke([["\\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]]),ke([["=",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"),ke([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),ke([["\\wp",8472],["\\aleph",8501]]),ke([["\\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"),ke([["\\ ",160],["~",160]],"space"),Dt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Sd(a)}),Dt("space","",{createAtom:a=>new Sd(a)}),ke([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),ke([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),ke([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>⁡</mo>",Xf="<mo>⁢</mo>";function qf(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function no(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Mv(a,y,b){var E,ee,re,ae,de,pe,ye,we,Be,Xe,dt;let wt=!1;y=y!=null?y:a.atoms.length;let pn="",ur="",ln=a.atoms[a.index];const Zn=(ee=(E=ln.style)==null?void 0:E.variant)!=null?ee:"",fr=(ae=(re=ln.style)==null?void 0:re.variantStyle)!=null?ae:"";let Yn="";if(Zn||fr){const li=bn(ln.value,(de=ln.style)==null?void 0:de.variant,(pe=ln.style)==null?void 0:pe.variantStyle);if(li!==ln.value)return a.index+=1,pn=`<mi${no(ln.id,b)}>${li}</mi>`,Vl(pn,a,b)||(a.mathML+=pn,a.lastType="mi"),!0;Yn=(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"}[fr+Zn])!=null?ye:"",Yn=` mathvariant="${Yn}"`}const Wr={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(ln.command==="!")return a.index+=1,pn="<mo>!</mo>",Vl(pn,a,b)||(a.mathML+=pn,a.lastType="mo"),!0;if(Wr[ln.command]){a.index+=1;let li=`<mi${no(ln.id,b)}${Yn}>${Wr[ln.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(li=Xf+li),Vl(li,a,b)||(a.mathML+=li,a.lastType="mi"),!0}if(ln.command==="\\operatorname")ur=Nc(ln.body),a.index+=1;else if(Zn||fr)for(;a.index<y&&(ln.type==="mord"||ln.type==="macro")&&!ln.isDigit()&&Zn===((Be=(we=ln.style)==null?void 0:we.variant)!=null?Be:"")&&fr===((dt=(Xe=ln.style)==null?void 0:Xe.variantStyle)!=null?dt:"");)ur+=Nc([ln]),a.index+=1,ln=a.atoms[a.index];else(ln.type==="mord"||ln.type==="macro")&&!ln.isDigit()&&(ur+=Nc([ln]),a.index+=1);if(ur.length>0){wt=!0,pn=`<mi${Yn}>${ur}</mi>`;const li=a.lastType;pn.endsWith(">f</mi>")||pn.endsWith(">g</mi>")?(pn+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(pn)?"mo":"mi",Vl(pn,a,b)||((li==="mi"||li==="mn"||li==="mtext"||li==="fence")&&(pn=Xf+pn),a.mathML+=pn)}return wt}function Ev(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function _v(a){let y=-1,b=a.index,E=!1,ee=!1;for(;b<a.atoms.length&&!E&&!ee;){const re=a.atoms[b];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,b++}return ee&&(y=b-1),y}function Vl(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=Ua(ee.superscript,b);y.lastType="";const de=Ua(ee.subscript,b);if(y.lastType=re,!ae&&!de)return!1;let pe="";return ae&&de?pe=`<msubsup>${a}${de}${ae}</msubsup>`:ae?pe=`<msup>${a}${ae}</msup>`:de&&(pe=`<msub>${a}${de}</msub>`),y.mathML+=pe,y.lastType="",!0}function kv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="";for(;a.index<y&&a.atoms[a.index].mode==="text";)ee+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return ee.length>0?(a.mathML+=`<mtext ${no(a.atoms[E].id,b)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Lv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="",re=_v(a);for(re>=0&&re<y&&(y=re);a.index<y&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+no(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Ev(a)&&(re=a.index,a.index+=1),Vl(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Av(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let ae=!1,de=0;const pe=a.index;let ye=-1,we=pe+1;for(;we<y&&!ae;)a.atoms[we].type==="mopen"?de+=1:a.atoms[we].type==="mclose"&&(de-=1),de===-1&&(ae=!0,ye=we),we+=1;ae&&(ee="<mrow>",ee+=Zu(a.atoms[pe],b),ee+=Ua(a.atoms,b,pe+1,ye),ee+=Zu(a.atoms[ye],b),ee+="</mrow>",a.index=ye+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Xf),Vl(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Tv(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const de={"\\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(de[ae.command]){a.index+=1;const pe=`<mo${no(ae.id,b)}>${de[ae.command]}</mo>`;return Vl(pe,a,b)||(a.mathML+=pe,a.lastType="mo"),!0}if(a.index<y&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wh(a.atoms[a.index],b),a.index+=1,re="mo";else if(a.index<y&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const pe=Zu(ae,b);return ae.superscript&&ae.subscript?(ee+="<munderover>"+pe,ee+=Ua(ae.subscript,b),ee+=Ua(ae.superscript,b),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+pe,ee+=Ua(ae.superscript,b),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+pe,ee+=Ua(ae.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const pe=a.atoms[a.index],ye=pe.value==="\\operatorname",we=ye?'<mi class="MathML-Unit"'+no(pe.id,b)+">"+Nc(pe.value)+"</mi>":Zu(pe,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=Xf+ee),a.index+=1}return ee.length>0&&(E=!0,Vl(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Ua(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 Bn)ee.mathML=Wh(a,y);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(kv(ee,E,y)||Lv(ee,E,y)||Mv(ee,E,y)||Tv(ee,E,y)||Av(ee,E,y))re+=1;else if(ee.index<E){let ae=Wh(ee.atoms[ee.index],y);ee.lastType==="mn"&&ae.length>0&&ee.atoms[ee.index].type==="genfrac"&&(ae="<mo>⁤</mo>"+ae),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,Vl(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 Zu(a,y){let b="";const E=Nc(a.value);return E&&(b="<mo"+no(a.id,y)+">"+E+"</mo>"),b}function Nc(a){if(!a)return"";if(typeof a=="string")return qf(a);if(!Array.isArray(a)&&typeof a.body=="string")return qf(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return qf(y)}function Wh(a,y){var b,E,ee,re,ae,de,pe,ye,we,Be,Xe,dt,wt,pn,ur,ln,Zn,fr,Yn,Wr,li,qr;if(a.mode==="text")return`<mi${no(a.id,y)}>${a.value}</mi>`;const Da={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},Ya={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Mr="",Fs="",kl,Xs,Yo,zs,Ms,ro;const{command:Lo}=a;if(a.command==="\\error")return`<merror${no(a.id,y)}>${Ua(a.body,y)}</merror>`;const Jo={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Ll={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":Mr=Ua(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Mr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Mr+="<mo>"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>")),Mr+="<mtable",a.colFormat){for(Mr+=' columnalign="',Yo=0;Yo<a.colFormat.length;Yo++)a.colFormat[Yo].align&&(Mr+={l:"left",c:"center",r:"right"}[a.colFormat[Yo].align]+" ");Mr+='"'}for(Mr+=">",Xs=0;Xs<a.array.length;Xs++){for(Mr+="<mtr>",kl=0;kl<a.array[Xs].length;kl++)Mr+="<mtd>"+Ua(a.array[Xs][kl],y)+"</mtd>";Mr+="</mtr>"}Mr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Mr+="<mo>"+(Jo[a.leftDelim]||a.rightDelim)+"</mo>"),Mr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Mr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Mr+="<mo"+no(a.id,y)+">"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Mr+="<mfrac>",Mr+=Ua(a.above,y)||"<mi> </mi>",Mr+=Ua(a.below,y)||"<mi> </mi>",Mr+="</mfrac>"):(Mr+="<mtable"+no(a.id,y)+">",Mr+="<mtr>"+Ua(a.above,y)+"</mtr>",Mr+="<mtr>"+Ua(a.below,y)+"</mtr>",Mr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Mr+="<mo"+no(a.id,y)+">"+(Jo[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Mr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Mr+="<msqrt"+no(a.id,y)+">",Mr+=Ua(a.body,y),Mr+="</msqrt>"):(Mr+="<mroot"+no(a.id,y)+">",Mr+=Ua(a.body,y),Mr+=Ua(a.above,y),Mr+="</mroot>");break;case"leftright":const Al=a,Tl=Al.leftDelim;Mr="<mrow>",Tl&&Tl!=="."&&(Mr+=`<mo${no(a.id,y)}>${(b=Jo[Tl])!=null?b:Tl}</mo>`),a.body&&(Mr+=Ua(a.body,y));const Il=Al.matchingRightDelim();Il&&Il!=="."&&(Mr+=`<mo${no(a.id,y)}>${(E=Jo[Il])!=null?E:Il}</mo>`),Mr+="</mrow>";break;case"sizeddelim":case"delim":Mr+=`<mo${no(a.id,y)}>${Jo[a.value]||a.value}</mo>`;break;case"accent":Mr+='<mover accent="true"'+no(a.id,y)+">",Mr+=Ua(a.body,y),Mr+="<mo>"+(Ll[Lo]||a.accent)+"</mo>",Mr+="</mover>";break;case"line":case"overlap":break;case"overunder":Ms=a.above,zs=a.below,(a.svgAbove||Ms)&&(a.svgBelow||zs)?ro=a.body:Ms&&Ms.length>0?(ro=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(zs=a.body[0].below,ro=a.body[0].body):((de=(ae=a.body)==null?void 0:ae[0])==null?void 0:de.type)==="first"&&((ye=(pe=a.body)==null?void 0:pe[1])!=null&&ye.below)&&(zs=a.body[1].below,ro=a.body[1].body)):zs&&zs.length>0&&(ro=a.body,(Be=(we=a.body)==null?void 0:we[0])!=null&&Be.above?(Ms=a.body[0].above,ro=a.body[0].body):((dt=(Xe=a.body)==null?void 0:Xe[0])==null?void 0:dt.type)==="first"&&((pn=(wt=a.body)==null?void 0:wt[1])!=null&&pn.above)&&(Ms=a.body[1].overscript,ro=a.body[1].body)),(a.svgAbove||Ms)&&(a.svgBelow||zs)?(Mr+=`<munderover ${no(a.id,y)}>`,Mr+=(ur=Da[a.svgBody])!=null?ur:Ua(ro,y),Mr+=(ln=Da[a.svgBelow])!=null?ln:Ua(zs,y),Mr+=(Zn=Da[a.svgAbove])!=null?Zn:Ua(Ms,y),Mr+="</munderover>"):a.svgAbove||Ms?(Mr+=`<mover ${no(a.id,y)}>`+((fr=Da[a.svgBody])!=null?fr:Ua(ro,y)),Mr+=(Yn=Da[a.svgAbove])!=null?Yn:Ua(Ms,y),Mr+="</mover>"):(a.svgBelow||zs)&&(Mr+=`<munder ${no(a.id,y)}>`+((Wr=Da[a.svgBody])!=null?Wr:Ua(ro,y)),Mr+=(li=Da[a.svgBelow])!=null?li:Ua(zs,y),Mr+="</munder>");break;case"placeholder":Mr+="?";break;case"mord":{Mr=typeof a.value=="string"?a.value:Lo,Lo==="\\char"?Mr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Mr.length>0&&Mr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Mr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Mr=a.value.charAt(0):(console.error("Did not expect this"),Mr=""));const ul=/\d/.test(Mr)?"mn":"mi";Mr=`<${ul}${no(a.id,y)}>${qf(Mr)}</${ul}>`;break}case"mbin":case"mrel":case"minner":Mr=Zu(a,y);break;case"mpunct":Mr='<mo separator="true"'+no(a.id,y)+">"+Lo+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Mr="<mo"+no(a.id,y)+">",Mr+=Lo==="\\operatorname"?a.body:Lo||a.body,Mr+="</mo>");break;case"box":Mr='<menclose notation="box"',a.backgroundcolor&&(Mr+=' mathbackground="'+a.backgroundcolor+'"'),Mr+=no(a.id,y)+">"+Ua(a.body,y)+"</menclose>";break;case"spacing":Mr+='<mspace width="'+((qr=Ya[Lo])!=null?qr:0)+'em"/>';break;case"enclose":Mr='<menclose notation="';for(const ul in a.notation)Object.prototype.hasOwnProperty.call(a.notation,ul)&&a.notation[ul]&&(Mr+=Fs+ul,Fs=" ");Mr+=no(a.id,y)+'">'+Ua(a.body,y)+"</menclose>";break;case"prompt":Mr='<menclose notation="roundexbox""">'+Ua(a.body,y)+"</menclose>";break;case"space":Mr+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Mr+=Zu(a,y);break;case"mclose":Mr+=Zu(a,y);break;case"macro":{const ul=a.command+Nc(a.macroArgs);ul&&(Mr+=`<mo ${no(a.id,y)}>${ul}</mo>`)}break;case"latexgroup":Mr+=Ua(a.body,y);break;case"latex":Mr+="<mtext"+no(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":Mr+=Ua(a.body,y);break;case"text":Mr+=`<mtext ${no(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${no(a.id,y)} displaystyle="true">${Ua(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${no(a.id,y)} displaystyle="false">${Ua(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Mr}var $c={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Uh={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Iv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function Nd(a){let y=0;if(Oe(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Dv(a){if(Oe(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function up(a){let y="";if(Oe(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Pv(a){return a?a.map(y=>y.value).join(""):""}function xa(a,y){var b,E,ee,re,ae;function de(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 pe(we){return"<emphasis>"+we+"</emphasis>"}if(!y)return"";let ye="";if(Oe(y)){let we=!1,Be=!1;for(let Xe=0;Xe<y.length;Xe++)y[Xe].type!=="first"&&(y[Xe].mode!=="text"&&(Be=!1),Xe<y.length-2&&y[Xe].type==="mopen"&&y[Xe+2].type==="mclose"&&y[Xe+1].type==="mord"?(ye+=" of ",ye+=pe(xa(a,y[Xe+1])),Xe+=2):y[Xe].mode==="text"?Be?ye+=(b=y[Xe].value)!=null?b:" ":(Be=!0,ye+=xa("text",y[Xe])):y[Xe].isDigit()?we?ye+=y[Xe].asDigit():(we=!0,ye+=xa(a,y[Xe])):(we=!1,ye+=xa(a,y[Xe])))}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="",Be="",Xe="",dt=!1;const{command:wt}=y;switch(wt){case"\\vec":return"vector "+xa(a,y.body);case"\\acute":return xa(a,y.body)+" acute";case"\\grave":return xa(a,y.body)+" grave";case"\\dot":return"dot over"+xa(a,y.body);case"\\ddot":return"double dot over"+xa(a,y.body);case"\\mathring":return"ring over"+xa(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+xa(a,y.body);case"\\bar":return xa(a,y.body)+" bar";case"\\breve":return xa(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+xa(a,y.body);case"\\hat":case"\\widehat":return"hat over"+xa(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+xa(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+xa(a,y.body)}switch(y.type){case"prompt":const pn=y.body.length>1?'start input . <break time="500ms"/> '+xa(a,y.body)+'. <break time="500ms"/> end input':"blank";ye+=' <break time="300ms"/> '+pn+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const ur=y.array,ln=y.environmentName;if(Object.keys(Uh).includes(ln)){ye+=` begin ${Uh[ln]} `;for(let Yn=0;Yn<ur.length;Yn++){Yn>0&&(ye+=","),ye+=` row ${Yn+1} `;for(let Wr=0;Wr<ur[Yn].length;Wr++)Wr>0&&(ye+=","),ye+=` column ${Wr+1}: `,ye+=xa("math",ur[Yn][Wr])}ye+=` end ${Uh[ln]} `}break;case"group":wt==="\\ne"?ye+=" not equal ":(wt==="\\not"&&(ye+=" not "),ye+=xa("math",y.body));break;case"root":ye+=xa("math",y.body);break;case"genfrac":if(we=xa("math",y.above),Be=xa("math",y.below),Nd(y.above)&&Nd(y.below)){const Wr={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[up(y.above)+"/"+up(y.below)];Wr?ye=Wr:ye+=we+" over "+Be}else ye+=' the fraction <break time="150ms"/>'+we+' over <break time="150ms"/>'+Be+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(Xe=xa("math",y.body),y.hasEmptyBranch("above"))ye+=Nd(y.body)?" the square root of "+Xe+" , ":' the square root of <break time="200ms"/>'+Xe+'. <break time="200ms"/> End square root';else{let Yn=xa("math",y.above);Yn=Yn.trim();const Wr=Yn.replace(/<mark([^/]*)\/>/g,"");Wr==="3"?ye+=' the cube root of <break time="200ms"/>'+Xe+'. <break time="200ms"/> End cube root':Wr==="n"?ye+=' the nth root of <break time="200ms"/>'+Xe+'. <break time="200ms"/> End root':ye+=' the root with index: <break time="200ms"/>'+Yn+', of <break time="200ms"/>'+Xe+'. <break time="200ms"/> End root'}break;case"leftright":{const Yn=y;ye+=(ee=Yn.leftDelim?$c[Yn.leftDelim]:void 0)!=null?ee:Yn.leftDelim,ye+=xa("math",y.body),ye+=(re=Yn.rightDelim?$c[Yn.rightDelim]:void 0)!=null?re:Yn.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const Zn=wt.replace(/^\\/g,""),fr=qn()[Zn];fr&&(fr!=null&&fr.expand?ye+=xa("math",y.body):ye+=`${Zn} `);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(wt==="\\mathbin"||wt==="\\mathrel"||wt==="\\mathopen"||wt==="\\mathclose"||wt==="\\mathpunct"||wt==="\\mathord"||wt==="\\mathinner"){ye=xa(a,y.body);break}let Yn=y.isDigit()?y.asDigit():y.value,Wr=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(Wr=y.value,Yn=Wr),a==="text")ye+=Yn;else{if(y.type==="mbin"&&(ye+='<break time="150ms"/>'),Yn){const li=$c[Yn]||(Wr?$c[Wr.trim()]:"");if(li)ye+=" "+li;else{const qr=Wr?Iv(Wr.trim()):"";ye+=qr||de(Yn)}}else ye+=xa("math",y.body);y.type==="mbin"&&(ye+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const Yn=y.command;if(Yn==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Wr=xa("math",y.superscript);Wr=Wr.trim();let li=xa("math",y.subscript);li=li.trim(),ye+=' the summation from <break time="200ms"/>'+li+'<break time="200ms"/> to <break time="200ms"/>'+Wr+'<break time="200ms"/> of <break time="150ms"/>',dt=!0}else if(y.hasEmptyBranch("subscript"))ye+=" the summation of";else{let Wr=xa("math",y.subscript);Wr=Wr.trim(),ye+=' the summation from <break time="200ms"/>'+Wr+'<break time="200ms"/> of <break time="150ms"/>',dt=!0}else if(Yn==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Wr=xa("math",y.superscript);Wr=Wr.trim();let li=xa("math",y.subscript);li=li.trim(),ye+=' the product from <break time="200ms"/>'+li+'<break time="200ms"/> to <break time="200ms"/>'+Wr+'<break time="200ms"/> of <break time="150ms"/>',dt=!0}else if(y.hasEmptyBranch("subscript"))ye+=" the product of ";else{let Wr=xa("math",y.subscript);Wr=Wr.trim(),ye+=' the product from <break time="200ms"/>'+Wr+'<break time="200ms"/> of <break time="150ms"/>',dt=!0}else if(Yn==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Wr=xa("math",y.superscript);Wr=Wr.trim();let li=xa("math",y.subscript);li=li.trim(),ye+=' the integral from <break time="200ms"/>'+pe(li)+'<break time="200ms"/> to <break time="200ms"/>'+pe(Wr)+' <break time="200ms"/> of ',dt=!0}else ye+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const Wr=(ae=$c[y.value])!=null?ae:y.command?$c[y.command]:void 0;ye+=Wr||" "+y.value}else y.command&&(y.command==="\\mathop"?ye+=xa("math",y.body):y.command==="\\operatorname"?ye+=Pv(y.body):ye+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":Xe=xa("math",y.body),ye+=" crossed out "+Xe+". End crossed out.";break;case"space":case"spacing":break}if(!dt&&!y.hasEmptyBranch("superscript")){let pn=xa(a,y.superscript);pn=pn.trim();const ur=pn.replace(/<[^>]*>/g,"");if(Nd(y.superscript)){if(a==="math"){const ln=Dv(y.superscript);ln&&(ye+='<mark name="'+ln+'"/>')}ur==="\u2032"?ye+=" prime ":ur==="2"?ye+=" squared ":ur==="3"?ye+=" cubed ":Number.isNaN(Number.parseInt(ur))?ye+=" to the "+pn+"; ":ye+=' to the <say-as interpret-as="ordinal">'+ur+"</say-as> power; "}else Number.isNaN(Number.parseInt(ur))?ye+=" raised to the "+pn+"; ":ye+=' raised to the <say-as interpret-as="ordinal">'+ur+"</say-as> power; "}if(!dt&&!y.hasEmptyBranch("subscript")){let pn=xa("math",y.subscript);pn=pn.trim(),ye+=Nd(y.subscript)?" sub "+pn:" subscript "+pn+". End subscript. "}}return ye}function Fc(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Ua(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(de){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",de)}return ae}return""}let E=xa("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"&&Ee()==="macos"?E=E.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):E=E.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return E}var $d={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},Fd={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Ov(a){let y="";for(const b of a){const E=y[y.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(b)&&(y+=" "),y+=b}return y}function ko(a){var y,b,E,ee,re,ae,de,pe,ye,we,Be,Xe,dt;if(!a)return"";if(Oe(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(ko).join("");if(a[0].mode==="text"){let fr=0,Yn="";for(;((y=a[fr])==null?void 0:y.mode)==="text";)Yn+=a[fr].body?ko(a[fr].body):a[fr].value,fr++;return`"${Yn}" ${ko(a.slice(fr))}`}let ln=0;const Zn=[];for(;a[ln]&&a[ln].mode==="math";){let fr="";for(;a[ln]&&a[ln].type==="mord"&&/\d/.test(a[ln].value);)fr+=a[ln++].value;fr?Zn.push(fr):Zn.push(ko(a[ln++]))}return Zn.push(ko(a.slice(ln))),Ov(Zn)}if(a.mode==="text")return`"${a.value}"`;let wt="";const{command:pn}=a;let ur;if(pn==="\\placeholder")return`(${ko(a.body)})`;switch(a.type){case"accent":const ln={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[pn];wt=`${ln!=null?ln:""} ${ko(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(qr=>qr.value).join("");case"group":case"root":wt=(b=$d[pn])!=null?b:ko(a.body);break;case"genfrac":{const qr=a;(qr.leftDelim||qr.rightDelim)&&(wt=qr.leftDelim==="."||!qr.leftDelim?"{:":qr.leftDelim),qr.hasBarLine?(wt+="(",wt+=ko(qr.above),wt+=")/(",wt+=ko(qr.below),wt+=")"):(wt+="("+ko(qr.above)+"),",wt+="("+ko(qr.below)+")"),(qr.leftDelim||qr.rightDelim)&&(wt+=qr.rightDelim==="."||!qr.rightDelim?"{:":qr.rightDelim)}break;case"surd":wt+=a.hasEmptyBranch("above")?"sqrt("+ko(a.body)+")":"root("+ko(a.above)+")("+ko(a.body)+")";break;case"latex":wt=a.value;break;case"leftright":{const qr=a,Da=qr.leftDelim;wt+=Da==="."||!Da?"{:":Da,wt+=ko(qr.body);const Ya=qr.matchingRightDelim();wt+=Ya==="."||!Ya?":}":Ya}break;case"sizeddelim":case"delim":wt=a.value;break;case"overlap":break;case"overunder":break;case"mord":wt=(ee=(E=$d[pn])!=null?E:pn)!=null?ee:typeof a.value=="string"?a.value:"",wt.startsWith("\\")&&(wt+=" "),ur=pn?pn.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,ur?wt=String.fromCodePoint(Number.parseInt("0x"+ur[1])):wt.length>0&&wt.startsWith("\\")&&(wt=typeof a.value=="string"?a.value.charAt(0):a.command),wt=Rv(wt,a.style);break;case"mbin":case"mrel":case"minner":wt=(ae=(re=$d[pn])!=null?re:Fd[pn])!=null?ae:a.value;break;case"mopen":case"mclose":wt=a.value;break;case"mpunct":wt=(de=Fd[pn])!=null?de:pn;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Fd[pn]?wt=Fd[pn]:wt=pn==="\\operatorname"?ko(a.body):(pe=a.value)!=null?pe:pn,wt+=" ");break;case"array":const Zn=a.array,fr=a.environmentName,Yn=(ye={bmatrix:["[","]"],"bmatrix*":["[","]"]}[fr])!=null?ye:["(",")"],Wr=[];for(const qr of Zn){const Da=[];for(const Ya of qr)Da.push(Yn[0]+ko(Ya)+Yn[1]);Wr.push(Da.join(","))}const li=(we={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[fr])!=null?we:["(",")"];wt=li[0]+Wr.join(",")+li[1];break;case"box":break;case"spacing":wt=(Be=$d[pn])!=null?Be:" ";break;case"enclose":wt="("+ko(a.body)+")";break;case"space":wt=" ";break;case"subsup":wt="";break;case"macro":wt=(dt=(Xe=$d[pn])!=null?Xe:Fd[pn])!=null?dt:ko(a.body);break}if(!a.hasEmptyBranch("subscript")){wt+="_";const ln=ko(a.subscript);wt+=ln.length!==1?`(${ln})`:ln}if(!a.hasEmptyBranch("superscript")){wt+="^";const ln=ko(a.superscript);wt+=ln.length!==1?`(${ln})`:ln}return wt}function Rv(a,y){if(!y)return a;let b=a;return y.variant==="double-struck"&&(b=`bbb "${b}"`),y.variant==="script"&&(b=`cc "${b}"`),y.variant==="fraktur"&&(b=`fr "${b}"`),y.variant==="sans-serif"&&(b=`sf "${b}"`),y.variant==="monospace"&&(b=`tt "${b}"`),y.variantStyle==="bold"&&(b=`bb "${b}"`),y.color?`color({${y.color}})(${b})`:b}function qo(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new Ea({from:me(Se({},bc()),{renderPlaceholder:()=>new dr(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),ae=new Bn({mode:"math",type:"root",body:Xo(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return ae?(gc(Cd(ae,ee)),vc(ae,{classes:"ML__latex"}).toMarkup()):""}function k1(a){return t0(a,{context:bc()})}function Bv(a,y={}){return Ua(Xo(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Nv(a){const y=Xo(a,{parseMode:"math",mathstyle:"displaystyle"});return Fc(y)}var Yf;function $v(a){var y,b;if(!Yf){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?Yf=new E:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(b=Yf==null?void 0:Yf.box(a).latex)!=null?b:""}function L1(a,y="math"){return ko(new Bn({type:"root",body:Xo(a,{parseMode:y})}))}function A1(a){return Ou(a,{format:"ascii-math"})[1]}function Vh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Kv(a):"a"in a?cp(a):a}function zc(a){return a<0?0:a>255?255:Math.round(a)}function Fv(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&typeof y.a=="undefined"&&(y.a=1),y}function Zh(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,de={L:y,C:ee,H:ae};return a.alpha!==void 0&&(de.alpha=a.alpha),de}function jh(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),de=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,pe=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,ye=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,we=Be=>{const Xe=Math.abs(Be);return Xe<=.0031308?Be*12.92:(Math.sign(Be)||1)*(1.055*Math.pow(Xe,1/2.4)-.055)};return[we(de),we(pe),we(ye)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xh(a,y){let[b,E,ee]=a;return b=zc(b*255),E=zc(E*255),ee=zc(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function cp(a){let[y,b,E]=jh(a);if(Gh([y,b,E]))return Xh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=jh(Zh(ee)),!Gh([y,b,E]))return Xh([y,b,E],a.alpha);let re=0,ae=a.L,de=(re+ae)/2;ee.C=de;const pe=.36/Math.pow(2,12);for(;ae-re>pe;)de=(re+ae)/2,ee.C=de,[y,b,E]=jh(Zh(ee)),Gh([y,b,E])?re=de:ae=de;return Xh([y,b,E],a.alpha)}function Kv(a){return cp(Zh(a))}function dp(a,y){const b=Vh(a),E=Vh(y),ee=.56,re=.57,ae=.62,de=.65,pe=.022,ye=1.414,we=.1,Be=5e-4,Xe=1.14,dt=.027,wt=1.14,pn=.027;function ur(qr){return qr>=pe?qr:qr+Dl(pe-qr,ye)}function ln(qr){return(qr<0?-1:1)*Math.pow(Math.abs(qr),2.4)}const Zn=ur(ln(E.r/255)*.2126729+ln(E.g/255)*.7151522+ln(E.b/255)*.072175),fr=ur(ln(b.r/255)*.2126729+ln(b.g/255)*.7151522+ln(b.b/255)*.072175);let Yn,Wr,li;return Math.abs(fr-Zn)<Be?Wr=0:fr>Zn?(Yn=Dl(fr,ee)-Dl(Zn,re),Wr=Yn*Xe):(Yn=Dl(fr,de)-Dl(Zn,ae),Wr=Yn*wt),Math.abs(Wr)<we?li=0:Wr>0?li=Wr-pn:li=Wr+dt,li*100}function fp(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=dp(a,b),ee=dp(a,y);return Math.abs(E)>Math.abs(ee)?b:y}function Hv(a){const y=Vh(a);let b=((1<<24)+(zc(y.r)<<16)+(zc(y.g)<<8)+zc(y.b)).toString(16).slice(1);return y.alpha!==void 0&&y.alpha<1&&(b+=("00"+Math.round(y.alpha*255).toString(16)).slice(-2)),b[0]===b[1]&&b[2]===b[3]&&b[4]===b[5]&&b[6]===b[7]&&(b=b[0]+b[2]+b[4]+(y.alpha!==void 0&&y.alpha<1?b[6]:"")),"#"+b}function mo(a){const y=hp(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function hp(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=hp(a);if(b.length!==1)return!1;const E=ph[y];return E?!!E.test(b[0].value):!1}function Uv(a,y){return mo(a).length>0}function Vv(a){return[qh(a,"double-struck","mathbb","tooltip.blackboard"),qh(a,"fraktur","mathfrak","tooltip.fraktur"),qh(a,"calligraphic","mathcal","tooltip.caligraphic"),Yh(a,"up","mathrm","tooltip.roman-upright"),Yh(a,"bold","mathbf","tooltip.bold"),Yh(a,"italic","mathit","tooltip.italic")]}function Zv(a){return[{label:()=>qo(`\\vec{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overrightarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overleftarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>qo(`\\dot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>qo(`\\ddot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>qo(`\\bar{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overgroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>qo(`\\overbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>qo(`\\underline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>qo(`\\undergroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>qo(`\\underbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function jv(a){return[{label:()=>qo(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>qo(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>qo(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gv(a){const y=[];for(const b of Object.keys(We))y.push({class:(Hv(fp(We[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${We[b]} "></span>`,ariaLabel:()=>{var E;return(E=lt(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(je))y.push({class:(fp(je[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${je[b]} "></span>`,ariaLabel:()=>{var E;return(E=lt(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}var qv=class extends ep{constructor(a,y,b,E){super(a,y),this.row=b,this.col=E}set active(a){const y=this.parentMenu.children;if(a)for(const b of y)b.element.classList.toggle("active",b.row<=this.row&&b.col<=this.col);else for(const b of y)b.element.classList.remove("active")}};function Yv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new qv(ee,re,b,E),label:"\u2610",tooltip:()=>lt("tooltip.row-by-col",b,E),data:{row:b,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(b).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return y}function Jv(a){return[{label:()=>lt("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>ju(a)},{label:()=>lt("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>ju(a)},{label:()=>lt("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>ju(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>lt("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>ju(a)},{type:"divider"},{label:()=>lt("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>ju(a)},{label:()=>lt("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>ju(a)},{type:"divider"},{label:()=>lt("menu.borders"),visible:()=>(Qv(a)||ju(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>zd(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>zd(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>zd(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>zd(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>zd(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>lt("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Yv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>lt("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>lt("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Ac(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>lt("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Ac(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>lt("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>lt("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:Vv(a),submenuClass:"variant-submenu"},{label:()=>lt("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>lt("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>lt("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Zv(a),submenuClass:"variant-submenu"},{label:()=>lt("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&mo(a).length>0,submenu:jv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>lt("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:()=>lt("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?lt("menu.solve-for",qo(b)):lt("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:()=>lt("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>lt("menu.copy"),id:"copy",submenu:[{label:()=>lt("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Hi.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>lt("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Hi.copyToClipboard(a,"ascii-math")},{label:()=>lt("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Hi.copyToClipboard(a,"math-ml")}]},{label:()=>lt("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>lt("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function ju(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qv(a){return a.model.at(a.model.position).type==="array"}function e1(a){var y;const b=(y=a.model.parentEnvironment)==null?void 0:y.array;return b?[b.length,b.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function zd(a,y){Mf(a),a.flushInlineShortcutBuffer(),D0(a.model,y),Mo(a)}function t1(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function qh(a,y,b,E){return{label:()=>qo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=lt(E))!=null?ee:E},visible:()=>Wv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Yh(a,y,b,E){return{label:()=>qo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=lt(E))!=null?ee:E},visible:()=>Uv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Kc(a,y){return a+Fc(y)}Ls({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,ee;b=b!=null?b:{withHighlighting:!1};const{model:re}=a;function ae(we){let Be=null;switch(we){case"all":Be=re.root;break;case"selection":Be=re.getAtoms(re.selection);break;case"left":{Be=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{Be=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":Be=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:Xe}=re.at(re.position);Xe!=null&&Xe.parent?Be=Xe:Be=re.root;break}default:Be=re.root}return Be}function de(we){let Be="";switch(we){case"all":console.log("Internal failure: speak all failed");break;case"selection":Be="no selection";break;case"left":Be="at start";break;case"right":Be="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Be="no parent";break;default:console.log('unknown speak_ param value: "'+we+'"');break}return Be}const pe=ae(y);if(pe===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,de(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const ye=Fc(pe);return nt()&&b.withHighlighting?(mu().readAloudMathfield=a,$u(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(!nt()){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 de=new Uint8Array(ae.AudioStream),pe=new Blob([de.buffer],{type:"audio/mpeg"}),ye=URL.createObjectURL(pe);new Audio(ye).play().catch(Be=>console.log(Be))}else console.log("polly.synthesizeSpeech():",ae)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function pp(a){var y;let b;if(a.parent.type==="prompt")a.parentBranch==="body"&&(b="prompt");else if(a.parentBranch==="body")b=a.type&&(y={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?y:"parent";else if(a.parent.type==="genfrac"){if(a.parentBranch==="above")return"numerator";if(a.parentBranch==="below")return"denominator"}else a.parent.type==="surd"?a.parentBranch==="above"&&(b="index"):a.parentBranch==="superscript"?b="superscript":a.parentBranch==="subscript"&&(b="subscript");return b||console.log("unknown relationship"),b!=null?b:"parent"}function i1(a,y,b,E){let ee="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ee=Kc("deleted: ",E);else if(y==="focus"||y.includes("move"))ee=a1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(y==="replacement")ee=Kc("",a.model.at(a.model.position));else if(y==="line"){const re=Kc("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Kc(y+" ",E):y;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=b.parent;const re=a.at(a.position).parent;for(;ee!==a.root&&ee!==re;)E+=`out of ${pp(ee)};`,ee=ee.parent;return E}function o1(a){if(!a.selectionIsCollapsed)return Kc("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=pp(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Kc("",b),y}var s1=class{constructor(a,y,b){this.mathfield=a,this.mode=y,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=b}dispose(){this.mathfield=void 0}getState(){const a={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(a.direction=this.selection.direction),{content:this.root.toJson(),selection:a,mode:this.mode}}setState(a,y){var b;const E=this.silenceNotifications;this.silenceNotifications=(b=y==null?void 0:y.silenceNotifications)!=null?b:!0;let ee={};if((y==null?void 0:y.type)==="undo"&&(ee={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=du(a.content),this.selection=a.selection,this.silenceNotifications=re,this.contentDidChange(ee)}this.silenceNotifications=E}get atoms(){return this.root.children}get selection(){return this._selection}set selection(a){this.setSelection(a)}setSelection(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var b,E,ee;const re=this.normalizeSelection(a,y);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const 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=jo(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const de=this.at(ae[0]+1),pe=this.at(ae[1]),ye=Bn.commonAncestor(de,pe);(ye==null?void 0:ye.type)==="array"&&de.parent===ye&&pe.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 ns&&b.isSuggestion&&(b.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(a){this.setSelection(a,a)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(a="forward"){return this._anchor===this._position?!1:(a==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(a){return this.atoms[a]}offsetOf(a){return this.atoms.indexOf(a)}getSiblingsRange(a){const y=this.at(a),{parent:b}=y;if(!b)return[0,this.lastOffset];const E=y.parent.branch(y.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,y){const b=this.at(a).branch(y);return[this.offsetOf(b[0]),this.offsetOf(b[b.length-1])]}getAtoms(a,y,b){let E=b!=null?b:{};if(wc(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(gl(a)){if(ee=a,!gl(y))return[];re=y}else[ee,re]=a,E=y!=null?y:{};if(!Number.isFinite(ee))return[];E.includeChildren===void 0&&(E.includeChildren=!1),ee<0&&(ee=this.lastOffset-ee+1),re<0&&(re=this.lastOffset-re+1);const ae=Math.min(ee,re)+1,de=Math.max(ee,re);if(!E.includeChildren&&ae===1&&de===this.lastOffset)return[this.root];let pe=[];for(let ye=ae;ye<=de;ye++){const we=this.atoms[ye];mp(this,we,ae,de)&&pe.push(we)}return E.includeChildren||(pe=pe.filter(ye=>{let we=!1,{parent:Be}=ye;for(;Be&&!we;)we=mp(this,Be,ae,de),Be=Be.parent;return!we})),pe}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 Bn({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 Bn.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 Ua(a);if(b==="spoken")return Fc(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Fc(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=Fc(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?ko(a):(console.error(`MathLive 0.98.5: Unexpected format "${b}`),"")}getValue(a,y,b){if(a===void 0)return this.atomToString(this.root,"latex");if(typeof a=="string"&&a!=="math-json")return this.atomToString(this.root,a);let E,ee;if(gl(a)&&gl(y)?(E=[this.normalizeRange([a,y])],ee=b):xc(a)?(E=[this.normalizeRange(a)],ee=y):wc(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 ca(E.map(ae=>Bn.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const b=this.normalizeRange([a,y]);let[E,ee]=b,{parent:re}=this.at(ee);if(re&&(re.type==="genfrac"||re.type==="subsup"))for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&Jh(this,re,[E,ee]);)E=this.offsetOf(re.leftSibling),re=re.parent;if(re=this.at(ee).parent,(re==null?void 0:re.type)==="genfrac")for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),console.assert(ee>=0),re=re.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,y,b=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:y,atoms:b},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;y();const de=this.root.changeCounter!==ae,pe=E!==this._anchor||ee!==this._position||Pu(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&de&&this.contentDidChange({inputType:a.type}),a.selection&&pe&&this.selectionDidChange(),de||pe}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[y,b]=a;return y=this.normalizeOffset(y),b=this.normalizeOffset(b),y<b?[y,b]:[b,y]}normalizeSelection(a,y){var b;let E;if(gl(a)){const ee=this.normalizeOffset(a);if(gl(y)){const re=this.normalizeOffset(y);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(xc(a)){const ee=this.normalizeOffset(a[0]),re=this.normalizeOffset(a[1]);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else wc(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(Ml(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(Ml(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,y,b,E){const ee=a.offsetOf(y);if(ee<b||ee>E)return!1;if(!y.hasChildren)return!0;const re=a.offsetOf(y.firstChild);if(re>=b&&re<=E){const ae=a.offsetOf(y.lastChild);if(ae>=b&&ae<=E)return!0}return!1}function Jh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ee]=b,re=a.offsetOf(y.firstChild),ae=a.offsetOf(y.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Kd(a,y,b,E){var ee,re,ae,de,pe,ye;const we=b.parent;if(we&&b instanceof Wa){const Be=!E&&y==="forward"||E==="body"&&y==="backward";let Xe=Be?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return Be?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),Xe--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),Xe--),a.position=Xe,!0}if(we&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const Be=b.leftSibling;b.hasChildren&&we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),a.position=a.offsetOf(Be)}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 Be=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return we.addChildrenAfter(b.removeBranch("body"),b),we.removeChild(b),a.position=a.offsetOf(Be),!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 Be=Hd.fractionNavigationOrder==="numerator-denominator"?"above":"below",Xe=Be==="above"?"below":"above";if(we&&(y==="forward"&&E===Be||y==="backward"&&E===Xe)){const dt=b.removeBranch(Be),wt=b.removeBranch(Xe);return we.addChildrenAfter([...dt,...wt],b),we.removeChild(b),a.position=a.offsetOf(dt.length>0?dt[dt.length-1]:wt[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 Be=y==="forward"?(ae=(ee=b.superscript)==null?void 0:ee[0])!=null?ae:(re=b.subscript)==null?void 0:re[0]:(ye=(de=b.subscript)==null?void 0:de[0].lastSibling)!=null?ye:(pe=b.superscript)==null?void 0:pe[0].lastSibling;return Be&&(a.position=a.offsetOf(Be)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const Be=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=Be,!0}if(E==="superscript")if(y==="backward"){const Be=a.offsetOf(b.firstChild)-1;console.assert(Be>=0),a.position=Be}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 Be=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=Be}return!0}if((we==null?void 0:we.type)==="genfrac"&&!E&&b.type!=="first"){let Be=a.offsetOf(b.leftSibling);return we.removeChild(b),we.hasEmptyBranch("above")&&we.hasEmptyBranch("below")?(Be=a.offsetOf(we.leftSibling),we.parent.removeChild(we),a.announce("delete",void 0,[we]),a.position=Be,!0):(a.announce("delete",void 0,[b]),a.position=Be,!0)}if(y==="backward"&&((we==null?void 0:we.command)==="\\ln"||(we==null?void 0:we.command)==="\\log")&&b.parentBranch!=="body"){const Be=a.offsetOf(we.leftSibling);return we.parent.removeChild(we),a.announce("delete",void 0,[we]),a.position=Be,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let y=a.at(a.position);if(!(y&&Kd(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Kd(a,"backward",y.parent,y.parentBranch))return;y=null}if(!y){a.announce("plonk");return}a.position=a.offsetOf(y.leftSibling),y.parent.removeChild(y),a.announce("delete",void 0,[y])}}):_l(a,jo(a.selection),"deleteContentBackward")}function u1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var y,b;let E=a.at(a.position).rightSibling;if(E&&Kd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return;E=void 0}if(a.position===a.lastOffset||!E){a.announce("plonk");return}E.parent.removeChild(E);let ee=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):_l(a,jo(a.selection),"deleteContentForward")}function _l(a,y,b){const E=a.getAtoms(y);if(E.length>0&&E[0].parent){let ee=E[0].parent.firstChild;ee.type==="first"&&(ee=ee.rightSibling);const re=E[E.length-1].parent.lastChild;let ae=E[0];ae.type==="first"&&(ae=ae.rightSibling);const de=E[E.length-1];if(ae===ee&&de===re){const pe=E[0].parent;pe.parent&&pe.type!=="prompt"&&(y=[a.offsetOf(pe.leftSibling),a.offsetOf(pe)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const pe=E[0].parent,ye=E[0].parentBranch==="below"?"above":"below",we=a.offsetOf(pe.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var Be,Xe;const dt=pe.removeBranch(ye);if(dt.length===1&&dt[0].type==="placeholder")(Xe=pe.parent)==null||Xe.removeChild(pe),a.position=Math.max(0,we);else{const wt=pe.parent.addChildrenAfter(dt,pe);(Be=pe.parent)==null||Be.removeChild(pe),a.position=a.offsetOf(wt)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ls({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&_l(a,[0,-1],"deleteContent"),deleteForward:a=>u1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&_l(a,[a.anchor,kh(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&_l(a,[a.anchor,kh(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&_l(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&_l(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&_l(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&_l(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var c1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${lt("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="${lt("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,f1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=Se(me(Se({},Rf()),{macros:qn(),registers:ou()}),Of(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 de=A0(this.options),pe=new Bn({type:"root",mode:de,body:Xo(ae,{context:this.context})});this.model=new s1(this,de,pe),this.undoManager=new Ng(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(c1),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=Ye.subscribe(()=>Ye.update(this.element)),Ye.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",Be=>Be.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(Ml(this)))},{signal:re}),this._menu=new Sv(Jv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const we=this.element.querySelector("[part=menu-toggle]");we==null||we.addEventListener("pointerdown",Be=>{if(Be.currentTarget!==we||this._menu.state!=="closed")return;this.element.classList.add("tracking");const Xe=we.getBoundingClientRect();this._menu.modifiers=Nu(Be),this._menu.show({target:we,location:{x:Xe.left,y:Xe.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Be.preventDefault(),Be.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(()=>Mo(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),_d&&!Ye.locale.startsWith(_d.locale)&&$m(Ye.locale),$s!=="ready"&&document.fonts.ready.then(()=>Af(this)),a.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(a){this._defaultStyle=a}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const a=this.model.at(this.model.position),y=this.adoptStyle==="right"?a.rightSibling:a;if(!y)return this.defaultStyle;if(y.type==="group"){const b=y.branch("body");return!b||b.length<2?{}:this.adoptStyle==="right"?b[1].computedStyle:b[b.length-1].computedStyle}return y.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this)),jf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,$h())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:bl(this.field))!=null?b:void 0,ee=a==null?void 0:a.modifiers,re=this.element.querySelector("[part=container]");return this._menu.show({target:re,location:E,modifiers:ee})}get colorMap(){return a=>{var y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:At(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:Qe(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=Bn.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=Ph(this,a);"verbatimColor"in y&&delete y.verbatimColor,"verbatimBackgroundColor"in y&&delete y.verbatimBackgroundColor;const b=Object.keys(y).length;if(b===0)return"all";if(b>1){for(const pe of Object.keys(y)){const ye=this.queryStyle({[pe]:y[pe]});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 de=0;for(const pe of re){if(pe.type==="first"){ae-=1;continue}pe.style[E]===ee&&(de+=1)}return de===0?"none":de===ae?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=jm(this.options.keybindings,(a=kd())!=null?a:Fm());return((y=kd())==null?void 0:y.score)>0&&(this._keybindings=b,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),b}get menu(){return this._menu}setOptions(a){var y;this.options=Se(Se({},this.options),Of(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=Bn.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&Hi.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)&&Mo(this)}getOptions(a){return zu(this.options,a)}getOption(a){return zu(this.options,a)}handleEvent(a){return gu(this,null,function*(){var y;if(Rs(this)){if(Ch(a)){if(!yd(a.origin,(y=this.options.originValidator)!=null?y:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:b}=a.data;if(b==="execute-command"){const E=a.data.command;if(Ic(E)==="virtual-keyboard")return;this.executeCommand(E)}else b==="update-state"||(b==="focus"?this.focus({preventScroll:!0}):b==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&U0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(U0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&jf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rs(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rs(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Rs(this))return;Ye.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const a=this.element;delete a.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,Gg(),Qm(),mv()}flushInlineShortcutBuffer(a){if(a!=null||(a={defer:!1}),!a.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(a){return Ic(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Ml(this))),!1):og(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,y,b){return this.model.getValue(a,y,b)}setValue(a,y){var b;y=y!=null?y:{mode:"math"},y.insertionMode===void 0&&(y.insertionMode="replaceAll"),(y.format===void 0||y.format==="auto")&&(y.format="latex"),(y.mode===void 0||y.mode==="auto")&&(y.mode=(b=ah(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();Hi.insert(this.model,a,y)&&(Mo(this),E||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const a=window.MathfieldElement.computeEngine;return a?a.box(a.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var a;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const E=window.mathVirtualKeyboard.boundingRect,ee=this.host.getBoundingClientRect();ee.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,ee.bottom-E.top+8))}}this.dirty&&$u(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=bl(this.field);else{const E=vd(this);if(E.length>0){let ee=-1/0,re=-1/0;for(const ae of E)ae.right>ee&&(ee=ae.right),ae.top<re&&(re=ae.top);b={x:ee+y.left-this.field.scrollLeft,y:re+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),ee=b.y;let re=this.host.scrollTop;ee<E.top?re=ee-E.top+this.host.scrollTop:ee>E.bottom&&(re=ee-E.bottom+this.host.scrollTop+b.height),this.host.scroll({top:re,left:0})}if(b){const E=b.x-window.scrollX;let ee=this.field.scrollLeft;E<y.left?ee=E-y.left+this.field.scrollLeft-20:E>y.right&&(ee=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,y){return typeof a!="string"||a.length===0&&((y==null?void 0:y.insertionMode)==="insertBefore"||(y==null?void 0:y.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),y=y!=null?y:{mode:"math"},y.focus&&this.focus(),y.feedback&&(window.MathfieldElement.keypressVibration&&Je()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?T0(this.model):a==="&"?I0(this.model):this.model.selectionIsCollapsed?Hi.insert(this.model,a,Se({style:this.model.at(this.model.position).computedStyle},y)):Hi.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Mo(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 de=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const pe=Xo(y,{context:this.context,parseMode:a});ae.collapseSelection("forward");const ye=ae.at(ae.position);ae.position=ae.offsetOf(ye.parent.addChildrenAfter(pe,ye)),de=!0}if(this.model.mode=a,a==="latex"){let pe=ae.selectionIsCollapsed;Ac(this,"accept");let ye,we=ae.at(ae.position);if(pe)ye="\\";else{const Xe=jo(ae.selection);ye=this.model.getValue(Xe,"latex");const dt=this.model.extractAtoms(Xe);dt.length===1&&dt[0].type==="placeholder"&&(ye=y,pe=!0),we=ae.at(Xe[0])}const Be=new xd(ye);we.parent.addChildAfter(Be,we),pe?ae.position=ae.offsetOf(Be.lastChild):ae.setSelection(ae.offsetOf(Be.firstChild),ae.offsetOf(Be.lastChild))}else Ld(ae).forEach(pe=>{pe.isError=!1});if(b){const pe=Xo(b,{context:this.context,parseMode:re});ae.collapseSelection("forward");const ye=ae.at(ae.position);ae.position=ae.offsetOf(ye.parent.addChildrenAfter(pe,ye)),de=!0}return Mo(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),de}),this.model.mode=a,window.mathVirtualKeyboard.update(Ml(this))}hasFocus(){return!this.blurred}focus(a){var y;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(y=a==null?void 0:a.preventScroll)!=null&&y||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,y={}){var b,E;const ee={operation:"set",silenceNotifications:!1};xc(y)?ee.range=y:(y.operation==="toggle"&&(ee.operation="toggle"),ee.range=y.range,ee.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const re=Ph(this,a),ae=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(ae==="set"){this.defaultStyle=Se(Se({},this.defaultStyle),re);return}const de=Se({},this.defaultStyle);for(const pe of Object.keys(re))de[pe]===re[pe]?(pe==="color"&&delete de.verbatimColor,pe==="backgroundColor"&&delete de.verbatimBackgroundColor,delete de[pe]):de[pe]=re[pe];this.defaultStyle=de;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const de of this.model.selection.ranges)Eh(this.model,de,re,{operation:ae});else Eh(this.model,ee.range,re,{operation:ae})}),Mo(this)}toggleContextMenu(){var a;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(a=this.getCaretPoint())!=null?a:void 0,onDismiss:()=>{var y;return(y=this.element)==null?void 0:y.focus()}}),!0):!1}getCaretPoint(){const a=bl(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=Bd(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),Mo(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()),Mo(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),Mo(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(Ml(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(Ml(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(Ml(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var a;(a=this.undoManager)==null||a.reset()}onSelectionDidChange(){var a,y;const b=this.model;this.keyboardDelegate.setValue(b.getValue(this.model.selection,"latex-expanded"));{const E=b.at(b.position),ee=(a=E.mode)!=null?a:A0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Ac(this,"accept",{mode:ee}),b.position=b.offsetOf(E)):this.switchMode(ee))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ml(this)),jf(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(),$u(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var a,y,b;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Tc(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(y=this.host)==null||y.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(b=this.host)==null||b.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Mo(this),this.focusBlurInProgress=!1,$h();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Rs(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Th(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(jo(this.model.selection));const y=bl(this.field);y&&requestAnimationFrame(()=>{$u(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),Mo(this)}onCompositionEnd(a){Ag(this.model),Th(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Hi.onCopy(this,a),_l(this.model,jo(this.model.selection),"deleteByCut"),this.snapshot("cut"),Mo(this))}onCopy(a){Hi.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=Hi.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),y||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),y}onGeometryChange(){this._menu.hide(),_f(this),jf(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=>Di(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function gp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)gp(y)}function Qh(a,y){var b;a&&(!y||((b=a.dataset)==null?void 0:b.atomId)===y?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E,y)})))}function h1(a,y){var b;if(!nt())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(y);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"json",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};mu().readAloudElement=a,E.synthesizeSpeech(ee,(re,ae)=>{if(re){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);return}if(!(ae!=null&&ae.AudioStream)){console.log("polly.synthesizeSpeech():",ae);return}const de=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));mu().readAloudMarks=de.split(`
|
|
|
`).map(pe=>pe?JSON.parse(pe):{}),mu().readAloudTokens=[];for(const pe of mu().readAloudMarks)pe.value&&mu().readAloudTokens.push(pe.value);mu().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(pe,ye)=>{if(pe){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${pe}`);return}if(!(ye!=null&&ye.AudioStream))return;const we=new Uint8Array(ye.AudioStream),Be=new Blob([we.buffer],{type:"audio/mpeg"}),Xe=URL.createObjectURL(Be),dt=mu();dt.readAloudAudio?dt.readAloudAudio.pause():(dt.readAloudAudio=new Audio,dt.readAloudAudio.addEventListener("ended",()=>{const wt=dt.readAloudMathfield;dt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),wt?($u(wt),dt.readAloudElement=null,dt.readAloudMathfield=null,dt.readAloudTokens=[],dt.readAloudMarks=[],dt.readAloudCurrentMark=""):gp(dt.readAloudElement)}),dt.readAloudAudio.addEventListener("timeupdate",()=>{let wt="";const pn=dt.readAloudAudio.currentTime*1e3+100;for(const ur of dt.readAloudMarks)ur.time<pn&&(wt=ur.value);dt.readAloudCurrentMark!==wt&&(dt.readAloudCurrentToken=wt,wt&&wt===dt.readAloudFinalToken?dt.readAloudAudio.pause():(dt.readAloudCurrentMark=wt,Qh(dt.readAloudElement,dt.readAloudCurrentMark)))})),dt.readAloudAudio.src=Xe,dt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),dt.readAloudAudio.play()})})}nt()||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 Ba=new WeakMap,p1=.5,pu={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},rs=class Gu extends HTMLElement{static get formAssociated(){return Hc()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(y){y!==this._fontsDirectory&&(this._fontsDirectory=y,ng())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(y){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(y){this._soundsDirectory=y,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(y){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(y){var b,E,ee;this.audioBuffers={},y===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof y=="string"?this._keypressSound={spacebar:y,return:y,delete:y,default:y}:typeof y=="object"&&"default"in y&&(this._keypressSound={spacebar:(b=y.spacebar)!=null?b:y.default,return:(E=y.return)!=null?E:y.default,delete:(ee=y.delete)!=null?ee:y.default,default:y.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(y){this.audioBuffers={},this._plonkSound=y}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(y){this._speechEngine=y}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(y){this._speechEngineRate=y}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(y){this._speechEngineVoice=y}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(y){this._textToSpeechMarkup=y}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(y){this._textToSpeechRules=y}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(y){this._textToSpeechRulesOptions=y}static get locale(){return Ye.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),Ye.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 Ye.strings}static set strings(y){Ye.merge(y)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(y){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(y){this._decimalSeparator=y,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(y){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var y,b;if(this._computeEngine===void 0){const E=(y=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(b=this._computeEngine)!=null?b:null}static set computeEngine(y){this._computeEngine=y}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(y){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(y){this._isFunction=y}static loadSound(y){return gu(this,null,function*(){delete this.audioBuffers[y];let b="";switch(y){case"keypress":b=this._keypressSound.default;break;case"return":b=this._keypressSound.return;break;case"spacebar":b=this._keypressSound.spacebar;break;case"delete":b=this._keypressSound.delete;break;case"plonk":b=this.plonkSound;break}if(typeof b!="string")return;b=b.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||b==="none"||b==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${b}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=ae}catch(ee){}})}static playSound(y){return gu(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[y]||(yield this.loadSound(y)),!this.audioBuffers[y])return;const b=this.audioContext.createBufferSource();b.buffer=this.audioBuffers[y];const E=this.audioContext.createGain();E.gain.value=p1,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(pu[E])if(pu[E].startsWith("mf."))if(pu[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pu[E]}`);else{const ee=pu[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pu[E]}`);if(b.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const E of b)console.warn(E);console.groupEnd()}}if(Hc()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[cu("core"),cu("mathfield"),cu("mathfield-element"),cu("ui"),cu("menu")],this.shadowRoot.appendChild(document.createElement("span"));const b=document.createElement("slot");b.style.display="none",this.shadowRoot.appendChild(b)}else this.shadowRoot.innerHTML="<style>"+Hl("core")+Hl("mathfield")+Hl("mathfield-element")+Hl("ui")+Hl("menu")+'</style><span></span><slot style="display:none"></slot>';y&&this._setOptions(y),this.shadowRoot.addEventListener("slotchange",()=>{var b;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(b=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?b:""})}showMenu(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.showMenu(y))!=null?E:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",y=>{var b;y.target===this&&!((b=this._mathfield)!=null&&b.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:y.altKey,button:y.button,buttons:y.buttons,clientX:y.clientX,clientY:y.clientY,ctrlKey:y.ctrlKey,metaKey:y.metaKey,movementX:y.movementX,movementY:y.movementY,relatedTarget:y.relatedTarget,screenX:y.screenX,screenY:y.screenY,shiftKey:y.shiftKey}))},{once:!0})}getPromptValue(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?ee:""}setPromptValue(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(y,b,E)}getPromptRange(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptRange(y))!=null?E:null}getPrompts(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPrompts(y))!=null?E:[]}get form(){var y;return(y=this._internals)==null?void 0:y.form}get name(){var y;return(y=this.getAttribute("name"))!=null?y:""}get type(){return this.localName}get mode(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.mode)!=null?b:this.defaultMode==="text"?"text":"math"}set mode(y){var b;(b=this._mathfield)==null||b.switchMode(y)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(y){var b,E;if(!this._mathfield)return;const ee=(E=(b=Gu.computeEngine)==null?void 0:b.box(y).latex)!=null?E:null;ee!==null&&this._mathfield.setValue(ee),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.errors)!=null?b:[]}_getOptions(y){return this._mathfield?zu(this._mathfield.options,y):Ba.has(this)?Se({},zu(Se(Se({},Rf()),Of(Ba.get(this).options)),y)):null}getOptions(y){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?zu(this._mathfield.options,y):Ba.has(this)?zu(Se(Se({},Rf()),Of(Ba.get(this).options)),y):null}reflectAttributes(){const y=Rf(),b=this._getOptions();Object.keys(Gu.optionsAttributes).forEach(E=>{const ee=Zl(E);Gu.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Gu.optionsAttributes[E]==="boolean"?b[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[ee]=="string"||typeof b[ee]=="number")&&this.setAttribute(E,b[ee].toString()))})}getOption(y){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([y])[y]}_getOption(y){return this._getOptions([y])[y]}_setOptions(y){if(this._mathfield)this._mathfield.setOptions(y);else if(Ba.has(this)){const b=Se(Se({},Ba.get(this).options),y);Ba.set(this,me(Se({},Ba.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Ba.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:y,menuItems:void 0});this.reflectAttributes()}setOptions(y){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const b of Object.keys(y))pu[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${pu[b]}`);console.groupEnd(),this._setOptions(y)}executeCommand(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.executeCommand(y))!=null?E:!1}getValue(y,b,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(Ba.has(this)){let ae,de,pe;if(wc(y)?([ae,de]=y.ranges[0],pe=b):xc(y)?([ae,de]=y,pe=b):gl(y)&&gl(b)?(ae=y,de=b,pe=E):(ae=0,de=-1,pe=y),(pe===void 0||pe==="latex")&&ae===0&&de===-1)return(re=(ee=Ba.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(Ba.has(this)){const ee=Ba.get(this).options;Ba.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Wd(this);Ba.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?Bd(this._mathfield,y,b,E):-1}hitboxFromOffset(y){if(!this._mathfield)return null;const b=this._mathfield.model.at(y);if(!b)return null;const E=lu(this._mathfield,b);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var y;(y=this._mathfield)==null||y.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(y){var b,E,ee,re;wl.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,de=re.userSelect!=="none";if(de)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),Hc()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),de&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const pe=ae.querySelector("slot:not([name])");if(pe)try{this._style=pe.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=pe==null?void 0:pe.assignedNodes().map(we=>we.nodeType===3?we.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(ae.querySelector(":host > span"),me(Se({},(E=(b=Ba.get(this))==null?void 0:b.options)!=null?E:Wd(this)),{eventSink:this,value:ye})),!Ba.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const we of Object.keys(Gu.optionsAttributes))this.upgradeProperty(Zl(we))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Ba.has(this)){const we=this._mathfield,Be=Ba.get(this),Xe=Be.menuItems;we.model.deferNotifications({content:!1,selection:!1},()=>{const dt=Be.value;dt!==void 0&&we.setValue(dt),we.model.selection=Be.selection,Ba.delete(this)}),Xe&&(this.menuItems=Xe)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Lf()}disconnectedCallback(){var y,b;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const E=zu(this._mathfield.options,Object.keys(Gu.optionsAttributes).map(ee=>Zl(ee)));Ba.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":Mo(this._mathfield);break;case"disabled":this.disabled=ee;break;case"read-only":case"readonly":this.readOnly=ee;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(y){const b=!!y;b?(this.setAttribute("readonly",""),Hc()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Hc()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:b})}get disabled(){return this.hasAttribute("disabled")}set disabled(y){var b;const E=!!y;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Hc()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((b=this._mathfield)!=null&&b.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(y){this.setValue(y)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(y){this._setOptions({defaultMode:y})}get macros(){return this._getOption("macros")}set macros(y){this._setOptions({macros:y})}get registers(){const y=this;return new Proxy({},{get:(b,E)=>{if(typeof E=="string")return y._getOption("registers")[E]},set(b,E,ee){return typeof E!="string"?!1:(y._setOptions({registers:me(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=Ba.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}Ba.has(this)?Ba.set(this,me(Se({},Ba.get(this)),{menuItems:y})):Ba.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Wd(this),menuItems:y})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(y){this._setOptions({mathVirtualKeyboardPolicy:y})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(y){this._setOptions({inlineShortcuts:y})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(y){this._setOptions({inlineShortcutTimeout:y})}get keybindings(){return this._getOption("keybindings")}set keybindings(y){this._setOptions({keybindings:y})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(y){this._setOptions({onInlineShortcut:y})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(y){this._setOptions({onScrollIntoView:y})}get onExport(){return this._getOption("onExport")}set onExport(y){this._setOptions({onExport:y})}get readOnly(){return this._getOption("readOnly")}set readOnly(y){this._setOptions({readOnly:y})}get isSelectionEditable(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.isSelectionEditable)!=null?b:!1}setPromptState(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(y,b,E)}getPromptState(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptState(y))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(y){this._setOptions({virtualKeyboardTargetOrigin:y})}get selection(){return this._mathfield?this._mathfield.model.selection:Ba.has(this)?Ba.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,Mo(this._mathfield);return}if(Ba.has(this)){Ba.set(this,me(Se({},Ba.get(this)),{selection:y}));return}Ba.set(this,{value:void 0,selection:y,options:Wd(this),menuItems:void 0})}get selectionIsCollapsed(){const y=this.selection;return y.ranges.length===1&&y.ranges[0][0]===y.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Ba.has(this)?Ba.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,Mo(this._mathfield)),Ba.has(this)){Ba.set(this,me(Se({},Ba.get(this)),{selection:{ranges:[[y,y]]}}));return}Ba.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Wd(this),menuItems:void 0})}getOffsetDepth(y){var b,E;return this._mathfield?((E=(b=this._mathfield.model.at(y))==null?void 0:b.treeDepth)!=null?E:2)-2:0}get lastOffset(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.lastOffset)!=null?b:-1}};rs.version="0.98.5",rs._fontsDirectory="./fonts",rs._soundsDirectory="./sounds",rs.keypressVibration=!0,rs._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},rs._plonkSound="plonk.wav",rs.audioBuffers={},rs.createHTML=a=>a,rs._speechEngineRate="100%",rs._speechEngineVoice="Joanna",rs._textToSpeechMarkup="",rs._textToSpeechRules="mathlive",rs._textToSpeechRulesOptions={},rs.speakHook=r1,rs.readAloudHook=h1,rs._decimalSeparator=".",rs.fractionNavigationOrder="numerator-denominator",rs._isFunction=a=>{var y,b;const E=window.MathfieldElement.computeEngine;return(b=(y=E==null?void 0:E.parse(a).domain)==null?void 0:y.isFunction)!=null?b:!1};var Hd=rs;function Zl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Wd(a){const y={readOnly:!1},b=Hd.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=ee!=null?ee:"":b[E]==="boolean"?y[Zl(E)]=!0:b[E]==="on/off"?ee==="on"?y[Zl(E)]=!0:ee==="off"?y[Zl(E)]=!1:y[Zl(E)]=void 0:b[E]==="number"?y[Zl(E)]=Number.parseFloat(ee!=null?ee:"0"):y[Zl(E)]=ee}}),y}function Hc(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=Hd,yp,bp,xp,wp;if(nt()&&!((yp=window.customElements)!=null&&yp.get("math-field"))){(xp=window[bp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[bp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Hd,(wp=window.customElements)==null||wp.define("math-field",Hd)}function m1(a,y,b){let E=b,ee=0;const re=a.length;for(;E<y.length;){const ae=y[E];if(ee<=0&&y.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jf(a,y,b,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const de=ae.data;let pe=!0,ye=0,we;we=de.indexOf(y),we!==-1&&(ye=we,ye>0&&re.push({type:"text",data:de.slice(0,ye)}),pe=!1);let Be=!1;for(;!Be;){if(pe){if(we=de.indexOf(y,ye),we===-1){Be=!0;break}ye!==we&&re.push({type:"text",data:de.slice(ye,we)}),ye=we}else{if(we=m1(b,de,ye+y.length),we===-1){Be=!0;break}let Xe=de.slice(ye+y.length,we);ee==="ascii-math"&&([,Xe]=Ou(Xe,{format:"ascii-math"})),re.push({type:"math",data:Xe,rawData:de.slice(ye,we+b.length),mathstyle:E}),ye=we+b.length}pe=!pe}ye<de.length&&re.push({type:"text",data:de.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=Jf(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle","ascii-math")}),E}function g1(a,y){const b=document.createElement("span");b.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+y.renderToMathML(a)+"</math>";b.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),b.textContent=a}return b.className="ML__sr-only",b}function v1(a,y,b,E){try{const ee=y.renderToMarkup(a,{mathstyle:b,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=b==="displaystyle"?"flex":"inline-flex",re.setAttribute("aria-hidden","true"),re.setAttribute("translate","no"),re.innerHTML=window.MathfieldElement.createHTML(ee),re}catch(ee){if(console.error("Could not parse'"+a+"' with ",ee),E)return document.createTextNode(a)}return null}function Wc(a,y,b,E){var ee;const re=v1(a,b,y||"textstyle",E),ae=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const de=document.createElement("span");if(/\bmathml\b/i.test(ae)&&b.renderToMathML&&de.append(g1(a,b)),/\bspeakable-text\b/i.test(ae)&&b.renderToSpeakableText){const pe=document.createElement("span");pe.setAttribute("translate","no");const ye=b.renderToSpeakableText(a);pe.innerHTML=window.MathfieldElement.createHTML(ye),pe.className="ML__sr-only",de.append(pe)}return de.append(re),de}return re}function y1(a,y){var b,E,ee;let re=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=Wc(a,"",y,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=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 de of ae)if(de.type==="text")re.appendChild(document.createTextNode(de.data));else{const pe=Wc(de.data,de.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);pe&&re.appendChild(pe)}}return re}function Cp(a,y){var b,E,ee,re,ae,de,pe,ye,we,Be,Xe,dt,wt,pn,ur,ln;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Zn=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(Zn)){a.textContent="";const Yn=Wc(Zn,"",y,!0);Yn&&a.append(Yn);return}const fr=Sp(Zn,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(fr.length===1&&fr[0].type==="math"){a.textContent="";const Yn=Wc(fr[0].data,fr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Yn&&a.append(Yn);return}if(fr.length===1&&fr[0].type==="text")return}for(let Zn=a.childNodes.length-1;Zn>=0;Zn--){const fr=a.childNodes[Zn];if(fr.nodeType===3){const Yn=y1((ae=fr.textContent)!=null?ae:"",y);Yn&&(Zn+=Yn.childNodes.length-1,fr.replaceWith(Yn))}else if(fr.nodeType===1){const Yn=fr,Wr=fr.nodeName.toLowerCase();if(Wr==="script"){const li=fr;let qr;if((de=y.processScriptTypePattern)!=null&&de.test(li.type))qr=(pe=li.textContent)!=null?pe:"";else if((ye=y.processMathJSONScriptTypePattern)!=null&&ye.test(li.type))try{qr=(Be=y.serializeToLatex)==null?void 0:Be.call(y,JSON.parse((we=li.textContent)!=null?we:""))}catch(Da){console.error(Da)}if(qr){let Da="textstyle";for(const Mr of li.type.split(";")){const[Fs,kl]=Mr.toLowerCase().split("=");Fs.trim()==="mode"&&(Da=kl.trim()==="display"?"displaystyle":"textstyle")}const Ya=Wc(qr,Da,y,!0);Ya&&li.parentNode.replaceChild(Ya,li)}}else if(((dt=(Xe=y.processClassPattern)==null?void 0:Xe.test(Yn.className))!=null?dt:!1)||!((pn=(wt=y.skipTags)==null?void 0:wt.includes(Wr))!=null&&pn||(ln=(ur=y.ignoreClassPattern)==null?void 0:ur.test(Yn.className))!=null&&ln))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const qr=a.textContent;a.textContent="";const Da=Wc(qr!=null?qr:"","displaystyle",y,!0);Da&&a.append(Da)}else Cp(Yn,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:""),Lf(),ks("core"),Cp(a,ae)}catch(ae){ae instanceof Error?console.error("renderMathInElement(): "+ae.message):console.error("renderMathInElement(): Could not render math for element",a)}}function w1(a,y){const b=fu.singleton;return b?(b.show(),Id(),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}Ls({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function mu(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function T1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function I1(a){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 de=y!=null?y:{};(b=de.renderToMarkup)!=null||(de.renderToMarkup=qo),(E=de.renderToMathML)!=null||(de.renderToMathML=Bv),(ee=de.renderToSpeakableText)!=null||(de.renderToSpeakableText=Nv),(re=de.serializeToLatex)!=null||(de.serializeToLatex=$v),x1(ae,de)}var D1={mathlive:"0.98.5"}},17423:function(mn,Vt,le){"use strict";le.d(Vt,{Z:function(){return Se}});const be=me=>typeof me=="object"&&me!=null&&me.nodeType===1,Ve=(me,Pe)=>(!Pe||me!=="hidden")&&me!=="visible"&&me!=="clip",$e=(me,Pe)=>{if(me.clientHeight<me.scrollHeight||me.clientWidth<me.scrollWidth){const at=getComputedStyle(me,null);return Ve(at.overflowY,Pe)||Ve(at.overflowX,Pe)||(Oe=>{const ht=(nt=>{if(!nt.ownerDocument||!nt.ownerDocument.defaultView)return null;try{return nt.ownerDocument.defaultView.frameElement}catch(rt){return null}})(Oe);return!!ht&&(ht.clientHeight<Oe.scrollHeight||ht.clientWidth<Oe.scrollWidth)})(me)}return!1},et=(me,Pe,at,Oe,ht,nt,rt,Je)=>nt<me&&rt>Pe||nt>me&&rt<Pe?0:nt<=me&&Je<=at||rt>=Pe&&Je>=at?nt-me-Oe:rt>Pe&&Je<at||nt<me&&Je>at?rt-Pe+ht:0,ge=me=>{const Pe=me.parentElement;return Pe==null?me.getRootNode().host||null:Pe},Te=(me,Pe)=>{var at,Oe,ht,nt;if(typeof document=="undefined")return[];const{scrollMode:rt,block:Je,inline:Ee,boundary:pt,skipOverflowHiddenElements:Kt}=Pe,Ye=typeof pt=="function"?pt:nn=>nn!==pt;if(!be(me))throw new TypeError("Invalid target");const lt=document.scrollingElement||document.documentElement,Me=[];let xe=me;for(;be(xe)&&Ye(xe);){if(xe=ge(xe),xe===lt){Me.push(xe);break}xe!=null&&xe===document.body&&$e(xe)&&!$e(document.documentElement)||xe!=null&&$e(xe,Kt)&&Me.push(xe)}const We=(Oe=(at=window.visualViewport)==null?void 0:at.width)!=null?Oe:innerWidth,je=(nt=(ht=window.visualViewport)==null?void 0:ht.height)!=null?nt:innerHeight,{scrollX:Et,scrollY:vt}=window,{height:At,width:Qe,top:Bt,right:Lt,bottom:hn,left:ut}=me.getBoundingClientRect(),{top:Yt,right:vn,bottom:un,left:Ze}=(nn=>{const tt=window.getComputedStyle(nn);return{top:parseFloat(tt.scrollMarginTop)||0,right:parseFloat(tt.scrollMarginRight)||0,bottom:parseFloat(tt.scrollMarginBottom)||0,left:parseFloat(tt.scrollMarginLeft)||0}})(me);let Ae=Je==="start"||Je==="nearest"?Bt-Yt:Je==="end"?hn+un:Bt+At/2-Yt+un,Pt=Ee==="center"?ut+Qe/2-Ze+vn:Ee==="end"?Lt+vn:ut-Ze;const bn=[];for(let nn=0;nn<Me.length;nn++){const tt=Me[nn],{height:ot,width:Ht,top:En,right:fn,bottom:Gt,left:Ft}=tt.getBoundingClientRect();if(rt==="if-needed"&&Bt>=0&&ut>=0&&hn<=je&&Lt<=We&&Bt>=En&&hn<=Gt&&ut>=Ft&&Lt<=fn)return bn;const xn=getComputedStyle(tt),gn=parseInt(xn.borderLeftWidth,10),_e=parseInt(xn.borderTopWidth,10),ce=parseInt(xn.borderRightWidth,10),se=parseInt(xn.borderBottomWidth,10);let he=0,fe=0;const oe="offsetWidth"in tt?tt.offsetWidth-tt.clientWidth-gn-ce:0,ke="offsetHeight"in tt?tt.offsetHeight-tt.clientHeight-_e-se:0,Ge="offsetWidth"in tt?tt.offsetWidth===0?0:Ht/tt.offsetWidth:0,St="offsetHeight"in tt?tt.offsetHeight===0?0:ot/tt.offsetHeight:0;if(lt===tt)he=Je==="start"?Ae:Je==="end"?Ae-je:Je==="nearest"?et(vt,vt+je,je,_e,se,vt+Ae,vt+Ae+At,At):Ae-je/2,fe=Ee==="start"?Pt:Ee==="center"?Pt-We/2:Ee==="end"?Pt-We:et(Et,Et+We,We,gn,ce,Et+Pt,Et+Pt+Qe,Qe),he=Math.max(0,he+vt),fe=Math.max(0,fe+Et);else{he=Je==="start"?Ae-En-_e:Je==="end"?Ae-Gt+se+ke:Je==="nearest"?et(En,Gt,ot,_e,se+ke,Ae,Ae+At,At):Ae-(En+ot/2)+ke/2,fe=Ee==="start"?Pt-Ft-gn:Ee==="center"?Pt-(Ft+Ht/2)+oe/2:Ee==="end"?Pt-fn+ce+oe:et(Ft,fn,Ht,gn,ce+oe,Pt,Pt+Qe,Qe);const{scrollLeft:Tt,scrollTop:Ot}=tt;he=St===0?0:Math.max(0,Math.min(Ot+he/St,tt.scrollHeight-ot/St+ke)),fe=Ge===0?0:Math.max(0,Math.min(Tt+fe/Ge,tt.scrollWidth-Ht/Ge+oe)),Ae+=Ot-he,Pt+=Tt-fe}bn.push({el:tt,top:he,left:fe})}return bn},Le=me=>me===!1?{block:"end",inline:"nearest"}:(Pe=>Pe===Object(Pe)&&Object.keys(Pe).length!==0)(me)?me:{block:"start",inline:"nearest"};function Se(me,Pe){if(!me.isConnected||!(ht=>{let nt=ht;for(;nt&&nt.parentNode;){if(nt.parentNode===document)return!0;nt=nt.parentNode instanceof ShadowRoot?nt.parentNode.host:nt.parentNode}return!1})(me))return;const at=(ht=>{const nt=window.getComputedStyle(ht);return{top:parseFloat(nt.scrollMarginTop)||0,right:parseFloat(nt.scrollMarginRight)||0,bottom:parseFloat(nt.scrollMarginBottom)||0,left:parseFloat(nt.scrollMarginLeft)||0}})(me);if((ht=>typeof ht=="object"&&typeof ht.behavior=="function")(Pe))return Pe.behavior(Te(me,Pe));const Oe=typeof Pe=="boolean"||Pe==null?void 0:Pe.behavior;for(const{el:ht,top:nt,left:rt}of Te(me,Le(Pe))){const Je=nt-at.top+at.bottom,Ee=rt-at.left+at.right;ht.scroll({top:Je,left:Ee,behavior:Oe})}}}}]);
|
|
|
}()); |