You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Gradu...

3487 lines
1.7 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var Fu=Math.pow;var hc=(Cn,Vt,oe)=>new Promise((pe,xe)=>{var Fe=Me=>{try{ge(oe.next(Me))}catch(Ee){xe(Ee)}},ct=Me=>{try{ge(oe.throw(Me))}catch(Ee){xe(Ee)}},ge=Me=>Me.done?pe(Me.value):Promise.resolve(Me.value).then(Fe,ct);ge((oe=oe.apply(Cn,Vt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[3317],{18299:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},42922:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},25877:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},63237:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},99569:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},22751:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},38308:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},17663:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},91034:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},72395:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},53978:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ee}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(he,ke){return xe.createElement(ge.Z,(0,pe.Z)({},he,{ref:ke,icon:ct}))},Ee=xe.forwardRef(Me)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Cn,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"}},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 Cn={},Vt="5.0",oe={},pe=null,xe=!1,Fe=!1,ct=null,ge=!1,Me=null,Ee=null,Ce=0;Ce<arguments.length;Ce++){var he=arguments[Ce];if(he!==null)switch(typeof he){case"number":Vt=he.toFixed(1);break;case"string":he.match(new RegExp("^[0-9]\\.[0-9]+$"))?Vt=he:ct=he;break;case"object":typeof he.is3D!="undefined"?pe=he:oe=he;break;case"boolean":xe=he,Fe=!0;break}}pe===null&&(pe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},oe.material_id!==void 0&&!Fe&&(xe=!0)),ct!==null&&oe.id===void 0&&(oe.id=ct);var ke="",Je="",Pe=!1,dt=null,ot=null,lt=null,nt=!1,_e=null,ht=null,yt=null,Ze=null,Qe=null;oe.height!==void 0&&(oe.height=Math.round(oe.height)),oe.width!==void 0&&(oe.width=Math.round(oe.width));var be=function(ft){return parseFloat(ft)>4?parseFloat(ft):5};Cn.setHTML5Codebase=function(ft,mt){Ee=ft,Lt(ft,mt)},Cn.setJavaCodebase=Cn.setJavaCodebaseVersion=Cn.isCompiledInstalled=Cn.setPreCompiledScriptPath=Cn.setPreCompiledResourcePath=function(){},Cn.setHTML5CodebaseVersion=function(ft,mt){var Yt=parseFloat(ft);if(Yt!==NaN&&Yt<5){console.log("The GeoGebra HTML5 codebase version "+Yt+" is deprecated. Using version latest instead.");return}Me=ft,Ae(ft,mt)},Cn.getHTML5CodebaseVersion=function(){return ot},Cn.getParameters=function(){return oe},Cn.setFontsCSSURL=function(ft){Ze=ft},Cn.setGiacJSURL=function(ft){},Cn.setJNLPFile=function(ft){ke=ft},Cn.setJNLPBaseDir=function(ft){},Cn.inject=function(){function ft(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var mt="auto",Yt=oe.id,An,dn=!1,nn=0;nn<arguments.length;nn++){var jt=arguments[nn];typeof jt=="string"?(jt=jt.toLowerCase(),jt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?mt=jt:Yt=arguments[nn]):typeof jt=="boolean"?dn=jt:jt instanceof HTMLElement&&(An=jt)}xn();function xn(){if(!ge){setTimeout(xn,200);return}mt=Qt(mt);var vn=An||document.getElementById(Yt);if(!vn){console.log("possibly bug on ajax loading? ");return}if(Cn.removeExistingApplet(vn,!1),oe.width===void 0&&vn.clientWidth&&(oe.width=vn.clientWidth),oe.height===void 0&&vn.clientHeight&&(oe.height=vn.clientHeight),!(oe.width&&oe.height)&&mt==="html5"&&(delete oe.width,delete oe.height),dt=mt,mt==="screenshot")it(vn,oe);else{var Te=!1;oe.hasOwnProperty("playButton")&&oe.playButton||oe.hasOwnProperty("clickToLoad")&&oe.clickToLoad?Te=!0:oe.hasOwnProperty("playButtonAutoDecide")&&oe.playButtonAutoDecide&&(Te=(!we()||ft())&&Ke()),Te?(dt="screenshot",We(vn,oe,dn,mt)):kt(vn,oe,dn)}}};function we(){try{return window.self!==window.top}catch(ft){return!0}}function Ke(){return oe.hasOwnProperty("screenshotGenerator")&&oe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Cn.getViews=function(){return pe},Cn.isJavaInstalled=function(){return!1};var Ge=function(ft){var mt=function(nn){var jt=JSON.parse(nn),xn=function(ue){return ue.type=="G"||ue.type=="E"},vn=jt.elements?jt.elements.filter(xn)[0]:jt;if(!vn||!vn.url){Yt();return}oe.fileName=vn.url,vt(vn.settings||{}),pe.is3D=!0;var Te="https://www.geogebra.org/images/";Cn.setPreviewImage(_e||vn.previewUrl,Te+"GeoGebra_loading.png",Te+"applet_play.png"),ft()},Yt=function(){oe.onError&&oe.onError(),cn("Error: Fetching material (id "+oe.material_id+") failed.",oe)},An=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dn="/materials/"+oe.material_id+"?scope=basic";pt("https://"+An+"/api/proxy.php?path="+encodeURIComponent(dn),mt,Yt)};function vt(ft){var mt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Yt){ft[Yt]=!!ft[Yt]}),mt.forEach(function(Yt){oe[Yt]===void 0&&ft[Yt]!==void 0&&(oe[Yt]=ft[Yt])}),oe.showToolBarHelp===void 0&&(oe.showToolBarHelp=oe.showToolBar)}function pt(ft,mt,Yt){var An=new XMLHttpRequest;An.open("GET",ft),An.onload=function(){mt(An.responseText)},An.onerror=Yt,An.send()}Cn.isHTML5Installed=function(){return!0},Cn.getLoadedAppletType=function(){return dt},Cn.setPreviewImage=function(ft,mt,Yt){_e=ft,ht=mt,yt=Yt},Cn.removeExistingApplet=function(ft,mt){var Yt;typeof ft=="string"&&(ft=document.getElementById(ft)),dt=null;var An=null;for(Yt=0;Yt<ft.childNodes.length;Yt++){var dn=ft.childNodes[Yt],nn=dn.className;nn==="applet_screenshot"?mt?(dn.style.display="block",dt="screenshot"):dn.style.display="none":nn!=="applet_scaler prerender"&&(ft.removeChild(dn),An=nn&&nn.indexOf("appletParameters")!=-1?dn.id:null,Yt--)}var jt=oe.id!==void 0?oe.id:An,xn=window[jt];xn&&typeof xn.getBase64=="function"&&(xn.remove(),window[jt]=null)},Cn.refreshHitPoints=function(){if(be(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ft=Cn.getAppletObject();return ft&&typeof ft.recalculateEnvironments=="function"?(ft.recalculateEnvironments(),!0):!1},Cn.startAnimation=function(){var ft=Cn.getAppletObject();return ft&&typeof ft.startAnimation=="function"?(ft.startAnimation(),!0):!1},Cn.stopAnimation=function(){var ft=Cn.getAppletObject();return ft&&typeof ft.stopAnimation=="function"?(ft.stopAnimation(),!0):!1},Cn.getAppletObject=function(){var ft=oe.id!==void 0?oe.id:"ggbApplet";return window[ft]},Cn.resize=function(){};var Ue=function(ft,mt,Yt){var An=document.createElement("param");An.setAttribute("name",mt),An.setAttribute("value",Yt),ft.appendChild(An)},et=function(ft){return ft&&ft!=="false"},kt=function(ft,mt,Yt){be(ot)<=4.2&&(Yt=!0);var An=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ot||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(An=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dn=document.createElement("div");dn.classList.add("appletParameters","notranslate");var nn=mt.width,jt=mt.height;if(mt.disableAutoScale=mt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():mt.disableAutoScale,mt.width!==void 0)if(be(ot)<=4.4)et(mt.showToolBar)&&(mt.height-=7),et(mt.showAlgebraInput)&&(mt.height-=37),mt.width<605&&et(mt.showToolBar)&&(mt.width=605,nn=605);else{var xn=100;(et(mt.showToolBar)||et(mt.showMenuBar))&&(mt.hasOwnProperty("customToolBar")&&(mt.customToolbar=mt.customToolBar),xn=et(mt.showMenuBar)?245:155),nn<xn&&(mt.width=xn,nn=xn)}dn.style.border="none",dn.style.display="inline-block";for(var vn in mt)mt.hasOwnProperty(vn)&&vn!=="appletOnLoad"&&dn.setAttribute("data-param-"+vn,mt[vn]);Ze&&dn.setAttribute("data-param-fontscssurl",Ze),Cn.resize=function(){GGBAppletUtils.responsiveResize(ft,mt)},window.addEventListener("resize",function(Gt){Cn.resize()});var Te=typeof mt.appletOnLoad=="function"?mt.appletOnLoad:function(){};if(!Yt&&mt.width!==void 0){mt.hasOwnProperty("showSplash")||dn.setAttribute("data-param-showSplash","false");var ue=ft.querySelector(".applet_scaler.prerender"),le=ue!==null;if(le)var me=ue.querySelector(".ggb_preview");else{var me=Ut(nn,jt,mt.borderColor,!1);ue=document.createElement("div"),ue.className="applet_scaler",ue.style.position="relative",ue.style.display="block",ue.style.width=nn+"px",ue.style.height=jt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ue,"66%"),be(ot)>=5?(mt.appletOnLoad=function(Gt){var tr=ft.querySelector(".ggb_preview");tr&&tr.parentNode.removeChild(tr),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ue),window.GGBT_wsf_view&&$(window).trigger("resize"),Te(Gt)},le||ue.appendChild(me)):dn.appendChild(me),ue.appendChild(dn),le||ft.appendChild(ue),setTimeout(function(){Cn.resize()},1)}else{var fe=document.createElement("div");fe.className="applet_scaler",fe.style.position="relative",fe.style.display="block",fe.appendChild(dn),ft.appendChild(fe),mt.appletOnLoad=function(Gt){Cn.resize(),Te(Gt)}}function se(Gt,tr){tr&&typeof tr.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Gt,tr.appletOnLoad):renderGGBElement(Gt),cn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",tr)}function Oe(Gt,tr){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Gt,params:tr}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(cr){se(cr.article,cr.params)}),html5AppletsToProcess=null)},be(ot)<5&&(Gt.className+=" geogebraweb")):se(Gt,tr)}if(An){scriptLoadStarted=!0;for(var rt=0;rt<dn.childNodes.length;rt++){var Pt=dn.childNodes[rt].tagName;Pt==="TABLE"&&(dn.removeChild(dn.childNodes[rt]),rt--)}if(ggbHTML5LoadedScript!==null){var zt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');zt!=null&&zt.parentNode.removeChild(zt)}var Zt=document.createElement("script"),en=function(){Oe(dn,mt)};Zt.src=Je+lt,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=ot,ggbHTML5LoadedScript=Zt.src,cn("GeoGebra HTML5 codebase loaded: '"+Je+"'.",mt),!Ee&&(!Me||Me=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),en()):Je.requirejs?__webpack_require__.e(12).then(function(){var Gt=[__webpack_require__(12)];en.apply(null,Gt)}.bind(this)).catch(__webpack_require__.oe):(Zt.onload=en,ft.appendChild(Zt))}else Oe(dn,mt);mt.height=jt,mt.width=nn},it=function(ft,mt,Yt){var An=Ut(mt.width,mt.height,mt.borderColor,Yt),dn=document.createElement("div");dn.style.position="relative",dn.style.display="block",dn.style.width=mt.width+"px",dn.style.height=mt.height+"px",dn.className="applet_screenshot applet_scaler"+(Yt?" applet_screenshot_play":""),dn.appendChild(An);var nn=GGBAppletUtils.getScale(mt,ft,Yt);Yt?(ft.appendChild(Tt()),window.GGBT_wsf_view||(ft.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dn,"66%"),ft.appendChild(dn),nn!==1&&!isNaN(nn)&&(GGBAppletUtils.scaleElement(dn,nn),dn.style.width=mt.width+"px",dn.style.height=mt.height+"px",dn.parentNode.style.width=mt.width*nn+"px",dn.parentNode.style.height=mt.height*nn+"px"),Cn.resize=function(){st(ft,An,dn,Yt)},window.addEventListener("resize",function(jt){Cn.resize()}),Cn.resize()};function st(ft,mt,Yt,An){if(ft.contains(mt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ft.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ft)}var dn=GGBAppletUtils.getScale(oe,ft,An);Yt.parentNode!==null&&(!isNaN(dn)&&dn!==1?(GGBAppletUtils.scaleElement(Yt,dn),Yt.parentNode.style.width=oe.width*dn+"px",Yt.parentNode.style.height=oe.height*dn+"px"):(GGBAppletUtils.scaleElement(Yt,1),Yt.parentNode.style.width=oe.width+"px",Yt.parentNode.style.height=oe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ft),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Cn.onExitFullscreen=function(ft,mt){mt.appendChild(ft)};var We=function(ft,mt,Yt,An){it(ft,mt,!0);for(var dn=function(){var xn=[];for(jt=0;jt<ft.childNodes.length;jt++)xn.push(ft.childNodes[jt]);if(window.GGBT_wsf_view){var vn=window.GGBT_wsf_view.renderFullScreen(ft,mt.id),Te=document.getElementById("fullscreencontainer"),ue=jQuery(ft).find(".fullscreencontent");ue.length>0?(vn.remove(),ue.attr("id","fullscreencontent").show(),jQuery(Te).append(ue),window.dispatchEvent(new Event("resize"))):kt(vn,mt,!1),window.GGBT_wsf_view.launchFullScreen(Te)}else dt=An,kt(ft,mt,!1);if(!window.GGBT_wsf_view)for(jt=0;jt<xn.length;jt++)ft.removeChild(xn[jt])},nn=ft.getElementsByClassName("ggb_preview_play"),jt=0;jt<nn.length;jt++)nn[jt].addEventListener("click",dn,!1),nn[jt].addEventListener("ontouchstart",dn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ft),Ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Tt=function(){var ft=document.createElement("div");if(ft.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var mt='.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");}',Yt=document.createElement("style");Yt.styleSheet?Yt.styleSheet.cssText=mt:Yt.appendChild(document.createTextNode(mt)),document.getElementsByTagName("head")[0].appendChild(Yt)}return ft},Ut=function(ft,mt,Yt,An){var dn=document.createElement("div");dn.className="ggb_preview",dn.style.position="absolute",dn.style.zIndex="90",dn.style.width=ft-2+"px",dn.style.height=mt-2+"px",dn.style.top="0px",dn.style.left="0px",dn.style.overflow="hidden",dn.style.backgroundColor="white";var nn="lightgrey";Yt!==void 0&&(Yt==="none"?nn="transparent":nn=Yt),dn.style.border="1px solid "+nn;var jt=document.createElement("img");if(jt.style.position="relative",jt.style.zIndex="1000",jt.style.top="-1px",jt.style.left="-1px",_e!==null&&jt.setAttribute("src",_e),jt.style.opacity=.7,ht!==null){var xn,vn,Te;if(!An){xn=document.createElement("img"),xn.style.position="absolute",xn.style.zIndex="1001",xn.style.opacity=1,jt.style.opacity=.3,vn=360,vn>ft/4*3&&(vn=ft/4*3),Te=vn/5.8,xn.setAttribute("src",ht),xn.setAttribute("width",vn),xn.setAttribute("height",Te);var ue=(ft-vn)/2,le=(mt-Te)/2;xn.style.left=ue+"px",xn.style.top=le+"px",dn.appendChild(xn)}}return dn.appendChild(jt),dn},Qt=function(ft){return ft=ft.toLowerCase(),ft==="html5"||ft==="screenshot"?ft:"html5"},Xe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ae=function(ft,mt){if(ot=ft,mt){Lt(ot,!0);return}var Yt=!xe;if(Yt){var An=be(ot);!isNaN(An)&&An<4.4&&(Yt=!1)}var dn,nn;window.location.protocol.substr(0,4)==="http"?dn=window.location.protocol:dn="http:";var jt=ot.indexOf("//");jt>0?nn=ot:jt===0?nn=dn+ot:nn="https://www.geogebra.org/apps/5.2.814.0/";for(var xn in Xe)if(ot.slice(Xe[xn].length*-1)===Xe[xn]||ot.slice((Xe[xn].length+1)*-1)===Xe[xn]+"/"){Lt(nn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Yt&&!pe.is3D&&!pe.AV&&!pe.SV&&!pe.CV&&!pe.EV2&&!pe.CP&&!pe.PC&&!pe.DA&&!pe.FI&&!pe.PV&&!et(oe.showToolBar)&&!et(oe.showMenuBar)&&!et(oe.showAlgebraInput)&&!et(oe.enableRightClick)&&(!oe.appName||oe.appName=="classic")?nn+="webSimple/":nn+="web3d/",Lt(nn,!1)},Lt=function(ft,mt){if(ft.requirejs){Je=ft;return}ft.slice(-1)!=="/"&&(ft+="/"),Je=ft,mt===null&&(mt=ft.indexOf("http")===-1),Pe=mt,lt="web.nocache.js",nt=!1;var Yt=Je.split("/");Yt.length>1&&(!mt&&Yt[Yt.length-2]==="webSimple"?(lt="webSimple.nocache.js",nt=!0):Xe.indexOf(Yt[Yt.length-2])>=0&&(lt=Yt[Yt.length-2]+".nocache.js")),Yt=ft.split("/"),ot=Yt[Yt.length-3],ot.substr(0,4)==="test"?ot=ot.substr(4,1)+"."+ot.substr(5,1):(ot.substr(0,3)==="war"||ot.substr(0,4)==="beta")&&(ot="5.0");var An=parseFloat(ot);An!==NaN&&An<5&&ft.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+An+" is deprecated. Using version latest instead."),Ae("5.0",mt))},cn=function(ft,mt){window.console&&window.console.log&&(!mt||typeof mt.showLogging=="undefined"||mt.showLogging&&mt.showLogging!=="false")&&console.log(ft)};oe.material_id!==void 0?Ge(an):an();function an(){var ft=Vt;Me!==null?ft=Me:parseFloat(ft)<5&&(ft="5.0"),Ae(ft,!1),Ee!==null&&Lt(Ee,Pe),ge=!0}return Cn},GGBAppletUtils=function(){"use strict";function Cn(){return window.GGBT_wsf_edit!==void 0}function Vt(ge,Me){Me!=1?(ge.style.transformOrigin="0% 0% 0px",ge.style.webkitTransformOrigin="0% 0% 0px",ge.style.transform="scale("+Me+","+Me+")",ge.style.webkitTransform="scale("+Me+","+Me+")",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 oe(ge,Me,Ee,Ce,he,ke){var Je=null;if(ke!=null&&ke!="")for(var Pe=ge.parentNode;Pe!=null;)if((" "+Pe.className+" ").indexOf(" "+ke+" ")>-1){Je=Pe;break}else Pe=Pe.parentNode;var dt=0,ot=0,lt=0,nt=0,_e=0,ht=0,yt=0;if(Je)dt=Je.offsetWidth,ot=Math.max(Ce?Je.offsetWidth:0,Je.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(dt=Math.min(window.innerWidth,document.documentElement.clientWidth),ot=Math.min(window.innerHeight,document.documentElement.clientHeight),lt=dt):(dt=window.innerWidth,ot=window.innerHeight,lt=window.innerWidth),ge){var Ze=ge.getBoundingClientRect();Ze.left>0&&Ze.left<=dt&&(he===void 0||!he)&&(document.dir==="rtl"?(_e=dt-Ze.width-Ze.left,ht=lt<=480?10:30):(ht=Ze.left,_e=lt<=480?10:30),nt=ht+_e)}if(ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Qe=ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,yt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,yt=40)}}return ge&&((Ee===void 0||!Ee)&&Me>0&&Me+nt<dt?dt=Me:dt-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ee===void 0||!Ee)&&(ot-=yt)),{width:dt,height:ot}}function pe(ge,Me,Ee,Ce,he){if(ge.isScreenshoGenerator)return 1;var ke=Ce!==void 0&&Ce,Je=ge.noScaleMargin!=null&&ge.noScaleMargin,Pe=function(Qe){return Qe&&Qe!=="false"},dt=Pe(ge.autoHeight),ot=oe(Me,ge.width,Ee,dt,ke&&window.GGBT_wsf_view||Je,he),lt=parseInt(ot.width),nt=ge.width,_e=ge.height;if(nt===void 0){var ht=Me.querySelector(".appletParameters");ht&&(nt=ht.offsetWidth,_e=ht.offsetHeight)}var yt=lt/nt,Ze=ke?1:ot.height/_e;return Ee!==void 0&&!Ee&&(yt=Math.min(1,yt),Ze=Math.min(1,Ze)),Math.min(yt,Ze)}function xe(ge,Me,Ee){var Ce=1,he,ke=!1;if(ge.hasOwnProperty("allowUpscale")&&(ke=ge.allowUpscale),ge.hasOwnProperty("scale")&&(Ce=parseFloat(ge.scale),(isNaN(Ce)||Ce===null||Ce===0)&&(Ce=1),Ce>1&&(ke=!0)),Me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ke=!0),!(ge.hasOwnProperty("disableAutoScale")&&ge.disableAutoScale))he=pe(ge,Me,ke,Ee,ge.scaleContainerClass);else return Ce;return ke&&(!ge.hasOwnProperty("scale")||Ce===1)?he:Math.min(Ce,he)}function Fe(ge){var Me=Math.min(window.innerWidth,document.documentElement.clientWidth),Ee=Math.min(window.innerHeight,document.documentElement.clientHeight),Ce=ge.getBoundingClientRect(),he=(Me-Ce.width)/2,ke=(Ee-Ce.height)/2;ke<0&&(ke=0),ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(he<40?ge.style.left="40px":ge.style.left=he+"px",ge.style.top=ke+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ke<40?ge.style.top="40px":ge.style.top=ke+"px",ge.style.left=he+"px")}function ct(ge,Me){var Ee=ge.querySelector(".appletParameters");if(Ee){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Me.id!==Ee.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ge)}if(Ee.parentElement&&/fullscreen/.test(Ee.parentElement.className))return;var Ce=xe(Me,ge);Cn()&&Ee.setAttribute("data-param-scale",Ce);for(var he=null,ke=0;ke<ge.childNodes.length;ke++)if(ge.childNodes[ke].className!==void 0&&ge.childNodes[ke].className.match(/^applet_scaler/)){he=ge.childNodes[ke];break}if(he!==null&&he.querySelector(".noscale")!==null)return;var Je=Me.id!==void 0?Me.id:"ggbApplet",Pe=window[Je];(Pe==null||!Pe.recalculateEnvironments)&&he!==null&&!he.className.match(/fullscreen/)&&(he.parentNode.style.transform="",!isNaN(Ce)&&Ce!==1?(he.parentNode.style.width=Me.width*Ce+"px",he.parentNode.style.height=Me.height*Ce+"px",Vt(he,Ce)):(Vt(he,1),he.parentNode.style.width=Me.width+"px",he.parentNode.style.height=Me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ee).parents(".content-added-content"))}}return{responsiveResize:ct,isFlexibleWorksheetEditor:Cn,positionCenter:Fe,getScale:xe,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 Cn=n.location.search;return Cn.indexOf(J)!=-1||Cn.indexOf(K)!=-1}function q(Cn,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(Cn){var Vt=s[L].bindings;s[L].bindings=function(){for(var oe=Vt?Vt():{},pe=Cn[webModule.__softPermutationId],xe=O;xe<pe.length;xe++){var Fe=pe[xe];oe[Fe[O]]=Fe[P]}return oe}};var t;function u(){return v(),t}function v(){if(!t){var Cn=o.createElement(Q);if(Cn.id=L,Cn.style.cssText=R+S,Cn.tabIndex=-1,o.body.appendChild(Cn),t=Cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Vt=document.compatMode==U?V:W;t.write(Vt+X),t.close()}}}function w(Cn){function Vt(pe){function xe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=xe();if(Fe){pe();return}function ct(){if(!Fe){if(!xe())return;Fe=!0,pe(),o.removeEventListener&&o.removeEventListener(Z,ct,!1),ge&&clearInterval(ge)}}o.addEventListener&&o.addEventListener(Z,ct,!1);var ge=setInterval(function(){ct()},$)}function oe(pe){var xe=u(),Fe=xe.body,ct=xe.createElement(_);ct.language=ab,ct.crossOrigin=W,ct.src=pe,webModule.__errFn&&(ct.onerror=function(){webModule.__errFn(L,new Error(bb+pe))}),Fe.appendChild(ct)}Vt(function(){oe(Cn)})}webModule.__startLoadingFragment=function(Cn){return C(Cn)},webModule.__installRunAsyncCode=function(Cn){var Vt=u(),oe=Vt.body,pe=Vt.createElement(_);pe.language=ab,pe.text=Cn,oe.appendChild(pe),oe.removeChild(pe)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Cn){var Vt=c[Cn];return Vt==null?null:Vt},r=d,webModule.__errFn=e}function B(){function Cn(ge){var Me=ge.lastIndexOf(rb);Me==-1&&(Me=ge.length);var Ee=ge.indexOf(sb);Ee==-1&&(Ee=ge.length);var Ce=ge.lastIndexOf(tb,Math.min(Ee,Me));return Ce>=O?ge.substring(O,Ce+P):W}function Vt(ge){if(!ge.match(/^\w+:\/\//)){var Me=o.createElement(ub);Me.src=ge+vb,ge=Cn(Me.src)}return ge}function oe(){var ge=__gwt_getMetaProperty(wb);return ge!=null?ge:W}function pe(){for(var ge=o.getElementsByTagName(_),Me=O;Me<ge.length;++Me)if(ge[Me].src.indexOf(xb)!=-1)return Cn(ge[Me].src);return W}function xe(){var ge=o.getElementsByTagName(yb);return ge.length>O?ge[ge.length-P].href:W}function Fe(){var ge=o.location;return ge.href==ge.protocol+zb+ge.host+ge.pathname+ge.search+ge.hash}var ct=oe();return ct==W&&(ct=pe()),ct==W&&(ct=xe()),ct==W&&Fe()&&(ct=Cn(o.location.href)),ct=Vt(ct),ct}function C(Cn){return Cn.match(/^\//)||Cn.match(/^[a-zA-Z]+:\/\//)?Cn:webModule.__moduleBase+Cn}function D(){var Cn=[],Vt=O,oe=[],pe=[];function xe(ge){var Me=pe[ge](),Ee=oe[ge];if(Me in Ee)return Me;var Ce=[];for(var he in Ee)Ce[Ee[he]]=he;throw r&&r(ge,Ce,Me),null}if(__gwt_isKnownPropertyValue=function(ge,Me){return Me in oe[ge]},webModule.__getPropMap=function(){var ge={};for(var Me in oe)oe.hasOwnProperty(Me)&&(ge[Me]=xe(Me));return ge},webModule.__computePropValue=xe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var ct=Fe.indexOf(Db);ct!=-1&&(Vt=parseInt(Fe.substring(ct+P),$),Fe=Fe.substring(O,ct))}catch(ge){}return webModule.__softPermutationId=Vt,C(Fe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase=window.ENV==="build"?"/react/build/js/mathematicalGraphics/"+name+"/":"/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Ax:function(){return ct},Ds:function(){return ge},KI:function(){return Ee},SI:function(){return Fe},f1:function(){return xe}});var pe=oe(11320);function xe(Ce){let he=!0;if(Ce.length>0){for(let ke=0;ke<Ce.length;ke++)if(Ce[ke].compile_success==0||!Ce[ke].compile_success){he=!1;break}}else he=!1;return he}function Fe(Ce,he=""){let ke=[];for(let Je=0;Je<Ce.length;Je++){let Pe=Ce[Je],dt=he?`${he}/${Pe.name}`:`${Pe.name}`;ke.push({title:Pe.name,type:Pe.type,isLeaf:Pe.type!=="tree",key:dt})}return ke}function ct(Ce,he,ke){for(let Je=0;Je<Ce.length;Je++){let Pe=Ce[Je];if(Pe.key===he){Pe.children=ke;break}Pe.children&&ct(Pe.children,he,ke)}return Ce}function ge(Ce,he,ke){let Je;return function(){let Pe=this,dt=arguments,ot=function(){Je=null,ke||Ce.apply(Pe,dt)},lt=ke&&!Je;clearTimeout(Je),Je=setTimeout(ot,he),lt&&Ce.apply(Pe,dt)}}const Me=!0,Ee=pe.Z.API_SERVER},63205:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Je}});var pe=oe(67294),xe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=oe(94184),ct=oe.n(Fe),ge=oe(57953),Me=oe(15979),Ee=oe(33170),Ce=oe(28706),he=(Pe,dt,ot)=>new Promise((lt,nt)=>{var _e=Ze=>{try{yt(ot.next(Ze))}catch(Qe){nt(Qe)}},ht=Ze=>{try{yt(ot.throw(Ze))}catch(Qe){nt(Qe)}},yt=Ze=>Ze.done?lt(Ze.value):Promise.resolve(Ze.value).then(_e,ht);yt((ot=ot.apply(Pe,dt)).next())}),Je=({data:Pe,className:dt,fullWidth:ot,style:lt={},onClose:nt,onOk:_e,showFullTools:ht,noAssociationId:yt})=>{const Ze=(0,pe.useRef)(null),Qe=(0,pe.useRef)(null),be=(0,pe.useRef)(null),we=(0,pe.useRef)(null),[Ke,Ge]=(0,pe.useState)(!1),[vt,pt]=(0,pe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,pe.useEffect)(()=>{be.current||(be.current=document.createElement("style"),document.head.appendChild(be.current)),Pe!=null&&Pe.visible?(document.body.setAttribute("data-custom","y-hidden"),be.current.innerHTML=" html { overflow-y: hidden; }",Pe!=null&&Pe.src&&Ue()):(document.body.removeAttribute("data-custom"),be.current&&(document.head.removeChild(be.current),be.current=null))},[Pe==null?void 0:Pe.visible]);const Ue=()=>he(void 0,null,function*(){Ge(!0),pt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const We=yield(0,Ce.ZJ)(Pe==null?void 0:Pe.src);Ze.current.src="",Ze.current.src=We,Ze.current.onload=function(){st()},Ge(!1),pt("")}),et=()=>{document.body.removeAttribute("data-custom"),be.current.innerHTML=" ",nt()},kt=We=>he(void 0,null,function*(){Ge(!0),pt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Tt=yield(0,Ee.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Pe.title,file:We.dataUrl}});Tt!=null&&Tt.id&&!yt?(yield(0,Ee.ZP)(`/api/attachments/${Pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Tt==null?void 0:Tt.id,settings:JSON.stringify(We.state)}})).status===0&&_e():Tt!=null&&Tt.id&&_e(Tt),document.body.removeAttribute("data-custom"),be.current.innerHTML=" ",Ge(!1),pt("")}),it=()=>{const We=document.querySelector('a[href="https://markerjs.com/"]');We&&We.parentNode&&(We.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(Ut=>{const Qt=document.querySelector(Ut.name);Qt&&Qt.setAttribute("title",Ut.title)})},st=()=>{Qe.current=new Me.hP(Ze.current),Qe.current.targetRoot=we.current,Qe.current.addEventListener("render",kt),Qe.current.addEventListener("beforeclose",et),ht&&(Qe.current.availableMarkerTypes=Qe.current.ALL_MARKER_TYPES,Qe.current.uiStyleSettings.redoButtonVisible=!0,Qe.current.uiStyleSettings.notesButtonVisible=!0,Qe.current.uiStyleSettings.zoomButtonVisible=!0,Qe.current.uiStyleSettings.zoomOutButtonVisible=!0,Qe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Qe.current.uiStyleSettings,Qe.current.show(),Pe!=null&&Pe.snapshotData&&Qe.current.restoreState(Pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),it()},300)};return pe.createElement(pe.Fragment,null,(Pe==null?void 0:Pe.visible)&&pe.createElement(ge.Z,{spinning:Ke,tip:vt,style:{position:"absolute"}},pe.createElement("div",{ref:we,className:ct()(xe.imageDimensions,dt,ot?xe.fullWidth:""),style:lt},pe.createElement("img",{className:xe.img,ref:Ze}))))}},36527:function(Cn,Vt,oe){"use strict";var pe=oe(67294),xe=oe(71230),Fe=oe(15746),ct=oe(66368),ge=oe(71577),Me=oe(35598),Ee=oe(71736),Ce=oe(84279),he=oe(67294);const ke=(0,pe.forwardRef)(({callback:Je,showSaveButton:Pe,value:dt=""},ot)=>{const lt=(0,pe.useRef)(),nt=[{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 "}]}]}],_e=[{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}`}]}]}],ht=Qe=>{lt.current.setValue(lt.current.getValue()+" "+Qe.value+" ")},yt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:he.createElement(xe.Z,{className:Ee.Z.lists,gutter:[10,10]},nt.map((Qe,be)=>he.createElement(Fe.Z,{flex:"110px",className:Ee.Z.item},he.createElement("div",null,he.createElement(Me.Z,{value:`$$${Qe.value}$$`}),Qe.name),he.createElement("div",{className:Ee.Z.children},Qe.children.map((we,Ke)=>he.createElement("div",{key:Ke},he.createElement("h1",null,we.name),he.createElement(xe.Z,{gutter:[10,10]},we.data.map((Ge,vt)=>he.createElement(Fe.Z,{key:vt,onClick:()=>ht(Ge),className:Ee.Z.diamond},he.createElement(Me.Z,{value:"`$$"+Ge.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:he.createElement(xe.Z,{className:Ee.Z.lists,gutter:[10,10]},_e.map((Qe,be)=>he.createElement(Fe.Z,{flex:"110px",className:Ee.Z.item},he.createElement("div",null,he.createElement(Me.Z,{value:"`$$"+Qe.value+"$$`"}),Qe.name),he.createElement("div",{className:Ee.Z.children},Qe.children.map((we,Ke)=>he.createElement("div",{key:Ke},we.name&&he.createElement("h1",null,we.name),he.createElement(xe.Z,{gutter:[10,10]},we.data.map((Ge,vt)=>he.createElement(Fe.Z,{key:vt,onClick:()=>ht(Ge),className:Ee.Z.diamond},he.createElement(Me.Z,{value:"`$$"+Ge.value+"$$`"}))))))))))}],Ze=()=>{var Qe=document.createElement("div");Qe.innerHTML=lt.current.getValue();var be=Qe.innerText;return Je&&Je(be),be};return(0,pe.useImperativeHandle)(ot,()=>({getData:Ze})),he.createElement("div",{className:Ee.Z.mathWrap},he.createElement(ct.default,{defaultActiveKey:"1",items:yt}),he.createElement("math-field",{locale:"zh_cn",className:Ee.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:lt,style:{width:800,marginTop:30,fontSize:18}},dt||""),Pe&&he.createElement("div",{className:Ee.Z.button},he.createElement(ge.ZP,{size:"large",onClick:Ze,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Vt.Z=ke},57444:function(Cn,Vt,oe){"use strict";oe.d(Vt,{h:function(){return Qe}});var pe=oe(67294),xe=oe(11713),Fe=oe(22150),ct=oe(71577),ge=oe(4631),Me=oe.n(ge),Ee=oe(71749),Ce=oe(30483),he=Object.defineProperty,ke=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,lt=(be,we,Ke)=>we in be?he(be,we,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):be[we]=Ke,nt=(be,we)=>{for(var Ke in we||(we={}))dt.call(we,Ke)&&lt(be,Ke,we[Ke]);if(Pe)for(var Ke of Pe(we))ot.call(we,Ke)&&lt(be,Ke,we[Ke]);return be},_e=(be,we)=>ke(be,Je(we));const ht=xe.default.Option,yt={labelCol:{span:4},wrapperCol:{span:20}},Ze={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:be,onCancel:we})=>{const[Ke,Ge]=(0,pe.useState)("python");function vt(Ue){Ge(Ze[Ue][1])}function pt(Ue){be(Ue)}return pe.createElement(Fe.default,_e(nt({},yt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:pt,style:{width:500}}),pe.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},pe.createElement(xe.default,{getPopupContainer:Ue=>Ue.parentNode,onChange:vt},Object.keys(Ze).map(Ue=>pe.createElement(ht,{key:Ue,value:Ue},Ze[Ue][0])))),pe.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},pe.createElement(Qe,{mode:Ke})),pe.createElement("div",{className:"flex-container flex-end"},pe.createElement(ct.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(ct.ZP,{type:"ghost",onClick:we},"\u53D6\u6D88")))};function Qe({value:be,onChange:we,mode:Ke,options:Ge={}}){const vt=(0,pe.useRef)(),[pt,Ue]=(0,pe.useState)();return(0,pe.useEffect)(()=>{if(pt){let et=function(kt){const it=kt.getValue();we&&we(it)};return pt.on("change",et),()=>{pt.off("change",et)}}},[pt,we]),(0,pe.useEffect)(()=>{pt&&pt.setOption("mode",Ke)},[pt,Ke]),(0,pe.useEffect)(()=>{pt&&(be!==pt.getValue()||be==="")&&setTimeout(()=>{pt.setValue(be||"")},300)},[pt,be]),(0,pe.useEffect)(()=>{if(vt.current&&!pt){const et=Me().fromTextArea(vt.current,nt({mode:Ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ge));Ue(et)}},[vt.current,pt]),pe.createElement("div",{className:"my-codemirror-container"},pe.createElement("textarea",{ref:vt}))}},91304:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Sr}});var pe=oe(67294),xe=oe(4631),Fe=oe.n(xe),ct=oe(91033),ge=oe(71749),Me=oe(57341),Ee=oe(82801),Ce=oe(88386),he=oe(49047),ke=oe(80785),Je=oe(35598),Pe=({value:Zn="",className:ut,showTextOnly:bt,showLines:Ft,style:qt={}})=>{const qe=(0,pe.useMemo)(()=>"",[Zn]);return pe.createElement(pe.Fragment,null,pe.createElement("div",{dangerouslySetInnerHTML:{__html:qe}}))},dt=oe(67294),ot=Object.defineProperty,lt=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Ze=(Zn,ut,bt)=>ut in Zn?ot(Zn,ut,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Zn[ut]=bt,Qe=(Zn,ut)=>{for(var bt in ut||(ut={}))ht.call(ut,bt)&&Ze(Zn,bt,ut[bt]);if(_e)for(var bt of _e(ut))yt.call(ut,bt)&&Ze(Zn,bt,ut[bt]);return Zn},be=(Zn,ut)=>lt(Zn,nt(ut));let we=[{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 Ke({onActionCallback:Zn,title:ut,icon:bt,actionName:Ft,className:qt="",children:qe}){function _t(){Zn(Ft)}return dt.createElement("a",{title:ut,className:qt,onClick:_t},dt.createElement("i",{className:`${bt}`}),qe)}var Ge=({watch:Zn,showNullButton:ut,showNullProgramButton:bt,onActionCallback:Ft,fullScreen:qt,insertTemp:qe,hidetoolBar:_t,extraUse:Xt})=>{const Kt=[...we,{title:`${Zn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Zn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return dt.createElement("ul",{className:"markdown-toolbar-container"},!_t&&Kt.map((on,rn)=>dt.createElement("li",{key:rn},on.actionName?dt.createElement(Ke,be(Qe({},on),{onActionCallback:Ft})):dt.createElement("span",{className:"v-line"}))),ut?dt.createElement("li",null,dt.createElement(Ke,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ft},dt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,bt?dt.createElement(dt.Fragment,null,dt.createElement("li",null,dt.createElement(Ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ft},dt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),dt.createElement("li",null,dt.createElement(Ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ft},dt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,qe&&dt.createElement("li",null,dt.createElement(Ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${qe}`,onActionCallback:Ft},dt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Xt&&dt.createElement("li",null,Xt),dt.createElement("li",{className:"btn-full-screen"},dt.createElement(Ke,{icon:`${qt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:qt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ft})))},vt=oe(76621),pt=oe(22150),Ue=oe(69677),et=oe(71577),kt=Object.defineProperty,it=Object.defineProperties,st=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Qt=(Zn,ut,bt)=>ut in Zn?kt(Zn,ut,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Zn[ut]=bt,Xe=(Zn,ut)=>{for(var bt in ut||(ut={}))Tt.call(ut,bt)&&Qt(Zn,bt,ut[bt]);if(We)for(var bt of We(ut))Ut.call(ut,bt)&&Qt(Zn,bt,ut[bt]);return Zn},Ae=(Zn,ut)=>it(Zn,st(ut));const Lt={labelCol:{span:4},wrapperCol:{span:20}};var cn=({callback:Zn,onCancel:ut})=>{function bt(Ft){Zn(Ft)}return pe.createElement(pt.default,Ae(Xe({},Lt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:bt,style:{width:500}}),pe.createElement(pt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},pe.createElement(Ue.default,null)),pe.createElement(pt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},pe.createElement(Ue.default,null)),pe.createElement("div",{className:"flex-container flex-end"},pe.createElement(et.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(et.ZP,{type:"ghost",onClick:ut},"\u53D6\u6D88")))},an=oe(57444),ft=oe(70859),mt=oe(14446),Yt=oe(71230),An=oe(63205),dn=oe(67294),nn=({callback:Zn,onCancel:ut})=>{const bt=document.createElement("canvas"),Ft=bt.getContext("2d");bt.width=1e3,bt.height=800,Ft.fillStyle="#ffffff",Ft.fillRect(0,0,bt.width,bt.height);const qt=bt.toDataURL("image/png");return dn.createElement(mt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},dn.createElement(Yt.Z,{style:{height:"100vh"}},dn.createElement(An.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:qt,visible:!0,title:String(Date.now())},onOk:qe=>{Zn({src:qe.url})},onClose:ut})))},jt=oe(72565),xn=oe(15746),vn=oe(2453),Te={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ue=oe(67294),me=(0,pe.forwardRef)(({onCancel:Zn,editImgId:ut,callback:bt},Ft)=>{let qt=(0,pe.useRef)(),qe=(0,pe.useRef)(),_t=(0,pe.useRef)(),Xt=(0,pe.useRef)(!1);const Kt=(0,pe.useRef)(!1);console.log("ref:",Ft);const[on,rn]=(0,pe.useState)(0),[Un,Ar]=(0,pe.useState)("100vh");return(0,pe.useEffect)(()=>{rn(1);try{indexedDB.databases().then(rr=>{rr.forEach(ir=>indexedDB.deleteDatabase(ir.name))})}catch(rr){}},[]),(0,pe.useImperativeHandle)(Ft,()=>({setHeight:Ar})),ue.createElement("div",{ref:Kt,className:"body-overflow-initial"},ue.createElement(jt.Z,{width:"100vw",height:Un,footer:null,closable:!0,placement:"bottom",open:!!on,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Te.drawerWrap}`,onClose:()=>{window.saveDrawData(rr=>{bt({src:`/api/attachments/${rr}`,id:rr})})},title:ue.createElement(Yt.Z,{align:"middle"},ue.createElement(xn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ue.createElement(xn.Z,{onClick:()=>{Ar(Un==="60px"?"100vh":"60px")}},ue.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ue.createElement(xn.Z,{onClick:()=>{window.saveDrawData(rr=>{if(rr===null){vn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}vn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),bt({src:`/api/attachments/${rr}`,id:rr,disabledClose:!0})})}},ue.createElement(et.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ue.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${ut||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:qe})))}),fe=oe(11320),se=oe(78045),Oe=oe(31795);const rt=se.ZP.Group,Pt={margin:"0 8px"};var zt=({callback:Zn,onCancel:ut})=>{function bt(Ft){Zn(Ft)}return pe.createElement(pt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:bt},pe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},pe.createElement("span",{style:Pt},"\u5355\u5143\u683C\u6570\uFF1A"),pe.createElement("span",{style:Pt},"\u884C\u6570"),pe.createElement(pt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},pe.createElement(Oe.Z,null)),pe.createElement("span",{style:Pt},"\u5217\u6570"),pe.createElement(pt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},pe.createElement(Oe.Z,null))),pe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},pe.createElement("span",{style:Pt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),pe.createElement(pt.default.Item,{name:"align"},pe.createElement(rt,null,pe.createElement(se.ZP,{value:"default"},pe.createElement("i",{className:"fa fa-align-justify"})),pe.createElement(se.ZP,{value:"left"},pe.createElement("i",{className:"fa fa-align-left"})),pe.createElement(se.ZP,{value:"center"},pe.createElement("i",{className:"fa fa-align-center"})),pe.createElement(se.ZP,{value:"right"},pe.createElement("i",{className:"fa fa-align-right"}))))),pe.createElement("div",{className:"flex-container flex-end"},pe.createElement(et.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(et.ZP,{type:"ghost",onClick:ut},"\u53D6\u6D88")))},Zt=oe(47897),en=oe(61016),Gt=oe.n(en),cr=(0,pe.forwardRef)(({use3d:Zn,width:ut,height:bt,callback:Ft,showSaveButton:qt},qe)=>{const _t=(0,pe.useRef)(),Xt=(0,pe.useRef)(),[Kt,on]=(0,pe.useState)(!1),rn=(0,pe.useRef)({id:_t,appName:"graphing",width:ut||1e3,height:bt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,pe.useEffect)(()=>{Xt.current=new(Gt())(rn.current,!0),window.onload=function(){Xt.current.inject("applet_container")}},[]);const Un=()=>{var Ar=window.ggbApplet.getPNGBase64(1,!0,72);return Ft&&Ft(Ar),Ar};return(0,pe.useEffect)(()=>{rn.current.appName=Kt?"3D":"graphing",Xt.current.inject("applet_container")},[Kt]),(0,pe.useEffect)(()=>{on(Zn)},[Zn]),(0,pe.useImperativeHandle)(qe,()=>({getImgData:Un})),pe.createElement(pe.Fragment,null,pe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_t}),pe.createElement(Yt.Z,{align:"middle"},pe.createElement(xn.Z,{flex:1},pe.createElement(Zt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Kt,onChange:Ar=>on(Ar)})),pe.createElement(xn.Z,null,pe.createElement(et.ZP,{size:"large",onClick:Un,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Wt=oe(36527),bn=oe(25934);const lr="link",Wr="upload-image",Rn="add-flowchart",Tr="draw-image",Ca="add-flowchart",Wi="code-block",Li="add-table",Mi="------------",Ji={default:Mi,left:`:${Mi}`,center:`:${Mi}:`,right:`${Mi}:`};var Zi=oe(99914),Ea=(Zn,ut,bt)=>new Promise((Ft,qt)=>{var qe=Kt=>{try{Xt(bt.next(Kt))}catch(on){qt(on)}},_t=Kt=>{try{Xt(bt.throw(Kt))}catch(on){qt(on)}},Xt=Kt=>Kt.done?Ft(Kt.value):Promise.resolve(Kt.value).then(qe,_t);Xt((bt=bt.apply(Zn,ut)).next())});function Ma(){}let Gr=0;const Va=1e4,no="\u2581",po="@\u2581\u2581@",mo="@\u2581@",Pa=`
**\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`,Bt=["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 On(Zn){return/^\d+$/.test(Zn)?`${Zn}px`:Zn}const $n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ir={[$n+"-B"]:"bold",[$n+"-I"]:"italic"},or={[lr]:"\u6DFB\u52A0\u94FE\u63A5",[Wi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Wr]:"\u6DFB\u52A0\u56FE\u7247",[Tr]:"\u6DFB\u52A0\u753B\u56FE",[Rn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Li]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Sr=({defaultValue:Zn="",onChange:ut,width:bt="100%",height:Ft=400,miniToolbar:qt=!1,isFocus:qe=!1,watch:_t,insertTemp:Xt,mode:Kt="markdown",id:on="markdown-editor-id",showResizeBar:rn=!1,noStorage:Un=!1,showNullButton:Ar=!1,showNullProgramButton:rr=!1,hidetoolBar:ir=!1,fullScreen:mr=!1,onBlur:br,onCMBeforeChange:Yr,onFullScreen:_n,className:Qn="",disablePaste:na=!1,disabled:ca=!1,disabledFill:_i=!1,placeholder:ii="",values:va="",extraUse:_r,onAddBlank:Qi})=>{const[Tn,Ua]=(0,pe.useState)(null),[xa,uo]=(0,pe.useState)(Zn),[ja,ka]=(0,pe.useState)(_t),[co,za]=(0,pe.useState)(mr),[fa,Ya]=(0,pe.useState)(""),[_o,qa]=(0,pe.useState)(0),[Oa,So]=(0,pe.useState)(Ft),[To,fo]=(0,pe.useState)(!1),Vi=(0,pe.useRef)((0,bn.Z)()),At=(0,pe.useRef)(!1),Mt=(0,pe.useRef)(),[tn,Sn]=(0,pe.useState)(0),[Kn,Zr]=(0,pe.useState)(0),Nr=(0,pe.useRef)(),qr=(0,pe.useRef)(),li=(0,pe.useRef)(),Jr=(0,pe.useRef)(),Ki=(0,pe.useRef)(),ea=(0,pe.useRef)(),ha=()=>Ea(void 0,null,function*(){var En;const wn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Vi.current}});(En=wn==null?void 0:wn.attachments)!=null&&En.length&&(console.log("cm:",Tn,Nr),wn.attachments.map(In=>{In.content_type.indexOf("image")>-1?Tn.replaceSelection(`![,](/api/attachments/${In.id}?type=${In.content_type})`):In.content_type.indexOf("video")>-1?Tn.replaceSelection(`<video width="100%" controls src="${fe.Z.API_SERVER}/api/attachments/${data.id}"></video>`):In.content_type.indexOf("pdf")>-1?Tn.replaceSelection(`<a href="${fe.Z.API_SERVER}/api/attachments/${In.id}?type=${In.content_type}&disposition=inline" target="_blank">${In.name}</a>`):Tn.replaceSelection(`[${In.name}](${fe.Z.API_SERVER}/api/attachments/${In.id}?type=${In.content_type})`)}))});(0,pe.useEffect)(()=>{const En=window.scrollY||window.pageYOffset;uo(va),Tn==null||Tn.setValue(va),window.scrollTo(0,En)},[va]),(0,pe.useEffect)(()=>{_n==null||_n(co)},[co]),(0,pe.useEffect)(()=>{if(Nr.current){let En=function(In,Bn){var pr;if(na){Bn.preventDefault();return}const Xn=Bn.clipboardData;if(Xn){const jn=Xn.types.toString(),nr=Xn.items;if(jn==="Files"||Xn.types.indexOf("Files")>-1){if(Bn.preventDefault(),Kt=="stex")return;try{let qn=nr[1];((pr=nr[0])==null?void 0:pr.kind)==="file"&&(qn=nr[0]);const dr=qn.getAsFile(),je=dr.name.split(".").pop();(0,ft.I)(dr,Ye=>{var $t,Dt,sn;Ye.id?(($t=dr==null?void 0:dr.type)==null?void 0:$t.indexOf("image"))>-1?wn.replaceSelection(`<img width="100%" src="/api/attachments/${Ye.id}?type=${Ye.content_type})" alt="" />`):((Dt=dr==null?void 0:dr.type)==null?void 0:Dt.indexOf("video"))>-1?wn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ye.id}"></video>`):((sn=dr==null?void 0:dr.type)==null?void 0:sn.indexOf("pdf"))>-1?wn.replaceSelection(`<a href="/api/attachments/${Ye.id}?type=${dr.type}&disposition=inline" target="_blank">${dr.name}</a>`):Bt.includes(je)?wn.replaceSelection(`<a href="/api/attachments/${Ye.id}?type=office&disposition=inline" target="_blank">${dr.name}</a>`):wn.replaceSelection(`[${dr.name}](/api/attachments/${Ye.id}?type=${Ye.content_type})`):(Ye==null?void 0:Ye.status)===401&&(vn.ZP.warning((Ye==null?void 0:Ye.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(qn){vn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const wn=Fe().fromTextArea(Nr.current,{mode:Kt,lineNumbers:!qt,lineWrapping:!0,value:Zn,autoCloseTags:!rr,autoCloseBrackets:!0});return wn.on("keyup",function(In,Bn){Bn.keyCode===8&&(In.getValue()==""?wn.setOption("placeholder",ii):wn.setOption("placeholder",null))}),wn.on("keydown",function(In,Bn){if(Bn.keyCode===8){var pr=Na(In);pr&&Bn.preventDefault()}}),qe&&wn.focus(),wn.on("paste",En),wn.on("dragleave",function(In,Bn){qr.current.classList.remove("mouse-hover-md")}),ca&&wn.on("beforeChange",function(In,Bn){(Bn.origin==="paste"||Bn.origin==="+input")&&Bn.cancel()}),Ua(wn),()=>{wn.off("paste",En)}}},[]);const Za=(0,pe.useCallback)(()=>{if(qr.current)try{}catch(En){console.log(En,"---- to set md editor body height")}},[Oa,qr,co]);(0,pe.useEffect)(()=>{function En(){let wn=new ct.Z(In=>{for(let Bn of In)(Bn.target.offsetHeight>0||Bn.target.offsetWidth>0)&&(Za(),Tn.setSize("100%","100%"),Tn.refresh())});return wn.observe(Nr.current.parentElement),wn}if(Tn){const wn=En();return()=>{var In,Bn;(In=Nr.current)!=null&&In.parentElement&&wn.unobserve((Bn=Nr.current)==null?void 0:Bn.parentElement)}}},[Tn,Za]),(0,pe.useEffect)(()=>{if(Tn){let En=[];for(const[wn,In]of Object.entries(Ir)){let Bn={[wn]:()=>{Ra(In)}};En.push(Bn),Tn.addKeyMap(Bn)}return Mt.current=setInterval(()=>{At.current&&ha()},4e3),()=>{clearInterval(Mt.current);for(let wn of En)Tn.removeKeyMap(wn)}}},[Tn]),(0,pe.useEffect)(()=>{mr!==co&&za(mr)},[mr]),(0,Zi.Z)(()=>{if(!Un&&_o>0){let En=new Date().getTime(),wn=window.sessionStorage.getItem(on);En>=_o+Va&&(!wn||wn!==xa)&&(window.sessionStorage.setItem(on,xa),fo(!0))}},Va),(0,pe.useEffect)(()=>{ka(_t)},[Tn,_t]),(0,pe.useEffect)(()=>{Tn&&qe&&Tn.focus()},[Tn,qe]),(0,pe.useEffect)(()=>{if(ja&&Tn){let En=function(In){let Bn=In.target;if(Jr.current){let pr=Bn.scrollTop/Bn.scrollHeight;Jr.current.scrollTop=Jr.current.scrollHeight*pr}};const wn=Tn.getScrollerElement();return wn.addEventListener("scroll",En),()=>{wn.removeEventListener("scroll",En)}}},[Tn,ja]),(0,pe.useEffect)(()=>{if(Tn&&Yr){let En=function(wn,In){Yr(wn,In)};return Tn.on("beforeChange",En),()=>{Tn.off("beforeChange",En)}}},[Tn,Yr]),(0,pe.useEffect)(()=>{if(Tn&&br){let En=function(){br(Tn.getValue())};return Tn.on("blur",En),()=>{Tn.off("blur",En)}}},[Tn,br]);function Na(En,wn){var In=En.getDoc(),Bn=In.getCursor(),pr=In.getLine(Bn.line),Xn=pr.charAt(Bn.ch-1),jn=pr.lastIndexOf("@\u2581@",Bn.ch),nr=pr.lastIndexOf("@\u2581\u2581@",Bn.ch),qn=jn>nr?jn:nr,dr=jn>nr?3:4;if(po.indexOf(Xn)===-1)return null;if(console.log("change1:",wn,En,pr,Bn,qn,jn,nr,Xn),qn>=0&&Bn.ch-qn<5){var je=qn+dr;return In.replaceRange("",{line:Bn.line,ch:qn},{line:Bn.line,ch:je}),{line:Bn.line,ch:je}}return null}(0,pe.useEffect)(()=>{if(Tn){let En=function(wn,In){const Bn=wn.getValue();uo(Bn),qa(new Date().getTime()),wn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ut&&(rr?ut(Bn,ln(Bn)):ut(Bn))};return Tn.on("change",En),()=>{Tn.off("change",En)}}},[Tn,ut]),(0,pe.useEffect)(()=>{if(Tn)if(Zn==null)Tn.setValue(""),uo("");else{const En=window.scrollY||window.pageYOffset;Zn!==Tn.getValue()&&(Tn.setValue(Zn),uo(Zn),Tn.setCursor(ca?1:Tn.lineCount(),0),window.scrollTo(0,En))}},[Tn,Zn]);const Ra=(0,pe.useCallback)(En=>{const wn=Tn.getCursor(),In=Tn.getSelection();let Bn=In.split(`
`);switch(En){case"bold":return Tn.replaceSelection("**"+In+"**"),In===""&&Tn.setCursor(wn.line,wn.ch+2),Tn.focus();case"italic":return Tn.replaceSelection("*"+In+"*"),In===""&&Tn.setCursor(wn.line,wn.ch+1),Tn.focus();case"code":return Tn.replaceSelection("`"+In+"`"),In===""&&Tn.setCursor(wn.line,wn.ch+1),Tn.focus();case"inline-latex":return Ya("inline-latex"),Tn.focus();case"latex":return Tn.replaceSelection("```latex\n"+In+"\n```"),Tn.setCursor(wn.line+1,In.length+1),Tn.focus();case"line-break":return Tn.replaceSelection(`<br/>
`),Tn.focus();case"list-ul":return In===""?Tn.replaceSelection("- "+In):Tn.replaceSelection(Bn.map(pr=>pr===""?"":`- ${pr}`).join(`
`)),Tn.focus();case"list-ol":return In===""?Tn.replaceSelection("1. "+In):Tn.replaceSelection(Bn.map((pr,Xn)=>pr===""?"":`${Xn+1}. ${pr}`).join(`
`)),Tn.focus();case"add-null-ch":Qi==null||Qi();return;case"add-signal":return In===""&&Tn.setCursor(wn.line,wn.ch),Tn.replaceSelection(mo),Tn.focus();case"add-multiple":return In===""&&Tn.setCursor(wn.line,wn.ch),Tn.replaceSelection(po),Tn.focus();case"inster-template-1":return In===""&&Tn.setCursor(wn.line,wn.ch),Tn.replaceSelection(Pa),Tn.focus();case"eraser":return Tn.setValue(""),Tn.focus();case"trigger-watch":return ka(!ja),Tn.focus();case"trigger-full-screen":return za(!co),Tn.focus();case lr:Ya(lr);return;case Wi:Ya(Wi);return;case Wr:Ya(Wr);return;case Tr:Ya(Tr);return;case"maths-latex":Ya("maths-latex");return;case Rn:Ki.current="",sessionStorage.removeItem("file_id"),Ya(Rn);return;case Li:Ya(Li);return;default:throw new Error}},[Tn,ja,co]),Be=(0,pe.useCallback)((En,wn)=>{var In,Bn,pr,Xn,jn,nr;Ya("");const{src:qn,alt:dr,id:je}=En||{};switch(fa){case lr:const{title:kn,link:yn}=En;return Tn.replaceSelection(`[${kn}](${yn})`),Tn.focus();case Wi:const{language:zn,content:Pn}=En;return Tn.replaceSelection(["```"+zn,Pn,"```"].join(`
`)),Tn.focus();case"maths-latex":for(var Ye=atob(En),$t=new Uint8Array(Ye.length),Dt=0;Dt<Ye.length;Dt++)$t[Dt]=Ye.charCodeAt(Dt);var sn=new Blob([$t],{type:"image/png"});(0,ft.I)(sn,Qr=>{Qr.id?Tn.replaceSelection(`![,](/api/attachments/${Qr.id}?type=${Qr.content_type})`):(Qr==null?void 0:Qr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Tn.replaceSelection("`$$"+En+"$$`");break;case Ca:if(!je)return;Tn.focus(),Tn.getValue().indexOf(qn)===-1?Tn.replaceSelection(`<center><img id="${je}" width="80%" src="${qn}" class="draw-flowchart" alt="${dr||""}" /></center>`):document.getElementById(je).src=fe.Z.API_SERVER+qn+"?t="+Date.now();try{setTimeout(()=>{br(Tn.getValue())},100)}catch(Qr){}break;case Wr:case Tr:const pn=wn,Nn=(pr=(Bn=(In=pn==null?void 0:pn.name)==null?void 0:In.split("."))==null?void 0:Bn.pop)==null?void 0:pr.call(Bn);return((Xn=pn==null?void 0:pn.type)==null?void 0:Xn.indexOf("image"))>-1||!(pn!=null&&pn.type)?pn!=null&&pn.align||pn!=null&&pn.width?Tn.replaceSelection(`<p style="text-align:${pn.align||"initial"}"><img width="${pn.width?pn.width+"%":"initial"}" src="${qn}" alt="${dr||""}" /></p>`):Tn.replaceSelection(`<img width="100%" src="${qn}" alt="${dr||""}" />`):((jn=pn==null?void 0:pn.type)==null?void 0:jn.indexOf("video"))>-1?Tn.replaceSelection(`<video width="100%" controls src="${qn}"></video>`):((nr=pn==null?void 0:pn.type)==null?void 0:nr.indexOf("pdf"))>-1?Tn.replaceSelection(`<a href="${qn}?type=${pn.type}&disposition=inline" target="_blank">${pn.name}</a>`):Bt.includes(Nn)?Tn.replaceSelection(`<a href="${qn}?type=office&disposition=inline" target="_blank">${pn.name}</a>`):Tn.replaceSelection(`[${pn.name}](${qn})`),Tn.focus();case Li:const{row:Wn,col:vr,align:Hn}=En;let Er=`
`;for(let Qr=0;Qr<Wn;Qr++){let Rr=[],jr=[];for(let Cr=0;Cr<vr;Cr++)Qr===1&&jr.push(Ji[Hn]),Rr.push(" ");Qr===1&&(Er+=`| ${jr.join(" | ")} |
`),Er+=`| ${Rr.join(vr===1?"":" | ")} |
`}return Tn.replaceSelection(Er+`
`),Tn.focus();default:throw new Error}},[Tn,fa]),Ve=(0,pe.useMemo)(()=>{switch(fa){case lr:return pe.createElement(cn,{callback:Be,onCancel:He});case Wi:return pe.createElement(an.Z,{callback:Be,onCancel:He});case Wr:return pe.createElement(ft.Z,{callback:Be,onCancel:He});case Rn:return pe.createElement(me,{editImgId:Ki.current,callback:Be,onCancel:He});case Li:return pe.createElement(zt,{callback:Be,onCancel:He});case"maths-latex":return pe.createElement(cr,{showSaveButton:!0,callback:Be});case"inline-latex":return pe.createElement(Wt.Z,{showSaveButton:!0,callback:Be});default:return null}},[fa]);function He(){Ya("")}(0,pe.useEffect)(()=>{if(li.current){let En=function(jn){pr=!0,Xn=jn.pageY},wn=function(){pr=!1},In=function(jn){if(pr){let nr=jn.pageY-Xn;nr<0&&(nr=0),nr>300&&(nr=300);let qn=Ft+nr+"px";So(qn)}},Bn=li.current,pr=!1,Xn=0;return Bn.addEventListener("mousedown",En),document.addEventListener("mousemove",In),document.addEventListener("mouseup",wn),()=>{Bn.removeEventListener("mousedown",En),document.removeEventListener("mousemove",In),document.removeEventListener("mouseup",wn)}}},[Tn,li]),(0,pe.useEffect)(()=>{So(Ft)},[Ft]);const tt=On(bt),gt=On(Oa),Ct={width:tt,height:gt},It=(0,pe.useMemo)(()=>{if(_o){let En=new Date(_o),wn=En.getHours(),In=En.getMinutes(),Bn=En.getSeconds();return wn=wn<10?"0"+wn:wn,In=In<10?"0"+In:In,Bn=Bn<10?"0"+Bn:Bn,`${wn}:${In}:${Bn}`}return 0},[_o]),ln=En=>{const wn=[];if(rr){let In=-1;En=En.replace(/(@▁▁@|@▁@)/g,function(Bn,pr,Xn){wn.push({multiLine:Bn!==mo})})}return wn};function mn(){window.sessionStorage.removeItem(on),fo(!1),qa(0)}function Yn(){fo(!1),qa(0),Tn.setValue(window.sessionStorage.getItem(on))}(0,pe.useEffect)(()=>{or[fa]&&fa!==Tr&&fa!==Rn&&setTimeout(()=>{const En=document.getElementsByClassName("markdown-popup-form")[0],wn=window.innerWidth/2-En.offsetWidth/2,In=window.innerHeight/2-En.offsetHeight/2;Sn(wn),Zr(In)},0)},[fa]);const yr=En=>{En.preventDefault();const wn=En.clientX-tn,In=En.clientY-Kn;document.body.onmousemove=Bn=>{let pr=Bn.clientX-wn,Xn=Bn.clientY-In;const jn=document.getElementsByClassName("markdown-popup-form")[0],nr=window.innerWidth-jn.offsetWidth,qn=window.innerHeight-jn.offsetHeight;pr=Math.max(0,Math.min(pr,nr)),Xn=Math.max(0,Math.min(Xn,qn)),Vn(Bn.clientX,Bn.clientY,wn,In)&&(Sn(pr),Zr(Xn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Vn=(En,wn,In,Bn)=>{const pr=document.body.clientHeight,Xn=document.body.clientWidth;return En<20&&In>En||En>Xn-20&&In<En||wn<20&&Bn>wn||wn>pr-20&&Bn<wn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return pe.createElement(pe.Fragment,null,pe.createElement("div",{className:"markdown-editor-wrapper",ref:qr},pe.createElement("div",{className:`markdown-editor-container ${Qn} ${ja?"on-preview":""} ${qt?"mini":""} ${co?"full-screen":""}`,style:Ct},pe.createElement(Ge,{insertTemp:Xt,watch:ja,fullScreen:co,showNullButton:Ar,showNullProgramButton:rr,onActionCallback:Ra,hidetoolBar:ir,extraUse:_r}),pe.createElement("div",{className:"markdown-editor-body"},pe.createElement("div",{className:"codemirror-container"},pe.createElement("textarea",{ref:Nr,placeholder:ii})),ja?pe.createElement("div",{ref:Jr,className:"preview-container"},Kt==="stex"&&pe.createElement(Pe,{value:xa}),Kt!=="stex"&&pe.createElement(Je.Z,{edit:!0,disabledFill:_i,showProgramFill:rr,value:xa,openEditor:En=>{var wn;Ki.current=En,(wn=ea.current)==null||wn.setHeight("100vh"),setTimeout(()=>{Ya("add-flowchart")},150)}})):null))),rn?pe.createElement("a",{ref:li,className:"editor-resize"}):null,fa===Tr&&pe.createElement(nn,{callback:Be,onCancel:He}),fa===Rn&&pe.createElement(me,{ref:ea,editImgId:Ki.current,callback:Be,onCancel:He}),pe.createElement(vt.Z,null,or[fa]&&fa!==Tr&&fa!==Rn?pe.createElement(mt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:tn,top:Kn},title:pe.createElement("div",{style:{cursor:"move"},onMouseDown:yr},or[fa]),open:!0,onCancel:He,footer:null,destroyOnClose:!0,width:fa===Rn?"1200px":null,height:fa===Rn?"80vh":null,className:"markdown-popup-form"},Ve):null))}},70859:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ke},I:function(){return vt}});var pe=oe(22150),xe=oe(2453),Fe=oe(69677),ct=oe(93421),ge=oe(31795),Me=oe(78045),Ee=oe(71577),Ce=oe(15476),he=oe(67294),ke=oe(52262),Je=oe(67294),Pe=Object.defineProperty,dt=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,ht=(pt,Ue,et)=>Ue in pt?Pe(pt,Ue,{enumerable:!0,configurable:!0,writable:!0,value:et}):pt[Ue]=et,yt=(pt,Ue)=>{for(var et in Ue||(Ue={}))nt.call(Ue,et)&&ht(pt,et,Ue[et]);if(lt)for(var et of lt(Ue))_e.call(Ue,et)&&ht(pt,et,Ue[et]);return pt},Ze=(pt,Ue)=>dt(pt,ot(Ue));const{useForm:Qe}=pe.default,be={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}};var Ke=({callback:pt,onCancel:Ue})=>{const[et]=Qe();let kt=(0,he.useRef)();function it(Tt){kt.current.width=et.getFieldValue("width"),kt.current.align=et.getFieldValue("align"),pt(Tt,kt.current)}function st(Tt,Ut){if(Tt.status===-1){xe.ZP.error(Tt.message);return}et.setFieldsValue({src:`/api/attachments/${Tt.id}`,type:Ut.type})}function We(Tt){let Ut=Tt.target.files[0];kt.current=Ut,vt(Ut,st)}return Je.createElement(pe.default,Ze(yt({form:et},we),{className:"upload-image-panel",onFinish:it,style:{width:470,overflow:"hidden"}}),Je.createElement(pe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Je.createElement("div",{className:"flex-container"},Je.createElement(pe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},Je.createElement(Fe.default,{style:be})),Je.createElement(Ge,{onFileChange:We}))),Je.createElement(pe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Je.createElement(Fe.default,{style:{width:264}})),Je.createElement(pe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Je.createElement(ct.Z,null,Je.createElement(pe.default.Item,{name:"width",style:{margin:0}},Je.createElement(ge.Z,{style:{width:264}})),Je.createElement("span",{className:"ml8"},"%"))),Je.createElement(pe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Je.createElement(Me.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"}]})),Je.createElement("aside",null,Je.createElement(pe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Je.createElement(Ee.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Je.createElement(Ee.ZP,{type:"default",onClick:Ue},"\u53D6\u6D88"))))};function Ge({onFileChange:pt}){return Je.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Je.createElement("input",{type:"file",onChange:pt}))}function vt(pt,Ue){if(!pt)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,ke.bg)())throw xe.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let et=new FormData;et.append("editormd-image-file",pt),et.append("file_param_name","editormd-image-file"),et.append("byxhr","true");var kt=new window.XMLHttpRequest;kt.withCredentials=!0,kt.addEventListener("load",function(it){Ue(JSON.parse(it.target.responseText),pt)},!1),kt.addEventListener("error",function(it){console.error(it)},!1),kt.open("POST",`${Ce.KI}/api/attachments.json`),kt.send(et)}},76621:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Fe}});var pe=oe(67294),xe=oe(73935);class Fe extends pe.Component{constructor(ge){super(ge);const Me=window.document;this.node=Me.createElement("div"),Me.body.appendChild(this.node)}render(){const{children:ge}=this.props;return(0,xe.createPortal)(ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return xe}});var pe=oe(67294);function xe(Fe,ct){const ge=(0,pe.useRef)();(0,pe.useEffect)(()=>{ge.current=Fe}),(0,pe.useEffect)(()=>{function Me(){ge.current()}if(ct!==null){let Ee=setInterval(Me,ct);return()=>clearInterval(Ee)}},[ct])}},6469:function(Cn,Vt,oe){"use strict";oe.r(Vt),oe.d(Vt,{default:function(){return kt}});var pe=oe(67294),xe=oe(91304),Fe=oe(35973),ct=oe(68508),ge=oe(97183),Me=oe(22150),Ee=oe(2453),Ce=oe(85673),he=oe(71230),ke=oe(15746),Je=oe(11713),Pe=oe(69677),dt=oe(96074),ot=oe(85546),lt=oe(71577),nt=oe(70757),_e={flex_box_center:"flex_box_center___JefHi",flex_space_between:"flex_space_between___N1h0l",flex_box_vertical_center:"flex_box_vertical_center___Mtb4t",flex_box_center_end:"flex_box_center_end___F6G6K",flex_box_column:"flex_box_column___JldFX",bg:"bg___Hgook",title:"title____XaYs",titleLeft:"titleLeft___xe0PB",titleRight:"titleRight___wML5g",btns:"btns___l22_n"},ht=Object.defineProperty,yt=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,be=(it,st,We)=>st in it?ht(it,st,{enumerable:!0,configurable:!0,writable:!0,value:We}):it[st]=We,we=(it,st)=>{for(var We in st||(st={}))Ze.call(st,We)&&be(it,We,st[We]);if(yt)for(var We of yt(st))Qe.call(st,We)&&be(it,We,st[We]);return it},Ke=(it,st)=>{var We={};for(var Tt in it)Ze.call(it,Tt)&&st.indexOf(Tt)<0&&(We[Tt]=it[Tt]);if(it!=null&&yt)for(var Tt of yt(it))st.indexOf(Tt)<0&&Qe.call(it,Tt)&&(We[Tt]=it[Tt]);return We},Ge=(it,st,We)=>new Promise((Tt,Ut)=>{var Qt=Lt=>{try{Ae(We.next(Lt))}catch(cn){Ut(cn)}},Xe=Lt=>{try{Ae(We.throw(Lt))}catch(cn){Ut(cn)}},Ae=Lt=>Lt.done?Tt(Lt.value):Promise.resolve(Lt.value).then(Qt,Xe);Ae((We=We.apply(it,st)).next())});const{SubMenu:vt}=ct.default,{Content:pt,Sider:Ue}=ge.default,et=it=>{var st=it,{graduation:We,globalSetting:Tt,loading:Ut,user:Qt,dispatch:Xe}=st,Ae=Ke(st,["graduation","globalSetting","loading","user","dispatch"]),Lt,cn,an,ft,mt,Yt,An;const dn=(0,Fe.useParams)(),nn=(0,Fe.useLocation)(),{userInfo:jt}=Qt,[xn]=Me.default.useForm(),{addTopicData:vn}=We,Te=()=>Ge(void 0,null,function*(){const ue=xn.getFieldsValue(),le=we({},ue);le.city&&(le.province=le.city[0],le.city=le.city[1]);const me=yield Xe({type:"graduation/addTopic",payload:{coursesId:dn.coursesId,attachment_ids:[],graduation_topic:le}});me.status?Ee.ZP.error(me.message):Fe.history.push(`/classrooms/${dn.coursesId}/graduation_topics/${dn.categoryId}`)});return(0,pe.useEffect)(()=>{Xe({type:"graduation/addTopicDefaultData",payload:we({},dn)})},[dn.coursesId]),pe.createElement("section",{className:"edu-container"},pe.createElement("section",{className:"animated fadeIn"},pe.createElement("aside",{className:"mt10"},jt&&pe.createElement(Ce.Z,{separator:">"},pe.createElement(Ce.Z.Item,null,pe.createElement(Fe.Link,{to:`${jt.first_category_url}`},(Lt=jt==null?void 0:jt.course)==null?void 0:Lt.course_name)),pe.createElement(Ce.Z.Item,null,pe.createElement(Fe.Link,{to:`/classrooms/${dn.coursesId}/graduation_topics/${dn.categoryId}`},"\u6BD5\u8BBE\u9009\u9898")),pe.createElement(Ce.Z.Item,null,"\u65B0\u5EFA"))),pe.createElement("aside",{className:[_e.title,"mt20"].join(" ")},pe.createElement(he.Z,{style:{width:"100%"}},pe.createElement(ke.Z,{flex:"1"},pe.createElement("strong",{className:"font20 ml5"},"\u65B0\u5EFA\u6BD5\u8BBE\u9009\u9898")),pe.createElement(ke.Z,null,pe.createElement(Fe.Link,{className:"font16 c-light-black",to:`/classrooms/${dn.coursesId}/exercise`},"\u8FD4\u56DE"))))),pe.createElement("section",{className:[_e.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},pe.createElement(Me.default,{layout:"vertical",form:xn,scrollToFirstError:!0,onFinish:ue=>Ge(void 0,null,function*(){Te()})},pe.createElement(Me.default.Item,{name:"tea_id",label:"\u6307\u5BFC\u8001\u5E08\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08"}]},pe.createElement(Je.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08",style:{width:200}},(cn=vn.teacher_list)==null?void 0:cn.map(function(ue,le){return pe.createElement(Je.default.Option,{value:ue.id,key:le},ue.name)}))),pe.createElement(Me.default.Item,{name:"name",label:"\u9009\u9898\u540D\u79F0\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},pe.createElement(Pe.default,{maxLength:60,size:"middle",placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),pe.createElement(dt.Z,null),pe.createElement(Me.default.Item,{label:"\u9009\u9898\u7B80\u4ECB",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},pe.createElement(xe.Z,{watch:!0,placeholder:"\u8BF7\u7B80\u8981\u8BF4\u660E\u9009\u9898\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"})),pe.createElement(he.Z,{gutter:[20,0]},pe.createElement(ke.Z,{flex:"1"},pe.createElement(Me.default.Item,{name:"topic_type"},pe.createElement(Je.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u7C7B\u578B"},(an=vn.topic_type)==null?void 0:an.map(function(ue,le){return pe.createElement(Je.default.Option,{value:ue.id,key:le},ue.name)})))),pe.createElement(ke.Z,{flex:"1"},pe.createElement(Me.default.Item,{name:"topic_source"},pe.createElement(Je.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6765\u6E90"},(ft=vn.topic_source)==null?void 0:ft.map(function(ue,le){return pe.createElement(Je.default.Option,{value:ue.id,key:le},ue.name)})))),pe.createElement(ke.Z,{flex:"1"},pe.createElement(Me.default.Item,{name:"topic_property_first"},pe.createElement(Je.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D281"},(mt=vn.topic_property_first)==null?void 0:mt.map(function(ue,le){return pe.createElement(Je.default.Option,{value:ue.id,key:le},ue.name)})))),pe.createElement(ke.Z,{flex:"1"},pe.createElement(Me.default.Item,{name:"topic_property_second"},pe.createElement(Je.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D282"},(Yt=vn.topic_property_second)==null?void 0:Yt.map(function(ue,le){return pe.createElement(Je.default.Option,{value:ue.id,key:le},ue.name)})))),pe.createElement(ke.Z,{flex:"150px"})),pe.createElement(dt.Z,null),pe.createElement(Me.default.Item,{name:"source_unit",label:"\u9009\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"},pe.createElement(Pe.default,{width:"200",size:"middle",style:{width:200},placeholder:"\u8BF7\u586B\u5199\u6765\u6E90\u5355\u4F4D"})),pe.createElement(Me.default.Item,{name:"topic_repeat",label:"\u9009\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"},pe.createElement(Je.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u91CD\u590D\u60C5\u51B5",style:{width:200}},(An=vn.topic_repeat)==null?void 0:An.map(function(ue,le){return pe.createElement(Je.default.Option,{value:ue.id,key:le},ue.name)}))),pe.createElement(Me.default.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},pe.createElement(ot.Z,{size:"middle",style:{width:200},options:nt.P,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),pe.createElement("aside",{className:_e.btns},pe.createElement(lt.ZP,{type:"primary",onClick:()=>{xn.submit()}},"\u4FDD\u5B58"),pe.createElement(Fe.Link,{to:`/classrooms/${dn.coursesId}/graduation_topics/${dn.categoryId}`},"\u53D6\u6D88")))};var kt=(0,Fe.connect)(({graduation:it,loading:st,user:We,globalSetting:Tt})=>({graduation:it,globalSetting:Tt,user:We,loading:st.effects}))(et)},70757:function(Cn,Vt,oe){"use strict";oe.d(Vt,{P:function(){return pe}});const pe=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},9708:function(Cn,Vt,oe){"use strict";oe.d(Vt,{F:function(){return ge},Z:function(){return ct}});var pe=oe(94184),xe=oe.n(pe);const Fe=null;function ct(Me,Ee,Ce){return xe()({[`${Me}-status-success`]:Ee==="success",[`${Me}-status-warning`]:Ee==="warning",[`${Me}-status-error`]:Ee==="error",[`${Me}-status-validating`]:Ee==="validating",[`${Me}-has-feedback`]:Ce})}const ge=(Me,Ee)=>Ee||Me},85673:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return st}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(37419),ct=oe(1337),ge=oe(67294),Me=oe(96159),Ee=oe(53124),Ce=oe(42922),he=oe(35874);const ke=We=>{let{children:Tt}=We;const{getPrefixCls:Ut}=ge.useContext(Ee.E_),Qt=Ut("breadcrumb");return ge.createElement("li",{className:`${Qt}-separator`,"aria-hidden":"true"},Tt===""?Tt:Tt||"/")};ke.__ANT_BREADCRUMB_SEPARATOR=!0;var Je=ke,Pe=function(We,Tt){var Ut={};for(var Qt in We)Object.prototype.hasOwnProperty.call(We,Qt)&&Tt.indexOf(Qt)<0&&(Ut[Qt]=We[Qt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Qt=Object.getOwnPropertySymbols(We);Xe<Qt.length;Xe++)Tt.indexOf(Qt[Xe])<0&&Object.prototype.propertyIsEnumerable.call(We,Qt[Xe])&&(Ut[Qt[Xe]]=We[Qt[Xe]]);return Ut};function dt(We,Tt){if(We.title===void 0||We.title===null)return null;const Ut=Object.keys(Tt).join("|");return typeof We.title=="object"?We.title:String(We.title).replace(new RegExp(`:(${Ut})`,"g"),(Qt,Xe)=>Tt[Xe]||Qt)}function ot(We,Tt,Ut,Qt){if(Ut==null)return null;const{className:Xe,onClick:Ae}=Tt,Lt=Pe(Tt,["className","onClick"]),cn=Object.assign(Object.assign({},(0,ct.Z)(Lt,{data:!0,aria:!0})),{onClick:Ae});return Qt!==void 0?ge.createElement("a",Object.assign({},cn,{className:xe()(`${We}-link`,Xe),href:Qt}),Ut):ge.createElement("span",Object.assign({},cn,{className:xe()(`${We}-link`,Xe)}),Ut)}function lt(We,Tt){return(Qt,Xe,Ae,Lt,cn)=>{if(Tt)return Tt(Qt,Xe,Ae,Lt);const an=dt(Qt,Xe);return ot(We,Qt,an,cn)}}var nt=function(We,Tt){var Ut={};for(var Qt in We)Object.prototype.hasOwnProperty.call(We,Qt)&&Tt.indexOf(Qt)<0&&(Ut[Qt]=We[Qt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Qt=Object.getOwnPropertySymbols(We);Xe<Qt.length;Xe++)Tt.indexOf(Qt[Xe])<0&&Object.prototype.propertyIsEnumerable.call(We,Qt[Xe])&&(Ut[Qt[Xe]]=We[Qt[Xe]]);return Ut};const _e=We=>{const{prefixCls:Tt,separator:Ut="/",children:Qt,menu:Xe,overlay:Ae,dropdownProps:Lt,href:cn}=We,ft=(mt=>{if(Xe||Ae){const Yt=Object.assign({},Lt);if(Xe){const An=Xe||{},{items:dn}=An,nn=nt(An,["items"]);Yt.menu=Object.assign(Object.assign({},nn),{items:dn==null?void 0:dn.map((jt,xn)=>{var{key:vn,title:Te,label:ue,path:le}=jt,me=nt(jt,["key","title","label","path"]);let fe=ue!=null?ue:Te;return le&&(fe=ge.createElement("a",{href:`${cn}${le}`},fe)),Object.assign(Object.assign({},me),{key:vn!=null?vn:xn,label:fe})})})}else Ae&&(Yt.overlay=Ae);return ge.createElement(he.Z,Object.assign({placement:"bottom"},Yt),ge.createElement("span",{className:`${Tt}-overlay-link`},mt,ge.createElement(Ce.Z,null)))}return mt})(Qt);return ft!=null?ge.createElement(ge.Fragment,null,ge.createElement("li",null,ft),Ut&&ge.createElement(Je,null,Ut)):null},ht=We=>{const{prefixCls:Tt,children:Ut,href:Qt}=We,Xe=nt(We,["prefixCls","children","href"]),{getPrefixCls:Ae}=ge.useContext(Ee.E_),Lt=Ae("breadcrumb",Tt);return ge.createElement(_e,Object.assign({},Xe,{prefixCls:Lt}),ot(Lt,Xe,Ut,Qt))};ht.__ANT_BREADCRUMB_ITEM=!0;var yt=ht,Ze=oe(14747),Qe=oe(67968),be=oe(45503);const we=We=>{const{componentCls:Tt,iconCls:Ut}=We;return{[Tt]:Object.assign(Object.assign({},(0,Ze.Wf)(We)),{color:We.itemColor,fontSize:We.fontSize,[Ut]:{fontSize:We.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:We.linkColor,transition:`color ${We.motionDurationMid}`,padding:`0 ${We.paddingXXS}px`,borderRadius:We.borderRadiusSM,height:We.lineHeight*We.fontSize,display:"inline-block",marginInline:-We.marginXXS,"&:hover":{color:We.linkHoverColor,backgroundColor:We.colorBgTextHover}},(0,Ze.Qy)(We)),"li:last-child":{color:We.lastItemColor},[`${Tt}-separator`]:{marginInline:We.separatorMargin,color:We.separatorColor},[`${Tt}-link`]:{[`
> ${Ut} + span,
> ${Ut} + a
`]:{marginInlineStart:We.marginXXS}},[`${Tt}-overlay-link`]:{borderRadius:We.borderRadiusSM,height:We.lineHeight*We.fontSize,display:"inline-block",padding:`0 ${We.paddingXXS}px`,marginInline:-We.marginXXS,[`> ${Ut}`]:{marginInlineStart:We.marginXXS,fontSize:We.fontSizeIcon},"&:hover":{color:We.linkHoverColor,backgroundColor:We.colorBgTextHover,a:{color:We.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${We.componentCls}-rtl`]:{direction:"rtl"}})}};var Ke=(0,Qe.Z)("Breadcrumb",We=>{const Tt=(0,be.TS)(We,{});return[we(Tt)]},We=>({itemColor:We.colorTextDescription,lastItemColor:We.colorText,iconFontSize:We.fontSize,linkColor:We.colorTextDescription,linkHoverColor:We.colorText,separatorColor:We.colorTextDescription,separatorMargin:We.marginXS})),Ge=function(We,Tt){var Ut={};for(var Qt in We)Object.prototype.hasOwnProperty.call(We,Qt)&&Tt.indexOf(Qt)<0&&(Ut[Qt]=We[Qt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Qt=Object.getOwnPropertySymbols(We);Xe<Qt.length;Xe++)Tt.indexOf(Qt[Xe])<0&&Object.prototype.propertyIsEnumerable.call(We,Qt[Xe])&&(Ut[Qt[Xe]]=We[Qt[Xe]]);return Ut};function vt(We){const{breadcrumbName:Tt,children:Ut}=We,Qt=Ge(We,["breadcrumbName","children"]),Xe=Object.assign({title:Tt},Qt);return Ut&&(Xe.menu={items:Ut.map(Ae=>{var{breadcrumbName:Lt}=Ae,cn=Ge(Ae,["breadcrumbName"]);return Object.assign(Object.assign({},cn),{title:Lt})})}),Xe}function pt(We,Tt){return(0,ge.useMemo)(()=>We||(Tt?Tt.map(vt):null),[We,Tt])}var Ue=function(We,Tt){var Ut={};for(var Qt in We)Object.prototype.hasOwnProperty.call(We,Qt)&&Tt.indexOf(Qt)<0&&(Ut[Qt]=We[Qt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Qt=Object.getOwnPropertySymbols(We);Xe<Qt.length;Xe++)Tt.indexOf(Qt[Xe])<0&&Object.prototype.propertyIsEnumerable.call(We,Qt[Xe])&&(Ut[Qt[Xe]]=We[Qt[Xe]]);return Ut};const et=(We,Tt)=>{if(Tt===void 0)return Tt;let Ut=(Tt||"").replace(/^\//,"");return Object.keys(We).forEach(Qt=>{Ut=Ut.replace(`:${Qt}`,We[Qt])}),Ut},kt=We=>{const{prefixCls:Tt,separator:Ut="/",style:Qt,className:Xe,rootClassName:Ae,routes:Lt,items:cn,children:an,itemRender:ft,params:mt={}}=We,Yt=Ue(We,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:An,direction:dn,breadcrumb:nn}=ge.useContext(Ee.E_);let jt;const xn=An("breadcrumb",Tt),[vn,Te]=Ke(xn),ue=pt(cn,Lt),le=lt(xn,ft);if(ue&&ue.length>0){const se=[],Oe=cn||Lt;jt=ue.map((rt,Pt)=>{const{path:zt,key:Zt,type:en,menu:Gt,overlay:tr,onClick:cr,className:Wt,separator:bn,dropdownProps:lr}=rt,Wr=et(mt,zt);Wr!==void 0&&se.push(Wr);const Rn=Zt!=null?Zt:Pt;if(en==="separator")return ge.createElement(Je,{key:Rn},bn);const Tr={},Ca=Pt===ue.length-1;Gt?Tr.menu=Gt:tr&&(Tr.overlay=tr);let{href:Wi}=rt;return se.length&&Wr!==void 0&&(Wi=`#/${se.join("/")}`),ge.createElement(_e,Object.assign({key:Rn},Tr,(0,ct.Z)(rt,{data:!0,aria:!0}),{className:Wt,dropdownProps:lr,href:Wi,separator:Ca?"":Ut,onClick:cr,prefixCls:xn}),le(rt,mt,Oe,se,Wi))})}else if(an){const se=(0,Fe.Z)(an).length;jt=(0,Fe.Z)(an).map((Oe,rt)=>{if(!Oe)return Oe;const Pt=rt===se-1;return(0,Me.Tm)(Oe,{separator:Pt?"":Ut,key:rt})})}const me=xe()(xn,nn==null?void 0:nn.className,{[`${xn}-rtl`]:dn==="rtl"},Xe,Ae,Te),fe=Object.assign(Object.assign({},nn==null?void 0:nn.style),Qt);return vn(ge.createElement("nav",Object.assign({className:me,style:fe},Yt),ge.createElement("ol",null,jt)))};kt.Item=yt,kt.Separator=Je;var it=kt,st=it},85546:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Eo}});var pe=oe(74902),xe=oe(67294),Fe=oe(22751),ct=oe(3407),ge=oe(91034),Me=oe(94184),Ee=oe.n(Me),Ce=oe(87462),he=oe(97685),ke=oe(45987),Je=oe(4942),Pe=oe(1413),dt=oe(71002);function ot(Ie){var Re=xe.useRef();Re.current=Ie;var St=xe.useCallback(function(){for(var xt,Jt=arguments.length,Ht=new Array(Jt),Rt=0;Rt<Jt;Rt++)Ht[Rt]=arguments[Rt];return(xt=Re.current)===null||xt===void 0?void 0:xt.call.apply(xt,[Re].concat(Ht))},[]);return St}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var nt=lt()?xe.useLayoutEffect:xe.useEffect,_e=nt,ht=function(Re,St){var xt=xe.useRef(!0);nt(function(){if(!xt.current)return Re()},St),nt(function(){return xt.current=!1,function(){xt.current=!0}},[])};function yt(Ie){var Re=xe.useRef(!1),St=xe.useState(Ie),xt=(0,he.Z)(St,2),Jt=xt[0],Ht=xt[1];xe.useEffect(function(){return Re.current=!1,function(){Re.current=!0}},[]);function Rt(fn,hn){hn&&Re.current||Ht(fn)}return[Jt,Rt]}function Ze(Ie){return Ie!==void 0}function Qe(Ie,Re){var St=Re||{},xt=St.defaultValue,Jt=St.value,Ht=St.onChange,Rt=St.postState,fn=yt(function(){return Ze(Jt)?Jt:Ze(xt)?typeof xt=="function"?xt():xt:typeof Ie=="function"?Ie():Ie}),hn=(0,he.Z)(fn,2),Mn=hn[0],ur=hn[1],er=Jt!==void 0?Jt:Mn,zr=Rt?Rt(er):er,sr=ot(Ht),Mr=yt([er]),hr=(0,he.Z)(Mr,2),Kr=hr[0],si=hr[1];ht(function(){var Ei=Kr[0];Mn!==Ei&&sr(Mn,Ei)},[Kr]),ht(function(){Ze(Jt)||ur(Jt)},[Jt]);var yi=ot(function(Ei,pi){ur(Ei,pi),si([er],pi)});return[zr,yi]}var be={};function we(Ie,Re){}function Ke(Ie,Re){}function Ge(){be={}}function vt(Ie,Re,St){!Re&&!be[St]&&(Ie(!1,St),be[St]=!0)}function pt(Ie,Re){vt(we,Ie,Re)}function Ue(Ie,Re){vt(Ke,Ie,Re)}var et=pt,kt=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))},it={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(Re){var St=Re.keyCode;if(Re.altKey&&!Re.ctrlKey||Re.metaKey||St>=it.F1&&St<=it.F12)return!1;switch(St){case it.ALT:case it.CAPS_LOCK:case it.CONTEXT_MENU:case it.CTRL:case it.DOWN:case it.END:case it.ESC:case it.HOME:case it.INSERT:case it.LEFT:case it.MAC_FF_META:case it.META:case it.NUMLOCK:case it.NUM_CENTER:case it.PAGE_DOWN:case it.PAGE_UP:case it.PAUSE:case it.PRINT_SCREEN:case it.RIGHT:case it.SHIFT:case it.UP:case it.WIN_KEY:case it.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Re){if(Re>=it.ZERO&&Re<=it.NINE||Re>=it.NUM_ZERO&&Re<=it.NUM_MULTIPLY||Re>=it.A&&Re<=it.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Re===0)return!0;switch(Re){case it.SPACE:case it.QUESTION_MARK:case it.NUM_PLUS:case it.NUM_MINUS:case it.NUM_PERIOD:case it.NUM_DIVISION:case it.SEMICOLON:case it.DASH:case it.EQUALS:case it.COMMA:case it.PERIOD:case it.SLASH:case it.APOSTROPHE:case it.SINGLE_QUOTE:case it.OPEN_SQUARE_BRACKET:case it.BACKSLASH:case it.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},st=it,We=oe(16357);function Tt(Ie,Re,St){var xt=xe.useRef({});return(!("value"in xt.current)||St(xt.current.condition,Re))&&(xt.current.value=Ie(),xt.current.condition=Re),xt.current.value}function Ut(Ie,Re){typeof Ie=="function"?Ie(Re):(0,dt.Z)(Ie)==="object"&&Ie&&"current"in Ie&&(Ie.current=Re)}function Qt(){for(var Ie=arguments.length,Re=new Array(Ie),St=0;St<Ie;St++)Re[St]=arguments[St];var xt=Re.filter(function(Jt){return Jt});return xt.length<=1?xt[0]:function(Jt){Re.forEach(function(Ht){Ut(Ht,Jt)})}}function Xe(){for(var Ie=arguments.length,Re=new Array(Ie),St=0;St<Ie;St++)Re[St]=arguments[St];return Tt(function(){return Qt.apply(void 0,Re)},Re,function(xt,Jt){return xt.length===Jt.length&&xt.every(function(Ht,Rt){return Ht===Jt[Rt]})})}function Ae(Ie){var Re,St,xt=isMemo(Ie)?Ie.type.type:Ie.type;return!(typeof xt=="function"&&!((Re=xt.prototype)!==null&&Re!==void 0&&Re.render)||typeof Ie=="function"&&!((St=Ie.prototype)!==null&&St!==void 0&&St.render))}var Lt=function(Re){var St=Re.className,xt=Re.customizeIcon,Jt=Re.customizeIconProps,Ht=Re.onMouseDown,Rt=Re.onClick,fn=Re.children,hn;return typeof xt=="function"?hn=xt(Jt):hn=xt,xe.createElement("span",{className:St,onMouseDown:function(ur){ur.preventDefault(),Ht&&Ht(ur)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Rt,"aria-hidden":!0},hn!==void 0?hn:xe.createElement("span",{className:Ee()(St.split(/\s+/).map(function(Mn){return"".concat(Mn,"-icon")}))},fn))},cn=Lt;function an(Ie,Re,St,xt,Jt){var Ht=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Rt=arguments.length>6?arguments[6]:void 0,fn=arguments.length>7?arguments[7]:void 0,hn=xe.useMemo(function(){if((0,dt.Z)(xt)==="object")return xt.clearIcon;if(Jt)return Jt},[xt,Jt]),Mn=xe.useMemo(function(){return!!(!Ht&&xt&&(St.length||Rt)&&!(fn==="combobox"&&Rt===""))},[xt,Ht,St.length,Rt,fn]);return{allowClear:Mn,clearIcon:xe.createElement(cn,{className:"".concat(Ie,"-clear"),onMouseDown:Re,customizeIcon:hn},"\xD7")}}var ft=xe.createContext(null);function mt(){return xe.useContext(ft)}function Yt(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Re=xe.useState(!1),St=(0,he.Z)(Re,2),xt=St[0],Jt=St[1],Ht=xe.useRef(null),Rt=function(){window.clearTimeout(Ht.current)};xe.useEffect(function(){return Rt},[]);var fn=function(Mn,ur){Rt(),Ht.current=window.setTimeout(function(){Jt(Mn),ur&&ur()},Ie)};return[xt,fn,Rt]}function An(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Re=xe.useRef(null),St=xe.useRef(null);xe.useEffect(function(){return function(){window.clearTimeout(St.current)}},[]);function xt(Jt){(Jt||Re.current===null)&&(Re.current=Jt),window.clearTimeout(St.current),St.current=window.setTimeout(function(){Re.current=null},Ie)}return[function(){return Re.current},xt]}function dn(Ie,Re,St,xt){var Jt=xe.useRef(null);Jt.current={open:Re,triggerOpen:St,customizedTrigger:xt},xe.useEffect(function(){function Ht(Rt){var fn;if(!((fn=Jt.current)!==null&&fn!==void 0&&fn.customizedTrigger)){var hn=Rt.target;hn.shadowRoot&&Rt.composed&&(hn=Rt.composedPath()[0]||hn),Jt.current.open&&Ie().filter(function(Mn){return Mn}).every(function(Mn){return!Mn.contains(hn)&&Mn!==hn})&&Jt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ht),function(){return window.removeEventListener("mousedown",Ht)}},[])}var nn=`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`,jt=`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`,xn="".concat(nn," ").concat(jt).split(/[\s\n]+/),vn="aria-",Te="data-";function ue(Ie,Re){return Ie.indexOf(Re)===0}function le(Ie){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St;Re===!1?St={aria:!0,data:!0,attr:!0}:Re===!0?St={aria:!0}:St=(0,Pe.Z)({},Re);var xt={};return Object.keys(Ie).forEach(function(Jt){(St.aria&&(Jt==="role"||ue(Jt,vn))||St.data&&ue(Jt,Te)||St.attr&&xn.includes(Jt))&&(xt[Jt]=Ie[Jt])}),xt}var me=oe(48555);function fe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var se=fe()?xe.useLayoutEffect:xe.useEffect,Oe=function(Re,St){var xt=xe.useRef(!0);se(function(){return Re(xt.current)},St),se(function(){return xt.current=!1,function(){xt.current=!0}},[])},rt=function(Re,St){Oe(function(xt){if(!xt)return Re()},St)},Pt=Oe,zt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Zt=void 0;function en(Ie,Re){var St=Ie.prefixCls,xt=Ie.invalidate,Jt=Ie.item,Ht=Ie.renderItem,Rt=Ie.responsive,fn=Ie.responsiveDisabled,hn=Ie.registerSize,Mn=Ie.itemKey,ur=Ie.className,er=Ie.style,zr=Ie.children,sr=Ie.display,Mr=Ie.order,hr=Ie.component,Kr=hr===void 0?"div":hr,si=(0,ke.Z)(Ie,zt),yi=Rt&&!sr;function Ei(Ri){hn(Mn,Ri)}xe.useEffect(function(){return function(){Ei(null)}},[]);var pi=Ht&&Jt!==Zt?Ht(Jt):zr,Ai;xt||(Ai={opacity:yi?0:1,height:yi?0:Zt,overflowY:yi?"hidden":Zt,order:Rt?Mr:Zt,pointerEvents:yi?"none":Zt,position:yi?"absolute":Zt});var ei={};yi&&(ei["aria-hidden"]=!0);var Ti=xe.createElement(Kr,(0,Ce.Z)({className:Ee()(!xt&&St,ur),style:(0,Pe.Z)((0,Pe.Z)({},Ai),er)},ei,si,{ref:Re}),pi);return Rt&&(Ti=xe.createElement(me.Z,{onResize:function(wr){var Dr=wr.offsetWidth;Ei(Dr)},disabled:fn},Ti)),Ti}var Gt=xe.forwardRef(en);Gt.displayName="Item";var tr=Gt;function cr(Ie){var Re=xe.useRef();Re.current=Ie;var St=xe.useCallback(function(){for(var xt,Jt=arguments.length,Ht=new Array(Jt),Rt=0;Rt<Jt;Rt++)Ht[Rt]=arguments[Rt];return(xt=Re.current)===null||xt===void 0?void 0:xt.call.apply(xt,[Re].concat(Ht))},[]);return St}var Wt=oe(73935),bn=function(Re){return+setTimeout(Re,16)},lr=function(Re){return clearTimeout(Re)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(bn=function(Re){return window.requestAnimationFrame(Re)},lr=function(Re){return window.cancelAnimationFrame(Re)});var Wr=0,Rn=new Map;function Tr(Ie){Rn.delete(Ie)}var Ca=function(Re){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Wr+=1;var xt=Wr;function Jt(Ht){if(Ht===0)Tr(xt),Re();else{var Rt=bn(function(){Jt(Ht-1)});Rn.set(xt,Rt)}}return Jt(St),xt};Ca.cancel=function(Ie){var Re=Rn.get(Ie);return Tr(Re),lr(Re)};var Wi=Ca;function Li(Ie){if(typeof MessageChannel=="undefined")Wi(Ie);else{var Re=new MessageChannel;Re.port1.onmessage=function(){return Ie()},Re.port2.postMessage(void 0)}}function Mi(){var Ie=xe.useRef(null),Re=function(xt){Ie.current||(Ie.current=[],Li(function(){(0,Wt.unstable_batchedUpdates)(function(){Ie.current.forEach(function(Jt){Jt()}),Ie.current=null})})),Ie.current.push(xt)};return Re}function Ji(Ie,Re){var St=xe.useState(Re),xt=(0,he.Z)(St,2),Jt=xt[0],Ht=xt[1],Rt=cr(function(fn){Ie(function(){Ht(fn)})});return[Jt,Rt]}var Zi=xe.createContext(null),Ea=["component"],Ma=["className"],Gr=["className"],Va=function(Re,St){var xt=xe.useContext(Zi);if(!xt){var Jt=Re.component,Ht=Jt===void 0?"div":Jt,Rt=(0,ke.Z)(Re,Ea);return xe.createElement(Ht,(0,Ce.Z)({},Rt,{ref:St}))}var fn=xt.className,hn=(0,ke.Z)(xt,Ma),Mn=Re.className,ur=(0,ke.Z)(Re,Gr);return xe.createElement(Zi.Provider,{value:null},xe.createElement(tr,(0,Ce.Z)({ref:St,className:Ee()(fn,Mn)},hn,ur)))},no=xe.forwardRef(Va);no.displayName="RawItem";var po=no,mo=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Pa="responsive",Bt="invalidate";function On(Ie){return"+ ".concat(Ie.length," ...")}function Fn(Ie,Re){var St=Ie.prefixCls,xt=St===void 0?"rc-overflow":St,Jt=Ie.data,Ht=Jt===void 0?[]:Jt,Rt=Ie.renderItem,fn=Ie.renderRawItem,hn=Ie.itemKey,Mn=Ie.itemWidth,ur=Mn===void 0?10:Mn,er=Ie.ssr,zr=Ie.style,sr=Ie.className,Mr=Ie.maxCount,hr=Ie.renderRest,Kr=Ie.renderRawRest,si=Ie.suffix,yi=Ie.component,Ei=yi===void 0?"div":yi,pi=Ie.itemComponent,Ai=Ie.onVisibleChange,ei=(0,ke.Z)(Ie,mo),Ti=er==="full",Ri=Mi(),wr=Ji(Ri,null),Dr=(0,he.Z)(wr,2),Ur=Dr[0],Hi=Dr[1],Di=Ur||0,Bi=Ji(Ri,new Map),Ii=(0,he.Z)(Bi,2),qi=Ii[0],aa=Ii[1],ba=Ji(Ri,0),Da=(0,he.Z)(ba,2),Wo=Da[0],$a=Da[1],Lo=Ji(Ri,0),vs=(0,he.Z)(Lo,2),_a=vs[0],mi=vs[1],vi=Ji(Ri,0),Pi=(0,he.Z)(vi,2),ui=Pi[0],Or=Pi[1],gi=(0,xe.useState)(null),ci=(0,he.Z)(gi,2),Gi=ci[0],pa=ci[1],Sa=(0,xe.useState)(null),Fi=(0,he.Z)(Sa,2),Ha=Fi[0],Mo=Fi[1],go=xe.useMemo(function(){return Ha===null&&Ti?Number.MAX_SAFE_INTEGER:Ha||0},[Ha,Ur]),$o=(0,xe.useState)(!1),ts=(0,he.Z)($o,2),Ro=ts[0],ks=ts[1],xs="".concat(xt,"-item"),$s=Math.max(Wo,_a),ns=Mr===Pa,zo=Ht.length&&ns,Ss=Mr===Bt,ss=zo||typeof Mr=="number"&&Ht.length>Mr,Qo=(0,xe.useMemo)(function(){var Ia=Ht;return zo?Ur===null&&Ti?Ia=Ht:Ia=Ht.slice(0,Math.min(Ht.length,Di/ur)):typeof Mr=="number"&&(Ia=Ht.slice(0,Mr)),Ia},[Ht,ur,Ur,Mr,zo]),Is=(0,xe.useMemo)(function(){return zo?Ht.slice(go+1):Ht.slice(Qo.length)},[Ht,Qo,zo,go]),Es=(0,xe.useCallback)(function(Ia,Br){var di;return typeof hn=="function"?hn(Ia):(di=hn&&(Ia==null?void 0:Ia[hn]))!==null&&di!==void 0?di:Br},[hn]),Yo=(0,xe.useCallback)(Rt||function(Ia){return Ia},[Rt]);function Us(Ia,Br,di){Ha===Ia&&(Br===void 0||Br===Gi)||(Mo(Ia),di||(ks(Ia<Ht.length-1),Ai==null||Ai(Ia)),Br!==void 0&&pa(Br))}function Dl(Ia,Br){Hi(Br.clientWidth)}function yl(Ia,Br){aa(function(di){var $i=new Map(di);return Br===null?$i.delete(Ia):$i.set(Ia,Br),$i})}function ls(Ia,Br){mi(Br),$a(_a)}function bo(Ia,Br){Or(Br)}function us(Ia){return qi.get(Es(Qo[Ia],Ia))}Pt(function(){if(Di&&typeof $s=="number"&&Qo){var Ia=ui,Br=Qo.length,di=Br-1;if(!Br){Us(0,null);return}for(var $i=0;$i<Br;$i+=1){var ma=us($i);if(Ti&&(ma=ma||0),ma===void 0){Us($i-1,void 0,!0);break}if(Ia+=ma,di===0&&Ia<=Di||$i===di-1&&Ia+us(di)<=Di){Us(di,null);break}else if(Ia+$s>Di){Us($i-1,Ia-ma-ui+_a);break}}si&&us(0)+ui>Di&&pa(null)}},[Di,qi,_a,ui,Es,Qo]);var js=Ro&&!!Is.length,el={};Gi!==null&&zo&&(el={position:"absolute",left:Gi,top:0});var qo={prefixCls:xs,responsive:zo,component:pi,invalidate:Ss},Oo=fn?function(Ia,Br){var di=Es(Ia,Br);return xe.createElement(Zi.Provider,{key:di,value:(0,Pe.Z)((0,Pe.Z)({},qo),{},{order:Br,item:Ia,itemKey:di,registerSize:yl,display:Br<=go})},fn(Ia,Br))}:function(Ia,Br){var di=Es(Ia,Br);return xe.createElement(tr,(0,Ce.Z)({},qo,{order:Br,key:di,item:Ia,renderItem:Yo,itemKey:di,registerSize:yl,display:Br<=go}))},Uo,zs={order:js?go:Number.MAX_SAFE_INTEGER,className:"".concat(xs,"-rest"),registerSize:ls,display:js};if(Kr)Kr&&(Uo=xe.createElement(Zi.Provider,{value:(0,Pe.Z)((0,Pe.Z)({},qo),zs)},Kr(Is)));else{var Ms=hr||On;Uo=xe.createElement(tr,(0,Ce.Z)({},qo,zs),typeof Ms=="function"?Ms(Is):Ms)}var Ks=xe.createElement(Ei,(0,Ce.Z)({className:Ee()(!Ss&&xt,sr),style:zr,ref:Re},ei),Qo.map(Oo),ss?Uo:null,si&&xe.createElement(tr,(0,Ce.Z)({},qo,{responsive:ns,responsiveDisabled:!zo,order:go,className:"".concat(xs,"-suffix"),registerSize:bo,display:!0,style:el}),si));return ns&&(Ks=xe.createElement(me.Z,{onResize:Dl,disabled:!zo},Ks)),Ks}var $n=xe.forwardRef(Fn);$n.displayName="Overflow",$n.Item=po,$n.RESPONSIVE=Pa,$n.INVALIDATE=Bt;var Ir=$n,or=Ir,Sr=function(Re,St){var xt,Jt,Ht=Re.prefixCls,Rt=Re.id,fn=Re.inputElement,hn=Re.disabled,Mn=Re.tabIndex,ur=Re.autoFocus,er=Re.autoComplete,zr=Re.editable,sr=Re.activeDescendantId,Mr=Re.value,hr=Re.maxLength,Kr=Re.onKeyDown,si=Re.onMouseDown,yi=Re.onChange,Ei=Re.onPaste,pi=Re.onCompositionStart,Ai=Re.onCompositionEnd,ei=Re.open,Ti=Re.attrs,Ri=fn||xe.createElement("input",null),wr=Ri,Dr=wr.ref,Ur=wr.props,Hi=Ur.onKeyDown,Di=Ur.onChange,Bi=Ur.onMouseDown,Ii=Ur.onCompositionStart,qi=Ur.onCompositionEnd,aa=Ur.style;return"maxLength"in Ri.props,Ri=xe.cloneElement(Ri,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({type:"search"},Ur),{},{id:Rt,ref:Qt(St,Dr),disabled:hn,tabIndex:Mn,autoComplete:er||"off",autoFocus:ur,className:Ee()("".concat(Ht,"-selection-search-input"),(xt=Ri)===null||xt===void 0||(Jt=xt.props)===null||Jt===void 0?void 0:Jt.className),role:"combobox","aria-label":"Search","aria-expanded":ei||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Rt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Rt,"_list"),"aria-activedescendant":ei?sr:void 0},Ti),{},{value:zr?Mr:"",maxLength:hr,readOnly:!zr,unselectable:zr?null:"on",style:(0,Pe.Z)((0,Pe.Z)({},aa),{},{opacity:zr?null:0}),onKeyDown:function(Da){Kr(Da),Hi&&Hi(Da)},onMouseDown:function(Da){si(Da),Bi&&Bi(Da)},onChange:function(Da){yi(Da),Di&&Di(Da)},onCompositionStart:function(Da){pi(Da),Ii&&Ii(Da)},onCompositionEnd:function(Da){Ai(Da),qi&&qi(Da)},onPaste:Ei})),Ri},Zn=xe.forwardRef(Sr);Zn.displayName="Input";var ut=Zn;function bt(Ie){return Array.isArray(Ie)?Ie:Ie!==void 0?[Ie]:[]}var Ft=typeof window!="undefined"&&window.document&&window.document.documentElement,qt=Ft;function qe(Ie){return Ie!=null}function _t(Ie){return!Ie&&Ie!==0}function Xt(Ie){return["string","number"].includes((0,dt.Z)(Ie))}function Kt(Ie){var Re=void 0;return Ie&&(Xt(Ie.title)?Re=Ie.title.toString():Xt(Ie.label)&&(Re=Ie.label.toString())),Re}function on(Ie,Re){qt?xe.useLayoutEffect(Ie,Re):xe.useEffect(Ie,Re)}function rn(Ie){var Re;return(Re=Ie.key)!==null&&Re!==void 0?Re:Ie.value}var Un=function(Re){Re.preventDefault(),Re.stopPropagation()},Ar=function(Re){var St=Re.id,xt=Re.prefixCls,Jt=Re.values,Ht=Re.open,Rt=Re.searchValue,fn=Re.autoClearSearchValue,hn=Re.inputRef,Mn=Re.placeholder,ur=Re.disabled,er=Re.mode,zr=Re.showSearch,sr=Re.autoFocus,Mr=Re.autoComplete,hr=Re.activeDescendantId,Kr=Re.tabIndex,si=Re.removeIcon,yi=Re.maxTagCount,Ei=Re.maxTagTextLength,pi=Re.maxTagPlaceholder,Ai=pi===void 0?function(pa){return"+ ".concat(pa.length," ...")}:pi,ei=Re.tagRender,Ti=Re.onToggleOpen,Ri=Re.onRemove,wr=Re.onInputChange,Dr=Re.onInputPaste,Ur=Re.onInputKeyDown,Hi=Re.onInputMouseDown,Di=Re.onInputCompositionStart,Bi=Re.onInputCompositionEnd,Ii=xe.useRef(null),qi=(0,xe.useState)(0),aa=(0,he.Z)(qi,2),ba=aa[0],Da=aa[1],Wo=(0,xe.useState)(!1),$a=(0,he.Z)(Wo,2),Lo=$a[0],vs=$a[1],_a="".concat(xt,"-selection"),mi=Ht||er==="multiple"&&fn===!1||er==="tags"?Rt:"",vi=er==="tags"||er==="multiple"&&fn===!1||zr&&(Ht||Lo);on(function(){Da(Ii.current.scrollWidth)},[mi]);function Pi(pa,Sa,Fi,Ha,Mo){return xe.createElement("span",{className:Ee()("".concat(_a,"-item"),(0,Je.Z)({},"".concat(_a,"-item-disabled"),Fi)),title:Kt(pa)},xe.createElement("span",{className:"".concat(_a,"-item-content")},Sa),Ha&&xe.createElement(cn,{className:"".concat(_a,"-item-remove"),onMouseDown:Un,onClick:Mo,customizeIcon:si},"\xD7"))}function ui(pa,Sa,Fi,Ha,Mo){var go=function(ts){Un(ts),Ti(!Ht)};return xe.createElement("span",{onMouseDown:go},ei({label:Sa,value:pa,disabled:Fi,closable:Ha,onClose:Mo}))}function Or(pa){var Sa=pa.disabled,Fi=pa.label,Ha=pa.value,Mo=!ur&&!Sa,go=Fi;if(typeof Ei=="number"&&(typeof Fi=="string"||typeof Fi=="number")){var $o=String(go);$o.length>Ei&&(go="".concat($o.slice(0,Ei),"..."))}var ts=function(ks){ks&&ks.stopPropagation(),Ri(pa)};return typeof ei=="function"?ui(Ha,go,Sa,Mo,ts):Pi(pa,go,Sa,Mo,ts)}function gi(pa){var Sa=typeof Ai=="function"?Ai(pa):Ai;return Pi({title:Sa},Sa,!1)}var ci=xe.createElement("div",{className:"".concat(_a,"-search"),style:{width:ba},onFocus:function(){vs(!0)},onBlur:function(){vs(!1)}},xe.createElement(ut,{ref:hn,open:Ht,prefixCls:xt,id:St,inputElement:null,disabled:ur,autoFocus:sr,autoComplete:Mr,editable:vi,activeDescendantId:hr,value:mi,onKeyDown:Ur,onMouseDown:Hi,onChange:wr,onPaste:Dr,onCompositionStart:Di,onCompositionEnd:Bi,tabIndex:Kr,attrs:le(Re,!0)}),xe.createElement("span",{ref:Ii,className:"".concat(_a,"-search-mirror"),"aria-hidden":!0},mi,"\xA0")),Gi=xe.createElement(or,{prefixCls:"".concat(_a,"-overflow"),data:Jt,renderItem:Or,renderRest:gi,suffix:ci,itemKey:rn,maxCount:yi});return xe.createElement(xe.Fragment,null,Gi,!Jt.length&&!mi&&xe.createElement("span",{className:"".concat(_a,"-placeholder")},Mn))},rr=Ar,ir=function(Re){var St=Re.inputElement,xt=Re.prefixCls,Jt=Re.id,Ht=Re.inputRef,Rt=Re.disabled,fn=Re.autoFocus,hn=Re.autoComplete,Mn=Re.activeDescendantId,ur=Re.mode,er=Re.open,zr=Re.values,sr=Re.placeholder,Mr=Re.tabIndex,hr=Re.showSearch,Kr=Re.searchValue,si=Re.activeValue,yi=Re.maxLength,Ei=Re.onInputKeyDown,pi=Re.onInputMouseDown,Ai=Re.onInputChange,ei=Re.onInputPaste,Ti=Re.onInputCompositionStart,Ri=Re.onInputCompositionEnd,wr=Re.title,Dr=xe.useState(!1),Ur=(0,he.Z)(Dr,2),Hi=Ur[0],Di=Ur[1],Bi=ur==="combobox",Ii=Bi||hr,qi=zr[0],aa=Kr||"";Bi&&si&&!Hi&&(aa=si),xe.useEffect(function(){Bi&&Di(!1)},[Bi,si]);var ba=ur!=="combobox"&&!er&&!hr?!1:!!aa,Da=wr===void 0?Kt(qi):wr,Wo=function(){if(qi)return null;var Lo=ba?{visibility:"hidden"}:void 0;return xe.createElement("span",{className:"".concat(xt,"-selection-placeholder"),style:Lo},sr)};return xe.createElement(xe.Fragment,null,xe.createElement("span",{className:"".concat(xt,"-selection-search")},xe.createElement(ut,{ref:Ht,prefixCls:xt,id:Jt,open:er,inputElement:St,disabled:Rt,autoFocus:fn,autoComplete:hn,editable:Ii,activeDescendantId:Mn,value:aa,onKeyDown:Ei,onMouseDown:pi,onChange:function(Lo){Di(!0),Ai(Lo)},onPaste:ei,onCompositionStart:Ti,onCompositionEnd:Ri,tabIndex:Mr,attrs:le(Re,!0),maxLength:Bi?yi:void 0})),!Bi&&qi?xe.createElement("span",{className:"".concat(xt,"-selection-item"),title:Da,style:ba?{visibility:"hidden"}:void 0},qi.label):null,Wo())},mr=ir;function br(Ie){return![st.ESC,st.SHIFT,st.BACKSPACE,st.TAB,st.WIN_KEY,st.ALT,st.META,st.WIN_KEY_RIGHT,st.CTRL,st.SEMICOLON,st.EQUALS,st.CAPS_LOCK,st.CONTEXT_MENU,st.F1,st.F2,st.F3,st.F4,st.F5,st.F6,st.F7,st.F8,st.F9,st.F10,st.F11,st.F12].includes(Ie)}var Yr=function(Re,St){var xt=(0,xe.useRef)(null),Jt=(0,xe.useRef)(!1),Ht=Re.prefixCls,Rt=Re.open,fn=Re.mode,hn=Re.showSearch,Mn=Re.tokenWithEnter,ur=Re.autoClearSearchValue,er=Re.onSearch,zr=Re.onSearchSubmit,sr=Re.onToggleOpen,Mr=Re.onInputKeyDown,hr=Re.domRef;xe.useImperativeHandle(St,function(){return{focus:function(){xt.current.focus()},blur:function(){xt.current.blur()}}});var Kr=An(0),si=(0,he.Z)(Kr,2),yi=si[0],Ei=si[1],pi=function(aa){var ba=aa.which;(ba===st.UP||ba===st.DOWN)&&aa.preventDefault(),Mr&&Mr(aa),ba===st.ENTER&&fn==="tags"&&!Jt.current&&!Rt&&(zr==null||zr(aa.target.value)),br(ba)&&sr(!0)},Ai=function(){Ei(!0)},ei=(0,xe.useRef)(null),Ti=function(aa){er(aa,!0,Jt.current)!==!1&&sr(!0)},Ri=function(){Jt.current=!0},wr=function(aa){Jt.current=!1,fn!=="combobox"&&Ti(aa.target.value)},Dr=function(aa){var ba=aa.target.value;if(Mn&&ei.current&&/[\r\n]/.test(ei.current)){var Da=ei.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ba=ba.replace(Da,ei.current)}ei.current=null,Ti(ba)},Ur=function(aa){var ba=aa.clipboardData,Da=ba.getData("text");ei.current=Da},Hi=function(aa){var ba=aa.target;if(ba!==xt.current){var Da=document.body.style.msTouchAction!==void 0;Da?setTimeout(function(){xt.current.focus()}):xt.current.focus()}},Di=function(aa){var ba=yi();aa.target!==xt.current&&!ba&&fn!=="combobox"&&aa.preventDefault(),(fn!=="combobox"&&(!hn||!ba)||!Rt)&&(Rt&&ur!==!1&&er("",!0,!1),sr())},Bi={inputRef:xt,onInputKeyDown:pi,onInputMouseDown:Ai,onInputChange:Dr,onInputPaste:Ur,onInputCompositionStart:Ri,onInputCompositionEnd:wr},Ii=fn==="multiple"||fn==="tags"?xe.createElement(rr,(0,Ce.Z)({},Re,Bi)):xe.createElement(mr,(0,Ce.Z)({},Re,Bi));return xe.createElement("div",{ref:hr,className:"".concat(Ht,"-selector"),onClick:Hi,onMouseDown:Di},Ii)},_n=xe.forwardRef(Yr);_n.displayName="Selector";var Qn=_n,na=oe(62709),ca=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],_i=function(Re){var St=Re===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:St,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:St,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:St,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:St,adjustY:1},htmlRegion:"scroll"}}},ii=function(Re,St){var xt=Re.prefixCls,Jt=Re.disabled,Ht=Re.visible,Rt=Re.children,fn=Re.popupElement,hn=Re.animation,Mn=Re.transitionName,ur=Re.dropdownStyle,er=Re.dropdownClassName,zr=Re.direction,sr=zr===void 0?"ltr":zr,Mr=Re.placement,hr=Re.builtinPlacements,Kr=Re.dropdownMatchSelectWidth,si=Re.dropdownRender,yi=Re.dropdownAlign,Ei=Re.getPopupContainer,pi=Re.empty,Ai=Re.getTriggerDOMNode,ei=Re.onPopupVisibleChange,Ti=Re.onPopupMouseEnter,Ri=(0,ke.Z)(Re,ca),wr="".concat(xt,"-dropdown"),Dr=fn;si&&(Dr=si(fn));var Ur=xe.useMemo(function(){return hr||_i(Kr)},[hr,Kr]),Hi=hn?"".concat(wr,"-").concat(hn):Mn,Di=typeof Kr=="number",Bi=xe.useMemo(function(){return Di?null:Kr===!1?"minWidth":"width"},[Kr,Di]),Ii=ur;Di&&(Ii=(0,Pe.Z)((0,Pe.Z)({},Ii),{},{width:Kr}));var qi=xe.useRef(null);return xe.useImperativeHandle(St,function(){return{getPopupElement:function(){return qi.current}}}),xe.createElement(na.Z,(0,Ce.Z)({},Ri,{showAction:ei?["click"]:[],hideAction:ei?["click"]:[],popupPlacement:Mr||(sr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ur,prefixCls:wr,popupTransitionName:Hi,popup:xe.createElement("div",{ref:qi,onMouseEnter:Ti},Dr),stretch:Bi,popupAlign:yi,popupVisible:Ht,getPopupContainer:Ei,popupClassName:Ee()(er,(0,Je.Z)({},"".concat(wr,"-empty"),pi)),popupStyle:Ii,getTriggerDOMNode:Ai,onPopupVisibleChange:ei}),Rt)},va=xe.forwardRef(ii);va.displayName="SelectTrigger";var _r=va,Qi=oe(84506);function Tn(Ie,Re){var St=Ie.key,xt;return"value"in Ie&&(xt=Ie.value),St!=null?St:xt!==void 0?xt:"rc-index-key-".concat(Re)}function Ua(Ie,Re){var St=Ie||{},xt=St.label,Jt=St.value,Ht=St.options,Rt=St.groupLabel,fn=xt||(Re?"children":"label");return{label:fn,value:Jt||"value",options:Ht||"options",groupLabel:Rt||fn}}function xa(Ie){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St=Re.fieldNames,xt=Re.childrenAsData,Jt=[],Ht=Ua(St,!1),Rt=Ht.label,fn=Ht.value,hn=Ht.options,Mn=Ht.groupLabel;function ur(er,zr){er.forEach(function(sr){if(zr||!(hn in sr)){var Mr=sr[fn];Jt.push({key:Tn(sr,Jt.length),groupOption:zr,data:sr,label:sr[Rt],value:Mr})}else{var hr=sr[Mn];hr===void 0&&xt&&(hr=sr.label),Jt.push({key:Tn(sr,Jt.length),group:!0,data:sr,label:hr}),ur(sr[hn],!0)}})}return ur(Ie,!1),Jt}function uo(Ie){var Re=(0,Pe.Z)({},Ie);return"props"in Re||Object.defineProperty(Re,"props",{get:function(){return et(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Re}}),Re}function ja(Ie,Re){if(!Re||!Re.length)return null;var St=!1;function xt(Ht,Rt){var fn=(0,Qi.Z)(Rt),hn=fn[0],Mn=fn.slice(1);if(!hn)return[Ht];var ur=Ht.split(hn);return St=St||ur.length>1,ur.reduce(function(er,zr){return[].concat((0,pe.Z)(er),(0,pe.Z)(xt(zr,Mn)))},[]).filter(function(er){return er})}var Jt=xt(Ie,Re);return St?Jt:null}var ka=["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"],co=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function za(Ie){return Ie==="tags"||Ie==="multiple"}var fa=xe.forwardRef(function(Ie,Re){var St,xt,Jt=Ie.id,Ht=Ie.prefixCls,Rt=Ie.className,fn=Ie.showSearch,hn=Ie.tagRender,Mn=Ie.direction,ur=Ie.omitDomProps,er=Ie.displayValues,zr=Ie.onDisplayValuesChange,sr=Ie.emptyOptions,Mr=Ie.notFoundContent,hr=Mr===void 0?"Not Found":Mr,Kr=Ie.onClear,si=Ie.mode,yi=Ie.disabled,Ei=Ie.loading,pi=Ie.getInputElement,Ai=Ie.getRawInputElement,ei=Ie.open,Ti=Ie.defaultOpen,Ri=Ie.onDropdownVisibleChange,wr=Ie.activeValue,Dr=Ie.onActiveValueChange,Ur=Ie.activeDescendantId,Hi=Ie.searchValue,Di=Ie.autoClearSearchValue,Bi=Ie.onSearch,Ii=Ie.onSearchSplit,qi=Ie.tokenSeparators,aa=Ie.allowClear,ba=Ie.suffixIcon,Da=Ie.clearIcon,Wo=Ie.OptionList,$a=Ie.animation,Lo=Ie.transitionName,vs=Ie.dropdownStyle,_a=Ie.dropdownClassName,mi=Ie.dropdownMatchSelectWidth,vi=Ie.dropdownRender,Pi=Ie.dropdownAlign,ui=Ie.placement,Or=Ie.builtinPlacements,gi=Ie.getPopupContainer,ci=Ie.showAction,Gi=ci===void 0?[]:ci,pa=Ie.onFocus,Sa=Ie.onBlur,Fi=Ie.onKeyUp,Ha=Ie.onKeyDown,Mo=Ie.onMouseDown,go=(0,ke.Z)(Ie,ka),$o=za(si),ts=(fn!==void 0?fn:$o)||si==="combobox",Ro=(0,Pe.Z)({},go);co.forEach(function(so){delete Ro[so]}),ur==null||ur.forEach(function(so){delete Ro[so]});var ks=xe.useState(!1),xs=(0,he.Z)(ks,2),$s=xs[0],ns=xs[1];xe.useEffect(function(){ns(kt())},[]);var zo=xe.useRef(null),Ss=xe.useRef(null),ss=xe.useRef(null),Qo=xe.useRef(null),Is=xe.useRef(null),Es=Yt(),Yo=(0,he.Z)(Es,3),Us=Yo[0],Dl=Yo[1],yl=Yo[2];xe.useImperativeHandle(Re,function(){var so,lo;return{focus:(so=Qo.current)===null||so===void 0?void 0:so.focus,blur:(lo=Qo.current)===null||lo===void 0?void 0:lo.blur,scrollTo:function(tl){var gs;return(gs=Is.current)===null||gs===void 0?void 0:gs.scrollTo(tl)}}});var ls=xe.useMemo(function(){var so;if(si!=="combobox")return Hi;var lo=(so=er[0])===null||so===void 0?void 0:so.value;return typeof lo=="string"||typeof lo=="number"?String(lo):""},[Hi,si,er]),bo=si==="combobox"&&typeof pi=="function"&&pi()||null,us=typeof Ai=="function"&&Ai(),js=Xe(Ss,us==null||(St=us.props)===null||St===void 0?void 0:St.ref),el=xe.useState(!1),qo=(0,he.Z)(el,2),Oo=qo[0],Uo=qo[1];_e(function(){Uo(!0)},[]);var zs=Qe(!1,{defaultValue:Ti,value:ei}),Ms=(0,he.Z)(zs,2),Ks=Ms[0],Ia=Ms[1],Br=Oo?Ks:!1,di=!hr&&sr;(yi||di&&Br&&si==="combobox")&&(Br=!1);var $i=di?!1:Br,ma=xe.useCallback(function(so){var lo=so!==void 0?so:!Br;yi||(Ia(lo),Br!==lo&&(Ri==null||Ri(lo)))},[yi,Br,Ia,Ri]),jo=xe.useMemo(function(){return(qi||[]).some(function(so){return[`
`,`\r
`].includes(so)})},[qi]),Go=function(lo,ws,tl){var gs=!0,gl=lo;Dr==null||Dr(null);var al=tl?null:ja(lo,qi);return si!=="combobox"&&al&&(gl="",Ii==null||Ii(al),ma(!1),gs=!1),Bi&&ls!==gl&&Bi(gl,{source:ws?"typing":"effect"}),gs},vl=function(lo){!lo||!lo.trim()||Bi(lo,{source:"submit"})};xe.useEffect(function(){!Br&&!$o&&si!=="combobox"&&Go("",!1,!1)},[Br]),xe.useEffect(function(){Ks&&yi&&Ia(!1),yi&&Dl(!1)},[yi]);var qs=An(),Ll=(0,he.Z)(qs,2),Ps=Ll[0],Al=Ll[1],iu=function(lo){var ws=Ps(),tl=lo.which;if(tl===st.ENTER&&(si!=="combobox"&&lo.preventDefault(),Br||ma(!0)),Al(!!ls),tl===st.BACKSPACE&&!ws&&$o&&!ls&&er.length){for(var gs=(0,pe.Z)(er),gl=null,al=gs.length-1;al>=0;al-=1){var bu=gs[al];if(!bu.disabled){gs.splice(al,1),gl=bu;break}}gl&&zr(gs,{type:"remove",values:[gl]})}for(var Kl=arguments.length,Nl=new Array(Kl>1?Kl-1:0),Ml=1;Ml<Kl;Ml++)Nl[Ml-1]=arguments[Ml];if(Br&&Is.current){var Hl;(Hl=Is.current).onKeyDown.apply(Hl,[lo].concat(Nl))}Ha==null||Ha.apply(void 0,[lo].concat(Nl))},au=function(lo){for(var ws=arguments.length,tl=new Array(ws>1?ws-1:0),gs=1;gs<ws;gs++)tl[gs-1]=arguments[gs];if(Br&&Is.current){var gl;(gl=Is.current).onKeyUp.apply(gl,[lo].concat(tl))}Fi==null||Fi.apply(void 0,[lo].concat(tl))},$u=function(lo){var ws=er.filter(function(tl){return tl!==lo});zr(ws,{type:"remove",values:[lo]})},Ol=xe.useRef(!1),Bl=function(){Dl(!0),yi||(pa&&!Ol.current&&pa.apply(void 0,arguments),Gi.includes("focus")&&ma(!0)),Ol.current=!0},pc=function(){Dl(!1,function(){Ol.current=!1,ma(!1)}),!yi&&(ls&&(si==="tags"?Bi(ls,{source:"submit"}):si==="multiple"&&Bi("",{source:"blur"})),Sa&&Sa.apply(void 0,arguments))},El=[];xe.useEffect(function(){return function(){El.forEach(function(so){return clearTimeout(so)}),El.splice(0,El.length)}},[]);var Xu=function(lo){var ws,tl=lo.target,gs=(ws=ss.current)===null||ws===void 0?void 0:ws.getPopupElement();if(gs&&gs.contains(tl)){var gl=setTimeout(function(){var Nl=El.indexOf(gl);if(Nl!==-1&&El.splice(Nl,1),yl(),!$s&&!gs.contains(document.activeElement)){var Ml;(Ml=Qo.current)===null||Ml===void 0||Ml.focus()}});El.push(gl)}for(var al=arguments.length,bu=new Array(al>1?al-1:0),Kl=1;Kl<al;Kl++)bu[Kl-1]=arguments[Kl];Mo==null||Mo.apply(void 0,[lo].concat(bu))},ou=xe.useState({}),bi=(0,he.Z)(ou,2),xl=bi[1];function mc(){xl({})}var vc;us&&(vc=function(lo){ma(lo)}),dn(function(){var so;return[zo.current,(so=ss.current)===null||so===void 0?void 0:so.getPopupElement()]},$i,ma,!!us);var rl=xe.useMemo(function(){return(0,Pe.Z)((0,Pe.Z)({},Ie),{},{notFoundContent:hr,open:Br,triggerOpen:$i,id:Jt,showSearch:ts,multiple:$o,toggleOpen:ma})},[Ie,hr,$i,Br,Jt,ts,$o,ma]),Ds=!!ba||Ei,vu;Ds&&(vu=xe.createElement(cn,{className:Ee()("".concat(Ht,"-arrow"),(0,Je.Z)({},"".concat(Ht,"-arrow-loading"),Ei)),customizeIcon:ba,customizeIconProps:{loading:Ei,searchValue:ls,open:Br,focused:Us,showSearch:ts}}));var Fc=function(){var lo;Kr==null||Kr(),(lo=Qo.current)===null||lo===void 0||lo.focus(),zr([],{type:"clear",values:er}),Go("",!1,!1)},gc=an(Ht,Fc,er,aa,Da,yi,ls,si),su=gc.allowClear,il=gc.clearIcon,Yu=xe.createElement(Wo,{ref:Is}),zl=Ee()(Ht,Rt,(xt={},(0,Je.Z)(xt,"".concat(Ht,"-focused"),Us),(0,Je.Z)(xt,"".concat(Ht,"-multiple"),$o),(0,Je.Z)(xt,"".concat(Ht,"-single"),!$o),(0,Je.Z)(xt,"".concat(Ht,"-allow-clear"),aa),(0,Je.Z)(xt,"".concat(Ht,"-show-arrow"),Ds),(0,Je.Z)(xt,"".concat(Ht,"-disabled"),yi),(0,Je.Z)(xt,"".concat(Ht,"-loading"),Ei),(0,Je.Z)(xt,"".concat(Ht,"-open"),Br),(0,Je.Z)(xt,"".concat(Ht,"-customize-input"),bo),(0,Je.Z)(xt,"".concat(Ht,"-show-search"),ts),xt)),qu=xe.createElement(_r,{ref:ss,disabled:yi,prefixCls:Ht,visible:$i,popupElement:Yu,animation:$a,transitionName:Lo,dropdownStyle:vs,dropdownClassName:_a,direction:Mn,dropdownMatchSelectWidth:mi,dropdownRender:vi,dropdownAlign:Pi,placement:ui,builtinPlacements:Or,getPopupContainer:gi,empty:sr,getTriggerDOMNode:function(){return Ss.current},onPopupVisibleChange:vc,onPopupMouseEnter:mc},us?xe.cloneElement(us,{ref:js}):xe.createElement(Qn,(0,Ce.Z)({},Ie,{domRef:Ss,prefixCls:Ht,inputElement:bo,ref:Qo,id:Jt,showSearch:ts,autoClearSearchValue:Di,mode:si,activeDescendantId:Ur,tagRender:hn,values:er,open:Br,onToggleOpen:ma,activeValue:wr,searchValue:ls,onSearch:Go,onSearchSubmit:vl,onRemove:$u,tokenWithEnter:jo}))),gu;return us?gu=qu:gu=xe.createElement("div",(0,Ce.Z)({className:zl},Ro,{ref:zo,onMouseDown:Xu,onKeyDown:iu,onKeyUp:au,onFocus:Bl,onBlur:pc}),Us&&!Br&&xe.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(er.map(function(so){var lo=so.label,ws=so.value;return["number","string"].includes((0,dt.Z)(lo))?lo:ws}).join(", "))),qu,vu,su&&il),xe.createElement(ft.Provider,{value:rl},gu)}),Ya=fa,_o=function(Ie,Re){var St=xe.useRef({values:new Map,options:new Map}),xt=xe.useMemo(function(){var Ht=St.current,Rt=Ht.values,fn=Ht.options,hn=Ie.map(function(er){if(er.label===void 0){var zr;return(0,Pe.Z)((0,Pe.Z)({},er),{},{label:(zr=Rt.get(er.value))===null||zr===void 0?void 0:zr.label})}return er}),Mn=new Map,ur=new Map;return hn.forEach(function(er){Mn.set(er.value,er),ur.set(er.value,Re.get(er.value)||fn.get(er.value))}),St.current.values=Mn,St.current.options=ur,hn},[Ie,Re]),Jt=xe.useCallback(function(Ht){return Re.get(Ht)||St.current.options.get(Ht)},[Re]);return[xt,Jt]};function qa(Ie,Re){return bt(Ie).join("").toUpperCase().includes(Re)}var Oa=function(Ie,Re,St,xt,Jt){return xe.useMemo(function(){if(!St||xt===!1)return Ie;var Ht=Re.options,Rt=Re.label,fn=Re.value,hn=[],Mn=typeof xt=="function",ur=St.toUpperCase(),er=Mn?xt:function(sr,Mr){return Jt?qa(Mr[Jt],ur):Mr[Ht]?qa(Mr[Rt!=="children"?Rt:"label"],ur):qa(Mr[fn],ur)},zr=Mn?function(sr){return uo(sr)}:function(sr){return sr};return Ie.forEach(function(sr){if(sr[Ht]){var Mr=er(St,zr(sr));if(Mr)hn.push(sr);else{var hr=sr[Ht].filter(function(Kr){return er(St,zr(Kr))});hr.length&&hn.push((0,Pe.Z)((0,Pe.Z)({},sr),{},(0,Je.Z)({},Ht,hr)))}return}er(St,zr(sr))&&hn.push(sr)}),hn},[Ie,xt,Jt,St,Re])},So=0,To=lt();function fo(){var Ie;return To?(Ie=So,So+=1):Ie="TEST_OR_SSR",Ie}function Vi(Ie){var Re=xe.useState(),St=(0,he.Z)(Re,2),xt=St[0],Jt=St[1];return xe.useEffect(function(){Jt("rc_select_".concat(fo()))},[]),Ie||xt}function At(Ie){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St=[];return xe.Children.forEach(Ie,function(xt){xt==null&&!Re.keepEmpty||(Array.isArray(xt)?St=St.concat(At(xt)):(0,We.isFragment)(xt)&&xt.props?St=St.concat(At(xt.props.children,Re)):St.push(xt))}),St}var Mt=["children","value"],tn=["children"];function Sn(Ie){var Re=Ie,St=Re.key,xt=Re.props,Jt=xt.children,Ht=xt.value,Rt=(0,ke.Z)(xt,Mt);return(0,Pe.Z)({key:St,value:Ht!==void 0?Ht:St,children:Jt},Rt)}function Kn(Ie){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return At(Ie).map(function(St,xt){if(!xe.isValidElement(St)||!St.type)return null;var Jt=St,Ht=Jt.type.isSelectOptGroup,Rt=Jt.key,fn=Jt.props,hn=fn.children,Mn=(0,ke.Z)(fn,tn);return Re||!Ht?Sn(St):(0,Pe.Z)((0,Pe.Z)({key:"__RC_SELECT_GRP__".concat(Rt===null?xt:Rt,"__"),label:Rt},Mn),{},{options:Kn(hn)})}).filter(function(St){return St})}function Zr(Ie,Re,St,xt,Jt){return xe.useMemo(function(){var Ht=Ie,Rt=!Ie;Rt&&(Ht=Kn(Re));var fn=new Map,hn=new Map,Mn=function(zr,sr,Mr){Mr&&typeof Mr=="string"&&zr.set(sr[Mr],sr)};function ur(er){for(var zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,sr=0;sr<er.length;sr+=1){var Mr=er[sr];!Mr[St.options]||zr?(fn.set(Mr[St.value],Mr),Mn(hn,Mr,St.label),Mn(hn,Mr,xt),Mn(hn,Mr,Jt)):ur(Mr[St.options],!0)}}return ur(Ht),{options:Ht,valueOptions:fn,labelOptions:hn}},[Ie,Re,St,xt,Jt])}function Nr(Ie){var Re=xe.useRef();Re.current=Ie;var St=xe.useCallback(function(){return Re.current.apply(Re,arguments)},[]);return St}var qr=function(){return null};qr.isSelectOptGroup=!0;var li=qr,Jr=function(){return null};Jr.isSelectOption=!0;var Ki=Jr;function ea(Ie,Re){var St=(0,Pe.Z)({},Ie);return Array.isArray(Re)&&Re.forEach(function(xt){delete St[xt]}),St}var ha=oe(73299),Za=xe.createContext(null),Na=Za;function Ra(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Be=["disabled","title","children","style","className"];function Ve(Ie){return typeof Ie=="string"||typeof Ie=="number"}var He=function(Re,St){var xt=mt(),Jt=xt.prefixCls,Ht=xt.id,Rt=xt.open,fn=xt.multiple,hn=xt.mode,Mn=xt.searchValue,ur=xt.toggleOpen,er=xt.notFoundContent,zr=xt.onPopupScroll,sr=xe.useContext(Na),Mr=sr.flattenOptions,hr=sr.onActiveValue,Kr=sr.defaultActiveFirstOption,si=sr.onSelect,yi=sr.menuItemSelectedIcon,Ei=sr.rawValues,pi=sr.fieldNames,Ai=sr.virtual,ei=sr.direction,Ti=sr.listHeight,Ri=sr.listItemHeight,wr="".concat(Jt,"-item"),Dr=Tt(function(){return Mr},[Rt,Mr],function(Pi,ui){return ui[0]&&Pi[1]!==ui[1]}),Ur=xe.useRef(null),Hi=function(ui){ui.preventDefault()},Di=function(ui){Ur.current&&Ur.current.scrollTo(typeof ui=="number"?{index:ui}:ui)},Bi=function(ui){for(var Or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,gi=Dr.length,ci=0;ci<gi;ci+=1){var Gi=(ui+ci*Or+gi)%gi,pa=Dr[Gi],Sa=pa.group,Fi=pa.data;if(!Sa&&!Fi.disabled)return Gi}return-1},Ii=xe.useState(function(){return Bi(0)}),qi=(0,he.Z)(Ii,2),aa=qi[0],ba=qi[1],Da=function(ui){var Or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ba(ui);var gi={source:Or?"keyboard":"mouse"},ci=Dr[ui];if(!ci){hr(null,-1,gi);return}hr(ci.value,ui,gi)};(0,xe.useEffect)(function(){Da(Kr!==!1?Bi(0):-1)},[Dr.length,Mn]);var Wo=xe.useCallback(function(Pi){return Ei.has(Pi)&&hn!=="combobox"},[hn,(0,pe.Z)(Ei).toString(),Ei.size]);(0,xe.useEffect)(function(){var Pi=setTimeout(function(){if(!fn&&Rt&&Ei.size===1){var Or=Array.from(Ei)[0],gi=Dr.findIndex(function(ci){var Gi=ci.data;return Gi.value===Or});gi!==-1&&(Da(gi),Di(gi))}});if(Rt){var ui;(ui=Ur.current)===null||ui===void 0||ui.scrollTo(void 0)}return function(){return clearTimeout(Pi)}},[Rt,Mn,Mr.length]);var $a=function(ui){ui!==void 0&&si(ui,{selected:!Ei.has(ui)}),fn||ur(!1)};if(xe.useImperativeHandle(St,function(){return{onKeyDown:function(ui){var Or=ui.which,gi=ui.ctrlKey;switch(Or){case st.N:case st.P:case st.UP:case st.DOWN:{var ci=0;if(Or===st.UP?ci=-1:Or===st.DOWN?ci=1:Ra()&&gi&&(Or===st.N?ci=1:Or===st.P&&(ci=-1)),ci!==0){var Gi=Bi(aa+ci,ci);Di(Gi),Da(Gi,!0)}break}case st.ENTER:{var pa=Dr[aa];pa&&!pa.data.disabled?$a(pa.value):$a(void 0),Rt&&ui.preventDefault();break}case st.ESC:ur(!1),Rt&&ui.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ui){Di(ui)}}}),Dr.length===0)return xe.createElement("div",{role:"listbox",id:"".concat(Ht,"_list"),className:"".concat(wr,"-empty"),onMouseDown:Hi},er);var Lo=Object.keys(pi).map(function(Pi){return pi[Pi]}),vs=function(ui){return ui.label};function _a(Pi,ui){var Or=Pi.group;return{role:Or?"presentation":"option",id:"".concat(Ht,"_list_").concat(ui)}}var mi=function(ui){var Or=Dr[ui];if(!Or)return null;var gi=Or.data||{},ci=gi.value,Gi=Or.group,pa=le(gi,!0),Sa=vs(Or);return Or?xe.createElement("div",(0,Ce.Z)({"aria-label":typeof Sa=="string"&&!Gi?Sa:null},pa,{key:ui},_a(Or,ui),{"aria-selected":Wo(ci)}),ci):null},vi={role:"listbox",id:"".concat(Ht,"_list")};return xe.createElement(xe.Fragment,null,Ai&&xe.createElement("div",(0,Ce.Z)({},vi,{style:{height:0,width:0,overflow:"hidden"}}),mi(aa-1),mi(aa),mi(aa+1)),xe.createElement(ha.Z,{itemKey:"key",ref:Ur,data:Dr,height:Ti,itemHeight:Ri,fullHeight:!1,onMouseDown:Hi,onScroll:zr,virtual:Ai,direction:ei,innerProps:Ai?null:vi},function(Pi,ui){var Or,gi=Pi.group,ci=Pi.groupOption,Gi=Pi.data,pa=Pi.label,Sa=Pi.value,Fi=Gi.key;if(gi){var Ha,Mo=(Ha=Gi.title)!==null&&Ha!==void 0?Ha:Ve(pa)?pa.toString():void 0;return xe.createElement("div",{className:Ee()(wr,"".concat(wr,"-group")),title:Mo},pa!==void 0?pa:Fi)}var go=Gi.disabled,$o=Gi.title,ts=Gi.children,Ro=Gi.style,ks=Gi.className,xs=(0,ke.Z)(Gi,Be),$s=ea(xs,Lo),ns=Wo(Sa),zo="".concat(wr,"-option"),Ss=Ee()(wr,zo,ks,(Or={},(0,Je.Z)(Or,"".concat(zo,"-grouped"),ci),(0,Je.Z)(Or,"".concat(zo,"-active"),aa===ui&&!go),(0,Je.Z)(Or,"".concat(zo,"-disabled"),go),(0,Je.Z)(Or,"".concat(zo,"-selected"),ns),Or)),ss=vs(Pi),Qo=!yi||typeof yi=="function"||ns,Is=typeof ss=="number"?ss:ss||Sa,Es=Ve(Is)?Is.toString():void 0;return $o!==void 0&&(Es=$o),xe.createElement("div",(0,Ce.Z)({},le($s),Ai?{}:_a(Pi,ui),{"aria-selected":ns,className:Ss,title:Es,onMouseMove:function(){aa===ui||go||Da(ui)},onClick:function(){go||$a(Sa)},style:Ro}),xe.createElement("div",{className:"".concat(zo,"-content")},Is),xe.isValidElement(yi)||ns,Qo&&xe.createElement(cn,{className:"".concat(wr,"-option-state"),customizeIcon:yi,customizeIconProps:{isSelected:ns}},ns?"\u2713":null))}))},tt=xe.forwardRef(He);tt.displayName="OptionList";var gt=tt;function Ct(Ie){var Re=Ie.mode,St=Ie.options,xt=Ie.children,Jt=Ie.backfill,Ht=Ie.allowClear,Rt=Ie.placeholder,fn=Ie.getInputElement,hn=Ie.showSearch,Mn=Ie.onSearch,ur=Ie.defaultOpen,er=Ie.autoFocus,zr=Ie.labelInValue,sr=Ie.value,Mr=Ie.inputValue,hr=Ie.optionLabelProp,Kr=isMultiple(Re),si=hn!==void 0?hn:Kr||Re==="combobox",yi=St||convertChildrenToData(xt);if(warning(Re!=="tags"||yi.every(function(ei){return!ei.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Re==="tags"||Re==="combobox"){var Ei=yi.some(function(ei){return ei.options?ei.options.some(function(Ti){return typeof("value"in Ti?Ti.value:Ti.key)=="number"}):typeof("value"in ei?ei.value:ei.key)=="number"});warning(!Ei,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Re!=="combobox"||!hr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Re==="combobox"||!Jt,"`backfill` only works with `combobox` mode."),warning(Re==="combobox"||!fn,"`getInputElement` only work with `combobox` mode."),noteOnce(Re!=="combobox"||!fn||!Ht||!Rt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Mn&&!si&&Re!=="combobox"&&Re!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ur||er,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),sr!=null){var pi=toArray(sr);warning(!zr||pi.every(function(ei){return _typeof(ei)==="object"&&("key"in ei||"value"in ei)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Kr||Array.isArray(sr),"`value` should be array when `mode` is `multiple` or `tags`")}if(xt){var Ai=null;toNodeArray(xt).some(function(ei){if(!React.isValidElement(ei)||!ei.type)return!1;var Ti=ei,Ri=Ti.type;if(Ri.isSelectOption)return!1;if(Ri.isSelectOptGroup){var wr=toNodeArray(ei.props.children).every(function(Dr){return!React.isValidElement(Dr)||!ei.type||Dr.type.isSelectOption?!0:(Ai=Dr.type,!1)});return!wr}return Ai=Ri,!0}),Ai&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ai.displayName||Ai.name||Ai,"`.")),warning(Mr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function It(Ie,Re){if(Ie){var St=function xt(Jt){for(var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=0;Rt<Jt.length;Rt++){var fn=Jt[Rt];if(fn[Re==null?void 0:Re.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ht&&Array.isArray(fn[Re==null?void 0:Re.options])&&xt(fn[Re==null?void 0:Re.options],!0))break}};St(Ie)}}var ln=null,mn=["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"],Yn=["inputValue"];function yr(Ie){return!Ie||(0,dt.Z)(Ie)!=="object"}var Vn=xe.forwardRef(function(Ie,Re){var St=Ie.id,xt=Ie.mode,Jt=Ie.prefixCls,Ht=Jt===void 0?"rc-select":Jt,Rt=Ie.backfill,fn=Ie.fieldNames,hn=Ie.inputValue,Mn=Ie.searchValue,ur=Ie.onSearch,er=Ie.autoClearSearchValue,zr=er===void 0?!0:er,sr=Ie.onSelect,Mr=Ie.onDeselect,hr=Ie.dropdownMatchSelectWidth,Kr=hr===void 0?!0:hr,si=Ie.filterOption,yi=Ie.filterSort,Ei=Ie.optionFilterProp,pi=Ie.optionLabelProp,Ai=Ie.options,ei=Ie.children,Ti=Ie.defaultActiveFirstOption,Ri=Ie.menuItemSelectedIcon,wr=Ie.virtual,Dr=Ie.direction,Ur=Ie.listHeight,Hi=Ur===void 0?200:Ur,Di=Ie.listItemHeight,Bi=Di===void 0?20:Di,Ii=Ie.value,qi=Ie.defaultValue,aa=Ie.labelInValue,ba=Ie.onChange,Da=(0,ke.Z)(Ie,mn),Wo=Vi(St),$a=za(xt),Lo=!!(!Ai&&ei),vs=xe.useMemo(function(){return si===void 0&&xt==="combobox"?!1:si},[si,xt]),_a=xe.useMemo(function(){return Ua(fn,Lo)},[JSON.stringify(fn),Lo]),mi=Qe("",{value:Mn!==void 0?Mn:hn,postState:function(di){return di||""}}),vi=(0,he.Z)(mi,2),Pi=vi[0],ui=vi[1],Or=Zr(Ai,ei,_a,Ei,pi),gi=Or.valueOptions,ci=Or.labelOptions,Gi=Or.options,pa=xe.useCallback(function(Br){var di=bt(Br);return di.map(function($i){var ma,jo,Go,vl,qs;if(yr($i))ma=$i;else{var Ll;Go=$i.key,jo=$i.label,ma=(Ll=$i.value)!==null&&Ll!==void 0?Ll:Go}var Ps=gi.get(ma);if(Ps){var Al;if(jo===void 0&&(jo=Ps==null?void 0:Ps[pi||_a.label]),Go===void 0&&(Go=(Al=Ps==null?void 0:Ps.key)!==null&&Al!==void 0?Al:ma),vl=Ps==null?void 0:Ps.disabled,qs=Ps==null?void 0:Ps.title,0)var iu}return{label:jo,value:ma,key:Go,disabled:vl,title:qs}})},[_a,pi,gi]),Sa=Qe(qi,{value:Ii}),Fi=(0,he.Z)(Sa,2),Ha=Fi[0],Mo=Fi[1],go=xe.useMemo(function(){var Br,di=pa(Ha);return xt==="combobox"&&_t((Br=di[0])===null||Br===void 0?void 0:Br.value)?[]:di},[Ha,pa,xt]),$o=_o(go,gi),ts=(0,he.Z)($o,2),Ro=ts[0],ks=ts[1],xs=xe.useMemo(function(){if(!xt&&Ro.length===1){var Br=Ro[0];if(Br.value===null&&(Br.label===null||Br.label===void 0))return[]}return Ro.map(function(di){var $i;return(0,Pe.Z)((0,Pe.Z)({},di),{},{label:($i=di.label)!==null&&$i!==void 0?$i:di.value})})},[xt,Ro]),$s=xe.useMemo(function(){return new Set(Ro.map(function(Br){return Br.value}))},[Ro]);xe.useEffect(function(){if(xt==="combobox"){var Br,di=(Br=Ro[0])===null||Br===void 0?void 0:Br.value;ui(qe(di)?String(di):"")}},[Ro]);var ns=Nr(function(Br,di){var $i,ma=di!=null?di:Br;return $i={},(0,Je.Z)($i,_a.value,Br),(0,Je.Z)($i,_a.label,ma),$i}),zo=xe.useMemo(function(){if(xt!=="tags")return Gi;var Br=(0,pe.Z)(Gi),di=function(ma){return gi.has(ma)};return(0,pe.Z)(Ro).sort(function($i,ma){return $i.value<ma.value?-1:1}).forEach(function($i){var ma=$i.value;di(ma)||Br.push(ns(ma,$i.label))}),Br},[ns,Gi,gi,Ro,xt]),Ss=Oa(zo,_a,Pi,vs,Ei),ss=xe.useMemo(function(){return xt!=="tags"||!Pi||Ss.some(function(Br){return Br[Ei||"value"]===Pi})||Ss.some(function(Br){return Br[_a.value]===Pi})?Ss:[ns(Pi)].concat((0,pe.Z)(Ss))},[ns,Ei,xt,Ss,Pi,_a]),Qo=xe.useMemo(function(){return yi?(0,pe.Z)(ss).sort(function(Br,di){return yi(Br,di)}):ss},[ss,yi]),Is=xe.useMemo(function(){return xa(Qo,{fieldNames:_a,childrenAsData:Lo})},[Qo,_a,Lo]),Es=function(di){var $i=pa(di);if(Mo($i),ba&&($i.length!==Ro.length||$i.some(function(Go,vl){var qs;return((qs=Ro[vl])===null||qs===void 0?void 0:qs.value)!==(Go==null?void 0:Go.value)}))){var ma=aa?$i:$i.map(function(Go){return Go.value}),jo=$i.map(function(Go){return uo(ks(Go.value))});ba($a?ma:ma[0],$a?jo:jo[0])}},Yo=xe.useState(null),Us=(0,he.Z)(Yo,2),Dl=Us[0],yl=Us[1],ls=xe.useState(0),bo=(0,he.Z)(ls,2),us=bo[0],js=bo[1],el=Ti!==void 0?Ti:xt!=="combobox",qo=xe.useCallback(function(Br,di){var $i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ma=$i.source,jo=ma===void 0?"keyboard":ma;js(di),Rt&&xt==="combobox"&&Br!==null&&jo==="keyboard"&&yl(String(Br))},[Rt,xt]),Oo=function(di,$i,ma){var jo=function(){var Ol,Bl=ks(di);return[aa?{label:Bl==null?void 0:Bl[_a.label],value:di,key:(Ol=Bl==null?void 0:Bl.key)!==null&&Ol!==void 0?Ol:di}:di,uo(Bl)]};if($i&&sr){var Go=jo(),vl=(0,he.Z)(Go,2),qs=vl[0],Ll=vl[1];sr(qs,Ll)}else if(!$i&&Mr&&ma!=="clear"){var Ps=jo(),Al=(0,he.Z)(Ps,2),iu=Al[0],au=Al[1];Mr(iu,au)}},Uo=Nr(function(Br,di){var $i,ma=$a?di.selected:!0;ma?$i=$a?[].concat((0,pe.Z)(Ro),[Br]):[Br]:$i=Ro.filter(function(jo){return jo.value!==Br}),Es($i),Oo(Br,ma),xt==="combobox"?yl(""):(!za||zr)&&(ui(""),yl(""))}),zs=function(di,$i){Es(di);var ma=$i.type,jo=$i.values;(ma==="remove"||ma==="clear")&&jo.forEach(function(Go){Oo(Go.value,!1,ma)})},Ms=function(di,$i){if(ui(di),yl(null),$i.source==="submit"){var ma=(di||"").trim();if(ma){var jo=Array.from(new Set([].concat((0,pe.Z)($s),[ma])));Es(jo),Oo(ma,!0),ui("")}return}$i.source!=="blur"&&(xt==="combobox"&&Es(di),ur==null||ur(di))},Ks=function(di){var $i=di;xt!=="tags"&&($i=di.map(function(jo){var Go=ci.get(jo);return Go==null?void 0:Go.value}).filter(function(jo){return jo!==void 0}));var ma=Array.from(new Set([].concat((0,pe.Z)($s),(0,pe.Z)($i))));Es(ma),ma.forEach(function(jo){Oo(jo,!0)})},Ia=xe.useMemo(function(){var Br=wr!==!1&&Kr!==!1;return(0,Pe.Z)((0,Pe.Z)({},Or),{},{flattenOptions:Is,onActiveValue:qo,defaultActiveFirstOption:el,onSelect:Uo,menuItemSelectedIcon:Ri,rawValues:$s,fieldNames:_a,virtual:Br,direction:Dr,listHeight:Hi,listItemHeight:Bi,childrenAsData:Lo})},[Or,Is,qo,el,Uo,Ri,$s,_a,wr,Kr,Hi,Bi,Lo]);return xe.createElement(Na.Provider,{value:Ia},xe.createElement(Ya,(0,Ce.Z)({},Da,{id:Wo,prefixCls:Ht,ref:Re,omitDomProps:Yn,mode:xt,displayValues:xs,onDisplayValuesChange:zs,direction:Dr,searchValue:Pi,onSearch:Ms,autoClearSearchValue:zr,onSearchSplit:Ks,dropdownMatchSelectWidth:Kr,OptionList:gt,emptyOptions:!Is.length,activeValue:Dl,activeDescendantId:"".concat(Wo,"_list_").concat(us)})))}),En=Vn;En.Option=Ki,En.OptGroup=li;var wn=null,In=null,Bn=oe(17341);function pr(Ie){var Re=xe.useRef(!1),St=xe.useState(Ie),xt=(0,he.Z)(St,2),Jt=xt[0],Ht=xt[1];xe.useEffect(function(){return Re.current=!1,function(){Re.current=!0}},[]);function Rt(fn,hn){hn&&Re.current||Ht(fn)}return[Jt,Rt]}function Xn(Ie){return Ie!==void 0}function jn(Ie,Re){var St=Re||{},xt=St.defaultValue,Jt=St.value,Ht=St.onChange,Rt=St.postState,fn=pr(function(){return Xn(Jt)?Jt:Xn(xt)?typeof xt=="function"?xt():xt:typeof Ie=="function"?Ie():Ie}),hn=(0,he.Z)(fn,2),Mn=hn[0],ur=hn[1],er=Jt!==void 0?Jt:Mn,zr=Rt?Rt(er):er,sr=cr(Ht),Mr=pr([er]),hr=(0,he.Z)(Mr,2),Kr=hr[0],si=hr[1];rt(function(){var Ei=Kr[0];Mn!==Ei&&sr(Mn,Ei)},[Kr]),rt(function(){Xn(Jt)||ur(Jt)},[Jt]);var yi=cr(function(Ei,pi){ur(Ei,pi),si([er],pi)});return[zr,yi]}var nr=xe.createContext(null),qn=nr,dr="__rc_cascader_search_mark__",je=function(Re,St,xt){var Jt=xt.label;return St.some(function(Ht){return String(Ht[Jt]).toLowerCase().includes(Re.toLowerCase())})},Ye=function(Re,St,xt,Jt){return St.map(function(Ht){return Ht[Jt.label]}).join(" / ")},$t=function(Ie,Re,St,xt,Jt,Ht){var Rt=Jt.filter,fn=Rt===void 0?je:Rt,hn=Jt.render,Mn=hn===void 0?Ye:hn,ur=Jt.limit,er=ur===void 0?50:ur,zr=Jt.sort;return xe.useMemo(function(){var sr=[];if(!Ie)return[];function Mr(hr,Kr){var si=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;hr.forEach(function(yi){if(!(!zr&&er!==!1&&er>0&&sr.length>=er)){var Ei=[].concat((0,pe.Z)(Kr),[yi]),pi=yi[St.children],Ai=si||yi.disabled;if((!pi||pi.length===0||Ht)&&fn(Ie,Ei,{label:St.label})){var ei;sr.push((0,Pe.Z)((0,Pe.Z)({},yi),{},(ei={disabled:Ai},(0,Je.Z)(ei,St.label,Mn(Ie,Ei,xt,St)),(0,Je.Z)(ei,dr,Ei),(0,Je.Z)(ei,St.children,void 0),ei)))}pi&&Mr(yi[St.children],Ei,Ai)}})}return Mr(Re,[]),zr&&sr.sort(function(hr,Kr){return zr(hr[dr],Kr[dr],Ie,St)}),er!==!1&&er>0?sr.slice(0,er):sr},[Ie,Re,St,xt,Mn,Ht,fn,zr,er])},Dt="__RC_CASCADER_SPLIT__",sn="SHOW_PARENT",kn="SHOW_CHILD";function yn(Ie){return Ie.join(Dt)}function zn(Ie){return Ie.map(yn)}function Pn(Ie){return Ie.split(Dt)}function pn(Ie){var Re=Ie||{},St=Re.label,xt=Re.value,Jt=Re.children,Ht=xt||"value";return{label:St||"label",value:Ht,key:Ht,children:Jt||"children"}}function Nn(Ie,Re){var St,xt;return(St=Ie.isLeaf)!==null&&St!==void 0?St:!((xt=Ie[Re.children])!==null&&xt!==void 0&&xt.length)}function Wn(Ie){var Re=Ie.parentElement;if(Re){var St=Ie.offsetTop-Re.offsetTop;St-Re.scrollTop<0?Re.scrollTo({top:St}):St+Ie.offsetHeight-Re.scrollTop>Re.offsetHeight&&Re.scrollTo({top:St+Ie.offsetHeight-Re.offsetHeight})}}function vr(Ie,Re){return Ie.map(function(St){var xt;return(xt=St[dr])===null||xt===void 0?void 0:xt.map(function(Jt){return Jt[Re.value]})})}function Hn(Ie,Re,St){var xt=new Set(Ie),Jt=Re();return Ie.filter(function(Ht){var Rt=Jt[Ht],fn=Rt?Rt.parent:null,hn=Rt?Rt.children:null;return Rt&&Rt.node.disabled?!0:St===kn?!(hn&&hn.some(function(Mn){return Mn.key&&xt.has(Mn.key)})):!(fn&&!fn.node.disabled&&xt.has(fn.key))})}function Er(Ie,Re,St){for(var xt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Jt=Re,Ht=[],Rt=function(){var Mn,ur,er,zr=Ie[fn],sr=(Mn=Jt)===null||Mn===void 0?void 0:Mn.findIndex(function(hr){var Kr=hr[St.value];return xt?String(Kr)===String(zr):Kr===zr}),Mr=sr!==-1?(ur=Jt)===null||ur===void 0?void 0:ur[sr]:null;Ht.push({value:(er=Mr==null?void 0:Mr[St.value])!==null&&er!==void 0?er:zr,index:sr,option:Mr}),Jt=Mr==null?void 0:Mr[St.children]},fn=0;fn<Ie.length;fn+=1)Rt();return Ht}var Qr=function(Ie,Re,St,xt,Jt){return xe.useMemo(function(){var Ht=Jt||function(Rt){var fn=xt?Rt.slice(-1):Rt,hn=" / ";return fn.every(function(Mn){return["string","number"].includes((0,dt.Z)(Mn))})?fn.join(hn):fn.reduce(function(Mn,ur,er){var zr=xe.isValidElement(ur)?xe.cloneElement(ur,{key:er}):ur;return er===0?[zr]:[].concat((0,pe.Z)(Mn),[hn,zr])},[])};return Ie.map(function(Rt){var fn,hn,Mn=Er(Rt,Re,St),ur=Ht(Mn.map(function(zr){var sr,Mr=zr.option,hr=zr.value;return(sr=Mr==null?void 0:Mr[St.label])!==null&&sr!==void 0?sr:hr}),Mn.map(function(zr){var sr=zr.option;return sr})),er=yn(Rt);return{label:ur,value:er,key:er,valueCells:Rt,disabled:(fn=Mn[Mn.length-1])===null||fn===void 0||(hn=fn.option)===null||hn===void 0?void 0:hn.disabled}})},[Ie,Re,St,Jt,xt])},Rr=oe(1089),jr=function(Ie,Re){var St=xe.useRef({options:null,info:null}),xt=xe.useCallback(function(){return St.current.options!==Ie&&(St.current.options=Ie,St.current.info=(0,Rr.I8)(Ie,{fieldNames:Re,initWrapper:function(Ht){return(0,Pe.Z)((0,Pe.Z)({},Ht),{},{pathKeyEntities:{}})},processEntity:function(Ht,Rt){var fn=Ht.nodes.map(function(hn){return hn[Re.value]}).join(Dt);Rt.pathKeyEntities[fn]=Ht,Ht.key=fn}})),St.current.info.pathKeyEntities},[Re,Ie]);return xt},Cr=function(Ie,Re){return xe.useCallback(function(St){var xt=[],Jt=[];return St.forEach(function(Ht){var Rt=Er(Ht,Ie,Re);Rt.every(function(fn){return fn.option})?Jt.push(Ht):xt.push(Ht)}),[Jt,xt]},[Ie,Re])},Fr={},ai=[],hi=function(Re){ai.push(Re)};function $r(Ie,Re){if(0)var St}function wi(Ie,Re){if(0)var St}function ta(){Fr={}}function Ba(Ie,Re,St){!Re&&!Fr[St]&&(Ie(!1,St),Fr[St]=!0)}function ga(Ie,Re){Ba($r,Ie,Re)}function ra(Ie,Re){Ba(wi,Ie,Re)}ga.preMessage=hi,ga.resetWarned=ta,ga.noteOnce=ra;var La=null;function Aa(Ie){return xe.useMemo(function(){if(!Ie)return[!1,{}];var Re={matchInputWidth:!0,limit:50};return Ie&&(0,dt.Z)(Ie)==="object"&&(Re=(0,Pe.Z)((0,Pe.Z)({},Re),Ie)),Re.limit<=0&&delete Re.limit,[!0,Re]},[Ie])}var Oi=xe.memo(function(Ie){var Re=Ie.children;return Re},function(Ie,Re){return!Re.open}),ia=Oi;function ni(Ie){var Re,St=Ie.prefixCls,xt=Ie.checked,Jt=Ie.halfChecked,Ht=Ie.disabled,Rt=Ie.onClick,fn=Ie.disableCheckbox,hn=xe.useContext(qn),Mn=hn.checkable,ur=typeof Mn!="boolean"?Mn:null;return xe.createElement("span",{className:Ee()("".concat(St),(Re={},(0,Je.Z)(Re,"".concat(St,"-checked"),xt),(0,Je.Z)(Re,"".concat(St,"-indeterminate"),!xt&&Jt),(0,Je.Z)(Re,"".concat(St,"-disabled"),Ht||fn),Re)),onClick:Rt},ur)}var Ci="__cascader_fix_label__";function Xi(Ie){var Re=Ie.prefixCls,St=Ie.multiple,xt=Ie.options,Jt=Ie.activeValue,Ht=Ie.prevValuePath,Rt=Ie.onToggleOpen,fn=Ie.onSelect,hn=Ie.onActive,Mn=Ie.checkedSet,ur=Ie.halfCheckedSet,er=Ie.loadingKeys,zr=Ie.isSelectable,sr=Ie.searchValue,Mr="".concat(Re,"-menu"),hr="".concat(Re,"-menu-item"),Kr=xe.useContext(qn),si=Kr.fieldNames,yi=Kr.changeOnSelect,Ei=Kr.expandTrigger,pi=Kr.expandIcon,Ai=Kr.loadingIcon,ei=Kr.dropdownMenuColumnStyle,Ti=Ei==="hover",Ri=xe.useMemo(function(){return xt.map(function(wr){var Dr,Ur=wr.disabled,Hi=wr.disableCheckbox,Di=wr[dr],Bi=(Dr=wr[Ci])!==null&&Dr!==void 0?Dr:wr[si.label],Ii=wr[si.value],qi=Nn(wr,si),aa=Di?Di.map(function(Lo){return Lo[si.value]}):[].concat((0,pe.Z)(Ht),[Ii]),ba=yn(aa),Da=er.includes(ba),Wo=Mn.has(ba),$a=ur.has(ba);return{disabled:Ur,label:Bi,value:Ii,isLeaf:qi,isLoading:Da,checked:Wo,halfChecked:$a,option:wr,disableCheckbox:Hi,fullPath:aa,fullPathKey:ba}})},[xt,Mn,si,ur,er,Ht]);return xe.createElement("ul",{className:Mr,role:"menu"},Ri.map(function(wr){var Dr,Ur=wr.disabled,Hi=wr.label,Di=wr.value,Bi=wr.isLeaf,Ii=wr.isLoading,qi=wr.checked,aa=wr.halfChecked,ba=wr.option,Da=wr.fullPath,Wo=wr.fullPathKey,$a=wr.disableCheckbox,Lo=function(){if(!(Ur||sr)){var vi=(0,pe.Z)(Da);Ti&&Bi&&vi.pop(),hn(vi)}},vs=function(){zr(ba)&&fn(Da,Bi)},_a;return typeof ba.title=="string"?_a=ba.title:typeof Hi=="string"&&(_a=Hi),xe.createElement("li",{key:Wo,className:Ee()(hr,(Dr={},(0,Je.Z)(Dr,"".concat(hr,"-expand"),!Bi),(0,Je.Z)(Dr,"".concat(hr,"-active"),Jt===Di||Jt===Wo),(0,Je.Z)(Dr,"".concat(hr,"-disabled"),Ur),(0,Je.Z)(Dr,"".concat(hr,"-loading"),Ii),Dr)),style:ei,role:"menuitemcheckbox",title:_a,"aria-checked":qi,"data-path-key":Wo,onClick:function(){Lo(),!$a&&(!St||Bi)&&vs()},onDoubleClick:function(){yi&&Rt(!1)},onMouseEnter:function(){Ti&&Lo()},onMouseDown:function(vi){vi.preventDefault()}},St&&xe.createElement(ni,{prefixCls:"".concat(Re,"-checkbox"),checked:qi,halfChecked:aa,disabled:Ur||$a,disableCheckbox:$a,onClick:function(vi){$a||(vi.stopPropagation(),vs())}}),xe.createElement("div",{className:"".concat(hr,"-content")},Hi),!Ii&&pi&&!Bi&&xe.createElement("div",{className:"".concat(hr,"-expand-icon")},pi),Ii&&Ai&&xe.createElement("div",{className:"".concat(hr,"-loading-icon")},Ai))}))}var wa=function(){var Ie=mt(),Re=Ie.multiple,St=Ie.open,xt=xe.useContext(qn),Jt=xt.values,Ht=xe.useState([]),Rt=(0,he.Z)(Ht,2),fn=Rt[0],hn=Rt[1];return xe.useEffect(function(){if(St&&!Re){var Mn=Jt[0];hn(Mn||[])}},[St]),[fn,hn]},ri={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(Re){var St=Re.keyCode;if(Re.altKey&&!Re.ctrlKey||Re.metaKey||St>=ri.F1&&St<=ri.F12)return!1;switch(St){case ri.ALT:case ri.CAPS_LOCK:case ri.CONTEXT_MENU:case ri.CTRL:case ri.DOWN:case ri.END:case ri.ESC:case ri.HOME:case ri.INSERT:case ri.LEFT:case ri.MAC_FF_META:case ri.META:case ri.NUMLOCK:case ri.NUM_CENTER:case ri.PAGE_DOWN:case ri.PAGE_UP:case ri.PAUSE:case ri.PRINT_SCREEN:case ri.RIGHT:case ri.SHIFT:case ri.UP:case ri.WIN_KEY:case ri.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Re){if(Re>=ri.ZERO&&Re<=ri.NINE||Re>=ri.NUM_ZERO&&Re<=ri.NUM_MULTIPLY||Re>=ri.A&&Re<=ri.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Re===0)return!0;switch(Re){case ri.SPACE:case ri.QUESTION_MARK:case ri.NUM_PLUS:case ri.NUM_MINUS:case ri.NUM_PERIOD:case ri.NUM_DIVISION:case ri.SEMICOLON:case ri.DASH:case ri.EQUALS:case ri.COMMA:case ri.PERIOD:case ri.SLASH:case ri.APOSTROPHE:case ri.SINGLE_QUOTE:case ri.OPEN_SQUARE_BRACKET:case ri.BACKSLASH:case ri.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},io=ri,ko=function(Ie,Re,St,xt,Jt,Ht){var Rt=mt(),fn=Rt.direction,hn=Rt.searchValue,Mn=Rt.toggleOpen,ur=Rt.open,er=fn==="rtl",zr=xe.useMemo(function(){for(var ei=-1,Ti=Re,Ri=[],wr=[],Dr=xt.length,Ur=vr(Re,St),Hi=function(ba){var Da=Ti.findIndex(function(Wo,$a){return(Ur[$a]?yn(Ur[$a]):Wo[St.value])===xt[ba]});if(Da===-1)return"break";ei=Da,Ri.push(ei),wr.push(xt[ba]),Ti=Ti[ei][St.children]},Di=0;Di<Dr&&Ti;Di+=1){var Bi=Hi(Di);if(Bi==="break")break}for(var Ii=Re,qi=0;qi<Ri.length-1;qi+=1)Ii=Ii[Ri[qi]][St.children];return[wr,ei,Ii,Ur]},[xt,St,Re]),sr=(0,he.Z)(zr,4),Mr=sr[0],hr=sr[1],Kr=sr[2],si=sr[3],yi=function(Ti){Jt(Ti)},Ei=function(Ti){var Ri=Kr.length,wr=hr;wr===-1&&Ti<0&&(wr=Ri);for(var Dr=0;Dr<Ri;Dr+=1){wr=(wr+Ti+Ri)%Ri;var Ur=Kr[wr];if(Ur&&!Ur.disabled){var Hi=Mr.slice(0,-1).concat(si[wr]?yn(si[wr]):Ur[St.value]);yi(Hi);return}}},pi=function(){if(Mr.length>1){var Ti=Mr.slice(0,-1);yi(Ti)}else Mn(!1)},Ai=function(){var Ti,Ri=((Ti=Kr[hr])===null||Ti===void 0?void 0:Ti[St.children])||[],wr=Ri.find(function(Ur){return!Ur.disabled});if(wr){var Dr=[].concat((0,pe.Z)(Mr),[wr[St.value]]);yi(Dr)}};xe.useImperativeHandle(Ie,function(){return{onKeyDown:function(Ti){var Ri=Ti.which;switch(Ri){case io.UP:case io.DOWN:{var wr=0;Ri===io.UP?wr=-1:Ri===io.DOWN&&(wr=1),wr!==0&&Ei(wr);break}case io.LEFT:{if(hn)break;er?Ai():pi();break}case io.RIGHT:{if(hn)break;er?pi():Ai();break}case io.BACKSPACE:{hn||pi();break}case io.ENTER:{if(Mr.length){var Dr=Kr[hr],Ur=(Dr==null?void 0:Dr[dr])||[];Ur.length?Ht(Ur.map(function(Hi){return Hi[St.value]}),Ur[Ur.length-1]):Ht(Mr,Kr[hr])}break}case io.ESC:Mn(!1),ur&&Ti.stopPropagation()}},onKeyUp:function(){}}})},Ja=xe.forwardRef(function(Ie,Re){var St,xt,Jt,Ht,Rt=mt(),fn=Rt.prefixCls,hn=Rt.multiple,Mn=Rt.searchValue,ur=Rt.toggleOpen,er=Rt.notFoundContent,zr=Rt.direction,sr=Rt.open,Mr=xe.useRef(),hr=zr==="rtl",Kr=xe.useContext(qn),si=Kr.options,yi=Kr.values,Ei=Kr.halfValues,pi=Kr.fieldNames,Ai=Kr.changeOnSelect,ei=Kr.onSelect,Ti=Kr.searchOptions,Ri=Kr.dropdownPrefixCls,wr=Kr.loadData,Dr=Kr.expandTrigger,Ur=Ri||fn,Hi=xe.useState([]),Di=(0,he.Z)(Hi,2),Bi=Di[0],Ii=Di[1],qi=function(Fi){if(!(!wr||Mn)){var Ha=Er(Fi,si,pi),Mo=Ha.map(function(ts){var Ro=ts.option;return Ro}),go=Mo[Mo.length-1];if(go&&!Nn(go,pi)){var $o=yn(Fi);Ii(function(ts){return[].concat((0,pe.Z)(ts),[$o])}),wr(Mo)}}};xe.useEffect(function(){Bi.length&&Bi.forEach(function(Sa){var Fi=Pn(Sa),Ha=Er(Fi,si,pi,!0).map(function(go){var $o=go.option;return $o}),Mo=Ha[Ha.length-1];(!Mo||Mo[pi.children]||Nn(Mo,pi))&&Ii(function(go){return go.filter(function($o){return $o!==Sa})})})},[si,Bi,pi]);var aa=xe.useMemo(function(){return new Set(zn(yi))},[yi]),ba=xe.useMemo(function(){return new Set(zn(Ei))},[Ei]),Da=wa(),Wo=(0,he.Z)(Da,2),$a=Wo[0],Lo=Wo[1],vs=function(Fi){Lo(Fi),qi(Fi)},_a=function(Fi){var Ha=Fi.disabled,Mo=Nn(Fi,pi);return!Ha&&(Mo||Ai||hn)},mi=function(Fi,Ha){var Mo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;ei(Fi),!hn&&(Ha||Ai&&(Dr==="hover"||Mo))&&ur(!1)},vi=xe.useMemo(function(){return Mn?Ti:si},[Mn,Ti,si]),Pi=xe.useMemo(function(){for(var Sa=[{options:vi}],Fi=vi,Ha=vr(Fi,pi),Mo=function(){var Ro=$a[go],ks=Fi.find(function($s,ns){return(Ha[ns]?yn(Ha[ns]):$s[pi.value])===Ro}),xs=ks==null?void 0:ks[pi.children];if(!(xs!=null&&xs.length))return"break";Fi=xs,Sa.push({options:xs})},go=0;go<$a.length;go+=1){var $o=Mo();if($o==="break")break}return Sa},[vi,$a,pi]),ui=function(Fi,Ha){_a(Ha)&&mi(Fi,Nn(Ha,pi),!0)};ko(Re,vi,pi,$a,vs,ui),xe.useEffect(function(){for(var Sa=0;Sa<$a.length;Sa+=1){var Fi,Ha=$a.slice(0,Sa+1),Mo=yn(Ha),go=(Fi=Mr.current)===null||Fi===void 0?void 0:Fi.querySelector('li[data-path-key="'.concat(Mo.replace(/\\{0,2}"/g,'\\"'),'"]'));go&&Wn(go)}},[$a]);var Or=!((St=Pi[0])!==null&&St!==void 0&&(xt=St.options)!==null&&xt!==void 0&&xt.length),gi=[(Jt={},(0,Je.Z)(Jt,pi.value,"__EMPTY__"),(0,Je.Z)(Jt,Ci,er),(0,Je.Z)(Jt,"disabled",!0),Jt)],ci=(0,Pe.Z)((0,Pe.Z)({},Ie),{},{multiple:!Or&&hn,onSelect:mi,onActive:vs,onToggleOpen:ur,checkedSet:aa,halfCheckedSet:ba,loadingKeys:Bi,isSelectable:_a}),Gi=Or?[{options:gi}]:Pi,pa=Gi.map(function(Sa,Fi){var Ha=$a.slice(0,Fi),Mo=$a[Fi];return xe.createElement(Xi,(0,Ce.Z)({key:Fi},ci,{searchValue:Mn,prefixCls:Ur,options:Sa.options,prevValuePath:Ha,activeValue:Mo}))});return xe.createElement(ia,{open:sr},xe.createElement("div",{className:Ee()("".concat(Ur,"-menus"),(Ht={},(0,Je.Z)(Ht,"".concat(Ur,"-menu-empty"),Or),(0,Je.Z)(Ht,"".concat(Ur,"-rtl"),hr),Ht)),ref:Mr},pa))}),Ta=Ja;function Ui(Ie){var Re=Ie.onPopupVisibleChange,St=Ie.popupVisible,xt=Ie.popupClassName,Jt=Ie.popupPlacement;warning(!Re,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(St===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(xt===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Jt===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Po(Ie,Re){if(Ie){var St=function xt(Jt){for(var Ht=0;Ht<Jt.length;Ht++){var Rt=Jt[Ht];if(Rt[Re==null?void 0:Re.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Rt[Re==null?void 0:Re.children])&&xt(Rt[Re==null?void 0:Re.children]))return!0}};St(Ie)}}var Yi=null,oi=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function sa(Ie){return Array.isArray(Ie)&&Array.isArray(Ie[0])}function Ga(Ie){return Ie?sa(Ie)?Ie:(Ie.length===0?[]:[Ie]).map(function(Re){return Array.isArray(Re)?Re:[Re]}):[]}var la=xe.forwardRef(function(Ie,Re){var St=Ie.id,xt=Ie.prefixCls,Jt=xt===void 0?"rc-cascader":xt,Ht=Ie.fieldNames,Rt=Ie.defaultValue,fn=Ie.value,hn=Ie.changeOnSelect,Mn=Ie.onChange,ur=Ie.displayRender,er=Ie.checkable,zr=Ie.autoClearSearchValue,sr=zr===void 0?!0:zr,Mr=Ie.searchValue,hr=Ie.onSearch,Kr=Ie.showSearch,si=Ie.expandTrigger,yi=Ie.options,Ei=Ie.dropdownPrefixCls,pi=Ie.loadData,Ai=Ie.popupVisible,ei=Ie.open,Ti=Ie.popupClassName,Ri=Ie.dropdownClassName,wr=Ie.dropdownMenuColumnStyle,Dr=Ie.popupPlacement,Ur=Ie.placement,Hi=Ie.onDropdownVisibleChange,Di=Ie.onPopupVisibleChange,Bi=Ie.expandIcon,Ii=Bi===void 0?">":Bi,qi=Ie.loadingIcon,aa=Ie.children,ba=Ie.dropdownMatchSelectWidth,Da=ba===void 0?!1:ba,Wo=Ie.showCheckedStrategy,$a=Wo===void 0?sn:Wo,Lo=(0,ke.Z)(Ie,oi),vs=Vi(St),_a=!!er,mi=jn(Rt,{value:fn,postState:Ga}),vi=(0,he.Z)(mi,2),Pi=vi[0],ui=vi[1],Or=xe.useMemo(function(){return pn(Ht)},[JSON.stringify(Ht)]),gi=xe.useMemo(function(){return yi||[]},[yi]),ci=jr(gi,Or),Gi=xe.useCallback(function(qo){var Oo=ci();return qo.map(function(Uo){var zs=Oo[Uo].nodes;return zs.map(function(Ms){return Ms[Or.value]})})},[ci,Or]),pa=jn("",{value:Mr,postState:function(Oo){return Oo||""}}),Sa=(0,he.Z)(pa,2),Fi=Sa[0],Ha=Sa[1],Mo=function(Oo,Uo){Ha(Oo),Uo.source!=="blur"&&hr&&hr(Oo)},go=Aa(Kr),$o=(0,he.Z)(go,2),ts=$o[0],Ro=$o[1],ks=$t(Fi,gi,Or,Ei||Jt,Ro,hn),xs=Cr(gi,Or),$s=xe.useMemo(function(){var qo=xs(Pi),Oo=(0,he.Z)(qo,2),Uo=Oo[0],zs=Oo[1];if(!_a||!Pi.length)return[Uo,[],zs];var Ms=zn(Uo),Ks=ci(),Ia=(0,Bn.S)(Ms,!0,Ks),Br=Ia.checkedKeys,di=Ia.halfCheckedKeys;return[Gi(Br),Gi(di),zs]},[_a,Pi,ci,Gi,xs]),ns=(0,he.Z)($s,3),zo=ns[0],Ss=ns[1],ss=ns[2],Qo=xe.useMemo(function(){var qo=zn(zo),Oo=Hn(qo,ci,$a);return[].concat((0,pe.Z)(ss),(0,pe.Z)(Gi(Oo)))},[zo,ci,Gi,ss,$a]),Is=Qr(Qo,gi,Or,_a,ur),Es=cr(function(qo){if(ui(qo),Mn){var Oo=Ga(qo),Uo=Oo.map(function(Ks){return Er(Ks,gi,Or).map(function(Ia){return Ia.option})}),zs=_a?Oo:Oo[0],Ms=_a?Uo:Uo[0];Mn(zs,Ms)}}),Yo=cr(function(qo){if((!_a||sr)&&Ha(""),!_a)Es(qo);else{var Oo=yn(qo),Uo=zn(zo),zs=zn(Ss),Ms=Uo.includes(Oo),Ks=ss.some(function(qs){return yn(qs)===Oo}),Ia=zo,Br=ss;if(Ks&&!Ms)Br=ss.filter(function(qs){return yn(qs)!==Oo});else{var di=Ms?Uo.filter(function(qs){return qs!==Oo}):[].concat((0,pe.Z)(Uo),[Oo]),$i=ci(),ma;if(Ms){var jo=(0,Bn.S)(di,{checked:!1,halfCheckedKeys:zs},$i);ma=jo.checkedKeys}else{var Go=(0,Bn.S)(di,!0,$i);ma=Go.checkedKeys}var vl=Hn(ma,ci,$a);Ia=Gi(vl)}Es([].concat((0,pe.Z)(Br),(0,pe.Z)(Ia)))}}),Us=function(Oo,Uo){if(Uo.type==="clear"){Es([]);return}var zs=Uo.values[0],Ms=zs.valueCells;Yo(Ms)},Dl=ei!==void 0?ei:Ai,yl=Ri||Ti,ls=Ur||Dr,bo=function(Oo){Hi==null||Hi(Oo),Di==null||Di(Oo)},us=xe.useMemo(function(){return{options:gi,fieldNames:Or,values:zo,halfValues:Ss,changeOnSelect:hn,onSelect:Yo,checkable:er,searchOptions:ks,dropdownPrefixCls:Ei,loadData:pi,expandTrigger:si,expandIcon:Ii,loadingIcon:qi,dropdownMenuColumnStyle:wr}},[gi,Or,zo,Ss,hn,Yo,er,ks,Ei,pi,si,Ii,qi,wr]),js=!(Fi?ks:gi).length,el=Fi&&Ro.matchInputWidth||js?{}:{minWidth:"auto"};return xe.createElement(qn.Provider,{value:us},xe.createElement(Ya,(0,Ce.Z)({},Lo,{ref:Re,id:vs,prefixCls:Jt,autoClearSearchValue:sr,dropdownMatchSelectWidth:Da,dropdownStyle:el,displayValues:Is,onDisplayValuesChange:Us,mode:_a?"multiple":void 0,searchValue:Fi,onSearch:Mo,showSearch:ts,OptionList:Ta,emptyOptions:js,open:Dl,dropdownClassName:yl,placement:ls,onDropdownVisibleChange:bo,getRawInputElement:function(){return aa}})))});la.SHOW_PARENT=sn,la.SHOW_CHILD=kn;var Ka=la,ki=Ka,ro=oe(10366),ao=oe(33603),eo=oe(8745),oo=oe(9708),wo=oe(53124),Ho=oe(88258),to=oe(98866),Co=oe(98675),Jo=oe(65223),Xo=oe(87244),as=oe(13458),No=oe(78642),vo=oe(46163),ji=oe(4173),ua=oe(63185),Qa=oe(14747),ho=oe(80110),Fo=oe(67968);const es=Ie=>{const{prefixCls:Re,componentCls:St,antCls:xt}=Ie,Jt=`${St}-menu-item`,Ht=`
&${Jt}-expand ${Jt}-expand-icon,
${Jt}-loading-icon
`;return[{[St]:{width:Ie.controlWidth}},{[`${St}-dropdown`]:[(0,ua.C2)(`${Re}-checkbox`,Ie),{[`&${xt}-select-dropdown`]:{padding:0}},{[St]:{"&-checkbox":{top:0,marginInlineEnd:Ie.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${St}-menu-empty`]:{[`${St}-menu`]:{width:"100%",height:"auto",[Jt]:{color:Ie.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:Ie.controlItemWidth,height:Ie.dropdownHeight,margin:0,padding:Ie.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorSplit}`},"&-item":Object.assign(Object.assign({},Qa.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:Ie.optionPadding,lineHeight:Ie.lineHeight,cursor:"pointer",transition:`all ${Ie.motionDurationMid}`,borderRadius:Ie.borderRadiusSM,"&:hover":{background:Ie.controlItemBgHover},"&-disabled":{color:Ie.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Ht]:{color:Ie.colorTextDisabled}},[`&-active:not(${Jt}-disabled)`]:{"&, &:hover":{fontWeight:Ie.optionSelectedFontWeight,backgroundColor:Ie.optionSelectedBg}},"&-content":{flex:"auto"},[Ht]:{marginInlineStart:Ie.paddingXXS,color:Ie.colorTextDescription,fontSize:Ie.fontSizeIcon},"&-keyword":{color:Ie.colorHighlight}})}}}]},{[`${St}-dropdown-rtl`]:{direction:"rtl"}},(0,ho.c)(Ie)]};var ms=(0,Fo.Z)("Cascader",Ie=>[es(Ie)],Ie=>{const Re=Math.round((Ie.controlHeight-Ie.fontSize*Ie.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:Ie.controlItemBgActive,optionSelectedFontWeight:Ie.fontWeightStrong,optionPadding:`${Re}px ${Ie.paddingSM}px`,menuPadding:Ie.paddingXXS}}),Rs=function(Ie,Re){var St={};for(var xt in Ie)Object.prototype.hasOwnProperty.call(Ie,xt)&&Re.indexOf(xt)<0&&(St[xt]=Ie[xt]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,xt=Object.getOwnPropertySymbols(Ie);Jt<xt.length;Jt++)Re.indexOf(xt[Jt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,xt[Jt])&&(St[xt[Jt]]=Ie[xt[Jt]]);return St};const{SHOW_CHILD:Fs,SHOW_PARENT:os}=ki;function Ts(Ie,Re,St){const xt=Ie.toLowerCase().split(Re).reduce((Rt,fn,hn)=>hn===0?[fn]:[].concat((0,pe.Z)(Rt),[Re,fn]),[]),Jt=[];let Ht=0;return xt.forEach((Rt,fn)=>{const hn=Ht+Rt.length;let Mn=Ie.slice(Ht,hn);Ht=hn,fn%2===1&&(Mn=xe.createElement("span",{className:`${St}-menu-item-keyword`,key:`separator-${fn}`},Mn)),Jt.push(Mn)}),Jt}const Fa=(Ie,Re,St,xt)=>{const Jt=[],Ht=Ie.toLowerCase();return Re.forEach((Rt,fn)=>{fn!==0&&Jt.push(" / ");let hn=Rt[xt.label];const Mn=typeof hn;(Mn==="string"||Mn==="number")&&(hn=Ts(String(hn),Ht,St)),Jt.push(hn)}),Jt},Ni=xe.forwardRef((Ie,Re)=>{const{prefixCls:St,size:xt,disabled:Jt,className:Ht,rootClassName:Rt,multiple:fn,bordered:hn=!0,transitionName:Mn,choiceTransitionName:ur="",popupClassName:er,dropdownClassName:zr,expandIcon:sr,placement:Mr,showSearch:hr,allowClear:Kr=!0,notFoundContent:si,direction:yi,getPopupContainer:Ei,status:pi,showArrow:Ai,builtinPlacements:ei,style:Ti}=Ie,Ri=Rs(Ie,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),wr=(0,ro.Z)(Ri,["suffixIcon"]),{getPopupContainer:Dr,getPrefixCls:Ur,renderEmpty:Hi,direction:Di,popupOverflow:Bi,cascader:Ii}=xe.useContext(wo.E_),qi=yi||Di,aa=qi==="rtl",{status:ba,hasFeedback:Da,isFormItemInput:Wo,feedbackIcon:$a}=xe.useContext(Jo.aM),Lo=(0,oo.F)(ba,pi),vs=si||(Hi==null?void 0:Hi("Cascader"))||xe.createElement(Ho.Z,{componentName:"Cascader"}),_a=Ur(),mi=Ur("select",St),vi=Ur("cascader",St),[Pi,ui]=(0,Xo.Z)(mi),[Or]=ms(vi),{compactSize:gi,compactItemClassnames:ci}=(0,ji.ri)(mi,yi),Gi=Ee()(er||zr,`${vi}-dropdown`,{[`${vi}-dropdown-rtl`]:qi==="rtl"},Rt,ui),pa=xe.useMemo(()=>{if(!hr)return hr;let ss={render:Fa};return typeof hr=="object"&&(ss=Object.assign(Object.assign({},ss),hr)),ss},[hr]),Sa=(0,Co.Z)(ss=>{var Qo;return(Qo=xt!=null?xt:gi)!==null&&Qo!==void 0?Qo:ss}),Fi=xe.useContext(to.Z),Ha=Jt!=null?Jt:Fi;let Mo=sr;sr||(Mo=aa?xe.createElement(Fe.Z,null):xe.createElement(ge.Z,null));const go=xe.createElement("span",{className:`${mi}-menu-item-loading-icon`},xe.createElement(ct.Z,{spin:!0})),$o=xe.useMemo(()=>fn?xe.createElement("span",{className:`${vi}-checkbox-inner`}):!1,[fn]),ts=(0,No.Z)(Ie.suffixIcon,Ai),{suffixIcon:Ro,removeIcon:ks,clearIcon:xs}=(0,vo.Z)(Object.assign(Object.assign({},Ie),{hasFeedback:Da,feedbackIcon:$a,showSuffixIcon:ts,multiple:fn,prefixCls:mi,componentName:"Cascader"})),$s=xe.useMemo(()=>Mr!==void 0?Mr:aa?"bottomRight":"bottomLeft",[Mr,aa]),ns=(0,as.Z)(ei,Bi),zo=Kr===!0?{clearIcon:xs}:Kr,Ss=xe.createElement(ki,Object.assign({prefixCls:mi,className:Ee()(!St&&vi,{[`${mi}-lg`]:Sa==="large",[`${mi}-sm`]:Sa==="small",[`${mi}-rtl`]:aa,[`${mi}-borderless`]:!hn,[`${mi}-in-form-item`]:Wo},(0,oo.Z)(mi,Lo,Da),ci,Ii==null?void 0:Ii.className,Ht,Rt,ui),disabled:Ha,style:Object.assign(Object.assign({},Ii==null?void 0:Ii.style),Ti)},wr,{builtinPlacements:ns,direction:qi,placement:$s,notFoundContent:vs,allowClear:zo,showSearch:pa,expandIcon:Mo,suffixIcon:Ro,removeIcon:ks,loadingIcon:go,checkable:$o,dropdownClassName:Gi,dropdownPrefixCls:St||vi,choiceTransitionName:(0,ao.m)(_a,"",ur),transitionName:(0,ao.m)(_a,"slide-up",Mn),getPopupContainer:Ei||Dr,ref:Re}));return Or(Pi(Ss))}),Do=(0,eo.Z)(Ni);Ni.SHOW_PARENT=os,Ni.SHOW_CHILD=Fs,Ni._InternalPanelDoNotUseOrYouWillBeFired=Do;var Eo=Ni},63185:function(Cn,Vt,oe){"use strict";oe.d(Vt,{C2:function(){return ge}});var pe=oe(14747),xe=oe(45503),Fe=oe(67968);const ct=Me=>{const{checkboxCls:Ee}=Me,Ce=`${Ee}-wrapper`;return[{[`${Ee}-group`]:Object.assign(Object.assign({},(0,pe.Wf)(Me)),{display:"inline-flex",flexWrap:"wrap",columnGap:Me.marginXS,[`> ${Me.antCls}-row`]:{flex:1}}),[Ce]:Object.assign(Object.assign({},(0,pe.Wf)(Me)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Ce}`]:{marginInlineStart:0},[`&${Ce}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Ee]:Object.assign(Object.assign({},(0,pe.Wf)(Me)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Me.borderRadiusSM,alignSelf:"center",[`${Ee}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Ee}-inner`]:Object.assign({},(0,pe.oN)(Me))},[`${Ee}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Me.checkboxSize,height:Me.checkboxSize,direction:"ltr",backgroundColor:Me.colorBgContainer,border:`${Me.lineWidth}px ${Me.lineType} ${Me.colorBorder}`,borderRadius:Me.borderRadiusSM,borderCollapse:"separate",transition:`all ${Me.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Me.checkboxSize/14*5,height:Me.checkboxSize/14*8,border:`${Me.lineWidthBold}px solid ${Me.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Me.motionDurationFast} ${Me.motionEaseInBack}, opacity ${Me.motionDurationFast}`}},"& + span":{paddingInlineStart:Me.paddingXS,paddingInlineEnd:Me.paddingXS}})},{[`
${Ce}:not(${Ce}-disabled),
${Ee}:not(${Ee}-disabled)
`]:{[`&:hover ${Ee}-inner`]:{borderColor:Me.colorPrimary}},[`${Ce}:not(${Ce}-disabled)`]:{[`&:hover ${Ee}-checked:not(${Ee}-disabled) ${Ee}-inner`]:{backgroundColor:Me.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Ee}-checked:not(${Ee}-disabled):after`]:{borderColor:Me.colorPrimaryHover}}},{[`${Ee}-checked`]:{[`${Ee}-inner`]:{backgroundColor:Me.colorPrimary,borderColor:Me.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Me.motionDurationMid} ${Me.motionEaseOutBack} ${Me.motionDurationFast}`}}},[`
${Ce}-checked:not(${Ce}-disabled),
${Ee}-checked:not(${Ee}-disabled)
`]:{[`&:hover ${Ee}-inner`]:{backgroundColor:Me.colorPrimaryHover,borderColor:"transparent"}}},{[Ee]:{"&-indeterminate":{[`${Ee}-inner`]:{backgroundColor:Me.colorBgContainer,borderColor:Me.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Me.fontSizeLG/2,height:Me.fontSizeLG/2,backgroundColor:Me.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Ce}-disabled`]:{cursor:"not-allowed"},[`${Ee}-disabled`]:{[`&, ${Ee}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Ee}-inner`]:{background:Me.colorBgContainerDisabled,borderColor:Me.colorBorder,"&:after":{borderColor:Me.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Me.colorTextDisabled},[`&${Ee}-indeterminate ${Ee}-inner::after`]:{background:Me.colorTextDisabled}}}]};function ge(Me,Ee){const Ce=(0,xe.TS)(Ee,{checkboxCls:`.${Me}`,checkboxSize:Ee.controlInteractiveSize});return[ct(Ce)]}Vt.ZP=(0,Fe.Z)("Checkbox",(Me,Ee)=>{let{prefixCls:Ce}=Ee;return[ge(Ce,Me)]})},88258:function(Cn,Vt,oe){"use strict";var pe=oe(67294),xe=oe(53124),Fe=oe(32983);const ct=ge=>{const{componentName:Me}=ge,{getPrefixCls:Ee}=(0,pe.useContext)(xe.E_),Ce=Ee("empty");switch(Me){case"Table":case"List":return pe.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return pe.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ce}-small`});default:return pe.createElement(Fe.Z,null)}};Vt.Z=ct},96074:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Pe}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(67294),ct=oe(53124),ge=oe(14747),Me=oe(67968),Ee=oe(45503);const Ce=dt=>{const{componentCls:ot,sizePaddingEdgeHorizontal:lt,colorSplit:nt,lineWidth:_e,textPaddingInline:ht,orientationMargin:yt,verticalMarginInline:Ze}=dt;return{[ot]:Object.assign(Object.assign({},(0,ge.Wf)(dt)),{borderBlockStart:`${_e}px solid ${nt}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:Ze,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${_e}px solid ${nt}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${dt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${ot}-with-text`]:{display:"flex",alignItems:"center",margin:`${dt.dividerHorizontalWithTextGutterMargin}px 0`,color:dt.colorTextHeading,fontWeight:500,fontSize:dt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${nt}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${_e}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${ot}-with-text-left`]:{"&::before":{width:`${yt*100}%`},"&::after":{width:`${100-yt*100}%`}},[`&-horizontal${ot}-with-text-right`]:{"&::before":{width:`${100-yt*100}%`},"&::after":{width:`${yt*100}%`}},[`${ot}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:ht},"&-dashed":{background:"none",borderColor:nt,borderStyle:"dashed",borderWidth:`${_e}px 0 0`},[`&-horizontal${ot}-with-text${ot}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${ot}-dashed`]:{borderInlineStartWidth:_e,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${ot}-with-text`]:{color:dt.colorText,fontWeight:"normal",fontSize:dt.fontSize},[`&-horizontal${ot}-with-text-left${ot}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${ot}-inner-text`]:{paddingInlineStart:lt}},[`&-horizontal${ot}-with-text-right${ot}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${ot}-inner-text`]:{paddingInlineEnd:lt}}})}};var he=(0,Me.Z)("Divider",dt=>{const ot=(0,Ee.TS)(dt,{dividerHorizontalWithTextGutterMargin:dt.margin,dividerHorizontalGutterMargin:dt.marginLG,sizePaddingEdgeHorizontal:0});return[Ce(ot)]},dt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:dt.marginXS})),ke=function(dt,ot){var lt={};for(var nt in dt)Object.prototype.hasOwnProperty.call(dt,nt)&&ot.indexOf(nt)<0&&(lt[nt]=dt[nt]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,nt=Object.getOwnPropertySymbols(dt);_e<nt.length;_e++)ot.indexOf(nt[_e])<0&&Object.prototype.propertyIsEnumerable.call(dt,nt[_e])&&(lt[nt[_e]]=dt[nt[_e]]);return lt},Pe=dt=>{const{getPrefixCls:ot,direction:lt,divider:nt}=Fe.useContext(ct.E_),{prefixCls:_e,type:ht="horizontal",orientation:yt="center",orientationMargin:Ze,className:Qe,rootClassName:be,children:we,dashed:Ke,plain:Ge,style:vt}=dt,pt=ke(dt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),Ue=ot("divider",_e),[et,kt]=he(Ue),it=yt.length>0?`-${yt}`:yt,st=!!we,We=yt==="left"&&Ze!=null,Tt=yt==="right"&&Ze!=null,Ut=xe()(Ue,nt==null?void 0:nt.className,kt,`${Ue}-${ht}`,{[`${Ue}-with-text`]:st,[`${Ue}-with-text${it}`]:st,[`${Ue}-dashed`]:!!Ke,[`${Ue}-plain`]:!!Ge,[`${Ue}-rtl`]:lt==="rtl",[`${Ue}-no-default-orientation-margin-left`]:We,[`${Ue}-no-default-orientation-margin-right`]:Tt},Qe,be),Qt=Fe.useMemo(()=>typeof Ze=="number"?Ze:/^\d+$/.test(Ze)?Number(Ze):Ze,[Ze]),Xe=Object.assign(Object.assign({},We&&{marginLeft:Qt}),Tt&&{marginRight:Qt});return et(Fe.createElement("div",Object.assign({className:Ut,style:Object.assign(Object.assign({},nt==null?void 0:nt.style),vt)},pt,{role:"separator"}),we&&ht!=="vertical"&&Fe.createElement("span",{className:`${Ue}-inner-text`,style:Xe},we)))}},72565:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Vi}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(1413),ct=oe(97685),ge=oe(67294),Me=oe(73935);function Ee(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ce={};function he(At,Mt){}function ke(At,Mt){}function Je(){Ce={}}function Pe(At,Mt,tn){!Mt&&!Ce[tn]&&(At(!1,tn),Ce[tn]=!0)}function dt(At,Mt){Pe(he,At,Mt)}function ot(At,Mt){Pe(ke,At,Mt)}var lt=null,nt=oe(71002),_e=oe(18459);function ht(At,Mt,tn){var Sn=ge.useRef({});return(!("value"in Sn.current)||tn(Sn.current.condition,Mt))&&(Sn.current.value=At(),Sn.current.condition=Mt),Sn.current.value}function yt(At,Mt){typeof At=="function"?At(Mt):(0,nt.Z)(At)==="object"&&At&&"current"in At&&(At.current=Mt)}function Ze(){for(var At=arguments.length,Mt=new Array(At),tn=0;tn<At;tn++)Mt[tn]=arguments[tn];var Sn=Mt.filter(function(Kn){return Kn});return Sn.length<=1?Sn[0]:function(Kn){Mt.forEach(function(Zr){yt(Zr,Kn)})}}function Qe(){for(var At=arguments.length,Mt=new Array(At),tn=0;tn<At;tn++)Mt[tn]=arguments[tn];return ht(function(){return Ze.apply(void 0,Mt)},Mt,function(Sn,Kn){return Sn.length===Kn.length&&Sn.every(function(Zr,Nr){return Zr===Kn[Nr]})})}function be(At){var Mt,tn,Sn=(0,_e.isMemo)(At)?At.type.type:At.type;return!(typeof Sn=="function"&&!((Mt=Sn.prototype)!==null&&Mt!==void 0&&Mt.render)||typeof At=="function"&&!((tn=At.prototype)!==null&&tn!==void 0&&tn.render))}var we=ge.createContext(null),Ke=we,Ge=oe(74902),vt=Ee()?ge.useLayoutEffect:ge.useEffect,pt=vt,Ue=function(Mt,tn){var Sn=React.useRef(!0);vt(function(){if(!Sn.current)return Mt()},tn),vt(function(){return Sn.current=!1,function(){Sn.current=!0}},[])},et=[];function kt(At,Mt){var tn=ge.useState(function(){if(!Ee())return null;var Na=document.createElement("div");return Na}),Sn=(0,ct.Z)(tn,1),Kn=Sn[0],Zr=ge.useRef(!1),Nr=ge.useContext(Ke),qr=ge.useState(et),li=(0,ct.Z)(qr,2),Jr=li[0],Ki=li[1],ea=Nr||(Zr.current?void 0:function(Na){Ki(function(Ra){var Be=[Na].concat((0,Ge.Z)(Ra));return Be})});function ha(){Kn.parentElement||document.body.appendChild(Kn),Zr.current=!0}function Za(){var Na;(Na=Kn.parentElement)===null||Na===void 0||Na.removeChild(Kn),Zr.current=!1}return pt(function(){return At?Nr?Nr(ha):ha():Za(),Za},[At]),pt(function(){Jr.length&&(Jr.forEach(function(Na){return Na()}),Ki(et))},[Jr]),[Kn,ea]}function it(At,Mt){if(!At)return!1;if(At.contains)return At.contains(Mt);for(var tn=Mt;tn;){if(tn===At)return!0;tn=tn.parentNode}return!1}var st="data-rc-order",We="rc-util-key",Tt=new Map;function Ut(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=At.mark;return Mt?Mt.startsWith("data-")?Mt:"data-".concat(Mt):We}function Qt(At){if(At.attachTo)return At.attachTo;var Mt=document.querySelector("head");return Mt||document.body}function Xe(At){return At==="queue"?"prependQueue":At?"prepend":"append"}function Ae(At){return Array.from((Tt.get(At)||At).children).filter(function(Mt){return Mt.tagName==="STYLE"})}function Lt(At){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Ee())return null;var tn=Mt.csp,Sn=Mt.prepend,Kn=document.createElement("style");Kn.setAttribute(st,Xe(Sn)),tn!=null&&tn.nonce&&(Kn.nonce=tn==null?void 0:tn.nonce),Kn.innerHTML=At;var Zr=Qt(Mt),Nr=Zr.firstChild;if(Sn){if(Sn==="queue"){var qr=Ae(Zr).filter(function(li){return["prepend","prependQueue"].includes(li.getAttribute(st))});if(qr.length)return Zr.insertBefore(Kn,qr[qr.length-1].nextSibling),Kn}Zr.insertBefore(Kn,Nr)}else Zr.appendChild(Kn);return Kn}function cn(At){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tn=Qt(Mt);return Ae(tn).find(function(Sn){return Sn.getAttribute(Ut(Mt))===At})}function an(At){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tn=cn(At,Mt);if(tn){var Sn=Qt(Mt);Sn.removeChild(tn)}}function ft(At,Mt){var tn=Tt.get(At);if(!tn||!it(document,tn)){var Sn=Lt("",Mt),Kn=Sn.parentNode;Tt.set(At,Kn),At.removeChild(Sn)}}function mt(){Tt.clear()}function Yt(At,Mt){var tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Sn=Qt(tn);ft(Sn,tn);var Kn=cn(Mt,tn);if(Kn){var Zr,Nr;if((Zr=tn.csp)!==null&&Zr!==void 0&&Zr.nonce&&Kn.nonce!==((Nr=tn.csp)===null||Nr===void 0?void 0:Nr.nonce)){var qr;Kn.nonce=(qr=tn.csp)===null||qr===void 0?void 0:qr.nonce}return Kn.innerHTML!==At&&(Kn.innerHTML=At),Kn}var li=Lt(At,tn);return li.setAttribute(Ut(tn),Mt),li}var An;function dn(At){if(typeof document=="undefined")return 0;if(At||An===void 0){var Mt=document.createElement("div");Mt.style.width="100%",Mt.style.height="200px";var tn=document.createElement("div"),Sn=tn.style;Sn.position="absolute",Sn.top="0",Sn.left="0",Sn.pointerEvents="none",Sn.visibility="hidden",Sn.width="200px",Sn.height="150px",Sn.overflow="hidden",tn.appendChild(Mt),document.body.appendChild(tn);var Kn=Mt.offsetWidth;tn.style.overflow="scroll";var Zr=Mt.offsetWidth;Kn===Zr&&(Zr=tn.clientWidth),document.body.removeChild(tn),An=Kn-Zr}return An}function nn(At){var Mt=At.match(/^(.*)px$/),tn=Number(Mt==null?void 0:Mt[1]);return Number.isNaN(tn)?dn():tn}function jt(At){if(typeof document=="undefined"||!At||!(At instanceof Element))return{width:0,height:0};var Mt=getComputedStyle(At,"::-webkit-scrollbar"),tn=Mt.width,Sn=Mt.height;return{width:nn(tn),height:nn(Sn)}}function xn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var vn="rc-util-locker-".concat(Date.now()),Te=0;function ue(At){var Mt=!!At,tn=ge.useState(function(){return Te+=1,"".concat(vn,"_").concat(Te)}),Sn=(0,ct.Z)(tn,1),Kn=Sn[0];pt(function(){if(Mt){var Zr=jt(document.body).width,Nr=xn();Yt(`
html body {
overflow-y: hidden;
`.concat(Nr?"width: calc(100% - ".concat(Zr,"px);"):"",`
}`),Kn)}else an(Kn);return function(){an(Kn)}},[Mt,Kn])}var le=!1;function me(At){return typeof At=="boolean"&&(le=At),le}var fe=function(Mt){return Mt===!1?!1:!Ee()||!Mt?null:typeof Mt=="string"?document.querySelector(Mt):typeof Mt=="function"?Mt():Mt},se=ge.forwardRef(function(At,Mt){var tn=At.open,Sn=At.autoLock,Kn=At.getContainer,Zr=At.debug,Nr=At.autoDestroy,qr=Nr===void 0?!0:Nr,li=At.children,Jr=ge.useState(tn),Ki=(0,ct.Z)(Jr,2),ea=Ki[0],ha=Ki[1],Za=ea||tn;ge.useEffect(function(){(qr||tn)&&ha(tn)},[tn,qr]);var Na=ge.useState(function(){return fe(Kn)}),Ra=(0,ct.Z)(Na,2),Be=Ra[0],Ve=Ra[1];ge.useEffect(function(){var En=fe(Kn);Ve(En!=null?En:null)});var He=kt(Za&&!Be,Zr),tt=(0,ct.Z)(He,2),gt=tt[0],Ct=tt[1],It=Be!=null?Be:gt;ue(Sn&&tn&&Ee()&&(It===gt||It===document.body));var ln=null;if(li&&be(li)&&Mt){var mn=li;ln=mn.ref}var Yn=Qe(ln,Mt);if(!Za||!Ee()||Be===void 0)return null;var yr=It===!1||me(),Vn=li;return Mt&&(Vn=ge.cloneElement(li,{ref:Yn})),ge.createElement(Ke.Provider,{value:Ct},yr?Vn:(0,Me.createPortal)(Vn,It))}),Oe=se,rt=Oe;function Pt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var zt=Pt()?ge.useLayoutEffect:ge.useEffect,Zt=function(Mt,tn){var Sn=ge.useRef(!0);zt(function(){return Mt(Sn.current)},tn),zt(function(){return Sn.current=!1,function(){Sn.current=!0}},[])},en=function(Mt,tn){Zt(function(Sn){if(!Sn)return Mt()},tn)},Gt=Zt,tr=ge.createContext(null),cr=ge.createContext({}),Wt=tr,bn=oe(4942),lr=oe(87462),Wr=oe(62874),Rn={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 tn=Mt.keyCode;if(Mt.altKey&&!Mt.ctrlKey||Mt.metaKey||tn>=Rn.F1&&tn<=Rn.F12)return!1;switch(tn){case Rn.ALT:case Rn.CAPS_LOCK:case Rn.CONTEXT_MENU:case Rn.CTRL:case Rn.DOWN:case Rn.END:case Rn.ESC:case Rn.HOME:case Rn.INSERT:case Rn.LEFT:case Rn.MAC_FF_META:case Rn.META:case Rn.NUMLOCK:case Rn.NUM_CENTER:case Rn.PAGE_DOWN:case Rn.PAGE_UP:case Rn.PAUSE:case Rn.PRINT_SCREEN:case Rn.RIGHT:case Rn.SHIFT:case Rn.UP:case Rn.WIN_KEY:case Rn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Mt){if(Mt>=Rn.ZERO&&Mt<=Rn.NINE||Mt>=Rn.NUM_ZERO&&Mt<=Rn.NUM_MULTIPLY||Mt>=Rn.A&&Mt<=Rn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Mt===0)return!0;switch(Mt){case Rn.SPACE:case Rn.QUESTION_MARK:case Rn.NUM_PLUS:case Rn.NUM_MINUS:case Rn.NUM_PERIOD:case Rn.NUM_DIVISION:case Rn.SEMICOLON:case Rn.DASH:case Rn.EQUALS:case Rn.COMMA:case Rn.PERIOD:case Rn.SLASH:case Rn.APOSTROPHE:case Rn.SINGLE_QUOTE:case Rn.OPEN_SQUARE_BRACKET:case Rn.BACKSLASH:case Rn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Tr=Rn,Ca=`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`,Wi=`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`,Li="".concat(Ca," ").concat(Wi).split(/[\s\n]+/),Mi="aria-",Ji="data-";function Zi(At,Mt){return At.indexOf(Mt)===0}function Ea(At){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tn;Mt===!1?tn={aria:!0,data:!0,attr:!0}:Mt===!0?tn={aria:!0}:tn=(0,Fe.Z)({},Mt);var Sn={};return Object.keys(At).forEach(function(Kn){(tn.aria&&(Kn==="role"||Zi(Kn,Mi))||tn.data&&Zi(Kn,Ji)||tn.attr&&Li.includes(Kn))&&(Sn[Kn]=At[Kn])}),Sn}function Ma(At){var Mt=React.useRef();Mt.current=At;var tn=React.useCallback(function(){for(var Sn,Kn=arguments.length,Zr=new Array(Kn),Nr=0;Nr<Kn;Nr++)Zr[Nr]=arguments[Nr];return(Sn=Mt.current)===null||Sn===void 0?void 0:Sn.call.apply(Sn,[Mt].concat(Zr))},[]);return tn}function Gr(At){var Mt=React.useRef(!1),tn=React.useState(At),Sn=_slicedToArray(tn,2),Kn=Sn[0],Zr=Sn[1];React.useEffect(function(){return Mt.current=!1,function(){Mt.current=!0}},[]);function Nr(qr,li){li&&Mt.current||Zr(qr)}return[Kn,Nr]}function Va(At){return At!==void 0}function no(At,Mt){var tn=Mt||{},Sn=tn.defaultValue,Kn=tn.value,Zr=tn.onChange,Nr=tn.postState,qr=useState(function(){return Va(Kn)?Kn:Va(Sn)?typeof Sn=="function"?Sn():Sn:typeof At=="function"?At():At}),li=_slicedToArray(qr,2),Jr=li[0],Ki=li[1],ea=Kn!==void 0?Kn:Jr,ha=Nr?Nr(ea):ea,Za=useEvent(Zr),Na=useState([ea]),Ra=_slicedToArray(Na,2),Be=Ra[0],Ve=Ra[1];useLayoutUpdateEffect(function(){var tt=Be[0];Jr!==tt&&Za(Jr,tt)},[Be]),useLayoutUpdateEffect(function(){Va(Kn)||Ki(Kn)},[Kn]);var He=useEvent(function(tt,gt){Ki(tt,gt),Ve([ea],gt)});return[ha,He]}var po=oe(33993);function mo(At,Mt,tn){var Sn=ge.useRef({});return(!("value"in Sn.current)||tn(Sn.current.condition,Mt))&&(Sn.current.value=At(),Sn.current.condition=Mt),Sn.current.value}function Pa(At,Mt){typeof At=="function"?At(Mt):(0,nt.Z)(At)==="object"&&At&&"current"in At&&(At.current=Mt)}function Bt(){for(var At=arguments.length,Mt=new Array(At),tn=0;tn<At;tn++)Mt[tn]=arguments[tn];var Sn=Mt.filter(function(Kn){return Kn});return Sn.length<=1?Sn[0]:function(Kn){Mt.forEach(function(Zr){Pa(Zr,Kn)})}}function On(){for(var At=arguments.length,Mt=new Array(At),tn=0;tn<At;tn++)Mt[tn]=arguments[tn];return mo(function(){return Bt.apply(void 0,Mt)},Mt,function(Sn,Kn){return Sn.length!==Kn.length||Sn.every(function(Zr,Nr){return Zr!==Kn[Nr]})})}function Fn(At){var Mt,tn,Sn=isMemo(At)?At.type.type:At.type;return!(typeof Sn=="function"&&!((Mt=Sn.prototype)!==null&&Mt!==void 0&&Mt.render)||typeof At=="function"&&!((tn=At.prototype)!==null&&tn!==void 0&&tn.render))}function $n(At){return!isValidElement(At)||isFragment(At)?!1:Fn(At)}function Ir(At,Mt,tn,Sn){if(!Mt.length)return tn;var Kn=_toArray(Mt),Zr=Kn[0],Nr=Kn.slice(1),qr;return!At&&typeof Zr=="number"?qr=[]:Array.isArray(At)?qr=_toConsumableArray(At):qr=_objectSpread({},At),Sn&&tn===void 0&&Nr.length===1?delete qr[Zr][Nr[0]]:qr[Zr]=Ir(qr[Zr],Nr,tn,Sn),qr}function or(At,Mt,tn){var Sn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Mt.length&&Sn&&tn===void 0&&!get(At,Mt.slice(0,-1))?At:Ir(At,Mt,tn,Sn)}function Sr(At){return _typeof(At)==="object"&&At!==null&&Object.getPrototypeOf(At)===Object.prototype}function Zn(At){return Array.isArray(At)?[]:{}}var ut=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function bt(){for(var At=arguments.length,Mt=new Array(At),tn=0;tn<At;tn++)Mt[tn]=arguments[tn];var Sn=Zn(Mt[0]);return Mt.forEach(function(Kn){function Zr(Nr,qr){var li=new Set(qr),Jr=get(Kn,Nr),Ki=Array.isArray(Jr);if(Ki||Sr(Jr)){if(!li.has(Jr)){li.add(Jr);var ea=get(Sn,Nr);Ki?Sn=or(Sn,Nr,[]):(!ea||_typeof(ea)!=="object")&&(Sn=or(Sn,Nr,Zn(Jr))),ut(Jr).forEach(function(ha){Zr([].concat(_toConsumableArray(Nr),[ha]),li)})}}else Sn=or(Sn,Nr,Jr)}Zr([])}),Sn}var Ft={},qt=[],qe=function(Mt){qt.push(Mt)};function _t(At,Mt){if(0)var tn}function Xt(At,Mt){if(0)var tn}function Kt(){Ft={}}function on(At,Mt,tn){!Mt&&!Ft[tn]&&(At(!1,tn),Ft[tn]=!0)}function rn(At,Mt){on(_t,At,Mt)}function Un(At,Mt){on(Xt,At,Mt)}rn.preMessage=qe,rn.resetWarned=Kt,rn.noteOnce=Un;var Ar=rn,rr=function(Mt){var tn=Mt.prefixCls,Sn=Mt.className,Kn=Mt.style,Zr=Mt.children,Nr=Mt.containerRef,qr=Mt.id,li=Mt.onMouseEnter,Jr=Mt.onMouseOver,Ki=Mt.onMouseLeave,ea=Mt.onClick,ha=Mt.onKeyDown,Za=Mt.onKeyUp,Na={onMouseEnter:li,onMouseOver:Jr,onMouseLeave:Ki,onClick:ea,onKeyDown:ha,onKeyUp:Za},Ra=ge.useContext(cr),Be=Ra.panel,Ve=On(Be,Nr);return ge.createElement(ge.Fragment,null,ge.createElement("div",(0,lr.Z)({id:qr,className:xe()("".concat(tn,"-content"),Sn),style:(0,Fe.Z)({},Kn),"aria-modal":"true",role:"dialog",ref:Ve},Na),Zr))},ir=rr;function mr(At){return typeof At=="string"&&String(Number(At))===At?(Ar(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(At)):At}function br(At){warning(!("wrapperClassName"in At),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!At.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Yr={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function _n(At,Mt){var tn,Sn,Kn,Zr,Nr=At.prefixCls,qr=At.open,li=At.placement,Jr=At.inline,Ki=At.push,ea=At.forceRender,ha=At.autoFocus,Za=At.keyboard,Na=At.rootClassName,Ra=At.rootStyle,Be=At.zIndex,Ve=At.className,He=At.id,tt=At.style,gt=At.motion,Ct=At.width,It=At.height,ln=At.children,mn=At.contentWrapperStyle,Yn=At.mask,yr=At.maskClosable,Vn=At.maskMotion,En=At.maskClassName,wn=At.maskStyle,In=At.afterOpenChange,Bn=At.onClose,pr=At.onMouseEnter,Xn=At.onMouseOver,jn=At.onMouseLeave,nr=At.onClick,qn=At.onKeyDown,dr=At.onKeyUp,je=ge.useRef(),Ye=ge.useRef(),$t=ge.useRef();ge.useImperativeHandle(Mt,function(){return je.current});var Dt=function(Fr){var ai=Fr.keyCode,hi=Fr.shiftKey;switch(ai){case Tr.TAB:{if(ai===Tr.TAB){if(!hi&&document.activeElement===$t.current){var $r;($r=Ye.current)===null||$r===void 0||$r.focus({preventScroll:!0})}else if(hi&&document.activeElement===Ye.current){var wi;(wi=$t.current)===null||wi===void 0||wi.focus({preventScroll:!0})}}break}case Tr.ESC:{Bn&&Za&&(Fr.stopPropagation(),Bn(Fr));break}}};ge.useEffect(function(){if(qr&&ha){var Cr;(Cr=je.current)===null||Cr===void 0||Cr.focus({preventScroll:!0})}},[qr]);var sn=ge.useState(!1),kn=(0,ct.Z)(sn,2),yn=kn[0],zn=kn[1],Pn=ge.useContext(Wt),pn;Ki===!1?pn={distance:0}:Ki===!0?pn={}:pn=Ki||{};var Nn=(tn=(Sn=(Kn=pn)===null||Kn===void 0?void 0:Kn.distance)!==null&&Sn!==void 0?Sn:Pn==null?void 0:Pn.pushDistance)!==null&&tn!==void 0?tn:180,Wn=ge.useMemo(function(){return{pushDistance:Nn,push:function(){zn(!0)},pull:function(){zn(!1)}}},[Nn]);ge.useEffect(function(){if(qr){var Cr;Pn==null||(Cr=Pn.push)===null||Cr===void 0||Cr.call(Pn)}else{var Fr;Pn==null||(Fr=Pn.pull)===null||Fr===void 0||Fr.call(Pn)}},[qr]),ge.useEffect(function(){return function(){var Cr;Pn==null||(Cr=Pn.pull)===null||Cr===void 0||Cr.call(Pn)}},[]);var vr=Yn&&ge.createElement(Wr.Z,(0,lr.Z)({key:"mask"},Vn,{visible:qr}),function(Cr,Fr){var ai=Cr.className,hi=Cr.style;return ge.createElement("div",{className:xe()("".concat(Nr,"-mask"),ai,En),style:(0,Fe.Z)((0,Fe.Z)({},hi),wn),onClick:yr&&qr?Bn:void 0,ref:Fr})}),Hn=typeof gt=="function"?gt(li):gt,Er={};if(yn&&Nn)switch(li){case"top":Er.transform="translateY(".concat(Nn,"px)");break;case"bottom":Er.transform="translateY(".concat(-Nn,"px)");break;case"left":Er.transform="translateX(".concat(Nn,"px)");break;default:Er.transform="translateX(".concat(-Nn,"px)");break}li==="left"||li==="right"?Er.width=mr(Ct):Er.height=mr(It);var Qr={onMouseEnter:pr,onMouseOver:Xn,onMouseLeave:jn,onClick:nr,onKeyDown:qn,onKeyUp:dr},Rr=ge.createElement(Wr.Z,(0,lr.Z)({key:"panel"},Hn,{visible:qr,forceRender:ea,onVisibleChanged:function(Fr){In==null||In(Fr)},removeOnLeave:!1,leavedClassName:"".concat(Nr,"-content-wrapper-hidden")}),function(Cr,Fr){var ai=Cr.className,hi=Cr.style;return ge.createElement("div",(0,lr.Z)({className:xe()("".concat(Nr,"-content-wrapper"),ai),style:(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Er),hi),mn)},Ea(At,{data:!0})),ge.createElement(ir,(0,lr.Z)({id:He,containerRef:Fr,prefixCls:Nr,className:Ve,style:tt},Qr),ln))}),jr=(0,Fe.Z)({},Ra);return Be&&(jr.zIndex=Be),ge.createElement(Wt.Provider,{value:Wn},ge.createElement("div",{className:xe()(Nr,"".concat(Nr,"-").concat(li),Na,(Zr={},(0,bn.Z)(Zr,"".concat(Nr,"-open"),qr),(0,bn.Z)(Zr,"".concat(Nr,"-inline"),Jr),Zr)),style:jr,tabIndex:-1,ref:je,onKeyDown:Dt},vr,ge.createElement("div",{tabIndex:0,ref:Ye,style:Yr,"aria-hidden":"true","data-sentinel":"start"}),Rr,ge.createElement("div",{tabIndex:0,ref:$t,style:Yr,"aria-hidden":"true","data-sentinel":"end"})))}var Qn=ge.forwardRef(_n),na=Qn,ca=function(Mt){var tn=Mt.open,Sn=tn===void 0?!1:tn,Kn=Mt.prefixCls,Zr=Kn===void 0?"rc-drawer":Kn,Nr=Mt.placement,qr=Nr===void 0?"right":Nr,li=Mt.autoFocus,Jr=li===void 0?!0:li,Ki=Mt.keyboard,ea=Ki===void 0?!0:Ki,ha=Mt.width,Za=ha===void 0?378:ha,Na=Mt.mask,Ra=Na===void 0?!0:Na,Be=Mt.maskClosable,Ve=Be===void 0?!0:Be,He=Mt.getContainer,tt=Mt.forceRender,gt=Mt.afterOpenChange,Ct=Mt.destroyOnClose,It=Mt.onMouseEnter,ln=Mt.onMouseOver,mn=Mt.onMouseLeave,Yn=Mt.onClick,yr=Mt.onKeyDown,Vn=Mt.onKeyUp,En=Mt.panelRef,wn=ge.useState(!1),In=(0,ct.Z)(wn,2),Bn=In[0],pr=In[1],Xn=ge.useState(!1),jn=(0,ct.Z)(Xn,2),nr=jn[0],qn=jn[1];Gt(function(){qn(!0)},[]);var dr=nr?Sn:!1,je=ge.useRef(),Ye=ge.useRef();Gt(function(){dr&&(Ye.current=document.activeElement)},[dr]);var $t=function(zn){var Pn;if(pr(zn),gt==null||gt(zn),!zn&&Ye.current&&!((Pn=je.current)!==null&&Pn!==void 0&&Pn.contains(Ye.current))){var pn;(pn=Ye.current)===null||pn===void 0||pn.focus({preventScroll:!0})}},Dt=ge.useMemo(function(){return{panel:En}},[En]);if(!tt&&!Bn&&!dr&&Ct)return null;var sn={onMouseEnter:It,onMouseOver:ln,onMouseLeave:mn,onClick:Yn,onKeyDown:yr,onKeyUp:Vn},kn=(0,Fe.Z)((0,Fe.Z)({},Mt),{},{open:dr,prefixCls:Zr,placement:qr,autoFocus:Jr,keyboard:ea,width:Za,mask:Ra,maskClosable:Ve,inline:He===!1,afterOpenChange:$t,ref:je},sn);return ge.createElement(cr.Provider,{value:Dt},ge.createElement(rt,{open:dr||tt||Bn,autoDestroy:!1,getContainer:He,autoLock:Ra&&(dr||Bn)},ge.createElement(na,kn)))},_i=ca,ii=_i,va=oe(33603),_r=oe(53124),Qi=oe(65223),Tn=oe(69760),xa=At=>{const{prefixCls:Mt,title:tn,footer:Sn,extra:Kn,closeIcon:Zr,closable:Nr,onClose:qr,headerStyle:li,drawerStyle:Jr,bodyStyle:Ki,footerStyle:ea,children:ha}=At,Za=ge.useCallback(He=>ge.createElement("button",{type:"button",onClick:qr,"aria-label":"Close",className:`${Mt}-close`},He),[qr]),[Na,Ra]=(0,Tn.Z)(Nr,Zr,Za,void 0,!0),Be=ge.useMemo(()=>!tn&&!Na?null:ge.createElement("div",{style:li,className:xe()(`${Mt}-header`,{[`${Mt}-header-close-only`]:Na&&!tn&&!Kn})},ge.createElement("div",{className:`${Mt}-header-title`},Ra,tn&&ge.createElement("div",{className:`${Mt}-title`},tn)),Kn&&ge.createElement("div",{className:`${Mt}-extra`},Kn)),[Na,Ra,Kn,li,Mt,tn]),Ve=ge.useMemo(()=>{if(!Sn)return null;const He=`${Mt}-footer`;return ge.createElement("div",{className:He,style:ea},Sn)},[Sn,ea,Mt]);return ge.createElement("div",{className:`${Mt}-wrapper-body`,style:Jr},Be,ge.createElement("div",{className:`${Mt}-body`,style:Ki},ha),Ve)},uo=oe(4173),ja=oe(67968),ka=oe(45503),za=At=>{const{componentCls:Mt,motionDurationSlow:tn}=At,Sn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${tn}`}}};return{[Mt]:{[`${Mt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${tn}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Mt}-panel-motion`]:{"&-left":[Sn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[Sn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[Sn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[Sn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const fa=At=>{const{componentCls:Mt,zIndexPopup:tn,colorBgMask:Sn,colorBgElevated:Kn,motionDurationSlow:Zr,motionDurationMid:Nr,padding:qr,paddingLG:li,fontSizeLG:Jr,lineHeightLG:Ki,lineWidth:ea,lineType:ha,colorSplit:Za,marginSM:Na,colorIcon:Ra,colorIconHover:Be,colorText:Ve,fontWeightStrong:He,footerPaddingBlock:tt,footerPaddingInline:gt}=At,Ct=`${Mt}-content-wrapper`;return{[Mt]:{position:"fixed",inset:0,zIndex:tn,pointerEvents:"none","&-pure":{position:"relative",background:Kn,[`&${Mt}-left`]:{boxShadow:At.boxShadowDrawerLeft},[`&${Mt}-right`]:{boxShadow:At.boxShadowDrawerRight},[`&${Mt}-top`]:{boxShadow:At.boxShadowDrawerUp},[`&${Mt}-bottom`]:{boxShadow:At.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Mt}-mask`]:{position:"absolute",inset:0,zIndex:tn,background:Sn,pointerEvents:"auto"},[Ct]:{position:"absolute",zIndex:tn,maxWidth:"100vw",transition:`all ${Zr}`,"&-hidden":{display:"none"}},[`&-left > ${Ct}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:At.boxShadowDrawerLeft},[`&-right > ${Ct}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:At.boxShadowDrawerRight},[`&-top > ${Ct}`]:{top:0,insetInline:0,boxShadow:At.boxShadowDrawerUp},[`&-bottom > ${Ct}`]:{bottom:0,insetInline:0,boxShadow:At.boxShadowDrawerDown},[`${Mt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Kn,pointerEvents:"auto"},[`${Mt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Mt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${qr}px ${li}px`,fontSize:Jr,lineHeight:Ki,borderBottom:`${ea}px ${ha} ${Za}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Mt}-extra`]:{flex:"none"},[`${Mt}-close`]:{display:"inline-block",marginInlineEnd:Na,color:Ra,fontWeight:He,fontSize:Jr,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Nr}`,textRendering:"auto","&:focus, &:hover":{color:Be,textDecoration:"none"}},[`${Mt}-title`]:{flex:1,margin:0,color:Ve,fontWeight:At.fontWeightStrong,fontSize:Jr,lineHeight:Ki},[`${Mt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:li,overflow:"auto"},[`${Mt}-footer`]:{flexShrink:0,padding:`${tt}px ${gt}px`,borderTop:`${ea}px ${ha} ${Za}`},"&-rtl":{direction:"rtl"}}}};var Ya=(0,ja.Z)("Drawer",At=>{const Mt=(0,ka.TS)(At,{});return[fa(Mt),za(Mt)]},At=>({zIndexPopup:At.zIndexPopupBase,footerPaddingBlock:At.paddingXS,footerPaddingInline:At.padding})),_o=oe(16569),qa=function(At,Mt){var tn={};for(var Sn in At)Object.prototype.hasOwnProperty.call(At,Sn)&&Mt.indexOf(Sn)<0&&(tn[Sn]=At[Sn]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Kn=0,Sn=Object.getOwnPropertySymbols(At);Kn<Sn.length;Kn++)Mt.indexOf(Sn[Kn])<0&&Object.prototype.propertyIsEnumerable.call(At,Sn[Kn])&&(tn[Sn[Kn]]=At[Sn[Kn]]);return tn};const Oa=null,So={distance:180},To=At=>{var Mt;const{rootClassName:tn,width:Sn,height:Kn,size:Zr="default",mask:Nr=!0,push:qr=So,open:li,afterOpenChange:Jr,onClose:Ki,prefixCls:ea,getContainer:ha,style:Za,className:Na,visible:Ra,afterVisibleChange:Be}=At,Ve=qa(At,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:He,getPrefixCls:tt,direction:gt,drawer:Ct}=ge.useContext(_r.E_),It=tt("drawer",ea),[ln,mn]=Ya(It),Yn=ha===void 0&&He?()=>He(document.body):ha,yr=xe()({"no-mask":!Nr,[`${It}-rtl`]:gt==="rtl"},tn,mn),Vn=ge.useMemo(()=>Sn!=null?Sn:Zr==="large"?736:378,[Sn,Zr]),En=ge.useMemo(()=>Kn!=null?Kn:Zr==="large"?736:378,[Kn,Zr]),wn={motionName:(0,va.m)(It,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},In=pr=>({motionName:(0,va.m)(It,`panel-motion-${pr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Bn=(0,_o.H)();return ln(ge.createElement(uo.BR,null,ge.createElement(Qi.Ux,{status:!0,override:!0},ge.createElement(ii,Object.assign({prefixCls:It,onClose:Ki,maskMotion:wn,motion:In},Ve,{open:li!=null?li:Ra,mask:Nr,push:qr,width:Vn,height:En,style:Object.assign(Object.assign({},Ct==null?void 0:Ct.style),Za),className:xe()(Ct==null?void 0:Ct.className,Na),rootClassName:yr,getContainer:Yn,afterOpenChange:Jr!=null?Jr:Be,panelRef:Bn}),ge.createElement(xa,Object.assign({prefixCls:It},Ve,{onClose:Ki}))))))},fo=At=>{const{prefixCls:Mt,style:tn,className:Sn,placement:Kn="right"}=At,Zr=qa(At,["prefixCls","style","className","placement"]),{getPrefixCls:Nr}=ge.useContext(_r.E_),qr=Nr("drawer",Mt),[li,Jr]=Ya(qr),Ki=xe()(qr,`${qr}-pure`,`${qr}-${Kn}`,Jr,Sn);return li(ge.createElement("div",{className:Ki,style:tn},ge.createElement(xa,Object.assign({prefixCls:qr},Zr))))};To._InternalPanelDoNotUseOrYouWillBeFired=fo;var Vi=To},35874:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return fe}});var pe=oe(67294),xe=oe(91034),Fe=oe(94184),ct=oe.n(Fe),ge=oe(87462),Me=oe(4942),Ee=oe(97685),Ce=oe(45987),he=oe(62709),ke=oe(71002),Je=oe(12060);function Pe(se,Oe,rt){var Pt=React.useRef({});return(!("value"in Pt.current)||rt(Pt.current.condition,Oe))&&(Pt.current.value=se(),Pt.current.condition=Oe),Pt.current.value}function dt(se,Oe){typeof se=="function"?se(Oe):(0,ke.Z)(se)==="object"&&se&&"current"in se&&(se.current=Oe)}function ot(){for(var se=arguments.length,Oe=new Array(se),rt=0;rt<se;rt++)Oe[rt]=arguments[rt];var Pt=Oe.filter(function(zt){return zt});return Pt.length<=1?Pt[0]:function(zt){Oe.forEach(function(Zt){dt(Zt,zt)})}}function lt(){for(var se=arguments.length,Oe=new Array(se),rt=0;rt<se;rt++)Oe[rt]=arguments[rt];return useMemo(function(){return ot.apply(void 0,Oe)},Oe,function(Pt,zt){return Pt.length===zt.length&&Pt.every(function(Zt,en){return Zt===zt[en]})})}function nt(se){var Oe,rt,Pt=(0,Je.isMemo)(se)?se.type.type:se.type;return!(typeof Pt=="function"&&!((Oe=Pt.prototype)!==null&&Oe!==void 0&&Oe.render)||typeof se=="function"&&!((rt=se.prototype)!==null&&rt!==void 0&&rt.render))}var _e={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 rt=Oe.keyCode;if(Oe.altKey&&!Oe.ctrlKey||Oe.metaKey||rt>=_e.F1&&rt<=_e.F12)return!1;switch(rt){case _e.ALT:case _e.CAPS_LOCK:case _e.CONTEXT_MENU:case _e.CTRL:case _e.DOWN:case _e.END:case _e.ESC:case _e.HOME:case _e.INSERT:case _e.LEFT:case _e.MAC_FF_META:case _e.META:case _e.NUMLOCK:case _e.NUM_CENTER:case _e.PAGE_DOWN:case _e.PAGE_UP:case _e.PAUSE:case _e.PRINT_SCREEN:case _e.RIGHT:case _e.SHIFT:case _e.UP:case _e.WIN_KEY:case _e.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Oe){if(Oe>=_e.ZERO&&Oe<=_e.NINE||Oe>=_e.NUM_ZERO&&Oe<=_e.NUM_MULTIPLY||Oe>=_e.A&&Oe<=_e.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Oe===0)return!0;switch(Oe){case _e.SPACE:case _e.QUESTION_MARK:case _e.NUM_PLUS:case _e.NUM_MINUS:case _e.NUM_PERIOD:case _e.NUM_DIVISION:case _e.SEMICOLON:case _e.DASH:case _e.EQUALS:case _e.COMMA:case _e.PERIOD:case _e.SLASH:case _e.APOSTROPHE:case _e.SINGLE_QUOTE:case _e.OPEN_SQUARE_BRACKET:case _e.BACKSLASH:case _e.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ht=_e,yt=function(Oe){return+setTimeout(Oe,16)},Ze=function(Oe){return clearTimeout(Oe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(yt=function(Oe){return window.requestAnimationFrame(Oe)},Ze=function(Oe){return window.cancelAnimationFrame(Oe)});var Qe=0,be=new Map;function we(se){be.delete(se)}var Ke=function(Oe){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Qe+=1;var Pt=Qe;function zt(Zt){if(Zt===0)we(Pt),Oe();else{var en=yt(function(){zt(Zt-1)});be.set(Pt,en)}}return zt(rt),Pt};Ke.cancel=function(se){var Oe=be.get(se);return we(Oe),Ze(Oe)};var Ge=Ke,vt=ht.ESC,pt=ht.TAB;function Ue(se){var Oe=se.visible,rt=se.triggerRef,Pt=se.onVisibleChange,zt=se.autoFocus,Zt=se.overlayRef,en=pe.useRef(!1),Gt=function(){if(Oe){var bn,lr;(bn=rt.current)===null||bn===void 0||(lr=bn.focus)===null||lr===void 0||lr.call(bn),Pt==null||Pt(!1)}},tr=function(){var bn;return(bn=Zt.current)!==null&&bn!==void 0&&bn.focus?(Zt.current.focus(),en.current=!0,!0):!1},cr=function(bn){switch(bn.keyCode){case vt:Gt();break;case pt:{var lr=!1;en.current||(lr=tr()),lr?bn.preventDefault():Gt();break}}};pe.useEffect(function(){return Oe?(window.addEventListener("keydown",cr),zt&&Ge(tr,3),function(){window.removeEventListener("keydown",cr),en.current=!1}):function(){en.current=!1}},[Oe])}var et=(0,pe.forwardRef)(function(se,Oe){var rt=se.overlay,Pt=se.arrow,zt=se.prefixCls,Zt=(0,pe.useMemo)(function(){var Gt;return typeof rt=="function"?Gt=rt():Gt=rt,Gt},[rt]),en=ot(Oe,Zt==null?void 0:Zt.ref);return pe.createElement(pe.Fragment,null,Pt&&pe.createElement("div",{className:"".concat(zt,"-arrow")}),pe.cloneElement(Zt,{ref:nt(Zt)?en:void 0}))}),kt=et,it={adjustX:1,adjustY:1},st=[0,0],We={topLeft:{points:["bl","tl"],overflow:it,offset:[0,-4],targetOffset:st},top:{points:["bc","tc"],overflow:it,offset:[0,-4],targetOffset:st},topRight:{points:["br","tr"],overflow:it,offset:[0,-4],targetOffset:st},bottomLeft:{points:["tl","bl"],overflow:it,offset:[0,4],targetOffset:st},bottom:{points:["tc","bc"],overflow:it,offset:[0,4],targetOffset:st},bottomRight:{points:["tr","br"],overflow:it,offset:[0,4],targetOffset:st}},Tt=We,Ut=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Qt(se,Oe){var rt,Pt=se.arrow,zt=Pt===void 0?!1:Pt,Zt=se.prefixCls,en=Zt===void 0?"rc-dropdown":Zt,Gt=se.transitionName,tr=se.animation,cr=se.align,Wt=se.placement,bn=Wt===void 0?"bottomLeft":Wt,lr=se.placements,Wr=lr===void 0?Tt:lr,Rn=se.getPopupContainer,Tr=se.showAction,Ca=se.hideAction,Wi=se.overlayClassName,Li=se.overlayStyle,Mi=se.visible,Ji=se.trigger,Zi=Ji===void 0?["hover"]:Ji,Ea=se.autoFocus,Ma=se.overlay,Gr=se.children,Va=se.onVisibleChange,no=(0,Ce.Z)(se,Ut),po=pe.useState(),mo=(0,Ee.Z)(po,2),Pa=mo[0],Bt=mo[1],On="visible"in se?Mi:Pa,Fn=pe.useRef(null),$n=pe.useRef(null),Ir=pe.useRef(null);pe.useImperativeHandle(Oe,function(){return Fn.current});var or=function(Xt){Bt(Xt),Va==null||Va(Xt)};Ue({visible:On,triggerRef:Ir,onVisibleChange:or,autoFocus:Ea,overlayRef:$n});var Sr=function(Xt){var Kt=se.onOverlayClick;Bt(!1),Kt&&Kt(Xt)},Zn=function(){return pe.createElement(kt,{ref:$n,overlay:Ma,prefixCls:en,arrow:zt})},ut=function(){return typeof Ma=="function"?Zn:Zn()},bt=function(){var Xt=se.minOverlayWidthMatchTrigger,Kt=se.alignPoint;return"minOverlayWidthMatchTrigger"in se?Xt:!Kt},Ft=function(){var Xt=se.openClassName;return Xt!==void 0?Xt:"".concat(en,"-open")},qt=pe.cloneElement(Gr,{className:ct()((rt=Gr.props)===null||rt===void 0?void 0:rt.className,On&&Ft()),ref:nt(Gr)?ot(Ir,Gr.ref):void 0}),qe=Ca;return!qe&&Zi.indexOf("contextMenu")!==-1&&(qe=["click"]),pe.createElement(he.Z,(0,ge.Z)({builtinPlacements:Wr},no,{prefixCls:en,ref:Fn,popupClassName:ct()(Wi,(0,Me.Z)({},"".concat(en,"-show-arrow"),zt)),popupStyle:Li,action:Zi,showAction:Tr,hideAction:qe,popupPlacement:bn,popupAlign:cr,popupTransitionName:Gt,popupAnimation:tr,popupVisible:On,stretch:bt()?"minWidth":"",popup:ut(),onPopupVisibleChange:or,onPopupClick:Sr,getPopupContainer:Rn}),qt)}var Xe=pe.forwardRef(Qt),Ae=Xe,Lt=oe(60276),cn=oe(5663),an=oe(10366),ft=oe(80636),mt=oe(8745),Yt=oe(96159),An=oe(53124),dn=oe(68508),nn=oe(76529),jt=oe(29691),xn=oe(66748);const vn=null,Te=se=>{const{menu:Oe,arrow:rt,prefixCls:Pt,children:zt,trigger:Zt,disabled:en,dropdownRender:Gt,getPopupContainer:tr,overlayClassName:cr,rootClassName:Wt,open:bn,onOpenChange:lr,visible:Wr,onVisibleChange:Rn,mouseEnterDelay:Tr=.15,mouseLeaveDelay:Ca=.1,autoAdjustOverflow:Wi=!0,placement:Li="",overlay:Mi,transitionName:Ji}=se,{getPopupContainer:Zi,getPrefixCls:Ea,direction:Ma}=pe.useContext(An.E_),Gr=pe.useMemo(()=>{const qt=Ea();return Ji!==void 0?Ji:Li.includes("top")?`${qt}-slide-down`:`${qt}-slide-up`},[Ea,Li,Ji]),Va=pe.useMemo(()=>Li?Li.includes("Center")?Li.slice(0,Li.indexOf("Center")):Li:Ma==="rtl"?"bottomRight":"bottomLeft",[Li,Ma]),no=Ea("dropdown",Pt),[po,mo]=(0,xn.Z)(no),[,Pa]=(0,jt.Z)(),Bt=pe.Children.only(zt),On=(0,Yt.Tm)(Bt,{className:ct()(`${no}-trigger`,{[`${no}-rtl`]:Ma==="rtl"},Bt.props.className),disabled:en}),Fn=en?[]:Zt;let $n;Fn&&Fn.includes("contextMenu")&&($n=!0);const[Ir,or]=(0,cn.Z)(!1,{value:bn!=null?bn:Wr}),Sr=(0,Lt.useEvent)(qt=>{lr==null||lr(qt),Rn==null||Rn(qt),or(qt)}),Zn=ct()(cr,Wt,mo,{[`${no}-rtl`]:Ma==="rtl"}),ut=(0,ft.Z)({arrowPointAtCenter:typeof rt=="object"&&rt.pointAtCenter,autoAdjustOverflow:Wi,offset:Pa.marginXXS,arrowWidth:rt?Pa.sizePopupArrow:0,borderRadius:Pa.borderRadius}),bt=pe.useCallback(()=>{or(!1)},[]),Ft=()=>{let qt;return Oe!=null&&Oe.items?qt=pe.createElement(dn.default,Object.assign({},Oe)):typeof Mi=="function"?qt=Mi():qt=Mi,Gt&&(qt=Gt(qt)),qt=pe.Children.only(typeof qt=="string"?pe.createElement("span",null,qt):qt),pe.createElement(nn.J,{prefixCls:`${no}-menu`,expandIcon:pe.createElement("span",{className:`${no}-menu-submenu-arrow`},pe.createElement(xe.Z,{className:`${no}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:bt,validator:qe=>{let{mode:_t}=qe}},qt)};return po(pe.createElement(Ae,Object.assign({alignPoint:$n},(0,an.Z)(se,["rootClassName"]),{mouseEnterDelay:Tr,mouseLeaveDelay:Ca,visible:Ir,builtinPlacements:ut,arrow:!!rt,overlayClassName:Zn,prefixCls:no,getPopupContainer:tr||Zi,transitionName:Gr,trigger:Fn,overlay:Ft,placement:Va,onVisibleChange:Sr}),On))};function ue(se){return Object.assign(Object.assign({},se),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,mt.Z)(Te,"dropdown",se=>se,ue),me=se=>pe.createElement(le,Object.assign({},se),pe.createElement("span",null));Te._InternalPanelDoNotUseOrYouWillBeFired=me;var fe=Te},66748:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Je}});var pe=oe(14747),xe=oe(67771),Fe=oe(33297),ct=oe(50438),ge=oe(97414),Me=oe(67968),Ee=oe(45503),he=Pe=>{const{componentCls:dt,menuCls:ot,colorError:lt,colorTextLightSolid:nt}=Pe,_e=`${ot}-item`;return{[`${dt}, ${dt}-menu-submenu`]:{[`${ot} ${_e}`]:{[`&${_e}-danger:not(${_e}-disabled)`]:{color:lt,"&:hover":{color:nt,backgroundColor:lt}}}}}};const ke=Pe=>{const{componentCls:dt,menuCls:ot,zIndexPopup:lt,dropdownArrowDistance:nt,sizePopupArrow:_e,antCls:ht,iconCls:yt,motionDurationMid:Ze,dropdownPaddingVertical:Qe,fontSize:be,dropdownEdgeChildPadding:we,colorTextDisabled:Ke,fontSizeIcon:Ge,controlPaddingHorizontal:vt,colorBgElevated:pt}=Pe;return[{[dt]:Object.assign(Object.assign({},(0,pe.Wf)(Pe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:lt,display:"block","&::before":{position:"absolute",insetBlock:-nt+_e/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${ht}-btn`]:{[`& > ${yt}-down, & > ${ht}-btn-icon > ${yt}-down`]:{fontSize:Ge}},[`${dt}-wrap`]:{position:"relative",[`${ht}-btn > ${yt}-down`]:{fontSize:Ge},[`${yt}-down::before`]:{transition:`transform ${Ze}`}},[`${dt}-wrap-open`]:{[`${yt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${ht}-slide-down-enter${ht}-slide-down-enter-active${dt}-placement-bottomLeft,
&${ht}-slide-down-appear${ht}-slide-down-appear-active${dt}-placement-bottomLeft,
&${ht}-slide-down-enter${ht}-slide-down-enter-active${dt}-placement-bottom,
&${ht}-slide-down-appear${ht}-slide-down-appear-active${dt}-placement-bottom,
&${ht}-slide-down-enter${ht}-slide-down-enter-active${dt}-placement-bottomRight,
&${ht}-slide-down-appear${ht}-slide-down-appear-active${dt}-placement-bottomRight`]:{animationName:xe.fJ},[`&${ht}-slide-up-enter${ht}-slide-up-enter-active${dt}-placement-topLeft,
&${ht}-slide-up-appear${ht}-slide-up-appear-active${dt}-placement-topLeft,
&${ht}-slide-up-enter${ht}-slide-up-enter-active${dt}-placement-top,
&${ht}-slide-up-appear${ht}-slide-up-appear-active${dt}-placement-top,
&${ht}-slide-up-enter${ht}-slide-up-enter-active${dt}-placement-topRight,
&${ht}-slide-up-appear${ht}-slide-up-appear-active${dt}-placement-topRight`]:{animationName:xe.Qt},[`&${ht}-slide-down-leave${ht}-slide-down-leave-active${dt}-placement-bottomLeft,
&${ht}-slide-down-leave${ht}-slide-down-leave-active${dt}-placement-bottom,
&${ht}-slide-down-leave${ht}-slide-down-leave-active${dt}-placement-bottomRight`]:{animationName:xe.Uw},[`&${ht}-slide-up-leave${ht}-slide-up-leave-active${dt}-placement-topLeft,
&${ht}-slide-up-leave${ht}-slide-up-leave-active${dt}-placement-top,
&${ht}-slide-up-leave${ht}-slide-up-leave-active${dt}-placement-topRight`]:{animationName:xe.ly}})},(0,ge.ZP)(Pe,{colorBg:pt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${dt} ${ot}`]:{position:"relative",margin:0},[`${ot}-submenu-popup`]:{position:"absolute",zIndex:lt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${dt}, ${dt}-menu-submenu`]:{[ot]:Object.assign(Object.assign({padding:we,listStyleType:"none",backgroundColor:pt,backgroundClip:"padding-box",borderRadius:Pe.borderRadiusLG,outline:"none",boxShadow:Pe.boxShadowSecondary},(0,pe.Qy)(Pe)),{[`${ot}-item-group-title`]:{padding:`${Qe}px ${vt}px`,color:Pe.colorTextDescription,transition:`all ${Ze}`},[`${ot}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ot}-item-icon`]:{minWidth:be,marginInlineEnd:Pe.marginXS,fontSize:Pe.fontSizeSM},[`${ot}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Ze}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ot}-item, ${ot}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Qe}px ${vt}px`,color:Pe.colorText,fontWeight:"normal",fontSize:be,lineHeight:Pe.lineHeight,cursor:"pointer",transition:`all ${Ze}`,borderRadius:Pe.borderRadiusSM,"&:hover, &-active":{backgroundColor:Pe.controlItemBgHover}},(0,pe.Qy)(Pe)),{"&-selected":{color:Pe.colorPrimary,backgroundColor:Pe.controlItemBgActive,"&:hover, &-active":{backgroundColor:Pe.controlItemBgActiveHover}},"&-disabled":{color:Ke,cursor:"not-allowed","&:hover":{color:Ke,backgroundColor:pt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Pe.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Pe.colorSplit},[`${dt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Pe.paddingXS,[`${dt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Pe.colorTextDescription,fontSize:Ge,fontStyle:"normal"}}}),[`${ot}-item-group-list`]:{margin:`0 ${Pe.marginXS}px`,padding:0,listStyle:"none"},[`${ot}-submenu-title`]:{paddingInlineEnd:vt+Pe.fontSizeSM},[`${ot}-submenu-vertical`]:{position:"relative"},[`${ot}-submenu${ot}-submenu-disabled ${dt}-menu-submenu-title`]:{[`&, ${dt}-menu-submenu-arrow-icon`]:{color:Ke,backgroundColor:pt,cursor:"not-allowed"}},[`${ot}-submenu-selected ${dt}-menu-submenu-title`]:{color:Pe.colorPrimary}})}},[(0,xe.oN)(Pe,"slide-up"),(0,xe.oN)(Pe,"slide-down"),(0,Fe.Fm)(Pe,"move-up"),(0,Fe.Fm)(Pe,"move-down"),(0,ct._y)(Pe,"zoom-big")]]};var Je=(0,Me.Z)("Dropdown",(Pe,dt)=>{let{rootPrefixCls:ot}=dt;const{marginXXS:lt,sizePopupArrow:nt,controlHeight:_e,fontSize:ht,lineHeight:yt,paddingXXS:Ze,componentCls:Qe,borderRadiusLG:be}=Pe,we=(_e-ht*yt)/2,{dropdownArrowOffset:Ke}=(0,ge.fS)({contentRadius:be}),Ge=(0,Ee.TS)(Pe,{menuCls:`${Qe}-menu`,rootPrefixCls:ot,dropdownArrowDistance:nt/2+lt,dropdownArrowOffset:Ke,dropdownPaddingVertical:we,dropdownEdgeChildPadding:Ze});return[ke(Ge),he(Ge)]},Pe=>({zIndexPopup:Pe.zIndexPopupBase+50}))},32983:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ze}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(67294),ct=oe(53124),ge=oe(10110),Me=oe(84780),Ee=oe(29691),he=()=>{const[,Qe]=(0,Ee.Z)(),we=new Me.C(Qe.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Fe.createElement("svg",{style:we,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{fill:"none",fillRule:"evenodd"},Fe.createElement("g",{transform:"translate(24 31.67)"},Fe.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Fe.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),Fe.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),Fe.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),Fe.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),Fe.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),Fe.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Fe.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Fe.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Je=()=>{const[,Qe]=(0,Ee.Z)(),{colorFill:be,colorFillTertiary:we,colorFillQuaternary:Ke,colorBgContainer:Ge}=Qe,{borderColor:vt,shadowColor:pt,contentColor:Ue}=(0,Fe.useMemo)(()=>({borderColor:new Me.C(be).onBackground(Ge).toHexShortString(),shadowColor:new Me.C(we).onBackground(Ge).toHexShortString(),contentColor:new Me.C(Ke).onBackground(Ge).toHexShortString()}),[be,we,Ke,Ge]);return Fe.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Fe.createElement("ellipse",{fill:pt,cx:"32",cy:"33",rx:"32",ry:"7"}),Fe.createElement("g",{fillRule:"nonzero",stroke:vt},Fe.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),Fe.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:Ue}))))},Pe=oe(67968),dt=oe(45503);const ot=Qe=>{const{componentCls:be,margin:we,marginXS:Ke,marginXL:Ge,fontSize:vt,lineHeight:pt}=Qe;return{[be]:{marginInline:Ke,fontSize:vt,lineHeight:pt,textAlign:"center",[`${be}-image`]:{height:Qe.emptyImgHeight,marginBottom:Ke,opacity:Qe.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${be}-description`]:{color:Qe.colorText},[`${be}-footer`]:{marginTop:we},"&-normal":{marginBlock:Ge,color:Qe.colorTextDisabled,[`${be}-description`]:{color:Qe.colorTextDisabled},[`${be}-image`]:{height:Qe.emptyImgHeightMD}},"&-small":{marginBlock:Ke,color:Qe.colorTextDisabled,[`${be}-image`]:{height:Qe.emptyImgHeightSM}}}}};var lt=(0,Pe.Z)("Empty",Qe=>{const{componentCls:be,controlHeightLG:we}=Qe,Ke=(0,dt.TS)(Qe,{emptyImgCls:`${be}-img`,emptyImgHeight:we*2.5,emptyImgHeightMD:we,emptyImgHeightSM:we*.875});return[ot(Ke)]}),nt=function(Qe,be){var we={};for(var Ke in Qe)Object.prototype.hasOwnProperty.call(Qe,Ke)&&be.indexOf(Ke)<0&&(we[Ke]=Qe[Ke]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Ke=Object.getOwnPropertySymbols(Qe);Ge<Ke.length;Ge++)be.indexOf(Ke[Ge])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Ke[Ge])&&(we[Ke[Ge]]=Qe[Ke[Ge]]);return we};const _e=Fe.createElement(he,null),ht=Fe.createElement(Je,null),yt=Qe=>{var{className:be,rootClassName:we,prefixCls:Ke,image:Ge=_e,description:vt,children:pt,imageStyle:Ue,style:et}=Qe,kt=nt(Qe,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:it,direction:st,empty:We}=Fe.useContext(ct.E_),Tt=it("empty",Ke),[Ut,Qt]=lt(Tt),[Xe]=(0,ge.Z)("Empty"),Ae=typeof vt!="undefined"?vt:Xe==null?void 0:Xe.description,Lt=typeof Ae=="string"?Ae:"empty";let cn=null;return typeof Ge=="string"?cn=Fe.createElement("img",{alt:Lt,src:Ge}):cn=Ge,Ut(Fe.createElement("div",Object.assign({className:xe()(Qt,Tt,We==null?void 0:We.className,{[`${Tt}-normal`]:Ge===ht,[`${Tt}-rtl`]:st==="rtl"},be,we),style:Object.assign(Object.assign({},We==null?void 0:We.style),et)},kt),Fe.createElement("div",{className:`${Tt}-image`,style:Ue},cn),Ae&&Fe.createElement("div",{className:`${Tt}-description`},Ae),pt&&Fe.createElement("div",{className:`${Tt}-footer`},pt)))};yt.PRESENTED_IMAGE_DEFAULT=_e,yt.PRESENTED_IMAGE_SIMPLE=ht;var Ze=yt},22150:function(Cn,Vt,oe){"use strict";oe.d(Vt,{default:function(){return qt}});var pe=oe(74902),xe=oe(94184),Fe=oe.n(xe),ct=oe(38379),ge=oe(67294),Me=oe(33603),Ee=oe(65223);function Ce(qe){const[_t,Xt]=ge.useState(qe);return ge.useEffect(()=>{const Kt=setTimeout(()=>{Xt(qe)},qe.length?0:10);return()=>{clearTimeout(Kt)}},[qe]),_t}var he=oe(14747),ke=oe(50438),Je=oe(33507),Pe=oe(45503),dt=oe(67968),lt=qe=>{const{componentCls:_t}=qe,Xt=`${_t}-show-help`,Kt=`${_t}-show-help-item`;return{[Xt]:{transition:`opacity ${qe.motionDurationSlow} ${qe.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Kt]:{overflow:"hidden",transition:`height ${qe.motionDurationSlow} ${qe.motionEaseInOut},
opacity ${qe.motionDurationSlow} ${qe.motionEaseInOut},
transform ${qe.motionDurationSlow} ${qe.motionEaseInOut} !important`,[`&${Kt}-appear, &${Kt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Kt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const nt=qe=>({legend:{display:"block",width:"100%",marginBottom:qe.marginLG,padding:0,color:qe.colorTextDescription,fontSize:qe.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${qe.lineWidth}px ${qe.lineType} ${qe.colorBorder}`},label:{fontSize:qe.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 ${qe.controlOutlineWidth}px ${qe.controlOutline}`},output:{display:"block",paddingTop:15,color:qe.colorText,fontSize:qe.fontSize,lineHeight:qe.lineHeight}}),_e=(qe,_t)=>{const{formItemCls:Xt}=qe;return{[Xt]:{[`${Xt}-label > label`]:{height:_t},[`${Xt}-control-input`]:{minHeight:_t}}}},ht=qe=>{const{componentCls:_t}=qe;return{[qe.componentCls]:Object.assign(Object.assign(Object.assign({},(0,he.Wf)(qe)),nt(qe)),{[`${_t}-text`]:{display:"inline-block",paddingInlineEnd:qe.paddingSM},"&-small":Object.assign({},_e(qe,qe.controlHeightSM)),"&-large":Object.assign({},_e(qe,qe.controlHeightLG))})}},yt=qe=>{const{formItemCls:_t,iconCls:Xt,componentCls:Kt,rootPrefixCls:on,labelRequiredMarkColor:rn,labelColor:Un,labelFontSize:Ar,labelHeight:rr,labelColonMarginInlineStart:ir,labelColonMarginInlineEnd:mr,itemMarginBottom:br}=qe;return{[_t]:Object.assign(Object.assign({},(0,he.Wf)(qe)),{marginBottom:br,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${on}-row`]:{display:"none"},"&-has-warning":{[`${_t}-split`]:{color:qe.colorError}},"&-has-error":{[`${_t}-split`]:{color:qe.colorWarning}},[`${_t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${qe.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:rr,color:Un,fontSize:Ar,[`> ${Xt}`]:{fontSize:qe.fontSize,verticalAlign:"top"},[`&${_t}-required:not(${_t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:qe.marginXXS,color:rn,fontSize:qe.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Kt}-hide-required-mark &`]:{display:"none"}},[`${_t}-optional`]:{display:"inline-block",marginInlineStart:qe.marginXXS,color:qe.colorTextDescription,[`${Kt}-hide-required-mark &`]:{display:"none"}},[`${_t}-tooltip`]:{color:qe.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:qe.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:ir,marginInlineEnd:mr},[`&${_t}-no-colon::after`]:{content:'"\\a0"'}}},[`${_t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${on}-col-'"]):not([class*="' ${on}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:qe.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[_t]:{"&-explain, &-extra":{clear:"both",color:qe.colorTextDescription,fontSize:qe.fontSize,lineHeight:qe.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:qe.controlHeightSM,transition:`color ${qe.motionDurationMid} ${qe.motionEaseOut}`},"&-explain":{"&-error":{color:qe.colorError},"&-warning":{color:qe.colorWarning}}},[`&-with-help ${_t}-explain`]:{height:"auto",opacity:1},[`${_t}-feedback-icon`]:{fontSize:qe.fontSize,textAlign:"center",visibility:"visible",animationName:ke.kr,animationDuration:qe.motionDurationMid,animationTimingFunction:qe.motionEaseOutBack,pointerEvents:"none","&-success":{color:qe.colorSuccess},"&-error":{color:qe.colorError},"&-warning":{color:qe.colorWarning},"&-validating":{color:qe.colorPrimary}}})}},Ze=qe=>{const{componentCls:_t,formItemCls:Xt}=qe;return{[`${_t}-horizontal`]:{[`${Xt}-label`]:{flexGrow:0},[`${Xt}-control`]:{flex:"1 1 0",minWidth:0},[`${Xt}-label[class$='-24'], ${Xt}-label[class*='-24 ']`]:{[`& + ${Xt}-control`]:{minWidth:"unset"}}}}},Qe=qe=>{const{componentCls:_t,formItemCls:Xt}=qe;return{[`${_t}-inline`]:{display:"flex",flexWrap:"wrap",[Xt]:{flex:"none",marginInlineEnd:qe.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Xt}-label,
> ${Xt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Xt}-label`]:{flex:"none"},[`${_t}-text`]:{display:"inline-block"},[`${Xt}-has-feedback`]:{display:"inline-block"}}}}},be=qe=>({padding:qe.verticalLabelPadding,margin:qe.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),we=qe=>{const{componentCls:_t,formItemCls:Xt,rootPrefixCls:Kt}=qe;return{[`${Xt} ${Xt}-label`]:be(qe),[_t]:{[Xt]:{flexWrap:"wrap",[`${Xt}-label, ${Xt}-control`]:{[`&:not([class*=" ${Kt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ke=qe=>{const{componentCls:_t,formItemCls:Xt,rootPrefixCls:Kt}=qe;return{[`${_t}-vertical`]:{[Xt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${_t}-item-control`]:{width:"100%"}}},[`${_t}-vertical ${Xt}-label,
.${Kt}-col-24${Xt}-label,
.${Kt}-col-xl-24${Xt}-label`]:be(qe),[`@media (max-width: ${qe.screenXSMax}px)`]:[we(qe),{[_t]:{[`.${Kt}-col-xs-24${Xt}-label`]:be(qe)}}],[`@media (max-width: ${qe.screenSMMax}px)`]:{[_t]:{[`.${Kt}-col-sm-24${Xt}-label`]:be(qe)}},[`@media (max-width: ${qe.screenMDMax}px)`]:{[_t]:{[`.${Kt}-col-md-24${Xt}-label`]:be(qe)}},[`@media (max-width: ${qe.screenLGMax}px)`]:{[_t]:{[`.${Kt}-col-lg-24${Xt}-label`]:be(qe)}}}},Ge=(qe,_t)=>(0,Pe.TS)(qe,{formItemCls:`${qe.componentCls}-item`,rootPrefixCls:_t});var vt=(0,dt.Z)("Form",(qe,_t)=>{let{rootPrefixCls:Xt}=_t;const Kt=Ge(qe,Xt);return[ht(Kt),yt(Kt),lt(Kt),Ze(Kt),Qe(Kt),Ke(Kt),(0,Je.Z)(Kt),ke.kr]},qe=>({labelRequiredMarkColor:qe.colorError,labelColor:qe.colorTextHeading,labelFontSize:qe.fontSize,labelHeight:qe.controlHeight,labelColonMarginInlineStart:qe.marginXXS/2,labelColonMarginInlineEnd:qe.marginXS,itemMarginBottom:qe.marginLG,verticalLabelPadding:`0 0 ${qe.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const pt=[];function Ue(qe,_t,Xt){let Kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof qe=="string"?qe:`${_t}-${Kt}`,error:qe,errorStatus:Xt}}var kt=qe=>{let{help:_t,helpStatus:Xt,errors:Kt=pt,warnings:on=pt,className:rn,fieldId:Un,onVisibleChanged:Ar}=qe;const{prefixCls:rr}=ge.useContext(Ee.Rk),ir=`${rr}-item-explain`,[,mr]=vt(rr),br=(0,ge.useMemo)(()=>(0,Me.Z)(rr),[rr]),Yr=Ce(Kt),_n=Ce(on),Qn=ge.useMemo(()=>_t!=null?[Ue(_t,"help",Xt)]:[].concat((0,pe.Z)(Yr.map((ca,_i)=>Ue(ca,"error","error",_i))),(0,pe.Z)(_n.map((ca,_i)=>Ue(ca,"warning","warning",_i)))),[_t,Xt,Yr,_n]),na={};return Un&&(na.id=`${Un}_help`),ge.createElement(ct.default,{motionDeadline:br.motionDeadline,motionName:`${rr}-show-help`,visible:!!Qn.length,onVisibleChanged:Ar},ca=>{const{className:_i,style:ii}=ca;return ge.createElement("div",Object.assign({},na,{className:Fe()(ir,_i,rn,mr),style:ii,role:"alert"}),ge.createElement(ct.CSSMotionList,Object.assign({keys:Qn},(0,Me.Z)(rr),{motionName:`${rr}-show-help-item`,component:!1}),va=>{const{key:_r,error:Qi,errorStatus:Tn,className:Ua,style:xa}=va;return ge.createElement("div",{key:_r,className:Fe()(Ua,{[`${ir}-${Tn}`]:Tn}),style:xa},Qi)}))})},it=oe(46660),st=oe(53124),We=oe(98866),Tt=oe(97647),Ut=oe(98675),Qt=oe(17423);const Xe=["parentNode"],Ae="form_item";function Lt(qe){return qe===void 0||qe===!1?[]:Array.isArray(qe)?qe:[qe]}function cn(qe,_t){if(!qe.length)return;const Xt=qe.join("_");return _t?`${_t}_${Xt}`:Xe.includes(Xt)?`${Ae}_${Xt}`:Xt}function an(qe,_t,Xt,Kt,on,rn){let Un=Kt;return rn!==void 0?Un=rn:Xt.validating?Un="validating":qe.length?Un="error":_t.length?Un="warning":(Xt.touched||on&&Xt.validated)&&(Un="success"),Un}function ft(qe){return Lt(qe).join("_")}function mt(qe){const[_t]=(0,it.useForm)(),Xt=ge.useRef({}),Kt=ge.useMemo(()=>qe!=null?qe:Object.assign(Object.assign({},_t),{__INTERNAL__:{itemRef:on=>rn=>{const Un=ft(on);rn?Xt.current[Un]=rn:delete Xt.current[Un]}},scrollToField:function(on){let rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Un=Lt(on),Ar=cn(Un,Kt.__INTERNAL__.name),rr=Ar?document.getElementById(Ar):null;rr&&(0,Qt.Z)(rr,Object.assign({scrollMode:"if-needed",block:"nearest"},rn))},getFieldInstance:on=>{const rn=ft(on);return Xt.current[rn]}}),[qe,_t]);return[Kt]}var Yt=oe(37920),An=function(qe,_t){var Xt={};for(var Kt in qe)Object.prototype.hasOwnProperty.call(qe,Kt)&&_t.indexOf(Kt)<0&&(Xt[Kt]=qe[Kt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Kt=Object.getOwnPropertySymbols(qe);on<Kt.length;on++)_t.indexOf(Kt[on])<0&&Object.prototype.propertyIsEnumerable.call(qe,Kt[on])&&(Xt[Kt[on]]=qe[Kt[on]]);return Xt};const dn=(qe,_t)=>{const Xt=ge.useContext(We.Z),{getPrefixCls:Kt,direction:on,form:rn}=ge.useContext(st.E_),{prefixCls:Un,className:Ar,rootClassName:rr,size:ir,disabled:mr=Xt,form:br,colon:Yr,labelAlign:_n,labelWrap:Qn,labelCol:na,wrapperCol:ca,hideRequiredMark:_i,layout:ii="horizontal",scrollToFirstError:va,requiredMark:_r,onFinishFailed:Qi,name:Tn,style:Ua,feedbackIcons:xa}=qe,uo=An(qe,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),ja=(0,Ut.Z)(ir),ka=ge.useContext(Yt.Z),co=(0,ge.useMemo)(()=>_r!==void 0?_r:rn&&rn.requiredMark!==void 0?rn.requiredMark:!_i,[_i,_r,rn]),za=Yr!=null?Yr:rn==null?void 0:rn.colon,fa=Kt("form",Un),[Ya,_o]=vt(fa),qa=Fe()(fa,`${fa}-${ii}`,{[`${fa}-hide-required-mark`]:co===!1,[`${fa}-rtl`]:on==="rtl",[`${fa}-${ja}`]:ja},_o,rn==null?void 0:rn.className,Ar,rr),[Oa]=mt(br),{__INTERNAL__:So}=Oa;So.name=Tn;const To=(0,ge.useMemo)(()=>({name:Tn,labelAlign:_n,labelCol:na,labelWrap:Qn,wrapperCol:ca,vertical:ii==="vertical",colon:za,requiredMark:co,itemRef:So.itemRef,form:Oa,feedbackIcons:xa}),[Tn,_n,na,ca,ii,za,co,Oa,xa]);ge.useImperativeHandle(_t,()=>Oa);const fo=(At,Mt)=>{if(At){let tn={block:"nearest"};typeof At=="object"&&(tn=At),Oa.scrollToField(Mt,tn)}},Vi=At=>{if(Qi==null||Qi(At),At.errorFields.length){const Mt=At.errorFields[0].name;if(va!==void 0){fo(va,Mt);return}rn&&rn.scrollToFirstError!==void 0&&fo(rn.scrollToFirstError,Mt)}};return Ya(ge.createElement(We.n,{disabled:mr},ge.createElement(Tt.q,{size:ja},ge.createElement(Ee.RV,Object.assign({},{validateMessages:ka}),ge.createElement(Ee.q3.Provider,{value:To},ge.createElement(it.default,Object.assign({id:Tn},uo,{name:Tn,onFinishFailed:Vi,form:Oa,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ua),className:qa})))))))};var jt=ge.forwardRef(dn),xn=oe(9475),vn=oe(17799),Te=oe(96159),ue=oe(37419);function le(qe){if(typeof qe=="function")return qe;const _t=(0,ue.Z)(qe);return _t.length<=1?_t[0]:_t}const me=()=>{const{status:qe,errors:_t=[],warnings:Xt=[]}=(0,ge.useContext)(Ee.aM);return{status:qe,errors:_t,warnings:Xt}};me.Context=Ee.aM;var fe=me,se=oe(96523);function Oe(qe){const[_t,Xt]=ge.useState(qe),Kt=(0,ge.useRef)(null),on=(0,ge.useRef)([]),rn=(0,ge.useRef)(!1);ge.useEffect(()=>(rn.current=!1,()=>{rn.current=!0,se.Z.cancel(Kt.current),Kt.current=null}),[]);function Un(Ar){rn.current||(Kt.current===null&&(on.current=[],Kt.current=(0,se.Z)(()=>{Kt.current=null,Xt(rr=>{let ir=rr;return on.current.forEach(mr=>{ir=mr(ir)}),ir})})),on.current.push(Ar))}return[_t,Un]}function rt(){const{itemRef:qe}=ge.useContext(Ee.q3),_t=ge.useRef({});function Xt(Kt,on){const rn=on&&typeof on=="object"&&on.ref,Un=Kt.join("_");return(_t.current.name!==Un||_t.current.originRef!==rn)&&(_t.current.name=Un,_t.current.originRef=rn,_t.current.ref=(0,vn.sQ)(qe(Kt),rn)),_t.current.ref}return Xt}var Pt=oe(48130),zt=oe(14075),Zt=oe(10366),en=oe(92820),Gt=oe(21584);const tr=qe=>{const{formItemCls:_t}=qe;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${_t}-control`]:{display:"flex"}}}};var cr=(0,dt.b)(["Form","item-item"],(qe,_t)=>{let{rootPrefixCls:Xt}=_t;const Kt=Ge(qe,Xt);return[tr(Kt)]}),bn=qe=>{const{prefixCls:_t,status:Xt,wrapperCol:Kt,children:on,errors:rn,warnings:Un,_internalItemRender:Ar,extra:rr,help:ir,fieldId:mr,marginBottom:br,onErrorVisibleChanged:Yr}=qe,_n=`${_t}-item`,Qn=ge.useContext(Ee.q3),na=Kt||Qn.wrapperCol||{},ca=Fe()(`${_n}-control`,na.className),_i=ge.useMemo(()=>Object.assign({},Qn),[Qn]);delete _i.labelCol,delete _i.wrapperCol;const ii=ge.createElement("div",{className:`${_n}-control-input`},ge.createElement("div",{className:`${_n}-control-input-content`},on)),va=ge.useMemo(()=>({prefixCls:_t,status:Xt}),[_t,Xt]),_r=br!==null||rn.length||Un.length?ge.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ge.createElement(Ee.Rk.Provider,{value:va},ge.createElement(kt,{fieldId:mr,errors:rn,warnings:Un,help:ir,helpStatus:Xt,className:`${_n}-explain-connected`,onVisibleChanged:Yr})),!!br&&ge.createElement("div",{style:{width:0,height:br}})):null,Qi={};mr&&(Qi.id=`${mr}_extra`);const Tn=rr?ge.createElement("div",Object.assign({},Qi,{className:`${_n}-extra`}),rr):null,Ua=Ar&&Ar.mark==="pro_table_render"&&Ar.render?Ar.render(qe,{input:ii,errorList:_r,extra:Tn}):ge.createElement(ge.Fragment,null,ii,_r,Tn);return ge.createElement(Ee.q3.Provider,{value:_i},ge.createElement(Gt.Z,Object.assign({},na,{className:ca}),Ua),ge.createElement(cr,{prefixCls:_t}))},lr=oe(17663),Wr=oe(24457),Rn=oe(10110),Tr=oe(83062),Ca=function(qe,_t){var Xt={};for(var Kt in qe)Object.prototype.hasOwnProperty.call(qe,Kt)&&_t.indexOf(Kt)<0&&(Xt[Kt]=qe[Kt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Kt=Object.getOwnPropertySymbols(qe);on<Kt.length;on++)_t.indexOf(Kt[on])<0&&Object.prototype.propertyIsEnumerable.call(qe,Kt[on])&&(Xt[Kt[on]]=qe[Kt[on]]);return Xt};function Wi(qe){return qe?typeof qe=="object"&&!ge.isValidElement(qe)?qe:{title:qe}:null}var Mi=qe=>{let{prefixCls:_t,label:Xt,htmlFor:Kt,labelCol:on,labelAlign:rn,colon:Un,required:Ar,requiredMark:rr,tooltip:ir}=qe;var mr;const[br]=(0,Rn.Z)("Form"),{vertical:Yr,labelAlign:_n,labelCol:Qn,labelWrap:na,colon:ca}=ge.useContext(Ee.q3);if(!Xt)return null;const _i=on||Qn||{},ii=rn||_n,va=`${_t}-item-label`,_r=Fe()(va,ii==="left"&&`${va}-left`,_i.className,{[`${va}-wrap`]:!!na});let Qi=Xt;const Tn=Un===!0||ca!==!1&&Un!==!1;Tn&&!Yr&&typeof Xt=="string"&&Xt.trim()!==""&&(Qi=Xt.replace(/[:|]\s*$/,""));const xa=Wi(ir);if(xa){const{icon:co=ge.createElement(lr.Z,null)}=xa,za=Ca(xa,["icon"]),fa=ge.createElement(Tr.Z,Object.assign({},za),ge.cloneElement(co,{className:`${_t}-item-tooltip`,title:""}));Qi=ge.createElement(ge.Fragment,null,Qi,fa)}const uo=rr==="optional",ja=typeof rr=="function";ja?Qi=rr(Qi,{required:!!Ar}):uo&&!Ar&&(Qi=ge.createElement(ge.Fragment,null,Qi,ge.createElement("span",{className:`${_t}-item-optional`,title:""},(br==null?void 0:br.optional)||((mr=Wr.Z.Form)===null||mr===void 0?void 0:mr.optional))));const ka=Fe()({[`${_t}-item-required`]:Ar,[`${_t}-item-required-mark-optional`]:uo||ja,[`${_t}-item-no-colon`]:!Tn});return ge.createElement(Gt.Z,Object.assign({},_i,{className:_r}),ge.createElement("label",{htmlFor:Kt,className:ka,title:typeof Xt=="string"?Xt:""},Qi))},Ji=oe(87725),Zi=oe(16646),Ea=oe(87995),Ma=oe(3407);const Gr={success:Ji.Z,warning:Ea.Z,error:Zi.Z,validating:Ma.Z};function Va(qe){let{children:_t,errors:Xt,warnings:Kt,hasFeedback:on,validateStatus:rn,prefixCls:Un,meta:Ar,noStyle:rr}=qe;const ir=`${Un}-item`,{feedbackIcons:mr}=ge.useContext(Ee.q3),br=an(Xt,Kt,Ar,null,!!on,rn),{isFormItemInput:Yr,status:_n}=ge.useContext(Ee.aM),Qn=ge.useMemo(()=>{var na;let ca;if(on){const va=on!==!0&&on.icons||mr,_r=br&&((na=va==null?void 0:va({status:br,errors:Xt,warnings:Kt}))===null||na===void 0?void 0:na[br]),Qi=br&&Gr[br];ca=_r!==!1&&Qi?ge.createElement("span",{className:Fe()(`${ir}-feedback-icon`,`${ir}-feedback-icon-${br}`)},_r||ge.createElement(Qi,null)):null}let _i=!0,ii=br||"";return rr&&(_i=Yr,ii=(br!=null?br:_n)||""),{status:ii,errors:Xt,warnings:Kt,hasFeedback:!!on,feedbackIcon:ca,isFormItemInput:_i}},[br,on,rr,Yr,_n]);return ge.createElement(Ee.aM.Provider,{value:Qn},_t)}var no=function(qe,_t){var Xt={};for(var Kt in qe)Object.prototype.hasOwnProperty.call(qe,Kt)&&_t.indexOf(Kt)<0&&(Xt[Kt]=qe[Kt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Kt=Object.getOwnPropertySymbols(qe);on<Kt.length;on++)_t.indexOf(Kt[on])<0&&Object.prototype.propertyIsEnumerable.call(qe,Kt[on])&&(Xt[Kt[on]]=qe[Kt[on]]);return Xt};function po(qe){const{prefixCls:_t,className:Xt,rootClassName:Kt,style:on,help:rn,errors:Un,warnings:Ar,validateStatus:rr,meta:ir,hasFeedback:mr,hidden:br,children:Yr,fieldId:_n,required:Qn,isRequired:na,onSubItemMetaChange:ca}=qe,_i=no(qe,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),ii=`${_t}-item`,{requiredMark:va}=ge.useContext(Ee.q3),_r=ge.useRef(null),Qi=Ce(Un),Tn=Ce(Ar),Ua=rn!=null,xa=!!(Ua||Un.length||Ar.length),uo=!!_r.current&&(0,Pt.Z)(_r.current),[ja,ka]=ge.useState(null);(0,zt.Z)(()=>{if(xa&&_r.current){const _o=getComputedStyle(_r.current);ka(parseInt(_o.marginBottom,10))}},[xa,uo]);const co=_o=>{_o||ka(null)},fa=function(){let _o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const qa=_o?Qi:ir.errors,Oa=_o?Tn:ir.warnings;return an(qa,Oa,ir,"",!!mr,rr)}(),Ya=Fe()(ii,Xt,Kt,{[`${ii}-with-help`]:Ua||Qi.length||Tn.length,[`${ii}-has-feedback`]:fa&&mr,[`${ii}-has-success`]:fa==="success",[`${ii}-has-warning`]:fa==="warning",[`${ii}-has-error`]:fa==="error",[`${ii}-is-validating`]:fa==="validating",[`${ii}-hidden`]:br});return ge.createElement("div",{className:Ya,style:on,ref:_r},ge.createElement(en.Z,Object.assign({className:`${ii}-row`},(0,Zt.Z)(_i,["_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(Mi,Object.assign({htmlFor:_n},qe,{requiredMark:va,required:Qn!=null?Qn:na,prefixCls:_t})),ge.createElement(bn,Object.assign({},qe,ir,{errors:Qi,warnings:Tn,prefixCls:_t,status:fa,help:rn,marginBottom:ja,onErrorVisibleChanged:co}),ge.createElement(Ee.qI.Provider,{value:ca},ge.createElement(Va,{prefixCls:_t,meta:ir,errors:ir.errors,warnings:ir.warnings,hasFeedback:mr,validateStatus:fa},Yr)))),!!ja&&ge.createElement("div",{className:`${ii}-margin-offset`,style:{marginBottom:-ja}}))}const mo="__SPLIT__",Pa=null,Bt=ge.memo(qe=>{let{children:_t}=qe;return _t},(qe,_t)=>qe.value===_t.value&&qe.update===_t.update&&qe.childProps.length===_t.childProps.length&&qe.childProps.every((Xt,Kt)=>Xt===_t.childProps[Kt]));function On(qe){return qe!=null}function Fn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function $n(qe){const{name:_t,noStyle:Xt,className:Kt,dependencies:on,prefixCls:rn,shouldUpdate:Un,rules:Ar,children:rr,required:ir,label:mr,messageVariables:br,trigger:Yr="onChange",validateTrigger:_n,hidden:Qn,help:na}=qe,{getPrefixCls:ca}=ge.useContext(st.E_),{name:_i}=ge.useContext(Ee.q3),ii=le(rr),va=typeof ii=="function",_r=ge.useContext(Ee.qI),{validateTrigger:Qi}=ge.useContext(it.FieldContext),Tn=_n!==void 0?_n:Qi,Ua=On(_t),xa=ca("form",rn),[uo,ja]=vt(xa),ka=ge.useContext(it.ListContext),co=ge.useRef(),[za,fa]=Oe({}),[Ya,_o]=(0,xn.Z)(()=>Fn()),qa=Mt=>{const tn=ka==null?void 0:ka.getKey(Mt.name);if(_o(Mt.destroy?Fn():Mt,!0),Xt&&na!==!1&&_r){let Sn=Mt.name;if(Mt.destroy)Sn=co.current||Sn;else if(tn!==void 0){const[Kn,Zr]=tn;Sn=[Kn].concat((0,pe.Z)(Zr)),co.current=Sn}_r(Mt,Sn)}},Oa=(Mt,tn)=>{fa(Sn=>{const Kn=Object.assign({},Sn),Nr=[].concat((0,pe.Z)(Mt.name.slice(0,-1)),(0,pe.Z)(tn)).join(mo);return Mt.destroy?delete Kn[Nr]:Kn[Nr]=Mt,Kn})},[So,To]=ge.useMemo(()=>{const Mt=(0,pe.Z)(Ya.errors),tn=(0,pe.Z)(Ya.warnings);return Object.values(za).forEach(Sn=>{Mt.push.apply(Mt,(0,pe.Z)(Sn.errors||[])),tn.push.apply(tn,(0,pe.Z)(Sn.warnings||[]))}),[Mt,tn]},[za,Ya.errors,Ya.warnings]),fo=rt();function Vi(Mt,tn,Sn){return Xt&&!Qn?ge.createElement(Va,{prefixCls:xa,hasFeedback:qe.hasFeedback,validateStatus:qe.validateStatus,meta:Ya,errors:So,warnings:To,noStyle:!0},Mt):ge.createElement(po,Object.assign({key:"row"},qe,{className:Fe()(Kt,ja),prefixCls:xa,fieldId:tn,isRequired:Sn,errors:So,warnings:To,meta:Ya,onSubItemMetaChange:Oa}),Mt)}if(!Ua&&!va&&!on)return uo(Vi(ii));let At={};return typeof mr=="string"?At.label=mr:_t&&(At.label=String(_t)),br&&(At=Object.assign(Object.assign({},At),br)),uo(ge.createElement(it.Field,Object.assign({},qe,{messageVariables:At,trigger:Yr,validateTrigger:Tn,onMetaChange:qa}),(Mt,tn,Sn)=>{const Kn=Lt(_t).length&&tn?tn.name:[],Zr=cn(Kn,_i),Nr=ir!==void 0?ir:!!(Ar&&Ar.some(Jr=>{if(Jr&&typeof Jr=="object"&&Jr.required&&!Jr.warningOnly)return!0;if(typeof Jr=="function"){const Ki=Jr(Sn);return Ki&&Ki.required&&!Ki.warningOnly}return!1})),qr=Object.assign({},Mt);let li=null;if(Array.isArray(ii)&&Ua)li=ii;else if(!(va&&(!(Un||on)||Ua))){if(!(on&&!va&&!Ua))if((0,Te.l$)(ii)){const Jr=Object.assign(Object.assign({},ii.props),qr);if(Jr.id||(Jr.id=Zr),na||So.length>0||To.length>0||qe.extra){const ha=[];(na||So.length>0)&&ha.push(`${Zr}_help`),qe.extra&&ha.push(`${Zr}_extra`),Jr["aria-describedby"]=ha.join(" ")}So.length>0&&(Jr["aria-invalid"]="true"),Nr&&(Jr["aria-required"]="true"),(0,vn.Yr)(ii)&&(Jr.ref=fo(Kn,ii)),new Set([].concat((0,pe.Z)(Lt(Yr)),(0,pe.Z)(Lt(Tn)))).forEach(ha=>{Jr[ha]=function(){for(var Za,Na,Ra,Be,Ve,He=arguments.length,tt=new Array(He),gt=0;gt<He;gt++)tt[gt]=arguments[gt];(Ra=qr[ha])===null||Ra===void 0||(Za=Ra).call.apply(Za,[qr].concat(tt)),(Ve=(Be=ii.props)[ha])===null||Ve===void 0||(Na=Ve).call.apply(Na,[Be].concat(tt))}});const ea=[Jr["aria-required"],Jr["aria-invalid"],Jr["aria-describedby"]];li=ge.createElement(Bt,{value:qr[qe.valuePropName||"value"],update:ii,childProps:ea},(0,Te.Tm)(ii,Jr))}else va&&(Un||on)&&!Ua?li=ii(Sn):li=ii}return Vi(li,Zr,Nr)}))}const Ir=$n;Ir.useStatus=fe;var or=Ir,Sr=function(qe,_t){var Xt={};for(var Kt in qe)Object.prototype.hasOwnProperty.call(qe,Kt)&&_t.indexOf(Kt)<0&&(Xt[Kt]=qe[Kt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,Kt=Object.getOwnPropertySymbols(qe);on<Kt.length;on++)_t.indexOf(Kt[on])<0&&Object.prototype.propertyIsEnumerable.call(qe,Kt[on])&&(Xt[Kt[on]]=qe[Kt[on]]);return Xt},ut=qe=>{var{prefixCls:_t,children:Xt}=qe,Kt=Sr(qe,["prefixCls","children"]);const{getPrefixCls:on}=ge.useContext(st.E_),rn=on("form",_t),Un=ge.useMemo(()=>({prefixCls:rn,status:"error"}),[rn]);return ge.createElement(it.List,Object.assign({},Kt),(Ar,rr,ir)=>ge.createElement(Ee.Rk.Provider,{value:Un},Xt(Ar.map(mr=>Object.assign(Object.assign({},mr),{fieldKey:mr.key})),rr,{errors:ir.errors,warnings:ir.warnings})))};function bt(){const{form:qe}=(0,ge.useContext)(Ee.q3);return qe}const Ft=jt;Ft.Item=or,Ft.List=ut,Ft.ErrorList=kt,Ft.useForm=mt,Ft.useFormInstance=bt,Ft.useWatch=it.useWatch,Ft.Provider=Ee.RV,Ft.create=()=>{};var qt=Ft},31795:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Zn}});var pe=oe(42922),xe=oe(53978),Fe=oe(94184),ct=oe.n(Fe),ge=oe(87462),Me=oe(4942),Ee=oe(71002),Ce=oe(97685),he=oe(45987),ke=oe(15671),Je=oe(43144);function Pe(){return typeof BigInt=="function"}function dt(ut){return!ut&&ut!==0&&!Number.isNaN(ut)||!String(ut).trim()}function ot(ut){var bt=ut.trim(),Ft=bt.startsWith("-");Ft&&(bt=bt.slice(1)),bt=bt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),bt.startsWith(".")&&(bt="0".concat(bt));var qt=bt||"0",qe=qt.split("."),_t=qe[0]||"0",Xt=qe[1]||"0";_t==="0"&&Xt==="0"&&(Ft=!1);var Kt=Ft?"-":"";return{negative:Ft,negativeStr:Kt,trimStr:qt,integerStr:_t,decimalStr:Xt,fullStr:"".concat(Kt).concat(qt)}}function lt(ut){var bt=String(ut);return!Number.isNaN(Number(bt))&&bt.includes("e")}function nt(ut){var bt=String(ut);if(lt(ut)){var Ft=Number(bt.slice(bt.indexOf("e-")+2)),qt=bt.match(/\.(\d+)/);return qt!=null&&qt[1]&&(Ft+=qt[1].length),Ft}return bt.includes(".")&&ht(bt)?bt.length-bt.indexOf(".")-1:0}function _e(ut){var bt=String(ut);if(lt(ut)){if(ut>Number.MAX_SAFE_INTEGER)return String(Pe()?BigInt(ut).toString():Number.MAX_SAFE_INTEGER);if(ut<Number.MIN_SAFE_INTEGER)return String(Pe()?BigInt(ut).toString():Number.MIN_SAFE_INTEGER);bt=ut.toFixed(nt(bt))}return ot(bt).fullStr}function ht(ut){return typeof ut=="number"?!Number.isNaN(ut):ut?/^\s*-?\d+(\.\d+)?\s*$/.test(ut)||/^\s*-?\d+\.\s*$/.test(ut)||/^\s*-?\.\d+\s*$/.test(ut):!1}var yt=function(){function ut(bt){if((0,ke.Z)(this,ut),(0,Me.Z)(this,"origin",""),(0,Me.Z)(this,"negative",void 0),(0,Me.Z)(this,"integer",void 0),(0,Me.Z)(this,"decimal",void 0),(0,Me.Z)(this,"decimalLen",void 0),(0,Me.Z)(this,"empty",void 0),(0,Me.Z)(this,"nan",void 0),dt(bt)){this.empty=!0;return}if(this.origin=String(bt),bt==="-"||Number.isNaN(bt)){this.nan=!0;return}var Ft=bt;if(lt(Ft)&&(Ft=Number(Ft)),Ft=typeof Ft=="string"?Ft:_e(Ft),ht(Ft)){var qt=ot(Ft);this.negative=qt.negative;var qe=qt.trimStr.split(".");this.integer=BigInt(qe[0]);var _t=qe[1]||"0";this.decimal=BigInt(_t),this.decimalLen=_t.length}else this.nan=!0}return(0,Je.Z)(ut,[{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(Ft){var qt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ft,"0"));return BigInt(qt)}},{key:"negate",value:function(){var Ft=new ut(this.toString());return Ft.negative=!Ft.negative,Ft}},{key:"cal",value:function(Ft,qt,qe){var _t=Math.max(this.getDecimalStr().length,Ft.getDecimalStr().length),Xt=this.alignDecimal(_t),Kt=Ft.alignDecimal(_t),on=qt(Xt,Kt).toString(),rn=qe(_t),Un=ot(on),Ar=Un.negativeStr,rr=Un.trimStr,ir="".concat(Ar).concat(rr.padStart(rn+1,"0"));return new ut("".concat(ir.slice(0,-rn),".").concat(ir.slice(-rn)))}},{key:"add",value:function(Ft){if(this.isInvalidate())return new ut(Ft);var qt=new ut(Ft);return qt.isInvalidate()?this:this.cal(qt,function(qe,_t){return qe+_t},function(qe){return qe})}},{key:"multi",value:function(Ft){var qt=new ut(Ft);return this.isInvalidate()||qt.isInvalidate()?new ut(NaN):this.cal(qt,function(qe,_t){return qe*_t},function(qe){return qe*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(Ft){return this.toString()===(Ft==null?void 0:Ft.toString())}},{key:"lessEquals",value:function(Ft){return this.add(Ft.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ft?this.isInvalidate()?"":ot("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),ut}(),Ze=function(){function ut(bt){if((0,ke.Z)(this,ut),(0,Me.Z)(this,"origin",""),(0,Me.Z)(this,"number",void 0),(0,Me.Z)(this,"empty",void 0),dt(bt)){this.empty=!0;return}this.origin=String(bt),this.number=Number(bt)}return(0,Je.Z)(ut,[{key:"negate",value:function(){return new ut(-this.toNumber())}},{key:"add",value:function(Ft){if(this.isInvalidate())return new ut(Ft);var qt=Number(Ft);if(Number.isNaN(qt))return this;var qe=this.number+qt;if(qe>Number.MAX_SAFE_INTEGER)return new ut(Number.MAX_SAFE_INTEGER);if(qe<Number.MIN_SAFE_INTEGER)return new ut(Number.MIN_SAFE_INTEGER);var _t=Math.max(nt(this.number),nt(qt));return new ut(qe.toFixed(_t))}},{key:"multi",value:function(Ft){var qt=Number(Ft);if(this.isInvalidate()||Number.isNaN(qt))return new ut(NaN);var qe=this.number*qt;if(qe>Number.MAX_SAFE_INTEGER)return new ut(Number.MAX_SAFE_INTEGER);if(qe<Number.MIN_SAFE_INTEGER)return new ut(Number.MIN_SAFE_INTEGER);var _t=Math.max(nt(this.number),nt(qt));return new ut(qe.toFixed(_t))}},{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(Ft){return this.toNumber()===(Ft==null?void 0:Ft.toNumber())}},{key:"lessEquals",value:function(Ft){return this.add(Ft.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ft?this.isInvalidate()?"":_e(this.number):this.origin}}]),ut}();function Qe(ut){return Pe()?new yt(ut):new Ze(ut)}function be(ut,bt,Ft){var qt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ut==="")return"";var qe=ot(ut),_t=qe.negativeStr,Xt=qe.integerStr,Kt=qe.decimalStr,on="".concat(bt).concat(Kt),rn="".concat(_t).concat(Xt);if(Ft>=0){var Un=Number(Kt[Ft]);if(Un>=5&&!qt){var Ar=Qe(ut).add("".concat(_t,"0.").concat("0".repeat(Ft)).concat(10-Un));return be(Ar.toString(),bt,Ft,qt)}return Ft===0?rn:"".concat(rn).concat(bt).concat(Kt.padEnd(Ft,"0").slice(0,Ft))}return on===".0"?rn:"".concat(rn).concat(on)}var we=Qe,Ke=oe(67656),Ge=oe(67294);function vt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var pt=vt()?Ge.useLayoutEffect:Ge.useEffect,Ue=function(bt,Ft){var qt=Ge.useRef(!0);pt(function(){return bt(qt.current)},Ft),pt(function(){return qt.current=!1,function(){qt.current=!0}},[])},et=function(bt,Ft){Ue(function(qt){if(!qt)return bt()},Ft)},kt=Ue,it=oe(27183);function st(ut,bt,Ft){var qt=React.useRef({});return(!("value"in qt.current)||Ft(qt.current.condition,bt))&&(qt.current.value=ut(),qt.current.condition=bt),qt.current.value}function We(ut,bt){typeof ut=="function"?ut(bt):(0,Ee.Z)(ut)==="object"&&ut&&"current"in ut&&(ut.current=bt)}function Tt(){for(var ut=arguments.length,bt=new Array(ut),Ft=0;Ft<ut;Ft++)bt[Ft]=arguments[Ft];var qt=bt.filter(function(qe){return qe});return qt.length<=1?qt[0]:function(qe){bt.forEach(function(_t){We(_t,qe)})}}function Ut(){for(var ut=arguments.length,bt=new Array(ut),Ft=0;Ft<ut;Ft++)bt[Ft]=arguments[Ft];return useMemo(function(){return Tt.apply(void 0,bt)},bt,function(qt,qe){return qt.length!==qe.length||qt.every(function(_t,Xt){return _t!==qe[Xt]})})}function Qt(ut){var bt,Ft,qt=isMemo(ut)?ut.type.type:ut.type;return!(typeof qt=="function"&&!((bt=qt.prototype)!==null&&bt!==void 0&&bt.render)||typeof ut=="function"&&!((Ft=ut.prototype)!==null&&Ft!==void 0&&Ft.render))}function Xe(ut){return!isValidElement(ut)||isFragment(ut)?!1:Qt(ut)}var Ae={},Lt=[],cn=function(bt){Lt.push(bt)};function an(ut,bt){if(0)var Ft}function ft(ut,bt){if(0)var Ft}function mt(){Ae={}}function Yt(ut,bt,Ft){!bt&&!Ae[Ft]&&(ut(!1,Ft),Ae[Ft]=!0)}function An(ut,bt){Yt(an,ut,bt)}function dn(ut,bt){Yt(ft,ut,bt)}An.preMessage=cn,An.resetWarned=mt,An.noteOnce=dn;var nn=An;function jt(ut,bt){var Ft=(0,Ge.useRef)(null);function qt(){try{var _t=ut.selectionStart,Xt=ut.selectionEnd,Kt=ut.value,on=Kt.substring(0,_t),rn=Kt.substring(Xt);Ft.current={start:_t,end:Xt,value:Kt,beforeTxt:on,afterTxt:rn}}catch(Un){}}function qe(){if(ut&&Ft.current&&bt)try{var _t=ut.value,Xt=Ft.current,Kt=Xt.beforeTxt,on=Xt.afterTxt,rn=Xt.start,Un=_t.length;if(_t.endsWith(on))Un=_t.length-Ft.current.afterTxt.length;else if(_t.startsWith(Kt))Un=Kt.length;else{var Ar=Kt[rn-1],rr=_t.indexOf(Ar,rn-1);rr!==-1&&(Un=rr+1)}ut.setSelectionRange(Un,Un)}catch(ir){nn(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(ir.message))}}return[qt,qe]}var xn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ut=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(ut)||/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(ut==null?void 0:ut.substr(0,4))},vn=function(){var bt=(0,Ge.useState)(!1),Ft=(0,Ce.Z)(bt,2),qt=Ft[0],qe=Ft[1];return kt(function(){qe(xn())},[]),qt},Te=vn,ue=function(bt){return+setTimeout(bt,16)},le=function(bt){return clearTimeout(bt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ue=function(bt){return window.requestAnimationFrame(bt)},le=function(bt){return window.cancelAnimationFrame(bt)});var me=0,fe=new Map;function se(ut){fe.delete(ut)}var Oe=function(bt){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;me+=1;var qt=me;function qe(_t){if(_t===0)se(qt),bt();else{var Xt=ue(function(){qe(_t-1)});fe.set(qt,Xt)}}return qe(Ft),qt};Oe.cancel=function(ut){var bt=fe.get(ut);return se(bt),le(bt)};var rt=Oe,Pt=200,zt=600;function Zt(ut){var bt=ut.prefixCls,Ft=ut.upNode,qt=ut.downNode,qe=ut.upDisabled,_t=ut.downDisabled,Xt=ut.onStep,Kt=Ge.useRef(),on=Ge.useRef([]),rn=Ge.useRef();rn.current=Xt;var Un=function(){clearTimeout(Kt.current)},Ar=function(na,ca){na.preventDefault(),Un(),rn.current(ca);function _i(){rn.current(ca),Kt.current=setTimeout(_i,Pt)}Kt.current=setTimeout(_i,zt)};Ge.useEffect(function(){return function(){Un(),on.current.forEach(function(Qn){return rt.cancel(Qn)})}},[]);var rr=Te();if(rr)return null;var ir="".concat(bt,"-handler"),mr=ct()(ir,"".concat(ir,"-up"),(0,Me.Z)({},"".concat(ir,"-up-disabled"),qe)),br=ct()(ir,"".concat(ir,"-down"),(0,Me.Z)({},"".concat(ir,"-down-disabled"),_t)),Yr=function(){return on.current.push(rt(Un))},_n={unselectable:"on",role:"button",onMouseUp:Yr,onMouseLeave:Yr};return Ge.createElement("div",{className:"".concat(ir,"-wrap")},Ge.createElement("span",(0,ge.Z)({},_n,{onMouseDown:function(na){Ar(na,!0)},"aria-label":"Increase Value","aria-disabled":qe,className:mr}),Ft||Ge.createElement("span",{unselectable:"on",className:"".concat(bt,"-handler-up-inner")})),Ge.createElement("span",(0,ge.Z)({},_n,{onMouseDown:function(na){Ar(na,!1)},"aria-label":"Decrease Value","aria-disabled":_t,className:br}),qt||Ge.createElement("span",{unselectable:"on",className:"".concat(bt,"-handler-down-inner")})))}function en(ut){var bt=typeof ut=="number"?_e(ut):ot(ut).fullStr,Ft=bt.includes(".");return Ft?ot(bt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:ut+"0"}var Gt=oe(87887),tr=function(){var ut=(0,Ge.useRef)(0),bt=function(){rt.cancel(ut.current)};return(0,Ge.useEffect)(function(){return bt},[]),function(Ft){bt(),ut.current=rt(function(){Ft()})}},cr=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Wt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],bn=function(bt,Ft){return bt||Ft.isEmpty()?Ft.toString():Ft.toNumber()},lr=function(bt){var Ft=we(bt);return Ft.isInvalidate()?null:Ft},Wr=Ge.forwardRef(function(ut,bt){var Ft,qt=ut.prefixCls,qe=qt===void 0?"rc-input-number":qt,_t=ut.className,Xt=ut.style,Kt=ut.min,on=ut.max,rn=ut.step,Un=rn===void 0?1:rn,Ar=ut.defaultValue,rr=ut.value,ir=ut.disabled,mr=ut.readOnly,br=ut.upHandler,Yr=ut.downHandler,_n=ut.keyboard,Qn=ut.controls,na=Qn===void 0?!0:Qn,ca=ut.classNames,_i=ut.stringMode,ii=ut.parser,va=ut.formatter,_r=ut.precision,Qi=ut.decimalSeparator,Tn=ut.onChange,Ua=ut.onInput,xa=ut.onPressEnter,uo=ut.onStep,ja=(0,he.Z)(ut,cr),ka="".concat(qe,"-input"),co=Ge.useRef(null),za=Ge.useState(!1),fa=(0,Ce.Z)(za,2),Ya=fa[0],_o=fa[1],qa=Ge.useRef(!1),Oa=Ge.useRef(!1),So=Ge.useRef(!1),To=Ge.useState(function(){return we(rr!=null?rr:Ar)}),fo=(0,Ce.Z)(To,2),Vi=fo[0],At=fo[1];function Mt(Xn){rr===void 0&&At(Xn)}var tn=Ge.useCallback(function(Xn,jn){if(!jn)return _r>=0?_r:Math.max(nt(Xn),nt(Un))},[_r,Un]),Sn=Ge.useCallback(function(Xn){var jn=String(Xn);if(ii)return ii(jn);var nr=jn;return Qi&&(nr=nr.replace(Qi,".")),nr.replace(/[^\w.-]+/g,"")},[ii,Qi]),Kn=Ge.useRef(""),Zr=Ge.useCallback(function(Xn,jn){if(va)return va(Xn,{userTyping:jn,input:String(Kn.current)});var nr=typeof Xn=="number"?_e(Xn):Xn;if(!jn){var qn=tn(nr,jn);if(ht(nr)&&(Qi||qn>=0)){var dr=Qi||".";nr=be(nr,dr,qn)}}return nr},[va,tn,Qi]),Nr=Ge.useState(function(){var Xn=Ar!=null?Ar:rr;return Vi.isInvalidate()&&["string","number"].includes((0,Ee.Z)(Xn))?Number.isNaN(Xn)?"":Xn:Zr(Vi.toString(),!1)}),qr=(0,Ce.Z)(Nr,2),li=qr[0],Jr=qr[1];Kn.current=li;function Ki(Xn,jn){Jr(Zr(Xn.isInvalidate()?Xn.toString(!1):Xn.toString(!jn),jn))}var ea=Ge.useMemo(function(){return lr(on)},[on,_r]),ha=Ge.useMemo(function(){return lr(Kt)},[Kt,_r]),Za=Ge.useMemo(function(){return!ea||!Vi||Vi.isInvalidate()?!1:ea.lessEquals(Vi)},[ea,Vi]),Na=Ge.useMemo(function(){return!ha||!Vi||Vi.isInvalidate()?!1:Vi.lessEquals(ha)},[ha,Vi]),Ra=jt(co.current,Ya),Be=(0,Ce.Z)(Ra,2),Ve=Be[0],He=Be[1],tt=function(jn){return ea&&!jn.lessEquals(ea)?ea:ha&&!ha.lessEquals(jn)?ha:null},gt=function(jn){return!tt(jn)},Ct=function(jn,nr){var qn=jn,dr=gt(qn)||qn.isEmpty();if(!qn.isEmpty()&&!nr&&(qn=tt(qn)||qn,dr=!0),!mr&&!ir&&dr){var je=qn.toString(),Ye=tn(je,nr);return Ye>=0&&(qn=we(be(je,".",Ye)),gt(qn)||(qn=we(be(je,".",Ye,!0)))),qn.equals(Vi)||(Mt(qn),Tn==null||Tn(qn.isEmpty()?null:bn(_i,qn)),rr===void 0&&Ki(qn,nr)),qn}return Vi},It=tr(),ln=function Xn(jn){if(Ve(),Kn.current=jn,Jr(jn),!Oa.current){var nr=Sn(jn),qn=we(nr);qn.isNaN()||Ct(qn,!0)}Ua==null||Ua(jn),It(function(){var dr=jn;ii||(dr=jn.replace(/。/g,".")),dr!==jn&&Xn(dr)})},mn=function(){Oa.current=!0},Yn=function(){Oa.current=!1,ln(co.current.value)},yr=function(jn){ln(jn.target.value)},Vn=function(jn){var nr;if(!(jn&&Za||!jn&&Na)){qa.current=!1;var qn=we(So.current?en(Un):Un);jn||(qn=qn.negate());var dr=(Vi||we(0)).add(qn.toString()),je=Ct(dr,!1);uo==null||uo(bn(_i,je),{offset:So.current?en(Un):Un,type:jn?"up":"down"}),(nr=co.current)===null||nr===void 0||nr.focus()}},En=function(jn){var nr=we(Sn(li)),qn=nr;nr.isNaN()?qn=Ct(Vi,jn):qn=Ct(nr,jn),rr!==void 0?Ki(Vi,!1):qn.isNaN()||Ki(qn,!1)},wn=function(){qa.current=!0},In=function(jn){var nr=jn.key,qn=jn.shiftKey;qa.current=!0,So.current=qn,nr==="Enter"&&(Oa.current||(qa.current=!1),En(!1),xa==null||xa(jn)),_n!==!1&&!Oa.current&&["Up","ArrowUp","Down","ArrowDown"].includes(nr)&&(Vn(nr==="Up"||nr==="ArrowUp"),jn.preventDefault())},Bn=function(){qa.current=!1,So.current=!1},pr=function(){En(!1),_o(!1),qa.current=!1};return et(function(){Vi.isInvalidate()||Ki(Vi,!1)},[_r]),et(function(){var Xn=we(rr);At(Xn);var jn=we(Sn(li));(!Xn.equals(jn)||!qa.current||va)&&Ki(Xn,qa.current)},[rr]),et(function(){va&&He()},[li]),Ge.createElement("div",{className:ct()(qe,ca==null?void 0:ca.input,_t,(Ft={},(0,Me.Z)(Ft,"".concat(qe,"-focused"),Ya),(0,Me.Z)(Ft,"".concat(qe,"-disabled"),ir),(0,Me.Z)(Ft,"".concat(qe,"-readonly"),mr),(0,Me.Z)(Ft,"".concat(qe,"-not-a-number"),Vi.isNaN()),(0,Me.Z)(Ft,"".concat(qe,"-out-of-range"),!Vi.isInvalidate()&&!gt(Vi)),Ft)),style:Xt,onFocus:function(){_o(!0)},onBlur:pr,onKeyDown:In,onKeyUp:Bn,onCompositionStart:mn,onCompositionEnd:Yn,onBeforeInput:wn},na&&Ge.createElement(Zt,{prefixCls:qe,upNode:br,downNode:Yr,upDisabled:Za,downDisabled:Na,onStep:Vn}),Ge.createElement("div",{className:"".concat(ka,"-wrap")},Ge.createElement("input",(0,ge.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Kt,"aria-valuemax":on,"aria-valuenow":Vi.isInvalidate()?null:Vi.toString(),step:Un},ja,{ref:Tt(co,bt),className:ka,value:li,onChange:yr,disabled:ir,readOnly:mr}))))}),Rn=Ge.forwardRef(function(ut,bt){var Ft=ut.disabled,qt=ut.style,qe=ut.prefixCls,_t=ut.value,Xt=ut.prefix,Kt=ut.suffix,on=ut.addonBefore,rn=ut.addonAfter,Un=ut.classes,Ar=ut.className,rr=ut.classNames,ir=(0,he.Z)(ut,Wt),mr=Ge.useRef(null),br=function(_n){mr.current&&(0,Gt.nH)(mr.current,_n)};return Ge.createElement(Ke.BaseInput,{inputElement:Ge.createElement(Wr,(0,ge.Z)({prefixCls:qe,disabled:Ft,classNames:rr,ref:Tt(mr,bt)},ir)),className:Ar,triggerFocus:br,prefixCls:qe,value:_t,disabled:Ft,style:qt,prefix:Xt,suffix:Kt,addonAfter:rn,addonBefore:on,classes:Un,classNames:rr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});Rn.displayName="InputNumber";var Tr=Rn,Ca=Tr,Wi=oe(9708),Li=oe(53124),Mi=oe(46735),Ji=oe(98866),Zi=oe(98675),Ea=oe(65223),Ma=oe(4173),Gr=oe(47673),Va=oe(14747),no=oe(80110),po=oe(67968),mo=oe(45503);const Pa=(ut,bt)=>{let{componentCls:Ft,borderRadiusSM:qt,borderRadiusLG:qe}=ut;const _t=bt==="lg"?qe:qt;return{[`&-${bt}`]:{[`${Ft}-handler-wrap`]:{borderStartEndRadius:_t,borderEndEndRadius:_t},[`${Ft}-handler-up`]:{borderStartEndRadius:_t},[`${Ft}-handler-down`]:{borderEndEndRadius:_t}}}},Bt=ut=>{const{componentCls:bt,lineWidth:Ft,lineType:qt,colorBorder:qe,borderRadius:_t,fontSizeLG:Xt,controlHeightLG:Kt,controlHeightSM:on,colorError:rn,paddingInlineSM:Un,colorTextDescription:Ar,motionDurationMid:rr,handleHoverColor:ir,paddingInline:mr,paddingBlock:br,handleBg:Yr,handleActiveBg:_n,colorTextDisabled:Qn,borderRadiusSM:na,borderRadiusLG:ca,controlWidth:_i,handleVisible:ii,handleBorderColor:va}=ut;return[{[bt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Va.Wf)(ut)),(0,Gr.ik)(ut)),(0,Gr.bi)(ut,bt)),{display:"inline-block",width:_i,margin:0,padding:0,border:`${Ft}px ${qt} ${qe}`,borderRadius:_t,"&-rtl":{direction:"rtl",[`${bt}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Xt,borderRadius:ca,[`input${bt}-input`]:{height:Kt-2*Ft}},"&-sm":{padding:0,borderRadius:na,[`input${bt}-input`]:{height:on-2*Ft,padding:`0 ${Un}px`}},"&:hover":Object.assign({},(0,Gr.pU)(ut)),"&-focused":Object.assign({},(0,Gr.M1)(ut)),"&-out-of-range":{[`${bt}-input-wrap`]:{input:{color:rn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Va.Wf)(ut)),(0,Gr.s7)(ut)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${bt}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${bt}-group-addon`]:{borderRadius:ca,fontSize:ut.fontSizeLG}},"&-sm":{[`${bt}-group-addon`]:{borderRadius:na}},[`${bt}-wrapper-disabled > ${bt}-group-addon`]:Object.assign({},(0,Gr.Xy)(ut))}}),[`&-disabled ${bt}-input`]:{cursor:"not-allowed"},[bt]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Va.Wf)(ut)),{width:"100%",padding:`${br}px ${mr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:_t,outline:0,transition:`all ${rr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Gr.nz)(ut.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[bt]:Object.assign(Object.assign(Object.assign({[`&:hover ${bt}-handler-wrap, &-focused ${bt}-handler-wrap`]:{opacity:1},[`${bt}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:ut.handleWidth,height:"100%",background:Yr,borderStartStartRadius:0,borderStartEndRadius:_t,borderEndEndRadius:_t,borderEndStartRadius:0,opacity:ii===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${rr} linear ${rr}`,[`${bt}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${bt}-handler-up-inner,
${bt}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:ut.handleFontSize}}},[`${bt}-handler`]:{height:"50%",overflow:"hidden",color:Ar,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Ft}px ${qt} ${va}`,transition:`all ${rr} linear`,"&:active":{background:_n},"&:hover":{height:"60%",[`
${bt}-handler-up-inner,
${bt}-handler-down-inner
`]:{color:ir}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Va.Ro)()),{color:Ar,transition:`all ${rr} linear`,userSelect:"none"})},[`${bt}-handler-up`]:{borderStartEndRadius:_t},[`${bt}-handler-down`]:{borderBlockStart:`${Ft}px ${qt} ${va}`,borderEndEndRadius:_t}},Pa(ut,"lg")),Pa(ut,"sm")),{"&-disabled, &-readonly":{[`${bt}-handler-wrap`]:{display:"none"},[`${bt}-input`]:{color:"inherit"}},[`
${bt}-handler-up-disabled,
${bt}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${bt}-handler-up-disabled:hover &-handler-up-inner,
${bt}-handler-down-disabled:hover &-handler-down-inner
`]:{color:Qn}})},{[`${bt}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${bt}-handler-down`]:{borderBlockStartWidth:0}}}]},On=ut=>{const{componentCls:bt,paddingBlock:Ft,paddingInline:qt,inputAffixPadding:qe,controlWidth:_t,borderRadiusLG:Xt,borderRadiusSM:Kt}=ut;return{[`${bt}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Gr.ik)(ut)),(0,Gr.bi)(ut,`${bt}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:_t,padding:0,paddingInlineStart:qt,"&-lg":{borderRadius:Xt},"&-sm":{borderRadius:Kt},[`&:not(${bt}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Gr.pU)(ut)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${bt}-disabled`]:{background:"transparent"},[`> div${bt}`]:{width:"100%",border:"none",outline:"none",[`&${bt}-focused`]:{boxShadow:"none !important"}},[`input${bt}-input`]:{padding:`${Ft}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${bt}-handler-wrap`]:{zIndex:2},[bt]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:qe},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:qt,marginInlineStart:qe}}})}};var Fn=(0,po.Z)("InputNumber",ut=>{const bt=(0,mo.TS)(ut,(0,Gr.e5)(ut));return[Bt(bt),On(bt),(0,no.c)(bt)]},ut=>Object.assign(Object.assign({},(0,Gr.TM)(ut)),{controlWidth:90,handleWidth:ut.controlHeightSM-ut.lineWidth*2,handleFontSize:ut.fontSize/2,handleVisible:"auto",handleActiveBg:ut.colorFillAlter,handleBg:ut.colorBgContainer,handleHoverColor:ut.colorPrimary,handleBorderColor:ut.colorBorder})),$n=function(ut,bt){var Ft={};for(var qt in ut)Object.prototype.hasOwnProperty.call(ut,qt)&&bt.indexOf(qt)<0&&(Ft[qt]=ut[qt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,qt=Object.getOwnPropertySymbols(ut);qe<qt.length;qe++)bt.indexOf(qt[qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,qt[qe])&&(Ft[qt[qe]]=ut[qt[qe]]);return Ft};const Ir=Ge.forwardRef((ut,bt)=>{const{getPrefixCls:Ft,direction:qt}=Ge.useContext(Li.E_),qe=Ge.useRef(null);Ge.useImperativeHandle(bt,()=>qe.current);const{className:_t,rootClassName:Xt,size:Kt,disabled:on,prefixCls:rn,addonBefore:Un,addonAfter:Ar,prefix:rr,bordered:ir=!0,readOnly:mr,status:br,controls:Yr}=ut,_n=$n(ut,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Qn=Ft("input-number",rn),[na,ca]=Fn(Qn),{compactSize:_i,compactItemClassnames:ii}=(0,Ma.ri)(Qn,qt);let va=Ge.createElement(xe.Z,{className:`${Qn}-handler-up-inner`}),_r=Ge.createElement(pe.Z,{className:`${Qn}-handler-down-inner`});const Qi=typeof Yr=="boolean"?Yr:void 0;typeof Yr=="object"&&(va=typeof Yr.upIcon=="undefined"?va:Ge.createElement("span",{className:`${Qn}-handler-up-inner`},Yr.upIcon),_r=typeof Yr.downIcon=="undefined"?_r:Ge.createElement("span",{className:`${Qn}-handler-down-inner`},Yr.downIcon));const{hasFeedback:Tn,status:Ua,isFormItemInput:xa,feedbackIcon:uo}=Ge.useContext(Ea.aM),ja=(0,Wi.F)(Ua,br),ka=(0,Zi.Z)(qa=>{var Oa;return(Oa=Kt!=null?Kt:_i)!==null&&Oa!==void 0?Oa:qa}),co=Ge.useContext(Ji.Z),za=on!=null?on:co,fa=ct()({[`${Qn}-lg`]:ka==="large",[`${Qn}-sm`]:ka==="small",[`${Qn}-rtl`]:qt==="rtl",[`${Qn}-borderless`]:!ir,[`${Qn}-in-form-item`]:xa},(0,Wi.Z)(Qn,ja),ii,ca),Ya=`${Qn}-group`,_o=Ge.createElement(Ca,Object.assign({ref:qe,disabled:za,className:ct()(_t,Xt),upHandler:va,downHandler:_r,prefixCls:Qn,readOnly:mr,controls:Qi,prefix:rr,suffix:Tn&&uo,addonAfter:Ar&&Ge.createElement(Ma.BR,null,Ge.createElement(Ea.Ux,{override:!0,status:!0},Ar)),addonBefore:Un&&Ge.createElement(Ma.BR,null,Ge.createElement(Ea.Ux,{override:!0,status:!0},Un)),classNames:{input:fa},classes:{affixWrapper:ct()((0,Wi.Z)(`${Qn}-affix-wrapper`,ja,Tn),{[`${Qn}-affix-wrapper-sm`]:ka==="small",[`${Qn}-affix-wrapper-lg`]:ka==="large",[`${Qn}-affix-wrapper-rtl`]:qt==="rtl",[`${Qn}-affix-wrapper-borderless`]:!ir},ca),wrapper:ct()({[`${Ya}-rtl`]:qt==="rtl",[`${Qn}-wrapper-disabled`]:za},ca),group:ct()({[`${Qn}-group-wrapper-sm`]:ka==="small",[`${Qn}-group-wrapper-lg`]:ka==="large",[`${Qn}-group-wrapper-rtl`]:qt==="rtl"},(0,Wi.Z)(`${Qn}-group-wrapper`,ja,Tn),ca)}},_n));return na(_o)}),or=Ir,Sr=ut=>Ge.createElement(Mi.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Ge.createElement(Ir,Object.assign({},ut)));or._InternalPanelDoNotUseOrYouWillBeFired=Sr;var Zn=or},82586:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return yt},n:function(){return _e}});var pe=oe(16646),xe=oe(94184),Fe=oe.n(xe),ct=oe(67656),ge=oe(17799),Me=oe(67294),Ee=oe(9708),Ce=oe(53124),he=oe(98866),ke=oe(98675),Je=oe(65223),Pe=oe(4173),dt=oe(72922),ot=oe(47673);function lt(Ze){return!!(Ze.prefix||Ze.suffix||Ze.allowClear)}var nt=function(Ze,Qe){var be={};for(var we in Ze)Object.prototype.hasOwnProperty.call(Ze,we)&&Qe.indexOf(we)<0&&(be[we]=Ze[we]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,we=Object.getOwnPropertySymbols(Ze);Ke<we.length;Ke++)Qe.indexOf(we[Ke])<0&&Object.prototype.propertyIsEnumerable.call(Ze,we[Ke])&&(be[we[Ke]]=Ze[we[Ke]]);return be};function _e(Ze,Qe){if(!Ze)return;Ze.focus(Qe);const{cursor:be}=Qe||{};if(be){const we=Ze.value.length;switch(be){case"start":Ze.setSelectionRange(0,0);break;case"end":Ze.setSelectionRange(we,we);break;default:Ze.setSelectionRange(0,we);break}}}var yt=(0,Me.forwardRef)((Ze,Qe)=>{var be;const{prefixCls:we,bordered:Ke=!0,status:Ge,size:vt,disabled:pt,onBlur:Ue,onFocus:et,suffix:kt,allowClear:it,addonAfter:st,addonBefore:We,className:Tt,style:Ut,styles:Qt,rootClassName:Xe,onChange:Ae,classNames:Lt}=Ze,cn=nt(Ze,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:an,direction:ft,input:mt}=Me.useContext(Ce.E_),Yt=an("input",we),An=(0,Me.useRef)(null),[dn,nn]=(0,ot.ZP)(Yt),{compactSize:jt,compactItemClassnames:xn}=(0,Pe.ri)(Yt,ft),vn=(0,ke.Z)(cr=>{var Wt;return(Wt=vt!=null?vt:jt)!==null&&Wt!==void 0?Wt:cr}),Te=Me.useContext(he.Z),ue=pt!=null?pt:Te,{status:le,hasFeedback:me,feedbackIcon:fe}=(0,Me.useContext)(Je.aM),se=(0,Ee.F)(le,Ge),Oe=lt(Ze)||!!me,rt=(0,Me.useRef)(Oe);(0,Me.useEffect)(()=>{var cr;Oe&&rt.current,rt.current=Oe},[Oe]);const Pt=(0,dt.Z)(An,!0),zt=cr=>{Pt(),Ue==null||Ue(cr)},Zt=cr=>{Pt(),et==null||et(cr)},en=cr=>{Pt(),Ae==null||Ae(cr)},Gt=(me||kt)&&Me.createElement(Me.Fragment,null,kt,me&&fe);let tr;return typeof it=="object"&&(it!=null&&it.clearIcon)?tr=it:it&&(tr={clearIcon:Me.createElement(pe.Z,null)}),dn(Me.createElement(ct.default,Object.assign({ref:(0,ge.sQ)(Qe,An),prefixCls:Yt,autoComplete:mt==null?void 0:mt.autoComplete},cn,{disabled:ue,onBlur:zt,onFocus:Zt,style:Object.assign(Object.assign({},mt==null?void 0:mt.style),Ut),styles:Object.assign(Object.assign({},mt==null?void 0:mt.styles),Qt),suffix:Gt,allowClear:tr,className:Fe()(Tt,Xe,xn,mt==null?void 0:mt.className),onChange:en,addonAfter:st&&Me.createElement(Pe.BR,null,Me.createElement(Je.Ux,{override:!0,status:!0},st)),addonBefore:We&&Me.createElement(Pe.BR,null,Me.createElement(Je.Ux,{override:!0,status:!0},We)),classNames:Object.assign(Object.assign(Object.assign({},Lt),mt==null?void 0:mt.classNames),{input:Fe()({[`${Yt}-sm`]:vn==="small",[`${Yt}-lg`]:vn==="large",[`${Yt}-rtl`]:ft==="rtl",[`${Yt}-borderless`]:!Ke},!Oe&&(0,Ee.Z)(Yt,se),Lt==null?void 0:Lt.input,(be=mt==null?void 0:mt.classNames)===null||be===void 0?void 0:be.input,nn)}),classes:{affixWrapper:Fe()({[`${Yt}-affix-wrapper-sm`]:vn==="small",[`${Yt}-affix-wrapper-lg`]:vn==="large",[`${Yt}-affix-wrapper-rtl`]:ft==="rtl",[`${Yt}-affix-wrapper-borderless`]:!Ke},(0,Ee.Z)(`${Yt}-affix-wrapper`,se,me),nn),wrapper:Fe()({[`${Yt}-group-rtl`]:ft==="rtl"},nn),group:Fe()({[`${Yt}-group-wrapper-sm`]:vn==="small",[`${Yt}-group-wrapper-lg`]:vn==="large",[`${Yt}-group-wrapper-rtl`]:ft==="rtl",[`${Yt}-group-wrapper-disabled`]:ue},(0,Ee.Z)(`${Yt}-group-wrapper`,se,me),nn)}})))})},96330:function(Cn,Vt,oe){"use strict";var pe=oe(16646),xe=oe(94184),Fe=oe.n(xe),ct=oe(64701),ge=oe(67294),Me=oe(9708),Ee=oe(53124),Ce=oe(98866),he=oe(98675),ke=oe(65223),Je=oe(82586),Pe=oe(47673),dt=function(lt,nt){var _e={};for(var ht in lt)Object.prototype.hasOwnProperty.call(lt,ht)&&nt.indexOf(ht)<0&&(_e[ht]=lt[ht]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,ht=Object.getOwnPropertySymbols(lt);yt<ht.length;yt++)nt.indexOf(ht[yt])<0&&Object.prototype.propertyIsEnumerable.call(lt,ht[yt])&&(_e[ht[yt]]=lt[ht[yt]]);return _e};const ot=(0,ge.forwardRef)((lt,nt)=>{const{prefixCls:_e,bordered:ht=!0,size:yt,disabled:Ze,status:Qe,allowClear:be,showCount:we,classNames:Ke,rootClassName:Ge,className:vt}=lt,pt=dt(lt,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Ue,direction:et}=ge.useContext(Ee.E_),kt=(0,he.Z)(yt),it=ge.useContext(Ce.Z),st=Ze!=null?Ze:it,{status:We,hasFeedback:Tt,feedbackIcon:Ut}=ge.useContext(ke.aM),Qt=(0,Me.F)(We,Qe),Xe=ge.useRef(null);ge.useImperativeHandle(nt,()=>{var ft;return{resizableTextArea:(ft=Xe.current)===null||ft===void 0?void 0:ft.resizableTextArea,focus:mt=>{var Yt,An;(0,Je.n)((An=(Yt=Xe.current)===null||Yt===void 0?void 0:Yt.resizableTextArea)===null||An===void 0?void 0:An.textArea,mt)},blur:()=>{var mt;return(mt=Xe.current)===null||mt===void 0?void 0:mt.blur()}}});const Ae=Ue("input",_e);let Lt;typeof be=="object"&&(be!=null&&be.clearIcon)?Lt=be:be&&(Lt={clearIcon:ge.createElement(pe.Z,null)});const[cn,an]=(0,Pe.ZP)(Ae);return cn(ge.createElement(ct.default,Object.assign({},pt,{disabled:st,allowClear:Lt,className:Fe()(vt,Ge),classes:{affixWrapper:Fe()(`${Ae}-textarea-affix-wrapper`,{[`${Ae}-affix-wrapper-rtl`]:et==="rtl",[`${Ae}-affix-wrapper-borderless`]:!ht,[`${Ae}-affix-wrapper-sm`]:kt==="small",[`${Ae}-affix-wrapper-lg`]:kt==="large",[`${Ae}-textarea-show-count`]:we},(0,Me.Z)(`${Ae}-affix-wrapper`,Qt),an)},classNames:Object.assign(Object.assign({},Ke),{textarea:Fe()({[`${Ae}-borderless`]:!ht,[`${Ae}-sm`]:kt==="small",[`${Ae}-lg`]:kt==="large"},(0,Me.Z)(Ae,Qt),an,Ke==null?void 0:Ke.textarea)}),prefixCls:Ae,suffix:Tt&&ge.createElement("span",{className:`${Ae}-textarea-suffix`},Ut),showCount:we,ref:Xe})))});Vt.Z=ot},72922:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return xe}});var pe=oe(67294);function xe(Fe,ct){const ge=(0,pe.useRef)([]),Me=()=>{ge.current.push(setTimeout(()=>{var Ee,Ce,he,ke;!((Ee=Fe.current)===null||Ee===void 0)&&Ee.input&&((Ce=Fe.current)===null||Ce===void 0?void 0:Ce.input.getAttribute("type"))==="password"&&(!((he=Fe.current)===null||he===void 0)&&he.input.hasAttribute("value"))&&((ke=Fe.current)===null||ke===void 0||ke.input.removeAttribute("value"))}))};return(0,pe.useEffect)(()=>(ct&&Me(),()=>ge.current.forEach(Ee=>{Ee&&clearTimeout(Ee)})),[]),Me}},69677:function(Cn,Vt,oe){"use strict";oe.d(Vt,{default:function(){return kt}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(67294),ct=oe(53124),ge=oe(65223),Me=oe(47673),Ce=it=>{const{getPrefixCls:st,direction:We}=(0,Fe.useContext)(ct.E_),{prefixCls:Tt,className:Ut}=it,Qt=st("input-group",Tt),Xe=st("input"),[Ae,Lt]=(0,Me.ZP)(Xe),cn=xe()(Qt,{[`${Qt}-lg`]:it.size==="large",[`${Qt}-sm`]:it.size==="small",[`${Qt}-compact`]:it.compact,[`${Qt}-rtl`]:We==="rtl"},Lt,Ut),an=(0,Fe.useContext)(ge.aM),ft=(0,Fe.useMemo)(()=>Object.assign(Object.assign({},an),{isFormItemInput:!1}),[an]);return Ae(Fe.createElement("span",{className:cn,style:it.style,onMouseEnter:it.onMouseEnter,onMouseLeave:it.onMouseLeave,onFocus:it.onFocus,onBlur:it.onBlur},Fe.createElement(ge.aM.Provider,{value:ft},it.children)))},he=oe(82586),ke=oe(63237),Je=oe(99569),Pe=oe(10366),dt=oe(17799),ot=oe(72922),lt=function(it,st){var We={};for(var Tt in it)Object.prototype.hasOwnProperty.call(it,Tt)&&st.indexOf(Tt)<0&&(We[Tt]=it[Tt]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Tt=Object.getOwnPropertySymbols(it);Ut<Tt.length;Ut++)st.indexOf(Tt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(it,Tt[Ut])&&(We[Tt[Ut]]=it[Tt[Ut]]);return We};const nt=it=>it?Fe.createElement(Je.Z,null):Fe.createElement(ke.Z,null),_e={click:"onClick",hover:"onMouseOver"};var yt=Fe.forwardRef((it,st)=>{const{visibilityToggle:We=!0}=it,Tt=typeof We=="object"&&We.visible!==void 0,[Ut,Qt]=(0,Fe.useState)(()=>Tt?We.visible:!1),Xe=(0,Fe.useRef)(null);Fe.useEffect(()=>{Tt&&Qt(We.visible)},[Tt,We]);const Ae=(0,ot.Z)(Xe),Lt=()=>{const{disabled:ue}=it;ue||(Ut&&Ae(),Qt(le=>{var me;const fe=!le;return typeof We=="object"&&((me=We.onVisibleChange)===null||me===void 0||me.call(We,fe)),fe}))},cn=ue=>{const{action:le="click",iconRender:me=nt}=it,fe=_e[le]||"",se=me(Ut),Oe={[fe]:Lt,className:`${ue}-icon`,key:"passwordIcon",onMouseDown:rt=>{rt.preventDefault()},onMouseUp:rt=>{rt.preventDefault()}};return Fe.cloneElement(Fe.isValidElement(se)?se:Fe.createElement("span",null,se),Oe)},{className:an,prefixCls:ft,inputPrefixCls:mt,size:Yt}=it,An=lt(it,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:dn}=Fe.useContext(ct.E_),nn=dn("input",mt),jt=dn("input-password",ft),xn=We&&cn(jt),vn=xe()(jt,an,{[`${jt}-${Yt}`]:!!Yt}),Te=Object.assign(Object.assign({},(0,Pe.Z)(An,["suffix","iconRender","visibilityToggle"])),{type:Ut?"text":"password",className:vn,prefixCls:nn,suffix:xn});return Yt&&(Te.size=Yt),Fe.createElement(he.Z,Object.assign({ref:(0,dt.sQ)(st,Xe)},Te))}),Ze=oe(72395),Qe=oe(96159),be=oe(71577),we=oe(98675),Ke=oe(4173),Ge=function(it,st){var We={};for(var Tt in it)Object.prototype.hasOwnProperty.call(it,Tt)&&st.indexOf(Tt)<0&&(We[Tt]=it[Tt]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Tt=Object.getOwnPropertySymbols(it);Ut<Tt.length;Ut++)st.indexOf(Tt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(it,Tt[Ut])&&(We[Tt[Ut]]=it[Tt[Ut]]);return We},pt=Fe.forwardRef((it,st)=>{const{prefixCls:We,inputPrefixCls:Tt,className:Ut,size:Qt,suffix:Xe,enterButton:Ae=!1,addonAfter:Lt,loading:cn,disabled:an,onSearch:ft,onChange:mt,onCompositionStart:Yt,onCompositionEnd:An}=it,dn=Ge(it,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:nn,direction:jt}=Fe.useContext(ct.E_),xn=Fe.useRef(!1),vn=nn("input-search",We),Te=nn("input",Tt),{compactSize:ue}=(0,Ke.ri)(vn,jt),le=(0,we.Z)(bn=>{var lr;return(lr=Qt!=null?Qt:ue)!==null&&lr!==void 0?lr:bn}),me=Fe.useRef(null),fe=bn=>{bn&&bn.target&&bn.type==="click"&&ft&&ft(bn.target.value,bn,{source:"clear"}),mt&&mt(bn)},se=bn=>{var lr;document.activeElement===((lr=me.current)===null||lr===void 0?void 0:lr.input)&&bn.preventDefault()},Oe=bn=>{var lr,Wr;ft&&ft((Wr=(lr=me.current)===null||lr===void 0?void 0:lr.input)===null||Wr===void 0?void 0:Wr.value,bn,{source:"input"})},rt=bn=>{xn.current||cn||Oe(bn)},Pt=typeof Ae=="boolean"?Fe.createElement(Ze.Z,null):null,zt=`${vn}-button`;let Zt;const en=Ae||{},Gt=en.type&&en.type.__ANT_BUTTON===!0;Gt||en.type==="button"?Zt=(0,Qe.Tm)(en,Object.assign({onMouseDown:se,onClick:bn=>{var lr,Wr;(Wr=(lr=en==null?void 0:en.props)===null||lr===void 0?void 0:lr.onClick)===null||Wr===void 0||Wr.call(lr,bn),Oe(bn)},key:"enterButton"},Gt?{className:zt,size:le}:{})):Zt=Fe.createElement(be.ZP,{className:zt,type:Ae?"primary":void 0,size:le,disabled:an,key:"enterButton",onMouseDown:se,onClick:Oe,loading:cn,icon:Pt},Ae),Lt&&(Zt=[Zt,(0,Qe.Tm)(Lt,{key:"addonAfter"})]);const tr=xe()(vn,{[`${vn}-rtl`]:jt==="rtl",[`${vn}-${le}`]:!!le,[`${vn}-with-button`]:!!Ae},Ut),cr=bn=>{xn.current=!0,Yt==null||Yt(bn)},Wt=bn=>{xn.current=!1,An==null||An(bn)};return Fe.createElement(he.Z,Object.assign({ref:(0,dt.sQ)(me,st),onPressEnter:rt},dn,{size:le,onCompositionStart:cr,onCompositionEnd:Wt,prefixCls:Te,addonAfter:Zt,suffix:Xe,onChange:fe,className:tr,disabled:an}))}),Ue=oe(96330);const et=he.Z;et.Group=Ce,et.Search=pt,et.TextArea=Ue.Z,et.Password=yt;var kt=et},47673:function(Cn,Vt,oe){"use strict";oe.d(Vt,{M1:function(){return Ee},TM:function(){return Qe},Xy:function(){return Ce},bi:function(){return Je},e5:function(){return Ze},ik:function(){return Pe},nz:function(){return ge},pU:function(){return Me},s7:function(){return dt},x0:function(){return ke}});var pe=oe(14747),xe=oe(80110),Fe=oe(45503),ct=oe(67968);const ge=be=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:be,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Me=be=>({borderColor:be.hoverBorderColor}),Ee=be=>({borderColor:be.activeBorderColor,boxShadow:be.activeShadow,outline:0}),Ce=be=>({color:be.colorTextDisabled,backgroundColor:be.colorBgContainerDisabled,borderColor:be.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Me((0,Fe.TS)(be,{hoverBorderColor:be.colorBorder})))}),he=be=>{const{paddingBlockLG:we,fontSizeLG:Ke,lineHeightLG:Ge,borderRadiusLG:vt,paddingInlineLG:pt}=be;return{padding:`${we}px ${pt}px`,fontSize:Ke,lineHeight:Ge,borderRadius:vt}},ke=be=>({padding:`${be.paddingBlockSM}px ${be.paddingInlineSM}px`,borderRadius:be.borderRadiusSM}),Je=(be,we)=>{const{componentCls:Ke,colorError:Ge,colorWarning:vt,errorActiveShadow:pt,warningActiveShadow:Ue,colorErrorBorderHover:et,colorWarningBorderHover:kt}=be;return{[`&-status-error:not(${we}-disabled):not(${we}-borderless)${we}`]:{borderColor:Ge,"&:hover":{borderColor:et},"&:focus, &-focused":Object.assign({},Ee((0,Fe.TS)(be,{activeBorderColor:Ge,activeShadow:pt}))),[`${Ke}-prefix, ${Ke}-suffix`]:{color:Ge}},[`&-status-warning:not(${we}-disabled):not(${we}-borderless)${we}`]:{borderColor:vt,"&:hover":{borderColor:kt},"&:focus, &-focused":Object.assign({},Ee((0,Fe.TS)(be,{activeBorderColor:vt,activeShadow:Ue}))),[`${Ke}-prefix, ${Ke}-suffix`]:{color:vt}}}},Pe=be=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${be.paddingBlock}px ${be.paddingInline}px`,color:be.colorText,fontSize:be.fontSize,lineHeight:be.lineHeight,backgroundColor:be.colorBgContainer,backgroundImage:"none",borderWidth:be.lineWidth,borderStyle:be.lineType,borderColor:be.colorBorder,borderRadius:be.borderRadius,transition:`all ${be.motionDurationMid}`},ge(be.colorTextPlaceholder)),{"&:hover":Object.assign({},Me(be)),"&:focus, &-focused":Object.assign({},Ee(be)),"&-disabled, &[disabled]":Object.assign({},Ce(be)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:be.controlHeight,lineHeight:be.lineHeight,verticalAlign:"bottom",transition:`all ${be.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},he(be)),"&-sm":Object.assign({},ke(be)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),dt=be=>{const{componentCls:we,antCls:Ke}=be;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:be.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${we}, &-lg > ${we}-group-addon`]:Object.assign({},he(be)),[`&-sm ${we}, &-sm > ${we}-group-addon`]:Object.assign({},ke(be)),[`&-lg ${Ke}-select-single ${Ke}-select-selector`]:{height:be.controlHeightLG},[`&-sm ${Ke}-select-single ${Ke}-select-selector`]:{height:be.controlHeightSM},[`> ${we}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${we}-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 ${be.paddingInline}px`,color:be.colorText,fontWeight:"normal",fontSize:be.fontSize,textAlign:"center",backgroundColor:be.colorFillAlter,border:`${be.lineWidth}px ${be.lineType} ${be.colorBorder}`,borderRadius:be.borderRadius,transition:`all ${be.motionDurationSlow}`,lineHeight:1,[`${Ke}-select`]:{margin:`-${be.paddingBlock+1}px -${be.paddingInline}px`,[`&${Ke}-select-single:not(${Ke}-select-customize-input)`]:{[`${Ke}-select-selector`]:{backgroundColor:"inherit",border:`${be.lineWidth}px ${be.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Ke}-select-selector`]:{color:be.colorPrimary}}},[`${Ke}-cascader-picker`]:{margin:`-9px -${be.paddingInline}px`,backgroundColor:"transparent",[`${Ke}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${we}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${we}-search-with-button &`]:{zIndex:0}}},[`> ${we}:first-child, ${we}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ke}-select ${Ke}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${we}-affix-wrapper`]:{[`&:not(:first-child) ${we}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${we}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${we}:last-child, ${we}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Ke}-select ${Ke}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${we}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${we}-search &`]:{borderStartStartRadius:be.borderRadius,borderEndStartRadius:be.borderRadius}},[`&:not(:first-child), ${we}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${we}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,pe.dF)()),{[`${we}-group-addon, ${we}-group-wrap, > ${we}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:be.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${we}-affix-wrapper,
& > ${we}-number-affix-wrapper,
& > ${Ke}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-be.lineWidth,borderInlineEndWidth:be.lineWidth},[`${we}`]:{float:"none"},[`& > ${Ke}-select > ${Ke}-select-selector,
& > ${Ke}-select-auto-complete ${we},
& > ${Ke}-cascader-picker ${we},
& > ${we}-group-wrapper ${we}`]:{borderInlineEndWidth:be.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Ke}-select-focused`]:{zIndex:1},[`& > ${Ke}-select > ${Ke}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${Ke}-select:first-child > ${Ke}-select-selector,
& > ${Ke}-select-auto-complete:first-child ${we},
& > ${Ke}-cascader-picker:first-child ${we}`]:{borderStartStartRadius:be.borderRadius,borderEndStartRadius:be.borderRadius},[`& > *:last-child,
& > ${Ke}-select:last-child > ${Ke}-select-selector,
& > ${Ke}-cascader-picker:last-child ${we},
& > ${Ke}-cascader-picker-focused:last-child ${we}`]:{borderInlineEndWidth:be.lineWidth,borderStartEndRadius:be.borderRadius,borderEndEndRadius:be.borderRadius},[`& > ${Ke}-select-auto-complete ${we}`]:{verticalAlign:"top"},[`${we}-group-wrapper + ${we}-group-wrapper`]:{marginInlineStart:-be.lineWidth,[`${we}-affix-wrapper`]:{borderRadius:0}},[`${we}-group-wrapper:not(:last-child)`]:{[`&${we}-search > ${we}-group`]:{[`& > ${we}-group-addon > ${we}-search-button`]:{borderRadius:0},[`& > ${we}`]:{borderStartStartRadius:be.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:be.borderRadius}}}})}},ot=be=>{const{componentCls:we,controlHeightSM:Ke,lineWidth:Ge}=be,pt=(Ke-Ge*2-16)/2;return{[we]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,pe.Wf)(be)),Pe(be)),Je(be,we)),{'&[type="color"]':{height:be.controlHeight,[`&${we}-lg`]:{height:be.controlHeightLG},[`&${we}-sm`]:{height:Ke,paddingTop:pt,paddingBottom:pt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},lt=be=>{const{componentCls:we}=be;return{[`${we}-clear-icon`]:{margin:0,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${be.motionDurationSlow}`,"&:hover":{color:be.colorTextTertiary},"&:active":{color:be.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${be.inputAffixPadding}px`}}}},nt=be=>{const{componentCls:we,inputAffixPadding:Ke,colorTextDescription:Ge,motionDurationSlow:vt,colorIcon:pt,colorIconHover:Ue,iconCls:et}=be;return{[`${we}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Pe(be)),{display:"inline-flex",[`&:not(${we}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Me(be)),{zIndex:1,[`${we}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${we}[disabled]`]:{background:"transparent"}},[`> input${we}`]:{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"'},[`${we}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:be.paddingXS}},"&-show-count-suffix":{color:Ge},"&-show-count-has-suffix":{marginInlineEnd:be.paddingXXS},"&-prefix":{marginInlineEnd:Ke},"&-suffix":{marginInlineStart:Ke}}}),lt(be)),{[`${et}${we}-password-icon`]:{color:pt,cursor:"pointer",transition:`all ${vt}`,"&:hover":{color:Ue}}}),Je(be,`${we}-affix-wrapper`))}},_e=be=>{const{componentCls:we,colorError:Ke,colorWarning:Ge,borderRadiusLG:vt,borderRadiusSM:pt}=be;return{[`${we}-group`]:Object.assign(Object.assign(Object.assign({},(0,pe.Wf)(be)),dt(be)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${we}-group-addon`]:{borderRadius:vt,fontSize:be.fontSizeLG}},"&-sm":{[`${we}-group-addon`]:{borderRadius:pt}},"&-status-error":{[`${we}-group-addon`]:{color:Ke,borderColor:Ke}},"&-status-warning":{[`${we}-group-addon`]:{color:Ge,borderColor:Ge}},"&-disabled":{[`${we}-group-addon`]:Object.assign({},Ce(be))},[`&:not(${we}-compact-first-item):not(${we}-compact-last-item)${we}-compact-item`]:{[`${we}, ${we}-group-addon`]:{borderRadius:0}},[`&:not(${we}-compact-last-item)${we}-compact-first-item`]:{[`${we}, ${we}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${we}-compact-first-item)${we}-compact-last-item`]:{[`${we}, ${we}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},ht=be=>{const{componentCls:we,antCls:Ke}=be,Ge=`${we}-search`;return{[Ge]:{[`${we}`]:{"&:hover, &:focus":{borderColor:be.colorPrimaryHover,[`+ ${we}-group-addon ${Ge}-button:not(${Ke}-btn-primary)`]:{borderInlineStartColor:be.colorPrimaryHover}}},[`${we}-affix-wrapper`]:{borderRadius:0},[`${we}-lg`]:{lineHeight:be.lineHeightLG-2e-4},[`> ${we}-group`]:{[`> ${we}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ge}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:be.borderRadius,borderEndEndRadius:be.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ge}-button:not(${Ke}-btn-primary)`]:{color:be.colorTextDescription,"&:hover":{color:be.colorPrimaryHover},"&:active":{color:be.colorPrimaryActive},[`&${Ke}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ge}-button`]:{height:be.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ge}-button`]:{height:be.controlHeightLG},[`&-small ${Ge}-button`]:{height:be.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${we}-compact-item`]:{[`&:not(${we}-compact-last-item)`]:{[`${we}-group-addon`]:{[`${we}-search-button`]:{marginInlineEnd:-be.lineWidth,borderRadius:0}}},[`&:not(${we}-compact-first-item)`]:{[`${we},${we}-affix-wrapper`]:{borderRadius:0}},[`> ${we}-group-addon ${we}-search-button,
> ${we},
${we}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${we}-affix-wrapper-focused`]:{zIndex:2}}}}},yt=be=>{const{componentCls:we,paddingLG:Ke}=be,Ge=`${we}-textarea`;return{[Ge]:{position:"relative","&-show-count":{[`> ${we}`]:{height:"100%"},[`${we}-data-count`]:{position:"absolute",bottom:-be.fontSize*be.lineHeight,insetInlineEnd:0,color:be.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${we}`]:{paddingInlineEnd:Ke}},[`&-affix-wrapper${Ge}-has-feedback`]:{[`${we}`]:{paddingInlineEnd:Ke}},[`&-affix-wrapper${we}-affix-wrapper`]:{padding:0,[`> textarea${we}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${we}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${we}-clear-icon`]:{position:"absolute",insetInlineEnd:be.paddingXS,insetBlockStart:be.paddingXS},[`${Ge}-suffix`]:{position:"absolute",top:0,insetInlineEnd:be.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Ze(be){return(0,Fe.TS)(be,{inputAffixPadding:be.paddingXXS})}const Qe=be=>{const{controlHeight:we,fontSize:Ke,lineHeight:Ge,lineWidth:vt,controlHeightSM:pt,controlHeightLG:Ue,fontSizeLG:et,lineHeightLG:kt,paddingSM:it,controlPaddingHorizontalSM:st,controlPaddingHorizontal:We,colorFillAlter:Tt,colorPrimaryHover:Ut,controlOutlineWidth:Qt,controlOutline:Xe,colorErrorOutline:Ae,colorWarningOutline:Lt}=be;return{paddingBlock:Math.max(Math.round((we-Ke*Ge)/2*10)/10-vt,3),paddingBlockSM:Math.max(Math.round((pt-Ke*Ge)/2*10)/10-vt,0),paddingBlockLG:Math.ceil((Ue-et*kt)/2*10)/10-vt,paddingInline:it-vt,paddingInlineSM:st-vt,paddingInlineLG:We-vt,addonBg:Tt,activeBorderColor:Ut,hoverBorderColor:Ut,activeShadow:`0 0 0 ${Qt}px ${Xe}`,errorActiveShadow:`0 0 0 ${Qt}px ${Ae}`,warningActiveShadow:`0 0 0 ${Qt}px ${Lt}`}};Vt.ZP=(0,ct.Z)("Input",be=>{const we=(0,Fe.TS)(be,Ze(be));return[ot(we),yt(we),nt(we),_e(we),ht(we),(0,xe.c)(we)]},Qe)},71322:function(Cn,Vt,oe){"use strict";oe.d(Vt,{D:function(){return yt},Z:function(){return be}});var pe=oe(87462),xe=oe(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ct=Fe,ge=oe(84089),Me=function(Ke,Ge){return xe.createElement(ge.Z,(0,pe.Z)({},Ke,{ref:Ge,icon:ct}))},Ee=xe.forwardRef(Me),Ce=oe(22751),he=oe(91034),ke=oe(94184),Je=oe.n(ke),Pe=oe(10366),ot=we=>!isNaN(parseFloat(we))&&isFinite(we),lt=oe(53124),nt=oe(84321),_e=function(we,Ke){var Ge={};for(var vt in we)Object.prototype.hasOwnProperty.call(we,vt)&&Ke.indexOf(vt)<0&&(Ge[vt]=we[vt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,vt=Object.getOwnPropertySymbols(we);pt<vt.length;pt++)Ke.indexOf(vt[pt])<0&&Object.prototype.propertyIsEnumerable.call(we,vt[pt])&&(Ge[vt[pt]]=we[vt[pt]]);return Ge};const ht={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},yt=xe.createContext({}),Ze=(()=>{let we=0;return function(){let Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return we+=1,`${Ke}${we}`}})();var be=xe.forwardRef((we,Ke)=>{const{prefixCls:Ge,className:vt,trigger:pt,children:Ue,defaultCollapsed:et=!1,theme:kt="dark",style:it={},collapsible:st=!1,reverseArrow:We=!1,width:Tt=200,collapsedWidth:Ut=80,zeroWidthTriggerStyle:Qt,breakpoint:Xe,onCollapse:Ae,onBreakpoint:Lt}=we,cn=_e(we,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:an}=(0,xe.useContext)(nt.Gs),[ft,mt]=(0,xe.useState)("collapsed"in we?we.collapsed:et),[Yt,An]=(0,xe.useState)(!1);(0,xe.useEffect)(()=>{"collapsed"in we&&mt(we.collapsed)},[we.collapsed]);const dn=(ue,le)=>{"collapsed"in we||mt(ue),Ae==null||Ae(ue,le)},nn=(0,xe.useRef)();nn.current=ue=>{An(ue.matches),Lt==null||Lt(ue.matches),ft!==ue.matches&&dn(ue.matches,"responsive")},(0,xe.useEffect)(()=>{function ue(me){return nn.current(me)}let le;if(typeof window!="undefined"){const{matchMedia:me}=window;if(me&&Xe&&Xe in ht){le=me(`(max-width: ${ht[Xe]})`);try{le.addEventListener("change",ue)}catch(fe){le.addListener(ue)}ue(le)}}return()=>{try{le==null||le.removeEventListener("change",ue)}catch(me){le==null||le.removeListener(ue)}}},[Xe]),(0,xe.useEffect)(()=>{const ue=Ze("ant-sider-");return an.addSider(ue),()=>an.removeSider(ue)},[]);const jt=()=>{dn(!ft,"clickTrigger")},{getPrefixCls:xn}=(0,xe.useContext)(lt.E_),vn=()=>{const ue=xn("layout-sider",Ge),le=(0,Pe.Z)(cn,["collapsed"]),me=ft?Ut:Tt,fe=ot(me)?`${me}px`:String(me),se=parseFloat(String(Ut||0))===0?xe.createElement("span",{onClick:jt,className:Je()(`${ue}-zero-width-trigger`,`${ue}-zero-width-trigger-${We?"right":"left"}`),style:Qt},pt||xe.createElement(Ee,null)):null,Pt={expanded:We?xe.createElement(he.Z,null):xe.createElement(Ce.Z,null),collapsed:We?xe.createElement(Ce.Z,null):xe.createElement(he.Z,null)}[ft?"collapsed":"expanded"],zt=pt!==null?se||xe.createElement("div",{className:`${ue}-trigger`,onClick:jt,style:{width:fe}},pt||Pt):null,Zt=Object.assign(Object.assign({},it),{flex:`0 0 ${fe}`,maxWidth:fe,minWidth:fe,width:fe}),en=Je()(ue,`${ue}-${kt}`,{[`${ue}-collapsed`]:!!ft,[`${ue}-has-trigger`]:st&&pt!==null&&!se,[`${ue}-below`]:!!Yt,[`${ue}-zero-width`]:parseFloat(fe)===0},vt);return xe.createElement("aside",Object.assign({className:en},le,{style:Zt,ref:Ke}),xe.createElement("div",{className:`${ue}-children`},Ue),st||Yt&&se?zt:null)},Te=xe.useMemo(()=>({siderCollapsed:ft}),[ft]);return xe.createElement(yt.Provider,{value:Te},vn())})},97183:function(Cn,Vt,oe){"use strict";var pe=oe(84321),xe=oe(71322);const Fe=pe.ZP;Fe.Header=pe.h4,Fe.Footer=pe.$_,Fe.Content=pe.VY,Fe.Sider=xe.Z,Vt.default=Fe},84321:function(Cn,Vt,oe){"use strict";oe.d(Vt,{VY:function(){return Ze},$_:function(){return yt},h4:function(){return ht},Gs:function(){return dt},ZP:function(){return Qe}});var pe=oe(74902),xe=oe(94184),Fe=oe.n(xe),ct=oe(10366),ge=oe(67294),Me=oe(53124),Ee=oe(67968),he=be=>{const{componentCls:we,bodyBg:Ke,lightSiderBg:Ge,lightTriggerBg:vt,lightTriggerColor:pt}=be;return{[`${we}-sider-light`]:{background:Ge,[`${we}-sider-trigger`]:{color:pt,background:vt},[`${we}-sider-zero-width-trigger`]:{color:pt,background:vt,border:`1px solid ${Ke}`,borderInlineStart:0}}}};const ke=be=>{const{antCls:we,componentCls:Ke,colorText:Ge,triggerColor:vt,footerBg:pt,triggerBg:Ue,headerHeight:et,headerPadding:kt,headerColor:it,footerPadding:st,triggerHeight:We,zeroTriggerHeight:Tt,zeroTriggerWidth:Ut,motionDurationMid:Qt,motionDurationSlow:Xe,fontSize:Ae,borderRadius:Lt,bodyBg:cn,headerBg:an,siderBg:ft}=be;return{[Ke]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:cn,"&, *":{boxSizing:"border-box"},[`&${Ke}-has-sider`]:{flexDirection:"row",[`> ${Ke}, > ${Ke}-content`]:{width:0}},[`${Ke}-header, &${Ke}-footer`]:{flex:"0 0 auto"},[`${Ke}-sider`]:{position:"relative",minWidth:0,background:ft,transition:`all ${Qt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${we}-menu${we}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:We},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:We,color:vt,lineHeight:`${We}px`,textAlign:"center",background:Ue,cursor:"pointer",transition:`all ${Qt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:et,insetInlineEnd:-Ut,zIndex:1,width:Ut,height:Tt,color:vt,fontSize:be.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ft,borderStartStartRadius:0,borderStartEndRadius:Lt,borderEndEndRadius:Lt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Xe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Xe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Ut,borderStartStartRadius:Lt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Lt}}}}},he(be)),{"&-rtl":{direction:"rtl"}}),[`${Ke}-header`]:{height:et,padding:kt,color:it,lineHeight:`${et}px`,background:an,[`${we}-menu`]:{lineHeight:"inherit"}},[`${Ke}-footer`]:{padding:st,color:Ge,fontSize:Ae,background:pt},[`${Ke}-content`]:{flex:"auto",minHeight:0}}};var Je=(0,Ee.Z)("Layout",be=>[ke(be)],be=>{const{colorBgLayout:we,controlHeight:Ke,controlHeightLG:Ge,colorText:vt,controlHeightSM:pt,marginXXS:Ue,colorTextLightSolid:et,colorBgContainer:kt}=be,it=Ge*1.25;return{colorBgHeader:"#001529",colorBgBody:we,colorBgTrigger:"#002140",bodyBg:we,headerBg:"#001529",headerHeight:Ke*2,headerPadding:`0 ${it}px`,headerColor:vt,footerPadding:`${pt}px ${it}px`,footerBg:we,siderBg:"#001529",triggerHeight:Ge+Ue*2,triggerBg:"#002140",triggerColor:et,zeroTriggerWidth:Ge,zeroTriggerHeight:Ge,lightSiderBg:kt,lightTriggerBg:kt,lightTriggerColor:vt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Pe=function(be,we){var Ke={};for(var Ge in be)Object.prototype.hasOwnProperty.call(be,Ge)&&we.indexOf(Ge)<0&&(Ke[Ge]=be[Ge]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,Ge=Object.getOwnPropertySymbols(be);vt<Ge.length;vt++)we.indexOf(Ge[vt])<0&&Object.prototype.propertyIsEnumerable.call(be,Ge[vt])&&(Ke[Ge[vt]]=be[Ge[vt]]);return Ke};const dt=ge.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ot(be){let{suffixCls:we,tagName:Ke,displayName:Ge}=be;return vt=>ge.forwardRef((Ue,et)=>ge.createElement(vt,Object.assign({ref:et,suffixCls:we,tagName:Ke},Ue)))}const lt=ge.forwardRef((be,we)=>{const{prefixCls:Ke,suffixCls:Ge,className:vt,tagName:pt}=be,Ue=Pe(be,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:et}=ge.useContext(Me.E_),kt=et("layout",Ke),[it,st]=Je(kt),We=Ge?`${kt}-${Ge}`:kt;return it(ge.createElement(pt,Object.assign({className:Fe()(Ke||We,vt,st),ref:we},Ue)))}),nt=ge.forwardRef((be,we)=>{const{direction:Ke}=ge.useContext(Me.E_),[Ge,vt]=ge.useState([]),{prefixCls:pt,className:Ue,rootClassName:et,children:kt,hasSider:it,tagName:st,style:We}=be,Tt=Pe(be,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Ut=(0,ct.Z)(Tt,["suffixCls"]),{getPrefixCls:Qt,layout:Xe}=ge.useContext(Me.E_),Ae=Qt("layout",pt),[Lt,cn]=Je(Ae),an=Fe()(Ae,{[`${Ae}-has-sider`]:typeof it=="boolean"?it:Ge.length>0,[`${Ae}-rtl`]:Ke==="rtl"},Xe==null?void 0:Xe.className,Ue,et,cn),ft=ge.useMemo(()=>({siderHook:{addSider:mt=>{vt(Yt=>[].concat((0,pe.Z)(Yt),[mt]))},removeSider:mt=>{vt(Yt=>Yt.filter(An=>An!==mt))}}}),[]);return Lt(ge.createElement(dt.Provider,{value:ft},ge.createElement(st,Object.assign({ref:we,className:an,style:Object.assign(Object.assign({},Xe==null?void 0:Xe.style),We)},Ut),kt)))}),_e=ot({tagName:"div",displayName:"Layout"})(nt),ht=ot({suffixCls:"header",tagName:"header",displayName:"Header"})(lt),yt=ot({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(lt),Ze=ot({suffixCls:"content",tagName:"main",displayName:"Content"})(lt);var Qe=_e},76529:function(Cn,Vt,oe){"use strict";oe.d(Vt,{J:function(){return Me}});var pe=oe(67294),xe=oe(4173),Fe=oe(60276),ct=function(Ee,Ce){var he={};for(var ke in Ee)Object.prototype.hasOwnProperty.call(Ee,ke)&&Ce.indexOf(ke)<0&&(he[ke]=Ee[ke]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Je=0,ke=Object.getOwnPropertySymbols(Ee);Je<ke.length;Je++)Ce.indexOf(ke[Je])<0&&Object.prototype.propertyIsEnumerable.call(Ee,ke[Je])&&(he[ke[Je]]=Ee[ke[Je]]);return he};const ge=pe.createContext(null),Me=pe.forwardRef((Ee,Ce)=>{const{children:he}=Ee,ke=ct(Ee,["children"]),Je=pe.useContext(ge),Pe=pe.useMemo(()=>Object.assign(Object.assign({},Je),ke),[Je,ke.prefixCls,ke.mode,ke.selectable]);return pe.createElement(ge.Provider,{value:Pe},pe.createElement(xe.BR,null,(0,Fe.supportNodeRef)(he)?pe.cloneElement(he,{ref:Ce}):he))});Vt.Z=ge},68508:function(Cn,Vt,oe){"use strict";oe.d(Vt,{default:function(){return ue}});var pe=oe(78595),xe=oe(67294),Fe=oe(71322),ct=oe(94184),ge=oe.n(ct),Me=oe(53124),Ee=function(le,me){var fe={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&me.indexOf(se)<0&&(fe[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,se=Object.getOwnPropertySymbols(le);Oe<se.length;Oe++)me.indexOf(se[Oe])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Oe])&&(fe[se[Oe]]=le[se[Oe]]);return fe},he=le=>{const{prefixCls:me,className:fe,dashed:se}=le,Oe=Ee(le,["prefixCls","className","dashed"]),{getPrefixCls:rt}=xe.useContext(Me.E_),Pt=rt("menu",me),zt=ge()({[`${Pt}-item-divider-dashed`]:!!se},fe);return xe.createElement(pe.iz,Object.assign({className:zt},Oe))},ke=oe(37419),Je=oe(10366),Pe=oe(83062),dt=oe(96159),lt=(0,xe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),_e=le=>{var me;const{className:fe,children:se,icon:Oe,title:rt,danger:Pt}=le,{prefixCls:zt,firstLevel:Zt,direction:en,disableMenuItemTitleTooltip:Gt,inlineCollapsed:tr}=xe.useContext(lt),cr=Tr=>{const Ca=xe.createElement("span",{className:`${zt}-title-content`},se);return(!Oe||(0,dt.l$)(se)&&se.type==="span")&&se&&Tr&&Zt&&typeof se=="string"?xe.createElement("div",{className:`${zt}-inline-collapsed-noicon`},se.charAt(0)):Ca},{siderCollapsed:Wt}=xe.useContext(Fe.D);let bn=rt;typeof rt=="undefined"?bn=Zt?se:"":rt===!1&&(bn="");const lr={title:bn};!Wt&&!tr&&(lr.title=null,lr.open=!1);const Wr=(0,ke.Z)(se).length;let Rn=xe.createElement(pe.ck,Object.assign({},(0,Je.Z)(le,["title","icon","danger"]),{className:ge()({[`${zt}-item-danger`]:Pt,[`${zt}-item-only-child`]:(Oe?Wr+1:Wr)===1},fe),title:typeof rt=="string"?rt:void 0}),(0,dt.Tm)(Oe,{className:ge()((0,dt.l$)(Oe)?(me=Oe.props)===null||me===void 0?void 0:me.className:"",`${zt}-item-icon`)}),cr(tr));return Gt||(Rn=xe.createElement(Pe.Z,Object.assign({},lr,{placement:en==="rtl"?"left":"right",overlayClassName:`${zt}-inline-collapsed-tooltip`}),Rn)),Rn},yt=le=>{var me;const{popupClassName:fe,icon:se,title:Oe,theme:rt}=le,Pt=xe.useContext(lt),{prefixCls:zt,inlineCollapsed:Zt,theme:en}=Pt,Gt=(0,pe.Xl)();let tr;if(!se)tr=Zt&&!Gt.length&&Oe&&typeof Oe=="string"?xe.createElement("div",{className:`${zt}-inline-collapsed-noicon`},Oe.charAt(0)):xe.createElement("span",{className:`${zt}-title-content`},Oe);else{const Wt=(0,dt.l$)(Oe)&&Oe.type==="span";tr=xe.createElement(xe.Fragment,null,(0,dt.Tm)(se,{className:ge()((0,dt.l$)(se)?(me=se.props)===null||me===void 0?void 0:me.className:"",`${zt}-item-icon`)}),Wt?Oe:xe.createElement("span",{className:`${zt}-title-content`},Oe))}const cr=xe.useMemo(()=>Object.assign(Object.assign({},Pt),{firstLevel:!1}),[Pt]);return xe.createElement(lt.Provider,{value:cr},xe.createElement(pe.Wd,Object.assign({},(0,Je.Z)(le,["icon"]),{title:tr,popupClassName:ge()(zt,fe,`${zt}-${rt||en}`)})))},Ze=oe(25877),Qe=oe(60276),be=oe(33603),we=oe(76529),Ke=function(le,me){var fe={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&me.indexOf(se)<0&&(fe[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,se=Object.getOwnPropertySymbols(le);Oe<se.length;Oe++)me.indexOf(se[Oe])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Oe])&&(fe[se[Oe]]=le[se[Oe]]);return fe};function Ge(le){return(le||[]).map((me,fe)=>{if(me&&typeof me=="object"){const se=me,{label:Oe,children:rt,key:Pt,type:zt}=se,Zt=Ke(se,["label","children","key","type"]),en=Pt!=null?Pt:`tmp-${fe}`;return rt||zt==="group"?zt==="group"?xe.createElement(pe.BW,Object.assign({key:en},Zt,{title:Oe}),Ge(rt)):xe.createElement(yt,Object.assign({key:en},Zt,{title:Oe}),Ge(rt)):zt==="divider"?xe.createElement(he,Object.assign({key:en},Zt)):xe.createElement(_e,Object.assign({key:en},Zt),Oe)}return null}).filter(me=>me)}function vt(le){return xe.useMemo(()=>le&&Ge(le),[le])}var pt=oe(84780),Ue=oe(14747),et=oe(33507),kt=oe(67771),it=oe(50438),st=oe(67968),We=oe(45503),Ut=le=>{const{componentCls:me,motionDurationSlow:fe,horizontalLineHeight:se,colorSplit:Oe,lineWidth:rt,lineType:Pt,itemPaddingInline:zt}=le;return{[`${me}-horizontal`]:{lineHeight:se,border:0,borderBottom:`${rt}px ${Pt} ${Oe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${me}-item, ${me}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:zt},[`> ${me}-item:hover,
> ${me}-item-active,
> ${me}-submenu ${me}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${me}-item, ${me}-submenu-title`]:{transition:[`border-color ${fe}`,`background ${fe}`].join(",")},[`${me}-submenu-arrow`]:{display:"none"}}}},Xe=le=>{let{componentCls:me,menuArrowOffset:fe}=le;return{[`${me}-rtl`]:{direction:"rtl"},[`${me}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${me}-rtl${me}-vertical,
${me}-submenu-rtl ${me}-vertical`]:{[`${me}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${fe})`},"&::after":{transform:`rotate(45deg) translateY(${fe})`}}}}};const Ae=le=>Object.assign({},(0,Ue.oN)(le));var cn=(le,me)=>{const{componentCls:fe,itemColor:se,itemSelectedColor:Oe,groupTitleColor:rt,itemBg:Pt,subMenuItemBg:zt,itemSelectedBg:Zt,activeBarHeight:en,activeBarWidth:Gt,activeBarBorderWidth:tr,motionDurationSlow:cr,motionEaseInOut:Wt,motionEaseOut:bn,itemPaddingInline:lr,motionDurationMid:Wr,itemHoverColor:Rn,lineType:Tr,colorSplit:Ca,itemDisabledColor:Wi,dangerItemColor:Li,dangerItemHoverColor:Mi,dangerItemSelectedColor:Ji,dangerItemActiveBg:Zi,dangerItemSelectedBg:Ea,itemHoverBg:Ma,itemActiveBg:Gr,menuSubMenuBg:Va,horizontalItemSelectedColor:no,horizontalItemSelectedBg:po,horizontalItemBorderRadius:mo,horizontalItemHoverBg:Pa,popupBg:Bt}=le;return{[`${fe}-${me}, ${fe}-${me} > ${fe}`]:{color:se,background:Pt,[`&${fe}-root:focus-visible`]:Object.assign({},Ae(le)),[`${fe}-item-group-title`]:{color:rt},[`${fe}-submenu-selected`]:{[`> ${fe}-submenu-title`]:{color:Oe}},[`${fe}-item-disabled, ${fe}-submenu-disabled`]:{color:`${Wi} !important`},[`${fe}-item:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{[`&:hover, > ${fe}-submenu-title:hover`]:{color:Rn}},[`&:not(${fe}-horizontal)`]:{[`${fe}-item:not(${fe}-item-selected)`]:{"&:hover":{backgroundColor:Ma},"&:active":{backgroundColor:Gr}},[`${fe}-submenu-title`]:{"&:hover":{backgroundColor:Ma},"&:active":{backgroundColor:Gr}}},[`${fe}-item-danger`]:{color:Li,[`&${fe}-item:hover`]:{[`&:not(${fe}-item-selected):not(${fe}-submenu-selected)`]:{color:Mi}},[`&${fe}-item:active`]:{background:Zi}},[`${fe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${fe}-item-selected`]:{color:Oe,[`&${fe}-item-danger`]:{color:Ji},"a, a:hover":{color:"inherit"}},[`& ${fe}-item-selected`]:{backgroundColor:Zt,[`&${fe}-item-danger`]:{backgroundColor:Ea}},[`${fe}-item, ${fe}-submenu-title`]:{[`&:not(${fe}-item-disabled):focus-visible`]:Object.assign({},Ae(le))},[`&${fe}-submenu > ${fe}`]:{backgroundColor:Va},[`&${fe}-popup > ${fe}`]:{backgroundColor:Bt},[`&${fe}-horizontal`]:Object.assign(Object.assign({},me==="dark"?{borderBottom:0}:{}),{[`> ${fe}-item, > ${fe}-submenu`]:{top:tr,marginTop:-tr,marginBottom:0,borderRadius:mo,"&::after":{position:"absolute",insetInline:lr,bottom:0,borderBottom:`${en}px solid transparent`,transition:`border-color ${cr} ${Wt}`,content:'""'},"&:hover, &-active, &-open":{background:Pa,"&::after":{borderBottomWidth:en,borderBottomColor:no}},"&-selected":{color:no,backgroundColor:po,"&:hover":{backgroundColor:po},"&::after":{borderBottomWidth:en,borderBottomColor:no}}}}),[`&${fe}-root`]:{[`&${fe}-inline, &${fe}-vertical`]:{borderInlineEnd:`${tr}px ${Tr} ${Ca}`}},[`&${fe}-inline`]:{[`${fe}-sub${fe}-inline`]:{background:zt},[`${fe}-item, ${fe}-submenu-title`]:tr&&Gt?{width:`calc(100% + ${tr}px)`}:{},[`${fe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Gt}px solid ${Oe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Wr} ${bn}`,`opacity ${Wr} ${bn}`].join(","),content:'""'},[`&${fe}-item-danger`]:{"&::after":{borderInlineEndColor:Ji}}},[`${fe}-selected, ${fe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Wr} ${Wt}`,`opacity ${Wr} ${Wt}`].join(",")}}}}}};const an=le=>{const{componentCls:me,itemHeight:fe,itemMarginInline:se,padding:Oe,menuArrowSize:rt,marginXS:Pt,itemMarginBlock:zt}=le,Zt=Oe+rt+Pt;return{[`${me}-item`]:{position:"relative",overflow:"hidden"},[`${me}-item, ${me}-submenu-title`]:{height:fe,lineHeight:`${fe}px`,paddingInline:Oe,overflow:"hidden",textOverflow:"ellipsis",marginInline:se,marginBlock:zt,width:`calc(100% - ${se*2}px)`},[`> ${me}-item,
> ${me}-submenu > ${me}-submenu-title`]:{height:fe,lineHeight:`${fe}px`},[`${me}-item-group-list ${me}-submenu-title,
${me}-submenu-title`]:{paddingInlineEnd:Zt}}};var mt=le=>{const{componentCls:me,iconCls:fe,itemHeight:se,colorTextLightSolid:Oe,dropdownWidth:rt,controlHeightLG:Pt,motionDurationMid:zt,motionEaseOut:Zt,paddingXL:en,itemMarginInline:Gt,fontSizeLG:tr,motionDurationSlow:cr,paddingXS:Wt,boxShadowSecondary:bn,collapsedWidth:lr,collapsedIconSize:Wr}=le,Rn={height:se,lineHeight:`${se}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[me]:{"&-inline, &-vertical":Object.assign({[`&${me}-root`]:{boxShadow:"none"}},an(le))},[`${me}-submenu-popup`]:{[`${me}-vertical`]:Object.assign(Object.assign({},an(le)),{boxShadow:bn})}},{[`${me}-submenu-popup ${me}-vertical${me}-sub`]:{minWidth:rt,maxHeight:`calc(100vh - ${Pt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${me}-inline`]:{width:"100%",[`&${me}-root`]:{[`${me}-item, ${me}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${cr}`,`background ${cr}`,`padding ${zt} ${Zt}`].join(","),[`> ${me}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${me}-sub${me}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${me}-submenu > ${me}-submenu-title`]:Rn,[`& ${me}-item-group-title`]:{paddingInlineStart:en}},[`${me}-item`]:Rn}},{[`${me}-inline-collapsed`]:{width:lr,[`&${me}-root`]:{[`${me}-item, ${me}-submenu ${me}-submenu-title`]:{[`> ${me}-inline-collapsed-noicon`]:{fontSize:tr,textAlign:"center"}}},[`> ${me}-item,
> ${me}-item-group > ${me}-item-group-list > ${me}-item,
> ${me}-item-group > ${me}-item-group-list > ${me}-submenu > ${me}-submenu-title,
> ${me}-submenu > ${me}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${tr/2}px - ${Gt}px)`,textOverflow:"clip",[`
${me}-submenu-arrow,
${me}-submenu-expand-icon
`]:{opacity:0},[`${me}-item-icon, ${fe}`]:{margin:0,fontSize:Wr,lineHeight:`${se}px`,"+ span":{display:"inline-block",opacity:0}}},[`${me}-item-icon, ${fe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${me}-item-icon, ${fe}`]:{display:"none"},"a, a:hover":{color:Oe}},[`${me}-item-group-title`]:Object.assign(Object.assign({},Ue.vS),{paddingInline:Wt})}}]};const Yt=le=>{const{componentCls:me,motionDurationSlow:fe,motionDurationMid:se,motionEaseInOut:Oe,motionEaseOut:rt,iconCls:Pt,iconSize:zt,iconMarginInlineEnd:Zt}=le;return{[`${me}-item, ${me}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${fe}`,`background ${fe}`,`padding ${fe} ${Oe}`].join(","),[`${me}-item-icon, ${Pt}`]:{minWidth:zt,fontSize:zt,transition:[`font-size ${se} ${rt}`,`margin ${fe} ${Oe}`,`color ${fe}`].join(","),"+ span":{marginInlineStart:Zt,opacity:1,transition:[`opacity ${fe} ${Oe}`,`margin ${fe}`,`color ${fe}`].join(",")}},[`${me}-item-icon`]:Object.assign({},(0,Ue.Ro)()),[`&${me}-item-only-child`]:{[`> ${Pt}, > ${me}-item-icon`]:{marginInlineEnd:0}}},[`${me}-item-disabled, ${me}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${me}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},An=le=>{const{componentCls:me,motionDurationSlow:fe,motionEaseInOut:se,borderRadius:Oe,menuArrowSize:rt,menuArrowOffset:Pt}=le;return{[`${me}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:le.margin,width:rt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${fe} ${se}, opacity ${fe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:rt*.6,height:rt*.15,backgroundColor:"currentcolor",borderRadius:Oe,transition:[`background ${fe} ${se}`,`transform ${fe} ${se}`,`top ${fe} ${se}`,`color ${fe} ${se}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Pt})`},"&::after":{transform:`rotate(-45deg) translateY(${Pt})`}}}}},dn=le=>{const{antCls:me,componentCls:fe,fontSize:se,motionDurationSlow:Oe,motionDurationMid:rt,motionEaseInOut:Pt,paddingXS:zt,padding:Zt,colorSplit:en,lineWidth:Gt,zIndexPopup:tr,borderRadiusLG:cr,subMenuItemBorderRadius:Wt,menuArrowSize:bn,menuArrowOffset:lr,lineType:Wr,menuPanelMaskInset:Rn,groupTitleLineHeight:Tr,groupTitleFontSize:Ca}=le;return[{"":{[`${fe}`]:Object.assign(Object.assign({},(0,Ue.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,Ue.Wf)(le)),(0,Ue.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:se,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Oe} 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:le.itemBorderRadius},[`${fe}-item-group-title`]:{padding:`${zt}px ${Zt}px`,fontSize:Ca,lineHeight:Tr,transition:`all ${Oe}`},[`&-horizontal ${fe}-submenu`]:{transition:[`border-color ${Oe} ${Pt}`,`background ${Oe} ${Pt}`].join(",")},[`${fe}-submenu, ${fe}-submenu-inline`]:{transition:[`border-color ${Oe} ${Pt}`,`background ${Oe} ${Pt}`,`padding ${rt} ${Pt}`].join(",")},[`${fe}-submenu ${fe}-sub`]:{cursor:"initial",transition:[`background ${Oe} ${Pt}`,`padding ${Oe} ${Pt}`].join(",")},[`${fe}-title-content`]:{transition:`color ${Oe}`},[`${fe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${fe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:en,borderStyle:Wr,borderWidth:0,borderTopWidth:Gt,marginBlock:Gt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Yt(le)),{[`${fe}-item-group`]:{[`${fe}-item-group-list`]:{margin:0,padding:0,[`${fe}-item, ${fe}-submenu-title`]:{paddingInline:`${se*2}px ${Zt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:tr,borderRadius:cr,boxShadow:"none",transformOrigin:"0 0",[`&${fe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Rn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Rn},"\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:le.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:le.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:le.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:le.paddingXS},[`> ${fe}`]:Object.assign(Object.assign(Object.assign({borderRadius:cr},Yt(le)),An(le)),{[`${fe}-item, ${fe}-submenu > ${fe}-submenu-title`]:{borderRadius:Wt},[`${fe}-submenu-title::after`]:{transition:`transform ${Oe} ${Pt}`}})}}),An(le)),{[`&-inline-collapsed ${fe}-submenu-arrow,
&-inline ${fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${lr})`},"&::after":{transform:`rotate(45deg) translateX(-${lr})`}},[`${fe}-submenu-open${fe}-submenu-inline > ${fe}-submenu-title > ${fe}-submenu-arrow`]:{transform:`translateY(-${bn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${lr})`},"&::before":{transform:`rotate(45deg) translateX(${lr})`}}})},{[`${me}-layout-header`]:{[fe]:{lineHeight:"inherit"}}}]};var nn=(le,me)=>(0,st.Z)("Menu",se=>{if(me===!1)return[];const{colorBgElevated:Oe,colorPrimary:rt,colorTextLightSolid:Pt,controlHeightLG:zt,fontSize:Zt,darkItemColor:en,darkDangerItemColor:Gt,darkItemBg:tr,darkSubMenuItemBg:cr,darkItemSelectedColor:Wt,darkItemSelectedBg:bn,darkDangerItemSelectedBg:lr,darkItemHoverBg:Wr,darkGroupTitleColor:Rn,darkItemHoverColor:Tr,darkItemDisabledColor:Ca,darkDangerItemHoverColor:Wi,darkDangerItemSelectedColor:Li,darkDangerItemActiveBg:Mi}=se,Ji=Zt/7*5,Zi=(0,We.TS)(se,{menuArrowSize:Ji,menuHorizontalHeight:zt*1.15,menuArrowOffset:`${Ji*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Oe}),Ea=(0,We.TS)(Zi,{itemColor:en,itemHoverColor:Tr,groupTitleColor:Rn,itemSelectedColor:Wt,itemBg:tr,popupBg:tr,subMenuItemBg:cr,itemActiveBg:"transparent",itemSelectedBg:bn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Wr,itemDisabledColor:Ca,dangerItemColor:Gt,dangerItemHoverColor:Wi,dangerItemSelectedColor:Li,dangerItemActiveBg:Mi,dangerItemSelectedBg:lr,menuSubMenuBg:cr,horizontalItemSelectedColor:Pt,horizontalItemSelectedBg:rt});return[dn(Zi),Ut(Zi),mt(Zi),cn(Zi,"light"),cn(Ea,"dark"),Xe(Zi),(0,et.Z)(Zi),(0,kt.oN)(Zi,"slide-up"),(0,kt.oN)(Zi,"slide-down"),(0,it._y)(Zi,"zoom-big")]},se=>{const{colorPrimary:Oe,colorError:rt,colorTextDisabled:Pt,colorErrorBg:zt,colorText:Zt,colorTextDescription:en,colorBgContainer:Gt,colorFillAlter:tr,colorFillContent:cr,lineWidth:Wt,lineWidthBold:bn,controlItemBgActive:lr,colorBgTextHover:Wr,controlHeightLG:Rn,lineHeight:Tr,colorBgElevated:Ca,marginXXS:Wi,padding:Li,fontSize:Mi,controlHeightSM:Ji,fontSizeLG:Zi,colorTextLightSolid:Ea,colorErrorHover:Ma}=se,Gr=new pt.C(Ea).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:se.zIndexPopupBase+50,radiusItem:se.borderRadiusLG,itemBorderRadius:se.borderRadiusLG,radiusSubMenuItem:se.borderRadiusSM,subMenuItemBorderRadius:se.borderRadiusSM,colorItemText:Zt,itemColor:Zt,colorItemTextHover:Zt,itemHoverColor:Zt,colorItemTextHoverHorizontal:Oe,horizontalItemHoverColor:Oe,colorGroupTitle:en,groupTitleColor:en,colorItemTextSelected:Oe,itemSelectedColor:Oe,colorItemTextSelectedHorizontal:Oe,horizontalItemSelectedColor:Oe,colorItemBg:Gt,itemBg:Gt,colorItemBgHover:Wr,itemHoverBg:Wr,colorItemBgActive:cr,itemActiveBg:lr,colorSubItemBg:tr,subMenuItemBg:tr,colorItemBgSelected:lr,itemSelectedBg:lr,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:bn,activeBarHeight:bn,colorActiveBarBorderSize:Wt,activeBarBorderWidth:Wt,colorItemTextDisabled:Pt,itemDisabledColor:Pt,colorDangerItemText:rt,dangerItemColor:rt,colorDangerItemTextHover:rt,dangerItemHoverColor:rt,colorDangerItemTextSelected:rt,dangerItemSelectedColor:rt,colorDangerItemBgActive:zt,dangerItemActiveBg:zt,colorDangerItemBgSelected:zt,dangerItemSelectedBg:zt,itemMarginInline:se.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Rn,groupTitleLineHeight:Tr,collapsedWidth:Rn*2,popupBg:Ca,itemMarginBlock:Wi,itemPaddingInline:Li,horizontalLineHeight:`${Rn*1.15}px`,iconSize:Mi,iconMarginInlineEnd:Ji-Mi,collapsedIconSize:Zi,groupTitleFontSize:Mi,darkItemDisabledColor:new pt.C(Ea).setAlpha(.25).toRgbString(),darkItemColor:Gr,darkDangerItemColor:rt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Ea,darkItemSelectedBg:Oe,darkDangerItemSelectedBg:rt,darkItemHoverBg:"transparent",darkGroupTitleColor:Gr,darkItemHoverColor:Ea,darkDangerItemHoverColor:Ma,darkDangerItemSelectedColor:Ea,darkDangerItemActiveBg:rt}},{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"]]})(le),jt=function(le,me){var fe={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&me.indexOf(se)<0&&(fe[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,se=Object.getOwnPropertySymbols(le);Oe<se.length;Oe++)me.indexOf(se[Oe])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Oe])&&(fe[se[Oe]]=le[se[Oe]]);return fe},vn=(0,xe.forwardRef)((le,me)=>{var fe,se;const Oe=xe.useContext(we.Z),rt=Oe||{},{getPrefixCls:Pt,getPopupContainer:zt,direction:Zt,menu:en}=xe.useContext(Me.E_),Gt=Pt(),{prefixCls:tr,className:cr,style:Wt,theme:bn="light",expandIcon:lr,_internalDisableMenuItemTitleTooltip:Wr,inlineCollapsed:Rn,siderCollapsed:Tr,items:Ca,children:Wi,rootClassName:Li,mode:Mi,selectable:Ji,onClick:Zi,overflowedIndicatorPopupClassName:Ea}=le,Ma=jt(le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Gr=(0,Je.Z)(Ma,["collapsedWidth"]),Va=vt(Ca)||Wi;(fe=rt.validator)===null||fe===void 0||fe.call(rt,{mode:Mi});const no=(0,Qe.useEvent)(function(){var Zn;Zi==null||Zi.apply(void 0,arguments),(Zn=rt.onClick)===null||Zn===void 0||Zn.call(rt)}),po=rt.mode||Mi,mo=Ji!=null?Ji:rt.selectable,Pa=xe.useMemo(()=>Tr!==void 0?Tr:Rn,[Rn,Tr]),Bt={horizontal:{motionName:`${Gt}-slide-up`},inline:(0,be.Z)(Gt),other:{motionName:`${Gt}-zoom-big`}},On=Pt("menu",tr||rt.prefixCls),[Fn,$n]=nn(On,!Oe),Ir=ge()(`${On}-${bn}`,en==null?void 0:en.className,cr);let or;if(typeof lr=="function")or=lr;else if(lr===null||lr===!1)or=null;else if(rt.expandIcon===null||rt.expandIcon===!1)or=null;else{const Zn=lr!=null?lr:rt.expandIcon;or=(0,dt.Tm)(Zn,{className:ge()(`${On}-submenu-expand-icon`,(0,dt.l$)(Zn)?(se=Zn.props)===null||se===void 0?void 0:se.className:"")})}const Sr=xe.useMemo(()=>({prefixCls:On,inlineCollapsed:Pa||!1,direction:Zt,firstLevel:!0,theme:bn,mode:po,disableMenuItemTitleTooltip:Wr}),[On,Pa,Zt,Wr,bn]);return Fn(xe.createElement(we.Z.Provider,{value:null},xe.createElement(lt.Provider,{value:Sr},xe.createElement(pe.ZP,Object.assign({getPopupContainer:zt,overflowedIndicator:xe.createElement(Ze.Z,null),overflowedIndicatorPopupClassName:ge()(On,`${On}-${bn}`,Ea),mode:po,selectable:mo,onClick:no},Gr,{inlineCollapsed:Pa,style:Object.assign(Object.assign({},en==null?void 0:en.style),Wt),className:Ir,prefixCls:On,direction:Zt,defaultMotions:Bt,expandIcon:or,ref:me,rootClassName:ge()(Li,$n)}),Va))))});const Te=(0,xe.forwardRef)((le,me)=>{const fe=(0,xe.useRef)(null),se=xe.useContext(Fe.D);return(0,xe.useImperativeHandle)(me,()=>({menu:fe.current,focus:Oe=>{var rt;(rt=fe.current)===null||rt===void 0||rt.focus(Oe)}})),xe.createElement(vn,Object.assign({ref:fe},le,se))});Te.Item=_e,Te.SubMenu=yt,Te.Divider=he,Te.ItemGroup=pe.BW;var ue=Te},78045:function(Cn,Vt,oe){"use strict";oe.d(Vt,{ZP:function(){return Xe}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(5663),ct=oe(1337),ge=oe(67294),Me=oe(53124),Ee=oe(98675);const Ce=ge.createContext(null),he=Ce.Provider;var ke=Ce;const Je=ge.createContext(null),Pe=Je.Provider;var dt=oe(95860),ot=oe(17799),lt=oe(98866),nt=oe(65223),_e=oe(14747),ht=oe(67968),yt=oe(45503);const Ze=Ae=>{const{componentCls:Lt,antCls:cn}=Ae,an=`${Lt}-group`;return{[an]:Object.assign(Object.assign({},(0,_e.Wf)(Ae)),{display:"inline-block",fontSize:0,[`&${an}-rtl`]:{direction:"rtl"},[`${cn}-badge ${cn}-badge-count`]:{zIndex:1},[`> ${cn}-badge:not(:first-child) > ${cn}-button-wrapper`]:{borderInlineStart:"none"}})}},Qe=Ae=>{const{componentCls:Lt,wrapperMarginInlineEnd:cn,colorPrimary:an,radioSize:ft,motionDurationSlow:mt,motionDurationMid:Yt,motionEaseInOutCirc:An,colorBgContainer:dn,colorBorder:nn,lineWidth:jt,dotSize:xn,colorBgContainerDisabled:vn,colorTextDisabled:Te,paddingXS:ue,dotColorDisabled:le,lineType:me,radioDotDisabledSize:fe,wireframe:se,colorWhite:Oe}=Ae,rt=`${Lt}-inner`;return{[`${Lt}-wrapper`]:Object.assign(Object.assign({},(0,_e.Wf)(Ae)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:cn,cursor:"pointer",[`&${Lt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ae.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${Lt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${jt}px ${me} ${an}`,borderRadius:"50%",visibility:"hidden",content:'""'},[Lt]:Object.assign(Object.assign({},(0,_e.Wf)(Ae)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Lt}-wrapper:hover &,
&:hover ${rt}`]:{borderColor:an},[`${Lt}-input:focus-visible + ${rt}`]:Object.assign({},(0,_e.oN)(Ae)),[`${Lt}:hover::after, ${Lt}-wrapper:hover &::after`]:{visibility:"visible"},[`${Lt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:ft,height:ft,marginBlockStart:ft/-2,marginInlineStart:ft/-2,backgroundColor:se?an:Oe,borderBlockStart:0,borderInlineStart:0,borderRadius:ft,transform:"scale(0)",opacity:0,transition:`all ${mt} ${An}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:ft,height:ft,backgroundColor:dn,borderColor:nn,borderStyle:"solid",borderWidth:jt,borderRadius:"50%",transition:`all ${Yt}`},[`${Lt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Lt}-checked`]:{[rt]:{borderColor:an,backgroundColor:se?dn:an,"&::after":{transform:`scale(${xn/ft})`,opacity:1,transition:`all ${mt} ${An}`}}},[`${Lt}-disabled`]:{cursor:"not-allowed",[rt]:{backgroundColor:vn,borderColor:nn,cursor:"not-allowed","&::after":{backgroundColor:le}},[`${Lt}-input`]:{cursor:"not-allowed"},[`${Lt}-disabled + span`]:{color:Te,cursor:"not-allowed"},[`&${Lt}-checked`]:{[rt]:{"&::after":{transform:`scale(${fe/ft})`}}}},[`span${Lt} + *`]:{paddingInlineStart:ue,paddingInlineEnd:ue}})}},be=Ae=>{const{buttonColor:Lt,controlHeight:cn,componentCls:an,lineWidth:ft,lineType:mt,colorBorder:Yt,motionDurationSlow:An,motionDurationMid:dn,buttonPaddingInline:nn,fontSize:jt,buttonBg:xn,fontSizeLG:vn,controlHeightLG:Te,controlHeightSM:ue,paddingXS:le,borderRadius:me,borderRadiusSM:fe,borderRadiusLG:se,buttonCheckedBg:Oe,buttonSolidCheckedColor:rt,colorTextDisabled:Pt,colorBgContainerDisabled:zt,buttonCheckedBgDisabled:Zt,buttonCheckedColorDisabled:en,colorPrimary:Gt,colorPrimaryHover:tr,colorPrimaryActive:cr,buttonSolidCheckedBg:Wt,buttonSolidCheckedHoverBg:bn,buttonSolidCheckedActiveBg:lr}=Ae;return{[`${an}-button-wrapper`]:{position:"relative",display:"inline-block",height:cn,margin:0,paddingInline:nn,paddingBlock:0,color:Lt,fontSize:jt,lineHeight:`${cn-ft*2}px`,background:xn,border:`${ft}px ${mt} ${Yt}`,borderBlockStartWidth:ft+.02,borderInlineStartWidth:0,borderInlineEndWidth:ft,cursor:"pointer",transition:[`color ${dn}`,`background ${dn}`,`box-shadow ${dn}`].join(","),a:{color:Lt},[`> ${an}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-ft,insetInlineStart:-ft,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:ft,paddingInline:0,backgroundColor:Yt,transition:`background-color ${An}`,content:'""'}},"&:first-child":{borderInlineStart:`${ft}px ${mt} ${Yt}`,borderStartStartRadius:me,borderEndStartRadius:me},"&:last-child":{borderStartEndRadius:me,borderEndEndRadius:me},"&:first-child:last-child":{borderRadius:me},[`${an}-group-large &`]:{height:Te,fontSize:vn,lineHeight:`${Te-ft*2}px`,"&:first-child":{borderStartStartRadius:se,borderEndStartRadius:se},"&:last-child":{borderStartEndRadius:se,borderEndEndRadius:se}},[`${an}-group-small &`]:{height:ue,paddingInline:le-ft,paddingBlock:0,lineHeight:`${ue-ft*2}px`,"&:first-child":{borderStartStartRadius:fe,borderEndStartRadius:fe},"&:last-child":{borderStartEndRadius:fe,borderEndEndRadius:fe}},"&:hover":{position:"relative",color:Gt},"&:has(:focus-visible)":Object.assign({},(0,_e.oN)(Ae)),[`${an}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${an}-button-wrapper-disabled)`]:{zIndex:1,color:Gt,background:Oe,borderColor:Gt,"&::before":{backgroundColor:Gt},"&:first-child":{borderColor:Gt},"&:hover":{color:tr,borderColor:tr,"&::before":{backgroundColor:tr}},"&:active":{color:cr,borderColor:cr,"&::before":{backgroundColor:cr}}},[`${an}-group-solid &-checked:not(${an}-button-wrapper-disabled)`]:{color:rt,background:Wt,borderColor:Wt,"&:hover":{color:rt,background:bn,borderColor:bn},"&:active":{color:rt,background:lr,borderColor:lr}},"&-disabled":{color:Pt,backgroundColor:zt,borderColor:Yt,cursor:"not-allowed","&:first-child, &:hover":{color:Pt,backgroundColor:zt,borderColor:Yt}},[`&-disabled${an}-button-wrapper-checked`]:{color:en,backgroundColor:Zt,borderColor:Yt,boxShadow:"none"}}}},we=Ae=>Ae-4*2;var Ke=(0,ht.Z)("Radio",Ae=>{const{controlOutline:Lt,controlOutlineWidth:cn,radioSize:an}=Ae,ft=`0 0 0 ${cn}px ${Lt}`,mt=ft,Yt=we(an),An=(0,yt.TS)(Ae,{radioDotDisabledSize:Yt,radioFocusShadow:ft,radioButtonFocusShadow:mt});return[Ze(An),Qe(An),be(An)]},Ae=>{const{wireframe:Lt,padding:cn,marginXS:an,lineWidth:ft,fontSizeLG:mt,colorText:Yt,colorBgContainer:An,colorTextDisabled:dn,controlItemBgActiveDisabled:nn,colorTextLightSolid:jt,colorPrimary:xn,colorPrimaryHover:vn,colorPrimaryActive:Te}=Ae,ue=4,le=mt,me=Lt?we(le):le-(ue+ft)*2;return{radioSize:le,dotSize:me,dotColorDisabled:dn,buttonSolidCheckedColor:jt,buttonSolidCheckedBg:xn,buttonSolidCheckedHoverBg:vn,buttonSolidCheckedActiveBg:Te,buttonBg:An,buttonCheckedBg:An,buttonColor:Yt,buttonCheckedBgDisabled:nn,buttonCheckedColorDisabled:dn,buttonPaddingInline:cn-ft,wrapperMarginInlineEnd:an}}),Ge=oe(45353),vt=oe(92429),pt=function(Ae,Lt){var cn={};for(var an in Ae)Object.prototype.hasOwnProperty.call(Ae,an)&&Lt.indexOf(an)<0&&(cn[an]=Ae[an]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,an=Object.getOwnPropertySymbols(Ae);ft<an.length;ft++)Lt.indexOf(an[ft])<0&&Object.prototype.propertyIsEnumerable.call(Ae,an[ft])&&(cn[an[ft]]=Ae[an[ft]]);return cn};const Ue=(Ae,Lt)=>{var cn,an;const ft=ge.useContext(ke),mt=ge.useContext(Je),{getPrefixCls:Yt,direction:An,radio:dn}=ge.useContext(Me.E_),nn=ge.useRef(null),jt=(0,ot.sQ)(Lt,nn),{isFormItemInput:xn}=ge.useContext(nt.aM),vn=cr=>{var Wt,bn;(Wt=Ae.onChange)===null||Wt===void 0||Wt.call(Ae,cr),(bn=ft==null?void 0:ft.onChange)===null||bn===void 0||bn.call(ft,cr)},{prefixCls:Te,className:ue,rootClassName:le,children:me,style:fe}=Ae,se=pt(Ae,["prefixCls","className","rootClassName","children","style"]),Oe=Yt("radio",Te),rt=((ft==null?void 0:ft.optionType)||mt)==="button",Pt=rt?`${Oe}-button`:Oe,[zt,Zt]=Ke(Oe),en=Object.assign({},se),Gt=ge.useContext(lt.Z);ft&&(en.name=ft.name,en.onChange=vn,en.checked=Ae.value===ft.value,en.disabled=(cn=en.disabled)!==null&&cn!==void 0?cn:ft.disabled),en.disabled=(an=en.disabled)!==null&&an!==void 0?an:Gt;const tr=xe()(`${Pt}-wrapper`,{[`${Pt}-wrapper-checked`]:en.checked,[`${Pt}-wrapper-disabled`]:en.disabled,[`${Pt}-wrapper-rtl`]:An==="rtl",[`${Pt}-wrapper-in-form-item`]:xn},dn==null?void 0:dn.className,ue,le,Zt);return zt(ge.createElement(Ge.Z,{component:"Radio",disabled:en.disabled},ge.createElement("label",{className:tr,style:Object.assign(Object.assign({},dn==null?void 0:dn.style),fe),onMouseEnter:Ae.onMouseEnter,onMouseLeave:Ae.onMouseLeave},ge.createElement(dt.Z,Object.assign({},en,{className:xe()(en.className,!rt&&vt.A),type:"radio",prefixCls:Pt,ref:jt})),me!==void 0?ge.createElement("span",null,me):null)))};var kt=ge.forwardRef(Ue);const it=ge.forwardRef((Ae,Lt)=>{const{getPrefixCls:cn,direction:an}=ge.useContext(Me.E_),[ft,mt]=(0,Fe.Z)(Ae.defaultValue,{value:Ae.value}),Yt=Wt=>{const bn=ft,lr=Wt.target.value;"value"in Ae||mt(lr);const{onChange:Wr}=Ae;Wr&&lr!==bn&&Wr(Wt)},{prefixCls:An,className:dn,rootClassName:nn,options:jt,buttonStyle:xn="outline",disabled:vn,children:Te,size:ue,style:le,id:me,onMouseEnter:fe,onMouseLeave:se,onFocus:Oe,onBlur:rt}=Ae,Pt=cn("radio",An),zt=`${Pt}-group`,[Zt,en]=Ke(Pt);let Gt=Te;jt&&jt.length>0&&(Gt=jt.map(Wt=>typeof Wt=="string"||typeof Wt=="number"?ge.createElement(kt,{key:Wt.toString(),prefixCls:Pt,disabled:vn,value:Wt,checked:ft===Wt},Wt):ge.createElement(kt,{key:`radio-group-value-options-${Wt.value}`,prefixCls:Pt,disabled:Wt.disabled||vn,value:Wt.value,checked:ft===Wt.value,title:Wt.title,style:Wt.style},Wt.label)));const tr=(0,Ee.Z)(ue),cr=xe()(zt,`${zt}-${xn}`,{[`${zt}-${tr}`]:tr,[`${zt}-rtl`]:an==="rtl"},dn,nn,en);return Zt(ge.createElement("div",Object.assign({},(0,ct.Z)(Ae,{aria:!0,data:!0}),{className:cr,style:le,onMouseEnter:fe,onMouseLeave:se,onFocus:Oe,onBlur:rt,id:me,ref:Lt}),ge.createElement(he,{value:{onChange:Yt,value:ft,disabled:Ae.disabled,name:Ae.name,optionType:Ae.optionType}},Gt)))});var st=ge.memo(it),We=function(Ae,Lt){var cn={};for(var an in Ae)Object.prototype.hasOwnProperty.call(Ae,an)&&Lt.indexOf(an)<0&&(cn[an]=Ae[an]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,an=Object.getOwnPropertySymbols(Ae);ft<an.length;ft++)Lt.indexOf(an[ft])<0&&Object.prototype.propertyIsEnumerable.call(Ae,an[ft])&&(cn[an[ft]]=Ae[an[ft]]);return cn};const Tt=(Ae,Lt)=>{const{getPrefixCls:cn}=ge.useContext(Me.E_),{prefixCls:an}=Ae,ft=We(Ae,["prefixCls"]),mt=cn("radio",an);return ge.createElement(Pe,{value:"button"},ge.createElement(kt,Object.assign({prefixCls:mt},ft,{type:"radio",ref:Lt})))};var Ut=ge.forwardRef(Tt);const Qt=kt;Qt.Button=Ut,Qt.Group=st,Qt.__ANT_RADIO=!0;var Xe=Qt},11713:function(Cn,Vt,oe){"use strict";oe.d(Vt,{default:function(){return dr}});var pe=oe(94184),xe=oe.n(pe),Fe=oe(87462),ct=oe(74902),ge=oe(4942),Me=oe(1413),Ee=oe(97685),Ce=oe(45987),he=oe(71002),ke=oe(67294);function Je(je){var Ye=ke.useRef();Ye.current=je;var $t=ke.useCallback(function(){for(var Dt,sn=arguments.length,kn=new Array(sn),yn=0;yn<sn;yn++)kn[yn]=arguments[yn];return(Dt=Ye.current)===null||Dt===void 0?void 0:Dt.call.apply(Dt,[Ye].concat(kn))},[]);return $t}function Pe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var dt=Pe()?ke.useLayoutEffect:ke.useEffect,ot=dt,lt=function(Ye,$t){var Dt=ke.useRef(!0);dt(function(){if(!Dt.current)return Ye()},$t),dt(function(){return Dt.current=!1,function(){Dt.current=!0}},[])};function nt(je){var Ye=ke.useRef(!1),$t=ke.useState(je),Dt=(0,Ee.Z)($t,2),sn=Dt[0],kn=Dt[1];ke.useEffect(function(){return Ye.current=!1,function(){Ye.current=!0}},[]);function yn(zn,Pn){Pn&&Ye.current||kn(zn)}return[sn,yn]}function _e(je){return je!==void 0}function ht(je,Ye){var $t=Ye||{},Dt=$t.defaultValue,sn=$t.value,kn=$t.onChange,yn=$t.postState,zn=nt(function(){return _e(sn)?sn:_e(Dt)?typeof Dt=="function"?Dt():Dt:typeof je=="function"?je():je}),Pn=(0,Ee.Z)(zn,2),pn=Pn[0],Nn=Pn[1],Wn=sn!==void 0?sn:pn,vr=yn?yn(Wn):Wn,Hn=Je(kn),Er=nt([Wn]),Qr=(0,Ee.Z)(Er,2),Rr=Qr[0],jr=Qr[1];lt(function(){var Fr=Rr[0];pn!==Fr&&Hn(pn,Fr)},[Rr]),lt(function(){_e(sn)||Nn(sn)},[sn]);var Cr=Je(function(Fr,ai){Nn(Fr,ai),jr([Wn],ai)});return[vr,Cr]}var yt={};function Ze(je,Ye){}function Qe(je,Ye){}function be(){yt={}}function we(je,Ye,$t){!Ye&&!yt[$t]&&(je(!1,$t),yt[$t]=!0)}function Ke(je,Ye){we(Ze,je,Ye)}function Ge(je,Ye){we(Qe,je,Ye)}var vt=Ke,pt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var je=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(je)||/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(je==null?void 0:je.substr(0,4))},Ue={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(Ye){var $t=Ye.keyCode;if(Ye.altKey&&!Ye.ctrlKey||Ye.metaKey||$t>=Ue.F1&&$t<=Ue.F12)return!1;switch($t){case Ue.ALT:case Ue.CAPS_LOCK:case Ue.CONTEXT_MENU:case Ue.CTRL:case Ue.DOWN:case Ue.END:case Ue.ESC:case Ue.HOME:case Ue.INSERT:case Ue.LEFT:case Ue.MAC_FF_META:case Ue.META:case Ue.NUMLOCK:case Ue.NUM_CENTER:case Ue.PAGE_DOWN:case Ue.PAGE_UP:case Ue.PAUSE:case Ue.PRINT_SCREEN:case Ue.RIGHT:case Ue.SHIFT:case Ue.UP:case Ue.WIN_KEY:case Ue.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ye){if(Ye>=Ue.ZERO&&Ye<=Ue.NINE||Ye>=Ue.NUM_ZERO&&Ye<=Ue.NUM_MULTIPLY||Ye>=Ue.A&&Ye<=Ue.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ye===0)return!0;switch(Ye){case Ue.SPACE:case Ue.QUESTION_MARK:case Ue.NUM_PLUS:case Ue.NUM_MINUS:case Ue.NUM_PERIOD:case Ue.NUM_DIVISION:case Ue.SEMICOLON:case Ue.DASH:case Ue.EQUALS:case Ue.COMMA:case Ue.PERIOD:case Ue.SLASH:case Ue.APOSTROPHE:case Ue.SINGLE_QUOTE:case Ue.OPEN_SQUARE_BRACKET:case Ue.BACKSLASH:case Ue.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},et=Ue,kt=oe(47655);function it(je,Ye,$t){var Dt=ke.useRef({});return(!("value"in Dt.current)||$t(Dt.current.condition,Ye))&&(Dt.current.value=je(),Dt.current.condition=Ye),Dt.current.value}function st(je,Ye){typeof je=="function"?je(Ye):(0,he.Z)(je)==="object"&&je&&"current"in je&&(je.current=Ye)}function We(){for(var je=arguments.length,Ye=new Array(je),$t=0;$t<je;$t++)Ye[$t]=arguments[$t];var Dt=Ye.filter(function(sn){return sn});return Dt.length<=1?Dt[0]:function(sn){Ye.forEach(function(kn){st(kn,sn)})}}function Tt(){for(var je=arguments.length,Ye=new Array(je),$t=0;$t<je;$t++)Ye[$t]=arguments[$t];return it(function(){return We.apply(void 0,Ye)},Ye,function(Dt,sn){return Dt.length===sn.length&&Dt.every(function(kn,yn){return kn===sn[yn]})})}function Ut(je){var Ye,$t,Dt=isMemo(je)?je.type.type:je.type;return!(typeof Dt=="function"&&!((Ye=Dt.prototype)!==null&&Ye!==void 0&&Ye.render)||typeof je=="function"&&!(($t=je.prototype)!==null&&$t!==void 0&&$t.render))}var Qt=function(Ye){var $t=Ye.className,Dt=Ye.customizeIcon,sn=Ye.customizeIconProps,kn=Ye.onMouseDown,yn=Ye.onClick,zn=Ye.children,Pn;return typeof Dt=="function"?Pn=Dt(sn):Pn=Dt,ke.createElement("span",{className:$t,onMouseDown:function(Nn){Nn.preventDefault(),kn&&kn(Nn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:yn,"aria-hidden":!0},Pn!==void 0?Pn:ke.createElement("span",{className:xe()($t.split(/\s+/).map(function(pn){return"".concat(pn,"-icon")}))},zn))},Xe=Qt;function Ae(je,Ye,$t,Dt,sn){var kn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,yn=arguments.length>6?arguments[6]:void 0,zn=arguments.length>7?arguments[7]:void 0,Pn=ke.useMemo(function(){if((0,he.Z)(Dt)==="object")return Dt.clearIcon;if(sn)return sn},[Dt,sn]),pn=ke.useMemo(function(){return!!(!kn&&Dt&&($t.length||yn)&&!(zn==="combobox"&&yn===""))},[Dt,kn,$t.length,yn,zn]);return{allowClear:pn,clearIcon:ke.createElement(Xe,{className:"".concat(je,"-clear"),onMouseDown:Ye,customizeIcon:Pn},"\xD7")}}var Lt=ke.createContext(null);function cn(){return ke.useContext(Lt)}function an(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ye=ke.useState(!1),$t=(0,Ee.Z)(Ye,2),Dt=$t[0],sn=$t[1],kn=ke.useRef(null),yn=function(){window.clearTimeout(kn.current)};ke.useEffect(function(){return yn},[]);var zn=function(pn,Nn){yn(),kn.current=window.setTimeout(function(){sn(pn),Nn&&Nn()},je)};return[Dt,zn,yn]}function ft(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ye=ke.useRef(null),$t=ke.useRef(null);ke.useEffect(function(){return function(){window.clearTimeout($t.current)}},[]);function Dt(sn){(sn||Ye.current===null)&&(Ye.current=sn),window.clearTimeout($t.current),$t.current=window.setTimeout(function(){Ye.current=null},je)}return[function(){return Ye.current},Dt]}function mt(je,Ye,$t,Dt){var sn=ke.useRef(null);sn.current={open:Ye,triggerOpen:$t,customizedTrigger:Dt},ke.useEffect(function(){function kn(yn){var zn;if(!((zn=sn.current)!==null&&zn!==void 0&&zn.customizedTrigger)){var Pn=yn.target;Pn.shadowRoot&&yn.composed&&(Pn=yn.composedPath()[0]||Pn),sn.current.open&&je().filter(function(pn){return pn}).every(function(pn){return!pn.contains(Pn)&&pn!==Pn})&&sn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",kn),function(){return window.removeEventListener("mousedown",kn)}},[])}var Yt=`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`,An=`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`,dn="".concat(Yt," ").concat(An).split(/[\s\n]+/),nn="aria-",jt="data-";function xn(je,Ye){return je.indexOf(Ye)===0}function vn(je){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$t;Ye===!1?$t={aria:!0,data:!0,attr:!0}:Ye===!0?$t={aria:!0}:$t=(0,Me.Z)({},Ye);var Dt={};return Object.keys(je).forEach(function(sn){($t.aria&&(sn==="role"||xn(sn,nn))||$t.data&&xn(sn,jt)||$t.attr&&dn.includes(sn))&&(Dt[sn]=je[sn])}),Dt}var Te=oe(48555),ue=oe(14075),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],me=void 0;function fe(je,Ye){var $t=je.prefixCls,Dt=je.invalidate,sn=je.item,kn=je.renderItem,yn=je.responsive,zn=je.responsiveDisabled,Pn=je.registerSize,pn=je.itemKey,Nn=je.className,Wn=je.style,vr=je.children,Hn=je.display,Er=je.order,Qr=je.component,Rr=Qr===void 0?"div":Qr,jr=(0,Ce.Z)(je,le),Cr=yn&&!Hn;function Fr(ta){Pn(pn,ta)}ke.useEffect(function(){return function(){Fr(null)}},[]);var ai=kn&&sn!==me?kn(sn):vr,hi;Dt||(hi={opacity:Cr?0:1,height:Cr?0:me,overflowY:Cr?"hidden":me,order:yn?Er:me,pointerEvents:Cr?"none":me,position:Cr?"absolute":me});var $r={};Cr&&($r["aria-hidden"]=!0);var wi=ke.createElement(Rr,(0,Fe.Z)({className:xe()(!Dt&&$t,Nn),style:(0,Me.Z)((0,Me.Z)({},hi),Wn)},$r,jr,{ref:Ye}),ai);return yn&&(wi=ke.createElement(Te.Z,{onResize:function(Ba){var ga=Ba.offsetWidth;Fr(ga)},disabled:zn},wi)),wi}var se=ke.forwardRef(fe);se.displayName="Item";var Oe=se,rt=oe(77527),Pt=oe(73935),zt=oe(96523);function Zt(je){if(typeof MessageChannel=="undefined")(0,zt.Z)(je);else{var Ye=new MessageChannel;Ye.port1.onmessage=function(){return je()},Ye.port2.postMessage(void 0)}}function en(){var je=ke.useRef(null),Ye=function(Dt){je.current||(je.current=[],Zt(function(){(0,Pt.unstable_batchedUpdates)(function(){je.current.forEach(function(sn){sn()}),je.current=null})})),je.current.push(Dt)};return Ye}function Gt(je,Ye){var $t=ke.useState(Ye),Dt=(0,Ee.Z)($t,2),sn=Dt[0],kn=Dt[1],yn=(0,rt.Z)(function(zn){je(function(){kn(zn)})});return[sn,yn]}var tr=ke.createContext(null),cr=["component"],Wt=["className"],bn=["className"],lr=function(Ye,$t){var Dt=ke.useContext(tr);if(!Dt){var sn=Ye.component,kn=sn===void 0?"div":sn,yn=(0,Ce.Z)(Ye,cr);return ke.createElement(kn,(0,Fe.Z)({},yn,{ref:$t}))}var zn=Dt.className,Pn=(0,Ce.Z)(Dt,Wt),pn=Ye.className,Nn=(0,Ce.Z)(Ye,bn);return ke.createElement(tr.Provider,{value:null},ke.createElement(Oe,(0,Fe.Z)({ref:$t,className:xe()(zn,pn)},Pn,Nn)))},Wr=ke.forwardRef(lr);Wr.displayName="RawItem";var Rn=Wr,Tr=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ca="responsive",Wi="invalidate";function Li(je){return"+ ".concat(je.length," ...")}function Mi(je,Ye){var $t=je.prefixCls,Dt=$t===void 0?"rc-overflow":$t,sn=je.data,kn=sn===void 0?[]:sn,yn=je.renderItem,zn=je.renderRawItem,Pn=je.itemKey,pn=je.itemWidth,Nn=pn===void 0?10:pn,Wn=je.ssr,vr=je.style,Hn=je.className,Er=je.maxCount,Qr=je.renderRest,Rr=je.renderRawRest,jr=je.suffix,Cr=je.component,Fr=Cr===void 0?"div":Cr,ai=je.itemComponent,hi=je.onVisibleChange,$r=(0,Ce.Z)(je,Tr),wi=Wn==="full",ta=en(),Ba=Gt(ta,null),ga=(0,Ee.Z)(Ba,2),ra=ga[0],La=ga[1],Aa=ra||0,Oi=Gt(ta,new Map),ia=(0,Ee.Z)(Oi,2),ni=ia[0],Ci=ia[1],Xi=Gt(ta,0),wa=(0,Ee.Z)(Xi,2),ri=wa[0],io=wa[1],ko=Gt(ta,0),Ja=(0,Ee.Z)(ko,2),Ta=Ja[0],Ui=Ja[1],Po=Gt(ta,0),Yi=(0,Ee.Z)(Po,2),oi=Yi[0],sa=Yi[1],Ga=(0,ke.useState)(null),la=(0,Ee.Z)(Ga,2),Ka=la[0],ki=la[1],ro=(0,ke.useState)(null),ao=(0,Ee.Z)(ro,2),eo=ao[0],oo=ao[1],wo=ke.useMemo(function(){return eo===null&&wi?Number.MAX_SAFE_INTEGER:eo||0},[eo,ra]),Ho=(0,ke.useState)(!1),to=(0,Ee.Z)(Ho,2),Co=to[0],Jo=to[1],Xo="".concat(Dt,"-item"),as=Math.max(ri,Ta),No=Er===Ca,vo=kn.length&&No,ji=Er===Wi,ua=vo||typeof Er=="number"&&kn.length>Er,Qa=(0,ke.useMemo)(function(){var Ht=kn;return vo?ra===null&&wi?Ht=kn:Ht=kn.slice(0,Math.min(kn.length,Aa/Nn)):typeof Er=="number"&&(Ht=kn.slice(0,Er)),Ht},[kn,Nn,ra,Er,vo]),ho=(0,ke.useMemo)(function(){return vo?kn.slice(wo+1):kn.slice(Qa.length)},[kn,Qa,vo,wo]),Fo=(0,ke.useCallback)(function(Ht,Rt){var fn;return typeof Pn=="function"?Pn(Ht):(fn=Pn&&(Ht==null?void 0:Ht[Pn]))!==null&&fn!==void 0?fn:Rt},[Pn]),es=(0,ke.useCallback)(yn||function(Ht){return Ht},[yn]);function ms(Ht,Rt,fn){eo===Ht&&(Rt===void 0||Rt===Ka)||(oo(Ht),fn||(Jo(Ht<kn.length-1),hi==null||hi(Ht)),Rt!==void 0&&ki(Rt))}function Rs(Ht,Rt){La(Rt.clientWidth)}function Fs(Ht,Rt){Ci(function(fn){var hn=new Map(fn);return Rt===null?hn.delete(Ht):hn.set(Ht,Rt),hn})}function os(Ht,Rt){Ui(Rt),io(Ta)}function Ts(Ht,Rt){sa(Rt)}function Fa(Ht){return ni.get(Fo(Qa[Ht],Ht))}(0,ue.Z)(function(){if(Aa&&typeof as=="number"&&Qa){var Ht=oi,Rt=Qa.length,fn=Rt-1;if(!Rt){ms(0,null);return}for(var hn=0;hn<Rt;hn+=1){var Mn=Fa(hn);if(wi&&(Mn=Mn||0),Mn===void 0){ms(hn-1,void 0,!0);break}if(Ht+=Mn,fn===0&&Ht<=Aa||hn===fn-1&&Ht+Fa(fn)<=Aa){ms(fn,null);break}else if(Ht+as>Aa){ms(hn-1,Ht-Mn-oi+Ta);break}}jr&&Fa(0)+oi>Aa&&ki(null)}},[Aa,ni,Ta,oi,Fo,Qa]);var Ni=Co&&!!ho.length,Do={};Ka!==null&&vo&&(Do={position:"absolute",left:Ka,top:0});var Eo={prefixCls:Xo,responsive:vo,component:ai,invalidate:ji},Ie=zn?function(Ht,Rt){var fn=Fo(Ht,Rt);return ke.createElement(tr.Provider,{key:fn,value:(0,Me.Z)((0,Me.Z)({},Eo),{},{order:Rt,item:Ht,itemKey:fn,registerSize:Fs,display:Rt<=wo})},zn(Ht,Rt))}:function(Ht,Rt){var fn=Fo(Ht,Rt);return ke.createElement(Oe,(0,Fe.Z)({},Eo,{order:Rt,key:fn,item:Ht,renderItem:es,itemKey:fn,registerSize:Fs,display:Rt<=wo}))},Re,St={order:Ni?wo:Number.MAX_SAFE_INTEGER,className:"".concat(Xo,"-rest"),registerSize:os,display:Ni};if(Rr)Rr&&(Re=ke.createElement(tr.Provider,{value:(0,Me.Z)((0,Me.Z)({},Eo),St)},Rr(ho)));else{var xt=Qr||Li;Re=ke.createElement(Oe,(0,Fe.Z)({},Eo,St),typeof xt=="function"?xt(ho):xt)}var Jt=ke.createElement(Fr,(0,Fe.Z)({className:xe()(!ji&&Dt,Hn),style:vr,ref:Ye},$r),Qa.map(Ie),ua?Re:null,jr&&ke.createElement(Oe,(0,Fe.Z)({},Eo,{responsive:No,responsiveDisabled:!vo,order:wo,className:"".concat(Xo,"-suffix"),registerSize:Ts,display:!0,style:Do}),jr));return No&&(Jt=ke.createElement(Te.Z,{onResize:Rs,disabled:!vo},Jt)),Jt}var Ji=ke.forwardRef(Mi);Ji.displayName="Overflow",Ji.Item=Rn,Ji.RESPONSIVE=Ca,Ji.INVALIDATE=Wi;var Zi=Ji,Ea=Zi,Ma=function(Ye,$t){var Dt,sn,kn=Ye.prefixCls,yn=Ye.id,zn=Ye.inputElement,Pn=Ye.disabled,pn=Ye.tabIndex,Nn=Ye.autoFocus,Wn=Ye.autoComplete,vr=Ye.editable,Hn=Ye.activeDescendantId,Er=Ye.value,Qr=Ye.maxLength,Rr=Ye.onKeyDown,jr=Ye.onMouseDown,Cr=Ye.onChange,Fr=Ye.onPaste,ai=Ye.onCompositionStart,hi=Ye.onCompositionEnd,$r=Ye.open,wi=Ye.attrs,ta=zn||ke.createElement("input",null),Ba=ta,ga=Ba.ref,ra=Ba.props,La=ra.onKeyDown,Aa=ra.onChange,Oi=ra.onMouseDown,ia=ra.onCompositionStart,ni=ra.onCompositionEnd,Ci=ra.style;return"maxLength"in ta.props,ta=ke.cloneElement(ta,(0,Me.Z)((0,Me.Z)((0,Me.Z)({type:"search"},ra),{},{id:yn,ref:We($t,ga),disabled:Pn,tabIndex:pn,autoComplete:Wn||"off",autoFocus:Nn,className:xe()("".concat(kn,"-selection-search-input"),(Dt=ta)===null||Dt===void 0||(sn=Dt.props)===null||sn===void 0?void 0:sn.className),role:"combobox","aria-label":"Search","aria-expanded":$r||!1,"aria-haspopup":"listbox","aria-owns":"".concat(yn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(yn,"_list"),"aria-activedescendant":$r?Hn:void 0},wi),{},{value:vr?Er:"",maxLength:Qr,readOnly:!vr,unselectable:vr?null:"on",style:(0,Me.Z)((0,Me.Z)({},Ci),{},{opacity:vr?null:0}),onKeyDown:function(wa){Rr(wa),La&&La(wa)},onMouseDown:function(wa){jr(wa),Oi&&Oi(wa)},onChange:function(wa){Cr(wa),Aa&&Aa(wa)},onCompositionStart:function(wa){ai(wa),ia&&ia(wa)},onCompositionEnd:function(wa){hi(wa),ni&&ni(wa)},onPaste:Fr})),ta},Gr=ke.forwardRef(Ma);Gr.displayName="Input";var Va=Gr;function no(je){return Array.isArray(je)?je:je!==void 0?[je]:[]}var po=typeof window!="undefined"&&window.document&&window.document.documentElement,mo=po;function Pa(je){return je!=null}function Bt(je){return!je&&je!==0}function On(je){return["string","number"].includes((0,he.Z)(je))}function Fn(je){var Ye=void 0;return je&&(On(je.title)?Ye=je.title.toString():On(je.label)&&(Ye=je.label.toString())),Ye}function $n(je,Ye){mo?ke.useLayoutEffect(je,Ye):ke.useEffect(je,Ye)}function Ir(je){var Ye;return(Ye=je.key)!==null&&Ye!==void 0?Ye:je.value}var or=function(Ye){Ye.preventDefault(),Ye.stopPropagation()},Sr=function(Ye){var $t=Ye.id,Dt=Ye.prefixCls,sn=Ye.values,kn=Ye.open,yn=Ye.searchValue,zn=Ye.autoClearSearchValue,Pn=Ye.inputRef,pn=Ye.placeholder,Nn=Ye.disabled,Wn=Ye.mode,vr=Ye.showSearch,Hn=Ye.autoFocus,Er=Ye.autoComplete,Qr=Ye.activeDescendantId,Rr=Ye.tabIndex,jr=Ye.removeIcon,Cr=Ye.maxTagCount,Fr=Ye.maxTagTextLength,ai=Ye.maxTagPlaceholder,hi=ai===void 0?function(ki){return"+ ".concat(ki.length," ...")}:ai,$r=Ye.tagRender,wi=Ye.onToggleOpen,ta=Ye.onRemove,Ba=Ye.onInputChange,ga=Ye.onInputPaste,ra=Ye.onInputKeyDown,La=Ye.onInputMouseDown,Aa=Ye.onInputCompositionStart,Oi=Ye.onInputCompositionEnd,ia=ke.useRef(null),ni=(0,ke.useState)(0),Ci=(0,Ee.Z)(ni,2),Xi=Ci[0],wa=Ci[1],ri=(0,ke.useState)(!1),io=(0,Ee.Z)(ri,2),ko=io[0],Ja=io[1],Ta="".concat(Dt,"-selection"),Ui=kn||Wn==="multiple"&&zn===!1||Wn==="tags"?yn:"",Po=Wn==="tags"||Wn==="multiple"&&zn===!1||vr&&(kn||ko);$n(function(){wa(ia.current.scrollWidth)},[Ui]);function Yi(ki,ro,ao,eo,oo){return ke.createElement("span",{className:xe()("".concat(Ta,"-item"),(0,ge.Z)({},"".concat(Ta,"-item-disabled"),ao)),title:Fn(ki)},ke.createElement("span",{className:"".concat(Ta,"-item-content")},ro),eo&&ke.createElement(Xe,{className:"".concat(Ta,"-item-remove"),onMouseDown:or,onClick:oo,customizeIcon:jr},"\xD7"))}function oi(ki,ro,ao,eo,oo){var wo=function(to){or(to),wi(!kn)};return ke.createElement("span",{onMouseDown:wo},$r({label:ro,value:ki,disabled:ao,closable:eo,onClose:oo}))}function sa(ki){var ro=ki.disabled,ao=ki.label,eo=ki.value,oo=!Nn&&!ro,wo=ao;if(typeof Fr=="number"&&(typeof ao=="string"||typeof ao=="number")){var Ho=String(wo);Ho.length>Fr&&(wo="".concat(Ho.slice(0,Fr),"..."))}var to=function(Jo){Jo&&Jo.stopPropagation(),ta(ki)};return typeof $r=="function"?oi(eo,wo,ro,oo,to):Yi(ki,wo,ro,oo,to)}function Ga(ki){var ro=typeof hi=="function"?hi(ki):hi;return Yi({title:ro},ro,!1)}var la=ke.createElement("div",{className:"".concat(Ta,"-search"),style:{width:Xi},onFocus:function(){Ja(!0)},onBlur:function(){Ja(!1)}},ke.createElement(Va,{ref:Pn,open:kn,prefixCls:Dt,id:$t,inputElement:null,disabled:Nn,autoFocus:Hn,autoComplete:Er,editable:Po,activeDescendantId:Qr,value:Ui,onKeyDown:ra,onMouseDown:La,onChange:Ba,onPaste:ga,onCompositionStart:Aa,onCompositionEnd:Oi,tabIndex:Rr,attrs:vn(Ye,!0)}),ke.createElement("span",{ref:ia,className:"".concat(Ta,"-search-mirror"),"aria-hidden":!0},Ui,"\xA0")),Ka=ke.createElement(Ea,{prefixCls:"".concat(Ta,"-overflow"),data:sn,renderItem:sa,renderRest:Ga,suffix:la,itemKey:Ir,maxCount:Cr});return ke.createElement(ke.Fragment,null,Ka,!sn.length&&!Ui&&ke.createElement("span",{className:"".concat(Ta,"-placeholder")},pn))},Zn=Sr,ut=function(Ye){var $t=Ye.inputElement,Dt=Ye.prefixCls,sn=Ye.id,kn=Ye.inputRef,yn=Ye.disabled,zn=Ye.autoFocus,Pn=Ye.autoComplete,pn=Ye.activeDescendantId,Nn=Ye.mode,Wn=Ye.open,vr=Ye.values,Hn=Ye.placeholder,Er=Ye.tabIndex,Qr=Ye.showSearch,Rr=Ye.searchValue,jr=Ye.activeValue,Cr=Ye.maxLength,Fr=Ye.onInputKeyDown,ai=Ye.onInputMouseDown,hi=Ye.onInputChange,$r=Ye.onInputPaste,wi=Ye.onInputCompositionStart,ta=Ye.onInputCompositionEnd,Ba=Ye.title,ga=ke.useState(!1),ra=(0,Ee.Z)(ga,2),La=ra[0],Aa=ra[1],Oi=Nn==="combobox",ia=Oi||Qr,ni=vr[0],Ci=Rr||"";Oi&&jr&&!La&&(Ci=jr),ke.useEffect(function(){Oi&&Aa(!1)},[Oi,jr]);var Xi=Nn!=="combobox"&&!Wn&&!Qr?!1:!!Ci,wa=Ba===void 0?Fn(ni):Ba,ri=function(){if(ni)return null;var ko=Xi?{visibility:"hidden"}:void 0;return ke.createElement("span",{className:"".concat(Dt,"-selection-placeholder"),style:ko},Hn)};return ke.createElement(ke.Fragment,null,ke.createElement("span",{className:"".concat(Dt,"-selection-search")},ke.createElement(Va,{ref:kn,prefixCls:Dt,id:sn,open:Wn,inputElement:$t,disabled:yn,autoFocus:zn,autoComplete:Pn,editable:ia,activeDescendantId:pn,value:Ci,onKeyDown:Fr,onMouseDown:ai,onChange:function(ko){Aa(!0),hi(ko)},onPaste:$r,onCompositionStart:wi,onCompositionEnd:ta,tabIndex:Er,attrs:vn(Ye,!0),maxLength:Oi?Cr:void 0})),!Oi&&ni?ke.createElement("span",{className:"".concat(Dt,"-selection-item"),title:wa,style:Xi?{visibility:"hidden"}:void 0},ni.label):null,ri())},bt=ut;function Ft(je){return![et.ESC,et.SHIFT,et.BACKSPACE,et.TAB,et.WIN_KEY,et.ALT,et.META,et.WIN_KEY_RIGHT,et.CTRL,et.SEMICOLON,et.EQUALS,et.CAPS_LOCK,et.CONTEXT_MENU,et.F1,et.F2,et.F3,et.F4,et.F5,et.F6,et.F7,et.F8,et.F9,et.F10,et.F11,et.F12].includes(je)}var qt=function(Ye,$t){var Dt=(0,ke.useRef)(null),sn=(0,ke.useRef)(!1),kn=Ye.prefixCls,yn=Ye.open,zn=Ye.mode,Pn=Ye.showSearch,pn=Ye.tokenWithEnter,Nn=Ye.autoClearSearchValue,Wn=Ye.onSearch,vr=Ye.onSearchSubmit,Hn=Ye.onToggleOpen,Er=Ye.onInputKeyDown,Qr=Ye.domRef;ke.useImperativeHandle($t,function(){return{focus:function(){Dt.current.focus()},blur:function(){Dt.current.blur()}}});var Rr=ft(0),jr=(0,Ee.Z)(Rr,2),Cr=jr[0],Fr=jr[1],ai=function(Ci){var Xi=Ci.which;(Xi===et.UP||Xi===et.DOWN)&&Ci.preventDefault(),Er&&Er(Ci),Xi===et.ENTER&&zn==="tags"&&!sn.current&&!yn&&(vr==null||vr(Ci.target.value)),Ft(Xi)&&Hn(!0)},hi=function(){Fr(!0)},$r=(0,ke.useRef)(null),wi=function(Ci){Wn(Ci,!0,sn.current)!==!1&&Hn(!0)},ta=function(){sn.current=!0},Ba=function(Ci){sn.current=!1,zn!=="combobox"&&wi(Ci.target.value)},ga=function(Ci){var Xi=Ci.target.value;if(pn&&$r.current&&/[\r\n]/.test($r.current)){var wa=$r.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Xi=Xi.replace(wa,$r.current)}$r.current=null,wi(Xi)},ra=function(Ci){var Xi=Ci.clipboardData,wa=Xi.getData("text");$r.current=wa},La=function(Ci){var Xi=Ci.target;if(Xi!==Dt.current){var wa=document.body.style.msTouchAction!==void 0;wa?setTimeout(function(){Dt.current.focus()}):Dt.current.focus()}},Aa=function(Ci){var Xi=Cr();Ci.target!==Dt.current&&!Xi&&zn!=="combobox"&&Ci.preventDefault(),(zn!=="combobox"&&(!Pn||!Xi)||!yn)&&(yn&&Nn!==!1&&Wn("",!0,!1),Hn())},Oi={inputRef:Dt,onInputKeyDown:ai,onInputMouseDown:hi,onInputChange:ga,onInputPaste:ra,onInputCompositionStart:ta,onInputCompositionEnd:Ba},ia=zn==="multiple"||zn==="tags"?ke.createElement(Zn,(0,Fe.Z)({},Ye,Oi)):ke.createElement(bt,(0,Fe.Z)({},Ye,Oi));return ke.createElement("div",{ref:Qr,className:"".concat(kn,"-selector"),onClick:La,onMouseDown:Aa},ia)},qe=ke.forwardRef(qt);qe.displayName="Selector";var _t=qe,Xt=oe(62709),Kt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],on=function(Ye){var $t=Ye===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:$t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:$t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:$t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:$t,adjustY:1},htmlRegion:"scroll"}}},rn=function(Ye,$t){var Dt=Ye.prefixCls,sn=Ye.disabled,kn=Ye.visible,yn=Ye.children,zn=Ye.popupElement,Pn=Ye.animation,pn=Ye.transitionName,Nn=Ye.dropdownStyle,Wn=Ye.dropdownClassName,vr=Ye.direction,Hn=vr===void 0?"ltr":vr,Er=Ye.placement,Qr=Ye.builtinPlacements,Rr=Ye.dropdownMatchSelectWidth,jr=Ye.dropdownRender,Cr=Ye.dropdownAlign,Fr=Ye.getPopupContainer,ai=Ye.empty,hi=Ye.getTriggerDOMNode,$r=Ye.onPopupVisibleChange,wi=Ye.onPopupMouseEnter,ta=(0,Ce.Z)(Ye,Kt),Ba="".concat(Dt,"-dropdown"),ga=zn;jr&&(ga=jr(zn));var ra=ke.useMemo(function(){return Qr||on(Rr)},[Qr,Rr]),La=Pn?"".concat(Ba,"-").concat(Pn):pn,Aa=typeof Rr=="number",Oi=ke.useMemo(function(){return Aa?null:Rr===!1?"minWidth":"width"},[Rr,Aa]),ia=Nn;Aa&&(ia=(0,Me.Z)((0,Me.Z)({},ia),{},{width:Rr}));var ni=ke.useRef(null);return ke.useImperativeHandle($t,function(){return{getPopupElement:function(){return ni.current}}}),ke.createElement(Xt.Z,(0,Fe.Z)({},ta,{showAction:$r?["click"]:[],hideAction:$r?["click"]:[],popupPlacement:Er||(Hn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ra,prefixCls:Ba,popupTransitionName:La,popup:ke.createElement("div",{ref:ni,onMouseEnter:wi},ga),stretch:Oi,popupAlign:Cr,popupVisible:kn,getPopupContainer:Fr,popupClassName:xe()(Wn,(0,ge.Z)({},"".concat(Ba,"-empty"),ai)),popupStyle:ia,getTriggerDOMNode:hi,onPopupVisibleChange:$r}),yn)},Un=ke.forwardRef(rn);Un.displayName="SelectTrigger";var Ar=Un,rr=oe(84506);function ir(je,Ye){var $t=je.key,Dt;return"value"in je&&(Dt=je.value),$t!=null?$t:Dt!==void 0?Dt:"rc-index-key-".concat(Ye)}function mr(je,Ye){var $t=je||{},Dt=$t.label,sn=$t.value,kn=$t.options,yn=$t.groupLabel,zn=Dt||(Ye?"children":"label");return{label:zn,value:sn||"value",options:kn||"options",groupLabel:yn||zn}}function br(je){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$t=Ye.fieldNames,Dt=Ye.childrenAsData,sn=[],kn=mr($t,!1),yn=kn.label,zn=kn.value,Pn=kn.options,pn=kn.groupLabel;function Nn(Wn,vr){Wn.forEach(function(Hn){if(vr||!(Pn in Hn)){var Er=Hn[zn];sn.push({key:ir(Hn,sn.length),groupOption:vr,data:Hn,label:Hn[yn],value:Er})}else{var Qr=Hn[pn];Qr===void 0&&Dt&&(Qr=Hn.label),sn.push({key:ir(Hn,sn.length),group:!0,data:Hn,label:Qr}),Nn(Hn[Pn],!0)}})}return Nn(je,!1),sn}function Yr(je){var Ye=(0,Me.Z)({},je);return"props"in Ye||Object.defineProperty(Ye,"props",{get:function(){return vt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ye}}),Ye}function _n(je,Ye){if(!Ye||!Ye.length)return null;var $t=!1;function Dt(kn,yn){var zn=(0,rr.Z)(yn),Pn=zn[0],pn=zn.slice(1);if(!Pn)return[kn];var Nn=kn.split(Pn);return $t=$t||Nn.length>1,Nn.reduce(function(Wn,vr){return[].concat((0,ct.Z)(Wn),(0,ct.Z)(Dt(vr,pn)))},[]).filter(function(Wn){return Wn})}var sn=Dt(je,Ye);return $t?sn:null}var Qn=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],na=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function ca(je){return je==="tags"||je==="multiple"}var _i=ke.forwardRef(function(je,Ye){var $t,Dt,sn=je.id,kn=je.prefixCls,yn=je.className,zn=je.showSearch,Pn=je.tagRender,pn=je.direction,Nn=je.omitDomProps,Wn=je.displayValues,vr=je.onDisplayValuesChange,Hn=je.emptyOptions,Er=je.notFoundContent,Qr=Er===void 0?"Not Found":Er,Rr=je.onClear,jr=je.mode,Cr=je.disabled,Fr=je.loading,ai=je.getInputElement,hi=je.getRawInputElement,$r=je.open,wi=je.defaultOpen,ta=je.onDropdownVisibleChange,Ba=je.activeValue,ga=je.onActiveValueChange,ra=je.activeDescendantId,La=je.searchValue,Aa=je.autoClearSearchValue,Oi=je.onSearch,ia=je.onSearchSplit,ni=je.tokenSeparators,Ci=je.allowClear,Xi=je.suffixIcon,wa=je.clearIcon,ri=je.OptionList,io=je.animation,ko=je.transitionName,Ja=je.dropdownStyle,Ta=je.dropdownClassName,Ui=je.dropdownMatchSelectWidth,Po=je.dropdownRender,Yi=je.dropdownAlign,oi=je.placement,sa=je.builtinPlacements,Ga=je.getPopupContainer,la=je.showAction,Ka=la===void 0?[]:la,ki=je.onFocus,ro=je.onBlur,ao=je.onKeyUp,eo=je.onKeyDown,oo=je.onMouseDown,wo=(0,Ce.Z)(je,Qn),Ho=ca(jr),to=(zn!==void 0?zn:Ho)||jr==="combobox",Co=(0,Me.Z)({},wo);na.forEach(function(mi){delete Co[mi]}),Nn==null||Nn.forEach(function(mi){delete Co[mi]});var Jo=ke.useState(!1),Xo=(0,Ee.Z)(Jo,2),as=Xo[0],No=Xo[1];ke.useEffect(function(){No(pt())},[]);var vo=ke.useRef(null),ji=ke.useRef(null),ua=ke.useRef(null),Qa=ke.useRef(null),ho=ke.useRef(null),Fo=an(),es=(0,Ee.Z)(Fo,3),ms=es[0],Rs=es[1],Fs=es[2];ke.useImperativeHandle(Ye,function(){var mi,vi;return{focus:(mi=Qa.current)===null||mi===void 0?void 0:mi.focus,blur:(vi=Qa.current)===null||vi===void 0?void 0:vi.blur,scrollTo:function(ui){var Or;return(Or=ho.current)===null||Or===void 0?void 0:Or.scrollTo(ui)}}});var os=ke.useMemo(function(){var mi;if(jr!=="combobox")return La;var vi=(mi=Wn[0])===null||mi===void 0?void 0:mi.value;return typeof vi=="string"||typeof vi=="number"?String(vi):""},[La,jr,Wn]),Ts=jr==="combobox"&&typeof ai=="function"&&ai()||null,Fa=typeof hi=="function"&&hi(),Ni=Tt(ji,Fa==null||($t=Fa.props)===null||$t===void 0?void 0:$t.ref),Do=ke.useState(!1),Eo=(0,Ee.Z)(Do,2),Ie=Eo[0],Re=Eo[1];ot(function(){Re(!0)},[]);var St=ht(!1,{defaultValue:wi,value:$r}),xt=(0,Ee.Z)(St,2),Jt=xt[0],Ht=xt[1],Rt=Ie?Jt:!1,fn=!Qr&&Hn;(Cr||fn&&Rt&&jr==="combobox")&&(Rt=!1);var hn=fn?!1:Rt,Mn=ke.useCallback(function(mi){var vi=mi!==void 0?mi:!Rt;Cr||(Ht(vi),Rt!==vi&&(ta==null||ta(vi)))},[Cr,Rt,Ht,ta]),ur=ke.useMemo(function(){return(ni||[]).some(function(mi){return[`
`,`\r
`].includes(mi)})},[ni]),er=function(vi,Pi,ui){var Or=!0,gi=vi;ga==null||ga(null);var ci=ui?null:_n(vi,ni);return jr!=="combobox"&&ci&&(gi="",ia==null||ia(ci),Mn(!1),Or=!1),Oi&&os!==gi&&Oi(gi,{source:Pi?"typing":"effect"}),Or},zr=function(vi){!vi||!vi.trim()||Oi(vi,{source:"submit"})};ke.useEffect(function(){!Rt&&!Ho&&jr!=="combobox"&&er("",!1,!1)},[Rt]),ke.useEffect(function(){Jt&&Cr&&Ht(!1),Cr&&Rs(!1)},[Cr]);var sr=ft(),Mr=(0,Ee.Z)(sr,2),hr=Mr[0],Kr=Mr[1],si=function(vi){var Pi=hr(),ui=vi.which;if(ui===et.ENTER&&(jr!=="combobox"&&vi.preventDefault(),Rt||Mn(!0)),Kr(!!os),ui===et.BACKSPACE&&!Pi&&Ho&&!os&&Wn.length){for(var Or=(0,ct.Z)(Wn),gi=null,ci=Or.length-1;ci>=0;ci-=1){var Gi=Or[ci];if(!Gi.disabled){Or.splice(ci,1),gi=Gi;break}}gi&&vr(Or,{type:"remove",values:[gi]})}for(var pa=arguments.length,Sa=new Array(pa>1?pa-1:0),Fi=1;Fi<pa;Fi++)Sa[Fi-1]=arguments[Fi];if(Rt&&ho.current){var Ha;(Ha=ho.current).onKeyDown.apply(Ha,[vi].concat(Sa))}eo==null||eo.apply(void 0,[vi].concat(Sa))},yi=function(vi){for(var Pi=arguments.length,ui=new Array(Pi>1?Pi-1:0),Or=1;Or<Pi;Or++)ui[Or-1]=arguments[Or];if(Rt&&ho.current){var gi;(gi=ho.current).onKeyUp.apply(gi,[vi].concat(ui))}ao==null||ao.apply(void 0,[vi].concat(ui))},Ei=function(vi){var Pi=Wn.filter(function(ui){return ui!==vi});vr(Pi,{type:"remove",values:[vi]})},pi=ke.useRef(!1),Ai=function(){Rs(!0),Cr||(ki&&!pi.current&&ki.apply(void 0,arguments),Ka.includes("focus")&&Mn(!0)),pi.current=!0},ei=function(){Rs(!1,function(){pi.current=!1,Mn(!1)}),!Cr&&(os&&(jr==="tags"?Oi(os,{source:"submit"}):jr==="multiple"&&Oi("",{source:"blur"})),ro&&ro.apply(void 0,arguments))},Ti=[];ke.useEffect(function(){return function(){Ti.forEach(function(mi){return clearTimeout(mi)}),Ti.splice(0,Ti.length)}},[]);var Ri=function(vi){var Pi,ui=vi.target,Or=(Pi=ua.current)===null||Pi===void 0?void 0:Pi.getPopupElement();if(Or&&Or.contains(ui)){var gi=setTimeout(function(){var Sa=Ti.indexOf(gi);if(Sa!==-1&&Ti.splice(Sa,1),Fs(),!as&&!Or.contains(document.activeElement)){var Fi;(Fi=Qa.current)===null||Fi===void 0||Fi.focus()}});Ti.push(gi)}for(var ci=arguments.length,Gi=new Array(ci>1?ci-1:0),pa=1;pa<ci;pa++)Gi[pa-1]=arguments[pa];oo==null||oo.apply(void 0,[vi].concat(Gi))},wr=ke.useState({}),Dr=(0,Ee.Z)(wr,2),Ur=Dr[1];function Hi(){Ur({})}var Di;Fa&&(Di=function(vi){Mn(vi)}),mt(function(){var mi;return[vo.current,(mi=ua.current)===null||mi===void 0?void 0:mi.getPopupElement()]},hn,Mn,!!Fa);var Bi=ke.useMemo(function(){return(0,Me.Z)((0,Me.Z)({},je),{},{notFoundContent:Qr,open:Rt,triggerOpen:hn,id:sn,showSearch:to,multiple:Ho,toggleOpen:Mn})},[je,Qr,hn,Rt,sn,to,Ho,Mn]),Ii=!!Xi||Fr,qi;Ii&&(qi=ke.createElement(Xe,{className:xe()("".concat(kn,"-arrow"),(0,ge.Z)({},"".concat(kn,"-arrow-loading"),Fr)),customizeIcon:Xi,customizeIconProps:{loading:Fr,searchValue:os,open:Rt,focused:ms,showSearch:to}}));var aa=function(){var vi;Rr==null||Rr(),(vi=Qa.current)===null||vi===void 0||vi.focus(),vr([],{type:"clear",values:Wn}),er("",!1,!1)},ba=Ae(kn,aa,Wn,Ci,wa,Cr,os,jr),Da=ba.allowClear,Wo=ba.clearIcon,$a=ke.createElement(ri,{ref:ho}),Lo=xe()(kn,yn,(Dt={},(0,ge.Z)(Dt,"".concat(kn,"-focused"),ms),(0,ge.Z)(Dt,"".concat(kn,"-multiple"),Ho),(0,ge.Z)(Dt,"".concat(kn,"-single"),!Ho),(0,ge.Z)(Dt,"".concat(kn,"-allow-clear"),Ci),(0,ge.Z)(Dt,"".concat(kn,"-show-arrow"),Ii),(0,ge.Z)(Dt,"".concat(kn,"-disabled"),Cr),(0,ge.Z)(Dt,"".concat(kn,"-loading"),Fr),(0,ge.Z)(Dt,"".concat(kn,"-open"),Rt),(0,ge.Z)(Dt,"".concat(kn,"-customize-input"),Ts),(0,ge.Z)(Dt,"".concat(kn,"-show-search"),to),Dt)),vs=ke.createElement(Ar,{ref:ua,disabled:Cr,prefixCls:kn,visible:hn,popupElement:$a,animation:io,transitionName:ko,dropdownStyle:Ja,dropdownClassName:Ta,direction:pn,dropdownMatchSelectWidth:Ui,dropdownRender:Po,dropdownAlign:Yi,placement:oi,builtinPlacements:sa,getPopupContainer:Ga,empty:Hn,getTriggerDOMNode:function(){return ji.current},onPopupVisibleChange:Di,onPopupMouseEnter:Hi},Fa?ke.cloneElement(Fa,{ref:Ni}):ke.createElement(_t,(0,Fe.Z)({},je,{domRef:ji,prefixCls:kn,inputElement:Ts,ref:Qa,id:sn,showSearch:to,autoClearSearchValue:Aa,mode:jr,activeDescendantId:ra,tagRender:Pn,values:Wn,open:Rt,onToggleOpen:Mn,activeValue:Ba,searchValue:os,onSearch:er,onSearchSubmit:zr,onRemove:Ei,tokenWithEnter:ur}))),_a;return Fa?_a=vs:_a=ke.createElement("div",(0,Fe.Z)({className:Lo},Co,{ref:vo,onMouseDown:Ri,onKeyDown:si,onKeyUp:yi,onFocus:Ai,onBlur:ei}),ms&&!Rt&&ke.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Wn.map(function(mi){var vi=mi.label,Pi=mi.value;return["number","string"].includes((0,he.Z)(vi))?vi:Pi}).join(", "))),vs,qi,Da&&Wo),ke.createElement(Lt.Provider,{value:Bi},_a)}),ii=_i,va=function(je,Ye){var $t=ke.useRef({values:new Map,options:new Map}),Dt=ke.useMemo(function(){var kn=$t.current,yn=kn.values,zn=kn.options,Pn=je.map(function(Wn){if(Wn.label===void 0){var vr;return(0,Me.Z)((0,Me.Z)({},Wn),{},{label:(vr=yn.get(Wn.value))===null||vr===void 0?void 0:vr.label})}return Wn}),pn=new Map,Nn=new Map;return Pn.forEach(function(Wn){pn.set(Wn.value,Wn),Nn.set(Wn.value,Ye.get(Wn.value)||zn.get(Wn.value))}),$t.current.values=pn,$t.current.options=Nn,Pn},[je,Ye]),sn=ke.useCallback(function(kn){return Ye.get(kn)||$t.current.options.get(kn)},[Ye]);return[Dt,sn]};function _r(je,Ye){return no(je).join("").toUpperCase().includes(Ye)}var Qi=function(je,Ye,$t,Dt,sn){return ke.useMemo(function(){if(!$t||Dt===!1)return je;var kn=Ye.options,yn=Ye.label,zn=Ye.value,Pn=[],pn=typeof Dt=="function",Nn=$t.toUpperCase(),Wn=pn?Dt:function(Hn,Er){return sn?_r(Er[sn],Nn):Er[kn]?_r(Er[yn!=="children"?yn:"label"],Nn):_r(Er[zn],Nn)},vr=pn?function(Hn){return Yr(Hn)}:function(Hn){return Hn};return je.forEach(function(Hn){if(Hn[kn]){var Er=Wn($t,vr(Hn));if(Er)Pn.push(Hn);else{var Qr=Hn[kn].filter(function(Rr){return Wn($t,vr(Rr))});Qr.length&&Pn.push((0,Me.Z)((0,Me.Z)({},Hn),{},(0,ge.Z)({},kn,Qr)))}return}Wn($t,vr(Hn))&&Pn.push(Hn)}),Pn},[je,Dt,sn,$t,Ye])},Tn=0,Ua=Pe();function xa(){var je;return Ua?(je=Tn,Tn+=1):je="TEST_OR_SSR",je}function uo(je){var Ye=ke.useState(),$t=(0,Ee.Z)(Ye,2),Dt=$t[0],sn=$t[1];return ke.useEffect(function(){sn("rc_select_".concat(xa()))},[]),je||Dt}function ja(je){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$t=[];return ke.Children.forEach(je,function(Dt){Dt==null&&!Ye.keepEmpty||(Array.isArray(Dt)?$t=$t.concat(ja(Dt)):(0,kt.isFragment)(Dt)&&Dt.props?$t=$t.concat(ja(Dt.props.children,Ye)):$t.push(Dt))}),$t}var ka=["children","value"],co=["children"];function za(je){var Ye=je,$t=Ye.key,Dt=Ye.props,sn=Dt.children,kn=Dt.value,yn=(0,Ce.Z)(Dt,ka);return(0,Me.Z)({key:$t,value:kn!==void 0?kn:$t,children:sn},yn)}function fa(je){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ja(je).map(function($t,Dt){if(!ke.isValidElement($t)||!$t.type)return null;var sn=$t,kn=sn.type.isSelectOptGroup,yn=sn.key,zn=sn.props,Pn=zn.children,pn=(0,Ce.Z)(zn,co);return Ye||!kn?za($t):(0,Me.Z)((0,Me.Z)({key:"__RC_SELECT_GRP__".concat(yn===null?Dt:yn,"__"),label:yn},pn),{},{options:fa(Pn)})}).filter(function($t){return $t})}function Ya(je,Ye,$t,Dt,sn){return ke.useMemo(function(){var kn=je,yn=!je;yn&&(kn=fa(Ye));var zn=new Map,Pn=new Map,pn=function(vr,Hn,Er){Er&&typeof Er=="string"&&vr.set(Hn[Er],Hn)};function Nn(Wn){for(var vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Hn=0;Hn<Wn.length;Hn+=1){var Er=Wn[Hn];!Er[$t.options]||vr?(zn.set(Er[$t.value],Er),pn(Pn,Er,$t.label),pn(Pn,Er,Dt),pn(Pn,Er,sn)):Nn(Er[$t.options],!0)}}return Nn(kn),{options:kn,valueOptions:zn,labelOptions:Pn}},[je,Ye,$t,Dt,sn])}function _o(je){var Ye=ke.useRef();Ye.current=je;var $t=ke.useCallback(function(){return Ye.current.apply(Ye,arguments)},[]);return $t}var qa=function(){return null};qa.isSelectOptGroup=!0;var Oa=qa,So=function(){return null};So.isSelectOption=!0;var To=So;function fo(je,Ye){var $t=(0,Me.Z)({},je);return Array.isArray(Ye)&&Ye.forEach(function(Dt){delete $t[Dt]}),$t}var Vi=oe(73299),At=ke.createContext(null),Mt=At;function tn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Sn=["disabled","title","children","style","className"];function Kn(je){return typeof je=="string"||typeof je=="number"}var Zr=function(Ye,$t){var Dt=cn(),sn=Dt.prefixCls,kn=Dt.id,yn=Dt.open,zn=Dt.multiple,Pn=Dt.mode,pn=Dt.searchValue,Nn=Dt.toggleOpen,Wn=Dt.notFoundContent,vr=Dt.onPopupScroll,Hn=ke.useContext(Mt),Er=Hn.flattenOptions,Qr=Hn.onActiveValue,Rr=Hn.defaultActiveFirstOption,jr=Hn.onSelect,Cr=Hn.menuItemSelectedIcon,Fr=Hn.rawValues,ai=Hn.fieldNames,hi=Hn.virtual,$r=Hn.direction,wi=Hn.listHeight,ta=Hn.listItemHeight,Ba="".concat(sn,"-item"),ga=it(function(){return Er},[yn,Er],function(Yi,oi){return oi[0]&&Yi[1]!==oi[1]}),ra=ke.useRef(null),La=function(oi){oi.preventDefault()},Aa=function(oi){ra.current&&ra.current.scrollTo(typeof oi=="number"?{index:oi}:oi)},Oi=function(oi){for(var sa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ga=ga.length,la=0;la<Ga;la+=1){var Ka=(oi+la*sa+Ga)%Ga,ki=ga[Ka],ro=ki.group,ao=ki.data;if(!ro&&!ao.disabled)return Ka}return-1},ia=ke.useState(function(){return Oi(0)}),ni=(0,Ee.Z)(ia,2),Ci=ni[0],Xi=ni[1],wa=function(oi){var sa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Xi(oi);var Ga={source:sa?"keyboard":"mouse"},la=ga[oi];if(!la){Qr(null,-1,Ga);return}Qr(la.value,oi,Ga)};(0,ke.useEffect)(function(){wa(Rr!==!1?Oi(0):-1)},[ga.length,pn]);var ri=ke.useCallback(function(Yi){return Fr.has(Yi)&&Pn!=="combobox"},[Pn,(0,ct.Z)(Fr).toString(),Fr.size]);(0,ke.useEffect)(function(){var Yi=setTimeout(function(){if(!zn&&yn&&Fr.size===1){var sa=Array.from(Fr)[0],Ga=ga.findIndex(function(la){var Ka=la.data;return Ka.value===sa});Ga!==-1&&(wa(Ga),Aa(Ga))}});if(yn){var oi;(oi=ra.current)===null||oi===void 0||oi.scrollTo(void 0)}return function(){return clearTimeout(Yi)}},[yn,pn,Er.length]);var io=function(oi){oi!==void 0&&jr(oi,{selected:!Fr.has(oi)}),zn||Nn(!1)};if(ke.useImperativeHandle($t,function(){return{onKeyDown:function(oi){var sa=oi.which,Ga=oi.ctrlKey;switch(sa){case et.N:case et.P:case et.UP:case et.DOWN:{var la=0;if(sa===et.UP?la=-1:sa===et.DOWN?la=1:tn()&&Ga&&(sa===et.N?la=1:sa===et.P&&(la=-1)),la!==0){var Ka=Oi(Ci+la,la);Aa(Ka),wa(Ka,!0)}break}case et.ENTER:{var ki=ga[Ci];ki&&!ki.data.disabled?io(ki.value):io(void 0),yn&&oi.preventDefault();break}case et.ESC:Nn(!1),yn&&oi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(oi){Aa(oi)}}}),ga.length===0)return ke.createElement("div",{role:"listbox",id:"".concat(kn,"_list"),className:"".concat(Ba,"-empty"),onMouseDown:La},Wn);var ko=Object.keys(ai).map(function(Yi){return ai[Yi]}),Ja=function(oi){return oi.label};function Ta(Yi,oi){var sa=Yi.group;return{role:sa?"presentation":"option",id:"".concat(kn,"_list_").concat(oi)}}var Ui=function(oi){var sa=ga[oi];if(!sa)return null;var Ga=sa.data||{},la=Ga.value,Ka=sa.group,ki=vn(Ga,!0),ro=Ja(sa);return sa?ke.createElement("div",(0,Fe.Z)({"aria-label":typeof ro=="string"&&!Ka?ro:null},ki,{key:oi},Ta(sa,oi),{"aria-selected":ri(la)}),la):null},Po={role:"listbox",id:"".concat(kn,"_list")};return ke.createElement(ke.Fragment,null,hi&&ke.createElement("div",(0,Fe.Z)({},Po,{style:{height:0,width:0,overflow:"hidden"}}),Ui(Ci-1),Ui(Ci),Ui(Ci+1)),ke.createElement(Vi.Z,{itemKey:"key",ref:ra,data:ga,height:wi,itemHeight:ta,fullHeight:!1,onMouseDown:La,onScroll:vr,virtual:hi,direction:$r,innerProps:hi?null:Po},function(Yi,oi){var sa,Ga=Yi.group,la=Yi.groupOption,Ka=Yi.data,ki=Yi.label,ro=Yi.value,ao=Ka.key;if(Ga){var eo,oo=(eo=Ka.title)!==null&&eo!==void 0?eo:Kn(ki)?ki.toString():void 0;return ke.createElement("div",{className:xe()(Ba,"".concat(Ba,"-group")),title:oo},ki!==void 0?ki:ao)}var wo=Ka.disabled,Ho=Ka.title,to=Ka.children,Co=Ka.style,Jo=Ka.className,Xo=(0,Ce.Z)(Ka,Sn),as=fo(Xo,ko),No=ri(ro),vo="".concat(Ba,"-option"),ji=xe()(Ba,vo,Jo,(sa={},(0,ge.Z)(sa,"".concat(vo,"-grouped"),la),(0,ge.Z)(sa,"".concat(vo,"-active"),Ci===oi&&!wo),(0,ge.Z)(sa,"".concat(vo,"-disabled"),wo),(0,ge.Z)(sa,"".concat(vo,"-selected"),No),sa)),ua=Ja(Yi),Qa=!Cr||typeof Cr=="function"||No,ho=typeof ua=="number"?ua:ua||ro,Fo=Kn(ho)?ho.toString():void 0;return Ho!==void 0&&(Fo=Ho),ke.createElement("div",(0,Fe.Z)({},vn(as),hi?{}:Ta(Yi,oi),{"aria-selected":No,className:ji,title:Fo,onMouseMove:function(){Ci===oi||wo||wa(oi)},onClick:function(){wo||io(ro)},style:Co}),ke.createElement("div",{className:"".concat(vo,"-content")},ho),ke.isValidElement(Cr)||No,Qa&&ke.createElement(Xe,{className:"".concat(Ba,"-option-state"),customizeIcon:Cr,customizeIconProps:{isSelected:No}},No?"\u2713":null))}))},Nr=ke.forwardRef(Zr);Nr.displayName="OptionList";var qr=Nr;function li(je){var Ye=je.mode,$t=je.options,Dt=je.children,sn=je.backfill,kn=je.allowClear,yn=je.placeholder,zn=je.getInputElement,Pn=je.showSearch,pn=je.onSearch,Nn=je.defaultOpen,Wn=je.autoFocus,vr=je.labelInValue,Hn=je.value,Er=je.inputValue,Qr=je.optionLabelProp,Rr=isMultiple(Ye),jr=Pn!==void 0?Pn:Rr||Ye==="combobox",Cr=$t||convertChildrenToData(Dt);if(warning(Ye!=="tags"||Cr.every(function($r){return!$r.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ye==="tags"||Ye==="combobox"){var Fr=Cr.some(function($r){return $r.options?$r.options.some(function(wi){return typeof("value"in wi?wi.value:wi.key)=="number"}):typeof("value"in $r?$r.value:$r.key)=="number"});warning(!Fr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ye!=="combobox"||!Qr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ye==="combobox"||!sn,"`backfill` only works with `combobox` mode."),warning(Ye==="combobox"||!zn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ye!=="combobox"||!zn||!kn||!yn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pn&&!jr&&Ye!=="combobox"&&Ye!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Nn||Wn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Hn!=null){var ai=toArray(Hn);warning(!vr||ai.every(function($r){return _typeof($r)==="object"&&("key"in $r||"value"in $r)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Rr||Array.isArray(Hn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Dt){var hi=null;toNodeArray(Dt).some(function($r){if(!React.isValidElement($r)||!$r.type)return!1;var wi=$r,ta=wi.type;if(ta.isSelectOption)return!1;if(ta.isSelectOptGroup){var Ba=toNodeArray($r.props.children).every(function(ga){return!React.isValidElement(ga)||!$r.type||ga.type.isSelectOption?!0:(hi=ga.type,!1)});return!Ba}return hi=ta,!0}),hi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(hi.displayName||hi.name||hi,"`.")),warning(Er===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Jr(je,Ye){if(je){var $t=function Dt(sn){for(var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yn=0;yn<sn.length;yn++){var zn=sn[yn];if(zn[Ye==null?void 0:Ye.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!kn&&Array.isArray(zn[Ye==null?void 0:Ye.options])&&Dt(zn[Ye==null?void 0:Ye.options],!0))break}};$t(je)}}var Ki=null,ea=["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"],ha=["inputValue"];function Za(je){return!je||(0,he.Z)(je)!=="object"}var Na=ke.forwardRef(function(je,Ye){var $t=je.id,Dt=je.mode,sn=je.prefixCls,kn=sn===void 0?"rc-select":sn,yn=je.backfill,zn=je.fieldNames,Pn=je.inputValue,pn=je.searchValue,Nn=je.onSearch,Wn=je.autoClearSearchValue,vr=Wn===void 0?!0:Wn,Hn=je.onSelect,Er=je.onDeselect,Qr=je.dropdownMatchSelectWidth,Rr=Qr===void 0?!0:Qr,jr=je.filterOption,Cr=je.filterSort,Fr=je.optionFilterProp,ai=je.optionLabelProp,hi=je.options,$r=je.children,wi=je.defaultActiveFirstOption,ta=je.menuItemSelectedIcon,Ba=je.virtual,ga=je.direction,ra=je.listHeight,La=ra===void 0?200:ra,Aa=je.listItemHeight,Oi=Aa===void 0?20:Aa,ia=je.value,ni=je.defaultValue,Ci=je.labelInValue,Xi=je.onChange,wa=(0,Ce.Z)(je,ea),ri=uo($t),io=ca(Dt),ko=!!(!hi&&$r),Ja=ke.useMemo(function(){return jr===void 0&&Dt==="combobox"?!1:jr},[jr,Dt]),Ta=ke.useMemo(function(){return mr(zn,ko)},[JSON.stringify(zn),ko]),Ui=ht("",{value:pn!==void 0?pn:Pn,postState:function(fn){return fn||""}}),Po=(0,Ee.Z)(Ui,2),Yi=Po[0],oi=Po[1],sa=Ya(hi,$r,Ta,Fr,ai),Ga=sa.valueOptions,la=sa.labelOptions,Ka=sa.options,ki=ke.useCallback(function(Rt){var fn=no(Rt);return fn.map(function(hn){var Mn,ur,er,zr,sr;if(Za(hn))Mn=hn;else{var Mr;er=hn.key,ur=hn.label,Mn=(Mr=hn.value)!==null&&Mr!==void 0?Mr:er}var hr=Ga.get(Mn);if(hr){var Kr;if(ur===void 0&&(ur=hr==null?void 0:hr[ai||Ta.label]),er===void 0&&(er=(Kr=hr==null?void 0:hr.key)!==null&&Kr!==void 0?Kr:Mn),zr=hr==null?void 0:hr.disabled,sr=hr==null?void 0:hr.title,0)var si}return{label:ur,value:Mn,key:er,disabled:zr,title:sr}})},[Ta,ai,Ga]),ro=ht(ni,{value:ia}),ao=(0,Ee.Z)(ro,2),eo=ao[0],oo=ao[1],wo=ke.useMemo(function(){var Rt,fn=ki(eo);return Dt==="combobox"&&Bt((Rt=fn[0])===null||Rt===void 0?void 0:Rt.value)?[]:fn},[eo,ki,Dt]),Ho=va(wo,Ga),to=(0,Ee.Z)(Ho,2),Co=to[0],Jo=to[1],Xo=ke.useMemo(function(){if(!Dt&&Co.length===1){var Rt=Co[0];if(Rt.value===null&&(Rt.label===null||Rt.label===void 0))return[]}return Co.map(function(fn){var hn;return(0,Me.Z)((0,Me.Z)({},fn),{},{label:(hn=fn.label)!==null&&hn!==void 0?hn:fn.value})})},[Dt,Co]),as=ke.useMemo(function(){return new Set(Co.map(function(Rt){return Rt.value}))},[Co]);ke.useEffect(function(){if(Dt==="combobox"){var Rt,fn=(Rt=Co[0])===null||Rt===void 0?void 0:Rt.value;oi(Pa(fn)?String(fn):"")}},[Co]);var No=_o(function(Rt,fn){var hn,Mn=fn!=null?fn:Rt;return hn={},(0,ge.Z)(hn,Ta.value,Rt),(0,ge.Z)(hn,Ta.label,Mn),hn}),vo=ke.useMemo(function(){if(Dt!=="tags")return Ka;var Rt=(0,ct.Z)(Ka),fn=function(Mn){return Ga.has(Mn)};return(0,ct.Z)(Co).sort(function(hn,Mn){return hn.value<Mn.value?-1:1}).forEach(function(hn){var Mn=hn.value;fn(Mn)||Rt.push(No(Mn,hn.label))}),Rt},[No,Ka,Ga,Co,Dt]),ji=Qi(vo,Ta,Yi,Ja,Fr),ua=ke.useMemo(function(){return Dt!=="tags"||!Yi||ji.some(function(Rt){return Rt[Fr||"value"]===Yi})||ji.some(function(Rt){return Rt[Ta.value]===Yi})?ji:[No(Yi)].concat((0,ct.Z)(ji))},[No,Fr,Dt,ji,Yi,Ta]),Qa=ke.useMemo(function(){return Cr?(0,ct.Z)(ua).sort(function(Rt,fn){return Cr(Rt,fn)}):ua},[ua,Cr]),ho=ke.useMemo(function(){return br(Qa,{fieldNames:Ta,childrenAsData:ko})},[Qa,Ta,ko]),Fo=function(fn){var hn=ki(fn);if(oo(hn),Xi&&(hn.length!==Co.length||hn.some(function(er,zr){var sr;return((sr=Co[zr])===null||sr===void 0?void 0:sr.value)!==(er==null?void 0:er.value)}))){var Mn=Ci?hn:hn.map(function(er){return er.value}),ur=hn.map(function(er){return Yr(Jo(er.value))});Xi(io?Mn:Mn[0],io?ur:ur[0])}},es=ke.useState(null),ms=(0,Ee.Z)(es,2),Rs=ms[0],Fs=ms[1],os=ke.useState(0),Ts=(0,Ee.Z)(os,2),Fa=Ts[0],Ni=Ts[1],Do=wi!==void 0?wi:Dt!=="combobox",Eo=ke.useCallback(function(Rt,fn){var hn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Mn=hn.source,ur=Mn===void 0?"keyboard":Mn;Ni(fn),yn&&Dt==="combobox"&&Rt!==null&&ur==="keyboard"&&Fs(String(Rt))},[yn,Dt]),Ie=function(fn,hn,Mn){var ur=function(){var pi,Ai=Jo(fn);return[Ci?{label:Ai==null?void 0:Ai[Ta.label],value:fn,key:(pi=Ai==null?void 0:Ai.key)!==null&&pi!==void 0?pi:fn}:fn,Yr(Ai)]};if(hn&&Hn){var er=ur(),zr=(0,Ee.Z)(er,2),sr=zr[0],Mr=zr[1];Hn(sr,Mr)}else if(!hn&&Er&&Mn!=="clear"){var hr=ur(),Kr=(0,Ee.Z)(hr,2),si=Kr[0],yi=Kr[1];Er(si,yi)}},Re=_o(function(Rt,fn){var hn,Mn=io?fn.selected:!0;Mn?hn=io?[].concat((0,ct.Z)(Co),[Rt]):[Rt]:hn=Co.filter(function(ur){return ur.value!==Rt}),Fo(hn),Ie(Rt,Mn),Dt==="combobox"?Fs(""):(!ca||vr)&&(oi(""),Fs(""))}),St=function(fn,hn){Fo(fn);var Mn=hn.type,ur=hn.values;(Mn==="remove"||Mn==="clear")&&ur.forEach(function(er){Ie(er.value,!1,Mn)})},xt=function(fn,hn){if(oi(fn),Fs(null),hn.source==="submit"){var Mn=(fn||"").trim();if(Mn){var ur=Array.from(new Set([].concat((0,ct.Z)(as),[Mn])));Fo(ur),Ie(Mn,!0),oi("")}return}hn.source!=="blur"&&(Dt==="combobox"&&Fo(fn),Nn==null||Nn(fn))},Jt=function(fn){var hn=fn;Dt!=="tags"&&(hn=fn.map(function(ur){var er=la.get(ur);return er==null?void 0:er.value}).filter(function(ur){return ur!==void 0}));var Mn=Array.from(new Set([].concat((0,ct.Z)(as),(0,ct.Z)(hn))));Fo(Mn),Mn.forEach(function(ur){Ie(ur,!0)})},Ht=ke.useMemo(function(){var Rt=Ba!==!1&&Rr!==!1;return(0,Me.Z)((0,Me.Z)({},sa),{},{flattenOptions:ho,onActiveValue:Eo,defaultActiveFirstOption:Do,onSelect:Re,menuItemSelectedIcon:ta,rawValues:as,fieldNames:Ta,virtual:Rt,direction:ga,listHeight:La,listItemHeight:Oi,childrenAsData:ko})},[sa,ho,Eo,Do,Re,ta,as,Ta,Ba,Rr,La,Oi,ko]);return ke.createElement(Mt.Provider,{value:Ht},ke.createElement(ii,(0,Fe.Z)({},wa,{id:ri,prefixCls:kn,ref:Ye,omitDomProps:ha,mode:Dt,displayValues:Xo,onDisplayValuesChange:St,direction:ga,searchValue:Yi,onSearch:xt,autoClearSearchValue:vr,onSearchSplit:Jt,dropdownMatchSelectWidth:Rr,OptionList:qr,emptyOptions:!ho.length,activeValue:Rs,activeDescendantId:"".concat(ri,"_list_").concat(Fa)})))}),Ra=Na;Ra.Option=To,Ra.OptGroup=Oa;var Be=Ra,Ve=Be,He=oe(10366),tt=oe(8745),gt=oe(33603),Ct=oe(9708),It=oe(53124),ln=oe(98866),mn=oe(88258),Yn=oe(98675),yr=oe(65223),Vn=oe(4173),En=oe(87244),wn=oe(13458),In=oe(78642),Bn=oe(46163),pr=function(je,Ye){var $t={};for(var Dt in je)Object.prototype.hasOwnProperty.call(je,Dt)&&Ye.indexOf(Dt)<0&&($t[Dt]=je[Dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var sn=0,Dt=Object.getOwnPropertySymbols(je);sn<Dt.length;sn++)Ye.indexOf(Dt[sn])<0&&Object.prototype.propertyIsEnumerable.call(je,Dt[sn])&&($t[Dt[sn]]=je[Dt[sn]]);return $t};const Xn="SECRET_COMBOBOX_MODE_DO_NOT_USE",jn=(je,Ye)=>{var $t,{prefixCls:Dt,bordered:sn=!0,className:kn,rootClassName:yn,getPopupContainer:zn,popupClassName:Pn,dropdownClassName:pn,listHeight:Nn=256,placement:Wn,listItemHeight:vr=24,size:Hn,disabled:Er,notFoundContent:Qr,status:Rr,builtinPlacements:jr,dropdownMatchSelectWidth:Cr,popupMatchSelectWidth:Fr,direction:ai,style:hi,allowClear:$r}=je,wi=pr(je,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:ta,getPrefixCls:Ba,renderEmpty:ga,direction:ra,virtual:La,popupMatchSelectWidth:Aa,popupOverflow:Oi,select:ia}=ke.useContext(It.E_),ni=Ba("select",Dt),Ci=Ba(),Xi=ai!=null?ai:ra,{compactSize:wa,compactItemClassnames:ri}=(0,Vn.ri)(ni,Xi),[io,ko]=(0,En.Z)(ni),Ja=ke.useMemo(()=>{const{mode:vo}=wi;if(vo!=="combobox")return vo===Xn?"combobox":vo},[wi.mode]),Ta=Ja==="multiple"||Ja==="tags",Ui=(0,In.Z)(wi.suffixIcon,wi.showArrow),Po=($t=Fr!=null?Fr:Cr)!==null&&$t!==void 0?$t:Aa,{status:Yi,hasFeedback:oi,isFormItemInput:sa,feedbackIcon:Ga}=ke.useContext(yr.aM),la=(0,Ct.F)(Yi,Rr);let Ka;Qr!==void 0?Ka=Qr:Ja==="combobox"?Ka=null:Ka=(ga==null?void 0:ga("Select"))||ke.createElement(mn.Z,{componentName:"Select"});const{suffixIcon:ki,itemIcon:ro,removeIcon:ao,clearIcon:eo}=(0,Bn.Z)(Object.assign(Object.assign({},wi),{multiple:Ta,hasFeedback:oi,feedbackIcon:Ga,showSuffixIcon:Ui,prefixCls:ni,showArrow:wi.showArrow,componentName:"Select"})),oo=$r===!0?{clearIcon:eo}:$r,wo=(0,He.Z)(wi,["suffixIcon","itemIcon"]),Ho=xe()(Pn||pn,{[`${ni}-dropdown-${Xi}`]:Xi==="rtl"},yn,ko),to=(0,Yn.Z)(vo=>{var ji;return(ji=Hn!=null?Hn:wa)!==null&&ji!==void 0?ji:vo}),Co=ke.useContext(ln.Z),Jo=Er!=null?Er:Co,Xo=xe()({[`${ni}-lg`]:to==="large",[`${ni}-sm`]:to==="small",[`${ni}-rtl`]:Xi==="rtl",[`${ni}-borderless`]:!sn,[`${ni}-in-form-item`]:sa},(0,Ct.Z)(ni,la,oi),ri,ia==null?void 0:ia.className,kn,yn,ko),as=ke.useMemo(()=>Wn!==void 0?Wn:Xi==="rtl"?"bottomRight":"bottomLeft",[Wn,Xi]),No=(0,wn.Z)(jr,Oi);return io(ke.createElement(Ve,Object.assign({ref:Ye,virtual:La,showSearch:ia==null?void 0:ia.showSearch},wo,{style:Object.assign(Object.assign({},ia==null?void 0:ia.style),hi),dropdownMatchSelectWidth:Po,builtinPlacements:No,transitionName:(0,gt.m)(Ci,"slide-up",wi.transitionName),listHeight:Nn,listItemHeight:vr,mode:Ja,prefixCls:ni,placement:as,direction:Xi,suffixIcon:ki,menuItemSelectedIcon:ro,removeIcon:ao,allowClear:oo,notFoundContent:Ka,className:Xo,getPopupContainer:zn||ta,dropdownClassName:Ho,disabled:Jo})))},nr=ke.forwardRef(jn),qn=(0,tt.Z)(nr);nr.SECRET_COMBOBOX_MODE_DO_NOT_USE=Xn,nr.Option=To,nr.OptGroup=Oa,nr._InternalPanelDoNotUseOrYouWillBeFired=qn;var dr=nr},87244:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return be}});var pe=oe(14747),xe=oe(80110),Fe=oe(45503),ct=oe(67968),ge=oe(67771),Me=oe(33297);const Ee=we=>{const{optionHeight:Ke,optionFontSize:Ge,optionLineHeight:vt,optionPadding:pt}=we;return{position:"relative",display:"block",minHeight:Ke,padding:pt,color:we.colorText,fontWeight:"normal",fontSize:Ge,lineHeight:vt,boxSizing:"border-box"}};var he=we=>{const{antCls:Ke,componentCls:Ge}=we,vt=`${Ge}-item`,pt=`&${Ke}-slide-up-enter${Ke}-slide-up-enter-active`,Ue=`&${Ke}-slide-up-appear${Ke}-slide-up-appear-active`,et=`&${Ke}-slide-up-leave${Ke}-slide-up-leave-active`,kt=`${Ge}-dropdown-placement-`;return[{[`${Ge}-dropdown`]:Object.assign(Object.assign({},(0,pe.Wf)(we)),{position:"absolute",top:-9999,zIndex:we.zIndexPopup,boxSizing:"border-box",padding:we.paddingXXS,overflow:"hidden",fontSize:we.fontSize,fontVariant:"initial",backgroundColor:we.colorBgElevated,borderRadius:we.borderRadiusLG,outline:"none",boxShadow:we.boxShadowSecondary,[`
${pt}${kt}bottomLeft,
${Ue}${kt}bottomLeft
`]:{animationName:ge.fJ},[`
${pt}${kt}topLeft,
${Ue}${kt}topLeft,
${pt}${kt}topRight,
${Ue}${kt}topRight
`]:{animationName:ge.Qt},[`${et}${kt}bottomLeft`]:{animationName:ge.Uw},[`
${et}${kt}topLeft,
${et}${kt}topRight
`]:{animationName:ge.ly},"&-hidden":{display:"none"},[`${vt}`]:Object.assign(Object.assign({},Ee(we)),{cursor:"pointer",transition:`background ${we.motionDurationSlow} ease`,borderRadius:we.borderRadiusSM,"&-group":{color:we.colorTextDescription,fontSize:we.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},pe.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${vt}-option-disabled)`]:{backgroundColor:we.optionActiveBg},[`&-selected:not(${vt}-option-disabled)`]:{color:we.optionSelectedColor,fontWeight:we.optionSelectedFontWeight,backgroundColor:we.optionSelectedBg,[`${vt}-option-state`]:{color:we.colorPrimary}},"&-disabled":{[`&${vt}-option-selected`]:{backgroundColor:we.colorBgContainerDisabled},color:we.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:we.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ge.oN)(we,"slide-up"),(0,ge.oN)(we,"slide-down"),(0,Me.Fm)(we,"move-up"),(0,Me.Fm)(we,"move-down")]};const ke=2,Je=we=>{let{controlHeightSM:Ke,controlHeight:Ge,lineWidth:vt}=we;const pt=(Ge-Ke)/2-vt,Ue=Math.ceil(pt/2);return[pt,Ue]};function Pe(we,Ke){const{componentCls:Ge,iconCls:vt}=we,pt=`${Ge}-selection-overflow`,Ue=we.multipleSelectItemHeight,[et]=Je(we),kt=Ke?`${Ge}-${Ke}`:"";return{[`${Ge}-multiple${kt}`]:{fontSize:we.fontSize,[pt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ge}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${et-ke}px ${ke*2}px`,borderRadius:we.borderRadius,[`${Ge}-show-search&`]:{cursor:"text"},[`${Ge}-disabled&`]:{background:we.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ke}px 0`,lineHeight:`${Ue}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${Ge}-show-arrow ${Ge}-selector,
&${Ge}-allow-clear ${Ge}-selector
`]:{paddingInlineEnd:we.fontSizeIcon+we.controlPaddingHorizontal},[`${Ge}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Ue,marginTop:ke,marginBottom:ke,lineHeight:`${Ue-we.lineWidth*2}px`,background:we.multipleItemBg,border:`${we.lineWidth}px ${we.lineType} ${we.multipleItemBorderColor}`,borderRadius:we.borderRadiusSM,cursor:"default",transition:`font-size ${we.motionDurationSlow}, line-height ${we.motionDurationSlow}, height ${we.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ke*2,paddingInlineStart:we.paddingXS,paddingInlineEnd:we.paddingXS/2,[`${Ge}-disabled&`]:{color:we.multipleItemColorDisabled,borderColor:we.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:we.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,pe.Ro)()),{display:"inline-flex",alignItems:"center",color:we.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${vt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:we.colorIconHover}})},[`${pt}-item + ${pt}-item`]:{[`${Ge}-selection-search`]:{marginInlineStart:0}},[`${Ge}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:we.inputPaddingHorizontalBase-et,"\n &-input,\n &-mirror\n ":{height:Ue,fontFamily:we.fontFamily,lineHeight:`${Ue}px`,transition:`all ${we.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ge}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:we.inputPaddingHorizontalBase,insetInlineEnd:we.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${we.motionDurationSlow}`}}}}var ot=we=>{const{componentCls:Ke}=we,Ge=(0,Fe.TS)(we,{controlHeight:we.controlHeightSM,multipleSelectItemHeight:we.controlHeightXS,borderRadius:we.borderRadiusSM,borderRadiusSM:we.borderRadiusXS}),vt=(0,Fe.TS)(we,{fontSize:we.fontSizeLG,controlHeight:we.controlHeightLG,multipleSelectItemHeight:we.multipleItemHeightLG,borderRadius:we.borderRadiusLG,borderRadiusSM:we.borderRadius}),[,pt]=Je(we);return[Pe(we),Pe(Ge,"sm"),{[`${Ke}-multiple${Ke}-sm`]:{[`${Ke}-selection-placeholder`]:{insetInline:we.controlPaddingHorizontalSM-we.lineWidth},[`${Ke}-selection-search`]:{marginInlineStart:pt}}},Pe(vt,"lg")]};function lt(we,Ke){const{componentCls:Ge,inputPaddingHorizontalBase:vt,borderRadius:pt}=we,Ue=we.controlHeight-we.lineWidth*2,et=Math.ceil(we.fontSize*1.25),kt=Ke?`${Ge}-${Ke}`:"";return{[`${Ge}-single${kt}`]:{fontSize:we.fontSize,[`${Ge}-selector`]:Object.assign(Object.assign({},(0,pe.Wf)(we)),{display:"flex",borderRadius:pt,[`${Ge}-selection-search`]:{position:"absolute",top:0,insetInlineStart:vt,insetInlineEnd:vt,bottom:0,"&-input":{width:"100%"}},[`
${Ge}-selection-item,
${Ge}-selection-placeholder
`]:{padding:0,lineHeight:`${Ue}px`,transition:`all ${we.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Ue}px`}},[`${Ge}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ge}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ge}-selection-item:after`,`${Ge}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${Ge}-show-arrow ${Ge}-selection-item,
&${Ge}-show-arrow ${Ge}-selection-placeholder
`]:{paddingInlineEnd:et},[`&${Ge}-open ${Ge}-selection-item`]:{color:we.colorTextPlaceholder},[`&:not(${Ge}-customize-input)`]:{[`${Ge}-selector`]:{width:"100%",height:we.controlHeight,padding:`0 ${vt}px`,[`${Ge}-selection-search-input`]:{height:Ue},"&:after":{lineHeight:`${Ue}px`}}},[`&${Ge}-customize-input`]:{[`${Ge}-selector`]:{"&:after":{display:"none"},[`${Ge}-selection-search`]:{position:"static",width:"100%"},[`${Ge}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${vt}px`,"&:after":{display:"none"}}}}}}}function nt(we){const{componentCls:Ke}=we,Ge=we.controlPaddingHorizontalSM-we.lineWidth;return[lt(we),lt((0,Fe.TS)(we,{controlHeight:we.controlHeightSM,borderRadius:we.borderRadiusSM}),"sm"),{[`${Ke}-single${Ke}-sm`]:{[`&:not(${Ke}-customize-input)`]:{[`${Ke}-selection-search`]:{insetInlineStart:Ge,insetInlineEnd:Ge},[`${Ke}-selector`]:{padding:`0 ${Ge}px`},[`&${Ke}-show-arrow ${Ke}-selection-search`]:{insetInlineEnd:Ge+we.fontSize*1.5},[`
&${Ke}-show-arrow ${Ke}-selection-item,
&${Ke}-show-arrow ${Ke}-selection-placeholder
`]:{paddingInlineEnd:we.fontSize*1.5}}}},lt((0,Fe.TS)(we,{controlHeight:we.singleItemHeightLG,fontSize:we.fontSizeLG,borderRadius:we.borderRadiusLG}),"lg")]}const _e=we=>{const{componentCls:Ke,selectorBg:Ge}=we;return{position:"relative",backgroundColor:Ge,border:`${we.lineWidth}px ${we.lineType} ${we.colorBorder}`,transition:`all ${we.motionDurationMid} ${we.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ke}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ke}-disabled&`]:{color:we.colorTextDisabled,background:we.colorBgContainerDisabled,cursor:"not-allowed",[`${Ke}-multiple&`]:{background:we.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ht=function(we,Ke){let Ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:vt,borderHoverColor:pt,outlineColor:Ue,antCls:et}=Ke,kt=Ge?{[`${vt}-selector`]:{borderColor:pt}}:{};return{[we]:{[`&:not(${vt}-disabled):not(${vt}-customize-input):not(${et}-pagination-size-changer)`]:Object.assign(Object.assign({},kt),{[`${vt}-focused& ${vt}-selector`]:{borderColor:pt,boxShadow:`0 0 0 ${Ke.controlOutlineWidth}px ${Ue}`,outline:0},[`&:hover ${vt}-selector`]:{borderColor:pt}})}}},yt=we=>{const{componentCls:Ke}=we;return{[`${Ke}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Ze=we=>{const{componentCls:Ke,inputPaddingHorizontalBase:Ge,iconCls:vt}=we;return{[Ke]:Object.assign(Object.assign({},(0,pe.Wf)(we)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ke}-customize-input) ${Ke}-selector`]:Object.assign(Object.assign({},_e(we)),yt(we)),[`${Ke}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},pe.vS),[`${Ke}-selection-placeholder`]:Object.assign(Object.assign({},pe.vS),{flex:1,color:we.colorTextPlaceholder,pointerEvents:"none"}),[`${Ke}-arrow`]:Object.assign(Object.assign({},(0,pe.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ge,height:we.fontSizeIcon,marginTop:-we.fontSizeIcon/2,color:we.colorTextQuaternary,fontSize:we.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[vt]:{verticalAlign:"top",transition:`transform ${we.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ke}-suffix)`]:{pointerEvents:"auto"}},[`${Ke}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ke}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ge,zIndex:1,display:"inline-block",width:we.fontSizeIcon,height:we.fontSizeIcon,marginTop:-we.fontSizeIcon/2,color:we.colorTextQuaternary,fontSize:we.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:we.clearBg,cursor:"pointer",opacity:0,transition:`color ${we.motionDurationMid} ease, opacity ${we.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:we.colorTextTertiary}},"&:hover":{[`${Ke}-clear`]:{opacity:1}}}),[`${Ke}-has-feedback`]:{[`${Ke}-clear`]:{insetInlineEnd:Ge+we.fontSize+we.paddingXS}}}},Qe=we=>{const{componentCls:Ke}=we;return[{[Ke]:{[`&-borderless ${Ke}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ke}-in-form-item`]:{width:"100%"}}},Ze(we),nt(we),ot(we),he(we),{[`${Ke}-rtl`]:{direction:"rtl"}},ht(Ke,(0,Fe.TS)(we,{borderHoverColor:we.colorPrimaryHover,outlineColor:we.controlOutline})),ht(`${Ke}-status-error`,(0,Fe.TS)(we,{borderHoverColor:we.colorErrorHover,outlineColor:we.colorErrorOutline}),!0),ht(`${Ke}-status-warning`,(0,Fe.TS)(we,{borderHoverColor:we.colorWarningHover,outlineColor:we.colorWarningOutline}),!0),(0,xe.c)(we,{borderElCls:`${Ke}-selector`,focusElCls:`${Ke}-focused`})]};var be=(0,ct.Z)("Select",(we,Ke)=>{let{rootPrefixCls:Ge}=Ke;const vt=(0,Fe.TS)(we,{rootPrefixCls:Ge,inputPaddingHorizontalBase:we.paddingSM-1,multipleSelectItemHeight:we.multipleItemHeight});return[Qe(vt)]},we=>{const{fontSize:Ke,lineHeight:Ge,controlHeight:vt,controlPaddingHorizontal:pt,zIndexPopupBase:Ue,colorText:et,fontWeightStrong:kt,controlItemBgActive:it,controlItemBgHover:st,colorBgContainer:We,colorFillSecondary:Tt,controlHeightLG:Ut,controlHeightSM:Qt,colorBgContainerDisabled:Xe,colorTextDisabled:Ae}=we;return{zIndexPopup:Ue+50,optionSelectedColor:et,optionSelectedFontWeight:kt,optionSelectedBg:it,optionActiveBg:st,optionPadding:`${(vt-Ke*Ge)/2}px ${pt}px`,optionFontSize:Ke,optionLineHeight:Ge,optionHeight:vt,selectorBg:We,clearBg:We,singleItemHeightLG:Ut,multipleItemBg:Tt,multipleItemBorderColor:"transparent",multipleItemHeight:Qt,multipleItemHeightLG:vt,multipleSelectorBgDisabled:Xe,multipleItemColorDisabled:Ae,multipleItemBorderColorDisabled:"transparent"}})},13458:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return xe}});const pe=Fe=>{const ge={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Fe==="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 xe(Fe,ct){return Fe||pe(ct)}},78642:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return pe}});function pe(xe,Fe){return Fe!==void 0?Fe:xe!==null}},46163:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ce}});var pe=oe(18299),xe=oe(16646),Fe=oe(73475),ct=oe(42922),ge=oe(3407),Me=oe(72395),Ee=oe(67294);function Ce(he){let{suffixIcon:ke,clearIcon:Je,menuItemSelectedIcon:Pe,removeIcon:dt,loading:ot,multiple:lt,hasFeedback:nt,prefixCls:_e,showSuffixIcon:ht,feedbackIcon:yt,showArrow:Ze,componentName:Qe}=he;const be=Je!=null?Je:Ee.createElement(xe.Z,null),we=pt=>ke===null&&!nt&&!Ze?null:Ee.createElement(Ee.Fragment,null,ht!==!1&&pt,nt&&yt);let Ke=null;if(ke!==void 0)Ke=we(ke);else if(ot)Ke=we(Ee.createElement(ge.Z,{spin:!0}));else{const pt=`${_e}-suffix`;Ke=Ue=>{let{open:et,showSearch:kt}=Ue;return we(et&&kt?Ee.createElement(Me.Z,{className:pt}):Ee.createElement(ct.Z,{className:pt}))}}let Ge=null;Pe!==void 0?Ge=Pe:lt?Ge=Ee.createElement(pe.Z,null):Ge=null;let vt=null;return dt!==void 0?vt=dt:vt=Ee.createElement(Fe.Z,null),{clearIcon:be,suffixIcon:Ke,itemIcon:Ge,removeIcon:vt}}},33507:function(Cn,Vt){"use strict";const oe=pe=>({[pe.componentCls]:{[`${pe.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${pe.motionDurationMid} ${pe.motionEaseInOut},
opacity ${pe.motionDurationMid} ${pe.motionEaseInOut} !important`}},[`${pe.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${pe.motionDurationMid} ${pe.motionEaseInOut},
opacity ${pe.motionDurationMid} ${pe.motionEaseInOut} !important`}}});Vt.Z=oe},33297:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Fm:function(){return Pe}});var pe=oe(34367),xe=oe(93590);const Fe=new pe.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ct=new pe.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ge=new pe.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Me=new pe.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Ee=new pe.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ce=new pe.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),he=new pe.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ke=new pe.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Je={"move-up":{inKeyframes:he,outKeyframes:ke},"move-down":{inKeyframes:Fe,outKeyframes:ct},"move-left":{inKeyframes:ge,outKeyframes:Me},"move-right":{inKeyframes:Ee,outKeyframes:Ce}},Pe=(dt,ot)=>{const{antCls:lt}=dt,nt=`${lt}-${ot}`,{inKeyframes:_e,outKeyframes:ht}=Je[ot];return[(0,xe.R)(nt,_e,ht,dt.motionDurationMid),{[`
${nt}-enter,
${nt}-appear
`]:{opacity:0,animationTimingFunction:dt.motionEaseOutCirc},[`${nt}-leave`]:{animationTimingFunction:dt.motionEaseInOutCirc}}]}},67771:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Qt:function(){return ge},Uw:function(){return ct},fJ:function(){return Fe},ly:function(){return Me},oN:function(){return Pe}});var pe=oe(34367),xe=oe(93590);const Fe=new pe.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ct=new pe.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ge=new pe.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Me=new pe.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Ee=new pe.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Ce=new pe.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),he=new pe.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),ke=new pe.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Je={"slide-up":{inKeyframes:Fe,outKeyframes:ct},"slide-down":{inKeyframes:ge,outKeyframes:Me},"slide-left":{inKeyframes:Ee,outKeyframes:Ce},"slide-right":{inKeyframes:he,outKeyframes:ke}},Pe=(dt,ot)=>{const{antCls:lt}=dt,nt=`${lt}-${ot}`,{inKeyframes:_e,outKeyframes:ht}=Je[ot];return[(0,xe.R)(nt,_e,ht,dt.motionDurationMid),{[`
${nt}-enter,
${nt}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:dt.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${nt}-leave`]:{animationTimingFunction:dt.motionEaseInQuint}}]}},47897:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return me}});var pe=oe(3407),xe=oe(94184),Fe=oe.n(xe);function ct(){return ct=Object.assign?Object.assign.bind():function(fe){for(var se=1;se<arguments.length;se++){var Oe=arguments[se];for(var rt in Oe)Object.prototype.hasOwnProperty.call(Oe,rt)&&(fe[rt]=Oe[rt])}return fe},ct.apply(this,arguments)}function ge(fe){"@babel/helpers - typeof";return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(se){return typeof se}:function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},ge(fe)}function Me(fe,se){if(ge(fe)!=="object"||fe===null)return fe;var Oe=fe[Symbol.toPrimitive];if(Oe!==void 0){var rt=Oe.call(fe,se||"default");if(ge(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(fe)}function Ee(fe){var se=Me(fe,"string");return ge(se)==="symbol"?se:String(se)}function Ce(fe,se,Oe){return se=Ee(se),se in fe?Object.defineProperty(fe,se,{value:Oe,enumerable:!0,configurable:!0,writable:!0}):fe[se]=Oe,fe}function he(fe){if(Array.isArray(fe))return fe}function ke(fe,se){var Oe=fe==null?null:typeof Symbol!="undefined"&&fe[Symbol.iterator]||fe["@@iterator"];if(Oe!=null){var rt,Pt,zt,Zt,en=[],Gt=!0,tr=!1;try{if(zt=(Oe=Oe.call(fe)).next,se===0){if(Object(Oe)!==Oe)return;Gt=!1}else for(;!(Gt=(rt=zt.call(Oe)).done)&&(en.push(rt.value),en.length!==se);Gt=!0);}catch(cr){tr=!0,Pt=cr}finally{try{if(!Gt&&Oe.return!=null&&(Zt=Oe.return(),Object(Zt)!==Zt))return}finally{if(tr)throw Pt}}return en}}function Je(fe,se){(se==null||se>fe.length)&&(se=fe.length);for(var Oe=0,rt=new Array(se);Oe<se;Oe++)rt[Oe]=fe[Oe];return rt}function Pe(fe,se){if(fe){if(typeof fe=="string")return Je(fe,se);var Oe=Object.prototype.toString.call(fe).slice(8,-1);if(Oe==="Object"&&fe.constructor&&(Oe=fe.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(fe);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return Je(fe,se)}}function dt(){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 ot(fe,se){return he(fe)||ke(fe,se)||Pe(fe,se)||dt()}function lt(fe,se){if(fe==null)return{};var Oe={},rt=Object.keys(fe),Pt,zt;for(zt=0;zt<rt.length;zt++)Pt=rt[zt],!(se.indexOf(Pt)>=0)&&(Oe[Pt]=fe[Pt]);return Oe}function nt(fe,se){if(fe==null)return{};var Oe=lt(fe,se),rt,Pt;if(Object.getOwnPropertySymbols){var zt=Object.getOwnPropertySymbols(fe);for(Pt=0;Pt<zt.length;Pt++)rt=zt[Pt],!(se.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(fe,rt)&&(Oe[rt]=fe[rt])}return Oe}var _e=oe(67294);function ht(fe){if(Array.isArray(fe))return fe}function yt(fe,se){var Oe=fe==null?null:typeof Symbol!="undefined"&&fe[Symbol.iterator]||fe["@@iterator"];if(Oe!=null){var rt,Pt,zt,Zt,en=[],Gt=!0,tr=!1;try{if(zt=(Oe=Oe.call(fe)).next,se===0){if(Object(Oe)!==Oe)return;Gt=!1}else for(;!(Gt=(rt=zt.call(Oe)).done)&&(en.push(rt.value),en.length!==se);Gt=!0);}catch(cr){tr=!0,Pt=cr}finally{try{if(!Gt&&Oe.return!=null&&(Zt=Oe.return(),Object(Zt)!==Zt))return}finally{if(tr)throw Pt}}return en}}function Ze(fe,se){(se==null||se>fe.length)&&(se=fe.length);for(var Oe=0,rt=new Array(se);Oe<se;Oe++)rt[Oe]=fe[Oe];return rt}function Qe(fe,se){if(fe){if(typeof fe=="string")return Ze(fe,se);var Oe=Object.prototype.toString.call(fe).slice(8,-1);if(Oe==="Object"&&fe.constructor&&(Oe=fe.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(fe);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return Ze(fe,se)}}function be(){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 we(fe,se){return ht(fe)||yt(fe,se)||Qe(fe,se)||be()}function Ke(fe){var se=_e.useRef();se.current=fe;var Oe=_e.useCallback(function(){for(var rt,Pt=arguments.length,zt=new Array(Pt),Zt=0;Zt<Pt;Zt++)zt[Zt]=arguments[Zt];return(rt=se.current)===null||rt===void 0?void 0:rt.call.apply(rt,[se].concat(zt))},[]);return Oe}function Ge(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var vt=Ge()?_e.useLayoutEffect:_e.useEffect,pt=function(se,Oe){var rt=_e.useRef(!0);vt(function(){return se(rt.current)},Oe),vt(function(){return rt.current=!1,function(){rt.current=!0}},[])},Ue=function(se,Oe){pt(function(rt){if(!rt)return se()},Oe)},et=null;function kt(fe){var se=_e.useRef(!1),Oe=_e.useState(fe),rt=we(Oe,2),Pt=rt[0],zt=rt[1];_e.useEffect(function(){return se.current=!1,function(){se.current=!0}},[]);function Zt(en,Gt){Gt&&se.current||zt(en)}return[Pt,Zt]}function it(fe){return fe!==void 0}function st(fe,se){var Oe=se||{},rt=Oe.defaultValue,Pt=Oe.value,zt=Oe.onChange,Zt=Oe.postState,en=kt(function(){return it(Pt)?Pt:it(rt)?typeof rt=="function"?rt():rt:typeof fe=="function"?fe():fe}),Gt=we(en,2),tr=Gt[0],cr=Gt[1],Wt=Pt!==void 0?Pt:tr,bn=Zt?Zt(Wt):Wt,lr=Ke(zt),Wr=kt([Wt]),Rn=we(Wr,2),Tr=Rn[0],Ca=Rn[1];Ue(function(){var Li=Tr[0];tr!==Li&&lr(tr,Li)},[Tr]),Ue(function(){it(Pt)||cr(Pt)},[Pt]);var Wi=Ke(function(Li,Mi){cr(Li,Mi),Ca([Wt],Mi)});return[bn,Wi]}var We={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(se){var Oe=se.keyCode;if(se.altKey&&!se.ctrlKey||se.metaKey||Oe>=We.F1&&Oe<=We.F12)return!1;switch(Oe){case We.ALT:case We.CAPS_LOCK:case We.CONTEXT_MENU:case We.CTRL:case We.DOWN:case We.END:case We.ESC:case We.HOME:case We.INSERT:case We.LEFT:case We.MAC_FF_META:case We.META:case We.NUMLOCK:case We.NUM_CENTER:case We.PAGE_DOWN:case We.PAGE_UP:case We.PAUSE:case We.PRINT_SCREEN:case We.RIGHT:case We.SHIFT:case We.UP:case We.WIN_KEY:case We.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(se){if(se>=We.ZERO&&se<=We.NINE||se>=We.NUM_ZERO&&se<=We.NUM_MULTIPLY||se>=We.A&&se<=We.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&se===0)return!0;switch(se){case We.SPACE:case We.QUESTION_MARK:case We.NUM_PLUS:case We.NUM_MINUS:case We.NUM_PERIOD:case We.NUM_DIVISION:case We.SEMICOLON:case We.DASH:case We.EQUALS:case We.COMMA:case We.PERIOD:case We.SLASH:case We.APOSTROPHE:case We.SINGLE_QUOTE:case We.OPEN_SQUARE_BRACKET:case We.BACKSLASH:case We.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Tt=We,Ut=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Qt=_e.forwardRef(function(fe,se){var Oe,rt=fe.prefixCls,Pt=rt===void 0?"rc-switch":rt,zt=fe.className,Zt=fe.checked,en=fe.defaultChecked,Gt=fe.disabled,tr=fe.loadingIcon,cr=fe.checkedChildren,Wt=fe.unCheckedChildren,bn=fe.onClick,lr=fe.onChange,Wr=fe.onKeyDown,Rn=nt(fe,Ut),Tr=st(!1,{value:Zt,defaultValue:en}),Ca=ot(Tr,2),Wi=Ca[0],Li=Ca[1];function Mi(Ma,Gr){var Va=Wi;return Gt||(Va=Ma,Li(Va),lr==null||lr(Va,Gr)),Va}function Ji(Ma){Ma.which===Tt.LEFT?Mi(!1,Ma):Ma.which===Tt.RIGHT&&Mi(!0,Ma),Wr==null||Wr(Ma)}function Zi(Ma){var Gr=Mi(!Wi,Ma);bn==null||bn(Gr,Ma)}var Ea=Fe()(Pt,zt,(Oe={},Ce(Oe,"".concat(Pt,"-checked"),Wi),Ce(Oe,"".concat(Pt,"-disabled"),Gt),Oe));return _e.createElement("button",ct({},Rn,{type:"button",role:"switch","aria-checked":Wi,disabled:Gt,className:Ea,ref:se,onKeyDown:Ji,onClick:Zi}),tr,_e.createElement("span",{className:"".concat(Pt,"-inner")},_e.createElement("span",{className:"".concat(Pt,"-inner-checked")},cr),_e.createElement("span",{className:"".concat(Pt,"-inner-unchecked")},Wt)))});Qt.displayName="Switch";var Xe=Qt,Ae=oe(45353),Lt=oe(53124),cn=oe(98866),an=oe(98675),ft=oe(84780),mt=oe(14747),Yt=oe(67968),An=oe(45503);const dn=fe=>{const{componentCls:se,trackHeightSM:Oe,trackPadding:rt,trackMinWidthSM:Pt,innerMinMarginSM:zt,innerMaxMarginSM:Zt,handleSizeSM:en}=fe,Gt=`${se}-inner`;return{[se]:{[`&${se}-small`]:{minWidth:Pt,height:Oe,lineHeight:`${Oe}px`,[`${se}-inner`]:{paddingInlineStart:Zt,paddingInlineEnd:zt,[`${Gt}-checked`]:{marginInlineStart:`calc(-100% + ${en+rt*2}px - ${Zt*2}px)`,marginInlineEnd:`calc(100% - ${en+rt*2}px + ${Zt*2}px)`},[`${Gt}-unchecked`]:{marginTop:-Oe,marginInlineStart:0,marginInlineEnd:0}},[`${se}-handle`]:{width:en,height:en},[`${se}-loading-icon`]:{top:(en-fe.switchLoadingIconSize)/2,fontSize:fe.switchLoadingIconSize},[`&${se}-checked`]:{[`${se}-inner`]:{paddingInlineStart:zt,paddingInlineEnd:Zt,[`${Gt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Gt}-unchecked`]:{marginInlineStart:`calc(100% - ${en+rt*2}px + ${Zt*2}px)`,marginInlineEnd:`calc(-100% + ${en+rt*2}px - ${Zt*2}px)`}},[`${se}-handle`]:{insetInlineStart:`calc(100% - ${en+rt}px)`}},[`&:not(${se}-disabled):active`]:{[`&:not(${se}-checked) ${Gt}`]:{[`${Gt}-unchecked`]:{marginInlineStart:fe.marginXXS/2,marginInlineEnd:-fe.marginXXS/2}},[`&${se}-checked ${Gt}`]:{[`${Gt}-checked`]:{marginInlineStart:-fe.marginXXS/2,marginInlineEnd:fe.marginXXS/2}}}}}}},nn=fe=>{const{componentCls:se,handleSize:Oe}=fe;return{[se]:{[`${se}-loading-icon${fe.iconCls}`]:{position:"relative",top:(Oe-fe.fontSize)/2,color:fe.switchLoadingIconColor,verticalAlign:"top"},[`&${se}-checked ${se}-loading-icon`]:{color:fe.switchColor}}}},jt=fe=>{const{componentCls:se,motion:Oe,trackPadding:rt,handleBg:Pt,handleShadow:zt,handleSize:Zt}=fe,en=`${se}-handle`;return{[se]:{[en]:{position:"absolute",top:rt,insetInlineStart:rt,width:Zt,height:Zt,transition:`all ${fe.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Pt,borderRadius:Zt/2,boxShadow:zt,transition:`all ${fe.switchDuration} ease-in-out`,content:'""'}},[`&${se}-checked ${en}`]:{insetInlineStart:`calc(100% - ${Zt+rt}px)`},[`&:not(${se}-disabled):active`]:Oe?{[`${en}::before`]:{insetInlineEnd:fe.switchHandleActiveInset,insetInlineStart:0},[`&${se}-checked ${en}::before`]:{insetInlineEnd:0,insetInlineStart:fe.switchHandleActiveInset}}:{}}}},xn=fe=>{const{componentCls:se,trackHeight:Oe,trackPadding:rt,innerMinMargin:Pt,innerMaxMargin:zt,handleSize:Zt}=fe,en=`${se}-inner`;return{[se]:{[en]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:zt,paddingInlineEnd:Pt,transition:`padding-inline-start ${fe.switchDuration} ease-in-out, padding-inline-end ${fe.switchDuration} ease-in-out`,[`${en}-checked, ${en}-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"},[`${en}-checked`]:{marginInlineStart:`calc(-100% + ${Zt+rt*2}px - ${zt*2}px)`,marginInlineEnd:`calc(100% - ${Zt+rt*2}px + ${zt*2}px)`},[`${en}-unchecked`]:{marginTop:-Oe,marginInlineStart:0,marginInlineEnd:0}},[`&${se}-checked ${en}`]:{paddingInlineStart:Pt,paddingInlineEnd:zt,[`${en}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${en}-unchecked`]:{marginInlineStart:`calc(100% - ${Zt+rt*2}px + ${zt*2}px)`,marginInlineEnd:`calc(-100% + ${Zt+rt*2}px - ${zt*2}px)`}},[`&:not(${se}-disabled):active`]:{[`&:not(${se}-checked) ${en}`]:{[`${en}-unchecked`]:{marginInlineStart:rt*2,marginInlineEnd:-rt*2}},[`&${se}-checked ${en}`]:{[`${en}-checked`]:{marginInlineStart:-rt*2,marginInlineEnd:rt*2}}}}}},vn=fe=>{const{componentCls:se,trackHeight:Oe,trackMinWidth:rt}=fe;return{[se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,mt.Wf)(fe)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:rt,height:Oe,lineHeight:`${Oe}px`,verticalAlign:"middle",background:fe.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${fe.motionDurationMid}`,userSelect:"none",[`&:hover:not(${se}-disabled)`]:{background:fe.colorTextTertiary}}),(0,mt.Qy)(fe)),{[`&${se}-checked`]:{background:fe.switchColor,[`&:hover:not(${se}-disabled)`]:{background:fe.colorPrimaryHover}},[`&${se}-loading, &${se}-disabled`]:{cursor:"not-allowed",opacity:fe.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${se}-rtl`]:{direction:"rtl"}})}};var Te=(0,Yt.Z)("Switch",fe=>{const se=(0,An.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[vn(se),xn(se),jt(se),nn(se),dn(se)]},fe=>{const{fontSize:se,lineHeight:Oe,controlHeight:rt,colorWhite:Pt}=fe,zt=se*Oe,Zt=rt/2,en=2,Gt=zt-en*2,tr=Zt-en*2;return{trackHeight:zt,trackHeightSM:Zt,trackMinWidth:Gt*2+en*4,trackMinWidthSM:tr*2+en*2,trackPadding:en,handleBg:Pt,handleSize:Gt,handleSizeSM:tr,handleShadow:`0 2px 4px 0 ${new ft.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Gt/2,innerMaxMargin:Gt+en+en*2,innerMinMarginSM:tr/2,innerMaxMarginSM:tr+en+en*2}}),ue=function(fe,se){var Oe={};for(var rt in fe)Object.prototype.hasOwnProperty.call(fe,rt)&&se.indexOf(rt)<0&&(Oe[rt]=fe[rt]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,rt=Object.getOwnPropertySymbols(fe);Pt<rt.length;Pt++)se.indexOf(rt[Pt])<0&&Object.prototype.propertyIsEnumerable.call(fe,rt[Pt])&&(Oe[rt[Pt]]=fe[rt[Pt]]);return Oe};const le=_e.forwardRef((fe,se)=>{const{prefixCls:Oe,size:rt,disabled:Pt,loading:zt,className:Zt,rootClassName:en,style:Gt}=fe,tr=ue(fe,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:cr,direction:Wt,switch:bn}=_e.useContext(Lt.E_),lr=_e.useContext(cn.Z),Wr=(Pt!=null?Pt:lr)||zt,Rn=cr("switch",Oe),Tr=_e.createElement("div",{className:`${Rn}-handle`},zt&&_e.createElement(pe.Z,{className:`${Rn}-loading-icon`})),[Ca,Wi]=Te(Rn),Li=(0,an.Z)(rt),Mi=Fe()(bn==null?void 0:bn.className,{[`${Rn}-small`]:Li==="small",[`${Rn}-loading`]:zt,[`${Rn}-rtl`]:Wt==="rtl"},Zt,en,Wi),Ji=Object.assign(Object.assign({},bn==null?void 0:bn.style),Gt);return Ca(_e.createElement(Ae.Z,{component:"Switch"},_e.createElement(Xe,Object.assign({},tr,{prefixCls:Rn,className:Mi,style:Ji,disabled:Wr,ref:se,loadingIcon:Tr}))))});le.__ANT_SWITCH=!0;var me=le},66368:function(Cn,Vt,oe){"use strict";oe.d(Vt,{default:function(){return Ra}});var pe=oe(73475),xe=oe(25877),Fe=oe(38308),ct=oe(94184),ge=oe.n(ct),Me=oe(87462),Ee=oe(4942),Ce=oe(1413),he=oe(97685),ke=oe(71002),Je=oe(45987),Pe=oe(67294),dt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Be=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(Be)||/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(Be==null?void 0:Be.substr(0,4))};function ot(Be){var Ve=Pe.useRef();Ve.current=Be;var He=Pe.useCallback(function(){for(var tt,gt=arguments.length,Ct=new Array(gt),It=0;It<gt;It++)Ct[It]=arguments[It];return(tt=Ve.current)===null||tt===void 0?void 0:tt.call.apply(tt,[Ve].concat(Ct))},[]);return He}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var nt=lt()?Pe.useLayoutEffect:Pe.useEffect,_e=function(Ve,He){var tt=Pe.useRef(!0);nt(function(){return Ve(tt.current)},He),nt(function(){return tt.current=!1,function(){tt.current=!0}},[])},ht=function(Ve,He){_e(function(tt){if(!tt)return Ve()},He)},yt=null;function Ze(Be){var Ve=Pe.useRef(!1),He=Pe.useState(Be),tt=(0,he.Z)(He,2),gt=tt[0],Ct=tt[1];Pe.useEffect(function(){return Ve.current=!1,function(){Ve.current=!0}},[]);function It(ln,mn){mn&&Ve.current||Ct(ln)}return[gt,It]}function Qe(Be){return Be!==void 0}function be(Be,Ve){var He=Ve||{},tt=He.defaultValue,gt=He.value,Ct=He.onChange,It=He.postState,ln=Ze(function(){return Qe(gt)?gt:Qe(tt)?typeof tt=="function"?tt():tt:typeof Be=="function"?Be():Be}),mn=(0,he.Z)(ln,2),Yn=mn[0],yr=mn[1],Vn=gt!==void 0?gt:Yn,En=It?It(Vn):Vn,wn=ot(Ct),In=Ze([Vn]),Bn=(0,he.Z)(In,2),pr=Bn[0],Xn=Bn[1];ht(function(){var nr=pr[0];Yn!==nr&&wn(Yn,nr)},[pr]),ht(function(){Qe(gt)||yr(gt)},[gt]);var jn=ot(function(nr,qn){yr(nr,qn),Xn([Vn],qn)});return[En,jn]}var we=oe(62874),Ke=(0,Pe.createContext)(null),Ge=Pe.forwardRef(function(Be,Ve){var He=Be.prefixCls,tt=Be.className,gt=Be.style,Ct=Be.id,It=Be.active,ln=Be.tabKey,mn=Be.children;return Pe.createElement("div",{id:Ct&&"".concat(Ct,"-panel-").concat(ln),role:"tabpanel",tabIndex:It?0:-1,"aria-labelledby":Ct&&"".concat(Ct,"-tab-").concat(ln),"aria-hidden":!It,style:gt,className:ge()(He,It&&"".concat(He,"-active"),tt),ref:Ve},mn)}),vt=Ge,pt=["key","forceRender","style","className"];function Ue(Be){var Ve=Be.id,He=Be.activeKey,tt=Be.animated,gt=Be.tabPosition,Ct=Be.destroyInactiveTabPane,It=Pe.useContext(Ke),ln=It.prefixCls,mn=It.tabs,Yn=tt.tabPane,yr="".concat(ln,"-tabpane");return Pe.createElement("div",{className:ge()("".concat(ln,"-content-holder"))},Pe.createElement("div",{className:ge()("".concat(ln,"-content"),"".concat(ln,"-content-").concat(gt),(0,Ee.Z)({},"".concat(ln,"-content-animated"),Yn))},mn.map(function(Vn){var En=Vn.key,wn=Vn.forceRender,In=Vn.style,Bn=Vn.className,pr=(0,Je.Z)(Vn,pt),Xn=En===He;return Pe.createElement(we.Z,(0,Me.Z)({key:En,visible:Xn,forceRender:wn,removeOnLeave:!!Ct,leavedClassName:"".concat(yr,"-hidden")},tt.tabPaneMotion),function(jn,nr){var qn=jn.style,dr=jn.className;return Pe.createElement(vt,(0,Me.Z)({},pr,{prefixCls:yr,id:Ve,tabKey:En,animated:Yn,active:Xn,style:(0,Ce.Z)((0,Ce.Z)({},In),qn),className:ge()(Bn,dr),ref:nr}))})})))}var et=oe(74902),kt=oe(48555),it=oe(59864);function st(Be,Ve,He){var tt=Pe.useRef({});return(!("value"in tt.current)||He(tt.current.condition,Ve))&&(tt.current.value=Be(),tt.current.condition=Ve),tt.current.value}function We(Be,Ve){typeof Be=="function"?Be(Ve):(0,ke.Z)(Be)==="object"&&Be&&"current"in Be&&(Be.current=Ve)}function Tt(){for(var Be=arguments.length,Ve=new Array(Be),He=0;He<Be;He++)Ve[He]=arguments[He];var tt=Ve.filter(function(gt){return gt});return tt.length<=1?tt[0]:function(gt){Ve.forEach(function(Ct){We(Ct,gt)})}}function Ut(){for(var Be=arguments.length,Ve=new Array(Be),He=0;He<Be;He++)Ve[He]=arguments[He];return st(function(){return Tt.apply(void 0,Ve)},Ve,function(tt,gt){return tt.length===gt.length&&tt.every(function(Ct,It){return Ct===gt[It]})})}function Qt(Be){var Ve,He,tt=isMemo(Be)?Be.type.type:Be.type;return!(typeof tt=="function"&&!((Ve=tt.prototype)!==null&&Ve!==void 0&&Ve.render)||typeof Be=="function"&&!((He=Be.prototype)!==null&&He!==void 0&&He.render))}var Xe={width:0,height:0,left:0,top:0};function Ae(Be,Ve,He){return(0,Pe.useMemo)(function(){for(var tt,gt=new Map,Ct=Ve.get((tt=Be[0])===null||tt===void 0?void 0:tt.key)||Xe,It=Ct.left+Ct.width,ln=0;ln<Be.length;ln+=1){var mn=Be[ln].key,Yn=Ve.get(mn);if(!Yn){var yr;Yn=Ve.get((yr=Be[ln-1])===null||yr===void 0?void 0:yr.key)||Xe}var Vn=gt.get(mn)||(0,Ce.Z)({},Yn);Vn.right=It-Vn.left-Vn.width,gt.set(mn,Vn)}return gt},[Be.map(function(tt){return tt.key}).join("_"),Ve,He])}function Lt(Be,Ve){var He=Pe.useRef(Be),tt=Pe.useState({}),gt=(0,he.Z)(tt,2),Ct=gt[1];function It(ln){var mn=typeof ln=="function"?ln(He.current):ln;mn!==He.current&&Ve(mn,He.current),He.current=mn,Ct({})}return[He.current,It]}var cn=.1,an=.01,ft=20,mt=Math.pow(.995,ft);function Yt(Be,Ve){var He=(0,Pe.useState)(),tt=(0,he.Z)(He,2),gt=tt[0],Ct=tt[1],It=(0,Pe.useState)(0),ln=(0,he.Z)(It,2),mn=ln[0],Yn=ln[1],yr=(0,Pe.useState)(0),Vn=(0,he.Z)(yr,2),En=Vn[0],wn=Vn[1],In=(0,Pe.useState)(),Bn=(0,he.Z)(In,2),pr=Bn[0],Xn=Bn[1],jn=(0,Pe.useRef)();function nr(Dt){var sn=Dt.touches[0],kn=sn.screenX,yn=sn.screenY;Ct({x:kn,y:yn}),window.clearInterval(jn.current)}function qn(Dt){if(gt){Dt.preventDefault();var sn=Dt.touches[0],kn=sn.screenX,yn=sn.screenY;Ct({x:kn,y:yn});var zn=kn-gt.x,Pn=yn-gt.y;Ve(zn,Pn);var pn=Date.now();Yn(pn),wn(pn-mn),Xn({x:zn,y:Pn})}}function dr(){if(gt&&(Ct(null),Xn(null),pr)){var Dt=pr.x/En,sn=pr.y/En,kn=Math.abs(Dt),yn=Math.abs(sn);if(Math.max(kn,yn)<cn)return;var zn=Dt,Pn=sn;jn.current=window.setInterval(function(){if(Math.abs(zn)<an&&Math.abs(Pn)<an){window.clearInterval(jn.current);return}zn*=mt,Pn*=mt,Ve(zn*ft,Pn*ft)},ft)}}var je=(0,Pe.useRef)();function Ye(Dt){var sn=Dt.deltaX,kn=Dt.deltaY,yn=0,zn=Math.abs(sn),Pn=Math.abs(kn);zn===Pn?yn=je.current==="x"?sn:kn:zn>Pn?(yn=sn,je.current="x"):(yn=kn,je.current="y"),Ve(-yn,-yn)&&Dt.preventDefault()}var $t=(0,Pe.useRef)(null);$t.current={onTouchStart:nr,onTouchMove:qn,onTouchEnd:dr,onWheel:Ye},Pe.useEffect(function(){function Dt(zn){$t.current.onTouchStart(zn)}function sn(zn){$t.current.onTouchMove(zn)}function kn(zn){$t.current.onTouchEnd(zn)}function yn(zn){$t.current.onWheel(zn)}return document.addEventListener("touchmove",sn,{passive:!1}),document.addEventListener("touchend",kn,{passive:!1}),Be.current.addEventListener("touchstart",Dt,{passive:!1}),Be.current.addEventListener("wheel",yn),function(){document.removeEventListener("touchmove",sn),document.removeEventListener("touchend",kn)}},[])}function An(Be){var Ve=(0,Pe.useState)(0),He=(0,he.Z)(Ve,2),tt=He[0],gt=He[1],Ct=(0,Pe.useRef)(0),It=(0,Pe.useRef)();return It.current=Be,ht(function(){var ln;(ln=It.current)===null||ln===void 0||ln.call(It)},[tt]),function(){Ct.current===tt&&(Ct.current+=1,gt(Ct.current))}}function dn(Be){var Ve=(0,Pe.useRef)([]),He=(0,Pe.useState)({}),tt=(0,he.Z)(He,2),gt=tt[1],Ct=(0,Pe.useRef)(typeof Be=="function"?Be():Be),It=An(function(){var mn=Ct.current;Ve.current.forEach(function(Yn){mn=Yn(mn)}),Ve.current=[],Ct.current=mn,gt({})});function ln(mn){Ve.current.push(mn),It()}return[Ct.current,ln]}var nn={width:0,height:0,left:0,top:0,right:0};function jt(Be,Ve,He,tt,gt,Ct,It){var ln=It.tabs,mn=It.tabPosition,Yn=It.rtl,yr,Vn,En;return["top","bottom"].includes(mn)?(yr="width",Vn=Yn?"right":"left",En=Math.abs(He)):(yr="height",Vn="top",En=-He),(0,Pe.useMemo)(function(){if(!ln.length)return[0,0];for(var wn=ln.length,In=wn,Bn=0;Bn<wn;Bn+=1){var pr=Be.get(ln[Bn].key)||nn;if(pr[Vn]+pr[yr]>En+Ve){In=Bn-1;break}}for(var Xn=0,jn=wn-1;jn>=0;jn-=1){var nr=Be.get(ln[jn].key)||nn;if(nr[Vn]<En){Xn=jn+1;break}}return Xn>=In?[0,0]:[Xn,In]},[Be,Ve,tt,gt,Ct,En,mn,ln.map(function(wn){return wn.key}).join("_"),Yn])}function xn(Be){var Ve;return Be instanceof Map?(Ve={},Be.forEach(function(He,tt){Ve[tt]=He})):Ve=Be,JSON.stringify(Ve)}var vn="TABS_DQ";function Te(Be){return String(Be).replace(/"/g,vn)}function ue(Be,Ve,He,tt){return!(!He||tt||Be===!1||Be===void 0&&(Ve===!1||Ve===null))}function le(Be,Ve){var He=Be.prefixCls,tt=Be.editable,gt=Be.locale,Ct=Be.style;return!tt||tt.showAdd===!1?null:Pe.createElement("button",{ref:Ve,type:"button",className:"".concat(He,"-nav-add"),style:Ct,"aria-label":(gt==null?void 0:gt.addAriaLabel)||"Add tab",onClick:function(ln){tt.onEdit("add",{event:ln})}},tt.addIcon||"+")}var me=Pe.forwardRef(le),fe=Pe.forwardRef(function(Be,Ve){var He=Be.position,tt=Be.prefixCls,gt=Be.extra;if(!gt)return null;var Ct,It={};return(0,ke.Z)(gt)==="object"&&!Pe.isValidElement(gt)?It=gt:It.right=gt,He==="right"&&(Ct=It.right),He==="left"&&(Ct=It.left),Ct?Pe.createElement("div",{className:"".concat(tt,"-extra-content"),ref:Ve},Ct):null}),se=fe,Oe=oe(62709);function rt(Be,Ve,He){var tt=React.useRef({});return(!("value"in tt.current)||He(tt.current.condition,Ve))&&(tt.current.value=Be(),tt.current.condition=Ve),tt.current.value}function Pt(Be,Ve){typeof Be=="function"?Be(Ve):(0,ke.Z)(Be)==="object"&&Be&&"current"in Be&&(Be.current=Ve)}function zt(){for(var Be=arguments.length,Ve=new Array(Be),He=0;He<Be;He++)Ve[He]=arguments[He];var tt=Ve.filter(function(gt){return gt});return tt.length<=1?tt[0]:function(gt){Ve.forEach(function(Ct){Pt(Ct,gt)})}}function Zt(){for(var Be=arguments.length,Ve=new Array(Be),He=0;He<Be;He++)Ve[He]=arguments[He];return useMemo(function(){return zt.apply(void 0,Ve)},Ve,function(tt,gt){return tt.length===gt.length&&tt.every(function(Ct,It){return Ct===gt[It]})})}function en(Be){var Ve,He,tt=(0,it.isMemo)(Be)?Be.type.type:Be.type;return!(typeof tt=="function"&&!((Ve=tt.prototype)!==null&&Ve!==void 0&&Ve.render)||typeof Be=="function"&&!((He=Be.prototype)!==null&&He!==void 0&&He.render))}var Gt={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(Ve){var He=Ve.keyCode;if(Ve.altKey&&!Ve.ctrlKey||Ve.metaKey||He>=Gt.F1&&He<=Gt.F12)return!1;switch(He){case Gt.ALT:case Gt.CAPS_LOCK:case Gt.CONTEXT_MENU:case Gt.CTRL:case Gt.DOWN:case Gt.END:case Gt.ESC:case Gt.HOME:case Gt.INSERT:case Gt.LEFT:case Gt.MAC_FF_META:case Gt.META:case Gt.NUMLOCK:case Gt.NUM_CENTER:case Gt.PAGE_DOWN:case Gt.PAGE_UP:case Gt.PAUSE:case Gt.PRINT_SCREEN:case Gt.RIGHT:case Gt.SHIFT:case Gt.UP:case Gt.WIN_KEY:case Gt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ve){if(Ve>=Gt.ZERO&&Ve<=Gt.NINE||Ve>=Gt.NUM_ZERO&&Ve<=Gt.NUM_MULTIPLY||Ve>=Gt.A&&Ve<=Gt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ve===0)return!0;switch(Ve){case Gt.SPACE:case Gt.QUESTION_MARK:case Gt.NUM_PLUS:case Gt.NUM_MINUS:case Gt.NUM_PERIOD:case Gt.NUM_DIVISION:case Gt.SEMICOLON:case Gt.DASH:case Gt.EQUALS:case Gt.COMMA:case Gt.PERIOD:case Gt.SLASH:case Gt.APOSTROPHE:case Gt.SINGLE_QUOTE:case Gt.OPEN_SQUARE_BRACKET:case Gt.BACKSLASH:case Gt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},tr=Gt,cr=function(Ve){return+setTimeout(Ve,16)},Wt=function(Ve){return clearTimeout(Ve)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(cr=function(Ve){return window.requestAnimationFrame(Ve)},Wt=function(Ve){return window.cancelAnimationFrame(Ve)});var bn=0,lr=new Map;function Wr(Be){lr.delete(Be)}var Rn=function(Ve){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;bn+=1;var tt=bn;function gt(Ct){if(Ct===0)Wr(tt),Ve();else{var It=cr(function(){gt(Ct-1)});lr.set(tt,It)}}return gt(He),tt};Rn.cancel=function(Be){var Ve=lr.get(Be);return Wr(Ve),Wt(Ve)};var Tr=Rn,Ca=tr.ESC,Wi=tr.TAB;function Li(Be){var Ve=Be.visible,He=Be.triggerRef,tt=Be.onVisibleChange,gt=Be.autoFocus,Ct=Be.overlayRef,It=Pe.useRef(!1),ln=function(){if(Ve){var Vn,En;(Vn=He.current)===null||Vn===void 0||(En=Vn.focus)===null||En===void 0||En.call(Vn),tt==null||tt(!1)}},mn=function(){var Vn;return(Vn=Ct.current)!==null&&Vn!==void 0&&Vn.focus?(Ct.current.focus(),It.current=!0,!0):!1},Yn=function(Vn){switch(Vn.keyCode){case Ca:ln();break;case Wi:{var En=!1;It.current||(En=mn()),En?Vn.preventDefault():ln();break}}};Pe.useEffect(function(){return Ve?(window.addEventListener("keydown",Yn),gt&&Tr(mn,3),function(){window.removeEventListener("keydown",Yn),It.current=!1}):function(){It.current=!1}},[Ve])}var Mi=(0,Pe.forwardRef)(function(Be,Ve){var He=Be.overlay,tt=Be.arrow,gt=Be.prefixCls,Ct=(0,Pe.useMemo)(function(){var ln;return typeof He=="function"?ln=He():ln=He,ln},[He]),It=zt(Ve,Ct==null?void 0:Ct.ref);return Pe.createElement(Pe.Fragment,null,tt&&Pe.createElement("div",{className:"".concat(gt,"-arrow")}),Pe.cloneElement(Ct,{ref:en(Ct)?It:void 0}))}),Ji=Mi,Zi={adjustX:1,adjustY:1},Ea=[0,0],Ma={topLeft:{points:["bl","tl"],overflow:Zi,offset:[0,-4],targetOffset:Ea},top:{points:["bc","tc"],overflow:Zi,offset:[0,-4],targetOffset:Ea},topRight:{points:["br","tr"],overflow:Zi,offset:[0,-4],targetOffset:Ea},bottomLeft:{points:["tl","bl"],overflow:Zi,offset:[0,4],targetOffset:Ea},bottom:{points:["tc","bc"],overflow:Zi,offset:[0,4],targetOffset:Ea},bottomRight:{points:["tr","br"],overflow:Zi,offset:[0,4],targetOffset:Ea}},Gr=Ma,Va=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function no(Be,Ve){var He,tt=Be.arrow,gt=tt===void 0?!1:tt,Ct=Be.prefixCls,It=Ct===void 0?"rc-dropdown":Ct,ln=Be.transitionName,mn=Be.animation,Yn=Be.align,yr=Be.placement,Vn=yr===void 0?"bottomLeft":yr,En=Be.placements,wn=En===void 0?Gr:En,In=Be.getPopupContainer,Bn=Be.showAction,pr=Be.hideAction,Xn=Be.overlayClassName,jn=Be.overlayStyle,nr=Be.visible,qn=Be.trigger,dr=qn===void 0?["hover"]:qn,je=Be.autoFocus,Ye=Be.overlay,$t=Be.children,Dt=Be.onVisibleChange,sn=(0,Je.Z)(Be,Va),kn=Pe.useState(),yn=(0,he.Z)(kn,2),zn=yn[0],Pn=yn[1],pn="visible"in Be?nr:zn,Nn=Pe.useRef(null),Wn=Pe.useRef(null),vr=Pe.useRef(null);Pe.useImperativeHandle(Ve,function(){return Nn.current});var Hn=function($r){Pn($r),Dt==null||Dt($r)};Li({visible:pn,triggerRef:vr,onVisibleChange:Hn,autoFocus:je,overlayRef:Wn});var Er=function($r){var wi=Be.onOverlayClick;Pn(!1),wi&&wi($r)},Qr=function(){return Pe.createElement(Ji,{ref:Wn,overlay:Ye,prefixCls:It,arrow:gt})},Rr=function(){return typeof Ye=="function"?Qr:Qr()},jr=function(){var $r=Be.minOverlayWidthMatchTrigger,wi=Be.alignPoint;return"minOverlayWidthMatchTrigger"in Be?$r:!wi},Cr=function(){var $r=Be.openClassName;return $r!==void 0?$r:"".concat(It,"-open")},Fr=Pe.cloneElement($t,{className:ge()((He=$t.props)===null||He===void 0?void 0:He.className,pn&&Cr()),ref:en($t)?zt(vr,$t.ref):void 0}),ai=pr;return!ai&&dr.indexOf("contextMenu")!==-1&&(ai=["click"]),Pe.createElement(Oe.Z,(0,Me.Z)({builtinPlacements:wn},sn,{prefixCls:It,ref:Nn,popupClassName:ge()(Xn,(0,Ee.Z)({},"".concat(It,"-show-arrow"),gt)),popupStyle:jn,action:dr,showAction:Bn,hideAction:ai,popupPlacement:Vn,popupAlign:Yn,popupTransitionName:ln,popupAnimation:mn,popupVisible:pn,stretch:jr()?"minWidth":"",popup:Rr(),onPopupVisibleChange:Hn,onPopupClick:Er,getPopupContainer:In}),Fr)}var po=Pe.forwardRef(no),mo=po,Pa=oe(78595),Bt={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(Ve){var He=Ve.keyCode;if(Ve.altKey&&!Ve.ctrlKey||Ve.metaKey||He>=Bt.F1&&He<=Bt.F12)return!1;switch(He){case Bt.ALT:case Bt.CAPS_LOCK:case Bt.CONTEXT_MENU:case Bt.CTRL:case Bt.DOWN:case Bt.END:case Bt.ESC:case Bt.HOME:case Bt.INSERT:case Bt.LEFT:case Bt.MAC_FF_META:case Bt.META:case Bt.NUMLOCK:case Bt.NUM_CENTER:case Bt.PAGE_DOWN:case Bt.PAGE_UP:case Bt.PAUSE:case Bt.PRINT_SCREEN:case Bt.RIGHT:case Bt.SHIFT:case Bt.UP:case Bt.WIN_KEY:case Bt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ve){if(Ve>=Bt.ZERO&&Ve<=Bt.NINE||Ve>=Bt.NUM_ZERO&&Ve<=Bt.NUM_MULTIPLY||Ve>=Bt.A&&Ve<=Bt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ve===0)return!0;switch(Ve){case Bt.SPACE:case Bt.QUESTION_MARK:case Bt.NUM_PLUS:case Bt.NUM_MINUS:case Bt.NUM_PERIOD:case Bt.NUM_DIVISION:case Bt.SEMICOLON:case Bt.DASH:case Bt.EQUALS:case Bt.COMMA:case Bt.PERIOD:case Bt.SLASH:case Bt.APOSTROPHE:case Bt.SINGLE_QUOTE:case Bt.OPEN_SQUARE_BRACKET:case Bt.BACKSLASH:case Bt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},On=Bt;function Fn(Be,Ve){var He=Be.prefixCls,tt=Be.id,gt=Be.tabs,Ct=Be.locale,It=Be.mobile,ln=Be.moreIcon,mn=ln===void 0?"More":ln,Yn=Be.moreTransitionName,yr=Be.style,Vn=Be.className,En=Be.editable,wn=Be.tabBarGutter,In=Be.rtl,Bn=Be.removeAriaLabel,pr=Be.onTabClick,Xn=Be.getPopupContainer,jn=Be.popupClassName,nr=(0,Pe.useState)(!1),qn=(0,he.Z)(nr,2),dr=qn[0],je=qn[1],Ye=(0,Pe.useState)(null),$t=(0,he.Z)(Ye,2),Dt=$t[0],sn=$t[1],kn="".concat(tt,"-more-popup"),yn="".concat(He,"-dropdown"),zn=Dt!==null?"".concat(kn,"-").concat(Dt):null,Pn=Ct==null?void 0:Ct.dropdownAriaLabel;function pn(Rr,jr){Rr.preventDefault(),Rr.stopPropagation(),En.onEdit("remove",{key:jr,event:Rr})}var Nn=Pe.createElement(Pa.ZP,{onClick:function(jr){var Cr=jr.key,Fr=jr.domEvent;pr(Cr,Fr),je(!1)},prefixCls:"".concat(yn,"-menu"),id:kn,tabIndex:-1,role:"listbox","aria-activedescendant":zn,selectedKeys:[Dt],"aria-label":Pn!==void 0?Pn:"expanded dropdown"},gt.map(function(Rr){var jr=Rr.closable,Cr=Rr.disabled,Fr=Rr.closeIcon,ai=Rr.key,hi=Rr.label,$r=ue(jr,Fr,En,Cr);return Pe.createElement(Pa.sN,{key:ai,id:"".concat(kn,"-").concat(ai),role:"option","aria-controls":tt&&"".concat(tt,"-panel-").concat(ai),disabled:Cr},Pe.createElement("span",null,hi),$r&&Pe.createElement("button",{type:"button","aria-label":Bn||"remove",tabIndex:0,className:"".concat(yn,"-menu-item-remove"),onClick:function(ta){ta.stopPropagation(),pn(ta,ai)}},Fr||En.removeIcon||"\xD7"))}));function Wn(Rr){for(var jr=gt.filter(function($r){return!$r.disabled}),Cr=jr.findIndex(function($r){return $r.key===Dt})||0,Fr=jr.length,ai=0;ai<Fr;ai+=1){Cr=(Cr+Rr+Fr)%Fr;var hi=jr[Cr];if(!hi.disabled){sn(hi.key);return}}}function vr(Rr){var jr=Rr.which;if(!dr){[On.DOWN,On.SPACE,On.ENTER].includes(jr)&&(je(!0),Rr.preventDefault());return}switch(jr){case On.UP:Wn(-1),Rr.preventDefault();break;case On.DOWN:Wn(1),Rr.preventDefault();break;case On.ESC:je(!1);break;case On.SPACE:case On.ENTER:Dt!==null&&pr(Dt,Rr);break}}(0,Pe.useEffect)(function(){var Rr=document.getElementById(zn);Rr&&Rr.scrollIntoView&&Rr.scrollIntoView(!1)},[Dt]),(0,Pe.useEffect)(function(){dr||sn(null)},[dr]);var Hn=(0,Ee.Z)({},In?"marginRight":"marginLeft",wn);gt.length||(Hn.visibility="hidden",Hn.order=1);var Er=ge()((0,Ee.Z)({},"".concat(yn,"-rtl"),In)),Qr=It?null:Pe.createElement(mo,{prefixCls:yn,overlay:Nn,trigger:["hover"],visible:gt.length?dr:!1,transitionName:Yn,onVisibleChange:je,overlayClassName:ge()(Er,jn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Xn},Pe.createElement("button",{type:"button",className:"".concat(He,"-nav-more"),style:Hn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":kn,id:"".concat(tt,"-more"),"aria-expanded":dr,onKeyDown:vr},mn));return Pe.createElement("div",{className:ge()("".concat(He,"-nav-operations"),Vn),style:yr,ref:Ve},Qr,Pe.createElement(me,{prefixCls:He,locale:Ct,editable:En}))}var $n=Pe.memo(Pe.forwardRef(Fn),function(Be,Ve){return Ve.tabMoving});function Ir(Be){var Ve,He=Be.prefixCls,tt=Be.id,gt=Be.active,Ct=Be.tab,It=Ct.key,ln=Ct.label,mn=Ct.disabled,Yn=Ct.closeIcon,yr=Be.closable,Vn=Be.renderWrapper,En=Be.removeAriaLabel,wn=Be.editable,In=Be.onClick,Bn=Be.onFocus,pr=Be.style,Xn="".concat(He,"-tab"),jn=ue(yr,Yn,wn,mn);function nr(je){mn||In(je)}function qn(je){je.preventDefault(),je.stopPropagation(),wn.onEdit("remove",{key:It,event:je})}var dr=Pe.createElement("div",{key:It,"data-node-key":Te(It),className:ge()(Xn,(Ve={},(0,Ee.Z)(Ve,"".concat(Xn,"-with-remove"),jn),(0,Ee.Z)(Ve,"".concat(Xn,"-active"),gt),(0,Ee.Z)(Ve,"".concat(Xn,"-disabled"),mn),Ve)),style:pr,onClick:nr},Pe.createElement("div",{role:"tab","aria-selected":gt,id:tt&&"".concat(tt,"-tab-").concat(It),className:"".concat(Xn,"-btn"),"aria-controls":tt&&"".concat(tt,"-panel-").concat(It),"aria-disabled":mn,tabIndex:mn?null:0,onClick:function(Ye){Ye.stopPropagation(),nr(Ye)},onKeyDown:function(Ye){[On.SPACE,On.ENTER].includes(Ye.which)&&(Ye.preventDefault(),nr(Ye))},onFocus:Bn},ln),jn&&Pe.createElement("button",{type:"button","aria-label":En||"remove",tabIndex:0,className:"".concat(Xn,"-remove"),onClick:function(Ye){Ye.stopPropagation(),qn(Ye)}},Yn||wn.removeIcon||"\xD7"));return Vn?Vn(dr):dr}var or=Ir,Sr=function(Ve){return+setTimeout(Ve,16)},Zn=function(Ve){return clearTimeout(Ve)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Sr=function(Ve){return window.requestAnimationFrame(Ve)},Zn=function(Ve){return window.cancelAnimationFrame(Ve)});var ut=0,bt=new Map;function Ft(Be){bt.delete(Be)}var qt=function(Ve){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ut+=1;var tt=ut;function gt(Ct){if(Ct===0)Ft(tt),Ve();else{var It=Sr(function(){gt(Ct-1)});bt.set(tt,It)}}return gt(He),tt};qt.cancel=function(Be){var Ve=bt.get(Be);return Ft(Ve),Zn(Ve)};var qe=qt,_t=function(Ve){var He=Ve.activeTabOffset,tt=Ve.horizontal,gt=Ve.rtl,Ct=Ve.indicatorSize,It=(0,Pe.useState)(),ln=(0,he.Z)(It,2),mn=ln[0],Yn=ln[1],yr=(0,Pe.useRef)(),Vn=function(In){return typeof Ct=="function"?Ct(In):typeof Ct=="number"?Ct:In};function En(){qe.cancel(yr.current)}return(0,Pe.useEffect)(function(){var wn={};return He&&(tt?(gt?(wn.right=He.right+He.width/2,wn.transform="translateX(50%)"):(wn.left=He.left+He.width/2,wn.transform="translateX(-50%)"),wn.width=Vn(He.width)):(wn.top=He.top+He.height/2,wn.transform="translateY(-50%)",wn.height=Vn(He.height))),En(),yr.current=qe(function(){Yn(wn)}),En},[He,tt,gt,Ct]),{style:mn}},Xt=_t,Kt=function(Ve){var He=Ve.current||{},tt=He.offsetWidth,gt=tt===void 0?0:tt,Ct=He.offsetHeight,It=Ct===void 0?0:Ct;return[gt,It]},on=function(Ve,He){return Ve[He?0:1]};function rn(Be,Ve){var He,tt=Pe.useContext(Ke),gt=tt.prefixCls,Ct=tt.tabs,It=Be.className,ln=Be.style,mn=Be.id,Yn=Be.animated,yr=Be.activeKey,Vn=Be.rtl,En=Be.extra,wn=Be.editable,In=Be.locale,Bn=Be.tabPosition,pr=Be.tabBarGutter,Xn=Be.children,jn=Be.onTabClick,nr=Be.onTabScroll,qn=Be.indicatorSize,dr=(0,Pe.useRef)(),je=(0,Pe.useRef)(),Ye=(0,Pe.useRef)(),$t=(0,Pe.useRef)(),Dt=(0,Pe.useRef)(),sn=(0,Pe.useRef)(),kn=(0,Pe.useRef)(),yn=Bn==="top"||Bn==="bottom",zn=Lt(0,function(Fa,Ni){yn&&nr&&nr({direction:Fa>Ni?"left":"right"})}),Pn=(0,he.Z)(zn,2),pn=Pn[0],Nn=Pn[1],Wn=Lt(0,function(Fa,Ni){!yn&&nr&&nr({direction:Fa>Ni?"top":"bottom"})}),vr=(0,he.Z)(Wn,2),Hn=vr[0],Er=vr[1],Qr=(0,Pe.useState)([0,0]),Rr=(0,he.Z)(Qr,2),jr=Rr[0],Cr=Rr[1],Fr=(0,Pe.useState)([0,0]),ai=(0,he.Z)(Fr,2),hi=ai[0],$r=ai[1],wi=(0,Pe.useState)([0,0]),ta=(0,he.Z)(wi,2),Ba=ta[0],ga=ta[1],ra=(0,Pe.useState)([0,0]),La=(0,he.Z)(ra,2),Aa=La[0],Oi=La[1],ia=dn(new Map),ni=(0,he.Z)(ia,2),Ci=ni[0],Xi=ni[1],wa=Ae(Ct,Ci,hi[0]),ri=on(jr,yn),io=on(hi,yn),ko=on(Ba,yn),Ja=on(Aa,yn),Ta=ri<io+ko,Ui=Ta?ri-Ja:ri-ko,Po="".concat(gt,"-nav-operations-hidden"),Yi=0,oi=0;yn&&Vn?(Yi=0,oi=Math.max(0,io-Ui)):(Yi=Math.min(0,Ui-io),oi=0);function sa(Fa){return Fa<Yi?Yi:Fa>oi?oi:Fa}var Ga=(0,Pe.useRef)(),la=(0,Pe.useState)(),Ka=(0,he.Z)(la,2),ki=Ka[0],ro=Ka[1];function ao(){ro(Date.now())}function eo(){window.clearTimeout(Ga.current)}Yt($t,function(Fa,Ni){function Do(Eo,Ie){Eo(function(Re){var St=sa(Re+Ie);return St})}return Ta?(yn?Do(Nn,Fa):Do(Er,Ni),eo(),ao(),!0):!1}),(0,Pe.useEffect)(function(){return eo(),ki&&(Ga.current=window.setTimeout(function(){ro(0)},100)),eo},[ki]);var oo=jt(wa,Ui,yn?pn:Hn,io,ko,Ja,(0,Ce.Z)((0,Ce.Z)({},Be),{},{tabs:Ct})),wo=(0,he.Z)(oo,2),Ho=wo[0],to=wo[1],Co=ot(function(){var Fa=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yr,Ni=wa.get(Fa)||{width:0,height:0,left:0,right:0,top:0};if(yn){var Do=pn;Vn?Ni.right<pn?Do=Ni.right:Ni.right+Ni.width>pn+Ui&&(Do=Ni.right+Ni.width-Ui):Ni.left<-pn?Do=-Ni.left:Ni.left+Ni.width>-pn+Ui&&(Do=-(Ni.left+Ni.width-Ui)),Er(0),Nn(sa(Do))}else{var Eo=Hn;Ni.top<-Hn?Eo=-Ni.top:Ni.top+Ni.height>-Hn+Ui&&(Eo=-(Ni.top+Ni.height-Ui)),Nn(0),Er(sa(Eo))}}),Jo={};Bn==="top"||Bn==="bottom"?Jo[Vn?"marginRight":"marginLeft"]=pr:Jo.marginTop=pr;var Xo=Ct.map(function(Fa,Ni){var Do=Fa.key;return Pe.createElement(or,{id:mn,prefixCls:gt,key:Do,tab:Fa,style:Ni===0?void 0:Jo,closable:Fa.closable,editable:wn,active:Do===yr,renderWrapper:Xn,removeAriaLabel:In==null?void 0:In.removeAriaLabel,onClick:function(Ie){jn(Do,Ie)},onFocus:function(){Co(Do),ao(),$t.current&&(Vn||($t.current.scrollLeft=0),$t.current.scrollTop=0)}})}),as=function(){return Xi(function(){var Ni=new Map;return Ct.forEach(function(Do){var Eo,Ie=Do.key,Re=(Eo=Dt.current)===null||Eo===void 0?void 0:Eo.querySelector('[data-node-key="'.concat(Te(Ie),'"]'));Re&&Ni.set(Ie,{width:Re.offsetWidth,height:Re.offsetHeight,left:Re.offsetLeft,top:Re.offsetTop})}),Ni})};(0,Pe.useEffect)(function(){as()},[Ct.map(function(Fa){return Fa.key}).join("_")]);var No=An(function(){var Fa=Kt(dr),Ni=Kt(je),Do=Kt(Ye);Cr([Fa[0]-Ni[0]-Do[0],Fa[1]-Ni[1]-Do[1]]);var Eo=Kt(kn);ga(Eo);var Ie=Kt(sn);Oi(Ie);var Re=Kt(Dt);$r([Re[0]-Eo[0],Re[1]-Eo[1]]),as()}),vo=Ct.slice(0,Ho),ji=Ct.slice(to+1),ua=[].concat((0,et.Z)(vo),(0,et.Z)(ji)),Qa=wa.get(yr),ho=Xt({activeTabOffset:Qa,horizontal:yn,rtl:Vn,indicatorSize:qn}),Fo=ho.style;(0,Pe.useEffect)(function(){Co()},[yr,Yi,oi,xn(Qa),xn(wa),yn]),(0,Pe.useEffect)(function(){No()},[Vn]);var es=!!ua.length,ms="".concat(gt,"-nav-wrap"),Rs,Fs,os,Ts;return yn?Vn?(Fs=pn>0,Rs=pn!==oi):(Rs=pn<0,Fs=pn!==Yi):(os=Hn<0,Ts=Hn!==Yi),Pe.createElement(kt.Z,{onResize:No},Pe.createElement("div",{ref:Ut(Ve,dr),role:"tablist",className:ge()("".concat(gt,"-nav"),It),style:ln,onKeyDown:function(){ao()}},Pe.createElement(se,{ref:je,position:"left",extra:En,prefixCls:gt}),Pe.createElement(kt.Z,{onResize:No},Pe.createElement("div",{className:ge()(ms,(He={},(0,Ee.Z)(He,"".concat(ms,"-ping-left"),Rs),(0,Ee.Z)(He,"".concat(ms,"-ping-right"),Fs),(0,Ee.Z)(He,"".concat(ms,"-ping-top"),os),(0,Ee.Z)(He,"".concat(ms,"-ping-bottom"),Ts),He)),ref:$t},Pe.createElement(kt.Z,{onResize:No},Pe.createElement("div",{ref:Dt,className:"".concat(gt,"-nav-list"),style:{transform:"translate(".concat(pn,"px, ").concat(Hn,"px)"),transition:ki?"none":void 0}},Xo,Pe.createElement(me,{ref:kn,prefixCls:gt,locale:In,editable:wn,style:(0,Ce.Z)((0,Ce.Z)({},Xo.length===0?void 0:Jo),{},{visibility:es?"hidden":null})}),Pe.createElement("div",{className:ge()("".concat(gt,"-ink-bar"),(0,Ee.Z)({},"".concat(gt,"-ink-bar-animated"),Yn.inkBar)),style:Fo}))))),Pe.createElement($n,(0,Me.Z)({},Be,{removeAriaLabel:In==null?void 0:In.removeAriaLabel,ref:sn,prefixCls:gt,tabs:ua,className:!es&&Po,tabMoving:!!ki})),Pe.createElement(se,{ref:Ye,position:"right",extra:En,prefixCls:gt})))}var Un=Pe.forwardRef(rn),Ar=["renderTabBar"],rr=["label","key"];function ir(Be){var Ve=Be.renderTabBar,He=(0,Je.Z)(Be,Ar),tt=Pe.useContext(Ke),gt=tt.tabs;if(Ve){var Ct=(0,Ce.Z)((0,Ce.Z)({},He),{},{panes:gt.map(function(It){var ln=It.label,mn=It.key,Yn=(0,Je.Z)(It,rr);return Pe.createElement(vt,(0,Me.Z)({tab:ln,key:mn,tabKey:mn},Yn))})});return Ve(Ct,Un)}return Pe.createElement(Un,He)}var mr={},br=[],Yr=function(Ve){br.push(Ve)};function _n(Be,Ve){if(0)var He}function Qn(Be,Ve){if(0)var He}function na(){mr={}}function ca(Be,Ve,He){!Ve&&!mr[He]&&(Be(!1,He),mr[He]=!0)}function _i(Be,Ve){ca(_n,Be,Ve)}function ii(Be,Ve){ca(Qn,Be,Ve)}_i.preMessage=Yr,_i.resetWarned=na,_i.noteOnce=ii;var va=null;function _r(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Ve;return Be===!1?Ve={inkBar:!1,tabPane:!1}:Be===!0?Ve={inkBar:!0,tabPane:!1}:Ve=(0,Ce.Z)({inkBar:!0},(0,ke.Z)(Be)==="object"?Be:{}),Ve.tabPaneMotion&&Ve.tabPane===void 0&&(Ve.tabPane=!0),!Ve.tabPaneMotion&&Ve.tabPane&&(Ve.tabPane=!1),Ve}var Qi=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],Tn=0;function Ua(Be,Ve){var He,tt=Be.id,gt=Be.prefixCls,Ct=gt===void 0?"rc-tabs":gt,It=Be.className,ln=Be.items,mn=Be.direction,Yn=Be.activeKey,yr=Be.defaultActiveKey,Vn=Be.editable,En=Be.animated,wn=Be.tabPosition,In=wn===void 0?"top":wn,Bn=Be.tabBarGutter,pr=Be.tabBarStyle,Xn=Be.tabBarExtraContent,jn=Be.locale,nr=Be.moreIcon,qn=Be.moreTransitionName,dr=Be.destroyInactiveTabPane,je=Be.renderTabBar,Ye=Be.onChange,$t=Be.onTabClick,Dt=Be.onTabScroll,sn=Be.getPopupContainer,kn=Be.popupClassName,yn=Be.indicatorSize,zn=(0,Je.Z)(Be,Qi),Pn=Pe.useMemo(function(){return(ln||[]).filter(function(Oi){return Oi&&(0,ke.Z)(Oi)==="object"&&"key"in Oi})},[ln]),pn=mn==="rtl",Nn=_r(En),Wn=(0,Pe.useState)(!1),vr=(0,he.Z)(Wn,2),Hn=vr[0],Er=vr[1];(0,Pe.useEffect)(function(){Er(dt())},[]);var Qr=be(function(){var Oi;return(Oi=Pn[0])===null||Oi===void 0?void 0:Oi.key},{value:Yn,defaultValue:yr}),Rr=(0,he.Z)(Qr,2),jr=Rr[0],Cr=Rr[1],Fr=(0,Pe.useState)(function(){return Pn.findIndex(function(Oi){return Oi.key===jr})}),ai=(0,he.Z)(Fr,2),hi=ai[0],$r=ai[1];(0,Pe.useEffect)(function(){var Oi=Pn.findIndex(function(ni){return ni.key===jr});if(Oi===-1){var ia;Oi=Math.max(0,Math.min(hi,Pn.length-1)),Cr((ia=Pn[Oi])===null||ia===void 0?void 0:ia.key)}$r(Oi)},[Pn.map(function(Oi){return Oi.key}).join("_"),jr,hi]);var wi=be(null,{value:tt}),ta=(0,he.Z)(wi,2),Ba=ta[0],ga=ta[1];(0,Pe.useEffect)(function(){tt||(ga("rc-tabs-".concat(Tn)),Tn+=1)},[]);function ra(Oi,ia){$t==null||$t(Oi,ia);var ni=Oi!==jr;Cr(Oi),ni&&(Ye==null||Ye(Oi))}var La={id:Ba,activeKey:jr,animated:Nn,tabPosition:In,rtl:pn,mobile:Hn},Aa=(0,Ce.Z)((0,Ce.Z)({},La),{},{editable:Vn,locale:jn,moreIcon:nr,moreTransitionName:qn,tabBarGutter:Bn,onTabClick:ra,onTabScroll:Dt,extra:Xn,style:pr,panes:null,getPopupContainer:sn,popupClassName:kn,indicatorSize:yn});return Pe.createElement(Ke.Provider,{value:{tabs:Pn,prefixCls:Ct}},Pe.createElement("div",(0,Me.Z)({ref:Ve,id:tt,className:ge()(Ct,"".concat(Ct,"-").concat(In),(He={},(0,Ee.Z)(He,"".concat(Ct,"-mobile"),Hn),(0,Ee.Z)(He,"".concat(Ct,"-editable"),Vn),(0,Ee.Z)(He,"".concat(Ct,"-rtl"),pn),He),It)},zn),Pe.createElement(ir,(0,Me.Z)({},Aa,{renderTabBar:je})),Pe.createElement(Ue,(0,Me.Z)({destroyInactiveTabPane:dr},La,{animated:Nn}))))}var xa=Pe.forwardRef(Ua),uo=xa,ja=uo,ka=oe(53124),co=oe(98675),fa=()=>null,Ya=oe(33603);const _o={motionAppear:!1,motionEnter:!0,motionLeave:!0};function qa(Be){let Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},He;return Ve===!1?He={inkBar:!1,tabPane:!1}:Ve===!0?He={inkBar:!0,tabPane:!0}:He=Object.assign({inkBar:!0},typeof Ve=="object"?Ve:{}),He.tabPane&&(He.tabPaneMotion=Object.assign(Object.assign({},_o),{motionName:(0,Ya.m)(Be,"switch")})),He}var Oa=oe(37419),So=function(Be,Ve){var He={};for(var tt in Be)Object.prototype.hasOwnProperty.call(Be,tt)&&Ve.indexOf(tt)<0&&(He[tt]=Be[tt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,tt=Object.getOwnPropertySymbols(Be);gt<tt.length;gt++)Ve.indexOf(tt[gt])<0&&Object.prototype.propertyIsEnumerable.call(Be,tt[gt])&&(He[tt[gt]]=Be[tt[gt]]);return He};function To(Be){return Be.filter(Ve=>Ve)}function fo(Be,Ve){if(Be)return Be;const He=(0,Oa.Z)(Ve).map(tt=>{if(Pe.isValidElement(tt)){const{key:gt,props:Ct}=tt,It=Ct||{},{tab:ln}=It,mn=So(It,["tab"]);return Object.assign(Object.assign({key:String(gt)},mn),{label:ln})}return null});return To(He)}var Vi=oe(14747),At=oe(67968),Mt=oe(45503),tn=oe(67771),Kn=Be=>{const{componentCls:Ve,motionDurationSlow:He}=Be;return[{[Ve]:{[`${Ve}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${He}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${He}`}}}}},[(0,tn.oN)(Be,"slide-up"),(0,tn.oN)(Be,"slide-down")]]};const Zr=Be=>{const{componentCls:Ve,tabsCardPadding:He,cardBg:tt,cardGutter:gt,colorBorderSecondary:Ct,itemSelectedColor:It}=Be;return{[`${Ve}-card`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{margin:0,padding:He,background:tt,border:`${Be.lineWidth}px ${Be.lineType} ${Ct}`,transition:`all ${Be.motionDurationSlow} ${Be.motionEaseInOut}`},[`${Ve}-tab-active`]:{color:It,background:Be.colorBgContainer},[`${Ve}-ink-bar`]:{visibility:"hidden"}},[`&${Ve}-top, &${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab + ${Ve}-tab`]:{marginLeft:{_skip_check_:!0,value:`${gt}px`}}}},[`&${Ve}-top`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:`${Be.borderRadiusLG}px ${Be.borderRadiusLG}px 0 0`},[`${Ve}-tab-active`]:{borderBottomColor:Be.colorBgContainer}}},[`&${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:`0 0 ${Be.borderRadiusLG}px ${Be.borderRadiusLG}px`},[`${Ve}-tab-active`]:{borderTopColor:Be.colorBgContainer}}},[`&${Ve}-left, &${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab + ${Ve}-tab`]:{marginTop:`${gt}px`}}},[`&${Ve}-left`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Be.borderRadiusLG}px 0 0 ${Be.borderRadiusLG}px`}},[`${Ve}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:Be.colorBgContainer}}}},[`&${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Be.borderRadiusLG}px ${Be.borderRadiusLG}px 0`}},[`${Ve}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:Be.colorBgContainer}}}}}}},Nr=Be=>{const{componentCls:Ve,itemHoverColor:He,dropdownEdgeChildVerticalPadding:tt}=Be;return{[`${Ve}-dropdown`]:Object.assign(Object.assign({},(0,Vi.Wf)(Be)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Be.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Ve}-dropdown-menu`]:{maxHeight:Be.tabsDropdownHeight,margin:0,padding:`${tt}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:Be.colorBgContainer,backgroundClip:"padding-box",borderRadius:Be.borderRadiusLG,outline:"none",boxShadow:Be.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Vi.vS),{display:"flex",alignItems:"center",minWidth:Be.tabsDropdownWidth,margin:0,padding:`${Be.paddingXXS}px ${Be.paddingSM}px`,color:Be.colorText,fontWeight:"normal",fontSize:Be.fontSize,lineHeight:Be.lineHeight,cursor:"pointer",transition:`all ${Be.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:Be.marginSM},color:Be.colorTextDescription,fontSize:Be.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:He}},"&:hover":{background:Be.controlItemBgHover},"&-disabled":{"&, &:hover":{color:Be.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},qr=Be=>{const{componentCls:Ve,margin:He,colorBorderSecondary:tt,horizontalMargin:gt,verticalItemPadding:Ct,verticalItemMargin:It}=Be;return{[`${Ve}-top, ${Ve}-bottom`]:{flexDirection:"column",[`> ${Ve}-nav, > div > ${Ve}-nav`]:{margin:gt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Be.lineWidth}px ${Be.lineType} ${tt}`,content:"''"},[`${Ve}-ink-bar`]:{height:Be.lineWidthBold,"&-animated":{transition:`width ${Be.motionDurationSlow}, left ${Be.motionDurationSlow},
right ${Be.motionDurationSlow}`}},[`${Ve}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:Be.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:Be.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:Be.boxShadowTabsOverflowRight},[`&${Ve}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Ve}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Ve}-top`]:{[`> ${Ve}-nav,
> div > ${Ve}-nav`]:{"&::before":{bottom:0},[`${Ve}-ink-bar`]:{bottom:0}}},[`${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{order:1,marginTop:`${He}px`,marginBottom:0,"&::before":{top:0},[`${Ve}-ink-bar`]:{top:0}},[`> ${Ve}-content-holder, > div > ${Ve}-content-holder`]:{order:0}},[`${Ve}-left, ${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{flexDirection:"column",minWidth:Be.controlHeight*1.25,[`${Ve}-tab`]:{padding:Ct,textAlign:"center"},[`${Ve}-tab + ${Ve}-tab`]:{margin:It},[`${Ve}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:Be.controlHeight},"&::before":{top:0,boxShadow:Be.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:Be.boxShadowTabsOverflowBottom},[`&${Ve}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Ve}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Ve}-ink-bar`]:{width:Be.lineWidthBold,"&-animated":{transition:`height ${Be.motionDurationSlow}, top ${Be.motionDurationSlow}`}},[`${Ve}-nav-list, ${Ve}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Ve}-left`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Ve}-content-holder, > div > ${Ve}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${Be.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${Be.lineWidth}px ${Be.lineType} ${Be.colorBorder}`},[`> ${Ve}-content > ${Ve}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:Be.paddingLG}}}},[`${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{order:1,[`${Ve}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Ve}-content-holder, > div > ${Ve}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-Be.lineWidth},borderRight:{_skip_check_:!0,value:`${Be.lineWidth}px ${Be.lineType} ${Be.colorBorder}`},[`> ${Ve}-content > ${Ve}-tabpane`]:{paddingRight:{_skip_check_:!0,value:Be.paddingLG}}}}}},li=Be=>{const{componentCls:Ve,cardPaddingSM:He,cardPaddingLG:tt,horizontalItemPaddingSM:gt,horizontalItemPaddingLG:Ct}=Be;return{[Ve]:{"&-small":{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:gt,fontSize:Be.titleFontSizeSM}}},"&-large":{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:Ct,fontSize:Be.titleFontSizeLG}}}},[`${Ve}-card`]:{[`&${Ve}-small`]:{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:He}},[`&${Ve}-bottom`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:`0 0 ${Be.borderRadius}px ${Be.borderRadius}px`}},[`&${Ve}-top`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:`${Be.borderRadius}px ${Be.borderRadius}px 0 0`}},[`&${Ve}-right`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Be.borderRadius}px ${Be.borderRadius}px 0`}}},[`&${Ve}-left`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Be.borderRadius}px 0 0 ${Be.borderRadius}px`}}}},[`&${Ve}-large`]:{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:tt}}}}}},Jr=Be=>{const{componentCls:Ve,itemActiveColor:He,itemHoverColor:tt,iconCls:gt,tabsHorizontalItemMargin:Ct,horizontalItemPadding:It,itemSelectedColor:ln,itemColor:mn}=Be,Yn=`${Ve}-tab`;return{[Yn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:It,fontSize:Be.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:mn,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:He}},(0,Vi.Qy)(Be)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-Be.marginXXS},marginLeft:{_skip_check_:!0,value:Be.marginXS},color:Be.colorTextDescription,fontSize:Be.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${Be.motionDurationSlow}`,"&:hover":{color:Be.colorTextHeading}},"&:hover":{color:tt},[`&${Yn}-active ${Yn}-btn`]:{color:ln,textShadow:Be.tabsActiveTextShadow},[`&${Yn}-disabled`]:{color:Be.colorTextDisabled,cursor:"not-allowed"},[`&${Yn}-disabled ${Yn}-btn, &${Yn}-disabled ${Ve}-remove`]:{"&:focus, &:active":{color:Be.colorTextDisabled}},[`& ${Yn}-remove ${gt}`]:{margin:0},[gt]:{marginRight:{_skip_check_:!0,value:Be.marginSM}}},[`${Yn} + ${Yn}`]:{margin:{_skip_check_:!0,value:Ct}}}},Ki=Be=>{const{componentCls:Ve,tabsHorizontalItemMarginRTL:He,iconCls:tt,cardGutter:gt}=Be;return{[`${Ve}-rtl`]:{direction:"rtl",[`${Ve}-nav`]:{[`${Ve}-tab`]:{margin:{_skip_check_:!0,value:He},[`${Ve}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[tt]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${Be.marginSM}px`}},[`${Ve}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${Be.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${Be.marginXXS}px`},[tt]:{margin:0}}}},[`&${Ve}-left`]:{[`> ${Ve}-nav`]:{order:1},[`> ${Ve}-content-holder`]:{order:0}},[`&${Ve}-right`]:{[`> ${Ve}-nav`]:{order:0},[`> ${Ve}-content-holder`]:{order:1}},[`&${Ve}-card${Ve}-top, &${Ve}-card${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab + ${Ve}-tab`]:{marginRight:{_skip_check_:!0,value:gt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Ve}-dropdown-rtl`]:{direction:"rtl"},[`${Ve}-menu-item`]:{[`${Ve}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},ea=Be=>{const{componentCls:Ve,tabsCardPadding:He,cardHeight:tt,cardGutter:gt,itemHoverColor:Ct,itemActiveColor:It,colorBorderSecondary:ln}=Be;return{[Ve]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Vi.Wf)(Be)),{display:"flex",[`> ${Ve}-nav, > div > ${Ve}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Ve}-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 ${Be.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Ve}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${Be.motionDurationSlow}`},[`${Ve}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Ve}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Ve}-nav-more`]:{position:"relative",padding:He,background:"transparent",border:0,color:Be.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:Be.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Ve}-nav-add`]:Object.assign({minWidth:tt,marginLeft:{_skip_check_:!0,value:gt},padding:`0 ${Be.paddingXS}px`,background:"transparent",border:`${Be.lineWidth}px ${Be.lineType} ${ln}`,borderRadius:`${Be.borderRadiusLG}px ${Be.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:Be.colorText,transition:`all ${Be.motionDurationSlow} ${Be.motionEaseInOut}`,"&:hover":{color:Ct},"&:active, &:focus:not(:focus-visible)":{color:It}},(0,Vi.Qy)(Be))},[`${Ve}-extra-content`]:{flex:"none"},[`${Ve}-ink-bar`]:{position:"absolute",background:Be.inkBarColor,pointerEvents:"none"}}),Jr(Be)),{[`${Ve}-content`]:{position:"relative",width:"100%"},[`${Ve}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Ve}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Ve}-centered`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-nav-wrap`]:{[`&:not([class*='${Ve}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var ha=(0,At.Z)("Tabs",Be=>{const Ve=(0,Mt.TS)(Be,{tabsCardPadding:Be.cardPadding||`${(Be.cardHeight-Math.round(Be.fontSize*Be.lineHeight))/2-Be.lineWidth}px ${Be.padding}px`,dropdownEdgeChildVerticalPadding:Be.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Be.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${Be.horizontalItemGutter}px`});return[li(Ve),Ki(Ve),qr(Ve),Nr(Ve),Zr(Ve),ea(Ve),Kn(Ve)]},Be=>{const Ve=Be.controlHeightLG;return{zIndexPopup:Be.zIndexPopupBase+50,cardBg:Be.colorFillAlter,cardHeight:Ve,cardPadding:"",cardPaddingSM:`${Be.paddingXXS*1.5}px ${Be.padding}px`,cardPaddingLG:`${Be.paddingXS}px ${Be.padding}px ${Be.paddingXXS*1.5}px`,titleFontSize:Be.fontSize,titleFontSizeLG:Be.fontSizeLG,titleFontSizeSM:Be.fontSize,inkBarColor:Be.colorPrimary,horizontalMargin:`0 0 ${Be.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${Be.paddingSM}px 0`,horizontalItemPaddingSM:`${Be.paddingXS}px 0`,horizontalItemPaddingLG:`${Be.padding}px 0`,verticalItemPadding:`${Be.paddingXS}px ${Be.paddingLG}px`,verticalItemMargin:`${Be.margin}px 0 0 0`,itemColor:Be.colorText,itemSelectedColor:Be.colorPrimary,itemHoverColor:Be.colorPrimaryHover,itemActiveColor:Be.colorPrimaryActive,cardGutter:Be.marginXXS/2}}),Za=function(Be,Ve){var He={};for(var tt in Be)Object.prototype.hasOwnProperty.call(Be,tt)&&Ve.indexOf(tt)<0&&(He[tt]=Be[tt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,tt=Object.getOwnPropertySymbols(Be);gt<tt.length;gt++)Ve.indexOf(tt[gt])<0&&Object.prototype.propertyIsEnumerable.call(Be,tt[gt])&&(He[tt[gt]]=Be[tt[gt]]);return He};const Na=Be=>{const{type:Ve,className:He,rootClassName:tt,size:gt,onEdit:Ct,hideAdd:It,centered:ln,addIcon:mn,popupClassName:Yn,children:yr,items:Vn,animated:En,style:wn,indicatorSize:In}=Be,Bn=Za(Be,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:pr,moreIcon:Xn=Pe.createElement(xe.Z,null)}=Bn,{direction:jn,tabs:nr,getPrefixCls:qn,getPopupContainer:dr}=Pe.useContext(ka.E_),je=qn("tabs",pr),[Ye,$t]=ha(je);let Dt;Ve==="editable-card"&&(Dt={onEdit:(pn,Nn)=>{let{key:Wn,event:vr}=Nn;Ct==null||Ct(pn==="add"?vr:Wn,pn)},removeIcon:Pe.createElement(pe.Z,null),addIcon:mn||Pe.createElement(Fe.Z,null),showAdd:It!==!0});const sn=qn(),kn=fo(Vn,yr),yn=qa(je,En),zn=(0,co.Z)(gt),Pn=Object.assign(Object.assign({},nr==null?void 0:nr.style),wn);return Ye(Pe.createElement(ja,Object.assign({direction:jn,getPopupContainer:dr,moreTransitionName:`${sn}-slide-up`},Bn,{items:kn,className:ge()({[`${je}-${zn}`]:zn,[`${je}-card`]:["card","editable-card"].includes(Ve),[`${je}-editable-card`]:Ve==="editable-card",[`${je}-centered`]:ln},nr==null?void 0:nr.className,He,tt,$t),popupClassName:ge()(Yn,$t),style:Pn,editable:Dt,moreIcon:Xn,prefixCls:je,animated:yn,indicatorSize:In!=null?In:nr==null?void 0:nr.indicatorSize})))};Na.TabPane=fa;var Ra=Na},72665:function(Cn,Vt){"use strict";var oe;var pe=typeof Symbol=="function"&&Symbol.for,xe=pe?Symbol.for("react.element"):60103,Fe=pe?Symbol.for("react.portal"):60106,ct=pe?Symbol.for("react.fragment"):60107,ge=pe?Symbol.for("react.strict_mode"):60108,Me=pe?Symbol.for("react.profiler"):60114,Ee=pe?Symbol.for("react.provider"):60109,Ce=pe?Symbol.for("react.context"):60110,he=pe?Symbol.for("react.async_mode"):60111,ke=pe?Symbol.for("react.concurrent_mode"):60111,Je=pe?Symbol.for("react.forward_ref"):60112,Pe=pe?Symbol.for("react.suspense"):60113,dt=pe?Symbol.for("react.suspense_list"):60120,ot=pe?Symbol.for("react.memo"):60115,lt=pe?Symbol.for("react.lazy"):60116,nt=pe?Symbol.for("react.block"):60121,_e=pe?Symbol.for("react.fundamental"):60117,ht=pe?Symbol.for("react.responder"):60118,yt=pe?Symbol.for("react.scope"):60119;function Ze(be){if(typeof be=="object"&&be!==null){var we=be.$$typeof;switch(we){case xe:switch(be=be.type,be){case he:case ke:case ct:case Me:case ge:case Pe:return be;default:switch(be=be&&be.$$typeof,be){case Ce:case Je:case lt:case ot:case Ee:return be;default:return we}}case Fe:return we}}}function Qe(be){return Ze(be)===ke}oe=he,oe=ke,oe=Ce,oe=Ee,oe=xe,oe=Je,oe=ct,oe=lt,oe=ot,oe=Fe,oe=Me,oe=ge,oe=Pe,oe=function(be){return Qe(be)||Ze(be)===he},oe=Qe,oe=function(be){return Ze(be)===Ce},oe=function(be){return Ze(be)===Ee},oe=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===xe},oe=function(be){return Ze(be)===Je},oe=function(be){return Ze(be)===ct},oe=function(be){return Ze(be)===lt},Vt.isMemo=function(be){return Ze(be)===ot},oe=function(be){return Ze(be)===Fe},oe=function(be){return Ze(be)===Me},oe=function(be){return Ze(be)===ge},oe=function(be){return Ze(be)===Pe},oe=function(be){return typeof be=="string"||typeof be=="function"||be===ct||be===ke||be===Me||be===ge||be===Pe||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===lt||be.$$typeof===ot||be.$$typeof===Ee||be.$$typeof===Ce||be.$$typeof===Je||be.$$typeof===_e||be.$$typeof===ht||be.$$typeof===yt||be.$$typeof===nt)},oe=Ze},12060:function(Cn,Vt,oe){"use strict";Cn.exports=oe(72665)},41771:function(Cn,Vt){"use strict";var oe;var pe=typeof Symbol=="function"&&Symbol.for,xe=pe?Symbol.for("react.element"):60103,Fe=pe?Symbol.for("react.portal"):60106,ct=pe?Symbol.for("react.fragment"):60107,ge=pe?Symbol.for("react.strict_mode"):60108,Me=pe?Symbol.for("react.profiler"):60114,Ee=pe?Symbol.for("react.provider"):60109,Ce=pe?Symbol.for("react.context"):60110,he=pe?Symbol.for("react.async_mode"):60111,ke=pe?Symbol.for("react.concurrent_mode"):60111,Je=pe?Symbol.for("react.forward_ref"):60112,Pe=pe?Symbol.for("react.suspense"):60113,dt=pe?Symbol.for("react.suspense_list"):60120,ot=pe?Symbol.for("react.memo"):60115,lt=pe?Symbol.for("react.lazy"):60116,nt=pe?Symbol.for("react.block"):60121,_e=pe?Symbol.for("react.fundamental"):60117,ht=pe?Symbol.for("react.responder"):60118,yt=pe?Symbol.for("react.scope"):60119;function Ze(be){if(typeof be=="object"&&be!==null){var we=be.$$typeof;switch(we){case xe:switch(be=be.type,be){case he:case ke:case ct:case Me:case ge:case Pe:return be;default:switch(be=be&&be.$$typeof,be){case Ce:case Je:case lt:case ot:case Ee:return be;default:return we}}case Fe:return we}}}function Qe(be){return Ze(be)===ke}oe=he,oe=ke,oe=Ce,oe=Ee,oe=xe,oe=Je,oe=ct,oe=lt,oe=ot,oe=Fe,oe=Me,oe=ge,oe=Pe,oe=function(be){return Qe(be)||Ze(be)===he},oe=Qe,oe=function(be){return Ze(be)===Ce},oe=function(be){return Ze(be)===Ee},oe=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===xe},oe=function(be){return Ze(be)===Je},Vt.isFragment=function(be){return Ze(be)===ct},oe=function(be){return Ze(be)===lt},oe=function(be){return Ze(be)===ot},oe=function(be){return Ze(be)===Fe},oe=function(be){return Ze(be)===Me},oe=function(be){return Ze(be)===ge},oe=function(be){return Ze(be)===Pe},oe=function(be){return typeof be=="string"||typeof be=="function"||be===ct||be===ke||be===Me||be===ge||be===Pe||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===lt||be.$$typeof===ot||be.$$typeof===Ee||be.$$typeof===Ce||be.$$typeof===Je||be.$$typeof===_e||be.$$typeof===ht||be.$$typeof===yt||be.$$typeof===nt)},oe=Ze},47655:function(Cn,Vt,oe){"use strict";Cn.exports=oe(41771)},64701:function(Cn,Vt,oe){"use strict";oe.r(Vt),oe.d(Vt,{ResizableTextArea:function(){return cn},default:function(){return dn}});var pe=oe(87462),xe=oe(1413),Fe=oe(4942),ct=oe(71002),ge=oe(97685),Me=oe(45987),Ee=oe(74902),Ce=oe(94184),he=oe.n(Ce),ke=oe(67656),Je=oe(87887),Pe=oe(67294);function dt(nn){var jt=Pe.useRef();jt.current=nn;var xn=Pe.useCallback(function(){for(var vn,Te=arguments.length,ue=new Array(Te),le=0;le<Te;le++)ue[le]=arguments[le];return(vn=jt.current)===null||vn===void 0?void 0:vn.call.apply(vn,[jt].concat(ue))},[]);return xn}function ot(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lt=ot()?Pe.useLayoutEffect:Pe.useEffect,nt=lt,_e=function(jt,xn){var vn=Pe.useRef(!0);lt(function(){if(!vn.current)return jt()},xn),lt(function(){return vn.current=!1,function(){vn.current=!0}},[])};function ht(nn){var jt=Pe.useRef(!1),xn=Pe.useState(nn),vn=(0,ge.Z)(xn,2),Te=vn[0],ue=vn[1];Pe.useEffect(function(){return jt.current=!1,function(){jt.current=!0}},[]);function le(me,fe){fe&&jt.current||ue(me)}return[Te,le]}function yt(nn){return nn!==void 0}function Ze(nn,jt){var xn=jt||{},vn=xn.defaultValue,Te=xn.value,ue=xn.onChange,le=xn.postState,me=ht(function(){return yt(Te)?Te:yt(vn)?typeof vn=="function"?vn():vn:typeof nn=="function"?nn():nn}),fe=(0,ge.Z)(me,2),se=fe[0],Oe=fe[1],rt=Te!==void 0?Te:se,Pt=le?le(rt):rt,zt=dt(ue),Zt=ht([rt]),en=(0,ge.Z)(Zt,2),Gt=en[0],tr=en[1];_e(function(){var Wt=Gt[0];se!==Wt&&zt(se,Wt)},[Gt]),_e(function(){yt(Te)||Oe(Te)},[Te]);var cr=dt(function(Wt,bn){Oe(Wt,bn),tr([rt],bn)});return[Pt,cr]}var Qe=oe(48555),be=function(jt){return+setTimeout(jt,16)},we=function(jt){return clearTimeout(jt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(be=function(jt){return window.requestAnimationFrame(jt)},we=function(jt){return window.cancelAnimationFrame(jt)});var Ke=0,Ge=new Map;function vt(nn){Ge.delete(nn)}var pt=function(jt){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ke+=1;var vn=Ke;function Te(ue){if(ue===0)vt(vn),jt();else{var le=be(function(){Te(ue-1)});Ge.set(vn,le)}}return Te(xn),vn};pt.cancel=function(nn){var jt=Ge.get(nn);return vt(jt),we(jt)};var Ue=pt,et=`
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;
`,kt=["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"],it={},st;function We(nn){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xn=nn.getAttribute("id")||nn.getAttribute("data-reactid")||nn.getAttribute("name");if(jt&&it[xn])return it[xn];var vn=window.getComputedStyle(nn),Te=vn.getPropertyValue("box-sizing")||vn.getPropertyValue("-moz-box-sizing")||vn.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(vn.getPropertyValue("padding-bottom"))+parseFloat(vn.getPropertyValue("padding-top")),le=parseFloat(vn.getPropertyValue("border-bottom-width"))+parseFloat(vn.getPropertyValue("border-top-width")),me=kt.map(function(se){return"".concat(se,":").concat(vn.getPropertyValue(se))}).join(";"),fe={sizingStyle:me,paddingSize:ue,borderSize:le,boxSizing:Te};return jt&&xn&&(it[xn]=fe),fe}function Tt(nn){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,vn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;st||(st=document.createElement("textarea"),st.setAttribute("tab-index","-1"),st.setAttribute("aria-hidden","true"),document.body.appendChild(st)),nn.getAttribute("wrap")?st.setAttribute("wrap",nn.getAttribute("wrap")):st.removeAttribute("wrap");var Te=We(nn,jt),ue=Te.paddingSize,le=Te.borderSize,me=Te.boxSizing,fe=Te.sizingStyle;st.setAttribute("style","".concat(fe,";").concat(et)),st.value=nn.value||nn.placeholder||"";var se=void 0,Oe=void 0,rt,Pt=st.scrollHeight;if(me==="border-box"?Pt+=le:me==="content-box"&&(Pt-=ue),xn!==null||vn!==null){st.value=" ";var zt=st.scrollHeight-ue;xn!==null&&(se=zt*xn,me==="border-box"&&(se=se+ue+le),Pt=Math.max(se,Pt)),vn!==null&&(Oe=zt*vn,me==="border-box"&&(Oe=Oe+ue+le),rt=Pt>Oe?"":"hidden",Pt=Math.min(Oe,Pt))}var Zt={height:Pt,overflowY:rt,resize:"none"};return se&&(Zt.minHeight=se),Oe&&(Zt.maxHeight=Oe),Zt}var Ut=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Qt=0,Xe=1,Ae=2,Lt=Pe.forwardRef(function(nn,jt){var xn=nn,vn=xn.prefixCls,Te=xn.onPressEnter,ue=xn.defaultValue,le=xn.value,me=xn.autoSize,fe=xn.onResize,se=xn.className,Oe=xn.style,rt=xn.disabled,Pt=xn.onChange,zt=xn.onInternalAutoSize,Zt=(0,Me.Z)(xn,Ut),en=Ze(ue,{value:le,postState:function($n){return $n!=null?$n:""}}),Gt=(0,ge.Z)(en,2),tr=Gt[0],cr=Gt[1],Wt=function($n){cr($n.target.value),Pt==null||Pt($n)},bn=Pe.useRef();Pe.useImperativeHandle(jt,function(){return{textArea:bn.current}});var lr=Pe.useMemo(function(){return me&&(0,ct.Z)(me)==="object"?[me.minRows,me.maxRows]:[]},[me]),Wr=(0,ge.Z)(lr,2),Rn=Wr[0],Tr=Wr[1],Ca=!!me,Wi=function(){try{if(document.activeElement===bn.current){var $n=bn.current,Ir=$n.selectionStart,or=$n.selectionEnd,Sr=$n.scrollTop;bn.current.setSelectionRange(Ir,or),bn.current.scrollTop=Sr}}catch(Zn){}},Li=Pe.useState(Ae),Mi=(0,ge.Z)(Li,2),Ji=Mi[0],Zi=Mi[1],Ea=Pe.useState(),Ma=(0,ge.Z)(Ea,2),Gr=Ma[0],Va=Ma[1],no=function(){Zi(Qt)};nt(function(){Ca&&no()},[le,Rn,Tr,Ca]),nt(function(){if(Ji===Qt)Zi(Xe);else if(Ji===Xe){var Fn=Tt(bn.current,!1,Rn,Tr);Zi(Ae),Va(Fn)}else Wi()},[Ji]);var po=Pe.useRef(),mo=function(){Ue.cancel(po.current)},Pa=function($n){Ji===Ae&&(fe==null||fe($n),me&&(mo(),po.current=Ue(function(){no()})))};Pe.useEffect(function(){return mo},[]);var Bt=Ca?Gr:null,On=(0,xe.Z)((0,xe.Z)({},Oe),Bt);return(Ji===Qt||Ji===Xe)&&(On.overflowY="hidden",On.overflowX="hidden"),Pe.createElement(Qe.Z,{onResize:Pa,disabled:!(me||fe)},Pe.createElement("textarea",(0,pe.Z)({},Zt,{ref:bn,style:On,className:he()(vn,se,(0,Fe.Z)({},"".concat(vn,"-disabled"),rt)),disabled:rt,value:tr,onChange:Wt})))}),cn=Lt,an=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ft(nn,jt){return(0,Ee.Z)(nn||"").slice(0,jt).join("")}function mt(nn,jt,xn,vn){var Te=xn;return nn?Te=ft(xn,vn):(0,Ee.Z)(jt||"").length<xn.length&&(0,Ee.Z)(xn||"").length>vn&&(Te=jt),Te}var Yt=Pe.forwardRef(function(nn,jt){var xn,vn=nn.defaultValue,Te=nn.value,ue=nn.onFocus,le=nn.onBlur,me=nn.onChange,fe=nn.allowClear,se=nn.maxLength,Oe=nn.onCompositionStart,rt=nn.onCompositionEnd,Pt=nn.suffix,zt=nn.prefixCls,Zt=zt===void 0?"rc-textarea":zt,en=nn.classes,Gt=nn.showCount,tr=nn.className,cr=nn.style,Wt=nn.disabled,bn=nn.hidden,lr=nn.classNames,Wr=nn.styles,Rn=nn.onResize,Tr=(0,Me.Z)(nn,an),Ca=Ze(vn,{value:Te,defaultValue:vn}),Wi=(0,ge.Z)(Ca,2),Li=Wi[0],Mi=Wi[1],Ji=(0,Pe.useRef)(null),Zi=Pe.useState(!1),Ea=(0,ge.Z)(Zi,2),Ma=Ea[0],Gr=Ea[1],Va=Pe.useState(!1),no=(0,ge.Z)(Va,2),po=no[0],mo=no[1],Pa=Pe.useRef(),Bt=Pe.useRef(0),On=Pe.useState(null),Fn=(0,ge.Z)(On,2),$n=Fn[0],Ir=Fn[1],or=function(){var mr;(mr=Ji.current)===null||mr===void 0||mr.textArea.focus()};(0,Pe.useImperativeHandle)(jt,function(){return{resizableTextArea:Ji.current,focus:or,blur:function(){var mr;(mr=Ji.current)===null||mr===void 0||mr.textArea.blur()}}}),(0,Pe.useEffect)(function(){Gr(function(ir){return!Wt&&ir})},[Wt]);var Sr=Number(se)>0,Zn=function(mr){mo(!0),Pa.current=Li,Bt.current=mr.currentTarget.selectionStart,Oe==null||Oe(mr)},ut=function(mr){mo(!1);var br=mr.currentTarget.value;if(Sr){var Yr,_n=Bt.current>=se+1||Bt.current===((Yr=Pa.current)===null||Yr===void 0?void 0:Yr.length);br=mt(_n,Pa.current,br,se)}br!==Li&&(Mi(br),(0,Je.rJ)(mr.currentTarget,mr,me,br)),rt==null||rt(mr)},bt=function(mr){var br=mr.target.value;if(!po&&Sr){var Yr=mr.target.selectionStart>=se+1||mr.target.selectionStart===br.length||!mr.target.selectionStart;br=mt(Yr,Li,br,se)}Mi(br),(0,Je.rJ)(mr.currentTarget,mr,me,br)},Ft=function(mr){var br=Tr.onPressEnter,Yr=Tr.onKeyDown;mr.key==="Enter"&&br&&br(mr),Yr==null||Yr(mr)},qt=function(mr){Gr(!0),ue==null||ue(mr)},qe=function(mr){Gr(!1),le==null||le(mr)},_t=function(mr){var br;Mi(""),or(),(0,Je.rJ)((br=Ji.current)===null||br===void 0?void 0:br.textArea,mr,me)},Xt=(0,Je.D7)(Li);!po&&Sr&&Te==null&&(Xt=ft(Xt,se));var Kt=Pt,on;if(Gt){var rn=(0,Ee.Z)(Xt).length;(0,ct.Z)(Gt)==="object"?on=Gt.formatter({value:Xt,count:rn,maxLength:se}):on="".concat(rn).concat(Sr?" / ".concat(se):""),Kt=Pe.createElement(Pe.Fragment,null,Kt,Pe.createElement("span",{className:he()("".concat(Zt,"-data-count"),lr==null?void 0:lr.count),style:Wr==null?void 0:Wr.count},on))}var Un=function(mr){var br;Rn==null||Rn(mr),(br=Ji.current)!==null&&br!==void 0&&br.textArea.style.height&&Ir(!0)},Ar=!Tr.autoSize&&!Gt&&!fe,rr=Pe.createElement(ke.BaseInput,{value:Xt,allowClear:fe,handleReset:_t,suffix:Kt,prefixCls:Zt,classes:{affixWrapper:he()(en==null?void 0:en.affixWrapper,(xn={},(0,Fe.Z)(xn,"".concat(Zt,"-show-count"),Gt),(0,Fe.Z)(xn,"".concat(Zt,"-textarea-allow-clear"),fe),xn))},disabled:Wt,focused:Ma,className:tr,style:(0,xe.Z)((0,xe.Z)({},cr),$n&&!Ar?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof on=="string"?on:void 0}},hidden:bn,inputElement:Pe.createElement(cn,(0,pe.Z)({},Tr,{onKeyDown:Ft,onChange:bt,onFocus:qt,onBlur:qe,onCompositionStart:Zn,onCompositionEnd:ut,className:lr==null?void 0:lr.textarea,style:(0,xe.Z)((0,xe.Z)({},Wr==null?void 0:Wr.textarea),{},{resize:cr==null?void 0:cr.resize}),disabled:Wt,prefixCls:Zt,onResize:Un,ref:Ji}))});return rr}),An=Yt,dn=An},1337:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ce}});var pe=oe(1413),xe=`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`,Fe=`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`,ct="".concat(xe," ").concat(Fe).split(/[\s\n]+/),ge="aria-",Me="data-";function Ee(he,ke){return he.indexOf(ke)===0}function Ce(he){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Je;ke===!1?Je={aria:!0,data:!0,attr:!0}:ke===!0?Je={aria:!0}:Je=(0,pe.Z)({},ke);var Pe={};return Object.keys(he).forEach(function(dt){(Je.aria&&(dt==="role"||Ee(dt,ge))||Je.data&&Ee(dt,Me)||Je.attr&&ct.includes(dt))&&(Pe[dt]=he[dt])}),Pe}},88386:function(Cn,Vt,oe){(function(pe){pe(oe(4631))})(function(pe){pe.defineOption("placeholder","",function(Ce,he,ke){var Je=ke&&ke!=pe.Init;if(he&&!Je)Ce.on("blur",ge),Ce.on("change",Me),Ce.on("swapDoc",Me),pe.on(Ce.getInputField(),"compositionupdate",Ce.state.placeholderCompose=function(){ct(Ce)}),Me(Ce);else if(!he&&Je){Ce.off("blur",ge),Ce.off("change",Me),Ce.off("swapDoc",Me),pe.off(Ce.getInputField(),"compositionupdate",Ce.state.placeholderCompose),xe(Ce);var Pe=Ce.getWrapperElement();Pe.className=Pe.className.replace(" CodeMirror-empty","")}he&&!Ce.hasFocus()&&ge(Ce)});function xe(Ce){Ce.state.placeholder&&(Ce.state.placeholder.parentNode.removeChild(Ce.state.placeholder),Ce.state.placeholder=null)}function Fe(Ce){xe(Ce);var he=Ce.state.placeholder=document.createElement("pre");he.style.cssText="height: 0; overflow: visible",he.style.direction=Ce.getOption("direction"),he.className="CodeMirror-placeholder CodeMirror-line-like";var ke=Ce.getOption("placeholder");typeof ke=="string"&&(ke=document.createTextNode(ke)),he.appendChild(ke),Ce.display.lineSpace.insertBefore(he,Ce.display.lineSpace.firstChild)}function ct(Ce){setTimeout(function(){var he=!1,ke=Ce.getInputField();ke.nodeName=="TEXTAREA"?he=!ke.value:Ce.lineCount()==1&&(he=!/[^\u200b]/.test(ke.querySelector(".CodeMirror-line").textContent)),he?Fe(Ce):xe(Ce)},20)}function ge(Ce){Ee(Ce)&&Fe(Ce)}function Me(Ce){var he=Ce.getWrapperElement(),ke=Ee(Ce);he.className=he.className.replace(" CodeMirror-empty","")+(ke?" CodeMirror-empty":""),ke?Fe(Ce):xe(Ce)}function Ee(Ce){return Ce.lineCount()===1&&Ce.getLine(0)===""}})},82801:function(Cn,Vt,oe){(function(pe){pe(oe(4631))})(function(pe){var xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=pe.Pos;pe.defineOption("autoCloseBrackets",!1,function(lt,nt,_e){_e&&_e!=pe.Init&&(lt.removeKeyMap(ge),lt.state.closeBrackets=null),nt&&(Me(ct(nt,"pairs")),lt.state.closeBrackets=nt,lt.addKeyMap(ge))});function ct(lt,nt){return nt=="pairs"&&typeof lt=="string"?lt:typeof lt=="object"&&lt[nt]!=null?lt[nt]:xe[nt]}var ge={Backspace:he,Enter:ke};function Me(lt){for(var nt=0;nt<lt.length;nt++){var _e=lt.charAt(nt),ht="'"+_e+"'";ge[ht]||(ge[ht]=Ee(_e))}}Me(xe.pairs+"`");function Ee(lt){return function(nt){return Pe(nt,lt)}}function Ce(lt){var nt=lt.state.closeBrackets;if(!nt||nt.override)return nt;var _e=lt.getModeAt(lt.getCursor());return _e.closeBrackets||nt}function he(lt){var nt=Ce(lt);if(!nt||lt.getOption("disableInput"))return pe.Pass;for(var _e=ct(nt,"pairs"),ht=lt.listSelections(),yt=0;yt<ht.length;yt++){if(!ht[yt].empty())return pe.Pass;var Ze=dt(lt,ht[yt].head);if(!Ze||_e.indexOf(Ze)%2!=0)return pe.Pass}for(var yt=ht.length-1;yt>=0;yt--){var Qe=ht[yt].head;lt.replaceRange("",Fe(Qe.line,Qe.ch-1),Fe(Qe.line,Qe.ch+1),"+delete")}}function ke(lt){var nt=Ce(lt),_e=nt&&ct(nt,"explode");if(!_e||lt.getOption("disableInput"))return pe.Pass;for(var ht=lt.listSelections(),yt=0;yt<ht.length;yt++){if(!ht[yt].empty())return pe.Pass;var Ze=dt(lt,ht[yt].head);if(!Ze||_e.indexOf(Ze)%2!=0)return pe.Pass}lt.operation(function(){var Qe=lt.lineSeparator()||`
`;lt.replaceSelection(Qe+Qe,null),lt.execCommand("goCharLeft"),ht=lt.listSelections();for(var be=0;be<ht.length;be++){var we=ht[be].head.line;lt.indentLine(we,null,!0),lt.indentLine(we+1,null,!0)}})}function Je(lt){var nt=pe.cmpPos(lt.anchor,lt.head)>0;return{anchor:new Fe(lt.anchor.line,lt.anchor.ch+(nt?-1:1)),head:new Fe(lt.head.line,lt.head.ch+(nt?1:-1))}}function Pe(lt,nt){var _e=Ce(lt);if(!_e||lt.getOption("disableInput"))return pe.Pass;var ht=ct(_e,"pairs"),yt=ht.indexOf(nt);if(yt==-1)return pe.Pass;for(var Ze=ct(_e,"closeBefore"),Qe=ct(_e,"triples"),be=ht.charAt(yt+1)==nt,we=lt.listSelections(),Ke=yt%2==0,Ge,vt=0;vt<we.length;vt++){var pt=we[vt],Ue=pt.head,et,kt=lt.getRange(Ue,Fe(Ue.line,Ue.ch+1));if(Ke&&!pt.empty())et="surround";else if((be||!Ke)&&kt==nt)be&&ot(lt,Ue)?et="both":Qe.indexOf(nt)>=0&&lt.getRange(Ue,Fe(Ue.line,Ue.ch+3))==nt+nt+nt?et="skipThree":et="skip";else if(be&&Ue.ch>1&&Qe.indexOf(nt)>=0&&lt.getRange(Fe(Ue.line,Ue.ch-2),Ue)==nt+nt){if(Ue.ch>2&&/\bstring/.test(lt.getTokenTypeAt(Fe(Ue.line,Ue.ch-2))))return pe.Pass;et="addFour"}else if(be){var it=Ue.ch==0?" ":lt.getRange(Fe(Ue.line,Ue.ch-1),Ue);if(!pe.isWordChar(kt)&&it!=nt&&!pe.isWordChar(it))et="both";else return pe.Pass}else if(Ke&&(kt.length===0||/\s/.test(kt)||Ze.indexOf(kt)>-1))et="both";else return pe.Pass;if(!Ge)Ge=et;else if(Ge!=et)return pe.Pass}var st=yt%2?ht.charAt(yt-1):nt,We=yt%2?nt:ht.charAt(yt+1);lt.operation(function(){if(Ge=="skip")lt.execCommand("goCharRight");else if(Ge=="skipThree")for(var Tt=0;Tt<3;Tt++)lt.execCommand("goCharRight");else if(Ge=="surround"){for(var Ut=lt.getSelections(),Tt=0;Tt<Ut.length;Tt++)Ut[Tt]=st+Ut[Tt]+We;lt.replaceSelections(Ut,"around"),Ut=lt.listSelections().slice();for(var Tt=0;Tt<Ut.length;Tt++)Ut[Tt]=Je(Ut[Tt]);lt.setSelections(Ut)}else Ge=="both"?(lt.replaceSelection(st+We,null),lt.triggerElectric(st+We),lt.execCommand("goCharLeft")):Ge=="addFour"&&(lt.replaceSelection(st+st+st+st,"before"),lt.execCommand("goCharRight"))})}function dt(lt,nt){var _e=lt.getRange(Fe(nt.line,nt.ch-1),Fe(nt.line,nt.ch+1));return _e.length==2?_e:null}function ot(lt,nt){var _e=lt.getTokenAt(Fe(nt.line,nt.ch+1));return/\bstring/.test(_e.type)&&_e.start==nt.ch&&(nt.ch==0||!/\bstring/.test(lt.getTokenTypeAt(nt)))}})},57341:function(Cn,Vt,oe){(function(pe){pe(oe(4631),oe(4786))})(function(pe){pe.defineOption("autoCloseTags",!1,function(he,ke,Je){if(Je!=pe.Init&&Je&&he.removeKeyMap("autoCloseTags"),!!ke){var Pe={name:"autoCloseTags"};(typeof ke!="object"||ke.whenClosing!==!1)&&(Pe["'/'"]=function(dt){return Me(dt)}),(typeof ke!="object"||ke.whenOpening!==!1)&&(Pe["'>'"]=function(dt){return ct(dt)}),he.addKeyMap(Pe)}});var xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function ct(he){if(he.getOption("disableInput"))return pe.Pass;for(var ke=he.listSelections(),Je=[],Pe=he.getOption("autoCloseTags"),dt=0;dt<ke.length;dt++){if(!ke[dt].empty())return pe.Pass;var ot=ke[dt].head,lt=he.getTokenAt(ot),nt=pe.innerMode(he.getMode(),lt.state),_e=nt.state,ht=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(_e),yt=ht&&ht.name;if(!yt)return pe.Pass;var Ze=nt.mode.configuration=="html",Qe=typeof Pe=="object"&&Pe.dontCloseTags||Ze&&xe,be=typeof Pe=="object"&&Pe.indentTags||Ze&&Fe;lt.end>ot.ch&&(yt=yt.slice(0,yt.length-lt.end+ot.ch));var we=yt.toLowerCase();if(!yt||lt.type=="string"&&(lt.end!=ot.ch||!/[\"\']/.test(lt.string.charAt(lt.string.length-1))||lt.string.length==1)||lt.type=="tag"&&ht.close||lt.string.indexOf("/")==ot.ch-lt.start-1||Qe&&Ee(Qe,we)>-1||Ce(he,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(_e)||[],yt,ot,!0))return pe.Pass;var Ke=typeof Pe=="object"&&Pe.emptyTags;if(Ke&&Ee(Ke,yt)>-1){Je[dt]={text:"/>",newPos:pe.Pos(ot.line,ot.ch+2)};continue}var Ge=be&&Ee(be,we)>-1;Je[dt]={indent:Ge,text:">"+(Ge?`
`:"")+"</"+yt+">",newPos:Ge?pe.Pos(ot.line+1,0):pe.Pos(ot.line,ot.ch+1)}}for(var vt=typeof Pe=="object"&&Pe.dontIndentOnAutoClose,dt=ke.length-1;dt>=0;dt--){var pt=Je[dt];he.replaceRange(pt.text,ke[dt].head,ke[dt].anchor,"+insert");var Ue=he.listSelections().slice(0);Ue[dt]={head:pt.newPos,anchor:pt.newPos},he.setSelections(Ue),!vt&&pt.indent&&(he.indentLine(pt.newPos.line,null,!0),he.indentLine(pt.newPos.line+1,null,!0))}}function ge(he,ke){for(var Je=he.listSelections(),Pe=[],dt=ke?"/":"</",ot=he.getOption("autoCloseTags"),lt=typeof ot=="object"&&ot.dontIndentOnSlash,nt=0;nt<Je.length;nt++){if(!Je[nt].empty())return pe.Pass;var _e=Je[nt].head,ht=he.getTokenAt(_e),yt=pe.innerMode(he.getMode(),ht.state),Ze=yt.state;if(ke&&(ht.type=="string"||ht.string.charAt(0)!="<"||ht.start!=_e.ch-1))return pe.Pass;var Qe,be=yt.mode.name!="xml"&&he.getMode().name=="htmlmixed";if(be&&yt.mode.name=="javascript")Qe=dt+"script";else if(be&&yt.mode.name=="css")Qe=dt+"style";else{var we=yt.mode.xmlCurrentContext&&yt.mode.xmlCurrentContext(Ze);if(!we||we.length&&Ce(he,we,we[we.length-1],_e))return pe.Pass;Qe=dt+we[we.length-1]}he.getLine(_e.line).charAt(ht.end)!=">"&&(Qe+=">"),Pe[nt]=Qe}if(he.replaceSelections(Pe),Je=he.listSelections(),!lt)for(var nt=0;nt<Je.length;nt++)(nt==Je.length-1||Je[nt].head.line<Je[nt+1].head.line)&&he.indentLine(Je[nt].head.line)}function Me(he){return he.getOption("disableInput")?pe.Pass:ge(he,!0)}pe.commands.closeTag=function(he){return ge(he)};function Ee(he,ke){if(he.indexOf)return he.indexOf(ke);for(var Je=0,Pe=he.length;Je<Pe;++Je)if(he[Je]==ke)return Je;return-1}function Ce(he,ke,Je,Pe,dt){if(!pe.scanForClosingTag)return!1;var ot=Math.min(he.lastLine()+1,Pe.line+500),lt=pe.scanForClosingTag(he,Pe,null,ot);if(!lt||lt.tag!=Je)return!1;for(var nt=dt?1:0,_e=ke.length-1;_e>=0&&ke[_e]==Je;_e--)++nt;Pe=lt.to;for(var _e=1;_e<nt;_e++){var ht=pe.scanForClosingTag(he,Pe,null,ot);if(!ht||ht.tag!=Je)return!1;Pe=ht.to}return!0}})},4786:function(Cn,Vt,oe){(function(pe){pe(oe(4631))})(function(pe){"use strict";var xe=pe.Pos;function Fe(_e,ht){return _e.line-ht.line||_e.ch-ht.ch}var ct="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=ct+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Me=new RegExp("<(/?)(["+ct+"]["+ge+"]*)","g");function Ee(_e,ht,yt,Ze){this.line=ht,this.ch=yt,this.cm=_e,this.text=_e.getLine(ht),this.min=Ze?Math.max(Ze.from,_e.firstLine()):_e.firstLine(),this.max=Ze?Math.min(Ze.to-1,_e.lastLine()):_e.lastLine()}function Ce(_e,ht){var yt=_e.cm.getTokenTypeAt(xe(_e.line,ht));return yt&&/\btag\b/.test(yt)}function he(_e){if(!(_e.line>=_e.max))return _e.ch=0,_e.text=_e.cm.getLine(++_e.line),!0}function ke(_e){if(!(_e.line<=_e.min))return _e.text=_e.cm.getLine(--_e.line),_e.ch=_e.text.length,!0}function Je(_e){for(;;){var ht=_e.text.indexOf(">",_e.ch);if(ht==-1){if(he(_e))continue;return}if(!Ce(_e,ht+1)){_e.ch=ht+1;continue}var yt=_e.text.lastIndexOf("/",ht),Ze=yt>-1&&!/\S/.test(_e.text.slice(yt+1,ht));return _e.ch=ht+1,Ze?"selfClose":"regular"}}function Pe(_e){for(;;){var ht=_e.ch?_e.text.lastIndexOf("<",_e.ch-1):-1;if(ht==-1){if(ke(_e))continue;return}if(!Ce(_e,ht+1)){_e.ch=ht;continue}Me.lastIndex=ht,_e.ch=ht;var yt=Me.exec(_e.text);if(yt&&yt.index==ht)return yt}}function dt(_e){for(;;){Me.lastIndex=_e.ch;var ht=Me.exec(_e.text);if(!ht){if(he(_e))continue;return}if(!Ce(_e,ht.index+1)){_e.ch=ht.index+1;continue}return _e.ch=ht.index+ht[0].length,ht}}function ot(_e){for(;;){var ht=_e.ch?_e.text.lastIndexOf(">",_e.ch-1):-1;if(ht==-1){if(ke(_e))continue;return}if(!Ce(_e,ht+1)){_e.ch=ht;continue}var yt=_e.text.lastIndexOf("/",ht),Ze=yt>-1&&!/\S/.test(_e.text.slice(yt+1,ht));return _e.ch=ht+1,Ze?"selfClose":"regular"}}function lt(_e,ht){for(var yt=[];;){var Ze=dt(_e),Qe,be=_e.line,we=_e.ch-(Ze?Ze[0].length:0);if(!Ze||!(Qe=Je(_e)))return;if(Qe!="selfClose")if(Ze[1]){for(var Ke=yt.length-1;Ke>=0;--Ke)if(yt[Ke]==Ze[2]){yt.length=Ke;break}if(Ke<0&&(!ht||ht==Ze[2]))return{tag:Ze[2],from:xe(be,we),to:xe(_e.line,_e.ch)}}else yt.push(Ze[2])}}function nt(_e,ht){for(var yt=[];;){var Ze=ot(_e);if(!Ze)return;if(Ze=="selfClose"){Pe(_e);continue}var Qe=_e.line,be=_e.ch,we=Pe(_e);if(!we)return;if(we[1])yt.push(we[2]);else{for(var Ke=yt.length-1;Ke>=0;--Ke)if(yt[Ke]==we[2]){yt.length=Ke;break}if(Ke<0&&(!ht||ht==we[2]))return{tag:we[2],from:xe(_e.line,_e.ch),to:xe(Qe,be)}}}}pe.registerHelper("fold","xml",function(_e,ht){for(var yt=new Ee(_e,ht.line,0);;){var Ze=dt(yt);if(!Ze||yt.line!=ht.line)return;var Qe=Je(yt);if(!Qe)return;if(!Ze[1]&&Qe!="selfClose"){var be=xe(yt.line,yt.ch),we=lt(yt,Ze[2]);return we&&Fe(we.from,be)>0?{from:be,to:we.from}:null}}}),pe.findMatchingTag=function(_e,ht,yt){var Ze=new Ee(_e,ht.line,ht.ch,yt);if(!(Ze.text.indexOf(">")==-1&&Ze.text.indexOf("<")==-1)){var Qe=Je(Ze),be=Qe&&xe(Ze.line,Ze.ch),we=Qe&&Pe(Ze);if(!(!Qe||!we||Fe(Ze,ht)>0)){var Ke={from:xe(Ze.line,Ze.ch),to:be,tag:we[2]};return Qe=="selfClose"?{open:Ke,close:null,at:"open"}:we[1]?{open:nt(Ze,we[2]),close:Ke,at:"close"}:(Ze=new Ee(_e,be.line,be.ch,yt),{open:Ke,close:lt(Ze,we[2]),at:"open"})}}},pe.findEnclosingTag=function(_e,ht,yt,Ze){for(var Qe=new Ee(_e,ht.line,ht.ch,yt);;){var be=nt(Qe,Ze);if(!be)break;var we=new Ee(_e,ht.line,ht.ch,yt),Ke=lt(we,be.tag);if(Ke)return{open:be,close:Ke}}},pe.scanForClosingTag=function(_e,ht,yt,Ze){var Qe=new Ee(_e,ht.line,ht.ch,Ze?{from:0,to:Ze}:null);return lt(Qe,yt)}})},4631:function(Cn){(function(Vt,oe){Cn.exports=oe()})(this,function(){"use strict";var Vt=navigator.userAgent,oe=navigator.platform,pe=/gecko\/\d/i.test(Vt),xe=/MSIE \d/.test(Vt),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vt),ct=/Edge\/(\d+)/.exec(Vt),ge=xe||Fe||ct,Me=ge&&(xe?document.documentMode||6:+(ct||Fe)[1]),Ee=!ct&&/WebKit\//.test(Vt),Ce=Ee&&/Qt\/\d+\.\d+/.test(Vt),he=!ct&&/Chrome\//.test(Vt),ke=/Opera\//.test(Vt),Je=/Apple Computer/.test(navigator.vendor),Pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Vt),dt=/PhantomJS/.test(Vt),ot=!ct&&/AppleWebKit/.test(Vt)&&/Mobile\/\w+/.test(Vt),lt=/Android/.test(Vt),nt=ot||lt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Vt),_e=ot||/Mac/.test(oe),ht=/\bCrOS\b/.test(Vt),yt=/win/i.test(oe),Ze=ke&&Vt.match(/Version\/(\d*\.\d*)/);Ze&&(Ze=Number(Ze[1])),Ze&&Ze>=15&&(ke=!1,Ee=!0);var Qe=_e&&(Ce||ke&&(Ze==null||Ze<12.11)),be=pe||ge&&Me>=9;function we(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Ke=function(x,z){var ne=x.className,te=we(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 Ge(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function vt(x,z){return Ge(x).appendChild(z)}function pt(x,z,ne,te){var ie=document.createElement(x);if(ne&&(ie.className=ne),te&&(ie.style.cssText=te),typeof z=="string")ie.appendChild(document.createTextNode(z));else if(z)for(var ce=0;ce<z.length;++ce)ie.appendChild(z[ce]);return ie}function Ue(x,z,ne,te){var ie=pt(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var et;document.createRange?et=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:et=function(x,z,ne){var te=document.body.createTextRange();try{te.moveToElementText(x.parentNode)}catch(ie){return te}return te.collapse(!0),te.moveEnd("character",ne),te.moveStart("character",z),te};function kt(x,z){if(z.nodeType==3&&(z=z.parentNode),x.contains)return x.contains(z);do if(z.nodeType==11&&(z=z.host),z==x)return!0;while(z=z.parentNode)}function it(){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 st(x,z){var ne=x.className;we(z).test(ne)||(x.className+=(ne?" ":"")+z)}function We(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!we(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var Tt=function(x){x.select()};ot?Tt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ge&&(Tt=function(x){try{x.select()}catch(z){}});function Ut(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function Qt(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 Xe(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ce=te||0,ye=ie||0;;){var Le=x.indexOf(" ",ce);if(Le<0||Le>=z)return ye+(z-ce);ye+=Le-ce,ye+=ne-ye%ne,ce=Le+1}}var Ae=function(){this.id=null,this.f=null,this.time=0,this.handler=Ut(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 Lt(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var cn=50,an={toString:function(){return"CodeMirror.Pass"}},ft={scroll:!1},mt={origin:"*mouse"},Yt={origin:"+move"};function An(x,z,ne){for(var te=0,ie=0;;){var ce=x.indexOf(" ",te);ce==-1&&(ce=x.length);var ye=ce-te;if(ce==x.length||ie+ye>=z)return te+Math.min(ye,z-ie);if(ie+=ce-te,ie+=ne-ie%ne,te=ce+1,ie>=z)return te}}var dn=[""];function nn(x){for(;dn.length<=x;)dn.push(jt(dn)+" ");return dn[x]}function jt(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 vn(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function Te(){}function ue(x,z){var ne;return Object.create?ne=Object.create(x):(Te.prototype=x,ne=new Te),z&&Qt(z,ne),ne}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function me(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||le.test(x))}function fe(x,z){return z?z.source.indexOf("\\w")>-1&&me(x)?!0:z.test(x):me(x)}function se(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var Oe=/[\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 rt(x){return x.charCodeAt(0)>=768&&Oe.test(x)}function Pt(x,z,ne){for(;(ne<0?z>0:z<x.length)&&rt(x.charAt(z));)z+=ne;return z}function zt(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,ce=te<0?Math.ceil(ie):Math.floor(ie);if(ce==z)return x(ce)?z:ne;x(ce)?ne=ce:z=ce+te}}function Zt(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ce=0;ce<x.length;++ce){var ye=x[ce];(ye.from<ne&&ye.to>z||z==ne&&ye.to==z)&&(te(Math.max(ye.from,z),Math.min(ye.to,ne),ye.level==1?"rtl":"ltr",ce),ie=!0)}ie||te(z,ne,"ltr")}var en=null;function Gt(x,z,ne){var te;en=null;for(var ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.from<z&&ce.to>z)return ie;ce.to==z&&(ce.from!=ce.to&&ne=="before"?te=ie:en=ie),ce.from==z&&(ce.from!=ce.to&&ne!="before"?te=ie:en=ie)}return te!=null?te:en}var tr=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne($e){return $e<=247?x.charAt($e):1424<=$e&&$e<=1524?"R":1536<=$e&&$e<=1785?z.charAt($e-1536):1774<=$e&&$e<=2220?"r":8192<=$e&&$e<=8203?"w":$e==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,ce=/[LRr]/,ye=/[Lb1n]/,Le=/[1n]/;function Ne($e,wt,Nt){this.level=$e,this.from=wt,this.to=Nt}return function($e,wt){var Nt=wt=="ltr"?"L":"R";if($e.length==0||wt=="ltr"&&!te.test($e))return!1;for(var gn=$e.length,un=[],Jn=0;Jn<gn;++Jn)un.push(ne($e.charCodeAt(Jn)));for(var gr=0,Hr=Nt;gr<gn;++gr){var ti=un[gr];ti=="m"?un[gr]=Hr:Hr=ti}for(var fi=0,Xr=Nt;fi<gn;++fi){var xi=un[fi];xi=="1"&&Xr=="r"?un[fi]="n":ce.test(xi)&&(Xr=xi,xi=="r"&&(un[fi]="R"))}for(var da=1,ya=un[0];da<gn-1;++da){var xo=un[da];xo=="+"&&ya=="1"&&un[da+1]=="1"?un[da]="1":xo==","&&ya==un[da+1]&&(ya=="1"||ya=="n")&&(un[da]=ya),ya=xo}for(var fs=0;fs<gn;++fs){var nl=un[fs];if(nl==",")un[fs]="N";else if(nl=="%"){var Ls=void 0;for(Ls=fs+1;Ls<gn&&un[Ls]=="%";++Ls);for(var Sl=fs&&un[fs-1]=="!"||Ls<gn&&un[Ls]=="1"?"1":"N",wl=fs;wl<Ls;++wl)un[wl]=Sl;fs=Ls-1}}for(var Xs=0,Cl=Nt;Xs<gn;++Xs){var Xa=un[Xs];Cl=="L"&&Xa=="1"?un[Xs]="L":ce.test(Xa)&&(Cl=Xa)}for(var Os=0;Os<gn;++Os)if(ie.test(un[Os])){var As=void 0;for(As=Os+1;As<gn&&ie.test(un[As]);++As);for(var Bs=(Os?un[Os-1]:Nt)=="L",Ws=(As<gn?un[As]:Nt)=="L",Wu=Bs==Ws?Bs?"L":"R":Nt,_l=Os;_l<As;++_l)un[_l]=Wu;Os=As-1}for(var ll=[],Zo,Js=0;Js<gn;)if(ye.test(un[Js])){var Gc=Js;for(++Js;Js<gn&&ye.test(un[Js]);++Js);ll.push(new Ne(0,Gc,Js))}else{var hu=Js,_u=ll.length,Ql=wt=="rtl"?1:0;for(++Js;Js<gn&&un[Js]!="L";++Js);for(var Ys=hu;Ys<Js;)if(Le.test(un[Ys])){hu<Ys&&(ll.splice(_u,0,new Ne(1,hu,Ys)),_u+=Ql);var Zu=Ys;for(++Ys;Ys<Js&&Le.test(un[Ys]);++Ys);ll.splice(_u,0,new Ne(2,Zu,Ys)),_u+=Ql,hu=Ys}else++Ys;hu<Js&&ll.splice(_u,0,new Ne(1,hu,Js))}return wt=="ltr"&&(ll[0].level==1&&(Zo=$e.match(/^\s+/))&&(ll[0].from=Zo[0].length,ll.unshift(new Ne(0,0,Zo[0].length))),jt(ll).level==1&&(Zo=$e.match(/\s+$/))&&(jt(ll).to-=Zo[0].length,ll.push(new Ne(0,gn-Zo[0].length,gn)))),wt=="rtl"?ll.reverse():ll}}();function cr(x,z){var ne=x.order;return ne==null&&(ne=x.order=tr(x.text,z)),ne}var Wt=[],bn=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]||Wt).concat(ne)}};function lr(x,z){return x._handlers&&x._handlers[z]||Wt}function Wr(x,z,ne){if(x.removeEventListener)x.removeEventListener(z,ne,!1);else if(x.detachEvent)x.detachEvent("on"+z,ne);else{var te=x._handlers,ie=te&&te[z];if(ie){var ce=Lt(ie,ne);ce>-1&&(te[z]=ie.slice(0,ce).concat(ie.slice(ce+1)))}}}function Rn(x,z){var ne=lr(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 Tr(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),Rn(x,ne||z.type,x,z),Zi(z)||z.codemirrorIgnore}function Ca(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)Lt(ne,z[te])==-1&&ne.push(z[te])}function Wi(x,z){return lr(x,z).length>0}function Li(x){x.prototype.on=function(z,ne){bn(this,z,ne)},x.prototype.off=function(z,ne){Wr(this,z,ne)}}function Mi(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Ji(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Zi(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Ea(x){Mi(x),Ji(x)}function Ma(x){return x.target||x.srcElement}function Gr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),_e&&x.ctrlKey&&z==1&&(z=3),z}var Va=function(){if(ge&&Me<9)return!1;var x=pt("div");return"draggable"in x||"dragDrop"in x}(),no;function po(x){if(no==null){var z=pt("span","\u200B");vt(x,pt("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(no=z.offsetWidth<=1&&z.offsetHeight>2&&!(ge&&Me<8))}var ne=no?pt("span","\u200B"):pt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var mo;function Pa(x){if(mo!=null)return mo;var z=vt(x,document.createTextNode("A\u062EA")),ne=et(z,0,1).getBoundingClientRect(),te=et(z,1,2).getBoundingClientRect();return Ge(x),!ne||ne.left==ne.right?!1:mo=te.right-ne.right<3}var Bt=`
b`.split(/\n/).length!=3?function(x){for(var z=0,ne=[],te=x.length;z<=te;){var ie=x.indexOf(`
`,z);ie==-1&&(ie=x.length);var ce=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),ye=ce.indexOf("\r");ye!=-1?(ne.push(ce.slice(0,ye)),z+=ye+1):(ne.push(ce),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},On=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},Fn=function(){var x=pt("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),$n=null;function Ir(x){if($n!=null)return $n;var z=vt(x,pt("span","x")),ne=z.getBoundingClientRect(),te=et(z,0,1).getBoundingClientRect();return $n=Math.abs(ne.left-te.left)>1}var or={},Sr={};function Zn(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),or[x]=z}function ut(x,z){Sr[x]=z}function bt(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=ue(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return bt("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return bt("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function Ft(x,z){z=bt(z);var ne=or[z.name];if(!ne)return Ft(x,"text/plain");var te=ne(x,z);if(qt.hasOwnProperty(z.name)){var ie=qt[z.name];for(var ce in ie)ie.hasOwnProperty(ce)&&(te.hasOwnProperty(ce)&&(te["_"+ce]=te[ce]),te[ce]=ie[ce])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var ye in z.modeProps)te[ye]=z.modeProps[ye];return te}var qt={};function qe(x,z){var ne=qt.hasOwnProperty(x)?qt[x]:qt[x]={};Qt(z,ne)}function _t(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 Xt(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 Kt(x,z,ne){return x.startState?x.startState(z,ne):!0}var on=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};on.prototype.eol=function(){return this.pos>=this.string.length},on.prototype.sol=function(){return this.pos==this.lineStart},on.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},on.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},on.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},on.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},on.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},on.prototype.skipToEnd=function(){this.pos=this.string.length},on.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},on.prototype.backUp=function(x){this.pos-=x},on.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Xe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Xe(this.string,this.lineStart,this.tabSize):0)},on.prototype.indentation=function(){return Xe(this.string,null,this.tabSize)-(this.lineStart?Xe(this.string,this.lineStart,this.tabSize):0)},on.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(ye){return ne?ye.toLowerCase():ye},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var ce=this.string.slice(this.pos).match(x);return ce&&ce.index>0?null:(ce&&z!==!1&&(this.pos+=ce[0].length),ce)}},on.prototype.current=function(){return this.string.slice(this.start,this.pos)},on.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},on.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},on.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function rn(x,z){if(z-=x.first,z<0||z>=x.size)throw new Error("There is no line "+(z+x.first)+" in the document.");for(var ne=x;!ne.lines;)for(var te=0;;++te){var ie=ne.children[te],ce=ie.chunkSize();if(z<ce){ne=ie;break}z-=ce}return ne.lines[z]}function Un(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ce){var ye=ce.text;ie==ne.line&&(ye=ye.slice(0,ne.ch)),ie==z.line&&(ye=ye.slice(z.ch)),te.push(ye),++ie}),te}function Ar(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function rr(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function ir(x){if(x.parent==null)return null;for(var z=x.parent,ne=Lt(z.lines,x),te=z.parent;te;z=te,te=te.parent)for(var ie=0;te.children[ie]!=z;++ie)ne+=te.children[ie].chunkSize();return ne+z.first}function mr(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],ce=ie.height;if(z<ce){x=ie;continue e}z-=ce,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var ye=0;ye<x.lines.length;++ye){var Le=x.lines[ye],Ne=Le.height;if(z<Ne)break;z-=Ne}return ne+ye}function br(x,z){return z>=x.first&&z<x.first+x.size}function Yr(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function _n(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof _n))return new _n(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function Qn(x,z){return x.line-z.line||x.ch-z.ch}function na(x,z){return x.sticky==z.sticky&&Qn(x,z)==0}function ca(x){return _n(x.line,x.ch)}function _i(x,z){return Qn(x,z)<0?z:x}function ii(x,z){return Qn(x,z)<0?x:z}function va(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function _r(x,z){if(z.line<x.first)return _n(x.first,0);var ne=x.first+x.size-1;return z.line>ne?_n(ne,rn(x,ne).text.length):Qi(z,rn(x,z.line).text.length)}function Qi(x,z){var ne=x.ch;return ne==null||ne>z?_n(x.line,z):ne<0?_n(x.line,0):x}function Tn(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=_r(x,z[te]);return ne}var Ua=function(x,z){this.state=x,this.lookAhead=z},xa=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};xa.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},xa.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}},xa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xa.fromSaved=function(x,z,ne){return z instanceof Ua?new xa(x,_t(x.mode,z.state),ne,z.lookAhead):new xa(x,_t(x.mode,z),ne)},xa.prototype.save=function(x){var z=x!==!1?_t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ua(z,this.maxLookAhead):z};function uo(x,z,ne,te){var ie=[x.state.modeGen],ce={};Oa(x,z.text,x.doc.mode,ne,function($e,wt){return ie.push($e,wt)},ce,te);for(var ye=ne.state,Le=function($e){ne.baseTokens=ie;var wt=x.state.overlays[$e],Nt=1,gn=0;ne.state=!0,Oa(x,z.text,wt.mode,ne,function(un,Jn){for(var gr=Nt;gn<un;){var Hr=ie[Nt];Hr>un&&ie.splice(Nt,1,un,ie[Nt+1],Hr),Nt+=2,gn=Math.min(un,Hr)}if(Jn)if(wt.opaque)ie.splice(gr,Nt-gr,un,"overlay "+Jn),Nt=gr+2;else for(;gr<Nt;gr+=2){var ti=ie[gr+1];ie[gr+1]=(ti?ti+" ":"")+"overlay "+Jn}},ce),ne.state=ye,ne.baseTokens=null,ne.baseTokenPos=1},Ne=0;Ne<x.state.overlays.length;++Ne)Le(Ne);return{styles:ie,classes:ce.bgClass||ce.textClass?ce:null}}function ja(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=ka(x,ir(z)),ie=z.text.length>x.options.maxHighlightLength&&_t(x.doc.mode,te.state),ce=uo(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=ce.styles,ce.classes?z.styleClasses=ce.classes:z.styleClasses&&(z.styleClasses=null),ne===x.doc.highlightFrontier&&(x.doc.modeFrontier=Math.max(x.doc.modeFrontier,++x.doc.highlightFrontier))}return z.styles}function ka(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new xa(te,!0,z);var ce=So(x,z,ne),ye=ce>te.first&&rn(te,ce-1).stateAfter,Le=ye?xa.fromSaved(te,ye,ce):new xa(te,Kt(te.mode),ce);return te.iter(ce,z,function(Ne){co(x,Ne.text,Le);var $e=Le.line;Ne.stateAfter=$e==z-1||$e%5==0||$e>=ie.viewFrom&&$e<ie.viewTo?Le.save():null,Le.nextLine()}),ne&&(te.modeFrontier=Le.line),Le}function co(x,z,ne,te){var ie=x.doc.mode,ce=new on(z,x.options.tabSize,ne);for(ce.start=ce.pos=te||0,z==""&&za(ie,ne.state);!ce.eol();)fa(ie,ce,ne.state),ce.start=ce.pos}function za(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=Xt(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function fa(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=Xt(x,ne).mode);var ce=x.token(z,ne);if(z.pos>z.start)return ce}throw new Error("Mode "+x.name+" failed to advance stream.")}var Ya=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function _o(x,z,ne,te){var ie=x.doc,ce=ie.mode,ye;z=_r(ie,z);var Le=rn(ie,z.line),Ne=ka(x,z.line,ne),$e=new on(Le.text,x.options.tabSize,Ne),wt;for(te&&(wt=[]);(te||$e.pos<z.ch)&&!$e.eol();)$e.start=$e.pos,ye=fa(ce,$e,Ne.state),te&&wt.push(new Ya($e,ye,_t(ie.mode,Ne.state)));return te?wt:new Ya($e,ye,Ne.state)}function qa(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 Oa(x,z,ne,te,ie,ce,ye){var Le=ne.flattenSpans;Le==null&&(Le=x.options.flattenSpans);var Ne=0,$e=null,wt=new on(z,x.options.tabSize,te),Nt,gn=x.options.addModeClass&&[null];for(z==""&&qa(za(ne,te.state),ce);!wt.eol();){if(wt.pos>x.options.maxHighlightLength?(Le=!1,ye&&co(x,z,te,wt.pos),wt.pos=z.length,Nt=null):Nt=qa(fa(ne,wt,te.state,gn),ce),gn){var un=gn[0].name;un&&(Nt="m-"+(Nt?un+" "+Nt:un))}if(!Le||$e!=Nt){for(;Ne<wt.start;)Ne=Math.min(wt.start,Ne+5e3),ie(Ne,$e);$e=Nt}wt.start=wt.pos}for(;Ne<wt.pos;){var Jn=Math.min(wt.pos,Ne+5e3);ie(Jn,$e),Ne=Jn}}function So(x,z,ne){for(var te,ie,ce=x.doc,ye=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Le=z;Le>ye;--Le){if(Le<=ce.first)return ce.first;var Ne=rn(ce,Le-1),$e=Ne.stateAfter;if($e&&(!ne||Le+($e instanceof Ua?$e.lookAhead:0)<=ce.modeFrontier))return Le;var wt=Xe(Ne.text,null,x.options.tabSize);(ie==null||te>wt)&&(ie=Le-1,te=wt)}return ie}function To(x,z){if(x.modeFrontier=Math.min(x.modeFrontier,z),!(x.highlightFrontier<z-10)){for(var ne=x.first,te=z-1;te>ne;te--){var ie=rn(x,te).stateAfter;if(ie&&(!(ie instanceof Ua)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var fo=!1,Vi=!1;function At(){fo=!0}function Mt(){Vi=!0}function tn(x,z,ne){this.marker=x,this.from=z,this.to=ne}function Sn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function Kn(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function Zr(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function Nr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=ce.marker,Le=ce.from==null||(ye.inclusiveLeft?ce.from<=z:ce.from<z);if(Le||ce.from==z&&ye.type=="bookmark"&&(!ne||!ce.marker.insertLeft)){var Ne=ce.to==null||(ye.inclusiveRight?ce.to>=z:ce.to>z);(te||(te=[])).push(new tn(ye,ce.from,Ne?null:ce.to))}}return te}function qr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=ce.marker,Le=ce.to==null||(ye.inclusiveRight?ce.to>=z:ce.to>z);if(Le||ce.from==z&&ye.type=="bookmark"&&(!ne||ce.marker.insertLeft)){var Ne=ce.from==null||(ye.inclusiveLeft?ce.from<=z:ce.from<z);(te||(te=[])).push(new tn(ye,Ne?null:ce.from-z,ce.to==null?null:ce.to-z))}}return te}function li(x,z){if(z.full)return null;var ne=br(x,z.from.line)&&rn(x,z.from.line).markedSpans,te=br(x,z.to.line)&&rn(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ce=z.to.ch,ye=Qn(z.from,z.to)==0,Le=Nr(ne,ie,ye),Ne=qr(te,ce,ye),$e=z.text.length==1,wt=jt(z.text).length+($e?ie:0);if(Le)for(var Nt=0;Nt<Le.length;++Nt){var gn=Le[Nt];if(gn.to==null){var un=Sn(Ne,gn.marker);un?$e&&(gn.to=un.to==null?null:un.to+wt):gn.to=ie}}if(Ne)for(var Jn=0;Jn<Ne.length;++Jn){var gr=Ne[Jn];if(gr.to!=null&&(gr.to+=wt),gr.from==null){var Hr=Sn(Le,gr.marker);Hr||(gr.from=wt,$e&&(Le||(Le=[])).push(gr))}else gr.from+=wt,$e&&(Le||(Le=[])).push(gr)}Le&&(Le=Jr(Le)),Ne&&Ne!=Le&&(Ne=Jr(Ne));var ti=[Le];if(!$e){var fi=z.text.length-2,Xr;if(fi>0&&Le)for(var xi=0;xi<Le.length;++xi)Le[xi].to==null&&(Xr||(Xr=[])).push(new tn(Le[xi].marker,null,null));for(var da=0;da<fi;++da)ti.push(Xr);ti.push(Ne)}return ti}function Jr(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 Ki(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(un){if(un.markedSpans)for(var Jn=0;Jn<un.markedSpans.length;++Jn){var gr=un.markedSpans[Jn].marker;gr.readOnly&&(!te||Lt(te,gr)==-1)&&(te||(te=[])).push(gr)}}),!te)return null;for(var ie=[{from:z,to:ne}],ce=0;ce<te.length;++ce)for(var ye=te[ce],Le=ye.find(0),Ne=0;Ne<ie.length;++Ne){var $e=ie[Ne];if(!(Qn($e.to,Le.from)<0||Qn($e.from,Le.to)>0)){var wt=[Ne,1],Nt=Qn($e.from,Le.from),gn=Qn($e.to,Le.to);(Nt<0||!ye.inclusiveLeft&&!Nt)&&wt.push({from:$e.from,to:Le.from}),(gn>0||!ye.inclusiveRight&&!gn)&&wt.push({from:Le.to,to:$e.to}),ie.splice.apply(ie,wt),Ne+=wt.length-3}}return ie}function ea(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function ha(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function Za(x){return x.inclusiveLeft?-1:0}function Na(x){return x.inclusiveRight?1:0}function Ra(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ce=Qn(te.from,ie.from)||Za(x)-Za(z);if(ce)return-ce;var ye=Qn(te.to,ie.to)||Na(x)-Na(z);return ye||z.id-x.id}function Be(x,z){var ne=Vi&&x.markedSpans,te;if(ne)for(var ie=void 0,ce=0;ce<ne.length;++ce)ie=ne[ce],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||Ra(te,ie.marker)<0)&&(te=ie.marker);return te}function Ve(x){return Be(x,!0)}function He(x){return Be(x,!1)}function tt(x,z){var ne=Vi&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var ce=ne[ie];ce.marker.collapsed&&(ce.from==null||ce.from<z)&&(ce.to==null||ce.to>z)&&(!te||Ra(te,ce.marker)<0)&&(te=ce.marker)}return te}function gt(x,z,ne,te,ie){var ce=rn(x,z),ye=Vi&&ce.markedSpans;if(ye)for(var Le=0;Le<ye.length;++Le){var Ne=ye[Le];if(Ne.marker.collapsed){var $e=Ne.marker.find(0),wt=Qn($e.from,ne)||Za(Ne.marker)-Za(ie),Nt=Qn($e.to,te)||Na(Ne.marker)-Na(ie);if(!(wt>=0&&Nt<=0||wt<=0&&Nt>=0)&&(wt<=0&&(Ne.marker.inclusiveRight&&ie.inclusiveLeft?Qn($e.to,ne)>=0:Qn($e.to,ne)>0)||wt>=0&&(Ne.marker.inclusiveRight&&ie.inclusiveLeft?Qn($e.from,te)<=0:Qn($e.from,te)<0)))return!0}}}function Ct(x){for(var z;z=Ve(x);)x=z.find(-1,!0).line;return x}function It(x){for(var z;z=He(x);)x=z.find(1,!0).line;return x}function ln(x){for(var z,ne;z=He(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function mn(x,z){var ne=rn(x,z),te=Ct(ne);return ne==te?z:ir(te)}function Yn(x,z){if(z>x.lastLine())return z;var ne=rn(x,z),te;if(!yr(x,ne))return z;for(;te=He(ne);)ne=te.find(1,!0).line;return ir(ne)+1}function yr(x,z){var ne=Vi&&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&&Vn(x,z,te))return!0}}}function Vn(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return Vn(x,te.line,Sn(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,ce=0;ce<z.markedSpans.length;++ce)if(ie=z.markedSpans[ce],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&Vn(x,z,ie))return!0}function En(x){x=Ct(x);for(var z=0,ne=x.parent,te=0;te<ne.lines.length;++te){var ie=ne.lines[te];if(ie==x)break;z+=ie.height}for(var ce=ne.parent;ce;ne=ce,ce=ne.parent)for(var ye=0;ye<ce.children.length;++ye){var Le=ce.children[ye];if(Le==ne)break;z+=Le.height}return z}function wn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Ve(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=He(te);){var ce=ne.find(0,!0);z-=te.text.length-ce.from.ch,te=ce.to.line,z+=te.text.length-ce.to.ch}return z}function In(x){var z=x.display,ne=x.doc;z.maxLine=rn(ne,ne.first),z.maxLineLength=wn(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=wn(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var Bn=function(x,z,ne){this.text=x,ha(this,z),this.height=ne?ne(this):1};Bn.prototype.lineNo=function(){return ir(this)},Li(Bn);function pr(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),ea(x),ha(x,ne);var ie=te?te(x):1;ie!=x.height&&rr(x,ie)}function Xn(x){x.parent=null,ea(x)}var jn={},nr={};function qn(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?nr:jn;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function dr(x,z){var ne=Ue("span",null,null,Ee?"padding-right: .1px":null),te={pre:Ue("pre",[ne],"CodeMirror-line"),content:ne,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var ie=0;ie<=(z.rest?z.rest.length:0);ie++){var ce=ie?z.rest[ie-1]:z.line,ye=void 0;te.pos=0,te.addToken=Ye,Pa(x.display.measure)&&(ye=cr(ce,x.doc.direction))&&(te.addToken=Dt(te.addToken,ye)),te.map=[];var Le=z!=x.display.externalMeasured&&ir(ce);kn(ce,te,ja(x,ce,Le)),ce.styleClasses&&(ce.styleClasses.bgClass&&(te.bgClass=We(ce.styleClasses.bgClass,te.bgClass||"")),ce.styleClasses.textClass&&(te.textClass=We(ce.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(po(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(Ee){var Ne=te.content.lastChild;(/\bcm-tab\b/.test(Ne.className)||Ne.querySelector&&Ne.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return Rn(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=We(te.pre.className,te.textClass||"")),te}function je(x){var z=pt("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ye(x,z,ne,te,ie,ce,ye){if(z){var Le=x.splitSpaces?$t(z,x.trailingSpace):z,Ne=x.cm.state.specialChars,$e=!1,wt;if(!Ne.test(z))x.col+=z.length,wt=document.createTextNode(Le),x.map.push(x.pos,x.pos+z.length,wt),ge&&Me<9&&($e=!0),x.pos+=z.length;else{wt=document.createDocumentFragment();for(var Nt=0;;){Ne.lastIndex=Nt;var gn=Ne.exec(z),un=gn?gn.index-Nt:z.length-Nt;if(un){var Jn=document.createTextNode(Le.slice(Nt,Nt+un));ge&&Me<9?wt.appendChild(pt("span",[Jn])):wt.appendChild(Jn),x.map.push(x.pos,x.pos+un,Jn),x.col+=un,x.pos+=un}if(!gn)break;Nt+=un+1;var gr=void 0;if(gn[0]==" "){var Hr=x.cm.options.tabSize,ti=Hr-x.col%Hr;gr=wt.appendChild(pt("span",nn(ti),"cm-tab")),gr.setAttribute("role","presentation"),gr.setAttribute("cm-text"," "),x.col+=ti}else gn[0]=="\r"||gn[0]==`
`?(gr=wt.appendChild(pt("span",gn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),gr.setAttribute("cm-text",gn[0]),x.col+=1):(gr=x.cm.options.specialCharPlaceholder(gn[0]),gr.setAttribute("cm-text",gn[0]),ge&&Me<9?wt.appendChild(pt("span",[gr])):wt.appendChild(gr),x.col+=1);x.map.push(x.pos,x.pos+1,gr),x.pos++}}if(x.trailingSpace=Le.charCodeAt(z.length-1)==32,ne||te||ie||$e||ce||ye){var fi=ne||"";te&&(fi+=te),ie&&(fi+=ie);var Xr=pt("span",[wt],fi,ce);if(ye)for(var xi in ye)ye.hasOwnProperty(xi)&&xi!="style"&&xi!="class"&&Xr.setAttribute(xi,ye[xi]);return x.content.appendChild(Xr)}x.content.appendChild(wt)}}function $t(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var ce=x.charAt(ie);ce==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(ce="\xA0"),te+=ce,ne=ce==" "}return te}function Dt(x,z){return function(ne,te,ie,ce,ye,Le,Ne){ie=ie?ie+" cm-force-border":"cm-force-border";for(var $e=ne.pos,wt=$e+te.length;;){for(var Nt=void 0,gn=0;gn<z.length&&(Nt=z[gn],!(Nt.to>$e&&Nt.from<=$e));gn++);if(Nt.to>=wt)return x(ne,te,ie,ce,ye,Le,Ne);x(ne,te.slice(0,Nt.to-$e),ie,ce,null,Le,Ne),ce=null,te=te.slice(Nt.to-$e),$e=Nt.to}}}function sn(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 kn(x,z,ne){var te=x.markedSpans,ie=x.text,ce=0;if(!te){for(var ye=1;ye<ne.length;ye+=2)z.addToken(z,ie.slice(ce,ce=ne[ye]),qn(ne[ye+1],z.cm.options));return}for(var Le=ie.length,Ne=0,$e=1,wt="",Nt,gn,un=0,Jn,gr,Hr,ti,fi;;){if(un==Ne){Jn=gr=Hr=gn="",fi=null,ti=null,un=1/0;for(var Xr=[],xi=void 0,da=0;da<te.length;++da){var ya=te[da],xo=ya.marker;if(xo.type=="bookmark"&&ya.from==Ne&&xo.widgetNode)Xr.push(xo);else if(ya.from<=Ne&&(ya.to==null||ya.to>Ne||xo.collapsed&&ya.to==Ne&&ya.from==Ne)){if(ya.to!=null&&ya.to!=Ne&&un>ya.to&&(un=ya.to,gr=""),xo.className&&(Jn+=" "+xo.className),xo.css&&(gn=(gn?gn+";":"")+xo.css),xo.startStyle&&ya.from==Ne&&(Hr+=" "+xo.startStyle),xo.endStyle&&ya.to==un&&(xi||(xi=[])).push(xo.endStyle,ya.to),xo.title&&((fi||(fi={})).title=xo.title),xo.attributes)for(var fs in xo.attributes)(fi||(fi={}))[fs]=xo.attributes[fs];xo.collapsed&&(!ti||Ra(ti.marker,xo)<0)&&(ti=ya)}else ya.from>Ne&&un>ya.from&&(un=ya.from)}if(xi)for(var nl=0;nl<xi.length;nl+=2)xi[nl+1]==un&&(gr+=" "+xi[nl]);if(!ti||ti.from==Ne)for(var Ls=0;Ls<Xr.length;++Ls)sn(z,0,Xr[Ls]);if(ti&&(ti.from||0)==Ne){if(sn(z,(ti.to==null?Le+1:ti.to)-Ne,ti.marker,ti.from==null),ti.to==null)return;ti.to==Ne&&(ti=!1)}}if(Ne>=Le)break;for(var Sl=Math.min(Le,un);;){if(wt){var wl=Ne+wt.length;if(!ti){var Xs=wl>Sl?wt.slice(0,Sl-Ne):wt;z.addToken(z,Xs,Nt?Nt+Jn:Jn,Hr,Ne+Xs.length==un?gr:"",gn,fi)}if(wl>=Sl){wt=wt.slice(Sl-Ne),Ne=Sl;break}Ne=wl,Hr=""}wt=ie.slice(ce,ce=ne[$e++]),Nt=qn(ne[$e++],z.cm.options)}}}function yn(x,z,ne){this.line=z,this.rest=ln(z),this.size=this.rest?ir(jt(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=yr(x,z)}function zn(x,z,ne){for(var te=[],ie,ce=z;ce<ne;ce=ie){var ye=new yn(x.doc,rn(x.doc,ce),ce);ie=ce+ye.size,te.push(ye)}return te}var Pn=null;function pn(x){Pn?Pn.ops.push(x):x.ownsGroup=Pn={ops:[x],delayedCallbacks:[]}}function Nn(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 Wn(x,z){var ne=x.ownsGroup;if(ne)try{Nn(ne)}finally{Pn=null,z(ne)}}var vr=null;function Hn(x,z){var ne=lr(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;Pn?ie=Pn.delayedCallbacks:vr?ie=vr:(ie=vr=[],setTimeout(Er,0));for(var ce=function(Le){ie.push(function(){return ne[Le].apply(null,te)})},ye=0;ye<ne.length;++ye)ce(ye)}}function Er(){var x=vr;vr=null;for(var z=0;z<x.length;++z)x[z]()}function Qr(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ce=z.changes[ie];ce=="text"?Fr(x,z):ce=="gutter"?hi(x,z,ne,te):ce=="class"?ai(x,z):ce=="widget"&&$r(x,z,te)}z.changes=null}function Rr(x){return x.node==x.text&&(x.node=pt("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ge&&Me<8&&(x.node.style.zIndex=2)),x.node}function jr(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=Rr(z);z.background=te.insertBefore(pt("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function Cr(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):dr(x,z)}function Fr(x,z){var ne=z.text.className,te=Cr(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,ai(x,z)):ne&&(z.text.className=ne)}function ai(x,z){jr(x,z),z.line.wrapClass?Rr(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 hi(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=Rr(z);z.gutterBackground=pt("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px; width: "+te.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),ie.insertBefore(z.gutterBackground,z.text)}var ce=z.line.gutterMarkers;if(x.options.lineNumbers||ce){var ye=Rr(z),Le=z.gutter=pt("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Le),ye.insertBefore(Le,z.text),z.line.gutterClass&&(Le.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ce||!ce["CodeMirror-linenumbers"])&&(z.lineNumber=Le.appendChild(pt("div",Yr(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ce)for(var Ne=0;Ne<x.display.gutterSpecs.length;++Ne){var $e=x.display.gutterSpecs[Ne].className,wt=ce.hasOwnProperty($e)&&ce[$e];wt&&Le.appendChild(pt("div",[wt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[$e]+"px; width: "+te.gutterWidth[$e]+"px"))}}}function $r(x,z,ne){z.alignable&&(z.alignable=null);for(var te=we("CodeMirror-linewidget"),ie=z.node.firstChild,ce=void 0;ie;ie=ce)ce=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);ta(x,z,ne)}function wi(x,z,ne,te){var ie=Cr(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),ai(x,z),hi(x,z,ne,te),ta(x,z,te),z.node}function ta(x,z,ne){if(Ba(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)Ba(x,z.rest[te],z,ne,!1)}function Ba(x,z,ne,te,ie){if(z.widgets)for(var ce=Rr(ne),ye=0,Le=z.widgets;ye<Le.length;++ye){var Ne=Le[ye],$e=pt("div",[Ne.node],"CodeMirror-linewidget"+(Ne.className?" "+Ne.className:""));Ne.handleMouseEvents||$e.setAttribute("cm-ignore-events","true"),ga(Ne,$e,ne,te),x.display.input.setUneditable($e),ie&&Ne.above?ce.insertBefore($e,ne.gutter||ne.text):ce.appendChild($e),Hn(Ne,"redraw")}}function ga(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 ra(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!kt(document.body,x.node)){var ne="position: relative;";x.coverGutter&&(ne+="margin-left: -"+z.display.gutters.offsetWidth+"px;"),x.noHScroll&&(ne+="width: "+z.display.wrapper.clientWidth+"px;"),vt(z.display.measure,pt("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function La(x,z){for(var ne=Ma(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 Aa(x){return x.lineSpace.offsetTop}function Oi(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function ia(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=vt(x.measure,pt("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 ni(x){return cn-x.display.nativeBarWidth}function Ci(x){return x.display.scroller.clientWidth-ni(x)-x.display.barWidth}function Xi(x){return x.display.scroller.clientHeight-ni(x)-x.display.barHeight}function wa(x,z,ne){var te=x.options.lineWrapping,ie=te&&Ci(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ce=z.measure.heights=[];if(te){z.measure.width=ie;for(var ye=z.text.firstChild.getClientRects(),Le=0;Le<ye.length-1;Le++){var Ne=ye[Le],$e=ye[Le+1];Math.abs(Ne.bottom-$e.bottom)>2&&ce.push((Ne.bottom+$e.top)/2-ne.top)}}ce.push(ne.bottom-ne.top)}}function ri(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(ir(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function io(x,z){z=Ct(z);var ne=ir(z),te=x.display.externalMeasured=new yn(x.doc,z,ne);te.lineN=ne;var ie=te.built=dr(x,te);return te.text=ie.pre,vt(x.display.lineMeasure,ie.pre),te}function ko(x,z,ne,te){return Ui(x,Ta(x,z),ne,te)}function Ja(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[Fa(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function Ta(x,z){var ne=ir(z),te=Ja(x,ne);te&&!te.text?te=null:te&&te.changes&&(Qr(x,te,ne,ms(x)),x.curOp.forceUpdate=!0),te||(te=io(x,z));var ie=ri(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Ui(x,z,ne,te,ie){z.before&&(ne=-1);var ce=ne+(te||""),ye;return z.cache.hasOwnProperty(ce)?ye=z.cache[ce]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(wa(x,z.view,z.rect),z.hasHeights=!0),ye=sa(x,z,ne,te),ye.bogus||(z.cache[ce]=ye)),{left:ye.left,right:ye.right,top:ie?ye.rtop:ye.top,bottom:ie?ye.rbottom:ye.bottom}}var Po={left:0,right:0,top:0,bottom:0};function Yi(x,z,ne){for(var te,ie,ce,ye,Le,Ne,$e=0;$e<x.length;$e+=3)if(Le=x[$e],Ne=x[$e+1],z<Le?(ie=0,ce=1,ye="left"):z<Ne?(ie=z-Le,ce=ie+1):($e==x.length-3||z==Ne&&x[$e+3]>z)&&(ce=Ne-Le,ie=ce-1,z>=Ne&&(ye="right")),ie!=null){if(te=x[$e+2],Le==Ne&&ne==(te.insertLeft?"left":"right")&&(ye=ne),ne=="left"&&ie==0)for(;$e&&x[$e-2]==x[$e-3]&&x[$e-1].insertLeft;)te=x[($e-=3)+2],ye="left";if(ne=="right"&&ie==Ne-Le)for(;$e<x.length-3&&x[$e+3]==x[$e+4]&&!x[$e+5].insertLeft;)te=x[($e+=3)+2],ye="right";break}return{node:te,start:ie,end:ce,collapse:ye,coverStart:Le,coverEnd:Ne}}function oi(x,z){var ne=Po;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 sa(x,z,ne,te){var ie=Yi(z.map,ne,te),ce=ie.node,ye=ie.start,Le=ie.end,Ne=ie.collapse,$e;if(ce.nodeType==3){for(var wt=0;wt<4;wt++){for(;ye&&rt(z.line.text.charAt(ie.coverStart+ye));)--ye;for(;ie.coverStart+Le<ie.coverEnd&&rt(z.line.text.charAt(ie.coverStart+Le));)++Le;if(ge&&Me<9&&ye==0&&Le==ie.coverEnd-ie.coverStart?$e=ce.parentNode.getBoundingClientRect():$e=oi(et(ce,ye,Le).getClientRects(),te),$e.left||$e.right||ye==0)break;Le=ye,ye=ye-1,Ne="right"}ge&&Me<11&&($e=Ga(x.display.measure,$e))}else{ye>0&&(Ne=te="right");var Nt;x.options.lineWrapping&&(Nt=ce.getClientRects()).length>1?$e=Nt[te=="right"?Nt.length-1:0]:$e=ce.getBoundingClientRect()}if(ge&&Me<9&&!ye&&(!$e||!$e.left&&!$e.right)){var gn=ce.parentNode.getClientRects()[0];gn?$e={left:gn.left,right:gn.left+es(x.display),top:gn.top,bottom:gn.bottom}:$e=Po}for(var un=$e.top-z.rect.top,Jn=$e.bottom-z.rect.top,gr=(un+Jn)/2,Hr=z.view.measure.heights,ti=0;ti<Hr.length-1&&!(gr<Hr[ti]);ti++);var fi=ti?Hr[ti-1]:0,Xr=Hr[ti],xi={left:(Ne=="right"?$e.right:$e.left)-z.rect.left,right:(Ne=="left"?$e.left:$e.right)-z.rect.left,top:fi,bottom:Xr};return!$e.left&&!$e.right&&(xi.bogus=!0),x.options.singleCursorHeightPerLine||(xi.rtop=un,xi.rbottom=Jn),xi}function Ga(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ir(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 la(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 Ka(x){x.display.externalMeasure=null,Ge(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)la(x.display.view[z])}function ki(x){Ka(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function ro(){return he&&lt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ao(){return he&&lt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function eo(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=ra(x.widgets[ne]));return z}function oo(x,z,ne,te,ie){if(!ie){var ce=eo(z);ne.top+=ce,ne.bottom+=ce}if(te=="line")return ne;te||(te="local");var ye=En(z);if(te=="local"?ye+=Aa(x.display):ye-=x.display.viewOffset,te=="page"||te=="window"){var Le=x.display.lineSpace.getBoundingClientRect();ye+=Le.top+(te=="window"?0:ao());var Ne=Le.left+(te=="window"?0:ro());ne.left+=Ne,ne.right+=Ne}return ne.top+=ye,ne.bottom+=ye,ne}function wo(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=ro(),ie-=ao();else if(ne=="local"||!ne){var ce=x.display.sizer.getBoundingClientRect();te+=ce.left,ie+=ce.top}var ye=x.display.lineSpace.getBoundingClientRect();return{left:te-ye.left,top:ie-ye.top}}function Ho(x,z,ne,te,ie){return te||(te=rn(x.doc,z.line)),oo(x,te,ko(x,te,z.ch,ie),ne)}function to(x,z,ne,te,ie,ce){te=te||rn(x.doc,z.line),ie||(ie=Ta(x,te));function ye(Jn,gr){var Hr=Ui(x,ie,Jn,gr?"right":"left",ce);return gr?Hr.left=Hr.right:Hr.right=Hr.left,oo(x,te,Hr,ne)}var Le=cr(te,x.doc.direction),Ne=z.ch,$e=z.sticky;if(Ne>=te.text.length?(Ne=te.text.length,$e="before"):Ne<=0&&(Ne=0,$e="after"),!Le)return ye($e=="before"?Ne-1:Ne,$e=="before");function wt(Jn,gr,Hr){var ti=Le[gr],fi=ti.level==1;return ye(Hr?Jn-1:Jn,fi!=Hr)}var Nt=Gt(Le,Ne,$e),gn=en,un=wt(Ne,Nt,$e=="before");return gn!=null&&(un.other=wt(Ne,gn,$e!="before")),un}function Co(x,z){var ne=0;z=_r(x.doc,z),x.options.lineWrapping||(ne=es(x.display)*z.ch);var te=rn(x.doc,z.line),ie=En(te)+Aa(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function Jo(x,z,ne,te,ie){var ce=_n(x,z,ne);return ce.xRel=ie,te&&(ce.outside=te),ce}function Xo(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return Jo(te.first,0,null,-1,-1);var ie=mr(te,ne),ce=te.first+te.size-1;if(ie>ce)return Jo(te.first+te.size-1,rn(te,ce).text.length,null,1,1);z<0&&(z=0);for(var ye=rn(te,ie);;){var Le=ji(x,ye,ie,z,ne),Ne=tt(ye,Le.ch+(Le.xRel>0||Le.outside>0?1:0));if(!Ne)return Le;var $e=Ne.find(1);if($e.line==ie)return $e;ye=rn(te,ie=$e.line)}}function as(x,z,ne,te){te-=eo(z);var ie=z.text.length,ce=zt(function(ye){return Ui(x,ne,ye-1).bottom<=te},ie,0);return ie=zt(function(ye){return Ui(x,ne,ye).top>te},ce,ie),{begin:ce,end:ie}}function No(x,z,ne,te){ne||(ne=Ta(x,z));var ie=oo(x,z,Ui(x,ne,te),"line").top;return as(x,z,ne,ie)}function vo(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function ji(x,z,ne,te,ie){ie-=En(z);var ce=Ta(x,z),ye=eo(z),Le=0,Ne=z.text.length,$e=!0,wt=cr(z,x.doc.direction);if(wt){var Nt=(x.options.lineWrapping?Qa:ua)(x,z,ne,ce,wt,te,ie);$e=Nt.level!=1,Le=$e?Nt.from:Nt.to-1,Ne=$e?Nt.to:Nt.from-1}var gn=null,un=null,Jn=zt(function(da){var ya=Ui(x,ce,da);return ya.top+=ye,ya.bottom+=ye,vo(ya,te,ie,!1)?(ya.top<=ie&&ya.left<=te&&(gn=da,un=ya),!0):!1},Le,Ne),gr,Hr,ti=!1;if(un){var fi=te-un.left<un.right-te,Xr=fi==$e;Jn=gn+(Xr?0:1),Hr=Xr?"after":"before",gr=fi?un.left:un.right}else{!$e&&(Jn==Ne||Jn==Le)&&Jn++,Hr=Jn==0?"after":Jn==z.text.length?"before":Ui(x,ce,Jn-($e?1:0)).bottom+ye<=ie==$e?"after":"before";var xi=to(x,_n(ne,Jn,Hr),"line",z,ce);gr=xi.left,ti=ie<xi.top?-1:ie>=xi.bottom?1:0}return Jn=Pt(z.text,Jn,1),Jo(ne,Jn,Hr,ti,te-gr)}function ua(x,z,ne,te,ie,ce,ye){var Le=zt(function(Nt){var gn=ie[Nt],un=gn.level!=1;return vo(to(x,_n(ne,un?gn.to:gn.from,un?"before":"after"),"line",z,te),ce,ye,!0)},0,ie.length-1),Ne=ie[Le];if(Le>0){var $e=Ne.level!=1,wt=to(x,_n(ne,$e?Ne.from:Ne.to,$e?"after":"before"),"line",z,te);vo(wt,ce,ye,!0)&&wt.top>ye&&(Ne=ie[Le-1])}return Ne}function Qa(x,z,ne,te,ie,ce,ye){var Le=as(x,z,te,ye),Ne=Le.begin,$e=Le.end;/\s/.test(z.text.charAt($e-1))&&$e--;for(var wt=null,Nt=null,gn=0;gn<ie.length;gn++){var un=ie[gn];if(!(un.from>=$e||un.to<=Ne)){var Jn=un.level!=1,gr=Ui(x,te,Jn?Math.min($e,un.to)-1:Math.max(Ne,un.from)).right,Hr=gr<ce?ce-gr+1e9:gr-ce;(!wt||Nt>Hr)&&(wt=un,Nt=Hr)}}return wt||(wt=ie[ie.length-1]),wt.from<Ne&&(wt={from:Ne,to:wt.to,level:wt.level}),wt.to>$e&&(wt={from:wt.from,to:$e,level:wt.level}),wt}var ho;function Fo(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(ho==null){ho=pt("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)ho.appendChild(document.createTextNode("x")),ho.appendChild(pt("br"));ho.appendChild(document.createTextNode("x"))}vt(x.measure,ho);var ne=ho.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Ge(x.measure),ne||1}function es(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=pt("span","xxxxxxxxxx"),ne=pt("pre",[z],"CodeMirror-line-like");vt(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function ms(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ce=z.gutters.firstChild,ye=0;ce;ce=ce.nextSibling,++ye){var Le=x.display.gutterSpecs[ye].className;ne[Le]=ce.offsetLeft+ce.clientLeft+ie,te[Le]=ce.clientWidth}return{fixedPos:Rs(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Rs(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Fs(x){var z=Fo(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/es(x.display)-3);return function(ie){if(yr(x.doc,ie))return 0;var ce=0;if(ie.widgets)for(var ye=0;ye<ie.widgets.length;ye++)ie.widgets[ye].height&&(ce+=ie.widgets[ye].height);return ne?ce+(Math.ceil(ie.text.length/te)||1)*z:ce+z}}function os(x){var z=x.doc,ne=Fs(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&rr(te,ie)})}function Ts(x,z,ne,te){var ie=x.display;if(!ne&&Ma(z).getAttribute("cm-not-content")=="true")return null;var ce,ye,Le=ie.lineSpace.getBoundingClientRect();try{ce=z.clientX-Le.left,ye=z.clientY-Le.top}catch(Nt){return null}var Ne=Xo(x,ce,ye),$e;if(te&&Ne.xRel>0&&($e=rn(x.doc,Ne.line).text).length==Ne.ch){var wt=Xe($e,$e.length,x.options.tabSize)-$e.length;Ne=_n(Ne.line,Math.max(0,Math.round((ce-ia(x.display).left)/es(x.display))-wt))}return Ne}function Fa(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 Ni(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)Vi&&mn(x.doc,z)<ie.viewTo&&Eo(x);else if(ne<=ie.viewFrom)Vi&&Yn(x.doc,ne+te)>ie.viewFrom?Eo(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)Eo(x);else if(z<=ie.viewFrom){var ce=Ie(x,ne,ne+te,1);ce?(ie.view=ie.view.slice(ce.index),ie.viewFrom=ce.lineN,ie.viewTo+=te):Eo(x)}else if(ne>=ie.viewTo){var ye=Ie(x,z,z,-1);ye?(ie.view=ie.view.slice(0,ye.index),ie.viewTo=ye.lineN):Eo(x)}else{var Le=Ie(x,z,z,-1),Ne=Ie(x,ne,ne+te,1);Le&&Ne?(ie.view=ie.view.slice(0,Le.index).concat(zn(x,Le.lineN,Ne.lineN)).concat(ie.view.slice(Ne.index)),ie.viewTo+=te):Eo(x)}var $e=ie.externalMeasured;$e&&(ne<$e.lineN?$e.lineN+=te:z<$e.lineN+$e.size&&(ie.externalMeasured=null))}function Do(x,z,ne){x.curOp.viewChanged=!0;var te=x.display,ie=x.display.externalMeasured;if(ie&&z>=ie.lineN&&z<ie.lineN+ie.size&&(te.externalMeasured=null),!(z<te.viewFrom||z>=te.viewTo)){var ce=te.view[Fa(x,z)];if(ce.node!=null){var ye=ce.changes||(ce.changes=[]);Lt(ye,ne)==-1&&ye.push(ne)}}}function Eo(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function Ie(x,z,ne,te){var ie=Fa(x,z),ce,ye=x.display.view;if(!Vi||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var Le=x.display.viewFrom,Ne=0;Ne<ie;Ne++)Le+=ye[Ne].size;if(Le!=z){if(te>0){if(ie==ye.length-1)return null;ce=Le+ye[ie].size-z,ie++}else ce=Le-z;z+=ce,ne+=ce}for(;mn(x.doc,ne)!=ne;){if(ie==(te<0?0:ye.length-1))return null;ne+=te*ye[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function Re(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=zn(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=zn(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(Fa(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(zn(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,Fa(x,ne)))),te.viewTo=ne}function St(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 xt(x){x.display.input.showSelection(x.display.input.prepareSelection())}function Jt(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ce=te.selection=document.createDocumentFragment(),ye=0;ye<ne.sel.ranges.length;ye++)if(!(!z&&ye==ne.sel.primIndex)){var Le=ne.sel.ranges[ye];if(!(Le.from().line>=x.display.viewTo||Le.to().line<x.display.viewFrom)){var Ne=Le.empty();(Ne||x.options.showCursorWhenSelecting)&&Ht(x,Le.head,ie),Ne||fn(x,Le,ce)}}return te}function Ht(x,z,ne){var te=to(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(pt("div","\xA0","CodeMirror-cursor"));if(ie.style.left=te.left+"px",ie.style.top=te.top+"px",ie.style.height=Math.max(0,te.bottom-te.top)*x.options.cursorHeight+"px",te.other){var ce=ne.appendChild(pt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ce.style.display="",ce.style.left=te.other.left+"px",ce.style.top=te.other.top+"px",ce.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function Rt(x,z){return x.top-z.top||x.left-z.left}function fn(x,z,ne){var te=x.display,ie=x.doc,ce=document.createDocumentFragment(),ye=ia(x.display),Le=ye.left,Ne=Math.max(te.sizerWidth,Ci(x)-te.sizer.offsetLeft)-ye.right,$e=ie.direction=="ltr";function wt(Xr,xi,da,ya){xi<0&&(xi=0),xi=Math.round(xi),ya=Math.round(ya),ce.appendChild(pt("div",null,"CodeMirror-selected","position: absolute; left: "+Xr+`px;
top: `+xi+"px; width: "+(da==null?Ne-Xr:da)+`px;
height: `+(ya-xi)+"px"))}function Nt(Xr,xi,da){var ya=rn(ie,Xr),xo=ya.text.length,fs,nl;function Ls(Xs,Cl){return Ho(x,_n(Xr,Xs),"div",ya,Cl)}function Sl(Xs,Cl,Xa){var Os=No(x,ya,null,Xs),As=Cl=="ltr"==(Xa=="after")?"left":"right",Bs=Xa=="after"?Os.begin:Os.end-(/\s/.test(ya.text.charAt(Os.end-1))?2:1);return Ls(Bs,As)[As]}var wl=cr(ya,ie.direction);return Zt(wl,xi||0,da==null?xo:da,function(Xs,Cl,Xa,Os){var As=Xa=="ltr",Bs=Ls(Xs,As?"left":"right"),Ws=Ls(Cl-1,As?"right":"left"),Wu=xi==null&&Xs==0,_l=da==null&&Cl==xo,ll=Os==0,Zo=!wl||Os==wl.length-1;if(Ws.top-Bs.top<=3){var Js=($e?Wu:_l)&&ll,Gc=($e?_l:Wu)&&Zo,hu=Js?Le:(As?Bs:Ws).left,_u=Gc?Ne:(As?Ws:Bs).right;wt(hu,Bs.top,_u-hu,Bs.bottom)}else{var Ql,Ys,Zu,ul;As?(Ql=$e&&Wu&&ll?Le:Bs.left,Ys=$e?Ne:Sl(Xs,Xa,"before"),Zu=$e?Le:Sl(Cl,Xa,"after"),ul=$e&&_l&&Zo?Ne:Ws.right):(Ql=$e?Sl(Xs,Xa,"before"):Le,Ys=!$e&&Wu&&ll?Ne:Bs.right,Zu=!$e&&_l&&Zo?Le:Ws.left,ul=$e?Sl(Cl,Xa,"after"):Ne),wt(Ql,Bs.top,Ys-Ql,Bs.bottom),Bs.bottom<Ws.top&&wt(Le,Bs.bottom,null,Ws.top),wt(Zu,Ws.top,ul-Zu,Ws.bottom)}(!fs||Rt(Bs,fs)<0)&&(fs=Bs),Rt(Ws,fs)<0&&(fs=Ws),(!nl||Rt(Bs,nl)<0)&&(nl=Bs),Rt(Ws,nl)<0&&(nl=Ws)}),{start:fs,end:nl}}var gn=z.from(),un=z.to();if(gn.line==un.line)Nt(gn.line,gn.ch,un.ch);else{var Jn=rn(ie,gn.line),gr=rn(ie,un.line),Hr=Ct(Jn)==Ct(gr),ti=Nt(gn.line,gn.ch,Hr?Jn.text.length+1:null).end,fi=Nt(un.line,Hr?0:null,un.ch).start;Hr&&(ti.top<fi.top-2?(wt(ti.right,ti.top,null,ti.bottom),wt(Le,fi.top,fi.left,fi.bottom)):wt(ti.right,ti.top,fi.left-ti.right,ti.bottom)),ti.bottom<fi.top&&wt(Le,ti.bottom,null,fi.top)}ne.appendChild(ce)}function hn(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()||zr(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Mn(x){x.state.focused||(x.display.input.focus(),er(x))}function ur(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,zr(x))},100)}function er(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(Rn(x,"focus",x,z),x.state.focused=!0,st(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),Ee&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),hn(x))}function zr(x,z){x.state.delayingBlurEvent||(x.state.focused&&(Rn(x,"blur",x,z),x.state.focused=!1,Ke(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function sr(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ce=x.options.lineWrapping,ye=void 0,Le=0;if(!ie.hidden){if(ge&&Me<8){var Ne=ie.node.offsetTop+ie.node.offsetHeight;ye=Ne-ne,ne=Ne}else{var $e=ie.node.getBoundingClientRect();ye=$e.bottom-$e.top,!ce&&ie.text.firstChild&&(Le=ie.text.firstChild.getBoundingClientRect().right-$e.left-1)}var wt=ie.line.height-ye;if((wt>.005||wt<-.005)&&(rr(ie.line,ye),Mr(ie.line),ie.rest))for(var Nt=0;Nt<ie.rest.length;Nt++)Mr(ie.rest[Nt]);if(Le>x.display.sizerWidth){var gn=Math.ceil(Le/es(x.display));gn>x.display.maxLineLength&&(x.display.maxLineLength=gn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function Mr(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 hr(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-Aa(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ce=mr(z,te),ye=mr(z,ie);if(ne&&ne.ensure){var Le=ne.ensure.from.line,Ne=ne.ensure.to.line;Le<ce?(ce=Le,ye=mr(z,En(rn(z,Le))+x.wrapper.clientHeight)):Math.min(Ne,z.lastLine())>=ye&&(ce=mr(z,En(rn(z,Ne))-x.wrapper.clientHeight),ye=Ne)}return{from:ce,to:Math.max(ye,ce+1)}}function Kr(x,z){if(!Tr(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&&!dt){var ce=pt("div","\u200B",null,`position: absolute;
top: `+(z.top-ne.viewOffset-Aa(x.display))+`px;
height: `+(z.bottom-z.top+ni(x)+ne.barHeight)+`px;
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(ce),ce.scrollIntoView(ie),x.display.lineSpace.removeChild(ce)}}}function si(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?_n(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?_n(z.line,z.ch+1,"before"):z);for(var ce=0;ce<5;ce++){var ye=!1,Le=to(x,z),Ne=!ne||ne==z?Le:to(x,ne);ie={left:Math.min(Le.left,Ne.left),top:Math.min(Le.top,Ne.top)-te,right:Math.max(Le.left,Ne.left),bottom:Math.max(Le.bottom,Ne.bottom)+te};var $e=Ei(x,ie),wt=x.doc.scrollTop,Nt=x.doc.scrollLeft;if($e.scrollTop!=null&&(Dr(x,$e.scrollTop),Math.abs(x.doc.scrollTop-wt)>1&&(ye=!0)),$e.scrollLeft!=null&&(Hi(x,$e.scrollLeft),Math.abs(x.doc.scrollLeft-Nt)>1&&(ye=!0)),!ye)break}return ie}function yi(x,z){var ne=Ei(x,z);ne.scrollTop!=null&&Dr(x,ne.scrollTop),ne.scrollLeft!=null&&Hi(x,ne.scrollLeft)}function Ei(x,z){var ne=x.display,te=Fo(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ce=Xi(x),ye={};z.bottom-z.top>ce&&(z.bottom=z.top+ce);var Le=x.doc.height+Oi(ne),Ne=z.top<te,$e=z.bottom>Le-te;if(z.top<ie)ye.scrollTop=Ne?0:z.top;else if(z.bottom>ie+ce){var wt=Math.min(z.top,($e?Le:z.bottom)-ce);wt!=ie&&(ye.scrollTop=wt)}var Nt=x.options.fixedGutter?0:ne.gutters.offsetWidth,gn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Nt,un=Ci(x)-ne.gutters.offsetWidth,Jn=z.right-z.left>un;return Jn&&(z.right=z.left+un),z.left<10?ye.scrollLeft=0:z.left<gn?ye.scrollLeft=Math.max(0,z.left+Nt-(Jn?0:10)):z.right>un+gn-3&&(ye.scrollLeft=z.right+(Jn?0:10)-un),ye}function pi(x,z){z!=null&&(Ri(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function Ai(x){Ri(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function ei(x,z,ne){(z!=null||ne!=null)&&Ri(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Ti(x,z){Ri(x),x.curOp.scrollToPos=z}function Ri(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=Co(x,z.from),te=Co(x,z.to);wr(x,ne,te,z.margin)}}function wr(x,z,ne,te){var ie=Ei(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});ei(x,ie.scrollLeft,ie.scrollTop)}function Dr(x,z){Math.abs(x.doc.scrollTop-z)<2||(pe||Ro(x,{top:z}),Ur(x,z,!0),pe&&Ro(x),pa(x,100))}function Ur(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 Hi(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,ns(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function Di(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+Oi(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+ni(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var Bi=function(x,z,ne){this.cm=ne;var te=this.vert=pt("div",[pt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=pt("div",[pt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),bn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),bn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ge&&Me<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bi.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ne=x.scrollHeight>x.clientHeight+1,te=x.nativeBarWidth;if(ne){this.vert.style.display="block",this.vert.style.bottom=z?te+"px":"0";var ie=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ne?te+"px":"0",this.horiz.style.left=x.barLeft+"px";var ce=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+ce)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(te==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ne?te:0,bottom:z?te:0}},Bi.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var x=_e&&!Pe?"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},Bi.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),ce=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);ce!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},Bi.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function qi(x,z){z||(z=Di(x));var ne=x.display.barWidth,te=x.display.barHeight;aa(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&sr(x),aa(x,Di(x)),ne=x.display.barWidth,te=x.display.barHeight}function aa(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 ba={native:Bi,null:Ii};function Da(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Ke(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new ba[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),bn(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"?Hi(x,z):Dr(x,z)},x),x.display.scrollbars.addClass&&st(x.display.wrapper,x.display.scrollbars.addClass)}var Wo=0;function $a(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:++Wo},pn(x.curOp)}function Lo(x){var z=x.curOp;z&&Wn(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;vs(ne)})}function vs(x){for(var z=x.ops,ne=0;ne<z.length;ne++)_a(z[ne]);for(var te=0;te<z.length;te++)mi(z[te]);for(var ie=0;ie<z.length;ie++)vi(z[ie]);for(var ce=0;ce<z.length;ce++)Pi(z[ce]);for(var ye=0;ye<z.length;ye++)ui(z[ye])}function _a(x){var z=x.cm,ne=z.display;Ha(z),x.updateMaxLine&&In(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 Fi(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function mi(x){x.updatedDisplay=x.mustUpdate&&$o(x.cm,x.update)}function vi(x){var z=x.cm,ne=z.display;x.updatedDisplay&&sr(z),x.barMeasure=Di(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=ko(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+ni(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-Ci(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Pi(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&Hi(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==it();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&qi(z,x.barMeasure),x.updatedDisplay&&$s(z,x.barMeasure),x.selectionChanged&&hn(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Mn(x.cm)}function ui(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&ts(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Ur(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&Hi(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=si(z,_r(te,x.scrollToPos.from),_r(te,x.scrollToPos.to),x.scrollToPos.margin);Kr(z,ie)}var ce=x.maybeHiddenMarkers,ye=x.maybeUnhiddenMarkers;if(ce)for(var Le=0;Le<ce.length;++Le)ce[Le].lines.length||Rn(ce[Le],"hide");if(ye)for(var Ne=0;Ne<ye.length;++Ne)ye[Ne].lines.length&&Rn(ye[Ne],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&Rn(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function Or(x,z){if(x.curOp)return z();$a(x);try{return z()}finally{Lo(x)}}function gi(x,z){return function(){if(x.curOp)return z.apply(x,arguments);$a(x);try{return z.apply(x,arguments)}finally{Lo(x)}}}function ci(x){return function(){if(this.curOp)return x.apply(this,arguments);$a(this);try{return x.apply(this,arguments)}finally{Lo(this)}}}function Gi(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);$a(z);try{return x.apply(this,arguments)}finally{Lo(z)}}}function pa(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,Ut(Sa,x))}function Sa(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=ka(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(ce){if(te.line>=x.display.viewFrom){var ye=ce.styles,Le=ce.text.length>x.options.maxHighlightLength?_t(z.mode,te.state):null,Ne=uo(x,ce,te,!0);Le&&(te.state=Le),ce.styles=Ne.styles;var $e=ce.styleClasses,wt=Ne.classes;wt?ce.styleClasses=wt:$e&&(ce.styleClasses=null);for(var Nt=!ye||ye.length!=ce.styles.length||$e!=wt&&(!$e||!wt||$e.bgClass!=wt.bgClass||$e.textClass!=wt.textClass),gn=0;!Nt&&gn<ye.length;++gn)Nt=ye[gn]!=ce.styles[gn];Nt&&ie.push(te.line),ce.stateAfter=te.save(),te.nextLine()}else ce.text.length<=x.options.maxHighlightLength&&co(x,ce.text,te),ce.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return pa(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&Or(x,function(){for(var ce=0;ce<ie.length;ce++)Do(x,ie[ce],"text")})}}var Fi=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=hr(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=Ci(x),this.force=ne,this.dims=ms(x),this.events=[]};Fi.prototype.signal=function(x,z){Wi(x,z)&&this.events.push(arguments)},Fi.prototype.finish=function(){for(var x=0;x<this.events.length;x++)Rn.apply(null,this.events[x])};function Ha(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=ni(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=ni(x)+"px",z.scrollbarsClipped=!0)}function Mo(x){if(x.hasFocus())return null;var z=it();if(!z||!kt(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&kt(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function go(x){if(!(!x||!x.activeElt||x.activeElt==it())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&kt(document.body,x.anchorNode)&&kt(document.body,x.focusNode))){var z=window.getSelection(),ne=document.createRange();ne.setEnd(x.anchorNode,x.anchorOffset),ne.collapse(!1),z.removeAllRanges(),z.addRange(ne),z.extend(x.focusNode,x.focusOffset)}}function $o(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return Eo(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&&St(x)==0)return!1;zo(x)&&(Eo(x),z.dims=ms(x));var ie=te.first+te.size,ce=Math.max(z.visible.from-x.options.viewportMargin,te.first),ye=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<ce&&ce-ne.viewFrom<20&&(ce=Math.max(te.first,ne.viewFrom)),ne.viewTo>ye&&ne.viewTo-ye<20&&(ye=Math.min(ie,ne.viewTo)),Vi&&(ce=mn(x.doc,ce),ye=Yn(x.doc,ye));var Le=ce!=ne.viewFrom||ye!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;Re(x,ce,ye),ne.viewOffset=En(rn(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Ne=St(x);if(!Le&&Ne==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var $e=Mo(x);return Ne>4&&(ne.lineDiv.style.display="none"),ks(x,ne.updateLineNumbers,z.dims),Ne>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,go($e),Ge(ne.cursorDiv),Ge(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Le&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,pa(x,400)),ne.updateLineNumbers=null,!0}function ts(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==Ci(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+Oi(x.display)-Xi(x),ne.top)}),z.visible=hr(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=hr(x.display,x.doc,ne));if(!$o(x,z))break;sr(x);var ie=Di(x);xt(x),qi(x,ie),$s(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 Ro(x,z){var ne=new Fi(x,z);if($o(x,ne)){sr(x),ts(x,ne);var te=Di(x);xt(x),qi(x,te),$s(x,te),ne.finish()}}function ks(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ce=te.lineDiv,ye=ce.firstChild;function Le(Jn){var gr=Jn.nextSibling;return Ee&&_e&&x.display.currentWheelTarget==Jn?Jn.style.display="none":Jn.parentNode.removeChild(Jn),gr}for(var Ne=te.view,$e=te.viewFrom,wt=0;wt<Ne.length;wt++){var Nt=Ne[wt];if(!Nt.hidden)if(!Nt.node||Nt.node.parentNode!=ce){var gn=wi(x,Nt,$e,ne);ce.insertBefore(gn,ye)}else{for(;ye!=Nt.node;)ye=Le(ye);var un=ie&&z!=null&&z<=$e&&Nt.lineNumber;Nt.changes&&(Lt(Nt.changes,"gutter")>-1&&(un=!1),Qr(x,Nt,$e,ne)),un&&(Ge(Nt.lineNumber),Nt.lineNumber.appendChild(document.createTextNode(Yr(x.options,$e)))),ye=Nt.node.nextSibling}$e+=Nt.size}for(;ye;)ye=Le(ye)}function xs(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function $s(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+ni(x)+"px"}function ns(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Rs(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ce=te+"px",ye=0;ye<ne.length;ye++)if(!ne[ye].hidden){x.options.fixedGutter&&(ne[ye].gutter&&(ne[ye].gutter.style.left=ce),ne[ye].gutterBackground&&(ne[ye].gutterBackground.style.left=ce));var Le=ne[ye].alignable;if(Le)for(var Ne=0;Ne<Le.length;Ne++)Le[Ne].style.left=ce}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function zo(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=Yr(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(pt("div",[pt("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ce=ie.firstChild.offsetWidth,ye=ie.offsetWidth-ce;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ce,te.lineGutter.offsetWidth-ye)+1,te.lineNumWidth=te.lineNumInnerWidth+ye,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",xs(x.display),!0}return!1}function Ss(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ce=x[ie],ye=null;if(typeof ce!="string"&&(ye=ce.style,ce=ce.className),ce=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ce,style:ye})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function ss(x){var z=x.gutters,ne=x.gutterSpecs;Ge(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ce=ie.className,ye=ie.style,Le=z.appendChild(pt("div",null,"CodeMirror-gutter "+ce));ye&&(Le.style.cssText=ye),ce=="CodeMirror-linenumbers"&&(x.lineGutter=Le,Le.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",xs(x)}function Qo(x){ss(x.display),Ni(x),ns(x)}function Is(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=pt("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=pt("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=Ue("div",null,"CodeMirror-code"),ie.selectionDiv=pt("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=pt("div",null,"CodeMirror-cursors"),ie.measure=pt("div",null,"CodeMirror-measure"),ie.lineMeasure=pt("div",null,"CodeMirror-measure"),ie.lineSpace=Ue("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ce=Ue("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=pt("div",[ce],null,"position: relative"),ie.sizer=pt("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=pt("div",null,null,"position: absolute; height: "+cn+"px; width: 1px;"),ie.gutters=pt("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=pt("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=pt("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),ge&&Me<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Ee&&!(pe&&nt)&&(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=Ss(te.gutters,te.lineNumbers),ss(ie),ne.init(ie)}var Es=0,Yo=null;ge?Yo=-.53:pe?Yo=15:he?Yo=-.7:Je&&(Yo=-1/3);function Us(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 Dl(x){var z=Us(x);return z.x*=Yo,z.y*=Yo,z}function yl(x,z){var ne=Us(z),te=ne.x,ie=ne.y,ce=x.display,ye=ce.scroller,Le=ye.scrollWidth>ye.clientWidth,Ne=ye.scrollHeight>ye.clientHeight;if(te&&Le||ie&&Ne){if(ie&&_e&&Ee){e:for(var $e=z.target,wt=ce.view;$e!=ye;$e=$e.parentNode)for(var Nt=0;Nt<wt.length;Nt++)if(wt[Nt].node==$e){x.display.currentWheelTarget=$e;break e}}if(te&&!pe&&!ke&&Yo!=null){ie&&Ne&&Dr(x,Math.max(0,ye.scrollTop+ie*Yo)),Hi(x,Math.max(0,ye.scrollLeft+te*Yo)),(!ie||ie&&Ne)&&Mi(z),ce.wheelStartX=null;return}if(ie&&Yo!=null){var gn=ie*Yo,un=x.doc.scrollTop,Jn=un+ce.wrapper.clientHeight;gn<0?un=Math.max(0,un+gn-50):Jn=Math.min(x.doc.height,Jn+gn+50),Ro(x,{top:un,bottom:Jn})}Es<20&&(ce.wheelStartX==null?(ce.wheelStartX=ye.scrollLeft,ce.wheelStartY=ye.scrollTop,ce.wheelDX=te,ce.wheelDY=ie,setTimeout(function(){if(ce.wheelStartX!=null){var gr=ye.scrollLeft-ce.wheelStartX,Hr=ye.scrollTop-ce.wheelStartY,ti=Hr&&ce.wheelDY&&Hr/ce.wheelDY||gr&&ce.wheelDX&&gr/ce.wheelDX;ce.wheelStartX=ce.wheelStartY=null,ti&&(Yo=(Yo*Es+ti)/(Es+1),++Es)}},200)):(ce.wheelDX+=te,ce.wheelDY+=ie))}}var ls=function(x,z){this.ranges=x,this.primIndex=z};ls.prototype.primary=function(){return this.ranges[this.primIndex]},ls.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(!na(ne.anchor,te.anchor)||!na(ne.head,te.head))return!1}return!0},ls.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new bo(ca(this.ranges[z].anchor),ca(this.ranges[z].head));return new ls(x,this.primIndex)},ls.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},ls.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(Qn(z,te.from())>=0&&Qn(x,te.to())<=0)return ne}return-1};var bo=function(x,z){this.anchor=x,this.head=z};bo.prototype.from=function(){return ii(this.anchor,this.head)},bo.prototype.to=function(){return _i(this.anchor,this.head)},bo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function us(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(gn,un){return Qn(gn.from(),un.from())}),ne=Lt(z,ie);for(var ce=1;ce<z.length;ce++){var ye=z[ce],Le=z[ce-1],Ne=Qn(Le.to(),ye.from());if(te&&!ye.empty()?Ne>0:Ne>=0){var $e=ii(Le.from(),ye.from()),wt=_i(Le.to(),ye.to()),Nt=Le.empty()?ye.from()==ye.head:Le.from()==Le.head;ce<=ne&&--ne,z.splice(--ce,2,new bo(Nt?wt:$e,Nt?$e:wt))}}return new ls(z,ne)}function js(x,z){return new ls([new bo(x,z||x)],0)}function el(x){return x.text?_n(x.from.line+x.text.length-1,jt(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function qo(x,z){if(Qn(x,z.from)<0)return x;if(Qn(x,z.to)<=0)return el(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+=el(z).ch-z.to.ch),_n(ne,te)}function Oo(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new bo(qo(ie.anchor,z),qo(ie.head,z)))}return us(x.cm,ne,x.sel.primIndex)}function Uo(x,z,ne){return x.line==z.line?_n(ne.line,x.ch-z.ch+ne.ch):_n(ne.line+(x.line-z.line),x.ch)}function zs(x,z,ne){for(var te=[],ie=_n(x.first,0),ce=ie,ye=0;ye<z.length;ye++){var Le=z[ye],Ne=Uo(Le.from,ie,ce),$e=Uo(el(Le),ie,ce);if(ie=Le.to,ce=$e,ne=="around"){var wt=x.sel.ranges[ye],Nt=Qn(wt.head,wt.anchor)<0;te[ye]=new bo(Nt?$e:Ne,Nt?Ne:$e)}else te[ye]=new bo(Ne,Ne)}return new ls(te,x.sel.primIndex)}function Ms(x){x.doc.mode=Ft(x.options,x.doc.modeOption),Ks(x)}function Ks(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,pa(x,100),x.state.modeGen++,x.curOp&&Ni(x)}function Ia(x,z){return z.from.ch==0&&z.to.ch==0&&jt(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Br(x,z,ne,te){function ie(fi){return ne?ne[fi]:null}function ce(fi,Xr,xi){pr(fi,Xr,xi,te),Hn(fi,"change",fi,z)}function ye(fi,Xr){for(var xi=[],da=fi;da<Xr;++da)xi.push(new Bn($e[da],ie(da),te));return xi}var Le=z.from,Ne=z.to,$e=z.text,wt=rn(x,Le.line),Nt=rn(x,Ne.line),gn=jt($e),un=ie($e.length-1),Jn=Ne.line-Le.line;if(z.full)x.insert(0,ye(0,$e.length)),x.remove($e.length,x.size-$e.length);else if(Ia(x,z)){var gr=ye(0,$e.length-1);ce(Nt,Nt.text,un),Jn&&x.remove(Le.line,Jn),gr.length&&x.insert(Le.line,gr)}else if(wt==Nt)if($e.length==1)ce(wt,wt.text.slice(0,Le.ch)+gn+wt.text.slice(Ne.ch),un);else{var Hr=ye(1,$e.length-1);Hr.push(new Bn(gn+wt.text.slice(Ne.ch),un,te)),ce(wt,wt.text.slice(0,Le.ch)+$e[0],ie(0)),x.insert(Le.line+1,Hr)}else if($e.length==1)ce(wt,wt.text.slice(0,Le.ch)+$e[0]+Nt.text.slice(Ne.ch),ie(0)),x.remove(Le.line+1,Jn);else{ce(wt,wt.text.slice(0,Le.ch)+$e[0],ie(0)),ce(Nt,gn+Nt.text.slice(Ne.ch),un);var ti=ye(1,$e.length-1);Jn>1&&x.remove(Le.line+1,Jn-1),x.insert(Le.line+1,ti)}Hn(x,"change",x,z)}function di(x,z,ne){function te(ie,ce,ye){if(ie.linked)for(var Le=0;Le<ie.linked.length;++Le){var Ne=ie.linked[Le];if(Ne.doc!=ce){var $e=ye&&Ne.sharedHist;ne&&!$e||(z(Ne.doc,$e),te(Ne.doc,ie,$e))}}}te(x,null,!0)}function $i(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,os(x),Ms(x),ma(x),x.options.lineWrapping||In(x),x.options.mode=z.modeOption,Ni(x)}function ma(x){(x.doc.direction=="rtl"?st:Ke)(x.display.lineDiv,"CodeMirror-rtl")}function jo(x){Or(x,function(){ma(x),Ni(x)})}function Go(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 vl(x,z){var ne={from:ca(z.from),to:el(z),text:Un(x,z.from,z.to)};return $u(x,ne,z.from.line,z.to.line+1),di(x,function(te){return $u(te,ne,z.from.line,z.to.line+1)},!0),ne}function qs(x){for(;x.length;){var z=jt(x);if(z.ranges)x.pop();else break}}function Ll(x,z){if(z)return qs(x.done),jt(x.done);if(x.done.length&&!jt(x.done).ranges)return jt(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),jt(x.done)}function Ps(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ce=+new Date,ye,Le;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>ce-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(ye=Ll(ie,ie.lastOp==te)))Le=jt(ye.changes),Qn(z.from,z.to)==0&&Qn(z.from,Le.to)==0?Le.to=el(z):ye.changes.push(vl(x,z));else{var Ne=jt(ie.done);for((!Ne||!Ne.ranges)&&au(x.sel,ie.done),ye={changes:[vl(x,z)],generation:ie.generation},ie.done.push(ye);ie.done.length>ie.undoDepth;)ie.done.shift(),ie.done[0].ranges||ie.done.shift()}ie.done.push(ne),ie.generation=++ie.maxGeneration,ie.lastModTime=ie.lastSelTime=ce,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,Le||Rn(x,"historyAdded")}function Al(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 iu(x,z,ne,te){var ie=x.history,ce=te&&te.origin;ne==ie.lastSelOp||ce&&ie.lastSelOrigin==ce&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==ce||Al(x,ce,jt(ie.done),z))?ie.done[ie.done.length-1]=z:au(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ce,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&qs(ie.undone)}function au(x,z){var ne=jt(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function $u(x,z,ne,te){var ie=z["spans_"+x.id],ce=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(ye){ye.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ce]=ye.markedSpans),++ce})}function Ol(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 Bl(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(Ol(ne[ie]));return te}function pc(x,z){var ne=Bl(x,z),te=li(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ce=ne[ie],ye=te[ie];if(ce&&ye)e:for(var Le=0;Le<ye.length;++Le){for(var Ne=ye[Le],$e=0;$e<ce.length;++$e)if(ce[$e].marker==Ne.marker)continue e;ce.push(Ne)}else ye&&(ne[ie]=ye)}return ne}function El(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.ranges){te.push(ne?ls.prototype.deepCopy.call(ce):ce);continue}var ye=ce.changes,Le=[];te.push({changes:Le});for(var Ne=0;Ne<ye.length;++Ne){var $e=ye[Ne],wt=void 0;if(Le.push({from:$e.from,to:$e.to,text:$e.text}),z)for(var Nt in $e)(wt=Nt.match(/^spans_(\d+)$/))&&Lt(z,Number(wt[1]))>-1&&(jt(Le)[Nt]=$e[Nt],delete $e[Nt])}}return te}function Xu(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ce=Qn(z,ie)<0;ce!=Qn(ne,ie)<0?(ie=z,z=ne):ce!=Qn(z,ne)<0&&(z=ne)}return new bo(ie,z)}else return new bo(ne||z,z)}function ou(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),Ds(x,new ls([Xu(x.sel.primary(),z,ne,ie)],0),te)}function bi(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),ce=0;ce<x.sel.ranges.length;ce++)te[ce]=Xu(x.sel.ranges[ce],z[ce],null,ie);var ye=us(x.cm,te,x.sel.primIndex);Ds(x,ye,ne)}function xl(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,Ds(x,us(x.cm,ie,x.sel.primIndex),te)}function mc(x,z,ne,te){Ds(x,js(z,ne),te)}function vc(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ce=0;ce<ie.length;ce++)this.ranges[ce]=new bo(_r(x,ie[ce].anchor),_r(x,ie[ce].head))},origin:ne&&ne.origin};return Rn(x,"beforeSelectionChange",x,te),x.cm&&Rn(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?us(x.cm,te.ranges,te.ranges.length-1):z}function rl(x,z,ne){var te=x.history.done,ie=jt(te);ie&&ie.ranges?(te[te.length-1]=z,vu(x,z,ne)):Ds(x,z,ne)}function Ds(x,z,ne){vu(x,z,ne),iu(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function vu(x,z,ne){(Wi(x,"beforeSelectionChange")||x.cm&&Wi(x.cm,"beforeSelectionChange"))&&(z=vc(x,z,ne));var te=ne&&ne.bias||(Qn(z.primary().head,x.sel.primary().head)<0?-1:1);Fc(x,su(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&Ai(x.cm)}function Fc(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Ca(x.cm)),Hn(x,"cursorActivity",x))}function gc(x){Fc(x,su(x,x.sel,null,!1))}function su(x,z,ne,te){for(var ie,ce=0;ce<z.ranges.length;ce++){var ye=z.ranges[ce],Le=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ce],Ne=Yu(x,ye.anchor,Le&&Le.anchor,ne,te),$e=Yu(x,ye.head,Le&&Le.head,ne,te);(ie||Ne!=ye.anchor||$e!=ye.head)&&(ie||(ie=z.ranges.slice(0,ce)),ie[ce]=new bo(Ne,$e))}return ie?us(x.cm,ie,z.primIndex):z}function il(x,z,ne,te,ie){var ce=rn(x,z.line);if(ce.markedSpans)for(var ye=0;ye<ce.markedSpans.length;++ye){var Le=ce.markedSpans[ye],Ne=Le.marker,$e="selectLeft"in Ne?!Ne.selectLeft:Ne.inclusiveLeft,wt="selectRight"in Ne?!Ne.selectRight:Ne.inclusiveRight;if((Le.from==null||($e?Le.from<=z.ch:Le.from<z.ch))&&(Le.to==null||(wt?Le.to>=z.ch:Le.to>z.ch))){if(ie&&(Rn(Ne,"beforeCursorEnter"),Ne.explicitlyCleared))if(ce.markedSpans){--ye;continue}else break;if(!Ne.atomic)continue;if(ne){var Nt=Ne.find(te<0?1:-1),gn=void 0;if((te<0?wt:$e)&&(Nt=zl(x,Nt,-te,Nt&&Nt.line==z.line?ce:null)),Nt&&Nt.line==z.line&&(gn=Qn(Nt,ne))&&(te<0?gn<0:gn>0))return il(x,Nt,z,te,ie)}var un=Ne.find(te<0?-1:1);return(te<0?$e:wt)&&(un=zl(x,un,te,un.line==z.line?ce:null)),un?il(x,un,z,te,ie):null}}return z}function Yu(x,z,ne,te,ie){var ce=te||1,ye=il(x,z,ne,ce,ie)||!ie&&il(x,z,ne,ce,!0)||il(x,z,ne,-ce,ie)||!ie&&il(x,z,ne,-ce,!0);return ye||(x.cantEdit=!0,_n(x.first,0))}function zl(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?_r(x,_n(z.line-1)):null:ne>0&&z.ch==(te||rn(x,z.line)).text.length?z.line<x.first+x.size-1?_n(z.line+1,0):null:new _n(z.line,z.ch+ne)}function qu(x){x.setSelection(_n(x.firstLine(),0),_n(x.lastLine()),ft)}function gu(x,z,ne){var te={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return te.canceled=!0}};return ne&&(te.update=function(ie,ce,ye,Le){ie&&(te.from=_r(x,ie)),ce&&(te.to=_r(x,ce)),ye&&(te.text=ye),Le!==void 0&&(te.origin=Le)}),Rn(x,"beforeChange",x,te),x.cm&&Rn(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 so(x,z,ne){if(x.cm){if(!x.cm.curOp)return gi(x.cm,so)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((Wi(x,"beforeChange")||x.cm&&Wi(x.cm,"beforeChange"))&&(z=gu(x,z,!0),!z))){var te=fo&&!ne&&Ki(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)lo(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else lo(x,z)}}function lo(x,z){if(!(z.text.length==1&&z.text[0]==""&&Qn(z.from,z.to)==0)){var ne=Oo(x,z);Ps(x,z,ne,x.cm?x.cm.curOp.id:NaN),gs(x,z,ne,li(x,z));var te=[];di(x,function(ie,ce){!ce&&Lt(te,ie.history)==-1&&(Nl(ie.history,z),te.push(ie.history)),gs(ie,z,null,li(ie,z))})}}function ws(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ce,ye=x.sel,Le=z=="undo"?ie.done:ie.undone,Ne=z=="undo"?ie.undone:ie.done,$e=0;$e<Le.length&&(ce=Le[$e],!(ne?ce.ranges&&!ce.equals(x.sel):!ce.ranges));$e++);if($e!=Le.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ce=Le.pop(),ce.ranges){if(au(ce,Ne),ne&&!ce.equals(x.sel)){Ds(x,ce,{clearRedo:!1});return}ye=ce}else if(te){Le.push(ce);return}else break;var wt=[];au(ye,Ne),Ne.push({changes:wt,generation:ie.generation}),ie.generation=ce.generation||++ie.maxGeneration;for(var Nt=Wi(x,"beforeChange")||x.cm&&Wi(x.cm,"beforeChange"),gn=function(gr){var Hr=ce.changes[gr];if(Hr.origin=z,Nt&&!gu(x,Hr,!1))return Le.length=0,{};wt.push(vl(x,Hr));var ti=gr?Oo(x,Hr):jt(Le);gs(x,Hr,ti,pc(x,Hr)),!gr&&x.cm&&x.cm.scrollIntoView({from:Hr.from,to:el(Hr)});var fi=[];di(x,function(Xr,xi){!xi&&Lt(fi,Xr.history)==-1&&(Nl(Xr.history,Hr),fi.push(Xr.history)),gs(Xr,Hr,null,pc(Xr,Hr))})},un=ce.changes.length-1;un>=0;--un){var Jn=gn(un);if(Jn)return Jn.v}}}}function tl(x,z){if(z!=0&&(x.first+=z,x.sel=new ls(xn(x.sel.ranges,function(ie){return new bo(_n(ie.anchor.line+z,ie.anchor.ch),_n(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){Ni(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Do(x.cm,te,"gutter")}}function gs(x,z,ne,te){if(x.cm&&!x.cm.curOp)return gi(x.cm,gs)(x,z,ne,te);if(z.to.line<x.first){tl(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);tl(x,ie),z={from:_n(x.first,0),to:_n(z.to.line+ie,z.to.ch),text:[jt(z.text)],origin:z.origin}}var ce=x.lastLine();z.to.line>ce&&(z={from:z.from,to:_n(ce,rn(x,ce).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Un(x,z.from,z.to),ne||(ne=Oo(x,z)),x.cm?gl(x.cm,z,te):Br(x,z,te),vu(x,ne,ft),x.cantEdit&&Yu(x,_n(x.firstLine(),0))&&(x.cantEdit=!1)}}function gl(x,z,ne){var te=x.doc,ie=x.display,ce=z.from,ye=z.to,Le=!1,Ne=ce.line;x.options.lineWrapping||(Ne=ir(Ct(rn(te,ce.line))),te.iter(Ne,ye.line+1,function(un){if(un==ie.maxLine)return Le=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Ca(x),Br(te,z,ne,Fs(x)),x.options.lineWrapping||(te.iter(Ne,ce.line+z.text.length,function(un){var Jn=wn(un);Jn>ie.maxLineLength&&(ie.maxLine=un,ie.maxLineLength=Jn,ie.maxLineChanged=!0,Le=!1)}),Le&&(x.curOp.updateMaxLine=!0)),To(te,ce.line),pa(x,400);var $e=z.text.length-(ye.line-ce.line)-1;z.full?Ni(x):ce.line==ye.line&&z.text.length==1&&!Ia(x.doc,z)?Do(x,ce.line,"text"):Ni(x,ce.line,ye.line+1,$e);var wt=Wi(x,"changes"),Nt=Wi(x,"change");if(Nt||wt){var gn={from:ce,to:ye,text:z.text,removed:z.removed,origin:z.origin};Nt&&Hn(x,"change",x,gn),wt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(gn)}x.display.selForContextMenu=null}function al(x,z,ne,te,ie){var ce;te||(te=ne),Qn(te,ne)<0&&(ce=[te,ne],ne=ce[0],te=ce[1]),typeof z=="string"&&(z=x.splitLines(z)),so(x,{from:ne,to:te,text:z,origin:ie})}function bu(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function Kl(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=!0;if(ce.ranges){ce.copied||(ce=x[ie]=ce.deepCopy(),ce.copied=!0);for(var Le=0;Le<ce.ranges.length;Le++)bu(ce.ranges[Le].anchor,z,ne,te),bu(ce.ranges[Le].head,z,ne,te);continue}for(var Ne=0;Ne<ce.changes.length;++Ne){var $e=ce.changes[Ne];if(ne<$e.from.line)$e.from=_n($e.from.line+te,$e.from.ch),$e.to=_n($e.to.line+te,$e.to.ch);else if(z<=$e.to.line){ye=!1;break}}ye||(x.splice(0,ie+1),ie=0)}}function Nl(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;Kl(x.done,ne,te,ie),Kl(x.undone,ne,te,ie)}function Ml(x,z,ne,te){var ie=z,ce=z;return typeof z=="number"?ce=rn(x,va(x,z)):ie=ir(z),ie==null?null:(te(ce,ie)&&x.cm&&Do(x.cm,ie,ne),ce)}function Hl(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}Hl.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,Xn(ie),Hn(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 Ju(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}Ju.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var ne=0;ne<this.children.length;++ne){var te=this.children[ne],ie=te.chunkSize();if(x<ie){var ce=Math.min(z,ie-x),ye=te.height;if(te.removeInner(x,ce),this.height-=ye-te.height,ie==ce&&(this.children.splice(ne--,1),te.parent=null),(z-=ce)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof Hl))){var Le=[];this.collapse(Le),this.children=[new Hl(Le)],this.children[0].parent=this}},collapse:function(x){for(var z=0;z<this.children.length;++z)this.children[z].collapse(x)},insertInner:function(x,z,ne){this.size+=z.length,this.height+=ne;for(var te=0;te<this.children.length;++te){var ie=this.children[te],ce=ie.chunkSize();if(x<=ce){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var ye=ie.lines.length%25+25,Le=ye;Le<ie.lines.length;){var Ne=new Hl(ie.lines.slice(Le,Le+=25));ie.height-=Ne.height,this.children.splice(++te,0,Ne),Ne.parent=this}ie.lines=ie.lines.slice(0,ye),this.maybeSpill()}break}x-=ce}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new Ju(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=Lt(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new Ju(x.children);te.parent=x,x.children=[te,ne],x=te}ne.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,ne){for(var te=0;te<this.children.length;++te){var ie=this.children[te],ce=ie.chunkSize();if(x<ce){var ye=Math.min(z,ce-x);if(ie.iterN(x,ye,ne))return!0;if((z-=ye)==0)break;x=0}else x-=ce}}};var Qu=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};Qu.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=ir(ne);if(!(te==null||!z)){for(var ie=0;ie<z.length;++ie)z[ie]==this&&z.splice(ie--,1);z.length||(ne.widgets=null);var ce=ra(this);rr(ne,Math.max(0,ne.height-ce)),x&&(Or(x,function(){nf(x,ne,-ce),Do(x,te,"widget")}),Hn(x,"lineWidgetCleared",x,this,te))}},Qu.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=ra(this)-z;ie&&(yr(this.doc,te)||rr(te,te.height+ie),ne&&Or(ne,function(){ne.curOp.forceUpdate=!0,nf(ne,te,ie),Hn(ne,"lineWidgetChanged",ne,x,ir(te))}))},Li(Qu);function nf(x,z,ne){En(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&pi(x,ne)}function rf(x,z,ne,te){var ie=new Qu(x,ne,te),ce=x.cm;return ce&&ie.noHScroll&&(ce.display.alignWidgets=!0),Ml(x,z,"widget",function(ye){var Le=ye.widgets||(ye.widgets=[]);if(ie.insertAt==null?Le.push(ie):Le.splice(Math.min(Le.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ye,ce&&!yr(x,ye)){var Ne=En(ye)<x.scrollTop;rr(ye,ye.height+ra(ie)),Ne&&pi(ce,ie.height),ce.curOp.forceUpdate=!0}return!0}),ce&&Hn(ce,"lineWidgetAdded",ce,ie,typeof z=="number"?z:ir(z)),ie}var af=0,yu=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++af};yu.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&$a(x),Wi(this,"clear")){var ne=this.find();ne&&Hn(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ce=0;ce<this.lines.length;++ce){var ye=this.lines[ce],Le=Sn(ye.markedSpans,this);x&&!this.collapsed?Do(x,ir(ye),"text"):x&&(Le.to!=null&&(ie=ir(ye)),Le.from!=null&&(te=ir(ye))),ye.markedSpans=Kn(ye.markedSpans,Le),Le.from==null&&this.collapsed&&!yr(this.doc,ye)&&x&&rr(ye,Fo(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Ne=0;Ne<this.lines.length;++Ne){var $e=Ct(this.lines[Ne]),wt=wn($e);wt>x.display.maxLineLength&&(x.display.maxLine=$e,x.display.maxLineLength=wt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&Ni(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&gc(x.doc)),x&&Hn(x,"markerCleared",x,this,te,ie),z&&Lo(x),this.parent&&this.parent.clear()}},yu.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ce=this.lines[ie],ye=Sn(ce.markedSpans,this);if(ye.from!=null&&(ne=_n(z?ce:ir(ce),ye.from),x==-1))return ne;if(ye.to!=null&&(te=_n(z?ce:ir(ce),ye.to),x==1))return te}return ne&&{from:ne,to:te}},yu.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||Or(te,function(){var ie=z.line,ce=ir(z.line),ye=Ja(te,ce);if(ye&&(la(ye),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!yr(ne.doc,ie)&&ne.height!=null){var Le=ne.height;ne.height=null;var Ne=ra(ne)-Le;Ne&&rr(ie,ie.height+Ne)}Hn(te,"markerChanged",te,x)})},yu.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||Lt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},yu.prototype.detachLine=function(x){if(this.lines.splice(Lt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},Li(yu);function lu(x,z,ne,te,ie){if(te&&te.shared)return bs(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return gi(x.cm,lu)(x,z,ne,te,ie);var ce=new yu(x,ie),ye=Qn(z,ne);if(te&&Qt(te,ce,!1),ye>0||ye==0&&ce.clearWhenEmpty!==!1)return ce;if(ce.replacedWith&&(ce.collapsed=!0,ce.widgetNode=Ue("span",[ce.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ce.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ce.widgetNode.insertLeft=!0)),ce.collapsed){if(gt(x,z.line,z,ne,ce)||z.line!=ne.line&&gt(x,ne.line,z,ne,ce))throw new Error("Inserting collapsed marker partially overlapping an existing one");Mt()}ce.addToHistory&&Ps(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Le=z.line,Ne=x.cm,$e;if(x.iter(Le,ne.line+1,function(Nt){Ne&&ce.collapsed&&!Ne.options.lineWrapping&&Ct(Nt)==Ne.display.maxLine&&($e=!0),ce.collapsed&&Le!=z.line&&rr(Nt,0),Zr(Nt,new tn(ce,Le==z.line?z.ch:null,Le==ne.line?ne.ch:null)),++Le}),ce.collapsed&&x.iter(z.line,ne.line+1,function(Nt){yr(x,Nt)&&rr(Nt,0)}),ce.clearOnEnter&&bn(ce,"beforeCursorEnter",function(){return ce.clear()}),ce.readOnly&&(At(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ce.collapsed&&(ce.id=++af,ce.atomic=!0),Ne){if($e&&(Ne.curOp.updateMaxLine=!0),ce.collapsed)Ni(Ne,z.line,ne.line+1);else if(ce.className||ce.startStyle||ce.endStyle||ce.css||ce.attributes||ce.title)for(var wt=z.line;wt<=ne.line;wt++)Do(Ne,wt,"text");ce.atomic&&gc(Ne.doc),Hn(Ne,"markerAdded",Ne,ce)}return ce}var yo=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};yo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Hn(this,"clear")}},yo.prototype.find=function(x,z){return this.primary.find(x,z)},Li(yo);function bs(x,z,ne,te,ie){te=Qt(te),te.shared=!1;var ce=[lu(x,z,ne,te,ie)],ye=ce[0],Le=te.widgetNode;return di(x,function(Ne){Le&&(te.widgetNode=Le.cloneNode(!0)),ce.push(lu(Ne,_r(Ne,z),_r(Ne,ne),te,ie));for(var $e=0;$e<Ne.linked.length;++$e)if(Ne.linked[$e].isParent)return;ye=jt(ce)}),new yo(ce,ye)}function xu(x){return x.findMarks(_n(x.first,0),x.clipPos(_n(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(),ce=x.clipPos(ie.from),ye=x.clipPos(ie.to);if(Qn(ce,ye)){var Le=lu(x,ce,ye,te.primary,te.primary.type);te.markers.push(Le),Le.parent=te}}}function Tl(x){for(var z=function(te){var ie=x[te],ce=[ie.primary.doc];di(ie.primary.doc,function(Ne){return ce.push(Ne)});for(var ye=0;ye<ie.markers.length;ye++){var Le=ie.markers[ye];Lt(ce,Le.doc)==-1&&(Le.parent=null,ie.markers.splice(ye--,1))}},ne=0;ne<x.length;ne++)z(ne)}var sf=0,Hs=function(x,z,ne,te,ie){if(!(this instanceof Hs))return new Hs(x,z,ne,te,ie);ne==null&&(ne=0),Ju.call(this,[new Hl([new Bn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ce=_n(ne,0);this.sel=js(ce),this.history=new Go(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)),Br(this,{from:ce,to:ce,text:x}),Ds(this,js(ce),ft)};Hs.prototype=ue(Ju.prototype,{constructor:Hs,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=Ar(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:Gi(function(x){var z=_n(this.first,0),ne=this.first+this.size-1;so(this,{from:z,to:_n(ne,rn(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&ei(this.cm,0,0),Ds(this,js(z),ft)}),replaceRange:function(x,z,ne,te){z=_r(this,z),ne=ne?_r(this,ne):z,al(this,x,z,ne,te)},getRange:function(x,z,ne){var te=Un(this,_r(this,x),_r(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(br(this,x))return rn(this,x)},getLineNumber:function(x){return ir(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=rn(this,x)),Ct(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return _r(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:Gi(function(x,z,ne){mc(this,_r(this,typeof x=="number"?_n(x,z||0):x),null,ne)}),setSelection:Gi(function(x,z,ne){mc(this,_r(this,x),_r(this,z||x),ne)}),extendSelection:Gi(function(x,z,ne){ou(this,_r(this,x),z&&_r(this,z),ne)}),extendSelections:Gi(function(x,z){bi(this,Tn(this,x),z)}),extendSelectionsBy:Gi(function(x,z){var ne=xn(this.sel.ranges,x);bi(this,Tn(this,ne),z)}),setSelections:Gi(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new bo(_r(this,x[ie].anchor),_r(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),Ds(this,us(this.cm,te,z),ne)}}),addSelection:Gi(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new bo(_r(this,x),_r(this,z||x))),Ds(this,us(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=Un(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=Un(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:Gi(function(x,z,ne){for(var te=[],ie=this.sel,ce=0;ce<ie.ranges.length;ce++){var ye=ie.ranges[ce];te[ce]={from:ye.from(),to:ye.to(),text:this.splitLines(x[ce]),origin:ne}}for(var Le=z&&z!="end"&&zs(this,te,z),Ne=te.length-1;Ne>=0;Ne--)so(this,te[Ne]);Le?rl(this,Le):this.cm&&Ai(this.cm)}),undo:Gi(function(){ws(this,"undo")}),redo:Gi(function(){ws(this,"redo")}),undoSelection:Gi(function(){ws(this,"undo",!0)}),redoSelection:Gi(function(){ws(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 Go(this.history.maxGeneration),di(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:El(this.history.done),undone:El(this.history.undone)}},setHistory:function(x){var z=this.history=new Go(this.history.maxGeneration);z.done=El(x.done.slice(0),null,!0),z.undone=El(x.undone.slice(0),null,!0)},setGutterMarker:Gi(function(x,z,ne){return Ml(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&se(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:Gi(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Ml(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,se(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!br(this,x)||(z=x,x=rn(this,x),!x))return null}else if(z=ir(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:Gi(function(x,z,ne){return Ml(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(we(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:Gi(function(x,z,ne){return Ml(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",ce=te[ie];if(ce)if(ne==null)te[ie]=null;else{var ye=ce.match(we(ne));if(!ye)return!1;var Le=ye.index+ye[0].length;te[ie]=ce.slice(0,ye.index)+(!ye.index||Le==ce.length?"":" ")+ce.slice(Le)||null}else return!1;return!0})}),addLineWidget:Gi(function(x,z,ne){return rf(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return lu(this,_r(this,x),_r(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=_r(this,x),lu(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=_r(this,x);var z=[],ne=rn(this,x.line).markedSpans;if(ne)for(var te=0;te<ne.length;++te){var ie=ne[te];(ie.from==null||ie.from<=x.ch)&&(ie.to==null||ie.to>=x.ch)&&z.push(ie.marker.parent||ie.marker)}return z},findMarks:function(x,z,ne){x=_r(this,x),z=_r(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ce){var ye=ce.markedSpans;if(ye)for(var Le=0;Le<ye.length;Le++){var Ne=ye[Le];!(Ne.to!=null&&ie==x.line&&x.ch>=Ne.to||Ne.from==null&&ie!=x.line||Ne.from!=null&&ie==z.line&&Ne.from>=z.ch)&&(!ne||ne(Ne.marker))&&te.push(Ne.marker.parent||Ne.marker)}++ie}),te},getAllMarks:function(){var x=[];return this.iter(function(z){var ne=z.markedSpans;if(ne)for(var te=0;te<ne.length;++te)ne[te].from!=null&&x.push(ne[te].marker)}),x},posFromIndex:function(x){var z,ne=this.first,te=this.lineSeparator().length;return this.iter(function(ie){var ce=ie.text.length+te;if(ce>x)return z=x,!0;x-=ce,++ne}),_r(this,_n(ne,z))},indexFromPos:function(x){x=_r(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 Hs(Ar(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 Hs(Ar(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,xu(this)),te},unlinkDoc:function(x){if(x instanceof Wa&&(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),Tl(xu(this));break}}if(x.history==this.history){var te=[x.id];di(x,function(ie){return te.push(ie.id)},!0),x.history=new Go(null),x.history.done=El(this.history.done,te),x.history.undone=El(this.history.undone,te)}},iterLinkedDocs:function(x){di(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):Bt(x)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Gi(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&jo(this.cm))})}),Hs.prototype.eachLine=Hs.prototype.iter;var pd=0;function eh(x){var z=this;if(ec(z),!(Tr(z,x)||La(z.display,x))){Mi(x),ge&&(pd=+new Date);var ne=Ts(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ce=Array(ie),ye=0,Le=function(){++ye==ie&&gi(z,function(){ne=_r(z.doc,ne);var un={from:ne,to:ne,text:z.doc.splitLines(ce.filter(function(Jn){return Jn!=null}).join(z.doc.lineSeparator())),origin:"paste"};so(z.doc,un),rl(z.doc,js(_r(z.doc,ne),_r(z.doc,el(un))))})()},Ne=function(un,Jn){if(z.options.allowDropFileTypes&&Lt(z.options.allowDropFileTypes,un.type)==-1){Le();return}var gr=new FileReader;gr.onerror=function(){return Le()},gr.onload=function(){var Hr=gr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Hr)){Le();return}ce[Jn]=Hr,Le()},gr.readAsText(un)},$e=0;$e<te.length;$e++)Ne(te[$e],$e);else{if(z.state.draggingText&&z.doc.sel.contains(ne)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var wt=x.dataTransfer.getData("Text");if(wt){var Nt;if(z.state.draggingText&&!z.state.draggingText.copy&&(Nt=z.listSelections()),vu(z.doc,js(ne,ne)),Nt)for(var gn=0;gn<Nt.length;++gn)al(z.doc,"",Nt[gn].anchor,Nt[gn].head,"drag");z.replaceSelection(wt,"around","paste"),z.display.input.focus()}}catch(un){}}}}function th(x,z){if(ge&&(!x.state.draggingText||+new Date-pd<100)){Ea(z);return}if(!(Tr(x,z)||La(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!Je)){var ne=pt("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ke&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),ke&&ne.parentNode.removeChild(ne)}}function md(x,z){var ne=Ts(x,z);if(ne){var te=document.createDocumentFragment();Ht(x,ne,te),x.display.dragCursor||(x.display.dragCursor=pt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),vt(x.display.dragCursor,te)}}function ec(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function tc(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ne=[],te=0;te<z.length;te++){var ie=z[te].CodeMirror;ie&&ne.push(ie)}ne.length&&ne[0].operation(function(){for(var ce=0;ce<ne.length;ce++)x(ne[ce])})}}var Lr=!1;function vd(){Lr||($c(),Lr=!0)}function $c(){var x;bn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,tc(zc)},100))}),bn(window,"blur",function(){return tc(zr)})}function zc(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Wl={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"},bc=0;bc<10;bc++)Wl[bc+48]=Wl[bc+96]=String(bc);for(var Kc=65;Kc<=90;Kc++)Wl[Kc]=String.fromCharCode(Kc);for(var yc=1;yc<=12;yc++)Wl[yc+111]=Wl[yc+63235]="F"+yc;var cs={};cs.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"},cs.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"},cs.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"},cs.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"]},cs.default=_e?cs.macDefault:cs.pcDefault;function nh(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ce,ye=0;ye<z.length-1;ye++){var Le=z[ye];if(/^(cmd|meta|m)$/i.test(Le))ce=!0;else if(/^a(lt)?$/i.test(Le))ne=!0;else if(/^(c|ctrl|control)$/i.test(Le))te=!0;else if(/^s(hift)?$/i.test(Le))ie=!0;else throw new Error("Unrecognized modifier name: "+Le)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),ce&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function gd(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),ce=0;ce<ie.length;ce++){var ye=void 0,Le=void 0;ce==ie.length-1?(Le=ie.join(" "),ye=te):(Le=ie.slice(0,ce+1).join(" "),ye="...");var Ne=z[Le];if(!Ne)z[Le]=ye;else if(Ne!=ye)throw new Error("Inconsistent bindings for "+Le)}delete x[ne]}for(var $e in z)x[$e]=z[$e];return x}function uu(x,z,ne,te){z=bl(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 uu(x,z.fallthrough,ne,te);for(var ce=0;ce<z.fallthrough.length;ce++){var ye=uu(x,z.fallthrough[ce],ne,te);if(ye)return ye}}}function xc(x){var z=typeof x=="string"?x:Wl[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function Su(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(Qe?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(Qe?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function zu(x,z){if(ke&&x.keyCode==34&&x.char)return!1;var ne=Wl[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),Su(ne,x,z))}function bl(x){return typeof x=="string"?cs[x]:x}function Rl(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ce=z(ne[ie]);te.length&&Qn(ce.from,jt(te).to)<=0;){var ye=te.pop();if(Qn(ye.from,ce.from)<0){ce.from=ye.from;break}}te.push(ce)}Or(x,function(){for(var Le=te.length-1;Le>=0;Le--)al(x.doc,"",te[Le].from,te[Le].to,"+delete");Ai(x)})}function ol(x,z,ne){var te=Pt(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Yl(x,z,ne){var te=ol(x,z.ch,ne);return te==null?null:new _n(z.line,te,ne<0?"after":"before")}function Ku(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ce=cr(ne,z.doc.direction);if(ce){var ye=ie<0?jt(ce):ce[0],Le=ie<0==(ye.level==1),Ne=Le?"after":"before",$e;if(ye.level>0||z.doc.direction=="rtl"){var wt=Ta(z,ne);$e=ie<0?ne.text.length-1:0;var Nt=Ui(z,wt,$e).top;$e=zt(function(gn){return Ui(z,wt,gn).top==Nt},ie<0==(ye.level==1)?ye.from:ye.to-1,$e),Ne=="before"&&($e=ol(ne,$e,1))}else $e=ie<0?ye.to:ye.from;return new _n(te,$e,Ne)}}return new _n(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function ql(x,z,ne,te){var ie=cr(z,x.doc.direction);if(!ie)return Yl(z,ne,te);ne.ch>=z.text.length?(ne.ch=z.text.length,ne.sticky="before"):ne.ch<=0&&(ne.ch=0,ne.sticky="after");var ce=Gt(ie,ne.ch,ne.sticky),ye=ie[ce];if(x.doc.direction=="ltr"&&ye.level%2==0&&(te>0?ye.to>ne.ch:ye.from<ne.ch))return Yl(z,ne,te);var Le=function(ti,fi){return ol(z,ti instanceof _n?ti.ch:ti,fi)},Ne,$e=function(ti){return x.options.lineWrapping?(Ne=Ne||Ta(x,z),No(x,z,Ne,ti)):{begin:0,end:z.text.length}},wt=$e(ne.sticky=="before"?Le(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ye.level==1){var Nt=ye.level==1==te<0,gn=Le(ne,Nt?1:-1);if(gn!=null&&(Nt?gn<=ye.to&&gn<=wt.end:gn>=ye.from&&gn>=wt.begin)){var un=Nt?"before":"after";return new _n(ne.line,gn,un)}}var Jn=function(ti,fi,Xr){for(var xi=function(fs,nl){return nl?new _n(ne.line,Le(fs,1),"before"):new _n(ne.line,fs,"after")};ti>=0&&ti<ie.length;ti+=fi){var da=ie[ti],ya=fi>0==(da.level!=1),xo=ya?Xr.begin:Le(Xr.end,-1);if(da.from<=xo&&xo<da.to||(xo=ya?da.from:Le(da.to,-1),Xr.begin<=xo&&xo<Xr.end))return xi(xo,ya)}},gr=Jn(ce+te,te,wt);if(gr)return gr;var Hr=te>0?wt.end:Le(wt.begin,-1);return Hr!=null&&!(te>0&&Hr==z.text.length)&&(gr=Jn(te>0?0:ie.length-1,te,$e(Hr)),gr)?gr:null}var nc={selectAll:qu,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),ft)},killLine:function(x){return Rl(x,function(z){if(z.empty()){var ne=rn(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:_n(z.head.line+1,0)}:{from:z.head,to:_n(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return Rl(x,function(z){return{from:_n(z.from().line,0),to:_r(x.doc,_n(z.to().line+1,0))}})},delLineLeft:function(x){return Rl(x,function(z){return{from:_n(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return Rl(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 Rl(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(_n(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(_n(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return bd(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 yd(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")},Yt)},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")},Yt)},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},Yt)},goLineUp:function(x){return x.moveV(-1,"line")},goLineDown:function(x){return x.moveV(1,"line")},goPageUp:function(x){return x.moveV(-1,"page")},goPageDown:function(x){return x.moveV(1,"page")},goCharLeft:function(x){return x.moveH(-1,"char")},goCharRight:function(x){return x.moveH(1,"char")},goColumnLeft:function(x){return x.moveH(-1,"column")},goColumnRight:function(x){return x.moveH(1,"column")},goWordLeft:function(x){return x.moveH(-1,"word")},goGroupRight:function(x){return x.moveH(1,"group")},goGroupLeft:function(x){return x.moveH(-1,"group")},goWordRight:function(x){return x.moveH(1,"word")},delCharBefore:function(x){return x.deleteH(-1,"codepoint")},delCharAfter:function(x){return x.deleteH(1,"char")},delWordBefore:function(x){return x.deleteH(-1,"word")},delWordAfter:function(x){return x.deleteH(1,"word")},delGroupBefore:function(x){return x.deleteH(-1,"group")},delGroupAfter:function(x){return x.deleteH(1,"group")},indentAuto:function(x){return x.indentSelection("smart")},indentMore:function(x){return x.indentSelection("add")},indentLess:function(x){return x.indentSelection("subtract")},insertTab:function(x){return x.replaceSelection(" ")},insertSoftTab:function(x){for(var z=[],ne=x.listSelections(),te=x.options.tabSize,ie=0;ie<ne.length;ie++){var ce=ne[ie].from(),ye=Xe(x.getLine(ce.line),ce.ch,te);z.push(nn(te-ye%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return Or(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ce=rn(x.doc,ie.line).text;if(ce){if(ie.ch==ce.length&&(ie=new _n(ie.line,ie.ch-1)),ie.ch>0)ie=new _n(ie.line,ie.ch+1),x.replaceRange(ce.charAt(ie.ch-1)+ce.charAt(ie.ch-2),_n(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ye=rn(x.doc,ie.line-1).text;ye&&(ie=new _n(ie.line,1),x.replaceRange(ce.charAt(0)+x.doc.lineSeparator()+ye.charAt(ye.length-1),_n(ie.line-1,ye.length-1),ie,"+transpose"))}}ne.push(new bo(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return Or(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);Ai(x)})},openLine:function(x){return x.replaceSelection(`
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function bd(x,z){var ne=rn(x.doc,z),te=Ct(ne);return te!=ne&&(z=ir(te)),Ku(!0,x,te,z,1)}function yd(x,z){var ne=rn(x.doc,z),te=It(ne);return te!=ne&&(z=ir(te)),Ku(!0,x,ne,z,-1)}function lf(x,z){var ne=bd(x,z.line),te=rn(x.doc,ne.line),ie=cr(te,x.doc.direction);if(!ie||ie[0].level==0){var ce=Math.max(ne.ch,te.text.search(/\S/)),ye=z.line==ne.line&&z.ch<=ce&&z.ch;return _n(ne.line,ye?0:ce,ne.sticky)}return ne}function Gs(x,z,ne){if(typeof z=="string"&&(z=nc[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)!=an}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function Jl(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=uu(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&uu(z,x.options.extraKeys,ne,x)||uu(z,x.options.keyMap,ne,x)}var rh=new Ae;function rc(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(xc(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())}),Hc(x,ie+" "+z,ne,te))return!0}return Hc(x,z,ne,te)}function Hc(x,z,ne,te){var ie=Jl(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Hn(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Mi(ne),hn(x)),!!ie}function Io(x,z){var ne=zu(z,!0);return ne?z.shiftKey&&!x.state.keySeq?rc(x,"Shift-"+ne,z,function(te){return Gs(x,te,!0)})||rc(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Gs(x,te)}):rc(x,ne,z,function(te){return Gs(x,te)}):!1}function ic(x,z,ne){return rc(x,"'"+ne+"'",z,function(te){return Gs(x,te,!0)})}var cu=null;function Sc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=it(),!Tr(z,x))){ge&&Me<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=Io(z,x);ke&&(cu=te?ne:null,!te&&ne==88&&!Fn&&(_e?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),pe&&!_e&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&Gn(z)}}function Gn(x){var z=x.display.lineDiv;st(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(Ke(z,"CodeMirror-crosshair"),Wr(document,"keyup",ne),Wr(document,"mouseover",ne))}bn(document,"keyup",ne),bn(document,"mouseover",ne)}function uf(x){x.keyCode==16&&(this.doc.sel.shift=!1),Tr(this,x)}function cf(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(La(z.display,x)||Tr(z,x)||x.ctrlKey&&!x.altKey||_e&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(ke&&ne==cu){cu=null,Mi(x);return}if(!(ke&&(!x.which||x.which<10)&&Io(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(ic(z,x,ie)||z.display.input.onKeyPress(x))}}}var xd=400,Sd=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};Sd.prototype.compare=function(x,z,ne){return this.time+xd>x&&Qn(z,this.pos)==0&&ne==this.button};var du,wc;function ih(x,z){var ne=+new Date;return wc&&wc.compare(ne,x,z)?(du=wc=null,"triple"):du&&du.compare(ne,x,z)?(wc=new Sd(ne,x,z),du=null,"double"):(du=new Sd(ne,x,z),wc=null,"single")}function sl(x){var z=this,ne=z.display;if(!(Tr(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,La(ne,x)){Ee||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!hl(z,x)){var te=Ts(z,x),ie=Gr(x),ce=te?ih(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&wu(z,ie,te,ce,x))&&(ie==1?te?Zc(z,te,ce,x):Ma(x)==ne.scroller&&Mi(x):ie==2?(te&&ou(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(be?z.display.input.onContextMenu(x):ur(z)))}}}function wu(x,z,ne,te,ie){var ce="Click";return te=="double"?ce="Double"+ce:te=="triple"&&(ce="Triple"+ce),ce=(z==1?"Left":z==2?"Middle":"Right")+ce,rc(x,Su(ce,ie),ie,function(ye){if(typeof ye=="string"&&(ye=nc[ye]),!ye)return!1;var Le=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Le=ye(x,ne)!=an}finally{x.state.suppressEdits=!1}return Le})}function Wc(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ce=ht?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=ce?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(ie.extend==null||x.doc.extend)&&(ie.extend=x.doc.extend||ne.shiftKey),ie.addNew==null&&(ie.addNew=_e?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(_e?ne.altKey:ne.ctrlKey)),ie}function Zc(x,z,ne,te){ge?setTimeout(Ut(Mn,x),0):x.curOp.focus=it();var ie=Wc(x,ne,te),ce=x.doc.sel,ye;x.options.dragDrop&&Va&&!x.isReadOnly()&&ne=="single"&&(ye=ce.contains(z))>-1&&(Qn((ye=ce.ranges[ye]).from(),z)<0||z.xRel>0)&&(Qn(ye.to(),z)>0||z.xRel<0)?ah(x,te,z,ie):wd(x,te,z,ie)}function ah(x,z,ne,te){var ie=x.display,ce=!1,ye=gi(x,function($e){Ee&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Wr(ie.wrapper.ownerDocument,"mouseup",ye),Wr(ie.wrapper.ownerDocument,"mousemove",Le),Wr(ie.scroller,"dragstart",Ne),Wr(ie.scroller,"drop",ye),ce||(Mi($e),te.addNew||ou(x.doc,ne,null,null,te.extend),Ee&&!Je||ge&&Me==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),Le=function($e){ce=ce||Math.abs(z.clientX-$e.clientX)+Math.abs(z.clientY-$e.clientY)>=10},Ne=function(){return ce=!0};Ee&&(ie.scroller.draggable=!0),x.state.draggingText=ye,ye.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),bn(ie.wrapper.ownerDocument,"mouseup",ye),bn(ie.wrapper.ownerDocument,"mousemove",Le),bn(ie.scroller,"dragstart",Ne),bn(ie.scroller,"drop",ye),ur(x),setTimeout(function(){return ie.input.focus()},20)}function df(x,z,ne){if(ne=="char")return new bo(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new bo(_n(z.line,0),_r(x.doc,_n(z.line+1,0)));var te=ne(x,z);return new bo(te.from,te.to)}function wd(x,z,ne,te){var ie=x.display,ce=x.doc;Mi(z);var ye,Le,Ne=ce.sel,$e=Ne.ranges;if(te.addNew&&!te.extend?(Le=ce.sel.contains(ne),Le>-1?ye=$e[Le]:ye=new bo(ne,ne)):(ye=ce.sel.primary(),Le=ce.sel.primIndex),te.unit=="rectangle")te.addNew||(ye=new bo(ne,ne)),ne=Ts(x,z,!0,!0),Le=-1;else{var wt=df(x,ne,te.unit);te.extend?ye=Xu(ye,wt.anchor,wt.head,te.extend):ye=wt}te.addNew?Le==-1?(Le=$e.length,Ds(ce,us(x,$e.concat([ye]),Le),{scroll:!1,origin:"*mouse"})):$e.length>1&&$e[Le].empty()&&te.unit=="char"&&!te.extend?(Ds(ce,us(x,$e.slice(0,Le).concat($e.slice(Le+1)),0),{scroll:!1,origin:"*mouse"}),Ne=ce.sel):xl(ce,Le,ye,mt):(Le=0,Ds(ce,new ls([ye],0),mt),Ne=ce.sel);var Nt=ne;function gn(Xr){if(Qn(Nt,Xr)!=0)if(Nt=Xr,te.unit=="rectangle"){for(var xi=[],da=x.options.tabSize,ya=Xe(rn(ce,ne.line).text,ne.ch,da),xo=Xe(rn(ce,Xr.line).text,Xr.ch,da),fs=Math.min(ya,xo),nl=Math.max(ya,xo),Ls=Math.min(ne.line,Xr.line),Sl=Math.min(x.lastLine(),Math.max(ne.line,Xr.line));Ls<=Sl;Ls++){var wl=rn(ce,Ls).text,Xs=An(wl,fs,da);fs==nl?xi.push(new bo(_n(Ls,Xs),_n(Ls,Xs))):wl.length>Xs&&xi.push(new bo(_n(Ls,Xs),_n(Ls,An(wl,nl,da))))}xi.length||xi.push(new bo(ne,ne)),Ds(ce,us(x,Ne.ranges.slice(0,Le).concat(xi),Le),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Xr)}else{var Cl=ye,Xa=df(x,Xr,te.unit),Os=Cl.anchor,As;Qn(Xa.anchor,Os)>0?(As=Xa.head,Os=ii(Cl.from(),Xa.anchor)):(As=Xa.anchor,Os=_i(Cl.to(),Xa.head));var Bs=Ne.ranges.slice(0);Bs[Le]=ff(x,new bo(_r(ce,Os),As)),Ds(ce,us(x,Bs,Le),mt)}}var un=ie.wrapper.getBoundingClientRect(),Jn=0;function gr(Xr){var xi=++Jn,da=Ts(x,Xr,!0,te.unit=="rectangle");if(da)if(Qn(da,Nt)!=0){x.curOp.focus=it(),gn(da);var ya=hr(ie,ce);(da.line>=ya.to||da.line<ya.from)&&setTimeout(gi(x,function(){Jn==xi&&gr(Xr)}),150)}else{var xo=Xr.clientY<un.top?-20:Xr.clientY>un.bottom?20:0;xo&&setTimeout(gi(x,function(){Jn==xi&&(ie.scroller.scrollTop+=xo,gr(Xr))}),50)}}function Hr(Xr){x.state.selectingText=!1,Jn=1/0,Xr&&(Mi(Xr),ie.input.focus()),Wr(ie.wrapper.ownerDocument,"mousemove",ti),Wr(ie.wrapper.ownerDocument,"mouseup",fi),ce.history.lastSelOrigin=null}var ti=gi(x,function(Xr){Xr.buttons===0||!Gr(Xr)?Hr(Xr):gr(Xr)}),fi=gi(x,Hr);x.state.selectingText=fi,bn(ie.wrapper.ownerDocument,"mousemove",ti),bn(ie.wrapper.ownerDocument,"mouseup",fi)}function ff(x,z){var ne=z.anchor,te=z.head,ie=rn(x.doc,ne.line);if(Qn(ne,te)==0&&ne.sticky==te.sticky)return z;var ce=cr(ie);if(!ce)return z;var ye=Gt(ce,ne.ch,ne.sticky),Le=ce[ye];if(Le.from!=ne.ch&&Le.to!=ne.ch)return z;var Ne=ye+(Le.from==ne.ch==(Le.level!=1)?0:1);if(Ne==0||Ne==ce.length)return z;var $e;if(te.line!=ne.line)$e=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var wt=Gt(ce,te.ch,te.sticky),Nt=wt-ye||(te.ch-ne.ch)*(Le.level==1?-1:1);wt==Ne-1||wt==Ne?$e=Nt<0:$e=Nt>0}var gn=ce[Ne+($e?-1:0)],un=$e==(gn.level==1),Jn=un?gn.from:gn.to,gr=un?"after":"before";return ne.ch==Jn&&ne.sticky==gr?z:new bo(new _n(ne.line,Jn,gr),te)}function Cc(x,z,ne,te){var ie,ce;if(z.touches)ie=z.touches[0].clientX,ce=z.touches[0].clientY;else try{ie=z.clientX,ce=z.clientY}catch(gn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Mi(z);var ye=x.display,Le=ye.lineDiv.getBoundingClientRect();if(ce>Le.bottom||!Wi(x,ne))return Zi(z);ce-=Le.top-ye.viewOffset;for(var Ne=0;Ne<x.display.gutterSpecs.length;++Ne){var $e=ye.gutters.childNodes[Ne];if($e&&$e.getBoundingClientRect().right>=ie){var wt=mr(x.doc,ce),Nt=x.display.gutterSpecs[Ne];return Rn(x,ne,x,wt,Nt.className,z),Zi(z)}}}function hl(x,z){return Cc(x,z,"gutterClick",!0)}function Cu(x,z){La(x.display,z)||hf(x,z)||Tr(x,z,"contextmenu")||be||x.display.input.onContextMenu(z)}function hf(x,z){return Wi(x,"gutterContextMenu")?Cc(x,z,"gutterContextMenu",!1):!1}function Cd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ki(x)}var Eu={toString:function(){return"CodeMirror.Init"}},pf={},Vc={};function oh(x){var z=x.optionHandlers;function ne(te,ie,ce,ye){x.defaults[te]=ie,ce&&(z[te]=ye?function(Le,Ne,$e){$e!=Eu&&ce(Le,Ne,$e)}:ce)}x.defineOption=ne,x.Init=Eu,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,Ms(te)},!0),ne("indentUnit",2,Ms,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Ks(te),ki(te),Ni(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ce=[],ye=te.doc.first;te.doc.iter(function(Ne){for(var $e=0;;){var wt=Ne.text.indexOf(ie,$e);if(wt==-1)break;$e=wt+ie.length,ce.push(_n(ye,wt))}ye++});for(var Le=ce.length-1;Le>=0;Le--)al(te.doc,ie,ce[Le],_n(ce[Le].line,ce[Le].ch+ie.length))}}),ne("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(te,ie,ce){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),ce!=Eu&&te.refresh()}),ne("specialCharPlaceholder",je,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",nt?"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",!yt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){Cd(te),Qo(te)},!0),ne("keyMap","default",function(te,ie,ce){var ye=bl(ie),Le=ce!=Eu&&bl(ce);Le&&Le.detach&&Le.detach(te,ye),ye.attach&&ye.attach(te,Le||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,mf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=Ss(ie,te.options.lineNumbers),Qo(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?Rs(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return qi(te)},!0),ne("scrollbarStyle","native",function(te){Da(te),qi(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=Ss(te.options.gutters,ie),Qo(te)},!0),ne("firstLineNumber",1,Qo,!0),ne("lineNumberFormatter",function(te){return te},Qo,!0),ne("showCursorWhenSelecting",!1,xt,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(zr(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,xt,!0),ne("singleCursorHeightPerLine",!0,xt,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Ks,!0),ne("addModeClass",!1,Ks,!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,Ks,!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!=Eu;if(!z!=!te){var ie=x.display.dragFunctions,ce=z?bn:Wr;ce(x.display.scroller,"dragstart",ie.start),ce(x.display.scroller,"dragenter",ie.enter),ce(x.display.scroller,"dragover",ie.over),ce(x.display.scroller,"dragleave",ie.leave),ce(x.display.scroller,"drop",ie.drop)}}function mf(x){x.options.lineWrapping?(st(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Ke(x.display.wrapper,"CodeMirror-wrap"),In(x)),os(x),Ni(x),ki(x),setTimeout(function(){return qi(x)},100)}function Wa(x,z){var ne=this;if(!(this instanceof Wa))return new Wa(x,z);this.options=z=z?Qt(z):{},Qt(pf,z,!1);var te=z.value;typeof te=="string"?te=new Hs(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new Wa.inputStyles[z.inputStyle](this),ce=this.display=new Is(x,te,ie,z);ce.wrapper.CodeMirror=this,Cd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Da(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&&!nt&&ce.input.focus(),ge&&Me<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),vd(),$a(this),this.curOp.forceUpdate=!0,$i(this,te),z.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&er(ne)},20):zr(this);for(var ye in Vc)Vc.hasOwnProperty(ye)&&Vc[ye](this,z[ye],Eu);zo(this),z.finishInit&&z.finishInit(this);for(var Le=0;Le<Ed.length;++Le)Ed[Le](this);Lo(this),Ee&&z.lineWrapping&&getComputedStyle(ce.lineDiv).textRendering=="optimizelegibility"&&(ce.lineDiv.style.textRendering="auto")}Wa.defaults=pf,Wa.optionHandlers=Vc;function lh(x){var z=x.display;bn(z.scroller,"mousedown",gi(x,sl)),ge&&Me<11?bn(z.scroller,"dblclick",gi(x,function(Ne){if(!Tr(x,Ne)){var $e=Ts(x,Ne);if(!(!$e||hl(x,Ne)||La(x.display,Ne))){Mi(Ne);var wt=x.findWordAt($e);ou(x.doc,wt.anchor,wt.head)}}})):bn(z.scroller,"dblclick",function(Ne){return Tr(x,Ne)||Mi(Ne)}),bn(z.scroller,"contextmenu",function(Ne){return Cu(x,Ne)}),bn(z.input.getField(),"contextmenu",function(Ne){z.scroller.contains(Ne.target)||Cu(x,Ne)});var ne,te={end:0};function ie(){z.activeTouch&&(ne=setTimeout(function(){return z.activeTouch=null},1e3),te=z.activeTouch,te.end=+new Date)}function ce(Ne){if(Ne.touches.length!=1)return!1;var $e=Ne.touches[0];return $e.radiusX<=1&&$e.radiusY<=1}function ye(Ne,$e){if($e.left==null)return!0;var wt=$e.left-Ne.left,Nt=$e.top-Ne.top;return wt*wt+Nt*Nt>20*20}bn(z.scroller,"touchstart",function(Ne){if(!Tr(x,Ne)&&!ce(Ne)&&!hl(x,Ne)){z.input.ensurePolled(),clearTimeout(ne);var $e=+new Date;z.activeTouch={start:$e,moved:!1,prev:$e-te.end<=300?te:null},Ne.touches.length==1&&(z.activeTouch.left=Ne.touches[0].pageX,z.activeTouch.top=Ne.touches[0].pageY)}}),bn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),bn(z.scroller,"touchend",function(Ne){var $e=z.activeTouch;if($e&&!La(z,Ne)&&$e.left!=null&&!$e.moved&&new Date-$e.start<300){var wt=x.coordsChar(z.activeTouch,"page"),Nt;!$e.prev||ye($e,$e.prev)?Nt=new bo(wt,wt):!$e.prev.prev||ye($e,$e.prev.prev)?Nt=x.findWordAt(wt):Nt=new bo(_n(wt.line,0),_r(x.doc,_n(wt.line+1,0))),x.setSelection(Nt.anchor,Nt.head),x.focus(),Mi(Ne)}ie()}),bn(z.scroller,"touchcancel",ie),bn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Dr(x,z.scroller.scrollTop),Hi(x,z.scroller.scrollLeft,!0),Rn(x,"scroll",x))}),bn(z.scroller,"mousewheel",function(Ne){return yl(x,Ne)}),bn(z.scroller,"DOMMouseScroll",function(Ne){return yl(x,Ne)}),bn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Ne){Tr(x,Ne)||Ea(Ne)},over:function(Ne){Tr(x,Ne)||(md(x,Ne),Ea(Ne))},start:function(Ne){return th(x,Ne)},drop:gi(x,eh),leave:function(Ne){Tr(x,Ne)||ec(x)}};var Le=z.input.getField();bn(Le,"keyup",function(Ne){return uf.call(x,Ne)}),bn(Le,"keydown",gi(x,Sc)),bn(Le,"keypress",gi(x,cf)),bn(Le,"focus",function(Ne){return er(x,Ne)}),bn(Le,"blur",function(Ne){return zr(x,Ne)})}var Ed=[];Wa.defineInitHook=function(x){return Ed.push(x)};function Zl(x,z,ne,te){var ie=x.doc,ce;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ce=ka(x,z).state:ne="prev");var ye=x.options.tabSize,Le=rn(ie,z),Ne=Xe(Le.text,null,ye);Le.stateAfter&&(Le.stateAfter=null);var $e=Le.text.match(/^\s*/)[0],wt;if(!te&&!/\S/.test(Le.text))wt=0,ne="not";else if(ne=="smart"&&(wt=ie.mode.indent(ce,Le.text.slice($e.length),Le.text),wt==an||wt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?wt=Xe(rn(ie,z-1).text,null,ye):wt=0:ne=="add"?wt=Ne+x.options.indentUnit:ne=="subtract"?wt=Ne-x.options.indentUnit:typeof ne=="number"&&(wt=Ne+ne),wt=Math.max(0,wt);var Nt="",gn=0;if(x.options.indentWithTabs)for(var un=Math.floor(wt/ye);un;--un)gn+=ye,Nt+=" ";if(gn<wt&&(Nt+=nn(wt-gn)),Nt!=$e)return al(ie,Nt,_n(z,0),_n(z,$e.length),"+input"),Le.stateAfter=null,!0;for(var Jn=0;Jn<ie.sel.ranges.length;Jn++){var gr=ie.sel.ranges[Jn];if(gr.head.line==z&&gr.head.ch<$e.length){var Hr=_n(z,$e.length);xl(ie,Jn,new bo(Hr,Hr));break}}}var Vl=null;function Mu(x){Vl=x}function Md(x,z,ne,te,ie){var ce=x.doc;x.display.shift=!1,te||(te=ce.sel);var ye=+new Date-200,Le=ie=="paste"||x.state.pasteIncoming>ye,Ne=Bt(z),$e=null;if(Le&&te.ranges.length>1)if(Vl&&Vl.text.join(`
`)==z){if(te.ranges.length%Vl.text.length==0){$e=[];for(var wt=0;wt<Vl.text.length;wt++)$e.push(ce.splitLines(Vl.text[wt]))}}else Ne.length==te.ranges.length&&x.options.pasteLinesPerSelection&&($e=xn(Ne,function(ti){return[ti]}));for(var Nt=x.curOp.updateInput,gn=te.ranges.length-1;gn>=0;gn--){var un=te.ranges[gn],Jn=un.from(),gr=un.to();un.empty()&&(ne&&ne>0?Jn=_n(Jn.line,Jn.ch-ne):x.state.overwrite&&!Le?gr=_n(gr.line,Math.min(rn(ce,gr.line).text.length,gr.ch+jt(Ne).length)):Le&&Vl&&Vl.lineWise&&Vl.text.join(`
`)==Ne.join(`
`)&&(Jn=gr=_n(Jn.line,0)));var Hr={from:Jn,to:gr,text:$e?$e[gn%$e.length]:Ne,origin:ie||(Le?"paste":x.state.cutIncoming>ye?"cut":"+input")};so(x.doc,Hr),Hn(x,"inputRead",x,Hr)}z&&!Le&&kd(x,z),Ai(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Nt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function _d(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&Or(z,function(){return Md(z,ne,0,null,"paste")}),!0}function kd(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ie=ne.ranges[te];if(!(ie.head.ch>100||te&&ne.ranges[te-1].head.line==ie.head.line)){var ce=x.getModeAt(ie.head),ye=!1;if(ce.electricChars){for(var Le=0;Le<ce.electricChars.length;Le++)if(z.indexOf(ce.electricChars.charAt(Le))>-1){ye=Zl(x,ie.head.line,"smart");break}}else ce.electricInput&&ce.electricInput.test(rn(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ye=Zl(x,ie.head.line,"smart"));ye&&Hn(x,"electricInput",x,ie.head.line)}}}function ac(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,ce={anchor:_n(ie,0),head:_n(ie+1,0)};ne.push(ce),z.push(x.getRange(ce.anchor,ce.head))}return{text:z,ranges:ne}}function vf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function Dd(){var x=pt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=pt("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ee?x.style.width="1000px":x.setAttribute("wrap","off"),ot&&(x.style.border="1px solid black"),vf(x),z}function Ld(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ie){var ce=this.options,ye=ce[te];ce[te]==ie&&te!="mode"||(ce[te]=ie,z.hasOwnProperty(te)&&gi(this,z[te])(this,ie,ye),Rn(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"](bl(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ce=0;ce<ie.length;++ce)if(ie[ce]==te||ie[ce].name==te)return ie.splice(ce,1),!0},addOverlay:ci(function(te,ie){var ce=te.token?te:x.getMode(this.options,te);if(ce.startState)throw new Error("Overlays may not be stateful.");vn(this.state.overlays,{mode:ce,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ye){return ye.priority}),this.state.modeGen++,Ni(this)}),removeOverlay:ci(function(te){for(var ie=this.state.overlays,ce=0;ce<ie.length;++ce){var ye=ie[ce].modeSpec;if(ye==te||typeof te=="string"&&ye.name==te){ie.splice(ce,1),this.state.modeGen++,Ni(this);return}}}),indentLine:ci(function(te,ie,ce){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),br(this.doc,te)&&Zl(this,te,ie,ce)}),indentSelection:ci(function(te){for(var ie=this.doc.sel.ranges,ce=-1,ye=0;ye<ie.length;ye++){var Le=ie[ye];if(Le.empty())Le.head.line>ce&&(Zl(this,Le.head.line,te,!0),ce=Le.head.line,ye==this.doc.sel.primIndex&&Ai(this));else{var Ne=Le.from(),$e=Le.to(),wt=Math.max(ce,Ne.line);ce=Math.min(this.lastLine(),$e.line-($e.ch?0:1))+1;for(var Nt=wt;Nt<ce;++Nt)Zl(this,Nt,te);var gn=this.doc.sel.ranges;Ne.ch==0&&ie.length==gn.length&&gn[ye].from().ch>0&&xl(this.doc,ye,new bo(Ne,gn[ye].to()),ft)}}}),getTokenAt:function(te,ie){return _o(this,te,ie)},getLineTokens:function(te,ie){return _o(this,_n(te),ie,!0)},getTokenTypeAt:function(te){te=_r(this.doc,te);var ie=ja(this,rn(this.doc,te.line)),ce=0,ye=(ie.length-1)/2,Le=te.ch,Ne;if(Le==0)Ne=ie[2];else for(;;){var $e=ce+ye>>1;if(($e?ie[$e*2-1]:0)>=Le)ye=$e;else if(ie[$e*2+1]<Le)ce=$e+1;else{Ne=ie[$e*2+2];break}}var wt=Ne?Ne.indexOf("overlay "):-1;return wt<0?Ne:wt==0?null:Ne.slice(0,wt-1)},getModeAt:function(te){var ie=this.doc.mode;return ie.innerMode?x.innerMode(ie,this.getTokenAt(te).state).mode:ie},getHelper:function(te,ie){return this.getHelpers(te,ie)[0]},getHelpers:function(te,ie){var ce=[];if(!ne.hasOwnProperty(ie))return ce;var ye=ne[ie],Le=this.getModeAt(te);if(typeof Le[ie]=="string")ye[Le[ie]]&&ce.push(ye[Le[ie]]);else if(Le[ie])for(var Ne=0;Ne<Le[ie].length;Ne++){var $e=ye[Le[ie][Ne]];$e&&ce.push($e)}else Le.helperType&&ye[Le.helperType]?ce.push(ye[Le.helperType]):ye[Le.name]&&ce.push(ye[Le.name]);for(var wt=0;wt<ye._global.length;wt++){var Nt=ye._global[wt];Nt.pred(Le,this)&&Lt(ce,Nt.val)==-1&&ce.push(Nt.val)}return ce},getStateAfter:function(te,ie){var ce=this.doc;return te=va(ce,te==null?ce.first+ce.size-1:te),ka(this,te+1,ie).state},cursorCoords:function(te,ie){var ce,ye=this.doc.sel.primary();return te==null?ce=ye.head:typeof te=="object"?ce=_r(this.doc,te):ce=te?ye.from():ye.to(),to(this,ce,ie||"page")},charCoords:function(te,ie){return Ho(this,_r(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=wo(this,te,ie||"page"),Xo(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=wo(this,{top:te,left:0},ie||"page").top,mr(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ce){var ye=!1,Le;if(typeof te=="number"){var Ne=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Ne&&(te=Ne,ye=!0),Le=rn(this.doc,te)}else Le=te;return oo(this,Le,{top:0,left:0},ie||"page",ce||ye).top+(ye?this.doc.height-En(Le):0)},defaultTextHeight:function(){return Fo(this.display)},defaultCharWidth:function(){return es(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ce,ye,Le){var Ne=this.display;te=to(this,_r(this.doc,te));var $e=te.bottom,wt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Ne.sizer.appendChild(ie),ye=="over")$e=te.top;else if(ye=="above"||ye=="near"){var Nt=Math.max(Ne.wrapper.clientHeight,this.doc.height),gn=Math.max(Ne.sizer.clientWidth,Ne.lineSpace.clientWidth);(ye=="above"||te.bottom+ie.offsetHeight>Nt)&&te.top>ie.offsetHeight?$e=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=Nt&&($e=te.bottom),wt+ie.offsetWidth>gn&&(wt=gn-ie.offsetWidth)}ie.style.top=$e+"px",ie.style.left=ie.style.right="",Le=="right"?(wt=Ne.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(Le=="left"?wt=0:Le=="middle"&&(wt=(Ne.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=wt+"px"),ce&&yi(this,{left:wt,top:$e,right:wt+ie.offsetWidth,bottom:$e+ie.offsetHeight})},triggerOnKeyDown:ci(Sc),triggerOnKeyPress:ci(cf),triggerOnKeyUp:uf,triggerOnMouseDown:ci(sl),execCommand:function(te){if(nc.hasOwnProperty(te))return nc[te].call(null,this)},triggerElectric:ci(function(te){kd(this,te)}),findPosH:function(te,ie,ce,ye){var Le=1;ie<0&&(Le=-1,ie=-ie);for(var Ne=_r(this.doc,te),$e=0;$e<ie&&(Ne=Uc(this.doc,Ne,Le,ce,ye),!Ne.hitSide);++$e);return Ne},moveH:ci(function(te,ie){var ce=this;this.extendSelectionsBy(function(ye){return ce.display.shift||ce.doc.extend||ye.empty()?Uc(ce.doc,ye.head,te,ie,ce.options.rtlMoveVisually):te<0?ye.from():ye.to()},Yt)}),deleteH:ci(function(te,ie){var ce=this.doc.sel,ye=this.doc;ce.somethingSelected()?ye.replaceSelection("",null,"+delete"):Rl(this,function(Le){var Ne=Uc(ye,Le.head,te,ie,!1);return te<0?{from:Ne,to:Le.head}:{from:Le.head,to:Ne}})}),findPosV:function(te,ie,ce,ye){var Le=1,Ne=ye;ie<0&&(Le=-1,ie=-ie);for(var $e=_r(this.doc,te),wt=0;wt<ie;++wt){var Nt=to(this,$e,"div");if(Ne==null?Ne=Nt.left:Nt.left=Ne,$e=gf(this,Nt,Le,ce),$e.hitSide)break}return $e},moveV:ci(function(te,ie){var ce=this,ye=this.doc,Le=[],Ne=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(wt){if(Ne)return te<0?wt.from():wt.to();var Nt=to(ce,wt.head,"div");wt.goalColumn!=null&&(Nt.left=wt.goalColumn),Le.push(Nt.left);var gn=gf(ce,Nt,te,ie);return ie=="page"&&wt==ye.sel.primary()&&pi(ce,Ho(ce,gn,"div").top-Nt.top),gn},Yt),Le.length)for(var $e=0;$e<ye.sel.ranges.length;$e++)ye.sel.ranges[$e].goalColumn=Le[$e]}),findWordAt:function(te){var ie=this.doc,ce=rn(ie,te.line).text,ye=te.ch,Le=te.ch;if(ce){var Ne=this.getHelper(te,"wordChars");(te.sticky=="before"||Le==ce.length)&&ye?--ye:++Le;for(var $e=ce.charAt(ye),wt=fe($e,Ne)?function(Nt){return fe(Nt,Ne)}:/\s/.test($e)?function(Nt){return/\s/.test(Nt)}:function(Nt){return!/\s/.test(Nt)&&!fe(Nt)};ye>0&&wt(ce.charAt(ye-1));)--ye;for(;Le<ce.length&&wt(ce.charAt(Le));)++Le}return new bo(_n(te.line,ye),_n(te.line,Le))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?st(this.display.cursorDiv,"CodeMirror-overwrite"):Ke(this.display.cursorDiv,"CodeMirror-overwrite"),Rn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==it()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ci(function(te,ie){ei(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-ni(this)-this.display.barHeight,width:te.scrollWidth-ni(this)-this.display.barWidth,clientHeight:Xi(this),clientWidth:Ci(this)}},scrollIntoView:ci(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:_n(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?Ti(this,te):wr(this,te.from,te.to,te.margin)}),setSize:ci(function(te,ie){var ce=this,ye=function(Ne){return typeof Ne=="number"||/^\d+$/.test(String(Ne))?Ne+"px":Ne};te!=null&&(this.display.wrapper.style.width=ye(te)),ie!=null&&(this.display.wrapper.style.height=ye(ie)),this.options.lineWrapping&&Ka(this);var Le=this.display.viewFrom;this.doc.iter(Le,this.display.viewTo,function(Ne){if(Ne.widgets){for(var $e=0;$e<Ne.widgets.length;$e++)if(Ne.widgets[$e].noHScroll){Do(ce,Le,"widget");break}}++Le}),this.curOp.forceUpdate=!0,Rn(this,"refresh",this)}),operation:function(te){return Or(this,te)},startOperation:function(){return $a(this)},endOperation:function(){return Lo(this)},refresh:ci(function(){var te=this.display.cachedTextHeight;Ni(this),this.curOp.forceUpdate=!0,ki(this),ei(this,this.doc.scrollLeft,this.doc.scrollTop),xs(this.display),(te==null||Math.abs(te-Fo(this.display))>.5||this.options.lineWrapping)&&os(this),Rn(this,"refresh",this)}),swapDoc:ci(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),$i(this,te),ki(this),this.display.input.reset(),ei(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Hn(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}},Li(x),x.registerHelper=function(te,ie,ce){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=ce},x.registerGlobalHelper=function(te,ie,ce,ye){x.registerHelper(te,ie,ye),ne[te]._global.push({pred:ce,val:ye})}}function Uc(x,z,ne,te,ie){var ce=z,ye=ne,Le=rn(x,z.line),Ne=ie&&x.direction=="rtl"?-ne:ne;function $e(){var fi=z.line+Ne;return fi<x.first||fi>=x.first+x.size?!1:(z=new _n(fi,z.ch,z.sticky),Le=rn(x,fi))}function wt(fi){var Xr;if(te=="codepoint"){var xi=Le.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(xi)?Xr=null:Xr=new _n(z.line,Math.max(0,Math.min(Le.text.length,z.ch+ne*(xi>=55296&&xi<56320?2:1))),-ne)}else ie?Xr=ql(x.cm,Le,z,ne):Xr=Yl(Le,z,ne);if(Xr==null)if(!fi&&$e())z=Ku(ie,x.cm,Le,z.line,Ne);else return!1;else z=Xr;return!0}if(te=="char"||te=="codepoint")wt();else if(te=="column")wt(!0);else if(te=="word"||te=="group")for(var Nt=null,gn=te=="group",un=x.cm&&x.cm.getHelper(z,"wordChars"),Jn=!0;!(ne<0&&!wt(!Jn));Jn=!1){var gr=Le.text.charAt(z.ch)||`
`,Hr=fe(gr,un)?"w":gn&&gr==`
`?"n":!gn||/\s/.test(gr)?null:"p";if(gn&&!Jn&&!Hr&&(Hr="s"),Nt&&Nt!=Hr){ne<0&&(ne=1,wt(),z.sticky="after");break}if(Hr&&(Nt=Hr),ne>0&&!wt(!Jn))break}var ti=Yu(x,z,ce,ye,!0);return na(ce,ti)&&(ti.hitSide=!0),ti}function gf(x,z,ne,te){var ie=x.doc,ce=z.left,ye;if(te=="page"){var Le=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ne=Math.max(Le-.5*Fo(x.display),3);ye=(ne>0?z.bottom:z.top)+ne*Ne}else te=="line"&&(ye=ne>0?z.bottom+3:z.top-3);for(var $e;$e=Xo(x,ce,ye),!!$e.outside;){if(ne<0?ye<=0:ye>=ie.height){$e.hitSide=!0;break}ye+=ne*5}return $e}var rs=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};rs.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;vf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ce(Le){for(var Ne=Le.target;Ne;Ne=Ne.parentNode){if(Ne==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ne.className))break}return!1}bn(ie,"paste",function(Le){!ce(Le)||Tr(te,Le)||_d(Le,te)||Me<=11&&setTimeout(gi(te,function(){return z.updateFromDOM()}),20)}),bn(ie,"compositionstart",function(Le){z.composing={data:Le.data,done:!1}}),bn(ie,"compositionupdate",function(Le){z.composing||(z.composing={data:Le.data,done:!1})}),bn(ie,"compositionend",function(Le){z.composing&&(Le.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),bn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),bn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ye(Le){if(!(!ce(Le)||Tr(te,Le))){if(te.somethingSelected())Mu({lineWise:!1,text:te.getSelections()}),Le.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Ne=ac(te);Mu({lineWise:!0,text:Ne.text}),Le.type=="cut"&&te.operation(function(){te.setSelections(Ne.ranges,0,ft),te.replaceSelection("",null,"cut")})}else return;if(Le.clipboardData){Le.clipboardData.clearData();var $e=Vl.text.join(`
`);if(Le.clipboardData.setData("Text",$e),Le.clipboardData.getData("Text")==$e){Le.preventDefault();return}}var wt=Dd(),Nt=wt.firstChild;te.display.lineSpace.insertBefore(wt,te.display.lineSpace.firstChild),Nt.value=Vl.text.join(`
`);var gn=document.activeElement;Tt(Nt),setTimeout(function(){te.display.lineSpace.removeChild(wt),gn.focus(),gn==ie&&ne.showPrimarySelection()},50)}}bn(ie,"copy",ye),bn(ie,"cut",ye)},rs.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},rs.prototype.prepareSelection=function(){var x=Jt(this.cm,!1);return x.focus=document.activeElement==this.div,x},rs.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},rs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rs.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ne=z.doc.sel.primary(),te=ne.from(),ie=ne.to();if(z.display.viewTo==z.display.viewFrom||te.line>=z.display.viewTo||ie.line<z.display.viewFrom){x.removeAllRanges();return}var ce=jc(z,x.anchorNode,x.anchorOffset),ye=jc(z,x.focusNode,x.focusOffset);if(!(ce&&!ce.bad&&ye&&!ye.bad&&Qn(ii(ce,ye),te)==0&&Qn(_i(ce,ye),ie)==0)){var Le=z.display.view,Ne=te.line>=z.display.viewFrom&&bf(z,te)||{node:Le[0].measure.map[2],offset:0},$e=ie.line<z.display.viewTo&&bf(z,ie);if(!$e){var wt=Le[Le.length-1].measure,Nt=wt.maps?wt.maps[wt.maps.length-1]:wt.map;$e={node:Nt[Nt.length-1],offset:Nt[Nt.length-2]-Nt[Nt.length-3]}}if(!Ne||!$e){x.removeAllRanges();return}var gn=x.rangeCount&&x.getRangeAt(0),un;try{un=et(Ne.node,Ne.offset,$e.offset,$e.node)}catch(Jn){}un&&(!pe&&z.state.focused?(x.collapse(Ne.node,Ne.offset),un.collapsed||(x.removeAllRanges(),x.addRange(un))):(x.removeAllRanges(),x.addRange(un)),gn&&x.anchorNode==null?x.addRange(gn):pe&&this.startGracePeriod()),this.rememberSelection()}},rs.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)},rs.prototype.showMultipleSelections=function(x){vt(this.cm.display.cursorDiv,x.cursors),vt(this.cm.display.selectionDiv,x.selection)},rs.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},rs.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return kt(this.div,z)},rs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},rs.prototype.blur=function(){this.div.blur()},rs.prototype.getField=function(){return this.div},rs.prototype.supportsTouch=function(){return!0},rs.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():Or(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)},rs.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},rs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(lt&&he&&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=jc(z,x.anchorNode,x.anchorOffset),te=jc(z,x.focusNode,x.focusOffset);ne&&te&&Or(z,function(){Ds(z.doc,js(ne,te),ft),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},rs.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=_n(te.line-1,rn(x.doc,te.line-1).length)),ie.ch==rn(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=_n(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ce,ye,Le;te.line==z.viewFrom||(ce=Fa(x,te.line))==0?(ye=ir(z.view[0].line),Le=z.view[0].node):(ye=ir(z.view[ce].line),Le=z.view[ce-1].node.nextSibling);var Ne=Fa(x,ie.line),$e,wt;if(Ne==z.view.length-1?($e=z.viewTo-1,wt=z.lineDiv.lastChild):($e=ir(z.view[Ne+1].line)-1,wt=z.view[Ne+1].node.previousSibling),!Le)return!1;for(var Nt=x.doc.splitLines(ch(x,Le,wt,ye,$e)),gn=Un(x.doc,_n(ye,0),_n($e,rn(x.doc,$e).text.length));Nt.length>1&&gn.length>1;)if(jt(Nt)==jt(gn))Nt.pop(),gn.pop(),$e--;else if(Nt[0]==gn[0])Nt.shift(),gn.shift(),ye++;else break;for(var un=0,Jn=0,gr=Nt[0],Hr=gn[0],ti=Math.min(gr.length,Hr.length);un<ti&&gr.charCodeAt(un)==Hr.charCodeAt(un);)++un;for(var fi=jt(Nt),Xr=jt(gn),xi=Math.min(fi.length-(Nt.length==1?un:0),Xr.length-(gn.length==1?un:0));Jn<xi&&fi.charCodeAt(fi.length-Jn-1)==Xr.charCodeAt(Xr.length-Jn-1);)++Jn;if(Nt.length==1&&gn.length==1&&ye==te.line)for(;un&&un>te.ch&&fi.charCodeAt(fi.length-Jn-1)==Xr.charCodeAt(Xr.length-Jn-1);)un--,Jn++;Nt[Nt.length-1]=fi.slice(0,fi.length-Jn).replace(/^\u200b+/,""),Nt[0]=Nt[0].slice(un).replace(/\u200b+$/,"");var da=_n(ye,un),ya=_n($e,gn.length?jt(gn).length-Jn:0);if(Nt.length>1||Nt[0]||Qn(da,ya))return al(x.doc,Nt,da,ya,"+input"),!0},rs.prototype.ensurePolled=function(){this.forceCompositionEnd()},rs.prototype.reset=function(){this.forceCompositionEnd()},rs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},rs.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))},rs.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&Or(this.cm,function(){return Ni(x.cm)})},rs.prototype.setUneditable=function(x){x.contentEditable="false"},rs.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||gi(this.cm,Md)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},rs.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},rs.prototype.onContextMenu=function(){},rs.prototype.resetPosition=function(){},rs.prototype.needsContentAttribute=!0;function bf(x,z){var ne=Ja(x,z.line);if(!ne||ne.hidden)return null;var te=rn(x.doc,z.line),ie=ri(ne,te,z.line),ce=cr(te,x.doc.direction),ye="left";if(ce){var Le=Gt(ce,z.ch);ye=Le%2?"right":"left"}var Ne=Yi(ie.map,z.ch,ye);return Ne.offset=Ne.collapse=="right"?Ne.end:Ne.start,Ne}function uh(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function oc(x,z){return z&&(x.bad=!0),x}function ch(x,z,ne,te,ie){var ce="",ye=!1,Le=x.doc.lineSeparator(),Ne=!1;function $e(un){return function(Jn){return Jn.id==un}}function wt(){ye&&(ce+=Le,Ne&&(ce+=Le),ye=Ne=!1)}function Nt(un){un&&(wt(),ce+=un)}function gn(un){if(un.nodeType==1){var Jn=un.getAttribute("cm-text");if(Jn){Nt(Jn);return}var gr=un.getAttribute("cm-marker"),Hr;if(gr){var ti=x.findMarks(_n(te,0),_n(ie+1,0),$e(+gr));ti.length&&(Hr=ti[0].find(0))&&Nt(Un(x.doc,Hr.from,Hr.to).join(Le));return}if(un.getAttribute("contenteditable")=="false")return;var fi=/^(pre|div|p|li|table|br)$/i.test(un.nodeName);if(!/^br$/i.test(un.nodeName)&&un.textContent.length==0)return;fi&&wt();for(var Xr=0;Xr<un.childNodes.length;Xr++)gn(un.childNodes[Xr]);/^(pre|p)$/i.test(un.nodeName)&&(Ne=!0),fi&&(ye=!0)}else un.nodeType==3&&Nt(un.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;gn(z),z!=ne;)z=z.nextSibling,Ne=!1;return ce}function jc(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return oc(x.clipPos(_n(x.display.viewTo-1)),!0);z=null,ne=0}else for(te=z;;te=te.parentNode){if(!te||te==x.display.lineDiv)return null;if(te.parentNode&&te.parentNode==x.display.lineDiv)break}for(var ie=0;ie<x.display.view.length;ie++){var ce=x.display.view[ie];if(ce.node==te)return dh(ce,z,ne)}}function dh(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!kt(te,z))return oc(_n(ir(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ce=x.rest?jt(x.rest):x.line;return oc(_n(ir(ce),ce.text.length),ie)}var ye=z.nodeType==3?z:null,Le=z;for(!ye&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ye=z.firstChild,ne&&(ne=ye.nodeValue.length));Le.parentNode!=te;)Le=Le.parentNode;var Ne=x.measure,$e=Ne.maps;function wt(Hr,ti,fi){for(var Xr=-1;Xr<($e?$e.length:0);Xr++)for(var xi=Xr<0?Ne.map:$e[Xr],da=0;da<xi.length;da+=3){var ya=xi[da+2];if(ya==Hr||ya==ti){var xo=ir(Xr<0?x.line:x.rest[Xr]),fs=xi[da]+fi;return(fi<0||ya!=Hr)&&(fs=xi[da+(fi?1:0)]),_n(xo,fs)}}}var Nt=wt(ye,Le,ne);if(Nt)return oc(Nt,ie);for(var gn=Le.nextSibling,un=ye?ye.nodeValue.length-ne:0;gn;gn=gn.nextSibling){if(Nt=wt(gn,gn.firstChild,0),Nt)return oc(_n(Nt.line,Nt.ch-un),ie);un+=gn.textContent.length}for(var Jn=Le.previousSibling,gr=ne;Jn;Jn=Jn.previousSibling){if(Nt=wt(Jn,Jn.firstChild,-1),Nt)return oc(_n(Nt.line,Nt.ch+gr),ie);gr+=Jn.textContent.length}}var ds=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Ae,this.hasSelection=!1,this.composing=null};ds.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),ot&&(ie.style.width="0px"),bn(ie,"input",function(){ge&&Me>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),bn(ie,"paste",function(ye){Tr(te,ye)||_d(ye,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ce(ye){if(!Tr(te,ye)){if(te.somethingSelected())Mu({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Le=ac(te);Mu({lineWise:!0,text:Le.text}),ye.type=="cut"?te.setSelections(Le.ranges,null,ft):(ne.prevInput="",ie.value=Le.text.join(`
`),Tt(ie))}else return;ye.type=="cut"&&(te.state.cutIncoming=+new Date)}}bn(ie,"cut",ce),bn(ie,"copy",ce),bn(x.scroller,"paste",function(ye){if(!(La(x,ye)||Tr(te,ye))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Le=new Event("paste");Le.clipboardData=ye.clipboardData,ie.dispatchEvent(Le)}}),bn(x.lineSpace,"selectstart",function(ye){La(x,ye)||Mi(ye)}),bn(ie,"compositionstart",function(){var ye=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:ye,range:te.markText(ye,te.getCursor("to"),{className:"CodeMirror-composing"})}}),bn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},ds.prototype.createField=function(x){this.wrapper=Dd(),this.textarea=this.wrapper.firstChild},ds.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},ds.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=Jt(x);if(x.options.moveInputWithCursor){var ie=to(x,ne.sel.primary().head,"div"),ce=z.wrapper.getBoundingClientRect(),ye=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+ye.top-ce.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+ye.left-ce.left))}return te},ds.prototype.showSelection=function(x){var z=this.cm,ne=z.display;vt(ne.cursorDiv,x.cursors),vt(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},ds.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&&Tt(this.textarea),ge&&Me>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ge&&Me>=9&&(this.hasSelection=null))}},ds.prototype.getField=function(){return this.textarea},ds.prototype.supportsTouch=function(){return!1},ds.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||it()!=this.textarea))try{this.textarea.focus()}catch(x){}},ds.prototype.blur=function(){this.textarea.blur()},ds.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ds.prototype.receivedFocus=function(){this.slowPoll()},ds.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},ds.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)},ds.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||On(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&&Me>=9&&this.hasSelection===ie||_e&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var ce=ie.charCodeAt(0);if(ce==8203&&!te&&(te="\u200B"),ce==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,Le=Math.min(te.length,ie.length);ye<Le&&te.charCodeAt(ye)==ie.charCodeAt(ye);)++ye;return Or(z,function(){Md(z,ie.slice(ye),te.length-ye,null,x.composing?"*compose":null),ie.length>1e3||ie.indexOf(`
`)>-1?ne.value=x.prevInput="":x.prevInput=ie,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ds.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ds.prototype.onKeyPress=function(){ge&&Me>=9&&(this.hasSelection=null),this.fastPoll()},ds.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ce=Ts(ne,x),ye=te.scroller.scrollTop;if(!ce||ke)return;var Le=ne.options.resetSelectionOnContextMenu;Le&&ne.doc.sel.contains(ce)==-1&&gi(ne,Ds)(ne.doc,js(ce),ft);var Ne=ie.style.cssText,$e=z.wrapper.style.cssText,wt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(x.clientY-wt.top-5)+"px; left: "+(x.clientX-wt.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 Nt;Ee&&(Nt=window.scrollY),te.input.focus(),Ee&&window.scrollTo(null,Nt),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=un,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function gn(){if(ie.selectionStart!=null){var gr=ne.somethingSelected(),Hr="\u200B"+(gr?ie.value:"");ie.value="\u21DA",ie.value=Hr,z.prevInput=gr?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=Hr.length,te.selForContextMenu=ne.doc.sel}}function un(){if(z.contextMenuPending==un&&(z.contextMenuPending=!1,z.wrapper.style.cssText=$e,ie.style.cssText=Ne,ge&&Me<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ye),ie.selectionStart!=null)){(!ge||ge&&Me<9)&&gn();var gr=0,Hr=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?gi(ne,qu)(ne):gr++<10?te.detectingSelectAll=setTimeout(Hr,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(Hr,200)}}if(ge&&Me>=9&&gn(),be){Ea(x);var Jn=function(){Wr(window,"mouseup",Jn),setTimeout(un,20)};bn(window,"mouseup",Jn)}else setTimeout(un,50)},ds.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},ds.prototype.setUneditable=function(){},ds.prototype.needsContentAttribute=!1;function Hu(x,z){if(z=z?Qt(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=it();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Le.getValue()}var ie;if(x.form&&(bn(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ce=x.form;ie=ce.submit;try{var ye=ce.submit=function(){te(),ce.submit=ie,ce.submit(),ce.submit=ye}}catch(Ne){}}z.finishInit=function(Ne){Ne.save=te,Ne.getTextArea=function(){return x},Ne.toTextArea=function(){Ne.toTextArea=isNaN,te(),x.parentNode.removeChild(Ne.getWrapperElement()),x.style.display="",x.form&&(Wr(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var Le=Wa(function(Ne){return x.parentNode.insertBefore(Ne,x.nextSibling)},z);return Le}function sc(x){x.off=Wr,x.on=bn,x.wheelEventPixels=Dl,x.Doc=Hs,x.splitLines=Bt,x.countColumn=Xe,x.findColumn=An,x.isWordChar=me,x.Pass=an,x.signal=Rn,x.Line=Bn,x.changeEnd=el,x.scrollbarModel=ba,x.Pos=_n,x.cmpPos=Qn,x.modes=or,x.mimeModes=Sr,x.resolveMode=bt,x.getMode=Ft,x.modeExtensions=qt,x.extendMode=qe,x.copyState=_t,x.startState=Kt,x.innerMode=Xt,x.commands=nc,x.keyMap=cs,x.keyName=zu,x.isModifierKey=xc,x.lookupKey=uu,x.normalizeKeyMap=gd,x.StringStream=on,x.SharedTextMarker=yo,x.TextMarker=yu,x.LineWidget=Qu,x.e_preventDefault=Mi,x.e_stopPropagation=Ji,x.e_stop=Ea,x.addClass=st,x.contains=kt,x.rmClass=Ke,x.keyNames=Wl}oh(Wa),Ld(Wa);var fu="iter insert remove copy getEditor constructor".split(" ");for(var Fl in Hs.prototype)Hs.prototype.hasOwnProperty(Fl)&&Lt(fu,Fl)<0&&(Wa.prototype[Fl]=function(x){return function(){return x.apply(this.doc,arguments)}}(Hs.prototype[Fl]));return Li(Hs),Wa.inputStyles={textarea:ds,contenteditable:rs},Wa.defineMode=function(x){!Wa.defaults.mode&&x!="null"&&(Wa.defaults.mode=x),Zn.apply(this,arguments)},Wa.defineMIME=ut,Wa.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),Wa.defineMIME("text/plain","null"),Wa.defineExtension=function(x,z){Wa.prototype[x]=z},Wa.defineDocExtension=function(x,z){Hs.prototype[x]=z},Wa.fromTextArea=Hu,sc(Wa),Wa.version="5.58.2",Wa})},49047:function(Cn,Vt,oe){(function(pe){pe(oe(4631),oe(29589),oe(52539))})(function(pe){"use strict";pe.defineMode("markdown",function(xe,Fe){var ct=pe.getMode(xe,"text/html"),ge=ct.name=="null";function Me(Xe){if(pe.findModeByName){var Ae=pe.findModeByName(Xe);Ae&&(Xe=Ae.mime||Ae.mimes[0])}var Lt=pe.getMode(xe,Xe);return Lt.name=="null"?null:Lt}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.tokenTypeOverrides={});var Ee={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 Ce in Ee)Ee.hasOwnProperty(Ce)&&Fe.tokenTypeOverrides[Ce]&&(Ee[Ce]=Fe.tokenTypeOverrides[Ce]);var he=/^([*\-_])(?:\s*\1){2,}\s*$/,ke=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Je=/^\[(x| )\](?=\s)/i,Pe=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,dt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ot=/^[^#!\[\]*_\\<>` "'(~:]+/,lt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,_e=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ht=" ";function yt(Xe,Ae,Lt){return Ae.f=Ae.inline=Lt,Lt(Xe,Ae)}function Ze(Xe,Ae,Lt){return Ae.f=Ae.block=Lt,Lt(Xe,Ae)}function Qe(Xe){return!Xe||!/\S/.test(Xe.string)}function be(Xe){if(Xe.linkTitle=!1,Xe.linkHref=!1,Xe.linkText=!1,Xe.em=!1,Xe.strong=!1,Xe.strikethrough=!1,Xe.quote=0,Xe.indentedCode=!1,Xe.f==Ke){var Ae=ge;if(!Ae){var Lt=pe.innerMode(ct,Xe.htmlState);Ae=Lt.mode.name=="xml"&&Lt.state.tagStart===null&&!Lt.state.context&&Lt.state.tokenize.isInText}Ae&&(Xe.f=Ue,Xe.block=we,Xe.htmlState=null)}return Xe.trailingSpace=0,Xe.trailingSpaceNewLine=!1,Xe.prevLine=Xe.thisLine,Xe.thisLine={stream:null},null}function we(Xe,Ae){var Lt=Xe.column()===Ae.indentation,cn=Qe(Ae.prevLine.stream),an=Ae.indentedCode,ft=Ae.prevLine.hr,mt=Ae.list!==!1,Yt=(Ae.listStack[Ae.listStack.length-1]||0)+3;Ae.indentedCode=!1;var An=Ae.indentation;if(Ae.indentationDiff===null&&(Ae.indentationDiff=Ae.indentation,mt)){for(Ae.list=null;An<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=An-Ae.listStack[Ae.listStack.length-1])}var dn=!cn&&!ft&&!Ae.prevLine.header&&(!mt||!an)&&!Ae.prevLine.fencedCodeEnd,nn=(Ae.list===!1||ft||cn)&&Ae.indentation<=Yt&&Xe.match(he),jt=null;if(Ae.indentationDiff>=4&&(an||Ae.prevLine.fencedCodeEnd||Ae.prevLine.header||cn))return Xe.skipToEnd(),Ae.indentedCode=!0,Ee.code;if(Xe.eatSpace())return null;if(Lt&&Ae.indentation<=Yt&&(jt=Xe.match(Pe))&&jt[1].length<=6)return Ae.quote=0,Ae.header=jt[1].length,Ae.thisLine.header=!0,Fe.highlightFormatting&&(Ae.formatting="header"),Ae.f=Ae.inline,vt(Ae);if(Ae.indentation<=Yt&&Xe.eat(">"))return Ae.quote=Lt?1:Ae.quote+1,Fe.highlightFormatting&&(Ae.formatting="quote"),Xe.eatSpace(),vt(Ae);if(!nn&&!Ae.setext&&Lt&&Ae.indentation<=Yt&&(jt=Xe.match(ke))){var xn=jt[1]?"ol":"ul";return Ae.indentation=An+Xe.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,Fe.taskLists&&Xe.match(Je,!1)&&(Ae.taskList=!0),Ae.f=Ae.inline,Fe.highlightFormatting&&(Ae.formatting=["list","list-"+xn]),vt(Ae)}else{if(Lt&&Ae.indentation<=Yt&&(jt=Xe.match(lt,!0)))return Ae.quote=0,Ae.fencedEndRE=new RegExp(jt[1]+"+ *$"),Ae.localMode=Fe.fencedCodeBlockHighlighting&&Me(jt[2]||Fe.fencedCodeBlockDefaultMode),Ae.localMode&&(Ae.localState=pe.startState(Ae.localMode)),Ae.f=Ae.block=Ge,Fe.highlightFormatting&&(Ae.formatting="code-block"),Ae.code=-1,vt(Ae);if(Ae.setext||(!dn||!mt)&&!Ae.quote&&Ae.list===!1&&!Ae.code&&!nn&&!nt.test(Xe.string)&&(jt=Xe.lookAhead(1))&&(jt=jt.match(dt)))return Ae.setext?(Ae.header=Ae.setext,Ae.setext=0,Xe.skipToEnd(),Fe.highlightFormatting&&(Ae.formatting="header")):(Ae.header=jt[0].charAt(0)=="="?1:2,Ae.setext=Ae.header),Ae.thisLine.header=!0,Ae.f=Ae.inline,vt(Ae);if(nn)return Xe.skipToEnd(),Ae.hr=!0,Ae.thisLine.hr=!0,Ee.hr;if(Xe.peek()==="[")return yt(Xe,Ae,We)}return yt(Xe,Ae,Ae.inline)}function Ke(Xe,Ae){var Lt=ct.token(Xe,Ae.htmlState);if(!ge){var cn=pe.innerMode(ct,Ae.htmlState);(cn.mode.name=="xml"&&cn.state.tagStart===null&&!cn.state.context&&cn.state.tokenize.isInText||Ae.md_inside&&Xe.current().indexOf(">")>-1)&&(Ae.f=Ue,Ae.block=we,Ae.htmlState=null)}return Lt}function Ge(Xe,Ae){var Lt=Ae.listStack[Ae.listStack.length-1]||0,cn=Ae.indentation<Lt,an=Lt+3;if(Ae.fencedEndRE&&Ae.indentation<=an&&(cn||Xe.match(Ae.fencedEndRE))){Fe.highlightFormatting&&(Ae.formatting="code-block");var ft;return cn||(ft=vt(Ae)),Ae.localMode=Ae.localState=null,Ae.block=we,Ae.f=Ue,Ae.fencedEndRE=null,Ae.code=0,Ae.thisLine.fencedCodeEnd=!0,cn?Ze(Xe,Ae,Ae.block):ft}else return Ae.localMode?Ae.localMode.token(Xe,Ae.localState):(Xe.skipToEnd(),Ee.code)}function vt(Xe){var Ae=[];if(Xe.formatting){Ae.push(Ee.formatting),typeof Xe.formatting=="string"&&(Xe.formatting=[Xe.formatting]);for(var Lt=0;Lt<Xe.formatting.length;Lt++)Ae.push(Ee.formatting+"-"+Xe.formatting[Lt]),Xe.formatting[Lt]==="header"&&Ae.push(Ee.formatting+"-"+Xe.formatting[Lt]+"-"+Xe.header),Xe.formatting[Lt]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Xe.quote?Ae.push(Ee.formatting+"-"+Xe.formatting[Lt]+"-"+Xe.quote):Ae.push("error"))}if(Xe.taskOpen)return Ae.push("meta"),Ae.length?Ae.join(" "):null;if(Xe.taskClosed)return Ae.push("property"),Ae.length?Ae.join(" "):null;if(Xe.linkHref?Ae.push(Ee.linkHref,"url"):(Xe.strong&&Ae.push(Ee.strong),Xe.em&&Ae.push(Ee.em),Xe.strikethrough&&Ae.push(Ee.strikethrough),Xe.emoji&&Ae.push(Ee.emoji),Xe.linkText&&Ae.push(Ee.linkText),Xe.code&&Ae.push(Ee.code),Xe.image&&Ae.push(Ee.image),Xe.imageAltText&&Ae.push(Ee.imageAltText,"link"),Xe.imageMarker&&Ae.push(Ee.imageMarker)),Xe.header&&Ae.push(Ee.header,Ee.header+"-"+Xe.header),Xe.quote&&(Ae.push(Ee.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Xe.quote?Ae.push(Ee.quote+"-"+Xe.quote):Ae.push(Ee.quote+"-"+Fe.maxBlockquoteDepth)),Xe.list!==!1){var cn=(Xe.listStack.length-1)%3;cn?cn===1?Ae.push(Ee.list2):Ae.push(Ee.list3):Ae.push(Ee.list1)}return Xe.trailingSpaceNewLine?Ae.push("trailing-space-new-line"):Xe.trailingSpace&&Ae.push("trailing-space-"+(Xe.trailingSpace%2?"a":"b")),Ae.length?Ae.join(" "):null}function pt(Xe,Ae){if(Xe.match(ot,!0))return vt(Ae)}function Ue(Xe,Ae){var Lt=Ae.text(Xe,Ae);if(typeof Lt!="undefined")return Lt;if(Ae.list)return Ae.list=null,vt(Ae);if(Ae.taskList){var cn=Xe.match(Je,!0)[1]===" ";return cn?Ae.taskOpen=!0:Ae.taskClosed=!0,Fe.highlightFormatting&&(Ae.formatting="task"),Ae.taskList=!1,vt(Ae)}if(Ae.taskOpen=!1,Ae.taskClosed=!1,Ae.header&&Xe.match(/^#+$/,!0))return Fe.highlightFormatting&&(Ae.formatting="header"),vt(Ae);var an=Xe.next();if(Ae.linkTitle){Ae.linkTitle=!1;var ft=an;an==="("&&(ft=")"),ft=(ft+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var mt="^\\s*(?:[^"+ft+"\\\\]+|\\\\\\\\|\\\\.)"+ft;if(Xe.match(new RegExp(mt),!0))return Ee.linkHref}if(an==="`"){var Yt=Ae.formatting;Fe.highlightFormatting&&(Ae.formatting="code"),Xe.eatWhile("`");var An=Xe.current().length;if(Ae.code==0&&(!Ae.quote||An==1))return Ae.code=An,vt(Ae);if(An==Ae.code){var dn=vt(Ae);return Ae.code=0,dn}else return Ae.formatting=Yt,vt(Ae)}else if(Ae.code)return vt(Ae);if(an==="\\"&&(Xe.next(),Fe.highlightFormatting)){var nn=vt(Ae),jt=Ee.formatting+"-escape";return nn?nn+" "+jt:jt}if(an==="!"&&Xe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ae.imageMarker=!0,Ae.image=!0,Fe.highlightFormatting&&(Ae.formatting="image"),vt(Ae);if(an==="["&&Ae.imageMarker&&Xe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ae.imageMarker=!1,Ae.imageAltText=!0,Fe.highlightFormatting&&(Ae.formatting="image"),vt(Ae);if(an==="]"&&Ae.imageAltText){Fe.highlightFormatting&&(Ae.formatting="image");var nn=vt(Ae);return Ae.imageAltText=!1,Ae.image=!1,Ae.inline=Ae.f=kt,nn}if(an==="["&&!Ae.image)return Ae.linkText&&Xe.match(/^.*?\]/)||(Ae.linkText=!0,Fe.highlightFormatting&&(Ae.formatting="link")),vt(Ae);if(an==="]"&&Ae.linkText){Fe.highlightFormatting&&(Ae.formatting="link");var nn=vt(Ae);return Ae.linkText=!1,Ae.inline=Ae.f=Xe.match(/\(.*?\)| ?\[.*?\]/,!1)?kt:Ue,nn}if(an==="<"&&Xe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ae.f=Ae.inline=et,Fe.highlightFormatting&&(Ae.formatting="link");var nn=vt(Ae);return nn?nn+=" ":nn="",nn+Ee.linkInline}if(an==="<"&&Xe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ae.f=Ae.inline=et,Fe.highlightFormatting&&(Ae.formatting="link");var nn=vt(Ae);return nn?nn+=" ":nn="",nn+Ee.linkEmail}if(Fe.xml&&an==="<"&&Xe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var xn=Xe.string.indexOf(">",Xe.pos);if(xn!=-1){var vn=Xe.string.substring(Xe.start,xn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(vn)&&(Ae.md_inside=!0)}return Xe.backUp(1),Ae.htmlState=pe.startState(ct),Ze(Xe,Ae,Ke)}if(Fe.xml&&an==="<"&&Xe.match(/^\/\w*?>/))return Ae.md_inside=!1,"tag";if(an==="*"||an==="_"){for(var Te=1,ue=Xe.pos==1?" ":Xe.string.charAt(Xe.pos-2);Te<3&&Xe.eat(an);)Te++;var le=Xe.peek()||" ",me=!/\s/.test(le)&&(!_e.test(le)||/\s/.test(ue)||_e.test(ue)),fe=!/\s/.test(ue)&&(!_e.test(ue)||/\s/.test(le)||_e.test(le)),se=null,Oe=null;if(Te%2&&(!Ae.em&&me&&(an==="*"||!fe||_e.test(ue))?se=!0:Ae.em==an&&fe&&(an==="*"||!me||_e.test(le))&&(se=!1)),Te>1&&(!Ae.strong&&me&&(an==="*"||!fe||_e.test(ue))?Oe=!0:Ae.strong==an&&fe&&(an==="*"||!me||_e.test(le))&&(Oe=!1)),Oe!=null||se!=null){Fe.highlightFormatting&&(Ae.formatting=se==null?"strong":Oe==null?"em":"strong em"),se===!0&&(Ae.em=an),Oe===!0&&(Ae.strong=an);var dn=vt(Ae);return se===!1&&(Ae.em=!1),Oe===!1&&(Ae.strong=!1),dn}}else if(an===" "&&(Xe.eat("*")||Xe.eat("_"))){if(Xe.peek()===" ")return vt(Ae);Xe.backUp(1)}if(Fe.strikethrough){if(an==="~"&&Xe.eatWhile(an)){if(Ae.strikethrough){Fe.highlightFormatting&&(Ae.formatting="strikethrough");var dn=vt(Ae);return Ae.strikethrough=!1,dn}else if(Xe.match(/^[^\s]/,!1))return Ae.strikethrough=!0,Fe.highlightFormatting&&(Ae.formatting="strikethrough"),vt(Ae)}else if(an===" "&&Xe.match(/^~~/,!0)){if(Xe.peek()===" ")return vt(Ae);Xe.backUp(2)}}if(Fe.emoji&&an===":"&&Xe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ae.emoji=!0,Fe.highlightFormatting&&(Ae.formatting="emoji");var rt=vt(Ae);return Ae.emoji=!1,rt}return an===" "&&(Xe.match(/^ +$/,!1)?Ae.trailingSpace++:Ae.trailingSpace&&(Ae.trailingSpaceNewLine=!0)),vt(Ae)}function et(Xe,Ae){var Lt=Xe.next();if(Lt===">"){Ae.f=Ae.inline=Ue,Fe.highlightFormatting&&(Ae.formatting="link");var cn=vt(Ae);return cn?cn+=" ":cn="",cn+Ee.linkInline}return Xe.match(/^[^>]+/,!0),Ee.linkInline}function kt(Xe,Ae){if(Xe.eatSpace())return null;var Lt=Xe.next();return Lt==="("||Lt==="["?(Ae.f=Ae.inline=st(Lt==="("?")":"]"),Fe.highlightFormatting&&(Ae.formatting="link-string"),Ae.linkHref=!0,vt(Ae)):"error"}var it={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function st(Xe){return function(Ae,Lt){var cn=Ae.next();if(cn===Xe){Lt.f=Lt.inline=Ue,Fe.highlightFormatting&&(Lt.formatting="link-string");var an=vt(Lt);return Lt.linkHref=!1,an}return Ae.match(it[Xe]),Lt.linkHref=!0,vt(Lt)}}function We(Xe,Ae){return Xe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ae.f=Tt,Xe.next(),Fe.highlightFormatting&&(Ae.formatting="link"),Ae.linkText=!0,vt(Ae)):yt(Xe,Ae,Ue)}function Tt(Xe,Ae){if(Xe.match(/^\]:/,!0)){Ae.f=Ae.inline=Ut,Fe.highlightFormatting&&(Ae.formatting="link");var Lt=vt(Ae);return Ae.linkText=!1,Lt}return Xe.match(/^([^\]\\]|\\.)+/,!0),Ee.linkText}function Ut(Xe,Ae){return Xe.eatSpace()?null:(Xe.match(/^[^\s]+/,!0),Xe.peek()===void 0?Ae.linkTitle=!0:Xe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ae.f=Ae.inline=Ue,Ee.linkHref+" url")}var Qt={startState:function(){return{f:we,prevLine:{stream:null},thisLine:{stream:null},block:we,htmlState:null,indentation:0,inline:Ue,text:pt,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(Xe){return{f:Xe.f,prevLine:Xe.prevLine,thisLine:Xe.thisLine,block:Xe.block,htmlState:Xe.htmlState&&pe.copyState(ct,Xe.htmlState),indentation:Xe.indentation,localMode:Xe.localMode,localState:Xe.localMode?pe.copyState(Xe.localMode,Xe.localState):null,inline:Xe.inline,text:Xe.text,formatting:!1,linkText:Xe.linkText,linkTitle:Xe.linkTitle,linkHref:Xe.linkHref,code:Xe.code,em:Xe.em,strong:Xe.strong,strikethrough:Xe.strikethrough,emoji:Xe.emoji,header:Xe.header,setext:Xe.setext,hr:Xe.hr,taskList:Xe.taskList,list:Xe.list,listStack:Xe.listStack.slice(0),quote:Xe.quote,indentedCode:Xe.indentedCode,trailingSpace:Xe.trailingSpace,trailingSpaceNewLine:Xe.trailingSpaceNewLine,md_inside:Xe.md_inside,fencedEndRE:Xe.fencedEndRE}},token:function(Xe,Ae){if(Ae.formatting=!1,Xe!=Ae.thisLine.stream){if(Ae.header=0,Ae.hr=!1,Xe.match(/^\s*$/,!0))return be(Ae),null;if(Ae.prevLine=Ae.thisLine,Ae.thisLine={stream:Xe},Ae.taskList=!1,Ae.trailingSpace=0,Ae.trailingSpaceNewLine=!1,!Ae.localState&&(Ae.f=Ae.block,Ae.f!=Ke)){var Lt=Xe.match(/^\s*/,!0)[0].replace(/\t/g,ht).length;if(Ae.indentation=Lt,Ae.indentationDiff=null,Lt>0)return null}}return Ae.f(Xe,Ae)},innerMode:function(Xe){return Xe.block==Ke?{state:Xe.htmlState,mode:ct}:Xe.localState?{state:Xe.localState,mode:Xe.localMode}:{state:Xe,mode:Qt}},indent:function(Xe,Ae,Lt){return Xe.block==Ke&&ct.indent?ct.indent(Xe.htmlState,Ae,Lt):Xe.localState&&Xe.localMode.indent?Xe.localMode.indent(Xe.localState,Ae,Lt):pe.Pass},blankLine:be,getType:vt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Qt},"xml"),pe.defineMIME("text/markdown","markdown"),pe.defineMIME("text/x-markdown","markdown")})},52539:function(Cn,Vt,oe){(function(pe){pe(oe(4631))})(function(pe){"use strict";pe.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var xe=0;xe<pe.modeInfo.length;xe++){var Fe=pe.modeInfo[xe];Fe.mimes&&(Fe.mime=Fe.mimes[0])}pe.findModeByMIME=function(ct){ct=ct.toLowerCase();for(var ge=0;ge<pe.modeInfo.length;ge++){var Me=pe.modeInfo[ge];if(Me.mime==ct)return Me;if(Me.mimes){for(var Ee=0;Ee<Me.mimes.length;Ee++)if(Me.mimes[Ee]==ct)return Me}}if(/\+xml$/.test(ct))return pe.findModeByMIME("application/xml");if(/\+json$/.test(ct))return pe.findModeByMIME("application/json")},pe.findModeByExtension=function(ct){ct=ct.toLowerCase();for(var ge=0;ge<pe.modeInfo.length;ge++){var Me=pe.modeInfo[ge];if(Me.ext){for(var Ee=0;Ee<Me.ext.length;Ee++)if(Me.ext[Ee]==ct)return Me}}},pe.findModeByFileName=function(ct){for(var ge=0;ge<pe.modeInfo.length;ge++){var Me=pe.modeInfo[ge];if(Me.file&&Me.file.test(ct))return Me}var Ee=ct.lastIndexOf("."),Ce=Ee>-1&&ct.substring(Ee+1,ct.length);if(Ce)return pe.findModeByExtension(Ce)},pe.findModeByName=function(ct){ct=ct.toLowerCase();for(var ge=0;ge<pe.modeInfo.length;ge++){var Me=pe.modeInfo[ge];if(Me.name.toLowerCase()==ct)return Me;if(Me.alias){for(var Ee=0;Ee<Me.alias.length;Ee++)if(Me.alias[Ee].toLowerCase()==ct)return Me}}}})},80785:function(Cn,Vt,oe){(function(pe){pe(oe(4631))})(function(pe){"use strict";pe.defineMode("stex",function(xe,Fe){"use strict";function ct(ot,lt){ot.cmdState.push(lt)}function ge(ot){return ot.cmdState.length>0?ot.cmdState[ot.cmdState.length-1]:null}function Me(ot){var lt=ot.cmdState.pop();lt&&lt.closeBracket()}function Ee(ot){for(var lt=ot.cmdState,nt=lt.length-1;nt>=0;nt--){var _e=lt[nt];if(_e.name!="DEFAULT")return _e}return{styleIdentifier:function(){return null}}}function Ce(ot,lt,nt){return function(){this.name=ot,this.bracketNo=0,this.style=lt,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var he={};he.importmodule=Ce("importmodule","tag",["string","builtin"]),he.documentclass=Ce("documentclass","tag",["","atom"]),he.usepackage=Ce("usepackage","tag",["atom"]),he.begin=Ce("begin","tag",["atom"]),he.end=Ce("end","tag",["atom"]),he.label=Ce("label","tag",["atom"]),he.ref=Ce("ref","tag",["atom"]),he.eqref=Ce("eqref","tag",["atom"]),he.cite=Ce("cite","tag",["atom"]),he.bibitem=Ce("bibitem","tag",["atom"]),he.Bibitem=Ce("Bibitem","tag",["atom"]),he.RBibitem=Ce("RBibitem","tag",["atom"]),he.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ke(ot,lt){ot.f=lt}function Je(ot,lt){var nt;if(ot.match(/^\\[a-zA-Z@]+/)){var _e=ot.current().slice(1);return nt=he.hasOwnProperty(_e)?he[_e]:he.DEFAULT,nt=new nt,ct(lt,nt),ke(lt,dt),nt.style}if(ot.match(/^\\[$&%#{}_]/)||ot.match(/^\\[,;!\/\\]/))return"tag";if(ot.match("\\["))return ke(lt,function(yt,Ze){return Pe(yt,Ze,"\\]")}),"keyword";if(ot.match("\\("))return ke(lt,function(yt,Ze){return Pe(yt,Ze,"\\)")}),"keyword";if(ot.match("$$"))return ke(lt,function(yt,Ze){return Pe(yt,Ze,"$$")}),"keyword";if(ot.match("$"))return ke(lt,function(yt,Ze){return Pe(yt,Ze,"$")}),"keyword";var ht=ot.next();if(ht=="%")return ot.skipToEnd(),"comment";if(ht=="}"||ht=="]"){if(nt=ge(lt),nt)nt.closeBracket(ht),ke(lt,dt);else return"error";return"bracket"}else return ht=="{"||ht=="["?(nt=he.DEFAULT,nt=new nt,ct(lt,nt),"bracket"):/\d/.test(ht)?(ot.eatWhile(/[\w.%]/),"atom"):(ot.eatWhile(/[\w\-_]/),nt=Ee(lt),nt.name=="begin"&&(nt.argument=ot.current()),nt.styleIdentifier())}function Pe(ot,lt,nt){if(ot.eatSpace())return null;if(nt&&ot.match(nt))return ke(lt,Je),"keyword";if(ot.match(/^\\[a-zA-Z@]+/))return"tag";if(ot.match(/^[a-zA-Z]+/))return"variable-2";if(ot.match(/^\\[$&%#{}_]/)||ot.match(/^\\[,;!\/]/)||ot.match(/^[\^_&]/))return"tag";if(ot.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ot.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var _e=ot.next();return _e=="{"||_e=="}"||_e=="["||_e=="]"||_e=="("||_e==")"?"bracket":_e=="%"?(ot.skipToEnd(),"comment"):"error"}function dt(ot,lt){var nt=ot.peek(),_e;return nt=="{"||nt=="["?(_e=ge(lt),_e.openBracket(nt),ot.eat(nt),ke(lt,Je),"bracket"):/[ \t\r]/.test(nt)?(ot.eat(nt),null):(ke(lt,Je),Me(lt),Je(ot,lt))}return{startState:function(){var ot=Fe.inMathMode?function(lt,nt){return Pe(lt,nt)}:Je;return{cmdState:[],f:ot}},copyState:function(ot){return{cmdState:ot.cmdState.slice(),f:ot.f}},token:function(ot,lt){return lt.f(ot,lt)},blankLine:function(ot){ot.f=Je,ot.cmdState.length=0},lineComment:"%"}}),pe.defineMIME("text/x-stex","stex"),pe.defineMIME("text/x-latex","stex")})},29589:function(Cn,Vt,oe){(function(pe){pe(oe(4631))})(function(pe){"use strict";var xe={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};pe.defineMode("xml",function(ct,ge){var Me=ct.indentUnit,Ee={},Ce=ge.htmlMode?xe:Fe;for(var he in Ce)Ee[he]=Ce[he];for(var he in ge)Ee[he]=ge[he];var ke,Je;function Pe(et,kt){function it(Tt){return kt.tokenize=Tt,Tt(et,kt)}var st=et.next();if(st=="<")return et.eat("!")?et.eat("[")?et.match("CDATA[")?it(lt("atom","]]>")):null:et.match("--")?it(lt("comment","-->")):et.match("DOCTYPE",!0,!0)?(et.eatWhile(/[\w\._\-]/),it(nt(1))):null:et.eat("?")?(et.eatWhile(/[\w\._\-]/),kt.tokenize=lt("meta","?>"),"meta"):(ke=et.eat("/")?"closeTag":"openTag",kt.tokenize=dt,"tag bracket");if(st=="&"){var We;return et.eat("#")?et.eat("x")?We=et.eatWhile(/[a-fA-F\d]/)&&et.eat(";"):We=et.eatWhile(/[\d]/)&&et.eat(";"):We=et.eatWhile(/[\w\.\-:]/)&&et.eat(";"),We?"atom":"error"}else return et.eatWhile(/[^&<]/),null}Pe.isInText=!0;function dt(et,kt){var it=et.next();if(it==">"||it=="/"&&et.eat(">"))return kt.tokenize=Pe,ke=it==">"?"endTag":"selfcloseTag","tag bracket";if(it=="=")return ke="equals",null;if(it=="<"){kt.tokenize=Pe,kt.state=Ze,kt.tagName=kt.tagStart=null;var st=kt.tokenize(et,kt);return st?st+" tag error":"tag error"}else return/[\'\"]/.test(it)?(kt.tokenize=ot(it),kt.stringStartCol=et.column(),kt.tokenize(et,kt)):(et.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ot(et){var kt=function(it,st){for(;!it.eol();)if(it.next()==et){st.tokenize=dt;break}return"string"};return kt.isInAttribute=!0,kt}function lt(et,kt){return function(it,st){for(;!it.eol();){if(it.match(kt)){st.tokenize=Pe;break}it.next()}return et}}function nt(et){return function(kt,it){for(var st;(st=kt.next())!=null;){if(st=="<")return it.tokenize=nt(et+1),it.tokenize(kt,it);if(st==">")if(et==1){it.tokenize=Pe;break}else return it.tokenize=nt(et-1),it.tokenize(kt,it)}return"meta"}}function _e(et,kt,it){this.prev=et.context,this.tagName=kt,this.indent=et.indented,this.startOfLine=it,(Ee.doNotIndent.hasOwnProperty(kt)||et.context&&et.context.noIndent)&&(this.noIndent=!0)}function ht(et){et.context&&(et.context=et.context.prev)}function yt(et,kt){for(var it;;){if(!et.context||(it=et.context.tagName,!Ee.contextGrabbers.hasOwnProperty(it)||!Ee.contextGrabbers[it].hasOwnProperty(kt)))return;ht(et)}}function Ze(et,kt,it){return et=="openTag"?(it.tagStart=kt.column(),Qe):et=="closeTag"?be:Ze}function Qe(et,kt,it){return et=="word"?(it.tagName=kt.current(),Je="tag",Ge):Ee.allowMissingTagName&&et=="endTag"?(Je="tag bracket",Ge(et,kt,it)):(Je="error",Qe)}function be(et,kt,it){if(et=="word"){var st=kt.current();return it.context&&it.context.tagName!=st&&Ee.implicitlyClosed.hasOwnProperty(it.context.tagName)&&ht(it),it.context&&it.context.tagName==st||Ee.matchClosing===!1?(Je="tag",we):(Je="tag error",Ke)}else return Ee.allowMissingTagName&&et=="endTag"?(Je="tag bracket",we(et,kt,it)):(Je="error",Ke)}function we(et,kt,it){return et!="endTag"?(Je="error",we):(ht(it),Ze)}function Ke(et,kt,it){return Je="error",we(et,kt,it)}function Ge(et,kt,it){if(et=="word")return Je="attribute",vt;if(et=="endTag"||et=="selfcloseTag"){var st=it.tagName,We=it.tagStart;return it.tagName=it.tagStart=null,et=="selfcloseTag"||Ee.autoSelfClosers.hasOwnProperty(st)?yt(it,st):(yt(it,st),it.context=new _e(it,st,We==it.indented)),Ze}return Je="error",Ge}function vt(et,kt,it){return et=="equals"?pt:(Ee.allowMissing||(Je="error"),Ge(et,kt,it))}function pt(et,kt,it){return et=="string"?Ue:et=="word"&&Ee.allowUnquoted?(Je="string",Ge):(Je="error",Ge(et,kt,it))}function Ue(et,kt,it){return et=="string"?Ue:Ge(et,kt,it)}return{startState:function(et){var kt={tokenize:Pe,state:Ze,indented:et||0,tagName:null,tagStart:null,context:null};return et!=null&&(kt.baseIndent=et),kt},token:function(et,kt){if(!kt.tagName&&et.sol()&&(kt.indented=et.indentation()),et.eatSpace())return null;ke=null;var it=kt.tokenize(et,kt);return(it||ke)&&it!="comment"&&(Je=null,kt.state=kt.state(ke||it,et,kt),Je&&(it=Je=="error"?it+" error":Je)),it},indent:function(et,kt,it){var st=et.context;if(et.tokenize.isInAttribute)return et.tagStart==et.indented?et.stringStartCol+1:et.indented+Me;if(st&&st.noIndent)return pe.Pass;if(et.tokenize!=dt&&et.tokenize!=Pe)return it?it.match(/^(\s*)/)[0].length:0;if(et.tagName)return Ee.multilineTagIndentPastTag!==!1?et.tagStart+et.tagName.length+2:et.tagStart+Me*(Ee.multilineTagIndentFactor||1);if(Ee.alignCDATA&&/<!\[CDATA\[/.test(kt))return 0;var We=kt&&/^<(\/)?([\w_:\.-]*)/.exec(kt);if(We&&We[1])for(;st;)if(st.tagName==We[2]){st=st.prev;break}else if(Ee.implicitlyClosed.hasOwnProperty(st.tagName))st=st.prev;else break;else if(We)for(;st;){var Tt=Ee.contextGrabbers[st.tagName];if(Tt&&Tt.hasOwnProperty(We[2]))st=st.prev;else break}for(;st&&st.prev&&!st.startOfLine;)st=st.prev;return st?st.indent+Me:et.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ee.htmlMode?"html":"xml",helperType:Ee.htmlMode?"html":"xml",skipAttribute:function(et){et.state==pt&&(et.state=Ge)},xmlCurrentTag:function(et){return et.tagName?{name:et.tagName,close:et.type=="closeTag"}:null},xmlCurrentContext:function(et){for(var kt=[],it=et.context;it;it=it.prev)it.tagName&&kt.push(it.tagName);return kt.reverse()}}}),pe.defineMIME("text/xml","xml"),pe.defineMIME("application/xml","xml"),pe.mimeModes.hasOwnProperty("text/html")||pe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(Cn,Vt,oe){"use strict";oe.d(Vt,{hP:function(){return vn}});var pe=function(Te,ue){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,me){le.__proto__=me}||function(le,me){for(var fe in me)Object.prototype.hasOwnProperty.call(me,fe)&&(le[fe]=me[fe])})(Te,ue)};function xe(Te,ue){function le(){this.constructor=Te}pe(Te,ue),Te.prototype=ue===null?Object.create(ue):(le.prototype=ue.prototype,new le)}function Fe(Te,ue,le,me){return new(le||(le=Promise))(function(fe,se){function Oe(zt){try{Pt(me.next(zt))}catch(Zt){se(Zt)}}function rt(zt){try{Pt(me.throw(zt))}catch(Zt){se(Zt)}}function Pt(zt){var Zt;zt.done?fe(zt.value):(Zt=zt.value,Zt instanceof le?Zt:new le(function(en){en(Zt)})).then(Oe,rt)}Pt((me=me.apply(Te,ue||[])).next())})}function ct(Te,ue){var le,me,fe,se,Oe={label:0,sent:function(){if(1&fe[0])throw fe[1];return fe[1]},trys:[],ops:[]};return se={next:rt(0),throw:rt(1),return:rt(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function rt(Pt){return function(zt){return function(Zt){if(le)throw new TypeError("Generator is already executing.");for(;Oe;)try{if(le=1,me&&(fe=2&Zt[0]?me.return:Zt[0]?me.throw||((fe=me.return)&&fe.call(me),0):me.next)&&!(fe=fe.call(me,Zt[1])).done)return fe;switch(me=0,fe&&(Zt=[2&Zt[0],fe.value]),Zt[0]){case 0:case 1:fe=Zt;break;case 4:return Oe.label++,{value:Zt[1],done:!1};case 5:Oe.label++,me=Zt[1],Zt=[0];continue;case 7:Zt=Oe.ops.pop(),Oe.trys.pop();continue;default:if(fe=Oe.trys,!((fe=fe.length>0&&fe[fe.length-1])||Zt[0]!==6&&Zt[0]!==2)){Oe=0;continue}if(Zt[0]===3&&(!fe||Zt[1]>fe[0]&&Zt[1]<fe[3])){Oe.label=Zt[1];break}if(Zt[0]===6&&Oe.label<fe[1]){Oe.label=fe[1],fe=Zt;break}if(fe&&Oe.label<fe[2]){Oe.label=fe[2],Oe.ops.push(Zt);break}fe[2]&&Oe.ops.pop(),Oe.trys.pop();continue}Zt=ue.call(Te,Oe)}catch(en){Zt=[6,en],me=0}finally{le=fe=0}if(5&Zt[0])throw Zt[1];return{value:Zt[0]?Zt[1]:void 0,done:!0}}([Pt,zt])}}}function ge(){for(var Te=0,ue=0,le=arguments.length;ue<le;ue++)Te+=arguments[ue].length;var me=Array(Te),fe=0;for(ue=0;ue<le;ue++)for(var se=arguments[ue],Oe=0,rt=se.length;Oe<rt;Oe++,fe++)me[fe]=se[Oe];return me}var Me=function(){function Te(){}return Te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Te.setAttributes=function(ue,le){for(var me=0,fe=le;me<fe.length;me++){var se=fe[me],Oe=se[0],rt=se[1];ue.setAttribute(Oe,rt)}},Te.createRect=function(ue,le,me){var fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return fe.setAttribute("width",ue.toString()),fe.setAttribute("height",le.toString()),me&&Te.setAttributes(fe,me),fe},Te.createLine=function(ue,le,me,fe,se){var Oe=document.createElementNS("http://www.w3.org/2000/svg","line");return Oe.setAttribute("x1",ue.toString()),Oe.setAttribute("y1",le.toString()),Oe.setAttribute("x2",me.toString()),Oe.setAttribute("y2",fe.toString()),se&&Te.setAttributes(Oe,se),Oe},Te.createPolygon=function(ue,le){var me=document.createElementNS("http://www.w3.org/2000/svg","polygon");return me.setAttribute("points",ue),le&&Te.setAttributes(me,le),me},Te.createCircle=function(ue,le){var me=document.createElementNS("http://www.w3.org/2000/svg","circle");return me.setAttribute("cx",(ue/2).toString()),me.setAttribute("cy",(ue/2).toString()),me.setAttribute("r",ue.toString()),le&&Te.setAttributes(me,le),me},Te.createEllipse=function(ue,le,me){var fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return fe.setAttribute("cx",(ue/2).toString()),fe.setAttribute("cy",(le/2).toString()),fe.setAttribute("rx",(ue/2).toString()),fe.setAttribute("ry",(le/2).toString()),me&&Te.setAttributes(fe,me),fe},Te.createGroup=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","g");return ue&&Te.setAttributes(le,ue),le},Te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Te.createMarker=function(ue,le,me,fe,se,Oe,rt){var Pt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Te.setAttributes(Pt,[["id",ue],["orient",le],["markerWidth",me.toString()],["markerHeight",fe.toString()],["refX",se.toString()],["refY",Oe.toString()]]),Pt.appendChild(rt),Pt},Te.createText=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","text");return le.setAttribute("x","0"),le.setAttribute("y","0"),ue&&Te.setAttributes(le,ue),le},Te.createTSpan=function(ue,le){var me=document.createElementNS("http://www.w3.org/2000/svg","tspan");return me.textContent=ue,le&&Te.setAttributes(me,le),me},Te.createImage=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","image");return ue&&Te.setAttributes(le,ue),le},Te.createPoint=function(ue,le){var me=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return me.x=ue,me.y=le,me},Te.createPath=function(ue,le){var me=document.createElementNS("http://www.w3.org/2000/svg","path");return me.setAttribute("d",ue),le&&Te.setAttributes(me,le),me},Te}(),Ee=function(){function Te(){}return Te.addKey=function(ue){Te.key=ue},Object.defineProperty(Te,"isLicensed",{get:function(){return!!Te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Te.key)},enumerable:!1,configurable:!0}),Te}(),Ce=function(){function Te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Te.prototype.rasterize=function(ue,le,me){var fe=this;return new Promise(function(se){var Oe=me!==void 0?me:document.createElement("canvas");ue===null&&(fe.markersOnly=!0,fe.naturalSize=!1);var rt=document.createElementNS("http://www.w3.org/2000/svg","svg");rt.setAttribute("xmlns","http://www.w3.org/2000/svg"),rt.setAttribute("width",le.width.baseVal.valueAsString),rt.setAttribute("height",le.height.baseVal.valueAsString),rt.setAttribute("viewBox","0 0 "+le.viewBox.baseVal.width.toString()+" "+le.viewBox.baseVal.height.toString()),rt.innerHTML=le.innerHTML,fe.naturalSize===!0?(rt.width.baseVal.value=ue.naturalWidth,rt.height.baseVal.value=ue.naturalHeight):fe.width!==void 0&&fe.height!==void 0&&(rt.width.baseVal.value=fe.width,rt.height.baseVal.value=fe.height),Oe.width=rt.width.baseVal.value,Oe.height=rt.height.baseVal.value;var Pt=rt.outerHTML,zt=Oe.getContext("2d");fe.markersOnly!==!0&&zt.drawImage(ue,0,0,Oe.width,Oe.height);var Zt=window.URL,en=new Image(Oe.width,Oe.height);en.setAttribute("crossOrigin","anonymous");var Gt=new Blob([Pt],{type:"image/svg+xml"}),tr=Zt.createObjectURL(Gt);en.onload=function(){zt.drawImage(en,0,0),Zt.revokeObjectURL(tr);var cr=Oe.toDataURL(fe.imageType,fe.imageQuality);se(cr)},en.src=tr})},Te}(),he=function(){},ke=function(){function Te(ue){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ue+"_"}return Object.defineProperty(Te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Te.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(Te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Te.prototype.addClass=function(ue){return this.styleSheet===void 0&&this.addStyleSheet(),ue.name=""+this.classNamePrefix+ue.localName,this.classes.push(ue),this.styleSheet.sheet.insertRule("."+ue.name+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length),ue},Te.prototype.addRule=function(ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ue),this.styleSheet.sheet.insertRule(ue.selector+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length)},Te.prototype.addStyleSheet=function(){var ue;this.styleSheet=document.createElement("style"),((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).appendChild(this.styleSheet),this.addRule(new Je("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Je("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Je("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Pe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Pe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Te.prototype.removeStyleSheet=function(){var ue;this.styleSheet&&(((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Te}(),Je=function(Te,ue){this.selector=Te,this.style=ue},Pe=function(Te,ue){this.localName=Te,this.style=ue},dt=function(){function Te(ue,le,me,fe,se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ue,this.displayMode=le,this.markerItems=me,this.uiStyleSettings=fe,this.styles=se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Te.prototype.show=function(ue){var le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ue,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var me=document.createElement("div");me.className=this.toolbarBlockStyleClass.name,me.style.whiteSpace="nowrap",this.uiContainer.appendChild(me),this.addActionButton(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(se){var Oe=document.createElement("div");Oe.className=""+le.toolbarButtonStyleClass.name,Oe.setAttribute("data-type-name",se.typeName),Oe.innerHTML=se.icon,Oe.addEventListener("click",function(){le.markerToolbarButtonClicked(Oe,se)}),le.buttons.push(Oe),le.markerButtons.push(Oe)}),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()},Te.prototype.addButtonClickListener=function(ue){this.buttonClickListeners.push(ue)},Te.prototype.removeButtonClickListener=function(ue){this.buttonClickListeners.indexOf(ue)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ue),1)},Te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ue=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var le=0;le<this.markerButtons.length;le++)le<ue||le===ue&&this.markerButtons.length-1===ue?this.markerButtonBlock.appendChild(this.markerButtons[le]):(le===ue&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[le]))}},Te.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")},Te.prototype.resetButtonStyles=function(){var ue=this;this.buttons.forEach(function(le){le.className=le.className.replace(ue.uiStyleSettings.toolbarButtonStyleColorsClassName?ue.uiStyleSettings.toolbarButtonStyleColorsClassName:ue.toolbarButtonStyleColorsClass.name,"").trim(),le.className=le.className.replace(ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ue.toolbarActiveButtonStyleColorsClass.name,"").trim(),le.className+=" "+(ue.uiStyleSettings.toolbarButtonStyleColorsClassName?ue.uiStyleSettings.toolbarButtonStyleColorsClassName:ue.toolbarButtonStyleColorsClass.name)})},Te.prototype.addActionButton=function(ue,le,me){var fe=this,se=document.createElement("div");switch(se.className=""+this.toolbarButtonStyleClass.name,se.innerHTML=le,se.setAttribute("data-action",me),se.addEventListener("click",function(){fe.actionToolbarButtonClicked(se,me)}),me){case"select":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":se.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":se.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":se.style.fill=this.uiStyleSettings.closeButtonColor}ue.appendChild(se),this.buttons.push(se)},Te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Pe("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 Pe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Pe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Pe("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 Pe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var ue=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Pe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
padding: `+ue+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Pe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Pe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Je("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Te.prototype.markerToolbarButtonClicked=function(ue,le){this.setActiveButton(ue),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(me){return me("marker",le)}),this.markerButtonOverflowBlock.style.display="none"},Te.prototype.actionToolbarButtonClicked=function(ue,le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(me){return me("action",le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Te.prototype.setActiveButton=function(ue){this.resetButtonStyles(),ue.className=ue.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ue.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Te.prototype.setActiveMarkerButton=function(ue){var le=this.markerButtons.find(function(me){return me.getAttribute("data-type-name")===ue});le&&this.setActiveButton(le)},Te.prototype.setCurrentMarker=function(ue){var le=this;this.currentMarker=ue,this.buttons.filter(function(me){return/delete|notes/.test(me.getAttribute("data-action"))}).forEach(function(me){le.currentMarker===void 0?(me.style.fillOpacity="0.4",me.style.pointerEvents="none"):(me.style.fillOpacity="1",me.style.pointerEvents="all")})},Te}(),ot=function(){function Te(ue,le,me,fe){this.panels=[],this.panelButtons=[],this.markerjsContainer=ue,this.displayMode=le,this.uiStyleSettings=me,this.styles=fe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Te.prototype.addStyles=function(){var ue;this.toolboxStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Pe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Pe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox-panel-row_colors",`
background-color: `+((ue=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ue!==void 0?ue:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Pe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
padding: `+le+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Pe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Pe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Je("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Je("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Te.prototype.show=function(ue){var le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ue,this.uiContainer.className=this.toolboxStyleClass.name+" "+((le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Te.prototype.setPanelButtons=function(ue){var le,me,fe=this;this.panels=ue,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((me=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&me!==void 0?me:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(se){var Oe;se.uiStyleSettings=fe.uiStyleSettings;var rt=document.createElement("div");rt.className=fe.toolboxButtonStyleClass.name+" "+((Oe=fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Oe!==void 0?Oe:fe.toolboxButtonStyleColorsClass.name),rt.innerHTML=se.icon,rt.title=se.title,rt.addEventListener("click",function(){fe.panelButtonClick(se)}),fe.panelButtons.push(rt),fe.buttonRow.appendChild(rt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Te.prototype.panelButtonClick=function(ue){var le=this,me=-1;if(ue!==this.activePanel){me=this.panels.indexOf(ue),this.panelRow.innerHTML="";var fe=ue.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=ue}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){le.displayMode==="inline"?le.panelRow.style.display="none":le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(se,Oe){var rt,Pt;se.className=le.toolboxButtonStyleClass.name+" "+(Oe===me?""+((rt=le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&rt!==void 0?rt:le.toolboxActiveButtonStyleColorsClass.name):""+((Pt=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pt!==void 0?Pt:le.toolboxButtonStyleColorsClass.name))})},Te}(),lt=function(Te,ue){this.title=Te,this.icon=ue},nt=function(Te){function ue(le,me,fe,se){var Oe=Te.call(this,le,se||'<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 Oe.colors=[],Oe.addTransparent=!1,Oe.colorBoxes=[],Oe.colors=me,Oe.currentColor=fe,Oe.setCurrentColor=Oe.setCurrentColor.bind(Oe),Oe.getColorBox=Oe.getColorBox.bind(Oe),Oe}return xe(ue,Te),ue.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.overflow="hidden",me.style.whiteSpace="nowrap",this.colors.forEach(function(fe){var se=le.getColorBox(fe);me.appendChild(se),le.colorBoxes.push(se)}),me},ue.prototype.getColorBox=function(le){var me=this,fe=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-fe,Oe=document.createElement("div");Oe.style.display="inline-block",Oe.style.boxSizing="content-box",Oe.style.width=se-2+"px",Oe.style.height=se-2+"px",Oe.style.padding="1px",Oe.style.marginRight="2px",Oe.style.marginBottom="2px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.borderRadius=(se+2)/2+"px",Oe.style.borderColor=le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){me.setCurrentColor(le,Oe)});var rt=document.createElement("div");return rt.style.display="inline-block",rt.style.width=se-2+"px",rt.style.height=se-2+"px",rt.style.backgroundColor=le,rt.style.borderRadius=se/2+"px",le==="transparent"&&(rt.style.fill=this.uiStyleSettings.toolboxAccentColor,rt.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>`),Oe.appendChild(rt),Oe},ue.prototype.setCurrentColor=function(le,me){var fe=this;this.currentColor=le,this.colorBoxes.forEach(function(se){se.style.borderColor=se===me?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(le)},ue}(lt),_e=function(){function Te(ue,le,me){this._state="new",this._isSelected=!1,this._container=ue,this._overlayContainer=le,this.globalSettings=me,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Te.prototype.ownsTarget=function(ue){return!1},Object.defineProperty(Te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Te.prototype.pointerDown=function(ue,le){},Te.prototype.dblClick=function(ue,le){},Te.prototype.manipulate=function(ue){},Te.prototype.pointerUp=function(ue){this.stateChanged()},Te.prototype.dispose=function(){},Te.prototype.addMarkerVisualToContainer=function(ue){this.container.childNodes.length>0?this.container.insertBefore(ue,this.container.childNodes[0]):this.container.appendChild(ue)},Te.prototype.getState=function(){return{typeName:Te.typeName,state:this.state,notes:this.notes}},Te.prototype.restoreState=function(ue){this._state=ue.state,this.notes=ue.notes},Te.prototype.scale=function(ue,le){},Te.prototype.colorChanged=function(ue){this.onColorChanged&&this.onColorChanged(ue),this.stateChanged()},Te.prototype.fillColorChanged=function(ue){this.onFillColorChanged&&this.onFillColorChanged(ue),this.stateChanged()},Te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ue=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ue.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ue)&&this.onStateChanged(this)}},Te.typeName="MarkerBase",Te}(),ht=function(){function Te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Te.prototype.findGripByVisual=function(ue){return this.topLeft.ownsTarget(ue)?this.topLeft:this.topCenter.ownsTarget(ue)?this.topCenter:this.topRight.ownsTarget(ue)?this.topRight:this.centerLeft.ownsTarget(ue)?this.centerLeft:this.centerRight.ownsTarget(ue)?this.centerRight:this.bottomLeft.ownsTarget(ue)?this.bottomLeft:this.bottomCenter.ownsTarget(ue)?this.bottomCenter:this.bottomRight.ownsTarget(ue)?this.bottomRight:void 0},Te}(),yt=function(){function Te(){this.GRIP_SIZE=10,this.visual=Me.createGroup(),this.visual.appendChild(Me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Te.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},Te}(),Ze=function(){function Te(){}return Te.toITransformMatrix=function(ue){return{a:ue.a,b:ue.b,c:ue.c,d:ue.d,e:ue.e,f:ue.f}},Te.toSVGMatrix=function(ue,le){return ue.a=le.a,ue.b=le.b,ue.c=le.c,ue.d=le.d,ue.e=le.e,ue.f=le.f,ue},Te}(),Qe=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.left=0,se.top=0,se.width=0,se.height=0,se.defaultSize={x:50,y:20},se.offsetX=0,se.offsetY=0,se.rotationAngle=0,se.CB_DISTANCE=10,se._suppressMarkerCreateEvent=!1,se.container.transform.baseVal.appendItem(Me.createTransform()),se.setupControlBox(),se}return xe(ue,Te),Object.defineProperty(ue.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"visual",{get:function(){return this._visual},set:function(le){this._visual=le;var me=Me.createTransform();this._visual.transform.baseVal.appendItem(me)},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!!Te.prototype.ownsTarget.call(this,le)||!!(this.controlGrips.findGripByVisual(le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(le))},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.left=le.x,this.top=le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var fe=this.unrotatePoint(le);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(me),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(me)){this.activeGrip=this.rotatorGrip;var se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=se.x-this.width/2,this.top=se.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Oe=this.container.transform.baseVal.getItem(0);Oe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Oe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ue.prototype.pointerUp=function(le){var me=this.state;Te.prototype.pointerUp.call(this,le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(le),this._state="select",me==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ue.prototype.moveVisual=function(le){this.visual.style.transform="translate("+le.x+"px, "+le.y+"px)"},ue.prototype.manipulate=function(le){var me=this.unrotatePoint(le);this.state==="creating"?this.resize(le):this.state==="move"?(this.left=this.manipulationStartLeft+(me.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(me.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(me):this.state==="rotate"&&this.rotate(le)},ue.prototype.resize=function(le){var me=this.manipulationStartLeft,fe=this.manipulationStartWidth,se=this.manipulationStartTop,Oe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:me=this.manipulationStartLeft+le.x-this.manipulationStartX,fe=this.manipulationStartWidth+this.manipulationStartLeft-me;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:fe=this.manipulationStartWidth+le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:se=this.manipulationStartTop+le.y-this.manipulationStartY,Oe=this.manipulationStartHeight+this.manipulationStartTop-se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Oe=this.manipulationStartHeight+le.y-this.manipulationStartY}fe>=0?(this.left=me,this.width=fe):(this.left=me+fe,this.width=-fe),Oe>=0?(this.top=se,this.height=Oe):(this.top=se+Oe,this.height=-Oe),this.setSize()},ue.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ue.prototype.rotate=function(le){if(Math.abs(le.x-this.centerX)>.1){var me=Math.sign(le.x-this.centerX);this.rotationAngle=180*Math.atan((le.y-this.centerY)/(le.x-this.centerX))/Math.PI+90*me,this.applyRotation()}},ue.prototype.applyRotation=function(){var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0)},ue.prototype.rotatePoint=function(le){if(this.rotationAngle===0)return le;var me=this.container.getCTM(),fe=Me.createPoint(le.x,le.y);return{x:(fe=fe.matrixTransform(me)).x,y:fe.y}},ue.prototype.unrotatePoint=function(le){if(this.rotationAngle===0)return le;var me=this.container.getCTM();me=me.inverse();var fe=Me.createPoint(le.x,le.y);return{x:(fe=fe.matrixTransform(me)).x,y:fe.y}},ue.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=Me.createGroup();var le=Me.createTransform();le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(le),this.container.appendChild(this.controlBox),this.controlRect=Me.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=Me.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 ht,this.addControlGrips(),this.controlBox.style.display="none"},ue.prototype.adjustControlBox=function(){var le=this.controlBox.transform.baseVal.getItem(0);le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(le,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()},ue.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()},ue.prototype.createGrip=function(){var le=new yt;return le.visual.transform.baseVal.appendItem(Me.createTransform()),this.controlBox.appendChild(le.visual),le},ue.prototype.positionGrips=function(){var le=this.controlGrips.topLeft.GRIP_SIZE,me=-le/2,fe=me,se=(this.width+this.CB_DISTANCE)/2-le/2,Oe=(this.height+this.CB_DISTANCE)/2-le/2,rt=this.height+this.CB_DISTANCE-le/2,Pt=this.width+this.CB_DISTANCE-le/2;this.positionGrip(this.controlGrips.topLeft.visual,me,fe),this.positionGrip(this.controlGrips.topCenter.visual,se,fe),this.positionGrip(this.controlGrips.topRight.visual,Pt,fe),this.positionGrip(this.controlGrips.centerLeft.visual,me,Oe),this.positionGrip(this.controlGrips.centerRight.visual,Pt,Oe),this.positionGrip(this.controlGrips.bottomLeft.visual,me,rt),this.positionGrip(this.controlGrips.bottomCenter.visual,se,rt),this.positionGrip(this.controlGrips.bottomRight.visual,Pt,rt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,fe-3*this.CB_DISTANCE)},ue.prototype.positionGrip=function(le,me,fe){var se=le.transform.baseVal.getItem(0);se.setTranslate(me,fe),le.transform.baseVal.replaceItem(se,0)},ue.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ue.prototype.showControlBox=function(){this.controlBox.style.display=""},ue.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Te.prototype.getState.call(this))},ue.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var me=le;this.left=me.left,this.top=me.top,this.width=me.width,this.height=me.height,this.rotationAngle=me.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,me.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,me.containerTransformMatrix))},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me);var fe=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:fe.x*le,y:fe.y*me});this.left=se.x,this.top=se.y,this.width=this.width*le,this.height=this.height*me,this.adjustControlBox()},ue}(_e),be=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=Me.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)},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){Te.prototype.setSize.call(this),Me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){Te.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this))},ue.prototype.restoreState=function(le){var me=le;this.fillColor=me.fillColor,this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.opacity=me.opacity,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.setSize()},ue.title="Rectangle marker",ue}(Qe),we=function(Te){function ue(le,me,fe,se){var Oe=Te.call(this,le,se||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Oe.widths=[],Oe.widthBoxes=[],Oe.widths=me,Oe.currentWidth=fe,Oe.setCurrentWidth=Oe.setCurrentWidth.bind(Oe),Oe}return xe(ue,Te),ue.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2",this.widths.forEach(function(fe){var se=document.createElement("div");se.style.display="flex",se.style.flexGrow="2",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=fe===le.currentWidth?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentWidth(fe,se)}),me.appendChild(se);var Oe=document.createElement("div");Oe.innerText=fe.toString(),Oe.style.marginRight="5px",se.appendChild(Oe);var rt=document.createElement("div");rt.style.minHeight="20px",rt.style.flexGrow="2",rt.style.display="flex",rt.style.alignItems="center";var Pt=document.createElement("hr");Pt.style.minWidth="20px",Pt.style.border="0px",Pt.style.borderTop=fe+"px solid "+le.uiStyleSettings.toolboxColor,Pt.style.flexGrow="2",rt.appendChild(Pt),se.appendChild(rt),le.widthBoxes.push(se)}),me},ue.prototype.setCurrentWidth=function(le,me){var fe=this;this.currentWidth=le,this.widthBoxes.forEach(function(se){se.style.borderColor=se===me?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ue}(lt),Ke=function(Te){function ue(le,me,fe,se){var Oe=Te.call(this,le,se||'<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 Oe.styles=[],Oe.styleBoxes=[],Oe.styles=me,Oe.currentStyle=fe,Oe.setCurrentStyle=Oe.setCurrentStyle.bind(Oe),Oe}return xe(ue,Te),ue.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2",this.styles.forEach(function(fe){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/le.styles.length-5+"%",se.style.borderColor=fe===le.currentStyle?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentStyle(fe,se)}),me.appendChild(se);var Oe=document.createElement("div");Oe.style.minHeight="20px",Oe.style.flexGrow="2",Oe.style.overflow="hidden";var rt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(fe!==""?'stroke-dasharray="'+fe+'"':"")+` />
</svg>`;Oe.innerHTML=rt,se.appendChild(Oe),le.styleBoxes.push(se)}),me},ue.prototype.setCurrentStyle=function(le,me){var fe=this;this.currentStyle=le,this.styleBoxes.forEach(function(se){se.style.borderColor=se===me?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ue}(lt),Ge=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.strokeColor=fe.defaultColor,se.strokeWidth=fe.defaultStrokeWidth,se.strokeDasharray=fe.defaultStrokeDasharray,se.strokePanel=new nt("Line color",fe.defaultColorSet,fe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new we("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return xe(ue,Te),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="FrameMarker",ue.title="Frame marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ue}(be),vt=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"},pt=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.x1=0,se.y1=0,se.x2=0,se.y2=0,se.defaultLength=50,se.manipulationStartX=0,se.manipulationStartY=0,se.manipulationStartX1=0,se.manipulationStartY1=0,se.manipulationStartX2=0,se.manipulationStartY2=0,se.setupControlBox(),se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!!Te.prototype.ownsTarget.call(this,le)||!(!this.grip1.ownsTarget(le)&&!this.grip2.ownsTarget(le))},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.state==="new"&&(this.x1=le.x,this.y1=le.y,this.x2=le.x,this.y2=le.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(me)?this.activeGrip=this.grip1:this.grip2.ownsTarget(me)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ue.prototype.pointerUp=function(le){var me=this.state;Te.prototype.pointerUp.call(this,le),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(le),this._state="select",me==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ue.prototype.adjustVisual=function(){},ue.prototype.manipulate=function(le){this.state==="creating"?this.resize(le):this.state==="move"?(this.x1=this.manipulationStartX1+le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(le)},ue.prototype.resize=function(le){switch(this.activeGrip){case this.grip1:this.x1=le.x,this.y1=le.y;break;case this.grip2:case void 0:this.x2=le.x,this.y2=le.y}this.adjustVisual(),this.adjustControlBox()},ue.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=Me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ue.prototype.adjustControlBox=function(){this.positionGrips()},ue.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ue.prototype.createGrip=function(){var le=new yt;return le.visual.transform.baseVal.appendItem(Me.createTransform()),this.controlBox.appendChild(le.visual),le},ue.prototype.positionGrips=function(){var le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-le/2,this.y1-le/2),this.positionGrip(this.grip2.visual,this.x2-le/2,this.y2-le/2)},ue.prototype.positionGrip=function(le,me,fe){var se=le.transform.baseVal.getItem(0);se.setTranslate(me,fe),le.transform.baseVal.replaceItem(se,0)},ue.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Te.prototype.getState.call(this))},ue.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var me=le;this.x1=me.x1,this.y1=me.y1,this.x2=me.x2,this.y2=me.y2},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.x1=this.x1*le,this.y1=this.y1*me,this.x2=this.x2*le,this.y2=this.y2*me,this.adjustVisual(),this.adjustControlBox()},ue}(_e),Ue=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.strokeColor=fe.defaultColor,se.strokeWidth=fe.defaultStrokeWidth,se.strokeDasharray=fe.defaultStrokeDasharray,se.strokePanel=new nt("Line color",fe.defaultColorSet,fe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new we("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorLine&&le!==this.visibleLine)},ue.prototype.createVisual=function(){this.visual=Me.createGroup(),this.selectorLine=Me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Me.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)},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ue.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()),Me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var me=le;this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.createVisual(),this.adjustVisual()},ue.typeName="LineMarker",ue.title="Line marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ue}(pt),et=function(Te){function ue(le,me,fe,se){var Oe=Te.call(this,le,se||'<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 Oe.fonts=[],Oe.fontBoxes=[],Oe.fonts=me,Oe.currentFont=fe,Oe.setCurrentFont=Oe.setCurrentFont.bind(Oe),Oe}return xe(ue,Te),ue.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.overflow="hidden",me.style.flexGrow="2",this.fonts.forEach(function(fe){var se=document.createElement("div");se.style.display="inline-block",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/le.fonts.length-5+"%",se.style.borderColor=fe===le.currentFont?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentFont(fe,se)}),me.appendChild(se);var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.minHeight="20px",Oe.style.flexGrow="2",Oe.style.fontFamily=fe,Oe.style.overflow="hidden";var rt=document.createElement("div");rt.style.whiteSpace="nowrap",rt.style.overflow="hidden",rt.style.textOverflow="ellipsis",rt.innerHTML="The quick brown fox jumps over the lazy dog",Oe.appendChild(rt),se.appendChild(Oe),le.fontBoxes.push(se)}),me},ue.prototype.setCurrentFont=function(le,me){var fe=this;this.currentFont=le,this.fontBoxes.forEach(function(se){se.style.borderColor=se===me?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ue}(lt),kt=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=fe.defaultColor,se.fontFamily=fe.defaultFontFamily,se.defaultSize={x:100,y:30},se.setColor=se.setColor.bind(se),se.setFont=se.setFont.bind(se),se.renderText=se.renderText.bind(se),se.sizeText=se.sizeText.bind(se),se.textEditDivClicked=se.textEditDivClicked.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.setSize=se.setSize.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.colorPanel=new nt("Color",fe.defaultColorSet,fe.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new et("Font",fe.defaultFontFamilies,fe.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){if(Te.prototype.ownsTarget.call(this,le)||le===this.visual||le===this.textElement||le===this.bgRectangle)return!0;var me=!1;return this.textElement.childNodes.forEach(function(fe){fe===le&&(me=!0)}),me},ue.prototype.createVisual=function(){this.visual=Me.createGroup(),this.bgRectangle=Me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Me.createTransform()),this.textElement.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.renderText=function(){var le=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(me){le.textElement.appendChild(Me.createTSpan(me.trim()===""?" ":me.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ue.prototype.getTextScale=function(){var le=this.textElement.getBBox(),me=1;if(le.width>0&&le.height>0){var fe=(1*this.width-this.width*this.padding*2/100)/le.width,se=(1*this.height-this.height*this.padding*2/100)/le.height;me=Math.min(fe,se)}return me},ue.prototype.getTextPosition=function(le){var me=this.textElement.getBBox(),fe=0,se=0;return me.width>0&&me.height>0&&(fe=(this.width-me.width*le)/2,se=this.height/2-me.height*le/2),{x:fe,y:se}},ue.prototype.sizeText=function(){var le=this.textElement.getBBox(),me=this.getTextScale(),fe=this.getTextPosition(me);fe.y-=le.y*me,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+fe.x+"px, "+fe.y+"px) scale("+me+", "+me+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(fe.x,fe.y),this.textElement.transform.baseVal.getItem(1).setScale(me,me))},ue.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(le.x-this.pointerDownPoint.x)>5||Math.abs(le.y-this.pointerDownPoint.y)>5)},ue.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.isMoved=!0,this.setSize(),this.sizeText()},ue.prototype.setSize=function(){Te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ue.prototype.pointerUp=function(le){var me=this.state;me==="creating"&&(this._suppressMarkerCreateEvent=!0),Te.prototype.pointerUp.call(this,le),this.setSize(),(me==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ue.prototype.showTextEditor=function(){var le=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(me){me.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var me=Number.parseFloat(le.textEditor.style.fontSize);le.textEditor.clientWidth>=Number.parseInt(le.textEditor.style.maxWidth)&&me>.9;)me-=.1,le.textEditor.style.fontSize=Math.max(me,.9)+"em"}),this.textEditor.addEventListener("keyup",function(me){me.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(me){if(me.clipboardData){var fe=me.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(fe)),me.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){le.textEditDivClicked(le.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ue.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var le=this.getTextScale(),me=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),fe=this.textElement.getBBox(),se={x:fe.width*le,y:fe.height*le};me.x-=se.x/2,me.y-=se.y/2,this.textEditor.style.top=me.y+"px",this.textEditor.style.left=me.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-me.x+"px",this.textEditor.style.fontSize=Math.max(16*le,12)+"px",this.textElement.style.display="none"}},ue.prototype.textEditDivClicked=function(le){this.text=le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ue.prototype.select=function(){Te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ue.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Te.prototype.deselect.call(this)},ue.prototype.dblClick=function(le,me){Te.prototype.dblClick.call(this,le,me),this.showTextEditor()},ue.prototype.setColor=function(le){this.textElement&&Me.setAttributes(this.textElement,[["fill",le]]),this.color=le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(le)},ue.prototype.setFont=function(le){this.textElement&&Me.setAttributes(this.textElement,[["font-family",le]]),this.fontFamily=le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ue.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ue.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var me=le;this.color=me.color,this.fontFamily=me.fontFamily,this.padding=me.padding,this.text=me.text,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.setSize(),this.sizeText(),this.positionTextEditor()},ue.typeName="TextMarker",ue.title="Text marker",ue.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>',ue}(Qe),it=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=fe.defaultColor,se.lineWidth=fe.defaultStrokeWidth,se.pixelRatio=fe.freehandPixelRatio,se.setColor=se.setColor.bind(se),se.addCanvas=se.addCanvas.bind(se),se.finishCreation=se.finishCreation.bind(se),se.setLineWidth=se.setLineWidth.bind(se),se.colorPanel=new nt("Color",fe.defaultColorSet,fe.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new we("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.drawingImage)},ue.prototype.createVisual=function(){this.visual=Me.createGroup(),this.drawingImage=Me.createImage(),this.visual.appendChild(this.drawingImage);var le=Me.createTransform();this.visual.transform.baseVal.appendItem(le),this.addMarkerVisualToContainer(this.visual)},ue.prototype.pointerDown=function(le,me){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(le.x,le.y),this.drawing=!0):Te.prototype.pointerDown.call(this,le,me)},ue.prototype.manipulate=function(le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(le.x,le.y),this.canvasContext.stroke()):Te.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Te.prototype.resize.call(this,le),Me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Te.prototype.pointerUp.call(this,le)},ue.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)},ue.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.select.call(this)},ue.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.deselect.call(this)},ue.prototype.finishCreation=function(){for(var le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),me=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],fe=me[0],se=me[1],Oe=me[2],rt=me[3],Pt=!1,zt=0;zt<this.canvasElement.height;zt++)for(var Zt=0;Zt<this.canvasElement.width;Zt++)le.data[zt*this.canvasElement.width*4+4*Zt+3]>0&&(Pt=!0,zt<se&&(se=zt),Zt<fe&&(fe=Zt),zt>rt&&(rt=zt),Zt>Oe&&(Oe=Zt));if(Pt){this.left=fe/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Oe-fe)/this.pixelRatio,this.height=(rt-se)/this.pixelRatio;var en=document.createElement("canvas");en.width=Oe-fe,en.height=rt-se,en.getContext("2d").putImageData(this.canvasContext.getImageData(fe,se,Oe-fe,rt-se),0,0),this.drawingImgUrl=en.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ue.prototype.setDrawingImage=function(){Me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ue.prototype.setColor=function(le){this.color=le,this.colorChanged(le)},ue.prototype.setLineWidth=function(le){this.lineWidth=le},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({drawingImgUrl:this.drawingImgUrl},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){this.createVisual(),Te.prototype.restoreState.call(this,le),this.drawingImgUrl=le.drawingImgUrl,this.setDrawingImage()},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.setDrawingImage()},ue.typeName="FreehandMarker",ue.title="Freehand marker",ue.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>',ue}(Qe),st=function(Te){function ue(le,me,fe){var se=Te.call(this,le,fe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return se.typeBoxes=[],se.currentType=me,se.setCurrentType=se.setCurrentType.bind(se),se}return xe(ue,Te),ue.prototype.getUi=function(){var le=this,me=document.createElement("div");me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2";for(var fe=function(rt){var Pt="both";switch(rt){case 0:Pt="both";break;case 1:Pt="start";break;case 2:Pt="end";break;case 3:Pt="none"}var zt=document.createElement("div");if(zt.style.display="flex",zt.style.flexGrow="2",zt.style.alignItems="center",zt.style.justifyContent="space-between",zt.style.padding="5px",zt.style.borderWidth="2px",zt.style.borderStyle="solid",zt.style.borderColor=Pt===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",zt.addEventListener("click",function(){le.setCurrentType(Pt,zt)}),me.appendChild(zt),Pt==="both"||Pt==="start"){var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.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="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Zt.style.marginLeft="5px",zt.appendChild(Zt)}var en=document.createElement("div");en.style.display="flex",en.style.alignItems="center",en.style.minHeight="20px",en.style.flexGrow="2";var Gt=document.createElement("hr");if(Gt.style.minWidth="20px",Gt.style.border="0px",Gt.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),Gt.style.flexGrow="2",en.appendChild(Gt),zt.appendChild(en),Pt==="both"||Pt==="end"){var tr=document.createElement("div");tr.style.display="flex",tr.style.alignItems="center",tr.style.minHeight="20px",tr.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="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,tr.style.marginRight="5px",zt.appendChild(tr)}se.typeBoxes.push(zt)},se=this,Oe=0;Oe<4;Oe++)fe(Oe);return me},ue.prototype.setCurrentType=function(le,me){var fe=this;this.currentType=le,this.typeBoxes.forEach(function(se){se.style.borderColor=se===me?fe.uiStyleSettings!==void 0?fe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ue}(lt),We=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.arrowType="end",se.arrowBaseHeight=10,se.arrowBaseWidth=10,se.getArrowPoints=se.getArrowPoints.bind(se),se.setArrowType=se.setArrowType.bind(se),se.arrowTypePanel=new st("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.arrow1&&le!==this.arrow2)},ue.prototype.getArrowPoints=function(le,me){var fe=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return le-fe/2+","+(me+se/2)+" "+le+","+(me-se/2)+" "+(le+fe/2)+","+(me+se/2)},ue.prototype.createTips=function(){this.arrow1=Me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.arrow2)},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(Te.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",Me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var le=0;Math.abs(this.x1-this.x2)>.1&&(le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var me=this.arrow1.transform.baseVal.getItem(0);me.setRotate(le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(me,0);var fe=this.arrow2.transform.baseVal.getItem(0);fe.setRotate(le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(fe,0)}},ue.prototype.setArrowType=function(le){this.arrowType=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({arrowType:this.arrowType},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var me=le;this.arrowType=me.arrowType,this.createTips(),this.adjustVisual()},ue.typeName="ArrowMarker",ue.title="Arrow marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ue}(Ue),Tt=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.fillColor=fe.defaultFillColor,se.strokeWidth=0,se.fillPanel=new nt("Color",fe.defaultColorSet,fe.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return xe(ue,Te),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="CoverMarker",ue.title="Cover marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ue}(be),Ut=function(Te){function ue(le,me,fe,se){var Oe=Te.call(this,le,se||'<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 Oe.opacities=[],Oe.opacityBoxes=[],Oe.opacities=me,Oe.currentOpacity=fe,Oe.setCurrentOpacity=Oe.setCurrentOpacity.bind(Oe),Oe}return xe(ue,Te),ue.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2",me.style.justifyContent="space-between",this.opacities.forEach(function(fe){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="center",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=fe===le.currentOpacity?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentOpacity(fe,se)}),me.appendChild(se);var Oe=document.createElement("div");Oe.innerText=100*fe+"%",se.appendChild(Oe),le.opacityBoxes.push(se)}),me},ue.prototype.setCurrentOpacity=function(le,me){var fe=this;this.currentOpacity=le,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===me?fe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ue}(lt),Qt=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=fe.defaultHighlightColor,se.strokeWidth=0,se.opacity=fe.defaultHighlightOpacity,se.fillPanel=new nt("Color",fe.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new Ut("Opacity",fe.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return xe(ue,Te),ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="HighlightMarker",ue.title="Highlight marker",ue.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>',ue}(Tt),Xe='<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>',Lt=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.bgColor="transparent",se.tipPosition={x:0,y:0},se.tipBase1Position={x:0,y:0},se.tipBase2Position={x:0,y:0},se.tipMoving=!1,se.color=fe.defaultStrokeColor,se.bgColor=fe.defaultFillColor,se.fontFamily=fe.defaultFontFamily,se.defaultSize={x:100,y:30},se.setBgColor=se.setBgColor.bind(se),se.getTipPoints=se.getTipPoints.bind(se),se.positionTip=se.positionTip.bind(se),se.setTipPoints=se.setTipPoints.bind(se),se.colorPanel=new nt("Text color",fe.defaultColorSet,se.color,Xe),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new nt("Fill color",fe.defaultColorSet,se.bgColor,Ae),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new et("Font",fe.defaultFontFamilies,fe.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new yt,se.tipGrip.visual.transform.baseVal.appendItem(Me.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return Te.prototype.ownsTarget.call(this,le)||this.tipGrip.ownsTarget(le)||this.tip===le},ue.prototype.createTip=function(){Me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ue.prototype.pointerDown=function(le,me){this.state==="new"&&Te.prototype.pointerDown.call(this,le,me),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(me)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Te.prototype.pointerDown.call(this,le,me)},ue.prototype.pointerUp=function(le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Te.prototype.pointerUp.call(this,le);else{var me=this.state==="creating";Te.prototype.pointerUp.call(this,le),this.setTipPoints(me),this.positionTip()}},ue.prototype.manipulate=function(le){if(this.tipMoving){var me=this.unrotatePoint(le);this.tipPosition={x:me.x-this.manipulationStartLeft,y:me.y-this.manipulationStartTop},this.positionTip()}else Te.prototype.manipulate.call(this,le)},ue.prototype.setBgColor=function(le){this.bgRectangle&&this.tip&&(Me.setAttributes(this.bgRectangle,[["fill",le]]),Me.setAttributes(this.tip,[["fill",le]])),this.bgColor=le,this.fillColorChanged(le)},ue.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},ue.prototype.setTipPoints=function(le){le===void 0&&(le=!1);var me=Math.min(this.height/2,15),fe=this.height/5;le&&(this.tipPosition={x:me+fe/2,y:this.height+20});var se=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:me,y:0},this.tipBase2Position={x:me+fe,y:0}):(this.tipBase1Position={x:0,y:me},this.tipBase2Position={x:0,y:me+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-me-fe,y:0},this.tipBase2Position={x:this.width-me,y:0}):(this.tipBase1Position={x:this.width,y:me},this.tipBase2Position={x:this.width,y:me+fe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?se<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(fe=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-me-fe,y:this.height},this.tipBase2Position={x:this.width-me,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-me-fe},this.tipBase2Position={x:this.width,y:this.height-me}):se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(fe=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:me,y:this.height},this.tipBase2Position={x:me+fe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-me},this.tipBase2Position={x:0,y:this.height-me-fe})},ue.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.positionTip()},ue.prototype.positionTip=function(){Me.setAttributes(this.tip,[["points",this.getTipPoints()]]);var le=this.tipGrip.visual.transform.baseVal.getItem(0);le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(le,0)},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ue.prototype.select=function(){this.positionTip(),Te.prototype.select.call(this)},ue.prototype.getState=function(){var le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var me=le;this.bgColor=me.bgColor,this.tipPosition=me.tipPosition,Te.prototype.restoreState.call(this,le),this.createTip(),this.setTipPoints()},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.tipPosition={x:this.tipPosition.x*le,y:this.tipPosition.y*me},this.positionTip()},ue.typeName="CalloutMarker",ue.title="Callout marker",ue.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>',ue}(kt),cn=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.strokeColor=fe.defaultColor,se.strokeWidth=fe.defaultStrokeWidth,se.strokeDasharray=fe.defaultStrokeDasharray,se.fillColor=fe.defaultFillColor,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.setOpacity=se.setOpacity.bind(se),se.createVisual=se.createVisual.bind(se),se.strokePanel=new nt("Line color",ge(fe.defaultColorSet,["transparent"]),fe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new nt("Fill color",ge(fe.defaultColorSet,["transparent"]),se.fillColor,Ae),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new we("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.opacityPanel=new Ut("Opacity",fe.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=Me.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)},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){Te.prototype.setSize.call(this),Me.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ue.prototype.pointerUp=function(le){Te.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var me=le;this.fillColor=me.fillColor,this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.opacity=me.opacity,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.setSize()},ue.typeName="EllipseMarker",ue.title="Ellipse marker",ue.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>',ue}(Qe),an=function(Te){function ue(le,me,fe){return Te.call(this,le,me,fe)||this}return xe(ue,Te),Object.defineProperty(ue.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.tip1&&le!==this.tip2)},ue.prototype.createTips=function(){this.tip1=Me.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(Me.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Me.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(Me.createTransform()),this.visual.appendChild(this.tip2)},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(Te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Me.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()]]),Me.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 le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),me=this.tip1.transform.baseVal.getItem(0);me.setRotate(le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(me,0);var fe=this.tip2.transform.baseVal.getItem(0);fe.setRotate(le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(fe,0)}},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le),this.createTips(),this.adjustVisual()},ue.typeName="MeasurementMarker",ue.title="Measurement marker",ue.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>',ue}(Ue),ft=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.strokePanel.colors=fe.defaultColorSet,se.fillColor="transparent",se}return xe(ue,Te),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="EllipseFrameMarker",ue.title="Ellipse frame marker",ue.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>',ue}(cn),mt=function(){function Te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Te.prototype.addUndoStep=function(ue){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ue)||(this.undoStack.push(ue),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ue)&&this.redoStack.splice(0,this.redoStack.length))},Te.prototype.replaceLastUndoStep=function(ue){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ue)},Te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Te.prototype.undo=function(){if(this.undoStack.length>1){var ue=this.undoStack.pop();return ue!==void 0&&this.redoStack.push(ue),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Te}(),Yt=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.curveX=0,se.curveY=0,se.manipulationStartCurveX=0,se.manipulationStartCurveY=0,se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.positionGrips=se.positionGrips.bind(se),se.addControlGrips=se.addControlGrips.bind(se),se.adjustVisual=se.adjustVisual.bind(se),se.setupControlBox=se.setupControlBox.bind(se),se.resize=se.resize.bind(se),se.strokeColor=fe.defaultColor,se.strokeWidth=fe.defaultStrokeWidth,se.strokeDasharray=fe.defaultStrokeDasharray,se.strokePanel=new nt("Line color",fe.defaultColorSet,fe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new we("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorCurve&&le!==this.visibleCurve&&!this.curveGrip.ownsTarget(le))},ue.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ue.prototype.createVisual=function(){this.visual=Me.createGroup(),this.selectorCurve=Me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Me.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)},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=le.x,this.curveY=le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(me)&&(this.activeGrip=this.curveGrip,this._state="resize")},ue.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setupControlBox=function(){Te.prototype.setupControlBox.call(this),this.curveControlLine1=Me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Me.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)},ue.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Te.prototype.addControlGrips.call(this)},ue.prototype.positionGrips=function(){Te.prototype.positionGrips.call(this);var le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-le/2,this.curveY-le/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()))},ue.prototype.manipulate=function(le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+le.y-this.manipulationStartY),Te.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){this.activeGrip===this.curveGrip&&(this.curveX=le.x,this.curveY=le.y),Te.prototype.resize.call(this,le),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual()},ue.prototype.scale=function(le,me){this.curveX=this.curveX*le,this.curveY=this.curveY*me,Te.prototype.scale.call(this,le,me)},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Te.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var me=le;this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.curveX=me.curveX,this.curveY=me.curveY,this.createVisual(),this.adjustVisual()},ue.typeName="CurveMarker",ue.title="Curve marker",ue.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>',ue}(pt),An=function(Te){function ue(le,me,fe){var se=Te.call(this,le,me,fe)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.textColor="transparent",se.fontSize="1rem",se.isMoved=!1,se.captionText="Caption",se.PADDING=5,se.captionBoxWidth=0,se.captionBoxHeight=0,se.strokeColor=fe.defaultColor,se.strokeWidth=fe.defaultStrokeWidth,se.strokeDasharray=fe.defaultStrokeDasharray,se.fillColor=fe.defaultFillColor,se.textColor=fe.defaultStrokeColor,se.fontFamily=fe.defaultFontFamily,se.fontSize=fe.defaultCaptionFontSize,se.captionText=fe.defaultCaptionText,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se.sizeCaption=se.sizeCaption.bind(se),se.setCaptionText=se.setCaptionText.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.finishTextEditing=se.finishTextEditing.bind(se),se.setFont=se.setFont.bind(se),se.setTextColor=se.setTextColor.bind(se),se.strokePanel=new nt("Line color",ge(fe.defaultColorSet,["transparent"]),se.strokeColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new nt("Fill color",ge(fe.defaultColorSet,["transparent"]),se.fillColor,Ae),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new we("Line width",fe.defaultStrokeWidths,fe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ke("Line style",fe.defaultStrokeDasharrays,fe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.fontFamilyPanel=new et("Font",fe.defaultFontFamilies,fe.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.textColorPanel=new nt("Text color",fe.defaultColorSet,se.textColor,Xe),se.textColorPanel.onColorChanged=se.setTextColor,se}return xe(ue,Te),ue.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.frame&&le!==this.captionBg&&le!==this.captionElement)},ue.prototype.createVisual=function(){this.visual=Me.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Me.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Me.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=Me.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()},ue.prototype.setCaptionText=function(le){this.captionText=le,this.captionElement.textContent=this.captionText,this.sizeCaption()},ue.prototype.pointerDown=function(le,me){Te.prototype.pointerDown.call(this,le,me),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(le.x-this.pointerDownPoint.x)>5||Math.abs(le.y-this.pointerDownPoint.y)>5)},ue.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.setSize()},ue.prototype.sizeCaption=function(){var le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=le.width+2*this.PADDING,this.captionBoxHeight=le.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Me.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')"]]),Me.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')"]])},ue.prototype.showTextEditor=function(){var le=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(me){me.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(me){me.key==="Enter"&&le.finishTextEditing(le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(me){me.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){le.finishTextEditing(le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){le.finishTextEditing(le.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ue.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"))},ue.prototype.finishTextEditing=function(le){this.setCaptionText(le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ue.prototype.setFont=function(le){this.captionElement&&Me.setAttributes(this.captionElement,[["font-family",le]]),this.fontFamily=le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ue.prototype.setTextColor=function(le){this.captionElement&&Me.setAttributes(this.captionElement,[["fill",le]]),this.textColor=le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ue.prototype.setSize=function(){Te.prototype.setSize.call(this),Me.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ue.prototype.pointerUp=function(le){Te.prototype.pointerUp.call(this,le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ue.prototype.dblClick=function(le,me){Te.prototype.dblClick.call(this,le,me),this.showTextEditor()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.frame&&Me.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.captionBg&&Me.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.frame&&Me.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.frame&&Me.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=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},Te.prototype.getState.call(this));return le.typeName=this.typeName,le},ue.prototype.restoreState=function(le){var me=le;this.fillColor=me.fillColor,this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.textColor=me.textColor,this.fontFamily=me.fontFamily,this.captionText=me.captionText,this.fontSize=me.fontSize,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,me){Te.prototype.scale.call(this,le,me),this.setSize()},ue.typeName="CaptionFrameMarker",ue.title="Caption frame marker",ue.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>',ue}(Qe),dn=function(){function Te(ue,le){le===void 0&&(le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ue,this.cancelable=le}return Object.defineProperty(Te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Te.prototype.preventDefault=function(){this._defaultPrevented=!0},Te}(),nn=function(Te){function ue(le,me,fe){var se=Te.call(this,le,!1)||this;return se.dataUrl=me,se.state=fe,se}return xe(ue,Te),ue}(dn),jt=function(Te){function ue(le,me,fe){fe===void 0&&(fe=!1);var se=Te.call(this,le,fe)||this;return se.marker=me,se}return xe(ue,Te),ue}(dn),xn=function(){function Te(){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 Te.prototype.addEventListener=function(ue,le){this[ue].push(le)},Te.prototype.removeEventListener=function(ue,le){var me=this[ue].indexOf(le);me>-1&&this[ue].splice(me,1)},Te}(),vn=function(){function Te(ue){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new vt,this._isOpen=!1,this.undoRedoManager=new mt,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=Te.instanceCounter++,this.styles=new ke(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ue,this.targetRoot=document.body,this.width=ue.clientWidth,this.height=ue.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(Te.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ge,it,We,kt,ft,cn,Qt,Lt,an,Tt,Ue,Yt,An]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ge,it,We,kt,cn,Qt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ge,it,We,kt,Qt]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ue){var le=this;this._availableMarkerTypes.splice(0),ue.forEach(function(me){if(typeof me=="string"){var fe=le.ALL_MARKER_TYPES.find(function(se){return se.typeName===me});fe!==void 0&&le._availableMarkerTypes.push(fe)}else le._availableMarkerTypes.push(me)})},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ue){this._zoomLevel=ue,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(Te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ee.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Te.prototype.show=function(){var ue=this;this.styles.styleSheetRoot===void 0&&he.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=he.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(le){return le(new dn(ue))})},Te.prototype.render=function(){return Fe(this,void 0,void 0,function(){var ue;return ct(this,function(le){switch(le.label){case 0:return this.setCurrentMarker(),(ue=new Ce).naturalSize=this.renderAtNaturalSize,ue.imageType=this.renderImageType,ue.imageQuality=this.renderImageQuality,ue.markersOnly=this.renderMarkersOnly,ue.width=this.renderWidth,ue.height=this.renderHeight,[4,ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return le.sent(),[4,ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,le.sent()]}})})},Te.prototype.close=function(ue){var le=this;if(ue===void 0&&(ue=!1),this.isOpen){var me=!1;ue||this.eventListeners.beforeclose.forEach(function(fe){var se=new dn(le,!0);fe(se),se.defaultPrevented&&(me=!0)}),me||(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 dn(le))}),this.detachEvents(),this._isOpen=!1)}},Te.prototype.addMarkersToToolbar=function(){for(var ue,le=[],me=0;me<arguments.length;me++)le[me]=arguments[me];(ue=this._availableMarkerTypes).push.apply(ue,le)},Te.prototype.addRenderEventListener=function(ue){this.addEventListener("render",function(le){ue(le.dataUrl,le.state)})},Te.prototype.removeRenderEventListener=function(ue){},Te.prototype.addCloseEventListener=function(ue){this.addEventListener("close",function(){ue()})},Te.prototype.removeCloseEventListener=function(ue){},Te.prototype.setupResizeObserver=function(){var ue=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ue.resize(ue.target.clientWidth,ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ue.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Te.prototype.onPopupTargetResize=function(){var ue=1*this.target.clientWidth/this.target.clientHeight,le=this.editorCanvas.clientWidth/ue>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ue:this.editorCanvas.clientWidth,me=le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ue;this.resize(le,me)},Te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Te.prototype.resize=function(ue,le){this._isResizing=!0;var me=ue/this.imageWidth,fe=le/this.imageHeight;this.imageWidth=Math.round(ue),this.imageHeight=Math.round(le),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(me,fe),this._isResizing=!1},Te.prototype.scaleMarkers=function(ue,le){var me,fe=this;this._currentMarker&&this._currentMarker instanceof kt?this._currentMarker.scale(ue,le):(me=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(se){se!==fe._currentMarker&&se.scale(ue,le)}),me!==void 0&&this.setCurrentMarker(me)},Te.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"},Te.prototype.setTopLeft=function(){var ue=this.editingTarget.getBoundingClientRect(),le=this.editorCanvas.getBoundingClientRect();this.left=ue.left-le.left,this.top=ue.top-le.top},Te.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)},Te.prototype.addDefs=function(){for(var ue,le=[],me=0;me<arguments.length;me++)le[me]=arguments[me];this.defs=Me.createDefs(),this.addDefsToImage(),(ue=this.defs).append.apply(ue,le)},Te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Te.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)},Te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Te.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)},Te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Te.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)},Te.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 ue=document.createElement("a");ue.href="https://markerjs.com/",ue.target="_blank",ue.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>',ue.title="Powered by marker.js",ue.style.display="grid",ue.style.alignItems="center",ue.style.justifyItems="center",ue.style.padding="3px",ue.style.width="20px",ue.style.height="20px",this.logoUI.appendChild(ue),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Te.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")},Te.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"},Te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Te.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 ue=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=ue+"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 dt(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 ot(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Te.prototype.removeMarker=function(ue){this.markerImage.removeChild(ue.container),this.markers.indexOf(ue)>-1&&this.markers.splice(this.markers.indexOf(ue),1),ue.dispose()},Te.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())},Te.prototype.toolbarButtonClicked=function(ue,le){if(ue==="marker"&&le!==void 0)this.createNewMarker(le);else if(ue==="action")switch(le){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()}},Te.prototype.deleteSelectedMarker=function(){var ue=this;if(this._currentMarker!==void 0){var le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(fe){var se=new jt(ue,ue._currentMarker,!0);fe(se),se.defaultPrevented&&(le=!0)}),!le){var me=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 jt(ue,me))})}}},Te.prototype.clear=function(){var ue=this,le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Oe){var rt=new jt(ue,void 0,!0);Oe(rt),rt.defaultPrevented&&(le=!0)}),!le)){this.setCurrentMarker();for(var me=function(Oe){var rt=fe.markers[Oe];fe.setCurrentMarker(fe.markers[Oe]),fe._currentMarker.dispose(),fe.markerImage.removeChild(fe._currentMarker.container),fe.markers.splice(fe.markers.indexOf(fe._currentMarker),1),fe.eventListeners.markerdelete.forEach(function(Pt){return Pt(new jt(ue,rt))})},fe=this,se=this.markers.length-1;se>=0;se--)me(se);this.addUndoStep()}},Object.defineProperty(Te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Te.prototype.showNotesEditor=function(){var ue;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=(ue=this._currentMarker.notes)!==null&&ue!==void 0?ue:"",this.overlayContainer.appendChild(this.notesArea))},Te.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)},Te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Te.prototype.addUndoStep=function(){var ue=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var le=this.getState(),me=this.undoRedoManager.getLastUndoStep();if(!me||me.width===le.width&&me.height===le.height){var fe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(le),fe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(se){return se(new dn(ue))})}else this.undoRedoManager.replaceLastUndoStep(le),this.eventListeners.statechange.forEach(function(se){return se(new dn(ue))})}},Te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Te.prototype.undoStep=function(){var ue=this,le=this.undoRedoManager.undo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(me){return me(new dn(ue))}))},Te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Te.prototype.redoStep=function(){var ue=this,le=this.undoRedoManager.redo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(me){return me(new dn(ue))}))},Te.prototype.stepZoom=function(){var ue=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ue<this.zoomSteps.length-1?this.zoomSteps[ue+1]:this.zoomSteps[0]},Te.prototype.panTo=function(ue){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ue.x,top:this.prevPanPoint.y-ue.y}),this.prevPanPoint=ue},Te.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var ue,le,me=this;return ct(this,function(fe){switch(fe.label){case 0:return[4,this.render()];case 1:return ue=fe.sent(),le=this.getState(),this.eventListeners.render.forEach(function(se){return se(new nn(me,ue,le))}),this.close(!0),[2]}})})},Te.prototype.getState=function(ue){ue===!0&&this.setCurrentMarker();var le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(me){return le.markers.push(me.getState())}),le},Te.prototype.restoreState=function(ue){var le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ue.markers.forEach(function(me){var fe=le._availableMarkerTypes.find(function(Oe){return Oe.typeName===me.typeName});if(fe!==void 0){var se=le.addNewMarker(fe);se.restoreState(me),le.markers.push(se)}}),ue.width&&ue.height&&(ue.width!==this.imageWidth||ue.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ue.width,this.imageHeight/ue.height),this.eventListeners.restorestate.forEach(function(me){return me(new dn(le))})},Te.prototype.addNewMarker=function(ue){var le=Me.createGroup();return this.markerImage.appendChild(le),new ue(le,this.overlayContainer,this.settings)},Te.prototype.createNewMarker=function(ue){var le,me=this;(le=typeof ue=="string"?this._availableMarkerTypes.find(function(fe){return fe.typeName===ue}):ue)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(le),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(le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(fe){return fe(new jt(me,me._currentMarker))}))},Te.prototype.markerCreated=function(ue){var le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ue),this.setCurrentMarker(ue),ue instanceof it&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(it):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(me){return me(new jt(le,le._currentMarker))})},Te.prototype.colorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ue,this.settings.defaultStrokeColor=ue)},Te.prototype.fillColorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ue)},Te.prototype.markerStateChanged=function(ue){var le=this;this.eventListeners.markerchange.forEach(function(me){return me(new jt(le,ue))})},Te.prototype.setCurrentMarker=function(ue){var le=this;this._currentMarker!==ue&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(me){return me(new jt(le,le._currentMarker))})),this._currentMarker=ue,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(me){return me(new jt(le,le._currentMarker))}))},Te.prototype.onPointerDown=function(ue){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ue.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var le=this.markers.find(function(me){return me.ownsTarget(ue.target)});le!==void 0?(this.setCurrentMarker(le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ue.clientX,ue.clientY),ue.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ue.clientX,y:ue.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ue.clientX,ue.clientY))},Te.prototype.onDblClick=function(ue){if(this._isFocused||this.focus(),this.mode==="select"){var le=this.markers.find(function(me){return me.ownsTarget(ue.target)});le!==void 0&&le!==this._currentMarker&&this.setCurrentMarker(le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ue.clientX,ue.clientY),ue.target):this.setCurrentMarker()}},Te.prototype.onPointerMove=function(ue){this.touchPoints!==1&&ue.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ue.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ue.clientX,ue.clientY)):this.zoomLevel>1&&this.panTo({x:ue.clientX,y:ue.clientY}))},Te.prototype.onPointerUp=function(ue){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ue.clientX,ue.clientY)),this.isDragging=!1,this.addUndoStep()},Te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Te.prototype.onKeyUp=function(ue){this._currentMarker===void 0||this.notesArea!==void 0||ue.key!=="Delete"&&ue.key!=="Backspace"||this.deleteSelectedMarker()},Te.prototype.clientToLocalCoordinates=function(ue,le){var me=this.markerImage.getBoundingClientRect();return{x:(ue-me.left)/this.zoomLevel,y:(le-me.top)/this.zoomLevel}},Te.prototype.onWindowResize=function(){this.positionUI()},Te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ue=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ue+"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()},Te.prototype.addLicenseKey=function(ue){Ee.addKey(ue)},Te.prototype.addEventListener=function(ue,le){this.eventListeners.addEventListener(ue,le)},Te.prototype.removeEventListener=function(ue,le){this.eventListeners.removeEventListener(ue,le)},Te.prototype.renderState=function(ue){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ue),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Te.prototype.focus=function(){var ue=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(le){return le(new dn(ue))}))},Te.prototype.blur=function(){var ue=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(le){return le(new dn(ue))}))},Te.instanceCounter=0,Te}()},42767:function(Cn,Vt){"use strict";var oe;var pe=typeof Symbol=="function"&&Symbol.for,xe=pe?Symbol.for("react.element"):60103,Fe=pe?Symbol.for("react.portal"):60106,ct=pe?Symbol.for("react.fragment"):60107,ge=pe?Symbol.for("react.strict_mode"):60108,Me=pe?Symbol.for("react.profiler"):60114,Ee=pe?Symbol.for("react.provider"):60109,Ce=pe?Symbol.for("react.context"):60110,he=pe?Symbol.for("react.async_mode"):60111,ke=pe?Symbol.for("react.concurrent_mode"):60111,Je=pe?Symbol.for("react.forward_ref"):60112,Pe=pe?Symbol.for("react.suspense"):60113,dt=pe?Symbol.for("react.suspense_list"):60120,ot=pe?Symbol.for("react.memo"):60115,lt=pe?Symbol.for("react.lazy"):60116,nt=pe?Symbol.for("react.block"):60121,_e=pe?Symbol.for("react.fundamental"):60117,ht=pe?Symbol.for("react.responder"):60118,yt=pe?Symbol.for("react.scope"):60119;function Ze(be){if(typeof be=="object"&&be!==null){var we=be.$$typeof;switch(we){case xe:switch(be=be.type,be){case he:case ke:case ct:case Me:case ge:case Pe:return be;default:switch(be=be&&be.$$typeof,be){case Ce:case Je:case lt:case ot:case Ee:return be;default:return we}}case Fe:return we}}}function Qe(be){return Ze(be)===ke}oe=he,oe=ke,oe=Ce,oe=Ee,oe=xe,oe=Je,oe=ct,oe=lt,oe=ot,oe=Fe,oe=Me,oe=ge,oe=Pe,oe=function(be){return Qe(be)||Ze(be)===he},oe=Qe,oe=function(be){return Ze(be)===Ce},oe=function(be){return Ze(be)===Ee},oe=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===xe},oe=function(be){return Ze(be)===Je},Vt.isFragment=function(be){return Ze(be)===ct},oe=function(be){return Ze(be)===lt},oe=function(be){return Ze(be)===ot},oe=function(be){return Ze(be)===Fe},oe=function(be){return Ze(be)===Me},oe=function(be){return Ze(be)===ge},oe=function(be){return Ze(be)===Pe},oe=function(be){return typeof be=="string"||typeof be=="function"||be===ct||be===ke||be===Me||be===ge||be===Pe||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===lt||be.$$typeof===ot||be.$$typeof===Ee||be.$$typeof===Ce||be.$$typeof===Je||be.$$typeof===_e||be.$$typeof===ht||be.$$typeof===yt||be.$$typeof===nt)},oe=Ze},16357:function(Cn,Vt,oe){"use strict";Cn.exports=oe(42767)},95860:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ze}});var pe=oe(87462),xe=oe(1413),Fe=oe(4942),ct=oe(97685),ge=oe(45987),Me=oe(94184),Ee=oe.n(Me),Ce=oe(67294);function he(Qe){var be=Ce.useRef();be.current=Qe;var we=Ce.useCallback(function(){for(var Ke,Ge=arguments.length,vt=new Array(Ge),pt=0;pt<Ge;pt++)vt[pt]=arguments[pt];return(Ke=be.current)===null||Ke===void 0?void 0:Ke.call.apply(Ke,[be].concat(vt))},[]);return we}function ke(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Je=ke()?Ce.useLayoutEffect:Ce.useEffect,Pe=function(be,we){var Ke=Ce.useRef(!0);Je(function(){return be(Ke.current)},we),Je(function(){return Ke.current=!1,function(){Ke.current=!0}},[])},dt=function(be,we){Pe(function(Ke){if(!Ke)return be()},we)},ot=null;function lt(Qe){var be=Ce.useRef(!1),we=Ce.useState(Qe),Ke=(0,ct.Z)(we,2),Ge=Ke[0],vt=Ke[1];Ce.useEffect(function(){return be.current=!1,function(){be.current=!0}},[]);function pt(Ue,et){et&&be.current||vt(Ue)}return[Ge,pt]}function nt(Qe){return Qe!==void 0}function _e(Qe,be){var we=be||{},Ke=we.defaultValue,Ge=we.value,vt=we.onChange,pt=we.postState,Ue=lt(function(){return nt(Ge)?Ge:nt(Ke)?typeof Ke=="function"?Ke():Ke:typeof Qe=="function"?Qe():Qe}),et=(0,ct.Z)(Ue,2),kt=et[0],it=et[1],st=Ge!==void 0?Ge:kt,We=pt?pt(st):st,Tt=he(vt),Ut=lt([st]),Qt=(0,ct.Z)(Ut,2),Xe=Qt[0],Ae=Qt[1];dt(function(){var cn=Xe[0];kt!==cn&&Tt(kt,cn)},[Xe]),dt(function(){nt(Ge)||it(Ge)},[Ge]);var Lt=he(function(cn,an){it(cn,an),Ae([st],an)});return[We,Lt]}var ht=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],yt=(0,Ce.forwardRef)(function(Qe,be){var we,Ke=Qe.prefixCls,Ge=Ke===void 0?"rc-checkbox":Ke,vt=Qe.className,pt=Qe.style,Ue=Qe.checked,et=Qe.disabled,kt=Qe.defaultChecked,it=kt===void 0?!1:kt,st=Qe.type,We=st===void 0?"checkbox":st,Tt=Qe.title,Ut=Qe.onChange,Qt=(0,ge.Z)(Qe,ht),Xe=(0,Ce.useRef)(null),Ae=_e(it,{value:Ue}),Lt=(0,ct.Z)(Ae,2),cn=Lt[0],an=Lt[1];(0,Ce.useImperativeHandle)(be,function(){return{focus:function(){var An;(An=Xe.current)===null||An===void 0||An.focus()},blur:function(){var An;(An=Xe.current)===null||An===void 0||An.blur()},input:Xe.current}});var ft=Ee()(Ge,vt,(we={},(0,Fe.Z)(we,"".concat(Ge,"-checked"),cn),(0,Fe.Z)(we,"".concat(Ge,"-disabled"),et),we)),mt=function(An){et||("checked"in Qe||an(An.target.checked),Ut==null||Ut({target:(0,xe.Z)((0,xe.Z)({},Qe),{},{type:We,checked:An.target.checked}),stopPropagation:function(){An.stopPropagation()},preventDefault:function(){An.preventDefault()},nativeEvent:An.nativeEvent}))};return Ce.createElement("span",{className:ft,title:Tt,style:pt},Ce.createElement("input",(0,pe.Z)({},Qt,{className:"".concat(Ge,"-input"),ref:Xe,onChange:mt,disabled:et,checked:!!cn,type:We})),Ce.createElement("span",{className:"".concat(Ge,"-inner")}))}),Ze=yt},26819:function(Cn,Vt){"use strict";var oe;var pe=typeof Symbol=="function"&&Symbol.for,xe=pe?Symbol.for("react.element"):60103,Fe=pe?Symbol.for("react.portal"):60106,ct=pe?Symbol.for("react.fragment"):60107,ge=pe?Symbol.for("react.strict_mode"):60108,Me=pe?Symbol.for("react.profiler"):60114,Ee=pe?Symbol.for("react.provider"):60109,Ce=pe?Symbol.for("react.context"):60110,he=pe?Symbol.for("react.async_mode"):60111,ke=pe?Symbol.for("react.concurrent_mode"):60111,Je=pe?Symbol.for("react.forward_ref"):60112,Pe=pe?Symbol.for("react.suspense"):60113,dt=pe?Symbol.for("react.suspense_list"):60120,ot=pe?Symbol.for("react.memo"):60115,lt=pe?Symbol.for("react.lazy"):60116,nt=pe?Symbol.for("react.block"):60121,_e=pe?Symbol.for("react.fundamental"):60117,ht=pe?Symbol.for("react.responder"):60118,yt=pe?Symbol.for("react.scope"):60119;function Ze(be){if(typeof be=="object"&&be!==null){var we=be.$$typeof;switch(we){case xe:switch(be=be.type,be){case he:case ke:case ct:case Me:case ge:case Pe:return be;default:switch(be=be&&be.$$typeof,be){case Ce:case Je:case lt:case ot:case Ee:return be;default:return we}}case Fe:return we}}}function Qe(be){return Ze(be)===ke}oe=he,oe=ke,oe=Ce,oe=Ee,oe=xe,oe=Je,oe=ct,oe=lt,oe=ot,oe=Fe,oe=Me,oe=ge,oe=Pe,oe=function(be){return Qe(be)||Ze(be)===he},oe=Qe,oe=function(be){return Ze(be)===Ce},oe=function(be){return Ze(be)===Ee},oe=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===xe},oe=function(be){return Ze(be)===Je},oe=function(be){return Ze(be)===ct},oe=function(be){return Ze(be)===lt},Vt.isMemo=function(be){return Ze(be)===ot},oe=function(be){return Ze(be)===Fe},oe=function(be){return Ze(be)===Me},oe=function(be){return Ze(be)===ge},oe=function(be){return Ze(be)===Pe},oe=function(be){return typeof be=="string"||typeof be=="function"||be===ct||be===ke||be===Me||be===ge||be===Pe||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===lt||be.$$typeof===ot||be.$$typeof===Ee||be.$$typeof===Ce||be.$$typeof===Je||be.$$typeof===_e||be.$$typeof===ht||be.$$typeof===yt||be.$$typeof===nt)},oe=Ze},18459:function(Cn,Vt,oe){"use strict";Cn.exports=oe(26819)},16651:function(Cn,Vt){"use strict";var oe;var pe=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),ct=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),Ce=Symbol.for("react.server_context"),he=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Pe=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),ot=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function nt(_e){if(typeof _e=="object"&&_e!==null){var ht=_e.$$typeof;switch(ht){case pe:switch(_e=_e.type,_e){case Fe:case ge:case ct:case ke:case Je:return _e;default:switch(_e=_e&&_e.$$typeof,_e){case Ce:case Ee:case he:case dt:case Pe:case Me:return _e;default:return ht}}case xe:return ht}}}oe=Ee,oe=Me,oe=pe,oe=he,oe=Fe,oe=dt,oe=Pe,oe=xe,oe=ge,oe=ct,oe=ke,oe=Je,oe=function(){return!1},oe=function(){return!1},oe=function(_e){return nt(_e)===Ee},oe=function(_e){return nt(_e)===Me},oe=function(_e){return typeof _e=="object"&&_e!==null&&_e.$$typeof===pe},oe=function(_e){return nt(_e)===he},oe=function(_e){return nt(_e)===Fe},oe=function(_e){return nt(_e)===dt},oe=function(_e){return nt(_e)===Pe},oe=function(_e){return nt(_e)===xe},oe=function(_e){return nt(_e)===ge},oe=function(_e){return nt(_e)===ct},oe=function(_e){return nt(_e)===ke},oe=function(_e){return nt(_e)===Je},oe=function(_e){return typeof _e=="string"||typeof _e=="function"||_e===Fe||_e===ge||_e===ct||_e===ke||_e===Je||_e===ot||typeof _e=="object"&&_e!==null&&(_e.$$typeof===dt||_e.$$typeof===Pe||_e.$$typeof===Me||_e.$$typeof===Ee||_e.$$typeof===he||_e.$$typeof===lt||_e.getModuleId!==void 0)},oe=nt},33993:function(Cn,Vt,oe){"use strict";oe(16651)},82523:function(Cn,Vt){"use strict";var oe;var pe=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),ct=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),Ce=Symbol.for("react.server_context"),he=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Pe=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),ot=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function nt(_e){if(typeof _e=="object"&&_e!==null){var ht=_e.$$typeof;switch(ht){case pe:switch(_e=_e.type,_e){case Fe:case ge:case ct:case ke:case Je:return _e;default:switch(_e=_e&&_e.$$typeof,_e){case Ce:case Ee:case he:case dt:case Pe:case Me:return _e;default:return ht}}case xe:return ht}}}oe=Ee,oe=Me,oe=pe,oe=he,oe=Fe,oe=dt,oe=Pe,oe=xe,oe=ge,oe=ct,oe=ke,oe=Je,oe=function(){return!1},oe=function(){return!1},oe=function(_e){return nt(_e)===Ee},oe=function(_e){return nt(_e)===Me},oe=function(_e){return typeof _e=="object"&&_e!==null&&_e.$$typeof===pe},oe=function(_e){return nt(_e)===he},oe=function(_e){return nt(_e)===Fe},oe=function(_e){return nt(_e)===dt},oe=function(_e){return nt(_e)===Pe},oe=function(_e){return nt(_e)===xe},oe=function(_e){return nt(_e)===ge},oe=function(_e){return nt(_e)===ct},oe=function(_e){return nt(_e)===ke},oe=function(_e){return nt(_e)===Je},oe=function(_e){return typeof _e=="string"||typeof _e=="function"||_e===Fe||_e===ge||_e===ct||_e===ke||_e===Je||_e===ot||typeof _e=="object"&&_e!==null&&(_e.$$typeof===dt||_e.$$typeof===Pe||_e.$$typeof===Me||_e.$$typeof===Ee||_e.$$typeof===he||_e.$$typeof===lt||_e.getModuleId!==void 0)},oe=nt},27183:function(Cn,Vt,oe){"use strict";oe(82523)},67656:function(Cn,Vt,oe){"use strict";oe.r(Vt),oe.d(Vt,{BaseInput:function(){return ke},default:function(){return yt}});var pe=oe(87462),xe=oe(1413),Fe=oe(4942),ct=oe(71002),ge=oe(94184),Me=oe.n(ge),Ee=oe(67294),Ce=oe(87887),he=function(Qe){var be,we,Ke=Qe.inputElement,Ge=Qe.prefixCls,vt=Qe.prefix,pt=Qe.suffix,Ue=Qe.addonBefore,et=Qe.addonAfter,kt=Qe.className,it=Qe.style,st=Qe.disabled,We=Qe.readOnly,Tt=Qe.focused,Ut=Qe.triggerFocus,Qt=Qe.allowClear,Xe=Qe.value,Ae=Qe.handleReset,Lt=Qe.hidden,cn=Qe.classes,an=Qe.classNames,ft=Qe.dataAttrs,mt=Qe.styles,Yt=Qe.components,An=(Yt==null?void 0:Yt.affixWrapper)||"span",dn=(Yt==null?void 0:Yt.groupWrapper)||"span",nn=(Yt==null?void 0:Yt.wrapper)||"span",jt=(Yt==null?void 0:Yt.groupAddon)||"span",xn=(0,Ee.useRef)(null),vn=function(en){var Gt;(Gt=xn.current)!==null&&Gt!==void 0&&Gt.contains(en.target)&&(Ut==null||Ut())},Te=function(){var en;if(!Qt)return null;var Gt=!st&&!We&&Xe,tr="".concat(Ge,"-clear-icon"),cr=(0,ct.Z)(Qt)==="object"&&Qt!==null&&Qt!==void 0&&Qt.clearIcon?Qt.clearIcon:"\u2716";return Ee.createElement("span",{onClick:Ae,onMouseDown:function(bn){return bn.preventDefault()},className:Me()(tr,(en={},(0,Fe.Z)(en,"".concat(tr,"-hidden"),!Gt),(0,Fe.Z)(en,"".concat(tr,"-has-suffix"),!!pt),en)),role:"button",tabIndex:-1},cr)},ue=(0,Ee.cloneElement)(Ke,{value:Xe,hidden:Lt,className:Me()((be=Ke.props)===null||be===void 0?void 0:be.className,!(0,Ce.X3)(Qe)&&!(0,Ce.He)(Qe)&&kt)||null,style:(0,xe.Z)((0,xe.Z)({},(we=Ke.props)===null||we===void 0?void 0:we.style),!(0,Ce.X3)(Qe)&&!(0,Ce.He)(Qe)?it:{})});if((0,Ce.X3)(Qe)){var le,me="".concat(Ge,"-affix-wrapper"),fe=Me()(me,(le={},(0,Fe.Z)(le,"".concat(me,"-disabled"),st),(0,Fe.Z)(le,"".concat(me,"-focused"),Tt),(0,Fe.Z)(le,"".concat(me,"-readonly"),We),(0,Fe.Z)(le,"".concat(me,"-input-with-clear-btn"),pt&&Qt&&Xe),le),!(0,Ce.He)(Qe)&&kt,cn==null?void 0:cn.affixWrapper,an==null?void 0:an.affixWrapper),se=(pt||Qt)&&Ee.createElement("span",{className:Me()("".concat(Ge,"-suffix"),an==null?void 0:an.suffix),style:mt==null?void 0:mt.suffix},Te(),pt);ue=Ee.createElement(An,(0,pe.Z)({className:fe,style:(0,xe.Z)((0,xe.Z)({},(0,Ce.He)(Qe)?void 0:it),mt==null?void 0:mt.affixWrapper),hidden:!(0,Ce.He)(Qe)&&Lt,onClick:vn},ft==null?void 0:ft.affixWrapper,{ref:xn}),vt&&Ee.createElement("span",{className:Me()("".concat(Ge,"-prefix"),an==null?void 0:an.prefix),style:mt==null?void 0:mt.prefix},vt),(0,Ee.cloneElement)(Ke,{value:Xe,hidden:null}),se)}if((0,Ce.He)(Qe)){var Oe="".concat(Ge,"-group"),rt="".concat(Oe,"-addon"),Pt=Me()("".concat(Ge,"-wrapper"),Oe,cn==null?void 0:cn.wrapper),zt=Me()("".concat(Ge,"-group-wrapper"),kt,cn==null?void 0:cn.group);return Ee.createElement(dn,{className:zt,style:it,hidden:Lt},Ee.createElement(nn,{className:Pt},Ue&&Ee.createElement(jt,{className:rt},Ue),(0,Ee.cloneElement)(ue,{hidden:null}),et&&Ee.createElement(jt,{className:rt},et)))}return ue},ke=he,Je=oe(74902),Pe=oe(97685),dt=oe(45987),ot=oe(21770),lt=oe(98423),nt=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],_e=(0,Ee.forwardRef)(function(Ze,Qe){var be=Ze.autoComplete,we=Ze.onChange,Ke=Ze.onFocus,Ge=Ze.onBlur,vt=Ze.onPressEnter,pt=Ze.onKeyDown,Ue=Ze.prefixCls,et=Ue===void 0?"rc-input":Ue,kt=Ze.disabled,it=Ze.htmlSize,st=Ze.className,We=Ze.maxLength,Tt=Ze.suffix,Ut=Ze.showCount,Qt=Ze.type,Xe=Qt===void 0?"text":Qt,Ae=Ze.classes,Lt=Ze.classNames,cn=Ze.styles,an=(0,dt.Z)(Ze,nt),ft=(0,ot.Z)(Ze.defaultValue,{value:Ze.value}),mt=(0,Pe.Z)(ft,2),Yt=mt[0],An=mt[1],dn=(0,Ee.useState)(!1),nn=(0,Pe.Z)(dn,2),jt=nn[0],xn=nn[1],vn=(0,Ee.useRef)(null),Te=function(zt){vn.current&&(0,Ce.nH)(vn.current,zt)};(0,Ee.useImperativeHandle)(Qe,function(){return{focus:Te,blur:function(){var zt;(zt=vn.current)===null||zt===void 0||zt.blur()},setSelectionRange:function(zt,Zt,en){var Gt;(Gt=vn.current)===null||Gt===void 0||Gt.setSelectionRange(zt,Zt,en)},select:function(){var zt;(zt=vn.current)===null||zt===void 0||zt.select()},input:vn.current}}),(0,Ee.useEffect)(function(){xn(function(Pt){return Pt&&kt?!1:Pt})},[kt]);var ue=function(zt){Ze.value===void 0&&An(zt.target.value),vn.current&&(0,Ce.rJ)(vn.current,zt,we)},le=function(zt){vt&&zt.key==="Enter"&&vt(zt),pt==null||pt(zt)},me=function(zt){xn(!0),Ke==null||Ke(zt)},fe=function(zt){xn(!1),Ge==null||Ge(zt)},se=function(zt){An(""),Te(),vn.current&&(0,Ce.rJ)(vn.current,zt,we)},Oe=function(){var zt=(0,lt.Z)(Ze,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Ee.createElement("input",(0,pe.Z)({autoComplete:be},zt,{onChange:ue,onFocus:me,onBlur:fe,onKeyDown:le,className:Me()(et,(0,Fe.Z)({},"".concat(et,"-disabled"),kt),Lt==null?void 0:Lt.input),style:cn==null?void 0:cn.input,ref:vn,size:it,type:Xe}))},rt=function(){var zt=Number(We)>0;if(Tt||Ut){var Zt=(0,Ce.D7)(Yt),en=(0,Je.Z)(Zt).length,Gt=(0,ct.Z)(Ut)==="object"?Ut.formatter({value:Zt,count:en,maxLength:We}):"".concat(en).concat(zt?" / ".concat(We):"");return Ee.createElement(Ee.Fragment,null,!!Ut&&Ee.createElement("span",{className:Me()("".concat(et,"-show-count-suffix"),(0,Fe.Z)({},"".concat(et,"-show-count-has-suffix"),!!Tt),Lt==null?void 0:Lt.count),style:(0,xe.Z)({},cn==null?void 0:cn.count)},Gt),Tt)}return null};return Ee.createElement(ke,(0,pe.Z)({},an,{prefixCls:et,className:st,inputElement:Oe(),handleReset:se,value:(0,Ce.D7)(Yt),focused:jt,triggerFocus:Te,suffix:rt(),disabled:kt,classes:Ae,classNames:Lt,styles:cn}))}),ht=_e,yt=ht},87887:function(Cn,Vt,oe){"use strict";oe.d(Vt,{D7:function(){return ge},He:function(){return pe},X3:function(){return xe},nH:function(){return ct},rJ:function(){return Fe}});function pe(Me){return!!(Me.addonBefore||Me.addonAfter)}function xe(Me){return!!(Me.prefix||Me.suffix||Me.allowClear)}function Fe(Me,Ee,Ce,he){if(Ce){var ke=Ee;if(Ee.type==="click"){var Je=Me.cloneNode(!0);ke=Object.create(Ee,{target:{value:Je},currentTarget:{value:Je}}),Je.value="",Ce(ke);return}if(he!==void 0){ke=Object.create(Ee,{target:{value:Me},currentTarget:{value:Me}}),Me.value=he,Ce(ke);return}Ce(ke)}}function ct(Me,Ee){if(Me){Me.focus(Ee);var Ce=Ee||{},he=Ce.cursor;if(he){var ke=Me.value.length;switch(he){case"start":Me.setSelectionRange(0,0);break;case"end":Me.setSelectionRange(ke,ke);break;default:Me.setSelectionRange(0,ke)}}}}function ge(Me){return typeof Me=="undefined"||Me===null?"":String(Me)}},78595:function(Cn,Vt,oe){"use strict";oe.d(Vt,{iz:function(){return li},ck:function(){return Qi},BW:function(){return qr},sN:function(){return Qi},Wd:function(){return tn},ZP:function(){return Ve},Xl:function(){return Gt}});var pe=oe(87462),xe=oe(4942),Fe=oe(1413),ct=oe(74902),ge=oe(97685),Me=oe(45987),Ee=oe(94184),Ce=oe.n(Ee),he=oe(67294),ke=oe(48555);function Je(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Pe=Je()?he.useLayoutEffect:he.useEffect,dt=function(tt,gt){var Ct=he.useRef(!0);Pe(function(){return tt(Ct.current)},gt),Pe(function(){return Ct.current=!1,function(){Ct.current=!0}},[])},ot=function(tt,gt){dt(function(Ct){if(!Ct)return tt()},gt)},lt=dt,nt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],_e=void 0;function ht(He,tt){var gt=He.prefixCls,Ct=He.invalidate,It=He.item,ln=He.renderItem,mn=He.responsive,Yn=He.responsiveDisabled,yr=He.registerSize,Vn=He.itemKey,En=He.className,wn=He.style,In=He.children,Bn=He.display,pr=He.order,Xn=He.component,jn=Xn===void 0?"div":Xn,nr=(0,Me.Z)(He,nt),qn=mn&&!Bn;function dr(sn){yr(Vn,sn)}he.useEffect(function(){return function(){dr(null)}},[]);var je=ln&&It!==_e?ln(It):In,Ye;Ct||(Ye={opacity:qn?0:1,height:qn?0:_e,overflowY:qn?"hidden":_e,order:mn?pr:_e,pointerEvents:qn?"none":_e,position:qn?"absolute":_e});var $t={};qn&&($t["aria-hidden"]=!0);var Dt=he.createElement(jn,(0,pe.Z)({className:Ce()(!Ct&&gt,En),style:(0,Fe.Z)((0,Fe.Z)({},Ye),wn)},$t,nr,{ref:tt}),je);return mn&&(Dt=he.createElement(ke.Z,{onResize:function(kn){var yn=kn.offsetWidth;dr(yn)},disabled:Yn},Dt)),Dt}var yt=he.forwardRef(ht);yt.displayName="Item";var Ze=yt;function Qe(He){var tt=he.useRef();tt.current=He;var gt=he.useCallback(function(){for(var Ct,It=arguments.length,ln=new Array(It),mn=0;mn<It;mn++)ln[mn]=arguments[mn];return(Ct=tt.current)===null||Ct===void 0?void 0:Ct.call.apply(Ct,[tt].concat(ln))},[]);return gt}var be=oe(73935),we=function(tt){return+setTimeout(tt,16)},Ke=function(tt){return clearTimeout(tt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(we=function(tt){return window.requestAnimationFrame(tt)},Ke=function(tt){return window.cancelAnimationFrame(tt)});var Ge=0,vt=new Map;function pt(He){vt.delete(He)}var Ue=function(tt){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ge+=1;var Ct=Ge;function It(ln){if(ln===0)pt(Ct),tt();else{var mn=we(function(){It(ln-1)});vt.set(Ct,mn)}}return It(gt),Ct};Ue.cancel=function(He){var tt=vt.get(He);return pt(tt),Ke(tt)};var et=Ue;function kt(He){if(typeof MessageChannel=="undefined")et(He);else{var tt=new MessageChannel;tt.port1.onmessage=function(){return He()},tt.port2.postMessage(void 0)}}function it(){var He=he.useRef(null),tt=function(Ct){He.current||(He.current=[],kt(function(){(0,be.unstable_batchedUpdates)(function(){He.current.forEach(function(It){It()}),He.current=null})})),He.current.push(Ct)};return tt}function st(He,tt){var gt=he.useState(tt),Ct=(0,ge.Z)(gt,2),It=Ct[0],ln=Ct[1],mn=Qe(function(Yn){He(function(){ln(Yn)})});return[It,mn]}var We=he.createContext(null),Tt=["component"],Ut=["className"],Qt=["className"],Xe=function(tt,gt){var Ct=he.useContext(We);if(!Ct){var It=tt.component,ln=It===void 0?"div":It,mn=(0,Me.Z)(tt,Tt);return he.createElement(ln,(0,pe.Z)({},mn,{ref:gt}))}var Yn=Ct.className,yr=(0,Me.Z)(Ct,Ut),Vn=tt.className,En=(0,Me.Z)(tt,Qt);return he.createElement(We.Provider,{value:null},he.createElement(Ze,(0,pe.Z)({ref:gt,className:Ce()(Yn,Vn)},yr,En)))},Ae=he.forwardRef(Xe);Ae.displayName="RawItem";var Lt=Ae,cn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],an="responsive",ft="invalidate";function mt(He){return"+ ".concat(He.length," ...")}function Yt(He,tt){var gt=He.prefixCls,Ct=gt===void 0?"rc-overflow":gt,It=He.data,ln=It===void 0?[]:It,mn=He.renderItem,Yn=He.renderRawItem,yr=He.itemKey,Vn=He.itemWidth,En=Vn===void 0?10:Vn,wn=He.ssr,In=He.style,Bn=He.className,pr=He.maxCount,Xn=He.renderRest,jn=He.renderRawRest,nr=He.suffix,qn=He.component,dr=qn===void 0?"div":qn,je=He.itemComponent,Ye=He.onVisibleChange,$t=(0,Me.Z)(He,cn),Dt=wn==="full",sn=it(),kn=st(sn,null),yn=(0,ge.Z)(kn,2),zn=yn[0],Pn=yn[1],pn=zn||0,Nn=st(sn,new Map),Wn=(0,ge.Z)(Nn,2),vr=Wn[0],Hn=Wn[1],Er=st(sn,0),Qr=(0,ge.Z)(Er,2),Rr=Qr[0],jr=Qr[1],Cr=st(sn,0),Fr=(0,ge.Z)(Cr,2),ai=Fr[0],hi=Fr[1],$r=st(sn,0),wi=(0,ge.Z)($r,2),ta=wi[0],Ba=wi[1],ga=(0,he.useState)(null),ra=(0,ge.Z)(ga,2),La=ra[0],Aa=ra[1],Oi=(0,he.useState)(null),ia=(0,ge.Z)(Oi,2),ni=ia[0],Ci=ia[1],Xi=he.useMemo(function(){return ni===null&&Dt?Number.MAX_SAFE_INTEGER:ni||0},[ni,zn]),wa=(0,he.useState)(!1),ri=(0,ge.Z)(wa,2),io=ri[0],ko=ri[1],Ja="".concat(Ct,"-item"),Ta=Math.max(Rr,ai),Ui=pr===an,Po=ln.length&&Ui,Yi=pr===ft,oi=Po||typeof pr=="number"&&ln.length>pr,sa=(0,he.useMemo)(function(){var ji=ln;return Po?zn===null&&Dt?ji=ln:ji=ln.slice(0,Math.min(ln.length,pn/En)):typeof pr=="number"&&(ji=ln.slice(0,pr)),ji},[ln,En,zn,pr,Po]),Ga=(0,he.useMemo)(function(){return Po?ln.slice(Xi+1):ln.slice(sa.length)},[ln,sa,Po,Xi]),la=(0,he.useCallback)(function(ji,ua){var Qa;return typeof yr=="function"?yr(ji):(Qa=yr&&(ji==null?void 0:ji[yr]))!==null&&Qa!==void 0?Qa:ua},[yr]),Ka=(0,he.useCallback)(mn||function(ji){return ji},[mn]);function ki(ji,ua,Qa){ni===ji&&(ua===void 0||ua===La)||(Ci(ji),Qa||(ko(ji<ln.length-1),Ye==null||Ye(ji)),ua!==void 0&&Aa(ua))}function ro(ji,ua){Pn(ua.clientWidth)}function ao(ji,ua){Hn(function(Qa){var ho=new Map(Qa);return ua===null?ho.delete(ji):ho.set(ji,ua),ho})}function eo(ji,ua){hi(ua),jr(ai)}function oo(ji,ua){Ba(ua)}function wo(ji){return vr.get(la(sa[ji],ji))}lt(function(){if(pn&&typeof Ta=="number"&&sa){var ji=ta,ua=sa.length,Qa=ua-1;if(!ua){ki(0,null);return}for(var ho=0;ho<ua;ho+=1){var Fo=wo(ho);if(Dt&&(Fo=Fo||0),Fo===void 0){ki(ho-1,void 0,!0);break}if(ji+=Fo,Qa===0&&ji<=pn||ho===Qa-1&&ji+wo(Qa)<=pn){ki(Qa,null);break}else if(ji+Ta>pn){ki(ho-1,ji-Fo-ta+ai);break}}nr&&wo(0)+ta>pn&&Aa(null)}},[pn,vr,ai,ta,la,sa]);var Ho=io&&!!Ga.length,to={};La!==null&&Po&&(to={position:"absolute",left:La,top:0});var Co={prefixCls:Ja,responsive:Po,component:je,invalidate:Yi},Jo=Yn?function(ji,ua){var Qa=la(ji,ua);return he.createElement(We.Provider,{key:Qa,value:(0,Fe.Z)((0,Fe.Z)({},Co),{},{order:ua,item:ji,itemKey:Qa,registerSize:ao,display:ua<=Xi})},Yn(ji,ua))}:function(ji,ua){var Qa=la(ji,ua);return he.createElement(Ze,(0,pe.Z)({},Co,{order:ua,key:Qa,item:ji,renderItem:Ka,itemKey:Qa,registerSize:ao,display:ua<=Xi}))},Xo,as={order:Ho?Xi:Number.MAX_SAFE_INTEGER,className:"".concat(Ja,"-rest"),registerSize:eo,display:Ho};if(jn)jn&&(Xo=he.createElement(We.Provider,{value:(0,Fe.Z)((0,Fe.Z)({},Co),as)},jn(Ga)));else{var No=Xn||mt;Xo=he.createElement(Ze,(0,pe.Z)({},Co,as),typeof No=="function"?No(Ga):No)}var vo=he.createElement(dr,(0,pe.Z)({className:Ce()(!Yi&&Ct,Bn),style:In,ref:tt},$t),sa.map(Jo),oi?Xo:null,nr&&he.createElement(Ze,(0,pe.Z)({},Co,{responsive:Ui,responsiveDisabled:!Po,order:Xi,className:"".concat(Ja,"-suffix"),registerSize:oo,display:!0,style:to}),nr));return Ui&&(vo=he.createElement(ke.Z,{onResize:ro,disabled:!Po},vo)),vo}var An=he.forwardRef(Yt);An.displayName="Overflow",An.Item=Lt,An.RESPONSIVE=an,An.INVALIDATE=ft;var dn=An,nn=dn,jt=oe(21770),xn=oe(80334),vn=oe(91881),Te=he.createContext(null);function ue(He,tt){return He===void 0?null:"".concat(He,"-").concat(tt)}function le(He){var tt=he.useContext(Te);return ue(tt,He)}var me=oe(56982),fe=["children","locked"],se=he.createContext(null);function Oe(He,tt){var gt=(0,Fe.Z)({},He);return Object.keys(tt).forEach(function(Ct){var It=tt[Ct];It!==void 0&&(gt[Ct]=It)}),gt}function rt(He){var tt=He.children,gt=He.locked,Ct=(0,Me.Z)(He,fe),It=he.useContext(se),ln=(0,me.Z)(function(){return Oe(It,Ct)},[It,Ct],function(mn,Yn){return!gt&&(mn[0]!==Yn[0]||!(0,vn.Z)(mn[1],Yn[1],!0))});return he.createElement(se.Provider,{value:ln},tt)}var Pt=[],zt=he.createContext(null);function Zt(){return he.useContext(zt)}var en=he.createContext(Pt);function Gt(He){var tt=he.useContext(en);return he.useMemo(function(){return He!==void 0?[].concat((0,ct.Z)(tt),[He]):tt},[tt,He])}var tr=he.createContext(null),cr=he.createContext({}),Wt=cr,bn=oe(15105),lr=oe(75164),Wr=function(He){if(!He)return!1;if(He instanceof Element){if(He.offsetParent)return!0;if(He.getBBox){var tt=He.getBBox(),gt=tt.width,Ct=tt.height;if(gt||Ct)return!0}if(He.getBoundingClientRect){var It=He.getBoundingClientRect(),ln=It.width,mn=It.height;if(ln||mn)return!0}}return!1};function Rn(He){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Wr(He)){var gt=He.nodeName.toLowerCase(),Ct=["input","select","textarea","button"].includes(gt)||He.isContentEditable||gt==="a"&&!!He.getAttribute("href"),It=He.getAttribute("tabindex"),ln=Number(It),mn=null;return It&&!Number.isNaN(ln)?mn=ln:Ct&&mn===null&&(mn=0),Ct&&He.disabled&&(mn=null),mn!==null&&(mn>=0||tt&&mn<0)}return!1}function Tr(He){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gt=(0,ct.Z)(He.querySelectorAll("*")).filter(function(Ct){return Rn(Ct,tt)});return Rn(He,tt)&&gt.unshift(He),gt}var Ca=null;function Wi(){Ca=document.activeElement}function Li(){Ca=null}function Mi(){if(Ca)try{Ca.focus()}catch(He){}}function Ji(He,tt){if(tt.keyCode===9){var gt=Tr(He),Ct=gt[tt.shiftKey?0:gt.length-1],It=Ct===document.activeElement||He===document.activeElement;if(It){var ln=gt[tt.shiftKey?gt.length-1:0];ln.focus(),tt.preventDefault()}}}var Zi=bn.Z.LEFT,Ea=bn.Z.RIGHT,Ma=bn.Z.UP,Gr=bn.Z.DOWN,Va=bn.Z.ENTER,no=bn.Z.ESC,po=bn.Z.HOME,mo=bn.Z.END,Pa=[Ma,Gr,Zi,Ea];function Bt(He,tt,gt,Ct){var It,ln,mn,Yn,yr="prev",Vn="next",En="children",wn="parent";if(He==="inline"&&Ct===Va)return{inlineTrigger:!0};var In=(It={},(0,xe.Z)(It,Ma,yr),(0,xe.Z)(It,Gr,Vn),It),Bn=(ln={},(0,xe.Z)(ln,Zi,gt?Vn:yr),(0,xe.Z)(ln,Ea,gt?yr:Vn),(0,xe.Z)(ln,Gr,En),(0,xe.Z)(ln,Va,En),ln),pr=(mn={},(0,xe.Z)(mn,Ma,yr),(0,xe.Z)(mn,Gr,Vn),(0,xe.Z)(mn,Va,En),(0,xe.Z)(mn,no,wn),(0,xe.Z)(mn,Zi,gt?En:wn),(0,xe.Z)(mn,Ea,gt?wn:En),mn),Xn={inline:In,horizontal:Bn,vertical:pr,inlineSub:In,horizontalSub:pr,verticalSub:pr},jn=(Yn=Xn["".concat(He).concat(tt?"":"Sub")])===null||Yn===void 0?void 0:Yn[Ct];switch(jn){case yr:return{offset:-1,sibling:!0};case Vn:return{offset:1,sibling:!0};case wn:return{offset:-1,sibling:!1};case En:return{offset:1,sibling:!1};default:return null}}function On(He){for(var tt=He;tt;){if(tt.getAttribute("data-menu-list"))return tt;tt=tt.parentElement}return null}function Fn(He,tt){for(var gt=He||document.activeElement;gt;){if(tt.has(gt))return gt;gt=gt.parentElement}return null}function $n(He,tt){var gt=Tr(He,!0);return gt.filter(function(Ct){return tt.has(Ct)})}function Ir(He,tt,gt){var Ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!He)return null;var It=$n(He,tt),ln=It.length,mn=It.findIndex(function(Yn){return gt===Yn});return Ct<0?mn===-1?mn=ln-1:mn-=1:Ct>0&&(mn+=1),mn=(mn+ln)%ln,It[mn]}function or(He,tt,gt,Ct,It,ln,mn,Yn,yr,Vn){var En=he.useRef(),wn=he.useRef();wn.current=tt;var In=function(){lr.Z.cancel(En.current)};return he.useEffect(function(){return function(){In()}},[]),function(Bn){var pr=Bn.which;if([].concat(Pa,[Va,no,po,mo]).includes(pr)){var Xn,jn,nr,qn=function(){Xn=new Set,jn=new Map,nr=new Map;var Wn=ln();return Wn.forEach(function(vr){var Hn=document.querySelector("[data-menu-id='".concat(ue(Ct,vr),"']"));Hn&&(Xn.add(Hn),nr.set(Hn,vr),jn.set(vr,Hn))}),Xn};qn();var dr=jn.get(tt),je=Fn(dr,Xn),Ye=nr.get(je),$t=Bt(He,mn(Ye,!0).length===1,gt,pr);if(!$t&&pr!==po&&pr!==mo)return;(Pa.includes(pr)||[po,mo].includes(pr))&&Bn.preventDefault();var Dt=function(Wn){if(Wn){var vr=Wn,Hn=Wn.querySelector("a");Hn!=null&&Hn.getAttribute("href")&&(vr=Hn);var Er=nr.get(Wn);Yn(Er),In(),En.current=(0,lr.Z)(function(){wn.current===Er&&vr.focus()})}};if([po,mo].includes(pr)||$t.sibling||!je){var sn;!je||He==="inline"?sn=It.current:sn=On(je);var kn,yn=$n(sn,Xn);pr===po?kn=yn[0]:pr===mo?kn=yn[yn.length-1]:kn=Ir(sn,Xn,je,$t.offset),Dt(kn)}else if($t.inlineTrigger)yr(Ye);else if($t.offset>0)yr(Ye,!0),In(),En.current=(0,lr.Z)(function(){qn();var Nn=je.getAttribute("aria-controls"),Wn=document.getElementById(Nn),vr=Ir(Wn,Xn);Dt(vr)},5);else if($t.offset<0){var zn=mn(Ye,!0),Pn=zn[zn.length-2],pn=jn.get(Pn);yr(Pn,!1),Dt(pn)}}Vn==null||Vn(Bn)}}function Sr(He){Promise.resolve().then(He)}var Zn="__RC_UTIL_PATH_SPLIT__",ut=function(tt){return tt.join(Zn)},bt=function(tt){return tt.split(Zn)},Ft="rc-menu-more";function qt(){var He=he.useState({}),tt=(0,ge.Z)(He,2),gt=tt[1],Ct=(0,he.useRef)(new Map),It=(0,he.useRef)(new Map),ln=he.useState([]),mn=(0,ge.Z)(ln,2),Yn=mn[0],yr=mn[1],Vn=(0,he.useRef)(0),En=(0,he.useRef)(!1),wn=function(){En.current||gt({})},In=(0,he.useCallback)(function(dr,je){var Ye=ut(je);It.current.set(Ye,dr),Ct.current.set(dr,Ye),Vn.current+=1;var $t=Vn.current;Sr(function(){$t===Vn.current&&wn()})},[]),Bn=(0,he.useCallback)(function(dr,je){var Ye=ut(je);It.current.delete(Ye),Ct.current.delete(dr)},[]),pr=(0,he.useCallback)(function(dr){yr(dr)},[]),Xn=(0,he.useCallback)(function(dr,je){var Ye=Ct.current.get(dr)||"",$t=bt(Ye);return je&&Yn.includes($t[0])&&$t.unshift(Ft),$t},[Yn]),jn=(0,he.useCallback)(function(dr,je){return dr.some(function(Ye){var $t=Xn(Ye,!0);return $t.includes(je)})},[Xn]),nr=function(){var je=(0,ct.Z)(Ct.current.keys());return Yn.length&&je.push(Ft),je},qn=(0,he.useCallback)(function(dr){var je="".concat(Ct.current.get(dr)).concat(Zn),Ye=new Set;return(0,ct.Z)(It.current.keys()).forEach(function($t){$t.startsWith(je)&&Ye.add(It.current.get($t))}),Ye},[]);return he.useEffect(function(){return function(){En.current=!0}},[]),{registerPath:In,unregisterPath:Bn,refreshOverflowKeys:pr,isSubPathKey:jn,getKeyPath:Xn,getKeys:nr,getSubPathKeys:qn}}function qe(He){var tt=he.useRef(He);tt.current=He;var gt=he.useCallback(function(){for(var Ct,It=arguments.length,ln=new Array(It),mn=0;mn<It;mn++)ln[mn]=arguments[mn];return(Ct=tt.current)===null||Ct===void 0?void 0:Ct.call.apply(Ct,[tt].concat(ln))},[]);return He?gt:void 0}var _t=Math.random().toFixed(5).toString().slice(2),Xt=0;function Kt(He){var tt=(0,jt.Z)(He,{value:He}),gt=(0,ge.Z)(tt,2),Ct=gt[0],It=gt[1];return he.useEffect(function(){Xt+=1;var ln="".concat(_t,"-").concat(Xt);It("rc-menu-uuid-".concat(ln))},[]),Ct}var on=oe(15671),rn=oe(43144),Un=oe(60136),Ar=oe(51630),rr=oe(98423),ir=oe(42550);function mr(He,tt,gt,Ct){var It=he.useContext(se),ln=It.activeKey,mn=It.onActive,Yn=It.onInactive,yr={active:ln===He};return tt||(yr.onMouseEnter=function(Vn){gt==null||gt({key:He,domEvent:Vn}),mn(He)},yr.onMouseLeave=function(Vn){Ct==null||Ct({key:He,domEvent:Vn}),Yn(He)}),yr}function br(He){var tt=he.useContext(se),gt=tt.mode,Ct=tt.rtl,It=tt.inlineIndent;if(gt!=="inline")return null;var ln=He;return Ct?{paddingRight:ln*It}:{paddingLeft:ln*It}}function Yr(He){var tt=He.icon,gt=He.props,Ct=He.children,It;return tt===null||tt===!1?null:(typeof tt=="function"?It=he.createElement(tt,(0,Fe.Z)({},gt)):typeof tt!="boolean"&&(It=tt),It||Ct||null)}var _n=["item"];function Qn(He){var tt=He.item,gt=(0,Me.Z)(He,_n);return Object.defineProperty(gt,"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."),tt}}),gt}var na=["title","attribute","elementRef"],ca=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_i=["active"],ii=function(He){(0,Un.Z)(gt,He);var tt=(0,Ar.Z)(gt);function gt(){return(0,on.Z)(this,gt),tt.apply(this,arguments)}return(0,rn.Z)(gt,[{key:"render",value:function(){var It=this.props,ln=It.title,mn=It.attribute,Yn=It.elementRef,yr=(0,Me.Z)(It,na),Vn=(0,rr.Z)(yr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,xn.ZP)(!mn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),he.createElement(nn.Item,(0,pe.Z)({},mn,{title:typeof ln=="string"?ln:void 0},Vn,{ref:Yn}))}}]),gt}(he.Component),va=he.forwardRef(function(He,tt){var gt,Ct=He.style,It=He.className,ln=He.eventKey,mn=He.warnKey,Yn=He.disabled,yr=He.itemIcon,Vn=He.children,En=He.role,wn=He.onMouseEnter,In=He.onMouseLeave,Bn=He.onClick,pr=He.onKeyDown,Xn=He.onFocus,jn=(0,Me.Z)(He,ca),nr=le(ln),qn=he.useContext(se),dr=qn.prefixCls,je=qn.onItemClick,Ye=qn.disabled,$t=qn.overflowDisabled,Dt=qn.itemIcon,sn=qn.selectedKeys,kn=qn.onActive,yn=he.useContext(Wt),zn=yn._internalRenderMenuItem,Pn="".concat(dr,"-item"),pn=he.useRef(),Nn=he.useRef(),Wn=Ye||Yn,vr=(0,ir.x1)(tt,Nn),Hn=Gt(ln),Er=function(ra){return{key:ln,keyPath:(0,ct.Z)(Hn).reverse(),item:pn.current,domEvent:ra}},Qr=yr||Dt,Rr=mr(ln,Wn,wn,In),jr=Rr.active,Cr=(0,Me.Z)(Rr,_i),Fr=sn.includes(ln),ai=br(Hn.length),hi=function(ra){if(!Wn){var La=Er(ra);Bn==null||Bn(Qn(La)),je(La)}},$r=function(ra){if(pr==null||pr(ra),ra.which===bn.Z.ENTER){var La=Er(ra);Bn==null||Bn(Qn(La)),je(La)}},wi=function(ra){kn(ln),Xn==null||Xn(ra)},ta={};He.role==="option"&&(ta["aria-selected"]=Fr);var Ba=he.createElement(ii,(0,pe.Z)({ref:pn,elementRef:vr,role:En===null?"none":En||"menuitem",tabIndex:Yn?null:-1,"data-menu-id":$t&&nr?null:nr},jn,Cr,ta,{component:"li","aria-disabled":Yn,style:(0,Fe.Z)((0,Fe.Z)({},ai),Ct),className:Ce()(Pn,(gt={},(0,xe.Z)(gt,"".concat(Pn,"-active"),jr),(0,xe.Z)(gt,"".concat(Pn,"-selected"),Fr),(0,xe.Z)(gt,"".concat(Pn,"-disabled"),Wn),gt),It),onClick:hi,onKeyDown:$r,onFocus:wi}),Vn,he.createElement(Yr,{props:(0,Fe.Z)((0,Fe.Z)({},He),{},{isSelected:Fr}),icon:Qr}));return zn&&(Ba=zn(Ba,He,{selected:Fr})),Ba});function _r(He,tt){var gt=He.eventKey,Ct=Zt(),It=Gt(gt);return he.useEffect(function(){if(Ct)return Ct.registerPath(gt,It),function(){Ct.unregisterPath(gt,It)}},[It]),Ct?null:he.createElement(va,(0,pe.Z)({},He,{ref:tt}))}var Qi=he.forwardRef(_r),Tn=["className","children"],Ua=function(tt,gt){var Ct=tt.className,It=tt.children,ln=(0,Me.Z)(tt,Tn),mn=he.useContext(se),Yn=mn.prefixCls,yr=mn.mode,Vn=mn.rtl;return he.createElement("ul",(0,pe.Z)({className:Ce()(Yn,Vn&&"".concat(Yn,"-rtl"),"".concat(Yn,"-sub"),"".concat(Yn,"-").concat(yr==="inline"?"inline":"vertical"),Ct),role:"menu"},ln,{"data-menu-list":!0,ref:gt}),It)},xa=he.forwardRef(Ua);xa.displayName="SubMenuList";var uo=xa,ja=oe(50344);function ka(He,tt){return(0,ja.Z)(He).map(function(gt,Ct){if(he.isValidElement(gt)){var It,ln,mn=gt.key,Yn=(It=(ln=gt.props)===null||ln===void 0?void 0:ln.eventKey)!==null&&It!==void 0?It:mn,yr=Yn==null;yr&&(Yn="tmp_key-".concat([].concat((0,ct.Z)(tt),[Ct]).join("-")));var Vn={key:Yn,eventKey:Yn};return he.cloneElement(gt,Vn)}return gt})}var co=oe(62709),za={adjustX:1,adjustY:1},fa={topLeft:{points:["bl","tl"],overflow:za},topRight:{points:["br","tr"],overflow:za},bottomLeft:{points:["tl","bl"],overflow:za},bottomRight:{points:["tr","br"],overflow:za},leftTop:{points:["tr","tl"],overflow:za},leftBottom:{points:["br","bl"],overflow:za},rightTop:{points:["tl","tr"],overflow:za},rightBottom:{points:["bl","br"],overflow:za}},Ya={topLeft:{points:["bl","tl"],overflow:za},topRight:{points:["br","tr"],overflow:za},bottomLeft:{points:["tl","bl"],overflow:za},bottomRight:{points:["tr","br"],overflow:za},rightTop:{points:["tr","tl"],overflow:za},rightBottom:{points:["br","bl"],overflow:za},leftTop:{points:["tl","tr"],overflow:za},leftBottom:{points:["bl","br"],overflow:za}},_o=null;function qa(He,tt,gt){if(tt)return tt;if(gt)return gt[He]||gt.other}var Oa={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function So(He){var tt=He.prefixCls,gt=He.visible,Ct=He.children,It=He.popup,ln=He.popupStyle,mn=He.popupClassName,Yn=He.popupOffset,yr=He.disabled,Vn=He.mode,En=He.onVisibleChange,wn=he.useContext(se),In=wn.getPopupContainer,Bn=wn.rtl,pr=wn.subMenuOpenDelay,Xn=wn.subMenuCloseDelay,jn=wn.builtinPlacements,nr=wn.triggerSubMenuAction,qn=wn.forceSubMenuRender,dr=wn.rootClassName,je=wn.motion,Ye=wn.defaultMotions,$t=he.useState(!1),Dt=(0,ge.Z)($t,2),sn=Dt[0],kn=Dt[1],yn=Bn?(0,Fe.Z)((0,Fe.Z)({},Ya),jn):(0,Fe.Z)((0,Fe.Z)({},fa),jn),zn=Oa[Vn],Pn=qa(Vn,je,Ye),pn=he.useRef(Pn);Vn!=="inline"&&(pn.current=Pn);var Nn=(0,Fe.Z)((0,Fe.Z)({},pn.current),{},{leavedClassName:"".concat(tt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Wn=he.useRef();return he.useEffect(function(){return Wn.current=(0,lr.Z)(function(){kn(gt)}),function(){lr.Z.cancel(Wn.current)}},[gt]),he.createElement(co.Z,{prefixCls:tt,popupClassName:Ce()("".concat(tt,"-popup"),(0,xe.Z)({},"".concat(tt,"-rtl"),Bn),mn,dr),stretch:Vn==="horizontal"?"minWidth":null,getPopupContainer:In,builtinPlacements:yn,popupPlacement:zn,popupVisible:sn,popup:It,popupStyle:ln,popupAlign:Yn&&{offset:Yn},action:yr?[]:[nr],mouseEnterDelay:pr,mouseLeaveDelay:Xn,onPopupVisibleChange:En,forceRender:qn,popupMotion:Nn,fresh:!0},Ct)}var To=oe(62874);function fo(He){var tt=He.id,gt=He.open,Ct=He.keyPath,It=He.children,ln="inline",mn=he.useContext(se),Yn=mn.prefixCls,yr=mn.forceSubMenuRender,Vn=mn.motion,En=mn.defaultMotions,wn=mn.mode,In=he.useRef(!1);In.current=wn===ln;var Bn=he.useState(!In.current),pr=(0,ge.Z)(Bn,2),Xn=pr[0],jn=pr[1],nr=In.current?gt:!1;he.useEffect(function(){In.current&&jn(!1)},[wn]);var qn=(0,Fe.Z)({},qa(ln,Vn,En));Ct.length>1&&(qn.motionAppear=!1);var dr=qn.onVisibleChanged;return qn.onVisibleChanged=function(je){return!In.current&&!je&&jn(!0),dr==null?void 0:dr(je)},Xn?null:he.createElement(rt,{mode:ln,locked:!In.current},he.createElement(To.Z,(0,pe.Z)({visible:nr},qn,{forceRender:yr,removeOnLeave:!1,leavedClassName:"".concat(Yn,"-hidden")}),function(je){var Ye=je.className,$t=je.style;return he.createElement(uo,{id:tt,className:Ye,style:$t},It)}))}var Vi=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],At=["active"],Mt=function(tt){var gt,Ct=tt.style,It=tt.className,ln=tt.title,mn=tt.eventKey,Yn=tt.warnKey,yr=tt.disabled,Vn=tt.internalPopupClose,En=tt.children,wn=tt.itemIcon,In=tt.expandIcon,Bn=tt.popupClassName,pr=tt.popupOffset,Xn=tt.popupStyle,jn=tt.onClick,nr=tt.onMouseEnter,qn=tt.onMouseLeave,dr=tt.onTitleClick,je=tt.onTitleMouseEnter,Ye=tt.onTitleMouseLeave,$t=(0,Me.Z)(tt,Vi),Dt=le(mn),sn=he.useContext(se),kn=sn.prefixCls,yn=sn.mode,zn=sn.openKeys,Pn=sn.disabled,pn=sn.overflowDisabled,Nn=sn.activeKey,Wn=sn.selectedKeys,vr=sn.itemIcon,Hn=sn.expandIcon,Er=sn.onItemClick,Qr=sn.onOpenChange,Rr=sn.onActive,jr=he.useContext(Wt),Cr=jr._internalRenderSubMenuItem,Fr=he.useContext(tr),ai=Fr.isSubPathKey,hi=Gt(),$r="".concat(kn,"-submenu"),wi=Pn||yr,ta=he.useRef(),Ba=he.useRef(),ga=wn!=null?wn:vr,ra=In!=null?In:Hn,La=zn.includes(mn),Aa=!pn&&La,Oi=ai(Wn,mn),ia=mr(mn,wi,je,Ye),ni=ia.active,Ci=(0,Me.Z)(ia,At),Xi=he.useState(!1),wa=(0,ge.Z)(Xi,2),ri=wa[0],io=wa[1],ko=function(oo){wi||io(oo)},Ja=function(oo){ko(!0),nr==null||nr({key:mn,domEvent:oo})},Ta=function(oo){ko(!1),qn==null||qn({key:mn,domEvent:oo})},Ui=he.useMemo(function(){return ni||(yn!=="inline"?ri||ai([Nn],mn):!1)},[yn,ni,Nn,ri,mn,ai]),Po=br(hi.length),Yi=function(oo){wi||(dr==null||dr({key:mn,domEvent:oo}),yn==="inline"&&Qr(mn,!La))},oi=qe(function(eo){jn==null||jn(Qn(eo)),Er(eo)}),sa=function(oo){yn!=="inline"&&Qr(mn,oo)},Ga=function(){Rr(mn)},la=Dt&&"".concat(Dt,"-popup"),Ka=he.createElement("div",(0,pe.Z)({role:"menuitem",style:Po,className:"".concat($r,"-title"),tabIndex:wi?null:-1,ref:ta,title:typeof ln=="string"?ln:null,"data-menu-id":pn&&Dt?null:Dt,"aria-expanded":Aa,"aria-haspopup":!0,"aria-controls":la,"aria-disabled":wi,onClick:Yi,onFocus:Ga},Ci),ln,he.createElement(Yr,{icon:yn!=="horizontal"?ra:void 0,props:(0,Fe.Z)((0,Fe.Z)({},tt),{},{isOpen:Aa,isSubMenu:!0})},he.createElement("i",{className:"".concat($r,"-arrow")}))),ki=he.useRef(yn);if(yn!=="inline"&&hi.length>1?ki.current="vertical":ki.current=yn,!pn){var ro=ki.current;Ka=he.createElement(So,{mode:ro,prefixCls:$r,visible:!Vn&&Aa&&yn!=="inline",popupClassName:Bn,popupOffset:pr,popupStyle:Xn,popup:he.createElement(rt,{mode:ro==="horizontal"?"vertical":ro},he.createElement(uo,{id:la,ref:Ba},En)),disabled:wi,onVisibleChange:sa},Ka)}var ao=he.createElement(nn.Item,(0,pe.Z)({role:"none"},$t,{component:"li",style:Ct,className:Ce()($r,"".concat($r,"-").concat(yn),It,(gt={},(0,xe.Z)(gt,"".concat($r,"-open"),Aa),(0,xe.Z)(gt,"".concat($r,"-active"),Ui),(0,xe.Z)(gt,"".concat($r,"-selected"),Oi),(0,xe.Z)(gt,"".concat($r,"-disabled"),wi),gt)),onMouseEnter:Ja,onMouseLeave:Ta}),Ka,!pn&&he.createElement(fo,{id:la,open:Aa,keyPath:hi},En));return Cr&&(ao=Cr(ao,tt,{selected:Oi,active:Ui,open:Aa,disabled:wi})),he.createElement(rt,{onItemClick:oi,mode:yn==="horizontal"?"vertical":yn,itemIcon:ga,expandIcon:ra},ao)};function tn(He){var tt=He.eventKey,gt=He.children,Ct=Gt(tt),It=ka(gt,Ct),ln=Zt();he.useEffect(function(){if(ln)return ln.registerPath(tt,Ct),function(){ln.unregisterPath(tt,Ct)}},[Ct]);var mn;return ln?mn=It:mn=he.createElement(Mt,He,It),he.createElement(en.Provider,{value:Ct},mn)}var Sn=oe(71002),Kn=["className","title","eventKey","children"],Zr=["children"],Nr=function(tt){var gt=tt.className,Ct=tt.title,It=tt.eventKey,ln=tt.children,mn=(0,Me.Z)(tt,Kn),Yn=he.useContext(se),yr=Yn.prefixCls,Vn="".concat(yr,"-item-group");return he.createElement("li",(0,pe.Z)({role:"presentation"},mn,{onClick:function(wn){return wn.stopPropagation()},className:Ce()(Vn,gt)}),he.createElement("div",{role:"presentation",className:"".concat(Vn,"-title"),title:typeof Ct=="string"?Ct:void 0},Ct),he.createElement("ul",{role:"group",className:"".concat(Vn,"-list")},ln))};function qr(He){var tt=He.children,gt=(0,Me.Z)(He,Zr),Ct=Gt(gt.eventKey),It=ka(tt,Ct),ln=Zt();return ln?It:he.createElement(Nr,(0,rr.Z)(gt,["warnKey"]),It)}function li(He){var tt=He.className,gt=He.style,Ct=he.useContext(se),It=Ct.prefixCls,ln=Zt();return ln?null:he.createElement("li",{role:"separator",className:Ce()("".concat(It,"-item-divider"),tt),style:gt})}var Jr=["label","children","key","type"];function Ki(He){return(He||[]).map(function(tt,gt){if(tt&&(0,Sn.Z)(tt)==="object"){var Ct=tt,It=Ct.label,ln=Ct.children,mn=Ct.key,Yn=Ct.type,yr=(0,Me.Z)(Ct,Jr),Vn=mn!=null?mn:"tmp-".concat(gt);return ln||Yn==="group"?Yn==="group"?he.createElement(qr,(0,pe.Z)({key:Vn},yr,{title:It}),Ki(ln)):he.createElement(tn,(0,pe.Z)({key:Vn},yr,{title:It}),Ki(ln)):Yn==="divider"?he.createElement(li,(0,pe.Z)({key:Vn},yr)):he.createElement(Qi,(0,pe.Z)({key:Vn},yr),It)}return null}).filter(function(tt){return tt})}function ea(He,tt,gt){var Ct=He;return tt&&(Ct=Ki(tt)),ka(Ct,gt)}var ha=["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"],Za=[],Na=he.forwardRef(function(He,tt){var gt,Ct,It=He,ln=It.prefixCls,mn=ln===void 0?"rc-menu":ln,Yn=It.rootClassName,yr=It.style,Vn=It.className,En=It.tabIndex,wn=En===void 0?0:En,In=It.items,Bn=It.children,pr=It.direction,Xn=It.id,jn=It.mode,nr=jn===void 0?"vertical":jn,qn=It.inlineCollapsed,dr=It.disabled,je=It.disabledOverflow,Ye=It.subMenuOpenDelay,$t=Ye===void 0?.1:Ye,Dt=It.subMenuCloseDelay,sn=Dt===void 0?.1:Dt,kn=It.forceSubMenuRender,yn=It.defaultOpenKeys,zn=It.openKeys,Pn=It.activeKey,pn=It.defaultActiveFirst,Nn=It.selectable,Wn=Nn===void 0?!0:Nn,vr=It.multiple,Hn=vr===void 0?!1:vr,Er=It.defaultSelectedKeys,Qr=It.selectedKeys,Rr=It.onSelect,jr=It.onDeselect,Cr=It.inlineIndent,Fr=Cr===void 0?24:Cr,ai=It.motion,hi=It.defaultMotions,$r=It.triggerSubMenuAction,wi=$r===void 0?"hover":$r,ta=It.builtinPlacements,Ba=It.itemIcon,ga=It.expandIcon,ra=It.overflowedIndicator,La=ra===void 0?"...":ra,Aa=It.overflowedIndicatorPopupClassName,Oi=It.getPopupContainer,ia=It.onClick,ni=It.onOpenChange,Ci=It.onKeyDown,Xi=It.openAnimation,wa=It.openTransitionName,ri=It._internalRenderMenuItem,io=It._internalRenderSubMenuItem,ko=(0,Me.Z)(It,ha),Ja=he.useMemo(function(){return ea(Bn,In,Za)},[Bn,In]),Ta=he.useState(!1),Ui=(0,ge.Z)(Ta,2),Po=Ui[0],Yi=Ui[1],oi=he.useRef(),sa=Kt(Xn),Ga=pr==="rtl",la=(0,jt.Z)(yn,{value:zn,postState:function(Dr){return Dr||Za}}),Ka=(0,ge.Z)(la,2),ki=Ka[0],ro=Ka[1],ao=function(Dr){var Ur=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Hi(){ro(Dr),ni==null||ni(Dr)}Ur?(0,be.flushSync)(Hi):Hi()},eo=he.useState(ki),oo=(0,ge.Z)(eo,2),wo=oo[0],Ho=oo[1],to=he.useRef(!1),Co=he.useMemo(function(){return(nr==="inline"||nr==="vertical")&&qn?["vertical",qn]:[nr,!1]},[nr,qn]),Jo=(0,ge.Z)(Co,2),Xo=Jo[0],as=Jo[1],No=Xo==="inline",vo=he.useState(Xo),ji=(0,ge.Z)(vo,2),ua=ji[0],Qa=ji[1],ho=he.useState(as),Fo=(0,ge.Z)(ho,2),es=Fo[0],ms=Fo[1];he.useEffect(function(){Qa(Xo),ms(as),to.current&&(No?ro(wo):ao(Za))},[Xo,as]);var Rs=he.useState(0),Fs=(0,ge.Z)(Rs,2),os=Fs[0],Ts=Fs[1],Fa=os>=Ja.length-1||ua!=="horizontal"||je;he.useEffect(function(){No&&Ho(ki)},[ki]),he.useEffect(function(){return to.current=!0,function(){to.current=!1}},[]);var Ni=qt(),Do=Ni.registerPath,Eo=Ni.unregisterPath,Ie=Ni.refreshOverflowKeys,Re=Ni.isSubPathKey,St=Ni.getKeyPath,xt=Ni.getKeys,Jt=Ni.getSubPathKeys,Ht=he.useMemo(function(){return{registerPath:Do,unregisterPath:Eo}},[Do,Eo]),Rt=he.useMemo(function(){return{isSubPathKey:Re}},[Re]);he.useEffect(function(){Ie(Fa?Za:Ja.slice(os+1).map(function(wr){return wr.key}))},[os,Fa]);var fn=(0,jt.Z)(Pn||pn&&((gt=Ja[0])===null||gt===void 0?void 0:gt.key),{value:Pn}),hn=(0,ge.Z)(fn,2),Mn=hn[0],ur=hn[1],er=qe(function(wr){ur(wr)}),zr=qe(function(){ur(void 0)});(0,he.useImperativeHandle)(tt,function(){return{list:oi.current,focus:function(Dr){var Ur,Hi=Mn!=null?Mn:(Ur=Ja.find(function(qi){return!qi.props.disabled}))===null||Ur===void 0?void 0:Ur.key;if(Hi){var Di,Bi,Ii;(Di=oi.current)===null||Di===void 0||(Bi=Di.querySelector("li[data-menu-id='".concat(ue(sa,Hi),"']")))===null||Bi===void 0||(Ii=Bi.focus)===null||Ii===void 0||Ii.call(Bi,Dr)}}}});var sr=(0,jt.Z)(Er||[],{value:Qr,postState:function(Dr){return Array.isArray(Dr)?Dr:Dr==null?Za:[Dr]}}),Mr=(0,ge.Z)(sr,2),hr=Mr[0],Kr=Mr[1],si=function(Dr){if(Wn){var Ur=Dr.key,Hi=hr.includes(Ur),Di;Hn?Hi?Di=hr.filter(function(Ii){return Ii!==Ur}):Di=[].concat((0,ct.Z)(hr),[Ur]):Di=[Ur],Kr(Di);var Bi=(0,Fe.Z)((0,Fe.Z)({},Dr),{},{selectedKeys:Di});Hi?jr==null||jr(Bi):Rr==null||Rr(Bi)}!Hn&&ki.length&&ua!=="inline"&&ao(Za)},yi=qe(function(wr){ia==null||ia(Qn(wr)),si(wr)}),Ei=qe(function(wr,Dr){var Ur=ki.filter(function(Di){return Di!==wr});if(Dr)Ur.push(wr);else if(ua!=="inline"){var Hi=Jt(wr);Ur=Ur.filter(function(Di){return!Hi.has(Di)})}(0,vn.Z)(ki,Ur,!0)||ao(Ur,!0)}),pi=function(Dr,Ur){var Hi=Ur!=null?Ur:!ki.includes(Dr);Ei(Dr,Hi)},Ai=or(ua,Mn,Ga,sa,oi,xt,St,ur,pi,Ci);he.useEffect(function(){Yi(!0)},[]);var ei=he.useMemo(function(){return{_internalRenderMenuItem:ri,_internalRenderSubMenuItem:io}},[ri,io]),Ti=ua!=="horizontal"||je?Ja:Ja.map(function(wr,Dr){return he.createElement(rt,{key:wr.key,overflowDisabled:Dr>os},wr)}),Ri=he.createElement(nn,(0,pe.Z)({id:Xn,ref:oi,prefixCls:"".concat(mn,"-overflow"),component:"ul",itemComponent:Qi,className:Ce()(mn,"".concat(mn,"-root"),"".concat(mn,"-").concat(ua),Vn,(Ct={},(0,xe.Z)(Ct,"".concat(mn,"-inline-collapsed"),es),(0,xe.Z)(Ct,"".concat(mn,"-rtl"),Ga),Ct),Yn),dir:pr,style:yr,role:"menu",tabIndex:wn,data:Ti,renderRawItem:function(Dr){return Dr},renderRawRest:function(Dr){var Ur=Dr.length,Hi=Ur?Ja.slice(-Ur):null;return he.createElement(tn,{eventKey:Ft,title:La,disabled:Fa,internalPopupClose:Ur===0,popupClassName:Aa},Hi)},maxCount:ua!=="horizontal"||je?nn.INVALIDATE:nn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Dr){Ts(Dr)},onKeyDown:Ai},ko));return he.createElement(Wt.Provider,{value:ei},he.createElement(Te.Provider,{value:sa},he.createElement(rt,{prefixCls:mn,rootClassName:Yn,mode:ua,openKeys:ki,rtl:Ga,disabled:dr,motion:Po?ai:null,defaultMotions:Po?hi:null,activeKey:Mn,onActive:er,onInactive:zr,selectedKeys:hr,inlineIndent:Fr,subMenuOpenDelay:$t,subMenuCloseDelay:sn,forceSubMenuRender:kn,builtinPlacements:ta,triggerSubMenuAction:wi,getPopupContainer:Oi,itemIcon:Ba,expandIcon:ga,onItemClick:yi,onOpenChange:Ei},he.createElement(tr.Provider,{value:Rt},Ri),he.createElement("div",{style:{display:"none"},"aria-hidden":!0},he.createElement(zt.Provider,{value:Ht},Ja)))))}),Ra=Na,Be=Ra;Be.Item=Qi,Be.SubMenu=tn,Be.ItemGroup=qr,Be.Divider=li;var Ve=Be},86128:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ke}});var pe=oe(87462),xe=oe(4942),Fe=oe(45987),ct=oe(1413),ge=oe(15671),Me=oe(43144),Ee=oe(97326),Ce=oe(60136),he=oe(51630),ke=oe(67294),Je=oe(94184),Pe=oe.n(Je),dt=oe(64217),ot=oe(27822),lt=function(vt){for(var pt=vt.prefixCls,Ue=vt.level,et=vt.isStart,kt=vt.isEnd,it="".concat(pt,"-indent-unit"),st=[],We=0;We<Ue;We+=1){var Tt;st.push(ke.createElement("span",{key:We,className:Pe()(it,(Tt={},(0,xe.Z)(Tt,"".concat(it,"-start"),et[We]),(0,xe.Z)(Tt,"".concat(it,"-end"),kt[We]),Tt))}))}return ke.createElement("span",{"aria-hidden":"true",className:"".concat(pt,"-indent")},st)},nt=ke.memo(lt),_e=oe(1089),ht=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],yt="open",Ze="close",Qe="---",be=function(Ge){(0,Ce.Z)(pt,Ge);var vt=(0,he.Z)(pt);function pt(){var Ue;(0,ge.Z)(this,pt);for(var et=arguments.length,kt=new Array(et),it=0;it<et;it++)kt[it]=arguments[it];return Ue=vt.call.apply(vt,[this].concat(kt)),Ue.state={dragNodeHighlight:!1},Ue.selectHandle=void 0,Ue.onSelectorClick=function(st){var We=Ue.props.context.onNodeClick;We(st,(0,_e.F)(Ue.props)),Ue.isSelectable()?Ue.onSelect(st):Ue.onCheck(st)},Ue.onSelectorDoubleClick=function(st){var We=Ue.props.context.onNodeDoubleClick;We(st,(0,_e.F)(Ue.props))},Ue.onSelect=function(st){if(!Ue.isDisabled()){var We=Ue.props.context.onNodeSelect;st.preventDefault(),We(st,(0,_e.F)(Ue.props))}},Ue.onCheck=function(st){if(!Ue.isDisabled()){var We=Ue.props,Tt=We.disableCheckbox,Ut=We.checked,Qt=Ue.props.context.onNodeCheck;if(!(!Ue.isCheckable()||Tt)){st.preventDefault();var Xe=!Ut;Qt(st,(0,_e.F)(Ue.props),Xe)}}},Ue.onMouseEnter=function(st){var We=Ue.props.context.onNodeMouseEnter;We(st,(0,_e.F)(Ue.props))},Ue.onMouseLeave=function(st){var We=Ue.props.context.onNodeMouseLeave;We(st,(0,_e.F)(Ue.props))},Ue.onContextMenu=function(st){var We=Ue.props.context.onNodeContextMenu;We(st,(0,_e.F)(Ue.props))},Ue.onDragStart=function(st){var We=Ue.props.context.onNodeDragStart;st.stopPropagation(),Ue.setState({dragNodeHighlight:!0}),We(st,(0,Ee.Z)(Ue));try{st.dataTransfer.setData("text/plain","")}catch(Tt){}},Ue.onDragEnter=function(st){var We=Ue.props.context.onNodeDragEnter;st.preventDefault(),st.stopPropagation(),We(st,(0,Ee.Z)(Ue))},Ue.onDragOver=function(st){var We=Ue.props.context.onNodeDragOver;st.preventDefault(),st.stopPropagation(),We(st,(0,Ee.Z)(Ue))},Ue.onDragLeave=function(st){var We=Ue.props.context.onNodeDragLeave;st.stopPropagation(),We(st,(0,Ee.Z)(Ue))},Ue.onDragEnd=function(st){var We=Ue.props.context.onNodeDragEnd;st.stopPropagation(),Ue.setState({dragNodeHighlight:!1}),We(st,(0,Ee.Z)(Ue))},Ue.onDrop=function(st){var We=Ue.props.context.onNodeDrop;st.preventDefault(),st.stopPropagation(),Ue.setState({dragNodeHighlight:!1}),We(st,(0,Ee.Z)(Ue))},Ue.onExpand=function(st){var We=Ue.props,Tt=We.loading,Ut=We.context.onNodeExpand;Tt||Ut(st,(0,_e.F)(Ue.props))},Ue.setSelectHandle=function(st){Ue.selectHandle=st},Ue.getNodeState=function(){var st=Ue.props.expanded;return Ue.isLeaf()?null:st?yt:Ze},Ue.hasChildren=function(){var st=Ue.props.eventKey,We=Ue.props.context.keyEntities,Tt=We[st]||{},Ut=Tt.children;return!!(Ut||[]).length},Ue.isLeaf=function(){var st=Ue.props,We=st.isLeaf,Tt=st.loaded,Ut=Ue.props.context.loadData,Qt=Ue.hasChildren();return We===!1?!1:We||!Ut&&!Qt||Ut&&Tt&&!Qt},Ue.isDisabled=function(){var st=Ue.props.disabled,We=Ue.props.context.disabled;return!!(We||st)},Ue.isCheckable=function(){var st=Ue.props.checkable,We=Ue.props.context.checkable;return!We||st===!1?!1:We},Ue.syncLoadData=function(st){var We=st.expanded,Tt=st.loading,Ut=st.loaded,Qt=Ue.props.context,Xe=Qt.loadData,Ae=Qt.onNodeLoad;Tt||Xe&&We&&!Ue.isLeaf()&&!Ue.hasChildren()&&!Ut&&Ae((0,_e.F)(Ue.props))},Ue.isDraggable=function(){var st=Ue.props,We=st.data,Tt=st.context.draggable;return!!(Tt&&(!Tt.nodeDraggable||Tt.nodeDraggable(We)))},Ue.renderDragHandler=function(){var st=Ue.props.context,We=st.draggable,Tt=st.prefixCls;return We!=null&&We.icon?ke.createElement("span",{className:"".concat(Tt,"-draggable-icon")},We.icon):null},Ue.renderSwitcherIconDom=function(st){var We=Ue.props.switcherIcon,Tt=Ue.props.context.switcherIcon,Ut=We||Tt;return typeof Ut=="function"?Ut((0,ct.Z)((0,ct.Z)({},Ue.props),{},{isLeaf:st})):Ut},Ue.renderSwitcher=function(){var st=Ue.props.expanded,We=Ue.props.context.prefixCls;if(Ue.isLeaf()){var Tt=Ue.renderSwitcherIconDom(!0);return Tt!==!1?ke.createElement("span",{className:Pe()("".concat(We,"-switcher"),"".concat(We,"-switcher-noop"))},Tt):null}var Ut=Pe()("".concat(We,"-switcher"),"".concat(We,"-switcher_").concat(st?yt:Ze)),Qt=Ue.renderSwitcherIconDom(!1);return Qt!==!1?ke.createElement("span",{onClick:Ue.onExpand,className:Ut},Qt):null},Ue.renderCheckbox=function(){var st=Ue.props,We=st.checked,Tt=st.halfChecked,Ut=st.disableCheckbox,Qt=Ue.props.context.prefixCls,Xe=Ue.isDisabled(),Ae=Ue.isCheckable();if(!Ae)return null;var Lt=typeof Ae!="boolean"?Ae:null;return ke.createElement("span",{className:Pe()("".concat(Qt,"-checkbox"),We&&"".concat(Qt,"-checkbox-checked"),!We&&Tt&&"".concat(Qt,"-checkbox-indeterminate"),(Xe||Ut)&&"".concat(Qt,"-checkbox-disabled")),onClick:Ue.onCheck},Lt)},Ue.renderIcon=function(){var st=Ue.props.loading,We=Ue.props.context.prefixCls;return ke.createElement("span",{className:Pe()("".concat(We,"-iconEle"),"".concat(We,"-icon__").concat(Ue.getNodeState()||"docu"),st&&"".concat(We,"-icon_loading"))})},Ue.renderSelector=function(){var st=Ue.state.dragNodeHighlight,We=Ue.props,Tt=We.title,Ut=Tt===void 0?Qe:Tt,Qt=We.selected,Xe=We.icon,Ae=We.loading,Lt=We.data,cn=Ue.props.context,an=cn.prefixCls,ft=cn.showIcon,mt=cn.icon,Yt=cn.loadData,An=cn.titleRender,dn=Ue.isDisabled(),nn="".concat(an,"-node-content-wrapper"),jt;if(ft){var xn=Xe||mt;jt=xn?ke.createElement("span",{className:Pe()("".concat(an,"-iconEle"),"".concat(an,"-icon__customize"))},typeof xn=="function"?xn(Ue.props):xn):Ue.renderIcon()}else Yt&&Ae&&(jt=Ue.renderIcon());var vn;typeof Ut=="function"?vn=Ut(Lt):An?vn=An(Lt):vn=Ut;var Te=ke.createElement("span",{className:"".concat(an,"-title")},vn);return ke.createElement("span",{ref:Ue.setSelectHandle,title:typeof Ut=="string"?Ut:"",className:Pe()("".concat(nn),"".concat(nn,"-").concat(Ue.getNodeState()||"normal"),!dn&&(Qt||st)&&"".concat(an,"-node-selected")),onMouseEnter:Ue.onMouseEnter,onMouseLeave:Ue.onMouseLeave,onContextMenu:Ue.onContextMenu,onClick:Ue.onSelectorClick,onDoubleClick:Ue.onSelectorDoubleClick},jt,Te,Ue.renderDropIndicator())},Ue.renderDropIndicator=function(){var st=Ue.props,We=st.disabled,Tt=st.eventKey,Ut=Ue.props.context,Qt=Ut.draggable,Xe=Ut.dropLevelOffset,Ae=Ut.dropPosition,Lt=Ut.prefixCls,cn=Ut.indent,an=Ut.dropIndicatorRender,ft=Ut.dragOverNodeKey,mt=Ut.direction,Yt=!!Qt,An=!We&&Yt&&ft===Tt;return An?an({dropPosition:Ae,dropLevelOffset:Xe,indent:cn,prefixCls:Lt,direction:mt}):null},Ue}return(0,Me.Z)(pt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var et=this.props.selectable,kt=this.props.context.selectable;return typeof et=="boolean"?et:kt}},{key:"render",value:function(){var et,kt=this.props,it=kt.eventKey,st=kt.className,We=kt.style,Tt=kt.dragOver,Ut=kt.dragOverGapTop,Qt=kt.dragOverGapBottom,Xe=kt.isLeaf,Ae=kt.isStart,Lt=kt.isEnd,cn=kt.expanded,an=kt.selected,ft=kt.checked,mt=kt.halfChecked,Yt=kt.loading,An=kt.domRef,dn=kt.active,nn=kt.data,jt=kt.onMouseMove,xn=kt.selectable,vn=(0,Fe.Z)(kt,ht),Te=this.props.context,ue=Te.prefixCls,le=Te.filterTreeNode,me=Te.keyEntities,fe=Te.dropContainerKey,se=Te.dropTargetKey,Oe=Te.draggingNodeKey,rt=this.isDisabled(),Pt=(0,dt.Z)(vn,{aria:!0,data:!0}),zt=me[it]||{},Zt=zt.level,en=Lt[Lt.length-1],Gt=this.isDraggable(),tr=!rt&&Gt,cr=Oe===it,Wt=xn!==void 0?{"aria-selected":!!xn}:void 0;return ke.createElement("div",(0,pe.Z)({ref:An,className:Pe()(st,"".concat(ue,"-treenode"),(et={},(0,xe.Z)(et,"".concat(ue,"-treenode-disabled"),rt),(0,xe.Z)(et,"".concat(ue,"-treenode-switcher-").concat(cn?"open":"close"),!Xe),(0,xe.Z)(et,"".concat(ue,"-treenode-checkbox-checked"),ft),(0,xe.Z)(et,"".concat(ue,"-treenode-checkbox-indeterminate"),mt),(0,xe.Z)(et,"".concat(ue,"-treenode-selected"),an),(0,xe.Z)(et,"".concat(ue,"-treenode-loading"),Yt),(0,xe.Z)(et,"".concat(ue,"-treenode-active"),dn),(0,xe.Z)(et,"".concat(ue,"-treenode-leaf-last"),en),(0,xe.Z)(et,"".concat(ue,"-treenode-draggable"),Gt),(0,xe.Z)(et,"dragging",cr),(0,xe.Z)(et,"drop-target",se===it),(0,xe.Z)(et,"drop-container",fe===it),(0,xe.Z)(et,"drag-over",!rt&&Tt),(0,xe.Z)(et,"drag-over-gap-top",!rt&&Ut),(0,xe.Z)(et,"drag-over-gap-bottom",!rt&&Qt),(0,xe.Z)(et,"filter-node",le&&le((0,_e.F)(this.props))),et)),style:We,draggable:tr,"aria-grabbed":cr,onDragStart:tr?this.onDragStart:void 0,onDragEnter:Gt?this.onDragEnter:void 0,onDragOver:Gt?this.onDragOver:void 0,onDragLeave:Gt?this.onDragLeave:void 0,onDrop:Gt?this.onDrop:void 0,onDragEnd:Gt?this.onDragEnd:void 0,onMouseMove:jt},Wt,Pt),ke.createElement(nt,{prefixCls:ue,level:Zt,isStart:Ae,isEnd:Lt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),pt}(ke.Component),we=function(vt){return ke.createElement(ot.k.Consumer,null,function(pt){return ke.createElement(be,(0,pe.Z)({},vt,{context:pt}))})};we.displayName="TreeNode",we.isTreeNode=1;var Ke=we},27822:function(Cn,Vt,oe){"use strict";oe.d(Vt,{k:function(){return xe}});var pe=oe(67294),xe=pe.createContext(null)},10225:function(Cn,Vt,oe){"use strict";oe.d(Vt,{BT:function(){return nt},Ds:function(){return Je},E6:function(){return yt},L0:function(){return Ce},OM:function(){return lt},_5:function(){return Ee},bt:function(){return ke},r7:function(){return Ze},wA:function(){return Pe},yx:function(){return he}});var pe=oe(74902),xe=oe(71002),Fe=oe(67294),ct=oe(80334),ge=oe(86128),Me=null;function Ee(Qe,be){if(!Qe)return[];var we=Qe.slice(),Ke=we.indexOf(be);return Ke>=0&&we.splice(Ke,1),we}function Ce(Qe,be){var we=(Qe||[]).slice();return we.indexOf(be)===-1&&we.push(be),we}function he(Qe){return Qe.split("-")}function ke(Qe,be){return"".concat(Qe,"-").concat(be)}function Je(Qe){return Qe&&Qe.type&&Qe.type.isTreeNode}function Pe(Qe,be){var we=[],Ke=be[Qe];function Ge(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];vt.forEach(function(pt){var Ue=pt.key,et=pt.children;we.push(Ue),Ge(et)})}return Ge(Ke.children),we}function dt(Qe){if(Qe.parent){var be=he(Qe.pos);return Number(be[be.length-1])===Qe.parent.children.length-1}return!1}function ot(Qe){var be=he(Qe.pos);return Number(be[be.length-1])===0}function lt(Qe,be,we,Ke,Ge,vt,pt,Ue,et,kt){var it,st=Qe.clientX,We=Qe.clientY,Tt=Qe.target.getBoundingClientRect(),Ut=Tt.top,Qt=Tt.height,Xe=(kt==="rtl"?-1:1)*(((Ge==null?void 0:Ge.x)||0)-st),Ae=(Xe-12)/Ke,Lt=Ue[we.props.eventKey];if(We<Ut+Qt/2){var cn=pt.findIndex(function(ue){return ue.key===Lt.key}),an=cn<=0?0:cn-1,ft=pt[an].key;Lt=Ue[ft]}var mt=Lt.key,Yt=Lt,An=Lt.key,dn=0,nn=0;if(!et.includes(mt))for(var jt=0;jt<Ae&&dt(Lt);jt+=1)Lt=Lt.parent,nn+=1;var xn=be.props.data,vn=Lt.node,Te=!0;return ot(Lt)&&Lt.level===0&&We<Ut+Qt/2&&vt({dragNode:xn,dropNode:vn,dropPosition:-1})&&Lt.key===we.props.eventKey?dn=-1:(Yt.children||[]).length&&et.includes(An)?vt({dragNode:xn,dropNode:vn,dropPosition:0})?dn=0:Te=!1:nn===0?Ae>-1.5?vt({dragNode:xn,dropNode:vn,dropPosition:1})?dn=1:Te=!1:vt({dragNode:xn,dropNode:vn,dropPosition:0})?dn=0:vt({dragNode:xn,dropNode:vn,dropPosition:1})?dn=1:Te=!1:vt({dragNode:xn,dropNode:vn,dropPosition:1})?dn=1:Te=!1,{dropPosition:dn,dropLevelOffset:nn,dropTargetKey:Lt.key,dropTargetPos:Lt.pos,dragOverNodeKey:An,dropContainerKey:dn===0?null:((it=Lt.parent)===null||it===void 0?void 0:it.key)||null,dropAllowed:Te}}function nt(Qe,be){if(Qe){var we=be.multiple;return we?Qe.slice():Qe.length?[Qe[0]]:Qe}}var _e=function(be){return be};function ht(Qe,be){if(!Qe)return[];var we=be||{},Ke=we.processProps,Ge=Ke===void 0?_e:Ke,vt=Array.isArray(Qe)?Qe:[Qe];return vt.map(function(pt){var Ue=pt.children,et=_objectWithoutProperties(pt,Me),kt=ht(Ue,be);return React.createElement(TreeNode,_extends({key:et.key},Ge(et)),kt)})}function yt(Qe){if(!Qe)return null;var be;if(Array.isArray(Qe))be={checkedKeys:Qe,halfCheckedKeys:void 0};else if((0,xe.Z)(Qe)==="object")be={checkedKeys:Qe.checked||void 0,halfCheckedKeys:Qe.halfChecked||void 0};else return(0,ct.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return be}function Ze(Qe,be){var we=new Set;function Ke(Ge){if(!we.has(Ge)){var vt=be[Ge];if(vt){we.add(Ge);var pt=vt.parent,Ue=vt.node;Ue.disabled||pt&&Ke(pt.key)}}}return(Qe||[]).forEach(function(Ge){Ke(Ge)}),(0,pe.Z)(we)}},17341:function(Cn,Vt,oe){"use strict";oe.d(Vt,{S:function(){return Me}});var pe=oe(80334);function xe(Ee,Ce){var he=new Set;return Ee.forEach(function(ke){Ce.has(ke)||he.add(ke)}),he}function Fe(Ee){var Ce=Ee||{},he=Ce.disabled,ke=Ce.disableCheckbox,Je=Ce.checkable;return!!(he||ke)||Je===!1}function ct(Ee,Ce,he,ke){for(var Je=new Set(Ee),Pe=new Set,dt=0;dt<=he;dt+=1){var ot=Ce.get(dt)||new Set;ot.forEach(function(ht){var yt=ht.key,Ze=ht.node,Qe=ht.children,be=Qe===void 0?[]:Qe;Je.has(yt)&&!ke(Ze)&&be.filter(function(we){return!ke(we.node)}).forEach(function(we){Je.add(we.key)})})}for(var lt=new Set,nt=he;nt>=0;nt-=1){var _e=Ce.get(nt)||new Set;_e.forEach(function(ht){var yt=ht.parent,Ze=ht.node;if(!(ke(Ze)||!ht.parent||lt.has(ht.parent.key))){if(ke(ht.parent.node)){lt.add(yt.key);return}var Qe=!0,be=!1;(yt.children||[]).filter(function(we){return!ke(we.node)}).forEach(function(we){var Ke=we.key,Ge=Je.has(Ke);Qe&&!Ge&&(Qe=!1),!be&&(Ge||Pe.has(Ke))&&(be=!0)}),Qe&&Je.add(yt.key),be&&Pe.add(yt.key),lt.add(yt.key)}})}return{checkedKeys:Array.from(Je),halfCheckedKeys:Array.from(xe(Pe,Je))}}function ge(Ee,Ce,he,ke,Je){for(var Pe=new Set(Ee),dt=new Set(Ce),ot=0;ot<=ke;ot+=1){var lt=he.get(ot)||new Set;lt.forEach(function(yt){var Ze=yt.key,Qe=yt.node,be=yt.children,we=be===void 0?[]:be;!Pe.has(Ze)&&!dt.has(Ze)&&!Je(Qe)&&we.filter(function(Ke){return!Je(Ke.node)}).forEach(function(Ke){Pe.delete(Ke.key)})})}dt=new Set;for(var nt=new Set,_e=ke;_e>=0;_e-=1){var ht=he.get(_e)||new Set;ht.forEach(function(yt){var Ze=yt.parent,Qe=yt.node;if(!(Je(Qe)||!yt.parent||nt.has(yt.parent.key))){if(Je(yt.parent.node)){nt.add(Ze.key);return}var be=!0,we=!1;(Ze.children||[]).filter(function(Ke){return!Je(Ke.node)}).forEach(function(Ke){var Ge=Ke.key,vt=Pe.has(Ge);be&&!vt&&(be=!1),!we&&(vt||dt.has(Ge))&&(we=!0)}),be||Pe.delete(Ze.key),we&&dt.add(Ze.key),nt.add(Ze.key)}})}return{checkedKeys:Array.from(Pe),halfCheckedKeys:Array.from(xe(dt,Pe))}}function Me(Ee,Ce,he,ke){var Je=[],Pe;ke?Pe=ke:Pe=Fe;var dt=new Set(Ee.filter(function(_e){var ht=!!he[_e];return ht||Je.push(_e),ht})),ot=new Map,lt=0;Object.keys(he).forEach(function(_e){var ht=he[_e],yt=ht.level,Ze=ot.get(yt);Ze||(Ze=new Set,ot.set(yt,Ze)),Ze.add(ht),lt=Math.max(lt,yt)}),(0,pe.ZP)(!Je.length,"Tree missing follow keys: ".concat(Je.slice(0,100).map(function(_e){return"'".concat(_e,"'")}).join(", ")));var nt;return Ce===!0?nt=ct(dt,ot,lt,Pe):nt=ge(dt,Ce.halfCheckedKeys,ot,lt,Pe),nt}},1089:function(Cn,Vt,oe){"use strict";oe.d(Vt,{F:function(){return ht},H8:function(){return _e},I8:function(){return nt},km:function(){return ke},oH:function(){return ot},w$:function(){return Je},zn:function(){return dt}});var pe=oe(71002),xe=oe(74902),Fe=oe(1413),ct=oe(45987),ge=oe(98423),Me=oe(50344),Ee=oe(80334),Ce=oe(10225),he=["children"];function ke(yt,Ze){return yt!=null?yt:Ze}function Je(yt){var Ze=yt||{},Qe=Ze.title,be=Ze._title,we=Ze.key,Ke=Ze.children,Ge=Qe||"title";return{title:Ge,_title:be||[Ge],key:we||"key",children:Ke||"children"}}function Pe(yt,Ze){var Qe=new Map;function be(we){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(we||[]).forEach(function(Ge){var vt=Ge[Ze.key],pt=Ge[Ze.children];warning(vt!=null,"Tree node must have a certain key: [".concat(Ke).concat(vt,"]"));var Ue=String(vt);warning(!Qe.has(Ue)||vt===null||vt===void 0,"Same 'key' exist in the Tree: ".concat(Ue)),Qe.set(Ue,!0),be(pt,"".concat(Ke).concat(Ue," > "))})}be(yt)}function dt(yt){function Ze(Qe){var be=(0,Me.Z)(Qe);return be.map(function(we){if(!(0,Ce.Ds)(we))return(0,Ee.ZP)(!we,"Tree/TreeNode can only accept TreeNode as children."),null;var Ke=we.key,Ge=we.props,vt=Ge.children,pt=(0,ct.Z)(Ge,he),Ue=(0,Fe.Z)({key:Ke},pt),et=Ze(vt);return et.length&&(Ue.children=et),Ue}).filter(function(we){return we})}return Ze(yt)}function ot(yt,Ze,Qe){var be=Je(Qe),we=be._title,Ke=be.key,Ge=be.children,vt=new Set(Ze===!0?[]:Ze),pt=[];function Ue(et){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return et.map(function(it,st){for(var We=(0,Ce.bt)(kt?kt.pos:"0",st),Tt=ke(it[Ke],We),Ut,Qt=0;Qt<we.length;Qt+=1){var Xe=we[Qt];if(it[Xe]!==void 0){Ut=it[Xe];break}}var Ae=(0,Fe.Z)((0,Fe.Z)({},(0,ge.Z)(it,[].concat((0,xe.Z)(we),[Ke,Ge]))),{},{title:Ut,key:Tt,parent:kt,pos:We,children:null,data:it,isStart:[].concat((0,xe.Z)(kt?kt.isStart:[]),[st===0]),isEnd:[].concat((0,xe.Z)(kt?kt.isEnd:[]),[st===et.length-1])});return pt.push(Ae),Ze===!0||vt.has(Tt)?Ae.children=Ue(it[Ge]||[],Ae):Ae.children=[],Ae})}return Ue(yt),pt}function lt(yt,Ze,Qe){var be={};(0,pe.Z)(Qe)==="object"?be=Qe:be={externalGetKey:Qe},be=be||{};var we=be,Ke=we.childrenPropName,Ge=we.externalGetKey,vt=we.fieldNames,pt=Je(vt),Ue=pt.key,et=pt.children,kt=Ke||et,it;Ge?typeof Ge=="string"?it=function(Tt){return Tt[Ge]}:typeof Ge=="function"&&(it=function(Tt){return Ge(Tt)}):it=function(Tt,Ut){return ke(Tt[Ue],Ut)};function st(We,Tt,Ut,Qt){var Xe=We?We[kt]:yt,Ae=We?(0,Ce.bt)(Ut.pos,Tt):"0",Lt=We?[].concat((0,xe.Z)(Qt),[We]):[];if(We){var cn=it(We,Ae),an={node:We,index:Tt,pos:Ae,key:cn,parentPos:Ut.node?Ut.pos:null,level:Ut.level+1,nodes:Lt};Ze(an)}Xe&&Xe.forEach(function(ft,mt){st(ft,mt,{node:We,pos:Ae,level:Ut?Ut.level+1:-1},Lt)})}st(null)}function nt(yt){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qe=Ze.initWrapper,be=Ze.processEntity,we=Ze.onProcessFinished,Ke=Ze.externalGetKey,Ge=Ze.childrenPropName,vt=Ze.fieldNames,pt=arguments.length>2?arguments[2]:void 0,Ue=Ke||pt,et={},kt={},it={posEntities:et,keyEntities:kt};return Qe&&(it=Qe(it)||it),lt(yt,function(st){var We=st.node,Tt=st.index,Ut=st.pos,Qt=st.key,Xe=st.parentPos,Ae=st.level,Lt=st.nodes,cn={node:We,nodes:Lt,index:Tt,key:Qt,pos:Ut,level:Ae},an=ke(Qt,Ut);et[Ut]=cn,kt[an]=cn,cn.parent=et[Xe],cn.parent&&(cn.parent.children=cn.parent.children||[],cn.parent.children.push(cn)),be&&be(cn,it)},{externalGetKey:Ue,childrenPropName:Ge,fieldNames:vt}),we&&we(it),it}function _e(yt,Ze){var Qe=Ze.expandedKeys,be=Ze.selectedKeys,we=Ze.loadedKeys,Ke=Ze.loadingKeys,Ge=Ze.checkedKeys,vt=Ze.halfCheckedKeys,pt=Ze.dragOverNodeKey,Ue=Ze.dropPosition,et=Ze.keyEntities,kt=et[yt],it={eventKey:yt,expanded:Qe.indexOf(yt)!==-1,selected:be.indexOf(yt)!==-1,loaded:we.indexOf(yt)!==-1,loading:Ke.indexOf(yt)!==-1,checked:Ge.indexOf(yt)!==-1,halfChecked:vt.indexOf(yt)!==-1,pos:String(kt?kt.pos:""),dragOver:pt===yt&&Ue===0,dragOverGapTop:pt===yt&&Ue===-1,dragOverGapBottom:pt===yt&&Ue===1};return it}function ht(yt){var Ze=yt.data,Qe=yt.expanded,be=yt.selected,we=yt.checked,Ke=yt.loaded,Ge=yt.loading,vt=yt.halfChecked,pt=yt.dragOver,Ue=yt.dragOverGapTop,et=yt.dragOverGapBottom,kt=yt.pos,it=yt.active,st=yt.eventKey,We=(0,Fe.Z)((0,Fe.Z)({},Ze),{},{expanded:Qe,selected:be,checked:we,loaded:Ke,loading:Ge,halfChecked:vt,dragOver:pt,dragOverGapTop:Ue,dragOverGapBottom:et,pos:kt,active:it,key:st});return"props"in We||Object.defineProperty(We,"props",{get:function(){return(0,Ee.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),yt}}),We}},66680:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return xe}});var pe=oe(67294);function xe(Fe){var ct=pe.useRef();ct.current=Fe;var ge=pe.useCallback(function(){for(var Me,Ee=arguments.length,Ce=new Array(Ee),he=0;he<Ee;he++)Ce[he]=arguments[he];return(Me=ct.current)===null||Me===void 0?void 0:Me.call.apply(Me,[ct].concat(Ce))},[]);return ge}},21770:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Me}});var pe=oe(97685),xe=oe(66680),Fe=oe(8410),ct=oe(63896);function ge(Ee){return Ee!==void 0}function Me(Ee,Ce){var he=Ce||{},ke=he.defaultValue,Je=he.value,Pe=he.onChange,dt=he.postState,ot=(0,ct.Z)(function(){return ge(Je)?Je:ge(ke)?typeof ke=="function"?ke():ke:typeof Ee=="function"?Ee():Ee}),lt=(0,pe.Z)(ot,2),nt=lt[0],_e=lt[1],ht=Je!==void 0?Je:nt,yt=dt?dt(ht):ht,Ze=(0,xe.Z)(Pe),Qe=(0,ct.Z)([ht]),be=(0,pe.Z)(Qe,2),we=be[0],Ke=be[1];(0,Fe.o)(function(){var vt=we[0];nt!==vt&&Ze(nt,vt)},[we]),(0,Fe.o)(function(){ge(Je)||_e(Je)},[Je]);var Ge=(0,xe.Z)(function(vt,pt){_e(vt,pt),Ke([ht],pt)});return[yt,Ge]}},91881:function(Cn,Vt,oe){"use strict";var pe=oe(71002),xe=oe(80334);function Fe(ct,ge){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ee=new Set;function Ce(he,ke){var Je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Pe=Ee.has(he);if((0,xe.ZP)(!Pe,"Warning: There may be circular references"),Pe)return!1;if(he===ke)return!0;if(Me&&Je>1)return!1;Ee.add(he);var dt=Je+1;if(Array.isArray(he)){if(!Array.isArray(ke)||he.length!==ke.length)return!1;for(var ot=0;ot<he.length;ot++)if(!Ce(he[ot],ke[ot],dt))return!1;return!0}if(he&&ke&&(0,pe.Z)(he)==="object"&&(0,pe.Z)(ke)==="object"){var lt=Object.keys(he);return lt.length!==Object.keys(ke).length?!1:lt.every(function(nt){return Ce(he[nt],ke[nt],dt)})}return!1}return Ce(ct,ge)}Vt.Z=Fe},98423:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return xe}});var pe=oe(1413);function xe(Fe,ct){var ge=(0,pe.Z)({},Fe);return Array.isArray(ct)&&ct.forEach(function(Me){delete ge[Me]}),ge}},64217:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ce}});var pe=oe(1413),xe=`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`,Fe=`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`,ct="".concat(xe," ").concat(Fe).split(/[\s\n]+/),ge="aria-",Me="data-";function Ee(he,ke){return he.indexOf(ke)===0}function Ce(he){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Je;ke===!1?Je={aria:!0,data:!0,attr:!0}:ke===!0?Je={aria:!0}:Je=(0,pe.Z)({},ke);var Pe={};return Object.keys(he).forEach(function(dt){(Je.aria&&(dt==="role"||Ee(dt,ge))||Je.data&&Ee(dt,Me)||Je.attr&&ct.includes(dt))&&(Pe[dt]=he[dt])}),Pe}},73299:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Pa}});var pe=oe(87462),xe=oe(1413),Fe=oe(71002),ct=oe(97685),ge=oe(4942),Me=oe(45987),Ee=oe(67294),Ce=oe(73935),he=oe(94184),ke=oe.n(he),Je=oe(48555),Pe=Ee.forwardRef(function(Bt,On){var Fn=Bt.height,$n=Bt.offsetY,Ir=Bt.offsetX,or=Bt.children,Sr=Bt.prefixCls,Zn=Bt.onInnerResize,ut=Bt.innerProps,bt=Bt.rtl,Ft=Bt.extra,qt={},qe={display:"flex",flexDirection:"column"};if($n!==void 0){var _t;qt={height:Fn,position:"relative",overflow:"hidden"},qe=(0,xe.Z)((0,xe.Z)({},qe),{},(_t={transform:"translateY(".concat($n,"px)")},(0,ge.Z)(_t,bt?"marginRight":"marginLeft",-Ir),(0,ge.Z)(_t,"position","absolute"),(0,ge.Z)(_t,"left",0),(0,ge.Z)(_t,"right",0),(0,ge.Z)(_t,"top",0),_t))}return Ee.createElement("div",{style:qt},Ee.createElement(Je.Z,{onResize:function(Kt){var on=Kt.offsetHeight;on&&Zn&&Zn()}},Ee.createElement("div",(0,pe.Z)({style:qe,className:ke()((0,ge.Z)({},"".concat(Sr,"-holder-inner"),Sr)),ref:On},ut),or,Ft)))});Pe.displayName="Filler";var dt=Pe,ot=function(On){return+setTimeout(On,16)},lt=function(On){return clearTimeout(On)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ot=function(On){return window.requestAnimationFrame(On)},lt=function(On){return window.cancelAnimationFrame(On)});var nt=0,_e=new Map;function ht(Bt){_e.delete(Bt)}var yt=function(On){var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;nt+=1;var $n=nt;function Ir(or){if(or===0)ht($n),On();else{var Sr=ot(function(){Ir(or-1)});_e.set($n,Sr)}}return Ir(Fn),$n};yt.cancel=function(Bt){var On=_e.get(Bt);return ht(On),lt(On)};var Ze=yt;function Qe(Bt,On){var Fn="touches"in Bt?Bt.touches[0]:Bt;return Fn[On?"pageX":"pageY"]}var be=Ee.forwardRef(function(Bt,On){var Fn,$n=Bt.prefixCls,Ir=Bt.rtl,or=Bt.scrollOffset,Sr=Bt.scrollRange,Zn=Bt.onStartMove,ut=Bt.onStopMove,bt=Bt.onScroll,Ft=Bt.horizontal,qt=Bt.spinSize,qe=Bt.containerSize,_t=Bt.style,Xt=Bt.thumbStyle,Kt=Ee.useState(!1),on=(0,ct.Z)(Kt,2),rn=on[0],Un=on[1],Ar=Ee.useState(null),rr=(0,ct.Z)(Ar,2),ir=rr[0],mr=rr[1],br=Ee.useState(null),Yr=(0,ct.Z)(br,2),_n=Yr[0],Qn=Yr[1],na=!Ir,ca=Ee.useRef(),_i=Ee.useRef(),ii=Ee.useState(!1),va=(0,ct.Z)(ii,2),_r=va[0],Qi=va[1],Tn=Ee.useRef(),Ua=function(){clearTimeout(Tn.current),Qi(!0),Tn.current=setTimeout(function(){Qi(!1)},3e3)},xa=Sr-qe||0,uo=qe-qt||0,ja=xa>0,ka=Ee.useMemo(function(){if(or===0||xa===0)return 0;var To=or/xa;return To*uo},[or,xa,uo]),co=function(fo){fo.stopPropagation(),fo.preventDefault()},za=Ee.useRef({top:ka,dragging:rn,pageY:ir,startTop:_n});za.current={top:ka,dragging:rn,pageY:ir,startTop:_n};var fa=function(fo){Un(!0),mr(Qe(fo,Ft)),Qn(za.current.top),Zn(),fo.stopPropagation(),fo.preventDefault()};Ee.useEffect(function(){var To=function(Mt){Mt.preventDefault()},fo=ca.current,Vi=_i.current;return fo.addEventListener("touchstart",To),Vi.addEventListener("touchstart",fa),function(){fo.removeEventListener("touchstart",To),Vi.removeEventListener("touchstart",fa)}},[]);var Ya=Ee.useRef();Ya.current=xa;var _o=Ee.useRef();_o.current=uo,Ee.useEffect(function(){if(rn){var To,fo=function(Mt){var tn=za.current,Sn=tn.dragging,Kn=tn.pageY,Zr=tn.startTop;if(Ze.cancel(To),Sn){var Nr=Qe(Mt,Ft)-Kn,qr=Zr;!na&&Ft?qr-=Nr:qr+=Nr;var li=Ya.current,Jr=_o.current,Ki=Jr?qr/Jr:0,ea=Math.ceil(Ki*li);ea=Math.max(ea,0),ea=Math.min(ea,li),To=Ze(function(){bt(ea,Ft)})}},Vi=function(){Un(!1),ut()};return window.addEventListener("mousemove",fo),window.addEventListener("touchmove",fo),window.addEventListener("mouseup",Vi),window.addEventListener("touchend",Vi),function(){window.removeEventListener("mousemove",fo),window.removeEventListener("touchmove",fo),window.removeEventListener("mouseup",Vi),window.removeEventListener("touchend",Vi),Ze.cancel(To)}}},[rn]),Ee.useEffect(function(){Ua()},[or]),Ee.useImperativeHandle(On,function(){return{delayHidden:Ua}});var qa="".concat($n,"-scrollbar"),Oa={position:"absolute",visibility:_r&&ja?null:"hidden"},So={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ft?(Oa.height=8,Oa.left=0,Oa.right=0,Oa.bottom=0,So.height="100%",So.width=qt,na?So.left=ka:So.right=ka):(Oa.width=8,Oa.top=0,Oa.bottom=0,na?Oa.right=0:Oa.left=0,So.width="100%",So.height=qt,So.top=ka),Ee.createElement("div",{ref:ca,className:ke()(qa,(Fn={},(0,ge.Z)(Fn,"".concat(qa,"-horizontal"),Ft),(0,ge.Z)(Fn,"".concat(qa,"-vertical"),!Ft),(0,ge.Z)(Fn,"".concat(qa,"-visible"),_r),Fn)),style:(0,xe.Z)((0,xe.Z)({},Oa),_t),onMouseDown:co,onMouseMove:Ua},Ee.createElement("div",{ref:_i,className:ke()("".concat(qa,"-thumb"),(0,ge.Z)({},"".concat(qa,"-thumb-moving"),rn)),style:(0,xe.Z)((0,xe.Z)({},So),Xt),onMouseDown:fa}))}),we=be;function Ke(Bt){var On=Bt.children,Fn=Bt.setRef,$n=Ee.useCallback(function(Ir){Fn(Ir)},[]);return Ee.cloneElement(On,{ref:$n})}function Ge(Bt,On,Fn,$n,Ir,or,Sr){var Zn=Sr.getKey;return Bt.slice(On,Fn+1).map(function(ut,bt){var Ft=On+bt,qt=or(ut,Ft,{style:{width:$n}}),qe=Zn(ut);return Ee.createElement(Ke,{key:qe,setRef:function(Xt){return Ir(ut,Xt)}},qt)})}function vt(Bt){return Bt instanceof HTMLElement||Bt instanceof SVGElement}function pt(Bt){return vt(Bt)?Bt:Bt instanceof Ee.Component?Ce.findDOMNode(Bt):null}var Ue=oe(15671),et=oe(43144),kt=function(){function Bt(){(0,Ue.Z)(this,Bt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,et.Z)(Bt,[{key:"set",value:function(Fn,$n){this.maps[Fn]=$n,this.id+=1}},{key:"get",value:function(Fn){return this.maps[Fn]}}]),Bt}(),it=kt;function st(Bt,On,Fn){var $n=Ee.useState(0),Ir=(0,ct.Z)($n,2),or=Ir[0],Sr=Ir[1],Zn=(0,Ee.useRef)(new Map),ut=(0,Ee.useRef)(new it),bt=(0,Ee.useRef)();function Ft(){Ze.cancel(bt.current)}function qt(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ft();var Xt=function(){Zn.current.forEach(function(on,rn){if(on&&on.offsetParent){var Un=pt(on),Ar=Un.offsetHeight;ut.current.get(rn)!==Ar&&ut.current.set(rn,Un.offsetHeight)}}),Sr(function(on){return on+1})};_t?Xt():bt.current=Ze(Xt)}function qe(_t,Xt){var Kt=Bt(_t),on=Zn.current.get(Kt);Xt?(Zn.current.set(Kt,Xt),qt()):Zn.current.delete(Kt),!on!=!Xt&&(Xt?On==null||On(_t):Fn==null||Fn(_t))}return(0,Ee.useEffect)(function(){return Ft},[]),[qe,qt,ut.current,or]}function We(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Tt=We()?Ee.useLayoutEffect:Ee.useEffect,Ut=function(On,Fn){var $n=Ee.useRef(!0);Tt(function(){return On($n.current)},Fn),Tt(function(){return $n.current=!1,function(){$n.current=!0}},[])},Qt=function(On,Fn){Ut(function($n){if(!$n)return On()},Fn)},Xe=Ut;function Ae(Bt){var On=Ee.useRef();On.current=Bt;var Fn=Ee.useCallback(function(){for(var $n,Ir=arguments.length,or=new Array(Ir),Sr=0;Sr<Ir;Sr++)or[Sr]=arguments[Sr];return($n=On.current)===null||$n===void 0?void 0:$n.call.apply($n,[On].concat(or))},[]);return Fn}function Lt(Bt){var On=React.useRef(!1),Fn=React.useState(Bt),$n=_slicedToArray(Fn,2),Ir=$n[0],or=$n[1];React.useEffect(function(){return On.current=!1,function(){On.current=!0}},[]);function Sr(Zn,ut){ut&&On.current||or(Zn)}return[Ir,Sr]}function cn(Bt){return Bt!==void 0}function an(Bt,On){var Fn=On||{},$n=Fn.defaultValue,Ir=Fn.value,or=Fn.onChange,Sr=Fn.postState,Zn=useState(function(){return cn(Ir)?Ir:cn($n)?typeof $n=="function"?$n():$n:typeof Bt=="function"?Bt():Bt}),ut=_slicedToArray(Zn,2),bt=ut[0],Ft=ut[1],qt=Ir!==void 0?Ir:bt,qe=Sr?Sr(qt):qt,_t=useEvent(or),Xt=useState([qt]),Kt=_slicedToArray(Xt,2),on=Kt[0],rn=Kt[1];useLayoutUpdateEffect(function(){var Ar=on[0];bt!==Ar&&_t(bt,Ar)},[on]),useLayoutUpdateEffect(function(){cn(Ir)||Ft(Ir)},[Ir]);var Un=useEvent(function(Ar,rr){Ft(Ar,rr),rn([qt],rr)});return[qe,Un]}var ft=oe(31461);function mt(Bt,On,Fn){var $n=React.useRef({});return(!("value"in $n.current)||Fn($n.current.condition,On))&&($n.current.value=Bt(),$n.current.condition=On),$n.current.value}function Yt(Bt,On){typeof Bt=="function"?Bt(On):_typeof(Bt)==="object"&&Bt&&"current"in Bt&&(Bt.current=On)}function An(){for(var Bt=arguments.length,On=new Array(Bt),Fn=0;Fn<Bt;Fn++)On[Fn]=arguments[Fn];var $n=On.filter(function(Ir){return Ir});return $n.length<=1?$n[0]:function(Ir){On.forEach(function(or){Yt(or,Ir)})}}function dn(){for(var Bt=arguments.length,On=new Array(Bt),Fn=0;Fn<Bt;Fn++)On[Fn]=arguments[Fn];return useMemo(function(){return An.apply(void 0,On)},On,function($n,Ir){return $n.length!==Ir.length||$n.every(function(or,Sr){return or!==Ir[Sr]})})}function nn(Bt){var On,Fn,$n=isMemo(Bt)?Bt.type.type:Bt.type;return!(typeof $n=="function"&&!((On=$n.prototype)!==null&&On!==void 0&&On.render)||typeof Bt=="function"&&!((Fn=Bt.prototype)!==null&&Fn!==void 0&&Fn.render))}function jt(Bt){return!isValidElement(Bt)||isFragment(Bt)?!1:nn(Bt)}function xn(Bt,On,Fn,$n){if(!On.length)return Fn;var Ir=_toArray(On),or=Ir[0],Sr=Ir.slice(1),Zn;return!Bt&&typeof or=="number"?Zn=[]:Array.isArray(Bt)?Zn=_toConsumableArray(Bt):Zn=_objectSpread({},Bt),$n&&Fn===void 0&&Sr.length===1?delete Zn[or][Sr[0]]:Zn[or]=xn(Zn[or],Sr,Fn,$n),Zn}function vn(Bt,On,Fn){var $n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return On.length&&$n&&Fn===void 0&&!get(Bt,On.slice(0,-1))?Bt:xn(Bt,On,Fn,$n)}function Te(Bt){return _typeof(Bt)==="object"&&Bt!==null&&Object.getPrototypeOf(Bt)===Object.prototype}function ue(Bt){return Array.isArray(Bt)?[]:{}}var le=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function me(){for(var Bt=arguments.length,On=new Array(Bt),Fn=0;Fn<Bt;Fn++)On[Fn]=arguments[Fn];var $n=ue(On[0]);return On.forEach(function(Ir){function or(Sr,Zn){var ut=new Set(Zn),bt=get(Ir,Sr),Ft=Array.isArray(bt);if(Ft||Te(bt)){if(!ut.has(bt)){ut.add(bt);var qt=get($n,Sr);Ft?$n=vn($n,Sr,[]):(!qt||_typeof(qt)!=="object")&&($n=vn($n,Sr,ue(bt))),le(bt).forEach(function(qe){or([].concat(_toConsumableArray(Sr),[qe]),ut)})}}else $n=vn($n,Sr,bt)}or([])}),$n}var fe={},se=[],Oe=function(On){se.push(On)};function rt(Bt,On){if(0)var Fn}function Pt(Bt,On){if(0)var Fn}function zt(){fe={}}function Zt(Bt,On,Fn){!On&&!fe[Fn]&&(Bt(!1,Fn),fe[Fn]=!0)}function en(Bt,On){Zt(rt,Bt,On)}function Gt(Bt,On){Zt(Pt,Bt,On)}en.preMessage=Oe,en.resetWarned=zt,en.noteOnce=Gt;var tr=null,cr=10;function Wt(Bt,On,Fn,$n,Ir,or,Sr,Zn){var ut=Ee.useRef(),bt=Ee.useState(null),Ft=(0,ct.Z)(bt,2),qt=Ft[0],qe=Ft[1];return Xe(function(){if(qt&&qt.times<cr){if(!Bt.current){qe(function(Ua){return(0,xe.Z)({},Ua)});return}or();var _t=qt.targetAlign,Xt=qt.originAlign,Kt=qt.index,on=qt.offset,rn=Bt.current.clientHeight,Un=!1,Ar=_t,rr=null;if(rn){for(var ir=_t||Xt,mr=0,br=0,Yr=0,_n=Math.min(On.length-1,Kt),Qn=0;Qn<=_n;Qn+=1){var na=Ir(On[Qn]);br=mr;var ca=Fn.get(na);Yr=br+(ca===void 0?$n:ca),mr=Yr}for(var _i=ir==="top"?on:rn-on,ii=_n;ii>=0;ii-=1){var va=Ir(On[ii]),_r=Fn.get(va);if(_r===void 0){Un=!0;break}if(_i-=_r,_i<=0)break}switch(ir){case"top":rr=br-on;break;case"bottom":rr=Yr-rn+on;break;default:{var Qi=Bt.current.scrollTop,Tn=Qi+rn;br<Qi?Ar="top":Yr>Tn&&(Ar="bottom")}}rr!==null&&Sr(rr),rr!==qt.lastTop&&(Un=!0)}Un&&qe(function(Ua){return(0,xe.Z)((0,xe.Z)({},Ua),{},{times:Ua.times+1,targetAlign:Ar,lastTop:rr})})}},[qt,Bt.current]),function(_t){if(_t==null){Zn();return}if(Ze.cancel(ut.current),typeof _t=="number")Sr(_t);else if(_t&&(0,Fe.Z)(_t)==="object"){var Xt,Kt=_t.align;"index"in _t?Xt=_t.index:Xt=On.findIndex(function(Un){return Ir(Un)===_t.key});var on=_t.offset,rn=on===void 0?0:on;qe({times:0,index:Xt,offset:rn,originAlign:Kt})}}}function bn(Bt,On,Fn,$n){var Ir=Fn-Bt,or=On-Fn,Sr=Math.min(Ir,or)*2;if($n<=Sr){var Zn=Math.floor($n/2);return $n%2?Fn+Zn+1:Fn-Zn}return Ir>or?Fn-($n-or):Fn+($n-Ir)}function lr(Bt,On,Fn){var $n=Bt.length,Ir=On.length,or,Sr;if($n===0&&Ir===0)return null;$n<Ir?(or=Bt,Sr=On):(or=On,Sr=Bt);var Zn={__EMPTY_ITEM__:!0};function ut(Xt){return Xt!==void 0?Fn(Xt):Zn}for(var bt=null,Ft=Math.abs($n-Ir)!==1,qt=0;qt<Sr.length;qt+=1){var qe=ut(or[qt]),_t=ut(Sr[qt]);if(qe!==_t){bt=qt,Ft=Ft||qe!==ut(Sr[qt+1]);break}}return bt===null?null:{index:bt,multiple:Ft}}function Wr(Bt,On,Fn){var $n=Ee.useState(Bt),Ir=(0,ct.Z)($n,2),or=Ir[0],Sr=Ir[1],Zn=Ee.useState(null),ut=(0,ct.Z)(Zn,2),bt=ut[0],Ft=ut[1];return Ee.useEffect(function(){var qt=lr(or||[],Bt||[],On);(qt==null?void 0:qt.index)!==void 0&&(Fn==null||Fn(qt.index),Ft(Bt[qt.index])),Sr(Bt)},[Bt]),[bt]}var Rn=(typeof navigator=="undefined"?"undefined":(0,Fe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Tr=Rn,Ca=function(Bt,On){var Fn=(0,Ee.useRef)(!1),$n=(0,Ee.useRef)(null);function Ir(){clearTimeout($n.current),Fn.current=!0,$n.current=setTimeout(function(){Fn.current=!1},50)}var or=(0,Ee.useRef)({top:Bt,bottom:On});return or.current.top=Bt,or.current.bottom=On,function(Sr){var Zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=Sr<0&&or.current.top||Sr>0&&or.current.bottom;return Zn&&ut?(clearTimeout($n.current),Fn.current=!1):(!ut||Fn.current)&&Ir(),!Fn.current&&ut}};function Wi(Bt,On,Fn,$n,Ir){var or=(0,Ee.useRef)(0),Sr=(0,Ee.useRef)(null),Zn=(0,Ee.useRef)(null),ut=(0,Ee.useRef)(!1),bt=Ca(On,Fn);function Ft(on,rn){Ze.cancel(Sr.current),or.current+=rn,Zn.current=rn,!bt(rn)&&(Tr||on.preventDefault(),Sr.current=Ze(function(){var Un=ut.current?10:1;Ir(or.current*Un),or.current=0}))}function qt(on,rn){Ir(rn,!0),Tr||on.preventDefault()}var qe=(0,Ee.useRef)(null),_t=(0,Ee.useRef)(null);function Xt(on){if(Bt){Ze.cancel(_t.current),_t.current=Ze(function(){qe.current=null},2);var rn=on.deltaX,Un=on.deltaY,Ar=on.shiftKey,rr=rn,ir=Un;(qe.current==="sx"||!qe.current&&Ar&&Un&&!rn)&&(rr=Un,ir=0,qe.current="sx");var mr=Math.abs(rr),br=Math.abs(ir);qe.current===null&&(qe.current=$n&&mr>br?"x":"y"),qe.current==="y"?Ft(on,ir):qt(on,rr)}}function Kt(on){Bt&&(ut.current=on.detail===Zn.current)}return[Xt,Kt]}var Li=14/15;function Mi(Bt,On,Fn){var $n=(0,Ee.useRef)(!1),Ir=(0,Ee.useRef)(0),or=(0,Ee.useRef)(null),Sr=(0,Ee.useRef)(null),Zn,ut=function(qe){if($n.current){var _t=Math.ceil(qe.touches[0].pageY),Xt=Ir.current-_t;Ir.current=_t,Fn(Xt)&&qe.preventDefault(),clearInterval(Sr.current),Sr.current=setInterval(function(){Xt*=Li,(!Fn(Xt,!0)||Math.abs(Xt)<=.1)&&clearInterval(Sr.current)},16)}},bt=function(){$n.current=!1,Zn()},Ft=function(qe){Zn(),qe.touches.length===1&&!$n.current&&($n.current=!0,Ir.current=Math.ceil(qe.touches[0].pageY),or.current=qe.target,or.current.addEventListener("touchmove",ut),or.current.addEventListener("touchend",bt))};Zn=function(){or.current&&(or.current.removeEventListener("touchmove",ut),or.current.removeEventListener("touchend",bt))},Xe(function(){return Bt&&On.current.addEventListener("touchstart",Ft),function(){var qt;(qt=On.current)===null||qt===void 0||qt.removeEventListener("touchstart",Ft),Zn(),clearInterval(Sr.current)}},[Bt])}var Ji=20;function Zi(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Fn=Bt/On*100;return isNaN(Fn)&&(Fn=0),Fn=Math.max(Fn,Ji),Fn=Math.min(Fn,Bt/2),Math.floor(Fn)}function Ea(Bt,On,Fn,$n){var Ir=Ee.useMemo(function(){return[new Map,[]]},[Bt,Fn.id,$n]),or=(0,ct.Z)(Ir,2),Sr=or[0],Zn=or[1],ut=function(Ft){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ft,qe=Sr.get(Ft),_t=Sr.get(qt);if(qe===void 0||_t===void 0)for(var Xt=Bt.length,Kt=Zn.length;Kt<Xt;Kt+=1){var on,rn=Bt[Kt],Un=On(rn);Sr.set(Un,Kt);var Ar=(on=Fn.get(Un))!==null&&on!==void 0?on:$n;if(Zn[Kt]=(Zn[Kt-1]||0)+Ar,Un===Ft&&(qe=Kt),Un===qt&&(_t=Kt),qe!==void 0&&_t!==void 0)break}return{top:Zn[qe-1]||0,bottom:Zn[_t]}};return ut}var Ma=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Gr=[],Va={overflowY:"auto",overflowAnchor:"none"};function no(Bt,On){var Fn=Bt.prefixCls,$n=Fn===void 0?"rc-virtual-list":Fn,Ir=Bt.className,or=Bt.height,Sr=Bt.itemHeight,Zn=Bt.fullHeight,ut=Zn===void 0?!0:Zn,bt=Bt.style,Ft=Bt.data,qt=Bt.children,qe=Bt.itemKey,_t=Bt.virtual,Xt=Bt.direction,Kt=Bt.scrollWidth,on=Bt.component,rn=on===void 0?"div":on,Un=Bt.onScroll,Ar=Bt.onVirtualScroll,rr=Bt.onVisibleChange,ir=Bt.innerProps,mr=Bt.extraRender,br=Bt.styles,Yr=(0,Me.Z)(Bt,Ma),_n=!!(_t!==!1&&or&&Sr),Qn=_n&&Ft&&(Sr*Ft.length>or||!!Kt),na=Xt==="rtl",ca=ke()($n,(0,ge.Z)({},"".concat($n,"-rtl"),na),Ir),_i=Ft||Gr,ii=(0,Ee.useRef)(),va=(0,Ee.useRef)(),_r=(0,Ee.useState)(0),Qi=(0,ct.Z)(_r,2),Tn=Qi[0],Ua=Qi[1],xa=(0,Ee.useState)(0),uo=(0,ct.Z)(xa,2),ja=uo[0],ka=uo[1],co=(0,Ee.useState)(!1),za=(0,ct.Z)(co,2),fa=za[0],Ya=za[1],_o=function(){Ya(!0)},qa=function(){Ya(!1)},Oa=Ee.useCallback(function(pn){return typeof qe=="function"?qe(pn):pn==null?void 0:pn[qe]},[qe]),So={getKey:Oa};function To(pn){Ua(function(Nn){var Wn;typeof pn=="function"?Wn=pn(Nn):Wn=pn;var vr=Yn(Wn);return ii.current.scrollTop=vr,vr})}var fo=(0,Ee.useRef)({start:0,end:_i.length}),Vi=(0,Ee.useRef)(),At=Wr(_i,Oa),Mt=(0,ct.Z)(At,1),tn=Mt[0];Vi.current=tn;var Sn=st(Oa,null,null),Kn=(0,ct.Z)(Sn,4),Zr=Kn[0],Nr=Kn[1],qr=Kn[2],li=Kn[3],Jr=Ee.useMemo(function(){if(!_n)return{scrollHeight:void 0,start:0,end:_i.length-1,offset:void 0};if(!Qn){var pn;return{scrollHeight:((pn=va.current)===null||pn===void 0?void 0:pn.offsetHeight)||0,start:0,end:_i.length-1,offset:void 0}}for(var Nn=0,Wn,vr,Hn,Er=_i.length,Qr=0;Qr<Er;Qr+=1){var Rr=_i[Qr],jr=Oa(Rr),Cr=qr.get(jr),Fr=Nn+(Cr===void 0?Sr:Cr);Fr>=Tn&&Wn===void 0&&(Wn=Qr,vr=Nn),Fr>Tn+or&&Hn===void 0&&(Hn=Qr),Nn=Fr}return Wn===void 0&&(Wn=0,vr=0,Hn=Math.ceil(or/Sr)),Hn===void 0&&(Hn=_i.length-1),Hn=Math.min(Hn+1,_i.length-1),{scrollHeight:Nn,start:Wn,end:Hn,offset:vr}},[Qn,_n,Tn,_i,li,or]),Ki=Jr.scrollHeight,ea=Jr.start,ha=Jr.end,Za=Jr.offset;fo.current.start=ea,fo.current.end=ha;var Na=Ee.useState({width:0,height:or}),Ra=(0,ct.Z)(Na,2),Be=Ra[0],Ve=Ra[1],He=function(Nn){Ve({width:Nn.width||Nn.offsetWidth,height:Nn.height||Nn.offsetHeight})},tt=(0,Ee.useRef)(),gt=(0,Ee.useRef)(),Ct=Ee.useMemo(function(){return Zi(Be.width,Kt)},[Be.width,Kt]),It=Ee.useMemo(function(){return Zi(Be.height,Ki)},[Be.height,Ki]),ln=Ki-or,mn=(0,Ee.useRef)(ln);mn.current=ln;function Yn(pn){var Nn=pn;return Number.isNaN(mn.current)||(Nn=Math.min(Nn,mn.current)),Nn=Math.max(Nn,0),Nn}var yr=Tn<=0,Vn=Tn>=ln,En=Ca(yr,Vn),wn=function(){return{x:na?-ja:ja,y:Tn}},In=(0,Ee.useRef)(wn()),Bn=Ae(function(){if(Ar){var pn=wn();(In.current.x!==pn.x||In.current.y!==pn.y)&&(Ar(pn),In.current=pn)}});function pr(pn,Nn){var Wn=pn;Nn?((0,Ce.flushSync)(function(){ka(Wn)}),Bn()):To(Wn)}function Xn(pn){var Nn=pn.currentTarget.scrollTop;Nn!==Tn&&To(Nn),Un==null||Un(pn),Bn()}var jn=function(Nn){var Wn=Nn,vr=Kt-Be.width;return Wn=Math.max(Wn,0),Wn=Math.min(Wn,vr),Wn},nr=Ae(function(pn,Nn){Nn?((0,Ce.flushSync)(function(){ka(function(Wn){var vr=Wn+(na?-pn:pn);return jn(vr)})}),Bn()):To(function(Wn){var vr=Wn+pn;return vr})}),qn=Wi(_n,yr,Vn,!!Kt,nr),dr=(0,ct.Z)(qn,2),je=dr[0],Ye=dr[1];Mi(_n,ii,function(pn,Nn){return En(pn,Nn)?!1:(je({preventDefault:function(){},deltaY:pn}),!0)}),Xe(function(){function pn(Wn){_n&&Wn.preventDefault()}var Nn=ii.current;return Nn.addEventListener("wheel",je),Nn.addEventListener("DOMMouseScroll",Ye),Nn.addEventListener("MozMousePixelScroll",pn),function(){Nn.removeEventListener("wheel",je),Nn.removeEventListener("DOMMouseScroll",Ye),Nn.removeEventListener("MozMousePixelScroll",pn)}},[_n]),Xe(function(){Kt&&ka(function(pn){return jn(pn)})},[Be.width,Kt]);var $t=function(){var Nn,Wn;(Nn=tt.current)===null||Nn===void 0||Nn.delayHidden(),(Wn=gt.current)===null||Wn===void 0||Wn.delayHidden()},Dt=Wt(ii,_i,qr,Sr,Oa,function(){return Nr(!0)},To,$t);Ee.useImperativeHandle(On,function(){return{getScrollInfo:wn,scrollTo:function(Nn){function Wn(vr){return vr&&(0,Fe.Z)(vr)==="object"&&("left"in vr||"top"in vr)}Wn(Nn)?(Nn.left!==void 0&&ka(jn(Nn.left)),Dt(Nn.top)):Dt(Nn)}}}),Xe(function(){if(rr){var pn=_i.slice(ea,ha+1);rr(pn,_i)}},[ea,ha,_i]);var sn=Ea(_i,Oa,qr,Sr),kn=mr==null?void 0:mr({start:ea,end:ha,virtual:Qn,offsetX:ja,offsetY:Za,rtl:na,getSize:sn}),yn=Ge(_i,ea,ha,Kt,Zr,qt,So),zn=null;or&&(zn=(0,xe.Z)((0,ge.Z)({},ut?"height":"maxHeight",or),Va),_n&&(zn.overflowY="hidden",Kt&&(zn.overflowX="hidden"),fa&&(zn.pointerEvents="none")));var Pn={};return na&&(Pn.dir="rtl"),Ee.createElement("div",(0,pe.Z)({style:(0,xe.Z)((0,xe.Z)({},bt),{},{position:"relative"}),className:ca},Pn,Yr),Ee.createElement(Je.Z,{onResize:He},Ee.createElement(rn,{className:"".concat($n,"-holder"),style:zn,ref:ii,onScroll:Xn,onMouseEnter:$t},Ee.createElement(dt,{prefixCls:$n,height:Ki,offsetX:ja,offsetY:Za,scrollWidth:Kt,onInnerResize:Nr,ref:va,innerProps:ir,rtl:na,extra:kn},yn))),Qn&&Ki>or&&Ee.createElement(we,{ref:tt,prefixCls:$n,scrollOffset:Tn,scrollRange:Ki,rtl:na,onScroll:pr,onStartMove:_o,onStopMove:qa,spinSize:It,containerSize:Be.height,style:br==null?void 0:br.verticalScrollBar,thumbStyle:br==null?void 0:br.verticalScrollBarThumb}),Qn&&Kt&&Ee.createElement(we,{ref:gt,prefixCls:$n,scrollOffset:ja,scrollRange:Kt,rtl:na,onScroll:pr,onStartMove:_o,onStopMove:qa,spinSize:Ct,containerSize:Be.width,horizontal:!0,style:br==null?void 0:br.horizontalScrollBar,thumbStyle:br==null?void 0:br.horizontalScrollBarThumb}))}var po=Ee.forwardRef(no);po.displayName="List";var mo=po,Pa=mo},66392:function(Cn,Vt){"use strict";var oe;var pe=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),ct=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),Ce=Symbol.for("react.server_context"),he=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Pe=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),ot=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function nt(_e){if(typeof _e=="object"&&_e!==null){var ht=_e.$$typeof;switch(ht){case pe:switch(_e=_e.type,_e){case Fe:case ge:case ct:case ke:case Je:return _e;default:switch(_e=_e&&_e.$$typeof,_e){case Ce:case Ee:case he:case dt:case Pe:case Me:return _e;default:return ht}}case xe:return ht}}}oe=Ee,oe=Me,oe=pe,oe=he,oe=Fe,oe=dt,oe=Pe,oe=xe,oe=ge,oe=ct,oe=ke,oe=Je,oe=function(){return!1},oe=function(){return!1},oe=function(_e){return nt(_e)===Ee},oe=function(_e){return nt(_e)===Me},oe=function(_e){return typeof _e=="object"&&_e!==null&&_e.$$typeof===pe},oe=function(_e){return nt(_e)===he},oe=function(_e){return nt(_e)===Fe},oe=function(_e){return nt(_e)===dt},oe=function(_e){return nt(_e)===Pe},oe=function(_e){return nt(_e)===xe},oe=function(_e){return nt(_e)===ge},oe=function(_e){return nt(_e)===ct},oe=function(_e){return nt(_e)===ke},oe=function(_e){return nt(_e)===Je},oe=function(_e){return typeof _e=="string"||typeof _e=="function"||_e===Fe||_e===ge||_e===ct||_e===ke||_e===Je||_e===ot||typeof _e=="object"&&_e!==null&&(_e.$$typeof===dt||_e.$$typeof===Pe||_e.$$typeof===Me||_e.$$typeof===Ee||_e.$$typeof===he||_e.$$typeof===lt||_e.getModuleId!==void 0)},oe=nt},31461:function(Cn,Vt,oe){"use strict";oe(66392)},84279:function(Cn,Vt,oe){"use strict";var pe=Object.defineProperty,xe=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ee=(a,b,y)=>b in a?pe(a,b,{enumerable:!0,configurable:!0,writable:!0,value:y}):a[b]=y,Ce=(a,b)=>{for(var y in b||(b={}))ge.call(b,y)&&Ee(a,y,b[y]);if(ct)for(var y of ct(b))Me.call(b,y)&&Ee(a,y,b[y]);return a},he=(a,b)=>xe(a,Fe(b)),ke=a=>typeof a=="symbol"?a:a+"",Je=(a,b)=>{var y={};for(var E in a)ge.call(a,E)&&b.indexOf(E)<0&&(y[E]=a[E]);if(a!=null&&ct)for(var E of ct(a))b.indexOf(E)<0&&Me.call(a,E)&&(y[E]=a[E]);return y};function Pe(a){return Array.isArray(a)}var dt={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 ot(){return"window"in globalThis&&"document"in globalThis}function lt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function nt(){return typeof navigator.vibrate=="function"}function _e(){var a,b;if(!ot())return"other";const y=(b=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?b:navigator.platform;return/^mac/i.test(y)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(y)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function ht(){if(!ot())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 yt(){return HTMLElement.prototype.hasOwnProperty("popover")}var Ze={strings:dt,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Ze._locale||(Ze._locale=ot()?navigator.language.slice(0,5):"en-US"),Ze._locale},set locale(a){Ze._locale=a,Ze._numberFormatter=void 0,Ze.dirty=!0},get numberFormatter(){return Ze._numberFormatter||(Ze._numberFormatter=new Intl.NumberFormat(Ze.locale)),Ze._numberFormatter},merge(a,b){if(typeof a=="string"&&b)Ze.strings[a]=Ce(Ce({},Ze.strings[a]),b),Ze.dirty=!0;else for(const y of Object.keys(a))Ze.merge(y,a[y])},get dirty(){return Ze._dirty},set dirty(a){Ze._dirty||Ze._dirty===a||(Ze._dirty=!0,setTimeout(()=>{Ze._dirty=!1,this._subscribers.forEach(b=>b==null?void 0:b())},0))},subscribe(a){return Ze._subscribers.push(a),Ze._subscribers.length-1},unsubscribe(a){a<0||a>=Ze._subscribers.length||(Ze._subscribers[a]=void 0)},update(a){let b=a.querySelectorAll("[data-l10n-tooltip]");for(const y of b){const E=y.getAttribute("data-l10n-tooltip");if(E){const ee=Qe(E);ee&&y.setAttribute("data-tooltip",ee)}}b=a.querySelectorAll("[data-l10n-arial-label]");for(const y of b){const E=y.getAttribute("data-l10n-arial-label");if(E){const ee=Qe(E);ee&&y.setAttribute("aria-label",ee)}}}};function Qe(a,...b){if(a===void 0)return;let y="";const E=Ze.locale;Ze.strings[E]&&(y=Ze.strings[E][a]);const ee=E.slice(0,2);if(!y&&Ze.strings[ee]&&(y=Ze.strings[ee][a]),y||(y=Ze.strings.en[a]),!y)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(y),de=0;for(;ae;){if(b[de++]){const Se=ae[2]?parseInt(ae[2],10)-1:de-1;let De=b[Se];typeof De=="number"&&(De=Ze.numberFormatter.format(De)),y=y.replace(ae[1],De)}ae=re.exec(y)}return y=y.replace(/%%/g,"%"),y}var be={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},we={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ke={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"},Ge={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"},vt={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"},pt={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 Ue(a){var b,y,E,ee,re,ae;const de=a.split("!");let ve,Se,De,ze=255,at=255,Et=255,Ot=-1;const Ln=de.length>0&&de[0].startsWith("-");Ln&&(de[0]=de[0].slice(1));for(let kr=0;kr<de.length;kr++){ve=ze,Se=at,De=Et;const Dn=(b=de[kr].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:b[1],ar=Dn==null?void 0:Dn.toLowerCase(),Pr=Dn&&(ae=(re=(ee=(E=(y=Ge[ar])!=null?y:Ge[vt[Dn]])!=null?E:we[Dn])!=null?ee:pt[Dn])!=null?re:be[Dn])!=null?ae:de[kr].trim();let fr=Pr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(fr!=null&&fr[1]&&fr[2]&&fr[3])ze=Math.max(0,Math.min(255,Number.parseInt(fr[1],16))),at=Math.max(0,Math.min(255,Number.parseInt(fr[2],16))),Et=Math.max(0,Math.min(255,Number.parseInt(fr[3],16)));else if(fr=Pr.match(/^#([\da-f]{3})$/i),fr!=null&&fr[1]){const Si=Number.parseInt(fr[1][0],16),oa=Number.parseInt(fr[1][1],16),zi=Number.parseInt(fr[1][2],16);ze=Math.max(0,Math.min(255,Si*16+Si)),at=Math.max(0,Math.min(255,oa*16+oa)),Et=Math.max(0,Math.min(255,zi*16+zi))}else if(fr=Pr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),fr!=null&&fr[1]&&fr[2]&&fr[3])ze=Math.max(0,Math.min(255,Number.parseInt(fr[1]))),at=Math.max(0,Math.min(255,Number.parseInt(fr[2]))),Et=Math.max(0,Math.min(255,Number.parseInt(fr[3])));else return;Ot>=0&&(ze=(1-Ot)*ze+Ot*ve,at=(1-Ot)*at+Ot*Se,Et=(1-Ot)*Et+Ot*De,Ot=-1),kr+1<de.length&&(Ot=Math.max(0,Math.min(100,Number.parseInt(de[++kr])))/100)}return Ot>=0&&(ze=Ot*ze+(1-Ot)*ve,at=Ot*at+(1-Ot)*Se,Et=Ot*Et+(1-Ot)*De),Ln&&(ze=255-ze,at=255-at,Et=255-Et),"#"+("00"+Math.round(ze).toString(16)).slice(-2)+("00"+Math.round(at).toString(16)).slice(-2)+("00"+Math.round(Et).toString(16)).slice(-2)}function et(a){var b,y;return a=a.trim(),(y=(b=Ke[a.toLowerCase()])!=null?b:Ke[vt[a]])!=null?y:Ue(a)}function kt(a){if(!a||a[0]!=="#")return;a=a.slice(1);let b;return a.length<=4?(b={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(b.a=parseInt(a[3]+a[3],16)/255)):(b={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(b.a=parseInt(a[6]+a[7],16)/255)),b&&b.a===void 0&&(b.a=1),b}function it(a,b,y){return y<0&&(y+=6),y>=6&&(y-=6),y<1?(b-a)*y+a:y<3?b:y<4?(b-a)*(4-y)+a:a}function st(a){let[b,y,E]=[a.h,a.s,a.l];b=(b+360)%360/60,E=Math.max(0,Math.min(E,1)),y=Math.max(0,Math.min(y,1));const ee=E<=.5?E*(y+1):E+y-E*y,re=E*2-ee;return{r:Math.round(255*it(re,ee,b+2)),g:Math.round(255*it(re,ee,b)),b:Math.round(255*it(re,ee,b-2))}}function We(a){return a<0?0:a>255?255:Math.round(a)}function Tt(a){const{r:b,g:y,b:E}=a;let ee=((1<<24)+(We(b)<<16)+(We(y)<<8)+We(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 Ut(a){let{r:b,g:y,b:E}=a;b=b/255,y=y/255,E=E/255;const ee=Math.min(b,y,E),re=Math.max(b,y,E),ae=re-ee;let de,ve;re===ee?de=0:b===re?de=(y-E)/ae:y===re?de=2+(E-b)/ae:E===re&&(de=4+(b-y)/ae),de=Math.min(de*60,360),de<0&&(de+=360);const Se=(ee+re)/2;return re===ee?ve=0:Se<=.5?ve=ae/(re+ee):ve=ae/(2-re-ee),{h:de,s:ve,l:Se}}function Qt(a){let b=kt(a);if(!b)return a;let{h:y,s:E,l:ee}=Ut(b);return E+=.1,ee-=.1,Tt(st({h:y,s:E,l:ee}))}var Xe={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},Lt=[{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 cn(a,b,y){if(!/[A-Za-z\d]/.test(a)||(y==="up"&&(y=void 0),!b&&!y))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of Lt)if((!b||ee.variant===b)&&(!y||ee.style===y)&&E>=ee.offset&&E<ee.offset+ee.len){const re=ee.start+E-ee.offset;return String.fromCodePoint(Ae[re]||re)}return a}function an(a){var b;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const y in Ae)if(Ae[y]===a){a=(b=y.codePointAt(0))!=null?b:0;break}for(const y of Lt)if(a>=y.start&&a<y.start+y.len)return{char:String.fromCodePoint(a-y.start+y.offset),variant:y.variant,style:y.style};return{char:String.fromCodePoint(a)}}function ft(a){var b;let y="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){y+=E;continue}const ee=(b=E.codePointAt(0))!=null?b:0;let re=Xe[ee];if(re)re.startsWith("\\")?y+=re+" ":y+=re;else{const{char:ae,variant:de,style:ve}=an(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(ve){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}y+=re}}return y}function mt(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Yt={},An=Ce({},Xe),dn={},nn={},jt={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},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}},vn={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}},Te={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:vn},"amsmath.sty":{package:xn,primitive:!0},"texvc.sty":{package:jt,primitive:!1}},ue={" ":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},le=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,me,fe;ht()?(me=new RegExp("\\p{Letter}","u"),fe=new RegExp("[0-9\\p{Letter}]","u")):(me=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,fe=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function se(a,b,y="mord",E){b!==void 0&&(Yt[a]={definitionType:"symbol",type:y,variant:E,codepoint:b},An[b]||(An[b]=a))}function Oe(a,b,y){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);se(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)se(E,ee,re!=null?re:b,ae!=null?ae:y)}function rt(a,b){for(let y=a;y<=b;y++)se(String.fromCodePoint(y),y)}function Pt(a){var b;return(b=nn[a])!=null?b:null}function zt(a,b){var y,E;if(b.length===0||b==="\\"||!b.startsWith("\\"))return[];const ee=[];for(const ae in dn)ae.startsWith(b)&&!dn[ae].infix&&ee.push({match:ae,frequency:(y=dn[ae].frequency)!=null?y:0});for(const ae in Yt)ae.startsWith(b)&&ee.push({match:ae,frequency:(E=Yt[ae].frequency)!=null?E:0});const re=b.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 ve,Se;return ae.frequency===de.frequency?ae.match.length===de.match.length?ae.match<de.match?-1:1:ae.match.length-de.match.length:((ve=de.frequency)!=null?ve:0)-((Se=ae.frequency)!=null?Se:0)}),ee.map(ae=>ae.match)}function Zt(a){let b="auto";const y=a.match(/:([^=]+)/);return y&&(b=y[1].trim()),b}function en(a){if(!a)return[];const b=[];let y=a.split("]");if(y[0].startsWith("[")){b.push({isOptional:!0,type:Zt(y[0].slice(1))});for(let E=1;E<=y.length;E++)b.push(...en(y[E]))}else if(y=a.split("}"),y[0].startsWith("{")){b.push({isOptional:!1,type:Zt(y[0].slice(1))});for(let E=1;E<=y.length;E++)b.push(...en(y[E]))}return b}function Gt(a){if(!a)return"";let b="",y=!0;for(const E of a)typeof E.value=="string"?b+=E.value:y=!1;return y?b:""}function tr(a,b){typeof a=="string"&&(a=[a]);const y={tabular:!1,params:[],createAtom:b};for(const E of a)nn[E]=y}function cr(a,b,y){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:en(b),createAtom:y};for(const re of a)nn[re]=ee}function Wt(a,b,y){var E,ee;y||(y={});const re={definitionType:"function",params:en(b),ifMode:y.ifMode,isFunction:(E=y.isFunction)!=null?E:!1,applyMode:y.applyMode,infix:(ee=y.infix)!=null?ee:!1,parse:y.parse,createAtom:y.createAtom,applyStyle:y.applyStyle,serialize:y.serialize,render:y.render};if(typeof a=="string")dn["\\"+a]=re;else for(const ae of a)dn["\\"+ae]=re}var bn;function lr(a){return bn||(bn=Rn(Te)),a?Rn(Ce(Ce({},bn),a)):bn}function Wr(a,b){var y,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:(y=b==null?void 0:b.expand)!=null?y:!0,captureSelection:(E=b==null?void 0:b.captureSelection)!=null?E:!0,args:ae,def:de}}return Ce({expand:(ee=b==null?void 0:b.expand)!=null?ee:!0,captureSelection:(re=b==null?void 0:b.captureSelection)!=null?re:!0,args:0},a)}function Rn(a){if(!a)return{};const b={};for(const y of Object.keys(a)){const E=a[y];if(E==null)delete b[y];else if(typeof E=="object"&&"package"in E)for(const ee of Object.keys(E.package))b[ee]=Wr(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else b[y]=Wr(E)}return b}function Tr(a,b="math"){if(!a||a.length===0)return null;let y=null;if(a.startsWith("\\")){if(y=dn[a],y)return!y.ifMode||y.ifMode===b?y:null;b==="math"?y=Yt[a]:ue[a]&&(y={definitionType:"symbol",type:"mord",codepoint:ue[a]})}else if(b==="math"){if(y=Yt[a],!y&&a.length===1){const E=Wi("math",a.codePointAt(0));return E.startsWith("\\")?he(Ce({},Tr(E,"math")),{command:E}):null}}else ue[a]?y={definitionType:"symbol",type:"mord",codepoint:ue[a]}:b==="text"&&(y={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return y!=null?y:null}function Ca(a,b){if(!a.startsWith("\\"))return null;const y=a.slice(1);return b[y]}function Wi(a,b){if(b===void 0)return"";if(a==="math"&&An[b])return An[b];if(a==="text"){const y=Object.keys(ue).find(E=>ue[E]===b);return y||String.fromCodePoint(b)}return String.fromCodePoint(b)}var Li=[0,.68889,0,0,.72222],Mi=[0,.68889,0,0,.66667],Ji=[0,.68889,0,0,.77778],Zi=[0,.68889,0,0,.61111],Ea=[.16667,.68889,0,0,.77778],Ma=[0,.68889,0,0,.55556],Gr=[0,0,0,0,.25],Va=[0,.825,0,0,2.33334],no=[0,.9,0,0,2.33334],po=[0,.68889,0,0,.54028],mo=[-.03598,.46402,0,0,.5],Pa=[-.13313,.36687,0,0,1],Bt=[.01354,.52239,0,0,1],On=[.01354,.52239,0,0,1.11111],Fn=[0,.54986,0,0,1],$n=[0,.69224,0,0,.5],Ir=[0,.43056,0,0,1],or=[.08198,.58198,0,0,.77778],Sr=[.19444,.69224,0,0,.41667],Zn=[.1808,.675,0,0,1],ut=[.19444,.69224,0,0,.83334],bt=[.13667,.63667,0,0,1],Ft=[-.064,.437,0,0,1.334],qt=[.08167,.58167,0,0,.77778],qe=[0,.69224,0,0,.72222],_t=[0,.69224,0,0,.66667],Xt=[-.13313,.36687,0,0,.77778],Kt=[.06062,.54986,0,0,.77778],on=[0,.69224,0,0,.77778],rn=[.25583,.75583,0,0,.77778],Un=[.25142,.75726,0,0,.77778],Ar=[.20576,.70576,0,0,.77778],rr=[.30274,.79383,0,0,.77778],ir=[.22958,.72958,0,0,.77778],mr=[.1808,.675,0,0,.77778],br=[.13667,.63667,0,0,.77778],Yr=[.13597,.63597,0,0,.77778],_n=[.03517,.54986,0,0,.77778],Qn=[0,.675,0,0,.77778],na=[.19444,.69224,0,0,.61111],ca=[0,.54986,0,0,.76042],_i=[0,.54986,0,0,.66667],ii=[.0391,.5391,0,0,.77778],va=[.03517,.54986,0,0,1.33334],_r=[.38569,.88569,0,0,.77778],Qi=[.23222,.74111,0,0,.77778],Tn=[.19444,.69224,0,0,.77778],Ua=[0,.37788,0,0,.5],xa=[0,.54986,0,0,.72222],uo=[0,.69224,0,0,.83334],ja=[.11111,.69224,0,0,.66667],ka=[.26167,.75726,0,0,.77778],co=[.48256,.98256,0,0,.77778],za=[.28481,.79383,0,0,.77778],fa=[.08167,.58167,0,0,.22222],Ya=[.08167,.58167,0,0,.38889],_o=[0,.43056,.04028,0,.66667],qa=[.41951,.91951,0,0,.77778],Oa=[.24982,.74947,0,0,.38865],So=[.08319,.58283,0,0,.75623],To=[0,.10803,0,0,.27764],fo=[0,.47534,0,0,.50181],Vi=[.18906,.47534,0,0,.50181],At=[0,.69141,0,0,.50181],Mt=[.24982,.74947,0,0,.27764],tn=[0,.69141,0,0,.21471],Sn=[.25,.75,0,0,.44722],Kn=[0,.64444,0,0,.575],Zr=[.08556,.58556,0,0,.89444],Nr=[0,.69444,0,0,.89444],qr=[0,.68611,0,0,.9],li=[0,.68611,0,0,.86944],Jr=[.25,.75,0,0,.575],Ki=[.25,.75,0,0,.31944],ea=[0,.69444,0,0,.63889],ha=[0,.69444,0,0,.31944],Za=[0,.44444,0,0,.63889],Na=[0,.44444,0,0,.51111],Ra=[0,.69444,0,0,.575],Be=[.13333,.63333,0,0,.89444],Ve=[0,.44444,0,0,.31944],He=[0,.69444,0,0,.86944],tt=[0,.68611,0,0,.69166],gt=[0,.68611,0,0,.83055],Ct=[0,.68611,0,0,.89444],It=[0,.69444,0,0,.60278],ln=[.19444,.69444,0,0,.51111],mn=[0,.69444,0,0,.83055],Yn=[-.10889,.39111,0,0,1.14999],yr=[.19444,.69444,0,0,.575],Vn=[.19444,.69444,0,0,1.14999],En=[.19444,.69444,0,0,.70277],wn=[.05556,.75,0,0,.575],In=[0,.68611,0,0,.95833],Bn=[.08556,.58556,0,0,.76666],pr=[-.02639,.47361,0,0,.575],Xn=[0,.44444,0,0,.89444],jn=[0,.55556,0,0,.76666],nr=[-.10889,.39111,0,0,.89444],qn=[.00222,.50222,0,0,.89444],dr=[.19667,.69667,0,0,.89444],je=[.08556,.58556,0,0,1.14999],Ye=[0,.69444,0,0,.70277],$t=[-.02778,.47222,0,0,.575],Dt=[.25,.75,0,0,.51111],sn=[-.13889,.36111,0,0,1.14999],kn=[.19444,.69444,0,0,1.02222],yn=[.12963,.69444,0,0,.89444],zn=[.19444,.69444,0,0,.44722],Pn=[0,.64444,.13167,0,.59111],pn=[.19444,.64444,.13167,0,.59111],Nn=[0,.68611,.17208,0,.8961],Wn=[.19444,.44444,.105,0,.53222],vr=[0,.44444,.085,0,.82666],Hn=[0,.69444,.06709,0,.59111],Er=[0,.69444,.12945,0,.35555],Qr=[0,.69444,0,0,.94888],Rr=[0,.69444,.11472,0,.59111],jr=[0,.68611,.10778,0,.88555],Cr=[0,.69444,.07939,0,.62055],Fr=[0,.69444,.12417,0,.30667],ai=[0,.64444,.13556,0,.51111],hi=[.19444,.64444,.13556,0,.51111],$r=[0,.68333,.16389,0,.74333],wi=[.19444,.43056,.08847,0,.46],ta=[0,.43056,.07514,0,.71555],Ba=[0,.69444,.06646,0,.51111],ga=[0,.69444,0,0,.83129],ra=[0,.69444,.1225,0,.51111],La=[0,.68333,.09403,0,.76666],Aa=[0,.68333,.11111,0,.76666],Oi=[0,.69444,.06961,0,.51444],ia=[0,.69444,0,0,.27778],ni=[.25,.75,0,0,.38889],Ci=[0,.64444,0,0,.5],Xi=[0,.69444,0,0,.77778],wa=[0,.68333,0,0,.75],ri=[0,.68333,0,0,.77778],io=[0,.68333,0,0,.68056],ko=[0,.68333,0,0,.72222],Ja=[.25,.75,0,0,.5],Ta=[.25,.75,0,0,.27778],Ui=[0,.69444,0,0,.5],Po=[0,.69444,0,0,.55556],Yi=[0,.43056,0,0,.44445],oi=[0,.43056,0,0,.5],sa=[.19444,.43056,0,0,.55556],Ga=[0,.43056,0,0,.55556],la=[.08333,.58333,0,0,.77778],Ka=[0,.43056,0,0,.27778],ki=[0,.66786,0,0,.27778],ro=[0,.69444,0,0,.75],ao=[0,.66786,0,0,.5],eo=[0,.68333,0,0,.625],oo=[.19444,.69444,0,0,.44445],wo=[0,.69444,0,0,.72222],Ho=[.19444,.69444,0,0,.5],to=[.19444,.69444,0,0,1],Co=[.011,.511,0,0,1.126],Jo=[.19444,.69444,0,0,.61111],Xo=[.05556,.75,0,0,.5],as=[0,.68333,0,0,.83334],No=[.0391,.5391,0,0,.66667],vo=[-.05555,.44445,0,0,.5],ji=[0,.43056,0,0,.77778],ua=[0,.55556,0,0,.66667],Qa=[-.03625,.46375,0,0,.77778],ho=[-.01688,.48312,0,0,.77778],Fo=[.0391,.5391,0,0,1],es=[0,.69444,0,0,.61111],ms=[-.03472,.46528,0,0,.5],Rs=[.25,.75,0,0,.44445],Fs=[-.14236,.35764,0,0,1],os=[.244,.744,0,0,.412],Ts=[.19444,.69444,0,0,.88889],Fa=[.12963,.69444,0,0,.77778],Ni=[.19444,.69444,0,0,.38889],Do=[.011,.511,0,0,1.638],Eo=[.19444,.69444,0,0,0],Ie=[0,.44444,0,0,.575],Re=[.19444,.44444,0,0,.575],St=[0,.68611,0,0,.75555],xt=[0,.69444,0,0,.66759],Jt=[0,.68611,0,0,.80555],Ht=[0,.68611,.08229,0,.98229],Rt=[0,.68611,0,0,.76666],fn=[0,.44444,0,0,.58472],hn=[.19444,.44444,0,0,.6118],Mn=[.19444,.43056,0,0,.5],ur=[0,.68333,.02778,.08334,.76278],er=[0,.68333,.08125,.05556,.83125],zr=[0,.43056,0,.05556,.48472],sr=[.19444,.43056,0,.08334,.51702],Mr=[.25,.75,0,0,.42778],hr=[0,.69444,0,0,.55],Kr=[0,.69444,0,0,.73334],si=[0,.69444,0,0,.79445],yi=[0,.69444,0,0,.51945],Ei=[0,.69444,0,0,.70278],pi=[0,.69444,0,0,.76389],Ai=[.25,.75,0,0,.34306],ei=[0,.69444,0,0,.56111],Ti=[0,.69444,0,0,.25556],Ri=[.19444,.45833,0,0,.56111],wr=[0,.45833,0,0,.56111],Dr=[0,.69444,0,0,.30556],Ur=[0,.69444,0,0,.58056],Hi=[0,.69444,0,0,.67223],Di=[0,.69444,0,0,.85556],Bi=[0,.69444,0,0,.55834],Ii=[0,.65556,.11156,0,.5],qi=[0,.69444,.08094,0,.70834],aa=[.17014,0,0,0,.44445],ba=[0,.69444,.0799,0,.5],Da=[0,.69444,0,0,.73752],Wo=[0,.69444,.09205,0,.5],$a=[0,.69444,.09031,0,.77778],Lo=[0,.69444,.07816,0,.27778],vs=[0,.69444,.00316,0,.5],_a=[.19444,.69444,0,0,.83334],mi=[.05556,.75,0,0,.83334],vi=[0,.75,0,0,.5],Pi=[.125,.08333,0,0,.27778],ui=[0,.08333,0,0,.27778],Or=[0,.65556,0,0,.5],gi=[0,.69444,0,0,.47222],ci=[0,.69444,0,0,.66667],Gi=[0,.69444,0,0,.59722],pa=[0,.69444,0,0,.54167],Sa=[0,.69444,0,0,.70834],Fi=[.25,.75,0,0,.28889],Ha=[0,.69444,0,0,.51667],Mo=[0,.44444,0,0,.44445],go=[.19444,.44444,0,0,.51667],$o=[0,.44444,0,0,.38333],ts=[0,.44444,0,0,.51667],Ro=[0,.69444,0,0,.83334],ks=[.35001,.85,0,0,.45834],xs=[.35001,.85,0,0,.57778],$s=[.35001,.85,0,0,.41667],ns=[.35001,.85,0,0,.58334],zo=[0,.72222,0,0,.55556],Ss=[1e-5,.6,0,0,.66667],ss=[1e-5,.6,0,0,.77778],Qo=[.25001,.75,0,0,.94445],Is=[.306,.805,.19445,0,.47222],Es=[.30612,.805,.19445,0,.47222],Yo=[.25001,.75,0,0,.83334],Us=[.35001,.85,0,0,.47222],Dl=[.25001,.75,0,0,1.11111],yl=[.65002,1.15,0,0,.59722],ls=[.65002,1.15,0,0,.81111],bo=[.65002,1.15,0,0,.47222],us=[.65002,1.15,0,0,.66667],js=[0,.75,0,0,1],el=[.55001,1.05,0,0,1.27778],qo=[.862,1.36,.44445,0,.55556],Oo=[.86225,1.36,.44445,0,.55556],Uo=[.55001,1.05,0,0,1.11111],zs=[.65002,1.15,0,0,.52778],Ms=[.65002,1.15,0,0,.61111],Ks=[.55001,1.05,0,0,1.51112],Ia=[.95003,1.45,0,0,.73611],Br=[.95003,1.45,0,0,1.04445],di=[.95003,1.45,0,0,.52778],$i=[.95003,1.45,0,0,.75],ma=[0,.75,0,0,1.44445],jo=[.95003,1.45,0,0,.58334],Go=[1.25003,1.75,0,0,.79167],vl=[1.25003,1.75,0,0,1.27778],qs=[1.25003,1.75,0,0,.58334],Ll=[1.25003,1.75,0,0,.80556],Ps=[0,.825,0,0,1.8889],Al=[1.25003,1.75,0,0,.63889],iu=[.64502,1.155,0,0,.875],au=[1e-5,.6,0,0,.875],$u=[-99e-5,.601,0,0,.66667],Ol=[.64502,1.155,0,0,.66667],Bl=[1e-5,.9,0,0,.88889],pc=[.65002,1.15,0,0,.88889],El=[.90001,0,0,0,.88889],Xu=[-.00499,.605,0,0,1.05556],ou=[0,.12,0,0,.45],bi=[0,.61111,0,0,.525],xl=[.08333,.69444,0,0,.525],mc=[-.08056,.53055,0,0,.525],vc=[-.05556,.55556,0,0,.525],rl=[0,.43056,0,0,.525],Ds=[.22222,.43056,0,0,.525],vu=[0,0,0,0,.525],Fc={"AMS-Regular":{32:Gr,65:Li,66:Mi,67:Li,68:Li,69:Mi,70:Zi,71:Ji,72:Ji,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Ji,76:Mi,77:[0,.68889,0,0,.94445],78:Li,79:Ea,80:Zi,81:Ea,82:Li,83:Ma,84:Mi,85:Li,86:Li,87:[0,.68889,0,0,1],88:Li,89:Li,90:Mi,107:Ma,160:Gr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Ma,295:po,710:Va,732:no,770:Va,771:no,989:qt,1008:_o,8245:[0,.54986,0,0,.275],8463:po,8487:Li,8498:Ma,8502:Mi,8503:[0,.68889,0,0,.44445],8504:Mi,8513:[0,.68889,0,0,.63889],8592:mo,8594:mo,8602:Pa,8603:Pa,8606:Bt,8608:Bt,8610:On,8611:On,8619:Fn,8620:Fn,8621:[-.13313,.37788,0,0,1.38889],8622:Pa,8624:$n,8625:$n,8630:Ir,8631:Ir,8634:or,8635:or,8638:Sr,8639:Sr,8642:Sr,8643:Sr,8644:Zn,8646:Zn,8647:Zn,8648:ut,8649:Zn,8650:ut,8651:Bt,8652:Bt,8653:Pa,8654:Pa,8655:Pa,8666:bt,8667:bt,8669:[-.13313,.37788,0,0,1],8672:Ft,8674:Ft,8705:[0,.825,0,0,.5],8708:Ma,8709:qt,8717:[0,.43056,0,0,.42917],8722:mo,8724:[.08198,.69224,0,0,.77778],8726:qt,8733:on,8736:qe,8737:qe,8738:[.03517,.52239,0,0,.72222],8739:fa,8740:[.25142,.74111,0,0,.27778],8741:Ya,8742:[.25142,.74111,0,0,.5],8756:_t,8757:_t,8764:Xt,8765:[-.13313,.37788,0,0,.77778],8769:Xt,8770:Qa,8774:rr,8776:ho,8778:qt,8782:Kt,8783:Kt,8785:or,8786:or,8787:or,8790:on,8791:ir,8796:[.08198,.91667,0,0,.77778],8806:rn,8807:rn,8808:Un,8809:Un,8812:[.25583,.75583,0,0,.5],8814:Ar,8815:Ar,8816:rr,8817:rr,8818:ir,8819:ir,8822:mr,8823:mr,8828:br,8829:br,8830:ir,8831:ir,8832:Ar,8833:Ar,8840:rr,8841:rr,8842:Yr,8843:Yr,8847:_n,8848:_n,8858:or,8859:or,8861:or,8862:Qn,8863:Qn,8864:Qn,8865:Qn,8872:[0,.69224,0,0,.61111],8873:qe,8874:[0,.69224,0,0,.88889],8876:Zi,8877:Zi,8878:Li,8879:Li,8882:_n,8883:_n,8884:br,8885:br,8888:[0,.54986,0,0,1.11111],8890:sa,8891:na,8892:na,8901:[0,.54986,0,0,.27778],8903:qt,8905:qt,8906:qt,8907:on,8908:on,8909:[-.03598,.46402,0,0,.77778],8910:ca,8911:ca,8912:_n,8913:_n,8914:_i,8915:_i,8916:_t,8918:ii,8919:ii,8920:va,8921:va,8922:_r,8923:_r,8926:br,8927:br,8928:rr,8929:rr,8934:Qi,8935:Qi,8936:Qi,8937:Qi,8938:Ar,8939:Ar,8940:rr,8941:rr,8994:Tn,8995:Tn,9416:[.15559,.69224,0,0,.90222],9484:$n,9488:$n,9492:Ua,9496:Ua,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Qn,9633:Qn,9650:xa,9651:xa,9654:_n,9660:xa,9661:xa,9664:_n,9674:ja,9733:[.19444,.69224,0,0,.94445],10003:uo,10016:uo,10731:ja,10846:[.19444,.75583,0,0,.61111],10877:br,10878:br,10885:rn,10886:rn,10887:Yr,10888:Yr,10889:ka,10890:ka,10891:co,10892:co,10901:br,10902:br,10933:Un,10934:Un,10935:ka,10936:ka,10937:ka,10938:ka,10949:rn,10950:rn,10955:za,10956:za,57350:fa,57351:Ya,57352:qt,57353:_o,57356:Un,57357:Un,57358:qa,57359:rr,57360:rr,57361:qa,57366:Un,57367:Un,57368:Un,57369:Un,57370:Yr,57371:Yr},"Caligraphic-Regular":{32:Gr,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:Gr},"Fraktur-Regular":{32:Gr,33:[0,.69141,0,0,.29574],34:tn,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:Oa,41:Oa,42:[0,.62119,0,0,.27764],43:So,44:To,45:So,46:To,47:[.24982,.74947,0,0,.50181],48:fo,49:fo,50:fo,51:Vi,52:Vi,53:Vi,54:At,55:Vi,56:At,57:Vi,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:Gr,8216:tn,8217:tn,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:Gr,33:[0,.69444,0,0,.35],34:It,35:[.19444,.69444,0,0,.95833],36:wn,37:[.05556,.75,0,0,.95833],38:Nr,39:ha,40:Sn,41:Sn,42:[0,.75,0,0,.575],43:Be,44:[.19444,.15556,0,0,.31944],45:$o,46:[0,.15556,0,0,.31944],47:Jr,48:Kn,49:Kn,50:Kn,51:Kn,52:Kn,53:Kn,54:Kn,55:Kn,56:Kn,57:Kn,58:Ve,59:[.19444,.44444,0,0,.31944],60:Zr,61:nr,62:Zr,63:[0,.69444,0,0,.54305],64:Nr,65:li,66:[0,.68611,0,0,.81805],67:gt,68:[0,.68611,0,0,.88194],69:St,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:qr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:tt,77:[0,.68611,0,0,1.09166],78:qr,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:li,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Ki,92:Jr,93:Ki,94:Ra,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:ea,99:Na,100:ea,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:ea,105:ha,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:ha,109:[0,.44444,0,0,.95833],110:Za,111:Ie,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:Za,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:Na,123:Jr,124:Ki,125:Jr,126:[.35,.34444,0,0,.575],160:Gr,163:[0,.69444,0,0,.86853],168:Ra,172:[0,.44444,0,0,.76666],176:He,177:Be,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Be,216:[.04861,.73472,0,0,.89444],223:Gi,230:[0,.44444,0,0,.83055],247:Be,248:[.09722,.54167,0,0,.575],305:Ve,338:[0,.68611,0,0,1.16944],339:Xn,567:[.19444,.44444,0,0,.35139],710:Ra,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Ra,715:Ra,728:Ra,729:ha,730:He,732:Ra,733:Ra,915:tt,916:In,920:Ct,923:Jt,926:Rt,928:qr,931:gt,933:Ct,934:gt,936:Ct,937:gt,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:ha,8217:ha,8220:It,8221:It,8224:ln,8225:ln,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:xt,8465:mn,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:mn,8501:Ye,8592:Yn,8593:yr,8594:Yn,8595:yr,8596:Yn,8597:Jr,8598:Vn,8599:Vn,8600:Vn,8601:Vn,8636:Yn,8637:Yn,8640:Yn,8641:Yn,8656:Yn,8657:En,8658:Yn,8659:En,8660:Yn,8661:[.25,.75,0,0,.70277],8704:ea,8706:[0,.69444,.06389,0,.62847],8707:ea,8709:wn,8711:In,8712:Bn,8715:Bn,8722:Be,8723:Be,8725:Jr,8726:Jr,8727:$t,8728:pr,8729:pr,8730:[.18,.82,0,0,.95833],8733:Xn,8734:[0,.44444,0,0,1.14999],8736:qe,8739:Ki,8741:Jr,8743:jn,8744:jn,8745:jn,8746:jn,8747:[.19444,.69444,.12778,0,.56875],8764:nr,8768:[.19444,.69444,0,0,.31944],8771:qn,8776:[.02444,.52444,0,0,.89444],8781:qn,8801:qn,8804:dr,8805:dr,8810:je,8811:je,8826:Zr,8827:Zr,8834:Zr,8835:Zr,8838:dr,8839:dr,8846:jn,8849:dr,8850:dr,8851:jn,8852:jn,8853:Be,8854:Be,8855:Be,8856:Be,8857:Be,8866:Ye,8867:Ye,8868:Nr,8869:Nr,8900:pr,8901:[-.02639,.47361,0,0,.31944],8902:$t,8968:Dt,8969:Dt,8970:Dt,8971:Dt,8994:sn,8995:sn,9651:kn,9657:$t,9661:kn,9667:$t,9711:Vn,9824:yn,9825:yn,9826:yn,9827:yn,9837:[0,.75,0,0,.44722],9838:zn,9839:zn,10216:Sn,10217:Sn,10815:qr,10927:dr,10928:dr,57376:Eo},"Main-BoldItalic":{32:Gr,33:[0,.69444,.11417,0,.38611],34:Cr,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Er,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:Pn,49:Pn,50:Pn,51:Pn,52:pn,53:Pn,54:Pn,55:pn,56:Pn,57:Pn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Rr,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:Nn,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:Nn,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:Hn,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:Wn,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:Wn,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:Gr,168:[0,.69444,.11473,0,.59111],176:Qr,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:vr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:vr,567:[.19444,.44444,.04611,0,.385],710:Hn,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:Er,730:Qr,732:Rr,733:Rr,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:Nn,931:[0,.68611,.11431,0,.82666],933:jr,934:[0,.68611,.05632,0,.82666],936:jr,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Er,8217:Er,8220:[0,.69444,.16772,0,.62055],8221:Cr},"Main-Italic":{32:Gr,33:Fr,34:Oi,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Fr,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:ai,49:ai,50:ai,51:ai,52:hi,53:ai,54:ai,55:hi,56:ai,57:ai,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:ra,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:$r,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:$r,79:La,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:$r,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:Ba,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:wi,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:wi,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:Gr,168:[0,.66786,.10474,0,.51111],176:ga,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:ta,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:ta,710:Ba,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:ga,732:[0,.66786,.11585,0,.51111],733:ra,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:La,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:$r,931:[0,.68333,.12028,0,.71555],933:Aa,934:[0,.68333,.05986,0,.71555],936:Aa,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Fr,8217:Fr,8220:[0,.69444,.1685,0,.51444],8221:Oi,8463:po},"Main-Regular":{32:Gr,33:ia,34:Ui,35:_a,36:Xo,37:mi,38:Xi,39:ia,40:ni,41:ni,42:vi,43:la,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Ja,48:Ci,49:Ci,50:Ci,51:Ci,52:Ci,53:Ci,54:Ci,55:Ci,56:Ci,57:Ci,58:Ka,59:[.19444,.43056,0,0,.27778],60:ii,61:Xt,62:ii,63:gi,64:Xi,65:wa,66:[0,.68333,0,0,.70834],67:ko,68:[0,.68333,0,0,.76389],69:io,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:wa,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:ri,76:eo,77:[0,.68333,0,0,.91667],78:wa,79:ri,80:io,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:ko,85:wa,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:wa,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Ta,92:Ja,93:Ta,94:Ui,95:[.31,.12056,.02778,0,.5],97:oi,98:Po,99:Yi,100:Po,101:Yi,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Po,105:ki,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:ia,109:[0,.43056,0,0,.83334],110:Ga,111:oi,112:sa,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:Ga,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:Yi,123:Ja,124:Ta,125:Ja,126:[.35,.31786,0,0,.5],160:Gr,163:[0,.69444,0,0,.76909],167:oo,168:ao,172:[0,.43056,0,0,.66667],176:ro,177:la,182:Jo,184:aa,198:[0,.68333,0,0,.90278],215:la,216:[.04861,.73194,0,0,.77778],223:Ui,230:[0,.43056,0,0,.72222],247:la,248:[.09722,.52778,0,0,.5],305:Ka,338:[0,.68333,0,0,1.01389],339:ji,567:[.19444,.43056,0,0,.30556],710:Ui,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Ui,715:Ui,728:Ui,729:ki,730:ro,732:ao,733:Ui,915:eo,916:as,920:ri,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:wa,931:ko,933:ri,934:ko,936:ri,937:ko,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:ia,8217:ia,8220:Ui,8221:Ui,8224:oo,8225:oo,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:po,8465:wo,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:wo,8501:es,8592:Pa,8593:Ho,8594:Pa,8595:Ho,8596:Pa,8597:Ja,8598:to,8599:to,8600:to,8601:to,8614:[.011,.511,0,0,1],8617:Co,8618:Co,8636:Pa,8637:Pa,8640:Pa,8641:Pa,8652:[.011,.671,0,0,1],8656:Pa,8657:Jo,8658:Pa,8659:Jo,8660:Pa,8661:[.25,.75,0,0,.61111],8704:Po,8706:[0,.69444,.05556,.08334,.5309],8707:Po,8709:Xo,8711:as,8712:No,8715:No,8722:la,8723:la,8725:Ja,8726:Ja,8727:ms,8728:vo,8729:vo,8730:[.2,.8,0,0,.83334],8733:ji,8734:Ir,8736:qe,8739:Ta,8741:Ja,8743:ua,8744:ua,8745:ua,8746:ua,8747:[.19444,.69444,.11111,0,.41667],8764:Xt,8768:[.19444,.69444,0,0,.27778],8771:Qa,8773:[-.022,.589,0,0,1],8776:ho,8781:Qa,8784:[-.133,.67,0,0,.778],8801:Qa,8804:Yr,8805:Yr,8810:Fo,8811:Fo,8826:ii,8827:ii,8834:ii,8835:ii,8838:Yr,8839:Yr,8846:ua,8849:Yr,8850:Yr,8851:ua,8852:ua,8853:la,8854:la,8855:la,8856:la,8857:la,8866:es,8867:es,8868:Xi,8869:Xi,8872:[.249,.75,0,0,.867],8900:vo,8901:[-.05555,.44445,0,0,.27778],8902:ms,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:Rs,8969:Rs,8970:Rs,8971:Rs,8994:Fs,8995:Fs,9136:os,9137:os,9651:Ts,9657:ms,9661:Ts,9667:ms,9711:to,9824:Fa,9825:Fa,9826:Fa,9827:Fa,9837:[0,.75,0,0,.38889],9838:Ni,9839:Ni,10216:ni,10217:ni,10222:os,10223:os,10229:[.011,.511,0,0,1.609],10230:Do,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:Do,10815:wa,10927:Yr,10928:Yr,57376:Eo},"Math-BoldItalic":{32:Gr,48:Ie,49:Ie,50:Ie,51:Re,52:Re,53:Re,54:Kn,55:Re,56:Kn,57:Re,65:li,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:Ht,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:St,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:xt,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:fn,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:Gr,915:[0,.68611,.15972,0,.65694],916:In,920:[0,.68611,.03194,0,.86722],923:Jt,926:[0,.68611,.07458,0,.84125],928:Ht,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Rt,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:fn,960:[0,.44444,.03704,0,.68241],961:hn,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:hn,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Gr,48:oi,49:oi,50:oi,51:Mn,52:Mn,53:Mn,54:Ci,55:Mn,56:Ci,57:Mn,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:er,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:ur,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:zr,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:Gr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:ur,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:er,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:zr,960:[0,.43056,.03588,0,.57003],961:sr,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:sr,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Gr,33:[0,.69444,0,0,.36667],34:Bi,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:Dr,40:Mr,41:Mr,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:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:yi,64:Kr,65:Kr,66:Kr,67:Ei,68:si,69:[0,.69444,0,0,.64167],70:es,71:Kr,72:si,73:[0,.69444,0,0,.33056],74:yi,75:pi,76:Ur,77:[0,.69444,0,0,.97778],78:si,79:si,80:Ei,81:[.10556,.69444,0,0,.79445],82:Ei,83:es,84:Kr,85:pi,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Kr,89:[0,.69444,.0275,0,.73334],90:Hi,91:Ai,93:Ai,94:hr,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:ei,99:[0,.45833,0,0,.48889],100:ei,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:ei,105:Ti,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Ti,109:[0,.45833,0,0,.86667],110:wr,111:[0,.45833,0,0,.55],112:Ri,113:Ri,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:wr,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:Gr,168:hr,176:Kr,180:hr,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:hr,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:hr,729:Dr,730:Kr,732:hr,733:hr,915:Ur,916:[0,.69444,0,0,.91667],920:Di,923:Hi,926:Kr,928:si,931:si,933:Di,934:si,936:Di,937:si,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Dr,8217:Dr,8220:Bi,8221:Bi},"SansSerif-Italic":{32:Gr,33:[0,.69444,.05733,0,.31945],34:vs,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:Lo,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:Pi,45:[0,.44444,.01946,0,.33333],46:ui,47:[.25,.75,.13164,0,.5],48:Ii,49:Ii,50:Ii,51:Ii,52:Ii,53:Ii,54:Ii,55:Ii,56:Ii,57:Ii,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:ci,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:qi,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:pa,77:[0,.69444,.08094,0,.875],78:qi,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:ba,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:Gr,168:[0,.67937,.06385,0,.5],176:Da,184:aa,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:ba,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Wo,715:Ui,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Da,732:[0,.67659,.08826,0,.5],733:Wo,915:[0,.69444,.13372,0,.54167],916:Ro,920:[0,.69444,.07555,0,.77778],923:es,926:[0,.69444,.12816,0,.66667],928:qi,931:[0,.69444,.11983,0,.72222],933:$a,934:[0,.69444,.04603,0,.72222],936:$a,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Lo,8217:Lo,8220:[0,.69444,.14205,0,.5],8221:vs},"SansSerif-Regular":{32:Gr,33:[0,.69444,0,0,.31945],34:Ui,35:_a,36:Xo,37:mi,38:[0,.69444,0,0,.75834],39:ia,40:ni,41:ni,42:vi,43:la,44:Pi,45:[0,.44444,0,0,.33333],46:ui,47:Ja,48:Or,49:Or,50:Or,51:Or,52:Or,53:Or,54:Or,55:Or,56:Or,57:Or,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:gi,64:ci,65:ci,66:ci,67:ea,68:[0,.69444,0,0,.72223],69:Gi,70:[0,.69444,0,0,.56945],71:ci,72:Sa,73:ia,74:gi,75:[0,.69444,0,0,.69445],76:pa,77:[0,.69444,0,0,.875],78:Sa,79:[0,.69444,0,0,.73611],80:ea,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Po,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:ci,89:[0,.69444,.025,0,.66667],90:es,91:Fi,93:Fi,94:Ui,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Ha,99:Mo,100:Ha,101:Mo,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Ha,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:ts,111:[0,.44444,0,0,.5],112:go,113:go,114:[0,.44444,.01389,0,.34167],115:$o,116:[0,.57143,0,0,.36111],117:ts,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:Gr,168:[0,.67937,0,0,.5],176:ci,184:aa,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Ui,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Ui,715:Ui,728:Ui,729:[0,.67937,0,0,.27778],730:ci,732:[0,.67659,0,0,.5],733:Ui,915:pa,916:Ro,920:Xi,923:es,926:ci,928:Sa,931:wo,933:Xi,934:wo,936:Xi,937:wo,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:ia,8217:ia,8220:Ui,8221:Ui},"Script-Regular":{32:Gr,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:Gr},"Size1-Regular":{32:Gr,40:ks,41:ks,47:xs,91:$s,92:xs,93:$s,123:ns,125:ns,160:Gr,710:zo,732:zo,770:zo,771:zo,8214:[-99e-5,.601,0,0,.77778],8593:Ss,8595:Ss,8657:ss,8659:ss,8719:Qo,8720:Qo,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:Es,8748:Is,8749:Is,8750:Es,8896:Yo,8897:Yo,8898:Yo,8899:Yo,8968:Us,8969:Us,8970:Us,8971:Us,9168:$u,10216:Us,10217:Us,10752:Dl,10753:Dl,10754:Dl,10756:Yo,10758:Yo},"Size2-Regular":{32:Gr,40:yl,41:yl,47:ls,91:bo,92:ls,93:bo,123:us,125:us,160:Gr,710:js,732:js,770:js,771:js,8719:el,8720:el,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:Oo,8748:qo,8749:qo,8750:Oo,8896:Uo,8897:Uo,8898:Uo,8899:Uo,8968:zs,8969:zs,8970:zs,8971:zs,10216:Ms,10217:Ms,10752:Ks,10753:Ks,10754:Ks,10756:Uo,10758:Uo},"Size3-Regular":{32:Gr,40:Ia,41:Ia,47:Br,91:di,92:Br,93:di,123:$i,125:$i,160:Gr,710:ma,732:ma,770:ma,771:ma,8730:[.95003,1.45,0,0,1],8968:jo,8969:jo,8970:jo,8971:jo,10216:$i,10217:$i},"Size4-Regular":{32:Gr,40:Go,41:Go,47:vl,91:qs,92:vl,93:qs,123:Ll,125:Ll,160:Gr,710:Ps,732:Ps,770:Ps,771:Ps,8730:[1.25003,1.75,0,0,1],8968:Al,8969:Al,8970:Al,8971:Al,9115:iu,9116:au,9117:iu,9118:iu,9119:au,9120:iu,9121:Ol,9122:$u,9123:Ol,9124:Ol,9125:$u,9126:Ol,9127:Bl,9128:pc,9129:El,9130:[0,.3,0,0,.88889],9131:Bl,9132:pc,9133:El,9143:[.88502,.915,0,0,1.05556],10216:Ll,10217:Ll,57344:Xu,57345:Xu,57680:ou,57681:ou,57682:ou,57683:ou},"Typewriter-Regular":{32:vu,33:bi,34:bi,35:bi,36:xl,37:xl,38:bi,39:bi,40:xl,41:xl,42:[0,.52083,0,0,.525],43:mc,44:[.13889,.125,0,0,.525],45:mc,46:[0,.125,0,0,.525],47:xl,48:bi,49:bi,50:bi,51:bi,52:bi,53:bi,54:bi,55:bi,56:bi,57:bi,58:rl,59:[.13889,.43056,0,0,.525],60:vc,61:[-.19549,.41562,0,0,.525],62:vc,63:bi,64:bi,65:bi,66:bi,67:bi,68:bi,69:bi,70:bi,71:bi,72:bi,73:bi,74:bi,75:bi,76:bi,77:bi,78:bi,79:bi,80:bi,81:[.13889,.61111,0,0,.525],82:bi,83:bi,84:bi,85:bi,86:bi,87:bi,88:bi,89:bi,90:bi,91:xl,92:xl,93:xl,94:bi,95:[.09514,0,0,0,.525],96:bi,97:rl,98:bi,99:rl,100:bi,101:rl,102:bi,103:Ds,104:bi,105:bi,106:[.22222,.61111,0,0,.525],107:bi,108:bi,109:rl,110:rl,111:rl,112:Ds,113:Ds,114:rl,115:rl,116:[0,.55358,0,0,.525],117:rl,118:rl,119:rl,120:rl,121:Ds,122:rl,123:xl,124:xl,125:xl,126:bi,127:bi,160:vu,176:bi,184:[.19445,0,0,0,.525],305:rl,567:Ds,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:bi,715:bi,728:bi,730:bi,770:bi,771:bi,776:bi,915:bi,916:bi,920:bi,923:bi,926:bi,928:bi,931:bi,933:bi,934:bi,936:bi,937:bi,8216:bi,8217:bi,8242:bi,9251:[.11111,.21944,0,0,.525]}},gc=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,su=10,il=.25,Yu=1.2,zl=.431,qu={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[zl,zl,zl],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:[il,il,il],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]},gu=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],so=5,lo={"\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 ws(a,b){a===void 0&&(a=77);const y=Fc[b][a];if(y)return{defaultMetrics:!1,depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[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 lo)a=lo[E].codePointAt(0);else if(gc.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 tl={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]},gs={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]},gl={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 al(a){if(gs[a]){const[Se,De,ze]=gs[a],at=`<span class="stretchy" style="height:${ze}em"><svg width="100%" height="${ze}em" viewBox="0 0 ${Se} ${De}" preserveAspectRatio="none" ><path fill="currentcolor" d="${gl[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*ze/2)/100}em;min-width:0">${at}</span>`}const[b,y,E,ee]=tl[a];let re,ae;const de=E/1e3;b.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],ae=["xMinYMin","xMidYMin","xMaxYMin"]):b.length===2?(re=["slice-1-of-2","slice-2-of-2"],ae=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],ae=[ee]);const ve=b.map((Se,De)=>`<span class="${re[De]}" style=height:${de}em><svg width=400em height=${de}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[De]} slice"><path fill="currentcolor" d="${gl[Se]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${de}em;min-width:${y}em;">${ve}</span>`}function bu(a){return tl[a]?tl[a][2]/1e3:gs[a][2]}function Kl(a){const b=[];for(let y=0;y<a.length;y++){let E=a.charCodeAt(y);if(E===13&&a.charCodeAt(y+1)===10&&(E=10,y++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(y+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Fu(2,16)+re*Fu(2,10)+ae,y++}}b.push(E)}return b}var Nl=8205,Ml=[[Nl,1],[65038,2],[127995,5],[129456,4],[917536,96]],Hl,Ju=[127462,127487];function Qu(a){var b;if(Hl===void 0){Hl={};for(const y of Ml)for(let E=y[0];E<=y[0]+y[1]-1;E++)Hl[E]=!0}return(b=Hl[a])!=null?b:!1}function nf(a){return a>=Ju[0]&&a<=Ju[1]}function rf(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const b=[],y=Kl(a);let E=0;for(;E<y.length;){const ee=y[E++],re=y[E];if(re===Nl){const ae=E-1;for(E+=2;y[E]===Nl;)E+=2;b.push(String.fromCodePoint(...y.slice(ae,E-ae+1)))}else if(Qu(re)){const ae=E-1;for(;Qu(y[E]);)E+=y[E]===Nl?2:1;b.push(String.fromCodePoint(...y.slice(ae,2*E-ae-1)))}else nf(ee)?(E+=1,b.push(String.fromCodePoint(...y.slice(E-2,2)))):b.push(String.fromCodePoint(ee))}return b}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 b=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return b!=null&&b[0]?(this.pos+=b[0].length,b[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 b=this.match(/^[a-zA-Z\*]+/);return b?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):b=this.get(),"\\"+b}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const b=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(b)return String.fromCodePoint(Number.parseInt(b.slice(b.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let b=!1;if(/[\d?@]/.test(this.peek())&&(b=!0,this.pos+1<this.s.length)){const y=this.s[this.pos+1];b=/[^\dA-Za-z]/.test(y)}return b?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function yu(a,b){var y,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 ve of de)ae.push(ve==="\\"?"\\backslash":ve);else de==="<{>"?ae.push("\\{"):de==="<space>"?ae.push("~"):de==="<}>"&&ae.push("\\}")}else if(de==="\\csname"){for(;a.peek()==="<space>";)a.next();let ve="",Se=!1,De=[];do{if(De.length===0)if(/^#[\d?@]$/.test(a.peek())){const ze=a.get().slice(1);De=lu((E=(y=b==null?void 0:b(ze))!=null?y:b==null?void 0:b("?"))!=null?E:"\\placeholder{}",b),de=De[0]}else de=a.next(),De=de?[de]:[];Se=De.length===0,!Se&&de==="\\endcsname"&&(Se=!0,De.shift()),Se||(Se=de==="<$>"||de==="<$$>"||de==="<{>"||de==="<}>"||typeof de=="string"&&de.length>1&&de.startsWith("\\")),Se||(ve+=De.shift())}while(!Se);ve&&ae.push("\\"+ve),ae.push(...De)}else if(de!=="\\endcsname")if(de.length>1&&de.startsWith("#")){const ve=de.slice(1);ae.push(...lu((re=(ee=b==null?void 0:b(ve))!=null?ee:b==null?void 0:b("?"))!=null?re:"\\placeholder{}",b))}else ae.push(de)}return ae}function lu(a,b=null){const y=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&y.push(E),E=" ";const de=ae.match(/((?:\\%)|[^%])*/);de!==null&&y.push(de[0])}const ee=new af(ft(y.join(""))),re=[];do re.push(...yu(ee,b));while(!ee.end());return re}function yo(a){let b="";const y=[];for(const E of a)E&&(b&&/^[a-zA-Z\*]/.test(E)&&y.push(b),y.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&y.push(" "),b=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return y.join("")}function bs(a,...b){return console.assert(a.startsWith("\\")),b.length===0?a:yo([a,...b.map(y=>`{${y}}`)])}function xu(a){return yo(a.map(b=>{var y;return(y={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[b])!=null?y:b}))}var of=class tf{constructor(b){tf._registry[b]=this}static createAtom(b,y,E){return tf._registry[b].createAtom(y,Tr(y,b),E)}static serialize(b,y){var E;if(!b||b.length===0)return"";if((E=y.skipStyles)!=null&&E){const ee=[];for(const re of sf(b)){const ae=tf._registry[re[0].mode];ee.push(...ae.serialize(re,y))}return yo(ee)}return yo(th(b,y))}static getFont(b,y,E){return tf._registry[b].getFont(y,E)}};of._registry={};var Tl=of;function sf(a){const b=[];let y=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(y.length>0&&b.push(y),y=[ee],E=ee.mode):y.push(ee));return y.length>0&&b.push(y),b}function Hs(a,b){const y=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;b==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[b],ae===ee?E.push(re):(E.length>0&&y.push(E),E=[re],ee=ae)}return E.length>0&&y.push(E),y}function pd(a,b){var y;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of sf(a)){const de=b.defaultMode;for(const ve of Hs(ae,"color")){const Se=ve[0].computedStyle,De=Tl._registry[ve[0].mode].serialize(ve,he(Ce({},b),{defaultMode:de==="text"?"text":"math"}));!b.skipStyles&&Se.color&&Se.color!=="none"&&(!E||ee!==Se.color)?re.push(bs("\\textcolor",(y=Se.verbatimColor)!=null?y:Se.color,yo(De))):re.push(yo(De))}}return re}function eh(a,b){const{parent:y}=a[0],E=y==null?void 0:y.computedStyle.backgroundColor;return Hs(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"&&(!y||E!==ae.backgroundColor))return bs("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,yo(pd(ee,he(Ce({},b),{defaultMode:"text"}))))}return yo(pd(ee,b))})}function th(a,b){if(a.length===0)return[];const{parent:y}=a[0],E=y==null?void 0:y.computedStyle.fontSize,ee=[];for(const re of Hs(a,"fontSize")){const ae=re[0].computedStyle.fontSize,de=eh(re,b);de&&(ae&&ae!=="auto"&&(!y||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...de):ee.push(...de))}return ee}function md(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 ec(a){if(a.length===0)return"ord";const b=md(a[0].type),y=md(a[a.length-1].type);return b&&b===y?b:"ord"}function tc(a,b){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const y=Math.ceil(100*a)/100;return y===0?"0":y.toString()+(b!=null?b:"")}return""}var Lr=class Ep{constructor(b,y){var E,ee,re,ae,de;if(typeof b=="number"?this.value=String.fromCodePoint(b):typeof b=="string"?this.value=b:Pe(b)?this.children=b.filter(Se=>Se!==null):b&&b instanceof Ep&&(this.children=[b]),this.children)for(const Se of this.children)Se.parent=this;this.type=(E=y==null?void 0:y.type)!=null?E:"ignore",this.isSelected=(y==null?void 0:y.isSelected)===!0,y!=null&&y.caret&&(this.caret=y.caret),this.classes=(ee=y==null?void 0:y.classes)!=null?ee:"",this.isTight=(re=y==null?void 0:y.isTight)!=null?re:!1,y!=null&&y.attributes&&(this.attributes=y.attributes);let ve=y==null?void 0:y.fontFamily;y!=null&&y.style&&this.value&&(ve=(de=Tl.getFont((ae=y.mode)!=null?ae:"math",this,he(Ce({variant:"normal"},y.style),{letterShapeStyle:y.letterShapeStyle})))!=null?de:void 0),ve||(ve="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,(y==null?void 0:y.maxFontSize)!==void 0&&(this.maxFontSize=y.maxFontSize),bc(this,ve)}set atomID(b){b===void 0||b.length===0||(this.id=b)}selected(b){if(this.isSelected!==b&&(this.isSelected=b,this.children))for(const y of this.children)y.selected(b)}setStyle(b,y,E){if(y===void 0)return;const ee=tc(y,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[b]=ee)}setTop(b){Number.isFinite(b)&&Math.abs(b)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=tc(b,"em"),this.height-=b,this.depth+=b)}get left(){var b;return(b=this.cssProperties)!=null&&b["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(b){Number.isFinite(b)&&(b===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=tc(b,"em")))}set right(b){Number.isFinite(b)&&(b===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=tc(b,"em")))}set bottom(b){Number.isFinite(b)&&(b===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=tc(b,"em")))}get width(){return this._width*this.scale}set width(b){this._width=b,this.hasExplicitWidth=!0}set softWidth(b){}get height(){return this._height*this.scale}set height(b){this._height=b}get depth(){return this._depth*this.scale}set depth(b){this._depth=b}wrap(b){const y=b.parent;if(!y)return this;b.isPhantom&&this.setStyle("opacity",0);const E=b.color;E&&E!==y.color&&this.setStyle("color",E);let ee=b.backgroundColor;this.isSelected&&(ee=Qt(ee)),ee&&ee!==y.backgroundColor&&(this.setStyle("background-color",ee),this.setStyle("display","inline-block"));const re=b.scalingFactor;return this.scale=re,this.skew*=re,this.italic*=re,this}toMarkup(){var b,y,E,ee;let re=(b=this.value)!=null?b:"";if(this.children)for(const Et of this.children)re+=Et.toMarkup();let ae="";if(this.svgBody)ae=al(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 Et=(y=this.cssProperties)==null?void 0:y.padding;Et?(ae+=`top:${Et};`,ae+=`left:${Et};`,ae+=`width:calc(100% - 2 * ${Et} );`):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 ve=this.classes.split(" ");ve.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&ve.push("ML__latex-caret"),this.isSelected&&ve.push("ML__selected");const Se=ve.length===1?ve[0]:ve.filter((Et,Ot,Ln)=>Et.length>0&&Ln.indexOf(Et)===Ot).join(" ");if(Se.length>0&&(de+=` class="${Se}"`),this.id&&(de+=` data-atom-id=${this.id}`),this.cssId&&(de+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(de+=" "+Object.keys(this.attributes).map(Et=>`${Et}="${this.attributes[Et]}"`).join(" ")),this.htmlData){const Et=this.htmlData.split(",");for(const Ot of Et){const Ln=Ot.match(/([^=]+)=(.+$)/);if(Ln){const kr=Ln[1].trim().replace(/ /g,"-");kr&&(de+=` data-${kr}="${Ln[2]}" `)}else{const kr=Ot.trim().replace(/ /g,"-");kr&&(de+=` data-${kr} `)}}}const De=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&De.width===void 0&&(De.width=`${Math.ceil(this._width*100)/100}em`);const ze=Object.keys(De).map(Et=>`${Et}:${De[Et]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&ze.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const Et=this.htmlStyle.split(";");let Ot="";for(const Ln of Et){const kr=Ln.match(/([^=]+):(.+$)/);if(kr){const Dn=kr[1].trim().replace(/ /g,"-");Dn&&(Ot+=`${Dn}:${kr[2]};`)}}Ot&&(de+=` style="${Ot}"`)}ze.length>0&&(de+=` style="${ze.join(";")}"`);let at="";return de.length>0||ae.length>0?at=`<span${de}>${re}${ae}</span>`:at=re,this.caret==="text"?at+='<span class="ML__text-caret"></span>':this.caret==="math"&&(at+='<span class="ML__caret"></span>'),at}tryCoalesceWith(b){if(this.svgBody||!this.value||b.svgBody||!b.value)return!1;const y=this.children&&this.children.length>0,E=b.children&&b.children.length>0;if(y||E)return!1;if(b.cssProperties||this.cssProperties){for(const ve of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(b.cssProperties&&ve in b.cssProperties||this.cssProperties&&ve in this.cssProperties)return!1}const ee=this.cssProperties?Object.keys(this.cssProperties).length:0,re=b.cssProperties?Object.keys(b.cssProperties).length:0;if(ee!==re)return!1;if(ee>0){for(const ve of Object.keys(this.cssProperties))if(this.cssProperties[ve]!==b.cssProperties[ve])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),de=b.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==de.length)return!1;ae.sort(),de.sort();for(const[ve,Se]of ae.entries())if(Se==="vertical-separator"||Se!==de[ve])return!1;return this.value+=b.value,this.height=Math.max(this.height,b.height),this.depth=Math.max(this.depth,b.depth),this._width=this._width+b._width,this.maxFontSize=Math.max(this.maxFontSize,b.maxFontSize),this.italic=b.italic,!0}};function vd(a){if(!a||a.length===0)return[];a[0].children=vd(a[0].children);const b=[a[0]];for(let y=1;y<a.length;y++)b[b.length-1].tryCoalesceWith(a[y])||(a[y].children=vd(a[y].children),b.push(a[y]));return b}function $c(a){return a.children&&(a.children=vd(a.children)),a}function zc(a,b){if(!a)return new Lr(null,b);const y=new Lr(null,{classes:"ML__strut",type:"ignore"});y.setStyle("height",Math.max(0,a.height),"em");const E=[y];if(a.depth!==0){const ee=new Lr(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 Lr(E,he(Ce({},b),{type:"lift"}))}function Wl(a){const b=bu(a)/2,y=new Lr(null,{maxFontSize:0});return y.height=b+.166,y.depth=b-.166,y.svgBody=a,y}function bc(a,b){var y;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=ws(a.value.codePointAt(E),b);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,(y=ae.maxFontSize)!=null?y:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,de)=>ae+de.width,0),a.maxFontSize=re}}function Kc(a){if("individualShift"in a){const b=a.individualShift;let y=b[0];const E=[y],ee=-y.shift-y.box.depth;let re=ee;for(let ae=1;ae<b.length;ae++){const de=b[ae],ve=-de.shift-re-de.box.depth,Se=ve-(y.box.height+y.box.depth);re=re+ve,E.push(Se),E.push(de),y=de}return[E,ee]}if("top"in a){let b=a.top;for(const y of a.children)b-=typeof y=="number"?y:y.box.height+y.box.depth;return[a.children,b]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const b=a.firstBaseline[0];if(typeof b=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-b.box.depth]}else if("shift"in a){const b=a.children[0];if(typeof b=="number")throw new Error("First child must be an element.");return[a.children,-b.box.depth-a.shift]}}return[null,0]}function yc(a){var b;const[y,E]=Kc(a);if(!y)return[[],0,0];const ee=new Lr(null,{classes:"pstrut"});let re=0;for(const Ot of y)if(typeof Ot!="number"){const Ln=Ot.box;re=Math.max(re,Ln.maxFontSize,Ln.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let de=E,ve=E,Se=E,De=0;for(const Ot of y){if(typeof Ot=="number")Se+=Ot;else{const Ln=Ot.box,kr=(b=Ot.classes)!=null?b:[],Dn=new Lr([ee,Ln],{classes:kr.join(" "),style:Ot.style});Ln.setStyle("height",Ln.height+Ln.depth,"em"),Ln.setStyle("display","inline-block"),Dn.setStyle("top",-re-Se-Ln.depth,"em"),Ot.marginLeft&&Dn.setStyle("margin-left",Ot.marginLeft,"em"),Ot.marginRight&&Dn.setStyle("margin-right",Ot.marginRight,"em"),ae.push(Dn),Se+=Ln.height+Ln.depth,De=Math.max(De,Dn.width)}de=Math.min(de,Se),ve=Math.max(ve,Se)}ae.forEach(Ot=>{Ot.softWidth=De});const ze=new Lr(ae,{classes:"vlist"});if(ze.softWidth=De,ze.height=ve,ze.setStyle("height",ve,"em"),de>=0)return[[new Lr(ze,{classes:"vlist-r"})],ve,-de];const at=new Lr(new Lr(null),{classes:"vlist"});at.height=-de,at.setStyle("height",-de,"em");const Et=new Lr(8203,{classes:"vlist-s",maxFontSize:0});return Et.softWidth=0,Et.height=0,Et.depth=0,[[new Lr([ze,Et],{classes:"vlist-r"}),new Lr(at,{classes:"vlist-r"})],ve,-de]}var cs=class extends Lr{constructor(a,b){var y;const[E,ee,re]=yc(a);super(E.length===1?E[0]:E,{type:b==null?void 0:b.type,classes:((y=b==null?void 0:b.classes)!=null?y:"")+" 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,b){var y,E,ee,re,ae;const de=a.metrics,ve=new Lr(b.base),Se=(y=b.baseShift)!=null?y:0,De=(E=b.slant)!=null?E:0;let ze=0,at=0;b.above&&(ze=(ee=b.aboveShift)!=null?ee:Math.max(de.bigOpSpacing1,de.bigOpSpacing3-b.above.depth)),b.below&&(at=(re=b.belowShift)!=null?re:Math.max(de.bigOpSpacing2,de.bigOpSpacing4-b.below.height));let Et=null;if(b.below&&b.above){const Ot=de.bigOpSpacing5+b.below.height+b.below.depth+at+ve.depth+Se;Et=new cs({bottom:Ot,children:[de.bigOpSpacing5,{box:b.below,marginLeft:-De,classes:["ML__center"]},at,{box:ve,classes:["ML__center"]},ze,{box:b.above,marginLeft:De,classes:["ML__center"]},de.bigOpSpacing5]}).wrap(a)}else if(b.below&&!b.above)Et=new cs({top:ve.height-Se,children:[de.bigOpSpacing5,{box:b.below,marginLeft:-De,classes:["ML__center"]},at,{box:ve,classes:["ML__center"]}]}).wrap(a);else if(!b.below&&b.above){const Ot=ve.depth+Se;Et=new cs({bottom:Ot,children:[{box:ve,classes:["ML__center"]},ze,{box:b.above,marginLeft:De,classes:["ML__center"]},de.bigOpSpacing5]}).wrap(a)}else{const Ot=ve.depth+Se;Et=new cs({bottom:Ot,children:[{box:ve},de.bigOpSpacing5]}).wrap(a)}return new Lr(Et,{type:(ae=b.type)!=null?ae:"op"})}var gd=7,uu=6,xc=5,Su=4,zu=3,bl=2,Rl=1,ol=0,Yl=class{constructor(a,b,y){this.id=a,this.sizeDelta=b,this.cramped=y;const E={"-4":2,"-3":1,0:0}[b];this.metrics=Object.keys(qu).reduce((ee,re)=>he(Ce({},ee),{[re]:qu[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return ql[[ol,Rl,ol,Rl,bl,zu,bl,zu][this.id]]}get sub(){return ql[[ol,ol,ol,ol,bl,bl,bl,bl][this.id]]}get fracNum(){return ql[[ol,Rl,ol,Rl,bl,zu,Su,xc][this.id]]}get fracDen(){return ql[[ol,ol,ol,ol,bl,bl,Su,Su][this.id]]}get cramp(){return ql[[ol,ol,bl,bl,Su,Su,uu,uu][this.id]]}get isTight(){return this.sizeDelta<0}},Ku={7:new Yl(gd,0,!1),6:new Yl(uu,0,!0),5:new Yl(xc,0,!1),4:new Yl(Su,0,!0),3:new Yl(zu,-3,!1),2:new Yl(bl,-3,!0),1:new Yl(Rl,-4,!1),0:new Yl(ol,-4,!0)},ql=he(Ce({},Ku),{displaystyle:Ku[gd],textstyle:Ku[xc],scriptstyle:Ku[zu],scriptscriptstyle:Ku[Rl]});function nc(a,b){var y;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:su,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(y=a.unit)!=null?y:"pt"];if(Number.isFinite(b)){const ee=Fu(10,b);return Math.round(a.dimension/su*E*ee)/ee}return a.dimension*E}function bd(a,b){if(a===null)return 0;const y=nc(a)/su;if(Number.isFinite(b)){const E=Fu(10,b);return Math.round(y*E)/E}return y}function yd(a){var b;return`${a.dimension}${(b=a.unit)!=null?b:"pt"}`}function lf(a){let b=yd(a.glue);return a.grow&&a.grow.dimension!==0&&(b+=` plus ${yd(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(b+=` minus ${yd(a.shrink)}`),b}function Gs(a){var b,y;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(b=a.unit)!=null?b:"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),(y=a.relax)!=null&&y&&(E+="\\relax"),E}function Jl(a,b){return a==null?null:"number"in a?he(Ce({},a),{number:a.number*b}):"register"in a?"factor"in a&&a.factor?he(Ce({},a),{factor:a.factor*b}):he(Ce({},a),{factor:b}):"dimension"in a?he(Ce({},a),{dimension:a.dimension*b}):"glue"in a?a.shrink&&a.grow?{glue:Jl(a.glue,b),shrink:Jl(a.shrink,b),grow:Jl(a.grow,b)}:a.shrink?{glue:Jl(a.glue,b),shrink:Jl(a.shrink,b)}:a.grow?{glue:Jl(a.glue,b),grow:Jl(a.grow,b)}:{glue:Jl(a.glue,b)}: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 rc(){return Ce({},rh)}function Hc(){return{registers:rc(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Ze.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:Ue,backgroundColorMap:et,getMacro:a=>Ca(a,lr())}}var Io=class Mp{constructor(b,y){var E,ee,re,ae,de,ve,Se,De,ze,at,Et,Ot,Ln,kr,Dn;let ar;b!=null&&b.parent?(this.parent=b.parent,ar=b.parent,this.registers={}):(ar=Ce(Ce({},Hc()),(E=b==null?void 0:b.from)!=null?E:{}),this.registers=ar.registers),ar.atomIdsSettings&&(this.atomIdsSettings=Ce({},ar.atomIdsSettings)),this.renderPlaceholder=ar.renderPlaceholder,this.isPhantom=(ae=(re=b==null?void 0:b.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?ae:!1,this.letterShapeStyle=ar.letterShapeStyle,this.minFontScale=ar.minFontScale,y!=null&&y.color&&y.color!=="none"?this.color=y.color:this.color=(ve=(de=this.parent)==null?void 0:de.color)!=null?ve:"",y!=null&&y.backgroundColor&&y.backgroundColor!=="none"?this.backgroundColor=y.backgroundColor:this.backgroundColor=(De=(Se=this.parent)==null?void 0:Se.backgroundColor)!=null?De:"",y!=null&&y.fontSize&&y.fontSize!=="auto"&&y.fontSize!==((ze=this.parent)==null?void 0:ze.size)?this.size=y.fontSize:this.size=(Et=(at=this.parent)==null?void 0:at.size)!=null?Et:so;let Pr=(Ln=(Ot=this.parent)==null?void 0:Ot.mathstyle)!=null?Ln:ql.displaystyle;if(typeof(b==null?void 0:b.mathstyle)=="string"){if(ar instanceof Mp)switch(b.mathstyle){case"cramp":Pr=Pr.cramp;break;case"superscript":Pr=Pr.sup;break;case"subscript":Pr=Pr.sub;break;case"numerator":Pr=Pr.fracNum;break;case"denominator":Pr=Pr.fracDen;break}switch(b.mathstyle){case"textstyle":Pr=ql.textstyle;break;case"displaystyle":Pr=ql.displaystyle;break;case"scriptstyle":Pr=ql.scriptstyle;break;case"scriptscriptstyle":Pr=ql.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Pr,this.smartFence=ar.smartFence,this.placeholderSymbol=ar.placeholderSymbol,this.colorMap=(kr=ar.colorMap)!=null?kr:fr=>fr,this.backgroundColorMap=(Dn=ar.backgroundColorMap)!=null?Dn:fr=>fr,this.getMacro=ar.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 b=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,b}scale(b){return b*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===gd||this.mathstyle.id===uu}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(gu[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(b){var y;if((y=this.registers)!=null&&y[b])return this.registers[b];if(this.parent)return this.parent.getRegister(b)}getRegisterAsNumber(b){const y=this.getRegister(b);if(typeof y=="number")return y;if(typeof y=="string")return Number(y)}getRegisterAsGlue(b){var y;if((y=this.registers)!=null&&y[b]){const E=this.registers[b];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(b)}getRegisterAsEm(b,y){return bd(this.getRegisterAsDimension(b),y)}getRegisterAsDimension(b){var y;if((y=this.registers)!=null&&y[b]){const E=this.registers[b];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(b)}setRegister(b,y){if(y===void 0){delete this.registers[b];return}this.registers[b]=y}evaluate(b){if(!b||!("register"in b))return b;let y=this;if("global"in b&&b.global)for(;y.parent;)y=y.parent;let E=1;"factor"in b&&b.factor!==1&&b.factor!==void 0&&(E=b.factor);const ee=y.getRegister(b.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=y.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?he(Ce({},re),{dimension:E*re.dimension}):"glue"in re?he(Ce({},re),{glue:he(Ce({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?he(Ce({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?he(Ce({},re.grow),{dimension:E*re.grow.dimension}):void 0}):b}toDimension(b){const y=this.evaluate(b);return y===void 0?null:"dimension"in y?y:"glue"in y?y.glue:"number"in y?{dimension:y.number}:null}toEm(b,y){if(b===null)return 0;const E=this.toDimension(b);return E===null?0:nc(E,y)/su}toNumber(b){if(b===null)return null;const y=this.evaluate(b);return y===void 0?null:"number"in y?y.number:"dimension"in y?y.dimension:"glue"in y?y.glue.dimension:"string"in y?Number(y.string):null}toColor(b){var y,E;if(b===null)return null;const ee=this.evaluate(b);return ee===void 0?null:"string"in ee?(E=(y=this.colorMap)==null?void 0:y.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(b){var y,E;if(b===null)return null;const ee=this.evaluate(b);return ee===void 0?null:"string"in ee?(E=(y=this.backgroundColorMap)==null?void 0:y.call(this,ee.string))!=null?E:ee.string:null}},ic=["body","above","below","superscript","subscript"];function cu(a){return typeof a=="string"&&ic.includes(a)}function Sc(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Gn=class ju{constructor(b){var y,E,ee,re,ae,de;this.type=b.type,typeof b.value=="string"&&(this.value=b.value),this.command=(E=(y=b.command)!=null?y:this.value)!=null?E:"",this.mode=(ee=b.mode)!=null?ee:"math",b.isFunction&&(this.isFunction=!0),b.limits&&(this.subsupPlacement=b.limits),this.style=Ce({},b.style),this.displayContainsHighlight=(re=b.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=b.captureSelection)!=null?ae:!1,this.skipBoundary=(de=b.skipBoundary)!=null?de:!1,b.verbatimLatex!==void 0&&b.verbatimLatex!==null&&(this.verbatimLatex=b.verbatimLatex),b.args&&(this.args=b.args),b.body&&(this.body=b.body),this._changeCounter=0}static createBox(b,y,E){var ee;if(!y)return null;const re=uf(y),ae=[];for(const ve of re){const Se=ve[0].style,De=cf(b,ve,{style:{color:Se.color,backgroundColor:Se.backgroundColor,fontSize:Se.fontSize}});De&&ae.push(De)}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(b):new Lr(ae,{classes:de,type:E==null?void 0:E.type}).wrap(b)}static serialize(b,y){return Tl.serialize(b,y)}static commonAncestor(b,y){if(b===y||b.parent===y.parent)return b.parent;const E=new WeakSet;let{parent:ee}=b;for(;ee;)E.add(ee),ee=ee.parent;for(ee=y.parent;ee;){if(E.has(ee))return ee;ee=ee.parent}console.assert(!!ee)}static fromJson(b){return typeof b=="string"?new ju({type:"mord",value:b,mode:"math"}):new ju(b)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const b={};if(this.type&&(b.type=this.type),this.mode!=="math"&&(b.mode=this.mode),this.command&&this.command!==this.value&&(b.command=this.command),this.value!==void 0&&(b.value=this.value),this.style&&Object.keys(this.style).length>0&&(b.style=Ce({},this.style)),this.verbatimLatex!==void 0&&(b.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(b.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),this.isFunction&&(b.isFunction=!0),this.displayContainsHighlight&&(b.displayContainsHighlight=!0),this.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),this.skipBoundary&&(b.skipBoundary=!0),this.captureSelection&&(b.captureSelection=!0),this.args&&(b.args=Sd(this.args)),this._branches)for(const y of Object.keys(this._branches))this._branches[y]&&(b[y]=this._branches[y].filter(E=>E.type!=="first").map(E=>E.toJson()));return b.type==="mord"&&Object.keys(b).length===2&&"value"in b?b.value:b}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(b){if(b){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:y}=this;for(;y;)y.parent||y._changeCounter++,"verbatimLatex"in y&&(y.verbatimLatex=void 0),y._children=void 0,y=y.parent}}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):this.body&&this.command?yo([bs(this.command,this.bodyToLatex(b)),this.supsubToLatex(b)]):this.body?yo([this.bodyToLatex(b),this.supsubToLatex(b)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(b){var y;return Tl.serialize(this.body,he(Ce({},b),{defaultMode:(y=b.defaultMode)!=null?y:this.latexMode}))}aboveToLatex(b){return Tl.serialize(this.above,b)}belowToLatex(b){return Tl.serialize(this.below,b)}supsubToLatex(b){let y="";if(b=he(Ce({},b),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Tl.serialize(this.subscript,b);E.length===0?y+="_{}":E.length===1?/^[0-9]$/.test(E)?y+=`_${E}`:y+=`_{${E}}`:y+=`_{${E}}`}if(this.branch("superscript")!==void 0){const E=Tl.serialize(this.superscript,b);E.length===0?y+="^{}":E.length===1?E==="\u2032"?y+="^\\prime ":E==="\u2033"?y+="^\\doubleprime ":/^[0-9]$/.test(E)?y+=`^${E}`:y+=`^{${E}}`:y+=`^{${E}}`}return y}get treeDepth(){let b=1,y=this.parent;for(;y;)y=y.parent,b+=1;return b}get inCaptureSelection(){let b=this;for(;b;){if(b.captureSelection)return!0;b=b.parent}return!1}get parentPrompt(){let b=this.parent;for(;b;){if(b.type==="prompt"&&!b.captureSelection)return b;b=b.parent}return null}branch(b){if(cu(b)&&this._branches)return this._branches[b]}get branches(){if(!this._branches)return[];const b=[];for(const y of ic)this._branches[y]&&b.push(y);return b}createBranch(b){return console.assert(cu(b)),cu(b)?(this._branches?this._branches[b]||(this._branches[b]=[this.makeFirstAtom(b)]):this._branches={[b]:[this.makeFirstAtom(b)]},this.isDirty=!0,this._branches[b]):[]}get row(){return Sc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Sc(this.parentBranch)?this.parentBranch[1]:-1}get body(){var b;return(b=this._branches)==null?void 0:b.body}set body(b){this.setChildren(b,"body")}get superscript(){var b;return(b=this._branches)==null?void 0:b.superscript}set superscript(b){this.setChildren(b,"superscript")}get subscript(){var b;return(b=this._branches)==null?void 0:b.subscript}set subscript(b){this.setChildren(b,"subscript")}get above(){var b;return(b=this._branches)==null?void 0:b.above}set above(b){this.setChildren(b,"above")}get below(){var b;return(b=this._branches)==null?void 0:b.below}set below(b){this.setChildren(b,"below")}get computedStyle(){var b,y;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=Ce(Ce({},(y=(b=this.parent)==null?void 0:b.computedStyle)!=null?y:{}),this.style);return delete re.variant,delete re.variantStyle,ee||delete re.verbatimBackgroundColor,E||delete re.verbatimColor,re}applyStyle(b){this.isDirty=!0,this.style=Ce(Ce({},this.style),b),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 y of this.children)y.applyStyle(b)}getInitialBaseElement(){var b,y,E;return this.hasEmptyBranch("body")?this:(console.assert(((b=this.body)==null?void 0:b[0].type)==="first"),(E=(y=this.body[1])==null?void 0:y.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(b){const y=this.branch(b);return y?(console.assert(y.length>0),console.assert(y[0].type==="first"),y.length===1):!0}setChildren(b,y){var E;if(!b||(console.assert(cu(y)),!cu(y)))return;console.assert(((E=b[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(y),...b];this._branches?this._branches[y]=ee:this._branches={[y]:ee};for(const re of b)re.parent=this,re.parentBranch=y;this.isDirty=!0}makeFirstAtom(b){const y=new ju({type:"first",mode:this.mode});return y.parent=this,y.parentBranch=b,y}addChild(b,y){console.assert(b.type!=="first"),this.createBranch(y).push(b),this.isDirty=!0,b.parent=this,b.parentBranch=y}addChildBefore(b,y){console.assert(y.parentBranch!==void 0);const E=this.createBranch(y.parentBranch);E.splice(E.indexOf(y),0,b),this.isDirty=!0,b.parent=this,b.parentBranch=y.parentBranch}addChildAfter(b,y){console.assert(y.parentBranch!==void 0);const E=this.createBranch(y.parentBranch);E.splice(E.indexOf(y)+1,0,b),this.isDirty=!0,b.parent=this,b.parentBranch=y.parentBranch}addChildren(b,y){const E=this.createBranch(y);for(const ee of b)ee.parent=this,ee.parentBranch=y,E.push(ee);this.isDirty=!0}addChildrenAfter(b,y){console.assert(b.length===0||b[0].type!=="first"),console.assert(y.parentBranch!==void 0);const E=this.createBranch(y.parentBranch);E.splice(E.indexOf(y)+1,0,...b),this.isDirty=!0;for(const ee of b)ee.parent=this,ee.parentBranch=y.parentBranch;return b[b.length-1]}removeBranch(b){const y=this.branch(b);if(cu(b)&&(this._branches[b]=void 0),!y)return[];for(const E of y)E.parent=void 0,E.parentBranch=void 0;return console.assert(y[0].type==="first"),y.shift(),this.isDirty=!0,y}removeChild(b){if(console.assert(b.parent===this),b.type==="first")return;const y=this.branch(b.parentBranch),E=y.indexOf(b);console.assert(E>=0),y.splice(E,1),this.isDirty=!0,b.parent=void 0,b.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:b}=this;return b[b.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 b=this.parent.branch(this.parentBranch);return b[b.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const b=this.parent.branch(this.parentBranch);return b[b.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:b}=this;return b[b.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const b=[];for(const y of ic)if(this._branches[y])for(const E of this._branches[y])b.push(...E.children),b.push(E);return this._children=b,b}render(b){if(this.type==="first"&&!b.atomIdsSettings)return null;const y=Tr(this.command,this.mode);if(y!=null&&y.render)return y.render(this,b);const E=new Io({parent:b},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(b,y){var E;const ee=y.base,re=this.superscript,ae=this.subscript;if(!re&&!ae)return ee;let de=null,ve=null;const Se=(E=y.isCharacterBox)!=null?E:this.isCharacterBox();let De=0;if(re){const Ln=new Io({parent:b,mathstyle:"superscript"});de=ju.createBox(Ln,re),Se||(De=ee.height-b.metrics.supDrop*Ln.scalingFactor)}let ze=0;if(ae){const Ln=new Io({parent:b,mathstyle:"subscript"});ve=ju.createBox(Ln,ae),Se||(ze=ee.depth+b.metrics.subDrop*Ln.scalingFactor)}let at;b.isDisplayStyle?at=b.metrics.sup1:b.isCramped?at=b.metrics.sup3:at=b.metrics.sup2;const Et=.5/su/b.scalingFactor;let Ot=null;if(ve&&de){De=Math.max(De,at,de.depth+.25*b.metrics.xHeight),ze=Math.max(ze,b.metrics.sub2);const Ln=b.metrics.defaultRuleThickness;if(De-de.depth-(ve.height-ze)<4*Ln){ze=4*Ln-(De-de.depth)+ve.height;const Dn=.8*b.metrics.xHeight-(De-de.depth);Dn>0&&(De+=Dn,ze-=Dn)}const kr=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;Ot=new cs({individualShift:[{box:ve,shift:ze,marginLeft:kr},{box:de,shift:-De}]}).wrap(b)}else ve&&!de?(ze=Math.max(ze,b.metrics.sub1,ve.height-.8*zl),Ot=new cs({shift:ze,children:[{box:ve,marginRight:Et,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!ve&&de&&(De=Math.max(De,at,de.depth+.25*zl),Ot=new cs({shift:-De,children:[{box:de,marginRight:Et}]}));return new Lr([ee,new Lr(Ot,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:y.type})}attachLimits(b,y){const E=this.superscript?ju.createBox(new Io({parent:b,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?ju.createBox(new Io({parent:b,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?y.base.wrap(b):nh(b,he(Ce({},y),{above:E,below:ee}))}bind(b,y){if(!y||b.isPhantom||this.value==="\u200B")return y;let E=this.parent;for(;E&&!E.captureSelection;)E=E.parent;return E!=null&&E.captureSelection||(this.id||(this.id=b.makeID()),y.atomID=this.id),y}createBox(b,y){var E,ee,re,ae;const de=(E=this.value)!=null?E:this.body,ve=(ee=y==null?void 0:y.boxType)!=null?ee:md(this.type);let Se=(re=y==null?void 0:y.classes)!=null?re:"";this.mode==="text"&&(Se+=" ML__text");const De=typeof de=="string"||de===void 0?new Lr(de!=null?de:null,{type:ve,isSelected:this.isSelected,mode:this.mode,maxFontSize:b.scalingFactor,style:he(Ce({variant:"normal"},this.style),{fontSize:Math.max(1,b.size+b.mathstyle.sizeDelta)}),letterShapeStyle:b.letterShapeStyle,classes:Se}):(ae=ju.createBox(b,de,{type:ve,classes:Se}))!=null?ae:new Lr(null);return b.isTight&&(De.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(De.italic=0),De.right=De.italic,this.bind(b,De),this.caret&&!this.superscript&&!this.subscript&&(De.caret=this.caret),De}isDigit(){var b;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((b=this.body)==null?void 0:b.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var b;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((b=this.body)==null?void 0:b.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function uf(a){let b;const y=[];let E=[];for(const ee of a)if(!b&&!ee.style)E.push(ee);else{const re=ee.computedStyle;b&&re.color===b.color&&re.backgroundColor===b.backgroundColor&&re.fontSize===b.fontSize?E.push(ee):(E.length>0&&y.push(E),E=[ee],b=re)}return E.length>0&&y.push(E),y}function cf(a,b,y){var E,ee,re,ae,de;if(!b||b.length===0)return null;const ve=new Io({parent:a},y.style),Se=!((E=ve.atomIdsSettings)!=null&&E.groupNumbers);let De=[];if(b.length===1){const at=b[0],Et=at.render(ve);Et&&(Se&&at.isSelected&&Et.selected(!0),De=[Et])}else{let at="",Et=!0;for(const Ot of b){(ee=ve.atomIdsSettings)!=null&&ee.groupNumbers&&at&&(Et&&Ot.isDigit()||!Et&&xd(Ot))&&(ve.atomIdsSettings.overrideID=at);const Ln=Ot.render(ve);ve.atomIdsSettings&&(ve.atomIdsSettings.overrideID=void 0),Ln&&((re=ve.atomIdsSettings)!=null&&re.groupNumbers&&((Ot.isDigit()||xd(Ot))&&(!at||Et!==Ot.isDigit())&&(Et=Ot.isDigit(),at=(ae=Ot.id)!=null?ae:""),at&&(!(Ot.isDigit()||xd(Ot))||!Ot.hasEmptyBranch("superscript")||!Ot.hasEmptyBranch("subscript"))&&(at="")),Se&&Ot.isSelected&&Ln.selected(!0),De.push(Ln))}}if(De.length===0)return null;const ze=new Lr(De,he(Ce({isTight:ve.isTight},y),{type:(de=y.type)!=null?de:"lift"}));return ze.isSelected=De.every(at=>at.isSelected),ze.wrap(ve)}function xd(a){return a.mode==="text"}function Sd(a){return a.map(b=>b===null?"<null>":Array.isArray(b)&&b[0]instanceof Gn?{atoms:b.map(y=>y.toJson())}:typeof b=="object"&&"group"in b?{group:b.group.map(y=>y.toJson())}:b)}var du=class _p extends Gn{constructor(b,y,E){super({type:"text",command:b,mode:"text",displayContainsHighlight:!0}),this.value=y,this.verbatimLatex=y,this.applyStyle(E)}static fromJson(b){return new _p(b.command,b.value,b.style)}render(b){const y=this.createBox(b);return this.caret&&(y.caret=this.caret),y}_serialize(b){var y;return(y=this.verbatimLatex)!=null?y:Wi("text",this.value.codePointAt(0))}};function wc(a,b){if(a.direction===b.direction){const y=a.ranges.length;if(b.ranges.length===y){let E=0;for(;E<y&&ih(a.ranges[E],b.ranges[E])==="equal";)E++;return E===y?"equal":"different"}}return"different"}function ih(a,b){return a[0]===b[0]&&a[1]===b[1]?"equal":"different"}function sl(a){let b=1/0,y=-1/0;for(const E of a.ranges)b=Math.min(b,E[0],E[1]),y=Math.max(y,E[0],E[1]);return[b,y]}function wu(a){return typeof a=="number"&&!Number.isNaN(a)}function Wc(a){return Array.isArray(a)&&a.length===2}function Zc(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ah(a,b){const y=a.at(b);let E;if(y){E=y.mode;let ee=y.parent;for(;!E&&ee;)ee&&(E=ee.mode),ee=ee.parent}return E}function df(a,b){if(!b)return"";if(typeof b=="string")return b;if(!a||b.after===void 0)return b.value;let y=!1,E=!1,ee=!1,re=!1,ae=!1,de=!1,ve=!1,Se=!1,De=!1,ze=!1,at=!1,Et=!1,Ot=!1,Ln=!1,kr=!1,Dn=a[0],ar=0;for(;Dn!=null&&Dn.type&&/^(subsup|placeholder)$/.test(Dn.type);)ar+=1,Dn=a[ar];return y=!Dn||Dn.type==="first",Dn&&(Ln=Dn.mode==="text",E=!Ln&&Dn.type==="mord"&&me.test(Dn.value),ee=!Ln&&Dn.type==="mord"&&/\d+$/.test(Dn.value),re=!Ln&&Dn.isFunction,ae=Dn.type==="genfrac",de=Dn.type==="surd",ve=Dn.type==="mbin",Se=Dn.type==="mrel",De=Dn.type==="mop"||Dn.type==="operator"||Dn.type==="extensible-symbol",ze=Dn.type==="mpunct"||Dn.type==="minner",at=Dn.type==="array",Et=Dn.type==="mopen",Ot=Dn.type==="mclose"||Dn.type==="leftright",kr=Dn.type==="space"),b.after.includes("nothing")&&y||b.after.includes("letter")&&E||b.after.includes("digit")&&ee||b.after.includes("function")&&re||b.after.includes("frac")&&ae||b.after.includes("surd")&&de||b.after.includes("binop")&&ve||b.after.includes("relop")&&Se||b.after.includes("operator")&&De||b.after.includes("punct")&&ze||b.after.includes("array")&&at||b.after.includes("openfence")&&Et||b.after.includes("closefence")&&Ot||b.after.includes("text")&&Ln||b.after.includes("space")&&kr?b.value:""}function wd(a,b,y){return y?df(a,y[b]):""}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 Cc(a,b){var y;let E=(y=b==null?void 0:b.format)!=null?y:"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",hl(a,{inlineShortcuts:b==null?void 0:b.inlineShortcuts})]):["latex",a]}function hl(a,b){var y,E,ee;if(!a)return"";let re=!1,ae;const de=(y=b.inlineShortcuts)!=null?y:ff;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=Cu(a.slice(1),{inlineShortcuts:de,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=hl(ae.rest,b),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=Cu(ae[2],{inlineShortcuts:de,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=hl(ae.rest,b),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=Cu(ae[2],{inlineShortcuts:de,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=hl(ae.rest,b),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=Cu(ae[1],{inlineShortcuts:de,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=hl(ae.rest,b),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=hl(ae[2],b),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hf(ae[1],de),a+=hl(ae[2],b),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=Cu(a.slice(1),{inlineShortcuts:de,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=hl(ae.rest,b),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hf(ae[1],de),a+=hl(ae[2],b),re=!0)),!re)if(ae=Cu(a,{inlineShortcuts:de,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const ve=Cu(ae.rest.slice(1),{inlineShortcuts:de,noWrap:!0});ve.match&&(a="\\frac{"+ae.match+"}{"+ve.match+"}"+hl(ve.rest,b)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+hl(ae.rest,b):ae.match+hl(ae.rest,b),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+hl(ae[2],b),re=!0)),a}function Cu(a,b){let y="";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?(b.noWrap&&ee==="("?y=hl(a.substring(1,de-1),b):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),y="\\left"+ee+hl(a.substring(1,de-1),b)+"\\right"+re),E=a.slice(Math.max(0,de))):(y=a.substring(1,de),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let de=wd(null,a,b.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),y=ae[1]))}return{match:y,rest:E}}function hf(a,b){let y=wd(null,a,b);return y?(y=y.replace("_{#?}",""),y=y.replace("^{#?}",""),y+=" "):y=a,y}var Cd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Eu(a){const b=a.trim();for(const y of Cd)if(b.startsWith(y[0])&&b.endsWith(y[1]))return[!0,b.substring(y[0].length,b.length-y[1].length)];return[!1,a]}function pf(a){if(a=a.trim(),a.length<=1)return["latex",a];let b;return[b,a]=Eu(a),b?["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 Vc="$$",oh="$$",sh=(a,b,y)=>(Cd.some(E=>b.startsWith(E[0])&&b.endsWith(E[1]))||(b=`${Vc} ${b} ${oh}`),b),mf=class Qf{constructor(b){Qf._modes[b]=this}static onPaste(b,y,E){var ee;if(!y.contentEditable&&y.userSelect==="none")return y.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=y.host)!=null&&ee.dispatchEvent(re)?Qf._modes[b].onPaste(y,E):!1}static copyToClipboard(b,y){if(!b.contentEditable&&b.userSelect==="none"){b.model.announce("plonk");return}const E=b.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:sl(E.selection),re=E.getValue(ee,y);navigator.clipboard.writeText(re).then(()=>{},()=>b.model.announce("plonk"))}static onCopy(b,y){var E;if(!y.clipboardData)return;if(!b.contentEditable&&b.userSelect==="none"){b.model.announce("plonk");return}const ee=b.model,re=ee.selectionIsCollapsed?[0,ee.lastOffset]:sl(ee.selection);let ae=ee.getAtoms(re);if(ae.every(de=>de.mode==="text"||!de.mode))y.clipboardData.setData("text/plain",ae.filter(de=>de instanceof du).map(de=>de.value).join(""));else if(ae.every(de=>de.mode==="latex"))y.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(de=>{var ve;return(ve=de.value)!=null?ve:""}).join(""));else{let de;ae.length===1&&ae[0].verbatimLatex!==void 0?de=ae[0].verbatimLatex:de=ee.getValue(re,"latex-expanded"),y.clipboardData.setData("application/x-latex",de);try{y.clipboardData.setData("text/plain",b.options.onExport(b,de,re))}catch(ve){}if(ae.length===1){const ve=ae[0];(ve.type==="root"||ve.type==="group")&&(ae=ve.body.filter(Se=>Se.type!=="first"))}try{y.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(ve=>ve.toJson())))}catch(ve){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const ve=window.MathfieldElement.computeEngine;if(ve)try{const Se=ve.jsonSerializationOptions;ve.jsonSerializationOptions={metadata:["latex"]};const De=ve.parse(ee.getValue(re,"latex-unstyled"));ve.jsonSerializationOptions=Se;const ze=JSON.stringify(De.json);ze&&y.clipboardData.setData("application/json",ze)}catch(Se){}}}y.preventDefault()}static insert(b,y,E={}){var ee;const re=E.mode==="auto"?b.mode:(ee=E.mode)!=null?ee:b.mode;return Qf._modes[re].insert(b,y,E)}onPaste(b,y){return!1}insert(b,y,E){return!1}};mf._modes={};var Wa=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","^"]}],Ed={"\\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 Zl(a){var b;return((b=a.element)==null?void 0:b.mathfield)===a}function Vl(a){var b,y;return(y=(b=a.querySelector(".ML__caret"))!=null?b:a.querySelector(".ML__text-caret"))!=null?y:a.querySelector(".ML__latex-caret")}function Mu(a){const b=Vl(a);if(!b)return null;const y=b.getBoundingClientRect();return{x:y.right,y:y.bottom,height:y.height}}function Md(a){var b;if(!a.parent)return"root";let y=(b=a.parent.id)!=null?b:"";return y+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,y}function _d(a,b,y){if(!b)return null;const E=a.field.getBoundingClientRect(),ee=b.right-b.left,re=b.bottom-b.top,ae=Math.ceil(b.left-E.left+a.field.scrollLeft*y),de=Math.ceil(b.top-E.top);return{left:ae,right:ae+ee,top:de,bottom:de+re}}function kd(a){const b=a.getBoundingClientRect(),y=parseInt(getComputedStyle(a).marginRight),E={top:b.top-1,bottom:b.bottom,left:b.left,right:b.right-1+y};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=kd(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 ac(a,b){var y,E;if(!b.id)return null;let ee=(E=(y=a.atomBoundsCache)==null?void 0:y.get(b.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${b.id}"]`);return ee=re?kd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(b.id,ee):a.atomBoundsCache.delete(b.id)),ee!=null?ee:null}function vf(a,b,y){const E=new Map;for(const ee of a.model.getAtoms(b,{includeChildren:!0})){if(y!=null&&y.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let ve=Math.floor(re.getBoundingClientRect().width)/ae;ve=isNaN(ve)?1:ve;const Se=_d(a,ac(a,ee),ve);if(Se){const De=Md(ee);if(E.has(De)){const ze=E.get(De);E.set(De,{left:Math.min(ze.left,Se.left),right:Math.max(ze.right,Se.right),top:Math.min(ze.top,Se.top),bottom:Math.max(ze.bottom,Se.bottom)})}else E.set(De,Se)}}return[...E.values()]}function Dd(a,b){return a.model.selection.ranges.reduce((y,E)=>y.concat(...vf(a,E,b)),[])}function Ld(a,b){return a==="*"||b==="none"?!0:b==="same-origin"?!window.origin||a===window.origin:typeof b=="function"?b(a):!1}function Uc(a){let b=0,y=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)b+=a.offsetTop,y+=a.offsetLeft,a=a.offsetParent;return new DOMRect(y,b,E,ee)}var gf=`@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;
}
`,rs=`.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);
}
`,bf=`#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;
}
`,oc=`/* 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));
}
`,jc=`: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;
}
`,ds;function Hu(a){let b="";switch(a){case"mathfield-element":b=`
: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":b=rs;break;case"mathfield":b=gf;break;case"environment-popover":b=bf;break;case"suggestion-popover":b=uh;break;case"keystroke-caption":b=oc;break;case"virtual-keyboard":b=ch;break;case"ui":b=jc;break;case"menu":b=dh;break;default:debugger}return b}function sc(a){return ds||(ds={}),ds[a]||(ds[a]=new CSSStyleSheet,ds[a].replaceSync(Hu(a))),ds[a]}var fu;function Fl(a){var b;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const y=window.document.createElement("style");y.id=`mathlive-style-${a}`,y.append(window.document.createTextNode(Hu(a))),window.document.head.appendChild(y);return}if(fu||(fu={}),((b=fu[a])!=null?b:0)!==0)fu[a]+=1;else{const y=sc(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,y],fu[a]=1}}function x(a){if("adoptedStyleSheets"in document&&fu!=null&&fu[a]&&(fu[a]-=1,fu[a]<=0)){const b=ds[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(y=>y!==b)}}var z=class kp extends Gn{constructor(b){var y;super(he(Ce({},b),{type:"accent",body:(y=b.body)!=null?y:void 0})),b.accentChar?this.accent=b.accentChar:this.svgAccent=b==null?void 0:b.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(b){return new kp(b)}toJson(){return he(Ce({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(b){var y;const E=new Io({parent:b,mathstyle:"cramp"},this.style),ee=(y=Gn.createBox(E,this.body))!=null?y:new Lr("\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,zl),de;if(this.svgAccent)de=Wl(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const Se=new Lr(this.accent,{fontFamily:"Main-Regular"});Se.italic=0;const De=this.accent===8407?" ML__accent-vec":"";de=new Lr(new Lr(Se),{classes:"ML__accent-body"+De})}de=new cs({shift:0,children:[{box:new Lr(ee)},-ae,{box:de,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const ve=new Lr(de,{type:"lift"});return this.caret&&(ve.caret=this.caret),this.bind(E,ve.wrap(E)),this.attachSupsub(E,{base:ve})}},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,b])=>[b,a]));function ie(a){var b;return(b={"[":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?b:a.codePointAt(0)}function ce(a,b,y,E){var ee;const ae=new Lr(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(b);return y&&ae.setTop((1-b.scalingFactor)*il),ae}function ye(a,b,y,E,ee){var re,ae;const de=new Io({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),ve=new Lr(ie(a),{fontFamily:`Size${b}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${b}`,type:(ae=ee.type)!=null?ae:"ignore"}).wrap(de);return y&&ve.setTop((1-de.scalingFactor)*il),ve}function Le(a,b,y,E,ee){var re;let ae,de,ve,Se;ae=ve=Se=ie(a),de=null;let De="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?ve=ae=Se=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?ve=ae=Se=8741:a==="\\uparrow"?ve=Se=9168:a==="\\Uparrow"?ve=Se=8214:a==="\\downarrow"?ae=ve=9168:a==="\\Downarrow"?ae=ve=8214:a==="\\updownarrow"?(ae=8593,ve=9168,Se=8595):a==="\\Updownarrow"?(ae=8657,ve=8214,Se=8659):a==="["||a==="\\lbrack"?(ae=9121,ve=9122,Se=9123,De="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,ve=9125,Se=9126,De="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(ve=ae=9122,Se=9123,De="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,ve=Se=9122,De="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(ve=ae=9125,Se=9126,De="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,ve=Se=9125,De="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,ve=9116,Se=9117,De="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,ve=9119,Se=9120,De="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,de=9128,Se=9129,ve=9130,De="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,de=9132,Se=9133,ve=9130,De="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,Se=9129,ve=9130,De="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,Se=9133,ve=9130,De="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,Se=9133,ve=9130,De="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,Se=9129,ve=9130,De="Size4-Regular"):a==="\\surd"?(ae=57345,Se=9143,ve=57344,De="Size4-Regular"):a==="\\ulcorner"?(ae=9484,ve=Se=32):a==="\\urcorner"?(ae=9488,ve=Se=32):a==="\\llcorner"?(Se=9492,ve=ae=32):a==="\\lrcorner"&&(ae=9496,ve=ae=32);const ze=ws(ae,De),at=ze.height+ze.depth,Et=ws(ve,De),Ot=Et.height+Et.depth,Ln=ws(Se,De),kr=Ln.height+Ln.depth;let Dn=0,ar=1;if(de!==null){const dl=ws(de,De);Dn=dl.height+dl.depth,ar=2}const Pr=at+kr+Dn,fr=Math.max(0,Math.ceil((b-Pr)/(ar*Ot))),Si=Pr+fr*ar*Ot;let oa=il;y&&(oa=oa*E.scalingFactor);const zi=Si/2-oa,Bo=.008,is=[];is.push({box:new Lr(Se,{fontFamily:De})}),is.push(-Bo);const Vr=new Lr(ve,{fontFamily:De});if(de===null)for(let dl=0;dl<fr;dl++)is.push({box:Vr});else{for(let dl=0;dl<fr;dl++)is.push({box:Vr});is.push(-Bo),is.push({box:new Lr(de,{fontFamily:De})}),is.push(-Bo);for(let dl=0;dl<fr;dl++)is.push({box:Vr})}is.push(-Bo),is.push({box:new Lr(ae,{fontFamily:De})});let Gl="";De==="Size1-Regular"?Gl=" delim-size1":De==="Size4-Regular"&&(Gl=" delim-size4");const Pu=new cs({bottom:zi,children:is},{classes:Gl});return new Lr(Pu,he(Ce({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Ne=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),$e=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),wt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Nt=[0,1.2,1.8,2.4,3];function gn(a,b,y,E){return a===void 0||a==="."?xi(y,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Ne.has(a)||wt.has(a)?ye(a,b,!1,y,E):$e.has(a)?Le(a,Nt[b],!1,y,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var un=[{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}],Jn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],gr=[{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 Hr(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function ti(a,b,y,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<y.length&&y[re].type!=="stack";re++){const ae=ws(a,Hr(y[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let de=ae.height+ae.depth;if(y[re].type==="small"&&(y[re].mathstyle==="scriptscriptstyle"?de*=Math.max(gu[Math.max(1,E.size-2)],E.minFontScale):y[re].mathstyle==="scriptstyle"&&(de*=Math.max(gu[Math.max(1,E.size-1)],E.minFontScale))),de>b)return y[re]}return y[y.length-1]}function fi(a,b,y,E,ee,re){if(!b||b.length===0||b===".")return xi(ee);b==="<"||b==="\\lt"?b="\\langle":(b===">"||b==="\\gt")&&(b="\\rangle");let ae;wt.has(b)?ae=un:Ne.has(b)?ae=gr:ae=Jn;const de=ti(ie(b),y,ae,ee),ve=new Io({parent:ee,mathstyle:de.mathstyle},re==null?void 0:re.style);return de.type==="small"?ce(b,ve,E,he(Ce({},re),{type:a})):de.type==="large"?ye(b,de.size,E,ve,he(Ce({},re),{type:a})):(console.assert(de.type==="stack"),Le(b,y,E,ve,he(Ce({},re),{type:a})))}function Xr(a,b,y,E,ee,re){if(b===".")return xi(ee,re==null?void 0:re.classes);const ae=il*ee.scalingFactor,de=901,ve=5/su,Se=Math.max(y-ae,E+ae),De=Math.max(Se/500*de,2*Se-ve);return fi(a,b,De,!0,ee,re)}function xi(a,b){const y=new Lr(null,{classes:" nulldelimiter "+(b!=null?b:""),type:"ignore"});return y.width=a.getRegisterAsEm("nulldelimiterspace"),y.wrap(new Io({parent:a,mathstyle:"textstyle"}))}var da=class Dp extends Gn{constructor(b){var y;super({type:"placeholder",command:"\\placeholder",mode:(y=b==null?void 0:b.mode)!=null?y:"math",style:b==null?void 0:b.style}),this.captureSelection=!0}static fromJson(b){return new Dp(b)}toJson(){return super.toJson()}render(b){let y;return this.value=b.placeholderSymbol,typeof b.renderPlaceholder=="function"?y=b.renderPlaceholder(b):y=this.createBox(b),this.caret&&(y.classes+=" ML__placeholder-selected"),y}_serialize(b){return b.skipPlaceholders?"":"\\placeholder{}"}},ya=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],xo=["cases","dcases","rcases"],fs=["align","align*","aligned","gather","gathered","split"],nl=["array","subequations","eqnarray"];function Ls(a){return nl.concat(fs).concat(xo).concat(ya).includes(a)}function Sl(a){return ya.includes(a)}function wl(a){return xo.includes(a)}function Xs(a){return fs.includes(a)}function Cl(a,b,y){let E=0;for(const Se of y)"align"in Se&&(E+=1);let ee=0;const re=[];for(const Se of b){let De=0;for(ee=Math.max(ee,Math.min(Se.length,E));De<Se.length;){const ze=[],at=Math.min(Se.length,De+E);for(;De<at;){const Et=Se[De];Et.length===0?ze.push([new Gn({type:"first",mode:a.mode})]):Et[0].type!=="first"?ze.push([new Gn({type:"first",mode:a.mode}),...Et]):(console.assert(!Et.slice(1).some(Ot=>Ot.type==="first")),ze.push(Et)),De+=1}re.push(ze)}}re.length>0&&re[re.length-1].length===1&&re[re.length-1][0].length===1&&re[re.length-1][0][0].type==="first"&&re.pop();const ae=[];for(const Se of re){if(Se.length!==ee)for(let De=Se.length;De<ee;De++)Se.push([new Gn({type:"first",mode:a.mode}),new da]);ae.push(Se)}let de=0,ve=0;for(const Se of ae){ve=0;for(const De of Se){for(const ze of De)ze.parent=a,ze.parentBranch=[de,ve];ve+=1}de+=1}return a.isDirty=!0,ae}var Xa=class Lp extends Gn{constructor(b,y,E,ee={}){var re;super({type:"array"}),this.environmentName=b,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=Cl(this,y,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(b){return new Lp(b.environmentName,b.array,b.rowGaps,b)}toJson(){const b=he(Ce({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(y=>y.map(E=>E.map(ee=>ee.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(b.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(b.arraycolsep=this.arraycolsep),this.leftDelim&&(b.leftDelim=this.leftDelim),this.rightDelim&&(b.rightDelim=this.rightDelim),b}branch(b){var y;if(Sc(b))return(y=this.array[b[0]][b[1]])!=null?y:void 0}createBranch(b){var y;return Sc(b)?(this.isDirty=!0,(y=this.branch(b))!=null?y:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(b=>!!b.align).length}removeBranch(b){if(cu(b))return super.removeBranch(b);const y=this.branch(b);return this.array[b[0]][b[1]]=void 0,y.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(y[0].type==="first"),y.shift(),this.isDirty=!0,y}get hasChildren(){return this.children.length>0}get children(){const b=[];for(const y of this.array)for(const E of y)if(E)for(const ee of E)b.push(...ee.children),b.push(ee);return[...b,...super.children]}render(b){var y,E,ee,re,ae,de;const ve=new Io({parent:b,mathstyle:this.mathstyleName},this.style),Se=ve.getRegisterAsEm("arrayrulewidth"),De=ve.getRegisterAsEm("arraycolsep"),ze=ve.getRegisterAsEm("doublerulesep"),at=(E=(y=this.arraystretch)!=null?y:ve.getRegisterAsNumber("arraystretch"))!=null?E:1;let Et=typeof this.arraycolsep=="number"?this.arraycolsep:De;this.colSeparationType==="small"&&(Et=.2778*(new Io({parent:b,mathstyle:"scriptstyle"}).scalingFactor/b.scalingFactor));const Ot=at*Yu,Ln=.7*Ot,kr=.3*Ot;let Dn=0;const ar=[];let Pr=0;const fr=this.array.length;for(let ps=0;ps<fr;++ps){const Vs=this.array[ps];Pr=Math.max(Pr,Vs.length);const fl=new Io({parent:ve,mathstyle:this.mathstyleName},this.style);let Ou=Ln/fl.scalingFactor,Bu=kr/fl.scalingFactor;const Nu={cells:[],height:0,depth:0,pos:0};for(const mu of Vs){const e0=(ee=Gn.createBox(fl,mu,{type:"ignore"}))!=null?ee:new Lr(null,{type:"ignore"});Bu=Math.max(Bu,e0.depth),Ou=Math.max(Ou,e0.height),Nu.cells.push(e0)}let Ru=(re=bd(this.rowGaps[ps]))!=null?re:0;Ru>0&&(Ru+=kr,Bu=Math.max(Bu,Ru),Ru=0),ps<fr-1&&!Sl(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Bu+=ve.getRegisterAsEm("jot")),Nu.height=Ou,Nu.depth=Bu,Dn+=Ou,Nu.pos=Dn,Dn+=Bu+Ru,ar.push(Nu)}const Si=Dn/2+il,oa=[];for(let ps=0;ps<Pr;ps++){const Vs=[];for(const fl of ar){const Ou=fl.cells[ps];Ou.depth=fl.depth,Ou.height=fl.height,Vs.push({box:Ou,shift:fl.pos-Si})}Vs.length>0&&oa.push(new cs({individualShift:Vs}))}const zi=[];let Bo=!1,is=!1,Vr=0,Gl=!this.leftDelim;const{colFormat:Pu}=this;for(const ps of Pu){if("align"in ps&&Vr>=oa.length)break;if("align"in ps)Bo?zi.push(As(2*Et)):(is||Gl)&&zi.push(As(Et)),zi.push(new Lr(oa[Vr],{classes:"col-align-"+ps.align})),Vr++,Bo=!0,is=!1,Gl=!1;else if("gap"in ps){if(typeof ps.gap=="number")zi.push(As(ps.gap));else{const Vs=Bs(b,ar,Si,ps.gap);Vs&&zi.push(Vs)}Bo=!1,is=!1,Gl=!1}else if("separator"in ps){const Vs=new Lr(null,{classes:"vertical-separator"});Vs.height=Dn,Vs.setStyle("height",Dn,"em"),Vs.setStyle("border-right",`${Se}em ${ps.separator} currentColor`),Vs.setStyle("vertical-align",-(Dn-Si),"em");let fl=0;is?fl=ze-Se:Bo&&(fl=Et-Se),Vs.left=fl,zi.push(Vs),Bo=!1,is=!0,Gl=!1}}Bo&&!this.rightDelim&&zi.push(As(Et));const nu=new Lr(zi,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(nu.caret=this.caret),this.bind(b,nu);const dl=nu.height,Xl=nu.depth,Pl=this.bind(b,new Lr([this.bind(b,Xr("open",(ae=this.leftDelim)!=null?ae:".",dl,Xl,ve,{isSelected:this.isSelected})),nu,this.bind(b,Xr("close",(de=this.rightDelim)!=null?de:".",dl,Xl,ve,{isSelected:this.isSelected}))],{type:"ord"}));return Pl?(Pl.setStyle("display","inline-block"),this.caret&&(Pl.caret=this.caret),this.bind(b,this.attachSupsub(b,{base:Pl}))):null}_serialize(b){var y;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(Gn.serialize(this.array[ee][re],b));if(ee<this.array.length-1){const re=this.rowGaps[ee];re!=null&&re.dimension?E.push(`\\\\[${re.dimension} ${(y=re.unit)!=null?y:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),yo(E)}getCell(b,y){return this.array[b][y]}setCell(b,y,E){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[b][y]!==void 0);for(const re of this.array[b][y])re.parent=void 0,re.parentBranch=void 0;let ee=E;(E.length===0||E[0].type!=="first")&&(ee=[new Gn({type:"first",mode:this.mode}),...E]),this.array[b][y]=ee;for(const re of ee)re.parent=this,re.parentBranch=[b,y];this.isDirty=!0}addRowBefore(b){console.assert(this.type==="array"&&Array.isArray(this.array));const y=[];for(let E=0;E<this.colCount;E++)y.push(Os(this));this.array.splice(b,0,y);for(let E=b;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(b){console.assert(this.type==="array"&&Array.isArray(this.array));const y=[];for(let E=0;E<this.colCount;E++)y.push(Os(this));this.array.splice(b+1,0,y);for(let E=b+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(b){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>b);const y=this.array.splice(b,1);for(const E of y)for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0;for(let E=b;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(b){console.assert(this.type==="array"&&Array.isArray(this.array));for(const y of this.array)y.splice(b,0,Os(this));for(let y=0;y<this.rowCount;y++)for(let E=b;E<this.colCount;E++){const ee=this.array[y][E];if(ee)for(const re of ee)re.parentBranch=[y,E]}this.isDirty=!0}addColumnAfter(b){console.assert(this.type==="array"&&Array.isArray(this.array));for(const y of this.array)y.splice(b+1,0,Os(this));for(let y=0;y<this.rowCount;y++)for(let E=b+1;E<this.colCount;E++){const ee=this.array[y][E];if(ee)for(const re of ee)re.parentBranch=[y,E]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(b){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>b);for(const y of this.array){const E=y.splice(b,1);for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0}for(let y=0;y<this.rowCount;y++)for(let E=b;E<this.colCount;E++){const ee=this.array[y][E];if(ee)for(const re of ee)re.parentBranch=[y,E]}this.isDirty=!0}get cells(){const b=[];for(const y of this.array)for(const E of y)E&&b.push(E.filter(ee=>ee.type!=="first"));return b}};function Os(a){const b=new Gn({type:"first",mode:a.mode});b.parent=a;const y=new da;return y.parent=a,[b,y]}function As(a){const b=new Lr(null,{classes:"arraycolsep"});return b.width=a,b}function Bs(a,b,y,E){if(!E)return null;const ee=[];for(const re of b){const ae=Gn.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-y}))}return new cs({individualShift:ee}).wrap(a)}var Ws=class Ap extends Gn{constructor(b){super({mode:b.mode,command:b.command,style:b.style,body:b.body,type:"box"}),this.framecolor=b.framecolor,this.backgroundcolor=b.backgroundcolor,this.padding=b.padding,this.offset=b.offset,this.border=b.border}static fromJson(b){return new Ap(b)}toJson(){return he(Ce({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(b){var y,E,ee,re;const ae=Gn.createBox(b,this.body,{type:"lift"});if(!ae)return null;const de=b.toEm((y=this.offset)!=null?y:{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 ve=new Io({parent:b},this.style),Se=ve.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),De=new Lr(null,{classes:"ML__box"});De.height=ae.height+Se,De.depth=ae.depth+Se,De.setStyle("box-sizing","border-box"),De.setStyle("position","absolute"),De.setStyle("top",-Se+.3,"em"),De.setStyle("left",0),De.setStyle("height",De.height+De.depth,"em"),De.setStyle("width","100%"),this.backgroundcolor&&De.setStyle("background-color",(ee=ve.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&De.setStyle("border",`${ve.getRegisterAsEm("fboxrule",2)}em solid ${(re=ve.toColor(this.framecolor))!=null?re:"black"}`),this.border&&De.setStyle("border",this.border);const ze=new Lr([De,ae],{type:"lift"});return ze.setStyle("display","inline-block"),ze.setStyle("position","relative"),ze.setStyle("line-height",0),ze.height=ae.height+Se+(de>0?de:0),ze.depth=ae.depth+Se+(de<0?-de:0),ze.setStyle("padding-left",Se,"em"),ze.setStyle("padding-right",Se,"em"),ze.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*Se+Math.abs(de)))/100,"em"),ze.setStyle("margin-top",-Se,"em"),ze.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*Se-de))/100,"em"),ze.setStyle("vertical-align",Math.floor(100*(ae.depth+2*Se))/100,"em"),this.caret&&(ze.caret=this.caret),this.attachSupsub(b,{base:ze})}_serialize(b){return b.skipStyles?yo([this.bodyToLatex(b),this.supsubToLatex(b)]):super._serialize(b)}},Wu=class Tp extends Gn{constructor(b,y){var E;super({type:"composition",mode:(E=y==null?void 0:y.mode)!=null?E:"math",value:b})}static fromJson(b){return new Tp(b.value,b)}toJson(){return super.toJson()}get computedStyle(){return{}}render(b){const y=new Lr(this.value,{classes:"ML__composition",type:"composition"});return this.bind(b,y),this.caret&&(y.caret=this.caret),y}_serialize(b){return""}},_l=class Ip extends Gn{constructor(b){super({type:"error",value:b,command:b,mode:"math"}),this.verbatimLatex=b}static fromJson(b){return new Ip(b.command)}toJson(){return super.toJson()}render(b){const y=this.createBox(b,{classes:"ML__error"});return this.caret&&(y.caret=this.caret),y}},ll=class Pp extends Gn{constructor(b,y,E){super({type:"group",mode:y,style:E}),this.body=b,this.boxType=b.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,b&&b.length===1&&b[0].command===","&&(this.captureSelection=!0)}static fromJson(b){return new Pp(b.body,b.mode,b.style)}render(b){const y=Gn.createBox(b,this.body,{type:this.boxType});return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):`{${this.bodyToLatex(b)}}`}},Zo=class Op extends Gn{constructor(b,y,E){super({type:"leftright",style:E.style,displayContainsHighlight:!0}),this.variant=b,this.body=y,this.leftDelim=E.leftDelim,this.rightDelim=E.rightDelim}static fromJson(b){var y;return new Op((y=b.variant)!=null?y:"",b.body,b)}toJson(){const b=super.toJson();return this.variant&&(b.variant=this.variant),this.leftDelim&&(b.leftDelim=this.leftDelim),this.rightDelim&&(b.rightDelim=this.rightDelim),b}_serialize(b){var y,E;const ee=this.matchingRightDelim();return this.variant==="left...right"?yo(["\\left",(y=this.leftDelim)!=null?y:".",this.bodyToLatex(b),"\\right",ee]):this.variant==="mleft...mright"?yo(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(b),"\\mright",ee]):yo([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(b),ee])}matchingRightDelim(){var b,y;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(b=this.leftDelim)!=null?b:".";return(y=ne[E])!=null?y:E}render(b){var y,E;const ee=new Io({parent:b},this.style);console.assert(this.body!==void 0);const re=new Io({parent:b,mathstyle:"textstyle"},this.style),ae=(y=Gn.createBox(ee,this.body,{type:"inner"}))!=null?y:new Lr(null,{type:"inner"}),de=ae.height/re.scalingFactor,ve=ae.depth/re.scalingFactor,Se=[];if(this.leftDelim&&Se.push(this.bind(re,Xr("open",this.leftDelim,de,ve,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&(Js(ae.children,this,ee,de,ve),Se.push(ae)),this.rightDelim){let Et=this.containsCaret?" ML__contains-caret":"",Ot=this.rightDelim;Ot==="?"&&(ee.smartFence?(Ot=this.matchingRightDelim(),Et+=" ML__smart-fence__close"):Ot="."),Se.push(this.bind(re,Xr("close",Ot,de,ve,re,{isSelected:this.isSelected,classes:Et+" ML__close",mode:this.mode,style:this.style})))}let De=this.variant==="mleft...mright";const ze=this.leftSibling;ze&&(!De&&ze.isFunction&&(De=!0),!De&&ze.type==="subsup"&&((E=ze.leftSibling)!=null&&E.isFunction)&&(De=!0));const at=new Lr(Se,{type:De?"close":"inner",classes:"left-right"});return at.setStyle("margin-top",`${-ae.depth}em`),at.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(at.caret=this.caret),this.bind(ee,at.wrap(ee))}};function Js(a,b,y,E,ee){if(a)for(let re=0;re<a.length;re++){const ae=a[re];ae.type==="middle"?(a[re]=b.bind(y,Xr("inner",ae.value,E,ee,y,{isSelected:b.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&&Js(ae.children,b,y,E,ee)}}var Gc=class Bp extends Gn{constructor(b,y){var E;super({type:"macro",command:b,style:y.style}),this.body=y.body,y.captureSelection===void 0?y.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=y.captureSelection,this.macroArgs=y.args,this.expand=(E=y.expand)!=null?E:!1}static fromJson(b){return new Bp(b.command,b)}toJson(){const b=super.toJson();return this.expand&&(b.expand=!0),this.captureSelection!==void 0&&(b.captureSelection=this.captureSelection),this.macroArgs&&(b.args=this.macroArgs),b}_serialize(b){var y;return b.expandMacro&&this.expand?this.bodyToLatex(b):this.command+((y=this.macroArgs)!=null?y:"")}render(b){const y=Gn.createBox(b,this.body);return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}},hu=class Np extends Gn{constructor(){super({type:"macro-argument"})}static fromJson(b){return new Np}toJson(){return super.toJson()}_serialize(b){return""}render(b){return null}},_u=class Rp extends Gn{constructor(b,y,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=y,this.placeholderId=b,this.locked=E,this.captureSelection=this.locked}static fromJson(b){return new Rp(b.placeholderId,b.correctness,b.locked,b.body,b)}toJson(){const b=super.toJson();return this.placeholderId&&(b.placeholderId=this.placeholderId),this.body||delete b.body,this.body&&(b.body=this.body.filter(y=>y.type!=="first").map(y=>y.toJson())),this.correctness&&(b.correctness=this.correctness),b.locked=this.locked,b}render(b){const y=new Io({parent:b}),E=y.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Gn.createBox(b,this.body);if(!ae)return null;ae.height||(ae.height=y.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 Lr(ae,{type:"ord"});de.setStyle("display","inline-block"),de.setStyle("height",ae.height+ae.depth,"em"),de.setStyle("vertical-align",-re,"em");let ve="ML__prompt ";this.locked?ve+=" ML__lockedPromptBox ":ve+=" ML__editablePromptBox ",this.correctness==="correct"?ve+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(ve+=" ML__incorrectPromptBox "),this.containsCaret&&(ve+=" ML__focusedPromptBox ");const Se=new Lr(null,{classes:ve,attributes:{part:"prompt"}});Se.height=de.height+re,Se.depth=de.depth+re,Se.width=de.width+2*ee,Se.setStyle("box-sizing","border-box"),Se.setStyle("position","absolute"),Se.setStyle("height",de.height+de.depth+2*re,"em"),ee===0&&Se.setStyle("width","100%"),ee!==0&&(Se.setStyle("width",`calc(100% + ${2*ee}em)`),Se.setStyle("top",E,"em"),Se.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(Se.width=3*ee,Se.setStyle("width",`calc(100% + ${3*ee}em)`),Se.setStyle("left",-1.5*ee,"em"));let De="";this.correctness==="incorrect"&&(De+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),De&&(Se.svgOverlay=De);const ze=new Lr([Se,de],{classes:"ML__prompt-atom"});return ze.setStyle("position","relative"),ze.setStyle("display","inline-block"),ze.setStyle("line-height",0),ze.height=de.height+re+.2,ze.depth=de.depth+re,ze.left=ee,ze.right=ee,ze.setStyle("height",de.height+re,"em"),ze.setStyle("top",de.depth-de.height,"em"),ze.setStyle("vertical-align",de.depth+re,"em"),ze.setStyle("margin-left",.5,"em"),ze.setStyle("margin-right",.5,"em"),this.caret&&(ze.caret=this.caret),this.bind(y,this.attachSupsub(b,{base:ze}))}_serialize(b){var y;const E=(y=this.bodyToLatex(b))!=null?y:"";if(b.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]"),bs(ee,E)}},Ql=class Fp extends Gn{constructor(b){super({type:"subsup",style:b==null?void 0:b.style}),this.subsupPlacement="auto"}static fromJson(b){const y=new Fp(b);for(const E of ic)b[E]&&y.setChildren(b[E],E);return y}render(b){var y;const E=new Io({parent:b,isPhantom:!0}),ee=this.leftSibling,re=(y=ee.render(E))!=null?y:new Lr(null),ae=new Lr(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(b,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(b){return this.supsubToLatex(b)}};function Ys(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Zu=class{constructor(a,b,y){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,ae;y!=null||(y={}),this.tokens=a,this.context=b instanceof Io&&!(y!=null&&y.parseMode)&&!y.mathstyle?b:new Io({from:b,mathstyle:y.mathstyle},y.style),this.args=(E=y.args)!=null?E:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(ee=y.style)!=null?ee:{},parseMode:(re=y.parseMode)!=null?re:"math",mathstyle:(ae=y.mathstyle)!=null?ae:"displaystyle",tabular:!1}}beginContext(a){var b,y,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:Ce({},ee.style),parseMode:(b=a==null?void 0:a.mode)!=null?b:ee.parseMode,mathstyle:(y=a==null?void 0:a.mathstyle)!=null?y: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(Ce({before:xu(this.tokens.slice(this.index,this.index+10)),after:xu(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 Ce({},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 Ql({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:b}=this;if(b<this.tokens.length&&this.tokens[b].startsWith("\\")){const y=Tr(this.tokens[b],this.parseMode);return!y||y.definitionType==="symbol"||y.ifMode&&!y.ifMode.includes(this.parseMode)?!1:(a=y.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 b=(a=this.args)==null?void 0:a.call(this,"?");return b?ul(b,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new da({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let b=this.tokens[this.index];for(;b&&b!==a;)b=this.tokens[++this.index];b===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const b=this.index;let y=this.end(),E="";for(;!y;){const re=this.get();Ys(re)?(E+=re,y=this.end()||E.length>=a.length):y=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=b),ee}scanString(){let a="";for(;!this.end();){const b=this.peek();if(b==="]")return a;if(b==="<space>")a+=" ";else if(b.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=b.substring(1);else if(Ys(b))a+=b;else return a;this.next()}return a}scanBalancedString(){let a="",b=this.end(),y=1;for(;!b;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",y+=1):E==="<}>"?(y-=1,y>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,b=y===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let b="",y=1;for(;y>0&&!this.end();){const E=this.get();E==="<}>"?(y-=1,y>0&&(b+="}")):E==="<{>"?(y+=1,b+="{"):(/\\[a-zA-Z]+$/.test(b)&&/^[a-zA-Z]/.test(E)&&(b+=" "),b+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return b}scanNumber(a=!0){var b,y;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)*((b=ee.codePointAt(1))!=null?b:0),base:"alpha"}:{number:(E?-1:1)*((y=ee.codePointAt(0))!=null?y: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 ve=a?Number.parseInt(de,re):Number.parseFloat(de);return Number.isNaN(ve)?null:{number:E?-ve:ve,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const b=this.index,y=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return y;let E=!1;if(y===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("\\")?y?{register:re,global:!0,factor:(E?-1:1)*y.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=b,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||y!==null?{register:ee,factor:(E?-1:1)*((a=y==null?void 0:y.number)!=null?a:1)}:{register:ee}:(this.index=b,null)):(this.index=b,null)}scanValue(){const a=this.scanRegister();if(a)return a;const b=this.index,y=this.scanGlueOrDimen();if(y&&("unit"in y||"glue"in y&&"unit"in y.glue))return y;this.index=b;const E=this.scanNumber();if(E)return E;if(this.end()||!Ys(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 b=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let y;return this.matchKeyword("pt")?y="pt":this.matchKeyword("mm")?y="mm":this.matchKeyword("cm")?y="cm":this.matchKeyword("ex")?y="ex":this.matchKeyword("px")?y="px":this.matchKeyword("em")?y="em":this.matchKeyword("bp")?y="bp":this.matchKeyword("dd")?y="dd":this.matchKeyword("pc")?y="pc":this.matchKeyword("in")?y="in":this.matchKeyword("mu")&&(y="mu"),y?{dimension:b,unit:y}:{dimension:b}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const b={glue:a};if(this.matchKeyword("plus")){const y=this.scanDimen();if(y)b.grow=y;else return b}if(this.skipWhitespace(),this.match("\\relax"))return b;if(this.skipWhitespace(),this.matchKeyword("minus")){const y=this.scanDimen();if(y)b.shrink=y;else return b}return!b.grow&&!b.shrink?a:b}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const b=this.get();b==="c"||b==="r"||b==="l"?a.push({align:b}):b==="|"?a.push({separator:"solid"}):b===":"?a.push({separator:"dashed"}):b==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(y=>y==="<}>")}),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 b=this.scan(y=>y===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),b}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const b=this.scan(y=>y===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),b}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const b=Pt(a);if(!b)return this.onError({code:"unknown-environment",arg:a}),null;const y=[];if(b.params)for(const de of b.params)if(de.isOptional)y.push(this.scanOptionalArgument(de.type));else{const ve=this.scanArgument(de.type);ve||this.onError({code:"missing-argument",arg:a}),y.push(ve)}this.beginContext({tabular:b.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(),b.createAtom(a,E,ee,y)}scanExpression(){const a=this.mathlist;if(this.mathlist=[],this.parseExpression()){const b=this.mathlist;return this.mathlist=a,b}return this.mathlist=a,null}scan(a){this.beginContext(),a||(a=ae=>ae==="<}>");let b="",y=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!b?(b=this.get(),y=Tr(b,"math"),y&&(E=this.scanArguments(y)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return b?(console.assert(!!y),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[y.createAtom({command:b,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 b=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const y=new ll(b,this.parseMode,this.style);return y.verbatimLatex=xu(this.tokens.slice(a,this.index)),y}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 b=new Zo("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),b}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Ys(a)&&!a.startsWith("\\"))return null;this.next();const b=Tr(a,"math");return b?b.definitionType==="function"&&b.ifMode&&!b.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):b.definitionType==="symbol"&&(b.type==="mopen"||b.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 _l("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new _l("\\mright");let b="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;b="\\mright"}const y=this.scanDelim();if(!y)return this.onError({code:"unexpected-delimiter"}),new _l(b==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(b);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Zo(b==="\\right"?"left...right":"mleft...mright",E,{leftDelim:y,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const b=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?b.addChild(new Gn({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):b.addChild(new Gn({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&b.addChildren(mt(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),b=!a&&this.match("\\nolimits"),y=!b&&!a&&this.match("\\displaylimits");if(!a&&!b&&!y)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"),b&&(E.subsupPlacement="adjacent"),y&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let b;const y=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?y.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?y.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?b=ee.type.slice(0,-1):y.push(this.scanArgument(ee.type)),E+=1}return[b,y]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let b;if(Ys(a)){const y=Tl.createAtom(this.parseMode,a,Ce({},this.style));return y?[y]:null}if(b=this.scanMacro(a),b)return[b];if(a.startsWith("\\")){const y=Tr(a,this.parseMode);if(!y)return this.onError({code:"unknown-command",arg:a}),[new _l(a)];if(y.definitionType==="symbol"){const E=Ce({},this.style);y.variant&&(E.variant=y.variant),b=new Gn({type:y.type,command:a,style:E,value:String.fromCodePoint(y.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(y.applyMode||y.applyStyle||y.infix)return this.onError({code:"invalid-command",arg:a}),[new _l(a)];y.createAtom&&(b=y.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return b?[b]:null}scanArgument(a){var b;this.skipFiller();const y=this.parseMode;if(a==="auto"&&(a=y),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(b=this.scanDelim())!=null?b:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==y&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==y&&this.endContext(),ee}if(a==="text"){a!==y&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==y&&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 b=null;for(;!this.end()&&!this.match("]");)if(a==="string")b=this.scanString();else if(a==="value")b=this.scanValue();else if(a==="colspec")b=this.scanColspec();else if(a==="bbox"){const y={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)y.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?y.border=ae[1]:y.backgroundcolor={string:ee}}}b=y}else a==="math"&&(this.beginContext({mode:"math"}),b=this.mathlist.concat(this.scan(y=>y==="]")),this.endContext());return b}scanSymbolOrCommand(a){var b,y,E;if(a==="\\placeholder"){const de=this.scanOptionalArgument("string"),ve=this.scanOptionalArgument("math"),Se=Gn.serialize(ve,{defaultMode:"math"});let De=[],ze;!ze&&Se==="correct"?ze="correct":!ze&&Se==="incorrect"?ze="incorrect":Se!==""&&(De=ve);const at=this.scanOptionalArgument("string")==="locked",Et=this.scanArgument("auto");let Ot;return Et&&Array.isArray(Et)&&Et.length>0?Ot=Et:Et&&typeof Et=="object"&&"group"in Et?Ot=Et.group:Ot=De,de?[new _u(de,ze,at,Ot!=null?Ot:De,{mode:this.parseMode,style:this.style})]:[new da({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const de=this.index,ve=this.scanLiteralGroup()||this.next();if(!ve)return null;if(this.context.registers[ve.substring(1)]){const Se=this.scanArgument("string");Se!==null&&(this.context.registers[ve.substring(1)]=Se);const De=yo([a,xu(this.tokens.slice(de,this.index))]);return[new Gn({type:"text",value:"",verbatimLatex:De})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=Tr(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((b=this.peek())!=null?b:"")&&(a+=" "),[...a].map(de=>new Gn({type:"text",value:de,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new _l(a)]);const ae=this.index;if(re.definitionType==="symbol"){const de=Ce({},this.style);re.variant&&(de.variant=re.variant),ee=new Gn({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 ve,Se=[];if(re.parse?Se=re.parse(this):[ve,Se]=this.scanArguments(re),this.parseMode=de,re.applyMode&&!re.applyStyle&&!re.createAtom)return mt(Se[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:Se,style:this.style,mode:this.parseMode}),ve&&(ee.body=mt(this.scanArgument(ve)));else if(typeof re.applyStyle=="function"){const De=Ce(Ce({},this.style),re.applyStyle(a,Se,this.context)),ze=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),ve){const at=this.style;this.style=De;const Et=this.scanArgument(ve);return this.style=at,this.parseMode=ze,mt(Et)}this.style=De}else ee=new Gn({type:"mord",command:(y=re.command)!=null?y:a,style:Ce({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof Gn&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const de=yo([a,xu(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(Ys(a)){const b=Tl.createAtom(this.parseMode,a,Ce({},this.style));if(!b)return null;if(b.isFunction&&this.smartFence){const y=this.scanSmartFence();if(y)return[b,y]}return[b]}return a.startsWith("\\")?this.scanSymbolOrCommand(a):a==="<space>"?this.parseMode==="text"?[new du(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var b;const y=this.context.getMacro(a);if(!y)return null;const E=this.index,ee=y.args,re={"?":(b=this.args)==null?void 0:b.call(this,"?")};for(let ae=1;ae<=ee;ae++){let de=this.scanLiteralGroup();if(!de){const ve=this.index;this.scanExpression(),de=xu(this.tokens.slice(ve,this.index))}re[ae]=de}return new Gc(a,{expand:y.expand,captureSelection:y.captureSelection,args:E===this.index?null:xu(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:ul(y.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,b,y,E;let ee=(E=(y=(b=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?b:this.scanModeSet())!=null?y: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 ul(a,b){var y,E,ee,re;const ae=(y=b==null?void 0:b.args)!=null?y:void 0,de=new Zu(lu(a,ae),b==null?void 0:b.context,{args:ae,mathstyle:(E=b==null?void 0:b.mathstyle)!=null?E:"displaystyle",parseMode:(ee=b==null?void 0:b.parseMode)!=null?ee:"math",style:(re=b==null?void 0:b.style)!=null?re:{}}),ve=[];for(;!de.end();)ve.push(...de.scan(()=>!1));return ve}function t0(a,b){var y;const E=new Zu(lu(a,null),b==null?void 0:b.context,{mathstyle:"displaystyle",parseMode:(y=b==null?void 0:b.parseMode)!=null?y:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class $p extends Gn{constructor(b,y){super({type:"chem"},{command:b,mode:"math"});const E=_s.go(xr.go(y,b==="\\pu"?"pu":"ce"),!1);this.body=ul(E),this._verbatimLatex=b+"{"+y+"}",this.arg=y,this.captureSelection=!0}static fromJson(b){return new $p(b.command,b.arg)}set verbatimLatex(b){}get verbatimLatex(){return this._verbatimLatex}toJson(){return he(Ce({},super.toJson()),{arg:this.arg})}render(b){const y=Gn.createBox(b,this.body,{type:"inner"});return this.caret&&(y.caret=this.caret),this.bind(b,y)}_serialize(b){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};Wt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var b;return new n0(a.command,(b=a.args[0])!=null?b:"")}});var xr={go:function(a,b){if(!a)return[];b===void 0&&(b="ce");var y="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=xr.stateMachines[b],ve=de.transitions[y]||de.transitions["*"];e:for(var Se=0;Se<ve.length;Se++){var De=xr.patterns.match_(ve[Se].pattern,a);if(De){for(var ze=ve[Se].task,at=0;at<ze.action_.length;at++){var Et;if(de.actions[ze.action_[at].type_])Et=de.actions[ze.action_[at].type_](E,De.match_,ze.action_[at].option);else if(xr.actions[ze.action_[at].type_])Et=xr.actions[ze.action_[at].type_](E,De.match_,ze.action_[at].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+ze.action_[at].type_+")"];xr.concatArray(ae,Et)}if(y=ze.nextState||y,a.length>0){if(ze.revisit||(a=De.remainder),!ze.toContinue)break e}else return ae}}if(re<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(a,b){if(b)if(Object.prototype.toString.call(b)==="[object Array]")for(var y=0;y<b.length;y++)a.push(b[y]);else a.push(b)},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 b=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 b&&b[0]?{match_:b.slice(1),remainder:a.substr(b[0].length)}:null},"(-)(9)^(-9)":function(a){var b=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return b&&b[0]?{match_:b.slice(1),remainder:a.substr(b[0].length)}:null},"state of aggregation $":function(a){var b=xr.patterns.findObserveGroups(a,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(b&&b.remainder.match(/^($|[\s,;\)\]\}])/))return b;var y=a.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return y?{match_:y[0],remainder:a.substr(y[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(a){return xr.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return xr.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return xr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return xr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return xr.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return xr.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return xr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return xr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return xr.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return xr.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return xr.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return xr.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return xr.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 xr.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return xr.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return xr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return xr.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 xr.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return xr.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return xr.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return xr.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return xr.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return xr.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return xr.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return xr.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 b;if(b=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))/),b)return{match_:b[0],remainder:a.substr(b[0].length)};var y=xr.patterns.findObserveGroups(a,"","$","$","");return y&&(b=y.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),b)?{match_:b[0],remainder:a.substr(b[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 b=a.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return b?{match_:b[0],remainder:a.substr(b[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(a,b,y,E,ee,re,ae,de,ve,Se){var De=function(Dn,ar){if(typeof ar=="string")return Dn.indexOf(ar)!==0?null:ar;var Pr=Dn.match(ar);return Pr?Pr[0]:null},ze=function(Dn,ar,Pr){for(var fr=0;ar<Dn.length;){var Si=Dn.charAt(ar),oa=De(Dn.substr(ar),Pr);if(oa!==null&&fr===0)return{endMatchBegin:ar,endMatchEnd:ar+oa.length};if(Si==="{")fr++;else if(Si==="}"){if(fr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];fr--}ar++}return fr>0,null},at=De(a,b);if(at===null||(a=a.substr(at.length),at=De(a,y),at===null))return null;var Et=ze(a,at.length,E||ee);if(Et===null)return null;var Ot=a.substring(0,E?Et.endMatchEnd:Et.endMatchBegin);if(re||ae){var Ln=this.findObserveGroups(a.substr(Et.endMatchEnd),re,ae,de,ve);if(Ln===null)return null;var kr=[Ot,Ln.match_];return{match_:Se?kr.join(""):kr,remainder:Ln.remainder}}else return{match_:Ot,remainder:a.substr(Et.endMatchEnd)}},match_:function(a,b){var y=xr.patterns.patterns[a];if(y===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof y=="function")return xr.patterns.patterns[a](b);var E=b.match(y);if(E){var ee;return E[2]?ee=[E[1],E[2]]:E[1]?ee=E[1]:ee=E[0],{match_:ee,remainder:b.substr(E[0].length)}}return null}},actions:{"a=":function(a,b){a.a=(a.a||"")+b},"b=":function(a,b){a.b=(a.b||"")+b},"p=":function(a,b){a.p=(a.p||"")+b},"o=":function(a,b){a.o=(a.o||"")+b},"q=":function(a,b){a.q=(a.q||"")+b},"d=":function(a,b){a.d=(a.d||"")+b},"rm=":function(a,b){a.rm=(a.rm||"")+b},"text=":function(a,b){a.text_=(a.text_||"")+b},insert:function(a,b,y){return{type_:y}},"insert+p1":function(a,b,y){return{type_:y,p1:b}},"insert+p1+p2":function(a,b,y){return{type_:y,p1:b[0],p2:b[1]}},copy:function(a,b){return b},rm:function(a,b){return{type_:"rm",p1:b||""}},text:function(a,b){return xr.go(b,"text")},"{text}":function(a,b){var y=["{"];return xr.concatArray(y,xr.go(b,"text")),y.push("}"),y},"tex-math":function(a,b){return xr.go(b,"tex-math")},"tex-math tight":function(a,b){return xr.go(b,"tex-math tight")},bond:function(a,b,y){return{type_:"bond",kind_:y||b}},"color0-output":function(a,b){return{type_:"color0",color:b[0]}},ce:function(a,b){return xr.go(b)},"1/2":function(a,b){var y=[];b.match(/^[+\-]/)&&(y.push(b.substr(0,1)),b=b.substr(1));var E=b.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return E[1]=E[1].replace(/\$/g,""),y.push({type_:"frac",p1:E[1],p2:E[2]}),E[3]&&(E[3]=E[3].replace(/\$/g,""),y.push({type_:"tex-math",p1:E[3]})),y},"9,9":function(a,b){return xr.go(b,"9,9")}},createTransitions:function(a){var b,y,E,ee,re={};for(b in a)for(y in a[b])for(E=y.split("|"),a[b][y].stateArray=E,ee=0;ee<E.length;ee++)re[E[ee]]=[];for(b in a)for(y in a[b])for(E=a[b][y].stateArray||[],ee=0;ee<E.length;ee++){var ae=a[b][y];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 ve=b.split("|"),Se=0;Se<ve.length;Se++)if(E[ee]==="*")for(var De in re)re[De].push({pattern:ve[Se],task:ae});else re[E[ee]].push({pattern:ve[Se],task:ae})}return re},stateMachines:{}};xr.stateMachines={ce:{transitions:xr.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,b){var y;if((a.d||"").match(/^[0-9]+$/)){var E=a.d;a.d=void 0,y=this.output(a),a.b=E}else y=this.output(a);return xr.actions["o="](a,b),y},"d= kv":function(a,b){a.d=b,a.dType="kv"},"charge or bond":function(a,b){if(a.beginsWithBond){var y=[];return xr.concatArray(y,this.output(a)),xr.concatArray(y,xr.actions.bond(a,b,"-")),y}else a.d=b},"- after o/d":function(a,b,y){var E=xr.patterns.match_("orbital",a.o||""),ee=xr.patterns.match_("one lowercase greek letter $",a.o||""),re=xr.patterns.match_("one lowercase latin letter $",a.o||""),ae=xr.patterns.match_("$one lowercase latin letter$ $",a.o||""),de=b==="-"&&(E&&E.remainder===""||ee||re||ae);de&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var ve=[];return de?(xr.concatArray(ve,this.output(a)),ve.push({type_:"hyphen"})):(E=xr.patterns.match_("digits",a.d||""),y&&E&&E.remainder===""?(xr.concatArray(ve,xr.actions["d="](a,b)),xr.concatArray(ve,this.output(a))):(xr.concatArray(ve,this.output(a)),xr.concatArray(ve,xr.actions.bond(a,b,"-")))),ve},"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,b){return{type_:"state of aggregation",p1:xr.go(b,"o")}},comma:function(a,b){var y=b.replace(/\s*$/,""),E=y!==b;return E&&a.parenthesisLevel===0?{type_:"comma enumeration L",p1:y}:{type_:"comma enumeration M",p1:y}},output:function(a,b,y){var E;if(!a.r)E=[],!a.a&&!a.b&&!a.p&&!a.o&&!a.q&&!a.d&&!y||(a.sb&&E.push({type_:"entitySkip"}),!a.o&&!a.q&&!a.d&&!a.b&&!a.p&&y!==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"&&xr.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:xr.go(a.a,"a"),b:xr.go(a.b,"bd"),p:xr.go(a.p,"pq"),o:xr.go(a.o,"o"),q:xr.go(a.q,"pq"),d:xr.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=xr.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=xr.go(a.rd);var re;a.rqt==="M"?re=xr.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=xr.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,b){var y=["{"];return xr.concatArray(y,xr.go(b,"oxidation")),y.push("}"),y},"frac-output":function(a,b){return{type_:"frac-ce",p1:xr.go(b[0]),p2:xr.go(b[1])}},"overset-output":function(a,b){return{type_:"overset",p1:xr.go(b[0]),p2:xr.go(b[1])}},"underset-output":function(a,b){return{type_:"underset",p1:xr.go(b[0]),p2:xr.go(b[1])}},"underbrace-output":function(a,b){return{type_:"underbrace",p1:xr.go(b[0]),p2:xr.go(b[1])}},"color-output":function(a,b){return{type_:"color",color1:b[0],color2:xr.go(b[1])}},"r=":function(a,b){a.r=b},"rdt=":function(a,b){a.rdt=b},"rd=":function(a,b){a.rd=b},"rqt=":function(a,b){a.rqt=b},"rq=":function(a,b){a.rq=b},operator:function(a,b,y){return{type_:"operator",kind_:y||b}}}},a:{transitions:xr.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:xr.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:xr.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 b={type_:"text",p1:a.text_};for(var y in a)delete a[y];return b}}}},pq:{transitions:xr.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,b){return{type_:"state of aggregation subscript",p1:xr.go(b,"o")}},"color-output":function(a,b){return{type_:"color",color1:b[0],color2:xr.go(b[1],"pq")}}}},bd:{transitions:xr.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,b){return{type_:"color",color1:b[0],color2:xr.go(b[1],"bd")}}}},oxidation:{transitions:xr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(a,b){return{type_:"roman numeral",p1:b||""}}}},"tex-math":{transitions:xr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(a){if(a.o){var b={type_:"tex-math",p1:a.o};for(var y in a)delete a[y];return b}}}},"tex-math tight":{transitions:xr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(a,b){a.o=(a.o||"")+"{"+b+"}"},output:function(a){if(a.o){var b={type_:"tex-math",p1:a.o};for(var y in a)delete a[y];return b}}}},"9,9":{transitions:xr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:xr.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,b){var y=[];return b[0]==="+-"||b[0]==="+/-"?y.push("\\pm "):b[0]&&y.push(b[0]),b[1]&&(xr.concatArray(y,xr.go(b[1],"pu-9,9")),b[2]&&(b[2].match(/[,.]/)?xr.concatArray(y,xr.go(b[2],"pu-9,9")):y.push(b[2])),(b[3]||b[4])&&(b[3]==="e"||b[4]==="*"?y.push({type_:"cdot"}):y.push({type_:"times"}))),b[5]&&y.push("10^{"+b[5]+"}"),y},"number^":function(a,b){var y=[];return b[0]==="+-"||b[0]==="+/-"?y.push("\\pm "):b[0]&&y.push(b[0]),xr.concatArray(y,xr.go(b[1],"pu-9,9")),y.push("^{"+b[2]+"}"),y},operator:function(a,b,y){return{type_:"operator",kind_:y||b}},space:function(){return{type_:"pu-space-1"}},output:function(a){var b,y=xr.patterns.match_("{(...)}",a.d||"");y&&y.remainder===""&&(a.d=y.match_);var E=xr.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:xr.go(a.d,"pu"),q:xr.go(a.q,"pu")};a.o==="//"?b={type_:"pu-frac",p1:ee.d,p2:ee.q}:(b=ee.d,ee.d.length>1||ee.q.length>1?b.push({type_:" / "}):b.push({type_:"/"}),xr.concatArray(b,ee.q))}else b=xr.go(a.d,"pu-2");for(var re in a)delete a[re];return b}}},"pu-2":{transitions:xr.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,b){a.rm+="^{"+b+"}"},space:function(){return{type_:"pu-space-2"}},output:function(a){var b=[];if(a.rm){var y=xr.patterns.match_("{(...)}",a.rm||"");y&&y.remainder===""?b=xr.go(y.match_,"pu"):b={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return b}}},"pu-9,9":{transitions:xr.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 b=[];if(a.text_=a.text_||"",a.text_.length>4){var y=a.text_.length%3;y===0&&(y=3);for(var E=a.text_.length-3;E>0;E-=3)b.push(a.text_.substr(E,3)),b.push({type_:"1000 separator"});b.push(a.text_.substr(0,y)),b.reverse()}else b.push(a.text_);for(var ee in a)delete a[ee];return b},"output-o":function(a){var b=[];if(a.text_=a.text_||"",a.text_.length>4){for(var y=a.text_.length-3,E=0;E<y;E+=3)b.push(a.text_.substr(E,3)),b.push({type_:"1000 separator"});b.push(a.text_.substr(E))}else b.push(a.text_);for(var ee in a)delete a[ee];return b}}}};var _s={go:function(a,b){if(!a)return"";for(var y="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?y+=re:(y+=_s._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!b&&!E&&y&&(y="{"+y+"}"),y},_goInner:function(a){return a&&_s.go(a,!0)},_go2:function(a){var b;switch(a.type_){case"chemfive":b="";var y={a:_s._goInner(a.a),b:_s._goInner(a.b),p:_s._goInner(a.p),o:_s._goInner(a.o),q:_s._goInner(a.q),d:_s._goInner(a.d)};y.a&&(y.a.match(/^[+\-]/)&&(y.a="{"+y.a+"}"),b+=y.a+"\\,"),(y.b||y.p)&&(b+="{\\vphantom{X}}",b+="^{\\hphantom{"+(y.b||"")+"}}_{\\hphantom{"+(y.p||"")+"}}",b+="{\\vphantom{X}}",b+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(y.b||"")+"}}",b+="_{\\vphantom{2}\\llap{\\smash[t]{"+(y.p||"")+"}}}"),y.o&&(y.o.match(/^[+\-]/)&&(y.o="{"+y.o+"}"),b+=y.o),a.dType==="kv"?((y.d||y.q)&&(b+="{\\vphantom{X}}"),y.d&&(b+="^{"+y.d+"}"),y.q&&(b+="_{\\smash[t]{"+y.q+"}}")):a.dType==="oxidation"?(y.d&&(b+="{\\vphantom{X}}",b+="^{"+y.d+"}"),y.q&&(b+="{\\vphantom{X}}",b+="_{\\smash[t]{"+y.q+"}}")):(y.q&&(b+="{\\vphantom{X}}",b+="_{\\smash[t]{"+y.q+"}}"),y.d&&(b+="{\\vphantom{X}}",b+="^{"+y.d+"}"));break;case"rm":b="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),b="\\mathrm{"+a.p1+"}"):b="\\text{"+a.p1+"}";break;case"roman numeral":b="\\mathrm{"+a.p1+"}";break;case"state of aggregation":b="\\mskip2mu "+_s._goInner(a.p1);break;case"state of aggregation subscript":b="\\mskip1mu "+_s._goInner(a.p1);break;case"bond":if(b=_s._getBond(a.kind_),!b)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";b="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+_s._goInner(a.p1)+"}{"+_s._goInner(a.p2)+"}";b="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":b=a.p1+" ";break;case"frac-ce":b="\\frac{"+_s._goInner(a.p1)+"}{"+_s._goInner(a.p2)+"}";break;case"overset":b="\\overset{"+_s._goInner(a.p1)+"}{"+_s._goInner(a.p2)+"}";break;case"underset":b="\\underset{"+_s._goInner(a.p1)+"}{"+_s._goInner(a.p2)+"}";break;case"underbrace":b="\\underbrace{"+_s._goInner(a.p1)+"}_{"+_s._goInner(a.p2)+"}";break;case"color":b="{\\color{"+a.color1+"}{"+_s._goInner(a.color2)+"}}";break;case"color0":b="\\color{"+a.color+"}";break;case"arrow":var re={rd:_s._goInner(a.rd),rq:_s._goInner(a.rq)},ae=_s._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+"}{} ",b=ae;break;case"operator":b=_s._getOperator(a.kind_);break;case"1st-level escape":b=a.p1+" ";break;case"space":b=" ";break;case"entitySkip":b="~";break;case"pu-space-1":b="~";break;case"pu-space-2":b="\\mkern3mu ";break;case"1000 separator":b="\\mkern2mu ";break;case"commaDecimal":b="{,}";break;case"comma enumeration L":b="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":b="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":b="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":b="\\text{-}";break;case"addition compound":b="\\,{\\cdot}\\,";break;case"electron dot":b="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":b="{\\times}";break;case"prime":b="\\prime ";break;case"cdot":b="\\cdot ";break;case"tight cdot":b="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":b="\\times ";break;case"circa":b="{\\sim}";break;case"^":b="uparrow";break;case"v":b="downarrow";break;case"ellipsis":b="\\ldots ";break;case"/":b="/";break;case" / ":b="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return b},_getArrow:function(a){switch(a){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(a){switch(a){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(a){switch(a){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function M1(a){}function _1(a){}var r0=class zp extends Gn{constructor(b){super(he(Ce({},b),{type:"delim"})),this.value=b.delim,this.size=b.size}static fromJson(b){return new zp(b)}toJson(){return he(Ce({},super.toJson()),{delim:this.value,size:this.size})}render(b){return new Lr(this.value,{type:"middle"})}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):bs(this.command,this.value)}},i0=class Kp extends Gn{constructor(b){super(he(Ce({},b),{type:"sizeddelim",value:b.delim})),this.delimType=b.delimType,this.size=b.size}static fromJson(b){return new Kp(b)}toJson(){return he(Ce({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(b){let y=gn(this.value,this.size,b,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return y?(y=this.bind(b,y),this.caret&&(y.caret=this.caret),y):null}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);return y!=null&&y.serialize?y.serialize(this,b):bs(this.command,this.value)}},Ad=class Hp extends Gn{constructor(b,y,E,ee){var re,ae;super({type:"enclose",command:b,style:ee.style}),this.body=y,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(b){return new Hp(b.command,b.body,b.notation,b)}toJson(){return he(Ce({},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(b){var y;if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Tr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,b);let ee=(y=this.command)!=null?y:"";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 bs(ee,this.bodyToLatex(b))}render(b){const y=new Io({parent:b},this.style),E=Gn.createBox(y,this.body);if(!E)return null;const ee=im(this.borderStyle),re=y.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 Lr(null,{classes:"ML__notation"});let de=E.height+E.depth+2*re;const ve=E.width+2*re;let Se="";if(this.notation.horizontalstrike&&(Se+=this.line(3,50,97,50)),this.notation.verticalstrike&&(Se+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(Se+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(Se+=this.line(3,3,97,97)),this.notation.updiagonalarrow){Se+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const Ot=.03*Math.sqrt(ve*ve+de*de)*1,Ln=E.width*Ot,kr=(E.depth+E.height)*Ot,Dn=re+E.width;let ar=re;ar+kr-.4*Ln<0&&(ar=.4*Ln-kr),Se+='<polygon points="',Se+=`${Dn},${ar} ${Dn-Ln-.4*kr},${ar+kr-.4*Ln} `,Se+=`${Dn-.7*Ln},${ar+.7*kr} ${Dn-Ln+.4*kr},${ar+kr+.4*Ln} `,Se+=`${Dn},${ar}`,Se+=`" stroke='none' fill="${this.strokeColor}"`,Se+="/>"}let De=0;if(this.notation.phasorangle){const at=a0(y),Et=(E.height+E.depth+2*at+re).toString(),Ot=(E.height+E.depth)/2;Se+=this.line(re.toString(),Et,(re+Ot+E.width).toString(),Et),Se+=this.line(re.toString(),Et,(re+Ot).toString(),(re-at).toString()),de+=at,De=Ot,E.left+=de/2-re}if(this.notation.longdiv){const at=a0(y);de+=at,Se+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const Et=.3;De=Et+at,E.left+=Et+at,E.setTop(re+at),Se+='<path d="',Se+=`M ${re} ${re} a${Et} ${(E.depth+E.height+2*at)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*at} "`,Se+=` stroke-width="${am(y)}" stroke="${this.strokeColor}" fill="none"`,Se+="/>"}if(ae.width=E.width+2*re+De,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),Se){let at="";this.shadow==="auto"&&(at+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(at+=`filter: drop-shadow(${this.shadow})`),at+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,at+=' stroke-linecap="round"',this.svgStrokeStyle&&(at+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=at,ae.svgOverlay=Se}const ze=new Lr([ae,E]);return ze.setStyle("position","relative"),ze.setStyle("vertical-align",re,"em"),ze.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),ze.setStyle("display","inline-block"),ze.height=ae.height,ze.depth=ae.depth,ze.width=ae.width-2*re,ze.left=re,ze.right=re,this.caret&&(ze.caret=this.caret),ze.wrap(y)}line(b,y,E,ee){return`<line x1="${yf(b)}" y1="${yf(y)}" x2="${yf(E)}" y2="${yf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function yf(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const b=a.match(/([0-9][a-zA-Z\%]+)/);return b===null?"1px":b[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const b=a.isDisplayStyle?zl:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*b/4}var Xc=class Wp extends Gn{constructor(b,y,E){var ee,re;super(he(Ce({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=b,this.below=y,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(b){return new Wp(b.above,b.below,b)}toJson(){const b={};return this.continuousFraction&&(b.continuousFraction=!0),this.numerPrefix&&(b.numerPrefix=this.numerPrefix),this.denomPrefix&&(b.denomPrefix=this.denomPrefix),this.leftDelim&&(b.leftDelim=this.leftDelim),this.rightDelim&&(b.rightDelim=this.rightDelim),this.hasBarLine||(b.hasBarLine=!1),this.mathstyleName&&(b.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(b.fractionNavigationOrder=this.fractionNavigationOrder),Ce(Ce({},super.toJson()),b)}get children(){if(this._children)return this._children;const b=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const y of this.below)b.push(...y.children),b.push(y);for(const y of this.above)b.push(...y.children),b.push(y)}else{for(const y of this.above)b.push(...y.children),b.push(y);for(const y of this.below)b.push(...y.children),b.push(y)}return this._children=b,b}render(b){var y,E;const ee=new Io({parent:b,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new Io({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),de=this.numerPrefix?new Lr([new Lr(this.numerPrefix),Gn.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(y=Gn.createBox(ae,this.above,{type:"ignore"}))!=null?y:new Lr(null,{type:"ignore"}),ve=new Io({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),Se=this.denomPrefix?new Lr([new Lr(this.denomPrefix),Gn.createBox(ve,this.below,{type:"ignore"})]):(E=Gn.createBox(ve,this.below,{type:"ignore"}))!=null?E:new Lr(null,{type:"ignore"}),De=this.hasBarLine?re.defaultRuleThickness:0;let ze,at=0,Et;ee.isDisplayStyle?(ze=ae.metrics.num1,at=De>0?3*De:7*De,Et=ve.metrics.denom1):(De>0?(ze=ae.metrics.num2,at=De):(ze=ae.metrics.num3,at=3*re.defaultRuleThickness),Et=ve.metrics.denom2);const Ot=[];this.isSelected&&Ot.push("ML__selected");const Ln=de.depth,kr=Se.height;let Dn;if(De<=0){const zi=ze-Ln-(kr-Et);zi<at&&(ze+=(at-zi)/2,Et+=(at-zi)/2),Dn=new cs({individualShift:[{box:de,shift:-ze,classes:[...Ot,"ML__center"]},{box:Se,shift:Et,classes:[...Ot,"ML__center"]}]}).wrap(ee)}else{const zi=new Lr(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});zi.softWidth=Math.max(de.width,Se.width),zi.height=De/2,zi.depth=De/2;const Bo=il+De/2;ze<at+Ln+Bo&&(ze=at+Ln+Bo);const is=il-De/2;Et<at+kr-is&&(Et=at+kr-is),Dn=new cs({individualShift:[{box:Se,shift:Et,classes:[...Ot,"ML__center"]},{box:zi,shift:-is,classes:Ot},{box:de,shift:-ze,classes:[...Ot,"ML__center"]}]}).wrap(ee)}const ar=ee.isDisplayStyle?re.delim1:re.delim2,Pr=this.leftDelim?this.bind(b,fi("open",this.leftDelim,ar,!0,b,{style:this.style,mode:this.mode,isSelected:this.isSelected})):xi(ee,"open");let fr=null;this.continuousFraction?fr=new Lr(null,{type:"close"}):this.rightDelim?fr=this.bind(b,fi("close",this.rightDelim,ar,!0,b,{style:this.style,mode:this.mode,isSelected:this.isSelected})):fr=xi(ee,"close");const Si=new Lr([Pr,Dn,fr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),oa=this.bind(b,Si);return this.caret&&(oa.caret=this.caret),this.attachSupsub(b,{base:oa})}},pl=class Zp extends Gn{constructor(b,y){var E;super({type:"latex",value:b,mode:"latex"}),this.isSuggestion=(E=y==null?void 0:y.isSuggestion)!=null?E:!1,this.isError=!1}static fromJson(b){const y=new Zp(b.value);return b.isSuggestion&&(y.isSuggestion=!0),b.isError&&(y.isError=!0),y}toJson(){const b={};return this.isSuggestion&&(b.isSuggestion=!0),this.isError&&(b.isError=!0),Ce({type:"latex",value:this.value},b)}get computedStyle(){return{}}render(b){const y=new Lr(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}},Td=class Vp extends Gn{constructor(b){super({type:"latexgroup",mode:"latex"}),this.body=[...b].map(y=>new pl(y)),this.skipBoundary=!1}static fromJson(b){return new Vp("")}toJson(){return super.toJson()}render(b){const y=Gn.createBox(b,this.body);return y?(this.caret&&(y.caret=this.caret),this.bind(b,y)):null}_serialize(b){var y,E;return(E=(y=this.body)==null?void 0:y.map(ee=>ee.value).join(""))!=null?E:""}},fh=class Up extends Gn{constructor(b,y){super(he(Ce({},y),{type:"extensible-symbol",isFunction:y==null?void 0:y.isFunction})),this.value=b,this.variant=y==null?void 0:y.variant,this.subsupPlacement=y==null?void 0:y.limits}static fromJson(b){return new Up(b.symbol,b)}toJson(){const b=super.toJson();return this.variant&&(b.variant=this.variant),this.subsupPlacement&&(b.limits=this.subsupPlacement),this.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),this.value&&(b.symbol=this.value),b}render(b){var y;const E=b.isDisplayStyle&&this.value!=="\\smallint",ee=new Lr(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:b.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-il*b.scalingFactor,ae=ee.italic;ee.setTop(re);let de=ee;if(this.superscript||this.subscript){const ve=(y=this.subsupPlacement)!=null?y:"auto";de=ve==="over-under"||ve==="auto"&&b.isDisplayStyle?this.attachLimits(b,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(b,{base:ee})}return new Lr(this.bind(b,de),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(b)}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);if(y!=null&&y.serialize)return y.serialize(this,b);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(b)),yo(E)}},Ec=class jp extends Gn{constructor(b){const y=b.body;super(he(Ce({},b),{type:"overlap",body:typeof y=="string"?[new Gn({value:y})]:y,style:b==null?void 0:b.style})),this.skipBoundary=!0,this.align=b==null?void 0:b.align,this.boxType=b==null?void 0:b.boxType}static fromJson(b){return new jp(b)}toJson(){const b={};return this.align&&(b.align=this.align),this.boxType&&(b.boxType=this.boxType),Ce(Ce({},super.toJson()),b)}render(b){const y=Gn.createBox(b,this.body,{classes:"inner"});return y?(this.caret&&(y.caret=this.caret),this.bind(b,new Lr([y,new Lr(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},eu=class Gp extends Gn{constructor(b){var y,E,ee,re;super({type:"overunder",command:b.command,style:b.style,mode:b.mode,body:b.body,skipBoundary:(y=b.skipBoundary)!=null?y:!0}),this.subsupPlacement=b.supsubPlacement,this.svgAbove=b.svgAbove,this.svgBelow=b.svgBelow,this.svgBody=b.svgBody,this.above=b.above,this.below=b.below,this.boxType=(E=b.boxType)!=null?E:"ord",this.paddedBody=(ee=b.paddedBody)!=null?ee:!1,this.paddedLabels=(re=b.paddedLabels)!=null?re:!1}static fromJson(b){return new Gp(b)}toJson(){const b=super.toJson();return this.skipBoundary||(b.skipBoundary=!1),this.subsupPlacement&&(b.subsupPlacement=this.subsupPlacement),this.svgAbove&&(b.svgAbove=this.svgAbove),this.svgBelow&&(b.svgBelow=this.svgBelow),this.svgBody&&(b.svgBody=this.svgBody),this.boxType!=="ord"&&(b.boxType=this.boxType),this.paddedBody&&(b.paddedBody=!0),this.paddedLabels&&(b.paddedLabels=!0),b}render(b){let y=this.svgBody?Wl(this.svgBody):Gn.createBox(b,this.body,{type:"ignore"});const E=new Io({parent:b,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Wl(this.svgAbove):this.above&&(ee=Gn.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Wl(this.svgBelow):this.below&&(re=Gn.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(y=new Lr([xi(b,"open"),y,xi(b,"close")],{type:"ignore"}));let ae=om(b,{base:y,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(b,{base:ae,type:ae.type}):ae=this.attachSupsub(b,{base:ae}),this.caret&&(ae.caret=this.caret),this.bind(b,ae)):null}};function om(a,b){if(!b.base)return null;if(!b.above&&!b.below){const de=new Lr(b.base,{type:b.type});return de.setStyle("position","relative"),de}let y=0;b.above&&(y=a.metrics.bigOpSpacing5);let E=null;const ee=b.base,re=0,ae=["ML__center"];if(b.paddedAboveBelow&&ae.push("ML__label_padding"),b.below&&b.above){const de=a.metrics.bigOpSpacing5+b.below.height+b.below.depth+ee.depth+re;E=new cs({bottom:de,children:[a.metrics.bigOpSpacing5,{box:b.below,classes:ae},{box:ee,classes:["ML__center"]},y,{box:b.above,classes:ae},a.metrics.bigOpSpacing5]})}else b.below?E=new cs({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:b.below,classes:ae},{box:ee,classes:["ML__center"]}]}):b.above&&(E=new cs({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},y,{box:b.above,classes:ae},a.metrics.bigOpSpacing5]}));return new Lr(E,{type:b.type})}var Id=class Xp extends Gn{constructor(b){var y,E,ee,re;super(he(Ce({},b),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(y=b.isInvisible)!=null?y:!1,this.smashDepth=(E=b.smashDepth)!=null?E:!1,this.smashHeight=(ee=b.smashHeight)!=null?ee:!1,this.smashWidth=(re=b.smashWidth)!=null?re:!1}static fromJson(b){return new Xp(b)}toJson(){const b={};return this.isInvisible&&(b.isInvisible=!0),this.smashDepth&&(b.smashDepth=!0),this.smashHeight&&(b.smashHeight=!0),this.smashWidth&&(b.smashWidth=!0),Ce(Ce({},super.toJson()),b)}render(b){const y=new Io({parent:b,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Gn.createBox(y,this.body,{classes:"inner"});const E=Gn.createBox(this.isInvisible?y:b,this.body);if(!E)return null;if(this.smashWidth){const ee=new Lr(null,{classes:"fix"});return new Lr([E,ee],{classes:"rlap"}).wrap(b)}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 cs({firstBaseline:[{box:E}]},{type:E.type}).wrap(b)}},Pd=class Yp extends Gn{constructor(b){var y;super(Ce({type:"spacing"},b)),this.width=b==null?void 0:b.width,this._braced=(y=b==null?void 0:b.braced)!=null?y:!1}static fromJson(b){return new Yp(b)}toJson(){const b=super.toJson();return this.width!==void 0&&(b.width=this.width),this._braced&&(b.braced=!0),b}render(b){var y;if(this.command==="space")return new Lr(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Lr(null,{classes:"mspace"}),E.left=b.toEm(this.width);else{const ee=(y={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?y:"mediumspace";E=new Lr(null,{classes:ee})}return E=this.bind(b,E),this.caret&&(E.caret=this.caret),E}_serialize(b){var y;if(!b.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Tr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,b);const ee=(y=this.command)!=null?y:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Gs(this.width)}}`:`${ee}${Gs(this.width)}`}},o0=class qp extends Gn{constructor(b){var y;super(he(Ce({},b),{type:"surd",mode:(y=b.mode)!=null?y:"math",style:b.style,displayContainsHighlight:!0,body:b.body})),this.above=b.index}static fromJson(b){return new qp(he(Ce({},b),{index:b.above}))}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);if(y!=null&&y.serialize)return y.serialize(this,b);const E=this.command,ee=this.bodyToLatex(b);return this.above&&!this.hasEmptyBranch("above")?bs(`${E}[${this.aboveToLatex(b)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:bs(E,ee)}get children(){if(this._children)return this._children;const b=[];if(this.above)for(const y of this.above)b.push(...y.children),b.push(y);if(this.body)for(const y of this.body)b.push(...y.children),b.push(y);return this._children=b,b}render(b){var y;const E=new Io({parent:b,mathstyle:"cramp"},this.style),ee=(y=Gn.createBox(E,this.body,{type:"inner"}))!=null?y:new Lr(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,de=b.isDisplayStyle?zl:ae,ve=new Lr(null,{classes:"ML__sqrt-line",style:this.style});ve.height=ae,ve.softWidth=ee.width;let Se=re*(ae+de/4);const ze=Math.max(re*2*de,ee.height+ee.depth)+Se+ae,at=new Io({parent:b},this.style),Et=this.bind(at,new Lr(fi("inner","\\surd",ze,!1,at,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!Et)return null;const Ot=Et.height+Et.depth-ae;Ot>ee.height+ee.depth+Se&&(Se=(Se+Ot-(ee.height+ee.depth))/2),Et.setTop(Et.height-ee.height-Se);const Ln=this.bind(b,new cs({firstBaseline:[{box:new Lr(ee)},Se-2*ae,{box:ve},ae]})),kr=Gn.createBox(new Io({parent:b,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!kr){const Pr=new Lr([Et,Ln],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Pr.setStyle("display","inline-block"),Pr.setStyle("height",Pr.height+Pr.depth,"em"),this.caret&&(Pr.caret=this.caret),this.bind(b,Pr)}const Dn=new cs({shift:-.6*(Math.max(Et.height,Ln.height)-Math.max(Et.depth,Ln.depth)),children:[{box:kr}]}),ar=new Lr([new Lr(Dn,{classes:"ML__sqrt-index",type:"ignore"}),Et,Ln],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return ar.height=Et.height,ar.depth=Et.depth,this.caret&&(ar.caret=this.caret),this.bind(b,ar)}},sm=class extends Lr{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,b){if(!a.parent)return;const y=a.parent.children,E=y.indexOf(a);let ee=E-1;for(;ee>=0&&y[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){xf(a.parent,b);return}E>0&&y[E-1].type==="skip"?y[E-1].width+=b:y.splice(E,0,new sm(b))}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){Bd(a,(b,y)=>{y.type==="bin"&&(!b||/^(middle|bin|op|rel|open|punct)$/.test(b.type))&&(y.type="ord"),(b==null?void 0:b.type)==="bin"&&/^(rel|close|punct)$/.test(y.type)&&(b.type="ord"),y.type!=="ignore"&&(b=y)})}function Od(a,b){if(!a.children)return a;const y=a.children;cm(y);const E=b.getRegisterAsEm("thinmuskip"),ee=b.getRegisterAsEm("medmuskip"),re=b.getRegisterAsEm("thickmuskip");return Bd(y,(ae,de)=>{var ve,Se,De;if(!ae)return;const ze=ae.type,at=de.isTight?(ve=um[ze])!=null?ve:null:(Se=lm[ze])!=null?Se:null,Et=(De=at==null?void 0:at[de.type])!=null?De:null;Et===3&&xf(de,E),Et===4&&xf(de,ee),Et===5&&xf(de,re)}),a}function Bd(a,b,y=void 0){if(!a)return y;a=[...a];for(const E of a)E.type==="lift"?y=Bd(E.children,b,y):E.type==="ignore"?Bd(E.children,b):(b(y,E),Bd(E.children,b),y=E);return y}var hh=class Jp extends Gn{constructor(b){super({type:"tooltip",command:b.command,mode:b.mode,style:b.style,body:b.body,displayContainsHighlight:!0}),this.tooltip=new Gn({type:"root",mode:b.content,body:b.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(b){return new Jp(he(Ce({},b),{tooltip:lc(b.tooltip)}))}toJson(){var b;const y=(b=this.tooltip.body)==null?void 0:b.filter(E=>E.type!=="first").map(E=>E.toJson());return he(Ce({},super.toJson()),{tooltip:y})}render(b){const y=Gn.createBox(new Io,this.body);if(!y)return null;const E=new Io({parent:b,mathstyle:"displaystyle"},{fontSize:so}),ee=$c(Od(new Lr(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new Lr([ee,y],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(b,re)}},Mc=class Qp extends Gn{constructor(b,y){super(he(Ce({},y),{type:"operator",isFunction:y==null?void 0:y.isFunction})),this.value=b,this.variant=y==null?void 0:y.variant,this.variantStyle=y==null?void 0:y.variantStyle,this.subsupPlacement=y==null?void 0:y.limits}static fromJson(b){return new Qp(b.symbol,b)}toJson(){const b=super.toJson();return this.variant&&(b.variant=this.variant),this.variantStyle&&(b.variantStyle=this.variantStyle),this.subsupPlacement&&(b.limits=this.subsupPlacement),this.value&&(b.symbol=this.value),b}render(b){var y;const E=new Lr(this.value,{type:"op",mode:"math",maxFontSize:b.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:b.letterShapeStyle});let ee=E;if(this.superscript||this.subscript){const re=(y=this.subsupPlacement)!=null?y:"auto";ee=re==="over-under"||re==="auto"&&b.isDisplayStyle?this.attachLimits(b,{base:E}):this.attachSupsub(b,{base:E})}return new Lr(this.bind(b,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(b)}_serialize(b){if(!(b.expandMacro||b.skipStyles||b.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const y=Tr(this.command,this.mode);if(y!=null&&y.serialize)return y.serialize(this,b);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(b)),yo(E)}};function lc(a){if(Pe(a))return a.map(E=>lc(E));if(typeof a=="string")return Gn.fromJson(a);a=Ce({},a);for(const E of ic)a[E]&&(a[E]=lc(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=lc(a.array));const b=a.type;let y;b==="accent"&&(y=z.fromJson(a)),b==="array"&&(y=Xa.fromJson(a)),b==="box"&&(y=Ws.fromJson(a)),b==="chem"&&(y=n0.fromJson(a)),b==="composition"&&(y=Wu.fromJson(a)),b==="delim"&&(y=r0.fromJson(a)),b==="enclose"&&(y=Ad.fromJson(a)),b==="error"&&(y=_l.fromJson(a)),b==="extensible-symbol"&&(y=fh.fromJson(a)),b==="genfrac"&&(y=Xc.fromJson(a)),b==="group"&&(y=ll.fromJson(a)),b==="latex"&&(y=pl.fromJson(a)),b==="latexgroup"&&(y=Td.fromJson(a)),b==="leftright"&&(y=Zo.fromJson(a)),b==="macro"&&(y=Gc.fromJson(a)),b==="macro-argument"&&(y=hu.fromJson(a)),b==="operator"&&(y=Mc.fromJson(a)),b==="overlap"&&(y=Ec.fromJson(a)),b==="overunder"&&(y=eu.fromJson(a)),b==="placeholder"&&(y=da.fromJson(a)),b==="prompt"&&(y=_u.fromJson(a)),b==="phantom"&&(y=Id.fromJson(a)),b==="sizeddelim"&&(y=i0.fromJson(a)),b==="spacing"&&(y=Pd.fromJson(a)),b==="subsup"&&(y=Ql.fromJson(a)),b==="surd"&&(y=o0.fromJson(a)),b==="text"&&(y=du.fromJson(a)),b==="tooltip"&&(y=hh.fromJson(a)),y||(console.assert(!b||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(b),`MathLive 0.98.5: an unexpected atom type "${b}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),y=Gn.fromJson(a));for(const E of ic)a[E]&&y.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(y.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(y.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),a.isFunction&&(y.isFunction=!0),a.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),a.skipBoundary&&(y.skipBoundary=!0),a.captureSelection&&(y.captureSelection=!0),y}function dm(a){if(a&&Array.isArray(a))return a.map(b=>b==="<null>"?null:typeof b=="object"&&"group"in b?{group:b.group.map(y=>lc(y))}:typeof b=="object"&&"atoms"in b?b.atoms.map(y=>lc(y)):b)}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 Tl{constructor(){super("math")}createAtom(a,b,y){var E,ee,re,ae;if(b===null)return new Gn({type:"mord",mode:"math",command:a,value:a,style:y});const de=window.MathfieldElement.isFunction((E=b.command)!=null?E:a);if(b.definitionType==="symbol"){const Se=new Gn({type:(ee=b.type)!=null?ee:"mord",mode:"math",command:(re=b.command)!=null?re:a,value:String.fromCodePoint(b.codepoint),style:y});return de&&(Se.isFunction=!0),a.startsWith("\\")&&(Se.verbatimLatex=a),Se}const ve=new Gn({type:"mord",mode:"math",command:(ae=b.command)!=null?ae:a,value:a,style:y});return de&&(ve.isFunction=!0),a.startsWith("\\")&&(ve.verbatimLatex=a),ve}serialize(a,b){const y=vm(a,he(Ce({},b),{defaultMode:"math"}));return y.length===0||b.defaultMode!=="text"?y:["$ ",...y," $"]}getFont(a,b){console.assert(b.variant!==void 0);let{variant:y}=b,{variantStyle:E}=b;y==="normal"&&!E&&/[\u00A3\u0131\u0237]/.test(a.value)&&(y="main",E="italic"),y==="normal"&&!E&&a.value.length===1&&hm.forEach((de,ve)=>{var Se;de.test(a.value)&&pm[(Se=b.letterShapeStyle)!=null?Se:"tex"][ve]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?y+"-"+E:y;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return ph[y]&&!ph[y].test(a.value)?(a.value=cn(a.value,y,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function vm(a,b){const{parent:y}=a[0],E=u0(y);return Hs(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=yo(ee.map(ve=>ve._serialize(b)));return ae?bs(ae,de):de})}function u0(a){if(!a)return"";const{style:b}=a;if(b.variant===void 0)return"";let y=b.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(b.variant)&&b.variantStyle&&b.variantStyle!=="up"&&(y+="-"+b.variantStyle),y}new mm;function gm(a,b){return a.map(y=>y._serialize(b))}function bm(a,b){return Hs(a,"fontShape").map(y=>{const E=gm(y,b),{fontShape:ee}=y[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${bs("\\fontshape",ee)}${yo(E)}}`:re?bs(re,yo(E)):yo(E)})}function ym(a,b){return Hs(a,"fontSeries").map(y=>{const E=bm(y,b),{fontSeries:ee}=y[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${bs("\\fontseries",ee)}${yo(E)}}`:re?bs(re,yo(E)):yo(E)})}function xm(a,b){return Hs(a,"fontSize").map(y=>{var E,ee;const re=ym(y,b),ae=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=y[0].style.fontSize)!=null?E:""])!=null?ee:"";return ae?`${ae} ${yo(re)}`:yo(re)})}function Sm(a,b,y){return Hs(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,b),de=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return de?`\\${de}{${yo(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${yo(ae)}}`:y?`\\text{${yo(ae)}}`:yo(ae)})}var c0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},wm=class extends Tl{constructor(){super("text")}createAtom(a,b,y){return b&&b.definitionType==="symbol"?new du(a,String.fromCodePoint(b.codepoint),y!=null?y:{}):null}serialize(a,b){return Sm(a,he(Ce({},b),{defaultMode:"text"}),b.defaultMode!=="text")}getFont(a,b){var y,E,ee,re,ae;const{fontFamily:de}=b;if(c0[de]?a.classes+=" "+c0[de]:de&&a.setStyle("font-family",de),b.fontShape&&(a.classes+=" ",a.classes+=(y={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[b.fontShape])!=null?y:""),b.fontSeries){const ve=b.fontSeries.match(/(.?[lbm])?(.?[cx])?/);ve&&(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=ve[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=ve[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new wm;var Cm=class extends Tl{constructor(){super("latex")}createAtom(a){return new pl(a)}serialize(a,b){return a.filter(y=>y instanceof pl&&!y.isSuggestion).map(y=>y.value)}getFont(){return null}};new Cm;var Em={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},mh={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},d0={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},f0={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Mm={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},_m={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},km={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Dm={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:["=","=","=","="]}},Lm={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Am={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Tm={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Im={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pm={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function h0(a){const b=a.split("+"),y={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:b.pop()};return b.includes("shift")&&(y.shift=!0),b.includes("alt")&&(y.alt=!0),b.includes("ctrl")&&(y.ctrl=!0),b.includes("cmd")&&(y.cmd=!0),b.includes("win")&&(y.win=!0),b.includes("meta")&&(y.meta=!0),y}function Yc(a){let b="";return a.shift&&(b+="shift+"),a.alt&&(b+="alt+"),a.ctrl&&(b+="ctrl+"),a.cmd&&(b+="cmd+"),a.win&&(b+="win+"),a.meta&&(b+="meta+"),b+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]"},Nd=[],Rd;function vh(){switch(_e()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Ul(a){(!a.platform||a.platform===vh())&&Nd.push(a)}function Bm(a,b){var y;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(b.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=(y=Om[a])!=null?y:"",E}function Nm(a){if(a.code)return a;const b=Object.entries(Fd().mapping);let y=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,de]of b)if(de[re]===a.key){ee=ae,re===3?(y=!0,E=!0):re===2?y=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,he(Ce({},a),{altKey:y,shiftKey:E,code:ee}))}function Rm(a){var b,y;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 Nd)((b=ee.mapping[a.code])==null?void 0:b[E])===a.key?ee.score+=1:(y=ee.mapping[a.code])!=null&&y[E]&&(ee.score=0);Nd.sort((ee,re)=>re.score-ee.score)}function Fm(a){Rd=Nd.find(b=>a.startsWith(b.locale))}function Fd(){return Rd!=null?Rd:Nd[0]}function $m(){switch(vh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(vh()){case"apple":Ul(mh),Ul(Mm),Ul(Tm),Ul(Dm);break;case"windows":Ul(d0),Ul(_m),Ul(Im),Ul(Lm);break;case"linux":Ul(f0),Ul(km),Ul(Pm),Ul(Am);break}Ul(Em);function gh(a){var b;const y=/macos|ios/.test(_e()),E=a.split("+");let ee="";for(const re of E)ee&&(ee+=y?"\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+=(b={cmd:"\u2318",meta:y?"\u2318":"Ctrl",shift:y?"\u21E7":"Shift",alt:y?"\u2325":"Alt",ctrl:y?"\u2303":"Ctrl","\n":y?"\u23CE":"Return","[return]":y?"\u23CE":"Return","[enter]":y?"\u2324":"Enter","[tab]":y?"\u21E5":"Tab","[escape]":"Esc","[backspace]":y?"\u232B":"Backspace","[delete]":y?"\u2326":"Del","[pageup]":y?"\u21DE":"Page Up","[pagedown]":y?"\u21DF":"Page Down","[home]":y?"\u2912":"Home","[end]":y?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* &#128290;",numpaddivide:"/ &#128290;",numpadsubtract:"- &#128290;",numpadadd:"+ &#128290;",numpaddecimal:". &#128290;",numpadcomma:", &#128290;",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[re.toLowerCase()])!=null?b:re.toUpperCase();return ee}function Sf(a){if(a instanceof MouseEvent||a instanceof PointerEvent)return{x:a.clientX,y:a.clientY};if(a instanceof TouchEvent){const b=[...a.touches].reduce((E,ee)=>({x:E.x+ee.clientX,y:E.y+ee.clientY}),{x:0,y:0}),y=a.touches.length;return{x:b.x/y,y:b.y/y}}}function _c(a){const b={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(b.alt=!0),a.ctrlKey&&(b.control=!0),a.metaKey&&(b.meta=!0),a.shiftKey&&(b.shift=!0)),b}function zm(a,b){return!a&&b||a&&!b?!1:!a||!b?!0:a.alt===b.alt&&a.control===b.control&&a.shift===b.shift&&a.meta===b.meta}var Km=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function wf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Cf(){var a;let b=document.activeElement;for(;(a=b==null?void 0:b.shadowRoot)!=null&&a.activeElement;)b=b.shadowRoot.activeElement;return b}var ku=class Gu{static get scrim(){return Gu._scrim||(Gu._scrim=new Gu),Gu._scrim}static open(b){Gu.scrim.open(b)}static close(){Gu.scrim.close()}static get state(){return Gu.scrim.state}static get element(){return Gu.scrim.element}constructor(b){var y,E;this.lightDismiss=(y=b==null?void 0:b.lightDismiss)!=null?y:!0,this.translucent=(E=b==null?void 0:b.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const b=document.createElement("div");return b.setAttribute("role","presentation"),b.style.position="fixed",b.style.contain="content",b.style.top="0",b.style.left="0",b.style.right="0",b.style.bottom="0",b.style.zIndex="var(--scrim-zindex, 10099)",b.style.outline="none",this.translucent?(b.style.background="rgba(255, 255, 255, .2)",b.style.backdropFilter="contrast(40%)"):b.style.background="transparent",this._element=b,b}open(b){var y;if(this.state!=="closed")return;this.state="opening",this.onDismiss=b==null?void 0:b.onDismiss,this.savedActiveElement=Cf();const{element:E}=this;((y=b==null?void 0:b.root)!=null?y: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`,b!=null&&b.child&&E.append(b.child),this.state="open"}close(){var b,y,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=(b=this.savedOverflow)!=null?b:"",document.body.style.marginRight=(y=this.savedMarginRight)!=null?y:"",Cf()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(b){this.lightDismiss&&(b.target===this._element&&b.type==="click"?(this.close(),b.preventDefault(),b.stopPropagation()):b.target===document&&(b.type==="touchmove"||b.type==="scroll")&&(this.close(),b.preventDefault(),b.stopPropagation()))}};function Hm(a,b,y){let E=null,ee=null,re=!1,ae=!1,de=!1;const ve=new AbortController,Se=ve.signal;return a.addEventListener("keydown",De=>{if(re||De.key==="Process"||De.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(De.code)){E=null;return}E=De,ee=null,y.onKeystroke(De)?a.textContent="":E=null},{capture:!0,signal:Se}),a.addEventListener("keypress",De=>{re||(E&&ee&&y.onKeystroke(E),ee=De)},{capture:!0,signal:Se}),a.addEventListener("compositionstart",De=>{a.textContent="",re=!0,y.onCompositionStart(De.data)},{capture:!0,signal:Se}),a.addEventListener("compositionupdate",De=>{re&&y.onCompositionUpdate(De.data)},{capture:!0,signal:Se}),a.addEventListener("compositionend",De=>{a.textContent="",re&&(re=!1,y.onCompositionEnd(De.data))},{capture:!0,signal:Se}),a.addEventListener("beforeinput",De=>De.stopImmediatePropagation(),{signal:Se}),a.addEventListener("input",De=>{var ze;if(!re&&(a.textContent="",De.inputType!=="insertCompositionText")){if(De.inputType==="insertFromPaste"){De.preventDefault(),De.stopPropagation();return}y.onInput((ze=De.data)!=null?ze:""),De.preventDefault(),De.stopPropagation()}},{signal:Se}),a.addEventListener("paste",De=>{a.focus({preventScroll:!0}),a.textContent="",y.onPaste(De)||De.preventDefault(),De.stopImmediatePropagation()},{signal:Se}),a.addEventListener("cut",De=>y.onCut(De),{capture:!0,signal:Se}),a.addEventListener("copy",De=>y.onCopy(De),{capture:!0,signal:Se}),a.addEventListener("blur",De=>{var ze,at;if(((at=(ze=De.relatedTarget)==null?void 0:ze._mathfield)==null?void 0:at.element)===b){a.focus({preventScroll:!0}),De.preventDefault(),De.stopPropagation();return}const Et=ku.state;if(Et==="open"||Et==="opening"){De.preventDefault(),De.stopPropagation();return}if(De.relatedTarget===De.target.getRootNode().host){De.preventDefault(),De.stopPropagation();return}de||ae||(de=!0,E=null,ee=null,y.onBlur(),de=!1)},{capture:!0,signal:Se}),a.addEventListener("focus",De=>{de||ae||(ae=!0,y.onFocus(),ae=!1)},{capture:!0,signal:Se}),{dispose:()=>ve.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:De=>a.setAttribute("aria-label",De),setValue:De=>{var ze;a.textContent=De,a.style.left="-1000px",(ze=window.getSelection())==null||ze.selectAllChildren(a)},moveTo:(De,ze)=>{a.style.top=`${ze}px`,a.style.left=`${De}px`}}}function qc(a){var b;if(!a||!wf(a))return"";let y;return a.key==="Unidentified"&&a.target&&(y=a.target.value),y=(b=y!=null?y:a.key)!=null?b:a.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(y)&&(y=""),y}function p0(a){a=Nm(a);const b=[];return a.ctrlKey&&b.push("ctrl"),a.metaKey&&b.push("meta"),a.altKey&&b.push("alt"),a.shiftKey&&b.push("shift"),b.length===0?`[${a.code}]`:(b.push(`[${a.code}]`),b.join("+"))}function Wm(a){if(ot()){const b=_e(),y=a.startsWith("!"),E=a.endsWith(b);if(y&&!E||!y&&E)return!0}return a==="!other"?!1:a==="other"}function Zm(a,b,y){if(a.length===0)return"";const E=Yc(h0(p0(y))),ee=Yc({key:y.key,shift:y.shiftKey,alt:y.altKey,ctrl:y.ctrlKey,meta:y.metaKey||y.ctrlKey&&/macos|ios/.test(_e()),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===b))return a[re].command;return""}function m0(a){let b=a;return Pe(b)&&(b=b.length>0?b[0]+"("+b.slice(1).join("")+")":""),b}function Vm(a,b){let y=[];if(typeof b=="string"){const re=Ed[b];Pe(re)?y=re.slice():re&&y.push(re)}const E=m0(b),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&y.push(re.key);return y.map(gh)}function Um(a,b){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&&(b.score===0||!a.ifLayout.includes(b.id)))return;const y=h0(a.key);let E=a.ifPlatform;if(y.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=_e()==="ios"?"ios":"macos"),y.win=!1,y.cmd=!1,y.meta=!0}if(y.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",y.win=!1,y.cmd=!1,y.meta=!0}if(E&&!Wm(E))return;if(/^\[.+\]$/.test(y.key))return he(Ce({},a),{key:Yc(y)});const ee=Bm(y.key,b);if(!ee)return he(Ce({},a),{key:Yc(y)});if(ee.shift&&y.shift||ee.alt&&y.alt)throw new Error(`The keybinding ${a.key} (${bh(a.command)}) is conflicting with the key combination ${Yc(ee)} using the ${b.displayName} keyboard layout`);return ee.shift=ee.shift||y.shift,ee.alt=ee.alt||y.alt,ee.meta=y.meta,ee.ctrl=y.ctrl,he(Ce({},a),{key:Yc(ee)})}function bh(a){if(Array.isArray(a)){const b=[...a];return b.shift()+"("+b.map(y=>typeof y=="string"?`"${y}"`:y.toString()).join(", ")+")"}return a}function jm(a,b){const y=[],E=[];for(const ee of a)try{const re=Um(ee,b);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} (${bh(ee.command)}) matches ${ae.key} (${bh(ae.command)}) with the ${b.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&y.push(re.message)}return[E,y]}var Gm=class extends Wa{constructor(){super("latex")}createAtom(a){return new pl(a)}onPaste(a,b){if(!b)return!1;const y=typeof b=="string"?b:b.getData("application/x-latex")||b.getData("text/plain");return y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,y)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Ns(a)),a.startRecording(),!0):!1}insert(a,b,y){if(!a.contentWillChange({data:b,inputType:"insertText"}))return!1;y||(y={}),y.insertionMode||(y.insertionMode="replaceSelection"),y.selectionMode||(y.selectionMode="placeholder");const{silenceNotifications:E}=a;y.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,y.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(sl(a.selection)):y.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):y.insertionMode==="insertBefore"?a.collapseSelection("backward"):y.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=[];for(const ve of b)le.test(ve)&&re.push(new pl(ve));let ae=a.at(a.position);if(ae instanceof Td&&(ae=ae.lastChild),!(ae.parent instanceof Td)){const ve=new Td("");ae.parent.addChildAfter(ve,ae),ae=ve.firstChild}const de=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,y.selectionMode==="before"||(y.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(de)):de&&(a.position=a.offsetOf(de))),a.contentDidChange({data:b,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(b=>b.type==="latexgroup")}function $d(a){var b,y;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(y=(b=E.body)==null?void 0:b.filter(ee=>ee.type==="latex"))!=null?y:[]:[]}function v0(a,b){var y;let E=0,ee=!1;const re=Number.isFinite(b==null?void 0:b.before)?(y=b==null?void 0:b.before)!=null?y:0:a.lastOffset;for(;E<=re&&!ee;){const ve=a.at(E);ee=ve instanceof pl&&ve.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,de=!1;for(;ae<=re&&!de;){const ve=a.at(ae);de=!(ve instanceof pl&&ve.isSuggestion),de||ae++}return[E-1,ae-1]}new Gm;function Ef(a){const b=$d(a.model).filter(y=>y.isSuggestion);if(b.length!==0){a.model.position=a.model.offsetOf(b[0].leftSibling);for(const y of b)y.parent.removeChild(y)}}function zd(a,b){var y;const{model:E}=a;Ef(a);for(const De of $d(E))De.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Qc(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof pl&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof pl&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof pl&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(De=>De.value).join(""),de=zt(a,ae);if(de.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const De of ee)De.isError=!0;Qc(a);return}const ve=(y=b==null?void 0:b.atIndex)!=null?y:0;a.suggestionIndex=ve<0?de.length-1:ve%de.length;const Se=de[a.suggestionIndex];if(Se!==ae){const De=ee[ee.length-1];De.parent.addChildrenAfter([...Se.slice(ae.length-Se.length)].map(ze=>new pl(ze,{isSuggestion:!0})),De),kc(a,{interactive:!0})}qm(a,de)}function g0(a){const[b,y]=v0(a,{before:a.position});if(b===void 0||y===void 0)return!1;let E=!1;return a.getAtoms([b,y]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function Jc(a,b="accept",y){var E,ee;Qc(a);const re=Xm(a.model);if(!re)return!1;if(b==="accept-suggestion"||b==="accept-all"){const Se=$d(a.model).filter(De=>De.isSuggestion);if(Se.length!==0){for(const De of Se)De.isSuggestion=!1;a.model.position=a.model.offsetOf(Se[Se.length-1])}if(b==="accept-suggestion")return Se.length!==0}const de=$d(a.model).filter(Se=>!Se.isSuggestion).map(Se=>Se.value).join(""),ve=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(ve),a.switchMode((E=y==null?void 0:y.mode)!=null?E:"math"),b==="reject"||(Wa.insert(a.model,de,{selectionMode:(ee=y==null?void 0:y.selectItem)!=null&&ee?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Mf(a){var b;let y=document.getElementById(a);return y?y.dataset.refcount=Number(Number.parseInt((b=y.dataset.refcount)!=null?b:"0")+1).toString():(y=document.createElement("div"),y.setAttribute("aria-hidden","true"),y.dataset.refcount="1",y.id=a,document.body.append(y)),y}function yh(a){var b;const y=document.getElementById(a);if(!y)return;const E=Number.parseInt((b=y.getAttribute("data-refcount"))!=null?b:"0");E<=1?y.remove():y.dataset.refcount=Number(E-1).toString()}function Ym(a,b){const y=new Io({from:a.context}),E=new Gn({mode:"math",type:"root",body:ul(b,{context:y})}),ee=$c(Od(new Lr(E.render(y),{classes:"ML__base"}),y));return zc(ee,{classes:"ML__latex"}).toMarkup()}function qm(a,b){var y;if(b.length===0){Qc(a);return}let E="";for(const[re,ae]of b.entries()){const de=ae,ve=Ym(a,ae),Se=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">${ve}</span>`,Se&&(E+=`<span class="ML__popover__keybinding">${Se}</span>`),E+="</li>"}const ee=Jm(a,`<ul>${E}</ul>`);xh()&&((y=ee.querySelector(".ML__popover__current"))==null||y.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,b){var y;if(!a.element||a.element.mathfield!==a||!xh())return;if(((y=a.model.at(a.model.position))==null?void 0:y.type)!=="latex"){Qc(a);return}if(b!=null&&b.deferred){setTimeout(()=>_f(a),32);return}const E=Mu(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,ve=window.mathVirtualKeyboard.boundingRect.height,Se=document.getElementById("mathlive-suggestion-popover");E.x+Se.offsetWidth/2>re-ae?Se.style.left=`${re-Se.offsetWidth-ae}px`:E.x-Se.offsetWidth/2<0?Se.style.left="0":Se.style.left=`${E.x-Se.offsetWidth/2}px`;const De=E.y-E.height;ee-de-ve-E.y<De?(Se.classList.add("ML__popover--reverse-direction"),Se.classList.remove("top-tip"),Se.classList.add("bottom-tip"),Se.style.top=`${E.y-E.height-Se.offsetHeight-15}px`):(Se.classList.remove("ML__popover--reverse-direction"),Se.classList.add("top-tip"),Se.classList.remove("bottom-tip"),Se.style.top=`${E.y+15}px`)}function Qc(a){a.suggestionIndex=0;const b=document.getElementById("mathlive-suggestion-popover");b&&(b.classList.remove("is-visible"),b.innerHTML="")}function Jm(a,b){let y=document.getElementById("mathlive-suggestion-popover");return y||(y=Mf("mathlive-suggestion-popover"),Fl("suggestion-popover"),Fl("core"),y.addEventListener("pointerdown",E=>E.preventDefault()),y.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Jc(a,"reject"),Wa.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),y.innerHTML=window.MathfieldElement.createHTML(b),y}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(yh("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function ev(){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 b=a[1],y=b.match(/http.*\.ts[\?:]/);return y&&(b=a[2]),y=b.match(/(https?:.*):[0-9]+:[0-9]+/),y||(y=b.match(/at (.*(\.ts))[\?:]/),y||(y=b.match(/at (.*(\.mjs|\.js))[\?:]/))),y?y[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 "${b}").`),"")}var kf=null,b0,y0,Sh=((y0=(b0=globalThis==null?void 0:globalThis.document)==null?void 0:b0.currentScript)==null?void 0:y0.src)||ev();function x0(a){return hc(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(kf===null)try{const b=yield fetch(Sh,{method:"HEAD"});b.status===200&&(kf=b.url)}catch(b){console.error(`Invalid URL "${a}" (relative to "${Sh}")`)}return new URL(a,kf!=null?kf:Sh).href})}function tv(a,b,y={}){return new FontFace(a,`url(${b}.woff2) format('woff2')`,y)}var jl="not-loaded";function nv(){return hc(this,null,function*(){return jl="not-loaded",Df()})}function Df(){return hc(this,null,function*(){var a;if(jl!=="not-loaded")return;if(jl="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){jl="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const y=["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(y.every(ae=>E.includes(ae))){jl="ready";return}if(!window.MathfieldElement.fontsDirectory){jl="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),jl="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=>tv(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(de=>{try{return de.load()}catch(ve){}}))).forEach(de=>document.fonts.add(de)),jl="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")}jl="error"}})}function rv(a){let b=0;for(let y=0;y<a.length;y++)b=b*31+a.charCodeAt(y),b=b|0;return Math.abs(b)}function Ns(a,b){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Zl(a)&&a.dirty&&(a.atomBoundsCache=new Map,kc(a,b),a.atomBoundsCache=void 0)})))}function iv(a,b){var y;b=b!=null?b:{};const E=new Io({from:he(Ce({},a.context),{atomIdsSettings:{seed:b.forHighlighting?rv(Gn.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(y=b.forHighlighting)!=null?y:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return zc(Od(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function S0(a,b){const{model:y}=a;y.root.caret=void 0,y.root.isSelected=!1,y.root.containsCaret=!0;for(const ee of y.atoms)ee.caret=void 0,ee.isSelected=!1,ee.containsCaret=!1;if(y.selectionIsCollapsed){const ee=y.at(y.position);ee.caret=a.model.mode;let re=ee.parent;for(;re;)re.containsCaret=!0,re=re.parent}else{const ee=y.getAtoms(y.selection,{includeChildren:!0});for(const re of ee)re.isSelected=!0}return iv(a,b).toMarkup()}function kc(a,b){if(!Zl(a))return;b!=null||(b={});const y=a.element.querySelector("[part=virtual-keyboard-toggle]");y&&(y.style.display=a.hasEditableContent?"":"none");const E=a.field;if(!E)return;const ee=a.isSelectionEditable&&a.hasFocus(),re=E.classList.contains("ML__focused");re&&!ee?E.classList.remove("ML__focused"):!re&&ee&&E.classList.add("ML__focused");let ae=S0(a,b);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 ve=a.options.contentPlaceholder;ve&&(ae+=`<span part=placeholder class="ML__content-placeholder">${cl(ve)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Lf(a,b.interactive),a.dirty=!1}function Lf(a,b){const y=a.field;if(!y)return;for(const de of y.querySelectorAll(".ML__selection, .ML__contains-highlight"))de.remove();!(b!=null&&b)&&jl!=="error"&&jl!=="ready"&&setTimeout(()=>{jl==="ready"?Lf(a):setTimeout(()=>Lf(a),128)},32);const E=a.model,ee=y.offsetWidth,re=y.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 ve=_d(a,ac(a,de),ae);if(ve){ve.left/=ae,ve.right/=ae,ve.top/=ae,ve.bottom/=ae;const Se=document.createElement("div");Se.classList.add("ML__contains-highlight"),Se.style.position="absolute",Se.style.left=`${ve.left+1}px`,Se.style.top=`${Math.ceil(ve.top)}px`,Se.style.width=`${Math.ceil(ve.right-ve.left)}px`,Se.style.height=`${Math.ceil(ve.bottom-ve.top)}px`,y.insertBefore(Se,y.childNodes[0])}}return}for(const de of av(Dd(a,{excludeAtomsWithBackground:!0}))){de.left/=ae,de.right/=ae,de.top/=ae,de.bottom/=ae;const ve=document.createElement("div");ve.classList.add("ML__selection"),ve.style.position="absolute",ve.style.left=`${de.left}px`,ve.style.top=`${de.top}px`,ve.style.width=`${Math.ceil(de.right-de.left)}px`,ve.style.height=`${Math.ceil(de.bottom-de.top-1)}px`,y.insertBefore(ve,y.childNodes[0])}}function av(a){let b=[];for(const y of a){let E=!1;for(const ee of b)if(y.left===ee.left&&y.right===ee.right&&y.top===ee.top&&y.bottom===ee.bottom){E=!0;break}E||b.push(y)}a=b,b=[];for(const y of a){let E=0;for(const ee of a)if(y.left>=ee.left&&y.right<=ee.right&&y.top>=ee.top&&y.bottom<=ee.bottom&&(E+=1,E>1))break;E===1&&b.push(y)}return b}var w0=3,Du;function $l(a,b){b=Ce({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},b!=null?b:{}),Du||(Du={});for(const y of Object.keys(a))console.assert(!Du[y],"Selector already defined: ",y),Du[y]=he(Ce({},b),{fn:a[y]})}function wh(a){let b;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return wh(a[1]);b=a[0]}else b=a;return b=b.replace(/-\w/g,y=>y[1].toUpperCase()),Du[b]}function ed(a){var b;return(b=wh(a))==null?void 0:b.target}function ov(a,b){var y;if(!b)return!1;let E,ee=[],re=!1,ae=!1;Pe(b)?(E=b[0],ee=b.slice(1)):E=b,E=E.replace(/-\w/g,Se=>Se[1].toUpperCase());const de=Du[E],ve=de==null?void 0:de.target;if(ve==="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)||Ef(a),Du[E].fn(a.model,...ee),zd(a),ae=!0,re=!0}else if(ve==="virtual-keyboard")ae=(y=window.mathVirtualKeyboard.executeCommand(b))!=null?y:!1,re=!0;else if(Du[E]){if(!a.isSelectionEditable&&(de!=null&&de.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=Du[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return ve!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||de!=null&&de.changeSelection&&b!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),de!=null&&de.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&Ns(a),re}function sv(a,b){var y;if(!a)return!1;a.focus(),gp.keypressVibration&&nt()&&navigator.vibrate(w0);const E=wh(b);window.MathfieldElement.playSound((y=E==null?void 0:E.audioFeedback)!=null?y:"keypress");const ee=a.executeCommand(b);return a.scrollIntoView(),ee}$l({performWithFeedback:(a,b)=>sv(a,b)});function lv(a){return zd(a,{atIndex:a.suggestionIndex+1}),!1}function uv(a){return zd(a,{atIndex:a.suggestionIndex-1}),!1}$l({complete:Jc},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),$l({nextSuggestion:lv,previousSuggestion:uv},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Af="mathlive#virtual-keyboard-message";function Ch(a){var b;return a.type!=="message"?!1:((b=a.data)==null?void 0:b.type)===Af}var cv=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(b){this.sendMessage("update-setting",{alphabeticLayout:b})}set layouts(b){this.sendMessage("update-setting",{layouts:b})}get normalizedLayouts(){return[]}set editToolbar(b){this.sendMessage("update-setting",{editToolbar:b})}set actionKeycap(b){this.sendMessage("update-setting",{actionKeycap:b})}set shiftKeycap(b){this.sendMessage("update-setting",{shiftKeycap:b})}set backspaceKeycap(b){this.sendMessage("update-setting",{backspaceKeycap:b})}set tabKeycap(b){this.sendMessage("update-setting",{tabKeycap:b})}set container(b){throw new Error("Container inside an iframe cannot be changed")}show(b){this.sendMessage("show",b)}hide(b){this.sendMessage("hide",b)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(b){b?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(b){return this.sendMessage("execute-command",{command:b}),!0}updateToolbar(b){this.sendMessage("update-toolbar",b)}update(b){this.sendMessage("update-setting",b)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(b,y,E){this.listeners[b]||(this.listeners[b]=new Set),this.listeners[b].has(y)||this.listeners[b].add(y)}dispatchEvent(b){return!this.listeners[b.type]||this.listeners[b.type].size===0?!0:(this.listeners[b.type].forEach(y=>{typeof y=="function"?y(b):y==null||y.handleEvent(b)}),!b.defaultPrevented)}removeEventListener(b,y,E){this.listeners[b]&&this.listeners[b].delete(y)}handleEvent(b){if(Ch(b)){if(!Ld(b.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${b.origin}) cannot be handled`,"SecurityError");this.handleMessage(b.data)}}handleMessage(b){const{action:y}=b;if(y==="execute-command"){const{command:E}=b;ed(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(y==="synchronize-proxy"){this._boundingRect=b.boundingRect,this._isShifted=b.isShifted;return}if(y==="geometry-changed"){this._boundingRect=b.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(b,y={}){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(Ce({type:Af,action:b},y),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:"&alpha;&beta;&gamma;",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>&#x03c6;</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>&#x03c2;</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>&#x03f5;</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>&rho;</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>&tau;</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>&upsilon;</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>&theta;</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>&iota;</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>&omicron;</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>&pi;</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>&alpha;</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>&sigma;</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>&delta;</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>&gamma;</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>&eta;</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>&xi;</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>&kappa;</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>&lambda;</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>&zeta;</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>&chi;</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>&psi;</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>&omega;</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>&beta;</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>&nu;</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>&mu;</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>&#x03b5;</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>&#x03d1;</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>&#x3f0;</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>&#x03d6;</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>&#x03f1;</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"&infin;\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]"]]}},Tf={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"}]},Kd;function E0(a,b){var y,E,ee;const re=uc.singleton;if(!re)return;const ae=td(a),de=(E=(y=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:y.variants)!=null?E:"";if(typeof de=="string"&&!M0(de)||Array.isArray(de)&&de.length===0){b==null||b();return}const ve={};let Se="";for(const Ln of fv(de)){const kr=k0(Ln),Dn=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);ve[Dn]=kr;const[ar,Pr]=If(kr);Se+=`<div id=${Dn} class="item ${Pr}">${ar}</div>`}const De=document.createElement("div");De.setAttribute("aria-hidden","true"),De.className="MLK__variant-panel",De.style.height="auto";const ze=Object.keys(ve).length;let at=5;ze===1?at=1:ze===2||ze===4?at=2:ze===3||ze===5||ze===6?at=3:ze>=7&&ze<14&&(at=4),De.style.width=`calc(var(--variant-keycap-length) * ${at} + 12px)`,De.innerHTML=gp.createHTML(Se),ku.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:De}),Kd=new AbortController;const{signal:Et}=Kd,Ot=a==null?void 0:a.getBoundingClientRect();if(Ot){Ot.top-De.clientHeight<0&&(De.style.width="auto",ze<=6?De.style.height="56px":ze<=12?De.style.height="108px":ze<=18?De.style.height="205px":De.classList.add("compact"));const Ln=Math.max(0,Math.min(window.innerWidth-De.offsetWidth,(Ot.left+Ot.right-De.offsetWidth)/2)),kr=Ot.top-De.clientHeight+5;De.style.transform=`translate(${Ln}px, ${kr}px)`,De.classList.add("is-visible"),requestAnimationFrame(()=>{De.addEventListener("pointerup",Dn=>{const ar=td(Dn.target);!(ar!=null&&ar.id)||!ve[ar.id]||(Eh(ve[ar.id]),Hd(),b==null||b(),Dn.preventDefault())},{capture:!0,passive:!1,signal:Et}),De.addEventListener("pointerenter",Dn=>{const ar=td(Dn.target);!(ar!=null&&ar.id)||!ve[ar.id]||ar.classList.add("is-active")},{capture:!0,signal:Et}),De.addEventListener("pointerleave",Dn=>{const ar=td(Dn.target);!(ar!=null&&ar.id)||!ve[ar.id]||ar.classList.remove("is-active")},{capture:!0,signal:Et}),window.addEventListener("pointercancel",()=>{Hd(),b==null||b()},{signal:Et}),window.addEventListener("pointerup",()=>{Hd(),b==null||b()},{signal:Et})})}}function Hd(){Kd==null||Kd.abort(),Kd=null,ku.state==="open"&&ku.close()}function dv(a){if(a==="foreground-color"){const b=[];for(const y of Object.keys(Ge))b.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ge[y]+'"></span>',command:["applyStyle",{color:y}]});return b}if(a==="background-color"){const b=[];for(const y of Object.keys(Ke))b.push({class:"swatch-button",label:'<span style="background:'+Ke[y]+'"></span>',command:["applyStyle",{backgroundColor:y}]});return b}}function M0(a){return Tf[a]!==void 0}function fv(a){var b;return typeof a!="string"?a:(Tf[a]||(Tf[a]=(b=dv(a))!=null?b:[]),Tf[a])}function hv(a){return typeof a=="string"?a:Object.entries(a).map(([b,y])=>`${b}:${y} !important`).join(";")}function pv(a){return Object.keys(a).map(b=>`${b} {${hv(a[b])}}`).join("")}function Wd(a){if(!a)return"";const b=new Io,y=new Gn({mode:"math",type:"root",body:ul(a,{context:b,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=$c(Od(new Lr(y.render(b),{classes:"ML__base"}),b));return zc(E,{classes:"ML__latex"}).toMarkup()}function Zd(a){var b;if(Array.isArray(a))return a.map(E=>Zd(E)).flat();const y=typeof a=="string"?{markup:a}:a;return"rows"in y&&Array.isArray(y.rows)&&(y.rows=y.rows.map(E=>E.map(ee=>k0(ee)))),(b=y.id)!=null||(y.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[y]}function mv(){var a,b;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const de=Fd();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"}[Ze.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=(b=ee[E])!=null?b: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 ve=[];for(const Se of de)/[a-z]/.test(Se)?ve.push({label:Se,class:"hide-shift",shift:{label:Se.toUpperCase()},variants:M0(Se)?Se:void 0}):Se==="~"?E!=="dvorak"?ve.push("[backspace]"):ve.push({label:"[backspace]",width:1}):Se==="^"?ve.push("[shift]"):Se===" "&&ve.push("[separator-5]");ae.push(ve)}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:Zd({rows:ae})}}function _0(a){if(a==="alphabetic")return mv();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),_0(C0[a]);let b;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=Je(ee,["rows"]);b=he(Ce({},ae),{layers:Zd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=Je(ee,["markup"]);b=he(Ce({},ae),{layers:Zd(a.markup)})}else b=Ce({},a),"layers"in a?b.layers=Zd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let y=!1,E=!1;for(const ee of b.layers)if(ee.rows)for(const re of ee.rows.flat()){nd(re)&&(y=!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)&&(b.displayShiftedKeycaps=y),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(b.displayEditToolbar=!E),b}function vv(a,b){var y,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const de=ae,ve=[re===b?"selected":"layer-switch"];de.tooltip&&ve.push("MLK__tooltip"),de.labelClass&&ve.push(...de.labelClass.split(" ")),ee+=`<div class="${ve.join(" ")}"`,de.tooltip&&(ee+=" data-tooltip='"+((y=Qe(de.tooltip))!=null?y:de.tooltip)+"' "),re!==b&&(ee+=`data-layer="${de.layers[0].id}"`),ee+=`>${(E=de.label)!=null?E:"untitled"}</div>`}return ee+="</div>",ee}function gv(a,b){let y="";if(a.editToolbar==="none")return"";const ee=[];b.selectionIsCollapsed?ee.push("undo","redo","pasteFromClipboard"):ee.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const re={undo:`<div class='action ${b.canUndo===!1?"disabled":""}'
data-command='"undo"'
data-tooltip='${Qe("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${b.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${Qe("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${Qe("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${Qe("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${Qe("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return y+=ee.map(ae=>re[ae]).join(""),y}function bv(a){for(const b of a)yv(b)}function yv(a){const b=uc.singleton;if(!b)return;const y={};if(!a.id){if(a.hasAttribute("data-label")&&(y.label=a.dataset.label),a.hasAttribute("data-latex")&&(y.latex=a.dataset.latex),a.hasAttribute("data-key")&&(y.key=a.dataset.key),a.hasAttribute("data-insert")&&(y.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(y.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(y.aside=a.dataset.aside),a.className&&(y.class=a.className),!y.label&&!y.latex&&!y.key&&!y.insert&&(y.latex=a.innerText,y.label=a.innerHTML),a.hasAttribute("data-command"))try{y.command=JSON.parse(a.dataset.command)}catch(E){}a.id=b.registerKeycap(y)}if(!a.innerHTML){const[E,ee]=If(y);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xv(){Fl("virtual-keyboard"),Fl("core"),Df()}function Sv(){x("core"),x("virtual-keyboard")}var wv=`<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 Cv(a){a.resetKeycapRegistry(),xv();const b=document.createElement("div");b.className="ML__keyboard";const y=document.createElement("div");y.className="MLK__plate",y.innerHTML=window.MathfieldElement.createHTML(wv+a.normalizedLayouts.map((ae,de)=>Ev(a,ae,de)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(y),b.appendChild(E),b.addEventListener("pointerdown",_v,{passive:!1});const ee=b.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",de=>{var ve,Se;let De=de.target,ze="";for(;De&&!ze;)ze=(ve=De==null?void 0:De.getAttribute("data-command"))!=null?ve:"",De=(Se=De==null?void 0:De.parentElement)!=null?Se:null;ze&&a.executeCommand(JSON.parse(ze))});bv(b.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const re=b.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,b}function Ev(a,b,y){const E=[];if(!("layers"in b))return"";for(const ee of b.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ee.id}">`),(a.normalizedLayouts.length>1||b.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(vv(a,y)),b.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Mv(a,ee)),E.push("</div>");return E.join("")}function Mv(a,b){if(typeof b=="string")return b;let y="";if(typeof b.style=="string"?y+=`<style>${b.style}</style>`:typeof b.style=="object"&&(y+=`<style>${pv(b.style)}</style>`),b.backdrop&&(y+=`<div class='${b.backdrop}'>`),b.container&&(y+=`<div class='${b.container}'>`),b.rows){y+="<div class=MLK__rows>";for(const E of b.rows){y+="<div dir='ltr' class=MLK__row>";for(const ee of E)if(ee){const re=a.registerKeycap(ee),[ae,de]=If(ee);/(^|\s)separator/.test(de)?y+=`<div class="${de}"`:y+=`<div tabindex="-1" id="${re}" class="${de}"`,ee.tooltip&&(y+=` data-tooltip="${ee.tooltip}"`),y+=`>${ae}</div>`}y+="</div>"}y+="</div>"}else b.markup&&(y+=b.markup);return b.container&&(y+="</div>"),b.backdrop&&(y+="</div>"),y}function If(a,b={shifted:!1}){var y,E,ee,re,ae,de,ve;let Se="",De=(y=a.class)!=null?y:"";if(b.shifted&&nd(a)&&(De+=" is-active"),b.shifted&&"shift"in a)typeof a.shift=="string"?Se=Wd(a.shift):typeof a.shift=="object"&&(Se=a.shift.label?a.shift.label:(E=Wd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(De=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(Se=a.label?a.label:(ae=Wd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let ze;typeof a.shift=="string"?ze=Wd(a.shift):a.shift.label?ze=a.shift.label:ze=(de=Wd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?de:"",Se+=`<span class="MLK__shift">${ze}</span>`}a.aside&&(Se+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(De)&&(De+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(De)||(De+=" MLK__keycap"),!/\bw[0-9]+\b/.test(De)&&a.width&&(De+=(ve={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?ve:""),[Se,De||"MLK__keycap"]}var Dc={"[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:"&#x2212;",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"&divide;"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"&times;",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 b;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Dc[a])return{latex:a};a={label:a}}let y;return"label"in a&&a.label&&Dc[a.label]&&(y=he(Ce(Ce({},Dc[a.label]),a),{label:Dc[a.label].label})),"key"in a&&a.key&&Dc[a.key]&&(y=he(Ce(Ce({},Dc[a.key]),a),{key:Dc[a.key].key})),y?(y.command==="insertDecimalSeparator"&&(y.label=(b=window.MathfieldElement.decimalSeparator)!=null?b:"."),a.label==="[action]"&&(y=Ce(Ce({},y),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(y=Ce(Ce({},y),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(y=Ce(Ce({},y),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(y=Ce(Ce({},y),window.mathVirtualKeyboard.tabKeycap)),y):a}var Vd;function _v(a){var b;if(a.button!==0)return;const y=uc.singleton;if(!y)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){y.currentLayer=(b=E.getAttribute("data-layer"))!=null?b:"",a.preventDefault();return}const ee=td(a.target);if(!(ee!=null&&ee.id))return;const re=y.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}),nd(re)&&(ee.classList.add("is-active"),y.shiftPressCount++),re.variants&&(Vd&&clearTimeout(Vd),Vd=setTimeout(()=>{ee.classList.contains("is-pressed")&&(ee.classList.remove("is-pressed"),ee.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),E0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Pf(a){return b=>{const y=td(b.target);if(!(y!=null&&y.id))return;const E=uc.singleton;if(!E)return;const ee=E.getKeycap(y.id);if(ee){if(b.type==="pointerenter"&&b.target===y&&b.isPrimary&&y.classList.add("is-pressed"),b.type==="pointercancel"){y.classList.remove("is-pressed"),nd(ee)&&(E.shiftPressCount--,y.classList.toggle("is-active",E.isShifted)),a.abort();return}if(b.type==="pointerleave"&&b.target===y){y.classList.remove("is-pressed"),nd(ee)&&(E.shiftPressCount--,y.classList.toggle("is-active",E.isShifted));return}if(b.type==="pointerup"){Vd&&clearTimeout(Vd),nd(ee)?y.classList.toggle("is-active",E.isShifted):y.classList.contains("is-pressed")&&(y.classList.remove("is-pressed"),E.isShifted&&ee.shift?typeof ee.shift=="string"?E.executeCommand(["insert",ee.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Eh(ee.shift):Eh(ee),E.shiftPressCount===1&&!b.shiftKey&&(E.shiftPressCount=0)),a.abort(),b.preventDefault();return}}}}function Eh(a){var b;let y=a.command;!y&&a.insert&&(y=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!y&&a.key&&(y=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!y&&a.latex&&(y=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),y||(y=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(b=uc.singleton)==null||b.executeCommand(y)}function kv(a){if(a.nodeType!==1)return!1;const b=a.classList;return b.contains("MLK__keycap")||b.contains("shift")||b.contains("action")||b.contains("fnbutton")||b.contains("bigfnbutton")}function td(a){if(!a)return;let b=a;for(;b&&!kv(b);)b=b.parentElement;return b!=null?b:void 0}function nd(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var uc=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var b,y,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(y=(b=window.document)==null?void 0:b.body)!=null?y: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=D0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&&lt()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{D0()||this.hide()},300)})}get currentLayer(){var b,y,E;return(E=(y=(b=this._element)==null?void 0:b.querySelector(".MLK__layer.is-visible"))==null?void 0:y.id)!=null?E:""}set currentLayer(b){var y;if(!this._element){this.latentLayer=b;return}let E=b?this._element.querySelector(`#${b}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((y=this._element.querySelector(".MLK__layer.is-visible"))==null||y.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(b){var y;this._shiftPressCount=b>2||b<0?0:b,(y=this._element)==null||y.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(b){const y="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[y]=b,y}getKeycap(b){return b?this.keycapRegistry[b]:void 0}getLayer(b){const y=this.normalizedLayouts;for(const E of y)for(const ee of E.layers)if(ee.id===b)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(b){this._alphabeticLayout=b,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(b){this._actionKeycap=typeof b=="string"?{label:b}:b}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(b){this._shiftKeycap=typeof b=="string"?{label:b}:b}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(b){this._backspaceKeycap=typeof b=="string"?{label:b}:b}get tabKeycap(){return this._tabKeycap}set tabKeycap(b){this._tabKeycap=typeof b=="string"?{label:b}:b}get layouts(){return this._layouts}set layouts(b){this.updateNormalizedLayouts(b),this.rebuild()}updateNormalizedLayouts(b){const y=Array.isArray(b)?[...b]:[b],E=y.findIndex(ee=>ee==="default");E>=0&&y.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(y),this._normalizedLayouts=y.map(ee=>_0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(b){this._editToolbar=b,this.rebuild()}get container(){return this._container}set container(b){this._container=b,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(b){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(b,y,E){this.listeners[b]||(this.listeners[b]=new Set),this.listeners[b].has(y)||this.listeners[b].add(y)}dispatchEvent(b){return!this.listeners[b.type]||this.listeners[b.type].size===0?!0:(this.listeners[b.type].forEach(y=>{typeof y=="function"?y(b):y==null||y.handleEvent(b)}),!b.defaultPrevented)}removeEventListener(b,y,E){this.listeners[b]&&this.listeners[b].delete(y)}get element(){return this._element}set element(b){var y;this._element!==b&&((y=this._element)==null||y.remove(),this._element=b)}get visible(){return this._visible}set visible(b){b?this.show():this.hide()}get boundingRect(){var b;if(!this._visible)return new DOMRect;const y=(b=this._element)==null?void 0:b.getElementsByClassName("MLK__plate")[0];return y?y.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var b,y;const E=this.boundingRect.height;if(this.container===document.body){(b=this._element)==null||b.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(y=this._element)==null||y.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const b=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=b,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const b=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(b&&(b.backdrop||b.container)));const y=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(y)for(const E of y){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=If(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(b){var y;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}),(y=this._element)==null||y.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,b!=null&&b.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(b){var y;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}),Hd(),Sv(),(y=this._element)==null||y.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(E.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var b,y;return(y=(b=this.element)==null?void 0:b.offsetHeight)!=null?y:0}buildAndAttachElement(){var b;console.assert(!this.element),this.element=Cv(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",y=>{y.shiftKey||((y.ctrlKey||y.button===2)&&E0(y.target),y.preventDefault(),y.stopPropagation())},{capture:!0}),(b=this.container)==null||b.appendChild(this.element)}handleEvent(b){if(Ch(b)){if(!Ld(b.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${b.origin}) cannot be handled`,"SecurityError");b.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:b.data.action!=="update-setting"&&b.data.action!=="proxy-created"&&b.data.action!=="execute-command"&&(console.assert(b.source!==void 0),this.connectedMathfieldWindow=b.source),this.handleMessage(b.data,b.source)}if(this._element)switch(b.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":b.button!==2&&b.preventDefault();break;case"keydown":{b.key==="Shift"&&!b.repeat&&(this.shiftPressCount=1);break}case"keyup":{(b.key==="Shift"||!b.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(b,y){const{action:E}=b;if(E==="execute-command"){const{command:ee}=b,re=ed(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},y),E!=="disconnect"&&window===window.top){if(E==="show"){typeof b.animate!="undefined"?this.show({animate:b.animate}):this.show();return}if(E==="hide"){typeof b.animate!="undefined"?this.hide({animate:b.animate}):this.hide();return}if(E==="update-setting"){b.alphabeticLayout&&(this.alphabeticLayout=b.alphabeticLayout),b.layouts&&(this.layouts=b.layouts),b.editToolbar&&(this.editToolbar=b.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},y);return}}}sendMessage(b,y,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:Ce({type:Af,action:b},y)}));return}if(E)E.postMessage(Ce({type:Af,action:b},y),{targetOrigin:this.targetOrigin});else if(y.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:y.command})),b==="execute-command"&&Array.isArray(y.command)&&y.command[0]==="insert"){const ee=y.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(b){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:b},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(b){const y=this._element;if(!y)return;y.classList.toggle("is-math-mode",b.mode==="math"),y.classList.toggle("is-text-mode",b.mode==="text"),y.classList.toggle("can-undo",b.canUndo),y.classList.toggle("can-redo",b.canRedo),y.classList.toggle("can-copy",!b.selectionIsCollapsed),y.classList.toggle("can-copy",!b.selectionIsCollapsed),y.classList.toggle("can-paste",!0);const E=y.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=gv(this,b)}update(b){this._style=b.style,this.updateToolbar(b)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(b){let y,E=[],ee=ed(b);return Pe(b)?(y=b[0],y==="performWithFeedback"&&(b=b.slice(1),ee=ed(b)),E=b.slice(1)):y=b,y=y.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Du[y].fn(void 0,...E):(this.sendMessage("execute-command",{command:b}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function D0(){var a,b;let y=Cf(),E=null;for(;y;){if("host"in y&&((b=(a=y.host)==null?void 0:a.tagName)==null?void 0:b.toLowerCase())==="math-field"){E=y.host;break}y=y.parentNode}return E}if(ot()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=uc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>cv.singleton,configurable:!0});function Of(a){const b={};for(const y of Object.keys(a))switch(y){case"scriptDepth":const E=a.scriptDepth;if(Pe(E))b.scriptDepth=[E[0],E[1]];else if(typeof E=="number")b.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(de=>parseInt(de.trim()));b.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=uc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}b.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?Ze.locale.startsWith("fr")?b.letterShapeStyle="french":b.letterShapeStyle="tex":b.letterShapeStyle=a.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(a.defaultMode)?b.defaultMode=a.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),b.defaultMode="math");break;case"macros":b.macros=Rn(a.macros);break;default:Pe(a[y])?b[y]=[...a[y]]:typeof a[y]=="object"&&!(a[y]instanceof Element)&&y!=="computeEngine"?b[y]=Ce({},a[y]):b[y]=a[y]}return b}function Lc(a,b){let y;typeof b=="string"?y=[b]:b===void 0?y=Object.keys(a):y=b;const E={};for(const ee of y)a[ee]===null?E[ee]=null:Pe(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=Ce({},a[ee]):E[ee]=a[ee];return typeof b=="string"?E[b]:E}function Bf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:Ue,backgroundColorMap:et,letterShapeStyle:Ze.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 L0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function cc(a,b){!a||!b||(Pe(a)?a.forEach(y=>cc(y,b)):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(b),cc(a.body,b),cc(a.above,b),cc(a.below,b),cc(a.subscript,b),cc(a.superscript,b)))}function Mh(a,b,y,E){function ee(ae,de){for(const ve of re)if(ve.style[ae]!==de)return!1;return!0}if(b=a.normalizeRange(b),b[0]===b[1])return!1;const re=a.getAtoms(b,{includeChildren:!0});E.operation==="toggle"&&(y.color&&ee("color",y.color)&&(y.color="none",delete y.verbatimColor),y.backgroundColor&&ee("backgroundColor",y.backgroundColor)&&(y.backgroundColor="none",delete y.verbatimBackgroundColor),y.fontFamily&&ee("fontFamily",y.fontFamily)&&(y.fontFamily="none"),y.fontSeries&&ee("fontSeries",y.fontSeries)&&(y.fontSeries="auto"),y.fontShape&&ee("fontShape",y.fontShape)&&(y.fontShape="auto"),y.fontSize&&ee("fontSize",y.fontSize)&&(y.fontSize=so),y.variant&&ee("variant",y.variant)&&(y.variant="normal"),y.variantStyle&&ee("variantStyle",y.variantStyle)&&(y.variantStyle=""));for(const ae of re)ae.applyStyle(y);return!0}function Dv(a,b){const y=a.at(a.position);if(y.type==="composition")y.value=b;else{const{caret:E}=y;y.caret=void 0;const ee=new Wu(b,{mode:y.mode});ee.caret=E,y.parent.addChildAfter(ee,y),a.position+=1}}function Lv(a){const b=a.at(a.position);b.type==="composition"&&(b.parent.removeChild(b),a.position-=1)}tr(["math","displaymath"],tu),tr("center",tu),Wt("displaylines","",{parse:a=>{const b=[];let y=[];a.beginContext({tabular:!0});do{if(a.end()||a.match("<}>"))break;a.matchColumnSeparator()||a.matchRowSeparator()?(b.push([y]),y=[]):y.push(...a.scan(E=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(E)))}while(!0);return a.endContext(),b.push([y]),b},createAtom:a=>new Xa("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),cr("array","{columns:colspec}",(a,b,y,E)=>new Xa(a,_h(b),y,{columns:E[0],mathstyleName:"textstyle"})),cr(["equation","equation*","subequations"],"",(a,b,y)=>new Xa(a,_h(b),y,{columns:[{align:"c"}]})),cr(["multline","multline*"],"",tu),cr(["align","align*","aligned","eqnarray"],"",tu),cr("split","",tu),cr(["gather","gathered"],"",tu),cr(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",tu),cr(["smallmatrix","smallmatrix*"],"[columns:colspec]",tu),cr(["cases","dcases","rcases"],"",tu);function Av(a){for(const b of a)for(const y of b)if(y.length>0)return!1;return!0}function _h(a,b=1){return Av(a)?Array(b).fill([[new Gn({type:"first"}),new da]]):a.map(y=>y.length===0?[[new Gn({type:"first"})]]:y.map(E=>E.length===0?[new Gn({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Gn({type:"first"})),E)))}function tu(a,b=[[[]]],y=[],E=[]){switch(b=_h(b,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new Xa(a,b,y,{mathstyleName:"textstyle"});case"displaymath":return new Xa(a,b,y,{mathstyleName:"textstyle"});case"center":return new Xa(a,b,y,{columns:[{align:"c"}]});case"multline":case"multline*":return new Xa(a,b,y,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Xa(a,b,y,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Xa(a,b,y,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Xa(a,b,y,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Ac(E[0])});case"bmatrix":case"bmatrix*":return new Xa(a,b,y,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Ac(E[0])});case"Bmatrix":case"Bmatrix*":return new Xa(a,b,y,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Ac(E[0])});case"vmatrix":case"vmatrix*":return new Xa(a,b,y,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Ac(E[0])});case"Vmatrix":case"Vmatrix*":return new Xa(a,b,y,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Ac(E[0])});case"matrix":case"matrix*":return new Xa(a,b,y,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Ac(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new Xa(a,b,y,{mathstyleName:"scriptstyle",columns:Ac(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Xa(a,b,y,{mathstyleName:a==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new Xa(a,b,y,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Xa(a,b,y,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const de of b)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 Xa(a,b,y,{arraycolsep:0,columns:re,minColumns:2})}}return new Xa(a,b,y,{mathstyleName:"textstyle"})}function Ac(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 Tv(a,b){let y=a.at(a.position);for(;y&&!(y.parent instanceof Xa);)y=y.parent;if(y&&y.type==="array"&&y.environmentName,!y||!(y.parent instanceof Xa)){const E=a.at(a.position);if(y=E,!y.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=Ff()),ee.length===0&&(ee=Ff());let ae;return b.endsWith("column")?(ae=tu("split",[[re,ee]]),a.root=ae,Tc(ae,0,0)?Ic(a,ae,0,0):Tc(ae,0,1)?Ic(a,ae,0,1):a.position=a.offsetOf(E)):(ae=tu("lines",[[re],[ee]]),a.root=ae,Tc(ae,0,0)?Ic(a,ae,0,0):Tc(ae,1,0)?Ic(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(y.parent instanceof Zo){const ee=y.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=Ff()),re.length===0&&(re=Ff());let de="pmatrix";const ve=ee.leftDelim,Se=ee.rightDelim;ve==="("&&(Se===")"||Se==="?")?de="pmatrix":(ve==="["||ve==="\\lbrack")&&(Se==="]"||Se==="\\rbrack"||Se==="?")?de="bmatrix":ve==="\\vert"&&Se==="\\vert"?de="vmatrix":ve==="\\Vert"&&Se==="\\Vert"?de="Vmatrix":(ve==="{"||ve==="\\lbrace")&&(Se==="."||Se==="?")&&(de="cases");const De=tu(de,b.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(De,ee),ee.parent.removeChild(ee),Tc(De,0,0)?Ic(a,De,0,0):b.endsWith("column")?Tc(De,0,1)?Ic(a,De,0,1):a.position=a.offsetOf(y):Tc(De,1,0)?Ic(a,De,1,0):a.position=a.offsetOf(y),[void 0,[0,0]]}}return y&&y.parent instanceof Xa?[y.parent,y.parentBranch]:[void 0,[0,0]]}function Tc(a,b,y){const E=a.getCell(b,y);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Iv(a,b,y,E){const ee=b.getCell(y,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function Ic(a,b,y,E){const ee=Iv(a,b,y,E);typeof ee!="number"&&a.setSelection(ee)}function Nf(a,b,y,E,ee){const re=b.getCell(y,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Rf(a,b){const[y,[E,ee]]=Tv(a,b);if(y)switch(b){case"after row":y.addRowAfter(E),Nf(a,y,E+1,0,"end");break;case"after column":if(y.maxColumns<=y.colCount){a.announce("plonk");return}y.addColumnAfter(ee),Nf(a,y,E,ee+1,"end");break;case"before row":y.addRowBefore(E),Nf(a,y,E,0,"start");break;case"before column":if(y.maxColumns<=y.colCount){a.announce("plonk");return}y.addColumnBefore(ee),Nf(a,y,E,ee,"start");break}}function A0(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pv(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function T0(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Ov(a){return a.contentWillChange({inputType:"insertText"})?(Rf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(a,b){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let y=".",E=".";switch(b){case"pmatrix":case"pmatrix*":y="(",E=")";break;case"bmatrix":case"bmatrix*":y="[",E="]";break;case"Bmatrix":case"Bmatrix*":y="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":y="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":y="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":y=".",E=".";break;case"cases":case"dcases":y="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=b,re.leftDelim=y,re.rightDelim=E,a.contentDidChange({}),!0}function P0(a,b){let y=a.at(a.position);for(;y&&!(Array.isArray(y.parentBranch)&&y.parent instanceof Xa);)y=y.parent;if(Array.isArray(y==null?void 0:y.parentBranch)&&(y==null?void 0:y.parent)instanceof Xa){const E=y.parent,ee=y.parentBranch;let re;switch(b){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 Bv(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Nv(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}$l({addRowAfter:A0,addColumnAfter:T0,addRowBefore:Pv,addColumnBefore:Ov,removeRow:Bv,removeColumn:Nv,setEnvironment:I0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Ff(){return[new da]}var O0=class nm{constructor(b){this.recording=!1,this.model=b,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(b){b&&this.index>=0&&(this.stack[this.index].selection=b),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(b){return this.recording?(b&&b===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=b!=null?b:"",!0):!1}};O0.maximumDepth=1e3;var Rv=O0;function kh(a,b,y){if(a.at(b).mode!=="text")return b;const E=y==="backward"?-1:1;let ee;if(fe.test(a.at(b).value)){let re=b,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(b).value)){let re=b;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=b;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 rd(a,b,y){var E,ee,re,ae,de,ve,Se;const De=a.position;(E=y==null?void 0:y.extend)!=null&&E||a.collapseSelection(b);let ze=a.at(a.position);if(b==="forward"&&(ze.type==="subsup"?(ze=ze.rightSibling,ze||(ze=a.at(a.position+1))):ze=a.at(a.position+1)),!ze)return a.announce("plonk"),!1;let at=a.offsetOf(ze);if(ze instanceof du)at=kh(a,at,b);else if(ze instanceof pl)if(ze.isSuggestion)for(console.assert(b==="forward");ze&&ze instanceof pl;)ze.isSuggestion=!1,at=a.offsetOf(ze),ze=ze.rightSibling;else if(b==="forward"){if(ze=ze.rightSibling,!ze||!(ze instanceof pl))return a.announce("plonk"),!1;for(;ze&&ze instanceof pl&&/[a-zA-Z\*]/.test(ze.value);)at=a.offsetOf(ze),ze=ze.rightSibling}else{if(ze=ze.leftSibling,!ze||!(ze instanceof pl))return a.announce("plonk"),!1;for(;ze&&ze instanceof pl&&/[a-zA-Z\*]/.test(ze.value);)at=a.offsetOf(ze),ze=ze.leftSibling}else if(b==="forward"&&ze.type==="mopen"){let Et=0;do ze.type==="mopen"?Et+=1:ze.type==="mclose"&&(Et-=1),ze=ze.rightSibling;while(!ze.isLastSibling&&Et!==0);at=a.offsetOf(ze.leftSibling)}else if(b==="backward"&&ze.type==="mclose"){let Et=0;do ze.type==="mopen"?Et+=1:ze.type==="mclose"&&(Et-=1),ze=ze.leftSibling;while(!ze.isFirstSibling&&Et!==0);at=a.offsetOf(ze)}else if(b==="backward")if(ze.type==="first")for(;at>0&&ze.type==="first";)at-=1,ze=a.at(at);else{const Et=ze.type;ze.type==="subsup"&&(at=a.offsetOf(a.at(at).leftSibling)),at-=1;let Ot=(ee=a.at(at))==null?void 0:ee.type;for(;at>=0&&Ot===Et;)((re=a.at(at))==null?void 0:re.type)==="subsup"?at=a.offsetOf(a.at(at).leftSibling):at-=1,Ot=a.at(at).type}else{const{type:Et}=ze;let Ot=(ae=a.at(at))==null?void 0:ae.type;const{lastOffset:Ln}=a;for(;at<=Ln&&(Ot===Et||Ot==="subsup");){for(;((de=a.at(at).rightSibling)==null?void 0:de.type)==="subsup";)at=a.offsetOf(a.at(at).rightSibling);at+=1,Ot=(ve=a.at(at))==null?void 0:ve.type}at-=1}if((Se=y==null?void 0:y.extend)!=null&&Se){if(!a.setSelection(a.anchor,at))return a.announce("plonk"),!1}else{if(at===a.position)return a.announce("plonk"),!1;a.position=at}return a.announce("move",De),a.mathfield.stopCoalescingUndo(),!0}function Lu(a,b,y){var E,ee;if(y=y!=null?y:{extend:!1},a.mathfield.adoptStyle=b==="backward"?"right":"left",b!=="forward"){const[de,ve]=v0(a);de!==void 0&&ve!==void 0&&a.deleteAtoms([de,ve])}if(b==="upward")return $v(a,y);if(b==="downward")return zv(a,y);if(y.extend){let de=$f(a,a.position,b);de<0&&(de=0),de>a.lastOffset&&(de=a.lastOffset);const ve=a.setSelection(a.anchor,de);return a.mathfield.stopCoalescingUndo(),ve}if(a.selectionIsPlaceholder){a.collapseSelection(b);const de=Lu(a,b);return a.mathfield.stopCoalescingUndo(),de}let re=a.position;const ae=re;if(a.collapseSelection(b)?(re=a.position,B0(a,re)||(re=$f(a,re,b))):re=$f(a,re,b),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:b},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 $f(a,b,y){return b=b+(y==="forward"?1:-1),b<0||b>a.lastOffset||B0(a,b)?b:$f(a,b,y)}function B0(a,b){var y;const E=a.at(b);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(y=E.parent)!=null&&y.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function Fv(a,b,y){let E=1/0,ee=0;for(;ee<b.length;ee++){const re=Uc(a.getHTMLElement(b[ee])).right,ae=Math.abs(y-re);if(ae<=E)E=ae;else break}return b[ee-1]}function zf(a,b,y,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?y.filter(Se=>Se.type==="prompt"&&!Se.captureSelection):y,de=Uc(a.mathfield.getHTMLElement(b)).right,ve=a.offsetOf(Fv(a.mathfield,ae,de))-(re?1:0);if(E){const[Se,De]=a.selection.ranges[0];let ze;ve<(ee==="up"?Se:De)?ze={ranges:[[ve,De]],direction:"backward"}:ze={ranges:[[Se,ve]],direction:"forward"},a.setSelection(ze)}else a.setPositionHandlingPlaceholder(ve);a.announce(`move ${ee}`)}function $v(a,b){var y,E;const ee=(y=b==null?void 0:b.extend)!=null?y:!1;ee||a.collapseSelection("backward");const re=()=>{var ve,Se;let De=!0;return a.silenceNotifications||(De=(Se=(ve=a.mathfield.host)==null?void 0:ve.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Se:!0),a.announce(De?"plonk":"line"),De},ae=a.at(a.position);let de=ae;for(;de&&de.parentBranch!=="below"&&!(Array.isArray(de.parentBranch)&&de.parent instanceof Xa);)de=de.parent;if(Array.isArray(de==null?void 0:de.parentBranch)&&de.parent instanceof Xa){const ve=de.parent;if(de.parentBranch[0]<1)return re();const Se=de.parentBranch[0]-1,De=ve.array[Se][de.parentBranch[1]];if(!De.some(at=>at.type==="prompt"&&!at.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,De,ee,"up")}else if(de){const ve=(E=de.parent.branch("above"))!=null?E:de.parent.createBranch("above");if(!ve.some(De=>De.type==="prompt"&&De.placeholderId)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ve,ee,"up")}else return re();return a.mathfield.stopCoalescingUndo(),!0}function zv(a,b){var y,E;const ee=(y=b==null?void 0:b.extend)!=null?y:!1;ee||a.collapseSelection("forward");const re=()=>{var ve,Se;let De=!0;return a.silenceNotifications||(De=(Se=(ve=a.mathfield.host)==null?void 0:ve.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Se:!0),a.announce(De?"plonk":"line"),De},ae=a.at(a.position);let de=ae;for(;de&&de.parentBranch!=="above"&&!(Array.isArray(de.parentBranch)&&de.parent instanceof Xa);)de=de.parent;if(Array.isArray(de==null?void 0:de.parentBranch)&&de.parent instanceof Xa){const ve=de.parent;if(de.parentBranch[0]+1>ve.array.length-1)return re();const Se=de.parentBranch[0]+1,De=ve.array[Se][de.parentBranch[1]];if(!De.some(at=>at.type==="prompt"&&!at.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,De,ee,"down")}else if(de){const ve=(E=de.parent.branch("below"))!=null?E:de.parent.createBranch("below");if(!ve.some(De=>De.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ve,ee,"down")}else return re();return!0}function N0(a){const b=a.position,y=a.at(b).parent;return y!=null&&y.parent?(a.position=a.offsetOf(y),a.mathfield.stopCoalescingUndo(),a.announce("move",b),!0):(a.announce("plonk"),!1)}function Kv(a){let b=0,y=a.at(a.position),E=!1;for(;y;)(!y.hasEmptyBranch("superscript")||!y.hasEmptyBranch("subscript"))&&(b+=1),y.hasEmptyBranch("superscript")?y.hasEmptyBranch("subscript")||(E=!1):E=!0,y=y.parent;return E?b:0}function Hv(a){let b=0,y=a.at(a.position),E=!1;for(;y;)(!y.hasEmptyBranch("superscript")||!y.hasEmptyBranch("subscript"))&&(b+=1),y.hasEmptyBranch("superscript")?y.hasEmptyBranch("subscript")||(E=!0):E=!1,y=y.parent;return E?b:0}function R0(a){var b;if(a.collapseSelection(),Kv(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let y=a.at(a.position);return y.subsupPlacement===void 0&&(((b=y.rightSibling)==null?void 0:b.type)!=="subsup"&&y.parent.addChildAfter(new Ql({style:y.computedStyle}),y),y=y.rightSibling),y.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(y.superscript[0]))),!0}function F0(a){var b;if(a.collapseSelection(),Hv(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let y=a.at(a.position);return y.subsupPlacement===void 0&&(((b=a.at(a.position+1))==null?void 0:b.type)!=="subsup"&&y.parent.addChildAfter(new Ql({style:a.at(a.position).computedStyle}),y),y=a.at(a.position+1)),y.createBranch("subscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(y.subscript[0]))),!0}function Wv(){function a(ve){const Se=[],De=[];return[...ve.querySelectorAll(`input, select, textarea, a[href], button,
[tabindex], audio[controls], video[controls],
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(b).forEach((at,Et)=>{const Ot=E(at);Ot===0?Se.push(at):De.push({documentOrder:Et,tabIndex:Ot,node:at})}),De.sort((at,Et)=>at.tabIndex===Et.tabIndex?at.documentOrder-Et.documentOrder:at.tabIndex-Et.tabIndex).map(at=>at.node).concat(Se)}function b(ve){return!(!y(ve)||ee(ve)||E(ve)<0)}function y(ve){return!(ve.disabled||ve.type==="hidden"&&ve.tagName.toUpperCase()==="INPUT"||de(ve))}function E(ve){var Se;const De=Number.parseInt((Se=ve.getAttribute("tabindex"))!=null?Se:"NaN",10);return Number.isNaN(De)?ve.contentEditable==="true"||(ve.nodeName==="AUDIO"||ve.nodeName==="VIDEO")&&ve.getAttribute("tabindex")===null?0:ve.tabIndex:De}function ee(ve){return ve.tagName.toUpperCase()==="INPUT"&&ve.type==="radio"&&!ae(ve)}function re(ve,Se){for(const De of ve)if(De.checked&&De.form===Se)return De;return null}function ae(ve){var Se;if(!ve.name)return!0;const ze=((Se=ve.form)!=null?Se:ve.ownerDocument).querySelectorAll('input[type="radio"][name="'+ve.name+'"]'),at=re(ze,ve.form);return!at||at===ve}function de(ve){if(!ot()||ve===document.activeElement||ve.contains(document.activeElement))return!1;if(getComputedStyle(ve).visibility==="hidden")return!0;const Se=ve.getBoundingClientRect();if(Se.width===0||Se.height===0)return!0;for(;ve;){if(getComputedStyle(ve).display==="none")return!0;ve=ve.parentElement}return!1}return ot()?a(document.body):[]}function kl(a,b,y="forward"){const E=a.position;if(Array.isArray(b)){const ee=a.offsetOf(b[0]),re=a.offsetOf(b[b.length-1]);return y==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return y==="forward"?kl(a,[b.leftSibling,b]):kl(a,[b,b.leftSibling])}function pu(a,b){const y=a.position;if(typeof b=="number"&&(b=a.at(b)),b.type==="prompt")a.setSelection(a.offsetOf(b.firstChild),a.offsetOf(b.lastChild));else{const E=a.offsetOf(b);b.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",y),a.mathfield.stopCoalescingUndo(),!0}function Kf(a,b,y=!0){var E,ee;const re=b==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Lu(a,b);let ae;const de=a.at(a.anchor).parentPrompt;de?b==="forward"?ae=a.offsetOf(de)+1:ae=a.offsetOf(de.leftSibling):ae=Math.max(a.position+re,0);const ve=Dh(a,ae,b);if(!ve||b==="forward"&&a.offsetOf(ve)<ae||b==="backward"&&a.offsetOf(ve)>ae){if(!y||!((ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:b},cancelable:!0,bubbles:!0,composed:!0})))==null||ee))return a.announce("plonk"),!1;const De=Wv();if(!document.activeElement||De.length<=1)return a.announce("plonk"),!1;let ze=De.indexOf(document.activeElement)+re;return ze<0&&(ze=De.length-1),ze>=De.length&&(ze=0),De[ze].focus(),a.mathfield.stopCoalescingUndo(),!0}return pu(a,ve),!0}function Dh(a,b=0,y="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,b,y)}$l({moveToOpposite:a=>{const b={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},y=a.at(a.position),{parent:E}=y;if(!E)return a.announce("plonk"),!1;const ee=y.parentBranch;let re;if(typeof ee=="string"&&(re=b[ee]),!re){const de=y.subsupPlacement?F0(a):R0(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:b}=a.at(a.position);return b?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),!0):(a.announce("plonk"),!1)},moveAfterParent:a=>N0(a),moveToNextChar:a=>Lu(a,"forward"),moveToPreviousChar:a=>Lu(a,"backward"),moveUp:a=>Lu(a,"upward"),moveDown:a=>Lu(a,"downward"),moveToNextWord:a=>rd(a,"forward"),moveToPreviousWord:a=>rd(a,"backward"),moveToGroupStart:a=>{const b=a.offsetOf(a.at(a.position).firstSibling);return b===a.position?(a.announce("plonk"),!1):(a.position=b,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const b=a.offsetOf(a.at(a.position).lastSibling);return b===a.position?(a.announce("plonk"),!1):(a.position=b,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var b,y,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 at=re;for(;at&&at.mode==="text";)at=at.leftSibling;let Et=re;for(;((b=Et.rightSibling)==null?void 0:b.mode)==="text";)Et=Et.rightSibling;if(at&&Et)return kl(a,[at,Et])}if(re.rightSibling.mode==="text"){let at=re;for(;at&&at.mode==="text";)at=at.rightSibling;return at?(pu(a,(y=at.leftSibling)!=null?y:at),a.mathfield.switchMode("math"),!0):pu(a,a.lastOffset)}}const de=a.at(a.anchor).parentPrompt,ve=de?a.offsetOf(de)+1:Math.max(a.position+1,0),Se=Dh(a,ve,"forward");if(Se)return pu(a,Se);const De=$0(a,re,at=>at.type==="leftright"||at.type==="text","forward");if(De){if(De.mode==="text"){let at=De;for(;at&&at.mode==="text";)at=at.rightSibling;return kl(a,[(E=De.leftSibling)!=null?E:De,(ee=at.leftSibling)!=null?ee:at])}return kl(a,De)}const ze=re.parent;if(ze){if(ze.type==="leftright"||ze.type==="surd")return kl(a,ze);if(re.parentBranch==="superscript"&&ze.subscript)return kl(a,ze.subscript);if(re.parentBranch==="above"&&ze.below)return kl(a,ze.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return pu(a,ze);if(re.parentBranch==="above"||re.parentBranch==="below")return kl(a,ze)}return pu(a,a.lastOffset)},moveToPreviousGroup:a=>{var b;if(a.position===0&&a.anchor===0)return Kf(a,"backward");let y=a.at(a.position);const E=y.mode;if(E==="text"){if(a.selectionIsCollapsed){let de=y;for(;de&&de.mode==="text";)de=de.leftSibling;let ve=y;for(;((b=ve.rightSibling)==null?void 0:b.mode)==="text";)ve=ve.rightSibling;if(de&&ve)return kl(a,[de,ve])}for(;y&&y.mode==="text";)y=y.leftSibling;return y?pu(a,y):pu(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Dh(a,re,"backward");if(ae)return pu(a,ae);if(E==="math"){const de=$0(a,y,Se=>Se.type==="leftright"||Se.type==="text","backward");if(de){if(de.mode==="text"){let Se=de;for(;Se&&Se.mode==="text";)Se=Se.leftSibling;return kl(a,[de,Se])}return kl(a,de)}const ve=y.parent;if(ve){if(ve.type==="leftright"||ve.type==="surd")return kl(a,ve);if(y.parentBranch==="subscript"&&ve.superscript)return kl(a,ve.superscript);if(y.parentBranch==="below"&&ve.above)return kl(a,ve.above);if(y.parentBranch==="superscript"||y.parentBranch==="subscript")return pu(a,ve);if(y.parentBranch==="above"||y.parentBranch==="below")return kl(a,ve)}return pu(a,0)}return!1},moveToMathfieldStart:a=>a.selectionIsCollapsed&&a.position===0?(a.announce("plonk"),!1):(a.position=0,a.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:a=>a.selectionIsCollapsed&&a.position===a.lastOffset?(a.announce("plonk"),!1):(a.position=a.lastOffset,a.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:R0,moveToSubscript:F0},{target:"model",changeSelection:!0}),$l({moveToNextPlaceholder:a=>Kf(a,"forward"),moveToPreviousPlaceholder:a=>Kf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function $0(a,b,y,E){if(E==="forward"){let re=b.rightSibling;for(;re&&!y(re);)re=re.rightSibling;return re}let ee=b.leftSibling;for(;ee&&!y(ee);)ee=ee.leftSibling;return ee}function Hf(a,b,y){typeof b=="function"&&(y=b,b=1/0),b===void 0&&(b=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=b===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 y=="function"&&!y(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,b-=1}a.contentDidChange({data:re,inputType:"insertText"})}function Pc(a,b,y){typeof b=="function"&&(y=b,b=1/0),b===void 0&&(b=1/0);let E=a.position,ee=!1;const re=[];for(;!ee;){const ae=a.at(E);ee=b===0||!ae||ae.type==="first"||ae.isFirstSibling||ae.mode!=="text"||ae.value===" "||typeof y=="function"&&!y(ae),ee||(re.push(Gn.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,b-=1}Lh(a),a.contentDidChange({data:yo(re),inputType:"insertText"})}function Lh(a){var b;let y=a.position-1;for(;y>=0&&((b=a.at(y))==null?void 0:b.mode)==="math";)y-=1;if(!(y<0)&&a.at(y).mode==="text"&&a.at(y).value===" "&&a.at(y-1).mode==="math"){a.at(y-1).parent.removeChild(a.at(y-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Zv(a){let b="",y=a.position,E=!1;for(;!E;){const ee=a.at(y);E=!(ee&&(ee.mode==="text"||ee.mode==="math"&&ee.type&&/mord|mpunct/.test(ee.type))),E||(b=ee.value+b),y-=1}return b}function Vv(a,b,y){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!y||!wf(y))return!1;const ee=qc(y);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Zv(E)+ee;if(a.model.mode==="text"){if(b==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&Pc(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:de}=E.at(E.position);if(ae&&de instanceof Zo&&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 Pc(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){Pc(E,1);const ve=E.at(E.position);return ve.value="\u22C5",ve.style.variant="normal",ve.command="\\cdot",ve.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 Pc(E,1),!0;if(/\([a-z][,;]$/.test(re))return Pc(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Lh(E),!0}else{if(b==="[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 Uv(a,b){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const y=z0(),E=a.element.getBoundingClientRect();y.style.left=`${E.left}px`,y.style.top=`${E.top-64}px`,y.innerHTML=window.MathfieldElement.createHTML("<span>"+(gh(b)||b)+"</span>"+y.innerHTML),y.style.visibility="visible",setTimeout(()=>{y.childNodes.length>0&&y.childNodes[y.childNodes.length-1].remove(),y.childNodes.length===0&&(y.style.visibility="hidden")},3e3)}function jv(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const b=z0();b.innerHTML=""}else{const b=Mf("mathlive-keystroke-caption-panel");b.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(Fl("keystroke-caption"),Fl("core"),Mf("mathlive-keystroke-caption-panel"))}function Gv(){document.getElementById("mathlive-keystroke-caption-panel")&&(yh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,b){var y,E,ee;const{model:re}=a,ae=p0(b);if(b.isTrusted){Rm(b);const Et=Fd();a.keyboardLayout!==Et.id&&(a.keyboardLayout=Et.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Uv(a,ae),b.isTrusted&&b.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let de,ve="",Se;const De=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")De.pop();else if(!wf(b))a.flushInlineShortcutBuffer();else{const Et=qc(b),Ot=[...(E=(y=De[De.length-1])==null?void 0:y.keystrokes)!=null?E:[],Et];De.push({state:re.getState(),keystrokes:Ot,leftSiblings:Xv(a)});let Ln=0,kr="";for(;!de&&Ln<Ot.length;)Se=De.length-(Ot.length-Ln),kr=Ot.slice(Ln).join(""),de=wd(De[Se].leftSiblings,kr,a.options.inlineShortcuts),!de&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(kr)&&(de=a.options.onInlineShortcut(a,kr)),Ln+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(de?a.switchMode("math"):Vv(a,ae,b)&&(a.switchMode({math:"text",text:"math"}[re.mode]),ve=""))}if(!de){if(ve||(ve=Zm(a.keybindings,re.mode,b)),!ve&&(ae==="[Enter]"||ae==="[Return]")){let Et=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(Et=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),Et||b.preventDefault&&(b.preventDefault(),b.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),Et}if((!ve||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return Wa.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),ve="",a.dirty=!0,a.scrollIntoView(),b.preventDefault&&(b.preventDefault(),b.stopPropagation()),!1;const Et=re.at(re.position+1),Ot=re.at(re.position-1);if((Et==null?void 0:Et.mode)==="text"||(Ot==null?void 0:Ot.mode)==="text")return Wa.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===","&&qc(b)===","&&(ve="insertDecimalSeparator")}}if(!de&&!ve){if(re.mathfield.smartFence){if(Th(re,qc(b),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1}else{const{parent:Et}=re.at(re.position);if(Et instanceof Zo&&Et.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),Et.isDirty=!0,Et.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:qc(b),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1;if(!re.selectionIsCollapsed){const Ot=qc(b);if(Ot==="("||Ot==="{"||Ot==="["){const Ln={"(":"(","{":"\\lbrace","[":"\\lbrack"}[Ot],kr={"(":")","{":"\\rbrace","[":"\\rbrack"}[Ot],[Dn,ar]=sl(re.selection);return a.snapshot(),re.position=ar,Wa.insert(re,kr,{format:"latex"}),re.position=Dn,Wa.insert(re,Ln,{format:"latex"}),re.setSelection(Dn+1,ar+1),re.contentDidChange({data:Ot,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1}}}return!0}const ze=re.at(Math.max(re.position,re.anchor)),{parent:at}=ze;if(ve==="moveAfterParent"&&(at==null?void 0:at.type)==="leftright"&&ze.isLastSibling&&a.options.smartFence&&Th(re,".",a.defaultStyle)&&(ve="",Ns(a)),a.keyboardDelegate.cancelComposition(),ve)a.executeCommand(ve);else if(de){const Et=a.effectiveStyle;re.setState(De[Se].state);const Ot=De[De.length-1].keystrokes;for(const Ln of Ot)Wa.insert(re,Ln,{silenceNotifications:!0,style:Et});a.snapshot("insert-shortcut"),re.setState(De[Se].state),re.deferNotifications({content:!0,selection:!0,data:de,type:"insertText"},()=>(Wa.insert(re,de,{format:"latex",style:Et}),Lh(a.model),de.endsWith(" ")&&(a.switchMode("text"),Wa.insert(re," ",{style:Et,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),b.preventDefault&&b.preventDefault(),!1}function Ah(a,b,y){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}y!=null||(y={}),y.focus&&a.focus(),y.feedback&&window.MathfieldElement.playSound("keypress"),typeof y.mode=="string"&&(a.switchMode(y.mode),a.snapshot());let ee=rf(b);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(ve=>ve.toUpperCase())),y.simulateKeystroke){let ve=!0;for(const Se of ee)K0(a,new KeyboardEvent("keypress",{key:Se}))&&(ve=!1);if(ve)return}const ae=E.at(E.position),de=Ce(Ce({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(sl(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:b,type:"insertText"},()=>{Ef(a);for(const ve of ee)Wa.insert(E,ve);a.snapshot("insert-latex"),zd(a)});else if(E.mode==="text"){for(const ve of ee)Wa.insert(E,ve,{style:de});a.snapshot("insert-text")}else if(E.mode==="math")for(const ve of ee)Yv(a,ve,de,ae);a.dirty=!0,a.scrollIntoView()}function Xv(a){const b=a.model,y=[];let E=b.at(Math.min(b.position,b.anchor));for(;E.type!=="first";)y.push(E),E=E.leftSibling;return y}function Yv(a,b,y,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[b];if(b===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(b)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){qv(ee),Wa.insert(ee,b,{style:y}),a.snapshot(),N0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(b)&&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)&&(y=Ce({},y),ae.style.variant&&(y.variant=ae.style.variant),ae.style.variantStyle&&(y.variantStyle=ae.style.variantStyle))}Wa.insert(ee,b,{style:y}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function qv(a){a.selectionIsCollapsed||(a.deleteAtoms(sl(a.selection)),a.mathfield.snapshot("delete"))}function Th(a,b,y){if(!b||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[b];if(!re)return!1;const ae=te[re],de=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[ve,Se]=sl(a.selection),De=a.extractAtoms([ve,Se]),ze=ee.addChildrenAfter([new Zo("left...right",De,{leftDelim:re,rightDelim:de})],a.at(ve));return a.setSelection(a.offsetOf(ze.firstChild),a.offsetOf(ze.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const ve=ee instanceof Zo?ee.leftDelim+ee.rightDelim:"";if(ve==="\\lbrace\\rbrace"||ve==="\\{\\}"||ve==="\\lbrace?")return a.mathfield.snapshot(),Wa.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:y}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(de){if(ee instanceof Zo&&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 Zo)){let ze=E;for(;ze&&!(ze.type==="mclose"&&ze.value===de);)ze=ze.rightSibling;if(ze){a.mathfield.snapshot();const at=a.extractAtoms([a.offsetOf(E),a.offsetOf(ze)]);return at.pop(),ee.addChildrenAfter([new Zo("left...right",at,{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 ve=a.offsetOf(E.lastSibling);let Se;for(Se=a.position;Se<=ve;Se++){const ze=a.at(Se);if(ze instanceof Zo&&(ze.leftDelim==="?"||ze.leftDelim===".")&&H0(re,ze.rightDelim))break}const De=a.at(Se);if(Se<=ve&&De instanceof Zo){De.leftDelim=re,a.mathfield.snapshot();let ze=a.extractAtoms([a.position,Se-1]);return ze=ze.filter(at=>at.type!=="first"),De.addChildren(ze,De.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Zo&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const ze=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const at of ze)ee.parent.addChildBefore(at,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Zo&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),Wa.insert(a,`\\left${re}\\right?`,{format:"latex",style:y}),E.lastSibling.type!=="first"){const ze=a.offsetOf(E.lastSibling),at=a.extractAtoms([a.position,ze]);a.at(a.position).body=at,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let ve=E;for(;ve;){if(ve.type==="mopen"&&ve.value===ae){a.mathfield.snapshot();const Et=ve.leftSibling,Ot=a.extractAtoms([a.offsetOf(ve.leftSibling),a.offsetOf(E)]);Ot.shift();const Ln=new Zo("left...right",Ot,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([Ln],Et),a.position=a.offsetOf(Ln),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}ve=ve.leftSibling}if(ee instanceof Zo&&E.isLastSibling&&Ih(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 Se=a.offsetOf(E.firstSibling);let De;for(De=a.position;De>=Se;De--){const Et=a.at(De);if(Et instanceof Zo&&(Et.rightDelim==="?"||Et.rightDelim===".")&&Ih(Et.leftDelim,re))break}const ze=a.at(De);if(De>=Se&&ze instanceof Zo)return a.mathfield.snapshot(),ze.rightDelim=re,ze.addChildren(a.extractAtoms([De,a.position]),ze.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Zo&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Ih(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 at=ee.parent;return at instanceof Zo&&(at.rightDelim==="?"||at.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(at),Th(a,re,y)):!1}return!1}function Ih(a,b){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(b):ne[a]===b:!0}function H0(a,b){return b?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(b)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[b]===a:!0}$l({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 b=a.field.getBoundingClientRect();return a.field.scroll(b.left-window.scrollX,0),!0},toggleKeystrokeCaption:jv,toggleContextMenu:a=>{const b=a.toggleContextMenu();return b||a.model.announce("plonk"),b},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,b,y,E)=>(a.switchMode(b,y,E),!0),insert:(a,b,y)=>a.insert(b,y),typedText:(a,b,y)=>(Ah(a,b,y),!0),insertDecimalSeparator:a=>{const b=a.model;return b.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&b.at(Math.max(b.position,b.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var b;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((b=a.host)==null||b.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,b,y)=>{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[${b!=null?b:ee}]{}`,y),!0}}),$l({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"}),$l({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(b=>{b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(b,{mode:a.model.mode})&&(zd(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Ns(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jv(a,b){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const y=Ph(a,b),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&y.fontSeries===a.defaultStyle.fontSeries&&(y.fontSeries="auto"),y.fontShape&&y.fontShape===a.defaultStyle.fontShape&&(y.fontShape="auto"),y.color&&y.color===a.defaultStyle.color&&(y.color="none"),y.backgroundColor&&y.backgroundColor===a.defaultStyle.backgroundColor&&(y.backgroundColor="none"),y.fontSize&&y.fontSize===a.defaultStyle.fontSize&&(y.fontSize="auto"),a.defaultStyle=Ce(Ce({},a.defaultStyle),y)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Mh(E,ee,y,{operation:"toggle"})),a.snapshot("style-change")}),!0}$l({applyStyle:Jv},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,b){var y,E,ee,re,ae,de,ve,Se,De,ze;const at={};if(typeof b.color=="string"){const Ot=(E=a.colorMap((y=b.color)!=null?y:b.verbatimColor))!=null?E:"none";Ot!==b.color&&(at.verbatimColor=(ee=b.verbatimColor)!=null?ee:b.color),at.color=Ot}if(typeof b.backgroundColor=="string"){const Ot=(ae=a.backgroundColorMap((re=b.backgroundColor)!=null?re:b.verbatimBackgroundColor))!=null?ae:"none";Ot!==b.backgroundColor&&(at.verbatimBackgroundColor=(de=b.verbatimBackgroundColor)!=null?de:b.backgroundColor),at.backgroundColor=Ot}typeof b.fontFamily=="string"&&(at.fontFamily=b.fontFamily),typeof b.series=="string"&&(at.fontSeries=b.series),typeof b.fontSeries=="string"&&(at.fontSeries=b.fontSeries.toLowerCase()),at.fontSeries&&(at.fontSeries=(ve={bold:"b",medium:"m",normal:"m"}[at.fontSeries])!=null?ve:at.fontSeries),typeof b.shape=="string"&&(at.fontShape=b.shape),typeof b.fontShape=="string"&&(at.fontShape=b.fontShape.toLowerCase()),at.fontShape&&(at.fontShape=(Se={italic:"it",up:"n",upright:"n",normal:"n"}[at.fontShape])!=null?Se:at.fontShape),b.variant&&(at.variant=b.variant.toLowerCase()),b.variantStyle&&(at.variantStyle=b.variantStyle.toLowerCase());const Et=(De=b.size)!=null?De:b.fontSize;return typeof Et=="number"?at.fontSize=Math.max(1,Math.min(10,Et)):typeof Et=="string"&&(at.fontSize=(ze={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[Et.toLowerCase()])!=null?ze:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[Et]),at}function Oh(a){let[b,y]=sl(a.selection);if(b=W0(a,b,"backward"),y=W0(a,y,"forward"),b===y){const E=a.at(b);if(E.type==="leftright")return a.setSelection(a.offsetOf(E.firstChild)-1,y);if(E.type==="first"&&(E.parent.type==="leftright"||E.parent.type==="surd"))return a.setSelection(b-1,a.offsetOf(E.parent.lastChild)+1);a.setSelection(b-1,y)}else a.setSelection(b,y);return!0}function W0(a,b,y){var E,ee,re;let ae=a.at(b);if(!ae)return b;const de=y==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!fe.test(ae.value));)b+=de,ae=a.at(b);return y==="backward"?b-1:b}if(ae.mode==="latex"){if(/[a-zA-Z\*]/.test(ae.value))if(y==="backward")for(;ae&&ae.mode==="latex"&&ae.value!=="\\"&&/[a-zA-Z]/.test(ae.value);)b+=de,ae=a.at(b);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)b+=de,ae=a.at(b);else if(ae.value==="{"){if(y==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)b+=de,ae=a.at(b);return b}return b-1}else if(ae.value==="}"){if(y==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)b+=de,ae=a.at(b);return b-1}return b}return b-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(b+de))!=null&&E.isDigit();)b+=de;return y==="backward"?b-1:b}if(ae.style.variant||ae.style.variantStyle){let ve=(ee=a.at(b))==null?void 0:ee.style;for(;ve&&ve.variant===ae.style.variant&&ve.variantStyle===ae.style.variantStyle;)ve=(re=a.at(b+de))==null?void 0:re.style,b+=de;return y==="backward"?b-1:b}return b}return b}$l({selectGroup:a=>{const b=Oh(a);return b||a.announce("plonk"),b},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Lu(a,"forward",{extend:!0}),extendSelectionBackward:a=>Lu(a,"backward",{extend:!0}),extendToNextWord:a=>rd(a,"forward",{extend:!0}),extendToPreviousWord:a=>rd(a,"backward",{extend:!0}),extendSelectionUpward:a=>Lu(a,"upward",{extend:!0}),extendSelectionDownward:a=>Lu(a,"downward",{extend:!0}),extendToNextBoundary:a=>rd(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>rd(a,"backward",{extend:!0}),extendToGroupStart:a=>{const b=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).firstSibling));return b||a.announce("plonk"),b},extendToGroupEnd:a=>{const b=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).lastSibling));return b||a.announce("plonk"),b},extendToMathFieldStart:a=>{const b=a.setSelection(a.anchor,0);return b||a.announce("plonk"),b},extendToMathFieldEnd:a=>{const b=a.setSelection(a.anchor,a.lastOffset);return b||a.announce("plonk"),b}},{target:"model",changeSelection:!0});var Oc=null,Ud=0,Wf=class ru{static start(b,y,E,ee){var re;ru.element=b,(re=ru.controller)==null||re.abort(),ru.controller=new AbortController;const ae={signal:ru.controller.signal};"PointerEvent"in window?(b.addEventListener("pointermove",E,ae),b.addEventListener("pointerup",ee,ae),b.addEventListener("pointercancel",ee,ae),Bh(y)&&(ru.pointerId=y.pointerId,b.setPointerCapture(y.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var b;(b=ru.controller)==null||b.abort(),ru.controller=void 0,typeof ru.pointerId=="number"&&(ru.element.releasePointerCapture(ru.pointerId),ru.pointerId=void 0)}};function Bh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Z0(a,b){var y;if(b.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,de="none",ve=!1,Se=!1;const De=b.clientX,ze=b.clientY,at=Date.now(),Et=E.field,Ot=setInterval(()=>{ve?Et.scroll({top:0,left:Et.scrollLeft-16}):Se&&Et.scroll({top:0,left:Et.scrollLeft+16})},32);function Ln(){Wf.stop(),re=!1,clearInterval(Ot),a.element.classList.remove("tracking"),b&&b.preventDefault()}function kr(ar){if(!E.hasFocus()){Ln();return}const Pr=ar.clientX,fr=ar.clientY,Si=Bh(ar)&&ar.pointerType==="touch"?20:5;if(Date.now()<at+500&&Math.abs(De-Pr)<Si&&Math.abs(ze-fr)<Si){ar.preventDefault(),ar.stopPropagation();return}const oa=Et.getBoundingClientRect();Se=Pr>oa.right,ve=Pr<oa.left;let zi=ee;Bh(ar)&&(ar.isPrimary||(zi=jd(E,ar.clientX,ar.clientY,{bias:0})));const Bo=jd(E,Pr,fr,{bias:Pr<=De?Pr===De?0:-1:1});zi>=0&&Bo>=0&&(E.model.extendSelectionTo(zi,Bo),Ns(a)),ae&&Oh(E.model)}Oc&&Math.abs(Oc.x-De)<5&&Math.abs(Oc.y-ze)<5&&Date.now()<Oc.time+500?(Ud+=1,Oc.time=at):(Oc={x:De,y:ze,time:at},Ud=1);const Dn=Et.getBoundingClientRect();if(De>=Dn.left&&De<=Dn.right&&ze>=Dn.top&&ze<=Dn.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=jd(a,De,ze,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),b.shiftKey){const ar=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),g0(a.model)||ar?de="all":de="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),de="selection"):((y=a.model.at(ee).rightSibling)==null?void 0:y.type)==="placeholder"?(a.model.setSelection(ee,ee+1),de="selection"):(a.model.position=ee,g0(a.model)?de="all":de="selection");a.defaultStyle={},b.detail===3||Ud>2?(Ln(),(b.detail===3||Ud===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},de="all")):re||(re=!0,Wf.start(Et,b,kr,Ln),(b.detail===2||Ud===2)&&(ae=!0,Oh(a.model),de="all"))}a.hasFocus()||(de="none",a.focus({preventScroll:!0}))}else Oc=null;a.stopCoalescingUndo(),de!=="none"&&(a.model.selectionIsCollapsed&&(de="all"),Ns(a)),b.preventDefault()}function Qv(a,b,y){if(a>=y.left&&a<=y.right&&b>=y.top&&b<=y.bottom)return 0;const E=a-(y.left+y.right)/2,ee=b-(y.top+y.bottom)/2;return E*E+ee*ee}function V0(a,b,y,E,ee){if(!y.id)return[1/0,null];if(b.has(y.id))return b.get(y.id);const re=ac(a,y);if(!re)return[1/0,null];let ae=[1/0,null];if(y.hasChildren&&!y.captureSelection&&E>=re.left&&E<=re.right)for(const de of y.children){const ve=V0(a,b,de,E,ee);ve[0]<=ae[0]&&(ae=ve)}return ae[1]||(ae=[Qv(E,ee,re),y]),b.set(y.id,ae),ae}function eg(a,b,y){const[,E]=V0(a,new Map,a.model.root,b,y);return E}function jd(a,b,y,E){var ee;const re=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!re)return 0;if(b>re.right||y>re.bottom+8)return a.model.lastOffset;if(b<re.left||y<re.top-8)return 0;E=E!=null?E:{},E.bias=(ee=E.bias)!=null?ee:0;let ae=eg(a,b,y);const de=[];let ve=ae;for(;ve;)de.unshift(ve),ve=ve.parent;for(const De of de)if(De.captureSelection){ae=De;break}let Se=a.model.offsetOf(ae);if(Se<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const De=ac(a,ae);De&&b<(De.left+De.right)/2&&(Se=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(Se=a.model.offsetOf(ae.leftSibling));return Se}var tg=class extends Wa{constructor(){super("math")}onPaste(a,b){if(!b||!a.model.contentWillChange({data:typeof b=="string"?b:null,dataTransfer:typeof b=="string"?null:b,inputType:"insertFromPaste"}))return!1;let y="",E="auto",ee=typeof b!="string"?b.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=lc(re),{model:de}=a;de.selectionIsCollapsed||de.deleteAtoms(sl(de.selection));const ve=de.at(de.position);if(ve.parent instanceof Xa){console.assert(ve.parentBranch!==void 0);const Se=[];let De=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const Ot of ae)Ot.type==="first"&&De.length>0?(Se.push(De),De=[Ot]):De.push(Ot);De.length>0&&Se.push(De);let ze=Number(ve.parentBranch[0]),at=Number(ve.parentBranch[1]);const Et=ve.parent.maxColumns;for(;ve.parent.colCount-at<Se.length&&ve.parent.colCount<Et;)ve.parent.addColumn();ve.parent.addChildrenAfter(Se[0],ve);for(let Ot=1;Ot<Se.length;Ot++)at++,at>=Et&&(at=0,ve.parent.addRowAfter(ze),ze++),ve.parent.setCell(ze,at,Se[Ot])}else ve.parent.addChildrenAfter(ae.filter(Se=>Se.type!=="first"),ve);return de.position=de.offsetOf(ae[ae.length-1]),de.contentDidChange({inputType:"insertFromPaste"}),Ns(a),!0}}catch(re){}if(ee=typeof b!="string"?b.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(y=re.latex),!y){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(y=ae.latex)}y||(E="latex")}catch(re){}if(!y&&typeof b!="string"&&(y=b.getData("application/x-latex"),y&&(E="latex")),y||(y=typeof b=="string"?b:b.getData("text/plain")),y){let re;return[re,y]=Eu(y),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,y,{format:E})&&(a.startRecording(),a.snapshot("paste"),Ns(a)),a.startRecording(),!0}return!1}insert(a,b,y){var E,ee;const re=typeof b=="string"?b:(ee=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(b).latex)!=null?ee:"";if(!y.silenceNotifications&&!a.contentWillChange({data:re,inputType:"insertText"}))return!1;y.insertionMode||(y.insertionMode="replaceSelection"),y.selectionMode||(y.selectionMode="placeholder"),y.format||(y.format="auto");const{silenceNotifications:ae}=a;y.silenceNotifications&&(a.silenceNotifications=!0);const de=a.silenceNotifications;a.silenceNotifications=!0;const ve={"?":"\\placeholder{}","@":"\\placeholder{}"};ve[0]=y.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),y.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(sl(a.selection)):y.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):y.insertionMode==="insertBefore"?a.collapseSelection("backward"):y.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 Se=-1;ve[0]?ve["@"]=ve[0]:typeof b=="string"&&/(^|[^\\])#@/.test(b)&&(Se=rg(a),Se>=0&&(ve["@"]=a.getValue(Se,a.position,"latex"))),ve[0]||(ve[0]=ve["?"]);let De=!1;const ze=Pr=>(De=!0,ve[Pr]);let[at,Et]=U0(a,b,ze,y);if(!Et)return!1;const Ot=Et.length===1&&Et[0].type==="genfrac";Ot&&Se>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(ve["@"]=ve["?"],De=!1,[at,Et]=U0(a,b,ze,y)):Se>=0&&a.deleteAtoms([Se,a.position]);const{parent:Ln}=a.at(a.position),kr=Ln.hasEmptyBranch("body");if(Ot&&at!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Ln instanceof Zo&&Ln.leftDelim==="("&&kr){const Pr=Ln.parent,fr=Ln.parentBranch;Pr.removeChild(Ln),Pr.setChildren(Et,fr)}const Dn=a.at(a.position);Dn.parent.addChildrenAfter(Et,Dn),at==="latex"&&typeof b=="string"&&(Ln==null?void 0:Ln.type)==="root"&&kr&&!De&&(Ln.verbatimLatex=b),a.silenceNotifications=de;const ar=Et[Et.length-1];if(y.selectionMode==="placeholder"){const Pr=Et.flatMap(fr=>[fr,...fr.children]).find(fr=>fr.type==="placeholder");if(Pr){const fr=a.offsetOf(Pr);a.setSelection(fr-1,fr),a.announce("move")}else ar&&(a.position=a.offsetOf(ar))}else y.selectionMode==="before"||(y.selectionMode==="after"?ar&&(a.position=a.offsetOf(ar)):y.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(ar)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function U0(a,b,y,E){var ee;let re,ae=[];if(typeof b!="string"||E.format==="math-json"){const de=window.MathfieldElement.computeEngine;if(!de)return["math-json",[]];[re,b]=["latex",de.box(b).latex],ae=ul(b,{context:a.mathfield.context})}else typeof b=="string"&&E.format==="ascii-math"?([re,b]=Cc(b,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=ul(b,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Zf(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,b]=Cc(b,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,b]=Eu(b)),ae=ul(b,{context:a.mathfield.context,args:y}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Zf(ae));return cc(ae,E.style),[re!=null?re:"latex",ae]}function ng(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const b=a[0];return b instanceof Zo&&b.leftDelim==="("&&b.rightDelim===")"?b.removeBranch("body"):null}function Zf(a){if(a){for(let b=0;a[b];b++){const y=a[b];if(y instanceof Zo&&y.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;y.body[ae];ae++)y.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[b]=y.body[ee])}}for(const b of a){for(const y of b.branches)if(!b.hasEmptyBranch(y)){Zf(b.branch(y));const E=ng(b.branch(y));E&&b.setChildren(E,y)}if(b instanceof Xa)for(const y of b.cells)Zf(y)}}}function rg(a){let b=a.at(a.position);if(b.mode==="text"){for(;!b.isFirstSibling&&b.mode==="text";)b=b.leftSibling;return a.offsetOf(b)}const y=b;let E=!1;if(b.type==="mclose"){const ee=te[b.value];for(;!b.isFirstSibling&&!(b.type==="mopen"&&b.value===ee);)b=b.leftSibling;b.isFirstSibling||(b=b.leftSibling),E=!0}else b.type==="leftright"&&(b=b.leftSibling,E=!0);if(E)for(;!b.isFirstSibling&&(b.isFunction||j0(b));)b=b.leftSibling;else{const ee=[];for(;!b.isFirstSibling&&(j0(b)||ee.length>0);)b.type==="mclose"&&ee.unshift(b.value),b.type==="mopen"&&ee.length>0&&b.value===te[ee[0]]&&ee.shift(),b=b.leftSibling}return y===b?-1:a.offsetOf(b)}function j0(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tg;var ig=class extends Wa{constructor(){super("text")}onPaste(a,b){if(!b)return!1;const y=typeof b=="string"?b:b.getData("text/plain");return y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,y)&&(a.model.contentDidChange({inputType:"insertFromPaste"}),a.startRecording(),a.snapshot("paste"),Ns(a)),a.startRecording(),!0):!1}insert(a,b,y={}){if(!a.contentWillChange({data:b,inputType:"insertText"}))return!1;y.insertionMode||(y.insertionMode="replaceSelection"),y.selectionMode||(y.selectionMode="placeholder"),y.format||(y.format="auto");const{silenceNotifications:E}=a;y.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,y.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(sl(a.selection)):y.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):y.insertionMode==="insertBefore"?a.collapseSelection("backward"):y.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=ag(b,a.mathfield.context);if(cc(re,y.style),!re)return!1;const ae=a.at(a.position),de=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,y.selectionMode==="before"||(y.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(de)):de&&(a.position=a.offsetOf(de))),a.contentDidChange({data:b,inputType:"insertText"}),a.silenceNotifications=E,!0}};function ag(a,b){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 "),ul(a,{context:b,parseMode:"text"})}new ig;function Au(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var ys=4,Il=20,Qs=2*(Il+ys),Vf=(a,b)=>`
<line x1="${a+Il}" y1="${b+Il}"
x2="${a>b?a+Il:7*Il+10*ys}"
y2="${a<b?b+Il:7*Il+10*ys}"/>
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${b}" 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,b)=>`
<line x1="${a+Il}" y1="${b+Il}"
x2="${a>b?a+Il:7*Il+10*ys}"
y2="${a<b?b+Il:7*Il+10*ys}"/>
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${b}" 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>`,Uf=(a,b,y)=>`
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${b}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<g transform="rotate(${y})" 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>`,og=`
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox=
"-2 -2 ${8*Il+10*ys+5} ${8*Il+10*ys+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${Qs+ys}"
height="${3*Qs}"
width="${Qs}"
rx="${Qs/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${Qs+ys}"
y="0"
height="${Qs}"
width="${3*Qs}"
rx="${Qs/2}"/>
<g data-command='"moveDown"'>
${Uf(2*(ys+Qs),2*ys+3*Qs,0)}
</g>
<g data-command='"moveUp"'>
${Uf(2*(ys+Qs),2*ys+Qs,180)}
</g>
<g data-command='"moveToNextWord"'>
${Uf(2*ys+3*Qs,2*(ys+Qs),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${Uf(2*ys+Qs,2*(ys+Qs),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${Vf(2*ys+Qs,ys)}
</g>
<g data-command='"removeColumn"'>
${G0(2*ys+2*Qs,ys)}
</g>
<g data-command='"addColumnAfter"'>
${Vf(2*ys+3*Qs,ys)}
</g>
<g data-command='"addRowBefore"'>
${Vf(ys,2*ys+Qs)}
</g>
<g data-command='"removeRow"'>
${G0(ys,2*ys+2*Qs)}
</g>
<g data-command='"addRowAfter"'>
${Vf(ys,2*ys+3*Qs)}
</g>
</svg>`,sg=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>`,lg=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>`,ug=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>`,cg=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>`,dg=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>`,fg=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>`,hg=a=>`
<svg id="rcases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","rcases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
<circle cx="15" cy="8" r="1"/>
<circle cx="15" cy="16" r="1"/>
<circle cx="7" cy="8" r="1"/>
<circle cx="7" cy="16" r="1"/>
</svg>`,Nh={matrix:sg,pmatrix:lg,bmatrix:ug,Bmatrix:X0,vmatrix:cg,Vmatrix:dg},Rh={cases:fg,rcases:hg,Bmatrix:X0};function pg(a){var b,y;const E=(b=a.model.parentEnvironment)==null?void 0:b.array;if(!E)return;let ee=0;E.forEach(Ot=>{(!ee||Ot.length>ee)&&(ee=Ot.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Mf("mathlive-environment-popover"),Fl("environment-popover"),Fl("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=og;let ve=[],Se="";const De=a.model.parentEnvironment.environmentName;if(Sl(De)){const Ot=vg(De);Se=Nh[Ot]("active");const Ln=Nh,{[Ot]:kr}=Ln,Dn=Je(Ln,[ke(Ot)]);ve=Object.values(Dn).map(ar=>ar("inactive"))}else if(wl(De)){const Ot=gg(De);Se=Rh[Ot]("active");const Ln=Rh,{[Ot]:kr}=Ln,Dn=Je(Ln,[ke(Ot)]);ve=Object.values(Dn).map(ar=>ar("inactive"))}else Xs(De)&&(Se=Nh.matrix("active"),ve=Object.values(Rh).map(Ot=>Ot("inactive")));const ze=document.createElement("div");ze.className="MLEP__environment-delimiter-controls",ze.style.display="flex",ze.style.flexDirection="column",ze.innerHTML=`
<div class='MLEP__array-delimiter-options'>
${Se}
${ve.join("")}
</div>`,Se&&ae.appendChild(ze),ae.querySelectorAll("[data-command]").forEach(Ot=>{const Ln=Ot.dataset.command;let kr=Ln;try{kr=JSON.parse(Ln)}catch(Dn){}Ot.addEventListener("mousedown",Dn=>Dn.preventDefault()),kr&&Ot.addEventListener("click",()=>a.executeCommand(kr))});const Et=(y=a.field)==null?void 0:y.getBoundingClientRect();Et&&(re.style.top=`${window.scrollY+(Et.top-re.clientHeight-15)}px`,re.style.left=`${Et.left+20}px`,re.classList.add("is-visible"))}function Fh(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mg(){document.getElementById("mathlive-environment-popover")&&(yh("mathlive-environment-popover"),x("environment-popover"),x("core"))}function jf(a){if(!a.hasFocus())return;let b=!1;if(a.model.mode==="math"){const y=a.model.parentEnvironment;if(y!=null&&y.array&&Ls(y.environmentName)){const E=a.options.environmentPopoverPolicy;b=E==="auto"||E==="on"}}b?pg(a):Fh()}function vg(a){return a.replace("*","")}function gg(a){return a==="dcases"?"cases":a}function Y0(a){const b=getComputedStyle(a).direction;return b==="ltr"||b==="rtl"?b:"ltr"}function q0(a,b,y){return b==="left"||b==="leading"&&y==="ltr"||b==="trailing"&&y==="rtl"?a.left:a.right}function $h(a,b,y,E){return y==="middle"?a-b/2:y==="start"&&E==="rtl"||y==="end"&&E==="ltr"||y==="top"||y==="right"?Math.max(0,a-b):a}function bg(a,b,y,E){return y==="middle"?a-b/2:y==="start"&&E==="ltr"||y==="end"&&E==="rtl"||y==="top"||y==="right"?a:a-b}function yg(a,b){var y,E,ee;const re=(y=Y0(a))!=null?y:"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(b.maxHeight)?Math.min(b.maxHeight,window.innerHeight):window.innerHeight;let ve=Math.min(de,(E=b.height)!=null?E:ae.height),Se=$h(b.location.y,ve,b.verticalPos,re);Se+ve>window.innerHeight-8&&(b.alternateLocation?(Se=$h(b.alternateLocation.y,ve,b.verticalPos,re),Se+ve>window.innerHeight-8&&(Se=void 0)):Se=void 0),Number.isFinite(Se)||(Se=Math.max(8,window.innerHeight-8-ve),8+ve>window.innerHeight-8&&(a.style.bottom="8px")),ve=Math.min(Se+ve,window.innerHeight-8)-Se;const De=Number.isFinite(b.maxWidth)?Math.min(b.maxWidth,window.innerWidth):window.innerWidth;let ze=Math.min(De,(ee=b.width)!=null?ee:ae.width),at=$h(b.location.x,ze,b.horizontalPos,re);at+ze>window.innerWidth-8&&(b.alternateLocation?(at=bg(b.alternateLocation.x,ze,b.verticalPos,re),at+ze>window.innerWidth-8&&(at=void 0)):at=void 0),Number.isFinite(at)||(at=Math.max(8,window.innerWidth-8-ze),8+ze>window.innerWidth-8&&(a.style.right="8px")),ze=Math.min(at+ze,window.innerWidth-8)-at,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-at-ze).toString()}px`:a.style.left=`${Math.ceil(at).toString()}px`,a.style.top=`${Math.ceil(Se).toString()}px`,ve!==ae.height&&(a.style.height=`${Math.ceil(ve).toString()}px`),ze!==ae.width&&(a.style.width=`${Math.ceil(ze).toString()}px`)}function xg(a,b){return Math.hypot(b.x-a.x,b.y-a.y)}function id(a){return"submenu"in a}function Tu(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 b=J0[a];if(!b){let y;switch(a){case"checkmark":y=`<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":y='<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":y='<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(y){const E=document.createElement("template");E.innerHTML=y,J0[a]=E,b=E}}if(b){if("content"in b)return b.content.cloneNode(!0);const y=document.createElement("svg");return y.innerHTML=b.innerHTML,y}}var Q0=80,ep=class{constructor(a,b){this._element=null;var y;this.parentMenu=b,this._declaration=a,id(a)?(this.type="submenu",this.submenu=new tp(a.submenu,{parentMenu:b,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(y=a.type)!=null?y:"command",this.hasCheck=Tu(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,b;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(b=this._element)==null||b.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,b;return(b=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?b:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var b,y,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),Tu(ee)&&(this.checked=Tu(ee)&&((b=ad(ee.checked,a))!=null?b:!1)),(Tu(ee)||id(ee))&&(this.enabled=(y=ad(ee.enabled,a))!=null?y:!0,this.visible=(E=ad(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Tu(ee)||Kh(ee)||id(ee))&&(this.label=ad(ee.label,a),this.tooltip=ad(ee.tooltip,a),this.ariaLabel=ad(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 b=document.createElement("span");if(b.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&b.classList.add("heading"),b.innerHTML=this.label,a.append(b),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),Tu(this._declaration)&&this._declaration.keyboardShortcut){const y=document.createElement("kbd");y.innerHTML=gh(this._declaration.keyboardShortcut),a.append(y)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const y=document.createElement("li");return y.setAttribute("part","menu-divider"),y.setAttribute("role","divider"),this._element=y,y}const a=document.createElement("li");this._element=a,(Tu(this._declaration)||Kh(this._declaration)||id(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 b=this.abortController.signal;return a.addEventListener("pointerenter",this,{signal:b}),a.addEventListener("pointerleave",this,{signal:b}),a.addEventListener("pointerup",this,{signal:b}),a.addEventListener("click",this,{signal:b}),this._element}dispatchSelect(){if(!Tu(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 b;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 y=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((b=this.parentMenu.activeMenuItem)!=null&&b.movingTowardSubmenu(y))?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 b;if(this.type!=="submenu"||!this.element)return;if((b=a==null?void 0:a.withDelay)!=null&&b){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const y=this.element.getBoundingClientRect(),E=Y0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:q0(y,"trailing",E),y:y.top-4},alternateLocation:{x:q0(y,"leading",E),y:y.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const b=this.rootMenu.lastMoveEvent;if(!b)return!1;const y=a.timeStamp-b.timeStamp;if(y>500)return!1;const E=a.clientX-b.clientX;if(Sg(E,b.clientY-a.clientY,y)<=.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 Sg(a,b,y){return Math.hypot(a,b)/y}function ad(a,b){return a===void 0||typeof a!="function"?a:(b!=null||(b={alt:!1,control:!1,shift:!1,meta:!1}),a(b))}var tp=class hd{constructor(b,y){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ee;this.parentMenu=(E=y==null?void 0:y.parentMenu)!=null?E:null,this._submenuClass=y==null?void 0:y.submenuClass,this.columnCount=(ee=y==null?void 0:y.columnCount)!=null?ee:1,this.isSubmenuOpen=!1,this.menuItems=b}get children(){return this._menuItems}set menuItems(b){const y=this.parentMenu;this.dispose(),this.parentMenu=y,b=[...b],this._menuItems=b.map(E=>E.onCreate?E.onCreate(E,this):new ep(E,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var b;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(b=this._menuItems)==null||b.forEach(y=>y.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(b){if(b.type==="wheel"&&this._element){const y=b;this._element.scrollBy(0,y.deltaY),b.stopPropagation()}}dispatchEvent(b){return this.rootMenu.dispatchEvent(b)}get rootMenu(){return this.parentMenu.rootMenu}updateState(b){var y,E,ee;this._menuItems.forEach(Se=>Se.updateState(b));const re=this.hasCheck;this.hasCheck=this._menuItems.some(Se=>Se.visible&&Se.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(Se=>Se.updateState(b));let ae,de=0;for(const Se of this._menuItems)Se.type==="heading"?(ae&&de===0&&(ae.visible=!1),ae=Se,de=0):Se.type==="divider"&&ae?(ae.visible=de>0,ae=void 0,de=0):ae&&Se.visible&&(de+=1);ae&&(ae.visible=de>0);let ve=!0;for(const Se of this._menuItems)Se.type==="divider"?(Se.visible=!ve,ve=!0):Se.visible&&(ve=!1);(y=this.activeMenuItem)!=null&&y.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(b=>b.type!=="divider"&&b.visible&&b.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(b=>b.type!=="divider"&&b.visible)}set dirty(b){console.assert(b===!0),this._dirty!==b&&b&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var b;if(this._element){this._element.textContent="";for(const{element:y,visible:E}of this._menuItems)y&&E&&this._element.append(y);(b=this._element.querySelector("li:first-of-type"))==null||b.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const b=document.createElement("menu");b.setAttribute("role","menu"),b.setAttribute("tabindex","-1"),b.setAttribute("aria-orientation","vertical"),b.setAttribute("part","ui-menu-container"),this._submenuClass&&b.classList.add(this._submenuClass),b.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const y=this._abortController.signal;return b.addEventListener("focus",this,{signal:y}),b.addEventListener("wheel",this,{passive:!0,signal:y}),this._element=b,this.updateElement(),b}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(b){var y,E,ee,re;if(this.rootMenu.cancelDelayedOperation(),b!==this._activeMenuItem){if(this.activeMenuItem){const ae=this.activeMenuItem;ae.active=!1,(y=ae.submenu)==null||y.hide()}if(!((E=b==null?void 0:b.visible)==null||E)){this._activeMenuItem=null;return}this._activeMenuItem=b,b&&(b.active=!0)}b?(ee=b.element)==null||ee.focus({preventScroll:!0}):(re=this._element)==null||re.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let b=0,y=!1;const E=this._menuItems;for(;!y&&b<=E.length-1;){const ee=E[b];y=ee.type!=="divider"&&ee.visible&&ee.enabled,b+=1}return y?E[b-1]:null}get lastMenuItem(){this.updateIfDirty();const b=this._menuItems;let y=b.length-1,E=!1;for(;!E&&y>=0;){const ee=b[y];E=ee.type!=="divider"&&ee.visible&&ee.enabled,y-=1}return E?b[y+1]:null}nextMenuItem(b){if(b===0)return this._activeMenuItem;if(!this._activeMenuItem)return b>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const y=this._menuItems.indexOf(this.firstMenuItem),E=this._menuItems.indexOf(this.lastMenuItem);let ee=this._menuItems.indexOf(this._activeMenuItem),re=1;for(;ee>=y&&ee<=E;){ee+=b>0?1:-1;const ae=this._menuItems[ee];if(!ae)break;if(ae.visible&&ae.enabled){if(re===Math.abs(b))return this._menuItems[ee];re+=1}}return b>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(b){this.updateIfDirty();const E=this._menuItems.filter(ee=>ee.visible&&ee.enabled).indexOf(b);return E<0?-1:E%this.columnCount}static get collator(){return hd._collator||(hd._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),hd._collator}findMenuItem(b){var y;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))-b.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(y=E.find(de=>hd.collator.compare(b,de.label.substring(ae,b.length))===0))!=null?y:null,ae++;return re}show(b){return!this.visible||!b.container?!1:(this.updateElement(),b.container.appendChild(this.element),yt()&&(this.element.popover="manual",this.element.showPopover()),b.location&&yg(this.element,{location:b.location,alternateLocation:b.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var b,y,E,ee,re;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),yt()&&((b=this._element)!=null&&b.popover)&&this.element.hidePopover(),(E=(y=this.parentMenu)==null?void 0:y.element)==null||E.focus(),(re=(ee=this._element)==null?void 0:ee.parentNode)==null||re.removeChild(this._element)}set openSubmenu(b){var y,E,ee,re;const ae=b!==null;((y=this.activeMenuItem)==null?void 0:y.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(b,y){var E;super(b),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(E=y==null?void 0:y.host)!=null?E:null,this.isDynamic=b.some(rp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(b){zm(this._modifiers,b)||(this._modifiers=b,this.dirty=!0)}get activeSubmenu(){let b=this;for(;b.isSubmenuOpen;)b=b.activeMenuItem.submenu;return b}set dirty(b){this._updating||(console.assert(b===!0),this._dirty!==b&&(this._dirty=!0,b&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(b){this._updating=!0,this.modifiers=b!=null?b:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(b){this.isDynamic&&(this.modifiers=_c(b)),b.stopImmediatePropagation()}handleKeydownEvent(b){var y,E,ee;if(b.key==="Tab"||b.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=_c(b));let re=!0;const ae=this.activeSubmenu,de=ae.activeMenuItem;switch(b.key){case" ":case"Space":case"Return":case"Enter":de==null||de.select(_c(b));break;case"ArrowRight":if((de==null?void 0:de.type)==="submenu")de.select(_c(b)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!de)ae.activeMenuItem=ae.firstMenuItem;else{const ve=(y=ae.getMenuItemColumn(de))!=null?y:-1;if(ve>=0&&ve<((E=ae.columnCount)!=null?E:1)-1){const Se=ae.nextMenuItem(1);Se&&(ae.activeMenuItem=Se)}}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 Se=ae.parentMenu.activeMenuItem;if(Se){const{element:De}=Se;De==null||De.focus(),De==null||De.classList.remove("is-submenu-open")}}else{const Se=ae.nextMenuItem(-1);Se&&(ae.activeMenuItem=Se)}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 ve=ae.findMenuItem(this.typingBuffer);ve&&(ae.activeMenuItem=ve),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(wf(b)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=b.key;const ve=ae.findMenuItem(this.typingBuffer);ve&&(ae.activeMenuItem=ve),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else re=!1}re&&(b.preventDefault(),b.stopPropagation())}handleEvent(b){if(b.type==="keydown")this.handleKeydownEvent(b);else if(b.type==="keyup")this.handleKeyupEvent(b);else if(b.type==="pointermove")this.lastMoveEvent=b;else if(b.type==="pointerup"&&b.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(b.type==="contextmenu"){b.preventDefault(),b.stopPropagation();return}super.handleEvent(b)}dispatchEvent(b){return this._host?this._host.dispatchEvent(b):!0}get scrim(){return ku.element}connectScrim(b){const y=this.scrim;y.addEventListener("pointerup",this),y.addEventListener("contextmenu",this),y.addEventListener("keydown",this),y.addEventListener("keyup",this),y.addEventListener("pointermove",this),ku.open({root:b,onDismiss:()=>this.hide()})}disconnectScrim(){const b=this.scrim;b.removeEventListener("pointerup",this),b.removeEventListener("contextmenu",this),b.removeEventListener("keydown",this),b.removeEventListener("keyup",this),b.removeEventListener("pointermove",this),ku.state==="open"&&ku.scrim.close()}get rootMenu(){return this}show(b){return this._onDismiss=b==null?void 0:b.onDismiss,b!=null&&b.modifiers&&(this.modifiers=b.modifiers),this.updateState(),this.connectScrim(b==null?void 0:b.target),super.show(he(Ce({},b),{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,ku.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(b){this.cancelDelayedOperation();const y=rm.SUBMENU_DELAY;if(y<=0){b();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,b()},y)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};np.SUBMENU_DELAY=120;var wg=np;function rp(a){return zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Tu(a)||id(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Tu(a)&&typeof a.checked=="function"?!0:id(a)?a.submenu.some(rp):!1}var Gf=class{};Gf.DELAY=300,Gf.MAX_DISTANCE=10;function Cg(a){return new Promise((b,y)=>{const E=Sf(a);E||b(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),b(xg(ee,E)<Gf.MAX_DISTANCE)},Gf.DELAY),ae=new AbortController,de=ae.signal;for(const ve of["pointermove","pointerup","pointercancel"])window.addEventListener(ve,Se=>{if(Se.type==="pointerup"||Se.type==="pointercancel")clearTimeout(re),ae.abort(),b(!1);else if(Se.type==="pointermove"){const De=Sf(Se);De&&(ee=De)}},{passive:!0,signal:de})})}function ip(a,b,y){return hc(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(y.show({target:b,location:Sf(E),modifiers:_c(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=b==null?void 0:b.getBoundingClientRect();if(ee&&y.show({target:b,location:{x:Math.ceil(ee.left+ee.width/2),y:Math.ceil(ee.top+ee.height/2)},modifiers:_c(E)}))return a.preventDefault(),a.stopPropagation(),!0}}if(a.type==="pointerdown"&&a.pointerType!=="mouse"&&a.button===0){let E=a.target;for(;E&&b!==E;)E=E.parentNode;if(!E||!y.visible)return!1;const ee=Sf(a);if(yield Cg(a))return y.state!=="closed"?!1:(y.show({target:b,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};Wt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(he(Ce({},a),{body:mt(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Wt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const b=Gt(mt(a.args[0]));return new z(he(Ce({},a),{body:mt(a.args[0]),svgAccent:a.command.slice(1)+(b.length>5?"4":["1","1","2","2","3","3"][b.length])}))}}),Wt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(he(Ce({},a),{body:mt(a.args[0]),svgAccent:"overarc"}))}),Wt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new eu(he(Ce({},a),{body:mt(a.args[0]),svgBelow:"underarc"}))}),Wt("utilde","{body:auto}",{createAtom:a=>{const b=mt(a.args[0]),y=Gt(b),E="widetilde"+(y.length>5?"4":["1","1","2","2","3","3"][y.length]);return new eu(he(Ce({},a),{body:b,svgBelow:E,boxType:ec(b)}))}}),Wt("^","{:string}",{createAtom:a=>{var b;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[a.args[0]])!=null?b:"^"}))}}),Wt("`","{:string}",{createAtom:a=>{var b;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[a.args[0]])!=null?b:"`"}))}}),Wt("'","{:string}",{createAtom:a=>{var b;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[a.args[0]])!=null?b:"'"}))}}),Wt('"',"{:string}",{createAtom:a=>{var b,y;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(b=a.args)!=null&&b[0]?(y={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[a.args[0]])!=null?y:'"'+a.args[0]:'"'}))}}),Wt(".","{:string}",{createAtom:a=>{var b,y;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(b=a.args)!=null&&b[0]?(y={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[a.args[0]])!=null?y:"."+a.args[0]:"."}))}}),Wt("=","{:string}",{createAtom:a=>{var b,y;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(b=a.args)!=null&&b[0]?(y={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[a.args[0]])!=null?y:"="+a.args[0]:"="}))}}),Wt("~","{:string}",{createAtom:a=>{var b;return new Gn(he(Ce({type:"mord"},a),{isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[a.args[0]])!=null?b:"\xB4"}))}}),Wt("c","{:string}",{createAtom:a=>{var b;return new Gn(he(Ce({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(b={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?b:""}))}}),Wt("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var b,y;const E=a.args,ee={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(b=a.style)!=null?b:{}};if(E[1]){const ae=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const de of ae){const ve=de.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(ve)ee.strokeWidth=ve[1],ee.strokeStyle=ve[2],ee.strokeColor=ve[3];else{const Se=de.match(/\s*([a-z]*)\s*=\s*"(.*)"/);Se&&(Se[1]==="mathbackground"?ee.backgroundcolor=Se[2]:Se[1]==="mathcolor"?ee.strokeColor=Se[2]:Se[1]==="padding"?ee.padding=Se[2]:Se[1]==="shadow"&&(ee.shadow=Se[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((y=E[0])!=null?y:"").split(/[, ]/).filter(ae=>ae.length>0).forEach(ae=>{re[ae.toLowerCase()]=!0}),new Ad(a.command,mt(E[2]),re,ee)}}),Wt("cancel","{body:auto}",{createAtom:a=>{var b;return new Ad(a.command,mt(a.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(b=a.style)!=null?b:{}})}}),Wt("bcancel","{body:auto}",{createAtom:a=>{var b;return new Ad(a.command,mt(a.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(b=a.style)!=null?b:{}})}}),Wt("xcancel","{body:auto}",{createAtom:a=>{var b;return new Ad(a.command,mt(a.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(b=a.style)!=null?b:{}})}}),Wt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var b;return new eu(he(Ce({},a),{body:mt((b=a.args)==null?void 0:b[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Wt("overbrace","{:auto}",{createAtom:a=>new eu(he(Ce({},a),{body:mt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Wt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new eu(he(Ce({},a),{body:mt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Wt(["underbrace"],"{:auto}",{createAtom:a=>new eu(he(Ce({},a),{body:mt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Wt(["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 b,y,E,ee,re;return new eu(he(Ce({},a),{svgBody:a.command.slice(1),above:((y=mt((b=a.args)==null?void 0:b[1]))==null?void 0:y.length)===0?void 0:mt((E=a.args)==null?void 0:E[1]),below:(re=mt((ee=a.args)==null?void 0:ee[0]))!=null?re:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(a,b)=>a.command+(a.hasEmptyBranch("below")?"":`[${a.belowToLatex(b)}]`)+`{${a.aboveToLatex(b)}}${a.supsubToLatex(b)}`}),Wt(["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 Mc(a.command.slice(1),he(Ce({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Wt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Mc({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],he(Ce({},a),{limits:"over-under",variant:"main"}))}),Wt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Mc(a.command.slice(1),he(Ce({},a),{limits:"over-under",variant:"main"}))}),Wt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Mc(a.command.slice(1),he(Ce({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Wt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),serialize:(a,b)=>`\\ang{${a.bodyToLatex(b)}}`,render:(a,b)=>{const y=a.createBox(b),E=y.caret;y.caret=void 0;const ee=new Lr("\xB0",{style:he(Ce({},a.style),{variant:"normal",variantStyle:"up"})});return new Lr([y,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Wt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(he(Ce({},a),{body:mt(a.args[1]),index:a.args[0]?mt(a.args[0]):void 0}))}),Wt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const b=Ce({},a),y=a.command,E=a.args;switch(y){case"\\dfrac":case"\\frac":case"\\tfrac":b.hasBarLine=!0;break;case"\\atopfrac":b.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":b.hasBarLine=!1,b.leftDelim="(",b.rightDelim=")";break;case"\\cfrac":b.hasBarLine=!0,b.continuousFraction=!0;break;default:}switch(y){case"\\dfrac":case"\\dbinom":b.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":b.mathstyleName="textstyle";break;default:}return new Xc(E[0]?mt(E[0]):[new da],E[1]?mt(E[1]):[new da],b)},serialize:(a,b)=>{const y=a.aboveToLatex(b),E=a.belowToLatex(b);return/^[0-9]$/.test(y)&&/^[0-9]$/.test(E)?`${a.command}${y}${E}`:bs(a.command,y,E)}}),Wt(["brace","brack"],"",{infix:!0,createAtom:a=>new Xc(mt(a.args[0]),mt(a.args[1]),he(Ce({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,b)=>yo([a.aboveToLatex(b),a.command,a.belowToLatex(b)])}),Wt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let b,y;const E=a.args;return a.command==="\\choose"&&(b="(",y=")"),new Xc(mt(E[0]),mt(E[1]),he(Ce({},a),{hasBarLine:a.command==="\\over",leftDelim:b,rightDelim:y}))},serialize:(a,b)=>yo([a.aboveToLatex(b),a.command,a.belowToLatex(b)])}),Wt(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var b,y;const E=a.args;return new Xc(mt(E[0]),mt(E[1]),he(Ce({},a),{leftDelim:(b=E[2])!=null?b:".",rightDelim:(y=E[3])!=null?y:".",hasBarLine:!1}))},serialize:(a,b)=>`${a.aboveToLatex(b)} ${a.command}${a.leftDelim}${a.rightDelim}${a.belowToLatex(b)}`}),Wt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new Xc(mt(a.args[0]),mt(a.args[1]),he(Ce({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Wt(["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)],he(Ce({},a),{limits:"auto",variant:"main"}))}),Wt("smallint","",{ifMode:"math",createAtom:a=>new Mc("\u222B",he(Ce({},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"};Wt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const b=a.command,y=op[b.slice(1)];return new fh(y,he(Ce({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[y]}))}}),Wt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Mc({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],he(Ce({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Wt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var b;return new r0(he(Ce({},a),{delim:(b=a.args[0])!=null?b:"|",size:1}))}}),Wt("the","{:value}",{createAtom:a=>new Gn(he(Ce({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,b)=>{var y;const E=new Io({parent:b},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new Lr(((y=Gs(re))!=null?y:"").split("").map(ae=>new Lr(ae,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:Ce({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:ee}).wrap(E)},serialize:a=>{var b;return`\\the${(b=Gs(a.args[0]))!=null?b:"\\relax"}`}}),Wt("mathtip","{:auto}{:math}",{createAtom:a=>new hh(he(Ce({},a),{body:mt(a.args[0]),tooltip:mt(a.args[1]),content:"math"})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`\\texttip{${a.bodyToLatex(b)}}{${Gn.serialize([a.tooltip],he(Ce({},b),{defaultMode:"math"}))}}`}),Wt("texttip","{:auto}{:text}",{createAtom:a=>new hh(he(Ce({},a),{body:mt(a.args[0]),tooltip:mt(a.args[1]),content:"text"})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`\\texttip{${a.bodyToLatex(b)}}{${Gn.serialize([a.tooltip],he(Ce({},b),{defaultMode:"text"}))}}`}),Wt("error","{:math}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),serialize:(a,b)=>`\\error{${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__error"})}),Wt("ensuremath","{:math}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),serialize:(a,b)=>`${a.command}{${a.bodyToLatex(he(Ce({},b),{defaultMode:"math"}))}}`}),Wt("color","{:value}",{applyStyle:(a,b,y)=>{var E,ee;return{verbatimColor:(E=Gs(b[0]))!=null?E:void 0,color:y.toColor((ee=b[0])!=null?ee:{string:"red"})}}}),Wt("textcolor","{:value}{content:auto*}",{applyStyle:(a,b,y)=>{var E,ee;return{verbatimColor:(E=Gs(b[0]))!=null?E:void 0,color:y.toColor((ee=b[0])!=null?ee:{string:"red"})}}}),Wt("boxed","{content:math}",{createAtom:a=>new Ws(he(Ce({},a),{body:mt(a.args[0]),framecolor:{string:"black"}}))}),Wt("colorbox","{:value}{:text*}",{applyStyle:(a,b,y)=>{var E,ee;return{verbatimBackgroundColor:(E=Gs(b[0]))!=null?E:void 0,backgroundColor:y.toBackgroundColor((ee=b[0])!=null?ee:{string:"yellow"})}}}),Wt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var b,y;return new Ws(he(Ce({},a),{body:mt(a.args[2]),framecolor:(b=a.args[0])!=null?b:{string:"blue"},backgroundcolor:(y=a.args[1])!=null?y:{string:"yellow"}}))},serialize:(a,b)=>{var y,E;return b.skipStyles?a.bodyToLatex(he(Ce({},b),{defaultMode:"text"})):bs(a.command,(y=Gs(a.framecolor))!=null?y:"",(E=Gs(a.backgroundcolor))!=null?E:"",a.bodyToLatex(he(Ce({},b),{defaultMode:"text"})))}}),Wt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var b;const y=a.args[0],E=mt(a.args[1]);return y?new Ws(he(Ce({},a),{body:E,padding:y.padding,border:y.border,backgroundcolor:(b=y.backgroundcolor)!=null?b:void 0})):new Ws(he(Ce({},a),{body:E}))},serialize:(a,b)=>{var y,E;if(b.skipStyles)return a.bodyToLatex(b);let ee=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const re=[];a.padding&&re.push((y=Gs(a.padding))!=null?y:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Gs(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return bs(ee,a.bodyToLatex(b))}}),Wt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),render:(a,b)=>{const y=new Io({parent:b,mathstyle:a.command.slice(1)},a.style),E=Gn.createBox(y,a.body,{type:"lift"});return a.caret&&(E.caret=a.caret),a.bind(b,E)},serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`{${yo([a.command,a.bodyToLatex(b)])}}`}),Wt(["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]})}),Wt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,b)=>{var y;return{fontSeries:(y=b[0])!=null?y:"auto"}}}),Wt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,b)=>{var y;return{fontShape:(y=b[0])!=null?y:"auto"}}}),Wt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,b)=>{var y;return{fontFamily:(y=b[0])!=null?y:"roman"}}}),Wt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Wt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Wt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),serialize:(a,b)=>`${a.command}{${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__boldsymbol"})}),Wt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Wt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Wt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Wt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Wt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Wt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Wt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Wt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Wt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Wt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Wt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Wt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Wt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Wt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Wt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Wt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Wt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Wt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Wt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Wt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Wt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Wt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Wt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Wt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Wt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Wt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Wt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Wt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Wt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Wt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Wt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Wt("mbox","{:text}",{ifMode:"math",createAtom:a=>new Gn(he(Ce({},a),{type:"mord",body:mt(a.args[0]),mode:"math"})),serialize:(a,b)=>bs("\\mbox",a.bodyToLatex(he(Ce({},b),{defaultMode:"text"})))}),Wt("text","{:text}",{ifMode:"math",applyMode:"text"}),Wt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[1])})),serialize:(a,b)=>!a.args[0]||b.skipStyles?a.bodyToLatex(b):`${a.command}{${a.args[0]}}{${a.bodyToLatex(b)}}`,render:(a,b)=>{var y;return a.createBox(b,{classes:(y=a.args[0])!=null?y:""})}}),Wt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[1])})),serialize:(a,b)=>{var y;return!((y=a.args)!=null&&y[0])||b.skipStyles?a.bodyToLatex(b):`${a.command}{${a.args[0]}}{${a.bodyToLatex(b)}}`},render:(a,b)=>{var y;const E=a.createBox(b);return E.cssId=(y=a.args[0])!=null?y:"",E}}),Wt("htmlData","{data:string}{content:auto}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[1])})),serialize:(a,b)=>{var y;return!((y=a.args)!=null&&y[0])||b.skipStyles?a.bodyToLatex(b):`\\htmlData{${a.args[0]}}{${a.bodyToLatex(b)}}`},render:(a,b)=>{var y;const E=a.createBox(b);return E.htmlData=(y=a.args[0])!=null?y:"",E}}),Wt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[1])})),serialize:(a,b)=>{var y;return!((y=a.args)!=null&&y[0])||b.skipStyles?a.bodyToLatex(b):`${a.command}{${a.args[0]}}{${a.bodyToLatex(b)}}`},render:(a,b)=>{var y;const E=a.createBox(b);return E.htmlStyle=(y=a.args[0])!=null?y:"",E}}),Wt("em","{:rest}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`{\\em ${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{classes:"ML__emph",boxType:"lift"})}),Wt("emph","{:auto}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[1])})),serialize:(a,b)=>b.skipStyles?a.bodyToLatex(b):`\\emph{${a.bodyToLatex(b)}}`,render:(a,b)=>a.createBox(b,{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}};Wt(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var b;return new i0(he(Ce({},a),{delim:(b=a.args[0])!=null?b:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),Wt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var b;return new Pd(he(Ce({},a),{width:(b=a.args[0])!=null?b:{dimension:0}}))}}),Wt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var b;return new Pd(he(Ce({},a),{width:(b=a.args[0])!=null?b:{dimension:0}}))}}),Wt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Gn(a),render:(a,b)=>{let y=0;const E=b.mathstyle.id;(E===xc||E===Su)&&(y=1),(E===zu||E===bl)&&(y=2),(E===Rl||E===ol)&&(y=3);const ee=mt(a.args[y]);return Gn.createBox(b,ee)},serialize:(a,b)=>`\\mathchoice{${Gn.serialize(a.args[0],b)}}{${Gn.serialize(a.args[1],b)}}{${Gn.serialize(a.args[2],b)}}{${Gn.serialize(a.args[3],b)}}`}),Wt("mathop","{:auto}",{createAtom:a=>new Gn(he(Ce({},a),{type:"mop",body:mt(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,b)=>{var y;let E=Gn.createBox(b,a.body);if(a.superscript||a.subscript){const ee=(y=a.subsupPlacement)!=null?y:"auto";E=ee==="over-under"||ee==="auto"&&b.isDisplayStyle?a.attachLimits(b,{base:E}):a.attachSupsub(b,{base:E})}return new Lr(a.bind(b,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,b)=>{const y=[bs(a.command,a.bodyToLatex(b))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&y.push("\\limits"),a.subsupPlacement==="adjacent"&&y.push("\\nolimits"),a.subsupPlacement==="auto"&&y.push("\\displaylimits")),y.push(a.supsubToLatex(b)),yo(y)}}),Wt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Gn(he(Ce({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:mt(a.args[0])}))}),Wt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const b=mt(a.args[0]).map(y=>{var E;return y.type!=="first"&&(y.type="mord",y.value=(E={"\u2217":"*","\u2212":"-"}[y.value])!=null?E:y.value,y.isFunction=!1,!y.style.variant&&!y.style.variantStyle&&(y.style.variant="main",y.style.variantStyle="up")),y});return new Gn(he(Ce({},a),{type:"mop",body:b,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,b)=>{var y;let E=Gn.createBox(b,a.body);if(a.superscript||a.subscript){const ee=(y=a.subsupPlacement)!=null?y:"auto";E=ee==="over-under"||ee==="auto"&&b.isDisplayStyle?a.attachLimits(b,{base:E}):a.attachSupsub(b,{base:E})}return a.caret&&(E.caret=a.caret),new Lr(a.bind(b,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,b)=>{const y=[bs(a.command,a.bodyToLatex(b))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&y.push("\\limits"),a.subsupPlacement==="adjacent"&&y.push("\\nolimits"),a.subsupPlacement==="auto"&&y.push("\\displaylimits")),y.push(a.supsubToLatex(b)),yo(y)}}),Wt(["char","unicode"],"{charcode:value}",{createAtom:a=>new Gn(he(Ce({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var b;return`${a.command}${Gs((b=a.args[0])!=null?b:{number:10067,base:"hexadecimal"})}`},render:(a,b)=>{let y=b.evaluate(a.args[0]);return(!y||!("number"in y))&&(y={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(y.number),a.createBox(b)}}),Wt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Gn(a),render:(a,b)=>{var y,E,ee;const re=new Io({parent:b,mathstyle:"textstyle"},a.style),ae=re.toEm((y=a.args[0])!=null?y:{dimension:0}),de=re.toEm((E=a.args[1])!=null?E:{dimension:10}),ve=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),Se=new Lr(null,{classes:"rule",type:"ord"});return Se.width=de,Se.height=ve+ae,Se.depth=-ae,Se.setStyle("border-right-width",de,"em"),Se.setStyle("border-top-width",ve,"em"),Se.setStyle("border-color",a.style.color),Se.setStyle("vertical-align",ae,"em"),a.isSelected&&Se.setStyle("opacity","50%"),a.bind(re,Se),a.caret&&(Se.caret=a.caret),Se.wrap(b)},serialize:a=>`\\rule${a.args[0]?`[${Gs(a.args[0])}]`:""}{${Gs(a.args[1])}}{${Gs(a.args[2])}}`}),Wt(["overline","underline"],"{:auto}",{createAtom:a=>new Gn(he(Ce({},a),{body:mt(a.args[0])})),render:(a,b)=>{const y=a.command.substring(1),E=new Io({parent:b,mathstyle:"cramp"},a.style),ee=Gn.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new Lr(null,{classes:y+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let de;return y==="overline"?de=new cs({shift:0,children:[{box:ee},3*re,{box:ae},re]}):de=new cs({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(de.caret=a.caret),new Lr(de,{classes:y,type:"ignore"})}}),Wt("overset","{:auto}{base:auto}",{createAtom:a=>{const b=mt(a.args[1]);return new eu(he(Ce({},a),{above:mt(a.args[0]),body:b,skipBoundary:!1,boxType:ec(b)}))},serialize:(a,b)=>bs(a.command,a.aboveToLatex(b),a.bodyToLatex(b))}),Wt("underset","{:auto}{base:auto}",{createAtom:a=>{const b=mt(a.args[1]);return new eu(he(Ce({},a),{below:mt(a.args[0]),body:b,skipBoundary:!1,boxType:ec(b)}))},serialize:(a,b)=>bs(a.command,a.belowToLatex(b),a.bodyToLatex(b))}),Wt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const b=mt(a.args[2]);return new eu(he(Ce({},a),{above:mt(a.args[0]),below:mt(a.args[1]),body:b,skipBoundary:!1,boxType:ec(b)}))},serialize:(a,b)=>bs(a.command,a.belowToLatex(b),a.bodyToLatex(b))}),Wt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new eu(he(Ce({},a),{body:mt(a.args[2]),above:mt(a.args[1]),below:mt(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,b)=>bs(a.command,a.aboveToLatex(b),a.bodyToLatex(b))}),Wt("smash","[:string]{:auto}",{createAtom:a=>{var b,y,E,ee;return new Id(he(Ce({},a),{body:mt(a.args[1]),smashHeight:(y=(b=a.args[0])==null?void 0:b.includes("t"))!=null?y:!0,smashDepth:(ee=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ee:!0}))}}),Wt(["vphantom"],"{:auto}",{createAtom:a=>new Id(he(Ce({},a),{body:mt(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Wt(["hphantom"],"{:auto}",{createAtom:a=>new Id(he(Ce({},a),{body:mt(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Wt(["phantom"],"{:auto}",{createAtom:a=>new Id(he(Ce({},a),{body:mt(a.args[0]),isInvisible:!0}))}),Wt("not","{:math}",{createAtom:a=>{const b=mt(a.args[0]);return b.length===0?new Gn(he(Ce({},a),{type:"mrel",value:"\uE020"})):new Gn(he(Ce({},a),{body:[new Ec(he(Ce({},a),{body:"\uE020",align:"right"})),...b],captureSelection:!0}))},serialize:(a,b)=>{const y=a.args[0],E=y&&typeof y=="object"&&"group"in y;return a.value!=="\uE020"?E?`\\not{${Gn.serialize(y.group,b)}}`:`\\not${Gn.serialize(y,b)}`:E?"\\not{}":"\\not"},render:(a,b)=>{if(a.value)return a.createBox(b);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":ec(mt(a.args[0])),ee=Gn.createBox(b,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(b,ee)}}),Wt(["ne","neq"],"",{createAtom:a=>new Gn(he(Ce({},a),{type:"mrel",body:[new Ec(he(Ce({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Gn(he(Ce({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Wt("rlap","{:auto}",{createAtom:a=>new Ec(he(Ce({},a),{body:mt(a.args[0]),align:"right"}))}),Wt("llap","{:auto}",{createAtom:a=>new Ec(he(Ce({},a),{body:mt(a.args[0]),align:"left"}))}),Wt("mathrlap","{:math}",{createAtom:a=>new Ec(he(Ce({},a),{body:mt(a.args[0]),align:"left"}))}),Wt("mathllap","{:math}",{createAtom:a=>new Ec(he(Ce({},a),{body:mt(a.args[0]),align:"left"}))}),Wt("raisebox","{:value}{:text}",{createAtom:a=>{var b;return new Ws(he(Ce({},a),{body:mt(a.args[1]),padding:{dimension:0},offset:(b=a.args[0])!=null?b:{dimension:0}}))},serialize:(a,b)=>{var y;return bs("\\raisebox",(y=Gs(a.offset))!=null?y:"0pt",a.bodyToLatex(b))}}),Wt("raise","{:value}{:auto}",{createAtom:a=>{var b;return new Ws(he(Ce({},a),{body:mt(a.args[1]),padding:{dimension:0},offset:(b=a.args[0])!=null?b:{dimension:0}}))},serialize:(a,b)=>{var y;return bs("\\raise",(y=Gs(a.offset))!=null?y:"0pt",a.bodyToLatex(b))}}),Wt("lower","{:value}{:auto}",{createAtom:a=>{var b;return new Ws(he(Ce({},a),{body:mt(a.args[1]),padding:{dimension:0},offset:(b=Jl(a.args[0],-1))!=null?b:{dimension:0}}))},serialize:(a,b)=>{var y,E;return bs("\\lower",(E=Gs(Jl((y=a.offset)!=null?y:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(b))}}),Oe("0123456789/@.?!"),rt(65,90),rt(97,122),Oe([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Oe([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Oe([["\\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]]),Oe([["\\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"),Oe([["\\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"]]),Oe([["\\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"]]),Oe([["\\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"),Oe([["+",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"),Oe([["\\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"),Oe([["\\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]]),Oe([["=",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"),Oe([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Oe([["\\wp",8472],["\\aleph",8501]]),Oe([["\\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"),Oe([["\\ ",160],["~",160]],"space"),Wt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Pd(a)}),Wt("space","",{createAtom:a=>new Pd(a)}),Oe([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Oe([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Oe([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>&#x2061;</mo>",Xf="<mo>&#8290;</mo>";function Yf(a){return a.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function hs(a,b){return!a||!b.generateID?"":` extid="${a}"`}function Eg(a,b,y){var E,ee,re,ae,de,ve,Se,De,ze,at,Et;let Ot=!1;b=b!=null?b:a.atoms.length;let Ln="",kr="",Dn=a.atoms[a.index];const ar=(ee=(E=Dn.style)==null?void 0:E.variant)!=null?ee:"",Pr=(ae=(re=Dn.style)==null?void 0:re.variantStyle)!=null?ae:"";let fr="";if(ar||Pr){const oa=cn(Dn.value,(de=Dn.style)==null?void 0:de.variant,(ve=Dn.style)==null?void 0:ve.variantStyle);if(oa!==Dn.value)return a.index+=1,Ln=`<mi${hs(Dn.id,y)}>${oa}</mi>`,Vu(Ln,a,y)||(a.mathML+=Ln,a.lastType="mi"),!0;fr=(Se={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"}[Pr+ar])!=null?Se:"",fr=` mathvariant="${fr}"`}const Si={"\\exponentialE":"&#x02147;","\\imaginaryI":"&#x2148;","\\differentialD":"&#x2146;","\\capitalDifferentialD":"&#x2145;","\\alpha":"&#x03b1;","\\pi":"&#x03c0;","\\infty":"&#x221e;","\\forall":"&#x2200;","\\nexists":"&#x2204;","\\exists":"&#x2203;","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(Dn.command==="!")return a.index+=1,Ln="<mo>!</mo>",Vu(Ln,a,y)||(a.mathML+=Ln,a.lastType="mo"),!0;if(Si[Dn.command]){a.index+=1;let oa=`<mi${hs(Dn.id,y)}${fr}>${Si[Dn.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(oa=Xf+oa),Vu(oa,a,y)||(a.mathML+=oa,a.lastType="mi"),!0}if(Dn.command==="\\operatorname")kr=od(Dn.body),a.index+=1;else if(ar||Pr)for(;a.index<b&&(Dn.type==="mord"||Dn.type==="macro")&&!Dn.isDigit()&&ar===((ze=(De=Dn.style)==null?void 0:De.variant)!=null?ze:"")&&Pr===((Et=(at=Dn.style)==null?void 0:at.variantStyle)!=null?Et:"");)kr+=od([Dn]),a.index+=1,Dn=a.atoms[a.index];else(Dn.type==="mord"||Dn.type==="macro")&&!Dn.isDigit()&&(kr+=od([Dn]),a.index+=1);if(kr.length>0){Ot=!0,Ln=`<mi${fr}>${kr}</mi>`;const oa=a.lastType;Ln.endsWith(">f</mi>")||Ln.endsWith(">g</mi>")?(Ln+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(Ln)?"mo":"mi",Vu(Ln,a,y)||((oa==="mi"||oa==="mn"||oa==="mtext"||oa==="fence")&&(Ln=Xf+Ln),a.mathML+=Ln)}return Ot}function Mg(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function _g(a){let b=-1,y=a.index,E=!1,ee=!1;for(;y<a.atoms.length&&!E&&!ee;){const re=a.atoms[y];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,y++}return ee&&(b=y-1),b}function Vu(a,b,y){var E;let ee=b.atoms[b.index-1];if(!ee)return!1;if(!ee.superscript&&!ee.subscript)if(((E=b.atoms[b.index])==null?void 0:E.type)==="subsup")ee=b.atoms[b.index],b.index+=1;else return!1;const re=b.lastType;b.lastType="";const ae=Vo(ee.superscript,y);b.lastType="";const de=Vo(ee.subscript,y);if(b.lastType=re,!ae&&!de)return!1;let ve="";return ae&&de?ve=`<msubsup>${a}${de}${ae}</msubsup>`:ae?ve=`<msup>${a}${ae}</msup>`:de&&(ve=`<msub>${a}${de}</msub>`),b.mathML+=ve,b.lastType="",!0}function kg(a,b,y){b=b!=null?b:a.atoms.length;const E=a.index;let ee="";for(;a.index<b&&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 ${hs(a.atoms[E].id,y)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Dg(a,b,y){b=b!=null?b:a.atoms.length;const E=a.index;let ee="",re=_g(a);for(re>=0&&re<b&&(b=re);a.index<b&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+hs(a.atoms[E].id,y)+">"+ee+"</mn>",re<0&&Mg(a)&&(re=a.index,a.index+=1),Vu(ee,a,y)||(a.mathML+=ee,a.lastType="mn"),!0)}function Lg(a,b,y){let E=!1;b=b!=null?b:a.atoms.length;let ee="",re="";if(a.index<b&&a.atoms[a.index].type==="mopen"){let ae=!1,de=0;const ve=a.index;let Se=-1,De=ve+1;for(;De<b&&!ae;)a.atoms[De].type==="mopen"?de+=1:a.atoms[De].type==="mclose"&&(de-=1),de===-1&&(ae=!0,Se=De),De+=1;ae&&(ee="<mrow>",ee+=Bc(a.atoms[ve],y),ee+=Vo(a.atoms,y,ve+1,Se),ee+=Bc(a.atoms[Se],y),ee+="</mrow>",a.index=Se+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Xf),Vu(ee,a,y)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Ag(a,b,y){let E=!1;b=b!=null?b:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const de={"\\ne":"&ne;","\\neq":"&neq;","\\pm":"&#177;","\\times":"&#215;","\\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 ve=`<mo${hs(ae.id,y)}>${de[ae.command]}</mo>`;return Vu(ve,a,y)||(a.mathML+=ve,a.lastType="mo"),!0}if(a.index<b&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wh(a.atoms[a.index],y),a.index+=1,re="mo";else if(a.index<b&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const ve=Bc(ae,y);return ae.superscript&&ae.subscript?(ee+="<munderover>"+ve,ee+=Vo(ae.subscript,y),ee+=Vo(ae.superscript,y),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+ve,ee+=Vo(ae.superscript,y),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+ve,ee+=Vo(ae.subscript,y),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const ve=a.atoms[a.index],Se=ve.value==="\\operatorname",De=Se?'<mi class="MathML-Unit"'+hs(ve.id,y)+">"+od(ve.value)+"</mi>":Bc(ve,y);ee+=De,!Se&&!/^<mo>(.*)<\/mo>$/.test(De)?(ee+=lp,re="applyfunction"):re=Se?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Xf+ee),a.index+=1}return ee.length>0&&(E=!0,Vu(ee,a,y)||(a.mathML+=ee,a.lastType=re)),E}function Vo(a,b,y,E){b!=null||(b={});const ee={atoms:[],index:y!=null?y: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 Gn)ee.mathML=Wh(a,b);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(kg(ee,E,b)||Dg(ee,E,b)||Eg(ee,E,b)||Ag(ee,E,b)||Lg(ee,E,b))re+=1;else if(ee.index<E){let ae=Wh(ee.atoms[ee.index],b);ee.lastType==="mn"&&ae.length>0&&ee.atoms[ee.index].type==="genfrac"&&(ae="<mo>&#x2064;</mo>"+ae),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,Vu(ae,ee,b)?re+=1:ae.length>0&&(ee.mathML+=ae,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function Bc(a,b){let y="";const E=od(a.value);return E&&(y="<mo"+hs(a.id,b)+">"+E+"</mo>"),y}function od(a){if(!a)return"";if(typeof a=="string")return Yf(a);if(!Array.isArray(a)&&typeof a.body=="string")return Yf(a.body);let b="";for(const y of a)typeof y.value=="string"&&(b+=y.value);return Yf(b)}function Wh(a,b){var y,E,ee,re,ae,de,ve,Se,De,ze,at,Et,Ot,Ln,kr,Dn,ar,Pr,fr,Si,oa,zi;if(a.mode==="text")return`<mi${hs(a.id,b)}>${a.value}</mi>`;const Bo={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"},is={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Vr="",Gl="",Pu,nu,dl,Xl,Pl,ps;const{command:Vs}=a;if(a.command==="\\error")return`<merror${hs(a.id,b)}>${Vo(a.body,b)}</merror>`;const fl={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Ou={"\\vec":"&#x20d7;","\\acute":"&#x00b4;","\\grave":"&#x0060;","\\dot":"&#x02d9;","\\ddot":"&#x00a8;","\\tilde":"&#x007e;","\\bar":"&#x00af;","\\breve":"&#x02d8;","\\check":"&#x02c7;","\\hat":"&#x005e;"};switch(a.type){case"first":break;case"group":case"root":Vr=Vo(a.body,b);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Vr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Vr+="<mo>"+(fl[a.leftDelim]||a.leftDelim)+"</mo>")),Vr+="<mtable",a.colFormat){for(Vr+=' columnalign="',dl=0;dl<a.colFormat.length;dl++)a.colFormat[dl].align&&(Vr+={l:"left",c:"center",r:"right"}[a.colFormat[dl].align]+" ");Vr+='"'}for(Vr+=">",nu=0;nu<a.array.length;nu++){for(Vr+="<mtr>",Pu=0;Pu<a.array[nu].length;Pu++)Vr+="<mtd>"+Vo(a.array[nu][Pu],b)+"</mtd>";Vr+="</mtr>"}Vr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Vr+="<mo>"+(fl[a.leftDelim]||a.rightDelim)+"</mo>"),Vr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Vr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Vr+="<mo"+hs(a.id,b)+">"+(fl[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Vr+="<mfrac>",Vr+=Vo(a.above,b)||"<mi>&nbsp;</mi>",Vr+=Vo(a.below,b)||"<mi>&nbsp;</mi>",Vr+="</mfrac>"):(Vr+="<mtable"+hs(a.id,b)+">",Vr+="<mtr>"+Vo(a.above,b)+"</mtr>",Vr+="<mtr>"+Vo(a.below,b)+"</mtr>",Vr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Vr+="<mo"+hs(a.id,b)+">"+(fl[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Vr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Vr+="<msqrt"+hs(a.id,b)+">",Vr+=Vo(a.body,b),Vr+="</msqrt>"):(Vr+="<mroot"+hs(a.id,b)+">",Vr+=Vo(a.body,b),Vr+=Vo(a.above,b),Vr+="</mroot>");break;case"leftright":const Bu=a,Nu=Bu.leftDelim;Vr="<mrow>",Nu&&Nu!=="."&&(Vr+=`<mo${hs(a.id,b)}>${(y=fl[Nu])!=null?y:Nu}</mo>`),a.body&&(Vr+=Vo(a.body,b));const Ru=Bu.matchingRightDelim();Ru&&Ru!=="."&&(Vr+=`<mo${hs(a.id,b)}>${(E=fl[Ru])!=null?E:Ru}</mo>`),Vr+="</mrow>";break;case"sizeddelim":case"delim":Vr+=`<mo${hs(a.id,b)}>${fl[a.value]||a.value}</mo>`;break;case"accent":Vr+='<mover accent="true"'+hs(a.id,b)+">",Vr+=Vo(a.body,b),Vr+="<mo>"+(Ou[Vs]||a.accent)+"</mo>",Vr+="</mover>";break;case"line":case"overlap":break;case"overunder":Pl=a.above,Xl=a.below,(a.svgAbove||Pl)&&(a.svgBelow||Xl)?ps=a.body:Pl&&Pl.length>0?(ps=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(Xl=a.body[0].below,ps=a.body[0].body):((de=(ae=a.body)==null?void 0:ae[0])==null?void 0:de.type)==="first"&&((Se=(ve=a.body)==null?void 0:ve[1])!=null&&Se.below)&&(Xl=a.body[1].below,ps=a.body[1].body)):Xl&&Xl.length>0&&(ps=a.body,(ze=(De=a.body)==null?void 0:De[0])!=null&&ze.above?(Pl=a.body[0].above,ps=a.body[0].body):((Et=(at=a.body)==null?void 0:at[0])==null?void 0:Et.type)==="first"&&((Ln=(Ot=a.body)==null?void 0:Ot[1])!=null&&Ln.above)&&(Pl=a.body[1].overscript,ps=a.body[1].body)),(a.svgAbove||Pl)&&(a.svgBelow||Xl)?(Vr+=`<munderover ${hs(a.id,b)}>`,Vr+=(kr=Bo[a.svgBody])!=null?kr:Vo(ps,b),Vr+=(Dn=Bo[a.svgBelow])!=null?Dn:Vo(Xl,b),Vr+=(ar=Bo[a.svgAbove])!=null?ar:Vo(Pl,b),Vr+="</munderover>"):a.svgAbove||Pl?(Vr+=`<mover ${hs(a.id,b)}>`+((Pr=Bo[a.svgBody])!=null?Pr:Vo(ps,b)),Vr+=(fr=Bo[a.svgAbove])!=null?fr:Vo(Pl,b),Vr+="</mover>"):(a.svgBelow||Xl)&&(Vr+=`<munder ${hs(a.id,b)}>`+((Si=Bo[a.svgBody])!=null?Si:Vo(ps,b)),Vr+=(oa=Bo[a.svgBelow])!=null?oa:Vo(Xl,b),Vr+="</munder>");break;case"placeholder":Vr+="?";break;case"mord":{Vr=typeof a.value=="string"?a.value:Vs,Vs==="\\char"?Vr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Vr.length>0&&Vr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Vr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Vr=a.value.charAt(0):(console.error("Did not expect this"),Vr=""));const mu=/\d/.test(Vr)?"mn":"mi";Vr=`<${mu}${hs(a.id,b)}>${Yf(Vr)}</${mu}>`;break}case"mbin":case"mrel":case"minner":Vr=Bc(a,b);break;case"mpunct":Vr='<mo separator="true"'+hs(a.id,b)+">"+Vs+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Vr="<mo"+hs(a.id,b)+">",Vr+=Vs==="\\operatorname"?a.body:Vs||a.body,Vr+="</mo>");break;case"box":Vr='<menclose notation="box"',a.backgroundcolor&&(Vr+=' mathbackground="'+a.backgroundcolor+'"'),Vr+=hs(a.id,b)+">"+Vo(a.body,b)+"</menclose>";break;case"spacing":Vr+='<mspace width="'+((zi=is[Vs])!=null?zi:0)+'em"/>';break;case"enclose":Vr='<menclose notation="';for(const mu in a.notation)Object.prototype.hasOwnProperty.call(a.notation,mu)&&a.notation[mu]&&(Vr+=Gl+mu,Gl=" ");Vr+=hs(a.id,b)+'">'+Vo(a.body,b)+"</menclose>";break;case"prompt":Vr='<menclose notation="roundexbox""">'+Vo(a.body,b)+"</menclose>";break;case"space":Vr+="&nbsp;";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Vr+=Bc(a,b);break;case"mclose":Vr+=Bc(a,b);break;case"macro":{const mu=a.command+od(a.macroArgs);mu&&(Vr+=`<mo ${hs(a.id,b)}>${mu}</mo>`)}break;case"latexgroup":Vr+=Vo(a.body,b);break;case"latex":Vr+="<mtext"+hs(a.id,b)+">"+a.value+"</mtext>";break;case"tooltip":Vr+=Vo(a.body,b);break;case"text":Vr+=`<mtext ${hs(a.id,b)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${hs(a.id,b)} displaystyle="true">${Vo(a.body,b)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${hs(a.id,b)} displaystyle="false">${Vo(a.body,b)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Vr}var sd={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Zh={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Tg(a){let b="";return a.startsWith("\\")&&(b=" "+a.replace("\\","")+" "),b}function Gd(a){let b=0;if(Pe(a))for(const y of a)y.type!=="first"&&(b+=1);return b===1}function Ig(a){if(Pe(a)){for(const b of a)if(b.type!=="first"&&b.id)return b.id.toString()}return""}function up(a){let b="";if(Pe(a))for(const y of a)y.type!=="first"&&typeof y.value=="string"&&(b+=y.value);return b}function Pg(a){return a?a.map(b=>b.value).join(""):""}function Ao(a,b){var y,E,ee,re,ae;function de(De){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(De)?` <say-as interpret-as="character">${De}</say-as>`:/[A-Z]/.test(De)?`capital <say-as interpret-as="character">${De.toLowerCase()}</say-as>`:De:/[a-z]/.test(De)?" '"+De.toUpperCase()+"'":/[A-Z]/.test(De)?" 'capital "+De.toUpperCase()+"'":De}function ve(De){return"<emphasis>"+De+"</emphasis>"}if(!b)return"";let Se="";if(Pe(b)){let De=!1,ze=!1;for(let at=0;at<b.length;at++)b[at].type!=="first"&&(b[at].mode!=="text"&&(ze=!1),at<b.length-2&&b[at].type==="mopen"&&b[at+2].type==="mclose"&&b[at+1].type==="mord"?(Se+=" of ",Se+=ve(Ao(a,b[at+1])),at+=2):b[at].mode==="text"?ze?Se+=(y=b[at].value)!=null?y:" ":(ze=!0,Se+=Ao("text",b[at])):b[at].isDigit()?De?Se+=b[at].asDigit():(De=!0,Se+=Ao(a,b[at])):(De=!1,Se+=Ao(a,b[at])))}else if(b.mode==="text")b.id&&a==="math"&&(Se+='<mark name="'+b.id.toString()+'"/>'),Se+=b.value;else{b.id&&a==="math"&&(Se+='<mark name="'+b.id.toString()+'"/>');let De="",ze="",at="",Et=!1;const{command:Ot}=b;switch(Ot){case"\\vec":return"vector "+Ao(a,b.body);case"\\acute":return Ao(a,b.body)+" acute";case"\\grave":return Ao(a,b.body)+" grave";case"\\dot":return"dot over"+Ao(a,b.body);case"\\ddot":return"double dot over"+Ao(a,b.body);case"\\mathring":return"ring over"+Ao(a,b.body);case"\\tilde":case"\\widetilde":return"tilde over"+Ao(a,b.body);case"\\bar":return Ao(a,b.body)+" bar";case"\\breve":return Ao(a,b.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Ao(a,b.body);case"\\hat":case"\\widehat":return"hat over"+Ao(a,b.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Ao(a,b.body);case"\\underarc":case"\\underparen":return"arc under "+Ao(a,b.body)}switch(b.type){case"prompt":const Ln=b.body.length>1?'start input . <break time="500ms"/> '+Ao(a,b.body)+'. <break time="500ms"/> end input':"blank";Se+=' <break time="300ms"/> '+Ln+'. <break time="700ms"/>'+((E=b.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const kr=b.array,Dn=b.environmentName;if(Object.keys(Zh).includes(Dn)){Se+=` begin ${Zh[Dn]} `;for(let fr=0;fr<kr.length;fr++){fr>0&&(Se+=","),Se+=` row ${fr+1} `;for(let Si=0;Si<kr[fr].length;Si++)Si>0&&(Se+=","),Se+=` column ${Si+1}: `,Se+=Ao("math",kr[fr][Si])}Se+=` end ${Zh[Dn]} `}break;case"group":Ot==="\\ne"?Se+=" not equal ":(Ot==="\\not"&&(Se+=" not "),Se+=Ao("math",b.body));break;case"root":Se+=Ao("math",b.body);break;case"genfrac":if(De=Ao("math",b.above),ze=Ao("math",b.below),Gd(b.above)&&Gd(b.below)){const Si={"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(b.above)+"/"+up(b.below)];Si?Se=Si:Se+=De+" over "+ze}else Se+=' the fraction <break time="150ms"/>'+De+' over <break time="150ms"/>'+ze+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(at=Ao("math",b.body),b.hasEmptyBranch("above"))Se+=Gd(b.body)?" the square root of "+at+" , ":' the square root of <break time="200ms"/>'+at+'. <break time="200ms"/> End square root';else{let fr=Ao("math",b.above);fr=fr.trim();const Si=fr.replace(/<mark([^/]*)\/>/g,"");Si==="3"?Se+=' the cube root of <break time="200ms"/>'+at+'. <break time="200ms"/> End cube root':Si==="n"?Se+=' the nth root of <break time="200ms"/>'+at+'. <break time="200ms"/> End root':Se+=' the root with index: <break time="200ms"/>'+fr+', of <break time="200ms"/>'+at+'. <break time="200ms"/> End root'}break;case"leftright":{const fr=b;Se+=(ee=fr.leftDelim?sd[fr.leftDelim]:void 0)!=null?ee:fr.leftDelim,Se+=Ao("math",b.body),Se+=(re=fr.rightDelim?sd[fr.rightDelim]:void 0)!=null?re:fr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const ar=Ot.replace(/^\\/g,""),Pr=lr()[ar];Pr&&(Pr!=null&&Pr.expand?Se+=Ao("math",b.body):Se+=`${ar} `);break;case"placeholder":Se+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(Ot==="\\mathbin"||Ot==="\\mathrel"||Ot==="\\mathopen"||Ot==="\\mathclose"||Ot==="\\mathpunct"||Ot==="\\mathord"||Ot==="\\mathinner"){Se=Ao(a,b.body);break}let fr=b.isDigit()?b.asDigit():b.value,Si=b.command;if((b.type==="delim"||b.type==="sizeddelim")&&(Si=b.value,fr=Si),a==="text")Se+=fr;else{if(b.type==="mbin"&&(Se+='<break time="150ms"/>'),fr){const oa=sd[fr]||(Si?sd[Si.trim()]:"");if(oa)Se+=" "+oa;else{const zi=Si?Tg(Si.trim()):"";Se+=zi||de(fr)}}else Se+=Ao("math",b.body);b.type==="mbin"&&(Se+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(b.value!=="\u200B"){const fr=b.command;if(fr==="\\sum")if(!b.hasEmptyBranch("superscript")&&!b.hasEmptyBranch("subscript")){let Si=Ao("math",b.superscript);Si=Si.trim();let oa=Ao("math",b.subscript);oa=oa.trim(),Se+=' the summation from <break time="200ms"/>'+oa+'<break time="200ms"/> to <break time="200ms"/>'+Si+'<break time="200ms"/> of <break time="150ms"/>',Et=!0}else if(b.hasEmptyBranch("subscript"))Se+=" the summation of";else{let Si=Ao("math",b.subscript);Si=Si.trim(),Se+=' the summation from <break time="200ms"/>'+Si+'<break time="200ms"/> of <break time="150ms"/>',Et=!0}else if(fr==="\\prod")if(!b.hasEmptyBranch("superscript")&&!b.hasEmptyBranch("subscript")){let Si=Ao("math",b.superscript);Si=Si.trim();let oa=Ao("math",b.subscript);oa=oa.trim(),Se+=' the product from <break time="200ms"/>'+oa+'<break time="200ms"/> to <break time="200ms"/>'+Si+'<break time="200ms"/> of <break time="150ms"/>',Et=!0}else if(b.hasEmptyBranch("subscript"))Se+=" the product of ";else{let Si=Ao("math",b.subscript);Si=Si.trim(),Se+=' the product from <break time="200ms"/>'+Si+'<break time="200ms"/> of <break time="150ms"/>',Et=!0}else if(fr==="\\int")if(!b.hasEmptyBranch("superscript")&&!b.hasEmptyBranch("subscript")){let Si=Ao("math",b.superscript);Si=Si.trim();let oa=Ao("math",b.subscript);oa=oa.trim(),Se+=' the integral from <break time="200ms"/>'+ve(oa)+'<break time="200ms"/> to <break time="200ms"/>'+ve(Si)+' <break time="200ms"/> of ',Et=!0}else Se+=' the integral of <break time="200ms"/> ';else if(typeof b.value=="string"){const Si=(ae=sd[b.value])!=null?ae:b.command?sd[b.command]:void 0;Se+=Si||" "+b.value}else b.command&&(b.command==="\\mathop"?Se+=Ao("math",b.body):b.command==="\\operatorname"?Se+=Pg(b.body):Se+=b.command.startsWith("\\")?" "+b.command.slice(1):" "+b.command)}break;case"enclose":at=Ao("math",b.body),Se+=" crossed out "+at+". End crossed out.";break;case"space":case"spacing":break}if(!Et&&!b.hasEmptyBranch("superscript")){let Ln=Ao(a,b.superscript);Ln=Ln.trim();const kr=Ln.replace(/<[^>]*>/g,"");if(Gd(b.superscript)){if(a==="math"){const Dn=Ig(b.superscript);Dn&&(Se+='<mark name="'+Dn+'"/>')}kr==="\u2032"?Se+=" prime ":kr==="2"?Se+=" squared ":kr==="3"?Se+=" cubed ":Number.isNaN(Number.parseInt(kr))?Se+=" to the "+Ln+"; ":Se+=' to the <say-as interpret-as="ordinal">'+kr+"</say-as> power; "}else Number.isNaN(Number.parseInt(kr))?Se+=" raised to the "+Ln+"; ":Se+=' raised to the <say-as interpret-as="ordinal">'+kr+"</say-as> power; "}if(!Et&&!b.hasEmptyBranch("subscript")){let Ln=Ao("math",b.subscript);Ln=Ln.trim(),Se+=Gd(b.subscript)?" sub "+Ln:" subscript "+Ln+". End subscript. "}}return Se}function ld(a){var b,y;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Vo(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(b=window.MathfieldElement.textToSpeechRulesOptions)!=null?b:{},window.MathfieldElement.textToSpeechRulesOptions=he(Ce({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=he(Ce({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=he(Ce({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const re=(y=window.SRE)!=null?y: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=Ao("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"&&_e()==="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 Xd={"\\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"},Yd={"\\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 Og(a){let b="";for(const y of a){const E=b[b.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(y)&&(b+=" "),b+=y}return b}function Zs(a){var b,y,E,ee,re,ae,de,ve,Se,De,ze,at,Et;if(!a)return"";if(Pe(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(Zs).join("");if(a[0].mode==="text"){let Pr=0,fr="";for(;((b=a[Pr])==null?void 0:b.mode)==="text";)fr+=a[Pr].body?Zs(a[Pr].body):a[Pr].value,Pr++;return`"${fr}" ${Zs(a.slice(Pr))}`}let Dn=0;const ar=[];for(;a[Dn]&&a[Dn].mode==="math";){let Pr="";for(;a[Dn]&&a[Dn].type==="mord"&&/\d/.test(a[Dn].value);)Pr+=a[Dn++].value;Pr?ar.push(Pr):ar.push(Zs(a[Dn++]))}return ar.push(Zs(a.slice(Dn))),Og(ar)}if(a.mode==="text")return`"${a.value}"`;let Ot="";const{command:Ln}=a;let kr;if(Ln==="\\placeholder")return`(${Zs(a.body)})`;switch(a.type){case"accent":const Dn={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Ln];Ot=`${Dn!=null?Dn:""} ${Zs(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(zi=>zi.value).join("");case"group":case"root":Ot=(y=Xd[Ln])!=null?y:Zs(a.body);break;case"genfrac":{const zi=a;(zi.leftDelim||zi.rightDelim)&&(Ot=zi.leftDelim==="."||!zi.leftDelim?"{:":zi.leftDelim),zi.hasBarLine?(Ot+="(",Ot+=Zs(zi.above),Ot+=")/(",Ot+=Zs(zi.below),Ot+=")"):(Ot+="("+Zs(zi.above)+"),",Ot+="("+Zs(zi.below)+")"),(zi.leftDelim||zi.rightDelim)&&(Ot+=zi.rightDelim==="."||!zi.rightDelim?"{:":zi.rightDelim)}break;case"surd":Ot+=a.hasEmptyBranch("above")?"sqrt("+Zs(a.body)+")":"root("+Zs(a.above)+")("+Zs(a.body)+")";break;case"latex":Ot=a.value;break;case"leftright":{const zi=a,Bo=zi.leftDelim;Ot+=Bo==="."||!Bo?"{:":Bo,Ot+=Zs(zi.body);const is=zi.matchingRightDelim();Ot+=is==="."||!is?":}":is}break;case"sizeddelim":case"delim":Ot=a.value;break;case"overlap":break;case"overunder":break;case"mord":Ot=(ee=(E=Xd[Ln])!=null?E:Ln)!=null?ee:typeof a.value=="string"?a.value:"",Ot.startsWith("\\")&&(Ot+=" "),kr=Ln?Ln.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,kr?Ot=String.fromCodePoint(Number.parseInt("0x"+kr[1])):Ot.length>0&&Ot.startsWith("\\")&&(Ot=typeof a.value=="string"?a.value.charAt(0):a.command),Ot=Bg(Ot,a.style);break;case"mbin":case"mrel":case"minner":Ot=(ae=(re=Xd[Ln])!=null?re:Yd[Ln])!=null?ae:a.value;break;case"mopen":case"mclose":Ot=a.value;break;case"mpunct":Ot=(de=Yd[Ln])!=null?de:Ln;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Yd[Ln]?Ot=Yd[Ln]:Ot=Ln==="\\operatorname"?Zs(a.body):(ve=a.value)!=null?ve:Ln,Ot+=" ");break;case"array":const ar=a.array,Pr=a.environmentName,fr=(Se={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Pr])!=null?Se:["(",")"],Si=[];for(const zi of ar){const Bo=[];for(const is of zi)Bo.push(fr[0]+Zs(is)+fr[1]);Si.push(Bo.join(","))}const oa=(De={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Pr])!=null?De:["(",")"];Ot=oa[0]+Si.join(",")+oa[1];break;case"box":break;case"spacing":Ot=(ze=Xd[Ln])!=null?ze:" ";break;case"enclose":Ot="("+Zs(a.body)+")";break;case"space":Ot=" ";break;case"subsup":Ot="";break;case"macro":Ot=(Et=(at=Xd[Ln])!=null?at:Yd[Ln])!=null?Et:Zs(a.body);break}if(!a.hasEmptyBranch("subscript")){Ot+="_";const Dn=Zs(a.subscript);Ot+=Dn.length!==1?`(${Dn})`:Dn}if(!a.hasEmptyBranch("superscript")){Ot+="^";const Dn=Zs(a.superscript);Ot+=Dn.length!==1?`(${Dn})`:Dn}return Ot}function Bg(a,b){if(!b)return a;let y=a;return b.variant==="double-struck"&&(y=`bbb "${y}"`),b.variant==="script"&&(y=`cc "${y}"`),b.variant==="fraktur"&&(y=`fr "${y}"`),b.variant==="sans-serif"&&(y=`sf "${y}"`),b.variant==="monospace"&&(y=`tt "${y}"`),b.variantStyle==="bold"&&(y=`bb "${y}"`),b.color?`color({${b.color}})(${y})`:y}function cl(a,b){var y,E;b!=null||(b={}),b.mathstyle=(y=b.mathstyle)!=null?y:"displaystyle";const ee=new Io({from:he(Ce({},Hc()),{renderPlaceholder:()=>new Lr(160,{maxFontSize:1}),letterShapeStyle:(E=b==null?void 0:b.letterShapeStyle)!=null?E:"tex"}),mathstyle:b.mathstyle}),ae=new Gn({mode:"math",type:"root",body:ul(a,{context:ee,parseMode:"math",mathstyle:b.mathstyle})}).render(ee);return ae?($c(Od(ae,ee)),zc(ae,{classes:"ML__latex"}).toMarkup()):""}function k1(a){return t0(a,{context:Hc()})}function Ng(a,b={}){return Vo(ul(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),b)}function Rg(a){const b=ul(a,{parseMode:"math",mathstyle:"displaystyle"});return ld(b)}var qf;function Fg(a){var b,y;if(!qf){const E=(b=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:b.ComputeEngine;E?qf=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(y=qf==null?void 0:qf.box(a).latex)!=null?y:""}function D1(a,b="math"){return Zs(new Gn({type:"root",body:ul(a,{parseMode:b})}))}function L1(a){return Cc(a,{format:"ascii-math"})[1]}function Vh(a){if(typeof a=="string"){const b=$g(a);if(!b)throw new Error(`Invalid color: ${a}`);return b}return"C"in a?Kg(a):"a"in a?cp(a):a}function ud(a){return a<0?0:a>255?255:Math.round(a)}function $g(a){if(!a||a[0]!=="#")return;a=a.slice(1);let b;return a.length<=4?(b={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(b.a=parseInt(a[3]+a[3],16)/255)):(b={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(b.a=parseInt(a[6]+a[7],16)/255)),b&&typeof b.a=="undefined"&&(b.a=1),b}function Uh(a){const[b,y,E]=[a.L,a.C,a.H],ee=E*Math.PI/180,re={L:b,a:y*Math.cos(ee),b:y*Math.sin(ee)};return a.alpha!==void 0&&(re.alpha=a.alpha),re}function zg(a){const[b,y,E]=[a.L,a.a,a.b],ee=Math.sqrt(y*y+E*E),ae=Math.atan2(E,y)*180/Math.PI,de={L:b,C:ee,H:ae};return a.alpha!==void 0&&(de.alpha=a.alpha),de}function jh(a){const[b,y,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*b+.39633779217376786*y+.2158037580607588*E,3),re=Math.pow(1.00000000888176*b-.10556134232365635*y-.0638541747717059*E,3),ae=Math.pow(b*1.000000054672411-.0894841820949657*y-1.2914855378640917*E,3),de=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,ve=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,Se=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,De=ze=>{const at=Math.abs(ze);return at<=.0031308?ze*12.92:(Math.sign(ze)||1)*(1.055*Math.pow(at,1/2.4)-.055)};return[De(de),De(ve),De(Se)]}function Gh(a){const[b,y,E]=a;return b>=0&&b<=1&&y>=0&&y<=1&&E>=0&&E<=1}function Xh(a,b){let[y,E,ee]=a;return y=ud(y*255),E=ud(E*255),ee=ud(ee*255),b!==void 0?{r:y,g:E,b:ee,alpha:b}:{r:y,g:E,b:ee}}function cp(a){let[b,y,E]=jh(a);if(Gh([b,y,E]))return Xh([b,y,E],a.alpha);const ee=zg(a);if(ee.C=0,[b,y,E]=jh(Uh(ee)),!Gh([b,y,E]))return Xh([b,y,E],a.alpha);let re=0,ae=a.L,de=(re+ae)/2;ee.C=de;const ve=.36/Math.pow(2,12);for(;ae-re>ve;)de=(re+ae)/2,ee.C=de,[b,y,E]=jh(Uh(ee)),Gh([b,y,E])?re=de:ae=de;return Xh([b,y,E],a.alpha)}function Kg(a){return cp(Uh(a))}function dp(a,b){const y=Vh(a),E=Vh(b),ee=.56,re=.57,ae=.62,de=.65,ve=.022,Se=1.414,De=.1,ze=5e-4,at=1.14,Et=.027,Ot=1.14,Ln=.027;function kr(zi){return zi>=ve?zi:zi+Fu(ve-zi,Se)}function Dn(zi){return(zi<0?-1:1)*Math.pow(Math.abs(zi),2.4)}const ar=kr(Dn(E.r/255)*.2126729+Dn(E.g/255)*.7151522+Dn(E.b/255)*.072175),Pr=kr(Dn(y.r/255)*.2126729+Dn(y.g/255)*.7151522+Dn(y.b/255)*.072175);let fr,Si,oa;return Math.abs(Pr-ar)<ze?Si=0:Pr>ar?(fr=Fu(Pr,ee)-Fu(ar,re),Si=fr*at):(fr=Fu(Pr,de)-Fu(ar,ae),Si=fr*Ot),Math.abs(Si)<De?oa=0:Si>0?oa=Si-Ln:oa=Si+Et,oa*100}function fp(a,b,y){y!=null||(y="#fff"),b!=null||(b="#000");const E=dp(a,y),ee=dp(a,b);return Math.abs(E)>Math.abs(ee)?y:b}function Hg(a){const b=Vh(a);let y=((1<<24)+(ud(b.r)<<16)+(ud(b.g)<<8)+ud(b.b)).toString(16).slice(1);return b.alpha!==void 0&&b.alpha<1&&(y+=("00"+Math.round(b.alpha*255).toString(16)).slice(-2)),y[0]===y[1]&&y[2]===y[3]&&y[4]===y[5]&&y[6]===y[7]&&(y=y[0]+y[2]+y[4]+(b.alpha!==void 0&&b.alpha<1?y[6]:"")),"#"+y}function Cs(a){const b=hp(a);let y="";for(const E of b){if(typeof E.value!="string")return"";y+=E.value}return y}function hp(a){const y=a.model.selection.ranges;return y.length!==1?[]:a.model.getAtoms(y[0])}function Wg(a,b){const y=hp(a);if(y.length!==1)return!1;const E=ph[b];return E?!!E.test(y[0].value):!1}function Zg(a,b){return Cs(a).length>0}function Vg(a){return[Yh(a,"double-struck","mathbb","tooltip.blackboard"),Yh(a,"fraktur","mathfrak","tooltip.fraktur"),Yh(a,"calligraphic","mathcal","tooltip.caligraphic"),qh(a,"up","mathrm","tooltip.roman-upright"),qh(a,"bold","mathbf","tooltip.bold"),qh(a,"italic","mathit","tooltip.italic")]}function Ug(a){return[{label:()=>cl(`\\vec{${Cs(a)}}`),visible:()=>Cs(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>cl(`\\overrightarrow{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>cl(`\\overleftarrow{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>cl(`\\dot{${Cs(a)}}`),visible:()=>Cs(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>cl(`\\ddot{${Cs(a)}}`),visible:()=>Cs(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>cl(`\\bar{${Cs(a)}}`),visible:()=>Cs(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>cl(`\\overline{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>cl(`\\overgroup{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>cl(`\\overbrace{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>cl(`\\underline{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>cl(`\\undergroup{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>cl(`\\underbrace{${Cs(a)}}`),visible:()=>Cs(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function jg(a){return[{label:()=>cl(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>cl(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>cl(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gg(a){const b=[];for(const y of Object.keys(Ke))b.push({class:(Hg(fp(Ke[y]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ke[y]} "></span>`,ariaLabel:()=>{var E;return(E=Qe(y))!=null?E:y},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:y}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:y},{operation:"toggle"}),a.adoptStyle="none"}});return b}function Xg(a){const b=[];for(const y of Object.keys(Ge))b.push({class:(fp(Ge[y])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ge[y]} "></span>`,ariaLabel:()=>{var E;return(E=Qe(y))!=null?E:y},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:y}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:y},{operation:"toggle"}),a.adoptStyle="none"}});return b}var Yg=class extends ep{constructor(a,b,y,E){super(a,b),this.row=y,this.col=E}set active(a){const b=this.parentMenu.children;if(a)for(const y of b)y.element.classList.toggle("active",y.row<=this.row&&y.col<=this.col);else for(const y of b)y.element.classList.remove("active")}};function qg(a){const b=[];for(let y=1;y<=5;y++)for(let E=1;E<=5;E++)b.push({onCreate:(ee,re)=>new Yg(ee,re,y,E),label:"\u2610",tooltip:()=>Qe("tooltip.row-by-col",y,E),data:{row:y,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(y).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return b}function Jg(a){return[{label:()=>Qe("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Nc(a)},{label:()=>Qe("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Nc(a)},{label:()=>Qe("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Nc(a),enabled:()=>{const b=a.model.parentEnvironment;if(!b)return!1;const[y,E]=e1(a);return y<b.maxColumns}},{label:()=>Qe("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Nc(a)},{type:"divider"},{label:()=>Qe("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Nc(a)},{label:()=>Qe("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Nc(a)},{type:"divider"},{label:()=>Qe("menu.borders"),visible:()=>(Qg(a)||Nc(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>qd(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>qd(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>qd(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>qd(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>qd(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>Qe("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:qg(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>Qe("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>Qe("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Jc(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>Qe("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Jc(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>Qe("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>Qe("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:Vg(a),submenuClass:"variant-submenu"},{label:()=>Qe("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Qe("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Qe("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Ug(a),submenuClass:"variant-submenu"},{label:()=>Qe("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&Cs(a).length>0,submenu:jg(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>Qe("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const b=t1(a);if(!b){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${b}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(b,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>Qe("menu.simplify"),id:"ce-simplify",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var b,y;if(a.model.selectionIsCollapsed){const E=(b=a.expression)==null?void 0:b.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=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(a.model.selection)).simplify();if(!E){a.model.announce("plonk");return}a.insert(E.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var b;if(window.MathfieldElement.computeEngine===null)return"";const y=(b=a.expression)==null?void 0:b.unknowns[0];return y?Qe("menu.solve-for",cl(y)):Qe("menu.solve")},id:"ce-solve",visible:()=>{var b;return a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((b=a.expression)==null?void 0:b.unknowns.length)===1&&a.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var b;const y=a.expression,E=y==null?void 0:y.unknowns[0],ee=(b=y.solve(E))==null?void 0:b.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:()=>Qe("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>Qe("menu.copy"),id:"copy",submenu:[{label:()=>Qe("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Wa.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>Qe("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Wa.copyToClipboard(a,"ascii-math")},{label:()=>Qe("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Wa.copyToClipboard(a,"math-ml")}]},{label:()=>Qe("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>Qe("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Nc(a){var b;return!!((b=a.model.parentEnvironment)!=null&&b.array)}function Qg(a){return a.model.at(a.model.position).type==="array"}function e1(a){var b;const y=(b=a.model.parentEnvironment)==null?void 0:b.array;return y?[y.length,y.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function qd(a,b){Ef(a),a.flushInlineShortcutBuffer(),I0(a.model,b),Ns(a)}function t1(a){var b,y;let E;if(a.model.selectionIsCollapsed?E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(),{canonical:!1}):E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function Yh(a,b,y,E){return{label:()=>cl(`\\${y}{${Cs(a)}}`),tooltip:()=>{var ee;return(ee=Qe(E))!=null?ee:E},visible:()=>Wg(a,b),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:b}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:b},{operation:"toggle"}),a.adoptStyle="none"}}}function qh(a,b,y,E){return{label:()=>cl(`\\${y}{${Cs(a)}}`),tooltip:()=>{var ee;return(ee=Qe(E))!=null?ee:E},visible:()=>Zg(a,b),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:b}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:b},{operation:"toggle"}),a.adoptStyle="none"}}}function cd(a,b){return a+ld(b)}$l({speak:(a,b,y)=>n1(a,b,y)},{target:"mathfield"});function n1(a,b,y){var E,ee;y=y!=null?y:{withHighlighting:!1};const{model:re}=a;function ae(De){let ze=null;switch(De){case"all":ze=re.root;break;case"selection":ze=re.getAtoms(re.selection);break;case"left":{ze=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{ze=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":ze=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:at}=re.at(re.position);at!=null&&at.parent?ze=at:ze=re.root;break}default:ze=re.root}return ze}function de(De){let ze="";switch(De){case"all":console.log("Internal failure: speak all failed");break;case"selection":ze="no selection";break;case"left":ze="at start";break;case"right":ze="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":ze="no parent";break;default:console.log('unknown speak_ param value: "'+De+'"');break}return ze}const ve=ae(b);if(ve===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,de(b)),!1;(y.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const Se=ld(ve);return ot()&&y.withHighlighting?(fc().readAloudMathfield=a,kc(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,Se)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(Se),!1}function r1(a){var b,y;if(!ot()){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:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((y=window.MathfieldElement.speechEngineVoice)!=null?y:"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),ve=new Blob([de.buffer],{type:"audio/mpeg"}),Se=URL.createObjectURL(ve);new Audio(Se).play().catch(ze=>console.log(ze))}else console.log("polly.synthesizeSpeech():",ae)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function pp(a){var b;let y;if(a.parent.type==="prompt")a.parentBranch==="body"&&(y="prompt");else if(a.parentBranch==="body")y=a.type&&(b={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?b:"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"&&(y="index"):a.parentBranch==="superscript"?y="superscript":a.parentBranch==="subscript"&&(y="subscript");return y||console.log("unknown relationship"),y!=null?y:"parent"}function i1(a,b,y,E){let ee="";if(b==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(b==="delete")ee=cd("deleted: ",E);else if(b==="focus"||b.includes("move"))ee=a1(a.model,y)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(b==="replacement")ee=cd("",a.model.at(a.model.position));else if(b==="line"){const re=cd("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?cd(b+" ",E):b;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,b){if(Number.isNaN(b))return"";const y=a.at(b);if(!y||y.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=y.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 cd("",a.getAtoms(a.selection));let b="";const y=a.at(a.position),E=pp(y);return y.isFirstSibling&&(b=(E?"start of "+E:"unknown")+": "),y.isLastSibling?y.isFirstSibling||(b+=E?"end of "+E:"unknown"):b+=cd("",y),b}var s1=class{constructor(a,b,y){this.mathfield=a,this.mode=b,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=y}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,b){var y;const E=this.silenceNotifications;this.silenceNotifications=(y=b==null?void 0:b.silenceNotifications)!=null?y:!0;let ee={};if((b==null?void 0:b.type)==="undo"&&(ee={inputType:"historyUndo"}),(b==null?void 0:b.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=lc(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,b){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var y,E,ee;const re=this.normalizeSelection(a,b);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const De=re.ranges[0][0];if(!this.mathfield.dirty&&!((y=this.at(De))!=null&&y.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(De-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(De-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(De+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(De+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=De,this._position=De,this._selection=re;return}const ae=sl(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const de=this.at(ae[0]+1),ve=this.at(ae[1]),Se=Gn.commonAncestor(de,ve);(Se==null?void 0:Se.type)==="array"&&de.parent===Se&&ve.parent===Se?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 b;const y=this.at(a);(y==null?void 0:y.type)==="placeholder"?this.setSelection(a-1,a):((b=y==null?void 0:y.rightSibling)==null?void 0:b.type)==="placeholder"?this.setSelection(a,a+1):this.position=a,y instanceof pl&&y.isSuggestion&&(y.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 b=this.at(a),{parent:y}=b;if(!y)return[0,this.lastOffset];const E=b.parent.branch(b.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,b){const y=this.at(a).branch(b);return[this.offsetOf(y[0]),this.offsetOf(y[y.length-1])]}getAtoms(a,b,y){let E=y!=null?y:{};if(Zc(a)){if(E=b!=null?b:{},a.ranges.length>1)return a.ranges.reduce((Se,De)=>[...Se,...this.getAtoms(De,E)],[]);a=a.ranges[0]}let ee,re;if(wu(a)){if(ee=a,!wu(b))return[];re=b}else[ee,re]=a,E=b!=null?b:{};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 ve=[];for(let Se=ae;Se<=de;Se++){const De=this.atoms[Se];mp(this,De,ae,de)&&ve.push(De)}return E.includeChildren||(ve=ve.filter(Se=>{let De=!1,{parent:ze}=Se;for(;ze&&!De;)De=mp(this,ze,ae,de),ze=ze.parent;return!De})),ve}getAllAtoms(a=0){const b=[],y=this.lastOffset;for(let E=a;E<=y;E++)b.push(this.atoms[E]);for(let E=0;E<a;E++)b.push(this.atoms[E]);return b}findAtom(a,b=0,y="forward"){let E;const ee=this.lastOffset;if(y==="forward"){for(let re=b;re<=ee;re++)if(E=this.atoms[re],a(E))return E;for(let re=0;re<b;re++)if(E=this.atoms[re],a(E))return E;return}for(let re=b;re>=0;re--)if(E=this.atoms[re],a(E))return E;for(let re=ee;re>b;re--)if(E=this.atoms[re],a(E))return E}extractAtoms(a){let b=this.getAtoms(a);if(b.length===1&&!b[0].parent)if(b[0].type==="root")b=[...b[0].body],b.shift();else return b=this.root.cells.flat(),this.root=new Gn({type:"root",body:[]}),b;for(const y of b)y.parent.removeChild(y);return b}deleteAtoms(a){this.extractAtoms(a),this.position=a[0]}atomToString(a,b){const y=b!=null?b:"latex";if(y.startsWith("latex"))return Gn.serialize([a],{expandMacro:y==="latex-expanded",skipStyles:y==="latex-unstyled",skipPlaceholders:y==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(y==="math-ml")return Vo(a);if(y==="spoken")return ld(a);if(y==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=ld(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(y==="spoken-ssml"||y==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=ld(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return y==="ascii-math"?Zs(a):(console.error(`MathLive 0.98.5: Unexpected format "${y}`),"")}getValue(a,b,y){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(wu(a)&&wu(b)?(E=[this.normalizeRange([a,b])],ee=y):Wc(a)?(E=[this.normalizeRange(a)],ee=b):Zc(a)?(E=a.ranges,ee=b):(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 yo(E.map(ae=>Gn.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,b){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const y=this.normalizeRange([a,b]);let[E,ee]=y,{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(b),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,b,y=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:b,atoms:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,b,y)}deferNotifications(a,b){const y=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;b();const de=this.root.changeCounter!==ae,ve=E!==this._anchor||ee!==this._position||wc(this._selection,y)==="different";return this.silenceNotifications=re,a.content&&de&&this.contentDidChange({inputType:a.type}),a.selection&&ve&&this.selectionDidChange(),de||ve}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[b,y]=a;return b=this.normalizeOffset(b),y=this.normalizeOffset(y),b<y?[b,y]:[y,b]}normalizeSelection(a,b){var y;let E;if(wu(a)){const ee=this.normalizeOffset(a);if(wu(b)){const re=this.normalizeOffset(b);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(Wc(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 Zc(a)&&(E={ranges:a.ranges.map(ee=>this.normalizeRange(ee)),direction:(y=a.direction)!=null?y:"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 b=this.at(this.position);if(b){for(;b&&((a=b.parent)==null?void 0:a.type)!=="array";)b=b.parent;if(!(!(b!=null&&b.parent)||b.parent.type!=="array"))return b.parentBranch}}contentWillChange(a={}){if(this.silenceNotifications||!this.mathfield)return!0;const b=this.silenceNotifications;this.silenceNotifications=!0;const y=this.mathfield.onContentWillChange(a);return this.silenceNotifications=b,y}contentDidChange(a){var b;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Au(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const y=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",he(Ce({},a),{data:a.data?a.data:(b=a.inputType)!=null?b:"",bubbles:!0,composed:!0}))),this.silenceNotifications=y}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Au(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,b,y,E){const ee=a.offsetOf(b);if(ee<y||ee>E)return!1;if(!b.hasChildren)return!0;const re=a.offsetOf(b.firstChild);if(re>=y&&re<=E){const ae=a.offsetOf(b.lastChild);if(ae>=y&&ae<=E)return!0}return!1}function Jh(a,b,y){if(!(b!=null&&b.hasChildren))return!1;const[E,ee]=y,re=a.offsetOf(b.firstChild),ae=a.offsetOf(b.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Jd(a,b,y,E){var ee,re,ae,de,ve,Se;const De=y.parent;if(De&&y instanceof Zo){const ze=!E&&b==="forward"||E==="body"&&b==="backward";let at=ze?a.offsetOf(y.firstChild):a.offsetOf(y.lastChild);return ze?y.rightDelim!=="?"&&y.rightDelim!=="."?(y.leftDelim=".",y.isDirty=!0):(De.addChildrenAfter(y.removeBranch("body"),y),De.removeChild(y),at--):y.leftDelim!=="?"&&y.leftDelim!=="."?(y.rightDelim=".",y.isDirty=!0):(De.addChildrenAfter(y.removeBranch("body"),y),De.removeChild(y),at--),a.position=at,!0}if(De&&y.type==="surd"){if(b==="forward"&&!E||b==="backward"&&E==="body"){const ze=y.leftSibling;y.hasChildren&&De.addChildrenAfter(y.removeBranch("body"),y),De.removeChild(y),a.position=a.offsetOf(ze)}else b==="forward"&&E==="body"?a.position=a.offsetOf(y):!E&&b==="backward"?y.hasChildren?a.position=a.offsetOf(y.lastChild):(a.position=Math.max(0,a.offsetOf(y)-1),De.removeChild(y)):E==="above"&&(y.hasEmptyBranch("above")&&y.removeBranch("above"),b==="backward"?a.position=a.offsetOf(y.leftSibling):a.position=a.offsetOf(y.body[0]));return!0}if(De&&(y.type==="box"||y.type==="enclose")){const ze=E&&b==="backward"||!E&&b==="forward"?y.leftSibling:y.lastChild;return De.addChildrenAfter(y.removeBranch("body"),y),De.removeChild(y),a.position=a.offsetOf(ze),!0}if(y.type==="genfrac"||y.type==="overunder"){if(!E)return y.type==="overunder"&&y.hasEmptyBranch("body")||y.type==="genfrac"&&y.hasEmptyBranch("below")&&y.hasEmptyBranch("above")?!1:(a.position=a.offsetOf(b==="forward"?y.firstChild:y.lastChild),!0);const ze=Qd.fractionNavigationOrder==="numerator-denominator"?"above":"below",at=ze==="above"?"below":"above";if(De&&(b==="forward"&&E===ze||b==="backward"&&E===at)){const Et=y.removeBranch(ze),Ot=y.removeBranch(at);return De.addChildrenAfter([...Et,...Ot],y),De.removeChild(y),a.position=a.offsetOf(Et.length>0?Et[Et.length-1]:Ot[0]),!0}return b==="backward"?a.position=a.offsetOf(y.leftSibling):a.position=a.offsetOf(y),!0}if(y.isExtensibleSymbol||y.type==="subsup"){if(!E&&b==="forward")return!1;if(!E){if(y.subscript||y.superscript){const ze=b==="forward"?(ae=(ee=y.superscript)==null?void 0:ee[0])!=null?ae:(re=y.subscript)==null?void 0:re[0]:(Se=(de=y.subscript)==null?void 0:de[0].lastSibling)!=null?Se:(ve=y.superscript)==null?void 0:ve[0].lastSibling;return ze&&(a.position=a.offsetOf(ze)),!0}return!1}if(!y.hasChildren&&y.type==="subsup"){const ze=b==="forward"?a.offsetOf(y):Math.max(0,a.offsetOf(y)-1);return y.parent.removeChild(y),a.position=ze,!0}if(E==="superscript")if(b==="backward"){const ze=a.offsetOf(y.firstChild)-1;console.assert(ze>=0),a.position=ze}else y.subscript?a.position=a.offsetOf(y.subscript[0]):a.position=a.offsetOf(y);else E==="subscript"&&(b==="backward"&&y.superscript?a.position=a.offsetOf(y.superscript[0].lastSibling):b==="backward"?a.position=a.offsetOf(y.firstChild)-1:a.position=a.offsetOf(y));if(E&&y.hasEmptyBranch(E)&&(y.removeBranch(E),y.type==="subsup"&&!y.subscript&&!y.superscript)){const ze=b==="forward"?a.offsetOf(y):Math.max(0,a.offsetOf(y)-1);y.parent.removeChild(y),a.position=ze}return!0}if((De==null?void 0:De.type)==="genfrac"&&!E&&y.type!=="first"){let ze=a.offsetOf(y.leftSibling);return De.removeChild(y),De.hasEmptyBranch("above")&&De.hasEmptyBranch("below")?(ze=a.offsetOf(De.leftSibling),De.parent.removeChild(De),a.announce("delete",void 0,[De]),a.position=ze,!0):(a.announce("delete",void 0,[y]),a.position=ze,!0)}if(b==="backward"&&((De==null?void 0:De.command)==="\\ln"||(De==null?void 0:De.command)==="\\log")&&y.parentBranch!=="body"){const ze=a.offsetOf(De.leftSibling);return De.parent.removeChild(De),a.announce("delete",void 0,[De]),a.position=ze,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let b=a.at(a.position);if(!(b&&Jd(a,"backward",b))){if(b!=null&&b.isFirstSibling){if(Jd(a,"backward",b.parent,b.parentBranch))return;b=null}if(!b){a.announce("plonk");return}a.position=a.offsetOf(b.leftSibling),b.parent.removeChild(b),a.announce("delete",void 0,[b])}}):Iu(a,sl(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 b,y;let E=a.at(a.position).rightSibling;if(E&&Jd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Jd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Jd(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=(b=a.at(a.position))==null?void 0:b.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(y=a.at(a.position))==null?void 0:y.rightSibling;a.announce("delete",void 0,[E])}):Iu(a,sl(a.selection),"deleteContentForward")}function Iu(a,b,y){const E=a.getAtoms(b);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 ve=E[0].parent;ve.parent&&ve.type!=="prompt"&&(b=[a.offsetOf(ve.leftSibling),a.offsetOf(ve)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const ve=E[0].parent,Se=E[0].parentBranch==="below"?"above":"below",De=a.offsetOf(ve.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:y},()=>{var ze,at;const Et=ve.removeBranch(Se);if(Et.length===1&&Et[0].type==="placeholder")(at=ve.parent)==null||at.removeChild(ve),a.position=Math.max(0,De);else{const Ot=ve.parent.addChildrenAfter(Et,ve);(ze=ve.parent)==null||ze.removeChild(ve),a.position=a.offsetOf(Ot)}})}}return a.deferNotifications({content:!0,selection:!0,type:y},()=>a.deleteAtoms(b))}$l({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&Iu(a,[0,-1],"deleteContent"),deleteForward:a=>u1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&Iu(a,[a.anchor,kh(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&Iu(a,[a.anchor,kh(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&Iu(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&Iu(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&Iu(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&Iu(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="${Qe("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="${Qe("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,b){this.focusBlurInProgress=!1;var y,E,ee;this.options=Ce(he(Ce({},Bf()),{macros:lr(),registers:rc()}),Of(b)),this.eventController=new AbortController;const re=this.eventController.signal;b.eventSink&&(this.host=b.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=(y=b.value)!=null?y:this.element.textContent)!=null?E:"";ae=ae.trim();const de=L0(this.options),ve=new Gn({type:"root",mode:de,body:ul(ae,{context:this.context})});this.model=new s1(this,de,ve),this.undoManager=new Rv(this.model);const Se=[];if(Se.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>"),Se.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),Se.push("<span part=content class=ML__content>"),Se.push(S0(this)),Se.push("</span>"),window.mathVirtualKeyboard&&(Se.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">`),Se.push(c1),Se.push("</div>")),Se.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),Se.push(d1),Se.push("</div>"),Se.push("</span>"),Se.push("<span class=ML__sr-only>"),Se.push("<span role=status aria-live=assertive aria-atomic=true></span>"),Se.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(Se.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=Ze.subscribe(()=>Ze.update(this.element)),Ze.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",ze=>ze.stopImmediatePropagation(),{capture:!1,signal:re}),this.field.addEventListener("wheel",this,{passive:!1,signal:re}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:re}):this.field.addEventListener("mousedown",this,{signal:re}),(ee=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||ee.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Au(this)))},{signal:re}),this._menu=new wg(Jg(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const De=this.element.querySelector("[part=menu-toggle]");De==null||De.addEventListener("pointerdown",ze=>{if(ze.currentTarget!==De||this._menu.state!=="closed")return;this.element.classList.add("tracking");const at=De.getBoundingClientRect();this._menu.modifiers=_c(ze),this._menu.show({target:De,location:{x:at.left,y:at.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),ze.preventDefault(),ze.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(De.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(()=>Ns(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),Rd&&!Ze.locale.startsWith(Rd.locale)&&Fm(Ze.locale),jl!=="ready"&&document.fonts.ready.then(()=>Lf(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),b=this.adoptStyle==="right"?a.rightSibling:a;if(!b)return this.defaultStyle;if(b.type==="group"){const y=b.branch("body");return!y||y.length<2?{}:this.adoptStyle==="right"?y[1].computedStyle:y[y.length-1].computedStyle}return b.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Au(this)),jf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Fh())}showMenu(a){var b,y;const E=(y=(b=a==null?void 0:a.location)!=null?b:Mu(this.field))!=null?y: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 b,y,E;return(E=(y=(b=this.options).colorMap)==null?void 0:y.call(b,a))!=null?E:Ue(a)}}get backgroundColorMap(){return a=>{var b,y,E,ee,re,ae;return(ae=(re=(y=(b=this.options).backgroundColorMap)==null?void 0:y.call(b,a))!=null?re:(ee=(E=this.options).colorMap)==null?void 0:ee.call(E,a))!=null?ae:et(a)}}get smartFence(){var a;return(a=this.options.smartFence)!=null?a:!1}get readOnly(){var a;return(a=this.options.readOnly)!=null?a:!1}get disabled(){var a,b;return(b=(a=this.host)==null?void 0:a.disabled)!=null?b:!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),b=this.model.at(this.model.position),y=Gn.commonAncestor(a,b);return!!((y==null?void 0:y.type)==="prompt"||y!=null&&y.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 b=Ce({},a[0].style);for(const y of a)for(const[E,ee]of Object.entries(y.style))b[E]!==ee&&delete b[E];return b}queryStyle(a){const b=Ph(this,a);"verbatimColor"in b&&delete b.verbatimColor,"verbatimBackgroundColor"in b&&delete b.verbatimBackgroundColor;const y=Object.keys(b).length;if(y===0)return"all";if(y>1){for(const ve of Object.keys(b)){const Se=this.queryStyle({[ve]:b[ve]});if(Se==="none")return"none";if(Se==="some")return"some"}return"all"}const E=Object.keys(b)[0],ee=b[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 ve of re){if(ve.type==="first"){ae-=1;continue}ve.style[E]===ee&&(de+=1)}return de===0?"none":de===ae?"all":"some"}get keybindings(){var a,b;if(this._keybindings)return this._keybindings;const[y,E]=jm(this.options.keybindings,(a=Fd())!=null?a:$m());return((b=Fd())==null?void 0:b.score)>0&&(this._keybindings=y,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),y}get menu(){return this._menu}setOptions(a){var b;this.options=Ce(Ce({},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 y=this.options.defaultMode;y==="inline-math"&&(y="math"),((b=this.model.root.firstChild)==null?void 0:b.mode)!==y&&(this.model.root.firstChild.mode=y),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const E=Gn.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&Wa.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)&&Ns(this)}getOptions(a){return Lc(this.options,a)}getOption(a){return Lc(this.options,a)}handleEvent(a){return hc(this,null,function*(){var b;if(Zl(this)){if(Ch(a)){if(!Ld(a.origin,(b=this.options.originValidator)!=null?b:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:y}=a.data;if(y==="execute-command"){const E=a.data.command;if(ed(E)==="virtual-keyboard")return;this.executeCommand(E)}else y==="update-state"||(y==="focus"?this.focus({preventScroll:!0}):y==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&Z0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Z0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&jf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Zl(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Zl(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Zl(this))return;Ze.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,Gv(),Qm(),mg()}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 ed(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Au(this))),!1):ov(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,b,y){return this.model.getValue(a,b,y)}setValue(a,b){var y;b=b!=null?b:{mode:"math"},b.insertionMode===void 0&&(b.insertionMode="replaceAll"),(b.format===void 0||b.format==="auto")&&(b.format="latex"),(b.mode===void 0||b.mode==="auto")&&(b.mode=(y=ah(this.model,this.model.position))!=null?y:"math");const E=this.undoManager.canUndo();Wa.insert(this.model,a,b)&&(Ns(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&&kc(this,{interactive:!0});const b=this.field.getBoundingClientRect();let y=null;if(this.model.selectionIsCollapsed)y=Mu(this.field);else{const E=Dd(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);y={x:ee+b.left-this.field.scrollLeft,y:re+b.top-this.field.scrollTop,height:0}}}if(this.host&&y){const E=this.host.getBoundingClientRect(),ee=y.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+y.height),this.host.scroll({top:re,left:0})}if(y){const E=y.x-window.scrollX;let ee=this.field.scrollLeft;E<b.left?ee=E-b.left+this.field.scrollLeft-20:E>b.right&&(ee=E-b.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,b){return typeof a!="string"||a.length===0&&((b==null?void 0:b.insertionMode)==="insertBefore"||(b==null?void 0:b.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),b=b!=null?b:{mode:"math"},b.focus&&this.focus(),b.feedback&&(window.MathfieldElement.keypressVibration&&nt()&&navigator.vibrate(w0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?A0(this.model):a==="&"?T0(this.model):this.model.selectionIsCollapsed?Wa.insert(this.model,a,Ce({style:this.model.at(this.model.position).computedStyle},b)):Wa.insert(this.model,a,b),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Ns(this),b.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(a,b="",y=""){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:!!y||!!b,selection:!0,type:"insertText"},()=>{let de=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),b&&a!=="latex"){const ve=ul(b,{context:this.context,parseMode:a});ae.collapseSelection("forward");const Se=ae.at(ae.position);ae.position=ae.offsetOf(Se.parent.addChildrenAfter(ve,Se)),de=!0}if(this.model.mode=a,a==="latex"){let ve=ae.selectionIsCollapsed;Jc(this,"accept");let Se,De=ae.at(ae.position);if(ve)Se="\\";else{const at=sl(ae.selection);Se=this.model.getValue(at,"latex");const Et=this.model.extractAtoms(at);Et.length===1&&Et[0].type==="placeholder"&&(Se=b,ve=!0),De=ae.at(at[0])}const ze=new Td(Se);De.parent.addChildAfter(ze,De),ve?ae.position=ae.offsetOf(ze.lastChild):ae.setSelection(ae.offsetOf(ze.firstChild),ae.offsetOf(ze.lastChild))}else $d(ae).forEach(ve=>{ve.isError=!1});if(y){const ve=ul(y,{context:this.context,parseMode:re});ae.collapseSelection("forward");const Se=ae.at(ae.position);ae.position=ae.offsetOf(Se.parent.addChildrenAfter(ve,Se)),de=!0}return Ns(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),de}),this.model.mode=a,window.mathVirtualKeyboard.update(Au(this))}hasFocus(){return!this.blurred}focus(a){var b;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(b=a==null?void 0:a.preventScroll)!=null&&b||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,b={}){var y,E;const ee={operation:"set",silenceNotifications:!1};Wc(b)?ee.range=b:(b.operation==="toggle"&&(ee.operation="toggle"),ee.range=b.range,ee.silenceNotifications=(y=b.silenceNotifications)!=null?y:!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=Ce(Ce({},this.defaultStyle),re);return}const de=Ce({},this.defaultStyle);for(const ve of Object.keys(re))de[ve]===re[ve]?(ve==="color"&&delete de.verbatimColor,ve==="backgroundColor"&&delete de.verbatimBackgroundColor,delete de[ve]):de[ve]=re[ve];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)Mh(this.model,de,re,{operation:ae});else Mh(this.model,ee.range,re,{operation:ae})}),Ns(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 b;return(b=this.element)==null?void 0:b.focus()}}),!0):!1}getCaretPoint(){const a=Mu(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,b){const y=jd(this,a,b,{bias:0});if(y<0)return!1;const E=this.model.position;return this.model.position=y,this.model.announce("move",E),Ns(this),!0}getPrompt(a){const b=this.model.findAtom(y=>y.type==="prompt"&&y.placeholderId===a);return console.assert(b!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),b}getPromptValue(a,b){const y=this.getPrompt(a);if(!y)return"";const E=this.model.offsetOf(y.firstChild),ee=this.model.offsetOf(y.lastChild);return this.model.getValue(E,ee,b)}getPrompts(a){return this.model.getAllAtoms().filter(b=>b.type!=="prompt"?!1:a?!(a.id&&b.placeholderId!==a.id||a.locked&&b.locked!==a.locked||a.correctness==="undefined"&&b.correctness||a.correctness&&b.correctness!==a.correctness):!0).map(b=>b.placeholderId)}setPromptValue(a,b,y){if(b!==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(b,he(Ce({},y),{insertionMode:"replaceSelection"}))}y!=null&&y.silenceNotifications&&(this.valueOnFocus=this.getValue()),Ns(this)}setPromptState(a,b,y){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}b==="undefined"?E.correctness=void 0:typeof b=="string"&&(E.correctness=b),typeof y=="boolean"&&(E.locked=y,E.captureSelection=y),Ns(this)}getPromptState(a){const b=this.getPrompt(a);return b?[b.correctness,b.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[void 0,!0])}getPromptRange(a){const b=this.getPrompt(a);return b?this.model.getBranchRange(this.model.offsetOf(b),"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 b;this.undoManager.snapshot(a)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Au(this)),(b=this.host)==null||b.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(Au(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(Au(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,b;const y=this.model;this.keyboardDelegate.setValue(y.getValue(this.model.selection,"latex-expanded"));{const E=y.at(y.position),ee=(a=E.mode)!=null?a:L0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Jc(this,"accept",{mode:ee}),y.position=y.offsetOf(E)):this.switchMode(ee))}(b=this.host)==null||b.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Au(this)),jf(this)}onContentWillChange(a){var b,y,E;return(E=(y=this.host)==null?void 0:y.dispatchEvent(new InputEvent("beforeinput",he(Ce({},a),{data:a.data?a.data:(b=a.inputType)!=null?b:"",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(),kc(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,b,y;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Qc(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(b=this.host)==null||b.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(y=this.host)==null||y.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Ns(this),this.focusBlurInProgress=!1,Fh();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Zl(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Ah(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(sl(this.model.selection));const b=Mu(this.field);b&&requestAnimationFrame(()=>{kc(this),this.keyboardDelegate.moveTo(b.x,b.y-b.height)})}onCompositionUpdate(a){Dv(this.model,a),Ns(this)}onCompositionEnd(a){Lv(this.model),Ah(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Wa.onCopy(this,a),Iu(this.model,sl(this.model.selection),"deleteByCut"),this.snapshot("cut"),Ns(this))}onCopy(a){Wa.onCopy(this,a)}onPaste(a){let b=this.isSelectionEditable;return b&&(b=Wa.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),b||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),b}onGeometryChange(){this._menu.hide(),_f(this),jf(this)}onWheel(a){const b=5*a.deltaX;if(!Number.isFinite(b)||b===0)return;const y=this.field;b<0&&y.scrollLeft===0||b>0&&y.offsetWidth+y.scrollLeft>=y.scrollWidth||(y.scrollBy({top:0,left:b}),a.preventDefault(),a.stopPropagation())}getHTMLElement(a){let b=a;for(;!b.id&&b.hasChildren;)b=a.children[0];return this.field.querySelector(`[data-atom-id="${b.id}"]`)}get context(){var a,b;return{registers:(a=this.options.registers)!=null?a:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(b=this.options.placeholderSymbol)!=null?b:"\u25A2",colorMap:y=>this.colorMap(y),backgroundColorMap:y=>this.backgroundColorMap(y),getMacro:y=>Ca(y,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function vp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const b of a.children)vp(b)}function Qh(a,b){var y;a&&(!b||((y=a.dataset)==null?void 0:y.atomId)===b?(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,b)})))}function h1(a,b){var y;if(!ot())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(b);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:(y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna",Engine:"standard",Text:b,TextType:"ssml",SpeechMarkTypes:["ssml"]};fc().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));fc().readAloudMarks=de.split(`
`).map(ve=>ve?JSON.parse(ve):{}),fc().readAloudTokens=[];for(const ve of fc().readAloudMarks)ve.value&&fc().readAloudTokens.push(ve.value);fc().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(ve,Se)=>{if(ve){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${b}") error:${ve}`);return}if(!(Se!=null&&Se.AudioStream))return;const De=new Uint8Array(Se.AudioStream),ze=new Blob([De.buffer],{type:"audio/mpeg"}),at=URL.createObjectURL(ze),Et=fc();Et.readAloudAudio?Et.readAloudAudio.pause():(Et.readAloudAudio=new Audio,Et.readAloudAudio.addEventListener("ended",()=>{const Ot=Et.readAloudMathfield;Et.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Ot?(kc(Ot),Et.readAloudElement=null,Et.readAloudMathfield=null,Et.readAloudTokens=[],Et.readAloudMarks=[],Et.readAloudCurrentMark=""):vp(Et.readAloudElement)}),Et.readAloudAudio.addEventListener("timeupdate",()=>{let Ot="";const Ln=Et.readAloudAudio.currentTime*1e3+100;for(const kr of Et.readAloudMarks)kr.time<Ln&&(Ot=kr.value);Et.readAloudCurrentMark!==Ot&&(Et.readAloudCurrentToken=Ot,Ot&&Ot===Et.readAloudFinalToken?Et.readAloudAudio.pause():(Et.readAloudCurrentMark=Ot,Qh(Et.readAloudElement,Et.readAloudCurrentMark)))})),Et.readAloudAudio.src=at,Et.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Et.readAloudAudio.play()})})}ot()||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 Ko=new WeakMap,p1=.5,dc={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 = ..."},ml=class Rc extends HTMLElement{static get formAssociated(){return dd()}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(b){b!==this._fontsDirectory&&(this._fontsDirectory=b,nv())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(b){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(b){this._soundsDirectory=b,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(b){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(b){var y,E,ee;this.audioBuffers={},b===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof b=="string"?this._keypressSound={spacebar:b,return:b,delete:b,default:b}:typeof b=="object"&&"default"in b&&(this._keypressSound={spacebar:(y=b.spacebar)!=null?y:b.default,return:(E=b.return)!=null?E:b.default,delete:(ee=b.delete)!=null?ee:b.default,default:b.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(b){this.audioBuffers={},this._plonkSound=b}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(b){this._speechEngine=b}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(b){this._speechEngineRate=b}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(b){this._speechEngineVoice=b}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(b){this._textToSpeechMarkup=b}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(b){this._textToSpeechRules=b}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(b){this._textToSpeechRulesOptions=b}static get locale(){return Ze.locale}static set locale(b){b==="auto"&&(b=navigator.language.slice(0,5)),Ze.locale=b}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(b){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Ze.strings}static set strings(b){Ze.merge(b)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(b){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(b){this._decimalSeparator=b,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(b){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var b,y;if(this._computeEngine===void 0){const E=(b=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:b.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(y=this._computeEngine)!=null?y:null}static set computeEngine(b){this._computeEngine=b}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(b){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(b){this._isFunction=b}static loadSound(b){return hc(this,null,function*(){delete this.audioBuffers[b];let y="";switch(b){case"keypress":y=this._keypressSound.default;break;case"return":y=this._keypressSound.return;break;case"spacebar":y=this._keypressSound.spacebar;break;case"delete":y=this._keypressSound.delete;break;case"plonk":y=this.plonkSound;break}if(typeof y!="string")return;y=y.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||y==="none"||y==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${y}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[b]=ae}catch(ee){}})}static playSound(b){return hc(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[b]||(yield this.loadSound(b)),!this.audioBuffers[b])return;const y=this.audioContext.createBufferSource();y.buffer=this.audioBuffers[b];const E=this.audioContext.createGain();E.gain.value=p1,y.connect(E).connect(this.audioContext.destination),y.start()})}constructor(b){if(super(),b){const y=[];for(const E of Object.keys(b))if(dc[E])if(dc[E].startsWith("mf."))if(dc[E].startsWith(`mf.${E}`))y.push(`Option \`${E}\` cannot be used as a constructor option. Use ${dc[E]}`);else{const ee=dc[E].match(/([a-zA-Z]+) =/);y.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else y.push(`Option \`${E}\` cannot be used as a constructor option. Use ${dc[E]}`);if(y.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 y)console.warn(E);console.groupEnd()}}if(dd()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[sc("core"),sc("mathfield"),sc("mathfield-element"),sc("ui"),sc("menu")],this.shadowRoot.appendChild(document.createElement("span"));const y=document.createElement("slot");y.style.display="none",this.shadowRoot.appendChild(y)}else this.shadowRoot.innerHTML="<style>"+Hu("core")+Hu("mathfield")+Hu("mathfield-element")+Hu("ui")+Hu("menu")+'</style><span></span><slot style="display:none"></slot>';b&&this._setOptions(b),this.shadowRoot.addEventListener("slotchange",()=>{var y;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(y=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?y:""})}showMenu(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.showMenu(b))!=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",b=>{var y;b.target===this&&!((y=this._mathfield)!=null&&y.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:b.altKey,button:b.button,buttons:b.buttons,clientX:b.clientX,clientY:b.clientY,ctrlKey:b.ctrlKey,metaKey:b.metaKey,movementX:b.movementX,movementY:b.movementY,relatedTarget:b.relatedTarget,screenX:b.screenX,screenY:b.screenY,shiftKey:b.shiftKey}))},{once:!0})}getPromptValue(b,y){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(b,y))!=null?ee:""}setPromptValue(b,y,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(b,y,E)}getPromptRange(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.getPromptRange(b))!=null?E:null}getPrompts(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.getPrompts(b))!=null?E:[]}get form(){var b;return(b=this._internals)==null?void 0:b.form}get name(){var b;return(b=this.getAttribute("name"))!=null?b:""}get type(){return this.localName}get mode(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.model.mode)!=null?y:this.defaultMode==="text"?"text":"math"}set mode(b){var y;(y=this._mathfield)==null||y.switchMode(b)}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(b){var y,E;if(!this._mathfield)return;const ee=(E=(y=Rc.computeEngine)==null?void 0:y.box(b).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 b,y;return(y=(b=this._mathfield)==null?void 0:b.errors)!=null?y:[]}_getOptions(b){return this._mathfield?Lc(this._mathfield.options,b):Ko.has(this)?Ce({},Lc(Ce(Ce({},Bf()),Of(Ko.get(this).options)),b)):null}getOptions(b){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?Lc(this._mathfield.options,b):Ko.has(this)?Lc(Ce(Ce({},Bf()),Of(Ko.get(this).options)),b):null}reflectAttributes(){const b=Bf(),y=this._getOptions();Object.keys(Rc.optionsAttributes).forEach(E=>{const ee=Uu(E);Rc.optionsAttributes[E]==="on/off"?b[ee]!==y[ee]?this.setAttribute(E,y[ee]?"on":"off"):this.removeAttribute(E):b[ee]!==y[ee]&&(Rc.optionsAttributes[E]==="boolean"?y[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof y[ee]=="string"||typeof y[ee]=="number")&&this.setAttribute(E,y[ee].toString()))})}getOption(b){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([b])[b]}_getOption(b){return this._getOptions([b])[b]}_setOptions(b){if(this._mathfield)this._mathfield.setOptions(b);else if(Ko.has(this)){const y=Ce(Ce({},Ko.get(this).options),b);Ko.set(this,he(Ce({},Ko.get(this)),{selection:{ranges:y.readOnly?[[0,0]]:[[0,-1]]},options:y}))}else Ko.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:b,menuItems:void 0});this.reflectAttributes()}setOptions(b){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 y of Object.keys(b))dc[y]&&console.warn(`\`mf.setOptions({${y}:...})\` -> ${dc[y]}`);console.groupEnd(),this._setOptions(b)}executeCommand(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.executeCommand(b))!=null?E:!1}getValue(b,y,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(b,y,E);if(Ko.has(this)){let ae,de,ve;if(Zc(b)?([ae,de]=b.ranges[0],ve=y):Wc(b)?([ae,de]=b,ve=y):wu(b)&&wu(y)?(ae=b,de=y,ve=E):(ae=0,de=-1,ve=b),(ve===void 0||ve==="latex")&&ae===0&&de===-1)return(re=(ee=Ko.get(this).value)!=null?ee:this.textContent)!=null?re:""}return""}setValue(b,y){if(this._mathfield&&b!==void 0){y!=null||(y={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(b,y);return}if(Ko.has(this)){const ee=Ko.get(this).options;Ko.set(this,{value:b,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=ef(this);Ko.set(this,{value:b,selection:{ranges:[[-1,-1]],direction:"forward"},options:E,menuItems:void 0})}hasFocus(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.hasFocus())!=null?y:!1}focus(){var b;(b=this._mathfield)==null||b.focus()}blur(){var b;(b=this._mathfield)==null||b.blur()}select(){var b;(b=this._mathfield)==null||b.select()}insert(b,y){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.insert(b,y))!=null?ee:!1}applyStyle(b,y){var E;return(E=this._mathfield)==null?void 0:E.applyStyle(b,y)}queryStyle(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.queryStyle(b))!=null?E:"none"}get caretPoint(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.getCaretPoint())!=null?y:null}set caretPoint(b){var y;b&&((y=this._mathfield)==null||y.setCaretPoint(b.x,b.y))}setCaretPoint(b,y){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.setCaretPoint(b,y))!=null?ee:!1}offsetFromPoint(b,y,E){return this._mathfield?jd(this._mathfield,b,y,E):-1}hitboxFromOffset(b){if(!this._mathfield)return null;const y=this._mathfield.model.at(b);if(!y)return null;const E=ac(this._mathfield,y);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var b;(b=this._mathfield)==null||b.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(b){var y,E,ee,re;ku.state==="closed"&&((E=(y=this._mathfield)==null?void 0:y.menu)==null?void 0:E.state)==="closed"&&(b.type==="pointerdown"&&this.onPointerDown(),b.type==="focus"&&((ee=this._mathfield)==null||ee.focus()),b.type==="blur"&&((re=this._mathfield)==null||re.blur()))}connectedCallback(){var b,y,E,ee;const re=window.getComputedStyle(this),ae=this.shadowRoot,de=re.userSelect!=="none";if(de)ae.host.addEventListener("pointerdown",this,!0);else{const De=ae.querySelector("span");De.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),dd()||(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 ve=ae.querySelector("slot:not([name])");if(ve)try{this._style=ve.assignedElements().filter(De=>De.tagName.toLowerCase()==="style").map(De=>De.textContent).join("")}catch(De){console.error(De)}if(this._style){const De=document.createElement("style");De.textContent=this._style,ae.appendChild(De)}let Se="";if(this.hasAttribute("value")?Se=this.getAttribute("value"):Se=(b=ve==null?void 0:ve.assignedNodes().map(De=>De.nodeType===3?De.textContent:"").join("").trim())!=null?b:"",this._mathfield=new f1(ae.querySelector(":host > span"),he(Ce({},(E=(y=Ko.get(this))==null?void 0:y.options)!=null?E:ef(this)),{eventSink:this,value:Se})),!Ko.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const De of Object.keys(Rc.optionsAttributes))this.upgradeProperty(Uu(De))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Ko.has(this)){const De=this._mathfield,ze=Ko.get(this),at=ze.menuItems;De.model.deferNotifications({content:!1,selection:!1},()=>{const Et=ze.value;Et!==void 0&&De.setValue(Et),De.model.selection=ze.selection,Ko.delete(this)}),at&&(this.menuItems=at)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Df()}disconnectedCallback(){var b,y;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=Lc(this._mathfield.options,Object.keys(Rc.optionsAttributes).map(ee=>Uu(ee)));Ko.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(y=(b=this._mathfield.menu)==null?void 0:b.menuItems)!=null?y:void 0,options:E}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(b){if(this.hasOwnProperty(b)){const y=this[b];delete this[b],(b==="readonly"||b==="read-only")&&(b="readOnly"),this[b]=y}}attributeChangedCallback(b,y,E){if(y===E)return;const ee=E!==null;switch(b){case"contenteditable":Ns(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(b){const y=!!b;y?(this.setAttribute("readonly",""),dd()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(dd()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:y})}get disabled(){return this.hasAttribute("disabled")}set disabled(b){var y;const E=!!b;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),dd()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((y=this._mathfield)!=null&&y.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(b){this.setValue(b)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(b){this._setOptions({defaultMode:b})}get macros(){return this._getOption("macros")}set macros(b){this._setOptions({macros:b})}get registers(){const b=this;return new Proxy({},{get:(y,E)=>{if(typeof E=="string")return b._getOption("registers")[E]},set(y,E,ee){return typeof E!="string"?!1:(b._setOptions({registers:he(Ce({},b._getOption("registers")),{[E]:ee})}),!0)}})}set registers(b){this._setOptions({registers:b})}get colorMap(){return this._getOption("colorMap")}set colorMap(b){this._setOptions({colorMap:b})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(b){this._setOptions({backgroundColorMap:b})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(b){this._setOptions({letterShapeStyle:b})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(b){this._setOptions({minFontScale:b})}get smartMode(){return this._getOption("smartMode")}set smartMode(b){this._setOptions({smartMode:b})}get smartFence(){return this._getOption("smartFence")}set smartFence(b){this._setOptions({smartFence:b})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(b){this._setOptions({smartSuperscript:b})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(b){this._setOptions({scriptDepth:b})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(b){this._setOptions({removeExtraneousParentheses:b})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(b){this._setOptions({mathModeSpace:b})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(b){this._setOptions({placeholderSymbol:b})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(b){this._setOptions({popoverPolicy:b})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(b){this._setOptions({environmentPopoverPolicy:b})}get menuItems(){var b,y,E;return this._mathfield?(b=this._mathfield.menu._menuItems.map(ee=>ee.menuItem))!=null?b:[]:(E=(y=Ko.get(this))==null?void 0:y.menuItems)!=null?E:[]}set menuItems(b){var y;if(this._mathfield){const E=(y=this._mathfield.element)==null?void 0:y.querySelector("[part=menu-toggle]");E&&(E.style.display=b.length===0?"none":""),this._mathfield.menu.menuItems=b}Ko.has(this)?Ko.set(this,he(Ce({},Ko.get(this)),{menuItems:b})):Ko.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:ef(this),menuItems:b})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(b){this._setOptions({mathVirtualKeyboardPolicy:b})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(b){this._setOptions({inlineShortcuts:b})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(b){this._setOptions({inlineShortcutTimeout:b})}get keybindings(){return this._getOption("keybindings")}set keybindings(b){this._setOptions({keybindings:b})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(b){this._setOptions({onInlineShortcut:b})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(b){this._setOptions({onScrollIntoView:b})}get onExport(){return this._getOption("onExport")}set onExport(b){this._setOptions({onExport:b})}get readOnly(){return this._getOption("readOnly")}set readOnly(b){this._setOptions({readOnly:b})}get isSelectionEditable(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.isSelectionEditable)!=null?y:!1}setPromptState(b,y,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(b,y,E)}getPromptState(b){var y,E;return(E=(y=this._mathfield)==null?void 0:y.getPromptState(b))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(b){this._setOptions({virtualKeyboardTargetOrigin:b})}get selection(){return this._mathfield?this._mathfield.model.selection:Ko.has(this)?Ko.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(b){if(typeof b=="number"&&(b={ranges:[[b,b]]}),this._mathfield){this._mathfield.model.selection=b,Ns(this._mathfield);return}if(Ko.has(this)){Ko.set(this,he(Ce({},Ko.get(this)),{selection:b}));return}Ko.set(this,{value:void 0,selection:b,options:ef(this),menuItems:void 0})}get selectionIsCollapsed(){const b=this.selection;return b.ranges.length===1&&b.ranges[0][0]===b.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Ko.has(this)?Ko.get(this).selection.ranges[0][0]:0}set position(b){if(this._mathfield&&(this._mathfield.model.position=b,Ns(this._mathfield)),Ko.has(this)){Ko.set(this,he(Ce({},Ko.get(this)),{selection:{ranges:[[b,b]]}}));return}Ko.set(this,{value:void 0,selection:{ranges:[[b,b]]},options:ef(this),menuItems:void 0})}getOffsetDepth(b){var y,E;return this._mathfield?((E=(y=this._mathfield.model.at(b))==null?void 0:y.treeDepth)!=null?E:2)-2:0}get lastOffset(){var b,y;return(y=(b=this._mathfield)==null?void 0:b.model.lastOffset)!=null?y:-1}};ml.version="0.98.5",ml._fontsDirectory="./fonts",ml._soundsDirectory="./sounds",ml.keypressVibration=!0,ml._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ml._plonkSound="plonk.wav",ml.audioBuffers={},ml.createHTML=a=>a,ml._speechEngineRate="100%",ml._speechEngineVoice="Joanna",ml._textToSpeechMarkup="",ml._textToSpeechRules="mathlive",ml._textToSpeechRulesOptions={},ml.speakHook=r1,ml.readAloudHook=h1,ml._decimalSeparator=".",ml.fractionNavigationOrder="numerator-denominator",ml._isFunction=a=>{var b,y;const E=window.MathfieldElement.computeEngine;return(y=(b=E==null?void 0:E.parse(a).domain)==null?void 0:b.isFunction)!=null?y:!1};var Qd=ml;function Uu(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(b,y)=>y.toUpperCase())}function ef(a){const b={readOnly:!1},y=Qd.optionsAttributes;return Object.keys(y).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?b.contentPlaceholder=ee!=null?ee:"":y[E]==="boolean"?b[Uu(E)]=!0:y[E]==="on/off"?ee==="on"?b[Uu(E)]=!0:ee==="off"?b[Uu(E)]=!1:b[Uu(E)]=void 0:y[E]==="number"?b[Uu(E)]=Number.parseFloat(ee!=null?ee:"0"):b[Uu(E)]=ee}}),b}function dd(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var gp=Qd,bp,yp,xp,Sp;if(ot()&&!((bp=window.customElements)!=null&&bp.get("math-field"))){(xp=window[yp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[yp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Qd,(Sp=window.customElements)==null||Sp.define("math-field",Qd)}function m1(a,b,y){let E=y,ee=0;const re=a.length;for(;E<b.length;){const ae=b[E];if(ee<=0&&b.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jf(a,b,y,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const de=ae.data;let ve=!0,Se=0,De;De=de.indexOf(b),De!==-1&&(Se=De,Se>0&&re.push({type:"text",data:de.slice(0,Se)}),ve=!1);let ze=!1;for(;!ze;){if(ve){if(De=de.indexOf(b,Se),De===-1){ze=!0;break}Se!==De&&re.push({type:"text",data:de.slice(Se,De)}),Se=De}else{if(De=m1(y,de,Se+b.length),De===-1){ze=!0;break}let at=de.slice(Se+b.length,De);ee==="ascii-math"&&([,at]=Cc(at,{format:"ascii-math"})),re.push({type:"math",data:at,rawData:de.slice(Se,De+y.length),mathstyle:E}),Se=De+y.length}ve=!ve}Se<de.length&&re.push({type:"text",data:de.slice(Se)})}else re.push(ae);return re}function wp(a,b,y){let E=[{type:"text",data:a}];return b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle")}),y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle","ascii-math")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle","ascii-math")}),E}function v1(a,b){const y=document.createElement("span");y.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+b.renderToMathML(a)+"</math>";y.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),y.textContent=a}return y.className="ML__sr-only",y}function g1(a,b,y,E){try{const ee=b.renderToMarkup(a,{mathstyle:y,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=y==="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 fd(a,b,y,E){var ee;const re=g1(a,y,b||"textstyle",E),ae=(ee=y.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const de=document.createElement("span");if(/\bmathml\b/i.test(ae)&&y.renderToMathML&&de.append(v1(a,y)),/\bspeakable-text\b/i.test(ae)&&y.renderToSpeakableText){const ve=document.createElement("span");ve.setAttribute("translate","no");const Se=y.renderToSpeakableText(a);ve.innerHTML=window.MathfieldElement.createHTML(Se),ve.className="ML__sr-only",de.append(ve)}return de.append(re),de}return re}function b1(a,b){var y,E,ee;let re=null;if((y=b.TeX)!=null&&y.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=fd(a,"",b,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=wp(a,(E=b.TeX)==null?void 0:E.delimiters,(ee=b.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 ve=fd(de.data,de.mathstyle==="textstyle"?"textstyle":"displaystyle",b,!0);ve&&re.appendChild(ve)}}return re}function Cp(a,b){var y,E,ee,re,ae,de,ve,Se,De,ze,at,Et,Ot,Ln,kr,Dn;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const ar=(y=a.childNodes[0].textContent)!=null?y:"";if((E=b.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(ar)){a.textContent="";const fr=fd(ar,"",b,!0);fr&&a.append(fr);return}const Pr=wp(ar,(ee=b.TeX)==null?void 0:ee.delimiters,(re=b.asciiMath)==null?void 0:re.delimiters);if(Pr.length===1&&Pr[0].type==="math"){a.textContent="";const fr=fd(Pr[0].data,Pr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",b,!0);fr&&a.append(fr);return}if(Pr.length===1&&Pr[0].type==="text")return}for(let ar=a.childNodes.length-1;ar>=0;ar--){const Pr=a.childNodes[ar];if(Pr.nodeType===3){const fr=b1((ae=Pr.textContent)!=null?ae:"",b);fr&&(ar+=fr.childNodes.length-1,Pr.replaceWith(fr))}else if(Pr.nodeType===1){const fr=Pr,Si=Pr.nodeName.toLowerCase();if(Si==="script"){const oa=Pr;let zi;if((de=b.processScriptTypePattern)!=null&&de.test(oa.type))zi=(ve=oa.textContent)!=null?ve:"";else if((Se=b.processMathJSONScriptTypePattern)!=null&&Se.test(oa.type))try{zi=(ze=b.serializeToLatex)==null?void 0:ze.call(b,JSON.parse((De=oa.textContent)!=null?De:""))}catch(Bo){console.error(Bo)}if(zi){let Bo="textstyle";for(const Vr of oa.type.split(";")){const[Gl,Pu]=Vr.toLowerCase().split("=");Gl.trim()==="mode"&&(Bo=Pu.trim()==="display"?"displaystyle":"textstyle")}const is=fd(zi,Bo,b,!0);is&&oa.parentNode.replaceChild(is,oa)}}else if(((Et=(at=b.processClassPattern)==null?void 0:at.test(fr.className))!=null?Et:!1)||!((Ln=(Ot=b.skipTags)==null?void 0:Ot.includes(Si))!=null&&Ln||(Dn=(kr=b.ignoreClassPattern)==null?void 0:kr.test(fr.className))!=null&&Dn))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const zi=a.textContent;a.textContent="";const Bo=fd(zi!=null?zi:"","displaystyle",b,!0);Bo&&a.append(Bo)}else Cp(fr,b)}}}var y1={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,b){var y,E,ee,re;try{const ae=Ce(Ce({},y1),b);ae.ignoreClassPattern=new RegExp((y=ae.ignoreClass)!=null?y:""),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:""),Df(),Fl("core"),Cp(a,ae)}catch(ae){ae instanceof Error?console.error("renderMathInElement(): "+ae.message):console.error("renderMathInElement(): Could not render math for element",a)}}function S1(a,b){const y=uc.singleton;return y?(y.show(),Hd(),y.currentLayer=b,y.render(),y.focus(),!0):!1}function w1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}$l({switchKeyboardLayer:S1,toggleVirtualKeyboard:w1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function fc(){var a,b;return(b=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function A1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function T1(a){E1(document.body,a)}function C1(a){if(typeof a=="string"){const b=document.getElementById(a);if(b===null)throw new Error(`The element with ID "${a}" could not be found.`);return b}return typeof a=="string"?null:a}function E1(a,b){var y,E,ee,re;const ae=C1(a);if(!ae)return;const de=b!=null?b:{};(y=de.renderToMarkup)!=null||(de.renderToMarkup=cl),(E=de.renderToMathML)!=null||(de.renderToMathML=Ng),(ee=de.renderToSpeakableText)!=null||(de.renderToSpeakableText=Rg),(re=de.serializeToLatex)!=null||(de.serializeToLatex=Fg),x1(ae,de)}var I1={mathlive:"0.98.5"}},17423:function(Cn,Vt,oe){"use strict";oe.d(Vt,{Z:function(){return Ce}});const pe=he=>typeof he=="object"&&he!=null&&he.nodeType===1,xe=(he,ke)=>(!ke||he!=="hidden")&&he!=="visible"&&he!=="clip",Fe=(he,ke)=>{if(he.clientHeight<he.scrollHeight||he.clientWidth<he.scrollWidth){const Je=getComputedStyle(he,null);return xe(Je.overflowY,ke)||xe(Je.overflowX,ke)||(Pe=>{const dt=(ot=>{if(!ot.ownerDocument||!ot.ownerDocument.defaultView)return null;try{return ot.ownerDocument.defaultView.frameElement}catch(lt){return null}})(Pe);return!!dt&&(dt.clientHeight<Pe.scrollHeight||dt.clientWidth<Pe.scrollWidth)})(he)}return!1},ct=(he,ke,Je,Pe,dt,ot,lt,nt)=>ot<he&&lt>ke||ot>he&&lt<ke?0:ot<=he&&nt<=Je||lt>=ke&&nt>=Je?ot-he-Pe:lt>ke&&nt<Je||ot<he&&nt>Je?lt-ke+dt:0,ge=he=>{const ke=he.parentElement;return ke==null?he.getRootNode().host||null:ke},Me=(he,ke)=>{var Je,Pe,dt,ot;if(typeof document=="undefined")return[];const{scrollMode:lt,block:nt,inline:_e,boundary:ht,skipOverflowHiddenElements:yt}=ke,Ze=typeof ht=="function"?ht:an=>an!==ht;if(!pe(he))throw new TypeError("Invalid target");const Qe=document.scrollingElement||document.documentElement,be=[];let we=he;for(;pe(we)&&Ze(we);){if(we=ge(we),we===Qe){be.push(we);break}we!=null&&we===document.body&&Fe(we)&&!Fe(document.documentElement)||we!=null&&Fe(we,yt)&&be.push(we)}const Ke=(Pe=(Je=window.visualViewport)==null?void 0:Je.width)!=null?Pe:innerWidth,Ge=(ot=(dt=window.visualViewport)==null?void 0:dt.height)!=null?ot:innerHeight,{scrollX:vt,scrollY:pt}=window,{height:Ue,width:et,top:kt,right:it,bottom:st,left:We}=he.getBoundingClientRect(),{top:Tt,right:Ut,bottom:Qt,left:Xe}=(an=>{const ft=window.getComputedStyle(an);return{top:parseFloat(ft.scrollMarginTop)||0,right:parseFloat(ft.scrollMarginRight)||0,bottom:parseFloat(ft.scrollMarginBottom)||0,left:parseFloat(ft.scrollMarginLeft)||0}})(he);let Ae=nt==="start"||nt==="nearest"?kt-Tt:nt==="end"?st+Qt:kt+Ue/2-Tt+Qt,Lt=_e==="center"?We+et/2-Xe+Ut:_e==="end"?it+Ut:We-Xe;const cn=[];for(let an=0;an<be.length;an++){const ft=be[an],{height:mt,width:Yt,top:An,right:dn,bottom:nn,left:jt}=ft.getBoundingClientRect();if(lt==="if-needed"&&kt>=0&&We>=0&&st<=Ge&&it<=Ke&&kt>=An&&st<=nn&&We>=jt&&it<=dn)return cn;const xn=getComputedStyle(ft),vn=parseInt(xn.borderLeftWidth,10),Te=parseInt(xn.borderTopWidth,10),ue=parseInt(xn.borderRightWidth,10),le=parseInt(xn.borderBottomWidth,10);let me=0,fe=0;const se="offsetWidth"in ft?ft.offsetWidth-ft.clientWidth-vn-ue:0,Oe="offsetHeight"in ft?ft.offsetHeight-ft.clientHeight-Te-le:0,rt="offsetWidth"in ft?ft.offsetWidth===0?0:Yt/ft.offsetWidth:0,Pt="offsetHeight"in ft?ft.offsetHeight===0?0:mt/ft.offsetHeight:0;if(Qe===ft)me=nt==="start"?Ae:nt==="end"?Ae-Ge:nt==="nearest"?ct(pt,pt+Ge,Ge,Te,le,pt+Ae,pt+Ae+Ue,Ue):Ae-Ge/2,fe=_e==="start"?Lt:_e==="center"?Lt-Ke/2:_e==="end"?Lt-Ke:ct(vt,vt+Ke,Ke,vn,ue,vt+Lt,vt+Lt+et,et),me=Math.max(0,me+pt),fe=Math.max(0,fe+vt);else{me=nt==="start"?Ae-An-Te:nt==="end"?Ae-nn+le+Oe:nt==="nearest"?ct(An,nn,mt,Te,le+Oe,Ae,Ae+Ue,Ue):Ae-(An+mt/2)+Oe/2,fe=_e==="start"?Lt-jt-vn:_e==="center"?Lt-(jt+Yt/2)+se/2:_e==="end"?Lt-dn+ue+se:ct(jt,dn,Yt,vn,ue+se,Lt,Lt+et,et);const{scrollLeft:zt,scrollTop:Zt}=ft;me=Pt===0?0:Math.max(0,Math.min(Zt+me/Pt,ft.scrollHeight-mt/Pt+Oe)),fe=rt===0?0:Math.max(0,Math.min(zt+fe/rt,ft.scrollWidth-Yt/rt+se)),Ae+=Zt-me,Lt+=zt-fe}cn.push({el:ft,top:me,left:fe})}return cn},Ee=he=>he===!1?{block:"end",inline:"nearest"}:(ke=>ke===Object(ke)&&Object.keys(ke).length!==0)(he)?he:{block:"start",inline:"nearest"};function Ce(he,ke){if(!he.isConnected||!(dt=>{let ot=dt;for(;ot&&ot.parentNode;){if(ot.parentNode===document)return!0;ot=ot.parentNode instanceof ShadowRoot?ot.parentNode.host:ot.parentNode}return!1})(he))return;const Je=(dt=>{const ot=window.getComputedStyle(dt);return{top:parseFloat(ot.scrollMarginTop)||0,right:parseFloat(ot.scrollMarginRight)||0,bottom:parseFloat(ot.scrollMarginBottom)||0,left:parseFloat(ot.scrollMarginLeft)||0}})(he);if((dt=>typeof dt=="object"&&typeof dt.behavior=="function")(ke))return ke.behavior(Me(he,ke));const Pe=typeof ke=="boolean"||ke==null?void 0:ke.behavior;for(const{el:dt,top:ot,left:lt}of Me(he,Ee(ke))){const nt=ot-Je.top+Je.bottom,_e=lt-Je.left+Je.right;dt.scroll({top:nt,left:_e,behavior:Pe})}}}}]);
}());